Merge remote-tracking branch 'origin/debian-experimental'
diff --git a/ChangeLog b/ChangeLog
index 7cfdf4a..75da6ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,251 +1,1027 @@
-=== release 1.4.5 ===
+=== release 1.5.91 ===
 
-2014-12-18  Sebastian Dröge <slomo@coaxion.net>
+2015-09-18  Sebastian Dröge <slomo@coaxion.net>
 
 	* configure.ac:
-	  releasing 1.4.5
+	  releasing 1.5.91
 
-2014-11-09 10:25:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-18 18:00:05 +0200  Sebastian Dröge <sebastian@centricular.com>
 
-	* sys/applemedia/avfvideosrc.m:
-	  avfvideosrc: Don't pretend to support reconfiguration
-	  We will run into an assertion in set_caps() if we try to change
-	  caps while the source is already running. Don't try to find new
-	  caps in GstBaseSrc::negotiate() to prevent caps changes.
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Only skip the remaining part of a GAP buffer
+	  We might've queued up a GAP buffer that is only partially inside the current
+	  output buffer (i.e. we received it too late!). In that case we should only
+	  skip the part of the GAP buffer that is inside the current output buffer, not
+	  also the remaining part. Otherwise we forward this pad too far into the future
+	  and break synchronization.
 
-2014-12-17 12:20:54 +1100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/avfvideosrc.m:
-	  avfvideosrc: improve timestamping and latency reporting
-	  Use AVF provided timings to timestamp output buffers. Use the running time at
-	  the time the first buffer is produced to base timestamps on. Report 1-frame
-	  latency based on the negotiated framerate instead of hardcoding 4ms latency.
-
-2014-12-10 22:36:53 +1100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	* sys/applemedia/vtenc.h:
-	  vtenc: negotiate profile and level with downstream
-
-2014-12-10 19:44:01 +1100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	* sys/applemedia/vtenc.h:
-	  vtenc: report latency
-
-2014-12-05 16:33:20 +0100  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/applemedia/vtenc.c:
-	* sys/applemedia/vtenc.h:
-	  vtenc: Add properties to specify the maximum keyframe interval in frames and seconds
-
-2014-11-27 13:40:56 +0100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	* sys/applemedia/vtenc.h:
-	  vtenc: add quality property
-
-2014-11-27 13:33:07 +0100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/Makefile.am:
-	* sys/applemedia/vtenc.c:
-	  vtenc: set profile and level in caps
-
-2014-12-05 16:15:23 +0100  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/applemedia/vtenc.c:
-	  vtenc: Fix conversion of the bitrate property and our internal bitrate storage
-	  The property is in kbit/s and we store it in bit/s, so just multiply and
-	  divide by 1000. No need to put a factor of 8 in there.
-	  kVTCompressionPropertyKey_AverageBitRate is also in bit/s according to
-	  its documentation.
-
-2014-12-16 13:35:14 +0100  Wim Taymans <wtaymans@redhat.com>
-
-	* ext/directfb/dfbvideosink.c:
-	* ext/sdl/sdlvideosink.c:
-	* ext/wayland/wlwindow.c:
-	* sys/directdraw/gstdirectdrawsink.c:
-	* sys/pvr2d/gstpvrvideosink.c:
-	* sys/vdpau/gstvdpvideopostprocess.c:
-	  rectangle: clear rectangle struct before use
-
-2014-12-15 15:21:50 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
-
-	* ext/opus/gstopusparse.c:
-	  opusparse: fix frame size determination
-	  https://bugzilla.gnome.org/show_bug.cgi?id=741321
-
-2014-05-08 10:41:03 +0530  Sudip Jain <sudip.jain@linaro.org>
-
-	* gst/mpegtsdemux/mpegtsbase.c:
-	  mpegtsbase: scan more bytes to find initial PCRs
-	  Fixes playback of Samsung-Colorful-Variety-1080i.ts.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=729768
-
-2014-12-09 05:03:11 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
-
-	* gst/geometrictransform/gstmirror.c:
-	  mirror: Needs remap when the mode changes.
-	  This caused the user to think the mode wasn't taken into account.
-
-2014-12-01 09:48:41 +0100  Thomas Klausner <wiz@danbala.tuwien.ac.at>
-
-	* configure.ac:
-	  configure: Do comparisons in a portable way with = instead of ==
-	  https://bugzilla.gnome.org/show_bug.cgi?id=740953
-
-2014-11-27 16:43:39 +0100  Thibault Saunier <tsaunier@gnome.org>
-
-	* gst/audiomixer/gstaudiomixer.c:
-	  audiomixer: Do not try to resize a buffer to a negative size on EOS
-
-2014-11-24 13:56:56 +0100  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/decklink/gstdecklink.cpp:
-	  decklink: HD1080i50 is 50 frames per second
-
-2014-11-14 10:55:14 +0900  Wonchul Lee <wonchul86.lee@lge.com>
-
-	* gst/rawparse/gstrawparse.c:
-	  rawparse: send SEEKING query upstream first
-	  Sometimes rawparse does not handle the seeking query
-	  properly, the rawparse should send the query upstream
-	  first. For example, upstream could support seeking in
-	  TIME format (but not in BYTE format), so the BYTE format
-	  seeking query that rawparse sends in push mode would
-	  fail.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=722764
-
-2014-11-21 15:46:49 +0100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	  vtenc: let VT pick the bitrate by default
-
-2014-11-06 13:22:17 +0100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	* sys/applemedia/vtenc.h:
-	  vtenc: add realtime and allow-frame-reordering properties
-
-2014-11-20 10:23:30 -0800  Aleix Conchillo Flaqué <aleix@oblong.com>
-
-	* ext/srtp/gstsrtpdec.c:
-	  srtpdec: fix rtp/rtcp sink event memory leak
-	  https://bugzilla.gnome.org/show_bug.cgi?id=740451
-
-2014-11-20 16:04:34 +0100  Alessandro Decina <alessandro.d@gmail.com>
-
-	* sys/applemedia/vtenc.c:
-	  vtenc: set H264_Baseline_AutoLevel on OSX as well
-
-2014-11-20 15:50:18 +0100  Alessandro Decina <alessandro.d@gmail.com>
+2015-09-18 21:14:46 +1000  Matthew Waters <matthew@centricular.com>
 
 	* sys/applemedia/vtdec.c:
-	  vtdec: disable the reorder queue for baseline streams
+	  vtdec: disable the texture cache on OSX
+	  This a workaround until the incompatibility with CVOpenGLTextureCache
+	  and opengl3 contexts is fixed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754786
 
-2014-11-20 09:41:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-17 19:42:34 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Keep at least two buffers in the queue in live mode
+	  When in live mode, the queue needs to hold the currently processed
+	  buffer and one more at least.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754851
+
+2015-09-18 11:55:37 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* po/zh_CN.po:
+	  po: Update translations
+
+2015-09-18 15:28:27 +1000  Matthew Waters <matthew@centricular.com>
 
 	* sys/applemedia/vtdec.c:
-	  vtdec: Fix divide by zero in the picture buffer length calculation
+	  vtdec: gst-indent file
 
-2014-11-16 10:57:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-17 19:56:47 +0100  Tim-Philipp Müller <tim@centricular.com>
 
-	* configure.ac:
-	* gst-libs/gst/gl/gstglapi.h:
-	  gl: Use numeric OSX version instead of the macro
-	  The macro is not defined on older OSX versions and evaluates to 0.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=740201
+	* gst/dvdspu/gstspu-pgs.c:
+	  dvdspu: pgs: fix printf format/argument mismatch in debug statements
+	  Fixes compiler warnings when extra debugging is enabled at compile time.
 
-2014-11-13 12:01:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-17 17:54:36 +0100  Tim-Philipp Müller <tim@centricular.com>
 
-	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
-	  gl/cocoa: Don't override the application delegate
-	  Otherwise interesting things will happen in Cocoa applications, like
-	  infinite event loops that block the NSApplication loop forever.
-	  This was only needed for GNUStep and thus can safely be removed now.
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: remove unprefix STATISTICS_MESSAGE_NAME after all
+	  It was only added during 1.5.x so we might just as well remove it
+	  immediately.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754686
 
-2014-11-16 11:00:14 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-07 16:57:05 +0200  Philippe Normand <philn@igalia.com>
 
-	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
-	  gl/cocoa: Only use convertRectToBacking on OSX >= 10.7
-	  It does not exist before and older versions also don't have
-	  support for HiDPI displays anyway.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=740201
+	* ext/hls/gsthlsdemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: prefix the statistics message name macro
+	  Keep old define around for now.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754686
 
-2014-11-13 11:58:07 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-09-18 00:10:10 +1000  Jan Schmidt <jan@centricular.com>
 
-	* configure.ac:
-	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
-	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
-	* tests/examples/gl/cocoa/cocoa-videooverlay.m:
-	  gl/cocoa: Remove GNUStep support
-	  Until gcc and GNUStep properly support Objective-C blocks and other
-	  "new" features of Objective-C we can't properly support them without
-	  making the code much more ugly.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=739152
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: Hook up the recently added change_state vfunc.
+	  The state change function was implemented, but not installed,
+	  making the compiler complain about the unused function.
 
-2014-11-12 16:45:12 +0100  Alessandro Decina <alessandro.d@gmail.com>
+2015-09-18 00:20:13 +1000  Jan Schmidt <jan@centricular.com>
 
-	* sys/applemedia/vtenc.c:
-	  vtenc: fix build on iOS
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dts/gstdtsdec.c:
+	* ext/gl/gstglstereomix.c:
+	* gst/audiomixer/gstaudioaggregator.c:
+	  Don't throw compiler warnings with G_DISABLE_ASSERT
+	  Disable code that warns about unused variables when G_DISABLE_ASSERT
+	  is defined, as it is in tarballs and pre-releases.
 
-2014-11-12 15:35:36 +0100  Alessandro Decina <alessandro.d@gmail.com>
+2015-09-17 22:17:24 +1000  Matthew Waters <matthew@centricular.com>
 
-	* sys/applemedia/coremediabuffer.c:
-	  coremediabuffer: set ->pixel_buf for CVPixelBuffer buffers
-	  Fix a bug for which we never actually set ->pixel_buf to non-NULL for
-	  CVPixelBuffer buffers.
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/caopengllayer: fix non-existent selector warning
+	  557ca6fda5f831be4aba5819bf7b30b296e575cd introduced the queueResize
+	  call without implementing the selector
 
-2014-11-12 09:59:53 +0100  Alessandro Decina <alessandro.d@gmail.com>
+2015-09-17 21:31:39 +1000  Jan Schmidt <jan@centricular.com>
 
-	* sys/applemedia/vtenc.c:
-	  vtenc: fix compilation on < 10.9
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: Fix g_return_val_if_fail in a void function
 
-2014-11-11 18:01:54 +0100  Alessandro Decina <alessandro.d@gmail.com>
+2015-09-17 15:06:31 +1000  Matthew Waters <matthew@centricular.com>
 
-	* sys/applemedia/vtenc.c:
-	  vtenc: enable the hw encoder on OSX
+	* sys/applemedia/vtdec.c:
+	  applemedia/vtdec: fix negotiation errors when resizing glimagesink
+	  GstVideoDecoder has its own logic for detecting when to reconfigure
+	  which ultimately calls decide_allocation and results in a new
+	  texture cache that has not been configured from our reconfigure check.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755156
 
-2014-11-15 21:59:48 +0000  Tim-Philipp Müller <tim@centricular.com>
-
-	* sys/dvb/dvbbasebin.c:
-	  dvbbasebin: fix possible crash by passing 64 bits for 64-bit queue property
-	  https://bugzilla.gnome.org/show_bug.cgi?id=740191
-
-2014-11-10 10:01:24 +0100  Gwenole Beauchesne <gb.devel@gmail.com>
-
-	* gst-libs/gst/codecparsers/gsth264parser.c:
-	  codecparsers: h264: fix derivation of MaxPicNum variable.
-	  The logic to compute the MaxPicNum variable was reversed. In paricular,
-	  MaxPicNum is double MaxFrameNum only if field_pic_flag is set to 1.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=739291
-
-2014-11-11 12:00:30 +0100  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/decklink/gstdecklinksink.cpp:
-	  decklinksink: Check the correct variable for failure
-	  If we can't get an output, we would otherwise just use it later and crash.
-
-2014-11-07 10:01:59 +1100  Matthew Waters <matthew@centricular.com>
+2015-09-17 17:22:47 +1000  Matthew Waters <matthew@centricular.com>
 
 	* ext/gl/gstglimagesink.c:
-	  glimagesink: clamp the resize width/height to >= 1 to avoid a GL error
+	  glimagesink: request a resize on caps/3d mode changes
+	  Fixes incorrect aspect ratio on OSX when changing caps or the 3d
+	  output mode.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755111
 
-=== release 1.4.4 ===
+2015-09-17 17:06:37 +1000  Matthew Waters <matthew@centricular.com>
 
-2014-11-06 13:14:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.h:
+	  glwindow: add API to request a resize event on the next draw
+	  - glimagesink needs to be able to resize the viewport on aspect ratio
+	  changes resulting from either caps changes or 3d output mode changes.
+	  - Performing a glViewport outside the GstGLWindow::resize callback
+	  will not have the winsys' stack of viewports required to correctly
+	  place the output frame.
+	  Provide a function to request a resize on the next draw event from the
+	  winsys.
+	  Also track size changes inside the base GstGLWindow class rather
+	  than in each subclass.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755111
+
+2015-09-17 16:55:11 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  gl/uploadelement: fail earlier if we could not upload the buffer
+
+2015-09-17 16:05:21 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/x11: store the correct dimension from the resize events
+	  small typo s/width/height/
+
+2015-09-17 13:47:23 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* sys/bluez/gstavdtputil.c:
+	  avdtputil: fix GError memory leak during failures
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755142
+
+2015-09-17 13:35:02 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglstereosplit.c:
+	* ext/gl/gstgltestsrc.c:
+	* ext/gtk/gtkgstglwidget.c:
+	* gst-libs/gst/gl/gstglbasebuffer.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: Fix GError leaks during failures
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755140
+
+2015-09-16 00:19:35 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/inter/gstintervideosink.c:
+	* gst/inter/gstintervideosink.h:
+	  intervideosink: render preroll frames as well
+	  Derive from GstVideoSink so that preroll frames will automatically
+	  get rendered too, unless the show-preroll-frame property is set to
+	  FALSE. Fixes intervideosrc only picking up frames if intervideosink
+	  is in PLAYING state.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755049
+
+2015-09-17 00:01:58 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/dvbsuboverlay/gstdvbsuboverlay.c:
+	  dvbsuboverlay: Check if downstream supports GstVideoOverlayComposition.
+	  Fix the negotiation of GstVideoOverlayComposition by checking
+	  intersection with the peer caps, rather than just accept-caps,
+	  which might only check the pad template.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755113
+
+2015-09-09 14:49:17 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: support for negative repeat count in segments
+	  Implements negative repeat segment fields, defined in 5.3.9.6.1.
+
+2015-09-08 15:14:13 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  mpdparser: properly read signed r values for S elements
+	  The spec defines these as signed in 5.3.9.6.1.
+	  Since we don't support this behavior, warn and default to 0
+	  (non repeating), which is the spec's default when the value
+	  is not present.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752480
+
+2015-09-09 11:05:35 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  mdpparser: catch failures to parse
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752480
+
+2015-09-16 17:28:05 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: avoid updating the viewport in the draw loop
+	  Fixes flashes/incorrect aspect ratio when resizing glimagesink on OSX.
+
+2015-09-15 21:50:19 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Fix playback of live streams
+	  dashdemux seeks each live stream to its current fragment in the beginning, but
+	  the base class does not know about this. Update the demuxer segment with this
+	  seek so we generate the correct SEGMENT event and can actually play the
+	  stream.
+	  This needs some refactoring at some point.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755047
+
+2015-09-15 15:39:11 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: remove check for number of channels
+	  opus decoder can convert from different number of channels, no
+	  need to check, just let it negotiate and create a new decoder if
+	  needed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755059
+
+2015-09-15 10:00:43 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Only overwrite last return if it was OK
+	  Prevents overwriting other conditions that would be more important,
+	  such as EOS.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755042
+
+2015-09-15 09:58:20 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix return when trying to advance in subfragmented stream
+	  Even if it doesn't actually advance the subfragment in the default way
+	  for streams that have subfragments, it can help the base class to return
+	  EOS when there is no more fragments instead of signaling it that it should
+	  continue downloading.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755042
+
+2015-09-15 11:34:12 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl: bufferpool take into account video stride alignment requirements
+	  when allocating memory. Fixes crashes with avdec_h265 in the AVX2
+	  code path which requires 32-byte stride alignment, but the
+	  GstAllocationParams only specified a 16-byte alignment.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754120
+
+2015-09-15 13:40:58 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/soundtouch/gstpitch.cc:
+	  pitch: Set seqnum on newly created segment event
+	  https://bugzilla.gnome.org/show_bug.cgi?id=755012
+
+2015-09-11 21:37:08 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Fix mixup of running times and segment positions
+	  We have to queue buffers based on their running time, not based on
+	  the segment position.
+	  Also return running time from GstAggregator::get_next_time() instead of
+	  a segment position, as required by the API.
+	  Also only update the segment position after we pushed a buffer, otherwise
+	  we're going to push down a segment event with the next position already.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753196
+
+2015-09-11 16:56:40 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Use stream time in the position query instead of segment position
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753196
+
+2015-09-11 12:22:51 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Fix mixup of running times and segment positions
+	  We have to queue buffers based on their running time, not based on
+	  the segment position.
+	  Also return running time from GstAggregator::get_next_time() instead of
+	  a segment position, as required by the API.
+	  Also only update the segment position after we pushed a buffer, otherwise
+	  we're going to push down a segment event with the next position already.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753196
+
+2015-09-11 12:21:50 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: Document that get_next_time() should return running time
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753196
+
+2015-09-03 14:20:00 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  mpdparser: Don't consider period start times in periods with segment lists either
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754222
+
+2015-09-03 10:26:03 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/dash_mpd.c:
+	  mpdparser: Fix unit test that assumed that fragment timestamps should include the period start timestamp
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754222
+
+2015-09-02 18:33:51 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: Export the period start time to the base class
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754222
+
+2015-09-02 18:29:43 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: Properly implement timestamping of multi-period streams
+	  Each period will start again with pts 0 + period presentation offset, which is
+	  also going to be the presentation time inside the container stream if any.
+	  However all periods together should form a continuous timeline, with regard to
+	  stream time and running time.
+	  For making this possible we keep track of the "user requested segment", i.e.
+	  the seek events, inside the demuxer without adjusting anything and taking this
+	  demuxer segment only as orientation for modified segments per stream.
+	  This per stream segments will have their segment.start at pts that would be
+	  produced for this stream in this period, and the segment.base/time adjusted so
+	  that this pts maps to the running and stream time this period should have in
+	  the context of all other periods.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754222
+
+2015-09-01 13:13:58 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  Revert "dashdemux: Subtract the period start time from the presentation offset"
+	  This reverts commit 626a8f0a74f8ea748b811b74ba9e7ae2baea2cca.
+	  This allows us to get the plain presentation offset and the period start time
+	  separately. We have to adjust the timestamp by the presentation offset, but
+	  the period start time should only adjust the stream time and running time.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752409
+
+2015-09-01 13:12:45 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  Revert "dashdemux: Include the period start in the fragment timestamps in all cases"
+	  This reverts commit e671ad25a989cb21c62c7a5867c2090890ce49ba.
+	  The timestamps should restart at 0 again for each period, but we have to
+	  adjust the segment to map those timestamps to the actual stream time and
+	  running time of that period.
+	  Otherwise we would have timestamps that conflict with the ones from the tfdt
+	  inside the MP4 container, which are restarting at 0 for each period.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752409
+
+2015-09-14 19:03:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Consider the repeat count when checking if a segment is the last one
+	  Otherwise we play only the first repetition of the last segment and then EOS.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752480
+
+2015-09-14 13:56:10 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: also check for subfragments on has_next_fragment
+	  In dash isombff profile the fragment is split into subframents where
+	  bitrate switching is possible. Also take that into consideration
+	  when checking if a stream has next fragments.
+
+2015-09-11 11:22:35 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: improve deprecated properties docs
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754819
+
+2015-09-11 11:11:09 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: do not throw g_warning when getting deprecated properties
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754819
+
+2015-09-09 19:51:18 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	  videoaggregator: fix caps query to properly handle alpha formats
+	  Only accept alpha if downstream has alpha as well. It could
+	  theoretically accept alpha unconditionally if blending is
+	  properly implemented for handle it but at the moment this
+	  is a missing feature.
+	  Improves the caps query by also comparing with the template
+	  caps to filter by what the subclass supports.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754465
+
+2015-09-12 00:51:52 +1000  Jan Schmidt <jan@centricular.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	  vtdec: Use R/RG textures for NV12 when the context provides them
+	  Fixes playback to GL memory on iOS, where the colours are messed
+	  up by passing Luminance/LuminanceAlpha textures where
+	  color convert expects R/RG textures.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754504
+
+2015-09-08 17:17:36 +1000  Jan Schmidt <jan@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: Prefer GL output caps.
+	  Prefer GL caps by putting them first in the pad template and
+	  intersecting using GST_CAPS_INTERSECT_FIRST.
+
+2015-09-10 19:02:12 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparsers: h265: Fix the selection of Active Ref Pic Set
+	  If short_term_ref_pic_set_sps_flag is FALSE, the ShortTermRefPicSet
+	  structure is supposed to derive from slice header. Which means,
+	  CurrRpsIdx is equal to num_short_term_ref_pic_sets. But the number
+	  of refpicsets communicated via sps header is only num_short_term_ref_pic_sets - 1.
+	  And we are using slice_header structure to reference the last entry, which is
+	  ShortTermRefPicSet[num_short_term_ref_pic_sets].
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754834
+
+2015-09-10 16:28:31 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparsers: h265 : Fix default scaling list values
+	  Fix the default_scaling_list values based on Table 7-6
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754834
+
+2015-09-10 14:11:58 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: less-than-zero comparison of an unsigned value is never true
+	  Use the correct type, GstClockTimeDiff, instead.
+	  CID 1323742
+
+2015-09-10 00:07:18 +1000  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/qt/qtitem.cc:
+	  gtk, qt: more specifically define the compile time requirements
+	  Otherwise we could include headers/configurations that will
+	  never been installed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754732
+
+2015-09-02 23:42:34 +1000  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	  build/qt: indent configure file
+	  don't mix tabs and spaces
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754466
+
+2015-09-10 00:00:11 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/qt/gstqsgtexture.cc:
+	  qt: use our function table instead of directly calling gl functions
+	  Otherwise when building with --as-needed we would need to link to
+	  a GL or GLES library.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754732
+
+2015-09-09 23:53:57 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl/api: use public rather than private define
+	  HAVE_IOS is only defined for the build of this module so
+	  attempting to use gstgl in iOS would result in incorrect GL
+	  includes.
+	  Use GST_GL_HAVE_PLATFORM_EAGL instead for choosing the iOS GL
+	  header.
+
+2015-09-03 16:36:57 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Handle pipelines where the running time does not start around 0 properly
+	  We were converting all times to our internal running times, that is the time
+	  the sink itself spent in PLAYING already. But forgot to do that for the
+	  running time calculated from the buffer timestamps. As such, all buffers were
+	  scheduled much later if the pipeline's running time did not start at 0.
+	  This happens for example if a base time is explicitly set on the pipeline.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754528
+
+2015-09-07 13:36:19 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Consider pipeline latency, render delay and ts offset when scheduling frames
+	  Without this, we will schedule all frames too late in live pipelines.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754666
+
+2015-09-09 13:58:05 +0900  Kouhei Sutou <kou@clear-code.com>
+
+	* sys/directsound/gstdirectsoundsrc.c:
+	  directsoundsrc: fix build error for 64bit Windows build by MinGW
+	  Casting to UINT from HMIXER generates the following warning with
+	  64bit Windows target MinGW:
+	  gstdirectsoundsrc.c: In function 'gst_directsound_src_mixer_find':
+	  gstdirectsoundsrc.c:733:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+	  mmres = mixerGetDevCaps ((UINT) dsoundsrc->mixer,
+	  ^
+	  cc1: all warnings being treated as errors
+	  We can use portable GPOINTER_TO_UINT() macro for this propose.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754756
+
+2015-09-09 09:33:01 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	  gl/eagl: Also unbind renderbuffer after setting up framebuffer
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754757
+
+2015-09-09 09:27:17 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	  gl/eagl: Don't make context uncurrent just to make it current again in the next line
+	  Also binding the framebuffer again is unnecessary then as it was just bound a
+	  few lines before while the context was current.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754757
+
+2015-09-07 12:09:41 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: fix period start time scaling
+	  This GstStreamPeriod start value is expressed in nanoseconds,
+	  and the glib time addition function expects microseconds.
+	  There seems to have been a confusion with GstPeriodNode's start
+	  field, which is expressed in milliseconds.
+	  Additionally, add a warning if the timestamp modification did
+	  not succeed, and NULL was returned.
+
+2015-09-05 23:38:44 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/faac/gstfaac.c:
+	  faac: Add bitrate info to the tags output.
+	  Makes it possible for muxers to know the target bitrate as soon
+	  as encoding starts, which flvmux now uses.
+
+2015-09-05 01:50:41 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	* tests/check/elements/compositor.c:
+	  compositor: Ensure all arguments to CLAMP are signed int
+	  If any of the arguments to CLAMP are unsigned integers, the comparison causes
+	  an automatic conversion of the signed int to unsigned, which causes -1 to become
+	  UINT_MAX and get clamped to the high value of the CLAMP instead of 0.
+	  See 716 at http://c0x.coding-guidelines.com/6.3.1.8.html
+	  Also add a test for this.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754576
+
+2015-09-04 15:43:40 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	  gtk: Do not consider GtkEvents as handled
+	  Applications might still want to use them
+	  after the sink transformed them into
+	  GstNavigation events
+
+2015-09-02 19:16:56 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: lift restriction of changing pixel-aspect-ratio
+	  The videoaggregator can convert PAR, there is no reason for
+	  restricting it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754291
+
+2015-08-07 17:27:48 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* configure.ac:
+	* ext/qt/qtitem.cc:
+	  qmlsink: Ensure that at least one windowing system is available
+	  Otherwise, we'll just crash at runtime because the gl context is NULL
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754108
+
+2015-08-28 20:33:40 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: Reset state on flush and state changes
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753152
+
+2015-08-31 18:06:31 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/qt/gstqtsink.cc:
+	* ext/qt/qtitem.cc:
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gtk, qt, gl: fix typo in debug and error messages
+
+2015-08-28 23:05:20 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Also ignore start-time on seek from gst_element_send_event()
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753806
+
+2015-08-29 16:51:08 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: variables in clamp_rectangle() should be signed
+	  x/y/w/h are signed integers. As can be seen in GstCompositorPad.
+	  The prototype for clamp_rectangle was wrong. This commit reverts the change
+	  and fixes the prototype.
+	  This reverts commit bca444ea4a84c39e9989681f892f6e4cb2033cf9.
+
+2015-08-28 19:55:59 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	* gst/mpegdemux/gstmpegdemux.c:
+	* sys/pvr2d/pvr_includes/dri2_ws.h:
+	* sys/pvr2d/pvr_includes/img_defs.h:
+	* sys/pvr2d/pvr_includes/img_types.h:
+	* sys/pvr2d/pvr_includes/pvr2d.h:
+	* sys/pvr2d/pvr_includes/servicesext.h:
+	* sys/pvr2d/pvr_includes/wsegl.h:
+	* sys/uvch264/gstuvch264_mjpgdemux.c:
+	  Fix file permissions of some files
+
+2015-08-28 15:21:11 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: remove check for below zero for unsigned value
+	  CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
+	  number since it is an unsigned integer. Removing that check and only checking if
+	  it is bigger than max by using MIN().
+	  CID 1320707
+
+2015-08-28 13:42:29 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/Makefile.am:
+	* ext/opencv/gstedgedetect.c:
+	* ext/opencv/gstedgedetect.cpp:
+	  edgedetect: Rename gstedgedetect.c to gstedgedetect.cpp for consistency.
+	  Change the file extension to cpp and add it into Makefile for consistency
+	  with other elements of opencv.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754148
+
+2015-08-27 21:51:52 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstedgedetect.c:
+	  edgedetect: remove unused and useless functions.
+	  The cvSmooth cvNot functions and do not have the correct input parameters.
+	  Furthermore, cvSmooth function is not necessary for edge detection,
+	  because the Canny function makes the step of smoothing the image.
+	  And cvNot function is useless because there aren't changes if this
+	  function is eliminated.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754148
+
+2015-08-26 18:40:35 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/opencv/gsttextoverlay.c:
+	* ext/opencv/gsttextoverlay.h:
+	  textoverlay: remove unused variable
+	  Memory is reserved for this variable but never used. Removing it.
+
+2015-08-26 18:21:15 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfaceblur.cpp:
+	* ext/opencv/gstfaceblur.h:
+	  faceblur: remove unused variable.
+	  Memory is reserved for this variable and then released without making any
+	  use of it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753994
+
+2015-08-26 17:56:50 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfaceblur.cpp:
+	* ext/opencv/gstfaceblur.h:
+	  faceblur: need to migrate to C++.
+	  The cascade classifier changes its structure on new version of OpenCV 2.4.11.
+	  It is need to migrate to C++ to utilize the new load method of OpenCV which
+	  allows to load the old and new classifiers.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753994
+
+2015-08-26 12:47:58 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfaceblur.cpp:
+	  faceblur: Check CvHaarClassifierCascade is release before being modified.
+	  For PROP_PROFILE case that exist inside gst_face_blur_set_property
+	  function loads the new XML file in the CvHaarClassifierCascade property
+	  without first checking that it is released because maybe there is an XML
+	  file previously loaded.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753994
+
+2015-08-26 12:27:15 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfaceblur.cpp:
+	  faceblur: Code refactoring of gst_face_blur_load_profile.
+	  Changes inside the gst_face_blur_load_profile function, the number of
+	  input parameters and in lines where it is used due to it cannot be used
+	  generically.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753994
+
+2015-08-26 11:57:24 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/Makefile.am:
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfaceblur.cpp:
+	  faceblur: Change gstfaceblur to C++.
+	  Change the gstfaceblur.c file to cpp and add it into Makefile.
+	  It is necessary to migrate the faceblur plugin to C++,
+	  in order to load new and old classifiers, to make faceblur work
+	  with newer versions of Opencv.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753994
+
+2015-08-27 11:10:05 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/dvbsuboverlay/gstdvbsuboverlay.c:
+	  dvbsuboverlay: Fix caps memory leak by making static caps actually static
+	  See https://bugzilla.gnome.org/show_bug.cgi?id=754157
+
+2015-08-21 16:13:43 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: don't meddle with the class struct from an instance
+	  Fix some very dubious code. The class methods should always
+	  be set, and the instance-specific check should then be done
+	  inside the method. For data_received that's there already, for
+	  finish_fragment we need to add it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753937
+
+2015-08-26 10:52:46 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth265parse.c:
+	  h264parse/h265parse: Fix negotiation crash
+	  As it's recursive, gst_pad_get_allowed_caps() may also return
+	  empty for anything incompatible downstream. EMPTY is not valid caps
+	  value for gst_caps_fixate(). This lead to assertion and then crash.
+	  Ideally, the negotiate function should be re-factored to have a return
+	  value, and we could make the negotiation fails earlier.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754122
+
+2015-08-26 15:40:16 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	* tests/check/elements/compositor.c:
+	  compositor: Actually use the output resolution for clamping
+	  The obscured check in compositor was using the dimensions of the pad to clamp
+	  the h/w of the pad instead of the output resolution, and was doing an incorrect
+	  calculation to do so. Fix that by simplifying the whole calculation by using
+	  corner coordinates. Also add a test for this bug which fell through the cracks,
+	  and just skip all the obscured tests if the pad's alpha is 0.0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754107
+
+2015-08-24 07:46:27 +0300  XuGuangxin <Guangxin.Xu@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.h:
+	  codecparsers: h265: Fix tile row and column parsing
+	  Section 6.5.1:  Coding tree block raster and tile scanning conversion process
+	  Follow the equations 6-3 and 6-4
+	  This will provide correct offset_max in slice_header for parsing
+	  num_entry_point_offsets.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754024
+	  Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+2015-08-07 12:53:23 +0300  Athanasios Oikonomou <athoik@gmail.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: select correct position for live streams that don't remove fragments
+	  Some live streams (eg youtube) don't remove fragments in order to allow
+	  seeking back in time (live + vod).
+	  When gst_m3u8_client_has_next_fragment is called, we are getting wrong fragment
+	  because current_file points in first file of the fragments list resulting in
+	  watching the stream from the beginning again.
+	  This patch sets current_file to nth fragment for live streams, then on
+	  gst_m3u8_client_has_next_fragment will keep up with the live stream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753344
+
+2015-08-24 19:47:01 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  glupload: Use base class metadata copy function
+	  This allow properly copying selected meta, like the composition
+	  overlay. Note that output buffer need to be readable, but GlUpload
+	  keeps a ref. For now, simply drop GlUpload ref after perform,
+	  leaving that ref has no purpose. The method shall be removed
+	  in the future.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754047
+
+2015-08-24 19:28:10 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvert: Use base transform metadata copy
+	  Use base class default method instead of only copying flags and
+	  timestamp. This way, selected meta's like compostion overlay will
+	  be passed downstream as expected.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754047
+
+2015-08-25 10:09:14 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	  gl/eagl: Unref context after setting a window handle
+	  gst_gl_window_get_context() returns a new reference.
+	  Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=753758
+
+2015-08-24 21:28:46 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  win32: Add new h265 parser symbols
+
+2015-08-24 08:06:15 +0300  lyb <andy_liu_china@163.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.h:
+	  codecparsers: h265: Add APIs for up-right-diagonal/raster scan conversion
+	  As per  7-42 and 7-43 the ScalingFactor's scanIdx is 0,
+	  which is "up-right-diagonal" scan. Add APIs for converting
+	  up-right-diagonal to raster and vise versa.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754024
+
+2015-08-24 04:18:52 +0300  XuGuangxin <Guangxin.Xu@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
+	  Being more strict on specification, According to 7.4.7.3,
+	  delta_chroma_log2_weight_denom should be in the range of
+	  [(0 - luma_log2_weight_denom), (7 - luma_log2_weight_denom)]
+	  https://bugzilla.gnome.org/show_bug.cgi?id=754024
+
+2015-08-23 23:38:21 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix latency handling again
+	  The tsdemux latency should always be added to the minimum
+	  latency (which is always a valid clock time value). The
+	  "cleanup" in commit a1f709c2 made it so that it would not
+	  be added if upstream reported 0 as minimum latency (as
+	  e.g. udpsrc would). This broke playback of live mpeg-ts
+	  streaming in some cases, leading to playback stutter due
+	  to a too-small configured latency for the pipeline.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751508
+
+2015-08-21 13:42:18 -0700  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: update display size before sending event
+	  This is minor issue, as the reconfigure event is asynchronous.
+	  Basically, update width/height before sending the event.
+
+2015-08-20 17:27:34 -0700  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstgluploadelement.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  gl: Let base transform relay the meta api for us
+	  During allocation query, when this element is not passthrough, it must
+	  relay the overlay compostion meta and it's parameters. Fortunatly, base
+	  transform can do this for us.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753850
+
+2015-08-21 20:29:24 +0200  Koop Mast <kwm@rainbow-runner.nl>
+
+	* configure.ac:
+	  curl: Give netinet/ip.h it own configure check
+	  On FreeBSD netinet/ip.h needs the sys/types.h and netinet/in.h header
+	  before it can be tested.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753944
+
+2015-08-19 17:42:49 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/dts/gstdtsdec.c:
+	  dtsdec: remove unused value
+	  length is set to a different value before being read. Remove initial value.
+	  Silences compiler warning.
+
+2015-08-21 05:26:25 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	* ext/opencv/gstfacedetect.h:
+	  facedetect: remove unnecessary variable.
+	  Memory is reserved for this variable and then released without making any
+	  use of it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748377
+
+2015-08-21 14:07:32 +0900  Justin Kim <justin.kim@collabora.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: add specific error message when missing GL_SHADING_LANGUAGE_VERSION
+	  GL_SHADING_LANGUAGE_VERSION was introduced since ES 2.0, but in some
+	  android emulator doesn't support this feature. To prevent confusion for
+	  developer, the error message need to be more clear.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753905
+
+2015-08-21 16:44:43 +0900  hoonhee.lee <hoonhee.lee@lge.com>
+
+	* tests/check/elements/audiomixer.c:
+	  tests: audiomixer: remove duplicated word in comment
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753915
+
+2015-08-21 16:31:41 +0900  hoonhee.lee <hoonhee.lee@lge.com>
+
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: Don't chain up to parent's query handling twice for DRAIN query
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753913
+
+2015-08-20 15:00:02 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  check: hlsdemux: make duration unit test robust to floating point rounding
+	  The test_playlist_with_doubles_duration() test fails on some platforms
+	  due to rounding errors that occur when m3u8.c converts from the floating
+	  point value in the HLS manifest to a GstClockTime.
+	  Using assert_equals_float() fixes this because this function handles
+	  the rounding error issues by accepting almost equal.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753881
+
+2015-08-17 18:35:58 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  glbasefilter: only call gl_{stop,start} if the context changed
+	  Removes the redundant GL object creation/deletion on every
+	  decide_allocation call which is being called for every caps change.
+	  Thus reduces the required GL state changes on reconfigure events
+	  which are being sent by glimagesink/xvimagesink
+
+2015-08-20 14:09:37 +0200  Carlos Rafael Giani <dv@pseudoterminal.org>
+
+	* configure.ac:
+	  opencv: Fix OpenCV data path check to work with cross compilation
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753651
+
+2015-08-20 14:11:56 +0300  Ben Browitt <ben.browitt@gmail.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Always set the pad's buffer_vinfo when storing a buffer
+	  Otherwise it might be unset, and then the buffer is used and
+	  gst_video_frame_map() will crash because of invalid video-info.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753805
+
+2015-08-19 21:33:09 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: Handle encoding specified in the <xml> element when dumping nodes
+	  Previous patch did not handle the case where an encoding (e.g. UTF-8) is
+	  specified in the <xml ?> element. Added an extra test for with and without
+	  encoding.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753813
+
+2013-01-31 14:03:40 +0100  Arnaud Vrac <avrac@freebox.fr>
+
+	* ext/assrender/gstassrender.c:
+	  assrender: check video frame mapping succeeded before blending
+	  If the mapping fails just skip overlay rendering and push the video
+	  frame downstream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753822
+
+2015-08-19 15:31:16 +0200  Arnaud Vrac <avrac@freebox.fr>
+
+	* configure.ac:
+	* gst-libs/gst/video/Makefile.am:
+	* sys/uvch264/Makefile.am:
+	* tests/examples/uvch264/Makefile.am:
+	  configure.ac: fix build when the uvch264 plugin is not selected
+	  Instead of checking for the gstreamer-video-1.0 package is installed,
+	  just assume it is since we already check for the -base dependency.
+	  With this replace the GST_VIDEO_* variables in makefiles and directly
+	  link with libgstvideo.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753820
+
+2015-08-19 11:29:43 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: replace xmlNodeDump with xmlNodeDumpOutput
+	  When running on an STB, the function
+	  gst_mpdparser_get_xml_node_as_string causes a segmentation fault. This
+	  code works correctly on a Linux desktop.
+	  Looking at the libxml documentation, the xmlNodeDump is deprecated.
+	  Replacing the use of xmlNodeDump with xmlNodeDumpOutput fixes the
+	  segfault on the STB and removes the use of the deprecated function.
+
+2015-08-19 12:37:40 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* configure.ac:
+	  configure: check for Qt version
+	  Usage of QSGSimpleTextureNode::setOwnsTexture() was added in commit
+	  6b8cf8419d8ea80081de8150a6b1c3cf763c4d69, this function was added in
+	  Qt 5.4.0. Check for this version or later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753812
+
+2015-07-16 22:57:36 +0200  Arnaud Vrac <avrac@freebox.fr>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: abort playlist update when cancelled
+	  Otherwise the download thread will get stuck, since the downloader is
+	  disabled.
+
+2015-08-19 13:52:21 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk/gl: Use our GL function table instead of directly calling GL functions
+	  Otherwise we would have to link the plugin to the GL libraries directly.
+
+=== release 1.5.90 ===
+
+2015-08-19 13:46:53 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* ChangeLog:
 	* NEWS:
 	* RELEASE:
 	* 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/inspect/plugin-accurip.xml:
 	* docs/plugins/inspect/plugin-adpcmdec.xml:
 	* docs/plugins/inspect/plugin-adpcmenc.xml:
+	* docs/plugins/inspect/plugin-aiff.xml:
 	* docs/plugins/inspect/plugin-asfmux.xml:
 	* docs/plugins/inspect/plugin-assrender.xml:
+	* docs/plugins/inspect/plugin-audiomixer.xml:
 	* docs/plugins/inspect/plugin-audiovisualizers.xml:
 	* docs/plugins/inspect/plugin-autoconvert.xml:
 	* docs/plugins/inspect/plugin-bayer.xml:
@@ -282,13 +1058,13 @@
 	* docs/plugins/inspect/plugin-modplug.xml:
 	* docs/plugins/inspect/plugin-mpeg2enc.xml:
 	* docs/plugins/inspect/plugin-mpegpsdemux.xml:
+	* docs/plugins/inspect/plugin-mpegpsmux.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-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:
@@ -314,9 +1090,9 @@
 	* docs/plugins/inspect/plugin-zbar.xml:
 	* gst-plugins-bad.doap:
 	* win32/common/config.h:
-	  Release 1.4.4
+	  Release 1.5.90
 
-2014-11-06 12:55:42 +0100  Sebastian Dröge <sebastian@centricular.com>
+2015-08-19 12:52:18 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* po/af.po:
 	* po/az.po:
@@ -360,6 +1136,15877 @@
 	* po/zh_CN.po:
 	  Update .po files
 
+2015-08-19 11:36:13 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* po/ky.po:
+	* po/nb.po:
+	* po/sv.po:
+	  po: Update translations
+
+2015-08-18 13:56:59 +0200  Guillaume Marquebielle <guillaume.marquebielle@parrot.com>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: fix assertion when copying buffer region
+	  In gst_live_adder_chain() function, calls to gst_buffer_copy_region() can lead
+	  to assertion as 'offset + size <= bufsize' is not respected.
+	  Indeed 'offset' and 'size' parameters are calculated through calling gst_live_adder_length_from_duration(),
+	  and thus gst_util_uint64_scale_int_round().
+	  Depending on the nearest integers, rounded values 'offset' and 'size' can then trigger the assertion.
+	  This case mainly occurs when 'skip' value is > 0 in chain function process.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753759
+
+2015-08-17 18:06:30 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gsthanddetect.c:
+	* ext/opencv/gsthanddetect.h:
+	  handdetect: remove unnecessary variable.
+	  Memory is reserved for this variable and then released without making any
+	  use of it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752528
+
+2015-08-17 18:02:28 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gsthanddetect.c:
+	  handdetect: check CvHaarClassifierCascade is release before being modified.
+	  Make sure a previous cascade, if it exists, is released before loading a
+	  new XML file onto it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752528
+
+2015-08-17 17:47:42 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gsthanddetect.c:
+	  handdetect: code refactoring of gst_handdetect_load_profile.
+	  Change gst_handdetect_load_profile() so it can be used generically.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752528
+
+2015-08-18 11:54:33 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/daala/gstdaalaenc.c:
+	  daalaenc: Fix build
+	  And also only generate the supported caps once, not on every CAPS/ACCEPT_CAPS
+	  query. It's not that cheap.
+
+2015-08-17 23:44:42 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* tests/examples/opencv/gstfacedetect_test.c:
+	  examples: facedetect: add silent option
+	  By default the example floods the screen with the detected face values.
+	  Add an option to avoid this for frail terminals.
+
+2015-08-17 14:38:52 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: add accept-caps handling
+	  Ovewrite default handling to avoid doing a caps query. Check
+	  the received caps against the possible formats supported by
+	  the x265 library.
+
+2015-08-17 14:32:56 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/daala/gstdaalaenc.c:
+	  daalaenc: add accept-caps handling
+	  Ovewrite default handling to avoid doing a caps query. Check
+	  the received caps against the possible formats supported by
+	  the daala library.
+
+2015-08-16 07:06:44 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/openjpeg/gstopenjpegenc.c:
+	* ext/schroedinger/gstschroenc.c:
+	* ext/webp/gstwebpenc.c:
+	* gst/pnm/gstpnmenc.c:
+	  videoencoders: use template subset check for accept-caps
+	  It is faster than doing a query that propagates downstream and
+	  should be enough
+	  Elements: openjpegenc, schroenc, webpenc, pnmenc
+
+2015-08-17 17:38:15 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* configure.ac:
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfacedetect.cpp:
+	  opencv: support alternative path convention
+	  Some distributions store OpenCV files in /usr/share/opencv and some others
+	  (and default when building from source) install them in
+	  /usr/share/OpenCV. Support both to find cascade files.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753651
+
+2015-08-16 21:18:50 +0200  Rico Tzschichholz <ricotz@ubuntu.com>
+
+	* ext/dash/Makefile.am:
+	  dashdemux: link against gio for g_resolver and g_inet_address_from_string
+	  Add missing gio-2.0 CFLAGS/LIBS to fix linker failure
+
+2015-08-16 07:18:34 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/faac/gstfaac.c:
+	* ext/gsm/gstgsmenc.c:
+	* ext/opus/gstopusenc.c:
+	* ext/sbc/gstsbcenc.c:
+	* ext/voaacenc/gstvoaacenc.c:
+	* ext/voamrwbenc/gstvoamrwbenc.c:
+	* gst/adpcmenc/adpcmenc.c:
+	* gst/siren/gstsirenenc.c:
+	  audioencoders: use template subset check for accept-caps
+	  It is faster than doing a query that propagates downstream and
+	  should be enough
+	  Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
+
+2015-08-17 07:55:03 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/voaacenc/gstvoaacenc.c:
+	  voaacenc: Remove custom getcaps and just use the template
+	  We know from the beginning the caps that are acceptable, no need
+	  for custom getcaps or manually generating caps.
+
+2015-08-17 07:54:36 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/voaacenc/gstvoaacenc.c:
+	  voaacenc: add version to gst-launch string on documentation
+	  gst-launch will call the 0.10 version, we want 1.0
+
+2015-08-17 07:15:00 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/faac/gstfaac.c:
+	  faac: make template pad caps more accurate and remove custom getcaps
+	  Allows reusing baseclass caps query handling and simplifying negotiation
+	  code.
+
+2015-08-17 11:50:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/mpg123/gstmpg123audiodec.c:
+	  mpg123: still reset pending audio info on hard flush
+	  Follow-up to previous commit.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752431
+
+2015-07-15 10:44:02 -0600  Jason Litzinger <jlitzinger@control4.com>
+
+	* ext/mpg123/gstmpg123audiodec.c:
+	  mpg123: fix handling of sample rate change during playback
+	  If the sample rate of the media changes, the resulting flush will
+	  clear the has_next_audioinfo flag, and the caps won't be sent
+	  downstream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752431
+
+2015-03-17 17:55:26 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/videoparsers/gstdiracparse.c:
+	* gst/videoparsers/gsth263parse.c:
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth265parse.c:
+	* gst/videoparsers/gstmpeg4videoparse.c:
+	* gst/videoparsers/gstmpegvideoparse.c:
+	* gst/videoparsers/gstpngparse.c:
+	* gst/videoparsers/gstvc1parse.c:
+	  videoparsers: Use gst_base_parse_merge_tags()
+	  Instead of squashing all upstream tags
+	  https://bugzilla.gnome.org/show_bug.cgi?id=679768
+
+2015-08-16 18:13:12 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Recalculate offset and size in raw upload
+	  As we only expose the mapped portion of the frame into the GL
+	  memory object (and not the original padding) we need to
+	  re-calculate the size and offset.
+
+2015-08-16 08:49:35 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix off by one seeking issue
+	  When seeking to the last second of a mpd it would reject the seek
+	  because the comparison was < instead of <=
+	  This fails the important use case of seeking to the end of a file
+	  to play it back in reverse from the end
+
+2015-08-16 12:55:57 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsdemux: Fix illogical comparision
+	  A variable can't be two values at once. We want to stop if it's not the
+	  actual ts *AND* not the other ts
+	  CID #1316475
+
+2015-08-16 12:52:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Free UTCTiming struct if there are no values associated with it
+	  CID 1316479
+
+2015-08-15 23:36:01 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/check/Makefile.am:
+	  check: Link against GModule for tests using g_module_*
+
+2015-08-15 19:04:27 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Demote debugging level
+
+2015-08-15 19:01:00 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Actually wait for playlist update when requested
+	  There are several cases where a HLS server could temporarily have wrong
+	  fragments, or reconfigure the playlist. In those cases, when we get
+	  fragment download failures, we *really* want to wait a bit (for the next
+	  playlist update) before retrying to get fragments.
+	  Previously this method was first checking to see if there was next fragments
+	  (according to the previous manifest update) before waiting for the next update.
+	  The problem was that if that if there is a temporary failure on the server,
+	  that's uncorrelated to whether the manifest contains next fragments or not.
+
+2015-08-14 12:25:19 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/check/elements/glimagesink.c:
+	* tests/check/generic/states.c:
+	  checks: Ensure thread-safe libX11/GL when running tests
+
+2015-08-15 12:58:40 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dts/gstdtsdec.c:
+	* ext/faad/gstfaad.c:
+	* ext/gsm/gstgsmdec.c:
+	* ext/mpg123/gstmpg123audiodec.c:
+	* ext/opus/gstopusdec.c:
+	* ext/sbc/gstsbcdec.c:
+	* gst/adpcmdec/adpcmdec.c:
+	* gst/siren/gstsirendec.c:
+	  audiodecoders: use default pad accept-caps handling
+	  Avoids useless check of downstream caps when handling an
+	  accept-caps query
+	  Elements: dtsdec, faad, gsmdec, mpg123audiodec, opusdec,
+	  sbcdec, adpcmdec, sirendec
+
+2015-08-15 12:55:49 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/daala/gstdaaladec.c:
+	* ext/libde265/libde265-dec.c:
+	* ext/openexr/gstopenexrdec.cpp:
+	* ext/openjpeg/gstopenjpegdec.c:
+	* ext/rsvg/gstrsvgdec.c:
+	* ext/schroedinger/gstschrodec.c:
+	* ext/webp/gstwebpdec.c:
+	* gst/pnm/gstpnmdec.c:
+	* gst/vmnc/vmncdec.c:
+	  videodecoders: use default pad accept-caps handling
+	  Avoids useless check of downstream caps when handling an
+	  accept-caps query
+	  Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec,
+	  webpdec, pnmdec, vmncdec, openexrdec
+
+2015-08-15 16:22:20 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: make sure we call handle_nal for each NAL
+	  Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure
+	  we correctly extract the SPS and PPS.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730999
+
+2015-08-15 15:02:33 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	  gloverlaycompositor: Also disable the blend when done
+
+2015-08-15 14:31:15 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gtk/gstgtkglsink.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	  glsink: Enable sync meta on pools we offer
+	  As the upload is asynchronous, we need to enable the sync meta to
+	  gain correct rendering. The buffer pool receiver don't know about
+	  that.
+
+2015-08-15 15:12:27 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglsink: Add overlay composition support
+	  Rendering composition overlay in GL with additional high resolution
+	  overlay being added.
+
+2015-08-15 15:08:11 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtkglsink: Fix unsafe handling of buffer life time
+	  We need to keep the active buffer (the one we have retreive a
+	  texture id from) otherwise it's racy and upstream may upload
+	  new content before we have rendered or during later redisplay.
+
+2015-08-14 18:07:15 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglsink: Remove reset path
+	  The reset path is bogus and there is no reason to get rid of these
+	  things during resize.
+
+2015-08-14 17:36:48 +0200  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Move overlay rendering after video rendering
+	  This is mostly cosmetic, but heoretically it reduces the amount of
+	  required object in the context at one point. It also avoids potential
+	  conflicts.
+
+2015-08-15 14:45:34 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtph265pay: Copy metadata in the payloader, but only the relevant ones
+	  The payloader didn't copy anything so far, the depayloader copied every
+	  possible meta. Let's make it consistent and just copy all metas without
+	  tags or with only the video tag.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751774
+
+2015-08-15 11:41:40 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753228
+
+2015-08-15 11:30:36 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtph265pay: fix potential crash when shutting down
+	  A race condition in the state change function may cause buffers to be
+	  unreffed while they are still used by the streaming thread in
+	  gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the
+	  parent class first in the state change function to make sure streaming
+	  has stopped and only then free those buffers.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741381
+
+2015-08-15 10:03:07 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/opengl.h:
+	  opengl: Change GLclampd to double
+	  GLclampd does not exist on GLES, only desktop GL.
+
+2015-08-14 10:32:14 -0700  Martin Kelly <martin@surround.io>
+
+	* gst-libs/gst/gl/glprototypes/opengl.h:
+	  opengl: add missing ClearDepth prototype
+	  The ClearDepth call is missing.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753639
+
+2015-08-06 14:33:54 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Clear SPS info after processing.
+	  The SPS struct might be filled out by a call to
+	  gst_h264_parser_parse_subset_sps, which fills out
+	  dynamically allocated data and requires a call
+	  to gst_h264_sps_clear() to free it. Also make sure
+	  to clear out any allocated SPS data when returning
+	  an error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753306
+
+2015-08-12 00:20:26 +0200  Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  facedetect: Refactor the code
+	  Some lines of code are repeated several times, therefore
+	  this lines are simplified with a inline function, that this is
+	  proper style of C++.
+
+2015-08-14 11:43:57 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	  pngparse: enable accept-intersect and accept-template flags on sinkpad
+	  Do a quick check with the pad template caps as it is enough. Users
+	  should have figured the appropriate full caps on a previous caps query
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753623
+
+2015-08-14 11:43:18 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/videoparsers/gstdiracparse.c:
+	* gst/videoparsers/gsth263parse.c:
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth265parse.c:
+	* gst/videoparsers/gstmpeg4videoparse.c:
+	* gst/videoparsers/gstmpegvideoparse.c:
+	* gst/videoparsers/gstvc1parse.c:
+	  videoparsers: enable accept-template flag
+	  Do a quick check with the pad template caps as it is enough. Users
+	  should have figured the appropriate full caps on a previous caps query
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753623
+
+2015-08-14 15:08:08 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtph265pay: fix buffer leak when using SPS/PPS
+	  Fixes a buffer leak that would occur if the pipeline was shutdown while a
+	  SPS/PPS header was being created.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741271
+
+2015-08-14 11:49:51 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	* gst/rtp/gstrtph265depay.h:
+	  rtph265depay: copy metadata in the depayloader, but only the relevant ones
+	  The payloader didn't copy anything so far, the depayloader copied every
+	  possible meta. Let's make it consistent and just copy all metas without
+	  tags or with only the video tag.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751774
+
+2015-08-14 09:44:24 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/gstdashdemux.c:
+	* gst-libs/gst/uridownloader/gstfragment.c:
+	* gst-libs/gst/uridownloader/gstfragment.h:
+	* gst-libs/gst/uridownloader/gsturidownloader.c:
+	  dashdemux: add support for HTTP HEAD method of time sync
+	  The urn:mpeg:dash:utc:http-head:2014 method of time synchronisation
+	  uses an HTTP HEAD request to a specified URL and then parses the
+	  Date: HTTP response header.
+	  This commit adds support to dashdemux for this method of time
+	  synchronisation by making a HEAD request and then parsing the Date:
+	  response.
+	  This commit adds support to gstfragment to return the HTTP headers
+	  and to uridownloader to support HEAD requests. To avoid creating a
+	  new API, the RANGE get function is re-used (abused?) with start=-1
+	  and end=-1 to indicate a HEAD request.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752413
+
+2015-08-13 18:21:29 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: post-review fixup of UTCTiming element
+	  This commit addresses the following items from the code review:
+	  use a portable way to define NTP_TO_UNIX_EPOCH,
+	  fix memory leak on error, and
+	  add documentation to UTCTiming parse functions
+	  Using LL is not portable, so the G_GUINT64_CONSTANT needs to be instead.
+	  If an error occurs during DNS resolution, the GError was not being
+	  released, causing a memory leak.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752413
+
+2015-07-15 11:56:13 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/Makefile.am:
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: add support for UTCTiming elements for clock drift compensation
+	  Unless the DASH client can compensate for the difference between its
+	  clock and the clock used by the server, the client might request
+	  fragments that either not yet on the server or fragments that have
+	  already been expired from the server. This is an issue because these
+	  requests can propagate all the way back to the origin
+	  ISO/IEC 23009-1:2014/Amd 1 [PDAM1] defines a new UTCTiming element to allow
+	  a DASH client to track the clock used by the server generating the
+	  DASH stream. Multiple UTCTiming elements might be present, to indicate
+	  support for multiple methods of UTC time gathering. Each element can
+	  contain a white space separated list of URLs that can be contacted
+	  to discover the UTC time from the server's perspective.
+	  This commit provides parsing of UTCTiming elements, unit tests of this
+	  parsing and a function to poll a time server. This function
+	  supports the following methods:
+	  urn:mpeg:dash:utc:ntp:2014
+	  urn:mpeg:dash:utc:http-xsdate:2014
+	  urn:mpeg:dash:utc:http-iso:2014
+	  urn:mpeg:dash:utc:http-ntp:2014
+	  The manifest update task is used to poll the clock time server,
+	  to save having to create a new thread.
+	  When choosing the starting fragment number and when waiting for a
+	  fragment to become available, the difference between the server's idea
+	  of UTC and the client's idea of UTC is taken into account. For example,
+	  if the server's time is behind the client's idea of UTC, we wait for
+	  longer before requesting a fragment
+	  [PDAM1]: http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=66068
+	  dashdemux: support NTP time servers in UTCTiming elements
+	  Use the gst_ntp_clock to support the use of an NTP server.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752413
+
+2015-08-14 11:13:51 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/check/generic/states.c:
+	  check: Rename states unit test
+	  Makes it easier to differentiate from other modules states unit test
+
+2015-08-13 10:31:20 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/dvdspu/gstspu-pgs.c:
+	  spu-pgs: fix buffer and event leak
+	  When playing mts files with embedded subtitles, the buffer is mapped,
+	  but not unmapped at the end resulting in a memory leak.
+	  Also unref event in handle_dvd_event as it takes ownership of the event.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753539
+
+2015-08-13 10:25:52 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/dvdspu/gstdvdspu.c:
+	  dvdspu: Fix event leaks
+	  When playing mts files with embedded subtitles, there are few event leaks.
+	  Events are supposed to be transfer full. So if not forwarding the event,
+	  they need to be freed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753539
+
+2015-08-13 12:38:41 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  Revert "srtpdec: Add support for buffer list"
+	  This reverts commit ff11a1a8a0c685d2edd0e06c0071cbb94f2cb663.
+	  It can't be assumed that all buffers in a buffer list have the same SSRC or
+	  are RTP or RTCP only. It has to be checked for every single buffer, and one
+	  basically has to do the processing that is done by the default chain_list
+	  implementation.
+
+2015-08-12 17:54:52 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: checking if depay has sps/pps nals before insertion
+	  Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753228
+
+2015-08-12 17:22:42 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: only update the srcpad caps if something else than the codec_data changed
+	  h264parse and gstrtph264depay do the same, let's keep the behaviour
+	  consistent. As we now include the codec_data inside the stream, this causes
+	  less caps renegotiation.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753228
+
+2015-08-12 16:43:48 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: PPS replaces old PPS if it has the same id
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753228
+
+2015-08-12 16:11:00 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: Insert SPS/PPS NALs into the stream
+	  rtph264depay does the same and this fixes decoding of some streams with 32
+	  SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255),
+	  but the field in the codec_data for the number of SPS or PPS is only 5
+	  (or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.
+	  This looks like a mistake in the part of the spect about the codec_data.
+
+2015-08-12 15:49:50 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: implement process_rtp_packet() vfunc
+	  For more optimised RTP packet handling: means we don't need to map the
+	  input buffer again but can just re-use the mapping the base class has
+	  already done.
+	  Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753228
+
+2015-08-12 15:14:50 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
+	  Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.
+
+2015-08-12 14:59:53 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtph265depay: prevent trying to get 0 bytes from adapter
+	  This causes an assertion and would lead to getting a NULL instead
+	  of a buffer. Without proper checking this would easily lead to a
+	  segfault.
+	  Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
+
+2015-08-12 07:58:09 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
+	  ChromaLog2WeightDenom = luma_log2_weight_denom + delta_chroma_log2_weight_denom
+	  The value of ChromaLog2WeightDenom should be in the range of 0 to 7 and
+	  the value luma_log2_weight_denom  should be also in the range of 0 to 7.
+	  Which means , delta_chroma_log2_weight_denom can have values in the range
+	  between -7 and 7.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753552
+
+2015-08-12 05:11:27 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparsers: h265: Fix the parsing of ref_pic_lists_modification
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753552
+
+2015-08-12 00:20:10 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: take into account non 1/1 par for navigation
+	  The current code was ignoring the par/dar aspect when transforming
+	  from window coordinates to stream coordinates resulting in incorrect
+	  coordinates being sent upstream in the navigation events.
+
+2015-08-12 00:18:20 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	  gtk: fix motion event name
+	  s/motion/mouse/
+	  Fixes hover interaction with DVD menus
+
+2015-08-12 00:14:14 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	  gtk: correct navigation events for window scaling
+	  i.e. take into account the possiblity of scaling in the sink
+	  or through GDK_SCALE.
+	  Fixes DVD Menus with a scaled gtkwidget
+
+2015-08-11 15:02:25 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/frei0r/gstfrei0r.c:
+	  frei0r: Fix setting string parameters
+	  String parameters are expected to be passed as (f0r_param_string *),
+	  which actually map to char**. In the filters this is evaluated as
+	  (*(char**)param) which currently lead to crash when passing char*.
+	  Remove the special case for string, all types, including char* as
+	  passed as a reference.
+	  https://phabricator.freedesktop.org/T83
+
+2015-08-11 13:34:59 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gstgtkbasesink.c:
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	  gtk: implement GstNavigation interface
+	  Now we can push key/mouse input into the pipeline for DVD use cases.
+
+2015-06-30 13:51:33 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstrtpopusdepay.c:
+	* ext/opus/gstrtpopuspay.c:
+	  opus: Copy metadata in the (de)payloader, but only the relevant ones
+	  The payloader didn't copy anything so far, the depayloader copied every
+	  possible meta. Let's make it consistent and just copy all metas without tags or
+	  with only the audio tag.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751774
+
+2015-08-11 04:14:19 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  videoparsers: h265: Fix the frame start detection code
+	  Check slice headers in between GST_H265_NAL_SLICE_TRAIL_N
+	  and GST_H265_NAL_SLICE_RASL_R for frame start detection.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753497
+
+2015-08-11 03:47:42 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  videoparsers: h265: Avoid skipping of EOS and EOB nals
+	  EndOfSequence and EndOfBitstream nal units have size of 2 bytes.
+	  Don't consider them as broken nals.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753497
+
+2015-08-10 23:02:12 +0200  Vanessa Chipi <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  facedetect: wrong form to write the delete operator
+	  The delete operator is written this way: delete (cascade). This way is
+	  misspelled, it is an operator, not a function. Delete the parentheses.
+
+2015-08-10 19:13:11 +0200  vanechipi <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  facedetect: simplify repeated code.
+	  Store the value of r.height / 2 instead of repeating the operation line
+	  three times.
+
+2015-08-10 19:02:10 +0200  vanechipi <vchipirras6@gmail.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  facedetect: Redundancy exists in code.
+	  Checking the vector is not empty and checking the vector size is greater
+	  than zero are the same thing, this is a redundancy in the code. Only
+	  checking the vector is not empty is sufficient, therefore removing the
+	  other check.
+
+2015-08-10 14:48:58 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	  gl: Add opengl_version.h to the list of sources
+	  Adding this private header to the list of sources. We don't want to make
+	  this header public, but we need it in the list of sources otherwise it
+	  won't be included in the tarball. This fixes make distcheck.
+	  This regression was introduced by commit 1a6fe3db
+
+2015-08-10 19:06:16 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* tests/examples/opencv/gstfacedetect_test.c:
+	  examples: facedetect: only create variables when needed
+	  The variables to store face values are only needed if they will be used to
+	  control the volume. Which isn't the default to avoid potentially being very
+	  loud accidentally. Only create variables when needed.
+
+2015-08-10 16:51:17 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* tests/examples/opencv/gstfacedetect_test.c:
+	  examples: facedetect: make volume control optional
+
+2015-08-10 16:38:32 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectblur.c:
+	* ext/gl/effects/gstgleffectbulge.c:
+	* ext/gl/effects/gstgleffectfisheye.c:
+	* ext/gl/effects/gstgleffectglow.c:
+	* ext/gl/effects/gstgleffectidentity.c:
+	* ext/gl/effects/gstgleffectlaplacian.c:
+	* ext/gl/effects/gstgleffectlumatocurve.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectrgbtocurve.c:
+	* ext/gl/effects/gstgleffectsin.c:
+	* ext/gl/effects/gstgleffectsobel.c:
+	* ext/gl/effects/gstgleffectsquare.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/effects/gstgleffectssources.c:
+	* ext/gl/effects/gstgleffectssources.h:
+	* ext/gl/effects/gstgleffectstretch.c:
+	* ext/gl/effects/gstgleffecttunnel.c:
+	* ext/gl/effects/gstgleffecttwirl.c:
+	* ext/gl/effects/gstgleffectxray.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: use gles2 shaders everywhere
+	  This effectively limits a glfilter subclass to be > GL(ES) 2.0.
+	  rather than a possible GL 1.4.
+
+2015-08-10 15:44:54 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/utils/opengl_versions.h:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.h:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  glcontext/wgl: implement gl3 core profile context selection
+
+2015-02-28 01:07:44 +0100  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	  gltransformation: implement pivot point for rotation and scale
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744763
+	  Add a pivot vector for setting the origin of rotations and scales.
+	  With the pivot point the rotation and scale operations can have
+	  different origins. This adds the ability to rotate around different points.
+	  Currently the default (0, 0) pivot point is possible,
+	  a rotation around the center, and zooming into and out of the center.
+	  With an pivot point this is optional.
+	  I defined the following image coordinates for the pivot point:
+	  (-1,1) ------------------------- (1,1)
+	  |			|
+	  |			|
+	  |			|
+	  |	  (0,0)		|
+	  |			|
+	  |			|
+	  |			|
+	  (-1,-1) ------------------------- (1,-1)
+	  Example:
+	  Rotate the video at the bottom left corner
+	  gst-launch-1.0 videotestsrc \
+	  ! gltransformation \
+	  scale-x=0.5 \
+	  scale-y=0.5 \
+	  rotation-z=25.0 \
+	  pivot-x=-1.0 \
+	  pivot-y=-1.0 \
+	  ! glimagesink
+	  The pivot-z option defines the pivot point in 3D space.
+	  This only affects rotation, since we have no Z data to scale.
+	  With this option a video can be rotated around a point in 3D space.
+	  Example:
+	  Rotate around point behind the video:
+	  gst-launch-1.0 videotestsrc \
+	  ! gltransformation \
+	  rotation-x=10.0 \
+	  pivot-z=-4.0 \
+	  ! glimagesink
+
+2015-08-08 14:45:42 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	  gloverlaycompositor: Add shader to convert BGRA/ARGB -> RGBA
+	  Depending on the bytes order we will get BGRA (little) and ARGB (big)
+	  from the composition overlay buffer while our GL code expects RGBA. Add
+	  a fragment shader that do this conversion.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752842
+
+2015-08-08 17:28:03 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/qt/gstqsgtexture.cc:
+	* ext/qt/gstqsgtexture.h:
+	* ext/qt/qtitem.cc:
+	  qml: implement the required multiple GL context synchonisation
+	  From GStreamer's GL context into the QML context
+
+2015-08-08 17:22:05 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  gl/syncmeta: implement synchronisation without glFenceSync
+	  Uses glFinish as that's the best we have for lesser OpenGL versions.
+
+2015-08-08 15:45:59 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/asfmux/gstasfmux.c:
+	  asfmux: output TIME segment if we output a stream and won't seek back later
+	  Check if downstream is seekable via a SEEKING query and output a
+	  BYTE segment if we want to seek back to fix up the headers later,
+	  but if we're streaming send a TIME segment instead (which goes
+	  down better with e.g. asfmux ! rtpasfpay).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=719553
+
+2015-08-08 15:30:43 +0200  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglcontext.c:
+	  tests/glcontext: fix INVALID_ENUM GL error in test
+
+2015-08-08 15:21:03 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  context/glx: only use glXCreateContextAttribs for OpenGL 3 contexts
+	  mesa for example when creating a GL 3.1 compatibility context
+	  overrides our context profile selection to create a core context.
+
+2015-08-08 13:19:41 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* tests/examples/opencv/gstfacedetect_test.c:
+	  examples: facedetect: only set to playing when it's not already
+
+2015-08-08 12:52:36 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* tests/examples/opencv/gstfacedetect_test.c:
+	* tests/examples/opencv/gsthanddetect_test.c:
+	  examples: opencv: remove unnecessary setting of a property
+	  "/dev/video0" is the default device of v4l2src, setting it to this is
+	  redundant.
+
+2015-08-07 15:43:53 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  facedetect: fix profile loading check
+	  Since the profile gchar depends on DEFAULT_FACE_PROFILE, it should never be
+	  NULL. Furthermore CascadeClassifier accepts any input, even
+	  an empty one, but if the profile fails to load it returns an empty cascade.
+	  Check for this instead, and inform the user if there was an Error.
+
+2015-08-06 11:30:04 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: don't warn about duration if it is not known
+	  And also print the values in case of warning
+
+2015-08-07 13:16:56 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* .gitignore:
+	  gitignore: add new example file
+	  Commit 02b9daafdf64ab205ed725f5496dfa5ce860eacc added a new example file
+	  tests/examples/opencv/gstfacedetect_test, adding it to .gitignore
+
+2015-08-07 13:08:17 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* configure.ac:
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfaceblur.h:
+	* ext/opencv/gstfacedetect.cpp:
+	* ext/opencv/gstfacedetect.h:
+	* ext/opencv/gsthanddetect.c:
+	* ext/opencv/gsthanddetect.h:
+	  configure: update OpenCV requirements to 2.3.0
+	  With facedetect ported to C++ the minimum version of OpenCV
+	  supported is 2.3.0
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748377
+
+2015-08-07 05:58:22 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: expose compatible profiles to downstream
+	  Some video bitstreams report a too restrictive set of profiles. If a video
+	  decoder was to strictly follow the indicated profile, it wouldn't support that
+	  stream, whereas it could in theory and in practice. So we should relax the
+	  profile restriction for allowing the decoder to get connected with parser.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-08-06 18:12:07 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/bayer/gstrgb2bayer.c:
+	  rgb2bayer: Use mapped frame stride
+
+2015-08-06 18:11:53 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/bayer/gstrgb2bayer.c:
+	  rgb2bayer: Protect against failing map
+
+2015-08-06 18:04:58 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/bayer/gstbayer2rgb.c:
+	  bayer2rgb: Read stride from the video info
+
+2015-08-06 18:04:41 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/bayer/gstbayer2rgb.c:
+	  bayer2rgb: Protect against failing map
+
+2015-08-06 19:23:49 +0300  Ilya Averyanov <i.averyanov@geoscan.aero>
+
+	* tools/element-templates/videoencoder:
+	  element-template: Fix wrong pad in videoencoder
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753326
+
+2015-08-03 16:57:31 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Fix leak in gst_dash_demux_stream_update_fragment_info()
+	  The gst_dash_demux_stream_update_fragment_info function could call
+	  gst_dash_demux_stream_update_headers_info function twice. The
+	  gst_dash_demux_stream_update_headers_info function will set header_uri and
+	  index_uri to some newly allocated strings. The values set by the first call of
+	  gst_dash_demux_stream_update_headers_info will leak when the function is
+	  called for a second time.
+	  The solution is to call gst_adaptive_demux_stream_fragment_clear before the
+	  second call of gst_dash_demux_stream_update_headers_info
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753188
+
+2015-08-05 14:52:12 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: Segment should start at base ts
+	  Instead we would use cur_ts which matches the last TS store
+	  in the buffer list.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753037
+
+2015-08-05 12:56:57 +0200  Anders Jonsson <anders.jonsson@norsjovallen.se>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  camerabin2: Fix string typo
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753241
+
+2015-08-05 11:56:32 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  opencv: facedetect: free IplImage with cvReleaseImage
+	  Using delete() with IplImage will fail to free some of the structure's
+	  contents. cvReleaseImage() is the proper way of freeing the memory.
+
+2015-08-05 11:39:01 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  opencv: facedetect: check pointer before using it
+	  Check if profile is NULL before dereferencing it with new. Also, new will
+	  never return NULL; if allocation fails, a std::bad_alloc exception will be
+	  thrown instead. Remove check for a NULL return.
+	  CID #1315258
+
+2015-08-05 11:14:49 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: remove dead code
+	  level_ok is only used in a check that will never be true, removing it.
+	  CID #1315255
+
+2015-08-05 11:11:11 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: fix memory leak
+	  Free vps_nal before returning.
+	  CID #1315257
+
+2015-08-04 23:15:36 +0200  Carlos Garnacho <carlosg@gnome.org>
+
+	* ext/rsvg/gstrsvgdec.c:
+	  rsvg: Don't leak a GstVideoCodecState
+	  There's already the output_state variable with it, no need to
+	  call gst_video_decoder_get_output_state() and get a new ref.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753262
+
+2015-08-04 21:32:53 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* gst/rawparse/gstrawparse.c:
+	  rawparse: fix duplicated format in handle_seek_pull
+	  GstFormat variable are duplicated in handle_seek_pull function.
+	  So we need to move this variable in condition statement.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753243
+
+2015-08-04 14:30:17 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  opencv: facedetect: fix crashes in finalize
+	  Fixes gst-inspect-1.0 -a crashing.
+
+2015-08-03 19:42:56 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/winscreencap/gstdx9screencapsrc.c:
+	* sys/winscreencap/gstdx9screencapsrc.h:
+	* sys/winscreencap/gstgdiscreencapsrc.c:
+	* sys/winscreencap/gstgdiscreencapsrc.h:
+	  winscreencap: Properly timestamp buffers with the current clock running time instead of doing magic
+	  Also implement framerate handling correctly by borrowing the code from
+	  ximagesrc. GstBaseSrc::get_times() can't be used for that, we have to
+	  implement proper waiting ourselves.
+
+2015-08-04 00:20:27 +1000  Jan Schmidt <thaytan@noraisin.net>
+
+	* ext/opencv/gstfacedetect.cpp:
+	  opencv: Fix 32-bit build / format strings.
+	  Use G_GSIZE_FORMAT for format strings where relevant
+
+2015-08-03 19:48:16 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: swap control binding proxy
+	  The ref_object and object parameters were the wrong way around.
+	  For the typical use case where an application is setting a
+	  GstControlBinding on the returned ghost pad:
+	  1. our control binding would be removed when the new one was set
+	  2. sync_values calls were not being forwarded from the internal
+	  pad to the ghost pad.
+	  If an application attempts to perform other control binding
+	  operations (get_* family of functions) on the internal pad, they
+	  will also be forwarded to the ghost pad where a possible
+	  GstControlBinding will provide the necessary values.
+
+2015-08-01 15:52:28 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dash: mpdparser: plug leak in segmenttemplate parsing
+	  Only copy the values from the parent if the current node doesn't
+	  have that value, they were being copied from the parent and
+	  then overwriten by the child node, leaking the parent's copy
+
+2015-08-01 15:51:50 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dash_mpd: add check for segmenttemplate inheritance
+	  Checks if the values are properly inherited and overwriten
+
+2015-08-01 15:09:19 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dash_mpd: add one more baseURL test
+	  This other type of baseURL test was replaced by a more complex one,
+	  better have both to keep both options working
+	  Also adds another 2 variations of how baseURL can be generated
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752776
+
+2015-07-23 10:54:36 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: tests: added duration format test
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752776
+
+2015-07-22 11:42:23 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: tests: update unit test for baseURL
+	  Update the unit test for baseURL to test that it is properly
+	  resolved taking into account parent baseURL elements.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752776
+
+2015-08-01 11:51:22 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  templatematch: revert rename of property
+	  The property doesn't need to have its name changed because of C++,
+	  just the instance variables.
+
+2015-07-31 17:31:15 +0100  Vanessa Chipirrás <vchipirras6@gmail.com>
+
+	* tests/examples/opencv/Makefile.am:
+	* tests/examples/opencv/gstfacedetect_test.c:
+	  facedetect: Add unit test
+	  I created four utilities of the detected features:
+	  1- If you hide your mouth, the volume of video is low.
+	  2- If you hide the nose, the volume of the video is up.
+	  3- If you hide the full face, the video stops.
+	  You can see proof of this here:
+	  https://www.youtube.com/watch?v=pxzejNKV_WQ
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748377
+
+2015-07-31 16:40:07 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	* ext/opencv/gsttemplatematch.h:
+	  templatematch: rename conflicting variable
+	  With the switch of gstopencv.c to C++, all OpenCV elements are built with
+	  g++. The template variable clashes with C++'s feature of the same name.
+	  Rename template to templ to avoid any clash.
+
+2015-07-31 13:45:43 +0100  Vanessa Chipirrás <vchipirras6@gmail.com>
+
+	* ext/opencv/Makefile.am:
+	* ext/opencv/gstfacedetect.c:
+	* ext/opencv/gstfacedetect.cpp:
+	* ext/opencv/gstfacedetect.h:
+	* ext/opencv/gstopencv.c:
+	* ext/opencv/gstopencv.cpp:
+	  facedetect: need to migrate to C++
+	  The cascade classifier changes its structure on new version of OpenCV.
+	  The need to migrate to C++ to utilize the new load method of OpenCV which
+	  allows to load the new classifiers.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748377
+
+2015-07-31 10:47:27 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* ext/dts/gstdtsdec.c:
+	  dtsdec: fix taglist leak
+	  taglist merge doesnt take ownership. So should free the tags after use
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753086
+
+2015-07-30 23:31:21 +0200  Heinrich Fink <hfink@toolsonair.com>
+
+	* sys/applemedia/avsamplevideosink.m:
+	  applemedia/avsample: Fix racy cleanup of CA layer
+	  The block that is dispatched async to the main thread assumed the
+	  wrapping GstAvSampleVideoSink to be alive. However, at the time of
+	  the block execution the GstObject instance that is deferenced to access
+	  the CA layer might already be freed, which caused occasional crashes.
+	  Instead, we now only pass the CoreAnimation layer that needs to be
+	  released to the block. We use __block to make sure the block is not
+	  increasing the refcount of the CA layer again on its own.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753081
+
+2015-07-02 19:34:43 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/libs/aggregator.c:
+	  tests: Add test for seeking live pipelines
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-07-02 19:19:33 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/libs/aggregator.c:
+	  tests: Make source live to re-enable aggregator timeout tests
+	  The live mode is only enabled if one of the sources if live.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-07-02 18:37:28 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiointerleave.c:
+	  tests: Add audiointerleave test to show that queuing works
+	  This tests fails without the queuing patch because incoming buffers are
+	  not delivered before they are needed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-07-02 18:33:43 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiointerleave.c:
+	  audiointerleave: Avoid caps processing if not yet negotiated
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-16 17:06:46 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: On timeout, resync pads with not enough data
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-06 19:50:08 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst/audiomixer/gstaudioaggregator.c:
+	  aggregator: Queue "latency" buffers at each sink pad.
+	  In the case where you have a source giving the GstAggregator smaller
+	  buffers than it uses, when it reaches a timeout, it will consume the
+	  first buffer, then try to read another buffer for the pad. If the
+	  previous element is not fast enough, it may get the next buffer even
+	  though it may be queued just before. To prevent that race, the easiest
+	  solution is to move the queue inside the GstAggregatorPad itself. It
+	  also means that there is no need for strange code cause by increasing
+	  the min latency without increasing the max latency proportionally.
+	  This also means queuing the synchronized events and possibly acting
+	  on them on the src task.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-06 21:32:04 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Remove broken _clip vfunc
+	  It never does anything.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-07-30 08:58:48 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: Avoid checking for Non Mandatory VPS NAL
+	  VPS is not mandatory, and need not check for its presence before setting
+	  the caps. Because of the check, in streams which don't have VPS,
+	  sticky event mishandling happens.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752807
+
+2015-07-30 15:33:46 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/sdp/gstsdpdemux.c:
+	  sdpdemux: assertion error due to wrong condition check
+	  In media to caps function, reserved_keys array is being used for variable i,
+	  leading to GLib-CRITICAL **: g_ascii_strcasecmp: assertion 's1 != NULL' failed
+	  changed it to variable j
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753009
+
+2015-07-30 11:12:21 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/gl/gstglfilterbin.c:
+	  gstglfilterbin: remove unused variable
+	  res is set multiple times but never used or returned. Removing it.
+
+2015-07-29 20:07:09 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Default to "zero" start time selection mode as documented
+
+2015-07-29 20:06:11 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Ignore the "first" mode if the segment not a time segment
+
+2015-07-29 19:10:57 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Remove debug output from gst_gl_upload_transform_caps()
+	  We can't know if the GstGLUpload type is initialized at this point already,
+	  and thus our debug category might not be initialized yet... and cause an
+	  assertion here.
+	  As we don't print debug output for any of the other transform functions, let's
+	  defer this problem for now.
+
+2015-07-29 17:48:58 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/gl/gstglstereomix.c:
+	  glstereomix: remove redundant initialization
+	  v is initialized in the for loop init, no need to do it twice. Removing
+	  first initialization.
+
+2015-07-29 17:29:28 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtp: remove dead assignment
+	  Value set to ret will be overwritten at least once at the end of the while
+	  loop, removing assignment.
+
+2015-07-29 17:29:29 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	  mpegtsmux: use GQueue instead of GList prepend/reverse
+
+2015-07-29 17:17:16 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/sdp/gstsdpdemux.c:
+	  sdpdemux: remove redundant assignment
+	  Value of p is already set below just before being used. Removing this
+	  first assignment that will be ignored.
+
+2015-07-29 16:51:48 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: remove redundant check
+	  No need to check if done is True since break will already terminate the for
+	  loop.
+
+2015-07-29 13:09:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/sdp/gstsdpdemux.c:
+	  sdpdemux: Don't assert in GstAdapter if no data was received before EOS
+
+2015-07-28 22:30:09 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/compositor.c:
+	  compositor: Add unit tests for the new aggregator start-time-selection property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749966
+
+2015-06-15 18:30:20 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  aggregator: Add property to select how to decide on a start time
+	  Before aggregator based elements always started at running time 0,
+	  now it's possible to select the first input buffer running time or
+	  explicitly set a start-time value.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749966
+
+2015-07-29 11:25:24 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/sdp/gstsdpdemux.c:
+	  sdpdemux: Strip keys from the fmtp that we use internally in our caps
+	  Skip keys from the fmtp, which we already use ourselves for the
+	  caps. Some software is adding random things like clock-rate into
+	  the fmtp, and we would otherwise here set a string-typed clock-rate
+	  in the caps... and thus fail to create valid RTP caps
+	  https://bugzilla.gnome.org/show_bug.cgi?id=753009
+
+2015-07-29 22:59:56 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Add more NAL types for debugging output.
+	  Register more NAL unit types so that they are dumped
+	  by name in the debug output instead of being labelled
+	  'Invalid'
+
+2015-07-29 22:57:44 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: Don't clear the PID on reset.
+	  The PID on a pad shouldn't change on a state change, only
+	  if the pad is freed and a new one created. Clearing the PID
+	  prevented mpegtsmux from being reused, because all packets
+	  would end up muxed in PID 0
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752999
+
+2015-07-29 22:56:28 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: Accumulate streamheaders in reverse
+	  Accumulate streamheader packets in reverse into the
+	  GList for efficiency, and reverse the list once when
+	  processing.
+	  Improves muxing speed when there are a lot of
+	  streamheaders.
+
+2015-07-29 10:12:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcvideoenc.c:
+	  amcvideoenc: Always set i-frame-interval setting
+	  Most encoders fail to initialize if we don't set it at all.
+
+2015-07-29 12:56:54 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/videoparsers/gsth263parse.c:
+	  h263parse: fix caps memory leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752991
+
+2015-07-28 21:15:43 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Query the peer latency again on the next opportunity after a pad was added or removed
+	  Adding a pad will add a new upstream that might have a bigger minimum latency,
+	  so we might have to wait longer. Or it might be the first live upstream, in
+	  which case we will have to start deadline based aggregation.
+	  Removing a pad will remove a new upstream that might have had the biggest
+	  latency, so we can now stop waiting a bit earlier. Or it might be the last
+	  live upstream, in which case we can stop deadline based aggregation.
+
+2015-07-28 11:20:40 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* tests/check/libs/gstglcolorconvert.c:
+	  glcolorconvert-test: Test notify function for setup_wrapped
+	  gst_gl_memory_setup_wrapped() now takes a destroy notify function. This
+	  destroy notify is called to track the memory life time, hence will
+	  notify each time a memory get destroyed. This test check that the
+	  callback count is correct.
+
+2015-07-28 11:06:43 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* tests/check/libs/gstglcolorconvert.c:
+	  glcolorconvert-test: Fix build
+
+2015-07-28 08:59:24 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Add fixme about using bufferpool for raw
+	  http://bugzilla.gnome.org/show_bug.cgi?id=752937
+
+2015-07-27 16:58:22 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Keep input frame mapped as long as needed
+	  When performing a raw upload, we need to keep the raw data mapped as
+	  long as needed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752937
+
+2015-07-27 15:58:10 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  Revert "glupload: memcpy on raw data upload"
+	  This reverts commit 82c0189b2842e8729e82a4e73491dffc977bc7c2.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752937
+
+2015-07-15 16:21:00 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: gst_mpdparser_get_xml_prop_duration sets default value in case of parsing errors
+	  The gst_mpdparser_get_xml_prop_duration function will set the
+	  property_value to the default_value in case the parsing fails.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752426
+
+2015-07-27 18:39:13 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* ext/opus/gstopuscommon.c:
+	  opuscommon: Use GString instead of snprintf for concating
+	  Safer, easier to understand, and more portable. Also, skip
+	  all this if the log level is too low.
+
+2015-07-27 21:54:27 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.h:
+	  glcontext/wgl: fix defenition of gst_gl_context_wgl_new
+	  gstglcontext_wgl.c: In function 'gst_gl_context_wgl_new':
+	  gstglcontext_wgl.c:83:40: error: 'display' undeclared (first use in this function)
+
+2015-07-27 20:03:05 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h:
+	  gl/cocoa: fix definition of gst_gl_context_new
+	  gstglcontext_cocoa.m:75:1: error: conflicting types for 'gst_gl_context_cocoa_new'
+
+2015-07-27 20:00:47 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl/win32: fix definition of gst_gl_window_win32_new
+
+2015-07-27 18:21:19 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	  wayland: fail window open if the display is the correct type
+	  Errors out cleanly if a wayland compositor is not running
+
+2015-07-24 17:00:27 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.h:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.h:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.h:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glwindow: pass display to implementation's _new()
+	  So they have to opportunity to fail if they cannot handle the
+	  display connection.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752743
+
+2015-07-24 16:11:38 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.h:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.h:
+	  glcontext: pass display to implentation's _new()
+	  This allows the context to fail creation based on incompatible
+	  display type's. e.g. glx context with an wayland display handle.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752743
+
+2015-07-06 00:52:06 +0100  Julien Isorce <julien.isorce@gmail.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl: support cgl, egl and glx within a same build
+	  On osx, with the same build,
+	  gst-launch-1.0 videotestsrc ! glimagesink works with:
+	  GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=gles2
+	  GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=opengl
+	  GST_GL_PLATFORM=glx GST_GL_WINDOW=x11 GST_GL_API=opengl
+	  GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl
+	  GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl3
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752743
+
+2015-07-27 16:36:40 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Check that caps contain desired caps features
+	  Use 'contains' checks instead of equality checks on caps features
+	  to allow for uploading when caps also contain GstVideoOverlayComposition
+	  meta.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752912
+
+2015-07-25 09:03:27 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* sys/bluez/Makefile.am:
+	  bluez: Add built sources to CLEANFILES
+
+2015-07-20 10:50:44 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dahdemux: avoid overflows in computation of segment start time and duration
+	  Used gst_util_uint64_scale to avoid overflows when segment start time
+	  or duration is computed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752620
+
+2015-07-13 15:37:26 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: demote error to warning
+	  It is not fatal and can be quite normal when the network is
+	  too slow
+
+2015-07-24 09:42:53 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: do not check input buffers
+	  With this we avoid an unnecessary and considerable overhead.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752774
+
+2015-07-06 00:45:45 +0100  Julien Isorce <julien.isorce@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl: move GL_NUM_EXTENSIONS definition after gl.h
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752743
+
+2015-07-23 23:59:22 +0100  Julien Isorce <julien.isorce@gmail.com>
+
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: remove unused label context_creation_error
+	  Build error introduced by commit
+	  5457e55f255518d679b59a170951e299ecd8c5f6
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-07-24 02:46:21 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Don't discard first AU delimiter
+	  Don't throw away AU delimiter(s) that precede the SPS/PPS. Should
+	  fix MPEG-TS playback on iOS/Quicktime when muxing streams that
+	  already have AU delimiters.
+	  See https://bugzilla.gnome.org/show_bug.cgi?id=736213 for getting
+	  h264parse to insert AU delimiters when they don't already
+	  exist.
+
+2015-07-23 11:18:47 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: fix allocation meta structure leak
+	  gst_query_add_allocation_meta() does not take ownership
+	  of the structure, for some reason.
+	  CID 1312135
+
+2015-07-23 10:57:26 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: fix memory leak
+	  GstCapsFeatures need to be freed with gst_caps_features_free() after use.
+	  CID #1312136, CID #1312136
+
+2015-07-02 20:10:50 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: Add GstControlBinding proxy
+	  This is used to proxy GstControlBinding to the pad on the
+	  parent object. This avoid having to sync the values in the proxy pad,
+	  this is too early if you have a queue between the pad and the actual
+	  aggregation operation.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734060
+
+2015-07-22 19:27:19 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Register function name
+	  Otherwise, it sometimes segfaults with debugging enabled
+
+2015-07-22 19:26:42 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Use 1.0 style buffer allocation
+
+2015-07-22 16:58:12 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  glupload: Forward composition meta even without params
+	  When the sink does not know the window size (e.g not created yet)
+	  it will not add any param to the the composition meta. This is no
+	  reason not to forward this meta API. Fixes issue where it could not
+	  attach until we resize the window.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-22 15:56:34 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	  gloverlaycompositor: Keep memory pointer alive
+	  Keep the composition memory pointer alive while it's being
+	  wrapped inside a GstGLMemory object.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-22 14:17:42 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	  gloverlaycompositor: Pass buffer stride
+	  The overlay pixel buffer stride was not given back
+	  to the GL image.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-05-19 16:08:08 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	* tests/check/Makefile.am:
+	* tests/check/elements/audiomixer.c:
+	  audioaggregator: Sync pad values before aggregating
+	  We need to sync the pad values before taking the aggregator and pad locks
+	  otherwise the element will just deadlock if there's any property changes
+	  scheduled using GstController since that involves taking the aggregator and pad
+	  locks.
+	  Also add a test for this.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749574
+
+2015-07-22 14:05:34 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglcompositionoverlay.c:
+	* gst-libs/gst/gl/gstglcompositionoverlay.h:
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	* gst-libs/gst/gl/gstgloverlaycompositor.h:
+	  gloverlaycompositor: Hide GstCompsitionOverlay object
+	  This object is only used inside the compositor and does not
+	  need to be expose in libgstgl API.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-22 13:33:12 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	  libgstgl: Makefile style fix
+
+2015-07-21 23:48:25 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstglcompositionoverlay.c:
+	* gst-libs/gst/gl/gstglcompositionoverlay.h:
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	* gst-libs/gst/gl/gstgloverlaycompositor.h:
+	  composition-overlay: Positions are relative to texture
+	  The coordinate are relative to the texture dimension and not
+	  the window dimension now. There is no need to pass the window
+	  dimension or to update the overlay if the dimension changes.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-21 21:27:45 -0400  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	* gst-libs/gst/gl/gstgloverlaycompositor.h:
+	  gloverlaycompositor: Create own shader object
+	  Make gloverlaycompositor independent of the shader used in the sink.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-21 18:47:56 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Properly handle compsositor life time
+	  Should be created in READY_TO_PAUSED, not PAUSED_TO_PLAYING.
+	  Should be cleared in PAUSED_TO_READY.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-22 16:10:35 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: remove unneeded variable
+	  ret is declared just to initialize to TRUE and overwrite with the value of
+	  vret. We can return the value of vret directly. vret is TRUE unless the
+	  forward_event_func sets it to FALSE.
+
+2015-07-22 15:13:48 +0200  Edward Hervey <edward@centricular.com>
+
+	* ext/qt/Makefile.am:
+	  qt: Don't dist files that might not exist
+	  We only require moc building at build time.
+
+2015-07-22 15:50:26 +0900  Young Han Lee <y.lee@lge.com>
+
+	* configure.ac:
+	  configure: require libxml2 >= 2.8 for DASH plugin
+	  The DASH plugin uses xmlBufferDetach now in the code
+	  that handles ContentProtection elements.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752703
+
+2015-07-22 08:05:04 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/qt/Makefile.am:
+	  qt: Tidy up makefile a bit more
+	  Separate generated files, from disted files
+
+2015-07-21 20:52:23 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Read output buffer duration with lock held
+
+2015-07-21 11:23:21 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gstglwidget: use gst_gl_display_create_context
+	  Also handle the failure case.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-07-21 11:28:08 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: use gst_gl_display_create_context
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-07-21 11:21:27 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglstereosplit.c:
+	  glstereosplit: use gst_gl_display_create_context
+	  Also unlock the lock on error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-07-21 14:10:57 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: return false if event couldn't be pushed
+	  Make the gst pad's event function return false if the event couldn't be
+	  pushed to the pad.
+
+2015-07-21 13:11:17 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	  gloverlaycompositor: for loop initial declarations are only allowed in C99 mode
+	  Fixes compiler warnings
+
+2015-06-19 11:57:06 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  gl: use gst_gl_display_create_context in more elements.
+	  glbasefilter, glbasemixer and gltestsrc.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-07-21 17:34:27 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	  gl/build: fix typo in _HEADERS resulting in installing the wrong file
+	  /usr/include/gstreamer-1.0/gst/gl/gl.h:51:43: fatal error:
+	  gst/gl/gstgloverlaycompositor.h: No such file or directory
+
+2015-07-21 15:39:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: add RGB to NV12/NV21 conversion
+
+2015-07-01 14:01:45 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Send reconfigure event when window size changes
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-07-20 14:24:22 -0400  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgluploadelement.c:
+	  glimagesinkbin: Add allocation query for GstVideoOverlayComposition
+	  Adds an GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE query to glupload
+	  and glimagesink.  Detects the query from the downstream elements, so
+	  it is executed only when downstream supports the overlay API.
+	  This makes pipelines with textoverlay ! glupload ! gldownload ! xvimagesink possible.
+	  Uses allocation meta struct for passing the window size upstream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-04-20 13:17:09 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Apply GstVideoOverlayCompositionMeta buffer to converted buffer
+	  Since glcolorconvert creates a new GstBuffer,
+	  without the GstVideoOverlayCompositionMeta data,
+	  it needs to be copied to not be dropped.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-18 13:34:58 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Detect overlay meta buffers correctly
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-18 05:43:50 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	  glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-18 06:04:37 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: Upload and draw overlays with GstGLOverlayCompositor
+	  Receives the GstOverlayComposition buffer in the glimagesink and draws them.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-30 17:59:12 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstgloverlaycompositor.c:
+	* gst-libs/gst/gl/gstgloverlaycompositor.h:
+	  gloverlaycompositor: Add GstGLOverlayCompositor class
+	  Manages the GstGLCompositionOverlay objects,
+	  caches already uploaded overlays and draws them.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-18 14:15:01 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglcompositionoverlay.c:
+	  glcompositionoverlay: Add compatibility for GL contexts without glGenVertexArrays
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-13 15:35:47 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglcompositionoverlay.c:
+	* gst-libs/gst/gl/gstglcompositionoverlay.h:
+	  glcompositionoverlay: Add class for managing GstVideoOverlayCompositionOverlay buffers
+	  Add a class to store and manage the OpenGL texture,
+	  vertex buffer and GstVideoOverlayRectangle.
+	  Transforms overlay coordinate space to vertex buffer space with aspect ratios in mind.
+	  = Example Pipelines =
+	  Simple pipeline
+	  gst-launch-1.0 videotestsrc ! \
+	  textoverlay text="Hello World" font-desc="sans bold 30" ! \
+	  glimagesink
+	  Display 3 static overlays at different positions
+	  gst-launch-1.0 videotestsrc ! \
+	  textoverlay text="text1" valignment="top" font-desc="sans bold 30" ! \
+	  textoverlay text="text2" halignment="right" font-desc="sans bold 30" ! \
+	  textoverlay text="text3" halignment="left" font-desc="sans bold 30" ! \
+	  glimagesink
+	  Display subtitle file over testsrc
+	  gst-launch-1.0 videotestsrc ! \
+	  textoverlay name=foo filesrc location=foo.srt ! subparse ! queue ! foo. foo. ! \
+	  glimagesink
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-06-18 11:33:29 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Move debug init to top of the file
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745107
+
+2015-04-20 15:04:56 +0200  Carlos Rafael Giani <dv@pseudoterminal.org>
+
+	* ext/opus/gstopusdec.c:
+	* ext/opus/gstopusdec.h:
+	  opusdec: Fix PLC frame size calculations
+	  Previously, PLC frames always had a length of 120ms, which caused audio
+	  quality degradation and synchronization errors. Fix this by calculating an
+	  appropriate length for the PLC frame.
+	  The length must be a multiple of 2.5ms. Calculate a multiple of 2.5ms that
+	  is nearest to the current PLC length. Any leftover PLC length that didn't
+	  make it into this frame is accumulated for the next PLC frame.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725167
+
+2015-07-18 21:18:23 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: minor clean-up
+	  No need for a foreach callback function that's just a few
+	  lines of code and is only used once, just do the event
+	  pushing inline.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=705991
+
+2015-02-06 13:22:14 +0000  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  dashdemux: add support for generating Protection events from ContentProtection elements
+	  If a ContentProtection element is present in an AdaptationSet element,
+	  send Protection events on the source pad, so that qtdemux can use this
+	  information to correctly generate its source caps for DASH CENC
+	  encrypted streams.
+	  This allows qtdemux to support CENC encrypted DASH streams where the
+	  content protection specific information is carried in the MPD file
+	  rather than in pssh boxes in the initialisation segments.
+	  This commit adds a new function to the adaptivedemux base class to allow
+	  a GstEvent to be queued for a stream. The queue of events are sent the
+	  next time a buffer is pushed for that stream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=705991
+
+2015-07-20 12:40:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/voaacenc/gstvoaacenc.c:
+	  voaacenc: fix output caps for stream-format=ADTS
+	  Should have framed=true in caps. Fixes voaacenc ! mpegtsmux.
+
+2015-07-20 12:38:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: fix aac caps in pad template for raw aac
+	  Raw aac doesn't need framed=true.
+	  Fixes not-negotiated error with voaacenc ! mpegtsmux.
+
+2015-07-20 11:09:20 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk: Log GDK GL error when failling creating GdkGLContext
+
+2015-07-20 18:19:02 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: check for pbo availability before attempting pbo download
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751165
+
+2015-07-18 17:19:18 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/qt/qtitem.cc:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	* tests/check/libs/gstglcontext.c:
+	  glcontext: fix get_current_gl_api on x11/nvidia drivers
+	  They require to get_proc_address some functions through the
+	  platform specific {glX,egl}GetProcAddress rather than the default
+	  GL library symbol lookup.
+
+2015-07-18 17:08:36 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.h:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.h:
+	  glcontext: consolidate get_proc_address function definition
+	  Pass the GstGLAPI directly.
+
+2015-07-17 17:47:37 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvertelement: propagate failure to convert buffer upstream
+	  Rather than just silently continuing
+
+2015-07-17 13:48:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  glcontext/glx: try creating a context with the highest version
+	  nvidia drivers return the exact version in glGstString (GL_VERSION)
+	  we request on creation so start with the highest known version and
+	  work our way down.
+
+2015-07-16 00:37:58 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* tests/check/libs/gstglcontext.c:
+	  glcontext: track sharedness with a cookie
+	  The previous approach of traversing the other_context weak ref tree was
+	  1. Less performant
+	  2. Incorrect for context destruction removing a link in the tree
+	  Example of 2:
+	  c1 = context_create (NULL)
+	  c2 = context_create (c1)
+	  c3 = context_create (c2)
+	  context_can_share (c1, c3) == TRUE
+	  context_destroy (c2)
+	  unref (c2)
+	  context_can_share (c1, c3) returns FALSE when it should be TRUE!
+	  This does not remove the restriction that context sharedness can only
+	  be tracked between GstGLContext's.
+
+2015-07-16 00:33:17 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: use the debug object variant for completeness
+
+2015-07-17 16:00:01 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkgstglwidget: Cleanup unused private member
+	  new_buffer has been moved to base class. Also cleanup
+	  the properties comment, which are also all moved into
+	  the base class.
+
+2015-07-17 15:57:37 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkbasesink.c:
+	  gtksink: "widget" must be access from main thread
+	  Document that "widget" property must be accessed from the
+	  main thread (where GTK is running). This is the same for
+	  state transition on these elements. It is very natural to
+	  do so un GTK applications.
+
+2015-07-17 15:08:53 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglsink: Don't leak vertex array and buffers
+	  This is now possible since reset is always called from the
+	  main thread.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-17 14:36:56 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	  gtkgstbasewidget: Fix black frame on resize
+	  This is solved by only applying the new format when the next
+	  buffer is to be rendered and on the GTK thread.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-17 13:05:05 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkbasesink.c:
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	  gtkgstbasewidget: Pass already parsed VideoInfo
+	  As the base sink already parse the caps into VideoInfo it
+	  makes sense to pass in VideoInfo to the widget instead.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 16:49:32 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	  gtkglsink: Port to GstGtkBaseSink base class
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 16:00:37 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	  gtksink: Port to GstGtkBaseSink
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 15:59:59 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/Makefile.am:
+	* ext/gtk/gstgtkbasesink.c:
+	* ext/gtk/gstgtkbasesink.h:
+	  gtkbasesink: Create a base class
+	  This contains all the common code between the gtkglsink and
+	  gtksink.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 14:30:42 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstglwidget.h:
+	  gtkglsink: Port to GtkGstBaseWidget
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 12:55:11 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	* ext/gtk/gtkgstwidget.c:
+	* ext/gtk/gtkgstwidget.h:
+	  gtksink: Port to GtkGstBaseWidget
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 12:51:34 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/Makefile.am:
+	* ext/gtk/gtkgstbasewidget.c:
+	* ext/gtk/gtkgstbasewidget.h:
+	  gtk: Add GtkGstBaseWidget
+	  This is a "pseudo" base class. Basically it's a shared instance
+	  and class structure and a shared set of function between the
+	  two widget. It cannot have it's own type like normal base class
+	  since the one instance will implement GtkGLArea while the other
+	  implements GtkDrawingAreay. To workaround this, the parent instance
+	  and class is a union of both.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752441
+
+2015-07-16 16:47:05 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  uploadelement: Protect against NULL pointer
+	  I notice that if you stop the pipeline during a renegotiation
+	  the upload may be NULL while an allocation query is being run.
+	  In that scenario, returning FALSE to the allocation query is the
+	  best thing.
+
+2015-07-15 17:35:22 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkgstglwidget: Remove unused gl_caps
+
+2015-07-15 16:56:33 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtksink.c:
+	  gtksink: Create a window if the widget is unparented
+	  The same way as it's now done with the gtkglsink, create a top
+	  level window if the widget is not parented.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-07-15 14:35:02 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtksink.c:
+	  gtksink: Ensure the copy pasted code remains the same
+	  Move back the default property at the same place they are in the
+	  other sink. This helps when using a diff viewer to synchronized
+	  this unfortunate copy paste.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-07-15 14:32:42 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: Fix race between queue_draw and destroy
+	  In GTK dispose can be called before the last ref is reached. This
+	  happens when you close the container window. The dispose will be
+	  explicitly called, and destroyed notify will be fired. This patch
+	  fixes this race by properly tracking the widget state.
+	  In the sink, we now set the widget pointer to NULL, so the widget
+	  will properly get created again if you set your pipeline to NULL
+	  state after the widget was destroy, and set it back to PLAYING.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-07-16 21:28:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dash/gstplugin.c:
+	  dashdemux: remove typefinder, move it to typefindfunctions in -base
+	  Otherwise this plugin will be loaded pretty much whenever
+	  there's anything to typefind. And the code was pretty much
+	  copy'n'paste from -base anyway.
+
+2015-07-15 13:02:54 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: default timescale is 1
+	  default timescale value should be 1, not 0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752414
+
+2015-07-15 13:41:37 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: free prop_string only after it's no longer needed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752419
+
+2015-07-16 17:21:51 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-plugins-bad.doap:
+	  Update mailing list address from sourceforge to freedesktop
+
+2015-07-15 11:47:51 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gtkgstwidget.c:
+	  gtkgstwidget: Add missing break in get_property
+
+2015-07-15 11:44:30 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.h:
+	  gtksinks: Remove undefined private structure
+	  The classes contains a private structure which are not defined,
+	  hence unused.
+
+2015-07-14 17:40:32 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: memcpy on raw data upload
+	  Anything else requires keeping track of the GstVideoFrame mapping
+	  across possible multiple buffers to ensure correct data pointer
+	  usage.
+
+2015-07-14 17:39:59 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglbasebuffer.c:
+	  glbasebuffer: add some debug and zero the data pointers on init
+
+2015-07-10 01:00:15 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: don't wait for data on sparse inputs like metadata or subtitle streams
+
+2014-11-09 19:16:29 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/tsmux/tsmuxstream.c:
+	* gst/mpegtsmux/tsmux/tsmuxstream.h:
+	  mpegtsmux: add basic support for asynchronous KLV metadata streams
+	  This is defined in SMPTE Rp 217. In this case the
+	  metadata PES packets carry no timestamps of their
+	  own and no Metadata Access Unit Wrappers are used.
+
+2015-06-29 02:42:06 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: handle non-consecutive GstBuffer input without copying
+	  CMBlockBuffer offers a model similar to GstBuffer, as it can
+	  consist of multiple non-consecutive memory blocks.
+	  Prior to this change, what we were doing was:
+	  1) Incorrect:
+	  CMBlockBufferCreateWithMemoryBlock does not copy the data,
+	  but we gst_buffer_unmap'd right away.
+	  2) Inefficient:
+	  If the GstBuffer consisted of non-contiguous memory blocks,
+	  gst_buffer_map resulted in malloc / memcpy.
+	  With this change, we construct a CMBlockBuffer out of individual mapped
+	  GstMemory objects. CMBlockBuffer is made to retain the GstMemory
+	  objects (through the use of CMBlockBufferCustomBlockSource), so the
+	  original GstBuffer can be unref'd.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751241
+
+2015-07-13 23:22:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* sys/applemedia/avsamplevideosink.m:
+	  applemedia/avsample: fix unconditional use of OSX 10.10 API
+	  We can just not use the error/status properties
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746631
+
+2015-07-10 19:05:41 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: try harder to find the right Qt5 build tools
+	  First check for Qt build tools in the host_bins directory
+	  from the Qt5Core pkg-config file. This fixes the situation
+	  where both Qt4 and Qt5 are installed but the global moc/uic/etc.
+	  are the Qt4 version, which would result in build failures.
+
+2015-07-10 14:01:43 +0200  Edward Hervey <edward@centricular.com>
+
+	* configure.ac:
+	* ext/qt/qtitem.cc:
+	  configure/qt: Fix build without Qt5X11Extras
+
+2015-07-10 13:26:51 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparse: g_slice_new() can't return NULL
+	  It will abort() if allocation fails.
+
+2015-07-10 13:19:40 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Don't allow network access when reading the XML data
+
+2015-07-10 19:22:08 +1000  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	  qt: don't error out if Qt X11 could not be found
+	  PCK_CHECK_MODULES default error-if-not-found implementation errors
+	  so override it with a simple notice that we couldn't find the library.
+
+2015-07-06 23:10:51 +1000  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/qt/.gitignore:
+	* ext/qt/Makefile.am:
+	* ext/qt/gstplugin.cc:
+	* ext/qt/gstqsgtexture.cc:
+	* ext/qt/gstqsgtexture.h:
+	* ext/qt/gstqtsink.cc:
+	* ext/qt/gstqtsink.h:
+	* ext/qt/qtitem.cc:
+	* ext/qt/qtitem.h:
+	* tests/examples/qt/qml/.gitignore:
+	* tests/examples/qt/qml/main.cpp:
+	* tests/examples/qt/qml/main.qml:
+	* tests/examples/qt/qml/play.pro:
+	* tests/examples/qt/qml/qml.qrc:
+	  new qt5 qml GL video sink
+	  Very much in the same spirit as the Gtk GL sink
+	  Two things are provided
+	  1. A QQuickItem subclass that renders out RGBA filled GstGLMemory
+	  buffers that is instantiated from qml.
+	  2. A sink element that will push buffers into (1)
+	  To use
+	  1. Declare the GstGLVideoItem in qml with an appropriate
+	  objectName property set.
+	  2. Get the aforementioned GstGLVideoItem from qml using something like
+	  QQmlApplicationEngine engine;
+	  engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+	  QObject *rootObject = engine.rootObjects().first();
+	  QQuickItem *videoItem = rootObject->findChild<QQuickItem *> ("videoItem");
+	  3. Set the videoItem on the sink
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752185
+
+2015-07-08 17:17:18 +0200  Rico Tzschichholz <ricotz@ubuntu.com>
+
+	* sys/bluez/Makefile.am:
+	  bluez: Fix make dist while bluez >= 5 is not available
+
+2015-07-09 18:31:34 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: Fix previous commit
+	  We only want to do a hard reset of the observations if we're working
+	  with TIME segments in push mode. For BYTE segment we want to keep
+	  the observations (in order to do seeks in push-mode).
+
+2015-07-09 16:59:16 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: Flush more on DISCONT buffers in push mode
+	  When in push mode, we want to discard all previous observations from the
+	  mpegtspacketizer when we get a DISCONT buffer.
+	  This avoids trying to calculate bogus timestamps (estimating them using old
+	  PCR observations).
+	  We only do a hard reset in push-mode. In pull-mode we still need the observations
+	  (in order to seek properly)
+
+2015-07-09 11:07:29 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* .gitignore:
+	  gitignore: Add new generated files
+
+2015-07-09 11:05:10 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* sys/bluez/Makefile.am:
+	  bluez: Include new file in dist'ed files
+	  Fixes make distcheck and tarball generation
+
+2015-07-09 13:03:23 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	* tests/check/Makefile.am:
+	  gtk: add to the generic/states test
+
+2015-06-17 09:36:57 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	  GstGtkGLSink: Ensure widget has a toplevel parent
+	  Checking for a parent is not enough, it must have a toplevel one.
+	  If widget has no toplevel parent then add it in a GtkWindow, that
+	  make it usable from gst-launch-1.0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-06-17 09:36:40 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	  GstGtkGLSink: Post error if widget gets destroyed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-06-16 16:21:26 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	  GstGtkGLSink: fix possible warning in finalize
+	  If the element is finalized before going in READY state
+	  the widget could still be NULL.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751104
+
+2015-07-08 23:14:13 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  mpdparser: Fix some memory leaks in the MPD parser and unit test
+
+2015-07-07 16:59:52 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: tests: added unit tests to test all functions
+	  Added unit tests for all functions. Code coverage:
+	  Overall coverage rate:
+	  lines......: 83.8% (1941 of 2316 lines)
+	  functions..: 100.0% (141 of 141 functions)
+
+2015-07-08 17:08:56 +0300  Roman Donchenko <roman.donchenko@itseez.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	  pngparse: fix a GstCaps object leak
+	  https://bugzilla.gnome.org//show_bug.cgi?id=752127
+
+2015-03-26 11:34:10 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsdemux/pesparse.c:
+	  tsdemux: remove unnecessary check
+	  This is not public API, use g_assert() instead of
+	  g_return_if_fail(), so that it's compiled out in
+	  releases. It's only called from our code, with &foo.
+
+2014-06-30 13:20:12 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsdemux/gstmpegdesc.h:
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: add support for KLV metadata streams
+	  There's no timestamps for these streams though, we
+	  might want to make some up based on the last/next
+	  video PTS or so.
+
+2015-07-08 16:31:48 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  Revert "Revert "dashdemux: fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS""
+	  This reverts commit 4875ddf5855a26f349df7b385b68eb692e314bfa.
+	  This was based on a misunderstanding of the code.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752085
+
+2015-07-06 13:28:05 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	  gl/eagl: Don't call anything synchronously from the main thread
+	  This will deadlock if the main thread is the one who creates the GstGLContext.
+	  All things we call from the main thread should be possible from any thread.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751101
+
+2015-07-08 12:16:35 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* sys/bluez/gstavdtpsrc.c:
+	  bluez: remove unnecessary goto
+	  All goto fail happen before ret is set. ret must be NULL, and the only
+	  thing the fail statement block does is return NULL. Replacing the jumps to
+	  do this return directly.
+	  CID #1311329
+
+2015-07-08 11:32:58 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: remove redundant else statement
+	  Else statement is redundant when the if block finishes with an return.
+
+2015-07-08 11:42:48 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Add support for H265/HEVC
+
+2015-06-29 12:40:55 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: fix refcount error in error handling
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751641
+
+2015-07-07 19:48:23 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Explicitly check for CUSTOM_ERROR when converting errors to EOS
+	  We use things like CUSTOM_SUCCESS* in other places, and those are not errors
+	  but should just be handled like OK.
+
+2015-07-07 19:26:00 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  Revert "dashdemux: fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS"
+	  This reverts commit dfe37ffc59fdf5f4075696976d98ec8d6db73138.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752085
+
+2015-07-07 19:25:28 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Fix off-by-one in has-next-segment calculation
+
+2015-07-07 18:37:24 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: If downloading the last fragment fails, consider this as EOS and not ERROR
+	  Sometimes the last fragment does not exist because of rounding errors with the
+	  durations. Just finish the stream gracefully instead of erroring out instead.
+
+2015-07-07 22:35:47 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgldownloadelement.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  download: only start a download transfer for sysmem caps features
+
+2015-07-06 12:08:52 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: tests: added indentation in xml strings to improve readability
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752027
+
+2015-07-03 16:17:58 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: added parsing of bitstreamSwitching@AdaptationSet
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751170
+
+2015-07-03 15:31:35 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: regrouped functions in gstmpdparser.h file
+	  Moved gst_mpd_client_get_next_segment_availability_end_time and
+	  gst_mpd_client_add_time_difference functions to be grouped with
+	  functions from the same category.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752027
+
+2015-07-06 14:21:17 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: tests: corrected code layout
+	  deleted the empty line between gst_mpd_parse call and its check so that
+	  the assert is next to the function it is testing
+	  https://bugzilla.gnome.org/show_bug.cgi?id=752027
+
+2015-07-07 10:56:47 +0900  Hyunjun Ko <zzoon.ko@samsung.com>
+
+	* gst-libs/gst/codecparsers/gstmpegvideometa.c:
+	  mpegvideometa: add meta transform function
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751778
+
+2015-07-07 10:57:26 +0900  Hyunjun Ko <zzoon.ko@samsung.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: transform func: return FALSE if not supported or failed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751778
+
+2015-07-06 14:14:12 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS
+	  Fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS if the
+	  new index is out of range.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751850
+
+2015-07-07 16:39:09 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.h:
+	  android: add missing egl.h include
+
+2015-07-07 15:30:17 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: correct vao usage
+	  keep the vao bound after uploading the new vertex data
+	  fixes a mesa GL error "no vertex array object bound" on caps changes
+
+2015-06-16 07:49:34 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstopengl.c:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h:
+	* gst-libs/gst/gl/egl/Makefile.am:
+	* gst-libs/gst/gl/egl/gstegl.h:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	* gst-libs/gst/gl/egl/gstgldisplay_egl.h:
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl: consolidate egl header includes to egl-only headers
+	  They may conflict with other headers.
+
+2015-07-06 19:33:35 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglsink: Release the widget lock when trying to get the GL context
+	  Otherwise we might be waiting for the lock on the main loop (for
+	  example in the ->render vmethod) and thus we will deadlock.
+
+2015-07-06 18:51:07 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Remove pixel-aspect-ratio field from the caps returned by getcaps
+	  Avoiding not negotiated error while negotiating as we anyway force 1/1
+	  as output
+
+2015-07-06 15:24:06 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/curl/gstcurlsshsink.c:
+	  curlsshsink: remove redundant else statement
+	  Else statement is redundant when the if block finishes with an return.
+
+2015-07-02 15:17:51 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: fixed segment start when specified by SegmentTimeline
+	  @t attribute in segment Timeline is relative to the period start.
+	  Corrected the code to take this into account when computing segment
+	  timestamp.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751841
+
+2015-07-03 17:00:31 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: wrong segment duration computed by gst_mpd_client_setup_representation
+	  Corrected computation of segment start and duration.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751914
+
+2015-07-03 16:10:20 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: corrected search for audio languages
+	  Corrected the initialisation of mimeType in
+	  gst_mpdparser_get_list_and_nb_of_audio_language: the variable is used
+	  in a loop, so it must be set to NULL at the beginning of each iteration.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751911
+
+2015-07-03 21:58:26 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* common:
+	  Automatic update of common submodule
+	  From f74b2df to 9aed1d7
+
+2015-07-03 12:17:42 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* ext/gl/gstglmixerbin.c:
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer, glmixer: Add description and klass
+
+2015-07-03 19:24:58 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* configure.ac:
+	  build: Fix broken BlueZ configure check
+	  The previous commit left an extra set of brackets, and missed removing
+	  the explicit dbus check (which is no longer needed since we're using
+	  gdbus).
+
+2015-01-13 10:31:41 -0800  Nick Stoughton <nstoughton@aether.com>
+
+	* configure.ac:
+	  build: remove support for bluez4
+
+2014-12-30 07:21:44 -0800  Nick Stoughton <nstoughton@aether.com>
+
+	* configure.ac:
+	* sys/bluez/Makefile.am:
+	* sys/bluez/gstavdtpsink.c:
+	* sys/bluez/gstavdtpsrc.c:
+	* sys/bluez/gstavdtputil.c:
+	* sys/bluez/gstavdtputil.h:
+	* sys/bluez/org.bluez.xml:
+	  bluez: refactor to use glib and add connection state tracking
+
+2015-06-15 23:40:44 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: fix another regression
+	  Introduced by c4c9fe60b pcapparse: Take buffer directly from the adapter
+	  Using gst_adapter_take_buffer_fast() can lead to buffers that are
+	  made up of multiple memories with the first memory smaller than the
+	  RTP header size, which violates assumptions GstRtpBaseDepayloader
+	  makes, namely that the complete RTP header will be in the first
+	  memory. This leads to such packets being dropped when feeding
+	  them from pcapparse to RTP depayloaders. Use take_buffer() so
+	  we get buffers with a single memory.
+
+2015-07-02 13:45:04 +0200  Stian Selnes <stian@pexip.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/.gitignore:
+	* tests/check/elements/pcapparse.c:
+	  tests: pcapparse: add unit test for frames with eth padding
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751879
+
+2015-06-15 12:55:39 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: fix regression when handling packets with eth padding
+	  Introduced by c4c9fe60b pcapparse: Take buffer directly from the adapter
+	  Flush any trailing bytes after the payload from the adapter as well,
+	  otherwise we'll read a bogus packet size from the adapter next and
+	  then everything goes downhill from there.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751879
+
+2015-07-02 18:51:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Unref video frames and codec state in all cases
+
+2015-07-02 10:26:18 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglviewconvert.c:
+	  gl: initialize output params to 0 before calling gl functions
+	  The client side API of the Chromium's GPU Process has asserts
+	  in debug mode that check that output params are initialized to 0.
+
+2015-06-26 15:34:35 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl: Don't leak pool if set_config failed
+
+2015-06-26 15:33:33 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: Don't cache buffer pool
+	  Caching and sharing to multiple element the same pool prevents
+	  renegotiation from passthrough to not passthrough.
+
+2015-07-02 14:15:05 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Uninitializing the decoder can't fail and will always return 0 == cmResultSuccess
+	  ... but when we cast cmResultSuccess to a gboolean it will be FALSE, and make
+	  GstVideoDecoder::stop() fail for no reason.
+
+2015-07-02 17:08:26 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: use g_clear_error instead of g_error_free
+	  replace g_error_free with g_clear_error, as it internally
+	  checks if error variable is valid or not.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751823
+
+2015-07-02 16:27:06 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* sys/androidmedia/gstamc.c:
+	  amc: fix check whether we managed to acquire a buffer
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751821
+
+2015-06-30 15:52:18 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	* ext/srtp/gstsrtpdec.h:
+	  srtpdec: Add config for the replay window size
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751729
+
+2015-06-30 13:20:43 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: corrected parsing of %u in segment templates
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751716
+
+2015-06-29 22:18:38 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: corrected recognition of $$$ in segment templates
+	  fixed recognition of $$ after a $ that ends an identifier, eg $Time$$$
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751682
+
+2015-06-29 18:50:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	  androidmedia: Call initialize_classes() also when we got the Java VM from the app
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751664
+
+2015-06-29 16:10:39 +0100  Luis de Bethencourt <luis@debethencourt.com>
+
+	* ext/gl/gstglviewconvert.c:
+	  gl: add missing break
+	  gst_gl_view_convert_element_set_property() is missing a break at the end
+	  of the PROP_OUTPUT_DOWNMIX_MODE case. Adding it.
+	  CID #1308949
+
+2015-06-26 14:12:22 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Don't leak pool
+	  gst_query_add_allocation_pool is transfer none. Also unref
+	  if there was a configuration error.
+
+2015-06-26 15:58:25 +0900  Sangkyu Park <sk1122.park@samsung.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: check pointer before dereferencing
+	  gst_ps_demux_get_stream() could return NULL when it is unknown stream,
+	  check this hasn't happened before dereferencing the returned pointer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751528
+
+2015-06-26 13:09:54 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: corrected next fragment duration validation
+	  Before returning the next fragment duration value, the
+	  gst_mpd_client_get_next_fragment_duration function tries to validate it.
+	  But the condition was incorrect.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751539
+
+2015-06-25 23:49:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Move unref() into the right scope
+
+2015-06-25 23:32:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Properly handle presentationTimeOffset for seeking and multi-period streams
+	  Segment start/time/position/base should only be modified if this is the first
+	  time we send a segment, otherwise we will override values from the seek
+	  segment if new streams have to be exposed as part of the seek.
+	  Segment base should be calculated from the segment start based on the stream's
+	  own segment, not the demuxer's segment. Both might differ slightly because of
+	  the presentationTimeOffset.
+	  Always add the presentationTimeOffset (relative to the period start, not
+	  timestamp 0) to the segment start after resetting the stream's segment based
+	  on the demuxer's segment (i.e. after seeks or stream restart). Also make sure
+	  to keep the stream's segment up to date and not just send a new segment event
+	  without storing the segment in the stream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745455
+
+2015-06-25 23:24:50 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Subtract the period start time from the presentation offset
+	  We're interested in the offset between the period start timestamp and the
+	  actual media timestamp so that we can properly correct for it. The absolute
+	  presentation offset to timestamp 0 is useless as the only thing we really
+	  care about is the offset between the current fragment timestamp and the
+	  media timestamp.
+
+2015-06-25 20:19:34 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Subtract the period start when seeking based on a template
+	  Otherwise we will look for segments after the period usually. The seek
+	  timestamp is relative to the start of the first period and we have to
+	  select a segment relative to the current period's start.
+
+2015-06-25 20:09:14 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Include the period start in the fragment timestamps in all cases
+	  We didn't do this for fragments that are generated on demand from a template,
+	  only for the other cases when they were all generated upfront. This caused
+	  fragment timestamps to start from 0 again for each new period.
+
+2015-06-25 23:23:58 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Seek on the new streams if the seek caused a period switch
+	  Seeking on the old streams is pointless, they are going to be freed on the
+	  next opportunity.
+
+2015-06-25 15:05:20 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dash: Correct check for valid timeShiftBufferDepth
+	  If not set, the timeShiftBufferDepth has a default value of -1.
+	  The standard says that this should be interpreted as infinite.
+	  The gst_mpd_client_check_time_position function incorrectly compares
+	  timeShiftBufferDepth with 0 instead of -1 to determine if it was set.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751500
+
+2015-06-25 11:02:41 +0100  Luis de Bethencourt <luisbg@osg.samsung.com>
+
+	* ext/opencv/gstfacedetect.c:
+	* sys/applemedia/iosassetsrc.m:
+	  docs: decodebin2 -> decodebin
+
+2015-04-27 15:09:18 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/coremediabuffer.c:
+	  applemedia: enable sharing of CMBlockBuffer data
+	  Instead of wrapping with GST_MEMORY_FLAG_NO_SHARE, we make the GstMemory
+	  object retain the underlying CMBlockBuffer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751072
+
+2015-04-27 15:02:59 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/coremediabuffer.c:
+	  applemedia: CMBlockBuffer can be non-contiguous
+	  CMBlockBufferGetDataLength would return the entire data length, while
+	  size of individual blocks can be smaller. Iterate over the block buffer
+	  and add the individual (possibly non-contiguous) memory blocks.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751071
+
+2015-06-24 17:16:46 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Corrected duration argument for gst_mpd_client_add_media_segment call
+	  The last parameter of gst_mpd_client_add_media_segment function is a
+	  duration. But when called from gst_mpd_client_setup_representation, the
+	  last argument was wrongly set to PeriodEnd
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751449
+
+2015-06-24 21:42:32 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: incorrect use of period start
+	  The period start information, calculated in gst_mpd_client_setup_media_presentation
+	  function is stored in stream_period->start. The information read from
+	  xml file and stored in stream_period->period->start is not changed.
+	  If the xml file does not contain the period start information,
+	  stream_period->period->start will be -1.
+	  The function gst_mpd_client_get_next_segment_availability_end_time wants to
+	  use period start time, but incorrectly uses stream_period->period->start
+	  (value from xml file, which could be -1) instead of stream_period->start
+	  (computed value)
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751465
+
+2015-06-15 17:18:41 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: renamed functions
+	  Renamed 2 testcase functions:
+	  - dash_mpdparser_program_information
+	  - dash_mpdparser_base_URL
+
+2015-06-25 00:04:32 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  Back to development
+
+=== release 1.5.2 ===
+
+2015-06-24 23:37:26 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ChangeLog:
+	* NEWS:
+	* RELEASE:
+	* 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.prerequisites:
+	* docs/plugins/gst-plugins-bad-plugins.signals:
+	* docs/plugins/inspect/plugin-accurip.xml:
+	* docs/plugins/inspect/plugin-adpcmdec.xml:
+	* docs/plugins/inspect/plugin-adpcmenc.xml:
+	* docs/plugins/inspect/plugin-aiff.xml:
+	* docs/plugins/inspect/plugin-asfmux.xml:
+	* docs/plugins/inspect/plugin-assrender.xml:
+	* docs/plugins/inspect/plugin-audiomixer.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-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-mpegpsmux.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-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-rtmp.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:
+	* win32/common/config.h:
+	  Release 1.5.2
+
+2015-06-24 23:01:24 +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
+
+2015-06-15 17:30:26 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: added explicit type conversions
+	  flexelint (http://www.gimpel.com/html/flex.htm) static code analyser
+	  complained about implicit conversions from unsigned to signed, so I added
+	  explicit conversions.
+	  Ideally, the size parameter of gst_mpd_parse function should be unsigned,
+	  but I don't want to change the API.
+
+2015-06-15 16:59:33 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: corrected return type for duration_to_ms function
+	  The duration_to_ms function converts a time specified by year, month, day,
+	  hour, minute, second, millisecond to a millisecond value. Because all the
+	  arguments are positive numbers, the result must also be positive.
+	  This patch changes the returned value from a gint64 to a guint64 type.
+
+2015-06-24 11:15:46 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* po/cs.po:
+	* po/de.po:
+	* po/hu.po:
+	* po/pl.po:
+	* po/ru.po:
+	* po/uk.po:
+	* po/vi.po:
+	  po: Update translations
+
+2015-06-23 18:19:35 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Also update segment.base and segment.time when switching periods
+	  And include the presentation offset in the last known position for each
+	  stream, and just because we can also keep track of the latest known position
+	  inside the demuxer segment.
+
+2015-06-23 16:46:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  Revert "gl/window/x11: don't create our own X11 display"
+	  This reverts commit 5697b6b89b4b2a15c45bd47be940a17f4412ea11.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751003
+
+2015-06-23 14:16:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	  Revert "eagl: Don't dispatch_sync() to the main thread if we are on the main thread"
+	  This reverts commit 0bff481011cf74c59869b511393d1696b570e3d5.
+	  It wasn't supposed to be merged and also doesn't fix the problem.
+
+2015-06-23 13:13:49 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Remember the last return value of gst_adaptive_demux_stream_update_fragment_info()
+	  It's going to return EOS if the period ended or otherwise there is just no
+	  next fragment left. If we don't store the last return value, it will always
+	  stay OK and gst_adaptive_demux_combine_flows() will always return OK instead
+	  of EOS once all streams are done.
+	  This partially switches period changes in DASH by at least trying to switch
+	  instead of just stopping. What is still left is that after a period change
+	  with DASH the times all start at 0 again instead of continuing.
+
+2015-06-23 11:05:06 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	  eagl: Don't dispatch_sync() to the main thread if we are on the main thread
+	  This will otherwise deadlock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751101
+
+2015-06-23 10:31:44 +0200  John Ludwig <john@theludwigs.com>
+
+	* gst-libs/gst/gl/glprototypes/base.h:
+	  gl: Include texParameterf in the GL function table
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751228
+
+2015-05-29 14:27:24 +0300  Vivia Nikolaidou <vivia@toolsonair.com>
+
+	* gst/debugutils/Makefile.am:
+	* gst/debugutils/debugutilsbad.c:
+	* gst/debugutils/gsterrorignore.c:
+	* gst/debugutils/gsterrorignore.h:
+	  error-ignore: New element to convert some GstFlowReturn types into others
+	  Can be used to fix misbehaving sinks. It will pass through all buffers
+	  until it encounters GST_FLOW_ERROR or GST_FLOW_NOT_NEGOTIATED (configurable).
+	  At that point it will unref the buffers and return GST_FLOW_NOT_LINKED
+	  (configurable) - until the next READY_TO_PAUSED or FLUSH_STOP.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750098
+
+2015-06-20 13:36:27 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: simplifies and improves sink_get_caps.
+	  The problem here was that after removing the formats and
+	  all the things we could convert, we then intersected these
+	  caps with the template caps.
+	  Hence if a subclass offered permissive sink templates
+	  (eg all the possible formats videoconvert handles), but only
+	  one output format, then at negotiation time getcaps returned
+	  caps with the format restricted to that format, even though
+	  we do handle conversion.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751255
+
+2015-06-22 15:47:18 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/opencv/gstmotioncells.c:
+	* ext/opencv/gstmotioncells.h:
+	  motioncells: Port to g_get_current_time
+	  This is more portable.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751221
+
+2015-06-16 17:18:52 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: add frame rate range to caps
+	  When AVFoundation indicates a supported frame rate range, add it to
+	  the caps. This is important for devices such as the iPhone 6, which
+	  indicate a single AVFrameRateRange of 2fps - 60fps.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751048
+
+2015-06-15 17:37:42 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: added parsing of period element
+	  Improved dash_mpd unit tests by adding new tests that parse the Period element.
+	  Code coverage reported by lcov for dash/gstmpdparser.c is:
+	  lines......: 43.0% (985 of 2290 lines)
+	  functions..: 47.5% (67 of 141 functions)
+
+2015-06-22 14:06:04 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: fix consistency about pbo availability.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751165
+
+2015-06-15 17:34:48 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: extended MPD element test to test xml namespaces
+	  Extended the dash_mpdparser_mpd testcase to also test parsing the xml
+	  namespace attribute.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750863
+
+2015-06-15 13:43:53 +0200  Mersad Jelacic <mersad@axis.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: Add bitrate to the tags
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750992
+
+2015-06-15 12:59:55 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: corrected computation of period's duration
+	  According to ISO/IEC 23009-1:2014(E), chapter 5.3.2.1
+	  "The Period extends until the PeriodStart of the next Period, or until
+	  the end of the Media Presentation in the case of the last Period."
+	  This means that a configured value for optional attribute period duration
+	  should be ignored if the next period contains a start attribute or it is
+	  the last period and the MPD contains a mediaPresentationDuration attribute.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750797
+
+2015-06-22 13:29:25 +0200  Wim Taymans <wtaymans@redhat.com>
+
+	* gst/bayer/gstbayerorc-dist.c:
+	  bayer: update ORC files
+	  Update ORC files with newest ORC to fix backup code generation error.
+
+2015-06-22 10:49:50 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/pcapparse/gstirtspparse.c:
+	  irtspparse: reflow code to avoid uninitialized variable warning
+	  This should hopefully allow even the most challenged static
+	  code analyzer to figure out that it's all fine. Also makes
+	  the flow clearer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751305
+
+2015-06-22 10:58:00 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/mpegtsmux/tsmux/tsmux.c:
+	  tsmux: code style fix
+	  trivial patch to add proper ( while checking for if(G_UNLIKELY())
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751305
+
+2015-06-22 09:23:12 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/uvch264/gstuvch264_src.c:
+	  uvch264src: fix small leak in caps query handler
+	  gst_query_set_caps_result() does not take ownership of the caps.
+
+2015-06-22 11:03:15 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* sys/uvch264/gstuvch264_src.c:
+	  uvch264_src: add missing break in caps query handler
+	  There is a missing break statement in switch,
+	  which will result in executing default case as well
+	  resulting in wrong behavior
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751305
+
+2015-06-22 09:08:00 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpeg1sys/.gitignore:
+	* gst/mpeg1sys/Makefile.am:
+	* gst/mpeg1sys/buffer.c:
+	* gst/mpeg1sys/buffer.h:
+	* gst/mpeg1sys/gstmpeg1systemencode.c:
+	* gst/mpeg1sys/gstmpeg1systemencode.h:
+	* gst/mpeg1sys/main.h:
+	* gst/mpeg1sys/mpeg1systemencode.vcproj:
+	* gst/mpeg1sys/systems.c:
+	  mpeg1sys: remove ancient plugin that's never even been ported to 0.8
+
+2015-06-21 17:13:07 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  codecparsers: jpeg: add some padding to ScanHdr struct
+	  For bits that we don't parse out at the moment.
+
+2015-06-21 17:03:52 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  codecparsers: jpeg: add new API to .def file
+
+2015-06-21 14:58:17 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	  codecparsers: jpeg: fix docs for table parsing functions
+
+2015-06-21 13:55:29 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  docs: add new JPEG codecparser API to the docs
+	  And sprinkle some more Since markers
+
+2015-06-21 11:51:38 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* .gitignore:
+	* tests/examples/codecparsers/Makefile.am:
+	* tests/examples/codecparsers/parse-vp8.c:
+	* tests/icles/.gitignore:
+	* tests/icles/Makefile.am:
+	* tests/icles/vp8parser-test.c:
+	  examples: move vp8 parser test to codecparser example directory
+
+2015-06-21 11:20:57 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* .gitignore:
+	* configure.ac:
+	* tests/examples/Makefile.am:
+	* tests/examples/codecparsers/Makefile.am:
+	* tests/examples/codecparsers/parse-jpeg.c:
+	  examples: add small jpeg codecparser test
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2015-06-20 22:49:23 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	  codecparsers: jpeg: fix validity checking of data parsed
+	  g_return_val_if_fail() and g_assert() are not appropriate
+	  for checking untrusted external data.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2015-06-20 19:52:42 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  codecparsers: jpeg: fix up API
+	  - add data pointer to GstJpegSegment and pass segment
+	  to all parsing functions, rename accordingly
+	  - shorten GstJpegMarkerCode enum type name to GstJpegMarker
+	  - move function gtk-doc blurbs into .c file
+	  - add since markers
+	  - flesh out docs for SOF markers
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2015-06-14 11:41:52 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  codecparsers: jpeg: tweak API a little
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2015-06-14 19:01:12 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  codecparsers: jpeg: hide gst_jpeg_scan_for_marker_code()
+	  Make this function private for now, since it's unclear whether
+	  it's actually needed seeing that gst_jpeg_parse() scans too.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2013-09-24 16:10:45 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	  codecparsers: jpeg: fix and optimize scan for next marker code.
+	  Fix scan for next marker code when there is an odd number of filler
+	  (0xff) bytes before the actual marker code. Also optimize the loop
+	  to execute with fewer instructions (~10%).
+	  This fixes parsing for Spectralfan.mov.
+
+2013-09-18 15:56:52 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	  codecparsers: jpeg: fix calculation of segment size.
+	  The size of a marker segment is defined to be exclusive of any initial
+	  marker code. So, fix the size for SOI, EOI and APPn segments but also
+	  the size of any possible segment that is usually "reserved" or not
+	  explicitly defined.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=707447
+
+2013-06-13 13:22:18 +0800  Wind Yuan <feng.yuan@intel.com>
+
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	  codecparsers: jpeg: fix default Huffman tables generation.
+	  Fix build_huffman_table() to correctly fill in the associated HUFFVAL
+	  entries to the default Huffman tables.
+
+2012-09-12 10:40:06 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/Makefile.am:
+	* gst-libs/gst/codecparsers/gstjpegparser.c:
+	* gst-libs/gst/codecparsers/gstjpegparser.h:
+	  codecparsers: jpeg: add JPEG bitstream parser
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=673925
+
+2015-06-20 16:07:57 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: fix typo in log message
+
+2015-06-15 16:09:54 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldisplay.h:
+	  gldisplay: add gst_gl_display_create_context
+	  It also emits a create-context signal so that an application
+	  can provide an external GstGLContext backend.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-06-15 16:36:26 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  glcontext: move display from priv
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750310
+
+2015-06-18 10:55:28 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  Revert "glcontext: add gst_gl_context_set_display helper"
+	  This reverts commit 71b8103cbd16fff9cf5a65cf517083cb794aa3b5.
+
+2015-06-18 10:52:18 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* configure.ac:
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gpuprocess/Makefile.am:
+	* gst-libs/gst/gl/gpuprocess/gstglcontext_gpu_process.c:
+	* gst-libs/gst/gl/gpuprocess/gstglcontext_gpu_process.h:
+	* gst-libs/gst/gl/gpuprocess/gstglwindow_gpu_process.c:
+	* gst-libs/gst/gl/gpuprocess/gstglwindow_gpu_process.h:
+	* gst-libs/gst/gl/gstglapi.c:
+	* gst-libs/gst/gl/gstglapi.h:
+	  Revert "gl: add GstGLContextGPUProcess backend"
+	  This reverts commit b377112ee38912d316e77b4e2102041389dc0051.
+
+2015-06-19 14:35:37 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Remove duplicate, useless line of code
+
+2015-06-18 22:11:05 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/gl/gstopengl.c:
+	  opengl: glstero* are only built with full OpenGL
+	  Don't try to register the elements unless they are built.
+
+2015-06-18 21:09:24 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* configure.ac:
+	  style: Remove white spaces at the end of line
+
+2015-06-18 18:09:55 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglviewconvert.c:
+	  glviewconvert: Fix GLES2 compatibility
+
+2015-06-18 18:02:21 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglviewconvert.c:
+	  glviewconvert: Fix broken validity check
+
+2015-06-15 16:06:41 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Move PAR calcs, and use them for stereoscopic half-aspect
+	  Move the pixel-aspect-ratio calculations higher up in caps
+	  determination, so the results are available for a call to
+	  gst_video_multiview_guess_half_aspect() when stereoscopic video
+	  is detected.
+
+2015-05-30 03:09:17 +1000  Jan Schmidt <jan@centricular.com>
+
+	* configure.ac:
+	* tests/examples/gl/gtk/3dvideo/.gitignore:
+	* tests/examples/gl/gtk/3dvideo/3dvideo.vcproj:
+	* tests/examples/gl/gtk/3dvideo/Makefile.am:
+	* tests/examples/gl/gtk/3dvideo/main.cpp:
+	* tests/examples/gl/gtk/3dvideo/mviewwidget.c:
+	* tests/examples/gl/gtk/3dvideo/mviewwidget.h:
+	* tests/examples/gl/gtk/Makefile.am:
+	  3dvideo: Add simple gtk example stereoscopic video player
+	  https://bugzilla.gnome.org/show_bug.cgi?id=611157
+
+2015-05-30 02:29:04 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglstereomix.c:
+	* ext/gl/gstglstereomix.h:
+	* ext/gl/gstglstereosplit.c:
+	* ext/gl/gstglstereosplit.h:
+	* ext/gl/gstglviewconvert.c:
+	* ext/gl/gstglviewconvert.h:
+	* ext/gl/gstopengl.c:
+	  gl: Add glviewconvert, glstereomix and glstereosplit elements
+	  Conversion elements for transforming multiview/stereoscopic video
+	  https://bugzilla.gnome.org/show_bug.cgi?id=611157
+
+2015-05-30 02:26:32 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: Support multiview/stereoscopic video
+	  Support video with multiview info in the caps, transform
+	  it to mono anaglyph by default, but allow for configuring
+	  other output modes and handoff to the app via
+	  the draw signal.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=611157
+
+2015-05-30 02:21:43 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglviewconvert.c:
+	* gst-libs/gst/gl/gstglviewconvert.h:
+	  gl libs: Add glviewconvert helper object
+	  Add API for a helper object that can convert between different
+	  stereoscopic video representations, and later do filtering
+	  of multiple view streams.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=611157
+
+2015-06-18 16:20:26 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: added warnings in gst_mpd_client_setup_streaming function
+	  Added some warning messages in gst_mpd_client_setup_streaming to help
+	  debug situations when the function will return FALSE.
+	  Renamed a wrongly spelled variable.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751149
+
+2015-06-18 12:21:43 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: corrected comments in gstmpdparser.h
+	  Corrected some comments in gstmpdparser.h file.
+	  Moved gst_mpd_client_get_adaptation_sets function to be grouped with
+	  other functions from AdaptationSet group
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751149
+
+2015-06-18 13:08:25 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: fixed getting representation based on max bandwidth
+	  The gst_mpdparser_get_rep_idx_with_max_bandwidth function assumes
+	  representations are ordered by bandwidth and incorrectly returns the
+	  first one when wanting the one with minimum bandwidth.
+	  Corrected gst_mpdparser_get_rep_idx_with_max_bandwidth function to get the
+	  correct representation in case max_bandwidth parameter is 0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751153
+
+2015-06-18 14:38:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Allow the application to provide the Java VM
+	  In JNI_OnLoad() we will already get the Java VM passed and could
+	  just directly use that. gstreamer_android-1.0.c will now provide
+	  this to us.
+	  Reason for this is that apparently not all Android system are
+	  providing the JNI functions to get the currently running Java VMs, so
+	  we would fail to get. With this we will always be able to get the Java
+	  VM on such systems.
+
+2015-06-18 14:31:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Prefer software codecs over hardware codecs for audio
+	  Hardware codecs don't make sense for audio and are generally less reliable on
+	  Android than the software codecs.
+
+2015-06-18 14:29:33 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	  androidmedia: Failing to detach a thread is not that much of a problem
+	  Someone else might have detached it before us, so make this just normal debug
+	  output instead of a GST_ERROR()
+
+2015-06-18 10:43:53 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	  androidmedia: Don't fail if JNI_CreateJavaVM can't be found
+	  We only need that if no Java VM is running yet, and all usual cases,
+	  i.e. when calling GStreamer from an actual Android app, there will already
+	  be a Java VM we can just use.
+	  It seems like some phones come without that symbol, let's hope they come
+	  with the other symbol but for now don't make a missing JNI_CreateJavaVM fatal.
+
+2015-06-18 12:59:18 +0700  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst/debugutils/fpsdisplaysink.c:
+	  fpsdisplaysink: get rendered and dropped stats from QOS messages
+	  Use QOS messages to update rendered and dropped frame stats. This is
+	  the only accurate method. The old method didn't take max-lateness and
+	  latency into account.
+
+2015-06-17 10:44:16 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst-libs/gst/codecparsers/nalutils.c:
+	  nalutils: trivial patch to check if
+	  trivial patch to add proper ( while checking for if(G_UNLIKELY())
+	  https://bugzilla.gnome.org/show_bug.cgi?id=751087
+
+2015-06-16 17:48:51 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* common:
+	  Automatic update of common submodule
+	  From 6015d26 to f74b2df
+
+2015-06-15 21:32:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglwidget: Const'ify another array
+
+2015-06-15 21:29:46 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtkglwidget: Calculate the viewport size ourselves
+	  Getting the current viewport and modifying it relatively will produce an
+	  interesting feedback loop during widget resizing. Over a few frames we
+	  will gradually move the viewport a bit until it converged again, adding
+	  unnecessary additional borders at the top and left.
+
+2015-06-15 21:24:01 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: Use the display width/height for the widget's preferred width/height
+
+2015-06-15 20:45:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtksink: Add support for xRGB/BGRx
+
+2015-06-15 20:39:59 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: Cairo color formats are in native endianness, GStreamer's in memory order
+	  CAIRO_FORMAT_ARGB32 is ARGB on big endian and BGRA on little endian.
+
+2015-06-15 20:35:38 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: Implement ignore-alpha property and enable it by default
+
+2015-06-15 20:13:57 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtksink.c:
+	  gtk: Sync properties from the sink to the widget upon widget creation
+
+2015-06-15 10:08:57 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	  mpegtsmux: Remove redundant min_dts
+	  After few iteration, this variable became the same as dts. It's not
+	  the min as the name says, but the dts of the current buffer. Simply
+	  remove and place with dts. Also move the debug trace to actually
+	  print the signed version of the running-time dts.
+
+2015-06-15 22:43:54 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: add missing handle-events/ignore-alpha property to the bin
+
+2015-06-15 18:28:37 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: implement pixel and display aspect ratio handling
+
+2015-06-15 14:29:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Print some debug output if we change the timestamp offset
+
+2015-06-15 14:25:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Add some more debug output
+
+2015-06-15 14:22:00 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Move variables into the scope where they are needed
+
+2015-06-15 14:19:05 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Don't update the ts-offset before updating the actual configured caps
+
+2015-06-15 14:18:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Remember if the last LATENCY query returned live or not and use the in the QoS messages
+
+2015-06-15 12:20:24 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Don't query supported color formats for non-video codecs
+
+2015-06-15 10:34:56 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: fix build error
+	  after e000a6f0a4984fbe81190df6cd439c70dafde3d6, there is build error in bad plugins
+	  this happens because, GST_CLOCK_STIME_IS_VALID () is being checked for pad_data
+	  but it expects a GstClockTime parameter. Changing the check to 'dts'
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750961
+
+2015-06-15 16:47:15 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/qt/mousevideooverlay/main.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/mousevideooverlay.pro:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.h:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/main.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.h:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/qglwidgetvideooverlay.pro:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.pro:
+	* tests/examples/gl/qt/videooverlay/videooverlay.pro:
+	  gl/examples: update qt examples for api changes
+
+2015-06-15 14:35:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk: silence unused variable warnings for unsupported winsys'
+
+2015-06-15 14:33:08 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk: implement basic wayland GL support
+
+2015-06-14 23:20:38 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: update zorder documentation.
+	  It is not bound between 0 and 10000 anymore.
+
+2015-06-14 23:13:59 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: No need to artificially bound the zorder.
+	  It is an unsigned integer so the upper bound is G_MAXUINT.
+
+2014-10-29 15:03:04 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/codecparsers/gstmpeg4parser.c:
+	  codecparsers: mpeg4: actually return full number of bits of resync marker
+	  Switch the increment of markersize from when it is used to when it is
+	  returned from compute_resync_marker_size.
+	  This also makes the CHECK_REMAINING in gst_mpeg4_parse_video_packet_header
+	  check for the actually required number of bits now and not one too few.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739345
+
+2015-06-13 17:36:20 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gstmpeg4parser.c:
+	  Revert "codecparsers: remove ignored increment of return"
+	  This reverts commit 916b954315abc2f94348ec0be3e116c19b080b54.
+	  Clearly something else was intended, and it also makes
+	  more sense to add the extra bit. The resync marker is
+	  N zero bits plus a 1 bit, and the pattern/mask needs to
+	  be run on N+1 bits too.
+	  (Even after the rever the code doesn't do that of course, so
+	  it still needs to be fixed differently.)
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739345
+
+2015-06-12 18:08:44 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* sys/opensles/openslescommon.c:
+	* sys/opensles/openslescommon.h:
+	  opensles: Fix build with Android API level < 14
+	  Headers were broken on older Android versions, apparently.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744459
+
+2015-01-28 13:06:39 +0530  Arun Raghavan <arun@centricular.com>
+
+	* sys/opensles/openslescommon.c:
+	* sys/opensles/openslescommon.h:
+	* sys/opensles/openslesringbuffer.c:
+	* sys/opensles/openslesringbuffer.h:
+	* sys/opensles/openslessink.c:
+	* sys/opensles/openslessink.h:
+	  openslessink: Allow setting the stream type via a property
+
+2015-01-27 15:25:59 +0530  Arun Raghavan <arun@centricular.com>
+
+	* sys/opensles/Makefile.am:
+	* sys/opensles/openslescommon.c:
+	* sys/opensles/openslescommon.h:
+	* sys/opensles/openslesringbuffer.c:
+	* sys/opensles/openslesringbuffer.h:
+	* sys/opensles/openslessrc.c:
+	* sys/opensles/openslessrc.h:
+	  openslessrc: Implement recording presets
+	  This allows us to signal what kind of audio we are expecting to record,
+	  which should tell the system to apply filters (such as echo
+	  cancellation, noise suppression, etc.) if required.
+
+2015-06-13 11:40:14 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.h:
+	  decklinkvideosink: Remove late frame-dropping workaround for basesink bug
+	  This was fixed by https://bugzilla.gnome.org/show_bug.cgi?id=749258
+	  in basesink, and is not necessary to duplicate here anymore.
+
+2015-06-13 18:43:04 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixerbin.c:
+	  glmixerbin: implement proper dynamic pad removal
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750881
+
+2015-06-12 20:14:37 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: Don't do pool caching
+	  We now know that pool caching can cause renegotiation issues
+	  when an element in the pipeline change from passthrough to not
+	  passthrough. As it's not needed, don't cache existing pools.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748344
+
+2015-06-12 18:08:40 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* configure.ac:
+	  configure.ac: Remove reference to cvs
+
+2015-06-10 17:05:52 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Segment start should match first PTS
+	  The segment should start at first PTS, and the vairable name lower_pts
+	  state so correctly. Though we where using the first DTS instead. This
+	  could lead to small desynchronization of video stream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740575
+
+2015-06-10 12:32:34 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	* gst/mpegtsmux/tsmux/tsmux.c:
+	* gst/mpegtsmux/tsmux/tsmuxstream.c:
+	  tsmux: Add negative DTS support
+	  Use the saved DTS, make it signed and pass that to the stream muxer. This
+	  preserves the running time sign. All usage of -1 as invalid TS are now
+	  replaced with G_MININT64. Negative values will be seen as wrap-around
+	  point, but the delta between PTS and DTS will remain correct. Demuxers
+	  don't care about absolute values, they only cares about deltas.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740575
+
+2015-06-10 12:31:13 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	  tsmux: Remove uneeded cast and cast macro
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740575
+
+2015-06-10 11:39:01 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: Properly detect backward DTS
+	  There was code to detect backward dts, but the marker min_dts
+	  was never set. Setting it enable this feature that prevents
+	  potential integer overflow when generating TS.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740575
+
+2015-06-12 16:44:55 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* ext/dash/gstmpdparser.c:
+	* tests/check/elements/dash_mpd.c:
+	  dashdemux: fixed segfault for missing default namespace
+	  Added a check for a_node->ns before accessing a_node->ns->href in
+	  gst_mpdparser_get_xml_node_namespace. This could happen if the xml
+	  is missing the default namespace.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750866
+
+2015-06-12 22:33:58 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Don't require the same framerate in the input as the mode's framerate
+	  We only really care about the timestamps for the sink.
+
+2015-06-13 01:40:00 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* tests/examples/playout.c:
+	  examples: playout: Add better help text
+	  This should help people figure out how to use the example a bit better
+
+2015-06-13 01:35:59 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* tests/examples/playout.c:
+	  examples: playout: Decrement the currently-playing counter correctly
+	  Only do that when we're removing an item that was playing, otherwise we'll mess
+	  things up while trying to edit the play queue (playlist).
+
+2015-01-29 00:56:26 +0000  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* .gitignore:
+	* tests/examples/Makefile.am:
+	* tests/examples/playout.c:
+	  playout: New example for seamless audio/video playback
+	  An example app that takes video URIs as command line arguments and switches
+	  between them seamlessly one after the other using compositor and audiomixer.
+	  Both audio-video and video-only media files are valid inputs, but mixing files
+	  of both types in a single invocation is cumbersome to support, and hence does
+	  not work. The example attempts to keep the audio stream moving along perfectly,
+	  and duplicates video frames where necessary to cover gaps in the video
+	  timestamps using the 'ignore-eos' videoaggregator pad property.
+	  Ensuring seamless (and mostly-glitch-free) switching is harder than it sounds,
+	  and hence the example contains plenty of pad probes and running time
+	  calculations to make things work.
+	  The GPtrArray play_queue contains items that are being played back, have been
+	  prepared for playback, and will be played back in the future. The queue itself
+	  is mutable besides the first two items (playing and prepared). The item that has
+	  been prepared should not be edited or removed since it has been prepared in
+	  advance to be activated immediately on the current item's EOS.
+	  The example also has support for switching to the next item in the queue
+	  prematurely; see the --switch-after/-s flag to the application.
+	  Note: the output video is hard-coded at 1280x720, and input video is scaled as
+	  needed to fit this size. Set OUTPUT_VIDEO_WIDTH/HEIGHT to change this.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748947
+
+2015-06-06 20:40:13 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* tests/check/elements/compositor.c:
+	  tests: Add test for the 'ignore-eos' compositor sink pad property
+	  When the 'ignore-eos' property is set on a pad, compositor will keep resending
+	  the last buffer on the pad till the pad is unlinked. We count the buffers
+	  received on appsink, and if it's more than the buffers sent by videotestsrc, the
+	  test passes.
+
+2015-02-10 00:49:35 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoaggregator: add "ignore-eos" property for input pads
+	  When set, it causes videoaggregator to repeatedly aggregate the last buffer on
+	  an EOS pad instead of skipping it and outputting silence. This is useful, for
+	  instance, while playing back files seamless one after the other, to avoid
+	  videoaggregator ever outputting silence (the checkerboard pattern).
+	  It is to be noted that if all the pads on videoaggregator have this property set
+	  on them, the mixer will never forward EOS downstream for obvious reasons. Hence,
+	  at least one pad with 'ignore-eos' set to FALSE must send EOS to the mixer
+	  before it will be forwarded downstream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748946
+
+2014-12-19 14:43:20 +0100  Jesper Larsen <knorr.jesper@gmail.com>
+
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	  mpegts: return early if packetizing short section
+	  Short sections have 3 bytes of common header, while other sections
+	  have 8 bytes of common header. If packetizing common header of short
+	  section, we should stop after the first 3 bytes.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735653
+
+2015-06-12 17:14:02 +0300  Vivia Nikolaidou <vivia@toolsonair.com>
+
+	* gst/debugutils/Makefile.am:
+	* gst/debugutils/debugutilsbad.c:
+	  debugutilsbad: Minor cleanup
+	  Ran gst-indent on debugutilsbad.c, moved headers to noinst in Makefile.am
+
+2015-06-12 15:39:56 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk: Do not try to activate a NULL GLContext
+	  At that point in the code nothing guarantees it exists
+
+2015-06-12 21:31:48 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/Makefile.am:
+	  gl/tests: remove reference to undefined buffer test
+
+2015-06-11 18:26:50 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgldownloadelement.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* tests/check/libs/gstglmemory.c:
+	  glmemory: separate pbo transfer from texture transfers
+	  When supported, the potentially longer pbo upload/download can be
+	  initiated before the texture upload/download, potentially increasing
+	  throughput.
+
+2015-06-10 16:36:15 +1000  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/gl/gstglbasebuffer.c:
+	* gst-libs/gst/gl/gstglbasebuffer.h:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	* tests/check/Makefile.am:
+	* tests/check/libs/gstglmemory.c:
+	  glmemory: implement on top of glbasebuffer
+	  Provides convenient access to PBO usage.
+	  Currently texture updates are coupled tightly to data transfers.
+
+2015-06-10 16:24:59 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglbasebuffer.c:
+	* gst-libs/gst/gl/gstglbasebuffer.h:
+	  gl: new glbasebuffer GstMemory object
+	  Provides generic handling of GL buffer objects accessible using
+	  the GL bind points (GL_ARRAY_BUFFER, GL_PIXEL_*_BUFFER).
+	  Implementation based off the current GstGLMemory.
+
+2015-06-10 16:23:36 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/all_functions.h:
+	* gst-libs/gst/gl/glprototypes/buffers.h:
+	  gl/prototypes: add some buffer function prototypes
+
+2015-06-12 15:17:30 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstwidget.c:
+	  gtk: implement video aspect-ratio handling
+	  For both the software and the GL sink's.
+	  Doesn't deal with the pixel-aspect-ratio field at all yet.
+
+2015-06-12 13:14:57 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/window/x11: only listen on the X Display when needed
+	  5697b6b89b4b2a15c45bd47be940a17f4412ea11 causes us to possibly listen
+	  on a toolkit provided Display connection.  We thus could eat their
+	  precious winsys events.  Only listen if we need to
+	  (!foreign_display or videooverlay).
+
+2015-06-12 12:40:50 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtksink.c:
+	  gtk: fix a couple of typos
+
+2015-06-12 12:29:37 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	  gtkglsink: reset the context/display in READY_TO_NULL
+	  Fixes context propagation in pipelines with upstream GL elements.
+
+2015-06-11 17:25:49 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: fix error calculating large presentationTimeOffset values
+	  If the presentationTimeOffset attribute of a DASH manifest contains
+	  a value that is larger than 2^32, gstmpdparser incorrectly calculates
+	  the stream's presentation time offset. This is due to two bugs:
+	  1: Using gst_mpdparser_get_xml_prop_unsigned_integer rather than
+	  gst_mpdparser_get_xml_prop_unsigned_integer_64 to parse the
+	  attribute
+	  2: gst_mpd_client_setup_representation multiplying the value by
+	  GST_SECOND and then dividing by timescale
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750804
+
+2015-06-11 12:41:10 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* tests/examples/gtk/gtkglsink.c:
+	  gstgtk: No need to realize the widget
+	  The widget already does that.
+
+2015-06-11 12:38:53 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* tests/examples/gtk/gtkglsink.c:
+	* tests/examples/gtk/gtksink.c:
+	  gstgtk: Don't leak the widget
+	  g_object_get() returns a ref, gtk_container_add() only ref_sink().
+	  That mean we still need to unref afterward. This leak was hiding
+	  a reference bug previously present.
+
+2015-06-11 12:10:23 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtksink.c:
+	  gstgtk: Allow doing gst-inspect-1.0 on these elements
+	  This patch allow going gst-inspect-1.0 on these elements removing
+	  ugly crash that was previously occurring. The method consist of
+	  making the widget creation as lazy as possible. This way we don't
+	  endup doing gtk_init() before the application. We also ref_sink()
+	  the widget, so we don't crash if the parent widget is discarded,
+	  and cleanly error out with GL if the widget has no parent window,
+	  because calling gtk_widget_realized() can only be done if the widget
+	  has been parented to a window).
+
+2015-05-30 02:15:51 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstgldownload.h:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl: Add support for multiple views in upload, colour convert and download
+	  Support multiple attached views on input/output buffers
+	  by processing each one, not just the first.
+
+2015-05-30 01:38:16 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth264parse.h:
+	  h264parse: Add support for passing stereoscopic/multiview info
+	  Pass any multiview info from the container or SEI info downstream
+
+2015-06-11 01:57:08 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth264parse.h:
+	  h264parse: Don't switch to passthrough on set_caps()
+	  Wait until at least one keyframe has been parsed before
+	  deciding to switch to passthrough mode, in case the
+	  stream contains SEI messages that supplement the output
+	  caps - for example by providing stereoscopic information
+
+2015-06-12 00:32:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/window/x11: don't create our own X11 display
+	  It's not needed anymore with most window operations occuring in the
+	  GL thread.
+
+2015-06-12 00:30:58 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/window/x11: handle_events() may be called before the window has been created
+	  Fixes an XIO fatal error
+
+2015-06-12 00:29:23 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglsinkbin.c:
+	  gl: move basesink properties from glimagesinkbin to glsinkbin
+
+2015-03-25 19:27:42 +0200  Yanko Kaneti <yaneti@declera.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	  mpegtsmux: Remove arbitrary constraint on prog-map program ids
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746765
+
+2015-06-11 15:22:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglfilterbin.c:
+	* ext/gl/gstglmixerbin.c:
+	* ext/gl/gstglsrcbin.c:
+	  gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too
+
+2015-06-11 15:17:02 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglsinkbin.c:
+	  glsinkbin: Use gst_object_ref_sink() for consistency with the video-sink property on playbin
+
+2015-06-11 15:02:44 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gtk/gtkgstglwidget.c:
+	  gtk: Do not try to initialize display if we have not have a GLContext yet
+
+2015-06-11 14:58:27 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/examples/gtk/Makefile.am:
+	  gtk: Add missing CFLAGS to example
+
+2014-12-18 17:00:30 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/gtk/Makefile.am:
+	* ext/gtk/gstgtkglsink.c:
+	* ext/gtk/gstgtkglsink.h:
+	* ext/gtk/gstgtksink.c:
+	* ext/gtk/gstgtksink.h:
+	* ext/gtk/gstplugin.c:
+	* ext/gtk/gtkgstglwidget.c:
+	* ext/gtk/gtkgstglwidget.h:
+	* ext/gtk/gtkgstwidget.c:
+	* ext/gtk/gtkgstwidget.h:
+	* tests/check/Makefile.am:
+	* tests/examples/Makefile.am:
+	* tests/examples/gtk/Makefile.am:
+	* tests/examples/gtk/gtkglsink.c:
+	* tests/examples/gtk/gtksink.c:
+	  Implement gtk sinks
+	  two sinks are provided.  gtksink which is a cairo/software based renderer
+	  and gtkglsink which utilises the GL support in gtk and gstreamer.
+
+2015-06-10 10:36:21 +0200  Edward Hervey <edward@centricular.com>
+
+	  h263parse: Fix PSC matching
+	  We were off by one byte in the matching
+	  It should be (using 24 bit matching):
+	  * startcode  : 0000 0000 0000 0000 1000 00xx
+	  * mask (bin) : 1111 1111 1111 1111 1111 1100
+	  * mask (hex) :    f    f    f    f    f    c
+	  * match      :    0    0    0    0    8    0
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750685
+
+2015-05-11 16:47:25 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: always enqueue frames, even on error
+	  Even when we fail to encode frame, we should still enqueue it so
+	  it could be passed into handle_frame (with output_buffer == NULL).
+	  Otherwise, we risk GstVideoEncoder's queue of frames growing unbounded.
+	  Note: We're slightly changing the renegotiation code to accommodate for
+	  frames without output buffers, but this commit takes no ownership over
+	  the way negotiation is being done.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750669
+
+2015-06-10 15:03:31 +0200  Fabio Cetrini <fcetrini@hotmail.com>
+
+	* sys/d3dvideosink/d3dhelpers.c:
+	  d3dvideosink: Avoid frame rendering while the window is completely hidden
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749856
+
+2015-06-10 11:42:06 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl: OES_vertex_array_object is improperly implemented on PowerVR SGX 544MP
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750185
+
+2015-05-11 16:40:07 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: free input buffer ASAP
+	  VTCompressionSessionEncodeFrame retains the CVPixelBuffer during
+	  encoding, and will release it as soon as it can (e.g. before it even
+	  calls our callback). This means we can safely release input buffer
+	  at this point, possibly allowing the system to reuse it sooner.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750671
+
+2015-05-11 16:39:19 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Add missing gst_vtenc_frame_free() in error path
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750668
+
+2015-06-09 16:33:39 +0200  Santiago Carot-Nemesio <sancane@gmail.com>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: Fix memory leaks iterating over pads
+	  Rebased for latest master by Nicolas Huet <nicolas.huet@parrot.com>.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745748
+
+2015-06-10 00:16:27 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: add alignment=au to sink caps
+	  VT compression callback gets a CMSampleBuffer per frame, so vtenc_h264
+	  should set 'alignment=au' in sink caps to indicate this.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750635
+
+2015-06-09 18:30:55 +0100  Chris Clayton <chris2553@googlemail.com>
+
+	* sys/uvch264/gstuvch264_src.c:
+	  uvch264src: fix compiler warnings
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750601
+
+2015-05-12 00:18:02 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfassetsrc.m:
+	  avfassetsrc: fix huge memory leak
+	  CMSampleBuffers were retained -> huge memory leak.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750638
+
+2015-05-11 16:44:33 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: no need for queue_length with try_pop
+
+2015-05-05 15:07:53 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: don't copy meta from input to output
+	  Copying arbitrary metas is going to cause problems and this should really be
+	  handled by the base class. It overrides most other things already anyway,
+	  including timestamp and duration. Those are just set here now so we can
+	  insert the frame sorted into the queue.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748922
+
+2015-06-09 15:32:36 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* Makefile.am:
+	  cruft: add the obsolete tmpl dir to cruft-dirs
+
+2015-06-09 14:37:36 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: fix misleading documentation copied from adder
+
+2015-06-09 12:11:54 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/Makefile.am:
+	  dash: Add $(GST_PLUGINS_BASE_LIBS) to LIBADD
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750619
+
+2015-06-09 11:30:29 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* common:
+	  Automatic update of common submodule
+	  From d9a3353 to 6015d26
+
+2015-06-09 09:07:45 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/dvdspu/gstspu-vobsub-render.c:
+	* gst/dvdspu/gstspu-vobsub.h:
+	  dvdspu: Map the pixel data once per render, not *ahem* twice per byte.
+	  The naive port to 1.0 from years ago was silly, make it better.
+
+2015-06-08 23:08:04 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* common:
+	  Automatic update of common submodule
+	  From d37af32 to d9a3353
+
+2015-06-05 17:20:20 +0100  Florin Apostol <florin.apostol@oregan.net>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/.gitignore:
+	* tests/check/elements/dash_mpd.c:
+	  tests: dashdemux: add unit tests for checking the parsing of MPD element
+	  Create a dash test target and add unit tests that check the parsing of
+	  attributes of the MPD element and the following child elements:
+	  - baseURL
+	  - program information
+	  - location
+	  - metrics
+	  These tests check the compliance of parts of the MPD parser in the
+	  dashdemux element against the DASH specification [1].
+	  [1] http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014_Electronic_inserts.zip
+	  http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750390
+
+2015-05-06 14:29:01 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: simplify aggregate returning
+	  Rework special handling with goto/labels to only have one case
+	  and otherwise just return normally.
+
+2015-05-06 14:19:36 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: refactor caps reconfigure to its own function
+	  Makes the aggregation code shorter and easier to read
+
+2015-05-06 13:59:51 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fixing types in aggregate function
+	  Correctly use boolean and GstFlowReturn types in the function.
+
+2015-05-06 13:08:11 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: use macro to access aggregator src pad
+	  Makes code a bit more readable
+
+2015-05-06 13:07:52 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: add a convenience macro to get the source pad
+	  Easier than casting or acessing the parent everywhere
+
+2015-06-08 14:16:22 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: correct fix for dead code
+	  Rename template to caps to keep the original intention of the code after
+	  commit b4c9aa1c
+	  CID #1304674
+
+2015-06-08 14:14:41 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  Revert "tsdemux: remove dead code"
+	  This reverts commit 0635acfec041b1c664bc0770839b1a576e3598b1.
+
+2015-06-08 13:37:32 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: remove dead code
+	  After commit b4c9aa1c308f88bf4e1f69ab0156ed9f99815e8e template will always be
+	  NULL. The if conditional will always be FALSE, so removing it.
+	  CID #1304674
+
+2015-06-07 23:06:38 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* common:
+	  Automatic update of common submodule
+	  From 21ba2e5 to d37af32
+
+2015-06-07 17:32:07 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* common:
+	  Automatic update of common submodule
+	  From c408583 to 21ba2e5
+
+2015-06-07 17:03:15 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* docs/libs/Makefile.am:
+	* docs/plugins/Makefile.am:
+	  docs: remove variables that we define in the snippet from common
+	  This is syncing our Makefile.am with upstream gtkdoc.
+
+2015-06-07 17:16:25 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* autogen.sh:
+	* common:
+	  Automatic update of common submodule
+	  From d676993 to c408583
+
+2015-06-07 16:45:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  Back to development
+
+2015-06-07 16:28:43 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* docs/libs/Makefile.am:
+	  docs: only add the libs that we actually document right now
+	  Keep the libs in alphabetical order unless a specific link order is required.
+	  Also remove the -L directives as we specify the direct path to the .la files.
+
+2015-06-07 16:28:22 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* docs/libs/gst-plugins-bad-libs.types:
+	  docs: remove duplicated entry from types file
+
+2015-06-07 15:59:59 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* tests/check/elements/zbar.c:
+	  zbar: split test
+	  Lets not cram everything into a single test - this would render the test name
+	  useless for quick diagnosis. Having separate tests for the optional feature is
+	  also verifying the behaviour when the feature is off.
+
+=== release 1.5.1 ===
+
+2015-06-07 10:55:35 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ChangeLog:
+	* NEWS:
+	* RELEASE:
+	* 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/plugin-accurip.xml:
+	* docs/plugins/inspect/plugin-adpcmdec.xml:
+	* docs/plugins/inspect/plugin-adpcmenc.xml:
+	* docs/plugins/inspect/plugin-aiff.xml:
+	* docs/plugins/inspect/plugin-asfmux.xml:
+	* docs/plugins/inspect/plugin-assrender.xml:
+	* docs/plugins/inspect/plugin-audiomixer.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-faad.xml:
+	* docs/plugins/inspect/plugin-festival.xml:
+	* docs/plugins/inspect/plugin-fieldanalysis.xml:
+	* docs/plugins/inspect/plugin-flite.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-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-mpegpsdemux.xml:
+	* docs/plugins/inspect/plugin-mpegpsmux.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-ofa.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-sdp.xml:
+	* docs/plugins/inspect/plugin-segmentclip.xml:
+	* docs/plugins/inspect/plugin-shm.xml:
+	* docs/plugins/inspect/plugin-smooth.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:
+	* gst-plugins-bad.doap:
+	* gst/audiomixer/gstaudiomixerorc-dist.c:
+	* gst/bayer/gstbayerorc-dist.c:
+	* gst/compositor/compositororc-dist.c:
+	* gst/fieldanalysis/gstfieldanalysisorc-dist.c:
+	* gst/gaudieffects/gstgaudieffectsorc-dist.c:
+	* win32/common/config.h:
+	  Release 1.5.1
+
+2015-06-07 09:36:21 +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:
+	  po: Update translations
+
+2015-05-30 21:35:36 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Fix wrong gst-launch command in the description
+	  Fix wrong gst-lauch command in the description.
+	  This patch may help people to get right testing results using the script.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750143
+
+2015-06-05 14:49:18 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/directfb/dfbvideosink.c:
+	  dfbvideosink: remove ignored assignments
+	  Remove assignments to DFBResult res that are never read.
+
+2015-06-05 14:34:55 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: remove ignored assignment
+	  Function goes to done before the value set in start_offset is ever used.
+
+2015-06-05 09:35:39 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/gl/caopengllayersink.m:
+	* ext/gl/gstglfilterbin.c:
+	* ext/gl/gstglmixerbin.c:
+	* ext/gl/gstglsinkbin.c:
+	* ext/gl/gstglsrcbin.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* sys/applemedia/avsamplevideosink.m:
+	* tests/check/elements/glimagesink.c:
+	  Fix a common typo: retreive -> retrieve
+	  Seems to have been copy pasted around a few places
+
+2015-06-05 09:22:58 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: drop TODO that doesn't need a solution
+	  Connection speed is only checked at that point in hlsdemux so there
+	  is no real need to refactor it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749328
+
+2015-06-05 09:15:34 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	  Revert "hlsdemux: Simplify logic in process_manifest"
+	  This reverts commit 4ca3a22b6b33ad8be4383063e76f79c4d346535d.
+	  The connection-speed=0 is used as a special value in the property
+	  of hlsdemux to mean 'automatic' selection, m3u8.c doesn't need
+	  to know about that as it should be as simple as possible.
+	  So this patch hides this automatic selection documented in hlsdemux
+	  into m3u8 logic and I think the gets harder to understand the code.
+	  It also makes the hlsdemux unit tests work again
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749328
+
+2015-06-05 14:30:03 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Fix inverted logic introduced in last commit
+
+2015-06-05 08:58:03 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/videosignal/gstsimplevideomarkdetect.c:
+	  simplevideomarkdetect: fix detect of videomark partially or fully outside video
+	  In case of the videomark being partially or fully outside,
+	  an error was bein thrown saying, mark width is more than video width.
+	  And when the width, offset properties are set to maximum it resulted in crash.
+	  Instead of throwing error, added logic to detect the mark
+	  in case of partial visibility or dont show the mark when it is outside.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743908
+
+2015-06-05 14:10:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Calculate the number of segments we have when a segment template instead of a list is used
+	  Otherwise we would just continue downloading new files forever until we get
+	  404 for the first one, and then error out instead of going EOS.
+
+2015-06-05 08:53:30 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/videosignal/gstsimplevideomark.c:
+	  simplevideomark: Add Error logs
+	  When the pattern offset is outside the video, the print error message
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743908
+
+2015-06-05 13:28:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  Revert "mpdparser: Don't consider streams with a known media presentation duration as live"
+	  This reverts commit 37011e519830e0786fa6e307ed26003a2a8774f1.
+	  This change was actually completely unnecessary, the streams in question are
+	  marked as static and are not considered live anyway.
+
+2015-06-05 13:21:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Don't consider streams with a known media presentation duration as live
+
+2015-06-05 11:26:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Error out if downloading a segment failed too often in live mode
+	  It's true that we shouldn't consider errors fatal immediately, but if we
+	  always ignore them we will loop infinitely on live streams with segments
+	  that can't be downloaded at all.
+
+2015-06-03 12:17:19 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtp.c:
+	  srtp: Allow getting ssrc of more package types than RR and SR
+	  This allows decrypting reduce size packages. See RFC 5506
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750326
+
+2015-06-04 13:36:32 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: refactor pad creation
+	  Avoid repeating the same pad creation code everywhere
+
+2015-06-04 15:57:57 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Don't crash in debug output if stream->segments is NULL
+
+2015-06-04 13:31:56 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/winks/gstksvideosrc.c:
+	  ksvideosrc: fix logic and timestamp non-muxed streams again
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750381
+
+2015-06-04 12:53:19 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/libde265/gstlibde265.c:
+	* ext/libde265/libde265-dec.c:
+	  libde265dec: fix up plugin name and decoder description
+
+2015-06-04 13:36:05 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparse: Clamp seek times to the availabilityStartTime
+	  Otherwise we will seek to negative times, which are interpreted as unsigned
+	  integers later.
+
+2015-06-04 13:13:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Improve debug output a bit when advancing segments
+
+2015-06-04 12:36:41 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Release the manifest mutex before waiting for a download
+	  Otherwise we will hurt parallel downloads in the best case, and often cause
+	  deadlocks.
+
+2015-06-04 11:54:24 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: If channel/rate negotiation fails, fall back to stereo and 48kHz
+
+2015-06-04 11:52:40 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusparse.c:
+	  opusparse: Set up default header with 48kHz sample rate instead of 0
+
+2015-06-04 11:45:05 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: gst_structure_fixate_field_nearest_int() only works if the structure has this field
+	  Just set the rate/channels directly if the caps don't have this field.
+
+2015-06-04 11:05:07 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Use 64 bit integer format strings when passing a 64 bit integer
+	  Otherwise we'll only get half of its bits printed on 32 bit architectures.
+	  For this, promote the %d-style format strings to something that accepts
+	  64 bit integers with G_GINT64_MODIFIER.
+
+2015-06-04 10:47:07 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparse: Validate format strings before using them
+	  Using format strings from an untrusted source without validation is
+	  calling for problems, and at least allows to remotely crash your application.
+	  If not worse.
+
+2015-06-04 09:40:19 +0200  Philippe Normand <philn@igalia.com>
+
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	  gl/dispmanx: Fix build
+
+2015-06-03 22:21:30 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/examples/gl/cocoa/Makefile.am:
+	  gl/example: fix build error when compiling cocoa-videooverlay
+	  libtool: error: ignoring unknown tag OBJC
+	  and
+	  clang: error: argument unused during compilation: '-pthread'
+
+2015-06-04 15:01:16 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	  gl/window/dispmanx: fix compiler warning
+
+2015-06-04 12:16:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.h:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.h:
+	  gl/window: use the default main loop implementation for all backends
+	  fixes glimagsink being unable to display.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750337
+
+2015-06-03 21:22:09 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  glwindow_cocoa: use parent default implementation
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=750337
+
+2015-06-03 20:03:37 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstmpdparser.c:
+	  mpdparser: Add the startNumber as offset to the segment index when using a template
+
+2015-06-03 16:59:44 +0200  Santiago Carot-Nemesio <sancane@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsdec.h:
+	  dtlsdec: Fix critical warning "got data flow before stream-start event"
+	  Forward sticky events on requested src pad.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750348
+
+2015-06-03 15:25:10 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: remove useless value assignments
+	  In all these cases ret is set but overwritten before the return of the function
+
+2015-06-03 14:44:31 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/camerabin2/gst-camerabin2-test.c:
+	  examples: gst-camerabin2-test: protect from division by zero
+	  Highly unlikely to have 0 captures, but protect from crashes in the future by
+	  doing none of the math if there is no data.
+
+2015-06-02 20:57:34 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: lower curl requirement to 7.35.0
+	  Build and unit tests were tested against 7.35 too now,
+	  which is the version in Ubuntu 14.04.
+
+2015-06-02 16:40:25 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: do not access variable after unref
+	  Data might not exist anymore
+
+2015-06-02 15:45:13 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiointerleave.c:
+	  tests: audiointerleave: test not setting positions
+	  Disable "channel-positions-from-input", but without actually giving
+	  a position table, so every position should be NONE
+
+2015-06-02 15:44:57 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiointerleave.c:
+	  tests: Fix indentation in audiointerleave test
+
+2015-06-02 11:31:00 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* ext/zbar/gstzbar.c:
+	  zbar: don't ignore zbar_scan_image() errors
+
+2015-06-03 00:31:42 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: Set new sync point when copying
+	  Set a new sync point when copying instead of
+	  transferring the (non-refcounted) GL sync object
+	  from the source meta.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750279
+
+2015-06-02 23:59:50 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: Add some debug output
+
+2015-06-02 16:02:37 +0200  Edward Hervey <edward@centricular.com>
+
+	* tests/check/elements/asfmux.c:
+	* tests/check/elements/faac.c:
+	* tests/check/elements/faad.c:
+	* tests/check/elements/h263parse.c:
+	* tests/check/elements/hlsdemux_m3u8.c:
+	* tests/check/elements/jpegparse.c:
+	* tests/check/elements/kate.c:
+	* tests/check/elements/mpeg2enc.c:
+	* tests/check/elements/mpeg4videoparse.c:
+	* tests/check/elements/mpegvideoparse.c:
+	* tests/check/elements/mplex.c:
+	* tests/check/elements/opus.c:
+	* tests/check/elements/rtponvif.c:
+	* tests/check/elements/timidity.c:
+	* tests/check/elements/voaacenc.c:
+	* tests/check/elements/voamrwbenc.c:
+	* tests/check/libs/h264parser.c:
+	* tests/check/libs/mpegts.c:
+	* tests/check/libs/mpegvideoparser.c:
+	* tests/check/libs/vc1parser.c:
+	* tests/check/libs/vp8parser.c:
+	* tests/check/pipelines/simple-launch-lines.c:
+	* tests/check/pipelines/streamheader.c:
+	  check: Use GST_CHECK_MAIN () macro everywhere
+	  Makes source code smaller, and ensures we go through common initialization
+	  path (like the one that sets up XML unit test output ...)
+
+2015-06-02 10:21:42 +0900  Vineeth TM <vineeth.tm@samsung.com>
+
+	* gst/videosignal/gstsimplevideomark.c:
+	  simplevideomark: fix display of videomark partially or fully outside video
+	  In case of the videomark being partially or fully outside, an error was being
+	  thrown saying the mark width is more than video width. And when the width,
+	  offset properties are set to maximum it resulted in crash. Instead of throwing
+	  an error, add logic to detect the mark in case of partial visibility or don't
+	  show the mark when it is outside.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743908
+
+2015-03-24 15:17:16 +0100  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: enable Chinese AVS video stream
+	  Chinese broadcaster encapsulate AVS video codec into MPEG2-TS. They
+	  use the stream_id 0x42 to identify AVS video streams. It should be noted
+	  that this id is currently within the ISO reserved range, hence it's
+	  utilisation is unofficial.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=727731
+
+2015-06-02 17:24:18 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: provide compatibility definition for GLES2 for GL_RGBA8
+
+2015-06-02 16:32:03 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfiltershader.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  gl: consolidate internal_rgba_format into glmemory
+	  Expose some useful value format conversion functions available in
+	  GstGLMemory.
+
+2015-06-01 19:43:20 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiointerleave.c:
+	  audiointerleave: Always have "channels" be the actual pad count
+	  Don't force it anywhere
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750252
+
+2015-06-01 19:42:49 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiointerleave.c:
+	  audiointerleave: Use the channel count from the set caps
+	  This is the same number that was used to allocate the buffer
+
+2015-06-01 18:50:14 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Document that the latency is in ns
+
+2015-06-01 20:03:22 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  amc: Only lower ranks of OMX.Exynos. audio codecs, the video codecs are actually working
+
+2015-06-01 19:40:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  amc: Give marginal rank to codecs that start with OMX.Exynos.
+	  OMX.Exynos. codecs are existing on some devices like the
+	  Galaxy S5 mini, and cause random crashes (of the device,
+	  not the app!) and generally misbehave. That specific device
+	  has other codecs that work with a different name, but let's
+	  just give them marginal rank in case there are devices that
+	  have no other codecs and these are actually the only working
+	  ones
+
+2015-06-01 19:23:01 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Give lower ranks to codecs not starting with OMX.
+	  On some devices there are codecs that don't start with OMX., while
+	  there are also some that do. And on some of these devices the ones
+	  that don't start with OMX. just crash during initialization while
+	  the others work. To make things even more complicated other devices
+	  have codecs with the same name that work and no alternatives.
+	  So just give a lower rank to these non-OMX codecs and hope that
+	  there's an alternative with a higher rank.
+	  Also stagefright gives codecs starting with OMX. a higher rank too and
+	  considers other codecs that don't start with OMX. as software codecs.
+
+2015-06-01 11:12:22 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* tests/check/elements/zbar.c:
+	  tests: zbar: check for frame field on attach-frame=true
+	  Also check for the sample to have a buffer and caps
+	  associated with it.
+	  Related to:
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747557
+
+2015-05-20 15:04:40 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: Require width and height field for H264
+	  This decoder does not work if width and height field are not set
+	  in the sinkpad caps. Let's make this explicit by adding them to
+	  the template caps.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749655
+
+2015-06-01 14:07:37 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gpuprocess/gstglcontext_gpu_process.c:
+	  glcontext_gpu_process: close the window when done
+
+2015-06-01 14:05:58 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gpuprocess/gstglwindow_gpu_process.c:
+	  glwindow_gpu_process: avoid empty struct
+
+2015-06-01 12:58:11 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: move main loop/context creation back to init/finalize
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=750199
+
+2015-06-01 14:05:06 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/gl/gtk/gstgtk.c:
+	  examples: Fix gl usage without wayland support
+	  Not all platforms have wayland support. Handle that gracefully at
+	  compile time
+
+2015-06-01 13:55:20 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/rtmp/gstrtmpsink.c:
+	  rtmpsink: Initialize GstMapInfo
+	  Avoids doing a call to unmap with it uninitialized
+	  CID #1302834
+
+2015-06-01 12:51:46 +0100  Luis de Bethencourt <luisbg@osg.samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: clean dereferences of private structure
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742875
+
+2015-04-25 22:55:28 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: fix keyframe request race condition
+	  It is incorrect to modify the frame properties after passing them, since
+	  VTCompressionSessionEncodeFrame takes reference and we have no control
+	  over when it's being used.
+	  In fact, the code can be simplified. We just preallocate the frame
+	  properties for keyframe requests, and pass NULL otherwise.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748467
+
+2015-06-01 11:56:13 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	* gst/audiovisualizers/gstaudiovisualizer.h:
+	  audiovisualizer: make private all variable subclasses don't need
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742875
+
+2015-05-01 23:20:30 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* ext/zbar/gstzbar.c:
+	* ext/zbar/gstzbar.h:
+	  zbar: add frame sample to barcode message
+	  New attach-frame property enables barcode frame
+	  dumping when set to true.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747557
+
+2015-05-31 21:30:23 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	  gl: Fix compiler warning
+	  gstglwindow_wayland_egl.c:246:41: error: unused variable 'surface_listener' [-Werror,-Wunused-const-variable]
+	  static const struct wl_surface_listener surface_listener = {
+	  ^
+
+2015-05-27 23:34:14 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcaudiodec.h:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideodec.h:
+	* sys/androidmedia/gstamcvideoenc.c:
+	* sys/androidmedia/gstamcvideoenc.h:
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Conditionally use get_{input,output}_buffer() Android 21 APIs
+	  Also properly set limit/position on byte buffer, some codecs prefer to have
+	  correct values there.
+
+2015-05-31 16:53:14 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: fix compiler error
+	  gstglwindow.c:1118:544: error: 'return' with no value, in function returning non-void [-Werror]
+	  g_return_if_fail (GST_GL_IS_WINDOW (window));
+
+2015-05-31 15:42:48 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/gtk/filternovideooverlay/main.cpp:
+	* tests/examples/gl/gtk/filtervideooverlay/main.cpp:
+	  gl/examples: update gtk examples for glupload
+
+2015-05-31 15:40:15 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/gtk/filtervideooverlay/main.cpp:
+	* tests/examples/gl/gtk/switchvideooverlay/main.cpp:
+	  gl/examples: update gtk examples for wayland
+
+2015-05-29 18:06:27 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	  gl/wayland: implement setting the render rectangle
+	  Places our subsurface at the rectangle provided position
+
+2015-05-29 18:03:52 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	  glwindow: handle gst_video_overlay_set_render_rectangle
+
+2015-05-29 18:01:29 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/wayland_event_source.c:
+	  gl/wayland: don't block the event loop after poll
+	  Use the dispatch_pending set of functions which just run the currently
+	  queued up events instead of potentially waiting for an event to occur.
+
+2015-05-27 16:42:55 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/gtk/gstgtk.c:
+	* tests/examples/gl/gtk/gstgtk.h:
+	  tests/gl/gtk: implement setting a wayland display/surface
+
+2015-05-27 16:39:06 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/wayland/gstgldisplay_wayland.c:
+	* gst-libs/gst/gl/wayland/gstgldisplay_wayland.h:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	  gl/wayland: implement basic video overlay support via subsurfaces
+	  Currently does not position the subsurface relative to the parent surface at all
+
+2015-05-27 15:44:33 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/wayland_event_source.c:
+	  gl/wayland: allow a NULL wl_event_queue
+	  perform operations on the default wl_display event queue in that case
+
+2015-05-27 15:43:06 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglutils.c:
+	  gl/utils: implement wayland display GstContext
+	  requried for sharing GL contexts or subsurface support
+
+2015-05-22 16:07:49 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	* gst-libs/gst/gl/wayland/wayland_event_source.c:
+	* gst-libs/gst/gl/wayland/wayland_event_source.h:
+	  gl/wayland: run each window on a separate queue
+	  Based on patch by Julien Isorce <julien.isorce@collabora.co.uk>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=709747
+
+2015-05-30 02:19:25 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl: Don't leak temp strings in _RGB_pixel_order()
+	  Fix a memory leak of temporary strings when computing
+	  swizzling of RGB formats.
+
+2015-05-30 02:29:47 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: Add transform_internal_caps() vfunc
+	  Add a vfunc that is called by glfilter before it sets
+	  caps features and intersects with the peer caps, and
+	  move removing the size from caps into its default
+	  implementation. Allows sub-classes to do more
+	  sophisticated management of the size fields in case they
+	  don't support arbitrary resizing or have distinct
+	  preferences.
+
+2015-05-30 02:23:44 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: Don't remove size fields from caps
+	  Instead of removing size fields, set them to the full range
+	  like videoscale does, so the caps are clearly unfixed in
+	  all cases.
+
+2015-05-10 18:55:16 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	  videoaggregator: Add class property to disable caps scaling
+	  Add preserve_update_caps_result boolean on the class to allow
+	  sub-classes to disable videoaggregator removing sizes and framerate
+	  from the update_caps() return result.
+
+2015-05-04 18:17:21 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Catch errors, and allow sub-class to return NULL from get_output_buffer()
+	  A return value of GST_FLOW_OK with a NULL buffer from get_output_buffer()
+	  means the sub-class doesn't want to produce an output buffer, so
+	  skip it.
+	  If gst_videoaggregator_do_aggregate() generates an error, make sure
+	  to propagate it - don't just ignore and discard the error by
+	  over-writing it with the gst_pad_push() result.
+
+2015-05-29 16:02:31 +0300  Vivia Nikolaidou <vivia@toolsonair.com>
+
+	* ext/rtmp/gstrtmpsink.c:
+	* ext/rtmp/gstrtmpsink.h:
+	  rtmpsink: Do not crash when receiving buffers after GST_FLOW_ERROR
+	  If the RTMP URI is invalid, the rtmpsink will return GST_FLOW_ERROR.
+	  If it still receives buffers after that, it shouldn't crash.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750104
+
+2015-05-29 09:01:29 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: avoid assertion when splitting buffer
+	  Pass size=-1 as is if that is the case instead of subtracting
+	  the offset. Otherwise we have an invalid size passed for that
+	  buffer.
+
+2015-05-28 15:59:02 +0200  Santiago Carot-Nemesio <sancane@gmail.com>
+
+	* ext/dtls/gstdtlssrtpdec.c:
+	  dtlssrtpdec: Release requested pads
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750036
+
+2015-05-28 15:57:10 +0200  Santiago Carot-Nemesio <sancane@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Remove unnecessary ref/unref operations
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750036
+
+2015-05-28 15:55:03 +0200  Santiago Carot-Nemesio <sancane@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Fix release request pad function
+	  Don't unref the pad reference we don't own and just remove the pad.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750036
+
+2015-05-28 14:30:46 +0200  Edward Hervey <edward@centricular.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Search more when advancing fragment
+	  In live situations, it is not uncommon for the current fragment to end
+	  up out of the (updated) play range (lowest/highest sequence). But the next
+	  fragment to play *is* present in the play range.
+	  When advancing, if we can't find the current GstM3U8MediaFile, don't abort
+	  straight away. Instead, look if a GstM3U8MediaFile with the next sequence value
+	  is present, and if so switch to it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=750028
+
+2015-05-27 10:58:10 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* configure.ac:
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gpuprocess/Makefile.am:
+	* gst-libs/gst/gl/gpuprocess/gstglcontext_gpu_process.c:
+	* gst-libs/gst/gl/gpuprocess/gstglcontext_gpu_process.h:
+	* gst-libs/gst/gl/gpuprocess/gstglwindow_gpu_process.c:
+	* gst-libs/gst/gl/gpuprocess/gstglwindow_gpu_process.h:
+	* gst-libs/gst/gl/gstglapi.c:
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl: add GstGLContextGPUProcess backend
+	  It builds its GL vtable from a proc address provided
+	  by the application.
+
+2015-05-27 16:28:39 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfiltershader.c:
+	* gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  gl: add and use gst_gl_internal_format_rgba
+	  Previously when compiling GstGL with both GL and GLES2,
+	  GL_RGBA8 was picked from GL/gl.h. But a clash may happen at
+	  runtime when one is selecting GLES2.
+	  gst_gl_internal_format_rgba allows to check at runtime
+	  if it should use GL_RGBA or GL_RGBA8.
+
+2015-05-27 14:10:16 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.h:
+	  glwindow_x11: use parent default implementation
+
+2015-05-27 11:16:32 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  glcontext_glx: rename variable from window to context
+
+2015-05-27 11:11:55 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: initialize debug in class_init
+	  Useful if one uses gst_gl_window_x11_new directly
+	  instead of gst_gl_window_new.
+
+2015-05-27 11:07:38 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: initialize debug in class_init
+	  Useful if one uses gst_gl_context_egl_new directly
+	  instead of gst_gl_context_new.
+
+2015-05-27 10:55:20 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  glcontext: add gst_gl_context_set_display helper
+
+2015-05-27 15:25:40 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.h:
+	  glcontext: add missing _CAST after G_TYPE_CHECK_CLASS
+
+2015-05-27 10:51:54 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.h:
+	  glwindow: add missing _CAST after G_TYPE_CHECK_CLASS
+
+2015-05-26 18:38:39 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: provides some default implementations to factorize with all backends
+
+2015-05-28 00:59:39 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Push EOS on error return.
+	  Before shutting down the srcpad task due to a
+	  downstream error, push an EOS to give downstream
+	  a chance to shut down somewhat cleanly.
+
+2015-05-27 13:12:57 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: don't overwrite value
+	  Value of res is reset to FALSE in each iteration of the while loop. We want to
+	  conserve TRUE if any pad event succeeded until we arrive to done.
+	  Also, buf is set to the value of *outbuf twice. Removing the first assignment
+	  since the second one is outside of a conditional.
+
+2015-05-27 13:08:46 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opencv/gstretinex.c:
+	  opencv: 'for' loop initial declaration
+	  'for' loop initial declarations are not allowed in C89, moving the declarations
+	  to before the 'for' loops.
+
+2015-05-27 13:05:11 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/gl/gstgleffects.c:
+	  gleffects: 'for' loop initial declaration
+	  'for' loop initial declarations are not allowed in C89, moving the declarations
+	  to before the 'for' loops.
+
+2015-05-27 12:03:42 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/resindvd/gstmpegdemux.c:
+	  resindvd: remove unused value
+	  The data variable is incremented but never read again. Remove the unused value
+	  assignment.
+
+2015-05-27 06:17:49 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: remove more unused attributes
+	  Those are not used or only read
+
+2015-05-27 05:35:30 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: remove unused attribute
+	  It is never read for anything useful
+
+2015-05-26 16:47:47 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: fix a leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749846
+
+2015-05-26 15:10:28 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: properly handle errors while loading file
+	  Post an error on the bus if anything bad happens while reading
+	  and parsing the image file.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749846
+
+2015-05-26 15:04:34 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgloverlay.h:
+	  gloverlay: remove unused type_file field
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749846
+
+2015-05-26 15:01:37 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: propagate return value from filter and filter_texture
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749846
+
+2015-05-26 16:39:59 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/dvbsuboverlay/dvb-sub.c:
+	  dvbsuboverlay: remove unused assignment
+	  buf is incremented just before returning, this new value is never used.
+	  Removing unused assignment.
+
+2015-05-26 15:24:52 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: 'for' loop initial declaration
+	  'for' loop initial declarations are only allowed in C89, moving the declaration
+	  to before the 'for' loop.
+
+2015-05-26 14:14:34 +0100  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/gaudieffects/gstexclusion.c:
+	  exclusion: exception when set factor to 0
+	  When factor property is set to 0, transform just returns.
+	  Adjust the minimum value to 1.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743907
+
+2015-05-26 12:47:40 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgleffects.c:
+	  gleffects: properly initialize the shaders across contexts implementing multiple API's
+
+2015-05-26 12:44:47 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectssources.c:
+	  gleffects_laplacian: fix shader compilation in gl3/gles2
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748393
+
+2015-05-25 12:33:50 +0200  Patricia Muscalu <patricia@axis.com>
+
+	* configure.ac:
+	* ext/curl/gstcurlbasesink.c:
+	* ext/curl/gstcurlbasesink.h:
+	  curlsink: handle socket callback for active FTP connections as well
+	  Since version 7.28.0, libcurl allows application to set
+	  socket options for active FTP connections.
+	  Bump libcurl requirement to version tested.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749815
+
+2015-05-20 12:08:38 +0100  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Fix segfault introduced by segment iteration refactoring (2105a310).
+	  The functions to get the next fragment, next fragment timestamp and to advance
+	  to the next fragment need to work differently when stream->segments is NULL.
+	  Use logic similar to that introduced by commit 2105a310 to perform these
+	  functions.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749684
+
+2015-05-18 22:33:50 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: use signed integet to represent segment index
+	  We need to be able to represent -1 to check when we are EOS
+	  on reverse playback and unsigned integer won't allow that.
+	  CID #1298193
+	  CID #1298194
+	  CID #1298195
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749534
+
+2015-05-25 10:30:55 +0900  Suhwang Kim <suhwang.kim@lge.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix outdated example launch line
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749809
+
+2015-05-22 13:12:09 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/wayland_event_source.c:
+	  gl/wayland: remove dead event source code
+
+2015-05-21 17:48:31 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/wayland/Makefile.am:
+	* gst-libs/gst/gl/wayland/gstgldisplay_wayland.c:
+	* gst-libs/gst/gl/wayland/gstgldisplay_wayland.h:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	  gl/wayland: add GstGLDisplayWayland
+	  Simple implementation split from GstGLWindowWayland
+	  Can now have multiple glimagesink elements all displaying output
+	  linked via GL or otherwise (barring GL platform limitations).
+	  The intel driver is racy and can crash setting up the two glimagesink contexts.
+	  e.g.
+	  videotestsrc ! tee name=t ! queue ! glupload ! glimagesinkelement
+	  t. ! queue ! gleffects_blur ! glimagesinkelement
+	  videotestsrc ! glupload ! glfiltercube ! tee name=t ! queue ! glimagesinkelement
+	  t. ! queue ! gleffects_blur ! glimagesinkelement
+
+2015-05-25 17:27:58 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: fix DrawElements call for element array buffers
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749734
+
+2015-05-23 01:00:18 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/calayer: provide the exact GL api version for the wrapped context
+	  Otherwise we could end up being mistaken for the diference between a
+	  gl3 and a gl2 context resulting in a failure getting the list of
+	  extensions from the wrapped context due to the difference between
+	  glGetString and glGetStringi for the GL_EXTENSIONS token.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749728
+
+2015-05-22 02:40:37 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: remove unnecessary semicolon
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749691
+
+2015-05-21 15:30:34 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl: win32: do not call SetParent in release_parent_win_id()
+	  When called from gst_gl_window_win32_close(), internal window
+	  could not exist, and if it does it's going to be destroyed just
+	  after that anyway. Also it causes window_proc() to be called
+	  and crash because it gets a NULL context.
+	  When called from gst_gl_window_win32_set_window_handle() we are
+	  going to set another parent anyway, and it's probably better to
+	  reparent directly instead of passing by a NULL parent which could
+	  cause the internal window to popup briefly.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-21 15:30:00 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl: win32: remove unused code
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-20 17:09:21 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl: win32: fix crash when finalizing GstGLContext
+	  gst_gl_context_finalize() is calling gst_gl_window_win32_quit()
+	  which was posting a message. But then window_proc takes window's
+	  context and get a NULL.
+	  Now that we've got a GMainLoop we can do like other backends and
+	  simply call g_main_loop_quit().
+	  This also remove duplicated code to release the parent window and
+	  potential crash there because parent_proc could be NULL if we never
+	  created the internal window. That could happen for example if setting
+	  state to READY then setting a window_handle, and go back to NULL state.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-20 17:06:42 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl: win32: Fix leaked GstGLContext
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-20 15:30:49 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl: win32: set the parent window when creating internal window
+	  When _set_window_handle() was called in READY state, it wasn't
+	  set to the internal window created later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-20 15:29:50 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/win32/Makefile.am:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.h:
+	* gst-libs/gst/gl/win32/win32_message_source.c:
+	* gst-libs/gst/gl/win32/win32_message_source.h:
+	  gl: win32: use a GMainContext to dispatch win32 messages
+	  gst_gl_window_win32_send_message_async() could be called before the
+	  internal window is created so we cannot use PostMessage there.
+	  x11 and wayland backends both create a custom GSource for this,
+	  so there is no reason to not do that for win32.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749601
+
+2015-05-22 00:27:36 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Don't leak all memory uploaded via raw uploads.
+	  Remove an extra ref missed when switching over to not
+	  reusing output textures
+
+2015-05-21 16:24:48 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* gst/compositor/compositor.c:
+	  compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
+	  Otherwise we divide by zero.
+
+2015-05-21 16:19:08 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Fix double assignment
+
+2015-05-21 15:05:33 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: require a shader version to initialize.
+	  It's very near pointless to try our GL implementation without shaders.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749284
+
+2015-05-20 02:38:53 +1000  Jan Schmidt <jan@centricular.com>
+
+	* tests/examples/gl/generic/cube/Makefile.am:
+	* tests/examples/gl/generic/cubeyuv/Makefile.am:
+	* tests/examples/gl/generic/doublecube/Makefile.am:
+	  Fix flags order in GL examples for uninstalled build
+
+2015-05-20 01:57:52 +1000  Jan Schmidt <jan@centricular.com>
+
+	* sys/wasapi/Makefile.am:
+	  wasapi: Fix flags order for uninstalled build
+
+2015-05-21 00:56:01 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* gst/compositor/compositor.c:
+	  compositor/glvideomixer: fix up par handling
+	  We were using the wrong formula
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749634
+
+2015-04-17 15:36:49 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Consider SEI NALU as "HEADER" packets
+	  Like SPS/PPS they do contain information which will be needed to
+	  decode the following data (as per definition of the flag)
+	  Also ensures that the series of SPS/PPS/SEI NALU before a keyframe
+	  can be considered as one contiguous header
+
+2015-04-17 15:35:43 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mpegtsmux/mpegtsmux.h:
+	  mpegtsmux: Carry over GST_BUFFER_FLAG_HEADER
+	  In the same way we do it for the DELTA_UNIT flag
+	  This allows downstream elements to know whether a given mpeg-ts
+	  packet contains a corresponding HEADER elementary unit
+
+2015-05-20 12:11:31 +0200  Thijs Vermeir <thijs.vermeir@barco.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: Only copy VPS/SPS/PPS NAL units in header buffer
+	  Previously the VPS unit was detected and all next packets where copied
+	  into the header buffer assuming only SPS and PPS would follow.  This is
+	  not always true, also other types of NAL units follow the VPS unit and
+	  where copied to the header buffer. Now the VPS/SPS/PPS are explicitely
+	  detected and copied in the header buffer.
+
+2015-05-20 11:27:25 +0200  Thijs Vermeir <thijs.vermeir@barco.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: Fix tune parameter mismatch
+	  There was a mismatch between the tune parameter in x265 and the enum
+	  used in this element. The value in the enum is the x265 tune
+	  parameter + 1.
+
+2015-05-19 18:02:30 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcaudiodec.h:
+	  amcaudiodec: Add an output adapter for chunking the output into codec frames
+	  Otherwise the base class will be confused.
+	  See https://bugzilla.gnome.org/show_bug.cgi?id=685730
+
+2015-05-19 10:43:28 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	  gl: fix crash on windows with intel driver
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749430
+
+2015-05-20 00:50:37 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: static const the indices array
+	  the contents will never change anyway.
+
+2015-05-20 00:28:52 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.h:
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: correctly use the sync meta across multiple contexts
+	  1. Set the sync point after the (possible) upload has occured
+	  2. Wait in the correct GL context (the draw context)
+	  Note: We don't add the GL sync meta to the input buffer as it's not
+	  writable and a copy would be expensive.
+	  Similar to the change with the same name for glimagesink
+
+2015-05-20 00:28:07 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.h:
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: update for GL3 element array buffer usage
+	  fixes blank output
+
+2015-05-19 16:22:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: correctly use the sync meta across multiple contexts
+	  1. Set the sync point after the (possible) upload has occured
+	  2. Wait in the correct GL context (the draw context)
+	  Note: We don't add the GL sync meta to the input buffer as it's not
+	  writable and a copy would be expensive.
+
+2015-05-19 16:19:41 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/calayer: provide a current wrapped GstGLContext for callbacks
+	  So that the draw and resize callbacks can get the current GstGLContext.
+
+2015-05-19 16:14:39 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: ensure that the Fence is going to be executed
+	  Otherwise it could stay client side without being submitted to the GL
+	  server resulting in another context waiting on a Fence that will never
+	  become signalled causing a deadlock.
+
+2015-05-19 11:47:23 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: don't reuse output textures for raw data upload
+	  Causes stale textures to be used further down the chain.
+
+2015-05-19 11:11:02 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	  glframebuffer: don't clear the framebuffer
+	  Breaks attempting to blend with the destination buffer and should be done
+	  explicitly by the callback anyway.
+
+2015-05-19 11:09:54 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  glbasefilter: track gl_start/stop correctly
+	  Don't start multiple times without calling gl_stop.
+
+2015-05-18 20:16:32 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/compositor/compositor.c:
+	  Revert "doc: Workaround gtkdoc issue"
+	  This reverts commit ff6c736fe08e01f4320c4b02e811a0b57cf97cc1.
+	  This is fixed by the gtk-doc 1.23 release.
+	  <para> cannot contain <refsect2>:
+	  http://www.docbook.org/tdg/en/html/para.html
+	  http://www.docbook.org/tdg/en/html/refsect2.html
+
+2015-05-14 02:11:50 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	  hlsdemux: Simplify logic in process_manifest
+	  Simplify logic in process_manifest and remove a TODO item.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749328
+
+2015-05-18 14:12:56 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/opencv/gstcvsmooth.c:
+	* ext/opencv/gstcvsmooth.h:
+	  cvsmooth: rename properties
+	  The properties are named as param1 to param4, which makes very little sense
+	  hence renamed the properties according to what it is doing.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749523
+
+2015-05-18 14:01:59 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/opencv/gstcvsmooth.c:
+	  cvsmooth: Wrong assignment of prop leads to crash
+	  when setting param2 property, it is wrongly being assigned to param1.
+	  This leads to wrong behavior and a crash when param2 is set as 0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749523
+
+2015-05-18 14:30:19 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/opencv/gstpyramidsegment.c:
+	  pyramidsegment: wrong value of level property
+	  The property level has a minimum value of 0. But when we set the level as 0,
+	  it gets an assertion error. The function icvPyrSegmentation8uC3R returns false
+	  if level is set as 0, since the minimum level cant be 0 and thus results in error.
+	  Hence changing the minimum value to 1.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749525
+
+2015-05-16 23:38:14 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/compositor/compositor.c:
+	  doc: Workaround gtkdoc issue
+	  With gtkdoc 1.22, the XML generator fails when a itemizedlist is
+	  followed by a refsect2. Workaround the issue by wrapping the
+	  refsect2 into para.
+
+2015-05-06 15:17:24 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix buffer timestamp not being in stream time
+	  Timestamps should start at the segment start, rather than 0, so
+	  we need to not subtract the first timestamp. This makes the sink
+	  correctly account for running time when switching PMTs where a
+	  stream starts not quite at zero, causing timing offsets that can
+	  become noticeable and causing dropped frames after a few times.
+
+2015-05-06 15:16:37 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: accumulate previous segment base time
+
+2015-04-24 12:56:02 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  tsdemux: fix refcounting when applying a new PMT
+	  A new program object is created to replace an existing one
+	  in the programs hash table, so its refcount needs to match.
+	  With the default of 0 refcount on creation, the next PAT
+	  change will cause that refcount to be both incremented and
+	  decremented (assuming the new PAT references that stream too),
+	  which will cause the program to be destroyed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748412
+
+2015-05-14 16:06:55 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpenc.c:
+	  dtls: Fix memory leak
+	  Keys were not correctly released when it was get as a property
+	  nor when a second key was received
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749380
+
+2015-05-14 21:21:01 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: free the vertex buffer when done
+	  fixes a memory leak
+
+2015-01-22 18:00:36 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  glcontext/cocoa: implement GL3 core context selection
+
+2015-05-14 18:35:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglcontext.c:
+	  tests/gl: fix typo
+
+2015-05-14 16:42:09 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectblur.c:
+	* ext/gl/effects/gstgleffectbulge.c:
+	* ext/gl/effects/gstgleffectfisheye.c:
+	* ext/gl/effects/gstgleffectglow.c:
+	* ext/gl/effects/gstgleffectlaplacian.c:
+	* ext/gl/effects/gstgleffectlumatocurve.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectrgbtocurve.c:
+	* ext/gl/effects/gstgleffectsin.c:
+	* ext/gl/effects/gstgleffectsobel.c:
+	* ext/gl/effects/gstgleffectsquare.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/effects/gstgleffectstretch.c:
+	* ext/gl/effects/gstgleffecttunnel.c:
+	* ext/gl/effects/gstgleffecttwirl.c:
+	* ext/gl/effects/gstgleffectxray.c:
+	* ext/gl/gltestsrc.c:
+	* ext/gl/gstgldeinterlace.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* tests/check/libs/gstglcontext.c:
+	* tests/check/libs/gstglupload.c:
+	  gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
+	  We are using shaders everywhere and so they are not needed
+
+2015-05-14 15:10:59 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: cleanup properties
+	  remove unused "display-name"
+	  ensure defaults between the bin/element are the same
+
+2015-05-14 14:56:30 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgleffects.c:
+	  gleffects: only try the GL2 shader init path if we have a GL2 context
+
+2015-05-12 22:04:26 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	  glshader: attempt to detect the gles2 inside opengl3 case
+	  This is necessary to use gles2 shaders in a GL 3 core context on
+	  OS X which fails without a proper #version being set on the shaders.
+
+2015-05-12 17:55:43 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	  glshader: remove references to gl3 specific shaders
+	  We rely specifically on gles2 shaders being supported by the GL
+	  implementation with GL3 core profile.
+
+2015-05-01 12:04:28 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfiltercube.h:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgloverlay.h:
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  gl: element buffers are part of vao state
+	  Use them as such.  They are also required for GL3 core profile support
+	  with glDrawElements on OS X.
+
+2015-05-07 12:25:10 +0700  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: properly detect (hopefully) the correct ext_rg/arb_rg variant
+	  GL_EXT_texture_rg is only valid for GLES2. GLES3 uses similar wording to
+	  the GL_ARB_texture_rg which requires a sized internal format that the
+	  GL_EXT_texture_rg does not require.
+	  https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_rg.txt
+	  https://www.opengl.org/registry/specs/ARB/texture_rg.txt
+
+2015-05-14 13:04:21 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/compositor/compositor.c:
+	  compositor: implement proper par handling
+	  We were previously failing on different input and output par
+
+2015-05-12 13:41:19 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: avoid busy-looping when waiting for new fragment
+	  When all fragments have already been downloaded on a live stream
+	  dashdemux would busy loop as the default implementation of
+	  has_next_fragment would return TRUE. Implement it to correctly
+	  signal if adaptivedemux should wait for the manifest update before
+	  trying to get new fragments.
+
+2015-05-11 14:19:20 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: Improve live stream manifest update repositioning
+	  When updating the manifest the timestamps on it might have changed a little
+	  due to rounding and timescale conversions. If the change makes the timestamp
+	  of the current segment to go up it makes dashdemux reposition to the previous
+	  one causing one extra unnecessary download.
+	  So when repositioning add an extra 10 microseconds to cover for that rounding
+	  issues and increase the chance of falling in the same segment.
+	  Additionally, also improve the time used when the client is already after the
+	  last segment. Instead of using the last segment starting timestamp use the
+	  final timestamp to make it reposition to the next one and not to the one that
+	  has already been downloaded.
+
+2015-05-11 12:30:03 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: add more protection when acessing gptrarray entries
+	  The glib structure doesn't do range checking so we have to do it
+	  ourselves.
+	  Also adds some more debugging messages
+
+2015-05-08 16:58:36 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: remove unused functions
+	  These functions of directly getting and setting segment indexes
+	  are no longer useful as now we need 2 indexes: repeat and segment
+	  index.
+	  The only operations needed are advance_segment, going back to the
+	  first one or seeking for a timestamp.
+
+2015-05-08 16:49:02 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: reuse seeking function to reduce repeated code
+	  Instead of writing a seek routine, just use the mpdparser function.
+	  Also remove function that is not needed anymore
+
+2015-05-08 16:31:44 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: refactor segment iteration for better performance
+	  Segments are now stored with their repeat counts instead of spanding
+	  them to multiple segments. This caused advancing to the next segment
+	  using a single index to have to iterate over the whole list every time.
+	  This commit addresses this by storing both the segment index as well
+	  as the repeat index and makes advancing to next segment just an
+	  increment of the repeat or the segment index.
+
+2015-05-07 16:30:48 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: improve mpd parsing for repeated segment entries
+	  Use a single segment to represent it internally to avoid using too
+	  much memory. This has the drawback of issuing a linear search to
+	  find the correct segment to play but this can be fixed by using
+	  binary searches or caching the current position and just looking
+	  for the next one.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748369
+
+2015-05-12 12:55:42 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: drop debug message that was wrong
+	  EOS doesn't necessarily mean that no fragment was downloaded
+
+2015-05-12 12:55:17 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: run gst-indent
+	  To allow commiting on this file cleanly
+
+2015-05-11 11:56:52 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: the parent is provided in the function
+	  No need to get it again
+
+2015-05-13 15:59:48 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	  dtlsenc: Fix memory leak releasing connection_id
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749318
+
+2015-05-13 15:33:49 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	  dtlsenc: Fix memory leak while setting connection-id
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749318
+
+2015-05-13 17:15:57 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Fix memory leak, release previous pem
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749322
+
+2015-05-13 16:06:52 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Fix memory leak on dispose
+	  Parent dispose function was not called
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749322
+
+2015-05-13 17:19:25 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	  dtlsconnection: Fix memory leak while setting closure
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749325
+
+2015-05-13 16:23:26 +0200  Wim Taymans <wtaymans@redhat.com>
+
+	* configure.ac:
+	  fix faad2 version check
+	  On fedora 22, the output of cpp inserts extra debug comments, which
+	  makes our regexp for the faad2 version check fail. This in turn causes
+	  it to compile with the wrong arguments passed which then causes stack
+	  corruption and crashes.
+	  Fix this by only checking for the version (which should be by itself on
+	  a single line). This is potentially less safe, it might be possible that
+	  a similar string would appear in a later version in the header file.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=748571
+
+2015-05-13 23:55:28 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: propagate the version/extension failure upwards
+	  Otherwise the calling code has no idea that the context failed to
+	  be created fully.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749284
+
+2015-05-13 23:54:52 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  gl: don't deadlock on context creation failure
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749284
+
+2015-05-13 15:42:15 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglmixerbin.c:
+	  glmixerbin: Don't unref pad templates
+	  Otherwise we unref the reference that is owned by the element class.
+
+2015-05-13 12:31:44 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: fix failure return values from create_session()
+	  create_session() returns an err_status_t with
+	  err_status_ok=0 and err_status_fail=1, so
+	  returning TRUE/FALSE is not quite right.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749304
+
+2015-05-13 13:14:14 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: fix over unlocking
+	  Called should call function with lock, and is
+	  also responsible for unlocking it later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749304
+
+2015-05-12 15:47:33 +0800  Lyon Wang <lyon.wang@freescale.com>
+
+	* gst/videoparsers/h263parse.c:
+	  h263parse: fix custom picture format (CPFMT) parsing
+	  In the H263 spec, CPFMT is present only if the use of a custom
+	  picture format is signalled in PLUSEPTYPE and UFEP is "001",
+	  so we need to check params->format and only if the value is
+	  6 (custom source format) the CPFMT should be read, otherwise
+	  it's not present and wrong data will be parsed.
+	  When reading the CPFMT, the width and height were not
+	  calculated correctly (wrong bitmask).
+	  https://bugzilla.gnome.org//show_bug.cgi?id=749253
+
+2015-05-13 17:38:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst/compositor/compositor.c:
+	* tests/check/elements/compositor.c:
+	  compositor: fix rectangle obscure test to clamp against the output frame size
+	  Rather than one of the input pad video info's.
+	  The test checking this was not constraining the output frame size
+	  to ensure that the out of frame stream was not being displayed.
+
+2015-05-13 17:11:55 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: implement par handling
+	  We were previously ignoring it completely
+
+2015-05-13 17:10:42 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: don't upload the vertex data every frame
+	  Add the missing cache tracking statement.
+
+2015-05-12 16:36:58 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/gl/gstgluploadelement.c:
+	  gluploadelement: Remove uneeded header and defines
+
+2015-05-11 15:02:02 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgltestsrc.c:
+	  gltestsrc: Use default get_caps implementation
+	  The custom code is wrong as it ignores the templates, which leads to
+	  missing fields in the result. Instead, simply use the default get_caps
+	  implementation which does it correctly (get the template, intersect
+	  with filter and return).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749237
+
+2015-05-11 15:54:52 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: Implement GstVideoAggregator::find_best_format()
+	  Without this, we will fixate weird pixel-aspect-ratios like 1/2147483647. But
+	  in the end, all the negotiation code in videoaggregator needs a big cleanup
+	  and videoaggregator needs to get rid of the software-mixer specific things
+	  everywhere.
+
+2015-05-11 22:53:09 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstopengl.c:
+	  gl: demote upload/convert/download elements to none
+	  Copy paste error
+
+2015-05-11 22:37:44 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstopengl.c:
+	  gl: expose internal glvideomixerelement\
+	  We might want more control over the exact pipeline
+	  Also reduces overhead
+
+2015-05-11 22:35:18 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstopengl.c:
+	  gl: expose internal glimagesinkelement
+	  We might want more control over the exact pipeline.
+	  Also reduces overhead.
+
+2015-05-07 21:18:27 +0200  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: fix unconditional buffer queue unlock
+	  Unless stopRequest is set, we should unlock conditionally -- otherwise,
+	  the 'create:' method can wake up to an empty buffer queue
+	  and pull a nil buffer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748054
+
+2015-05-11 12:18:28 +0200  Heinrich Fink <hfink@toolsonair.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Rename mode 2048p to 1556p
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749218
+
+2015-05-11 12:04:47 +0200  Heinrich Fink <hfink@toolsonair.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Use correct frame rate for mode 2160p50
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749218
+
+2015-05-11 12:02:47 +0200  Heinrich Fink <hfink@toolsonair.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Rename mode 3184p to 2160p
+	  https://bugzilla.gnome.org/show_bug.cgi?id=749218
+
+2015-01-22 15:43:22 +0100  Piotr Drąg <piotrdrag@gmail.com>
+
+	* po/POTFILES.in:
+	* po/POTFILES.skip:
+	  po: update POTFILES.skip and POTFILES.in
+	  The ones in .skip need to be added back to POTFILES.in
+	  after porting to 1.x.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743352
+
+2015-05-08 14:20:44 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/removesilence/gstremovesilence.c:
+	  removesilence: remove gst_remove_silence_reset()
+	  No need to call gst_remove_silence_reset() in gst_remove_silence_init() because
+	  vad_new() already calls this function. Since there are no more uses of
+	  _silence_reset(), we can remove it altogether.
+
+2015-05-08 14:55:28 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: We shouldn't manually check reconfigure flag on pads but instead implement ::negotiate()
+	  Add FIXME comment related to that.
+
+2015-05-08 13:54:06 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/asfmux/gstasfmux.c:
+	* gst/debugutils/fpsdisplaysink.c:
+	* gst/mxf/mxfdv-dif.c:
+	* gst/mxf/mxfmux.c:
+	* gst/videomeasure/gstvideomeasure_ssim.c:
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth265parse.c:
+	  Update references to decodebin
+	  Update old references for decodebin2 to decodebin.
+
+2015-05-08 13:49:38 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/removesilence/gstremovesilence.c:
+	  removesilence: update example launch line
+
+2015-05-07 21:04:30 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpdec.h:
+	  dtlssrtpdec: Don't merge RTP and RTCP streams that were just split by srtpdec
+	  The funnel has some overhead, and later rtpbin will have to split both streams
+	  again anyway.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748723
+
+2015-05-06 15:47:27 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
+	  This reverts commit d96e43b034a03fe54633907bc1bf2a26fe5f95fb.
+
+2015-05-06 15:47:20 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  Revert "Revert "glimagesink: forward ALL the properties on the bin""
+	  This reverts commit 59fb0f830f08e3e59f87f83df8fa3c2d9f3d9741.
+
+2015-05-06 15:47:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstopengl.c:
+	  Revert "Revert "glimagesink: implement as a bin""
+	  This reverts commit be938f92d94e8acccf593128281f6e09213600a0.
+
+2015-05-06 15:46:49 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstglcolorconvertelement.h:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  Revert "gl: readd glupload/download onto element pads"
+	  This reverts commit 87d8270f302b03f63ce04f986d824892a2c131fd.
+
+2015-05-06 15:43:32 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	* ext/gl/gstopengl.c:
+	  Revert "Revert "glvideomixer: implement with glmixerbin""
+	  This reverts commit b4bd11f2f3a60224d188b27ab55b278077cb1217.
+
+2015-05-06 12:59:33 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Actually set the caps on the srcpad instead of just calling the default event handler for the sinkpad
+	  Fixes up dafa11b9d21d06a0273007628a2a0bb4d7858658
+
+2015-04-29 18:23:31 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: only update stream position if query success
+	  We don't need to check about the query fail case.
+	  because it is update to segment position even though query fail.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748529
+
+2015-05-05 12:45:24 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  decklink: Disable decklink plugin on Android
+
+2015-05-05 14:44:25 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: fixup size declaration
+
+2015-05-04 23:42:36 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: handle the local_context query
+	  so that upstream elements can get the GL context from glimagesink
+
+2015-05-03 14:56:05 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Add suport for COLOR_FormatYV12
+	  Reference: http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747126
+
+2015-04-30 11:44:06 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	  androidmedia: Declare QOMX_COLOR_FORMATYVU420PackedSemiPlanar32mMultiView constant
+	  This color format is the same as QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m
+	  but stores two images one after the other in a top-bottom layout.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747126
+
+2015-05-04 11:23:16 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstrtpopusdepay.c:
+	  opusdepay: Set multistream=FALSE on the Opus caps
+	  The RTP Opus mapping only allows mono/stereo, and not multistream Opus
+	  streams.
+
+2015-05-04 10:35:55 +0200  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/opus/gstopusheader.c:
+	  opusheader: Do not include rate in caps if it is 0
+	  As expressed in gst_opus_header_create_caps, value 0 means unset.
+	  Setting rate value to 0 make negotiation with decoder fail.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748875
+
+2015-05-04 08:06:35 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Fix slice-height for Tegra 3 devices
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748867
+
+2015-03-13 16:07:15 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Add support for COLOR_FormatYUV420Flexible
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747126
+
+2015-03-25 17:43:59 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Add suport for Intel color formats
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747126
+
+2015-05-02 18:06:18 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Fix profile and level setting in caps
+	  Don't use the apis in codec-utils to extract the profile and level
+	  syntax elements since it is wrong if there are emulation prevention
+	  bytes existing in the byte-stream data.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-05-03 23:08:15 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	  glcolorconvert: Improve passthrough check when no conversion is needed.
+	  Make the passthrough check contingent on only the fields we
+	  can modify being unchanged, and pre-compute it when caps
+	  change instead of checking on each buffer. Makes the passthrough
+	  more lenient if consumers are lax about making input and output
+	  caps complete.
+
+2015-05-01 19:39:58 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: handle when source creation fail
+	  Remember to set the source to NULL state as adding it to the pipeline
+	  will set it to the READY state.
+
+2015-05-01 19:31:45 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: fix element linking order
+	  Video source should be linked to videocrop and not to
+	  videoconvert as it is done in the main linking path
+
+2015-03-13 06:10:52 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/compositor.c:
+	  tests: Add a check for the new compositor pad-is-obscured optimization
+	  We verify that all the buffers on an obscured sinkpad are skipped by overriding
+	  the map() function in the GstVideoMeta of the buffers to set a variable when
+	  called. We also test that the buffers do get mapped when they're not obscured.
+	  Blame^WCredit for the GstVideoMeta map() idea goes to Tim.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746147
+
+2015-04-18 15:10:00 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Only map the frame from a buffer if it will be used
+	  It's a waste of resources to map it if it won't be converted
+	  or used at all. Since we moved the frame mapping down, we need
+	  to use the GST_VIDEO_INFO accessor macros now in the code above
+	  that instead of the GST_VIDEO_FRAME accessor macros.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746147
+
+2015-04-18 15:09:02 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: use accessor macros for consistency
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746147
+
+2015-04-18 15:09:02 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Skip pads that are completely obscured by a higher zorder pad
+	  For each frame, compare the frame boundaries, check if the format contains an
+	  alpha channel, check opacity, and skip the frame if it's going to be completely
+	  overwritten by a higher zorder frame. The check is O(n^2), but that doesn't
+	  matter here because the number of sinkpads is small.
+	  More can be done to avoid needless drawing, but this covers the majority of
+	  cases. See TODOs. Ideally, a reverse painter's algorithm should be used for
+	  optimal drawing, but memcpy during compositing is small compared to the CPU used
+	  for frame conversion on each pad.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746147
+
+2015-04-30 19:08:25 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: Fix source caps to report cropped dimensions
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-10 15:34:40 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: Fix the memory freeing of stored VPS nals
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-30 18:36:35 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: Fix profile, tier and level setting in caps
+	  Don't use the apis in codec-utils to extract the profile,tier and level
+	  syntax elements since it is wrong if there are emulation prevention
+	  bytes existing in the byte-stream data.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-17 15:15:33 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: Fix nal unit size checking
+	  The EOS and EOB nals have the size 2 which is the size of
+	  nal unit header itself. The gst_h265_parser_identify_nalu()
+	  is not required to scan start code again in this case.
+	  In other cases, for a valid nalunit the minimum required size
+	  is 3 bytes (2 byte header and at least 1 byte RBSP payload)
+
+2015-04-17 15:03:34 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.h:
+	  codecparser: h265: Calculate crop rectangle dimensions
+
+2015-04-17 15:01:57 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.h:
+	  codecparser: h265: Fix parsing multiple SEI messages in a single SEI Nal
+	  An SEI Nal can have more than one SEI message.
+	  Change in API: the gst_h265_parser_parse_sei()
+
+2015-04-30 21:32:29 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Make sure to send caps events downstream before any segment events
+	  Upstream might not give us a caps event (dtlssrtpdec) because it might be an
+	  RTP/RTCP mixed stream, but we split the two streams anyway and should report
+	  proper caps downstream if possible.
+	  Fixes "sticky event misordering" warnings with dtlssrtpdec.
+
+2015-04-30 10:50:19 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/rtjpeg/gstrtjpegdec.c:
+	* gst/rtjpeg/gstrtjpegenc.c:
+	  rtjpeg: remove unused quality property
+
+2015-04-30 11:15:40 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstglcolorconvertelement.h:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  gl: readd glupload/download onto element pads
+	  Allows insertion of gl elements into non-gl pipelines without converter
+	  (upload/download) elements.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743974
+
+2015-04-29 22:55:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	* ext/gl/gstopengl.c:
+	  Revert "glvideomixer: implement with glmixerbin"
+	  This reverts commit 0fb56738a14391f248aa0be8756adeaf978baa0c.
+
+2015-04-29 22:38:00 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstopengl.c:
+	  Revert "glimagesink: implement as a bin"
+	  This reverts commit 8a0017e21d5f9a8507f0593c6b24f723aa415258.
+
+2015-04-29 22:32:33 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  Revert "glimagesink: forward ALL the properties on the bin"
+	  This reverts commit 4be45e5f30dc6121f2769323603447f591ca4a0a.
+
+2015-04-29 22:32:20 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  Revert "glimagesink: add pixel-aspect-ratio property on the bin"
+	  This reverts commit 2ba6bb9b9325b63f58a9ff0b2c82fa28759dcabc.
+
+2015-04-29 09:57:52 +0200  Andoni Morales Alastruey <ylatuya@gmail.com>
+
+	* sys/winks/gstksvideodevice.c:
+	* sys/winks/gstksvideodevice.h:
+	* sys/winks/gstksvideosrc.c:
+	  ksvideosrc: don't timestamp buffers for muxed streams
+
+2015-04-29 21:37:56 +0200  Andoni Morales Alastruey <ylatuya@gmail.com>
+
+	* sys/winks/gstksvideodevice.c:
+	  ksvideosrc: fix header size for muxed streams
+
+2015-04-29 19:39:14 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: Fix the number of tile rows/columns parsing
+	  The possible minimum value for num_tile_columns_minus1 and num_tile_rows_minus1
+	  is zero (7.4.3.3).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748641
+
+2015-04-29 17:20:58 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mixmatrix/mixmatrix.c:
+	  mixmatrix: remove unused property enum items
+	  These two properties have been there since the origin of the element but they
+	  aren't used. Removing them.
+
+2015-04-29 15:41:07 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Fix comparision logic
+	  We can't answer the SEEKING query if we do *not* have the manifest
+
+2015-04-29 10:56:24 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/aiff/Makefile.am:
+	  aiff: Re-add noinst_HEADERS instruction
+	  Was removed in the previous android cleanup commit
+
+2015-04-28 21:43:56 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* sys/winks/Makefile.am:
+	* sys/winks/gstksclock.c:
+	* sys/winks/gstksvideosrc.c:
+	* sys/winks/ksdeviceprovider.c:
+	* sys/winks/ksdeviceprovider.h:
+	* sys/winks/kshelpers.c:
+	* sys/winks/kshelpers.h:
+	  GstDeviceProvider implementation for WIN Kernel Streaming plugin
+	  gst_ks_device_provider_probe() is a no-braier, just runs ks_enumerate_devices()
+	  and reports the results.
+	  Monitoring is a bit more tricky. We have to create a dummy message-processing
+	  window and register device change notifications for it.
+	  As kernel streaming can (and should) be used for audio capture and audio
+	  playback, this change also has certain placeholders for such.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747757
+
+2015-04-29 02:30:05 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: Cache caps for passing to the client draw call
+	  Don't convert the GstVideoInfo to caps on every draw call,
+	  just cache the caps and pass them into the GstSample.
+
+2015-04-29 02:20:09 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Make upload method static caps non-const.
+	  Retrieving a GstStaticCaps does a one time internal
+	  initialisation and caches it - they can't be stored as
+	  const structures.
+
+2015-04-28 17:24:04 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/opus/gstopusdec.h:
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	* ext/opus/gstopusparse.c:
+	  opus: fix includes and compilation against opus in non-standard prefix
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748594
+
+2015-04-28 16:58:21 +0200  Mersad Jelacic <mersad@axis.com>
+
+	* ext/opus/gstopusdec.c:
+	* ext/opus/gstopusenc.c:
+	  opus: don't use deprecated gst_buffer_new_and_alloc
+	  Use the helper function available in the base class instead.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748585
+
+2015-04-28 16:06:47 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/libde265/libde265-dec.c:
+	  de265dec: use g_get_num_processors() if available
+	  And provide home-made fallback for older GLib versions,
+	  so that we can later find these and remove them when
+	  we bump the GLib requirement (which is certainly going
+	  to happen before 2.0).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748495
+
+2015-04-28 16:02:27 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/debugutils/fpsdisplaysink.c:
+	* gst/inter/gstintertest.c:
+	* gst/liveadder/liveadder.c:
+	  gst: remove some unnecessary glib version checks
+	  We require 2.32, no need to check for anything older
+	  than that.
+
+2015-04-28 11:28:39 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* gst/mxf/mxfmetadata.c:
+	  mxf: fix descriptor leak
+	  Free the existing descriptor array, if any, before replacing it.
+	  Fix leaks with the
+	  validate.file.playback.scrub_forward_seeking.test-mpeg2-mp3_mxf scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748580
+
+2015-04-28 10:13:35 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix taglist leak
+	  If the stream which is about to be removed still has a ref on a tag list we
+	  should drop it.
+	  Fix a leak which was occasionally happening with the
+	  validate.file.playback.change_state_intensive.tron_en_ge_aac_h264_ts scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748576
+
+2015-04-27 22:44:28 +0900  Jimmy Ohn <yongjin.ohn@lge.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: fix find_subtable() return value
+	  find_subtable() returns a pointer, so return NULL and
+	  not FALSE when nothing is found.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748527
+
+2015-04-28 14:52:36 +0200  Edward Hervey <edward@centricular.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  win32: update defs
+
+2015-04-28 20:46:52 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: remove uneeded unref
+	  The call to _gl_mem_alloc_data will unref and NULLify 'dest' for us.
+	  We just need to return.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744246
+
+2015-04-28 09:37:59 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Use gst_pad_get_pad_template_caps in ::get_caps()
+
+2015-04-28 20:11:07 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfilterbin.c:
+	* ext/gl/gstglmixerbin.c:
+	* ext/gl/gstglsinkbin.c:
+	* ext/gl/gstgluploadelement.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	  glupload: provide the sink template caps that could be used
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746399
+
+2015-04-27 19:28:57 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/examples/camerabin2/gst-camera2.c:
+	* tests/examples/camerabin2/gst-camera2.h:
+	* tests/examples/camerabin2/gst-camera2.ui:
+	  examples: gst-camera: add zoom property to UI
+	  Add a slider to modify the zoom in camerabin
+
+2015-04-27 18:33:37 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/examples/camerabin2/gst-camera2.ui:
+	  examples: gst-camera: remove widgets deprecated in GTK3.0
+	  VBox and HBox are now simply Box
+
+2015-04-27 15:41:04 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/examples/camerabin2/Makefile.am:
+	* tests/examples/camerabin2/gst-camera2.c:
+	* tests/examples/camerabin2/gst-camera2.ui:
+	  examples: gst-camera: update to GTK3
+	  When opening the .ui file it complains about being for GTK 2 and
+	  automatically updates it to GTK3. Commit this version and update
+	  the makefile
+
+2015-04-27 13:41:44 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: remove unused code
+	  The structure is created and never used anymore. Remove it.
+
+2015-04-27 13:24:54 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	  wrappercamerabinsrc: use digitalzoom element
+	  Replace videocrop ! videoscale ! capsfilter with the digitalzoom
+	  bin that has the same pipeline internally and already updates
+	  the capsfilter automatically when caps change, removing this code
+	  from wrappercamerabinsrc and making it cleaner.
+
+2015-04-27 21:14:02 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstdigitalzoom.c:
+	  digitalzoom: change videocrop parameters before passing caps event
+	  Avoids one extra uneeded renegotiation if the elements are already
+	  configured to their final property values when the caps event
+	  goes through.
+	  Also avoids hitting bug https://bugzilla.gnome.org/show_bug.cgi?id=748344
+
+2015-04-22 13:06:30 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstdigitalzoom.c:
+	  digitalzoom: also skip internal pipeline in upstream caps query
+	  To avoid going through our capsfilter which would limit the choices.
+
+2015-04-22 13:05:42 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstdigitalzoom.c:
+	  digitalzoom: prevent assertion when caps is any
+
+2015-04-21 23:10:05 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/Makefile.am:
+	* gst/camerabin2/gstdigitalzoom.c:
+	* gst/camerabin2/gstdigitalzoom.h:
+	  camerabin: digitalzoom: create a bin element for digital zooming
+	  It contains videocrop ! videoscale ! capsfilter and implements digital
+	  zooming.
+	  At this moment, it is a private element of the camerabin plugin.
+	  This will remove some code used in wrappercamerabinsrc to make
+	  code clearer and digitalzoom can potentially be used by other
+	  applications in the future, it has nothing camerabin specific.
+
+2015-04-27 10:11:41 -0400  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  egl: Use maximum bits per color instead of minimum
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748425
+
+2015-04-26 20:55:03 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* ext/libde265/libde265-dec.c:
+	  libde265: W32 thread count support
+	  This code is imported from GLib g_get_num_processors(). This function
+	  was added in 2.36 but we depend on 2.32.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748495
+
+2015-04-26 21:00:06 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* ext/libde265/libde265-dec.c:
+	  libde265: Fix format string for gsize
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748496
+
+2015-04-26 21:03:45 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* ext/spandsp/gstspanplc.c:
+	  spandsp: Don't use the private field 'missing_samples'
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748497
+
+2015-04-27 14:56:06 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: remove unused property enum item
+	  The property enum item has been there since the origin of the element but it
+	  has never been used. Removing it.
+
+2015-04-27 14:49:59 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstglfiltercube.c:
+	  glfiltercube: Don't initialize multiple shaders on renegotiation
+
+2015-04-27 10:55:13 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/adpcmenc/adpcmenc.c:
+	* gst/festival/gstfestival.c:
+	* gst/games/gstpuzzle.c:
+	* gst/id3tag/gstid3mux.c:
+	* gst/librfb/gstrfbsrc.c:
+	* gst/mixmatrix/mixmatrix.c:
+	* gst/mpeg1sys/gstmpeg1systemencode.c:
+	* gst/mpegdemux/gstmpegdemux.c:
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mve/gstmvemux.c:
+	* gst/onvif/gstrtponviftimestamp.c:
+	* gst/overlay/gstoverlay.c:
+	* gst/rtjpeg/gstrtjpegdec.c:
+	* gst/rtjpeg/gstrtjpegenc.c:
+	* gst/speed/gstspeed.c:
+	* gst/stereo/gststereo.c:
+	* gst/subenc/gstsrtenc.c:
+	* gst/subenc/gstwebvttenc.c:
+	* gst/tta/gstttadec.c:
+	* gst/vbidec/gstvbidec.c:
+	* gst/vmnc/vmncdec.c:
+	  Rename property enums from ARG_ to PROP_
+	  Property enum items should be named PROP_ for consistency and readability.
+
+2015-04-27 10:24:00 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Remove unused stop function
+
+2015-04-27 16:04:50 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: unref the pool in the correct place
+	  Otherwise we could hold a pool to a context that is never going to be used.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748405
+
+2015-04-27 10:01:53 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: Unref shader in ::stop()
+
+2015-04-27 15:20:56 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  gl: unref display/other-context in the correct place
+	  Otherwise state changes from PLAYING->READY->PAUSED will cause there to
+	  to be no display configured on the element.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748405
+
+2015-04-10 14:08:43 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.h:
+	  codecparsers: h265: add helpers to convert quantization matrices
+	  Add utility functions to convert quantization matrices from zig-zag scan
+	  order into raster scan order and vice-versa
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-10 14:07:56 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: skip byte alignment bits while parsing slice header
+	  Skip the byte alignment bits as per the logic of byte_alignment()
+	  provided in hevc specification. This will fix the calculation of
+	  slice header size.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-10 14:07:35 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: Fix the NumDeltaPocs calculation
+	  Always use the equation provided in spec (7-57) for finding
+	  the NumDeltaPocs
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-10 14:04:17 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: Fix the NumPocTotalCurr calculation
+	  The NumPocToalCurr should be calculated for all B and P slices.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-10 13:59:50 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	  codecparser: h265: Fix nal size calculation for EOS and EOB
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747613
+
+2015-04-26 21:42:03 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglbumper.c:
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstgldeinterlace.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglfiltershader.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgltransformation.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: De-camelcase onInitFBO() vfunc
+
+2015-04-26 21:39:06 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstgldeinterlace.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglfiltershader.c:
+	* ext/gl/gstgloverlay.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: Remove onStart/onStop vfuncs, and unused onReset()
+	  onStart/onStop are just duplicates of the basetransform ones, onReset
+	  was never called but was used everywhere when stop should've been used.
+
+2015-04-21 09:43:58 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: don't initialize multiple shaders on renegotiation
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748407
+	  * delete shader if one exists
+	  * set it to NULL after unrefing
+
+2015-04-26 21:11:17 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvert: Fix compiler warning
+	  gstglcolorconvertelement.c:230:19: error: unused variable 'in_structure'
+	  [-Werror,-Wunused-variable]
+	  GstStructure *in_structure = gst_caps_get_structure (caps, 0);
+	  ^
+
+2015-04-15 01:24:45 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: drop frames we get before we have a clock
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748054
+
+2015-04-26 20:33:41 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  glbasefilter: Unref other context in finalize, and display in READY->NULL
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748405
+
+2015-04-19 19:16:55 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvert: Keep colorimetry and chroma-site fields if passthrough
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748141
+
+2015-04-26 18:04:16 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* Android.mk:
+	* ext/faac/Makefile.am:
+	* ext/faad/Makefile.am:
+	* ext/hls/Makefile.am:
+	* ext/mpg123/Makefile.am:
+	* ext/smoothstreaming/Makefile.am:
+	* ext/x265/Makefile.am:
+	* gst-libs/gst/adaptivedemux/Makefile.am:
+	* gst-libs/gst/basecamerabinsrc/Makefile.am:
+	* gst-libs/gst/codecparsers/Makefile.am:
+	* gst-libs/gst/insertbin/Makefile.am:
+	* gst-libs/gst/interfaces/Makefile.am:
+	* gst-libs/gst/mpegts/Makefile.am:
+	* gst-libs/gst/uridownloader/Makefile.am:
+	* gst/adpcmdec/Makefile.am:
+	* gst/adpcmenc/Makefile.am:
+	* gst/aiff/Makefile.am:
+	* gst/asfmux/Makefile.am:
+	* gst/audiobuffer/Makefile.am:
+	* gst/audiofxbad/Makefile.am:
+	* gst/audiovisualizers/Makefile.am:
+	* gst/autoconvert/Makefile.am:
+	* gst/bayer/Makefile.am:
+	* gst/camerabin2/Makefile.am:
+	* gst/cdxaparse/Makefile.am:
+	* gst/coloreffects/Makefile.am:
+	* gst/dataurisrc/Makefile.am:
+	* gst/debugutils/Makefile.am:
+	* gst/dvbsuboverlay/Makefile.am:
+	* gst/dvdspu/Makefile.am:
+	* gst/festival/Makefile.am:
+	* gst/freeverb/Makefile.am:
+	* gst/frei0r/Makefile.am:
+	* gst/gaudieffects/Makefile.am:
+	* gst/gdp/Makefile.am:
+	* gst/geometrictransform/Makefile.am:
+	* gst/hdvparse/Makefile.am:
+	* gst/id3tag/Makefile.am:
+	* gst/inter/Makefile.am:
+	* gst/interlace/Makefile.am:
+	* gst/ivfparse/Makefile.am:
+	* gst/ivtc/Makefile.am:
+	* gst/jp2kdecimator/Makefile.am:
+	* gst/jpegformat/Makefile.am:
+	* gst/librfb/Makefile.am:
+	* gst/liveadder/Makefile.am:
+	* gst/midi/Makefile.am:
+	* gst/mpegdemux/Makefile.am:
+	* gst/mpegpsmux/Makefile.am:
+	* gst/mpegtsdemux/Makefile.am:
+	* gst/mve/Makefile.am:
+	* gst/mxf/Makefile.am:
+	* gst/nuvdemux/Makefile.am:
+	* gst/onvif/Makefile.am:
+	* gst/patchdetect/Makefile.am:
+	* gst/pcapparse/Makefile.am:
+	* gst/pnm/Makefile.am:
+	* gst/rawparse/Makefile.am:
+	* gst/rtp/Makefile.am:
+	* gst/sdi/Makefile.am:
+	* gst/sdp/Makefile.am:
+	* gst/segmentclip/Makefile.am:
+	* gst/siren/Makefile.am:
+	* gst/smooth/Makefile.am:
+	* gst/speed/Makefile.am:
+	* gst/stereo/Makefile.am:
+	* gst/subenc/Makefile.am:
+	* gst/tta/Makefile.am:
+	* gst/videofilters/Makefile.am:
+	* gst/videomeasure/Makefile.am:
+	* gst/videoparsers/Makefile.am:
+	* gst/videosignal/Makefile.am:
+	* gst/vmnc/Makefile.am:
+	* gst/y4m/Makefile.am:
+	* gst/yadif/Makefile.am:
+	* sys/androidmedia/Makefile.am:
+	  Remove obsolete Android build cruft
+	  This is not needed any longer.
+
+2015-04-19 00:55:50 +0900  Yujin Lee <saddopop@gmail.com>
+
+	* sys/applemedia/plugin.m:
+	  vtdec: fix build error with clang
+	  This commit fixes a simple build error by clang with
+	  by clang with [-Werror,-Wtautological-pointer-compare] options.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748110
+
+2015-04-26 19:08:00 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Only answer the duration query in non-live mode
+
+2015-04-25 18:50:52 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst/audiovisualizers/gstdrawhelpers.h:
+	* gst/audiovisualizers/gstspacescope.c:
+	* gst/audiovisualizers/gstspacescope.h:
+	* gst/audiovisualizers/gstspectrascope.c:
+	* gst/audiovisualizers/gstspectrascope.h:
+	* gst/audiovisualizers/gstsynaescope.c:
+	* gst/audiovisualizers/gstsynaescope.h:
+	* gst/audiovisualizers/gstwavescope.c:
+	* gst/audiovisualizers/gstwavescope.h:
+	* gst/audiovisualizers/plugin.c:
+	  audiovisualizer: fix the license from GPL to LGPL
+	  This was a copy'n'paste buf in the initial commit done by myself.
+
+2015-04-25 18:46:41 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	* gst/audiovisualizers/gstaudiovisualizer.h:
+	  audiovisualizer: fix the license from GPL to LGPL
+	  This was a copy'n'paste buf in the initial commit done by myself.
+
+2015-04-25 13:38:08 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/examples/opencv/Makefile.am:
+	* tests/examples/opencv/gst_element_print_properties.c:
+	* tests/examples/opencv/gst_element_print_properties.h:
+	* tests/examples/opencv/gstmotioncells_dynamic_test.c:
+	* tests/examples/opencv/gstmotioncells_dynamic_test.h:
+	  examples: motioncells: remove GPL3 code we don't need
+	  If 95% of the code of an example app consists of GObject
+	  code, maybe that's defeating the point a little. So just
+	  remove a lot of that and trim down the example to the
+	  absolute minimum. Also removes the last remaining GPL3
+	  licensed code in -bad.
+
+2015-04-25 12:52:04 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/examples/opencv/gstmotioncells_dynamic_test.c:
+	  examples: motioncells: simplify property setting
+
+2015-04-25 12:48:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/examples/opencv/gstmotioncells_dynamic_test.c:
+	  examples: motioncells: port to 1.x
+
+2014-11-20 00:33:44 +0100  Robert Jobbagy <jobbagy.robert@gmail.com>
+
+	* tests/examples/opencv/gstmotioncells_dynamic_test.c:
+	* tests/examples/opencv/gstmotioncells_dynamic_test.h:
+	  examples: motioncells: relicense opencv example to LGPLv2
+
+2015-04-24 14:04:55 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/camerabin.c:
+	  tests: camerabin: add tests for GstPhotography image capture
+	  GstPhotography enables new paths in wrappercamerabinsrc that allows
+	  the source to be notified about the capture caps and provide an
+	  alternative caps if desired bypassing the negotiation (this doesn't
+	  seem like a good idea these days). To make sure it keeps working
+	  until we remove it from the API in favor of standard caps negotiation
+	  features this test was added.
+	  It adds 3 extra tests with a simple test source that will:
+	  1) Test that capturing with ANY caps work
+	  2) Test that capturing with a fixed caps work
+	  3) Test that capturing with a fixed caps and having the source
+	  pick a different resolution from GstPhotography API works
+	  by having wrappercamerabinsrc crop the capture to the final
+	  requested dimensions
+
+2015-04-24 14:19:50 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	  wrappercamerabinsrc: Rework cropping for zoom and dimension reduction
+	  wrappercamerabinsrc has a videocrop element to be used for
+	  zooming and for cropping when input caps is different when used
+	  with the GstPhotography interface. The zooming part needs
+	  the following elements:
+	  capsfilter ! videocrop ! videoscale ! capsfilter
+	  The capsfilters should always have the same caps to ensure the
+	  zooming is done and preserves dimensions, unless when it is needed
+	  to do more cropping due to input dimensions those caps
+	  need to be modified accordingly to preserve the output dimensions.
+	  This, however, makes it hard to get caps negotiation to work properly
+	  as we need to have different caps in the capsfilters to account for
+	  the extra cropping needed. It could be simple for fixed caps but it
+	  gets tricky with unfixed ones.
+	  To solve this, this patch splits the zooming and dimension reduction
+	  cropping into 2 separate videocrop elements. The first one does
+	  the dimension cropping, which is only needed when the GstPhotography
+	  API is used and the source provides a caps that is different than
+	  what is requested, while the second is dedicated to zoom crop only.
+	  The first part of the pipeline goes from:
+	  src ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter
+	  to
+	  src ! videocrop ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter
+	  It might add an extra overhead in the image capture as the image might need
+	  to be cropped twice but this can be solved by enabling videocrop to use
+	  crop metas so only the later one does the real cropping.
+	  It also makes the code a bit simpler.
+
+2015-04-24 14:17:51 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: remove obsolete comment
+	  This is already handled in another place and doesn't make sense
+	  in the function context anymore
+
+2015-04-24 14:16:24 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: error out if source fails to prepare for capture
+	  Post an error when preparing the image capture through photography
+	  interface fails
+
+2015-04-24 14:13:34 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: intersect instead of compare for equality
+	  Intersect is enough to check if the requested caps are compatible
+	  with what the source is going to provide. Equality will be too strict.
+
+2015-04-24 14:13:16 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: fix typo
+
+2015-04-24 02:22:54 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/camerabin.c:
+	  camerabin: tests: remove unused macros
+	  Those macros were with the wrong name (likely a copy n paste mistake)
+	  and were unused.
+
+2015-04-23 14:28:11 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/camerabin.c:
+	  tests: camerabin: remove obsolete check for 0.10 feature
+
+2015-04-24 16:48:23 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiobuffer/gstaudioringbuffer.c:
+	* gst/coloreffects/gstchromahold.c:
+	* gst/debugutils/gstcompare.c:
+	* gst/gaudieffects/gstgaussblur.c:
+	* gst/pcapparse/gstpcapparse.c:
+	* gst/rtp/gstrtph265pay.c:
+	* gst/sdp/gstsdpdemux.c:
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth265parse.c:
+	* gst/videoparsers/gstmpeg4videoparse.c:
+	* gst/videoparsers/gstmpegvideoparse.c:
+	  remove unused enum items PROP_LAST
+	  This were probably added to the enums due to cargo cult programming and are
+	  unused.
+
+2015-04-24 17:13:10 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: balance change_state display ref/unref
+	  the display was being unreffed on the incorrect state change causing
+	  invalid state when changing from PLAYING/PAUSED->READY->PAUSED/PLAYING.
+
+2015-04-23 17:43:36 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Don't claim to be live when answering the LATENCY query
+	  Even for "live" streams we are not live in the GStreamer meaning of the word.
+	  We don't produce buffers that are timestamped based on their "capture time"
+	  and our clock, but just based on whatever timestamps the stream might contain.
+	  Also even if we wanted to claim to be live, that wouldn't work well as we
+	  would have to return GST_STATE_CHANGE_NO_PREROLL when going from READY to
+	  PAUSED, which we can't. We first need data to know if we are "live" or not.
+
+2015-04-23 17:39:46 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: Use the downloader of the base class instead of creating our own
+	  The one of the base class is completely unused because we override all
+	  the downloading here, so let's just use that one instead.
+
+2015-04-23 17:36:49 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Don't error out if we can't match variant playlists after updating
+	  It's better to just select some random variant playlist instead of stopping,
+	  chances are that it's still continuing to work and we might just have to
+	  select a different variant again later.
+
+2015-04-23 17:33:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Fix how the playlists are refreshed
+	  We should only refresh the currently selected variant playlist (if any,
+	  otherwise the main playlist), not the main playlist. And only try to
+	  refresh the main playlist if updating the variant playlist fails.
+	  Some servers (Wowza) use the request of the main playlist to create a
+	  "session", which is then part of the URI of the variant playlist and
+	  also the fragments. Refreshing the main playlist would generate a new
+	  session, and the server rate limits that usually. And after a few retries
+	  the server just kicks us out.
+	  Also as a side effect we now use the same downloader for all playlists, so
+	  that we only have 2 instead of 3 connections to the server. And also
+	  previously we just ignored the downloaded data from the main playlist that
+	  the base class gave to us.
+
+2015-04-23 17:22:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/hls/gsthlsdemux.c:
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssmanifest.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: Allow subclasses to override how a new manifest would be downloaded
+
+2015-04-23 17:02:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: Expose downloader
+	  This allows subclasses to use it and share connections if possible.
+
+2015-04-23 16:43:11 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* .gitignore:
+	  Update .gitignore
+
+2015-04-23 16:40:49 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/Makefile.am:
+	  tests: define GST_CHECK_TEST_ENVIRONMENT_BEACON
+	  Make sure the test environment is set up.
+	  https://bugzilla.gnome.org//show_bug.cgi?id=747624
+
+2015-04-23 16:39:20 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: bump automake requirement to 1.14 and autoconf to 2.69
+	  This is only required for builds from git, people can still
+	  build tarballs if they only have older autotools.
+	  https://bugzilla.gnome.org//show_bug.cgi?id=747624
+
+2015-04-23 16:47:40 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  glupload: Release glupload buffer when caps are changed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748371
+
+2015-04-23 11:47:37 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstgaussblur.c:
+	  gaudi: don't run gaussian function if sigma is 0
+
+2015-04-22 19:28:39 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: handle too short segments
+	  When the segment is very short it might be the case that the
+	  typefinding fails and when finishing the segment hlsdemux would
+	  consider the remaining data (pending_buffer) as an encryption
+	  leftover.
+	  This patch fixes it and makes sure an error is properly posted
+	  if typefind failed by refactoring buffer handling to a function
+	  and using it from the data_received and finish_fragment functions.
+
+2015-04-22 19:04:43 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: use correct variable type
+	  gst_buffer_resize needs gssize and not gsize. This makes gdb
+	  print it correctly when debugging.
+
+2015-04-22 17:08:09 +0200  Josep Torra <n770galaxy@gmail.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: fix mode autodetection
+	  The autodetection mode was broken because a race condition in the input mode
+	  setting. The mode could be reverted back when it was replaced in
+	  the streaming thread by the old mode in the middle of mode changed callback.
+
+2015-04-22 17:04:25 +0200  Josep Torra <n770galaxy@gmail.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: do not repeat first video format in caps template
+	  The first entry in the modes array is used as default mode for autodetection.
+	  There's no need to copy it into the caps template.
+
+2015-04-22 15:04:03 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstexclusion.c:
+	  gaudi: fix to 30780db1
+	  The second check for (factor == 0) creeped in the last commit.
+	  Apologies.
+
+2015-04-22 14:30:56 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstexclusion.c:
+	  gaudi: fix exclusion's factor range
+	  Avoid dividing by zero when the factor is zero. Instead, output a buffer with
+	  all color values as zero.
+
+2015-04-22 14:15:13 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstsolarize.c:
+	  gaudi: remove floor variable in solarize
+	  Floor variable has no effect and it isn't worth it to have it adjustable.
+
+2015-04-22 13:55:06 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstburn.c:
+	* gst/gaudieffects/gstburn.h:
+	* gst/gaudieffects/gstchromium.c:
+	* gst/gaudieffects/gstchromium.h:
+	* gst/gaudieffects/gstdilate.c:
+	* gst/gaudieffects/gstdilate.h:
+	* gst/gaudieffects/gstdodge.c:
+	* gst/gaudieffects/gstdodge.h:
+	* gst/gaudieffects/gstexclusion.c:
+	* gst/gaudieffects/gstexclusion.h:
+	* gst/gaudieffects/gstsolarize.c:
+	* gst/gaudieffects/gstsolarize.h:
+	  gaudi: remove unused property
+
+2015-04-22 18:54:45 +0900  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: Possible null pointer dereference
+	  While printing error message when context fails, error variable is not being used anymore
+	  so it will lead to null pointer dereference
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748287
+
+2015-04-22 10:38:19 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* INSTALL:
+	  Remove INSTALL file
+	  autotools automatically generate this, and when using different versions
+	  for autogen.sh there will always be changes to a file tracked by git.
+
+2015-04-22 10:38:13 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* LICENSE_readme:
+	  Remove LICENSE_readme
+	  It's completely outdated and just confusing, better if people are
+	  forced to look at the actual code in question than trusting this file.
+
+2015-04-21 22:04:56 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Don't stop all tasks and streams from the update task on errors
+	  It will deadlocks as we will then join() the update task from itself. Instead
+	  just post an actual error message on the bus and only stop the update task.
+	  The application is then responsible for shutting down the element, and thus
+	  all the other tasks and everything, based on the error message it gets.
+
+2015-04-21 18:29:36 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Fix seeking
+	  We also have to update the current_file GList pointer in the M3U playlist
+	  client, otherwise we are just continuing playback from the current position
+	  instead of seeking.
+
+2015-04-21 18:05:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Don't call unlock() just to call lock() immediately afterwards
+
+2015-04-20 08:21:32 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: Reset zoom element caps to go to viewfinder mode
+	  Avoids not-negotiated failures related to using image capture caps
+	  still when adjusting to go back to viewfinder.
+
+2015-04-20 08:20:37 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/camerabin.c:
+	  tests: camerabin: add test for capture with different caps
+	  Adds a test to verify that viewfinder and image capture caps
+	  can be set to non-intersecting caps and still work.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=724868
+
+2015-04-20 08:42:56 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: fix leak of drain query
+	  gst_pad_peer_query doesn't take ownership of the query object
+
+2015-04-20 08:42:48 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	  wrappercamerabinsrc: Refactor internal pipeline
+	  Remove tee and output-selector and just link the source
+	  pad to the outputs we want as needed.
+	  The way we need to prioritize caps negotiation and allocation
+	  queries depending on the mode enabled is too custom to be
+	  handled using tee and output-selector.
+	  This provides more flexibility and doesn't get in the way of proper
+	  handling of negotiation and allocation queries.
+
+2015-04-05 20:18:56 +0200  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* ext/gl/gstopengl.c:
+	  gleffects: Create element for each effect
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-03-22 11:22:52 +0100  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/effects/gstgleffectlaplacian.c:
+	* ext/gl/effects/gstgleffectssources.c:
+	* ext/gl/effects/gstgleffectssources.h:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* ext/gl/gstglfilterlaplacian.c:
+	* ext/gl/gstglfilterlaplacian.h:
+	* ext/gl/gstopengl.c:
+	  gleffects: Merge laplacian filter into effects
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-03-22 11:20:49 +0100  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/effects/gstgleffectsobel.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* ext/gl/gstglfiltersobel.c:
+	* ext/gl/gstglfiltersobel.h:
+	* ext/gl/gstopengl.c:
+	  gleffects: Merge sobel filter into effects
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-03-22 11:13:30 +0100  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/effects/gstgleffectblur.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* ext/gl/gstglfilterblur.c:
+	* ext/gl/gstglfilterblur.h:
+	* ext/gl/gstopengl.c:
+	  gleffects: Merge blur filter into effects
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-03-21 23:50:33 +0100  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/effects/gstgleffectglow.c:
+	* ext/gl/gstglfilterblur.c:
+	  gleffects: Correct attributes for hconv and vconv shaders
+	  Width and height were switched for glow shaders. For blur
+	  filter attributes names were obsolete.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-03-21 23:21:13 +0100  Michał Dębski <debski.mi.zd@gmail.com>
+
+	* ext/gl/effects/gstgleffectssources.c:
+	  gleffects: Fix fisheye shader - pass float to sqrt
+	  On OSX passing literal int to sqrt() in GLSL results in error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746209
+
+2015-04-21 07:28:58 +0200  Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: fix shader memory leak
+
+2015-04-21 12:25:11 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: track context activation properly
+	  We only need to deactivate/reactivate the context iff it was already
+	  active.
+
+2015-04-21 12:19:46 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldisplay.h:
+	  gldisplay: synchronize the searching and creation of GstGLContext's
+	  Ootherwise we could end up with multiple elements in different chains
+	  each creating a context.  Fixes context creation with glvideomixer.
+
+2015-04-20 14:35:19 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Remove dead code
+	  The detection for missing format/alignment is done way before this
+	  codepath is reached (at which point we have already decided of a
+	  format and alignment).
+	  CID #1232800
+
+2015-01-07 16:26:57 +0000  Edward Hervey <edward@centricular.com>
+
+	* ext/opencv/gsthanddetect.c:
+	  handdetect: remove unneeded check
+	  Variable hands is already checked to contain a value previously at the beginning
+	  of the current block. There is no need to check again. This is logically dead code.
+	  CID 1197693
+
+2015-04-20 14:20:05 +0200  Edward Hervey <edward@centricular.com>
+
+	* sys/shm/shmpipe.c:
+	  shmpipe: Ensure string received from recv() is NULL-terminated
+	  We will be doing string operations on it later.
+	  CID #1292830
+
+2015-04-20 11:30:10 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: clean assignment typo
+	  No need to set the value twice.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745102
+	  CID #295122
+
+2015-04-20 10:57:41 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: remove dead code
+	  position of GstSegment is an unsigned int64, it can never be below zero.
+	  CID #1295123
+
+2015-02-09 11:29:46 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/fieldanalysis/gstfieldanalysis.c:
+	  fieldanalysis: exception when block width to 0
+	  When block width property is set to 0, exception occurs.
+	  This happens due to divide by zero errors in calculations.
+	  block width property can never be 0. Hence adjusting the minimum value to 1.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744188
+
+2015-04-15 15:22:37 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: fix caps leak in gst_gl_mixer_pad_sink_getcaps()
+	  Caps refcounting was all wrong in this function. Rewrote it and add some
+	  comments to make it clearer.
+	  Fix caps leaks with the
+	  validate.file.glvideomixer.simple.play_15s.synchronized scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747915
+	  Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+2015-04-20 17:08:23 +1000  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	* sys/applemedia/corevideotexturecache.h:
+	* sys/applemedia/corevideotexturecache.m:
+	* sys/applemedia/vtdec.c:
+	  applemedia: avoid implicit color conversions
+	  Rework the GL texture code a little to avoid implicit color conversion inside
+	  AVF/VT on both iOS and OSX.
+
+2015-04-19 01:15:07 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	  corevideotexturecache: free texture cache on iOS
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748122
+
+2015-04-19 01:21:40 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: check for failure to create buffer
+	  gst_core_media_buffer_new and gst_core_video_texture_cache_get_gl_buffer
+	  can fail for various platform reasons.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748122
+
+2015-04-19 13:12:05 +0900  Yujin Lee <saddopop@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: fix build failure with clang
+	  Use fabs for floating point input.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748128
+
+2015-04-17 13:57:38 -0600  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: Remove unused latency query code
+	  The behavior changes based on the type of segment,
+	  not on the liveness of the source.
+
+2015-04-17 13:55:26 -0600  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Cleanup latency query handling
+	  The minimum latency is always 0 or more. And we should
+	  requery upstream as it may have changed.
+
+2014-07-17 10:53:30 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	  androidmedia: Handle queue/release errors non-fatal
+	  They can happen sometimes as a transient problem, e.g. if there
+	  is a problem in the stream. Only handle them as fatal if many of
+	  them happen in a row.
+
+2015-04-11 16:53:38 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* ext/opencv/MotionCells.cpp:
+	* ext/opencv/MotionCells.h:
+	* ext/opencv/gstcvdilate.c:
+	* ext/opencv/gstcvdilate.h:
+	* ext/opencv/gstcvdilateerode.h:
+	* ext/opencv/gstcvequalizehist.c:
+	* ext/opencv/gstcvequalizehist.h:
+	* ext/opencv/gstcverode.c:
+	* ext/opencv/gstcverode.h:
+	* ext/opencv/gstcvlaplace.c:
+	* ext/opencv/gstcvlaplace.h:
+	* ext/opencv/gstcvsmooth.c:
+	* ext/opencv/gstcvsmooth.h:
+	* ext/opencv/gstcvsobel.c:
+	* ext/opencv/gstcvsobel.h:
+	* ext/opencv/gstdisparity.h:
+	* ext/opencv/gstedgedetect.c:
+	* ext/opencv/gstedgedetect.h:
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfaceblur.h:
+	* ext/opencv/gstfacedetect.c:
+	* ext/opencv/gstfacedetect.h:
+	* ext/opencv/gstgrabcut.cpp:
+	* ext/opencv/gstgrabcut.h:
+	* ext/opencv/gsthanddetect.c:
+	* ext/opencv/gsthanddetect.h:
+	* ext/opencv/gstmotioncells.h:
+	* ext/opencv/gstopencvutils.c:
+	* ext/opencv/gstopencvutils.h:
+	* ext/opencv/gstopencvvideofilter.h:
+	* ext/opencv/gstpyramidsegment.h:
+	* ext/opencv/gstretinex.c:
+	* ext/opencv/gstretinex.h:
+	* ext/opencv/gstsegmentation.cpp:
+	* ext/opencv/gstsegmentation.h:
+	* ext/opencv/gstskindetect.c:
+	* ext/opencv/gstskindetect.h:
+	* ext/opencv/gsttemplatematch.c:
+	* ext/opencv/gsttemplatematch.h:
+	* ext/opencv/gsttextoverlay.h:
+	  opencv: Change opencv plugin to use opencv2-style includes
+	  If old opencv1-style legacy include directory is available,
+	  this change becomes purely cosmetic (maybe will compile a bit faster).
+	  It becomes an FTBFS fix when opencv1-style include directory is missing
+	  (possibly because opencv package maintainer decided not to pack it).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747705
+
+2015-04-12 00:56:48 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* configure.ac:
+	  opencv: Change configure test to check for OpenCV2 headers
+	  * Checks for opencv2 headers only, not for legacy opencv1 headers
+	  * Checks for every opencv2 header that the implementation needs,
+	  not just highgui_c.h
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725163
+
+2015-04-17 05:12:10 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: get connection and input clock early
+
+2015-04-17 15:32:56 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Unify debug statements
+	  Use 0x%04x for PIDs
+
+2015-04-17 15:30:29 +0200  Edward Hervey <edward@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Unify duration querying code
+	  And properly use it in the SEEKING query.
+	  Fixes seeking with gst-play
+
+2015-04-16 14:17:04 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fix caps leak when early returning
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747993
+	  Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+2015-04-16 14:21:16 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: unref owned caps when finalizing the mixer
+	  Fix a caps leak with the
+	  validate.file.glvideomixer.simple.play_15s.synchronized scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747915
+	  Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+2015-04-15 15:16:33 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: pass the proper free function to frames and buffers array
+	  'array_buffers' contain borrowed GstBuffer and so shouldn't have a free
+	  function. 'frames' is the one containing GstGLMixerFrameData and so should use
+	  _free_glmixer_frame_data as free function.
+	  Fix GstGLMixerFrameData leaks with the
+	  validate.file.glvideomixer.simple.play_15s.synchronized scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747913
+	  Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+2015-04-17 15:20:12 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstgldownloadelement.c:
+	  gldownloadelement: Download *from* OpenGL, not into
+
+2015-04-17 09:24:12 +0200  Robert Swain <robert.swain@ericsson.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Add complexity property for speed/quality tradeoff
+
+2015-04-17 14:24:28 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  glcontext: Make gst_gl_context_egl_activate fail if the old surface could not be destroyed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746251
+
+2015-04-17 10:38:16 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  gluploadelement: Unref GstGLUpload object and caps in ::stop()
+	  Fix leak of the GstGLUpload object.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=748033
+
+2015-04-17 14:09:47 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglfilterbin.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglsinkbin.c:
+	* ext/gl/gstglsrcbin.c:
+	  gl: Remove some empty ::finalize() implementations
+
+2015-04-17 14:06:03 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstgldownloadelement.c:
+	  gldownloadelement: Fix element description
+
+2015-04-17 14:05:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstgldownloadelement.c:
+	  gldownloadelement: Remove unused ::finalize() implementation
+
+2015-04-17 14:03:21 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvertelement: Also unref caps in ::stop() already
+	  They are not useful anymore afterwards, so keeping them until ::finalize()
+	  might only cause someone to use them later and then fail.
+
+2015-04-15 14:49:02 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	  glcolorconvertelement: fix GstGLColorConvert leak
+	  convert->convert was never unreffed.
+	  This can be reproduce with the
+	  validate.file.glvideomixer.simple.play_15s.synchronized scenario.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747911
+
+2015-04-16 22:43:54 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/apexsink/gstapexraop.c:
+	  apexsink: Fix buffer overflow, in case anyone ever ports it.
+	  Fix a simple buffer overflow - 16 bytes isn't enough to hold
+	  the string representation of a gulong on x86_64. I guess the
+	  intent was to generate a 32 bit random key, so let's do that.
+	  Only matters if anyone ever ports the sink to 1.x
+	  https://bugzilla.gnome.org/show_bug.cgi?id=676524
+
+2015-04-16 13:35:00 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: fix pad leak when not adding a new pad after no-more-pads
+
+2015-04-09 17:35:55 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix segment position tracking for the general case
+	  Different streams can have different PTS/DTS bases, and some
+	  streams may not even have DTS.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745102
+
+2015-04-16 10:42:45 +0200  Matthieu Bouron <matthieu.bouron@gmail.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  glcontext: Make gst_gl_context_egl_activate fail if the surface could not be created
+	  Also add some error logging.
+
+2015-04-15 21:07:35 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Don't unref buffer that was unreffed just a few lines before already
+
+2015-04-11 04:20:43 +0000  Руслан Ижбулатов <lrn1986@gmail.com>
+
+	* docs/libs/Makefile.am:
+	  Add adaptivedemux, badvideo and badbase to the link-list for the docscanner
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747697
+
+2015-04-12 01:58:31 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: remove unused variables
+	  Complement commit 5496fd3e75e65a4e387715d0ba0740790aefa5f6 by removing
+	  the involved variables.
+
+2015-04-14 20:33:25 +1000  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  applemedia: vtdec: fix GL negotiation
+
+2015-04-14 18:05:31 +1000  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: log timestamps
+
+2015-04-13 11:55:42 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: subtract time spent in AVF queues
+	  The time spent in AVF queues was being incorrectly added to running time
+	  rather than subtracted.
+
+2015-04-11 07:38:57 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: fix GL texture negotiation
+	  GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE should no longer be used.
+	  Instead, just get the GL context.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747352
+
+2015-04-13 19:40:31 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Fix typo
+
+2015-04-13 19:40:22 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlssrtpdec.c:
+	  dtlssrtpdec: Add some more debug output
+
+2015-04-13 19:40:03 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Add some more debug output
+
+2015-04-10 09:34:01 +0900  Yujin Lee <saddopop@gmail.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: enable playback of content with text streams
+	  There is a playback error when trying to play a content that
+	  has 'application' mimeType. This commit prevents an exception from
+	  setup text streams.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747525
+
+2015-04-12 13:01:56 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/winks/gstksvideosrc.c:
+	  winks: Reset DTS to GST_CLOCK_TIME_NONE
+	  Otherwise we might get a previous DTS set from a recycled buffer that we get
+	  back from a buffer pool, which then confuses synchronization.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747722
+
+2015-03-28 15:44:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	  amc: Use new JNI utils almost everywhere
+
+2015-03-28 15:48:28 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  amc: Allow creating global and local references of objects
+
+2015-03-28 15:21:02 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  amc: Make GError argument order more consistent
+
+2015-03-28 15:08:15 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  amc: Add helper function for getting a direct buffer array
+
+2015-03-28 15:08:02 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  amc: Java longs are gint64s
+
+2015-03-28 14:31:41 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  amc: Improve JNI utilities and add some missing ones
+	  We now fill GErrors for everything that could throw an exception, and method
+	  calls now always return a gboolean and their value in an out-parameter to
+	  distinguish failures from other values.
+
+2015-04-11 19:35:48 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Fix last commit
+
+2015-04-11 19:17:00 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl: Remove iOS/EAGL workaround for R/RG textures
+	  This should be unneeded now after https://bugzilla.gnome.org/show_bug.cgi?id=732507
+
+2015-04-11 19:14:34 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Add correct check for RG/R textures in glcolorconvert too
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732507
+
+2015-04-11 12:12:57 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/winks/ksvideohelpers.c:
+	  winks: fix debug message parameter format
+	  The first part of the GUID structure is a DWORD
+	  which is defined as an unsigned long, so we need
+	  to either cast or use %08lx.
+
+2015-04-10 20:25:49 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	* gst/pcapparse/gstpcapparse.h:
+	  pcapparse: Take buffer directly from the adapter
+	  No need to make a copy into a new buffer, just take the data
+	  from the adapter.
+
+2015-04-10 20:15:52 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/pcapparse/gstpcapparse.c:
+	  pcapparse: Produce GstBufferList
+
+2015-04-10 16:23:25 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	  wrappercamerabinsrc: remove unused attribute and related pad probe
+	  The variable was never set to true and can be removed along
+	  with the probe in which it used to act
+
+2015-03-31 17:10:45 +0100  Anton Obzhirov <obzhirov@yahoo.co.uk>
+
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	  glbasefilter: avoid segfault when gl platform is not available
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747124
+
+2015-04-09 16:20:44 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* tests/check/elements/audiomixer.c:
+	  tests: fix type mismatch in varargs passing
+	  A bitmask is 64 bits, but integer immediates are passed as int
+	  in varargs, which happen to be 32 bit with high probability.
+	  This triggered a valgrind jump-relies-on-uninitalized-value
+	  report well away from the site, since it doesn't trigger on
+	  stack accesses, and there must have been enough zeroes to stop
+	  g_object_set at the right place.
+
+2014-08-20 13:46:12 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: handle seeks with no target (ie, keep current position)
+	  Such seeks are used to change playback rate and we do not want
+	  to alter the position in that case, so we bypass the flush/seek
+	  logic, and set things up so a new segment is scheduled to be
+	  regenerated.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735100
+
+2015-03-26 13:46:16 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/mpegtsparse.c:
+	* gst/mpegtsdemux/mpegtsparse.h:
+	  tsparse: fix timestamps not updating after a PMT change
+	  The PCRs stay locked onto the same PID as before the change,
+	  but the relevant PID has no reason to be the same after it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745102
+
+2015-03-24 12:56:53 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: send new segment when a stream is added
+	  This will happen when the PMT changes, replacing streams with
+	  new ones. In that case, we need to accumulate the running time
+	  from the previous chain in the segment base.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745102
+
+2015-03-09 09:56:38 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: keep track of current position
+	  This allows seeking to correctly set the base on the segment.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745102
+
+2015-04-09 15:41:57 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/check/Makefile.am:
+	  check: Don't run the state change test on the dtls elements
+	  There isn't really any way to test the elements standalone.
+
+2015-04-08 19:29:40 -0700  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Remove broken timestamps-going-backwards check
+	  This would've also triggered if for some reason the segment was updated
+	  in such a way that PTS went backwards, but the running time increased. Like
+	  what happens when non-flushing seeks are done.
+	  We're doing a proper buffer-from-the-past check a few lines below based on the
+	  running time, which is the only time we should care about here.
+
+2015-04-08 18:51:50 +0200  Andoni Morales Alastruey <ylatuya@gmail.com>
+
+	* sys/winks/gstksvideodevice.c:
+	* sys/winks/ksvideohelpers.c:
+	* sys/winks/ksvideohelpers.h:
+	  ksvideosrc: fix support for DV devices
+
+2015-02-10 13:32:00 +0100  Andoni Morales Alastruey <ylatuya@gmail.com>
+
+	* sys/winks/kshelpers.c:
+	  ksvideosrc: only list capture devices
+
+2015-04-08 16:46:11 +0200  Edward Hervey <edward@centricular.com>
+
+	* common:
+	* tests/check/Makefile.am:
+	  tests: Use AM_TESTS_ENVIRONMENT
+	  Needed by the new automake test runner
+
+2015-04-08 10:52:17 +0530  Arun Raghavan <arun@centricular.com>
+
+	* sys/opensles/openslessink.c:
+	* sys/opensles/openslessrc.c:
+	  opensles: Explicitly specify layout=interleaved in caps
+	  This is fine to hard-code. Section 9.1.8 of the OpenSL ES 1.1
+	  specification, it is expected that multi-channel audio is always
+	  interleaved.
+
+2015-04-07 15:57:30 +0200  Edward Hervey <edward@centricular.com>
+
+	* configure.ac:
+	  configure: Depend on openh264 >= 1.3.0
+	  Required for the version check header, as agreed upon on IRC
+
+2015-04-05 05:37:09 +0300  Ilya Konstantinov <ilya.konstantinov@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: fix setting of buffer offset end
+	  Don't set offset end to random values off the stack.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747352
+
+2015-04-07 11:09:38 +0200  Edward Hervey <edward@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  open264: Fix GType/gsize usage
+	  gstopenh264enc.cpp:108:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
+
+2015-04-07 11:21:55 +0200  Edward Hervey <edward@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264: Detect 1.4 API change
+	  As mentionned in release notes : Added new Sps/Pps strategies for real-time
+	  video (replace the old setting variable 'bEnableSpsPpsIdAddition' with
+	  'eSpsPpsIdStrategy')
+
+2015-04-06 20:28:22 -0700  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Disconnect mouse/key event signal handlers from window when shutting down context
+
+2015-04-06 20:24:06 -0700  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Guard against disconnecting invalid signal ids
+
+2015-03-26 11:52:33 +0100  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: fix memory leak
+	  Reset the internal segment before freeing it.
+	  mxf_index_table_segment_parse() allocates data inside the segment
+	  (like segment->delta_entries) which have to be freed using
+	  mxf_index_table_segment_reset().
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746803
+
+2015-04-04 10:56:56 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlssink.c:
+	  hlssink: write the playlist end marker on EOS
+	  Catch EOS from the multifilesink and add the endlist marker to
+	  the playlist when it happens
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747319
+
+2015-03-29 17:53:23 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: document gap handling behavior
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746249
+
+2015-03-27 19:36:42 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: drop stale white space at warning
+
+2015-03-27 19:28:05 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* tests/check/libs/aggregator.c:
+	  aggregator: fix typo in test suite
+
+2015-03-27 18:32:27 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* tests/check/libs/aggregator.c:
+	  aggregator: add gap event handling unit test
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746249
+
+2015-03-17 22:13:06 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: implement gap handling
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746249
+
+2015-04-03 18:57:58 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* autogen.sh:
+	* common:
+	  Automatic update of common submodule
+	  From bc76a8b to c8fb372
+
+2015-04-03 11:46:12 +0530  Arun Raghavan <arun@centricular.com>
+
+	* ext/opus/gstopusenc.c:
+	  opus: Fix incorrect fall-through condition in property getter
+
+2012-04-27 18:29:14 +0200  Guillaume Emont <guijemont@igalia.com>
+
+	* sys/shm/gstshmsrc.c:
+	* sys/shm/shmpipe.c:
+	* sys/shm/shmpipe.h:
+	  shmsink: add an shm-area-name property
+	  The shm-area-property tells the name of the shm area used by the element. This
+	  is useful for cases where shmsink is not able to clean up (calling
+	  shm_unlink()), e.g. if it is in a sandbox.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=675134
+
+2015-04-01 22:10:11 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Unify downstream flow return and flushing
+	  Also means that having a non-OK downstream flow return
+	  wakes up the chain functions.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747220
+
+2015-04-01 21:45:01 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Flushing is always in pad lock, no need to atomics
+	  The usage of atomics was always doubtful as it was used to release a
+	  GCond
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747220
+
+2015-04-01 21:38:11 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Reset pending_eos on pad flush
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747220
+
+2015-04-01 21:37:25 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Unify code to set a pad flushing
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747220
+
+2015-04-02 18:05:55 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.h:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	  libgstgl: fix rendering on iOS
+	  Stop assuming that the handle has been set by the time ->create_context is
+	  called. After bc7a7259f357b0065dd94e0668b5a895d83fa53a set_window_handle always
+	  happens after ->create_context in fact.
+	  See also https://bugzilla.gnome.org/show_bug.cgi?id=745090
+
+2015-03-06 21:12:52 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  aggregator: Query latency on first incoming buffer.
+	  And keep on querying upstream until we get a reply.
+	  Also, the _get_latency_unlocked() method required being calld
+	  with a private lock, so removed the _unlocked() variant from the API.
+	  And it now returns GST_CLOCK_TIME_NONE when the element is not live as
+	  we think that 0 upstream latency is possible.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-04-01 20:32:41 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Allow downstream caps with a non-default channel-mask
+	  Instead of failing, take the downstream channel mask if the channel
+	  count is 1.
+
+2015-03-31 16:27:00 +0200  Edward Hervey <edward@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: Don't use context if not present
+	  Avoids assertions at runtime
+
+2015-03-31 11:24:57 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/insertbin/Makefile.am:
+	* gst-libs/gst/mpegts/Makefile.am:
+	  introspection: Don't use g-ir-scanner cache at compile time
+	  It pollutes user directories and we don't need to cache it
+	  https://bugzilla.gnome.org/show_bug.cgi?id=747095
+
+2015-03-31 10:53:55 +0100  Victor Toso <victortoso@redhat.com>
+
+	* configure.ac:
+	* sys/directsound/Makefile.am:
+	* sys/directsound/gstdirectsoundsrc.c:
+	* sys/directsound/gstdirectsoundsrc.h:
+	  directsoundsrc: Implement volume and mute
+	  Using the MixerAPI as IDirectSoundCaptureBuffer doesn't implement volume
+	  control.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744383
+
+2015-03-30 13:49:01 +0100  Anton Obzhirov <obzhirov@yahoo.co.uk>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/effects/gstgleffectbulge.c:
+	* ext/gl/effects/gstgleffectfisheye.c:
+	* ext/gl/effects/gstgleffectglow.c:
+	* ext/gl/effects/gstgleffectidentity.c:
+	* ext/gl/effects/gstgleffectlumatocurve.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectrgbtocurve.c:
+	* ext/gl/effects/gstgleffectsin.c:
+	* ext/gl/effects/gstgleffectsquare.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/effects/gstgleffectssources.c:
+	* ext/gl/effects/gstgleffectssources.h:
+	* ext/gl/effects/gstgleffectstretch.c:
+	* ext/gl/effects/gstgleffecttunnel.c:
+	* ext/gl/effects/gstgleffecttwirl.c:
+	* ext/gl/effects/gstgleffectxray.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstgleffects.h:
+	* ext/gl/gstglfilterblur.c:
+	* ext/gl/gstglfiltersobel.c:
+	  gleffects: port all effects to GLES2.0
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745955
+
+2015-03-28 11:40:14 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlssink.c:
+	  hlssink: implement a chain_list to request key unit for segments
+	  upstream might send buffer lists instead of buffers and hlssink's
+	  probe won't get called and a new segment won't be created when needed.
+	  This patch fixes it by adding a chain_list function to the sink pad
+	  that will just pass through the whole bufferlist if no segment needs
+	  to be requested at the moment or convert the list into buffers to
+	  check the proper timestamp to request the next key-unit that will
+	  start the segment.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746906
+
+2015-03-28 17:28:34 +0100  Mark Nauwelaerts <mnauw@users.sourceforge.net>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: resurrect some flow return handling
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744572
+
+2015-03-28 17:28:26 +0100  Mark Nauwelaerts <mnauw@users.sourceforge.net>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: resurrect some flow return handling
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744572
+
+2015-03-27 00:27:34 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: do not try to advance fragment if there is none
+	  It might return OK from subclasses and it could cause a bitrate
+	  renegotiation. For DASH and MSS that is ok as they won't expose
+	  new pads as part of this but it can cause issues for HLS as
+	  it will expose new pads, leading to pads that will only have EOS
+	  that cause decodebin to fail
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745905
+
+2015-03-24 13:57:54 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopuspay: Forward stereo preferences from caps upstream
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746617
+
+2015-03-24 13:56:21 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopuspay: Set the number of channels to 2 as per RFC draft
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746617
+
+2015-03-17 21:49:40 +0800  Jun Xie <xixi10111011@gmail.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: set default @startNumber and also avoid wrong overwrite
+	  Set default @startNumber to 1, if @startNumber is missing at all level.
+	  Also avoid incorrect overwriting inherited value.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746347
+
+2015-03-24 16:18:22 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: check sink caps are valid
+
+2015-03-24 16:17:00 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  Revert "audioaggregator: check sink caps are valid"
+	  This reverts commit 6d4d0d1cdf7c7531fbf72ce39e1eab1260d20550.
+	  Never put code with side effects into an assertion, it can be compiled out
+
+2015-03-24 15:45:25 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: check sink caps are valid
+	  CID #1291622
+
+2015-03-24 15:13:52 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: fall through switch statement
+	  Adding a comment makes coverity happy and quells the issue.
+	  CID 1291629
+
+2015-03-24 19:05:00 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoaggregator: Document why buffer_vinfo is needed
+
+2015-03-24 19:04:26 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Check if there's a previous buffer to 'keep'
+	  If we want to keep a previous buffer but there's no previous buffer, we actually
+	  need more data instead.
+
+2015-03-23 16:43:01 +0100  Philippe Normand <philn@igalia.com>
+
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  gl/dispmanx: surfaceless EGL context support
+	  Show the DispmanX window only if there's no shared external GL context
+	  set up. When a window is required by the context a transparent
+	  DispmanX element is created and later on made visible by the ::show
+	  method.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746632
+
+2015-03-23 15:09:33 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstsolarize.c:
+	  gaudieffects: clean solarize code
+
+2015-03-23 14:39:56 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstburn.c:
+	* gst/gaudieffects/gstchromium.c:
+	* gst/gaudieffects/gstdodge.c:
+	* gst/gaudieffects/gstexclusion.c:
+	* gst/gaudieffects/gstsolarize.c:
+	  gaudieffects: removing values only used once
+
+2015-03-23 11:13:24 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstburn.h:
+	* gst/gaudieffects/gstdilate.h:
+	* gst/gaudieffects/gstdodge.h:
+	* gst/gaudieffects/gstexclusion.h:
+	* gst/gaudieffects/gstsolarize.h:
+	  gaudieffects: small cleanup in headers
+
+2015-03-23 13:15:30 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: Set output format immediately after creating the encoder instance
+	  We know the caps by then, there's no need to wait until we actually receive
+	  the first buffer.
+
+2015-03-23 13:13:35 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	  opusenc: Remove another unused variable
+
+2015-03-23 13:11:42 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	* ext/opus/gstopusheader.c:
+	  opusenc: Remove useless headers and header_sent variables from the instance struct
+	  They are only used inside a single function.
+
+2015-03-23 12:24:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstrtpopusdepay.c:
+	* ext/opus/gstrtpopuspay.c:
+	  opus: Handle sprop-stereo and sprop-maxcapturerate RTP caps fields
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746617
+
+2015-03-23 12:09:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: Take channels and sample rate from the caps if we have no stream header
+
+2015-03-23 12:07:52 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: Reset the decoder if the caps change
+
+2015-03-23 11:57:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: Take output sample rate from the stream headers too
+	  This way we let opusdec do the resampling if needed and don't carry
+	  around buffers with a too high sample rate if not required.
+	  While Opus always uses 48kHz internally, this information from the
+	  header specifies which frequencies are safe to drop.
+
+2015-03-23 11:56:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusheader.c:
+	  opusheader: Put number of channels and sample rate into the caps
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746617
+
+2015-03-22 19:12:15 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: remove unused gl_thread field
+
+2015-03-22 19:03:19 +0100  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gldisplay: fix GThread leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746541
+
+2015-03-20 18:33:45 +0100  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: fix caps leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746541
+
+2015-03-18 11:25:42 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Add support for buffer list
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-19 16:17:58 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Do not drop all buffers in buffer list if one fails
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-19 13:59:42 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstdilate.c:
+	  gaudieffects: update copyright dates of dilate
+
+2015-03-19 13:58:21 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstdilate.c:
+	  gaudieffects: factorize transform code of dilate
+
+2015-03-19 14:04:28 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: Pass the connection instance as data to the thread pool
+	  No need to ref/unref the connection every time we push something on the pool.
+	  However we have to provide non-NULL data to the pool, so let's just give it
+	  some coffee.
+
+2015-03-19 13:55:53 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: Remove unused thread struct field
+
+2015-03-19 13:30:00 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsconnection.h:
+	* ext/dtls/gstdtlsenc.c:
+	  dtls: Use a shared thread pool for the timeouts
+	  This way we will share threads with other DTLS connections if possible, and
+	  don't have to start/stop threads for timeouts if there are many to be handled
+	  in a short period of time.
+	  Also use the system clock and async waiting on it for scheduling the timeouts.
+
+2015-03-18 18:17:39 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: Shutdown timeout thread when it's not needed
+	  It is not needed most of the time and usually we have a thread
+	  idling around doing nothing all the time after the first few seconds.
+
+2015-03-18 10:12:49 -0700  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl/docs: update some doc comments
+
+2015-03-18 17:40:47 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	  dtlsenc: Clear the queue when deactivating the pad
+
+2015-03-18 17:38:35 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlsenc.h:
+	  dtlsenc: Handle pad activity states properly
+
+2015-03-18 17:35:12 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	  dtlsenc: Don't manually activate/deactivate srcpad
+
+2015-03-18 10:47:15 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Separate buffer encoding functionality into a different function
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-18 10:16:41 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Add support for buffer list
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-18 09:39:49 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Add missing locks
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-18 09:17:31 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Split chain functionality so it can be reused for buffer list
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746387
+
+2015-03-18 13:52:38 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlsenc.h:
+	  dtlsenc: Use a GQueue instead of a GPtrArray
+	  Using a GPtrArray as a queue is not very efficient as the whole
+	  array has to be copied whenever an element is removed from the
+	  beginning.
+
+2015-03-18 10:06:47 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Fix locking
+	  Especially don't hold any mutex while adding/removing pads or pushing data.
+
+2015-03-18 09:57:32 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsdec.c:
+	  dtlsdec: Add support for buffer lists
+
+2015-03-18 09:46:40 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsconnection.h:
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsdec.h:
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlsenc.h:
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpenc.c:
+	* ext/dtls/gstdtlssrtpenc.h:
+	  dtls: Fix some search & replace mistakes from renaming the elements
+
+2015-03-17 16:49:54 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Improve memory management on chain function
+	  Avoiding copy the buffer twice, one while mapping and other with mencpy
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746356
+
+2015-03-17 16:50:41 +0100  Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: Fix typo in log
+
+2015-03-17 11:43:00 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsagent.c:
+	  dtls: Initialize debug category earlier
+	  Otherwise the openssl initialization will use it before initialization
+
+2014-11-13 20:39:11 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/.gitignore:
+	* tests/check/elements/audiointerleave.c:
+	  audiointerleave: Add unit tests
+	  Almost a copy of the "interleave" unit tests, improved to support
+	  the thread on the src pad on GstAggregator.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2015-03-06 13:49:48 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiointerleave.c:
+	* gst/audiomixer/gstaudiointerleave.h:
+	  audiointerleave: Set src caps in aggregate
+	  This prevents races between the setcaps of the sink pads
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2014-11-13 15:40:15 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/Makefile.am:
+	* gst/audiomixer/gstaudiointerleave.c:
+	* gst/audiomixer/gstaudiointerleave.h:
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiointerleave: Add interleave element based on audioaggregator
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2015-03-06 16:51:12 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Print a message when a buffer is late
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2014-11-15 17:54:51 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudioaggregator.c:
+	  audioaggregator: Don't re-send the caps if they did not change
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2014-11-06 17:15:17 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/Makefile.am:
+	* gst/audiomixer/gstaudioaggregator.c:
+	* gst/audiomixer/gstaudioaggregator.h:
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	  audioaggregator: Split base class from audiomixer
+	  Also:
+	  -  Don't modify size on early buffer
+	  The size is the size of the buffer, not of remaining part.
+	  - Use the input caps when manipulating the input buffer
+	  Also store in in the sink pad
+	  - Reply to the position query in bytes too
+	  - Put GAP flag on output if all inputs are GAP data
+	  - Only try to clip buffer if the incoming segment is in time or samples
+	  - Use incoming segment with incoming timestamp
+	  Handle non-time segments and NONE timestamps
+	  - Don't reset the position when pushing out new caps
+	  - Make a number of member variables private
+	  - Correctly handle case where no pad has a buffer
+	  If none of the pads have buffers that can be handled, don't claim to be EOS.
+	  - Ensure proper locking
+	  - Only support time segments
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740236
+
+2015-03-07 22:08:40 -0500  Olivier Crête <olivier.crete@ocrete.ca>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Release pad object lock before dropping buffer
+	  Otherwise, the locking order is violated and deadlocks happen.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-06 20:22:13 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Only ignore pads with no buffers on timeout
+	  When the timeout is reached, only ignore pads with no buffers, iterate
+	  over the other pads until all buffers have been read. This is important
+	  in the cases where the input buffers are smaller than the output buffer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-06 21:12:13 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Be more aggressive with invalid replies to our latency query
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-06 20:25:03 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Only advance by the buffer size when a buffer is late
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745768
+
+2015-03-16 17:49:58 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlscertificate.c:
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: make sure we actually log into the right debug category
+	  GST_DTLS_USE_GST_LOG is not defined anywhere, so
+	  we'd just log into the default category by accident.
+	  We use the gst logging system unconditionally now,
+	  so might just as well remove this #if #else.
+
+2015-03-16 17:36:49 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: fix some more compiler warnings
+	  gcc-4.9.2:
+	  gstdtlsagent.c:114:1: error: old-style function definition
+	  gstdtlsconnection.c:253:3: error: ISO C90 forbids mixed declarations and code
+	  gstdtlsconnection.c:291:3: error: ISO C90 forbids mixed declarations and code
+	  gstdtlsconnection.c:391:3: error: ISO C90 forbids mixed declarations and code
+	  gstdtlsconnection.c:434:3: error: ISO C90 forbids mixed declarations and code
+	  gstdtlsconnection.c:773:1: error: 'BIO_s_gst_dtls_connection' was used with no prototype before its definition
+	  gstdtlsconnection.c:773:1: error: old-style function definition
+
+2015-03-16 17:53:11 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/Makefile.am:
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlscertificate.c:
+	* ext/dtls/gstdtlscommon.h:
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlssrtpdec.c:
+	  dtls: Unconditionally use GStreamer debug log system
+
+2015-03-16 17:48:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlsagent.h:
+	* ext/dtls/gstdtlscertificate.c:
+	* ext/dtls/gstdtlscertificate.h:
+	* ext/dtls/gstdtlscommon.h:
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsconnection.h:
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsdec.h:
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlsenc.h:
+	* ext/dtls/gstdtlssrtpbin.c:
+	* ext/dtls/gstdtlssrtpbin.h:
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpdec.h:
+	* ext/dtls/gstdtlssrtpdemux.c:
+	* ext/dtls/gstdtlssrtpdemux.h:
+	* ext/dtls/gstdtlssrtpenc.c:
+	* ext/dtls/gstdtlssrtpenc.h:
+	* ext/dtls/plugin.c:
+	  dtls: Re-namespace from Er to Gst
+
+2015-03-16 17:35:29 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsconnection.c:
+	  dtls: Fix some compiler warnings
+	  gstdtlsconnection.c:128:32: error: passing 'const char [30]' to parameter of type 'void *'
+	  discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
+	  SSL_get_ex_new_index (0, "gstdtlsagent connection index", NULL, NULL,
+	  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	  /usr/include/openssl/ssl.h:1981:43: note: passing argument to parameter 'argp' here
+	  int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
+	  ^
+	  gstdtlsconnection.c:822:40: error: arithmetic on a pointer to void is a GNU extension
+	  [-Werror,-Wpointer-arith]
+	  memcpy (out_buffer, priv->bio_buffer + priv->bio_buffer_offset, copy_size);
+	  ~~~~~~~~~~~~~~~~ ^
+
+2015-03-16 17:34:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlscertificate.c:
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlssrtpbin.c:
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpdemux.c:
+	* ext/dtls/gstdtlssrtpenc.c:
+	* ext/dtls/plugin.c:
+	  dtls: Fix indention
+
+2015-03-16 17:33:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/dtls/Makefile.am:
+	* ext/dtls/gstdtlsagent.c:
+	* ext/dtls/gstdtlsagent.h:
+	* ext/dtls/gstdtlscertificate.c:
+	* ext/dtls/gstdtlscertificate.h:
+	* ext/dtls/gstdtlscommon.h:
+	* ext/dtls/gstdtlsconnection.c:
+	* ext/dtls/gstdtlsconnection.h:
+	* ext/dtls/gstdtlsdec.c:
+	* ext/dtls/gstdtlsdec.h:
+	* ext/dtls/gstdtlsenc.c:
+	* ext/dtls/gstdtlsenc.h:
+	* ext/dtls/gstdtlssrtpbin.c:
+	* ext/dtls/gstdtlssrtpbin.h:
+	* ext/dtls/gstdtlssrtpdec.c:
+	* ext/dtls/gstdtlssrtpdec.h:
+	* ext/dtls/gstdtlssrtpdemux.c:
+	* ext/dtls/gstdtlssrtpdemux.h:
+	* ext/dtls/gstdtlssrtpenc.c:
+	* ext/dtls/gstdtlssrtpenc.h:
+	* ext/dtls/plugin.c:
+	  dtls: Add new DTLS plugin
+	  This is a copy of the Ericsson DTLS plugin from
+	  https://github.com/EricssonResearch/openwebrtc-gst-plugins/tree/master/ext/erdtls/src
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744582
+
+2015-03-16 03:53:33 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/compositor/compositororc.orc:
+	  compositor: Revert most of previous patch.
+	  The calculation doesn't produce the same results.
+	  Keep just the change to divide alpha by 255 instead of 256,
+	  for slightly better accuracy
+
+2015-03-15 16:55:00 +0000  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Add helpers for calling static methods
+
+2015-03-15 16:38:29 +0000  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Fix indention
+
+2014-06-05 10:33:56 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Add more JNI helper functions
+
+2014-06-02 12:37:09 +0100  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* sys/androidmedia/Makefile.am:
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstjniutils.c:
+	* sys/androidmedia/gstjniutils.h:
+	  androidmedia: Split jni code to gstjniutils.c
+
+2015-03-15 16:10:31 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: drop some superfluous assertions
+	  g_return_*_if_fail() is for public API to catch
+	  programming errors. For internal code, we should
+	  just use g_assert() to check internal state.
+
+2015-03-15 15:54:01 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/mpegtsmux.c:
+	  tests: mpegtsmux: add test for keyframe/delta flag propagation
+	  The first output MPEG-TS packet that corresponds to a video input
+	  buffer which had the delta flag cleared (i.e. was a keyframe)
+	  should have the delta flag cleared as well.
+	  This is needed e.g. by tcpserversink in order to keep track
+	  of the last keyframe and be able to burst data to newly-
+	  connected clients.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=706872
+
+2015-03-15 14:35:15 +0000  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* docs/libs/gst-plugins-bad-libs.types:
+	  gl/docs: add missing functions/objects
+
+2015-03-15 12:58:26 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gldisplay: tentative proper context collision detection
+	  Fixes
+	  tee name=t ! queue ! gliamgesink t. ! queue ! glimagesink
+
+2014-07-18 10:44:59 +0200  Jesper Larsen <knorr.jesper@gmail.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: Fix namespace of some internal functions
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733347
+
+2015-03-16 00:22:14 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/compositor/compositororc.orc:
+	  compositor: Fix blending functions
+	  Correctly calculate alpha in a few places by dividing by 255,
+	  not 256.
+	  Fix the argb and bgra blending functions to avoid an off-by-one
+	  error in the calculations, so painting with alpha = 0xff doesn't
+	  ever bleed through from behind
+
+2015-03-15 12:06:22 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/mpegtsmux.c:
+	  tests: mpegtsmux: add unit test for "alignment" property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=722129
+
+2015-03-14 15:27:39 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: make "alignment" property more useful for packetisation
+	  Currently the alignment property just makes sure that we
+	  output things in multiples of align*packet_size bytes, but
+	  with no clear maximum size. When streaming MPEG-TS over
+	  UDP one wants buffers with a maximum packet size of 1316.
+	  The alignment property so far would just output buffers
+	  that are a multiple of 1316 then.
+	  Instead we now make the alignment property output
+	  individual buffers with the alignment size, which
+	  is entirely backwards compatible with the expected
+	  behaviour up until now. For efficiency reason
+	  collect all those buffers in a buffer list and
+	  send that downstream.
+	  Also collect data to push downstream in a buffer
+	  list from the adapter if we don't align things,
+	  which is still more efficient because of the
+	  silly way the muxer currently creates output
+	  packets.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=722129
+
+2015-03-11 23:03:24 +0800  xixi <xixi10111011@gmail.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: fetch wrong segment at the end of Period
+	  Fix check for end of Period time to avoid trying
+	  to fetch a segment that doesn't exist
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746038
+
+2015-03-14 19:48:21 +0100  Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+	* ext/gl/gstgluploadelement.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: move meta-data copy into gst-gl library
+	  In some upload implementations the out buffer has more than one references,
+	  turning the buffer not writable, so it won't be possible to modify its
+	  meta-data.
+	  This patch moves the meta-data copy before increasing the reference of the out
+	  buffer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746173
+
+2015-03-14 18:45:01 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: fix the slight difference between EXT_rg and ARB_rg
+	  GL_EXT_texture_rg doesn't take sized formats for the internalformat
+	  parameter of TexImage* but GL_ARB_texture_rg and GL(ES)3 do.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732507
+
+2015-03-14 17:29:02 +0000  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	  camerabin: remove hack around bug 648359
+	  It is already fixed
+
+2015-03-14 12:24:53 +0000  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	  camerabin: remove deprecated g_atomic function
+	  We depend on 2.32 already
+
+2015-03-14 11:45:20 +0000  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: fix pad leak
+	  Only get the pad if it is really going to be used to avoid
+	  leaking it
+
+2015-03-14 18:10:24 +0000  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/generic/cube/main.cpp:
+	  gl/examples: fixup generic cube example for NDC
+	  translating outside the clip region doesn't work
+
+2015-03-14 15:38:28 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/examples/gl/sdl/.gitignore:
+	* tests/examples/gl/sdl/Makefile.am:
+	* tests/examples/gl/sdl/sdlshare2.c:
+	  gl/examples: add sdlshare2 that uses glimagesink to output textures
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739681
+
+2015-03-14 16:30:42 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: keep window invisible when sharing output
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739681
+
+2015-03-14 15:16:55 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	* tests/examples/gl/generic/cube/Makefile.am:
+	* tests/examples/gl/generic/cube/main.cpp:
+	* tests/examples/gl/generic/cubeyuv/Makefile.am:
+	* tests/examples/gl/generic/cubeyuv/main.cpp:
+	* tests/examples/gl/generic/doublecube/Makefile.am:
+	* tests/examples/gl/generic/doublecube/main.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp:
+	  glimagesink: provide GstSample in client-draw signal
+	  Instead of prividing texture and size directly.
+	  And apply changes to examples.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739681
+
+2015-03-14 15:37:05 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/examples/gl/sdl/sdlshare.c:
+	  sdlshare: use glupload and unmap frame
+
+2015-03-14 16:25:29 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	* gst-libs/gst/gl/gstglsyncmeta.h:
+	  glsyncmeta: make context to wait and set sync explicit
+	  otherwise we may wait on a sync object in same context by accident
+
+2015-03-14 15:16:01 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: fix build
+	  Was supposed to be squashed into earlier commit.
+
+2015-03-14 15:15:02 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* 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/plugin-assrender.xml:
+	* docs/plugins/inspect/plugin-dvbsuboverlay.xml:
+	* docs/plugins/inspect/plugin-inter.xml:
+	* docs/plugins/inspect/plugin-jpegformat.xml:
+	* docs/plugins/inspect/plugin-resindvd.xml:
+	  docs: update plugin docs
+
+2015-03-14 14:43:37 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* sys/Makefile.am:
+	* sys/osxvideo/Makefile.am:
+	* sys/osxvideo/osxvideoplugin.c:
+	* sys/osxvideo/osxvideosrc.c:
+	* sys/osxvideo/osxvideosrc.h:
+	  Remove unported and useless osxvideosrc element
+	  There are other elements for this now.
+
+2015-03-13 18:24:43 +0000  Ramiro Polla <ramiro.polla@collabora.co.uk>
+
+	* gst/sdp/gstsdpdemux.c:
+	  sdpdemux: properly escape percent sign in documentation
+
+2015-03-14 12:58:22 +0000  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Add NULL check in error case
+	  Other context may be NULL if something went wrong. Avoid trying to unref
+	  a NULL pointer.
+
+2015-03-14 11:01:12 +0000  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	  gl: fix a couple of typos in configure.ac
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744020
+
+2015-03-14 10:39:06 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstgluploadelement.c:
+	  glupload/colorconvert: only copy timestamps if the input buffer != output
+
+2015-03-11 00:06:55 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/Makefile.am:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gl: add GstGLDisplayCocoa
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746012
+
+2015-03-13 09:07:16 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/examples/gl/cocoa/cocoa-videooverlay.m:
+	  examples: initialize NSApp at the beginning
+
+2015-03-14 07:49:14 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: do not terminate loop in gst_gl_window_cocoa_close
+	  It is now done in _finalize.
+	  Fix regression introduced by
+	  "gl/window: create the main loop/context on init/finalize"
+	  bc7a7259f357b0065dd94e0668b5a895d83fa53a
+
+2015-03-13 15:34:55 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglutils.c:
+	  gl: avoid overwriting display and context to NULL
+	  It happens when the application provides display
+	  and/or context.
+
+2015-03-13 17:41:17 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gltestsrc.c:
+	* gst-libs/gst/gl/gstglshader.c:
+	  glshader: attribute locations are -1 on error
+
+2015-03-13 17:04:17 +0000  Neos3452 <neos3452@gmail.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	  glshader: prevent from getting attributes without vertex shader
+	  It doesn't make sense to query for vertex attributes without a vertex
+	  shader. Moreover this is causing a crash on OSX.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746168
+
+2015-03-14 02:53:00 +1100  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/gstglfilterbin.c:
+	  GL: Remove annoying printf in the filterbin class_init
+
+2015-03-12 09:27:30 +0100  ijsf <ijsf@gmx.net>
+
+	* sys/applemedia/avfvideosrc.m:
+	  Restricted activeVideoMaxFrameDuration to fix frame rate
+
+2015-03-13 12:43:13 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: add pixel-aspect-ratio property on the bin
+
+2015-03-13 12:40:04 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: unref the bufferpool
+
+2015-03-13 12:29:54 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: forward ALL the properties on the bin
+
+2015-03-13 12:28:36 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgluploadelement.c:
+	  gluploadelement: properly unref buffers that are the same as the input
+	  basetransform doesn't unref equal input and output buffers
+
+2015-03-13 10:25:35 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectbulge.c:
+	* ext/gl/effects/gstgleffectfisheye.c:
+	* ext/gl/effects/gstgleffectglow.c:
+	* ext/gl/effects/gstgleffectidentity.c:
+	* ext/gl/effects/gstgleffectlumatocurve.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectrgbtocurve.c:
+	* ext/gl/effects/gstgleffectsin.c:
+	* ext/gl/effects/gstgleffectsquare.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/effects/gstgleffectstretch.c:
+	* ext/gl/effects/gstgleffecttunnel.c:
+	* ext/gl/effects/gstgleffecttwirl.c:
+	* ext/gl/effects/gstgleffectxray.c:
+	* ext/gl/gstglbumper.c:
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstgldeinterlace.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfilterapp.c:
+	* ext/gl/gstglfilterblur.c:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglfilterlaplacian.c:
+	* ext/gl/gstglfilterreflectedscreen.c:
+	* ext/gl/gstglfiltershader.c:
+	* ext/gl/gstglfiltersobel.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  gl: get the context from basemixer/basefilter
+
+2015-03-13 09:38:54 +0000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: retreive the gldisplay/app gl context as soon as possible
+	  fixes the usage of gst_gl_display_filter_gl_api
+
+2015-03-13 09:37:46 +0000  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglcontext.c:
+	  gl/tests: fix deadlock on glcontext wrapped context test
+
+2015-03-12 16:46:44 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: cache indices in a buffer object
+
+2015-03-12 17:11:31 +0000  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Fix discont detection and buffer alignment code
+	  Actually accumulate the sample counter to check the accumulated error
+	  between actual timestamps and expected ones instead of just resetting
+	  the error back to 0 with every new buffer.
+	  Also don't reset discont_time whenever we don't resync. The whole point of
+	  discont_time is to remember when we first detected a discont until we actually
+	  act on it a bit later if the discont stayed around for discont_wait time.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=746032
+
+2015-03-08 18:16:04 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.h:
+	* ext/gl/caopengllayersink.m:
+	* ext/gl/gstopengl.c:
+	  caopengllayersink: implement as a bin like glimagesink
+
+2015-03-03 18:05:04 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: avoid deadlock when creating context on the main thread.
+	  Make window/view creation async so that it is possible to
+	  gst_gl_context_create from the main thread.
+
+2015-03-03 17:26:47 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldisplay.h:
+	  gl: store the list of contexts within gldisplay
+	  Removes the reliance on the allocation query to propogate GL contexts.
+	  Allows thread safely getting a context for the a specific thread.
+
+2015-03-03 16:48:24 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: unset the current shader after rendering
+	  fixes gltestsrc ! glimagesink when gltestsrc doesn't use a shader
+
+2015-03-03 16:38:56 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltestsrc.h:
+	  gltestsrc: remove usage of gldownload library object
+
+2015-02-28 00:30:38 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  glcontext: store the thread current context
+
+2015-02-26 18:26:36 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglsrcbin.c:
+	* ext/gl/gstglsrcbin.h:
+	* ext/gl/gstopengl.c:
+	  gl: new glsrcbin element
+
+2015-02-26 13:45:56 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	* ext/gl/gstopengl.c:
+	  glvideomixer: implement with glmixerbin
+	  The relevant properties are forwarded to/from the containing bin
+	  and sink pads.
+
+2015-02-26 00:20:37 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	  glmixer: remove usage of upload/download objects
+
+2015-02-25 23:48:56 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglmixerbin.c:
+	* ext/gl/gstglmixerbin.h:
+	* ext/gl/gstopengl.c:
+	  gl: new glmixerbin element
+
+2015-02-20 16:47:01 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstopengl.c:
+	  glimagesink: implement as a bin
+	  glupload ! glcolorconvert ! sink
+	  Some properties are manually forwarded.  The rest are available using
+	  GstChildProxy.
+	  The two signals are forwarded as well.
+
+2015-02-19 18:23:37 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglsinkbin.c:
+	* ext/gl/gstglsinkbin.h:
+	* ext/gl/gstopengl.c:
+	  gl: new glsinkbin element
+	  similar to glfilterbin but for sinks
+
+2015-02-19 14:19:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: don't use the library upload/convert objects
+
+2015-02-19 13:33:28 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglfilterbin.c:
+	* ext/gl/gstglfilterbin.h:
+	* ext/gl/gstopengl.c:
+	  gl: new element glfilterbin
+	  It encapsulates a confiurable GL processing element in the
+	  upload/colorconvert/download dance required to transparently process
+	  the majority of GstBuffer's.
+
+2015-02-19 13:24:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstgldownloadelement.c:
+	* ext/gl/gstgldownloadelement.h:
+	* ext/gl/gstopengl.c:
+	  gl: add new gldownloadelement
+	  Simply transforms caps to/from raw/glmemory capsfeatures
+
+2015-02-12 17:59:27 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglcolorconvertelement.c:
+	* ext/gl/gstglcolorconvertelement.h:
+	* ext/gl/gstopengl.c:
+	  gl: add a new glcolorconvert element based on the glcolorconvert library object
+
+2015-03-11 16:56:16 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: implement propose_allocation pool handling for glmemory upload
+
+2015-02-11 23:29:01 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstgluploadelement.c:
+	* ext/gl/gstgluploadelement.h:
+	* ext/gl/gstopengl.c:
+	  gl: add a new glupload element based on the glupload library object
+
+2015-02-11 14:48:45 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglbasemixer.c:
+	* ext/gl/gstglbasemixer.h:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglmixerpad.h:
+	* ext/gl/gstglvideomixer.h:
+	  gl: add a new glbasemixer class below glmixer
+	  It deals with propagating the gl display/contexts throughout the
+	  application/pipeline
+
+2015-02-11 01:48:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglbasefilter.c:
+	* gst-libs/gst/gl/gstglbasefilter.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  gl: add a new glbasefilter class below glfilter
+	  It deals with propagating the gl display/contexts throughout the
+	  application/pipeline
+
+2015-02-11 01:27:28 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  glutils: expose running a query on a set of src/sink pads
+
+2015-03-12 12:49:40 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	  opusenc: replace cbr and constrained-vbr properties with an enum
+	  It was deemed confusing before.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744909
+
+2015-03-12 10:14:50 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: advertise resize in the caps negotiation properly
+
+2015-03-12 01:49:58 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Add locking to fill_buffer and fix mix_buffer
+	  The audiomixer pad struct fields may be changed from other threads
+
+2015-03-12 01:56:44 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	  audiomixer: Mark a discont when we receive a new segment event
+	  This allows us to handle new segment events correctly; either by dropping
+	  buffers or inserting silence; for example if the offset is changed on an srcpad
+	  connected to audiomixer.
+
+2015-03-12 09:46:02 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: we don't do resizing of the video frames
+	  As we cannot do accurate texel sampling then due to the texture
+	  coordinates being interpolated based on the output frame size.
+
+2015-01-20 19:53:09 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: While aggregating, sync values for all pads before converting frames
+
+2015-03-11 18:49:22 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/x11: don't XGetWindowAttributes every XEvent
+	  fixes a deadlock in xcb where the X window may not exist.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745633
+
+2015-03-11 14:50:28 +0000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	  gl/window: hopefully fixup compile warnings on android/ios
+
+2015-03-11 17:19:17 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: Remove redundant check for clearing context on reset.
+	  The context is already cleared a few lines above.
+
+2015-03-11 16:55:14 +1100  Jan Schmidt <jan@centricular.com>
+
+	* ext/dash/gstisoff.c:
+	* ext/dc1394/gstdc1394.c:
+	* ext/openjpeg/gstopenjpegenc.c:
+	* ext/resindvd/gstmpegdesc.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/gl/egl/gsteglimagememory.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/insertbin/gstinsertbin.c:
+	* gst-libs/gst/mpegts/gstmpegtsdescriptor.c:
+	* gst/mxf/mxfmetadata.c:
+	* gst/siren/gstsirendec.c:
+	* gst/videomeasure/gstvideomeasure_ssim.c:
+	* sys/acmenc/acmenc.c:
+	* sys/vdpau/gstvdpvideobufferpool.c:
+	  Remove a bunch of silly ';;' typos at the end of lines
+
+2015-03-06 15:31:18 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/window: create the main loop/context on init/finalize
+	  Avoids races setting the window handle from the main thread.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745633
+
+2015-03-08 02:04:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregatory: don't redefine GST_FLOW_CUSTOM_SUCCESS
+
+2015-03-04 11:12:32 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	  androidmedia: Remove unused label/variable
+
+2015-03-10 15:31:21 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix get_presentation_offset check.
+	  And return 0 isntead of FALSE.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745455
+
+2015-03-02 14:00:03 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: implement get_presentation_offset.
+	  To account for presentationTimeOffset as per section 7.2.1 .
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745455
+
+2015-03-02 13:53:03 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: [API]: get_presentation_offset virtual method.
+	  Asks the subclass for a potential time offset to apply to each
+	  separate stream, in dash streams can have "presentation time offsets",
+	  which can be different for each stream.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745455
+
+2015-03-06 12:24:44 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* ext/dash/gstmpdparser.c:
+	  gstmpdparser: Really set the default value for startNumber.
+	  + The specs ask for a default of 1, the current code only did
+	  set a default when the field was present.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745455
+
+2015-03-09 11:11:16 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/videoparsers/gstmpegvideoparse.c:
+	  videoparser: unused value
+	  Value set in off will be immediately overwritten after going to next.
+	  CID #1226476
+
+2015-03-09 12:51:21 +0900  hoonhee.lee <hoonhee.lee@lge.com>
+
+	* gst/y4m/gsty4mdec.c:
+	  y4mdec: remove unnecessary semicolon
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745877
+
+2015-03-09 12:41:59 +0900  hoonhee.lee <hoonhee.lee@lge.com>
+
+	* tests/check/libs/gstglcontext.c:
+	  tests: glcontext: remove unnecessary semicolon
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745875
+
+2015-03-06 14:49:20 +0200  Mohammed Hassan <mohammed.hassan@jolla.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	  camerabin: update zoom param spec if video source changes its max-zoom
+	  If the video source happens to allow max-zoom to be greater than our maximum hard coded
+	  value of 10 then the user cannot set anything greater than our maximum specified in the
+	  param spec. We have to update our param spec to prevent glib from capping the value
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745740
+
+2015-03-07 10:28:35 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/plugin.m:
+	* sys/applemedia/vtdec.c:
+	* sys/applemedia/vtdec.h:
+	  vtdec: Register a hardware-only vtdec_hw on OSX and give it a higher rank
+	  while having the default vtdec at secondary rank. This allows decodebin/playbin
+	  to prefer the hardware based decoders, and if that fails to initialize because
+	  hardware resources are busy to fall back to e.g. the libav based h264 decoder
+	  instead of the software based vtdec (which is slower), and only fall back to
+	  the software based vtdec if there is no higher ranked decoder available.
+
+2015-03-06 20:11:00 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: Don't share our downstream pool with upstream
+	  Pool cannot have multiple owner. This can lead to spurious
+	  pool was flushing error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=74570
+
+2015-03-05 16:28:36 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: Don't chain downstream pool
+	  Chaining a downstream pool would lead to two owner of the same
+	  pool. In dynamic pipeline, if one owner is removed from the pipeline
+	  the pool will be stopped, and the rest of the pipeline will fail
+	  since the pool will now be flushing. Also fix proposed pool caching,
+	  filter->pool was never set, never unrefed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745705
+
+2015-03-05 15:49:50 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Only cache pool, don't manage it
+	  GLImage does not use any kind of internal pool. There was some
+	  remaining code and comment stating that it was managing the
+	  pool, and it was in fact setting the active state when doing
+	  to ready state.
+	  * Only create the pool if requested and in propose_allocation
+	  * Cache the pool to avoid reallocation on spurious reconfigure
+	  * Don't try to deactivate the pool (we don't own it)
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745705
+
+2015-03-06 12:07:47 -0500  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	  pngparse: stop spamming info messages
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745755
+
+2015-03-06 18:54:24 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstgldownload.c:
+	  gldownload: Simplify caps feature setting code
+
+2015-03-06 18:15:11 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller
+	  ... and let glmixer actually transform the caps it is supposed to transform
+	  instead of inventing new caps.
+
+2015-03-06 18:49:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  Revert "videoaggregator: Create new caps from the video-info"
+	  This reverts commit 78215be0dfbb4e8ed4f249e161a94c644328d28d.
+	  because it broke glvideomixer with custom caps features.
+
+2015-03-06 18:36:12 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Simplify caps feature setting code
+
+2015-03-06 14:54:41 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtp: donl_present variable unused
+	  donl_present is not implemented, yet the value is set and checked a few times.
+	  Cleaning this.
+	  CID #1249687
+
+2015-03-06 14:27:44 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegtsmux/tsmux/tsmuxstream.c:
+	  mpegtsmux: fall through switch statement
+	  Adding a comment makes coverity happy and quells the issue.
+	  CID #1139748
+
+2015-03-06 14:36:26 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Create new caps from the video-info
+	  In case the original caps were missing some optional fields like
+	  interlace-mode. We assume default values for those everywhere,
+	  but they can still cause negotiation to fail if a downstream element
+	  expects the field to be there and at a specific value.
+
+2015-02-25 13:52:21 +0100  Florian Zwoch <fzwoch@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: allow "capture-screen" mode to select which screen to capture via the "device-index" option
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745161
+
+2015-03-05 19:09:49 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gldisplay: Only use debugging if we have valid values
+	  The debug category won't have been created/activated if it's not a
+	  valid display
+
+2015-03-05 15:54:55 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opencv/motioncells_wrapper.cpp:
+	  motioncells: protect against not found id
+	  If searchIdx() doesn't find the id it returns -1, which breaks
+	  motioncelssvector.at (idx). Check for it and return if not found.
+	  Changing a few other lines for style consistency.
+
+2015-03-05 15:34:09 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  opencv: remove always-true check
+	  filter->cvImage has just been used/dereferenced, there would be an error
+	  there if the pointer was NULL. No need to check since it will always be true.
+
+2015-03-04 16:13:30 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Calculate the duration more accurately from the capture time and numbers of samples
+	  This should prevent any accumulating rounding errors with the duration.
+
+2015-03-04 16:05:28 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Fix the timestamp and offset calculations even more
+
+2015-03-04 16:04:18 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Don't subtract the duration from the capture time
+	  We already have the real capture time, not the time when we received
+	  the end of the packet.
+
+2015-03-04 13:16:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  Revert "audiomixer: Latency is twice the output buffer duration, not only once"
+	  This reverts commit d387cf67df91b59540f32ee17b4c02f747969add.
+	  The analysis was wrong: The first 20ms of latency are introduced by the source
+	  already and put into the latency query, making it only necessary to cover the
+	  additional 20ms of audiomixer inside audiomixer.
+
+2015-03-04 09:24:27 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstopusdec.c:
+	  opusdec: fix latency query in FEC case
+	  The max latency parameter is "the maximum time an element
+	  synchronizing to the clock is allowed to wait for receiving all
+	  data for the current running time" (docs/design/part-latency.txt).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744338
+
+2015-03-03 11:42:09 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: reset the parser information when caps changes
+	  This prevents it from going into passthrough after receiving 2
+	  byte-stream caps (different ones) as it would keep the have_pps and
+	  have_sps set to true and would just go into passthrough without
+	  updating its caps.
+	  This patch makes it reset its stream information to restart properly
+	  when new caps are received.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745409
+
+2015-03-03 17:47:51 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: set timestamp on discont buffers
+	  Make sure discont buffers have its timestamp set to allow downstream
+	  to resync if needed
+
+2012-03-22 08:47:57 +0100  Oleksij Rempel <bug-track@fisher-privat.net>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	  camerabin2: check negotiated caps avoid reseting of the pipe
+	  To avoid useless renegotiation of the pipe we can check for
+	  negotiated caps on src_filter and compare it with requested
+	  filter. If the caps intersect, avoid restart.
+	  Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=672610
+
+2015-03-02 01:08:15 +0300  Ilya Averyanov <i.averyanov@geoscan.aero>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: Remove duplicate code
+	  The muxer is already allocated in reset(), which is called soon afterwards.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745506
+
+2015-03-03 10:12:11 +0800  Song Bing <b06498@freescale.com>
+
+	* gst/dvbsuboverlay/gstdvbsuboverlay.c:
+	  dvbsuboverlay: Set query ALLOCATION need_pool to FALSE
+	  Set query ALLOCATION need_pool to FALSE as it only need query if can
+	  support video overlay composition meta.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745495
+
+2015-03-04 14:38:36 +1100  Matthew Waters <matthew@centricular.com>
+
+	* sys/applemedia/avsamplevideosink.h:
+	* sys/applemedia/avsamplevideosink.m:
+	  applemedia/avsamplesink: utilise a pull based approach of displaying video frames
+	  Using requestMediaDataWhenReadyOnQueue the layer will execute a block
+	  when it would like more frames. Using this we can provide the current
+	  frame and avoid needlessly filling the layer's buffer queue causing
+	  older frames to be displayed when under resource pressure.
+
+2015-03-03 15:22:38 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: Fix upside down and miss-aligned JPEG
+	  LibJPEG uses macroblock of 8x8 sample. In this element we use RGB and
+	  Y444, two 24bit formats that are stored in 32bit pixels. This mean we
+	  have 32x32 bytes macroblocks. For this reason, we need to allocate
+	  our buffer slightly larger. We also need to pass the line pointer in
+	  the right order, otherwise the image endup upside-down.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745109
+
+2015-03-03 20:03:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Latency is twice the output buffer duration, not only once
+	  Let's assume a source that outputs outputs 20ms buffers, and audiomixer having
+	  a 20ms output buffer duration. However timestamps don't align perfectly, the
+	  source buffers are offsetted by 5ms.
+	  For our ASCII art picture, each letter is 5ms, each pipe is the start of a
+	  20ms buffer. So what happens is the following:
+	  0   20  40  60
+	  OOOOOOOOOOOOOOOO
+	  |   |   |   |
+	  5   25  45  65
+	  IIIIIIIIIIIIIIII
+	  |   |   |   |
+	  This means that the second output buffer (20 to 40ms) only gets its last 5ms
+	  at time 45ms (the timestamp of the next buffer is the time when the buffer
+	  arrives). But if we only have a latency of 20ms, we would wait until 40ms
+	  to generate the output buffer and miss the last 5ms of the input buffer.
+
+2015-02-18 21:21:01 -0500  Xavier Claessens <xavier.claessens@collabora.com>
+
+	  gltransformation: normalize translations
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744763
+	  * Lubosz: use maxfloat for transformation range
+
+2015-02-18 20:41:14 -0500  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: Fix doc typo
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744763
+
+2015-03-03 13:45:46 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: Get rid of uploader if caps have changed
+	  We need to update the uploader format if that caps have changed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745549
+
+2015-03-03 16:50:30 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/wayland/wlshmallocator.c:
+	  waylandsink: g_mkstemp is safer than mkstep
+
+2015-03-03 16:49:07 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/wayland/wlshmallocator.c:
+	  Revert "waylandsink: mkstemp requires setting permission mask"
+	  This reverts commit 1890e7355a5464fcfff58633851265b3fc7a3731.
+	  Better to use g_mkstemp that takes care of the mask without affecting the
+	  entire process.
+
+2015-03-03 16:55:26 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  gl: Fix context leaks
+	  Introduced by a12ca13750a15300ab3c718ebde2984dc3d587b3
+
+2015-03-03 16:23:40 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/asfmux/gstasfmux.c:
+	  asfmux: remove unnecessary conditional
+	  The two branches of the if conditional are identical, which means in all cases
+	  the same gst_asf_put_guid() will be executed. Do it directly.
+	  CID #1226448
+
+2015-03-03 15:51:50 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/wayland/wlshmallocator.c:
+	  waylandsink: mkstemp requires setting permission mask
+	  Using mkstemp without setting the permission mask is potentially harmful.
+	  POSIX specification of mkstemp() does not say anything about file modes, so we
+	  need to make sure its file mode creation mask is set appropriately before
+	  calling it.
+
+2015-03-02 16:45:45 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Reset the clock calibration when unsetting the master clock
+	  Otherwise the old calibration will stick around for the next time we use it,
+	  potentially giving us completely wrong times.
+
+2015-03-02 13:57:24 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink{audio,video}src: Add some more debug output
+
+2015-02-12 13:43:30 +0100  DanielD10 <d.dedisse@vogo.fr>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Incorrect frame rate for interlaced modes
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744386
+
+2015-03-01 19:57:23 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: register only one custom nsapp loop
+	  Otherwise the pipeline stalls when running
+	  more than one glimagesink with gst-launch.
+	  Also only register the custom nsapp loop
+	  when setting up the nsapp from gstgl.
+
+2015-03-01 16:54:10 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: instead of class_init use g_once to setup nsapp
+
+2015-02-26 23:04:09 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: check for deprecated constants prior to OSX 10.10
+
+2015-03-01 09:43:32 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	  glbufferpool: Fix offset for odd height
+	  We also need to recalculate the offset, since otherwise the frame
+	  mapping will be forward two lines in the U and V planes (I420) due
+	  to gst_video_info_align() round up the Y plane to a even number of
+	  lines.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745054
+
+2015-03-01 00:08:42 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* tests/check/libs/gstglmemory.c:
+	  gl-test: Port unit tests to new API
+
+2015-02-28 15:00:13 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Support offset when downloading
+	  Make sure we support offset and video alignment when downloading too.
+	  This is currently not used (plane_start is always 0), but it makes
+	  the code correct if we want to use that later.
+
+2015-02-28 13:01:16 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Provide correct size on upload
+	  Provide the right size to GL when uploading. Using maxsize is wrong
+	  since we offset the data point with the memory offset and video
+	  alignement offset.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744246
+
+2015-02-28 12:48:03 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Provide correct size on download
+	  Provide the right size to GL when downloading. This fixes downloading
+	  from GLMemory that where created for libav.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744246
+
+2015-02-28 11:55:26 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: Use fallback for partial copy
+	  When the memory is partial copy, the texture size and videoinfo no
+	  longer make sense. As we cannot guess what the application wants, we
+	  safely copy into a sysmem memory.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744246
+
+2015-02-25 18:07:03 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/gl/gstgloverlay.c:
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	  glmemory: Add GstAllocationParams and alignment support
+	  This implements support for GstAllocationParams and memory alignments.
+	  The parameters where simply ignored which could lead to crash on
+	  certain platform when used with libav and no luck.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744246
+
+2015-02-28 18:21:33 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: perform egl upload on the gl thread
+	  Fixes EGLImage usage on raspberry pi
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743914
+
+2015-02-27 11:07:34 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Fix scaling with rate of internal/external clock
+
+2015-02-27 00:26:00 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Use standard upstream latency querying logic
+	  The same functionality is duplicated in the default latency querying
+	  now.
+
+2015-02-27 00:01:41 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: Use default upstream latency querying logic
+	  We can rely on the standard upstream latency querying logic and then add
+	  our own latency.
+
+2015-02-26 13:20:26 +0100  Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Set freed method implementation to NULL
+	  When trying to render buffers with meta:GLTextureUpload the glimagesink crashes
+	  with a segmentation fault.
+	  This patch workarounds this crash setting to NULL the method implementation
+	  after free.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745206
+
+2015-02-25 14:48:59 +0100  Roman Nowicki <r.nowicki@sims.pl>
+
+	* sys/d3dvideosink/d3dhelpers.c:
+	  d3dvideosink: release existing D3D swap chain on init
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745159
+
+2015-02-24 19:01:45 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/Makefile.am:
+	  opengl: Clean Makefile.am
+	  + Split headers from source
+	  + Remove uneeded AM_CFLAGS, AM_LDFLAGS
+	  + Always set OBJCFLAGS
+	  Due to the presence of a .m and regardless of the conditional values,
+	  automake will promote the link command to OBJC using OBJCFLAGS. Only
+	  the basic flags (like warnings and optimization) are going to make a
+	  difference though.
+	  This cleanup builds up the makefile with less specific files first
+	  toward more specific file. FLAGS are built with the basic that unused
+	  flags will have empty variable.
+
+2015-02-24 12:54:54 -0500  Xavier Claessens <xavier.claessens@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: cosmetic cleanup
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745105
+
+2015-02-24 19:52:59 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/Makefile.am:
+	  opengl: don't add --tag=CC twice to LIBTOOLFLAGS
+
+2015-02-24 14:35:37 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/Makefile.am:
+	  opengl: Add --tag=CC to LIBTOOLCLFAGS
+	  This is required for static build.
+
+2015-02-24 18:50:03 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/jpegformat/gstjpegparse.c:
+	* tests/check/elements/jpegparse.c:
+	  jpegparse: interlaced doesn't mean progressive scan
+	  Removing interlaced variable since it is meant to mean progressive scan
+	  and that isn't used.
+
+2015-02-24 18:38:31 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/check/elements/jpegparse.c:
+	  Revert "tests: check jpegparse for progressive marker"
+	  This reverts commit 1c77d12ce8770f0e065e9c00c35d711fdef1c9f8.
+	  "interlaced" in the caps don't mean the same thing as the SOF2 marker in the
+	  JPEG format. This test passes because of broken behaviour.
+
+2015-02-24 17:41:43 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/check/elements/jpegparse.c:
+	  tests: check jpegparse for progressive marker
+
+2015-02-24 14:01:04 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: Deactivate window before changing handle
+	  When setting a new window handle, we need to ensure all implementations
+	  will detect the change.
+	  For that we deactivate the context before setting the window handle, then
+	  reactivate the context
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745090
+
+2015-02-24 13:58:26 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	  gl/egl: Detect window handle changes
+	  When (re)activating the context, the backing window handle might have changed.
+	  If that happened, destroy the previous surface and create a new one
+	  https://bugzilla.gnome.org/show_bug.cgi?id=745090
+
+2015-02-24 14:20:42 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/gl/gstglapi.c:
+	  gl: remove docbook related warnings
+
+2015-02-24 13:51:24 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/modplug/gstmodplug.cc:
+	  modplug: remove unused variable
+
+2015-02-24 13:36:00 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/modplug/gstmodplug.cc:
+	  modplug: not using deprecated API anymore
+
+2015-02-24 13:16:21 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/modplug/gstmodplug.cc:
+	  modplug: update example pipeline command
+
+2015-02-24 19:03:43 +0530  Arun Raghavan <arun@centricular.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-section.c:
+	  mpegts: Fix a compiler warning
+	  Causes the following warning on clang:
+	  gst-dvb-section.c:567:36: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
+	  descriptors_loop_length, end - 4 - data);
+	  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
+
+2015-02-24 23:54:13 +1100  Matthew Waters <matthew@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: only attempt use of the texture cache with GLMemory caps features
+	  Otherwise we send rectangle textures to glimagesink
+
+2015-02-24 23:52:39 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/caopengllayersink.m:
+	  caopengllayersink: render black when we don't have a texture to display
+	  Like when the winsys asks us to redraw before the pipeline has started
+
+2015-02-25 00:00:48 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: allow sharing between buffers
+	  There was no real reason why the flag was set.  We should be able
+	  to handle it.  Fixes last-sample handling on gl sinks
+
+2015-02-24 20:34:35 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: add compat definition for gles2
+
+2015-02-24 11:19:04 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/d3dvideosink/d3dhelpers.c:
+	  d3dvideosink: Don't initialize the render window swap chain while the device is lost and we're waiting for reset
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744615
+
+2015-02-24 11:18:38 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/d3dvideosink/d3dvideosink.c:
+	  d3dvideosink: Deactivate the fallback buffer pool when replacing it during caps changes
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744615
+
+2015-01-29 17:41:19 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	* ext/gl/caopengllayersink.h:
+	* ext/gl/caopengllayersink.m:
+	* ext/gl/gstopengl.c:
+	  new caopengllayersink element
+	  renders gstreamer gl scene/video frames to a caopengllayer retreivable
+	  from the "layer" property.
+
+2015-01-19 12:43:23 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* sys/applemedia/Makefile.am:
+	* sys/applemedia/avsamplevideosink.h:
+	* sys/applemedia/avsamplevideosink.m:
+	* sys/applemedia/plugin.m:
+	* tests/examples/Makefile.am:
+	* tests/examples/avsamplesink/.gitignore:
+	* tests/examples/avsamplesink/Makefile.am:
+	* tests/examples/avsamplesink/main.m:
+	  applemedia: new AVSampleBufferLayerSink
+	  Renders buffers using the CALayer subclass AVSampleBufferDisplayLayer
+	  which can be placed inside a Core Animation render tree.
+
+2015-02-24 19:06:18 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/calayer: don't use the async callback to render
+	  not until we can provide equivalent functionality for other window
+	  implementations.
+
+2015-02-24 01:20:23 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: also supported with gles3
+
+2015-02-24 14:23:49 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.h:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	  libgstgl: eagl: handle CALayer resize
+
+2015-02-23 16:13:31 +0100  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Fix transfer_pbo memory leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744977
+
+2015-02-22 10:03:54 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: reduce custom main loop latency
+	  This fix a very slow rendering rate regression that only
+	  happens when using gst-launch, i.e. in the case where
+	  the main thread does not run any NSApp loop.
+	  Git bisect reported it has been introduced by the commit
+	  e10d2417e2fe7aa4733c076984339b0d61caa169:
+	  "move to CGL and CAOpenGLLayer for rendering".
+	  Then the commit 7d463576271e5a4cc1070780ba1a69c971e8be1d:
+	  "gstglwindow_cocoa: fix slow render rate" attempted to fix
+	  the slow rendering rate problem when using gst-launch.
+	  At least for me it does not work. I tried several
+	  combinations, for example to flush CA transactions in the
+	  custom app loop, as mentioned in the doc, but the only solution
+	  that fixes the slow rendering is by reducing the loop latency.
+	  From what I tested, no need to put less than 60ms, even if the
+	  framerate has an interval much lower (16.6ms for 60 fps).
+
+2015-02-17 23:50:51 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglmixerpad.h:
+	  glmixer: fix some compiler warnings
+	  i686-apple-darwin11-llvm-gcc-4.2
+	  gstglmixer.h:43: error: redefinition of typedef ‘GstGLMixer’
+	  gstglmixerpad.h:32: error: previous declaration of ‘GstGLMixer’ was here
+	  gstglmixer.h:46: error: redefinition of typedef ‘GstGLMixerFrameData’
+	  gstglmixerpad.h:33: error: previous declaration of ‘GstGLMixerFrameData’ was here
+
+2015-02-21 19:07:29 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* docs/plugins/gst-plugins-bad-plugins.hierarchy:
+	* docs/plugins/inspect/plugin-adpcmenc.xml:
+	* docs/plugins/inspect/plugin-curl.xml:
+	* docs/plugins/inspect/plugin-faac.xml:
+	* docs/plugins/inspect/plugin-inter.xml:
+	* docs/plugins/inspect/plugin-mpg123.xml:
+	* docs/plugins/inspect/plugin-opus.xml:
+	  docs: update
+
+2015-02-21 19:07:14 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	  docs: add opus elements to documentation
+
+2015-02-21 18:52:00 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/mxf/mxfdemux-structure.c:
+	  mxf-example: don't quit on Warning
+	  Don't quit on Warning.
+	  Print out a message when there is an Error or Warning.
+
+2015-02-21 18:47:29 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/mxf/mxfdemux-structure.c:
+	  mxf-example: always show gtk window
+	  Show gtk window even when there are no tags, to always have visual feedback
+	  about the pipeline running.
+
+2015-02-21 17:35:03 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/mxf/mxfdemux-structure.c:
+	  mxf-example: merge returns in g_value_to_string()
+
+2015-02-21 17:25:51 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/mxf/mxfdemux-structure.c:
+	  mxf-example: make bus_callback consistent
+	  Simplify the bus_callback to make it consisten with other examples.
+
+2015-02-21 17:18:02 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/mxf/mxfdemux-structure.c:
+	  mxf-example: fix usage of argc and argv
+
+2015-02-21 17:02:09 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* tests/examples/camerabin2/gst-camera2.c:
+	  camerabin examples: remove unneeded variable
+	  ret is only used once, we don't need to store it in a variable for that.
+
+2015-02-21 14:42:05 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gstglmemory: Remove now unused transfer_upload function.
+
+2015-02-21 23:29:22 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: disable automatic pbo upload
+	  until we can track where the data is/or is going to be.
+
+2015-02-20 13:55:05 +0000  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  hlsdemux: select correct starting position for live streams
+	  When playing live HLS streams, the media playback starts from the
+	  beginning of the media playlist. When playing a live HLS stream,
+	  media playback should start from 3 fragments from the end of the
+	  playlist.
+	  See section 6.3.3. of the HLS draft [1]
+	  This commit changes the logic to select 3 fragments from the end when
+	  playing a live stream.
+	  [1] http://tools.ietf.org/html/draft-pantos-http-live-streaming-12#page-29
+	  https://bugzilla.gnome.org/show_bug.cgi?id=727742
+
+2015-02-20 18:42:23 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glememory: only store and act on the map flags on first/last map/unmap
+	  Anytime else, we have no idea how to match up map and unmaps.
+	  We also don't know exactly how the calling code is using us.
+	  Also fixes the case where we're trying to transfer while someone else
+	  is accessing our data pointer or texture resulting in mismatched video
+	  frames.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744839
+
+2015-02-19 21:21:56 -0500  Olivier Crete <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Use src_lock to protect latency related members
+	  One has to use the src_lock anyway to protect the min/max/live so they
+	  can be notified atomically to the src thread to wake it up on changes,
+	  such as property changes. So no point in having a second lock.
+	  Also, the object lock was being held across a call to
+	  GST_ELEMENT_WARNING, guaranteeing a deadlock.
+
+2015-02-19 18:53:32 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Remove untrue comment
+
+2015-02-19 18:30:35 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Don't try to push tags while flush seeking
+	  The downstream segment could have been flushed already, so
+	  need to re-send the segment event before re-sending the tags.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-02-19 14:34:23 +0100  Guillaume Seguin <guillaume@segu.in>
+
+	* ext/hls/gsthlssink.c:
+	  hlssink: reduce playlist's EXT-X-VERSION to 3
+	  We are not using any features greater than the 3rd version,
+	  so reduce to what we actually use to make it compatible with
+	  more players
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744689
+
+2015-02-19 14:30:10 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopuspay: default encoding name to OPUS
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737810
+
+2015-02-19 14:05:06 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopuspay: make caps writable before truncating them
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737810
+
+2015-02-05 10:27:51 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopuspay: negotiate the encoding name
+	  Chrome uses a different encoding name that gstreamer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737810
+
+2015-02-19 17:21:46 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/videosignal/gstsimplevideomarkdetect.c:
+	  simplevideomarkdetect: move offset calculations out of inner loops
+	  the calculations for detecting the videomark is being repeated
+	  in for loop unnecessarily. Moving this outside of for loop
+	  such that the code need not be executed evertime the loop is executed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744778
+
+2015-02-19 11:04:28 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Use the sinkpads iterator directly to query upstream latencies
+	  While gst_aggregator_iterate_sinkpads() makes sure that every pad is only
+	  visited once, even when the iterator has to resync, this is not all we have
+	  to do for querying the latency. When the iterator resyncs we actually have
+	  to query all pads for the latency again and forget our previous results. It
+	  might have happened that a pad was removed, which influenced the result of
+	  the latency query.
+
+2015-02-19 10:57:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Move gst_aggregator_get_latency_unlocked() a bit
+	  It was between another function and its helper function before, which was
+	  confusing when reading the code as it had nothing to do with the other
+	  functions.
+
+2015-02-19 01:28:30 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/resindvd/rsninputselector.c:
+	  rsninputselector: Fail the latency query if one of the upstream queries fails
+
+2015-02-19 01:28:20 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: Fail the latency query if one of the upstream queries fails
+
+2015-02-19 01:28:06 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fail the latency query if one of the upstream queries fails
+
+2015-02-18 19:06:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: Only set latency if we already know our caps
+	  Otherwise we might set bogus values or GST_CLOCK_TIME_NONE.
+	  Also make sure to reset the caps field to NULL after unreffing
+	  the caps to prevent accidential use afterwards, and unref any
+	  old caps before we remember new caps.
+
+2015-02-18 15:53:53 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Document locking order
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-02-18 15:11:14 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Rename confusinly named SRC_STREAM_LOCK macros to SRC_LOCK
+	  This will match the name of the lock itself. It is also not a stream
+	  lock as it not recursive and not held while pushing.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-02-18 15:06:01 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Rename confusingly named stream lock to flush lock
+	  This lock is not what is commonly known as a "stream lock" in GStremer,
+	  it's not recursive and it's taken from the non-serialized FLUSH_START event.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-02-18 15:04:04 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix macro indendation
+	  Changes no code
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-02-18 17:10:48 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	  gltransform: Fix includes of graphene headers
+	  The graphene-1.0 part should not be in the source code. This directory
+	  is part of the cflags include. This is similar to gstreamer-1.0/
+	  directory. This break compilation if the include directory where
+	  graphene is installed is not in your include path.
+
+2015-02-18 19:07:42 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: remove unneeded values
+	  No need to store the GstFlowReturn when we can check if it is not OK directly
+
+2015-02-18 18:33:20 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: renaming GstFlowReturn variable
+	  Having a variable named ret in a static void function is very confusing since
+	  this usually is to store what the function will return.
+
+2015-02-18 18:00:48 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: remove ignored value
+	  Value stored in ret will be ovewritten in the next iteration of the loop. Which
+	  means it is never used.
+	  Plus a style issue to make gst-indent happy and allow the commit.
+
+2015-02-18 17:41:25 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: Remove g_warnings() for the deprecated audio property
+	  Otherwise there are g_warnings() already when just using gst-inspect or
+	  dumping a pipeline graph.
+
+2015-02-15 23:16:52 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: protect against malformed isombff format
+	  Be more careful around malformed mpds that announce using
+	  isombff profile but actually are regular mpds
+
+2015-02-18 12:45:22 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/d3dvideosink/d3dhelpers.c:
+	  d3dvideosink: Deactivate the fallback pool and unref the fallback buffer when resetting
+	  Otherwise we will still have a reference to the surface left, which would
+	  prevent activating the sink again later. E.g. after we lost the device.
+	  Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=744615
+
+2015-02-17 11:53:49 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: remove unused define
+
+2015-02-17 11:41:27 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: use correct function to clear fragment info
+	  Just freeing the url won't reset the byte ranges and can lead to wrong
+	  ranges being used.
+
+2015-02-17 10:50:59 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: depracate bandwidth-usage in favor of bitrate-limit
+	  Bitrate-limit is already available in the baseclass and, even though
+	  the bandwidth-usage name is better, hls and mss already used
+	  bitrate-limit. This patch deprecates the bandwidth-usage and maps
+	  it to the baseclass bitrate-limite.
+
+2015-02-17 10:40:06 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssdemux.h:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: add bitrate-limit property
+	  Move the property from subclasses to adaptivedemux, it allows
+	  selecing the percentage of the measured bitrate to be used when
+	  selecting stream bitrates
+
+2015-02-17 10:04:30 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlssink.c:
+	* ext/hls/gstm3u8playlist.c:
+	  hlssink: allow creation of 'infinite' playlist
+	  Allow the playlist-length to accept '0' as a value, indicating
+	  that no segment should be removed from the playlist. This allows
+	  generating playlists to be used as VOD when complete.
+
+2015-02-17 10:04:27 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlssink.c:
+	* ext/hls/gstm3u8playlist.c:
+	* ext/hls/gstm3u8playlist.h:
+	  hlssink: remove unused attribute
+	  the GFile attribute is never used
+
+2015-02-17 10:03:44 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssdemux.h:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: add connection-speed property
+	  Allows to set a bitrate directly instead of measuring it internally
+	  based on the received chunks. The connection-speed was removed from
+	  mssdemux and hlsdemux as it is now in the base class
+
+2015-02-17 00:34:55 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c:
+	  basecamerabinsrc: don't use private GMutex implementation details
+	  Don't use private GMutex implementation details to check
+	  whether it has been freed already or not. Just clear mutex
+	  and GCond unconditionally in free function, they are always
+	  inited anyway, and the free function can't be called multiple
+	  times either.
+
+2015-02-16 23:54:28 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: don't use private GMutex implementation details
+	  Don't use private GMutex implementation details to check
+	  whether it has been freed already or not. Just turn dispose
+	  function into finalize function which will only be called
+	  once, that way we can just clear the mutex unconditionally.
+
+2015-02-17 18:17:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: don't deadlock if the dispatch_sync is called from the main thread
+	  Provide a helper function to check whether we are being called from
+	  the main thread and act appropriately.
+
+2015-02-17 16:41:17 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/calayer: only start drawing if the parent gl context is ready
+	  otherwise we may try to use GstGLFuncs * that hasn't been set yet
+
+2015-02-17 16:39:56 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: small refactor of layer/view creation into the window
+
+2015-02-17 01:04:38 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glwindow: Remove assertion in gst_gl_window_show() for subclasses not implementing it
+	  On Android and iOS we can't create a window ourselves, so also can't just show
+	  one. That's not a problem and an assertion is not really needed here.
+
+2015-02-16 12:35:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Check if VTSessionCopyProperty() succeeds before using the result
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744585
+
+2015-02-13 23:45:20 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: drop GAP events until we handle them properly
+
+2015-02-12 12:04:44 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/videosignal/gstsimplevideomark.c:
+	  simplevideomark: refactor code
+	  the calculations for drawing the videomark is being repeated
+	  in for loop unnecessarily. Moving this outside of for loop
+	  such that the code need not be executed evertime the loop is executed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744371
+
+2015-02-09 11:21:35 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mpegtsdemux/tsdemux.h:
+	  tsdemux: Fix segment and segment event handling during seeking
+	  Always update the segment and not only for accurate seeking and always
+	  send a new segment event after seeks.
+	  For non-accurate force a reset of our segment info to start from
+	  where our seek led us as we don't need to be accurate
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743363
+
+2015-02-13 16:06:34 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: use new gst_aggregator_pad_drop_buffer()
+
+2015-02-13 16:03:53 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: use new gst_aggregator_pad_drop_buffer()
+
+2015-02-13 15:53:19 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* tests/check/libs/aggregator.c:
+	  aggregator: use new gst_aggregator_pad_drop_buffer()
+
+2015-02-13 15:49:50 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: add gst_aggregator_pad_drop_buffer()
+	  steal_buffer() + unref seems to be a wide-spread idiom
+	  (which perhaps indicates that something is not quite
+	  right with the way aggregator pad works currently).
+
+2015-02-12 13:32:39 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: only post latency message if anything changed
+	  Perhaps we should check for element state as well and
+	  only post it if in PLAYING state.
+
+2015-02-12 15:48:07 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/audiomixer.c:
+	* tests/check/elements/compositor.c:
+	  tests: remove GST_DISABLE_PARSE guards from two tests that don't require it
+
+2015-01-28 12:12:26 +0530  Arun Raghavan <arun@centricular.com>
+
+	* sys/opensles/openslessink.c:
+	* sys/opensles/openslessrc.c:
+	  opensles: Make debug category naming a bit more consistent
+
+2015-02-13 19:12:20 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  applemedia: avfvideosrc: fix crash when non-GL memory is used
+
+2015-02-05 18:10:15 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Fix logic in fragment_download_finish.
+	  This was preventing us from surfacing a meaningful error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743703
+
+2015-02-12 22:06:17 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Fix handling of live streams with timeshift buffers.
+	  By implementing get_live_seek_range.
+	  As shown by :
+	  gst-validate-1.0 playbin \
+	  uri=http://dev-iplatforms.kw.bbc.co.uk/dash/news24-avc3/news24.php
+	  This patch handles live seeking, by setting a live seek range
+	  comprised between now - timeShiftBufferDepth and now.
+	  The inteersting thing with this stream is that one can actually
+	  ask fragments up to availabilityStartTime, but it seems quite clear
+	  in the spec that content is only guaranteed to exist up to
+	  timeShiftBufferDepth.
+	  One can test live seeking this way :
+	  gst-validate-1.0 playbin \
+	  uri=http://dev-iplatforms.kw.bbc.co.uk/dash/news24-avc3/news24.php \
+	  --set-scenario seek_back.scenario
+	  with scenario being:
+	  description, seek=true
+	  seek, playback-time=position+5.0, start="position-600.0",
+	  flags=accurate+flush
+	  This example will play the stream, wait for five seconds, then seek back
+	  to a position 10 minutes earlier.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744362
+
+2015-02-12 22:04:10 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Set first segment time to segment start.
+	  Otherwise as long as a seek wasn't executed, the position was
+	  reported incorrectly:
+	  gst-validate-1.0 playbin \
+	  uri=http://dev-iplatforms.kw.bbc.co.uk/dash/news24-avc3/news24.php
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744362
+
+2015-02-12 17:33:50 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Fix debug statement
+
+2015-02-12 15:02:31 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	  gl: Add/Update more debug statements
+	  Where possible, use the _OBJECT variants in order to track better from
+	  which object the debug statement is coming from
+	  Define (and use) GST_CAT_DEFAULT where applicable
+	  Use GST_PTR_FORMAT where applicable
+
+2015-02-12 14:58:14 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  gl: Make glcontext debug category used in more places
+	  As a bonus it makes the egl context debug messages visible now :)
+
+2015-02-12 14:56:12 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Sprinkle more debug
+
+2015-02-12 11:15:31 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: set proper stream type to streams
+	  strncmp returns 0 when it compares equal and not a
+	  boolean
+
+2015-02-12 11:26:44 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: calculate stream_time used to sync pad values correctly
+	  Use pad (input) segment to calculate the stream time from the
+	  input timestamp, not the aggregator (output) segment.
+
+2015-02-12 11:11:19 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: Only use the duration of the sample if it is valid
+
+2015-01-27 13:48:42 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: track per-fragment bitrates.
+	  And use the average to go up in resolution, and the last fragment
+	  bitrate to go down.
+	  This allows the demuxer to react rapidly to bitrate loss, and
+	  be conservative for bitrate improvements.
+	  + Add a construct only property to define the number of fragments
+	  to consider when calculating the average moving bitrate.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742979
+
+2015-02-11 14:44:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: Add support for 10bit 4:2:0 and 4:4:4 formats
+
+2015-02-11 14:16:21 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/opus/gstopusdec.c:
+	* ext/resindvd/rsninputselector.c:
+	* ext/x265/gstx265enc.c:
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/frei0r/gstfrei0rmixer.c:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/liveadder/liveadder.c:
+	* gst/videomeasure/gstvideomeasure_ssim.c:
+	  Improve and fix LATENCY query handling
+	  This now follows the design docs everywhere, especially the maximum latency
+	  handling.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744106
+
+2015-02-10 15:55:50 +0800  Song Bing <b06498@freescale.com>
+
+	* tests/examples/camerabin2/gst-camera2.c:
+	  camerabin examples: memory leak in camerabin examples code
+	  should unref caps after set to profile. profile will ref it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744219
+
+2015-02-10 15:53:21 +0800  Song Bing <b06498@freescale.com>
+
+	* tests/examples/camerabin2/gst-camerabin2-test.c:
+	  camerabin examples: memory leak in camerabin examples code
+	  should unref after set object. The object will be refed when set
+	  property.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744219
+
+2015-02-10 16:18:34 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/opensles/openslesringbuffer.c:
+	  openslesringbuffer: Only allocate at most half the number of internal buffers as external audioringbuffer ones
+	  Otherwise we might end up reading too much from the audioringbuffer, which
+	  would result in reading silence.
+
+2015-02-10 16:01:19 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Apply the diff between element and pipeline "base" time in all cases
+	  Even if both clocks have the same rate, we need to apply this diff. Only when
+	  it's the same clock we don't, as it's our clock then.
+
+2015-02-10 15:30:44 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Add the diff between the pipeline base time and when we start to play
+	  Add the diff between the external time when we went to playing and
+	  the external time when the pipeline went to playing. Otherwise we
+	  will always start outputting from 0 instead of the current running
+	  time.
+
+2015-02-10 14:53:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Actually include the change mentioned in the last commit
+
+2015-02-10 14:48:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideo{src,sink}: Sample the internal clock immediately after starting the device
+	  Otherwise we might stay at 0.0s for too long because we will take the first
+	  timestamp we ever see as 0.0... which will be after we started the device.
+
+2015-02-10 10:56:37 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: When receiving timeout before caps, make sure to also advance our frame counter
+	  Otherwise we will directly go EOS on the next non-timeout.
+
+2015-02-10 10:49:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Pause srcpad task on flow errors
+	  Otherwise we will call the task function over and over again until
+	  upstream finally handled the flow return and shuts us down.
+
+2015-02-09 00:59:30 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fix buffer selection when duration=-1
+	  If the src framerate and videoaggreator's output framerate were
+	  different, then we were taking every single buffer that had duration=-1
+	  as it came in regardless of the buffer's start time.  This caused the src
+	  to possibly run at a different speed to the output frames.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=744096
+
+2015-02-09 21:04:17 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Fix compiler warning with gcc
+	  gstdecklink.cpp: In member function 'virtual HRESULT GStreamerDecklinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)':
+	  gstdecklink.cpp:498:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
+	  if (capture_time > m_input->clock_start_time)
+	  ^
+	  gstdecklink.cpp:503:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
+	  if (capture_time > m_input->clock_offset)
+	  ^
+
+2015-02-09 17:17:37 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklink{audio,video}src: Implement clock slaving if the pipeline clock is not the decklink clock
+
+2015-02-09 17:15:21 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudio{src,sink}: Only start streams / scheduled playback if there is a videosrc at this point
+
+2015-02-09 17:04:27 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Don't provide a clock
+	  The audio source only works together with the video source, and the video
+	  source is already providing a clock.
+
+2015-02-09 16:18:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	  decklinkaudiosink: Throttle reading from the ringbuffer
+	  The driver has an internal buffer of unspecified and unconfigurable size, and
+	  it will pull data from our ring buffer as fast as it can until that is full.
+	  Unfortunately that means that we pull silence from the ringbuffer unless its
+	  size is by conincidence larger than the driver's internal ringbuffer.
+	  The good news is that it's not required to completely fill the buffer for
+	  proper playback. So we now throttle reading from the ringbuffer whenever
+	  the driver has buffered more than half of our ringbuffer size by waiting
+	  on the clock for the amount of time until it has buffered less than that
+	  again.
+
+2015-02-09 15:19:11 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	  decklinkaudiosink: Start scheduled playback when going to PLAYING
+	  The ringbuffer's acquire() is too early, and ringbuffer's start() will only be
+	  called after the clock has advanced a bit... which it won't unless we start
+	  scheduled playback.
+
+2015-02-09 21:18:24 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	* sys/applemedia/vtdec.c:
+	  vtdec: fix texture sharing on iOS
+	  Move GLES calls to the context thread. Fix
+	  CVOpenGLESTextureCacheCreateTextureFromImage usage on iOS.
+
+2015-02-09 20:44:50 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  libgstgl: set user data and GDestroyNotify for wrapped textures
+
+2015-02-08 21:53:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink{audio,video}src: Take the capture times from the pipeline clock
+	  Not from the decklink clock. Both will return exactly the same time once the
+	  decklink clock got slaved to the pipeline clock and received the first
+	  observation, but until then it will return bogus values. But as both return
+	  exactly the same values, we can as well use the pipeline clock directly.
+
+2015-02-08 14:32:22 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: don't set element factory details
+	  This is an abstract base class, not an element.
+
+2015-02-08 01:19:42 +1100  Rob Clark <rob@ti.com>
+
+	* gst/dvdspu/gstspu-vobsub-render.c:
+	  dvdspu: some optimizations
+	  Detect invisible pixels, and skip gstspu_vobsub_blend_comp_buffers()
+	  when there are only invisible pixels.  This significantly reduces the
+	  CPU load in cases of DVDs which don't use the clip_rect to exclude
+	  processing for parts of the screen where the video is visible.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=667221
+
+2015-02-08 05:06:48 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/dvdspu/gstdvdspu.c:
+	  dvdspu: Avoid warning if the video for a still frame arrives after the SPU
+	  When we don't have a segment on the video pad yet during a still frame
+	  don't freak out.
+
+2015-02-08 04:51:13 +1100  Jan Schmidt <jan@centricular.com>
+
+	* ext/resindvd/gstmpegdemux.c:
+	  resindvd: Don't send meaningless segment position downstream
+	  Don't place a meaningless value in the position field in
+	  outgoing segments - values have to be in the range start->stop.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740558
+
+2015-02-06 16:22:26 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/aiff/aiffparse.c:
+	  Revert "aiffparse: make sure we have data before handling sink event"
+	  This reverts commit a4baabb48d252214d3833b502c7903d9f15f3502.
+
+2015-02-06 15:10:55 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/aiff/aiffparse.c:
+	  aiffparse: make sure we have data before handling sink event
+	  Check AIFF_PARSE_DATA is True before handling sink event, if not goto exit.
+
+2015-02-05 15:57:59 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.h:
+	  audiomixer: remove now-unused base_time field in object structure
+
+2015-02-06 10:59:27 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Streamline latency calculations
+	  Min latency can never be invalid, latency property can never be invalid
+	  either. So no need to check for all these things in various places.
+
+2015-02-06 10:36:28 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: If upstream has no max latency but the subclass has, take the subclass max latency
+
+2015-02-06 10:33:59 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix min>max latency error check
+	  We have to include the upstream latency, our own latency and the subclass
+	  latency in the calculations.
+	  FIXME: This is still not entirely correct
+
+2015-02-06 10:30:59 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Don't add the latency property to the max latency
+	  It has no meaning for the max latency and is only used to increase the min
+	  latency.
+
+2015-02-06 12:53:15 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/vao.h:
+	  glproto/vao: only supported in core for ES 3.0+
+	  Was causing horizontally flipped video for frame 2 onward on android
+
+2015-02-05 13:31:18 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/faac/gstfaac.c:
+	  faac: relace parsed with framed in aac caps
+	  For AAC it should always be 'framed' and not 'parsed'
+
+2015-02-05 11:39:55 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/faac/gstfaac.c:
+	  faac: fix output caps to negotiate with some muxers
+	  Add parsed/framed=true to allow negotiation with some
+	  muxers that required parsed input. Encoders already provide
+	  parsed/framed output so it should say so in caps.
+
+2015-02-05 15:48:41 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/compositor.c:
+	  tests: compositor: add unit test for proper segment.base handling
+	  As adjusted by gst_pad_set_offset(), or when doing segment seeks
+	  or looping for example.
+
+2015-02-05 15:23:04 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/audiomixer.c:
+	  tests: audiomixer: add unit test for proper segment.base handling
+	  As adjusted by gst_pad_set_offset(), or when doing segment seeks
+	  or looping for example. See previous audiomixer commit.
+
+2015-02-05 16:02:54 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Remove weird and wrong segment handling
+	  There's no reason why audiomixer should override the segment
+	  base of upstream with whatever value it got from a SEEK event,
+	  or even worse... with 0 if there was no SEEK event yet. This
+	  broke synchronization if upstream provided a segment base other
+	  than 0, e.g. when using pad offsets.
+	  Also that this code did things conditional on the element's state
+	  should've been a big warning already that something is just wrong.
+	  If this breaks anything else now, let's fix it properly :)
+	  Also don't do fancy segment position trickery when receiving a
+	  segment event. It's just not correct.
+
+2015-02-05 12:24:04 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/opensles/openslesringbuffer.c:
+	  openslesringbuffer: Only pre-roll a single buffer
+	  There is no reason to pre-roll more buffers here as we have our own ringbuffer
+	  with more segments around it, and we can immediately provide more buffers to
+	  OpenSL ES when it requests that from the callback.
+	  Pre-rolling a single buffer before starting is necessary though, as otherwise
+	  we will only output silence.
+	  Lowers latency a bit, depending on latency-time and buffer-time settings.
+
+2015-02-05 12:22:46 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/opensles/openslesringbuffer.c:
+	  openslesringbuffer: Allocate at most 4 internal buffers
+	  4 is the "typical" number of buffers defined by Android's OpenSL ES
+	  implementation, and its code is optimized for this. Also because we
+	  have our own ringbuffer around this, we will always have enough
+	  buffering on our side already.
+	  Allows for more efficient processing.
+
+2015-02-05 12:21:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/opensles/openslessink.c:
+	* sys/opensles/openslessrc.c:
+	  openslessink/src: Lower default buffer time to 200ms like alsasink
+
+2015-02-05 16:46:32 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: ensure that the input upload/colorconvert are always available
+
+2015-02-05 11:06:10 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: log the converted caps
+
+2015-02-05 11:05:02 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: restrict EGL and UploadMeta to RGBA
+	  other formats are highly untested.
+
+2015-02-05 11:04:05 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: don't intersect with the input caps
+	  that limits our formats to whatever is in the input caps
+
+2015-02-04 14:10:13 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: fix memory leak
+	  In gst_gl_filter_fixate_caps () it can goto done without freeing the memory of
+	  the tmp GstStructure. This makes it go out of scope and leak.
+	  CID #1265765
+
+2015-02-04 11:52:26 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opencv/MotionCells.cpp:
+	  motioncells: initialize class variables
+	  Some variables are not initialized in the constructor. It is highly unlikely
+	  they are used before being set, but it is safer to initialize them.
+	  CID #1197704
+
+2015-02-03 18:13:25 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* sys/winks/kshelpers.c:
+	  ksvideosrc: Fix missing brace warning
+	  There is more but it's from ks.h GUID initializer, which is shipped
+	  this way with mingw.
+
+2015-02-03 17:44:34 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* sys/winks/gstksvideodevice.c:
+	* sys/winks/gstksvideodevice.h:
+	* sys/winks/gstksvideosrc.c:
+	  ksvideosrc: Fix buffer handling
+	  The pseudo buffer pool code was using gst_buffer_is_writable()
+	  alone to try and figure-out if cached buffer could be reused.
+	  It needs to check for memory writability too. Also check map
+	  result and fix map flags.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734264
+
+2015-02-03 17:05:06 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: avoid leaking force keyunit event when going to NULL
+	  Do not set to NULL before unreffing the event or it will leak
+
+2013-03-18 08:15:00 +0000  Anton Gritsay <anton@angri.ru>
+
+	* gst/mpegtsmux/mpegtsmux.c:
+	  mpegtsmux: parse force key unit events with the correct function
+	  Otherwise it won't be parsed and bogus values would be used.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=696032
+
+2015-01-26 20:42:25 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mpegtsdemux/tsdemux.h:
+	  tsdemux: remove update segment logic
+	  This is not needed in 1.x series anymore
+
+2015-02-03 10:59:16 -0300  Aurélien Zanelli <aurelien.zanelli@darkosphere.fr>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: don't mark streams as needing a new segment on flush
+	  The flush is called on discont and we shouldn't output a new segment
+	  each time a discont happens. So this commit remove the mark for a new
+	  segment when flushing streams by propagating the 'hard' flag passed
+	  on the flusing from the base class.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743363
+
+2015-02-03 17:32:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	  corevideotexturecache: Add some assertions instead of just dereferencing NULL
+
+2015-02-03 17:29:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	  corevideotexturecache: Don't unconditionally use the CoreMedia meta on iOS
+	  We might instead have a CoreVideo meta.
+
+2015-02-03 14:55:32 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* common:
+	  Undo accidental common module rewind
+	  in commit 7d463576
+
+2015-02-03 15:38:40 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: Don't dereference NULL frames when draining/flushing
+
+2015-02-03 15:30:08 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: remove the egl caps from the src pads
+	  we don't actually support producing EGLImage buffers anywhere.
+
+2015-02-03 13:32:47 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: put GstGLSyncMeta on output buffers
+	  allows thread safely using the provided output buffer in a separate
+	  thread
+
+2015-02-03 00:35:26 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: only try the glmemory upload for sysmem/glmemory caps features
+	  Allows selecting/testing the upload path with explicit caps features.
+
+2015-02-03 00:26:20 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: add missing initilisation of tex_target when copying
+	  fixes:
+	  glcolorscale ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) !
+	  glimagesink
+
+2015-02-03 00:15:30 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: allow NULL buffer for accept vfunc
+
+2015-02-03 00:13:07 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: remove unsed convert field in private struct
+
+2015-02-03 00:11:06 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* 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/gstglfilter.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  glupload/download/convert: provide transform_caps functions
+	  Allows finer grain decisions about formats and features at each
+	  stage of the pipeline.
+	  Also provide propose_allocation for glupload besed on the supported
+	  methods.
+
+2015-02-03 11:07:58 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* common:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gstglwindow_cocoa: fix slow render rate
+	  In gst_gl_window_cocoa_draw we used to just call setNeedsDisplay:YES. That was
+	  creating an implicit CA transaction which was getting committed at the next
+	  runloop iteration. Since we don't know how often the main runloop is running,
+	  and when we run it implicitly (from gst_gl_window_cocoa_nsapp_iteration) we only
+	  do so every 200ms, use an explicit CA transaction instead and commit it
+	  immediately. CA transactions nest and debounce automatically so this will never
+	  result in extra work.
+
+2015-02-02 23:40:16 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	  gstglcaopengllayer: use the correct rectangle type for iOS and OS X
+
+2015-02-02 21:07:48 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	  glcolorconvert: use the correct caps feature for supported caps
+	  glcolorconvert currently only supports converting between GLMemory
+	  targets.
+
+2015-02-02 20:51:31 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsyncmeta: don't use the gst debug object variants
+	  We are not a GObject or any inferable GstMiniObject supported by
+	  the gst debug system.  Also fixes a segfault.
+
+2015-01-30 18:51:17 +1100  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglmemory.c:
+	  gl: update unit test for glmemory api change
+
+2015-01-30 15:13:27 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: clobber the alpha channel by default
+	  this can be disabled with the ignore-alpha property
+
+2015-01-30 12:32:17 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  Revert "libgstgl: gstglcaopengllayer: set the layer as opaque"
+	  This reverts commit 6f152d381ca21595cdc823f32341c8f2fe71b9c7.
+	  The layer shouldn't be always opaque, it should be made a property.
+
+2015-01-30 12:22:25 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  libgstgl: gstglcaopengllayer: set the layer as opaque
+
+2015-01-29 16:30:34 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Add FIXME comment about possibility of non-Apple YCbCr422 rectangular textures
+
+2015-01-29 16:26:26 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGL
+	  It's not defined for GLES.
+
+2015-01-30 00:28:18 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	* sys/applemedia/corevideotexturecache.h:
+	* sys/applemedia/corevideotexturecache.m:
+	* sys/applemedia/vtdec.c:
+	  applemedia: rework GL texture sharing
+	  Use YUV instead of RGB textures, then convert using the new apple specific
+	  shader in GstGLColorConvert. Also use GLMemory directly instead of using the
+	  GL upload meta, avoiding an extra texture copy we used to have before.
+
+2015-01-28 00:53:59 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  applemedia: vtdec: fix CMBlockBufferRef leak
+	  Fix huge leak that went unnoticed for too long. Oops.
+
+2015-01-28 00:48:27 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  libgstgl: run a custom shader to convert YUV to RGB on mac and ios
+	  When GL_APPLE_ycbcr_422 is available, run a custom shader to convert
+	  GL_TEXTURE_RECTANGLE textures from YUV to RGB.
+	  See https://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt
+
+2015-01-28 00:43:09 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfassetsrc.m:
+	* sys/applemedia/avfvideosrc.m:
+	* sys/applemedia/coremediabuffer.c:
+	* sys/applemedia/coremediabuffer.h:
+	* sys/applemedia/vtenc.c:
+	  applemedia: don't call CVPixelBufferLockBaseAddress when doing texture sharing
+	  When doing texture sharing we don't need to call CVPixelBufferLockBaseAddress to
+	  map the buffer in CPU. This cuts about 10% relative cpu time from a vtdec !
+	  glimagesink pipeline.
+
+2015-01-28 00:13:46 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstgldownload.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	  gl: initial support for texture targets other than GL_TEXTURE_2D
+	  Make GstGLMemory hold the texture target (tex_target) the texture it represents
+	  (tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
+	  gst_gl_download_perform_with_data to take the texture target as an argument.
+	  This change is needed to support wrapping textures created outside libgstgl,
+	  which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
+	  textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.
+	  With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
+	  target of textures created with libgstgl.
+	  API: modify GstGLMemory
+	  API: modify gst_gl_memory_wrapped_texture
+	  API: gst_gl_download_perform_with_data
+
+2015-01-22 13:18:23 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gstglcolorconvert: micro optimization
+	  Don't call glClear && glClearColor at each draw since we're going to draw the
+	  whole viewport anyway. Gets rid of a glFlush triggered by glClear on OSX.
+
+2015-01-22 13:17:11 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/corevideobuffer.c:
+	* sys/applemedia/corevideobuffer.h:
+	* sys/applemedia/qtkitvideosrc.m:
+	* sys/applemedia/vtdec.c:
+	* sys/applemedia/vtenc.c:
+	  applemedia: corevideobuffer: make mapping the CVPixelBuffer in CPU optional
+	  Mapping is not necessary and impacts performance when doing texture sharing with
+	  downstream
+
+2015-01-22 13:11:46 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gstglcolorconvert: relax caps features check
+	  Require caps to have the GST_CAPS_FEATURE_MEMORY_GL_MEMORY feature but allow
+	  them to have more features.
+
+2015-01-28 16:43:59 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	  opusenc: change audio property to audio-type
+	  This is now an enum with values generic (default) and voice.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740891
+
+2015-01-29 23:45:15 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl/win32: fixup compilation
+
+2015-01-29 11:54:35 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstwavescope.c:
+	  audiovisualizer: remove double-setting of render function
+	  No need to set the audiovisualizer->render function twice. Once is enough.
+
+2015-01-29 22:25:00 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glwindow: make showing a window explicit
+	  Also fixes the cgl context always displaying a window to render to for
+	  every GstGLContextCocoa created
+
+2015-01-26 17:06:29 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Cleanup locking around AggregatorPad flush related fields
+	  And document the locking
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-26 13:11:05 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: keep chain functions as dumb as possible.
+	  + A pad chain function has no business checking other pads,
+	  that's what the aggregate thread is for.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-26 11:32:47 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  aggregator: More fixes around locking when accessing protected private fields
+	  In some more places we were accessing GstAggregator->segment
+	  and GstAggregator->seqnum without holding the GST_OBJECT_LOCK
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-26 11:29:08 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst/audiomixer/gstaudiomixer.c:
+	  aggregator: Make the PAD_LOCK private
+	  Instead of using the GST_OBJECT_LOCK we should have
+	  a dedicated mutex for the pad as it is also associated
+	  with the mutex on the EVENT_MUTEX on which we wait
+	  in the _chain function of the pad.
+	  The GstAggregatorPad.segment is still protected with the
+	  GST_OBJECT_LOCK.
+	  Remove the gst_aggregator_pad_peak_unlocked method as it does not make
+	  sense anymore with a private lock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-26 11:25:54 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	* tests/check/libs/aggregator.c:
+	  aggregator: Hide GstAggregatorPad buffer and EOS fileds
+	  And add a getter for the EOS.
+	  The user should always use the various getters to access
+	  those fields
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:09:13 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Make flush start/stop test non-racy
+	  The flush stop could have happened between the source trying
+	  to push the segment event and the buffer, this would cause a warning.
+	  Prevent that by taking the source's stream lock while flushing.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-22 17:41:24 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Replace racy timeout based tested with drain query
+	  Using the drain query, we can be certain that the buffer has done going
+	  through the aggregator by taking the stream locks.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:41:43 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Document locking of GstAggregatorPrivate members
+	  Most of them are protected by the object lock, specify
+	  which ones use a different lock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:47:09 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: Document how the segment is protected
+	  Document that it can only be accessed with the object lock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:44:57 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Protect all latency related members with the object lock
+	  The locking was not consistent, now consistently use the object lock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:43:12 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  aggregator: Document locking for gst_aggregator_get_latency_unlocked()
+	  Renamed it to _unlocked() to make it clear.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:35:25 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Protect the srcpad caps negotiation with the stream lock
+	  Instead of adding another lock, use the srcpad stream lock, which is already
+	  taken anyway to push out the new caps if needed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:33:18 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Protect the tags with the object lock
+	  The tags related variables were sometimes protected, sometimes not and
+	  sometimes atomic. Put them all under the object lock.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 19:32:34 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Avoid race in caps negotiation
+	  With the current audiomixer, the input caps need to be the same,
+	  otherwise there is an unavoidable race in the caps negotiation. So
+	  enforce that using capsfilters
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:53:20 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Consistenly lock the flow_return state
+	  Use the object's lock to protect it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:47:40 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Clear GstAudioInfo the the caps
+	  When clearing the caps, also clear the matching GstAudioInfo
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:45:36 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Consistently lock some members
+	  Some members sometimes used atomic access, sometimes where not locked at
+	  all. Instead consistently use a mutex to protect them, also document
+	  that.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-21 18:39:24 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Don't reset caps on flush
+	  A flush event doesn't invalidate the previous caps event.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-14 14:45:06 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Lock access to members of GstAggregatorPad
+	  Take the pad's object lock before accessing members of the
+	  GstAggregatorPad structure.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-14 14:38:09 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: Protect exported pad members with the pad's object lock
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-14 14:35:15 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst/audiomixer/gstaudiomixer.c:
+	  aggregator: Replace event lock with pad's object lock
+	  Reduce the number of locks simplify code, what is protects
+	  is exposed, but the lock was not.
+	  Also means adding an _unlocked version of gst_aggregator_pad_steal_buffer().
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-09 22:01:00 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Protect data with the same mutex as GCond
+	  Whenever a GCond is used, the safest paradigm is to protect
+	  the variable which change is signalled by the GCond with the same
+	  mutex that the GCond depends on.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742684
+
+2015-01-29 02:28:38 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: If getting a timeout before having caps, just advance our position
+	  This can happen if this is a live pipeline and no source produced any buffer
+	  and sent no caps until an output buffer should've been produced according to the
+	  latency.
+	  This fix is similar in spirit to commit be7034d1 by Sebastian for audiomixer.
+
+2015-01-29 17:31:09 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/calayer: add resize callback based on the bounds rectangle
+
+2015-01-29 15:26:21 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  gl/caopengllayer: draw asynchronously
+	  This essentially makes the CAOpenGLLayer draw every refresh cycle.
+
+2015-01-28 17:59:42 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: don't segfault if we have a NULL draw/resize/close callback
+
+2015-01-28 17:16:14 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  cgl/calayer: use a callback instead of hardcoding the draw functionality
+
+2015-01-28 17:13:05 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/Makefile.am:
+	  cgl: install the gl context and gl layer headers
+
+2015-01-28 17:05:14 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	  cgl: add a header for the CAOpenGLLayer support
+
+2015-01-28 17:02:59 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Always lock the mutex before starting the streams
+
+2015-01-28 16:58:27 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Fix deadlock
+
+2015-01-28 15:48:26 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink{audio,video}sink: Only start scheduled playback once both sources are ready and we are in PLAYING
+	  Otherwise we might start the scheduled playback before the audio or video streams are
+	  actually enabled, and then error out later because they are enabled to late.
+	  We enable the streams when getting the caps, which might be *after* we were
+	  set to PLAYING state.
+
+2015-01-28 15:26:17 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink{audio,video}src: Only start the streams once both sources are ready and we are in PLAYING
+	  Otherwise we might start the streams before the audio or video streams are
+	  actually enabled, and then error out later because they are enabled to late.
+	  We enable the streams when getting the caps, which might be *after* we were
+	  set to PLAYING state.
+
+2015-01-28 14:21:40 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Make sure our clock never returns NONE, always advances and does not jump when going from PAUSED to PLAYING
+	  It basically behaves the same as the audio clocks.
+
+2015-01-28 12:20:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Handle the clock returning GST_CLOCK_TIME_NONE properly
+
+2015-01-28 11:41:17 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideo{sink,src}: Make elements more similar to the audio elements by enabling the video input/output only when getting the actual caps
+	  This will also make it easier later to support caps changes and support
+	  selecting the mode based on the caps if that should ever be implemented.
+
+2015-01-26 19:02:04 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Properly report caps if mode!=auto and handle caps changes properly for mode=auto
+
+2015-01-26 18:27:10 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Don't release input device twice on errors in set_caps()
+
+2015-01-27 11:25:53 +0100  Philippe Normand <philn@igalia.com>
+
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	  gl/dispmanx: fix build
+	  Commit ab48bb6f0f55091662e595a001e178154ce60cdb changed the API of
+	  GstGLWindow.
+
+2015-01-27 14:52:47 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: more compatibility defines for gles2 systems
+
+2015-01-27 12:15:43 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: add some thread safety for gl operations
+
+2015-01-27 11:53:51 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: use pbo's for download
+	  In order to use pbo's efficiently, the transfer operation has to
+	  be separated from the use of the downloaded data which requires some
+	  rearchitecturing around glcolorconvert/gldownload and elements
+
+2015-01-27 11:04:07 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/base.h:
+	  glprototypes: add some (un)map buffer variants for GL/GLES
+
+2015-01-26 17:51:22 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: use audio_%02u and video_%02u names for pads
+	  Instead of using the default ghostpad%u naming. The audio_/video_
+	  names are more common in demuxers
+
+2015-01-26 15:33:23 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklinkaudiosrc: Release the audio input on errors, not the video input
+
+2015-01-26 13:46:44 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/aiff/aiffparse.c:
+	  aiffparse: remove unnecessary variable
+	  The bps variable is declared with value aiff->bps, read once and never written.
+	  aiff->bps can be used directly instead.
+
+2015-01-26 12:49:45 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/aiff/aiffparse.c:
+	  aiffparse: fix which stop variable is used in assignment
+	  Assignment is done to variable segment.stop when the intention was to assign to
+	  local variable stop. Instead of overwriting it, the value is now clamped and
+	  segment.stop is set to it soon after.
+	  CID #1265772
+
+2015-01-26 09:22:23 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fix crash when receiving buffer without timestamps
+	  Unset out buffer in clip function when we unref the buffer to be
+	  clipped, otherwise aggregator will continue to use the already-
+	  freed buffer. Fixes crash when buffers without timestamps are
+	  being fed to aggregator. Partly because aggregator ignores the
+	  error flow return.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743334
+
+2015-01-18 18:05:31 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* docs/plugins/Makefile.am:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* sys/Makefile.am:
+	* sys/directdraw/Makefile.am:
+	* sys/directdraw/gstdirectdrawplugin.c:
+	* sys/directdraw/gstdirectdrawsink.c:
+	* sys/directdraw/gstdirectdrawsink.h:
+	* win32/MANIFEST:
+	* win32/vs6/libgstdirectdraw.dsp:
+	* win32/vs8/libgstdirectdraw.vcproj:
+	  Remove unported directdraw plugin
+	  This API has been deprecated for eternities and microsoft
+	  stopped shipping the headers in 2010 accoding to wikipedia,
+	  so let's just remove it and focus on bringing the plugins
+	  based on the newer APIs up to snuff.
+
+2014-03-26 17:43:33 +0000  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* gst/aiff/aiffmux.c:
+	  aiffmux: write padding byte at end of SSND chunk if needed
+	  AIFF chunks are supposed to be even aligned.
+	  Aligning the SSND chunk will allow the aiff muxer to properly write
+	  chunks (like the ID3 one) at the end of the file.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=727402
+
+2015-01-23 12:44:22 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: Free leaked GstStructure
+	  Coverity CID : 1256565
+
+2015-01-23 12:41:29 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/gl/gstgltestsrc.c:
+	  gltestsrc: Ensure variable is initialized before usage
+	  Coverity CID: 1256569
+
+2015-01-23 12:26:16 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/codecparsers/dboolhuff.c:
+	  codecparsers: Indent file
+	  Someone's been commiting without using gst-indent :)
+
+2015-01-23 12:24:52 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/nalutils.h:
+	  codecparsers: Add READ_UE_MAX macro
+	  READ_UE_ALLOWED was almost exclusively used with min == 0, which doesn't
+	  make much point for unsigned integers.
+	  Add a READ_UE_MAX variant and use that instead. Also replaced two usages
+	  of CHECK_ALLOWED (a,0,something) by CHECK_ALLOWED_MAX (a, something)
+
+2015-01-23 12:28:42 +0530  Arun Raghavan <arun@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Fix GAP flag setting on non-black frames
+	  The previous commit fixed setting the GAP flag on black frames, but
+	  incorrectly dropped the flag on repeated pushes of the same video
+	  buffer.
+
+2015-01-23 17:27:42 +1100  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglcontext.c:
+	* tests/check/libs/gstglupload.c:
+	  gl/tests: update glwindow api change
+
+2015-01-23 16:52:25 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	  gl/window/eagl: fix a couple of typos
+
+2015-01-23 16:39:44 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.h:
+	  glwindow: cleanup/reorganize functions/members into logical groups
+
+2015-01-23 15:02:55 +1100  Matthew Waters <matthew@centricular.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	  applemedia: update for gstgl cocoa -> cgl change
+
+2015-01-23 14:18:12 +1100  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm:
+	  gl/qt/examples: update for NSOpenGL -> CGL change
+
+2015-01-23 14:11:48 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/android/gstglwindow_android_egl.c:
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c:
+	* gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h:
+	* gst-libs/gst/gl/eagl/gstglwindow_eagl.m:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glwindow: remove width/height from _draw()
+	  Depending on the platform, it was only ever implemented to 1) set a
+	  default surface size, 2) resize based on the video frame or 3) nothing.
+	  Instead, provide a set_preferred_size () that elements/applications
+	  can use to request a certain size which may be ignored for
+	  videooverlay/other cases.
+
+2015-01-22 21:43:51 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  glcontext/cocoa: avoid destroying a possibly 0 GSource id
+
+2015-01-20 22:01:39 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/cocoa/Makefile.am:
+	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
+	* gst-libs/gst/gl/cocoa/gstglcaopengllayer.m:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: move to CGL and CAOpenGLLayer for rendering
+	  Removes the use of NSOpenGL* variety and functions.  Any Cocoa
+	  specific functions that took/returned a NSOpenGL* object now
+	  take/return the CGL equivalents.
+
+2015-01-22 16:08:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  glcontext/cocoa: add debug category
+
+2015-01-22 10:50:23 +0530  Arun Raghavan <arun@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Fix GAP flag setting on black frames correctly
+	  This did not actually work since the video_buffer was set to NULL after
+	  the first black frame.
+	  Reported by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
+
+2015-01-21 23:37:10 +0530  Arun Raghavan <arun@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Fix max value of the timeout property
+	  Reported by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
+
+2015-01-21 23:35:55 +0530  Arun Raghavan <arun@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264: Implement the preset interface
+	  Will be useful when we want to set presets on the encoder via encodebin
+	  or such.
+
+2015-01-21 15:31:21 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: sync with base class in -base
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742875
+
+2015-01-21 15:06:21 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: ensure default query/event handlers are used
+	  Sync audiovisualizer class implementation to the one in gst-plugins-base. This
+	  commit matches 9dd0e6cccc971d8a6bcca4e9e4d2ee1dbb20fffa in that module.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742875
+
+2015-01-21 10:18:11 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/siren/decoder.c:
+	* gst/siren/encoder.c:
+	  siren: Make some local variables non-static for thread-safety
+	  Otherwise we will override values from another thread if we encode
+	  or decode frames at the same time in different threads.
+
+2015-01-21 10:17:04 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/apexsink/gstapexsink.c:
+	* ext/audiofile/gstafsink.c:
+	* ext/audiofile/gstafsrc.c:
+	* ext/bs2b/gstbs2b.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/faac/gstfaac.c:
+	* ext/gl/gstglfilterreflectedscreen.c:
+	* ext/openh264/gstopenh264enc.cpp:
+	* ext/voamrwbenc/gstvoamrwbenc.c:
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/gstvc1parser.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst/adpcmenc/adpcmenc.c:
+	* gst/freeverb/gstfreeverb.c:
+	* gst/librfb/d3des.c:
+	* gst/mpeg1sys/buffer.c:
+	* gst/mpegpsmux/crc.h:
+	* gst/patchdetect/gstpatchdetect.c:
+	* gst/tta/filters.h:
+	* gst/vbidec/gstvbidec.c:
+	* gst/vbidec/vbidata.c:
+	* sys/dvb/camapplication.c:
+	* sys/dvb/camtransport.c:
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/gstdvbsrc.c:
+	* sys/dxr3/dxr3videosink.c:
+	* sys/linsys/gstlinsyssdisink.c:
+	* sys/qcam/gstqcamsrc.c:
+	  Constify some static arrays everywhere
+
+2015-01-21 08:49:23 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* po/POTFILES.in:
+	  po: Fix list of files tracked
+	  sfsink/sfsrc haven't been ported (and therefore dist'ed) in 1.x
+
+2014-12-09 09:58:03 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: minor debug update
+	  Only show PTS/DTS when they are valid, and include the stream id
+
+2015-01-20 14:55:05 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: do not skip the first fragment
+	  Avoid advancing fragment right after downloading the header. If it
+	  is the header, by default, don't advance to the next fragment.
+
+2015-01-20 16:57:15 +0100  Piotr Drąg <piotrdrag@gmail.com>
+
+	* po/POTFILES.in:
+	  po: update POTFILES
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743251
+
+2015-01-16 19:32:15 +0100  Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: expose stereo-high profile
+	  Exposing stereo-high profile as a compatible profile of multiview-high
+	  if the maximum number of encoded views in the stream is two.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743174
+
+2015-01-19 17:31:26 +0100  Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: parse SPS subset
+	  This patch calls gst_h264_parser_parse_subset_sps() when a
+	  SPS subset NAL type is found.
+	  All the bits required for parsing the SPS subset in NALs were
+	  already there, just we need to call them when the this NAL type
+	  is found.
+	  With this parsing, the number of views (minus 1) attribute is
+	  filled, which was a requirement for negotiating the stereo-high
+	  profile.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743174
+
+2013-03-19 14:23:00 +0200  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: add initial support for MVC NAL units.
+	  Initial support for MVC NAL units. It is only needed to propagate the
+	  complete set of NAL units downstream at this time.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=696135
+	  Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2015-01-20 09:23:02 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: add explicit cast to make clang happy
+	  Fixes compilation
+
+2015-01-15 17:44:45 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: refactor chunk downloading flow
+	  Add more power to the chunk_received function (renamed to data_received)
+	  and also to the fragment_finish function.
+	  The data_received function must parse/decrypt the data if necessary and
+	  also push it using the new push_buffer function that is exposed now. The
+	  default implementation gets data from the stream adapter (all available)
+	  and pushes it.
+	  The fragment_finish function must also advance the fragment. The default
+	  implementation only advances the fragment.
+	  This allows the subsegment handling in dashdemux to continuously download
+	  the same file from the server instead of stopping at every subsegment
+	  boundary and starting a new request
+
+2015-01-19 12:37:23 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/compositor/blend.c:
+	  compositor: fix illegal memory access in blend function with negative ypos
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741115
+
+2015-01-19 08:37:59 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: add log message about segment time information
+	  For debugging purposes
+
+2015-01-19 08:36:42 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix multi-period playback
+	  If we say it is the first segment after a new period it will resync
+	  the segment.start value and all buffers will be late for the new period
+	  we are trying to play. Otherwise we want to keep the segment.start with
+	  the previous value to allow the running time to smoothly increase
+
+2015-01-19 11:23:52 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Fix compiler warning with clang
+	  gstdashdemux.c:1330:13: error: implicit conversion from enumeration type 'enum _GstAdaptiveDemuxFlowReturn' to different enumeration type
+	  'GstFlowReturn' [-Werror,-Wenum-conversion]
+	  ret = GST_ADAPTIVE_DEMUX_FLOW_SUBSEGMENT_END;
+	  ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+2015-01-18 21:05:44 +0100  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: fix memleak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743142
+
+2015-01-18 17:25:35 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* gst/real/Makefile.am:
+	* gst/real/gstreal.c:
+	* gst/real/gstreal.h:
+	* gst/real/gstrealaudiodec.c:
+	* gst/real/gstrealaudiodec.h:
+	* gst/real/gstrealvideodec.c:
+	* gst/real/gstrealvideodec.h:
+	  Remove real plugin which is no longer needed and has never been ported
+	  Decoders for these formats exist in gst-libav, if anyone
+	  still has a need for them.
+
+2015-01-18 17:10:37 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* docs/plugins/Makefile.am:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* ext/Makefile.am:
+	* ext/mythtv/Makefile.am:
+	* ext/mythtv/gstmythtvsrc.c:
+	* ext/mythtv/gstmythtvsrc.h:
+	* gst-plugins-bad.spec.in:
+	  Remove libgmyth-based MythTV source element which was never ported
+	  gmyth seems to be unmaintained upstream, and no one has asked
+	  for this to be ported for a very long time, so let's just
+	  remove it. Neither debian nor Fedora seem to ship libgmyth
+	  any longer, and in any case it's most likely deprecated by
+	  the UPnP support in MythTV.
+
+2015-01-17 10:06:40 +1100  Lasse Laursen <lasse@lasselaursen.com>
+
+	* gst-libs/gst/gl/gstglapi.h:
+	  glapi: fix compilation with latest MSVC
+	  https://bugzilla.gnome.org/show_bug.cgi?id=743041
+
+2015-01-15 12:57:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: use the correct size for the pbo
+	  It was missing the GstVideoAlignment padding which could cause GL
+	  errors related to overrunning the size of the pbo.
+
+2015-01-16 16:18:35 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: prevent early EOS when switching at last fragment
+	  Check if there is a next fragment before advancing to avoid causing
+	  a bitrate switch (and maybe exposing new pads) only to push EOS.
+	  This causes playback to stop with an error instead of properly
+	  finishing with EOS message.
+
+2015-01-13 14:22:02 +0000  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Fix detection for the end of segment.
+	  The segment start time is calculated as the offset into the current segment.
+	  The old condition to detect the end of period (i.e. segment start time >
+	  period start + period duration) failed when the period start was not 0 since
+	  the segment start time does not take the period start time into account.
+	  Fix this detection by only comparing the segment start to the period duration.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733369
+
+2015-01-14 23:11:15 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: remove unused segment attribute
+	  It was never used, only initialized
+
+2015-01-12 17:40:47 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: implement ISOBMFF profile handling
+	  The ISOBMFF profile allows definind subsegments in a segment. At those
+	  subsegment boundaries the client can switch from one representation to
+	  another as they have aligned indexes.
+	  To handle those the 'sidx' index is parsed from the stream and the
+	  entries point to pts/offset of the samples in the stream. Knowing that
+	  the entries are aligned in the different representation allows the client
+	  to switch mid fragment. In this profile a single fragment is used per
+	  representation and the subsegments are contained in this fragment.
+	  To notify the superclass about the subsegment boundary the chunk_received
+	  function returns a special flow return that indicates that. In this case,
+	  the super class will check if a more suitable bitrate is available and will
+	  change to the same subsegment in this new representation.
+	  It also requires special handling of the position in the stream as the
+	  fragment advancing is now done by incrementing the index of the subsegment.
+	  It will only advance to the next fragment once all subsegments have been
+	  downloaded.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741248
+
+2015-01-12 11:57:02 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/Makefile.am:
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	* ext/dash/gstisoff.c:
+	* ext/dash/gstisoff.h:
+	  dashdemux: parse the sidx index from isobmff streams
+	  Allows dashdemux to identify the subsegments in the stream and
+	  switch bitrates when needed
+
+2015-01-09 16:43:03 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: check for profiles
+	  Check for available profiles to enable certain features for
+	  dash playback. For now we check for the ISOFF On Demand 2011 profile.
+
+2015-01-13 10:16:22 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: add a special return to signal subsegment boundary
+	  The subsegment boundary return tells the adaptivedemux that it can
+	  try to switch to another representation as the stream is at a suitable
+	  position for starting from another bitrate.
+
+2015-01-13 10:15:21 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Actually use the byte range for the fragment url
+	  Otherwise we would always download the full fragment. This would
+	  make handling subsegments in DASH impossible.
+
+2015-01-13 10:13:47 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: allow downloads of headers only
+	  In order to get some subsegment information, subclasses might want
+	  to download only the headers to have enough data (the index)
+	  to decide where to start downloading from the subsegment.
+
+2015-01-12 18:22:14 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: refactor common code to function
+	  Reuse the same function when finishing downloading and signaling to
+	  the download loop thread to get the next fragment or abort
+
+2015-01-09 17:19:54 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: inform subclass when headers/index are being downloaded
+	  This allows the subclasses to know if the chunks that are downloaded are
+	  part of the header or of the index and will parse the parts that are
+	  of their interest.
+
+2015-01-15 16:11:24 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst-libs/gst/uridownloader/gsturidownloader.c:
+	  uridownloader: a few leak fixes
+
+2015-01-15 13:16:07 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst-libs/gst/uridownloader/gstfragment.c:
+	  fragment: fix caps and buffer leaks in get_property
+
+2015-01-14 17:43:51 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: remove unused fragments_cache field
+
+2015-01-14 16:42:25 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: a few leak fixes
+
+2015-01-12 21:22:06 +0100  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/bs2b/gstbs2b.c:
+	  bs2b: implement the preset interface
+	  Instead of a preset property implement the preset interface in a read-only
+	  fashion.
+
+2015-01-12 12:11:01 +0100  Stefan Sauer <ensonic@users.sf.net>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/gst-plugins-bad-plugins.hierarchy:
+	* docs/plugins/gst-plugins-bad-plugins.interfaces:
+	* docs/plugins/inspect/plugin-bs2b.xml:
+	  docs: add new bs2b plugin and element
+
+2015-01-10 21:41:12 +0100  Christoph Reiter <reiter.christoph@gmail.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/bs2b/Makefile.am:
+	* ext/bs2b/gstbs2b.c:
+	* ext/bs2b/gstbs2b.h:
+	  bs2b: add new plugin (Effect/Audio, crossfeed)
+	  https://bugzilla.gnome.org/show_bug.cgi?id=611689
+
+2015-01-15 13:13:51 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	  interaudiosink: Make sure that buffer time is always bigger than period time
+
+2015-01-15 12:49:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Also consider max-lateness property value before dropping late frames
+
+2015-01-15 14:09:43 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/corevideotexturecache.m:
+	* sys/applemedia/vtdec.c:
+	* sys/applemedia/vtdec.h:
+	  vtdec: implement the GL texture upload meta
+
+2015-01-09 00:16:17 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/Makefile.am:
+	* sys/applemedia/avfvideosrc.m:
+	* sys/applemedia/coremediabuffer.c:
+	* sys/applemedia/corevideotexturecache.h:
+	* sys/applemedia/corevideotexturecache.m:
+	  avfvideosrc: implement the GL texture upload meta
+
+2015-01-15 09:47:45 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixerpad.h:
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: don't upload if alpha <= 0
+	  Implemented using a upload_buffer vfunc within GstGLMixer allowing
+	  NULL uploaded buffers.
+
+2015-01-15 09:45:21 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: remove spurious gst_video_info_align
+	  That will be taken care of by the calling code (typically a bufferpool).
+	  The GstVideoAlignment is purely informational to compute plane data sizes.
+
+2015-01-14 23:48:16 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Document the zorder pad property from gstvideoaggregator
+
+2015-01-14 23:47:19 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Nitpick spacing/punctuation in debug logging
+
+2015-01-14 16:33:53 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Stop scheduled playback shortly in PAUSED->PLAYING if it was running already
+	  This fixes handling of flushing seeks, where we will get a PAUSED->PLAYING
+	  state transition after the previous one without actually going to PAUSED
+	  first.
+
+2015-01-14 16:01:07 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.h:
+	  decklinkvideosink: Don't schedule too late frames in prepare()
+	  Otherwise we will overflow the internal buffer of the hardware
+	  with useless frames and run into an error. This is necessary until
+	  this bug in basesink is fixed:
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742916
+
+2015-01-14 15:54:28 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.h:
+	  decklinkvideosink: Keep track of the time when we went to PLAYING for the external clock too
+	  Otherwise we're adding an offset of the time the pipeline was in PLAYING
+	  already to the running time when converting it to our internal clock.
+
+2015-01-14 13:32:51 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Enable QoS and set max-lateness to 20ms
+
+2015-01-12 17:24:52 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  h264parser: fix stack smashing
+	  Ensure that we do not trust the bitstream when filling a table
+	  with a fixed max size.
+	  Additionally, the code was not quite matching what the spec says:
+	  - a value of 3 broke from the loop before adding an entry
+	  - an unhandled value did not add an entry
+	  The reference algorithm does these things differently (7.3.3.1
+	  in ITU-T Rec. H.264 (05/2003)).
+	  This plays (apparently correctly) the original repro file, with
+	  no stack smashing.
+	  Based on a patch and bug report by André Draszik <git@andred.net>
+
+2015-01-14 22:08:43 +1100  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixerpad.h:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	* tests/check/libs/gstglcolorconvert.c:
+	  gl: split glcolorconvert usage from glupload
+	  the separation allows the transfer operation to occur in a separate
+	  thread/time which may increase performance in specific circumstances.
+
+2015-01-14 12:39:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: offset the data pointer for upload for GstVideoAlignment
+	  otherwise we attempt to read from the padding data
+
+2015-01-14 00:08:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: use pbo's for upload
+
+2015-01-13 23:47:06 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: relax the GLMemory uploader check for input caps features
+	  As there may be a sysmem caps features with GLMemory filled buffers.
+	  e.g.
+	  videotestsrc ! glimagesink
+
+2015-01-13 11:32:03 -0800  Zaheer Abbas Merali <zaheermerali@gmail.com>
+
+	* configure.ac:
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264enc.cpp:
+	  Revert "Revert "openh264: fix to work with released versions and master of upstream""
+	  This reverts commit 329f0ccba1aa604da1bd80293fd1fe717447df5d.
+
+2014-12-17 09:19:52 -0800  Zaheer Abbas Merali <zaheermerali@gmail.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264: remove all trace output to console from encoder
+
+2015-01-13 19:56:24 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Use BT2020 colorspace for UltraHD resolutions
+
+2015-01-13 19:55:37 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklink: Fix indention once again
+
+2015-01-13 16:49:07 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: handle the return of the setup function
+	  Make the class future proof by handling the gboolean return of the setup
+	  function. So if/when a child class uses this the base class is ready.
+
+2015-01-13 16:46:10 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  Revert "audiovisualizer: remove unused value"
+	  This reverts commit 25c97570834d6de1c14424e71221d19eb0d33ee3.
+	  It is preferable to handle the retun of the setup function.
+
+2015-01-13 17:44:17 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Get our own "start time" instead of the one of the pipeline
+	  decklinkvideosink might be added later to the pipeline, or its state might
+	  be handled separately from the pipeline. In which case the running time when
+	  we (last) went into PLAYING state will be different from the pipeline's.
+	  However we need our own start time to tell the Decklink API, which running
+	  time should be displayed at the moment we go to PLAYING and start scheduled
+	  rendering.
+
+2015-01-13 17:00:51 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintersubsink.c:
+	* gst/inter/gstintersubsrc.c:
+	* gst/inter/gstintervideosink.c:
+	  inter: Use a #define for the default value of the channel property
+
+2015-01-13 16:58:50 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	* gst/inter/gstintervideosrc.h:
+	  intervideosrc: Make the timeout configurable after which we start showing a black frame
+
+2015-01-13 15:42:26 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: remove unused value
+	  klass->setup (scope) will always return TRUE since all children of this class
+	  do so, no need to store the return. Besides, the value is overwritten a few
+	  lines down before it is used.
+	  Change helps keep files in sync after:
+	  -base commit a91d521a3602f33083405467db9454d422b9da1b
+
+2015-01-13 14:54:26 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Don't do any conversions if the pad is completely transparent anyway
+
+2015-01-12 12:58:27 +0100  Branislav Katreniak <bkatreniak@nuvotechnologies.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintervideosrc.c:
+	  inter: silence messages for flushed / created samples
+	  These messages are logged periodically and polute the log
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741592
+
+2014-12-25 23:10:19 +0100  Nicola Murino <nicola.murino@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: fix memleak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741943
+
+2014-12-25 22:59:42 +0100  Nicola Murino <nicola.murino@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: fix some memory leaks
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741943
+
+2014-12-31 17:45:53 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	* tests/check/libs/gstglcontext.c:
+	  glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
+	  Fill in the missing pieces like get_proc_address, the gl function vtable
+
+2015-01-12 21:25:14 +0100  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst-libs/gst/video/.gitignore:
+	* gst/compositor/.gitignore:
+	* tests/check/pipelines/.gitignore:
+	  gitignore: ignore more files
+
+2015-01-12 15:33:09 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  visual: use unused value
+	  ret is assigned but not used and in the next cycle of the loop it is overwritten
+	  with default_prepare_output_buffer (). If there is a flow error the function
+	  should return instead.
+	  CID #1226475
+
+2015-01-12 16:10:31 +0100  Stefan Sauer <ensonic@users.sf.net>
+
+	* common:
+	  Automatic update of common submodule
+	  From f2c6b95 to bc76a8b
+
+2015-01-12 15:57:53 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklink: Initialize refcount of our C++ classes in the constructor
+	  CID 1262288
+	  CID 1262287
+	  CID 1262289
+
+2015-01-12 14:22:47 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstdilate.c:
+	  gaudieffects: stored value is overwritten
+	  Value from left_luminance is assigned to out_luminance here, but that stored
+	  value is not used before it is overwritten in the next cycle of the loop.
+	  Removing assignation.
+	  CID #1226473
+
+2015-01-12 12:50:33 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: fix dead code
+	  found is initialized to FALSE to then only be used in two conditional statements
+	  that will always be false, making the blocks inside them dead code. Looking back
+	  in the file's history the setting of the variable's value before it is checked
+	  was dropped as part of the port to 0.11, bringing that value setting back.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742638
+
+2015-01-11 20:40:34 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: minor optimisation when scanning for SCRs
+	  Bail out early when we're scanning for SCR, no need to
+	  parse stuff we're not going to use nor interested in.
+
+2015-01-11 01:08:08 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/mpg123/gstmpg123audiodec.c:
+	  mpg123: fix compiler warning and simplify checks in set_caps
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740195
+
+2015-01-03 13:06:45 +0100  Carlos Rafael Giani <dv@pseudoterminal.org>
+
+	* ext/mpg123/gstmpg123audiodec.c:
+	  mpg123: rework set_format code so mpg123audiodec works with decodebin/playbin
+	  The old code was using gst_caps_normalize() and was generally overly
+	  complex. Simplify by picking sample rate and number of channels from
+	  upstream and the sample format from the allowed caps. If the format caps
+	  is a list of strins, just pick the first one. And if the srcpad isn't
+	  linked yet, use the default format (S16).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740195
+
+2015-01-10 15:34:57 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: Disable hack for NSApp iteration with a special #define
+	  The hack causes deadlocks and other interesting problems and it really
+	  can only be fixed properly inside GLib. We will include a patch for
+	  GLib in our builds for now that handles this, and hopefully at some
+	  point GLib will also merge a proper solution.
+	  A proper solution would first require to refactor the polling in
+	  GMainContext to only provide a single fd, e.g. via epoll/kqueue
+	  or a thread like the one added by our patch. Then this single
+	  fd could be retrieved from the GMainContext and directly integrated
+	  into a NSRunLoop.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741450
+	  https://bugzilla.gnome.org/show_bug.cgi?id=704374
+
+2015-01-10 15:40:30 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	  inter: interaudiosrc - fixate layout for default caps
+	  Makes interaudiosrc produce valid audio caps in the absence of any other
+	  guidance by adding to the pad template and fixate function
+
+2015-01-09 21:51:40 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Remove pointless atomic
+	  It is only modified from the streaming thread
+
+2015-01-09 21:30:36 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix query leak
+
+2015-01-09 17:56:09 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstwavescope.c:
+	  audiovisualizer: remove check for below zero for unsigned value
+	  CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
+	  number since it is an unsigned integer. Removing that check and only checking if
+	  it is bigger than max and setting it appropriately.
+	  Also converting the previous instance of this into MIN() for consistency.
+	  CID 1139793
+
+2014-12-02 10:10:39 +0200  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: expose compatible profiles to downstream
+	  Some video bitstreams report a too restrictive set of profiles. If a video
+	  decoder was to strictly follow the indicated profile, it wouldn't support that
+	  stream, whereas it could in theory and in practice. So we should relax the
+	  profile restriction for allowing the decoder to get connected with parser.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739992
+
+2015-01-09 16:43:39 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Print jitter from clock waiting in the debug logs
+
+2015-01-09 14:42:34 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/audiovisualizers/gstwavescope.c:
+	  audiovisualizer: remove check if below zero for unsigned value
+	  CLAMP checks both if y is '< 0' and '> h1'. y will never be a negative number
+	  since it is an unsigned integer. Removing that check and only checking if it
+	  bigger than h1 and setting it to that max approprietaly.
+	  CID 1139792
+
+2015-01-08 16:24:29 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: cache current file position in the list
+	  Avoids iterating the list everytime to look for the next segment
+	  to be used (or to advance to the next one).
+
+2015-01-08 15:46:49 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: simplify next segment checking functions
+	  Optimize loop by moving condition outside of it and reuse the
+	  find_next_fragment function to check if there is next instead of
+	  replicating the same loop
+
+2015-01-08 13:03:11 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: cache total duration to avoid iterating at every query
+	  Duration queries can be done a few times per second and would cause
+	  the segment list to be traversed for every one. Caching the duration
+	  prevents that.
+
+2015-01-08 18:15:27 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Post LATENCY message when the mode changes
+	  Different modes have different framerates, and thus different latencies. We
+	  might need to reconfigure the latency of the pipeline.
+
+2015-01-08 18:14:38 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Fix compiler warning
+
+2015-01-08 16:42:31 +0100  Florian Langlois <florian.langlois@fr.thalesgroup.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklinkvideosrc: Add automatic mode detection
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739284
+
+2015-01-08 15:54:18 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: g_return_if_fail in function with return type
+	  Need to use g_return_val_if_fail() when the function returns a type, in this
+	  case a gboolean
+
+2015-01-08 15:36:04 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/rtp/gstrtph265pay.c:
+	  rtp: value truncated too short creates dead code
+	  type is truncated to 0-31 with "& 0x1f", but right after that it is checks if
+	  the value is equivalent to GST_H265_NAL_VPS, GST_H265_NAL_SPS, and
+	  GST_H265_NAL_PPS (which are 32, 33, and 34 respectively). Obviously, this will
+	  never be True if the value is maximum 31 after the truncation.
+	  The intention of the code was to truncate to 0-63.
+
+2015-01-08 15:27:44 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtp: fix nal unit type check
+	  After further investigation the previous commit is wrong. The code intended to
+	  check if the type is 39 or the ranges 41-44 and 48-55. Just like gsth265parse.c
+	  does. Type 40 would not be complete.
+
+2015-01-08 13:47:09 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/rtp/gstrtph265depay.c:
+	  rtp: fix dead code and check for impossible values
+	  nal_type is the index for a GstH265NalUnitType enum. There are two types of dead
+	  code here:
+	  First, after checking if nal_type is >= 39 there are two OR conditionals that
+	  check if the value is in ranges higher than that number, so if nal_type >= 39
+	  falls in the True branch those other conditions aren't checked and if it falls
+	  in the False branch and they are checked, they will always also be False. They
+	  are redundant.
+	  Second, the enum has a range of 0 to 40. So the checks for ranges higher than 41
+	  should never be True.
+	  Removing this redundant checks.
+	  CID 1249684
+
+2015-01-08 14:47:16 +0100  Florian Zwoch <fzwoch@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Unlock the stream lock while waiting for pending frames to be completed in finish()
+	  We might otherwise deadlock because gst_vtenc_enqueue_buffer() can be
+	  called again and will take the stream lock again from another thread.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742174
+
+2015-01-08 08:46:48 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: implement _has_next_fragment to avoid busy looping
+	  It will allow the demuxer to wait for a fragment to be available instead
+	  of busy looping polling the playlist for a new fragment
+
+2015-01-08 12:55:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Add a dummy value to the video connection mapping table for auto
+
+2015-01-08 12:48:22 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	  decklinkaudiosrc: Add property to select the audio input connection
+
+2015-01-08 12:23:53 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Add XLR and RCA audio connection enums
+
+2015-01-08 12:17:45 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklinkvideosrc: Add auto value for the connection property
+	  This will use the default/auto connection for video capturing, and can
+	  be set via the Decklink configuration tools.
+
+2015-01-08 12:13:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Fix indention once again
+
+2015-01-06 14:02:38 +0100  Florian Langlois <florian.langlois@fr.thalesgroup.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklink: Add property for configuring the input connection of the video sources
+
+2015-01-08 09:35:23 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	  gl/cocoa: Don't init and clear static GMutex / GCond
+	  We would potentially use it from the main loop later in
+	  gst_gl_window_cocoa_init_nsapp() if it timed out before.
+
+2015-01-07 16:53:41 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: remove logically dead code
+	  Soon after setting two variables to 1, the code checks if their values are
+	  different from each other. This would never be true. Removing this.
+	  CID 1226443
+
+2015-01-07 16:40:25 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	* gst/videoparsers/gstpngparse.h:
+	  Revert "pngparse: improve parsing of the image"
+	  This reverts commit 59e7f0597d1cc524174e847de7b91407922304c8.
+	  This patch should not have been pushed, see
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740058#c3
+
+2015-01-07 16:26:57 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/opencv/gsthanddetect.c:
+	  handdetect: remove unneeded check
+	  Variable hands is already checked to contain a value previously at the beginning
+	  of the current block (in line 504). There is no need to check again. This is
+	  logically dead code.
+	  CID 1197693
+
+2014-11-13 15:56:07 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	* gst/videoparsers/gstpngparse.h:
+	  pngparse: improve parsing of the image
+	  Everytime a buffer is being provided from baseparse, we are parsing all the data from the beginning.
+	  But since we would have already parsed some of the data in the previous iterations,
+	  it doesnt make much sense to keep parsing the same everytime.
+	  Hence skipping the data which is already read in previous iterations to improve the parsing performance.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740058
+
+2015-01-07 15:32:05 +0100  Florian Langlois <florian.langlois@fr.thalesgroup.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Fix latency values for sources
+
+2015-01-07 10:23:31 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: remove duplicate call to uri_join
+
+2015-01-07 09:30:00 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: skip checking '#EXT-X-' token for all entries
+	  Put this common check before to avoid repeating it for all possible
+	  entries to save some cycles
+
+2015-01-07 09:21:33 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: avoid using g_list_append for creating segments list
+	  Use g_list_prepend and reverse it at the end to skip traversing the
+	  same list for every new segment
+
+2014-06-20 12:38:59 -0600  Thomas Bluemel <tbluemel@control4.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: Don't use approximate duration for fragment buffer pts
+	  The duration values in playlists are approximate only, and for
+	  playlist versions 2 and older they are only rounded integer values.
+	  They cannot be used to timestamp buffers.  This resulted in playback
+	  gaps and skips because the actual duration of fragments is slightly
+	  different.  The solution is to only set the pts of the very first
+	  buffer processed, not for each fragment.
+
+2015-01-06 18:44:15 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: only update segment if we have a valid PTS
+	  Otherwise we set the position to GST_CLOCK_TIME_NONE and it disrupts
+	  bitrate switching
+
+2015-01-07 11:31:30 +0530  Rajat Verma <rajat.verma@st.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  mssdemux: fix crash while setting bitrate in caps structure
+	  q->bitrate is a guint64, but G_TYPE_INT may read fewer bits
+	  off the stack, and if we pass more then the NULL sentinel
+	  may not be found at the right place, which in turn might
+	  lead to crashes.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741751
+
+2015-01-02 00:59:00 +0000  Duncan Palmer <dpalmer@digisoft.tv>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Fix periodic SPS/PPS sending work after a seek
+	  Reset the interval variable to have SPS/PPS sending work after
+	  a (backwards) seek.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=742212
+
+2015-01-05 21:26:22 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: fix deadlock with pad object lock
+	  The image capture mutex and the pad object lock would cause a race
+	  if the pad query was made right when the image probe was running.
+	  The image probe needs the capture mutex and the querying would need
+	  the pad object lock.
+
+2015-01-05 15:16:15 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: simplify weird if/else clause
+	  It is not an if/else situation but an if error abort otherwise
+	  just continue. Remove else to make it more readable
+
+2014-04-04 16:45:51 +0100  Alex Ashley <bugzilla@ashley-family.net>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: Implement live seeking
+	  hlsdemux assumes that seeking is not allowed for live streams,
+	  however seek is possible if there are sufficient fragments in the
+	  manifest. For example the BBC have live streams that contain 2 hours
+	  of fragments.
+	  The seek code for both live and on-demand is common code. The
+	  difference between them is that an offset has to be calculated
+	  for the timecode of the first fragment in the live playlist.
+	  When hlsdemux starts to play a live stream, the possible seek range
+	  is between 0 and A seconds. After some time has passed, the beginning of
+	  the stream will no longer be available in the playlist and the seek
+	  range is between B and C seconds.
+	  Seek range:
+	  start          0 ........... A
+	  later               B ........... C
+	  This commit adds code to keep a note of the B and C values
+	  and the highest sequence number it has seen. Every time it updates the
+	  media playlist, it walks the list of fragments, seeing if there is a
+	  fragment with sequence number > highest_seen_sequence. If so, the values
+	  of B and C are updated. The value of B is used when timestamping
+	  buffers.
+	  It also makes sure the seek range is never closer than three fragments
+	  from the end of the playlist - see 6.3.3. "Playing the Playlist file"
+	  of the HLS draft.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725435
+
+2015-01-05 17:58:54 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: prepare for supporting seeks in live streams
+	  Add function to allow subclasses to specify seeking range for
+	  live streams
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725435
+
+2015-01-04 17:15:37 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: don't use iterator when setting flush pending on pads
+
+2015-01-04 16:57:05 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: check if pads are ready more efficiently
+	  No need to use an iterator for this which creates a temporary
+	  structure every time and also involves taking and releasing the
+	  object lock many times in the course of iterating. Not to mention
+	  all that GList handling in gst_aggregator_iterate_sinkpads().
+
+2015-01-04 12:59:19 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: name vfunc arguments consistently
+
+2014-12-31 20:47:24 +0100  Mark Nauwelaerts <mnauw@users.sourceforge.net>
+
+	* tests/check/Makefile.am:
+	  tests: nodist for orc generated code
+
+2015-01-01 15:46:00 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: add g-i transfer and scope annotations
+
+2015-01-01 14:10:05 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: register names of iterate_sinkpads functions with debug system
+
+2015-01-01 14:03:02 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: reduce debug messages for taking/releasing logs to TRACE level
+	  Don't spam debug log with this stuff.
+
+2014-12-31 18:16:21 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: move property member into private structure
+	  Our locking (or lack thereof) while accessing this also
+	  looks generally quite dodgy.
+
+2014-12-31 14:50:58 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: remove empty dispose function
+
+2014-12-30 23:58:34 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: give private functions namespace prefix
+	  Especially the GST_DEBUG_FUNCPTR ones.
+
+2014-12-31 12:35:06 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: fix up some docs comments in header
+
+2014-12-30 23:44:46 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: remove now-unused system clock member
+
+2014-12-30 19:43:43 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglvideomixer.c:
+	  glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change
+
+2014-12-30 19:26:47 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: update for aggregator start/stop vfunc change
+
+2014-12-30 19:22:01 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: make GstAggregatorPadForeachFunc take an GstAggregatorPad
+
+2014-12-30 18:01:34 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: update for aggregator start/stop vfunc change
+
+2014-12-30 17:56:35 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: update for aggregator start/stop vfunc change
+
+2014-12-30 17:50:17 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: bring start/stop vfunc semantics in line with other baseclasses
+	  Sub-class should not have to chain up to GstAggregator's start/stop
+	  vfuncs, same as in GstBaseSrc, GstBaseSink, GstBaseTransform etc.
+
+2014-12-30 15:29:36 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: fix output-block-size property description
+
+2014-12-30 08:07:18 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: only typefind when we have a minimum amount of data
+	  For small amounts some data might be mistyped and it would cause
+	  the pipeline to fail. For example if you have AAC inside mpegts,
+	  for small amounts, the AAC samples would cause the typefinder to
+	  think it is AAC and not mpegts.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736061
+
+2014-12-29 11:49:51 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Add support for 4K / UHD modes
+
+2014-12-29 11:49:42 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Fix indention
+
+2014-12-29 10:44:53 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: do not try to ref null pointer
+	  Playlists might be missing the availability start time, so check for
+	  it before trying to ref the object
+
+2014-12-29 10:44:19 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: run gst-indent on mpdparser
+	  Run gst-indent on mpdparser to have it stop complaining on every
+	  commit
+
+2014-12-28 18:26:49 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: remove pointless GST_DEBUG_FUNCPTR
+	  Not useful for GObject vfuncs.
+
+2014-12-28 18:24:21 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: remove duplicate pad parent_class variable
+	  G_DEFINE_TYPE already provides one, just need to use it.
+
+2014-12-28 18:22:57 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: add _CAST() variants for cast macros
+
+2014-12-28 01:13:33 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  aggregator: make padding larger
+	  Esp. the class structures, can't have enough
+	  spare space for virtual functions.
+
+2014-12-28 00:58:04 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/siren/gstsiren.h:
+	* gst/siren/gstsirendec.h:
+	* gst/siren/gstsirenenc.h:
+	  siren: remove unneeded structure padding
+	  Public headers are private and not installed.
+
+2014-12-27 16:15:41 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Log to the pad instead of the element
+	  More correct way of doing the same thing as before
+
+2014-12-27 15:50:17 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: Point to compositor for the pad properties documentation
+
+2014-12-27 15:49:47 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Document the pad properties
+
+2014-12-27 15:49:39 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Document the pad properties
+
+2014-12-27 09:49:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Make sure that the minimum latencies are never GST_CLOCK_TIME_NONE
+
+2014-12-27 09:42:57 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Wait for the minimum latency, not the maximum
+	  The minimum latency is the latency we have to wait at least
+	  to guarantee that all upstreams have produced data. The maximum
+	  latency has no meaning like that and shouldn't be used for waiting.
+
+2014-12-27 04:21:36 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Clamp the min latency at the max if it's greater
+
+2014-12-27 04:21:26 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Print the sinkpad name while logging latency queries
+	  Very useful while debugging.
+
+2014-12-27 04:19:52 +0530  Nirbheek Chauhan <nirbheek@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Take the stream lock when iterating sink pads
+	  When iterating sink pads to collect some data, we should take the stream lock so
+	  we don't get stale data and possibly deadlock because of that. This fixes
+	  a definitive deadlock in _wait_and_check() that manifests with high max
+	  latencies in a live pipeline, and fixes other possible race conditions.
+
+2014-12-26 23:05:43 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: do not set source state with lock
+	  It might be racy with the image probe thread as it uses the capture
+	  mutex just like the start-capture handler from camerabin. The
+	  start-capture would be waiting for the source's streaming thread
+	  to stop to be able to set the source state to ready while the
+	  probe would be blocked waiting to acquire the capture mutex.
+	  It causes a deadlock.
+
+2014-12-26 10:17:19 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: use the drain query instead of flush
+	  The flush might clear any pending captures that are still in
+	  queues being processed while the drain query will wait for those
+	  to be properly done
+
+2014-12-26 22:45:41 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: improve timestamp code
+	  Use a combination of the running time and CMClockGetTime from AVF to compute
+	  timestamps.
+
+2014-12-26 11:48:56 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/gstgdppay.c:
+	  gdppay: use public API for accessing stream header arrays in caps
+	  Don't rely on core implementation details, which are private and
+	  may change. It's also not needed here, the performance impact is
+	  close to none. Also copy buffer before changing its metadata.
+
+2014-12-26 11:29:12 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/gdpdepay.c:
+	  tests: gdpdepay: update for internal gdp refactoring
+	  This test uses some internal/private API, so needs to
+	  be updated for recent changes.
+
+2014-12-26 11:27:38 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/dataprotocol.c:
+	* gst/gdp/dataprotocol.h:
+	* gst/gdp/gstgdppay.c:
+	  gdppay: refactor payloading code a little
+	  Get rid of some indirections and inefficiencies,
+	  just payload things directly which gives us more
+	  control over what memory is allocated where and
+	  how and makes things much simpler. In particular,
+	  we can now allocate the payload header plus the
+	  GstMemory to represent it in one go.
+
+2014-12-15 00:41:22 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/dataprotocol.c:
+	* gst/gdp/dataprotocol.h:
+	* gst/gdp/gstgdppay.c:
+	* gst/gdp/gstgdppay.h:
+	* tests/check/elements/gdpdepay.c:
+	  gdppay: refactor a little
+	  Get rid of now-useless packetizer struct and just
+	  call internal functions directly. Also remove
+	  version property which is now defunct, not least
+	  because we create the packetizer with the
+	  version in the init function before a version
+	  can be set.
+
+2014-12-13 16:46:07 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/elements/gdppay.c:
+	  tests: gdppay: initialise memory of buffers used in unit test
+
+2014-12-13 15:23:48 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/dataprotocol.c:
+	* gst/gdp/dataprotocol.h:
+	  gdppay: optimise payloading of buffers with multiple memories
+	  Add function to calculate a payload CRC across multiple memories
+	  so we don't have to merge buffers with multiple memories just to
+	  calculate the CRC. Also make CRC calculation function static,
+	  since it's not used outside dataprotocol.h and move special-casing
+	  of length = 0 -> CRC = 0 into CRC function (from caller).
+	  Perhaps more importantly, since payload CRC is off by default:
+	  don't map buffer (and possibly merge memories in the process)
+	  if we are not going to use it to calculate a CRC anyway.
+
+2014-12-13 15:19:16 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/dataprotocol.c:
+	* gst/gdp/dataprotocol.h:
+	  gdppay: dataprotocol: drop bogus const
+	  Doesn't really make sense given that we map
+	  it and possibly merge memories and such.
+
+2014-11-24 12:18:36 -0700  Vijay Jayaraman <Vijay.Jayaraman@echostar.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: typefind might fail if first buffer is too short
+	  If typefind fails, check to see if the buffer is too short for typefind. If this is the case,
+	  prepend the decrypted buffer to the pending buffer and try again the next time around.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740458
+
+2014-08-27 16:26:19 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/Makefile.am:
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: port to adaptive base class
+	  Conflicts:
+	  ext/hls/gsthlsdemux.c
+	  ext/hls/gsthlsdemux.h
+
+2014-12-23 01:51:50 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: check if element exists before setting it to null
+	  Under certain error conditions it might happen that the element
+	  has been freed already and trying to set it to NULL causes an
+	  assertion
+
+2014-12-23 01:51:10 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: make sure task has stopped before freeing it
+	  Otherwise the thread will be running and its memory will get freed.
+	  This leads to memory corruption
+
+2014-12-23 01:48:41 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix segment start when exposing new streams
+	  Segment start needs only to be updated when starting the streams
+	  or after a seek, doing it during bitrate changes will cause the
+	  running time to go discontinuous (jump back to a previous ts)
+	  and QOS will drop buffers
+
+2014-12-19 02:22:47 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: allow subclass to use new pads group when switching bitrate
+	  Fix pad groups switching when bitrate changes to allow HLS to use this feature
+
+2014-12-23 12:24:48 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: If getting a timeout before having caps, just advance our position
+	  This can happen if this is a live pipeline and no source produced any buffer
+	  and sent no caps until the an output buffer should've been produced according
+	  to the latency.
+
+2014-12-23 12:15:50 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Make sure to release the current buffer in reset()
+	  If we didn't output the last one in aggregate because we were shutting down
+	  earlier we might otherwise leak it.
+
+2014-12-23 11:45:50 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Change blocksize property to output-buffer-duration in time format
+	  This makes the interface of audiomixer independent of the actual caps.
+
+2014-12-23 11:45:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Don't leak flush-start events
+
+2014-12-23 10:24:27 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Also change the default latency to 0, not just the minimum
+
+2014-12-23 09:52:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix docs and default value of the latency property
+
+2014-12-22 22:19:52 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Also include the subclass latency in the result of the latency query
+
+2014-12-22 22:11:30 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Use the src query implementation of aggregator as the default case
+
+2014-12-22 22:11:13 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Use the src query implementation of aggregator as the default case
+
+2014-12-22 16:45:05 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/bayer/gstbayer2rgb.c:
+	  bayer2rgb: take into account filter in transform_caps function
+	  Fixes criticals when filter caps are passed.
+	  Also fix wrong GST_DEBUG_OBJECT use.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741863
+
+2014-12-22 15:26:37 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Post a latency message if the value of the latency property changes
+
+2014-12-22 15:03:59 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Wake up the src thread after handling a latency query
+	  Due to changed latencies or changed live-ness we might have to
+	  adjust if we wait on a deadline at all and how long.
+
+2014-12-22 15:00:36 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Don't count the number of times we need to wake up but instead check all conditions for waiting again
+	  This simplifies the code and also makes sure that we don't forget to check all
+	  conditions for waiting.
+	  Also fix a potential deadlock caused by not checking if we're actually still
+	  running before starting to wait.
+
+2014-12-22 11:49:08 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Instead of crashing if no corresponding frame is found, ignore this
+	  ... and hope that everything will be fine. This shouldn't really happen but
+	  previously happened during shutdown. It should be fixed in videoencoder now,
+	  but better be on the safe side here.
+
+2014-12-22 11:46:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* MAINTAINERS:
+	  MAINTAINERS: Update my mail address
+
+2014-12-21 07:47:25 -0500  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst/audiomixer/Makefile.am:
+	  audiomixer: fix build flag order
+	  Have the libraries/inlcudes from plugins-bad first to avoid picking up the installed version.
+	  Fixes the build when the local api changed.
+
+2014-12-20 12:24:53 -0500  Stefan Sauer <ensonic@users.sf.net>
+
+	* gst/freeverb/GstFreeverb.prs:
+	* gst/freeverb/Makefile.am:
+	  freeverb: add a few presets
+
+2014-12-19 13:18:50 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* tests/check/libs/gstglcolorconvert.c:
+	* tests/check/libs/gstglmemory.c:
+	* tests/check/libs/gstglupload.c:
+	  gltest: Port to new API
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740900
+
+2014-12-19 12:22:12 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	  glbufferpool: Always recalculate buffer size
+	  Actually we should always recalculate buffer size since our buffer size
+	  even when not-padded is smaller for many sub-sampled formats. This is
+	  because we don't add padding between the planes.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740900
+
+2014-12-19 12:12:08 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: No need for padding
+	  A memory object cannot be put on stack, so no need for padding.
+
+2014-12-19 12:11:08 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* ext/gl/gstgloverlay.c:
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  gl: Add support for GstVideoAlignment
+	  This allow saving a copy with libav video decoders or decoders with
+	  similar padding requirement.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740900
+
+2014-11-22 11:25:23 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	  glmemory: Handle upload/download flags from map
+	  Problem was that if buffer was mapped READWRITE (state of buffers from
+	  libav right now), mapping it READ/GL will not upload. This is because the
+	  flag is only set when the buffer is unmapped. We can fix this by setting
+	  the flags in map. This result in already mapped buffer that get mapped
+	  to be read in GL will be uploaded. The problem is that if the write
+	  mapper makes modification afterward, the modification will never get
+	  uploaded.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740900
+
+2014-12-13 21:47:38 -0500  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Handle custom stride with OPENGL3
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740900
+
+2014-12-19 15:05:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	  decklink: Fix various compiler warnings with gcc
+
+2014-12-19 14:50:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: Re-add the COM initialization code for Windows
+	  Untested, and we will never deinitialize COM again.
+
+2014-12-19 14:38:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	  decklink: Remove in-same-pipeline detection code for audio/video elements of the same device
+	  This causes deadlocks sometimes for some reason.
+
+2014-12-19 14:35:03 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.h:
+	  decklinkvideosink: Implement clock slaving
+
+2014-12-19 13:52:08 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	  decklinkvideosink: Add some more debug output for when frames are scheduled
+
+2014-12-19 13:28:29 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklink: Add property for configuring the buffer size of the sources
+
+2014-12-19 13:24:10 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	  decklinkaudiosrc: Implement timestamp jitter and discont handling
+
+2014-12-19 12:37:30 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Our capture time is the end timestamp of the buffer, subtract the duration
+
+2014-12-19 12:30:04 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklink: Allow for a maximum of 5 packets to be queued up
+	  In case downstream is a bit slow with consuming packets at times.
+
+2014-12-19 12:03:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	  decklink: Implement latency query in sources and remember selected mode
+
+2014-12-18 18:30:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/capture.cpp:
+	* sys/decklink/capture.h:
+	* sys/decklink/gstdecklinksink.cpp:
+	* sys/decklink/gstdecklinksink.h:
+	* sys/decklink/gstdecklinksrc.cpp:
+	* sys/decklink/gstdecklinksrc.h:
+	  decklink: Remove obsolete files
+
+2014-12-18 17:31:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/Makefile.am:
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.cpp:
+	* sys/decklink/gstdecklinkaudiosrc.h:
+	* sys/decklink/gstdecklinkvideosrc.cpp:
+	* sys/decklink/gstdecklinkvideosrc.h:
+	  decklink: Add initial version of audio and video sources
+
+2014-12-13 17:23:31 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/Makefile.am:
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	* sys/decklink/gstdecklinkaudiosink.cpp:
+	* sys/decklink/gstdecklinkaudiosink.h:
+	* sys/decklink/gstdecklinkvideosink.cpp:
+	* sys/decklink/gstdecklinkvideosink.h:
+	  decklink: Initial version of the audio/video sink rewrite
+
+2014-12-19 13:04:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	  audiomixer: Track discont-time per pad instead of globally
+	  We do discont handling per pad, not per element!
+
+2014-12-15 16:27:16 +0100  Branko Subasic <branko@axis.com>
+
+	* ext/curl/gstcurlsmtpsink.c:
+	* ext/curl/gstcurlsmtpsink.h:
+	  curlsmtpsink: add final boundary to all multipart emails
+	  Corrected the final boundary mechanism so that a final boundary is
+	  added to each mail with multipart content that is sent,
+	  not just to the last one.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741553
+
+2014-12-18 23:33:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: We're only EOS if all our pads are actually EOS
+	  Having a buffer or not on the pad is irrelevant.
+
+2014-12-18 22:42:14 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: The pad's size is always supposed to be the whole buffer size
+	  And the offset the offset into that buffer. Changing the size will
+	  cause all kinds of assumptions to fail and cause crashes.
+
+2014-12-18 22:04:38 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Don't try to map NULL buffers
+
+2014-12-18 22:03:04 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Make sure to always update the pad's videoinfo together with buffers
+	  Otherwise the videoinfo and the buffer content can go out of sync.
+
+2014-12-18 11:48:37 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Fix memory leak when no buffer is available for a pad currently
+	  CID 1258718
+
+2014-12-18 10:54:05 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* common:
+	  Automatic update of common submodule
+	  From ef1ffdc to f2c6b95
+
+2014-12-17 22:01:23 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/x265/gstx265enc.c:
+	  x265enc: reuse the gstvideo proxy getcaps
+	  The caps query is implementing the same logic as the default
+	  handler from the base class. Reuse it to simplify code.
+
+2014-12-17 21:52:13 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: plug ref leak of template caps
+	  the pad template caps is already a new ref. No need to copy.
+
+2014-12-17 19:51:32 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	  aggregator: Add function to allow subclasses to set their own latency
+	  For audiomixer this is one blocksize, for videoaggregator this should
+	  be the duration of one output frame.
+
+2014-12-17 19:37:22 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Make sure to not have pads being behind the current offset
+	  We would break sync between the different streams then.
+
+2014-12-17 17:54:09 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/compositor/compositor.c:
+	* tests/check/libs/aggregator.c:
+	  aggregator: Add a timeout parameter to ::aggregate()
+	  When this is TRUE, we really have to produce output. This happens
+	  in live mixing mode when we have to output something for the current
+	  time, no matter if we have enough input or not.
+
+2014-12-17 18:20:15 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Add queues after the (live) sources in the unit test
+
+2014-12-17 12:20:54 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: improve timestamping and latency reporting
+	  Use AVF provided timings to timestamp output buffers. Use the running time at
+	  the time the first buffer is produced to base timestamps on. Report 1-frame
+	  latency based on the negotiated framerate instead of hardcoding 4ms latency.
+
+2014-12-15 22:24:26 -0500  Raimo Järvi <raimo.jarvi@gmail.com>
+
+	* sys/dshowdecwrapper/gstdshowaudiodec.cpp:
+	* sys/dshowdecwrapper/gstdshowaudiodec.h:
+	* sys/dshowdecwrapper/gstdshowutil.cpp:
+	* sys/dshowdecwrapper/gstdshowutil.h:
+	* sys/dshowdecwrapper/gstdshowvideodec.cpp:
+	  dshowdecwrapper: Remove dependency on ATL
+	  This fixes compiling with Visual C++ Express
+	  that doesn't include ATL.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=677223
+
+2014-12-04 23:30:23 -0500  Matthew Bader <matt@hyperlobic.net>
+
+	* sys/dshowsrcwrapper/gstdshow.cpp:
+	* sys/dshowsrcwrapper/gstdshowvideosrc.cpp:
+	  dshowsrcwrapper: Added support for image/jpeg and h264
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741188
+
+2014-12-16 19:49:35 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/libs/aggregator.c:
+	  tests: fix aggregator unit test after property renaming
+
+2014-12-16 17:37:12 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Implement get_next_time()
+
+2014-12-16 17:33:01 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Some minor cleanup
+
+2014-12-05 18:19:54 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  aggregator: make the src pad task drive the pipeline for live pipelines
+	  This removes the uses of GAsyncQueue and replaces it with explicit
+	  GMutex, GCond and wakeup count which is used for the non-live case.
+	  For live pipelines, the aggregator waits on the clock until either
+	  data arrives on all sink pads or the expected output buffer time
+	  arrives plus the timeout/latency at which time, the subclass
+	  produces a buffer.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741146
+
+2014-12-08 15:18:25 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: always try to use newer buffers
+	  instead of dropping them for being too old.  This ensures that
+	  the newest buffer is always used for rendering
+
+2014-12-16 13:35:14 +0100  Wim Taymans <wtaymans@redhat.com>
+
+	* ext/directfb/dfbvideosink.c:
+	* ext/sdl/sdlvideosink.c:
+	* ext/wayland/wlwindow.c:
+	* sys/directdraw/gstdirectdrawsink.c:
+	* sys/pvr2d/gstpvrvideosink.c:
+	* sys/vdpau/gstvdpvideopostprocess.c:
+	  rectangle: clear rectangle struct before use
+
+2014-12-15 15:21:50 +0000  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstopusparse.c:
+	  opusparse: fix frame size determination
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741321
+
+2014-06-19 21:32:09 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst/mxf/mxfdemux.c:
+	* gst/mxf/mxfdemux.h:
+	* gst/mxf/mxftypes.h:
+	  mxfdemux: Use IndexTableSegments.
+	  This speeds up seeking drastically.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732294
+
+2014-12-14 01:29:26 +0100  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* tests/check/libs/aggregator.c:
+	  tests/aggregator: Use correct type when setting property
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741495
+
+2014-05-08 10:41:03 +0530  Sudip Jain <sudip.jain@linaro.org>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsbase: scan more bytes to find initial PCRs
+	  Fixes playback of Samsung-Colorful-Variety-1080i.ts.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729768
+
+2014-12-12 20:57:28 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264enc.cpp:
+	  Revert "openh264: fix to work with released versions and master of upstream"
+	  This reverts commit 15394aa70543f55c54fa8a474805224f4138f76c.
+	  The latest release (v1.1) does not have pkg-config support
+	  yet, so this plugin won't be built with the latest release.
+	  Cerbero uses the latest release, so this makes cerbero
+	  builds fail, which expect the plugin to be built.
+	  We can re-commit this once there's a release that includes
+	  pkg-config support.
+
+2014-12-12 10:05:23 -0800  Zaheer Abbas Merali <zaheermerali@gmail.com>
+
+	* configure.ac:
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264: fix to work with released versions and master of upstream
+
+2014-12-12 11:21:27 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/debugutils/gstwatchdog.c:
+	  watchdog: GstElement->state is protected with the OBJECT_LOCK
+	  Not the STATE_LOCK.
+	  gst_watchdog_feed was already always called with the OBJECT_LOCK taken.
+
+2014-11-27 20:48:24 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoaggregator: Hide some more fields from the API
+	  + Add some documentation
+
+2014-12-12 00:30:21 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/onvif/Makefile.am:
+	  onvif: fix 'make dist'
+
+2014-12-11 21:01:48 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix seek event handling
+	  Properly do seeking and avoid only seeking when the segment was updated.
+	  It would cause seeks after the stream was EOS to fail, for example.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738920
+
+2014-11-17 19:26:53 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/onvif/gstrtponviftimestamp.c:
+	* gst/onvif/gstrtponviftimestamp.h:
+	* tests/check/elements/rtponvif.c:
+	  rtponviftimestamp: Automatically discover the ntp-offset by default.
+	  This only works if no packets are pushed in before the pipeline goes
+	  to playing. So it helps to have a live source.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731769
+
+2014-06-05 15:06:33 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* gst/onvif/Makefile.am:
+	* gst/onvif/gstrtponvif.c:
+	* gst/onvif/gstrtponvifparse.c:
+	* gst/onvif/gstrtponvifparse.h:
+	* tests/check/elements/rtponvif.c:
+	  add rtponvifextract element
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731769
+
+2014-04-28 11:07:17 +0200  Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
+
+	* configure.ac:
+	* gst/onvif/Makefile.am:
+	* gst/onvif/gstrtponvif.c:
+	* gst/onvif/gstrtponviftimestamp.c:
+	* gst/onvif/gstrtponviftimestamp.h:
+	* tests/check/Makefile.am:
+	* tests/check/elements/.gitignore:
+	* tests/check/elements/rtponvif.c:
+	  add rtponviftimestamp element
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731769
+
+2014-12-08 11:02:51 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: fix position/texcoord attrib index usage
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741231
+
+2014-12-11 18:17:02 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfiltercube.c:
+	  glfiltercube: use a shader everywhere
+
+2014-12-11 18:15:02 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: fixup vao and vbo usage for legacy GL
+
+2014-12-11 14:57:18 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgleffects.c:
+	  gleffects: don't abort when setting the effect to 0,1,2
+
+2014-12-10 12:48:33 +1100  Matthew Waters <matthew@centricular.com>
+
+	* tests/examples/gl/sdl/sdlshare.c:
+	  gl/examples: fixup sdl example for gluPerspective removal
+
+2014-12-09 08:38:55 -0800  Nick Stoughton <nstoughton@aether.com>
+
+	* configure.ac:
+	* sys/bluez/gstavdtputil.c:
+	  bluez: support compile-time distinction between bluez4 and bluez5
+	  Signed-off-by: Nick Stoughton <nstoughton@aether.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738626
+
+2014-12-10 18:23:02 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: check the return from update_manifest correctly
+	  It is a GstFlowReturn and not a boolean
+
+2014-12-10 09:24:17 +0000  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstmpdparser.c:
+	  dashdemux: Change period when setting by period id.
+	  Make gst_mpd_client_set_period_id set the current period index when it finds a
+	  period with a matching period id.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741322
+
+2014-12-10 15:27:49 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  mssdemux: fix reverse playback fragment tracking
+	  Rework reverse fragment traversing with repetition fields to prevent
+	  NULL pointer deref and avoid never advancing a fragment as the variable
+	  is unsigned and would always be non-negative.
+	  CID #1257627
+	  CID #1257628
+
+2014-12-11 00:02:26 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: bump rank to PRIMARY
+
+2014-12-10 22:36:53 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: negotiate profile and level with downstream
+
+2014-12-10 19:44:01 +1100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: report latency
+
+2014-12-05 16:20:08 +0000  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Find current segment in the streams that have just been setup
+	  Using demux->streams will just skip the whole loop as demux->streams will
+	  always be NULL at that point
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741285
+
+2014-12-09 05:03:11 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst/geometrictransform/gstmirror.c:
+	  mirror: Needs remap when the mode changes.
+	  This caused the user to think the mode wasn't taken into account.
+
+2014-12-09 04:28:17 +0100  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  Revert "h264parse: expose compatible profiles to downstream"
+	  This reverts commit 3910cbe7ce1a67ed5506f87e4c5a005c168d0e6c.
+
+2014-12-08 08:53:00 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: do not try to unlock not locked mutex
+	  A misplaced unlock was causing an assertion for playback with a
+	  set stop time
+
+2014-12-08 08:24:17 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/Makefile.am:
+	  gst-libs: build order: uridownloader before adaptivedemux
+	  Otherwise make install fails
+
+2014-12-05 16:33:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: Add properties to specify the maximum keyframe interval in frames and seconds
+
+2014-12-05 16:15:23 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Fix conversion of the bitrate property and our internal bitrate storage
+	  The property is in kbit/s and we store it in bit/s, so just multiply and
+	  divide by 1000. No need to put a factor of 8 in there.
+	  kVTCompressionPropertyKey_AverageBitRate is also in bit/s according to
+	  its documentation.
+
+2014-12-05 13:12:59 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Fix a memory leak
+	  Frees the source ARGB black frame that we use to create the black frame
+	  in our target format.
+
+2014-12-02 10:10:39 +0200  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: expose compatible profiles to downstream
+	  Some video bitstreams report a too restrictive set of profiles. If a video
+	  decoder was to strictly follow the indicated profile, it wouldn't support that
+	  stream, whereas it could in theory and in practice. So we should relax the
+	  profile restriction for allowing the decoder to get connected with parser.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739992
+
+2013-05-01 11:17:02 +0800  Chun-wei Fan <fanchunwei@src.gnome.org>
+
+	* sys/dshowvideosink/dshowvideofakesrc.cpp:
+	* sys/dshowvideosink/dshowvideosink.cpp:
+	* sys/dshowvideosink/dshowvideosink.h:
+	  dshowvideosink: Port to 1.0 and new GLib threading API
+	  This updates the dshowvideosink to work with the GStreamer 1.0.x APIs, and
+	  avoids the use of deprecated GLib threading API that are now used since
+	  GLib 2.32+
+	  https://bugzilla.gnome.org/show_bug.cgi?id=699364
+
+2014-12-04 01:46:43 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssmanifest.c:
+	* ext/smoothstreaming/gstmssmanifest.h:
+	  mssdemux: add live support
+	  Implement the functions of adaptivedemux to have live support
+	  enabled. This allows mssdemux to refresh the Manifest periodically
+
+2014-12-04 15:52:44 -0500  Matthew Bader <matt@hyperlobic.net>
+
+	* sys/dshowdecwrapper/CMakeLists.txt:
+	* sys/dshowdecwrapper/gstdshowaudiodec.cpp:
+	* sys/dshowdecwrapper/gstdshowaudiodec.h:
+	* sys/dshowdecwrapper/gstdshowdecwrapper.h:
+	* sys/dshowdecwrapper/gstdshowvideodec.cpp:
+	* sys/dshowdecwrapper/gstdshowvideodec.h:
+	  dshowdecwrapper: Port to 1.x
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740945
+
+2014-12-01 16:40:24 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* configure.ac:
+	* sys/vcd/vcdsrc.c:
+	  vcdsrc: port to 1.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=547661
+
+2014-12-04 12:21:04 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  mssdemux: fix getting current position in segments when after last one
+	  For live streams this makes a difference when resyncing after a
+	  Manifest refresh, otherwise it doesn't know where to restart
+
+2014-12-02 23:27:29 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  mssdemux: support manifests with repetition fragments
+	  Read the "r" attribute from fragments to support fragments nodes
+	  that use repetition to have a shorter Manifest xml.
+	  Instead of doing:
+	  <c d="100" />
+	  <c d="100" />
+	  You can use:
+	  <c d="100" r="2" />
+
+2014-11-22 01:01:50 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/Makefile.am:
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssdemux.h:
+	* ext/smoothstreaming/gstmssmanifest.c:
+	* ext/smoothstreaming/gstmssmanifest.h:
+	  mssdemux: port to adaptivedemux base class
+
+2014-12-03 16:13:17 -0500  Matthew Bader <matt@hyperlobic.net>
+
+	* sys/dshowsrcwrapper/gstdshowaudiosrc.cpp:
+	* sys/dshowsrcwrapper/gstdshowvideosrc.cpp:
+	  dshowsrcwrapper: Fixed null caps comparison
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741086
+
+2014-12-04 02:12:08 -0200  Flávio Ribeiro <email@flavioribeiro.com>
+
+	* ext/hls/gsthlssink.c:
+	* ext/hls/gstm3u8playlist.c:
+	  hlssink: remove unnecessary title on EXTINF tag
+	  According to the HLS spec the remainder of the line following
+	  the comma on EXTINF tag is not required. This patch removes
+	  the fake title and saves some bytes on the playlist.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=741096
+
+2014-12-04 20:37:51 +0530  Ramprakash Jelari <ramprakash.jelari@e-consystems.com>
+
+	* ext/gl/gstopengl.c:
+	  gl: Rename gst-launch-0.10 to gst-launch-1.0 in docs
+
+2014-12-04 15:42:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/Makefile.am:
+	  decklink: Fix make distcheck
+	  And properly dist all headers and source files.
+
+2014-12-03 18:31:06 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: release threads waiting for manifest update on shutdown
+	  For live streams, also unblock threads that might be waiting for a manifest
+	  update when stopping the pipeline.
+	  Also add some more debug messages
+
+2014-12-03 13:52:07 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: use gst_task_stop instead of gst_task_pause
+	  To avoid race conditions with gst_task_stop(); gst_task_join() with
+	  another thread doing gst_task_pause(), the joining thread would be
+	  waiting for the task to stop but it would never happen. So just
+	  use gst_task_stop() everywhere to prevent more mutexes
+
+2014-12-03 12:48:42 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix deadlock when stopping streams
+	  Remember to unlock the manifest's lock when leaving the download task.
+
+2014-12-03 16:01:11 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/linux/DeckLinkAPIDispatch.cpp:
+	  decklink: Fix compiler warnings with gcc in the dispatcher
+
+2014-12-03 15:30:43 +0100  Philippe Normand <philn@igalia.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.h:
+	  glsyncmeta: add G_END_DECLS
+
+2014-12-03 15:07:16 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/win/DeckLinkAPI.h:
+	* sys/decklink/win/DeckLinkAPI_i.c:
+	  decklink: Update Windows SDK headers to 10.3.1
+	  No idea where the DecklinkAPIDispatch.cpp comes from on Windows,
+	  but this should still work. Will just become a problem once we
+	  use other parts of the API.
+
+2014-12-03 14:42:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/Makefile.am:
+	* sys/decklink/osx/DeckLinkAPI.h:
+	* sys/decklink/osx/DeckLinkAPIConfiguration.h:
+	* sys/decklink/osx/DeckLinkAPIDeckControl.h:
+	* sys/decklink/osx/DeckLinkAPIDiscovery.h:
+	* sys/decklink/osx/DeckLinkAPIDispatch-osx.cpp:
+	* sys/decklink/osx/DeckLinkAPIDispatch.cpp:
+	* sys/decklink/osx/DeckLinkAPIModes.h:
+	* sys/decklink/osx/DeckLinkAPIStreaming.h:
+	* sys/decklink/osx/DeckLinkAPITypes.h:
+	* sys/decklink/osx/DeckLinkAPIVersion.h:
+	  decklink: Update OS X SDK headers to 10.3.1
+
+2014-12-03 14:39:13 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/linux/DeckLinkAPI.h:
+	* sys/decklink/linux/DeckLinkAPIConfiguration.h:
+	* sys/decklink/linux/DeckLinkAPIDeckControl.h:
+	* sys/decklink/linux/DeckLinkAPIDiscovery.h:
+	* sys/decklink/linux/DeckLinkAPIDispatch.cpp:
+	* sys/decklink/linux/DeckLinkAPIModes.h:
+	* sys/decklink/linux/DeckLinkAPITypes.h:
+	  decklink: Update Linux SDK headers to 10.3.1
+
+2014-12-03 10:06:09 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: remove unused error variable
+	  CID #1256556
+
+2014-12-03 09:45:58 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: remove more get_duration checks
+	  Subclasses must implement get_duration function. If they do not know
+	  the duration they can return GST_CLOCK_TIME_NONE
+
+2014-12-03 09:40:34 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: all subclasses must implement get_duration
+	  CID #1256557
+
+2014-12-02 23:29:20 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: make sure to always stop the stream on EOS
+	  For On-Demand streams, always stop the tasks for streams that reached
+	  EOS
+
+2014-12-03 08:02:58 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: try cgl before glx
+	  It was already done by commit
+	  f506e80686eedc66912583db11914ec3f713b478
+	  but it has been broken by commit
+	  45ec777cea0e69b2597d1ec02b18ec31d618c920
+
+2014-12-03 07:46:50 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/check/elements/.gitignore:
+	  tests: add glimagesink unit test to .gitignore
+
+2014-12-02 15:52:54 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix double unref of object
+	  the datetime is already released by the end of the function
+
+2014-10-10 11:24:08 +0100  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: Find the current period in a live stream
+	  Start from the correct period on a live stream
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737421
+
+2014-12-02 10:06:00 +0000  David Waring <david.waring@rd.bbc.co.uk>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Fix period selection for live streams
+	  Fix period selection and properly error out when update cannot be done
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725298
+
+2014-07-09 10:11:40 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtbase: Improve last PCR detection
+	  When dealing with random-access content (such as files), we initially
+	  search for the last PCR in order to figure out duration and to handle
+	  other position estimation such as those used in seeking.
+	  Previously, the code looking for that last PCR would search in the last
+	  640kB of the file going forward, and stop at the first PCR encountered.
+	  The problem with that was two-fold:
+	  * It wouldn't really be the last PCR (it would be the first one within
+	  those last 640kB. In case of VBR files, this would put off duration
+	  and seek code slightly.
+	  * It would fail on files with bitrates higher than 52Mbit/s (not common)
+	  Instead this patch modifies that code by:
+	  * Scanning over the last 2048kB (allows to cope with streams up to 160Mbit/s)
+	  * Starts by the end of the file, going over chunks of 300 MPEG-TS packets
+	  * Doesn't stop at the first PCR detected in a chunk, but instead records all
+	  of them, and only stop searching if there was "at least" one PCR within
+	  that chunk
+	  This should improve duration reporting and seeking operations on VBR files
+	  https://bugzilla.gnome.org/show_bug.cgi?id=708532
+
+2014-12-01 11:47:29 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Only activate warning for real streams
+	  streams with stream_type 0xff are PCR-only streams, it's normal not
+	  to have a pad for them.
+
+2014-12-01 12:14:20 +0100  Jürgen Slowack <jurgen.slowack@barco.com>
+
+	* ext/x265/gstx265enc.c:
+	* ext/x265/gstx265enc.h:
+	  x265enc: add qp property
+	  QP property enables CQP mode and sets the QP for P slices.
+
+2014-12-01 10:59:32 +0100  Thijs Vermeir <thijs.vermeir@barco.com>
+
+	* tests/examples/gl/cocoa/cocoa-videooverlay.m:
+	  gl/cocoa: Fix example on Mac OS X 10.10
+	  Using NSApp directly seems to confuse something, as the compiler
+	  was expecting an id<NSFileManagerDelegate>. Switched to using
+	  [NSApplication sharedApplication], and specified the delegate
+	  protocol on the window class as well.
+	  Similar to https://bugzilla.gnome.org/show_bug.cgi?id=738740
+
+2014-12-01 10:27:43 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/Makefile.am:
+	* gst-libs/gst/adaptivedemux/Makefile.am:
+	  gst-libs: Fix dependency build
+	  adaptivedemux depends on uridownloader and video depends on base
+
+2014-12-01 09:48:41 +0100  Thomas Klausner <wiz@danbala.tuwien.ac.at>
+
+	* configure.ac:
+	  configure: Do comparisons in a portable way with = instead of ==
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740953
+
+2014-11-30 21:54:38 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: reworking live manifest update wait
+	  Check if the stream is live before checking if it is EOS as a live
+	  stream might be considered EOS when it just needs to wait for a manifest
+	  update to proceed with the next fragments
+
+2014-11-29 10:28:09 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: fix manifest update locking
+	  To avoid unlocking a not locked mutex
+
+2014-11-29 10:27:25 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: Fix segment for manifests that won't start at 0
+	  For live streams, the manifest might start at an advanced position. Avoid
+	  using segment start=0 to have playback start immediately
+
+2014-11-29 10:26:31 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: replace the streams with the new mpd client's streams
+	  Otherwise it won't update with the new segment info from the playlist
+	  update
+
+2014-11-29 10:25:45 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: when updating the manifest, set the uri
+	  This will allow dashdemux to create the correct full path URIs to
+	  continue downloading fragments
+
+2014-08-26 16:45:46 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/Makefile.am:
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: port to adaptive demux
+
+2014-11-22 17:27:03 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	  adaptivedemux: also clear flushing state on pads before restarting
+	  During flushing seeks the flushing flow return will propagate up to the
+	  source element and all pads are going to have the flushing flag set.
+	  So before restarting also remove that flag together with the EOS one.
+	  We don't do that when pushing the flush stop event because our event
+	  handler for the proxypad will drop all events.
+
+2014-11-21 20:42:09 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* configure.ac:
+	* gst-libs/gst/Makefile.am:
+	* gst-libs/gst/adaptivedemux/Makefile.am:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.c:
+	* gst-libs/gst/adaptivedemux/gstadaptivedemux.h:
+	  adaptivedemux: add adaptivedemux base class
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735848
+
+2014-11-29 13:16:56 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/gstgdppay.c:
+	  gdppay: minor caps event payloading optimisation
+	  Avoid creation of buffer we're just going to throw
+	  away two lines later anyway.
+
+2014-11-29 13:15:36 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/gstgdppay.c:
+	  gdppay: fix some memory leaks
+
+2014-11-30 00:42:17 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: require GL_ARB_ES2_compatibility for opengl3
+	  until we generate gl3 compliant shaders
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740012
+
+2014-11-30 00:18:55 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: properly handle the !opengl3 case
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740012
+
+2014-11-28 17:31:07 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Drop too late frames and start scheduled playback at the correct time
+
+2014-11-28 16:04:54 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/gstglfilterapp.c:
+	  glfilterapp: fix unused variable compiler warning
+	  When GST_GL_HAVE_OPENGL is 0 or unset.
+
+2014-11-28 15:06:42 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksrc.cpp:
+	  decklinksrc: For the source, unsetting the callback already deletes it
+
+2014-11-14 11:19:45 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Wait for the pipeline clock instead of the decklink clock
+	  Otherwise we're going to starve other elements if the decklink clock
+	  is slower than the pipeline clock, or starts much later.
+	  Of course this will still cause problems if the decklink clock and ours are
+	  completely out of sync, or running at a very different rate. But this at least
+	  works better now.
+
+2014-11-14 10:58:53 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	* sys/decklink/gstdecklinksink.h:
+	  decklinksink: Schedule video frames according to their timestamps, not according to a frame counter
+
+2014-11-14 11:02:01 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Add some FIXME comments about synchronization
+
+2014-11-14 10:38:33 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/capture.cpp:
+	* sys/decklink/gstdecklinksrc.cpp:
+	* sys/decklink/gstdecklinksrc.h:
+	  decklinksrc: Sample the pipeline clock for the timestamps instead of coming up with our own
+	  If we just count the frames and calculate timestamps from that, all frames
+	  will arrive late in the sink as we have a live source here. Instead take
+	  the pipeline clock at capture time as reference.
+
+2014-11-28 14:50:18 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/capture.h:
+	* sys/decklink/gstdecklinksrc.cpp:
+	* sys/decklink/gstdecklinksrc.h:
+	  decklinksrc: Handle callback/delegate object the same way as in the sink
+	  Potentially fixes crashes.
+
+2014-11-28 14:46:06 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	* sys/decklink/gstdecklinksink.h:
+	  decklinksink: Don't crash when going to READY another time
+	  We have to handle the callback object a bit different:
+	  a) it needs a virtual destructor
+	  b) we need to set the callback to NULL when we're done with the output
+	  c) create a new one every time
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740616
+
+2014-11-28 10:23:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: Failure to map a video frame is not just a warning
+	  Also add some warning debug output if mapping a output buffer fails
+
+2014-11-28 10:22:44 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Failure to map a video frame is not just a warning
+
+2014-11-28 14:08:40 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/Makefile.am:
+	  glfilterapp is now available on gles2 as well so build it
+
+2014-11-28 13:04:21 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/glprototypes/gstgl_compat.h:
+	  gl: fixup compat definition for GLuint64 for OS X
+
+2014-11-28 11:56:10 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/gstgl_compat.h:
+	  gl: add compat definition for GLuint64 for android
+	  ../../../../gst-libs/gst/gl/glprototypes/sync.h:41:23: error: unknown type name 'GLuint64'
+	  GLuint64 timeout))
+
+2014-11-28 02:21:49 +0900  Danny Song <danny.song.ga@gmail.com>
+
+	* gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c:
+	  basecamerasrc: fix typo in docs
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740815
+
+2014-11-28 11:11:43 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  glsync: fix build with desktop gl
+
+2014-11-28 11:04:22 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglcolorscale.c:
+	  gl: fix typo in #if
+	  GST_GL_API_HAVE_OPENGL doesn't exist
+
+2014-11-28 10:59:46 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectssources.h:
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstgleffects.c:
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	  gl: fix various build errors without desktop gl
+
+2014-11-28 10:03:18 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gldisplay: fix build error
+	  gstgldisplay.c:234:541: error: 'return' with no value, in function returning non-void [-Werror]
+	  g_return_if_fail (GST_IS_GL_DISPLAY (display));
+
+2014-11-27 21:05:45 +1100  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* ext/gl/gstglbumper.c:
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstgldeinterlace.c:
+	* ext/gl/gstgldifferencematte.c:
+	* ext/gl/gstgleffects.c:
+	* ext/gl/gstglfilterapp.c:
+	* ext/gl/gstglfilterblur.c:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglfilterlaplacian.c:
+	* ext/gl/gstglfilterreflectedscreen.c:
+	* ext/gl/gstglfiltershader.c:
+	* ext/gl/gstglfiltersobel.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstgldisplay.c:
+	* gst-libs/gst/gl/gstgldisplay.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  gldisplay: implement runtime GL api filtering
+	  Needed so that the pipeline/application can limit the choice of GL api
+	  to what it supports
+
+2014-11-27 16:17:50 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* ext/gl/Makefile.am:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfiltercube.h:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstopengl.c:
+	* gst-libs/gst/gl/gstglapi.h:
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	* gst-libs/gst/gl/gstglframebuffer.h:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	* 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:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	* tests/examples/gl/sdl/sdlshare.c:
+	  gl: remove the use of glu
+
+2014-10-17 15:22:24 +0200  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/glprototypes/gstgl_compat.h:
+	* gst-libs/gst/gl/glprototypes/sync.h:
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglsyncmeta.c:
+	* gst-libs/gst/gl/gstglsyncmeta.h:
+	  gl: add a sync meta for synchronizing across GL contexts
+	  A context can create a GLsync object that can be waited on in order
+	  to ensure that GL resources created in one context are able to be
+	  used in another shared context without any chance of reading invalid
+	  data.
+	  This meta would be placed on buffers that are known to cross from
+	  one context to another.  The receiving element would then wait
+	  on the sync object to ensure that the data to be used is complete.
+
+2014-10-17 15:08:29 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/all_functions.h:
+	* gst-libs/gst/gl/glprototypes/sync.h:
+	  glprototypes: add sync function definitions
+
+2014-11-17 18:06:20 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfilterapp.c:
+	* ext/gl/gstopengl.c:
+	  glfilterapp: port to gles2 and gl3
+
+2014-11-14 23:24:48 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgloverlay.h:
+	  gloverlay: support gl3
+
+2014-11-14 00:20:10 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	  glvideomixer: add support for gl3
+
+2014-11-13 21:30:38 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfiltercube.h:
+	  glfiltercube: add a gl3 code path
+
+2014-11-13 15:09:04 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglfiltershader.c:
+	  glfiltershader: support gl3
+
+2014-11-13 12:12:46 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	  gltransformation: support gl3
+
+2014-11-12 23:48:32 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/effects/gstgleffectidentity.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/effects/gstgleffectssources.c:
+	  gleffects: support gl3 whereever gles2 is supported
+
+2014-11-12 23:47:13 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstglcolorscale.h:
+	  glcolorscale: support gl3
+
+2014-11-12 22:49:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: add a gl3 code path using vao's and vbo's
+
+2014-11-12 22:48:04 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	  glframebuffer: add support for gl3
+
+2014-10-23 22:35:20 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	  glcolorconvert: add support for gl3
+
+2014-10-21 22:18:51 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: use vbo's and vao's for gl3
+
+2014-10-21 19:30:38 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglshader.h:
+	  glshader add support for gl3
+
+2014-10-19 08:09:37 +0400  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  glx: ask for a GL3 core context
+
+2014-11-27 21:22:44 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Minor cleanup
+
+2014-11-26 15:02:14 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	* gst/compositor/compositorpad.h:
+	  compositor: Implement rescaling of the input via pad properties
+	  compositor has now the same interface as glvideomixer.
+
+2014-11-27 20:34:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Copy over more fields from the relevant video-info
+	  gst_video_info_set_format() will reset the complete video-info, but
+	  we want to keep values like the PAR, colorimetry and chroma site.
+	  Otherwise we risk setting different values on the srcpad caps than
+	  what is actually inside the buffers.
+
+2014-11-27 20:25:29 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Directly use the converters video-info instead of recalculating it
+
+2014-11-27 19:52:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Do source pad negotiation only from the aggregated function
+	  Otherwise we might negotiate from the sinkpad streaming threads at
+	  the same time as on the srcpad streaming thread, and then all kinds
+	  of crazy bugs happen that don't make any sense at all.
+
+2014-11-27 18:46:03 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoconvert: Hide all conversion related fields
+	  And do not delay the setting of the conversion_info
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740768
+
+2014-11-27 16:43:39 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Do not try to resize a buffer to a negative size on EOS
+
+2014-11-26 18:24:05 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoaggregator: Expose vmethods to set converters and prepare/clean frames
+	  This gives more flexibility to the subclasses and permits to remove the
+	  GstVideoAggregatorClass->disable_frame_conversion ugly API.
+	  WARNING: This breaks the API as it removes the disable_frame_conversion
+	  field
+	  API:
+	  + GstVideoAggregatorClass->find_best_format
+	  + GstVideoAggregatorPadClass->set_format
+	  + GstVideoAggregatorPadClass->prepare_frame
+	  + GstVideoAggregatorPadClass->clean_frame
+	  - GstVideoAggregatorClass->disable_frame_conversion
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740768
+
+2014-11-26 15:41:37 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/debugutils/gstwatchdog.c:
+	* gst/debugutils/gstwatchdog.h:
+	  watchdog: Handle FLUSHING seek events even in PAUSED state
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740757
+
+2014-11-26 15:43:12 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/debugutils/gstwatchdog.c:
+	* gst/debugutils/gstwatchdog.h:
+	  watchdog: Properly handle PAUSED state
+	  In PAUSED state we should just preroll, so get one buffer
+	  and stop monitoring.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740757
+
+2014-10-31 11:01:47 +0100  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Let a full renegotiation happen after removing the last pad
+	  With the current code, we will end up setting the preferred downstream
+	  format as the srcpad format, and it might not be accepted by the next
+	  sinkpad to be added. We should instead let the next sinkpad reconfigure
+	  everything.
+
+2014-11-27 13:40:56 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: add quality property
+
+2014-11-27 13:33:07 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/Makefile.am:
+	* sys/applemedia/vtenc.c:
+	  vtenc: set profile and level in caps
+
+2014-11-27 18:09:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Unref buffer with the correct function
+
+2014-11-27 18:09:14 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Handle failure of memory allocation gracefully
+
+2014-11-27 18:04:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: Use g_try_malloc() in the appropriate places
+	  g_malloc() aborts if allocation fails, it's pointless to check against NULL
+	  afterwards. That's why g_try_malloc() exists.
+
+2014-11-27 17:11:13 +0100  Edward Hervey <bilboed@bilboed.com>
+
+	* common:
+	  Automatic update of common submodule
+	  From f32cfcd to ef1ffdc
+
+2014-11-27 10:48:43 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: support RGB16/BGR16 video format download
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740801
+
+2014-11-27 13:01:19 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: only attempt a resize when the window has already resized
+	  fixes a black startup screen on wayland
+
+2014-11-27 11:47:38 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c:
+	* gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h:
+	  gl/wayland: implement resizing the window using the right mouse button
+
+2014-11-26 22:05:10 +0530  Arun Raghavan <git@arunraghavan.net>
+
+	* common:
+	* configure.ac:
+	  build: Use newer AX_PTHREAD instead of ACX_PTHREAD
+
+2014-11-26 14:36:42 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	* sys/Makefile.am:
+	* sys/qtwrapper/Makefile.am:
+	* sys/qtwrapper/audiodecoders.c:
+	* sys/qtwrapper/codecmapping.c:
+	* sys/qtwrapper/codecmapping.h:
+	* sys/qtwrapper/imagedescription.c:
+	* sys/qtwrapper/imagedescription.h:
+	* sys/qtwrapper/qtutils.c:
+	* sys/qtwrapper/qtutils.h:
+	* sys/qtwrapper/qtwrapper.c:
+	* sys/qtwrapper/qtwrapper.h:
+	* sys/qtwrapper/videodecoders.c:
+	  Remove unported and obsolete qtwrapper plugin code
+	  QuickTime is deprecated, we want new plugins based
+	  on avfoundation (osx) or dxva/mediafoundation (windows).
+
+2014-11-27 01:27:19 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: support fixed dimensions on both sides of the element
+	  Fixes:
+	  width=320,height=240 ! glfilter ! width=800,height=600
+	  width=230,height=240 ! glfilter ! width=600
+	  ... ! glfilter ! width=800
+
+2014-11-25 13:33:07 +1100  Matthew Waters <matthew@centricular.com>
+
+	* configure.ac:
+	  gl: fix automagic disabling of desktop GL
+	  If configure finds GL + GLES2 but the user passes --enable-gles2 and
+	  the two GL API's cannot be built against together, configure was still
+	  allowing the desktop GL stack to be built.
+
+2014-11-26 13:06:21 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Also sync pad properties to the controller if conversion is disabled
+
+2014-11-26 12:35:52 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	* gst/compositor/compositorpad.h:
+	  compositor: Remove unused zorder pad property
+	  It's handled in videoaggregator already.
+
+2014-11-23 23:49:50 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/codecparsers/gsth265parser.c:
+	* gst-libs/gst/codecparsers/nalutils.h:
+	  codecparsers: fix some compiler warnings
+	  i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1
+	  "warning: comparison is always true due to limited
+	  range of data type"
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740673
+
+2014-11-25 18:53:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/compositor/compositor.c:
+	  compositor: GstVideoMeta is supported just fine, tell upstream about that
+	  Also provide a GstVideoBufferPool to upstream just in case.
+
+2014-11-24 13:25:55 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/winks/gstksvideodevice.c:
+	* sys/winks/ksvideohelpers.c:
+	  winks: fix debug message format issues
+	  And print last bits of GUID properly instead
+	  of printing nonsense.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733055
+
+2014-11-25 08:24:16 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gstmpegtsdescriptor.c:
+	  mpegts: fix some compiler warnings
+	  i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1
+	  "warning: comparison is always true due to limited
+	  range of data type"
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740674
+
+2014-11-24 19:53:56 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: use pkg-config to detect X11
+	  Like we do in -base and -good now.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731047
+
+2014-11-24 19:21:29 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Use a fixed number of slices by default
+
+2014-11-24 19:16:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Add some more encoding properties
+	  Merged from https://github.com/EricssonResearch/openwebrtc-gst-plugins
+	  based on a patchset by Robert Swain <robert.swain@ericsson.com>
+
+2014-11-24 18:40:53 +0530  Ramprakash Jelari <ramprakash.jelari@e-consystems.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: Fix unused variable warning by moving declaration where it is actually used
+
+2014-11-24 14:07:19 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklink.h:
+	  decklink: Add support for 2k modes
+
+2014-11-24 13:56:56 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: HD1080i50 is 50 frames per second
+
+2014-11-24 17:58:42 +0530  Ramprakash Jelari <ramprakash.jelari@e-consystems.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Fix format string compiler warning
+
+2014-11-24 17:18:44 +0530  Ramprakash Jelari <ramprakash.jelari@e-consystems.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-section.c:
+	  dvbsection: Fix format string compiler warning
+
+2014-11-24 16:54:42 +0530  Ramprakash Jelari <ramprakash.jelari@e-consystems.com>
+
+	* gst-libs/gst/mpegts/gstmpegtsdescriptor.c:
+	  mpegtsdescriptor: Fix format string compiler warning
+	  gstmpegtsdescriptor.c:778:16: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
+
+2014-11-24 11:32:33 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Fix valid compiler warning
+	  gstglupload.c:442:32: error: if statement has empty body [-Werror,-Wempty-body]
+	  if (upload->texture_ids[i]);
+	  ^
+
+2014-11-24 10:43:23 +0100  Philippe Normand <philn@igalia.com>
+
+	* gst-libs/gst/gl/egl/Makefile.am:
+	  gl: ship the gstglcontext_egl.h header
+	  It is required by gsteglimagememory.h.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740611
+
+2014-11-23 21:43:20 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglshadervariables.c:
+	  gl: shadervariables: make parsing of floats locale-independent
+	  Floating point numbers are written differently in different
+	  locales, e.g. in many countries 1/2 = 0,5 instead of 0.5, and
+	  strtod will not be able to parse "0.5" correctly in such a
+	  locale.
+
+2014-11-24 02:52:24 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglshadervariables.c:
+	  glshadervariables: also trim \r as well as \n
+
+2014-11-05 20:18:06 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/gl/egl/gsteglimagememory.c:
+	* gst-libs/gst/gl/egl/gsteglimagememory.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	* tests/check/libs/gstglupload.c:
+	  glupload: rearchitecture for non GLMemory inputs/outputs
+	  Allows other memory types to be implemented/returned/used by the caller.
+
+2014-11-14 10:55:14 +0900  Wonchul Lee <wonchul86.lee@lge.com>
+
+	* gst/rawparse/gstrawparse.c:
+	  rawparse: send SEEKING query upstream first
+	  Sometimes rawparse does not handle the seeking query
+	  properly, the rawparse should send the query upstream
+	  first. For example, upstream could support seeking in
+	  TIME format (but not in BYTE format), so the BYTE format
+	  seeking query that rawparse sends in push mode would
+	  fail.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=722764
+
+2014-11-21 15:46:49 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: let VT pick the bitrate by default
+
+2014-11-20 10:23:30 -0800  Aleix Conchillo Flaqué <aleix@oblong.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: fix rtp/rtcp sink event memory leak
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740451
+
+2014-11-20 16:04:34 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: set H264_Baseline_AutoLevel on OSX as well
+
+2014-11-20 15:50:18 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: disable the reorder queue for baseline streams
+
+2014-11-20 09:41:43 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: Fix divide by zero in the picture buffer length calculation
+
+2014-11-20 09:13:58 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: critical error while seek playback-test(stop state)
+	  If we seek when media is in stop state, playback-test gives
+	  critical error, since context of glimagesink is destroyed during stop.
+	  But since context is not present, we need not handle send_event in glimagesink
+	  Hence adding a condition to check if context is valid.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740305
+
+2014-11-19 17:17:06 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Unblock events/queries immediately if the pad is flushing
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740376
+
+2014-11-19 17:15:02 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Drop serialized events/queries if the pad is flushing
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740376
+
+2014-11-19 17:03:41 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Block serialized events/queries until the pad has consumed all buffers
+	  Otherwise the caps of the pad might change while the subclass still works with
+	  a buffer of the old caps, assuming the the current pad caps apply to that
+	  buffer. Which then leads to crashes and other nice effects.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740376
+
+2014-11-19 17:02:40 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Don't output 0-duration buffers at the segment end
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740376
+
+2014-11-19 17:03:33 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix typo in debug output
+
+2014-11-17 14:05:01 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fix up QoS handling for live sources
+	  Only attempt adaptive drop when we are not live
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739996
+
+2014-11-17 14:00:10 +1100  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: add _get_latency() for subclass usage
+	  API: gst_aggregator_get_latency
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739996
+
+2014-11-17 09:36:52 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: build errors when GST_GL_HAVE_OPENGL is 0
+	  Moving variables within #if GST_GL_HAVE_OPENGL, which are not going to be used otherwise.
+	  and which are needed only when OpenGl is present
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740235
+
+2014-11-17 11:10:35 +0200  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* tests/examples/opencv/gsthanddetect_test.c:
+	  examples: relicense opencv gsthanddetect_test to LGPLv2+
+	  The GPL3 license header was copy'n'pasted from a
+	  neighbouring source file by mistake, the original
+	  code was not GPL3 licensed, but fell under the
+	  default GStreamer license, which is LGPLv2+.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=685655
+
+2014-11-17 18:50:28 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: add read-only context property
+
+2014-11-17 18:50:04 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: add read-only context property
+
+2014-11-11 17:08:25 +0900  Hyunjun Ko <zzoonis@gmail.com>
+
+	* tests/examples/opencv/gst_element_print_properties.c:
+	  opencv-example: Use g_snprintf instead of sprintf
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739846
+
+2014-11-16 20:32:56 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@sisa.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: drop explicit comparisons against 0 for true/false
+
+2014-11-16 11:00:14 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: Only use convertRectToBacking on OSX >= 10.7
+	  It does not exist before and older versions also don't have
+	  support for HiDPI displays anyway.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740201
+
+2014-11-16 10:57:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl: Use numeric OSX version instead of the macro
+	  The macro is not defined on older OSX versions and evaluates to 0.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740201
+
+2014-11-15 21:59:48 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/dvb/dvbbasebin.c:
+	  dvbbasebin: fix possible crash by passing 64 bits for 64-bit queue property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=740191
+
+2014-11-14 10:40:31 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/capture.cpp:
+	* sys/decklink/gstdecklink.cpp:
+	* sys/decklink/gstdecklinksrc.cpp:
+	  decklink: Fix indention
+
+2014-11-10 10:01:24 +0100  Gwenole Beauchesne <gb.devel@gmail.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  codecparsers: h264: fix derivation of MaxPicNum variable.
+	  The logic to compute the MaxPicNum variable was reversed. In paricular,
+	  MaxPicNum is double MaxFrameNum only if field_pic_flag is set to 1.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739291
+
+2014-11-13 12:01:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: Don't override the application delegate
+	  Otherwise interesting things will happen in Cocoa applications, like
+	  infinite event loops that block the NSApplication loop forever.
+	  This was only needed for GNUStep and thus can safely be removed now.
+
+2014-11-13 11:58:07 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	* tests/examples/gl/cocoa/cocoa-videooverlay.m:
+	  gl/cocoa: Remove GNUStep support
+	  Until gcc and GNUStep properly support Objective-C blocks and other
+	  "new" features of Objective-C we can't properly support them without
+	  making the code much more ugly.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739152
+
+2014-11-12 18:06:45 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosink.h:
+	  interaudiosink: Make sure to store at least period-time samples at once in the adapter
+	  It's better to create some more silence than having the source pull multiple
+	  short buffers out of the adapter and insert silence between them.
+
+2014-11-12 16:45:12 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: fix build on iOS
+
+2014-11-12 15:35:36 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/coremediabuffer.c:
+	  coremediabuffer: set ->pixel_buf for CVPixelBuffer buffers
+	  Fix a bug for which we never actually set ->pixel_buf to non-NULL for
+	  CVPixelBuffer buffers.
+
+2014-06-06 13:57:30 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/faad/gstfaad.c:
+	  faad: set channel positions using the appropriate API
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731038
+
+2014-11-12 13:58:56 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Stop showing the current frame after 1 second, not after 30 frames
+
+2014-11-12 09:41:53 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/check/Makefile.am:
+	  tests: add CFLAGS and LADD for glimagesink unit test
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
+
+2014-11-12 11:52:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Add new enable-frame-skip property and disable it by default
+	  Otherwise e.g. videotestsrc ! openh264enc ! ... will drop every second frame
+	  because otherwise the target bitrate can't be reached without loosing too
+	  much quality.
+
+2014-11-12 09:59:53 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: fix compilation on < 10.9
+
+2014-11-12 11:44:07 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: don't set the upload to NULL on the drain query
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732694
+
+2014-11-11 17:04:48 +0900  Hyunjun Ko <zzoonis@gmail.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  gl: Correct invalid comment text
+
+2014-11-11 23:54:44 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/glimagesink.c:
+	  gl: add unit test that checks for glimagesink drain query handling
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
+
+2014-11-11 23:49:59 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: release stored buffers on drain query
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
+
+2014-11-11 23:43:42 +0000  Julien Isorce <j.isorce@samsung.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  gl: do not raise a critical msg if the backend does not handle window events
+	  Fix "assertion 'window_class->handle_events != NULL' failed"
+	  if not using a X11 window.
+
+2014-11-11 18:01:54 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: enable the hw encoder on OSX
+
+2014-11-11 12:00:30 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Check the correct variable for failure
+	  If we can't get an output, we would otherwise just use it later and crash.
+
+2014-11-11 11:18:19 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudiosrc: Make sure we have a writable buffer before we start changing metadata
+
+2014-11-11 11:15:35 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Set the GAP flag on repeated buffers
+	  videorate does the same and it allows optimizations downstream.
+
+2014-11-11 11:12:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudiosrc: Set the GAP flag on buffers that only contain silence
+
+2014-11-11 14:23:55 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: remove the width/height fields from the caps to support frame resizing
+	  It was previously only occuring with sysmem caps features
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739334
+
+2014-11-10 17:42:20 +0100  Aurélien Zanelli <aurelien.zanelli@darkosphere.fr>
+
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  h264parser: fix GstH264ParserResult documentation typo
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739906
+
+2014-11-10 16:01:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/.gitignore:
+	  tests: Add x265enc unit test to .gitignore
+
+2014-11-09 20:53:34 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/videoparsers/gstpngparse.c:
+	  pngparse: optimise reading of png files
+	  Read PNG data chunk in one go by letting the parser
+	  base class know the size we need, so that it doesn't
+	  drip-feed us small chunks of data (causing a lot of
+	  reallocs and memcpy in the process) until we have
+	  everything.
+	  Improves parsing performance of very large PNG files
+	  (65MB) from ~13 seconds to a couple of millisecs.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736176
+
+2014-11-09 19:23:47 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/examples/mpegtsmux/mpts_test2.c:
+	  examples: remove pointless mpegtsmux example
+	  Serves no purpose, is not even hooked up to the
+	  build system, has hard coded file names and paths,
+	  and can easily be replaced with a gst-launch line.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739844
+
+2014-11-09 10:25:25 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/avfvideosrc.m:
+	  avfvideosrc: Don't pretend to support reconfiguration
+	  We will run into an assertion in set_caps() if we try to change
+	  caps while the source is already running. Don't try to find new
+	  caps in GstBaseSrc::negotiate() to prevent caps changes.
+
+2014-10-09 13:11:48 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: set seq_layer_sent to FALSE on reset()
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-10-09 13:03:56 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	* gst/videoparsers/gstvc1parse.h:
+	  vc1parse: implement asf to *-frame-layer stream-format
+	  This commit add an helper to convert a frame to frame-layer format and
+	  use it to implement these two stream-format conversion:
+	  - asf --> sequence-layer-frame-layer
+	  - asf --> frame-layer
+	  In simple/main profile, we basically have a raw frame, so building a
+	  frame layer isn't too complicated. But in advanced profile, the first
+	  frame-layer should contain sequence-header, entrypoint, and frame and
+	  each keyframe should contain entrypoint, so we have to handle these
+	  carefully.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-10-09 10:38:40 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: check output format at negotiation time
+	  Add an helper to check that output stream-format is coherent with
+	  profile and header-format. It also check if we know how to do the
+	  conversion if the input stream-format differs from selected
+	  output-format.
+	  So, in case output stream-format is not allowed, it will now fail at
+	  negotiation rather than in pre_push_frame.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-09-30 15:35:38 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: add some asf related stream-format conversions
+	  This commit introduces an helper to convert an ASF frame to BDUs format with
+	  startcodes and use this helper to implements following stream-format
+	  conversions:
+	  - asf --> bdu
+	  - asf --> sequence-layer-bdu
+	  - asf --> sequence-layer-raw-frame
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-09-30 15:28:55 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	* gst/videoparsers/gstvc1parse.h:
+	  vc1parse: add some simple stream-format conversion
+	  It add the support of following stream-format conversion:
+	  - bdu --> sequence-layer-bdu
+	  - bdu-frame --> sequence-layer-bdu-frame
+	  - frame-layer --> sequence-layer-frame-layer
+	  For these conversion, the only requirements is to push a sequence-layer
+	  buffer prior to data.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-09-30 14:53:25 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: prepare the stream-format conversion code and add the simplest ones
+	  It prepares the template for stream-format conversion and it implements
+	  the following conversion:
+	  - sequence-layer-bdu --> bdu
+	  - sequence-layer-bdu-frame --> bdu-frame
+	  - sequence-layer-frame-layer --> frame-layer
+	  Work is done in the pre_push_frame() method.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-09-05 17:57:47 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: do not override last known stream error
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736141
+
+2014-11-07 19:30:18 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssmanifest.c:
+	* ext/smoothstreaming/gstmssmanifest.h:
+	  mssdemux: seeks in the manifest never fail
+	  Set void as the return and remove error handling as it could
+	  never fail
+
+2014-11-07 19:16:47 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: make sure flushes have the same seqnum as the seek event
+	  They are part of the same operation and should preserve the seqnum
+
+2014-11-07 19:09:15 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: simplify seek to eos handling
+	  Remove redundant flush stop pushing and remove a goto to make
+	  the code flow simpler
+
+2014-09-17 15:22:59 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: send missing FLUSH_STOP/EOS when no seeking period is found
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736800
+
+2014-11-07 15:50:51 +0100  Josep Torra <n770galaxy@gmail.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	* gst/videoparsers/gsth264parse.h:
+	  h264parse: set the HEADER flag on buffers containing SPS or PPS
+
+2014-11-07 15:41:15 +0100  Josep Torra <n770galaxy@gmail.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	* gst/videoparsers/gsth265parse.h:
+	  h265parse: set the HEADER flag on buffers containing VPS, SPS or PPS
+
+2014-11-07 11:41:01 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* pkgconfig/gstreamer-gl.pc.in:
+	  gstglconfig: Put gstglconfig.h into $(libdir)/gstreamer-1.0/include
+	  It's architecture dependent and should not be placed into the include
+	  directory as the assumption is that all those headers are architecture
+	  independent.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739767
+
+2014-11-07 00:16:12 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  smoothstreaming: initialise new GstH264NalUnit fields
+	  CID #1251107.
+
+2014-11-06 23:58:06 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: don't make gst_glimage_sink_handle_events call _ensure_gl_setup
+	  gst_glimage_sink_handle_events can be called from the overlay interface and from
+	  the main thread before GL is setup. Before this change, that would call
+	  _ensure_gl_setup() and deadlock on OSX.
+	  Change things so that it's always safe to call gst_glimage_sink_handle_events()
+	  without stuff deadlocking.
+
+2014-11-06 23:55:20 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: fix possible deadlock on osx
+	  Remove gst_glimage_sink_handle_events call in gst_glimage_sink_init. It was
+	  unnecessary and when the element was instantiated from the main thread, caused a
+	  deadlock in OSX creating the context (thread).
+
+2014-11-06 13:22:17 +0100  Alessandro Decina <alessandro.d@gmail.com>
+
+	* sys/applemedia/vtenc.c:
+	* sys/applemedia/vtenc.h:
+	  vtenc: add realtime and allow-frame-reordering properties
+
+2014-11-07 10:01:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: clamp the resize width/height to >= 1 to avoid a GL error
+
+2014-11-06 17:36:15 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Print a warning into the debug log on generating black frames
+
+2014-11-06 17:21:39 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosink.c:
+	  intervideosink: Add some debug output in the render function
+
 2014-11-06 11:53:04 +0100  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst/videoparsers/gsth265parse.c:
@@ -372,20 +17019,73 @@
 	  h264parse: don't unnecesarily set src_caps
 	  https://bugzilla.gnome.org/show_bug.cgi?id=739374
 
-2014-10-31 12:52:50 +1100  Matthew Waters <matthew@centricular.com>
+2014-11-06 18:43:01 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglutils.c:
+	  glutils: only attempt getting the app context when we don't already have a display
+	  avoids querying/messaging the world on each frame
+
+2014-11-06 18:37:23 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: fail context creation if glGetString returns NULL
+
+2014-10-29 12:24:16 +0100  Lubosz Sarnecki <lubosz@gmail.com>
 
 	* ext/gl/gstglimagesink.c:
 	* ext/gl/gstglimagesink.h:
-	  glimagesink: resize the viewport correctly on a caps change
-	  with force-aspect-ratio=true, if the width or height changed, the
-	  viewport wasn't being updated to respect the new video width and height
-	  until a resize occured.
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glimagesink: implement gst_video_overlay_handle_events
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736035
+
+2014-11-04 15:16:33 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudiosrc: Fix compiler warning about unused variables
+	  gstinteraudiosrc.c: In function 'gst_inter_audio_src_create':
+	  gstinteraudiosrc.c:339:27: error: variable 'buffer_samples' set but not used [-Werror=unused-but-set-variable]
+	  guint64 period_samples, buffer_samples;
+	  ^
+
+2014-11-04 14:56:55 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstinteraudiosrc.h:
+	* gst/inter/gstintersurface.c:
+	* gst/inter/gstintersurface.h:
+	  interaudio: Make buffer size and latency handling more explicit and add properties for them
+	  This now makes audio work more reliable without disconts.
+
+2014-11-04 13:59:20 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	  interaudiosink: Use the bpf from the audio info instead of hardcoding 4
+
+2014-11-04 13:58:44 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudio: Only flush the ringbuffer on the sink side
+
+2014-11-04 13:46:46 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	  interaudiosink: Flush the adapter when we get new caps
+	  Ideally we would drain the source but that would require more coordination
+	  between sink and source than what we currently have.
 
 2014-11-04 09:52:11 +0100  Sebastian Dröge <sebastian@centricular.com>
 
 	* configure.ac:
 	  gl/cocoa: include gl3.h in configure too for consistency with gstglapi.h
 
+2014-11-03 20:45:03 -0500  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst-libs/gst/insertbin/gstinsertbin.c:
+	  insertbin: Add doc for the ignored user-data in action signals
+
 2014-11-03 23:24:33 +0000  Julien Isorce <julien.isorce@gmail.com>
 
 	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
@@ -430,15 +17130,85 @@
 	  gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
 	  gstglwindow_cocoa.m:555: warning: '...' as arguments.)
 
-2014-10-21 16:21:08 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-11-03 16:54:58 +0100  Sebastian Dröge <sebastian@centricular.com>
 
-	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
-	  gl/cocoa: Fix compiler warning
-	  gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
-	  gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
-	  gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
-	  gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
-	  gstglwindow_cocoa.m:555: warning: '...' as arguments.)
+	* gst/inter/gstintervideosrc.c:
+	  intervideosrc: Negotiate framerate with downstream
+	  Prefer the closest framerate to the input framerate though.
+
+2014-11-03 16:24:33 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintervideosrc.c:
+	  inter*src: No need to set caps manually on the pad
+	  basesrc does that for us already.
+
+2014-11-03 16:13:23 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Swap source/destination parameters of gst_video_converter_frame()
+
+2014-11-03 15:19:48 +0100  Wim Taymans <wtaymans@redhat.com>
+
+	* gst/inter/gstintervideosrc.c:
+	  inter: fix order of arguments
+
+2014-11-03 10:05:59 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudio: Set all required fields on the template caps
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739542
+
+2014-11-03 00:17:41 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	  gl: fix Since marker for gst_gl_window_run_navigation()
+
+2014-11-02 23:24:39 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/inter/gstintersurface.c:
+	  inter: don't leak surface name
+
+2013-09-03 11:11:54 +0100  Tim-Philipp Müller <tim@centricular.net>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: start pushing data again when a pad gets linked later
+	  The whole not_linked optimisation is really a bit dodgy here, but
+	  let's leave it in place for now and at least start pushing data
+	  again when a pad got linked later, in which case we should get a
+	  RECONFIGURE event.
+
+2013-09-02 23:36:43 +0100  Tim-Philipp Müller <tim@centricular.net>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	* gst/mpegdemux/gstmpegdemux.h:
+	* gst/mpegdemux/plugin.c:
+	  mpegdemux: namespace fixes
+
+2014-11-02 19:26:20 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.c:
+	  audiovisualizer: post QoS messages when dropping frames due to QoS
+
+2014-11-02 19:12:56 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/audiovisualizers/gstaudiovisualizer.h:
+	  audiovisualizer: fix boilerplate macros
+
+2014-11-02 17:18:12 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/hls/gsthlsdemux.c:
+	* ext/smoothstreaming/gstmssdemux.c:
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/gstdvbsrc.c:
+	  Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED
+
+2014-11-02 17:17:46 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hls: fix indentation
 
 2014-10-29 18:18:07 +0000  Luis de Bethencourt <luis.bg@samsung.com>
 
@@ -450,6 +17220,52 @@
 	  CID #1212171
 	  https://bugzilla.gnome.org/show_bug.cgi?id=739368
 
+2014-11-01 10:10:27 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* ext/opus/gstrtpopusdepay.c:
+	* ext/opus/gstrtpopuspay.c:
+	  rtpopus: Use OPUS encoding name
+	  Both Firefox and Chrome uses OPUS as the encoding in their SDP.
+	  Adding this now defacto standard name remove the need for special
+	  case in SDP parsing code.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737810
+
+2014-10-31 17:32:56 -0300  Thiago Santos <thiago.sousa.santos@collabora.com>
+
+	* ext/smoothstreaming/gstmssmanifest.c:
+	  mssdemux: add type of stream to debug log
+	  Makes it faster to debug why certain streams are not showing
+
+2014-10-31 17:32:39 -0300  Thiago Santos <thiago.sousa.santos@collabora.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: do not unlock not locked mutex
+
+2014-10-31 10:45:19 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: fix comments that confuse gtk-doc
+	  GTK-Doc uses a special syntax for code documentation. A multiline comment that
+	  starts with an additional '*' marks a documentation block that will be processed
+	  by the GTK-Doc tools. So GTK-Doc is confused if a comment block starts with that
+	  additional '*' but isn't meant to be processed. Removing this additional '*'.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739444
+
+2014-10-31 12:52:50 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: resize the viewport correctly on a caps change
+	  with force-aspect-ratio=true, if the width or height changed, the
+	  viewport wasn't being updated to respect the new video width and height
+	  until a resize occured.
+
+2014-10-31 12:52:07 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: advertise support for changing input caps mid-stream
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739334
+
 2014-10-31 12:30:53 +1100  Matthew Waters <matthew@centricular.com>
 
 	* gst-libs/gst/gl/gstglcontext.c:
@@ -457,6 +17273,39 @@
 	* gst-libs/gst/gl/gstglwindow.c:
 	  gl: sprinkle some Since markers
 
+2014-10-30 14:27:38 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	  mpegts: remove storage of never used values
+	  Both _parse_atsc_mgt() and  _parse_atsc_vct () change the value of the variable
+	  data just before returning. The new value is never used since data is a pointer
+	  declared at the beginning of the function and going out of scope just after the
+	  new value is stored.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739404
+
+2014-10-30 17:06:01 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstsolarize.c:
+	  gaudieffects: remove < 0 comparison on guint32
+	  Current CLAMP checks both if the value is below 0 or above 255. Considering it
+	  is an unsigned value it can never be less than zero, so that comparison is
+	  unnecessary. Switching to using if just for the upper bound.
+	  CID #1139796
+
+2014-10-30 16:05:14 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstsolarize.c:
+	  gaudieffects: declare floor and ceiling as constants
+
+2014-10-30 15:49:01 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/gaudieffects/gstdilate.c:
+	  gaudieffects: stored value is overwritten
+	  Value from left_luminance is assigned to out_luminance here, but that stored
+	  value is not used before it is overwritten in the next cycle of the loop.
+	  Removing assignation.
+	  CID #1226473
+
 2014-10-24 16:52:42 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
 
 	* gst/mpegtsdemux/mpegtsbase.c:
@@ -467,14 +17316,188 @@
 	  the programs were removed and the pes/psi were kept, preventing the
 	  PAT to be parsed again.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=738695
-	  Conflicts:
-	  gst/mpegtsdemux/mpegtsbase.c
 
-2014-10-30 19:01:20 +1100  Matthew Waters <matthew@centricular.com>
+2014-04-21 11:48:22 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
 
+	* gst/siren/common.c:
+	  siren: fix sample rate list
+	  It was using a 24000/24000/48000, but I think it meant to use
+	  24000/32000/48000. Not 100% sure...
+	  https://en.wikipedia.org/wiki/G.722.1 has the list of supported
+	  bitrates. It's not clear whether the "flag" code maps to this,
+	  however.
+	  Coverity 206072
+
+2014-10-30 14:49:05 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: remove storage of never used values
+	  These two values are stored just before the function returns and they go out of
+	  scope.
+
+2014-06-10 09:33:40 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* ext/opus/gstopusenc.c:
+	* ext/opus/gstopusenc.h:
+	  opusenc: update output segment stop time to match clipped samples
+	  This will let oggmux generate a granpos on the last page that properly
+	  represents the clipped samples at the end of the stream.
+
+2014-10-30 18:45:04 +0530  Arun Raghavan <arun@accosted.net>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Trivial documentation fix
+
+2014-10-30 23:08:00 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: don't get the current caps from GstVideoInfo for the srcpad
+	  It's missing the caps features needed.
+
+2014-10-30 18:57:59 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglutils.c:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.cpp:
 	* tests/examples/gl/sdl/sdlshare.c:
-	  gl/examples: use the current X Display from SDL
-	  allows GL context sharing to occur.
+	  gl/examples: update for other-context property removal
+
+2014-10-30 16:48:00 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.h:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.h:
+	  glcontext: add more functionality to wrapped contexts
+	  Implements get_current_context() and get_proc_address() for wrapped
+	  contexts.
+
+2014-10-30 12:43:09 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglshader.h:
+	  glshader: advertise the default vertex and fragment shaders on desktop GL
+
+2014-05-22 13:13:14 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers: h264: recognize SVC NAL units.
+	  Identify SVC NAL units and tag them as such. This is necessary for
+	  gst_h264_parser_parse_slice_hdr() to fail gracefully, if the user
+	  did not perform the check himself.
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2014-10-29 14:53:15 +0100  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  codecparsers: h264: fix number of list0 {,non-}anchor refs.
+	  Fix copy-paste error in gst_h264_sps_mvc_copy() where num_anchor_refs_l0
+	  and num_non_anchor_refs_l0 were incorrectly initialized from list1.
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2014-10-29 13:51:40 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  Update .def for new API
+
+2014-10-29 13:15:51 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers: sprinkle some gtk-doc Since: markers for new API
+
+2014-10-29 12:22:14 +0100  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  satisfy gst-indent
+
+2014-10-29 22:23:13 +1000  Jan Schmidt <jan@centricular.com>
+
+	* ext/gl/gstglfiltercube.c:
+	  glfiltercube: Fix typo in property description
+
+2014-10-29 22:23:02 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  codecparsers: Initialise nalu extension type to NONE
+	  Always set a default NALU extension type, and override it
+	  when we find a supported extension, to avoid having it unset/random
+	  for unsupported NALU extensions
+
+2014-10-07 16:28:03 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  h264parser: Fix frame packing SEI parsing
+
+2014-03-25 14:08:44 +0100  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	* gst/videoparsers/gsth264parse.c:
+	  codecparsers: h264: add support for Frame Packing Arrangement SEI message.
+	  This parses the frame_packing_arragement() payload in SEI message.
+	  This information can be used by decoders to appropriately rearrange the
+	  samples which belong to Stereoscopic and Multiview High profiles.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=685215
+	  Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2013-03-08 18:17:16 +0200  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	* gst/videoparsers/gsth264parse.c:
+	  codecparsers: h264: add support for Stereo Video Information SEI message.
+	  Add the necessary payload parsing support for stereo_video_info.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=685215
+	  Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+2012-10-01 13:36:45 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers: h264: parse seq_parameter_set_mvc_extension().
+	  https://bugzilla.gnome.org/show_bug.cgi?id=685215
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2012-09-26 18:46:36 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers: h264: parse MVC syntax elements.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=685215
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2014-10-29 22:58:37 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	* gst/mpegtsdemux/mpegtspacketizer.h:
+	* gst/mpegtsdemux/mpegtsparse.c:
+	  tsparse: Handle backward and discont timestamps better.
+	  Assume that small backward PCR jumps are just from upstream packet
+	  mis-ordering and don't reset timestamp tracking state - assuming that
+	  things will be OK again shortly.
+	  Make the threshold for detecting discont between sequential buffers
+	  configurable and match the smoothing-latency setting on tsparse
+	  to better cope with data bursts.
+
+2014-10-29 22:58:37 +1100  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	* gst/mpegtsdemux/mpegtsbase.h:
+	* gst/mpegtsdemux/mpegtsparse.c:
+	* gst/mpegtsdemux/mpegtsparse.h:
+	  tsparse: Implement timestamp/retimestamping of output buffers
+	  When the set-timestamps property is set, use PCRs on the provided
+	  (or autodetected) pcr-pid to apply (or replace) timestamps on the
+	  output buffers, using piece-wise linear interpolation.
+	  This allows tsparse to be used to stream an arbitrary mpeg-ts file,
+	  or to smooth jittery reception timestamps from a network stream.
+	  The reported latency is increased to match the smoothing latency if
+	  necessary.
 
 2014-10-29 10:09:35 +0100  Vincent Abriou <vincent.abriou@st.com>
 
@@ -490,22 +17513,260 @@
 	  Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
 	  Reviewed-by: Benjamin GAIGNARD <benjamin.gaignard@linaro.org>
 
+2014-10-29 10:37:38 +0000  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst-libs/gst/codecparsers/gstmpeg4parser.c:
+	  codecparsers: remove ignored increment of return
+	  'return val++;' returns the value before it is incremented because the post
+	  increment happens after the statement. Removing the unused increment.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=739345
+
+2014-10-29 08:27:57 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer:fix incorrect parameter passed to handle_set_context
+
+2014-10-28 21:42:31 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/webp/gstwebpdec.h:
+	* gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h:
+	* gst/camerabin2/gstwrappercamerabinsrc.h:
+	* sys/uvch264/gstuvch264_src.h:
+	  Add some missing G_END_DECLS
+
 2014-10-28 17:44:47 +0000  Tim-Philipp Müller <tim@centricular.com>
 
 	* ext/faad/gstfaad.c:
 	  faad: fix wrong unrefs in set_format error code path
 
+2014-10-28 18:27:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: get the config from the correct pool
+
 2014-10-28 18:01:27 +1100  Matthew Waters <matthew@centricular.com>
 
 	* gst-libs/gst/gl/gstglfilter.c:
 	  glfilter: avoid uninitialized variable size when chaining multiple glfilters
 	  https://bugzilla.gnome.org/show_bug.cgi?id=739277
 
+2014-10-28 18:01:01 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: gst-indent file
+
+2014-10-28 17:31:37 +1100  Matthew Waters <matthew@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h:
+	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.h:
+	* gst-libs/gst/gl/eagl/gstglcontext_eagl.m:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/egl/gstglcontext_egl.h:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.c:
+	* gst-libs/gst/gl/win32/gstglcontext_wgl.h:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.h:
+	* tests/check/libs/gstglcontext.c:
+	  glcontext: add api for retreiving the current context and api
+	  that is current in the calling thread.
+
+2014-10-21 19:03:08 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/glprototypes/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/all_functions.h:
+	* gst-libs/gst/gl/glprototypes/vao.h:
+	  glprototypes: add vertex attribute array definitions
+
+2014-10-27 17:57:46 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* common:
+	  Automatic update of common submodule
+	  From 84d06cd to 7bb2bce
+
+2014-10-27 15:34:58 +0100  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintervideosrc.c:
+	  inter: Use 64-bit safe scaling functions
+
+2014-10-27 12:43:53 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: reflow switch case statement a bit
+	  Make it clear there's no 'break' missing at the end
+	  of the case SYS_DVBT, and pacify coverity (CID 1249689).
+
+2014-06-12 16:59:46 +0200  L. Sorin <sorin@axis.com>
+
+	* ext/curl/gstcurlsshsink.c:
+	* ext/curl/gstcurlsshsink.h:
+	  curlsshsink: use the locally defined types
+	  Just a matter of coding style, makes the code a bit tidier...
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731581
+
+2014-10-26 15:45:20 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* Makefile.am:
+	  Parallelise 'make check-valgrind'
+
+2014-10-26 15:44:05 +0000  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: check for more openh264 API that we need
+
+2014-10-25 18:50:42 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/audiomixer.c:
+	  tests: fix audiomixer test on big endian systems
+
+2014-10-24 21:42:58 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: correctly capitalize DiSEqC
+
+2014-10-24 20:12:23 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: rework _output_frontend_stats()
+	  Retry stat reporting ioctls on EINTR
+
+2014-10-24 19:30:25 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add checks on allowed DVB-T bandwidths
+
+2014-10-24 19:12:33 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add fixme note on DTV_LNA setting
+	  Rephrase another comment while at it
+
+2014-10-24 18:57:40 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing logic for additional bandwidths
+	  New 1.712, 5 and 10 MHz bandwidths were been ignored
+	  at set/get prop.
+
+2014-10-24 15:53:59 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* configure.ac:
+	  configure.ac: Use libsrtp.pc if present
+
 2014-10-23 17:42:27 +0300  Vootele Vesterblom <vov@bang-olufsen.dk>
 
 	* gst/rawparse/gstrawparse.c:
 	  rawparse: fix handling of segment event in sink event handler
 
+2014-10-24 00:35:22 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: override the caps query in order to 'convert' capsfeatures
+	  Otherwise, it is only possible for the sink pads and the src pads to
+	  have the exact same caps features.  We can convert from any feature
+	  to another feature so support that.
+
+2014-10-23 23:55:48 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: override the accept caps query in order to 'convert' capsfeatures
+	  Otherwise, it is only possible for the sink pads and the src pads to
+	  have the exact same caps features.  We can convert from any feature
+	  to another feature so support that.
+
+2014-08-14 23:29:00 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglutils.h:
+	  gl: propogate other-context using GstContext
+
+2014-10-20 03:07:08 -0600  Brendan Long <self@brendanlong.com>
+
+	* ext/dash/README:
+	  dash: Remove obsolete README.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738848
+
+2014-10-22 19:34:17 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudio: Add support for arbitrary raw audio formats
+
+2014-10-22 19:31:31 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintervideosink.c:
+	* gst/inter/gstintervideosrc.c:
+	* gst/inter/gstintervideosrc.h:
+	  intervideo: Add support for arbitrary video formats
+
+2014-10-22 19:28:48 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintervideosrc.c:
+	  inter: Truncate the caps as part of the fixating
+
+2014-10-22 19:08:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudio: Fix timestamp, latency and period handling
+
+2014-10-22 18:41:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	  interaudio: Use GST_DEBUG_OBJECT() instead of GST_DEBUG()
+
+2014-10-22 18:40:01 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosink.h:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstinteraudiosrc.h:
+	* gst/inter/gstintersurface.h:
+	  interaudio: Properly pass through caps from the sink to the source
+	  Otherwise a magic capsfilter after the source is required with
+	  exactly the same caps as the input.
+
+2014-10-22 18:13:36 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintersurface.c:
+	* gst/inter/gstintersurface.h:
+	  inter: Clean up surfaces after the last user is gone
+
+2014-10-22 18:07:00 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstinteraudiosink.c:
+	* gst/inter/gstinteraudiosrc.c:
+	* gst/inter/gstintersubsink.c:
+	* gst/inter/gstintersubsrc.c:
+	* gst/inter/gstintersurface.c:
+	* gst/inter/gstintervideosink.c:
+	* gst/inter/gstintervideosrc.c:
+	  inter: Whitespace cleanup
+
+2014-10-22 18:03:13 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/inter/gstintersurface.h:
+	* gst/inter/gstintervideosink.c:
+	* gst/inter/gstintervideosink.h:
+	* gst/inter/gstintervideosrc.c:
+	* gst/inter/gstintervideosrc.h:
+	  intervideo: Properly pass through caps from the sink to the source
+	  Otherwise a magic capsfilter after the source is required with
+	  exactly the same caps as the input.
+	  This would've failed before with invalid buffer sizes:
+	  gst-launch-1.0 videotestsrc ! intervideosink  intervideosrc ! "video/x-raw,width=640,height=480" ! xvimagesink
+
 2014-10-22 15:07:04 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst/rawparse/gstrawparse.c:
@@ -518,12 +17779,135 @@
 	* gst/rawparse/gstrawparse.c:
 	  rawparse: Don't try to retrieve 0 byte buffers from the adapter in multi-frame mode
 
+2014-10-22 13:03:30 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: improve openh264 check
+	  The openh264 API is still unstable, so check for
+	  structure member that we need to prevent building
+	  against an older incompatible version.
+
+2014-10-22 12:36:36 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* configure.ac:
+	  configure: simplify openh264 check
+	  Of course PTHREADS_CFLAGS is not used anywhere now
+	  for the check, but that was the case before as well.
+
+2014-10-21 16:21:08 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: Fix compiler warning
+	  gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
+	  gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
+	  gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
+	  gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
+	  gstglwindow_cocoa.m:555: warning: '...' as arguments.)
+
+2014-10-21 15:42:32 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Fix locking
+	  The object lock only protects the session, as we modify
+	  the session from other threads when the bitrate property
+	  is changed. Don't hold it much longer than for session
+	  related things.
+	  And we need to release the video decoder stream lock before
+	  enqueueing a frames. It might wait for our callback to dequeue
+	  a frame from another thread, which will then take the stream
+	  lock too and deadlock.
+
+2014-10-21 13:01:45 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* common:
+	  Automatic update of common submodule
+	  From a8c8939 to 84d06cd
+
+2014-10-21 13:28:50 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* configure.ac:
+	  configure: use a macro to check for pthread
+	  Replace the hardcoded -lpthread in most of the places with $PTHREAD_LIBS. For
+	  openh264 also add $PTHREAD_LIBS to OPENH264_LIBS until upstream ships a .pc
+	  file.
+
+2014-10-21 12:58:39 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* README:
+	* common:
+	  Automatic update of common submodule
+	  From 36388a1 to a8c8939
+
 2014-10-21 12:39:14 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
 
 	* ext/hls/gsthlsdemux.c:
 	  hlsdemux: reset end_of_playlist attribute when we receive a seek
 	  https://bugzilla.gnome.org/show_bug.cgi?id=738696
 
+2014-10-20 18:25:08 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: critical error for blocksize, timeout min/max values
+	  Audiomixer blocksize, cant be 0, hence adjusting the minimum value to 1
+	  timeout value of aggregator is defined with MAX of MAXINT64,
+	  but it cannot cross G_MAXLONG * GST_SECOND - 1
+	  Hence changed the max value of the same
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738845
+
+2014-10-21 06:04:10 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: fixup eglimage include path
+
+2014-10-21 02:52:05 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: fixate the parts of the caps we don't know how to deal with
+	  fixes glvideomixer with video/x-raw,width=foo i.e. no format field.
+
+2014-10-18 10:03:43 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstgltestsrc.c:
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option
+
+2014-10-20 10:34:27 +1100  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	* gst/compositor/compositor.c:
+	  videoaggregator: operate on caps rather than video info
+	  Otherwise the CapsFeatures will be lost along with the possibility
+	  of multiple output types and formats.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738129
+
+2014-09-19 11:37:56 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: introduce a helper to make sequence-layer
+	  It will be useful to implement stream-format conversion.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738526
+
+2014-10-20 02:27:15 -0600  Brendan Long <self@brendanlong.com>
+
+	* configure.ac:
+	  gl: Check for GLU before trying to use it in configure.ac
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738816
+
+2014-10-20 15:02:28 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glcolorconvert: support RGB16/BGR16 video format upload
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738842
+
 2014-10-09 15:12:01 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
 
 	* tests/check/libs/vc1parser.c:
@@ -542,6 +17926,31 @@
 	  Level values are defined in Annex J.1.2 of the SMPTE 421M.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=738230
 
+2014-08-02 11:29:37 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: send initial GAP event on sparse streams for faster startup with playbin
+	  Signal sparse streams properly in stream-start event and force sending
+	  of pending sticky events which have been stored on the pad already and
+	  which otherwise would only be sent on the first buffer or serialized
+	  event (which means very late in case of subtitle streams). Playsink in
+	  playbin waits for stream-start or another serialized event, and if we
+	  don't do this it will wait for the multiqueue to run full before
+	  starting playback, which might take a couple of seconds.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734040
+
+2014-10-20 12:30:50 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	* gst/mpegtsdemux/mpegtspacketizer.h:
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: GAP detection
+	  All pads of a stream are now added at the beginning. In order to cope with
+	  streams that don't get any data (forever or for a long time) we detect gaps
+	  and push out GAP events when needed.
+	  Cleanups and commenting by Jan Schmidt <jan@centricular.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734040
+
 2014-10-01 16:17:46 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
 
 	* gst/videoparsers/gstvc1parse.c:
@@ -553,6 +17962,11 @@
 	  current WMV format.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=738532
 
+2014-10-20 11:22:54 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* configure.ac:
+	  configure: add pthread to the configure check for openh264
+
 2014-10-20 09:47:27 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/rtmp/gstrtmpsink.c:
@@ -564,57 +17978,15 @@
 	  rtmpsink: Free URI string in finalize()
 	  https://bugzilla.gnome.org/show_bug.cgi?id=738674
 
-2014-09-22 09:44:14 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+2014-10-17 21:26:52 -0700  Brion Vibber <brion@pobox.com>
 
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: parse frame header when stream format is ASF/raw for simple/main profile
-	  When stream-format is ASF or sequence-layer-raw-frame, we basically have
-	  a raw frame so we can parse it to extract some information such the
-	  keyframe flag. The only requirement is to have a valid sequence-header.
-	  This commit parse the frame header and set the DELTA_UNIT buffer flag in
-	  case the frame is not a keyframe.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=738519
-
-2014-10-13 14:05:24 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: just assume none header-format when no codec_data is present
-	  https://bugzilla.gnome.org/show_bug.cgi?id=738449
-
-2014-10-09 18:18:02 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: fix framesize when input is frame-layer
-	  frame-layer header is represented as a sequence of 32 bit unsigned
-	  integer serialized in little-endian byte order, so framesize is on the
-	  first 3 bytes.
-	  SMPTE 421M Annex L.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=738243
-
-2014-10-10 13:05:49 +0100  Tim-Philipp Müller <tim@centricular.com>
-
-	* ext/fluidsynth/gstfluiddec.c:
-	  fluiddec: don't leak incoming caps event
-	  https://bugzilla.gnome.org/show_bug.cgi?id=738291
-
-2014-10-09 11:51:16 +0200  Antonio Ospite <ao2@ao2.it>
-
-	* ext/fluidsynth/gstfluiddec.c:
-	  fluiddec: fix some memory leaks
-	  https://bugzilla.gnome.org/show_bug.cgi?id=738223
-
-2014-10-21 15:42:32 +0200  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/applemedia/vtenc.c:
-	  vtenc: Fix locking
-	  The object lock only protects the session, as we modify
-	  the session from other threads when the bitrate property
-	  is changed. Don't hold it much longer than for session
-	  related things.
-	  And we need to release the video decoder stream lock before
-	  enqueueing a frames. It might wait for our callback to dequeue
-	  a frame from another thread, which will then take the stream
-	  lock too and deadlock.
+	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
+	  gl/cocoa: Fix for building on Mac OS X 10.10
+	  Using NSApp directly seems to confuse something, as the compiler
+	  was expecting an id<NSFileManagerDelegate>. Switched to using
+	  [NSApplication sharedApplication], and specified the delegate
+	  protocol on the window class as well.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738740
 
 2014-10-19 14:57:43 +0200  Sebastian Dröge <sebastian@centricular.com>
 
@@ -637,6 +18009,108 @@
 	* sys/applemedia/vtenc.c:
 	  vtenc: Remove unused #define
 
+2014-10-19 13:44:38 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/rtp/Makefile.am:
+	  rtpbad: Fix make dist by removing non-existing file from EXTRA_DIST
+	  It's used by the rtp plugin in gst-plugins-good for VP8 but not needed
+	  or used here.
+
+2014-10-17 16:51:27 +0200  Thijs Vermeir <thijsvermeir@gmail.com>
+
+	* gst/rtp/Makefile.am:
+	  rtpbad: include plugins base cflags (fix build on jenkins)
+
+2014-10-16 10:34:01 +0200  Thijs Vermeir <thijsvermeir@gmail.com>
+
+	* configure.ac:
+	* gst/rtp/Makefile.am:
+	* gst/rtp/gstrtp.c:
+	* gst/rtp/gstrtph265depay.c:
+	* gst/rtp/gstrtph265depay.h:
+	* gst/rtp/gstrtph265pay.c:
+	* gst/rtp/gstrtph265pay.h:
+	  rtp: add h265 RTP payloader + depayloader
+
+2014-10-15 15:25:55 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurlbasesink.c:
+	  curlbasesink: strip newlines from curl debug messages
+	  The messages we receive in the custom log handler might end with a newline and
+	  are not \0 terminated. Copy the messages, trim and terminate them.
+
+2014-10-15 15:24:12 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurlbasesink.c:
+	  curlbasesink: small code cleanup
+	  Use a local var and save a local var.
+
+2014-10-15 16:52:09 +0200  Thijs Vermeir <thijsvermeir@gmail.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/x265enc.c:
+	  tests/x265enc: add simple unit test
+
+2014-03-05 16:39:30 +0100  Thijs Vermeir <thijsvermeir@gmail.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/x265/Makefile.am:
+	* ext/x265/gstx265enc.c:
+	* ext/x265/gstx265enc.h:
+	  x265enc: add x265 encoder element
+
+2014-10-14 14:00:11 +0200  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgldeinterlace.c:
+	  gldeinterlace: ref the uploaded buffer
+	  Instead of the possibly non-GL input buffer.
+
+2014-10-14 16:41:51 +0200  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  glfilter: add uploaded_buffer field
+
+2014-09-22 09:44:14 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: parse frame header when stream format is ASF/raw for simple/main profile
+	  When stream-format is ASF or sequence-layer-raw-frame, we basically have
+	  a raw frame so we can parse it to extract some information such the
+	  keyframe flag. The only requirement is to have a valid sequence-header.
+	  This commit parse the frame header and set the DELTA_UNIT buffer flag in
+	  case the frame is not a keyframe.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738519
+
+2014-10-14 10:51:22 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/libde265/libde265-dec.c:
+	  libde265: Change rank to SECONDARY, gst-libav has PRIMARY rank
+
+2014-09-17 10:38:44 +0200  Joachim Bauch <bauch@struktur.de>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/libde265/Makefile.am:
+	* ext/libde265/gstlibde265.c:
+	* ext/libde265/libde265-dec.c:
+	* ext/libde265/libde265-dec.h:
+	* gst-plugins-bad.spec.in:
+	  Integrate libde265 into gst-plugins-bad.
+
+2014-10-13 14:05:24 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: just assume none header-format when no codec_data is present
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738449
+
+2014-10-14 09:19:59 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/applemedia/vtdec.c:
+	  vtdec: Set reorder length to 0 if we can't calculate it
+	  Instead of leaving it at whatever value it had before.
+
 2014-10-13 13:28:57 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/gl/gstglimagesink.c:
@@ -644,15 +18118,306 @@
 	  Otherwise we change a value of a property when going to READY state,
 	  which is unexpected behaviour.
 
+2014-10-13 13:27:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: Call the pad's parent class finalize method
+
+2014-10-13 13:27:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	  glmixer: Only finalize the other context in finalize()
+	  Otherwise we change a value of a property when going to READY state,
+	  which is unexpected behaviour.
+
+2014-10-13 13:25:42 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltestsrc.h:
+	  gltestsrc: Add other-context property
+
 2014-10-13 11:56:03 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/gl/gstglimagesink.c:
 	  glimagesink: Don't leak other-context
 
-2014-10-13 13:27:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-10-13 11:53:47 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/gl/gstglmixer.c:
-	  glmixer: Call the pad's parent class finalize method
+	* ext/gl/gstglmixer.h:
+	  glmixer: Add other-context property
+
+2014-10-12 21:25:16 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/gstdvbsrc.c:
+	* sys/dvb/gstdvbsrc.h:
+	  dvb: make interleaving a prop and proxy on dvbbasebin
+	  DTV_INTERLEAVING is currently used only for DTBM. This is
+	  congruent with the v4l dvb API where the different interleaving
+	  modes where added for v5.7
+
+2014-10-12 18:30:38 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add transmission mode checks for DVB-T/T2
+	  These and every sanity check leading to a warning
+	  (we have a few in place) should come handy when
+	  debuging failed tunning scenarios.
+
+2014-10-12 13:34:09 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: docs, drop v5 API change history comments < .5
+	  We only support from minor 5 and up now. Also add a
+	  note about the recently added preliminar DTMB support.
+
+2014-10-12 13:08:13 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing DVB-T2 bandwidth types
+	  DVB-T2 supports 5, 10 and 1.712 MHz
+	  Order of the enum values (new values after _AUTO)
+	  has been kept congruent with the one in the v4l
+	  API for consistency
+
+2014-10-07 10:37:33 +0200  Benjamin Gaignard <benjamin.gaignard@linaro.org>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: do not render twice the same buffer
+	  Do not try to render a buffer that is already being rendered.
+	  This happens typically during the initial rendering stage as the first
+	  buffer is rendered twice: first by preroll(), then by render().
+	  This commit avoids this assertion failure:
+	  CRITICAL: gst_wayland_compositor_acquire_buffer: assertion
+	  'meta->used_by_compositor == FALSE' failed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738069
+	  Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
+	  Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
+
+2014-07-24 16:53:53 +0200  Tifaine Inguere <tifaine.inguere@st.com>
+
+	* ext/wayland/wlwindow.c:
+	  waylandsink : Allow surface to catch input events
+	  If waylandsink is the owner of the display then it is in charge
+	  of catching input events on the surface.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733682
+	  Signed-off-by: Tifaine Inguere <tifaine.inguere@st.com>
+	  Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
+
+2014-07-02 13:29:55 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlbuffer.c:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	  waylandsink: take into account the case where a pool may be destroyed together with GstWlDisplay
+	  There are two cases covered here:
+	  1) The GstWlDisplay forces the release of the last buffer and the pool
+	  gets destroyed in this context, which means it unregisters all the
+	  other buffers from the GstWlDisplay as well and the display->buffers
+	  hash table gets corrupted because it is iterating.
+	  2) The pool and its buffers get destroyed concurrently from another
+	  thread while GstWlDisplay is finalizing and many things get corrupted.
+
+2014-07-01 11:43:20 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlbuffer.c:
+	* ext/wayland/wlbuffer.h:
+	* ext/wayland/wlvideoformat.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: stack the video subsurface into another subsurface that covers the whole render rectangle
+	  The main reason behind this is that when the video caps change and the video
+	  subsurface needs to resize and change position, the wl_subsurface.set_position
+	  call needs a commit in its parent in order to take effect. Previously,
+	  the parent was the application's surface, over which there is no control.
+	  Now, the parent is inside the sink, so we can commit it and change size smoothly.
+	  As a side effect, this also allows the sink to draw its black borders on
+	  its own, without the need for the application to do that. And another side
+	  effect is that this can now allow resizing the sink when it is in top-level
+	  mode and have it respect the aspect ratio.
+
+2014-06-20 16:24:36 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlshmallocator.c:
+	* ext/wayland/wlvideoformat.c:
+	* ext/wayland/wlvideoformat.h:
+	  waylandsink: rename video format conversion functions to indicate they are about wl_shm
+	  Needed to add linux_dmabuf format conversion functions later
+
+2014-06-23 17:27:01 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlbuffer.c:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	  waylandsink: remove the ugly gst_wl_display_stop() now that this mechanism is not needed anymore
+	  Because we no longer have a custom buffer pool that holds a reference
+	  to the display, there is no way for a cyclic reference to happen like
+	  before, so we no longer need to explicitly call a function from the
+	  display to release the wl_buffers.
+	  However, the general mechanism of registering buffers to the display
+	  and forcibly releasing them when the display is destroyed is still
+	  needed to avoid potential memory leaks. The comment in wlbuffer.c
+	  is updated to reflect the current situation.
+
+2014-06-23 16:40:02 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	* ext/wayland/wlshmallocator.c:
+	* ext/wayland/wlshmallocator.h:
+	  waylandsink: replace the custom buffer pool with an allocator
+	  This reduces the complexity of having a custom buffer pool, as
+	  we don't really need it. We only need the custom allocation part.
+	  And since the wl_buffer is no longer saved in a GstMeta, we can
+	  create it and add it on the buffers in the sink's render()
+	  function, which removes the reference cycle caused by the pool
+	  holding a reference to the display and also allows more generic
+	  scenarios (the allocator being used in another pool, or buffers
+	  being allocated without a pool [if anything stupid does that]).
+	  This commit also simplifies the propose_allocation() function,
+	  which doesn't really need to do all these complicated checks,
+	  since there is always a correct buffer pool available, created
+	  in set_caps().
+	  The other side effect of this commit is that a new wl_shm_pool
+	  is now created for every GstMemory, which means that we use
+	  as much shm memory as we actually need and no more. Previously,
+	  the created wl_shm_pool would allocate space for 15 buffers, no
+	  matter if they were being used or not.
+
+2014-06-20 14:47:57 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	* ext/wayland/wlbuffer.c:
+	* ext/wayland/wlbuffer.h:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	  waylandsink: rework the mechanism for keeping buffers out of the pool until wl_buffer::release
+	  This also removes the GstWlMeta and adds a wrapper class for wl_buffer
+	  which is saved in the GstBuffer qdata instead of being a GstMeta.
+	  The motivation behind this is mainly to allow attaching wl_buffers on
+	  GstBuffers that have not been allocated inside the GstWaylandBufferPool,
+	  so that if for example an upstream element is sending us a buffer
+	  from a different pool, which however does not need to be copied
+	  to a buffer from our pool because it may be a hardware buffer
+	  (hello dmabuf!), we can create a wl_buffer directly from it and first,
+	  attach it on it so that we don't have to re-create a wl_buffer every
+	  time the same GstBuffer arrives and second, force the whole mechanism
+	  for keeping the buffer out of the pool until there is a wl_buffer::release
+	  on that foreign GstBuffer.
+
+2014-10-09 08:20:15 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/schroedinger/gstschrodec.c:
+	  schrodec: optimize parse logic
+	  Header will be read each and everytime parse function will be called
+	  which is not necessary since until we have complete data,
+	  we need not parse the header again.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737984
+
+2014-10-10 13:05:49 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/fluidsynth/gstfluiddec.c:
+	  fluiddec: don't leak incoming caps event
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738291
+
+2014-10-09 18:18:02 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: fix framesize when input is frame-layer
+	  frame-layer header is represented as a sequence of 32 bit unsigned
+	  integer serialized in little-endian byte order, so framesize is on the
+	  first 3 bytes.
+	  SMPTE 421M Annex L.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738243
+
+2014-10-07 17:05:04 +0200  Antonio Ospite <ao2@ao2.it>
+
+	* gst/midi/midiparse.c:
+	  midiparse: mention fluiddec instead of fluidsynth
+	  The element name is actually fluiddec even if it uses fluidsynth.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738223
+
+2014-10-09 11:51:16 +0200  Antonio Ospite <ao2@ao2.it>
+
+	* ext/fluidsynth/gstfluiddec.c:
+	  fluiddec: fix some memory leaks
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738223
+
+2014-10-09 04:11:00 -0400  David Woodhouse <dwmw2@infradead.org>
+
+	* gst/pcapparse/gstpcapparse.c:
+	* gst/pcapparse/gstpcapparse.h:
+	  pcapparse: Add support for LINKTYPE_RAW
+	  Also, strictly speaking, these numbers aren't DLT_*; they are LINKTYPE_* because
+	  libpcap translates from internal OS-specific DLT_ numbering to the portable
+	  LINKTYPE_ number space when writing files.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738206
+
+2014-10-09 14:51:56 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* tests/check/elements/audiomixer.c:
+	  test: use G_GSIZE_FORMAT in audiomixer test
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738227
+
+2014-10-07 16:57:27 +1100  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/aggregator.c:
+	  tests/aggregator: add timeout handling test for the timeout parameter
+
+2014-10-06 21:46:24 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst/audiomixer/gstaudiomixer.c:
+	  aggregator: add latency query handling
+
+2014-10-06 18:33:52 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: support unresponsive pads
+	  Render unresponsive pads with the last video frame received.
+
+2014-10-06 18:23:03 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	  aggregator: add a timeout property determining buffer wait time
+	  Determines the amount of time that a pad will wait for a buffer before
+	  being marked unresponsive.
+	  Network sources may fail to produce buffers for an extended period of time,
+	  currently causing the pipeline to stall possibly indefinitely, waiting for
+	  these buffers to appear.
+	  Subclasses should render unresponsive pads with either silence (audio), the
+	  last (video) frame or what makes the most sense in the given context.
+
+2014-10-06 18:10:38 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  videoaggregator: remove the use of the queued buffer on sink pads
+	  That data is now held by the aggregator class
+
+2014-10-09 11:46:23 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/videoparsers/gsth265parse.c:
+	  h265parse: expose parsed profile, tier and level to downstream
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732239
+
+2014-10-09 01:18:16 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: expose parsed profile and level to downstream
+	  Set parsed profile and level in src caps.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732239
 
 2014-10-09 10:54:35 +0300  Sebastian Dröge <sebastian@centricular.com>
 
@@ -661,6 +18426,462 @@
 	  Without this our GL surface would be upscaled after rendering
 	  by Cocoa, which would reduce image quality.
 
+2014-10-09 12:28:11 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: output why we cannot convert a buffer
+
+2014-10-09 12:25:55 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: fix planar YUV download
+	  - sample the u and v planes properly
+	  - output the correctly scaled u and v planes for different chroma block sizes
+
+2014-10-08 21:51:12 +0300  Vivia Nikolaidou <n.vivia@gmail.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: And fix another unused variable compiler warning
+
+2014-10-08 21:49:25 +0300  Vivia Nikolaidou <n.vivia@gmail.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: Fix unused variable compiler warning when compiling without desktop GL
+
+2014-09-26 13:55:20 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* ext/zbar/gstzbar.c:
+	  zbar: Add YVU9 and YUV9 to ZBAR_YUV_CAPS
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737407
+
+2014-09-28 10:51:09 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* ext/gl/gltestsrc.c:
+	* ext/gl/gstgltestsrc.c:
+	  gltestsrc: implement checkers pattern with GLSL
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737505
+
+2014-10-07 15:24:10 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  hlsdemux: Fix M3U8 parsing unit test after API changes
+
+2014-10-02 10:37:57 -0600  Thomas Bluemel <tbluemel@control4.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: Fix accessing invalidated memory
+	  In gst_hls_demux_get_next_fragment() the next fragment URI gets
+	  stored in next_fragment_uri, but the gst_hls_demux_updates_loop()
+	  can at any time update the playlist, rendering this string invalid.
+	  Therefore, any data (like key, iv, URIs) that is taken from a
+	  GstM3U8Client needs to be copied. In addition, accessing the
+	  internals of a GstM3U8Client requires locking.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737793
+
+2014-10-07 12:12:04 +0200  Felix Schwarz <felix.schwarz@oss.schwarz.eu>
+
+	* gst-libs/gst/mpegts/gst-dvb-section.c:
+	* gst-libs/gst/mpegts/gstmpegts-private.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/mpegts.h:
+	  mpegts: fix typos in comments
+	  https://bugzilla.gnome.org/show_bug.cgi?id=738072
+
+2014-10-07 23:04:30 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: fix UYVY download green screen
+
+2014-10-07 22:50:22 +1100  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolrconvert: fix YUY2 download
+	  - The shader was outputing the wrong values compared with raw
+	  videotestsrc.
+	  - deal with the texture edge properly.
+	  - properly sample the 2x1 rectangle for the u and v values
+	  - don't double sample the y value
+
+2014-10-06 21:25:30 +0300  Vivia Nikolaidou <n.vivia@gmail.com>
+
+	* ext/curl/gstcurlsmtpsink.c:
+	  curlsmtpsink: Set CURLOPT_UPLOAD to 1 to not use VRFY and other unneeded commands
+	  Fixes the sink with SMTP servers that disable VRFY for spam protection.
+	  http://sourceforge.net/p/curl/bugs/1389/
+
+2014-09-17 16:48:02 +0200  Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Replace GMainContext with GAsyncQueue (v2)
+	  The previous implementation kept accumulating GSources,
+	  slowing down the iteration and leaking memory.
+	  Instead of trying to fix the main context flushing, replace
+	  it with a GAsyncQueue which is simple to flush and has
+	  less overhead.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736782
+
+2014-10-06 13:09:00 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	  audiomixer: Handle seek event in READY state
+
+2014-07-21 11:07:19 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	  audiomixer: Set the sinkpad segments basetime after seeking
+	  Otherwise stream offset and running time comparison will not be
+	  correct, leading to segfaults after seeks
+
+2014-05-28 16:29:37 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/audiomixer/Makefile.am:
+	* gst/audiomixer/gstaudiomixer.c:
+	* gst/audiomixer/gstaudiomixer.h:
+	* tests/check/elements/audiomixer.c:
+	  audiomixer: Port to GstAggregator
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737183
+	  Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+2014-09-23 15:59:10 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Do not wrongly set the aggregator.segment
+	  The aggregator.segment is not to be initialized by the subclasses but
+	  by the aggregator itself. Moreover, initializing it on start would make
+	  us loose the information coming from the initial seek.
+
+2014-07-30 11:57:46 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Make sure not to unref a NULL pointer
+
+2014-08-05 15:36:30 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Set seqnum only when segments are received.
+
+2014-08-02 18:25:01 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Add a streaming lock so to secure flush start action
+	  Without a lock that is taken in FLUSH_START we had a rare race where we
+	  end up aggregating a buffer that was before the whole FLUSH_START/STOP
+	  dance. That could lead to very wrong behaviour in subclasses.
+
+2014-07-18 13:58:55 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Query seeking when a seek failed to see if it was expected
+	  And do not worry if seeking failed on a stream that is not seekable
+
+2014-07-18 01:41:26 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: set future seqnum before propagating the seek event.
+	  So the seqnum is properly set for the following events.
+
+2014-07-08 16:16:55 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Store segment when seeked in READY for later use
+
+2014-10-06 16:44:51 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264plugin.c:
+	  openh264: Use a MARGINAL rank for the encoder and decoder
+	  They work but for now we prefer others until these are extensively tested.
+
+2014-10-01 10:57:26 +0200  Lihua Liu <lihual@axis.com>
+
+	* ext/curl/gstcurlsmtpsink.c:
+	  curlsmtpsink: Email with multipart content-type should end with a final boundary
+	  Add final boundary for each of the sending out emails from smtpsink.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736134
+
+2014-10-06 11:44:12 +0100  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/videoparsers/gstmpegvideoparse.c:
+	* gst/videoparsers/gstvc1parse.h:
+	  videoparser: comment unused GST_BASE_PARSE_FRAME_FLAG_PARSING
+	  GST_BASE_PARSE_FRAME_FLAG_PARSING value is wrong, and the same flag is
+	  not being used presently. Hence changing the value and commenting it out.
+	  This needs to be included in baseparse.h later on
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737411
+
+2014-10-04 20:55:08 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: make denoise work
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737894
+
+2014-10-06 10:11:47 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors
+
+2014-10-06 10:11:23 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Unref the taglist in GstAggregator::stop()
+
+2014-10-03 20:42:58 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add preliminary support for DTMB
+	  Previously known as DMB-T/H, this is the
+	  terrestial DTV broadcast standard currently
+	  used by the People's Republic of China,
+	  Hong Kong, Laos and Macau (officially),
+	  and by Malaysia, Iraq, Jordan, Syria and
+	  Lebanon (experimentally).
+
+2014-10-03 20:20:30 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing standard transmission modes
+	  These apply to ISDB-T, DVB-T2 and DTMB
+	  Order of the enum values (new rates after _AUTO)
+	  has been kept congruent with the one in the v4l
+	  API for consistency.
+
+2014-10-03 20:03:27 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing DTMB guard intervals
+
+2014-10-03 19:55:02 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing DVB-T2 guard intervals
+	  According to the v4l-dvb API docs, these are only
+	  used for DVB-T2 at the moment.
+	  Order of the enum values (new rates after _AUTO)
+	  has been kept congruent with the one in the v4l
+	  API for consistency.
+
+2014-10-03 19:20:03 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: fix typo in GstMpegtsExtendedEventDescriptor doc
+
+2014-10-03 19:06:21 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add _MUTABLE_PLAYING to tuning props
+	  The element can (re)tune while playing so basically
+	  every property used at set_fe_params() can be set
+	  in state <= PLAYING.
+
+2014-10-03 17:22:23 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: The codec can only do baseline so simplify the code a bit
+	  and declare this also on the srcpad caps.
+	  With baseline profile there are no B-frames or frame reordering.
+
+2014-10-03 17:20:28 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: On ::finish() stop trying if the decoder returned that no output is available
+
+2014-10-03 13:54:22 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264enc.cpp:
+	* ext/openh264/gstopenh264plugin.c:
+	  openh264: Run gst-indent over everything
+
+2014-10-03 13:52:32 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/Makefile.am:
+	  openh264: Remove unused codecparsers lib
+
+2014-10-02 16:46:25 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264: Add FIXME comment about missing API in openh264
+
+2014-10-02 16:33:30 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Try to handle frame reordering
+	  As openh264 has no way to attach any IDs to input frames that we then get on
+	  the output frames, we have to assume that the input has valid PTS. We just
+	  take the frame with the oldest PTS, and if there is no PTS information we take
+	  the one with the oldest DTS.
+
+2014-10-02 16:23:37 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Don't drop videocodec frames if we can't decode them *yet*
+	  Fixes jittery playback of streams with B frames.
+
+2014-10-02 16:21:37 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: GstVideoDecoder works on frames, not sub-frames (e.g. NALs)
+	  And we can just pass complete AUs to the decoder without problems.
+
+2014-10-02 16:19:46 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: As we require NAL alignment from upstream we don't need to parse anything
+
+2014-10-02 15:48:51 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Properly drain codec on ::finish()
+
+2014-10-02 15:22:14 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Properly drain the encoder on ::finish()
+
+2014-10-02 14:36:45 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: We always get a single frame as output, not a NAL
+	  No need to accumulate NALs.
+
+2014-10-02 14:20:21 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Fix up caps and stride handling
+
+2014-10-02 14:15:49 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Add support for GstVideoMeta
+	  This will allow upstream elements to work more efficiently.
+
+2014-10-02 14:12:11 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Add support for GstVideoMeta
+	  This will make operation with various sinks faster for free.
+
+2014-10-02 14:08:49 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Optimize frame copying a bit
+
+2014-10-02 14:06:58 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Don't forget to unref the input state
+
+2014-10-02 14:03:43 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Fix various crashes on ::stop()
+
+2014-10-02 14:00:06 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Remove invalid sprops-parameter-set handling
+	  This only exists on RTP caps, not H264 caps.
+
+2014-10-02 13:53:01 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264enc.cpp:
+	  openh264enc: Don't set caps manually
+	  This will break the order of events in GStreamer.
+
+2014-10-02 13:49:14 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/openh264/gstopenh264dec.cpp:
+	  openh264dec: Fix input state handling and propagation of upstream caps fields
+
+2014-10-03 13:45:26 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	* ext/Makefile.am:
+	* ext/openh264/Makefile.am:
+	* ext/openh264/gstopenh264dec.cpp:
+	* ext/openh264/gstopenh264dec.h:
+	* ext/openh264/gstopenh264enc.cpp:
+	* ext/openh264/gstopenh264enc.h:
+	* ext/openh264/gstopenh264plugin.c:
+	  openh264: Add OpenH264 based encoder/decoder elements
+	  These are the openh264 elements released under the BSD-2 license
+	  by Ericsson as part of the OpenWebRTC project.
+	  https://github.com/EricssonResearch/openwebrtc-gst-plugins
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737788
+
+2014-09-18 17:14:22 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Do not to release VIDEO_AGGREGATOR_LOCK while setting format info
+	  We should be able to always keep the VIDEO_AGGREGATOR_LOCK while
+	  negotiating caps, this patch introduce that change.
+	  That also implies that we do not need the SETCAPS_LOCK anymore because
+	  now VIDEO_AGGREGATOR_LOCK guarantees that setcaps is not called from
+	  several threads and the gst_aggregator_set_caps method is now
+	  protected.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735042
+
+2014-10-03 12:34:15 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Take lock to ensure set_caps is not called concurently
+	  Avoiding to be in an inconsistent state where we do not have
+	  actual negotiate caps set as srccaps and leading to point where we
+	  try to unref ->srccaps when they have already been set to NULL.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735042
+
+2014-09-29 10:15:39 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/aiff/aiffparse.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	* gst/coloreffects/gstchromahold.c:
+	* gst/dvdspu/gstdvdspu.c:
+	* gst/mpegtsmux/mpegtsmux.c:
+	* gst/mxf/mxfdemux.c:
+	* gst/rawparse/gstrawparse.c:
+	* gst/sdp/gstsdpdemux.c:
+	  gst: remove unnecessary GLIB_DISABLE_DEPRECATION_WARNINGS
+	  There are unnecessary definitions for disabling deprecation warnings.
+	  Since GLIB_DISABLE_DEPRECATION_WARNINGS is not needed anymore in these files,
+	  removing the same.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737559
+
+2014-10-01 16:19:02 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: unref caps when it is empty in renegotiate()
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737724
+
+2014-10-02 10:26:43 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Fix calculation of the frame size for COLOR_FormatYUV420Planar
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734156
+
+2014-10-01 17:22:59 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Also copy over the chroma siting and colorimetry when deciding on a conversion
+
+2014-10-01 17:18:05 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: Revert the last commit and handle resolutions differences properly
+	  This is about converting the format, not about converting any widths and
+	  heights. Subclasses are expected to handler different resolutions themselves,
+	  like the videomixers already do properly.
+
+2014-10-01 17:11:16 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: GstVideoConverter currently can't rescale and will assert
+	  Leads to ugly assertions instead of properly erroring out:
+	  CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
+
 2014-10-01 16:04:36 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
@@ -676,6 +18897,55 @@
 	  Don't update the screen until we redraw, this prevents flickering during
 	  scrolling, clipping, resizing, etc
 
+2014-10-01 00:53:59 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/fluidsynth/gstfluiddec.c:
+	  fluiddec: don't crash on 0-sized input buffers
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737658
+
+2014-09-30 14:58:06 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* configure.ac:
+	  gltransformation: requires graphene 1.0.0
+
+2014-09-25 17:01:31 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gstgltransformation.c:
+	  gltransformation: graphene multiplication order has changed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733510
+
+2014-09-30 20:39:36 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: update element documentation
+
+2014-09-30 18:26:34 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/libs/.gitignore:
+	* tests/check/libs/gstglcolorconvert.c:
+	  tests/glcolorconvert: do reorder checking for rgba formats
+
+2014-09-30 14:46:14 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: convert xRGB into ARGB properly
+	  The alpha channel might not be the last component so check which one
+	  it is in and clobber that one instead.
+
+2014-09-30 01:45:20 +1000  Matthew Waters <matthew@centricular.com>
+
+	* tests/check/libs/gstglmemory.c:
+	  tests/glmemory: add simple transfer test
+	  tests transferring to/from the GL with a 1x1 RGBA pixel.
+
+2014-09-30 01:38:05 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: unset the opposite corresponding transfer flags when mapped with write
+	  fixes consistency with consecutive gst_memory_map()'s with
+	  flags & GST_MAP_WRITE
+
 2014-09-29 09:33:42 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:
@@ -683,6 +18953,21 @@
 	  We have to update the GL viewport if the NSView is only partially
 	  visible. Otherwise the content of the frame will be visibly offset.
 
+2014-09-29 10:01:27 +0200  Jesper Larsen <knorr.jesper@gmail.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: do not discard on discont if PES start
+	  If a discontinuity in the stream is detected, data is discarded until
+	  a new PES starts. If the first packet after the discontinuity is also
+	  the start of a PES, there is no reason to discard the packets.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737569
+
+2014-07-31 22:57:40 +0100  David Waring <davidjw@rd.bbc.co.uk>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	  dash: Use GstUri to join URIs
+
 2014-09-29 10:49:46 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
@@ -716,6 +19001,174 @@
 	  We don't and can't use NSOpenGLView as it's supposed to be used and
 	  it gets into our way by being to clever in various situations.
 
+2014-09-29 08:54:29 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: Initialize variable
+	  Avoids the following warning:
+	  gstglcontext.c:647:58: error: 'prev' may be used uninitialized in
+	  this function [-Werror=maybe-uninitialized]
+
+2014-09-28 18:03:09 +0200  Josep Torra <n770galaxy@gmail.com>
+
+	* gst-libs/gst/video/Makefile.am:
+	  video: fix build in gst-uninstalled setup
+	  Include the base video lib appropriately and resort all of them as
+	  thaytan suggested.
+
+2014-09-29 00:23:57 +1000  Jan Schmidt <jan@centricular.com>
+
+	* tests/examples/gl/qt/qglwtextureshare/README:
+	* tests/examples/gl/qt/qglwtextureshare/gstthread.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/gstthread.h:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.h:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.pro:
+	  examples: Fix Qt/GL qglwtextureshare example for X11
+	  We need to pass the X11 display to GstGL or else it will
+	  use its own X11 Display pointer, and the GL Context won't get shared
+	  correctly on newer X servers
+
+2014-09-28 20:21:50 +1000  Jan Schmidt <jan@centricular.com>
+
+	* tests/examples/gl/qt/.gitignore:
+	* tests/examples/gl/qt/README:
+	* tests/examples/gl/qt/mousevideooverlay/main.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/mousevideooverlay.pro:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.h:
+	* tests/examples/gl/qt/mousevideooverlay/qrenderer.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/qrenderer.h:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/main.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.h:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/qglwidgetvideooverlay.pro:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.pro:
+	* tests/examples/gl/qt/videooverlay/Debug/videooverlay:
+	* tests/examples/gl/qt/videooverlay/videooverlay.pro:
+	* tests/examples/gl/qt/videooverlay/videovideooverlay.pro:
+	  examples: port GL/Qt examples to Qt5
+	  Update the GL Qt integration examples for Qt5 changes and for GstGL
+	  signal signature changes.
+
+2014-09-29 00:32:05 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: fixup error in sharegroup comment
+
+2014-09-29 00:27:30 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gltestsrc.c:
+	* ext/gl/gstgltestsrc.c:
+	  Revert accidental push: "gltestsrc: implement checkers pattern with GLSL"
+	  This reverts commit eae09179f0b4eb584c8fc7b6560d8fc8e86eed4c.
+
+2014-09-29 00:24:28 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: detect the sharegroup case where the context are in different chains
+	  In the end they will lead to the same root context in the tree so check that
+	  for equality.
+
+2014-09-28 10:51:09 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* ext/gl/gltestsrc.c:
+	* ext/gl/gstgltestsrc.c:
+	  gltestsrc: implement checkers pattern with GLSL
+
+2014-09-28 21:18:32 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: silence a warning with empty input caps
+	  discovered with the doublecube example
+	  gst_caps_get_features: assertion 'index < GST_CAPS_LEN (caps)' failed
+
+2014-09-28 20:37:04 +1000  Matthew Waters <matthew@centricular.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:
+	  examples/gl: update for signal signature change
+
+2014-09-28 16:58:42 +1000  Matthew Waters <matthew@centricular.com>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: don't create converters when the subclass doesn't want them
+	  fixes a critical with glvideomixer after
+	  35bd1969f912cecda0fb5df9595a005e6ddf4e7a
+	  CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
+
+2014-09-26 22:29:56 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: fix zero output frames with YUY2/UYVY
+	  also, be nice and disable blending for other elements
+
+2014-09-26 22:22:06 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: protect desktop gl specific tokens with #if
+
+2014-09-26 12:28:10 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgloverlay.c:
+	  gloverlay: free the image memory every time the location changes
+	  fixes a memory leak
+
+2014-09-25 20:48:59 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/Makefile.am:
+	  gloverlay: Include into the build with GLES2 only too
+
+2014-09-26 01:45:22 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgltestsrc.c:
+	  gltestsrc: free the shader on stop
+
+2014-09-26 01:34:54 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: fix blending with low-alpha sources
+	  We also need to apply the blend paramaters to the alpha channel otherwise
+	  the output of the blend will appear black at low alpha values (< 0.2).
+
+2014-09-26 01:14:35 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstgloverlay.h:
+	* ext/gl/gstopengl.c:
+	  gloverlay: reimplement everything
+	  - update for shaders
+	  - add alpha property
+	  - image placement properties shamelessly borrowed from gdkpixbufoverlay
+	  - image placement properties are GstController able
+	  - use GstGLMemory for the overlay image data
+	  - add support for gles2
+
+2014-09-25 16:04:33 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/dvdspu/gstdvdspu.c:
+	* gst/jp2kdecimator/jp2kcodestream.c:
+	* gst/jpegformat/gstjifmux.c:
+	* gst/nuvdemux/gstnuvdemux.c:
+	* gst/videoparsers/gsth265parse.c:
+	* gst/videoparsers/gstmpeg4videoparse.c:
+	  style: remove unnecessary break statements
+	  Code flow never arrives to these break statements due to the gotos preceding
+	  them. So the breaks are unnecessary, as discussed in bug 736942.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737370
+
+2014-09-25 15:45:57 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* ext/mpeg2enc/gstmpeg2enc.cc:
+	  mpeg2enc: break statement unnecessary
+	  Code flow never arrives to the break statements due to the goto's. So the
+	  breaks are unnecessary.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736942
+
 2014-09-25 16:13:19 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h:
@@ -728,16 +19181,294 @@
 	* gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m:
 	  gl/cocoa: Clear the current GL context when it should happen
 
-2014-10-14 09:58:47 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-09-24 12:42:23 +0200  Lihua Liu <lihual@axis.com>
 
-	* configure.ac:
-	  applemedia: VideoToolbox works properly on iOS now
+	* ext/curl/gstcurlsmtpsink.c:
+	  curlsmtpsink: Email with multipart content-type should end with a final boundary
+	  Add final boundary for each of the sending out emails from smtpsink.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736134
 
-2014-10-14 09:19:59 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-09-25 10:14:41 +0200  Stefan Sauer <ensonic@users.sf.net>
 
-	* sys/applemedia/vtdec.c:
-	  vtdec: Set reorder length to 0 if we can't calculate it
-	  Instead of leaving it at whatever value it had before.
+	* ext/curl/gstcurlbasesink.c:
+	* ext/curl/gstcurlhttpsink.c:
+	  curl*sink: add more logging
+
+2014-09-25 08:05:50 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurlbasesink.c:
+	  curlbasesink: add a debug function
+	  If gstreamer is build with logging enabled, add a debug function and output
+	  verbose messages to the log instead of stderr.
+
+2014-09-24 22:24:49 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurlhttpsink.c:
+	  curlhttpsink: only add content-disposition header if a filename is set
+	  The header is optional and therefore we better omit it if we don't have a filename.
+
+2014-09-24 22:06:21 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurlbasesink.c:
+	  curlbasesink: don't replace specific error messages with a generic one
+	  Only set an error if we haven't set one already.
+
+2014-09-24 21:07:20 +0200  Stefan Sauer <ensonic@users.sf.net>
+
+	* ext/curl/gstcurltlssink.c:
+	  curltlssink: swap check
+	  Lets check for NULL first, as that is the default anyway.
+
+2014-07-29 16:12:26 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: Return flushing if we get chained while being set to READY
+	  Or not negotiated in the case we would be actually not negotiated
+	  Currently we are getting assertions from
+	  gst_pb_utils_add_codec_description_to_tag_list because of NULL
+	  caps.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737186
+
+2014-09-09 13:12:31 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: mark first buffer as discont after restarting a download task
+	  Mark first buffer as discont after restarting a download task, so
+	  downstream can reset its state to properly handle the new fragment.
+	  Related issue: https://bugzilla.gnome.org/show_bug.cgi?id=736318
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736319
+
+2014-09-19 22:32:39 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: push a time segment when restarting streaming
+	  This should inform demuxers/decoders downstream that the stream is
+	  about to start from a new position and they should flush accordingly
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736319
+
+2014-09-24 16:55:49 +0200  Wim Taymans <wtaymans@redhat.com>
+
+	* 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/videoconvert.c:
+	* gst-libs/gst/video/videoconvert.h:
+	  video: use video lib conversion code instead of copy
+
+2014-09-18 17:26:37 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* ext/mplex/gstmplex.cc:
+	  mplex: break statement unnecessary
+	  One more code flow issue where it never arrives to the break statement due to
+	  the goto. So the break is unnecessary.
+	  Plus two coding style fixes.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736895
+
+2014-09-24 22:42:58 +1000  Jan Schmidt <thaytan@noraisin.net>
+
+	* gst/debugutils/gstchopmydata.c:
+	  chopmydata: Transfer timestamps to output buffers
+	  Allows using chopmydata as a simple repacketizer
+
+2014-09-19 09:51:48 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	  androidmedia: break statements unnecessary
+	  Code flow never arrives to the break statements due to the goto's. So the
+	  breaks are unecessary. Second part to commit a3958ae65b
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736940
+
+2014-09-19 09:59:41 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* sys/androidmedia/gstamcvideodec.c:
+	  androidmedia: break statement unnecessary
+	  Code flow never arrives to the break statements due to the goto's. So the
+	  breaks are unecessary.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736942
+
+2014-09-18 16:13:58 -0400  Joshua M. Doe <oss@nvl.army.mil>
+
+	* sys/dshowsrcwrapper/gstdshow.cpp:
+	* sys/dshowsrcwrapper/gstdshow.h:
+	* sys/dshowsrcwrapper/gstdshowaudiosrc.cpp:
+	* sys/dshowsrcwrapper/gstdshowvideosrc.cpp:
+	  dshowsrcwrapper: avoid error when set_caps called twice
+	  If set_caps is called in a running state, return immediately if the caps
+	  haven't changed. If the pins are already connected, disconnect them.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736926
+
+2014-09-24 14:29:37 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: skip input frames with an alpha of 0
+
+2014-09-24 13:13:19 +1000  Matthew Waters <matthew@centricular.com>
+
+	* ext/gl/gstglmixer.c:
+	* ext/gl/gstglmixer.h:
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltestsrc.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglfilter.h:
+	  gl: download whenever we have sysmem capsfeatures
+	  Otherwise we could pass on a RGBA formatted buffer and downstream would
+	  misinterpret that as some other video format.
+	  Fixes pipelines of the form
+	  gleffects ! tee ! xvimagesink
+
+2014-09-19 01:22:14 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in:
+	  gsettings: Fix typo in description
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736933
+
+2014-09-23 17:32:59 +0100  Luis de Bethencourt <luis.bg@samsung.com>
+
+	* gst/mpegpsmux/psmuxstream.c:
+	  mpegpsmux: refactor duplicate else branches
+	  Unknown case should assert if reached instead of just assuming the max buffer
+	  size.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736460
+
+2014-09-19 09:54:11 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: initialize sent_codec_tag before using it
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736951
+
+2014-09-22 17:14:29 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/videofilters/gstzebrastripe.c:
+	  videofilters: Add support for more YUV formats
+	  https://bugzilla.gnome.org/show_bug.cgi?id=737111
+
+2014-08-21 02:14:40 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltestsrc.h:
+	  gltestsrc: add Mandelbrot fractal pattern.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735131
+
+2014-08-21 02:13:58 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gltestsrc.c:
+	* ext/gl/gltestsrc.h:
+	* ext/gl/gstgltestsrc.c:
+	* ext/gl/gstgltestsrc.h:
+	  gltestsrc: implement snow pattern with GLSL.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735131
+
+2014-09-23 12:02:18 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: fallback to upload if contexts cannot share GL resources
+	  Fixes pipelines of the form
+	  gleffects ! tee ! glimagesink
+	  as tee does not pass on the allocation query.
+
+2014-09-23 12:01:04 +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:
+	  glcontext: add gst_gl_context_can_share
+	  Which determines whether two GstGLContext's can share sharable
+	  OpenGL resources.
+
+2014-09-22 20:01:27 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/check/libs/gstglupload.c:
+	  gl/tests: update for upload API changes
+
+2014-09-22 10:08:17 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl: Let gst_gl_context_get_thread() return a new reference to the GThread
+	  Otherwise it might go away in the meantime and the caller has some random pointer.
+
+2014-09-22 11:10:42 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl: consecutive return, break statement
+	  Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736939
+
+2014-09-22 12:21:22 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/glprototypes/debug.h:
+	  gl/debug: desktop GL does not have the KHR suffixes
+
+2014-09-22 11:59:30 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/gtk/fxtest/fxtest.c:
+	* tests/examples/gl/gtk/gtkvideooverlay/main.cpp:
+	  examples/gl/gtk: use the sync bus callback to set the window handle
+	  And output error messages.
+
+2014-09-19 18:59:01 -0300  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add missing FEC rates
+	  Order of the enum values (new rates after _AUTO)
+	  has been kept congruent with the one in the v4l
+	  API for consistency.
+
+2014-09-21 13:32:29 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl: add since markers for new API
+
+2014-09-21 21:42:41 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: add debug line for freeing textures
+
+2014-09-21 21:36:49 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	* ext/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	  glupload: provide the output buffer that is rendered into
+	  Allows callers to properly reference count the buffers used for
+	  rendering.
+	  Fixes a redraw race in glimagesink where the previous buffer
+	  (the one used for redraw operations) is freed as soon as the next
+	  buffer is uploaded.
+	  1. glimagesink uploads in _prepare() to texture n
+	  1.1 glupload holds buffer n
+	  2. glimagesink _render()s texture n
+	  3. glimagesink uploads texture n+1
+	  3.1 glupload free previous buffer which deletes texture n
+	  3.2 glupload holds buffer n+1
+	  4. glwindow resize/expose
+	  5. glimagesink redraws with texture n
+	  The race is that the buffer n (the one used for redrawing) is freed as soon as
+	  the buffer n+1 arrives.  There could be any amount of time and number of
+	  redraws between this event and when buffer n+1 is actually rendered and thus
+	  replaces buffer n as the redraw source.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736740
+
+2014-09-21 21:30:58 +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:
+	  glcontext: add API to retreive the thread that context is active in
+
+2014-09-19 15:32:33 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmixer.c:
+	  gl: Removed unreachable break, unused variable
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736957
 
 2014-09-19 14:36:39 +0300  Sebastian Dröge <sebastian@centricular.com>
 
@@ -756,6 +19487,77 @@
 	  Our buffers claim to be writable so other elements expect to be able
 	  to write there without losing their changes.
 
+2014-09-18 18:16:59 +0200  Philippe Normand <philn@igalia.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: lock client mutex before entering the retry_failover block
+	  This is consistent with the case where the block execution is
+	  triggered by the goto invoked after the current_variant update.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736919
+
+2014-09-12 02:36:47 -0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	* ext/smoothstreaming/gstmssdemux.h:
+	  mssdemux: synchronize with the download loop thread to signal it to continue
+	  If EOS or ERROR happens before the download loop thread has reached its
+	  g_cond_wait() call, then the g_cond_signal doesn't have any effect and
+	  the download loop thread stucks later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735663
+
+2014-09-12 02:35:44 -0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: synchronize with the download loop thread to signal it to continue
+	  If EOS or ERROR happens before the download loop thread has reached its
+	  g_cond_wait() call, then the g_cond_signal doesn't have any effect and
+	  the download loop thread stucks later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735663
+
+2014-08-29 12:38:12 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: synchronize with the download loop thread to signal it to continue
+	  If EOS or ERROR happens before the download loop thread has reached its
+	  g_cond_wait() call, then the g_cond_signal doesn't have any effect and
+	  the download loop thread stucks later.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735663
+
+2014-09-17 17:27:53 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: fix clearing of eos state in pads
+	  The internal pad still keeps its EOS flag and event as it can be assigned
+	  after the flush-start/stop pair is sent. The EOS is assigned from the streaming
+	  thread so this is racy.
+	  To be sure to clear it, it has to be done after setting the source to READY to
+	  be sure that its streaming thread isn't running.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
+2014-09-17 17:27:25 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: fix clearing of eos state in pads
+	  The internal pad still keeps its EOS flag and event as it can be assigned
+	  after the flush-start/stop pair is sent. The EOS is assigned from the streaming
+	  thread so this is racy.
+	  To be sure to clear it, it has to be done after setting the source to READY to
+	  be sure that its streaming thread isn't running.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
+2014-09-17 14:51:53 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix clearing of eos state in pads
+	  The internal pad still keeps its EOS flag and event as it can be assigned
+	  after the flush-start/stop pair is sent. The EOS is assigned from the streaming
+	  thread so this is racy.
+	  To be sure to clear it, it has to be done after setting the source to READY to
+	  be sure that its streaming thread isn't running.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
 2014-09-18 17:49:46 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/vtenc.c:
@@ -774,6 +19576,25 @@
 	  vtenc: Expected duration is supposed to be the duration of the stream, not a frame
 	  Just don't set it for now, it isn't really needed.
 
+2014-09-18 11:39:53 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* tests/check/libs/vc1parser.c:
+	  vc1parser: add unit test for sequence-layer parsing
+	  Check that a sequence-layer header is successfully parsed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736871
+
+2014-09-18 11:49:13 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst-libs/gst/codecparsers/gstvc1parser.c:
+	  vc1parser: take care of endianness when parsing sequence-layer
+	  sequence-layer is serialized in little-endian byte order except for
+	  STRUCT_C which is serialized in big-endian byte order.
+	  But since STRUCT_A and STRUCT_B fields are defined as unsigned int msb
+	  first, we have to pass them as big-endian to their parsing function. So
+	  we basically use temporary buffers to convert them in big-endian.
+	  See SMPTE 421M Annex J and L.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736871
+
 2014-09-18 13:11:05 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/vtenc.c:
@@ -781,6 +19602,45 @@
 	  vtenc: Properly handle keyframes
 	  Especially set the SYNC_POINT flag on keyframes.
 
+2014-09-18 14:24:13 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: removed an unwanted initialization and a variable
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736863
+
+2014-09-17 12:24:39 +0200  Jerome Laheurte <jlaheurte@quividi.com>
+
+	* sys/dshowsrcwrapper/BUILD.txt:
+	* sys/dshowsrcwrapper/CMakeLists.txt:
+	* sys/dshowsrcwrapper/gstdshow.cpp:
+	* sys/dshowsrcwrapper/gstdshowaudiosrc.cpp:
+	* sys/dshowsrcwrapper/gstdshowaudiosrc.h:
+	* sys/dshowsrcwrapper/gstdshowfakesink.cpp:
+	* sys/dshowsrcwrapper/gstdshowvideosrc.cpp:
+	* sys/dshowsrcwrapper/gstdshowvideosrc.h:
+	  dshowsrcwrapper: Port to 1.0
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732283
+
+2014-09-18 12:53:11 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  camerabin2: removed redundant initialization
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736853
+
+2014-09-17 15:50:23 +0530  Anuj Jaiswal <anuj.jaiswal@samsung.com>
+
+	* ext/faad/gstfaad.c:
+	  faad: logical disjunction consecutive return, break unnecessary
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736790
+
+2014-09-17 11:49:22 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: enable header-format conversion
+	  In fact we support header-format conversion which is done in
+	  update_caps() method.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736786
+
 2014-09-18 10:30:04 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/vtdec.c:
@@ -841,6 +19701,24 @@
 	* sys/applemedia/vth264encbin.h:
 	  applemedia: Remove old code that is of no use anymore
 
+2014-09-16 17:38:53 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: forge sequence-layer from seq_hdr instead of seq_layer
+	  If we don't have a seq_layer_buffer, we also don't have a valid
+	  seq_layer because there are set together in
+	  gst_vc1_parse_handle_seq_layer().
+	  So when output header format is sequence-layer and when we don't have a
+	  seq_layer_buffer, we forge one from seq_hdr.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736781
+
+2014-09-17 10:39:26 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  applemedia: Unconditionally use VideoToolbox on iOS if available
+	  Because we do weak linking now we can always compile it in and check at
+	  runtime if it is actually available or not.
+
 2014-09-17 10:38:20 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/Makefile.am:
@@ -849,6 +19727,21 @@
 	  It does not exist on older OSX and iOS but we still want to
 	  be able to use it when it's available.
 
+2014-09-16 12:06:35 +0200  Ognyan Tonchev <ognyan@axis.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: do not leak buffer pool in error case
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736735
+
+2014-09-16 15:59:58 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gstvc1parse.c:
+	  vc1parse: fix sequence-layer/frame-layer endianness
+	  Sequence-layer and frame-layer are serialized in little-endian byte
+	  order except for STRUCT_C and framedata fields as described in SMPTE 421M Annex
+	  L.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736750
+
 2014-09-16 16:51:28 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/vtenc.c:
@@ -883,575 +19776,6 @@
 	  vtenc: Port to the real VideoToolbox API instead of using our dlopen() wrapper
 	  It's a public framework since a long time.
 
-2014-10-09 01:18:16 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
-
-	* gst/videoparsers/gsth264parse.c:
-	  h264parse: expose parsed profile and level to downstream
-	  Set parsed profile and level in src caps.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=732239
-
-2014-10-09 11:46:23 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* gst/videoparsers/gsth265parse.c:
-	  h265parse: expose parsed profile, tier and level to downstream
-	  https://bugzilla.gnome.org/show_bug.cgi?id=732239
-
-2014-10-06 21:25:30 +0300  Vivia Nikolaidou <n.vivia@gmail.com>
-
-	* ext/curl/gstcurlsmtpsink.c:
-	  curlsmtpsink: Set CURLOPT_UPLOAD to 1 to not use VRFY and other unneeded commands
-	  Fixes the sink with SMTP servers that disable VRFY for spam protection.
-	  http://sourceforge.net/p/curl/bugs/1389/
-
-2014-10-06 10:11:47 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* gst-libs/gst/video/gstvideoaggregator.c:
-	  videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors
-
-2014-10-06 10:11:23 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* gst-libs/gst/base/gstaggregator.c:
-	  aggregator: Unref the taglist in GstAggregator::stop()
-
-2014-10-01 16:19:02 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: unref caps when it is empty in renegotiate()
-	  https://bugzilla.gnome.org/show_bug.cgi?id=737724
-
-2014-10-02 10:26:43 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/androidmedia/gstamc.c:
-	  androidmedia: Fix calculation of the frame size for COLOR_FormatYUV420Planar
-	  https://bugzilla.gnome.org/show_bug.cgi?id=734156
-
-2014-10-01 00:53:59 +0100  Tim-Philipp Müller <tim@centricular.com>
-
-	* ext/fluidsynth/gstfluiddec.c:
-	  fluiddec: don't crash on 0-sized input buffers
-	  https://bugzilla.gnome.org/show_bug.cgi?id=737658
-
-2014-09-30 14:58:06 +0200  Lubosz Sarnecki <lubosz@gmail.com>
-
-	* configure.ac:
-	  gltransformation: requires graphene 1.0.0
-
-2014-09-29 10:01:27 +0200  Jesper Larsen <knorr.jesper@gmail.com>
-
-	* gst/mpegtsdemux/tsdemux.c:
-	  tsdemux: do not discard on discont if PES start
-	  If a discontinuity in the stream is detected, data is discarded until
-	  a new PES starts. If the first packet after the discontinuity is also
-	  the start of a PES, there is no reason to discard the packets.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=737569
-
-2014-09-09 13:12:31 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
-
-	* ext/dash/gstdashdemux.c:
-	* ext/dash/gstdashdemux.h:
-	  dashdemux: mark first buffer as discont after restarting a download task
-	  Mark first buffer as discont after restarting a download task, so
-	  downstream can reset its state to properly handle the new fragment.
-	  Related issue: https://bugzilla.gnome.org/show_bug.cgi?id=736318
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736319
-
-2014-09-19 22:32:39 -0300  Thiago Santos <thiagoss@osg.samsung.com>
-
-	* ext/dash/gstdashdemux.c:
-	  dashdemux: push a time segment when restarting streaming
-	  This should inform demuxers/decoders downstream that the stream is
-	  about to start from a new position and they should flush accordingly
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736319
-
-2014-10-09 12:28:11 +1100  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcolorconvert.c:
-	  glcolorconvert: output why we cannot convert a buffer
-
-2014-10-09 12:25:55 +1100  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcolorconvert.c:
-	  glcolorconvert: fix planar YUV download
-	  - sample the u and v planes properly
-	  - output the correctly scaled u and v planes for different chroma block sizes
-
-2014-10-07 23:04:30 +1100  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcolorconvert.c:
-	  glcolorconvert: fix UYVY download green screen
-
-2014-10-07 22:50:22 +1100  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcolorconvert.c:
-	  glcolrconvert: fix YUY2 download
-	  - The shader was outputing the wrong values compared with raw
-	  videotestsrc.
-	  - deal with the texture edge properly.
-	  - properly sample the 2x1 rectangle for the u and v values
-	  - don't double sample the y value
-
-2014-09-25 17:01:31 +0200  Lubosz Sarnecki <lubosz@gmail.com>
-
-	* ext/gl/gstgltransformation.c:
-	  gltransformation: graphene multiplication order has changed
-	  https://bugzilla.gnome.org/show_bug.cgi?id=733510
-
-2014-09-22 10:08:17 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* gst-libs/gst/gl/gstglcontext.c:
-	  gl: Let gst_gl_context_get_thread() return a new reference to the GThread
-	  Otherwise it might go away in the meantime and the caller has some random pointer.
-	  Conflicts:
-	  gst-libs/gst/gl/gstglcontext.c
-
-2014-09-30 14:46:14 +1000  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcolorconvert.c:
-	  glcolorconvert: convert xRGB into ARGB properly
-	  The alpha channel might not be the last component so check which one
-	  it is in and clobber that one instead.
-
-2014-09-30 01:38:05 +1000  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglmemory.c:
-	  glmemory: unset the opposite corresponding transfer flags when mapped with write
-	  fixes consistency with consecutive gst_memory_map()'s with
-	  flags & GST_MAP_WRITE
-
-2014-09-29 08:54:29 +0200  Edward Hervey <bilboed@bilboed.com>
-
-	* gst-libs/gst/gl/gstglcontext.c:
-	  glcontext: Initialize variable
-	  Avoids the following warning:
-	  gstglcontext.c:647:58: error: 'prev' may be used uninitialized in
-	  this function [-Werror=maybe-uninitialized]
-
-2014-09-29 00:32:05 +1000  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcontext.c:
-	  glcontext: fixup error in sharegroup comment
-
-2014-09-29 00:24:28 +1000  Matthew Waters <matthew@centricular.com>
-
-	* gst-libs/gst/gl/gstglcontext.c:
-	  glcontext: detect the sharegroup case where the context are in different chains
-	  In the end they will lead to the same root context in the tree so check that
-	  for equality.
-
-2014-09-23 12:02:18 +1000  Matthew Waters <ystreet00@gmail.com>
-
-	* gst-libs/gst/gl/gstglupload.c:
-	  glupload: fallback to upload if contexts cannot share GL resources
-	  Fixes pipelines of the form
-	  gleffects ! tee ! glimagesink
-	  as tee does not pass on the allocation query.
-
-2014-09-23 12:01:04 +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:
-	  glcontext: add gst_gl_context_can_share
-	  Which determines whether two GstGLContext's can share sharable
-	  OpenGL resources.
-	  Conflicts:
-	  gst-libs/gst/gl/gstglcontext.c
-
-2014-09-21 21:30:58 +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:
-	  glcontext: add API to retreive the thread that context is active in
-
-2014-09-24 14:29:37 +1000  Matthew Waters <matthew@centricular.com>
-
-	* ext/gl/gstglvideomixer.c:
-	  glvideomixer: skip input frames with an alpha of 0
-
-2014-09-24 13:13:19 +1000  Matthew Waters <matthew@centricular.com>
-
-	* ext/gl/gstglmixer.c:
-	* ext/gl/gstglmixer.h:
-	* ext/gl/gstgltestsrc.c:
-	* ext/gl/gstgltestsrc.h:
-	* gst-libs/gst/gl/gstglfilter.c:
-	* gst-libs/gst/gl/gstglfilter.h:
-	  gl: download whenever we have sysmem capsfeatures
-	  Otherwise we could pass on a RGBA formatted buffer and downstream would
-	  misinterpret that as some other video format.
-	  Fixes pipelines of the form
-	  gleffects ! tee ! xvimagesink
-
-2014-09-29 11:44:54 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* configure.ac:
-	  configure: Don't build VideoToolbox elements on iOS for now
-	  They're only ported properly in master.
-
-2014-09-26 01:34:54 +1000  Matthew Waters <matthew@centricular.com>
-
-	* ext/gl/gstglvideomixer.c:
-	  glvideomixer: fix blending with low-alpha sources
-	  We also need to apply the blend paramaters to the alpha channel otherwise
-	  the output of the blend will appear black at low alpha values (< 0.2).
-
-2014-07-29 16:12:26 +0200  Thibault Saunier <tsaunier@gnome.org>
-
-	* gst/videoparsers/gsth264parse.c:
-	  h264parse: Return flushing if we get chained while being set to READY
-	  Or not negotiated in the case we would be actually not negotiated
-	  Currently we are getting assertions from
-	  gst_pb_utils_add_codec_description_to_tag_list because of NULL
-	  caps.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=737186
-
-=== release 1.4.3 ===
-
-2014-09-24 12:43:28 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* ChangeLog:
-	* NEWS:
-	* RELEASE:
-	* configure.ac:
-	* 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-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:
-	* win32/common/config.h:
-	  Release 1.4.3
-
-2014-09-24 11:44:54 +0300  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-09-19 09:54:11 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: initialize sent_codec_tag before using it
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736951
-
-=== release 1.4.2 ===
-
-2014-09-19 14:48:05 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* ChangeLog:
-	* NEWS:
-	* RELEASE:
-	* configure.ac:
-	* 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-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:
-	* win32/common/config.h:
-	  Release 1.4.2
-
-2014-09-16 15:59:58 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst/videoparsers/gstvc1parse.c:
-	  vc1parse: fix sequence-layer/frame-layer endianness
-	  Sequence-layer and frame-layer are serialized in little-endian byte
-	  order except for STRUCT_C and framedata fields as described in SMPTE 421M Annex
-	  L.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736750
-
-2014-09-19 11:24:35 +0300  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-09-19 10:01:23 +0300  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:
-	  po: Update translations
-
-2014-09-18 18:16:59 +0200  Philippe Normand <philn@igalia.com>
-
-	* ext/hls/gsthlsdemux.c:
-	  hlsdemux: lock client mutex before entering the retry_failover block
-	  This is consistent with the case where the block execution is
-	  triggered by the goto invoked after the current_variant update.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736919
-
-2014-09-18 11:39:53 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* tests/check/libs/vc1parser.c:
-	  vc1parser: add unit test for sequence-layer parsing
-	  Check that a sequence-layer header is successfully parsed.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736871
-
-2014-09-18 11:49:13 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
-
-	* gst-libs/gst/codecparsers/gstvc1parser.c:
-	  vc1parser: take care of endianness when parsing sequence-layer
-	  sequence-layer is serialized in little-endian byte order except for
-	  STRUCT_C which is serialized in big-endian byte order.
-	  But since STRUCT_A and STRUCT_B fields are defined as unsigned int msb
-	  first, we have to pass them as big-endian to their parsing function. So
-	  we basically use temporary buffers to convert them in big-endian.
-	  See SMPTE 421M Annex J and L.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736871
-
-2014-09-16 12:06:35 +0200  Ognyan Tonchev <ognyan@axis.com>
-
-	* ext/wayland/gstwaylandsink.c:
-	  waylandsink: do not leak buffer pool in error case
-	  https://bugzilla.gnome.org/show_bug.cgi?id=736735
-
 2014-09-16 11:42:34 +0200  Ognyan Tonchev <ognyan@axis.com>
 
 	* gst-libs/gst/gl/gstglfilter.c:
@@ -1482,6 +19806,36 @@
 	  glmixer: do not leak pool in error cases
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736729
 
+2014-09-16 13:21:22 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/vmnc/vmncdec.c:
+	  vmncdec: modify wrong packetized mode logic
+	  packetized mode is being set when framerate is being set
+	  which is not correct. Changing the same by checking the
+	  input segement format. If input segment is in TIME it is
+	  Packetized, and if it is in BYTES it is not.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736252
+
+2014-09-16 11:24:37 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/webp/gstwebpdec.c:
+	  webpdec: Remove unused variable
+
+2014-09-16 13:19:25 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* ext/webp/gstwebpdec.c:
+	  webpdec: modify wrong packetized mode logic
+	  packetized mode is being set when framerate is being set
+	  which is not correct. Changing the same by checking the
+	  input segement format. If input segment is in TIME it is
+	  Packetized, and if it is in BYTES it is not.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736252
+
+2014-09-16 01:15:31 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/elements/templatematch.c:
+	  templatematch: Compare the correct loop variables
+
 2014-09-15 15:42:41 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* sys/applemedia/vtdec.c:
@@ -1504,11 +19858,6 @@
 	  applemedia: Don't include VideoToolbox on iOS < 8.0
 	  It's private API and does not work without a jailbroken device.
 
-2014-09-13 20:49:16 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* sys/applemedia/vtdec.c:
-	  vtdec: Fix compilation on iOS 8.0
-
 2014-09-15 13:33:45 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/hls/gsthlsdemux.c:
@@ -1517,15 +19866,20 @@
 	  has failed once. We should also do that if it failed a second or third time,
 	  chances are that the playlist was updated now and contains new URIs.
 
+2014-09-15 11:59:32 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dash: Actually retry 3 times as advertised instead of 2
+
 2014-09-15 11:59:19 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/hls/gsthlsdemux.c:
 	  hls: Actually retry 3 times as advertised instead of 2
 
-2014-09-15 11:59:32 +0300  Sebastian Dröge <sebastian@centricular.com>
+2014-09-13 20:49:16 +0300  Sebastian Dröge <sebastian@centricular.com>
 
-	* ext/dash/gstdashdemux.c:
-	  dash: Actually retry 3 times as advertised instead of 2
+	* sys/applemedia/vtdec.c:
+	  vtdec: Fix compilation on iOS 8.0
 
 2014-09-11 14:36:31 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
 
@@ -1542,6 +19896,20 @@
 	  See SMPTE 421M Annex L for more details about sequence layer format.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736474
 
+2014-09-12 14:49:44 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: Use proper variable for delivery system
+	  We want to check the delivery system is ISDBT (and not the modulation
+	  which we check later in that case).
+	  CID #1238439
+
+2014-09-12 09:30:04 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix trivial coding style issue
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736531
+
 2014-09-11 18:33:20 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
 
 	* gst/mpegtsdemux/pesparse.h:
@@ -1554,6 +19922,22 @@
 	  So use a guint32 instead of a guint16 to avoid overflow.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736490
 
+2014-09-10 15:39:44 -0300  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: improve position detection when a download restart
+	  Query other src pads before falling back to the position of the last
+	  known pushed segment (which can be far ahead in time).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736421
+
+2014-09-10 15:43:05 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: improve position detection when a download restart
+	  Query other src pads before falling back to the position of the last
+	  known pushed segment (which can be far ahead in time).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736421
+
 2014-09-11 16:21:30 +0400  Belozorov Semen <skiminokD@gmail.com>
 
 	* gst/mpegpsmux/mpegpsmux_h264.c:
@@ -1561,18 +19945,110 @@
 	  Fix memory leak for input stream with caps "video/x-h264,stream-format=avc".
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736426
 
+2014-09-10 19:27:27 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/aiff/aiffmux.c:
+	  aiffmux: allocate byte writer on stack
+
+2014-09-10 19:19:32 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/asfmux/gstasfobjects.c:
+	* gst/asfmux/gstasfparse.c:
+	  asfmux: allocate byte readers on the stack
+
 2014-09-10 10:58:03 +0200  Jesper Larsen <knorr.jesper@gmail.com>
 
 	* gst/mpegtsdemux/mpegtspacketizer.c:
 	  tsdemux: clear mutex resources in dispose
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736390
 
+2014-09-10 17:24:39 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/mpg123/gstmpg123audiodec.c:
+	* ext/opus/gstopusdec.c:
+	* gst/adpcmenc/adpcmenc.c:
+	* sys/opensles/openslessrc.c:
+	* sys/uvch264/gstuvch264_src.c:
+	  Fix up one-element lists in template caps
+
 2014-09-10 16:38:52 +0100  Tim-Philipp Müller <tim@centricular.com>
 
 	* sys/applemedia/avfvideosrc.m:
 	  avfvideosrc: fix bogus BGRA caps
 	  Remove 0.10-style endianness/*_mask/bpp/depth fields.
 
+2014-09-10 19:16:53 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* configure.ac:
+	  build: don't AC_SUBST intermediate values
+
+2014-09-09 12:01:47 +0200  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.h:
+	  GstGLWindow: Introduce navigation thread
+	  This thread dispatches navigation events. It is needed to avoid deadlocks
+	  between window backend threads that emit navigation events (e.g. X11/GMainLoop
+	  thread) and consumers of navigation events such as glimagesink, see
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733661
+	  GstGlWindow_x11 thread is changed to invoke the navigation thread for navigation
+	  dispatching, instead of emiting the event itself. Othe backends beside X11 do
+	  not dispatch navigation events yet, but should use this thread when dispatching
+	  these events in the future.
+	  The navigation thread is currently part of GstGLWindow and not implemented in
+	  separate subclasses / backends. This will be needed in the future.
+	  gst_gl_window_x11_get_surface_dimensions is also changed to use a cached value
+	  of the window's width, height. These values are now retrieved in the X11
+	  thread, function gst_gl_window_x11_handle_event. This change is needed because
+	  otherwise the XGetWindowAttributes gets called from the navigation thread,
+	  leading to xlib aborting due to multithreaded access (if XInitThreads is not
+	  called before, as is the case for gst-launch)
+
+2014-09-05 13:58:19 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: retry opening the frontend on EINTR
+
+2014-09-05 13:32:09 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: assorted doc & spelling fixes
+
+2014-09-07 01:30:16 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/dataurisrc/gstdataurisrc.c:
+	  Revert "dataurisrc: Remove unnecessary else if condition"
+	  This reverts commit 3024ae9c38490817a76c83feab3c8472989cafad.
+	  The *buf can be NULL or not depending if the caller of gst_pad_get_range
+	  function provided or not a buffer.
+
+2014-09-05 16:11:08 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  tests: hlsdemux: fix compilation
+	  In file included from /home/thiagoss/gst/head/gstreamer/gst/gst.h:54:0,
+	  from /home/thiagoss/gst/head/gstreamer/libs/gst/check/gstcheck.h:34,
+	  from elements/hlsdemux_m3u8.c:27:
+	  ../../ext/hls/gstfragmented.h:8:28: error: redundant redeclaration of ‘fragmented_debug’ [-Werror=redundant-decls]
+	  GST_DEBUG_CATEGORY_EXTERN (fragmented_debug);
+	  Move the definition of the category to after the declaration.
+
+2014-09-05 12:56:13 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	  hlsdemux: And fix Makefile yet again
+
+2014-09-05 12:25:01 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  hlsdemux: Include the m3u8.c file directly in the test because of an automake bug
+	  $(top_srcdir) doesn't seem to work with _SOURCES because that would be too
+	  obvious.
+	  http://lists.gnu.org/archive/html/automake/2013-09/msg00005.html
+
 2014-09-05 09:53:15 +0530  Vineeth T M <vineeth.tm@samsung.com>
 
 	* gst/aiff/aiffparse.c:
@@ -1581,11 +20057,102 @@
 	  are duplicated.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=736090
 
+2014-09-05 08:51:30 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/gstfacedetect.c:
+	* ext/opencv/gstfacedetect.h:
+	  facedetect: Add new property min-stddev
+	  face detection will be performed only if image standard deviation is
+	  greater that min-stddev. Default min-stddev is 0 for backward
+	  compatibility. This property will avoid to perform face detection on
+	  images with little changes improving cpu usage and reducing false
+	  positives
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730510
+
+2014-07-07 10:52:57 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	  gltransformation: fix issues and expose mvp matrix
+	  * aspect should not be 0 on init
+	  * rename fovy to fov
+	  * add mvp to properties as boxed graphene type
+	  * fix transformation order. scale first
+	  * clear color with 1.0 alpha
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734223
+
+2014-09-04 21:41:54 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	  hlsdemux: Also get the m3u8.c source file from the $(top_srcdir) for the test
+	  Should fix make distcheck for real now.
+
+2014-09-04 19:01:45 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	  hlsdemux: Use $(top_srcdir) instead of $(top_builddir) for the include path
+
+2014-09-04 18:21:38 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: Don't send flush events to deactivated pads
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
+2014-09-04 18:21:25 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: Don't send flush events to deactivated pads
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
+2014-09-04 18:20:58 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Don't send flush events to deactivated pads
+	  https://bugzilla.gnome.org/show_bug.cgi?id=736012
+
+2014-09-04 17:52:35 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	  hlsdemux: Compile the m3u8.c directly instead of re-using the .o file
+
+2014-09-04 17:50:16 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/.gitignore:
+	* tests/check/elements/hlsdemux_m3u8.c:
+	  hlsdemux: Add unit test for parsing of M3U8 playlists
+	  Ported from https://github.com/ylatuya/gst-plugins-bad
+	  This still has some unit tests for alternative renditions and
+	  seeking, which are commented out for the time being until we
+	  support them properly.
+
 2014-09-04 17:49:23 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* ext/hls/m3u8.c:
 	  hlsdemux: Properly assign offsets to the files if we accumulate them instead of reading from the playlist
 
+2014-09-04 13:38:21 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/dataurisrc/gstdataurisrc.c:
+	  dataurisrc: Remove unnecessary else if condition
+	  In gst_data_uri_src_create(), buf cannot be NULL, hence
+	  else if (*buf != NULL) will be invalid so removing the
+	  else if condition and adding a check to unreference buf
+	  in else condition, just in case
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735861
+
+2014-09-02 18:06:53 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: simplify ISDB-T launch line example
+
+2014-09-02 12:13:01 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: delay locking till actually needed
+	  Get rid of unneeded locking at prop setting by doing
+	  it only when tuning the frontend at _tune_fe()
+
 2014-09-02 12:11:44 +0530  Vineeth T M <vineeth.tm@samsung.com>
 
 	* gst/dataurisrc/gstdataurisrc.c:
@@ -1601,194 +20168,303 @@
 	  outputs and we don't really know how much we have to drop or not.
 	  After this change the output has the same duration as with mad.
 
+2014-09-01 08:24:57 +0530  Vineeth T M <vineeth.tm@samsung.com>
+
+	* gst/videofilters/gstzebrastripe.c:
+	  zebrastripe: Refactor to remove duplicate code
+	  gst_zebra_stripe_transform_frame_ip_planarY
+	  gst_zebra_stripe_transform_frame_ip_YUY2
+	  gst_zebra_stripe_transform_frame_ip_AYUV
+	  all above 3 functions do the same functionality except for offset and pixel stride.
+	  Hence moving the functionality to a single funtion.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735032
+
+2014-08-29 18:55:32 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: fix description for modulation prop
+
+2014-08-29 17:16:09 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add basic checks on ISDB-T parameters
+	  Also add a routine for checking wrong delsys/modulation
+	  combinations right before tuning (only implemented for
+	  ISDB-T for now).
+
+2014-08-29 18:09:07 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: add support for additional modulation types
+
+2014-08-29 13:26:12 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: drop FIXME on _ISDBT_LAYER_ENABLED prop
+	  Valid values range from 1 to 7 as stated.
+	  DTV_ISDBT_LAYER_ENABLED bitmask is built from
+	  OR-ing 0x1 0x2 0x4. If all bits are set
+	  (0x00000111 = 7) it means all layers should be
+	  demodulated.
+
+2014-08-29 19:26:40 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/assrender/gstassrender.c:
+	  assrender: remove code that can't be reached
+	  If this code could ever be reached, it would leak
+	  memory (CID 1231979), but gst_caps_get_features()
+	  never returns NULL, so that can't happen.
+
+2014-08-29 19:24:52 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/dvbsuboverlay/gstdvbsuboverlay.c:
+	  dvbsuboverlay: remove code that can't be reached
+	  If this code could ever be reached, it would leak
+	  memory (CID 1231977), but gst_caps_get_features()
+	  never returns NULL, so that can't happen.
+
+2014-08-28 20:12:07 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: fix up handling of input caps corner cases
+	  Do more elaborate validation of the input caps: what fields
+	  are required and/or not allowed. Don't assume AVC3 format
+	  input without codec_data field is byte-stream format. Fix
+	  up some now-unreachable code (CID 1232800).
+
+2014-08-28 16:42:30 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: Add missing break to switch
+	  CID 1232801
+
 2014-08-28 11:37:56 +0300  Sebastian Dröge <sebastian@centricular.com>
 
 	* gst/rawparse/gstrawparse.c:
 	  rawparse: Reset negotiation state when going back to READY
 	  After going back to READY we can accept new format settings again.
 
-2014-08-01 13:14:03 +0200  Edward Hervey <edward@collabora.com>
+2014-08-22 15:18:59 -0600  Thomas Bluemel <tbluemel@control4.com>
 
-	* po/POTFILES.in:
-	  po: Remove files no longer present
-	  They were removed when sndfile was ported to 1.x
-
-=== release 1.4.1 ===
-
-2014-08-27 15:04:48 +0300  Sebastian Dröge <sebastian@centricular.com>
-
-	* ChangeLog:
-	* NEWS:
-	* RELEASE:
 	* configure.ac:
-	* 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-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:
-	* win32/common/config.h:
-	  Release 1.4.1
+	* ext/hls/Makefile.am:
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: Support OpenSSL for AES decryption of HLS fragments
+	  https://bugzilla.gnome.org//show_bug.cgi?id=735248
 
-2014-08-27 14:45:07 +0300  Sebastian Dröge <sebastian@centricular.com>
+2014-08-26 16:21:42 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.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
+	* tests/examples/gl/qt/qglwtextureshare/glcontextid.h:
+	* tests/examples/gl/qt/qglwtextureshare/gstthread.h:
+	* tests/examples/gl/qt/qglwtextureshare/main.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/pipeline.h:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	* tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.pro:
+	  gl: qglwtextureshare demo fixes and cleanup
+	  1. glcontextid function is replaced by gstreamer gst_gl_context_new_wrapped .
+	  2. call gst_init before gst_gl_display_new , seems gst_gl_display_new depends
+	  on gst_allocator_register , which only worked after gst_init called
+	  3. flush gstreamer OpenGL context before using shared texture, fix
+	  flicker problem.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735566
 
-2014-08-27 12:36:07 +0300  Sebastian Dröge <sebastian@centricular.com>
+2014-08-27 13:40:42 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.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:
-	  po: Update translations
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl: Add GSTGLAPI macro to the debug callback function
+	  Fixes the Windows build.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735565
+
+2014-08-28 09:53:17 +0300  Blake Tregre <blake.tregre@gmail.com>
+
+	* gst/librfb/rfbdecoder.c:
+	  rfbsrc: Clamp out of bounds resolutions to prevent segfaults
+	  https://bugzilla.gnome.org/show_bug.cgi?id=726801
+
+2014-08-27 14:47:25 +0200  Carlos Rafael Giani <dv@pseudoterminal.org>
+
+	* configure.ac:
+	  gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in configuration
+	  https://bugzilla.gnome.org/show_bug.cgi?id=735522
+
+2014-08-26 12:38:52 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  egl: Wrap KHR_create_context flags in an ifdef
+	  EGL_CONTEXT_FLAGS_KHR and EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR
+	  don't exist in the Android NDK. Wrap their usage in an #ifdef
+	  EGL_KHR_create_context to fix the build there.
+
+2014-08-21 12:32:10 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: don't consider unknown stream-format as avc
+	  It should try to use bytestream in these cases that the format
+	  is set to _FORMAT_NONE as it seems that is what the 'else' clause
+	  for bytestream can handle (by defaulting to _FORMAT_BYTESTREAM).
+
+2014-08-25 13:33:15 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* tests/check/elements/h264parse.c:
+	  h264parse: tests: fix caps for avc format
+	  If it has a codec_data field, it should also use the stream-format=avc as
+	  codec_data doesn't make sense otherwise and the default should
+	  be bytestream
+
+2014-08-25 15:21:39 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/inspect/plugin-mpegpsmux.xml:
+	  docs: add mpegpsmux and mpegtsmux
+
+2014-08-25 15:20:59 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/inspect/plugin-audiomixer.xml:
+	  docs: add audiomixer to docs
+
+2014-08-25 15:20:16 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/inspect/plugin-aiff.xml:
+	  docs: add aiff elements to docs
+
+2014-08-25 14:56:15 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* 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.prerequisites:
+	* docs/plugins/gst-plugins-bad-plugins.signals:
+	  docs: plugins: misc updates
+
+2014-08-25 14:43:49 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* docs/plugins/Makefile.am:
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* docs/plugins/gst-plugins-bad-plugins.hierarchy:
+	* docs/plugins/gst-plugins-bad-plugins.types:
+	  docs: move GstPhotography interface docs into the library docs
+	  Now that we have docs for the libs.
+
+2014-08-25 12:21:36 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/sndfile/gstsf.c:
+	  sndfile: don't decode formats that are better handled by other elements
+	  In particular: flac, ogg, pcm, au, aiff, wav.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=722316
+
+2014-08-22 16:49:10 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  egl: fallback to a non-debug context if a debug one fails
+	  The text for EGL_KHR_create_context added the possiblity for ES
+	  contexts to ask for a debug context however that has not been
+	  fully realized by all implementations.  Fallback to a non-debug
+	  context when the implementation errors.
+
+2014-08-05 14:06:07 -0400  Youness Alaoui <kakaroto@kakaroto.homelinux.net>
+
+	* ext/srtp/gstsrtpdec.c:
+	  srtpdec: Add support for RTP/RTCP mixing if data arrives on RTCP pad
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734321
+
+2014-08-21 16:24:06 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: fix abort in error code path with newer glib
+	  Don't forget to unlock mpd client again when erroring out.
+	  Fixes abort when g_mutex_clear() is called on a locked mutex.
+
+2014-07-02 12:49:44 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	  gstopengl: add introspection support
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734482
+
+2014-08-05 12:07:08 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* tests/examples/gl/gtk/switchvideooverlay/main.cpp:
+	  examples: fix gtk+ 3.14 deprecation error
+	  https://developer.gnome.org/gtk3/3.13/GtkWidget.html#gtk-widget-set-double-buffered
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734482
+
+2014-07-07 10:52:06 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: expose context
+	  * expose context in draw / reshape callbacks
+	  * add context property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734482
+
+2014-07-07 10:51:28 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglshader.h:
+	  glshader: expose opengl handle in getter
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734482
 
 2014-08-20 09:37:01 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
 
 	* gst-libs/gst/gl/gstglutils.c:
 	  gl: check null before unref GstGLDisplay
 
+2014-08-21 10:03:07 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/glprototypes/debug.h:
+	  gl: add prototype definition for KHR_debug
+
+2014-08-20 23:24:12 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/x11/gstglcontext_glx.c:
+	  glcontext: implement the debug callback
+	  For both GL_KHR_debug and ARB_debug_output.  This allows us to
+	  receive errors and other hints from the GL instead of querying after
+	  every GL operation.
+
+2014-08-20 23:23:06 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/glprototypes/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/all_functions.h:
+	* gst-libs/gst/gl/glprototypes/gstgl_compat.h:
+	* gst-libs/gst/gl/gstglapi.h:
+	  gl: add prototypes for KHR_debug/ARB_debug_output
+
+2014-08-19 17:17:33 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: unref pad reference when removing internal source in error
+	  Avoids leaking the pad in error situations
+
+2014-08-19 16:01:58 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/dash/gstdashdemux.c:
+	  dashdemux: read language from ContentComponent node as a fallback
+	  If the language is not specified in the AdaptationSet, use the ContentComponent
+	  node to get it. We only get it if there is only a single ContentComponent as
+	  it doesn't seem clear on what to do if there are multiple entries
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732237
+
+2014-06-25 15:55:32 +0200  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/dash/Makefile.am:
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstdashdemux.h:
+	  dashdemux: push language code tag
+	  Language code tag is retrieved from the AdaptationSet language
+	  property.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732237
+
 2014-08-19 20:14:22 +1000  Matthew Waters <ystreet00@gmail.com>
 
 	* gst-libs/gst/gl/gstglutils.c:
@@ -1804,17 +20480,28 @@
 	  the pad without going through gst_gl_mixer_stop() which is where the
 	  upload object is usually freed.  Don't leak objects in such case.
 
+2014-08-14 23:51:21 -0400  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+
+	* ext/gl/gstglmixer.c:
+	  glvideomixer: avoid gl resource race condition between different thread
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734830
+
 2014-08-19 14:44:29 +1000  Matthew Waters <ystreet00@gmail.com>
 
 	* ext/gl/gstglvideomixer.c:
 	  glvideomixer: don't clobber unnecessary GstVideoInfo fields
 	  otherwise we might clobber other important fields such as the frame rate.
 
-2014-08-14 23:51:21 -0400  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
+2014-08-19 14:43:42 +1000  Matthew Waters <ystreet00@gmail.com>
 
-	* ext/gl/gstglmixer.c:
-	  glvideomixer: avoid gl resource race condition between different thread
-	  https://bugzilla.gnome.org/show_bug.cgi?id=734830
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: get the attribute from the correct shader
+
+2014-08-19 14:23:21 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: unref the window on navigation event
+	  plugs a memory leak
 
 2014-08-19 00:01:28 -0300  Thiago Santos <thiagoss@osg.samsung.com>
 
@@ -1824,6 +20511,13 @@
 	  can be a completely different one.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=734394
 
+2014-08-17 01:42:05 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparser: h264: Use proper bit_reader api while parsing buffering_period SEI
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734970
+
 2014-08-14 10:19:13 +0530  Vineeth T M <vineeth.tm@samsung.com>
 
 	* gst/videofilters/gstscenechange.c:
@@ -1833,19 +20527,116 @@
 	  at the start.
 	  https://bugzilla.gnome.org/show_bug.cgi?id=734763
 
-2014-08-09 01:29:30 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+2014-08-14 15:26:53 +0300  Sebastian Dröge <sebastian@centricular.com>
 
-	* ext/sbc/gstsbcenc.c:
-	  sbcenc: Unref output caps in error cases
-	  gst_caps_intersect() returns a reference to a caps object which in
-	  the normal case is consumed, but in error cases must be unreferenced.
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734521
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Make sure to unblock any thread waiting on the drain condition variable when errors happen
 
-2014-08-08 14:08:19 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+2014-08-14 15:24:21 +0300  Sebastian Dröge <sebastian@centricular.com>
 
-	* ext/opus/gstopusenc.c:
-	  opusenc: Unref pad template caps after usage
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734517
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcaudiodec.h:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideodec.h:
+	* sys/androidmedia/gstamcvideoenc.c:
+	* sys/androidmedia/gstamcvideoenc.h:
+	  androidmedia: Fix draining logic to let the base class handle EOS events
+	  https://bugzilla.gnome.org//show_bug.cgi?id=734775
+
+2014-08-11 21:25:41 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/parsechannels.c:
+	  dvbbasebin: fix parsing of freqs in some ZAP files
+	  Change avoids attempting to convert to kHz if unneeded.
+	  There are quite some ZAP format variants out there. Among
+	  their subtle little differences, some store transponder
+	  frequencies in Mhz and others in kHz. The latter been the
+	  most common variant.
+
+2014-08-07 19:37:01 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: get rid of remaining trailing whitespace
+
+2014-08-07 19:19:36 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: wrap around known-interruptible ioctls
+	  Also get rid of the asumption that some requests like
+	  FE_SET_TONE or FE_SET_VOLTAGE only error out with -1
+
+2014-08-07 14:00:40 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: drop gst_dvbsrc_retry_ioctl for retry macro
+	  LOOP_WHILE_EINTR macro makes it easier to handle
+	  assorted ioctl argp types. Functionality is otherwise
+	  equivalent.
+
+2014-08-12 12:35:00 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/dvbbasebin.h:
+	* sys/dvb/gstdvbsrc.c:
+	* sys/dvb/gstdvbsrc.h:
+	  dvbsrc: dvbbasebin: add 'tune' signal
+	  It works the same as the 'tune' property that is used only to signal
+	  the element that it should tune, but it is more natural to be used
+	  as a signal rather than a property.
+	  It is also proxied at the dvbbasebin element
+
+2014-08-07 15:25:32 +0200  Thibault Saunier <thibault.saunier@collabora.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Do not switch playlist on trick modes
+	  Instead always use the low bandwith playlist making things go smoother
+	  as the current heuristic is rather set for normal playback, and
+	  currently it does not behave properly.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734445
+
+2014-07-21 14:42:47 +0200  Thibault Saunier <thibault.saunier@collabora.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: No need to have a I-Frame list to do trick modes
+	  It just works cleanly without any index and there is no real reason for
+	  that limitation. Also, there are very few stream with that feature.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734445
+
+2014-08-05 17:13:13 +0200  Thibault Saunier <thibault.saunier@collabora.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Do not tweak segments on reverse playback
+	  We can't compare the first buffer start and the segment start in that
+	  case... playback is going backward!
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734445
+
+2014-08-13 16:57:15 +0200  Valentin PONS <valx76@gmail.com>
+
+	* ext/opencv/gstfacedetect.c:
+	  facedetect: Use NULL to disable eyes/nose/mouth
+	  Without printing a warning about it
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734623
+
+2014-08-10 22:58:22 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	  glbufferpool: fix allocator leak in some cases
+	  Spotted by Sebastian Rasmussen.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734523
+
+2014-08-11 12:32:04 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/assrender/gstassrender.c:
+	  assrender: save a few ref/unref pairs
+	  The event/query functions already have a reference to the element, avoid
+	  ref/unref in the functions handling caps queries and events.
+
+2014-08-11 12:31:17 -0300  Thiago Santos <thiagoss@osg.samsung.com>
+
+	* ext/assrender/gstassrender.c:
+	  assrender: remove obsolete fixme
 
 2014-08-11 12:22:44 -0300  Thiago Santos <thiagoss@osg.samsung.com>
 
@@ -1877,6 +20668,169 @@
 	  Avoids returning unsupported caps to peers
 	  https://bugzilla.gnome.org/show_bug.cgi?id=733916
 
+2014-08-11 23:38:40 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: fix up doc comment for set_src_caps
+	  It does not occur 'later' anymore
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732662
+
+2014-08-07 19:54:36 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	  videoaggregator: push the caps event as soon as we receive it
+	  Along with the required mandatory dependent events.
+	  Some elements need to perform an allocation query inside
+	  ::negotiated_caps().  Without the caps event being sent prior,
+	  downstream elements will be unable to answer and will return
+	  an error.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732662
+
+2014-08-11 16:01:32 +0300  Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+
+	* ext/webp/Makefile.am:
+	* ext/webp/gstwebp.c:
+	* ext/webp/gstwebpenc.c:
+	* ext/webp/gstwebpenc.h:
+	  webenc: Add WebP image encoder
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733087
+
+2014-08-09 01:29:30 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* ext/sbc/gstsbcenc.c:
+	  sbcenc: Unref output caps in error cases
+	  gst_caps_intersect() returns a reference to a caps object which in
+	  the normal case is consumed, but in error cases must be unreferenced.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734521
+
+2014-08-08 14:08:19 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: Unref pad template caps after usage
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734517
+
+2014-08-09 11:41:17 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* gst/inter/gstintertest.c:
+	  inter: Unref bus after usage
+	  gst_pipeline_get_bus() returns a reference to a bus that needs to
+	  be unreferenced after usage.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734525
+
+2014-08-09 11:45:41 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* tests/examples/gl/clutter/clutteractor.c:
+	* tests/examples/gl/clutter/clutteractortee.c:
+	* tests/examples/gl/gtk/fxtest/fxtest.c:
+	  examples/gl: unref bus and element after usage
+	  gst_pipeline_get_bus() and gst_bin_get_by_interface() both
+	  return references that need to be unreferenced after usage.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734527
+
+2014-08-10 19:12:01 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* docs/plugins/gst-plugins-bad-plugins.hierarchy:
+	* docs/plugins/gst-plugins-bad-plugins.interfaces:
+	* 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-rtmp.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:
+	  docs: update for git master
+
+2014-08-10 19:05:43 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/inspect/plugin-rtpvp8.xml:
+	  docs: remove rtpvp8 plugin docs, the elements are now in -good
+
+2014-08-10 18:07:28 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/gl/gstglcolorscale.c:
+	* ext/gl/gstglfiltercube.c:
+	* ext/gl/gstglfilterglass.c:
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstgloverlay.c:
+	* ext/gl/gstglvideomixer.c:
+	  opengl: update element docs for 1.x
+
+2014-08-10 17:48:50 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* docs/plugins/inspect/plugin-eglglessink.xml:
+	  docs: remove eglglessink from docs as it no longer exists
+
 2014-08-09 11:36:38 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
 	* gst/camerabin2/gstwrappercamerabinsrc.c:
@@ -1892,13 +20846,11 @@
 	  openal: Unref pad template caps after usage
 	  https://bugzilla.gnome.org/show_bug.cgi?id=734520
 
-2014-08-09 13:22:42 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+2014-08-10 12:29:04 +0100  Tim-Philipp Müller <tim@centricular.com>
 
-	* sys/directsound/gstdirectsoundsrc.c:
-	  directsoundsrc: Avoid leaking copy of caps object
-	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
-	  so creating a copy using gst_caps_copy() results in a reference leak.
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734536
+	* ext/ladspa/gstladspafilter.c:
+	  ladspa: fix up broken patch merge
+	  Sorry, should've been commit --amend
 
 2014-08-09 13:24:00 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
@@ -1909,6 +20861,24 @@
 	  use if not given away to gst_buffer_pool_set_config().
 	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734537
 
+2014-08-09 13:22:42 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* sys/directsound/gstdirectsoundsrc.c:
+	  directsoundsrc: Avoid leaking copy of caps object
+	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
+	  so creating a copy using gst_caps_copy() results in a reference leak.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734536
+
+2014-08-09 13:20:41 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* sys/applemedia/vtenc.c:
+	  vtenc: Avoid leaking caps object and its copy
+	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
+	  so creating a copy using gst_caps_copy() results in a reference leak. Also
+	  the caps are pushed as an event downstream, but this doesn't consume the
+	  caps so it must still be unreferenced.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734534
+
 2014-08-09 13:17:17 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
 	* sys/androidmedia/gstamcvideoenc.c:
@@ -1918,14 +20888,6 @@
 	  Also remove the incorrect comment to avoid confusion in the future.
 	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734533
 
-2014-08-09 14:27:34 +0200  Sebastian Rasmussen <sebras@hotmail.com>
-
-	* ext/gsm/gstgsmenc.c:
-	  gstgsmenc: Unref caps object after usage
-	  gst_audio_encoder_set_output_format() does not consume caps, so
-	  unreference that object instead.
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734544
-
 2014-08-09 13:12:14 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
 	* gst/interlace/gstinterlace.c:
@@ -1942,24 +20904,6 @@
 	  so creating a copy using gst_caps_copy() results in a reference leak.
 	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734528
 
-2014-08-09 13:20:41 +0200  Sebastian Rasmussen <sebras@hotmail.com>
-
-	* sys/applemedia/vtenc.c:
-	  vtenc: Avoid leaking caps object and its copy
-	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
-	  so creating a copy using gst_caps_copy() results in a reference leak. Also
-	  the caps are pushed as an event downstream, but this doesn't consume the
-	  caps so it must still be unreferenced.
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734534
-
-2014-08-09 13:27:00 +0200  Sebastian Rasmussen <sebras@hotmail.com>
-
-	* tools/element-templates/srcpad:
-	  element-maker: Avoid leaking copy of caps object
-	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
-	  so creating a copy using gst_caps_copy() results in a reference leak.
-	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734539
-
 2014-08-09 11:17:44 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
 	* gst-libs/gst/video/gstvideoaggregator.c:
@@ -1970,46 +20914,49 @@
 
 	* ext/ladspa/gstladspafilter.c:
 	  ladspa: Unref pad template caps after usage
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734519
+
+2014-08-09 01:25:21 +0200  Sebastian Rasmussen <sebras@hotmail.com>
+
+	* ext/ladspa/gstladspafilter.c:
+	  ladspa: Unref pad template caps after usage
 	  https://bugzilla.gnome.org/show_bug.cgi?id=734519
 
-2014-08-01 12:38:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-08-09 01:23:50 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
-	* sys/decklink/gstdecklink.cpp:
-	  decklink: 59.94fps is 60000/1001, not 30000/1001
-	  And also change 30/1 to 60/1 for one 60fps mode.
+	* ext/directfb/dfbvideosink.c:
+	  dfbvideosink: Unref pad template caps after usage
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734518
 
-2014-08-01 16:40:49 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+2014-08-10 11:35:41 +0100  Tim-Philipp Müller <tim@centricular.com>
 
-	* gst-libs/gst/codecparsers/gsth264parser.c:
-	  codecparsers_h264: initialize some fields of pic_timing structure
-	  Otherwise pic timing structure can have invalid cpb_removal_delay,
-	  dpb_output_delay or pic_struct_present_flag which are blindly retrieved
-	  in h264parse.
-	  https://bugzilla.gnome.org/show_bug.cgi?id=734124
+	* tests/check/Makefile.am:
+	* tests/check/pipelines/.gitignore:
+	* tests/check/pipelines/colorspace.c:
+	  tests: remove defunct test code for old colorspace element
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734538
 
-2014-08-01 18:02:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-08-09 13:27:00 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
-	* sys/decklink/gstdecklinksink.cpp:
-	  decklinksink: Initialize pixel format to bmdFormat8BitYUV
-	  https://bugzilla.gnome.org/show_bug.cgi?id=725871
+	* tools/element-templates/srcpad:
+	  element-maker: Avoid leaking copy of caps object
+	  gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
+	  so creating a copy using gst_caps_copy() results in a reference leak.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734539
 
-2014-08-01 16:58:23 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-08-09 14:27:34 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
-	* sys/decklink/gstdecklinksink.cpp:
-	  decklinksink: Catch errors during data flow and error out properly
-	  Otherwise we will just deadlock the thread if e.g. scheduling a video
-	  frame fails for whatever reason.
+	* ext/gsm/gstgsmenc.c:
+	  gstgsmenc: Unref caps object after usage
+	  gst_audio_encoder_set_output_format() does not consume caps, so
+	  unreference that object instead.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734544
 
-2014-08-05 11:45:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+2014-08-09 14:24:59 +0200  Sebastian Rasmussen <sebras@hotmail.com>
 
-	* gst/mpegtsdemux/mpegtspacketizer.c:
-	* gst/mpegtsdemux/mpegtspacketizer.h:
-	  mpegtspacketizer: Store PCR time/byte offsets in 64 bit integers
-	  32 bit integers are going to overflow, especially the PCR offset to
-	  the first PCR will overflow after about 159 seconds. This makes playback
-	  of streams stop at 159 seconds as suddenly the timestamps are starting
-	  again from 0. Now we have a few more years time until it happens again
-	  and 64 bits are too small.
+	* ext/opus/gstopusheader.c:
+	  opus: Improve annotation of internal function
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734543
 
 2014-08-06 18:11:20 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
 
@@ -2022,10 +20969,31 @@
 	  this segment backwards until the first segment.
 	  This allows proper reverse playback.
 
-2014-08-01 17:51:08 +1000  Matthew Waters <ystreet00@gmail.com>
+2014-08-07 19:18:49 +1000  Matthew Waters <ystreet00@gmail.com>
 
-	* gst-libs/gst/gl/gstgldisplay.c:
-	  gl/docs: remove superflous 'the'
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	  glvideomixer: add a background property
+	  That's compatible with the compositor/videomixer property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731954
+
+2014-08-06 13:27:04 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/faad/gstfaad.c:
+	  ext:faad: Set rank to SECONDARY as the libav decoder is concidered better
+	  https://bugzilla.gnome.org/show_bug.cgi?id=676131
+
+2014-08-06 16:48:03 +0300  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  GstGLWindow, GstGLImagesink, x11: Scale navigation events on resized windows
+	  If window is resized, GstStructure pointer values have to be rescaled to
+	  original geometry. A get_surface_dimensions GLWindow class method is added for
+	  this purpose and used in the navigation send_event function.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=703486
 
 2014-08-06 08:15:38 -0400  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
 
@@ -2033,6 +21001,59 @@
 	  glupload: don't determine if frame needs upload by pointer compare
 	  https://bugzilla.gnome.org/show_bug.cgi?id=734269
 
+2014-08-05 11:45:55 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	* gst/mpegtsdemux/mpegtspacketizer.h:
+	  mpegtspacketizer: Store PCR time/byte offsets in 64 bit integers
+	  32 bit integers are going to overflow, especially the PCR offset to
+	  the first PCR will overflow after about 159 seconds. This makes playback
+	  of streams stop at 159 seconds as suddenly the timestamps are starting
+	  again from 0. Now we have a few more years time until it happens again
+	  and 64 bits are too small.
+
+2014-08-05 10:42:28 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  Revert "mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND"
+	  This reverts commit 9f186c6ab32c1e949916d385186b2d400190add6.
+	  That commit was actually completely wrong, nevermind.
+
+2014-08-05 10:36:17 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND
+	  Otherwise it will believe to detect PCR gaps already when there's a very small
+	  gap of a few milliseconds, breaking playback of some files.
+
+2014-07-31 17:40:30 -0400  Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
+
+	* sys/dvb/gstdvbsrc.h:
+	  dvbsrc: remove srcpad leftover
+	  The element is inheriting its srcpad from basesrc
+
+2014-08-01 18:02:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Initialize pixel format to bmdFormat8BitYUV
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725871
+
+2014-08-01 16:40:49 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	  codecparsers_h264: initialize some fields of pic_timing structure
+	  Otherwise pic timing structure can have invalid cpb_removal_delay,
+	  dpb_output_delay or pic_struct_present_flag which are blindly retrieved
+	  in h264parse.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=734124
+
+2014-08-01 16:58:23 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklinksink.cpp:
+	  decklinksink: Catch errors during data flow and error out properly
+	  Otherwise we will just deadlock the thread if e.g. scheduling a video
+	  frame fails for whatever reason.
+
 2014-07-31 20:52:39 -0300  Thiago Santos <thiagoss@osg.samsung.com>
 
 	* ext/dash/gstdashdemux.c:
@@ -2050,6 +21071,23 @@
 	  Cause timing to break in the pipeline that can lead to a stall
 	  https://bugzilla.gnome.org/show_bug.cgi?id=733837
 
+2014-08-01 13:14:03 +0200  Edward Hervey <edward@collabora.com>
+
+	* po/POTFILES.in:
+	  po: Remove files no longer present
+	  They were removed when sndfile was ported to 1.x
+
+2014-08-01 12:38:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/decklink/gstdecklink.cpp:
+	  decklink: 59.94fps is 60000/1001, not 30000/1001
+	  And also change 30/1 to 60/1 for one 60fps mode.
+
+2014-08-01 17:51:08 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gl/docs: remove superflous 'the'
+
 2014-08-01 16:41:13 +1000  Matthew Waters <ystreet00@gmail.com>
 
 	* ext/gl/gstglimagesink.c:
@@ -2057,6 +21095,77 @@
 	  gl: document GST_GL_* environment variables
 	  https://bugzilla.gnome.org/show_bug.cgi?id=733245
 
+2014-08-01 10:01:18 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/check/libs/gstglmemory.c:
+	* tests/check/libs/gstglupload.c:
+	  gl/tests: update for API changes
+
+2014-07-31 18:55:33 +0200  Edward Hervey <edward@collabora.com>
+
+	* Makefile.am:
+	* common:
+	  Makefile: Add usage of build-checks step
+	  Allows building checks without running them
+
+2014-07-31 18:46:33 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  glcontext: add a destroy function
+	  that just calls the subclass
+
+2014-07-31 18:36:58 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/x11: silence runtime warning
+	  g_main_loop_quit: assertion 'loop != NULL' failed
+
+2014-07-31 15:18:04 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: use the plane offsets to compute the size of the data pointer
+	  Certain elements expect that there be a certain number of lines
+	  that they can write into.  e.g. for odd heights, I420, YV12, NV12,
+	  NV21 (and others) Y lines are expected to have exactly twice the
+	  number of U/UV lines.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733717
+
+2014-07-31 14:07:29 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	  glmemory: use GstVideoInfo everywhere
+	  Simplifies a lot of the calling code
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733717
+
+2014-07-30 16:32:01 -0300  Robert Jobbagy <jobbagy.robert@gmail.com>
+
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfaceblur.h:
+	* ext/opencv/gstfacedetect.c:
+	* ext/opencv/gstfacedetect.h:
+	  faceblur: facedetect: add properties to faceblur
+	  Makes faceblur have the same properties as facedetect. Also improves
+	  the standard defaults and makes them the same in the 2 elements
+
+2014-07-30 16:30:39 -0300  Robert Jobbagy <jobbagy.robert@gmail.com>
+
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfaceblur.h:
+	  faceblur: post message when profile loading fails
+
+2014-07-30 16:07:17 -0300  Robert Jobbagy <jobbagy.robert@gmail.com>
+
+	* ext/opencv/gstfaceblur.c:
+	* ext/opencv/gstfacedetect.c:
+	  facedetect: faceblur: update launch line examples
+	  Reflect 1.0 and more useful examples
+
 2014-07-29 13:25:22 +1000  Matthew Waters <ystreet00@gmail.com>
 
 	* ext/gl/gstglimagesink.c:
@@ -2073,6 +21182,28 @@
 	  The GST_GL_HAVE_PLATFORM_EAGL is always defined we need to compare
 	  against the value instead.
 
+2014-07-28 19:11:41 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* tests/check/elements/.gitignore:
+	* tests/check/libs/.gitignore:
+	  tests: gitignore: update with new tests
+
+2014-07-28 16:55:15 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* tests/files/blue-square.png:
+	  tests: files: adds missing file from previous commit
+	  This is required for the templatematch test to work
+
+2014-07-28 15:45:09 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* tests/check/Makefile.am:
+	* tests/check/elements/templatematch.c:
+	* tests/files/Makefile.am:
+	  tests: templatematch: add test to check that we use the correct rgb format
+	  templatematch should use the same RGB format that opencv uses (BGR), make sure
+	  we keep it that way with this test.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=678485
+
 2012-06-15 13:19:06 +0100  David Rothlisberger <david.rothlisberger@youview.com>
 
 	* ext/opencv/gsttemplatematch.c:
@@ -2098,6 +21229,162 @@
 	  templatematch: mark pads as proxy caps
 	  Allows negotiation to happen properly
 
+2012-06-25 20:37:01 +0100  William Manley <william.manley@youview.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  templatematch: Produce a warning message if we can't load a template image
+
+2012-06-20 15:22:52 +0100  William Manley <william.manley@youview.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  templatematch: Match rectangle grows redder with increased match certainty
+	  This is useful for debugging your matches as it indicates how certain the
+	  match was in addition to its position.
+
+2012-06-20 15:05:40 +0100  William Manley <william.manley@youview.com>
+
+	  templatematch: Allow changing template property on the fly
+	  Previously changing the template property resulted in an exception
+	  thrown from cvMatchTemplate, because "dist_image" (the intermediate
+	  match-certainty-distribution) was the wrong size (because the
+	  template image size had changed).
+	  Locking has also been added to allow changing the properties (e.g. the
+	  pattern to match) while the pipeline is playing.
+	  * gst_element_post_message is moved outside of the lock, because it will
+	  call into arbitrary user code (otherwise, if that user code calls into
+	  gst_templatematch_set_property on this same thread it would deadlock).
+	  * gst_template_match_load_template: If we fail to load the new template
+	  we still unload the previous template, so this element becomes a no-op
+	  in the pipeline. The alternative would be to keep the previous template;
+	  I believe unloading the previous template is a better choice, because it
+	  is consistent with the state this element would be in if it fails to
+	  load the very first template at start-up.
+	  Thanks to Will Manley for the bulk of this work; any errors are probably
+	  mine.
+
+2012-06-01 16:07:34 +0100  David Rothlisberger <david.rothlisberger@youview.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  templatematch: Pass video through when nothing to match against
+	  The early return was bypassing the call to gst_pad_push. With no
+	  filter->template (and thus no filter->cvTemplateImage) the rest of this
+	  function is essentially a no-op (except for the call to gst_pad_push).
+	  This (plus the previous commit) allows templatematch to be
+	  enabled/disabled without removing it entirely from the pipeline, by
+	  setting/unsetting the template property.
+
+2012-06-20 15:05:06 +0100  William Manley <william.manley@youview.com>
+
+	* ext/opencv/gsttemplatematch.c:
+	  templatematch: Remove no-op call to gst_templatematch_load_template
+	  We have just set filter->template to NULL, so
+	  gst_templatematch_load_template did nothing.
+
+2014-07-08 19:18:48 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: clarify units for freq and symbol-rate
+
+2014-07-07 18:52:20 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/gstdvbsrc.c:
+	* sys/dvb/gstdvbsrc.h:
+	  dvbsrc: add preliminary  support for ISDB-T/Tb
+	  ISDB-T and ISDB-Tb (the Brazilian variant) are the
+	  terrestial DTV standards used by Japan, Philippines,
+	  Maldives, Thailand, most South American countries
+	  and Botswana. Changeset adds the set of previously
+	  missing (and required) ISDB-T parameters, adapter
+	  and frontend setup logic and proxies the new
+	  properties on dvbbasebin.
+	  Tested to work with the live aerial broadcast by
+	  Tv Paraíba HD in Campina Grande (Brazil).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732875
+
+2014-07-05 03:08:00 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	* sys/dvb/gstdvbsrc.c:
+	* sys/dvb/gstdvbsrc.h:
+	  dvbsrc: make slof/lof1/lof2 settable properties
+	  Allows proper tuning around high/low band boundaries when using
+	  non "standard" LNBs.
+	  Not all LNBs (Low noise block down converters) are made equal.
+	  This is particularly true for universal LNBFs, where, even though
+	  there are seemingly standard values for the local oscillator
+	  frequencies, these can vary from manufacturer to manufacturer
+	  and LNB model. Change also proxies the new LNB properties in
+	  dvbbasebin.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732818
+
+2014-07-27 13:26:00 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: silence gsignal warning
+	  instance '0xblah' has no handler with id '13'
+
+2014-07-26 13:27:51 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: do not give references to probes
+	  They are kept until the probes are removed but they will never be
+	  removed as the refcount of the element won't get to 0 because the
+	  probes own references (cyclic refs). As the probes should only be
+	  running as long as the element is running there is no need to
+	  secure a ref for them.
+	  Removes 3 leaked refs of wrappercamerabinsrc
+
+2014-07-26 12:46:01 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	  camerabin: use gst_object_ref to make it easier to track refs
+	  Helps debugging
+
+2014-07-26 12:38:42 -0300  Thiago Santos <ts.santos@osg.sisa.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: unref request pads
+	  Do not forget to unref output-selector requested pads
+
+2014-04-21 23:05:48 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/jpegformat/gstjpegparse.c:
+	* gst/jpegformat/gstjpegparse.h:
+	  jpegparse: port to baseparse
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728356
+
+2014-07-24 12:25:36 +0300  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glwindow/11: Emit signals for mouse and key navigation events
+	  https://bugzilla.gnome.org/show_bug.cgi?id=703486
+
+2014-07-24 12:23:03 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	  glwindow: Constify string parameters to the send_*_event() functions
+
+2014-07-24 13:05:00 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: remove extra argument from debug call
+
+2014-07-07 00:20:01 +0300  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: Add navigation interface and callbacks for GstGLWindow mouse/key signals
+	  https://bugzilla.gnome.org/show_bug.cgi?id=703486
+
+2014-07-06 23:39:47 +0300  Vasilis Liaskovitis <vliaskov@gmail.com>
+
+	* gst-libs/gst/gl/gstglwindow.c:
+	* gst-libs/gst/gl/gstglwindow.h:
+	  GstGLWindow : Add mouse-event and key-event signals for navigation
+	  https://bugzilla.gnome.org/show_bug.cgi?id=703486
+
 2014-07-23 10:25:31 +0800  Wang Xin-yu (王昕宇) <comicfans44@gmail.com>
 
 	* ext/gl/gstgleffects.c:
@@ -2110,6 +21397,21 @@
 	  2. fix texture leaks in decide_allocation and reset
 	  3. fix texture leaks in FBO incomplete error path
 
+2014-07-23 13:55:06 -0300  Thiago Santos <ts.santos@osg.samsung.com>
+
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  wrappercamerabinsrc: only flush buffers if renegotiation is needed
+	  This avoid extra overhead when taking sequential pictures that woudln't
+	  need renegotiation
+
+2014-07-23 13:37:05 -0300  Thiago Santos <ts.santos@osg.samsung.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	* gst/camerabin2/gstwrappercamerabinsrc.c:
+	  camerabin: handle EOS on the pipeline
+	  Make camerabin handle EOS to the pipeline to allow standard pipeline
+	  close where an EOS is sent to the whole pipeline before setting it to NULL.
+
 2014-07-21 18:22:18 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
 
 	* gst/mpegtsdemux/tsdemux.c:
@@ -2122,6 +21424,71 @@
 	  tsdemux: Do not scan for a keyframe in non-accurate mode.
 	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490
 
+2014-07-01 10:24:44 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/gdp/gstgdppay.c:
+	  gdppay: remove obsolete code
+	  Buffers have no caps in 1.0
+
+2014-07-01 10:07:40 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/gdp/gstgdppay.c:
+	* gst/gdp/gstgdppay.h:
+	* tests/check/elements/gdppay.c:
+	  gdppay: put all sticky events in streamheader
+	  Use the sticky events to compose the streamheader as they are the
+	  ones that are persisted to config new pads linked. Instead of storing
+	  them ourselves rely on the pad storage that already orders it for us
+	  https://bugzilla.gnome.org/show_bug.cgi?id=732596
+
+2014-07-21 21:03:26 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/gstfacedetect.c:
+	  facedetect: improve enum GstFaceDetectUpdates descriptions
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730509
+
+2014-05-21 12:59:57 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/gstfacedetect.c:
+	  facedetect: make updates on_change works as expected
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730509
+
+2014-07-22 12:42:36 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/pnm/gstpnmenc.c:
+	* gst/pnm/gstpnmenc.h:
+	  pnmenc: Port PNM Encoder to use GstVideoEncoder Class
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731943
+
+2014-06-18 11:44:54 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/pnm/gstpnmdec.c:
+	* gst/pnm/gstpnmutils.c:
+	  pnmdec: Patch to handle max value
+	  Convert the image values from 0-maxvalue to 0-255 when
+	  'decoding' the pnm image
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731773
+
+2014-07-15 16:42:57 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* ext/kate/gstkatedec.c:
+	* ext/kate/gstkateutil.c:
+	  katedec: handle segment event earlier
+	  Delaying the segment event to when caps are decided can cause issues as
+	  the first thing katedec does on its chain function it doing a segment clip.
+	  It will lead to an assertion if the segment format is undefined
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733226
+
+2014-07-15 16:41:51 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* ext/kate/gstkatedec.c:
+	  katedec: handle streamheaders in caps
+	  Properly handle the caps event by configuring the kate decoding lib using the
+	  available streamheaders. This makes it possible to decode kate subtitles when
+	  the stream is seeked before katedec gets the initial buffers that are usually
+	  the streamheaders.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733226
+
 2014-07-21 17:34:52 +0200  Sebastian Dröge <sebastian@centricular.com>
 
 	* configure.ac:
@@ -2170,17 +21537,31 @@
 	  ^
 	  = 0
 
-2014-07-21 21:03:26 +0200  Nicola Murino <nicola.murino@gmail.com>
+2014-07-17 16:25:54 +0200  Fabrice Bellet <fabrice@bellet.info>
 
-	* ext/opencv/gstfacedetect.c:
-	  facedetect: improve enum GstFaceDetectUpdates descriptions
-	  https://bugzilla.gnome.org/show_bug.cgi?id=730509
+	* gst-libs/gst/codecparsers/gstmpeg4parser.c:
+	  parser: mpeg4: fix vlc table used for sprite trajectory
+	  The vlc table members cbits, cword and values were assigned in the wrong
+	  order, causing the mpeg4 parser to fail when handling sprite
+	  trajectories.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=733322
 
-2014-05-21 12:59:57 +0200  Nicola Murino <nicola.murino@gmail.com>
+2014-07-18 15:09:54 +0200  Sebastian Dröge <sebastian@centricular.com>
 
-	* ext/opencv/gstfacedetect.c:
-	  facedetect: make updates on_change works as expected
-	  https://bugzilla.gnome.org/show_bug.cgi?id=730509
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Make statistics message more generic for other adaptive streaming demuxers to reuse
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725828
+
+2014-02-25 11:58:57 +0100  Alexander Zallesov <zallesov@gmail.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Provide statistics about time to download playlists and fragments
+	  https://bugzilla.gnome.org/show_bug.cgi?id=725828
+
+2014-07-19 18:04:42 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  Back to development
 
 === release 1.4.0 ===
 
@@ -103044,6 +122425,8 @@
 	  every file but apart from that no changes compared to the latest
 	  SVN versions happened.
 
+=== release 0.10.21 ===
+
 2008-09-01 16:05:45 +0000  Edward Hervey <bilboed@bilboed.com>
 
 	  tests/check/elements/audioresample.c: Now that GstBaseTransform is 'fixed' ... remove cruft from tests.
@@ -106548,6 +125931,8 @@
 	  (deinterleave_suite):
 	  Add some more deinterleave unit test bits I had locally.
 
+=== release 0.10.20 ===
+
 2008-05-14 13:57:41 +0000  Tim-Philipp Müller <tim@centricular.net>
 
 	  gst/audioresample/gstaudioresample.c: Revert previous change which made basetransform handle buffer_alloc and which b...
@@ -108104,6 +127489,8 @@
 	  Use AG_GST_CHECK_PLUGIN and AG_GST_DISABLE_PLUGIN to simplify which
 	  plug-ins are included/excluded. (#498222)
 
+=== release 0.10.19 ===
+
 2008-03-03 06:04:02 +0000  Sebastian Dröge <slomo@circular-chaos.org>
 
 	  Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
@@ -112293,6 +131680,8 @@
 	  (gst_speex_resample_update_state):
 	  Only post the latency message if we have a resampler state already.
 
+=== release 0.10.17 ===
+
 2007-11-23 10:21:11 +0000  Sebastian Dröge <slomo@circular-chaos.org>
 
 	  gst/audioresample/gstaudioresample.c: Implement latency query.
@@ -117260,6 +136649,8 @@
 	  work with earlier versions due to GstChildProxy brokeness).
 	  Also up requirements to last released core/base.
 
+=== release 0.10.15 ===
+
 2007-04-27 15:33:46 +0000  Julien Moutte <julien@moutte.net>
 
 	  ext/theora/theoradec.c: Calculate buffer duration correctly to generate a perfect stream (#433888).
@@ -119589,6 +138980,8 @@
 	  Original commit message from CVS:
 	  move amrwb code
 
+=== release 0.10.12 ===
+
 2007-01-04 12:49:47 +0000  Thomas Vander Stichele <thomas@apestaart.org>
 
 	  configure.ac: split out GST_CFLAGS into GST_PLUGINS_BASE_CFLAGS and GST_CFLAGS so that GST_BASE_CFLAGS can go inbetwe...
diff --git a/INSTALL b/INSTALL
index b42a17a..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,48 +1,80 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
 those values to create a `Makefile' in each directory of the package.
 It may also create one or more `.h' files containing system-dependent
 definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
 diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
 
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
 
-  5. You can remove the program binaries and object files from the
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -51,62 +83,119 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -119,25 +208,80 @@
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
      CPU-COMPANY-SYSTEM
 
-See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
+where SYSTEM can have one of these forms:
 
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
 
 Sharing Defaults
 ================
@@ -150,19 +294,56 @@
 `CONFIG_SITE' environment variable to the location of the site script.
 A warning: not all `configure' scripts look for a site script.
 
-Operation Controls
+Defining Variables
 ==================
 
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
    `configure' recognizes the following options to control how it
 operates.
 
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
-
 `--help'
-     Print a summary of the options to `configure', and exit.
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
 
 `--quiet'
 `--silent'
@@ -175,8 +356,15 @@
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
 
-`configure' also accepts some other, not widely useful, options.
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
index 3eb1bca..e93ec1f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,14 +25,18 @@
 include $(top_srcdir)/common/po.mak
 
 check-valgrind:
-	cd tests/check && make check-valgrind
+	$(MAKE) -C tests/check check-valgrind
 
 if HAVE_GST_CHECK
 check-torture:
-	cd tests/check && make torture
+	$(MAKE) -C tests/check torture
+build-checks:
+	$(MAKE) -C tests/check build-checks
 else
 check-torture:
 	true
+build-checks:
+	true
 endif
 
 win32-update:
@@ -84,6 +88,7 @@
 	$(top_builddir)/tests/icles/equalizer-test
 
 CRUFT_DIRS = \
+	$(top_srcdir)/docs/plugins/tmpl \
 	$(top_srcdir)/gst/aacparse \
 	$(top_srcdir)/gst/amrparse \
 	$(top_srcdir)/gst/camerabin \
diff --git a/Makefile.in b/Makefile.in
index cb327aa..94829af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,17 @@
 #
 # set CRUFT_FILES and/or CRUFT_DIRS in your Makefile.am when you include this
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -89,15 +99,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/win32.mak \
-	$(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak \
-	$(top_srcdir)/common/coverage/lcov.mak \
-	$(top_srcdir)/common/cruft.mak INSTALL NEWS README AUTHORS \
-	ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/configure $(am__configure_deps) \
-	$(srcdir)/config.h.in $(srcdir)/gst-plugins-bad.spec.in \
-	ABOUT-NLS COPYING COPYING.LIB compile config.guess \
-	config.rpath config.sub depcomp install-sh missing ltmain.sh
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -106,6 +107,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -119,7 +121,6 @@
 	$(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 \
@@ -136,6 +137,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -198,6 +201,14 @@
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/gst-plugins-bad.spec.in \
+	$(top_srcdir)/common/coverage/lcov.mak \
+	$(top_srcdir)/common/cruft.mak $(top_srcdir)/common/po.mak \
+	$(top_srcdir)/common/release.mak \
+	$(top_srcdir)/common/win32.mak ABOUT-NLS AUTHORS COPYING \
+	COPYING.LIB ChangeLog INSTALL NEWS README compile config.guess \
+	config.rpath config.sub depcomp install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -256,8 +267,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -282,8 +295,6 @@
 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@
@@ -296,7 +307,6 @@
 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@
@@ -304,6 +314,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -330,11 +342,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -353,8 +368,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -413,10 +426,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -433,7 +450,6 @@
 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@
@@ -442,7 +458,6 @@
 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@
@@ -455,7 +470,6 @@
 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@
@@ -469,6 +483,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -480,6 +495,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -518,6 +535,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -553,10 +571,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -582,6 +604,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -589,7 +614,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -618,6 +650,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -628,6 +661,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -658,17 +692,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -685,6 +718,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -723,6 +757,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -806,6 +841,7 @@
 	$(top_builddir)/tests/icles/equalizer-test
 
 CRUFT_DIRS = \
+	$(top_srcdir)/docs/plugins/tmpl \
 	$(top_srcdir)/gst/aacparse \
 	$(top_srcdir)/gst/amrparse \
 	$(top_srcdir)/gst/camerabin \
@@ -860,7 +896,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -870,7 +905,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/win32.mak $(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak $(top_srcdir)/common/coverage/lcov.mak $(top_srcdir)/common/cruft.mak:
+$(top_srcdir)/common/win32.mak $(top_srcdir)/common/release.mak $(top_srcdir)/common/po.mak $(top_srcdir)/common/coverage/lcov.mak $(top_srcdir)/common/cruft.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
@@ -1096,15 +1131,15 @@
 	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
-	@echo WARNING: "Support for shar distribution archives is" \
-	               "deprecated." >&2
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__post_remove_distdir)
 
 dist-shar: distdir
-	@echo WARNING: "Support for distribution archives compressed with" \
-		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
@@ -1140,18 +1175,18 @@
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_inst
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 	  && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
 	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	    --srcdir=.. --prefix="$$dc_install_base" \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -1329,6 +1364,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 win32-debug:
 	@echo; \
@@ -1431,12 +1468,16 @@
 	$(top_srcdir)/common/download-translations $(PACKAGE)
 
 check-valgrind:
-	cd tests/check && make check-valgrind
+	$(MAKE) -C tests/check check-valgrind
 
 @HAVE_GST_CHECK_TRUE@check-torture:
-@HAVE_GST_CHECK_TRUE@	cd tests/check && make torture
+@HAVE_GST_CHECK_TRUE@	$(MAKE) -C tests/check torture
+@HAVE_GST_CHECK_TRUE@build-checks:
+@HAVE_GST_CHECK_TRUE@	$(MAKE) -C tests/check build-checks
 @HAVE_GST_CHECK_FALSE@check-torture:
 @HAVE_GST_CHECK_FALSE@	true
+@HAVE_GST_CHECK_FALSE@build-checks:
+@HAVE_GST_CHECK_FALSE@	true
 
 win32-update:
 	cp $(top_builddir)/win32/common/config.h-new \
diff --git a/NEWS b/NEWS
index a27c206..3a1cf0b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,2 +1,2 @@
-This is GStreamer Bad Plugins 1.4.5
+This is GStreamer Bad Plugins 1.5.91
 
diff --git a/README b/README
index da0cab4..f175b1b 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-GStreamer 1.3.x development series
+GStreamer 1.5.x development series
 
 WHAT IT IS
 ----------
diff --git a/RELEASE b/RELEASE
index df1ee5b..a2a46c6 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,27 +1,16 @@
 
-Release notes for GStreamer Bad Plugins 1.4.5
-
-The GStreamer team is pleased to announce a bugfix release of the stable
-1.4 release series. The 1.4 release series is adding new features on top
-of the 1.2 series and is part of the API and ABI-stable 1.x release
-series of the GStreamer multimedia framework that contains new features.
-The 1.4.x bugfix releases only contain important bugfixes compared to 1.4.0.
+Release notes for GStreamer Bad Plugins 1.5.91
 
 
-Binaries for Android, iOS, Mac OS X and Windows are provided by the
-GStreamer project for this release.
+The GStreamer team is pleased to announce the second release candidate for the
+stable 1.6 release series. The 1.6 release series is adding new features on top of
+the 1.0, 1.2 and 1.4 series and is part of the API and ABI-stable 1.x release
+series of the GStreamer multimedia framework. The final 1.6.0 release is planned
+in the next few days unless any major bugs are found.
 
 
-The 1.x series is a stable series targeted at end users. It is not API
-or ABI compatible with the 0.10.x series. It can, however, be installed
-in parallel with the 0.10.x series and will not affect an existing
-0.10.x installation.
-
-
-The stable 1.4.x release series is API and ABI compatible with 1.0.x and
-any other 1.x release series in the future. Compared to 1.0.x it contains
-some new features and more intrusive changes that were considered too
-risky as a bugfix.
+Binaries for Android, iOS, Mac OS X and Windows will be provided separately by
+the GStreamer project.
 
 
 
@@ -73,14 +62,54 @@
 
 Bugs fixed in this release
      
-      * 722764 : rawparse: fix SEEKING query handling
-      * 729768 : mpegtsbase: Raise limit to read more bytes initially to find PCR
-      * 739152 : gl/cocoa: build with GNUStep fails
-      * 740191 : dvbbasesink: segfaults on 32-bit (rpi)
-      * 740201 : gl/cocoa: Does not compile on OSX < 10.7 anymore
-      * 740451 : srtpdec: leaks rtp/rtcp sink events
-      * 740953 : configure.ac: unportable test(1) comparison operator
-      * 741321 : opusparse: fix header parsing esp. of encoded output of libopus
+      * 751508 : tsdemux: jerky sound on some multicast streams (regression)
+      * 752480 : dashdemux: negative values for r attribute in S node are not supported
+      * 753152 : pcapparse wrong magic when used with identity sync=1
+      * 753196 : audio/videoaggregator:  Assumes that running time starts at seeking position after a seek (but it starts at 0 for flushing seeks)
+      * 753344 : hlsdemux: Fix playback of live streams
+      * 753758 : ios: Does not shut down context and navigation GMainLoop
+      * 753805 : compositor/videoaggregator: Crashes because of invalid video info
+      * 753812 : qt: Checks for Qt5 don't require new enough version.
+      * 753813 : dashdemux: replace use of xmlNodeDump as it is described as a deprecated function
+      * 753818 : hlsdemux: deadlock on stop
+      * 753820 : video-bad: fix build failure
+      * 753822 : assrender: do not crash when video frame mapping fails
+      * 753837 : dtsdec: overwritten init value
+      * 753881 : hls/m3u8: make check fails for hlsdemux_m3u8 due to floating point rounding error
+      * 753905 : android emulator returns NULL for GL_SHADING_LANGUAGE_VERSION
+      * 753913 : caopengllayersink: Don't chain up to parent's query handling twice for DRAIN query
+      * 753915 : audiomixer: Remove duplicated word in comment
+      * 753937 : dashdemux: don't meddle with the class struct from an instance
+      * 753944 : curl: configure check for netinet/ip.h doesn't work on FreeBSD
+      * 754024 : codecparsers: Various HEVC codecparser fixes
+      * 754047 : glupload: Loses overlay meta when using raw uploader
+      * 754107 : compositor: Inputs are " obscured " when they aren't
+      * 754108 : qmlsink: Ensure that at least one windowing system is available
+      * 754122 : h265parse/h264parse: Crashes instead of returning not-negotiated
+      * 754222 : adaptivedemux: Timestamping of multi-period streams is not correct
+      * 754291 : videoaggregator: Compositor fails with " reason not-negotiated " when changing the pixel-aspect-ratio during runtime
+      * 754465 : compositor: Negotiation failure with ARGB64
+      * 754504 : vtdec: invalid colorimetry and generating greenish output
+      * 754528 : decklinkvideosink: Properly handle pipelines where the running time does not start around 0
+      * 754576 : compositor: input stream is wrongly considered obscured in some cases (regression)
+      * 754666 : decklinkvideosink: Consider pipeline latency when scheduling frames
+      * 754668 : mpdparser: fix incorrect start value scaling
+      * 754686 : adaptivedemux: statistics message name macro is unprefixed
+      * 754732 : gl: (ubuntu) error: conflicting types for 'GLsizeiptr' ( & more)
+      * 754756 : directsoundsrc: Compiler warning with 64bit Windows MinGW, cast from pointer to integer of different size
+      * 754757 : gl/eagl: Don't make context uncurrent just to make it current again in the next line
+      * 754819 : opusenc: critical/warning when dumping dots
+      * 754834 : codecparsers: hevc:  Fixes in scaling list value and NumPocTocalCurr value calculation
+      * 754851 : aggregator: Use the whole aggregator latency for the queue size, not just the latency property
+      * 755042 : dashdemux: sidx parsing crashes at end of stream
+      * 755047 : mssdemux/dashdemux: live playback regression
+      * 755049 : intervideosrc doesn't render the preroll frame (in paused state)
+      * 755059 : opusdec: negotiation regression
+      * 755111 : Regression: glimagesink 3D video handling
+      * 755113 : Regression: dvbsuboverlay negotiates invalid caps
+      * 755140 : gstgl: Fix GError leaks during failures
+      * 755142 : avdtputil: fix GError memory leak during failures
+      * 755156 : vtdec: resizing glimagesink results in a not-negotiated error
 
 ==== Download ====
 
@@ -117,17 +146,31 @@
         
 Contributors to this release
     
-      * Aleix Conchillo Flaqué
-      * Alessandro Decina
-      * Gwenole Beauchesne
-      * Mathieu Duponchelle
+      * Alex Ashley
+      * Arnaud Vrac
+      * Athanasios Oikonomou
+      * Ben Browitt
+      * Carlos Rafael Giani
+      * Jan Schmidt
+      * Justin Kim
+      * Koop Mast
+      * Kouhei Sutou
+      * Luis de Bethencourt
       * Matthew Waters
+      * Miguel París Díaz
+      * Nicolas Dufresne
+      * Nirbheek Chauhan
+      * Olivier Crête
+      * Philippe Normand
       * Sebastian Dröge
-      * Sudip Jain
+      * Sreerenj Balachandran
+      * Thiago Santos
       * Thibault Saunier
-      * Thomas Klausner
       * Tim-Philipp Müller
+      * Vanessa Chipirrás Navalón
       * Vincent Penquerc'h
-      * Wim Taymans
-      * Wonchul Lee
+      * Vineeth T M
+      * XuGuangxin
+      * hoonhee.lee
+      * lyb
  
\ No newline at end of file
diff --git a/aclocal.m4 b/aclocal.m4
index cc915e4..2144811 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -408,7 +408,7 @@
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -498,8 +498,8 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -573,6 +573,9 @@
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
 fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -602,7 +605,7 @@
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -613,7 +616,7 @@
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -623,7 +626,7 @@
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -645,7 +648,7 @@
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -680,7 +683,7 @@
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -730,7 +733,7 @@
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -767,7 +770,7 @@
 fi
 ])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -801,7 +804,7 @@
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -830,7 +833,7 @@
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -877,7 +880,7 @@
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1112,7 +1115,7 @@
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1131,7 +1134,7 @@
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1212,7 +1215,7 @@
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1272,7 +1275,7 @@
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1300,7 +1303,7 @@
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1319,7 +1322,7 @@
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1456,6 +1459,7 @@
 m4_include([common/m4/as-libtool.m4])
 m4_include([common/m4/as-version.m4])
 m4_include([common/m4/ax_create_stdint_h.m4])
+m4_include([common/m4/ax_pthread.m4])
 m4_include([common/m4/gst-arch.m4])
 m4_include([common/m4/gst-args.m4])
 m4_include([common/m4/gst-check.m4])
@@ -1469,7 +1473,6 @@
 m4_include([common/m4/gst-platform.m4])
 m4_include([common/m4/gst-plugin-docs.m4])
 m4_include([common/m4/gst-plugindir.m4])
-m4_include([common/m4/gst-x11.m4])
 m4_include([common/m4/gst.m4])
 m4_include([common/m4/gtk-doc.m4])
 m4_include([common/m4/introspection.m4])
diff --git a/autogen.sh b/autogen.sh
index a4e27b7..7912654 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,7 +13,6 @@
 olddir=`pwd`
 cd "$srcdir"
 
-DIE=0
 package=gst-plugins-bad
 srcfile=gst-plugins-bad.doap
 
@@ -56,24 +55,25 @@
 autogen_options $@
 
 printf "+ check for build tools"
-if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
-              "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.11" \
-              "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
-version_check "autopoint" "autopoint" \
-              "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
-version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
-              "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
-version_check "pkg-config" "" \
-              "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
+if test -z "$NOCHECK"; then
+  echo
 
-die_check $DIE
+  printf "  checking for autoreconf ... "
+  echo
+  which "autoreconf" 2>/dev/null || {
+    echo "not found! Please install the autoconf package."
+    exit 1
+  }
 
-aclocal_check || DIE=1
-autoheader_check || DIE=1
-
-die_check $DIE
+  printf "  checking for pkg-config ... "
+  echo
+  which "pkg-config" 2>/dev/null || {
+    echo "not found! Please install pkg-config."
+    exit 1
+  }
+else
+  echo ": skipped version checks"
+fi
 
 # if no arguments specified then this will be printed
 if test -z "$*" && test -z "$NOCONFIGURE"; then
@@ -87,23 +87,14 @@
 toplevel_check $srcfile
 
 # autopoint
-if test -d po ; then
-  tool_run "$autopoint" "--force"
+if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then
+  tool_run "autopoint" "--force"
 fi
 
 # aclocal
 if test -f acinclude.m4; then rm acinclude.m4; fi
 
-tool_run "$libtoolize" "--copy --force"
-tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
-tool_run "$autoheader"
-
-# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
-echo timestamp > stamp-h.in 2> /dev/null
-
-tool_run "$autoconf"
-debug "automake: $automake"
-tool_run "$automake" "--add-missing --copy"
+autoreconf --force --install || exit 1
 
 test -n "$NOCONFIGURE" && {
   echo "+ skipping configure stage for package $package, as requested."
diff --git a/common/Makefile.am b/common/Makefile.am
index 25966fc..1eac7d8 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -8,7 +8,7 @@
 	parallel-subdirs.mak \
 	gst-autogen.sh \
 	check-exports \
-	c-to-xml.py mangle-tmpl.py scangobj-merge.py \
+	c-to-xml.py mangle-db.py scangobj-merge.py \
 	gtk-doc-plugins.mak \
 	plugins.xsl gstdoc-scangobj \
 	gst.supp check.mak \
diff --git a/common/Makefile.in b/common/Makefile.in
index c5076b2..97a37b2 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = common
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ChangeLog \
-	README
 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 \
@@ -88,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -101,7 +110,6 @@
 	$(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 \
@@ -118,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -177,6 +186,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in ChangeLog README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -219,8 +229,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -245,8 +257,6 @@
 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@
@@ -259,7 +269,6 @@
 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@
@@ -267,6 +276,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -293,11 +304,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -316,8 +330,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -376,10 +388,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -396,7 +412,6 @@
 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@
@@ -405,7 +420,6 @@
 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@
@@ -418,7 +432,6 @@
 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@
@@ -432,6 +445,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -443,6 +457,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -481,6 +497,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -516,10 +533,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -545,6 +566,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -552,7 +576,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -581,6 +612,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -591,6 +623,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -621,17 +654,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -648,6 +680,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -686,6 +719,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -708,7 +742,7 @@
 	parallel-subdirs.mak \
 	gst-autogen.sh \
 	check-exports \
-	c-to-xml.py mangle-tmpl.py scangobj-merge.py \
+	c-to-xml.py mangle-db.py scangobj-merge.py \
 	gtk-doc-plugins.mak \
 	plugins.xsl gstdoc-scangobj \
 	gst.supp check.mak \
@@ -736,7 +770,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu common/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1031,6 +1064,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/common/check.mak b/common/check.mak
index 611546a..8a90b5d 100644
--- a/common/check.mak
+++ b/common/check.mak
@@ -16,37 +16,38 @@
 # run any given test by running make test.check
 # if the test fails, run it again at at least debug level 2
 %.check: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
-	@$(TESTS_ENVIRONMENT)					\
+	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -55,16 +56,16 @@
 	--tool=memcheck --leak-check=full --trace-children=yes	\
 	--show-possibly-lost=no                                 \
 	--leak-resolution=high --num-callers=20			\
-	./$* 2>&1 | tee valgrind.log
-	@if grep "==" valgrind.log > /dev/null 2>&1; then	\
-	    rm valgrind.log;					\
+	./$* 2>&1 | tee $$valgrind_log ;			\
+	if grep "==" $$valgrind_log > /dev/null 2>&1; then	\
+	    rm $$valgrind_log;					\
 	    exit 1;						\
-	fi
-	@rm valgrind.log
+	fi ;							\
+	rm $$valgrind_log
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -94,7 +95,7 @@
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -150,19 +151,13 @@
 # valgrind all tests
 valgrind: $(TESTS)
 	@echo "Valgrinding tests ..."
-	@failed=0;							\
+	@failed=0; valgrind_targets="";					\
 	for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do	\
-		$(MAKE) $$t.valgrind;					\
-		if test "$$?" -ne 0; then                               \
-			echo "Valgrind error for test $$t";		\
-			failed=`expr $$failed + 1`;			\
-			whicht="$$whicht $$t";				\
-		fi;							\
+	  valgrind_targets="$$valgrind_targets $$t.valgrind";		\
 	done;								\
-	if test "$$failed" -ne 0; then					\
-		echo "$$failed tests had leaks or errors under valgrind:";	\
-		echo "$$whicht";					\
-		false;							\
+	if ! $(MAKE) $$valgrind_targets ; then				\
+	  echo "Some tests had leaks or errors under valgrind";		\
+	  false;							\
 	fi
 
 # valgrind all tests until failure
@@ -210,11 +205,14 @@
 GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION)
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
 
+# build all tests
+build-checks: $(TESTS)
+
 help:
 	@echo
 	@echo "make check                         -- run all checks"
@@ -237,6 +235,7 @@
 	@echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions"
 	@echo "                                               and save to suppressions.log"
 	@echo "make inspect                       -- inspect all plugin features"
+	@echo "make build-checks                  -- build all checks (but don't run them)"
 	@echo
 	@echo
 	@echo "Additionally, you can use the GST_CHECKS environment variable to"
diff --git a/common/gst-autogen.sh b/common/gst-autogen.sh
index 78cab66..71049e6 100644
--- a/common/gst-autogen.sh
+++ b/common/gst-autogen.sh
@@ -20,216 +20,6 @@
   fi
 }
 
-version_get ()
-# based on the command's version output, set variables
-# _MAJOR, _MINOR, _MICRO, _VERSION, using the given prefix as variable prefix
-#
-# arg 1: command binary name
-# arg 2: (uppercased) variable name prefix
-{
-  COMMAND=$1
-  VARPREFIX=`echo $2 | tr .,- _`
-  local ${VARPREFIX}_VERSION
-
-  # strip everything that's not a digit, then use cut to get the first field
-  pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
-  debug "pkg_version $pkg_version"
-  # remove any non-digit characters from the version numbers to permit numeric
-  # comparison
-  pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
-  pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
-  pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
-  test -z "$pkg_major" && pkg_major=0
-  test -z "$pkg_minor" && pkg_minor=0
-  test -z "$pkg_micro" && pkg_micro=0
-  debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
-  eval ${VARPREFIX}_MAJOR=$pkg_major
-  eval ${VARPREFIX}_MINOR=$pkg_minor
-  eval ${VARPREFIX}_MICRO=$pkg_micro
-  eval ${VARPREFIX}_VERSION=$pkg_version
-}
-
-version_compare ()
-# Checks whether the version of VARPREFIX is equal to or
-# newer than the requested version
-# arg1: VARPREFIX
-# arg2: MAJOR
-# arg3: MINOR
-# arg4: MICRO
-{
-  VARPREFIX=`echo $1 | tr .,- _`
-  MAJOR=$2
-  MINOR=$3
-  MICRO=$4
-
-  eval pkg_major=\$${VARPREFIX}_MAJOR;
-  eval pkg_minor=\$${VARPREFIX}_MINOR;
-  eval pkg_micro=\$${VARPREFIX}_MICRO;
-
-  #start checking the version
-  debug "version_compare: $VARPREFIX against $MAJOR.$MINOR.$MICRO"
-
-    # reset check
-    WRONG=
-
-    if [ ! "$pkg_major" -gt "$MAJOR" ]; then
-      debug "major: $pkg_major <= $MAJOR"
-      if [ "$pkg_major" -lt "$MAJOR" ]; then
-        debug "major: $pkg_major < $MAJOR"
-        WRONG=1
-      elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
-        debug "minor: $pkg_minor <= $MINOR"
-        if [ "$pkg_minor" -lt "$MINOR" ]; then
-          debug "minor: $pkg_minor < $MINOR"
-          WRONG=1
-        elif [ "$pkg_micro" -lt "$MICRO" ]; then
-          debug "micro: $pkg_micro < $MICRO"
-	  WRONG=1
-        fi
-      fi
-    fi
-    if test ! -z "$WRONG"; then
-      debug "version_compare: $VARPREFIX older than $MAJOR.$MINOR.$MICRO"
-      return 1
-    fi
-    debug "version_compare: $VARPREFIX equal to/newer than $MAJOR.$MINOR.$MICRO"
-    return 0
-}
-
-
-version_check ()
-# check the version of a package
-# first argument : package name (executable)
-# second argument : optional path where to look for it instead
-# third argument : source download url
-# rest of arguments : major, minor, micro version
-# all consecutive ones : suggestions for binaries to use
-# (if not specified in second argument)
-{
-  PACKAGE=$1
-  PKG_PATH=$2
-  URL=$3
-  MAJOR=$4
-  MINOR=$5
-  MICRO=$6
-
-  # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null
-  if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi
-  debug "major $MAJOR minor $MINOR micro $MICRO"
-  VERSION=$MAJOR
-  if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
-  if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
-
-  debug "major $MAJOR minor $MINOR micro $MICRO"
-
-  for SUGGESTION in $PKG_PATH; do
-    COMMAND="$SUGGESTION"
-
-    # don't check if asked not to
-    test -z "$NOCHECK" && {
-      printf "  checking for $COMMAND >= $VERSION ... "
-    } || {
-      # we set a var with the same name as the package, but stripped of
-      # unwanted chars
-      VAR=`echo $PACKAGE | sed 's/-//g'`
-      debug "setting $VAR"
-      eval $VAR="$COMMAND"
-      return 0
-    }
-
-    which $COMMAND > /dev/null 2>&1
-    if test $? -eq 1;
-    then 
-      debug "$COMMAND not found"
-      continue
-    fi
-
-    VARPREFIX=`echo $COMMAND | sed 's/-//g' | tr [:lower:] [:upper:]`
-    version_get $COMMAND $VARPREFIX
-
-    version_compare $VARPREFIX $MAJOR $MINOR $MICRO
-    if test $? -ne 0; then
-      echo "found $pkg_version, not ok !"
-      continue
-    else
-      echo "found $pkg_version, ok."
-      # we set a var with the same name as the package, but stripped of
-      # unwanted chars
-      VAR=`echo $PACKAGE | sed 's/-//g'`
-      debug "setting $VAR"
-      eval $VAR="$COMMAND"
-      return 0
-    fi
-  done
-
-  echo "$PACKAGE not found !"
-  echo "You must have $PACKAGE installed to compile $package."
-  echo "Download the appropriate package for your distribution,"
-  echo "or get the source tarball at $URL"
-  return 1;
-}
-
-aclocal_check ()
-{
-  # normally aclocal is part of automake
-  # so we expect it to be in the same place as automake
-  # so if a different automake is supplied, we need to adapt as well
-  # so how's about replacing automake with aclocal in the set var,
-  # and saving that in $aclocal ?
-  # note, this will fail if the actual automake isn't called automake*
-  # or if part of the path before it contains it
-  if [ -z "$automake" ]; then
-    echo "Error: no automake variable set !"
-    return 1
-  else
-    aclocal=`echo $automake | sed s/automake/aclocal/`
-    debug "aclocal: $aclocal"
-    if [ "$aclocal" != "aclocal" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
-    fi
-    if [ ! -x `which $aclocal` ]; then
-      echo "Error: cannot execute $aclocal !"
-      return 1
-    fi
-  fi
-}
-
-autoheader_check ()
-{
-  # same here - autoheader is part of autoconf
-  # use the same voodoo
-  if [ -z "$autoconf" ]; then
-    echo "Error: no autoconf variable set !"
-    return 1
-  else
-    autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
-    debug "autoheader: $autoheader"
-    if [ "$autoheader" != "autoheader" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
-    fi
-    if [ ! -x `which $autoheader` ]; then
-      echo "Error: cannot execute $autoheader !"
-      return 1
-    fi
-  fi
-
-}
-
-die_check ()
-{
-  # call with $DIE
-  # if set to 1, we need to print something helpful then die
-  DIE=$1
-  if test "x$DIE" = "x1";
-  then
-    echo
-    echo "- Please get the right tools before proceeding."
-    echo "- Alternatively, if you're sure we're wrong, run with --nocheck."
-    exit 1
-  fi
-}
 
 autogen_options ()
 {
diff --git a/common/gst-indent b/common/gst-indent
index 732b2ba..b5e808f 100755
--- a/common/gst-indent
+++ b/common/gst-indent
@@ -9,13 +9,19 @@
 
 version=`gnuindent --version 2>/dev/null`
 if test "x$version" = "x"; then
-  version=`indent --version 2>/dev/null`
+  version=`gindent --version 2>/dev/null`
   if test "x$version" = "x"; then
-    echo "GStreamer git pre-commit hook:"
-    echo "Did not find GNU indent, please install it before continuing."
-    exit 1
+    version=`indent --version 2>/dev/null`
+    if test "x$version" = "x"; then
+      echo "GStreamer git pre-commit hook:"
+      echo "Did not find GNU indent, please install it before continuing."
+      exit 1
+    else
+      INDENT=indent
+    fi
+  else
+    INDENT=gindent
   fi
-  INDENT=indent
 else
   INDENT=gnuindent
 fi
diff --git a/common/gst.supp b/common/gst.supp
index 2c60392..81f98a9 100644
--- a/common/gst.supp
+++ b/common/gst.supp
@@ -3965,3 +3965,58 @@
    ...
    fun:g_quark_from*_string
 }
+
+{
+  <timer_create suppressions for earlier valgrind versions that complain>
+  Memcheck:Param
+  timer_create(evp)
+  fun:timer_create@@GLIBC_2.3.3
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_cclosure_new
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:malloc
+   ...
+   fun:g_closure_add_invalidate_notifier
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_closure_new_simple
+}
+
+{
+   glib/giomodules2 (from libsoup.supp)
+   Memcheck:Leak
+   ...
+   fun:_g_io_module_get_default
+}
+
+{
+   <valgrind bug when trying to parse "infinity" from "interleaved">
+   Memcheck:Addr8
+   fun:__GI___strncasecmp_l
+   fun:____strtod_l_internal
+   fun:gst_value_deserialize_double
+}
+
+{
+   <glibc overreads/conditionals>
+   Memcheck:Addr8
+   fun:do_lookup_x
+}
diff --git a/common/gstdoc-scangobj b/common/gstdoc-scangobj
index 4ad9786..906857c 100755
--- a/common/gstdoc-scangobj
+++ b/common/gstdoc-scangobj
@@ -110,6 +110,8 @@
 my $new_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites.new";
 my $old_args_filename = "$OUTPUT_DIR/$MODULE.args";
 my $new_args_filename = "$OUTPUT_DIR/$MODULE.args.new";
+my $old_sections_filename = "$OUTPUT_DIR/$MODULE-sections";
+my $new_sections_filename = "$OUTPUT_DIR/$MODULE-sections.new";
 
 my $debug_log="g_message";
 if (!defined($VERBOSE) or $VERBOSE eq "0") {
@@ -437,32 +439,30 @@
 const gchar *interfaces_filename = "$new_interfaces_filename";
 const gchar *prerequisites_filename = "$new_prerequisites_filename";
 const gchar *args_filename = "$new_args_filename";
+const gchar *sections_filename = "$new_sections_filename";
 
 
 static void output_signals (void);
-static void output_object_signals (FILE *fp,
-				   GType object_type);
-static void output_object_signal (FILE *fp,
-				  const gchar *object_class_name,
+static void output_object_signals (FILE *fp, GType object_type);
+static void output_object_signal (FILE *fp, const gchar *object_class_name,
 				  guint signal_id);
-static const gchar * get_type_name (GType type,
-			            gboolean * is_pointer);
+static const gchar * get_type_name (GType type, gboolean * is_pointer);
 static void output_object_hierarchy (void);
-static void output_hierarchy (FILE *fp,
-			      GType type,
-			      guint level);
+static void output_hierarchy (FILE *fp, GType type, guint level);
 
 static void output_object_interfaces (void);
-static void output_interfaces (FILE *fp,
-			       GType type);
+static void output_interfaces (FILE *fp, GType type);
 
 static void output_interface_prerequisites (void);
-static void output_prerequisites (FILE *fp,
-			          GType type);
+static void output_prerequisites (FILE *fp, GType type);
 
 static void output_args (void);
 static void output_object_args (FILE *fp, GType object_type);
 
+static void output_sections (void);
+static void output_object_section (FILE *fp, GType object_type);
+
+
 int
 main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char *argv[])
 {
@@ -475,6 +475,8 @@
   output_object_interfaces ();
   output_interface_prerequisites ();
   output_args ();
+  
+  output_sections ();
 
   return 0;
 }
@@ -1570,6 +1572,139 @@
     break;
   }
 }
+
+static void
+output_sections (void)
+{
+  FILE *fp;
+  gint i;
+
+  fp = fopen (sections_filename, "w");
+  if (fp == NULL)
+    {
+      g_warning ("Couldn't open output file: %s : %s", sections_filename, g_strerror(errno));
+      return;
+    }
+
+  for (i = 0; object_types[i]; i++) { }
+  qsort (object_types, i, sizeof (GType), compare_types);
+    
+  for (i = 0; object_types[i]; i++) {
+    output_object_section (fp, object_types[i]);
+  }
+
+  fclose (fp);
+}
+
+static gboolean
+find_by_type (GstPluginFeature *f, gpointer data) {
+  return (GST_IS_ELEMENT_FACTORY(f) && 
+      ((GType)data == gst_element_factory_get_element_type (GST_ELEMENT_FACTORY(f))));
+}
+
+static void
+output_object_section (FILE *fp, GType object_type)
+{
+  /* e.g. GstFakeSink */
+  const gchar *tn = g_type_name (object_type);
+  const gchar *cct = &tn[3]; /* cut 'Gst' */
+  gchar *title, *lct, *uct;
+  gint i, j, l = strlen(cct);
+  gpointer class;
+  GParamSpec **properties;
+  guint n_properties;
+  const gchar *ptn;
+  gchar *ptns;
+  GString *strbuf = g_string_new (NULL);
+  GList *fl;
+  GstPluginFeature *f = NULL;
+  gboolean need_unserscore = TRUE, have_abbrev = FALSE;
+  
+  fl = gst_registry_feature_filter (gst_registry_get(), find_by_type, TRUE, 
+    (gpointer)object_type);
+  if (fl) {
+    f = fl->data;
+    g_list_free(fl);
+  }
+  if (f) {
+    title = g_strdup (gst_plugin_feature_get_name(f));
+    g_object_unref (f);
+  } else {
+    title = g_ascii_strdown(cct, -1);
+  }
+  
+  /* turn CamelCase into '_' separated all lower, resulting string is atmost
+   * twice as long, special casing for abbevs like GstTCPClientSink */
+  lct = g_malloc(2*l);
+  for (i = 0, j = 0; i < l; i++) {
+    if (g_ascii_isupper (cct[i])) {
+      if (need_unserscore) {
+        if (i > 0) {
+          lct[j++] = '_';
+        }
+      } else {
+        have_abbrev = TRUE;
+      }
+      lct[j++] = g_ascii_tolower(cct[i]);
+      need_unserscore = FALSE;
+    } else {
+      if (have_abbrev) {
+        lct[j] = lct[j-1];
+        lct[j-1] = '_';
+        j++;
+        have_abbrev = FALSE;
+      }
+      lct[j++] = cct[i];
+      need_unserscore = TRUE;
+    }
+  }
+  lct[j] = '\\0';
+  uct = g_ascii_strup(lct, -1);
+  
+  /* scan properties and find local enums */
+  class = g_type_class_peek (object_type);
+  properties = g_object_class_list_properties (class, &n_properties);
+  qsort (properties, n_properties, sizeof (GParamSpec *), compare_param_specs);
+  for (i = 0; i < n_properties; i++) {
+    GParamSpec *spec = properties[i];
+    if (!(G_IS_PARAM_SPEC_ENUM (spec) || G_IS_PARAM_SPEC_FLAGS (spec))) {
+      continue;
+    }
+    ptn = g_type_name(spec->value_type);
+    // does it start with tn?
+    if (strncmp(tn, ptn, strlen(tn))) {
+      continue;
+    }
+    g_string_append_c(strbuf, '\\n');
+    g_string_append(strbuf, ptn);
+  }
+  ptns = g_string_free (strbuf, FALSE);
+
+  /* later we can remove the SUBSECTION Standart/Private, since we only need to
+   * highlight what is public API */
+  fprintf (fp, "<SECTION>\\n"
+               "<FILE>element-%s</FILE>\\n"
+               "<TITLE>%s</TITLE>\\n"
+               "Gst%s%s\\n"
+               "<SUBSECTION Standard>\\n"
+               "Gst%sClass\\n"
+               "GST_%s\\n"
+               "GST_%s_CAST\\n"
+               "GST_IS_%s\\n"
+               "GST_%s_CLASS\\n"
+               "GST_IS_%s_CLASS\\n"
+               "GST_TYPE_%s\\n"
+               "<SUBSECTION Private>\\n"
+               "gst_%s_get_type\\n"
+               "</SECTION>\\n\\n",
+               title, title, cct, ptns, 
+               cct, uct, uct, uct, uct, uct, uct, lct);
+  g_free (title);
+  g_free (lct);
+  g_free (uct);
+  g_free (ptns);
+}
+
 EOT
 
 close OUTPUT;
@@ -1614,4 +1749,4 @@
 #&UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0);
 #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0);
 #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0);
-
+#&UpdateFileIfChanged ($old_sections_filename, $new_sections_filename, 0);
diff --git a/common/gtk-doc-plugins.mak b/common/gtk-doc-plugins.mak
index f19e7d7..997a672 100644
--- a/common/gtk-doc-plugins.mak
+++ b/common/gtk-doc-plugins.mak
@@ -16,6 +16,16 @@
 update: scanobj-update
 	$(MAKE) check-outdated-docs
 
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN =
+endif
+
 # We set GPATH here; this gives us semantics for GNU make
 # which are more like other make's VPATH, when it comes to
 # whether a source that is a target of one rule is then
@@ -44,11 +54,9 @@
 # maintainers and result is commited to git
 DOC_STAMPS =				\
 	scan-build.stamp		\
-	tmpl-build.stamp		\
 	sgml-build.stamp		\
 	html-build.stamp		\
 	scan.stamp			\
-	tmpl.stamp			\
 	sgml.stamp			\
 	html.stamp
 
@@ -122,7 +130,7 @@
 	    scanobj_options="--verbose"; \
 	fi; \
 	$(INSPECT_ENVIRONMENT) 					\
-	CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)"				\
+	CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)"	\
 	CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)"	\
 	LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)"				\
 	$(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)"	\
@@ -161,29 +169,9 @@
 	    --ignore-headers="$(IGNORE_HFILES)";			\
 	touch scan-build.stamp
 
-#### update templates; done on every build ####
-
-# in a non-srcdir build, we need to copy files from the previous step
-# and the files from previous runs of this step
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
-	@echo '  DOC   Rebuilding template files'
-	@if test x"$(srcdir)" != x. ; then				\
-	    for f in $(SCANOBJ_FILES) $(SCAN_FILES);			\
-	    do								\
-	        if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi;	\
-	    done;							\
-	fi
-	@gtkdoc-mktmpl --module=$(DOC_MODULE)
-	@$(PYTHON) \
-		$(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
-	@touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
-	@true
-
 #### xml ####
 
-sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
+sgml-build.stamp: scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
 	@echo '  DOC   Building XML'
 	@-mkdir -p xml
 	@for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \
@@ -199,6 +187,7 @@
 		--output-format=xml \
 		--ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \
 		$(MKDB_OPTIONS)
+	@$(PYTHON) $(top_srcdir)/common/mangle-db.py xml
 	@cp ../version.entities xml
 	@touch sgml-build.stamp
 
diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
index 9d76889..f8edf40 100644
--- a/common/gtk-doc.mak
+++ b/common/gtk-doc.mak
@@ -3,7 +3,16 @@
 ###########################################################################
 # thomas: except of course that we did
 
-# thomas: copied from glib-2
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN =
+endif
+
 # We set GPATH here; this gives us semantics for GNU make
 # which are more like other make's VPATH, when it comes to
 # whether a source that is a target of one rule is then
@@ -81,15 +90,22 @@
 		--ignore-headers="$(IGNORE_HFILES)"
 	@if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then	\
 	    echo "  DOC   Introspecting gobjects"; \
+	    scanobj_options=""; \
+	    gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+	    if test "$$?" = "0"; then \
+	        if test "x$(V)" = "x1"; then \
+	            scanobj_options="--verbose"; \
+	        fi; \
+	    fi; \
 	    GST_PLUGIN_SYSTEM_PATH_1_0=`cd $(top_builddir) && pwd`		\
 	    GST_PLUGIN_PATH_1_0=						\
 	    GST_REGISTRY_1_0=doc-registry.xml				\
 	    $(GTKDOC_EXTRA_ENVIRONMENT)					\
-	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)"				\
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)"	\
 	    CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)"				\
 	    LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)"				\
 	    gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)"	\
-	        --module=$(DOC_MODULE) ;				\
+	        $$scanobj_options --module=$(DOC_MODULE) ;				\
 	else								\
 	    for i in $(SCANOBJ_FILES) ; do				\
 	       test -f $$i || touch $$i ;				\
diff --git a/common/m4/Makefile.am b/common/m4/Makefile.am
index 3d387ee..cdcec8c 100644
--- a/common/m4/Makefile.am
+++ b/common/m4/Makefile.am
@@ -11,6 +11,7 @@
 	as-python.m4 \
 	as-version.m4 \
 	ax_create_stdint_h.m4 \
+	ax_pthread.m4 \
 	glib-gettext.m4 \
 	gst-arch.m4 \
 	gst-args.m4 \
diff --git a/common/m4/Makefile.in b/common/m4/Makefile.in
index 4e34244..69f09e2 100644
--- a/common/m4/Makefile.in
+++ b/common/m4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = common/m4
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -158,8 +169,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -184,8 +197,6 @@
 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@
@@ -198,7 +209,6 @@
 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@
@@ -206,6 +216,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -232,11 +244,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -255,8 +270,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -315,10 +328,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -335,7 +352,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -357,7 +372,6 @@
 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@
@@ -371,6 +385,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -382,6 +397,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -420,6 +437,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -455,10 +473,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -484,6 +506,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -491,7 +516,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -520,6 +552,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -530,6 +563,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -560,17 +594,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -587,6 +620,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -625,6 +659,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -651,6 +686,7 @@
 	as-python.m4 \
 	as-version.m4 \
 	ax_create_stdint_h.m4 \
+	ax_pthread.m4 \
 	glib-gettext.m4 \
 	gst-arch.m4 \
 	gst-args.m4 \
@@ -694,7 +730,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/m4/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu common/m4/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -869,6 +904,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/common/m4/ax_pthread.m4 b/common/m4/ax_pthread.m4
new file mode 100644
index 0000000..d383ad5
--- /dev/null
+++ b/common/m4/ax_pthread.m4
@@ -0,0 +1,332 @@
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro figures out how to build C programs using POSIX threads. It
+#   sets the PTHREAD_LIBS output variable to the threads library and linker
+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+#   flags that are needed. (The user can also force certain compiler
+#   flags/libs to be tested by setting these environment variables.)
+#
+#   Also sets PTHREAD_CC to any special C compiler that is needed for
+#   multi-threaded programs (defaults to the value of CC otherwise). (This
+#   is necessary on AIX to use the special cc_r compiler alias.)
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also link it with them as well. e.g. you should link with
+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+#   If you are only building threads programs, you may wish to use these
+#   variables in your default LIBS, CFLAGS, and CC:
+#
+#     LIBS="$PTHREAD_LIBS $LIBS"
+#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#     CC="$PTHREAD_CC"
+#
+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+#   PTHREAD_CFLAGS.
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+#   is not found. If ACTION-IF-FOUND is not specified, the default action
+#   will define HAVE_PTHREAD.
+#
+#   Please let the authors know if this macro fails on any platform, or if
+#   you have any other suggestions or comments. This macro was based on work
+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
+#   grateful for the helpful feedback of numerous users.
+#
+#   Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 21
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
+        AC_MSG_RESULT([$ax_pthread_ok])
+        if test x"$ax_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+        solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+        ;;
+
+        darwin*)
+        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ;;
+esac
+
+# Clang doesn't consider unrecognized options an error unless we specify
+# -Werror. We throw in some extra Clang-specific options to ensure that
+# this doesn't happen for GCC, which also accepts -Werror.
+
+AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
+                  [AC_MSG_RESULT([yes])],
+                  [ax_pthread_extra_flags=
+                   AC_MSG_RESULT([no])])
+CFLAGS="$save_CFLAGS"
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                pthread-config)
+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }],
+                       [pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */])],
+                [ax_pthread_ok=yes],
+                [])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT([$ax_pthread_ok])
+        if test "x$ax_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+                           [int attr = $attr; return attr /* ; */])],
+                [attr_name=$attr; break],
+                [])
+        done
+        AC_MSG_RESULT([$attr_name])
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                # TODO: What about Clang on Solaris?
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
+        esac
+        AC_MSG_RESULT([$flag])
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+            [ax_cv_PTHREAD_PRIO_INHERIT], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                AS_CASE(["x/$CC"],
+                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+                  [#handle absolute path differently from PATH based program lookup
+                   AS_CASE(["x$CC"],
+                     [x/*],
+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+                ;;
+            esac
+        fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
+        :
+else
+        ax_pthread_ok=no
+        $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/common/m4/gst-arch.m4 b/common/m4/gst-arch.m4
index 077a20b..4ad7680 100644
--- a/common/m4/gst-arch.m4
+++ b/common/m4/gst-arch.m4
@@ -45,9 +45,15 @@
     xalpha*)
       HAVE_CPU_ALPHA=yes
       AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
+    xarc*)
+      HAVE_CPU_ARC=yes
+      AC_DEFINE(HAVE_CPU_ARC, 1, [Define if the target CPU is an ARC]) ;;
     xarm*)
       HAVE_CPU_ARM=yes
       AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
+    xaarch64*)
+      HAVE_CPU_AARCH64=yes
+      AC_DEFINE(HAVE_CPU_AARCH64, 1, [Define if the target CPU is AARCH64]) ;;
     xsparc*)
       HAVE_CPU_SPARC=yes
       AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;;
@@ -84,6 +90,7 @@
   AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
   AM_CONDITIONAL(HAVE_CPU_PPC64,      test "x$HAVE_CPU_PPC64" = "xyes")
   AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
+  AM_CONDITIONAL(HAVE_CPU_ARC,        test "x$HAVE_CPU_ARC" = "xyes")
   AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
   AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
   AM_CONDITIONAL(HAVE_CPU_HPPA,       test "x$HAVE_CPU_HPPA" = "xyes")
@@ -104,7 +111,7 @@
   AC_MSG_CHECKING([if unaligned memory access works correctly])
   if test x"$as_cv_unaligned_access" = x ; then
     case $host in
-      alpha*|arm*|hp*|mips*|sh*|sparc*|ia64*)
+      alpha*|arc*|arm*|aarch64*|hp*|mips*|sh*|sparc*|ia64*)
         _AS_ECHO_N([(blacklisted) ])
         as_cv_unaligned_access=no
 	;;
diff --git a/common/m4/gst-error.m4 b/common/m4/gst-error.m4
index bce80d2..d6487cc 100644
--- a/common/m4/gst-error.m4
+++ b/common/m4/gst-error.m4
@@ -76,14 +76,6 @@
             ])
           done
       ])
-    else
-      dnl Add -fno-strict-aliasing for GLib versions before 2.19.8
-      dnl as before G_LOCK and friends caused strict aliasing compiler
-      dnl warnings.
-      PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [
-        AS_COMPILER_FLAG(-fno-strict-aliasing,
-            ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing")
-	])
     fi
   fi
 
diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4
index 63f0f46..5b9cd8b 100644
--- a/common/m4/gst-glib2.m4
+++ b/common/m4/gst-glib2.m4
@@ -120,6 +120,10 @@
   GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`"
   AC_DEFINE_UNQUOTED(GIO_LIBDIR, "$GIO_LIBDIR",
       [The GIO library directory.])
+  GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`"
+  AC_DEFINE_UNQUOTED(GIO_PREFIX, "$GIO_PREFIX",
+      [The GIO install prefix.])
+
   AC_SUBST(GIO_CFLAGS)
   AC_SUBST(GIO_LIBS)
   AC_SUBST(GIO_LDFLAGS)
diff --git a/common/m4/gst-parser.m4 b/common/m4/gst-parser.m4
index b002047..382ef72 100644
--- a/common/m4/gst-parser.m4
+++ b/common/m4/gst-parser.m4
@@ -15,7 +15,7 @@
   bison_version=`$BISON_PATH --version | head -n 1 |  sed 's/^[[^0-9]]*//' | sed 's/[[^0-9]]*$//' | cut -d' ' -f1`
   AC_MSG_CHECKING([bison version $bison_version >= $bison_min_version])
 
-  if perl -we "exit ((v$bison_version ge v$bison_min_version) ? 0 : 1)"; then
+  if perl -we "exit (('v$bison_version' ge 'v$bison_min_version') ? 0 : 1)"; then
     AC_MSG_RESULT([yes])
   else
     AC_MSG_ERROR([no])
diff --git a/common/m4/gst-x11.m4 b/common/m4/gst-x11.m4
index d3baf2d..c41ddff 100644
--- a/common/m4/gst-x11.m4
+++ b/common/m4/gst-x11.m4
@@ -9,7 +9,11 @@
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
 
   dnl now try to find the HEADER
-  AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no")
+  HAVE_X="no"
+  AC_CHECK_HEADER([X11/Xlib.h], [
+    dnl and then the library with the most uniquitous function
+    AC_CHECK_LIB(X11, [XSync], [HAVE_X="yes"], [], [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS])
+  ], [], [AC_INCLUDES_DEFAULT])
 
   if test "x$HAVE_X" = "xno"
   then
diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
index 589721c..162be57 100644
--- a/common/m4/introspection.m4
+++ b/common/m4/introspection.m4
@@ -62,6 +62,7 @@
        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
        INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+       INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
     fi
     AC_SUBST(INTROSPECTION_SCANNER)
     AC_SUBST(INTROSPECTION_COMPILER)
@@ -71,6 +72,7 @@
     AC_SUBST(INTROSPECTION_CFLAGS)
     AC_SUBST(INTROSPECTION_LIBS)
     AC_SUBST(INTROSPECTION_MAKEFILE)
+    AC_SUBST(INTROSPECTION_INIT)
 
     AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
 ])
diff --git a/common/mangle-db.py b/common/mangle-db.py
new file mode 100644
index 0000000..463e5bc
--- /dev/null
+++ b/common/mangle-db.py
@@ -0,0 +1,71 @@
+# -*- Mode: Python -*-
+# vi:si:et:sw=4:sts=4:ts=4
+
+"""
+Insert includes for the element-*-details.xml files into the related docbook
+files.
+"""
+
+from __future__ import print_function, unicode_literals
+
+import codecs
+import glob
+import os
+import sys
+
+import xml.dom.minidom
+
+def patch(related, details):
+    try:
+        doc = xml.dom.minidom.parse(related)
+    except IOError:
+        return
+
+    # find the insertion point
+    elem = None
+    for e in doc.childNodes:
+        if e.nodeType == e.ELEMENT_NODE and e.localName == 'refentry':
+            elem = e
+            break
+    if elem == None:
+        return
+
+    elem2 = None
+    for e in elem.childNodes:
+        if e.nodeType == e.ELEMENT_NODE and e.localName == 'refsect1':
+            id = e.getAttributeNode('id')
+            role = e.getAttributeNode('role')
+            if id and id.nodeValue.endswith('.description') and role and role.nodeValue == 'desc':
+                elem2 = e
+                break
+    if elem2 == None:
+        return
+
+    # insert include
+    include = doc.createElement('include')
+    include.setAttribute('xmlns', 'http://www.w3.org/2003/XInclude')
+    include.setAttribute('href', details)
+    fallback = doc.createElement('fallback')
+    fallback.setAttribute('xmlns', 'http://www.w3.org/2003/XInclude')
+    include.appendChild(fallback)
+    elem2.appendChild(include)
+
+    # store patched file
+    result = codecs.open(related, mode="w", encoding="utf-8")
+    #result = open(related, "wb")
+    doc.writexml(result)
+    result.close()
+
+def main():
+    if not len(sys.argv) == 2:
+        sys.stderr.write('Please specify the xml/ dir')
+        sys.exit(1)
+
+    xmldir = sys.argv[1]
+
+    # parse all *-details.xml files and patch includes into the corresponding
+    # xml files
+    for details in glob.glob("%s/element-*-details.xml" % xmldir):
+        patch (details.replace("-details", ""), os.path.basename(details))
+
+main()
diff --git a/common/mangle-tmpl.py b/common/mangle-tmpl.py
deleted file mode 100644
index 51ea8c2..0000000
--- a/common/mangle-tmpl.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- Mode: Python -*-
-# vi:si:et:sw=4:sts=4:ts=4
-
-"""
-use the output from gst-xmlinspect.py to mangle tmpl/*.sgml and
-insert/overwrite Short Description and Long Description
-"""
-
-# FIXME: right now it uses pygst and scans on its own;
-# we really should use inspect/*.xml instead since the result of
-# gst-xmlinspect.py is committed by the docs maintainer, who can be
-# expected to have pygst, but this step should be done for every docs build,
-# so no pygst allowed
-
-# read in inspect/*.xml
-# for every tmpl/element-(name).xml: mangle with details from element
-
-from __future__ import print_function, unicode_literals
-
-import glob
-import re
-import sys
-import os
-
-class Tmpl:
-    def __init__(self, filename):
-        self.filename = filename
-        self._sectionids = []
-        self._sections = {}
-
-    def read(self):
-        """
-        Read and parse the sections from the given file.
-        """
-        lines = open(self.filename).readlines()
-        matcher = re.compile("<!-- ##### SECTION (\S+) ##### -->\n")
-        id = None
-
-        for line in lines:
-            match = matcher.search(line)
-            if match:
-                id = match.expand("\\1")
-                self._sectionids.append(id)
-                self._sections[id] = []
-            else:
-                if not id:
-                    sys.stderr.write(
-                        "WARNING: line before a SECTION header: %s" % line)
-                else:
-                    self._sections[id].append(line)
-
-    def get_section(self, id):
-        """
-        Get the content from the given section.
-        """
-        return self._sections[id]
-
-    def set_section(self, id, content):
-        """
-        Replace the given section id with the given content.
-        """
-        self._sections[id] = content
-
-    def output(self):
-        """
-        Return the output of the current template in the tmpl/*.sgml format.
-        """
-        lines = []
-        for id in self._sectionids:
-            lines.append("<!-- ##### SECTION %s ##### -->\n" % id)
-            for line in self._sections[id]:
-                lines.append(line)
-
-        return "".join(lines)
-
-    def write(self, backup=False):
-        """
-        Write out the template file again, backing up the previous one.
-        """
-        if backup:
-            target = self.filename + ".mangle.bak"
-            os.rename(self.filename, target)
-
-        handle = open(self.filename, "w")
-        handle.write(self.output())
-        handle.close()
-
-import xml.dom.minidom
-
-def get_elements(file):
-    elements = {}
-    doc = xml.dom.minidom.parse(file)
-
-    elem = None
-    for e in doc.childNodes:
-        if e.nodeType == e.ELEMENT_NODE and e.localName == 'plugin':
-            elem = e
-            break
-    if elem == None:
-        return None
-
-    elem2 = None
-    for e in elem.childNodes:
-        if e.nodeType == e.ELEMENT_NODE and e.localName == 'elements':
-            elem2 = e
-            break
-    if elem2 == None:
-        return None
-
-    elem = elem2
-
-    for e in elem.childNodes:
-        if e.nodeType == e.ELEMENT_NODE and e.localName == 'element':
-            name = None
-            description = None
-
-            for e2 in e.childNodes:
-                if e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'name':
-                    name = e2.childNodes[0].nodeValue.encode("UTF-8")
-                elif e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'description':
-                    if e2.childNodes:
-                      description = e2.childNodes[0].nodeValue.encode("UTF-8")
-                    else:
-                      description = 'No description'
-
-            if name != None and description != None:
-                elements[name] = {'description': description}
-
-    return elements
-
-def main():
-    if not len(sys.argv) == 3:
-        sys.stderr.write('Please specify the inspect/ dir and the tmpl/ dir')
-        sys.exit(1)
-
-    inspectdir = sys.argv[1]
-    tmpldir = sys.argv[2]
-
-    # parse all .xml files; build map of element name -> short desc
-    #for file in glob.glob("inspect/plugin-*.xml"):
-    elements = {}
-    for file in glob.glob("%s/plugin-*.xml" % inspectdir):
-        elements.update(get_elements(file))
-
-    for file in glob.glob("%s/element-*.sgml" % tmpldir):
-        base = os.path.basename(file)
-        element = base[len("element-"):-len(".sgml")]
-        tmpl = Tmpl(file)
-        tmpl.read()
-        if element in elements.keys():
-            description = elements[element]['description']
-            tmpl.set_section("Short_Description", "%s\n\n" % description)
-
-        # put in an include if not yet there
-        line = '<include xmlns="http://www.w3.org/2003/XInclude" href="' + \
-            'element-' + element + '-details.xml">' + \
-            '<fallback xmlns="http://www.w3.org/2003/XInclude" />' + \
-            '</include>\n'
-        section = tmpl.get_section("Long_Description")
-        if not section[0]  == line:
-            section.insert(0, line)
-        tmpl.set_section("Long_Description", section)
-        tmpl.write()
-
-main()
diff --git a/common/scangobj-merge.py b/common/scangobj-merge.py
index 4a9f1fc..46736b4 100755
--- a/common/scangobj-merge.py
+++ b/common/scangobj-merge.py
@@ -8,8 +8,9 @@
 
 from __future__ import print_function, unicode_literals
 
-import sys
+import codecs
 import os
+import sys
 
 def debug(*args):
     pass
@@ -105,10 +106,12 @@
 class GDoc:
     def load_file(self, filename):
         try:
-            lines = open(filename).readlines()
+            lines = codecs.open(filename, encoding='utf-8').readlines()
             self.load_data("".join(lines))
         except IOError:
             print ("WARNING - could not read from %s" % filename)
+        except UnicodeDecodeError as e:
+            print ("WARNING - could not parse %s: %s" % (filename, e))
 
     def save_file(self, filename, backup=False):
         """
@@ -116,7 +119,7 @@
         """
         olddata = None
         try:
-            lines = open(filename).readlines()
+            lines = codecs.open(filename, encoding='utf-8').readlines()
             olddata = "".join(lines)
         except IOError:
             print ("WARNING - could not read from %s" % filename)
@@ -128,7 +131,7 @@
             if backup:
                 os.rename(filename, filename + '.bak')
 
-        handle = open(filename, "w")
+        handle = codecs.open(filename, "w", encoding='utf-8')
         handle.write(newdata)
         handle.close()
 
diff --git a/compile b/compile
index 531136b..a85b723 100755
--- a/compile
+++ b/compile
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/config.guess b/config.guess
index 1f5c50c..1659250 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2014-03-23'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,20 +168,27 @@
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || \
+	    echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -197,6 +204,13 @@
 		os=netbsd
 		;;
 	esac
+	# Determine ABI tags.
+	case "${UNAME_MACHINE_ARCH}" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		;;
+	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -207,13 +221,13 @@
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo "${machine}-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -235,6 +249,9 @@
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
+    *:Sortix:*:*)
+	echo ${UNAME_MACHINE}-unknown-sortix
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -579,8 +596,9 @@
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
+	if [ -x /usr/bin/lslpp ] ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
@@ -932,6 +950,9 @@
     crisv32:Linux:*:*)
 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
+    e2k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     frv:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -1020,7 +1041,7 @@
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
diff --git a/config.h.in b/config.h.in
index 47931d7..e6f84cb 100644
--- a/config.h.in
+++ b/config.h.in
@@ -43,6 +43,9 @@
 /* The GIO modules directory. */
 #undef GIO_MODULE_DIR
 
+/* The GIO install prefix. */
+#undef GIO_PREFIX
+
 /* Define if GSM header in gsm/ subdir */
 #undef GSM_HEADER_IN_SUBDIR
 
@@ -112,6 +115,12 @@
 /* Define to enable Bluez (used by bluez). */
 #undef HAVE_BLUEZ
 
+/* Bluez5 detected */
+#undef HAVE_BLUEZ5
+
+/* Define to enable bs2b (used by bs2b). */
+#undef HAVE_BS2B
+
 /* Define to enable bz2 library (used by bz2). */
 #undef HAVE_BZ2
 
@@ -126,9 +135,15 @@
 /* Define to enable chromaprint (used by chromaprint). */
 #undef HAVE_CHROMAPRINT
 
+/* Define if the target CPU is AARCH64 */
+#undef HAVE_CPU_AARCH64
+
 /* Define if the target CPU is an Alpha */
 #undef HAVE_CPU_ALPHA
 
+/* Define if the target CPU is an ARC */
+#undef HAVE_CPU_ARC
+
 /* Define if the target CPU is an ARM */
 #undef HAVE_CPU_ARM
 
@@ -190,9 +205,6 @@
 /* Define to enable Direct3D plug-in (used by direct3dsink). */
 #undef HAVE_DIRECT3D
 
-/* Define to enable DirectDraw plug-in (used by directdrawsink). */
-#undef HAVE_DIRECTDRAW
-
 /* Define to enable directfb (used by dfbvideosink ). */
 #undef HAVE_DIRECTFB
 
@@ -205,6 +217,9 @@
 /* define for working do while(0) macros */
 #undef HAVE_DOWHILE_MACROS
 
+/* Define to enable DTLS plugin (used by dtls). */
+#undef HAVE_DTLS
+
 /* Define to enable dts library (used by dtsdec). */
 #undef HAVE_DTS
 
@@ -262,6 +277,12 @@
 /* Define to 1 if the system has the type `GLsizeiptr'. */
 #undef HAVE_GLSIZEIPTR
 
+/* Define to 1 if the system has the type `GLsync'. */
+#undef HAVE_GLSYNC
+
+/* Define to 1 if the system has the type `GLuint64'. */
+#undef HAVE_GLUINT64
+
 /* Define to enable gme decoder (used by gme). */
 #undef HAVE_GME
 
@@ -277,12 +298,15 @@
 /* Define to enable GSM library (used by gsmenc gsmdec). */
 #undef HAVE_GSM
 
+/* Define to enable Gtk+ elements (used by gtk). */
+#undef HAVE_GTK3
+
+/* Define if Gtk+ 3.0 GL is installed */
+#undef HAVE_GTK3_GL
+
 /* Define if gudev is installed */
 #undef HAVE_GUDEV
 
-/* Define to 1 if you have the <highgui.h> header file. */
-#undef HAVE_HIGHGUI_H
-
 /* Define to enable http live streaming plugin (used by hls). */
 #undef HAVE_HLS
 
@@ -304,6 +328,9 @@
 /* Define to enable ladspa (used by ladspa). */
 #undef HAVE_LADSPA
 
+/* Define to enable libde265 HEVC/H.265 decoder (used by libde265). */
+#undef HAVE_LIBDE265
+
 /* Define if libgcrypt is available */
 #undef HAVE_LIBGCRYPT
 
@@ -361,9 +388,6 @@
 /* Define to enable musepackdec (used by musepack). */
 #undef HAVE_MUSEPACK
 
-/* Define to enable MythTV client plugins (used by mythtvsrc). */
-#undef HAVE_MYTHTV
-
 /* Define to enable nas plug-in (used by nassink). */
 #undef HAVE_NAS
 
@@ -391,12 +415,47 @@
 /* Define to enable opencv plugins (used by opencv). */
 #undef HAVE_OPENCV
 
+/* Define to 1 if you have the <opencv2/contrib/contrib.hpp> header file. */
+#undef HAVE_OPENCV2_CONTRIB_CONTRIB_HPP
+
+/* Define to 1 if you have the <opencv2/core/core_c.h> header file. */
+#undef HAVE_OPENCV2_CORE_CORE_C_H
+
+/* Define to 1 if you have the <opencv2/core/types_c.h> header file. */
+#undef HAVE_OPENCV2_CORE_TYPES_C_H
+
+/* Define to 1 if you have the <opencv2/core/version.hpp> header file. */
+#undef HAVE_OPENCV2_CORE_VERSION_HPP
+
 /* Define to 1 if you have the <opencv2/highgui/highgui_c.h> header file. */
 #undef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
 
+/* Define to 1 if you have the <opencv2/imgproc/imgproc_c.h> header file. */
+#undef HAVE_OPENCV2_IMGPROC_IMGPROC_C_H
+
+/* Define to 1 if you have the <opencv2/imgproc/imgproc.hpp> header file. */
+#undef HAVE_OPENCV2_IMGPROC_IMGPROC_HPP
+
+/* Define to 1 if you have the <opencv2/legacy/compat.hpp> header file. */
+#undef HAVE_OPENCV2_LEGACY_COMPAT_HPP
+
+/* Define to 1 if you have the <opencv2/legacy/legacy.hpp> header file. */
+#undef HAVE_OPENCV2_LEGACY_LEGACY_HPP
+
+/* Define to 1 if you have the <opencv2/objdetect/objdetect.hpp> header file.
+   */
+#undef HAVE_OPENCV2_OBJDETECT_OBJDETECT_HPP
+
+/* Define to 1 if you have the <opencv2/video/background_segm.hpp> header
+   file. */
+#undef HAVE_OPENCV2_VIDEO_BACKGROUND_SEGM_HPP
+
 /* Define to enable openexr library (used by openexr). */
 #undef HAVE_OPENEXR
 
+/* Define to enable openh264 library (used by openh264). */
+#undef HAVE_OPENH264
+
 /* Define to enable openjpeg library (used by openjpeg). */
 #undef HAVE_OPENJPEG
 
@@ -409,6 +468,9 @@
 /* Define to enable OpenSL ES (used by opensl). */
 #undef HAVE_OPENSLES
 
+/* Define if openssl is available */
+#undef HAVE_OPENSSL
+
 /* Define to enable opus (used by opus). */
 #undef HAVE_OPUS
 
@@ -418,20 +480,29 @@
 /* Apple Mac OS X operating system detected */
 #undef HAVE_OSX
 
-/* Define to enable OSX video (used by osxvideosrc). */
-#undef HAVE_OSX_VIDEO
-
 /* Use libpng */
 #undef HAVE_PNG
 
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
 /* Define to 1 if you have the <pthread.h> header file. */
 #undef HAVE_PTHREAD_H
 
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
 /* Define to enable pvrvideosink (used by pvr). */
 #undef HAVE_PVR
 
-/* Define to enable QuickTime wrapper (used by qtwrapper). */
-#undef HAVE_QUICKTIME
+/* Define to enable Qt elements (used by qt). */
+#undef HAVE_QT
+
+/* Define if Qt Wayland integration is installed */
+#undef HAVE_QT_WAYLAND
+
+/* Define if Qt X11 integration is installed */
+#undef HAVE_QT_X11
 
 /* Define if RDTSC is available */
 #undef HAVE_RDTSC
@@ -595,6 +666,9 @@
 /* Define if you have X11 library */
 #undef HAVE_X11
 
+/* Define to enable x265 plug-in (used by x265). */
+#undef HAVE_X265
+
 /* Define to enable xvid plugins (used by xvid). */
 #undef HAVE_XVID
 
@@ -620,6 +694,9 @@
 /* Define if the old MusePack API is used */
 #undef MPC_IS_OLD_API
 
+/* OpenCV path name */
+#undef OPENCV_PATH_NAME
+
 /* opencv install prefix */
 #undef OPENCV_PREFIX
 
@@ -647,6 +724,10 @@
 /* directory where plugins are located */
 #undef PLUGINDIR
 
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
 /* The size of `char', as computed by sizeof. */
 #undef SIZEOF_CHAR
 
@@ -692,8 +773,5 @@
 # endif
 #endif
 
-/* Define to 1 if the X Window System is missing or not being used. */
-#undef X_DISPLAY_MISSING
-
 /* We need at least WinXP SP2 for __stat64 */
 #undef __MSVCRT_VERSION__
diff --git a/config.sub b/config.sub
index bba4efb..1acc966 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2014-09-11'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -255,12 +255,13 @@
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
+	| ba \
 	| be32 | be64 \
 	| bfin \
 	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| epiphany \
-	| fido | fr30 | frv \
+	| e2k | epiphany \
+	| fido | fr30 | frv | ft32 \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
@@ -305,7 +306,7 @@
 	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -313,6 +314,7 @@
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -327,6 +329,9 @@
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
+	leon|leon[3-9])
+		basic_machine=sparc-$basic_machine
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
@@ -372,12 +377,13 @@
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
+	| e2k-* | elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@@ -424,12 +430,13 @@
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
+	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -437,6 +444,7 @@
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
+	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -513,6 +521,9 @@
 		basic_machine=i386-pc
 		os=-aros
 		;;
+        asmjs)
+		basic_machine=asmjs-unknown
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -774,6 +785,9 @@
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	leon-*|leon[3-9]-*)
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
@@ -1365,7 +1379,7 @@
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
+	      | -aos* | -aros* | -cloudabi* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --git a/configure b/configure
index 5b688c6..6c219fe 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.4.5.
+# Generated by GNU Autoconf 2.69 for GStreamer Bad Plug-ins 1.5.91.
 #
 # 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.4.5'
-PACKAGE_STRING='GStreamer Bad Plug-ins 1.4.5'
+PACKAGE_VERSION='1.5.91'
+PACKAGE_STRING='GStreamer Bad Plug-ins 1.5.91'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer'
 PACKAGE_URL=''
 
@@ -652,10 +652,16 @@
 GST_OPTION_CFLAGS
 DEPRECATED_CFLAGS
 PROFILE_CFLAGS
+USE_X265_FALSE
+USE_X265_TRUE
+X265_LIBS
+X265_CFLAGS
 USE_HLS_FALSE
 USE_HLS_TRUE
 LIBGCRYPT_LIBS
 LIBGCRYPT_CFLAGS
+OPENSSL_LIBS
+OPENSSL_CFLAGS
 LIBGCRYPT_CONFIG
 NETTLE_LIBS
 NETTLE_CFLAGS
@@ -741,6 +747,27 @@
 USE_LIBVISUAL_TRUE
 LIBVISUAL_LIBS
 LIBVISUAL_CFLAGS
+USE_QT_FALSE
+USE_QT_TRUE
+QT_WAYLAND_LIBS
+QT_WAYLAND_CFLAGS
+QT_X11_LIBS
+QT_X11_CFLAGS
+UIC
+RCC
+MOC
+QT_LIBS
+QT_CFLAGS
+USE_GTK3_GL_FALSE
+USE_GTK3_GL_TRUE
+USE_GTK3_FALSE
+USE_GTK3_TRUE
+GTK3_WAYLAND_LIBS
+GTK3_WAYLAND_CFLAGS
+GTK3_X11_LIBS
+GTK3_X11_CFLAGS
+GTK3_GL_LIBS
+GTK3_GL_CFLAGS
 USE_GL_FALSE
 USE_GL_TRUE
 USE_RSVG_FALSE
@@ -766,6 +793,10 @@
 OPENJPEG_LIBS
 OPENJPEG_CFLAGS
 HAVE_OPENJPEG
+USE_OPENH264_FALSE
+USE_OPENH264_TRUE
+OPENH264_LIBS
+OPENH264_CFLAGS
 USE_OPENEXR_FALSE
 USE_OPENEXR_TRUE
 OPENEXR_LIBS
@@ -792,10 +823,6 @@
 NAS_LIBS
 NAS_CFLAGS
 HAVE_NAS
-USE_MYTHTV_FALSE
-USE_MYTHTV_TRUE
-GMYTH_LIBS
-GMYTH_CFLAGS
 USE_MUSEPACK_FALSE
 USE_MUSEPACK_TRUE
 MUSEPACK_LIBS
@@ -824,14 +851,23 @@
 MODPLUG_CFLAGS
 USE_LINSYS_FALSE
 USE_LINSYS_TRUE
+USE_DTLS_FALSE
+USE_DTLS_TRUE
+DTLS_LIBS
+DTLS_CFLAGS
 USE_SRTP_FALSE
 USE_SRTP_TRUE
 SRTP_LIBS
+SRTP_CFLAGS
 HAVE_SRTP
 USE_LIBMMS_FALSE
 USE_LIBMMS_TRUE
 LIBMMS_LIBS
 LIBMMS_CFLAGS
+USE_LIBDE265_FALSE
+USE_LIBDE265_TRUE
+LIBDE265_LIBS
+LIBDE265_CFLAGS
 USE_LV2_FALSE
 USE_LV2_TRUE
 SLV2_LIBS
@@ -926,6 +962,10 @@
 USE_BZ2_FALSE
 USE_BZ2_TRUE
 BZ2_LIBS
+USE_BS2B_FALSE
+USE_BS2B_TRUE
+BS2B_LIBS
+BS2B_CFLAGS
 USE_APEXSINK_FALSE
 USE_APEXSINK_TRUE
 APEXSINK_LIBS
@@ -950,8 +990,6 @@
 LIBUSB_CFLAGS
 G_UDEV_LIBS
 G_UDEV_CFLAGS
-GST_VIDEO_LIBS
-GST_VIDEO_CFLAGS
 USE_OPENSLES_FALSE
 USE_OPENSLES_TRUE
 USE_VCD_FALSE
@@ -959,18 +997,15 @@
 USE_SHM_FALSE
 USE_SHM_TRUE
 SHM_LIBS
-USE_QUICKTIME_FALSE
-USE_QUICKTIME_TRUE
 USE_AVC_FALSE
 USE_AVC_TRUE
-USE_OSX_VIDEO_FALSE
-USE_OSX_VIDEO_TRUE
 USE_BLUEZ_FALSE
 USE_BLUEZ_TRUE
-DBUS_LIBS
-DBUS_CFLAGS
-BLUEZ_LIBS
-BLUEZ_CFLAGS
+GDBUS_CODEGEN
+GIO_UNIX_LIBS
+GIO_UNIX_CFLAGS
+BLUEZ5_LIBS
+BLUEZ5_CFLAGS
 USE_APPLE_MEDIA_FALSE
 USE_APPLE_MEDIA_TRUE
 USE_ANDROID_MEDIA_FALSE
@@ -983,10 +1018,6 @@
 USE_WINSCREENCAP_TRUE
 HAVE_WINSCREENCAP
 WINSCREENCAP_LIBS
-USE_DIRECTDRAW_FALSE
-USE_DIRECTDRAW_TRUE
-HAVE_DIRECTDRAW
-DIRECTDRAW_LIBS
 USE_DIRECT3D_FALSE
 USE_DIRECT3D_TRUE
 HAVE_DIRECT3D
@@ -1053,14 +1084,9 @@
 WAYLAND_EGL_CFLAGS
 HAVE_EGL
 HAVE_GLES2
-HAVE_GLU
 HAVE_GL
-HAVE_X
-X_EXTRA_LIBS
 X_LIBS
-X_PRE_LIBS
 X_CFLAGS
-XMKMF
 DCCP_LIBS
 WINSOCK2_LIBS
 HAVE_VIDEOTOOLBOX_FALSE
@@ -1101,10 +1127,10 @@
 USE_PLUGIN_SDP_TRUE
 USE_PLUGIN_SDI_FALSE
 USE_PLUGIN_SDI_TRUE
+USE_PLUGIN_RTP_FALSE
+USE_PLUGIN_RTP_TRUE
 USE_PLUGIN_REMOVESILENCE_FALSE
 USE_PLUGIN_REMOVESILENCE_TRUE
-USE_PLUGIN_REAL_FALSE
-USE_PLUGIN_REAL_TRUE
 USE_PLUGIN_RAWPARSE_FALSE
 USE_PLUGIN_RAWPARSE_TRUE
 USE_PLUGIN_PNM_FALSE
@@ -1113,6 +1139,8 @@
 USE_PLUGIN_PCAPPARSE_TRUE
 USE_PLUGIN_PATCHDETECT_FALSE
 USE_PLUGIN_PATCHDETECT_TRUE
+USE_PLUGIN_ONVIF_FALSE
+USE_PLUGIN_ONVIF_TRUE
 USE_PLUGIN_NUVDEMUX_FALSE
 USE_PLUGIN_NUVDEMUX_TRUE
 USE_PLUGIN_MXF_FALSE
@@ -1324,6 +1352,10 @@
 HAVE_PTHREAD_H_TRUE
 HAVE_UNISTD_H_FALSE
 HAVE_UNISTD_H_TRUE
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+ax_pthread_config
 LIBM
 ENABLE_PLUGIN_DOCS_FALSE
 ENABLE_PLUGIN_DOCS_TRUE
@@ -1352,6 +1384,7 @@
 GTKDOC_CHECK
 HAVE_INTROSPECTION_FALSE
 HAVE_INTROSPECTION_TRUE
+INTROSPECTION_INIT
 INTROSPECTION_MAKEFILE
 INTROSPECTION_LIBS
 INTROSPECTION_CFLAGS
@@ -1396,6 +1429,8 @@
 HAVE_CPU_SPARC_TRUE
 HAVE_CPU_ARM_FALSE
 HAVE_CPU_ARM_TRUE
+HAVE_CPU_ARC_FALSE
+HAVE_CPU_ARC_TRUE
 HAVE_CPU_ALPHA_FALSE
 HAVE_CPU_ALPHA_TRUE
 HAVE_CPU_PPC64_FALSE
@@ -1563,6 +1598,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1675,12 +1711,13 @@
 enable_mve
 enable_mxf
 enable_nuvdemux
+enable_onvif
 enable_patchdetect
 enable_pcapparse
 enable_pnm
 enable_rawparse
-enable_real
 enable_removesilence
+enable_rtp
 enable_sdi
 enable_sdp
 enable_segmentclip
@@ -1709,20 +1746,16 @@
 enable_x11
 enable_wayland
 enable_dispmanx
-with_x
 with_jpeg_mmx
 enable_directsound
 enable_wasapi
 enable_direct3d
-enable_directdraw
 enable_winscreencap
 enable_winks
 enable_android_media
 enable_apple_media
 enable_bluez
-enable_osx_video
 enable_avc
-enable_quicktime
 enable_shm
 enable_vcd
 enable_opensles
@@ -1731,6 +1764,7 @@
 enable_voamrwbenc
 enable_voaacenc
 enable_apexsink
+enable_bs2b
 enable_bz2
 enable_chromaprint
 enable_curl
@@ -1751,8 +1785,10 @@
 enable_kate
 enable_ladspa
 enable_lv2
+enable_libde265
 enable_libmms
 enable_srtp
+enable_dtls
 enable_linsys
 enable_modplug
 enable_mimic
@@ -1760,13 +1796,13 @@
 enable_mpg123
 enable_mplex
 enable_musepack
-enable_mythtv
 enable_nas
 enable_neon
 enable_ofa
 enable_openal
 enable_opencv
 enable_openexr
+enable_openh264
 enable_openjpeg
 enable_openni2
 enable_opus
@@ -1774,6 +1810,8 @@
 with_pvr_external_headers
 enable_rsvg
 enable_gl
+enable_gtk3
+enable_qt
 enable_libvisual
 enable_timidity
 enable_teletextdec
@@ -1802,6 +1840,7 @@
 enable_sndio
 enable_hls
 with_libgcrypt_prefix
+enable_x265
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1870,17 +1909,16 @@
 EXIF_LIBS
 ORC_CFLAGS
 ORC_LIBS
-XMKMF
+X_CFLAGS
+X_LIBS
 WAYLAND_EGL_CFLAGS
 WAYLAND_EGL_LIBS
 LIBPNG_CFLAGS
 LIBPNG_LIBS
-BLUEZ_CFLAGS
-BLUEZ_LIBS
-DBUS_CFLAGS
-DBUS_LIBS
-GST_VIDEO_CFLAGS
-GST_VIDEO_LIBS
+BLUEZ5_CFLAGS
+BLUEZ5_LIBS
+GIO_UNIX_CFLAGS
+GIO_UNIX_LIBS
 G_UDEV_CFLAGS
 G_UDEV_LIBS
 LIBUSB_CFLAGS
@@ -1893,6 +1931,8 @@
 VOAACENC_LIBS
 APEXSINK_CFLAGS
 APEXSINK_LIBS
+BS2B_CFLAGS
+BS2B_LIBS
 CHROMAPRINT_CFLAGS
 CHROMAPRINT_LIBS
 CURL_CFLAGS
@@ -1923,8 +1963,14 @@
 LRDF_LIBS
 SLV2_CFLAGS
 SLV2_LIBS
+LIBDE265_CFLAGS
+LIBDE265_LIBS
 LIBMMS_CFLAGS
 LIBMMS_LIBS
+SRTP_CFLAGS
+SRTP_LIBS
+DTLS_CFLAGS
+DTLS_LIBS
 MODPLUG_CFLAGS
 MODPLUG_LIBS
 MIMIC_CFLAGS
@@ -1937,8 +1983,6 @@
 MPG123_LIBS
 MPLEX_CFLAGS
 MPLEX_LIBS
-GMYTH_CFLAGS
-GMYTH_LIBS
 NEON_CFLAGS
 NEON_LIBS
 OFA_CFLAGS
@@ -1949,6 +1993,8 @@
 OPENCV_LIBS
 OPENEXR_CFLAGS
 OPENEXR_LIBS
+OPENH264_CFLAGS
+OPENH264_LIBS
 OPENJPEG_CFLAGS
 OPENJPEG_LIBS
 OPENNI2_CFLAGS
@@ -1961,6 +2007,18 @@
 RSVG_LIBS
 RSVG_2_36_2_CFLAGS
 RSVG_2_36_2_LIBS
+GTK3_GL_CFLAGS
+GTK3_GL_LIBS
+GTK3_X11_CFLAGS
+GTK3_X11_LIBS
+GTK3_WAYLAND_CFLAGS
+GTK3_WAYLAND_LIBS
+QT_CFLAGS
+QT_LIBS
+QT_X11_CFLAGS
+QT_X11_LIBS
+QT_WAYLAND_CFLAGS
+QT_WAYLAND_LIBS
 LIBVISUAL_CFLAGS
 LIBVISUAL_LIBS
 TIMIDITY_CFLAGS
@@ -1986,7 +2044,11 @@
 GSETTINGS_CFLAGS
 GSETTINGS_LIBS
 NETTLE_CFLAGS
-NETTLE_LIBS'
+NETTLE_LIBS
+OPENSSL_CFLAGS
+OPENSSL_LIBS
+X265_CFLAGS
+X265_LIBS'
 
 
 # Initialize some variables set by options.
@@ -2025,6 +2087,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -2277,6 +2340,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -2414,7 +2486,7 @@
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -2527,7 +2599,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.4.5 to adapt to many kinds of systems.
+\`configure' configures GStreamer Bad Plug-ins 1.5.91 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2567,6 +2639,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -2589,10 +2662,6 @@
   --program-suffix=SUFFIX            append SUFFIX to installed program names
   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
 
-X features:
-  --x-includes=DIR    X include files are in DIR
-  --x-libraries=DIR   X library files are in DIR
-
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
@@ -2602,7 +2671,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GStreamer Bad Plug-ins 1.4.5:";;
+     short | recursive ) echo "Configuration of GStreamer Bad Plug-ins 1.5.91:";;
    esac
   cat <<\_ACEOF
 
@@ -2694,12 +2763,13 @@
   --disable-mve           disable dependency-less mve plugin
   --disable-mxf           disable dependency-less mxf plugin
   --disable-nuvdemux      disable dependency-less nuvdemux plugin
+  --disable-onvif         disable dependency-less onvif plugin
   --disable-patchdetect   disable dependency-less patchdetect plugin
   --disable-pcapparse     disable dependency-less pcapparse plugin
   --disable-pnm           disable dependency-less pnm plugin
   --disable-rawparse      disable dependency-less rawparse plugin
-  --disable-real          disable dependency-less real plugin
   --disable-removesilence disable dependency-less removesilence plugin
+  --disable-rtp           disable dependency-less rtp plugin
   --disable-sdi           disable dependency-less sdi plugin
   --disable-sdp           disable dependency-less sdp plugin
   --disable-segmentclip   disable dependency-less segmentclip plugin
@@ -2728,15 +2798,12 @@
   --disable-directsound        disable DirectSound: directsoundsrc
   --disable-wasapi             disable WASAPI plug-in: wasapi
   --disable-direct3d           disable Direct3D plug-in: direct3dsink
-  --disable-directdraw         disable DirectDraw plug-in: directdrawsink
   --disable-winscreencap       disable winscreencap plug-in: winscreencap
   --disable-winks              disable Winks plug-in: winks
   --disable-android_media      disable Android Media: androidmedia
   --disable-apple_media        disable Apple video: applemedia
   --disable-bluez              disable Bluez: bluez
-  --disable-osx_video          disable OSX video: osxvideosrc
   --disable-avc                disable AVC Video Services: avcsrc
-  --disable-quicktime          disable QuickTime wrapper: qtwrapper
   --disable-shm                disable POSIX shared memory source and sink: shm
   --disable-vcd                disable Video CD: vcdsrc
   --disable-opensles           disable OpenSL ES: opensl
@@ -2745,6 +2812,7 @@
   --disable-voamrwbenc         disable vo-amrwbenc library: vo-amrwbenc
   --disable-voaacenc           disable vo-aacenc library: vo-aacenc
   --disable-apexsink           disable AirPort Express Wireless sink: apexsink
+  --disable-bs2b               disable bs2b: bs2b
   --disable-bz2                disable bz2 library: bz2
   --disable-chromaprint        disable chromaprint: chromaprint
   --disable-curl               disable Curl plugin: curl
@@ -2766,8 +2834,10 @@
   --disable-kate               disable Kate: kate
   --disable-ladspa             disable ladspa: ladspa
   --disable-lv2                disable lv2: lv2
+  --disable-libde265           disable libde265 HEVC/H.265 decoder: libde265
   --disable-libmms             disable mms protocol library: libmms
   --disable-srtp               disable srtp library: srtp
+  --disable-dtls               disable DTLS plugin: dtls
   --disable-linsys             disable Linear Systems SDI plugin: linsys
   --disable-modplug            disable modplug: modplug
   --disable-mimic              disable libmimic library: mimic
@@ -2775,19 +2845,21 @@
   --disable-mpg123             disable mpg123 audio decoder: mpg123
   --disable-mplex              disable mplex: mplex
   --disable-musepack           disable musepackdec: musepack
-  --disable-mythtv             disable MythTV client plugins: mythtvsrc
   --disable-nas                disable nas plug-in: nassink
   --disable-neon               disable neon http client plugins: neonhttpsrc
   --disable-ofa                disable ofa plugins: ofa
   --disable-openal             disable OpenAL plugin: openal
   --disable-opencv             disable opencv plugins: opencv
   --disable-openexr            disable openexr library: openexr
+  --disable-openh264           disable openh264 library: openh264
   --disable-openjpeg           disable openjpeg library: openjpeg
   --disable-openni2            disable openni2 library: openni2
   --disable-opus               disable opus: opus
   --disable-pvr                disable pvrvideosink: pvr
   --disable-rsvg               disable rsvg decoder: rsvg
   --disable-gl                 disable gl elements: gl
+  --disable-gtk3               disable Gtk+ elements: gtk
+  --disable-qt                 disable Qt elements: qt
   --disable-libvisual          disable libvisual visualization library: libvisual
   --disable-timidity           disable timidity midi soft synth plugin: timidity
   --disable-teletextdec        disable Teletext decoder: teletextdec
@@ -2814,6 +2886,7 @@
                           Disable regeneration of gschemas.compiled on install
   --disable-sndio              disable sndio audio: sndio
   --disable-hls                disable http live streaming plugin: hls
+  --disable-x265               disable x265 plug-in: x265
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2856,7 +2929,6 @@
   --with-gles2-module-name
                           library module name for GLES2 (default: libGLESv2)
   --with-egl-module-name  library module name for EGL (default: libEGL)
-  --with-x                use the X Window System
   --with-jpeg-mmx, path to MMX'ified JPEG library
   --with-pvr-external-headers
                           Use system installed PVR2D headers
@@ -2964,7 +3036,8 @@
   EXIF_LIBS   linker flags for EXIF, overriding pkg-config
   ORC_CFLAGS  C compiler flags for ORC, overriding pkg-config
   ORC_LIBS    linker flags for ORC, overriding pkg-config
-  XMKMF       Path to xmkmf, Makefile generator for X Window System
+  X_CFLAGS    C compiler flags for X, overriding pkg-config
+  X_LIBS      linker flags for X, overriding pkg-config
   WAYLAND_EGL_CFLAGS
               C compiler flags for WAYLAND_EGL, overriding pkg-config
   WAYLAND_EGL_LIBS
@@ -2972,15 +3045,13 @@
   LIBPNG_CFLAGS
               C compiler flags for LIBPNG, overriding pkg-config
   LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config
-  BLUEZ_CFLAGS
-              C compiler flags for BLUEZ, overriding pkg-config
-  BLUEZ_LIBS  linker flags for BLUEZ, overriding pkg-config
-  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
-  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
-  GST_VIDEO_CFLAGS
-              C compiler flags for GST_VIDEO, overriding pkg-config
-  GST_VIDEO_LIBS
-              linker flags for GST_VIDEO, overriding pkg-config
+  BLUEZ5_CFLAGS
+              C compiler flags for BLUEZ5, overriding pkg-config
+  BLUEZ5_LIBS linker flags for BLUEZ5, overriding pkg-config
+  GIO_UNIX_CFLAGS
+              C compiler flags for GIO_UNIX, overriding pkg-config
+  GIO_UNIX_LIBS
+              linker flags for GIO_UNIX, overriding pkg-config
   G_UDEV_CFLAGS
               C compiler flags for G_UDEV, overriding pkg-config
   G_UDEV_LIBS linker flags for G_UDEV, overriding pkg-config
@@ -3003,6 +3074,8 @@
               C compiler flags for APEXSINK, overriding pkg-config
   APEXSINK_LIBS
               linker flags for APEXSINK, overriding pkg-config
+  BS2B_CFLAGS C compiler flags for BS2B, overriding pkg-config
+  BS2B_LIBS   linker flags for BS2B, overriding pkg-config
   CHROMAPRINT_CFLAGS
               C compiler flags for CHROMAPRINT, overriding pkg-config
   CHROMAPRINT_LIBS
@@ -3048,9 +3121,17 @@
   LRDF_LIBS   linker flags for LRDF, overriding pkg-config
   SLV2_CFLAGS C compiler flags for SLV2, overriding pkg-config
   SLV2_LIBS   linker flags for SLV2, overriding pkg-config
+  LIBDE265_CFLAGS
+              C compiler flags for LIBDE265, overriding pkg-config
+  LIBDE265_LIBS
+              linker flags for LIBDE265, overriding pkg-config
   LIBMMS_CFLAGS
               C compiler flags for LIBMMS, overriding pkg-config
   LIBMMS_LIBS linker flags for LIBMMS, overriding pkg-config
+  SRTP_CFLAGS C compiler flags for SRTP, overriding pkg-config
+  SRTP_LIBS   linker flags for SRTP, overriding pkg-config
+  DTLS_CFLAGS C compiler flags for DTLS, overriding pkg-config
+  DTLS_LIBS   linker flags for DTLS, overriding pkg-config
   MODPLUG_CFLAGS
               C compiler flags for MODPLUG, overriding pkg-config
   MODPLUG_LIBS
@@ -3071,9 +3152,6 @@
   MPLEX_CFLAGS
               C compiler flags for MPLEX, overriding pkg-config
   MPLEX_LIBS  linker flags for MPLEX, overriding pkg-config
-  GMYTH_CFLAGS
-              C compiler flags for GMYTH, overriding pkg-config
-  GMYTH_LIBS  linker flags for GMYTH, overriding pkg-config
   NEON_CFLAGS C compiler flags for NEON, overriding pkg-config
   NEON_LIBS   linker flags for NEON, overriding pkg-config
   OFA_CFLAGS  C compiler flags for OFA, overriding pkg-config
@@ -3088,6 +3166,10 @@
               C compiler flags for OPENEXR, overriding pkg-config
   OPENEXR_LIBS
               linker flags for OPENEXR, overriding pkg-config
+  OPENH264_CFLAGS
+              C compiler flags for OPENH264, overriding pkg-config
+  OPENH264_LIBS
+              linker flags for OPENH264, overriding pkg-config
   OPENJPEG_CFLAGS
               C compiler flags for OPENJPEG, overriding pkg-config
   OPENJPEG_LIBS
@@ -3106,6 +3188,27 @@
               C compiler flags for RSVG_2_36_2, overriding pkg-config
   RSVG_2_36_2_LIBS
               linker flags for RSVG_2_36_2, overriding pkg-config
+  GTK3_GL_CFLAGS
+              C compiler flags for GTK3_GL, overriding pkg-config
+  GTK3_GL_LIBS
+              linker flags for GTK3_GL, overriding pkg-config
+  GTK3_X11_CFLAGS
+              C compiler flags for GTK3_X11, overriding pkg-config
+  GTK3_X11_LIBS
+              linker flags for GTK3_X11, overriding pkg-config
+  GTK3_WAYLAND_CFLAGS
+              C compiler flags for GTK3_WAYLAND, overriding pkg-config
+  GTK3_WAYLAND_LIBS
+              linker flags for GTK3_WAYLAND, overriding pkg-config
+  QT_CFLAGS   C compiler flags for QT, overriding pkg-config
+  QT_LIBS     linker flags for QT, overriding pkg-config
+  QT_X11_CFLAGS
+              C compiler flags for QT_X11, overriding pkg-config
+  QT_X11_LIBS linker flags for QT_X11, overriding pkg-config
+  QT_WAYLAND_CFLAGS
+              C compiler flags for QT_WAYLAND, overriding pkg-config
+  QT_WAYLAND_LIBS
+              linker flags for QT_WAYLAND, overriding pkg-config
   LIBVISUAL_CFLAGS
               C compiler flags for LIBVISUAL, overriding pkg-config
   LIBVISUAL_LIBS
@@ -3149,6 +3252,12 @@
   NETTLE_CFLAGS
               C compiler flags for NETTLE, overriding pkg-config
   NETTLE_LIBS linker flags for NETTLE, overriding pkg-config
+  OPENSSL_CFLAGS
+              C compiler flags for OPENSSL, overriding pkg-config
+  OPENSSL_LIBS
+              linker flags for OPENSSL, overriding pkg-config
+  X265_CFLAGS C compiler flags for X265, overriding pkg-config
+  X265_LIBS   linker flags for X265, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -3216,7 +3325,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GStreamer Bad Plug-ins configure 1.4.5
+GStreamer Bad Plug-ins configure 1.5.91
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -4189,7 +4298,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.4.5, which was
+It was created by GStreamer Bad Plug-ins $as_me 1.5.91, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4685,7 +4794,7 @@
 
 
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -4877,7 +4986,7 @@
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -5171,7 +5280,7 @@
 
 # Define the identity of the package.
  PACKAGE='gst-plugins-bad'
- VERSION='1.4.5'
+ VERSION='1.5.91'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5205,8 +5314,8 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -5382,9 +5491,9 @@
 
 
 
-  PACKAGE_VERSION_MAJOR=$(echo 1.4.5 | cut -d'.' -f1)
-  PACKAGE_VERSION_MINOR=$(echo 1.4.5 | cut -d'.' -f2)
-  PACKAGE_VERSION_MICRO=$(echo 1.4.5 | cut -d'.' -f3)
+  PACKAGE_VERSION_MAJOR=$(echo 1.5.91 | cut -d'.' -f1)
+  PACKAGE_VERSION_MINOR=$(echo 1.5.91 | cut -d'.' -f2)
+  PACKAGE_VERSION_MICRO=$(echo 1.5.91 | cut -d'.' -f3)
 
 
 
@@ -5395,7 +5504,7 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5
 $as_echo_n "checking nano version... " >&6; }
 
-  NANO=$(echo 1.4.5 | cut -d'.' -f4)
+  NANO=$(echo 1.5.91 | cut -d'.' -f4)
 
   if test x"$NANO" = x || test "x$NANO" = "x0" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5
@@ -5489,6 +5598,8 @@
 AM_BACKSLASH='\'
 
 
+
+
 GST_API_VERSION=1.0
 
 
@@ -10052,10 +10163,10 @@
 done
 
 
-  GST_CURRENT=405
+  GST_CURRENT=591
   GST_REVISION=0
-  GST_AGE=405
-  GST_LIBVERSION=405:0:405
+  GST_AGE=591
+  GST_LIBVERSION=591:0:591
 
 
 
@@ -14380,8 +14491,8 @@
 
 
 
-GST_REQ=1.4.0
-GSTPB_REQ=1.4.0
+GST_REQ=1.5.91
+GSTPB_REQ=1.5.91
 
 
 
@@ -17295,11 +17406,21 @@
 
 $as_echo "#define HAVE_CPU_ALPHA 1" >>confdefs.h
  ;;
+    xarc*)
+      HAVE_CPU_ARC=yes
+
+$as_echo "#define HAVE_CPU_ARC 1" >>confdefs.h
+ ;;
     xarm*)
       HAVE_CPU_ARM=yes
 
 $as_echo "#define HAVE_CPU_ARM 1" >>confdefs.h
  ;;
+    xaarch64*)
+      HAVE_CPU_AARCH64=yes
+
+$as_echo "#define HAVE_CPU_AARCH64 1" >>confdefs.h
+ ;;
     xsparc*)
       HAVE_CPU_SPARC=yes
 
@@ -17604,6 +17725,14 @@
   HAVE_CPU_ALPHA_FALSE=
 fi
 
+   if test "x$HAVE_CPU_ARC" = "xyes"; then
+  HAVE_CPU_ARC_TRUE=
+  HAVE_CPU_ARC_FALSE='#'
+else
+  HAVE_CPU_ARC_TRUE='#'
+  HAVE_CPU_ARC_FALSE=
+fi
+
    if test "x$HAVE_CPU_ARM" = "xyes"; then
   HAVE_CPU_ARM_TRUE=
   HAVE_CPU_ARM_FALSE='#'
@@ -23109,6 +23238,7 @@
        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
        INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+       INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
     fi
 
 
@@ -23119,6 +23249,7 @@
 
 
 
+
      if test "x$found_introspection" = "xyes"; then
   HAVE_INTROSPECTION_TRUE=
   HAVE_INTROSPECTION_FALSE='#'
@@ -24087,6 +24218,449 @@
 
 
 
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test x"$ax_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+        solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+        ;;
+
+        darwin*)
+        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ;;
+esac
+
+# Clang doesn't consider unrecognized options an error unless we specify
+# -Werror. We throw in some extra Clang-specific options to ensure that
+# this doesn't happen for GCC, which also accepts -Werror.
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
+$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void);
+int
+main ()
+{
+foo()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  ax_pthread_extra_flags=
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+        case $flag in
+                none)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+                ;;
+
+                -*)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                pthread-config)
+                # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; 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_prog_ax_pthread_config+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ax_pthread_config"; then
+  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+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_prog_ax_pthread_config="yes"
+    $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
+
+  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+$as_echo "$ax_pthread_config" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }
+int
+main ()
+{
+pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test "x$ax_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr = $attr; return attr /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  attr_name=$attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        done
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
+
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+        flag=no
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                # TODO: What about Clang on Solaris?
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
+        esac
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
+$as_echo "$flag" >&6; }
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+  ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                case "x/$CC" in #(
+  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+    #handle absolute path differently from PATH based program lookup
+                   case "x$CC" in #(
+  x/*) :
+    if as_fn_executable_p ${CC}_r; then :
+  PTHREAD_CC="${CC}_r"
+fi ;; #(
+  *) :
+    for ac_prog in ${CC}_r
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; 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_prog_PTHREAD_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+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_prog_PTHREAD_CC="$ac_prog"
+    $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
+
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+ ;;
+esac ;; #(
+  *) :
+     ;;
+esac
+                ;;
+            esac
+        fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+
+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
+
+        :
+else
+        ax_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
 for ac_header in unistd.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
@@ -25181,6 +25755,13 @@
 #define GIO_LIBDIR "$GIO_LIBDIR"
 _ACEOF
 
+  GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`"
+
+cat >>confdefs.h <<_ACEOF
+#define GIO_PREFIX "$GIO_PREFIX"
+_ACEOF
+
+
 
 
 
@@ -27856,52 +28437,6 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
 $as_echo "$flag_ok" >&6; }
 
-    else
-                        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 < 2.19.8\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "glib-2.0 < 2.19.8") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -fno-strict-aliasing" >&5
-$as_echo_n "checking to see if compiler understands -fno-strict-aliasing... " >&6; }
-
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fno-strict-aliasing"
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  flag_ok=yes
-else
-  flag_ok=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
-
-  if test "X$flag_ok" = Xyes ; then
-    ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing"
-    true
-  else
-
-    true
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
-$as_echo "$flag_ok" >&6; }
-
-
-fi
     fi
   fi
 
@@ -29049,16 +29584,16 @@
 GST_PLUGINS_NONPORTED=" cdxaparse \
  dccp faceoverlay \
  hdvparse \
- mve mythtv nuvdemux \
- patchdetect real \
+ mve nuvdemux \
+ patchdetect \
  sdi tta \
  videomeasure \
- linsys vcd \
+ linsys \
  apexsink dc1394 \
  gsettings \
  musepack nas sdl timidity \
- directdraw acm wininet \
- xvid lv2 teletextdec sndio osx_video quicktime libvisual"
+ acm wininet \
+ xvid lv2 teletextdec sndio libvisual"
 
 
 
@@ -30997,6 +31532,49 @@
 
 
 
+  GST_PLUGINS_ALL="$GST_PLUGINS_ALL onvif"
+
+
+
+  # Check whether --enable-onvif was given.
+if test "${enable_onvif+set}" = set; then :
+  enableval=$enable_onvif;
+      case "${enableval}" in
+        yes) gst_use_onvif=yes ;;
+        no) gst_use_onvif=no ;;
+        *) as_fn_error $? "bad value ${enableval} for --enable-onvif" "$LINENO" 5 ;;
+       esac
+
+else
+  gst_use_onvif=yes
+fi
+
+  if test x$gst_use_onvif = xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: disabling dependency-less plugin onvif" >&5
+$as_echo "$as_me: disabling dependency-less plugin onvif" >&6;}
+    WITHOUT_PLUGINS="$WITHOUT_PLUGINS onvif"
+  fi
+
+
+    if [ -z "$WITH_PLUGINS" ] || echo " $WITH_PLUGINS " | tr , ' ' | grep -i " onvif " > /dev/null; then
+    GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED onvif"
+  fi
+    if echo " $WITHOUT_PLUGINS " | tr , ' ' | grep -i " onvif " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ onvif / /'`
+  fi
+    if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " onvif " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ onvif / /'`
+  fi
+   if echo " $GST_PLUGINS_SELECTED " | grep -i " onvif " > /dev/null; then
+  USE_PLUGIN_ONVIF_TRUE=
+  USE_PLUGIN_ONVIF_FALSE='#'
+else
+  USE_PLUGIN_ONVIF_TRUE='#'
+  USE_PLUGIN_ONVIF_FALSE=
+fi
+
+
+
   GST_PLUGINS_ALL="$GST_PLUGINS_ALL patchdetect"
 
 
@@ -31169,49 +31747,6 @@
 
 
 
-  GST_PLUGINS_ALL="$GST_PLUGINS_ALL real"
-
-
-
-  # Check whether --enable-real was given.
-if test "${enable_real+set}" = set; then :
-  enableval=$enable_real;
-      case "${enableval}" in
-        yes) gst_use_real=yes ;;
-        no) gst_use_real=no ;;
-        *) as_fn_error $? "bad value ${enableval} for --enable-real" "$LINENO" 5 ;;
-       esac
-
-else
-  gst_use_real=yes
-fi
-
-  if test x$gst_use_real = xno; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: disabling dependency-less plugin real" >&5
-$as_echo "$as_me: disabling dependency-less plugin real" >&6;}
-    WITHOUT_PLUGINS="$WITHOUT_PLUGINS real"
-  fi
-
-
-    if [ -z "$WITH_PLUGINS" ] || echo " $WITH_PLUGINS " | tr , ' ' | grep -i " real " > /dev/null; then
-    GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED real"
-  fi
-    if echo " $WITHOUT_PLUGINS " | tr , ' ' | grep -i " real " > /dev/null; then
-    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ real / /'`
-  fi
-    if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " real " > /dev/null; then
-    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ real / /'`
-  fi
-   if echo " $GST_PLUGINS_SELECTED " | grep -i " real " > /dev/null; then
-  USE_PLUGIN_REAL_TRUE=
-  USE_PLUGIN_REAL_FALSE='#'
-else
-  USE_PLUGIN_REAL_TRUE='#'
-  USE_PLUGIN_REAL_FALSE=
-fi
-
-
-
   GST_PLUGINS_ALL="$GST_PLUGINS_ALL removesilence"
 
 
@@ -31255,6 +31790,49 @@
 
 
 
+  GST_PLUGINS_ALL="$GST_PLUGINS_ALL rtp"
+
+
+
+  # Check whether --enable-rtp was given.
+if test "${enable_rtp+set}" = set; then :
+  enableval=$enable_rtp;
+      case "${enableval}" in
+        yes) gst_use_rtp=yes ;;
+        no) gst_use_rtp=no ;;
+        *) as_fn_error $? "bad value ${enableval} for --enable-rtp" "$LINENO" 5 ;;
+       esac
+
+else
+  gst_use_rtp=yes
+fi
+
+  if test x$gst_use_rtp = xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: disabling dependency-less plugin rtp" >&5
+$as_echo "$as_me: disabling dependency-less plugin rtp" >&6;}
+    WITHOUT_PLUGINS="$WITHOUT_PLUGINS rtp"
+  fi
+
+
+    if [ -z "$WITH_PLUGINS" ] || echo " $WITH_PLUGINS " | tr , ' ' | grep -i " rtp " > /dev/null; then
+    GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED rtp"
+  fi
+    if echo " $WITHOUT_PLUGINS " | tr , ' ' | grep -i " rtp " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ rtp / /'`
+  fi
+    if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " rtp " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ rtp / /'`
+  fi
+   if echo " $GST_PLUGINS_SELECTED " | grep -i " rtp " > /dev/null; then
+  USE_PLUGIN_RTP_TRUE=
+  USE_PLUGIN_RTP_FALSE='#'
+else
+  USE_PLUGIN_RTP_TRUE='#'
+  USE_PLUGIN_RTP_FALSE=
+fi
+
+
+
   GST_PLUGINS_ALL="$GST_PLUGINS_ALL sdi"
 
 
@@ -31944,22 +32522,6 @@
 
 
 
-if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not building real plugin, only works on 32bit and 64bit x86 platforms" >&5
-$as_echo "$as_me: WARNING: Not building real plugin, only works on 32bit and 64bit x86 platforms" >&2;}
-
-  GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ real / /'`
-   if false; then
-  USE_PLUGIN_REAL_TRUE=
-  USE_PLUGIN_REAL_FALSE='#'
-else
-  USE_PLUGIN_REAL_TRUE='#'
-  USE_PLUGIN_REAL_FALSE=
-fi
-
-
-fi
-
 ac_fn_c_check_header_preproc "$LINENO" "AVFoundation/AVFoundation.h" "ac_cv_header_AVFoundation_AVFoundation_h"
 if test "x$ac_cv_header_AVFoundation_AVFoundation_h" = xyes; then :
   HAVE_AVFOUNDATION="yes"
@@ -32073,7 +32635,7 @@
 fi
 
 if test "x$HAVE_PTHREAD_H" = "xyes"; then
-  DCCP_LIBS="$DCCP_LIBS -lpthread"
+  DCCP_LIBS="$DCCP_LIBS $PTHREAD_LIBS"
 
 else
 
@@ -32248,725 +32810,106 @@
 fi
 
 
+
+  which="x11"
+    required="no"
+
+
+pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
 $as_echo_n "checking for X... " >&6; }
 
-
-# Check whether --with-x was given.
-if test "${with_x+set}" = set; then :
-  withval=$with_x;
+if test -n "$PKG_CONFIG"; then
+    if test -n "$X_CFLAGS"; then
+        pkg_cv_X_CFLAGS="$X_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null`
+else
+  pkg_failed=yes
 fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
-    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
-  cd conftest.dir
-  cat >Imakefile <<'_ACEOF'
-incroot:
-	@echo incroot='${INCROOT}'
-usrlibdir:
-	@echo usrlibdir='${USRLIBDIR}'
-libdir:
-	@echo libdir='${LIBDIR}'
-_ACEOF
-  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-    for ac_var in incroot usrlibdir libdir; do
-      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
-    done
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl dylib la dll; do
-      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
-	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
-	ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case $ac_im_incroot in
-	/usr/include) ac_x_includes= ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
-    esac
-    case $ac_im_usrlibdir in
-	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
-    esac
-  fi
-  cd ..
-  rm -f -r conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
-
-if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Xlib.h.
-  # First, try using that file with no special directory specified.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Xlib.h"; then
-    ac_x_includes=$ac_dir
-    break
-  fi
-done
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-fi # $ac_x_includes = no
-
-if test "$ac_x_libraries" = no; then
-  # Check for the libraries.
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS=$LIBS
-  LIBS="-lX11 $LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize ()
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  LIBS=$ac_save_LIBS
-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
-  # Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl dylib la dll; do
-    if test -r "$ac_dir/libX11.$ac_extension"; then
-      ac_x_libraries=$ac_dir
-      break 2
     fi
-  done
-done
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-case $ac_x_includes,$ac_x_libraries in #(
-  no,* | *,no | *\'*)
-    # Didn't find X, or a directory has "'" in its name.
-    ac_cv_have_x="have_x=no";; #(
-  *)
-    # Record where we found X for the cache.
-    ac_cv_have_x="have_x=yes\
-	ac_x_includes='$ac_x_includes'\
-	ac_x_libraries='$ac_x_libraries'"
-esac
-fi
-;; #(
-    *) have_x=yes;;
-  esac
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
-$as_echo "$have_x" >&6; }
-  no_x=yes
 else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes\
-	ac_x_includes='$x_includes'\
-	ac_x_libraries='$x_libraries'"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
-$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$X_LIBS"; then
+        pkg_cv_X_LIBS="$X_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_LIBS=`$PKG_CONFIG --libs "$which" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
 fi
 
 
-  if test "$no_x" = yes; then
-  # Not all programs may use this symbol, but it does not hurt to define it.
 
-$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+if test $pkg_failed = yes; then
 
-  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  if test -n "$x_includes"; then
-    X_CFLAGS="$X_CFLAGS -I$x_includes"
-  fi
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        X_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"`
+        else
+	        X_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$X_PKG_ERRORS" >&5
 
-  # It would also be nice to do this for all -L options, not just this one.
-  if test -n "$x_libraries"; then
-    X_LIBS="$X_LIBS -L$x_libraries"
-    # For Solaris; some versions of Sun CC require a space after -R and
-    # others require no space.  Words are not sufficient . . . .
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
-$as_echo_n "checking whether -R must be followed by a space... " >&6; }
-    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
-    ac_xsave_c_werror_flag=$ac_c_werror_flag
-    ac_c_werror_flag=yes
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       X_LIBS="$X_LIBS -R$x_libraries"
-else
-  LIBS="$ac_xsave_LIBS -R $x_libraries"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	  X_LIBS="$X_LIBS -R $x_libraries"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
-$as_echo "neither works" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    ac_c_werror_flag=$ac_xsave_c_werror_flag
-    LIBS=$ac_xsave_LIBS
-  fi
-
-  # Check for system-dependent libraries X programs must link with.
-  # Do this before checking for the system-independent R6 libraries
-  # (-lICE), since we may need -lsocket or whatever for X linking.
-
-  if test "$ISC" = yes; then
-    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
-  else
-    # Martyn Johnson says this is needed for Ultrix, if the X
-    # libraries were built with DECnet support.  And Karl Berry says
-    # the Alpha needs dnet_stub (dnet does not exist).
-    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XOpenDisplay ();
-int
-main ()
-{
-return XOpenDisplay ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
-    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
-    fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_xsave_LIBS"
-
-    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
-    # to get the SysV transport functions.
-    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
-    # needs -lnsl.
-    # The nsl library prevents programs from opening the X display
-    # on Irix 5.2, according to T.E. Dickey.
-    # The functions gethostbyname, getservbyname, and inet_addr are
-    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
-    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_gethostbyname = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
-      if test $ac_cv_lib_nsl_gethostbyname = no; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
-$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bsd_gethostbyname=yes
-else
-  ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
-$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
-fi
-
+      HAVE_X="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$X_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $X_PKG_ERRORS" >&5
+$as_echo "$as_me: $X_PKG_ERRORS" >&6;}
       fi
-    fi
 
-    # lieder@skyler.mavd.honeywell.com says without -lsocket,
-    # socket/setsockopt and other routines are undefined under SCO ODT
-    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
-    # on later versions), says Simon Leinen: it contains gethostby*
-    # variants that don't use the name server (or something).  -lsocket
-    # must be given before -lnsl if both are needed.  We assume that
-    # if connect needs -lnsl, so does gethostbyname.
-    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = xyes; then :
+elif test $pkg_failed = untried; then
 
-fi
+      HAVE_X="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$X_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $X_PKG_ERRORS" >&5
+$as_echo "$as_me: $X_PKG_ERRORS" >&6;}
+      fi
 
-    if test $ac_cv_func_connect = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_connect+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+	X_CFLAGS=$pkg_cv_X_CFLAGS
+	X_LIBS=$pkg_cv_X_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_connect=yes
-else
-  ac_cv_lib_socket_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = xyes; then :
-  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
-    fi
-
-    # Guillermo Gomez says -lposix is necessary on A/UX.
-    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = xyes; then :
+      HAVE_X="yes"
 
 fi
 
-    if test $ac_cv_func_remove = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
-$as_echo_n "checking for remove in -lposix... " >&6; }
-if ${ac_cv_lib_posix_remove+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char remove ();
-int
-main ()
-{
-return remove ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_posix_remove=yes
-else
-  ac_cv_lib_posix_remove=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
-$as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
-    fi
-
-    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_shmat = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
-$as_echo_n "checking for shmat in -lipc... " >&6; }
-if ${ac_cv_lib_ipc_shmat+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shmat ();
-int
-main ()
-{
-return shmat ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ipc_shmat=yes
-else
-  ac_cv_lib_ipc_shmat=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
-$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
-    fi
-  fi
-
-  # Check for libraries that X11R6 Xt/Xaw programs need.
-  ac_save_LDFLAGS=$LDFLAGS
-  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
-  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-  # check for ICE first), but we must link in the order -lSM -lICE or
-  # we get undefined symbols.  So assume we have SM if we have ICE.
-  # These have to be linked with before -lX11, unlike the other
-  # libraries we check for below, so use a different variable.
-  # John Interrante, Karl Berry
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
-$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char IceConnectionNumber ();
-int
-main ()
-{
-return IceConnectionNumber ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ICE_IceConnectionNumber=yes
-else
-  ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
-  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-fi
-
-  LDFLAGS=$ac_save_LDFLAGS
-
-fi
-
-  ac_cflags_save="$CFLAGS"
-  ac_cppflags_save="$CPPFLAGS"
-  CFLAGS="$CFLAGS $X_CFLAGS"
-  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
-    ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
-  HAVE_X="yes"
-else
-  HAVE_X="no"
-fi
-
-
-
-  if test "x$HAVE_X" = "xno"
-  then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find X11 development files" >&5
-$as_echo "$as_me: cannot find X11 development files" >&6;}
-  else
-        X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
-            X_LIBS="$X_LIBS -lX11"
-
-
-  fi
-
-
-  CFLAGS="$ac_cflags_save"
-  CPPFLAGS="$ac_cppflags_save"
 
 save_CPPFLAGS="$CPPFLAGS"
 save_LIBS="$LIBS"
 
 HAVE_GL=no
 HAVE_GLES2=no
-HAVE_GLU=no
 HAVE_WAYLAND_EGL=no
 
 HAVE_EGL_RPI=no
@@ -33037,69 +32980,6 @@
 
 
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluSphere in -lglu32" >&5
-$as_echo_n "checking for gluSphere in -lglu32... " >&6; }
-if ${ac_cv_lib_glu32_gluSphere+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglu32  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gluSphere ();
-int
-main ()
-{
-return gluSphere ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_glu32_gluSphere=yes
-else
-  ac_cv_lib_glu32_gluSphere=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glu32_gluSphere" >&5
-$as_echo "$ac_cv_lib_glu32_gluSphere" >&6; }
-if test "x$ac_cv_lib_glu32_gluSphere" = xyes; then :
-  HAVE_GLU=yes
-else
-  HAVE_GLU=no
-fi
-
-  if test "x$HAVE_GLU" = "xyes"; then
-    ac_fn_c_check_header_mongrel "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
-if test "x$ac_cv_header_GL_glu_h" = xyes; then :
-  :
-else
-  HAVE_GLU=no
-fi
-
-
-    if test "x$HAVE_GLU" = "xyes"; then
-            :
-    else
-      :
-    fi
-  else
-    :
-  fi
-
-
-
     ac_fn_c_check_header_compile "$LINENO" "GL/wglext.h" "ac_cv_header_GL_wglext_h" "#include <GL/gl.h>
 "
 if test "x$ac_cv_header_GL_wglext_h" = xyes; then :
@@ -33112,10 +32992,10 @@
     if test "x$HAVE_WGLEXT" = "xyes"; then
       HAVE_WGL=yes
       HAVE_GL=yes
-      HAVE_GLU=yes
     fi
   ;;
   *)
+    if test "x$NEED_GL" != "xno"; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glTexImage2D in -lGL" >&5
 $as_echo_n "checking for glTexImage2D in -lGL... " >&6; }
@@ -33179,69 +33059,8 @@
 
 
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluSphere in -lGLU" >&5
-$as_echo_n "checking for gluSphere in -lGLU... " >&6; }
-if ${ac_cv_lib_GLU_gluSphere+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGLU  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gluSphere ();
-int
-main ()
-{
-return gluSphere ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_GLU_gluSphere=yes
-else
-  ac_cv_lib_GLU_gluSphere=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluSphere" >&5
-$as_echo "$ac_cv_lib_GLU_gluSphere" >&6; }
-if test "x$ac_cv_lib_GLU_gluSphere" = xyes; then :
-  HAVE_GLU=yes
-else
-  HAVE_GLU=no
-fi
-
-  if test "x$HAVE_GLU" = "xyes"; then
-    ac_fn_c_check_header_mongrel "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
-if test "x$ac_cv_header_GL_glu_h" = xyes; then :
-  :
-else
-  HAVE_GLU=no
-fi
-
-
-    if test "x$HAVE_GLU" = "xyes"; then
-            :
-    else
-      :
     fi
-  else
-    :
-  fi
-
-
-
+    if test "x$NEED_GLES2" != "xno"; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glTexImage2D in -lGLESv2" >&5
 $as_echo_n "checking for glTexImage2D in -lGLESv2... " >&6; }
@@ -33305,6 +33124,8 @@
 
 
 
+    fi
+    if test "x$NEED_EGL" != "xno"; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eglGetError in -lEGL" >&5
 $as_echo_n "checking for eglGetError in -lEGL... " >&6; }
@@ -33368,6 +33189,7 @@
 
 
 
+    fi
 
     old_LIBS=$LIBS
     old_CFLAGS=$CFLAGS
@@ -33763,10 +33585,6 @@
 CPPFLAGS="$save_CPPFLAGS"
 LIBS="$save_LIBS"
 
-
-
-
-
 USE_OPENGL=no
 USE_GLES2=no
 USE_GLX=no
@@ -33809,17 +33627,9 @@
       if test "x$NEED_GLX" = "xyes"; then
         as_fn_error $? "Building the GLX backend without the OpenGL backend is unsupported" "$LINENO" 5
       fi
-    else       if test "x$HAVE_GLU" = "xno"; then
-        if test "x$NEED_GL" = "xyes"; then
-          as_fn_error $? "GLU is required with OpenGL support" "$LINENO" 5
-        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GLU is required with OpenGL support" >&5
-$as_echo "$as_me: WARNING: GLU is required with OpenGL support" >&2;}
-        fi
-      else         USE_OPENGL=yes
-        if test "x$NEED_GLX" != "xno"; then
-          USE_GLX=yes
-        fi
+    else       USE_OPENGL=yes
+      if test "x$NEED_GLX" != "xno"; then
+        USE_GLX=yes
       fi
     fi
   fi
@@ -33830,24 +33640,22 @@
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
 #endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
 #  include <OpenGLES/ES2/gl.h>
 #  include <OpenGLES/ES2/glext.h>
 # else
 #  include <GLES2/gl2.h>
 #  include <GLES2/gl2ext.h>
 # endif
-# if __APPLE__
+# ifdef __APPLE__
 #  include <OpenGL/OpenGL.h>
 #  include <OpenGL/gl.h>
 #  if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 #   define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
 #   include <OpenGL/gl3.h>
 #  endif
-#  include <OpenGL/glu.h>
 # else
 #  include <GL/gl.h>
-#  include <GL/glu.h>
 #  if __WIN32__ || _WIN32
 #   include <GL/glext.h>
 #  endif
@@ -33880,12 +33688,13 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
     if test "x$NEED_GLES2" = "xyes"; then
-      if test "x$NEED_OPENGL" = "xyes"; then
+      if test "x$NEED_GL" = "xyes"; then
         as_fn_error $? "Cannot seem to include both GL and GLES2 headers. Try disabling one API" "$LINENO" 5
       fi
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Desktop GL support" >&5
 $as_echo "$as_me: WARNING: Disabling Desktop GL support" >&2;}
       HAVE_GL=no
+      USE_OPENGL=no
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GL|ES 2.0 support" >&5
 $as_echo "$as_me: WARNING: Disabling GL|ES 2.0 support" >&2;}
@@ -33897,7 +33706,7 @@
   CPPFLAGS="$save_CPPFLAGS"
 fi
 
-#dnl Check for OpenGL, GLU
+#dnl Check for OpenGL
 echo host is $host
 case $host in
   *-android*)
@@ -33957,9 +33766,6 @@
       if test "x$NEED_GL" != "xno"; then
         GL_LIBS="$GL_LIBS -lGL"
       fi
-      if test "x$HAVE_GLU" = "xyes"; then
-        GL_LIBS="$GL_LIBS -lGLU"
-      fi
     fi
 
         if test "x$HAVE_GLES2" = "xyes"; then
@@ -34046,15 +33852,9 @@
             if test "x$NEED_WGL" = "xyes"; then
         as_fn_error $? "WGL is not available on Mac OS X" "$LINENO" 5
       fi
-      if test "x$NEED_EGL" = "xyes"; then
-        as_fn_error $? "EGL is not available on Mac OS X" "$LINENO" 5
-      fi
-      if test "x$NEED_GLES2" = "xyes"; then
-        as_fn_error $? "OpenGL|ES 2.0 is not supported on your platform yet" "$LINENO" 5
-      fi
 
       if test "x$NEED_COCOA" != "xno"; then
-        GL_LIBS="$LIBS -framework OpenGL -framework Cocoa"
+        GL_LIBS="$LIBS -framework OpenGL -framework Cocoa -framework QuartzCore -framework CoreFoundation"
         GL_CFLAGS="$GL_CFLAGS"
         USE_COCOA=yes
         HAVE_WINDOW_COCOA=yes
@@ -34074,12 +33874,26 @@
           if test "x$NEED_GL" != "xno"; then
             GL_LIBS="$GL_LIBS -lGL"
           fi
-          if test "x$HAVE_GLU" = "xyes"; then
-            GL_LIBS="$GL_LIBS -lGLU"
-          fi
           USE_OPENGL=yes
         fi
       fi
+
+      if test "x$HAVE_EGL" = "xyes"; then
+        if test "x$NEED_EGL" != "xno"; then
+          if test "x$HAVE_WINDOW_X11" = "xyes"; then
+            GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
+            GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
+            USE_EGL=yes
+          fi
+        fi
+      fi
+
+            if test "x$HAVE_GLES2" = "xyes"; then
+        if test "x$NEED_GLES2" != "xno"; then
+          GL_LIBS="$GL_LIBS -lGLESv2"
+          USE_GLES2=yes
+        fi
+      fi
     fi
     ;;
   *-mingw32*)
@@ -34091,10 +33905,10 @@
     fi
 
     if test "x$HAVE_GL" = "xyes"; then
-      if test "$NEED_GL" != "xno"; then
+      if test "x$NEED_GL" != "xno"; then
         if test "x$HAVE_WGL" = "xyes"; then
           if test "$NEED_WGL" != "xno"; then
-            GL_LIBS="$GL_LIBS -lgdi32 -lopengl32 -lglu32"
+            GL_LIBS="$GL_LIBS -lgdi32 -lopengl32"
             HAVE_WINDOW_WIN32=yes
             USE_OPENGL=yes
             USE_WGL=yes
@@ -34405,7 +34219,7 @@
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
 #endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
 #  include <OpenGLES/ES2/gl.h>
 #  include <OpenGLES/ES2/glext.h>
 # else
@@ -34417,13 +34231,11 @@
 
 if test "x$USE_OPENGL" = "xyes"; then
   GL_INCLUDES="$GL_INCLUDES
-# if __APPLE__
+# ifdef __APPLE__
 #  include <OpenGL/OpenGL.h>
 #  include <OpenGL/gl.h>
-#  include <OpenGL/glu.h>
 # else
 #  include <GL/gl.h>
-#  include <GL/glu.h>
 #  if __WIN32__ || _WIN32
 #   include <GL/glext.h>
 #  endif
@@ -34435,6 +34247,8 @@
 GST_GL_HAVE_GLCHAR=0
 GST_GL_HAVE_GLSIZEIPTR=0
 GST_GL_HAVE_GLINTPTR=0
+GST_GL_HAVE_GLSYNC=0
+GST_GL_HAVE_GLUINT64=0
 
 old_CFLAGS=$CFLAGS
 CFLAGS="$GL_CFLAGS $CFLAGS"
@@ -34499,6 +34313,36 @@
   GST_GL_HAVE_GLINTPTR=1
 fi
 
+ac_fn_c_check_type "$LINENO" "GLsync" "ac_cv_type_GLsync" "$GL_INCLUDES
+"
+if test "x$ac_cv_type_GLsync" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GLSYNC 1
+_ACEOF
+
+
+fi
+
+if test "x$ac_cv_type_GLsync" = "xyes"; then
+  GST_GL_HAVE_GLSYNC=1
+fi
+
+ac_fn_c_check_type "$LINENO" "GLuint64" "ac_cv_type_GLuint64" "$GL_INCLUDES
+"
+if test "x$ac_cv_type_GLuint64" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GLUINT64 1
+_ACEOF
+
+
+fi
+
+if test "x$ac_cv_type_GLuint64" = "xyes"; then
+  GST_GL_HAVE_GLUINT64=1
+fi
+
 CFLAGS=$old_CFLAGS
 
 GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
@@ -34506,6 +34350,8 @@
 #define GST_GL_HAVE_GLCHAR $GST_GL_HAVE_GLCHAR
 #define GST_GL_HAVE_GLSIZEIPTR $GST_GL_HAVE_GLSIZEIPTR
 #define GST_GL_HAVE_GLINTPTR $GST_GL_HAVE_GLINTPTR
+#define GST_GL_HAVE_GLSYNC $GST_GL_HAVE_GLSYNC
+#define GST_GL_HAVE_GLUINT64 $GST_GL_HAVE_GLUINT64
 "
 
 ac_config_commands="$ac_config_commands gst-libs/gst/gl/gstglconfig.h"
@@ -34775,7 +34621,7 @@
   save_LIBS="$LIBS"
   CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
   LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
-  LIBS="$LIBS -ldsound -ldxerr9 -luser32"
+  LIBS="$LIBS -lwinmm -ldsound -ldxerr9 -luser32"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectSound LDFLAGS" >&5
 $as_echo_n "checking for DirectSound LDFLAGS... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -34784,6 +34630,7 @@
 #include <windows.h>
 #include <dxerr9.h>
 #include <dsound.h>
+#include <mmsystem.h>
 
 int
 main ()
@@ -34810,7 +34657,7 @@
   LIBS=$save_LIBS
 
   if test "x$HAVE_DIRECTSOUND" = "xyes";  then
-        DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32"
+        DIRECTSOUND_LIBS="-lwinmm -ldsound -ldxerr9 -luser32"
 
 
 
@@ -35137,140 +34984,6 @@
 
 
 echo
-{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: DirectDraw plug-in ***" >&5
-$as_echo "$as_me: *** checking feature: DirectDraw plug-in ***" >&6;}
-if test "xdirectdrawsink" != "x"
-then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: directdrawsink ***" >&5
-$as_echo "$as_me: *** for plug-ins: directdrawsink ***" >&6;}
-fi
-NOUSE=
-if test "x$USE_DIRECTDRAW" = "xno"; then
-  NOUSE="yes"
-fi
-# Check whether --enable-directdraw was given.
-if test "${enable_directdraw+set}" = set; then :
-  enableval=$enable_directdraw;  case "${enableval}" in
-      yes) USE_DIRECTDRAW=yes;;
-      no) USE_DIRECTDRAW=no;;
-      *) as_fn_error $? "bad value ${enableval} for --enable-directdraw" "$LINENO" 5 ;;
-    esac
-else
-   USE_DIRECTDRAW=yes
-fi
-
-if test "x$NOUSE" = "xyes"; then
-  USE_DIRECTDRAW="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** directdrawsink pre-configured not to be built" >&5
-$as_echo "$as_me: WARNING: *** directdrawsink pre-configured not to be built" >&2;}
-fi
-NOUSE=
-
-if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " DIRECTDRAW " > /dev/null; then
-  USE_DIRECTDRAW="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** directdrawsink not ported" >&5
-$as_echo "$as_me: WARNING: *** directdrawsink not ported" >&2;}
-fi
-
-
-if test x$USE_DIRECTDRAW = xyes; then
-
-  gst_check_save_LIBS=$LIBS
-  gst_check_save_LDFLAGS=$LDFLAGS
-  gst_check_save_CFLAGS=$CFLAGS
-  gst_check_save_CPPFLAGS=$CPPFLAGS
-  gst_check_save_CXXFLAGS=$CXXFLAGS
-
-  HAVE_DIRECTDRAW=no
-
-  HAVE_DIRECTDRAW="no"
-  save_CFLAGS="$CFLAGS"
-  save_LDFLAGS="$LDFLAGS"
-  save_LIBS="$LIBS"
-  CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
-  LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
-  LIBS="$LIBS -lddraw -lgdi32"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectDraw LDFLAGS" >&5
-$as_echo_n "checking for DirectDraw LDFLAGS... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <windows.h>
-#include <ddraw.h>
-
-int
-main ()
-{
-
-  GetStockObject(0);
-  DirectDrawCreate(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  HAVE_DIRECTDRAW="yes"
-else
-  HAVE_DIRECTDRAW="no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DIRECTDRAW" >&5
-$as_echo "$HAVE_DIRECTDRAW" >&6; }
-  CFLAGS=$save_CFLAGS
-  LDFLAGS=$save_LDFLAGS
-  LIBS=$save_LIBS
-
-  if test "x$HAVE_DIRECTDRAW" = "xyes";  then
-        DIRECTDRAW_LIBS="-lddraw -ldxguid -lgdi32"
-
-
-
-  fi
-
-
-
-  LIBS=$gst_check_save_LIBS
-  LDFLAGS=$gst_check_save_LDFLAGS
-  CFLAGS=$gst_check_save_CFLAGS
-  CPPFLAGS=$gst_check_save_CPPFLAGS
-  CXXFLAGS=$gst_check_save_CXXFLAGS
-
-    if test x$HAVE_DIRECTDRAW = xno; then
-    USE_DIRECTDRAW=no
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: directdrawsink" >&5
-$as_echo "$as_me: *** These plugins will be built: directdrawsink" >&6;}
-  fi
-fi
-if test x$USE_DIRECTDRAW = xyes; then
-  :
-  if test "xdirectdrawsink" != "x"; then
-    GST_PLUGINS_YES="\tdirectdrawsink\n$GST_PLUGINS_YES"
-  fi
-
-$as_echo "#define HAVE_DIRECTDRAW /**/" >>confdefs.h
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: directdrawsink" >&5
-$as_echo "$as_me: *** These plugins will not be built: directdrawsink" >&6;}
-  if test "xdirectdrawsink" != "x"; then
-    GST_PLUGINS_NO="\tdirectdrawsink\n$GST_PLUGINS_NO"
-  fi
-  :
-fi
- if test x$USE_DIRECTDRAW = xyes; then
-  USE_DIRECTDRAW_TRUE=
-  USE_DIRECTDRAW_FALSE='#'
-else
-  USE_DIRECTDRAW_TRUE='#'
-  USE_DIRECTDRAW_FALSE=
-fi
-
-
-
-echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: winscreencap plug-in ***" >&5
 $as_echo "$as_me: *** checking feature: winscreencap plug-in ***" >&6;}
 if test "xwinscreencap" != "x"
@@ -35810,20 +35523,20 @@
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLUEZ" >&5
-$as_echo_n "checking for BLUEZ... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLUEZ5" >&5
+$as_echo_n "checking for BLUEZ5... " >&6; }
 
 if test -n "$PKG_CONFIG"; then
-    if test -n "$BLUEZ_CFLAGS"; then
-        pkg_cv_BLUEZ_CFLAGS="$BLUEZ_CFLAGS"
+    if test -n "$BLUEZ5_CFLAGS"; then
+        pkg_cv_BLUEZ5_CFLAGS="$BLUEZ5_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bluez < 5.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "bluez < 5.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bluez >= 5.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "bluez >= 5.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_BLUEZ_CFLAGS=`$PKG_CONFIG --cflags "bluez < 5.0" 2>/dev/null`
+  pkg_cv_BLUEZ5_CFLAGS=`$PKG_CONFIG --cflags "bluez >= 5.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -35832,16 +35545,16 @@
 	pkg_failed=untried
 fi
 if test -n "$PKG_CONFIG"; then
-    if test -n "$BLUEZ_LIBS"; then
-        pkg_cv_BLUEZ_LIBS="$BLUEZ_LIBS"
+    if test -n "$BLUEZ5_LIBS"; then
+        pkg_cv_BLUEZ5_LIBS="$BLUEZ5_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bluez < 5.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "bluez < 5.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bluez >= 5.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "bluez >= 5.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_BLUEZ_LIBS=`$PKG_CONFIG --libs "bluez < 5.0" 2>/dev/null`
+  pkg_cv_BLUEZ5_LIBS=`$PKG_CONFIG --libs "bluez >= 5.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -35860,12 +35573,12 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        BLUEZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "bluez < 5.0"`
+	        BLUEZ5_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "bluez >= 5.0"`
         else
-	        BLUEZ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "bluez < 5.0"`
+	        BLUEZ5_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "bluez >= 5.0"`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$BLUEZ_PKG_ERRORS" >&5
+	echo "$BLUEZ5_PKG_ERRORS" >&5
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -35877,27 +35590,27 @@
     HAVE_BLUEZ=no
 
 else
-	BLUEZ_CFLAGS=$pkg_cv_BLUEZ_CFLAGS
-	BLUEZ_LIBS=$pkg_cv_BLUEZ_LIBS
+	BLUEZ5_CFLAGS=$pkg_cv_BLUEZ5_CFLAGS
+	BLUEZ5_LIBS=$pkg_cv_BLUEZ5_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
-$as_echo_n "checking for DBUS... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO_UNIX" >&5
+$as_echo_n "checking for GIO_UNIX... " >&6; }
 
 if test -n "$PKG_CONFIG"; then
-    if test -n "$DBUS_CFLAGS"; then
-        pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+    if test -n "$GIO_UNIX_CFLAGS"; then
+        pkg_cv_GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 > 2.24\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 > 2.24") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
+  pkg_cv_GIO_UNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 > 2.24" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -35906,16 +35619,16 @@
 	pkg_failed=untried
 fi
 if test -n "$PKG_CONFIG"; then
-    if test -n "$DBUS_LIBS"; then
-        pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+    if test -n "$GIO_UNIX_LIBS"; then
+        pkg_cv_GIO_UNIX_LIBS="$GIO_UNIX_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 > 2.24\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 > 2.24") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
+  pkg_cv_GIO_UNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 > 2.24" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -35934,24 +35647,70 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"`
+	        GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-unix-2.0 > 2.24"`
         else
-	        DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"`
+	        GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-unix-2.0 > 2.24"`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DBUS_PKG_ERRORS" >&5
+	echo "$GIO_UNIX_PKG_ERRORS" >&5
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-                HAVE_BLUEZ=no
+
+      HAVE_BLUEZ=no
+
 elif test $pkg_failed = untried; then
-	HAVE_BLUEZ=no
+
+      HAVE_BLUEZ=no
+
 else
-	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
-	DBUS_LIBS=$pkg_cv_DBUS_LIBS
+	GIO_UNIX_CFLAGS=$pkg_cv_GIO_UNIX_CFLAGS
+	GIO_UNIX_LIBS=$pkg_cv_GIO_UNIX_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-	HAVE_BLUEZ=yes
+
+      # Extract the first word of "gdbus-codegen", so it can be a program name with args.
+set dummy gdbus-codegen; 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_prog_GDBUS_CODEGEN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GDBUS_CODEGEN"; then
+  ac_cv_prog_GDBUS_CODEGEN="$GDBUS_CODEGEN" # Let the user override the test.
+else
+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_prog_GDBUS_CODEGEN="gdbus-codegen"
+    $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
+
+fi
+fi
+GDBUS_CODEGEN=$ac_cv_prog_GDBUS_CODEGEN
+if test -n "$GDBUS_CODEGEN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDBUS_CODEGEN" >&5
+$as_echo "$GDBUS_CODEGEN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+      HAVE_BLUEZ=yes
+
+$as_echo "#define HAVE_BLUEZ5 1" >>confdefs.h
+
+
 fi
 
 fi
@@ -35996,110 +35755,6 @@
 
 
 
-HAVE_OSX_VIDEO="no"
-echo
-{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: OSX video ***" >&5
-$as_echo "$as_me: *** checking feature: OSX video ***" >&6;}
-if test "xosxvideosrc" != "x"
-then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: osxvideosrc ***" >&5
-$as_echo "$as_me: *** for plug-ins: osxvideosrc ***" >&6;}
-fi
-NOUSE=
-if test "x$USE_OSX_VIDEO" = "xno"; then
-  NOUSE="yes"
-fi
-# Check whether --enable-osx_video was given.
-if test "${enable_osx_video+set}" = set; then :
-  enableval=$enable_osx_video;  case "${enableval}" in
-      yes) USE_OSX_VIDEO=yes;;
-      no) USE_OSX_VIDEO=no;;
-      *) as_fn_error $? "bad value ${enableval} for --enable-osx_video" "$LINENO" 5 ;;
-    esac
-else
-   USE_OSX_VIDEO=yes
-fi
-
-if test "x$NOUSE" = "xyes"; then
-  USE_OSX_VIDEO="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** osxvideosrc pre-configured not to be built" >&5
-$as_echo "$as_me: WARNING: *** osxvideosrc pre-configured not to be built" >&2;}
-fi
-NOUSE=
-
-if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " OSX_VIDEO " > /dev/null; then
-  USE_OSX_VIDEO="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** osxvideosrc not ported" >&5
-$as_echo "$as_me: WARNING: *** osxvideosrc not ported" >&2;}
-fi
-
-
-if test x$USE_OSX_VIDEO = xyes; then
-
-  gst_check_save_LIBS=$LIBS
-  gst_check_save_LDFLAGS=$LDFLAGS
-  gst_check_save_CFLAGS=$CFLAGS
-  gst_check_save_CPPFLAGS=$CPPFLAGS
-  gst_check_save_CXXFLAGS=$CXXFLAGS
-
-  HAVE_OSX_VIDEO=no
-
-  ac_fn_c_check_type "$LINENO" "SeqGrabComponent" "ac_cv_type_SeqGrabComponent" "#include <Quicktime/Quicktime.h>
-"
-if test "x$ac_cv_type_SeqGrabComponent" = xyes; then :
-  HAVE_OSX_VIDEO="yes"
-else
-  HAVE_OSX_VIDEO="no"
-fi
-
-
-
-  LIBS=$gst_check_save_LIBS
-  LDFLAGS=$gst_check_save_LDFLAGS
-  CFLAGS=$gst_check_save_CFLAGS
-  CPPFLAGS=$gst_check_save_CPPFLAGS
-  CXXFLAGS=$gst_check_save_CXXFLAGS
-
-    if test x$HAVE_OSX_VIDEO = xno; then
-    USE_OSX_VIDEO=no
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: osxvideosrc" >&5
-$as_echo "$as_me: *** These plugins will be built: osxvideosrc" >&6;}
-  fi
-fi
-if test x$USE_OSX_VIDEO = xyes; then
-  :
-  if test "xosxvideosrc" != "x"; then
-    GST_PLUGINS_YES="\tosxvideosrc\n$GST_PLUGINS_YES"
-  fi
-
-$as_echo "#define HAVE_OSX_VIDEO /**/" >>confdefs.h
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: osxvideosrc" >&5
-$as_echo "$as_me: *** These plugins will not be built: osxvideosrc" >&6;}
-  if test "xosxvideosrc" != "x"; then
-    GST_PLUGINS_NO="\tosxvideosrc\n$GST_PLUGINS_NO"
-  fi
-  :
-fi
- if test x$USE_OSX_VIDEO = xyes; then
-  USE_OSX_VIDEO_TRUE=
-  USE_OSX_VIDEO_FALSE='#'
-else
-  USE_OSX_VIDEO_TRUE='#'
-  USE_OSX_VIDEO_FALSE=
-fi
-
-
-case "$host" in
-  *-*darwin*)
-    ;;
-  *)
-    HAVE_OSX_VIDEO="no"
-    ;;
-esac
-
 HAVE_AVC="no"
 echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: AVC Video Services ***" >&5
@@ -36233,102 +35888,6 @@
 esac
 
 echo
-{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: QuickTime wrapper ***" >&5
-$as_echo "$as_me: *** checking feature: QuickTime wrapper ***" >&6;}
-if test "xqtwrapper" != "x"
-then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: qtwrapper ***" >&5
-$as_echo "$as_me: *** for plug-ins: qtwrapper ***" >&6;}
-fi
-NOUSE=
-if test "x$USE_QUICKTIME" = "xno"; then
-  NOUSE="yes"
-fi
-# Check whether --enable-quicktime was given.
-if test "${enable_quicktime+set}" = set; then :
-  enableval=$enable_quicktime;  case "${enableval}" in
-      yes) USE_QUICKTIME=yes;;
-      no) USE_QUICKTIME=no;;
-      *) as_fn_error $? "bad value ${enableval} for --enable-quicktime" "$LINENO" 5 ;;
-    esac
-else
-   USE_QUICKTIME=yes
-fi
-
-if test "x$NOUSE" = "xyes"; then
-  USE_QUICKTIME="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** qtwrapper pre-configured not to be built" >&5
-$as_echo "$as_me: WARNING: *** qtwrapper pre-configured not to be built" >&2;}
-fi
-NOUSE=
-
-if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " QUICKTIME " > /dev/null; then
-  USE_QUICKTIME="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** qtwrapper not ported" >&5
-$as_echo "$as_me: WARNING: *** qtwrapper not ported" >&2;}
-fi
-
-
-if test x$USE_QUICKTIME = xyes; then
-
-  gst_check_save_LIBS=$LIBS
-  gst_check_save_LDFLAGS=$LDFLAGS
-  gst_check_save_CFLAGS=$CFLAGS
-  gst_check_save_CPPFLAGS=$CPPFLAGS
-  gst_check_save_CXXFLAGS=$CXXFLAGS
-
-  HAVE_QUICKTIME=no
-
-  ac_fn_c_check_type "$LINENO" "SampleReferenceRecord" "ac_cv_type_SampleReferenceRecord" "#include <Quicktime/Quicktime.h>
-"
-if test "x$ac_cv_type_SampleReferenceRecord" = xyes; then :
-  HAVE_QUICKTIME="yes"
-else
-  HAVE_QUICKTIME="no"
-fi
-
-
-
-  LIBS=$gst_check_save_LIBS
-  LDFLAGS=$gst_check_save_LDFLAGS
-  CFLAGS=$gst_check_save_CFLAGS
-  CPPFLAGS=$gst_check_save_CPPFLAGS
-  CXXFLAGS=$gst_check_save_CXXFLAGS
-
-    if test x$HAVE_QUICKTIME = xno; then
-    USE_QUICKTIME=no
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: qtwrapper" >&5
-$as_echo "$as_me: *** These plugins will be built: qtwrapper" >&6;}
-  fi
-fi
-if test x$USE_QUICKTIME = xyes; then
-  :
-  if test "xqtwrapper" != "x"; then
-    GST_PLUGINS_YES="\tqtwrapper\n$GST_PLUGINS_YES"
-  fi
-
-$as_echo "#define HAVE_QUICKTIME /**/" >>confdefs.h
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: qtwrapper" >&5
-$as_echo "$as_me: *** These plugins will not be built: qtwrapper" >&6;}
-  if test "xqtwrapper" != "x"; then
-    GST_PLUGINS_NO="\tqtwrapper\n$GST_PLUGINS_NO"
-  fi
-  :
-fi
- if test x$USE_QUICKTIME = xyes; then
-  USE_QUICKTIME_TRUE=
-  USE_QUICKTIME_FALSE='#'
-else
-  USE_QUICKTIME_TRUE='#'
-  USE_QUICKTIME_FALSE=
-fi
-
-
-
-echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: POSIX shared memory source and sink ***" >&5
 $as_echo "$as_me: *** checking feature: POSIX shared memory source and sink ***" >&6;}
 if test "xshm" != "x"
@@ -36731,101 +36290,6 @@
 
 
 
-  which="gstreamer-video-1.0"
-    required="no"
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST_VIDEO" >&5
-$as_echo_n "checking for GST_VIDEO... " >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GST_VIDEO_CFLAGS"; then
-        pkg_cv_GST_VIDEO_CFLAGS="$GST_VIDEO_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GST_VIDEO_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GST_VIDEO_LIBS"; then
-        pkg_cv_GST_VIDEO_LIBS="$GST_VIDEO_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GST_VIDEO_LIBS=`$PKG_CONFIG --libs "$which" 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
-	        GST_VIDEO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"`
-        else
-	        GST_VIDEO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GST_VIDEO_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-      HAVE_GST_VIDEO="no"
-      if test "x$required" = "xyes"; then
-        as_fn_error $? "$GST_VIDEO_PKG_ERRORS" "$LINENO" 5
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_VIDEO_PKG_ERRORS" >&5
-$as_echo "$as_me: $GST_VIDEO_PKG_ERRORS" >&6;}
-      fi
-
-elif test $pkg_failed = untried; then
-
-      HAVE_GST_VIDEO="no"
-      if test "x$required" = "xyes"; then
-        as_fn_error $? "$GST_VIDEO_PKG_ERRORS" "$LINENO" 5
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_VIDEO_PKG_ERRORS" >&5
-$as_echo "$as_me: $GST_VIDEO_PKG_ERRORS" >&6;}
-      fi
-
-else
-	GST_VIDEO_CFLAGS=$pkg_cv_GST_VIDEO_CFLAGS
-	GST_VIDEO_LIBS=$pkg_cv_GST_VIDEO_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-      HAVE_GST_VIDEO="yes"
-
-fi
-
-
-
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for G_UDEV" >&5
 $as_echo_n "checking for G_UDEV... " >&6; }
@@ -37851,6 +37315,171 @@
 
 
 echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: bs2b ***" >&5
+$as_echo "$as_me: *** checking feature: bs2b ***" >&6;}
+if test "xbs2b" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: bs2b ***" >&5
+$as_echo "$as_me: *** for plug-ins: bs2b ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_BS2B" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-bs2b was given.
+if test "${enable_bs2b+set}" = set; then :
+  enableval=$enable_bs2b;  case "${enableval}" in
+      yes) USE_BS2B=yes;;
+      no) USE_BS2B=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-bs2b" "$LINENO" 5 ;;
+    esac
+else
+   USE_BS2B=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_BS2B="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** bs2b pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** bs2b pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " BS2B " > /dev/null; then
+  USE_BS2B="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** bs2b not ported" >&5
+$as_echo "$as_me: WARNING: *** bs2b not ported" >&2;}
+fi
+
+
+if test x$USE_BS2B = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_BS2B=no
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BS2B" >&5
+$as_echo_n "checking for BS2B... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$BS2B_CFLAGS"; then
+        pkg_cv_BS2B_CFLAGS="$BS2B_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbs2b >= 3.1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libbs2b >= 3.1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BS2B_CFLAGS=`$PKG_CONFIG --cflags "libbs2b >= 3.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 "$BS2B_LIBS"; then
+        pkg_cv_BS2B_LIBS="$BS2B_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbs2b >= 3.1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libbs2b >= 3.1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BS2B_LIBS=`$PKG_CONFIG --libs "libbs2b >= 3.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
+	        BS2B_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libbs2b >= 3.1.0"`
+        else
+	        BS2B_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libbs2b >= 3.1.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$BS2B_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    HAVE_BS2B="no"
+
+elif test $pkg_failed = untried; then
+
+    HAVE_BS2B="no"
+
+else
+	BS2B_CFLAGS=$pkg_cv_BS2B_CFLAGS
+	BS2B_LIBS=$pkg_cv_BS2B_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_BS2B="yes"
+fi
+
+
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_BS2B = xno; then
+    USE_BS2B=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: bs2b" >&5
+$as_echo "$as_me: *** These plugins will be built: bs2b" >&6;}
+  fi
+fi
+if test x$USE_BS2B = xyes; then
+  :
+  if test "xbs2b" != "x"; then
+    GST_PLUGINS_YES="\tbs2b\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_BS2B /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: bs2b" >&5
+$as_echo "$as_me: *** These plugins will not be built: bs2b" >&6;}
+  if test "xbs2b" != "x"; then
+    GST_PLUGINS_NO="\tbs2b\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_BS2B = xyes; then
+  USE_BS2B_TRUE=
+  USE_BS2B_FALSE='#'
+else
+  USE_BS2B_TRUE='#'
+  USE_BS2B_FALSE=
+fi
+
+
+
+echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: bz2 library ***" >&5
 $as_echo "$as_me: *** checking feature: bz2 library ***" >&6;}
 if test "xbz2" != "x"
@@ -38200,12 +37829,12 @@
         pkg_cv_CURL_CFLAGS="$CURL_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.21.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.21.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.35.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.35.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.21.0" 2>/dev/null`
+  pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.35.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -38218,12 +37847,12 @@
         pkg_cv_CURL_LIBS="$CURL_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.21.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.21.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.35.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libcurl >= 7.35.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.21.0" 2>/dev/null`
+  pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.35.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -38242,9 +37871,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl >= 7.21.0"`
+	        CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl >= 7.35.0"`
         else
-	        CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl >= 7.21.0"`
+	        CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl >= 7.35.0"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$CURL_PKG_ERRORS" >&5
@@ -38265,7 +37894,7 @@
 $as_echo "yes" >&6; }
 
     HAVE_CURL="yes"
-    for ac_header in unistd.h sys/socket.h sys/types.h netinet/in.h netinet/ip.h netinet/tcp.h fcntl.h
+    for ac_header in unistd.h sys/socket.h sys/types.h netinet/in.h netinet/tcp.h fcntl.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -38296,6 +37925,27 @@
 
 done
 
+    for ac_header in netinet/ip.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "#ifdef HAVE_SYS_TYPES_H
+     # include <sys/types.h>
+     #endif
+     #ifdef HAVE_NETINET_IN_H
+     # include <netinet/in.h>
+     #endif
+
+"
+if test "x$ac_cv_header_netinet_ip_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NETINET_IP_H 1
+_ACEOF
+
+else
+  HAVE_CURL="no"
+fi
+
+done
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket support needed by curlsink" >&5
 $as_echo_n "checking for socket support needed by curlsink... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_CURL" >&5
@@ -38499,12 +38149,12 @@
         pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.4") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.8\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.8") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.4" 2>/dev/null`
+  pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.8" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -38517,12 +38167,12 @@
         pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.4") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.8\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.8") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.4" 2>/dev/null`
+  pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.8" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -38541,9 +38191,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.4"`
+	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.8"`
         else
-	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.4"`
+	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.8"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBXML2_PKG_ERRORS" >&5
@@ -38830,6 +38480,9 @@
 
    HAVE_DECKLINK=no
    case "$host" in
+     *android*)
+       HAVE_DECKLINK=no
+       ;;
      *-*linux*)
        if test "x$HAVE_PTHREAD_H" = "xyes"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
@@ -38921,7 +38574,7 @@
             HAVE_DECKLINK=yes
             DECKLINK_CXXFLAGS=
             DECKLINK_LIBS="-lpthread -ldl"
-	    HAVE_DECKLINK_OSX=yes
+            HAVE_DECKLINK_OSX=yes
 
 fi
 
@@ -40441,11 +40094,11 @@
 /* end confdefs.h.  */
 
               #include <$faad_hdr>
-              GST_CHECK_FAAD_VERSION FAAD2_VERSION
+              FAAD2_VERSION
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "GST_CHECK_FAAD_VERSION \"2\.$minor\"" >/dev/null 2>&1; then :
+  $EGREP "\"2\.$minor\"$" >/dev/null 2>&1; then :
 
               faad2_minor_version=$minor
 
@@ -41755,6 +41408,167 @@
 
 
 echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: libde265 HEVC/H.265 decoder ***" >&5
+$as_echo "$as_me: *** checking feature: libde265 HEVC/H.265 decoder ***" >&6;}
+if test "xlibde265" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: libde265 ***" >&5
+$as_echo "$as_me: *** for plug-ins: libde265 ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_LIBDE265" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-libde265 was given.
+if test "${enable_libde265+set}" = set; then :
+  enableval=$enable_libde265;  case "${enableval}" in
+      yes) USE_LIBDE265=yes;;
+      no) USE_LIBDE265=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-libde265" "$LINENO" 5 ;;
+    esac
+else
+   USE_LIBDE265=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_LIBDE265="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libde265 pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** libde265 pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " LIBDE265 " > /dev/null; then
+  USE_LIBDE265="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libde265 not ported" >&5
+$as_echo "$as_me: WARNING: *** libde265 not ported" >&2;}
+fi
+
+
+if test x$USE_LIBDE265 = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_LIBDE265=no
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDE265" >&5
+$as_echo_n "checking for LIBDE265... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LIBDE265_CFLAGS"; then
+        pkg_cv_LIBDE265_CFLAGS="$LIBDE265_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libde265 >= 0.9\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libde265 >= 0.9") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBDE265_CFLAGS=`$PKG_CONFIG --cflags "libde265 >= 0.9" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LIBDE265_LIBS"; then
+        pkg_cv_LIBDE265_LIBS="$LIBDE265_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libde265 >= 0.9\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libde265 >= 0.9") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBDE265_LIBS=`$PKG_CONFIG --libs "libde265 >= 0.9" 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
+	        LIBDE265_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libde265 >= 0.9"`
+        else
+	        LIBDE265_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libde265 >= 0.9"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBDE265_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                HAVE_LIBDE265="no"
+elif test $pkg_failed = untried; then
+	HAVE_LIBDE265="no"
+else
+	LIBDE265_CFLAGS=$pkg_cv_LIBDE265_CFLAGS
+	LIBDE265_LIBS=$pkg_cv_LIBDE265_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_LIBDE265="yes"
+fi
+
+
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_LIBDE265 = xno; then
+    USE_LIBDE265=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: libde265" >&5
+$as_echo "$as_me: *** These plugins will be built: libde265" >&6;}
+  fi
+fi
+if test x$USE_LIBDE265 = xyes; then
+  :
+  if test "xlibde265" != "x"; then
+    GST_PLUGINS_YES="\tlibde265\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_LIBDE265 /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: libde265" >&5
+$as_echo "$as_me: *** These plugins will not be built: libde265" >&6;}
+  if test "xlibde265" != "x"; then
+    GST_PLUGINS_NO="\tlibde265\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_LIBDE265 = xyes; then
+  USE_LIBDE265_TRUE=
+  USE_LIBDE265_FALSE='#'
+else
+  USE_LIBDE265_TRUE='#'
+  USE_LIBDE265_FALSE=
+fi
+
+
+
+echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: mms protocol library ***" >&5
 $as_echo "$as_me: *** checking feature: mms protocol library ***" >&6;}
 if test "xlibmms" != "x"
@@ -41966,7 +41780,67 @@
 
   HAVE_SRTP=no
 
-  HAVE_SRTP="yes"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SRTP" >&5
+$as_echo_n "checking for SRTP... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$SRTP_CFLAGS"; then
+        pkg_cv_SRTP_CFLAGS="$SRTP_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsrtp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsrtp") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SRTP_CFLAGS=`$PKG_CONFIG --cflags "libsrtp" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$SRTP_LIBS"; then
+        pkg_cv_SRTP_LIBS="$SRTP_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsrtp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsrtp") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SRTP_LIBS=`$PKG_CONFIG --libs "libsrtp" 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
+	        SRTP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libsrtp"`
+        else
+	        SRTP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsrtp"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SRTP_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_init in -lsrtp" >&5
 $as_echo_n "checking for srtp_init in -lsrtp... " >&6; }
@@ -42022,15 +41896,89 @@
     if test "x$HAVE_SRTP" = "xyes"; then
             SRTP_LIBS="-lsrtp"
     else
-      HAVE_SRTP="no"
+      :
     fi
   else
-    HAVE_SRTP="no"
+    :
   fi
 
 
 
 
+elif test $pkg_failed = untried; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_init in -lsrtp" >&5
+$as_echo_n "checking for srtp_init in -lsrtp... " >&6; }
+if ${ac_cv_lib_srtp_srtp_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsrtp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char srtp_init ();
+int
+main ()
+{
+return srtp_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_srtp_srtp_init=yes
+else
+  ac_cv_lib_srtp_srtp_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_srtp_srtp_init" >&5
+$as_echo "$ac_cv_lib_srtp_srtp_init" >&6; }
+if test "x$ac_cv_lib_srtp_srtp_init" = xyes; then :
+  HAVE_SRTP=yes
+else
+  HAVE_SRTP=no
+fi
+
+  if test "x$HAVE_SRTP" = "xyes"; then
+    ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
+if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
+  :
+else
+  HAVE_SRTP=no
+fi
+
+
+    if test "x$HAVE_SRTP" = "xyes"; then
+            SRTP_LIBS="-lsrtp"
+    else
+      :
+    fi
+  else
+    :
+  fi
+
+
+
+
+else
+	SRTP_CFLAGS=$pkg_cv_SRTP_CFLAGS
+	SRTP_LIBS=$pkg_cv_SRTP_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_SRTP="yes"
+fi
+
+
 
 
   LIBS=$gst_check_save_LIBS
@@ -42073,6 +42021,173 @@
 
 
 echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: DTLS plugin ***" >&5
+$as_echo "$as_me: *** checking feature: DTLS plugin ***" >&6;}
+if test "xdtls" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: dtls ***" >&5
+$as_echo "$as_me: *** for plug-ins: dtls ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_DTLS" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-dtls was given.
+if test "${enable_dtls+set}" = set; then :
+  enableval=$enable_dtls;  case "${enableval}" in
+      yes) USE_DTLS=yes;;
+      no) USE_DTLS=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-dtls" "$LINENO" 5 ;;
+    esac
+else
+   USE_DTLS=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_DTLS="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** dtls pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** dtls pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " DTLS " > /dev/null; then
+  USE_DTLS="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** dtls not ported" >&5
+$as_echo "$as_me: WARNING: *** dtls not ported" >&2;}
+fi
+
+
+if test x$USE_DTLS = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_DTLS=no
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTLS" >&5
+$as_echo_n "checking for DTLS... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$DTLS_CFLAGS"; then
+        pkg_cv_DTLS_CFLAGS="$DTLS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" openssl >= 0.9.5  libcrypto \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " openssl >= 0.9.5  libcrypto ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DTLS_CFLAGS=`$PKG_CONFIG --cflags " openssl >= 0.9.5  libcrypto " 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$DTLS_LIBS"; then
+        pkg_cv_DTLS_LIBS="$DTLS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" openssl >= 0.9.5  libcrypto \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " openssl >= 0.9.5  libcrypto ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DTLS_LIBS=`$PKG_CONFIG --libs " openssl >= 0.9.5  libcrypto " 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
+	        DTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " openssl >= 0.9.5  libcrypto "`
+        else
+	        DTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " openssl >= 0.9.5  libcrypto "`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DTLS_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    HAVE_DTLS="no"
+
+elif test $pkg_failed = untried; then
+
+    HAVE_DTLS="no"
+
+else
+	DTLS_CFLAGS=$pkg_cv_DTLS_CFLAGS
+	DTLS_LIBS=$pkg_cv_DTLS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+    HAVE_DTLS="yes"
+
+
+
+fi
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_DTLS = xno; then
+    USE_DTLS=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: dtls" >&5
+$as_echo "$as_me: *** These plugins will be built: dtls" >&6;}
+  fi
+fi
+if test x$USE_DTLS = xyes; then
+  :
+  if test "xdtls" != "x"; then
+    GST_PLUGINS_YES="\tdtls\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_DTLS /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: dtls" >&5
+$as_echo "$as_me: *** These plugins will not be built: dtls" >&6;}
+  if test "xdtls" != "x"; then
+    GST_PLUGINS_NO="\tdtls\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_DTLS = xyes; then
+  USE_DTLS_TRUE=
+  USE_DTLS_FALSE='#'
+else
+  USE_DTLS_TRUE='#'
+  USE_DTLS_FALSE=
+fi
+
+
+
+echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: Linear Systems SDI plugin ***" >&5
 $as_echo "$as_me: *** checking feature: Linear Systems SDI plugin ***" >&6;}
 if test "xlinsys" != "x"
@@ -42608,7 +42723,7 @@
                 OLD_CFLAGS="$CFLAGS"
         OLD_LIBS="$LIBS"
         CFLAGS="$MJPEG_CFLAGS"
-        LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM -lpthread"
+        LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM $PTHREAD_LIBS"
         ac_fn_c_check_func "$LINENO" "mjpeg_loglev_t" "ac_cv_func_mjpeg_loglev_t"
 if test "x$ac_cv_func_mjpeg_loglev_t" = xyes; then :
 
@@ -42774,7 +42889,7 @@
       ac_fn_cxx_check_header_mongrel "$LINENO" "mpeg2encoder.hh" "ac_cv_header_mpeg2encoder_hh" "$ac_includes_default"
 if test "x$ac_cv_header_mpeg2encoder_hh" = xyes; then :
 
-        MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM -lpthread"
+        MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM $PTHREAD_LIBS"
         OLD_LIBS="$LIBS"
         LIBS="$LIBS $MPEG2ENC_LIBS"
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid mpeg2enc objects" >&5
@@ -43420,171 +43535,6 @@
 
 
 echo
-{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: MythTV client plugins ***" >&5
-$as_echo "$as_me: *** checking feature: MythTV client plugins ***" >&6;}
-if test "xmythtvsrc" != "x"
-then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: mythtvsrc ***" >&5
-$as_echo "$as_me: *** for plug-ins: mythtvsrc ***" >&6;}
-fi
-NOUSE=
-if test "x$USE_MYTHTV" = "xno"; then
-  NOUSE="yes"
-fi
-# Check whether --enable-mythtv was given.
-if test "${enable_mythtv+set}" = set; then :
-  enableval=$enable_mythtv;  case "${enableval}" in
-      yes) USE_MYTHTV=yes;;
-      no) USE_MYTHTV=no;;
-      *) as_fn_error $? "bad value ${enableval} for --enable-mythtv" "$LINENO" 5 ;;
-    esac
-else
-   USE_MYTHTV=yes
-fi
-
-if test "x$NOUSE" = "xyes"; then
-  USE_MYTHTV="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** mythtvsrc pre-configured not to be built" >&5
-$as_echo "$as_me: WARNING: *** mythtvsrc pre-configured not to be built" >&2;}
-fi
-NOUSE=
-
-if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " MYTHTV " > /dev/null; then
-  USE_MYTHTV="no"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** mythtvsrc not ported" >&5
-$as_echo "$as_me: WARNING: *** mythtvsrc not ported" >&2;}
-fi
-
-
-if test x$USE_MYTHTV = xyes; then
-
-  gst_check_save_LIBS=$LIBS
-  gst_check_save_LDFLAGS=$LDFLAGS
-  gst_check_save_CFLAGS=$CFLAGS
-  gst_check_save_CPPFLAGS=$CPPFLAGS
-  gst_check_save_CXXFLAGS=$CXXFLAGS
-
-  HAVE_MYTHTV=no
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMYTH" >&5
-$as_echo_n "checking for GMYTH... " >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GMYTH_CFLAGS"; then
-        pkg_cv_GMYTH_CFLAGS="$GMYTH_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmyth >= 0.4 gmyth <= 0.7.99\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gmyth >= 0.4 gmyth <= 0.7.99") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GMYTH_CFLAGS=`$PKG_CONFIG --cflags "gmyth >= 0.4 gmyth <= 0.7.99" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$GMYTH_LIBS"; then
-        pkg_cv_GMYTH_LIBS="$GMYTH_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmyth >= 0.4 gmyth <= 0.7.99\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gmyth >= 0.4 gmyth <= 0.7.99") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GMYTH_LIBS=`$PKG_CONFIG --libs "gmyth >= 0.4 gmyth <= 0.7.99" 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
-	        GMYTH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gmyth >= 0.4 gmyth <= 0.7.99"`
-        else
-	        GMYTH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gmyth >= 0.4 gmyth <= 0.7.99"`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GMYTH_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-    HAVE_MYTHTV="no"
-
-elif test $pkg_failed = untried; then
-
-    HAVE_MYTHTV="no"
-
-else
-	GMYTH_CFLAGS=$pkg_cv_GMYTH_CFLAGS
-	GMYTH_LIBS=$pkg_cv_GMYTH_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_MYTHTV="yes"
-fi
-
-
-
-
-  LIBS=$gst_check_save_LIBS
-  LDFLAGS=$gst_check_save_LDFLAGS
-  CFLAGS=$gst_check_save_CFLAGS
-  CPPFLAGS=$gst_check_save_CPPFLAGS
-  CXXFLAGS=$gst_check_save_CXXFLAGS
-
-    if test x$HAVE_MYTHTV = xno; then
-    USE_MYTHTV=no
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: mythtvsrc" >&5
-$as_echo "$as_me: *** These plugins will be built: mythtvsrc" >&6;}
-  fi
-fi
-if test x$USE_MYTHTV = xyes; then
-  :
-  if test "xmythtvsrc" != "x"; then
-    GST_PLUGINS_YES="\tmythtvsrc\n$GST_PLUGINS_YES"
-  fi
-
-$as_echo "#define HAVE_MYTHTV /**/" >>confdefs.h
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: mythtvsrc" >&5
-$as_echo "$as_me: *** These plugins will not be built: mythtvsrc" >&6;}
-  if test "xmythtvsrc" != "x"; then
-    GST_PLUGINS_NO="\tmythtvsrc\n$GST_PLUGINS_NO"
-  fi
-  :
-fi
- if test x$USE_MYTHTV = xyes; then
-  USE_MYTHTV_TRUE=
-  USE_MYTHTV_FALSE='#'
-else
-  USE_MYTHTV_TRUE='#'
-  USE_MYTHTV_FALSE=
-fi
-
-
-
-echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: nas plug-in ***" >&5
 $as_echo "$as_me: *** checking feature: nas plug-in ***" >&6;}
 if test "xnassink" != "x"
@@ -43632,526 +43582,6 @@
   HAVE_NAS=no
 
   HAVE_NAS="no"
-
-  if test "$no_x" = yes; then
-  # Not all programs may use this symbol, but it does not hurt to define it.
-
-$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
-
-  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-else
-  if test -n "$x_includes"; then
-    X_CFLAGS="$X_CFLAGS -I$x_includes"
-  fi
-
-  # It would also be nice to do this for all -L options, not just this one.
-  if test -n "$x_libraries"; then
-    X_LIBS="$X_LIBS -L$x_libraries"
-    # For Solaris; some versions of Sun CC require a space after -R and
-    # others require no space.  Words are not sufficient . . . .
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
-$as_echo_n "checking whether -R must be followed by a space... " >&6; }
-    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
-    ac_xsave_c_werror_flag=$ac_c_werror_flag
-    ac_c_werror_flag=yes
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       X_LIBS="$X_LIBS -R$x_libraries"
-else
-  LIBS="$ac_xsave_LIBS -R $x_libraries"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	  X_LIBS="$X_LIBS -R $x_libraries"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
-$as_echo "neither works" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    ac_c_werror_flag=$ac_xsave_c_werror_flag
-    LIBS=$ac_xsave_LIBS
-  fi
-
-  # Check for system-dependent libraries X programs must link with.
-  # Do this before checking for the system-independent R6 libraries
-  # (-lICE), since we may need -lsocket or whatever for X linking.
-
-  if test "$ISC" = yes; then
-    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
-  else
-    # Martyn Johnson says this is needed for Ultrix, if the X
-    # libraries were built with DECnet support.  And Karl Berry says
-    # the Alpha needs dnet_stub (dnet does not exist).
-    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XOpenDisplay ();
-int
-main ()
-{
-return XOpenDisplay ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
-    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
-    fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_xsave_LIBS"
-
-    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
-    # to get the SysV transport functions.
-    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
-    # needs -lnsl.
-    # The nsl library prevents programs from opening the X display
-    # on Irix 5.2, according to T.E. Dickey.
-    # The functions gethostbyname, getservbyname, and inet_addr are
-    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
-    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_gethostbyname = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
-      if test $ac_cv_lib_nsl_gethostbyname = no; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
-$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bsd_gethostbyname=yes
-else
-  ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
-$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
-fi
-
-      fi
-    fi
-
-    # lieder@skyler.mavd.honeywell.com says without -lsocket,
-    # socket/setsockopt and other routines are undefined under SCO ODT
-    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
-    # on later versions), says Simon Leinen: it contains gethostby*
-    # variants that don't use the name server (or something).  -lsocket
-    # must be given before -lnsl if both are needed.  We assume that
-    # if connect needs -lnsl, so does gethostbyname.
-    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_connect = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_connect+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_connect=yes
-else
-  ac_cv_lib_socket_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = xyes; then :
-  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
-    fi
-
-    # Guillermo Gomez says -lposix is necessary on A/UX.
-    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_remove = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
-$as_echo_n "checking for remove in -lposix... " >&6; }
-if ${ac_cv_lib_posix_remove+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char remove ();
-int
-main ()
-{
-return remove ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_posix_remove=yes
-else
-  ac_cv_lib_posix_remove=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
-$as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
-    fi
-
-    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = xyes; then :
-
-fi
-
-    if test $ac_cv_func_shmat = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
-$as_echo_n "checking for shmat in -lipc... " >&6; }
-if ${ac_cv_lib_ipc_shmat+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shmat ();
-int
-main ()
-{
-return shmat ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ipc_shmat=yes
-else
-  ac_cv_lib_ipc_shmat=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
-$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
-    fi
-  fi
-
-  # Check for libraries that X11R6 Xt/Xaw programs need.
-  ac_save_LDFLAGS=$LDFLAGS
-  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
-  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-  # check for ICE first), but we must link in the order -lSM -lICE or
-  # we get undefined symbols.  So assume we have SM if we have ICE.
-  # These have to be linked with before -lX11, unlike the other
-  # libraries we check for below, so use a different variable.
-  # John Interrante, Karl Berry
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
-$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char IceConnectionNumber ();
-int
-main ()
-{
-return IceConnectionNumber ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ICE_IceConnectionNumber=yes
-else
-  ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
-  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-fi
-
-  LDFLAGS=$ac_save_LDFLAGS
-
-fi
-
-  ac_cflags_save="$CFLAGS"
-  ac_cppflags_save="$CPPFLAGS"
-  CFLAGS="$CFLAGS $X_CFLAGS"
-  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
-    ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
-  HAVE_X="yes"
-else
-  HAVE_X="no"
-fi
-
-
-
-  if test "x$HAVE_X" = "xno"
-  then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find X11 development files" >&5
-$as_echo "$as_me: cannot find X11 development files" >&6;}
-  else
-        X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
-            X_LIBS="$X_LIBS -lX11"
-
-
-  fi
-
-
-  CFLAGS="$ac_cflags_save"
-  CPPFLAGS="$ac_cppflags_save"
-
   if test "x$HAVE_X" = "xyes"; then
     save_cppflags=$CFLAGS
     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -44815,12 +44245,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.5.0 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv < 2.5.0 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.3.0 opencv < 2.5.0 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "opencv >= 2.3.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.5.0 " 2>/dev/null`
+  pkg_cv_OPENCV_CFLAGS=`$PKG_CONFIG --cflags "opencv >= 2.3.0 opencv < 2.5.0 " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -44833,12 +44263,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.5.0 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv < 2.5.0 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.3.0 opencv < 2.5.0 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "opencv >= 2.3.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.5.0 " 2>/dev/null`
+  pkg_cv_OPENCV_LIBS=`$PKG_CONFIG --libs "opencv >= 2.3.0 opencv < 2.5.0 " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -44857,9 +44287,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.5.0 "`
+	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "opencv >= 2.3.0 opencv < 2.5.0 "`
         else
-	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "opencv >= 2.0.0 opencv < 2.5.0 "`
+	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "opencv >= 2.3.0 opencv < 2.5.0 "`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$OPENCV_PKG_ERRORS" >&5
@@ -45272,7 +44702,18 @@
 
     OLD_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=$OPENCV_CFLAGS
-    for ac_header in highgui.h opencv2/highgui/highgui_c.h
+    something_not_found=no
+    for ac_header in opencv2/contrib/contrib.hpp \
+                      opencv2/core/core_c.h \
+                      opencv2/core/types_c.h \
+                      opencv2/core/version.hpp \
+                      opencv2/highgui/highgui_c.h \
+                      opencv2/imgproc/imgproc.hpp \
+                      opencv2/imgproc/imgproc_c.h \
+                      opencv2/legacy/compat.hpp \
+                      opencv2/legacy/legacy.hpp \
+                      opencv2/objdetect/objdetect.hpp \
+                      opencv2/video/background_segm.hpp
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -45281,6 +44722,8 @@
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
+else
+  something_not_found=yes
 fi
 
 done
@@ -45293,12 +44736,12 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-    if test $ac_cv_header_highgui_h = "yes" -o $ac_cv_header_opencv2_highgui_highgui_c_h = "yes" ; then
-      HAVE_OPENCV="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither highgui.h nor opencv2/highgui/highgui_c.h could not be found" >&5
-$as_echo "neither highgui.h nor opencv2/highgui/highgui_c.h could not be found" >&6; }
+    if test $something_not_found = "yes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not all opencv2 headers were found" >&5
+$as_echo "not all opencv2 headers were found" >&6; }
       HAVE_OPENCV="no"
+    else
+      HAVE_OPENCV="yes"
     fi
 
 fi
@@ -45311,6 +44754,19 @@
 
 
 
+          if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then
+
+cat >>confdefs.h <<_ACEOF
+#define OPENCV_PATH_NAME "opencv"
+_ACEOF
+
+  else
+
+cat >>confdefs.h <<_ACEOF
+#define OPENCV_PATH_NAME "OpenCV"
+_ACEOF
+
+  fi
 
 
   LIBS=$gst_check_save_LIBS
@@ -45536,6 +44992,189 @@
 
 
 echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: openh264 library ***" >&5
+$as_echo "$as_me: *** checking feature: openh264 library ***" >&6;}
+if test "xopenh264" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: openh264 ***" >&5
+$as_echo "$as_me: *** for plug-ins: openh264 ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_OPENH264" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-openh264 was given.
+if test "${enable_openh264+set}" = set; then :
+  enableval=$enable_openh264;  case "${enableval}" in
+      yes) USE_OPENH264=yes;;
+      no) USE_OPENH264=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-openh264" "$LINENO" 5 ;;
+    esac
+else
+   USE_OPENH264=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_OPENH264="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** openh264 pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** openh264 pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " OPENH264 " > /dev/null; then
+  USE_OPENH264="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** openh264 not ported" >&5
+$as_echo "$as_me: WARNING: *** openh264 not ported" >&2;}
+fi
+
+
+if test x$USE_OPENH264 = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_OPENH264=no
+
+
+  which="openh264 >= 1.3.0"
+    required="no"
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENH264" >&5
+$as_echo_n "checking for OPENH264... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENH264_CFLAGS"; then
+        pkg_cv_OPENH264_CFLAGS="$OPENH264_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENH264_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENH264_LIBS"; then
+        pkg_cv_OPENH264_LIBS="$OPENH264_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENH264_LIBS=`$PKG_CONFIG --libs "$which" 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
+	        OPENH264_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"`
+        else
+	        OPENH264_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENH264_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+      HAVE_OPENH264="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$OPENH264_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $OPENH264_PKG_ERRORS" >&5
+$as_echo "$as_me: $OPENH264_PKG_ERRORS" >&6;}
+      fi
+
+elif test $pkg_failed = untried; then
+
+      HAVE_OPENH264="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$OPENH264_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $OPENH264_PKG_ERRORS" >&5
+$as_echo "$as_me: $OPENH264_PKG_ERRORS" >&6;}
+      fi
+
+else
+	OPENH264_CFLAGS=$pkg_cv_OPENH264_CFLAGS
+	OPENH264_LIBS=$pkg_cv_OPENH264_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+      HAVE_OPENH264="yes"
+
+fi
+
+
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_OPENH264 = xno; then
+    USE_OPENH264=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: openh264" >&5
+$as_echo "$as_me: *** These plugins will be built: openh264" >&6;}
+  fi
+fi
+if test x$USE_OPENH264 = xyes; then
+  :
+  if test "xopenh264" != "x"; then
+    GST_PLUGINS_YES="\topenh264\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_OPENH264 /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: openh264" >&5
+$as_echo "$as_me: *** These plugins will not be built: openh264" >&6;}
+  if test "xopenh264" != "x"; then
+    GST_PLUGINS_NO="\topenh264\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_OPENH264 = xyes; then
+  USE_OPENH264_TRUE=
+  USE_OPENH264_FALSE='#'
+else
+  USE_OPENH264_TRUE='#'
+  USE_OPENH264_FALSE=
+fi
+
+
+
+echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: openjpeg library ***" >&5
 $as_echo "$as_me: *** checking feature: openjpeg library ***" >&6;}
 if test "xopenjpeg" != "x"
@@ -46699,6 +46338,907 @@
 
 
 
+HAVE_GTK3_GL="no"
+echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: Gtk+ elements ***" >&5
+$as_echo "$as_me: *** checking feature: Gtk+ elements ***" >&6;}
+if test "xgtk" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: gtk ***" >&5
+$as_echo "$as_me: *** for plug-ins: gtk ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_GTK3" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-gtk3 was given.
+if test "${enable_gtk3+set}" = set; then :
+  enableval=$enable_gtk3;  case "${enableval}" in
+      yes) USE_GTK3=yes;;
+      no) USE_GTK3=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-gtk3" "$LINENO" 5 ;;
+    esac
+else
+   USE_GTK3=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_GTK3="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gtk pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** gtk pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " GTK3 " > /dev/null; then
+  USE_GTK3="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** gtk not ported" >&5
+$as_echo "$as_me: WARNING: *** gtk not ported" >&2;}
+fi
+
+
+if test x$USE_GTK3 = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_GTK3=no
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3" >&5
+$as_echo_n "checking for GTK3... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_CFLAGS"; then
+        pkg_cv_GTK3_CFLAGS="$GTK3_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_LIBS"; then
+        pkg_cv_GTK3_LIBS="$GTK3_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_LIBS=`$PKG_CONFIG --libs "gtk+-3.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
+	        GTK3_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-3.0"`
+        else
+	        GTK3_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-3.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK3_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    HAVE_GTK3="no"
+
+elif test $pkg_failed = untried; then
+
+    HAVE_GTK3="no"
+
+else
+	GTK3_CFLAGS=$pkg_cv_GTK3_CFLAGS
+	GTK3_LIBS=$pkg_cv_GTK3_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+$as_echo "#define HAVE_GTK3 1" >>confdefs.h
+
+    HAVE_GTK3="yes"
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3_GL" >&5
+$as_echo_n "checking for GTK3_GL... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_GL_CFLAGS"; then
+        pkg_cv_GTK3_GL_CFLAGS="$GTK3_GL_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.15.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.15.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_GL_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 3.15.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_GL_LIBS"; then
+        pkg_cv_GTK3_GL_LIBS="$GTK3_GL_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.15.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.15.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_GL_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 3.15.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
+	        GTK3_GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-3.0 >= 3.15.0"`
+        else
+	        GTK3_GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-3.0 >= 3.15.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK3_GL_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+      HAVE_GTK3_GL="no"
+
+elif test $pkg_failed = untried; then
+
+      HAVE_GTK3_GL="no"
+
+else
+	GTK3_GL_CFLAGS=$pkg_cv_GTK3_GL_CFLAGS
+	GTK3_GL_LIBS=$pkg_cv_GTK3_GL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+    GDK_WINDOWING="no"
+    if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3_X11" >&5
+$as_echo_n "checking for GTK3_X11... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_X11_CFLAGS"; then
+        pkg_cv_GTK3_X11_CFLAGS="$GTK3_X11_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-x11-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-x11-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_X11_CFLAGS=`$PKG_CONFIG --cflags "gtk+-x11-3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_X11_LIBS"; then
+        pkg_cv_GTK3_X11_LIBS="$GTK3_X11_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-x11-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-x11-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_X11_LIBS=`$PKG_CONFIG --libs "gtk+-x11-3.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
+	        GTK3_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-x11-3.0"`
+        else
+	        GTK3_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-x11-3.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK3_X11_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Gtk X11 integration" >&5
+$as_echo "$as_me: Could not find Gtk X11 integration" >&6;}
+elif test $pkg_failed = untried; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Gtk X11 integration" >&5
+$as_echo "$as_me: Could not find Gtk X11 integration" >&6;}
+else
+	GTK3_X11_CFLAGS=$pkg_cv_GTK3_X11_CFLAGS
+	GTK3_X11_LIBS=$pkg_cv_GTK3_X11_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+        GTK3_CFLAGS="$GTK3_CFLAGS $GTK3_X11_CFLAGS"
+        GTK3_LIBS="$GTK3_LIBS $GTK3_X11_LIBS"
+        GDK_WINDOWING="yes"
+
+fi
+    fi
+    if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3_WAYLAND" >&5
+$as_echo_n "checking for GTK3_WAYLAND... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_WAYLAND_CFLAGS"; then
+        pkg_cv_GTK3_WAYLAND_CFLAGS="$GTK3_WAYLAND_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-wayland-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-wayland-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "gtk+-wayland-3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK3_WAYLAND_LIBS"; then
+        pkg_cv_GTK3_WAYLAND_LIBS="$GTK3_WAYLAND_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-wayland-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-wayland-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK3_WAYLAND_LIBS=`$PKG_CONFIG --libs "gtk+-wayland-3.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
+	        GTK3_WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-wayland-3.0"`
+        else
+	        GTK3_WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-wayland-3.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK3_WAYLAND_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Gtk Wayland integration" >&5
+$as_echo "$as_me: Could not find Gtk Wayland integration" >&6;}
+elif test $pkg_failed = untried; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Gtk Wayland integration" >&5
+$as_echo "$as_me: Could not find Gtk Wayland integration" >&6;}
+else
+	GTK3_WAYLAND_CFLAGS=$pkg_cv_GTK3_WAYLAND_CFLAGS
+	GTK3_WAYLAND_LIBS=$pkg_cv_GTK3_WAYLAND_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+        GTK3_CFLAGS="$GTK3_CFLAGS $GTK3_WAYLAND_CFLAGS"
+        GTK3_LIBS="$GTK3_LIBS $GTK3_WAYLAND_LIBS"
+        GDK_WINDOWING="yes"
+
+fi
+    fi
+    if test "x$GDK_WINDOWING" = "xyes"; then
+
+$as_echo "#define HAVE_GTK3_GL 1" >>confdefs.h
+
+      HAVE_GTK3_GL="yes"
+    fi
+
+fi
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_GTK3 = xno; then
+    USE_GTK3=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: gtk" >&5
+$as_echo "$as_me: *** These plugins will be built: gtk" >&6;}
+  fi
+fi
+if test x$USE_GTK3 = xyes; then
+  :
+  if test "xgtk" != "x"; then
+    GST_PLUGINS_YES="\tgtk\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_GTK3 /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: gtk" >&5
+$as_echo "$as_me: *** These plugins will not be built: gtk" >&6;}
+  if test "xgtk" != "x"; then
+    GST_PLUGINS_NO="\tgtk\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_GTK3 = xyes; then
+  USE_GTK3_TRUE=
+  USE_GTK3_FALSE='#'
+else
+  USE_GTK3_TRUE='#'
+  USE_GTK3_FALSE=
+fi
+
+
+ if test "x$HAVE_GTK3_GL" = "xyes"; then
+  USE_GTK3_GL_TRUE=
+  USE_GTK3_GL_FALSE='#'
+else
+  USE_GTK3_GL_TRUE='#'
+  USE_GTK3_GL_FALSE=
+fi
+
+
+echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: Qt elements ***" >&5
+$as_echo "$as_me: *** checking feature: Qt elements ***" >&6;}
+if test "xqt" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: qt ***" >&5
+$as_echo "$as_me: *** for plug-ins: qt ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_QT" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-qt was given.
+if test "${enable_qt+set}" = set; then :
+  enableval=$enable_qt;  case "${enableval}" in
+      yes) USE_QT=yes;;
+      no) USE_QT=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-qt" "$LINENO" 5 ;;
+    esac
+else
+   USE_QT=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_QT="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** qt pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** qt pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " QT " > /dev/null; then
+  USE_QT="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** qt not ported" >&5
+$as_echo "$as_me: WARNING: *** qt not ported" >&2;}
+fi
+
+
+if test x$USE_QT = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_QT=no
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT" >&5
+$as_echo_n "checking for QT... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_CFLAGS"; then
+        pkg_cv_QT_CFLAGS="$QT_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core Qt5Gui Qt5Quick >= 5.4.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5Core Qt5Gui Qt5Quick >= 5.4.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core Qt5Gui Qt5Quick >= 5.4.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_LIBS"; then
+        pkg_cv_QT_LIBS="$QT_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core Qt5Gui Qt5Quick >= 5.4.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5Core Qt5Gui Qt5Quick >= 5.4.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "Qt5Core Qt5Gui Qt5Quick >= 5.4.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
+	        QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5Core Qt5Gui Qt5Quick >= 5.4.0"`
+        else
+	        QT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Core Qt5Gui Qt5Quick >= 5.4.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$QT_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+      HAVE_QT="no"
+
+elif test $pkg_failed = untried; then
+
+      HAVE_QT="no"
+
+else
+	QT_CFLAGS=$pkg_cv_QT_CFLAGS
+	QT_LIBS=$pkg_cv_QT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+      QT_PATH=`$PKG_CONFIG --variable=exec_prefix Qt5Core`
+      QT_HOST_PATH=`$PKG_CONFIG --variable=host_bins Qt5Core`
+      for ac_prog in moc-qt5 moc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; 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_MOC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MOC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "${QT_HOST_PATH}" "${QT_PATH}/bin"
+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_MOC="$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
+MOC=$ac_cv_path_MOC
+if test -n "$MOC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
+$as_echo "$MOC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MOC" && break
+done
+test -n "$MOC" || MOC="moc"
+
+      for ac_prog in rcc-qt5 rcc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; 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_RCC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $RCC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RCC="$RCC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "${QT_HOST_PATH}" "${QT_PATH}/bin"
+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_RCC="$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
+RCC=$ac_cv_path_RCC
+if test -n "$RCC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RCC" >&5
+$as_echo "$RCC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$RCC" && break
+done
+test -n "$RCC" || RCC="rcc"
+
+      for ac_prog in uic-qt5 uic
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; 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_UIC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $UIC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UIC="$UIC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "${QT_HOST_PATH}" "${QT_PATH}/bin"
+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_UIC="$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
+UIC=$ac_cv_path_UIC
+if test -n "$UIC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5
+$as_echo "$UIC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$UIC" && break
+done
+test -n "$UIC" || UIC="uic"
+
+      if test "x$MOC" = "x" || test "x$UIC" = "x" || test "x$RCC" = "x"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: One of the required qt build programs was not found" >&5
+$as_echo "$as_me: WARNING: One of the required qt build programs was not found" >&2;}
+        HAVE_QT="no"
+      else
+        HAVE_QT="yes"
+        HAVE_QT_WINDOWING="no"
+        if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT_X11" >&5
+$as_echo_n "checking for QT_X11... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_X11_CFLAGS"; then
+        pkg_cv_QT_X11_CFLAGS="$QT_X11_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5X11Extras\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5X11Extras") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_X11_CFLAGS=`$PKG_CONFIG --cflags "Qt5X11Extras" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_X11_LIBS"; then
+        pkg_cv_QT_X11_LIBS="$QT_X11_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5X11Extras\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5X11Extras") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_X11_LIBS=`$PKG_CONFIG --libs "Qt5X11Extras" 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
+	        QT_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5X11Extras"`
+        else
+	        QT_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5X11Extras"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$QT_X11_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Qt X11 integration" >&5
+$as_echo "$as_me: Could not find Qt X11 integration" >&6;}
+elif test $pkg_failed = untried; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Qt X11 integration" >&5
+$as_echo "$as_me: Could not find Qt X11 integration" >&6;}
+else
+	QT_X11_CFLAGS=$pkg_cv_QT_X11_CFLAGS
+	QT_X11_LIBS=$pkg_cv_QT_X11_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+$as_echo "#define HAVE_QT_X11 /**/" >>confdefs.h
+
+            QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"
+            QT_LIBS="$QT_LIBS $QT_X11_LIBS"
+            HAVE_QT_WINDOWING="yes"
+
+fi
+        fi
+        if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT_WAYLAND" >&5
+$as_echo_n "checking for QT_WAYLAND... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_WAYLAND_CFLAGS"; then
+        pkg_cv_QT_WAYLAND_CFLAGS="$QT_WAYLAND_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5WaylandClient\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5WaylandClient") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "Qt5WaylandClient" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$QT_WAYLAND_LIBS"; then
+        pkg_cv_QT_WAYLAND_LIBS="$QT_WAYLAND_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5WaylandClient\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "Qt5WaylandClient") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_QT_WAYLAND_LIBS=`$PKG_CONFIG --libs "Qt5WaylandClient" 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
+	        QT_WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5WaylandClient"`
+        else
+	        QT_WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5WaylandClient"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$QT_WAYLAND_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Qt Wayland integration" >&5
+$as_echo "$as_me: Could not find Qt Wayland integration" >&6;}
+elif test $pkg_failed = untried; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find Qt Wayland integration" >&5
+$as_echo "$as_me: Could not find Qt Wayland integration" >&6;}
+else
+	QT_WAYLAND_CFLAGS=$pkg_cv_QT_WAYLAND_CFLAGS
+	QT_WAYLAND_LIBS=$pkg_cv_QT_WAYLAND_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+$as_echo "#define HAVE_QT_WAYLAND /**/" >>confdefs.h
+
+            QT_CFLAGS="$QT_CFLAGS $QT_WAYLAND_CFLAGS"
+            QT_LIBS="$QT_LIBS $QT_WAYLAND_LIBS"
+            HAVE_QT_WINDOWING="yes"
+
+fi
+        fi
+        if test "x$HAVE_QT_WINDOWING" = "xno"; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find any Qt Windowing integration" >&5
+$as_echo "$as_me: WARNING: Could not find any Qt Windowing integration" >&2;}
+          HAVE_QT="no"
+        fi
+
+
+      fi
+
+fi
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_QT = xno; then
+    USE_QT=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: qt" >&5
+$as_echo "$as_me: *** These plugins will be built: qt" >&6;}
+  fi
+fi
+if test x$USE_QT = xyes; then
+  :
+  if test "xqt" != "x"; then
+    GST_PLUGINS_YES="\tqt\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_QT /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: qt" >&5
+$as_echo "$as_me: *** These plugins will not be built: qt" >&6;}
+  if test "xqt" != "x"; then
+    GST_PLUGINS_NO="\tqt\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_QT = xyes; then
+  USE_QT_TRUE=
+  USE_QT_FALSE='#'
+else
+  USE_QT_TRUE='#'
+  USE_QT_FALSE=
+fi
+
+
+
 echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: libvisual visualization library ***" >&5
 $as_echo "$as_me: *** checking feature: libvisual visualization library ***" >&6;}
@@ -50842,7 +51382,7 @@
 if test "x$ac_cv_header_xvid_h" = xyes; then :
 
     OLD_LIBS="$LIBS"
-    LIBS="-lpthread $LIBM"
+    LIBS="$PTHREAD_LIBS $LIBM"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xvid_encore in -lxvidcore" >&5
 $as_echo_n "checking for xvid_encore in -lxvidcore... " >&6; }
 if ${ac_cv_lib_xvidcore_xvid_encore+:} false; then :
@@ -53500,7 +54040,86 @@
     LIBGCRYPT_CFLAGS=""
     LIBGCRYPT_LIBS=""
 
-      HAVE_HLS="no"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+$as_echo_n "checking for OPENSSL... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENSSL_CFLAGS"; then
+        pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENSSL_LIBS"; then
+        pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 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
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"`
+        else
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENSSL_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+        HAVE_HLS="no"
+
+elif test $pkg_failed = untried; then
+
+        HAVE_HLS="no"
+
+else
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+
+        HAVE_HLS="yes"
+
+fi
 
   fi
 
@@ -53724,7 +54343,86 @@
     LIBGCRYPT_CFLAGS=""
     LIBGCRYPT_LIBS=""
 
-      HAVE_HLS="no"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+$as_echo_n "checking for OPENSSL... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENSSL_CFLAGS"; then
+        pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$OPENSSL_LIBS"; then
+        pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 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
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"`
+        else
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENSSL_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+        HAVE_HLS="no"
+
+elif test $pkg_failed = untried; then
+
+        HAVE_HLS="no"
+
+else
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+
+        HAVE_HLS="yes"
+
+fi
 
   fi
 
@@ -53784,6 +54482,189 @@
 
 
 
+echo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: x265 plug-in ***" >&5
+$as_echo "$as_me: *** checking feature: x265 plug-in ***" >&6;}
+if test "xx265" != "x"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** for plug-ins: x265 ***" >&5
+$as_echo "$as_me: *** for plug-ins: x265 ***" >&6;}
+fi
+NOUSE=
+if test "x$USE_X265" = "xno"; then
+  NOUSE="yes"
+fi
+# Check whether --enable-x265 was given.
+if test "${enable_x265+set}" = set; then :
+  enableval=$enable_x265;  case "${enableval}" in
+      yes) USE_X265=yes;;
+      no) USE_X265=no;;
+      *) as_fn_error $? "bad value ${enableval} for --enable-x265" "$LINENO" 5 ;;
+    esac
+else
+   USE_X265=yes
+fi
+
+if test "x$NOUSE" = "xyes"; then
+  USE_X265="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** x265 pre-configured not to be built" >&5
+$as_echo "$as_me: WARNING: *** x265 pre-configured not to be built" >&2;}
+fi
+NOUSE=
+
+if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " X265 " > /dev/null; then
+  USE_X265="no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** x265 not ported" >&5
+$as_echo "$as_me: WARNING: *** x265 not ported" >&2;}
+fi
+
+
+if test x$USE_X265 = xyes; then
+
+  gst_check_save_LIBS=$LIBS
+  gst_check_save_LDFLAGS=$LDFLAGS
+  gst_check_save_CFLAGS=$CFLAGS
+  gst_check_save_CPPFLAGS=$CPPFLAGS
+  gst_check_save_CXXFLAGS=$CXXFLAGS
+
+  HAVE_X265=no
+
+
+  which="x265"
+    required="no"
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X265" >&5
+$as_echo_n "checking for X265... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$X265_CFLAGS"; then
+        pkg_cv_X265_CFLAGS="$X265_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X265_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$X265_LIBS"; then
+        pkg_cv_X265_LIBS="$X265_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$which") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X265_LIBS=`$PKG_CONFIG --libs "$which" 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
+	        X265_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"`
+        else
+	        X265_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$X265_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+      HAVE_X265="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$X265_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $X265_PKG_ERRORS" >&5
+$as_echo "$as_me: $X265_PKG_ERRORS" >&6;}
+      fi
+
+elif test $pkg_failed = untried; then
+
+      HAVE_X265="no"
+      if test "x$required" = "xyes"; then
+        as_fn_error $? "$X265_PKG_ERRORS" "$LINENO" 5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: $X265_PKG_ERRORS" >&5
+$as_echo "$as_me: $X265_PKG_ERRORS" >&6;}
+      fi
+
+else
+	X265_CFLAGS=$pkg_cv_X265_CFLAGS
+	X265_LIBS=$pkg_cv_X265_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+      HAVE_X265="yes"
+
+fi
+
+
+
+
+  LIBS=$gst_check_save_LIBS
+  LDFLAGS=$gst_check_save_LDFLAGS
+  CFLAGS=$gst_check_save_CFLAGS
+  CPPFLAGS=$gst_check_save_CPPFLAGS
+  CXXFLAGS=$gst_check_save_CXXFLAGS
+
+    if test x$HAVE_X265 = xno; then
+    USE_X265=no
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will be built: x265" >&5
+$as_echo "$as_me: *** These plugins will be built: x265" >&6;}
+  fi
+fi
+if test x$USE_X265 = xyes; then
+  :
+  if test "xx265" != "x"; then
+    GST_PLUGINS_YES="\tx265\n$GST_PLUGINS_YES"
+  fi
+
+$as_echo "#define HAVE_X265 /**/" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: *** These plugins will not be built: x265" >&5
+$as_echo "$as_me: *** These plugins will not be built: x265" >&6;}
+  if test "xx265" != "x"; then
+    GST_PLUGINS_NO="\tx265\n$GST_PLUGINS_NO"
+  fi
+  :
+fi
+ if test x$USE_X265 = xyes; then
+  USE_X265_TRUE=
+  USE_X265_FALSE='#'
+else
+  USE_X265_TRUE='#'
+  USE_X265_FALSE=
+fi
+
+
+
 else
 
 
@@ -53820,6 +54701,14 @@
 fi
 
  if false; then
+  USE_BS2B_TRUE=
+  USE_BS2B_FALSE='#'
+else
+  USE_BS2B_TRUE='#'
+  USE_BS2B_FALSE=
+fi
+
+ if false; then
   USE_BZ2_TRUE=
   USE_BZ2_FALSE='#'
 else
@@ -53988,6 +54877,22 @@
 fi
 
  if false; then
+  USE_GTK3_TRUE=
+  USE_GTK3_FALSE='#'
+else
+  USE_GTK3_TRUE='#'
+  USE_GTK3_FALSE=
+fi
+
+ if false; then
+  USE_GTK3_GL_TRUE=
+  USE_GTK3_GL_FALSE='#'
+else
+  USE_GTK3_GL_TRUE='#'
+  USE_GTK3_GL_FALSE=
+fi
+
+ if false; then
   USE_HLS_TRUE=
   USE_HLS_FALSE='#'
 else
@@ -54028,6 +54933,14 @@
 fi
 
  if false; then
+  USE_LIBDE265_TRUE=
+  USE_LIBDE265_FALSE='#'
+else
+  USE_LIBDE265_TRUE='#'
+  USE_LIBDE265_FALSE=
+fi
+
+ if false; then
   USE_LIBMMS_TRUE=
   USE_LIBMMS_FALSE='#'
 else
@@ -54092,14 +55005,6 @@
 fi
 
  if false; then
-  USE_MYTHTV_TRUE=
-  USE_MYTHTV_FALSE='#'
-else
-  USE_MYTHTV_TRUE='#'
-  USE_MYTHTV_FALSE=
-fi
-
- if false; then
   USE_NAS_TRUE=
   USE_NAS_FALSE='#'
 else
@@ -54180,6 +55085,14 @@
 fi
 
  if false; then
+  USE_QT_TRUE=
+  USE_QT_FALSE='#'
+else
+  USE_QT_TRUE='#'
+  USE_QT_FALSE=
+fi
+
+ if false; then
   USE_LIBVISUAL_TRUE=
   USE_LIBVISUAL_FALSE='#'
 else
@@ -54387,6 +55300,30 @@
   USE_WEBP_FALSE=
 fi
 
+ if false; then
+  USE_OPENH264_TRUE=
+  USE_OPENH264_FALSE='#'
+else
+  USE_OPENH264_TRUE='#'
+  USE_OPENH264_FALSE=
+fi
+
+ if false; then
+  USE_X265_TRUE=
+  USE_X265_FALSE='#'
+else
+  USE_X265_TRUE='#'
+  USE_X265_FALSE=
+fi
+
+ if false; then
+  USE_DTLS_TRUE=
+  USE_DTLS_FALSE='#'
+else
+  USE_DTLS_TRUE='#'
+  USE_DTLS_FALSE=
+fi
+
 
 fi
 
@@ -54438,7 +55375,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/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"
+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/onvif/Makefile gst/patchdetect/Makefile gst/pcapparse/Makefile gst/pnm/Makefile gst/rawparse/Makefile gst/removesilence/Makefile gst/rtp/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/adaptivedemux/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/directsound/Makefile sys/dshowsrcwrapper/Makefile sys/dshowvideosink/Makefile sys/dvb/Makefile sys/fbdev/Makefile sys/linsys/Makefile sys/opensles/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/avsamplesink/Makefile tests/examples/camerabin2/Makefile tests/examples/codecparsers/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/3dvideo/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/gtk/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/bs2b/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/gtk/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/libde265/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/nas/Makefile ext/neon/Makefile ext/ofa/Makefile ext/openal/Makefile ext/opencv/Makefile ext/openexr/Makefile ext/openh264/Makefile ext/openjpeg/Makefile ext/openni2/Makefile ext/opus/Makefile ext/qt/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/x265/Makefile ext/xvid/Makefile ext/zbar/Makefile ext/dtls/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 \
@@ -54656,6 +55593,10 @@
   as_fn_error $? "conditional \"HAVE_CPU_ALPHA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_CPU_ARC_TRUE}" && test -z "${HAVE_CPU_ARC_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_CPU_ARC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_CPU_ARM_TRUE}" && test -z "${HAVE_CPU_ARM_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_CPU_ARM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -54981,6 +55922,10 @@
   as_fn_error $? "conditional \"USE_PLUGIN_NUVDEMUX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_PLUGIN_ONVIF_TRUE}" && test -z "${USE_PLUGIN_ONVIF_FALSE}"; then
+  as_fn_error $? "conditional \"USE_PLUGIN_ONVIF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_PLUGIN_PATCHDETECT_TRUE}" && test -z "${USE_PLUGIN_PATCHDETECT_FALSE}"; then
   as_fn_error $? "conditional \"USE_PLUGIN_PATCHDETECT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -54997,14 +55942,14 @@
   as_fn_error $? "conditional \"USE_PLUGIN_RAWPARSE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_PLUGIN_REAL_TRUE}" && test -z "${USE_PLUGIN_REAL_FALSE}"; then
-  as_fn_error $? "conditional \"USE_PLUGIN_REAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_PLUGIN_REMOVESILENCE_TRUE}" && test -z "${USE_PLUGIN_REMOVESILENCE_FALSE}"; then
   as_fn_error $? "conditional \"USE_PLUGIN_REMOVESILENCE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_PLUGIN_RTP_TRUE}" && test -z "${USE_PLUGIN_RTP_FALSE}"; then
+  as_fn_error $? "conditional \"USE_PLUGIN_RTP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_PLUGIN_SDI_TRUE}" && test -z "${USE_PLUGIN_SDI_FALSE}"; then
   as_fn_error $? "conditional \"USE_PLUGIN_SDI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55069,10 +56014,6 @@
   as_fn_error $? "conditional \"USE_PLUGIN_YADIF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_PLUGIN_REAL_TRUE}" && test -z "${USE_PLUGIN_REAL_FALSE}"; then
-  as_fn_error $? "conditional \"USE_PLUGIN_REAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${HAVE_AVFOUNDATION_TRUE}" && test -z "${HAVE_AVFOUNDATION_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_AVFOUNDATION\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55177,10 +56118,6 @@
   as_fn_error $? "conditional \"USE_DIRECT3D\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_DIRECTDRAW_TRUE}" && test -z "${USE_DIRECTDRAW_FALSE}"; then
-  as_fn_error $? "conditional \"USE_DIRECTDRAW\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_WINSCREENCAP_TRUE}" && test -z "${USE_WINSCREENCAP_FALSE}"; then
   as_fn_error $? "conditional \"USE_WINSCREENCAP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55201,18 +56138,10 @@
   as_fn_error $? "conditional \"USE_BLUEZ\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_OSX_VIDEO_TRUE}" && test -z "${USE_OSX_VIDEO_FALSE}"; then
-  as_fn_error $? "conditional \"USE_OSX_VIDEO\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_AVC_TRUE}" && test -z "${USE_AVC_FALSE}"; then
   as_fn_error $? "conditional \"USE_AVC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_QUICKTIME_TRUE}" && test -z "${USE_QUICKTIME_FALSE}"; then
-  as_fn_error $? "conditional \"USE_QUICKTIME\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_SHM_TRUE}" && test -z "${USE_SHM_FALSE}"; then
   as_fn_error $? "conditional \"USE_SHM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55245,6 +56174,10 @@
   as_fn_error $? "conditional \"USE_APEXSINK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_BS2B_TRUE}" && test -z "${USE_BS2B_FALSE}"; then
+  as_fn_error $? "conditional \"USE_BS2B\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_BZ2_TRUE}" && test -z "${USE_BZ2_FALSE}"; then
   as_fn_error $? "conditional \"USE_BZ2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55349,6 +56282,10 @@
   as_fn_error $? "conditional \"USE_LV2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_LIBDE265_TRUE}" && test -z "${USE_LIBDE265_FALSE}"; then
+  as_fn_error $? "conditional \"USE_LIBDE265\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LIBMMS_TRUE}" && test -z "${USE_LIBMMS_FALSE}"; then
   as_fn_error $? "conditional \"USE_LIBMMS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55357,6 +56294,10 @@
   as_fn_error $? "conditional \"USE_SRTP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_DTLS_TRUE}" && test -z "${USE_DTLS_FALSE}"; then
+  as_fn_error $? "conditional \"USE_DTLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LINSYS_TRUE}" && test -z "${USE_LINSYS_FALSE}"; then
   as_fn_error $? "conditional \"USE_LINSYS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55385,10 +56326,6 @@
   as_fn_error $? "conditional \"USE_MUSEPACK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_MYTHTV_TRUE}" && test -z "${USE_MYTHTV_FALSE}"; then
-  as_fn_error $? "conditional \"USE_MYTHTV\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_NAS_TRUE}" && test -z "${USE_NAS_FALSE}"; then
   as_fn_error $? "conditional \"USE_NAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55417,6 +56354,10 @@
   as_fn_error $? "conditional \"USE_OPENEXR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_OPENH264_TRUE}" && test -z "${USE_OPENH264_FALSE}"; then
+  as_fn_error $? "conditional \"USE_OPENH264\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_OPENJPEG_TRUE}" && test -z "${USE_OPENJPEG_FALSE}"; then
   as_fn_error $? "conditional \"USE_OPENJPEG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55441,6 +56382,18 @@
   as_fn_error $? "conditional \"USE_GL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_GTK3_TRUE}" && test -z "${USE_GTK3_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GTK3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_GTK3_GL_TRUE}" && test -z "${USE_GTK3_GL_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GTK3_GL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_QT_TRUE}" && test -z "${USE_QT_FALSE}"; then
+  as_fn_error $? "conditional \"USE_QT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LIBVISUAL_TRUE}" && test -z "${USE_LIBVISUAL_FALSE}"; then
   as_fn_error $? "conditional \"USE_LIBVISUAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55533,6 +56486,10 @@
   as_fn_error $? "conditional \"USE_HLS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_X265_TRUE}" && test -z "${USE_X265_FALSE}"; then
+  as_fn_error $? "conditional \"USE_X265\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_ASSRENDER_TRUE}" && test -z "${USE_ASSRENDER_FALSE}"; then
   as_fn_error $? "conditional \"USE_ASSRENDER\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55549,6 +56506,10 @@
   as_fn_error $? "conditional \"USE_APEXSINK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_BS2B_TRUE}" && test -z "${USE_BS2B_FALSE}"; then
+  as_fn_error $? "conditional \"USE_BS2B\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_BZ2_TRUE}" && test -z "${USE_BZ2_FALSE}"; then
   as_fn_error $? "conditional \"USE_BZ2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55633,6 +56594,14 @@
   as_fn_error $? "conditional \"USE_GSM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_GTK3_TRUE}" && test -z "${USE_GTK3_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GTK3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_GTK3_GL_TRUE}" && test -z "${USE_GTK3_GL_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GTK3_GL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_HLS_TRUE}" && test -z "${USE_HLS_FALSE}"; then
   as_fn_error $? "conditional \"USE_HLS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55653,6 +56622,10 @@
   as_fn_error $? "conditional \"USE_LV2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_LIBDE265_TRUE}" && test -z "${USE_LIBDE265_FALSE}"; then
+  as_fn_error $? "conditional \"USE_LIBDE265\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LIBMMS_TRUE}" && test -z "${USE_LIBMMS_FALSE}"; then
   as_fn_error $? "conditional \"USE_LIBMMS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55685,10 +56658,6 @@
   as_fn_error $? "conditional \"USE_MUSEPACK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_MYTHTV_TRUE}" && test -z "${USE_MYTHTV_FALSE}"; then
-  as_fn_error $? "conditional \"USE_MYTHTV\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_NAS_TRUE}" && test -z "${USE_NAS_FALSE}"; then
   as_fn_error $? "conditional \"USE_NAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55729,6 +56698,10 @@
   as_fn_error $? "conditional \"USE_PVR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_QT_TRUE}" && test -z "${USE_QT_FALSE}"; then
+  as_fn_error $? "conditional \"USE_QT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_LIBVISUAL_TRUE}" && test -z "${USE_LIBVISUAL_FALSE}"; then
   as_fn_error $? "conditional \"USE_LIBVISUAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -55833,6 +56806,18 @@
   as_fn_error $? "conditional \"USE_WEBP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_OPENH264_TRUE}" && test -z "${USE_OPENH264_FALSE}"; then
+  as_fn_error $? "conditional \"USE_OPENH264\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_X265_TRUE}" && test -z "${USE_X265_FALSE}"; then
+  as_fn_error $? "conditional \"USE_X265\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_DTLS_TRUE}" && test -z "${USE_DTLS_FALSE}"; then
+  as_fn_error $? "conditional \"USE_DTLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
@@ -56230,7 +57215,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.4.5, which was
+This file was extended by GStreamer Bad Plug-ins $as_me 1.5.91, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -56296,7 +57281,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.4.5
+GStreamer Bad Plug-ins config.status 1.5.91
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -56886,12 +57871,13 @@
     "gst/mve/Makefile") CONFIG_FILES="$CONFIG_FILES gst/mve/Makefile" ;;
     "gst/mxf/Makefile") CONFIG_FILES="$CONFIG_FILES gst/mxf/Makefile" ;;
     "gst/nuvdemux/Makefile") CONFIG_FILES="$CONFIG_FILES gst/nuvdemux/Makefile" ;;
+    "gst/onvif/Makefile") CONFIG_FILES="$CONFIG_FILES gst/onvif/Makefile" ;;
     "gst/patchdetect/Makefile") CONFIG_FILES="$CONFIG_FILES gst/patchdetect/Makefile" ;;
     "gst/pcapparse/Makefile") CONFIG_FILES="$CONFIG_FILES gst/pcapparse/Makefile" ;;
     "gst/pnm/Makefile") CONFIG_FILES="$CONFIG_FILES gst/pnm/Makefile" ;;
     "gst/rawparse/Makefile") CONFIG_FILES="$CONFIG_FILES gst/rawparse/Makefile" ;;
-    "gst/real/Makefile") CONFIG_FILES="$CONFIG_FILES gst/real/Makefile" ;;
     "gst/removesilence/Makefile") CONFIG_FILES="$CONFIG_FILES gst/removesilence/Makefile" ;;
+    "gst/rtp/Makefile") CONFIG_FILES="$CONFIG_FILES gst/rtp/Makefile" ;;
     "gst/sdi/Makefile") CONFIG_FILES="$CONFIG_FILES gst/sdi/Makefile" ;;
     "gst/sdp/Makefile") CONFIG_FILES="$CONFIG_FILES gst/sdp/Makefile" ;;
     "gst/segmentclip/Makefile") CONFIG_FILES="$CONFIG_FILES gst/segmentclip/Makefile" ;;
@@ -56911,6 +57897,7 @@
     "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/adaptivedemux/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/adaptivedemux/Makefile" ;;
     "gst-libs/gst/basecamerabinsrc/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/basecamerabinsrc/Makefile" ;;
     "gst-libs/gst/gl/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/gl/Makefile" ;;
     "gst-libs/gst/gl/android/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/gl/android/Makefile" ;;
@@ -56941,7 +57928,6 @@
     "sys/bluez/Makefile") CONFIG_FILES="$CONFIG_FILES sys/bluez/Makefile" ;;
     "sys/d3dvideosink/Makefile") CONFIG_FILES="$CONFIG_FILES sys/d3dvideosink/Makefile" ;;
     "sys/decklink/Makefile") CONFIG_FILES="$CONFIG_FILES sys/decklink/Makefile" ;;
-    "sys/directdraw/Makefile") CONFIG_FILES="$CONFIG_FILES sys/directdraw/Makefile" ;;
     "sys/directsound/Makefile") CONFIG_FILES="$CONFIG_FILES sys/directsound/Makefile" ;;
     "sys/dshowsrcwrapper/Makefile") CONFIG_FILES="$CONFIG_FILES sys/dshowsrcwrapper/Makefile" ;;
     "sys/dshowvideosink/Makefile") CONFIG_FILES="$CONFIG_FILES sys/dshowvideosink/Makefile" ;;
@@ -56949,8 +57935,6 @@
     "sys/fbdev/Makefile") CONFIG_FILES="$CONFIG_FILES sys/fbdev/Makefile" ;;
     "sys/linsys/Makefile") CONFIG_FILES="$CONFIG_FILES sys/linsys/Makefile" ;;
     "sys/opensles/Makefile") CONFIG_FILES="$CONFIG_FILES sys/opensles/Makefile" ;;
-    "sys/osxvideo/Makefile") CONFIG_FILES="$CONFIG_FILES sys/osxvideo/Makefile" ;;
-    "sys/qtwrapper/Makefile") CONFIG_FILES="$CONFIG_FILES sys/qtwrapper/Makefile" ;;
     "sys/shm/Makefile") CONFIG_FILES="$CONFIG_FILES sys/shm/Makefile" ;;
     "sys/uvch264/Makefile") CONFIG_FILES="$CONFIG_FILES sys/uvch264/Makefile" ;;
     "sys/vcd/Makefile") CONFIG_FILES="$CONFIG_FILES sys/vcd/Makefile" ;;
@@ -56964,7 +57948,9 @@
     "tests/check/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/Makefile" ;;
     "tests/files/Makefile") CONFIG_FILES="$CONFIG_FILES tests/files/Makefile" ;;
     "tests/examples/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/Makefile" ;;
+    "tests/examples/avsamplesink/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/avsamplesink/Makefile" ;;
     "tests/examples/camerabin2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/camerabin2/Makefile" ;;
+    "tests/examples/codecparsers/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/codecparsers/Makefile" ;;
     "tests/examples/directfb/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/directfb/Makefile" ;;
     "tests/examples/gl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/Makefile" ;;
     "tests/examples/gl/cocoa/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/cocoa/Makefile" ;;
@@ -56976,12 +57962,14 @@
     "tests/examples/gl/generic/recordgraphic/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/generic/recordgraphic/Makefile" ;;
     "tests/examples/gl/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/Makefile" ;;
     "tests/examples/gl/gtk/gtkvideooverlay/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/gtkvideooverlay/Makefile" ;;
+    "tests/examples/gl/gtk/3dvideo/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/3dvideo/Makefile" ;;
     "tests/examples/gl/gtk/filternovideooverlay/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/filternovideooverlay/Makefile" ;;
     "tests/examples/gl/gtk/filtervideooverlay/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/filtervideooverlay/Makefile" ;;
     "tests/examples/gl/gtk/fxtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/fxtest/Makefile" ;;
     "tests/examples/gl/gtk/switchvideooverlay/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/gtk/switchvideooverlay/Makefile" ;;
     "tests/examples/gl/qt/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/qt/Makefile" ;;
     "tests/examples/gl/sdl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gl/sdl/Makefile" ;;
+    "tests/examples/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/gtk/Makefile" ;;
     "tests/examples/mpegts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/mpegts/Makefile" ;;
     "tests/examples/mxf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/mxf/Makefile" ;;
     "tests/examples/opencv/Makefile") CONFIG_FILES="$CONFIG_FILES tests/examples/opencv/Makefile" ;;
@@ -56991,6 +57979,7 @@
     "ext/voaacenc/Makefile") CONFIG_FILES="$CONFIG_FILES ext/voaacenc/Makefile" ;;
     "ext/assrender/Makefile") CONFIG_FILES="$CONFIG_FILES ext/assrender/Makefile" ;;
     "ext/apexsink/Makefile") CONFIG_FILES="$CONFIG_FILES ext/apexsink/Makefile" ;;
+    "ext/bs2b/Makefile") CONFIG_FILES="$CONFIG_FILES ext/bs2b/Makefile" ;;
     "ext/bz2/Makefile") CONFIG_FILES="$CONFIG_FILES ext/bz2/Makefile" ;;
     "ext/chromaprint/Makefile") CONFIG_FILES="$CONFIG_FILES ext/chromaprint/Makefile" ;;
     "ext/curl/Makefile") CONFIG_FILES="$CONFIG_FILES ext/curl/Makefile" ;;
@@ -57001,6 +57990,7 @@
     "ext/daala/Makefile") CONFIG_FILES="$CONFIG_FILES ext/daala/Makefile" ;;
     "ext/dts/Makefile") CONFIG_FILES="$CONFIG_FILES ext/dts/Makefile" ;;
     "ext/gl/Makefile") CONFIG_FILES="$CONFIG_FILES ext/gl/Makefile" ;;
+    "ext/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES ext/gtk/Makefile" ;;
     "ext/faac/Makefile") CONFIG_FILES="$CONFIG_FILES ext/faac/Makefile" ;;
     "ext/faad/Makefile") CONFIG_FILES="$CONFIG_FILES ext/faad/Makefile" ;;
     "ext/flite/Makefile") CONFIG_FILES="$CONFIG_FILES ext/flite/Makefile" ;;
@@ -57010,6 +58000,7 @@
     "ext/kate/Makefile") CONFIG_FILES="$CONFIG_FILES ext/kate/Makefile" ;;
     "ext/ladspa/Makefile") CONFIG_FILES="$CONFIG_FILES ext/ladspa/Makefile" ;;
     "ext/lv2/Makefile") CONFIG_FILES="$CONFIG_FILES ext/lv2/Makefile" ;;
+    "ext/libde265/Makefile") CONFIG_FILES="$CONFIG_FILES ext/libde265/Makefile" ;;
     "ext/libmms/Makefile") CONFIG_FILES="$CONFIG_FILES ext/libmms/Makefile" ;;
     "ext/libvisual/Makefile") CONFIG_FILES="$CONFIG_FILES ext/libvisual/Makefile" ;;
     "ext/Makefile") CONFIG_FILES="$CONFIG_FILES ext/Makefile" ;;
@@ -57019,16 +58010,17 @@
     "ext/mimic/Makefile") CONFIG_FILES="$CONFIG_FILES ext/mimic/Makefile" ;;
     "ext/mplex/Makefile") CONFIG_FILES="$CONFIG_FILES ext/mplex/Makefile" ;;
     "ext/musepack/Makefile") CONFIG_FILES="$CONFIG_FILES ext/musepack/Makefile" ;;
-    "ext/mythtv/Makefile") CONFIG_FILES="$CONFIG_FILES ext/mythtv/Makefile" ;;
     "ext/nas/Makefile") CONFIG_FILES="$CONFIG_FILES ext/nas/Makefile" ;;
     "ext/neon/Makefile") CONFIG_FILES="$CONFIG_FILES ext/neon/Makefile" ;;
     "ext/ofa/Makefile") CONFIG_FILES="$CONFIG_FILES ext/ofa/Makefile" ;;
     "ext/openal/Makefile") CONFIG_FILES="$CONFIG_FILES ext/openal/Makefile" ;;
     "ext/opencv/Makefile") CONFIG_FILES="$CONFIG_FILES ext/opencv/Makefile" ;;
     "ext/openexr/Makefile") CONFIG_FILES="$CONFIG_FILES ext/openexr/Makefile" ;;
+    "ext/openh264/Makefile") CONFIG_FILES="$CONFIG_FILES ext/openh264/Makefile" ;;
     "ext/openjpeg/Makefile") CONFIG_FILES="$CONFIG_FILES ext/openjpeg/Makefile" ;;
     "ext/openni2/Makefile") CONFIG_FILES="$CONFIG_FILES ext/openni2/Makefile" ;;
     "ext/opus/Makefile") CONFIG_FILES="$CONFIG_FILES ext/opus/Makefile" ;;
+    "ext/qt/Makefile") CONFIG_FILES="$CONFIG_FILES ext/qt/Makefile" ;;
     "ext/rsvg/Makefile") CONFIG_FILES="$CONFIG_FILES ext/rsvg/Makefile" ;;
     "ext/resindvd/Makefile") CONFIG_FILES="$CONFIG_FILES ext/resindvd/Makefile" ;;
     "ext/rtmp/Makefile") CONFIG_FILES="$CONFIG_FILES ext/rtmp/Makefile" ;;
@@ -57048,8 +58040,10 @@
     "ext/spc/Makefile") CONFIG_FILES="$CONFIG_FILES ext/spc/Makefile" ;;
     "ext/timidity/Makefile") CONFIG_FILES="$CONFIG_FILES ext/timidity/Makefile" ;;
     "ext/webp/Makefile") CONFIG_FILES="$CONFIG_FILES ext/webp/Makefile" ;;
+    "ext/x265/Makefile") CONFIG_FILES="$CONFIG_FILES ext/x265/Makefile" ;;
     "ext/xvid/Makefile") CONFIG_FILES="$CONFIG_FILES ext/xvid/Makefile" ;;
     "ext/zbar/Makefile") CONFIG_FILES="$CONFIG_FILES ext/zbar/Makefile" ;;
+    "ext/dtls/Makefile") CONFIG_FILES="$CONFIG_FILES ext/dtls/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
     "docs/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES docs/plugins/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 4e2823e..1c06bed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,14 +1,14 @@
-AC_PREREQ([2.68])
+AC_PREREQ([2.69])
 
 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.4.5],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-bad])
+dnl releases only do Wall, git and prerelease does Werror too
+AC_INIT([GStreamer Bad Plug-ins],[1.5.91],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-bad])
 
 AG_GST_INIT
 
 dnl initialize automake
-AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([-Wno-portability 1.14 no-dist-gzip dist-xz tar-ustar subdir-objects])
 
 dnl define PACKAGE_VERSION_* variables
 AS_VERSION
@@ -33,6 +33,9 @@
   [AM_DEFAULT_VERBOSITY=1
    AC_SUBST(AM_DEFAULT_VERBOSITY)])
 
+dnl PKG_CONFIG_SYSROOT_DIR is a valid environment variable
+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
+
 dnl our libraries and install dirs use GST_API_VERSION in the filename
 dnl to allow side-by-side installation of different API versions
 GST_API_VERSION=1.0
@@ -48,11 +51,11 @@
 dnl - interfaces added -> increment AGE
 dnl - interfaces removed -> AGE = 0
 dnl sets GST_LT_LDFLAGS
-AS_LIBTOOL(GST, 405, 0, 405)
+AS_LIBTOOL(GST, 591, 0, 591)
 
 dnl *** required versions of GStreamer stuff ***
-GST_REQ=1.4.0
-GSTPB_REQ=1.4.0
+GST_REQ=1.5.91
+GSTPB_REQ=1.5.91
 
 dnl *** autotools stuff ****
 
@@ -140,6 +143,9 @@
 
 AC_FUNC_MMAP
 
+dnl check for pthreads
+AX_PTHREAD
+
 dnl *** checks for header files ***
 
 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
@@ -410,16 +416,16 @@
 GST_PLUGINS_NONPORTED=" cdxaparse \
  dccp faceoverlay \
  hdvparse \
- mve mythtv nuvdemux \
- patchdetect real \
+ mve nuvdemux \
+ patchdetect \
  sdi tta \
  videomeasure \
- linsys vcd \
+ linsys \
  apexsink dc1394 \
  gsettings \
  musepack nas sdl timidity \
- directdraw acm wininet \
- xvid lv2 teletextdec sndio osx_video quicktime libvisual"
+ acm wininet \
+ xvid lv2 teletextdec sndio libvisual"
 AC_SUBST(GST_PLUGINS_NONPORTED)
 
 dnl these are all the gst plug-ins, compilable without additional libs
@@ -468,12 +474,13 @@
 AG_GST_CHECK_PLUGIN(mve)
 AG_GST_CHECK_PLUGIN(mxf)
 AG_GST_CHECK_PLUGIN(nuvdemux)
+AG_GST_CHECK_PLUGIN(onvif)
 AG_GST_CHECK_PLUGIN(patchdetect)
 AG_GST_CHECK_PLUGIN(pcapparse)
 AG_GST_CHECK_PLUGIN(pnm)
 AG_GST_CHECK_PLUGIN(rawparse)
-AG_GST_CHECK_PLUGIN(real)
 AG_GST_CHECK_PLUGIN(removesilence)
+AG_GST_CHECK_PLUGIN(rtp)
 AG_GST_CHECK_PLUGIN(sdi)
 AG_GST_CHECK_PLUGIN(sdp)
 AG_GST_CHECK_PLUGIN(segmentclip)
@@ -493,12 +500,6 @@
 
 dnl *** plug-ins to exclude ***
 
-dnl real plugin only works on i386 and x86_64 for the time being.
-if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
-  AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
-  AG_GST_DISABLE_PLUGIN(real)
-fi
-
 AC_CHECK_HEADER(AVFoundation/AVFoundation.h, HAVE_AVFOUNDATION="yes", HAVE_AVFOUNDATION="no", [-])
 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
 AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h, HAVE_VIDEOTOOLBOX="yes", HAVE_VIDEOTOOLBOX="no", [-])
@@ -540,7 +541,7 @@
 fi
 
 if test "x$HAVE_PTHREAD_H" = "xyes"; then
-  DCCP_LIBS="$DCCP_LIBS -lpthread"
+  DCCP_LIBS="$DCCP_LIBS $PTHREAD_LIBS"
   AC_SUBST(DCCP_LIBS)
 else
   AG_GST_DISABLE_PLUGIN(dccp)
@@ -646,13 +647,12 @@
        *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
      esac],[NEED_DISPMANX=auto])
 
-AG_GST_CHECK_X
+AG_GST_PKG_CHECK_MODULES(X, x11)
 save_CPPFLAGS="$CPPFLAGS"
 save_LIBS="$LIBS"
 
 HAVE_GL=no
 HAVE_GLES2=no
-HAVE_GLU=no
 HAVE_WAYLAND_EGL=no
 
 HAVE_EGL_RPI=no
@@ -661,19 +661,22 @@
   *-mingw32* )
     LIBS="$LIBS -lgdi32"
     AG_GST_CHECK_LIBHEADER(GL, opengl32, glTexImage2D,, GL/gl.h)
-    AG_GST_CHECK_LIBHEADER(GLU, glu32, gluSphere,, GL/glu.h)
     AC_CHECK_HEADER(GL/wglext.h, HAVE_WGLEXT="yes", HAVE_WGLEXT="no", [#include <GL/gl.h>])
     if test "x$HAVE_WGLEXT" = "xyes"; then
       HAVE_WGL=yes
       HAVE_GL=yes
-      HAVE_GLU=yes
     fi
   ;;
   *)
-    AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
-    AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
-    AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
-    AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
+    if test "x$NEED_GL" != "xno"; then
+      AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
+    fi
+    if test "x$NEED_GLES2" != "xno"; then
+      AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
+    fi
+    if test "x$NEED_EGL" != "xno"; then
+      AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
+    fi
 
     old_LIBS=$LIBS
     old_CFLAGS=$CFLAGS
@@ -746,10 +749,6 @@
 CPPFLAGS="$save_CPPFLAGS"
 LIBS="$save_LIBS"
 
-AC_SUBST(HAVE_GL)
-AC_SUBST(HAVE_GLU)
-AC_SUBST(HAVE_GLES2)
-
 USE_OPENGL=no
 USE_GLES2=no
 USE_GLX=no
@@ -795,17 +794,9 @@
         AC_MSG_ERROR([Building the GLX backend without the OpenGL backend is unsupported])
       fi
     else dnl HAVE_GL=yes
-      if test "x$HAVE_GLU" = "xno"; then
-        if test "x$NEED_GL" = "xyes"; then
-          AC_MSG_ERROR([GLU is required with OpenGL support])
-        else
-          AC_MSG_WARN([GLU is required with OpenGL support])
-        fi
-      else dnl HAVE_GLU=yes
-        USE_OPENGL=yes
-        if test "x$NEED_GLX" != "xno"; then
-          USE_GLX=yes
-        fi
+      USE_OPENGL=yes
+      if test "x$NEED_GLX" != "xno"; then
+        USE_GLX=yes
       fi
     fi
   fi
@@ -817,24 +808,22 @@
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
 #endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
 #  include <OpenGLES/ES2/gl.h>
 #  include <OpenGLES/ES2/glext.h>
 # else
 #  include <GLES2/gl2.h>
 #  include <GLES2/gl2ext.h>
 # endif
-# if __APPLE__
+# ifdef __APPLE__
 #  include <OpenGL/OpenGL.h>
 #  include <OpenGL/gl.h>
 #  if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 #   define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
 #   include <OpenGL/gl3.h>
 #  endif
-#  include <OpenGL/glu.h>
 # else
 #  include <GL/gl.h>
-#  include <GL/glu.h>
 #  if __WIN32__ || _WIN32
 #   include <GL/glext.h>
 #  endif
@@ -850,11 +839,12 @@
     ]])],[ AC_MSG_RESULT(yes)
     ],[AC_MSG_RESULT(no)
     if test "x$NEED_GLES2" = "xyes"; then
-      if test "x$NEED_OPENGL" = "xyes"; then
+      if test "x$NEED_GL" = "xyes"; then
         AC_MSG_ERROR([Cannot seem to include both GL and GLES2 headers. Try disabling one API])
       fi
       AC_MSG_WARN([Disabling Desktop GL support])
       HAVE_GL=no
+      USE_OPENGL=no
     else
       AC_MSG_WARN([Disabling GL|ES 2.0 support])
       HAVE_GLES2=no
@@ -863,7 +853,7 @@
   CPPFLAGS="$save_CPPFLAGS"
 fi
 
-#dnl Check for OpenGL, GLU
+#dnl Check for OpenGL
 echo host is $host
 case $host in
   *-android*)
@@ -925,9 +915,6 @@
       if test "x$NEED_GL" != "xno"; then
         GL_LIBS="$GL_LIBS -lGL"
       fi
-      if test "x$HAVE_GLU" = "xyes"; then
-        GL_LIBS="$GL_LIBS -lGLU"
-      fi
     fi
 
     dnl OpenGL|ES 2.0
@@ -1015,15 +1002,9 @@
       if test "x$NEED_WGL" = "xyes"; then
         AC_MSG_ERROR([WGL is not available on Mac OS X])
       fi
-      if test "x$NEED_EGL" = "xyes"; then
-        AC_MSG_ERROR([EGL is not available on Mac OS X])
-      fi
-      if test "x$NEED_GLES2" = "xyes"; then
-        AC_MSG_ERROR([OpenGL|ES 2.0 is not supported on your platform yet])
-      fi
 
       if test "x$NEED_COCOA" != "xno"; then
-        GL_LIBS="$LIBS -framework OpenGL -framework Cocoa"
+        GL_LIBS="$LIBS -framework OpenGL -framework Cocoa -framework QuartzCore -framework CoreFoundation"
         GL_CFLAGS="$GL_CFLAGS"
         USE_COCOA=yes
         HAVE_WINDOW_COCOA=yes
@@ -1043,12 +1024,27 @@
           if test "x$NEED_GL" != "xno"; then
             GL_LIBS="$GL_LIBS -lGL"
           fi
-          if test "x$HAVE_GLU" = "xyes"; then
-            GL_LIBS="$GL_LIBS -lGLU"
-          fi
           USE_OPENGL=yes
         fi
       fi
+
+      if test "x$HAVE_EGL" = "xyes"; then
+        if test "x$NEED_EGL" != "xno"; then
+          if test "x$HAVE_WINDOW_X11" = "xyes"; then
+            GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
+            GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
+            USE_EGL=yes
+          fi
+        fi
+      fi
+
+      dnl OpenGL|ES 2.0
+      if test "x$HAVE_GLES2" = "xyes"; then
+        if test "x$NEED_GLES2" != "xno"; then
+          GL_LIBS="$GL_LIBS -lGLESv2"
+          USE_GLES2=yes
+        fi
+      fi
     fi
     ;;
   *-mingw32*)
@@ -1060,10 +1056,10 @@
     fi
 
     if test "x$HAVE_GL" = "xyes"; then
-      if test "$NEED_GL" != "xno"; then
+      if test "x$NEED_GL" != "xno"; then
         if test "x$HAVE_WGL" = "xyes"; then
           if test "$NEED_WGL" != "xno"; then
-            GL_LIBS="$GL_LIBS -lgdi32 -lopengl32 -lglu32"
+            GL_LIBS="$GL_LIBS -lgdi32 -lopengl32"
             HAVE_WINDOW_WIN32=yes
             USE_OPENGL=yes
             USE_WGL=yes
@@ -1256,7 +1252,7 @@
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
 #endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
 #  include <OpenGLES/ES2/gl.h>
 #  include <OpenGLES/ES2/glext.h>
 # else
@@ -1268,13 +1264,11 @@
 
 if test "x$USE_OPENGL" = "xyes"; then
   GL_INCLUDES="$GL_INCLUDES
-# if __APPLE__
+# ifdef __APPLE__
 #  include <OpenGL/OpenGL.h>
 #  include <OpenGL/gl.h>
-#  include <OpenGL/glu.h>
 # else
 #  include <GL/gl.h>
-#  include <GL/glu.h>
 #  if __WIN32__ || _WIN32
 #   include <GL/glext.h>
 #  endif
@@ -1286,6 +1280,8 @@
 GST_GL_HAVE_GLCHAR=0
 GST_GL_HAVE_GLSIZEIPTR=0
 GST_GL_HAVE_GLINTPTR=0
+GST_GL_HAVE_GLSYNC=0
+GST_GL_HAVE_GLUINT64=0
 
 old_CFLAGS=$CFLAGS
 CFLAGS="$GL_CFLAGS $CFLAGS"
@@ -1310,6 +1306,16 @@
   GST_GL_HAVE_GLINTPTR=1
 fi
 
+AC_CHECK_TYPES(GLsync, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLsync" = "xyes"; then
+  GST_GL_HAVE_GLSYNC=1
+fi
+
+AC_CHECK_TYPES(GLuint64, [], [], [[$GL_INCLUDES]])
+if test "x$ac_cv_type_GLuint64" = "xyes"; then
+  GST_GL_HAVE_GLUINT64=1
+fi
+
 CFLAGS=$old_CFLAGS
 
 GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
@@ -1317,6 +1323,8 @@
 #define GST_GL_HAVE_GLCHAR $GST_GL_HAVE_GLCHAR
 #define GST_GL_HAVE_GLSIZEIPTR $GST_GL_HAVE_GLSIZEIPTR
 #define GST_GL_HAVE_GLINTPTR $GST_GL_HAVE_GLINTPTR
+#define GST_GL_HAVE_GLSYNC $GST_GL_HAVE_GLSYNC
+#define GST_GL_HAVE_GLUINT64 $GST_GL_HAVE_GLUINT64
 "
 
 AC_CONFIG_COMMANDS([gst-libs/gst/gl/gstglconfig.h], [
@@ -1404,12 +1412,13 @@
   save_LIBS="$LIBS"
   CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
   LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
-  LIBS="$LIBS -ldsound -ldxerr9 -luser32"
+  LIBS="$LIBS -lwinmm -ldsound -ldxerr9 -luser32"
   AC_MSG_CHECKING(for DirectSound LDFLAGS)
   AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <windows.h>
 #include <dxerr9.h>
 #include <dsound.h>
+#include <mmsystem.h>
 ]], [[
   DXGetErrorString9 (0);
   DirectSoundCreate(NULL, NULL, NULL);
@@ -1423,7 +1432,7 @@
 
   if test "x$HAVE_DIRECTSOUND" = "xyes";  then
     dnl this is much more than we want
-    DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32"
+    DIRECTSOUND_LIBS="-lwinmm -ldsound -ldxerr9 -luser32"
     AC_SUBST(DIRECTX_CFLAGS)
     AC_SUBST(DIRECTX_LDFLAGS)
     AC_SUBST(DIRECTSOUND_LIBS)
@@ -1510,41 +1519,6 @@
   AC_SUBST(HAVE_DIRECT3D)
 ])
 
-dnl DirectDraw
-translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTDRAW, true)
-AG_GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [
-  HAVE_DIRECTDRAW="no"
-  save_CFLAGS="$CFLAGS"
-  save_LDFLAGS="$LDFLAGS"
-  save_LIBS="$LIBS"
-  CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
-  LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
-  LIBS="$LIBS -lddraw -lgdi32"
-  AC_MSG_CHECKING(for DirectDraw LDFLAGS)
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <windows.h>
-#include <ddraw.h>
-]], [[
-  GetStockObject(0);
-  DirectDrawCreate(NULL, NULL, NULL);
-]])],
-    [HAVE_DIRECTDRAW="yes"],
-    [HAVE_DIRECTDRAW="no"])
-  AC_MSG_RESULT($HAVE_DIRECTDRAW)
-  CFLAGS=$save_CFLAGS
-  LDFLAGS=$save_LDFLAGS
-  LIBS=$save_LIBS
-
-  if test "x$HAVE_DIRECTDRAW" = "xyes";  then
-    dnl this is much more than we want
-    DIRECTDRAW_LIBS="-lddraw -ldxguid -lgdi32"
-    AC_SUBST(DIRECTX_CFLAGS)
-    AC_SUBST(DIRECTX_LDFLAGS)
-    AC_SUBST(DIRECTDRAW_LIBS)
-  fi
-  AC_SUBST(HAVE_DIRECTDRAW)
-])
-
 dnl winscreencap
 translit(dnm, m, l) AM_CONDITIONAL(USE_WINSCREENCAP, true)
 AG_GST_CHECK_FEATURE(WINSCREENCAP, [winscreencap plug-in], winscreencap, [
@@ -1656,30 +1630,19 @@
 dnl *** bluez ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_BLUEZ, true)
 AG_GST_CHECK_FEATURE(BLUEZ, [Bluez], bluez, [
-  PKG_CHECK_MODULES([BLUEZ], [bluez < 5.0], [
-    dnl FIXME: we should be able to replace this with the GLib DBus stuff
-    PKG_CHECK_MODULES([DBUS], [dbus-1], [HAVE_BLUEZ=yes], [HAVE_BLUEZ=no])
+  PKG_CHECK_MODULES([BLUEZ5], [bluez >= 5.0], [
+    PKG_CHECK_MODULES([GIO_UNIX], gio-unix-2.0 > 2.24, [
+      AC_CHECK_PROG([GDBUS_CODEGEN],[gdbus-codegen],[gdbus-codegen])
+      HAVE_BLUEZ=yes
+      AC_DEFINE(HAVE_BLUEZ5,[1],[Bluez5 detected])
+    ], [
+      HAVE_BLUEZ=no
+    ])
   ], [
     HAVE_BLUEZ=no
   ])
 ])
 
-dnl *** OS X videosrc ***
-translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_VIDEO, true)
-HAVE_OSX_VIDEO="no"
-AG_GST_CHECK_FEATURE(OSX_VIDEO, [OSX video], osxvideosrc, [
-  AC_CHECK_TYPE([SeqGrabComponent], HAVE_OSX_VIDEO="yes", HAVE_OSX_VIDEO="no",
-      [#include <Quicktime/Quicktime.h>])
-])
-dnl in case header Quicktime/Quicktime.h is found on other platforms
-case "$host" in
-  *-*darwin*)
-    ;;
-  *)
-    HAVE_OSX_VIDEO="no"
-    ;;
-esac
-
 dnl *** OS/X AVCVideoServices ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_AVC, true)
 HAVE_AVC="no"
@@ -1703,13 +1666,6 @@
     ;;
 esac
 
-dnl check for QuickTime
-translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
-AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
-  AC_CHECK_TYPE([SampleReferenceRecord], HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no",
-      [#include <Quicktime/Quicktime.h>])
-])
-
 dnl check for shm_open (for shm plugin)
 translit(dnm, m, l) AM_CONDITIONAL(USE_SHM, true)
 AG_GST_CHECK_FEATURE(SHM, [POSIX shared memory source and sink], shm, [
@@ -1749,7 +1705,6 @@
 translit(dnm, m, l) AM_CONDITIONAL(USE_UVCH264, true)
 AG_GST_CHECK_FEATURE(UVCH264, [UVC H264], uvch264, [
   AC_CHECK_HEADER(linux/uvcvideo.h, HAVE_UVCVIDEO_H=yes, HAVE_UVCVIDEO_H=no)
-  AG_GST_PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0)
   PKG_CHECK_MODULES(G_UDEV, gudev-1.0 , [
           AC_DEFINE([HAVE_GUDEV], 1, [Define if gudev is installed])
           HAVE_GUDEV="yes" ],
@@ -1818,6 +1773,16 @@
   ])
 ])
 
+dnl *** bs2b ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_BS2B, true)
+AG_GST_CHECK_FEATURE(BS2B, [bs2b], bs2b, [
+  PKG_CHECK_MODULES(BS2B, libbs2b >= 3.1.0, HAVE_BS2B="yes", [
+    HAVE_BS2B="no"
+  ])
+  AC_SUBST(BS2B_CFLAGS)
+  AC_SUBST(BS2B_LIBS)
+])
+
 dnl *** BZ2 ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
@@ -1857,11 +1822,19 @@
 dnl *** Curl ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
 AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
-  PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
+  PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
     HAVE_CURL="yes"
-    AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/ip.h netinet/tcp.h fcntl.h], [ ], [
+    AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/tcp.h fcntl.h], [ ], [
       AC_CHECK_HEADERS([unistd.h sys/types.h winsock2.h ws2tcpip.h fcntl.h], [ ], [HAVE_CURL="no"])
     ])
+    AC_CHECK_HEADERS([netinet/ip.h], [], [HAVE_CURL="no"],
+    [[#ifdef HAVE_SYS_TYPES_H
+     # include <sys/types.h>
+     #endif
+     #ifdef HAVE_NETINET_IN_H
+     # include <netinet/in.h>
+     #endif
+    ]])
     AC_MSG_CHECKING([for socket support needed by curlsink])
     AC_MSG_RESULT($HAVE_CURL)
   ], [
@@ -1883,7 +1856,7 @@
 dnl **** DASH ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_DASH, true)
 AG_GST_CHECK_FEATURE(DASH, [DASH plug-in], dash, [
-  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.4, [HAVE_LIBXML2="yes"
+  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.8, [HAVE_LIBXML2="yes"
     HAVE_DASH="yes"], [HAVE_LIBXML2="no"
     HAVE_DASH="no"])
   AC_SUBST(LIBXML2_CFLAGS)
@@ -1912,6 +1885,9 @@
 AG_GST_CHECK_FEATURE(DECKLINK, [decklink], decklink, [
    HAVE_DECKLINK=no
    case "$host" in
+     *android*)
+       HAVE_DECKLINK=no
+       ;;
      *-*linux*)
        if test "x$HAVE_PTHREAD_H" = "xyes"; then
          AC_CHECK_LIB(dl, dlopen,
@@ -1929,7 +1905,7 @@
             HAVE_DECKLINK=yes
             DECKLINK_CXXFLAGS=
             DECKLINK_LIBS="-lpthread -ldl"
-	    HAVE_DECKLINK_OSX=yes
+            HAVE_DECKLINK_OSX=yes
            ])
        fi
        ;;
@@ -2050,9 +2026,9 @@
       AC_MSG_CHECKING([Checking FAAD2 version in $faad_hdr])
       for minor in 10 9 8 7 6 5 0; do
         if test x$faad2_minor_version = "x"; then
-          AC_EGREP_CPP([GST_CHECK_FAAD_VERSION \"2\.$minor\"], [
+          AC_EGREP_CPP([\"2\.$minor\"$], [
               #include <$faad_hdr>
-              GST_CHECK_FAAD_VERSION FAAD2_VERSION
+              FAAD2_VERSION
             ], [
               faad2_minor_version=$minor
             ])
@@ -2154,6 +2130,14 @@
   AC_SUBST(SLV2_LIBS)
 ])
 
+dnl *** libde265 ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDE265, true)
+AG_GST_CHECK_FEATURE(LIBDE265, [libde265 HEVC/H.265 decoder], libde265, [
+  PKG_CHECK_MODULES(LIBDE265, libde265 >= 0.9, HAVE_LIBDE265="yes", HAVE_LIBDE265="no")
+  AC_SUBST(LIBDE265_CFLAGS)
+  AC_SUBST(LIBDE265_LIBS)
+])
+
 dnl *** libmms ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
@@ -2168,10 +2152,23 @@
 dnl *** libsrtp ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SRTP, true)
 AG_GST_CHECK_FEATURE(SRTP, [srtp library], srtp, [
-  HAVE_SRTP="yes"
-  AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h,
-    SRTP_LIBS="-lsrtp", HAVE_SRTP="no")
+  PKG_CHECK_MODULES(SRTP, libsrtp, HAVE_SRTP="yes",
+    AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h, SRTP_LIBS="-lsrtp")
+  )
   AC_SUBST(SRTP_LIBS)
+  AC_SUBST(SRTP_CFLAGS)
+])
+
+dnl *** dtls ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_DTLS, true)
+AG_GST_CHECK_FEATURE(DTLS, [DTLS plugin], dtls, [
+  PKG_CHECK_MODULES(DTLS, [ openssl >= 0.9.5  libcrypto ], [
+    HAVE_DTLS="yes"
+    AC_SUBST(DTLS_CFLAGS)
+    AC_SUBST(DTLS_LIBS)
+  ], [
+    HAVE_DTLS="no"
+  ])
 ])
 
 dnl *** linsys ***
@@ -2229,7 +2226,7 @@
         OLD_CFLAGS="$CFLAGS"
         OLD_LIBS="$LIBS"
         CFLAGS="$MJPEG_CFLAGS"
-        LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM -lpthread"
+        LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM $PTHREAD_LIBS"
         AC_CHECK_FUNC(mjpeg_loglev_t, [
           mjpegtools_api=10903
           ], [
@@ -2267,7 +2264,7 @@
       dnl check headers
       mpeg2enc_headers_ok=no
       AC_CHECK_HEADER([mpeg2encoder.hh], [
-        MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM -lpthread"
+        MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp $LIBM $PTHREAD_LIBS"
         OLD_LIBS="$LIBS"
         LIBS="$LIBS $MPEG2ENC_LIBS"
         AC_MSG_CHECKING([for valid mpeg2enc objects])
@@ -2412,21 +2409,10 @@
     ], [HAVE_MUSEPACK="no"])])
 ])
 
-dnl *** MythTV ***
-translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
-AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
-  PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.7.99, HAVE_MYTHTV="yes", [
-    HAVE_MYTHTV="no"
-  ])
-  AC_SUBST(GMYTH_CFLAGS)
-  AC_SUBST(GMYTH_LIBS)
-])
-
 dnl *** nas ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
   HAVE_NAS="no"
-  AG_GST_CHECK_X
   if test "x$HAVE_X" = "xyes"; then
     save_cppflags=$CFLAGS
     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -2477,20 +2463,31 @@
   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.5.0 , [
+  PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.0 opencv < 2.5.0 , [
     AC_PROG_CXX
     AC_LANG([C++])
     OLD_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=$OPENCV_CFLAGS
-    AC_CHECK_HEADERS([highgui.h opencv2/highgui/highgui_c.h])
+    something_not_found=no
+    AC_CHECK_HEADERS([opencv2/contrib/contrib.hpp \
+                      opencv2/core/core_c.h \
+                      opencv2/core/types_c.h \
+                      opencv2/core/version.hpp \
+                      opencv2/highgui/highgui_c.h \
+                      opencv2/imgproc/imgproc.hpp \
+                      opencv2/imgproc/imgproc_c.h \
+                      opencv2/legacy/compat.hpp \
+                      opencv2/legacy/legacy.hpp \
+                      opencv2/objdetect/objdetect.hpp \
+                      opencv2/video/background_segm.hpp], [], [something_not_found=yes])
     CPPFLAGS=$OLD_CPPFLAGS
     AC_LANG([C])
 
-    if test $ac_cv_header_highgui_h = "yes" -o $ac_cv_header_opencv2_highgui_highgui_c_h = "yes" ; then
-      HAVE_OPENCV="yes"
-    else
-      AC_MSG_RESULT([neither highgui.h nor opencv2/highgui/highgui_c.h could not be found])
+    if test $something_not_found = "yes"; then
+      AC_MSG_RESULT([not all opencv2 headers were found])
       HAVE_OPENCV="no"
+    else
+      HAVE_OPENCV="yes"
     fi
   ], [
     HAVE_OPENCV="no"
@@ -2500,6 +2497,15 @@
   AC_SUBST(OPENCV_PREFIX)
   AC_SUBST(OPENCV_CFLAGS)
   AC_SUBST(OPENCV_LIBS)
+  dnl the OpenCV prefix is used at runtime for some object properties, and also
+  dnl used here to detect which directory is the correct one. For the second
+  dnl case, make sure the right sysroot is used, ensuring correct behavior
+  dnl during cross compilation.
+  if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then
+    AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])
+  else
+    AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])
+  fi
 ])
 
 dnl *** OpenEXR ***
@@ -2508,6 +2514,12 @@
   AG_GST_PKG_CHECK_MODULES(OPENEXR, OpenEXR)
 ])
 
+dnl *** openh264 ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_OPENH264, true)
+AG_GST_CHECK_FEATURE(OPENH264, [openh264 library], openh264, [
+  AG_GST_PKG_CHECK_MODULES(OPENH264, openh264 >= 1.3.0)
+])
+
 dnl *** OpenJPEG ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true)
 AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [
@@ -2600,6 +2612,86 @@
   fi
 ])
 
+dnl *** gtk+ ***
+HAVE_GTK3_GL="no"
+translit(dnm, m, l) AM_CONDITIONAL(USE_GTK3, true)
+AG_GST_CHECK_FEATURE(GTK3, [Gtk+ elements], gtk, [
+  PKG_CHECK_MODULES(GTK3, gtk+-3.0, [
+    AC_DEFINE([HAVE_GTK3], 1, [Define if Gtk+ 3.0 is installed])
+    HAVE_GTK3="yes"
+  ], [
+    HAVE_GTK3="no"
+  ])
+  PKG_CHECK_MODULES(GTK3_GL, gtk+-3.0 >= 3.15.0, [
+    GDK_WINDOWING="no"
+    if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
+      PKG_CHECK_MODULES(GTK3_X11, gtk+-x11-3.0, [
+        GTK3_CFLAGS="$GTK3_CFLAGS $GTK3_X11_CFLAGS"
+        GTK3_LIBS="$GTK3_LIBS $GTK3_X11_LIBS"
+        GDK_WINDOWING="yes"
+      ], [AC_MSG_NOTICE([Could not find Gtk X11 integration])])
+    fi
+    if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
+      PKG_CHECK_MODULES(GTK3_WAYLAND, gtk+-wayland-3.0, [
+        GTK3_CFLAGS="$GTK3_CFLAGS $GTK3_WAYLAND_CFLAGS"
+        GTK3_LIBS="$GTK3_LIBS $GTK3_WAYLAND_LIBS"
+        GDK_WINDOWING="yes"
+      ], [AC_MSG_NOTICE([Could not find Gtk Wayland integration])])
+    fi
+    if test "x$GDK_WINDOWING" = "xyes"; then
+      AC_DEFINE([HAVE_GTK3_GL], 1, [Define if Gtk+ 3.0 GL is installed])
+      HAVE_GTK3_GL="yes"
+    fi
+  ], [
+      HAVE_GTK3_GL="no"
+  ])
+])
+AM_CONDITIONAL(USE_GTK3_GL, test "x$HAVE_GTK3_GL" = "xyes")
+
+dnl *** Qt ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_QT, true)
+AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
+  PKG_CHECK_MODULES(QT, Qt5Core Qt5Gui Qt5Quick >= 5.4.0, [
+      QT_PATH=`$PKG_CONFIG --variable=exec_prefix Qt5Core`
+      QT_HOST_PATH=`$PKG_CONFIG --variable=host_bins Qt5Core`
+      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
+      AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
+      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
+      if test "x$MOC" = "x" || test "x$UIC" = "x" || test "x$RCC" = "x"; then
+        AC_MSG_WARN([One of the required qt build programs was not found])
+        HAVE_QT="no"
+      else
+        HAVE_QT="yes"
+        HAVE_QT_WINDOWING="no"
+        if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
+          PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
+            AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
+            QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"
+            QT_LIBS="$QT_LIBS $QT_X11_LIBS"
+            HAVE_QT_WINDOWING="yes"
+          ], [AC_MSG_NOTICE([Could not find Qt X11 integration])])
+        fi
+        if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
+          PKG_CHECK_MODULES(QT_WAYLAND, Qt5WaylandClient, [
+            AC_DEFINE([HAVE_QT_WAYLAND], [],
+                [Define if Qt Wayland integration is installed])
+            QT_CFLAGS="$QT_CFLAGS $QT_WAYLAND_CFLAGS"
+            QT_LIBS="$QT_LIBS $QT_WAYLAND_LIBS"
+            HAVE_QT_WINDOWING="yes"
+          ], [AC_MSG_NOTICE([Could not find Qt Wayland integration])])
+        fi
+        if test "x$HAVE_QT_WINDOWING" = "xno"; then
+          AC_MSG_WARN([Could not find any Qt Windowing integration])
+          HAVE_QT="no"
+        fi
+        AC_SUBST([QT_CFLAGS])
+        AC_SUBST([QT_LIBS])
+      fi
+  ], [
+      HAVE_QT="no"
+  ])
+])
+
 dnl *** libvisual ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
 AG_GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization library], libvisual, [
@@ -2776,7 +2868,7 @@
   HAVE_XVID=no
   AC_CHECK_HEADER(xvid.h, [
     OLD_LIBS="$LIBS"
-    LIBS="-lpthread $LIBM"
+    LIBS="$PTHREAD_LIBS $LIBM"
     AC_CHECK_LIB(xvidcore, xvid_encore, [
       AC_CHECK_LIB(xvidcore, xvid_decore, [
         AC_CHECK_LIB(xvidcore, xvid_global, [
@@ -2956,11 +3048,23 @@
       AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available])
       HAVE_HLS="yes"
     ], [
-      HAVE_HLS="no"
+      PKG_CHECK_MODULES(OPENSSL, openssl,
+      [
+        AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available])
+        HAVE_HLS="yes"
+      ], [
+        HAVE_HLS="no"
+      ])
     ])
   ])
 ])
 
+dnl *** x265 (H.265/HEVC encoder) ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_X265, true)
+AG_GST_CHECK_FEATURE(X265, [x265 plug-in], x265, [
+  AG_GST_PKG_CHECK_MODULES(X265, x265)
+])
+
 else
 
 dnl not building plugins with external dependencies,
@@ -2970,6 +3074,7 @@
 AM_CONDITIONAL(USE_VOAMRWBENC, false)
 AM_CONDITIONAL(USE_VOAACENC, false)
 AM_CONDITIONAL(USE_APEXSINK, false)
+AM_CONDITIONAL(USE_BS2B, false)
 AM_CONDITIONAL(USE_BZ2, false)
 AM_CONDITIONAL(USE_CHROMAPRINT, false)
 AM_CONDITIONAL(USE_CURL, false)
@@ -2991,11 +3096,14 @@
 AM_CONDITIONAL(USE_FLUIDSYNTH, false)
 AM_CONDITIONAL(USE_GL, false)
 AM_CONDITIONAL(USE_GSM, false)
+AM_CONDITIONAL(USE_GTK3, false)
+AM_CONDITIONAL(USE_GTK3_GL, false)
 AM_CONDITIONAL(USE_HLS, false)
 AM_CONDITIONAL(USE_KATE, false)
 AM_CONDITIONAL(USE_TIGER, false)
 AM_CONDITIONAL(USE_LADSPA, false)
 AM_CONDITIONAL(USE_LV2, false)
+AM_CONDITIONAL(USE_LIBDE265, false)
 AM_CONDITIONAL(USE_LIBMMS, false)
 AM_CONDITIONAL(USE_LINSYS, false)
 AM_CONDITIONAL(USE_MODPLUG, false)
@@ -3004,7 +3112,6 @@
 AM_CONDITIONAL(USE_MPG123, false)
 AM_CONDITIONAL(USE_MPLEX, false)
 AM_CONDITIONAL(USE_MUSEPACK, false)
-AM_CONDITIONAL(USE_MYTHTV, false)
 AM_CONDITIONAL(USE_NAS, false)
 AM_CONDITIONAL(USE_NEON, false)
 AM_CONDITIONAL(USE_OFA, false)
@@ -3015,6 +3122,7 @@
 AM_CONDITIONAL(USE_OPENNI2, false)
 AM_CONDITIONAL(USE_OPUS, false)
 AM_CONDITIONAL(USE_PVR, false)
+AM_CONDITIONAL(USE_QT, false)
 AM_CONDITIONAL(USE_LIBVISUAL, false)
 AM_CONDITIONAL(USE_TIMIDITY, false)
 AM_CONDITIONAL(USE_WILDMIDI, false)
@@ -3041,6 +3149,9 @@
 AM_CONDITIONAL(USE_SNDIO, false)
 AM_CONDITIONAL(USE_UVCH264, false)
 AM_CONDITIONAL(USE_WEBP, false)
+AM_CONDITIONAL(USE_OPENH264, false)
+AM_CONDITIONAL(USE_X265, false)
+AM_CONDITIONAL(USE_DTLS, false)
 
 fi dnl of EXT plugins
 
@@ -3170,12 +3281,13 @@
 gst/mve/Makefile
 gst/mxf/Makefile
 gst/nuvdemux/Makefile
+gst/onvif/Makefile
 gst/patchdetect/Makefile
 gst/pcapparse/Makefile
 gst/pnm/Makefile
 gst/rawparse/Makefile
-gst/real/Makefile
 gst/removesilence/Makefile
+gst/rtp/Makefile
 gst/sdi/Makefile
 gst/sdp/Makefile
 gst/segmentclip/Makefile
@@ -3195,6 +3307,7 @@
 gst/compositor/Makefile
 gst-libs/Makefile
 gst-libs/gst/Makefile
+gst-libs/gst/adaptivedemux/Makefile
 gst-libs/gst/basecamerabinsrc/Makefile
 gst-libs/gst/gl/Makefile
 gst-libs/gst/gl/android/Makefile
@@ -3225,7 +3338,6 @@
 sys/bluez/Makefile
 sys/d3dvideosink/Makefile
 sys/decklink/Makefile
-sys/directdraw/Makefile
 sys/directsound/Makefile
 sys/dshowsrcwrapper/Makefile
 sys/dshowvideosink/Makefile
@@ -3233,8 +3345,6 @@
 sys/fbdev/Makefile
 sys/linsys/Makefile
 sys/opensles/Makefile
-sys/osxvideo/Makefile
-sys/qtwrapper/Makefile
 sys/shm/Makefile
 sys/uvch264/Makefile
 sys/vcd/Makefile
@@ -3248,7 +3358,9 @@
 tests/check/Makefile
 tests/files/Makefile
 tests/examples/Makefile
+tests/examples/avsamplesink/Makefile
 tests/examples/camerabin2/Makefile
+tests/examples/codecparsers/Makefile
 tests/examples/directfb/Makefile
 tests/examples/gl/Makefile
 tests/examples/gl/cocoa/Makefile
@@ -3260,12 +3372,14 @@
 tests/examples/gl/generic/recordgraphic/Makefile
 tests/examples/gl/gtk/Makefile
 tests/examples/gl/gtk/gtkvideooverlay/Makefile
+tests/examples/gl/gtk/3dvideo/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/gtk/Makefile
 tests/examples/mpegts/Makefile
 tests/examples/mxf/Makefile
 tests/examples/opencv/Makefile
@@ -3275,6 +3389,7 @@
 ext/voaacenc/Makefile
 ext/assrender/Makefile
 ext/apexsink/Makefile
+ext/bs2b/Makefile
 ext/bz2/Makefile
 ext/chromaprint/Makefile
 ext/curl/Makefile
@@ -3285,6 +3400,7 @@
 ext/daala/Makefile
 ext/dts/Makefile
 ext/gl/Makefile
+ext/gtk/Makefile
 ext/faac/Makefile
 ext/faad/Makefile
 ext/flite/Makefile
@@ -3294,6 +3410,7 @@
 ext/kate/Makefile
 ext/ladspa/Makefile
 ext/lv2/Makefile
+ext/libde265/Makefile
 ext/libmms/Makefile
 ext/libvisual/Makefile
 ext/Makefile
@@ -3303,16 +3420,17 @@
 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/openh264/Makefile
 ext/openjpeg/Makefile
 ext/openni2/Makefile
 ext/opus/Makefile
+ext/qt/Makefile
 ext/rsvg/Makefile
 ext/resindvd/Makefile
 ext/rtmp/Makefile
@@ -3332,8 +3450,10 @@
 ext/spc/Makefile
 ext/timidity/Makefile
 ext/webp/Makefile
+ext/x265/Makefile
 ext/xvid/Makefile
 ext/zbar/Makefile
+ext/dtls/Makefile
 po/Makefile.in
 docs/Makefile
 docs/plugins/Makefile
diff --git a/debian/build-deps b/debian/build-deps
index 100dab8..0d450a7 100644
--- a/debian/build-deps
+++ b/debian/build-deps
@@ -1,5 +1,5 @@
-autoconf (>= 2.62)
-automake (>= 1.11)
+autoconf (>= 2.69)
+automake (>= 1.14)
 autopoint (>= 0.17)
 autotools-dev
 cdbs (>= 0.4.93)
@@ -7,19 +7,26 @@
 dh-autoreconf
 dpkg-dev (>= 1.15.1)
 flite-dev
+gir1.2-freedesktop
+gir1.2-glib-2.0
+gir1.2-gst-plugins-base-1.0
+gir1.2-gstreamer-1.0
+gobject-introspection (>= 0.9.12-4~)
 @GST_EXTRA_BUILD_DEPENDS@
 @GST_LIB_DEV_DEP@
 gstreamer@GST_ABI@-doc
-gstreamer@GST_ABI@-plugins-base (>= 1.4.0)
+gstreamer@GST_ABI@-plugins-base (>= 1.5.91)
 gstreamer@GST_ABI@-plugins-base-doc
 gtk-doc-tools (>= 1.12)
 ladspa-sdk
 libass-dev (>= 0.9.4)
+libbs2b-dev
 libbz2-dev
 libcairo2-dev
 libchromaprint-dev
-libcurl4-gnutls-dev (>= 7.21.0)
+libcurl4-gnutls-dev (>= 7.35.0)
 libdca-dev
+libde265-dev
 libdirectfb-dev (>= 0.9.25)
 libdvdnav-dev (>= 4.1.2) [!hurd-any]
 libegl1-mesa-dev
@@ -27,6 +34,7 @@
 libexif-dev (>= 0.6.16)
 libfaad-dev
 libfluidsynth-dev (>= 1.0)
+libgirepository1.0-dev (>= 0.9.12-4~)
 libgl1-mesa-dev
 libgles2-mesa-dev
 libglib2.0-dev (>= 2.32)
@@ -34,8 +42,8 @@
 libgme-dev
 libgnutls28-dev (>= 2.11.3)
 libgsm1-dev
-libgstreamer-plugins-base@GST_ABI@-dev (>= 1.4.0)
-libgtk2.0-dev (>= 2.14.0)
+libgstreamer-plugins-base@GST_ABI@-dev (>= 1.5.91)
+libgtk-3-dev (>= 3.15.0)
 libiptcdata0-dev (>= 1.0.2)
 libjasper-dev
 libkate-dev (>= 0.1.7)
@@ -47,7 +55,7 @@
 libmpg123-dev (>= 1.13)
 libofa0-dev (>= 0.9.3)
 libopenal-dev (>= 1:1.14)
-libopencv-dev (>= 2.0.0)
+libopencv-dev (>= 2.3.0)
 libopenexr-dev
 libopenjpeg-dev
 libopus-dev (>= 0.9.4)
@@ -67,7 +75,8 @@
 libwebp-dev (>= 0.2.1)
 libwildmidi-dev (>= 0.2.3)
 libx11-dev
-libxml2-dev (>= 2.4)
+libx265-dev
+libxml2-dev (>= 2.8)
 libxvidcore-dev
 libzbar-dev (>= 0.9)
 libzvbi-dev
diff --git a/debian/build-deps.in b/debian/build-deps.in
index ce8a5c0..becbe2b 100644
--- a/debian/build-deps.in
+++ b/debian/build-deps.in
@@ -1,10 +1,10 @@
 @GST_LIB_DEV_DEP@
 @GST_EXTRA_BUILD_DEPENDS@
-libgstreamer-plugins-base@GST_ABI@-dev (>= 1.4.0)
+libgstreamer-plugins-base@GST_ABI@-dev (>= 1.5.91)
 autotools-dev
 dh-autoreconf
-automake (>= 1.11)
-autoconf (>= 2.62)
+automake (>= 1.14)
+autoconf (>= 2.69)
 libtool (>= 2.2.6)
 autopoint (>= 0.17)
 cdbs (>= 0.4.93)
@@ -20,7 +20,7 @@
 libmms-dev (>= 0.4)
 libmpcdec-dev
 libsoundtouch-dev (>= 1.5.0)
-libgtk2.0-dev (>= 2.14.0)
+libgtk-3-dev (>= 3.15.0)
 ladspa-sdk
 libsndfile1-dev (>= 1.0.16)
 libfaad-dev
@@ -29,7 +29,7 @@
 libexempi-dev
 libiptcdata0-dev (>= 1.0.2)
 libwildmidi-dev (>= 0.2.3)
-gstreamer@GST_ABI@-plugins-base (>= 1.4.0)
+gstreamer@GST_ABI@-plugins-base (>= 1.5.91)
 libofa0-dev (>= 0.9.3)
 libdvdnav-dev (>= 4.1.2) [!hurd-any]
 libssl-dev
@@ -50,7 +50,7 @@
 libzbar-dev (>= 0.9)
 librtmp-dev
 libgnutls28-dev (>= 2.11.3)
-libcurl4-gnutls-dev (>= 7.21.0)
+libcurl4-gnutls-dev (>= 7.35.0)
 libxvidcore-dev
 libvo-aacenc-dev
 libvo-amrwbenc-dev
@@ -63,13 +63,22 @@
 libegl1-mesa-dev
 libgles2-mesa-dev
 libglu1-mesa-dev
-libxml2-dev (>= 2.4)
+libxml2-dev (>= 2.8)
 libfluidsynth-dev (>= 1.0)
 libsrtp0-dev
-libopencv-dev (>= 2.0.0)
 libopenjpeg-dev
 libchromaprint-dev
 libwebp-dev (>= 0.2.1)
 libmjpegtools-dev
 libopenexr-dev
 nettle-dev
+libbs2b-dev
+libde265-dev
+libx265-dev
+libopencv-dev (>= 2.3.0)
+libgirepository1.0-dev (>= 0.9.12-4~)
+gobject-introspection (>= 0.9.12-4~)
+gir1.2-glib-2.0
+gir1.2-freedesktop
+gir1.2-gstreamer-1.0
+gir1.2-gst-plugins-base-1.0
diff --git a/debian/changelog b/debian/changelog
index 9ccc37a..980dbf3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,51 @@
-gst-plugins-bad1.0 (1.4.5-3) unstable; urgency=medium
+gst-plugins-bad1.0 (1.5.91-1) experimental; urgency=medium
 
-  * debian/patches/03_fix-faad2-version-check.patch:
-    + Fix faad2 version check, which caused wrong function prototypes to be
-      used and as a result caused stack corruption (Closes: #797227, #788708).
+  * New upstream release candidate.
 
- -- Sebastian Dröge <slomo@debian.org>  Fri, 04 Sep 2015 16:58:00 +0300
+ -- Sebastian Dröge <slomo@debian.org>  Fri, 18 Sep 2015 19:39:16 +0200
 
-gst-plugins-bad1.0 (1.4.5-2) unstable; urgency=medium
+gst-plugins-bad1.0 (1.5.90-1) experimental; urgency=medium
 
-  * Upload to unstable.
+  * New upstream release candidate.
 
- -- Sebastian Dröge <slomo@debian.org>  Wed, 13 May 2015 12:27:42 +0300
+ -- Sebastian Dröge <slomo@debian.org>  Wed, 19 Aug 2015 13:35:43 +0300
+
+gst-plugins-bad1.0 (1.5.2-1) experimental; urgency=medium
+
+  * New unstable upstream release.
+
+ -- Sebastian Dröge <slomo@debian.org>  Wed, 24 Jun 2015 23:29:59 +0200
+
+gst-plugins-bad1.0 (1.5.1-1) experimental; urgency=medium
+
+  * New unstable upstream release.
+
+ -- Sebastian Dröge <slomo@debian.org>  Sun, 07 Jun 2015 11:03:58 +0200
+
+gst-plugins-bad1.0 (1.5.0.1+git20150513-1) experimental; urgency=medium
+
+  * New upstream GIT snapshot.
+
+ -- Sebastian Dröge <slomo@debian.org>  Wed, 13 May 2015 15:48:32 +0300
+
+gst-plugins-bad1.0 (1.5.0.1+git20150316-2) experimental; urgency=medium
+
+  * debian/libgstreamer-plugins-bad-dev.install:
+    + Include platform dependent GL headers.
+  * debian/libgstreamer-plugins-bad-dev.install,
+    debian/rules,
+    debian/build-deps.in:
+    + Include GObject-Introspection files for the libraries.
+
+ -- Sebastian Dröge <slomo@debian.org>  Mon, 23 Mar 2015 10:04:25 +0100
+
+gst-plugins-bad1.0 (1.5.0.1+git20150316-1) experimental; urgency=medium
+
+  * New upstream GIT snapshot:
+    + Add new bs2b, de265, x265, dtls, rtp plugins.
+    + Add ported vcd and bluez5 plugins.
+
+ -- Sebastian Dröge <slomo@debian.org>  Tue, 17 Mar 2015 09:42:54 +0100
 
 gst-plugins-bad1.0 (1.4.5-1) experimental; urgency=medium
 
diff --git a/debian/control b/debian/control
index 12a19c0..a5dc321 100644
--- a/debian/control
+++ b/debian/control
@@ -4,8 +4,8 @@
 Maintainer: Maintainers of GStreamer packages <pkg-gstreamer-maintainers@lists.alioth.debian.org>
 Uploaders: Sebastian Dröge <slomo@debian.org>,
            Sjoerd Simons <sjoerd@debian.org>
-Build-Depends: autoconf (>= 2.62),
-               automake (>= 1.11),
+Build-Depends: autoconf (>= 2.69),
+               automake (>= 1.14),
                autopoint (>= 0.17),
                autotools-dev,
                cdbs (>= 0.4.93),
@@ -13,25 +13,33 @@
                dh-autoreconf,
                dpkg-dev (>= 1.15.1),
                flite-dev,
+               gir1.2-freedesktop,
+               gir1.2-glib-2.0,
+               gir1.2-gst-plugins-base-1.0,
+               gir1.2-gstreamer-1.0,
+               gobject-introspection (>= 0.9.12-4~),
                libasound2-dev (>= 0.9.1) [linux-any],
                libcdaudio-dev [linux-any],
                libdc1394-22-dev (>= 2.0.0) [linux-any],
                libgudev-1.0-dev (>= 143) [linux-any],
                libusb-1.0-0-dev [linux-any],
+               libbluetooth-dev (>= 5) [linux-any],
                libsbc-dev (>= 1.1) [linux-any],
                libwayland-dev (>= 1.0) [linux-any],
-               libgstreamer1.0-dev (>= 1.4.0),
+               libgstreamer1.0-dev (>= 1.5.91),
                gstreamer1.0-doc,
-               gstreamer1.0-plugins-base (>= 1.4.0),
+               gstreamer1.0-plugins-base (>= 1.5.91),
                gstreamer1.0-plugins-base-doc,
                gtk-doc-tools (>= 1.12),
                ladspa-sdk,
                libass-dev (>= 0.9.4),
+               libbs2b-dev,
                libbz2-dev,
                libcairo2-dev,
                libchromaprint-dev,
-               libcurl4-gnutls-dev (>= 7.21.0),
+               libcurl4-gnutls-dev (>= 7.35.0),
                libdca-dev,
+               libde265-dev,
                libdirectfb-dev (>= 0.9.25),
                libdvdnav-dev (>= 4.1.2) [!hurd-any],
                libegl1-mesa-dev,
@@ -39,6 +47,7 @@
                libexif-dev (>= 0.6.16),
                libfaad-dev,
                libfluidsynth-dev (>= 1.0),
+               libgirepository1.0-dev (>= 0.9.12-4~),
                libgl1-mesa-dev,
                libgles2-mesa-dev,
                libglib2.0-dev (>= 2.32),
@@ -46,8 +55,8 @@
                libgme-dev,
                libgnutls28-dev (>= 2.11.3),
                libgsm1-dev,
-               libgstreamer-plugins-base1.0-dev (>= 1.4.0),
-               libgtk2.0-dev (>= 2.14.0),
+               libgstreamer-plugins-base1.0-dev (>= 1.5.91),
+               libgtk-3-dev (>= 3.15.0),
                libiptcdata0-dev (>= 1.0.2),
                libjasper-dev,
                libkate-dev (>= 0.1.7),
@@ -59,7 +68,7 @@
                libmpg123-dev (>= 1.13),
                libofa0-dev (>= 0.9.3),
                libopenal-dev (>= 1:1.14),
-               libopencv-dev (>= 2.0.0),
+               libopencv-dev (>= 2.3.0),
                libopenexr-dev,
                libopenjpeg-dev,
                libopus-dev (>= 0.9.4),
@@ -79,7 +88,8 @@
                libwebp-dev (>= 0.2.1),
                libwildmidi-dev (>= 0.2.3),
                libx11-dev,
-               libxml2-dev (>= 2.4),
+               libx265-dev,
+               libxml2-dev (>= 2.8),
                libxvidcore-dev,
                libzbar-dev (>= 0.9),
                libzvbi-dev,
@@ -193,7 +203,10 @@
 Section: libdevel
 Priority: extra
 Depends: ${misc:Depends},
-	 libgstreamer-plugins-bad1.0-0 (= ${binary:Version}),
+         libgstreamer-plugins-bad1.0-0 (= ${binary:Version}),
+         libgstreamer1.0-dev,
+         libgstreamer-plugins-base1.0-dev,
+         gir1.2-gst-plugins-bad-1.0 (= ${binary:Version})
 Description: GStreamer development files for libraries from the "bad" set
  GStreamer is a streaming media framework, based on graphs of filters
  which operate on media data.  Applications using this library can do
@@ -209,3 +222,28 @@
  .
  This package contains development files for GStreamer libraries from the
  "bad" set. The API is not guaranteed to be stable.
+
+Package: gir1.2-gst-plugins-bad-1.0
+Section: introspection
+Architecture: any
+Depends: ${gir:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends},
+         ${gir:Depends}
+Description: Description: GObject introspection data for the GStreamer libraries from the "bad" set
+ GStreamer is a streaming media framework, based on graphs of filters
+ which operate on media data.  Applications using this library can do
+ anything from real-time sound processing to playing videos, and just
+ about anything else media-related.  Its plugin-based architecture means
+ that new data types or processing capabilities can be added simply by
+ installing new plug-ins.
+ .
+ GStreamer Bad Plug-ins is a set of plug-ins that aren't up to par compared
+ to the rest. They might be close to being good quality, but they're missing
+ something - be it a good code review, some documentation, a set of tests, a
+ real live maintainer, or some actual wide use.
+ .
+ This package contains introspection data for the GStreamer libraries from
+ the "bad" set. It can be used by packages using the GIRepository format to
+ generate dynamic bindings.
+
diff --git a/debian/control.in b/debian/control.in
index e5146f2..f139d73 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -113,7 +113,10 @@
 Section: libdevel
 Priority: extra
 Depends: ${misc:Depends},
-	 libgstreamer-plugins-bad@GST_DEB_ABI@ (= ${binary:Version}),
+         libgstreamer-plugins-bad@GST_DEB_ABI@ (= ${binary:Version}),
+         libgstreamer@GST_ABI@-dev,
+         libgstreamer-plugins-base@GST_ABI@-dev,
+         gir1.2-gst-plugins-bad-@GST_ABI@ (= ${binary:Version})
 Description: GStreamer development files for libraries from the "bad" set
  GStreamer is a streaming media framework, based on graphs of filters
  which operate on media data.  Applications using this library can do
@@ -129,3 +132,28 @@
  .
  This package contains development files for GStreamer libraries from the
  "bad" set. The API is not guaranteed to be stable.
+
+Package: gir1.2-gst-plugins-bad-@GST_ABI@
+Section: introspection
+Architecture: any
+Depends: ${gir:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends},
+         ${gir:Depends}
+Description: Description: GObject introspection data for the GStreamer libraries from the "bad" set
+ GStreamer is a streaming media framework, based on graphs of filters
+ which operate on media data.  Applications using this library can do
+ anything from real-time sound processing to playing videos, and just
+ about anything else media-related.  Its plugin-based architecture means
+ that new data types or processing capabilities can be added simply by
+ installing new plug-ins.
+ .
+ GStreamer Bad Plug-ins is a set of plug-ins that aren't up to par compared
+ to the rest. They might be close to being good quality, but they're missing
+ something - be it a good code review, some documentation, a set of tests, a
+ real live maintainer, or some actual wide use.
+ .
+ This package contains introspection data for the GStreamer libraries from
+ the "bad" set. It can be used by packages using the GIRepository format to
+ generate dynamic bindings.
+
diff --git a/debian/gir1.2-gst-plugins-bad.install b/debian/gir1.2-gst-plugins-bad.install
new file mode 100644
index 0000000..9803e33
--- /dev/null
+++ b/debian/gir1.2-gst-plugins-bad.install
@@ -0,0 +1 @@
+debian/tmp/usr/lib/*/girepository-* usr/lib
diff --git a/debian/gstreamer-plugins-bad.install b/debian/gstreamer-plugins-bad.install
index 93f5de5..e84df04 100644
--- a/debian/gstreamer-plugins-bad.install
+++ b/debian/gstreamer-plugins-bad.install
@@ -9,6 +9,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiovisualizers.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstautoconvert.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstbayer.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstbs2b.so
 @bluez@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstbz2.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcamerabin2.so
@@ -19,6 +20,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdashdemux.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdataurisrc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdebugutilsbad.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdtls.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdtsdec.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdvbsuboverlay.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdvdspu.so
@@ -35,6 +37,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgeometrictransform.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgme.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgsm.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstgtksink.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstid3tag.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstinter.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstinterlace.so
@@ -44,6 +47,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstjpegformat.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstjp2kdecimator.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstladspa.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstlibde265.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstliveadder.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmidi.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmimic.so
@@ -71,6 +75,8 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrfbsrc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrsvg.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtmp.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtponvif.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrtpbad.so
 @sbc@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstschro.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsdpelem.so
@@ -94,6 +100,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvoamrwbenc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstwebp.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstwildmidi.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstx265.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsty4mdec.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstyadif.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstzbar.so
@@ -105,3 +112,4 @@
 @fbdev@
 @uvch264@
 @waylandsink@
+@vcd@
diff --git a/debian/libgstreamer-plugins-bad-dev.install b/debian/libgstreamer-plugins-bad-dev.install
index ac87bac..0f20b1e 100644
--- a/debian/libgstreamer-plugins-bad-dev.install
+++ b/debian/libgstreamer-plugins-bad-dev.install
@@ -1,3 +1,5 @@
 debian/tmp/usr/include
+debian/tmp/usr/lib/*/gstreamer-1.0/include
 debian/tmp/usr/lib/*/pkgconfig
 debian/tmp/usr/lib/*/*.so
+debian/tmp/usr/share/gir-*
diff --git a/debian/libgstreamer-plugins-bad.install b/debian/libgstreamer-plugins-bad.install
index 3b10713..8844967 100644
--- a/debian/libgstreamer-plugins-bad.install
+++ b/debian/libgstreamer-plugins-bad.install
@@ -1,3 +1,4 @@
+debian/tmp/usr/lib/*/libgstadaptivedemux-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstphotography-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstbadbase-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstbadvideo-@GST_ABI@.so.*
diff --git a/debian/patches/03_fix-faad2-version-check.patch b/debian/patches/03_fix-faad2-version-check.patch
deleted file mode 100644
index ada775f..0000000
--- a/debian/patches/03_fix-faad2-version-check.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1f738ca5b8711ca5532a326cd646312e60484863 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Wed, 13 May 2015 16:23:26 +0200
-Subject: [PATCH] fix faad2 version check
-
-On fedora 22, the output of cpp inserts extra debug comments, which
-makes our regexp for the faad2 version check fail. This in turn causes
-it to compile with the wrong arguments passed which then causes stack
-corruption and crashes.
-
-Fix this by only checking for the version (which should be by itself on
-a single line). This is potentially less safe, it might be possible that
-a similar string would appear in a later version in the header file.
-
-Fixes https://bugzilla.gnome.org/show_bug.cgi?id=748571
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f5ce28c..d295253 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2008,9 +2008,9 @@ AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
-       AC_MSG_CHECKING([Checking FAAD2 version in $faad_hdr])
-       for minor in 10 9 8 7 6 5 0; do
-         if test x$faad2_minor_version = "x"; then
--          AC_EGREP_CPP([GST_CHECK_FAAD_VERSION \"2\.$minor\"], [
-+          AC_EGREP_CPP([\"2\.$minor\"$], [
-               #include <$faad_hdr>
--              GST_CHECK_FAAD_VERSION FAAD2_VERSION
-+              FAAD2_VERSION
-             ], [
-               faad2_minor_version=$minor
-             ])
--- 
-2.5.1
-
diff --git a/debian/patches/series b/debian/patches/series
index 570d151..6d98219 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 01_fix-modplug-linking.patch
 02_opencv-linking.patch
-03_fix-faad2-version-check.patch
diff --git a/debian/rules b/debian/rules
index 97dcb56..3d44146 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,7 +45,7 @@
 gst_lib=libgstreamer$(gst_abi)-0
 gst_lib_dev=libgstreamer$(gst_abi)-dev
 # what gstreamer version is needed
-gst_lib_dev_dep=$(gst_lib_dev) (>= 1.4.0)
+gst_lib_dev_dep=$(gst_lib_dev) (>= 1.5.91)
 
 gst_pkgname=gstreamer$(gst_abi)
 gst_deb_abi=$(gst_abi)-0
@@ -56,7 +56,7 @@
 gst_extra_build_depends += , libdc1394-22-dev (>= 2.0.0) [linux-any]
 gst_extra_build_depends += , libgudev-1.0-dev (>= 143) [linux-any]
 gst_extra_build_depends += , libusb-1.0-0-dev [linux-any]
-#gst_extra_build_depends += , libbluetooth-dev (<< 5) [linux-any]
+gst_extra_build_depends += , libbluetooth-dev (>= 5) [linux-any]
 gst_extra_build_depends += , libsbc-dev (>= 1.1) [linux-any]
 gst_extra_build_depends += , libwayland-dev (>= 1.0) [linux-any]
 
@@ -77,11 +77,6 @@
 #debug package
 DEB_DH_STRIP_ARGS := --dbg-package=$(gst_pkgname)-plugins-bad-dbg
 
-# enable the real plugin on x86
-ifeq ($(DEB_HOST_ARCH_CPU), i386)
-real = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstreal.so
-endif
-
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 dvb = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstdvb.so
 fbdev = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstfbdevsink.so
@@ -91,7 +86,7 @@
 decklink = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstdecklink.so
 linsys = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstlinsys.so
 uvch264 = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstuvch264.so
-#bluez = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstbluez.so
+bluez = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstbluez.so
 sbc = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstsbc.so
 waylandsink = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstwaylandsink.so
 wayland = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgstwayland-$(gst_abi).so.*
@@ -127,7 +122,6 @@
 	for p in $(PLUGINS); do \
 		rm -f debian/$(gst_pkgname)-$$p.install; \
 		sed \
-			-e 's,@real@,$(real),g' \
 			-e 's,@dvb@,$(dvb),g' \
 			-e 's,@decklink@,$(decklink),g' \
 			-e 's,@linsys@,$(linsys),g' \
@@ -155,6 +149,8 @@
 			> debian/libgstreamer-plugins-bad$(gst_deb_abi).install
 	sed 's/@GST_ABI@/$(gst_abi)/g' debian/libgstreamer-plugins-bad-dev.install \
 			> debian/libgstreamer-plugins-bad$(gst_abi)-dev.install
+	cp debian/gir1.2-gst-plugins-bad.install \
+			debian/gir1.2-gst-plugins-bad-$(gst_abi).install
 
 maint: debian/control
 
diff --git a/depcomp b/depcomp
index 4ebd5b3..fc98710 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/docs/Makefile.in b/docs/Makefile.in
index ba6c2a6..fa71c32 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(srcdir)/version.entities.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 \
@@ -88,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -101,7 +110,6 @@
 	$(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 \
@@ -118,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = version.entities
@@ -176,6 +185,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.entities.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -218,8 +228,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -244,8 +256,6 @@
 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@
@@ -258,7 +268,6 @@
 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@
@@ -266,6 +275,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -292,11 +303,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -315,8 +329,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -375,10 +387,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -395,7 +411,6 @@
 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@
@@ -404,7 +419,6 @@
 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@
@@ -417,7 +431,6 @@
 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@
@@ -431,6 +444,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -442,6 +456,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -480,6 +496,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -515,10 +532,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -544,6 +565,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -551,7 +575,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -580,6 +611,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -590,6 +622,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -620,17 +653,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -647,6 +679,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -685,6 +718,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -722,7 +756,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu docs/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1019,6 +1052,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 upload:
 	@if test "x$(SUBDIRS)" != x; then for a in $(SUBDIRS); do cd $$a; make upload; cd ..; done; fi
diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am
index 5c6c919..f360db9 100644
--- a/docs/libs/Makefile.am
+++ b/docs/libs/Makefile.am
@@ -52,17 +52,11 @@
 GTKDOC_CFLAGS = -DGST_USE_UNSTABLE_API $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS)
 GTKDOC_LIBS = \
 	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/insertbin/libgstinsertbin-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-@GST_API_VERSION@.la \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/insertbin/libgstinsertbin-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-@GST_API_VERSION@.la \
   $(GST_BASE_LIBS)
 
-GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC)
-
 # If you need to override some of the declarations, place them in this file
 # and uncomment this line.
 DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
diff --git a/docs/libs/Makefile.in b/docs/libs/Makefile.in
index 7b8cb8d..5c79e24 100644
--- a/docs/libs/Makefile.in
+++ b/docs/libs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,17 @@
 ###########################################################################
 # thomas: except of course that we did
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -97,9 +107,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/upload-doc.mak \
-	$(top_srcdir)/common/gtk-doc.mak $(srcdir)/Makefile.in \
-	$(srcdir)/Makefile.am
 subdir = docs/libs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -108,6 +115,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -121,7 +129,6 @@
 	$(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 \
@@ -138,6 +145,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -162,6 +170,9 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gtk-doc.mak \
+	$(top_srcdir)/common/upload-doc.mak
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -179,8 +190,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -205,8 +218,6 @@
 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@
@@ -219,7 +230,6 @@
 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@
@@ -227,6 +237,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -253,11 +265,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -276,8 +291,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -336,10 +349,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -356,7 +373,6 @@
 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@
@@ -365,7 +381,6 @@
 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@
@@ -378,7 +393,6 @@
 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@
@@ -392,6 +406,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -403,6 +418,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -441,6 +458,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -476,10 +494,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -505,6 +527,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -512,7 +537,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -541,6 +573,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -551,6 +584,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -581,17 +615,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -608,6 +641,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -646,6 +680,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -716,22 +751,22 @@
 GTKDOC_CFLAGS = -DGST_USE_UNSTABLE_API $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS)
 GTKDOC_LIBS = \
 	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/insertbin/libgstinsertbin-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
-	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-@GST_API_VERSION@.la \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/insertbin/libgstinsertbin-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-@GST_API_VERSION@.la \
   $(GST_BASE_LIBS)
 
-GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC)
-GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC)
 
 # If you need to override some of the declarations, place them in this file
 # and uncomment this line.
 DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = 
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute
 
-# thomas: copied from glib-2
 # We set GPATH here; this gives us semantics for GNU make
 # which are more like other make's VPATH, when it comes to
 # whether a source that is a target of one rule is then
@@ -787,7 +822,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/libs/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu docs/libs/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -796,7 +830,7 @@
 	    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/upload-doc.mak $(top_srcdir)/common/gtk-doc.mak:
+$(top_srcdir)/common/upload-doc.mak $(top_srcdir)/common/gtk-doc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -968,6 +1002,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
 	uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 html: html-build.stamp
 
 upload: $(FORMATS)
@@ -1050,15 +1086,22 @@
 @ENABLE_GTK_DOC_TRUE@		--ignore-headers="$(IGNORE_HFILES)"
 @ENABLE_GTK_DOC_TRUE@	@if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then	\
 @ENABLE_GTK_DOC_TRUE@	    echo "  DOC   Introspecting gobjects"; \
+@ENABLE_GTK_DOC_TRUE@	    scanobj_options=""; \
+@ENABLE_GTK_DOC_TRUE@	    gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+@ENABLE_GTK_DOC_TRUE@	    if test "$$?" = "0"; then \
+@ENABLE_GTK_DOC_TRUE@	        if test "x$(V)" = "x1"; then \
+@ENABLE_GTK_DOC_TRUE@	            scanobj_options="--verbose"; \
+@ENABLE_GTK_DOC_TRUE@	        fi; \
+@ENABLE_GTK_DOC_TRUE@	    fi; \
 @ENABLE_GTK_DOC_TRUE@	    GST_PLUGIN_SYSTEM_PATH_1_0=`cd $(top_builddir) && pwd`		\
 @ENABLE_GTK_DOC_TRUE@	    GST_PLUGIN_PATH_1_0=						\
 @ENABLE_GTK_DOC_TRUE@	    GST_REGISTRY_1_0=doc-registry.xml				\
 @ENABLE_GTK_DOC_TRUE@	    $(GTKDOC_EXTRA_ENVIRONMENT)					\
-@ENABLE_GTK_DOC_TRUE@	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)"				\
+@ENABLE_GTK_DOC_TRUE@	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)"	\
 @ENABLE_GTK_DOC_TRUE@	    CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)"				\
 @ENABLE_GTK_DOC_TRUE@	    LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)"				\
 @ENABLE_GTK_DOC_TRUE@	    gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)"	\
-@ENABLE_GTK_DOC_TRUE@	        --module=$(DOC_MODULE) ;				\
+@ENABLE_GTK_DOC_TRUE@	        $$scanobj_options --module=$(DOC_MODULE) ;				\
 @ENABLE_GTK_DOC_TRUE@	else								\
 @ENABLE_GTK_DOC_TRUE@	    for i in $(SCANOBJ_FILES) ; do				\
 @ENABLE_GTK_DOC_TRUE@	       test -f $$i || touch $$i ;				\
diff --git a/docs/libs/gst-plugins-bad-libs-docs.sgml b/docs/libs/gst-plugins-bad-libs-docs.sgml
index 8c11026..76651b7 100644
--- a/docs/libs/gst-plugins-bad-libs-docs.sgml
+++ b/docs/libs/gst-plugins-bad-libs-docs.sgml
@@ -29,6 +29,7 @@
         <filename>-lgstcodeparsers-&GST_API_VERSION;</filename> to the library flags.
       </para>
       <xi:include href="xml/gsth264parser.xml" />
+      <xi:include href="xml/gstjpegparser.xml" />
       <xi:include href="xml/gstmpegvideoparser.xml" />
       <xi:include href="xml/gstmpeg4parser.xml" />
       <xi:include href="xml/gstvc1parser.xml" />
@@ -77,15 +78,18 @@
       <xi:include href="xml/gstglcontext.xml"/>
       <xi:include href="xml/gstglcontextcocoa.xml"/>
       <xi:include href="xml/gstglcontextegl.xml"/>
+      <xi:include href="xml/gstglcontexteagl.xml"/>
       <xi:include href="xml/gstglcontextglx.xml"/>
       <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/gstglbasefilter.xml"/>
       <xi:include href="xml/gstglfilter.xml"/>
       <xi:include href="xml/gstglframebuffer.xml"/>
       <xi:include href="xml/gstglmemory.xml"/>
       <xi:include href="xml/gstglshader.xml"/>
+      <xi:include href="xml/gstglsyncmeta.xml"/>
       <xi:include href="xml/gstglupload.xml"/>
       <xi:include href="xml/gstgluploadmeta.xml"/>
       <xi:include href="xml/gstglutils.xml"/>
@@ -97,6 +101,11 @@
       <xi:include href="xml/gstglwindowwin32.xml"/>
       <xi:include href="xml/gstglwindowx11.xml"/>
     </chapter>
+
+    <chapter>
+      <title>Interfaces</title>
+      <xi:include href="xml/gstphotography.xml" />
+    </chapter>
   </part>
 
   <part id="gstreamer-libs-hierarchy">
diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt
index 632d9d6..3b7cc05 100644
--- a/docs/libs/gst-plugins-bad-libs-sections.txt
+++ b/docs/libs/gst-plugins-bad-libs-sections.txt
@@ -51,6 +51,42 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstjpegparser</FILE>
+<TITLE>jpegparser</TITLE>
+<INCLUDE>gst/codecparsers/gstjpegparser.h</INCLUDE>
+GST_JPEG_MAX_FRAME_COMPONENTS
+GST_JPEG_MAX_SCAN_COMPONENTS
+GST_JPEG_MAX_QUANT_ELEMENTS
+GstJpegMarker;
+GST_JPEG_MARKER_SOF_MIN
+GST_JPEG_MARKER_SOF_MAX
+GST_JPEG_MARKER_APP_MIN
+GST_JPEG_MARKER_APP_MAX
+GST_JPEG_MARKER_RST_MIN
+GST_JPEG_MARKER_RST_MAX
+GstJpegEntropyCodingMode
+GstJpegProfile
+GstJpegSegment
+gst_jpeg_parse
+GstJpegFrameHdr
+GstJpegFrameComponent
+gst_jpeg_segment_parse_frame_header
+GstJpegScanHdr
+GstJpegScanComponent
+gst_jpeg_segment_parse_scan_header
+GstJpegHuffmanTables
+GstJpegHuffmanTable
+gst_jpeg_segment_parse_huffman_table
+GstJpegQuantTable
+gst_jpeg_segment_parse_quantization_table
+gst_jpeg_segment_parse_restart_interval
+gst_jpeg_get_default_quantization_tables
+gst_jpeg_get_default_huffman_tables
+<SUBSECTION Standard>
+<SUBSECTION Private>
+</SECTION>
+
+<SECTION>
 <FILE>gstvc1parser</FILE>
 <TITLE>vc1parser</TITLE>
 <INCLUDE>gst/codecparsers/gstvc1parser.h</INCLUDE>
@@ -529,6 +565,20 @@
 
 <SECTION>
 <FILE>gstphotography</FILE>
+<TITLE>GstPhotography</TITLE>
+GstPhotography
+GstPhotographyNoiseReduction
+GstPhotographyWhiteBalanceMode
+GstPhotographyColorToneMode
+GstPhotographySceneMode
+GstPhotographyFlashMode
+GstPhotographyFlickerReductionMode
+GstPhotographyFocusMode
+GstPhotographyFocusStatus
+GstPhotographyCaps
+GstPhotographyShakeRisk
+GstPhotographySettings
+GstPhotographyCapturePrepared
 GST_PHOTOGRAPHY_AUTOFOCUS_DONE
 GST_PHOTOGRAPHY_SHAKE_RISK
 GST_PHOTOGRAPHY_PROP_WB_MODE
@@ -548,76 +598,35 @@
 GST_PHOTOGRAPHY_PROP_FLICKER_MODE
 GST_PHOTOGRAPHY_PROP_FOCUS_MODE
 GST_PHOTOGRAPHY_PROP_ZOOM
-GstPhotographyNoiseReduction
-GstWhiteBalanceMode
-GstColourToneMode
-GstSceneMode
-GstFlashMode
-GstFocusStatus
-GstPhotoCaps
-GstPhotoShakeRisk
-GstFlickerReductionMode
-GstFocusMode
-GstPhotoCapturePrepared
-get_ev_compensation
-get_iso_speed
-get_aperture
-get_exposure
-get_white_balance_mode
-get_colour_tone_mode
-get_scene_mode
-get_flash_mode
-get_zoom
-get_flicker_mode
-get_focus_mode
-set_ev_compensation
-set_iso_speed
-set_aperture
-set_exposure
-set_white_balance_mode
-set_colour_tone_mode
-set_scene_mode
-set_flash_mode
-set_zoom
-set_flicker_mode
-set_focus_mode
-get_capabilities
-prepare_for_capture
-set_autofocus
-set_config
-get_config
-get_noise_reduction
-set_noise_reduction
 gst_photography_get_ev_compensation
 gst_photography_get_iso_speed
 gst_photography_get_aperture
 gst_photography_get_exposure
 gst_photography_get_white_balance_mode
-gst_photography_get_colour_tone_mode
+gst_photography_get_color_tone_mode
 gst_photography_get_scene_mode
 gst_photography_get_flash_mode
-gst_photography_get_noise_reduction
-gst_photography_get_zoom
 gst_photography_get_flicker_mode
 gst_photography_get_focus_mode
+gst_photography_get_noise_reduction
+gst_photography_get_zoom
 gst_photography_set_ev_compensation
 gst_photography_set_iso_speed
 gst_photography_set_aperture
 gst_photography_set_exposure
 gst_photography_set_white_balance_mode
-gst_photography_set_colour_tone_mode
+gst_photography_set_color_tone_mode
 gst_photography_set_scene_mode
 gst_photography_set_flash_mode
-gst_photography_set_noise_reduction
-gst_photography_set_zoom
 gst_photography_set_flicker_mode
 gst_photography_set_focus_mode
+gst_photography_set_noise_reduction
+gst_photography_set_zoom
 gst_photography_get_capabilities
 gst_photography_prepare_for_capture
 gst_photography_set_autofocus
 gst_photography_set_config
 gst_photography_get_config
-GstPhotography
 <SUBSECTION Standard>
 GST_PHOTOGRAPHY
 GST_IS_PHOTOGRAPHY
@@ -798,11 +807,13 @@
 GstGLColorConvert
 GstGLColorConvertClass
 gst_gl_color_convert_new
-gst_gl_color_convert_set_format
+gst_gl_color_convert_set_caps
+gst_gl_color_convert_transform_caps
 gst_gl_color_convert_perform
 <SUBSECTION Standard>
 GstGLColorConvertPrivate
 GST_GL_COLOR_CONVERT
+GST_GL_COLOR_CONVERT_CAST
 GST_GL_COLOR_CONVERT_CLASS
 gst_gl_color_convert_get_type
 GST_IS_GL_COLOR_CONVERT
@@ -821,6 +832,7 @@
 gst_gl_context_new
 gst_gl_context_new_wrapped
 gst_gl_context_create
+gst_gl_context_destroy
 gst_gl_context_activate
 gst_gl_context_default_get_proc_address
 gst_gl_context_get_proc_address
@@ -831,11 +843,15 @@
 gst_gl_context_get_gl_api
 gst_gl_context_get_gl_context
 gst_gl_context_get_gl_platform
+gst_gl_context_get_current_gl_context
+gst_gl_context_get_current_gl_api
 gst_gl_context_get_thread
 gst_gl_context_can_share
 gst_gl_context_check_feature
 gst_gl_context_check_gl_version
 gst_gl_context_get_gl_version
+gst_gl_context_fill_info
+gst_gl_context_get_current
 <SUBSECTION Standard>
 GST_GL_CONTEXT
 GST_GL_IS_CONTEXT
@@ -853,6 +869,8 @@
 <TITLE>GstGLContextCocoa</TITLE>
 GstGLContextCocoa
 gst_gl_context_cocoa_new
+gst_gl_context_cocoa_get_current_context
+gst_gl_context_cocoa_get_pixel_format
 <SUBSECTION Standard>
 GST_GL_CONTEXT_COCOA
 GST_GL_IS_CONTEXT_COCOA
@@ -863,6 +881,8 @@
 GST_GL_CONTEXT_COCOA_CAST
 GstGLContextCocoaPrivate
 gst_gl_context_cocoa_get_type
+<SUBSECTION Private>
+gst_gl_context_cocoa_dump_pixel_format
 </SECTION>
 
 <SECTION>
@@ -870,6 +890,8 @@
 <TITLE>GstGLContextEGL</TITLE>
 GstGLContextEGL
 gst_gl_context_egl_new
+gst_gl_context_egl_get_current_context
+gst_gl_context_egl_get_proc_address
 <SUBSECTION Standard>
 GST_GL_CONTEXT_EGL
 GST_GL_IS_CONTEXT_EGL
@@ -887,6 +909,8 @@
 <TITLE>GstGLContextGLX</TITLE>
 GstGLContextGLX
 gst_gl_context_glx_new
+gst_gl_context_glx_get_current_context
+gst_gl_context_glx_get_proc_address
 <SUBSECTION Standard>
 GST_GL_CONTEXT_GLX
 GST_GL_IS_CONTEXT_GLX
@@ -904,6 +928,8 @@
 <TITLE>GstGLContextWGL</TITLE>
 GstGLContextWGL
 gst_gl_context_wgl_new
+gst_gl_context_wgl_get_current_context
+gst_gl_context_wgl_get_proc_address
 <SUBSECTION Standard>
 GST_GL_CONTEXT_WGL
 GST_GL_IS_CONTEXT_WGL
@@ -917,6 +943,29 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstglcontexteagl</FILE>
+<TITLE>GstGLContextEagl</TITLE>
+GstGLContextEagl
+gst_gl_context_eagl_new
+gst_gl_context_eagl_get_current_context
+<SUBSECTION Standard>
+GST_GL_CONTEXT_EAGL
+GST_GL_IS_CONTEXT_EAGL
+GST_GL_TYPE_CONTEXT_EAGL
+GST_GL_CONTEXT_EAGL_CLASS
+GST_GL_CONTEXT_EAGL_GET_CLASS
+GST_GL_IS_CONTEXT_EAGL_CLASS
+GST_GL_CONTEXT_EAGL_CAST
+GstGLContextEaglPrivate
+
+<SUBSECTION Private>
+gst_gl_context_eagl_get_type
+gst_gl_context_eagl_prepare_draw
+gst_gl_context_eagl_finish_draw
+gst_gl_context_eagl_resize
+</SECTION>
+
+<SECTION>
 <FILE>gstgldisplay</FILE>
 <TITLE>GstGLDisplay</TITLE>
 GST_GL_DISPLAY_CONTEXT_TYPE
@@ -924,6 +973,11 @@
 GstGLDisplay
 gst_gl_display_new
 gst_gl_display_get_handle_type
+gst_gl_display_filter_gl_api
+gst_gl_display_get_gl_api
+gst_gl_display_add_context
+gst_gl_display_get_gl_context_for_thread
+gst_gl_display_get_handle
 gst_context_get_gl_display
 gst_context_set_gl_display
 <SUBSECTION Standard>
@@ -943,6 +997,7 @@
 GstGLDownload
 gst_gl_download_new
 gst_gl_download_set_format
+gst_gl_download_transform_caps
 gst_gl_download_perform_with_data
 <SUBSECTION Standard>
 GST_GL_DOWNLOAD
@@ -957,6 +1012,22 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstglbasefilter</FILE>
+<TITLE>GstGLBaseFilter</TITLE>
+GstGLBaseFilter
+GstGLBaseFilterClass
+<SUBSECTION Standard>
+GST_GL_BASE_FILTER
+GST_IS_GL_BASE_FILTER
+GST_TYPE_GL_BASE_FILTER
+gst_gl_base_filter_get_type
+GST_GL_BASE_FILTER_CLASS
+GST_IS_GL_FILTER_CLASS
+GST_GL_BASE_FILTER_GET_CLASS
+GstGLBaseFilterPrivate
+</SECTION>
+
+<SECTION>
 <FILE>gstglfilter</FILE>
 <TITLE>GstGLFilter</TITLE>
 GstGLFilter
@@ -983,10 +1054,10 @@
 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_GL_FRAMEBUFFER_CAST
 GST_IS_GL_FRAMEBUFFER
 GST_TYPE_GL_FRAMEBUFFER
 gst_gl_framebuffer_get_type
@@ -999,13 +1070,7 @@
 <FILE>gstglmemory</FILE>
 GstGLAllocator
 GstGLAllocatorClass
-GST_MAP_GL
 GST_GL_MEMORY_ALLOCATOR
-GstGLMemoryFlags
-GST_GL_MEMORY_FLAGS
-GST_GL_MEMORY_FLAG_IS_SET
-GST_GL_MEMORY_FLAG_SET
-GST_GL_MEMORY_FLAG_UNSET
 <TITLE>GstGLMemory</TITLE>
 GstGLMemory
 gst_gl_memory_init
@@ -1059,6 +1124,7 @@
 gst_gl_shader_set_fragment_source
 gst_gl_shader_get_vertex_source
 gst_gl_shader_get_fragment_source
+gst_gl_shader_get_program_handle
 gst_gl_shader_set_active
 gst_gl_shader_is_compiled
 gst_gl_shader_compile
@@ -1108,14 +1174,30 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstglsyncmeta</FILE>
+<TITLE>GstGLSyncMeta</TITLE>
+GstGLSyncMeta
+gst_buffer_add_gl_sync_meta
+gst_buffer_get_gl_sync_meta
+gst_gl_sync_meta_api_get_type
+gst_gl_sync_meta_get_info
+gst_gl_sync_meta_set_sync_point
+gst_gl_sync_meta_wait
+GST_BUFFER_POOL_OPTION_GL_SYNC_META
+<SUBSECTION Standard>
+GST_GL_SYNC_META_API_TYPE
+GST_GL_SYNC_META_INFO
+</SECTION>
+
+<SECTION>
 <FILE>gstglupload</FILE>
 <TITLE>GstGLUpload</TITLE>
 GstGLUpload
 gst_gl_upload_new
-gst_gl_upload_set_format
-gst_gl_upload_get_format
-gst_gl_upload_perform_with_data
-gst_gl_upload_perform_with_gl_texture_upload_meta
+gst_gl_upload_get_caps
+gst_gl_upload_set_caps
+gst_gl_upload_propose_allocation
+gst_gl_upload_transform_caps
 gst_gl_upload_perform_with_buffer
 gst_gl_upload_release_buffer
 <SUBSECTION Standard>
@@ -1158,14 +1240,12 @@
 CRCB
 CDCB
 GstGLDisplayProjection
-gst_gl_ensure_display
 gst_gl_handle_set_context
 gst_gl_handle_context_query
 gst_gl_context_gen_texture
 gst_gl_context_del_texture
 gst_gl_context_gen_fbo
 gst_gl_context_del_fbo
-gst_gl_context_use_fbo
 gst_gl_context_use_fbo_v2
 gst_gl_context_gen_shader
 gst_gl_context_del_shader
@@ -1174,6 +1254,10 @@
 gst_gl_context_get_error
 gst_gl_context_clear_shader
 gst_gl_generate_texture_full
+gst_gl_caps_replace_all_caps_features
+gst_gl_ensure_element_data
+gst_gl_get_plane_data_size
+gst_gl_run_query
 </SECTION>
 
 <SECTION>
@@ -1203,6 +1287,10 @@
 gst_gl_window_set_resize_callback
 gst_gl_window_set_window_handle
 gst_gl_window_get_window_handle
+gst_gl_window_set_preferred_size
+gst_gl_window_show
+gst_gl_window_get_surface_dimensions
+gst_gl_window_handle_events
 <SUBSECTION Standard>
 GST_GL_IS_WINDOW
 GST_GL_IS_WINDOW_CLASS
@@ -1212,6 +1300,11 @@
 GST_GL_WINDOW_GET_CLASS
 gst_gl_window_get_type
 GstGLWindowPrivate
+<SUBSECTION Private>
+gst_gl_window_key_event_cb
+gst_gl_window_mouse_event_cb
+gst_gl_window_send_key_event
+gst_gl_window_send_mouse_event
 </SECTION>
 
 <SECTION>
@@ -1328,6 +1421,7 @@
 gst_aggregator_finish_buffer
 gst_aggregator_set_src_caps
 gst_aggregator_iterate_sinkpads
+gst_aggregator_get_latency
 <SUBSECTION Standard>
 GST_IS_AGGREGATOR
 GST_IS_AGGREGATOR_CLASS
@@ -1345,6 +1439,8 @@
 GstAggregatorPadClass
 gst_aggregator_pad_steal_buffer
 gst_aggregator_pad_get_buffer
+gst_aggregator_pad_drop_buffer
+gst_aggregator_pad_is_eos
 <SUBSECTION Standard>
 GST_IS_AGGREGATOR_PAD
 GST_IS_AGGREGATOR_PAD_CLASS
diff --git a/docs/libs/gst-plugins-bad-libs.types b/docs/libs/gst-plugins-bad-libs.types
index 67ce098..2bf883e 100644
--- a/docs/libs/gst-plugins-bad-libs.types
+++ b/docs/libs/gst-plugins-bad-libs.types
@@ -26,13 +26,17 @@
 gst_insert_bin_get_type
 
 
-gst_gl_upload_get_type
-gst_gl_download_get_type
-gst_gl_color_convert_get_type
-gst_gl_display_get_type
-gst_gl_context_get_type
-gst_gl_filter_get_type
-gst_gl_shader_get_type
-gst_gl_buffer_pool_get_type
 gst_gl_allocator_get_type
+gst_gl_base_filter_get_type
+gst_gl_buffer_pool_get_type
+gst_gl_color_convert_get_type
+gst_gl_context_get_type
+gst_gl_display_get_type
+gst_gl_download_get_type
+gst_gl_filter_get_type
+gst_gl_framebuffer_get_type
+gst_gl_shader_get_type
+gst_gl_upload_get_type
+gst_gl_upload_meta_get_type
 gst_gl_window_get_type
+
diff --git a/docs/libs/html/GstGLBaseFilter.html b/docs/libs/html/GstGLBaseFilter.html
new file mode 100644
index 0000000..8cc430b
--- /dev/null
+++ b/docs/libs/html/GstGLBaseFilter.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GstGLBaseFilter: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">
+<link rel="next" href="GstGLFilter.html" title="GstGLFilter">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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="#GstGLBaseFilter.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#GstGLBaseFilter.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#GstGLBaseFilter.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="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-GstEGLImageMemory.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="GstGLBaseFilter"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="GstGLBaseFilter.top_of_page"></a>GstGLBaseFilter</span></h2>
+<p>GstGLBaseFilter</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.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">
+<a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *</td>
+<td class="property_name"><a class="link" href="GstGLBaseFilter.html#GstGLBaseFilter--context" title="The “context” property">context</a></td>
+<td class="property_flags">Read</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.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="GstGLBaseFilter.html#GstGLBaseFilter-struct" title="GstGLBaseFilter">GstGLBaseFilter</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="GstGLBaseFilter.html#GstGLBaseFilterClass" title="GstGLBaseFilterClass">GstGLBaseFilterClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
+                    <span class="lineart">╰──</span> GstGLBaseFilter
+                        <span class="lineart">╰──</span> <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLBaseFilter-struct"></a><h3>GstGLBaseFilter</h3>
+<pre class="programlisting">typedef struct _GstGLBaseFilter GstGLBaseFilter;</pre>
+<p><a class="link" href="GstGLBaseFilter.html" title="GstGLBaseFilter"><span class="type">GstGLBaseFilter</span></a> is a base class that provides the logic of getting the
+GL context from the pipeline.</p>
+<div class="refsect3">
+<a name="id-1.2.9.14.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="GstGLBaseFilterClass"></a><h3>GstGLBaseFilterClass</h3>
+<pre class="programlisting">typedef struct {
+  GstBaseTransformClass parent_class;
+  GstGLAPI supported_gl_api;
+
+  gboolean (*gl_start)          (GstGLBaseFilter *filter);
+  void     (*gl_stop)           (GstGLBaseFilter *filter);
+
+  gpointer _padding[GST_PADDING];
+} GstGLBaseFilterClass;
+</pre>
+<div class="refsect3">
+<a name="id-1.2.9.14.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://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html#GstBaseTransformClass"><span class="type">GstBaseTransformClass</span></a> <em class="structfield"><code><a name="GstGLBaseFilterClass.parent-class"></a>parent_class</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> <em class="structfield"><code><a name="GstGLBaseFilterClass.supported-gl-api"></a>supported_gl_api</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLBaseFilterClass.gl-start"></a>gl_start</code></em> ()</p></td>
+<td class="struct_member_description"><p>called in the GL thread to setup the element GL state.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLBaseFilterClass.gl-stop"></a>gl_stop</code></em> ()</p></td>
+<td class="struct_member_description"><p>called in the GL thread to setup the element GL state.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GstGLBaseFilterClass.-padding"></a>_padding</code></em>[GST_PADDING];</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="GstGLBaseFilter.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="GstGLBaseFilter--context"></a><h3>The <code class="literal">“context”</code> property</h3>
+<pre class="programlisting">  “context”                  <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *</pre>
+<p>Get OpenGL context.</p>
+<p>Flags: Read</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLBufferPool.html b/docs/libs/html/GstGLBufferPool.html
index 605fa76..84a96f3 100644
--- a/docs/libs/html/GstGLBufferPool.html
+++ b/docs/libs/html/GstGLBufferPool.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLBufferPool</title>
+<title>GstGLBufferPool: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">
 <link rel="next" href="GstGLColorConvert.html" title="GstGLColorConvert">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -99,8 +99,8 @@
 <col width="200px" class="parameters_annotations">
 </colgroup>
 <tbody><tr>
-<td class="parameter_name"><p>display</p></td>
-<td class="parameter_description"><p>the <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> to use</p></td>
+<td class="parameter_name"><p>context</p></td>
+<td class="parameter_description"><p>the <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> to use</p></td>
 <td class="parameter_annotations"> </td>
 </tr></tbody>
 </table></div>
@@ -108,7 +108,6 @@
 <div class="refsect3">
 <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>
 </div>
 </div>
@@ -135,7 +134,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLColorConvert.html b/docs/libs/html/GstGLColorConvert.html
index 7249954..9fd6ad0 100644
--- a/docs/libs/html/GstGLColorConvert.html
+++ b/docs/libs/html/GstGLColorConvert.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLColorConvert</title>
+<title>GstGLColorConvert: GStreamer Bad Plugins 1.0 Library Reference Manual</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="GstGLBufferPool.html" title="GstGLBufferPool">
 <link rel="next" href="GstGLContext.html" title="GstGLContext">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -50,10 +50,18 @@
 </tr>
 <tr>
 <td class="function_type">
-<span class="returnvalue">void</span>
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="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>
+<a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-set-caps" title="gst_gl_color_convert_set_caps ()">gst_gl_color_convert_set_caps</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/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-transform-caps" title="gst_gl_color_convert_transform_caps ()">gst_gl_color_convert_transform_caps</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -134,16 +142,15 @@
 <div class="refsect3">
 <a name="id-1.2.9.4.7.2.5"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a> object</p>
-<p></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
-<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>
+<a name="gst-gl-color-convert-set-caps"></a><h3>gst_gl_color_convert_set_caps ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_color_convert_set_caps (<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/GstCaps.html"><span class="type">GstCaps</span></a> *in_caps</code></em>,
+                               <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *out_caps</code></em>);</pre>
 <p>Initializes <em class="parameter"><code>convert</code></em>
  with the information required for conversion.</p>
 <div class="refsect3">
@@ -161,13 +168,13 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<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_name"><p>in_caps</p></td>
+<td class="parameter_description"><p>input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<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_name"><p>out_caps</p></td>
+<td class="parameter_description"><p>output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
@@ -176,15 +183,24 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-color-convert-transform-caps"></a><h3>gst_gl_color_convert_transform_caps ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+gst_gl_color_convert_transform_caps (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *convert</code></em>,
+                                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadDirection"><span class="type">GstPadDirection</span></a> direction</code></em>,
+                                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>,
+                                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *filter</code></em>);</pre>
+</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/GstBuffer.html"><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/GstBuffer.html"><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>
+<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-caps" title="gst_gl_color_convert_set_caps ()"><code class="function">gst_gl_color_convert_set_caps()</code></a></p>
 <div class="refsect3">
-<a name="id-1.2.9.4.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.4.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -206,9 +222,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.4.7.4.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.4.7.5.6"></a><h4>Returns</h4>
 <p> a converted <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>%</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -222,8 +237,7 @@
 <hr>
 <div class="refsect2">
 <a name="GST-GL-COLOR-CONVERT-VIDEO-CAPS"></a><h3>GST_GL_COLOR_CONVERT_VIDEO_CAPS</h3>
-<pre class="programlisting">#define GST_GL_COLOR_CONVERT_VIDEO_CAPS GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)
-</pre>
+<pre class="programlisting">#define             GST_GL_COLOR_CONVERT_VIDEO_CAPS</pre>
 <p>The currently supported <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> that can be converted</p>
 </div>
 <hr>
@@ -248,7 +262,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLContext.html b/docs/libs/html/GstGLContext.html
index ba85f88..d3befd3 100644
--- a/docs/libs/html/GstGLContext.html
+++ b/docs/libs/html/GstGLContext.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLContext</title>
+<title>GstGLContext: GStreamer Bad Plugins 1.0 Library Reference Manual</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="GstGLColorConvert.html" title="GstGLColorConvert">
 <link rel="next" href="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -86,6 +86,14 @@
 </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-destroy" title="gst_gl_context_destroy ()">gst_gl_context_destroy</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -166,6 +174,22 @@
 </tr>
 <tr>
 <td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-get-current-gl-context" title="gst_gl_context_get_current_gl_context ()">gst_gl_context_get_current_gl_context</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="GstGLContext.html#gst-gl-context-get-current-gl-api" title="gst_gl_context_get_current_gl_api ()">gst_gl_context_get_current_gl_api</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="returnvalue">GThread</span></a> *
 </td>
 <td class="function_name">
@@ -204,6 +228,22 @@
 <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>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-fill-info" title="gst_gl_context_fill_info ()">gst_gl_context_fill_info</a> <span class="c_punctuation">()</span>
+</td>
+</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-get-current" title="gst_gl_context_get_current ()">gst_gl_context_get_current</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -310,9 +350,8 @@
 <div class="refsect3">
 <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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -361,9 +400,8 @@
 <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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -410,9 +448,33 @@
 <div class="refsect3">
 <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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-destroy"></a><h3>gst_gl_context_destroy ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_context_destroy (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
+<p>Destroys an OpenGL context.</p>
+<p>Should only be called after <a class="link" href="GstGLContext.html#gst-gl-context-create" title="gst_gl_context_create ()"><code class="function">gst_gl_context_create()</code></a> has been successfully
+called for this context.</p>
+<div class="refsect3">
+<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">
+<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>
+<p class="since">Since: 1.6</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -425,7 +487,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.9.5.7.8.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.9.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -447,18 +509,17 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.8.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.9.7"></a><h4>Returns</h4>
 <p> Whether the activation succeeded</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-gl-context-default-get-proc-address"></a><h3>gst_gl_context_default_get_proc_address ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
 gst_gl_context_default_get_proc_address
-                               (<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> gl_api</code></em>,
                                 <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
 </div>
 <hr>
@@ -471,9 +532,9 @@
 .  If the the
 specific function does not exist, NULL is returned instead.</p>
 <p>Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
-be retreived using this method.</p>
+be retrieved using this method.</p>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.10.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.11.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -495,11 +556,10 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.10.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.11.7"></a><h4>Returns</h4>
 <p> a function pointer or NULL</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -507,7 +567,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.9.5.7.11.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.12.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -522,11 +582,10 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.11.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.12.5"></a><h4>Returns</h4>
 <p> the currently set window</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -541,7 +600,7 @@
  is not
 already running.</p>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.12.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.13.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -563,11 +622,10 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.12.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.13.6"></a><h4>Returns</h4>
 <p> Whether the window was successfully updated</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -582,7 +640,7 @@
 </p>
 <p>MT-safe</p>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.13.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.14.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -609,7 +667,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -617,7 +675,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.9.5.7.14.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.15.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -632,12 +690,11 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.14.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.15.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>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -648,7 +705,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.9.5.7.15.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.16.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -663,11 +720,10 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.15.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.16.7"></a><h4>Returns</h4>
 <p> the available OpenGL api</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -677,35 +733,6 @@
 <p>Gets the backing OpenGL context used by <em class="parameter"><code>context</code></em>
 .</p>
 <div class="refsect3">
-<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">
-<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.16.6"></a><h4>Returns</h4>
-<p> The platform specific backing OpenGL context</p>
-<p></p>
-</div>
-<p class="since">Since 1.4</p>
-</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>
@@ -723,9 +750,107 @@
 <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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
+</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.18.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.18.6"></a><h4>Returns</h4>
+<p> The platform specific backing OpenGL context</p>
+</div>
+<p class="since">Since: 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-get-current-gl-context"></a><h3>gst_gl_context_get_current_gl_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_get_current_gl_context (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> platform</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_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 to retrieve</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> The OpenGL context handle current in the calling thread or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-get-current-gl-api"></a><h3>gst_gl_context_get_current_gl_api ()</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_context_get_current_gl_api (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> platform</code></em>,
+                                   <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *major</code></em>,
+                                   <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *minor</code></em>);</pre>
+<p>If an error occurs, <em class="parameter"><code>major</code></em>
+ and <em class="parameter"><code>minor</code></em>
+ aren't modified and <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-NONE:CAPS"><code class="literal">GST_GL_API_NONE</code></a> is
+returned.</p>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.20.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>platform</p></td>
+<td class="parameter_description"><p>the <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> to retrieve the API for</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>major</p></td>
+<td class="parameter_description"><p> (allow-none): the 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>minor</p></td>
+<td class="parameter_description"><p> (allow-none): the 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.6"></a><h4>Returns</h4>
+<p> The version supported by the OpenGL context current in the calling
+thread or <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-NONE:CAPS"><code class="literal">GST_GL_API_NONE</code></a></p>
+</div>
+<p class="since">Since: 1.6</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -733,7 +858,7 @@
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="returnvalue">GThread</span></a> *
 gst_gl_context_get_thread (<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.5.7.18.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.21.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -748,12 +873,12 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.18.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.21.5"></a><h4>Returns</h4>
 <p> The <a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="type">GThread</span></a>, <em class="parameter"><code>context</code></em>
 is current in or NULL. </p>
 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
-<p class="since">Since 1.4.5</p>
+<p class="since">Since: 1.6</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -761,8 +886,9 @@
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_context_can_share (<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="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *other_context</code></em>);</pre>
+<p>Note: This will always fail for two wrapped <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>'s</p>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.19.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.22.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -784,14 +910,13 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.19.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.22.6"></a><h4>Returns</h4>
 <p> whether <em class="parameter"><code>context</code></em>
 and <em class="parameter"><code>other_context</code></em>
 are able to share OpenGL
 resources.</p>
-<p></p>
 </div>
-<p class="since">Since 1.6</p>
+<p class="since">Since: 1.6</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -802,7 +927,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.9.5.7.20.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.23.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -824,13 +949,12 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.20.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.23.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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -841,7 +965,7 @@
                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> maj</code></em>,
                                  <em class="parameter"><code><a href="https://developer.gnome.org/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.21.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.24.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -873,12 +997,11 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.21.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.24.5"></a><h4>Returns</h4>
 <p> whether OpenGL context implements the required api and specified
 version.</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -893,7 +1016,7 @@
 <em class="parameter"><code>context</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.9.5.7.22.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.25.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -919,7 +1042,46 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-fill-info"></a><h3>gst_gl_context_fill_info ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_context_fill_info (<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="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
+<p>Fills <em class="parameter"><code>context</code></em>
+'s info (version, extensions, vtable, etc) from the GL
+context in the current thread.  Typically used with wrapped contexts to
+allow wrapped contexts to be used as regular <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>'s.</p>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.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>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>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-get-current"></a><h3>gst_gl_context_get_current ()</h3>
+<pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
+gst_gl_context_get_current (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>See also <a class="link" href="GstGLContext.html#gst-gl-context-activate" title="gst_gl_context_activate ()"><code class="function">gst_gl_context_activate()</code></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.27.5"></a><h4>Returns</h4>
+<p> the <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> active in the current thread or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
+</div>
+<p class="since">Since: 1.6</p>
 </div>
 </div>
 <div class="refsect1">
@@ -982,7 +1144,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLDisplay.html b/docs/libs/html/GstGLDisplay.html
index 2793f0d..6d3aee6 100644
--- a/docs/libs/html/GstGLDisplay.html
+++ b/docs/libs/html/GstGLDisplay.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLDisplay</title>
+<title>GstGLDisplay: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLContextWGL.html" title="GstGLContextWGL">
 <link rel="next" href="GstGLDownload.html" title="GstGLDownload">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,7 +16,8 @@
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                   <a href="#GstGLDisplay.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#GstGLDisplay.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#GstGLDisplay.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#GstGLDisplay.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="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
@@ -58,6 +59,46 @@
 </tr>
 <tr>
 <td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLDisplay.html#gst-gl-display-filter-gl-api" title="gst_gl_display_filter_gl_api ()">gst_gl_display_filter_gl_api</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="GstGLDisplay.html#gst-gl-display-get-gl-api" title="gst_gl_display_get_gl_api ()">gst_gl_display_get_gl_api</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLDisplay.html#gst-gl-display-add-context" title="gst_gl_display_add_context ()">gst_gl_display_add_context</a> <span class="c_punctuation">()</span>
+</td>
+</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="GstGLDisplay.html#gst-gl-display-get-gl-context-for-thread" title="gst_gl_display_get_gl_context_for_thread ()">gst_gl_display_get_gl_context_for_thread</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLDisplay.html#gst-gl-display-get-handle" title="gst_gl_display_get_handle ()">gst_gl_display_get_handle</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -76,6 +117,22 @@
 </table></div>
 </div>
 <div class="refsect1">
+<a name="GstGLDisplay.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">
+<a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a>*</td>
+<td class="signal_name"><a class="link" href="GstGLDisplay.html#GstGLDisplay-create-context" title="The “create-context” signal">create-context</a></td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
 <a name="GstGLDisplay.other"></a><h2>Types and Values</h2>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
@@ -136,11 +193,11 @@
 <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.9.10.7.2.4"></a><h4>Returns</h4>
+<a name="id-1.2.9.11.8.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>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -148,7 +205,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.9.10.7.3.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.8.3.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -163,12 +220,154 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.10.7.3.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.11.8.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>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-display-filter-gl-api"></a><h3>gst_gl_display_filter_gl_api ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_display_filter_gl_api (<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><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> api</code></em>);</pre>
+<p>limit the use of OpenGL to the requested <em class="parameter"><code>gl_api</code></em>
+.  This is intended to allow
+application and elements to request a specific set of OpenGL API's based on
+what they support.  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 the retreiving the
+API supported by 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.11.8.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>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>gl_api</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> to filter with</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-display-get-gl-api"></a><h3>gst_gl_display_get_gl_api ()</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_display_get_gl_api (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+<p>see <a class="link" href="GstGLDisplay.html#gst-gl-display-filter-gl-api" title="gst_gl_display_filter_gl_api ()"><code class="function">gst_gl_display_filter_gl_api()</code></a> for what the returned value represents</p>
+<div class="refsect3">
+<a name="id-1.2.9.11.8.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>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></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.11.8.5.6"></a><h4>Returns</h4>
+<p> the <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> configured for <em class="parameter"><code>display</code></em>
+</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-display-add-context"></a><h3>gst_gl_display_add_context ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_display_add_context (<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><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.11.8.6.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>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>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"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.11.8.6.5"></a><h4>Returns</h4>
+<p> whether <em class="parameter"><code>context</code></em>
+was successfully added. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> may be returned
+if there already exists another context for <em class="parameter"><code>context</code></em>
+'s active thread.</p>
+<p>Must be called with the object lock held.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-display-get-gl-context-for-thread"></a><h3>gst_gl_display_get_gl_context_for_thread ()</h3>
+<pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
+gst_gl_display_get_gl_context_for_thread
+                               (<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><a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="type">GThread</span></a> *thread</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.11.8.7.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>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>thread</p></td>
+<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="type">GThread</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.11.8.7.5"></a><h4>Returns</h4>
+<p> the <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> current on <em class="parameter"><code>thread</code></em>
+or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
+<p>Must be called with the object lock held. </p>
+<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-display-get-handle"></a><h3>gst_gl_display_get_handle ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_display_get_handle (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
@@ -177,7 +376,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.9.10.7.4.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.8.9.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -199,13 +398,12 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.10.7.4.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.11.8.9.5"></a><h4>Returns</h4>
 <p> Whether <em class="parameter"><code>display</code></em>
 was in <em class="parameter"><code>context</code></em>
 </p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -217,7 +415,7 @@
  on <em class="parameter"><code>context</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.9.10.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.8.10.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -238,7 +436,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 </div>
 <div class="refsect1">
@@ -252,7 +450,7 @@
 <div class="refsect2">
 <a name="GstGLDisplayType"></a><h3>enum GstGLDisplayType</h3>
 <div class="refsect3">
-<a name="id-1.2.9.10.8.3.3"></a><h4>Members</h4>
+<a name="id-1.2.9.11.9.3.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -313,12 +511,57 @@
 </div>
 </div>
 <div class="refsect1">
+<a name="GstGLDisplay.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="GstGLDisplay-create-context"></a><h3>The <code class="literal">“create-context”</code> signal</h3>
+<pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a>*
+user_function (<a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *object,
+               <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
+<p>Overrides the <em class="parameter"><code>GstGLContext</code></em>
+ creation mechanism.
+It can be called in any thread and it is emitted with
+display's object lock held.</p>
+<div class="refsect3">
+<a name="id-1.2.9.11.10.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>object</p></td>
+<td class="parameter_description"><p>the <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>context</p></td>
+<td class="parameter_description"><p>other context to share resources with.</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>
+<div class="refsect3">
+<a name="id-1.2.9.11.10.2.6"></a><h4>Returns</h4>
+<p> the new context.</p>
+</div>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
+</div>
+</div>
+<div class="refsect1">
 <a name="GstGLDisplay.see-also"></a><h2>See Also</h2>
 <p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstContext.html"><span class="type">GstContext</span></a>, <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>, <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLDownload.html b/docs/libs/html/GstGLDownload.html
index df756a7..3ddf3c1 100644
--- a/docs/libs/html/GstGLDownload.html
+++ b/docs/libs/html/GstGLDownload.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLDownload</title>
+<title>GstGLDownload: GStreamer Bad Plugins 1.0 Library Reference Manual</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="GstGLDisplay.html" title="GstGLDisplay">
 <link rel="next" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -58,6 +58,14 @@
 </tr>
 <tr>
 <td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstGLDownload.html#gst-gl-download-transform-caps" title="gst_gl_download_transform_caps ()">gst_gl_download_transform_caps</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -100,7 +108,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.9.11.7.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.12.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -115,9 +123,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.11.7.2.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.12.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>
 </div>
 <hr>
@@ -129,7 +136,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.9.11.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.12.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -143,18 +150,8 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>v_format</p></td>
-<td class="parameter_description"><p>a <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></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>out_width</p></td>
-<td class="parameter_description"><p>the width to download to</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>out_height</p></td>
-<td class="parameter_description"><p>the height to download to</p></td>
+<td class="parameter_name"><p>out_info</p></td>
+<td class="parameter_description"><p>a <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>
@@ -163,18 +160,29 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-download-transform-caps"></a><h3>gst_gl_download_transform_caps ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+gst_gl_download_transform_caps (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *convert</code></em>,
+                                <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadDirection"><span class="type">GstPadDirection</span></a> direction</code></em>,
+                                <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>,
+                                <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *filter</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-gl-download-perform-with-data"></a><h3>gst_gl_download_perform_with_data ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_download_perform_with_data (<em class="parameter"><code><a class="link" href="GstGLDownload.html" title="GstGLDownload"><span class="type">GstGLDownload</span></a> *download</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_target</code></em>,
                                    <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data[GST_VIDEO_MAX_PLANES]</code></em>);</pre>
 <p>Downloads <em class="parameter"><code>texture_id</code></em>
  into <em class="parameter"><code>data</code></em>
 . <em class="parameter"><code>data</code></em>
  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>
+<p>This method can only be used for download a single view.</p>
 <div class="refsect3">
-<a name="id-1.2.9.11.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.12.7.5.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -193,6 +201,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>texture_target</p></td>
+<td class="parameter_description"><p>the GL texture target</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
 <td class="parameter_name"><p>data</p></td>
 <td class="parameter_description"><p> where the downloaded data should go. </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>
@@ -201,9 +214,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.11.7.4.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.12.7.5.7"></a><h4>Returns</h4>
 <p> whether the download was successful</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -221,7 +233,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLFilter.html b/docs/libs/html/GstGLFilter.html
index b8f240b..29f3018 100644
--- a/docs/libs/html/GstGLFilter.html
+++ b/docs/libs/html/GstGLFilter.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLFilter</title>
+<title>GstGLFilter: GStreamer Bad Plugins 1.0 Library Reference Manual</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="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.21 (XML mode)">
+<link rel="prev" href="GstGLBaseFilter.html" title="GstGLBaseFilter">
+<link rel="next" href="GstGLFramebuffer.html" title="GstGLFramebuffer">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,13 +16,12 @@
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                   <a href="#GstGLFilter.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#GstGLFilter.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#GstGLFilter.properties" class="shortcut">Properties</a></span>
+                  <a href="#GstGLFilter.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="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>
+<td><a accesskey="p" href="GstGLBaseFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="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>
@@ -77,22 +76,6 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="GstGLFilter.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">
-<a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *</td>
-<td class="property_name"><a class="link" href="GstGLFilter.html#GstGLFilter--other-context" title="The “other-context” property">other-context</a></td>
-<td class="property_flags">Read / Write</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
 <a name="GstGLFilter.other"></a><h2>Types and Values</h2>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
@@ -101,12 +84,12 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="GstGLFilter.html#GstGLFilter-struct" title="struct GstGLFilter">GstGLFilter</a></td>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="GstGLFilter.html#GstGLFilter-struct" title="GstGLFilter">GstGLFilter</a></td>
 </tr>
 <tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="GstGLFilter.html#GstGLFilterClass" title="struct GstGLFilterClass">GstGLFilterClass</a></td>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="GstGLFilter.html#GstGLFilterClass" title="GstGLFilterClass">GstGLFilterClass</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -118,7 +101,8 @@
         <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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
-                    <span class="lineart">╰──</span> GstGLFilter
+                    <span class="lineart">╰──</span> <a class="link" href="GstGLBaseFilter.html" title="GstGLBaseFilter">GstGLBaseFilter</a>
+                        <span class="lineart">╰──</span> GstGLFilter
 </pre>
 </div>
 <div class="refsect1">
@@ -138,7 +122,7 @@
  and <em class="parameter"><code>height</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.9.13.8.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.7.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -190,7 +174,7 @@
  is the input texture of <em class="parameter"><code>filter</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.9.13.8.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -257,7 +241,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.9.13.8.4.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.7.4.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -305,7 +289,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.9.13.8.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -332,22 +316,21 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.13.8.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.7.5.6"></a><h4>Returns</h4>
 <p> whether the transformation succeeded</p>
-<p></p>
 </div>
 </div>
 </div>
 <div class="refsect1">
 <a name="GstGLFilter.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
-<a name="GstGLFilter-struct"></a><h3>struct GstGLFilter</h3>
-<pre class="programlisting">struct GstGLFilter;</pre>
+<a name="GstGLFilter-struct"></a><h3>GstGLFilter</h3>
+<pre class="programlisting">typedef struct _GstGLFilter GstGLFilter;</pre>
 <p><a class="link" href="GstGLFilter.html" title="GstGLFilter"><span class="type">GstGLFilter</span></a> is a base class that provides the logic of getting the GL context
 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/GstBuffer.html"><span class="type">GstBuffer</span></a>s.</p>
 <div class="refsect3">
-<a name="id-1.2.9.13.9.2.5"></a><h4>Members</h4>
+<a name="id-1.2.9.15.8.2.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -360,26 +343,25 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="GstGLFilterClass"></a><h3>struct GstGLFilterClass</h3>
-<pre class="programlisting">struct GstGLFilterClass {
-  GstBaseTransformClass base_transform_class;
+<a name="GstGLFilterClass"></a><h3>GstGLFilterClass</h3>
+<pre class="programlisting">typedef struct {
+  GstGLBaseFilterClass parent_class;
 
   gboolean (*set_caps)          (GstGLFilter* filter, GstCaps* incaps, GstCaps* outcaps);
   gboolean (*filter)            (GstGLFilter *filter, GstBuffer *inbuf, GstBuffer *outbuf);
   gboolean (*filter_texture)    (GstGLFilter *filter, guint in_tex, guint out_tex);
-  gboolean (*onInitFBO)         (GstGLFilter *filter);
+  gboolean (*init_fbo)          (GstGLFilter *filter);
 
-  void (*onStart)               (GstGLFilter *filter);
-  void (*onStop)                (GstGLFilter *filter);
-  void (*onReset)               (GstGLFilter *filter);
+  GstCaps *(*transform_internal_caps) (GstGLFilter *filter,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps);
 
   /* useful to init and cleanup custom gl resources */
   void (*display_init_cb)       (GstGLFilter *filter);
   void (*display_reset_cb)      (GstGLFilter *filter);
-};
+} GstGLFilterClass;
 </pre>
 <div class="refsect3">
-<a name="id-1.2.9.13.9.3.4"></a><h4>Members</h4>
+<a name="id-1.2.9.15.8.3.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -388,9 +370,9 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html#GstBaseTransformClass"><span class="type">GstBaseTransformClass</span></a> <em class="structfield"><code><a name="GstGLFilterClass.base-transform-class"></a>base_transform_class</code></em>;</p></td>
-<td class="struct_member_description"><p>parent class</p></td>
-<td class="struct_member_annotations"> </td>
+<td class="struct_member_name"><p><a class="link" href="GstGLBaseFilter.html#GstGLBaseFilterClass" title="GstGLBaseFilterClass"><span class="type">GstGLBaseFilterClass</span></a> <em class="structfield"><code><a name="GstGLFilterClass.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="GstGLFilterClass.set-caps"></a>set_caps</code></em> ()</p></td>
@@ -417,24 +399,14 @@
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.onInitFBO"></a>onInitFBO</code></em> ()</p></td>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.init-fbo"></a>init_fbo</code></em> ()</p></td>
 <td class="struct_member_description"><p>perform initialization when the Framebuffer object is created</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.onStart"></a>onStart</code></em> ()</p></td>
-<td class="struct_member_description"><p>called when element activates see also <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html"><span class="type">GstBaseTransform</span></a></p></td>
-<td class="struct_member_annotations"> </td>
-</tr>
-<tr>
-<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.onStop"></a>onStop</code></em> ()</p></td>
-<td class="struct_member_description"><p>called when the element deactivates e also <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html"><span class="type">GstBaseTransform</span></a></p></td>
-<td class="struct_member_annotations"> </td>
-</tr>
-<tr>
-<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.onReset"></a>onReset</code></em> ()</p></td>
-<td class="struct_member_description"><p>called on inizialation and after <em class="parameter"><code>onStop</code></em>
-</p></td>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLFilterClass.transform-internal-caps"></a>transform_internal_caps</code></em> ()</p></td>
+<td class="struct_member_description"><p>Perform sub-class specific modifications of the
+caps to be processed between upload on input and before download for output.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
@@ -452,18 +424,8 @@
 </div>
 </div>
 </div>
-<div class="refsect1">
-<a name="GstGLFilter.property-details"></a><h2>Property Details</h2>
-<div class="refsect2">
-<a name="GstGLFilter--other-context"></a><h3>The <code class="literal">“other-context”</code> property</h3>
-<pre class="programlisting">  “other-context”            <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *</pre>
-<p>Give an external OpenGL context with which to share textures.</p>
-<p>Flags: Read / Write</p>
-</div>
-</div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLFramebuffer.html b/docs/libs/html/GstGLFramebuffer.html
new file mode 100644
index 0000000..607c8c4
--- /dev/null
+++ b/docs/libs/html/GstGLFramebuffer.html
@@ -0,0 +1,164 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GstGLFramebuffer: GStreamer Bad Plugins 1.0 Library Reference Manual</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.24 (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="5"><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="#GstGLFramebuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#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="GstGLFramebuffer"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="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="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="GstGLFramebuffer.html" title="GstGLFramebuffer"><span class="returnvalue">GstGLFramebuffer</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="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="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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="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="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="GstGLFramebuffer.html#GstGLFramebuffer-struct" title="struct GstGLFramebuffer">GstGLFramebuffer</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstGLFramebuffer.html#GstGLFramebufferClass" title="struct GstGLFramebufferClass">GstGLFramebufferClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstGLFramebuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> GstGLFramebuffer
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstGLFramebuffer.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="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="GstGLFramebuffer.html" title="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="https://developer.gnome.org/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="GstGLFramebuffer.html" title="GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *fbo</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/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="GstGLFramebuffer.html" title="GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                           <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fbo</code></em>,
+                           <em class="parameter"><code><a href="https://developer.gnome.org/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-v2"></a><h3>gst_gl_framebuffer_use_v2 ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/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="GstGLFramebuffer.html" title="GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                           <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
+                           <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> stuff</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="GstGLFramebuffer.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLFramebuffer-struct"></a><h3>struct GstGLFramebuffer</h3>
+<pre class="programlisting">struct GstGLFramebuffer;</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.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLUpload.html b/docs/libs/html/GstGLUpload.html
index 05e6e63..4700a58 100644
--- a/docs/libs/html/GstGLUpload.html
+++ b/docs/libs/html/GstGLUpload.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLUpload</title>
+<title>GstGLUpload: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">
-<link rel="next" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">
+<link rel="next" href="GstGLUploadMeta.html" title="GstGLUploadMeta">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,8 +20,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="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-GstGLUploadMeta.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstGLSyncMeta.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="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>
@@ -53,15 +53,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="GstGLUpload.html#gst-gl-upload-set-format" title="gst_gl_upload_set_format ()">gst_gl_upload_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="GstGLUpload.html#gst-gl-upload-get-format" title="gst_gl_upload_get_format ()">gst_gl_upload_get_format</a> <span class="c_punctuation">()</span>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-get-caps" title="gst_gl_upload_get_caps ()">gst_gl_upload_get_caps</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -69,20 +61,28 @@
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="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>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-set-caps" title="gst_gl_upload_set_caps ()">gst_gl_upload_set_caps</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+<span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-gl-texture-upload-meta" title="gst_gl_upload_perform_with_gl_texture_upload_meta ()">gst_gl_upload_perform_with_gl_texture_upload_meta</a> <span class="c_punctuation">()</span>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-propose-allocation" title="gst_gl_upload_propose_allocation ()">gst_gl_upload_propose_allocation</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstGLUpload.html#gst-gl-upload-transform-caps" title="gst_gl_upload_transform_caps ()">gst_gl_upload_transform_caps</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">GstGLUploadReturn</span>
 </td>
 <td class="function_name">
 <a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-buffer" title="gst_gl_upload_perform_with_buffer ()">gst_gl_upload_perform_with_buffer</a> <span class="c_punctuation">()</span>
@@ -132,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.9.17.7.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -147,21 +147,19 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.17.7.2.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.20.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>
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-upload-set-format"></a><h3>gst_gl_upload_set_format ()</h3>
+<a name="gst-gl-upload-get-caps"></a><h3>gst_gl_upload_get_caps ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_gl_upload_set_format (<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/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *in_info</code></em>);</pre>
-<p>Initializes <em class="parameter"><code>upload</code></em>
- with the information required for upload.</p>
+gst_gl_upload_get_caps (<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/GstCaps.html"><span class="type">GstCaps</span></a> **in_caps</code></em>,
+                        <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> **out_caps</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.9.17.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.3.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -175,53 +173,35 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<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>
+<td class="parameter_name"><p>in_caps</p></td>
+<td class="parameter_description"><p> the input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<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>][<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>out_caps</p></td>
+<td class="parameter_description"><p> the output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<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>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
 </tr>
 </tbody>
 </table></div>
 </div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-gl-upload-get-format"></a><h3>gst_gl_upload_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_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.9.17.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.17.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>
+<a name="id-1.2.9.20.7.3.5"></a><h4>Returns</h4>
+<p> The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> set by <a class="link" href="GstGLUpload.html#gst-gl-upload-set-caps" title="gst_gl_upload_set_caps ()"><code class="function">gst_gl_upload_set_caps()</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-perform-with-data"></a><h3>gst_gl_upload_perform_with_data ()</h3>
+<a name="gst-gl-upload-set-caps"></a><h3>gst_gl_upload_set_caps ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/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><a href="https://developer.gnome.org/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>
+gst_gl_upload_set_caps (<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/GstCaps.html"><span class="type">GstCaps</span></a> *in_caps</code></em>,
+                        <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *out_caps</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.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">
@@ -235,37 +215,36 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>texture_id</p></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>
+<td class="parameter_name"><p>in_caps</p></td>
+<td class="parameter_description"><p>input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a></p></td>
+<td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>data</p></td>
-<td class="parameter_description"><p>where the downloaded data should go</p></td>
+<td class="parameter_name"><p>out_caps</p></td>
+<td class="parameter_description"><p>output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.17.7.5.6"></a><h4>Returns</h4>
-<p> whether the upload was successful</p>
-<p></p>
+<a name="id-1.2.9.20.7.4.6"></a><h4>Returns</h4>
+<p> whether <em class="parameter"><code>in_caps</code></em>
+and <em class="parameter"><code>out_caps</code></em>
+could be set on <em class="parameter"><code>upload</code></em>
+</p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-upload-perform-with-gl-texture-upload-meta"></a><h3>gst_gl_upload_perform_with_gl_texture_upload_meta ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_upload_perform_with_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/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a> *meta</code></em>,
-                                <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> texture_id[4]</code></em>);</pre>
-<p>Uploads <em class="parameter"><code>meta</code></em>
- into <em class="parameter"><code>texture_id</code></em>
-.</p>
+<a name="gst-gl-upload-propose-allocation"></a><h3>gst_gl_upload_propose_allocation ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_upload_propose_allocation (<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/GstQuery.html"><span class="type">GstQuery</span></a> *decide_query</code></em>,
+                                  <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstQuery.html"><span class="type">GstQuery</span></a> *query</code></em>);</pre>
+<p>Adds the required allocation parameters to support uploading.</p>
 <div class="refsect3">
-<a name="id-1.2.9.17.7.6.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -279,38 +258,42 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>meta</p></td>
-<td class="parameter_description"><p>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></p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_name"><p>decide_query</p></td>
+<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstQuery.html"><span class="type">GstQuery</span></a> from a decide allocation. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<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>texture_id</p></td>
-<td class="parameter_description"><p>resulting GL textures to place the data into.</p></td>
+<td class="parameter_name"><p>query</p></td>
+<td class="parameter_description"><p>the proposed allocation query</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
 </table></div>
 </div>
-<div class="refsect3">
-<a name="id-1.2.9.17.7.6.6"></a><h4>Returns</h4>
-<p> whether the upload was successful</p>
-<p></p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-upload-transform-caps"></a><h3>gst_gl_upload_transform_caps ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+gst_gl_upload_transform_caps (<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/gstreamer/html/GstPad.html#GstPadDirection"><span class="type">GstPadDirection</span></a> direction</code></em>,
+                              <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>,
+                              <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *filter</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-gl-upload-perform-with-buffer"></a><h3>gst_gl_upload_perform_with_buffer ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+<pre class="programlisting"><span class="returnvalue">GstGLUploadReturn</span>
 gst_gl_upload_perform_with_buffer (<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/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>,
-                                   <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *tex_id</code></em>);</pre>
+                                   <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> **outbuf</code></em>);</pre>
 <p>Uploads <em class="parameter"><code>buffer</code></em>
  to the texture given by <em class="parameter"><code>tex_id</code></em>
 .  <em class="parameter"><code>tex_id</code></em>
  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.9.17.7.7.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.7.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -329,17 +312,16 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>tex_id</p></td>
-<td class="parameter_description"><p>resulting texture</p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_name"><p>outbuf_ptr</p></td>
+<td class="parameter_description"><p> resulting buffer. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<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.9.17.7.7.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.20.7.7.6"></a><h4>Returns</h4>
 <p> whether the upload was successful</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -347,6 +329,23 @@
 <a name="gst-gl-upload-release-buffer"></a><h3>gst_gl_upload_release_buffer ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_gl_upload_release_buffer (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>);</pre>
+<p>Releases any buffers currently referenced by <em class="parameter"><code>upload</code></em>
+</p>
+<div class="refsect3">
+<a name="id-1.2.9.20.7.8.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></tbody>
+</table></div>
+</div>
 </div>
 </div>
 <div class="refsect1">
@@ -363,7 +362,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</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/GstGLUploadMeta.html
similarity index 66%
rename from docs/libs/html/gst-plugins-bad-libs-GstGLUploadMeta.html
rename to docs/libs/html/GstGLUploadMeta.html
index 7497ad8..b412b10 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLUploadMeta.html
+++ b/docs/libs/html/GstGLUploadMeta.html
@@ -2,20 +2,21 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLUploadMeta</title>
+<title>GstGLUploadMeta: GStreamer Bad Plugins 1.0 Library Reference Manual</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.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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>
+                  <a href="#GstGLUploadMeta.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#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>
@@ -23,16 +24,16 @@
 <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>
+<a name="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>
+<h2><span class="refentrytitle"><a name="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>
+<a name="GstGLUploadMeta.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_return">
@@ -41,10 +42,10 @@
 <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> *
+<a class="link" href="GstGLUploadMeta.html" 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>
+<a class="link" href="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>
@@ -52,7 +53,7 @@
 <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>
+<a class="link" href="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>
@@ -60,7 +61,7 @@
 <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>
+<a class="link" href="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>
@@ -68,14 +69,14 @@
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-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>
+<a class="link" href="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>
+<a name="GstGLUploadMeta.other"></a><h2>Types and Values</h2>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="name">
@@ -83,23 +84,31 @@
 </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>
+<td class="function_name"><a class="link" href="GstGLUploadMeta.html#GstGLUploadMeta-struct" title="GstGLUploadMeta">GstGLUploadMeta</a></td>
 </tr></tbody>
 </table></div>
 </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>
+<a name="GstGLUploadMeta.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> GstGLUploadMeta
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstGLUploadMeta.description"></a><h2>Description</h2>
+<p><a class="link" href="GstGLUploadMeta.html" 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>
+<a name="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> *
+<pre class="programlisting"><a class="link" href="GstGLUploadMeta.html" 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.18.6.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -114,21 +123,20 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.18.6.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>
+<a name="id-1.2.9.21.7.2.5"></a><h4>Returns</h4>
+<p> a new <a class="link" href="GstGLUploadMeta.html" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> object</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>,
+gst_gl_upload_meta_set_format (<em class="parameter"><code><a class="link" href="GstGLUploadMeta.html" 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.18.6.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -154,9 +162,9 @@
 <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>
+gst_gl_upload_meta_get_format (<em class="parameter"><code><a class="link" href="GstGLUploadMeta.html" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> *upload</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.9.18.6.4.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.4.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -171,9 +179,9 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.18.6.4.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.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>
+<a class="link" href="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>
@@ -181,13 +189,13 @@
 <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="https://developer.gnome.org/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>,
+gst_gl_upload_meta_add_to_buffer (<em class="parameter"><code><a class="link" href="GstGLUploadMeta.html" 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/GstBuffer.html"><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.18.6.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -197,7 +205,7 @@
 <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_description"><p>a <a class="link" href="GstGLUploadMeta.html" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -209,29 +217,25 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.18.6.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.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>
+<a name="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>
+<a name="GstGLUploadMeta-struct"></a><h3>GstGLUploadMeta</h3>
+<pre class="programlisting">typedef struct _GstGLUploadMeta GstGLUploadMeta;</pre>
+<p>Opaque <a class="link" href="GstGLUploadMeta.html" 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>
+<a name="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.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLWindow.html b/docs/libs/html/GstGLWindow.html
index f7d5fa0..ff51371 100644
--- a/docs/libs/html/GstGLWindow.html
+++ b/docs/libs/html/GstGLWindow.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindow</title>
+<title>GstGLWindow: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-Utilities.html" title="Utilities">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowAndroid.html" title="GstGLWindowAndroid">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,7 +16,8 @@
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                   <a href="#GstGLWindow.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#GstGLWindow.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#GstGLWindow.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#GstGLWindow.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="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
@@ -200,6 +201,60 @@
 <a class="link" href="GstGLWindow.html#gst-gl-window-get-window-handle" title="gst_gl_window_get_window_handle ()">gst_gl_window_get_window_handle</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="GstGLWindow.html#gst-gl-window-set-preferred-size" title="gst_gl_window_set_preferred_size ()">gst_gl_window_set_preferred_size</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="GstGLWindow.html#gst-gl-window-show" title="gst_gl_window_show ()">gst_gl_window_show</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="GstGLWindow.html#gst-gl-window-get-surface-dimensions" title="gst_gl_window_get_surface_dimensions ()">gst_gl_window_get_surface_dimensions</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="GstGLWindow.html#gst-gl-window-handle-events" title="gst_gl_window_handle_events ()">gst_gl_window_handle_events</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstGLWindow.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="GstGLWindow.html#GstGLWindow-key-event" title="The “key-event” signal">key-event</a></td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="GstGLWindow.html#GstGLWindow-mouse-event" title="The “mouse-event” signal">mouse-event</a></td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -284,7 +339,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.9.20.7.8.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.8.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -299,86 +354,58 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.8.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.23.8.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>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-gl-window-draw"></a><h3>gst_gl_window_draw ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_gl_window_draw (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>,
-                    <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
-                    <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
+gst_gl_window_draw (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <p>Redraw the window contents.  Implementations should invoke the draw callback.</p>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.9.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.9.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>
+<tbody><tr>
 <td class="parameter_name"><p>window</p></td>
 <td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
 <td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>width</p></td>
-<td class="parameter_description"><p>requested width of the window</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>height</p></td>
-<td class="parameter_description"><p>requested height of the window</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
+</tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-gl-window-draw-unlocked"></a><h3>gst_gl_window_draw_unlocked ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_gl_window_draw_unlocked (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>,
-                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
-                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
+gst_gl_window_draw_unlocked (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <p>Redraw the window contents.  Implementations should invoke the draw callback.</p>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.10.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.10.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>
+<tbody><tr>
 <td class="parameter_name"><p>window</p></td>
 <td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
 <td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>width</p></td>
-<td class="parameter_description"><p>requested width of the window</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>height</p></td>
-<td class="parameter_description"><p>requested height of the window</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
+</tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -387,7 +414,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.9.20.7.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.11.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -401,7 +428,7 @@
 </tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -410,7 +437,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.9.20.7.12.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.12.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -424,7 +451,7 @@
 </tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -433,7 +460,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.9.20.7.13.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.13.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -447,7 +474,7 @@
 </tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -455,7 +482,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.9.20.7.14.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.14.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -470,12 +497,12 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.14.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.23.8.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>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -483,7 +510,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.9.20.7.15.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.15.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -498,12 +525,11 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.15.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.23.8.15.5"></a><h4>Returns</h4>
 <p> the windowing system display handle for this <em class="parameter"><code>window</code></em>
 </p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -517,7 +543,7 @@
  is guarenteed to
 have executed when this function returns.</p>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.16.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.16.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -544,7 +570,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -559,7 +585,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.9.20.7.17.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.17.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -592,7 +618,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -604,7 +630,7 @@
                                   <em class="parameter"><code><a href="https://developer.gnome.org/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.9.20.7.18.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.18.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -637,7 +663,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -649,7 +675,7 @@
                                  <em class="parameter"><code><a href="https://developer.gnome.org/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.9.20.7.19.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.19.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -682,7 +708,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -694,7 +720,7 @@
                                    <em class="parameter"><code><a href="https://developer.gnome.org/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.9.20.7.20.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.20.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -727,7 +753,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -739,7 +765,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.9.20.7.21.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.21.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -760,7 +786,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -768,7 +794,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.9.20.7.22.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.23.8.22.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -783,11 +809,143 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.20.7.22.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.23.8.22.5"></a><h4>Returns</h4>
 <p> the window handle we are currently rendering into</p>
-<p></p>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-window-set-preferred-size"></a><h3>gst_gl_window_set_preferred_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_window_set_preferred_size (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>,
+                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
+                                  <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>);</pre>
+<p>Set the preferred width and height of the window.  Implementations are free
+to ignore this information.</p>
+<div class="refsect3">
+<a name="id-1.2.9.23.8.23.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>window</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>width</p></td>
+<td class="parameter_description"><p>new preferred width</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>height</p></td>
+<td class="parameter_description"><p>new preferred height</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-window-show"></a><h3>gst_gl_window_show ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_window_show (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
+<p>Present the window to the screen.</p>
+<div class="refsect3">
+<a name="id-1.2.9.23.8.24.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>window</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-window-get-surface-dimensions"></a><h3>gst_gl_window_get_surface_dimensions ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_window_get_surface_dimensions (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>,
+                                      <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *width</code></em>,
+                                      <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *height</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.23.8.25.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>window</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>width</p></td>
+<td class="parameter_description"><p> resulting surface width. </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>height</p></td>
+<td class="parameter_description"><p> resulting surface height. </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>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-window-handle-events"></a><h3>gst_gl_window_handle_events ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_window_handle_events (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> handle_events</code></em>);</pre>
+<p>Tell a <em class="parameter"><code>window</code></em>
+ that it should handle events from the window system. These
+events are forwarded upstream as navigation events. In some window systems
+events are not propagated in the window hierarchy if a client is listening
+for them. This method allows you to disable events handling completely
+from the <em class="parameter"><code>window</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.9.23.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>window</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>handle_events</p></td>
+<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating if events should be handled or not.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
 </div>
 </div>
 <div class="refsect1">
@@ -795,7 +953,7 @@
 <div class="refsect2">
 <a name="GstGLWindowError"></a><h3>enum GstGLWindowError</h3>
 <div class="refsect3">
-<a name="id-1.2.9.20.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.23.9.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -838,8 +996,8 @@
   guintptr (*get_display)        (GstGLWindow *window);
   void     (*set_window_handle)  (GstGLWindow *window, guintptr id);
   guintptr (*get_window_handle)  (GstGLWindow *window);
-  void     (*draw_unlocked)      (GstGLWindow *window, guint width, guint height);
-  void     (*draw)               (GstGLWindow *window, guint width, guint height);
+  void     (*draw_unlocked)      (GstGLWindow *window);
+  void     (*draw)               (GstGLWindow *window);
   void     (*run)                (GstGLWindow *window);
   void     (*quit)               (GstGLWindow *window);
   void     (*send_message)       (GstGLWindow *window, GstGLWindowCB callback, gpointer data);
@@ -847,10 +1005,15 @@
 
   gboolean (*open)               (GstGLWindow *window, GError **error);
   void     (*close)              (GstGLWindow *window);
+  void     (*handle_events)      (GstGLWindow *window, gboolean handle_events);
+  void     (*set_preferred_size) (GstGLWindow *window, gint width, gint height);
+  void     (*show)               (GstGLWindow *window);
+  gboolean (*set_render_rectangle)(GstGLWindow *window, gint x, gint y, gint width, gint height);
+  void     (*queue_resize)       (GstGLWindow *window);
 } GstGLWindowClass;
 </pre>
 <div class="refsect3">
-<a name="id-1.2.9.20.8.4.4"></a><h4>Members</h4>
+<a name="id-1.2.9.23.9.4.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -921,18 +1084,147 @@
 <td class="struct_member_description"><p>close the connection to the display</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLWindowClass.handle-events"></a>handle_events</code></em> ()</p></td>
+<td class="struct_member_description"><p>whether to handle 'extra' events from the windowing system.
+Basic events like surface moves and resizes are still valid
+things to listen for.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLWindowClass.set-preferred-size"></a>set_preferred_size</code></em> ()</p></td>
+<td class="struct_member_description"><p>request that the window change surface size.  The
+implementation is free to ignore this information.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLWindowClass.show"></a>show</code></em> ()</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLWindowClass.set-render-rectangle"></a>set_render_rectangle</code></em> ()</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstGLWindowClass.queue-resize"></a>queue_resize</code></em> ()</p></td>
+<td> </td>
+<td> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 </div>
 </div>
 <div class="refsect1">
+<a name="GstGLWindow.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="GstGLWindow-key-event"></a><h3>The <code class="literal">“key-event”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *object,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>       *id,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>       *key,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>     user_data)</pre>
+<p>Will be emitted when a key event is received by the GstGLwindow.</p>
+<div class="refsect3">
+<a name="id-1.2.9.23.10.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>object</p></td>
+<td class="parameter_description"><p>the <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>id</p></td>
+<td class="parameter_description"><p>the name of the event</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>key</p></td>
+<td class="parameter_description"><p>the id of the key pressed</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: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstGLWindow-mouse-event"></a><h3>The <code class="literal">“mouse-event”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *object,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>       *id,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>         button,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>      x,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>      y,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>     user_data)</pre>
+<p>Will be emitted when a mouse event is received by the GstGLwindow.</p>
+<div class="refsect3">
+<a name="id-1.2.9.23.10.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>object</p></td>
+<td class="parameter_description"><p>the <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>id</p></td>
+<td class="parameter_description"><p>the name of the event</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>button</p></td>
+<td class="parameter_description"><p>the id of the button</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>x</p></td>
+<td class="parameter_description"><p>the x coordinate of the mouse event</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>y</p></td>
+<td class="parameter_description"><p>the y coordinate of the mouse event</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: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
+<p class="since">Since: 1.6</p>
+</div>
+</div>
+<div class="refsect1">
 <a name="GstGLWindow.see-also"></a><h2>See Also</h2>
 <p><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>, <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a></p>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/annotation-glossary.html b/docs/libs/html/annotation-glossary.html
index f220208..f49fb27 100644
--- a/docs/libs/html/annotation-glossary.html
+++ b/docs/libs/html/annotation-glossary.html
@@ -2,12 +2,12 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Annotation Glossary</title>
+<title>Annotation Glossary: GStreamer Bad Plugins 1.0 Library Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="prev" href="api-index-deprecated.html" title="Index of deprecated API">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -53,6 +53,8 @@
 <a name="glsS"></a><h3 class="title">S</h3>
 <dt><span class="glossterm"><a name="annotation-glossterm-scope%20async"></a>scope async</span></dt>
 <dd class="glossdef"><p>The callback is valid until first called.</p></dd>
+<dt><span class="glossterm"><a name="annotation-glossterm-scope%20call"></a>scope call</span></dt>
+<dd class="glossdef"><p>The callback is valid only during the call to the method.</p></dd>
 <dt><span class="glossterm"><a name="annotation-glossterm-scope%20notified"></a>scope notified</span></dt>
 <dd class="glossdef"><p>The callback is valid until the GDestroyNotify argument is called.</p></dd>
 <a name="glsT"></a><h3 class="title">T</h3>
@@ -80,7 +82,6 @@
 </p></dd>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/api-index-deprecated.html b/docs/libs/html/api-index-deprecated.html
index db3a9fc..1bb359a 100644
--- a/docs/libs/html/api-index-deprecated.html
+++ b/docs/libs/html/api-index-deprecated.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Index of deprecated API</title>
+<title>Index of deprecated API: GStreamer Bad Plugins 1.0 Library Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="prev" href="api-index-full.html" title="Index">
 <link rel="next" href="annotation-glossary.html" title="Annotation Glossary">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -53,7 +53,6 @@
 <dd></dd>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</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 032f36b..e7c13b4 100644
--- a/docs/libs/html/api-index-full.html
+++ b/docs/libs/html/api-index-full.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Index</title>
+<title>Index: GStreamer Bad Plugins 1.0 Library Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="prev" href="gstreamer-libs-hierarchy.html" title="Part II. Object Hierarchy">
 <link rel="next" href="api-index-deprecated.html" title="Index of deprecated API">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,12 +29,12 @@
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxI">I</a>
                      <span class="dim">|</span> 
+                  <a class="shortcut" href="#idxJ">J</a>
+                     <span class="dim">|</span> 
                   <a class="shortcut" href="#idxM">M</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxP">P</a>
                      <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxS">S</a>
-                     <span class="dim">|</span> 
                   <a class="shortcut" href="#idxT">T</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxV">V</a>
@@ -70,14 +70,26 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-get-latency" title="gst_aggregator_get_latency ()">gst_aggregator_get_latency</a>, function in <a class="link" href="gst-plugins-bad-libs-GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-iterate-sinkpads" title="gst_aggregator_iterate_sinkpads ()">gst_aggregator_iterate_sinkpads</a>, function in <a class="link" href="gst-plugins-bad-libs-GstAggregator.html" title="GstAggregator">GstAggregator</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-drop-buffer" title="gst_aggregator_pad_drop_buffer ()">gst_aggregator_pad_drop_buffer</a>, function in <a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-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="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-is-eos" title="gst_aggregator_pad_is_eos ()">gst_aggregator_pad_is_eos</a>, function in <a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-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="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
 </dt>
 <dd></dd>
@@ -135,13 +147,25 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-add-gl-sync-meta" title="gst_buffer_add_gl_sync_meta ()">gst_buffer_add_gl_sync_meta</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html#gst-buffer-add-mpeg-video-meta" title="gst_buffer_add_mpeg_video_meta ()">gst_buffer_add_mpeg_video_meta</a>, function in <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html" title="gstmpegvideometa">gstmpegvideometa</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-get-gl-sync-meta" title="gst_buffer_get_gl_sync_meta()">gst_buffer_get_gl_sync_meta</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html#gst-buffer-get-mpeg-video-meta" title="gst_buffer_get_mpeg_video_meta()">gst_buffer_get_mpeg_video_meta</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html" title="gstmpegvideometa">gstmpegvideometa</a>
 </dt>
 <dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS" title="GST_BUFFER_POOL_OPTION_GL_SYNC_META">GST_BUFFER_POOL_OPTION_GL_SYNC_META</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
 <a name="idxC"></a><h3 class="title">C</h3>
 <dt>
 GstCameraBinMode, enum in gstcamerabin-enum
@@ -247,58 +271,6 @@
 <dd></dd>
 <a name="idxG"></a><h3 class="title">G</h3>
 <dt>
-get_aperture, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_capabilities, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_config, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_ev_compensation, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_exposure, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_flash_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_flicker_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_focus_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_iso_speed, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_noise_reduction, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_scene_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_white_balance_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-get_zoom, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLAllocator-struct" title="GstGLAllocator">GstGLAllocator</a>, struct in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
 </dt>
 <dd></dd>
@@ -311,6 +283,18 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLBaseFilter.html#GstGLBaseFilter-struct" title="GstGLBaseFilter">GstGLBaseFilter</a>, struct in <a class="link" href="GstGLBaseFilter.html" title="GstGLBaseFilter">GstGLBaseFilter</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstGLBaseFilter.html#GstGLBaseFilter--context" title="The “context” property">GstGLBaseFilter:context</a>, object property in <a class="link" href="GstGLBaseFilter.html" title="GstGLBaseFilter">GstGLBaseFilter</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstGLBaseFilter.html#GstGLBaseFilterClass" title="GstGLBaseFilterClass">GstGLBaseFilterClass</a>, struct in <a class="link" href="GstGLBaseFilter.html" title="GstGLBaseFilter">GstGLBaseFilter</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLBufferPool.html#GstGLBufferPool-struct" title="struct GstGLBufferPool">GstGLBufferPool</a>, struct in <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool">GstGLBufferPool</a>
 </dt>
 <dd></dd>
@@ -343,6 +327,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html#GstGLContextEagl" title="struct GstGLContextEagl">GstGLContextEagl</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html" title="GstGLContextEagl">GstGLContextEagl</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#GstGLContextEGL" title="struct GstGLContextEGL">GstGLContextEGL</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">GstGLContextEGL</a>
 </dt>
 <dd></dd>
@@ -367,6 +355,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLDisplay.html#GstGLDisplay-create-context" title="The “create-context” signal">GstGLDisplay::create-context</a>, object signal 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#GstGLDisplayProjection" title="enum GstGLDisplayProjection">GstGLDisplayProjection</a>, enum in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -379,23 +371,19 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="GstGLFilter.html#GstGLFilter-struct" title="struct GstGLFilter">GstGLFilter</a>, struct in <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
+<a class="link" href="GstGLFilter.html#GstGLFilter-struct" title="GstGLFilter">GstGLFilter</a>, struct in <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="GstGLFilter.html#GstGLFilter--other-context" title="The “other-context” property">GstGLFilter:other-context</a>, object property in <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
+<a class="link" href="GstGLFilter.html#GstGLFilterClass" title="GstGLFilterClass">GstGLFilterClass</a>, struct in <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="GstGLFilter.html#GstGLFilterClass" title="struct GstGLFilterClass">GstGLFilterClass</a>, struct in <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
+<a class="link" href="GstGLFramebuffer.html#GstGLFramebuffer-struct" title="struct GstGLFramebuffer">GstGLFramebuffer</a>, struct in <a class="link" href="GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
 </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>
+<a class="link" href="GstGLFramebuffer.html#GstGLFramebufferClass" title="struct GstGLFramebufferClass">GstGLFramebufferClass</a>, struct in <a class="link" href="GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
 </dt>
 <dd></dd>
 <dt>
@@ -403,10 +391,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemoryFlags" title="enum GstGLMemoryFlags">GstGLMemoryFlags</a>, enum in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
-</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>
@@ -439,11 +423,15 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta">GstGLSyncMeta</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLUpload.html#GstGLUpload-struct" title="GstGLUpload">GstGLUpload</a>, struct in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
 </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>
+<a class="link" href="GstGLUploadMeta.html#GstGLUploadMeta-struct" title="GstGLUploadMeta">GstGLUploadMeta</a>, struct in <a class="link" href="GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
 </dt>
 <dd></dd>
 <dt>
@@ -451,6 +439,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLWindow.html#GstGLWindow-key-event" title="The “key-event” signal">GstGLWindow::key-event</a>, object signal in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstGLWindow.html#GstGLWindow-mouse-event" title="The “mouse-event” signal">GstGLWindow::mouse-event</a>, object signal in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLWindowAndroid.html#GstGLWindowAndroidEGL" title="struct GstGLWindowAndroidEGL">GstGLWindowAndroidEGL</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLWindowAndroid.html" title="GstGLWindowAndroid">GstGLWindowAndroid</a>
 </dt>
 <dd></dd>
@@ -543,6 +539,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-caps-replace-all-caps-features" title="gst_gl_caps_replace_all_caps_features ()">gst_gl_caps_replace_all_caps_features</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-GstGLAPI.html#gst-gl-check-extension" title="gst_gl_check_extension ()">gst_gl_check_extension</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
 </dt>
 <dd></dd>
@@ -559,7 +559,11 @@
 </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>
+<a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-set-caps" title="gst_gl_color_convert_set_caps ()">gst_gl_color_convert_set_caps</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-transform-caps" title="gst_gl_color_convert_transform_caps ()">gst_gl_color_convert_transform_caps</a>, function in <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
 </dt>
 <dd></dd>
 <dt>
@@ -591,6 +595,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-current-context" title="gst_gl_context_cocoa_get_current_context ()">gst_gl_context_cocoa_get_current_context</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">GstGLContextCocoa</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-pixel-format" title="gst_gl_context_cocoa_get_pixel_format ()">gst_gl_context_cocoa_get_pixel_format</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">GstGLContextCocoa</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-new" title="gst_gl_context_cocoa_new ()">gst_gl_context_cocoa_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">GstGLContextCocoa</a>
 </dt>
 <dd></dd>
@@ -615,6 +627,26 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-destroy" title="gst_gl_context_destroy ()">gst_gl_context_destroy</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-GstGLContextEagl.html#gst-gl-context-eagl-get-current-context" title="gst_gl_context_eagl_get_current_context ()">gst_gl_context_eagl_get_current_context</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html" title="GstGLContextEagl">GstGLContextEagl</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-new" title="gst_gl_context_eagl_new ()">gst_gl_context_eagl_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html" title="GstGLContextEagl">GstGLContextEagl</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-current-context" title="gst_gl_context_egl_get_current_context ()">gst_gl_context_egl_get_current_context</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">GstGLContextEGL</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-proc-address" title="gst_gl_context_egl_get_proc_address ()">gst_gl_context_egl_get_proc_address</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">GstGLContextEGL</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-new" title="gst_gl_context_egl_new ()">gst_gl_context_egl_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">GstGLContextEGL</a>
 </dt>
 <dd></dd>
@@ -627,6 +659,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-fill-info" title="gst_gl_context_fill_info ()">gst_gl_context_fill_info</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-gen-fbo" title="gst_gl_context_gen_fbo ()">gst_gl_context_gen_fbo</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -639,6 +675,18 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-get-current" title="gst_gl_context_get_current ()">gst_gl_context_get_current</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-current-gl-api" title="gst_gl_context_get_current_gl_api ()">gst_gl_context_get_current_gl_api</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-current-gl-context" title="gst_gl_context_get_current_gl_context ()">gst_gl_context_get_current_gl_context</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-display" title="gst_gl_context_get_display ()">gst_gl_context_get_display</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
 </dt>
 <dd></dd>
@@ -675,6 +723,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-current-context" title="gst_gl_context_glx_get_current_context ()">gst_gl_context_glx_get_current_context</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">GstGLContextGLX</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-proc-address" title="gst_gl_context_glx_get_proc_address ()">gst_gl_context_glx_get_proc_address</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">GstGLContextGLX</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-new" title="gst_gl_context_glx_new ()">gst_gl_context_glx_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">GstGLContextGLX</a>
 </dt>
 <dd></dd>
@@ -699,11 +755,15 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo" title="gst_gl_context_use_fbo ()">gst_gl_context_use_fbo</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo-v2" title="gst_gl_context_use_fbo_v2 ()">gst_gl_context_use_fbo_v2</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-context-use-fbo-v2" title="gst_gl_context_use_fbo_v2 ()">gst_gl_context_use_fbo_v2</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-current-context" title="gst_gl_context_wgl_get_current_context ()">gst_gl_context_wgl_get_current_context</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html" title="GstGLContextWGL">GstGLContextWGL</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-proc-address" title="gst_gl_context_wgl_get_proc_address ()">gst_gl_context_wgl_get_proc_address</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html" title="GstGLContextWGL">GstGLContextWGL</a>
 </dt>
 <dd></dd>
 <dt>
@@ -711,10 +771,30 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLDisplay.html#gst-gl-display-add-context" title="gst_gl_display_add_context ()">gst_gl_display_add_context</a>, function in <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
+</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-filter-gl-api" title="gst_gl_display_filter_gl_api ()">gst_gl_display_filter_gl_api</a>, function 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-gl-api" title="gst_gl_display_get_gl_api ()">gst_gl_display_get_gl_api</a>, function 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-gl-context-for-thread" title="gst_gl_display_get_gl_context_for_thread ()">gst_gl_display_get_gl_context_for_thread</a>, function 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" title="gst_gl_display_get_handle ()">gst_gl_display_get_handle</a>, function 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>
@@ -735,7 +815,11 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-display" title="gst_gl_ensure_display ()">gst_gl_ensure_display</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
+<a class="link" href="GstGLDownload.html#gst-gl-download-transform-caps" title="gst_gl_download_transform_caps ()">gst_gl_download_transform_caps</a>, function in <a class="link" href="GstGLDownload.html" title="GstGLDownload">GstGLDownload</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-element-data" title="gst_gl_ensure_element_data ()">gst_gl_ensure_element_data</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
 <dt>
@@ -755,23 +839,19 @@
 </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>
+<a class="link" href="GstGLFramebuffer.html#gst-gl-framebuffer-delete" title="gst_gl_framebuffer_delete ()">gst_gl_framebuffer_delete</a>, function in <a class="link" href="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>
+<a class="link" href="GstGLFramebuffer.html#gst-gl-framebuffer-generate" title="gst_gl_framebuffer_generate ()">gst_gl_framebuffer_generate</a>, function in <a class="link" href="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>
+<a class="link" href="GstGLFramebuffer.html#gst-gl-framebuffer-new" title="gst_gl_framebuffer_new ()">gst_gl_framebuffer_new</a>, function in <a class="link" href="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>
+<a class="link" href="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="GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
 </dt>
 <dd></dd>
 <dt>
@@ -779,6 +859,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-get-plane-data-size" title="gst_gl_get_plane_data_size ()">gst_gl_get_plane_data_size</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>
@@ -799,22 +883,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAGS:CAPS" title="GST_GL_MEMORY_FLAGS()">GST_GL_MEMORY_FLAGS</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-IS-SET:CAPS" title="GST_GL_MEMORY_FLAG_IS_SET()">GST_GL_MEMORY_FLAG_IS_SET</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-SET:CAPS" title="GST_GL_MEMORY_FLAG_SET()">GST_GL_MEMORY_FLAG_SET</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-UNSET:CAPS" title="GST_GL_MEMORY_FLAG_UNSET()">GST_GL_MEMORY_FLAG_UNSET</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-init" title="gst_gl_memory_init ()">gst_gl_memory_init</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">GstGLMemory</a>
 </dt>
 <dd></dd>
@@ -843,6 +911,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-run-query" title="gst_gl_run_query ()">gst_gl_run_query</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-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>
@@ -899,6 +971,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-program-handle" title="gst_gl_shader_get_program_handle ()">gst_gl_shader_get_program_handle</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-get-vertex-source" title="gst_gl_shader_get_vertex_source ()">gst_gl_shader_get_vertex_source</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
 </dt>
 <dd></dd>
@@ -1031,27 +1107,43 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-api-get-type" title="gst_gl_sync_meta_api_get_type ()">gst_gl_sync_meta_api_get_type</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-get-info" title="gst_gl_sync_meta_get_info ()">gst_gl_sync_meta_get_info</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-set-sync-point" title="gst_gl_sync_meta_set_sync_point ()">gst_gl_sync_meta_set_sync_point</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-wait" title="gst_gl_sync_meta_wait ()">gst_gl_sync_meta_wait</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">GstGLSyncMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <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>
-<a class="link" href="GstGLUpload.html#gst-gl-upload-get-format" title="gst_gl_upload_get_format ()">gst_gl_upload_get_format</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-get-caps" title="gst_gl_upload_get_caps ()">gst_gl_upload_get_caps</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
 </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>
+<a class="link" href="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="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>
+<a class="link" href="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="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>
+<a class="link" href="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="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>
+<a class="link" href="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="GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
 </dt>
 <dd></dd>
 <dt>
@@ -1063,11 +1155,7 @@
 </dt>
 <dd></dd>
 <dt>
-<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>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-gl-texture-upload-meta" title="gst_gl_upload_perform_with_gl_texture_upload_meta ()">gst_gl_upload_perform_with_gl_texture_upload_meta</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-propose-allocation" title="gst_gl_upload_propose_allocation ()">gst_gl_upload_propose_allocation</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
 </dt>
 <dd></dd>
 <dt>
@@ -1075,7 +1163,11 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="GstGLUpload.html#gst-gl-upload-set-format" title="gst_gl_upload_set_format ()">gst_gl_upload_set_format</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-set-caps" title="gst_gl_upload_set_caps ()">gst_gl_upload_set_caps</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstGLUpload.html#gst-gl-upload-transform-caps" title="gst_gl_upload_transform_caps ()">gst_gl_upload_transform_caps</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
 </dt>
 <dd></dd>
 <dt>
@@ -1123,10 +1215,18 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLWindow.html#gst-gl-window-get-surface-dimensions" title="gst_gl_window_get_surface_dimensions ()">gst_gl_window_get_surface_dimensions</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLWindow.html#gst-gl-window-get-window-handle" title="gst_gl_window_get_window_handle ()">gst_gl_window_get_window_handle</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLWindow.html#gst-gl-window-handle-events" title="gst_gl_window_handle_events ()">gst_gl_window_handle_events</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLWindow.html#gst-gl-window-is-running" title="gst_gl_window_is_running ()">gst_gl_window_is_running</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
 </dt>
 <dd></dd>
@@ -1163,6 +1263,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLWindow.html#gst-gl-window-set-preferred-size" title="gst_gl_window_set_preferred_size ()">gst_gl_window_set_preferred_size</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLWindow.html#gst-gl-window-set-resize-callback" title="gst_gl_window_set_resize_callback ()">gst_gl_window_set_resize_callback</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
 </dt>
 <dd></dd>
@@ -1171,6 +1275,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLWindow.html#gst-gl-window-show" title="gst_gl_window_show ()">gst_gl_window_show</a>, function in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-GstGLWindowWayland.html#gst-gl-window-wayland-egl-new" title="gst_gl_window_wayland_egl_new ()">gst_gl_window_wayland_egl_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLWindowWayland.html" title="GstGLWindowWayland">GstGLWindowWayland</a>
 </dt>
 <dd></dd>
@@ -1436,12 +1544,117 @@
 <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>
-<a name="idxM"></a><h3 class="title">M</h3>
+<a name="idxJ"></a><h3 class="title">J</h3>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS" title="GST_MAP_GL">GST_MAP_GL</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">gstglmemory</a>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegEntropyCodingMode" title="enum GstJpegEntropyCodingMode">GstJpegEntropyCodingMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameComponent" title="struct GstJpegFrameComponent">GstJpegFrameComponent</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr" title="struct GstJpegFrameHdr">GstJpegFrameHdr</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable" title="struct GstJpegHuffmanTable">GstJpegHuffmanTable</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" title="struct GstJpegHuffmanTables">GstJpegHuffmanTables</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegProfile" title="enum GstJpegProfile">GstJpegProfile</a>, enum in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable" title="struct GstJpegQuantTable">GstJpegQuantTable</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanComponent" title="struct GstJpegScanComponent">GstJpegScanComponent</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr" title="struct GstJpegScanHdr">GstJpegScanHdr</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment">GstJpegSegment</a>, struct in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-huffman-tables" title="gst_jpeg_get_default_huffman_tables ()">gst_jpeg_get_default_huffman_tables</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-quantization-tables" title="gst_jpeg_get_default_quantization_tables ()">gst_jpeg_get_default_quantization_tables</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MAX:CAPS" title="GST_JPEG_MARKER_APP_MAX">GST_JPEG_MARKER_APP_MAX</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MIN:CAPS" title="GST_JPEG_MARKER_APP_MIN">GST_JPEG_MARKER_APP_MIN</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MAX:CAPS" title="GST_JPEG_MARKER_RST_MAX">GST_JPEG_MARKER_RST_MAX</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MIN:CAPS" title="GST_JPEG_MARKER_RST_MIN">GST_JPEG_MARKER_RST_MIN</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MAX:CAPS" title="GST_JPEG_MARKER_SOF_MAX">GST_JPEG_MARKER_SOF_MAX</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MIN:CAPS" title="GST_JPEG_MARKER_SOF_MIN">GST_JPEG_MARKER_SOF_MIN</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-FRAME-COMPONENTS:CAPS" title="GST_JPEG_MAX_FRAME_COMPONENTS">GST_JPEG_MAX_FRAME_COMPONENTS</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-QUANT-ELEMENTS:CAPS" title="GST_JPEG_MAX_QUANT_ELEMENTS">GST_JPEG_MAX_QUANT_ELEMENTS</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-SCAN-COMPONENTS:CAPS" title="GST_JPEG_MAX_SCAN_COMPONENTS">GST_JPEG_MAX_SCAN_COMPONENTS</a>, macro in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-parse" title="gst_jpeg_parse ()">gst_jpeg_parse</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-frame-header" title="gst_jpeg_segment_parse_frame_header ()">gst_jpeg_segment_parse_frame_header</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-huffman-table" title="gst_jpeg_segment_parse_huffman_table ()">gst_jpeg_segment_parse_huffman_table</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-quantization-table" title="gst_jpeg_segment_parse_quantization_table ()">gst_jpeg_segment_parse_quantization_table</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-restart-interval" title="gst_jpeg_segment_parse_restart_interval ()">gst_jpeg_segment_parse_restart_interval</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-scan-header" title="gst_jpeg_segment_parse_scan_header ()">gst_jpeg_segment_parse_scan_header</a>, function in <a class="link" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">jpegparser</a>
+</dt>
+<dd></dd>
+<a name="idxM"></a><h3 class="title">M</h3>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-vc1parser.html#MAX-HRD-NUM-LEAKY-BUCKETS:CAPS" title="MAX_HRD_NUM_LEAKY_BUCKETS">MAX_HRD_NUM_LEAKY_BUCKETS</a>, macro in <a class="link" href="gst-plugins-bad-libs-vc1parser.html" title="vc1parser">vc1parser</a>
 </dt>
 <dd></dd>
@@ -2323,67 +2536,111 @@
 <dd></dd>
 <a name="idxP"></a><h3 class="title">P</h3>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html">GstPhotography</a>, struct in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography">GstPhotography</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#GstPhotographyNoiseReduction">GstPhotographyNoiseReduction</a>, enum in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps">GstPhotographyCaps</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</a>, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCapturePrepared" title="GstPhotographyCapturePrepared ()">GstPhotographyCapturePrepared</a>, user_function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-aperture">gst_photography_get_aperture</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode">GstPhotographyColorToneMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-capabilities">gst_photography_get_capabilities</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode">GstPhotographyFlashMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-config">gst_photography_get_config</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode">GstPhotographyFlickerReductionMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-ev-compensation">gst_photography_get_ev_compensation</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode">GstPhotographyFocusMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-exposure">gst_photography_get_exposure</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusStatus" title="enum GstPhotographyFocusStatus">GstPhotographyFocusStatus</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-flash-mode">gst_photography_get_flash_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction">GstPhotographyNoiseReduction</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-gst_photography_get_flicker_mode, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode">GstPhotographySceneMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-gst_photography_get_focus_mode, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyShakeRisk" title="enum GstPhotographyShakeRisk">GstPhotographyShakeRisk</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-iso-speed">gst_photography_get_iso_speed</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode">GstPhotographyWhiteBalanceMode</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-noise-reduction">gst_photography_get_noise_reduction</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" title="GST_PHOTOGRAPHY_AUTOFOCUS_DONE">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-scene-mode">gst_photography_get_scene_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-aperture" title="gst_photography_get_aperture ()">gst_photography_get_aperture</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-white-balance-mode">gst_photography_get_white_balance_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-capabilities" title="gst_photography_get_capabilities ()">gst_photography_get_capabilities</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-get-zoom">gst_photography_get_zoom</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-color-tone-mode" title="gst_photography_get_color_tone_mode ()">gst_photography_get_color_tone_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-config" title="gst_photography_get_config ()">gst_photography_get_config</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-ev-compensation" title="gst_photography_get_ev_compensation ()">gst_photography_get_ev_compensation</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-exposure" title="gst_photography_get_exposure ()">gst_photography_get_exposure</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flash-mode" title="gst_photography_get_flash_mode ()">gst_photography_get_flash_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flicker-mode" title="gst_photography_get_flicker_mode ()">gst_photography_get_flicker_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-focus-mode" title="gst_photography_get_focus_mode ()">gst_photography_get_focus_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-iso-speed" title="gst_photography_get_iso_speed ()">gst_photography_get_iso_speed</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-noise-reduction" title="gst_photography_get_noise_reduction ()">gst_photography_get_noise_reduction</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-scene-mode" title="gst_photography_get_scene_mode ()">gst_photography_get_scene_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-white-balance-mode" title="gst_photography_get_white_balance_mode ()">gst_photography_get_white_balance_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-zoom" title="gst_photography_get_zoom ()">gst_photography_get_zoom</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
@@ -2391,180 +2648,127 @@
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-prepare-for-capture">gst_photography_prepare_for_capture</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-prepare-for-capture" title="gst_photography_prepare_for_capture ()">gst_photography_prepare_for_capture</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_APERTURE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-APERTURE:CAPS" title="GST_PHOTOGRAPHY_PROP_APERTURE">GST_PHOTOGRAPHY_PROP_APERTURE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_CAPABILITIES, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS" title="GST_PHOTOGRAPHY_PROP_CAPABILITIES">GST_PHOTOGRAPHY_PROP_CAPABILITIES</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_EV_COMP, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS" title="GST_PHOTOGRAPHY_PROP_EV_COMP">GST_PHOTOGRAPHY_PROP_EV_COMP</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_FLASH_MODE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FLASH_MODE">GST_PHOTOGRAPHY_PROP_FLASH_MODE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_FLICKER_MODE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FLICKER_MODE">GST_PHOTOGRAPHY_PROP_FLICKER_MODE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_FOCUS_MODE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FOCUS_MODE">GST_PHOTOGRAPHY_PROP_FOCUS_MODE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_FOCUS_STATUS, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS" title="GST_PHOTOGRAPHY_PROP_FOCUS_STATUS">GST_PHOTOGRAPHY_PROP_FOCUS_STATUS</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS" title="GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS">GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS" title="GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS">GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_ISO_SPEED, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS" title="GST_PHOTOGRAPHY_PROP_ISO_SPEED">GST_PHOTOGRAPHY_PROP_ISO_SPEED</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS" title="GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION">GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_SCENE_MODE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_SCENE_MODE">GST_PHOTOGRAPHY_PROP_SCENE_MODE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_SHAKE_RISK, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_PROP_SHAKE_RISK">GST_PHOTOGRAPHY_PROP_SHAKE_RISK</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_WB_MODE, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_WB_MODE">GST_PHOTOGRAPHY_PROP_WB_MODE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-GST_PHOTOGRAPHY_PROP_ZOOM, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ZOOM:CAPS" title="GST_PHOTOGRAPHY_PROP_ZOOM">GST_PHOTOGRAPHY_PROP_ZOOM</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-aperture">gst_photography_set_aperture</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-aperture" title="gst_photography_set_aperture ()">gst_photography_set_aperture</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-autofocus">gst_photography_set_autofocus</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-autofocus" title="gst_photography_set_autofocus ()">gst_photography_set_autofocus</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-config">gst_photography_set_config</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-color-tone-mode" title="gst_photography_set_color_tone_mode ()">gst_photography_set_color_tone_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-ev-compensation">gst_photography_set_ev_compensation</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-config" title="gst_photography_set_config ()">gst_photography_set_config</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-exposure">gst_photography_set_exposure</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-ev-compensation" title="gst_photography_set_ev_compensation ()">gst_photography_set_ev_compensation</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-flash-mode">gst_photography_set_flash_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-exposure" title="gst_photography_set_exposure ()">gst_photography_set_exposure</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-gst_photography_set_flicker_mode, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flash-mode" title="gst_photography_set_flash_mode ()">gst_photography_set_flash_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-gst_photography_set_focus_mode, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flicker-mode" title="gst_photography_set_flicker_mode ()">gst_photography_set_flicker_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-iso-speed">gst_photography_set_iso_speed</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-focus-mode" title="gst_photography_set_focus_mode ()">gst_photography_set_focus_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-noise-reduction">gst_photography_set_noise_reduction</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-iso-speed" title="gst_photography_set_iso_speed ()">gst_photography_set_iso_speed</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-scene-mode">gst_photography_set_scene_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-noise-reduction" title="gst_photography_set_noise_reduction ()">gst_photography_set_noise_reduction</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-white-balance-mode">gst_photography_set_white_balance_mode</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-scene-mode" title="gst_photography_set_scene_mode ()">gst_photography_set_scene_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#gst-photography-set-zoom">gst_photography_set_zoom</a>, function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-white-balance-mode" title="gst_photography_set_white_balance_mode ()">gst_photography_set_white_balance_mode</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS">GST_PHOTOGRAPHY_SHAKE_RISK</a>, macro in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-zoom" title="gst_photography_set_zoom ()">gst_photography_set_zoom</a>, function in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <dt>
-prepare_for_capture, user_function in gstphotography
-</dt>
-<dd></dd>
-<a name="idxS"></a><h3 class="title">S</h3>
-<dt>
-set_aperture, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_autofocus, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_config, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_ev_compensation, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_exposure, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_flash_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_flicker_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_focus_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_iso_speed, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_noise_reduction, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_scene_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_white_balance_mode, user_function in gstphotography
-</dt>
-<dd></dd>
-<dt>
-set_zoom, user_function in gstphotography
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_SHAKE_RISK">GST_PHOTOGRAPHY_SHAKE_RISK</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">GstPhotography</a>
 </dt>
 <dd></dd>
 <a name="idxT"></a><h3 class="title">T</h3>
@@ -2744,7 +2948,6 @@
 <dd></dd>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/base.html b/docs/libs/html/base.html
index 3d9578b..4e4f768 100644
--- a/docs/libs/html/base.html
+++ b/docs/libs/html/base.html
@@ -2,13 +2,13 @@
 <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>
+<title>GStreamer Base classes from gst-plugins-bad: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstAggregator.html" title="GstAggregator">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -33,7 +33,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/ch07.html b/docs/libs/html/ch07.html
new file mode 100644
index 0000000..b6170a0
--- /dev/null
+++ b/docs/libs/html/ch07.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Interfaces: GStreamer Bad Plugins 1.0 Library Reference Manual</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-GstGLWindowX11.html" title="GstGLWindowX11">
+<link rel="next" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-GstGLWindowX11.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstPhotography.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="id-1.2.10"></a>Interfaces</h2></div></div></div>
+<div class="toc"><dl class="toc"><dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstPhotography.html">GstPhotography</a></span><span class="refpurpose"> — Interface for digital image capture elements</span>
+</dt></dl></div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/codecparsers.html b/docs/libs/html/codecparsers.html
index 0ba5b7a..a776dea 100644
--- a/docs/libs/html/codecparsers.html
+++ b/docs/libs/html/codecparsers.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Bitstream parsing Library</title>
+<title>Bitstream parsing Library: GStreamer Bad Plugins 1.0 Library Reference Manual</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="compiling.html" title="Compiling">
 <link rel="next" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,6 +28,9 @@
 bitstream parsing.</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-jpegparser.html">jpegparser</a></span><span class="refpurpose"> — Convenience library for JPEG bitstream parsing.</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-mpegvideoparser.html">mpegvideoparser</a></span><span class="refpurpose"> — Convenience library for mpeg1 and 2 video
 bitstream parsing.</span>
 </dt>
@@ -50,7 +53,6 @@
       </p>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/compiling.html b/docs/libs/html/compiling.html
index 3f5f07c..be3610f 100644
--- a/docs/libs/html/compiling.html
+++ b/docs/libs/html/compiling.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Compiling</title>
+<title>Compiling: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gstreamer-plugins-bad.html" title="Part I. GStreamer Bad Plugins Libraries">
 <link rel="next" href="codecparsers.html" title="Bitstream parsing Library">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -58,7 +58,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gl.html b/docs/libs/html/gl.html
index d164584..039616a 100644
--- a/docs/libs/html/gl.html
+++ b/docs/libs/html/gl.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: OpenGL Helper Library</title>
+<title>OpenGL Helper Library: GStreamer Bad Plugins 1.0 Library Reference Manual</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-GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">
 <link rel="next" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLAPI.html">GstGLAPI</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose">buffer pool for <span class="type">GstGLMemory</span> objects</span>
+<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose"> — buffer pool for <span class="type">GstGLMemory</span> objects</span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="GstGLColorConvert.html">GstGLColorConvert</a></span><span class="refpurpose"> — an object that converts between color spaces/formats</span>
@@ -42,6 +42,9 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEGL.html">GstGLContextEGL</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEagl.html">GstGLContextEagl</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextGLX.html">GstGLContextGLX</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
@@ -57,10 +60,13 @@
 <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="GstGLBaseFilter.html">GstGLBaseFilter</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>
+<span class="refentrytitle"><a href="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>
@@ -69,10 +75,13 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglshader.html">GstGLShader</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLSyncMeta.html">GstGLSyncMeta</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <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>
+<span class="refentrytitle"><a href="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>
@@ -101,7 +110,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 628a54c..8cb0c8b 100644
--- a/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2
+++ b/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
-<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
 <book xmlns="http://www.devhelp.net/book" title="GStreamer Bad Plugins 1.0 Library Reference Manual" link="index.html" author="" name="gst-plugins-bad-libs-1.0" version="2" language="c">
   <chapters>
     <sub name="GStreamer Bad Plugins Libraries" link="gstreamer-plugins-bad.html">
       <sub name="Compiling" link="compiling.html"/>
       <sub name="Bitstream parsing Library" link="codecparsers.html">
         <sub name="h264parser" link="gst-plugins-bad-libs-h264parser.html"/>
+        <sub name="jpegparser" link="gst-plugins-bad-libs-jpegparser.html"/>
         <sub name="mpegvideoparser" link="gst-plugins-bad-libs-mpegvideoparser.html"/>
         <sub name="mpeg4parser" link="gst-plugins-bad-libs-mpeg4parser.html"/>
         <sub name="vc1parser" link="gst-plugins-bad-libs-vc1parser.html"/>
@@ -39,17 +39,20 @@
         <sub name="GstGLContext" link="GstGLContext.html"/>
         <sub name="GstGLContextCocoa" link="gst-plugins-bad-libs-GstGLContextCocoa.html"/>
         <sub name="GstGLContextEGL" link="gst-plugins-bad-libs-GstGLContextEGL.html"/>
+        <sub name="GstGLContextEagl" link="gst-plugins-bad-libs-GstGLContextEagl.html"/>
         <sub name="GstGLContextGLX" link="gst-plugins-bad-libs-GstGLContextGLX.html"/>
         <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="GstGLBaseFilter" link="GstGLBaseFilter.html"/>
         <sub name="GstGLFilter" link="GstGLFilter.html"/>
-        <sub name="GstGLFramebuffer" link="gst-plugins-bad-libs-GstGLFramebuffer.html"/>
+        <sub name="GstGLFramebuffer" link="GstGLFramebuffer.html"/>
         <sub name="GstGLMemory" link="gst-plugins-bad-libs-gstglmemory.html"/>
         <sub name="GstGLShader" link="gst-plugins-bad-libs-gstglshader.html"/>
+        <sub name="GstGLSyncMeta" link="gst-plugins-bad-libs-GstGLSyncMeta.html"/>
         <sub name="GstGLUpload" link="GstGLUpload.html"/>
-        <sub name="GstGLUploadMeta" link="gst-plugins-bad-libs-GstGLUploadMeta.html"/>
+        <sub name="GstGLUploadMeta" link="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"/>
@@ -59,6 +62,9 @@
         <sub name="GstGLWindowWin32" link="gst-plugins-bad-libs-GstGLWindowWin32.html"/>
         <sub name="GstGLWindowX11" link="gst-plugins-bad-libs-GstGLWindowX11.html"/>
       </sub>
+      <sub name="Interfaces" link="ch07.html">
+        <sub name="GstPhotography" link="gst-plugins-bad-libs-GstPhotography.html"/>
+      </sub>
     </sub>
     <sub name="Object Hierarchy" link="gstreamer-libs-hierarchy.html"/>
     <sub name="Index" link="api-index-full.html"/>
@@ -109,7 +115,33 @@
     <keyword type="struct" name="struct GstH264PicTiming" link="gst-plugins-bad-libs-h264parser.html#GstH264PicTiming"/>
     <keyword type="struct" name="struct GstH264BufferingPeriod" link="gst-plugins-bad-libs-h264parser.html#GstH264BufferingPeriod"/>
     <keyword type="struct" name="struct GstH264SEIMessage" link="gst-plugins-bad-libs-h264parser.html#GstH264SEIMessage"/>
-    <keyword type="" name="" link="gst-plugins-bad-libs-mpegvideoparser.html#id-1.2.4.4.6.2"/>
+    <keyword type="function" name="gst_jpeg_parse ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-parse" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_segment_parse_frame_header ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-frame-header" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_segment_parse_scan_header ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-scan-header" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_segment_parse_huffman_table ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-huffman-table" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_segment_parse_quantization_table ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-quantization-table" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_segment_parse_restart_interval ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-restart-interval" since="1.6"/>
+    <keyword type="function" name="gst_jpeg_get_default_quantization_tables ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-quantization-tables"/>
+    <keyword type="function" name="gst_jpeg_get_default_huffman_tables ()" link="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-huffman-tables" since="1.6"/>
+    <keyword type="macro" name="GST_JPEG_MAX_FRAME_COMPONENTS" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-FRAME-COMPONENTS:CAPS" since="1.6"/>
+    <keyword type="macro" name="GST_JPEG_MAX_SCAN_COMPONENTS" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-SCAN-COMPONENTS:CAPS" since="1.6"/>
+    <keyword type="macro" name="GST_JPEG_MAX_QUANT_ELEMENTS" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-QUANT-ELEMENTS:CAPS" since="1.6"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_SOF_MIN" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MIN:CAPS"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_SOF_MAX" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MAX:CAPS"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_APP_MIN" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MIN:CAPS"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_APP_MAX" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MAX:CAPS"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_RST_MIN" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MIN:CAPS"/>
+    <keyword type="macro" name="GST_JPEG_MARKER_RST_MAX" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MAX:CAPS"/>
+    <keyword type="enum" name="enum GstJpegEntropyCodingMode" link="gst-plugins-bad-libs-jpegparser.html#GstJpegEntropyCodingMode" since="1.6"/>
+    <keyword type="enum" name="enum GstJpegProfile" link="gst-plugins-bad-libs-jpegparser.html#GstJpegProfile" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegSegment" link="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegFrameHdr" link="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegFrameComponent" link="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameComponent" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegScanHdr" link="gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegScanComponent" link="gst-plugins-bad-libs-jpegparser.html#GstJpegScanComponent" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegHuffmanTables" link="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegHuffmanTable" link="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable" since="1.6"/>
+    <keyword type="struct" name="struct GstJpegQuantTable" link="gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable" since="1.6"/>
     <keyword type="function" name="gst_mpeg_video_parse ()" link="gst-plugins-bad-libs-mpegvideoparser.html#gst-mpeg-video-parse"/>
     <keyword type="function" name="gst_mpeg_video_parse_sequence_header ()" link="gst-plugins-bad-libs-mpegvideoparser.html#gst-mpeg-video-parse-sequence-header" deprecated="Use gst_mpeg_video_packet_parse_sequence_header() instead."/>
     <keyword type="function" name="gst_mpeg_video_parse_picture_header ()" link="gst-plugins-bad-libs-mpegvideoparser.html#gst-mpeg-video-parse-picture-header" deprecated="Use gst_mpeg_video_packet_parse_picture_header() instead."/>
@@ -384,10 +416,13 @@
     <keyword type="function" name="gst_aggregator_finish_buffer ()" link="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-finish-buffer"/>
     <keyword type="function" name="gst_aggregator_set_src_caps ()" link="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-set-src-caps"/>
     <keyword type="function" name="gst_aggregator_iterate_sinkpads ()" link="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-iterate-sinkpads"/>
+    <keyword type="function" name="gst_aggregator_get_latency ()" link="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-get-latency"/>
     <keyword type="struct" name="struct GstAggregator" link="gst-plugins-bad-libs-GstAggregator.html#GstAggregator"/>
     <keyword type="struct" name="struct GstAggregatorClass" link="gst-plugins-bad-libs-GstAggregator.html#GstAggregatorClass"/>
     <keyword type="function" name="gst_aggregator_pad_steal_buffer ()" link="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-steal-buffer"/>
     <keyword type="function" name="gst_aggregator_pad_get_buffer ()" link="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-get-buffer"/>
+    <keyword type="function" name="gst_aggregator_pad_drop_buffer ()" link="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-drop-buffer"/>
+    <keyword type="function" name="gst_aggregator_pad_is_eos ()" link="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-is-eos"/>
     <keyword type="struct" name="struct GstAggregatorPad" link="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad"/>
     <keyword type="struct" name="struct GstAggregatorPadClass" link="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPadClass"/>
     <keyword type="struct" name="struct GstVideoAggregator" link="gst-plugins-bad-libs-GstVideoAggregator.html#GstVideoAggregator"/>
@@ -409,7 +444,8 @@
     <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_set_caps ()" link="GstGLColorConvert.html#gst-gl-color-convert-set-caps"/>
+    <keyword type="function" name="gst_gl_color_convert_transform_caps ()" link="GstGLColorConvert.html#gst-gl-color-convert-transform-caps"/>
     <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"/>
@@ -421,6 +457,7 @@
     <keyword type="function" name="gst_gl_context_new ()" link="GstGLContext.html#gst-gl-context-new" since="1.4"/>
     <keyword type="function" name="gst_gl_context_new_wrapped ()" link="GstGLContext.html#gst-gl-context-new-wrapped" since="1.4"/>
     <keyword type="function" name="gst_gl_context_create ()" link="GstGLContext.html#gst-gl-context-create" since="1.4"/>
+    <keyword type="function" name="gst_gl_context_destroy ()" link="GstGLContext.html#gst-gl-context-destroy" since="1.6"/>
     <keyword type="function" name="gst_gl_context_activate ()" link="GstGLContext.html#gst-gl-context-activate" since="1.4"/>
     <keyword type="function" name="gst_gl_context_default_get_proc_address ()" link="GstGLContext.html#gst-gl-context-default-get-proc-address"/>
     <keyword type="function" name="gst_gl_context_get_proc_address ()" link="GstGLContext.html#gst-gl-context-get-proc-address" since="1.4"/>
@@ -431,30 +468,52 @@
     <keyword type="function" name="gst_gl_context_get_gl_api ()" link="GstGLContext.html#gst-gl-context-get-gl-api" since="1.4"/>
     <keyword type="function" name="gst_gl_context_get_gl_context ()" link="GstGLContext.html#gst-gl-context-get-gl-context" since="1.4"/>
     <keyword type="function" name="gst_gl_context_get_gl_platform ()" link="GstGLContext.html#gst-gl-context-get-gl-platform" since="1.4"/>
-    <keyword type="function" name="gst_gl_context_get_thread ()" link="GstGLContext.html#gst-gl-context-get-thread" since="1.4.5"/>
+    <keyword type="function" name="gst_gl_context_get_current_gl_context ()" link="GstGLContext.html#gst-gl-context-get-current-gl-context" since="1.6"/>
+    <keyword type="function" name="gst_gl_context_get_current_gl_api ()" link="GstGLContext.html#gst-gl-context-get-current-gl-api" since="1.6"/>
+    <keyword type="function" name="gst_gl_context_get_thread ()" link="GstGLContext.html#gst-gl-context-get-thread" since="1.6"/>
     <keyword type="function" name="gst_gl_context_can_share ()" link="GstGLContext.html#gst-gl-context-can-share" since="1.6"/>
     <keyword type="function" name="gst_gl_context_check_feature ()" link="GstGLContext.html#gst-gl-context-check-feature" since="1.4"/>
     <keyword type="function" name="gst_gl_context_check_gl_version ()" link="GstGLContext.html#gst-gl-context-check-gl-version" since="1.4"/>
     <keyword type="function" name="gst_gl_context_get_gl_version ()" link="GstGLContext.html#gst-gl-context-get-gl-version" since="1.4"/>
+    <keyword type="function" name="gst_gl_context_fill_info ()" link="GstGLContext.html#gst-gl-context-fill-info" since="1.6"/>
+    <keyword type="function" name="gst_gl_context_get_current ()" link="GstGLContext.html#gst-gl-context-get-current" since="1.6"/>
     <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"/>
+    <keyword type="function" name="gst_gl_context_cocoa_get_current_context ()" link="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-current-context"/>
+    <keyword type="function" name="gst_gl_context_cocoa_get_pixel_format ()" link="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-pixel-format"/>
     <keyword type="struct" name="struct GstGLContextCocoa" link="gst-plugins-bad-libs-GstGLContextCocoa.html#GstGLContextCocoa"/>
     <keyword type="function" name="gst_gl_context_egl_new ()" link="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-new"/>
+    <keyword type="function" name="gst_gl_context_egl_get_current_context ()" link="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-current-context"/>
+    <keyword type="function" name="gst_gl_context_egl_get_proc_address ()" link="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-proc-address"/>
     <keyword type="struct" name="struct GstGLContextEGL" link="gst-plugins-bad-libs-GstGLContextEGL.html#GstGLContextEGL"/>
+    <keyword type="function" name="gst_gl_context_eagl_new ()" link="gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-new"/>
+    <keyword type="function" name="gst_gl_context_eagl_get_current_context ()" link="gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-get-current-context"/>
+    <keyword type="struct" name="struct GstGLContextEagl" link="gst-plugins-bad-libs-GstGLContextEagl.html#GstGLContextEagl"/>
     <keyword type="function" name="gst_gl_context_glx_new ()" link="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-new"/>
+    <keyword type="function" name="gst_gl_context_glx_get_current_context ()" link="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-current-context"/>
+    <keyword type="function" name="gst_gl_context_glx_get_proc_address ()" link="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-proc-address"/>
     <keyword type="struct" name="struct GstGLContextGLX" link="gst-plugins-bad-libs-GstGLContextGLX.html#GstGLContextGLX"/>
     <keyword type="function" name="gst_gl_context_wgl_new ()" link="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-new"/>
+    <keyword type="function" name="gst_gl_context_wgl_get_current_context ()" link="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-current-context"/>
+    <keyword type="function" name="gst_gl_context_wgl_get_proc_address ()" link="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-proc-address"/>
     <keyword type="struct" name="struct GstGLContextWGL" link="gst-plugins-bad-libs-GstGLContextWGL.html#GstGLContextWGL"/>
     <keyword type="function" name="gst_gl_display_new ()" link="GstGLDisplay.html#gst-gl-display-new" since="1.4"/>
     <keyword type="function" name="gst_gl_display_get_handle_type ()" link="GstGLDisplay.html#gst-gl-display-get-handle-type" since="1.4"/>
+    <keyword type="function" name="gst_gl_display_filter_gl_api ()" link="GstGLDisplay.html#gst-gl-display-filter-gl-api"/>
+    <keyword type="function" name="gst_gl_display_get_gl_api ()" link="GstGLDisplay.html#gst-gl-display-get-gl-api"/>
+    <keyword type="function" name="gst_gl_display_add_context ()" link="GstGLDisplay.html#gst-gl-display-add-context" since="1.6"/>
+    <keyword type="function" name="gst_gl_display_get_gl_context_for_thread ()" link="GstGLDisplay.html#gst-gl-display-get-gl-context-for-thread" since="1.6"/>
+    <keyword type="function" name="gst_gl_display_get_handle ()" link="GstGLDisplay.html#gst-gl-display-get-handle"/>
     <keyword type="function" name="gst_context_get_gl_display ()" link="GstGLDisplay.html#gst-context-get-gl-display" since="1.4"/>
     <keyword type="function" name="gst_context_set_gl_display ()" link="GstGLDisplay.html#gst-context-set-gl-display" since="1.4"/>
     <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="signal" name="The “create-context” signal" link="GstGLDisplay.html#GstGLDisplay-create-context"/>
     <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_transform_caps ()" link="GstGLDownload.html#gst-gl-download-transform-caps"/>
     <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"/>
@@ -466,24 +525,21 @@
     <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="struct" name="GstGLBaseFilter" link="GstGLBaseFilter.html#GstGLBaseFilter-struct"/>
+    <keyword type="struct" name="GstGLBaseFilterClass" link="GstGLBaseFilter.html#GstGLBaseFilterClass"/>
+    <keyword type="property" name="The “context” property" link="GstGLBaseFilter.html#GstGLBaseFilter--context"/>
     <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"/>
     <keyword type="function" name="gst_gl_filter_filter_texture ()" link="GstGLFilter.html#gst-gl-filter-filter-texture"/>
-    <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"/>
-    <keyword type="macro" name="GST_GL_MEMORY_FLAG_UNSET()" link="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-UNSET:CAPS"/>
+    <keyword type="struct" name="GstGLFilter" link="GstGLFilter.html#GstGLFilter-struct"/>
+    <keyword type="struct" name="GstGLFilterClass" link="GstGLFilter.html#GstGLFilterClass"/>
+    <keyword type="function" name="gst_gl_framebuffer_new ()" link="GstGLFramebuffer.html#gst-gl-framebuffer-new"/>
+    <keyword type="function" name="gst_gl_framebuffer_generate ()" link="GstGLFramebuffer.html#gst-gl-framebuffer-generate"/>
+    <keyword type="function" name="gst_gl_framebuffer_delete ()" link="GstGLFramebuffer.html#gst-gl-framebuffer-delete"/>
+    <keyword type="function" name="gst_gl_framebuffer_use_v2 ()" link="GstGLFramebuffer.html#gst-gl-framebuffer-use-v2"/>
+    <keyword type="struct" name="struct GstGLFramebuffer" link="GstGLFramebuffer.html#GstGLFramebuffer-struct"/>
+    <keyword type="struct" name="struct GstGLFramebufferClass" link="GstGLFramebuffer.html#GstGLFramebufferClass"/>
     <keyword type="function" name="gst_gl_memory_init ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-init"/>
     <keyword type="function" name="gst_gl_memory_alloc ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-alloc"/>
     <keyword type="function" name="gst_gl_memory_wrapped ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-wrapped"/>
@@ -495,9 +551,7 @@
     <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"/>
-    <keyword type="macro" name="GST_MAP_GL" link="gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS"/>
     <keyword type="macro" name="GST_GL_MEMORY_ALLOCATOR" link="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-ALLOCATOR:CAPS"/>
-    <keyword type="enum" name="enum GstGLMemoryFlags" link="gst-plugins-bad-libs-gstglmemory.html#GstGLMemoryFlags"/>
     <keyword type="struct" name="GstGLMemory" link="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory"/>
     <keyword type="function" name="gst_gl_shader_error_quark ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-error-quark"/>
     <keyword type="macro" name="GST_GL_SHADER_ERROR" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR:CAPS"/>
@@ -508,6 +562,7 @@
     <keyword type="function" name="gst_gl_shader_set_fragment_source ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-fragment-source"/>
     <keyword type="function" name="gst_gl_shader_get_vertex_source ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-vertex-source"/>
     <keyword type="function" name="gst_gl_shader_get_fragment_source ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-fragment-source"/>
+    <keyword type="function" name="gst_gl_shader_get_program_handle ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-program-handle"/>
     <keyword type="function" name="gst_gl_shader_set_active ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-active"/>
     <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"/>
@@ -553,30 +608,36 @@
     <keyword type="property" name="The “compiled” property" link="gst-plugins-bad-libs-gstglshader.html#GstGLShader--compiled"/>
     <keyword type="property" name="The “fragment-src” property" link="gst-plugins-bad-libs-gstglshader.html#GstGLShader--fragment-src"/>
     <keyword type="property" name="The “vertex-src” property" link="gst-plugins-bad-libs-gstglshader.html#GstGLShader--vertex-src"/>
+    <keyword type="function" name="gst_buffer_add_gl_sync_meta ()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-add-gl-sync-meta"/>
+    <keyword type="macro" name="gst_buffer_get_gl_sync_meta()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-get-gl-sync-meta"/>
+    <keyword type="function" name="gst_gl_sync_meta_api_get_type ()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-api-get-type"/>
+    <keyword type="function" name="gst_gl_sync_meta_get_info ()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-get-info"/>
+    <keyword type="function" name="gst_gl_sync_meta_set_sync_point ()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-set-sync-point"/>
+    <keyword type="function" name="gst_gl_sync_meta_wait ()" link="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-wait"/>
+    <keyword type="struct" name="struct GstGLSyncMeta" link="gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta"/>
+    <keyword type="macro" name="GST_BUFFER_POOL_OPTION_GL_SYNC_META" link="gst-plugins-bad-libs-GstGLSyncMeta.html#GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS"/>
     <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_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_get_caps ()" link="GstGLUpload.html#gst-gl-upload-get-caps"/>
+    <keyword type="function" name="gst_gl_upload_set_caps ()" link="GstGLUpload.html#gst-gl-upload-set-caps"/>
+    <keyword type="function" name="gst_gl_upload_propose_allocation ()" link="GstGLUpload.html#gst-gl-upload-propose-allocation"/>
+    <keyword type="function" name="gst_gl_upload_transform_caps ()" link="GstGLUpload.html#gst-gl-upload-transform-caps"/>
     <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="gst_gl_upload_meta_new ()" link="GstGLUploadMeta.html#gst-gl-upload-meta-new"/>
+    <keyword type="function" name="gst_gl_upload_meta_set_format ()" link="GstGLUploadMeta.html#gst-gl-upload-meta-set-format"/>
+    <keyword type="function" name="gst_gl_upload_meta_get_format ()" link="GstGLUploadMeta.html#gst-gl-upload-meta-get-format"/>
+    <keyword type="function" name="gst_gl_upload_meta_add_to_buffer ()" link="GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer"/>
+    <keyword type="struct" name="GstGLUploadMeta" link="GstGLUploadMeta.html#GstGLUploadMeta-struct"/>
     <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="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"/>
     <keyword type="function" name="gst_gl_handle_context_query ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-handle-context-query"/>
     <keyword type="function" name="gst_gl_context_gen_texture ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-texture"/>
     <keyword type="function" name="gst_gl_context_del_texture ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-texture"/>
     <keyword type="function" name="gst_gl_context_gen_fbo ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-fbo"/>
     <keyword type="function" name="gst_gl_context_del_fbo ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-fbo"/>
-    <keyword type="function" name="gst_gl_context_use_fbo ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo"/>
     <keyword type="function" name="gst_gl_context_use_fbo_v2 ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo-v2"/>
     <keyword type="function" name="gst_gl_context_gen_shader ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-shader"/>
     <keyword type="function" name="gst_gl_context_del_shader ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-shader"/>
@@ -585,6 +646,10 @@
     <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="function" name="gst_gl_caps_replace_all_caps_features ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-caps-replace-all-caps-features"/>
+    <keyword type="function" name="gst_gl_ensure_element_data ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-element-data"/>
+    <keyword type="function" name="gst_gl_get_plane_data_size ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-get-plane-data-size"/>
+    <keyword type="function" name="gst_gl_run_query ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-run-query"/>
     <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"/>
@@ -607,9 +672,15 @@
     <keyword type="function" name="gst_gl_window_set_resize_callback ()" link="GstGLWindow.html#gst-gl-window-set-resize-callback" since="1.4"/>
     <keyword type="function" name="gst_gl_window_set_window_handle ()" link="GstGLWindow.html#gst-gl-window-set-window-handle" since="1.4"/>
     <keyword type="function" name="gst_gl_window_get_window_handle ()" link="GstGLWindow.html#gst-gl-window-get-window-handle" since="1.4"/>
+    <keyword type="function" name="gst_gl_window_set_preferred_size ()" link="GstGLWindow.html#gst-gl-window-set-preferred-size" since="1.6"/>
+    <keyword type="function" name="gst_gl_window_show ()" link="GstGLWindow.html#gst-gl-window-show" since="1.6"/>
+    <keyword type="function" name="gst_gl_window_get_surface_dimensions ()" link="GstGLWindow.html#gst-gl-window-get-surface-dimensions" since="1.6"/>
+    <keyword type="function" name="gst_gl_window_handle_events ()" link="GstGLWindow.html#gst-gl-window-handle-events"/>
     <keyword type="enum" name="enum GstGLWindowError" link="GstGLWindow.html#GstGLWindowError"/>
     <keyword type="struct" name="GstGLWindow" link="GstGLWindow.html#GstGLWindow-struct"/>
     <keyword type="struct" name="GstGLWindowClass" link="GstGLWindow.html#GstGLWindowClass"/>
+    <keyword type="signal" name="The “key-event” signal" link="GstGLWindow.html#GstGLWindow-key-event"/>
+    <keyword type="signal" name="The “mouse-event” signal" link="GstGLWindow.html#GstGLWindow-mouse-event"/>
     <keyword type="function" name="gst_gl_window_android_egl_new ()" link="gst-plugins-bad-libs-GstGLWindowAndroid.html#gst-gl-window-android-egl-new"/>
     <keyword type="struct" name="struct GstGLWindowAndroidEGL" link="gst-plugins-bad-libs-GstGLWindowAndroid.html#GstGLWindowAndroidEGL"/>
     <keyword type="struct" name="struct GstGLWindowAndroidEGLClass" link="gst-plugins-bad-libs-GstGLWindowAndroid.html#GstGLWindowAndroidEGLClass"/>
@@ -633,5 +704,863 @@
     <keyword type="function" name="gst_gl_window_x11_untrap_x_errors ()" link="gst-plugins-bad-libs-GstGLWindowX11.html#gst-gl-window-x11-untrap-x-errors"/>
     <keyword type="struct" name="struct GstGLWindowX11" link="gst-plugins-bad-libs-GstGLWindowX11.html#GstGLWindowX11"/>
     <keyword type="struct" name="struct GstGLWindowX11Class" link="gst-plugins-bad-libs-GstGLWindowX11.html#GstGLWindowX11Class"/>
+    <keyword type="function" name="GstPhotographyCapturePrepared ()" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCapturePrepared"/>
+    <keyword type="function" name="gst_photography_get_ev_compensation ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-ev-compensation"/>
+    <keyword type="function" name="gst_photography_get_iso_speed ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-iso-speed"/>
+    <keyword type="function" name="gst_photography_get_aperture ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-aperture"/>
+    <keyword type="function" name="gst_photography_get_exposure ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-exposure"/>
+    <keyword type="function" name="gst_photography_get_white_balance_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-white-balance-mode"/>
+    <keyword type="function" name="gst_photography_get_color_tone_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-color-tone-mode"/>
+    <keyword type="function" name="gst_photography_get_scene_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-scene-mode"/>
+    <keyword type="function" name="gst_photography_get_flash_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flash-mode"/>
+    <keyword type="function" name="gst_photography_get_flicker_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flicker-mode"/>
+    <keyword type="function" name="gst_photography_get_focus_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-focus-mode"/>
+    <keyword type="function" name="gst_photography_get_noise_reduction ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-noise-reduction" since="0.10.21"/>
+    <keyword type="function" name="gst_photography_get_zoom ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-zoom"/>
+    <keyword type="function" name="gst_photography_set_ev_compensation ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-ev-compensation"/>
+    <keyword type="function" name="gst_photography_set_iso_speed ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-iso-speed"/>
+    <keyword type="function" name="gst_photography_set_aperture ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-aperture"/>
+    <keyword type="function" name="gst_photography_set_exposure ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-exposure"/>
+    <keyword type="function" name="gst_photography_set_white_balance_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-white-balance-mode"/>
+    <keyword type="function" name="gst_photography_set_color_tone_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-color-tone-mode"/>
+    <keyword type="function" name="gst_photography_set_scene_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-scene-mode"/>
+    <keyword type="function" name="gst_photography_set_flash_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flash-mode"/>
+    <keyword type="function" name="gst_photography_set_flicker_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flicker-mode"/>
+    <keyword type="function" name="gst_photography_set_focus_mode ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-focus-mode"/>
+    <keyword type="function" name="gst_photography_set_noise_reduction ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-noise-reduction" since="0.10.21"/>
+    <keyword type="function" name="gst_photography_set_zoom ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-zoom"/>
+    <keyword type="function" name="gst_photography_get_capabilities ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-capabilities"/>
+    <keyword type="function" name="gst_photography_prepare_for_capture ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-prepare-for-capture"/>
+    <keyword type="function" name="gst_photography_set_autofocus ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-autofocus"/>
+    <keyword type="function" name="gst_photography_set_config ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-config"/>
+    <keyword type="function" name="gst_photography_get_config ()" link="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-config"/>
+    <keyword type="struct" name="GstPhotography" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotography"/>
+    <keyword type="enum" name="enum GstPhotographyNoiseReduction" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction" since="0.10.21"/>
+    <keyword type="enum" name="enum GstPhotographyWhiteBalanceMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode"/>
+    <keyword type="enum" name="enum GstPhotographyColorToneMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode"/>
+    <keyword type="enum" name="enum GstPhotographySceneMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode"/>
+    <keyword type="enum" name="enum GstPhotographyFlashMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode"/>
+    <keyword type="enum" name="enum GstPhotographyFlickerReductionMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode"/>
+    <keyword type="enum" name="enum GstPhotographyFocusMode" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode"/>
+    <keyword type="enum" name="enum GstPhotographyFocusStatus" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusStatus"/>
+    <keyword type="enum" name="enum GstPhotographyCaps" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps"/>
+    <keyword type="enum" name="enum GstPhotographyShakeRisk" link="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyShakeRisk"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_AUTOFOCUS_DONE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_SHAKE_RISK" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_WB_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_SCENE_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_FLASH_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_FOCUS_STATUS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_CAPABILITIES" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_SHAKE_RISK" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_EV_COMP" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_ISO_SPEED" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_APERTURE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-APERTURE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_FLICKER_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_FOCUS_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS"/>
+    <keyword type="macro" name="GST_PHOTOGRAPHY_PROP_ZOOM" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ZOOM:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_UNKNOWN" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-UNKNOWN:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_DPA" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPA:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_DPB" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPB:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_DPC" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPC:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_IDR" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-IDR:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SEI" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SEI:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SPS" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SPS:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_PPS" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-PPS:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_AU_DELIMITER" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-AU-DELIMITER:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SEQ_END" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SEQ-END:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_STREAM_END" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-STREAM-END:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_FILLER_DATA" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-FILLER-DATA:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SPS_EXT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SPS-EXT:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_PREFIX_UNIT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-PREFIX-UNIT:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SUBSET_SPS" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SUBSET-SPS:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_DEPTH_SPS" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-DEPTH-SPS:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_AUX" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-AUX:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_EXT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-EXT:CAPS"/>
+    <keyword type="constant" name="GST_H264_NAL_SLICE_DEPTH" link="gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DEPTH:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_OK" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-OK:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_BROKEN_DATA" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-BROKEN-DATA:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_BROKEN_LINK" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-BROKEN-LINK:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_ERROR" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-ERROR:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_NO_NAL" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-NO-NAL:CAPS"/>
+    <keyword type="constant" name="GST_H264_PARSER_NO_NAL_END" link="gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-NO-NAL-END:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_BUF_PERIOD" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-BUF-PERIOD:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_TIMING" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-TIMING:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_RECOVERY_POINT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-RECOVERY-POINT:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_STEREO_VIDEO_INFO" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-STEREO-VIDEO-INFO:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_FRAME_PACKING" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-FRAME-PACKING:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_FRAME" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_TOP_FIELD" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-FIELD:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_BOTTOM_FIELD" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-FIELD:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_TOP_BOTTOM" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_BOTTOM_TOP" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM-TOP:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP-BOTTOM:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_FRAME_DOUBLING" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME-DOUBLING:CAPS"/>
+    <keyword type="constant" name="GST_H264_SEI_PIC_STRUCT_FRAME_TRIPLING" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME-TRIPLING:CAPS"/>
+    <keyword type="constant" name="GST_H264_P_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-P-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_B_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-B-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_I_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-I-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_SP_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SP-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_SI_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-SI-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_S_P_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-S-P-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_S_B_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-S-B-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_S_I_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-S-I-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_S_SP_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-S-SP-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_H264_S_SI_SLICE" link="gst-plugins-bad-libs-h264parser.html#GST-H264-S-SI-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_ENTROPY_CODING_HUFFMAN" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-ENTROPY-CODING-HUFFMAN:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_ENTROPY_CODING_ARITHMETIC" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-ENTROPY-CODING-ARITHMETIC:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_PROFILE_BASELINE" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-BASELINE:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_PROFILE_EXTENDED" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-EXTENDED:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_PROFILE_PROGRESSIVE" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-PROGRESSIVE:CAPS"/>
+    <keyword type="constant" name="GST_JPEG_PROFILE_LOSSLESS" link="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-LOSSLESS:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_PICTURE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-PICTURE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_SLICE_MIN" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SLICE-MIN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_SLICE_MAX" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SLICE-MAX:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_USER_DATA" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-USER-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_SEQUENCE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SEQUENCE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXTENSION" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXTENSION:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_SEQUENCE_END" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SEQUENCE-END:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_GOP" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-GOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_NONE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-NONE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXT_SEQUENCE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXT_SEQUENCE_DISPLAY" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-DISPLAY:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXT_QUANT_MATRIX" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-QUANT-MATRIX:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXT_SEQUENCE_SCALABLE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PACKET_EXT_PICTURE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-PICTURE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_LEVEL_HIGH" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-HIGH:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_LEVEL_HIGH_1440" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-HIGH-1440:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_LEVEL_MAIN" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-MAIN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_LEVEL_LOW" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-LOW:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_422" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-422:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_HIGH" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-HIGH:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_SPATIALLY_SCALABLE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SPATIALLY-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_SNR_SCALABLE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SNR-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_MAIN" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-MAIN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PROFILE_SIMPLE" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SIMPLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_TYPE_I" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-I:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_TYPE_P" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-P:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_TYPE_B" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-B:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_TYPE_D" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-D:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_STRUCTURE_TOP_FIELD" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-TOP-FIELD:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_STRUCTURE_BOTTOM_FIELD" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-BOTTOM-FIELD:CAPS"/>
+    <keyword type="constant" name="GST_MPEG_VIDEO_PICTURE_STRUCTURE_FRAME" link="gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-FRAME:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_OBJ_FIRST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-FIRST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_OBJ_LAST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-LAST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_LAYER_FIRST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-LAYER-FIRST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_LAYER_LAST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-LAYER-LAST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VISUAL_OBJ_SEQ_START" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ-SEQ-START:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VISUAL_OBJ_SEQ_END" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ-SEQ-END:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_USER_DATA" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-USER-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_GROUP_OF_VOP" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-GROUP-OF-VOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_SESSION_ERR" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-SESSION-ERR:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VISUAL_OBJ" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_OBJ_PLANE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-PLANE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_FBA" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-FBA:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_FBA_PLAN" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-FBA-PLAN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_MESH" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-MESH:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_MESH_PLAN" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-MESH-PLAN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STILL_TEXTURE_OBJ" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-TEXTURE-OBJ:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_TEXTURE_SPATIAL" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-SPATIAL:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_TEXTURE_SNR_LAYER" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-SNR-LAYER:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_TEXTURE_TILE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-TILE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SHAPE_LAYER" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SHAPE-LAYER:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STUFFING" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STUFFING:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SYSTEM_FIRST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SYSTEM-FIRST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SYSTEM_LAST" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SYSTEM-LAST:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_RESYNC" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-RESYNC:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_VIDEO_ID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-ID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STILL_TEXTURE_ID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-TEXTURE-ID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STILL_MESH_ID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-MESH-ID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STILL_FBA_ID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-FBA-ID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_STILL_3D_MESH_ID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-3D-MESH-ID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SQUARE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SQUARE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_625_TYPE_4_3" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-625-TYPE-4-3:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_525_TYPE_4_3" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-525-TYPE-4-3:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_625_TYPE_16_9" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-625-TYPE-16-9:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_525_TYPE_16_9" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-525-TYPE-16-9:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_EXTENDED_PAR" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-EXTENDED-PAR:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PARSER_OK" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-OK:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PARSER_BROKEN_DATA" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-BROKEN-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PARSER_NO_PACKET" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-NO-PACKET:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PARSER_NO_PACKET_END" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-NO-PACKET-END:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PARSER_ERROR" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-ERROR:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_I_VOP" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-I-VOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_P_VOP" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-P-VOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_B_VOP" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-B-VOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_S_VOP" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-S-VOP:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_CHROMA_4_2_0" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-CHROMA-4-2-0:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_RECTANGULAR" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-RECTANGULAR:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_BINARY" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-BINARY:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_BINARY_ONLY" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-BINARY-ONLY:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_GRAYSCALE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-GRAYSCALE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SPRITE_UNUSED" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-UNUSED:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SPRITE_STATIC" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-STATIC:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_SPRITE_GMG" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-GMG:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_CORE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_MAIN" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-MAIN:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_N_BIT" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-N-BIT:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SIMPLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_HYBRID" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-HYBRID:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_RESERVED" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SIMPLE_FBA" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-FBA:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_CORE_STUDIO" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE-STUDIO:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SIMPLE_STUDIO" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-STUDIO:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_CORE_SCALABLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_ADVANCED_CORE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-CORE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_ADVANCED_SIMPLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-SIMPLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SIMPLE_SCALABLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SCALABLE_TEXTURE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SCALABLE-TEXTURE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_SIMPLE_FACE_ANIMATION" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-FACE-ANIMATION:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-BASIC-ANIMATED-TEXTURE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_ADVANCED_REALTIME_SIMPLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-REALTIME-SIMPLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-SCALABLE-TEXTURE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_FINE_GRANULARITY_SCALABLE" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-FINE-GRANULARITY-SCALABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-CODING-EFFICIENCY:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL0" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL0:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL1" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL1:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL2" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL2:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL3" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL3:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL3b" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL3b"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL4" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL4:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL5" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL5:CAPS"/>
+    <keyword type="constant" name="GST_MPEG4_LEVEL_RESERVED" link="gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_VC1_END_OF_SEQ" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-END-OF-SEQ:CAPS"/>
+    <keyword type="constant" name="GST_VC1_SLICE" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-SLICE:CAPS"/>
+    <keyword type="constant" name="GST_VC1_FIELD" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-FIELD:CAPS"/>
+    <keyword type="constant" name="GST_VC1_FRAME" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-FRAME:CAPS"/>
+    <keyword type="constant" name="GST_VC1_ENTRYPOINT" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-ENTRYPOINT:CAPS"/>
+    <keyword type="constant" name="GST_VC1_SEQUENCE" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-SEQUENCE:CAPS"/>
+    <keyword type="constant" name="GST_VC1_SLICE_USER" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-SLICE-USER:CAPS"/>
+    <keyword type="constant" name="GST_VC1_FIELD_USER" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-FIELD-USER:CAPS"/>
+    <keyword type="constant" name="GST_VC1_FRAME_USER" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-FRAME-USER:CAPS"/>
+    <keyword type="constant" name="GST_VC1_ENTRY_POINT_USER" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-ENTRY-POINT-USER:CAPS"/>
+    <keyword type="constant" name="GST_VC1_SEQUENCE_USER" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-SEQUENCE-USER:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PROFILE_SIMPLE" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-SIMPLE:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PROFILE_MAIN" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-MAIN:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PROFILE_RESERVED" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PROFILE_ADVANCED" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-ADVANCED:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PARSER_OK" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-OK:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PARSER_BROKEN_DATA" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-BROKEN-DATA:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PARSER_NO_BDU" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-NO-BDU:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PARSER_NO_BDU_END" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-NO-BDU-END:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PARSER_ERROR" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-ERROR:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PICTURE_TYPE_P" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-P:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PICTURE_TYPE_B" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-B:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PICTURE_TYPE_I" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-I:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PICTURE_TYPE_BI" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-BI:CAPS"/>
+    <keyword type="constant" name="GST_VC1_PICTURE_TYPE_SKIPPED" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-SKIPPED:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_LOW" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-LOW:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_MEDIUM" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-MEDIUM:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_HIGH" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-HIGH:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_L0" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L0:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_L1" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L1:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_L2" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L2:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_L3" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L3:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_L4" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L4:CAPS"/>
+    <keyword type="constant" name="GST_VC1_LEVEL_UNKNOWN" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-UNKNOWN:CAPS"/>
+    <keyword type="constant" name="GST_VC1_QUANTIZER_IMPLICITLY" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-IMPLICITLY:CAPS"/>
+    <keyword type="constant" name="GST_VC1_QUANTIZER_EXPLICITLY" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-EXPLICITLY:CAPS"/>
+    <keyword type="constant" name="GST_VC1_QUANTIZER_NON_UNIFORM" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-NON-UNIFORM:CAPS"/>
+    <keyword type="constant" name="GST_VC1_QUANTIZER_UNIFORM" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-UNIFORM:CAPS"/>
+    <keyword type="constant" name="GST_VC1_DQPROFILE_FOUR_EDGES" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-FOUR-EDGES:CAPS"/>
+    <keyword type="constant" name="GST_VC1_DQPROFILE_DOUBLE_EDGES" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-DOUBLE-EDGES:CAPS"/>
+    <keyword type="constant" name="GST_VC1_DQPROFILE_SINGLE_EDGE" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-SINGLE-EDGE:CAPS"/>
+    <keyword type="constant" name="GST_VC1_DQPROFILE_ALL_MBS" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-ALL-MBS:CAPS"/>
+    <keyword type="constant" name="GST_VC1_CONDOVER_NONE" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-NONE:CAPS"/>
+    <keyword type="constant" name="GST_VC1_CONDOVER_ALL" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-ALL:CAPS"/>
+    <keyword type="constant" name="GST_VC1_CONDOVER_SELECT" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-SELECT:CAPS"/>
+    <keyword type="constant" name="GST_VC1_MVMODE_1MV_HPEL_BILINEAR" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV-HPEL-BILINEAR:CAPS"/>
+    <keyword type="constant" name="GST_VC1_MVMODE_1MV" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV:CAPS"/>
+    <keyword type="constant" name="GST_VC1_MVMODE_1MV_HPEL" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV-HPEL:CAPS"/>
+    <keyword type="constant" name="GST_VC1_MVMODE_MIXED_MV" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-MIXED-MV:CAPS"/>
+    <keyword type="constant" name="GST_VC1_MVMODE_INTENSITY_COMP" link="gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-INTENSITY-COMP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-PROGRAM-ASSOCIATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CONDITIONAL_ACCESS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONDITIONAL-ACCESS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TS_PROGRAM_MAP" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TS-PROGRAM-MAP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TS_DESCRIPTION" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TS-DESCRIPTION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-14496-SCENE-DESCRIPTION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-14496-OBJET-DESCRIPTOR:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_METADATA" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-METADATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-IPMP-CONTROL-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-MULTIPROTO-ENCAPSULATED-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-U-N-MESSAGES:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-DOWNLOAD-DATA-MESSAGES:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-STREAM-DESCRIPTORS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-PRIVATE-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-ADDRESSABLE-SECTIONS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_UNSET" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-UNSET:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_UNKNOWN" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-UNKNOWN:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_PAT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-PAT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_PMT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-PMT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_CAT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-CAT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_TSDT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TSDT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_EIT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-EIT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_NIT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-NIT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_BAT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-BAT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_SDT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-SDT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_TDT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TDT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_TOT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TOT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_TVCT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-TVCT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_CVCT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-CVCT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_MGT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-MGT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_ETT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-ETT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_EIT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-EIT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_SECTION_ATSC_STT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-STT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_RESERVED_00" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-RESERVED-00:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG2:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_PRIVATE_SECTIONS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-PRIVATE-SECTIONS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_PRIVATE_PES_PACKETS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-PRIVATE-PES-PACKETS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_MHEG" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MHEG:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_DSM_CC" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSM-CC:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_H_222_1" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-H-222-1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_DSMCC_A" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-A:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_DSMCC_B" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-B:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_DSMCC_C" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-C:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_DSMCC_D" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-D:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUXILIARY" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUXILIARY:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-ADTS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG4:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-LATM:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_PES_PACKETS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-PES-PACKETS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-SECTIONS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SYNCHRONIZED-DOWNLOAD:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-PES-PACKETS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-SECTIONS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-DATA-CAROUSEL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-OBJECT-CAROUSEL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-SYNCHRONIZED-DOWNLOAD:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MPEG2-IPMP:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_H264" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_CLEAN" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-CLEAN:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MPEG4-TIMED-TEXT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_RVC" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-RVC:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-SVC-SUB-BITSTREAM:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-MVC-SUB-BITSTREAM:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-JP2K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2-STEREO-ADDITIONAL-VIEW:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-STEREO-ADDITIONAL-VIEW:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-HEVC:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_STREAM_TYPE_IPMP_STREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-IPMP-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_RESERVED_00" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-RESERVED-00:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_RESERVED_01" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-RESERVED-01:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_VIDEO_STREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-VIDEO-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_AUDIO_STREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AUDIO-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_HIERARCHY" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-HIERARCHY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_REGISTRATION" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-REGISTRATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DATA_STREAM_ALIGNMENT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DATA-STREAM-ALIGNMENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_TARGET_BACKGROUND_GRID" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-TARGET-BACKGROUND-GRID:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_VIDEO_WINDOW" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-VIDEO-WINDOW:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_CA" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-CA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISO_639_LANGUAGE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-ISO-639-LANGUAGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_SYSTEM_CLOCK" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SYSTEM-CLOCK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MULTIPLEX_BUFFER_UTILISATION" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MULTIPLEX-BUFFER-UTILISATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_COPYRIGHT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-COPYRIGHT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MAXIMUM_BITRATE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MAXIMUM-BITRATE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_PRIVATE_DATA_INDICATOR" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-PRIVATE-DATA-INDICATOR:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_SMOOTHING_BUFFER" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SMOOTHING-BUFFER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_STD" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_IBP" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IBP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_CAROUSEL_IDENTIFIER" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-CAROUSEL-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_ASSOCIATION_TAG" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-ASSOCIATION-TAG:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_DEFERRED_ASSOCIATION_TAG" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-DEFERRED-ASSOCIATION-TAG:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_NPT_REFERENCE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-NPT-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_NPT_ENDPOINT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-NPT-ENDPOINT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_STREAM_MODE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-STREAM-MODE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DSMCC_STREAM_EVENT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-STREAM-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG4_VIDEO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-VIDEO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG4_AUDIO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-AUDIO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_IOD" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IOD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_SL" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_FMC" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FMC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXTERNAL_ES_ID" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-EXTERNAL-ES-ID:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MUX_CODE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MUX-CODE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_FMX_BUFFER_SIZE" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FMX-BUFFER-SIZE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MULTIPLEX_BUFFER" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MULTIPLEX-BUFFER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_CONTENT_LABELING" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-CONTENT-LABELING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_METADATA_POINTER" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA-POINTER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_METADATA" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_METADATA_STD" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA-STD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_AVC_VIDEO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AVC-VIDEO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_IPMP" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IPMP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_AVC_TIMING_AND_HRD" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AVC-TIMING-AND-HRD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG2_AAC_AUDIO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG2-AAC-AUDIO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_FLEX_MUX_TIMING" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FLEX-MUX-TIMING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG4_TEXT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-TEXT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG4_AUDIO_EXTENSION" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-AUDIO-EXTENSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_AUXILIARY_VIDEO_STREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AUXILIARY-VIDEO-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_SVC_EXTENSION" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SVC-EXTENSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MVC_EXTENSION" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MVC-EXTENSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_J2K_VIDEO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-J2K-VIDEO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MVC_OPERATION_POINT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MVC-OPERATION-POINT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_MPEG2_STEREOSCOPIC_VIDEO_FORMAT" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG2-STEREOSCOPIC-VIDEO-FORMAT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_STEREOSCOPIC_PROGRAM_INFO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STEREOSCOPIC-PROGRAM-INFO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_STEREOSCOPIC_VIDEO_INFO" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STEREOSCOPIC-VIDEO-INFO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_AC3_AUDIO_STREAM" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AC3-AUDIO-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DTG_LOGICAL_CHANNEL" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DTG-LOGICAL-CHANNEL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_AUDIO_TYPE_UNDEFINED" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-UNDEFINED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_AUDIO_TYPE_CLEAN_EFFECTS" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-CLEAN-EFFECTS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_AUDIO_TYPE_HEARING_IMPAIRED" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-HEARING-IMPAIRED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-VISUAL-IMPAIRED-COMMENTARY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_MASTER_GUIDE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-MASTER-GUIDE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-TERRESTRIAL-VIRTUAL-CHANNEL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_CABLE_VIRTUAL_CHANNEL" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-CABLE-VIRTUAL-CHANNEL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_RATING_REGION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-RATING-REGION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_EVENT_INFORMATION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-EVENT-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-CHANNEL-OR-EVENT-EXTENDED-TEXT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_SYSTEM_TIME" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-SYSTEM-TIME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_DATA_EVENT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DATA-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_DATA_SERVICE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DATA-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_NETWORK_RESOURCE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-NETWORK-RESOURCE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_LONG_TERM_SERVICE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-LONG-TERM-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE-SECTION-CODE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-EVENT-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-EXTENDED-TEXT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_AGGREGATE_DATA_EVENT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-DATA-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-SATELLITE-VIRTUAL-CHANNEL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT0" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT0:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT127" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT127:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT0" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT0:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT127" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT127:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_NETWORK_INFORMATION_ACTUAL_NETWORK" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-NETWORK-INFORMATION-ACTUAL-NETWORK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_NETWORK_INFORMATION_OTHER_NETWORK" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-NETWORK-INFORMATION-OTHER-NETWORK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_ACTUAL_TS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-ACTUAL-TS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_OTHER_TS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-OTHER-TS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_BOUQUET_ASSOCIATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-BOUQUET-ASSOCIATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-PRESENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-PRESENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-1:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-N:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-1:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_N" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-N:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TIME_DATE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIME-DATE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_RUNNING_STATUS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RUNNING-STATUS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_STUFFING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-STUFFING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TIME_OFFSET" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIME-OFFSET:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_APPLICATION_INFORMATION_TABLE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-APPLICATION-INFORMATION-TABLE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CONTAINER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONTAINER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_RELATED_CONTENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RELATED-CONTENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CONTENT_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONTENT-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_MPE_FEC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-MPE-FEC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_RESOLUTION_NOTIFICATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RESOLUTION-NOTIFICATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_MPE_IFEC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-MPE-IFEC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_DISCONTINUITY_INFORMATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DISCONTINUITY-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_SELECTION_INFORMATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SELECTION-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CA_MESSAGE_ECM_0" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-ECM-0:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CA_MESSAGE_ECM_1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-ECM-1:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-1:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_N" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-N:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_SCT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SCT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_FCT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-FCT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TCT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TCT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_SPT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SPT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_CMT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CMT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TBTP" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TBTP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_PCR_PACKET_PAYLOAD" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-PCR-PACKET-PAYLOAD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TRANSMISSION_MODE_SUPPORT_PAYLOAD" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TRANSMISSION-MODE-SUPPORT-PAYLOAD:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_TIM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_TABLE_ID_LL_FEC_PARITY_DATA_TABLE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-LL-FEC-PARITY-DATA-TABLE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_UNDEFINED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-UNDEFINED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_NOT_RUNNING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-NOT-RUNNING:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_STARTS_IN_FEW_SECONDS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-STARTS-IN-FEW-SECONDS:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_PAUSING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-PAUSING:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_RUNNING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-RUNNING:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_RUNNING_STATUS_OFF_AIR" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-OFF-AIR:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_STUFFING" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-STUFFING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_AC3" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-AC3:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_CAPTION_SERVICE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CAPTION-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_CONTENT_ADVISORY" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CONTENT-ADVISORY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_EXTENDED_CHANNEL_NAME" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-EXTENDED-CHANNEL-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_SERVICE_LOCATION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-SERVICE-LOCATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_TIME_SHIFTED_SERVICE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-TIME-SHIFTED-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_COMPONENT_NAME" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-COMPONENT-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_DCC_DEPARTING_REQUEST" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DCC-DEPARTING-REQUEST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_DCC_ARRIVING_REQUEST" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DCC-ARRIVING-REQUEST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_REDISTRIBUTION_CONTROL" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-REDISTRIBUTION-CONTROL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_GENRE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-GENRE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_PRIVATE_INFORMATION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-PRIVATE-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_ENHANCED_SIGNALING" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-ENHANCED-SIGNALING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_DATA_SERVICE" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DATA-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_PID_COUNT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-PID-COUNT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_DOWNLOAD_DESCRIPTOR" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DOWNLOAD-DESCRIPTOR:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-MULTIPROTOCOL-ENCAPSULATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_MODULE_LINK" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-MODULE-LINK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_CRC32" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CRC32:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ATSC_GROUP_LINK" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-GROUP-LINK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_NETWORK_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-NETWORK-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SERVICE_LIST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-LIST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_STUFFING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-STUFFING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SATELLITE-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CABLE-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_VBI_DATA" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-VBI-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_VBI_TELETEXT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-VBI-TELETEXT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_BOUQUET_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-BOUQUET-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SERVICE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_COUNTRY_AVAILABILITY" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-COUNTRY-AVAILABILITY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_LINKAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-LINKAGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_NVOD_REFERENCE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-NVOD-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TIME_SHIFTED_SERVICE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIME-SHIFTED-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SHORT_EVENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SHORT-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_EXTENDED_EVENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-EXTENDED-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TIME_SHIFTED_EVENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIME-SHIFTED-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_COMPONENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-COMPONENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_MOSAIC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MOSAIC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_STREAM_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-STREAM-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CA_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CA-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CONTENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CONTENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_PARENTAL_RATING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PARENTAL-RATING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TELETEXT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TELETEXT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TELEPHONE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TELEPHONE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_LOCAL_TIME_OFFSET" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-LOCAL-TIME-OFFSET:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SUBTITLING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SUBTITLING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TERRESTRIAL-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-NETWORK-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-BOUQUET-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-SERVICE-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-COMPONENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PRIVATE-DATA-SPECIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SERVICE_MOVE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-MOVE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SHORT_SMOOTHING_BUFFER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SHORT-SMOOTHING-BUFFER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_FREQUENCY_LIST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-FREQUENCY-LIST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PARTIAL-TRANSPORT-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_DATA_BROADCAST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DATA-BROADCAST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SCRAMBLING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SCRAMBLING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_DATA_BROADCAST_ID" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DATA-BROADCAST-ID:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TRANSPORT_STREAM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TRANSPORT-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_DSNG" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DSNG:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_PDC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PDC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_AC3" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-AC3:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_ANCILLARY_DATA" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ANCILLARY-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CELL_LIST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CELL-LIST:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CELL_FREQUENCY_LINK" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CELL-FREQUENCY-LINK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_ANNOUNCEMENT_SUPPORT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ANNOUNCEMENT-SUPPORT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_APPLICATION_SIGNALLING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-APPLICATION-SIGNALLING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_ADAPTATION_FIELD_DATA" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ADAPTATION-FIELD-DATA:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SERVICE_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_SERVICE_AVAILABILITY" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-AVAILABILITY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_DEFAULT_AUTHORITY" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DEFAULT-AUTHORITY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_RELATED_CONTENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-RELATED-CONTENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TVA_ID" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TVA-ID:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_CONTENT_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CONTENT-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_TIMESLICE_FEC_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIMESLICE-FEC-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_ECM_REPETITION_RATE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ECM-REPETITION-RATE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-S2-SATELLITE-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_ENHANCED_AC3" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ENHANCED-AC3:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_DTS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DTS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_AAC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-AAC:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_XAIT_LOCATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-XAIT-LOCATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_FTA_CONTENT_MANAGEMENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-FTA-CONTENT-MANAGEMENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_DVB_EXTENSION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-EXTENSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_IMAGE_ICON" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-IMAGE-ICON:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_CPCM_DELIVERY_SIGNALLING" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CPCM-DELIVERY-SIGNALLING:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_CP" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_CP_IDENTIFIER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CP-IDENTIFIER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-T2-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_SH_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SH-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_SUPPLEMENTARY_AUDIO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SUPPLEMENTARY-AUDIO:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_NETWORK_CHANGE_NOTIFY" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-NETWORK-CHANGE-NOTIFY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_MESSAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-MESSAGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_TARGET_REGION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-TARGET-REGION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_TARGET_REGION_NAME" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-TARGET-REGION-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_SERVICE_RELOCATED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SERVICE-RELOCATED:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_XAIT_PID" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-XAIT-PID:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_C2_DELIVERY_SYSTEM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-C2-DELIVERY-SYSTEM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_DTS_HD_AUDIO_STREAM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-DTS-HD-AUDIO-STREAM:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_DTS_NEUTRAL" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-DTS-NEUTRAL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_VIDEO_DEPTH_RANGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-VIDEO-DEPTH-RANGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_T2MI" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-T2MI:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_EXT_DVB_URI_LINKAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-URI-LINKAGE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_NONE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-NONE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_1_2" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-1-2:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_2_3" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-2-3:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_3_4" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-3-4:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_4_5" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-4-5:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_5_6" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-5-6:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_6_7" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-6-7:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_7_8" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-7-8:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_8_9" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-8-9:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_3_5" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-3-5:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_9_10" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-9-10:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_FEC_2_5" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-2-5:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QPSK" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QPSK:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_16" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-16:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_32" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-32:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_64" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-64:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_128" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-128:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_256" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-256:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_VSB_8" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-VSB-8:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_VSB_16" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-VSB-16:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_PSK_8" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-PSK-8:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_APSK_16" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-APSK-16:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_APSK_32" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-APSK-32:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_DQPSK" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-DQPSK:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_QAM_4_NR_" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-4-NR-:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_MODULATION_NONE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-NONE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_POLARIZATION_LINEAR_HORIZONTAL" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-LINEAR-HORIZONTAL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_POLARIZATION_LINEAR_VERTICAL" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-LINEAR-VERTICAL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_POLARIZATION_CIRCULAR_LEFT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-CIRCULAR-LEFT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_POLARIZATION_CIRCULAR_RIGHT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-CIRCULAR-RIGHT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ROLLOFF_35" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-35:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ROLLOFF_20" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-20:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ROLLOFF_25" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-25:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ROLLOFF_RESERVED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_ROLLOFF_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-UNDEFINED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_CABLE_OUTER_FEC_NONE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-NONE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-RS-204-188:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_2K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-2K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_8K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-8K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_4K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-4K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_1K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-1K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_16K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-16K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_32K" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-32K:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_C1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-C1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_TRANSMISSION_MODE_C3780" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-C3780:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_1_32" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-32:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_1_16" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-16:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_1_8" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-8:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_1_4" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-4:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_1_128" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-128:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_19_128" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-19-128:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_19_256" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-19-256:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_PN420" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN420:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_PN595" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN595:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_GUARD_INTERVAL_PN945" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN945:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_HIERARCHY_NONE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-NONE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_HIERARCHY_1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_HIERARCHY_2" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-2:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_HIERARCHY_4" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-4:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_HIERARCHY_AUTO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RESERVED_00" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-00:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_DIGITAL_TELEVISION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DIGITAL-TELEVISION:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_DIGITAL_RADIO_SOUND" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DIGITAL-RADIO-SOUND:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_TELETEXT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-TELETEXT:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_NVOD_REFERENCE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-NVOD-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_NVOD_TIME_SHIFTED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-NVOD-TIME-SHIFTED:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_MOSAIC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-MOSAIC:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_FM_RADIO" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-FM-RADIO:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_DVB_SRM" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DVB-SRM:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RESERVED_09" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-09:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-DIGITAL-RADIO-SOUND:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-MOSAIC:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_DATA_BROADCAST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DATA-BROADCAST:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-0D-COMMON-INTERFACE:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RCS_MAP" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RCS-MAP:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RCS_FLS" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RCS-FLS:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_DVB_MHP" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DVB-MHP:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-MPEG2-HD-DIGITAL-TELEVISION:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-DIGITAL-TELEVISION:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-TIME-SHIFTED:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-DIGITAL-TELEVISION:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-TIME-SHIFTED:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-DIGITAL-TELEVISION:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-TIME-SHIFTED:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_DVB_SERVICE_RESERVED_FF" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-FF:CAPS"/>
+    <keyword type="constant" name="INITIAL_PAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#INITIAL-PAGE:CAPS"/>
+    <keyword type="constant" name="SUBTITLE_PAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#SUBTITLE-PAGE:CAPS"/>
+    <keyword type="constant" name="ADDITIONAL_INFO_PAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#ADDITIONAL-INFO-PAGE:CAPS"/>
+    <keyword type="constant" name="PROGRAMME_SCHEDULE_PAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#PROGRAMME-SCHEDULE-PAGE:CAPS"/>
+    <keyword type="constant" name="HEARING_IMPAIRED_PAGE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#HEARING-IMPAIRED-PAGE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_RESERVED_00" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-RESERVED-00:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_INFORMATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_EPG" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EPG:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_CA_REPLACEMENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-CA-REPLACEMENT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-COMPLETE-SI:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-SERVICE-REPLACEMENT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_DATA_BROADCAST" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-DATA-BROADCAST:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_RCS_MAP" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-RCS-MAP:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-MOBILE-HAND-OVER:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-SYSTEM-SOFTWARE-UPDATE:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-SSU:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-IP-MAC-NOTIFICATION:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-INT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_EVENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EXTENDED-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-IDENTICAL:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-LOCAL-VARIATION:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-ASSOCIATED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-RESERVED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA1:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA2:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-STANDARD:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-MINIMAL-ENHANCED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-FULL-ENHANCED:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CISSA:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-0:CAPS"/>
+    <keyword type="constant" name="GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-F:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_HIERARCHICAL_TRANSMISSION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-HIERARCHICAL-TRANSMISSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_DIGITAL_COPY_CONTROL" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DIGITAL-COPY-CONTROL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_NETWORK_IDENTIFICATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-NETWORK-IDENTIFICATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_PARTIAL_TS_TIME" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-PARTIAL-TS-TIME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_AUDIO_COMPONENT" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-AUDIO-COMPONENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_HYPERLINK" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-HYPERLINK:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_TARGET_REGION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-TARGET-REGION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_DATA_CONTENT" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DATA-CONTENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_VIDEO_DECODE_CONTROL" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-VIDEO-DECODE-CONTROL:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_DOWNLOAD_CONTENT" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DOWNLOAD-CONTENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_CA_EMM_TS" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-EMM-TS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_CA_CONTRACT_INFORMATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-CONTRACT-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_CA_SERVICE" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-SERVICE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_TS_INFORMATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-TS-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_EXTENDED_BROADCASTER" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-EXTENDED-BROADCASTER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_LOGO_TRANSMISSION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-LOGO-TRANSMISSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_BASIC_LOCAL_EVENT" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BASIC-LOCAL-EVENT:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_REFERENCE" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_NODE_RELATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-NODE-RELATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_SHORT_NODE_INFORMATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SHORT-NODE-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_STC_REFERENCE" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-STC-REFERENCE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_SERIES" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SERIES:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_EVENT_GROUP" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-EVENT-GROUP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_SI_PARAMETER" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SI-PARAMETER:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_BROADCASTER_NAME" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BROADCASTER-NAME:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_COMPONENT_GROUP" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-COMPONENT-GROUP:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_SI_PRIME_TS" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SI-PRIME-TS:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_BOARD_INFORMATION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BOARD-INFORMATION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_LDT_LINKAGE" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-LDT-LINKAGE:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_CONNECTED_TRANSMISSION" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CONNECTED-TRANSMISSION:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_CONTENT_AVAILABILITY" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CONTENT-AVAILABILITY:CAPS"/>
+    <keyword type="constant" name="GST_MTS_DESC_ISDB_SERVICE_GROUP" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SERVICE-GROUP:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_NONE" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-NONE:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_OPENGL" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_OPENGL3" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_GLES1" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_GLES2" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2:CAPS"/>
+    <keyword type="constant" name="GST_GL_API_ANY" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-ANY:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_NONE" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-NONE:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_EGL" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-EGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_GLX" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-GLX:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_WGL" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-WGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_CGL" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-CGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_EAGL" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-EAGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_PLATFORM_ANY" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-ANY:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_FAILED" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-FAILED:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_WRONG_CONFIG" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-WRONG-CONFIG:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_WRONG_API" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-WRONG-API:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_OLD_LIBS" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-OLD-LIBS:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_CREATE_CONTEXT" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-CREATE-CONTEXT:CAPS"/>
+    <keyword type="constant" name="GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE" link="GstGLContext.html#GST-GL-CONTEXT-ERROR-RESOURCE-UNAVAILABLE:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_NONE" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-NONE:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_X11" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-X11:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_WAYLAND" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-WAYLAND:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_COCOA" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-COCOA:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_WIN32" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-WIN32:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_DISPMANX" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-DISPMANX:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_EGL" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-EGL:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_TYPE_ANY" link="GstGLDisplay.html#GST-GL-DISPLAY-TYPE-ANY:CAPS"/>
+    <keyword type="constant" name="GST_GL_SHADER_ERROR_COMPILE" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-COMPILE:CAPS"/>
+    <keyword type="constant" name="GST_GL_SHADER_ERROR_LINK" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-LINK:CAPS"/>
+    <keyword type="constant" name="GST_GL_SHADER_ERROR_PROGRAM" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-PROGRAM:CAPS"/>
+    <keyword type="constant" name="GST_GL_SHADER_FRAGMENT_SOURCE" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-FRAGMENT-SOURCE:CAPS"/>
+    <keyword type="constant" name="GST_GL_SHADER_VERTEX_SOURCE" link="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-VERTEX-SOURCE:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_PROJECTION_ORTHO2D" link="gst-plugins-bad-libs-Utilities.html#GST-GL-DISPLAY-PROJECTION-ORTHO2D:CAPS"/>
+    <keyword type="constant" name="GST_GL_DISPLAY_PROJECTION_PERSPECTIVE" link="gst-plugins-bad-libs-Utilities.html#GST-GL-DISPLAY-PROJECTION-PERSPECTIVE:CAPS"/>
+    <keyword type="constant" name="GST_GL_WINDOW_ERROR_FAILED" link="GstGLWindow.html#GST-GL-WINDOW-ERROR-FAILED:CAPS"/>
+    <keyword type="constant" name="GST_GL_WINDOW_ERROR_OLD_LIBS" link="GstGLWindow.html#GST-GL-WINDOW-ERROR-OLD-LIBS:CAPS"/>
+    <keyword type="constant" name="GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE" link="GstGLWindow.html#GST-GL-WINDOW-ERROR-RESOURCE-UNAVAILABLE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-BAYER:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-YCC:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-TEMPORAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-FIXED:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-EXTRA:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_AUTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-DAYLIGHT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_CLOUDY" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-CLOUDY:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_SUNSET" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-SUNSET:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-TUNGSTEN:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-FLUORESCENT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_MANUAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-MANUAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-WARM-FLUORESCENT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_WB_MODE_SHADE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-SHADE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NORMAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SEPIA:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NEGATIVE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRAYSCALE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NATURAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-VIVID:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-COLORSWAP:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SOLARIZE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-OUT-OF-FOCUS:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKY-BLUE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRASS-GREEN:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKIN-WHITEN:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_POSTERIZE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-POSTERIZE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_WHITEBOARD" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-WHITEBOARD:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_BLACKBOARD" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-BLACKBOARD:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-AQUA:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_MANUAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-MANUAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-CLOSEUP:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-PORTRAIT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-LANDSCAPE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_SPORT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SPORT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_NIGHT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-NIGHT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_AUTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_ACTION" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-ACTION:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-NIGHT-PORTRAIT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_THEATRE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-THEATRE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_BEACH" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-BEACH:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_SNOW" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SNOW:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_SUNSET" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SUNSET:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-STEADY-PHOTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-FIREWORKS:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_PARTY" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-PARTY:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-CANDLELIGHT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SCENE_MODE_BARCODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-BARCODE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLASH_MODE_AUTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLASH_MODE_OFF" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-OFF:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLASH_MODE_ON" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-ON:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-FILL-IN:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-RED-EYE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-OFF:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-50HZ:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-60HZ:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_AUTO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-AUTO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_MACRO" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-MACRO:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-PORTRAIT:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-INFINITY:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-HYPERFOCAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-EXTENDED:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-NORMAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-EXTENDED:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-MANUAL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_STATUS_NONE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-NONE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-RUNNING:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-FAIL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-SUCCESS:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_NONE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-NONE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_EV_COMP" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-EV-COMP:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_ISO_SPEED" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ISO-SPEED:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_WB_MODE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-WB-MODE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_TONE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-TONE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_SCENE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-SCENE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_FLASH" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FLASH:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_ZOOM" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ZOOM:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_FOCUS" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FOCUS:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_APERTURE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-APERTURE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_EXPOSURE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-EXPOSURE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_SHAKE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-SHAKE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_WHITE_BALANCE" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-WHITE-BALANCE:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_NOISE_REDUCTION" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-NOISE-REDUCTION:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_FLICKER_REDUCTION" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FLICKER-REDUCTION:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_CAPS_ALL" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ALL:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SHAKE_RISK_LOW" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-LOW:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-MEDIUM:CAPS"/>
+    <keyword type="constant" name="GST_PHOTOGRAPHY_SHAKE_RISK_HIGH" link="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-HIGH:CAPS"/>
   </functions>
 </book>
diff --git a/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html b/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html
index 259ffa5..cb6b969 100644
--- a/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html
+++ b/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: ATSC variants of MPEG-TS descriptors</title>
+<title>ATSC variants of MPEG-TS descriptors: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html" title="DVB variants of MPEG-TS sections">
 <link rel="next" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -54,6 +54,7 @@
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.other_details"></a><h2>Types and Values</h2>
@@ -183,7 +184,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 6318b70..c3a7fbd 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
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: ATSC variants of MPEG-TS sections</title>
+<title>ATSC variants of MPEG-TS sections: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html" title="Base MPEG-TS descriptors">
 <link rel="next" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html" title="DVB variants of MPEG-TS sections">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -189,7 +189,6 @@
 <a name="id-1.2.5.6.7.2.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscVCT" title="struct GstMpegtsAtscVCT"><span class="type">GstMpegtsAtscVCT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -218,7 +217,6 @@
 <a name="id-1.2.5.6.7.3.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscVCT" title="struct GstMpegtsAtscVCT"><span class="type">GstMpegtsAtscVCT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -247,7 +245,6 @@
 <a name="id-1.2.5.6.7.4.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscMGT" title="struct GstMpegtsAtscMGT"><span class="type">GstMpegtsAtscMGT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -283,7 +280,6 @@
 <a name="id-1.2.5.6.7.6.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscEIT" title="struct GstMpegtsAtscEIT"><span class="type">GstMpegtsAtscEIT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -312,7 +308,6 @@
 <a name="id-1.2.5.6.7.7.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscETT" title="struct GstMpegtsAtscETT"><span class="type">GstMpegtsAtscETT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -341,7 +336,6 @@
 <a name="id-1.2.5.6.7.8.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscSTT" title="struct GstMpegtsAtscSTT"><span class="type">GstMpegtsAtscSTT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -776,8 +770,8 @@
 </tr>
 <tr>
 <td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *<em class="structfield"><code><a name="GstMpegtsAtscMultString.segments"></a>segments</code></em>;</p></td>
-<td class="struct_member_description"><p>(element-type GstMpegtsAtscStringSegment)</p></td>
-<td class="struct_member_annotations"> </td>
+<td class="struct_member_description"><p>. </p></td>
+<td class="struct_member_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegtsAtscStringSegment]</span></td>
 </tr>
 </tbody>
 </table></div>
@@ -996,7 +990,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html b/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html
index 0b230a0..3e1d349 100644
--- a/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html
+++ b/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Base MPEG-TS descriptors</title>
+<title>Base MPEG-TS descriptors: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html" title="Base MPEG-TS sections">
 <link rel="next" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html" title="ATSC variants of MPEG-TS sections">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -297,7 +297,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.5.9.4.6"></a><h4>Returns</h4>
 <p> <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor"><span class="type">GstMpegtsDescriptor</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -375,7 +374,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.5.9.6.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -426,7 +424,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.5.9.7.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -454,7 +451,6 @@
 <a name="id-1.2.5.5.9.8.5"></a><h4>Returns</h4>
 <p> The number of languages in <em class="parameter"><code>descriptor</code></em>
 </p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -498,7 +494,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.5.9.10.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -938,7 +933,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 1589564..aee2518 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
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Base MPEG-TS sections</title>
+<title>Base MPEG-TS sections: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-Mpeg-ts-helper-library.html" title="Mpeg-ts helper library">
 <link rel="next" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html" title="Base MPEG-TS descriptors">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -245,7 +245,7 @@
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-Base-MPEG-TS-sections.description"></a><h2>Description</h2>
 <p>For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications
-and other specifications mentionned in the documentation.</p>
+and other specifications mentioned in the documentation.</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-Base-MPEG-TS-sections.functions_details"></a><h2>Functions</h2>
@@ -353,7 +353,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.4.9.5.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event is sent</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -391,7 +390,7 @@
 gst_mpegts_section_packetize (<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>,
                               <em class="parameter"><code><span class="type">gsize</span> *output_size</code></em>);</pre>
 <p>If the data in <em class="parameter"><code>section</code></em>
- has aldready been packetized, the data pointer is returned
+ has already been packetized, the data pointer is returned
 immediately. Otherwise, the data field is allocated and populated.</p>
 <div class="refsect3">
 <a name="id-1.2.5.4.9.7.5"></a><h4>Parameters</h4>
@@ -604,7 +603,6 @@
 <a name="id-1.2.5.4.9.15.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsPMT" title="struct GstMpegtsPMT"><span class="type">GstMpegtsPMT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -702,7 +700,7 @@
 <a name="gst-mpegts-section-get-cat"></a><h3>gst_mpegts_section_get_cat ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
 gst_mpegts_section_get_cat (<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 array of <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor"><span class="type">GstMpegtsDescriptor</span></a> contained in the Condtional
+<p>Returns the array of <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor"><span class="type">GstMpegtsDescriptor</span></a> contained in the Conditional
 Access Table.</p>
 <div class="refsect3">
 <a name="id-1.2.5.4.9.20.5"></a><h4>Parameters</h4>
@@ -1472,7 +1470,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 77dafd3..37680ca 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
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: DVB variants of MPEG-TS descriptors</title>
+<title>DVB variants of MPEG-TS descriptors: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html" title="ATSC variants of MPEG-TS descriptors">
 <link rel="next" href="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html" title="ISDB variants of MPEG-TS descriptors">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -577,7 +577,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.2.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -621,7 +620,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.4.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -665,7 +663,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.6.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -702,7 +699,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.7.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -739,7 +735,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.8.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -776,7 +771,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.9.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -820,7 +814,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.11.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -869,7 +862,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.12.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -906,7 +898,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.13.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -986,7 +977,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.15.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1092,7 +1082,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.17.6"></a><h4>Returns</h4>
 <p> FALSE on out-of-bounds and errors</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1121,7 +1110,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.18.6"></a><h4>Returns</h4>
 <p> Number of teletext entries</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1184,7 +1172,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.19.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1212,7 +1199,6 @@
 <a name="id-1.2.5.9.8.20.5"></a><h4>Returns</h4>
 <p> The number of entries in <em class="parameter"><code>descriptor</code></em>
 </p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1288,7 +1274,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.23.5"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageMobileHandOver" title="struct GstMpegtsDVBLinkageMobileHandOver"><span class="type">GstMpegtsDVBLinkageMobileHandOver</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error happened</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1315,7 +1300,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.24.5"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageEvent" title="struct GstMpegtsDVBLinkageEvent"><span class="type">GstMpegtsDVBLinkageEvent</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error happened</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1379,7 +1363,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.26.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1429,7 +1412,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.27.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1473,7 +1455,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.28.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1517,7 +1498,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.30.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1558,7 +1538,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.31.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1607,7 +1586,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.32.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1644,7 +1622,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.33.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1681,7 +1658,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.34.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happended correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1720,7 +1696,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.35.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1757,7 +1732,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.36.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1794,7 +1768,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.37.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1824,7 +1797,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.38.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1862,7 +1834,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.39.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1900,7 +1871,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.40.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1938,7 +1908,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.41.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -1982,7 +1951,6 @@
 <div class="refsect3">
 <a name="id-1.2.5.9.8.42.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -2496,8 +2464,8 @@
 <tbody>
 <tr>
 <td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstMpegtsExtendedEventDescriptor.descriptor-number"></a>descriptor_number</code></em>;</p></td>
-<td> </td>
-<td> </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.last-descriptor-number"></a>last_descriptor_number</code></em>;</p></td>
@@ -4060,7 +4028,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html b/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html
index 03f2d11..921fc53 100644
--- a/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html
+++ b/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: DVB variants of MPEG-TS sections</title>
+<title>DVB variants of MPEG-TS sections: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html" title="ATSC variants of MPEG-TS sections">
 <link rel="next" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html" title="ATSC variants of MPEG-TS descriptors">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -230,7 +230,6 @@
 <a name="id-1.2.5.7.8.2.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsNIT" title="struct GstMpegtsNIT"><span class="type">GstMpegtsNIT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -312,7 +311,6 @@
 <a name="id-1.2.5.7.8.6.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsBAT" title="struct GstMpegtsBAT"><span class="type">GstMpegtsBAT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -341,7 +339,6 @@
 <a name="id-1.2.5.7.8.7.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsSDT" title="struct GstMpegtsSDT"><span class="type">GstMpegtsSDT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -423,7 +420,6 @@
 <a name="id-1.2.5.7.8.11.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsEIT" title="struct GstMpegtsEIT"><span class="type">GstMpegtsEIT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -451,7 +447,6 @@
 <a name="id-1.2.5.7.8.12.6"></a><h4>Returns</h4>
 <p> The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstDateTime.html"><span class="type">GstDateTime</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 if an error happened. Release with <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstDateTime.html#gst-date-time-unref"><span class="type">gst_date_time_unref</span></a> when done.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -480,7 +475,6 @@
 <a name="id-1.2.5.7.8.13.6"></a><h4>Returns</h4>
 <p> The <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsTOT" title="struct GstMpegtsTOT"><span class="type">GstMpegtsTOT</span></a> contained in the section, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -1132,7 +1126,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstAggregator.html b/docs/libs/html/gst-plugins-bad-libs-GstAggregator.html
index 81ff32e..8204033 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstAggregator.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstAggregator.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstAggregator</title>
+<title>GstAggregator: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -64,6 +64,14 @@
 <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-iterate-sinkpads" title="gst_aggregator_iterate_sinkpads ()">gst_aggregator_iterate_sinkpads</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/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-get-latency" title="gst_aggregator_get_latency ()">gst_aggregator_get_latency</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -92,8 +100,8 @@
 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.
+   Base class for mixers and muxers. Subclasses should at least implement
+   the <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregatorClass.aggregate"><code class="function">GstAggregatorClass.aggregate()</code></a> virtual method.
  </p></li>
 <li class="listitem"><p>
    When data is queued on all pads, tha aggregate vmethod is called.
@@ -117,6 +125,12 @@
    subclass, it should instead return GST_FLOW_EOS in its aggregate
    implementation.
  </p></li>
+<li class="listitem"><p>
+   Note that the aggregator logic regarding gap event handling is to turn
+   these into gap buffers with matching PTS and duration. It will also
+   flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE
+   to ease their identification and subsequent processing.
+ </p></li>
 </ul></div>
 </div>
 <div class="refsect1">
@@ -126,8 +140,9 @@
 <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="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct 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/GstBuffer.html"><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>
+<p>This method will push the provided output buffer downstream. If needed,
+mandatory events such as stream-start, caps, and segment events will be
+sent before pushing the buffer.</p>
 <div class="refsect3">
 <a name="id-1.2.7.2.6.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
@@ -144,8 +159,8 @@
 </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/GstBuffer.html"><span class="type">GstBuffer</span></a> to push.</p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_description"><p> the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> to push. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
 </tr>
 </tbody>
 </table></div>
@@ -174,7 +189,7 @@
 </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/GstCaps.html"><span class="type">GstCaps</span></a> to set later on the src pad.</p></td>
+<td class="parameter_description"><p>The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the src pad.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
@@ -208,19 +223,49 @@
 </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>
+<td class="parameter_description"><p> The function to call. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></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>
+<td class="parameter_description"><p> The data to pass to <em class="parameter"><code>func</code></em>
+. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
 </tr>
 </tbody>
 </table></div>
 </div>
 </div>
+<hr>
+<div class="refsect2">
+<a name="gst-aggregator-get-latency"></a><h3>gst_aggregator_get_latency ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a>
+gst_aggregator_get_latency (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a> *self</code></em>);</pre>
+<p>Retrieves the latency values reported by <em class="parameter"><code>self</code></em>
+ in response to the latency
+query, or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><code class="literal">GST_CLOCK_TIME_NONE</code></a> if there is not live source connected and the element
+will not wait for the clock.</p>
+<p>Typically only called by subclasses.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.6.5.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>a <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.7.2.6.5.7"></a><h4>Returns</h4>
+<p> The latency or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><code class="literal">GST_CLOCK_TIME_NONE</code></a> if the element does not sync</p>
+</div>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstAggregator.other_details"></a><h2>Types and Values</h2>
@@ -231,10 +276,11 @@
 
   GstPad                *  srcpad;
 
+  /* Only access with the object lock held */
   GstSegment               segment;
 };
 </pre>
-<p>Collectpads object.</p>
+<p>Aggregator base class object structure.</p>
 <div class="refsect3">
 <a name="id-1.2.7.2.7.2.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
@@ -251,13 +297,13 @@
 </tr>
 <tr>
 <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> *<em class="structfield"><code><a name="GstAggregator.srcpad"></a>srcpad</code></em>;</p></td>
-<td> </td>
-<td> </td>
+<td class="struct_member_description"><p>the aggregator's source pad</p></td>
+<td class="struct_member_annotations"> </td>
 </tr>
 <tr>
 <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstSegment.html"><span class="type">GstSegment</span></a> <em class="structfield"><code><a name="GstAggregator.segment"></a>segment</code></em>;</p></td>
-<td> </td>
-<td> </td>
+<td class="struct_member_description"><p>the output segment</p></td>
+<td class="struct_member_annotations"> </td>
 </tr>
 </tbody>
 </table></div>
@@ -273,36 +319,39 @@
 
   GstFlowReturn     (*flush)          (GstAggregator    *  aggregator);
 
-  GstFlowReturn     (*clip)           (GstAggregator    *  agg,
-                                       GstAggregatorPad *  bpad,
+  GstFlowReturn     (*clip)           (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstBuffer        *  buf,
                                        GstBuffer        ** outbuf);
 
   /* sinkpads virtual methods */
-  gboolean          (*sink_event)     (GstAggregator    *  aggregate,
-                                       GstAggregatorPad *  bpad,
+  gboolean          (*sink_event)     (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstEvent         *  event);
 
-  gboolean          (*sink_query)     (GstAggregator    *  aggregate,
-                                       GstAggregatorPad *  bpad,
+  gboolean          (*sink_query)     (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstQuery         *  query);
 
   /* srcpad virtual methods */
-  gboolean          (*src_event)      (GstAggregator    *  aggregate,
+  gboolean          (*src_event)      (GstAggregator    *  aggregator,
                                        GstEvent         *  event);
 
-  gboolean          (*src_query)      (GstAggregator    *  aggregate,
+  gboolean          (*src_query)      (GstAggregator    *  aggregator,
                                        GstQuery         *  query);
 
   gboolean          (*src_activate)   (GstAggregator    *  aggregator,
                                        GstPadMode          mode,
                                        gboolean            active);
 
-  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator);
+  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator,
+                                       gboolean            timeout);
 
   gboolean          (*stop)           (GstAggregator    *  aggregator);
 
   gboolean          (*start)          (GstAggregator    *  aggregator);
+
+  GstClockTime      (*get_next_time)  (GstAggregator    *  aggregator);
 };
 </pre>
 <p>The aggregator base class will handle in a thread-safe way all manners of
@@ -399,19 +448,28 @@
 <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>
+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
+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>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.get-next-time"></a>get_next_time</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when the element needs to know the running time of the next
+rendered buffer for live pipelines. This causes deadline
+based aggregation to occur. Defaults to returning
+GST_CLOCK_TIME_NONE causing the element to wait for buffers
+on all sink pads before aggregating.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -423,7 +481,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstAggregatorPad.html b/docs/libs/html/gst-plugins-bad-libs-GstAggregatorPad.html
index 0dc87ec..11dcb33 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstAggregatorPad.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstAggregatorPad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstAggregatorPad</title>
+<title>GstAggregatorPad: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstAggregator.html" title="GstAggregator">
 <link rel="next" href="video.html" title="Video helpers and baseclasses">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -55,6 +55,22 @@
 <a class="link" href="gst-plugins-bad-libs-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>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-drop-buffer" title="gst_aggregator_pad_drop_buffer ()">gst_aggregator_pad_drop_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-is-eos" title="gst_aggregator_pad_is_eos ()">gst_aggregator_pad_is_eos</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -140,6 +156,40 @@
 <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-drop-buffer"></a><h3>gst_aggregator_pad_drop_buffer ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_aggregator_pad_drop_buffer (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad" title="struct GstAggregatorPad"><span class="type">GstAggregatorPad</span></a> *pad</code></em>);</pre>
+<p>Drop the buffer currently queued in <em class="parameter"><code>pad</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.7.3.6.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>pad</p></td>
+<td class="parameter_description"><p>the pad where to drop any pending buffer</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.7.3.6.4.6"></a><h4>Returns</h4>
+<p> TRUE if there was a buffer queued in <em class="parameter"><code>pad</code></em>
+, or FALSE if not.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-aggregator-pad-is-eos"></a><h3>gst_aggregator_pad_is_eos ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_aggregator_pad_is_eos (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad" title="struct GstAggregatorPad"><span class="type">GstAggregatorPad</span></a> *pad</code></em>);</pre>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstAggregatorPad.other_details"></a><h2>Types and Values</h2>
@@ -148,9 +198,10 @@
 <pre class="programlisting">struct GstAggregatorPad {
   GstPad                       parent;
 
-  GstBuffer                 *  buffer;
-  GstSegment                   segment;
-  gboolean                     eos;
+  /* Protected by the OBJECT_LOCK */
+  GstSegment segment;
+  /* Segment to use in the clip function, before the queue */
+  GstSegment clip_segment;
 
   /* &lt; Private &gt; */
   GstAggregatorPadPrivate   *  priv;
@@ -174,17 +225,12 @@
 <td> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstAggregatorPad.buffer"></a>buffer</code></em>;</p></td>
-<td class="struct_member_description"><p>currently queued buffer.</p></td>
-<td class="struct_member_annotations"> </td>
-</tr>
-<tr>
 <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstSegment.html"><span class="type">GstSegment</span></a> <em class="structfield"><code><a name="GstAggregatorPad.segment"></a>segment</code></em>;</p></td>
 <td class="struct_member_description"><p>last segment received.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstAggregatorPad.eos"></a>eos</code></em>;</p></td>
+<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstSegment.html"><span class="type">GstSegment</span></a> <em class="structfield"><code><a name="GstAggregatorPad.clip-segment"></a>clip_segment</code></em>;</p></td>
 <td> </td>
 <td> </td>
 </tr>
@@ -240,7 +286,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html b/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html
index ada45c1..24f8f03 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstEGLImageMemory</title>
+<title>GstEGLImageMemory: GStreamer Bad Plugins 1.0 Library Reference Manual</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.21 (XML mode)">
+<link rel="next" href="GstGLBaseFilter.html" title="GstGLBaseFilter">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,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="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>
+<td><a accesskey="n" href="GstGLBaseFilter.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>
@@ -183,7 +183,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</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 387923f..4035ec5 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLAPI</title>
+<title>GstGLAPI: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gl.html" title="OpenGL Helper Library">
 <link rel="next" href="GstGLBufferPool.html" title="GstGLBufferPool">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -126,24 +126,104 @@
 <a name="gst-gl-api-to-string"></a><h3>gst_gl_api_to_string ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/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 class="refsect3">
+<a name="id-1.2.9.2.6.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>api</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> to stringify</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.2.5"></a><h4>Returns</h4>
+<p> A space seperated string of the OpenGL api's enabled in <em class="parameter"><code>api</code></em>
+</p>
+</div>
 </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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *api_s</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.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>api_s</p></td>
+<td class="parameter_description"><p>a space seperated string of OpenGL apis</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.3.5"></a><h4>Returns</h4>
+<p> The <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> represented by <em class="parameter"><code>api_s</code></em>
+</p>
+</div>
 </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="https://developer.gnome.org/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 class="refsect3">
+<a name="id-1.2.9.2.6.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>api</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> to stringify</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.4.5"></a><h4>Returns</h4>
+<p> A space seperated string of the OpenGL platforms enabled in <em class="parameter"><code>api</code></em>
+</p>
+</div>
 </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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *platform_s</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.5.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>platform_s</p></td>
+<td class="parameter_description"><p>a space seperated string of OpenGL platformss</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.2.6.5.5"></a><h4>Returns</h4>
+<p> The <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> represented by <em class="parameter"><code>platform_s</code></em>
+</p>
+</div>
 </div>
 <hr>
 <div class="refsect2">
@@ -278,7 +358,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLContextCocoa.html b/docs/libs/html/gst-plugins-bad-libs-GstGLContextCocoa.html
index 7151bad..9788806 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLContextCocoa.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLContextCocoa.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLContextCocoa</title>
+<title>GstGLContextCocoa: GStreamer Bad Plugins 1.0 Library Reference Manual</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="GstGLContext.html" title="GstGLContext">
 <link rel="next" href="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -38,14 +38,32 @@
 <col width="150px" class="functions_return">
 <col class="functions_name">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="function_type">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#GstGLContextCocoa" title="struct GstGLContextCocoa"><span class="returnvalue">GstGLContextCocoa</span></a> *
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-new" title="gst_gl_context_cocoa_new ()">gst_gl_context_cocoa_new</a> <span class="c_punctuation">()</span>
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-current-context" title="gst_gl_context_cocoa_get_current_context ()">gst_gl_context_cocoa_get_current_context</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">CGLPixelFormatObj</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-pixel-format" title="gst_gl_context_cocoa_get_pixel_format ()">gst_gl_context_cocoa_get_pixel_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -69,7 +87,20 @@
 <div class="refsect2">
 <a name="gst-gl-context-cocoa-new"></a><h3>gst_gl_context_cocoa_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#GstGLContextCocoa" title="struct GstGLContextCocoa"><span class="returnvalue">GstGLContextCocoa</span></a> *
-gst_gl_context_cocoa_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_context_cocoa_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-cocoa-get-current-context"></a><h3>gst_gl_context_cocoa_get_current_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_cocoa_get_current_context
+                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-cocoa-get-pixel-format"></a><h3>gst_gl_context_cocoa_get_pixel_format ()</h3>
+<pre class="programlisting"><span class="returnvalue">CGLPixelFormatObj</span>
+gst_gl_context_cocoa_get_pixel_format (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLContextCocoa.html#GstGLContextCocoa" title="struct GstGLContextCocoa"><span class="type">GstGLContextCocoa</span></a> *context</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -83,7 +114,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLContextEGL.html b/docs/libs/html/gst-plugins-bad-libs-GstGLContextEGL.html
index 4d5a3a8..dba0218 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLContextEGL.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLContextEGL.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLContextEGL</title>
+<title>GstGLContextEGL: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">
-<link rel="next" href="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-libs-GstGLContextEagl.html" title="GstGLContextEagl">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,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-GstGLContextCocoa.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLContextGLX.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLContextEagl.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-GstGLContextEGL"></a><div class="titlepage"></div>
@@ -38,14 +38,32 @@
 <col width="150px" class="functions_return">
 <col class="functions_name">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="function_type">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#GstGLContextEGL" title="struct GstGLContextEGL"><span class="returnvalue">GstGLContextEGL</span></a> *
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-new" title="gst_gl_context_egl_new ()">gst_gl_context_egl_new</a> <span class="c_punctuation">()</span>
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-current-context" title="gst_gl_context_egl_get_current_context ()">gst_gl_context_egl_get_current_context</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-proc-address" title="gst_gl_context_egl_get_proc_address ()">gst_gl_context_egl_get_proc_address</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -69,7 +87,21 @@
 <div class="refsect2">
 <a name="gst-gl-context-egl-new"></a><h3>gst_gl_context_egl_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLContextEGL.html#GstGLContextEGL" title="struct GstGLContextEGL"><span class="returnvalue">GstGLContextEGL</span></a> *
-gst_gl_context_egl_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_context_egl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-egl-get-current-context"></a><h3>gst_gl_context_egl_get_current_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_egl_get_current_context
+                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-egl-get-proc-address"></a><h3>gst_gl_context_egl_get_proc_address ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+gst_gl_context_egl_get_proc_address (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> gl_api</code></em>,
+                                     <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -89,13 +121,15 @@
   EGLImageKHR (*eglCreateImage) (EGLDisplay dpy, EGLContext ctx, EGLenum target,
       EGLClientBuffer buffer, const EGLint *attrib_list);
   EGLBoolean (*eglDestroyImage) (EGLDisplay dpy, EGLImageKHR image);
+
+  /* Cached handle */
+  EGLNativeWindowType window_handle;
 };
 </pre>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLContextEagl.html b/docs/libs/html/gst-plugins-bad-libs-GstGLContextEagl.html
new file mode 100644
index 0000000..e1ec5cb
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLContextEagl.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GstGLContextEagl: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">
+<link rel="next" href="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-GstGLContextEagl.description" class="shortcut">Description</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="gst-plugins-bad-libs-GstGLContextEGL.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLContextGLX.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-GstGLContextEagl"></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-GstGLContextEagl.top_of_page"></a>GstGLContextEagl</span></h2>
+<p>GstGLContextEagl</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLContextEagl.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-GstGLContextEagl.html#GstGLContextEagl" title="struct GstGLContextEagl"><span class="returnvalue">GstGLContextEagl</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-new" title="gst_gl_context_eagl_new ()">gst_gl_context_eagl_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-get-current-context" title="gst_gl_context_eagl_get_current_context ()">gst_gl_context_eagl_get_current_context</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLContextEagl.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-GstGLContextEagl.html#GstGLContextEagl" title="struct GstGLContextEagl">GstGLContextEagl</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLContextEagl.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLContextEagl.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-gl-context-eagl-new"></a><h3>gst_gl_context_eagl_new ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLContextEagl.html#GstGLContextEagl" title="struct GstGLContextEagl"><span class="returnvalue">GstGLContextEagl</span></a> *
+gst_gl_context_eagl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-eagl-get-current-context"></a><h3>gst_gl_context_eagl_get_current_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_eagl_get_current_context
+                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLContextEagl.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLContextEagl"></a><h3>struct GstGLContextEagl</h3>
+<pre class="programlisting">struct GstGLContextEagl {
+};
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLContextGLX.html b/docs/libs/html/gst-plugins-bad-libs-GstGLContextGLX.html
index c8cc0c6..008da55 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLContextGLX.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLContextGLX.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLContextGLX</title>
+<title>GstGLContextGLX: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLContextEGL.html" title="GstGLContextEGL">
+<link rel="prev" href="gst-plugins-bad-libs-GstGLContextEagl.html" title="GstGLContextEagl">
 <link rel="next" href="gst-plugins-bad-libs-GstGLContextWGL.html" title="GstGLContextWGL">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -19,7 +19,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="gst-plugins-bad-libs-GstGLContextEGL.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstGLContextEagl.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-libs-GstGLContextWGL.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -38,14 +38,32 @@
 <col width="150px" class="functions_return">
 <col class="functions_name">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="function_type">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#GstGLContextGLX" title="struct GstGLContextGLX"><span class="returnvalue">GstGLContextGLX</span></a> *
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-new" title="gst_gl_context_glx_new ()">gst_gl_context_glx_new</a> <span class="c_punctuation">()</span>
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-current-context" title="gst_gl_context_glx_get_current_context ()">gst_gl_context_glx_get_current_context</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-proc-address" title="gst_gl_context_glx_get_proc_address ()">gst_gl_context_glx_get_proc_address</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -69,7 +87,21 @@
 <div class="refsect2">
 <a name="gst-gl-context-glx-new"></a><h3>gst_gl_context_glx_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLContextGLX.html#GstGLContextGLX" title="struct GstGLContextGLX"><span class="returnvalue">GstGLContextGLX</span></a> *
-gst_gl_context_glx_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_context_glx_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-glx-get-current-context"></a><h3>gst_gl_context_glx_get_current_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_glx_get_current_context
+                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-glx-get-proc-address"></a><h3>gst_gl_context_glx_get_proc_address ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+gst_gl_context_glx_get_proc_address (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> gl_api</code></em>,
+                                     <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -83,7 +115,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLContextWGL.html b/docs/libs/html/gst-plugins-bad-libs-GstGLContextWGL.html
index 6f9283f..0089daf 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLContextWGL.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLContextWGL.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLContextWGL</title>
+<title>GstGLContextWGL: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLContextGLX.html" title="GstGLContextGLX">
 <link rel="next" href="GstGLDisplay.html" title="GstGLDisplay">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -38,14 +38,32 @@
 <col width="150px" class="functions_return">
 <col class="functions_name">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="function_type">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#GstGLContextWGL" title="struct GstGLContextWGL"><span class="returnvalue">GstGLContextWGL</span></a> *
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-new" title="gst_gl_context_wgl_new ()">gst_gl_context_wgl_new</a> <span class="c_punctuation">()</span>
 </td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">guintptr</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-current-context" title="gst_gl_context_wgl_get_current_context ()">gst_gl_context_wgl_get_current_context</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-proc-address" title="gst_gl_context_wgl_get_proc_address ()">gst_gl_context_wgl_get_proc_address</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -69,7 +87,21 @@
 <div class="refsect2">
 <a name="gst-gl-context-wgl-new"></a><h3>gst_gl_context_wgl_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLContextWGL.html#GstGLContextWGL" title="struct GstGLContextWGL"><span class="returnvalue">GstGLContextWGL</span></a> *
-gst_gl_context_wgl_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_context_wgl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-wgl-get-current-context"></a><h3>gst_gl_context_wgl_get_current_context ()</h3>
+<pre class="programlisting"><span class="returnvalue">guintptr</span>
+gst_gl_context_wgl_get_current_context
+                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-wgl-get-proc-address"></a><h3>gst_gl_context_wgl_get_proc_address ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
+gst_gl_context_wgl_get_proc_address (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> gl_api</code></em>,
+                                     <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -83,7 +115,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html b/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html
deleted file mode 100644
index 4a3cee3..0000000
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!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.21 (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="5"><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>
-</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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="gst-plugins-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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="gst-plugins-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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="gst-plugins-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.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="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
-                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
-                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *fbo</code></em>,
-                             <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fbo</code></em>,
-                           <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> input_tex_width</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param1</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param2</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param3</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/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="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
-                           <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/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.21</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLSyncMeta.html b/docs/libs/html/gst-plugins-bad-libs-GstGLSyncMeta.html
new file mode 100644
index 0000000..ebe4c7c
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLSyncMeta.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GstGLSyncMeta: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">
+<link rel="next" href="GstGLUpload.html" title="GstGLUpload">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-GstGLSyncMeta.description" class="shortcut">Description</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="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="GstGLUpload.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-GstGLSyncMeta"></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-GstGLSyncMeta.top_of_page"></a>GstGLSyncMeta</span></h2>
+<p>GstGLSyncMeta</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLSyncMeta.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-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta"><span class="returnvalue">GstGLSyncMeta</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-add-gl-sync-meta" title="gst_buffer_add_gl_sync_meta ()">gst_buffer_add_gl_sync_meta</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-GstGLSyncMeta.html#gst-buffer-get-gl-sync-meta" title="gst_buffer_get_gl_sync_meta()">gst_buffer_get_gl_sync_meta</a><span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-api-get-type" title="gst_gl_sync_meta_api_get_type ()">gst_gl_sync_meta_api_get_type</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMeta.html#GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-get-info" title="gst_gl_sync_meta_get_info ()">gst_gl_sync_meta_get_info</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-GstGLSyncMeta.html#gst-gl-sync-meta-set-sync-point" title="gst_gl_sync_meta_set_sync_point ()">gst_gl_sync_meta_set_sync_point</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-GstGLSyncMeta.html#gst-gl-sync-meta-wait" title="gst_gl_sync_meta_wait ()">gst_gl_sync_meta_wait</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLSyncMeta.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-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta">GstGLSyncMeta</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS" title="GST_BUFFER_POOL_OPTION_GL_SYNC_META">GST_BUFFER_POOL_OPTION_GL_SYNC_META</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLSyncMeta.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLSyncMeta.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-buffer-add-gl-sync-meta"></a><h3>gst_buffer_add_gl_sync_meta ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta"><span class="returnvalue">GstGLSyncMeta</span></a> *
+gst_buffer_add_gl_sync_meta (<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/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-buffer-get-gl-sync-meta"></a><h3>gst_buffer_get_gl_sync_meta()</h3>
+<pre class="programlisting">#define gst_buffer_get_gl_sync_meta(b) ((GstGLSyncMeta*)gst_buffer_get_meta((b),GST_GL_SYNC_META_API_TYPE))
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-sync-meta-api-get-type"></a><h3>gst_gl_sync_meta_api_get_type ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
+gst_gl_sync_meta_api_get_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-sync-meta-get-info"></a><h3>gst_gl_sync_meta_get_info ()</h3>
+<pre class="programlisting">const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMeta.html#GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
+gst_gl_sync_meta_get_info (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-sync-meta-set-sync-point"></a><h3>gst_gl_sync_meta_set_sync_point ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_sync_meta_set_sync_point (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta"><span class="type">GstGLSyncMeta</span></a> *sync</code></em>,
+                                 <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-sync-meta-wait"></a><h3>gst_gl_sync_meta_wait ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_sync_meta_wait (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta" title="struct GstGLSyncMeta"><span class="type">GstGLSyncMeta</span></a> *sync</code></em>,
+                       <em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLSyncMeta.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLSyncMeta"></a><h3>struct GstGLSyncMeta</h3>
+<pre class="programlisting">struct GstGLSyncMeta {
+};
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS"></a><h3>GST_BUFFER_POOL_OPTION_GL_SYNC_META</h3>
+<pre class="programlisting">#define GST_BUFFER_POOL_OPTION_GL_SYNC_META "GstBufferPoolOptionGLSyncMeta"
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowAndroid.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowAndroid.html
index 635e171..0a8592b 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowAndroid.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowAndroid.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowAndroid</title>
+<title>GstGLWindowAndroid: GStreamer Bad Plugins 1.0 Library Reference Manual</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="GstGLWindow.html" title="GstGLWindow">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowCocoa.html" title="GstGLWindowCocoa">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -75,7 +75,7 @@
 <div class="refsect2">
 <a name="gst-gl-window-android-egl-new"></a><h3>gst_gl_window_android_egl_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLWindowAndroid.html#GstGLWindowAndroidEGL" title="struct GstGLWindowAndroidEGL"><span class="returnvalue">GstGLWindowAndroidEGL</span></a> *
-gst_gl_window_android_egl_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_window_android_egl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -96,7 +96,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowCocoa.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowCocoa.html
index dea1162..b1e2e83 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowCocoa.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowCocoa.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowCocoa</title>
+<title>GstGLWindowCocoa: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLWindowAndroid.html" title="GstGLWindowAndroid">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowDispmanx.html" title="GstGLWindowDispmanx">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -85,14 +85,13 @@
 <div class="refsect2">
 <a name="gst-gl-window-cocoa-new"></a><h3>gst_gl_window_cocoa_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLWindowCocoa.html#GstGLWindowCocoa" title="struct GstGLWindowCocoa"><span class="returnvalue">GstGLWindowCocoa</span></a> *
-gst_gl_window_cocoa_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_window_cocoa_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-gl-window-cocoa-create-window"></a><h3>gst_gl_window_cocoa_create_window ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_window_cocoa_create_window (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLWindowCocoa.html#GstGLWindowCocoa" title="struct GstGLWindowCocoa"><span class="type">GstGLWindowCocoa</span></a> *window_cocoa</code></em>,
-                                   <em class="parameter"><code><span class="type">NSRect</span> rect</code></em>);</pre>
+gst_gl_window_cocoa_create_window (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLWindowCocoa.html#GstGLWindowCocoa" title="struct GstGLWindowCocoa"><span class="type">GstGLWindowCocoa</span></a> *window_cocoa</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -113,7 +112,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowDispmanx.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowDispmanx.html
index 64f9563..1240617 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowDispmanx.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowDispmanx.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowDispmanx</title>
+<title>GstGLWindowDispmanx: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLWindowCocoa.html" title="GstGLWindowCocoa">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowWayland.html" title="GstGLWindowWayland">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -75,7 +75,7 @@
 <div class="refsect2">
 <a name="gst-gl-window-dispmanx-egl-new"></a><h3>gst_gl_window_dispmanx_egl_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLWindowDispmanx.html#GstGLWindowDispmanxEGL" title="struct GstGLWindowDispmanxEGL"><span class="returnvalue">GstGLWindowDispmanxEGL</span></a> *
-gst_gl_window_dispmanx_egl_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_window_dispmanx_egl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -96,7 +96,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWayland.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWayland.html
index 816f163..7b0935c 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWayland.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWayland.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowWayland</title>
+<title>GstGLWindowWayland: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLWindowDispmanx.html" title="GstGLWindowDispmanx">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowWin32.html" title="GstGLWindowWin32">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -75,7 +75,7 @@
 <div class="refsect2">
 <a name="gst-gl-window-wayland-egl-new"></a><h3>gst_gl_window_wayland_egl_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLWindowWayland.html#GstGLWindowWaylandEGL" title="struct GstGLWindowWaylandEGL"><span class="returnvalue">GstGLWindowWaylandEGL</span></a> *
-gst_gl_window_wayland_egl_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_window_wayland_egl_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 </div>
 <div class="refsect1">
@@ -96,7 +96,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWin32.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWin32.html
index c5f3159..ecaa029 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWin32.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowWin32.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowWin32</title>
+<title>GstGLWindowWin32: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLWindowWayland.html" title="GstGLWindowWayland">
 <link rel="next" href="gst-plugins-bad-libs-GstGLWindowX11.html" title="GstGLWindowX11">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -85,7 +85,7 @@
 <div class="refsect2">
 <a name="gst-gl-window-win32-new"></a><h3>gst_gl_window_win32_new ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLWindowWin32.html#GstGLWindowWin32" title="struct GstGLWindowWin32"><span class="returnvalue">GstGLWindowWin32</span></a> *
-gst_gl_window_win32_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+gst_gl_window_win32_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
@@ -113,7 +113,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</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 900be0b..cc12f80 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLWindowX11</title>
+<title>GstGLWindowX11: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLWindowWin32.html" title="GstGLWindowWin32">
-<link rel="next" href="gstreamer-libs-hierarchy.html" title="Part II. Object Hierarchy">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="ch07.html" title="Interfaces">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,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-GstGLWindowWin32.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gstreamer-libs-hierarchy.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="ch07.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-GstGLWindowX11"></a><div class="titlepage"></div>
@@ -123,9 +123,8 @@
 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.9.26.6.5.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.29.6.5.5"></a><h4>Returns</h4>
 <p> the trapped error code, or 0 for success</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -149,7 +148,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html b/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
index 0a58f20..6c0fb9c 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstInsertbin</title>
+<title>GstInsertbin: GStreamer Bad Plugins 1.0 Library Reference Manual</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="tools.html" title="Useful elements">
 <link rel="prev" href="tools.html" title="Useful elements">
 <link rel="next" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -113,27 +113,27 @@
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-append" title="The “append” signal">append</a></td>
-<td class="signal_flags">Action</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-insert-after" title="The “insert-after” signal">insert-after</a></td>
-<td class="signal_flags">Action</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-insert-before" title="The “insert-before” signal">insert-before</a></td>
-<td class="signal_flags">Action</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-prepend" title="The “prepend” signal">prepend</a></td>
-<td class="signal_flags">Action</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-remove" title="The “remove” signal">remove</a></td>
-<td class="signal_flags">Action</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -255,9 +255,8 @@
 <div class="refsect3">
 <a name="id-1.2.6.2.10.3.6"></a><h4>Returns</h4>
 <p> The new <a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin"><span class="type">GstInsertBin</span></a></p>
-<p></p>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -298,7 +297,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -339,7 +338,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -388,7 +387,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -437,7 +436,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -477,7 +476,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 </div>
 <div class="refsect1">
@@ -505,7 +504,7 @@
 user_function (<a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin"><span class="type">GstInsertBin</span></a> *element,
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *callback,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data,
-               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      arg3,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data2,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This action signal adds the filter like element after any other element
 in the bin.</p>
@@ -536,6 +535,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>user_data2</p></td>
+<td class="parameter_description"><p>The user data of the signal (ignored)</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>
@@ -543,7 +547,7 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Action</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -553,7 +557,7 @@
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *sibling,
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *callback,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data,
-               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      arg4,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data2,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This action signal adds the filter like element after the <em class="parameter"><code>sibling</code></em>
 
@@ -592,6 +596,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>user_data2</p></td>
+<td class="parameter_description"><p>The user data of the signal (ignored)</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>
@@ -599,7 +608,7 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Action</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -609,7 +618,7 @@
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *sibling,
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *callback,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data,
-               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      arg4,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data2,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This action signal adds the filter like element before the <em class="parameter"><code>sibling</code></em>
 
@@ -647,6 +656,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>user_data2</p></td>
+<td class="parameter_description"><p>The user data of the signal (ignored)</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>
@@ -654,7 +668,7 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Action</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -663,7 +677,7 @@
 user_function (<a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin"><span class="type">GstInsertBin</span></a> *element,
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *callback,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data,
-               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      arg3,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data2,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This action signal adds the filter like element before any other element
 in the bin.</p>
@@ -694,6 +708,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>user_data2</p></td>
+<td class="parameter_description"><p>The user data of the signal (ignored)</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>
@@ -701,7 +720,7 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Action</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -710,7 +729,7 @@
 user_function (<a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin"><span class="type">GstInsertBin</span></a> *element,
                <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>   *callback,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data,
-               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      arg3,
+               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data2,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This action signal removed the filter like element from the bin.</p>
 <p>Same as <a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#gst-insert-bin-remove" title="gst_insert_bin_remove ()"><code class="function">gst_insert_bin_remove()</code></a></p>
@@ -740,6 +759,11 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>user_data2</p></td>
+<td class="parameter_description"><p>The user data of the signal (ignored)</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>
@@ -747,12 +771,11 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Action</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstPhotography.html b/docs/libs/html/gst-plugins-bad-libs-GstPhotography.html
new file mode 100644
index 0000000..1f00d2e
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstPhotography.html
@@ -0,0 +1,2401 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GstPhotography: GStreamer Bad Plugins 1.0 Library Reference Manual</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="ch07.html" title="Interfaces">
+<link rel="prev" href="ch07.html" title="Interfaces">
+<link rel="next" href="gstreamer-libs-hierarchy.html" title="Part II. Object Hierarchy">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-GstPhotography.description" class="shortcut">Description</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="ch07.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="ch07.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gstreamer-libs-hierarchy.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-GstPhotography"></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-GstPhotography.top_of_page"></a>GstPhotography</span></h2>
+<p>GstPhotography — Interface for digital image capture elements</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.stability-level"></a><h2>Stability Level</h2>
+<acronym title="Unstable interfaces are experimental or transitional. They are typically used to
+give outside developers early access to new or rapidly changing technology, or
+to provide an interim solution to a problem where a more general solution is
+anticipated. No claims are made about either source or binary compatibility from
+one minor release to the next.
+
+The Unstable interface level is a warning that these interfaces are  subject to
+change without warning and should not be used in unbundled products.
+
+Given such caveats, customer impact need not be a factor when considering
+incompatible changes to an Unstable interface in a major or minor release.
+Nonetheless, when such changes are introduced, the changes should still be
+mentioned in the release notes for the affected release.
+"><span class="acronym">Unstable</span></acronym>, unless otherwise indicated
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.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">
+<span class="c_punctuation">(</span><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCapturePrepared" title="GstPhotographyCapturePrepared ()">*GstPhotographyCapturePrepared</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-ev-compensation" title="gst_photography_get_ev_compensation ()">gst_photography_get_ev_compensation</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-iso-speed" title="gst_photography_get_iso_speed ()">gst_photography_get_iso_speed</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-aperture" title="gst_photography_get_aperture ()">gst_photography_get_aperture</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-exposure" title="gst_photography_get_exposure ()">gst_photography_get_exposure</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-white-balance-mode" title="gst_photography_get_white_balance_mode ()">gst_photography_get_white_balance_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-color-tone-mode" title="gst_photography_get_color_tone_mode ()">gst_photography_get_color_tone_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-scene-mode" title="gst_photography_get_scene_mode ()">gst_photography_get_scene_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flash-mode" title="gst_photography_get_flash_mode ()">gst_photography_get_flash_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flicker-mode" title="gst_photography_get_flicker_mode ()">gst_photography_get_flicker_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-focus-mode" title="gst_photography_get_focus_mode ()">gst_photography_get_focus_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-noise-reduction" title="gst_photography_get_noise_reduction ()">gst_photography_get_noise_reduction</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-zoom" title="gst_photography_get_zoom ()">gst_photography_get_zoom</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-ev-compensation" title="gst_photography_set_ev_compensation ()">gst_photography_set_ev_compensation</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-iso-speed" title="gst_photography_set_iso_speed ()">gst_photography_set_iso_speed</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-aperture" title="gst_photography_set_aperture ()">gst_photography_set_aperture</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-exposure" title="gst_photography_set_exposure ()">gst_photography_set_exposure</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-white-balance-mode" title="gst_photography_set_white_balance_mode ()">gst_photography_set_white_balance_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-color-tone-mode" title="gst_photography_set_color_tone_mode ()">gst_photography_set_color_tone_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-scene-mode" title="gst_photography_set_scene_mode ()">gst_photography_set_scene_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flash-mode" title="gst_photography_set_flash_mode ()">gst_photography_set_flash_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flicker-mode" title="gst_photography_set_flicker_mode ()">gst_photography_set_flicker_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-focus-mode" title="gst_photography_set_focus_mode ()">gst_photography_set_focus_mode</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-noise-reduction" title="gst_photography_set_noise_reduction ()">gst_photography_set_noise_reduction</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-zoom" title="gst_photography_set_zoom ()">gst_photography_set_zoom</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="returnvalue">GstPhotographyCaps</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-capabilities" title="gst_photography_get_capabilities ()">gst_photography_get_capabilities</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-prepare-for-capture" title="gst_photography_prepare_for_capture ()">gst_photography_prepare_for_capture</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-GstPhotography.html#gst-photography-set-autofocus" title="gst_photography_set_autofocus ()">gst_photography_set_autofocus</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-config" title="gst_photography_set_config ()">gst_photography_set_config</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-config" title="gst_photography_get_config ()">gst_photography_get_config</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.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-GstPhotography.html#GstPhotography" title="GstPhotography">GstPhotography</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction">GstPhotographyNoiseReduction</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode">GstPhotographyWhiteBalanceMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode">GstPhotographyColorToneMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode">GstPhotographySceneMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode">GstPhotographyFlashMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode">GstPhotographyFlickerReductionMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode">GstPhotographyFocusMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusStatus" title="enum GstPhotographyFocusStatus">GstPhotographyFocusStatus</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps">GstPhotographyCaps</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyShakeRisk" title="enum GstPhotographyShakeRisk">GstPhotographyShakeRisk</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" title="GST_PHOTOGRAPHY_AUTOFOCUS_DONE">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_SHAKE_RISK">GST_PHOTOGRAPHY_SHAKE_RISK</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_WB_MODE">GST_PHOTOGRAPHY_PROP_WB_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_SCENE_MODE">GST_PHOTOGRAPHY_PROP_SCENE_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FLASH_MODE">GST_PHOTOGRAPHY_PROP_FLASH_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS" title="GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION">GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS" title="GST_PHOTOGRAPHY_PROP_FOCUS_STATUS">GST_PHOTOGRAPHY_PROP_FOCUS_STATUS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS" title="GST_PHOTOGRAPHY_PROP_CAPABILITIES">GST_PHOTOGRAPHY_PROP_CAPABILITIES</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_PROP_SHAKE_RISK">GST_PHOTOGRAPHY_PROP_SHAKE_RISK</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS" title="GST_PHOTOGRAPHY_PROP_EV_COMP">GST_PHOTOGRAPHY_PROP_EV_COMP</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS" title="GST_PHOTOGRAPHY_PROP_ISO_SPEED">GST_PHOTOGRAPHY_PROP_ISO_SPEED</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-APERTURE:CAPS" title="GST_PHOTOGRAPHY_PROP_APERTURE">GST_PHOTOGRAPHY_PROP_APERTURE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS" title="GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS">GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS" title="GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS">GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FLICKER_MODE">GST_PHOTOGRAPHY_PROP_FLICKER_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS" title="GST_PHOTOGRAPHY_PROP_FOCUS_MODE">GST_PHOTOGRAPHY_PROP_FOCUS_MODE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ZOOM:CAPS" title="GST_PHOTOGRAPHY_PROP_ZOOM">GST_PHOTOGRAPHY_PROP_ZOOM</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.description"></a><h2>Description</h2>
+<p>The interface allows access to some common digital image capture parameters.</p>
+<div class="note">
+  The GstPhotography interface is unstable API and may change in future.
+  One can define GST_USE_UNSTABLE_API to acknowledge and avoid this warning.
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="GstPhotographyCapturePrepared"></a><h3>GstPhotographyCapturePrepared ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+<span class="c_punctuation">(</span>*GstPhotographyCapturePrepared<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
+                                  <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *configured_caps</code></em>);</pre>
+<p>This callback will be called when the element has finished preparations
+and is ready for image capture. The next buffer that element produces
+will be of <em class="parameter"><code>configured_caps</code></em>
+ format, so this callback allows the application
+to e.g. reconfigure capsfilters in pipeline if any.</p>
+<div class="refsect3">
+<a name="id-1.2.10.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>data</p></td>
+<td class="parameter_description"><p>user data that has been given, when registering the callback</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>configured_caps</p></td>
+<td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> defining the configured capture format.
+Ownership of these caps stays in the element.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-ev-compensation"></a><h3>gst_photography_get_ev_compensation ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_ev_compensation (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *ev_comp</code></em>);</pre>
+<p>Get the ev compensation value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>ev_comp</p></td>
+<td class="parameter_description"><p>ev compensation value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.3.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-iso-speed"></a><h3>gst_photography_get_iso_speed ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_iso_speed (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *iso_speed</code></em>);</pre>
+<p>Get the ISO value (light sensivity) for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>iso_speed</p></td>
+<td class="parameter_description"><p>ISO speed value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.4.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-aperture"></a><h3>gst_photography_get_aperture ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_aperture (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *aperture</code></em>);</pre>
+<p>Get the aperture value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>aperture</p></td>
+<td class="parameter_description"><p>aperture value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.5.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-exposure"></a><h3>gst_photography_get_exposure ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_exposure (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                              <em class="parameter"><code><span class="type">guint32</span> *exposure</code></em>);</pre>
+<p>Get the fixed exposure time (in us) for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>exposure</p></td>
+<td class="parameter_description"><p>exposure time to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.6.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-white-balance-mode"></a><h3>gst_photography_get_white_balance_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_white_balance_mode
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> *wb_mode</code></em>);</pre>
+<p>Get the white balance mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>wb_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.7.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-color-tone-mode"></a><h3>gst_photography_get_color_tone_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_color_tone_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> *tone_mode</code></em>);</pre>
+<p>Get the color tone mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.8.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>tone_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.8.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-scene-mode"></a><h3>gst_photography_get_scene_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_scene_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> *scene_mode</code></em>);</pre>
+<p>Get the scene mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.9.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>scene_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.9.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-flash-mode"></a><h3>gst_photography_get_flash_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_flash_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> *flash_mode</code></em>);</pre>
+<p>Get the flash mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.10.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>flash_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.10.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-flicker-mode"></a><h3>gst_photography_get_flicker_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_flicker_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                  <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode"><span class="type">GstPhotographyFlickerReductionMode</span></a> *mode</code></em>);</pre>
+<p>Get the flicker mode value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.11.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>flicker_mode</p></td>
+<td class="parameter_description"><p>flicker mode value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.11.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-focus-mode"></a><h3>gst_photography_get_focus_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_focus_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode"><span class="type">GstPhotographyFocusMode</span></a> *mode</code></em>);</pre>
+<p>Get the focus mode value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.12.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>focus_mode</p></td>
+<td class="parameter_description"><p>focus_mode value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.12.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-noise-reduction"></a><h3>gst_photography_get_noise_reduction ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_noise_reduction (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a> *noise_reduction</code></em>);</pre>
+<p>Get the noise reduction mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.13.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>noise_reduction</p></td>
+<td class="parameter_description"><p><span class="type">GstPhotographyNoiseReductionMode</span> to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.13.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+<p class="since">Since: 0.10.21</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-zoom"></a><h3>gst_photography_get_zoom ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_zoom (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *zoom</code></em>);</pre>
+<p>Get the zoom value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.14.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>zoom</p></td>
+<td class="parameter_description"><p>zoom value to get</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.14.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if getting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-ev-compensation"></a><h3>gst_photography_set_ev_compensation ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_ev_compensation (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> ev_comp</code></em>);</pre>
+<p>Set the ev compensation value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.15.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>ev_comp</p></td>
+<td class="parameter_description"><p>ev compensation value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.15.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-iso-speed"></a><h3>gst_photography_set_iso_speed ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_iso_speed (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> iso_speed</code></em>);</pre>
+<p>Set the ISO value (light sensivity) for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.16.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>iso_speed</p></td>
+<td class="parameter_description"><p>ISO speed value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.16.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-aperture"></a><h3>gst_photography_set_aperture ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_aperture (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> aperture</code></em>);</pre>
+<p>Set the aperture value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>aperture</p></td>
+<td class="parameter_description"><p>aperture value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.17.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-exposure"></a><h3>gst_photography_set_exposure ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_exposure (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> exposure</code></em>);</pre>
+<p>Set the fixed exposure time (in us) for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.18.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>exposure</p></td>
+<td class="parameter_description"><p>exposure time to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.18.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-white-balance-mode"></a><h3>gst_photography_set_white_balance_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_white_balance_mode
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> wb_mode</code></em>);</pre>
+<p>Set the white balance mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.19.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>wb_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.19.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-color-tone-mode"></a><h3>gst_photography_set_color_tone_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_color_tone_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> tone_mode</code></em>);</pre>
+<p>Set the color tone mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.20.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>tone_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.20.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-scene-mode"></a><h3>gst_photography_set_scene_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_scene_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> scene_mode</code></em>);</pre>
+<p>Set the scene mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.21.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>scene_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.21.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-flash-mode"></a><h3>gst_photography_set_flash_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_flash_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> flash_mode</code></em>);</pre>
+<p>Set the flash mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.22.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>flash_mode</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.22.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-flicker-mode"></a><h3>gst_photography_set_flicker_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_flicker_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                  <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode"><span class="type">GstPhotographyFlickerReductionMode</span></a> mode</code></em>);</pre>
+<p>Set the flicker mode value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.23.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>flicker_mode</p></td>
+<td class="parameter_description"><p>flicker mode value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.23.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-focus-mode"></a><h3>gst_photography_set_focus_mode ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_focus_mode (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode"><span class="type">GstPhotographyFocusMode</span></a> mode</code></em>);</pre>
+<p>Set the focus mode value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.24.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>focus_mode</p></td>
+<td class="parameter_description"><p>focus mode value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.24.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-noise-reduction"></a><h3>gst_photography_set_noise_reduction ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_noise_reduction (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a> noise_reduction</code></em>);</pre>
+<p>Set the noise reduction mode for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.25.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>noise_reduction</p></td>
+<td class="parameter_description"><p><span class="type">GstPhotographyNoiseReductionMode</span> to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.25.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+<p class="since">Since: 0.10.21</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-zoom"></a><h3>gst_photography_set_zoom ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_zoom (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> zoom</code></em>);</pre>
+<p>Set the zoom value for the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>.
+E.g. 1.0 to get original image and 3.0 for 3x zoom and so on.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>zoom</p></td>
+<td class="parameter_description"><p>zoom value to set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.26.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if setting the value succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-capabilities"></a><h3>gst_photography_get_capabilities ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="returnvalue">GstPhotographyCaps</span></a>
+gst_photography_get_capabilities (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>);</pre>
+<p>Get <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="type">GstPhotographyCaps</span></a> bitmask value that indicates what photography
+interface features the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> supports</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.27.6"></a><h4>Returns</h4>
+<p> <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="type">GstPhotographyCaps</span></a> value</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-prepare-for-capture"></a><h3>gst_photography_prepare_for_capture ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_prepare_for_capture (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCapturePrepared" title="GstPhotographyCapturePrepared ()"><span class="type">GstPhotographyCapturePrepared</span></a> func</code></em>,
+                                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *capture_caps</code></em>,
+                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
+<p>Start preparations for capture. Preparations can take indeterminate
+amount of time and <em class="parameter"><code>func</code></em>
+ callback is called after preparations are
+done. Image capture will begin after callback returns.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>func</p></td>
+<td class="parameter_description"><p>callback that is called after capturing has been prepared</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>capture_caps</p></td>
+<td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> defining the desired format of the captured image</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 that will be passed to the callback <em class="parameter"><code>func</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.28.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if preparations were started (caps were OK), otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-autofocus"></a><h3>gst_photography_set_autofocus ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_photography_set_autofocus (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> on</code></em>);</pre>
+<p>Start or stop autofocusing. <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" title="GST_PHOTOGRAPHY_AUTOFOCUS_DONE"><code class="literal">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</code></a>
+message is posted to bus when autofocusing has finished.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>on</p></td>
+<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to start autofocusing, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to stop autofocusing</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-set-config"></a><h3>gst_photography_set_config ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_set_config (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                            <em class="parameter"><code><span class="type">GstPhotographySettings</span> *config</code></em>);</pre>
+<p>Set all configuration settings at once.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>config</p></td>
+<td class="parameter_description"><p><span class="type">GstPhotographySettings</span> containg the configuration</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.30.6"></a><h4>Returns</h4>
+<p> TRUE if configuration was set successfully, otherwise FALSE.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-photography-get-config"></a><h3>gst_photography_get_config ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_photography_get_config (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
+                            <em class="parameter"><code><span class="type">GstPhotographySettings</span> *config</code></em>);</pre>
+<p>Get all configuration settings at once.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.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>photo</p></td>
+<td class="parameter_description"><p><a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface of a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>config</p></td>
+<td class="parameter_description"><p><span class="type">GstPhotographySettings</span> containg the configuration</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.10.2.7.31.6"></a><h4>Returns</h4>
+<p> TRUE if configuration was got successfully, otherwise FALSE.</p>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstPhotography.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstPhotography"></a><h3>GstPhotography</h3>
+<pre class="programlisting">typedef struct _GstPhotography GstPhotography;</pre>
+<p>Opaque <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> data structure.</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyNoiseReduction"></a><h3>enum GstPhotographyNoiseReduction</h3>
+<p>Noise Reduction features of a photography capture or filter element.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.3.4"></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-PHOTOGRAPHY-NOISE-REDUCTION-BAYER:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER</p></td>
+<td class="enum_member_description">
+<p>Adaptive noise reduction on Bayer
+format</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-YCC:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC</p></td>
+<td class="enum_member_description">
+<p>reduces the noise on Y and 2-chroma
+images.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-TEMPORAL:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL</p></td>
+<td class="enum_member_description">
+<p>Multi-frame adaptive NR,
+provided for the video mode</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-FIXED:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED</p></td>
+<td class="enum_member_description">
+<p>Fixed Pattern Noise refers to noise
+that does not change between frames. The noise is removed from the sensor
+image, by subtracting a previously-captured black image in memory.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-EXTRA:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA</p></td>
+<td class="enum_member_description">
+<p>Extra Noise Reduction. In the case
+of high-ISO capturing, some noise remains after YCC NR. XNR reduces this
+remaining noise.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 0.10.21</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyWhiteBalanceMode"></a><h3>enum GstPhotographyWhiteBalanceMode</h3>
+<p>Modes for white balance control.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.4.4"></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-PHOTOGRAPHY-WB-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_AUTO</p></td>
+<td class="enum_member_description">
+<p>Choose white balance mode automatically</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-DAYLIGHT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT</p></td>
+<td class="enum_member_description">
+<p>Mode for daylight conditions</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-CLOUDY:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_CLOUDY</p></td>
+<td class="enum_member_description">
+<p>Mode for cloudy conditions</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-SUNSET:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_SUNSET</p></td>
+<td class="enum_member_description">
+<p>Mode for sunset conditions</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-TUNGSTEN:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN</p></td>
+<td class="enum_member_description">
+<p>Mode for tungsten lighting</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-FLUORESCENT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT</p></td>
+<td class="enum_member_description">
+<p>Mode for fluorescent lighting</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_MANUAL</p></td>
+<td class="enum_member_description">
+<p>Disable automatic white balance adjustment
+and keep current values.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-WARM-FLUORESCENT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT</p></td>
+<td class="enum_member_description">
+<p>Mode for warm fluorescent lighting (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-SHADE:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_SHADE</p></td>
+<td class="enum_member_description">
+<p>Mode for shade lighting (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyColorToneMode"></a><h3>enum GstPhotographyColorToneMode</h3>
+<p>Modes for special color effects.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.5.4"></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-PHOTOGRAPHY-COLOR-TONE-MODE-NORMAL:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL</p></td>
+<td class="enum_member_description">
+<p>No effects</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SEPIA:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA</p></td>
+<td class="enum_member_description">
+<p>Sepia</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NEGATIVE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE</p></td>
+<td class="enum_member_description">
+<p>Negative</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRAYSCALE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE</p></td>
+<td class="enum_member_description">
+<p>Grayscale</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NATURAL:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL</p></td>
+<td class="enum_member_description">
+<p>Natural</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-VIVID:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID</p></td>
+<td class="enum_member_description">
+<p>Vivid</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-COLORSWAP:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP</p></td>
+<td class="enum_member_description">
+<p>Colorswap</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SOLARIZE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE</p></td>
+<td class="enum_member_description">
+<p>Solarize</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-OUT-OF-FOCUS:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS</p></td>
+<td class="enum_member_description">
+<p>Out of focus</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKY-BLUE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE</p></td>
+<td class="enum_member_description">
+<p>Sky blue</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRASS-GREEN:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN</p></td>
+<td class="enum_member_description">
+<p>Grass green</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKIN-WHITEN:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN</p></td>
+<td class="enum_member_description">
+<p>Skin whiten</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-POSTERIZE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_POSTERIZE</p></td>
+<td class="enum_member_description">
+<p>Posterize (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-WHITEBOARD:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_WHITEBOARD</p></td>
+<td class="enum_member_description">
+<p>Whiteboard (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-BLACKBOARD:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_BLACKBOARD</p></td>
+<td class="enum_member_description">
+<p>Blackboard (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-AQUA:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA</p></td>
+<td class="enum_member_description">
+<p>Aqua (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographySceneMode"></a><h3>enum GstPhotographySceneMode</h3>
+<p>Each mode contains preset <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> options in order to produce
+good capturing result in certain scene.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.6.4"></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-PHOTOGRAPHY-SCENE-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_MANUAL</p></td>
+<td class="enum_member_description">
+<p>Set individual options manually</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-CLOSEUP:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP</p></td>
+<td class="enum_member_description">
+<p>Mode for close objects</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT</p></td>
+<td class="enum_member_description">
+<p>Mode for portraits</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-LANDSCAPE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE</p></td>
+<td class="enum_member_description">
+<p>Mode for landscapes</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SPORT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SPORT</p></td>
+<td class="enum_member_description">
+<p>Mode for scene with fast motion</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_NIGHT</p></td>
+<td class="enum_member_description">
+<p>Mode for night conditions</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_AUTO</p></td>
+<td class="enum_member_description">
+<p>Choose scene mode automatically</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-ACTION:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_ACTION</p></td>
+<td class="enum_member_description">
+<p>Take photos of fast moving
+    objects (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT</p></td>
+<td class="enum_member_description">
+<p>Take people pictures
+    at night (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-THEATRE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_THEATRE</p></td>
+<td class="enum_member_description">
+<p>Take photos in a theater (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-BEACH:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_BEACH</p></td>
+<td class="enum_member_description">
+<p>Take pictures on the beach (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SNOW:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SNOW</p></td>
+<td class="enum_member_description">
+<p>Take pictures on the snow (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SUNSET:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SUNSET</p></td>
+<td class="enum_member_description">
+<p>Take sunset photos (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-STEADY-PHOTO:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO</p></td>
+<td class="enum_member_description">
+<p>Avoid blurry pictures
+    (for example, due to hand shake) (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-FIREWORKS:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS</p></td>
+<td class="enum_member_description">
+<p>For shooting firework
+    displays (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-PARTY:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_PARTY</p></td>
+<td class="enum_member_description">
+<p>Take indoor low-light shot (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-CANDLELIGHT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT</p></td>
+<td class="enum_member_description">
+<p>Capture the naturally warm color
+    of scenes lit by candles (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-BARCODE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_BARCODE</p></td>
+<td class="enum_member_description">
+<p>Applications are looking for
+    a barcode (Since 1.2)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyFlashMode"></a><h3>enum GstPhotographyFlashMode</h3>
+<p>Modes for flash control.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.7.4"></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-PHOTOGRAPHY-FLASH-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_AUTO</p></td>
+<td class="enum_member_description">
+<p>Fire flash automatically according to
+lighting conditions.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-OFF:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_OFF</p></td>
+<td class="enum_member_description">
+<p>Never fire flash</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-ON:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_ON</p></td>
+<td class="enum_member_description">
+<p>Always fire flash</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-FILL-IN:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN</p></td>
+<td class="enum_member_description">
+<p>Fill in flash</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-RED-EYE:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE</p></td>
+<td class="enum_member_description">
+<p>Flash mode for reducing chance of
+capturing red eyes</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyFlickerReductionMode"></a><h3>enum GstPhotographyFlickerReductionMode</h3>
+<p>Reduce flicker in video caused by light source fluctuation.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.8.4"></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-PHOTOGRAPHY-FLICKER-REDUCTION-OFF:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF</p></td>
+<td class="enum_member_description">
+<p>Disable flicker reduction</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-50HZ:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ</p></td>
+<td class="enum_member_description">
+<p>50Hz flicker reduction</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-60HZ:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ</p></td>
+<td class="enum_member_description">
+<p>60Hz flicker reduction</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO</p></td>
+<td class="enum_member_description">
+<p>Choose mode automatically</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyFocusMode"></a><h3>enum GstPhotographyFocusMode</h3>
+<p>Choose mode for focusing algorithm.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.9.4"></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-PHOTOGRAPHY-FOCUS-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_AUTO</p></td>
+<td class="enum_member_description">
+<p>Choose focus mode automatically</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-MACRO:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_MACRO</p></td>
+<td class="enum_member_description">
+<p>Mode for focusing objects close to lens</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT</p></td>
+<td class="enum_member_description">
+<p>Mode for portraits</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-INFINITY:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY</p></td>
+<td class="enum_member_description">
+<p>Mode for landscapes and far away objects</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-HYPERFOCAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL</p></td>
+<td class="enum_member_description">
+<p>Mode for maximum depth of field, keeping
+focus acceptable both in infinify and as close objects as possible</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-EXTENDED:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED</p></td>
+<td class="enum_member_description">
+<p>Extended focus mode</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-NORMAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL</p></td>
+<td class="enum_member_description">
+<p>Continuous autofocus mode</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-EXTENDED:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED</p></td>
+<td class="enum_member_description">
+<p>Extended continuous
+autofocus mode</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL</p></td>
+<td class="enum_member_description">
+<p>Disable automatic focusing
+and keep current value. <span class="type">“lens-focus”</span> property can
+be used to change focus manually.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyFocusStatus"></a><h3>enum GstPhotographyFocusStatus</h3>
+<p>Status of the focusing operation, used in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" title="GST_PHOTOGRAPHY_AUTOFOCUS_DONE"><span class="type">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</span></a>
+message.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.10.4"></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-PHOTOGRAPHY-FOCUS-STATUS-NONE:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_NONE</p></td>
+<td class="enum_member_description">
+<p>No status available</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-RUNNING:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING</p></td>
+<td class="enum_member_description">
+<p>Focusing is ongoing</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-FAIL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL</p></td>
+<td class="enum_member_description">
+<p>Focusing failed</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-SUCCESS:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS</p></td>
+<td class="enum_member_description">
+<p>Focusing succeeded</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyCaps"></a><h3>enum GstPhotographyCaps</h3>
+<p>Bitmask that indicates which <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotography" title="GstPhotography"><span class="type">GstPhotography</span></a> interface features an instance
+supports.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.11.4"></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-PHOTOGRAPHY-CAPS-NONE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_NONE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-EV-COMP:CAPS"></a>GST_PHOTOGRAPHY_CAPS_EV_COMP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ISO-SPEED:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ISO_SPEED</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-WB-MODE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_WB_MODE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-TONE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_TONE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-SCENE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_SCENE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FLASH:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FLASH</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ZOOM:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ZOOM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FOCUS:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FOCUS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-APERTURE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_APERTURE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-EXPOSURE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_EXPOSURE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-SHAKE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_SHAKE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-WHITE-BALANCE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_WHITE_BALANCE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-NOISE-REDUCTION:CAPS"></a>GST_PHOTOGRAPHY_CAPS_NOISE_REDUCTION</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FLICKER-REDUCTION:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FLICKER_REDUCTION</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ALL:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ALL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstPhotographyShakeRisk"></a><h3>enum GstPhotographyShakeRisk</h3>
+<p>Risk level of captured image becoming "shaken" due to camera movement and
+too long exposure time. Used in <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_SHAKE_RISK"><span class="type">GST_PHOTOGRAPHY_SHAKE_RISK</span></a> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMessage.html"><span class="type">GstMessage</span></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.10.2.8.12.4"></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-PHOTOGRAPHY-SHAKE-RISK-LOW:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_LOW</p></td>
+<td class="enum_member_description">
+<p>Low risk</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SHAKE-RISK-MEDIUM:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM</p></td>
+<td class="enum_member_description">
+<p>Medium risk</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SHAKE-RISK-HIGH:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_HIGH</p></td>
+<td class="enum_member_description">
+<p>High risk</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS"></a><h3>GST_PHOTOGRAPHY_AUTOFOCUS_DONE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_AUTOFOCUS_DONE "autofocus-done"
+</pre>
+<p>Name of custom GstMessage that will be posted to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a> when autofocusing
+is complete.
+This message contains following fields:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+  <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusStatus" title="enum GstPhotographyFocusStatus"><span class="type">GstPhotographyFocusStatus</span></a>
+  <code class="classname">"status"</code>:
+  Tells if focusing succeeded or failed.
+  </p></li>
+<li class="listitem"><p>
+  <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>
+  <code class="classname">"focus-window-rows"</code>:
+  Tells number of focus matrix rows.
+  </p></li>
+<li class="listitem"><p>
+  <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>
+  <code class="classname">"focus-window-columns"</code>:
+  Tells number of focus matrix columns.
+  </p></li>
+<li class="listitem"><p>
+  <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>
+  <code class="classname">"focus-window-mask"</code>:
+  Bitmask containing rows x columns bits which mark the focus points in the
+  focus matrix. Lowest bit (LSB) always represents the top-left corner of the
+  focus matrix. This field is only valid when focusing status is SUCCESS.
+  </p></li>
+</ul></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-SHAKE-RISK:CAPS"></a><h3>GST_PHOTOGRAPHY_SHAKE_RISK</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_SHAKE_RISK "shake-risk"
+</pre>
+<p>Name of custom GstMessage that is posted to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a> during autofocusing
+process. It is posted if there is change in the risk of captured image
+becoming "shaken" due to camera movement and too long exposure time.</p>
+<p>This message contains following fields:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
+  <a class="link" href="gst-plugins-bad-libs-GstPhotography.html#GstPhotographyShakeRisk" title="enum GstPhotographyShakeRisk"><span class="type">GstPhotographyShakeRisk</span></a>
+  <code class="classname">"status"</code>:
+  Tells risk level of capturing shaken image.
+  </p></li></ul></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_WB_MODE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_WB_MODE      "white-balance-mode"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_SCENE_MODE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_SCENE_MODE   "scene-mode"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_FLASH_MODE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_FLASH_MODE   "flash-mode"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION   "noise-reduction"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_FOCUS_STATUS</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_FOCUS_STATUS "focus-status"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_CAPABILITIES</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_CAPABILITIES "capabilities"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_SHAKE_RISK</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_SHAKE_RISK   "shake-risk"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_EV_COMP</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_EV_COMP      "ev-compensation"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_ISO_SPEED</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_ISO_SPEED    "iso-speed"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-APERTURE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_APERTURE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_APERTURE     "aperture"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS</h3>
+<pre class="programlisting">#define             GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS</h3>
+<pre class="programlisting">#define             GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_FLICKER_MODE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_FLICKER_MODE "flicker-mode"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_FOCUS_MODE</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_FOCUS_MODE   "focus-mode"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-PHOTOGRAPHY-PROP-ZOOM:CAPS"></a><h3>GST_PHOTOGRAPHY_PROP_ZOOM</h3>
+<pre class="programlisting">#define GST_PHOTOGRAPHY_PROP_ZOOM   "zoom"
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregator.html b/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregator.html
index 66bea5b..c8ed5f7 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregator.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregator.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstVideoAggregator</title>
+<title>GstVideoAggregator: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -62,6 +62,7 @@
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstVideoAggregator.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstVideoAggregator.other_details"></a><h2>Types and Values</h2>
@@ -102,16 +103,22 @@
 <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);
+  GstCaps *          (*update_caps)               (GstVideoAggregator *  videoaggregator,
+                                                   GstCaps            *  caps);
   GstFlowReturn      (*aggregate_frames)          (GstVideoAggregator *  videoaggregator,
                                                    GstBuffer          *  outbuffer);
   GstFlowReturn      (*get_output_buffer)         (GstVideoAggregator *  videoaggregator,
                                                    GstBuffer          ** outbuffer);
   gboolean           (*negotiated_caps)           (GstVideoAggregator *  videoaggregator,
                                                    GstCaps            *  caps);
+  void               (*find_best_format)          (GstVideoAggregator *  vagg,
+                                                   GstCaps            *  downstream_caps,
+                                                   GstVideoInfo       *  best_info,
+                                                   gboolean           *  at_least_one_alpha);
+
+  gboolean           preserve_update_caps_result;
+
+  GstCaps           *sink_non_alpha_caps;
 };
 </pre>
 <div class="refsect3">
@@ -124,17 +131,10 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/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_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.update-caps"></a>update_caps</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>
+Lets subclasses update the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> representing
+the src pad caps before usage.  Return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate failure.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
@@ -162,6 +162,24 @@
 Notifies subclasses what caps format has been negotiated</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.find-best-format"></a>find_best_format</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Lets subclasses decide of the best common format to use.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstVideoAggregatorClass.preserve-update-caps-result"></a>preserve_update_caps_result</code></em>;</p></td>
+<td class="struct_member_description"><p>Sub-classes should set this to true if the return result
+of the <code class="function">update_caps()</code> method should not be further modified
+by GstVideoAggregator by removing fields.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *<em class="structfield"><code><a name="GstVideoAggregatorClass.sink-non-alpha-caps"></a>sink_non_alpha_caps</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -169,7 +187,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregatorPad.html b/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregatorPad.html
index 1eb5718..fabcaec 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregatorPad.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstVideoAggregatorPad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstVideoAggregatorPad</title>
+<title>GstVideoAggregatorPad: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstVideoAggregator.html" title="GstVideoAggregator">
 <link rel="next" href="gl.html" title="OpenGL Helper Library">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -55,6 +55,7 @@
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstVideoAggregatorPad.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstVideoAggregatorPad.other_details"></a><h2>Types and Values</h2>
@@ -62,24 +63,108 @@
 <a name="GstVideoAggregatorPad"></a><h3>struct GstVideoAggregatorPad</h3>
 <pre class="programlisting">struct GstVideoAggregatorPad {
   GstAggregatorPad parent;
+
+  GstVideoInfo info;
+
+  GstBuffer *buffer;
+  /* The caps on the pad may not match the buffer above because of two reasons:
+   * 1) When caps change, the info above will get updated, but the buffer might
+   *    not since it might be pending on the GstAggregatorPad
+   * 2) We might reject the new buffer in fill_queues() and reuse a previous
+   *    buffer which has older GstVideoInfo
+   * Hence, we need to maintain a GstVideoInfo for mapping buffers separately */
+  GstVideoInfo buffer_vinfo;
+
+  GstVideoFrame *aggregated_frame;
+
+  /* properties */
+  guint zorder;
+  gboolean ignore_eos;
 };
 </pre>
-<p>The opaque <a class="link" href="gst-plugins-bad-libs-GstVideoAggregatorPad.html#GstVideoAggregatorPad" title="struct GstVideoAggregatorPad"><span class="type">GstVideoAggregatorPad</span></a> structure.</p>
+<div class="refsect3">
+<a name="id-1.2.8.3.6.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 class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad" title="struct GstAggregatorPad"><span class="type">GstAggregatorPad</span></a> <em class="structfield"><code><a name="GstVideoAggregatorPad.parent"></a>parent</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<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="GstVideoAggregatorPad.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> currently set on the pad</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoAggregatorPad.buffer"></a>buffer</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<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="GstVideoAggregatorPad.buffer-vinfo"></a>buffer_vinfo</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 type contained
+in <em class="parameter"><code>buffer</code></em>
+</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<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#GstVideoFrame"><span class="type">GstVideoFrame</span></a> *<em class="structfield"><code><a name="GstVideoAggregatorPad.aggregated-frame"></a>aggregated_frame</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#GstVideoFrame"><span class="type">GstVideoFrame</span></a> ready to be used for aggregation
+inside the aggregate_frames vmethod.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstVideoAggregatorPad.zorder"></a>zorder</code></em>;</p></td>
+<td class="struct_member_description"><p>The zorder of this pad</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstVideoAggregatorPad.ignore-eos"></a>ignore_eos</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GstVideoAggregatorPadClass"></a><h3>struct GstVideoAggregatorPadClass</h3>
 <pre class="programlisting">struct GstVideoAggregatorPadClass {
   GstAggregatorPadClass parent_class;
+  gboolean           (*set_info)              (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator,
+                                               GstVideoInfo          * current_info,
+                                               GstVideoInfo          * wanted_info);
 
-  gpointer          _gst_reserved[GST_PADDING];
+  gboolean           (*prepare_frame)         (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator);
+
+  void               (*clean_frame)           (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator);
+
+  gpointer          _gst_reserved[GST_PADDING_LARGE];
 };
 </pre>
+<p><em class="parameter"><code>set_info</code></em>
+: Lets subclass set a converter on the pad,
+                right after a new format has been negotiated.
+<em class="parameter"><code>prepare_frame</code></em>
+: Prepare the frame from the pad buffer (if any)
+                and sets it to <em class="parameter"><code>aggregated_frame</code></em>
+
+<em class="parameter"><code>clean_frame</code></em>
+:   clean the frame previously prepared in prepare_frame</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html b/docs/libs/html/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html
index 77b4e3c..2e0bfae 100644
--- a/docs/libs/html/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html
+++ b/docs/libs/html/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: ISDB variants of MPEG-TS descriptors</title>
+<title>ISDB variants of MPEG-TS descriptors: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">
 <link rel="next" href="tools.html" title="Useful elements">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -54,6 +54,7 @@
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.other_details"></a><h2>Types and Values</h2>
@@ -238,7 +239,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-Mpeg-ts-helper-library.html b/docs/libs/html/gst-plugins-bad-libs-Mpeg-ts-helper-library.html
index 05ccd7e..f96b8b9 100644
--- a/docs/libs/html/gst-plugins-bad-libs-Mpeg-ts-helper-library.html
+++ b/docs/libs/html/gst-plugins-bad-libs-Mpeg-ts-helper-library.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Mpeg-ts helper library</title>
+<title>Mpeg-ts helper library: GStreamer Bad Plugins 1.0 Library Reference Manual</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="mpegts.html" title="Mpeg TS helper library">
 <link rel="prev" href="mpegts.html" title="Mpeg TS helper library">
 <link rel="next" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html" title="Base MPEG-TS sections">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -71,7 +71,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-Utilities.html b/docs/libs/html/gst-plugins-bad-libs-Utilities.html
index c25fec2..43d42fb 100644
--- a/docs/libs/html/gst-plugins-bad-libs-Utilities.html
+++ b/docs/libs/html/gst-plugins-bad-libs-Utilities.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Utilities</title>
+<title>Utilities: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">
+<link rel="prev" href="GstGLUploadMeta.html" title="GstGLUploadMeta">
 <link rel="next" href="GstGLWindow.html" title="GstGLWindow">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -19,7 +19,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="gst-plugins-bad-libs-GstGLUploadMeta.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="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">
@@ -68,14 +68,6 @@
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-display" title="gst_gl_ensure_display ()">gst_gl_ensure_display</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-handle-set-context" title="gst_gl_handle_set_context ()">gst_gl_handle_set_context</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
@@ -124,14 +116,6 @@
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo" title="gst_gl_context_use_fbo ()">gst_gl_context_use_fbo</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo-v2" title="gst_gl_context_use_fbo_v2 ()">gst_gl_context_use_fbo_v2</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
@@ -191,6 +175,38 @@
 <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>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-caps-replace-all-caps-features" title="gst_gl_caps_replace_all_caps_features ()">gst_gl_caps_replace_all_caps_features</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-element-data" title="gst_gl_ensure_element_data ()">gst_gl_ensure_element_data</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gsize</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-get-plane-data-size" title="gst_gl_get_plane_data_size ()">gst_gl_get_plane_data_size</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-run-query" title="gst_gl_run_query ()">gst_gl_run_query</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -221,7 +237,7 @@
          <em class="parameter"><code><a href="https://developer.gnome.org/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.9.19.6.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.22.6.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -260,7 +276,7 @@
 <span class="c_punctuation">(</span>*GLCB_V2<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="https://developer.gnome.org/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.9.19.6.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.22.6.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -285,7 +301,7 @@
          <em class="parameter"><code><a href="https://developer.gnome.org/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.9.19.6.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.22.6.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -319,18 +335,12 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-ensure-display"></a><h3>gst_gl_ensure_display ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_ensure_display (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> element</code></em>,
-                       <em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> **display_ptr</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="gst-gl-handle-set-context"></a><h3>gst_gl_handle_set_context ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_handle_set_context (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
                            <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>
+                           <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><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> **other_context</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
@@ -338,7 +348,8 @@
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_handle_context_query (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
                              <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstQuery.html"><span class="type">GstQuery</span></a> *query</code></em>,
-                             <em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> **display</code></em>);</pre>
+                             <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><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> **other_context</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
@@ -377,27 +388,6 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-context-use-fbo"></a><h3>gst_gl_context_use_fbo ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_context_use_fbo (<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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> input_texture_width</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> input_texture_height</code></em>,
-                        <em class="parameter"><code><span class="type">GLuint</span> input_texture</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param1</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param2</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param3</code></em>,
-                        <em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/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-context-use-fbo-v2"></a><h3>gst_gl_context_use_fbo_v2 ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_context_use_fbo_v2 (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
@@ -464,13 +454,44 @@
                               <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>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-caps-replace-all-caps-features"></a><h3>gst_gl_caps_replace_all_caps_features ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="returnvalue">GstCaps</span></a> *
+gst_gl_caps_replace_all_caps_features (<em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>,
+                                       <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *feature_name</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-ensure-element-data"></a><h3>gst_gl_ensure_element_data ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_ensure_element_data (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> element</code></em>,
+                            <em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> **display_ptr</code></em>,
+                            <em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> **other_context_ptr</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-get-plane-data-size"></a><h3>gst_gl_get_plane_data_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">gsize</span>
+gst_gl_get_plane_data_size (<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/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *align</code></em>,
+                            <em class="parameter"><code><a href="https://developer.gnome.org/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-gl-run-query"></a><h3>gst_gl_run_query ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_run_query (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
+                  <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstQuery.html"><span class="type">GstQuery</span></a> *query</code></em>,
+                  <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadDirection"><span class="type">GstPadDirection</span></a> direction</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.9.19.7.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.22.7.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -495,7 +516,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html b/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
index 77130f8..da60855 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLMemory</title>
+<title>GstGLMemory: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">
+<link rel="prev" href="GstGLFramebuffer.html" title="GstGLFramebuffer">
 <link rel="next" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="gst-plugins-bad-libs-GstGLFramebuffer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="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-gstglshader.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -41,30 +41,6 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="define_keyword">#define</td>
-<td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAGS:CAPS" title="GST_GL_MEMORY_FLAGS()">GST_GL_MEMORY_FLAGS</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-gstglmemory.html#GST-GL-MEMORY-FLAG-IS-SET:CAPS" title="GST_GL_MEMORY_FLAG_IS_SET()">GST_GL_MEMORY_FLAG_IS_SET</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-gstglmemory.html#GST-GL-MEMORY-FLAG-SET:CAPS" title="GST_GL_MEMORY_FLAG_SET()">GST_GL_MEMORY_FLAG_SET</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-gstglmemory.html#GST-GL-MEMORY-FLAG-UNSET:CAPS" title="GST_GL_MEMORY_FLAG_UNSET()">GST_GL_MEMORY_FLAG_UNSET</a><span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
 <td class="function_type">
 <span class="returnvalue">void</span>
 </td>
@@ -157,17 +133,9 @@
 </tr>
 <tr>
 <td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS" title="GST_MAP_GL">GST_MAP_GL</a></td>
-</tr>
-<tr>
-<td class="define_keyword">#define</td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-ALLOCATOR:CAPS" title="GST_GL_MEMORY_ALLOCATOR">GST_GL_MEMORY_ALLOCATOR</a></td>
 </tr>
 <tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemoryFlags" title="enum GstGLMemoryFlags">GstGLMemoryFlags</a></td>
-</tr>
-<tr>
 <td class="datatype_keyword"> </td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory">GstGLMemory</a></td>
 </tr>
@@ -180,12 +148,13 @@
     <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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/GstAllocator.html">GstAllocator</a>
-                <span class="lineart">╰──</span> GstGLAllocator
+                <span class="lineart">╰──</span> GstGLBaseBufferAllocator
+                    <span class="lineart">╰──</span> GstGLAllocator
 </pre>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-gstglmemory.description"></a><h2>Description</h2>
-<p>GstGLMemory is a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> subclass providing support for the mapping of
+<p>GstGLMemory is a <span class="type">GstGLBaseBuffer</span> subclass providing support for the mapping of
 GL textures.  </p>
 <p><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a> is created through <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-alloc" title="gst_gl_memory_alloc ()"><code class="function">gst_gl_memory_alloc()</code></a> or system memory can
 be wrapped through <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-wrapped" title="gst_gl_memory_wrapped ()"><code class="function">gst_gl_memory_wrapped()</code></a>.</p>
@@ -194,122 +163,6 @@
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-gstglmemory.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
-<a name="GST-GL-MEMORY-FLAGS:CAPS"></a><h3>GST_GL_MEMORY_FLAGS()</h3>
-<pre class="programlisting">#define GST_GL_MEMORY_FLAGS(mem) GST_MEMORY_FLAGS(mem)
-</pre>
-<p>Get the currently set flags on <em class="parameter"><code>mem</code></em>
-</p>
-<div class="refsect3">
-<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">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>mem</p></td>
-<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GST-GL-MEMORY-FLAG-IS-SET:CAPS"></a><h3>GST_GL_MEMORY_FLAG_IS_SET()</h3>
-<pre class="programlisting">#define GST_GL_MEMORY_FLAG_IS_SET(mem,flag) GST_MEMORY_FLAG_IS_SET(mem,flag)
-</pre>
-<p>Whether <em class="parameter"><code>flag</code></em>
- is set on <em class="parameter"><code>mem</code></em>
-</p>
-<div class="refsect3">
-<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">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>mem</p></td>
-<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>flag</p></td>
-<td class="parameter_description"><p>a flag</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GST-GL-MEMORY-FLAG-SET:CAPS"></a><h3>GST_GL_MEMORY_FLAG_SET()</h3>
-<pre class="programlisting">#define GST_GL_MEMORY_FLAG_SET(mem,flag) GST_MINI_OBJECT_FLAG_SET(mem,flag)
-</pre>
-<p>Set <em class="parameter"><code>flag</code></em>
- on <em class="parameter"><code>mem</code></em>
-</p>
-<div class="refsect3">
-<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">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>mem</p></td>
-<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>flag</p></td>
-<td class="parameter_description"><p>a flag</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GST-GL-MEMORY-FLAG-UNSET:CAPS"></a><h3>GST_GL_MEMORY_FLAG_UNSET()</h3>
-<pre class="programlisting">#define GST_GL_MEMORY_FLAG_UNSET(mem,flag) GST_MEMORY_FLAG_UNSET(mem,flag)
-</pre>
-<p>Unset <em class="parameter"><code>flag</code></em>
- on <em class="parameter"><code>mem</code></em>
-</p>
-<div class="refsect3">
-<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">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>mem</p></td>
-<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>flag</p></td>
-<td class="parameter_description"><p>a flag</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
 <a name="gst-gl-memory-init"></a><h3>gst_gl_memory_init ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_gl_memory_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
@@ -321,12 +174,13 @@
 <a name="gst-gl-memory-alloc"></a><h3>gst_gl_memory_alloc ()</h3>
 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="returnvalue">GstMemory</span></a> *
 gst_gl_memory_alloc (<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><span class="type">GstVideoGLTextureType</span> tex_type</code></em>,
-                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
-                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
-                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> stride</code></em>);</pre>
+                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> plane</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#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *valign</code></em>);</pre>
+<p>Allocated a new <span class="type">GstGlMemory</span>.</p>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.7.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.17.8.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -340,19 +194,34 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>v_info</p></td>
+<td class="parameter_name"><p>params</p></td>
+<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>info</p></td>
 <td class="parameter_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> of the memory</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>plane</p></td>
+<td class="parameter_description"><p>the plane this memory will represent</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>valign</p></td>
+<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> applied to <em class="parameter"><code>info</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
-<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>
+<a name="id-1.2.9.17.8.3.6"></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>vinfo</code></em>
 from <em class="parameter"><code>context</code></em>
 </p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -360,15 +229,18 @@
 <a name="gst-gl-memory-wrapped"></a><h3>gst_gl_memory_wrapped ()</h3>
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="returnvalue">GstGLMemory</span></a> *
 gst_gl_memory_wrapped (<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><span class="type">GstVideoGLTextureType</span> tex_type</code></em>,
-                       <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
-                       <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
-                       <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> stride</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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> plane</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#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *valign</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
+<p>Wrapped <em class="parameter"><code>data</code></em>
+ into a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a>. This version will account for padding
+added to the allocation and expressed through <em class="parameter"><code>valign</code></em>
+.</p>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.8.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.17.8.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -382,11 +254,22 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>v_info</p></td>
+<td class="parameter_name"><p>info</p></td>
 <td class="parameter_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> of the memory and data</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
+<td class="parameter_name"><p>plane</p></td>
+<td class="parameter_description"><p>the plane this memory will represent</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>valign</p></td>
+<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> applied to <em class="parameter"><code>info</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
 <td class="parameter_name"><p>data</p></td>
 <td class="parameter_description"><p>the data to wrap</p></td>
 <td class="parameter_annotations"> </td>
@@ -408,12 +291,11 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.8.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.17.8.4.6"></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>
 </p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -422,11 +304,64 @@
 <pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="returnvalue">GstGLMemory</span></a> *
 gst_gl_memory_wrapped_texture (<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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> texture_id</code></em>,
-                               <em class="parameter"><code><span class="type">GstVideoGLTextureType</span> tex_type</code></em>,
-                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
-                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
+                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> texture_target</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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> plane</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#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *valign</code></em>,
                                <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
+<p>Wraps a texture handle into 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.9.17.8.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>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>texture_id</p></td>
+<td class="parameter_description"><p>the GL texture handle</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>texture_target</p></td>
+<td class="parameter_description"><p>the GL texture target</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>info</p></td>
+<td class="parameter_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> of the memory</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>plane</p></td>
+<td class="parameter_description"><p>The plane this memory will represent</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</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>notify</p></td>
+<td class="parameter_description"><p>Destroy callback for the user data</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.17.8.5.6"></a><h4>Returns</h4>
+<p> a newly allocated <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
+</div>
 </div>
 <hr>
 <div class="refsect2">
@@ -459,7 +394,7 @@
 using glCopyTexImage.  See the OpenGL specification for details on the
 mappings between texture formats.</p>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.10.7"></a><h4>Parameters</h4>
+<a name="id-1.2.9.17.8.6.7"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -508,9 +443,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.10.8"></a><h4>Returns</h4>
+<a name="id-1.2.9.17.8.6.8"></a><h4>Returns</h4>
 <p> Whether the copy suceeded</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -518,14 +452,79 @@
 <a name="gst-gl-memory-setup-buffer"></a><h3>gst_gl_memory_setup_buffer ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_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/gstreamer/html/GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</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/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *valign</code></em>,
                             <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
 <p>Adds the required <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a>s with the correct configuration to
 <em class="parameter"><code>buffer</code></em>
  based on <em class="parameter"><code>info</code></em>
+. This version handles padding through <em class="parameter"><code>valign</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.17.8.7.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>
+<tr>
+<td class="parameter_name"><p>params</p></td>
+<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>info</p></td>
+<td class="parameter_description"><p>a <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>valign</p></td>
+<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> applied to <em class="parameter"><code>info</code></em>
+</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/GstBuffer.html"><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.17.8.7.6"></a><h4>Returns</h4>
+<p> whether the memory's were sucessfully added.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-memory-setup-wrapped"></a><h3>gst_gl_memory_setup_wrapped ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_memory_setup_wrapped (<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/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> *valign</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data[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> *textures[GST_VIDEO_MAX_PLANES]</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
+                             <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
+<p>Wraps per plane data pointer in <em class="parameter"><code>data</code></em>
+ into the corresponding entry in
+<em class="parameter"><code>textures</code></em>
+ based on <em class="parameter"><code>info</code></em>
+ and padding from <em class="parameter"><code>valign</code></em>
+. Note that the <em class="parameter"><code>notify</code></em>
+
+will be called as many time as there is planes.</p>
+<div class="refsect3">
+<a name="id-1.2.9.17.8.8.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -544,48 +543,7 @@
 <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/GstBuffer.html"><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.15.8.11.6"></a><h4>Returns</h4>
-<p> whether the memory's were sucessfully added.</p>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-gl-memory-setup-wrapped"></a><h3>gst_gl_memory_setup_wrapped ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_memory_setup_wrapped (<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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data[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> *textures[GST_VIDEO_MAX_PLANES]</code></em>);</pre>
-<p>Wraps per plane data pointer in <em class="parameter"><code>data</code></em>
- into the corresponding entry in
-<em class="parameter"><code>textures</code></em>
- based on <em class="parameter"><code>info</code></em>
-.</p>
-<div class="refsect3">
-<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">
-<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>info</p></td>
+<td class="parameter_name"><p>valign</p></td>
 <td class="parameter_description"><p>a <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>
@@ -599,13 +557,22 @@
 <td class="parameter_description"><p> a list of <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a>. </p></td>
 <td class="parameter_annotations"><span class="annotation">[transfer out]</span></td>
 </tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data for the destroy function</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>notify</p></td>
+<td class="parameter_description"><p>A function called each time a memory is freed</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.12.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.17.8.8.6"></a><h4>Returns</h4>
 <p> whether the memory's were sucessfully created.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -622,7 +589,7 @@
 <pre class="programlisting"><a href="https://developer.gnome.org/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.9.15.8.14.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.17.8.10.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -637,10 +604,9 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.9.15.8.14.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.17.8.10.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>
 </div>
 </div>
 </div>
@@ -655,83 +621,36 @@
 <div class="refsect2">
 <a name="GstGLAllocatorClass"></a><h3>GstGLAllocatorClass</h3>
 <pre class="programlisting">typedef struct {
-  GstAllocatorClass parent_class;
+  GstGLBaseBufferAllocatorClass parent_class;
 } GstGLAllocatorClass;
 </pre>
 <p>The <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLAllocatorClass" title="GstGLAllocatorClass"><span class="type">GstGLAllocatorClass</span></a> only contains private data</p>
 </div>
 <hr>
 <div class="refsect2">
-<a name="GST-MAP-GL:CAPS"></a><h3>GST_MAP_GL</h3>
-<pre class="programlisting">#define GST_MAP_GL GST_MAP_FLAG_LAST &lt;&lt; 1
-</pre>
-<p>Flag indicating that we should map the GL object instead of to system memory.</p>
-<p>Combining <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS" title="GST_MAP_GL"><span class="type">GST_MAP_GL</span></a> with <span class="type">GST_MAP_WRITE</span> has the same semantics as though
-you are writing to OpenGL. Conversely, combining <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS" title="GST_MAP_GL"><span class="type">GST_MAP_GL</span></a> with
-<span class="type">GST_MAP_READ</span> has the same semantics as though you are reading from OpenGL.</p>
-</div>
-<hr>
-<div class="refsect2">
 <a name="GST-GL-MEMORY-ALLOCATOR:CAPS"></a><h3>GST_GL_MEMORY_ALLOCATOR</h3>
 <pre class="programlisting">#define GST_GL_MEMORY_ALLOCATOR   "GLMemory"
 </pre>
-<p>The name of the GL memore allocator</p>
-</div>
-<hr>
-<div class="refsect2">
-<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.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">
-<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-MEMORY-FLAG-DOWNLOAD-INITTED:CAPS"></a>GST_GL_MEMORY_FLAG_DOWNLOAD_INITTED</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-GL-MEMORY-FLAG-UPLOAD-INITTED:CAPS"></a>GST_GL_MEMORY_FLAG_UPLOAD_INITTED</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-GL-MEMORY-FLAG-NEED-DOWNLOAD:CAPS"></a>GST_GL_MEMORY_FLAG_NEED_DOWNLOAD</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-GL-MEMORY-FLAG-NEED-UPLOAD:CAPS"></a>GST_GL_MEMORY_FLAG_NEED_UPLOAD</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
+<p>The name of the GL memory allocator</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GstGLMemory"></a><h3>GstGLMemory</h3>
 <pre class="programlisting">typedef struct {
-  GstMemory                    mem;
+  GstGLBaseBuffer       mem;
 
-  GstGLContext         *context;
   guint                 tex_id;
+  guint                 tex_target;
   GstVideoGLTextureType tex_type;
-  gint                  width;
-  gint                  height;
-  gint                  stride;
+  GstVideoInfo          info;
+  GstVideoAlignment     valign;
+  guint                 plane;
   gfloat                tex_scaling[2];
 } GstGLMemory;
 </pre>
 <p>Represents information about a GL texture</p>
 <div class="refsect3">
-<a name="id-1.2.9.15.9.7.5"></a><h4>Members</h4>
+<a name="id-1.2.9.17.9.5.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -740,44 +659,46 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> <em class="structfield"><code><a name="GstGLMemory.mem"></a>mem</code></em>;</p></td>
+<td class="struct_member_name"><p><span class="type">GstGLBaseBuffer</span> <em class="structfield"><code><a name="GstGLMemory.mem"></a>mem</code></em>;</p></td>
 <td class="struct_member_description"><p>the parent object</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *<em class="structfield"><code><a name="GstGLMemory.context"></a>context</code></em>;</p></td>
-<td class="struct_member_description"><p>the <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> to use for GL operations</p></td>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLMemory.tex-id"></a>tex_id</code></em>;</p></td>
+<td class="struct_member_description"><p>the GL texture id for this memory</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLMemory.tex-id"></a>tex_id</code></em>;</p></td>
-<td class="struct_member_description"><p>the texture id for this memory</p></td>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLMemory.tex-target"></a>tex_target</code></em>;</p></td>
+<td class="struct_member_description"><p>the GL texture target for this memory</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
 <td class="struct_member_name"><p><span class="type">GstVideoGLTextureType</span> <em class="structfield"><code><a name="GstGLMemory.tex-type"></a>tex_type</code></em>;</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstGLMemory.width"></a>width</code></em>;</p></td>
-<td class="struct_member_description"><p>width of the texture</p></td>
+<td class="struct_member_description"><p>the texture type</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstGLMemory.height"></a>height</code></em>;</p></td>
-<td class="struct_member_description"><p>height of the texture</p></td>
+<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="GstGLMemory.info"></a>info</code></em>;</p></td>
+<td class="struct_member_description"><p>the texture's <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="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstGLMemory.stride"></a>stride</code></em>;</p></td>
-<td> </td>
-<td> </td>
+<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#GstVideoAlignment"><span class="type">GstVideoAlignment</span></a> <em class="structfield"><code><a name="GstGLMemory.valign"></a>valign</code></em>;</p></td>
+<td class="struct_member_description"><p>data alignment for system memory mapping</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLMemory.plane"></a>plane</code></em>;</p></td>
+<td class="struct_member_description"><p>data plane in <em class="parameter"><code>info</code></em>
+</p></td>
+<td class="struct_member_annotations"> </td>
 </tr>
 <tr>
 <td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> <em class="structfield"><code><a name="GstGLMemory.tex-scaling"></a>tex_scaling</code></em>[2];</p></td>
-<td> </td>
-<td> </td>
+<td class="struct_member_description"><p>GL shader scaling parameters for <em class="parameter"><code>valign</code></em>
+and/or width/height</p></td>
+<td class="struct_member_annotations"> </td>
 </tr>
 </tbody>
 </table></div>
@@ -790,7 +711,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstglshader.html b/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
index 96c2b59..04283ef 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLShader</title>
+<title>GstGLShader: GStreamer Bad Plugins 1.0 Library Reference Manual</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="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">
-<link rel="next" href="GstGLUpload.html" title="GstGLUpload">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-libs-GstGLSyncMeta.html" title="GstGLSyncMeta">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="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-gstglmemory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="GstGLUpload.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLSyncMeta.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-gstglshader"></a><div class="titlepage"></div>
@@ -109,6 +109,14 @@
 </tr>
 <tr>
 <td class="function_type">
+<span class="returnvalue">int</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-program-handle" title="gst_gl_shader_get_program_handle ()">gst_gl_shader_get_program_handle</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
@@ -541,6 +549,12 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-shader-get-program-handle"></a><h3>gst_gl_shader_get_program_handle ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span>
+gst_gl_shader_get_program_handle (<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>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-gl-shader-set-active"></a><h3>gst_gl_shader_set_active ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_gl_shader_set_active (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>,
@@ -886,7 +900,7 @@
 <div class="refsect2">
 <a name="GstGLShaderError"></a><h3>enum GstGLShaderError</h3>
 <div class="refsect3">
-<a name="id-1.2.9.16.10.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.18.10.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -917,7 +931,7 @@
 <div class="refsect2">
 <a name="GstGLShaderSourceType"></a><h3>enum GstGLShaderSourceType</h3>
 <div class="refsect3">
-<a name="id-1.2.9.16.10.3.3"></a><h4>Members</h4>
+<a name="id-1.2.9.18.10.3.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -986,7 +1000,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstmpegvideometa.html b/docs/libs/html/gst-plugins-bad-libs-gstmpegvideometa.html
index 3ada32e..876331d 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstmpegvideometa.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstmpegvideometa.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: gstmpegvideometa</title>
+<title>gstmpegvideometa: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
 <link rel="prev" href="gst-plugins-bad-libs-vc1parser.html" title="vc1parser">
 <link rel="next" href="mpegts.html" title="Mpeg TS helper library">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -120,7 +120,7 @@
 .</p>
 <p>Provided structures must either be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or GSlice-allocated.</p>
 <div class="refsect3">
-<a name="id-1.2.4.7.7.4.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.8.7.4.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -135,11 +135,11 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.7.7.4.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.8.7.4.7"></a><h4>Returns</h4>
 <p> a newly created <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html#GstMpegVideoMeta" title="struct GstMpegVideoMeta"><span class="type">GstMpegVideoMeta</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>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -178,7 +178,7 @@
 <p>The various fields are only valid during the lifetime of the <a class="link" href="gst-plugins-bad-libs-gstmpegvideometa.html#GstMpegVideoMeta" title="struct GstMpegVideoMeta"><span class="type">GstMpegVideoMeta</span></a>.
 If elements wish to use those for longer, they are required to make a copy.</p>
 <div class="refsect3">
-<a name="id-1.2.4.7.8.2.7"></a><h4>Members</h4>
+<a name="id-1.2.4.8.8.2.7"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -235,12 +235,11 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-h264parser.html b/docs/libs/html/gst-plugins-bad-libs-h264parser.html
index 7c46da6..2ce391f 100644
--- a/docs/libs/html/gst-plugins-bad-libs-h264parser.html
+++ b/docs/libs/html/gst-plugins-bad-libs-h264parser.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: h264parser</title>
+<title>h264parser: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
 <link rel="prev" href="codecparsers.html" title="Bitstream parsing Library">
-<link rel="next" href="gst-plugins-bad-libs-mpegvideoparser.html" title="mpegvideoparser">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,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="codecparsers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="codecparsers.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-libs-mpegvideoparser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-jpegparser.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-h264parser"></a><div class="titlepage"></div>
@@ -440,7 +440,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.7.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -503,7 +502,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.8.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -541,7 +539,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.9.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -596,7 +593,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.10.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -645,7 +641,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.11.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -692,7 +687,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.12.7"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -735,7 +729,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.13.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -748,7 +741,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.14.5"></a><h4>Returns</h4>
 <p> a new <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264NalParser" title="struct GstH264NalParser"><span class="type">GstH264NalParser</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -814,7 +806,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.16.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -861,7 +852,6 @@
 <div class="refsect3">
 <a name="id-1.2.4.3.7.17.7"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264ParserResult" title="enum GstH264ParserResult"><span class="type">GstH264ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -886,7 +876,7 @@
 </tr></tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -925,7 +915,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -964,7 +954,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -1003,7 +993,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -1042,7 +1032,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.4</p>
+<p class="since">Since: 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -1238,7 +1228,14 @@
 <tr>
 <td class="enum_member_name"><p><a name="GST-H264-NAL-SUBSET-SPS:CAPS"></a>GST_H264_NAL_SUBSET_SPS</p></td>
 <td class="enum_member_description">
-<p>Subset sequence parameter set (SPS) NAL unit</p>
+<p>Subset sequence parameter set (SSPS) NAL unit</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-H264-NAL-DEPTH-SPS:CAPS"></a>GST_H264_NAL_DEPTH_SPS</p></td>
+<td class="enum_member_description">
+<p>Depth parameter set (DPS) NAL unit</p>
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
@@ -1256,6 +1253,13 @@
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-H264-NAL-SLICE-DEPTH:CAPS"></a>GST_H264_NAL_SLICE_DEPTH</p></td>
+<td class="enum_member_description">
+<p>Coded slice extension for depth or 3D-AVC texture view</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -1297,7 +1301,7 @@
 <tr>
 <td class="enum_member_name"><p><a name="GST-H264-PARSER-ERROR:CAPS"></a>GST_H264_PARSER_ERROR</p></td>
 <td class="enum_member_description">
-<p>An error accured when parsing</p>
+<p>An error occured when parsing</p>
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
@@ -1349,7 +1353,22 @@
 <tr>
 <td class="enum_member_name"><p><a name="GST-H264-SEI-RECOVERY-POINT:CAPS"></a>GST_H264_SEI_RECOVERY_POINT</p></td>
 <td class="enum_member_description">
-<p>Recovery Point SEI Message (D.2.7)
+<p>Recovery Point SEI Message (D.2.7)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-H264-SEI-STEREO-VIDEO-INFO:CAPS"></a>GST_H264_SEI_STEREO_VIDEO_INFO</p></td>
+<td class="enum_member_description">
+<p>stereo video info SEI message (Since: 1.6)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-H264-SEI-FRAME-PACKING:CAPS"></a>GST_H264_SEI_FRAME_PACKING</p></td>
+<td class="enum_member_description">
+<p>Frame Packing Arrangement (FPA) message that
+    contains the 3D arrangement for stereoscopic 3D video (Since: 1.6)
 ...</p>
 </td>
 <td class="enum_member_annotations"> </td>
@@ -1530,6 +1549,12 @@
   gboolean valid;
 
   guint8 *data;
+
+  guint8 header_bytes;
+  guint8 extension_type;
+  union {
+    GstH264NalUnitExtensionMVC mvc;
+  } extension;
 };
 </pre>
 <p>Structure defining the Nal unit headers</p>
@@ -1592,6 +1617,16 @@
 <td class="struct_member_description"><p>The data from which the Nalu has been parsed</p></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="GstH264NalUnit.header-bytes"></a>header_bytes</code></em>;</p></td>
+<td class="struct_member_description"><p>The size of the NALU header in bytes (Since 1.6)</p></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="GstH264NalUnit.extension-type"></a>extension_type</code></em>;</p></td>
+<td class="struct_member_description"><p>the extension type (Since 1.6)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -1607,6 +1642,8 @@
   guint8 constraint_set1_flag;
   guint8 constraint_set2_flag;
   guint8 constraint_set3_flag;
+  guint8 constraint_set4_flag;
+  guint8 constraint_set5_flag;
   guint8 level_idc;
 
   guint8 chroma_format_idc;
@@ -1662,6 +1699,12 @@
   gint crop_rect_x, crop_rect_y;
   gint fps_num, fps_den;
   gboolean valid;
+
+  /* Subset SPS extensions */
+  guint8 extension_type;
+  union {
+    GstH264SPSExtMVC mvc;
+  } extension;
 };
 </pre>
 <p>H264 Sequence Parameter Set (SPS)</p>
@@ -1705,6 +1748,16 @@
 <td> </td>
 </tr>
 <tr>
+<td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstH264SPS.constraint-set4-flag"></a>constraint_set4_flag</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstH264SPS.constraint-set5-flag"></a>constraint_set5_flag</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
 <td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstH264SPS.level-idc"></a>level_idc</code></em>;</p></td>
 <td> </td>
 <td> </td>
@@ -1914,6 +1967,11 @@
 <td> </td>
 <td> </td>
 </tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstH264SPS.extension-type"></a>extension_type</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -2501,12 +2559,12 @@
   GstH264SPS *sps;
 
   /* seq-&gt;vui_parameters-&gt;nal_hrd_parameters_present_flag */
-  guint8 nal_initial_cpb_removal_delay[32];
-  guint8 nal_initial_cpb_removal_delay_offset[32];
+  guint32 nal_initial_cpb_removal_delay[32];
+  guint32 nal_initial_cpb_removal_delay_offset[32];
 
   /* seq-&gt;vui_parameters-&gt;vcl_hrd_parameters_present_flag */
-  guint8 vcl_initial_cpb_removal_delay[32];
-  guint8 vcl_initial_cpb_removal_delay_offset[32];
+  guint32 vcl_initial_cpb_removal_delay[32];
+  guint32 vcl_initial_cpb_removal_delay_offset[32];
 };
 </pre>
 </div>
@@ -2520,6 +2578,8 @@
     GstH264BufferingPeriod buffering_period;
     GstH264PicTiming pic_timing;
     GstH264RecoveryPoint recovery_point;
+    GstH264StereoVideoInfo stereo_video_info;
+    GstH264FramePacking frame_packing;
     /* ... could implement more */
   } payload;
 };
@@ -2528,7 +2588,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-jpegparser.html b/docs/libs/html/gst-plugins-bad-libs-jpegparser.html
new file mode 100644
index 0000000..a1b3728
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-jpegparser.html
@@ -0,0 +1,978 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>jpegparser: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
+<link rel="prev" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">
+<link rel="next" href="gst-plugins-bad-libs-mpegvideoparser.html" title="mpegvideoparser">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-jpegparser.description" class="shortcut">Description</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="codecparsers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-h264parser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-mpegvideoparser.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-jpegparser"></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-jpegparser.top_of_page"></a>jpegparser</span></h2>
+<p>jpegparser — Convenience library for JPEG bitstream parsing.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-parse" title="gst_jpeg_parse ()">gst_jpeg_parse</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-frame-header" title="gst_jpeg_segment_parse_frame_header ()">gst_jpeg_segment_parse_frame_header</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-scan-header" title="gst_jpeg_segment_parse_scan_header ()">gst_jpeg_segment_parse_scan_header</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-huffman-table" title="gst_jpeg_segment_parse_huffman_table ()">gst_jpeg_segment_parse_huffman_table</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-quantization-table" title="gst_jpeg_segment_parse_quantization_table ()">gst_jpeg_segment_parse_quantization_table</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-restart-interval" title="gst_jpeg_segment_parse_restart_interval ()">gst_jpeg_segment_parse_restart_interval</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-jpegparser.html#gst-jpeg-get-default-quantization-tables" title="gst_jpeg_get_default_quantization_tables ()">gst_jpeg_get_default_quantization_tables</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-jpegparser.html#gst-jpeg-get-default-huffman-tables" title="gst_jpeg_get_default_huffman_tables ()">gst_jpeg_get_default_huffman_tables</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.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-jpegparser.html#GST-JPEG-MAX-FRAME-COMPONENTS:CAPS" title="GST_JPEG_MAX_FRAME_COMPONENTS">GST_JPEG_MAX_FRAME_COMPONENTS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-SCAN-COMPONENTS:CAPS" title="GST_JPEG_MAX_SCAN_COMPONENTS">GST_JPEG_MAX_SCAN_COMPONENTS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-QUANT-ELEMENTS:CAPS" title="GST_JPEG_MAX_QUANT_ELEMENTS">GST_JPEG_MAX_QUANT_ELEMENTS</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MIN:CAPS" title="GST_JPEG_MARKER_SOF_MIN">GST_JPEG_MARKER_SOF_MIN</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MAX:CAPS" title="GST_JPEG_MARKER_SOF_MAX">GST_JPEG_MARKER_SOF_MAX</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MIN:CAPS" title="GST_JPEG_MARKER_APP_MIN">GST_JPEG_MARKER_APP_MIN</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MAX:CAPS" title="GST_JPEG_MARKER_APP_MAX">GST_JPEG_MARKER_APP_MAX</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MIN:CAPS" title="GST_JPEG_MARKER_RST_MIN">GST_JPEG_MARKER_RST_MIN</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MAX:CAPS" title="GST_JPEG_MARKER_RST_MAX">GST_JPEG_MARKER_RST_MAX</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegEntropyCodingMode" title="enum GstJpegEntropyCodingMode">GstJpegEntropyCodingMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegProfile" title="enum GstJpegProfile">GstJpegProfile</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment">GstJpegSegment</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr" title="struct GstJpegFrameHdr">GstJpegFrameHdr</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameComponent" title="struct GstJpegFrameComponent">GstJpegFrameComponent</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr" title="struct GstJpegScanHdr">GstJpegScanHdr</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanComponent" title="struct GstJpegScanComponent">GstJpegScanComponent</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" title="struct GstJpegHuffmanTables">GstJpegHuffmanTables</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable" title="struct GstJpegHuffmanTable">GstJpegHuffmanTable</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable" title="struct GstJpegQuantTable">GstJpegQuantTable</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.includes"></a><h2>Includes</h2>
+<pre class="synopsis">#include &lt;gst/codecparsers/gstjpegparser.h&gt;
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.description"></a><h2>Description</h2>
+<div class="refsect2">
+<a name="id-1.2.4.4.6.2"></a><p>
+Provides useful functions for parsing JPEG images
+</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-jpeg-parse"></a><h3>gst_jpeg_parse ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_parse (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *seg</code></em>,
+                <em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
+                <em class="parameter"><code><span class="type">gsize</span> size</code></em>,
+                <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> offset</code></em>);</pre>
+<p>Parses the JPEG bitstream contained in <em class="parameter"><code>data</code></em>
+, and returns the
+detected segment as a <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a>.</p>
+<p>Note that a valid segment may be returned with a length that exceeds
+the available data. It is up to the caller to make sure there's enough
+data available when parsing the segment.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.2.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>segment</p></td>
+<td class="parameter_description"><p> pointer to a <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> structure to fill in. </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>
+<td class="parameter_description"><p>The data to parse</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>size</p></td>
+<td class="parameter_description"><p>The size of <em class="parameter"><code>data</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>offset</p></td>
+<td class="parameter_description"><p>The offset from which to start parsing</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.2.7"></a><h4>Returns</h4>
+<p> TRUE if a packet start code was found.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-segment-parse-frame-header"></a><h3>gst_jpeg_segment_parse_frame_header ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_segment_parse_frame_header (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *segment</code></em>,
+                                     <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr" title="struct GstJpegFrameHdr"><span class="type">GstJpegFrameHdr</span></a> *frame_hdr</code></em>);</pre>
+<p>Parses the <em class="parameter"><code>frame_hdr</code></em>
+ JPEG frame header structure members from <em class="parameter"><code>segment</code></em>
+.</p>
+<p>The caller must make sure there is enough data for the whole segment
+available.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.3.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>segment</p></td>
+<td class="parameter_description"><p>the JPEG segment</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>frame_hdr</p></td>
+<td class="parameter_description"><p> The <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr" title="struct GstJpegFrameHdr"><span class="type">GstJpegFrameHdr</span></a> structure to fill in. </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.4.4.7.3.7"></a><h4>Returns</h4>
+<p> TRUE if the frame header was correctly parsed.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-segment-parse-scan-header"></a><h3>gst_jpeg_segment_parse_scan_header ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_segment_parse_scan_header (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *segment</code></em>,
+                                    <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr" title="struct GstJpegScanHdr"><span class="type">GstJpegScanHdr</span></a> *scan_hdr</code></em>);</pre>
+<p>Parses the <em class="parameter"><code>scan_hdr</code></em>
+ JPEG scan header structure members from <em class="parameter"><code>segment</code></em>
+.</p>
+<p>The caller must make sure there is enough data for the whole segment
+available.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.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>segment</p></td>
+<td class="parameter_description"><p>the JPEG segment</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>scan_hdr</p></td>
+<td class="parameter_description"><p> The <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr" title="struct GstJpegScanHdr"><span class="type">GstJpegScanHdr</span></a> structure to fill in. </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.4.4.7.4.7"></a><h4>Returns</h4>
+<p> TRUE if the scan header was correctly parsed</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-segment-parse-huffman-table"></a><h3>gst_jpeg_segment_parse_huffman_table ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_segment_parse_huffman_table (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *segment</code></em>,
+                                      <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" title="struct GstJpegHuffmanTables"><span class="type">GstJpegHuffmanTables</span></a> *huff_tables</code></em>);</pre>
+<p>Parses the JPEG Huffman table structure members from <em class="parameter"><code>segment</code></em>
+.</p>
+<p>The caller must make sure there is enough data for the whole segment
+available.</p>
+<p>Note: <em class="parameter"><code>huf_tables</code></em>
+ represents the complete set of possible Huffman
+tables. However, the parser will only write to the Huffman table
+specified by the table destination identifier (Th). While doing so,
+the <em class="parameter"><code>valid</code></em>
+ flag of the specified Huffman table will also be set to
+<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>;</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.5.7"></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>segment</p></td>
+<td class="parameter_description"><p>the JPEG segment</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>huff_tables</p></td>
+<td class="parameter_description"><p> The <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" title="struct GstJpegHuffmanTables"><span class="type">GstJpegHuffmanTables</span></a> structure to fill in. </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.4.4.7.5.8"></a><h4>Returns</h4>
+<p> TRUE if the Huffman table was correctly parsed.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-segment-parse-quantization-table"></a><h3>gst_jpeg_segment_parse_quantization_table ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_segment_parse_quantization_table
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *segment</code></em>,
+                                <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable"><span class="type">GstJpegQuantTables</span></a> *quant_tables</code></em>);</pre>
+<p>Parses the JPEG quantization table structure members from <em class="parameter"><code>segment</code></em>
+.</p>
+<p>The caller must make sure there is enough data for the whole segment
+available.</p>
+<p>Note: <em class="parameter"><code>quant_tables</code></em>
+ represents the complete set of possible
+quantization tables. However, the parser will only write to the
+quantization table specified by the table destination identifier
+(Tq). While doing so, the <em class="parameter"><code>valid</code></em>
+ flag of the specified quantization
+table will also be set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.6.7"></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>segment</p></td>
+<td class="parameter_description"><p>the JPEG segment</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>quant_tables</p></td>
+<td class="parameter_description"><p> The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable"><span class="type">GstJpegQuantTables</span></a> structure to fill in. </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.4.4.7.6.8"></a><h4>Returns</h4>
+<p> TRUE if the quantization table was correctly parsed.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-segment-parse-restart-interval"></a><h3>gst_jpeg_segment_parse_restart_interval ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_jpeg_segment_parse_restart_interval
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegSegment" title="struct GstJpegSegment"><span class="type">GstJpegSegment</span></a> *segment</code></em>,
+                                <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *interval</code></em>);</pre>
+<p>The caller must make sure there is enough data for the whole segment
+available.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.7.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>segment</p></td>
+<td class="parameter_description"><p>the JPEG segment</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>interval</p></td>
+<td class="parameter_description"><p> The parsed restart interval value. </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.4.4.7.7.6"></a><h4>Returns</h4>
+<p> TRUE if the restart interval value was correctly parsed.</p>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-get-default-quantization-tables"></a><h3>gst_jpeg_get_default_quantization_tables ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_jpeg_get_default_quantization_tables
+                               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable"><span class="type">GstJpegQuantTables</span></a> *quant_tables</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-jpeg-get-default-huffman-tables"></a><h3>gst_jpeg_get_default_huffman_tables ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_jpeg_get_default_huffman_tables (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables" title="struct GstJpegHuffmanTables"><span class="type">GstJpegHuffmanTables</span></a> *huff_tables</code></em>);</pre>
+<p>Fills in <em class="parameter"><code>huf_tables</code></em>
+ with the default AC/DC Huffman tables, as
+specified by the JPEG standard.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.7.9.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>huf_tables</p></td>
+<td class="parameter_description"><p> The default DC/AC Huffman tables to fill in. </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>
+<p class="since">Since: 1.6</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-jpegparser.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GST-JPEG-MAX-FRAME-COMPONENTS:CAPS"></a><h3>GST_JPEG_MAX_FRAME_COMPONENTS</h3>
+<pre class="programlisting">#define GST_JPEG_MAX_FRAME_COMPONENTS   256
+</pre>
+<p>Maximum number of image components in a frame (Nf).</p>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MAX-SCAN-COMPONENTS:CAPS"></a><h3>GST_JPEG_MAX_SCAN_COMPONENTS</h3>
+<pre class="programlisting">#define GST_JPEG_MAX_SCAN_COMPONENTS    4
+</pre>
+<p>Maximum number of image components in a scan (Ns).</p>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MAX-QUANT-ELEMENTS:CAPS"></a><h3>GST_JPEG_MAX_QUANT_ELEMENTS</h3>
+<pre class="programlisting">#define GST_JPEG_MAX_QUANT_ELEMENTS     64
+</pre>
+<p>Number of elements in the quantization table.</p>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-SOF-MIN:CAPS"></a><h3>GST_JPEG_MARKER_SOF_MIN</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_SOF_MIN GST_JPEG_MARKER_SOF0
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-SOF-MAX:CAPS"></a><h3>GST_JPEG_MARKER_SOF_MAX</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_SOF_MAX GST_JPEG_MARKER_SOF15
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-APP-MIN:CAPS"></a><h3>GST_JPEG_MARKER_APP_MIN</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_APP_MIN GST_JPEG_MARKER_APP0
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-APP-MAX:CAPS"></a><h3>GST_JPEG_MARKER_APP_MAX</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_APP_MAX GST_JPEG_MARKER_APP15
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-RST-MIN:CAPS"></a><h3>GST_JPEG_MARKER_RST_MIN</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_RST_MIN GST_JPEG_MARKER_RST0
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-JPEG-MARKER-RST-MAX:CAPS"></a><h3>GST_JPEG_MARKER_RST_MAX</h3>
+<pre class="programlisting">#define GST_JPEG_MARKER_RST_MAX GST_JPEG_MARKER_RST7
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegEntropyCodingMode"></a><h3>enum GstJpegEntropyCodingMode</h3>
+<p>JPEG entropy coding mode.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.11.4"></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-JPEG-ENTROPY-CODING-HUFFMAN:CAPS"></a>GST_JPEG_ENTROPY_CODING_HUFFMAN</p></td>
+<td class="enum_member_description">
+<p>Huffman coding</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-JPEG-ENTROPY-CODING-ARITHMETIC:CAPS"></a>GST_JPEG_ENTROPY_CODING_ARITHMETIC</p></td>
+<td class="enum_member_description">
+<p>arithmetic coding</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegProfile"></a><h3>enum GstJpegProfile</h3>
+<p>JPEG encoding processes.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.12.4"></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-JPEG-PROFILE-BASELINE:CAPS"></a>GST_JPEG_PROFILE_BASELINE</p></td>
+<td class="enum_member_description">
+<p>Baseline DCT</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-JPEG-PROFILE-EXTENDED:CAPS"></a>GST_JPEG_PROFILE_EXTENDED</p></td>
+<td class="enum_member_description">
+<p>Extended sequential DCT</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-JPEG-PROFILE-PROGRESSIVE:CAPS"></a>GST_JPEG_PROFILE_PROGRESSIVE</p></td>
+<td class="enum_member_description">
+<p>Progressive DCT</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-JPEG-PROFILE-LOSSLESS:CAPS"></a>GST_JPEG_PROFILE_LOSSLESS</p></td>
+<td class="enum_member_description">
+<p>Lossless (sequential)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegSegment"></a><h3>struct GstJpegSegment</h3>
+<pre class="programlisting">struct GstJpegSegment {
+  GstJpegMarker marker;
+  const guint8 *data;
+  guint offset;
+  gssize size;
+};
+</pre>
+<p>A structure that contains the type of a segment, its offset and its size.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.13.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><span class="type">GstJpegMarker</span> <em class="structfield"><code><a name="GstJpegSegment.marker"></a>marker</code></em>;</p></td>
+<td class="struct_member_description"><p>The type of the segment that starts at <em class="parameter"><code>offset</code></em>
+</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p>const <span class="type">guint8</span> *<em class="structfield"><code><a name="GstJpegSegment.data"></a>data</code></em>;</p></td>
+<td class="struct_member_description"><p>the data containing the jpeg segment starting at <em class="parameter"><code>offset</code></em>
+</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstJpegSegment.offset"></a>offset</code></em>;</p></td>
+<td class="struct_member_description"><p>The offset to the segment start in bytes. This is the
+exact start of the segment, no marker code included</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">gssize</span> <em class="structfield"><code><a name="GstJpegSegment.size"></a>size</code></em>;</p></td>
+<td class="struct_member_description"><p>The size of the segment in bytes, or -1 if the end was not
+found. It is the exact size of the segment, without the sync byte and
+marker code but including any length bytes.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegFrameHdr"></a><h3>struct GstJpegFrameHdr</h3>
+<pre class="programlisting">struct GstJpegFrameHdr {
+  guint8 sample_precision;              /* 2 .. 16      */
+  guint16 width;                        /* 1 .. 65535   */
+  guint16 height;                       /* 0 .. 65535   */
+  guint8 num_components;                /* 1 .. 255     */
+  GstJpegFrameComponent components[GST_JPEG_MAX_FRAME_COMPONENTS];
+};
+</pre>
+<p>Frame header.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.14.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegFrameHdr.sample-precision"></a>sample_precision</code></em>;</p></td>
+<td class="struct_member_description"><p>Sample precision (P)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint16</span> <em class="structfield"><code><a name="GstJpegFrameHdr.width"></a>width</code></em>;</p></td>
+<td class="struct_member_description"><p>Number of samples per line (X)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint16</span> <em class="structfield"><code><a name="GstJpegFrameHdr.height"></a>height</code></em>;</p></td>
+<td class="struct_member_description"><p>Number of lines (Y)</p></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="GstJpegFrameHdr.num-components"></a>num_components</code></em>;</p></td>
+<td class="struct_member_description"><p>Number of image components in frame (Nf)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegFrameComponent" title="struct GstJpegFrameComponent"><span class="type">GstJpegFrameComponent</span></a> <em class="structfield"><code><a name="GstJpegFrameHdr.components"></a>components</code></em>[GST_JPEG_MAX_FRAME_COMPONENTS];</p></td>
+<td class="struct_member_description"><p>Image components</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegFrameComponent"></a><h3>struct GstJpegFrameComponent</h3>
+<pre class="programlisting">struct GstJpegFrameComponent {
+  guint8 identifier;                    /* 0 .. 255     */
+  guint8 horizontal_factor;             /* 1 .. 4       */
+  guint8 vertical_factor;               /* 1 .. 4       */
+  guint8 quant_table_selector;          /* 0 .. 3       */
+};
+</pre>
+<p>Component-specification parameters.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.15.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegFrameComponent.identifier"></a>identifier</code></em>;</p></td>
+<td class="struct_member_description"><p>Component identifier (Ci)</p></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="GstJpegFrameComponent.horizontal-factor"></a>horizontal_factor</code></em>;</p></td>
+<td class="struct_member_description"><p>Horizontal sampling factor (Hi)</p></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="GstJpegFrameComponent.vertical-factor"></a>vertical_factor</code></em>;</p></td>
+<td class="struct_member_description"><p>Vertical sampling factor (Vi)</p></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="GstJpegFrameComponent.quant-table-selector"></a>quant_table_selector</code></em>;</p></td>
+<td class="struct_member_description"><p>Quantization table destination selector (Tqi)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegScanHdr"></a><h3>struct GstJpegScanHdr</h3>
+<pre class="programlisting">struct GstJpegScanHdr {
+  guint8 num_components;                /* 1 .. 4       */
+  GstJpegScanComponent components[GST_JPEG_MAX_SCAN_COMPONENTS];
+};
+</pre>
+<p>Scan header.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.16.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegScanHdr.num-components"></a>num_components</code></em>;</p></td>
+<td class="struct_member_description"><p>Number of image components in scan (Ns)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegScanComponent" title="struct GstJpegScanComponent"><span class="type">GstJpegScanComponent</span></a> <em class="structfield"><code><a name="GstJpegScanHdr.components"></a>components</code></em>[GST_JPEG_MAX_SCAN_COMPONENTS];</p></td>
+<td class="struct_member_description"><p>Image components</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegScanComponent"></a><h3>struct GstJpegScanComponent</h3>
+<pre class="programlisting">struct GstJpegScanComponent {
+    guint8 component_selector;          /* 0 .. 255     */
+    guint8 dc_selector;                 /* 0 .. 3       */
+    guint8 ac_selector;                 /* 0 .. 3       */
+};
+</pre>
+<p>Component-specification parameters.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.17.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegScanComponent.component-selector"></a>component_selector</code></em>;</p></td>
+<td class="struct_member_description"><p>Scan component selector (Csj)</p></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="GstJpegScanComponent.dc-selector"></a>dc_selector</code></em>;</p></td>
+<td class="struct_member_description"><p>DC entropy coding table destination selector (Tdj)</p></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="GstJpegScanComponent.ac-selector"></a>ac_selector</code></em>;</p></td>
+<td class="struct_member_description"><p>AC entropy coding table destination selector (Taj)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegHuffmanTables"></a><h3>struct GstJpegHuffmanTables</h3>
+<pre class="programlisting">struct GstJpegHuffmanTables {
+  GstJpegHuffmanTable dc_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
+  GstJpegHuffmanTable ac_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
+};
+</pre>
+<p>Helper data structure that holds all AC/DC Huffman tables used to
+decode an image.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.18.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 class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable" title="struct GstJpegHuffmanTable"><span class="type">GstJpegHuffmanTable</span></a> <em class="structfield"><code><a name="GstJpegHuffmanTables.dc-tables"></a>dc_tables</code></em>[GST_JPEG_MAX_SCAN_COMPONENTS];</p></td>
+<td class="struct_member_description"><p>DC Huffman tables</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable" title="struct GstJpegHuffmanTable"><span class="type">GstJpegHuffmanTable</span></a> <em class="structfield"><code><a name="GstJpegHuffmanTables.ac-tables"></a>ac_tables</code></em>[GST_JPEG_MAX_SCAN_COMPONENTS];</p></td>
+<td class="struct_member_description"><p>AC Huffman tables</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegHuffmanTable"></a><h3>struct GstJpegHuffmanTable</h3>
+<pre class="programlisting">struct GstJpegHuffmanTable {
+  guint8 huf_bits[16];
+  guint8 huf_values[256];
+  gboolean valid;
+};
+</pre>
+<p>Huffman table.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.19.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegHuffmanTable.huf-bits"></a>huf_bits</code></em>[16];</p></td>
+<td class="struct_member_description"><p>Number of Huffman codes of length i + 1 (Li)</p></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="GstJpegHuffmanTable.huf-values"></a>huf_values</code></em>[256];</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstJpegHuffmanTable.valid"></a>valid</code></em>;</p></td>
+<td class="struct_member_description"><p>If the Huffman table is valid, which means it has already
+been parsed</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstJpegQuantTable"></a><h3>struct GstJpegQuantTable</h3>
+<pre class="programlisting">struct GstJpegQuantTable {
+  guint8 quant_precision;
+  guint16 quant_table[GST_JPEG_MAX_QUANT_ELEMENTS];
+  gboolean valid;
+};
+</pre>
+<p>Quantization table.</p>
+<div class="refsect3">
+<a name="id-1.2.4.4.8.20.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><span class="type">guint8</span> <em class="structfield"><code><a name="GstJpegQuantTable.quant-precision"></a>quant_precision</code></em>;</p></td>
+<td class="struct_member_description"><p>Quantization table element precision (Pq)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint16</span> <em class="structfield"><code><a name="GstJpegQuantTable.quant-table"></a>quant_table</code></em>[GST_JPEG_MAX_QUANT_ELEMENTS];</p></td>
+<td class="struct_member_description"><p>Quantization table elements (Qk)</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstJpegQuantTable.valid"></a>valid</code></em>;</p></td>
+<td class="struct_member_description"><p>If the quantization table is valid, which means it has
+already been parsed</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since: 1.6</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-mpeg4parser.html b/docs/libs/html/gst-plugins-bad-libs-mpeg4parser.html
index 8eea864..3210b1c 100644
--- a/docs/libs/html/gst-plugins-bad-libs-mpeg4parser.html
+++ b/docs/libs/html/gst-plugins-bad-libs-mpeg4parser.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: mpeg4parser</title>
+<title>mpeg4parser: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
 <link rel="prev" href="gst-plugins-bad-libs-mpegvideoparser.html" title="mpegvideoparser">
 <link rel="next" href="gst-plugins-bad-libs-vc1parser.html" title="vc1parser">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -216,7 +216,7 @@
  with the information of the next packet
 found.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -260,9 +260,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.2.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.2.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -279,7 +278,7 @@
 
 structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -317,9 +316,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.3.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.3.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -334,7 +332,7 @@
 the <em class="parameter"><code>gov</code></em>
  structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -362,9 +360,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.4.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.4.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -380,7 +377,7 @@
 the <em class="parameter"><code>vol</code></em>
  structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -413,9 +410,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.5.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -431,7 +427,7 @@
 the <em class="parameter"><code>vo</code></em>
  structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.6.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.6.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -465,9 +461,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.6.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.6.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -483,7 +478,7 @@
 the <em class="parameter"><code>vos</code></em>
  structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.7.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.7.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -512,9 +507,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.7.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.6.7.7.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult" title="enum GstMpeg4ParseResult"><span class="type">GstMpeg4ParseResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -532,7 +526,7 @@
 and fills the <em class="parameter"><code>videopackethdr</code></em>
  structure</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.7.8.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.6.7.8.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -585,7 +579,7 @@
 <p>Defines the different startcodes present in the bitstream as
 defined in: Table 6-3 — Start code values</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.2.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.2.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -723,7 +717,7 @@
 <p>Defines the different visual object types as
 defined in: Table 6-5 -- Meaning of visual object type</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.3.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.3.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -766,7 +760,7 @@
 <p>Defines the different pixel aspect ratios as
 defined in: Table 6-12 -- Meaning of pixel aspect ratio</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.4.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.4.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -825,7 +819,7 @@
 <a name="GstMpeg4ParseResult"></a><h3>enum GstMpeg4ParseResult</h3>
 <p>Result type of any parsing function.</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.5.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.5.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -876,7 +870,7 @@
 <p>The vop coding types as defined in:
 Table 6-20 -- Meaning of vop_coding_type</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.6.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.6.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -922,7 +916,7 @@
 <p>The chroma format in use as
 defined in: Table 6-13 -- Meaning of chroma_format</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.7.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.7.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -943,7 +937,7 @@
 <p>The different video object layer shapes as defined in:
 Table 6-16 — Video Object Layer shape type</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.8.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.8.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -982,7 +976,7 @@
 or global motion compensation (GMC) as defined in:
 Table V2 - 2 -- Meaning of sprite_enable codewords</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.9.4"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.9.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1017,7 +1011,7 @@
 <p>It is computed using:
 Table G.1 — FLC table for profile_and_level_indication</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.10.5"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.10.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1137,7 +1131,7 @@
 <p>It is computed using:
 Table G.1 — FLC table for profile_and_level_indication</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.11.5"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.11.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1467,7 +1461,7 @@
 </pre>
 <p>A structure that contains the type of a packet, its offset and its size</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.20.5"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.20.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1520,7 +1514,7 @@
 <p>The video packet header structure as defined in:
 6.2.5.2 Video Plane with Short Header</p>
 <div class="refsect3">
-<a name="id-1.2.4.5.8.21.5"></a><h4>Members</h4>
+<a name="id-1.2.4.6.8.21.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1555,7 +1549,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-mpegvideoparser.html b/docs/libs/html/gst-plugins-bad-libs-mpegvideoparser.html
index 068a2ef..d8a41b5 100644
--- a/docs/libs/html/gst-plugins-bad-libs-mpegvideoparser.html
+++ b/docs/libs/html/gst-plugins-bad-libs-mpegvideoparser.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: mpegvideoparser</title>
+<title>mpegvideoparser: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
-<link rel="prev" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">
+<link rel="prev" href="gst-plugins-bad-libs-jpegparser.html" title="jpegparser">
 <link rel="next" href="gst-plugins-bad-libs-mpeg4parser.html" title="mpeg4parser">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -19,7 +19,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="codecparsers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-libs-h264parser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-jpegparser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-libs-mpeg4parser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -198,7 +198,7 @@
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-mpegvideoparser.description"></a><h2>Description</h2>
 <div class="refsect2">
-<a name="id-1.2.4.4.6.2"></a><p>
+<a name="id-1.2.4.5.6.2"></a><p>
 Provides useful functions for mpeg videos bitstream parsing.
 </p>
 </div>
@@ -218,7 +218,7 @@
 . This function will scan
 the data to find the next packet if needed.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -252,9 +252,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.2.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.2.6"></a><h4>Returns</h4>
 <p> TRUE if a packet start code was found, otherwise FALSE.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -273,7 +272,7 @@
  Mpeg Video Sequence Header structure members from <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.3.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.3.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -307,9 +306,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.3.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.3.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the seqhdr could be parsed correctly, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -328,7 +326,7 @@
  Mpeg Video Picture Header structure members from <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.4.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.4.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -361,10 +359,9 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.4.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.4.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the picture sequence could be parsed correctly, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
 otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -384,7 +381,7 @@
  Mpeg Video Picture Extension structure members from <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.5.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.5.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -417,10 +414,9 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.5.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.5.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the picture extension could be parsed correctly,
 <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -439,7 +435,7 @@
  Mpeg Video Group of Picture structure members from <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.6.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.6.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -472,9 +468,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.6.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.6.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the gop could be parsed correctly, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -494,7 +489,7 @@
  Mpeg Video Sequence Extension structure members from <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.7.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.7.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -528,9 +523,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.7.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.7.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the seqext could be parsed correctly, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -562,7 +556,7 @@
 <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.9.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.9.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -595,10 +589,9 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.9.7"></a><h4>Returns</h4>
+<a name="id-1.2.4.5.7.9.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the quant matrix extension could be parsed correctly,
 <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize.</p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -626,7 +619,7 @@
 <em class="parameter"><code>out_quant</code></em>
  arguments.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.11.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.11.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -647,7 +640,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 <hr>
 <div class="refsect2">
@@ -665,7 +658,7 @@
 <em class="parameter"><code>out_quant</code></em>
  arguments.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.7.12.6"></a><h4>Parameters</h4>
+<a name="id-1.2.4.5.7.12.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -686,7 +679,7 @@
 </tbody>
 </table></div>
 </div>
-<p class="since">Since 1.2</p>
+<p class="since">Since: 1.2</p>
 </div>
 </div>
 <div class="refsect1">
@@ -695,7 +688,7 @@
 <a name="GstMpegVideoPacketTypeCode"></a><h3>enum GstMpegVideoPacketTypeCode</h3>
 <p>Indicates the type of MPEG packet</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.2.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.2.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -777,7 +770,7 @@
 exclusive though - ie, sequence packs are accumulated separately. GOP &amp;
 Picture may occur together or separately.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.3.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.3.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -829,7 +822,7 @@
 <a name="GstMpegVideoLevel"></a><h3>enum GstMpegVideoLevel</h3>
 <p>Mpeg-2 Levels.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.4.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.4.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -874,7 +867,7 @@
 <a name="GstMpegVideoProfile"></a><h3>enum GstMpegVideoProfile</h3>
 <p>Mpeg-2 Profiles.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.5.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.5.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -933,7 +926,7 @@
 <a name="GstMpegVideoPictureType"></a><h3>enum GstMpegVideoPictureType</h3>
 <p>Picture type.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.6.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.6.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -978,7 +971,7 @@
 <a name="GstMpegVideoPictureStructure"></a><h3>enum GstMpegVideoPictureStructure</h3>
 <p>Picture structure type.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.7.4"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.7.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1034,7 +1027,7 @@
 </pre>
 <p>The Mpeg2 Video Sequence Header structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.8.5"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.8.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1138,7 +1131,7 @@
 </pre>
 <p>The Mpeg2 Video Sequence Extension structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.9.5"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.9.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1220,7 +1213,7 @@
 </pre>
 <p>The Mpeg2 Video Picture Header structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.10.5"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.10.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1273,7 +1266,7 @@
 </pre>
 <p>The Mpeg Video Group of Picture structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.11.5"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.11.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1347,7 +1340,7 @@
 </pre>
 <p>The Mpeg2 Video Picture Extension structure.</p>
 <div class="refsect3">
-<a name="id-1.2.4.4.8.12.5"></a><h4>Members</h4>
+<a name="id-1.2.4.5.8.12.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1470,7 +1463,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-vc1parser.html b/docs/libs/html/gst-plugins-bad-libs-vc1parser.html
index 5aa796e..03b04bd 100644
--- a/docs/libs/html/gst-plugins-bad-libs-vc1parser.html
+++ b/docs/libs/html/gst-plugins-bad-libs-vc1parser.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: vc1parser</title>
+<title>vc1parser: GStreamer Bad Plugins 1.0 Library Reference Manual</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="codecparsers.html" title="Bitstream parsing Library">
 <link rel="prev" href="gst-plugins-bad-libs-mpeg4parser.html" title="mpeg4parser">
 <link rel="next" href="gst-plugins-bad-libs-gstmpegvideometa.html" title="gstmpegvideometa">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -272,7 +272,7 @@
  and fills <em class="parameter"><code>bdu</code></em>
  fields</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -300,9 +300,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.2.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.2.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -316,7 +315,7 @@
 , and fills <em class="parameter"><code>seqhdr</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -344,9 +343,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.3.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.3.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -360,7 +358,7 @@
 , and fills <em class="parameter"><code>seqlayer</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -388,9 +386,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.4.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.4.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -405,7 +402,7 @@
 , and fills <em class="parameter"><code>structa</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -433,9 +430,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.5.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -450,7 +446,7 @@
 , and fills <em class="parameter"><code>structb</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.6.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.6.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -478,9 +474,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.6.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.6.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -495,7 +490,7 @@
 , and fills <em class="parameter"><code>structc</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.7.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.7.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -523,9 +518,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.7.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.7.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -540,7 +534,7 @@
 , and sets <em class="parameter"><code>entrypoint</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.8.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.8.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -573,9 +567,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.8.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.8.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1EntryPointHdr" title="struct GstVC1EntryPointHdr"><span class="type">GstVC1EntryPointHdr</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -591,7 +584,7 @@
 , and fills <em class="parameter"><code>entrypoint</code></em>
  fields.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.9.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.9.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -629,9 +622,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.9.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.9.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult" title="enum GstVC1ParserResult"><span class="type">GstVC1ParserResult</span></a></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -642,9 +634,8 @@
 <p>Creates a new <span class="type">GstVC1BitPlanes</span>. It should be freed with
 <a class="link" href="gst-plugins-bad-libs-vc1parser.html#gst-vc1-bitplanes-free" title="gst_vc1_bitplanes_free ()"><code class="function">gst_vc1_bitplanes_free()</code></a> after use.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.10.5"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.10.5"></a><h4>Returns</h4>
 <p> a new <span class="type">GstVC1BitPlanes</span></p>
-<p></p>
 </div>
 </div>
 <hr>
@@ -672,7 +663,7 @@
 in simple or main mode, or after <a class="link" href="gst-plugins-bad-libs-vc1parser.html#gst-vc1-parse-entry-point-header" title="gst_vc1_parse_entry_point_header ()"><span class="type">gst_vc1_parse_entry_point_header</span></a>
 if in advanced mode.</p>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.13.5"></a><h4>Parameters</h4>
+<a name="id-1.2.4.7.7.13.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -695,9 +686,8 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.4.6.7.13.6"></a><h4>Returns</h4>
+<a name="id-1.2.4.7.7.13.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if everything went fine, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwize</p>
-<p></p>
 </div>
 </div>
 </div>
@@ -718,7 +708,7 @@
 <div class="refsect2">
 <a name="GstVC1StartCode"></a><h3>enum GstVC1StartCode</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.4.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.4.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -789,7 +779,7 @@
 <div class="refsect2">
 <a name="GstVC1Profile"></a><h3>enum GstVC1Profile</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.5.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.5.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -825,7 +815,7 @@
 <div class="refsect2">
 <a name="GstVC1ParserResult"></a><h3>enum GstVC1ParserResult</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.6.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.6.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -866,7 +856,7 @@
 <div class="refsect2">
 <a name="GstVC1PictureType"></a><h3>enum GstVC1PictureType</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.7.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.7.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -907,7 +897,7 @@
 <div class="refsect2">
 <a name="GstVC1Level"></a><h3>enum GstVC1Level</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.8.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.8.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -968,7 +958,7 @@
 <div class="refsect2">
 <a name="GstVC1QuantizerSpec"></a><h3>enum GstVC1QuantizerSpec</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.9.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.9.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1004,7 +994,7 @@
 <div class="refsect2">
 <a name="GstVC1DQProfile"></a><h3>enum GstVC1DQProfile</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.10.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.10.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1040,7 +1030,7 @@
 <div class="refsect2">
 <a name="GstVC1Condover"></a><h3>enum GstVC1Condover</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.11.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.11.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1071,7 +1061,7 @@
 <div class="refsect2">
 <a name="GstVC1MvMode"></a><h3>enum GstVC1MvMode</h3>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.12.3"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.12.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -1410,7 +1400,7 @@
 };
 </pre>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.22.4"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.22.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1703,7 +1693,7 @@
 };
 </pre>
 <div class="refsect3">
-<a name="id-1.2.4.6.8.23.4"></a><h4>Members</h4>
+<a name="id-1.2.4.7.8.23.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -1853,7 +1843,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gstreamer-libs-hierarchy.html b/docs/libs/html/gstreamer-libs-hierarchy.html
index f584e9a..2de97d4 100644
--- a/docs/libs/html/gstreamer-libs-hierarchy.html
+++ b/docs/libs/html/gstreamer-libs-hierarchy.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Part II. Object Hierarchy</title>
+<title>Part II. Object Hierarchy: GStreamer Bad Plugins 1.0 Library Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
-<link rel="prev" href="gst-plugins-bad-libs-GstGLWindowX11.html" title="GstGLWindowX11">
+<link rel="prev" href="gst-plugins-bad-libs-GstPhotography.html" title="GstPhotography">
 <link rel="next" href="api-index-full.html" title="Index">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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><img src="up-insensitive.png" width="16" height="16" border="0"></td>
-<td><a accesskey="p" href="gst-plugins-bad-libs-GstGLWindowX11.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstPhotography.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="part">
@@ -24,24 +24,28 @@
 <a name="gstreamer-libs-hierarchy"></a>Part II. Object Hierarchy</h1></div></div></div>
 <pre class="screen">
     <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
-    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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/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/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> <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</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>
-            <span class="lineart">├──</span> <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
-            <span class="lineart">├──</span> <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
-            <span class="lineart">├──</span> <a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader">GstGLShader</a>
-            <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBufferPool.html">GstBufferPool</a>
-            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool">GstGLBufferPool</a>
-            <span class="lineart">╰──</span> <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+    <span class="lineart">├──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+    <span class="lineart">│</span>   <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+    <span class="lineart">│</span>       <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>   <span class="lineart">╰──</span> GstGLBaseBufferAllocator
+    <span class="lineart">│</span>       <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>       <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>   <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>   <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>   <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="GstGLBaseFilter.html" title="GstGLBaseFilter">GstGLBaseFilter</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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBufferPool.html">GstBufferPool</a>
+    <span class="lineart">│</span>       <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool">GstGLBufferPool</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLDownload.html" title="GstGLDownload">GstGLDownload</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader">GstGLShader</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+    <span class="lineart">│</span>       <span class="lineart">├──</span> <a class="link" href="GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+    <span class="lineart">│</span>       <span class="lineart">╰──</span> <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
+    <span class="lineart">╰──</span> <a class="link" href="GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
     <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a>
     <span class="lineart">├──</span> <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsSection">GstMpegtsSection</a>
     <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor">GstMpegtsDescriptor</a>
@@ -61,7 +65,6 @@
 </pre>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/gstreamer-plugins-bad.html b/docs/libs/html/gstreamer-plugins-bad.html
index 677fb0c..46795fa 100644
--- a/docs/libs/html/gstreamer-plugins-bad.html
+++ b/docs/libs/html/gstreamer-plugins-bad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Part I. GStreamer Bad Plugins Libraries</title>
+<title>Part I. GStreamer Bad Plugins Libraries: GStreamer Bad Plugins 1.0 Library Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="prev" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="next" href="compiling.html" title="Compiling">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -37,6 +37,9 @@
 bitstream parsing.</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-jpegparser.html">jpegparser</a></span><span class="refpurpose"> — Convenience library for JPEG bitstream parsing.</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-mpegvideoparser.html">mpegvideoparser</a></span><span class="refpurpose"> — Convenience library for mpeg1 and 2 video
 bitstream parsing.</span>
 </dt>
@@ -81,7 +84,7 @@
 </dl></dd>
 <dt><span class="chapter"><a href="tools.html">Useful elements</a></span></dt>
 <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>
+<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>
@@ -108,7 +111,7 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLAPI.html">GstGLAPI</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose">buffer pool for <span class="type">GstGLMemory</span> objects</span>
+<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose"> — buffer pool for <span class="type">GstGLMemory</span> objects</span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="GstGLColorConvert.html">GstGLColorConvert</a></span><span class="refpurpose"> — an object that converts between color spaces/formats</span>
@@ -123,6 +126,9 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEGL.html">GstGLContextEGL</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEagl.html">GstGLContextEagl</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextGLX.html">GstGLContextGLX</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
@@ -138,10 +144,13 @@
 <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="GstGLBaseFilter.html">GstGLBaseFilter</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>
+<span class="refentrytitle"><a href="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>
@@ -150,10 +159,13 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglshader.html">GstGLShader</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLSyncMeta.html">GstGLSyncMeta</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <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>
+<span class="refentrytitle"><a href="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>
@@ -180,6 +192,10 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLWindowX11.html">GstGLWindowX11</a></span><span class="refpurpose"></span>
 </dt>
 </dl></dd>
+<dt><span class="chapter"><a href="ch07.html">Interfaces</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstPhotography.html">GstPhotography</a></span><span class="refpurpose"> — Interface for digital image capture elements</span>
+</dt></dl></dd>
 </dl>
 </div>
 <p>
@@ -188,7 +204,6 @@
     </p>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/index.html b/docs/libs/html/index.html
index 935c0ba..c3cbc26 100644
--- a/docs/libs/html/index.html
+++ b/docs/libs/html/index.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="next" href="gstreamer-plugins-bad.html" title="Part I. GStreamer Bad Plugins Libraries">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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.4.5)
+      for GStreamer Bad Library 1.0 (1.5.91)
       <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>
@@ -36,6 +36,9 @@
 bitstream parsing.</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-jpegparser.html">jpegparser</a></span><span class="refpurpose"> — Convenience library for JPEG bitstream parsing.</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-mpegvideoparser.html">mpegvideoparser</a></span><span class="refpurpose"> — Convenience library for mpeg1 and 2 video
 bitstream parsing.</span>
 </dt>
@@ -80,7 +83,7 @@
 </dl></dd>
 <dt><span class="chapter"><a href="tools.html">Useful elements</a></span></dt>
 <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>
+<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>
@@ -107,7 +110,7 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLAPI.html">GstGLAPI</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose">buffer pool for <span class="type">GstGLMemory</span> objects</span>
+<span class="refentrytitle"><a href="GstGLBufferPool.html">GstGLBufferPool</a></span><span class="refpurpose"> — buffer pool for <span class="type">GstGLMemory</span> objects</span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="GstGLColorConvert.html">GstGLColorConvert</a></span><span class="refpurpose"> — an object that converts between color spaces/formats</span>
@@ -122,6 +125,9 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEGL.html">GstGLContextEGL</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextEagl.html">GstGLContextEagl</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLContextGLX.html">GstGLContextGLX</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
@@ -137,10 +143,13 @@
 <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="GstGLBaseFilter.html">GstGLBaseFilter</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>
+<span class="refentrytitle"><a href="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>
@@ -149,10 +158,13 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglshader.html">GstGLShader</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLSyncMeta.html">GstGLSyncMeta</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <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>
+<span class="refentrytitle"><a href="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>
@@ -179,6 +191,10 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLWindowX11.html">GstGLWindowX11</a></span><span class="refpurpose"></span>
 </dt>
 </dl></dd>
+<dt><span class="chapter"><a href="ch07.html">Interfaces</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstPhotography.html">GstPhotography</a></span><span class="refpurpose"> — Interface for digital image capture elements</span>
+</dt></dl></dd>
 </dl></dd>
 <dt><span class="part"><a href="gstreamer-libs-hierarchy.html">II. Object Hierarchy</a></span></dt>
 <dt><span class="index"><a href="api-index-full.html">Index</a></span></dt>
@@ -187,7 +203,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/index.sgml b/docs/libs/html/index.sgml
index 5378adc..6cb3874 100644
--- a/docs/libs/html/index.sgml
+++ b/docs/libs/html/index.sgml
@@ -32,10 +32,60 @@
 <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">
 <ANCHOR id="GstH264NalUnitType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264NalUnitType">
+<ANCHOR id="GST-H264-NAL-UNKNOWN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-UNKNOWN:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-DPA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPA:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-DPB:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPB:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-DPC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DPC:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-IDR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-IDR:CAPS">
+<ANCHOR id="GST-H264-NAL-SEI:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SEI:CAPS">
+<ANCHOR id="GST-H264-NAL-SPS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SPS:CAPS">
+<ANCHOR id="GST-H264-NAL-PPS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-PPS:CAPS">
+<ANCHOR id="GST-H264-NAL-AU-DELIMITER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-AU-DELIMITER:CAPS">
+<ANCHOR id="GST-H264-NAL-SEQ-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SEQ-END:CAPS">
+<ANCHOR id="GST-H264-NAL-STREAM-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-STREAM-END:CAPS">
+<ANCHOR id="GST-H264-NAL-FILLER-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-FILLER-DATA:CAPS">
+<ANCHOR id="GST-H264-NAL-SPS-EXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SPS-EXT:CAPS">
+<ANCHOR id="GST-H264-NAL-PREFIX-UNIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-PREFIX-UNIT:CAPS">
+<ANCHOR id="GST-H264-NAL-SUBSET-SPS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SUBSET-SPS:CAPS">
+<ANCHOR id="GST-H264-NAL-DEPTH-SPS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-DEPTH-SPS:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-AUX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-AUX:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-EXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-EXT:CAPS">
+<ANCHOR id="GST-H264-NAL-SLICE-DEPTH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-NAL-SLICE-DEPTH:CAPS">
 <ANCHOR id="GstH264ParserResult" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264ParserResult">
+<ANCHOR id="GST-H264-PARSER-OK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-OK:CAPS">
+<ANCHOR id="GST-H264-PARSER-BROKEN-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-BROKEN-DATA:CAPS">
+<ANCHOR id="GST-H264-PARSER-BROKEN-LINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-BROKEN-LINK:CAPS">
+<ANCHOR id="GST-H264-PARSER-ERROR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-ERROR:CAPS">
+<ANCHOR id="GST-H264-PARSER-NO-NAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-NO-NAL:CAPS">
+<ANCHOR id="GST-H264-PARSER-NO-NAL-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-PARSER-NO-NAL-END:CAPS">
 <ANCHOR id="GstH264SEIPayloadType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264SEIPayloadType">
+<ANCHOR id="GST-H264-SEI-BUF-PERIOD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-BUF-PERIOD:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-TIMING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-TIMING:CAPS">
+<ANCHOR id="GST-H264-SEI-RECOVERY-POINT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-RECOVERY-POINT:CAPS">
+<ANCHOR id="GST-H264-SEI-STEREO-VIDEO-INFO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-STEREO-VIDEO-INFO:CAPS">
+<ANCHOR id="GST-H264-SEI-FRAME-PACKING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-FRAME-PACKING:CAPS">
 <ANCHOR id="GstH264SEIPicStructType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264SEIPicStructType">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-FRAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-TOP-FIELD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-FIELD:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-BOTTOM-FIELD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-FIELD:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM-TOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-TOP-BOTTOM-TOP:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP-BOTTOM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-BOTTOM-TOP-BOTTOM:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-FRAME-DOUBLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME-DOUBLING:CAPS">
+<ANCHOR id="GST-H264-SEI-PIC-STRUCT-FRAME-TRIPLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SEI-PIC-STRUCT-FRAME-TRIPLING:CAPS">
 <ANCHOR id="GstH264SliceType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264SliceType">
+<ANCHOR id="GST-H264-P-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-P-SLICE:CAPS">
+<ANCHOR id="GST-H264-B-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-B-SLICE:CAPS">
+<ANCHOR id="GST-H264-I-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-I-SLICE:CAPS">
+<ANCHOR id="GST-H264-SP-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SP-SLICE:CAPS">
+<ANCHOR id="GST-H264-SI-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-SI-SLICE:CAPS">
+<ANCHOR id="GST-H264-S-P-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-S-P-SLICE:CAPS">
+<ANCHOR id="GST-H264-S-B-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-S-B-SLICE:CAPS">
+<ANCHOR id="GST-H264-S-I-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-S-I-SLICE:CAPS">
+<ANCHOR id="GST-H264-S-SP-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-S-SP-SLICE:CAPS">
+<ANCHOR id="GST-H264-S-SI-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-S-SI-SLICE:CAPS">
 <ANCHOR id="GstH264NalParser" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264NalParser">
 <ANCHOR id="GstH264NalUnit" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264NalUnit">
 <ANCHOR id="GstH264SPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264SPS">
@@ -50,6 +100,46 @@
 <ANCHOR id="GstH264PicTiming" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264PicTiming">
 <ANCHOR id="GstH264BufferingPeriod" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264BufferingPeriod">
 <ANCHOR id="GstH264SEIMessage" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GstH264SEIMessage">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.functions">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.other">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.includes" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.includes">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.description">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.functions_details">
+<ANCHOR id="gst-jpeg-parse" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-parse">
+<ANCHOR id="gst-jpeg-segment-parse-frame-header" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-frame-header">
+<ANCHOR id="gst-jpeg-segment-parse-scan-header" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-scan-header">
+<ANCHOR id="gst-jpeg-segment-parse-huffman-table" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-huffman-table">
+<ANCHOR id="gst-jpeg-segment-parse-quantization-table" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-quantization-table">
+<ANCHOR id="gst-jpeg-segment-parse-restart-interval" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-segment-parse-restart-interval">
+<ANCHOR id="gst-jpeg-get-default-quantization-tables" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-quantization-tables">
+<ANCHOR id="gst-jpeg-get-default-huffman-tables" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-jpeg-get-default-huffman-tables">
+<ANCHOR id="gst-plugins-bad-libs-jpegparser.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#gst-plugins-bad-libs-jpegparser.other_details">
+<ANCHOR id="GST-JPEG-MAX-FRAME-COMPONENTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-FRAME-COMPONENTS:CAPS">
+<ANCHOR id="GST-JPEG-MAX-SCAN-COMPONENTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-SCAN-COMPONENTS:CAPS">
+<ANCHOR id="GST-JPEG-MAX-QUANT-ELEMENTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MAX-QUANT-ELEMENTS:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-SOF-MIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MIN:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-SOF-MAX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-SOF-MAX:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-APP-MIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MIN:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-APP-MAX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-APP-MAX:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-RST-MIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MIN:CAPS">
+<ANCHOR id="GST-JPEG-MARKER-RST-MAX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-MARKER-RST-MAX:CAPS">
+<ANCHOR id="GstJpegEntropyCodingMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegEntropyCodingMode">
+<ANCHOR id="GST-JPEG-ENTROPY-CODING-HUFFMAN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-ENTROPY-CODING-HUFFMAN:CAPS">
+<ANCHOR id="GST-JPEG-ENTROPY-CODING-ARITHMETIC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-ENTROPY-CODING-ARITHMETIC:CAPS">
+<ANCHOR id="GstJpegProfile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegProfile">
+<ANCHOR id="GST-JPEG-PROFILE-BASELINE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-BASELINE:CAPS">
+<ANCHOR id="GST-JPEG-PROFILE-EXTENDED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-EXTENDED:CAPS">
+<ANCHOR id="GST-JPEG-PROFILE-PROGRESSIVE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-PROGRESSIVE:CAPS">
+<ANCHOR id="GST-JPEG-PROFILE-LOSSLESS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GST-JPEG-PROFILE-LOSSLESS:CAPS">
+<ANCHOR id="GstJpegSegment" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegSegment">
+<ANCHOR id="GstJpegFrameHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegFrameHdr">
+<ANCHOR id="GstJpegFrameComponent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegFrameComponent">
+<ANCHOR id="GstJpegScanHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegScanHdr">
+<ANCHOR id="GstJpegScanComponent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegScanComponent">
+<ANCHOR id="GstJpegHuffmanTables" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTables">
+<ANCHOR id="GstJpegHuffmanTable" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegHuffmanTable">
+<ANCHOR id="GstJpegQuantTable" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-jpegparser.html#GstJpegQuantTable">
 <ANCHOR id="gst-plugins-bad-libs-mpegvideoparser" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html">
 <ANCHOR id="gst-plugins-bad-libs-mpegvideoparser.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#gst-plugins-bad-libs-mpegvideoparser.functions">
 <ANCHOR id="gst-plugins-bad-libs-mpegvideoparser.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#gst-plugins-bad-libs-mpegvideoparser.other">
@@ -69,11 +159,42 @@
 <ANCHOR id="gst-mpeg-video-quant-matrix-get-zigzag-from-raster" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#gst-mpeg-video-quant-matrix-get-zigzag-from-raster">
 <ANCHOR id="gst-plugins-bad-libs-mpegvideoparser.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#gst-plugins-bad-libs-mpegvideoparser.other_details">
 <ANCHOR id="GstMpegVideoPacketTypeCode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoPacketTypeCode">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-PICTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-PICTURE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-SLICE-MIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SLICE-MIN:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-SLICE-MAX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SLICE-MAX:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-USER-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-USER-DATA:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-SEQUENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SEQUENCE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXTENSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXTENSION:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-SEQUENCE-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-SEQUENCE-END:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-GOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-GOP:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-NONE:CAPS">
 <ANCHOR id="GstMpegVideoPacketExtensionCode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoPacketExtensionCode">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-DISPLAY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-DISPLAY:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXT-QUANT-MATRIX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-QUANT-MATRIX:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-SEQUENCE-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PACKET-EXT-PICTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PACKET-EXT-PICTURE:CAPS">
 <ANCHOR id="GstMpegVideoLevel" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoLevel">
+<ANCHOR id="GST-MPEG-VIDEO-LEVEL-HIGH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-HIGH:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-LEVEL-HIGH-1440:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-HIGH-1440:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-LEVEL-MAIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-MAIN:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-LEVEL-LOW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-LEVEL-LOW:CAPS">
 <ANCHOR id="GstMpegVideoProfile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoProfile">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-422:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-422:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-HIGH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-HIGH:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-SPATIALLY-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SPATIALLY-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-SNR-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SNR-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-MAIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-MAIN:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PROFILE-SIMPLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PROFILE-SIMPLE:CAPS">
 <ANCHOR id="GstMpegVideoPictureType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoPictureType">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-TYPE-I:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-I:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-TYPE-P:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-P:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-TYPE-B:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-B:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-TYPE-D:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-TYPE-D:CAPS">
 <ANCHOR id="GstMpegVideoPictureStructure" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoPictureStructure">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-STRUCTURE-TOP-FIELD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-TOP-FIELD:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-STRUCTURE-BOTTOM-FIELD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-BOTTOM-FIELD:CAPS">
+<ANCHOR id="GST-MPEG-VIDEO-PICTURE-STRUCTURE-FRAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GST-MPEG-VIDEO-PICTURE-STRUCTURE-FRAME:CAPS">
 <ANCHOR id="GstMpegVideoSequenceHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoSequenceHdr">
 <ANCHOR id="GstMpegVideoSequenceExt" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoSequenceExt">
 <ANCHOR id="GstMpegVideoPictureHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpegvideoparser.html#GstMpegVideoPictureHdr">
@@ -95,15 +216,95 @@
 <ANCHOR id="gst-mpeg4-parse-video-packet-header" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#gst-mpeg4-parse-video-packet-header">
 <ANCHOR id="gst-plugins-bad-libs-mpeg4parser.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#gst-plugins-bad-libs-mpeg4parser.other_details">
 <ANCHOR id="GstMpeg4StartCode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4StartCode">
+<ANCHOR id="GST-MPEG4-VIDEO-OBJ-FIRST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-FIRST:CAPS">
+<ANCHOR id="GST-MPEG4-VIDEO-OBJ-LAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-LAST:CAPS">
+<ANCHOR id="GST-MPEG4-VIDEO-LAYER-FIRST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-LAYER-FIRST:CAPS">
+<ANCHOR id="GST-MPEG4-VIDEO-LAYER-LAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-LAYER-LAST:CAPS">
+<ANCHOR id="GST-MPEG4-VISUAL-OBJ-SEQ-START:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ-SEQ-START:CAPS">
+<ANCHOR id="GST-MPEG4-VISUAL-OBJ-SEQ-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ-SEQ-END:CAPS">
+<ANCHOR id="GST-MPEG4-USER-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-USER-DATA:CAPS">
+<ANCHOR id="GST-MPEG4-GROUP-OF-VOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-GROUP-OF-VOP:CAPS">
+<ANCHOR id="GST-MPEG4-VIDEO-SESSION-ERR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-SESSION-ERR:CAPS">
+<ANCHOR id="GST-MPEG4-VISUAL-OBJ:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VISUAL-OBJ:CAPS">
+<ANCHOR id="GST-MPEG4-VIDEO-OBJ-PLANE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-OBJ-PLANE:CAPS">
+<ANCHOR id="GST-MPEG4-FBA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-FBA:CAPS">
+<ANCHOR id="GST-MPEG4-FBA-PLAN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-FBA-PLAN:CAPS">
+<ANCHOR id="GST-MPEG4-MESH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-MESH:CAPS">
+<ANCHOR id="GST-MPEG4-MESH-PLAN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-MESH-PLAN:CAPS">
+<ANCHOR id="GST-MPEG4-STILL-TEXTURE-OBJ:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-TEXTURE-OBJ:CAPS">
+<ANCHOR id="GST-MPEG4-TEXTURE-SPATIAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-SPATIAL:CAPS">
+<ANCHOR id="GST-MPEG4-TEXTURE-SNR-LAYER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-SNR-LAYER:CAPS">
+<ANCHOR id="GST-MPEG4-TEXTURE-TILE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-TEXTURE-TILE:CAPS">
+<ANCHOR id="GST-MPEG4-SHAPE-LAYER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SHAPE-LAYER:CAPS">
+<ANCHOR id="GST-MPEG4-STUFFING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STUFFING:CAPS">
+<ANCHOR id="GST-MPEG4-SYSTEM-FIRST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SYSTEM-FIRST:CAPS">
+<ANCHOR id="GST-MPEG4-SYSTEM-LAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SYSTEM-LAST:CAPS">
+<ANCHOR id="GST-MPEG4-RESYNC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-RESYNC:CAPS">
 <ANCHOR id="GstMpeg4VisualObjectType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VisualObjectType">
+<ANCHOR id="GST-MPEG4-VIDEO-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-VIDEO-ID:CAPS">
+<ANCHOR id="GST-MPEG4-STILL-TEXTURE-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-TEXTURE-ID:CAPS">
+<ANCHOR id="GST-MPEG4-STILL-MESH-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-MESH-ID:CAPS">
+<ANCHOR id="GST-MPEG4-STILL-FBA-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-FBA-ID:CAPS">
+<ANCHOR id="GST-MPEG4-STILL-3D-MESH-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-STILL-3D-MESH-ID:CAPS">
 <ANCHOR id="GstMpeg4AspectRatioInfo" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4AspectRatioInfo">
+<ANCHOR id="GST-MPEG4-SQUARE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SQUARE:CAPS">
+<ANCHOR id="GST-MPEG4-625-TYPE-4-3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-625-TYPE-4-3:CAPS">
+<ANCHOR id="GST-MPEG4-525-TYPE-4-3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-525-TYPE-4-3:CAPS">
+<ANCHOR id="GST-MPEG4-625-TYPE-16-9:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-625-TYPE-16-9:CAPS">
+<ANCHOR id="GST-MPEG4-525-TYPE-16-9:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-525-TYPE-16-9:CAPS">
+<ANCHOR id="GST-MPEG4-EXTENDED-PAR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-EXTENDED-PAR:CAPS">
 <ANCHOR id="GstMpeg4ParseResult" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ParseResult">
+<ANCHOR id="GST-MPEG4-PARSER-OK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-OK:CAPS">
+<ANCHOR id="GST-MPEG4-PARSER-BROKEN-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-BROKEN-DATA:CAPS">
+<ANCHOR id="GST-MPEG4-PARSER-NO-PACKET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-NO-PACKET:CAPS">
+<ANCHOR id="GST-MPEG4-PARSER-NO-PACKET-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-NO-PACKET-END:CAPS">
+<ANCHOR id="GST-MPEG4-PARSER-ERROR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PARSER-ERROR:CAPS">
 <ANCHOR id="GstMpeg4VideoObjectCodingType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VideoObjectCodingType">
+<ANCHOR id="GST-MPEG4-I-VOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-I-VOP:CAPS">
+<ANCHOR id="GST-MPEG4-P-VOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-P-VOP:CAPS">
+<ANCHOR id="GST-MPEG4-B-VOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-B-VOP:CAPS">
+<ANCHOR id="GST-MPEG4-S-VOP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-S-VOP:CAPS">
 <ANCHOR id="GstMpeg4ChromaFormat" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4ChromaFormat">
+<ANCHOR id="GST-MPEG4-CHROMA-4-2-0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-CHROMA-4-2-0:CAPS">
 <ANCHOR id="GstMpeg4VideoObjectLayerShape" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VideoObjectLayerShape">
+<ANCHOR id="GST-MPEG4-RECTANGULAR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-RECTANGULAR:CAPS">
+<ANCHOR id="GST-MPEG4-BINARY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-BINARY:CAPS">
+<ANCHOR id="GST-MPEG4-BINARY-ONLY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-BINARY-ONLY:CAPS">
+<ANCHOR id="GST-MPEG4-GRAYSCALE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-GRAYSCALE:CAPS">
 <ANCHOR id="GstMpeg4SpriteEnable" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4SpriteEnable">
+<ANCHOR id="GST-MPEG4-SPRITE-UNUSED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-UNUSED:CAPS">
+<ANCHOR id="GST-MPEG4-SPRITE-STATIC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-STATIC:CAPS">
+<ANCHOR id="GST-MPEG4-SPRITE-GMG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-SPRITE-GMG:CAPS">
 <ANCHOR id="GstMpeg4Profile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4Profile">
+<ANCHOR id="GST-MPEG4-PROFILE-CORE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-MAIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-MAIN:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-N-BIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-N-BIT:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SIMPLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-HYBRID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-HYBRID:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-RESERVED:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SIMPLE-FBA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-FBA:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-CORE-STUDIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE-STUDIO:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SIMPLE-STUDIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-STUDIO:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-CORE-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-CORE-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-ADVANCED-CORE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-CORE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-ADVANCED-SIMPLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-SIMPLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SIMPLE-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SCALABLE-TEXTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SCALABLE-TEXTURE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-SIMPLE-FACE-ANIMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-SIMPLE-FACE-ANIMATION:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-BASIC-ANIMATED-TEXTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-BASIC-ANIMATED-TEXTURE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-ADVANCED-REALTIME-SIMPLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-REALTIME-SIMPLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-ADVANCED-SCALABLE-TEXTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-SCALABLE-TEXTURE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-FINE-GRANULARITY-SCALABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-FINE-GRANULARITY-SCALABLE:CAPS">
+<ANCHOR id="GST-MPEG4-PROFILE-ADVANCED-CODING-EFFICIENCY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-PROFILE-ADVANCED-CODING-EFFICIENCY:CAPS">
 <ANCHOR id="GstMpeg4Level" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4Level">
+<ANCHOR id="GST-MPEG4-LEVEL0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL0:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL1:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL2:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL3:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL3b" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL3b">
+<ANCHOR id="GST-MPEG4-LEVEL4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL4:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL5:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL5:CAPS">
+<ANCHOR id="GST-MPEG4-LEVEL-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GST-MPEG4-LEVEL-RESERVED:CAPS">
 <ANCHOR id="GstMpeg4VisualObjectSequence" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VisualObjectSequence">
 <ANCHOR id="GstMpeg4VisualObject" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VisualObject">
 <ANCHOR id="GstMpeg4VideoSignalType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-mpeg4parser.html#GstMpeg4VideoSignalType">
@@ -136,14 +337,64 @@
 <ANCHOR id="MAX-HRD-NUM-LEAKY-BUCKETS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#MAX-HRD-NUM-LEAKY-BUCKETS:CAPS">
 <ANCHOR id="GST-VC1-BFRACTION-BASIS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-BFRACTION-BASIS:CAPS">
 <ANCHOR id="GstVC1StartCode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1StartCode">
+<ANCHOR id="GST-VC1-END-OF-SEQ:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-END-OF-SEQ:CAPS">
+<ANCHOR id="GST-VC1-SLICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-SLICE:CAPS">
+<ANCHOR id="GST-VC1-FIELD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-FIELD:CAPS">
+<ANCHOR id="GST-VC1-FRAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-FRAME:CAPS">
+<ANCHOR id="GST-VC1-ENTRYPOINT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-ENTRYPOINT:CAPS">
+<ANCHOR id="GST-VC1-SEQUENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-SEQUENCE:CAPS">
+<ANCHOR id="GST-VC1-SLICE-USER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-SLICE-USER:CAPS">
+<ANCHOR id="GST-VC1-FIELD-USER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-FIELD-USER:CAPS">
+<ANCHOR id="GST-VC1-FRAME-USER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-FRAME-USER:CAPS">
+<ANCHOR id="GST-VC1-ENTRY-POINT-USER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-ENTRY-POINT-USER:CAPS">
+<ANCHOR id="GST-VC1-SEQUENCE-USER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-SEQUENCE-USER:CAPS">
 <ANCHOR id="GstVC1Profile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1Profile">
+<ANCHOR id="GST-VC1-PROFILE-SIMPLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-SIMPLE:CAPS">
+<ANCHOR id="GST-VC1-PROFILE-MAIN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-MAIN:CAPS">
+<ANCHOR id="GST-VC1-PROFILE-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-RESERVED:CAPS">
+<ANCHOR id="GST-VC1-PROFILE-ADVANCED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PROFILE-ADVANCED:CAPS">
 <ANCHOR id="GstVC1ParserResult" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1ParserResult">
+<ANCHOR id="GST-VC1-PARSER-OK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-OK:CAPS">
+<ANCHOR id="GST-VC1-PARSER-BROKEN-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-BROKEN-DATA:CAPS">
+<ANCHOR id="GST-VC1-PARSER-NO-BDU:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-NO-BDU:CAPS">
+<ANCHOR id="GST-VC1-PARSER-NO-BDU-END:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-NO-BDU-END:CAPS">
+<ANCHOR id="GST-VC1-PARSER-ERROR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PARSER-ERROR:CAPS">
 <ANCHOR id="GstVC1PictureType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1PictureType">
+<ANCHOR id="GST-VC1-PICTURE-TYPE-P:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-P:CAPS">
+<ANCHOR id="GST-VC1-PICTURE-TYPE-B:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-B:CAPS">
+<ANCHOR id="GST-VC1-PICTURE-TYPE-I:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-I:CAPS">
+<ANCHOR id="GST-VC1-PICTURE-TYPE-BI:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-BI:CAPS">
+<ANCHOR id="GST-VC1-PICTURE-TYPE-SKIPPED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-PICTURE-TYPE-SKIPPED:CAPS">
 <ANCHOR id="GstVC1Level" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1Level">
+<ANCHOR id="GST-VC1-LEVEL-LOW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-LOW:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-MEDIUM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-MEDIUM:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-HIGH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-HIGH:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-L0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L0:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-L1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L1:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-L2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L2:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-L3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L3:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-L4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-L4:CAPS">
+<ANCHOR id="GST-VC1-LEVEL-UNKNOWN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-LEVEL-UNKNOWN:CAPS">
 <ANCHOR id="GstVC1QuantizerSpec" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1QuantizerSpec">
+<ANCHOR id="GST-VC1-QUANTIZER-IMPLICITLY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-IMPLICITLY:CAPS">
+<ANCHOR id="GST-VC1-QUANTIZER-EXPLICITLY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-EXPLICITLY:CAPS">
+<ANCHOR id="GST-VC1-QUANTIZER-NON-UNIFORM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-NON-UNIFORM:CAPS">
+<ANCHOR id="GST-VC1-QUANTIZER-UNIFORM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-QUANTIZER-UNIFORM:CAPS">
 <ANCHOR id="GstVC1DQProfile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1DQProfile">
+<ANCHOR id="GST-VC1-DQPROFILE-FOUR-EDGES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-FOUR-EDGES:CAPS">
+<ANCHOR id="GST-VC1-DQPROFILE-DOUBLE-EDGES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-DOUBLE-EDGES:CAPS">
+<ANCHOR id="GST-VC1-DQPROFILE-SINGLE-EDGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-SINGLE-EDGE:CAPS">
+<ANCHOR id="GST-VC1-DQPROFILE-ALL-MBS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-DQPROFILE-ALL-MBS:CAPS">
 <ANCHOR id="GstVC1Condover" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1Condover">
+<ANCHOR id="GST-VC1-CONDOVER-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-NONE:CAPS">
+<ANCHOR id="GST-VC1-CONDOVER-ALL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-ALL:CAPS">
+<ANCHOR id="GST-VC1-CONDOVER-SELECT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-CONDOVER-SELECT:CAPS">
 <ANCHOR id="GstVC1MvMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1MvMode">
+<ANCHOR id="GST-VC1-MVMODE-1MV-HPEL-BILINEAR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV-HPEL-BILINEAR:CAPS">
+<ANCHOR id="GST-VC1-MVMODE-1MV:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV:CAPS">
+<ANCHOR id="GST-VC1-MVMODE-1MV-HPEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-1MV-HPEL:CAPS">
+<ANCHOR id="GST-VC1-MVMODE-MIXED-MV:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-MIXED-MV:CAPS">
+<ANCHOR id="GST-VC1-MVMODE-INTENSITY-COMP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GST-VC1-MVMODE-INTENSITY-COMP:CAPS">
 <ANCHOR id="GstVC1SeqHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1SeqHdr">
 <ANCHOR id="GstVC1AdvancedSeqHdr" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1AdvancedSeqHdr">
 <ANCHOR id="GstVC1SeqLayer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-vc1parser.html#GstVC1SeqLayer">
@@ -208,11 +459,81 @@
 <ANCHOR id="gst-plugins-bad-libs-Base-MPEG-TS-sections.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#gst-plugins-bad-libs-Base-MPEG-TS-sections.other_details">
 <ANCHOR id="GstMpegtsSection-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsSection-struct">
 <ANCHOR id="GstMpegtsSectionTableID" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsSectionTableID">
+<ANCHOR id="GST-MTS-TABLE-ID-PROGRAM-ASSOCIATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-PROGRAM-ASSOCIATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CONDITIONAL-ACCESS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONDITIONAL-ACCESS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TS-PROGRAM-MAP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TS-PROGRAM-MAP:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TS-DESCRIPTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TS-DESCRIPTION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-14496-SCENE-DESCRIPTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-14496-SCENE-DESCRIPTION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-14496-OBJET-DESCRIPTOR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-14496-OBJET-DESCRIPTOR:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-METADATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-METADATA:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-IPMP-CONTROL-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-IPMP-CONTROL-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-MULTIPROTO-ENCAPSULATED-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-MULTIPROTO-ENCAPSULATED-DATA:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-U-N-MESSAGES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-U-N-MESSAGES:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-DOWNLOAD-DATA-MESSAGES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-DOWNLOAD-DATA-MESSAGES:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-STREAM-DESCRIPTORS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-STREAM-DESCRIPTORS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-PRIVATE-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-PRIVATE-DATA:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DSM-CC-ADDRESSABLE-SECTIONS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DSM-CC-ADDRESSABLE-SECTIONS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-UNSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MTS-TABLE-ID-UNSET:CAPS">
 <ANCHOR id="GstMpegtsSectionType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsSectionType">
+<ANCHOR id="GST-MPEGTS-SECTION-UNKNOWN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-UNKNOWN:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-PAT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-PAT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-PMT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-PMT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-CAT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-CAT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-TSDT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TSDT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-EIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-EIT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-NIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-NIT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-BAT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-BAT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-SDT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-SDT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-TDT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TDT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-TOT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-TOT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-TVCT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-TVCT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-CVCT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-CVCT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-MGT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-MGT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-ETT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-ETT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-EIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-EIT:CAPS">
+<ANCHOR id="GST-MPEGTS-SECTION-ATSC-STT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-SECTION-ATSC-STT:CAPS">
 <ANCHOR id="GstMpegtsPatProgram" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsPatProgram">
 <ANCHOR id="GstMpegtsPMT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsPMT">
 <ANCHOR id="GstMpegtsPMTStream" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsPMTStream">
 <ANCHOR id="GstMpegtsStreamType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegtsStreamType">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-RESERVED-00:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-RESERVED-00:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG1:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG1:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-MPEG2:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-PRIVATE-SECTIONS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-PRIVATE-SECTIONS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-PRIVATE-PES-PACKETS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-PRIVATE-PES-PACKETS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-MHEG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MHEG:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-DSM-CC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSM-CC:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-H-222-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-H-222-1:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-DSMCC-A:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-A:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-DSMCC-B:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-B:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-DSMCC-C:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-C:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-DSMCC-D:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-DSMCC-D:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUXILIARY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUXILIARY:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-ADTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-ADTS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG4:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-LATM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-LATM:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-PES-PACKETS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-PES-PACKETS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-SECTIONS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SL-FLEXMUX-SECTIONS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-SYNCHRONIZED-DOWNLOAD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-SYNCHRONIZED-DOWNLOAD:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-METADATA-PES-PACKETS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-PES-PACKETS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-METADATA-SECTIONS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-SECTIONS:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-METADATA-DATA-CAROUSEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-DATA-CAROUSEL:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-METADATA-OBJECT-CAROUSEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-OBJECT-CAROUSEL:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-METADATA-SYNCHRONIZED-DOWNLOAD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-METADATA-SYNCHRONIZED-DOWNLOAD:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-MPEG2-IPMP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MPEG2-IPMP:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-H264:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-CLEAN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-AUDIO-AAC-CLEAN:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-MPEG4-TIMED-TEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-MPEG4-TIMED-TEXT:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-RVC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-RVC:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-H264-SVC-SUB-BITSTREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-SVC-SUB-BITSTREAM:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-H264-MVC-SUB-BITSTREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-MVC-SUB-BITSTREAM:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-JP2K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-JP2K:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2-STEREO-ADDITIONAL-VIEW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-MPEG2-STEREO-ADDITIONAL-VIEW:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-H264-STEREO-ADDITIONAL-VIEW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-H264-STEREO-ADDITIONAL-VIEW:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-VIDEO-HEVC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-VIDEO-HEVC:CAPS">
+<ANCHOR id="GST-MPEGTS-STREAM-TYPE-IPMP-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GST-MPEGTS-STREAM-TYPE-IPMP-STREAM:CAPS">
 <ANCHOR id="gst-plugins-bad-libs-Base-MPEG-TS-descriptors" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html">
 <ANCHOR id="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#gst-plugins-bad-libs-Base-MPEG-TS-descriptors.functions">
 <ANCHOR id="GstMpegtsDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor">
@@ -233,9 +554,69 @@
 <ANCHOR id="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#gst-plugins-bad-libs-Base-MPEG-TS-descriptors.other_details">
 <ANCHOR id="GstMpegtsDescriptor-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptor-struct">
 <ANCHOR id="GstMpegtsDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsDescriptorType">
+<ANCHOR id="GST-MTS-DESC-RESERVED-00:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-RESERVED-00:CAPS">
+<ANCHOR id="GST-MTS-DESC-RESERVED-01:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-RESERVED-01:CAPS">
+<ANCHOR id="GST-MTS-DESC-VIDEO-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-VIDEO-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-AUDIO-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AUDIO-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-HIERARCHY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-HIERARCHY:CAPS">
+<ANCHOR id="GST-MTS-DESC-REGISTRATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-REGISTRATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-DATA-STREAM-ALIGNMENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DATA-STREAM-ALIGNMENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-TARGET-BACKGROUND-GRID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-TARGET-BACKGROUND-GRID:CAPS">
+<ANCHOR id="GST-MTS-DESC-VIDEO-WINDOW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-VIDEO-WINDOW:CAPS">
+<ANCHOR id="GST-MTS-DESC-CA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-CA:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISO-639-LANGUAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-ISO-639-LANGUAGE:CAPS">
+<ANCHOR id="GST-MTS-DESC-SYSTEM-CLOCK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SYSTEM-CLOCK:CAPS">
+<ANCHOR id="GST-MTS-DESC-MULTIPLEX-BUFFER-UTILISATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MULTIPLEX-BUFFER-UTILISATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-COPYRIGHT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-COPYRIGHT:CAPS">
+<ANCHOR id="GST-MTS-DESC-MAXIMUM-BITRATE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MAXIMUM-BITRATE:CAPS">
+<ANCHOR id="GST-MTS-DESC-PRIVATE-DATA-INDICATOR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-PRIVATE-DATA-INDICATOR:CAPS">
+<ANCHOR id="GST-MTS-DESC-SMOOTHING-BUFFER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SMOOTHING-BUFFER:CAPS">
+<ANCHOR id="GST-MTS-DESC-STD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STD:CAPS">
+<ANCHOR id="GST-MTS-DESC-IBP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IBP:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-CAROUSEL-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-CAROUSEL-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-ASSOCIATION-TAG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-ASSOCIATION-TAG:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-DEFERRED-ASSOCIATION-TAG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-DEFERRED-ASSOCIATION-TAG:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-NPT-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-NPT-REFERENCE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-NPT-ENDPOINT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-NPT-ENDPOINT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-STREAM-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-STREAM-MODE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DSMCC-STREAM-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DSMCC-STREAM-EVENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG4-VIDEO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-VIDEO:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG4-AUDIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-AUDIO:CAPS">
+<ANCHOR id="GST-MTS-DESC-IOD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IOD:CAPS">
+<ANCHOR id="GST-MTS-DESC-SL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SL:CAPS">
+<ANCHOR id="GST-MTS-DESC-FMC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FMC:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXTERNAL-ES-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-EXTERNAL-ES-ID:CAPS">
+<ANCHOR id="GST-MTS-DESC-MUX-CODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MUX-CODE:CAPS">
+<ANCHOR id="GST-MTS-DESC-FMX-BUFFER-SIZE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FMX-BUFFER-SIZE:CAPS">
+<ANCHOR id="GST-MTS-DESC-MULTIPLEX-BUFFER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MULTIPLEX-BUFFER:CAPS">
+<ANCHOR id="GST-MTS-DESC-CONTENT-LABELING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-CONTENT-LABELING:CAPS">
+<ANCHOR id="GST-MTS-DESC-METADATA-POINTER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA-POINTER:CAPS">
+<ANCHOR id="GST-MTS-DESC-METADATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA:CAPS">
+<ANCHOR id="GST-MTS-DESC-METADATA-STD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-METADATA-STD:CAPS">
+<ANCHOR id="GST-MTS-DESC-AVC-VIDEO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AVC-VIDEO:CAPS">
+<ANCHOR id="GST-MTS-DESC-IPMP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-IPMP:CAPS">
+<ANCHOR id="GST-MTS-DESC-AVC-TIMING-AND-HRD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AVC-TIMING-AND-HRD:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG2-AAC-AUDIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG2-AAC-AUDIO:CAPS">
+<ANCHOR id="GST-MTS-DESC-FLEX-MUX-TIMING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-FLEX-MUX-TIMING:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG4-TEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-TEXT:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG4-AUDIO-EXTENSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG4-AUDIO-EXTENSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-AUXILIARY-VIDEO-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AUXILIARY-VIDEO-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-SVC-EXTENSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-SVC-EXTENSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-MVC-EXTENSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MVC-EXTENSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-J2K-VIDEO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-J2K-VIDEO:CAPS">
+<ANCHOR id="GST-MTS-DESC-MVC-OPERATION-POINT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MVC-OPERATION-POINT:CAPS">
+<ANCHOR id="GST-MTS-DESC-MPEG2-STEREOSCOPIC-VIDEO-FORMAT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-MPEG2-STEREOSCOPIC-VIDEO-FORMAT:CAPS">
+<ANCHOR id="GST-MTS-DESC-STEREOSCOPIC-PROGRAM-INFO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STEREOSCOPIC-PROGRAM-INFO:CAPS">
+<ANCHOR id="GST-MTS-DESC-STEREOSCOPIC-VIDEO-INFO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-STEREOSCOPIC-VIDEO-INFO:CAPS">
 <ANCHOR id="GstMpegtsMiscDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsMiscDescriptorType">
+<ANCHOR id="GST-MTS-DESC-AC3-AUDIO-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-AC3-AUDIO-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DTG-LOGICAL-CHANNEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MTS-DESC-DTG-LOGICAL-CHANNEL:CAPS">
 <ANCHOR id="GstMpegtsISO639LanguageDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsISO639LanguageDescriptor">
 <ANCHOR id="GstMpegtsIso639AudioType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsIso639AudioType">
+<ANCHOR id="GST-MPEGTS-AUDIO-TYPE-UNDEFINED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-UNDEFINED:CAPS">
+<ANCHOR id="GST-MPEGTS-AUDIO-TYPE-CLEAN-EFFECTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-CLEAN-EFFECTS:CAPS">
+<ANCHOR id="GST-MPEGTS-AUDIO-TYPE-HEARING-IMPAIRED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-HEARING-IMPAIRED:CAPS">
+<ANCHOR id="GST-MPEGTS-AUDIO-TYPE-VISUAL-IMPAIRED-COMMENTARY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GST-MPEGTS-AUDIO-TYPE-VISUAL-IMPAIRED-COMMENTARY:CAPS">
 <ANCHOR id="GstMpegtsLogicalChannel" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsLogicalChannel">
 <ANCHOR id="GstMpegtsLogicalChannelDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegtsLogicalChannelDescriptor">
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html">
@@ -254,9 +635,30 @@
 <ANCHOR id="gst-mpegts-atsc-stt-get-datetime-utc" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#gst-mpegts-atsc-stt-get-datetime-utc">
 <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="GST-MTS-TABLE-ID-ATSC-MASTER-GUIDE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-MASTER-GUIDE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-TERRESTRIAL-VIRTUAL-CHANNEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-TERRESTRIAL-VIRTUAL-CHANNEL:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-CABLE-VIRTUAL-CHANNEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-CABLE-VIRTUAL-CHANNEL:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-RATING-REGION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-RATING-REGION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-EVENT-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-EVENT-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-CHANNEL-OR-EVENT-EXTENDED-TEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-CHANNEL-OR-EVENT-EXTENDED-TEXT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-SYSTEM-TIME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-SYSTEM-TIME:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-DATA-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DATA-EVENT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-DATA-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DATA-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-NETWORK-RESOURCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-NETWORK-RESOURCE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-LONG-TERM-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-LONG-TERM-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE-SECTION-CODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-DIRECTED-CHANNEL-CHANGE-SECTION-CODE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-AGGREGATE-EVENT-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-EVENT-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-AGGREGATE-EXTENDED-TEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-EXTENDED-TEXT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-AGGREGATE-DATA-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-AGGREGATE-DATA-EVENT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-ATSC-SATELLITE-VIRTUAL-CHANNEL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-ATSC-SATELLITE-VIRTUAL-CHANNEL:CAPS">
 <ANCHOR id="GstMpegtsAtscVCTSource" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscVCTSource">
 <ANCHOR id="GstMpegtsAtscVCT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscVCT">
 <ANCHOR id="GstMpegtsAtscMGTTableType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscMGTTableType">
+<ANCHOR id="GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT0:CAPS">
+<ANCHOR id="GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT127:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-EIT127:CAPS">
+<ANCHOR id="GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT0:CAPS">
+<ANCHOR id="GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT127:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GST-MPEGTS-ATSC-MGT-TABLE-TYPE-ETT127:CAPS">
 <ANCHOR id="GstMpegtsAtscMGTTable" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscMGTTable">
 <ANCHOR id="GstMpegtsAtscMGT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscMGT">
 <ANCHOR id="GstMpegtsAtscMultString" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegtsAtscMultString">
@@ -285,6 +687,44 @@
 <ANCHOR id="gst-mpegts-section-get-tot" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-mpegts-section-get-tot">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.other_details" 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_details">
 <ANCHOR id="GstMpegtsSectionDVBTableID" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsSectionDVBTableID">
+<ANCHOR id="GST-MTS-TABLE-ID-NETWORK-INFORMATION-ACTUAL-NETWORK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-NETWORK-INFORMATION-ACTUAL-NETWORK:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-NETWORK-INFORMATION-OTHER-NETWORK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-NETWORK-INFORMATION-OTHER-NETWORK:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-ACTUAL-TS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-ACTUAL-TS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-OTHER-TS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SERVICE-DESCRIPTION-OTHER-TS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-BOUQUET-ASSOCIATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-BOUQUET-ASSOCIATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-PRESENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-PRESENT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-PRESENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-PRESENT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-1:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-N:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-ACTUAL-TS-SCHEDULE-N:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-1:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-N:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-EVENT-INFORMATION-OTHER-TS-SCHEDULE-N:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TIME-DATE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIME-DATE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-RUNNING-STATUS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RUNNING-STATUS:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-STUFFING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-STUFFING:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TIME-OFFSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIME-OFFSET:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-APPLICATION-INFORMATION-TABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-APPLICATION-INFORMATION-TABLE:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CONTAINER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONTAINER:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-RELATED-CONTENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RELATED-CONTENT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CONTENT-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CONTENT-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-MPE-FEC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-MPE-FEC:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-RESOLUTION-NOTIFICATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-RESOLUTION-NOTIFICATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-MPE-IFEC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-MPE-IFEC:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-DISCONTINUITY-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-DISCONTINUITY-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-SELECTION-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SELECTION-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CA-MESSAGE-ECM-0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-ECM-0:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CA-MESSAGE-ECM-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-ECM-1:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-1:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-N:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CA-MESSAGE-SYSTEM-PRIVATE-N:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-SCT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SCT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-FCT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-FCT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TCT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TCT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-SPT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-SPT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-CMT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-CMT:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TBTP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TBTP:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-PCR-PACKET-PAYLOAD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-PCR-PACKET-PAYLOAD:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TRANSMISSION-MODE-SUPPORT-PAYLOAD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TRANSMISSION-MODE-SUPPORT-PAYLOAD:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-TIM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-TIM:CAPS">
+<ANCHOR id="GST-MTS-TABLE-ID-LL-FEC-PARITY-DATA-TABLE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MTS-TABLE-ID-LL-FEC-PARITY-DATA-TABLE:CAPS">
 <ANCHOR id="GstMpegtsNIT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsNIT">
 <ANCHOR id="GstMpegtsNITStream" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsNITStream">
 <ANCHOR id="GstMpegtsBAT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsBAT">
@@ -294,6 +734,12 @@
 <ANCHOR id="GstMpegtsEIT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsEIT">
 <ANCHOR id="GstMpegtsEITEvent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsEITEvent">
 <ANCHOR id="GstMpegtsRunningStatus" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsRunningStatus">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-UNDEFINED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-UNDEFINED:CAPS">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-NOT-RUNNING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-NOT-RUNNING:CAPS">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-STARTS-IN-FEW-SECONDS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-STARTS-IN-FEW-SECONDS:CAPS">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-PAUSING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-PAUSING:CAPS">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-RUNNING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-RUNNING:CAPS">
+<ANCHOR id="GST-MPEGTS-RUNNING-STATUS-OFF-AIR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GST-MPEGTS-RUNNING-STATUS-OFF-AIR:CAPS">
 <ANCHOR id="GstMpegtsTOT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegtsTOT">
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html">
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.other">
@@ -302,6 +748,27 @@
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.functions_details">
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.other_details">
 <ANCHOR id="GstMpegtsATSCDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GstMpegtsATSCDescriptorType">
+<ANCHOR id="GST-MTS-DESC-ATSC-STUFFING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-STUFFING:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-AC3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-AC3:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-CAPTION-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CAPTION-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-CONTENT-ADVISORY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CONTENT-ADVISORY:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-EXTENDED-CHANNEL-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-EXTENDED-CHANNEL-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-SERVICE-LOCATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-SERVICE-LOCATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-TIME-SHIFTED-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-TIME-SHIFTED-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-COMPONENT-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-COMPONENT-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-DCC-DEPARTING-REQUEST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DCC-DEPARTING-REQUEST:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-DCC-ARRIVING-REQUEST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DCC-ARRIVING-REQUEST:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-REDISTRIBUTION-CONTROL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-REDISTRIBUTION-CONTROL:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-GENRE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-GENRE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-PRIVATE-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-PRIVATE-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-ENHANCED-SIGNALING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-ENHANCED-SIGNALING:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-DATA-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DATA-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-PID-COUNT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-PID-COUNT:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-DOWNLOAD-DESCRIPTOR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-DOWNLOAD-DESCRIPTOR:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-MULTIPROTOCOL-ENCAPSULATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-MULTIPROTOCOL-ENCAPSULATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-MODULE-LINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-MODULE-LINK:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-CRC32:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-CRC32:CAPS">
+<ANCHOR id="GST-MTS-DESC-ATSC-GROUP-LINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ATSC-GROUP-LINK:CAPS">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.functions" 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.functions">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.other" 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">
@@ -352,35 +819,244 @@
 <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="GST-MTS-DESC-DVB-NETWORK-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-NETWORK-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SERVICE-LIST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-LIST:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-STUFFING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-STUFFING:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SATELLITE-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SATELLITE-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CABLE-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CABLE-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-VBI-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-VBI-DATA:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-VBI-TELETEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-VBI-TELETEXT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-BOUQUET-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-BOUQUET-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-COUNTRY-AVAILABILITY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-COUNTRY-AVAILABILITY:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-LINKAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-LINKAGE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-NVOD-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-NVOD-REFERENCE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TIME-SHIFTED-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIME-SHIFTED-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SHORT-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SHORT-EVENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-EXTENDED-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-EXTENDED-EVENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TIME-SHIFTED-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIME-SHIFTED-EVENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-COMPONENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-COMPONENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-MOSAIC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MOSAIC:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-STREAM-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-STREAM-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CA-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CA-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CONTENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CONTENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-PARENTAL-RATING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PARENTAL-RATING:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TELETEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TELETEXT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TELEPHONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TELEPHONE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-LOCAL-TIME-OFFSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-LOCAL-TIME-OFFSET:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SUBTITLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SUBTITLING:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TERRESTRIAL-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TERRESTRIAL-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-MULTILINGUAL-NETWORK-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-NETWORK-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-MULTILINGUAL-BOUQUET-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-BOUQUET-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-MULTILINGUAL-SERVICE-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-SERVICE-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-MULTILINGUAL-COMPONENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-COMPONENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-PRIVATE-DATA-SPECIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PRIVATE-DATA-SPECIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SERVICE-MOVE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-MOVE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SHORT-SMOOTHING-BUFFER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SHORT-SMOOTHING-BUFFER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-FREQUENCY-LIST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-FREQUENCY-LIST:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-PARTIAL-TRANSPORT-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PARTIAL-TRANSPORT-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-DATA-BROADCAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DATA-BROADCAST:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SCRAMBLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SCRAMBLING:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-DATA-BROADCAST-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DATA-BROADCAST-ID:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TRANSPORT-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TRANSPORT-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-DSNG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DSNG:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-PDC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-PDC:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-AC3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-AC3:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-ANCILLARY-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ANCILLARY-DATA:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CELL-LIST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CELL-LIST:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CELL-FREQUENCY-LINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CELL-FREQUENCY-LINK:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-ANNOUNCEMENT-SUPPORT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ANNOUNCEMENT-SUPPORT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-APPLICATION-SIGNALLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-APPLICATION-SIGNALLING:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-ADAPTATION-FIELD-DATA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ADAPTATION-FIELD-DATA:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SERVICE-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-SERVICE-AVAILABILITY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-AVAILABILITY:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-DEFAULT-AUTHORITY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DEFAULT-AUTHORITY:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-RELATED-CONTENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-RELATED-CONTENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TVA-ID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TVA-ID:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-CONTENT-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-CONTENT-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-TIMESLICE-FEC-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-TIMESLICE-FEC-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-ECM-REPETITION-RATE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ECM-REPETITION-RATE:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-S2-SATELLITE-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-S2-SATELLITE-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-ENHANCED-AC3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-ENHANCED-AC3:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-DTS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-DTS:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-AAC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-AAC:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-XAIT-LOCATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-XAIT-LOCATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-FTA-CONTENT-MANAGEMENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-FTA-CONTENT-MANAGEMENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-DVB-EXTENSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-EXTENSION:CAPS">
 <ANCHOR id="GstMpegtsDVBExtendedDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBExtendedDescriptorType">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-IMAGE-ICON:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-IMAGE-ICON:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-CPCM-DELIVERY-SIGNALLING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CPCM-DELIVERY-SIGNALLING:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-CP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CP:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-CP-IDENTIFIER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-CP-IDENTIFIER:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-T2-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-T2-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-SH-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SH-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-SUPPLEMENTARY-AUDIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SUPPLEMENTARY-AUDIO:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-NETWORK-CHANGE-NOTIFY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-NETWORK-CHANGE-NOTIFY:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-MESSAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-MESSAGE:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-TARGET-REGION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-TARGET-REGION:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-TARGET-REGION-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-TARGET-REGION-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-SERVICE-RELOCATED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-SERVICE-RELOCATED:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-XAIT-PID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-XAIT-PID:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-C2-DELIVERY-SYSTEM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-C2-DELIVERY-SYSTEM:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-DTS-HD-AUDIO-STREAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-DTS-HD-AUDIO-STREAM:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-DTS-NEUTRAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-DTS-NEUTRAL:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-VIDEO-DEPTH-RANGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-VIDEO-DEPTH-RANGE:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-T2MI:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-T2MI:CAPS">
+<ANCHOR id="GST-MTS-DESC-EXT-DVB-URI-LINKAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-EXT-DVB-URI-LINKAGE:CAPS">
 <ANCHOR id="GstMpegtsContent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsContent">
 <ANCHOR id="GstMpegtsComponentDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsComponentDescriptor">
 <ANCHOR id="GstMpegtsExtendedEventItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsExtendedEventItem">
 <ANCHOR id="GstMpegtsExtendedEventDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsExtendedEventDescriptor">
 <ANCHOR id="GstMpegtsSatelliteDeliverySystemDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsSatelliteDeliverySystemDescriptor">
 <ANCHOR id="GstMpegtsDVBCodeRate" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBCodeRate">
+<ANCHOR id="GST-MPEGTS-FEC-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-NONE:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-1-2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-1-2:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-2-3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-2-3:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-3-4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-3-4:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-4-5:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-4-5:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-5-6:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-5-6:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-6-7:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-6-7:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-7-8:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-7-8:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-8-9:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-8-9:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-AUTO:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-3-5:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-3-5:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-9-10:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-9-10:CAPS">
+<ANCHOR id="GST-MPEGTS-FEC-2-5:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-FEC-2-5:CAPS">
 <ANCHOR id="GstMpegtsModulationType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsModulationType">
+<ANCHOR id="GST-MPEGTS-MODULATION-QPSK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QPSK:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-16:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-16:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-32:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-32:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-64:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-64:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-128:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-128:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-256:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-256:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-AUTO:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-VSB-8:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-VSB-8:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-VSB-16:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-VSB-16:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-PSK-8:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-PSK-8:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-APSK-16:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-APSK-16:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-APSK-32:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-APSK-32:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-DQPSK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-DQPSK:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-QAM-4-NR-:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-QAM-4-NR-:CAPS">
+<ANCHOR id="GST-MPEGTS-MODULATION-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-MODULATION-NONE:CAPS">
 <ANCHOR id="GstMpegtsSatellitePolarizationType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsSatellitePolarizationType">
+<ANCHOR id="GST-MPEGTS-POLARIZATION-LINEAR-HORIZONTAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-LINEAR-HORIZONTAL:CAPS">
+<ANCHOR id="GST-MPEGTS-POLARIZATION-LINEAR-VERTICAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-LINEAR-VERTICAL:CAPS">
+<ANCHOR id="GST-MPEGTS-POLARIZATION-CIRCULAR-LEFT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-CIRCULAR-LEFT:CAPS">
+<ANCHOR id="GST-MPEGTS-POLARIZATION-CIRCULAR-RIGHT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-POLARIZATION-CIRCULAR-RIGHT:CAPS">
 <ANCHOR id="GstMpegtsSatelliteRolloff" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsSatelliteRolloff">
+<ANCHOR id="GST-MPEGTS-ROLLOFF-35:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-35:CAPS">
+<ANCHOR id="GST-MPEGTS-ROLLOFF-20:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-20:CAPS">
+<ANCHOR id="GST-MPEGTS-ROLLOFF-25:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-25:CAPS">
+<ANCHOR id="GST-MPEGTS-ROLLOFF-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-RESERVED:CAPS">
+<ANCHOR id="GST-MPEGTS-ROLLOFF-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-ROLLOFF-AUTO:CAPS">
 <ANCHOR id="GstMpegtsCableDeliverySystemDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsCableDeliverySystemDescriptor">
 <ANCHOR id="GstMpegtsCableOuterFECScheme" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsCableOuterFECScheme">
+<ANCHOR id="GST-MPEGTS-CABLE-OUTER-FEC-UNDEFINED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-UNDEFINED:CAPS">
+<ANCHOR id="GST-MPEGTS-CABLE-OUTER-FEC-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-NONE:CAPS">
+<ANCHOR id="GST-MPEGTS-CABLE-OUTER-FEC-RS-204-188:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-CABLE-OUTER-FEC-RS-204-188:CAPS">
 <ANCHOR id="GstMpegtsTerrestrialDeliverySystemDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsTerrestrialDeliverySystemDescriptor">
 <ANCHOR id="GstMpegtsTerrestrialTransmissionMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsTerrestrialTransmissionMode">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-2K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-2K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-8K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-8K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-AUTO:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-4K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-4K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-1K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-1K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-16K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-16K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-32K:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-32K:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-C1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-C1:CAPS">
+<ANCHOR id="GST-MPEGTS-TRANSMISSION-MODE-C3780:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-TRANSMISSION-MODE-C3780:CAPS">
 <ANCHOR id="GstMpegtsTerrestrialGuardInterval" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsTerrestrialGuardInterval">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-1-32:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-32:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-1-16:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-16:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-1-8:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-8:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-1-4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-4:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-AUTO:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-1-128:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-1-128:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-19-128:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-19-128:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-19-256:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-19-256:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-PN420:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN420:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-PN595:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN595:CAPS">
+<ANCHOR id="GST-MPEGTS-GUARD-INTERVAL-PN945:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-GUARD-INTERVAL-PN945:CAPS">
 <ANCHOR id="GstMpegtsTerrestrialHierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsTerrestrialHierarchy">
+<ANCHOR id="GST-MPEGTS-HIERARCHY-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-NONE:CAPS">
+<ANCHOR id="GST-MPEGTS-HIERARCHY-1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-1:CAPS">
+<ANCHOR id="GST-MPEGTS-HIERARCHY-2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-2:CAPS">
+<ANCHOR id="GST-MPEGTS-HIERARCHY-4:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-4:CAPS">
+<ANCHOR id="GST-MPEGTS-HIERARCHY-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-HIERARCHY-AUTO:CAPS">
 <ANCHOR id="GstMpegtsT2DeliverySystemCellExtension" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsT2DeliverySystemCellExtension">
 <ANCHOR id="GstMpegtsT2DeliverySystemCell" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsT2DeliverySystemCell">
 <ANCHOR id="GstMpegtsT2DeliverySystemDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsT2DeliverySystemDescriptor">
 <ANCHOR id="GstMpegtsDVBServiceType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBServiceType">
+<ANCHOR id="GST-DVB-SERVICE-RESERVED-00:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-00:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-DIGITAL-TELEVISION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DIGITAL-TELEVISION:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-DIGITAL-RADIO-SOUND:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DIGITAL-RADIO-SOUND:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-TELETEXT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-TELETEXT:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-NVOD-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-NVOD-REFERENCE:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-NVOD-TIME-SHIFTED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-NVOD-TIME-SHIFTED:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-MOSAIC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-MOSAIC:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-FM-RADIO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-FM-RADIO:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-DVB-SRM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DVB-SRM:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-RESERVED-09:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-09:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-DIGITAL-RADIO-SOUND:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-DIGITAL-RADIO-SOUND:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-MOSAIC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-MOSAIC:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-DATA-BROADCAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DATA-BROADCAST:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-RESERVED-0D-COMMON-INTERFACE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-0D-COMMON-INTERFACE:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-RCS-MAP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RCS-MAP:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-RCS-FLS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RCS-FLS:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-DVB-MHP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-DVB-MHP:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-MPEG2-HD-DIGITAL-TELEVISION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-MPEG2-HD-DIGITAL-TELEVISION:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-SD-DIGITAL-TELEVISION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-DIGITAL-TELEVISION:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-TIME-SHIFTED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-TIME-SHIFTED:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-SD-NVOD-REFERENCE:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-HD-DIGITAL-TELEVISION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-DIGITAL-TELEVISION:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-TIME-SHIFTED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-TIME-SHIFTED:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-HD-NVOD-REFERENCE:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-DIGITAL-TELEVISION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-DIGITAL-TELEVISION:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-TIME-SHIFTED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-TIME-SHIFTED:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-ADVANCED-CODEC-STEREO-HD-NVOD-REFERENCE:CAPS">
+<ANCHOR id="GST-DVB-SERVICE-RESERVED-FF:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-DVB-SERVICE-RESERVED-FF:CAPS">
 <ANCHOR id="GstMpegtsDVBTeletextType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBTeletextType">
+<ANCHOR id="INITIAL-PAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#INITIAL-PAGE:CAPS">
+<ANCHOR id="SUBTITLE-PAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#SUBTITLE-PAGE:CAPS">
+<ANCHOR id="ADDITIONAL-INFO-PAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#ADDITIONAL-INFO-PAGE:CAPS">
+<ANCHOR id="PROGRAMME-SCHEDULE-PAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#PROGRAMME-SCHEDULE-PAGE:CAPS">
+<ANCHOR id="HEARING-IMPAIRED-PAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#HEARING-IMPAIRED-PAGE:CAPS">
 <ANCHOR id="GstMpegtsDVBLinkageType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageType">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-RESERVED-00:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-RESERVED-00:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-INFORMATION:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-EPG:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EPG:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-CA-REPLACEMENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-CA-REPLACEMENT:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-COMPLETE-SI:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-COMPLETE-SI:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-SERVICE-REPLACEMENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-SERVICE-REPLACEMENT:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-DATA-BROADCAST:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-DATA-BROADCAST:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-RCS-MAP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-RCS-MAP:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-MOBILE-HAND-OVER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-MOBILE-HAND-OVER:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-SYSTEM-SOFTWARE-UPDATE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-SYSTEM-SOFTWARE-UPDATE:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-SSU:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-SSU:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-IP-MAC-NOTIFICATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-IP-MAC-NOTIFICATION:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-INT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-TS-CONTAINING-INT:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EVENT:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-EXTENDED-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-EXTENDED-EVENT:CAPS">
 <ANCHOR id="GstMpegtsDVBLinkageHandOverType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageHandOverType">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-HAND-OVER-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-RESERVED:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-HAND-OVER-IDENTICAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-IDENTICAL:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-HAND-OVER-LOCAL-VARIATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-LOCAL-VARIATION:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-LINKAGE-HAND-OVER-ASSOCIATED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-LINKAGE-HAND-OVER-ASSOCIATED:CAPS">
 <ANCHOR id="GstMpegtsDVBLinkageMobileHandOver" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageMobileHandOver">
 <ANCHOR id="GstMpegtsDVBLinkageEvent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageEvent">
 <ANCHOR id="GstMpegtsDVBLinkageExtendedEvent" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBLinkageExtendedEvent">
 <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="GstMpegtsDVBScramblingModeType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegtsDVBScramblingModeType">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-RESERVED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-RESERVED:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA1:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA2:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-STANDARD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-STANDARD:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-MINIMAL-ENHANCED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-MINIMAL-ENHANCED:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-FULL-ENHANCED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CSA3-FULL-ENHANCED:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-CISSA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-CISSA:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-0:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-0:CAPS">
+<ANCHOR id="GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-F:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MPEGTS-DVB-SCRAMBLING-MODE-ATIS-F:CAPS">
 <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">
@@ -394,6 +1070,38 @@
 <ANCHOR id="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.functions_details" 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.functions_details">
 <ANCHOR id="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.other_details" 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_details">
 <ANCHOR id="GstMpegtsISDBDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GstMpegtsISDBDescriptorType">
+<ANCHOR id="GST-MTS-DESC-ISDB-HIERARCHICAL-TRANSMISSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-HIERARCHICAL-TRANSMISSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-DIGITAL-COPY-CONTROL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DIGITAL-COPY-CONTROL:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-NETWORK-IDENTIFICATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-NETWORK-IDENTIFICATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-PARTIAL-TS-TIME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-PARTIAL-TS-TIME:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-AUDIO-COMPONENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-AUDIO-COMPONENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-HYPERLINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-HYPERLINK:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-TARGET-REGION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-TARGET-REGION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-DATA-CONTENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DATA-CONTENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-VIDEO-DECODE-CONTROL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-VIDEO-DECODE-CONTROL:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-DOWNLOAD-CONTENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-DOWNLOAD-CONTENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-CA-EMM-TS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-EMM-TS:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-CA-CONTRACT-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-CONTRACT-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-CA-SERVICE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CA-SERVICE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-TS-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-TS-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-EXTENDED-BROADCASTER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-EXTENDED-BROADCASTER:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-LOGO-TRANSMISSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-LOGO-TRANSMISSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-BASIC-LOCAL-EVENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BASIC-LOCAL-EVENT:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-REFERENCE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-NODE-RELATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-NODE-RELATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-SHORT-NODE-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SHORT-NODE-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-STC-REFERENCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-STC-REFERENCE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-SERIES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SERIES:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-EVENT-GROUP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-EVENT-GROUP:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-SI-PARAMETER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SI-PARAMETER:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-BROADCASTER-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BROADCASTER-NAME:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-COMPONENT-GROUP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-COMPONENT-GROUP:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-SI-PRIME-TS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SI-PRIME-TS:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-BOARD-INFORMATION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-BOARD-INFORMATION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-LDT-LINKAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-LDT-LINKAGE:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-CONNECTED-TRANSMISSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CONNECTED-TRANSMISSION:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-CONTENT-AVAILABILITY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-CONTENT-AVAILABILITY:CAPS">
+<ANCHOR id="GST-MTS-DESC-ISDB-SERVICE-GROUP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-ISDB-SERVICE-GROUP:CAPS">
 <ANCHOR id="gst-plugins-bad-libs-GstInsertbin" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html">
 <ANCHOR id="gst-plugins-bad-libs-GstInsertbin.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html#gst-plugins-bad-libs-GstInsertbin.functions">
 <ANCHOR id="gst-plugins-bad-libs-GstInsertbin.signals" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html#gst-plugins-bad-libs-GstInsertbin.signals">
@@ -427,6 +1135,7 @@
 <ANCHOR id="gst-aggregator-finish-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-finish-buffer">
 <ANCHOR id="gst-aggregator-set-src-caps" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-set-src-caps">
 <ANCHOR id="gst-aggregator-iterate-sinkpads" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-iterate-sinkpads">
+<ANCHOR id="gst-aggregator-get-latency" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-get-latency">
 <ANCHOR id="gst-plugins-bad-libs-GstAggregator.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#gst-plugins-bad-libs-GstAggregator.other_details">
 <ANCHOR id="GstAggregator" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#GstAggregator">
 <ANCHOR id="GstAggregatorClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html#GstAggregatorClass">
@@ -438,6 +1147,8 @@
 <ANCHOR id="gst-plugins-bad-libs-GstAggregatorPad.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-plugins-bad-libs-GstAggregatorPad.functions_details">
 <ANCHOR id="gst-aggregator-pad-steal-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-steal-buffer">
 <ANCHOR id="gst-aggregator-pad-get-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-get-buffer">
+<ANCHOR id="gst-aggregator-pad-drop-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-drop-buffer">
+<ANCHOR id="gst-aggregator-pad-is-eos" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-is-eos">
 <ANCHOR id="gst-plugins-bad-libs-GstAggregatorPad.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#gst-plugins-bad-libs-GstAggregatorPad.other_details">
 <ANCHOR id="GstAggregatorPad" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad">
 <ANCHOR id="GstAggregatorPadClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPadClass">
@@ -467,7 +1178,20 @@
 <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-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="GST-GL-API-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-NONE:CAPS">
+<ANCHOR id="GST-GL-API-OPENGL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL:CAPS">
+<ANCHOR id="GST-GL-API-OPENGL3:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3:CAPS">
+<ANCHOR id="GST-GL-API-GLES1:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1:CAPS">
+<ANCHOR id="GST-GL-API-GLES2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2:CAPS">
+<ANCHOR id="GST-GL-API-ANY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-ANY:CAPS">
 <ANCHOR id="GstGLPlatform" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform">
+<ANCHOR id="GST-GL-PLATFORM-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-NONE:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-EGL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-EGL:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-GLX:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-GLX:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-WGL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-WGL:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-CGL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-CGL:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-EAGL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-EAGL:CAPS">
+<ANCHOR id="GST-GL-PLATFORM-ANY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-PLATFORM-ANY:CAPS">
 <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">
@@ -490,7 +1214,8 @@
 <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-set-caps" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#gst-gl-color-convert-set-caps">
+<ANCHOR id="gst-gl-color-convert-transform-caps" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#gst-gl-color-convert-transform-caps">
 <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">
@@ -510,6 +1235,7 @@
 <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-destroy" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-destroy">
 <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">
 <ANCHOR id="gst-gl-context-get-proc-address" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-proc-address">
@@ -520,13 +1246,23 @@
 <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-get-current-gl-context" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-current-gl-context">
+<ANCHOR id="gst-gl-context-get-current-gl-api" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-current-gl-api">
 <ANCHOR id="gst-gl-context-get-thread" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-thread">
 <ANCHOR id="gst-gl-context-can-share" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-can-share">
 <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="gst-gl-context-fill-info" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-fill-info">
+<ANCHOR id="gst-gl-context-get-current" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-current">
 <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="GST-GL-CONTEXT-ERROR-FAILED:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-FAILED:CAPS">
+<ANCHOR id="GST-GL-CONTEXT-ERROR-WRONG-CONFIG:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-WRONG-CONFIG:CAPS">
+<ANCHOR id="GST-GL-CONTEXT-ERROR-WRONG-API:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-WRONG-API:CAPS">
+<ANCHOR id="GST-GL-CONTEXT-ERROR-OLD-LIBS:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-OLD-LIBS:CAPS">
+<ANCHOR id="GST-GL-CONTEXT-ERROR-CREATE-CONTEXT:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-CREATE-CONTEXT:CAPS">
+<ANCHOR id="GST-GL-CONTEXT-ERROR-RESOURCE-UNAVAILABLE:CAPS" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GST-GL-CONTEXT-ERROR-RESOURCE-UNAVAILABLE:CAPS">
 <ANCHOR id="GstGLContext-struct" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContext-struct">
 <ANCHOR id="GstGLContext.see-also" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContext.see-also">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextCocoa" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html">
@@ -535,6 +1271,8 @@
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextCocoa.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-plugins-bad-libs-GstGLContextCocoa.description">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextCocoa.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-plugins-bad-libs-GstGLContextCocoa.functions_details">
 <ANCHOR id="gst-gl-context-cocoa-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-new">
+<ANCHOR id="gst-gl-context-cocoa-get-current-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-current-context">
+<ANCHOR id="gst-gl-context-cocoa-get-pixel-format" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-get-pixel-format">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextCocoa.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#gst-plugins-bad-libs-GstGLContextCocoa.other_details">
 <ANCHOR id="GstGLContextCocoa" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextCocoa.html#GstGLContextCocoa">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextEGL" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html">
@@ -543,14 +1281,27 @@
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextEGL.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-plugins-bad-libs-GstGLContextEGL.description">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextEGL.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-plugins-bad-libs-GstGLContextEGL.functions_details">
 <ANCHOR id="gst-gl-context-egl-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-new">
+<ANCHOR id="gst-gl-context-egl-get-current-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-current-context">
+<ANCHOR id="gst-gl-context-egl-get-proc-address" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-gl-context-egl-get-proc-address">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextEGL.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#gst-plugins-bad-libs-GstGLContextEGL.other_details">
 <ANCHOR id="GstGLContextEGL" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEGL.html#GstGLContextEGL">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-plugins-bad-libs-GstGLContextEagl.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-plugins-bad-libs-GstGLContextEagl.other">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-plugins-bad-libs-GstGLContextEagl.description">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-plugins-bad-libs-GstGLContextEagl.functions_details">
+<ANCHOR id="gst-gl-context-eagl-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-new">
+<ANCHOR id="gst-gl-context-eagl-get-current-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-gl-context-eagl-get-current-context">
+<ANCHOR id="gst-plugins-bad-libs-GstGLContextEagl.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#gst-plugins-bad-libs-GstGLContextEagl.other_details">
+<ANCHOR id="GstGLContextEagl" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextEagl.html#GstGLContextEagl">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-plugins-bad-libs-GstGLContextGLX.functions">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-plugins-bad-libs-GstGLContextGLX.other">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-plugins-bad-libs-GstGLContextGLX.description">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-plugins-bad-libs-GstGLContextGLX.functions_details">
 <ANCHOR id="gst-gl-context-glx-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-new">
+<ANCHOR id="gst-gl-context-glx-get-current-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-current-context">
+<ANCHOR id="gst-gl-context-glx-get-proc-address" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-gl-context-glx-get-proc-address">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextGLX.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#gst-plugins-bad-libs-GstGLContextGLX.other_details">
 <ANCHOR id="GstGLContextGLX" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextGLX.html#GstGLContextGLX">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextWGL" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html">
@@ -559,22 +1310,40 @@
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextWGL.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-plugins-bad-libs-GstGLContextWGL.description">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextWGL.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-plugins-bad-libs-GstGLContextWGL.functions_details">
 <ANCHOR id="gst-gl-context-wgl-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-new">
+<ANCHOR id="gst-gl-context-wgl-get-current-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-current-context">
+<ANCHOR id="gst-gl-context-wgl-get-proc-address" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-gl-context-wgl-get-proc-address">
 <ANCHOR id="gst-plugins-bad-libs-GstGLContextWGL.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#gst-plugins-bad-libs-GstGLContextWGL.other_details">
 <ANCHOR id="GstGLContextWGL" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLContextWGL.html#GstGLContextWGL">
 <ANCHOR id="GstGLDisplay" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html">
 <ANCHOR id="GstGLDisplay.functions" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.functions">
+<ANCHOR id="GstGLDisplay.signals" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.signals">
 <ANCHOR id="GstGLDisplay.other" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.other">
 <ANCHOR id="GstGLDisplay.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.object-hierarchy">
 <ANCHOR id="GstGLDisplay.description" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.description">
 <ANCHOR id="GstGLDisplay.functions_details" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.functions_details">
 <ANCHOR id="gst-gl-display-new" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-new">
 <ANCHOR id="gst-gl-display-get-handle-type" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-get-handle-type">
+<ANCHOR id="gst-gl-display-filter-gl-api" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-filter-gl-api">
+<ANCHOR id="gst-gl-display-get-gl-api" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-get-gl-api">
+<ANCHOR id="gst-gl-display-add-context" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-add-context">
+<ANCHOR id="gst-gl-display-get-gl-context-for-thread" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-get-gl-context-for-thread">
+<ANCHOR id="gst-gl-display-get-handle" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-gl-display-get-handle">
 <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="GST-GL-DISPLAY-TYPE-NONE:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-NONE:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-X11:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-X11:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-WAYLAND:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-WAYLAND:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-COCOA:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-COCOA:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-WIN32:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-WIN32:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-DISPMANX:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-DISPMANX:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-EGL:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-EGL:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-TYPE-ANY:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-TYPE-ANY:CAPS">
 <ANCHOR id="GstGLDisplay-struct" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay-struct">
+<ANCHOR id="GstGLDisplay.signal-details" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.signal-details">
+<ANCHOR id="GstGLDisplay-create-context" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay-create-context">
 <ANCHOR id="GstGLDisplay.see-also" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.see-also">
 <ANCHOR id="GstGLDownload" href="gst-plugins-bad-libs-1.0/GstGLDownload.html">
 <ANCHOR id="GstGLDownload.functions" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#GstGLDownload.functions">
@@ -584,6 +1353,7 @@
 <ANCHOR id="GstGLDownload.functions_details" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#GstGLDownload.functions_details">
 <ANCHOR id="gst-gl-download-new" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#gst-gl-download-new">
 <ANCHOR id="gst-gl-download-set-format" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#gst-gl-download-set-format">
+<ANCHOR id="gst-gl-download-transform-caps" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#gst-gl-download-transform-caps">
 <ANCHOR id="gst-gl-download-perform-with-data" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#gst-gl-download-perform-with-data">
 <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">
@@ -603,9 +1373,19 @@
 <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="GstGLBaseFilter" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html">
+<ANCHOR id="GstGLBaseFilter.properties" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.properties">
+<ANCHOR id="GstGLBaseFilter.other" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.other">
+<ANCHOR id="GstGLBaseFilter.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.object-hierarchy">
+<ANCHOR id="GstGLBaseFilter.description" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.description">
+<ANCHOR id="GstGLBaseFilter.functions_details" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.functions_details">
+<ANCHOR id="GstGLBaseFilter.other_details" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.other_details">
+<ANCHOR id="GstGLBaseFilter-struct" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter-struct">
+<ANCHOR id="GstGLBaseFilterClass" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilterClass">
+<ANCHOR id="GstGLBaseFilter.property-details" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter.property-details">
+<ANCHOR id="GstGLBaseFilter--context" href="gst-plugins-bad-libs-1.0/GstGLBaseFilter.html#GstGLBaseFilter--context">
 <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">
 <ANCHOR id="GstGLFilter.other" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.other">
 <ANCHOR id="GstGLFilter.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.object-hierarchy">
 <ANCHOR id="GstGLFilter.description" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.description">
@@ -617,21 +1397,19 @@
 <ANCHOR id="GstGLFilter.other_details" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.other_details">
 <ANCHOR id="GstGLFilter-struct" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter-struct">
 <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.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="GstGLFramebuffer" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html">
+<ANCHOR id="GstGLFramebuffer.functions" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.functions">
+<ANCHOR id="GstGLFramebuffer.other" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.other">
+<ANCHOR id="GstGLFramebuffer.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.object-hierarchy">
+<ANCHOR id="GstGLFramebuffer.description" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.description">
+<ANCHOR id="GstGLFramebuffer.functions_details" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.functions_details">
+<ANCHOR id="gst-gl-framebuffer-new" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#gst-gl-framebuffer-new">
+<ANCHOR id="gst-gl-framebuffer-generate" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#gst-gl-framebuffer-generate">
+<ANCHOR id="gst-gl-framebuffer-delete" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#gst-gl-framebuffer-delete">
+<ANCHOR id="gst-gl-framebuffer-use-v2" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#gst-gl-framebuffer-use-v2">
+<ANCHOR id="GstGLFramebuffer.other_details" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer.other_details">
+<ANCHOR id="GstGLFramebuffer-struct" href="gst-plugins-bad-libs-1.0/GstGLFramebuffer.html#GstGLFramebuffer-struct">
+<ANCHOR id="GstGLFramebufferClass" href="gst-plugins-bad-libs-1.0/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">
@@ -639,10 +1417,6 @@
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.object-hierarchy">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.description">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.functions_details">
-<ANCHOR id="GST-GL-MEMORY-FLAGS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAGS:CAPS">
-<ANCHOR id="GST-GL-MEMORY-FLAG-IS-SET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-IS-SET:CAPS">
-<ANCHOR id="GST-GL-MEMORY-FLAG-SET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-SET:CAPS">
-<ANCHOR id="GST-GL-MEMORY-FLAG-UNSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-UNSET:CAPS">
 <ANCHOR id="gst-gl-memory-init" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-init">
 <ANCHOR id="gst-gl-memory-alloc" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-alloc">
 <ANCHOR id="gst-gl-memory-wrapped" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-wrapped">
@@ -655,9 +1429,7 @@
 <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">
 <ANCHOR id="GstGLAllocatorClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GstGLAllocatorClass">
-<ANCHOR id="GST-MAP-GL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-MAP-GL:CAPS">
 <ANCHOR id="GST-GL-MEMORY-ALLOCATOR:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-ALLOCATOR:CAPS">
-<ANCHOR id="GstGLMemoryFlags" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GstGLMemoryFlags">
 <ANCHOR id="GstGLMemory" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GstGLMemory">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.see-also" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.see-also">
 <ANCHOR id="gst-plugins-bad-libs-gstglshader" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html">
@@ -677,6 +1449,7 @@
 <ANCHOR id="gst-gl-shader-set-fragment-source" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-fragment-source">
 <ANCHOR id="gst-gl-shader-get-vertex-source" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-vertex-source">
 <ANCHOR id="gst-gl-shader-get-fragment-source" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-fragment-source">
+<ANCHOR id="gst-gl-shader-get-program-handle" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-get-program-handle">
 <ANCHOR id="gst-gl-shader-set-active" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-active">
 <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">
@@ -716,7 +1489,12 @@
 <ANCHOR id="gst-gl-shader-bind-attribute-location" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-bind-attribute-location">
 <ANCHOR id="gst-plugins-bad-libs-gstglshader.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-plugins-bad-libs-gstglshader.other_details">
 <ANCHOR id="GstGLShaderError" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShaderError">
+<ANCHOR id="GST-GL-SHADER-ERROR-COMPILE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-COMPILE:CAPS">
+<ANCHOR id="GST-GL-SHADER-ERROR-LINK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-LINK:CAPS">
+<ANCHOR id="GST-GL-SHADER-ERROR-PROGRAM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR-PROGRAM:CAPS">
 <ANCHOR id="GstGLShaderSourceType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShaderSourceType">
+<ANCHOR id="GST-GL-SHADER-FRAGMENT-SOURCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-FRAGMENT-SOURCE:CAPS">
+<ANCHOR id="GST-GL-SHADER-VERTEX-SOURCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-VERTEX-SOURCE:CAPS">
 <ANCHOR id="gst-gl-shadervariable-desc" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shadervariable-desc">
 <ANCHOR id="GstGLShader-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShader-struct">
 <ANCHOR id="gst-plugins-bad-libs-gstglshader.property-details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-plugins-bad-libs-gstglshader.property-details">
@@ -724,6 +1502,20 @@
 <ANCHOR id="GstGLShader--compiled" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShader--compiled">
 <ANCHOR id="GstGLShader--fragment-src" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShader--fragment-src">
 <ANCHOR id="GstGLShader--vertex-src" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#GstGLShader--vertex-src">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-plugins-bad-libs-GstGLSyncMeta.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-plugins-bad-libs-GstGLSyncMeta.other">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-plugins-bad-libs-GstGLSyncMeta.description">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-plugins-bad-libs-GstGLSyncMeta.functions_details">
+<ANCHOR id="gst-buffer-add-gl-sync-meta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-add-gl-sync-meta">
+<ANCHOR id="gst-buffer-get-gl-sync-meta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-buffer-get-gl-sync-meta">
+<ANCHOR id="gst-gl-sync-meta-api-get-type" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-api-get-type">
+<ANCHOR id="gst-gl-sync-meta-get-info" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-get-info">
+<ANCHOR id="gst-gl-sync-meta-set-sync-point" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-set-sync-point">
+<ANCHOR id="gst-gl-sync-meta-wait" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-gl-sync-meta-wait">
+<ANCHOR id="gst-plugins-bad-libs-GstGLSyncMeta.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#gst-plugins-bad-libs-GstGLSyncMeta.other_details">
+<ANCHOR id="GstGLSyncMeta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#GstGLSyncMeta">
+<ANCHOR id="GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLSyncMeta.html#GST-BUFFER-POOL-OPTION-GL-SYNC-META:CAPS">
 <ANCHOR id="GstGLUpload" href="gst-plugins-bad-libs-1.0/GstGLUpload.html">
 <ANCHOR id="GstGLUpload.functions" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.functions">
 <ANCHOR id="GstGLUpload.other" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.other">
@@ -731,27 +1523,28 @@
 <ANCHOR id="GstGLUpload.description" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.description">
 <ANCHOR id="GstGLUpload.functions_details" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.functions_details">
 <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-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-get-caps" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-get-caps">
+<ANCHOR id="gst-gl-upload-set-caps" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-set-caps">
+<ANCHOR id="gst-gl-upload-propose-allocation" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-propose-allocation">
+<ANCHOR id="gst-gl-upload-transform-caps" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-transform-caps">
 <ANCHOR id="gst-gl-upload-perform-with-buffer" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-perform-with-buffer">
 <ANCHOR id="gst-gl-upload-release-buffer" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-release-buffer">
 <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.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="GstGLUploadMeta" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html">
+<ANCHOR id="GstGLUploadMeta.functions" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.functions">
+<ANCHOR id="GstGLUploadMeta.other" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.other">
+<ANCHOR id="GstGLUploadMeta.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.object-hierarchy">
+<ANCHOR id="GstGLUploadMeta.description" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.description">
+<ANCHOR id="GstGLUploadMeta.functions_details" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.functions_details">
+<ANCHOR id="gst-gl-upload-meta-new" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#gst-gl-upload-meta-new">
+<ANCHOR id="gst-gl-upload-meta-set-format" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#gst-gl-upload-meta-set-format">
+<ANCHOR id="gst-gl-upload-meta-get-format" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#gst-gl-upload-meta-get-format">
+<ANCHOR id="gst-gl-upload-meta-add-to-buffer" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer">
+<ANCHOR id="GstGLUploadMeta.other_details" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta.other_details">
+<ANCHOR id="GstGLUploadMeta-struct" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#GstGLUploadMeta-struct">
+<ANCHOR id="GstGLUploadMeta.see-also" href="gst-plugins-bad-libs-1.0/GstGLUploadMeta.html#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">
@@ -760,14 +1553,12 @@
 <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="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">
 <ANCHOR id="gst-gl-handle-context-query" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-handle-context-query">
 <ANCHOR id="gst-gl-context-gen-texture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-texture">
 <ANCHOR id="gst-gl-context-del-texture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-texture">
 <ANCHOR id="gst-gl-context-gen-fbo" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-fbo">
 <ANCHOR id="gst-gl-context-del-fbo" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-fbo">
-<ANCHOR id="gst-gl-context-use-fbo" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo">
 <ANCHOR id="gst-gl-context-use-fbo-v2" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-use-fbo-v2">
 <ANCHOR id="gst-gl-context-gen-shader" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-gen-shader">
 <ANCHOR id="gst-gl-context-del-shader" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-del-shader">
@@ -776,10 +1567,17 @@
 <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-gl-caps-replace-all-caps-features" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-caps-replace-all-caps-features">
+<ANCHOR id="gst-gl-ensure-element-data" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-element-data">
+<ANCHOR id="gst-gl-get-plane-data-size" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-get-plane-data-size">
+<ANCHOR id="gst-gl-run-query" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-run-query">
 <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="GST-GL-DISPLAY-PROJECTION-ORTHO2D:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#GST-GL-DISPLAY-PROJECTION-ORTHO2D:CAPS">
+<ANCHOR id="GST-GL-DISPLAY-PROJECTION-PERSPECTIVE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#GST-GL-DISPLAY-PROJECTION-PERSPECTIVE:CAPS">
 <ANCHOR id="GstGLWindow" href="gst-plugins-bad-libs-1.0/GstGLWindow.html">
 <ANCHOR id="GstGLWindow.functions" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.functions">
+<ANCHOR id="GstGLWindow.signals" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.signals">
 <ANCHOR id="GstGLWindow.other" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.other">
 <ANCHOR id="GstGLWindow.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.object-hierarchy">
 <ANCHOR id="GstGLWindow.description" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.description">
@@ -805,10 +1603,20 @@
 <ANCHOR id="gst-gl-window-set-resize-callback" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-set-resize-callback">
 <ANCHOR id="gst-gl-window-set-window-handle" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-set-window-handle">
 <ANCHOR id="gst-gl-window-get-window-handle" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-get-window-handle">
+<ANCHOR id="gst-gl-window-set-preferred-size" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-set-preferred-size">
+<ANCHOR id="gst-gl-window-show" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-show">
+<ANCHOR id="gst-gl-window-get-surface-dimensions" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-get-surface-dimensions">
+<ANCHOR id="gst-gl-window-handle-events" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#gst-gl-window-handle-events">
 <ANCHOR id="GstGLWindow.other_details" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.other_details">
 <ANCHOR id="GstGLWindowError" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindowError">
+<ANCHOR id="GST-GL-WINDOW-ERROR-FAILED:CAPS" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GST-GL-WINDOW-ERROR-FAILED:CAPS">
+<ANCHOR id="GST-GL-WINDOW-ERROR-OLD-LIBS:CAPS" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GST-GL-WINDOW-ERROR-OLD-LIBS:CAPS">
+<ANCHOR id="GST-GL-WINDOW-ERROR-RESOURCE-UNAVAILABLE:CAPS" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GST-GL-WINDOW-ERROR-RESOURCE-UNAVAILABLE:CAPS">
 <ANCHOR id="GstGLWindow-struct" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow-struct">
 <ANCHOR id="GstGLWindowClass" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindowClass">
+<ANCHOR id="GstGLWindow.signal-details" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.signal-details">
+<ANCHOR id="GstGLWindow-key-event" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow-key-event">
+<ANCHOR id="GstGLWindow-mouse-event" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow-mouse-event">
 <ANCHOR id="GstGLWindow.see-also" href="gst-plugins-bad-libs-1.0/GstGLWindow.html#GstGLWindow.see-also">
 <ANCHOR id="gst-plugins-bad-libs-GstGLWindowAndroid" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLWindowAndroid.html">
 <ANCHOR id="gst-plugins-bad-libs-GstGLWindowAndroid.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLWindowAndroid.html#gst-plugins-bad-libs-GstGLWindowAndroid.functions">
@@ -869,12 +1677,167 @@
 <ANCHOR id="gst-plugins-bad-libs-GstGLWindowX11.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLWindowX11.html#gst-plugins-bad-libs-GstGLWindowX11.other_details">
 <ANCHOR id="GstGLWindowX11" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLWindowX11.html#GstGLWindowX11">
 <ANCHOR id="GstGLWindowX11Class" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLWindowX11.html#GstGLWindowX11Class">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.stability-level" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.stability-level">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.other">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.description">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.functions_details">
+<ANCHOR id="GstPhotographyCapturePrepared" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCapturePrepared">
+<ANCHOR id="gst-photography-get-ev-compensation" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-ev-compensation">
+<ANCHOR id="gst-photography-get-iso-speed" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-iso-speed">
+<ANCHOR id="gst-photography-get-aperture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-aperture">
+<ANCHOR id="gst-photography-get-exposure" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-exposure">
+<ANCHOR id="gst-photography-get-white-balance-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-white-balance-mode">
+<ANCHOR id="gst-photography-get-color-tone-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-color-tone-mode">
+<ANCHOR id="gst-photography-get-scene-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-scene-mode">
+<ANCHOR id="gst-photography-get-flash-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flash-mode">
+<ANCHOR id="gst-photography-get-flicker-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-flicker-mode">
+<ANCHOR id="gst-photography-get-focus-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-focus-mode">
+<ANCHOR id="gst-photography-get-noise-reduction" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-noise-reduction">
+<ANCHOR id="gst-photography-get-zoom" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-zoom">
+<ANCHOR id="gst-photography-set-ev-compensation" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-ev-compensation">
+<ANCHOR id="gst-photography-set-iso-speed" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-iso-speed">
+<ANCHOR id="gst-photography-set-aperture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-aperture">
+<ANCHOR id="gst-photography-set-exposure" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-exposure">
+<ANCHOR id="gst-photography-set-white-balance-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-white-balance-mode">
+<ANCHOR id="gst-photography-set-color-tone-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-color-tone-mode">
+<ANCHOR id="gst-photography-set-scene-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-scene-mode">
+<ANCHOR id="gst-photography-set-flash-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flash-mode">
+<ANCHOR id="gst-photography-set-flicker-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-flicker-mode">
+<ANCHOR id="gst-photography-set-focus-mode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-focus-mode">
+<ANCHOR id="gst-photography-set-noise-reduction" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-noise-reduction">
+<ANCHOR id="gst-photography-set-zoom" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-zoom">
+<ANCHOR id="gst-photography-get-capabilities" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-capabilities">
+<ANCHOR id="gst-photography-prepare-for-capture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-prepare-for-capture">
+<ANCHOR id="gst-photography-set-autofocus" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-autofocus">
+<ANCHOR id="gst-photography-set-config" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-set-config">
+<ANCHOR id="gst-photography-get-config" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-photography-get-config">
+<ANCHOR id="gst-plugins-bad-libs-GstPhotography.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#gst-plugins-bad-libs-GstPhotography.other_details">
+<ANCHOR id="GstPhotography" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotography">
+<ANCHOR id="GstPhotographyNoiseReduction" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyNoiseReduction">
+<ANCHOR id="GST-PHOTOGRAPHY-NOISE-REDUCTION-BAYER:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-BAYER:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-NOISE-REDUCTION-YCC:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-YCC:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-NOISE-REDUCTION-TEMPORAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-TEMPORAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-NOISE-REDUCTION-FIXED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-FIXED:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-NOISE-REDUCTION-EXTRA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-NOISE-REDUCTION-EXTRA:CAPS">
+<ANCHOR id="GstPhotographyWhiteBalanceMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyWhiteBalanceMode">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-AUTO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-DAYLIGHT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-DAYLIGHT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-CLOUDY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-CLOUDY:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-SUNSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-SUNSET:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-TUNGSTEN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-TUNGSTEN:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-FLUORESCENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-FLUORESCENT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-MANUAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-MANUAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-WARM-FLUORESCENT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-WARM-FLUORESCENT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-WB-MODE-SHADE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-WB-MODE-SHADE:CAPS">
+<ANCHOR id="GstPhotographyColorToneMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyColorToneMode">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NORMAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NORMAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SEPIA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SEPIA:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NEGATIVE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NEGATIVE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRAYSCALE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRAYSCALE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NATURAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-NATURAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-VIVID:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-VIVID:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-COLORSWAP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-COLORSWAP:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SOLARIZE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SOLARIZE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-OUT-OF-FOCUS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-OUT-OF-FOCUS:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKY-BLUE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKY-BLUE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRASS-GREEN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRASS-GREEN:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKIN-WHITEN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKIN-WHITEN:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-POSTERIZE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-POSTERIZE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-WHITEBOARD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-WHITEBOARD:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-BLACKBOARD:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-BLACKBOARD:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-COLOR-TONE-MODE-AQUA:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-COLOR-TONE-MODE-AQUA:CAPS">
+<ANCHOR id="GstPhotographySceneMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographySceneMode">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-MANUAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-MANUAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-CLOSEUP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-CLOSEUP:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-PORTRAIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-PORTRAIT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-LANDSCAPE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-LANDSCAPE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-SPORT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SPORT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-NIGHT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-AUTO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-ACTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-ACTION:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT-PORTRAIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-NIGHT-PORTRAIT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-THEATRE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-THEATRE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-BEACH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-BEACH:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-SNOW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SNOW:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-SUNSET:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-SUNSET:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-STEADY-PHOTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-STEADY-PHOTO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-FIREWORKS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-FIREWORKS:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-PARTY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-PARTY:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-CANDLELIGHT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-CANDLELIGHT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SCENE-MODE-BARCODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SCENE-MODE-BARCODE:CAPS">
+<ANCHOR id="GstPhotographyFlashMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlashMode">
+<ANCHOR id="GST-PHOTOGRAPHY-FLASH-MODE-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-AUTO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLASH-MODE-OFF:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-OFF:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLASH-MODE-ON:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-ON:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLASH-MODE-FILL-IN:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-FILL-IN:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLASH-MODE-RED-EYE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLASH-MODE-RED-EYE:CAPS">
+<ANCHOR id="GstPhotographyFlickerReductionMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFlickerReductionMode">
+<ANCHOR id="GST-PHOTOGRAPHY-FLICKER-REDUCTION-OFF:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-OFF:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLICKER-REDUCTION-50HZ:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-50HZ:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLICKER-REDUCTION-60HZ:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-60HZ:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FLICKER-REDUCTION-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FLICKER-REDUCTION-AUTO:CAPS">
+<ANCHOR id="GstPhotographyFocusMode" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusMode">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-AUTO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-AUTO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-MACRO:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-MACRO:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-PORTRAIT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-PORTRAIT:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-INFINITY:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-INFINITY:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-HYPERFOCAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-HYPERFOCAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-EXTENDED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-EXTENDED:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-NORMAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-NORMAL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-EXTENDED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-EXTENDED:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-MODE-MANUAL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-MODE-MANUAL:CAPS">
+<ANCHOR id="GstPhotographyFocusStatus" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyFocusStatus">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-STATUS-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-NONE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-STATUS-RUNNING:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-RUNNING:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-STATUS-FAIL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-FAIL:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-FOCUS-STATUS-SUCCESS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-FOCUS-STATUS-SUCCESS:CAPS">
+<ANCHOR id="GstPhotographyCaps" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyCaps">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-NONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-NONE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-EV-COMP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-EV-COMP:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-ISO-SPEED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ISO-SPEED:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-WB-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-WB-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-TONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-TONE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-SCENE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-SCENE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-FLASH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FLASH:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-ZOOM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ZOOM:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-FOCUS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FOCUS:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-APERTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-APERTURE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-EXPOSURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-EXPOSURE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-SHAKE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-SHAKE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-WHITE-BALANCE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-WHITE-BALANCE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-NOISE-REDUCTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-NOISE-REDUCTION:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-FLICKER-REDUCTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-FLICKER-REDUCTION:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-CAPS-ALL:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-CAPS-ALL:CAPS">
+<ANCHOR id="GstPhotographyShakeRisk" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GstPhotographyShakeRisk">
+<ANCHOR id="GST-PHOTOGRAPHY-SHAKE-RISK-LOW:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-LOW:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SHAKE-RISK-MEDIUM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-MEDIUM:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SHAKE-RISK-HIGH:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK-HIGH:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-WB-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SCENE-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLASH-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-NOISE-REDUCTION:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-STATUS:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-CAPABILITIES:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-SHAKE-RISK:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-EV-COMP:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ISO-SPEED:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-APERTURE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-APERTURE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-CAPTURE-SUPPORTED-CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-IMAGE-PREVIEW-SUPPORTED-CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FLICKER-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-FOCUS-MODE:CAPS">
+<ANCHOR id="GST-PHOTOGRAPHY-PROP-ZOOM:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstPhotography.html#GST-PHOTOGRAPHY-PROP-ZOOM:CAPS">
 <ANCHOR id="annotation-glossterm-allow-none" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-allow-none">
 <ANCHOR id="annotation-glossterm-closure" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-closure">
 <ANCHOR id="annotation-glossterm-destroy" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-destroy">
 <ANCHOR id="annotation-glossterm-element-type" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-element-type">
 <ANCHOR id="annotation-glossterm-out" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-out">
 <ANCHOR id="annotation-glossterm-scope async" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-scope async">
+<ANCHOR id="annotation-glossterm-scope call" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-scope call">
 <ANCHOR id="annotation-glossterm-scope notified" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-scope notified">
 <ANCHOR id="annotation-glossterm-transfer container" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-transfer container">
 <ANCHOR id="annotation-glossterm-transfer full" href="gst-plugins-bad-libs-1.0/annotation-glossary.html#annotation-glossterm-transfer full">
diff --git a/docs/libs/html/mpegts.html b/docs/libs/html/mpegts.html
index e4e8b9e..27dce1b 100644
--- a/docs/libs/html/mpegts.html
+++ b/docs/libs/html/mpegts.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Mpeg TS helper library</title>
+<title>Mpeg TS helper library: GStreamer Bad Plugins 1.0 Library Reference Manual</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-gstmpegvideometa.html" title="gstmpegvideometa">
 <link rel="next" href="gst-plugins-bad-libs-Mpeg-ts-helper-library.html" title="Mpeg-ts helper library">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -55,7 +55,6 @@
       </p>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/style.css b/docs/libs/html/style.css
index c141ddd..3675420 100644
--- a/docs/libs/html/style.css
+++ b/docs/libs/html/style.css
@@ -60,7 +60,7 @@
 div.informaltable table
 {
   border-collapse: separate;
-  border-spacing: 1em 0.5em;
+  border-spacing: 1em 0.3em;
   border: none;
 }
 
@@ -148,6 +148,8 @@
 h4
 {
   color: #555753;
+  margin-top: 1em;
+  margin-bottom: 1em;
 }
 
 hr
@@ -166,17 +168,16 @@
   padding-bottom: 0.25em;
 }
 
-dl.toc > dd > dl > dt
+dl.toc > dt
 {
   padding-top: 0.25em;
   padding-bottom: 0.25em;
+  font-weight: bold;
 }
 
-dl.toc > dt
+dl.toc > dl
 {
-  padding-top: 1em;
   padding-bottom: 0.5em;
-  font-weight: bold;
 }
 
 .parameter
@@ -346,7 +347,9 @@
 }
 
 @media screen {
-  sup a.footnote
+  /* these have a <sup> as a first child, but since there are no parent selectors
+   * we can't use that. */
+  a.footnote
   {
     position: relative;
     top: 0em ! important;
diff --git a/docs/libs/html/tools.html b/docs/libs/html/tools.html
index 6e05b4f..7e5a3d0 100644
--- a/docs/libs/html/tools.html
+++ b/docs/libs/html/tools.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Useful elements</title>
+<title>Useful elements: GStreamer Bad Plugins 1.0 Library Reference Manual</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-ISDB-variants-of-MPEG-TS-descriptors.html" title="ISDB variants of MPEG-TS descriptors">
 <link rel="next" href="gst-plugins-bad-libs-GstInsertbin.html" title="GstInsertbin">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -23,11 +23,10 @@
 <div class="titlepage"><div><div><h2 class="title">
 <a name="tools"></a>Useful elements</h2></div></div></div>
 <div class="toc"><dl class="toc"><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>
+<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></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/libs/html/video.html b/docs/libs/html/video.html
index 64766b6..d10d709 100644
--- a/docs/libs/html/video.html
+++ b/docs/libs/html/video.html
@@ -2,13 +2,13 @@
 <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>
+<title>Video helpers and baseclasses: GStreamer Bad Plugins 1.0 Library Reference Manual</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-GstAggregatorPad.html" title="GstAggregatorPad">
 <link rel="next" href="gst-plugins-bad-libs-GstVideoAggregator.html" title="GstVideoAggregator">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -32,7 +32,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am
index b093bcf..c431f78 100644
--- a/docs/plugins/Makefile.am
+++ b/docs/plugins/Makefile.am
@@ -85,7 +85,6 @@
 	$(top_srcdir)/ext/modplug/gstmodplug.h \
 	$(top_srcdir)/ext/mpeg2enc/gstmpeg2enc.hh \
 	$(top_srcdir)/ext/mplex/gstmplex.hh \
-	$(top_srcdir)/ext/mythtv/gstmythtvsrc.h \
 	$(top_srcdir)/ext/opencv/gstcvdilate.h \
 	$(top_srcdir)/ext/opencv/gstcverode.h \
 	$(top_srcdir)/ext/opencv/gstcvequalizehist.h \
@@ -163,11 +162,9 @@
 	$(top_srcdir)/gst/speed/gstspeed.h \
 	$(top_srcdir)/gst/stereo/gststereo.h \
 	$(top_srcdir)/gst/videosignal/gstvideoanalyse.h \
-	$(top_srcdir)/sys/directdraw/gstdirectdrawsink.h \
 	$(top_srcdir)/sys/dvb/gstdvbsrc.h \
 	$(top_srcdir)/sys/shm/gstshmsink.h \
-	$(top_srcdir)/sys/shm/gstshmsrc.h \
-	$(top_srcdir)/gst-libs/gst/interfaces/photography.h
+	$(top_srcdir)/sys/shm/gstshmsrc.h
 
 # Images to copy into HTML directory.
 HTML_IMAGES = camerabin.png
@@ -182,12 +179,8 @@
 # contains GtkObjects/GObjects and you want to document signals and properties.
 GTKDOC_CFLAGS = -DGST_USE_UNSTABLE_API $(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) -I$(top_builddir)
 GTKDOC_LIBS = \
-	$(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
 	$(GST_BASE_LIBS)
 
-GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC)
-
 # If you need to override some of the declarations, place them in this file
 # and uncomment this line.
 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
diff --git a/docs/plugins/Makefile.in b/docs/plugins/Makefile.in
index 7650a64..ca3942a 100644
--- a/docs/plugins/Makefile.in
+++ b/docs/plugins/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,17 @@
 # This is an include file specifically tuned for building documentation
 # for GStreamer plug-ins
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -95,9 +105,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/upload-doc.mak \
-	$(top_srcdir)/common/gtk-doc-plugins.mak $(srcdir)/Makefile.in \
-	$(srcdir)/Makefile.am
 subdir = docs/plugins
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -106,6 +113,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -119,7 +127,6 @@
 	$(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 \
@@ -136,6 +143,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -195,6 +203,9 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gtk-doc-plugins.mak \
+	$(top_srcdir)/common/upload-doc.mak
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -237,8 +248,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -263,8 +276,6 @@
 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@
@@ -277,7 +288,6 @@
 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@
@@ -285,6 +295,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -311,11 +323,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -334,8 +349,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -394,10 +407,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -414,7 +431,6 @@
 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@
@@ -423,7 +439,6 @@
 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@
@@ -436,7 +451,6 @@
 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@
@@ -450,6 +464,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -461,6 +476,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -499,6 +516,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -534,10 +552,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -563,6 +585,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -570,7 +595,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -599,6 +631,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -609,6 +642,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -639,17 +673,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -666,6 +699,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -704,6 +738,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -808,7 +843,6 @@
 	$(top_srcdir)/ext/modplug/gstmodplug.h \
 	$(top_srcdir)/ext/mpeg2enc/gstmpeg2enc.hh \
 	$(top_srcdir)/ext/mplex/gstmplex.hh \
-	$(top_srcdir)/ext/mythtv/gstmythtvsrc.h \
 	$(top_srcdir)/ext/opencv/gstcvdilate.h \
 	$(top_srcdir)/ext/opencv/gstcverode.h \
 	$(top_srcdir)/ext/opencv/gstcvequalizehist.h \
@@ -886,11 +920,9 @@
 	$(top_srcdir)/gst/speed/gstspeed.h \
 	$(top_srcdir)/gst/stereo/gststereo.h \
 	$(top_srcdir)/gst/videosignal/gstvideoanalyse.h \
-	$(top_srcdir)/sys/directdraw/gstdirectdrawsink.h \
 	$(top_srcdir)/sys/dvb/gstdvbsrc.h \
 	$(top_srcdir)/sys/shm/gstshmsink.h \
-	$(top_srcdir)/sys/shm/gstshmsrc.h \
-	$(top_srcdir)/gst-libs/gst/interfaces/photography.h
+	$(top_srcdir)/sys/shm/gstshmsrc.h
 
 
 # Images to copy into HTML directory.
@@ -906,16 +938,19 @@
 # contains GtkObjects/GObjects and you want to document signals and properties.
 GTKDOC_CFLAGS = -DGST_USE_UNSTABLE_API $(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) -I$(top_builddir)
 GTKDOC_LIBS = \
-	$(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
 	$(GST_BASE_LIBS)
 
-GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC)
-GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC)
 
 # If you need to override some of the declarations, place them in this file
 # and uncomment this line.
 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
 DOC_OVERRIDES = 
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = 
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute
 
 # We set GPATH here; this gives us semantics for GNU make
 # which are more like other make's VPATH, when it comes to
@@ -938,11 +973,9 @@
 # maintainers and result is commited to git
 DOC_STAMPS = \
 	scan-build.stamp		\
-	tmpl-build.stamp		\
 	sgml-build.stamp		\
 	html-build.stamp		\
 	scan.stamp			\
-	tmpl.stamp			\
 	sgml.stamp			\
 	html.stamp
 
@@ -1015,7 +1048,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/plugins/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu docs/plugins/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1024,7 +1056,7 @@
 	    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/upload-doc.mak $(top_srcdir)/common/gtk-doc-plugins.mak:
+$(top_srcdir)/common/upload-doc.mak $(top_srcdir)/common/gtk-doc-plugins.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1317,6 +1349,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 html: html-build.stamp
 
 upload: $(FORMATS)
@@ -1404,7 +1438,7 @@
 @ENABLE_GTK_DOC_TRUE@	    scanobj_options="--verbose"; \
 @ENABLE_GTK_DOC_TRUE@	fi; \
 @ENABLE_GTK_DOC_TRUE@	$(INSPECT_ENVIRONMENT) 					\
-@ENABLE_GTK_DOC_TRUE@	CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)"				\
+@ENABLE_GTK_DOC_TRUE@	CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)"	\
 @ENABLE_GTK_DOC_TRUE@	CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)"	\
 @ENABLE_GTK_DOC_TRUE@	LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)"				\
 @ENABLE_GTK_DOC_TRUE@	$(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)"	\
@@ -1443,29 +1477,9 @@
 @ENABLE_GTK_DOC_TRUE@	    --ignore-headers="$(IGNORE_HFILES)";			\
 @ENABLE_GTK_DOC_TRUE@	touch scan-build.stamp
 
-#### update templates; done on every build ####
-
-# in a non-srcdir build, we need to copy files from the previous step
-# and the files from previous runs of this step
-@ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
-@ENABLE_GTK_DOC_TRUE@	@echo '  DOC   Rebuilding template files'
-@ENABLE_GTK_DOC_TRUE@	@if test x"$(srcdir)" != x. ; then				\
-@ENABLE_GTK_DOC_TRUE@	    for f in $(SCANOBJ_FILES) $(SCAN_FILES);			\
-@ENABLE_GTK_DOC_TRUE@	    do								\
-@ENABLE_GTK_DOC_TRUE@	        if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi;	\
-@ENABLE_GTK_DOC_TRUE@	    done;							\
-@ENABLE_GTK_DOC_TRUE@	fi
-@ENABLE_GTK_DOC_TRUE@	@gtkdoc-mktmpl --module=$(DOC_MODULE)
-@ENABLE_GTK_DOC_TRUE@	@$(PYTHON) \
-@ENABLE_GTK_DOC_TRUE@		$(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
-@ENABLE_GTK_DOC_TRUE@	@touch tmpl-build.stamp
-
-@ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp
-@ENABLE_GTK_DOC_TRUE@	@true
-
 #### xml ####
 
-@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
+@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
 @ENABLE_GTK_DOC_TRUE@	@echo '  DOC   Building XML'
 @ENABLE_GTK_DOC_TRUE@	@-mkdir -p xml
 @ENABLE_GTK_DOC_TRUE@	@for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \
@@ -1481,6 +1495,7 @@
 @ENABLE_GTK_DOC_TRUE@		--output-format=xml \
 @ENABLE_GTK_DOC_TRUE@		--ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \
 @ENABLE_GTK_DOC_TRUE@		$(MKDB_OPTIONS)
+@ENABLE_GTK_DOC_TRUE@	@$(PYTHON) $(top_srcdir)/common/mangle-db.py xml
 @ENABLE_GTK_DOC_TRUE@	@cp ../version.entities xml
 @ENABLE_GTK_DOC_TRUE@	@touch sgml-build.stamp
 
diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml
index 2ef5941..51278e9 100644
--- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml
+++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml
@@ -18,8 +18,12 @@
   <chapter>
     <title>gst-plugins-bad Elements</title>
     <xi:include href="xml/element-accurip.xml" />
+    <xi:include href="xml/element-aiffparse.xml" />
+    <xi:include href="xml/element-aiffmux.xml" />
     <xi:include href="xml/element-assrender.xml" />
+    <xi:include href="xml/element-audiomixer.xml" />
     <xi:include href="xml/element-autoconvert.xml" />
+    <xi:include href="xml/element-bs2b.xml" />
     <xi:include href="xml/element-bulge.xml" />
     <xi:include href="xml/element-burn.xml" />
     <xi:include href="xml/element-camerabin.xml" />
@@ -44,7 +48,6 @@
     <xi:include href="xml/element-dvdspu.xml" />
     <xi:include href="xml/element-exclusion.xml" />
     <xi:include href="xml/element-edgedetect.xml" />
-    <xi:include href="xml/element-eglglessink.xml" />
     <xi:include href="xml/element-faac.xml" />
     <xi:include href="xml/element-faad.xml" />
     <xi:include href="xml/element-faceblur.xml" />
@@ -62,12 +65,19 @@
     <xi:include href="xml/element-mirror.xml" />
     <xi:include href="xml/element-modplug.xml" />
     <xi:include href="xml/element-mpeg2enc.xml" />
+    <xi:include href="xml/element-mpegpsmux.xml" />
+    <xi:include href="xml/element-mpegtsmux.xml" />
     <xi:include href="xml/element-mplex.xml" />
     <xi:include href="xml/element-mpg123audiodec.xml" />
     <xi:include href="xml/element-neonhttpsrc.xml" />
     <xi:include href="xml/element-ofa.xml" />
     <xi:include href="xml/element-openalsrc.xml" />
     <xi:include href="xml/element-openalsink.xml" />
+    <xi:include href="xml/element-opusdec.xml" />
+    <xi:include href="xml/element-opusenc.xml" />
+    <xi:include href="xml/element-opusparse.xml" />
+    <xi:include href="xml/element-rtpopuspay.xml" />
+    <xi:include href="xml/element-rtpopusdepay.xml" />
     <xi:include href="xml/element-pcapparse.xml" />
     <xi:include href="xml/element-pinch.xml" />
     <xi:include href="xml/element-pyramidsegment.xml" />
@@ -99,10 +109,13 @@
 
   <chapter>
     <title>gst-plugins-bad Plugins</title>
+    <xi:include href="xml/plugin-aiff.xml" />
+    <xi:include href="xml/plugin-audiomixer.xml" />
     <xi:include href="xml/plugin-audiovisualizers.xml" />
     <xi:include href="xml/plugin-autoconvert.xml" />
     <xi:include href="xml/plugin-assrender.xml" />
     <xi:include href="xml/plugin-bayer.xml" />
+    <xi:include href="xml/plugin-bs2b.xml" />
     <xi:include href="xml/plugin-bz2.xml" />
     <xi:include href="xml/plugin-camerabin.xml" />
     <xi:include href="xml/plugin-coloreffects.xml" />
@@ -112,7 +125,6 @@
     <xi:include href="xml/plugin-dtsdec.xml" />
     <xi:include href="xml/plugin-dvb.xml" />
     <xi:include href="xml/plugin-dvdspu.xml" />
-    <xi:include href="xml/plugin-eglglessink.xml" />
     <xi:include href="xml/plugin-faac.xml" />
     <xi:include href="xml/plugin-faad.xml" />
     <xi:include href="xml/plugin-festival.xml" />
@@ -125,12 +137,14 @@
     <xi:include href="xml/plugin-mms.xml" />
     <xi:include href="xml/plugin-modplug.xml" />
     <xi:include href="xml/plugin-mpeg2enc.xml" />
+    <xi:include href="xml/plugin-mpegpsmux.xml" />
     <xi:include href="xml/plugin-mpegtsmux.xml" />
     <xi:include href="xml/plugin-mplex.xml" />
     <xi:include href="xml/plugin-neon.xml" />
     <xi:include href="xml/plugin-ofa.xml" />
     <xi:include href="xml/plugin-openal.xml" />
     <xi:include href="xml/plugin-opencv.xml" />
+    <xi:include href="xml/plugin-opus.xml" />
     <xi:include href="xml/plugin-pcapparse.xml" />
     <xi:include href="xml/plugin-rawparse.xml" />
     <xi:include href="xml/plugin-rfbsrc.xml" />
@@ -143,9 +157,4 @@
     <xi:include href="xml/plugin-voamrwbenc.xml" />
     <xi:include href="xml/plugin-zbar.xml" />
   </chapter>
-
-  <chapter>
-    <title>gst-plugins-bad Interfaces</title>
-    <xi:include href="xml/gstphotography.xml" />
-  </chapter>
 </book>
diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt
index e42f1b3..5e869c8 100644
--- a/docs/plugins/gst-plugins-bad-plugins-sections.txt
+++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt
@@ -56,6 +56,20 @@
 </SECTION>
 
 <SECTION>
+<FILE>element-audiomixer</FILE>
+<TITLE>audiomixer</TITLE>
+GstAudioMixer
+<SUBSECTION Standard>
+GstAudioMixerClass
+GST_AUDIO_MIXER
+GST_AUDIO_MIXER_CLASS
+GST_IS_AUDIO_MIXER
+GST_IS_AUDIO_MIXER_CLASS
+GST_TYPE_AUDIO_MIXER
+gst_audio_mixer_get_type
+</SECTION>
+
+<SECTION>
 <FILE>element-audioparse</FILE>
 <TITLE>audioparse</TITLE>
 GstAudioParse
@@ -69,7 +83,6 @@
 gst_audio_parse_get_type
 </SECTION>
 
-
 <SECTION>
 <FILE>element-autoconvert</FILE>
 <TITLE>autoconvert</TITLE>
@@ -84,6 +97,22 @@
 </SECTION>
 
 <SECTION>
+<FILE>element-bs2b</FILE>
+<TITLE>bs2b</TITLE>
+GstBs2b
+<SUBSECTION Standard>
+GstBs2bClass
+GST_BS2B
+GST_BS2B_CAST
+GST_BS2B_CLASS
+GST_IS_BS2B
+GST_IS_BS2B_CLASS
+GST_TYPE_BS2B
+gst_bs2b_get_type
+gst_bs2b_plugin_init
+</SECTION>
+
+<SECTION>
 <FILE>element-bulge</FILE>
 <TITLE>bulge</TITLE>
 GstBulge
@@ -132,8 +161,8 @@
 <SECTION>
 <FILE>element-chromium</FILE>
 <TITLE>chromium</TITLE>
-GstChromium
 <SUBSECTION Standard>
+GstChromium
 GstChromiumClass
 GST_CHROMIUM
 GST_CHROMIUM_CLASS
@@ -415,25 +444,6 @@
 </SECTION>
 
 <SECTION>
-<FILE>element-directdrawsink</FILE>
-<TITLE>directdrawsink</TITLE>
-GstDirectDrawSink
-<SUBSECTION Standard>
-GstDirectDrawSinkClass
-GST_DIRECTDRAW_SINK
-GST_DIRECTDRAW_SINK_CLASS
-GST_IS_DIRECTDRAW_SINK
-GST_IS_DIRECTDRAW_SINK_CLASS
-GST_TYPE_DIRECTDRAW_SINK
-gst_directdraw_sink_get_type
-GstDDrawSurface
-GST_DDRAWSURFACE
-GST_IS_DDRAWSURFACE
-GST_TYPE_DDRAWSURFACE
-DIRECTDRAW_VERSION
-</SECTION>
-
-<SECTION>
 <FILE>element-dodge</FILE>
 <TITLE>dodge</TITLE>
 GstDodge
@@ -544,20 +554,6 @@
 </SECTION>
 
 <SECTION>
-<FILE>element-eglglessink</FILE>
-<TITLE>eglglessink</TITLE>
-GstEglGlesSink
-<SUBSECTION Standard>
-GstEglGlesSinkClass
-GST_TYPE_EGLGLESSINK
-GST_EGLGLESSINK
-GST_IS_EGLGLESSINK
-GST_EGLGLESSINK_CLASS
-GST_IS_EGLGLESSINK_CLASS
-gst_eglglessink_get_type
-</SECTION>
-
-<SECTION>
 <FILE>element-exclusion</FILE>
 <TITLE>exclusion</TITLE>
 GstExclusion
@@ -923,6 +919,51 @@
 </SECTION>
 
 <SECTION>
+<FILE>element-mpegpsmux</FILE>
+<TITLE>mpegpsmux</TITLE>
+<SUBSECTION Standard>
+MpegPsMux
+GST_MPEG_PSMUX
+GST_TYPE_MPEG_PSMUX
+MpegPsMuxClass
+mpegpsmux_get_type
+<SUBSECTION Private>
+MpegPsPadData
+MpegPsPadDataPrepareFunction
+CLOCK_BASE
+CLOCK_FREQ
+GSTTIME_TO_MPEGTIME
+NORMAL_TS_PACKET_LENGTH
+M2TS_PACKET_LENGTH
+STANDARD_TIME_CLOCK
+TWO_POW_33_MINUS1
+</SECTION>
+
+<SECTION>
+<FILE>element-mpegtsmux</FILE>
+<TITLE>mpegtsmux</TITLE>
+<SUBSECTION Standard>
+MpegTsMux
+GST_MPEG_TSMUX
+GST_TYPE_MPEG_TSMUX
+MpegTsMuxClass
+mpegtsmux_get_type
+<SUBSECTION Private>
+MpegTsPadData
+CLOCK_BASE
+CLOCK_FREQ
+CLOCK_FREQ_SCR
+MPEGTIME_TO_GSTTIME
+GSTTIME_TO_MPEGTIME
+MPEG_SYS_TIME_TO_GSTTIME
+GSTTIME_TO_MPEG_SYS_TIME
+NORMAL_TS_PACKET_LENGTH
+M2TS_PACKET_LENGTH
+MAX_PROG_NUMBER
+DEFAULT_PROG_ID
+</SECTION>
+
+<SECTION>
 <FILE>element-mplex</FILE>
 <TITLE>mplex</TITLE>
 GstMplex
@@ -956,21 +997,6 @@
 </SECTION>
 
 <SECTION>
-<FILE>element-mythtvsrc</FILE>
-<TITLE>mythtvsrc</TITLE>
-GstMythtvSrc
-<SUBSECTION Standard>
-GstMythtvSrcClass
-GstMythtvState
-GST_MYTHTV_SRC
-GST_MYTHTV_SRC_CLASS
-GST_IS_MYTHTV_SRC
-GST_IS_MYTHTV_SRC_CLASS
-GST_TYPE_MYTHTV_SRC
-gst_mythtv_src_get_type
-</SECTION>
-
-<SECTION>
 <FILE>element-mxfdemux</FILE>
 <TITLE>mxfdemux</TITLE>
 GstMXFDemux
@@ -1083,6 +1109,71 @@
 gst_opencv_text_overlay_plugin_init
 </SECTION>
 
+<FILE>element-opusdec</FILE>
+<TITLE>opusdec</TITLE>
+GstOpusDec
+<SUBSECTION Standard>
+GstOpusDecClass
+gst_opus_dec_get_type
+GST_TYPE_OPUS_DEC
+GST_OPUS_DEC
+GST_OPUS_DEC_CLASS
+GST_IS_OPUS_DEC
+GST_IS_OPUS_DEC_CLASS
+</SECTION>
+
+<FILE>element-opusenc</FILE>
+<TITLE>opusenc</TITLE>
+GstOpusEnc
+<SUBSECTION Standard>
+GstOpusEncClass
+gst_opus_enc_get_type
+GST_TYPE_OPUS_ENC
+GST_OPUS_ENC
+GST_OPUS_ENC_CLASS
+GST_IS_OPUS_ENC
+GST_IS_OPUS_ENC_CLASS
+</SECTION>
+
+<FILE>element-opusparse</FILE>
+<TITLE>opusparse</TITLE>
+GstOpusParse
+<SUBSECTION Standard>
+GstOpusParseClass
+gst_opus_parse_get_type
+GST_TYPE_OPUS_PARSE
+GST_OPUS_PARSE
+GST_OPUS_PARSE_CLASS
+GST_IS_OPUS_PARSE
+GST_IS_OPUS_PARSE_CLASS
+</SECTION>
+
+<FILE>element-rtpopusdepay</FILE>
+<TITLE>rtpopusdepay</TITLE>
+GstRTPOpusDepay
+<SUBSECTION Standard>
+GstRTPOpusDepayClass
+gst_rtp_opus_depay_get_type
+GST_TYPE_RTP_OPUS_DEPAY
+GST_RTP_OPUS_DEPAY
+GST_RTP_OPUS_DEPAY_CLASS
+GST_IS_RTP_OPUS_DEPAY
+GST_IS_RTP_OPUS_DEPAY_CLASS
+</SECTION>
+
+<FILE>element-rtpopuspay</FILE>
+<TITLE>rtpopuspay</TITLE>
+GstRtpOPUSPay
+<SUBSECTION Standard>
+GstRtpOPUSPayClass
+gst_rtp_opus_pay_get_type
+GST_TYPE_RTP_OPUS_PAY
+GST_RTP_OPUS_PAY
+GST_RTP_OPUS_PAY_CLASS
+GST_IS_RTP_OPUS_PAY
+GST_IS_RTP_OPUS_PAY_CLASS
+</SECTION>
+
 <SECTION>
 <FILE>element-pcapparse</FILE>
 <TITLE>pcapparse</TITLE>
@@ -1643,56 +1734,3 @@
 GST_IS_COMPOSITOR_PAD_CLASS
 GST_TYPE_COMPOSITOR_PAD
 </SECTION>
-
-# gst-libs
-
-<SECTION>
-<FILE>gstphotography</FILE>
-<TITLE>GstPhotography</TITLE>
-GstPhotography
-GST_PHOTOGRAPHY_AUTOFOCUS_DONE
-GST_PHOTOGRAPHY_SHAKE_RISK
-GstPhotographyNoiseReduction
-GstPhotographyWhiteBalanceMode
-GstPhotographyColorToneMode
-GstPhotographySceneMode
-GstPhotographyFlashMode
-GstPhotographyFlickerReductionMode
-GstPhotographyFocusMode
-GstPhotographyFocusStatus
-GstPhotographyCaps
-GstPhotographyShakeRisk
-GstPhotographySettings
-GstPhotographyCapturePrepared
-gst_photography_get_ev_compensation
-gst_photography_get_iso_speed
-gst_photography_get_aperture
-gst_photography_get_exposure
-gst_photography_get_white_balance_mode
-gst_photography_get_color_tone_mode
-gst_photography_get_scene_mode
-gst_photography_get_flash_mode
-gst_photography_get_noise_reduction
-gst_photography_get_zoom
-gst_photography_set_ev_compensation
-gst_photography_set_iso_speed
-gst_photography_set_aperture
-gst_photography_set_exposure
-gst_photography_set_white_balance_mode
-gst_photography_set_color_tone_mode
-gst_photography_set_scene_mode
-gst_photography_set_flash_mode
-gst_photography_set_noise_reduction
-gst_photography_set_zoom
-gst_photography_get_capabilities
-gst_photography_prepare_for_capture
-gst_photography_set_autofocus
-gst_photography_set_config
-gst_photography_get_config
-<SUBSECTION Standard>
-GST_PHOTOGRAPHY
-GST_IS_PHOTOGRAPHY
-GST_PHOTOGRAPHY_GET_INTERFACE
-gst_photography_get_type
-</SECTION>
-
diff --git a/docs/plugins/gst-plugins-bad-plugins.args b/docs/plugins/gst-plugins-bad-plugins.args
index 07565cd..802a56f 100644
--- a/docs/plugins/gst-plugins-bad-plugins.args
+++ b/docs/plugins/gst-plugins-bad-plugins.args
@@ -1339,6 +1339,66 @@
 </ARG>
 
 <ARG>
+<NAME>GstGLImageSink::context</NAME>
+<TYPE>GstGLContext*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>OpenGL context</NICK>
+<BLURB>Get OpenGL context.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSink::handle-events</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Handle XEvents</NICK>
+<BLURB>When enabled, XEvents will be selected and handled.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSink::ignore-alpha</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore Alpha</NICK>
+<BLURB>When enabled, alpha will be ignored and converted to black.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSink::output-multiview-downmix-mode</NAME>
+<TYPE>GstGLStereoDownmix</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Mode for mono downmixed output</NICK>
+<BLURB>Output anaglyph type to generate when downmixing to mono.</BLURB>
+<DEFAULT>Dubois optimised Green-Magenta anaglyph</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSink::output-multiview-flags</NAME>
+<TYPE>GstVideoMultiviewFlags</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Flags</NICK>
+<BLURB>Output multiview layout modifier flags.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSink::output-multiview-mode</NAME>
+<TYPE>GstVideoMultiviewMode</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Mode</NICK>
+<BLURB>Choose output mode for multiview/3D video.</BLURB>
+<DEFAULT>GST_VIDEO_MULTIVIEW_MODE_MONO</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstRgAnalysis::forced</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -1744,7 +1804,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>modulation</NICK>
-<BLURB>(DVB-T and DVB-C) Modulation type.</BLURB>
+<BLURB>(DVB-T/T2/C/S2, TURBO and ATSC) Modulation type.</BLURB>
 <DEFAULT>QAM 16</DEFAULT>
 </ARG>
 
@@ -1823,8 +1883,8 @@
 <TYPE>guint</TYPE>
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
-<NICK>frequency</NICK>
-<BLURB>Frequency.</BLURB>
+<NICK>Center frequency</NICK>
+<BLURB>Center frequency to tune into. Measured in kHz for the satellite distribution standars and Hz for all the rest.</BLURB>
 <DEFAULT>0</DEFAULT>
 </ARG>
 
@@ -1854,7 +1914,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>symbol rate</NICK>
-<BLURB>(DVB-S/S2, DVB-C) Symbol rate in bauds.</BLURB>
+<BLURB>(DVB-S/S2, DVB-C) Symbol rate in kBd (kilo bauds).</BLURB>
 <DEFAULT>0</DEFAULT>
 </ARG>
 
@@ -1939,6 +1999,226 @@
 </ARG>
 
 <ARG>
+<NAME>GstDvbSrc::isdbt-layer-enabled</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,7]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer enabled</NICK>
+<BLURB>(ISDB-T) Layer Enabled (7 = All layers).</BLURB>
+<DEFAULT>7</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layera-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer A FEC</NICK>
+<BLURB>(ISDB-T) layer A Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layera-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer A modulation</NICK>
+<BLURB>(ISDB-T) Layer A modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layera-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer A segment count</NICK>
+<BLURB>(ISDB-T) Layer A segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layera-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer A time interleaving </NICK>
+<BLURB>(ISDB-T) Layer A time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerb-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer B FEC</NICK>
+<BLURB>(ISDB-T) layer B Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerb-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer B modulation</NICK>
+<BLURB>(ISDB-T) Layer B modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerb-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer B segment count</NICK>
+<BLURB>(ISDB-T) Layer B segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerb-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer B time interleaving </NICK>
+<BLURB>(ISDB-T) Layer B time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerc-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer A FEC</NICK>
+<BLURB>(ISDB-T) layer C Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerc-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer C modulation</NICK>
+<BLURB>(ISDB-T) Layer C modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerc-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer C segment count</NICK>
+<BLURB>(ISDB-T) Layer C segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-layerc-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer C time interleaving </NICK>
+<BLURB>(ISDB-T) Layer C time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-partial-reception</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T partial reception</NICK>
+<BLURB>(ISDB-T) Partial Reception (-1 = AUTO).</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-sb-segment-count</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB segment count</NICK>
+<BLURB>(ISDB-T) SB segment count.</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-sb-segment-idx</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,12]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB segment IDX</NICK>
+<BLURB>(ISDB-T) SB segment IDX.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-sb-subchannel-id</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,41]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB subchannel ID</NICK>
+<BLURB>(ISDB-T) SB Subchannel ID (-1 = AUTO).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::isdbt-sound-broadcasting</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T sound broadcasting</NICK>
+<BLURB>(ISDB-T) Sound Broadcasting.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::lnb-lof1</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Low band local oscillator frequency</NICK>
+<BLURB>LNB's Local oscillator frequency used for low band reception (kHz).</BLURB>
+<DEFAULT>9750000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::lnb-lof2</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>High band local oscillator frequency</NICK>
+<BLURB>LNB's Local oscillator frequency used for high band reception (kHz).</BLURB>
+<DEFAULT>10600000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::lnb-slof</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Tuning Timeout</NICK>
+<BLURB>LNB's Upper bound for low band reception (kHz).</BLURB>
+<DEFAULT>11700000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDvbSrc::interleaving</NAME>
+<TYPE>GstDvbSrcInterleaving</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>DTMB Interleaving</NICK>
+<BLURB>(DTMB) Interleaving type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstRfbSrc::host</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -17159,206 +17439,6 @@
 </ARG>
 
 <ARG>
-<NAME>GstRealAudioDec::password</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Password</NICK>
-<BLURB>Password.</BLURB>
-<DEFAULT>"Ardubancel Quazanga"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::path-ra14-4</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to 14_4 driver</NICK>
-<BLURB>Path to 14_4 driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/14_4.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::path-ra28-8</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to 28_8 driver</NICK>
-<BLURB>Path to 28_8 driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/28_8.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::path-raatrk</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to atrk driver</NICK>
-<BLURB>Path to atrk driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/atrk.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::path-racook</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to cook driver</NICK>
-<BLURB>Path to cook driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/cook.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::path-rasipr</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to sipr driver</NICK>
-<BLURB>Path to sipr driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/sipr.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::ra14-4-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of 14_4 driver</NICK>
-<BLURB>Names of 14_4 driver.</BLURB>
-<DEFAULT>"14_4.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::ra28-8-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of 28_8 driver</NICK>
-<BLURB>Names of 28_8 driver.</BLURB>
-<DEFAULT>"28_8.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::raatrk-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of atrk driver</NICK>
-<BLURB>Names of atrk driver.</BLURB>
-<DEFAULT>"atrc.so:atrc.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::racook-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of cook driver</NICK>
-<BLURB>Names of cook driver.</BLURB>
-<DEFAULT>"cook.so:cook.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::rasipr-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of sipr driver</NICK>
-<BLURB>Names of sipr driver.</BLURB>
-<DEFAULT>"sipr.so:sipr.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealAudioDec::real-codecs-path</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path where to search for RealPlayer codecs</NICK>
-<BLURB>Path where to search for RealPlayer codecs.</BLURB>
-<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::path-rv20</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to rv20 driver</NICK>
-<BLURB>Path to rv20 driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/drv2.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::path-rv30</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to rv30 driver</NICK>
-<BLURB>Path to rv30 driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/drv3.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::path-rv40</NAME>
-<TYPE>gchararray</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path to rv40 driver</NICK>
-<BLURB>Path to rv40 driver.</BLURB>
-<DEFAULT>"/usr/lib/win32/drv4.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::real-codecs-path</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Path where to search for RealPlayer codecs</NICK>
-<BLURB>Path where to search for RealPlayer codecs.</BLURB>
-<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::rv20-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of rv20 driver</NICK>
-<BLURB>Names of rv20 driver.</BLURB>
-<DEFAULT>"drv2.so:drv2.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::rv30-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of rv30 driver</NICK>
-<BLURB>Names of rv30 driver.</BLURB>
-<DEFAULT>"drvc.so:drv3.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::rv40-names</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Names of rv40 driver</NICK>
-<BLURB>Names of rv40 driver.</BLURB>
-<DEFAULT>"drvc.so:drv4.so.6.0"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstRealVideoDec::max-errors</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Max errors</NICK>
-<BLURB>Maximum number of consecutive errors (0 = unlimited).</BLURB>
-<DEFAULT>25</DEFAULT>
-</ARG>
-
-<ARG>
 <NAME>GstOSXVideoSink::embed</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -17983,8 +18063,8 @@
 <TYPE>guint</TYPE>
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
-<NICK>frequency</NICK>
-<BLURB>Frequency.</BLURB>
+<NICK>Center frequency</NICK>
+<BLURB>Center frequency to tune into. Measured in kHz for the satellite distribution standars and Hz for all the rest.</BLURB>
 <DEFAULT>0</DEFAULT>
 </ARG>
 
@@ -18034,7 +18114,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>modulation</NICK>
-<BLURB>(DVB-T and DVB-C) Modulation type.</BLURB>
+<BLURB>(DVB-T/T2/C/S2, TURBO and ATSC) Modulation type.</BLURB>
 <DEFAULT>QAM 16</DEFAULT>
 </ARG>
 
@@ -18074,7 +18154,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>symbol rate</NICK>
-<BLURB>(DVB-S/S2, DVB-C) Symbol rate in bauds.</BLURB>
+<BLURB>(DVB-S/S2, DVB-C) Symbol rate in kBd (kilo bauds).</BLURB>
 <DEFAULT>0</DEFAULT>
 </ARG>
 
@@ -18149,6 +18229,226 @@
 </ARG>
 
 <ARG>
+<NAME>DvbBaseBin::isdbt-layer-enabled</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,7]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer enabled</NICK>
+<BLURB>(ISDB-T) Layer Enabled (7 = All layers).</BLURB>
+<DEFAULT>7</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layera-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer A FEC</NICK>
+<BLURB>(ISDB-T) layer A Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layera-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer A modulation</NICK>
+<BLURB>(ISDB-T) Layer A modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layera-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer A segment count</NICK>
+<BLURB>(ISDB-T) Layer A segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layera-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer A time interleaving </NICK>
+<BLURB>(ISDB-T) Layer A time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerb-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer B FEC</NICK>
+<BLURB>(ISDB-T) layer B Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerb-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer B modulation</NICK>
+<BLURB>(ISDB-T) Layer B modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerb-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer B segment count</NICK>
+<BLURB>(ISDB-T) Layer B segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerb-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer B time interleaving </NICK>
+<BLURB>(ISDB-T) Layer B time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerc-fec</NAME>
+<TYPE>GstDvbSrcCode_Rate</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDB-T layer A FEC</NICK>
+<BLURB>(ISDB-T) layer C Forward Error Correction.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerc-modulation</NAME>
+<TYPE>GstDvbSrcModulation</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISDBT layer C modulation</NICK>
+<BLURB>(ISDB-T) Layer C modulation type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerc-segment-count</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer C segment count</NICK>
+<BLURB>(ISDB-T) Layer C segment count (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-layerc-time-interleaving</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,8]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T layer C time interleaving </NICK>
+<BLURB>(ISDB-T) Layer C time interleaving (-1 = AUTO).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-partial-reception</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T partial reception</NICK>
+<BLURB>(ISDB-T) Partial Reception (-1 = AUTO).</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-sb-segment-count</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,13]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB segment count</NICK>
+<BLURB>(ISDB-T) SB segment count.</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-sb-segment-idx</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,12]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB segment IDX</NICK>
+<BLURB>(ISDB-T) SB segment IDX.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-sb-subchannel-id</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,41]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T SB subchannel ID</NICK>
+<BLURB>(ISDB-T) SB Subchannel ID (-1 = AUTO).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::isdbt-sound-broadcasting</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>ISB-T sound broadcasting</NICK>
+<BLURB>(ISDB-T) Sound Broadcasting.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::lnb-lof1</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Low band local oscillator frequency</NICK>
+<BLURB>LNB's Local oscillator frequency used for low band reception (kHz).</BLURB>
+<DEFAULT>9750000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::lnb-lof2</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>High band local oscillator frequency</NICK>
+<BLURB>LNB's Local oscillator frequency used for high band reception (kHz).</BLURB>
+<DEFAULT>10600000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::lnb-slof</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Tuning Timeout</NICK>
+<BLURB>LNB's Upper bound for low band reception (kHz).</BLURB>
+<DEFAULT>11700000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>DvbBaseBin::interleaving</NAME>
+<TYPE>GstDvbSrcInterleaving</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>DTMB Interleaving</NICK>
+<BLURB>(DTMB) Interleaving type.</BLURB>
+<DEFAULT>AUTO</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstSDPDemux::debug</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -18589,81 +18889,6 @@
 </ARG>
 
 <ARG>
-<NAME>GstMythtvSrc::location</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Location</NICK>
-<BLURB>The location. In the form:
-			myth://a.com/file.nuv
-			myth://a.com:23223/file.nuv
-			myth://a.com/?channel=123
-			myth://a.com/?channel=Channel%203
-			a.com/file.nuv - default scheme 'myth'.</BLURB>
-<DEFAULT>""</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-channel</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-channel</NICK>
-<BLURB>Change MythTV channel number.</BLURB>
-<DEFAULT>""</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-enable-timing-position</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-enable-timing-position</NICK>
-<BLURB>Enable MythTV Live TV content size continuous updating.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-live</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-live</NICK>
-<BLURB>Enable MythTV Live TV content streaming.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-live-chainid</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-live-chainid</NICK>
-<BLURB>Sets the MythTV chain ID (from TV Chain).</BLURB>
-<DEFAULT>""</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-live-id</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,200]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-live-id</NICK>
-<BLURB>Change MythTV version.</BLURB>
-<DEFAULT>1</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstMythtvSrc::mythtv-version</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[26,30]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>mythtv-version</NICK>
-<BLURB>Change MythTV version.</BLURB>
-<DEFAULT>26</DEFAULT>
-</ARG>
-
-<ARG>
 <NAME>GstGLTestSrc::is-live</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -22499,7 +22724,7 @@
 <RANGE>>= G_MAXULONG</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>packet alignment</NICK>
-<BLURB>Number of packets per buffer (padded with dummy packets on EOS) (-1 = auto, 0 = all available packets).</BLURB>
+<BLURB>Number of packets per buffer (padded with dummy packets on EOS) (-1 = auto, 0 = all available packets, 7 for UDP streaming).</BLURB>
 <DEFAULT>-1</DEFAULT>
 </ARG>
 
@@ -43504,6 +43729,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstZBar::attach-frame</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Attach frame</NICK>
+<BLURB>Attach a frame dump to each barcode message.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstQTMoovRecover::broken-input</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -45854,846 +46089,6 @@
 </ARG>
 
 <ARG>
-<NAME>GstFlacParse::check-frame-checksums</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Check Frame Checksums</NICK>
-<BLURB>Check the overall checksums of every frame.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Dec::deblocking-level</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 16</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Deblocking Level</NICK>
-<BLURB>Deblocking level.</BLURB>
-<DEFAULT>4</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Dec::noise-level</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 16</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Noise Level</NICK>
-<BLURB>Noise level.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Dec::post-processing</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Post Processing</NICK>
-<BLURB>Enable post processing.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Dec::post-processing-flags</NAME>
-<TYPE>GstVP8DecPostProcessingFlags</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Post Processing Flags</NICK>
-<BLURB>Flags to control post processing.</BLURB>
-<DEFAULT>Deblock|Demacroblock|Multi-frame quality enhancement</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Dec::threads</NAME>
-<TYPE>guint</TYPE>
-<RANGE>[1,16]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Max Threads</NICK>
-<BLURB>Maximum number of decoding threads.</BLURB>
-<DEFAULT>1</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::bitrate</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,1000000000]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Bit rate</NICK>
-<BLURB>Bit rate (in bits/sec).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::error-resilient</NAME>
-<TYPE>GstVP8EncErFlags</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Error resilient</NICK>
-<BLURB>Error resilience flags.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::max-keyframe-distance</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,9999]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Maximum Key frame distance</NICK>
-<BLURB>Maximum distance between key frames.</BLURB>
-<DEFAULT>60</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::max-latency</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,25]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Max latency</NICK>
-<BLURB>Number of frames in encoder queue.</BLURB>
-<DEFAULT>10</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::mode</NAME>
-<TYPE>GstVP8EncMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Mode</NICK>
-<BLURB>Mode.</BLURB>
-<DEFAULT>Variable Bit Rate (VBR) mode</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::quality</NAME>
-<TYPE>gdouble</TYPE>
-<RANGE>[0,10]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Quality</NICK>
-<BLURB>Quality. This parameter sets a constant quantizer.</BLURB>
-<DEFAULT>5</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::speed</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,7]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Speed</NICK>
-<BLURB>Speed.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::threads</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,64]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Threads</NICK>
-<BLURB>Number of threads to use.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::multipass-cache-file</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Multipass Cache File</NICK>
-<BLURB>Multipass cache file.</BLURB>
-<DEFAULT>"multipass.cache"</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::multipass-mode</NAME>
-<TYPE>GstVP8EncMultipassMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Multipass Mode</NICK>
-<BLURB>Multipass encode mode.</BLURB>
-<DEFAULT>One pass encoding (default)</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::auto-alt-ref-frames</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Auto Alt Ref Frames</NICK>
-<BLURB>Automatically create alternative reference frames.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::max-quantizer</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,63]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Maximum Quantizer</NICK>
-<BLURB>Maximum Quantizer (worst).</BLURB>
-<DEFAULT>63</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::min-quantizer</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,63]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Minimum Quantizer</NICK>
-<BLURB>Minimum Quantizer (best).</BLURB>
-<DEFAULT>4</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::drop-frame</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,100]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Drop Frame</NICK>
-<BLURB>Drop Frame.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::lag-in-frames</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,25]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Lag in frames</NICK>
-<BLURB>Maximum number of frames to lag.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::maxsection-pct</NAME>
-<TYPE>guint</TYPE>
-<RANGE>[200,800]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>maximum percentage allocation per section</NICK>
-<BLURB>The numbers represent a percentage of the average allocation per section (frame).</BLURB>
-<DEFAULT>800</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::minsection-pct</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 20</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>minimum percentage allocation per section</NICK>
-<BLURB>The numbers represent a percentage of the average allocation per section (frame).</BLURB>
-<DEFAULT>5</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::noise-sensitivity</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,6]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Noise sensitivity</NICK>
-<BLURB>Noise sensisivity (frames to blur).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::resize-allowed</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Resize Allowed</NICK>
-<BLURB>Allow spatial resampling.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::sharpness</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,7]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Sharpness</NICK>
-<BLURB>Filter sharpness.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::static-threshold</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Static Threshold</NICK>
-<BLURB>Motion detection threshold.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::token-parts</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,3]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Token Parts</NICK>
-<BLURB>Token Parts.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::tune</NAME>
-<TYPE>GstVP8EncTune</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Tune</NICK>
-<BLURB>Tune.</BLURB>
-<DEFAULT>Tune for PSNR</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::arnr-maxframes</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,15]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>AltRef max frames</NICK>
-<BLURB>AltRef maximum number of frames.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::arnr-strength</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,6]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>AltRef strength</NICK>
-<BLURB>AltRef strength.</BLURB>
-<DEFAULT>3</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::arnr-type</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[1,3]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>AltRef type</NICK>
-<BLURB>AltRef type.</BLURB>
-<DEFAULT>3</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::auto-alt-ref</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Auto alt reference frames</NICK>
-<BLURB>Automatically generate alt reference frames.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::buffer-initial-size</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Buffer initial size</NICK>
-<BLURB>Initial client buffer size (ms).</BLURB>
-<DEFAULT>4000</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::buffer-optimal-size</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Buffer optimal size</NICK>
-<BLURB>Optimal client buffer size (ms).</BLURB>
-<DEFAULT>5000</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::buffer-size</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Buffer size</NICK>
-<BLURB>Client buffer size (ms).</BLURB>
-<DEFAULT>6000</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::cpu-used</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[-16,16]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>CPU used</NICK>
-<BLURB>CPU used.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::cq-level</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,63]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Constrained quality level</NICK>
-<BLURB>Constrained quality level.</BLURB>
-<DEFAULT>10</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::deadline</NAME>
-<TYPE>gint64</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Deadline</NICK>
-<BLURB>Deadline per frame (usec, 0=disabled).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::dropframe-threshold</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,100]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Drop Frame Threshold</NICK>
-<BLURB>Temporal resampling threshold (buf %).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::end-usage</NAME>
-<TYPE>GstVP8EncEndUsage</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Rate control mode</NICK>
-<BLURB>Rate control mode.</BLURB>
-<DEFAULT>Variable Bit Rate (VBR) mode</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::h-scaling-mode</NAME>
-<TYPE>GstVP8EncScalingMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Horizontal scaling mode</NICK>
-<BLURB>Horizontal scaling mode.</BLURB>
-<DEFAULT>Normal</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::kf-max-dist</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Keyframe max distance</NICK>
-<BLURB>Maximum distance between keyframes (number of frames).</BLURB>
-<DEFAULT>128</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::kf-mode</NAME>
-<TYPE>GstVP8EncKfMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Keyframe Mode</NICK>
-<BLURB>Keyframe placement.</BLURB>
-<DEFAULT>Determine optimal placement automatically</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::max-intra-bitrate-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Max Intra bitrate</NICK>
-<BLURB>Maximum Intra frame bitrate.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::overshoot-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,1000]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Overshoot PCT</NICK>
-<BLURB>Datarate overshoot (max) target (%).</BLURB>
-<DEFAULT>100</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::resize-down-threshold</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,100]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Resize Down Threshold</NICK>
-<BLURB>Downscale threshold (buf %).</BLURB>
-<DEFAULT>60</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::resize-up-threshold</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,100]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Resize Up Threshold</NICK>
-<BLURB>Upscale threshold (buf %).</BLURB>
-<DEFAULT>30</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::target-bitrate</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Target bitrate</NICK>
-<BLURB>Target bitrate (in bits/sec).</BLURB>
-<DEFAULT>256000</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::token-partitions</NAME>
-<TYPE>GstVP8EncTokenPartitions</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Token partitions</NICK>
-<BLURB>Number of token partitions.</BLURB>
-<DEFAULT>One token partition</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::ts-layer-id</NAME>
-<TYPE>GValueArray*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Coding layer identification</NICK>
-<BLURB>Sequence defining coding layer membership.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::ts-number-layers</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[1,5]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Number of coding layers</NICK>
-<BLURB>Number of coding layers to use.</BLURB>
-<DEFAULT>1</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::ts-periodicity</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,16]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Layer periodicity</NICK>
-<BLURB>Length of sequence that defines layer membership periodicity.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::ts-rate-decimator</NAME>
-<TYPE>GValueArray*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Coding layer rate decimator</NICK>
-<BLURB>Rate decimation factors for each layer.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::ts-target-bitrate</NAME>
-<TYPE>GValueArray*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Coding layer target bitrates</NICK>
-<BLURB>Target bitrates for coding layers (one per layer, decreasing).</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::tuning</NAME>
-<TYPE>GstVP8EncTuning</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Tuning</NICK>
-<BLURB>Tuning.</BLURB>
-<DEFAULT>Tune for PSNR</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::twopass-vbr-bias-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,100]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>2-pass VBR bias</NICK>
-<BLURB>CBR/VBR bias (0=CBR, 100=VBR).</BLURB>
-<DEFAULT>50</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::twopass-vbr-maxsection-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>2-pass GOP max bitrate</NICK>
-<BLURB>GOP maximum bitrate (% target).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::twopass-vbr-minsection-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>2-pass GOP min bitrate</NICK>
-<BLURB>GOP minimum bitrate (% target).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::undershoot-pct</NAME>
-<TYPE>gint</TYPE>
-<RANGE>[0,1000]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Undershoot PCT</NICK>
-<BLURB>Datarate undershoot (min) target (%).</BLURB>
-<DEFAULT>100</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstVP8Enc::v-scaling-mode</NAME>
-<TYPE>GstVP8EncScalingMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Vertical scaling mode</NICK>
-<BLURB>Vertical scaling mode.</BLURB>
-<DEFAULT>Normal</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::aperture</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 255</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Aperture property</NICK>
-<BLURB>Aperture defines the size of lens opening  (0 = auto).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::capabilities</NAME>
-<TYPE>gulong</TYPE>
-<RANGE></RANGE>
-<FLAGS>r</FLAGS>
-<NICK>Photo capabilities bitmask</NICK>
-<BLURB>Tells the photo capabilities of the device.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::colour-tone-mode</NAME>
-<TYPE>GstColourToneMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Colour tone mode property</NICK>
-<BLURB>Colour tone setting changes colour shading in the photo.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::ev-compensation</NAME>
-<TYPE>gfloat</TYPE>
-<RANGE>[-2.5,2.5]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>EV compensation property</NICK>
-<BLURB>EV compensation affects the brightness of the image.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::exposure</NAME>
-<TYPE>guint</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Exposure time in milliseconds</NICK>
-<BLURB>Exposure time defines how long the shutter will stay open (0 = auto).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::flash-mode</NAME>
-<TYPE>GstPhotographyFlashMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Flash mode property</NICK>
-<BLURB>Flash mode defines how the flash light should be used.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_FLASH_MODE_AUTO</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::flicker-mode</NAME>
-<TYPE>GstPhotographyFlickerReductionMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Flicker reduction mode property</NICK>
-<BLURB>Flicker reduction mode defines a line frequency for flickering prevention.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::focus-mode</NAME>
-<TYPE>GstPhotographyFocusMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Focus mode property</NICK>
-<BLURB>Focus mode defines the range of focal lengths to use in autofocus search.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_FOCUS_MODE_AUTO</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::image-capture-supported-caps</NAME>
-<TYPE>GstCaps*</TYPE>
-<RANGE></RANGE>
-<FLAGS>r</FLAGS>
-<NICK>Image capture supported caps</NICK>
-<BLURB>Caps describing supported image capture formats.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::iso-speed</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 6400</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>ISO speed property</NICK>
-<BLURB>ISO speed defines the light sensitivity (0 = auto).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::scene-mode</NAME>
-<TYPE>GstPhotographySceneMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Scene mode property</NICK>
-<BLURB>Scene mode works as a preset for different photo shooting mode settings.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_SCENE_MODE_AUTO</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::white-balance-mode</NAME>
-<TYPE>GstPhotographyWhiteBalanceMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>White balance mode property</NICK>
-<BLURB>White balance affects the color temperature of the photo.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_WB_MODE_AUTO</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::image-preview-supported-caps</NAME>
-<TYPE>GstCaps*</TYPE>
-<RANGE></RANGE>
-<FLAGS>r</FLAGS>
-<NICK>Image preview supported caps</NICK>
-<BLURB>Caps describing supported image preview formats.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::noise-reduction</NAME>
-<TYPE>GstPhotographyNoiseReduction</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Noise Reduction settings</NICK>
-<BLURB>Which noise reduction modes are enabled (0 = disabled).</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::zoom</NAME>
-<TYPE>gfloat</TYPE>
-<RANGE>[1,10]</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Zoom property</NICK>
-<BLURB>How much the resulted image will be zoomed.</BLURB>
-<DEFAULT>1</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::analog-gain</NAME>
-<TYPE>gfloat</TYPE>
-<RANGE>>= 1</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Analog gain applied to the sensor</NICK>
-<BLURB>Analog gain applied to the sensor.</BLURB>
-<DEFAULT>1</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::color-temperature</NAME>
-<TYPE>guint</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Color temperature in Kelvin units</NICK>
-<BLURB>Color temperature in Kelvin units for manual white balance.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::color-tone-mode</NAME>
-<TYPE>GstPhotographyColorToneMode</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Color tone mode property</NICK>
-<BLURB>Color tone setting changes color shading in the photo.</BLURB>
-<DEFAULT>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::exposure-time</NAME>
-<TYPE>guint</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Exposure time in milliseconds</NICK>
-<BLURB>Exposure time defines how long the shutter will stay open (0 = auto).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::lens-focus</NAME>
-<TYPE>gfloat</TYPE>
-<RANGE>>= 0</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Manual lens focus</NICK>
-<BLURB>Focus point in diopter units.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::max-exposure-time</NAME>
-<TYPE>guint</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Maximum exposure time</NICK>
-<BLURB>Maximum exposure time for automatic exposure mode.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::min-exposure-time</NAME>
-<TYPE>guint</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Minimum exposure time</NICK>
-<BLURB>Minimum exposure time for automatic exposure mode.</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstPhotography::white-point</NAME>
-<TYPE>GValueArray*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>White point</NICK>
-<BLURB>Describe color white as raw values.</BLURB>
-<DEFAULT></DEFAULT>
-</ARG>
-
-<ARG>
 <NAME>GstWaterRipple::amplitude</NAME>
 <TYPE>gdouble</TYPE>
 <RANGE></RANGE>
@@ -46909,7 +46304,17 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Path to the control socket</NICK>
-<BLURB>The path to the control socket used to control the shared memory transport.</BLURB>
+<BLURB>The path to the control socket used to control the shared memory.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstShmSrc::shm-area-name</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Name of the shared memory area</NICK>
+<BLURB>The name of the shared memory area used to get buffers.</BLURB>
 <DEFAULT>NULL</DEFAULT>
 </ARG>
 
@@ -47106,7 +46511,7 @@
 <ARG>
 <NAME>GstExclusion::factor</NAME>
 <TYPE>guint</TYPE>
-<RANGE><= 175</RANGE>
+<RANGE>[1,175]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Factor</NICK>
 <BLURB>Exclusion factor parameter.</BLURB>
@@ -47724,6 +47129,46 @@
 </ARG>
 
 <ARG>
+<NAME>GstCvSmooth::color</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>color (gaussian standard deviation or color sigma</NICK>
+<BLURB>If type is gaussian, this means the standard deviation.If type is bilateral, this means the color-sigma. If zero, Default values are used.Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstCvSmooth::height</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>height (aperture height)</NICK>
+<BLURB>The aperture height, if zero, the width is used.(Must be positive and odd or zero, unuset in median and bilateral types). Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstCvSmooth::spatial</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>spatial (spatial sigma, bilateral only)</NICK>
+<BLURB>Only used in bilateral type, means the spatial-sigma.Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstCvSmooth::width</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 1</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>width (aperture width)</NICK>
+<BLURB>The aperture width (Must be positive and odd).Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</BLURB>
+<DEFAULT>3</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstCvLaplace::aperture-size</NAME>
 <TYPE>gint</TYPE>
 <RANGE>[1,7]</RANGE>
@@ -48074,56 +47519,6 @@
 </ARG>
 
 <ARG>
-<NAME>GstLegacyH264Parse::access-unit</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Access Units</NICK>
-<BLURB>Output Acess Units rather than NALUs.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstLegacyH264Parse::config-interval</NAME>
-<TYPE>guint</TYPE>
-<RANGE><= 3600</RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>SPS PPS Send Interval</NICK>
-<BLURB>Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled).</BLURB>
-<DEFAULT>0</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstLegacyH264Parse::output-format</NAME>
-<TYPE>GstH264ParseFormat</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Output Format</NICK>
-<BLURB>Output Format of stream (bytestream or otherwise).</BLURB>
-<DEFAULT>Input Format</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstLegacyH264Parse::split-packetized</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Split packetized</NICK>
-<BLURB>Split NAL units of packetized streams.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GstCsp::dither</NAME>
-<TYPE>GstColorspaceDitherMethod</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Dither</NICK>
-<BLURB>Apply dithering while converting.</BLURB>
-<DEFAULT>No dithering (default)</DEFAULT>
-</ARG>
-
-<ARG>
 <NAME>MpegTSParse2::program-numbers</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -48134,6 +47529,36 @@
 </ARG>
 
 <ARG>
+<NAME>MpegTSParse2::pcr-pid</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= G_MAXULONG</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>PID containing PCR</NICK>
+<BLURB>Set the PID to use for PCR values (-1 for auto).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>MpegTSParse2::set-timestamps</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Timestamp (or re-timestamp) the output stream</NICK>
+<BLURB>If set, timestamps will be set on the output buffers using PCRs and smoothed over the smoothing-latency period.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>MpegTSParse2::smoothing-latency</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Smoothing Latency</NICK>
+<BLURB>Additional latency in microseconds for smoothing jitter in input timestamps on live capture.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstTSDemux::emit-stats</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -48306,7 +47731,7 @@
 <ARG>
 <NAME>GstFieldAnalysis::block-width</NAME>
 <TYPE>guint64</TYPE>
-<RANGE></RANGE>
+<RANGE>>= 1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Block width</NICK>
 <BLURB>Block width for windowed comb detection.</BLURB>
@@ -58919,7 +58344,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Audio or voice</NICK>
-<BLURB>Audio or voice.</BLURB>
+<BLURB>Audio or voice (DEPRECATED: use audio-type).</BLURB>
 <DEFAULT>TRUE</DEFAULT>
 </ARG>
 
@@ -58949,7 +58374,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Constant bit rate</NICK>
-<BLURB>Constant bit rate.</BLURB>
+<BLURB>Constant bit rate (DEPRECATED: use bitrate-type).</BLURB>
 <DEFAULT>TRUE</DEFAULT>
 </ARG>
 
@@ -58969,7 +58394,7 @@
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Constrained VBR</NICK>
-<BLURB>Constrained VBR.</BLURB>
+<BLURB>Constrained VBR (DEPRECATED: use bitrate-type).</BLURB>
 <DEFAULT>TRUE</DEFAULT>
 </ARG>
 
@@ -59024,6 +58449,26 @@
 </ARG>
 
 <ARG>
+<NAME>GstOpusEnc::audio-type</NAME>
+<TYPE>GstOpusEncAudioType</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>What type of audio to optimize for</NICK>
+<BLURB>What type of audio to optimize for.</BLURB>
+<DEFAULT>Generic audio</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpusEnc::bitrate-type</NAME>
+<TYPE>GstOpusEncBitrateType</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Bitrate type</NICK>
+<BLURB>Bitrate type.</BLURB>
+<DEFAULT>CBR</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstOpusDec::apply-gain</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -59054,6 +58499,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstInterVideoSrc::timeout</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Timeout</NICK>
+<BLURB>Timeout after which to start outputting black frames.</BLURB>
+<DEFAULT>1000000000</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstInterVideoSink::channel</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -59094,6 +58549,36 @@
 </ARG>
 
 <ARG>
+<NAME>GstInterAudioSrc::buffer-time</NAME>
+<TYPE>guint64</TYPE>
+<RANGE>>= 1</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Buffer Time</NICK>
+<BLURB>Size of audio buffer.</BLURB>
+<DEFAULT>1000000000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstInterAudioSrc::latency-time</NAME>
+<TYPE>guint64</TYPE>
+<RANGE>>= 1</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Latency Time</NICK>
+<BLURB>Latency as reported by the source.</BLURB>
+<DEFAULT>100000000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstInterAudioSrc::period-time</NAME>
+<TYPE>guint64</TYPE>
+<RANGE>>= 1</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Period Time</NICK>
+<BLURB>The minimum amount of data to read in each iteration.</BLURB>
+<DEFAULT>25000000</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstInterAudioSink::channel</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -59126,7 +58611,7 @@
 <ARG>
 <NAME>GstPyramidSegment::level</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[0,4]</RANGE>
+<RANGE>[1,4]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Level</NICK>
 <BLURB>Maximum level of the pyramid segmentation.</BLURB>
@@ -59360,7 +58845,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Eyes profile</NICK>
 <BLURB>Location of Haar cascade file to use for eye-pair detection.</BLURB>
-<DEFAULT>"/usr/share/opencv/haarcascades/haarcascade_mcs_eyepair_small.xml"</DEFAULT>
+<DEFAULT>"/usr/share/OpenCV/haarcascades/haarcascade_mcs_eyepair_small.xml"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59370,7 +58855,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Flags</NICK>
 <BLURB>Flags to cvHaarDetectObjects.</BLURB>
-<DEFAULT></DEFAULT>
+<DEFAULT>Do Canny edge detection to discard some regions</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59390,7 +58875,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Minimum face height</NICK>
 <BLURB>Minimum area height to be recognized as a face.</BLURB>
-<DEFAULT>0</DEFAULT>
+<DEFAULT>30</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59400,7 +58885,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Minimum face width</NICK>
 <BLURB>Minimum area width to be recognized as a face.</BLURB>
-<DEFAULT>0</DEFAULT>
+<DEFAULT>30</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59410,7 +58895,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Mouth profile</NICK>
 <BLURB>Location of Haar cascade file to use for mouth detection.</BLURB>
-<DEFAULT>"/usr/share/opencv/haarcascades/haarcascade_mcs_mouth.xml"</DEFAULT>
+<DEFAULT>"/usr/share/OpenCV/haarcascades/haarcascade_mcs_mouth.xml"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59420,7 +58905,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Nose profile</NICK>
 <BLURB>Location of Haar cascade file to use for nose detection.</BLURB>
-<DEFAULT>"/usr/share/opencv/haarcascades/haarcascade_mcs_nose.xml"</DEFAULT>
+<DEFAULT>"/usr/share/OpenCV/haarcascades/haarcascade_mcs_nose.xml"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59430,7 +58915,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Face profile</NICK>
 <BLURB>Location of Haar cascade file to use for face detection.</BLURB>
-<DEFAULT>"/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"</DEFAULT>
+<DEFAULT>"/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59440,7 +58925,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Scale factor</NICK>
 <BLURB>Factor by which the frame is scaled after each object scan.</BLURB>
-<DEFAULT>1.1</DEFAULT>
+<DEFAULT>1.25</DEFAULT>
 </ARG>
 
 <ARG>
@@ -59454,13 +58939,73 @@
 </ARG>
 
 <ARG>
+<NAME>GstFaceDetect::min-stddev</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,255]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Minimum image standard deviation</NICK>
+<BLURB>Minimum image average standard deviation: on images with standard deviation lesser than this value facedetection will not be performed. Setting this property help to save cpu and reduce false positives not performing face detection on images with little changes.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstFaceBlur::profile</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Profile</NICK>
 <BLURB>Location of Haar cascade file to use for face blurion.</BLURB>
-<DEFAULT>"/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"</DEFAULT>
+<DEFAULT>"/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml"</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFaceBlur::flags</NAME>
+<TYPE>GstOpencvFaceBlurFlags</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Flags</NICK>
+<BLURB>Flags to cvHaarDetectObjects.</BLURB>
+<DEFAULT>Do Canny edge detection to discard some regions</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFaceBlur::min-neighbors</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Mininum neighbors</NICK>
+<BLURB>Minimum number (minus 1) of neighbor rectangles that makes up an object.</BLURB>
+<DEFAULT>3</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFaceBlur::min-size-height</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Minimum size height</NICK>
+<BLURB>Minimum window height size.</BLURB>
+<DEFAULT>30</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFaceBlur::min-size-width</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Minimum size width</NICK>
+<BLURB>Minimum window width size.</BLURB>
+<DEFAULT>30</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFaceBlur::scale-factor</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[1.1,10]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Scale factor</NICK>
+<BLURB>Factor by which the windows is scaled after each scan.</BLURB>
+<DEFAULT>1.25</DEFAULT>
 </ARG>
 
 <ARG>
@@ -60369,7 +59914,7 @@
 <RANGE>[0,1]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Bandwidth usage [0..1]</NICK>
-<BLURB>Percentage of the available bandwidth to use when selecting representations.</BLURB>
+<BLURB>Percentage of the available bandwidth to use when selecting representations (deprecated).</BLURB>
 <DEFAULT>0.8</DEFAULT>
 </ARG>
 
@@ -60580,10 +60125,10 @@
 <ARG>
 <NAME>GstHlsSink::playlist-length</NAME>
 <TYPE>guint</TYPE>
-<RANGE>>= 1</RANGE>
+<RANGE></RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Playlist length</NICK>
-<BLURB>Length of HLS playlist. To allow players to conform to section 6.3.3 of the HLS specification, this should be at least 3.</BLURB>
+<BLURB>Length of HLS playlist. To allow players to conform to section 6.3.3 of the HLS specification, this should be at least 3. If set to 0, the playlist will be infinite.</BLURB>
 <DEFAULT>5</DEFAULT>
 </ARG>
 
@@ -60688,6 +60233,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstAudioMixer::output-buffer-duration</NAME>
+<TYPE>guint64</TYPE>
+<RANGE>>= 1</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Buffer Duration</NICK>
+<BLURB>Output block size in nanoseconds.</BLURB>
+<DEFAULT>10000000</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstDaalaEnc::keyframe-rate</NAME>
 <TYPE>gint</TYPE>
 <RANGE>>= 1</RANGE>
@@ -67532,8 +67087,8 @@
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
 <FLAGS>rw</FLAGS>
-<NICK>Location of the image</NICK>
-<BLURB>Location of the image.</BLURB>
+<NICK>location</NICK>
+<BLURB>Location of image file to overlay.</BLURB>
 <DEFAULT>NULL</DEFAULT>
 </ARG>
 
@@ -67646,6 +67201,76 @@
 </ARG>
 
 <ARG>
+<NAME>GstGLOverlay::alpha</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Alpha</NICK>
+<BLURB>Global alpha of overlay image.</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::offset-x</NAME>
+<TYPE>gint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>X Offset</NICK>
+<BLURB>For positive value, horizontal offset of overlay image in pixels from left of video image. For negative value, horizontal offset of overlay image in pixels from right of video image.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::offset-y</NAME>
+<TYPE>gint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Y Offset</NICK>
+<BLURB>For positive value, vertical offset of overlay image in pixels from top of video image. For negative value, vertical offset of overlay image in pixels from bottom of video image.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::overlay-height</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Overlay Height</NICK>
+<BLURB>Height of overlay image in pixels (0 = same as overlay image).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::overlay-width</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Overlay Width</NICK>
+<BLURB>Width of overlay image in pixels (0 = same as overlay image).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::relative-x</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Relative X Offset</NICK>
+<BLURB>Horizontal offset of overlay image in fractions of video image width, from top-left corner of video image.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLOverlay::relative-y</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Relative Y Offset</NICK>
+<BLURB>Vertical offset of overlay image in fractions of video image height, from top-left corner of video image.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstGLFilterSobel::invert</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -67761,7 +67386,7 @@
 <RANGE>[0,1]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Green</NICK>
-<BLURB>Background reen color.</BLURB>
+<BLURB>Background green color.</BLURB>
 <DEFAULT>0</DEFAULT>
 </ARG>
 
@@ -67875,3 +67500,1443 @@
 <DEFAULT>Checker pattern</DEFAULT>
 </ARG>
 
+<ARG>
+<NAME>GstGLVideoMixer::background</NAME>
+<TYPE>GstGLVideoMixerBackground</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Background</NICK>
+<BLURB>Background type.</BLURB>
+<DEFAULT>Checker pattern</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstWebpEnc::lossless</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Lossless</NICK>
+<BLURB>Enable lossless encoding.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstWebpEnc::preset</NAME>
+<TYPE>GstWebpEncPreset</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>preset tuning</NICK>
+<BLURB>Preset name for visual tuning.</BLURB>
+<DEFAULT>Outdoor photo, natural lighting</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstWebpEnc::quality</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>[0,100]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>quality-level</NICK>
+<BLURB>quality level, between 0 (smallest file) and 100 (biggest).</BLURB>
+<DEFAULT>90</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstWebpEnc::speed</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 6</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Compression Method</NICK>
+<BLURB>quality/speed trade-off (0=fast, 6=slower-better).</BLURB>
+<DEFAULT>4</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstRtpH265Pay::config-interval</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 3600</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>VPS SPS PPS Send Interval</NICK>
+<BLURB>Send VPS, SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstRtpH265Pay::sprop-parameter-sets</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>sprop-parameter-sets</NICK>
+<BLURB>The base64 sprop-parameter-sets to set in out caps (set to NULL to extract from stream).</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstRtpOnvifTimestamp::cseq</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>CSeq</NICK>
+<BLURB>The RTSP CSeq which initiated the playback.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstRtpOnvifTimestamp::ntp-offset</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>NTP offset</NICK>
+<BLURB>Offset between the pipeline running time and the absolute UTC time, in nano-seconds since 1900 (-1 for automatic computation).</BLURB>
+<DEFAULT>18446744073709551615</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstRtpOnvifTimestamp::set-e-bit</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Set 'E' bit</NICK>
+<BLURB>If the element should set the 'E' bit as defined in the ONVIF RTP extension. This increases latency by one packet.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSrc::buffer-size</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,G_MAXINT]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Buffer Size</NICK>
+<BLURB>Size of internal buffer in number of video frames.</BLURB>
+<DEFAULT>5</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSrc::connection</NAME>
+<TYPE>GstDecklinkConnection</TYPE>
+<RANGE></RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Connection</NICK>
+<BLURB>Video input connection to use.</BLURB>
+<DEFAULT>auto</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSrc::device-number</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Device number</NICK>
+<BLURB>Output device instance to use.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSrc::mode</NAME>
+<TYPE>GstDecklinkModes</TYPE>
+<RANGE></RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Playback Mode</NICK>
+<BLURB>Video Mode to use for playback.</BLURB>
+<DEFAULT>auto</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSink::device-number</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Device number</NICK>
+<BLURB>Output device instance to use.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkVideoSink::mode</NAME>
+<TYPE>GstDecklinkModes</TYPE>
+<RANGE></RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Playback Mode</NICK>
+<BLURB>Video Mode to use for playback.</BLURB>
+<DEFAULT>ntsc</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSrc::alignment-threshold</NAME>
+<TYPE>guint64</TYPE>
+<RANGE><= 18446744073709551614</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Alignment Threshold</NICK>
+<BLURB>Timestamp alignment threshold in nanoseconds.</BLURB>
+<DEFAULT>40000000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSrc::buffer-size</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,G_MAXINT]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Buffer Size</NICK>
+<BLURB>Size of internal buffer in number of video frames.</BLURB>
+<DEFAULT>5</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSrc::connection</NAME>
+<TYPE>GstDecklinkAudioConnection</TYPE>
+<RANGE></RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Connection</NICK>
+<BLURB>Audio input connection to use.</BLURB>
+<DEFAULT>auto</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSrc::device-number</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Device number</NICK>
+<BLURB>Output device instance to use.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSrc::discont-wait</NAME>
+<TYPE>guint64</TYPE>
+<RANGE><= 18446744073709551614</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Discont Wait</NICK>
+<BLURB>Window of time in nanoseconds to wait before creating a discontinuity.</BLURB>
+<DEFAULT>1000000000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDecklinkAudioSink::device-number</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Device number</NICK>
+<BLURB>Output device instance to use.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::adaptive-quantization</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Adaptive quantization</NICK>
+<BLURB>Adaptive quantization.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::background-detection</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Background detection</NICK>
+<BLURB>Background detection.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::bitrate</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Bitrate</NICK>
+<BLURB>Bitrate (in bits per second).</BLURB>
+<DEFAULT>128000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::deblocking</NAME>
+<TYPE>GstOpenh264encDeblockingModes</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Deblocking mode</NICK>
+<BLURB>Deblocking mode.</BLURB>
+<DEFAULT>Deblocking on</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::enable-denoise</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Denoise Control</NICK>
+<BLURB>Denoise control.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::enable-frame-skip</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Skip Frames</NICK>
+<BLURB>Skip frames to reach target bitrate.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::gop-size</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GOP size</NICK>
+<BLURB>Number of frames between intra frames.</BLURB>
+<DEFAULT>90</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::max-slice-size</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Max slice size</NICK>
+<BLURB>The maximum size of one slice (in bytes).</BLURB>
+<DEFAULT>1500000</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::multi-thread</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Number of threads</NICK>
+<BLURB>The number of threads.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::num-slices</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Number of slices</NICK>
+<BLURB>The number of slices (needs slice-mode=n-slices).</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::rate-control</NAME>
+<TYPE>RC_MODES</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Rate control</NICK>
+<BLURB>Rate control mode.</BLURB>
+<DEFAULT>Quality mode</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::scene-change-detection</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Scene change detection</NICK>
+<BLURB>Scene change detection.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::slice-mode</NAME>
+<TYPE>GstOpenh264encSliceModes</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Slice mode</NICK>
+<BLURB>Slice mode.</BLURB>
+<DEFAULT>num-slices slices</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::usage-type</NAME>
+<TYPE>EUsageType</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Usage type</NICK>
+<BLURB>Type of video content.</BLURB>
+<DEFAULT>video from camera</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstOpenh264Enc::complexity</NAME>
+<TYPE>GstOpenh264encComplexity</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Complexity / quality / speed tradeoff</NICK>
+<BLURB>Complexity.</BLURB>
+<DEFAULT>Medium complexity / medium speed encoding</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstLibde265Dec::max-threads</NAME>
+<TYPE>gint</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Maximum decode threads</NICK>
+<BLURB>Maximum number of worker threads to spawn. (0 = auto).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLVideoMixerBin::background</NAME>
+<TYPE>GstGLVideoMixerBackground</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Background</NICK>
+<BLURB>Background type.</BLURB>
+<DEFAULT>Checker pattern</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSrcBin::src</NAME>
+<TYPE>GstElement*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GL src element</NICK>
+<BLURB>The GL src chain to use.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::force-aspect-ratio</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Force aspect ratio</NICK>
+<BLURB>When enabled, scaling will respect original aspect ratio.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::sink</NAME>
+<TYPE>GstElement*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GL sink element</NICK>
+<BLURB>The GL sink chain to use.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::async</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Async</NICK>
+<BLURB>Go asynchronously to PAUSED.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::blocksize</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Block size</NICK>
+<BLURB>Size in bytes to pull per buffer (0 = default).</BLURB>
+<DEFAULT>4096</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::enable-last-sample</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Enable Last Buffer</NICK>
+<BLURB>Enable the last-sample property.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::last-sample</NAME>
+<TYPE>GstSample*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Last Sample</NICK>
+<BLURB>The last sample received in the sink.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::max-bitrate</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Max Bitrate</NICK>
+<BLURB>The maximum bits per second to render (0 = disabled).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::max-lateness</NAME>
+<TYPE>gint64</TYPE>
+<RANGE>>= G_MAXULONG</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Max Lateness</NICK>
+<BLURB>Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::qos</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Qos</NICK>
+<BLURB>Generate Quality-of-Service events upstream.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::render-delay</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Render Delay</NICK>
+<BLURB>Additional render delay of the sink in nanoseconds.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::sync</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Sync</NICK>
+<BLURB>Sync on the clock.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::throttle-time</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Throttle time</NICK>
+<BLURB>The time to keep between rendered buffers (0 = disabled).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLSinkBin::ts-offset</NAME>
+<TYPE>gint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>TS Offset</NICK>
+<BLURB>Timestamp offset in nanoseconds.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLMixerBin::latency</NAME>
+<TYPE>gint64</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Buffer latency</NICK>
+<BLURB>Additional latency in live mode to allow upstream to take longer to produce buffers for the current position.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLMixerBin::mixer</NAME>
+<TYPE>GstElement*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GL mixer element</NICK>
+<BLURB>The GL mixer chain to use.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::async</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Async</NICK>
+<BLURB>Go asynchronously to PAUSED.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::blocksize</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Block size</NICK>
+<BLURB>Size in bytes to pull per buffer (0 = default).</BLURB>
+<DEFAULT>4096</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::context</NAME>
+<TYPE>GstGLContext*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>OpenGL context</NICK>
+<BLURB>Get OpenGL context.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::enable-last-sample</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Enable Last Buffer</NICK>
+<BLURB>Enable the last-sample property.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::force-aspect-ratio</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Force aspect ratio</NICK>
+<BLURB>When enabled, scaling will respect original aspect ratio.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::ignore-alpha</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore Alpha</NICK>
+<BLURB>When enabled, alpha will be ignored and converted to black.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::last-sample</NAME>
+<TYPE>GstSample*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Last Sample</NICK>
+<BLURB>The last sample received in the sink.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::max-bitrate</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Max Bitrate</NICK>
+<BLURB>The maximum bits per second to render (0 = disabled).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::max-lateness</NAME>
+<TYPE>gint64</TYPE>
+<RANGE>>= G_MAXULONG</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Max Lateness</NICK>
+<BLURB>Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::pixel-aspect-ratio</NAME>
+<TYPE>GstFraction</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Pixel Aspect Ratio</NICK>
+<BLURB>The pixel aspect ratio of the device.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::qos</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Qos</NICK>
+<BLURB>Generate Quality-of-Service events upstream.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::render-delay</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Render Delay</NICK>
+<BLURB>Additional render delay of the sink in nanoseconds.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::show-preroll-frame</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Show preroll frame</NICK>
+<BLURB>Whether to render video frames during preroll.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::sync</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Sync</NICK>
+<BLURB>Sync on the clock.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::throttle-time</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Throttle time</NICK>
+<BLURB>The time to keep between rendered buffers (0 = disabled).</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::ts-offset</NAME>
+<TYPE>gint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>TS Offset</NICK>
+<BLURB>Timestamp offset in nanoseconds.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::handle-events</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Handle XEvents</NICK>
+<BLURB>When enabled, XEvents will be selected and handled.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::output-multiview-downmix-mode</NAME>
+<TYPE>GstGLStereoDownmix</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Mode for mono downmixed output</NICK>
+<BLURB>Output anaglyph type to generate when downmixing to mono.</BLURB>
+<DEFAULT>Dubois optimised Green-Magenta anaglyph</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::output-multiview-flags</NAME>
+<TYPE>GstVideoMultiviewFlags</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Flags</NICK>
+<BLURB>Output multiview layout modifier flags.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLImageSinkBin::output-multiview-mode</NAME>
+<TYPE>GstVideoMultiviewMode</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Mode</NICK>
+<BLURB>Choose output mode for multiview/3D video.</BLURB>
+<DEFAULT>GST_VIDEO_MULTIVIEW_MODE_MONO</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLFilterBin::filter</NAME>
+<TYPE>GstElement*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GL filter element</NICK>
+<BLURB>The GL filter chain to use.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstAudioInterleave::channel-positions</NAME>
+<TYPE>GValueArray*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Channel positions</NICK>
+<BLURB>Channel positions used on the output.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstAudioInterleave::channel-positions-from-input</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Channel positions from input</NICK>
+<BLURB>Take channel positions from the input.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_xray::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_xpro::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_twirl::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_tunnel::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_stretch::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_squeeze::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_square::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_sobel::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_sobel::invert</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Invert the colors for sobel effect</NICK>
+<BLURB>Invert colors to get dark edges on bright background when using sobel effect.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_sin::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_sepia::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_mirror::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_lumaxpro::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_laplacian::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_laplacian::invert</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Invert the colors for sobel effect</NICK>
+<BLURB>Invert colors to get dark edges on bright background when using sobel effect.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_identity::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_heat::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_glow::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_fisheye::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_bulge::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>gleffects_blur::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLEffectsGeneric::effect</NAME>
+<TYPE>GstGLEffectsEffect</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Effect</NICK>
+<BLURB>Select which effect apply to GL video texture.</BLURB>
+<DEFAULT>Do nothing Effect</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLEffectsGeneric::hswap</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Horizontal Swap</NICK>
+<BLURB>Switch video texture left to right, useful with webcams.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLEffectsGeneric::invert</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Invert the colors for sobel effect</NICK>
+<BLURB>Invert colors to get dark edges on bright background when using sobel effect.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstErrorIgnore::convert-to</NAME>
+<TYPE>GstFlowReturn</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GstFlowReturn to convert to</NICK>
+<BLURB>Which GstFlowReturn value we should convert to when ignoring.</BLURB>
+<DEFAULT>GST_FLOW_NOT_LINKED</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstErrorIgnore::ignore-error</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore GST_FLOW_ERROR</NICK>
+<BLURB>Whether to ignore GST_FLOW_ERROR.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstErrorIgnore::ignore-notlinked</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore GST_FLOW_NOT_LINKED</NICK>
+<BLURB>Whether to ignore GST_FLOW_NOT_LINKED.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstErrorIgnore::ignore-notnegotiated</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore GST_FLOW_NOT_NEGOTIATED</NICK>
+<BLURB>Whether to ignore GST_FLOW_NOT_NEGOTIATED.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLViewConvertElement::downmix-mode</NAME>
+<TYPE>GstGLStereoDownmix</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Mode for mono downmixed output</NICK>
+<BLURB>Output anaglyph type to generate when downmixing to mono.</BLURB>
+<DEFAULT>Dubois optimised Green-Magenta anaglyph</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLViewConvertElement::input-flags-override</NAME>
+<TYPE>GstVideoMultiviewFlags</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Input Multiview Flags Override</NICK>
+<BLURB>Override any input information about multiview layout flags.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLViewConvertElement::input-mode-override</NAME>
+<TYPE>GstVideoMultiviewFramePacking</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Input Multiview Mode Override</NICK>
+<BLURB>Override any input information about multiview layout.</BLURB>
+<DEFAULT>GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLViewConvertElement::output-flags-override</NAME>
+<TYPE>GstVideoMultiviewFlags</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Flags Override</NICK>
+<BLURB>Override automatic negotiation for output multiview layout flags.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLViewConvertElement::output-mode-override</NAME>
+<TYPE>GstVideoMultiviewMode</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Output Multiview Mode Override</NICK>
+<BLURB>Override automatic output mode selection for multiview layout.</BLURB>
+<DEFAULT>GST_VIDEO_MULTIVIEW_MODE_NONE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGLStereoMix::downmix-mode</NAME>
+<TYPE>GstGLStereoDownmix</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Mode for mono downmixed output</NICK>
+<BLURB>Output anaglyph type to generate when downmixing to mono.</BLURB>
+<DEFAULT>Dubois optimised Green-Magenta anaglyph</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsSrtpEnc::is-client</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Is client</NICK>
+<BLURB>Set to true if the decoder should act as client and initiate the handshake.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsSrtpDec::peer-pem</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Peer PEM string</NICK>
+<BLURB>The X509 certificate received in the DTLS handshake, in PEM format.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsSrtpDec::pem</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>PEM string</NICK>
+<BLURB>A string containing a X509 certificate and RSA private key in PEM format.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsEnc::connection-id</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Connection id</NICK>
+<BLURB>Every encoder/decoder pair should have the same, unique, connection-id.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsEnc::encoder-key</NAME>
+<TYPE>GstBuffer*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Encoder key</NICK>
+<BLURB>Master key that should be used by the SRTP encoder.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsEnc::is-client</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Is client</NICK>
+<BLURB>Set to true if the decoder should act asclient and initiate the handshake.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsEnc::srtp-auth</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 2</RANGE>
+<FLAGS>r</FLAGS>
+<NICK>SRTP authentication</NICK>
+<BLURB>The SRTP authentication selected in the DTLS handshake. The value will be set to an GstDtlsSrtpAuth.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsEnc::srtp-cipher</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 1</RANGE>
+<FLAGS>r</FLAGS>
+<NICK>SRTP cipher</NICK>
+<BLURB>The SRTP cipher selected in the DTLS handshake. The value will be set to an GstDtlsSrtpCipher.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::connection-id</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Connection id</NICK>
+<BLURB>Every encoder/decoder pair should have the same, unique, connection-id.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::decoder-key</NAME>
+<TYPE>GstCaps*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Decoder key</NICK>
+<BLURB>SRTP key that should be used by the decoder.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::peer-pem</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Peer PEM string</NICK>
+<BLURB>The X509 certificate received in the DTLS handshake, in PEM format.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::pem</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>PEM string</NICK>
+<BLURB>A string containing a X509 certificate and RSA private key in PEM format.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::srtp-auth</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 2</RANGE>
+<FLAGS>r</FLAGS>
+<NICK>SRTP authentication</NICK>
+<BLURB>The SRTP authentication selected in the DTLS handshake. The value will be set to an GstDtlsSrtpAuth.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstDtlsDec::srtp-cipher</NAME>
+<TYPE>guint</TYPE>
+<RANGE><= 1</RANGE>
+<FLAGS>r</FLAGS>
+<NICK>SRTP cipher</NICK>
+<BLURB>The SRTP cipher selected in the DTLS handshake. The value will be set to an GstDtlsSrtpCipher.</BLURB>
+<DEFAULT>0</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkSink::force-aspect-ratio</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Force aspect ratio</NICK>
+<BLURB>When enabled, scaling will respect original aspect ratio.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkSink::ignore-alpha</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore Alpha</NICK>
+<BLURB>When enabled, alpha will be ignored and converted to black.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkSink::pixel-aspect-ratio</NAME>
+<TYPE>GstFraction</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Pixel Aspect Ratio</NICK>
+<BLURB>The pixel aspect ratio of the device.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkSink::widget</NAME>
+<TYPE>GtkWidget*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Gtk Widget</NICK>
+<BLURB>The GtkWidget to place in the widget heirachy.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkGLSink::force-aspect-ratio</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Force aspect ratio</NICK>
+<BLURB>When enabled, scaling will respect original aspect ratio.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkGLSink::ignore-alpha</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignore Alpha</NICK>
+<BLURB>When enabled, alpha will be ignored and converted to black.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkGLSink::pixel-aspect-ratio</NAME>
+<TYPE>GstFraction</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Pixel Aspect Ratio</NICK>
+<BLURB>The pixel aspect ratio of the device.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstGtkGLSink::widget</NAME>
+<TYPE>GtkWidget*</TYPE>
+<RANGE></RANGE>
+<FLAGS>r</FLAGS>
+<NICK>Gtk Widget</NICK>
+<BLURB>The GtkWidget to place in the widget heirachy.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::bitrate</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[1,102400]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Bitrate</NICK>
+<BLURB>Bitrate in kbit/sec.</BLURB>
+<DEFAULT>2048</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::log-level</NAME>
+<TYPE>GstX265LogLevel</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>(internal) x265 log level</NICK>
+<BLURB>x265 log level.</BLURB>
+<DEFAULT>No logging</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::option-string</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Option string</NICK>
+<BLURB>String of x264 options (overridden by element properties).</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::qp</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[G_MAXULONG,51]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Quantization parameter</NICK>
+<BLURB>QP for P slices in (implied) CQP mode (-1 = disabled).</BLURB>
+<DEFAULT>-1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::speed-preset</NAME>
+<TYPE>GstX265SpeedPreset</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Speed preset</NICK>
+<BLURB>Preset name for speed/quality tradeoff options.</BLURB>
+<DEFAULT>medium</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstX265Enc::tune</NAME>
+<TYPE>GstX265Tune</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Tune options</NICK>
+<BLURB>Preset name for tuning options.</BLURB>
+<DEFAULT>ssim</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstQtSink::force-aspect-ratio</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Force aspect ratio</NICK>
+<BLURB>When enabled, scaling will respect original aspect ratio.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstQtSink::pixel-aspect-ratio</NAME>
+<TYPE>GstFraction</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Pixel Aspect Ratio</NICK>
+<BLURB>The pixel aspect ratio of the device.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstQtSink::widget</NAME>
+<TYPE>gpointer</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>QQuickItem</NICK>
+<BLURB>The QQuickItem to place in the object heirachy.</BLURB>
+<DEFAULT></DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstSrtpDec::replay-window-size</NAME>
+<TYPE>guint</TYPE>
+<RANGE>[64,32768]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Replay window size</NICK>
+<BLURB>Size of the replay protection window.</BLURB>
+<DEFAULT>128</DEFAULT>
+</ARG>
+
diff --git a/docs/plugins/gst-plugins-bad-plugins.hierarchy b/docs/plugins/gst-plugins-bad-plugins.hierarchy
index 2df71bd..8afc2eb 100644
--- a/docs/plugins/gst-plugins-bad-plugins.hierarchy
+++ b/docs/plugins/gst-plugins-bad-plugins.hierarchy
@@ -3,6 +3,7 @@
     GstObject
       GstAllocator
         GstAllocatorSysmem
+        GstWlShmAllocator
       GstAudioRingBuffer
         GstAudioSinkRingBuffer
         GstAudioSrcRingBuffer
@@ -14,11 +15,16 @@
       GstControlSource
       GstElement
         GstAggregator
+          GstAudioAggregator
+            GstAudioInterleave
+            GstAudioMixer
           GstVideoAggregator
             GstCompositor
-            GstGLMixer
-              GstGLMosaic
-              GstGLVideoMixer
+            GstGLBaseMixer
+              GstGLMixer
+                GstGLMosaic
+                GstGLStereoMix
+                GstGLVideoMixer
         GstAiffMux
         GstAiffParse
         GstAsfMux
@@ -40,7 +46,6 @@
           GstSirenEnc
           GstVoAacEnc
           GstVoAmrWbEnc
-        GstAudioMixer
         GstAudioVisualizer-BadGstAudioVisualizers
           GstSpaceScope
           GstSpectraScope
@@ -54,6 +59,7 @@
           GstH265Parse
           GstIRTSPParse
           GstIvfParse
+          GstJpegParse
           GstMpeg4VParse
           GstMpegvParse
           GstOpusParse
@@ -63,6 +69,8 @@
           GstAudioBaseSink
             GstAudioSink
               GstOpenALSink
+            GstDecklinkAudioSink
+          GstAvdtpSink
           GstChecksumSink
           GstCurlBaseSink
             GstCurlFileSink
@@ -70,17 +78,22 @@
               GstCurlFtpSink
               GstCurlHttpSink
               GstCurlSmtpSink
+          GstDecklinkVideoSink
           GstInterAudioSink
           GstInterSubSink
-          GstInterVideoSink
           GstRTMPSink
           GstShmSink
           GstVideoSink
             GstDfbVideoSink
             GstFBDEVSink
             GstGLImageSink
+            GstGtkBaseSink
+              GstGtkGLSink
+              GstGtkSink
+            GstInterVideoSink
             GstWaylandSink
         GstBaseSrc
+          GstAvdtpSrc
           GstDataURISrc
           GstFliteTestSrc
           GstInterAudioSrc
@@ -93,12 +106,15 @@
             GstAudioBaseSrc
               GstAudioSrc
                 GstOpenalSrc
+            GstDecklinkAudioSrc
+            GstDecklinkVideoSrc
             GstDvbSrc
             GstGLTestSrc
             GstMMS
             GstRTMPSrc
             GstRfbSrc
             GstShmSrc
+            GstVCDSrc
         GstBaseTransform
           GstAudioFilter
             GstAccurip
@@ -120,21 +136,41 @@
           GstDebugSpy
           GstDtmfDetect
           GstFreeverb
-          GstGLFilter
-            GstGLBumper
-            GstGLColorscale
-            GstGLDeinterlace
-            GstGLDifferenceMatte
-            GstGLEffects
-            GstGLFilterApp
-            GstGLFilterBlur
-            GstGLFilterCube
-            GstGLFilterGlass
-            GstGLFilterLaplacian
-            GstGLFilterReflectedScreen
-            GstGLFilterShader
-            GstGLFilterSobel
-            GstGLOverlay
+          GstGLBaseFilter
+            GstGLColorConvertElement
+            GstGLDownloadElement
+            GstGLFilter
+              GstGLColorscale
+              GstGLDeinterlace
+              GstGLDifferenceMatte
+              GstGLEffects
+                GstGLEffectsGeneric
+                gleffects_blur
+                gleffects_bulge
+                gleffects_fisheye
+                gleffects_glow
+                gleffects_heat
+                gleffects_identity
+                gleffects_laplacian
+                gleffects_lumaxpro
+                gleffects_mirror
+                gleffects_sepia
+                gleffects_sin
+                gleffects_sobel
+                gleffects_square
+                gleffects_squeeze
+                gleffects_stretch
+                gleffects_tunnel
+                gleffects_twirl
+                gleffects_xpro
+                gleffects_xray
+              GstGLFilterApp
+              GstGLFilterCube
+              GstGLFilterGlass
+              GstGLFilterShader
+              GstGLOverlay
+              GstGLViewConvertElement
+            GstGLUploadElement
           GstIvtc
           GstRGB2Bayer
           GstRemoveSilence
@@ -195,16 +231,27 @@
           GstYadif
         GstBin
           DvbBaseBin
+          GstA2dpSink
+          GstAdaptiveDemux
+            GstDashDemux
+            GstHLSDemux
+            GstMssDemux
           GstAutoConvert
           GstAutoVideoConvert
           GstBaseCameraSrc
             GstUvcH264Src
             GstWrapperCameraBinSrc
-          GstDashDemux
+          GstDtlsSrtpBin
+            GstDtlsSrtpDec
+            GstDtlsSrtpEnc
           GstFPSDisplaySink
-          GstHLSDemux
+          GstGLFilterBin
+          GstGLMixerBin
+            GstGLVideoMixerBin
+          GstGLSinkBin
+            GstGLImageSinkBin
+          GstGLSrcBin
           GstHlsSink
-          GstMssDemux
           GstPipeline
             GstCameraBin
           GstSDPDemux
@@ -216,20 +263,22 @@
         GstCompare
         GstDVBSubOverlay
         GstDVDSpu
-        GstDecklinkSink
-        GstDecklinkSrc
         GstDisparity
+        GstDtlsDec
+        GstDtlsEnc
+        GstDtlsSrtpDemux
         GstEdgeDetect
+        GstErrorIgnore
         GstFestival
         GstFieldAnalysis
         GstFluidDec
         GstGDPDepay
         GstGDPPay
+        GstGLStereoSplit
         GstGmeDec
         GstInterlace
         GstJP2kDecimator
         GstJifMux
-        GstJpegParse
         GstKateDec
         GstKateEnc
         GstKateParse
@@ -247,17 +296,19 @@
         GstOpencvTextOverlay
         GstPcapParse
         GstPitch
-        GstPnmenc
         GstPyramidSegment
         GstRTPBaseDepayload
           GstRTPOpusDepay
+          GstRtpH265Depay
         GstRTPBasePayload
           GstRtpAsfPay
+          GstRtpH265Pay
           GstRtpOPUSPay
         GstRawParse
           GstAudioParse
           GstVideoParse
-        GstSFDec
+        GstRtpOnvifParse
+        GstRtpOnvifTimestamp
         GstSegmentClip
           GstAudioSegmentClip
           GstVideoSegmentClip
@@ -271,6 +322,7 @@
         GstTemplateMatch
         GstUvcH264MjpgDemux
         GstVideoDecoder
+          GstLibde265Dec
           GstOpenEXRDec
           GstOpenJPEGDec
           GstPnmdec
@@ -280,7 +332,10 @@
           GstWebPDec
         GstVideoEncoder
           GstOpenJPEGEnc
+          GstPnmenc
           GstSchroEnc
+          GstWebpEnc
+          GstX265Enc
         GstWebvttEnc
         GstWildmidi
         GstY4mDec
@@ -292,10 +347,14 @@
       GstGLContext
       GstPad
         GstAggregatorPad
+          GstAudioAggregatorPad
+            GstAudioInterleavePad
+            GstAudioMixerPad
           GstVideoAggregatorPad
             GstCompositorPad
-            GstGLMixerPad
-              GstGLVideoMixerPad
+            GstGLBaseMixerPad
+              GstGLMixerPad
+                GstGLVideoMixerPad
       GstPadTemplate
       GstPlugin
       GstPluginFeature
@@ -305,6 +364,7 @@
       GstRegistry
       GstTask
       GstTaskPool
+    GtkWidget
   GstColorBalanceChannel
   GstEncodingProfile
   MXFMetadataBase
@@ -381,15 +441,16 @@
         MXFMetadataStaticTrack
         MXFMetadataTimelineTrack
 GInterface
+  AtkImplementorIface
   GTypePlugin
   GstChildProxy
   GstColorBalance
   GstNavigation
-  GstPhotography
   GstPreset
   GstTagSetter
   GstTagXmpWriter
   GstURIHandler
   GstVideoOverlay
   GstWaylandVideo
+  GtkBuildable
   MXFDescriptiveMetadataFrameworkInterface
diff --git a/docs/plugins/gst-plugins-bad-plugins.interfaces b/docs/plugins/gst-plugins-bad-plugins.interfaces
index a1abf41..b67338c 100644
--- a/docs/plugins/gst-plugins-bad-plugins.interfaces
+++ b/docs/plugins/gst-plugins-bad-plugins.interfaces
@@ -1,10 +1,12 @@
 ADPCMEnc GstPreset
 DvbBaseBin GstChildProxy GstURIHandler
 GstA2dpSink GstChildProxy
+GstAdaptiveDemux GstChildProxy
 GstAmrWbEnc GstPreset
 GstApExSink GstImplementsInterface GstMixer
 GstAsfMux GstTagSetter
 GstAudioEncoder GstPreset
+GstAudioInterleave GstChildProxy
 GstAudioMixer GstChildProxy
 GstAutoConvert GstChildProxy
 GstAutoVideoConvert GstChildProxy
@@ -22,15 +24,27 @@
 GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance
 GstDfbVideoSink GstNavigation GstColorBalance
 GstDiracEnc GstPreset
+GstDtlsSrtpBin GstChildProxy
+GstDtlsSrtpDec GstChildProxy
+GstDtlsSrtpEnc GstChildProxy
 GstEglGlesSink GstVideoOverlay
 GstFPSDisplaySink GstChildProxy
 GstFaac GstPreset
 GstFaceOverlay GstChildProxy
 GstFreeverb GstPreset
+GstGLBaseMixer GstChildProxy
+GstGLFilterBin GstChildProxy
 GstGLImageSink GstVideoOverlay
+GstGLImageSink GstVideoOverlay GstNavigation
+GstGLImageSinkBin GstChildProxy GstVideoOverlay GstNavigation
 GstGLMixer GstChildProxy
+GstGLMixerBin GstChildProxy
 GstGLMosaic GstChildProxy
+GstGLSinkBin GstChildProxy GstVideoOverlay GstNavigation
+GstGLSrcBin GstChildProxy
+GstGLStereoMix GstChildProxy
 GstGLVideoMixer GstChildProxy
+GstGLVideoMixerBin GstChildProxy
 GstGSMEnc GstPreset
 GstGSettingsAudioSink GstChildProxy
 GstGSettingsAudioSrc GstChildProxy
@@ -38,6 +52,9 @@
 GstGSettingsSwitchSrc GstChildProxy
 GstGSettingsVideoSink GstChildProxy
 GstGSettingsVideoSrc GstChildProxy
+GstGtkBaseSink GstNavigation
+GstGtkGLSink GstNavigation
+GstGtkSink GstNavigation
 GstHLSDemux GstChildProxy
 GstHanddetect GstNavigation
 GstHlsSink GstChildProxy
@@ -52,8 +69,10 @@
 GstMythtvSrc GstURIHandler
 GstNeonhttpSrc GstURIHandler
 GstOpenJPEGEnc GstPreset
+GstOpenh264Enc GstPreset
 GstOpusEnc GstPreset GstTagSetter
 GstPipeline GstChildProxy
+GstPnmenc GstPreset
 GstRTMPSink GstURIHandler
 GstRTMPSrc GstURIHandler
 GstSDLVideoSink GstImplementsInterface GstXOverlay GstNavigation
@@ -72,8 +91,11 @@
 GstVoAacEnc GstPreset
 GstVoAmrWbEnc GstPreset
 GstWaylandSink GstVideoOverlay GstWaylandVideo
+GstWebpEnc GstPreset
 GstWrapperCameraBinSrc GstChildProxy
+GstX265Enc GstPreset
 GstXvidEnc GstPreset
+GtkWidget AtkImplementorIface GtkBuildable
 MXFDMS1ClipFramework MXFDescriptiveMetadataFrameworkInterface
 MXFDMS1Framework MXFDescriptiveMetadataFrameworkInterface
 MXFDMS1ProductionClipFramework MXFDescriptiveMetadataFrameworkInterface
diff --git a/docs/plugins/gst-plugins-bad-plugins.prerequisites b/docs/plugins/gst-plugins-bad-plugins.prerequisites
index aff93ba..2a018ad 100644
--- a/docs/plugins/gst-plugins-bad-plugins.prerequisites
+++ b/docs/plugins/gst-plugins-bad-plugins.prerequisites
@@ -1,11 +1,6 @@
 GstChildProxy GObject
-GstChildProxy GstObject
-GstColorBalance GstImplementsInterface GstElement
-GstImplementsInterface GstElement
-GstMixer GstImplementsInterface GstElement
-GstPhotography GstImplementsInterface GstElement
 GstTagSetter GstElement
 GstTagXmpWriter GstElement
 GstWaylandVideo GstVideoOverlay
-GstXOverlay GstImplementsInterface GstElement
+GtkBuildable GObject
 MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadata
diff --git a/docs/plugins/gst-plugins-bad-plugins.signals b/docs/plugins/gst-plugins-bad-plugins.signals
index d9cc154..1040a7d 100644
--- a/docs/plugins/gst-plugins-bad-plugins.signals
+++ b/docs/plugins/gst-plugins-bad-plugins.signals
@@ -619,6 +619,13 @@
 </SIGNAL>
 
 <SIGNAL>
+<NAME>GstDvbSrc::tune</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>la</FLAGS>
+GstDvbSrc *gstdvbsrc
+</SIGNAL>
+
+<SIGNAL>
 <NAME>DvbBaseBin::tuning-done</NAME>
 <RETURNS>void</RETURNS>
 <FLAGS>l</FLAGS>
@@ -640,13 +647,19 @@
 </SIGNAL>
 
 <SIGNAL>
+<NAME>DvbBaseBin::tune</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>la</FLAGS>
+DvbBaseBin *dvbbasebin
+</SIGNAL>
+
+<SIGNAL>
 <NAME>GstGLImageSink::client-draw</NAME>
 <RETURNS>gboolean</RETURNS>
 <FLAGS>l</FLAGS>
 GstGLImageSink *gstglimagesink
-guint  arg1
-guint  arg2
-guint  arg3
+GstGLContext *arg1
+GstSample *arg2
 </SIGNAL>
 
 <SIGNAL>
@@ -654,8 +667,9 @@
 <RETURNS>gboolean</RETURNS>
 <FLAGS>l</FLAGS>
 GstGLImageSink *gstglimagesink
-guint  arg1
+GstGLContext *arg1
 guint  arg2
+guint  arg3
 </SIGNAL>
 
 <SIGNAL>
@@ -668,3 +682,71 @@
 guint  arg3
 </SIGNAL>
 
+<SIGNAL>
+<NAME>GstGLSrcBin::create-element</NAME>
+<RETURNS>GstElement*</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLSrcBin *gstglsrcbin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLSinkBin::create-element</NAME>
+<RETURNS>GstElement*</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLSinkBin *gstglsinkbin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLMixerBin::create-element</NAME>
+<RETURNS>GstElement*</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLMixerBin *gstglmixerbin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLImageSinkBin::client-draw</NAME>
+<RETURNS>gboolean</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLImageSinkBin *gstglimagesinkbin
+GstGLContext *arg1
+GstSample *arg2
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLImageSinkBin::client-reshape</NAME>
+<RETURNS>gboolean</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLImageSinkBin *gstglimagesinkbin
+GstGLContext *arg1
+guint  arg2
+guint  arg3
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLFilterBin::create-element</NAME>
+<RETURNS>GstElement*</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLFilterBin *gstglfilterbin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstDtlsSrtpEnc::on-key-set</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDtlsSrtpEnc *gstdtlssrtpenc
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstDtlsEnc::on-key-received</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDtlsEnc *gstdtlsenc
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstDtlsDec::on-key-received</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDtlsDec *gstdtlsdec
+</SIGNAL>
+
diff --git a/docs/plugins/gst-plugins-bad-plugins.types b/docs/plugins/gst-plugins-bad-plugins.types
index 3117ba5..e69de29 100644
--- a/docs/plugins/gst-plugins-bad-plugins.types
+++ b/docs/plugins/gst-plugins-bad-plugins.types
@@ -1,6 +0,0 @@
-#include <gst/gst.h>
-
-#include <gst/interfaces/photography.h>
-
-gst_photography_get_type
-
diff --git a/docs/plugins/html/GstPhotography.html b/docs/plugins/html/GstPhotography.html
deleted file mode 100644
index d023224..0000000
--- a/docs/plugins/html/GstPhotography.html
+++ /dev/null
@@ -1,1642 +0,0 @@
-<!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: GstPhotography</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="ch03.html" title="gst-plugins-bad Interfaces">
-<link rel="prev" href="ch03.html" title="gst-plugins-bad Interfaces">
-<meta name="generator" content="GTK-Doc V1.21 (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="5"><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="#GstPhotography.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#GstPhotography.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites">  <span class="dim">|</span> 
-                  <a href="#GstPhotography.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#GstPhotography.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="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="ch03.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><img src="right-insensitive.png" width="16" height="16" border="0"></td>
-</tr></table>
-<div class="refentry">
-<a name="GstPhotography"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="GstPhotography.top_of_page"></a>GstPhotography</span></h2>
-<p>GstPhotography</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="GstPhotography.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">
-<span class="c_punctuation">(</span><a class="link" href="GstPhotography.html#GstPhotographyCapturePrepared" title="GstPhotographyCapturePrepared ()">*GstPhotographyCapturePrepared</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-ev-compensation" title="gst_photography_get_ev_compensation ()">gst_photography_get_ev_compensation</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-iso-speed" title="gst_photography_get_iso_speed ()">gst_photography_get_iso_speed</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-aperture" title="gst_photography_get_aperture ()">gst_photography_get_aperture</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-exposure" title="gst_photography_get_exposure ()">gst_photography_get_exposure</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-white-balance-mode" title="gst_photography_get_white_balance_mode ()">gst_photography_get_white_balance_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-color-tone-mode" title="gst_photography_get_color_tone_mode ()">gst_photography_get_color_tone_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-scene-mode" title="gst_photography_get_scene_mode ()">gst_photography_get_scene_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-flash-mode" title="gst_photography_get_flash_mode ()">gst_photography_get_flash_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-noise-reduction" title="gst_photography_get_noise_reduction ()">gst_photography_get_noise_reduction</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-zoom" title="gst_photography_get_zoom ()">gst_photography_get_zoom</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-ev-compensation" title="gst_photography_set_ev_compensation ()">gst_photography_set_ev_compensation</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-iso-speed" title="gst_photography_set_iso_speed ()">gst_photography_set_iso_speed</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-aperture" title="gst_photography_set_aperture ()">gst_photography_set_aperture</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-exposure" title="gst_photography_set_exposure ()">gst_photography_set_exposure</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-white-balance-mode" title="gst_photography_set_white_balance_mode ()">gst_photography_set_white_balance_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-color-tone-mode" title="gst_photography_set_color_tone_mode ()">gst_photography_set_color_tone_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-scene-mode" title="gst_photography_set_scene_mode ()">gst_photography_set_scene_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-flash-mode" title="gst_photography_set_flash_mode ()">gst_photography_set_flash_mode</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-noise-reduction" title="gst_photography_set_noise_reduction ()">gst_photography_set_noise_reduction</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-zoom" title="gst_photography_set_zoom ()">gst_photography_set_zoom</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a class="link" href="GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="returnvalue">GstPhotographyCaps</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-capabilities" title="gst_photography_get_capabilities ()">gst_photography_get_capabilities</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-prepare-for-capture" title="gst_photography_prepare_for_capture ()">gst_photography_prepare_for_capture</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="GstPhotography.html#gst-photography-set-autofocus" title="gst_photography_set_autofocus ()">gst_photography_set_autofocus</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-set-config" title="gst_photography_set_config ()">gst_photography_set_config</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
-<a class="link" href="GstPhotography.html#gst-photography-get-config" title="gst_photography_get_config ()">gst_photography_get_config</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.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"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--aperture" title="The “aperture” property">aperture</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--capabilities" title="The “capabilities” property">capabilities</a></td>
-<td class="property_flags">Read</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">GstColourToneMode</span></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--colour-tone-mode" title="The “colour-tone-mode” property">colour-tone-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--ev-compensation" title="The “ev-compensation” property">ev-compensation</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--exposure" title="The “exposure” property">exposure</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--flash-mode" title="The “flash-mode” property">flash-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode"><span class="type">GstPhotographyFlickerReductionMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--flicker-mode" title="The “flicker-mode” property">flicker-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode"><span class="type">GstPhotographyFocusMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--focus-mode" title="The “focus-mode” property">focus-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--image-capture-supported-caps" title="The “image-capture-supported-caps” property">image-capture-supported-caps</a></td>
-<td class="property_flags">Read</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--iso-speed" title="The “iso-speed” property">iso-speed</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--scene-mode" title="The “scene-mode” property">scene-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--white-balance-mode" title="The “white-balance-mode” property">white-balance-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--image-preview-supported-caps" title="The “image-preview-supported-caps” property">image-preview-supported-caps</a></td>
-<td class="property_flags">Read</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--noise-reduction" title="The “noise-reduction” property">noise-reduction</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--zoom" title="The “zoom” property">zoom</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--analog-gain" title="The “analog-gain” property">analog-gain</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--color-temperature" title="The “color-temperature” property">color-temperature</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--color-tone-mode" title="The “color-tone-mode” property">color-tone-mode</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--exposure-time" title="The “exposure-time” property">exposure-time</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--lens-focus" title="The “lens-focus” property">lens-focus</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--max-exposure-time" title="The “max-exposure-time” property">max-exposure-time</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--min-exposure-time" title="The “min-exposure-time” property">min-exposure-time</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<a href="https://developer.gnome.org/gobject/unstable/gobject-Value-arrays.html#GValueArray"><span class="type">GValueArray</span></a> *</td>
-<td class="property_name"><a class="link" href="GstPhotography.html#GstPhotography--white-point" title="The “white-point” property">white-point</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.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="GstPhotography.html#GstPhotography-struct" title="GstPhotography">GstPhotography</a></td>
-</tr>
-<tr>
-<td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" title="GST_PHOTOGRAPHY_AUTOFOCUS_DONE">GST_PHOTOGRAPHY_AUTOFOCUS_DONE</a></td>
-</tr>
-<tr>
-<td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" title="GST_PHOTOGRAPHY_SHAKE_RISK">GST_PHOTOGRAPHY_SHAKE_RISK</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction">GstPhotographyNoiseReduction</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode">GstPhotographyWhiteBalanceMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode">GstPhotographyColorToneMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode">GstPhotographySceneMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode">GstPhotographyFlashMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode">GstPhotographyFlickerReductionMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode">GstPhotographyFocusMode</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyFocusStatus" title="enum GstPhotographyFocusStatus">GstPhotographyFocusStatus</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps">GstPhotographyCaps</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="GstPhotography.html#GstPhotographyShakeRisk" title="enum GstPhotographyShakeRisk">GstPhotographyShakeRisk</a></td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> GstPhotography
-</pre>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.prerequisites"></a><h2>Prerequisites</h2>
-<p>
-GstPhotography requires
- GstImplementsInterface and  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>.</p>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.description"></a><h2>Description</h2>
-<p>
-</p>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="GstPhotographyCapturePrepared"></a><h3>GstPhotographyCapturePrepared ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*GstPhotographyCapturePrepared<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
-                                  <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *configured_caps</code></em>);</pre>
-<p>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-ev-compensation"></a><h3>gst_photography_get_ev_compensation ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_ev_compensation (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *ev_comp</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.3.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-iso-speed"></a><h3>gst_photography_get_iso_speed ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_iso_speed (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *iso_speed</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.4.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-aperture"></a><h3>gst_photography_get_aperture ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_aperture (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *aperture</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.5.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-exposure"></a><h3>gst_photography_get_exposure ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_exposure (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                              <em class="parameter"><code><span class="type">guint32</span> *exposure</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.6.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-white-balance-mode"></a><h3>gst_photography_get_white_balance_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_white_balance_mode
-                               (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> *wb_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.7.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-color-tone-mode"></a><h3>gst_photography_get_color_tone_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_color_tone_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> *tone_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.8.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-scene-mode"></a><h3>gst_photography_get_scene_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_scene_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> *scene_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.9.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-flash-mode"></a><h3>gst_photography_get_flash_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_flash_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> *flash_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.10.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-noise-reduction"></a><h3>gst_photography_get_noise_reduction ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_noise_reduction (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a> *noise_reduction</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.11.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-zoom"></a><h3>gst_photography_get_zoom ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_zoom (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *zoom</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.12.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-ev-compensation"></a><h3>gst_photography_set_ev_compensation ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_ev_compensation (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> ev_comp</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.13.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-iso-speed"></a><h3>gst_photography_set_iso_speed ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_iso_speed (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> iso_speed</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.14.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-aperture"></a><h3>gst_photography_set_aperture ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_aperture (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> aperture</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.15.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-exposure"></a><h3>gst_photography_set_exposure ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_exposure (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                              <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> exposure</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.16.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-white-balance-mode"></a><h3>gst_photography_set_white_balance_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_white_balance_mode
-                               (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a> wb_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.17.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-color-tone-mode"></a><h3>gst_photography_set_color_tone_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_color_tone_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a> tone_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.18.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-scene-mode"></a><h3>gst_photography_set_scene_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_scene_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a> scene_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.19.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-flash-mode"></a><h3>gst_photography_set_flash_mode ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_flash_mode (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a> flash_mode</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.20.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-noise-reduction"></a><h3>gst_photography_set_noise_reduction ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_noise_reduction (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a> noise_reduction</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.21.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-zoom"></a><h3>gst_photography_set_zoom ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_zoom (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> zoom</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.22.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-capabilities"></a><h3>gst_photography_get_capabilities ()</h3>
-<pre class="programlisting"><a class="link" href="GstPhotography.html#GstPhotographyCaps" title="enum GstPhotographyCaps"><span class="returnvalue">GstPhotographyCaps</span></a>
-gst_photography_get_capabilities (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.23.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-prepare-for-capture"></a><h3>gst_photography_prepare_for_capture ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_prepare_for_capture (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                                     <em class="parameter"><code><a class="link" href="GstPhotography.html#GstPhotographyCapturePrepared" title="GstPhotographyCapturePrepared ()"><span class="type">GstPhotographyCapturePrepared</span></a> func</code></em>,
-                                     <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *capture_caps</code></em>,
-                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.24.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-autofocus"></a><h3>gst_photography_set_autofocus ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-gst_photography_set_autofocus (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                               <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> on</code></em>);</pre>
-<p>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-set-config"></a><h3>gst_photography_set_config ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_set_config (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                            <em class="parameter"><code><span class="type">GstPhotographySettings</span> *config</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.26.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="gst-photography-get-config"></a><h3>gst_photography_get_config ()</h3>
-<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_photography_get_config (<em class="parameter"><code><a class="link" href="GstPhotography.html" title="GstPhotography"><span class="type">GstPhotography</span></a> *photo</code></em>,
-                            <em class="parameter"><code><span class="type">GstPhotographySettings</span> *config</code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.9.27.5"></a><h4>Returns</h4>
-<p></p>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="GstPhotography-struct"></a><h3>GstPhotography</h3>
-<pre class="programlisting">typedef struct _GstPhotography GstPhotography;</pre>
-<p>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS"></a><h3>GST_PHOTOGRAPHY_AUTOFOCUS_DONE</h3>
-<pre class="programlisting">#define GST_PHOTOGRAPHY_AUTOFOCUS_DONE "autofocus-done"
-</pre>
-<p>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GST-PHOTOGRAPHY-SHAKE-RISK:CAPS"></a><h3>GST_PHOTOGRAPHY_SHAKE_RISK</h3>
-<pre class="programlisting">#define GST_PHOTOGRAPHY_SHAKE_RISK "shake-risk"
-</pre>
-<p>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyNoiseReduction"></a><h3>enum GstPhotographyNoiseReduction</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.5.4"></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-PHOTOGRAPHY-NOISE-REDUCTION-BAYER:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-YCC:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-TEMPORAL:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-FIXED:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-NOISE-REDUCTION-EXTRA:CAPS"></a>GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyWhiteBalanceMode"></a><h3>enum GstPhotographyWhiteBalanceMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.6.4"></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-PHOTOGRAPHY-WB-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_AUTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-DAYLIGHT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-CLOUDY:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_CLOUDY</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-SUNSET:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_SUNSET</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-TUNGSTEN:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-FLUORESCENT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_MANUAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-WARM-FLUORESCENT:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-WB-MODE-SHADE:CAPS"></a>GST_PHOTOGRAPHY_WB_MODE_SHADE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyColorToneMode"></a><h3>enum GstPhotographyColorToneMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.7.4"></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-PHOTOGRAPHY-COLOR-TONE-MODE-NORMAL:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SEPIA:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NEGATIVE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRAYSCALE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-NATURAL:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-VIVID:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-COLORSWAP:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SOLARIZE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-OUT-OF-FOCUS:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKY-BLUE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-GRASS-GREEN:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-SKIN-WHITEN:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-POSTERIZE:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_POSTERIZE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-WHITEBOARD:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_WHITEBOARD</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-BLACKBOARD:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_BLACKBOARD</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-COLOR-TONE-MODE-AQUA:CAPS"></a>GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographySceneMode"></a><h3>enum GstPhotographySceneMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.8.4"></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-PHOTOGRAPHY-SCENE-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_MANUAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-CLOSEUP:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-LANDSCAPE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SPORT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SPORT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_NIGHT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_AUTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-ACTION:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_ACTION</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-NIGHT-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_NIGHT_PORTRAIT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-THEATRE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_THEATRE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-BEACH:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_BEACH</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SNOW:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SNOW</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-SUNSET:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_SUNSET</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-STEADY-PHOTO:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_STEADY_PHOTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-FIREWORKS:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_FIREWORKS</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-PARTY:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_PARTY</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-CANDLELIGHT:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_CANDLELIGHT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SCENE-MODE-BARCODE:CAPS"></a>GST_PHOTOGRAPHY_SCENE_MODE_BARCODE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyFlashMode"></a><h3>enum GstPhotographyFlashMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.9.4"></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-PHOTOGRAPHY-FLASH-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_AUTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-OFF:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_OFF</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-ON:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_ON</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-FILL-IN:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLASH-MODE-RED-EYE:CAPS"></a>GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyFlickerReductionMode"></a><h3>enum GstPhotographyFlickerReductionMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.10.4"></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-PHOTOGRAPHY-FLICKER-REDUCTION-OFF:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-50HZ:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-60HZ:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FLICKER-REDUCTION-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyFocusMode"></a><h3>enum GstPhotographyFocusMode</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.11.4"></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-PHOTOGRAPHY-FOCUS-MODE-AUTO:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_AUTO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-MACRO:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_MACRO</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-PORTRAIT:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-INFINITY:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-HYPERFOCAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-EXTENDED:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-NORMAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-CONTINUOUS-EXTENDED:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-MODE-MANUAL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyFocusStatus"></a><h3>enum GstPhotographyFocusStatus</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.12.4"></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-PHOTOGRAPHY-FOCUS-STATUS-NONE:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_NONE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-RUNNING:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-FAIL:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-FOCUS-STATUS-SUCCESS:CAPS"></a>GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyCaps"></a><h3>enum GstPhotographyCaps</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.13.4"></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-PHOTOGRAPHY-CAPS-NONE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_NONE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-EV-COMP:CAPS"></a>GST_PHOTOGRAPHY_CAPS_EV_COMP</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ISO-SPEED:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ISO_SPEED</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-WB-MODE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_WB_MODE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-TONE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_TONE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-SCENE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_SCENE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FLASH:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FLASH</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ZOOM:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ZOOM</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FOCUS:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FOCUS</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-APERTURE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_APERTURE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-EXPOSURE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_EXPOSURE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-SHAKE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_SHAKE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-WHITE-BALANCE:CAPS"></a>GST_PHOTOGRAPHY_CAPS_WHITE_BALANCE</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-NOISE-REDUCTION:CAPS"></a>GST_PHOTOGRAPHY_CAPS_NOISE_REDUCTION</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-FLICKER-REDUCTION:CAPS"></a>GST_PHOTOGRAPHY_CAPS_FLICKER_REDUCTION</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-CAPS-ALL:CAPS"></a>GST_PHOTOGRAPHY_CAPS_ALL</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotographyShakeRisk"></a><h3>enum GstPhotographyShakeRisk</h3>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.4.2.10.14.4"></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-PHOTOGRAPHY-SHAKE-RISK-LOW:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_LOW</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SHAKE-RISK-MEDIUM:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="GST-PHOTOGRAPHY-SHAKE-RISK-HIGH:CAPS"></a>GST_PHOTOGRAPHY_SHAKE_RISK_HIGH</p></td>
-<td class="enum_member_description"> </td>
-<td class="enum_member_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="GstPhotography.property-details"></a><h2>Property Details</h2>
-<div class="refsect2">
-<a name="GstPhotography--aperture"></a><h3>The <code class="literal">“aperture”</code> property</h3>
-<pre class="programlisting">  “aperture”                 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Aperture defines the size of lens opening  (0 = auto).</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &lt;= 255</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--capabilities"></a><h3>The <code class="literal">“capabilities”</code> property</h3>
-<pre class="programlisting">  “capabilities”             <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a></pre>
-<p>Tells the photo capabilities of the device.</p>
-<p>Flags: Read</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--colour-tone-mode"></a><h3>The <code class="literal">“colour-tone-mode”</code> property</h3>
-<pre class="programlisting">  “colour-tone-mode”         <span class="type">GstColourToneMode</span></pre>
-<p>Colour tone setting changes colour shading in the photo.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--ev-compensation"></a><h3>The <code class="literal">“ev-compensation”</code> property</h3>
-<pre class="programlisting">  “ev-compensation”          <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre>
-<p>EV compensation affects the brightness of the image.</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: [-2.5,2.5]</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--exposure"></a><h3>The <code class="literal">“exposure”</code> property</h3>
-<pre class="programlisting">  “exposure”                 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Exposure time defines how long the shutter will stay open (0 = auto).</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--flash-mode"></a><h3>The <code class="literal">“flash-mode”</code> property</h3>
-<pre class="programlisting">  “flash-mode”               <a class="link" href="GstPhotography.html#GstPhotographyFlashMode" title="enum GstPhotographyFlashMode"><span class="type">GstPhotographyFlashMode</span></a></pre>
-<p>Flash mode defines how the flash light should be used.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_FLASH_MODE_AUTO</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--flicker-mode"></a><h3>The <code class="literal">“flicker-mode”</code> property</h3>
-<pre class="programlisting">  “flicker-mode”             <a class="link" href="GstPhotography.html#GstPhotographyFlickerReductionMode" title="enum GstPhotographyFlickerReductionMode"><span class="type">GstPhotographyFlickerReductionMode</span></a></pre>
-<p>Flicker reduction mode defines a line frequency for flickering prevention.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--focus-mode"></a><h3>The <code class="literal">“focus-mode”</code> property</h3>
-<pre class="programlisting">  “focus-mode”               <a class="link" href="GstPhotography.html#GstPhotographyFocusMode" title="enum GstPhotographyFocusMode"><span class="type">GstPhotographyFocusMode</span></a></pre>
-<p>Focus mode defines the range of focal lengths to use in autofocus search.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_FOCUS_MODE_AUTO</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--image-capture-supported-caps"></a><h3>The <code class="literal">“image-capture-supported-caps”</code> property</h3>
-<pre class="programlisting">  “image-capture-supported-caps” <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</pre>
-<p>Caps describing supported image capture formats.</p>
-<p>Flags: Read</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--iso-speed"></a><h3>The <code class="literal">“iso-speed”</code> property</h3>
-<pre class="programlisting">  “iso-speed”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>ISO speed defines the light sensitivity (0 = auto).</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &lt;= 6400</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--scene-mode"></a><h3>The <code class="literal">“scene-mode”</code> property</h3>
-<pre class="programlisting">  “scene-mode”               <a class="link" href="GstPhotography.html#GstPhotographySceneMode" title="enum GstPhotographySceneMode"><span class="type">GstPhotographySceneMode</span></a></pre>
-<p>Scene mode works as a preset for different photo shooting mode settings.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_SCENE_MODE_AUTO</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--white-balance-mode"></a><h3>The <code class="literal">“white-balance-mode”</code> property</h3>
-<pre class="programlisting">  “white-balance-mode”       <a class="link" href="GstPhotography.html#GstPhotographyWhiteBalanceMode" title="enum GstPhotographyWhiteBalanceMode"><span class="type">GstPhotographyWhiteBalanceMode</span></a></pre>
-<p>White balance affects the color temperature of the photo.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_WB_MODE_AUTO</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--image-preview-supported-caps"></a><h3>The <code class="literal">“image-preview-supported-caps”</code> property</h3>
-<pre class="programlisting">  “image-preview-supported-caps” <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</pre>
-<p>Caps describing supported image preview formats.</p>
-<p>Flags: Read</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--noise-reduction"></a><h3>The <code class="literal">“noise-reduction”</code> property</h3>
-<pre class="programlisting">  “noise-reduction”          <a class="link" href="GstPhotography.html#GstPhotographyNoiseReduction" title="enum GstPhotographyNoiseReduction"><span class="type">GstPhotographyNoiseReduction</span></a></pre>
-<p>Which noise reduction modes are enabled (0 = disabled).</p>
-<p>Flags: Read / Write</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--zoom"></a><h3>The <code class="literal">“zoom”</code> property</h3>
-<pre class="programlisting">  “zoom”                     <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre>
-<p>How much the resulted image will be zoomed.</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: [1,10]</p>
-<p>Default value: 1</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--analog-gain"></a><h3>The <code class="literal">“analog-gain”</code> property</h3>
-<pre class="programlisting">  “analog-gain”              <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre>
-<p>Analog gain applied to the sensor.</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 1</p>
-<p>Default value: 1</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--color-temperature"></a><h3>The <code class="literal">“color-temperature”</code> property</h3>
-<pre class="programlisting">  “color-temperature”        <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Color temperature in Kelvin units for manual white balance.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--color-tone-mode"></a><h3>The <code class="literal">“color-tone-mode”</code> property</h3>
-<pre class="programlisting">  “color-tone-mode”          <a class="link" href="GstPhotography.html#GstPhotographyColorToneMode" title="enum GstPhotographyColorToneMode"><span class="type">GstPhotographyColorToneMode</span></a></pre>
-<p>Color tone setting changes color shading in the photo.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--exposure-time"></a><h3>The <code class="literal">“exposure-time”</code> property</h3>
-<pre class="programlisting">  “exposure-time”            <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Exposure time defines how long the shutter will stay open (0 = auto).</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--lens-focus"></a><h3>The <code class="literal">“lens-focus”</code> property</h3>
-<pre class="programlisting">  “lens-focus”               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre>
-<p>Focus point in diopter units.</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--max-exposure-time"></a><h3>The <code class="literal">“max-exposure-time”</code> property</h3>
-<pre class="programlisting">  “max-exposure-time”        <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Maximum exposure time for automatic exposure mode.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--min-exposure-time"></a><h3>The <code class="literal">“min-exposure-time”</code> property</h3>
-<pre class="programlisting">  “min-exposure-time”        <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Minimum exposure time for automatic exposure mode.</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstPhotography--white-point"></a><h3>The <code class="literal">“white-point”</code> property</h3>
-<pre class="programlisting">  “white-point”              <a href="https://developer.gnome.org/gobject/unstable/gobject-Value-arrays.html#GValueArray"><span class="type">GValueArray</span></a> *</pre>
-<p>Describe color white as raw values.</p>
-<p>Flags: Read / Write</p>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/plugins/html/ch01.html b/docs/plugins/html/ch01.html
index b67c745..45e03bd 100644
--- a/docs/plugins/html/ch01.html
+++ b/docs/plugins/html/ch01.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: gst-plugins-bad Elements</title>
+<title>gst-plugins-bad Elements: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
 <link rel="prev" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
 <link rel="next" href="gst-plugins-bad-plugins-accurip.html" title="accurip">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -24,240 +24,269 @@
 <a name="id-1.2"></a>gst-plugins-bad Elements</h1></div></div></div>
 <div class="toc"><dl class="toc">
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-accurip.html">accurip</a></span><span class="refpurpose"> — Computes an AccurateRip CRC</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-accurip.html">accurip</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-assrender.html">assrender</a></span><span class="refpurpose"> — Renders ASS/SSA subtitles with libass</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-aiffparse.html">aiffparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-autoconvert.html">autoconvert</a></span><span class="refpurpose"> — Selects the right transform element based on the caps</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-aiffmux.html">aiffmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bulge.html">bulge</a></span><span class="refpurpose"> — Adds a protuberance in the center point</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-assrender.html">assrender</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-burn.html">burn</a></span><span class="refpurpose"> — Burn adjusts the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-audiomixer.html">audiomixer</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-camerabin.html">camerabin</a></span><span class="refpurpose"> — Take image snapshots and record movies from camera</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-autoconvert.html">autoconvert</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-chromium.html">chromium</a></span><span class="refpurpose"> — Chromium breaks the colors of the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bs2b.html">bs2b</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-circle.html">circle</a></span><span class="refpurpose"> — Warps the picture into an arc shaped form</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bulge.html">bulge</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filter</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-burn.html">burn</a></span><span class="refpurpose"></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>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-camerabin.html">camerabin</a></span><span class="refpurpose"></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>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-chromium.html">chromium</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cverode.html">cverode</a></span><span class="refpurpose"> — Applies cvErode OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-circle.html">circle</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvequalizehist.html">cvequalizehist</a></span><span class="refpurpose"> — Applies cvEqualizeHist OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvlaplace.html">cvlaplace</a></span><span class="refpurpose"> — Applies cvLaplace OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-compositor.html">compositor</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsmooth.html">cvsmooth</a></span><span class="refpurpose"> — Applies cvSmooth OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvdilate.html">cvdilate</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsobel.html">cvsobel</a></span><span class="refpurpose"> — Applies cvSobel OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cverode.html">cverode</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"> — Handles data: uris</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvequalizehist.html">cvequalizehist</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-diffuse.html">diffuse</a></span><span class="refpurpose"> — Diffuses the image by moving its pixels in random directions</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvlaplace.html">cvlaplace</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dilate.html">dilate</a></span><span class="refpurpose"> — Dilate copies the brightest pixel around.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsmooth.html">cvsmooth</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dodge.html">dodge</a></span><span class="refpurpose"> — Dodge saturates the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsobel.html">cvsobel</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtmfdetect.html">dtmfdetect</a></span><span class="refpurpose"> — This element detects DTMF tones</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtsdec.html">dtsdec</a></span><span class="refpurpose"> — Decodes DTS audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-diffuse.html">diffuse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvbsrc.html">dvbsrc</a></span><span class="refpurpose"> — Digital Video Broadcast Source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dilate.html">dilate</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvdspu.html">dvdspu</a></span><span class="refpurpose"> — Parses Sub-Picture command streams and renders the SPU overlay onto the video as it passes through</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dodge.html">dodge</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-exclusion.html">exclusion</a></span><span class="refpurpose"> — Exclusion exclodes the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtmfdetect.html">dtmfdetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-edgedetect.html">edgedetect</a></span><span class="refpurpose"> — Performs canny edge detection on videos and images.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtsdec.html">dtsdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-eglglessink.html">eglglessink</a></span><span class="refpurpose"> — An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvbsrc.html">dvbsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faac.html">faac</a></span><span class="refpurpose"> — Free MPEG-2/4 AAC encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvdspu.html">dvdspu</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faad.html">faad</a></span><span class="refpurpose"> — Free MPEG-2/4 AAC decoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-exclusion.html">exclusion</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faceblur.html">faceblur</a></span><span class="refpurpose"> — Blurs faces in images and videos</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-edgedetect.html">edgedetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-facedetect.html">facedetect</a></span><span class="refpurpose"> — Performs face detection on videos and images, providing detected positions via bus messages</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faac.html">faac</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-festival.html">festival</a></span><span class="refpurpose"> — Synthesizes plain text into audio</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faad.html">faad</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fisheye.html">fisheye</a></span><span class="refpurpose"> — Simulate a fisheye lens by zooming on the center of the image and compressing the edges</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faceblur.html">faceblur</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fpsdisplaysink.html">fpsdisplaysink</a></span><span class="refpurpose"> — Shows the current frame-rate and drop-rate of the videosink as overlay or text on stdout</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-facedetect.html">facedetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-gaussianblur.html">gaussianblur</a></span><span class="refpurpose"> — Perform Gaussian blur/sharpen on a video</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-festival.html">festival</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fisheye.html">fisheye</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fpsdisplaysink.html">fpsdisplaysink</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-gaussianblur.html">gaussianblur</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-jpegparse.html">jpegparse</a></span><span class="refpurpose"> — JPEG parser</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-kaleidoscope.html">kaleidoscope</a></span><span class="refpurpose"> — Applies 'kaleidoscope' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-kaleidoscope.html">kaleidoscope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-liveadder.html">liveadder</a></span><span class="refpurpose"> — Mixes live/discontinuous audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-liveadder.html">liveadder</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-marble.html">marble</a></span><span class="refpurpose"> — Applies a marbling effect to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-marble.html">marble</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimenc.html">mimenc</a></span><span class="refpurpose"> — MSN Messenger compatible Mimic video encoder element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimenc.html">mimenc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimdec.html">mimdec</a></span><span class="refpurpose"> — MSN Messenger compatible Mimic video decoder element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimdec.html">mimdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mirror.html">mirror</a></span><span class="refpurpose"> — Split the image into two halves and reflect one over each other</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mirror.html">mirror</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-modplug.html">modplug</a></span><span class="refpurpose"> — Module decoder based on modplug engine</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-modplug.html">modplug</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"> — High-quality MPEG-1/2 video encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mplex.html">mplex</a></span><span class="refpurpose"> — High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpegpsmux.html">mpegpsmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpg123audiodec.html">mpg123audiodec</a></span><span class="refpurpose"> — Decodes mp3 streams using the mpg123 library</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-neonhttpsrc.html">neonhttpsrc</a></span><span class="refpurpose"> — Receive data as a client over the network via HTTP using NEON</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mplex.html">mplex</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-ofa.html">ofa</a></span><span class="refpurpose"> — Find a music fingerprint using MusicIP's libofa</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpg123audiodec.html">mpg123audiodec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsrc.html">openalsrc</a></span><span class="refpurpose"> — Input audio through OpenAL</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-neonhttpsrc.html">neonhttpsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsink.html">openalsink</a></span><span class="refpurpose"> — Output audio through OpenAL</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-ofa.html">ofa</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pcapparse.html">pcapparse</a></span><span class="refpurpose"> — Parses a raw pcap stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsrc.html">openalsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pinch.html">pinch</a></span><span class="refpurpose"> — Applies 'pinch' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsink.html">openalsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pyramidsegment.html">pyramidsegment</a></span><span class="refpurpose"> — Applies pyramid segmentation to a video or image.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusdec.html">opusdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"> — Creates a rfb video stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusenc.html">opusenc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsink.html">rtmpsink</a></span><span class="refpurpose"> — Sends FLV content to a server via RTMP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusparse.html">opusparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsrc.html">rtmpsrc</a></span><span class="refpurpose"> — Read RTMP streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtpopuspay.html">rtpopuspay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsink.html">shmsink</a></span><span class="refpurpose"> — Send data over shared memory to the matching source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtpopusdepay.html">rtpopusdepay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsrc.html">shmsrc</a></span><span class="refpurpose"> — Receive data from the shared memory sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pcapparse.html">pcapparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sdpdemux.html">sdpdemux</a></span><span class="refpurpose"> — Receive data over the network via SDP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pinch.html">pinch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-solarize.html">solarize</a></span><span class="refpurpose"> — Solarize tunable inverse in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pyramidsegment.html">pyramidsegment</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spacescope.html">spacescope</a></span><span class="refpurpose"> — Simple stereo visualizer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spectrascope.html">spectrascope</a></span><span class="refpurpose"> — Simple frequency spectrum scope</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsink.html">rtmpsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-synaescope.html">synaescope</a></span><span class="refpurpose"> — Creates video visualizations of audio input, using stereo and pitch information</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsrc.html">rtmpsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-speed.html">speed</a></span><span class="refpurpose"> — Set speed/pitch on audio/raw streams (resampler)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsink.html">shmsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sphere.html">sphere</a></span><span class="refpurpose"> — Applies 'sphere' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsrc.html">shmsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-square.html">square</a></span><span class="refpurpose"> — Distort center part of the image into a square</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sdpdemux.html">sdpdemux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-stretch.html">stretch</a></span><span class="refpurpose"> — Stretch the image in a circle around the center point</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-solarize.html">solarize</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-templatematch.html">templatematch</a></span><span class="refpurpose"> — Performs template matching on videos and images, providing detected positions via bus messages.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spacescope.html">spacescope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opencvtextoverlay.html">opencvtextoverlay</a></span><span class="refpurpose"> — Write text on the top of video</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spectrascope.html">spectrascope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-tunnel.html">tunnel</a></span><span class="refpurpose"> — Light tunnel effect</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-synaescope.html">synaescope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-twirl.html">twirl</a></span><span class="refpurpose"> — Twists the image from the center out</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-speed.html">speed</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-videoparse.html">videoparse</a></span><span class="refpurpose"> — Converts stream into video frames</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sphere.html">sphere</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-waterripple.html">waterripple</a></span><span class="refpurpose"> — Creates a water ripple effect on the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-square.html">square</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-zbar.html">zbar</a></span><span class="refpurpose"> — Detect bar codes in the video streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-stretch.html">stretch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voaacenc.html">voaacenc</a></span><span class="refpurpose"> — AAC audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-templatematch.html">templatematch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"> — Adaptive Multi-Rate Wideband audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opencvtextoverlay.html">opencvtextoverlay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-wavescope.html">wavescope</a></span><span class="refpurpose"> — Simple waveform oscilloscope</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-tunnel.html">tunnel</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-twirl.html">twirl</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-videoparse.html">videoparse</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-waterripple.html">waterripple</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-zbar.html">zbar</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voaacenc.html">voaacenc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-wavescope.html">wavescope</a></span><span class="refpurpose"></span>
 </dt>
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/ch02.html b/docs/plugins/html/ch02.html
index f6ec1e4..2467873 100644
--- a/docs/plugins/html/ch02.html
+++ b/docs/plugins/html/ch02.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: gst-plugins-bad Plugins</title>
+<title>gst-plugins-bad Plugins: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
 <link rel="prev" href="gst-plugins-bad-plugins-wavescope.html" title="wavescope">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-audiovisualizers.html" title="audiovisualizers">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-aiff.html" title="aiff">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,145 +17,156 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-wavescope.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-audiovisualizers.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-aiff.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><h1 class="title">
 <a name="id-1.3"></a>gst-plugins-bad Plugins</h1></div></div></div>
 <div class="toc"><dl class="toc">
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiovisualizers.html">audiovisualizers</a></span><span class="refpurpose">Creates video visualizations of audio input</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-aiff.html">aiff</a></span><span class="refpurpose"> — Create and parse Audio Interchange File Format (AIFF) files</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-autoconvert.html">autoconvert</a></span><span class="refpurpose">Selects convertor element based on caps</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiomixer.html">audiomixer</a></span><span class="refpurpose"> — Mixes multiple audio streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-assrender.html">assrender</a></span><span class="refpurpose">ASS/SSA subtitle renderer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiovisualizers.html">audiovisualizers</a></span><span class="refpurpose"> — Creates video visualizations of audio input</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bayer.html">bayer</a></span><span class="refpurpose">Elements to convert Bayer images</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-autoconvert.html">autoconvert</a></span><span class="refpurpose"> — Selects convertor element based on caps</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bz2.html">bz2</a></span><span class="refpurpose">Compress or decompress streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-assrender.html">assrender</a></span><span class="refpurpose"> — ASS/SSA subtitle renderer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-camerabin.html">camerabin</a></span><span class="refpurpose">Take image snapshots and record movies from camera</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bayer.html">bayer</a></span><span class="refpurpose"> — Elements to convert Bayer images</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-coloreffects.html">coloreffects</a></span><span class="refpurpose">Color Look-up Table filters</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bs2b.html">bs2b</a></span><span class="refpurpose"> — Improve headphone listening of stereo audio recordsusing the bs2b library.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-curl.html">curl</a></span><span class="refpurpose">libcurl-based elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bz2.html">bz2</a></span><span class="refpurpose"> — Compress or decompress streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dataurisrc.html">dataurisrc</a></span><span class="refpurpose">data: URI source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-camerabin.html">camerabin</a></span><span class="refpurpose"> — Take image snapshots and record movies from camera</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-debugutilsbad.html">debugutilsbad</a></span><span class="refpurpose">Collection of elements that may or may not be useful for debugging</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filters</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dtsdec.html">dtsdec</a></span><span class="refpurpose">Decodes DTS audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-curl.html">curl</a></span><span class="refpurpose"> — libcurl-based elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvb.html">dvb</a></span><span class="refpurpose">DVB elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"> — data: URI source</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvdspu.html">dvdspu</a></span><span class="refpurpose">DVD Sub-picture Overlay element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-debugutilsbad.html">debugutilsbad</a></span><span class="refpurpose"> — Collection of elements that may or may not be useful for debugging</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-eglglessink.html">eglglessink</a></span><span class="refpurpose">EGL/GLES sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dtsdec.html">dtsdec</a></span><span class="refpurpose"> — Decodes DTS audio streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faac.html">faac</a></span><span class="refpurpose">Free AAC Encoder (FAAC)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvb.html">dvb</a></span><span class="refpurpose"> — DVB elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faad.html">faad</a></span><span class="refpurpose">Free AAC Decoder (FAAD)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvdspu.html">dvdspu</a></span><span class="refpurpose"> — DVD Sub-picture Overlay element</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-festival.html">festival</a></span><span class="refpurpose">Synthesizes plain text into audio</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faac.html">faac</a></span><span class="refpurpose"> — Free AAC Encoder (FAAC)</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gaudieffects.html">gaudieffects</a></span><span class="refpurpose">Gaudi video effects.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faad.html">faad</a></span><span class="refpurpose"> — Free AAC Decoder (FAAD)</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-geometrictransform.html">geometrictransform</a></span><span class="refpurpose">Various geometric image transform elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-festival.html">festival</a></span><span class="refpurpose"> — Synthesizes plain text into audio</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gsm.html">gsm</a></span><span class="refpurpose">GSM encoder/decoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gaudieffects.html">gaudieffects</a></span><span class="refpurpose"> — Gaudi video effects.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-jpegformat.html">jpegformat</a></span><span class="refpurpose">JPEG interchange format plugin</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-geometrictransform.html">geometrictransform</a></span><span class="refpurpose"> — Various geometric image transform elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-liveadder.html">liveadder</a></span><span class="refpurpose">Adds multiple live discontinuous streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gsm.html">gsm</a></span><span class="refpurpose"> — GSM encoder/decoder</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mimic.html">mimic</a></span><span class="refpurpose">Mimic codec</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-jpegformat.html">jpegformat</a></span><span class="refpurpose"> — JPEG interchange format plugin</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mms.html">mms</a></span><span class="refpurpose">Microsoft Multi Media Server streaming protocol support</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-liveadder.html">liveadder</a></span><span class="refpurpose"> — Adds multiple live discontinuous streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-modplug.html">modplug</a></span><span class="refpurpose">.MOD audio decoding</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mimic.html">mimic</a></span><span class="refpurpose"> — Mimic codec</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose">High-quality MPEG-1/2 video encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mms.html">mms</a></span><span class="refpurpose"> — Microsoft Multi Media Server streaming protocol support</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose">MPEG-TS muxer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-modplug.html">modplug</a></span><span class="refpurpose"> — .MOD audio decoding</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mplex.html">mplex</a></span><span class="refpurpose">High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"> — High-quality MPEG-1/2 video encoder</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-neon.html">neon</a></span><span class="refpurpose">lib neon http client src</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegpsmux.html">mpegpsmux</a></span><span class="refpurpose"> — MPEG-PS muxer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-ofa.html">ofa</a></span><span class="refpurpose">Calculate MusicIP fingerprint from audio files</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose"> — MPEG-TS muxer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-openal.html">openal</a></span><span class="refpurpose">OpenAL plugin library</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mplex.html">mplex</a></span><span class="refpurpose"> — High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opencv.html">opencv</a></span><span class="refpurpose">GStreamer OpenCV Plugins</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-neon.html">neon</a></span><span class="refpurpose"> — lib neon http client src</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-pcapparse.html">pcapparse</a></span><span class="refpurpose">Element parsing raw pcap streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-ofa.html">ofa</a></span><span class="refpurpose"> — Calculate MusicIP fingerprint from audio files</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rawparse.html">rawparse</a></span><span class="refpurpose">Parses byte streams into raw frames</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-openal.html">openal</a></span><span class="refpurpose"> — OpenAL plugin library</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rfbsrc.html">rfbsrc</a></span><span class="refpurpose">Connects to a VNC server and decodes RFB stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opencv.html">opencv</a></span><span class="refpurpose"> — GStreamer OpenCV Plugins</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rtmp.html">rtmp</a></span><span class="refpurpose">RTMP source and sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opus.html">opus</a></span><span class="refpurpose"> — OPUS plugin library</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-sdp.html">sdp</a></span><span class="refpurpose">configure streaming sessions using SDP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-pcapparse.html">pcapparse</a></span><span class="refpurpose"> — Element parsing raw pcap streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-shm.html">shm</a></span><span class="refpurpose">shared memory sink source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rawparse.html">rawparse</a></span><span class="refpurpose"> — Parses byte streams into raw frames</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-soundtouch.html">soundtouch</a></span><span class="refpurpose">Audio Pitch Controller &amp; BPM Detection</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"> — Connects to a VNC server and decodes RFB stream</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-speed.html">speed</a></span><span class="refpurpose">Set speed/pitch on audio/raw streams (resampler)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rtmp.html">rtmp</a></span><span class="refpurpose"> — RTMP source and sink</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voaacenc.html">voaacenc</a></span><span class="refpurpose">AAC audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-sdp.html">sdp</a></span><span class="refpurpose"> — configure streaming sessions using SDP</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose">Adaptive Multi-Rate Wide-Band Encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-shm.html">shm</a></span><span class="refpurpose"> — shared memory sink source</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-zbar.html">zbar</a></span><span class="refpurpose">zbar barcode scanner</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-soundtouch.html">soundtouch</a></span><span class="refpurpose"> — Audio Pitch Controller &amp; BPM Detection</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-speed.html">speed</a></span><span class="refpurpose"> — Set speed/pitch on audio/raw streams (resampler)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voaacenc.html">voaacenc</a></span><span class="refpurpose"> — AAC audio encoder</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"> — Adaptive Multi-Rate Wide-Band Encoder</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-zbar.html">zbar</a></span><span class="refpurpose"> — zbar barcode scanner</span>
 </dt>
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/ch03.html b/docs/plugins/html/ch03.html
deleted file mode 100644
index 0bf4d7a..0000000
--- a/docs/plugins/html/ch03.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!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: gst-plugins-bad Interfaces</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="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-zbar.html" title="zbar">
-<link rel="next" href="GstPhotography.html" title="GstPhotography">
-<meta name="generator" content="GTK-Doc V1.21 (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="5"><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><img src="up-insensitive.png" width="16" height="16" border="0"></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-zbar.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="GstPhotography.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><h1 class="title">
-<a name="id-1.4"></a>gst-plugins-bad Interfaces</h1></div></div></div>
-<div class="toc"><dl class="toc"><dt>
-<span class="refentrytitle"><a href="GstPhotography.html">GstPhotography</a></span><span class="refpurpose"></span>
-</dt></dl></div>
-</div>
-<div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
-</body>
-</html>
\ No newline at end of file
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 60c2f58..a235c15 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2
+++ b/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2
@@ -1,11 +1,14 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
-<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
 <book xmlns="http://www.devhelp.net/book" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual" link="index.html" author="" name="gst-plugins-bad-plugins-1.0" version="2" language="c">
   <chapters>
     <sub name="gst-plugins-bad Elements" link="ch01.html">
       <sub name="accurip" link="gst-plugins-bad-plugins-accurip.html"/>
+      <sub name="aiffparse" link="gst-plugins-bad-plugins-aiffparse.html"/>
+      <sub name="aiffmux" link="gst-plugins-bad-plugins-aiffmux.html"/>
       <sub name="assrender" link="gst-plugins-bad-plugins-assrender.html"/>
+      <sub name="audiomixer" link="gst-plugins-bad-plugins-audiomixer.html"/>
       <sub name="autoconvert" link="gst-plugins-bad-plugins-autoconvert.html"/>
+      <sub name="bs2b" link="gst-plugins-bad-plugins-bs2b.html"/>
       <sub name="bulge" link="gst-plugins-bad-plugins-bulge.html"/>
       <sub name="burn" link="gst-plugins-bad-plugins-burn.html"/>
       <sub name="camerabin" link="gst-plugins-bad-plugins-camerabin.html"/>
@@ -29,7 +32,6 @@
       <sub name="dvdspu" link="gst-plugins-bad-plugins-dvdspu.html"/>
       <sub name="exclusion" link="gst-plugins-bad-plugins-exclusion.html"/>
       <sub name="edgedetect" link="gst-plugins-bad-plugins-edgedetect.html"/>
-      <sub name="eglglessink" link="gst-plugins-bad-plugins-eglglessink.html"/>
       <sub name="faac" link="gst-plugins-bad-plugins-faac.html"/>
       <sub name="faad" link="gst-plugins-bad-plugins-faad.html"/>
       <sub name="faceblur" link="gst-plugins-bad-plugins-faceblur.html"/>
@@ -47,12 +49,19 @@
       <sub name="mirror" link="gst-plugins-bad-plugins-mirror.html"/>
       <sub name="modplug" link="gst-plugins-bad-plugins-modplug.html"/>
       <sub name="mpeg2enc" link="gst-plugins-bad-plugins-mpeg2enc.html"/>
+      <sub name="mpegpsmux" link="gst-plugins-bad-plugins-mpegpsmux.html"/>
+      <sub name="mpegtsmux" link="gst-plugins-bad-plugins-mpegtsmux.html"/>
       <sub name="mplex" link="gst-plugins-bad-plugins-mplex.html"/>
       <sub name="mpg123audiodec" link="gst-plugins-bad-plugins-mpg123audiodec.html"/>
       <sub name="neonhttpsrc" link="gst-plugins-bad-plugins-neonhttpsrc.html"/>
       <sub name="ofa" link="gst-plugins-bad-plugins-ofa.html"/>
       <sub name="openalsrc" link="gst-plugins-bad-plugins-openalsrc.html"/>
       <sub name="openalsink" link="gst-plugins-bad-plugins-openalsink.html"/>
+      <sub name="opusdec" link="gst-plugins-bad-plugins-opusdec.html"/>
+      <sub name="opusenc" link="gst-plugins-bad-plugins-opusenc.html"/>
+      <sub name="opusparse" link="gst-plugins-bad-plugins-opusparse.html"/>
+      <sub name="rtpopuspay" link="gst-plugins-bad-plugins-rtpopuspay.html"/>
+      <sub name="rtpopusdepay" link="gst-plugins-bad-plugins-rtpopusdepay.html"/>
       <sub name="pcapparse" link="gst-plugins-bad-plugins-pcapparse.html"/>
       <sub name="pinch" link="gst-plugins-bad-plugins-pinch.html"/>
       <sub name="pyramidsegment" link="gst-plugins-bad-plugins-pyramidsegment.html"/>
@@ -82,10 +91,13 @@
       <sub name="wavescope" link="gst-plugins-bad-plugins-wavescope.html"/>
     </sub>
     <sub name="gst-plugins-bad Plugins" link="ch02.html">
+      <sub name="aiff" link="gst-plugins-bad-plugins-plugin-aiff.html"/>
+      <sub name="audiomixer" link="gst-plugins-bad-plugins-plugin-audiomixer.html"/>
       <sub name="audiovisualizers" link="gst-plugins-bad-plugins-plugin-audiovisualizers.html"/>
       <sub name="autoconvert" link="gst-plugins-bad-plugins-plugin-autoconvert.html"/>
       <sub name="assrender" link="gst-plugins-bad-plugins-plugin-assrender.html"/>
       <sub name="bayer" link="gst-plugins-bad-plugins-plugin-bayer.html"/>
+      <sub name="bs2b" link="gst-plugins-bad-plugins-plugin-bs2b.html"/>
       <sub name="bz2" link="gst-plugins-bad-plugins-plugin-bz2.html"/>
       <sub name="camerabin" link="gst-plugins-bad-plugins-plugin-camerabin.html"/>
       <sub name="coloreffects" link="gst-plugins-bad-plugins-plugin-coloreffects.html"/>
@@ -95,7 +107,6 @@
       <sub name="dtsdec" link="gst-plugins-bad-plugins-plugin-dtsdec.html"/>
       <sub name="dvb" link="gst-plugins-bad-plugins-plugin-dvb.html"/>
       <sub name="dvdspu" link="gst-plugins-bad-plugins-plugin-dvdspu.html"/>
-      <sub name="eglglessink" link="gst-plugins-bad-plugins-plugin-eglglessink.html"/>
       <sub name="faac" link="gst-plugins-bad-plugins-plugin-faac.html"/>
       <sub name="faad" link="gst-plugins-bad-plugins-plugin-faad.html"/>
       <sub name="festival" link="gst-plugins-bad-plugins-plugin-festival.html"/>
@@ -108,12 +119,14 @@
       <sub name="mms" link="gst-plugins-bad-plugins-plugin-mms.html"/>
       <sub name="modplug" link="gst-plugins-bad-plugins-plugin-modplug.html"/>
       <sub name="mpeg2enc" link="gst-plugins-bad-plugins-plugin-mpeg2enc.html"/>
+      <sub name="mpegpsmux" link="gst-plugins-bad-plugins-plugin-mpegpsmux.html"/>
       <sub name="mpegtsmux" link="gst-plugins-bad-plugins-plugin-mpegtsmux.html"/>
       <sub name="mplex" link="gst-plugins-bad-plugins-plugin-mplex.html"/>
       <sub name="neon" link="gst-plugins-bad-plugins-plugin-neon.html"/>
       <sub name="ofa" link="gst-plugins-bad-plugins-plugin-ofa.html"/>
       <sub name="openal" link="gst-plugins-bad-plugins-plugin-openal.html"/>
       <sub name="opencv" link="gst-plugins-bad-plugins-plugin-opencv.html"/>
+      <sub name="opus" link="gst-plugins-bad-plugins-plugin-opus.html"/>
       <sub name="pcapparse" link="gst-plugins-bad-plugins-plugin-pcapparse.html"/>
       <sub name="rawparse" link="gst-plugins-bad-plugins-plugin-rawparse.html"/>
       <sub name="rfbsrc" link="gst-plugins-bad-plugins-plugin-rfbsrc.html"/>
@@ -126,118 +139,73 @@
       <sub name="voamrwbenc" link="gst-plugins-bad-plugins-plugin-voamrwbenc.html"/>
       <sub name="zbar" link="gst-plugins-bad-plugins-plugin-zbar.html"/>
     </sub>
-    <sub name="gst-plugins-bad Interfaces" link="ch03.html">
-      <sub name="GstPhotography" link="GstPhotography.html"/>
-    </sub>
   </chapters>
   <functions>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-accurip.html#id-1.2.2.7.5"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-accurip.html#id-1.2.2.7.6.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-accurip.html#id-1.2.2.7.6.2"/>
     <keyword type="struct" name="struct GstAccurip" link="gst-plugins-bad-plugins-accurip.html#GstAccurip-struct"/>
     <keyword type="property" name="The “first-track” property" link="gst-plugins-bad-plugins-accurip.html#GstAccurip--first-track"/>
     <keyword type="property" name="The “last-track” property" link="gst-plugins-bad-plugins-accurip.html#GstAccurip--last-track"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-assrender.html#id-1.2.3.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-assrender.html#id-1.2.3.7.2.2"/>
+    <keyword type="struct" name="struct GstAiffParse" link="gst-plugins-bad-plugins-aiffparse.html#GstAiffParse-struct"/>
+    <keyword type="struct" name="struct GstAiffMux" link="gst-plugins-bad-plugins-aiffmux.html#GstAiffMux-struct"/>
     <keyword type="struct" name="struct GstAssRender" link="gst-plugins-bad-plugins-assrender.html#GstAssRender-struct"/>
     <keyword type="property" name="The “embeddedfonts” property" link="gst-plugins-bad-plugins-assrender.html#GstAssRender--embeddedfonts"/>
     <keyword type="property" name="The “enable” property" link="gst-plugins-bad-plugins-assrender.html#GstAssRender--enable"/>
     <keyword type="property" name="The “wait-text” property" link="gst-plugins-bad-plugins-assrender.html#GstAssRender--wait-text"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-autoconvert.html#id-1.2.4.8.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-autoconvert.html#id-1.2.4.8.3.2.2"/>
+    <keyword type="struct" name="struct GstAudioMixer" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer-struct"/>
+    <keyword type="property" name="The “alignment-threshold” property" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--alignment-threshold"/>
+    <keyword type="property" name="The “caps” property" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--caps"/>
+    <keyword type="property" name="The “discont-wait” property" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--discont-wait"/>
+    <keyword type="property" name="The “blocksize” property" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--blocksize"/>
+    <keyword type="property" name="The “output-buffer-duration” property" link="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--output-buffer-duration"/>
     <keyword type="struct" name="struct GstAutoConvert" link="gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert-struct"/>
     <keyword type="property" name="The “factories” property" link="gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert--factories"/>
     <keyword type="property" name="The “initial-identity” property" link="gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert--initial-identity"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-bulge.html#id-1.2.5.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-bulge.html#id-1.2.5.7.2.2"/>
+    <keyword type="struct" name="struct GstBs2b" link="gst-plugins-bad-plugins-bs2b.html#GstBs2b"/>
     <keyword type="struct" name="struct GstBulge" link="gst-plugins-bad-plugins-bulge.html#GstBulge-struct"/>
     <keyword type="property" name="The “zoom” property" link="gst-plugins-bad-plugins-bulge.html#GstBulge--zoom"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-burn.html#id-1.2.6.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-burn.html#id-1.2.6.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-burn.html#id-1.2.6.7.4.2"/>
     <keyword type="struct" name="struct GstBurn" link="gst-plugins-bad-plugins-burn.html#GstBurn-struct"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-burn.html#GstBurn--silent"/>
     <keyword type="property" name="The “adjustment” property" link="gst-plugins-bad-plugins-burn.html#GstBurn--adjustment"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-camerabin.html#id-1.2.7.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-camerabin.html#id-1.2.7.3.2.2"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-chromium.html#id-1.2.8.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-chromium.html#id-1.2.8.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-chromium.html#id-1.2.8.7.4.2"/>
-    <keyword type="typedef" name="GstChromium" link="gst-plugins-bad-plugins-chromium.html#GstChromium"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-chromium.html#GstChromium--silent"/>
     <keyword type="property" name="The “edge-a” property" link="gst-plugins-bad-plugins-chromium.html#GstChromium--edge-a"/>
     <keyword type="property" name="The “edge-b” property" link="gst-plugins-bad-plugins-chromium.html#GstChromium--edge-b"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-circle.html#id-1.2.9.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-circle.html#id-1.2.9.7.2.2"/>
     <keyword type="struct" name="struct GstCircle" link="gst-plugins-bad-plugins-circle.html#GstCircle-struct"/>
     <keyword type="property" name="The “angle” property" link="gst-plugins-bad-plugins-circle.html#GstCircle--angle"/>
     <keyword type="property" name="The “height” property" link="gst-plugins-bad-plugins-circle.html#GstCircle--height"/>
     <keyword type="property" name="The “spread-angle” property" link="gst-plugins-bad-plugins-circle.html#GstCircle--spread-angle"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-coloreffects.html#id-1.2.10.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-coloreffects.html#id-1.2.10.7.4.1"/>
-    <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="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.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.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.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.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.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="property" name="The “color” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--color"/>
+    <keyword type="property" name="The “height” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--height"/>
+    <keyword type="property" name="The “spatial” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--spatial"/>
+    <keyword type="property" name="The “width” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--width"/>
     <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.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.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.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.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.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.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.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"/>
@@ -269,25 +237,36 @@
     <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="property" name="The “tuning-timeout” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--tuning-timeout"/>
+    <keyword type="property" name="The “isdbt-layer-enabled” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layer-enabled"/>
+    <keyword type="property" name="The “isdbt-layera-fec” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-fec"/>
+    <keyword type="property" name="The “isdbt-layera-modulation” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-modulation"/>
+    <keyword type="property" name="The “isdbt-layera-segment-count” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-segment-count"/>
+    <keyword type="property" name="The “isdbt-layera-time-interleaving” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-time-interleaving"/>
+    <keyword type="property" name="The “isdbt-layerb-fec” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-fec"/>
+    <keyword type="property" name="The “isdbt-layerb-modulation” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-modulation"/>
+    <keyword type="property" name="The “isdbt-layerb-segment-count” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-segment-count"/>
+    <keyword type="property" name="The “isdbt-layerb-time-interleaving” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-time-interleaving"/>
+    <keyword type="property" name="The “isdbt-layerc-fec” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-fec"/>
+    <keyword type="property" name="The “isdbt-layerc-modulation” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-modulation"/>
+    <keyword type="property" name="The “isdbt-layerc-segment-count” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-segment-count"/>
+    <keyword type="property" name="The “isdbt-layerc-time-interleaving” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-time-interleaving"/>
+    <keyword type="property" name="The “isdbt-partial-reception” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-partial-reception"/>
+    <keyword type="property" name="The “isdbt-sb-segment-count” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-count"/>
+    <keyword type="property" name="The “isdbt-sb-segment-idx” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-idx"/>
+    <keyword type="property" name="The “isdbt-sb-subchannel-id” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-subchannel-id"/>
+    <keyword type="property" name="The “isdbt-sound-broadcasting” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sound-broadcasting"/>
+    <keyword type="property" name="The “lnb-lof1” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof1"/>
+    <keyword type="property" name="The “lnb-lof2” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof2"/>
+    <keyword type="property" name="The “lnb-slof” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-slof"/>
+    <keyword type="property" name="The “interleaving” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--interleaving"/>
     <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="signal" name="The “tune” signal" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tune"/>
     <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.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.27.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-edgedetect.html#id-1.2.27.3.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.28.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.28.3.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faac.html#id-1.2.29.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faac.html#id-1.2.29.6.2.2"/>
     <keyword type="struct" name="struct GstFaac" link="gst-plugins-bad-plugins-faac.html#GstFaac"/>
     <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"/>
@@ -297,23 +276,9 @@
     <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.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.31.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faceblur.html#id-1.2.31.3.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.32.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.32.3.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.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.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"/>
@@ -327,12 +292,6 @@
     <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.36.3.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.36.3.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.36.3.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"/>
@@ -341,36 +300,22 @@
     <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.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.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.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.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.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.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.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"/>
@@ -384,8 +329,6 @@
     <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.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"/>
@@ -421,8 +364,13 @@
     <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.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="property" name="The “aggregate-gops” property" link="gst-plugins-bad-plugins-mpegpsmux.html#MpegPsMux--aggregate-gops"/>
+    <keyword type="property" name="The “m2ts-mode” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--m2ts-mode"/>
+    <keyword type="property" name="The “prog-map” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--prog-map"/>
+    <keyword type="property" name="The “pat-interval” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pat-interval"/>
+    <keyword type="property" name="The “pmt-interval” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pmt-interval"/>
+    <keyword type="property" name="The “alignment” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--alignment"/>
+    <keyword type="property" name="The “si-interval” property" link="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--si-interval"/>
     <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"/>
@@ -431,11 +379,7 @@
     <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.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.48.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-neonhttpsrc.html#id-1.2.48.6.2.2"/>
     <keyword type="struct" name="struct GstNeonhttpSrc" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc"/>
     <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"/>
@@ -451,20 +395,31 @@
     <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.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.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.51.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-openalsink.html#id-1.2.51.3.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 GstOpusDec" link="gst-plugins-bad-plugins-opusdec.html#GstOpusDec-struct"/>
+    <keyword type="property" name="The “apply-gain” property" link="gst-plugins-bad-plugins-opusdec.html#GstOpusDec--apply-gain"/>
+    <keyword type="property" name="The “use-inband-fec” property" link="gst-plugins-bad-plugins-opusdec.html#GstOpusDec--use-inband-fec"/>
+    <keyword type="struct" name="struct GstOpusEnc" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc-struct"/>
+    <keyword type="property" name="The “audio” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio"/>
+    <keyword type="property" name="The “bandwidth” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bandwidth"/>
+    <keyword type="property" name="The “bitrate” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate"/>
+    <keyword type="property" name="The “cbr” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--cbr"/>
+    <keyword type="property" name="The “complexity” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--complexity"/>
+    <keyword type="property" name="The “constrained-vbr” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--constrained-vbr"/>
+    <keyword type="property" name="The “dtx” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--dtx"/>
+    <keyword type="property" name="The “frame-size” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--frame-size"/>
+    <keyword type="property" name="The “inband-fec” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--inband-fec"/>
+    <keyword type="property" name="The “max-payload-size” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--max-payload-size"/>
+    <keyword type="property" name="The “packet-loss-percentage” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--packet-loss-percentage"/>
+    <keyword type="property" name="The “audio-type” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio-type"/>
+    <keyword type="property" name="The “bitrate-type” property" link="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate-type"/>
+    <keyword type="struct" name="struct GstOpusParse" link="gst-plugins-bad-plugins-opusparse.html#GstOpusParse-struct"/>
+    <keyword type="struct" name="struct GstRtpOPUSPay" link="gst-plugins-bad-plugins-rtpopuspay.html#GstRtpOPUSPay-struct"/>
+    <keyword type="struct" name="struct GstRTPOpusDepay" link="gst-plugins-bad-plugins-rtpopusdepay.html#GstRTPOpusDepay-struct"/>
     <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"/>
@@ -472,14 +427,8 @@
     <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.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.54.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pyramidsegment.html#id-1.2.54.4.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"/>
@@ -493,16 +442,10 @@
     <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.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.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.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"/>
@@ -511,67 +454,38 @@
     <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.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.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="property" name="The “shm-area-name” property" link="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--shm-area-name"/>
     <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.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.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.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.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.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.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.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.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.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.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"/>
@@ -582,15 +496,9 @@
     <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.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.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.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"/>
@@ -606,89 +514,17 @@
     <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.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.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.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="property" name="The “attach-frame” property" link="gst-plugins-bad-plugins-zbar.html#GstZBar--attach-frame"/>
     <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.77.3.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-voamrwbenc.html#id-1.2.77.3.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"/>
-    <keyword type="function" name="gst_photography_get_ev_compensation ()" link="GstPhotography.html#gst-photography-get-ev-compensation"/>
-    <keyword type="function" name="gst_photography_get_iso_speed ()" link="GstPhotography.html#gst-photography-get-iso-speed"/>
-    <keyword type="function" name="gst_photography_get_aperture ()" link="GstPhotography.html#gst-photography-get-aperture"/>
-    <keyword type="function" name="gst_photography_get_exposure ()" link="GstPhotography.html#gst-photography-get-exposure"/>
-    <keyword type="function" name="gst_photography_get_white_balance_mode ()" link="GstPhotography.html#gst-photography-get-white-balance-mode"/>
-    <keyword type="function" name="gst_photography_get_color_tone_mode ()" link="GstPhotography.html#gst-photography-get-color-tone-mode"/>
-    <keyword type="function" name="gst_photography_get_scene_mode ()" link="GstPhotography.html#gst-photography-get-scene-mode"/>
-    <keyword type="function" name="gst_photography_get_flash_mode ()" link="GstPhotography.html#gst-photography-get-flash-mode"/>
-    <keyword type="function" name="gst_photography_get_noise_reduction ()" link="GstPhotography.html#gst-photography-get-noise-reduction"/>
-    <keyword type="function" name="gst_photography_get_zoom ()" link="GstPhotography.html#gst-photography-get-zoom"/>
-    <keyword type="function" name="gst_photography_set_ev_compensation ()" link="GstPhotography.html#gst-photography-set-ev-compensation"/>
-    <keyword type="function" name="gst_photography_set_iso_speed ()" link="GstPhotography.html#gst-photography-set-iso-speed"/>
-    <keyword type="function" name="gst_photography_set_aperture ()" link="GstPhotography.html#gst-photography-set-aperture"/>
-    <keyword type="function" name="gst_photography_set_exposure ()" link="GstPhotography.html#gst-photography-set-exposure"/>
-    <keyword type="function" name="gst_photography_set_white_balance_mode ()" link="GstPhotography.html#gst-photography-set-white-balance-mode"/>
-    <keyword type="function" name="gst_photography_set_color_tone_mode ()" link="GstPhotography.html#gst-photography-set-color-tone-mode"/>
-    <keyword type="function" name="gst_photography_set_scene_mode ()" link="GstPhotography.html#gst-photography-set-scene-mode"/>
-    <keyword type="function" name="gst_photography_set_flash_mode ()" link="GstPhotography.html#gst-photography-set-flash-mode"/>
-    <keyword type="function" name="gst_photography_set_noise_reduction ()" link="GstPhotography.html#gst-photography-set-noise-reduction"/>
-    <keyword type="function" name="gst_photography_set_zoom ()" link="GstPhotography.html#gst-photography-set-zoom"/>
-    <keyword type="function" name="gst_photography_get_capabilities ()" link="GstPhotography.html#gst-photography-get-capabilities"/>
-    <keyword type="function" name="gst_photography_prepare_for_capture ()" link="GstPhotography.html#gst-photography-prepare-for-capture"/>
-    <keyword type="function" name="gst_photography_set_autofocus ()" link="GstPhotography.html#gst-photography-set-autofocus"/>
-    <keyword type="function" name="gst_photography_set_config ()" link="GstPhotography.html#gst-photography-set-config"/>
-    <keyword type="function" name="gst_photography_get_config ()" link="GstPhotography.html#gst-photography-get-config"/>
-    <keyword type="struct" name="GstPhotography" link="GstPhotography.html#GstPhotography-struct"/>
-    <keyword type="macro" name="GST_PHOTOGRAPHY_AUTOFOCUS_DONE" link="GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS"/>
-    <keyword type="macro" name="GST_PHOTOGRAPHY_SHAKE_RISK" link="GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS"/>
-    <keyword type="enum" name="enum GstPhotographyNoiseReduction" link="GstPhotography.html#GstPhotographyNoiseReduction"/>
-    <keyword type="enum" name="enum GstPhotographyWhiteBalanceMode" link="GstPhotography.html#GstPhotographyWhiteBalanceMode"/>
-    <keyword type="enum" name="enum GstPhotographyColorToneMode" link="GstPhotography.html#GstPhotographyColorToneMode"/>
-    <keyword type="enum" name="enum GstPhotographySceneMode" link="GstPhotography.html#GstPhotographySceneMode"/>
-    <keyword type="enum" name="enum GstPhotographyFlashMode" link="GstPhotography.html#GstPhotographyFlashMode"/>
-    <keyword type="enum" name="enum GstPhotographyFlickerReductionMode" link="GstPhotography.html#GstPhotographyFlickerReductionMode"/>
-    <keyword type="enum" name="enum GstPhotographyFocusMode" link="GstPhotography.html#GstPhotographyFocusMode"/>
-    <keyword type="enum" name="enum GstPhotographyFocusStatus" link="GstPhotography.html#GstPhotographyFocusStatus"/>
-    <keyword type="enum" name="enum GstPhotographyCaps" link="GstPhotography.html#GstPhotographyCaps"/>
-    <keyword type="enum" name="enum GstPhotographyShakeRisk" link="GstPhotography.html#GstPhotographyShakeRisk"/>
-    <keyword type="property" name="The “aperture” property" link="GstPhotography.html#GstPhotography--aperture"/>
-    <keyword type="property" name="The “capabilities” property" link="GstPhotography.html#GstPhotography--capabilities"/>
-    <keyword type="property" name="The “colour-tone-mode” property" link="GstPhotography.html#GstPhotography--colour-tone-mode"/>
-    <keyword type="property" name="The “ev-compensation” property" link="GstPhotography.html#GstPhotography--ev-compensation"/>
-    <keyword type="property" name="The “exposure” property" link="GstPhotography.html#GstPhotography--exposure"/>
-    <keyword type="property" name="The “flash-mode” property" link="GstPhotography.html#GstPhotography--flash-mode"/>
-    <keyword type="property" name="The “flicker-mode” property" link="GstPhotography.html#GstPhotography--flicker-mode"/>
-    <keyword type="property" name="The “focus-mode” property" link="GstPhotography.html#GstPhotography--focus-mode"/>
-    <keyword type="property" name="The “image-capture-supported-caps” property" link="GstPhotography.html#GstPhotography--image-capture-supported-caps"/>
-    <keyword type="property" name="The “iso-speed” property" link="GstPhotography.html#GstPhotography--iso-speed"/>
-    <keyword type="property" name="The “scene-mode” property" link="GstPhotography.html#GstPhotography--scene-mode"/>
-    <keyword type="property" name="The “white-balance-mode” property" link="GstPhotography.html#GstPhotography--white-balance-mode"/>
-    <keyword type="property" name="The “image-preview-supported-caps” property" link="GstPhotography.html#GstPhotography--image-preview-supported-caps"/>
-    <keyword type="property" name="The “noise-reduction” property" link="GstPhotography.html#GstPhotography--noise-reduction"/>
-    <keyword type="property" name="The “zoom” property" link="GstPhotography.html#GstPhotography--zoom"/>
-    <keyword type="property" name="The “analog-gain” property" link="GstPhotography.html#GstPhotography--analog-gain"/>
-    <keyword type="property" name="The “color-temperature” property" link="GstPhotography.html#GstPhotography--color-temperature"/>
-    <keyword type="property" name="The “color-tone-mode” property" link="GstPhotography.html#GstPhotography--color-tone-mode"/>
-    <keyword type="property" name="The “exposure-time” property" link="GstPhotography.html#GstPhotography--exposure-time"/>
-    <keyword type="property" name="The “lens-focus” property" link="GstPhotography.html#GstPhotography--lens-focus"/>
-    <keyword type="property" name="The “max-exposure-time” property" link="GstPhotography.html#GstPhotography--max-exposure-time"/>
-    <keyword type="property" name="The “min-exposure-time” property" link="GstPhotography.html#GstPhotography--min-exposure-time"/>
-    <keyword type="property" name="The “white-point” property" link="GstPhotography.html#GstPhotography--white-point"/>
   </functions>
 </book>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-accurip.html b/docs/plugins/html/gst-plugins-bad-plugins-accurip.html
index 16d26e7..053fbaa 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-accurip.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-accurip.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: accurip</title>
+<title>accurip: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch01.html" title="gst-plugins-bad Elements">
-<link rel="next" href="gst-plugins-bad-plugins-assrender.html" title="assrender">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-aiffparse.html" title="aiffparse">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -22,14 +22,14 @@
 <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="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-assrender.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-aiffparse.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-accurip"></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-accurip.top_of_page"></a>accurip</span></h2>
-<p>accurip — Computes an AccurateRip CRC</p>
+<p>accurip</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -179,11 +179,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-accurip.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-accurip.other_details"></a><h2>Types and Values</h2>
@@ -213,7 +212,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-aiffmux.html b/docs/plugins/html/gst-plugins-bad-plugins-aiffmux.html
new file mode 100644
index 0000000..b91586e
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-aiffmux.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>aiffmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-aiffparse.html" title="aiffparse">
+<link rel="next" href="gst-plugins-bad-plugins-assrender.html" title="assrender">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-aiffmux.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-aiffmux.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="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-aiffparse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-assrender.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-aiffmux"></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-aiffmux.top_of_page"></a>aiffmux</span></h2>
+<p>aiffmux</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<a name="GstAiffMux"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffmux.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-plugins-aiffmux.html#GstAiffMux-struct" title="struct GstAiffMux">GstAiffMux</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffmux.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> GstAiffMux
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffmux.description"></a><h2>Description</h2>
+<p>Format an audio stream into the Audio Interchange File Format</p>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.4.6.3.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-aiff.html#plugin-aiff">aiff</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Robert Swain &lt;robert.swain@gmail.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Muxer/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.4.6.3.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-raw, format=(string){ S8, S16BE, S24BE, S32BE }, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]</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>audio/x-aiff</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffmux.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffmux.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstAiffMux-struct"></a><h3>struct GstAiffMux</h3>
+<pre class="programlisting">struct GstAiffMux;</pre>
+<p>Opaque data structure.</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-aiffparse.html b/docs/plugins/html/gst-plugins-bad-plugins-aiffparse.html
new file mode 100644
index 0000000..258193b
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-aiffparse.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>aiffparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-accurip.html" title="accurip">
+<link rel="next" href="gst-plugins-bad-plugins-aiffmux.html" title="aiffmux">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-aiffparse.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-aiffparse.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="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-accurip.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-aiffmux.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-aiffparse"></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-aiffparse.top_of_page"></a>aiffparse</span></h2>
+<p>aiffparse</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<a name="GstAiffParse"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffparse.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-plugins-aiffparse.html#GstAiffParse-struct" title="struct GstAiffParse">GstAiffParse</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffparse.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> GstAiffParse
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffparse.description"></a><h2>Description</h2>
+<div class="refsect2">
+<a name="id-1.2.3.6.2"></a><h3>Example launch line</h3>
+<p>
+Parse a .aiff file into raw or compressed audio.
+</p>
+<p>
+The aiffparse element supports both push and pull mode operations, making it
+possible to stream from a network source.
+</p>
+<p>
+</p>
+<pre class="programlisting">
+gst-launch filesrc location=sine.aiff ! aiffparse ! audioconvert ! alsasink
+</pre>
+<p>
+Read a aiff file and output to the soundcard using the ALSA element. The
+aiff file is assumed to contain raw uncompressed samples.
+</p>
+<p>
+</p>
+<pre class="programlisting">
+gst-launch souphhtpsrc location=http://www.example.org/sine.aiff ! queue ! aiffparse ! audioconvert ! alsasink
+</pre>
+<p>
+Stream data from a network url.
+</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.3.6.3.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-aiff.html#plugin-aiff">aiff</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Pioneers of the Inevitable &lt;songbird@songbirdnest.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Demuxer/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.3.6.3.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-aiff</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>audio/x-raw, format=(string){ S8, S16BE, S16LE, S24BE, S24LE, S32LE, S32BE, F32BE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffparse.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-aiffparse.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstAiffParse-struct"></a><h3>struct GstAiffParse</h3>
+<pre class="programlisting">struct GstAiffParse;</pre>
+<p>Opaque data structure.</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-assrender.html b/docs/plugins/html/gst-plugins-bad-plugins-assrender.html
index 676493a..d54b130 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-assrender.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-assrender.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: assrender</title>
+<title>assrender: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-accurip.html" title="accurip">
-<link rel="next" href="gst-plugins-bad-plugins-autoconvert.html" title="autoconvert">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-plugins-aiffmux.html" title="aiffmux">
+<link rel="next" href="gst-plugins-bad-plugins-audiomixer.html" title="audiomixer">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,15 +21,15 @@
 </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-accurip.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-autoconvert.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-aiffmux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-audiomixer.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-assrender"></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-assrender.top_of_page"></a>assrender</span></h2>
-<p>assrender — Renders ASS/SSA subtitles with libass</p>
+<p>assrender</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -87,7 +87,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.3.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.5.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,7 +113,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.3.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.5.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -166,7 +166,7 @@
 </tr>
 <tr>
 <td><p><span class="term"></span></p></td>
-<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
 </tr>
 </tbody>
 </table></div>
@@ -194,25 +194,22 @@
 </tr>
 <tr>
 <td><p><span class="term"></span></p></td>
-<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+<td> video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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-assrender.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-assrender.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstAssRender-struct"></a><h3>struct GstAssRender</h3>
 <pre class="programlisting">struct GstAssRender;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -243,7 +240,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-audiomixer.html b/docs/plugins/html/gst-plugins-bad-plugins-audiomixer.html
new file mode 100644
index 0000000..422e6c1
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-audiomixer.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>audiomixer: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-assrender.html" title="assrender">
+<link rel="next" href="gst-plugins-bad-plugins-autoconvert.html" title="autoconvert">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-audiomixer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-audiomixer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-audiomixer.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-audiomixer.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-assrender.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-autoconvert.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-audiomixer"></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-audiomixer.top_of_page"></a>audiomixer</span></h2>
+<p>audiomixer</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.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">guint64</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--alignment-threshold" title="The “alignment-threshold” property">alignment-threshold</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--caps" title="The “caps” property">caps</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-audiomixer.html#GstAudioMixer--discont-wait" title="The “discont-wait” property">discont-wait</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--blocksize" title="The “blocksize” property">blocksize</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-audiomixer.html#GstAudioMixer--output-buffer-duration" title="The “output-buffer-duration” property">output-buffer-duration</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<a name="GstAudioMixer"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.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-plugins-audiomixer.html#GstAudioMixer-struct" title="struct GstAudioMixer">GstAudioMixer</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstAggregator.html#GstAggregator">GstAggregator</a>
+                    <span class="lineart">╰──</span> GstAudioAggregator
+                        <span class="lineart">╰──</span> GstAudioMixer
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+GstAudioMixer implements
+ <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstChildProxy.html">GstChildProxy</a>.</p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.description"></a><h2>Description</h2>
+<p>The audiomixer allows to mix several streams into one by adding the data.
+Mixed data is clamped to the min/max values of the data format.</p>
+<p>Unlike the adder element audiomixer properly synchronises all input streams.</p>
+<p>The input pads are from a GstPad subclass and have additional
+properties to mute each pad individually and set the volume:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+"mute": Whether to mute the pad or not (<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>)
+</li>
+<li class="listitem">
+"volume": The volume of the pad, between 0.0 and 10.0 (<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>)
+</li>
+</ul></div>
+<div class="refsect2">
+<a name="id-1.2.6.8.6"></a><h3>Example launch line</h3>
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> audiomixer name<span class="gtkdoc opt">=</span>mix <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">500</span> <span class="gtkdoc opt">!</span> mix<span class="gtkdoc opt">.</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ This pipeline produces two sine waves mixed together.
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.6.8.7.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-audiomixer.html#plugin-audiomixer">audiomixer</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Sebastian Dröge &lt;sebastian@centricular.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Generic/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.6.8.7.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>audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string){ interleaved, non-interleaved }</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>audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string){ interleaved, non-interleaved }</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstAudioMixer-struct"></a><h3>struct GstAudioMixer</h3>
+<pre class="programlisting">struct GstAudioMixer;</pre>
+<p>The audiomixer object structure.</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-audiomixer.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="GstAudioMixer--alignment-threshold"></a><h3>The <code class="literal">“alignment-threshold”</code> property</h3>
+<pre class="programlisting">  “alignment-threshold”      <span class="type">guint64</span></pre>
+<p>Timestamp alignment threshold in nanoseconds.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 18446744073709551614</p>
+<p>Default value: 40000000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAudioMixer--caps"></a><h3>The <code class="literal">“caps”</code> property</h3>
+<pre class="programlisting">  “caps”                     <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *</pre>
+<p>Set target format for mixing (NULL means ANY). Setting this property takes a reference to the supplied GstCaps object.</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAudioMixer--discont-wait"></a><h3>The <code class="literal">“discont-wait”</code> property</h3>
+<pre class="programlisting">  “discont-wait”             <span class="type">guint64</span></pre>
+<p>Window of time in nanoseconds to wait before creating a discontinuity.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 18446744073709551614</p>
+<p>Default value: 1000000000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAudioMixer--blocksize"></a><h3>The <code class="literal">“blocksize”</code> property</h3>
+<pre class="programlisting">  “blocksize”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>Output block size in number of samples.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 1024</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAudioMixer--output-buffer-duration"></a><h3>The <code class="literal">“output-buffer-duration”</code> property</h3>
+<pre class="programlisting">  “output-buffer-duration”   <span class="type">guint64</span></pre>
+<p>Output block size in nanoseconds.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 1</p>
+<p>Default value: 10000000</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-autoconvert.html b/docs/plugins/html/gst-plugins-bad-plugins-autoconvert.html
index 5df5588..2c7bfd6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-autoconvert.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-autoconvert.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: autoconvert</title>
+<title>autoconvert: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-assrender.html" title="assrender">
-<link rel="next" href="gst-plugins-bad-plugins-bulge.html" title="bulge">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-plugins-audiomixer.html" title="audiomixer">
+<link rel="next" href="gst-plugins-bad-plugins-bs2b.html" title="bs2b">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -22,15 +22,15 @@
 </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-assrender.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-bulge.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-audiomixer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-bs2b.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-autoconvert"></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-autoconvert.top_of_page"></a>autoconvert</span></h2>
-<p>autoconvert — Selects the right transform element based on the caps</p>
+<p>autoconvert</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -98,7 +98,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.4.8.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.7.8.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -124,7 +124,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.4.8.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.7.8.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -175,19 +175,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-autoconvert.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-autoconvert.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstAutoConvert-struct"></a><h3>struct GstAutoConvert</h3>
 <pre class="programlisting">struct GstAutoConvert;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -209,7 +206,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-bs2b.html b/docs/plugins/html/gst-plugins-bad-plugins-bs2b.html
new file mode 100644
index 0000000..9643170
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-bs2b.html
@@ -0,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>bs2b: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-autoconvert.html" title="autoconvert">
+<link rel="next" href="gst-plugins-bad-plugins-bulge.html" title="bulge">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-bs2b.description" class="shortcut">Description</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-autoconvert.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-bulge.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-bs2b"></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-bs2b.top_of_page"></a>bs2b</span></h2>
+<p>bs2b</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-bs2b.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-plugins-bs2b.html#GstBs2b" title="struct GstBs2b">GstBs2b</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-bs2b.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.8.4.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-bs2b.html#plugin-bs2b">bs2b</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Christoph Reiter &lt;reiter.christoph@gmail.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Effect/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.8.4.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 2000, 384000 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, layout=(string)interleaved</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-raw, channels=(int)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>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 2000, 384000 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, layout=(string)interleaved</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-raw, channels=(int)1</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-bs2b.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-bs2b.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstBs2b"></a><h3>struct GstBs2b</h3>
+<pre class="programlisting">struct GstBs2b {
+  GstAudioFilter element;
+};
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-bulge.html b/docs/plugins/html/gst-plugins-bad-plugins-bulge.html
index 0294180..0644338 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-bulge.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-bulge.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: bulge</title>
+<title>bulge: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-autoconvert.html" title="autoconvert">
+<link rel="prev" href="gst-plugins-bad-plugins-bs2b.html" title="bs2b">
 <link rel="next" href="gst-plugins-bad-plugins-burn.html" title="burn">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,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-autoconvert.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-bs2b.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-burn.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-bulge.top_of_page"></a>bulge</span></h2>
-<p>bulge — Adds a protuberance in the center point</p>
+<p>bulge</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.5.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.9.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.5.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.9.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-bulge.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-bulge.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstBulge-struct"></a><h3>struct GstBulge</h3>
 <pre class="programlisting">struct GstBulge;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -184,7 +181,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-burn.html b/docs/plugins/html/gst-plugins-bad-plugins-burn.html
index 5bf1b27..f3f5d62 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-burn.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-burn.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: burn</title>
+<title>burn: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-bulge.html" title="bulge">
 <link rel="next" href="gst-plugins-bad-plugins-camerabin.html" title="camerabin">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-burn.top_of_page"></a>burn</span></h2>
-<p>burn — Burn adjusts the colors in the video signal.</p>
+<p>burn</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -83,7 +83,7 @@
 <a name="gst-plugins-bad-plugins-burn.description"></a><h2>Description</h2>
 <p>Burn adjusts the colors of a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.6.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.10.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.6.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.10.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.6.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.10.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -176,19 +176,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-burn.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-burn.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstBurn-struct"></a><h3>struct GstBurn</h3>
 <pre class="programlisting">struct GstBurn;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -212,7 +209,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-camerabin.html b/docs/plugins/html/gst-plugins-bad-plugins-camerabin.html
index 61ffa66..577dbf3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-camerabin.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-camerabin.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: camerabin</title>
+<title>camerabin: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-burn.html" title="burn">
 <link rel="next" href="gst-plugins-bad-plugins-chromium.html" title="chromium">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-camerabin.top_of_page"></a>camerabin</span></h2>
-<p>camerabin — Take image snapshots and record movies from camera</p>
+<p>camerabin</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.7.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.11.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,21 +62,19 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.7.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.11.3.2.2"></a><h3>Element Pads</h3>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-camerabin.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-camerabin.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-chromium.html b/docs/plugins/html/gst-plugins-bad-plugins-chromium.html
index a2dd371..4012bd5 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-chromium.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-chromium.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: chromium</title>
+<title>chromium: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-camerabin.html" title="camerabin">
 <link rel="next" href="gst-plugins-bad-plugins-circle.html" title="circle">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-chromium.top_of_page"></a>chromium</span></h2>
-<p>chromium — Chromium breaks the colors of the video signal.</p>
+<p>chromium</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -61,19 +61,6 @@
 </table></div>
 </div>
 <a name="GstChromium"></a><div class="refsect1">
-<a name="gst-plugins-bad-plugins-chromium.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="typedef_keyword">typedef</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-plugins-chromium.html#GstChromium">GstChromium</a></td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
 <a name="gst-plugins-bad-plugins-chromium.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
     <span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
@@ -88,7 +75,7 @@
 <a name="gst-plugins-bad-plugins-chromium.description"></a><h2>Description</h2>
 <p>Chromium breaks the colors of a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.8.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.12.6.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -104,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.8.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.12.6.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -130,7 +117,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.8.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.12.6.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -181,21 +168,13 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-chromium.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-chromium.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="GstChromium"></a><h3>GstChromium</h3>
-<pre class="programlisting">typedef struct GstChromium      GstChromium;
-</pre>
-<p>
-</p>
-</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-chromium.property-details"></a><h2>Property Details</h2>
@@ -227,7 +206,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-circle.html b/docs/plugins/html/gst-plugins-bad-plugins-circle.html
index 92f45a5..5eb1249 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-circle.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-circle.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: circle</title>
+<title>circle: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-chromium.html" title="chromium">
 <link rel="next" href="gst-plugins-bad-plugins-coloreffects.html" title="coloreffects">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-circle.top_of_page"></a>circle</span></h2>
-<p>circle — Warps the picture into an arc shaped form</p>
+<p>circle</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -91,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.9.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.13.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.9.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.13.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -168,19 +168,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-circle.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-circle.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCircle-struct"></a><h3>struct GstCircle</h3>
 <pre class="programlisting">struct GstCircle;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -212,7 +209,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html b/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
index 33cd021..95808c4 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: coloreffects</title>
+<title>coloreffects: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-circle.html" title="circle">
 <link rel="next" href="gst-plugins-bad-plugins-compositor.html" title="compositor">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-coloreffects.top_of_page"></a>coloreffects</span></h2>
-<p>coloreffects — Color Look-up Table filter</p>
+<p>coloreffects</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -76,7 +76,7 @@
 <a name="gst-plugins-bad-plugins-coloreffects.description"></a><h2>Description</h2>
 <p>Map colors of the video input to a lookup table</p>
 <div class="refsect2">
-<a name="id-1.2.10.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.14.7.3"></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.10.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.14.7.4.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.10.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.14.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -171,11 +171,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-coloreffects.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-coloreffects.other_details"></a><h2>Types and Values</h2>
@@ -197,7 +196,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-compositor.html b/docs/plugins/html/gst-plugins-bad-plugins-compositor.html
index 46d76aa..9a982e3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-compositor.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-compositor.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: compositor</title>
+<title>compositor: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <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>
+<p>compositor</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -71,9 +71,36 @@
 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>
+<a class="link" href="gst-plugins-bad-plugins-compositor.html#GstCompositorPad"><span class="type">GstCompositorPad</span></a>:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+"xpos": The x-coordinate position of the top-left corner of the picture
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>)
+</li>
+<li class="listitem">
+"ypos": The y-coordinate position of the top-left corner of the picture
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>)
+</li>
+<li class="listitem">
+"width": The width of the picture; the input will be scaled if necessary
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>)
+</li>
+<li class="listitem">
+"height": The height of the picture; the input will be scaled if necessary
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>)
+</li>
+<li class="listitem">
+"alpha": The transparency of the picture; between 0.0 and 1.0. The blending
+is a simple copy when fully-transparent (0.0) and fully-opaque (1.0).
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>)
+</li>
+<li class="listitem">
+"zorder": The z-order position of the picture in the composition
+(<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>)
+</li>
+</ul></div>
 <div class="refsect2">
-<a name="id-1.2.11.7.5"></a><h3>Sample pipelines</h3>
+<a name="id-1.2.15.7.6"></a><h3>Sample pipelines</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -172,7 +199,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.11.7.6.1"></a><h3>Element Information</h3>
+<a name="id-1.2.15.7.7.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -198,7 +225,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.11.7.6.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.15.7.7.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -249,11 +276,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-compositor.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-compositor.other_details"></a><h2>Types and Values</h2>
@@ -270,7 +296,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</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 a248fa1..2ce59bf 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cvdilate</title>
+<title>cvdilate: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-compositor.html" title="compositor">
 <link rel="next" href="gst-plugins-bad-plugins-cverode.html" title="cverode">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cvdilate.top_of_page"></a>cvdilate</span></h2>
-<p>cvdilate — Applies cvDilate OpenCV function to the image</p>
+<p>cvdilate</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.16.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.16.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -236,24 +236,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvdilate.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvdilate.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvDilate-struct"></a><h3>struct GstCvDilate</h3>
 <pre class="programlisting">struct GstCvDilate;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html b/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
index 28ba303..d425935 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cvequalizehist</title>
+<title>cvequalizehist: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cverode.html" title="cverode">
 <link rel="next" href="gst-plugins-bad-plugins-cvlaplace.html" title="cvlaplace">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cvequalizehist.top_of_page"></a>cvequalizehist</span></h2>
-<p>cvequalizehist — Applies cvEqualizeHist OpenCV function to the image</p>
+<p>cvequalizehist</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -62,7 +62,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.14.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.18.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.14.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.18.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -139,24 +139,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvequalizehist.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvequalizehist.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvEqualizeHist-struct"></a><h3>struct GstCvEqualizeHist</h3>
 <pre class="programlisting">struct GstCvEqualizeHist;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cverode.html b/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
index dac967c..5e1c293 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cverode</title>
+<title>cverode: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cvdilate.html" title="cvdilate">
 <link rel="next" href="gst-plugins-bad-plugins-cvequalizehist.html" title="cvequalizehist">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cverode.top_of_page"></a>cverode</span></h2>
-<p>cverode — Applies cvErode OpenCV function to the image</p>
+<p>cverode</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -63,7 +63,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.17.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.13.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.17.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -236,24 +236,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cverode.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cverode.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvErode-struct"></a><h3>struct GstCvErode</h3>
 <pre class="programlisting">struct GstCvErode;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html b/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
index badee94..1861d07 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cvlaplace</title>
+<title>cvlaplace: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cvequalizehist.html" title="cvequalizehist">
 <link rel="next" href="gst-plugins-bad-plugins-cvsmooth.html" title="cvsmooth">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cvlaplace.top_of_page"></a>cvlaplace</span></h2>
-<p>cvlaplace — Applies cvLaplace OpenCV function to the image</p>
+<p>cvlaplace</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -78,7 +78,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.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.15.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">
@@ -155,19 +155,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvlaplace.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvlaplace.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvLaplace-struct"></a><h3>struct GstCvLaplace</h3>
 <pre class="programlisting">struct GstCvLaplace;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -183,7 +180,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html b/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
index 9dcb991..883abaa 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cvsmooth</title>
+<title>cvsmooth: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cvlaplace.html" title="cvlaplace">
 <link rel="next" href="gst-plugins-bad-plugins-cvsobel.html" title="cvsobel">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cvsmooth.top_of_page"></a>cvsmooth</span></h2>
-<p>cvsmooth — Applies cvSmooth OpenCV function to the image</p>
+<p>cvsmooth</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -67,6 +67,26 @@
 <td class="property_name"><a class="link" href="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--type" title="The “type” property">type</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--color" title="The “color” property">color</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--height" title="The “height” property">height</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--spatial" title="The “spatial” property">spatial</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--width" title="The “width” property">width</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -100,7 +120,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.20.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -126,7 +146,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.20.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -193,19 +213,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvsmooth.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvsmooth.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvSmooth-struct"></a><h3>struct GstCvSmooth</h3>
 <pre class="programlisting">struct GstCvSmooth;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -253,10 +270,45 @@
 <p>Flags: Read / Write</p>
 <p>Default value: CV Gaussian</p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstCvSmooth--color"></a><h3>The <code class="literal">“color”</code> property</h3>
+<pre class="programlisting">  “color”                    <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre>
+<p>If type is gaussian, this means the standard deviation.If type is bilateral, this means the color-sigma. If zero, Default values are used.Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstCvSmooth--height"></a><h3>The <code class="literal">“height”</code> property</h3>
+<pre class="programlisting">  “height”                   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>The aperture height, if zero, the width is used.(Must be positive and odd or zero, unuset in median and bilateral types). Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstCvSmooth--spatial"></a><h3>The <code class="literal">“spatial”</code> property</h3>
+<pre class="programlisting">  “spatial”                  <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre>
+<p>Only used in bilateral type, means the spatial-sigma.Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstCvSmooth--width"></a><h3>The <code class="literal">“width”</code> property</h3>
+<pre class="programlisting">  “width”                    <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>The aperture width (Must be positive and odd).Check cvSmooth OpenCV docs: http://opencv.willowgarage.com/documentation/image_filtering.html#cvSmooth.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 1</p>
+<p>Default value: 3</p>
+</div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html b/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
index ac1cdc2..2a4fb38 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: cvsobel</title>
+<title>cvsobel: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cvsmooth.html" title="cvsmooth">
 <link rel="next" href="gst-plugins-bad-plugins-dataurisrc.html" title="dataurisrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-cvsobel.top_of_page"></a>cvsobel</span></h2>
-<p>cvsobel — Applies cvSobel OpenCV function to the image</p>
+<p>cvsobel</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -90,7 +90,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.17.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.21.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.17.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.21.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -167,19 +167,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvsobel.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-cvsobel.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstCvSobel-struct"></a><h3>struct GstCvSobel</h3>
 <pre class="programlisting">struct GstCvSobel;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -213,7 +210,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html b/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
index d0be97d..fd5d278 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dataurisrc</title>
+<title>dataurisrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-cvsobel.html" title="cvsobel">
 <link rel="next" href="gst-plugins-bad-plugins-diffuse.html" title="diffuse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dataurisrc.top_of_page"></a>dataurisrc</span></h2>
-<p>dataurisrc — Handles data: uris</p>
+<p>dataurisrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.18.8.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.22.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.18.8.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.22.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.18.8.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.22.8.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -152,19 +152,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dataurisrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dataurisrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDataURISrc-struct"></a><h3>struct GstDataURISrc</h3>
 <pre class="programlisting">struct GstDataURISrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -179,7 +176,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html b/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
index 4fa568d..5b75384 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: diffuse</title>
+<title>diffuse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dataurisrc.html" title="dataurisrc">
 <link rel="next" href="gst-plugins-bad-plugins-dilate.html" title="dilate">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-diffuse.top_of_page"></a>diffuse</span></h2>
-<p>diffuse — Diffuses the image by moving its pixels in random directions</p>
+<p>diffuse</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -78,7 +78,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.19.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">
@@ -104,7 +104,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.19.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">
@@ -155,19 +155,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-diffuse.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-diffuse.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDiffuse-struct"></a><h3>struct GstDiffuse</h3>
 <pre class="programlisting">struct GstDiffuse;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -183,7 +180,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dilate.html b/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
index 3e4386e..43021aa 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dilate</title>
+<title>dilate: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-diffuse.html" title="diffuse">
 <link rel="next" href="gst-plugins-bad-plugins-dodge.html" title="dodge">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dilate.top_of_page"></a>dilate</span></h2>
-<p>dilate — Dilate copies the brightest pixel around.</p>
+<p>dilate</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.20.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.24.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.20.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.24.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.20.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.24.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -176,19 +176,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dilate.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dilate.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDilate-struct"></a><h3>struct GstDilate</h3>
 <pre class="programlisting">struct GstDilate;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -211,7 +208,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dodge.html b/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
index 1d8e493..1a1a4c5 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dodge</title>
+<title>dodge: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dilate.html" title="dilate">
 <link rel="next" href="gst-plugins-bad-plugins-dtmfdetect.html" title="dtmfdetect">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dodge.top_of_page"></a>dodge</span></h2>
-<p>dodge — Dodge saturates the colors in the video signal.</p>
+<p>dodge</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.21.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.25.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.21.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.25.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.21.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.25.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -169,19 +169,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dodge.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dodge.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDodge-struct"></a><h3>struct GstDodge</h3>
 <pre class="programlisting">struct GstDodge;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -196,7 +193,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html b/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
index b8d78b5..54f4957 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dtmfdetect</title>
+<title>dtmfdetect: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dodge.html" title="dodge">
 <link rel="next" href="gst-plugins-bad-plugins-dtsdec.html" title="dtsdec">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dtmfdetect.top_of_page"></a>dtmfdetect</span></h2>
-<p>dtmfdetect — This element detects DTMF tones</p>
+<p>dtmfdetect</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.22.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.26.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.22.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.26.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -137,24 +137,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dtmfdetect.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dtmfdetect.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDtmfDetect-struct"></a><h3>struct GstDtmfDetect</h3>
 <pre class="programlisting">struct GstDtmfDetect;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html b/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
index 60b2e63..7dc3912 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dtsdec</title>
+<title>dtsdec: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dtmfdetect.html" title="dtmfdetect">
 <link rel="next" href="gst-plugins-bad-plugins-dvbsrc.html" title="dvbsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dtsdec.top_of_page"></a>dtsdec</span></h2>
-<p>dtsdec — Decodes DTS audio streams</p>
+<p>dtsdec</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -76,7 +76,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.27.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.23.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.27.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -157,19 +157,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dtsdec.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dtsdec.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDtsDec-struct"></a><h3>struct GstDtsDec</h3>
 <pre class="programlisting">struct GstDtsDec;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -184,7 +181,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
index 0248416..ecaec9d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dvbsrc</title>
+<title>dvbsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dtsdec.html" title="dtsdec">
 <link rel="next" href="gst-plugins-bad-plugins-dvdspu.html" title="dvdspu">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dvbsrc.top_of_page"></a>dvbsrc</span></h2>
-<p>dvbsrc — Digital Video Broadcast Source</p>
+<p>dvbsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -195,6 +195,116 @@
 <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>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layer-enabled" title="The “isdbt-layer-enabled” property">isdbt-layer-enabled</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcCode_Rate</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-fec" title="The “isdbt-layera-fec” property">isdbt-layera-fec</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcModulation</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-modulation" title="The “isdbt-layera-modulation” property">isdbt-layera-modulation</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-segment-count" title="The “isdbt-layera-segment-count” property">isdbt-layera-segment-count</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-time-interleaving" title="The “isdbt-layera-time-interleaving” property">isdbt-layera-time-interleaving</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcCode_Rate</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-fec" title="The “isdbt-layerb-fec” property">isdbt-layerb-fec</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcModulation</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-modulation" title="The “isdbt-layerb-modulation” property">isdbt-layerb-modulation</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-segment-count" title="The “isdbt-layerb-segment-count” property">isdbt-layerb-segment-count</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-time-interleaving" title="The “isdbt-layerb-time-interleaving” property">isdbt-layerb-time-interleaving</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcCode_Rate</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-fec" title="The “isdbt-layerc-fec” property">isdbt-layerc-fec</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcModulation</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-modulation" title="The “isdbt-layerc-modulation” property">isdbt-layerc-modulation</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-segment-count" title="The “isdbt-layerc-segment-count” property">isdbt-layerc-segment-count</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-time-interleaving" title="The “isdbt-layerc-time-interleaving” property">isdbt-layerc-time-interleaving</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-partial-reception" title="The “isdbt-partial-reception” property">isdbt-partial-reception</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-count" title="The “isdbt-sb-segment-count” property">isdbt-sb-segment-count</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-idx" title="The “isdbt-sb-segment-idx” property">isdbt-sb-segment-idx</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-subchannel-id" title="The “isdbt-sb-subchannel-id” property">isdbt-sb-subchannel-id</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sound-broadcasting" title="The “isdbt-sound-broadcasting” property">isdbt-sound-broadcasting</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof1" title="The “lnb-lof1” property">lnb-lof1</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof2" title="The “lnb-lof2” property">lnb-lof2</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-slof" title="The “lnb-slof” property">lnb-slof</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstDvbSrcInterleaving</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--interleaving" title="The “interleaving” property">interleaving</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -210,17 +320,22 @@
 <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>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></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>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></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>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></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-tune" title="The “tune” signal">tune</a></td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -254,7 +369,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.24.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.28.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -269,7 +384,8 @@
 </tr>
 <tr>
 <td><p><span class="term">author</span></p></td>
-<td>P2P-VCR, C-Lab, University of Paderborn,Zaheer Abbas Merali &lt;zaheerabbas at merali dot org&gt;</td>
+<td>P2P-VCR, C-Lab, University of Paderborn, Zaheer Abbas Merali &lt;zaheerabbas at merali dot org&gt;
+Reynaldo H. Verdejo Pinochet &lt;r.verdejo@sisa.samsung.com&gt;</td>
 </tr>
 <tr>
 <td><p><span class="term">class</span></p></td>
@@ -280,7 +396,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.24.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.28.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -307,19 +423,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dvbsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dvbsrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDvbSrc-struct"></a><h3>struct GstDvbSrc</h3>
 <pre class="programlisting">struct GstDvbSrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -409,7 +522,7 @@
 <div class="refsect2">
 <a name="GstDvbSrc--modulation"></a><h3>The <code class="literal">“modulation”</code> property</h3>
 <pre class="programlisting">  “modulation”               <span class="type">GstDvbSrcModulation</span></pre>
-<p>(DVB-T and DVB-C) Modulation type.</p>
+<p>(DVB-T/T2/C/S2, TURBO and ATSC) Modulation type.</p>
 <p>Flags: Read / Write</p>
 <p>Default value: QAM 16</p>
 </div>
@@ -475,7 +588,7 @@
 <div class="refsect2">
 <a name="GstDvbSrc--frequency"></a><h3>The <code class="literal">“frequency”</code> property</h3>
 <pre class="programlisting">  “frequency”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>Frequency.</p>
+<p>Center frequency to tune into. Measured in kHz for the satellite distribution standars and Hz for all the rest.</p>
 <p>Flags: Read / Write</p>
 <p>Default value: 0</p>
 </div>
@@ -500,7 +613,7 @@
 <div class="refsect2">
 <a name="GstDvbSrc--symbol-rate"></a><h3>The <code class="literal">“symbol-rate”</code> property</h3>
 <pre class="programlisting">  “symbol-rate”              <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
-<p>(DVB-S/S2, DVB-C) Symbol rate in bauds.</p>
+<p>(DVB-S/S2, DVB-C) Symbol rate in kBd (kilo bauds).</p>
 <p>Flags: Read / Write</p>
 <p>Default value: 0</p>
 </div>
@@ -569,6 +682,194 @@
 <p>Flags: Read / Write</p>
 <p>Default value: 10000000000</p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layer-enabled"></a><h3>The <code class="literal">“isdbt-layer-enabled”</code> property</h3>
+<pre class="programlisting">  “isdbt-layer-enabled”      <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>(ISDB-T) Layer Enabled (7 = All layers).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [1,7]</p>
+<p>Default value: 7</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layera-fec"></a><h3>The <code class="literal">“isdbt-layera-fec”</code> property</h3>
+<pre class="programlisting">  “isdbt-layera-fec”         <span class="type">GstDvbSrcCode_Rate</span></pre>
+<p>(ISDB-T) layer A Forward Error Correction.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layera-modulation"></a><h3>The <code class="literal">“isdbt-layera-modulation”</code> property</h3>
+<pre class="programlisting">  “isdbt-layera-modulation”  <span class="type">GstDvbSrcModulation</span></pre>
+<p>(ISDB-T) Layer A modulation type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layera-segment-count"></a><h3>The <code class="literal">“isdbt-layera-segment-count”</code> property</h3>
+<pre class="programlisting">  “isdbt-layera-segment-count” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer A segment count (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,13]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layera-time-interleaving"></a><h3>The <code class="literal">“isdbt-layera-time-interleaving”</code> property</h3>
+<pre class="programlisting">  “isdbt-layera-time-interleaving” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer A time interleaving (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,8]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerb-fec"></a><h3>The <code class="literal">“isdbt-layerb-fec”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerb-fec”         <span class="type">GstDvbSrcCode_Rate</span></pre>
+<p>(ISDB-T) layer B Forward Error Correction.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerb-modulation"></a><h3>The <code class="literal">“isdbt-layerb-modulation”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerb-modulation”  <span class="type">GstDvbSrcModulation</span></pre>
+<p>(ISDB-T) Layer B modulation type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerb-segment-count"></a><h3>The <code class="literal">“isdbt-layerb-segment-count”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerb-segment-count” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer B segment count (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,13]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerb-time-interleaving"></a><h3>The <code class="literal">“isdbt-layerb-time-interleaving”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerb-time-interleaving” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer B time interleaving (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,8]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerc-fec"></a><h3>The <code class="literal">“isdbt-layerc-fec”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerc-fec”         <span class="type">GstDvbSrcCode_Rate</span></pre>
+<p>(ISDB-T) layer C Forward Error Correction.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerc-modulation"></a><h3>The <code class="literal">“isdbt-layerc-modulation”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerc-modulation”  <span class="type">GstDvbSrcModulation</span></pre>
+<p>(ISDB-T) Layer C modulation type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerc-segment-count"></a><h3>The <code class="literal">“isdbt-layerc-segment-count”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerc-segment-count” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer C segment count (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,13]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-layerc-time-interleaving"></a><h3>The <code class="literal">“isdbt-layerc-time-interleaving”</code> property</h3>
+<pre class="programlisting">  “isdbt-layerc-time-interleaving” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Layer C time interleaving (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,8]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-partial-reception"></a><h3>The <code class="literal">“isdbt-partial-reception”</code> property</h3>
+<pre class="programlisting">  “isdbt-partial-reception”  <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Partial Reception (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,1]</p>
+<p>Default value: 1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-sb-segment-count"></a><h3>The <code class="literal">“isdbt-sb-segment-count”</code> property</h3>
+<pre class="programlisting">  “isdbt-sb-segment-count”   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>(ISDB-T) SB segment count.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [1,13]</p>
+<p>Default value: 1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-sb-segment-idx"></a><h3>The <code class="literal">“isdbt-sb-segment-idx”</code> property</h3>
+<pre class="programlisting">  “isdbt-sb-segment-idx”     <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) SB segment IDX.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [0,12]</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-sb-subchannel-id"></a><h3>The <code class="literal">“isdbt-sb-subchannel-id”</code> property</h3>
+<pre class="programlisting">  “isdbt-sb-subchannel-id”   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) SB Subchannel ID (-1 = AUTO).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [G_MAXULONG,41]</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--isdbt-sound-broadcasting"></a><h3>The <code class="literal">“isdbt-sound-broadcasting”</code> property</h3>
+<pre class="programlisting">  “isdbt-sound-broadcasting” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>(ISDB-T) Sound Broadcasting.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [0,1]</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--lnb-lof1"></a><h3>The <code class="literal">“lnb-lof1”</code> property</h3>
+<pre class="programlisting">  “lnb-lof1”                 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>LNB's Local oscillator frequency used for low band reception (kHz).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 9750000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--lnb-lof2"></a><h3>The <code class="literal">“lnb-lof2”</code> property</h3>
+<pre class="programlisting">  “lnb-lof2”                 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>LNB's Local oscillator frequency used for high band reception (kHz).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 10600000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--lnb-slof"></a><h3>The <code class="literal">“lnb-slof”</code> property</h3>
+<pre class="programlisting">  “lnb-slof”                 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>LNB's Upper bound for low band reception (kHz).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 11700000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--interleaving"></a><h3>The <code class="literal">“interleaving”</code> property</h3>
+<pre class="programlisting">  “interleaving”             <span class="type">GstDvbSrcInterleaving</span></pre>
+<p>(DTMB) Interleaving type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: AUTO</p>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dvbsrc.signal-details"></a><h2>Signal Details</h2>
@@ -577,31 +878,7 @@
 <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="https://developer.gnome.org/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>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -609,31 +886,7 @@
 <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="https://developer.gnome.org/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>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -641,36 +894,19 @@
 <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="https://developer.gnome.org/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>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
 </div>
-<p>Flags: Run Last</p>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc-tune"></a><h3>The <code class="literal">“tune”</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="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html b/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
index 2668e8e..daf56ba 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dvdspu</title>
+<title>dvdspu: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dvbsrc.html" title="dvbsrc">
 <link rel="next" href="gst-plugins-bad-plugins-exclusion.html" title="exclusion">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-dvdspu.top_of_page"></a>dvdspu</span></h2>
-<p>dvdspu — Parses Sub-Picture command streams and renders the SPU overlay onto the video as it passes through</p>
+<p>dvdspu</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.25.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.29.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.25.6.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.29.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.25.6.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.29.6.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -179,24 +179,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dvdspu.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-dvdspu.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstDVDSpu-struct"></a><h3>GstDVDSpu</h3>
 <pre class="programlisting">typedef struct _GstDVDSpu GstDVDSpu;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html b/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
index 8125bae..112d46a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: edgedetect</title>
+<title>edgedetect: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-exclusion.html" title="exclusion">
-<link rel="next" href="gst-plugins-bad-plugins-eglglessink.html" title="eglglessink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-faac.html" title="faac">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
 <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-exclusion.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-eglglessink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-faac.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-edgedetect"></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-edgedetect.top_of_page"></a>edgedetect</span></h2>
-<p>edgedetect — Performs canny edge detection on videos and images.</p>
+<p>edgedetect</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.27.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.31.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.27.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.31.3.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,18 +113,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-edgedetect.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-edgedetect.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html
deleted file mode 100644
index e4c6cc4..0000000
--- a/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!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: eglglessink</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-edgedetect.html" title="edgedetect">
-<link rel="next" href="gst-plugins-bad-plugins-faac.html" title="faac">
-<meta name="generator" content="GTK-Doc V1.21 (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="5"><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-eglglessink.description" class="shortcut">Description</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-edgedetect.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-faac.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-eglglessink"></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-eglglessink.top_of_page"></a>eglglessink</span></h2>
-<p>eglglessink — An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="gst-plugins-bad-plugins-eglglessink.description"></a><h2>Description</h2>
-<div class="refsynopsisdiv">
-<h2>Synopsis</h2>
-<div class="refsect2">
-<a name="id-1.2.28.3.2.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>
-            <a class="link" href="gst-plugins-bad-plugins-plugin-eglglessink.html#plugin-eglglessink">eglglessink</a>
-          </td>
-</tr>
-<tr>
-<td><p><span class="term">author</span></p></td>
-<td>Reynaldo H. Verdejo Pinochet &lt;reynaldo@collabora.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>Sink/Video</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="id-1.2.28.3.2.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</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>always</td>
-</tr>
-<tr>
-<td><p><span class="term">details</span></p></td>
-<td>video/x-raw(memory:EGLImage), format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
-</tr>
-<tr>
-<td><p><span class="term"></span></p></td>
-<td> video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
-</tr>
-<tr>
-<td><p><span class="term"></span></p></td>
-<td> video/x-raw, format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, 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-eglglessink.functions_details"></a><h2>Functions</h2>
-</div>
-<div class="refsect1">
-<a name="gst-plugins-bad-plugins-eglglessink.other_details"></a><h2>Types and Values</h2>
-</div>
-</div>
-<div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html b/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
index 1e112ed..9b228bb 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: exclusion</title>
+<title>exclusion: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-dvdspu.html" title="dvdspu">
 <link rel="next" href="gst-plugins-bad-plugins-edgedetect.html" title="edgedetect">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-exclusion.top_of_page"></a>exclusion</span></h2>
-<p>exclusion — Exclusion exclodes the colors in the video signal.</p>
+<p>exclusion</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.26.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.30.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.26.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.30.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.26.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.30.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -176,19 +176,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-exclusion.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-exclusion.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstExclusion-struct"></a><h3>struct GstExclusion</h3>
 <pre class="programlisting">struct GstExclusion;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -206,13 +203,12 @@
 <pre class="programlisting">  “factor”                   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
 <p>Exclusion factor parameter.</p>
 <p>Flags: Read / Write</p>
-<p>Allowed values: &lt;= 175</p>
+<p>Allowed values: [1,175]</p>
 <p>Default value: 175</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-faac.html b/docs/plugins/html/gst-plugins-bad-plugins-faac.html
index 4d0098e..4f43029 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faac.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faac.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: faac</title>
+<title>faac: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-eglglessink.html" title="eglglessink">
+<link rel="prev" href="gst-plugins-bad-plugins-edgedetect.html" title="edgedetect">
 <link rel="next" href="gst-plugins-bad-plugins-faad.html" title="faad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,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-eglglessink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-edgedetect.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-faad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-faac.top_of_page"></a>faac</span></h2>
-<p>faac — Free MPEG-2/4 AAC encoder</p>
+<p>faac</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -109,7 +109,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.32.6.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.29.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.32.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -180,21 +180,20 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>audio/mpeg, mpegversion=(int)4, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, base-profile=(string){ main, lc, ssr, ltp }</td>
+<td>audio/mpeg, mpegversion=(int)4, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, base-profile=(string){ main, lc, ssr, ltp }, framed=(boolean)true</td>
 </tr>
 <tr>
 <td><p><span class="term"></span></p></td>
-<td> audio/mpeg, mpegversion=(int)2, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, profile=(string){ main, lc }</td>
+<td> audio/mpeg, mpegversion=(int)2, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, profile=(string){ main, lc }, framed=(boolean)true</td>
 </tr>
 </tbody>
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faac.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faac.other_details"></a><h2>Types and Values</h2>
@@ -226,8 +225,6 @@
   faacEncHandle handle;
 };
 </pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -300,7 +297,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-faad.html b/docs/plugins/html/gst-plugins-bad-plugins-faad.html
index f9b2ff9..403cee7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: faad</title>
+<title>faad: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-faac.html" title="faac">
 <link rel="next" href="gst-plugins-bad-plugins-faceblur.html" title="faceblur">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-faad.top_of_page"></a>faad</span></h2>
-<p>faad — Free MPEG-2/4 AAC decoder</p>
+<p>faad</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.30.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.33.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.30.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.33.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -141,24 +141,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faad.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faad.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstFaad-struct"></a><h3>GstFaad</h3>
 <pre class="programlisting">typedef struct _GstFaad GstFaad;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html b/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
index 51a71df..9fd9a38 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: faceblur</title>
+<title>faceblur: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-faad.html" title="faad">
 <link rel="next" href="gst-plugins-bad-plugins-facedetect.html" title="facedetect">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-faceblur.top_of_page"></a>faceblur</span></h2>
-<p>faceblur — Blurs faces in images and videos</p>
+<p>faceblur</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.31.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.34.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -51,7 +51,7 @@
 </tr>
 <tr>
 <td><p><span class="term">author</span></p></td>
-<td>Michael Sheldon &lt;mike@mikeasoft.com&gt;</td>
+<td>Michael Sheldon &lt;mike@mikeasoft.com&gt;,Robert Jobbagy &lt;jobbagy.robert@gmail.com&gt;</td>
 </tr>
 <tr>
 <td><p><span class="term">class</span></p></td>
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.31.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.34.3.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,18 +113,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faceblur.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-faceblur.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html b/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
index 82751fd..f972681 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: facedetect</title>
+<title>facedetect: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-faceblur.html" title="faceblur">
 <link rel="next" href="gst-plugins-bad-plugins-festival.html" title="festival">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-facedetect.top_of_page"></a>facedetect</span></h2>
-<p>facedetect — Performs face detection on videos and images, providing detected positions via bus messages</p>
+<p>facedetect</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.32.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.35.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.32.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.35.3.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,18 +113,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-facedetect.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-facedetect.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-festival.html b/docs/plugins/html/gst-plugins-bad-plugins-festival.html
index 465e725..4ce0857 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-festival.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-festival.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: festival</title>
+<title>festival: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-facedetect.html" title="facedetect">
 <link rel="next" href="gst-plugins-bad-plugins-fisheye.html" title="fisheye">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-festival.top_of_page"></a>festival</span></h2>
-<p>festival — Synthesizes plain text into audio</p>
+<p>festival</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -61,7 +61,7 @@
 in server mode, started as </p>
 <pre class="screen">festival --server</pre>
 <div class="refsect2">
-<a name="id-1.2.33.6.5"></a><h3>Example pipeline</h3>
+<a name="id-1.2.36.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.33.6.6.1"></a><h3>Element Information</h3>
+<a name="id-1.2.36.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.33.6.6.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.36.6.6.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -154,24 +154,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-festival.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-festival.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstFestival-struct"></a><h3>struct GstFestival</h3>
 <pre class="programlisting">struct GstFestival;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html b/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
index a5e061b..41015ff 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: fisheye</title>
+<title>fisheye: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-festival.html" title="festival">
 <link rel="next" href="gst-plugins-bad-plugins-fpsdisplaysink.html" title="fpsdisplaysink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-fisheye.top_of_page"></a>fisheye</span></h2>
-<p>fisheye — Simulate a fisheye lens by zooming on the center of the image and compressing the edges</p>
+<p>fisheye</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -62,7 +62,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.34.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.37.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.34.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.37.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -139,24 +139,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-fisheye.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-fisheye.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstFisheye-struct"></a><h3>struct GstFisheye</h3>
 <pre class="programlisting">struct GstFisheye;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html b/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
index fc638e7..1bb739d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: fpsdisplaysink</title>
+<title>fpsdisplaysink: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-fisheye.html" title="fisheye">
 <link rel="next" href="gst-plugins-bad-plugins-gaussianblur.html" title="gaussianblur">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -31,7 +31,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-fpsdisplaysink.top_of_page"></a>fpsdisplaysink</span></h2>
-<p>fpsdisplaysink — Shows the current frame-rate and drop-rate of the videosink as overlay or text on stdout</p>
+<p>fpsdisplaysink</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -115,7 +115,7 @@
 <tbody><tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink-fps-measurements" title="The “fps-measurements” signal">fps-measurements</a></td>
-<td class="signal_flags">Run Last</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
 </tr></tbody>
 </table></div>
 </div>
@@ -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.35.9.3"></a><h3>Example launch lines</h3>
+<a name="id-1.2.38.9.3"></a><h3>Example launch lines</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -163,7 +163,7 @@
 4</pre></td>
         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch videotestsrc <span class="gtkdoc opt">!</span> fpsdisplaysink
 gst<span class="gtkdoc opt">-</span>launch videotestsrc <span class="gtkdoc opt">!</span> fpsdisplaysink text<span class="gtkdoc opt">-</span>overlay<span class="gtkdoc opt">=</span><span class="keyword">false</span>
-gst<span class="gtkdoc opt">-</span>launch filesrc location<span class="gtkdoc opt">=</span>video<span class="gtkdoc opt">.</span>avi <span class="gtkdoc opt">!</span> decodebin2 name<span class="gtkdoc opt">=</span>d <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> fpsdisplaysink d<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> fakesink sync<span class="gtkdoc opt">=</span><span class="keyword">true</span>
+gst<span class="gtkdoc opt">-</span>launch filesrc location<span class="gtkdoc opt">=</span>video<span class="gtkdoc opt">.</span>avi <span class="gtkdoc opt">!</span> decodebin name<span class="gtkdoc opt">=</span>d <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> fpsdisplaysink d<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> fakesink sync<span class="gtkdoc opt">=</span><span class="keyword">true</span>
 gst<span class="gtkdoc opt">-</span>launch playbin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/video.avi video-sink=&quot;fpsdisplaysink&quot; audio-sink=fakesink</span></pre></td>
       </tr>
     </tbody>
@@ -174,7 +174,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.35.9.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.38.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.35.9.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.38.9.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -227,19 +227,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-fpsdisplaysink.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-fpsdisplaysink.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstFPSDisplaySink-struct"></a><h3>struct GstFPSDisplaySink</h3>
 <pre class="programlisting">struct GstFPSDisplaySink;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -346,7 +343,7 @@
                <a href="https://developer.gnome.org/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.35.13.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.38.13.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -382,13 +379,12 @@
 </tbody>
 </table></div>
 </div>
-<p>Flags: Run Last</p>
-<p class="since">Since 0.10.20</p>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
+<p class="since">Since: 0.10.20</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html b/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
index d40f8af..db5814c 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: gaussianblur</title>
+<title>gaussianblur: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-fpsdisplaysink.html" title="fpsdisplaysink">
 <link rel="next" href="gst-plugins-bad-plugins-jpegparse.html" title="jpegparse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-gaussianblur.top_of_page"></a>gaussianblur</span></h2>
-<p>gaussianblur — Perform Gaussian blur/sharpen on a video</p>
+<p>gaussianblur</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -35,7 +35,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.36.3.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.39.3.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -51,7 +51,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.36.3.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.39.3.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -77,7 +77,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.36.3.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.39.3.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -128,18 +128,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-gaussianblur.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-gaussianblur.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html b/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
index eb3733d..7eefe8e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: jpegparse</title>
+<title>jpegparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-gaussianblur.html" title="gaussianblur">
 <link rel="next" href="gst-plugins-bad-plugins-kaleidoscope.html" title="kaleidoscope">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -104,7 +104,8 @@
     <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> GstJpegParse
+                <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseParse.html">GstBaseParse</a>
+                    <span class="lineart">╰──</span> GstJpegParse
 </pre>
 </div>
 <div class="refsect1">
@@ -114,7 +115,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.37.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.40.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -132,7 +133,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.37.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.40.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -158,7 +159,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.37.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.40.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -203,55 +204,39 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>image/jpeg, format=(string){ I420, Y41B, UYVY, YV12 }, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], interlaced=(boolean){ true, false }, framerate=(fraction)[ 0/1, 2147483647/1 ], parsed=(boolean)true</td>
+<td>image/jpeg, format=(string){ I420, Y41B, UYVY, YV12 }, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], parsed=(boolean)true</td>
 </tr>
 </tbody>
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-jpegparse.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="GST-JPEG-PARSE:CAPS"></a><h3>GST_JPEG_PARSE()</h3>
 <pre class="programlisting">#define             GST_JPEG_PARSE(obj)</pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GST-JPEG-PARSE-CLASS:CAPS"></a><h3>GST_JPEG_PARSE_CLASS()</h3>
 <pre class="programlisting">#define             GST_JPEG_PARSE_CLASS(klass)</pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GST-IS-JPEG-PARSE:CAPS"></a><h3>GST_IS_JPEG_PARSE()</h3>
 <pre class="programlisting">#define             GST_IS_JPEG_PARSE(obj)</pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GST-IS-JPEG-PARSE-CLASS:CAPS"></a><h3>GST_IS_JPEG_PARSE_CLASS()</h3>
 <pre class="programlisting">#define             GST_IS_JPEG_PARSE_CLASS(klass)</pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="gst-jpeg-parse-get-type"></a><h3>gst_jpeg_parse_get_type ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
 gst_jpeg_parse_get_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
-<p>
-</p>
-<div class="refsect3">
-<a name="id-1.2.37.8.6.5"></a><h4>Returns</h4>
-<p></p>
-</div>
 </div>
 </div>
 <div class="refsect1">
@@ -259,30 +244,23 @@
 <div class="refsect2">
 <a name="GstJpegParse-struct"></a><h3>struct GstJpegParse</h3>
 <pre class="programlisting">struct GstJpegParse;</pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GstJpegParseClass"></a><h3>struct GstJpegParseClass</h3>
 <pre class="programlisting">struct GstJpegParseClass {
-  GstElementClass  parent_class;
+  GstBaseParseClass  parent_class;
 };
 </pre>
-<p>
-</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="GST-TYPE-JPEG-PARSE:CAPS"></a><h3>GST_TYPE_JPEG_PARSE</h3>
 <pre class="programlisting">#define             GST_TYPE_JPEG_PARSE</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html b/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
index 4145730..2f3812e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: kaleidoscope</title>
+<title>kaleidoscope: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-jpegparse.html" title="jpegparse">
 <link rel="next" href="gst-plugins-bad-plugins-liveadder.html" title="liveadder">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-kaleidoscope.top_of_page"></a>kaleidoscope</span></h2>
-<p>kaleidoscope — Applies 'kaleidoscope' geometric transform to the image</p>
+<p>kaleidoscope</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -91,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.38.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">
@@ -117,7 +117,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.38.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">
@@ -168,19 +168,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-kaleidoscope.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-kaleidoscope.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstKaleidoscope-struct"></a><h3>struct GstKaleidoscope</h3>
 <pre class="programlisting">struct GstKaleidoscope;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -212,7 +209,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html b/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
index dfdd764..ffba3c2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: liveadder</title>
+<title>liveadder: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-kaleidoscope.html" title="kaleidoscope">
 <link rel="next" href="gst-plugins-bad-plugins-marble.html" title="marble">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-liveadder.top_of_page"></a>liveadder</span></h2>
-<p>liveadder — Mixes live/discontinuous audio streams</p>
+<p>liveadder</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.39.7.3.1.1"></a><h3>Element Information</h3>
+<a name="id-1.2.42.7.4.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.39.7.3.1.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.42.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,11 +156,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-liveadder.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-liveadder.other_details"></a><h2>Types and Values</h2>
@@ -186,7 +185,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-marble.html b/docs/plugins/html/gst-plugins-bad-plugins-marble.html
index 50f8a06..63dc5f6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-marble.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-marble.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: marble</title>
+<title>marble: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-liveadder.html" title="liveadder">
 <link rel="next" href="gst-plugins-bad-plugins-mimenc.html" title="mimenc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-marble.top_of_page"></a>marble</span></h2>
-<p>marble — Applies a marbling effect to the image</p>
+<p>marble</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -95,7 +95,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.43.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.40.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">
@@ -172,19 +172,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-marble.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-marble.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMarble-struct"></a><h3>struct GstMarble</h3>
 <pre class="programlisting">struct GstMarble;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -227,7 +224,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html b/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
index 77a443c..e8f3aa0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mimdec</title>
+<title>mimdec: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mimenc.html" title="mimenc">
 <link rel="next" href="gst-plugins-bad-plugins-mirror.html" title="mirror">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-mimdec.top_of_page"></a>mimdec</span></h2>
-<p>mimdec — MSN Messenger compatible Mimic video decoder element</p>
+<p>mimdec</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -59,7 +59,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.42.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.45.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.42.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.45.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -140,24 +140,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mimdec.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mimdec.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMimDec-struct"></a><h3>struct GstMimDec</h3>
 <pre class="programlisting">struct GstMimDec;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html b/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
index 826c8c0..649662f 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mimenc</title>
+<title>mimenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-marble.html" title="marble">
 <link rel="next" href="gst-plugins-bad-plugins-mimdec.html" title="mimdec">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-mimenc.top_of_page"></a>mimenc</span></h2>
-<p>mimenc — MSN Messenger compatible Mimic video encoder element</p>
+<p>mimenc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -75,7 +75,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.41.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">
@@ -101,7 +101,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.41.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">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mimenc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mimenc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMimEnc-struct"></a><h3>struct GstMimEnc</h3>
 <pre class="programlisting">struct GstMimEnc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -183,7 +180,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mirror.html b/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
index 8fb1047..e290bc0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mirror</title>
+<title>mirror: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mimdec.html" title="mimdec">
 <link rel="next" href="gst-plugins-bad-plugins-modplug.html" title="modplug">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-mirror.top_of_page"></a>mirror</span></h2>
-<p>mirror — Split the image into two halves and reflect one over each other</p>
+<p>mirror</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -78,7 +78,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.46.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.43.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">
@@ -155,19 +155,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mirror.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mirror.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMirror-struct"></a><h3>struct GstMirror</h3>
 <pre class="programlisting">struct GstMirror;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -182,7 +179,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-modplug.html b/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
index 3fb7d83..5829ac1 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: modplug</title>
+<title>modplug: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mirror.html" title="mirror">
 <link rel="next" href="gst-plugins-bad-plugins-mpeg2enc.html" title="mpeg2enc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-modplug.top_of_page"></a>modplug</span></h2>
-<p>modplug — Module decoder based on modplug engine</p>
+<p>modplug</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -133,7 +133,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.44.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.47.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.44.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.47.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -226,19 +226,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-modplug.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-modplug.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstModPlug-struct"></a><h3>GstModPlug</h3>
 <pre class="programlisting">typedef struct _GstModPlug GstModPlug;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -347,7 +344,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html b/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
index 5ce918a..6e336d8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mpeg2enc</title>
+<title>mpeg2enc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-modplug.html" title="modplug">
-<link rel="next" href="gst-plugins-bad-plugins-mplex.html" title="mplex">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-mpegpsmux.html" title="mpegpsmux">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -23,14 +23,14 @@
 <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-modplug.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-mplex.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-mpegpsmux.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-mpeg2enc"></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-mpeg2enc.top_of_page"></a>mpeg2enc</span></h2>
-<p>mpeg2enc — High-quality MPEG-1/2 video encoder</p>
+<p>mpeg2enc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -249,7 +249,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.45.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">
@@ -276,7 +276,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.45.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">
@@ -327,19 +327,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mpeg2enc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mpeg2enc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMpeg2enc-struct"></a><h3>GstMpeg2enc</h3>
 <pre class="programlisting">typedef struct _GstMpeg2enc GstMpeg2enc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -635,7 +632,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mpegpsmux.html b/docs/plugins/html/gst-plugins-bad-plugins-mpegpsmux.html
new file mode 100644
index 0000000..f27f8ea
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpegpsmux.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>mpegpsmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mpeg2enc.html" title="mpeg2enc">
+<link rel="next" href="gst-plugins-bad-plugins-mpegtsmux.html" title="mpegtsmux">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-mpegpsmux.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-mpegpsmux.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-mpegpsmux.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-mpeg2enc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-mpegtsmux.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-mpegpsmux"></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-mpegpsmux.top_of_page"></a>mpegpsmux</span></h2>
+<p>mpegpsmux</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.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"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegpsmux.html#MpegPsMux--aggregate-gops" title="The “aggregate-gops” property">aggregate-gops</a></td>
+<td class="property_flags">Read / Write</td>
+</tr></tbody>
+</table></div>
+</div>
+<a name="MpegPsMux"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> MpegPsMux
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.49.6.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-mpegpsmux.html#plugin-mpegpsmux">mpegpsmux</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Lin YANG &lt;oxcsnicho@gmail.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Muxer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.49.6.2.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/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> video/x-dirac</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> video/x-h264</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/mpeg, mpegversion=(int){ 1, 2 }</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/mpeg, mpegversion=(int)4, stream-format=(string){ raw, adts }</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }</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/mpeg, mpegversion=(int)2, systemstream=(boolean)true</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.other_details"></a><h2>Types and Values</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegpsmux.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="MpegPsMux--aggregate-gops"></a><h3>The <code class="literal">“aggregate-gops”</code> property</h3>
+<pre class="programlisting">  “aggregate-gops”           <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Whether to aggregate GOPs and push them out as buffer lists.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mpegtsmux.html b/docs/plugins/html/gst-plugins-bad-plugins-mpegtsmux.html
new file mode 100644
index 0000000..3baf61a
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpegtsmux.html
@@ -0,0 +1,279 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>mpegtsmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mpegpsmux.html" title="mpegpsmux">
+<link rel="next" href="gst-plugins-bad-plugins-mplex.html" title="mplex">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-mpegtsmux.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-mpegtsmux.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-mpegtsmux.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-mpegpsmux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-mplex.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-mpegtsmux"></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-mpegtsmux.top_of_page"></a>mpegtsmux</span></h2>
+<p>mpegtsmux</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.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"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--m2ts-mode" title="The “m2ts-mode” property">m2ts-mode</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html"><span class="type">GstStructure</span></a> *</td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--prog-map" title="The “prog-map” property">prog-map</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pat-interval" title="The “pat-interval” property">pat-interval</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pmt-interval" title="The “pmt-interval” property">pmt-interval</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--alignment" title="The “alignment” property">alignment</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--si-interval" title="The “si-interval” property">si-interval</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<a name="MpegTsMux"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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> MpegTsMux
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.50.6.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-mpegtsmux.html#plugin-mpegtsmux">mpegtsmux</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Fluendo &lt;contact@fluendo.com&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Muxer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.50.6.2.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_%d</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/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> video/x-dirac</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> video/x-h264, stream-format=(string)byte-stream, alignment=(string){ au, nal }</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2 }</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/mpeg, framed=(boolean)true, mpegversion=(int)4, stream-format=(string)adts</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/mpeg, mpegversion=(int)4, stream-format=(string)raw</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-ac3, framed=(boolean)true</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-dts, framed=(boolean)true</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> subpicture/x-dvb</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> application/x-teletext</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> meta/x-klv, parsed=(boolean)true</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/mpegts, systemstream=(boolean)true, packetsize=(int){ 188, 192 }</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.other_details"></a><h2>Types and Values</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-mpegtsmux.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="MpegTsMux--m2ts-mode"></a><h3>The <code class="literal">“m2ts-mode”</code> property</h3>
+<pre class="programlisting">  “m2ts-mode”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Set to TRUE to output Blu-Ray disc format with 192 byte packets. FALSE for standard TS format with 188 byte packets.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="MpegTsMux--prog-map"></a><h3>The <code class="literal">“prog-map”</code> property</h3>
+<pre class="programlisting">  “prog-map”                 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html"><span class="type">GstStructure</span></a> *</pre>
+<p>A GstStructure specifies the mapping from elementary streams to programs.</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="MpegTsMux--pat-interval"></a><h3>The <code class="literal">“pat-interval”</code> property</h3>
+<pre class="programlisting">  “pat-interval”             <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>Set the interval (in ticks of the 90kHz clock) for writing out the PAT table.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 1</p>
+<p>Default value: 9000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="MpegTsMux--pmt-interval"></a><h3>The <code class="literal">“pmt-interval”</code> property</h3>
+<pre class="programlisting">  “pmt-interval”             <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>Set the interval (in ticks of the 90kHz clock) for writing out the PMT table.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 1</p>
+<p>Default value: 9000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="MpegTsMux--alignment"></a><h3>The <code class="literal">“alignment”</code> property</h3>
+<pre class="programlisting">  “alignment”                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>Number of packets per buffer (padded with dummy packets on EOS) (-1 = auto, 0 = all available packets, 7 for UDP streaming).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= G_MAXULONG</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="MpegTsMux--si-interval"></a><h3>The <code class="literal">“si-interval”</code> property</h3>
+<pre class="programlisting">  “si-interval”              <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>Set the interval (in ticks of the 90kHz clock) for writing out the ServiceInformation tables.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 1</p>
+<p>Default value: 9000</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html b/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
index 174e4cd..3b7b281 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mpg123audiodec</title>
+<title>mpg123audiodec: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mplex.html" title="mplex">
 <link rel="next" href="gst-plugins-bad-plugins-neonhttpsrc.html" title="neonhttpsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-mpg123audiodec.top_of_page"></a>mpg123audiodec</span></h2>
-<p>mpg123audiodec — Decodes mp3 streams using the mpg123 library</p>
+<p>mpg123audiodec</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.47.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.52.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.47.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.52.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -107,7 +107,7 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>audio/mpeg, mpegversion=(int){ 1 }, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], parsed=(boolean)true</td>
+<td>audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], parsed=(boolean)true</td>
 </tr>
 </tbody>
 </table></div>
@@ -137,24 +137,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mpg123audiodec.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mpg123audiodec.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMpg123AudioDec-struct"></a><h3>struct GstMpg123AudioDec</h3>
 <pre class="programlisting">struct GstMpg123AudioDec;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mplex.html b/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
index 6d22e38..a9ad171 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mplex</title>
+<title>mplex: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mpeg2enc.html" title="mpeg2enc">
+<link rel="prev" href="gst-plugins-bad-plugins-mpegtsmux.html" title="mpegtsmux">
 <link rel="next" href="gst-plugins-bad-plugins-mpg123audiodec.html" title="mpg123audiodec">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,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-mpeg2enc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-mpegtsmux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-mpg123audiodec.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-mplex.top_of_page"></a>mplex</span></h2>
-<p>mplex — High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</p>
+<p>mplex</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -107,7 +107,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.46.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.51.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.46.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.51.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -222,19 +222,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mplex.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-mplex.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstMplex-struct"></a><h3>GstMplex</h3>
 <pre class="programlisting">typedef struct _GstMplex GstMplex;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -301,7 +298,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
index 0f32e54..d4088ef 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: neonhttpsrc</title>
+<title>neonhttpsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-mpg123audiodec.html" title="mpg123audiodec">
 <link rel="next" href="gst-plugins-bad-plugins-ofa.html" title="ofa">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-neonhttpsrc.top_of_page"></a>neonhttpsrc</span></h2>
-<p>neonhttpsrc — Receive data as a client over the network via HTTP using NEON</p>
+<p>neonhttpsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -145,7 +145,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.48.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.53.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -171,7 +171,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.48.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.53.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -198,11 +198,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-neonhttpsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-neonhttpsrc.other_details"></a><h2>Types and Values</h2>
@@ -245,8 +244,6 @@
   guint read_timeout;
 };
 </pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -366,7 +363,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-ofa.html b/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
index be348ab..faa4a32 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: ofa</title>
+<title>ofa: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-neonhttpsrc.html" title="neonhttpsrc">
 <link rel="next" href="gst-plugins-bad-plugins-openalsrc.html" title="openalsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-ofa.top_of_page"></a>ofa</span></h2>
-<p>ofa — Find a music fingerprint using MusicIP's libofa</p>
+<p>ofa</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -78,7 +78,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.54.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.49.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.54.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -155,19 +155,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-ofa.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-ofa.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstOFA-struct"></a><h3>struct GstOFA</h3>
 <pre class="programlisting">struct GstOFA;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -182,7 +179,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html b/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
index f9d8283..11e753d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: openalsink</title>
+<title>openalsink: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-openalsrc.html" title="openalsrc">
-<link rel="next" href="gst-plugins-bad-plugins-pcapparse.html" title="pcapparse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-opusdec.html" title="opusdec">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
 <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-openalsrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-pcapparse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-opusdec.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-openalsink"></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-openalsink.top_of_page"></a>openalsink</span></h2>
-<p>openalsink — Output audio through OpenAL</p>
+<p>openalsink</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.51.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.56.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.51.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.56.3.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -101,18 +101,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-openalsink.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-openalsink.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
index c2dbbba..41f4626 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: openalsrc</title>
+<title>openalsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-ofa.html" title="ofa">
 <link rel="next" href="gst-plugins-bad-plugins-openalsink.html" title="openalsink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-openalsrc.top_of_page"></a>openalsrc</span></h2>
-<p>openalsrc — Input audio through OpenAL</p>
+<p>openalsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -88,7 +88,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.50.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">
@@ -114,7 +114,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.50.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">
@@ -145,19 +145,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-openalsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-openalsrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstOpenalSrc-struct"></a><h3>struct GstOpenalSrc</h3>
 <pre class="programlisting">struct GstOpenalSrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -180,7 +177,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html b/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
index 03f1219..c412bcd 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: opencvtextoverlay</title>
+<title>opencvtextoverlay: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-templatematch.html" title="templatematch">
 <link rel="next" href="gst-plugins-bad-plugins-tunnel.html" title="tunnel">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-opencvtextoverlay.top_of_page"></a>opencvtextoverlay</span></h2>
-<p>opencvtextoverlay — Write text on the top of video</p>
+<p>opencvtextoverlay</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -118,7 +118,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.70.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.80.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.70.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.80.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -195,19 +195,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-opencvtextoverlay.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-opencvtextoverlay.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstOpencvTextOverlay-struct"></a><h3>struct GstOpencvTextOverlay</h3>
 <pre class="programlisting">struct GstOpencvTextOverlay;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -294,7 +291,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-opusdec.html b/docs/plugins/html/gst-plugins-bad-plugins-opusdec.html
new file mode 100644
index 0000000..4f1427c
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-opusdec.html
@@ -0,0 +1,197 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>opusdec: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-openalsink.html" title="openalsink">
+<link rel="next" href="gst-plugins-bad-plugins-opusenc.html" title="opusenc">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-opusdec.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-opusdec.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-opusdec.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-openalsink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-opusenc.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-opusdec"></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-opusdec.top_of_page"></a>opusdec</span></h2>
+<p>opusdec</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.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"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusdec.html#GstOpusDec--apply-gain" title="The “apply-gain” property">apply-gain</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusdec.html#GstOpusDec--use-inband-fec" title="The “use-inband-fec” property">use-inband-fec</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<a name="GstOpenalSrc"></a><a name="GstOpencvTextOverlay"></a><a name="GstOpusDec"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.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-plugins-opusdec.html#GstOpusDec-struct" title="struct GstOpusDec">GstOpusDec</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstaudiodecoder.html#GstAudioDecoder">GstAudioDecoder</a>
+                    <span class="lineart">╰──</span> GstOpusDec
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.57.9.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">opus</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Vincent Penquerc'h &lt;vincent.penquerch@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Decoder/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.57.9.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-opus</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>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 48000, 24000, 16000, 12000, 8000 }, channels=(int)[ 1, 8 ]</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstOpusDec-struct"></a><h3>struct GstOpusDec</h3>
+<pre class="programlisting">struct GstOpusDec;</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusdec.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="GstOpusDec--apply-gain"></a><h3>The <code class="literal">“apply-gain”</code> property</h3>
+<pre class="programlisting">  “apply-gain”               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Apply gain if any is specified in the header.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: TRUE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusDec--use-inband-fec"></a><h3>The <code class="literal">“use-inband-fec”</code> property</h3>
+<pre class="programlisting">  “use-inband-fec”           <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Use forward error correction if available.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-opusenc.html b/docs/plugins/html/gst-plugins-bad-plugins-opusenc.html
new file mode 100644
index 0000000..d0f3ad5
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-opusenc.html
@@ -0,0 +1,344 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>opusenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-opusdec.html" title="opusdec">
+<link rel="next" href="gst-plugins-bad-plugins-opusparse.html" title="opusparse">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-opusenc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-opusenc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-opusenc.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-opusdec.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-opusparse.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-opusenc"></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-opusenc.top_of_page"></a>opusenc</span></h2>
+<p>opusenc</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.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"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio" title="The “audio” property">audio</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstOpusEncBandwidth</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bandwidth" title="The “bandwidth” property">bandwidth</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate" title="The “bitrate” property">bitrate</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--cbr" title="The “cbr” property">cbr</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--complexity" title="The “complexity” property">complexity</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--constrained-vbr" title="The “constrained-vbr” property">constrained-vbr</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--dtx" title="The “dtx” property">dtx</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstOpusEncFrameSize</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--frame-size" title="The “frame-size” property">frame-size</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--inband-fec" title="The “inband-fec” property">inband-fec</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--max-payload-size" title="The “max-payload-size” property">max-payload-size</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--packet-loss-percentage" title="The “packet-loss-percentage” property">packet-loss-percentage</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstOpusEncAudioType</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio-type" title="The “audio-type” property">audio-type</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GstOpusEncBitrateType</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate-type" title="The “bitrate-type” property">bitrate-type</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<a name="GstOpenalSrc"></a><a name="GstOpencvTextOverlay"></a><a name="GstOpusDec"></a><a name="GstOpusEnc"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.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-plugins-opusenc.html#GstOpusEnc-struct" title="struct GstOpusEnc">GstOpusEnc</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstaudioencoder.html#GstAudioEncoder">GstAudioEncoder</a>
+                    <span class="lineart">╰──</span> GstOpusEnc
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.58.10.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">opus</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Vincent Penquerc'h &lt;vincent.penquerch@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Encoder/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.58.10.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 12000, 16000, 24000, 48000 }, channels=(int)[ 1, 2 ]</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>audio/x-opus</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstOpusEnc-struct"></a><h3>struct GstOpusEnc</h3>
+<pre class="programlisting">struct GstOpusEnc;</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusenc.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="GstOpusEnc--audio"></a><h3>The <code class="literal">“audio”</code> property</h3>
+<pre class="programlisting">  “audio”                    <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Audio or voice (DEPRECATED: use audio-type).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: TRUE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--bandwidth"></a><h3>The <code class="literal">“bandwidth”</code> property</h3>
+<pre class="programlisting">  “bandwidth”                <span class="type">GstOpusEncBandwidth</span></pre>
+<p>Audio Band Width.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: Full band</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--bitrate"></a><h3>The <code class="literal">“bitrate”</code> property</h3>
+<pre class="programlisting">  “bitrate”                  <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>Specify an encoding bit-rate (in bps).</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [4000,650000]</p>
+<p>Default value: 64000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--cbr"></a><h3>The <code class="literal">“cbr”</code> property</h3>
+<pre class="programlisting">  “cbr”                      <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Constant bit rate (DEPRECATED: use bitrate-type).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: TRUE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--complexity"></a><h3>The <code class="literal">“complexity”</code> property</h3>
+<pre class="programlisting">  “complexity”               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>Complexity.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [0,10]</p>
+<p>Default value: 10</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--constrained-vbr"></a><h3>The <code class="literal">“constrained-vbr”</code> property</h3>
+<pre class="programlisting">  “constrained-vbr”          <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Constrained VBR (DEPRECATED: use bitrate-type).</p>
+<p>Flags: Read / Write</p>
+<p>Default value: TRUE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--dtx"></a><h3>The <code class="literal">“dtx”</code> property</h3>
+<pre class="programlisting">  “dtx”                      <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>DTX.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--frame-size"></a><h3>The <code class="literal">“frame-size”</code> property</h3>
+<pre class="programlisting">  “frame-size”               <span class="type">GstOpusEncFrameSize</span></pre>
+<p>The duration of an audio frame, in ms.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 20</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--inband-fec"></a><h3>The <code class="literal">“inband-fec”</code> property</h3>
+<pre class="programlisting">  “inband-fec”               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Enable forward error correction.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--max-payload-size"></a><h3>The <code class="literal">“max-payload-size”</code> property</h3>
+<pre class="programlisting">  “max-payload-size”         <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
+<p>Maximum payload size in bytes.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [2,4000]</p>
+<p>Default value: 4000</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--packet-loss-percentage"></a><h3>The <code class="literal">“packet-loss-percentage”</code> property</h3>
+<pre class="programlisting">  “packet-loss-percentage”   <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
+<p>Packet loss percentage.</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [0,100]</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--audio-type"></a><h3>The <code class="literal">“audio-type”</code> property</h3>
+<pre class="programlisting">  “audio-type”               <span class="type">GstOpusEncAudioType</span></pre>
+<p>What type of audio to optimize for.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: Generic audio</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstOpusEnc--bitrate-type"></a><h3>The <code class="literal">“bitrate-type”</code> property</h3>
+<pre class="programlisting">  “bitrate-type”             <span class="type">GstOpusEncBitrateType</span></pre>
+<p>Bitrate type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: CBR</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-opusparse.html b/docs/plugins/html/gst-plugins-bad-plugins-opusparse.html
new file mode 100644
index 0000000..da892bf
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-opusparse.html
@@ -0,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>opusparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-opusenc.html" title="opusenc">
+<link rel="next" href="gst-plugins-bad-plugins-rtpopuspay.html" title="rtpopuspay">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-opusparse.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-opusparse.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="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-opusenc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-rtpopuspay.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-opusparse"></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-opusparse.top_of_page"></a>opusparse</span></h2>
+<p>opusparse</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<a name="GstOpenalSrc"></a><a name="GstOpencvTextOverlay"></a><a name="GstOpusDec"></a><a name="GstOpusEnc"></a><a name="GstOpusParse"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusparse.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-plugins-opusparse.html#GstOpusParse-struct" title="struct GstOpusParse">GstOpusParse</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusparse.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseParse.html">GstBaseParse</a>
+                    <span class="lineart">╰──</span> GstOpusParse
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusparse.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.59.10.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">opus</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Vincent Penquerc'h &lt;vincent.penquerch@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Parser/Audio</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.59.10.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-opus</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>audio/x-opus, framed=(boolean)true</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusparse.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-opusparse.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstOpusParse-struct"></a><h3>struct GstOpusParse</h3>
+<pre class="programlisting">struct GstOpusParse;</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html b/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
index 1beb427..b6f1e59 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: pcapparse</title>
+<title>pcapparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-openalsink.html" title="openalsink">
+<link rel="prev" href="gst-plugins-bad-plugins-rtpopusdepay.html" title="rtpopusdepay">
 <link rel="next" href="gst-plugins-bad-plugins-pinch.html" title="pinch">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,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-openalsink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-rtpopusdepay.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-pinch.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-pcapparse.top_of_page"></a>pcapparse</span></h2>
-<p>pcapparse — Parses a raw pcap stream</p>
+<p>pcapparse</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.52.7.3"></a><h3>Example pipelines</h3>
+<a name="id-1.2.62.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.52.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">
@@ -152,7 +152,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.52.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">
@@ -203,11 +203,10 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pcapparse.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pcapparse.other_details"></a><h2>Types and Values</h2>
@@ -271,7 +270,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-pinch.html b/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
index c7d9c4a..1663db4 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: pinch</title>
+<title>pinch: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-pcapparse.html" title="pcapparse">
 <link rel="next" href="gst-plugins-bad-plugins-pyramidsegment.html" title="pyramidsegment">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-pinch.top_of_page"></a>pinch</span></h2>
-<p>pinch — Applies 'pinch' geometric transform to the image</p>
+<p>pinch</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.53.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.63.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.53.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.63.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pinch.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pinch.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstPinch-struct"></a><h3>struct GstPinch</h3>
 <pre class="programlisting">struct GstPinch;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -184,7 +181,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-aiff.html
similarity index 60%
copy from docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
copy to docs/plugins/html/gst-plugins-bad-plugins-plugin-aiff.html
index a6a2502..4d22e0d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-aiff.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: eglglessink</title>
+<title>aiff: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="ch02.html" title="gst-plugins-bad Plugins">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-audiomixer.html" title="audiomixer">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,20 +16,20 @@
 <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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvdspu.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faac.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-audiomixer.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-plugin-eglglessink"></a><div class="titlepage"></div>
+<a name="gst-plugins-bad-plugins-plugin-aiff"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle">eglglessink</span></h2>
-<p>eglglessink — <a name="plugin-eglglessink"></a>EGL/GLES sink</p>
+<h2><span class="refentrytitle">aiff</span></h2>
+<p>aiff — <a name="plugin-aiff"></a>Create and parse Audio Interchange File Format (AIFF) files</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.15.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.2.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -38,11 +38,11 @@
 <tbody>
 <tr>
 <td><p><span class="term">filename</span></p></td>
-<td>libgsteglglessink.so</td>
+<td>libgstaiff.so</td>
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.2.0</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,21 +60,26 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.15.4"></a><h2>Elements</h2>
+<a name="id-1.3.2.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
 <col>
 </colgroup>
-<tbody><tr>
-<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-eglglessink.html" title="eglglessink">eglglessink</a></span></p></td>
-<td>An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</td>
-</tr></tbody>
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-aiffmux.html" title="aiffmux">aiffmux</a></span></p></td>
+<td>Multiplex raw audio into AIFF</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-aiffparse.html" title="aiffparse">aiffparse</a></span></p></td>
+<td>Parse a .aiff file into raw audio</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 1c8c355..eec8489 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-assrender.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-assrender.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: assrender</title>
+<title>assrender: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-autoconvert.html" title="autoconvert">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-bayer.html" title="bayer">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.4.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.6.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.4.4"></a><h2>Elements</h2>
+<a name="id-1.3.6.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiomixer.html
similarity index 60%
copy from docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
copy to docs/plugins/html/gst-plugins-bad-plugins-plugin-audiomixer.html
index a6a2502..d7a8d52 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiomixer.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: eglglessink</title>
+<title>audiomixer: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-aiff.html" title="aiff">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-audiovisualizers.html" title="audiovisualizers">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,20 +16,20 @@
 <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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvdspu.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faac.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-aiff.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-audiovisualizers.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-plugin-eglglessink"></a><div class="titlepage"></div>
+<a name="gst-plugins-bad-plugins-plugin-audiomixer"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle">eglglessink</span></h2>
-<p>eglglessink — <a name="plugin-eglglessink"></a>EGL/GLES sink</p>
+<h2><span class="refentrytitle">audiomixer</span></h2>
+<p>audiomixer — <a name="plugin-audiomixer"></a>Mixes multiple audio streams</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.15.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.3.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -38,11 +38,11 @@
 <tbody>
 <tr>
 <td><p><span class="term">filename</span></p></td>
-<td>libgsteglglessink.so</td>
+<td>libgstaudiomixer.so</td>
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.2.0</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,21 +60,26 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.15.4"></a><h2>Elements</h2>
+<a name="id-1.3.3.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
 <col>
 </colgroup>
-<tbody><tr>
-<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-eglglessink.html" title="eglglessink">eglglessink</a></span></p></td>
-<td>An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</td>
-</tr></tbody>
+<tbody>
+<tr>
+<td><p><span class="term">audiointerleave</span></p></td>
+<td>Mixes multiple audio streams</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-audiomixer.html" title="audiomixer">audiomixer</a></span></p></td>
+<td>Mixes multiple audio streams</td>
+</tr>
+</tbody>
 </table></div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 4672550..53b3c7e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: audiovisualizers</title>
+<title>audiovisualizers: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="ch02.html" title="gst-plugins-bad Plugins">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-audiomixer.html" title="audiomixer">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-autoconvert.html" title="autoconvert">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-audiomixer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-autoconvert.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.2.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.4.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,11 +42,11 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
-<td>GPL</td>
+<td>LGPL</td>
 </tr>
 <tr>
 <td><p><span class="term">package</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.2.4"></a><h2>Elements</h2>
+<a name="id-1.3.4.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -88,7 +88,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 82cc7c7..7b43793 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: autoconvert</title>
+<title>autoconvert: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-audiovisualizers.html" title="audiovisualizers">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-assrender.html" title="assrender">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.3.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.5.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.3.4"></a><h2>Elements</h2>
+<a name="id-1.3.5.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 e3d48cb..38dfbe7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: bayer</title>
+<title>bayer: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-assrender.html" title="assrender">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-bz2.html" title="bz2">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-bs2b.html" title="bs2b">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,7 +17,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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-assrender.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-bz2.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-bs2b.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-plugin-bayer"></a><div class="titlepage"></div>
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.5.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.7.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.5.4"></a><h2>Elements</h2>
+<a name="id-1.3.7.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bs2b.html
similarity index 62%
copy from docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
copy to docs/plugins/html/gst-plugins-bad-plugins-plugin-bs2b.html
index a6a2502..3fb6ab2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bs2b.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: eglglessink</title>
+<title>bs2b: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-bayer.html" title="bayer">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-bz2.html" title="bz2">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,20 +16,20 @@
 <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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvdspu.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faac.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-bayer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-bz2.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-plugin-eglglessink"></a><div class="titlepage"></div>
+<a name="gst-plugins-bad-plugins-plugin-bs2b"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle">eglglessink</span></h2>
-<p>eglglessink — <a name="plugin-eglglessink"></a>EGL/GLES sink</p>
+<h2><span class="refentrytitle">bs2b</span></h2>
+<p>bs2b — <a name="plugin-bs2b"></a>Improve headphone listening of stereo audio recordsusing the bs2b library.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.15.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.8.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -38,11 +38,11 @@
 <tbody>
 <tr>
 <td><p><span class="term">filename</span></p></td>
-<td>libgsteglglessink.so</td>
+<td>libgstbs2b.so</td>
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.2.0</td>
+<td>1.5.0.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>
@@ -60,21 +60,20 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.15.4"></a><h2>Elements</h2>
+<a name="id-1.3.8.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
 <col>
 </colgroup>
 <tbody><tr>
-<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-eglglessink.html" title="eglglessink">eglglessink</a></span></p></td>
-<td>An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</td>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-bs2b.html" title="bs2b">bs2b</a></span></p></td>
+<td>Improve headphone listening of stereo audio records using the bs2b library.</td>
 </tr></tbody>
 </table></div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 5476ca6..86b2263 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: bz2</title>
+<title>bz2: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-bayer.html" title="bayer">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-bs2b.html" title="bs2b">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-camerabin.html" title="camerabin">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-bayer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-bs2b.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-camerabin.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.6.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.9.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.6.4"></a><h2>Elements</h2>
+<a name="id-1.3.9.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 d641942..f948512 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: camerabin</title>
+<title>camerabin: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-bz2.html" title="bz2">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-coloreffects.html" title="coloreffects">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.7.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.10.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.7.4"></a><h2>Elements</h2>
+<a name="id-1.3.10.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -84,7 +84,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 5d8e40b..6fef6d8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: coloreffects</title>
+<title>coloreffects: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-camerabin.html" title="camerabin">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-curl.html" title="curl">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.8.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.11.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.8.4"></a><h2>Elements</h2>
+<a name="id-1.3.11.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 062c712..725a394 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: curl</title>
+<title>curl: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-coloreffects.html" title="coloreffects">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-dataurisrc.html" title="dataurisrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.9.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.12.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.9.4"></a><h2>Elements</h2>
+<a name="id-1.3.12.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -88,7 +88,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 0c28890..7c836a8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dataurisrc</title>
+<title>dataurisrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-curl.html" title="curl">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-debugutilsbad.html" title="debugutilsbad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.10.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.13.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.10.4"></a><h2>Elements</h2>
+<a name="id-1.3.13.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 2c5c331..7156ba3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: debugutilsbad</title>
+<title>debugutilsbad: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-dataurisrc.html" title="dataurisrc">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-dtsdec.html" title="dtsdec">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.11.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.14.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.11.4"></a><h2>Elements</h2>
+<a name="id-1.3.14.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -84,6 +84,10 @@
 <td>DebugSpy provides information on buffers with bus messages</td>
 </tr>
 <tr>
+<td><p><span class="term">errorignore</span></p></td>
+<td>Pass through all packets but ignore some GstFlowReturn types</td>
+</tr>
+<tr>
 <td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-fpsdisplaysink.html" title="fpsdisplaysink">fpsdisplaysink</a></span></p></td>
 <td>Shows the current frame-rate and drop-rate of the videosink as overlay or text on stdout</td>
 </tr>
@@ -96,7 +100,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 cad32b0..232f730 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dtsdec</title>
+<title>dtsdec: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-debugutilsbad.html" title="debugutilsbad">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-dvb.html" title="dvb">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.12.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.15.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.12.4"></a><h2>Elements</h2>
+<a name="id-1.3.15.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 bf4ebd6..e3518b2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dvb</title>
+<title>dvb: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-dtsdec.html" title="dtsdec">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.13.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.16.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.13.4"></a><h2>Elements</h2>
+<a name="id-1.3.16.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 a6a157b..95fd851 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: dvdspu</title>
+<title>dvdspu: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-dvb.html" title="dvb">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-eglglessink.html" title="eglglessink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,7 +17,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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-eglglessink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faac.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-plugin-dvdspu"></a><div class="titlepage"></div>
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.14.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.17.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.14.4"></a><h2>Elements</h2>
+<a name="id-1.3.17.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 97d265b..de9bf31 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: faac</title>
+<title>faac: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-eglglessink.html" title="eglglessink">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-faad.html" title="faad">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-eglglessink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvdspu.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.16.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.18.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.3</td>
+<td>1.5.0.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>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.16.4"></a><h2>Elements</h2>
+<a name="id-1.3.18.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 39a61bb..faec911 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: faad</title>
+<title>faad: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-festival.html" title="festival">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.17.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.19.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.17.4"></a><h2>Elements</h2>
+<a name="id-1.3.19.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 b41947b..802a4f7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: festival</title>
+<title>festival: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-faad.html" title="faad">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-gaudieffects.html" title="gaudieffects">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.18.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.20.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.18.4"></a><h2>Elements</h2>
+<a name="id-1.3.20.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 8ce98f4..cdcc103 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: gaudieffects</title>
+<title>gaudieffects: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-festival.html" title="festival">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-geometrictransform.html" title="geometrictransform">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.19.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.21.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.19.4"></a><h2>Elements</h2>
+<a name="id-1.3.21.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -100,7 +100,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 2f4b139..ab305f2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: geometrictransform</title>
+<title>geometrictransform: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-gaudieffects.html" title="gaudieffects">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-gsm.html" title="gsm">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.20.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.22.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.20.4"></a><h2>Elements</h2>
+<a name="id-1.3.22.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -136,7 +136,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 e13e50f..903eeea 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: gsm</title>
+<title>gsm: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-geometrictransform.html" title="geometrictransform">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-jpegformat.html" title="jpegformat">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.21.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.23.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.21.4"></a><h2>Elements</h2>
+<a name="id-1.3.23.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 212db35..0f7e0fb 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: jpegformat</title>
+<title>jpegformat: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-gsm.html" title="gsm">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-liveadder.html" title="liveadder">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.22.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.24.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.22.4"></a><h2>Elements</h2>
+<a name="id-1.3.24.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 c18cd73..394217b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: liveadder</title>
+<title>liveadder: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-jpegformat.html" title="jpegformat">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-mimic.html" title="mimic">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.23.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.25.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.23.4"></a><h2>Elements</h2>
+<a name="id-1.3.25.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 ac31a09..101ad49 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mimic</title>
+<title>mimic: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-liveadder.html" title="liveadder">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-mms.html" title="mms">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.24.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.26.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.24.4"></a><h2>Elements</h2>
+<a name="id-1.3.26.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 6fcaa0e..35dbf53 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mms</title>
+<title>mms: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-mimic.html" title="mimic">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-modplug.html" title="modplug">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.25.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.27.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.25.4"></a><h2>Elements</h2>
+<a name="id-1.3.27.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 cb0eab8..b8d9335 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: modplug</title>
+<title>modplug: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-mms.html" title="mms">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-mpeg2enc.html" title="mpeg2enc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.26.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.28.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.26.4"></a><h2>Elements</h2>
+<a name="id-1.3.28.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 7c3778f..3ceb53f 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mpeg2enc</title>
+<title>mpeg2enc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-modplug.html" title="modplug">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-mpegtsmux.html" title="mpegtsmux">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-mpegpsmux.html" title="mpegpsmux">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,7 +17,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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-modplug.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-mpegtsmux.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-mpegpsmux.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-plugin-mpeg2enc"></a><div class="titlepage"></div>
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.27.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.29.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.27.4"></a><h2>Elements</h2>
+<a name="id-1.3.29.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegpsmux.html
similarity index 63%
rename from docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
rename to docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegpsmux.html
index a6a2502..db37976 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-eglglessink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegpsmux.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: eglglessink</title>
+<title>mpegpsmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-dvdspu.html" title="dvdspu">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-faac.html" title="faac">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-mpeg2enc.html" title="mpeg2enc">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-mpegtsmux.html" title="mpegtsmux">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,20 +16,20 @@
 <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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-dvdspu.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-faac.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-mpeg2enc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-mpegtsmux.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-plugin-eglglessink"></a><div class="titlepage"></div>
+<a name="gst-plugins-bad-plugins-plugin-mpegpsmux"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle">eglglessink</span></h2>
-<p>eglglessink — <a name="plugin-eglglessink"></a>EGL/GLES sink</p>
+<h2><span class="refentrytitle">mpegpsmux</span></h2>
+<p>mpegpsmux — <a name="plugin-mpegpsmux"></a>MPEG-PS muxer</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.15.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.30.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -38,11 +38,11 @@
 <tbody>
 <tr>
 <td><p><span class="term">filename</span></p></td>
-<td>libgsteglglessink.so</td>
+<td>libgstmpegpsmux.so</td>
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.2.0</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,21 +60,20 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.15.4"></a><h2>Elements</h2>
+<a name="id-1.3.30.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
 <col>
 </colgroup>
 <tbody><tr>
-<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-eglglessink.html" title="eglglessink">eglglessink</a></span></p></td>
-<td>An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</td>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-mpegpsmux.html" title="mpegpsmux">mpegpsmux</a></span></p></td>
+<td>Multiplexes media streams into an MPEG Program Stream</td>
 </tr></tbody>
 </table></div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 0400613..706e2b7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mpegtsmux</title>
+<title>mpegtsmux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-mpeg2enc.html" title="mpeg2enc">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-mpegpsmux.html" title="mpegpsmux">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-mplex.html" title="mplex">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-mpeg2enc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-mpegpsmux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-mplex.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.28.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.31.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,21 +60,20 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.28.4"></a><h2>Elements</h2>
+<a name="id-1.3.31.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
 <col>
 </colgroup>
 <tbody><tr>
-<td><p><span class="term">mpegtsmux</span></p></td>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-mpegtsmux.html" title="mpegtsmux">mpegtsmux</a></span></p></td>
 <td>Multiplexes media streams into an MPEG Transport Stream</td>
 </tr></tbody>
 </table></div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 f0d350c..44d3051 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: mplex</title>
+<title>mplex: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-mpegtsmux.html" title="mpegtsmux">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-neon.html" title="neon">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.29.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.32.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.29.4"></a><h2>Elements</h2>
+<a name="id-1.3.32.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 b606842..09f07a2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: neon</title>
+<title>neon: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-mplex.html" title="mplex">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-ofa.html" title="ofa">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.30.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.33.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2.1</td>
+<td>1.5.0.1</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.30.4"></a><h2>Elements</h2>
+<a name="id-1.3.33.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 633cc7e..7ba4878 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: ofa</title>
+<title>ofa: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-neon.html" title="neon">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-openal.html" title="openal">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.31.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.34.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.31.4"></a><h2>Elements</h2>
+<a name="id-1.3.34.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 ce85f0b..600a8f6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: openal</title>
+<title>openal: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-ofa.html" title="ofa">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-opencv.html" title="opencv">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.32.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.35.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.32.4"></a><h2>Elements</h2>
+<a name="id-1.3.35.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 8f808e6..84325a8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: opencv</title>
+<title>opencv: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-openal.html" title="openal">
-<link rel="next" href="gst-plugins-bad-plugins-plugin-pcapparse.html" title="pcapparse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-opus.html" title="opus">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,7 +17,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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-openal.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-pcapparse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-opus.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-plugin-opencv"></a><div class="titlepage"></div>
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.33.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.36.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.33.4"></a><h2>Elements</h2>
+<a name="id-1.3.36.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -150,7 +150,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-opus.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-opus.html
new file mode 100644
index 0000000..29d0766
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-opus.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>opus: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-opencv.html" title="opencv">
+<link rel="next" href="gst-plugins-bad-plugins-plugin-pcapparse.html" title="pcapparse">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-opencv.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-pcapparse.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-plugin-opus"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">opus</span></h2>
+<p>opus — <a name="plugin-opus"></a>OPUS plugin library</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.37.3"></a><h2>Plugin Information</h2>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term">filename</span></p></td>
+<td>libgstopus.so</td>
+</tr>
+<tr>
+<td><p><span class="term">version</span></p></td>
+<td>1.5.91</td>
+</tr>
+<tr>
+<td><p><span class="term">run-time license</span></p></td>
+<td>LGPL</td>
+</tr>
+<tr>
+<td><p><span class="term">package</span></p></td>
+<td>GStreamer Bad Plug-ins source release</td>
+</tr>
+<tr>
+<td><p><span class="term">origin</span></p></td>
+<td>Unknown package origin</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="id-1.3.37.4"></a><h2>Elements</h2>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-opusdec.html" title="opusdec">opusdec</a></span></p></td>
+<td>decode opus streams to audio</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-opusenc.html" title="opusenc">opusenc</a></span></p></td>
+<td>Encodes audio in Opus format</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-opusparse.html" title="opusparse">opusparse</a></span></p></td>
+<td>parses opus audio streams</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-rtpopusdepay.html" title="rtpopusdepay">rtpopusdepay</a></span></p></td>
+<td>Extracts Opus audio from RTP packets</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gst-plugins-bad-plugins-rtpopuspay.html" title="rtpopuspay">rtpopuspay</a></span></p></td>
+<td>Puts Opus audio in RTP packets</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
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 45b1ef7..76dd821 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: pcapparse</title>
+<title>pcapparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
-<link rel="prev" href="gst-plugins-bad-plugins-plugin-opencv.html" title="opencv">
+<link rel="prev" href="gst-plugins-bad-plugins-plugin-opus.html" title="opus">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-rawparse.html" title="rawparse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-opencv.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-opus.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-plugin-rawparse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.34.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.38.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.34.4"></a><h2>Elements</h2>
+<a name="id-1.3.38.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 3cc93fa..446fd42 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rawparse</title>
+<title>rawparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-pcapparse.html" title="pcapparse">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-rfbsrc.html" title="rfbsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.35.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.39.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.35.4"></a><h2>Elements</h2>
+<a name="id-1.3.39.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 617913b..9194a93 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rfbsrc</title>
+<title>rfbsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-rawparse.html" title="rawparse">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-rtmp.html" title="rtmp">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.36.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.40.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.36.4"></a><h2>Elements</h2>
+<a name="id-1.3.40.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rtmp.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rtmp.html
index 0efb52a..c8e4d1d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rtmp.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rtmp.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rtmp</title>
+<title>rtmp: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-rfbsrc.html" title="rfbsrc">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-sdp.html" title="sdp">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.37.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.41.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.37.4"></a><h2>Elements</h2>
+<a name="id-1.3.41.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 7a36788..2f511a0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: sdp</title>
+<title>sdp: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-rtmp.html" title="rtmp">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-shm.html" title="shm">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.38.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.42.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.38.4"></a><h2>Elements</h2>
+<a name="id-1.3.42.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 fa5ebab..24a07cc 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: shm</title>
+<title>shm: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-sdp.html" title="sdp">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-soundtouch.html" title="soundtouch">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.39.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.43.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.39.4"></a><h2>Elements</h2>
+<a name="id-1.3.43.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 3285c16..9853628 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: soundtouch</title>
+<title>soundtouch: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-shm.html" title="shm">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-speed.html" title="speed">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.40.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.44.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.40.4"></a><h2>Elements</h2>
+<a name="id-1.3.44.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -80,7 +80,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 3ca6847..e2e06a6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: speed</title>
+<title>speed: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-soundtouch.html" title="soundtouch">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-voaacenc.html" title="voaacenc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.41.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.45.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.41.4"></a><h2>Elements</h2>
+<a name="id-1.3.45.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 e6e8ce6..b56ca89 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: voaacenc</title>
+<title>voaacenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-speed.html" title="speed">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-voamrwbenc.html" title="voamrwbenc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.42.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.46.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.42.4"></a><h2>Elements</h2>
+<a name="id-1.3.46.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 a08d553..038f1eb 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: voamrwbenc</title>
+<title>voamrwbenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-voaacenc.html" title="voaacenc">
 <link rel="next" href="gst-plugins-bad-plugins-plugin-zbar.html" title="zbar">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.43.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.47.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +60,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.43.4"></a><h2>Elements</h2>
+<a name="id-1.3.47.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +74,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
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 b9e36d4..c78c7f8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html
@@ -2,13 +2,12 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: zbar</title>
+<title>zbar: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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="ch02.html" title="gst-plugins-bad Plugins">
 <link rel="prev" href="gst-plugins-bad-plugins-plugin-voamrwbenc.html" title="voamrwbenc">
-<link rel="next" href="ch03.html" title="gst-plugins-bad Interfaces">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,7 +16,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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-plugin-voamrwbenc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><img src="right-insensitive.png" width="16" height="16" border="0"></td>
 </tr></table>
 <div class="refentry">
 <a name="gst-plugins-bad-plugins-plugin-zbar"></a><div class="titlepage"></div>
@@ -29,7 +28,7 @@
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="id-1.3.44.3"></a><h2>Plugin Information</h2>
+<a name="id-1.3.48.3"></a><h2>Plugin Information</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -42,7 +41,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.4.5</td>
+<td>1.5.91</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -60,7 +59,7 @@
 </table></div>
 </div>
 <div class="refsect1">
-<a name="id-1.3.44.4"></a><h2>Elements</h2>
+<a name="id-1.3.48.4"></a><h2>Elements</h2>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -74,7 +73,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html b/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
index 06933b5..9936792 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: pyramidsegment</title>
+<title>pyramidsegment: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-pinch.html" title="pinch">
 <link rel="next" href="gst-plugins-bad-plugins-rfbsrc.html" title="rfbsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-pyramidsegment.top_of_page"></a>pyramidsegment</span></h2>
-<p>pyramidsegment — Applies pyramid segmentation to a video or image.</p>
+<p>pyramidsegment</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.54.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.64.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.54.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.64.4.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,18 +113,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pyramidsegment.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-pyramidsegment.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
index ab85400..1f72c34 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rfbsrc</title>
+<title>rfbsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-pyramidsegment.html" title="pyramidsegment">
 <link rel="next" href="gst-plugins-bad-plugins-rtmpsink.html" title="rtmpsink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-rfbsrc.top_of_page"></a>rfbsrc</span></h2>
-<p>rfbsrc — Creates a rfb video stream</p>
+<p>rfbsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -137,7 +137,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.55.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.65.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.55.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.65.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -210,19 +210,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rfbsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rfbsrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstRfbSrc-struct"></a><h3>struct GstRfbSrc</h3>
 <pre class="programlisting">struct GstRfbSrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -330,7 +327,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
index 664db8a..75d17f3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rtmpsink</title>
+<title>rtmpsink: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-rfbsrc.html" title="rfbsrc">
 <link rel="next" href="gst-plugins-bad-plugins-rtmpsrc.html" title="rtmpsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-rtmpsink.top_of_page"></a>rtmpsink</span></h2>
-<p>rtmpsink — Sends FLV content to a server via RTMP</p>
+<p>rtmpsink</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -84,7 +84,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.66.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.56.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.66.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -137,19 +137,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rtmpsink.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rtmpsink.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstRTMPSink-struct"></a><h3>struct GstRTMPSink</h3>
 <pre class="programlisting">struct GstRTMPSink;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -164,7 +161,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
index 51a37a7..4a3e760 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: rtmpsrc</title>
+<title>rtmpsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-rtmpsink.html" title="rtmpsink">
 <link rel="next" href="gst-plugins-bad-plugins-shmsink.html" title="shmsink">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-rtmpsrc.top_of_page"></a>rtmpsrc</span></h2>
-<p>rtmpsrc — Read RTMP streams</p>
+<p>rtmpsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -85,7 +85,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.67.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.57.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.67.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -138,19 +138,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rtmpsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-rtmpsrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstRTMPSrc-struct"></a><h3>struct GstRTMPSrc</h3>
 <pre class="programlisting">struct GstRTMPSrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -165,7 +162,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-rtpopusdepay.html b/docs/plugins/html/gst-plugins-bad-plugins-rtpopusdepay.html
new file mode 100644
index 0000000..6e76a1e
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtpopusdepay.html
@@ -0,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>rtpopusdepay: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-rtpopuspay.html" title="rtpopuspay">
+<link rel="next" href="gst-plugins-bad-plugins-pcapparse.html" title="pcapparse">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-rtpopusdepay.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-rtpopusdepay.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="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-rtpopuspay.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-pcapparse.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-rtpopusdepay"></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-rtpopusdepay.top_of_page"></a>rtpopusdepay</span></h2>
+<p>rtpopusdepay</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<a name="GstOpenalSrc"></a><a name="GstOpencvTextOverlay"></a><a name="GstOpusDec"></a><a name="GstOpusEnc"></a><a name="GstOpusParse"></a><a name="GstRTPOpusDepay"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopusdepay.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-plugins-rtpopusdepay.html#GstRTPOpusDepay-struct" title="struct GstRTPOpusDepay">GstRTPOpusDepay</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopusdepay.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstrtpbasedepayload.html#GstRTPBaseDepayload">GstRTPBaseDepayload</a>
+                    <span class="lineart">╰──</span> GstRTPOpusDepay
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopusdepay.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.61.11.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">opus</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Depayloader/Network/RTP</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.61.11.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-name=(string){ OPUS, X-GST-OPUS-DRAFT-SPITTKA-00 }</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>audio/x-opus, multistream=(boolean)false</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopusdepay.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopusdepay.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstRTPOpusDepay-struct"></a><h3>struct GstRTPOpusDepay</h3>
+<pre class="programlisting">struct GstRTPOpusDepay;</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-rtpopuspay.html b/docs/plugins/html/gst-plugins-bad-plugins-rtpopuspay.html
new file mode 100644
index 0000000..a866a3e
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtpopuspay.html
@@ -0,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>rtpopuspay: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-opusparse.html" title="opusparse">
+<link rel="next" href="gst-plugins-bad-plugins-rtpopusdepay.html" title="rtpopusdepay">
+<meta name="generator" content="GTK-Doc V1.24 (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="5"><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-rtpopuspay.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-rtpopuspay.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="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-opusparse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-rtpopusdepay.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-rtpopuspay"></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-rtpopuspay.top_of_page"></a>rtpopuspay</span></h2>
+<p>rtpopuspay</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<a name="GstOpenalSrc"></a><a name="GstOpencvTextOverlay"></a><a name="GstOpusDec"></a><a name="GstOpusEnc"></a><a name="GstOpusParse"></a><a name="GstRTPOpusDepay"></a><a name="GstRtpOPUSPay"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopuspay.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-plugins-rtpopuspay.html#GstRtpOPUSPay-struct" title="struct GstRtpOPUSPay">GstRtpOPUSPay</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopuspay.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="https://developer.gnome.org/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 href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstrtpbasepayload.html#GstRTPBasePayload">GstRTPBasePayload</a>
+                    <span class="lineart">╰──</span> GstRtpOPUSPay
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopuspay.description"></a><h2>Description</h2>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.60.12.2.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>
+            <a class="link" href="gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">opus</a>
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Codec/Payloader/Network/RTP</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.60.12.2.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</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>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>audio/x-opus, multistream=(boolean)false</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>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-params=(string)2, encoding-name=(string){ OPUS, X-GST-OPUS-DRAFT-SPITTKA-00 }</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopuspay.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-rtpopuspay.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstRtpOPUSPay-struct"></a><h3>struct GstRtpOPUSPay</h3>
+<pre class="programlisting">struct GstRtpOPUSPay;</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.24</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html b/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
index ef07814..42eccd0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: sdpdemux</title>
+<title>sdpdemux: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-shmsrc.html" title="shmsrc">
 <link rel="next" href="gst-plugins-bad-plugins-solarize.html" title="solarize">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-sdpdemux.top_of_page"></a>sdpdemux</span></h2>
-<p>sdpdemux — Receive data over the network via SDP</p>
+<p>sdpdemux</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -98,7 +98,7 @@
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-sdpdemux.description"></a><h2>Description</h2>
 <p>sdpdemux currently understands SDP as the input format of the session description.
-For each stream listed in the SDP a new stream_<code class="literal">u</code> pad will be created
+For each stream listed in the SDP a new stream_%u pad will be created
 with caps derived from the SDP media description. This is a caps of mime type
 "application/x-rtp" that can be connected to any available RTP depayloader
 element. </p>
@@ -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.60.8.5"></a><h3>Example launch line</h3>
+<a name="id-1.2.70.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.60.8.6.1"></a><h3>Element Information</h3>
+<a name="id-1.2.70.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.60.8.6.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.70.8.6.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -202,19 +202,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-sdpdemux.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-sdpdemux.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSDPDemux-struct"></a><h3>struct GstSDPDemux</h3>
 <pre class="programlisting">struct GstSDPDemux;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -253,7 +250,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html b/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
index 9e4c748..6deebe3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: shmsink</title>
+<title>shmsink: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-rtmpsrc.html" title="rtmpsrc">
 <link rel="next" href="gst-plugins-bad-plugins-shmsrc.html" title="shmsrc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-shmsink.top_of_page"></a>shmsink</span></h2>
-<p>shmsink — Send data over shared memory to the matching source</p>
+<p>shmsink</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -84,12 +84,12 @@
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
 <td class="signal_name"><a class="link" href="gst-plugins-bad-plugins-shmsink.html#GstShmSink-client-connected" title="The “client-connected” signal">client-connected</a></td>
-<td class="signal_flags">Run Last</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></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-shmsink.html#GstShmSink-client-disconnected" title="The “client-disconnected” signal">client-disconnected</a></td>
-<td class="signal_flags">Run Last</td>
+<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -122,7 +122,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.58.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.68.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.58.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.68.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -175,19 +175,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-shmsink.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-shmsink.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstShmSink-struct"></a><h3>struct GstShmSink</h3>
 <pre class="programlisting">struct GstShmSink;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -242,31 +239,7 @@
 user_function (<a class="link" href="gst-plugins-bad-plugins-shmsink.html#GstShmSink"><span class="type">GstShmSink</span></a> *gstshmsink,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>        arg1,
                <a href="https://developer.gnome.org/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.58.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>gstshmsink</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>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
 </div>
 <hr>
 <div class="refsect2">
@@ -275,36 +248,11 @@
 user_function (<a class="link" href="gst-plugins-bad-plugins-shmsink.html#GstShmSink"><span class="type">GstShmSink</span></a> *gstshmsink,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>        arg1,
                <a href="https://developer.gnome.org/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.58.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>gstshmsink</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>
+<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
index 5376aff..72e88ef 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: shmsrc</title>
+<title>shmsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-shmsink.html" title="shmsink">
 <link rel="next" href="gst-plugins-bad-plugins-sdpdemux.html" title="sdpdemux">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-shmsrc.top_of_page"></a>shmsrc</span></h2>
-<p>shmsrc — Receive data from the shared memory sink</p>
+<p>shmsrc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -53,6 +53,12 @@
 <td class="property_name"><a class="link" href="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--socket-path" title="The “socket-path” property">socket-path</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
+<tr>
+<td class="property_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--shm-area-name" title="The “shm-area-name” property">shm-area-name</a></td>
+<td class="property_flags">Read</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -85,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.59.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.69.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -111,7 +117,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.59.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.69.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -138,19 +144,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-shmsrc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-shmsrc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstShmSrc-struct"></a><h3>struct GstShmSrc</h3>
 <pre class="programlisting">struct GstShmSrc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -166,14 +169,21 @@
 <div class="refsect2">
 <a name="GstShmSrc--socket-path"></a><h3>The <code class="literal">“socket-path”</code> property</h3>
 <pre class="programlisting">  “socket-path”              <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
-<p>The path to the control socket used to control the shared memory transport.</p>
+<p>The path to the control socket used to control the shared memory.</p>
 <p>Flags: Read / Write</p>
 <p>Default value: NULL</p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstShmSrc--shm-area-name"></a><h3>The <code class="literal">“shm-area-name”</code> property</h3>
+<pre class="programlisting">  “shm-area-name”            <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
+<p>The name of the shared memory area used to get buffers.</p>
+<p>Flags: Read</p>
+<p>Default value: NULL</p>
+</div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-solarize.html b/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
index b8cb61a..36b57b6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: solarize</title>
+<title>solarize: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-sdpdemux.html" title="sdpdemux">
 <link rel="next" href="gst-plugins-bad-plugins-spacescope.html" title="spacescope">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-solarize.top_of_page"></a>solarize</span></h2>
-<p>solarize — Solarize tunable inverse in the video signal.</p>
+<p>solarize</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.61.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.71.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.61.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.71.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.61.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.71.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -186,19 +186,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-solarize.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-solarize.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSolarize-struct"></a><h3>struct GstSolarize</h3>
 <pre class="programlisting">struct GstSolarize;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -240,7 +237,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html b/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
index 17da940..0e5d7ec 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: spacescope</title>
+<title>spacescope: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-solarize.html" title="solarize">
 <link rel="next" href="gst-plugins-bad-plugins-spectrascope.html" title="spectrascope">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-spacescope.top_of_page"></a>spacescope</span></h2>
-<p>spacescope — Simple stereo visualizer</p>
+<p>spacescope</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.62.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.72.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.62.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.72.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.62.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.72.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -169,19 +169,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-spacescope.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-spacescope.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSpaceScope-struct"></a><h3>struct GstSpaceScope</h3>
 <pre class="programlisting">struct GstSpaceScope;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -200,7 +197,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html b/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
index 1e52a99..68c1684 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: spectrascope</title>
+<title>spectrascope: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-spacescope.html" title="spacescope">
 <link rel="next" href="gst-plugins-bad-plugins-synaescope.html" title="synaescope">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-spectrascope.top_of_page"></a>spectrascope</span></h2>
-<p>spectrascope — Simple frequency spectrum scope</p>
+<p>spectrascope</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.63.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.73.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.73.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.73.6.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -153,19 +153,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-spectrascope.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-spectrascope.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSpectraScope-struct"></a><h3>struct GstSpectraScope</h3>
 <pre class="programlisting">struct GstSpectraScope;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -174,7 +171,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-speed.html b/docs/plugins/html/gst-plugins-bad-plugins-speed.html
index 742ca19..4a5ea35 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-speed.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-speed.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: speed</title>
+<title>speed: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-synaescope.html" title="synaescope">
 <link rel="next" href="gst-plugins-bad-plugins-sphere.html" title="sphere">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-speed.top_of_page"></a>speed</span></h2>
-<p>speed — Set speed/pitch on audio/raw streams (resampler)</p>
+<p>speed</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.65.7.4"></a><h3>Example launch line</h3>
+<a name="id-1.2.75.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.65.7.5.1"></a><h3>Element Information</h3>
+<a name="id-1.2.75.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.65.7.5.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.75.7.5.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -171,19 +171,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-speed.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-speed.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSpeed-struct"></a><h3>struct GstSpeed</h3>
 <pre class="programlisting">struct GstSpeed;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -199,7 +196,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-sphere.html b/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
index 8d70a9d..2de8a27 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: sphere</title>
+<title>sphere: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-speed.html" title="speed">
 <link rel="next" href="gst-plugins-bad-plugins-square.html" title="square">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-sphere.top_of_page"></a>sphere</span></h2>
-<p>sphere — Applies 'sphere' geometric transform to the image</p>
+<p>sphere</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,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.76.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.66.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.76.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-sphere.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-sphere.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSphere-struct"></a><h3>struct GstSphere</h3>
 <pre class="programlisting">struct GstSphere;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -183,7 +180,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-square.html b/docs/plugins/html/gst-plugins-bad-plugins-square.html
index c4e55cf..a752be8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-square.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-square.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: square</title>
+<title>square: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-sphere.html" title="sphere">
 <link rel="next" href="gst-plugins-bad-plugins-stretch.html" title="stretch">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-square.top_of_page"></a>square</span></h2>
-<p>square — Distort center part of the image into a square</p>
+<p>square</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -90,7 +90,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.77.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.67.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.77.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -167,19 +167,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-square.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-square.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSquare-struct"></a><h3>struct GstSquare</h3>
 <pre class="programlisting">struct GstSquare;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -213,7 +210,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-stretch.html b/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
index 4249413..a31b72b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: stretch</title>
+<title>stretch: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-square.html" title="square">
 <link rel="next" href="gst-plugins-bad-plugins-templatematch.html" title="templatematch">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-stretch.top_of_page"></a>stretch</span></h2>
-<p>stretch — Stretch the image in a circle around the center point</p>
+<p>stretch</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.68.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.78.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.68.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.78.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-stretch.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-stretch.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstStretch-struct"></a><h3>struct GstStretch</h3>
 <pre class="programlisting">struct GstStretch;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -184,7 +181,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html b/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
index 33fa7df..625d945 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: synaescope</title>
+<title>synaescope: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-spectrascope.html" title="spectrascope">
 <link rel="next" href="gst-plugins-bad-plugins-speed.html" title="speed">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-synaescope.top_of_page"></a>synaescope</span></h2>
-<p>synaescope — Creates video visualizations of audio input, using stereo and pitch information</p>
+<p>synaescope</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.64.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.74.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.64.6.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.74.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.64.6.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.74.6.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -153,19 +153,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-synaescope.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-synaescope.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstSynaeScope-struct"></a><h3>struct GstSynaeScope</h3>
 <pre class="programlisting">struct GstSynaeScope;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -174,7 +171,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html b/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
index b1abe3b..3b2ce86 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: templatematch</title>
+<title>templatematch: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-stretch.html" title="stretch">
 <link rel="next" href="gst-plugins-bad-plugins-opencvtextoverlay.html" title="opencvtextoverlay">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-templatematch.top_of_page"></a>templatematch</span></h2>
-<p>templatematch — Performs template matching on videos and images, providing detected positions via bus messages.</p>
+<p>templatematch</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -88,7 +88,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.79.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.69.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.79.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -165,19 +165,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-templatematch.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-templatematch.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstTemplateMatch-struct"></a><h3>struct GstTemplateMatch</h3>
 <pre class="programlisting">struct GstTemplateMatch;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -209,7 +206,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html b/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
index 84fd316..ebdf9fc 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: tunnel</title>
+<title>tunnel: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-opencvtextoverlay.html" title="opencvtextoverlay">
 <link rel="next" href="gst-plugins-bad-plugins-twirl.html" title="twirl">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -28,7 +28,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-tunnel.top_of_page"></a>tunnel</span></h2>
-<p>tunnel — Light tunnel effect</p>
+<p>tunnel</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -63,7 +63,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.71.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.81.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.71.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.81.6.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -140,24 +140,20 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-tunnel.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-tunnel.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstTunnel-struct"></a><h3>struct GstTunnel</h3>
 <pre class="programlisting">struct GstTunnel;</pre>
-<p>
-</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-twirl.html b/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
index 7c85406..68bdcc7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: twirl</title>
+<title>twirl: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-tunnel.html" title="tunnel">
 <link rel="next" href="gst-plugins-bad-plugins-videoparse.html" title="videoparse">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-twirl.top_of_page"></a>twirl</span></h2>
-<p>twirl — Twists the image from the center out</p>
+<p>twirl</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.72.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.82.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.72.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.82.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -156,19 +156,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-twirl.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-twirl.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstTwirl-struct"></a><h3>struct GstTwirl</h3>
 <pre class="programlisting">struct GstTwirl;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -183,7 +180,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html b/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
index 706f1a7..d021987 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: videoparse</title>
+<title>videoparse: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-twirl.html" title="twirl">
 <link rel="next" href="gst-plugins-bad-plugins-waterripple.html" title="waterripple">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-videoparse.top_of_page"></a>videoparse</span></h2>
-<p>videoparse — Converts stream into video frames</p>
+<p>videoparse</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -144,7 +144,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.73.7.2.1.1"></a><h3>Element Information</h3>
+<a name="id-1.2.83.7.3.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.73.7.2.1.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.83.7.3.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -225,19 +225,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-videoparse.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-videoparse.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstVideoParse-struct"></a><h3>struct GstVideoParse</h3>
 <pre class="programlisting">struct GstVideoParse;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -358,7 +355,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html b/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
index f532206..325654d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: voaacenc</title>
+<title>voaacenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-zbar.html" title="zbar">
 <link rel="next" href="gst-plugins-bad-plugins-voamrwbenc.html" title="voamrwbenc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -30,7 +30,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-voaacenc.top_of_page"></a>voaacenc</span></h2>
-<p>voaacenc — AAC audio encoder</p>
+<p>voaacenc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -83,7 +83,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.76.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.86.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.76.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.86.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -130,7 +130,11 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)[ 1, 2 ]</td>
+<td>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)1</td>
+</tr>
+<tr>
+<td><p><span class="term"></span></p></td>
+<td> audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</td>
 </tr>
 </tbody>
 </table></div>
@@ -160,19 +164,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-voaacenc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-voaacenc.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstVoAacEnc-struct"></a><h3>struct GstVoAacEnc</h3>
 <pre class="programlisting">struct GstVoAacEnc;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -188,7 +189,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html b/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
index dd207b8..f18d2d4 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: voamrwbenc</title>
+<title>voamrwbenc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-voaacenc.html" title="voaacenc">
 <link rel="next" href="gst-plugins-bad-plugins-wavescope.html" title="wavescope">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-voamrwbenc.top_of_page"></a>voamrwbenc</span></h2>
-<p>voamrwbenc — Adaptive Multi-Rate Wideband audio encoder</p>
+<p>voamrwbenc</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -36,7 +36,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.77.3.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.87.3.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -62,7 +62,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.77.3.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.87.3.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -113,18 +113,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-voamrwbenc.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-voamrwbenc.other_details"></a><h2>Types and Values</h2>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html b/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
index 3c9621a..1c55430 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: waterripple</title>
+<title>waterripple: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-videoparse.html" title="videoparse">
 <link rel="next" href="gst-plugins-bad-plugins-zbar.html" title="zbar">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-waterripple.top_of_page"></a>waterripple</span></h2>
-<p>waterripple — Creates a water ripple effect on the image</p>
+<p>waterripple</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -91,7 +91,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.84.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.74.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.84.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -168,19 +168,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-waterripple.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-waterripple.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstWaterRipple-struct"></a><h3>struct GstWaterRipple</h3>
 <pre class="programlisting">struct GstWaterRipple;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -211,7 +208,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html b/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
index 1408ed4..2d88e6c 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: wavescope</title>
+<title>wavescope: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-voamrwbenc.html" title="voamrwbenc">
 <link rel="next" href="ch02.html" title="gst-plugins-bad Plugins">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-wavescope.top_of_page"></a>wavescope</span></h2>
-<p>wavescope — Simple waveform oscilloscope</p>
+<p>wavescope</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -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.78.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.88.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.78.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.88.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.78.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.88.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -169,19 +169,16 @@
 </table></div>
 </div>
 </div>
-<p>
-</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-wavescope.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-wavescope.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstWaveScope-struct"></a><h3>struct GstWaveScope</h3>
 <pre class="programlisting">struct GstWaveScope;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -200,7 +197,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-zbar.html b/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
index 0bcb51f..7e95baf 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: zbar</title>
+<title>zbar: GStreamer Bad Plugins 1.0 Plugins Reference Manual</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-waterripple.html" title="waterripple">
 <link rel="next" href="gst-plugins-bad-plugins-voaacenc.html" title="voaacenc">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -29,7 +29,7 @@
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
 <h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-zbar.top_of_page"></a>zbar</span></h2>
-<p>zbar — Detect bar codes in the video streams</p>
+<p>zbar</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
@@ -52,6 +52,11 @@
 <td class="property_name"><a class="link" href="gst-plugins-bad-plugins-zbar.html#GstZBar--cache" title="The “cache” property">cache</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
+<tr>
+<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-zbar.html#GstZBar--attach-frame" title="The “attach-frame” property">attach-frame</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -84,7 +89,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.75.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.85.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -110,7 +115,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.75.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.85.7.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -131,7 +136,7 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+<td>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
 </tr>
 </tbody>
 </table></div>
@@ -155,25 +160,22 @@
 </tr>
 <tr>
 <td><p><span class="term">details</span></p></td>
-<td>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+<td>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, 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-zbar.functions_details"></a><h2>Functions</h2>
+<p></p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-plugins-zbar.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstZBar-struct"></a><h3>struct GstZBar</h3>
 <pre class="programlisting">struct GstZBar;</pre>
-<p>
-</p>
 </div>
 </div>
 <div class="refsect1">
@@ -193,10 +195,17 @@
 <p>Flags: Read / Write</p>
 <p>Default value: FALSE</p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstZBar--attach-frame"></a><h3>The <code class="literal">“attach-frame”</code> property</h3>
+<pre class="programlisting">  “attach-frame”             <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
+<p>Attach a frame dump to each barcode message.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
 </div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/index.html b/docs/plugins/html/index.html
index 611d01b..ba7572d 100644
--- a/docs/plugins/html/index.html
+++ b/docs/plugins/html/index.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="next" href="ch01.html" title="gst-plugins-bad Elements">
-<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -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.4.5)
+      for GStreamer Bad Plugins 1.0 (1.5.91)
       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>
@@ -26,377 +26,414 @@
 <dt><span class="chapter"><a href="ch01.html">gst-plugins-bad Elements</a></span></dt>
 <dd><dl>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-accurip.html">accurip</a></span><span class="refpurpose"> — Computes an AccurateRip CRC</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-accurip.html">accurip</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-assrender.html">assrender</a></span><span class="refpurpose"> — Renders ASS/SSA subtitles with libass</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-aiffparse.html">aiffparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-autoconvert.html">autoconvert</a></span><span class="refpurpose"> — Selects the right transform element based on the caps</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-aiffmux.html">aiffmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bulge.html">bulge</a></span><span class="refpurpose"> — Adds a protuberance in the center point</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-assrender.html">assrender</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-burn.html">burn</a></span><span class="refpurpose"> — Burn adjusts the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-audiomixer.html">audiomixer</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-camerabin.html">camerabin</a></span><span class="refpurpose"> — Take image snapshots and record movies from camera</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-autoconvert.html">autoconvert</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-chromium.html">chromium</a></span><span class="refpurpose"> — Chromium breaks the colors of the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bs2b.html">bs2b</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-circle.html">circle</a></span><span class="refpurpose"> — Warps the picture into an arc shaped form</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-bulge.html">bulge</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filter</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-burn.html">burn</a></span><span class="refpurpose"></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>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-camerabin.html">camerabin</a></span><span class="refpurpose"></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>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-chromium.html">chromium</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cverode.html">cverode</a></span><span class="refpurpose"> — Applies cvErode OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-circle.html">circle</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvequalizehist.html">cvequalizehist</a></span><span class="refpurpose"> — Applies cvEqualizeHist OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvlaplace.html">cvlaplace</a></span><span class="refpurpose"> — Applies cvLaplace OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-compositor.html">compositor</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsmooth.html">cvsmooth</a></span><span class="refpurpose"> — Applies cvSmooth OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvdilate.html">cvdilate</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsobel.html">cvsobel</a></span><span class="refpurpose"> — Applies cvSobel OpenCV function to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cverode.html">cverode</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"> — Handles data: uris</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvequalizehist.html">cvequalizehist</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-diffuse.html">diffuse</a></span><span class="refpurpose"> — Diffuses the image by moving its pixels in random directions</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvlaplace.html">cvlaplace</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dilate.html">dilate</a></span><span class="refpurpose"> — Dilate copies the brightest pixel around.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsmooth.html">cvsmooth</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dodge.html">dodge</a></span><span class="refpurpose"> — Dodge saturates the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvsobel.html">cvsobel</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtmfdetect.html">dtmfdetect</a></span><span class="refpurpose"> — This element detects DTMF tones</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtsdec.html">dtsdec</a></span><span class="refpurpose"> — Decodes DTS audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-diffuse.html">diffuse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvbsrc.html">dvbsrc</a></span><span class="refpurpose"> — Digital Video Broadcast Source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dilate.html">dilate</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvdspu.html">dvdspu</a></span><span class="refpurpose"> — Parses Sub-Picture command streams and renders the SPU overlay onto the video as it passes through</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dodge.html">dodge</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-exclusion.html">exclusion</a></span><span class="refpurpose"> — Exclusion exclodes the colors in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtmfdetect.html">dtmfdetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-edgedetect.html">edgedetect</a></span><span class="refpurpose"> — Performs canny edge detection on videos and images.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dtsdec.html">dtsdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-eglglessink.html">eglglessink</a></span><span class="refpurpose"> — An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvbsrc.html">dvbsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faac.html">faac</a></span><span class="refpurpose"> — Free MPEG-2/4 AAC encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-dvdspu.html">dvdspu</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faad.html">faad</a></span><span class="refpurpose"> — Free MPEG-2/4 AAC decoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-exclusion.html">exclusion</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faceblur.html">faceblur</a></span><span class="refpurpose"> — Blurs faces in images and videos</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-edgedetect.html">edgedetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-facedetect.html">facedetect</a></span><span class="refpurpose"> — Performs face detection on videos and images, providing detected positions via bus messages</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faac.html">faac</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-festival.html">festival</a></span><span class="refpurpose"> — Synthesizes plain text into audio</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faad.html">faad</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fisheye.html">fisheye</a></span><span class="refpurpose"> — Simulate a fisheye lens by zooming on the center of the image and compressing the edges</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-faceblur.html">faceblur</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fpsdisplaysink.html">fpsdisplaysink</a></span><span class="refpurpose"> — Shows the current frame-rate and drop-rate of the videosink as overlay or text on stdout</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-facedetect.html">facedetect</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-gaussianblur.html">gaussianblur</a></span><span class="refpurpose"> — Perform Gaussian blur/sharpen on a video</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-festival.html">festival</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fisheye.html">fisheye</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-fpsdisplaysink.html">fpsdisplaysink</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-gaussianblur.html">gaussianblur</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-jpegparse.html">jpegparse</a></span><span class="refpurpose"> — JPEG parser</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-kaleidoscope.html">kaleidoscope</a></span><span class="refpurpose"> — Applies 'kaleidoscope' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-kaleidoscope.html">kaleidoscope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-liveadder.html">liveadder</a></span><span class="refpurpose"> — Mixes live/discontinuous audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-liveadder.html">liveadder</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-marble.html">marble</a></span><span class="refpurpose"> — Applies a marbling effect to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-marble.html">marble</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimenc.html">mimenc</a></span><span class="refpurpose"> — MSN Messenger compatible Mimic video encoder element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimenc.html">mimenc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimdec.html">mimdec</a></span><span class="refpurpose"> — MSN Messenger compatible Mimic video decoder element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mimdec.html">mimdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mirror.html">mirror</a></span><span class="refpurpose"> — Split the image into two halves and reflect one over each other</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mirror.html">mirror</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-modplug.html">modplug</a></span><span class="refpurpose"> — Module decoder based on modplug engine</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-modplug.html">modplug</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"> — High-quality MPEG-1/2 video encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mplex.html">mplex</a></span><span class="refpurpose"> — High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpegpsmux.html">mpegpsmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpg123audiodec.html">mpg123audiodec</a></span><span class="refpurpose"> — Decodes mp3 streams using the mpg123 library</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-neonhttpsrc.html">neonhttpsrc</a></span><span class="refpurpose"> — Receive data as a client over the network via HTTP using NEON</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mplex.html">mplex</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-ofa.html">ofa</a></span><span class="refpurpose"> — Find a music fingerprint using MusicIP's libofa</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-mpg123audiodec.html">mpg123audiodec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsrc.html">openalsrc</a></span><span class="refpurpose"> — Input audio through OpenAL</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-neonhttpsrc.html">neonhttpsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsink.html">openalsink</a></span><span class="refpurpose"> — Output audio through OpenAL</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-ofa.html">ofa</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pcapparse.html">pcapparse</a></span><span class="refpurpose"> — Parses a raw pcap stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsrc.html">openalsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pinch.html">pinch</a></span><span class="refpurpose"> — Applies 'pinch' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-openalsink.html">openalsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pyramidsegment.html">pyramidsegment</a></span><span class="refpurpose"> — Applies pyramid segmentation to a video or image.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusdec.html">opusdec</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"> — Creates a rfb video stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusenc.html">opusenc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsink.html">rtmpsink</a></span><span class="refpurpose"> — Sends FLV content to a server via RTMP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opusparse.html">opusparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsrc.html">rtmpsrc</a></span><span class="refpurpose"> — Read RTMP streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtpopuspay.html">rtpopuspay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsink.html">shmsink</a></span><span class="refpurpose"> — Send data over shared memory to the matching source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtpopusdepay.html">rtpopusdepay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsrc.html">shmsrc</a></span><span class="refpurpose"> — Receive data from the shared memory sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pcapparse.html">pcapparse</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sdpdemux.html">sdpdemux</a></span><span class="refpurpose"> — Receive data over the network via SDP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pinch.html">pinch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-solarize.html">solarize</a></span><span class="refpurpose"> — Solarize tunable inverse in the video signal.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-pyramidsegment.html">pyramidsegment</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spacescope.html">spacescope</a></span><span class="refpurpose"> — Simple stereo visualizer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spectrascope.html">spectrascope</a></span><span class="refpurpose"> — Simple frequency spectrum scope</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsink.html">rtmpsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-synaescope.html">synaescope</a></span><span class="refpurpose"> — Creates video visualizations of audio input, using stereo and pitch information</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-rtmpsrc.html">rtmpsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-speed.html">speed</a></span><span class="refpurpose"> — Set speed/pitch on audio/raw streams (resampler)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsink.html">shmsink</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sphere.html">sphere</a></span><span class="refpurpose"> — Applies 'sphere' geometric transform to the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-shmsrc.html">shmsrc</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-square.html">square</a></span><span class="refpurpose"> — Distort center part of the image into a square</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sdpdemux.html">sdpdemux</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-stretch.html">stretch</a></span><span class="refpurpose"> — Stretch the image in a circle around the center point</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-solarize.html">solarize</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-templatematch.html">templatematch</a></span><span class="refpurpose"> — Performs template matching on videos and images, providing detected positions via bus messages.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spacescope.html">spacescope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opencvtextoverlay.html">opencvtextoverlay</a></span><span class="refpurpose"> — Write text on the top of video</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-spectrascope.html">spectrascope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-tunnel.html">tunnel</a></span><span class="refpurpose"> — Light tunnel effect</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-synaescope.html">synaescope</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-twirl.html">twirl</a></span><span class="refpurpose"> — Twists the image from the center out</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-speed.html">speed</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-videoparse.html">videoparse</a></span><span class="refpurpose"> — Converts stream into video frames</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-sphere.html">sphere</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-waterripple.html">waterripple</a></span><span class="refpurpose"> — Creates a water ripple effect on the image</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-square.html">square</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-zbar.html">zbar</a></span><span class="refpurpose"> — Detect bar codes in the video streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-stretch.html">stretch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voaacenc.html">voaacenc</a></span><span class="refpurpose"> — AAC audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-templatematch.html">templatematch</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"> — Adaptive Multi-Rate Wideband audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-opencvtextoverlay.html">opencvtextoverlay</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-wavescope.html">wavescope</a></span><span class="refpurpose"> — Simple waveform oscilloscope</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-tunnel.html">tunnel</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-twirl.html">twirl</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-videoparse.html">videoparse</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-waterripple.html">waterripple</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-zbar.html">zbar</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voaacenc.html">voaacenc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-wavescope.html">wavescope</a></span><span class="refpurpose"></span>
 </dt>
 </dl></dd>
 <dt><span class="chapter"><a href="ch02.html">gst-plugins-bad Plugins</a></span></dt>
 <dd><dl>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiovisualizers.html">audiovisualizers</a></span><span class="refpurpose">Creates video visualizations of audio input</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-aiff.html">aiff</a></span><span class="refpurpose"> — Create and parse Audio Interchange File Format (AIFF) files</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-autoconvert.html">autoconvert</a></span><span class="refpurpose">Selects convertor element based on caps</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiomixer.html">audiomixer</a></span><span class="refpurpose"> — Mixes multiple audio streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-assrender.html">assrender</a></span><span class="refpurpose">ASS/SSA subtitle renderer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-audiovisualizers.html">audiovisualizers</a></span><span class="refpurpose"> — Creates video visualizations of audio input</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bayer.html">bayer</a></span><span class="refpurpose">Elements to convert Bayer images</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-autoconvert.html">autoconvert</a></span><span class="refpurpose"> — Selects convertor element based on caps</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bz2.html">bz2</a></span><span class="refpurpose">Compress or decompress streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-assrender.html">assrender</a></span><span class="refpurpose"> — ASS/SSA subtitle renderer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-camerabin.html">camerabin</a></span><span class="refpurpose">Take image snapshots and record movies from camera</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bayer.html">bayer</a></span><span class="refpurpose"> — Elements to convert Bayer images</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-coloreffects.html">coloreffects</a></span><span class="refpurpose">Color Look-up Table filters</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bs2b.html">bs2b</a></span><span class="refpurpose"> — Improve headphone listening of stereo audio recordsusing the bs2b library.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-curl.html">curl</a></span><span class="refpurpose">libcurl-based elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-bz2.html">bz2</a></span><span class="refpurpose"> — Compress or decompress streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dataurisrc.html">dataurisrc</a></span><span class="refpurpose">data: URI source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-camerabin.html">camerabin</a></span><span class="refpurpose"> — Take image snapshots and record movies from camera</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-debugutilsbad.html">debugutilsbad</a></span><span class="refpurpose">Collection of elements that may or may not be useful for debugging</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filters</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dtsdec.html">dtsdec</a></span><span class="refpurpose">Decodes DTS audio streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-curl.html">curl</a></span><span class="refpurpose"> — libcurl-based elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvb.html">dvb</a></span><span class="refpurpose">DVB elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dataurisrc.html">dataurisrc</a></span><span class="refpurpose"> — data: URI source</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvdspu.html">dvdspu</a></span><span class="refpurpose">DVD Sub-picture Overlay element</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-debugutilsbad.html">debugutilsbad</a></span><span class="refpurpose"> — Collection of elements that may or may not be useful for debugging</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-eglglessink.html">eglglessink</a></span><span class="refpurpose">EGL/GLES sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dtsdec.html">dtsdec</a></span><span class="refpurpose"> — Decodes DTS audio streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faac.html">faac</a></span><span class="refpurpose">Free AAC Encoder (FAAC)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvb.html">dvb</a></span><span class="refpurpose"> — DVB elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faad.html">faad</a></span><span class="refpurpose">Free AAC Decoder (FAAD)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-dvdspu.html">dvdspu</a></span><span class="refpurpose"> — DVD Sub-picture Overlay element</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-festival.html">festival</a></span><span class="refpurpose">Synthesizes plain text into audio</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faac.html">faac</a></span><span class="refpurpose"> — Free AAC Encoder (FAAC)</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gaudieffects.html">gaudieffects</a></span><span class="refpurpose">Gaudi video effects.</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-faad.html">faad</a></span><span class="refpurpose"> — Free AAC Decoder (FAAD)</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-geometrictransform.html">geometrictransform</a></span><span class="refpurpose">Various geometric image transform elements</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-festival.html">festival</a></span><span class="refpurpose"> — Synthesizes plain text into audio</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gsm.html">gsm</a></span><span class="refpurpose">GSM encoder/decoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gaudieffects.html">gaudieffects</a></span><span class="refpurpose"> — Gaudi video effects.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-jpegformat.html">jpegformat</a></span><span class="refpurpose">JPEG interchange format plugin</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-geometrictransform.html">geometrictransform</a></span><span class="refpurpose"> — Various geometric image transform elements</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-liveadder.html">liveadder</a></span><span class="refpurpose">Adds multiple live discontinuous streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-gsm.html">gsm</a></span><span class="refpurpose"> — GSM encoder/decoder</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mimic.html">mimic</a></span><span class="refpurpose">Mimic codec</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-jpegformat.html">jpegformat</a></span><span class="refpurpose"> — JPEG interchange format plugin</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mms.html">mms</a></span><span class="refpurpose">Microsoft Multi Media Server streaming protocol support</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-liveadder.html">liveadder</a></span><span class="refpurpose"> — Adds multiple live discontinuous streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-modplug.html">modplug</a></span><span class="refpurpose">.MOD audio decoding</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mimic.html">mimic</a></span><span class="refpurpose"> — Mimic codec</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose">High-quality MPEG-1/2 video encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mms.html">mms</a></span><span class="refpurpose"> — Microsoft Multi Media Server streaming protocol support</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose">MPEG-TS muxer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-modplug.html">modplug</a></span><span class="refpurpose"> — .MOD audio decoding</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mplex.html">mplex</a></span><span class="refpurpose">High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpeg2enc.html">mpeg2enc</a></span><span class="refpurpose"> — High-quality MPEG-1/2 video encoder</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-neon.html">neon</a></span><span class="refpurpose">lib neon http client src</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegpsmux.html">mpegpsmux</a></span><span class="refpurpose"> — MPEG-PS muxer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-ofa.html">ofa</a></span><span class="refpurpose">Calculate MusicIP fingerprint from audio files</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mpegtsmux.html">mpegtsmux</a></span><span class="refpurpose"> — MPEG-TS muxer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-openal.html">openal</a></span><span class="refpurpose">OpenAL plugin library</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-mplex.html">mplex</a></span><span class="refpurpose"> — High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opencv.html">opencv</a></span><span class="refpurpose">GStreamer OpenCV Plugins</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-neon.html">neon</a></span><span class="refpurpose"> — lib neon http client src</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-pcapparse.html">pcapparse</a></span><span class="refpurpose">Element parsing raw pcap streams</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-ofa.html">ofa</a></span><span class="refpurpose"> — Calculate MusicIP fingerprint from audio files</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rawparse.html">rawparse</a></span><span class="refpurpose">Parses byte streams into raw frames</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-openal.html">openal</a></span><span class="refpurpose"> — OpenAL plugin library</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rfbsrc.html">rfbsrc</a></span><span class="refpurpose">Connects to a VNC server and decodes RFB stream</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opencv.html">opencv</a></span><span class="refpurpose"> — GStreamer OpenCV Plugins</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rtmp.html">rtmp</a></span><span class="refpurpose">RTMP source and sink</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-opus.html">opus</a></span><span class="refpurpose"> — OPUS plugin library</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-sdp.html">sdp</a></span><span class="refpurpose">configure streaming sessions using SDP</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-pcapparse.html">pcapparse</a></span><span class="refpurpose"> — Element parsing raw pcap streams</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-shm.html">shm</a></span><span class="refpurpose">shared memory sink source</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rawparse.html">rawparse</a></span><span class="refpurpose"> — Parses byte streams into raw frames</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-soundtouch.html">soundtouch</a></span><span class="refpurpose">Audio Pitch Controller &amp; BPM Detection</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rfbsrc.html">rfbsrc</a></span><span class="refpurpose"> — Connects to a VNC server and decodes RFB stream</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-speed.html">speed</a></span><span class="refpurpose">Set speed/pitch on audio/raw streams (resampler)</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-rtmp.html">rtmp</a></span><span class="refpurpose"> — RTMP source and sink</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voaacenc.html">voaacenc</a></span><span class="refpurpose">AAC audio encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-sdp.html">sdp</a></span><span class="refpurpose"> — configure streaming sessions using SDP</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose">Adaptive Multi-Rate Wide-Band Encoder</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-shm.html">shm</a></span><span class="refpurpose"> — shared memory sink source</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-zbar.html">zbar</a></span><span class="refpurpose">zbar barcode scanner</span>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-soundtouch.html">soundtouch</a></span><span class="refpurpose"> — Audio Pitch Controller &amp; BPM Detection</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-speed.html">speed</a></span><span class="refpurpose"> — Set speed/pitch on audio/raw streams (resampler)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voaacenc.html">voaacenc</a></span><span class="refpurpose"> — AAC audio encoder</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-voamrwbenc.html">voamrwbenc</a></span><span class="refpurpose"> — Adaptive Multi-Rate Wide-Band Encoder</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-plugin-zbar.html">zbar</a></span><span class="refpurpose"> — zbar barcode scanner</span>
 </dt>
 </dl></dd>
-<dt><span class="chapter"><a href="ch03.html">gst-plugins-bad Interfaces</a></span></dt>
-<dd><dl><dt>
-<span class="refentrytitle"><a href="GstPhotography.html">GstPhotography</a></span><span class="refpurpose"></span>
-</dt></dl></dd>
 </dl></div>
 </div>
 <div class="footer">
-<hr>
-          Generated by GTK-Doc V1.21</div>
+<hr>Generated by GTK-Doc V1.24</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/plugins/html/index.sgml b/docs/plugins/html/index.sgml
index 97c5d29..e994587 100644
--- a/docs/plugins/html/index.sgml
+++ b/docs/plugins/html/index.sgml
@@ -11,6 +11,22 @@
 <ANCHOR id="gst-plugins-bad-plugins-accurip.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-accurip.html#gst-plugins-bad-plugins-accurip.property-details">
 <ANCHOR id="GstAccurip--first-track" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-accurip.html#GstAccurip--first-track">
 <ANCHOR id="GstAccurip--last-track" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-accurip.html#GstAccurip--last-track">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html">
+<ANCHOR id="GstAiffParse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#GstAiffParse">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#gst-plugins-bad-plugins-aiffparse.other">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#gst-plugins-bad-plugins-aiffparse.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#gst-plugins-bad-plugins-aiffparse.description">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#gst-plugins-bad-plugins-aiffparse.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-aiffparse.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#gst-plugins-bad-plugins-aiffparse.other_details">
+<ANCHOR id="GstAiffParse-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffparse.html#GstAiffParse-struct">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html">
+<ANCHOR id="GstAiffMux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#GstAiffMux">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#gst-plugins-bad-plugins-aiffmux.other">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#gst-plugins-bad-plugins-aiffmux.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#gst-plugins-bad-plugins-aiffmux.description">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#gst-plugins-bad-plugins-aiffmux.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-aiffmux.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#gst-plugins-bad-plugins-aiffmux.other_details">
+<ANCHOR id="GstAiffMux-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-aiffmux.html#GstAiffMux-struct">
 <ANCHOR id="gst-plugins-bad-plugins-assrender" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html">
 <ANCHOR id="gst-plugins-bad-plugins-assrender.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html#gst-plugins-bad-plugins-assrender.properties">
 <ANCHOR id="GstAssRender" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html#GstAssRender">
@@ -24,6 +40,22 @@
 <ANCHOR id="GstAssRender--embeddedfonts" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html#GstAssRender--embeddedfonts">
 <ANCHOR id="GstAssRender--enable" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html#GstAssRender--enable">
 <ANCHOR id="GstAssRender--wait-text" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-assrender.html#GstAssRender--wait-text">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.properties">
+<ANCHOR id="GstAudioMixer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.other">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.implemented-interfaces" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.implemented-interfaces">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.description">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.other_details">
+<ANCHOR id="GstAudioMixer-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer-struct">
+<ANCHOR id="gst-plugins-bad-plugins-audiomixer.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#gst-plugins-bad-plugins-audiomixer.property-details">
+<ANCHOR id="GstAudioMixer--alignment-threshold" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--alignment-threshold">
+<ANCHOR id="GstAudioMixer--caps" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--caps">
+<ANCHOR id="GstAudioMixer--discont-wait" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--discont-wait">
+<ANCHOR id="GstAudioMixer--blocksize" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--blocksize">
+<ANCHOR id="GstAudioMixer--output-buffer-duration" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-audiomixer.html#GstAudioMixer--output-buffer-duration">
 <ANCHOR id="gst-plugins-bad-plugins-autoconvert" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html">
 <ANCHOR id="gst-plugins-bad-plugins-autoconvert.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html#gst-plugins-bad-plugins-autoconvert.properties">
 <ANCHOR id="GstAutoConvert" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert">
@@ -37,6 +69,12 @@
 <ANCHOR id="gst-plugins-bad-plugins-autoconvert.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html#gst-plugins-bad-plugins-autoconvert.property-details">
 <ANCHOR id="GstAutoConvert--factories" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert--factories">
 <ANCHOR id="GstAutoConvert--initial-identity" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-autoconvert.html#GstAutoConvert--initial-identity">
+<ANCHOR id="gst-plugins-bad-plugins-bs2b" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html">
+<ANCHOR id="gst-plugins-bad-plugins-bs2b.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html#gst-plugins-bad-plugins-bs2b.other">
+<ANCHOR id="gst-plugins-bad-plugins-bs2b.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html#gst-plugins-bad-plugins-bs2b.description">
+<ANCHOR id="gst-plugins-bad-plugins-bs2b.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html#gst-plugins-bad-plugins-bs2b.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-bs2b.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html#gst-plugins-bad-plugins-bs2b.other_details">
+<ANCHOR id="GstBs2b" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bs2b.html#GstBs2b">
 <ANCHOR id="gst-plugins-bad-plugins-bulge" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bulge.html">
 <ANCHOR id="gst-plugins-bad-plugins-bulge.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bulge.html#gst-plugins-bad-plugins-bulge.properties">
 <ANCHOR id="GstBulge" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-bulge.html#GstBulge">
@@ -67,12 +105,10 @@
 <ANCHOR id="gst-plugins-bad-plugins-chromium" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.properties">
 <ANCHOR id="GstChromium" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#GstChromium">
-<ANCHOR id="gst-plugins-bad-plugins-chromium.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.other">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.object-hierarchy">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.description">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.functions_details">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.other_details">
-<ANCHOR id="GstChromium" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#GstChromium">
 <ANCHOR id="gst-plugins-bad-plugins-chromium.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#gst-plugins-bad-plugins-chromium.property-details">
 <ANCHOR id="GstChromium--silent" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#GstChromium--silent">
 <ANCHOR id="GstChromium--edge-a" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-chromium.html#GstChromium--edge-a">
@@ -161,6 +197,10 @@
 <ANCHOR id="GstCvSmooth--param3" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param3">
 <ANCHOR id="GstCvSmooth--param4" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param4">
 <ANCHOR id="GstCvSmooth--type" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--type">
+<ANCHOR id="GstCvSmooth--color" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--color">
+<ANCHOR id="GstCvSmooth--height" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--height">
+<ANCHOR id="GstCvSmooth--spatial" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--spatial">
+<ANCHOR id="GstCvSmooth--width" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--width">
 <ANCHOR id="gst-plugins-bad-plugins-cvsobel" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsobel.html">
 <ANCHOR id="gst-plugins-bad-plugins-cvsobel.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsobel.html#gst-plugins-bad-plugins-cvsobel.properties">
 <ANCHOR id="GstCvSobel" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvsobel.html#GstCvSobel">
@@ -280,10 +320,33 @@
 <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="GstDvbSrc--isdbt-layer-enabled" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layer-enabled">
+<ANCHOR id="GstDvbSrc--isdbt-layera-fec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-fec">
+<ANCHOR id="GstDvbSrc--isdbt-layera-modulation" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-modulation">
+<ANCHOR id="GstDvbSrc--isdbt-layera-segment-count" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-segment-count">
+<ANCHOR id="GstDvbSrc--isdbt-layera-time-interleaving" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layera-time-interleaving">
+<ANCHOR id="GstDvbSrc--isdbt-layerb-fec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-fec">
+<ANCHOR id="GstDvbSrc--isdbt-layerb-modulation" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-modulation">
+<ANCHOR id="GstDvbSrc--isdbt-layerb-segment-count" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-segment-count">
+<ANCHOR id="GstDvbSrc--isdbt-layerb-time-interleaving" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerb-time-interleaving">
+<ANCHOR id="GstDvbSrc--isdbt-layerc-fec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-fec">
+<ANCHOR id="GstDvbSrc--isdbt-layerc-modulation" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-modulation">
+<ANCHOR id="GstDvbSrc--isdbt-layerc-segment-count" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-segment-count">
+<ANCHOR id="GstDvbSrc--isdbt-layerc-time-interleaving" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-layerc-time-interleaving">
+<ANCHOR id="GstDvbSrc--isdbt-partial-reception" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-partial-reception">
+<ANCHOR id="GstDvbSrc--isdbt-sb-segment-count" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-count">
+<ANCHOR id="GstDvbSrc--isdbt-sb-segment-idx" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-segment-idx">
+<ANCHOR id="GstDvbSrc--isdbt-sb-subchannel-id" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sb-subchannel-id">
+<ANCHOR id="GstDvbSrc--isdbt-sound-broadcasting" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--isdbt-sound-broadcasting">
+<ANCHOR id="GstDvbSrc--lnb-lof1" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof1">
+<ANCHOR id="GstDvbSrc--lnb-lof2" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-lof2">
+<ANCHOR id="GstDvbSrc--lnb-slof" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--lnb-slof">
+<ANCHOR id="GstDvbSrc--interleaving" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--interleaving">
 <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="GstDvbSrc-tune" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tune">
 <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">
@@ -308,10 +371,6 @@
 <ANCHOR id="gst-plugins-bad-plugins-edgedetect.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-edgedetect.html#gst-plugins-bad-plugins-edgedetect.description">
 <ANCHOR id="gst-plugins-bad-plugins-edgedetect.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-edgedetect.html#gst-plugins-bad-plugins-edgedetect.functions_details">
 <ANCHOR id="gst-plugins-bad-plugins-edgedetect.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-edgedetect.html#gst-plugins-bad-plugins-edgedetect.other_details">
-<ANCHOR id="gst-plugins-bad-plugins-eglglessink" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-eglglessink.html">
-<ANCHOR id="gst-plugins-bad-plugins-eglglessink.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-eglglessink.html#gst-plugins-bad-plugins-eglglessink.description">
-<ANCHOR id="gst-plugins-bad-plugins-eglglessink.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-eglglessink.html#gst-plugins-bad-plugins-eglglessink.functions_details">
-<ANCHOR id="gst-plugins-bad-plugins-eglglessink.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-eglglessink.html#gst-plugins-bad-plugins-eglglessink.other_details">
 <ANCHOR id="gst-plugins-bad-plugins-faac" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-faac.html">
 <ANCHOR id="gst-plugins-bad-plugins-faac.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-faac.html#gst-plugins-bad-plugins-faac.properties">
 <ANCHOR id="gst-plugins-bad-plugins-faac.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-faac.html#gst-plugins-bad-plugins-faac.other">
@@ -542,6 +601,29 @@
 <ANCHOR id="GstMpeg2enc--sequence-length" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--sequence-length">
 <ANCHOR id="GstMpeg2enc--unit-coeff-elim" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--unit-coeff-elim">
 <ANCHOR id="GstMpeg2enc--vcd-still-size" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--vcd-still-size">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.properties">
+<ANCHOR id="MpegPsMux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#MpegPsMux">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.description">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.other_details">
+<ANCHOR id="gst-plugins-bad-plugins-mpegpsmux.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#gst-plugins-bad-plugins-mpegpsmux.property-details">
+<ANCHOR id="MpegPsMux--aggregate-gops" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegpsmux.html#MpegPsMux--aggregate-gops">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.properties">
+<ANCHOR id="MpegTsMux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.description">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.other_details">
+<ANCHOR id="gst-plugins-bad-plugins-mpegtsmux.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#gst-plugins-bad-plugins-mpegtsmux.property-details">
+<ANCHOR id="MpegTsMux--m2ts-mode" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--m2ts-mode">
+<ANCHOR id="MpegTsMux--prog-map" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--prog-map">
+<ANCHOR id="MpegTsMux--pat-interval" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pat-interval">
+<ANCHOR id="MpegTsMux--pmt-interval" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--pmt-interval">
+<ANCHOR id="MpegTsMux--alignment" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--alignment">
+<ANCHOR id="MpegTsMux--si-interval" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mpegtsmux.html#MpegTsMux--si-interval">
 <ANCHOR id="gst-plugins-bad-plugins-mplex" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mplex.html">
 <ANCHOR id="gst-plugins-bad-plugins-mplex.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mplex.html#gst-plugins-bad-plugins-mplex.properties">
 <ANCHOR id="GstMplex" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-mplex.html#GstMplex">
@@ -617,6 +699,85 @@
 <ANCHOR id="gst-plugins-bad-plugins-openalsink.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-openalsink.html#gst-plugins-bad-plugins-openalsink.description">
 <ANCHOR id="gst-plugins-bad-plugins-openalsink.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-openalsink.html#gst-plugins-bad-plugins-openalsink.functions_details">
 <ANCHOR id="gst-plugins-bad-plugins-openalsink.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-openalsink.html#gst-plugins-bad-plugins-openalsink.other_details">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.properties">
+<ANCHOR id="GstOpenalSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpenalSrc">
+<ANCHOR id="GstOpencvTextOverlay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpencvTextOverlay">
+<ANCHOR id="GstOpusDec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpusDec">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.other">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.description">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.other_details">
+<ANCHOR id="GstOpusDec-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpusDec-struct">
+<ANCHOR id="gst-plugins-bad-plugins-opusdec.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#gst-plugins-bad-plugins-opusdec.property-details">
+<ANCHOR id="GstOpusDec--apply-gain" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpusDec--apply-gain">
+<ANCHOR id="GstOpusDec--use-inband-fec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusdec.html#GstOpusDec--use-inband-fec">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.properties">
+<ANCHOR id="GstOpenalSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpenalSrc">
+<ANCHOR id="GstOpencvTextOverlay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpencvTextOverlay">
+<ANCHOR id="GstOpusDec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusDec">
+<ANCHOR id="GstOpusEnc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.other">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.description">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.other_details">
+<ANCHOR id="GstOpusEnc-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc-struct">
+<ANCHOR id="gst-plugins-bad-plugins-opusenc.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#gst-plugins-bad-plugins-opusenc.property-details">
+<ANCHOR id="GstOpusEnc--audio" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio">
+<ANCHOR id="GstOpusEnc--bandwidth" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bandwidth">
+<ANCHOR id="GstOpusEnc--bitrate" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate">
+<ANCHOR id="GstOpusEnc--cbr" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--cbr">
+<ANCHOR id="GstOpusEnc--complexity" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--complexity">
+<ANCHOR id="GstOpusEnc--constrained-vbr" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--constrained-vbr">
+<ANCHOR id="GstOpusEnc--dtx" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--dtx">
+<ANCHOR id="GstOpusEnc--frame-size" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--frame-size">
+<ANCHOR id="GstOpusEnc--inband-fec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--inband-fec">
+<ANCHOR id="GstOpusEnc--max-payload-size" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--max-payload-size">
+<ANCHOR id="GstOpusEnc--packet-loss-percentage" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--packet-loss-percentage">
+<ANCHOR id="GstOpusEnc--audio-type" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--audio-type">
+<ANCHOR id="GstOpusEnc--bitrate-type" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusenc.html#GstOpusEnc--bitrate-type">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html">
+<ANCHOR id="GstOpenalSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpenalSrc">
+<ANCHOR id="GstOpencvTextOverlay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpencvTextOverlay">
+<ANCHOR id="GstOpusDec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpusDec">
+<ANCHOR id="GstOpusEnc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpusEnc">
+<ANCHOR id="GstOpusParse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpusParse">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#gst-plugins-bad-plugins-opusparse.other">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#gst-plugins-bad-plugins-opusparse.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#gst-plugins-bad-plugins-opusparse.description">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#gst-plugins-bad-plugins-opusparse.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-opusparse.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#gst-plugins-bad-plugins-opusparse.other_details">
+<ANCHOR id="GstOpusParse-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-opusparse.html#GstOpusParse-struct">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html">
+<ANCHOR id="GstOpenalSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstOpenalSrc">
+<ANCHOR id="GstOpencvTextOverlay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstOpencvTextOverlay">
+<ANCHOR id="GstOpusDec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstOpusDec">
+<ANCHOR id="GstOpusEnc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstOpusEnc">
+<ANCHOR id="GstOpusParse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstOpusParse">
+<ANCHOR id="GstRTPOpusDepay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstRTPOpusDepay">
+<ANCHOR id="GstRtpOPUSPay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstRtpOPUSPay">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#gst-plugins-bad-plugins-rtpopuspay.other">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#gst-plugins-bad-plugins-rtpopuspay.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#gst-plugins-bad-plugins-rtpopuspay.description">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#gst-plugins-bad-plugins-rtpopuspay.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopuspay.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#gst-plugins-bad-plugins-rtpopuspay.other_details">
+<ANCHOR id="GstRtpOPUSPay-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopuspay.html#GstRtpOPUSPay-struct">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html">
+<ANCHOR id="GstOpenalSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstOpenalSrc">
+<ANCHOR id="GstOpencvTextOverlay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstOpencvTextOverlay">
+<ANCHOR id="GstOpusDec" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstOpusDec">
+<ANCHOR id="GstOpusEnc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstOpusEnc">
+<ANCHOR id="GstOpusParse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstOpusParse">
+<ANCHOR id="GstRTPOpusDepay" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstRTPOpusDepay">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#gst-plugins-bad-plugins-rtpopusdepay.other">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#gst-plugins-bad-plugins-rtpopusdepay.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#gst-plugins-bad-plugins-rtpopusdepay.description">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#gst-plugins-bad-plugins-rtpopusdepay.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-rtpopusdepay.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#gst-plugins-bad-plugins-rtpopusdepay.other_details">
+<ANCHOR id="GstRTPOpusDepay-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-rtpopusdepay.html#GstRTPOpusDepay-struct">
 <ANCHOR id="gst-plugins-bad-plugins-pcapparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-pcapparse.html">
 <ANCHOR id="gst-plugins-bad-plugins-pcapparse.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-pcapparse.html#gst-plugins-bad-plugins-pcapparse.properties">
 <ANCHOR id="GstPcapParse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-pcapparse.html#GstPcapParse">
@@ -726,6 +887,7 @@
 <ANCHOR id="gst-plugins-bad-plugins-shmsrc.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-shmsrc.html#gst-plugins-bad-plugins-shmsrc.property-details">
 <ANCHOR id="GstShmSrc--is-live" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--is-live">
 <ANCHOR id="GstShmSrc--socket-path" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--socket-path">
+<ANCHOR id="GstShmSrc--shm-area-name" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--shm-area-name">
 <ANCHOR id="gst-plugins-bad-plugins-sdpdemux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-sdpdemux.html">
 <ANCHOR id="gst-plugins-bad-plugins-sdpdemux.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-sdpdemux.html#gst-plugins-bad-plugins-sdpdemux.properties">
 <ANCHOR id="GstSDPDemux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux">
@@ -933,6 +1095,7 @@
 <ANCHOR id="gst-plugins-bad-plugins-zbar.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-zbar.html#gst-plugins-bad-plugins-zbar.property-details">
 <ANCHOR id="GstZBar--message" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-zbar.html#GstZBar--message">
 <ANCHOR id="GstZBar--cache" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-zbar.html#GstZBar--cache">
+<ANCHOR id="GstZBar--attach-frame" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-zbar.html#GstZBar--attach-frame">
 <ANCHOR id="gst-plugins-bad-plugins-voaacenc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-voaacenc.html">
 <ANCHOR id="gst-plugins-bad-plugins-voaacenc.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-voaacenc.html#gst-plugins-bad-plugins-voaacenc.properties">
 <ANCHOR id="GstVoAacEnc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-voaacenc.html#GstVoAacEnc">
@@ -961,6 +1124,10 @@
 <ANCHOR id="gst-plugins-bad-plugins-wavescope.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-wavescope.html#gst-plugins-bad-plugins-wavescope.property-details">
 <ANCHOR id="GstWaveScope--style" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-wavescope.html#GstWaveScope--style">
 <ANCHOR id="gst-plugins-bad-plugins-wavescope.see-also" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-wavescope.html#gst-plugins-bad-plugins-wavescope.see-also">
+<ANCHOR id="gst-plugins-bad-plugins-plugin-aiff" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-aiff.html">
+<ANCHOR id="plugin-aiff" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-aiff.html#plugin-aiff">
+<ANCHOR id="gst-plugins-bad-plugins-plugin-audiomixer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-audiomixer.html">
+<ANCHOR id="plugin-audiomixer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-audiomixer.html#plugin-audiomixer">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-audiovisualizers" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-audiovisualizers.html">
 <ANCHOR id="plugin-audiovisualizers" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-audiovisualizers.html#plugin-audiovisualizers">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-autoconvert" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-autoconvert.html">
@@ -969,6 +1136,8 @@
 <ANCHOR id="plugin-assrender" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-assrender.html#plugin-assrender">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-bayer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bayer.html">
 <ANCHOR id="plugin-bayer" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bayer.html#plugin-bayer">
+<ANCHOR id="gst-plugins-bad-plugins-plugin-bs2b" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bs2b.html">
+<ANCHOR id="plugin-bs2b" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bs2b.html#plugin-bs2b">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-bz2" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bz2.html">
 <ANCHOR id="plugin-bz2" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-bz2.html#plugin-bz2">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-camerabin" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-camerabin.html">
@@ -987,8 +1156,6 @@
 <ANCHOR id="plugin-dvb" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-dvb.html#plugin-dvb">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-dvdspu" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-dvdspu.html">
 <ANCHOR id="plugin-dvdspu" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-dvdspu.html#plugin-dvdspu">
-<ANCHOR id="gst-plugins-bad-plugins-plugin-eglglessink" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-eglglessink.html">
-<ANCHOR id="plugin-eglglessink" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-eglglessink.html#plugin-eglglessink">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-faac" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-faac.html">
 <ANCHOR id="plugin-faac" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-faac.html#plugin-faac">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-faad" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-faad.html">
@@ -1013,6 +1180,8 @@
 <ANCHOR id="plugin-modplug" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-modplug.html#plugin-modplug">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-mpeg2enc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpeg2enc.html">
 <ANCHOR id="plugin-mpeg2enc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpeg2enc.html#plugin-mpeg2enc">
+<ANCHOR id="gst-plugins-bad-plugins-plugin-mpegpsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpegpsmux.html">
+<ANCHOR id="plugin-mpegpsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpegpsmux.html#plugin-mpegpsmux">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-mpegtsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpegtsmux.html">
 <ANCHOR id="plugin-mpegtsmux" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mpegtsmux.html#plugin-mpegtsmux">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-mplex" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-mplex.html">
@@ -1025,6 +1194,8 @@
 <ANCHOR id="plugin-openal" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-openal.html#plugin-openal">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-opencv" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-opencv.html">
 <ANCHOR id="plugin-opencv" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-opencv.html#plugin-opencv">
+<ANCHOR id="gst-plugins-bad-plugins-plugin-opus" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-opus.html">
+<ANCHOR id="plugin-opus" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-opus.html#plugin-opus">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-pcapparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-pcapparse.html">
 <ANCHOR id="plugin-pcapparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-pcapparse.html#plugin-pcapparse">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-rawparse" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-rawparse.html">
@@ -1047,75 +1218,3 @@
 <ANCHOR id="plugin-voamrwbenc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-voamrwbenc.html#plugin-voamrwbenc">
 <ANCHOR id="gst-plugins-bad-plugins-plugin-zbar" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-zbar.html">
 <ANCHOR id="plugin-zbar" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-plugin-zbar.html#plugin-zbar">
-<ANCHOR id="GstPhotography" href="gst-plugins-bad-plugins-1.0/GstPhotography.html">
-<ANCHOR id="GstPhotography.functions" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.functions">
-<ANCHOR id="GstPhotography.properties" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.properties">
-<ANCHOR id="GstPhotography.other" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.other">
-<ANCHOR id="GstPhotography.object-hierarchy" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.object-hierarchy">
-<ANCHOR id="GstPhotography.prerequisites" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.prerequisites">
-<ANCHOR id="GstPhotography.description" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.description">
-<ANCHOR id="GstPhotography.functions_details" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.functions_details">
-<ANCHOR id="GstPhotographyCapturePrepared" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyCapturePrepared">
-<ANCHOR id="gst-photography-get-ev-compensation" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-ev-compensation">
-<ANCHOR id="gst-photography-get-iso-speed" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-iso-speed">
-<ANCHOR id="gst-photography-get-aperture" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-aperture">
-<ANCHOR id="gst-photography-get-exposure" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-exposure">
-<ANCHOR id="gst-photography-get-white-balance-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-white-balance-mode">
-<ANCHOR id="gst-photography-get-color-tone-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-color-tone-mode">
-<ANCHOR id="gst-photography-get-scene-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-scene-mode">
-<ANCHOR id="gst-photography-get-flash-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-flash-mode">
-<ANCHOR id="gst-photography-get-noise-reduction" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-noise-reduction">
-<ANCHOR id="gst-photography-get-zoom" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-zoom">
-<ANCHOR id="gst-photography-set-ev-compensation" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-ev-compensation">
-<ANCHOR id="gst-photography-set-iso-speed" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-iso-speed">
-<ANCHOR id="gst-photography-set-aperture" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-aperture">
-<ANCHOR id="gst-photography-set-exposure" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-exposure">
-<ANCHOR id="gst-photography-set-white-balance-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-white-balance-mode">
-<ANCHOR id="gst-photography-set-color-tone-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-color-tone-mode">
-<ANCHOR id="gst-photography-set-scene-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-scene-mode">
-<ANCHOR id="gst-photography-set-flash-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-flash-mode">
-<ANCHOR id="gst-photography-set-noise-reduction" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-noise-reduction">
-<ANCHOR id="gst-photography-set-zoom" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-zoom">
-<ANCHOR id="gst-photography-get-capabilities" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-capabilities">
-<ANCHOR id="gst-photography-prepare-for-capture" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-prepare-for-capture">
-<ANCHOR id="gst-photography-set-autofocus" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-autofocus">
-<ANCHOR id="gst-photography-set-config" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-set-config">
-<ANCHOR id="gst-photography-get-config" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#gst-photography-get-config">
-<ANCHOR id="GstPhotography.other_details" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.other_details">
-<ANCHOR id="GstPhotography-struct" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography-struct">
-<ANCHOR id="GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GST-PHOTOGRAPHY-AUTOFOCUS-DONE:CAPS">
-<ANCHOR id="GST-PHOTOGRAPHY-SHAKE-RISK:CAPS" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GST-PHOTOGRAPHY-SHAKE-RISK:CAPS">
-<ANCHOR id="GstPhotographyNoiseReduction" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyNoiseReduction">
-<ANCHOR id="GstPhotographyWhiteBalanceMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyWhiteBalanceMode">
-<ANCHOR id="GstPhotographyColorToneMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyColorToneMode">
-<ANCHOR id="GstPhotographySceneMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographySceneMode">
-<ANCHOR id="GstPhotographyFlashMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyFlashMode">
-<ANCHOR id="GstPhotographyFlickerReductionMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyFlickerReductionMode">
-<ANCHOR id="GstPhotographyFocusMode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyFocusMode">
-<ANCHOR id="GstPhotographyFocusStatus" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyFocusStatus">
-<ANCHOR id="GstPhotographyCaps" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyCaps">
-<ANCHOR id="GstPhotographyShakeRisk" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotographyShakeRisk">
-<ANCHOR id="GstPhotography.property-details" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography.property-details">
-<ANCHOR id="GstPhotography--aperture" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--aperture">
-<ANCHOR id="GstPhotography--capabilities" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--capabilities">
-<ANCHOR id="GstPhotography--colour-tone-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--colour-tone-mode">
-<ANCHOR id="GstPhotography--ev-compensation" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--ev-compensation">
-<ANCHOR id="GstPhotography--exposure" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--exposure">
-<ANCHOR id="GstPhotography--flash-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--flash-mode">
-<ANCHOR id="GstPhotography--flicker-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--flicker-mode">
-<ANCHOR id="GstPhotography--focus-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--focus-mode">
-<ANCHOR id="GstPhotography--image-capture-supported-caps" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--image-capture-supported-caps">
-<ANCHOR id="GstPhotography--iso-speed" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--iso-speed">
-<ANCHOR id="GstPhotography--scene-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--scene-mode">
-<ANCHOR id="GstPhotography--white-balance-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--white-balance-mode">
-<ANCHOR id="GstPhotography--image-preview-supported-caps" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--image-preview-supported-caps">
-<ANCHOR id="GstPhotography--noise-reduction" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--noise-reduction">
-<ANCHOR id="GstPhotography--zoom" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--zoom">
-<ANCHOR id="GstPhotography--analog-gain" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--analog-gain">
-<ANCHOR id="GstPhotography--color-temperature" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--color-temperature">
-<ANCHOR id="GstPhotography--color-tone-mode" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--color-tone-mode">
-<ANCHOR id="GstPhotography--exposure-time" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--exposure-time">
-<ANCHOR id="GstPhotography--lens-focus" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--lens-focus">
-<ANCHOR id="GstPhotography--max-exposure-time" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--max-exposure-time">
-<ANCHOR id="GstPhotography--min-exposure-time" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--min-exposure-time">
-<ANCHOR id="GstPhotography--white-point" href="gst-plugins-bad-plugins-1.0/GstPhotography.html#GstPhotography--white-point">
diff --git a/docs/plugins/html/style.css b/docs/plugins/html/style.css
index c141ddd..3675420 100644
--- a/docs/plugins/html/style.css
+++ b/docs/plugins/html/style.css
@@ -60,7 +60,7 @@
 div.informaltable table
 {
   border-collapse: separate;
-  border-spacing: 1em 0.5em;
+  border-spacing: 1em 0.3em;
   border: none;
 }
 
@@ -148,6 +148,8 @@
 h4
 {
   color: #555753;
+  margin-top: 1em;
+  margin-bottom: 1em;
 }
 
 hr
@@ -166,17 +168,16 @@
   padding-bottom: 0.25em;
 }
 
-dl.toc > dd > dl > dt
+dl.toc > dt
 {
   padding-top: 0.25em;
   padding-bottom: 0.25em;
+  font-weight: bold;
 }
 
-dl.toc > dt
+dl.toc > dl
 {
-  padding-top: 1em;
   padding-bottom: 0.5em;
-  font-weight: bold;
 }
 
 .parameter
@@ -346,7 +347,9 @@
 }
 
 @media screen {
-  sup a.footnote
+  /* these have a <sup> as a first child, but since there are no parent selectors
+   * we can't use that. */
+  a.footnote
   {
     position: relative;
     top: 0em ! important;
diff --git a/docs/plugins/inspect/plugin-accurip.xml b/docs/plugins/inspect/plugin-accurip.xml
index 2b981e7..b33bcc6 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.4.5</version>
+  <version>1.5.91</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 be0cc23..1544462 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.4.5</version>
+  <version>1.5.91</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 0a08b30..c3c1f74 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -26,7 +26,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/x-adpcm, layout=(string){ dvi }, block_align=(int)[ 64, 8192 ], rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</details>
+          <details>audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 64, 8192 ], rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-aiff.xml b/docs/plugins/inspect/plugin-aiff.xml
index b54948d..83e8f38 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.4.5</version>
+  <version>1.5.91</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 d607408..7a42773 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.4.5</version>
+  <version>1.5.91</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 3b3b6ba..af6ca68 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -26,13 +26,13 @@
           <name>video_sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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-audiofxbad.xml b/docs/plugins/inspect/plugin-audiofxbad.xml
index 26415a0..2c3e0de 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.4.5</version>
+  <version>1.5.91</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 190db26..130206e 100644
--- a/docs/plugins/inspect/plugin-audiomixer.xml
+++ b/docs/plugins/inspect/plugin-audiomixer.xml
@@ -3,13 +3,34 @@
   <description>Mixes multiple audio streams</description>
   <filename>../../gst/audiomixer/.libs/libgstaudiomixer.so</filename>
   <basename>libgstaudiomixer.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</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>audiointerleave</name>
+      <longname>AudioInterleave</longname>
+      <class>Generic/Audio</class>
+      <description>Mixes multiple audio streams</description>
+      <author>Olivier Crete &lt;olivier.crete@collabora.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink_%u</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)1, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, layout=(string){ non-interleaved, interleaved }</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, layout=(string)interleaved</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
       <name>audiomixer</name>
       <longname>AudioMixer</longname>
       <class>Generic/Audio</class>
diff --git a/docs/plugins/inspect/plugin-audiovisualizers.xml b/docs/plugins/inspect/plugin-audiovisualizers.xml
index 04c619a..d910261 100644
--- a/docs/plugins/inspect/plugin-audiovisualizers.xml
+++ b/docs/plugins/inspect/plugin-audiovisualizers.xml
@@ -3,8 +3,8 @@
   <description>Creates video visualizations of audio input</description>
   <filename>../../gst/audiovisualizers/.libs/libgstaudiovisualizers.so</filename>
   <basename>libgstaudiovisualizers.so</basename>
-  <version>1.4.5</version>
-  <license>GPL</license>
+  <version>1.5.91</version>
+  <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
   <origin>Unknown package origin</origin>
diff --git a/docs/plugins/inspect/plugin-autoconvert.xml b/docs/plugins/inspect/plugin-autoconvert.xml
index b74056c..5a0b1f4 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.4.5</version>
+  <version>1.5.91</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 56fafed..b4c213e 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-bluez.xml b/docs/plugins/inspect/plugin-bluez.xml
new file mode 100644
index 0000000..feaa29e
--- /dev/null
+++ b/docs/plugins/inspect/plugin-bluez.xml
@@ -0,0 +1,58 @@
+<plugin>
+  <name>bluez</name>
+  <description>Bluez-based bluetooth support</description>
+  <filename>../../sys/bluez/.libs/libgstbluez.so</filename>
+  <basename>libgstbluez.so</basename>
+  <version>1.5.91</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>a2dpsink</name>
+      <longname>Bluetooth A2DP sink</longname>
+      <class>Sink/Audio</class>
+      <description>Plays audio to an A2DP device</description>
+      <author>Marcel Holtmann &lt;marcel@holtmann.org&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>audio/x-sbc, rate=(int){ 16000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], channel-mode=(string){ mono, dual, stereo, joint }, blocks=(int){ 4, 8, 12, 16 }, subbands=(int){ 4, 8 }, allocation-method=(string){ snr, loudness }, bitpool=(int)[ 2, 64 ]; audio/mpeg</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>avdtpsink</name>
+      <longname>Bluetooth AVDTP sink</longname>
+      <class>Sink/Audio</class>
+      <description>Plays audio to an A2DP device</description>
+      <author>Marcel Holtmann &lt;marcel@holtmann.org&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int){ 16000, 32000, 44100, 48000 }, encoding-name=(string)SBC; application/x-rtp, media=(string)audio, payload=(int)14, clock-rate=(int)90000; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)MPA</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>avdtpsrc</name>
+      <longname>Bluetooth AVDTP Source</longname>
+      <class>Source/Audio/Network/RTP</class>
+      <description>Receives audio from an A2DP device</description>
+      <author>Arun Raghavan &lt;arun.raghavan@collabora.co.uk&gt;</author>
+      <pads>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int){ 16000, 32000, 44100, 48000 }, encoding-name=(string)SBC; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int){ 8000, 11025, 12000, 16000, 22050, 2400, 32000, 44100, 48000, 64000, 88200, 96000 }, encoding-name=(string)MP4A-LATM</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-bs2b.xml b/docs/plugins/inspect/plugin-bs2b.xml
new file mode 100644
index 0000000..c646cbe
--- /dev/null
+++ b/docs/plugins/inspect/plugin-bs2b.xml
@@ -0,0 +1,34 @@
+<plugin>
+  <name>bs2b</name>
+  <description>Improve headphone listening of stereo audio recordsusing the bs2b library.</description>
+  <filename>../../ext/bs2b/.libs/libgstbs2b.so</filename>
+  <basename>libgstbs2b.so</basename>
+  <version>1.5.0.1</version>
+  <license>LGPL</license>
+  <source>gst-plugins-bad</source>
+  <package>GStreamer Bad Plug-ins git</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>bs2b</name>
+      <longname>Crossfeed effect</longname>
+      <class>Effect/Audio</class>
+      <description>Improve headphone listening of stereo audio records using the bs2b library.</description>
+      <author>Christoph Reiter &lt;reiter.christoph@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 2000, 384000 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, layout=(string)interleaved; audio/x-raw, channels=(int)1</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 2000, 384000 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003, layout=(string)interleaved; audio/x-raw, channels=(int)1</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-bz2.xml b/docs/plugins/inspect/plugin-bz2.xml
index 32abfdf..1256730 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.4.5</version>
+  <version>1.5.91</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 58fc10a..235123c 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.4.5</version>
+  <version>1.5.91</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 c454e68..53eddb0 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.4.5</version>
+  <version>1.5.91</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 49ce112..a9d7e99 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.4.5</version>
+  <version>1.5.91</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
index 161998c..b2677fe 100644
--- a/docs/plugins/inspect/plugin-compositor.xml
+++ b/docs/plugins/inspect/plugin-compositor.xml
@@ -3,7 +3,7 @@
   <description>Compositor</description>
   <filename>../../gst/compositor/.libs/libgstcompositor.so</filename>
   <basename>libgstcompositor.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-curl.xml b/docs/plugins/inspect/plugin-curl.xml
index c54d313..e476425 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.4.5</version>
+  <version>1.5.91</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 c911b39..742152b 100644
--- a/docs/plugins/inspect/plugin-dashdemux.xml
+++ b/docs/plugins/inspect/plugin-dashdemux.xml
@@ -3,11 +3,11 @@
   <description>DASH demuxer plugin</description>
   <filename>../../ext/dash/.libs/libgstdashdemux.so</filename>
   <basename>libgstdashdemux.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
-  <origin>http://www.gstreamer.org/</origin>
+  <origin>Unknown package origin</origin>
   <elements>
     <element>
       <name>dashdemux</name>
@@ -25,7 +25,13 @@
           <details>application/dash+xml</details>
         </caps>
         <caps>
-          <name>src_%u</name>
+          <name>audio_%02u</name>
+          <direction>source</direction>
+          <presence>sometimes</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>video_%02u</name>
           <direction>source</direction>
           <presence>sometimes</presence>
           <details>ANY</details>
diff --git a/docs/plugins/inspect/plugin-dataurisrc.xml b/docs/plugins/inspect/plugin-dataurisrc.xml
index 11c1058..3bc11d8 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.4.5</version>
+  <version>1.5.91</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 b47938b..a10dcb0 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -100,6 +100,27 @@
       </pads>
     </element>
     <element>
+      <name>errorignore</name>
+      <longname>Convert some GstFlowReturn types into others</longname>
+      <class>Generic</class>
+      <description>Pass through all packets but ignore some GstFlowReturn types</description>
+      <author>Vivia Nikolaidou &lt;vivia@toolsonair.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
       <name>fpsdisplaysink</name>
       <longname>Measure and show framerate on videosink</longname>
       <class>Sink/Video</class>
diff --git a/docs/plugins/inspect/plugin-decklink.xml b/docs/plugins/inspect/plugin-decklink.xml
index 1d4069c..cf865db 100644
--- a/docs/plugins/inspect/plugin-decklink.xml
+++ b/docs/plugins/inspect/plugin-decklink.xml
@@ -3,51 +3,69 @@
   <description>Blackmagic Decklink plugin</description>
   <filename>../../sys/decklink/.libs/libgstdecklink.so</filename>
   <basename>libgstdecklink.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
   <origin>Unknown package origin</origin>
   <elements>
     <element>
-      <name>decklinksink</name>
-      <longname>Decklink Sink</longname>
-      <class>Video/Sink</class>
+      <name>decklinkaudiosink</name>
+      <longname>Decklink Audio Sink</longname>
+      <class>Audio/Sink</class>
       <description>Decklink Sink</description>
-      <author>David Schleef &lt;ds@entropywave.com&gt;</author>
+      <author>David Schleef &lt;ds@entropywave.com&gt;, Sebastian Dröge &lt;sebastian@centricular.com&gt;</author>
       <pads>
         <caps>
-          <name>audiosink</name>
+          <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved</details>
-        </caps>
-        <caps>
-          <name>videosink</name>
-          <direction>sink</direction>
-          <presence>always</presence>
-          <details>video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)24000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2</details>
+          <details>audio/x-raw, format=(string){ S16LE, S32LE }, channels=(int)2, rate=(int)48000, layout=(string)interleaved</details>
         </caps>
       </pads>
     </element>
     <element>
-      <name>decklinksrc</name>
-      <longname>Decklink source</longname>
-      <class>Source/Video</class>
-      <description>DeckLink Source</description>
-      <author>David Schleef &lt;ds@entropywave.com&gt;</author>
+      <name>decklinkaudiosrc</name>
+      <longname>Decklink Audio Source</longname>
+      <class>Audio/Src</class>
+      <description>Decklink Source</description>
+      <author>David Schleef &lt;ds@entropywave.com&gt;, Sebastian Dröge &lt;sebastian@centricular.com&gt;</author>
       <pads>
         <caps>
-          <name>audiosrc</name>
+          <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved</details>
+          <details>audio/x-raw, format=(string){ S16LE, S32LE }, channels=(int)2, rate=(int)48000, layout=(string)interleaved</details>
         </caps>
+      </pads>
+    </element>
+    <element>
+      <name>decklinkvideosink</name>
+      <longname>Decklink Video Sink</longname>
+      <class>Video/Sink</class>
+      <description>Decklink Sink</description>
+      <author>David Schleef &lt;ds@entropywave.com&gt;, Sebastian Dröge &lt;sebastian@centricular.com&gt;</author>
+      <pads>
         <caps>
-          <name>videosrc</name>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>decklinkvideosrc</name>
+      <longname>Decklink Video Source</longname>
+      <class>Video/Src</class>
+      <description>Decklink Source</description>
+      <author>David Schleef &lt;ds@entropywave.com&gt;, Sebastian Dröge &lt;sebastian@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)24000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2</details>
+          <details>video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)24000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)486, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)10/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)12/11, colorimetry=(string)bt601, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)24/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)24000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)24/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)2048, height=(int)1556, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)24000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)24/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)50/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)60000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2; video/x-raw, format=(string)UYVY, width=(int)3840, height=(int)2160, framerate=(fraction)60/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt2020, chroma-site=(string)mpeg2</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-dfbvideosink.xml b/docs/plugins/inspect/plugin-dfbvideosink.xml
index c401bd7..280e4a5 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dtls.xml b/docs/plugins/inspect/plugin-dtls.xml
new file mode 100644
index 0000000..6625970
--- /dev/null
+++ b/docs/plugins/inspect/plugin-dtls.xml
@@ -0,0 +1,148 @@
+<plugin>
+  <name>dtls</name>
+  <description>DTLS decoder and encoder plugins</description>
+  <filename>../../ext/dtls/.libs/libgstdtls.so</filename>
+  <basename>libgstdtls.so</basename>
+  <version>1.5.91</version>
+  <license>BSD</license>
+  <source>gst-plugins-bad</source>
+  <package>GStreamer Bad Plug-ins source release</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>dtlsdec</name>
+      <longname>DTLS Decoder</longname>
+      <class>Decoder/Network/DTLS</class>
+      <description>Decodes DTLS packets</description>
+      <author>Patrik Oldsberg patrik.oldsberg@ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>application/x-dtls</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>request</presence>
+          <details>ANY</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>dtlsenc</name>
+      <longname>DTLS Encoder</longname>
+      <class>Encoder/Network/DTLS</class>
+      <description>Encodes packets with DTLS</description>
+      <author>Patrik Oldsberg patrik.oldsberg@ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-dtls</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>dtlssrtpdec</name>
+      <longname>DTLS-SRTP Decoder</longname>
+      <class>Decoder/Network/DTLS/SRTP</class>
+      <description>Decodes SRTP packets with a key received from DTLS</description>
+      <author>Patrik Oldsberg patrik.oldsberg@ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>rtcp_src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtcp</details>
+        </caps>
+        <caps>
+          <name>rtp_src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp</details>
+        </caps>
+        <caps>
+          <name>data_src</name>
+          <direction>source</direction>
+          <presence>request</presence>
+          <details>ANY</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>dtlssrtpdemux</name>
+      <longname>DTLS SRTP Demultiplexer</longname>
+      <class>DTLS/SRTP/Demux</class>
+      <description>Demultiplexes DTLS and SRTP packets</description>
+      <author>Patrik Oldsberg patrik.oldsberg@ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>dtls_src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-dtls</details>
+        </caps>
+        <caps>
+          <name>rtp_src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp; application/x-rtcp; application/x-srtp; application/x-srtcp</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>dtlssrtpenc</name>
+      <longname>DTLS-SRTP Encoder</longname>
+      <class>Encoder/Network/DTLS/SRTP</class>
+      <description>Encodes SRTP packets with a key received from DTLS</description>
+      <author>Patrik Oldsberg patrik.oldsberg@ericsson.com</author>
+      <pads>
+        <caps>
+          <name>data_sink</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>ANY</details>
+        </caps>
+        <caps>
+          <name>rtcp_sink_%d</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>application/x-rtp; application/x-rtcp</details>
+        </caps>
+        <caps>
+          <name>rtp_sink_%d</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>application/x-rtp; application/x-rtcp</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-dtsdec.xml b/docs/plugins/inspect/plugin-dtsdec.xml
index 40c6d05..5957b5e 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.4.5</version>
+  <version>1.5.91</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 6b13e03..bdcb758 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -14,7 +14,8 @@
       <longname>DVB bin</longname>
       <class>Source/Bin/Video</class>
       <description>Access descramble and split DVB streams</description>
-      <author>Alessandro Decina &lt;alessandro@nnva.org&gt;</author>
+      <author>Alessandro Decina &lt;alessandro@nnva.org&gt;
+Reynaldo H. Verdejo Pinochet &lt;r.verdejo@sisa.samsung.com&gt;</author>
       <pads>
         <caps>
           <name>src</name>
@@ -35,7 +36,8 @@
       <longname>DVB Source</longname>
       <class>Source/Video</class>
       <description>Digital Video Broadcast Source</description>
-      <author>P2P-VCR, C-Lab, University of Paderborn,Zaheer Abbas Merali &lt;zaheerabbas at merali dot org&gt;</author>
+      <author>P2P-VCR, C-Lab, University of Paderborn, Zaheer Abbas Merali &lt;zaheerabbas at merali dot org&gt;
+Reynaldo H. Verdejo Pinochet &lt;r.verdejo@sisa.samsung.com&gt;</author>
       <pads>
         <caps>
           <name>src</name>
diff --git a/docs/plugins/inspect/plugin-dvbsuboverlay.xml b/docs/plugins/inspect/plugin-dvbsuboverlay.xml
index 3314a20..74bfc56 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -26,13 +26,13 @@
           <name>video_sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(ANY), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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-dvdspu.xml b/docs/plugins/inspect/plugin-dvdspu.xml
index ac7aaec..c09ee64 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-eglglessink.xml b/docs/plugins/inspect/plugin-eglglessink.xml
deleted file mode 100644
index 9e5a10d..0000000
--- a/docs/plugins/inspect/plugin-eglglessink.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<plugin>
-  <name>eglglessink</name>
-  <description>EGL/GLES sink</description>
-  <filename>../../ext/eglgles/.libs/libgsteglglessink.so</filename>
-  <basename>libgsteglglessink.so</basename>
-  <version>1.2.0</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>eglglessink</name>
-      <longname>EGL/GLES vout Sink</longname>
-      <class>Sink/Video</class>
-      <description>An EGL/GLES Video Output Sink Implementing the VideoOverlay interface</description>
-      <author>Reynaldo H. Verdejo Pinochet &lt;reynaldo@collabora.com&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</presence>
-          <details>video/x-raw(memory:EGLImage), format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGBA, BGRA, ARGB, ABGR, RGBx, BGRx, xRGB, xBGR, AYUV, Y444, I420, YV12, NV12, NV21, Y42B, Y41B, RGB, BGR, RGB16 }, 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-faac.xml b/docs/plugins/inspect/plugin-faac.xml
index a1397d8..1b91088 100644
--- a/docs/plugins/inspect/plugin-faac.xml
+++ b/docs/plugins/inspect/plugin-faac.xml
@@ -3,10 +3,10 @@
   <description>Free AAC Encoder (FAAC)</description>
   <filename>../../ext/faac/.libs/libgstfaac.so</filename>
   <basename>libgstfaac.so</basename>
-  <version>1.4.3</version>
+  <version>1.5.0.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>
@@ -26,7 +26,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/mpeg, mpegversion=(int)4, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, base-profile=(string){ main, lc, ssr, ltp }; audio/mpeg, mpegversion=(int)2, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, profile=(string){ main, lc }</details>
+          <details>audio/mpeg, mpegversion=(int)4, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, base-profile=(string){ main, lc, ssr, ltp }, framed=(boolean)true; audio/mpeg, mpegversion=(int)2, channels=(int)[ 1, 6 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, stream-format=(string){ adts, raw }, profile=(string){ main, lc }, framed=(boolean)true</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-faad.xml b/docs/plugins/inspect/plugin-faad.xml
index eb243c6..aceed8d 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.4.5</version>
+  <version>1.5.91</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 fb0d55f..3d25fa5 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.4.5</version>
+  <version>1.5.91</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 a2c7cd7..23ecf05 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.4.5</version>
+  <version>1.5.91</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 a39ee17..9eb282d 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.4.5</version>
+  <version>1.5.91</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 0e302aa..68999c5 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.4.5</version>
+  <version>1.5.91</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 6556c4b..83fcea8 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.4.5</version>
+  <version>1.5.91</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 067c080..dcee79f 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.4.5</version>
+  <version>1.5.91</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 69f956a..9edb2ec 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.4.5</version>
+  <version>1.5.91</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 4d0f72b..7dec2fa 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.4.5</version>
+  <version>1.5.91</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 6d697ed..425e0f3 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.4.5</version>
+  <version>1.5.91</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 6e45f75..352f5b5 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.4.5</version>
+  <version>1.5.91</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 c46ec3b..5575de7 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.4.5</version>
+  <version>1.5.91</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 2e4283e..0646aa9 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.4.5</version>
+  <version>1.5.91</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 2b28557..bf0a2f2 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-gstgtk.xml b/docs/plugins/inspect/plugin-gstgtk.xml
new file mode 100644
index 0000000..41144d3
--- /dev/null
+++ b/docs/plugins/inspect/plugin-gstgtk.xml
@@ -0,0 +1,43 @@
+<plugin>
+  <name>gstgtk</name>
+  <description>Gtk+ sink</description>
+  <filename>../../ext/gtk/.libs/libgstgtksink.so</filename>
+  <basename>libgstgtksink.so</basename>
+  <version>1.5.91</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>gtkglsink</name>
+      <longname>Gtk Video Sink</longname>
+      <class>Sink/Video</class>
+      <description>A video sink that renders to a GtkWidget</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gtksink</name>
+      <longname>Gtk Video Sink</longname>
+      <class>Sink/Video</class>
+      <description>A video sink that renders to a GtkWidget</description>
+      <author>Matthew Waters &lt;matthew@centricular.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>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-gstsiren.xml b/docs/plugins/inspect/plugin-gstsiren.xml
index ae40d2f..dc4fb63 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.4.5</version>
+  <version>1.5.91</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 598fe25..ed73938 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.4.5</version>
+  <version>1.5.91</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 239234d..a1ce8f6 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
@@ -20,7 +20,7 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string)S16LE, rate=(int)48000, channels=(int)2</details>
+          <details>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details>
         </caps>
       </pads>
     </element>
@@ -35,7 +35,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string)S16LE, rate=(int)48000, channels=(int)2</details>
+          <details>audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved</details>
         </caps>
       </pads>
     </element>
@@ -80,7 +80,7 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -95,7 +95,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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-interlace.xml b/docs/plugins/inspect/plugin-interlace.xml
index 1da7d4e..d233a2e 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.4.5</version>
+  <version>1.5.91</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 e0b9aa0..c74a241 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.4.5</version>
+  <version>1.5.91</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 05d01f3..4028cc4 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.4.5</version>
+  <version>1.5.91</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 dcf2d95..da46bde 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.4.5</version>
+  <version>1.5.91</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 b39863d..1b2f6e3 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -47,7 +47,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>image/jpeg, format=(string){ I420, Y41B, UYVY, YV12 }, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], interlaced=(boolean){ true, false }, framerate=(fraction)[ 0/1, 2147483647/1 ], parsed=(boolean)true</details>
+          <details>image/jpeg, format=(string){ I420, Y41B, UYVY, YV12 }, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], parsed=(boolean)true</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-kate.xml b/docs/plugins/inspect/plugin-kate.xml
index 9561102..26ed588 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.4.5</version>
+  <version>1.5.91</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 81f9d0f..37fe7a4 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-libde265.xml b/docs/plugins/inspect/plugin-libde265.xml
new file mode 100644
index 0000000..4527e11
--- /dev/null
+++ b/docs/plugins/inspect/plugin-libde265.xml
@@ -0,0 +1,34 @@
+<plugin>
+  <name>libde265</name>
+  <description>HEVC/H.265 decoder using libde265</description>
+  <filename>../../ext/libde265/.libs/libgstlibde265.so</filename>
+  <basename>libgstlibde265.so</basename>
+  <version>1.5.91</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>libde265dec</name>
+      <longname>HEVC/H.265 decoder</longname>
+      <class>Codec/Decoder/Video</class>
+      <description>Decodes HEVC/H.265 video streams using libde265</description>
+      <author>struktur AG &lt;opensource@struktur.de&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-h265, stream-format=(string){ hvc1, hev1, byte-stream }, alignment=(string){ au, nal }</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string)I420, 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-liveadder.xml b/docs/plugins/inspect/plugin-liveadder.xml
index 91a3f74..15fdf4e 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.4.5</version>
+  <version>1.5.91</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 eb860ae..7f0ad99 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.4.5</version>
+  <version>1.5.91</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 49faa78..08ee418 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.4.5</version>
+  <version>1.5.91</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 5041fcb..394c1db 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.4.5</version>
+  <version>1.5.91</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 66553ea..7b2b398 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.4.5</version>
+  <version>1.5.91</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 b7f385c..1ad2bc2 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.4.5</version>
+  <version>1.5.91</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 e3b4c0f..e6dca01 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.4.5</version>
+  <version>1.5.91</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 a5c2623..3ffd1df 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.4.5</version>
+  <version>1.5.91</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 745cb81..ca7154b 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -45,7 +45,7 @@
           <name>video_%04x</name>
           <direction>source</direction>
           <presence>sometimes</presence>
-          <details>video/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false; video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal; video/x-dirac; video/x-wmv, wmvversion=(int)3, format=(string)WVC1</details>
+          <details>video/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false; video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal; video/x-dirac; video/x-cavs; video/x-wmv, wmvversion=(int)3, format=(string)WVC1</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-mpegtsmux.xml b/docs/plugins/inspect/plugin-mpegtsmux.xml
index a9999a3..5d97b49 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -20,7 +20,7 @@
           <name>sink_%d</name>
           <direction>sink</direction>
           <presence>request</presence>
-          <details>video/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false; video/x-dirac; video/x-h264, stream-format=(string)byte-stream, alignment=(string){ au, nal }; audio/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2 }; audio/mpeg, framed=(boolean)true, mpegversion=(int)4, stream-format=(string){ raw, adts }; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }; audio/x-ac3, framed=(boolean)true; audio/x-dts, framed=(boolean)true; subpicture/x-dvb; application/x-teletext</details>
+          <details>video/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false; video/x-dirac; video/x-h264, stream-format=(string)byte-stream, alignment=(string){ au, nal }; audio/mpeg, parsed=(boolean)true, mpegversion=(int){ 1, 2 }; audio/mpeg, framed=(boolean)true, mpegversion=(int)4, stream-format=(string)adts; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw; audio/x-lpcm, width=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ], dynamic_range=(int)[ 0, 255 ], emphasis=(boolean){ false, true }, mute=(boolean){ false, true }; audio/x-ac3, framed=(boolean)true; audio/x-dts, framed=(boolean)true; subpicture/x-dvb; application/x-teletext; meta/x-klv, parsed=(boolean)true</details>
         </caps>
         <caps>
           <name>src</name>
diff --git a/docs/plugins/inspect/plugin-mpg123.xml b/docs/plugins/inspect/plugin-mpg123.xml
index 1175738..1917d47 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -20,7 +20,7 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>audio/mpeg, mpegversion=(int){ 1 }, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], parsed=(boolean)true</details>
+          <details>audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ], parsed=(boolean)true</details>
         </caps>
         <caps>
           <name>src</name>
diff --git a/docs/plugins/inspect/plugin-mplex.xml b/docs/plugins/inspect/plugin-mplex.xml
index 2a86a28..86dc617 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.4.5</version>
+  <version>1.5.91</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 e39fbf3..05e529f 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.4.5</version>
+  <version>1.5.91</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 09e5dcc..b470f44 100644
--- a/docs/plugins/inspect/plugin-neon.xml
+++ b/docs/plugins/inspect/plugin-neon.xml
@@ -3,7 +3,7 @@
   <description>lib neon http client src</description>
   <filename>../../ext/neon/.libs/libgstneonhttpsrc.so</filename>
   <basename>libgstneonhttpsrc.so</basename>
-  <version>1.3.2.1</version>
+  <version>1.5.0.1</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins git</package>
diff --git a/docs/plugins/inspect/plugin-ofa.xml b/docs/plugins/inspect/plugin-ofa.xml
index 3de74cb..5da801f 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.4.5</version>
+  <version>1.5.91</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 dc657ea..a12f5d5 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.4.5</version>
+  <version>1.5.91</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 c8e5e88..4fa1622 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -182,7 +182,7 @@
       <longname>faceblur</longname>
       <class>Filter/Effect/Video</class>
       <description>Blurs faces in images and videos</description>
-      <author>Michael Sheldon &lt;mike@mikeasoft.com&gt;</author>
+      <author>Michael Sheldon &lt;mike@mikeasoft.com&gt;,Robert Jobbagy &lt;jobbagy.robert@gmail.com&gt;</author>
       <pads>
         <caps>
           <name>sink</name>
diff --git a/docs/plugins/inspect/plugin-openexr.xml b/docs/plugins/inspect/plugin-openexr.xml
index a5fe5f1..2cf32f2 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.4.5</version>
+  <version>1.5.91</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 7abbec4..772084f 100644
--- a/docs/plugins/inspect/plugin-opengl.xml
+++ b/docs/plugins/inspect/plugin-opengl.xml
@@ -3,30 +3,30 @@
   <description>OpenGL plugin</description>
   <filename>../../ext/gl/.libs/libgstopengl.so</filename>
   <basename>libgstopengl.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</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>glbumper</name>
-      <longname>OpenGL bumper filter</longname>
-      <class>Filter/Effect/Video</class>
-      <description>Bump mapping filter</description>
-      <author>Cyril Comparon &lt;cyril.comparon@gmail.com&gt;, Julien Isorce &lt;julien.isorce@gmail.com&gt;</author>
+      <name>glcolorconvert</name>
+      <longname>OpenGL color converter</longname>
+      <class>Filter/Converter/Video</class>
+      <description>Converts between color spaces using OpenGL shaders</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
       <pads>
         <caps>
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), 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, RGB16, BGR16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), 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, RGB16, BGR16 }, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), 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, RGB16, BGR16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), 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, RGB16, BGR16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -41,13 +41,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -62,13 +62,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -83,13 +83,34 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gldownload</name>
+      <longname>OpenGL uploader</longname>
+      <class>Filter/Video</class>
+      <description>Downloads data from OpenGL</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory)</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw; video/x-raw(memory:GLMemory)</details>
         </caps>
       </pads>
     </element>
@@ -104,13 +125,412 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_blur</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_bulge</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_fisheye</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_glow</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_heat</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_identity</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_laplacian</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_lumaxpro</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_mirror</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_sepia</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_sin</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_sobel</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_square</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_squeeze</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_stretch</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_tunnel</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_twirl</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_xpro</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>gleffects_xray</name>
+      <longname>Gstreamer OpenGL Effects</longname>
+      <class>Filter/Effect/Video</class>
+      <description>GL Shading Language effects</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -125,34 +545,34 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
     <element>
-      <name>glfilterblur</name>
-      <longname>Gstreamer OpenGL Blur</longname>
-      <class>Filter/Effect/Video</class>
-      <description>Blur with 9x9 separable convolution</description>
-      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <name>glfilterbin</name>
+      <longname>GL Filter Bin</longname>
+      <class>Filter/Video</class>
+      <description>Infrastructure to process GL textures</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
       <pads>
         <caps>
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(ANY)</details>
         </caps>
       </pads>
     </element>
@@ -167,13 +587,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -188,81 +608,33 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
-        </caps>
-      </pads>
-    </element>
-    <element>
-      <name>glfilterlaplacian</name>
-      <longname>OpenGL laplacian filter</longname>
-      <class>Filter/Effect/Video</class>
-      <description>Laplacian Convolution Demo Filter</description>
-      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</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(memory:EGLImage), 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>
-        </caps>
-        <caps>
-          <name>src</name>
-          <direction>source</direction>
-          <presence>always</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(memory:EGLImage), 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>
-        </caps>
-      </pads>
-    </element>
-    <element>
-      <name>glfilterreflectedscreen</name>
-      <longname>OpenGL Reflected Screen filter</longname>
-      <class>Filter/Effect/Video</class>
-      <description>Reflected Screen Filter</description>
-      <author>Pierre POUZOL &lt;pierre.pouzol@hotmail.fr&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</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(memory:EGLImage), 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>
-        </caps>
-        <caps>
-          <name>src</name>
-          <direction>source</direction>
-          <presence>always</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(memory:EGLImage), 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>
-        </caps>
-      </pads>
-    </element>
-    <element>
-      <name>glfiltersobel</name>
-      <longname>Gstreamer OpenGL Sobel</longname>
-      <class>Filter/Effect/Video</class>
-      <description>Sobel edge detection</description>
-      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</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(memory:EGLImage), 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>
-        </caps>
-        <caps>
-          <name>src</name>
-          <direction>source</direction>
-          <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
     <element>
       <name>glimagesink</name>
+      <longname>GL Sink Bin</longname>
+      <class>Sink/Video</class>
+      <description>Infrastructure to process GL textures</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glimagesinkelement</name>
       <longname>OpenGL video sink</longname>
       <class>Sink/Video</class>
       <description>A videosink based on OpenGL</description>
@@ -272,7 +644,28 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <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(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glmixerbin</name>
+      <longname>OpenGL video_mixer empty bin</longname>
+      <class>Bin/Filter/Effect/Video/Mixer</class>
+      <description>OpenGL video_mixer empty bin</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink_%u</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, 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(ANY)</details>
         </caps>
       </pads>
     </element>
@@ -287,13 +680,13 @@
           <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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -301,20 +694,20 @@
       <name>gloverlay</name>
       <longname>Gstreamer OpenGL Overlay</longname>
       <class>Filter/Effect/Video</class>
-      <description>Overlay GL video texture with a PNG image</description>
-      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;</author>
+      <description>Overlay GL video texture with a JPEG/PNG image</description>
+      <author>Filippo Argiolas &lt;filippo.argiolas@gmail.com&gt;, Matthew Waters &lt;matthew@centricular.com&gt;</author>
       <pads>
         <caps>
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -329,13 +722,92 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glsinkbin</name>
+      <longname>GL Sink Bin</longname>
+      <class>Sink/Video</class>
+      <description>Infrastructure to process GL textures</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glsrcbin</name>
+      <longname>GL Src Bin</longname>
+      <class>Src/Video</class>
+      <description>Infrastructure to process GL textures</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw(ANY)</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glstereomix</name>
+      <longname>OpenGL stereo video combiner</longname>
+      <class>Filter/Effect/Video</class>
+      <description>OpenGL stereo video combiner</description>
+      <author>Jan Schmidt &lt;jan@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <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, RGB16, BGR16 }, 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(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, RGB16, BGR16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glstereosplit</name>
+      <longname>GLStereoSplit</longname>
+      <class>Codec/Converter</class>
+      <description>Splits a stereoscopic stream into separate left/right streams</description>
+      <author>Jan Schmidt &lt;jan@centricular.com&gt;
+Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</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(memory:EGLImage), 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, RGB16, BGR16 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+        <caps>
+          <name>left</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+        <caps>
+          <name>right</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
@@ -350,28 +822,92 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</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(memory:EGLImage), 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>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
     <element>
-      <name>glvideomixer</name>
-      <longname>OpenGL video_mixer</longname>
-      <class>Filter/Effect/Video/Compositor</class>
-      <description>OpenGL video_mixer</description>
-      <author>Julien Isorce &lt;julien.isorce@gmail.com&gt;</author>
+      <name>glupload</name>
+      <longname>OpenGL uploader</longname>
+      <class>Filter/Video</class>
+      <description>Uploads data into OpenGL</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
       <pads>
         <caps>
-          <name>sink_%u</name>
+          <name>sink</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>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, 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(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>
+          <details>video/x-raw(ANY)</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glvideomixer</name>
+      <longname>OpenGL video_mixer bin</longname>
+      <class>Bin/Filter/Effect/Video/Compositor</class>
+      <description>OpenGL video_mixer bin</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink_%u</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:EGLImage), 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){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, 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(ANY)</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glvideomixerelement</name>
+      <longname>OpenGL video_mixer</longname>
+      <class>Filter/Effect/Video/Compositor</class>
+      <description>OpenGL video_mixer</description>
+      <author>Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <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 ]</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>glviewconvert</name>
+      <longname>OpenGL Multiview/3D conversion filter</longname>
+      <class>Filter</class>
+      <description>Convert stereoscopic/multiview video formats</description>
+      <author>Jan Schmidt &lt;jan@centricular.com&gt;
+Matthew Waters &lt;matthew@centricular.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw(memory:GLMemory), format=(string)RGBA, 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(memory:GLMemory), format=(string)RGBA, 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-openh264.xml b/docs/plugins/inspect/plugin-openh264.xml
new file mode 100644
index 0000000..2c0bb5e
--- /dev/null
+++ b/docs/plugins/inspect/plugin-openh264.xml
@@ -0,0 +1,55 @@
+<plugin>
+  <name>openh264</name>
+  <description>OpenH264 encoder/decoder plugin</description>
+  <filename>../../ext/openh264/.libs/libgstopenh264.so</filename>
+  <basename>libgstopenh264.so</basename>
+  <version>1.5.0.1</version>
+  <license>BSD</license>
+  <source>gst-plugins-bad</source>
+  <package>OpenWebRTC GStreamer plugins</package>
+  <origin>http://www.ericsson.com</origin>
+  <elements>
+    <element>
+      <name>openh264dec</name>
+      <longname>OpenH264 video decoder</longname>
+      <class>Decoder/Video</class>
+      <description>OpenH264 video decoder</description>
+      <author>Ericsson AB, http://www.ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string){ constrained-baseline, baseline }</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>openh264enc</name>
+      <longname>OpenH264 video encoder</longname>
+      <class>Encoder/Video</class>
+      <description>OpenH264 video encoder</description>
+      <author>Ericsson AB, http://www.ericsson.com</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string)I420, 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-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)baseline</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-openjpeg.xml b/docs/plugins/inspect/plugin-openjpeg.xml
index 4051d7f..9ca6cc2 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.4.5</version>
+  <version>1.5.91</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 de54f9d..7c2fb82 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -26,7 +26,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string){ S16LE }, layout=(string)interleaved, rate=(int){ 48000, 24000, 16000, 12000, 8000 }, channels=(int)[ 1, 8 ]</details>
+          <details>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 48000, 24000, 16000, 12000, 8000 }, channels=(int)[ 1, 8 ]</details>
         </caps>
       </pads>
     </element>
@@ -83,13 +83,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00</details>
+          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-name=(string){ OPUS, X-GST-OPUS-DRAFT-SPITTKA-00 }</details>
         </caps>
         <caps>
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>audio/x-opus</details>
+          <details>audio/x-opus, multistream=(boolean)false</details>
         </caps>
       </pads>
     </element>
@@ -110,7 +110,7 @@
           <name>src</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00</details>
+          <details>application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-params=(string)2, encoding-name=(string){ OPUS, X-GST-OPUS-DRAFT-SPITTKA-00 }</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-pcapparse.xml b/docs/plugins/inspect/plugin-pcapparse.xml
index d8cd1a2..bcfedba 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.4.5</version>
+  <version>1.5.91</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 80081d3..05c6362 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.4.5</version>
+  <version>1.5.91</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 9bf4682..674e034 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.4.5</version>
+  <version>1.5.91</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 eb7ec23..739f640 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.4.5</version>
+  <version>1.5.91</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 b761510..9e42c21 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.4.5</version>
+  <version>1.5.91</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
@@ -32,7 +32,7 @@
           <name>video</name>
           <direction>source</direction>
           <presence>sometimes</presence>
-          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, 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-rfbsrc.xml b/docs/plugins/inspect/plugin-rfbsrc.xml
index 340855f..1dc78e9 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.4.5</version>
+  <version>1.5.91</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 7ac1011..334e287 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-rtmp.xml b/docs/plugins/inspect/plugin-rtmp.xml
index 590ac61..375c37a 100644
--- a/docs/plugins/inspect/plugin-rtmp.xml
+++ b/docs/plugins/inspect/plugin-rtmp.xml
@@ -3,7 +3,7 @@
   <description>RTMP source and sink</description>
   <filename>../../ext/rtmp/.libs/libgstrtmp.so</filename>
   <basename>libgstrtmp.so</basename>
-  <version>1.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-rtpbad.xml b/docs/plugins/inspect/plugin-rtpbad.xml
new file mode 100644
index 0000000..db2cfa4
--- /dev/null
+++ b/docs/plugins/inspect/plugin-rtpbad.xml
@@ -0,0 +1,55 @@
+<plugin>
+  <name>rtpbad</name>
+  <description>Real-time protocol plugins</description>
+  <filename>../../gst/rtp/.libs/libgstrtpbad.so</filename>
+  <basename>libgstrtpbad.so</basename>
+  <version>1.5.91</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>rtph265depay</name>
+      <longname>RTP H265 depayloader</longname>
+      <class>Codec/Depayloader/Network/RTP</class>
+      <description>Extracts H265 video from RTP packets (draft-ietf-payload-rtp-h265-03.txt)</description>
+      <author>Jurgen Slowack &lt;jurgenslowack@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-h265, stream-format=(string)byte-stream, alignment=(string){ nal, au }</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>rtph265pay</name>
+      <longname>RTP H265 payloader</longname>
+      <class>Codec/Payloader/Network/RTP</class>
+      <description>Payload-encode H265 video into RTP packets (based on draft-ietf-payload-rtp-h265-03.txt)</description>
+      <author>Jurgen Slowack &lt;jurgenslowack@gmail.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-h265, stream-format=(string)byte-stream, alignment=(string){ nal, au }</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H265</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-rtponvif.xml b/docs/plugins/inspect/plugin-rtponvif.xml
new file mode 100644
index 0000000..6e3a5a8
--- /dev/null
+++ b/docs/plugins/inspect/plugin-rtponvif.xml
@@ -0,0 +1,55 @@
+<plugin>
+  <name>rtponvif</name>
+  <description>ONVIF Streaming features</description>
+  <filename>../../gst/onvif/.libs/libgstrtponvif.so</filename>
+  <basename>libgstrtponvif.so</basename>
+  <version>1.5.91</version>
+  <license>unknown</license>
+  <source>gst-plugins-bad</source>
+  <package>GStreamer Bad Plug-ins source release</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>rtponvifparse</name>
+      <longname>ONVIF NTP timestamps RTP extension</longname>
+      <class>Effect/RTP</class>
+      <description>Add absolute timestamps and flags of recorded data in a playback session</description>
+      <author>Guillaume Desmottes &lt;guillaume.desmottes@collabora.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>application/x-rtp</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp</details>
+        </caps>
+      </pads>
+    </element>
+    <element>
+      <name>rtponviftimestamp</name>
+      <longname>ONVIF NTP timestamps RTP extension</longname>
+      <class>Effect/RTP</class>
+      <description>Add absolute timestamps and flags of recorded data in a playback session</description>
+      <author>Guillaume Desmottes &lt;guillaume.desmottes@collabora.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>application/x-rtp</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>application/x-rtp</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-rtpvp8.xml b/docs/plugins/inspect/plugin-rtpvp8.xml
deleted file mode 100644
index 26a854b..0000000
--- a/docs/plugins/inspect/plugin-rtpvp8.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<plugin>
-  <name>rtpvp8</name>
-  <description>rtpvp8</description>
-  <filename>../../gst/rtpvp8/.libs/libgstrtpvp8.so</filename>
-  <basename>libgstrtpvp8.so</basename>
-  <version>1.1.0.1</version>
-  <license>LGPL</license>
-  <source>gst-plugins-bad</source>
-  <package>GStreamer Bad Plug-ins git</package>
-  <origin>Unknown package origin</origin>
-  <elements>
-    <element>
-      <name>rtpvp8depay</name>
-      <longname>RTP VP8 depayloader</longname>
-      <class>Codec/Depayloader/Network/RTP</class>
-      <description>Extracts VP8 video from RTP packets)</description>
-      <author>Sjoerd Simons &lt;sjoerd@luon.net&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</presence>
-          <details>application/x-rtp, payload=(int)[ 96, 127 ], clock-rate=(int)90000, media=(string)video, encoding-name=(string)VP8-DRAFT-IETF-01</details>
-        </caps>
-        <caps>
-          <name>src</name>
-          <direction>source</direction>
-          <presence>always</presence>
-          <details>video/x-vp8</details>
-        </caps>
-      </pads>
-    </element>
-    <element>
-      <name>rtpvp8pay</name>
-      <longname>RTP VP8 payloader</longname>
-      <class>Codec/Payloader/Network/RTP</class>
-      <description>Puts VP8 video in RTP packets)</description>
-      <author>Sjoerd Simons &lt;sjoerd@luon.net&gt;</author>
-      <pads>
-        <caps>
-          <name>sink</name>
-          <direction>sink</direction>
-          <presence>always</presence>
-          <details>video/x-vp8</details>
-        </caps>
-        <caps>
-          <name>src</name>
-          <direction>source</direction>
-          <presence>always</presence>
-          <details>application/x-rtp, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01</details>
-        </caps>
-      </pads>
-    </element>
-  </elements>
-</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-sbc.xml b/docs/plugins/inspect/plugin-sbc.xml
index 02b3477..8598bde 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.4.5</version>
+  <version>1.5.91</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 58bfd91..8721f9d 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.4.5</version>
+  <version>1.5.91</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 523bc2f..cc2de8e 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.4.5</version>
+  <version>1.5.91</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 ed349d7..6f32d80 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.4.5</version>
+  <version>1.5.91</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 b17849b..4b08e1a 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.4.5</version>
+  <version>1.5.91</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 bdf2660..23719c0 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.4.5</version>
+  <version>1.5.91</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 e06e276..2013973 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.4.5</version>
+  <version>1.5.91</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 9a73f03..272d2ed 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.4.5</version>
+  <version>1.5.2</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -20,7 +20,7 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>audio/ogg; audio/x-aiff; audio/x-au; audio/x-flac; audio/x-ircam; audio/x-nist; audio/x-paris; audio/x-raw; audio/x-rf64; audio/x-sds; audio/x-svx; audio/x-voc; audio/x-w64; audio/x-wav; audio/x-xi</details>
+          <details>audio/x-ircam; audio/x-nist; audio/x-paris; audio/x-rf64; audio/x-sds; audio/x-svx; audio/x-voc; audio/x-w64; audio/x-xi</details>
         </caps>
         <caps>
           <name>src</name>
diff --git a/docs/plugins/inspect/plugin-soundtouch.xml b/docs/plugins/inspect/plugin-soundtouch.xml
index 0142318..3218278 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.4.5</version>
+  <version>1.5.91</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 c1d4c71..cbd1114 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.4.5</version>
+  <version>1.5.91</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 6e41064..275f1c3 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.4.5</version>
+  <version>1.5.91</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 c573eb0..5340ebb 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.4.5</version>
+  <version>1.5.91</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 ff24584..eb83c09 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.4.5</version>
+  <version>1.5.91</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 39ddd84..7da12de 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.4.5</version>
+  <version>1.5.91</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 8f043f4..a34d370 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -65,13 +65,13 @@
           <name>vfsrc</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
         <caps>
           <name>vidsrc</name>
           <direction>source</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream, avc }, alignment=(string){ au }, profile=(string){ high, main, baseline, constrained-baseline }</details>
+          <details>video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream, avc }, alignment=(string)au, profile=(string){ high, main, baseline, constrained-baseline }</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-vcdsrc.xml b/docs/plugins/inspect/plugin-vcdsrc.xml
new file mode 100644
index 0000000..9d60a84
--- /dev/null
+++ b/docs/plugins/inspect/plugin-vcdsrc.xml
@@ -0,0 +1,28 @@
+<plugin>
+  <name>vcdsrc</name>
+  <description>Asynchronous read from VCD disk</description>
+  <filename>../../sys/vcd/.libs/libgstvcdsrc.so</filename>
+  <basename>libgstvcdsrc.so</basename>
+  <version>1.5.91</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>vcdsrc</name>
+      <longname>VCD Source</longname>
+      <class>Source/File</class>
+      <description>Asynchronous read from VCD disk</description>
+      <author>Erik Walthinsen &lt;omega@cse.ogi.edu&gt;</author>
+      <pads>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>ANY</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-videofiltersbad.xml b/docs/plugins/inspect/plugin-videofiltersbad.xml
index e6ccfba..440475a 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
@@ -62,13 +62,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV, NV12, NV21, YV12 }, 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){ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV, NV12, NV21, YV12 }, 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-videoparsersbad.xml b/docs/plugins/inspect/plugin-videoparsersbad.xml
index 23965be..6cfaf94 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.4.5</version>
+  <version>1.5.91</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 c61f4a8..55cf21f 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.4.5</version>
+  <version>1.5.91</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 e11aded..7359223 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.4.5</version>
+  <version>1.5.91</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 d08683c..94dcce9 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -20,7 +20,7 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)[ 1, 2 ]</details>
+          <details>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)1; audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</details>
         </caps>
         <caps>
           <name>src</name>
diff --git a/docs/plugins/inspect/plugin-voamrwbenc.xml b/docs/plugins/inspect/plugin-voamrwbenc.xml
index 5bd740d..fa1160f 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.4.5</version>
+  <version>1.5.91</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 8e398c1..48ecfe6 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-webp.xml b/docs/plugins/inspect/plugin-webp.xml
index 25408ed..fe4a5b2 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -30,5 +30,26 @@
         </caps>
       </pads>
     </element>
+    <element>
+      <name>webpenc</name>
+      <longname>WEBP image encoder</longname>
+      <class>Codec/Encoder/Image</class>
+      <description>Encode images in WEBP format</description>
+      <author>Sreerenj Balachandran &lt;sreerenjb@gnome.org&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string){ I420, YV12, RGB, RGBA }, 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>image/webp, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 16, 16383 ], height=(int)[ 16, 16383 ]</details>
+        </caps>
+      </pads>
+    </element>
   </elements>
 </plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-wildmidi.xml b/docs/plugins/inspect/plugin-wildmidi.xml
index 3f93418..77659ef 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.4.5</version>
+  <version>1.5.91</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-x265.xml b/docs/plugins/inspect/plugin-x265.xml
new file mode 100644
index 0000000..d2cc3d6
--- /dev/null
+++ b/docs/plugins/inspect/plugin-x265.xml
@@ -0,0 +1,34 @@
+<plugin>
+  <name>x265</name>
+  <description>x265-based H265 plugins</description>
+  <filename>../../ext/x265/.libs/libgstx265.so</filename>
+  <basename>libgstx265.so</basename>
+  <version>1.5.91</version>
+  <license>GPL</license>
+  <source>gst-plugins-bad</source>
+  <package>GStreamer Bad Plug-ins source release</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>x265enc</name>
+      <longname>x265enc</longname>
+      <class>Codec/Encoder/Video</class>
+      <description>H265 Encoder</description>
+      <author>Thijs Vermeir &lt;thijs.vermeir@barco.com&gt;</author>
+      <pads>
+        <caps>
+          <name>sink</name>
+          <direction>sink</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string){ I420, Y444, I420_10LE, Y444_10LE }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 4, 2147483647 ], height=(int)[ 4, 2147483647 ]</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-h265, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 4, 2147483647 ], height=(int)[ 4, 2147483647 ], stream-format=(string){ avc, byte-stream }, alignment=(string)au, profile=(string){ main }</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-y4mdec.xml b/docs/plugins/inspect/plugin-y4mdec.xml
index 9ecdaf0..12ce424 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.4.5</version>
+  <version>1.5.91</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 617fc7b..d1a3b2b 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.4.5</version>
+  <version>1.5.91</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 6f7854b..37743d4 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.4.5</version>
+  <version>1.5.91</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -20,13 +20,13 @@
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, 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){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
diff --git a/ext/Makefile.am b/ext/Makefile.am
index 5701057..33ddba7 100644
--- a/ext/Makefile.am
+++ b/ext/Makefile.am
@@ -22,6 +22,12 @@
 AUDIOFILE_DIR=
 # endif
 
+if USE_BS2B
+BS2B_DIR=bs2b
+else
+BS2B_DIR=
+endif
+
 if USE_BZ2
 BZ2_DIR=bz2
 else
@@ -82,6 +88,18 @@
 GL_DIR=
 endif
 
+if USE_GTK3
+GTK3_DIR=gtk
+else
+GTK3_DIR=
+endif
+
+if USE_QT
+QT_DIR=qt
+else
+QT_DIR=
+endif
+
 if USE_RESINDVD
  RESINDVD_DIR = resindvd
 else
@@ -142,6 +160,12 @@
 LV2_DIR =
 endif
 
+if USE_LIBDE265
+LIBDE265_DIR = libde265
+else
+LIBDE265_DIR =
+endif
+
 # if USE_LIBFAME
 # LIBFAME_DIR=libfame
 # else
@@ -196,12 +220,6 @@
 MUSEPACK_DIR=
 endif
 
-if USE_MYTHTV
-MYTHTV_DIR=mythtv
-else
-MYTHTV_DIR=
-endif
-
 if USE_NAS
 NAS_DIR=nas
 else
@@ -238,6 +256,12 @@
 OPENEXR_DIR =
 endif
 
+if USE_OPENH264
+OPENH264_DIR = openh264
+else
+OPENH264_DIR =
+endif
+
 if USE_OPENNI2
 OPENNI2_DIR=openni2
 else
@@ -394,12 +418,25 @@
 WEBP_DIR=
 endif
 
+if USE_X265
+X265_DIR=x265
+else
+X265_DIR=
+endif
+
+if USE_DTLS
+DTLS_DIR=dtls
+else
+DTLS_DIR=
+endif
+
 SUBDIRS=\
 	$(VOAACENC_DIR) \
 	$(ASSRENDER_DIR) \
 	$(VOAMRWBENC_DIR) \
 	$(APEXSINK_DIR) \
 	$(AUDIOFILE_DIR) \
+	$(BS2B_DIR) \
 	$(BZ2_DIR) \
 	$(CHROMAPRINT_DIR) \
 	$(CURL_DIR) \
@@ -411,6 +448,8 @@
 	$(DTS_DIR) \
 	$(RESINDVD_DIR) \
 	$(GL_DIR) \
+	$(GTK3_DIR) \
+	$(QT_DIR) \
 	$(FAAC_DIR) \
 	$(FAAD_DIR) \
 	$(FLITE_DIR) \
@@ -421,6 +460,7 @@
 	$(KATE_DIR) \
 	$(LADSPA_DIR) \
 	$(LV2_DIR) \
+	$(LIBDE265_DIR) \
 	$(LIBFAME_DIR) \
 	$(LIBMMS_DIR) \
 	$(LIBVISUAL_DIR) \
@@ -430,13 +470,13 @@
 	$(MIMIC_DIR) \
 	$(MPLEX_DIR) \
 	$(MUSEPACK_DIR) \
-	$(MYTHTV_DIR) \
 	$(NAS_DIR) \
 	$(NEON_DIR) \
 	$(OFA_DIR) \
 	$(OPENAL_DIR) \
 	$(OPENCV_DIR) \
 	$(OPENEXR_DIR) \
+	$(OPENH264_DIR) \
 	$(OPENJPEG_DIR) \
 	$(OPENNI2_DIR) \
 	$(OPUS_DIR) \
@@ -459,11 +499,14 @@
 	$(ZBAR_DIR) \
 	$(RTMP_DIR) \
 	$(HLS_DIR) \
-	$(WEBP_DIR)
+	$(WEBP_DIR) \
+	$(X265_DIR) \
+	$(DTLS_DIR)
 
 DIST_SUBDIRS = \
 	assrender \
 	apexsink \
+	bs2b \
 	bz2 \
 	chromaprint \
 	curl \
@@ -480,25 +523,28 @@
 	hls \
 	ladspa \
 	kate \
+	libde265 \
 	libmms \
 	libvisual \
 	lv2 \
 	daala \
 	dts \
 	gl \
+	gtk \
+	qt \
 	modplug \
 	mimic \
 	mpeg2enc \
 	mpg123 \
 	mplex \
 	musepack \
-	mythtv \
 	nas \
 	neon \
 	ofa \
 	openal \
 	opencv \
 	openexr \
+	openh264 \
 	openni2 \
 	openjpeg \
 	opus \
@@ -522,6 +568,8 @@
 	xvid \
 	zbar \
 	rtmp \
-	webp
+	webp \
+	x265 \
+	dtls
 
 include $(top_srcdir)/common/parallel-subdirs.mak
diff --git a/ext/Makefile.in b/ext/Makefile.in
index b782b71..f143401 100644
--- a/ext/Makefile.in
+++ b/ext/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -19,7 +19,17 @@
 # descending into all subdirectories a second time, but only after the first
 # (parallel) run has finished, so it should go right through the second time.
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
 subdir = ext
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -93,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +115,6 @@
 	$(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 \
@@ -123,6 +131,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -181,6 +190,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/parallel-subdirs.mak
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,8 +234,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -249,8 +262,6 @@
 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@
@@ -263,7 +274,6 @@
 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@
@@ -271,6 +281,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -297,11 +309,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -320,8 +335,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -380,10 +393,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -400,7 +417,6 @@
 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@
@@ -409,7 +425,6 @@
 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@
@@ -422,7 +437,6 @@
 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@
@@ -436,6 +450,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -447,6 +462,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -485,6 +502,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -520,10 +538,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -549,6 +571,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -556,7 +581,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -585,6 +617,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -595,6 +628,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -625,17 +659,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -652,6 +685,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -690,6 +724,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -714,8 +749,10 @@
 # AUDIOFILE_DIR=audiofile
 # else
 AUDIOFILE_DIR = 
-@USE_BZ2_FALSE@BZ2_DIR = 
+@USE_BS2B_FALSE@BS2B_DIR = 
 # endif
+@USE_BS2B_TRUE@BS2B_DIR = bs2b
+@USE_BZ2_FALSE@BZ2_DIR = 
 @USE_BZ2_TRUE@BZ2_DIR = bz2
 @USE_CHROMAPRINT_FALSE@CHROMAPRINT_DIR = 
 @USE_CHROMAPRINT_TRUE@CHROMAPRINT_DIR = chromaprint
@@ -735,6 +772,10 @@
 @USE_DTS_TRUE@DTS_DIR = dts
 @USE_GL_FALSE@GL_DIR = 
 @USE_GL_TRUE@GL_DIR = gl
+@USE_GTK3_FALSE@GTK3_DIR = 
+@USE_GTK3_TRUE@GTK3_DIR = gtk
+@USE_QT_FALSE@QT_DIR = 
+@USE_QT_TRUE@QT_DIR = qt
 @USE_RESINDVD_FALSE@RESINDVD_DIR = 
 @USE_RESINDVD_TRUE@RESINDVD_DIR = resindvd
 @USE_FAAC_FALSE@FAAC_DIR = 
@@ -759,6 +800,8 @@
 @USE_LADSPA_TRUE@LADSPA_DIR = ladspa
 @USE_LV2_FALSE@LV2_DIR = 
 @USE_LV2_TRUE@LV2_DIR = lv2
+@USE_LIBDE265_FALSE@LIBDE265_DIR = 
+@USE_LIBDE265_TRUE@LIBDE265_DIR = libde265
 
 # if USE_LIBFAME
 # LIBFAME_DIR=libfame
@@ -781,8 +824,6 @@
 @USE_MPLEX_TRUE@MPLEX_DIR = mplex
 @USE_MUSEPACK_FALSE@MUSEPACK_DIR = 
 @USE_MUSEPACK_TRUE@MUSEPACK_DIR = musepack
-@USE_MYTHTV_FALSE@MYTHTV_DIR = 
-@USE_MYTHTV_TRUE@MYTHTV_DIR = mythtv
 @USE_NAS_FALSE@NAS_DIR = 
 @USE_NAS_TRUE@NAS_DIR = nas
 @USE_NEON_FALSE@NEON_DIR = 
@@ -795,6 +836,8 @@
 @USE_OPENCV_TRUE@OPENCV_DIR = opencv
 @USE_OPENEXR_FALSE@OPENEXR_DIR = 
 @USE_OPENEXR_TRUE@OPENEXR_DIR = openexr
+@USE_OPENH264_FALSE@OPENH264_DIR = 
+@USE_OPENH264_TRUE@OPENH264_DIR = openh264
 @USE_OPENNI2_FALSE@OPENNI2_DIR = 
 @USE_OPENNI2_TRUE@OPENNI2_DIR = openni2
 @USE_OPENJPEG_FALSE@OPENJPEG_DIR = 
@@ -849,12 +892,17 @@
 @USE_HLS_TRUE@HLS_DIR = hls
 @USE_WEBP_FALSE@WEBP_DIR = 
 @USE_WEBP_TRUE@WEBP_DIR = webp
+@USE_X265_FALSE@X265_DIR = 
+@USE_X265_TRUE@X265_DIR = x265
+@USE_DTLS_FALSE@DTLS_DIR = 
+@USE_DTLS_TRUE@DTLS_DIR = dtls
 SUBDIRS = \
 	$(VOAACENC_DIR) \
 	$(ASSRENDER_DIR) \
 	$(VOAMRWBENC_DIR) \
 	$(APEXSINK_DIR) \
 	$(AUDIOFILE_DIR) \
+	$(BS2B_DIR) \
 	$(BZ2_DIR) \
 	$(CHROMAPRINT_DIR) \
 	$(CURL_DIR) \
@@ -866,6 +914,8 @@
 	$(DTS_DIR) \
 	$(RESINDVD_DIR) \
 	$(GL_DIR) \
+	$(GTK3_DIR) \
+	$(QT_DIR) \
 	$(FAAC_DIR) \
 	$(FAAD_DIR) \
 	$(FLITE_DIR) \
@@ -876,6 +926,7 @@
 	$(KATE_DIR) \
 	$(LADSPA_DIR) \
 	$(LV2_DIR) \
+	$(LIBDE265_DIR) \
 	$(LIBFAME_DIR) \
 	$(LIBMMS_DIR) \
 	$(LIBVISUAL_DIR) \
@@ -885,13 +936,13 @@
 	$(MIMIC_DIR) \
 	$(MPLEX_DIR) \
 	$(MUSEPACK_DIR) \
-	$(MYTHTV_DIR) \
 	$(NAS_DIR) \
 	$(NEON_DIR) \
 	$(OFA_DIR) \
 	$(OPENAL_DIR) \
 	$(OPENCV_DIR) \
 	$(OPENEXR_DIR) \
+	$(OPENH264_DIR) \
 	$(OPENJPEG_DIR) \
 	$(OPENNI2_DIR) \
 	$(OPUS_DIR) \
@@ -914,11 +965,14 @@
 	$(ZBAR_DIR) \
 	$(RTMP_DIR) \
 	$(HLS_DIR) \
-	$(WEBP_DIR)
+	$(WEBP_DIR) \
+	$(X265_DIR) \
+	$(DTLS_DIR)
 
 DIST_SUBDIRS = \
 	assrender \
 	apexsink \
+	bs2b \
 	bz2 \
 	chromaprint \
 	curl \
@@ -935,25 +989,28 @@
 	hls \
 	ladspa \
 	kate \
+	libde265 \
 	libmms \
 	libvisual \
 	lv2 \
 	daala \
 	dts \
 	gl \
+	gtk \
+	qt \
 	modplug \
 	mimic \
 	mpeg2enc \
 	mpg123 \
 	mplex \
 	musepack \
-	mythtv \
 	nas \
 	neon \
 	ofa \
 	openal \
 	opencv \
 	openexr \
+	openh264 \
 	openni2 \
 	openjpeg \
 	opus \
@@ -977,7 +1034,9 @@
 	xvid \
 	zbar \
 	rtmp \
-	webp
+	webp \
+	x265 \
+	dtls
 
 all: all-recursive
 
@@ -994,7 +1053,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1003,7 +1061,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/parallel-subdirs.mak:
+$(top_srcdir)/common/parallel-subdirs.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1290,6 +1348,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 .PHONY: independent-subdirs $(SUBDIRS)
 
diff --git a/ext/apexsink/Makefile.in b/ext/apexsink/Makefile.in
index b9835fb..638bd88 100644
--- a/ext/apexsink/Makefile.in
+++ b/ext/apexsink/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/apexsink
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +790,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/apexsink/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/apexsink/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1080,6 +1114,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/apexsink/gstapexraop.c b/ext/apexsink/gstapexraop.c
index 0a78096..af4f573 100644
--- a/ext/apexsink/gstapexraop.c
+++ b/ext/apexsink/gstapexraop.c
@@ -252,7 +252,7 @@
   {
     struct asvals
     {
-      gulong url_key;
+      guint32 url_key;
       guint64 conn_id;
       guchar challenge[16];
     } v;
@@ -284,7 +284,7 @@
     return GST_RTSP_STS_DESTINATION_UNREACHABLE;
 
   RAND_bytes (randbuf.buf, sizeof (randbuf));
-  sprintf ((gchar *) conn->url_abspath, "%lu", randbuf.v.url_key);
+  sprintf ((gchar *) conn->url_abspath, "%u", randbuf.v.url_key);
   sprintf ((char *) conn->cid, "%16" G_GINT64_MODIFIER "x", randbuf.v.conn_id);
 
   RAND_bytes (conn->aes_ky, AES_BLOCK_SIZE);
diff --git a/ext/apexsink/gstapexsink.c b/ext/apexsink/gstapexsink.c
index d840ee0..c008e18 100644
--- a/ext/apexsink/gstapexsink.c
+++ b/ext/apexsink/gstapexsink.c
@@ -76,7 +76,7 @@
 gst_apexsink_jackstatus_get_type (void)
 {
   static GType jackstatus_type = 0;
-  static GEnumValue jackstatus[] = {
+  static const GEnumValue jackstatus[] = {
     {GST_APEX_JACK_STATUS_UNDEFINED, "GST_APEX_JACK_STATUS_UNDEFINED",
         "Jack status undefined"},
     {GST_APEX_JACK_STATUS_DISCONNECTED, "GST_APEX_JACK_STATUS_DISCONNECTED",
@@ -97,7 +97,7 @@
 gst_apexsink_jacktype_get_type (void)
 {
   static GType jacktype_type = 0;
-  static GEnumValue jacktype[] = {
+  static const GEnumValue jacktype[] = {
     {GST_APEX_JACK_TYPE_UNDEFINED, "GST_APEX_JACK_TYPE_UNDEFINED",
         "Undefined jack type"},
     {GST_APEX_JACK_TYPE_ANALOG, "GST_APEX_JACK_TYPE_ANALOG", "Analog jack"},
@@ -116,7 +116,7 @@
 gst_apexsink_generation_get_type (void)
 {
   static GType generation_type = 0;
-  static GEnumValue generation[] = {
+  static const GEnumValue generation[] = {
     {GST_APEX_GENERATION_ONE, "generation-one",
         "First generation (e.g., original AirPort Express)"},
     {GST_APEX_GENERATION_TWO, "generation-two",
@@ -135,7 +135,7 @@
 gst_apexsink_transport_protocol_get_type (void)
 {
   static GType transport_protocol_type = 0;
-  static GEnumValue transport_protocol[] = {
+  static const GEnumValue transport_protocol[] = {
     {GST_APEX_TCP, "tcp", "TCP"},
     {GST_APEX_UDP, "udp", "UDP"},
     {0, NULL, NULL},
diff --git a/ext/assrender/Makefile.in b/ext/assrender/Makefile.in
index 8a5d2e3..f87ef0d 100644
--- a/ext/assrender/Makefile.in
+++ b/ext/assrender/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/assrender
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/assrender/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/assrender/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c
index 5585bf7..2ff12e2 100644
--- a/ext/assrender/gstassrender.c
+++ b/ext/assrender/gstassrender.c
@@ -31,10 +31,6 @@
  * </refsect2>
  */
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
@@ -119,11 +115,14 @@
 G_DEFINE_TYPE (GstAssRender, gst_ass_render, GST_TYPE_ELEMENT);
 
 static GstCaps *gst_ass_render_get_videosink_caps (GstPad * pad,
-    GstCaps * filter);
-static GstCaps *gst_ass_render_get_src_caps (GstPad * pad, GstCaps * filter);
+    GstAssRender * render, GstCaps * filter);
+static GstCaps *gst_ass_render_get_src_caps (GstPad * pad,
+    GstAssRender * render, GstCaps * filter);
 
-static gboolean gst_ass_render_setcaps_video (GstPad * pad, GstCaps * caps);
-static gboolean gst_ass_render_setcaps_text (GstPad * pad, GstCaps * caps);
+static gboolean gst_ass_render_setcaps_video (GstPad * pad,
+    GstAssRender * render, GstCaps * caps);
+static gboolean gst_ass_render_setcaps_text (GstPad * pad,
+    GstAssRender * render, GstCaps * caps);
 
 static GstFlowReturn gst_ass_render_chain_video (GstPad * pad,
     GstObject * parent, GstBuffer * buf);
@@ -429,7 +428,7 @@
       GstCaps *filter, *caps;
 
       gst_query_parse_caps (query, &filter);
-      caps = gst_ass_render_get_src_caps (pad, filter);
+      caps = gst_ass_render_get_src_caps (pad, (GstAssRender *) parent, filter);
       gst_query_set_caps_result (query, caps);
       gst_caps_unref (caps);
       res = TRUE;
@@ -581,9 +580,9 @@
 }
 
 static GstCaps *
-gst_ass_render_get_videosink_caps (GstPad * pad, GstCaps * filter)
+gst_ass_render_get_videosink_caps (GstPad * pad, GstAssRender * render,
+    GstCaps * filter)
 {
-  GstAssRender *render = GST_ASS_RENDER (gst_pad_get_parent (pad));
   GstPad *srcpad = render->srcpad;
   GstCaps *peer_caps = NULL, *caps = NULL, *assrender_filter = NULL;
 
@@ -638,15 +637,13 @@
 
   GST_DEBUG_OBJECT (render, "returning  %" GST_PTR_FORMAT, caps);
 
-  gst_object_unref (render);
-
   return caps;
 }
 
 static GstCaps *
-gst_ass_render_get_src_caps (GstPad * pad, GstCaps * filter)
+gst_ass_render_get_src_caps (GstPad * pad, GstAssRender * render,
+    GstCaps * filter)
 {
-  GstAssRender *render = GST_ASS_RENDER (gst_pad_get_parent (pad));
   GstPad *sinkpad = render->video_sinkpad;
   GstCaps *peer_caps = NULL, *caps = NULL, *assrender_filter = NULL;
 
@@ -703,8 +700,6 @@
 
   GST_DEBUG_OBJECT (render, "returning  %" GST_PTR_FORMAT, caps);
 
-  gst_object_unref (render);
-
   return caps;
 }
 
@@ -784,9 +779,9 @@
 }
 
 static gboolean
-gst_ass_render_setcaps_video (GstPad * pad, GstCaps * caps)
+gst_ass_render_setcaps_video (GstPad * pad, GstAssRender * render,
+    GstCaps * caps)
 {
-  GstAssRender *render = GST_ASS_RENDER (gst_pad_get_parent (pad));
   GstQuery *query;
   gboolean ret = FALSE;
   gint par_n = 1, par_d = 1;
@@ -819,13 +814,8 @@
     overlay_caps = gst_caps_copy (caps);
 
     f = gst_caps_get_features (overlay_caps, 0);
-    if (f == NULL) {
-      f = gst_caps_features_new
-          (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
-    } else {
-      gst_caps_features_add (f,
-          GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
-    }
+    gst_caps_features_add (f,
+        GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
 
     ret = gst_pad_peer_query_accept_caps (render->srcpad, overlay_caps);
     GST_DEBUG_OBJECT (render, "Downstream accepts the overlay meta: %d", ret);
@@ -904,7 +894,6 @@
   GST_DEBUG_OBJECT (render, "ass renderer setup complete");
 
 out:
-  gst_object_unref (render);
 
   return ret;
 
@@ -924,9 +913,9 @@
 }
 
 static gboolean
-gst_ass_render_setcaps_text (GstPad * pad, GstCaps * caps)
+gst_ass_render_setcaps_text (GstPad * pad, GstAssRender * render,
+    GstCaps * caps)
 {
-  GstAssRender *render = GST_ASS_RENDER (gst_pad_get_parent (pad));
   GstStructure *structure;
   const GValue *value;
   GstBuffer *priv;
@@ -968,8 +957,6 @@
   }
   g_mutex_unlock (&render->ass_mutex);
 
-  gst_object_unref (render);
-
   return ret;
 }
 
@@ -1069,6 +1056,35 @@
   return composition;
 }
 
+static gboolean
+gst_ass_render_push_frame (GstAssRender * render, GstBuffer * video_frame)
+{
+  GstVideoFrame frame;
+
+  if (!render->composition)
+    goto done;
+
+  video_frame = gst_buffer_make_writable (video_frame);
+
+  if (render->attach_compo_to_buffer) {
+    gst_buffer_add_video_overlay_composition_meta (video_frame,
+        render->composition);
+    goto done;
+  }
+
+  if (!gst_video_frame_map (&frame, &render->info, video_frame,
+          GST_MAP_READWRITE)) {
+    GST_WARNING_OBJECT (render, "failed to map video frame for blending");
+    goto done;
+  }
+
+  gst_video_overlay_composition_blend (render->composition, &frame);
+  gst_video_frame_unmap (&frame);
+
+done:
+  return gst_pad_push (render->srcpad, video_frame);
+}
+
 static GstFlowReturn
 gst_ass_render_chain_video (GstPad * pad, GstObject * parent,
     GstBuffer * buffer)
@@ -1219,26 +1235,12 @@
         if (!render->composition)
           render->composition = gst_ass_render_composite_overlay (render,
               ass_image);
-
-        if (render->composition) {
-          buffer = gst_buffer_make_writable (buffer);
-          if (render->attach_compo_to_buffer) {
-            gst_buffer_add_video_overlay_composition_meta (buffer,
-                render->composition);
-          } else {
-            GstVideoFrame frame;
-
-            gst_video_frame_map (&frame, &render->info, buffer, GST_MAP_WRITE);
-            gst_video_overlay_composition_blend (render->composition, &frame);
-            gst_video_frame_unmap (&frame);
-          }
-        }
       } else {
         GST_DEBUG_OBJECT (render, "nothing to render right now");
       }
 
       /* Push the video frame */
-      ret = gst_pad_push (render->srcpad, buffer);
+      ret = gst_ass_render_push_frame (render, buffer);
 
       if (text_running_time_end <= vid_running_time_end) {
         GST_ASS_RENDER_LOCK (render);
@@ -1511,7 +1513,7 @@
       GstCaps *caps;
 
       gst_event_parse_caps (event, &caps);
-      ret = gst_ass_render_setcaps_video (pad, caps);
+      ret = gst_ass_render_setcaps_video (pad, render, caps);
       gst_event_unref (event);
       break;
     }
@@ -1595,7 +1597,9 @@
       GstCaps *filter, *caps;
 
       gst_query_parse_caps (query, &filter);
-      caps = gst_ass_render_get_videosink_caps (pad, filter);
+      caps =
+          gst_ass_render_get_videosink_caps (pad, (GstAssRender *) parent,
+          filter);
       gst_query_set_caps_result (query, caps);
       gst_caps_unref (caps);
       res = TRUE;
@@ -1624,7 +1628,7 @@
       GstCaps *caps;
 
       gst_event_parse_caps (event, &caps);
-      ret = gst_ass_render_setcaps_text (pad, caps);
+      ret = gst_ass_render_setcaps_text (pad, render, caps);
       gst_event_unref (event);
       break;
     }
diff --git a/ext/bs2b/Makefile.am b/ext/bs2b/Makefile.am
new file mode 100644
index 0000000..8516ec9
--- /dev/null
+++ b/ext/bs2b/Makefile.am
@@ -0,0 +1,15 @@
+plugin_LTLIBRARIES = libgstbs2b.la
+
+libgstbs2b_la_SOURCES = gstbs2b.c gstbs2b.h
+
+libgstbs2b_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
+	$(BS2B_CFLAGS)
+libgstbs2b_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) \
+	$(BS2B_LIBS)
+libgstbs2b_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstbs2b_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = gstbs2b.h
diff --git a/ext/mythtv/Makefile.in b/ext/bs2b/Makefile.in
similarity index 88%
copy from ext/mythtv/Makefile.in
copy to ext/bs2b/Makefile.in
index 055754c..a583695 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/bs2b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/bs2b
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,18 +164,19 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstbs2b_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+am_libgstbs2b_la_OBJECTS = libgstbs2b_la-gstbs2b.lo
+libgstbs2b_la_OBJECTS = $(am_libgstbs2b_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstbs2b_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstbs2b_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstbs2b_la_CFLAGS) $(CFLAGS) \
+	$(libgstbs2b_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
@@ -200,8 +211,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(libgstbs2b_la_SOURCES)
+DIST_SOURCES = $(libgstbs2b_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +284,6 @@
 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@
@@ -284,7 +296,6 @@
 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@
@@ -292,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +439,6 @@
 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@
@@ -430,7 +447,6 @@
 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@
@@ -443,7 +459,6 @@
 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@
@@ -457,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,25 +760,20 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+plugin_LTLIBRARIES = libgstbs2b.la
+libgstbs2b_la_SOURCES = gstbs2b.c gstbs2b.h
+libgstbs2b_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
+	$(BS2B_CFLAGS)
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+libgstbs2b_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) \
+	$(BS2B_LIBS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
-
+libgstbs2b_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstbs2b_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+noinst_HEADERS = gstbs2b.h
 all: all-am
 
 .SUFFIXES:
@@ -756,10 +787,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/bs2b/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/bs2b/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -813,8 +843,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libgstbs2b.la: $(libgstbs2b_la_OBJECTS) $(libgstbs2b_la_DEPENDENCIES) $(EXTRA_libgstbs2b_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstbs2b_la_LINK) -rpath $(plugindir) $(libgstbs2b_la_OBJECTS) $(libgstbs2b_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +852,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbs2b_la-gstbs2b.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +878,12 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+libgstbs2b_la-gstbs2b.lo: gstbs2b.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstbs2b_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbs2b_la_CFLAGS) $(CFLAGS) -MT libgstbs2b_la-gstbs2b.lo -MD -MP -MF $(DEPDIR)/libgstbs2b_la-gstbs2b.Tpo -c -o libgstbs2b_la-gstbs2b.lo `test -f 'gstbs2b.c' || echo '$(srcdir)/'`gstbs2b.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbs2b_la-gstbs2b.Tpo $(DEPDIR)/libgstbs2b_la-gstbs2b.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstbs2b.c' object='libgstbs2b_la-gstbs2b.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstbs2b_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbs2b_la_CFLAGS) $(CFLAGS) -c -o libgstbs2b_la-gstbs2b.lo `test -f 'gstbs2b.c' || echo '$(srcdir)/'`gstbs2b.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1068,6 +1098,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/bs2b/gstbs2b.c b/ext/bs2b/gstbs2b.c
new file mode 100644
index 0000000..dd29983
--- /dev/null
+++ b/ext/bs2b/gstbs2b.c
@@ -0,0 +1,421 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ * Copyright (C) <2011,2014> Christoph Reiter <reiter.christoph@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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * SECTION:element-bs2b
+ *
+ * Improve headphone listening of stereo audio records using the bs2b library. 
+ * It does so by mixing the left and right channel in a way that simulates
+ * a stereo speaker setup while using headphones.
+ *
+ * <refsect2>
+ * <title>Example pipelines</title>
+ * |[
+ * gst-launch-1.0 audiotestsrc ! "audio/x-raw,channel-mask=(bitmask)0x1" ! interleave name=i ! bs2b ! autoaudiosink audiotestsrc freq=330 ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.
+ * ]| Play two independent sine test sources and crossfeed them.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <gst/audio/audio.h>
+#include <gst/audio/gstaudiofilter.h>
+
+#include "gstbs2b.h"
+
+#define GST_BS2B_DP_LOCK(obj) g_mutex_lock (&obj->bs2b_lock)
+#define GST_BS2B_DP_UNLOCK(obj) g_mutex_unlock (&obj->bs2b_lock)
+
+#define SUPPORTED_FORMAT \
+  "(string) { S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, " \
+  "U32BE, S24LE, S24BE, U24LE, U24BE, F32LE, F32BE, F64LE, F64BE }"
+
+#define SUPPORTED_RATE \
+  "(int) [ " G_STRINGIFY (BS2B_MINSRATE) ", " G_STRINGIFY (BS2B_MAXSRATE) " ]"
+
+#define FRONT_L_FRONT_R "(bitmask) 0x3"
+
+#define PAD_CAPS \
+  "audio/x-raw, "                          \
+  "format = " SUPPORTED_FORMAT ", "        \
+  "rate = " SUPPORTED_RATE ", "            \
+  "channels = (int) 2, "                   \
+  "channel-mask = " FRONT_L_FRONT_R ", "   \
+  "layout = (string) interleaved"          \
+  "; "                                     \
+  "audio/x-raw, "                          \
+  "channels = (int) 1"                     \
+
+enum
+{
+  PROP_FCUT = 1,
+  PROP_FEED,
+  PROP_LAST,
+};
+
+static GParamSpec *properties[PROP_LAST];
+
+typedef struct
+{
+  const gchar *name;
+  const gchar *desc;
+  gint preset;
+} GstBs2bPreset;
+
+static const GstBs2bPreset presets[3] = {
+  {
+        "default",
+        "Closest to virtual speaker placement (30°, 3 meter) [700Hz, 4.5dB]",
+      BS2B_DEFAULT_CLEVEL},
+  {
+        "cmoy",
+        "Close to Chu Moy's crossfeeder (popular) [700Hz, 6.0dB]",
+      BS2B_CMOY_CLEVEL},
+  {
+        "jmeier",
+        "Close to Jan Meier's CORDA amplifiers (little change) [650Hz, 9.0dB]",
+      BS2B_JMEIER_CLEVEL}
+};
+
+static void gst_preset_interface_init (gpointer g_iface, gpointer iface_data);
+
+G_DEFINE_TYPE_WITH_CODE (GstBs2b, gst_bs2b, GST_TYPE_AUDIO_FILTER,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, gst_preset_interface_init));
+
+static void gst_bs2b_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_bs2b_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_bs2b_finalize (GObject * object);
+
+static GstFlowReturn gst_bs2b_transform_inplace (GstBaseTransform *
+    base_transform, GstBuffer * buffer);
+static gboolean gst_bs2b_setup (GstAudioFilter * self,
+    const GstAudioInfo * audio_info);
+
+static gchar **
+gst_bs2b_get_preset_names (GstPreset * preset)
+{
+  gchar **names;
+  gint i;
+
+  names = g_new (gchar *, 1 + G_N_ELEMENTS (presets));
+  for (i = 0; i < G_N_ELEMENTS (presets); i++) {
+    names[i] = g_strdup (presets[i].name);
+  }
+  names[i] = NULL;
+  return names;
+}
+
+static gchar **
+gst_bs2b_get_property_names (GstPreset * preset)
+{
+  gchar **names = g_new (gchar *, 3);
+
+  names[0] = g_strdup ("fcut");
+  names[1] = g_strdup ("feed");
+  names[2] = NULL;
+  return names;
+}
+
+static gboolean
+gst_bs2b_load_preset (GstPreset * preset, const gchar * name)
+{
+  GstBs2b *element = GST_BS2B (preset);
+  GObject *object = (GObject *) preset;
+  gint i;
+
+  for (i = 0; i < G_N_ELEMENTS (presets); i++) {
+    if (!g_strcmp0 (presets[i].name, name)) {
+      bs2b_set_level (element->bs2bdp, presets[i].preset);
+      g_object_notify_by_pspec (object, properties[PROP_FCUT]);
+      g_object_notify_by_pspec (object, properties[PROP_FEED]);
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+static gboolean
+gst_bs2b_get_meta (GstPreset * preset, const gchar * name,
+    const gchar * tag, gchar ** value)
+{
+  if (!g_strcmp0 (tag, "comment")) {
+    gint i;
+
+    for (i = 0; i < G_N_ELEMENTS (presets); i++) {
+      if (!g_strcmp0 (presets[i].name, name)) {
+        *value = g_strdup (presets[i].desc);
+        return TRUE;
+      }
+    }
+  }
+  *value = NULL;
+  return FALSE;
+}
+
+static void
+gst_preset_interface_init (gpointer g_iface, gpointer iface_data)
+{
+  GstPresetInterface *iface = g_iface;
+
+  iface->get_preset_names = gst_bs2b_get_preset_names;
+  iface->get_property_names = gst_bs2b_get_property_names;
+
+  iface->load_preset = gst_bs2b_load_preset;
+  iface->save_preset = NULL;
+  iface->rename_preset = NULL;
+  iface->delete_preset = NULL;
+
+  iface->get_meta = gst_bs2b_get_meta;
+  iface->set_meta = NULL;
+}
+
+static void
+gst_bs2b_class_init (GstBs2bClass * klass)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
+  GstAudioFilterClass *filter_class = GST_AUDIO_FILTER_CLASS (klass);
+  GstCaps *caps;
+
+  gobject_class->set_property = gst_bs2b_set_property;
+  gobject_class->get_property = gst_bs2b_get_property;
+  gobject_class->finalize = gst_bs2b_finalize;
+
+  trans_class->transform_ip = gst_bs2b_transform_inplace;
+  trans_class->transform_ip_on_passthrough = FALSE;
+
+  filter_class->setup = gst_bs2b_setup;
+
+  properties[PROP_FCUT] = g_param_spec_int ("fcut", "Frequency cut",
+      "Low-pass filter cut frequency (Hz)",
+      BS2B_MINFCUT, BS2B_MAXFCUT, BS2B_DEFAULT_CLEVEL & 0xFFFF,
+      G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_FEED] =
+      g_param_spec_int ("feed", "Feed level", "Feed Level (dB/10)",
+      BS2B_MINFEED, BS2B_MAXFEED, BS2B_DEFAULT_CLEVEL >> 16,
+      G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, PROP_LAST, properties);
+
+  gst_element_class_set_metadata (element_class,
+      "Crossfeed effect",
+      "Filter/Effect/Audio",
+      "Improve headphone listening of stereo audio records using the bs2b "
+      "library.", "Christoph Reiter <reiter.christoph@gmail.com>");
+
+  caps = gst_caps_from_string (PAD_CAPS);
+  gst_audio_filter_class_add_pad_templates (filter_class, caps);
+  gst_caps_unref (caps);
+}
+
+static void
+gst_bs2b_init (GstBs2b * element)
+{
+  g_mutex_init (&element->bs2b_lock);
+  element->bs2bdp = bs2b_open ();
+}
+
+static gboolean
+gst_bs2b_setup (GstAudioFilter * filter, const GstAudioInfo * audio_info)
+{
+  GstBaseTransform *base_transform = GST_BASE_TRANSFORM (filter);
+  GstBs2b *element = GST_BS2B (filter);
+  gint channels = GST_AUDIO_INFO_CHANNELS (audio_info);
+
+  element->func = NULL;
+
+  if (channels == 1) {
+    gst_base_transform_set_passthrough (base_transform, TRUE);
+    return TRUE;
+  }
+
+  g_assert (channels == 2);
+  gst_base_transform_set_passthrough (base_transform, FALSE);
+
+  switch (GST_AUDIO_INFO_FORMAT (audio_info)) {
+    case GST_AUDIO_FORMAT_S8:
+      element->func = &bs2b_cross_feed_s8;
+      break;
+    case GST_AUDIO_FORMAT_U8:
+      element->func = &bs2b_cross_feed_u8;
+      break;
+    case GST_AUDIO_FORMAT_S16BE:
+      element->func = &bs2b_cross_feed_s16be;
+      break;
+    case GST_AUDIO_FORMAT_S16LE:
+      element->func = &bs2b_cross_feed_s16le;
+      break;
+    case GST_AUDIO_FORMAT_U16BE:
+      element->func = &bs2b_cross_feed_u16be;
+      break;
+    case GST_AUDIO_FORMAT_U16LE:
+      element->func = &bs2b_cross_feed_u16le;
+      break;
+    case GST_AUDIO_FORMAT_S24BE:
+      element->func = &bs2b_cross_feed_s24be;
+      break;
+    case GST_AUDIO_FORMAT_S24LE:
+      element->func = &bs2b_cross_feed_s24le;
+      break;
+    case GST_AUDIO_FORMAT_U24BE:
+      element->func = &bs2b_cross_feed_u24be;
+      break;
+    case GST_AUDIO_FORMAT_U24LE:
+      element->func = &bs2b_cross_feed_u24le;
+      break;
+    case GST_AUDIO_FORMAT_S32BE:
+      element->func = &bs2b_cross_feed_s32be;
+      break;
+    case GST_AUDIO_FORMAT_S32LE:
+      element->func = &bs2b_cross_feed_s32le;
+      break;
+    case GST_AUDIO_FORMAT_U32BE:
+      element->func = &bs2b_cross_feed_u32be;
+      break;
+    case GST_AUDIO_FORMAT_U32LE:
+      element->func = &bs2b_cross_feed_u32le;
+      break;
+    case GST_AUDIO_FORMAT_F32BE:
+      element->func = &bs2b_cross_feed_fbe;
+      break;
+    case GST_AUDIO_FORMAT_F32LE:
+      element->func = &bs2b_cross_feed_fle;
+      break;
+    case GST_AUDIO_FORMAT_F64BE:
+      element->func = &bs2b_cross_feed_dbe;
+      break;
+    case GST_AUDIO_FORMAT_F64LE:
+      element->func = &bs2b_cross_feed_dle;
+      break;
+    default:
+      return FALSE;
+  }
+
+  g_assert (element->func);
+  element->bytes_per_sample =
+      (GST_AUDIO_INFO_WIDTH (audio_info) * channels) / 8;
+
+  GST_BS2B_DP_LOCK (element);
+  bs2b_set_srate (element->bs2bdp, GST_AUDIO_INFO_RATE (audio_info));
+  GST_BS2B_DP_UNLOCK (element);
+
+  return TRUE;
+}
+
+static void
+gst_bs2b_finalize (GObject * object)
+{
+  GstBs2b *element = GST_BS2B (object);
+
+  bs2b_close (element->bs2bdp);
+  element->bs2bdp = NULL;
+
+  G_OBJECT_CLASS (gst_bs2b_parent_class)->finalize (object);
+}
+
+static GstFlowReturn
+gst_bs2b_transform_inplace (GstBaseTransform * base_transform,
+    GstBuffer * buffer)
+{
+  GstBs2b *element = GST_BS2B (base_transform);
+  GstMapInfo map_info;
+
+  if (!gst_buffer_map (buffer, &map_info, GST_MAP_READ | GST_MAP_WRITE))
+    return GST_FLOW_ERROR;
+
+  GST_BS2B_DP_LOCK (element);
+  if (GST_BUFFER_IS_DISCONT (buffer))
+    bs2b_clear (element->bs2bdp);
+  element->func (element->bs2bdp, map_info.data,
+      map_info.size / element->bytes_per_sample);
+  GST_BS2B_DP_UNLOCK (element);
+
+  gst_buffer_unmap (buffer, &map_info);
+
+  return GST_FLOW_OK;
+}
+
+static void
+gst_bs2b_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstBs2b *element = GST_BS2B (object);
+
+  switch (prop_id) {
+    case PROP_FCUT:
+      GST_BS2B_DP_LOCK (element);
+      bs2b_set_level_fcut (element->bs2bdp, g_value_get_int (value));
+      bs2b_clear (element->bs2bdp);
+      GST_BS2B_DP_UNLOCK (element);
+      break;
+    case PROP_FEED:
+      GST_BS2B_DP_LOCK (element);
+      bs2b_set_level_feed (element->bs2bdp, g_value_get_int (value));
+      bs2b_clear (element->bs2bdp);
+      GST_BS2B_DP_UNLOCK (element);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_bs2b_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstBs2b *element = GST_BS2B (object);
+
+  switch (prop_id) {
+    case PROP_FCUT:
+      GST_BS2B_DP_LOCK (element);
+      g_value_set_int (value, bs2b_get_level_fcut (element->bs2bdp));
+      GST_BS2B_DP_UNLOCK (element);
+      break;
+    case PROP_FEED:
+      GST_BS2B_DP_LOCK (element);
+      g_value_set_int (value, bs2b_get_level_feed (element->bs2bdp));
+      GST_BS2B_DP_UNLOCK (element);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  return gst_element_register (plugin, "bs2b", GST_RANK_NONE, GST_TYPE_BS2B);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    bs2b,
+    "Improve headphone listening of stereo audio records"
+    "using the bs2b library.",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/bs2b/gstbs2b.h b/ext/bs2b/gstbs2b.h
new file mode 100644
index 0000000..8ec7f14
--- /dev/null
+++ b/ext/bs2b/gstbs2b.h
@@ -0,0 +1,63 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ * Copyright (C) <2011,2014> Christoph Reiter <reiter.christoph@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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __GST_BS2B_H__
+#define __GST_BS2B_H__
+
+#include <gst/gst.h>
+#include <gst/audio/audio.h>
+#include <gst/audio/gstaudiofilter.h>
+#include <bs2b/bs2b.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_BS2B \
+  (gst_bs2b_get_type())
+#define GST_BS2B(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BS2B,GstBs2b))
+#define GST_BS2B_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BS2B,GstBs2bClass))
+#define GST_IS_BS2B(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BS2B))
+#define GST_IS_BS2B_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BS2B))
+typedef struct _GstBs2b GstBs2b;
+typedef struct _GstBs2bClass GstBs2bClass;
+
+
+struct _GstBs2b
+{
+  GstAudioFilter element;
+
+  /*< private > */
+  GMutex bs2b_lock;
+  t_bs2bdp bs2bdp;
+  void (*func) ();
+  guint bytes_per_sample;
+};
+
+struct _GstBs2bClass
+{
+  GstAudioFilterClass parent_class;
+};
+
+GType gst_bs2b_get_type (void);
+
+G_END_DECLS
+#endif /* __GST_BS2B_H__ */
diff --git a/ext/bz2/Makefile.in b/ext/bz2/Makefile.in
index b973dc5..9f122b8 100644
--- a/ext/bz2/Makefile.in
+++ b/ext/bz2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/bz2
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/bz2/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/bz2/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1077,6 +1111,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/chromaprint/Makefile.in b/ext/chromaprint/Makefile.in
index b9513b5..f7944fd 100644
--- a/ext/chromaprint/Makefile.in
+++ b/ext/chromaprint/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/chromaprint
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +791,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/chromaprint/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/chromaprint/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1065,6 +1099,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/curl/Makefile.in b/ext/curl/Makefile.in
index 807b03b..0bf6c9b 100644
--- a/ext/curl/Makefile.in
+++ b/ext/curl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/curl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -241,6 +251,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -258,8 +269,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -284,8 +297,6 @@
 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@
@@ -298,7 +309,6 @@
 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@
@@ -306,6 +316,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -332,11 +344,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -355,8 +370,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -415,10 +428,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -435,7 +452,6 @@
 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@
@@ -444,7 +460,6 @@
 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@
@@ -457,7 +472,6 @@
 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@
@@ -471,6 +485,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -482,6 +497,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -520,6 +537,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -555,10 +573,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -584,6 +606,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -591,7 +616,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -620,6 +652,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -630,6 +663,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -660,17 +694,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -687,6 +720,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -725,6 +759,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -792,7 +827,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/curl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/curl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1165,6 +1199,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/curl/gstcurlbasesink.c b/ext/curl/gstcurlbasesink.c
index 12ee0f3..b47f246 100644
--- a/ext/curl/gstcurlbasesink.c
+++ b/ext/curl/gstcurlbasesink.c
@@ -124,6 +124,10 @@
     size_t nmemb, void *stream);
 static size_t gst_curl_base_sink_transfer_data_buffer (GstCurlBaseSink * sink,
     void *curl_ptr, size_t block_size, guint * last_chunk);
+#ifndef GST_DISABLE_GST_DEBUG
+static int gst_curl_base_sink_debug_cb (CURL * handle, curl_infotype type,
+    char *data, size_t size, void *clientp);
+#endif
 static int gst_curl_base_sink_transfer_socket_cb (void *clientp,
     curl_socket_t curlfd, curlsocktype purpose);
 static gpointer gst_curl_base_sink_transfer_thread_func (gpointer data);
@@ -445,6 +449,8 @@
     return FALSE;
   }
 
+  gst_poll_fd_init (&sink->fd);
+
   return TRUE;
 }
 
@@ -609,13 +615,26 @@
   GstCurlBaseSinkClass *klass = GST_CURL_BASE_SINK_GET_CLASS (sink);
   CURLcode res;
 
-#ifdef DEBUG
+#ifndef GST_DISABLE_GST_DEBUG
   res = curl_easy_setopt (sink->curl, CURLOPT_VERBOSE, 1);
   if (res != CURLE_OK) {
     sink->error = g_strdup_printf ("failed to set verbose: %s",
         curl_easy_strerror (res));
     return FALSE;
   }
+  res = curl_easy_setopt (sink->curl, CURLOPT_DEBUGDATA, sink);
+  if (res != CURLE_OK) {
+    sink->error = g_strdup_printf ("failed to set debug user_data: %s",
+        curl_easy_strerror (res));
+    return FALSE;
+  }
+  res = curl_easy_setopt (sink->curl, CURLOPT_DEBUGFUNCTION,
+      gst_curl_base_sink_debug_cb);
+  if (res != CURLE_OK) {
+    sink->error = g_strdup_printf ("failed to set debug functions: %s",
+        curl_easy_strerror (res));
+    return FALSE;
+  }
 #endif
 
   res = curl_easy_setopt (sink->curl, CURLOPT_URL, sink->url);
@@ -683,6 +702,7 @@
     return FALSE;
   }
 
+  GST_LOG ("common options set");
   return TRUE;
 }
 
@@ -747,7 +767,6 @@
     void *curl_ptr, size_t block_size, guint * last_chunk)
 {
   TransferBuffer *buffer;
-  size_t bytes_to_send;
 
   buffer = sink->transfer_buf;
   GST_LOG ("write buf len=%" G_GSIZE_FORMAT ", offset=%" G_GSIZE_FORMAT,
@@ -760,10 +779,7 @@
   }
 
   /* more data in buffer(s) */
-  bytes_to_send = transfer_data_buffer (curl_ptr, sink->transfer_buf,
-      block_size, last_chunk);
-
-  return bytes_to_send;
+  return transfer_data_buffer (curl_ptr, buffer, block_size, last_chunk);
 }
 
 static size_t
@@ -891,12 +907,15 @@
   timeout = sink->timeout;
   GST_OBJECT_UNLOCK (sink);
 
+  GST_DEBUG_OBJECT (sink, "handling transfers");
+
   /* Receiving CURLM_CALL_MULTI_PERFORM means that libcurl may have more data
      available to send or receive - call simply curl_multi_perform before
      poll() on more actions */
   do {
     m_code = curl_multi_perform (sink->multi_handle, &running_handles);
   } while (m_code == CURLM_CALL_MULTI_PERFORM);
+  GST_DEBUG_OBJECT (sink, "running handles: %d", running_handles);
 
   while (running_handles && (m_code == CURLM_OK)) {
     if (klass->transfer_prepare_poll_wait) {
@@ -934,6 +953,7 @@
     do {
       m_code = curl_multi_perform (sink->multi_handle, &running_handles);
     } while (m_code == CURLM_CALL_MULTI_PERFORM);
+    GST_DEBUG_OBJECT (sink, "running handles: %d", running_handles);
   }
 
   if (m_code != CURLM_OK) {
@@ -954,6 +974,18 @@
 
   gst_curl_base_sink_got_response_notify (sink);
 
+  GST_OBJECT_LOCK (sink);
+  if (sink->socket_type == CURLSOCKTYPE_ACCEPT) {
+    if (!gst_poll_remove_fd (sink->fdset, &sink->fd)) {
+      sink->error = g_strdup_printf ("failed to remove fd");
+      retval = GST_FLOW_ERROR;
+      GST_OBJECT_UNLOCK (sink);
+      goto fail;
+    }
+    sink->fd.fd = -1;
+  }
+  GST_OBJECT_UNLOCK (sink);
+
   return;
 
 fail:
@@ -965,11 +997,65 @@
   return;
 }
 
+#ifndef GST_DISABLE_GST_DEBUG
+static int
+gst_curl_base_sink_debug_cb (CURL * handle, curl_infotype type, char *data,
+    size_t size, void *clientp)
+{
+  GstCurlBaseSink *sink = (GstCurlBaseSink *) clientp;
+  gchar *msg = NULL;
+
+  switch (type) {
+    case CURLINFO_TEXT:
+    case CURLINFO_HEADER_IN:
+    case CURLINFO_HEADER_OUT:
+      msg = g_memdup (data, size);
+      if (size > 0) {
+        msg[size - 1] = '\0';
+        g_strchomp (msg);
+      }
+      break;
+    default:
+      break;
+  }
+
+  switch (type) {
+    case CURLINFO_TEXT:
+      GST_DEBUG_OBJECT (sink, "%s", msg);
+      break;
+    case CURLINFO_HEADER_IN:
+      GST_DEBUG_OBJECT (sink, "incoming header: %s", msg);
+      break;
+    case CURLINFO_HEADER_OUT:
+      GST_DEBUG_OBJECT (sink, "outgoing header: %s", msg);
+      break;
+    case CURLINFO_DATA_IN:
+      GST_MEMDUMP_OBJECT (sink, "incoming data", (guint8 *) data, size);
+      break;
+    case CURLINFO_DATA_OUT:
+      GST_MEMDUMP_OBJECT (sink, "outgoing data", (guint8 *) data, size);
+      break;
+    case CURLINFO_SSL_DATA_IN:
+      GST_MEMDUMP_OBJECT (sink, "incoming ssl data", (guint8 *) data, size);
+      break;
+    case CURLINFO_SSL_DATA_OUT:
+      GST_MEMDUMP_OBJECT (sink, "outgoing ssl data", (guint8 *) data, size);
+      break;
+    default:
+      GST_DEBUG_OBJECT (sink, "unknown debug info type %d", type);
+      GST_MEMDUMP_OBJECT (sink, "unknown data", (guint8 *) data, size);
+      break;
+  }
+  g_free (msg);
+  return 0;
+}
+#endif
+
 /* This function gets called by libcurl after the socket() call but before
  * the connect() call. */
 static int
 gst_curl_base_sink_transfer_socket_cb (void *clientp, curl_socket_t curlfd,
-    curlsocktype G_GNUC_UNUSED purpose)
+    curlsocktype socket_type)
 {
   GstCurlBaseSink *sink;
   gboolean ret = TRUE;
@@ -982,26 +1068,28 @@
     /* signal an unrecoverable error to the library which will close the socket
        and return CURLE_COULDNT_CONNECT
      */
+    GST_DEBUG_OBJECT (sink, "no curlfd");
     return 1;
   }
 
-  gst_poll_fd_init (&sink->fd);
-  sink->fd.fd = curlfd;
-
-  ret = ret && gst_poll_add_fd (sink->fdset, &sink->fd);
-  ret = ret && gst_poll_fd_ctl_write (sink->fdset, &sink->fd, TRUE);
-  ret = ret && gst_poll_fd_ctl_read (sink->fdset, &sink->fd, TRUE);
-  GST_DEBUG ("fd: %d", sink->fd.fd);
   GST_OBJECT_LOCK (sink);
+  sink->socket_type = socket_type;
+
+  if (sink->fd.fd != curlfd) {
+    if (sink->fd.fd > 0 && sink->socket_type != CURLSOCKTYPE_ACCEPT) {
+      ret &= gst_poll_remove_fd (sink->fdset, &sink->fd);
+    }
+    sink->fd.fd = curlfd;
+    ret &= gst_poll_add_fd (sink->fdset, &sink->fd);
+    ret &= gst_poll_fd_ctl_write (sink->fdset, &sink->fd, TRUE);
+    ret &= gst_poll_fd_ctl_read (sink->fdset, &sink->fd, TRUE);
+  }
+  GST_DEBUG_OBJECT (sink, "fd: %d", sink->fd.fd);
   gst_curl_base_sink_setup_dscp_unlocked (sink);
   GST_OBJECT_UNLOCK (sink);
 
   /* success */
-  if (ret) {
-    return 0;
-  } else {
-    return 1;
-  }
+  return ret ? 0 : 1;
 }
 
 static gboolean
@@ -1067,6 +1155,7 @@
     GST_OBJECT_UNLOCK (sink);
 
     if (data_available) {
+      GST_LOG ("have data");
       if (!gst_curl_base_sink_is_live (sink)) {
         /* prepare transfer if needed */
         if (klass->prepare_transfer) {
@@ -1077,6 +1166,7 @@
           }
           GST_OBJECT_UNLOCK (sink);
         }
+        GST_LOG ("adding handle");
         curl_multi_add_handle (sink->multi_handle, sink->curl);
       }
 
@@ -1086,8 +1176,11 @@
       /* easy handle will be possibly re-used for next transfer, thus it needs
        * to be removed from the multi stack and re-added again */
       if (!gst_curl_base_sink_is_live (sink)) {
+        GST_LOG ("removing handle");
         curl_multi_remove_handle (sink->multi_handle, sink->curl);
       }
+    } else {
+      GST_LOG ("have no data yet");
     }
 
     /* lock again before looping to check the thread closed flag */
@@ -1095,6 +1188,7 @@
   }
 
   if (sink->is_live) {
+    GST_LOG ("removing handle");
     curl_multi_remove_handle (sink->multi_handle, sink->curl);
   }
 
@@ -1134,7 +1228,9 @@
   }
 
   if (!gst_curl_base_sink_transfer_set_options_unlocked (sink)) {
-    sink->error = g_strdup ("failed to setup curl easy handle");
+    if (!sink->error) {
+      sink->error = g_strdup ("failed to setup curl easy handle");
+    }
     return FALSE;
   }
 
@@ -1146,6 +1242,7 @@
     }
   }
 
+  GST_LOG ("transfer setup done");
   return TRUE;
 }
 
diff --git a/ext/curl/gstcurlbasesink.h b/ext/curl/gstcurlbasesink.h
index 5105981..afa6d5b 100644
--- a/ext/curl/gstcurlbasesink.h
+++ b/ext/curl/gstcurlbasesink.h
@@ -67,6 +67,7 @@
   CURL *curl;
   GstPollFD fd;
   GstPoll *fdset;
+  curlsocktype socket_type;
   GThread *transfer_thread;
   gchar *error;
   GstFlowReturn flow_ret;
diff --git a/ext/curl/gstcurlhttpsink.c b/ext/curl/gstcurlhttpsink.c
index 6fa920a..3660f5b 100644
--- a/ext/curl/gstcurlhttpsink.c
+++ b/ext/curl/gstcurlhttpsink.c
@@ -352,10 +352,12 @@
 
 set_headers:
 
-  tmp = g_strdup_printf ("Content-Disposition: attachment; filename="
-      "\"%s\"", bcsink->file_name);
-  sink->header_list = curl_slist_append (sink->header_list, tmp);
-  g_free (tmp);
+  if (bcsink->file_name) {
+    tmp = g_strdup_printf ("Content-Disposition: attachment; filename="
+        "\"%s\"", bcsink->file_name);
+    sink->header_list = curl_slist_append (sink->header_list, tmp);
+    g_free (tmp);
+  }
   res = curl_easy_setopt (bcsink->curl, CURLOPT_HTTPHEADER, sink->header_list);
   if (res != CURLE_OK) {
     bcsink->error = g_strdup_printf ("failed to set HTTP headers: %s",
@@ -399,6 +401,7 @@
   parent_class = GST_CURL_TLS_SINK_GET_CLASS (sink);
 
   if (g_str_has_prefix (bcsink->url, "https://")) {
+    GST_DEBUG_OBJECT (bcsink, "setting up tls options");
     return parent_class->set_options_unlocked (bcsink);
   }
 
@@ -431,6 +434,7 @@
   if (!sink->proxy_conn_established
       && (sink->proxy_resp != RESPONSE_CONNECT_PROXY)
       && sink->proxy_auth) {
+    GST_DEBUG_OBJECT (sink, "prep transfers: connecting proxy");
     curl_easy_getinfo (bcsink->curl, CURLINFO_HTTP_CONNECTCODE,
         &sink->proxy_resp);
     if (sink->proxy_resp == RESPONSE_CONNECT_PROXY) {
diff --git a/ext/curl/gstcurlsmtpsink.c b/ext/curl/gstcurlsmtpsink.c
index c28213b..7de1ddf 100644
--- a/ext/curl/gstcurlsmtpsink.c
+++ b/ext/curl/gstcurlsmtpsink.c
@@ -204,17 +204,17 @@
       sink->eos = TRUE;
       GST_OBJECT_UNLOCK (sink);
 
-      if (sink->base64_chunk != NULL)
+      if (sink->base64_chunk != NULL && !sink->final_boundary_added) {
         add_final_boundary_unlocked (sink);
 
-      gst_curl_base_sink_transfer_thread_notify_unlocked (bcsink);
+        gst_curl_base_sink_transfer_thread_notify_unlocked (bcsink);
 
-      GST_OBJECT_LOCK (sink);
-      if (sink->base64_chunk != NULL && bcsink->flow_ret == GST_FLOW_OK) {
-        gst_curl_smtp_sink_wait_for_transfer_end_unlocked (sink);
+        GST_OBJECT_LOCK (sink);
+        if (sink->base64_chunk != NULL && bcsink->flow_ret == GST_FLOW_OK) {
+          gst_curl_smtp_sink_wait_for_transfer_end_unlocked (sink);
+        }
+        GST_OBJECT_UNLOCK (sink);
       }
-      GST_OBJECT_UNLOCK (sink);
-
       gst_curl_base_sink_transfer_thread_close (bcsink);
 
       break;
@@ -433,7 +433,7 @@
         break;
       case PROP_NBR_ATTACHMENTS:
         sink->nbr_attachments = g_value_get_int (value);
-        sink->nbr_attachments_left = sink->nbr_attachments;
+        sink->curr_attachment = 1;
         GST_DEBUG_OBJECT (sink, "nbr-attachments set to %d",
             sink->nbr_attachments);
         break;
@@ -773,18 +773,19 @@
   gchar *data_out;
 
   GST_DEBUG
-      ("live: %d, num attachments: %d, num attachments_left: %d, eos: %d, "
-      "close_transfer: %d, final boundary: %d, array_len: %d", bcsink->is_live,
-      sink->nbr_attachments, sink->nbr_attachments_left, sink->eos,
-      close_transfer, sink->final_boundary_added, array->len);
+      ("live: %d, num attachments: %d, curr_attachment: %d, "
+      "eos: %d, close_transfer: %d, final boundary: %d, array_len: %d",
+      bcsink->is_live, sink->nbr_attachments, sink->curr_attachment,
+      sink->eos, close_transfer, sink->final_boundary_added, array->len);
 
 
-  if ((bcsink->is_live && (sink->nbr_attachments_left == sink->nbr_attachments))
+  if ((bcsink->is_live && (sink->curr_attachment == sink->nbr_attachments))
       || (sink->nbr_attachments == 1) || sink->eos
       || sink->final_boundary_added) {
     bcsink->is_live = FALSE;
     sink->reset_transfer_options = TRUE;
     sink->final_boundary_added = FALSE;
+    sink->curr_attachment = 1;
 
     GST_DEBUG ("returning 0, no more data to send in this transfer");
 
@@ -806,12 +807,8 @@
   g_free (data_out);
 
   if (new_file) {
-    sink->nbr_attachments_left--;
-
+    sink->curr_attachment++;
     bcsink->is_live = TRUE;
-    if (sink->nbr_attachments_left <= 1) {
-      sink->nbr_attachments_left = sink->nbr_attachments;
-    }
 
     /* reset flag */
     bcsink->new_file = FALSE;
@@ -929,6 +926,16 @@
         transfer_chunk (curl_ptr, bcsink->transfer_buf, sink->base64_chunk,
         block_size, last_chunk);
 
+    /* if last chunk of current buffer and max attachments per mail is reached
+     * then add final boundary */
+    if (*last_chunk && sink->curr_attachment == sink->nbr_attachments &&
+        !sink->final_boundary_added) {
+      add_final_boundary_unlocked (sink);
+      /* now that we've added the final boundary to the array we have on more
+       * chunk to send */
+      *last_chunk = 0;
+    }
+
     GST_OBJECT_LOCK (sink);
     if (sink->eos) {
       gst_curl_smtp_sink_notify_transfer_end_unlocked (sink);
diff --git a/ext/curl/gstcurlsmtpsink.h b/ext/curl/gstcurlsmtpsink.h
index 94c3349..71c40e5 100644
--- a/ext/curl/gstcurlsmtpsink.h
+++ b/ext/curl/gstcurlsmtpsink.h
@@ -71,7 +71,7 @@
   gboolean transfer_end;
   GCond cond_transfer_end;
 
-  gint nbr_attachments_left;
+  gint curr_attachment;
   gboolean reset_transfer_options;
   gboolean final_boundary_added;
   gboolean eos;
diff --git a/ext/curl/gstcurlsshsink.c b/ext/curl/gstcurlsshsink.c
index 0959413..b06cbcd 100644
--- a/ext/curl/gstcurlsshsink.c
+++ b/ext/curl/gstcurlsshsink.c
@@ -179,7 +179,7 @@
 static void
 gst_curl_ssh_sink_init (GstCurlSshSink * sink)
 {
-  sink->ssh_auth_type = CURLSSH_AUTH_NONE;
+  sink->ssh_auth_type = GST_CURLSSH_AUTH_NONE;
   sink->ssh_pub_keyfile = NULL;
   sink->ssh_priv_keyfile = NULL;
   sink->ssh_key_passphrase = NULL;
@@ -373,8 +373,8 @@
 
   /* make sure we only accept PASSWORD or PUBLICKEY auth methods
    * (can be extended later) */
-  if (sink->ssh_auth_type == CURLSSH_AUTH_PASSWORD ||
-      sink->ssh_auth_type == CURLSSH_AUTH_PUBLICKEY) {
+  if (sink->ssh_auth_type == GST_CURLSSH_AUTH_PASSWORD ||
+      sink->ssh_auth_type == GST_CURLSSH_AUTH_PUBLICKEY) {
 
     /* set the SSH_AUTH_TYPE */
     if ((curl_err = curl_easy_setopt (bcsink->curl, CURLOPT_SSH_AUTH_TYPES,
@@ -385,7 +385,7 @@
     }
 
     /* if key authentication -> provide the private key passphrase as well */
-    if (sink->ssh_auth_type == CURLSSH_AUTH_PUBLICKEY) {
+    if (sink->ssh_auth_type == GST_CURLSSH_AUTH_PUBLICKEY) {
       if (sink->ssh_key_passphrase) {
         if ((curl_err = curl_easy_setopt (bcsink->curl, CURLOPT_KEYPASSWD,
                     sink->ssh_key_passphrase)) != CURLE_OK) {
@@ -416,16 +416,15 @@
     bcsink->error = g_strdup_printf ("failed to set SSH_KEYFUNCTION callback: "
         "%s", curl_easy_strerror (curl_err));
     return FALSE;
-  } else {
-    /* SSH_KEYFUNCTION callback successfully installed so go on and
-     * set the '*clientp' parameter as well */
-    if ((curl_err =
-            curl_easy_setopt (bcsink->curl, CURLOPT_SSH_KEYDATA,
-                sink)) != CURLE_OK) {
-      bcsink->error = g_strdup_printf ("failed to set CURLOPT_SSH_KEYDATA: %s",
-          curl_easy_strerror (curl_err));
-      return FALSE;
-    }
+  }
+  /* SSH_KEYFUNCTION callback successfully installed so go on and
+   * set the '*clientp' parameter as well */
+  if ((curl_err =
+          curl_easy_setopt (bcsink->curl, CURLOPT_SSH_KEYDATA,
+              sink)) != CURLE_OK) {
+    bcsink->error = g_strdup_printf ("failed to set CURLOPT_SSH_KEYDATA: %s",
+        curl_easy_strerror (curl_err));
+    return FALSE;
   }
 
   return TRUE;
diff --git a/ext/curl/gstcurlsshsink.h b/ext/curl/gstcurlsshsink.h
index 1b56c4d..376f1b1 100644
--- a/ext/curl/gstcurlsshsink.h
+++ b/ext/curl/gstcurlsshsink.h
@@ -38,9 +38,10 @@
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SSH_SINK))
 #define GST_IS_CURL_SSH_SINK_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SSH_SINK))
-/* see <curl/curl.h> */
-    typedef enum
+
+typedef enum
 {
+  /* Keep these in sync with the libcurl definitions. See <curl/curl.h> */
   GST_CURLSSH_AUTH_NONE = CURLSSH_AUTH_NONE,
   GST_CURLSSH_AUTH_PUBLICKEY = CURLSSH_AUTH_PUBLICKEY,
   GST_CURLSSH_AUTH_PASSWORD = CURLSSH_AUTH_PASSWORD
@@ -55,9 +56,10 @@
   GstCurlBaseSink parent;
 
   /*< private > */
-  guint ssh_auth_type;          /* for now, supporting only:
-                                   CURLSSH_AUTH_PASSWORD  (passwd auth) OR
-                                   CURLSSH_AUTH_PUBLICKEY (pub/pvt key auth) */
+  /* for now, supporting only:
+   * GST_CURLSSH_AUTH_PASSWORD (password authentication) and
+   * GST_CURLSSH_AUTH_PUBLICKEY (public key authentication) */
+  GstCurlSshAuthType ssh_auth_type;
 
   gchar *ssh_pub_keyfile;       /* filename for the public key:
                                    CURLOPT_SSH_PUBLIC_KEYFILE */
diff --git a/ext/curl/gstcurltlssink.c b/ext/curl/gstcurltlssink.c
index b6de969..35c1c1c 100644
--- a/ext/curl/gstcurltlssink.c
+++ b/ext/curl/gstcurltlssink.c
@@ -247,8 +247,8 @@
   }
 
   /* crypto engine */
-  if ((g_strcmp0 (sink->crypto_engine, "auto") == 0) ||
-      (sink->crypto_engine == NULL)) {
+  if ((sink->crypto_engine == NULL) ||
+      (strcmp (sink->crypto_engine, "auto") == 0)) {
     res = curl_easy_setopt (bcsink->curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
     if (res != CURLE_OK) {
       bcsink->error =
diff --git a/ext/daala/Makefile.in b/ext/daala/Makefile.in
index c5d8744..80412a3 100644
--- a/ext/daala/Makefile.in
+++ b/ext/daala/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/daala
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -761,7 +796,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/daala/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/daala/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1086,6 +1120,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/daala/gstdaaladec.c b/ext/daala/gstdaaladec.c
index 74302bf..0cf4f63 100644
--- a/ext/daala/gstdaaladec.c
+++ b/ext/daala/gstdaaladec.c
@@ -131,6 +131,9 @@
    * but is not marked that way so data gets parsed and keyframes marked */
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), FALSE);
   gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (dec), TRUE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
 }
 
 static void
diff --git a/ext/daala/gstdaalaenc.c b/ext/daala/gstdaalaenc.c
index 1aa2a78..77ab0b2 100644
--- a/ext/daala/gstdaalaenc.c
+++ b/ext/daala/gstdaalaenc.c
@@ -82,6 +82,8 @@
         "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")
     );
 
+static GstCaps *daala_supported_caps = NULL;
+
 #define gst_daala_enc_parent_class parent_class
 G_DEFINE_TYPE (GstDaalaEnc, gst_daala_enc, GST_TYPE_VIDEO_ENCODER);
 
@@ -97,6 +99,8 @@
 static GstFlowReturn daala_enc_finish (GstVideoEncoder * enc);
 static gboolean daala_enc_propose_allocation (GstVideoEncoder * encoder,
     GstQuery * query);
+static gboolean gst_daala_enc_sink_query (GstVideoEncoder * encoder,
+    GstQuery * query);
 
 static GstCaps *daala_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter);
 static void daala_enc_get_property (GObject * object, guint prop_id,
@@ -105,6 +109,85 @@
     const GValue * value, GParamSpec * pspec);
 static void daala_enc_finalize (GObject * object);
 
+static char *
+daala_enc_get_supported_formats (void)
+{
+  daala_enc_ctx *encoder;
+  daala_info info;
+  struct
+  {
+    GstVideoFormat fmt;
+    gint planes;
+    gint xdec[3], ydec[3];
+  } formats[] = {
+    {
+      GST_VIDEO_FORMAT_Y444, 3, {
+      0, 0, 0}, {
+    0, 0, 0}}, {
+      GST_VIDEO_FORMAT_I420, 3, {
+      0, 1, 1}, {
+    0, 1, 1}}
+  };
+  GString *string = NULL;
+  guint i;
+
+  daala_info_init (&info);
+  info.pic_width = 16;
+  info.pic_height = 16;
+  info.timebase_numerator = 25;
+  info.timebase_denominator = 1;
+  info.frame_duration = 1;
+  for (i = 0; i < G_N_ELEMENTS (formats); i++) {
+    gint j;
+
+    info.nplanes = formats[i].planes;
+    for (j = 0; j < formats[i].planes; j++) {
+      info.plane_info[j].xdec = formats[i].xdec[j];
+      info.plane_info[j].ydec = formats[i].ydec[j];
+    }
+
+    encoder = daala_encode_create (&info);
+    if (encoder == NULL)
+      continue;
+
+    GST_LOG ("format %s is supported",
+        gst_video_format_to_string (formats[i].fmt));
+    daala_encode_free (encoder);
+
+    if (string == NULL) {
+      string = g_string_new (gst_video_format_to_string (formats[i].fmt));
+    } else {
+      g_string_append (string, ", ");
+      g_string_append (string, gst_video_format_to_string (formats[i].fmt));
+    }
+  }
+  daala_info_clear (&info);
+
+  return string == NULL ? NULL : g_string_free (string, FALSE);
+}
+
+static void
+initialize_supported_caps (void)
+{
+  char *supported_formats, *caps_string;
+
+  supported_formats = daala_enc_get_supported_formats ();
+  if (!supported_formats) {
+    GST_WARNING ("no supported formats found. Encoder disabled?");
+    daala_supported_caps = gst_caps_new_empty ();
+  }
+
+  caps_string = g_strdup_printf ("video/x-raw, "
+      "format = (string) { %s }, "
+      "framerate = (fraction) [1/MAX, MAX], "
+      "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]",
+      supported_formats);
+  daala_supported_caps = gst_caps_from_string (caps_string);
+  g_free (caps_string);
+  g_free (supported_formats);
+  GST_DEBUG ("Supported caps: %" GST_PTR_FORMAT, daala_supported_caps);
+}
+
 static void
 gst_daala_enc_class_init (GstDaalaEncClass * klass)
 {
@@ -113,6 +196,8 @@
   GstVideoEncoderClass *gstvideo_encoder_class =
       GST_VIDEO_ENCODER_CLASS (klass);
 
+  GST_DEBUG_CATEGORY_INIT (daalaenc_debug, "daalaenc", 0, "Daala encoder");
+
   gobject_class->set_property = daala_enc_set_property;
   gobject_class->get_property = daala_enc_get_property;
   gobject_class->finalize = daala_enc_finalize;
@@ -145,10 +230,12 @@
   gstvideo_encoder_class->pre_push = GST_DEBUG_FUNCPTR (daala_enc_pre_push);
   gstvideo_encoder_class->finish = GST_DEBUG_FUNCPTR (daala_enc_finish);
   gstvideo_encoder_class->getcaps = GST_DEBUG_FUNCPTR (daala_enc_getcaps);
+  gstvideo_encoder_class->sink_query =
+      GST_DEBUG_FUNCPTR (gst_daala_enc_sink_query);
   gstvideo_encoder_class->propose_allocation =
       GST_DEBUG_FUNCPTR (daala_enc_propose_allocation);
 
-  GST_DEBUG_CATEGORY_INIT (daalaenc_debug, "daalaenc", 0, "Daala encoder");
+  initialize_supported_caps ();
 }
 
 static void
@@ -235,89 +322,35 @@
   return TRUE;
 }
 
-static char *
-daala_enc_get_supported_formats (void)
+static gboolean
+gst_daala_enc_sink_query (GstVideoEncoder * encoder, GstQuery * query)
 {
-  daala_enc_ctx *encoder;
-  daala_info info;
-  struct
-  {
-    GstVideoFormat fmt;
-    gint planes;
-    gint xdec[3], ydec[3];
-  } formats[] = {
-    {
-      GST_VIDEO_FORMAT_Y444, 3, {
-      0, 0, 0}, {
-    0, 0, 0}}, {
-      GST_VIDEO_FORMAT_I420, 3, {
-      0, 1, 1}, {
-    0, 1, 1}}
-  };
-  GString *string = NULL;
-  guint i;
+  gboolean res;
 
-  daala_info_init (&info);
-  info.pic_width = 16;
-  info.pic_height = 16;
-  info.timebase_numerator = 25;
-  info.timebase_denominator = 1;
-  info.frame_duration = 1;
-  for (i = 0; i < G_N_ELEMENTS (formats); i++) {
-    gint j;
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ACCEPT_CAPS:{
+      GstCaps *caps;
 
-    info.nplanes = formats[i].planes;
-    for (j = 0; j < formats[i].planes; j++) {
-      info.plane_info[j].xdec = formats[i].xdec[j];
-      info.plane_info[j].ydec = formats[i].ydec[j];
+      gst_query_parse_accept_caps (query, &caps);
+
+      gst_query_set_accept_caps_result (query,
+          gst_caps_is_subset (caps, daala_supported_caps));
+      res = TRUE;
     }
-
-    encoder = daala_encode_create (&info);
-    if (encoder == NULL)
-      continue;
-
-    GST_LOG ("format %s is supported",
-        gst_video_format_to_string (formats[i].fmt));
-    daala_encode_free (encoder);
-
-    if (string == NULL) {
-      string = g_string_new (gst_video_format_to_string (formats[i].fmt));
-    } else {
-      g_string_append (string, ", ");
-      g_string_append (string, gst_video_format_to_string (formats[i].fmt));
-    }
+      break;
+    default:
+      res = GST_VIDEO_ENCODER_CLASS (parent_class)->sink_query (encoder, query);
+      break;
   }
-  daala_info_clear (&info);
 
-  return string == NULL ? NULL : g_string_free (string, FALSE);
+  return res;
 }
 
 static GstCaps *
 daala_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter)
 {
-  GstCaps *caps, *ret;
-  char *supported_formats, *caps_string;
-
-  supported_formats = daala_enc_get_supported_formats ();
-  if (!supported_formats) {
-    GST_WARNING ("no supported formats found. Encoder disabled?");
-    return gst_caps_new_empty ();
-  }
-
-  caps_string = g_strdup_printf ("video/x-raw, "
-      "format = (string) { %s }, "
-      "framerate = (fraction) [1/MAX, MAX], "
-      "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]",
-      supported_formats);
-  caps = gst_caps_from_string (caps_string);
-  g_free (caps_string);
-  g_free (supported_formats);
-  GST_DEBUG ("Supported caps: %" GST_PTR_FORMAT, caps);
-
-  ret = gst_video_encoder_proxy_getcaps (encoder, caps, filter);
-  gst_caps_unref (caps);
-
-  return ret;
+  return gst_video_encoder_proxy_getcaps (encoder, daala_supported_caps,
+      filter);
 }
 
 static gboolean
diff --git a/ext/dash/Makefile.am b/ext/dash/Makefile.am
index 97d8623..38af4b7 100644
--- a/ext/dash/Makefile.am
+++ b/ext/dash/Makefile.am
@@ -4,19 +4,33 @@
 libgstdashdemux_la_SOURCES =			\
 	gstmpdparser.c				\
 	gstdashdemux.c				\
+	gstisoff.c				\
 	gstplugin.c
 
 # headers we need but don't want installed
 noinst_HEADERS =        \
         gstmpdparser.h	\
 	gstdashdemux.h	\
+	gstisoff.h	\
 	gstdash_debug.h
 
 # compiler and linker flags used to compile this plugin, set in configure.ac
-libgstdashdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(LIBXML2_CFLAGS)
+libgstdashdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GIO_CFLAGS) \
+	$(LIBXML2_CFLAGS)
 libgstdashdemux_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
-	$(GST_LIBS) $(GST_BASE_LIBS) $(LIBXML2_LIBS)
+	$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgsttag-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) \
+	$(GST_LIBS) \
+	$(GIO_LIBS) \
+	-lgstnet-$(GST_API_VERSION) \
+	$(LIBXML2_LIBS)
 libgstdashdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdashdemux_la_LIBTOOLFLAGS = --tag=disable-static
 
diff --git a/ext/dash/Makefile.in b/ext/dash/Makefile.in
index f8e1786..4607c4d 100644
--- a/ext/dash/Makefile.in
+++ b/ext/dash/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/dash
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -155,11 +165,13 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstdashdemux_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
 am_libgstdashdemux_la_OBJECTS = libgstdashdemux_la-gstmpdparser.lo \
 	libgstdashdemux_la-gstdashdemux.lo \
-	libgstdashdemux_la-gstplugin.lo
+	libgstdashdemux_la-gstisoff.lo libgstdashdemux_la-gstplugin.lo
 libgstdashdemux_la_OBJECTS = $(am_libgstdashdemux_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -230,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +288,6 @@
 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@
@@ -287,7 +300,6 @@
 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@
@@ -295,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +443,6 @@
 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@
@@ -433,7 +451,6 @@
 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@
@@ -446,7 +463,6 @@
 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@
@@ -460,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -731,6 +768,7 @@
 libgstdashdemux_la_SOURCES = \
 	gstmpdparser.c				\
 	gstdashdemux.c				\
+	gstisoff.c				\
 	gstplugin.c
 
 
@@ -738,14 +776,28 @@
 noinst_HEADERS = \
         gstmpdparser.h	\
 	gstdashdemux.h	\
+	gstisoff.h	\
 	gstdash_debug.h
 
 
 # compiler and linker flags used to compile this plugin, set in configure.ac
-libgstdashdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(LIBXML2_CFLAGS)
+libgstdashdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GIO_CFLAGS) \
+	$(LIBXML2_CFLAGS)
+
 libgstdashdemux_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
-	$(GST_LIBS) $(GST_BASE_LIBS) $(LIBXML2_LIBS)
+	$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgsttag-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) \
+	$(GST_LIBS) \
+	$(GIO_LIBS) \
+	-lgstnet-$(GST_API_VERSION) \
+	$(LIBXML2_LIBS)
 
 libgstdashdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdashdemux_la_LIBTOOLFLAGS = --tag=disable-static
@@ -765,7 +817,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/dash/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/dash/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -829,6 +880,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdashdemux_la-gstdashdemux.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdashdemux_la-gstisoff.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdashdemux_la-gstmpdparser.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdashdemux_la-gstplugin.Plo@am__quote@
 
@@ -870,6 +922,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 $(libgstdashdemux_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdashdemux_la_CFLAGS) $(CFLAGS) -c -o libgstdashdemux_la-gstdashdemux.lo `test -f 'gstdashdemux.c' || echo '$(srcdir)/'`gstdashdemux.c
 
+libgstdashdemux_la-gstisoff.lo: gstisoff.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdashdemux_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdashdemux_la_CFLAGS) $(CFLAGS) -MT libgstdashdemux_la-gstisoff.lo -MD -MP -MF $(DEPDIR)/libgstdashdemux_la-gstisoff.Tpo -c -o libgstdashdemux_la-gstisoff.lo `test -f 'gstisoff.c' || echo '$(srcdir)/'`gstisoff.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdashdemux_la-gstisoff.Tpo $(DEPDIR)/libgstdashdemux_la-gstisoff.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstisoff.c' object='libgstdashdemux_la-gstisoff.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 $(libgstdashdemux_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdashdemux_la_CFLAGS) $(CFLAGS) -c -o libgstdashdemux_la-gstisoff.lo `test -f 'gstisoff.c' || echo '$(srcdir)/'`gstisoff.c
+
 libgstdashdemux_la-gstplugin.lo: gstplugin.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdashdemux_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdashdemux_la_CFLAGS) $(CFLAGS) -MT libgstdashdemux_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libgstdashdemux_la-gstplugin.Tpo -c -o libgstdashdemux_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdashdemux_la-gstplugin.Tpo $(DEPDIR)/libgstdashdemux_la-gstplugin.Plo
@@ -1090,6 +1149,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/dash/README b/ext/dash/README
deleted file mode 100644
index 14734a6..0000000
--- a/ext/dash/README
+++ /dev/null
@@ -1,35 +0,0 @@
-dashdemux
-
-GStreamer plugin allowing the playback of MPEG DASH streams.
-
-The plugin is based on some basic objects defined in the GStreamer HLS
-Demux plugin from the gst-plugins-bad module.
-
-Minimum requirements:
-- glib 2.32.1
-- gstreamer 0.10.36
-- gst-plugins-base 0.10.36
-- gst-plugins-good 0.10.31
-- gst-plugins-bad 0.10.23
-
-The following patches need in addition to be applied:
-
-isomp4 (from gst-plugins-good):
-https://bugzilla.gnome.org/show_bug.cgi?id=677535
-https://bugzilla.gnome.org/show_bug.cgi?id=678767
-https://bugzilla.gnome.org/show_bug.cgi?id=678772
-
-decodebin2 (from gst-plugins-base):
-https://bugzilla.gnome.org/show_bug.cgi?id=685938
-
-To build gst-dashdemux:
-./autogen.sh
-./configure
-./make
-sudo make install
-
-To launch gst-dashdemux:
-
-gst-launch playbin2 uri=http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys13/redbull_4sec.mpd
- 
-gst-launch playbin2 uri=http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-main-multi/mp4-main-multi-mpd-AV-BS.mpd
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index 3f5c17c..f1b3091 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -4,7 +4,7 @@
  * gstdashdemux.c
  *
  * Copyright (C) 2012 Orange
- * 
+ *
  * Authors:
  *   David Corvoysier <david.corvoysier@orange.com>
  *   Hamid Zakari <hamid.zakari@gmail.com>
@@ -33,61 +33,61 @@
  * DASH demuxer element.
  * <title>Example launch line</title>
  * |[
- * gst-launch playbin2 uri="http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/RedBullPlayStreets/redbull_4s/RedBullPlayStreets_4s_isoffmain_DIS_23009_1_v_2_1c2_2011_08_30.mpd"
+ * gst-launch-1.0 playbin uri="http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/RedBullPlayStreets/redbull_4s/RedBullPlayStreets_4s_isoffmain_DIS_23009_1_v_2_1c2_2011_08_30.mpd"
  * ]|
  */
 
 /* Implementation notes:
- * 
+ *
  * The following section describes how dashdemux works internally.
- * 
+ *
  * Introduction:
- * 
+ *
  * dashdemux is a "fake" demux, as unlike traditional demux elements, it
  * doesn't split data streams contained in an enveloppe to expose them
  * to downstream decoding elements.
- * 
+ *
  * Instead, it parses an XML file called a manifest to identify a set of
  * individual stream fragments it needs to fetch and expose to the actual
- * demux elements that will handle them (this behavior is sometimes 
+ * demux elements that will handle them (this behavior is sometimes
  * referred as the "demux after a demux" scenario).
- * 
+ *
  * For a given section of content, several representations corresponding
  * to different bitrates may be available: dashdemux will select the most
- * appropriate representation based on local conditions (typically the 
+ * appropriate representation based on local conditions (typically the
  * available bandwidth and the amount of buffering available, capped by
- * a maximum allowed bitrate). 
- * 
+ * a maximum allowed bitrate).
+ *
  * The representation selection algorithm can be configured using
  * specific properties: max bitrate, min/max buffering, bandwidth ratio.
- * 
- * 
+ *
+ *
  * General Design:
- * 
- * dashdemux has a single sink pad that accepts the data corresponding 
+ *
+ * dashdemux has a single sink pad that accepts the data corresponding
  * to the manifest, typically fetched from an HTTP or file source.
- * 
+ *
  * dashdemux exposes the streams it recreates based on the fragments it
  * fetches through dedicated src pads corresponding to the caps of the
  * fragments container (ISOBMFF/MP4 or MPEG2TS).
- * 
+ *
  * During playback, new representations will typically be exposed as a
  * new set of pads (see 'Switching between representations' below).
- * 
+ *
  * Fragments downloading is performed using a dedicated task that fills
  * an internal queue. Another task is in charge of popping fragments
  * from the queue and pushing them downstream.
- * 
+ *
  * Switching between representations:
- * 
- * Decodebin supports scenarios allowing to seamlessly switch from one 
+ *
+ * Decodebin supports scenarios allowing to seamlessly switch from one
  * stream to another inside the same "decoding chain".
- * 
+ *
  * To achieve that, it combines the elements it autoplugged in chains
  *  and groups, allowing only one decoding group to be active at a given
  * time for a given chain.
  *
- * A chain can signal decodebin that it is complete by sending a 
+ * A chain can signal decodebin that it is complete by sending a
  * no-more-pads event, but even after that new pads can be added to
  * create new subgroups, providing that a new no-more-pads event is sent.
  *
@@ -96,7 +96,7 @@
  *
  * Typically, assuming that each fragment contains both audio and video,
  * the following tree would be created:
- * 
+ *
  * chain "DASH Demux"
  * |_ group "Representation set 1"
  * |   |_ chain "Qt Demux 0"
@@ -118,26 +118,26 @@
  * |   |       |_ chain "H264"
  * |   |_ chain "Qt Demux 1"
  * |       |_ group "Stream 1"
- * |           |_ chain "AAC" 
+ * |           |_ chain "AAC"
  * |_ group "Representation set 2"
  *     |_ chain "Qt Demux 3"
  *     |   |_ group "Stream 2"
  *     |       |_ chain "H264"
  *     |_ chain "Qt Demux 4"
  *         |_ group "Stream 3"
- *             |_ chain "AAC" 
+ *             |_ chain "AAC"
  *
  * In both cases, when switching from Set 1 to Set 2 an EOS is sent on
  * each end pad corresponding to Rep 0, triggering the "drain" state to
  * propagate upstream.
  * Once both EOS have been processed, the "Set 1" group is completely
  * drained, and decodebin2 will switch to the "Set 2" group.
- * 
- * Note: nothing can be pushed to the new decoding group before the 
- * old one has been drained, which means that in order to be able to 
+ *
+ * Note: nothing can be pushed to the new decoding group before the
+ * old one has been drained, which means that in order to be able to
  * adapt quickly to bandwidth changes, we will not be able to rely
  * on downstream buffering, and will instead manage an internal queue.
- * 
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -145,13 +145,24 @@
 #endif
 
 #include <string.h>
+#include <stdio.h>
 #include <inttypes.h>
+#include <gio/gio.h>
 #include <gst/base/gsttypefindhelper.h>
+#include <gst/tag/tag.h>
+#include <gst/net/gstnet.h>
 #include "gst/gst-i18n-plugin.h"
 #include "gstdashdemux.h"
 #include "gstdash_debug.h"
 
-static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",
+static GstStaticPadTemplate gst_dash_demux_videosrc_template =
+GST_STATIC_PAD_TEMPLATE ("video_%02u",
+    GST_PAD_SRC,
+    GST_PAD_SOMETIMES,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate gst_dash_demux_audiosrc_template =
+GST_STATIC_PAD_TEMPLATE ("audio_%02u",
     GST_PAD_SRC,
     GST_PAD_SOMETIMES,
     GST_STATIC_CAPS_ANY);
@@ -179,10 +190,24 @@
 #define DEFAULT_BANDWIDTH_USAGE         0.8     /* 0 to 1     */
 #define DEFAULT_MAX_BITRATE        24000000     /* in bit/s  */
 
-#define DEFAULT_FAILED_COUNT 3
+/* Clock drift compensation for live streams */
+#define SLOW_CLOCK_UPDATE_INTERVAL  (1000000 * 30 * 60) /* 30 minutes */
+#define FAST_CLOCK_UPDATE_INTERVAL  (1000000 * 30)      /* 30 seconds */
+#define SUPPORTED_CLOCK_FORMATS (GST_MPD_UTCTIMING_TYPE_NTP | GST_MPD_UTCTIMING_TYPE_HTTP_HEAD | GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE | GST_MPD_UTCTIMING_TYPE_HTTP_ISO | GST_MPD_UTCTIMING_TYPE_HTTP_NTP)
+#define NTP_TO_UNIX_EPOCH G_GUINT64_CONSTANT(2208988800)        /* difference (in seconds) between NTP epoch and Unix epoch */
 
-#define GST_DASH_DEMUX_CLIENT_LOCK(d) g_mutex_lock (&d->client_lock)
-#define GST_DASH_DEMUX_CLIENT_UNLOCK(d) g_mutex_unlock (&d->client_lock)
+struct _GstDashDemuxClockDrift
+{
+  GMutex clock_lock;            /* used to protect access to struct */
+  guint selected_url;
+  gint64 next_update;
+  GCond clock_cond;             /* used for waiting until got_clock==TRUE */
+  /* @clock_compensation: amount (in usecs) to add to client's idea of
+     now to map it to the server's idea of now */
+  GTimeSpan clock_compensation;
+  gboolean got_clock;           /* indicates time source has returned a valid clock at least once */
+  GstClock *ntp_clock;
+};
 
 /* GObject */
 static void gst_dash_demux_set_property (GObject * object, guint prop_id,
@@ -191,52 +216,65 @@
     GValue * value, GParamSpec * pspec);
 static void gst_dash_demux_dispose (GObject * obj);
 
-/* GstElement */
-static GstStateChangeReturn
-gst_dash_demux_change_state (GstElement * element, GstStateChange transition);
-
-/* GstBin */
-static void gst_dash_demux_handle_message (GstBin * bin, GstMessage * msg);
+/* GstAdaptiveDemux */
+static GstClockTime gst_dash_demux_get_duration (GstAdaptiveDemux * ademux);
+static gboolean gst_dash_demux_is_live (GstAdaptiveDemux * ademux);
+static void gst_dash_demux_reset (GstAdaptiveDemux * ademux);
+static gboolean gst_dash_demux_process_manifest (GstAdaptiveDemux * ademux,
+    GstBuffer * buf);
+static gboolean gst_dash_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek);
+static GstFlowReturn
+gst_dash_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream);
+static GstFlowReturn gst_dash_demux_stream_seek (GstAdaptiveDemuxStream *
+    stream, GstClockTime ts);
+static gboolean
+gst_dash_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream);
+static GstFlowReturn
+gst_dash_demux_stream_advance_fragment (GstAdaptiveDemuxStream * stream);
+static gboolean
+gst_dash_demux_stream_advance_subfragment (GstAdaptiveDemuxStream * stream);
+static gboolean gst_dash_demux_stream_select_bitrate (GstAdaptiveDemuxStream *
+    stream, guint64 bitrate);
+static gint64
+gst_dash_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
+static GstFlowReturn
+gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux, GstBuffer * buf);
+static gint64
+gst_dash_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream *
+    stream);
+static void gst_dash_demux_advance_period (GstAdaptiveDemux * demux);
+static gboolean gst_dash_demux_has_next_period (GstAdaptiveDemux * demux);
+static GstFlowReturn gst_dash_demux_data_received (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static GstFlowReturn
+gst_dash_demux_stream_fragment_finished (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
 
 /* GstDashDemux */
-static GstFlowReturn gst_dash_demux_pad (GstPad * pad, GstObject * parent,
-    GstBuffer * buf);
-static gboolean gst_dash_demux_sink_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_dash_demux_src_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_dash_demux_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query);
-static void gst_dash_demux_stream_download_loop (GstDashDemuxStream * stream);
-static void gst_dash_demux_stop (GstDashDemux * demux);
-static void gst_dash_demux_wait_stop (GstDashDemux * demux);
-static void gst_dash_demux_resume_download_task (GstDashDemux * demux);
 static gboolean gst_dash_demux_setup_all_streams (GstDashDemux * demux);
-static GstEvent
-    * gst_dash_demux_stream_select_representation_unlocked (GstDashDemuxStream *
-    stream);
-static GstFlowReturn gst_dash_demux_stream_get_next_fragment (GstDashDemuxStream
-    * stream, GstClockTime * ts);
-static gboolean gst_dash_demux_advance_period (GstDashDemux * demux);
-static void gst_dash_demux_download_wait (GstDashDemuxStream * stream,
-    GstClockTime time_diff);
-static void gst_dash_demux_stream_download_uri (GstDashDemux * demux,
-    GstDashDemuxStream * stream, const gchar * uri, gint64 start, gint64 end);
+static void gst_dash_demux_stream_free (GstAdaptiveDemuxStream * stream);
 
-static void gst_dash_demux_expose_streams (GstDashDemux * demux);
-static void gst_dash_demux_remove_streams (GstDashDemux * demux,
-    GSList * streams);
-static void gst_dash_demux_stream_free (GstDashDemuxStream * stream);
-static void gst_dash_demux_reset (GstDashDemux * demux, gboolean dispose);
 static GstCaps *gst_dash_demux_get_input_caps (GstDashDemux * demux,
     GstActiveStream * stream);
 static GstPad *gst_dash_demux_create_pad (GstDashDemux * demux,
-    GstDashDemuxStream * stream);
+    GstActiveStream * stream);
+static GstDashDemuxClockDrift *gst_dash_demux_clock_drift_new (void);
+static void gst_dash_demux_clock_drift_free (GstDashDemuxClockDrift *);
+static gboolean gst_dash_demux_poll_clock_drift (GstDashDemux * demux);
+static GTimeSpan gst_dash_demux_get_clock_compensation (GstDashDemux * demux);
+static GDateTime *gst_dash_demux_get_server_now_utc (GstDashDemux * demux);
+
+#define SIDX(s) (&(s)->sidx_parser.sidx)
+#define SIDX_ENTRY(s,i) (&(SIDX(s)->entries[(i)]))
+#define SIDX_CURRENT_ENTRY(s) SIDX_ENTRY(s, SIDX(s)->entry_index)
+
+static void gst_dash_demux_send_content_protection_event (gpointer cp_data,
+    gpointer stream);
 
 #define gst_dash_demux_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstDashDemux, gst_dash_demux, GST_TYPE_BIN,
+G_DEFINE_TYPE_WITH_CODE (GstDashDemux, gst_dash_demux, GST_TYPE_ADAPTIVE_DEMUX,
     GST_DEBUG_CATEGORY_INIT (gst_dash_demux_debug, "dashdemux", 0,
-        "dashdemux element");
+        "dashdemux element")
     );
 
 static void
@@ -244,46 +282,90 @@
 {
   GstDashDemux *demux = GST_DASH_DEMUX (obj);
 
-  gst_dash_demux_reset (demux, TRUE);
+  gst_dash_demux_reset (GST_ADAPTIVE_DEMUX_CAST (demux));
 
-  if (demux->downloader != NULL) {
-    g_object_unref (demux->downloader);
-    demux->downloader = NULL;
+  if (demux->client) {
+    gst_mpd_client_free (demux->client);
+    demux->client = NULL;
   }
 
   g_mutex_clear (&demux->client_lock);
 
+  gst_dash_demux_clock_drift_free (demux->clock_drift);
+  demux->clock_drift = NULL;
   G_OBJECT_CLASS (parent_class)->dispose (obj);
 }
 
+static gboolean
+gst_dash_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
+    gint64 * stop)
+{
+  GstDashDemux *self = GST_DASH_DEMUX (demux);
+  GDateTime *now = gst_dash_demux_get_server_now_utc (self);
+  GDateTime *mstart =
+      gst_date_time_to_g_date_time (self->client->
+      mpd_node->availabilityStartTime);
+  GTimeSpan stream_now;
+
+  stream_now = g_date_time_difference (now, mstart);
+  g_date_time_unref (now);
+  g_date_time_unref (mstart);
+  *stop = stream_now * GST_USECOND;
+
+  *start = *stop - (self->client->mpd_node->timeShiftBufferDepth * GST_MSECOND);
+  return TRUE;
+}
+
+static GstClockTime
+gst_dash_demux_get_presentation_offset (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+
+  return gst_mpd_parser_get_stream_presentation_offset (dashdemux->client,
+      dashstream->index);
+}
+
+static GstClockTime
+gst_dash_demux_get_period_start_time (GstAdaptiveDemux * demux)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+
+  return gst_mpd_parser_get_period_start_time (dashdemux->client);
+}
+
 static void
 gst_dash_demux_class_init (GstDashDemuxClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
-  GstBinClass *gstbin_class;
+  GstAdaptiveDemuxClass *gstadaptivedemux_class;
 
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
-  gstbin_class = (GstBinClass *) klass;
+  gstadaptivedemux_class = (GstAdaptiveDemuxClass *) klass;
 
   gobject_class->set_property = gst_dash_demux_set_property;
   gobject_class->get_property = gst_dash_demux_get_property;
   gobject_class->dispose = gst_dash_demux_dispose;
 
+#ifndef GST_REMOVE_DEPRECATED
   g_object_class_install_property (gobject_class, PROP_MAX_BUFFERING_TIME,
       g_param_spec_uint ("max-buffering-time", "Maximum buffering time",
           "Maximum number of seconds of buffer accumulated during playback"
           "(deprecated)",
           2, G_MAXUINT, DEFAULT_MAX_BUFFERING_TIME,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
 
   g_object_class_install_property (gobject_class, PROP_BANDWIDTH_USAGE,
       g_param_spec_float ("bandwidth-usage",
           "Bandwidth usage [0..1]",
-          "Percentage of the available bandwidth to use when selecting representations",
+          "Percentage of the available bandwidth to use when "
+          "selecting representations (deprecated)",
           0, 1, DEFAULT_BANDWIDTH_USAGE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#endif
 
   g_object_class_install_property (gobject_class, PROP_MAX_BITRATE,
       g_param_spec_uint ("max-bitrate", "Max bitrate",
@@ -291,11 +373,10 @@
           1000, G_MAXUINT, DEFAULT_MAX_BITRATE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_dash_demux_change_state);
-
   gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&srctemplate));
+      gst_static_pad_template_get (&gst_dash_demux_audiosrc_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_dash_demux_videosrc_template));
 
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&sinktemplate));
@@ -308,38 +389,62 @@
                 Hamid Zakari <hamid.zakari@gmail.com>\n\
                 Gianluca Gennari <gennarone@gmail.com>");
 
-  gstbin_class->handle_message = gst_dash_demux_handle_message;
+
+  gstadaptivedemux_class->get_duration = gst_dash_demux_get_duration;
+  gstadaptivedemux_class->is_live = gst_dash_demux_is_live;
+  gstadaptivedemux_class->reset = gst_dash_demux_reset;
+  gstadaptivedemux_class->seek = gst_dash_demux_seek;
+
+  gstadaptivedemux_class->process_manifest = gst_dash_demux_process_manifest;
+  gstadaptivedemux_class->update_manifest_data =
+      gst_dash_demux_update_manifest_data;
+  gstadaptivedemux_class->get_manifest_update_interval =
+      gst_dash_demux_get_manifest_update_interval;
+
+  gstadaptivedemux_class->has_next_period = gst_dash_demux_has_next_period;
+  gstadaptivedemux_class->advance_period = gst_dash_demux_advance_period;
+  gstadaptivedemux_class->stream_has_next_fragment =
+      gst_dash_demux_stream_has_next_fragment;
+  gstadaptivedemux_class->stream_advance_fragment =
+      gst_dash_demux_stream_advance_fragment;
+  gstadaptivedemux_class->stream_get_fragment_waiting_time =
+      gst_dash_demux_stream_get_fragment_waiting_time;
+  gstadaptivedemux_class->stream_seek = gst_dash_demux_stream_seek;
+  gstadaptivedemux_class->stream_select_bitrate =
+      gst_dash_demux_stream_select_bitrate;
+  gstadaptivedemux_class->stream_update_fragment_info =
+      gst_dash_demux_stream_update_fragment_info;
+  gstadaptivedemux_class->stream_free = gst_dash_demux_stream_free;
+  gstadaptivedemux_class->get_live_seek_range =
+      gst_dash_demux_get_live_seek_range;
+  gstadaptivedemux_class->get_presentation_offset =
+      gst_dash_demux_get_presentation_offset;
+  gstadaptivedemux_class->get_period_start_time =
+      gst_dash_demux_get_period_start_time;
+
+  gstadaptivedemux_class->finish_fragment =
+      gst_dash_demux_stream_fragment_finished;
+  gstadaptivedemux_class->data_received = gst_dash_demux_data_received;
 }
 
 static void
 gst_dash_demux_init (GstDashDemux * demux)
 {
-  /* sink pad */
-  demux->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
-  gst_pad_set_chain_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_dash_demux_pad));
-  gst_pad_set_event_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_dash_demux_sink_event));
-  gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
-
-  gst_segment_init (&demux->segment, GST_FORMAT_TIME);
-
-  /* Downloader */
-  demux->downloader = gst_uri_downloader_new ();
-
   /* Properties */
   demux->max_buffering_time = DEFAULT_MAX_BUFFERING_TIME * GST_SECOND;
-  demux->bandwidth_usage = DEFAULT_BANDWIDTH_USAGE;
   demux->max_bitrate = DEFAULT_MAX_BITRATE;
-  demux->last_manifest_update = GST_CLOCK_TIME_NONE;
 
   g_mutex_init (&demux->client_lock);
+
+  gst_adaptive_demux_set_stream_struct_size (GST_ADAPTIVE_DEMUX_CAST (demux),
+      sizeof (GstDashDemuxStream));
 }
 
 static void
 gst_dash_demux_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
+  GstAdaptiveDemux *adaptivedemux = GST_ADAPTIVE_DEMUX_CAST (object);
   GstDashDemux *demux = GST_DASH_DEMUX (object);
 
   switch (prop_id) {
@@ -347,7 +452,7 @@
       demux->max_buffering_time = g_value_get_uint (value) * GST_SECOND;
       break;
     case PROP_BANDWIDTH_USAGE:
-      demux->bandwidth_usage = g_value_get_float (value);
+      adaptivedemux->bitrate_limit = g_value_get_float (value);
       break;
     case PROP_MAX_BITRATE:
       demux->max_bitrate = g_value_get_uint (value);
@@ -362,6 +467,7 @@
 gst_dash_demux_get_property (GObject * object, guint prop_id, GValue * value,
     GParamSpec * pspec)
 {
+  GstAdaptiveDemux *adaptivedemux = GST_ADAPTIVE_DEMUX_CAST (object);
   GstDashDemux *demux = GST_DASH_DEMUX (object);
 
   switch (prop_id) {
@@ -369,7 +475,7 @@
       g_value_set_uint (value, demux->max_buffering_time / GST_SECOND);
       break;
     case PROP_BANDWIDTH_USAGE:
-      g_value_set_float (value, demux->bandwidth_usage);
+      g_value_set_float (value, adaptivedemux->bitrate_limit);
       break;
     case PROP_MAX_BITRATE:
       g_value_set_uint (value, demux->max_bitrate);
@@ -380,257 +486,6 @@
   }
 }
 
-static GstStateChangeReturn
-gst_dash_demux_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn ret;
-  GstDashDemux *demux = GST_DASH_DEMUX (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_dash_demux_reset (demux, FALSE);
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-static void
-gst_dash_demux_handle_message (GstBin * bin, GstMessage * msg)
-{
-  GstDashDemux *demux = GST_DASH_DEMUX_CAST (bin);
-
-  switch (GST_MESSAGE_TYPE (msg)) {
-    case GST_MESSAGE_ERROR:{
-      GSList *iter;
-      GstDashDemuxStream *stream;
-      GError *err = NULL;
-      gchar *debug = NULL;
-
-      for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-        stream = iter->data;
-        if (GST_OBJECT_CAST (stream->src) == GST_MESSAGE_SRC (msg)) {
-          gst_message_parse_error (msg, &err, &debug);
-
-          GST_WARNING_OBJECT (stream->pad, "Source posted error: %d:%d %s (%s)",
-              err->domain, err->code, err->message, debug);
-
-          /* error, but ask to retry */
-          stream->last_ret = GST_FLOW_CUSTOM_ERROR;
-          g_cond_signal (&stream->fragment_download_cond);
-
-          g_error_free (err);
-          g_free (debug);
-          break;
-        }
-      }
-
-      gst_message_unref (msg);
-      msg = NULL;
-    }
-      break;
-    default:
-      break;
-  }
-
-  if (msg)
-    GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
-}
-
-static gboolean
-gst_dash_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstDashDemux *demux;
-
-  demux = GST_DASH_DEMUX (parent);
-
-  switch (event->type) {
-    case GST_EVENT_SEEK:
-    {
-      gdouble rate;
-      GstFormat format;
-      GstSeekFlags flags;
-      GstSeekType start_type, stop_type;
-      gint64 start, stop;
-      GList *list;
-      GstClockTime current_pos, target_pos;
-      guint current_period;
-      GstStreamPeriod *period;
-      GSList *iter;
-      gboolean update;
-
-      GST_INFO_OBJECT (demux, "Received seek event");
-
-      if (gst_mpd_client_is_live (demux->client)) {
-        GST_WARNING_OBJECT (demux, "Received seek event for live stream");
-        return FALSE;
-      }
-
-      gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
-          &stop_type, &stop);
-
-      if (format != GST_FORMAT_TIME)
-        return FALSE;
-
-      GST_DEBUG_OBJECT (demux,
-          "seek event, rate: %f type: %d start: %" GST_TIME_FORMAT " stop: %"
-          GST_TIME_FORMAT, rate, start_type, GST_TIME_ARGS (start),
-          GST_TIME_ARGS (stop));
-
-      gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
-          start, stop_type, stop, &update);
-
-      if (update) {
-        GstEvent *seg_evt;
-
-        GST_DASH_DEMUX_CLIENT_LOCK (demux);
-
-        if (flags & GST_SEEK_FLAG_FLUSH) {
-          GST_DEBUG_OBJECT (demux, "sending flush start");
-          for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-            GstDashDemuxStream *stream;
-            stream = iter->data;
-            gst_pad_push_event (stream->pad, gst_event_new_flush_start ());
-          }
-        }
-
-        gst_dash_demux_stop (demux);
-        GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-        gst_dash_demux_wait_stop (demux);
-
-        /* select the requested Period in the Media Presentation */
-        if (demux->segment.rate > 0.0)
-          target_pos = (GstClockTime) demux->segment.start;
-        else
-          target_pos = (GstClockTime) demux->segment.stop;
-        GST_DEBUG_OBJECT (demux, "Seeking to target %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (target_pos));
-        current_period = 0;
-        for (list = g_list_first (demux->client->periods); list;
-            list = g_list_next (list)) {
-          period = list->data;
-          current_pos = period->start;
-          current_period = period->number;
-          GST_DEBUG_OBJECT (demux, "Looking at period %u pos %" GST_TIME_FORMAT,
-              current_period, GST_TIME_ARGS (current_pos));
-          if (current_pos <= target_pos
-              && target_pos < current_pos + period->duration) {
-            break;
-          }
-        }
-        if (list == NULL) {
-          GST_WARNING_OBJECT (demux, "Could not find seeked Period");
-          return FALSE;
-        }
-        if (current_period != gst_mpd_client_get_period_index (demux->client)) {
-          GSList *streams = NULL;
-
-          GST_DEBUG_OBJECT (demux, "Seeking to Period %d", current_period);
-          streams = demux->streams;
-          demux->streams = NULL;
-          /* clean old active stream list, if any */
-          gst_active_streams_free (demux->client);
-
-          /* setup video, audio and subtitle streams, starting from the new Period */
-          if (!gst_mpd_client_set_period_index (demux->client, current_period)
-              || !gst_dash_demux_setup_all_streams (demux))
-            return FALSE;
-
-          gst_dash_demux_expose_streams (demux);
-          gst_dash_demux_remove_streams (demux, streams);
-        }
-
-        /* Update the current sequence on all streams */
-        seg_evt = gst_event_new_segment (&demux->segment);
-        gst_event_set_seqnum (seg_evt, gst_event_get_seqnum (event));
-        for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-          GstDashDemuxStream *stream = iter->data;
-          gst_mpd_client_stream_seek (demux->client, stream->active_stream,
-              target_pos);
-
-          gst_event_replace (&stream->pending_segment, seg_evt);
-        }
-        gst_event_unref (seg_evt);
-
-        if (flags & GST_SEEK_FLAG_FLUSH) {
-          GST_DEBUG_OBJECT (demux, "Sending flush stop on all pad");
-          for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-            GstDashDemuxStream *stream;
-
-            stream = iter->data;
-            stream->need_header = TRUE;
-            stream->stream_eos = FALSE;
-            gst_pad_push_event (stream->pad, gst_event_new_flush_stop (TRUE));
-          }
-        }
-
-        /* Restart the demux */
-        GST_DASH_DEMUX_CLIENT_LOCK (demux);
-        demux->cancelled = FALSE;
-        demux->end_of_manifest = FALSE;
-        for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-          GstDashDemuxStream *stream = iter->data;
-          stream->last_ret = GST_FLOW_OK;
-        }
-        demux->timestamp_offset = 0;
-        gst_uri_downloader_reset (demux->downloader);
-        GST_DEBUG_OBJECT (demux, "Resuming tasks after seeking");
-        gst_dash_demux_resume_download_task (demux);
-        GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-      }
-
-      return TRUE;
-    }
-    case GST_EVENT_RECONFIGURE:{
-      GSList *iter;
-
-      GST_DASH_DEMUX_CLIENT_LOCK (demux);
-      for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-        GstDashDemuxStream *stream = iter->data;
-
-        if (stream->pad == pad) {
-          if (stream->last_ret == GST_FLOW_NOT_LINKED) {
-            stream->last_ret = GST_FLOW_OK;
-            stream->restart_download = TRUE;
-            stream->need_header = TRUE;
-            stream->discont = TRUE;
-            GST_DEBUG_OBJECT (stream->pad, "Restarting download loop");
-            gst_task_start (stream->download_task);
-          }
-          GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-          gst_event_unref (event);
-          return TRUE;
-        }
-      }
-      GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-    }
-      break;
-    case GST_EVENT_LATENCY:{
-      /* Upstream and our internal source are irrelevant
-       * for latency, and we should not fail here to
-       * configure the latency */
-      gst_event_unref (event);
-      return TRUE;
-    }
-    default:
-      break;
-  }
-
-  return gst_pad_event_default (pad, parent, event);
-}
-
 static gboolean
 gst_dash_demux_setup_mpdparser_streams (GstDashDemux * demux,
     GstMpdClient * client)
@@ -654,35 +509,13 @@
 }
 
 static gboolean
-gst_dash_demux_all_streams_eop (GstDashDemux * demux)
-{
-  GSList *iter = NULL;
-
-  GST_DEBUG_OBJECT (demux, "Checking if all streams are EOP");
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    GST_LOG_OBJECT (stream->pad, "EOP: %d (linked: %d)", stream->stream_eos,
-        stream->last_ret != GST_FLOW_NOT_LINKED);
-
-    if (!stream->stream_eos && stream->last_ret != GST_FLOW_NOT_LINKED)
-      return FALSE;
-  }
-
-  return TRUE;
-}
-
-static gboolean
 gst_dash_demux_setup_all_streams (GstDashDemux * demux)
 {
   guint i;
-  GSList *streams = NULL;
 
   GST_DEBUG_OBJECT (demux, "Setting up streams for period %d",
       gst_mpd_client_get_period_index (demux->client));
 
-  GST_MPD_CLIENT_LOCK (demux->client);
   /* clean old active stream list, if any */
   gst_active_streams_free (demux->client);
 
@@ -695,1089 +528,282 @@
     GstDashDemuxStream *stream;
     GstActiveStream *active_stream;
     GstCaps *caps;
-    GstEvent *event;
-    gchar *stream_id;
+    GstPad *srcpad;
+    gchar *lang = NULL;
+    GstTagList *tags = NULL;
 
     active_stream = gst_mpdparser_get_active_stream_by_index (demux->client, i);
     if (active_stream == NULL)
       continue;
+    /* TODO: support 'application' mimeType */
+    if (active_stream->mimeType == GST_STREAM_APPLICATION)
+      continue;
 
-    stream = g_new0 (GstDashDemuxStream, 1);
-    stream->demux = demux;
-    stream->active_stream = active_stream;
-    stream->discont = FALSE;
+    srcpad = gst_dash_demux_create_pad (demux, active_stream);
     caps = gst_dash_demux_get_input_caps (demux, active_stream);
-
-    g_rec_mutex_init (&stream->download_task_lock);
-    stream->download_task =
-        gst_task_new ((GstTaskFunction) gst_dash_demux_stream_download_loop,
-        stream, NULL);
-    gst_task_set_lock (stream->download_task, &stream->download_task_lock);
-    g_cond_init (&stream->download_cond);
-    g_mutex_init (&stream->download_mutex);
-    stream->download_total_time = 0;
-    stream->download_total_bytes = 0;
-
-    stream->index = i;
-    stream->input_caps = caps;
-    stream->need_header = TRUE;
-    g_cond_init (&stream->fragment_download_cond);
-    g_mutex_init (&stream->fragment_download_lock);
-
     GST_LOG_OBJECT (demux, "Creating stream %d %" GST_PTR_FORMAT, i, caps);
-    streams = g_slist_prepend (streams, stream);
-    stream->pad = gst_dash_demux_create_pad (demux, stream);
 
-    stream_id =
-        gst_pad_create_stream_id_printf (stream->pad,
-        GST_ELEMENT_CAST (demux), "%d", i);
+    if (active_stream->cur_adapt_set) {
+      GstAdaptationSetNode *adp_set = active_stream->cur_adapt_set;
+      lang = adp_set->lang;
 
-    event =
-        gst_pad_get_sticky_event (demux->sinkpad, GST_EVENT_STREAM_START, 0);
-    if (event) {
-      if (gst_event_parse_group_id (event, &demux->group_id))
-        demux->have_group_id = TRUE;
-      else
-        demux->have_group_id = FALSE;
-      gst_event_unref (event);
-    } else if (!demux->have_group_id) {
-      demux->have_group_id = TRUE;
-      demux->group_id = gst_util_group_id_next ();
+      /* Fallback to the language in ContentComponent node */
+      if (lang == NULL && g_list_length (adp_set->ContentComponents) == 1) {
+        GstContentComponentNode *cc_node = adp_set->ContentComponents->data;
+        lang = cc_node->lang;
+      }
     }
-    event = gst_event_new_stream_start (stream_id);
-    if (demux->have_group_id)
-      gst_event_set_group_id (event, demux->group_id);
 
-    gst_pad_push_event (stream->pad, event);
-    g_free (stream_id);
+    if (lang) {
+      if (gst_tag_check_language_code (lang))
+        tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL);
+      else
+        tags = gst_tag_list_new (GST_TAG_LANGUAGE_NAME, lang, NULL);
+    }
 
-    gst_pad_push_event (stream->pad, gst_event_new_caps (caps));
+    stream = (GstDashDemuxStream *)
+        gst_adaptive_demux_stream_new (GST_ADAPTIVE_DEMUX_CAST (demux), srcpad);
+    stream->active_stream = active_stream;
+    gst_adaptive_demux_stream_set_caps (GST_ADAPTIVE_DEMUX_STREAM_CAST (stream),
+        caps);
+    if (tags)
+      gst_adaptive_demux_stream_set_tags (GST_ADAPTIVE_DEMUX_STREAM_CAST
+          (stream), tags);
+    stream->index = i;
+    stream->pending_seek_ts = GST_CLOCK_TIME_NONE;
+    if (active_stream->cur_adapt_set &&
+        active_stream->cur_adapt_set->RepresentationBase &&
+        active_stream->cur_adapt_set->RepresentationBase->ContentProtection) {
+      GST_DEBUG_OBJECT (demux, "Adding ContentProtection events to source pad");
+      g_list_foreach (active_stream->cur_adapt_set->
+          RepresentationBase->ContentProtection,
+          gst_dash_demux_send_content_protection_event, stream);
+    }
+
+    gst_isoff_sidx_parser_init (&stream->sidx_parser);
   }
-  streams = g_slist_reverse (streams);
-
-  demux->next_periods = g_slist_append (demux->next_periods, streams);
-  GST_MPD_CLIENT_UNLOCK (demux->client);
 
   return TRUE;
 }
 
-static gboolean
-gst_dash_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+static void
+gst_dash_demux_send_content_protection_event (gpointer data, gpointer userdata)
 {
-  GstDashDemux *demux = GST_DASH_DEMUX (parent);
+  GstDescriptorType *cp = (GstDescriptorType *) data;
+  GstDashDemuxStream *stream = (GstDashDemuxStream *) userdata;
+  GstEvent *event;
+  GstBuffer *pssi;
+  glong pssi_len;
+  gchar *schemeIdUri;
 
-  switch (event->type) {
-    case GST_EVENT_FLUSH_STOP:
-      gst_dash_demux_reset (demux, FALSE);
-      break;
-    case GST_EVENT_EOS:{
-      gchar *manifest;
-      GstQuery *query;
-      gboolean query_res;
-      gboolean ret = TRUE;
-      GstMapInfo mapinfo;
+  if (cp->schemeIdUri == NULL)
+    return;
 
-      if (demux->manifest == NULL) {
-        GST_WARNING_OBJECT (demux, "Received EOS without a manifest.");
-        break;
-      }
-
-      GST_DEBUG_OBJECT (demux, "Got EOS on the sink pad: manifest fetched");
-
-      GST_DASH_DEMUX_CLIENT_LOCK (demux);
-      if (demux->client)
-        gst_mpd_client_free (demux->client);
-      demux->client = gst_mpd_client_new ();
-
-      query = gst_query_new_uri ();
-      query_res = gst_pad_peer_query (pad, query);
-      if (query_res) {
-        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.");
-      }
-      gst_query_unref (query);
-
-      if (gst_buffer_map (demux->manifest, &mapinfo, GST_MAP_READ)) {
-        manifest = (gchar *) mapinfo.data;
-        if (!gst_mpd_parse (demux->client, manifest, mapinfo.size)) {
-          /* In most cases, this will happen if we set a wrong url in the
-           * source element and we have received the 404 HTML response instead of
-           * the manifest */
-          GST_ELEMENT_ERROR (demux, STREAM, DECODE, ("Invalid manifest."),
-              (NULL));
-          ret = FALSE;
-        }
-        gst_buffer_unmap (demux->manifest, &mapinfo);
-      } else {
-        GST_WARNING_OBJECT (demux, "Error validating the manifest.");
-        ret = FALSE;
-      }
-      gst_buffer_unref (demux->manifest);
-      demux->manifest = NULL;
-
-      if (!ret)
-        goto seek_quit;
-
-      if (!gst_mpd_client_setup_media_presentation (demux->client)) {
-        GST_ELEMENT_ERROR (demux, STREAM, DECODE,
-            ("Incompatible manifest file."), (NULL));
-        ret = FALSE;
-        goto seek_quit;
-      }
-
-      /* setup video, audio and subtitle streams, starting from first Period */
-      if (!gst_mpd_client_set_period_index (demux->client, 0) ||
-          !gst_dash_demux_setup_all_streams (demux)) {
-        ret = FALSE;
-        goto seek_quit;
-      }
-
-      gst_dash_demux_advance_period (demux);
-
-      /* If stream is live, try to find the segment that is closest to current time */
-      if (gst_mpd_client_is_live (demux->client)) {
-        GSList *iter;
-        GstDateTime *now = gst_date_time_new_now_utc ();
-        gint seg_idx;
-
-        GST_DEBUG_OBJECT (demux,
-            "Seeking to current time of day for live stream ");
-        if (demux->client->mpd_node->suggestedPresentationDelay != -1) {
-          GstDateTime *target = gst_mpd_client_add_time_difference (now,
-              demux->client->mpd_node->suggestedPresentationDelay * -1000);
-          gst_date_time_unref (now);
-          now = target;
-        }
-        for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-          GstDashDemuxStream *stream = iter->data;
-          GstActiveStream *active_stream = stream->active_stream;
-
-          /* Get segment index corresponding to current time. */
-          seg_idx =
-              gst_mpd_client_get_segment_index_at_time (demux->client,
-              active_stream, now);
-          if (seg_idx < 0) {
-            GST_WARNING_OBJECT (demux,
-                "Failed to find a segment that is available "
-                "at this point in time for stream %d.", stream->index);
-            seg_idx = 0;
-          }
-          GST_INFO_OBJECT (demux,
-              "Segment index corresponding to current time for stream "
-              "%d is %d.", stream->index, seg_idx);
-          gst_mpd_client_set_segment_index (active_stream, seg_idx);
-        }
-
-        gst_date_time_unref (now);
-      } else {
-        GST_DEBUG_OBJECT (demux,
-            "Seeking to first segment for on-demand stream ");
-
-        /* start playing from the first segment */
-        gst_mpd_client_set_segment_index_for_all_streams (demux->client, 0);
-      }
-
-      /* Send duration message */
-      if (!gst_mpd_client_is_live (demux->client)) {
-        GstClockTime duration =
-            gst_mpd_client_get_media_presentation_duration (demux->client);
-
-        if (duration != GST_CLOCK_TIME_NONE) {
-          GST_DEBUG_OBJECT (demux,
-              "Sending duration message : %" GST_TIME_FORMAT,
-              GST_TIME_ARGS (duration));
-          gst_element_post_message (GST_ELEMENT (demux),
-              gst_message_new_duration_changed (GST_OBJECT (demux)));
-        } else {
-          GST_DEBUG_OBJECT (demux,
-              "mediaPresentationDuration unknown, can not send the duration message");
-        }
-      }
-      demux->timestamp_offset = -1;
-      gst_dash_demux_resume_download_task (demux);
-      GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-
-    seek_quit:
-      gst_event_unref (event);
-      return ret;
-    }
-    case GST_EVENT_SEGMENT:
-      /* Swallow newsegments, we'll push our own */
-      gst_event_unref (event);
-      return TRUE;
-    default:
-      break;
+  GST_TRACE_OBJECT (stream, "check schemeIdUri %s", cp->schemeIdUri);
+  /* RFC 2141 states: The leading "urn:" sequence is case-insensitive */
+  schemeIdUri = g_ascii_strdown (cp->schemeIdUri, -1);
+  if (g_str_has_prefix (schemeIdUri, "urn:uuid:")) {
+    pssi_len = strlen (cp->value);
+    pssi = gst_buffer_new_wrapped (g_memdup (cp->value, pssi_len), pssi_len);
+    GST_LOG_OBJECT (stream, "Queuing Protection event on source pad");
+    /* RFC 4122 states that the hex part of a UUID is in lower case,
+     * but some streams seem to ignore this and use upper case for the
+     * protection system ID */
+    event = gst_event_new_protection (cp->schemeIdUri + 9, pssi, "dash/mpd");
+    gst_adaptive_demux_stream_queue_event ((GstAdaptiveDemuxStream *) stream,
+        event);
+    gst_buffer_unref (pssi);
   }
+  g_free (schemeIdUri);
+}
 
-  return gst_pad_event_default (pad, parent, event);
+static GstClockTime
+gst_dash_demux_get_duration (GstAdaptiveDemux * ademux)
+{
+  GstDashDemux *demux = GST_DASH_DEMUX_CAST (ademux);
+
+  g_return_val_if_fail (demux->client != NULL, GST_CLOCK_TIME_NONE);
+
+  return gst_mpd_client_get_media_presentation_duration (demux->client);
 }
 
 static gboolean
-gst_dash_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_dash_demux_is_live (GstAdaptiveDemux * ademux)
 {
-  GstDashDemux *dashdemux;
-  gboolean ret = FALSE;
+  GstDashDemux *demux = GST_DASH_DEMUX_CAST (ademux);
 
-  if (query == NULL)
-    return FALSE;
+  g_return_val_if_fail (demux->client != NULL, FALSE);
 
-  dashdemux = GST_DASH_DEMUX (parent);
+  return gst_mpd_client_is_live (demux->client);
+}
 
-  switch (query->type) {
-    case GST_QUERY_DURATION:{
-      GstClockTime duration = -1;
-      GstFormat fmt;
+static gboolean
+gst_dash_demux_setup_streams (GstAdaptiveDemux * demux)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  gboolean ret = TRUE;
+  GstDateTime *now = NULL;
+  guint period_idx;
 
-      gst_query_parse_duration (query, &fmt, NULL);
-      if (fmt == GST_FORMAT_TIME) {
-        duration =
-            gst_mpd_client_get_media_presentation_duration (dashdemux->client);
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0) {
-          gst_query_set_duration (query, GST_FORMAT_TIME, duration);
-          ret = TRUE;
-        }
+  /* setup video, audio and subtitle streams, starting from first Period if
+   * non-live */
+  period_idx = 0;
+  if (gst_mpd_client_is_live (dashdemux->client)) {
+    GDateTime *g_now;
+    if (dashdemux->clock_drift == NULL) {
+      gchar **urls;
+      urls =
+          gst_mpd_client_get_utc_timing_sources (dashdemux->client,
+          SUPPORTED_CLOCK_FORMATS, NULL);
+      if (urls) {
+        GST_DEBUG_OBJECT (dashdemux, "Found a supported UTCTiming element");
+        dashdemux->clock_drift = gst_dash_demux_clock_drift_new ();
+        gst_dash_demux_poll_clock_drift (dashdemux);
       }
-      GST_DEBUG_OBJECT (dashdemux,
-          "GST_QUERY_DURATION returns %s with duration %" GST_TIME_FORMAT,
-          ret ? "TRUE" : "FALSE", GST_TIME_ARGS (duration));
-      break;
     }
-    case GST_QUERY_SEEKING:{
-      GstFormat fmt;
-      gint64 start;
-      gint64 end;
-      gint64 stop = -1;
-
-      gst_query_parse_seeking (query, &fmt, NULL, &start, &end);
-      GST_DEBUG_OBJECT (dashdemux,
-          "Received GST_QUERY_SEEKING with format %d - %" G_GINT64_FORMAT
-          " %" G_GINT64_FORMAT, fmt, start, end);
-      if (fmt == GST_FORMAT_TIME) {
-        GstClockTime duration;
-
-        duration =
-            gst_mpd_client_get_media_presentation_duration (dashdemux->client);
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0)
-          stop = duration;
-
-        gst_query_set_seeking (query, fmt,
-            !gst_mpd_client_is_live (dashdemux->client), 0, stop);
-        ret = TRUE;
-
-        GST_DEBUG_OBJECT (dashdemux, "GST_QUERY_SEEKING returning with stop : %"
-            GST_TIME_FORMAT, GST_TIME_ARGS (stop));
-      }
-      break;
+    /* get period index for period encompassing the current time */
+    g_now = gst_dash_demux_get_server_now_utc (dashdemux);
+    now = gst_date_time_new_from_g_date_time (g_now);
+    if (dashdemux->client->mpd_node->suggestedPresentationDelay != -1) {
+      GstDateTime *target = gst_mpd_client_add_time_difference (now,
+          dashdemux->client->mpd_node->suggestedPresentationDelay * -1000);
+      gst_date_time_unref (now);
+      now = target;
     }
-    case GST_QUERY_LATENCY:
-    {
-      gboolean live;
-      GstClockTime min, max;
-
-      gst_query_parse_latency (query, &live, &min, &max);
-
-      if (dashdemux->client && gst_mpd_client_is_live (dashdemux->client))
-        live = TRUE;
-
-      if (dashdemux->max_buffering_time > 0)
-        max += dashdemux->max_buffering_time;
-
-      gst_query_set_latency (query, live, min, max);
-      ret = TRUE;
-      break;
-    }
-    default:{
-      /* By default, do not forward queries upstream */
-      break;
+    period_idx =
+        gst_mpd_client_get_period_index_at_time (dashdemux->client, now);
+    if (period_idx == G_MAXUINT) {
+#ifndef GST_DISABLE_GST_DEBUG
+      gchar *date_str = gst_date_time_to_iso8601_string (now);
+      GST_DEBUG_OBJECT (demux, "Unable to find live period active at %s",
+          date_str);
+      g_free (date_str);
+#endif
+      ret = FALSE;
+      goto done;
     }
   }
 
+  if (!gst_mpd_client_set_period_index (dashdemux->client, period_idx) ||
+      !gst_dash_demux_setup_all_streams (dashdemux)) {
+    ret = FALSE;
+    goto done;
+  }
+
+  /* If stream is live, try to find the segment that
+   * is closest to current time */
+  if (gst_mpd_client_is_live (dashdemux->client)) {
+    GDateTime *gnow;
+
+    GST_DEBUG_OBJECT (demux, "Seeking to current time of day for live stream ");
+
+    gnow = gst_date_time_to_g_date_time (now);
+    gst_mpd_client_seek_to_time (dashdemux->client, gnow);
+    g_date_time_unref (gnow);
+  } else {
+    GST_DEBUG_OBJECT (demux, "Seeking to first segment for on-demand stream ");
+
+    /* start playing from the first segment */
+    gst_mpd_client_seek_to_first_segment (dashdemux->client);
+  }
+
+done:
+  if (now != NULL)
+    gst_date_time_unref (now);
+  return ret;
+}
+
+static gboolean
+gst_dash_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  gboolean ret = FALSE;
+  gchar *manifest;
+  GstMapInfo mapinfo;
+
+  if (dashdemux->client)
+    gst_mpd_client_free (dashdemux->client);
+  dashdemux->client = gst_mpd_client_new ();
+
+  dashdemux->client->mpd_uri = g_strdup (demux->manifest_uri);
+  dashdemux->client->mpd_base_uri = g_strdup (demux->manifest_base_uri);
+
+  GST_DEBUG_OBJECT (demux, "Fetched MPD file at URI: %s (base: %s)",
+      dashdemux->client->mpd_uri,
+      GST_STR_NULL (dashdemux->client->mpd_base_uri));
+
+  if (gst_buffer_map (buf, &mapinfo, GST_MAP_READ)) {
+    manifest = (gchar *) mapinfo.data;
+    if (gst_mpd_parse (dashdemux->client, manifest, mapinfo.size)) {
+      if (gst_mpd_client_setup_media_presentation (dashdemux->client)) {
+        ret = TRUE;
+      } else {
+        GST_ELEMENT_ERROR (demux, STREAM, DECODE,
+            ("Incompatible manifest file."), (NULL));
+      }
+    }
+    gst_buffer_unmap (buf, &mapinfo);
+  } else {
+    GST_WARNING_OBJECT (demux, "Failed to map manifest buffer");
+  }
+
+  if (ret)
+    ret = gst_dash_demux_setup_streams (demux);
+
   return ret;
 }
 
-static GstFlowReturn
-gst_dash_demux_pad (GstPad * pad, GstObject * parent, GstBuffer * buf)
-{
-  GstDashDemux *demux = GST_DASH_DEMUX (parent);
-
-  if (demux->manifest == NULL)
-    demux->manifest = buf;
-  else
-    demux->manifest = gst_buffer_append (demux->manifest, buf);
-
-  return GST_FLOW_OK;
-}
-
-static void
-gst_dash_demux_wait_stop (GstDashDemux * demux)
-{
-  GSList *iter;
-
-  GST_DEBUG_OBJECT (demux, "Waiting for threads to stop");
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    gst_task_join (stream->download_task);
-    gst_element_set_state (stream->src, GST_STATE_NULL);
-  }
-}
-
-static void
-gst_dash_demux_stop (GstDashDemux * demux)
-{
-  GSList *iter;
-
-  GST_DEBUG_OBJECT (demux, "Stopping demux");
-  demux->cancelled = TRUE;
-
-  if (demux->downloader)
-    gst_uri_downloader_cancel (demux->downloader);
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    stream->last_ret = GST_FLOW_FLUSHING;
-    stream->need_header = TRUE;
-    gst_task_stop (stream->download_task);
-    GST_TASK_SIGNAL (stream->download_task);
-    gst_element_set_state (stream->src, GST_STATE_READY);
-    g_cond_signal (&stream->fragment_download_cond);
-  }
-}
-
 static GstPad *
-gst_dash_demux_create_pad (GstDashDemux * demux, GstDashDemuxStream * stream)
+gst_dash_demux_create_pad (GstDashDemux * demux, GstActiveStream * stream)
 {
   GstPad *pad;
   GstPadTemplate *tmpl;
+  gchar *name;
 
-  tmpl = gst_static_pad_template_get (&srctemplate);
+  switch (stream->mimeType) {
+    case GST_STREAM_AUDIO:
+      name = g_strdup_printf ("audio_%02u", demux->n_audio_streams++);
+      tmpl = gst_static_pad_template_get (&gst_dash_demux_audiosrc_template);
+      break;
+    case GST_STREAM_VIDEO:
+      name = g_strdup_printf ("video_%02u", demux->n_video_streams++);
+      tmpl = gst_static_pad_template_get (&gst_dash_demux_videosrc_template);
+      break;
+    default:
+      g_assert_not_reached ();
+      return NULL;
+  }
 
   /* Create and activate new pads */
-  pad = gst_ghost_pad_new_no_target_from_template (NULL, tmpl);
+  pad = gst_ghost_pad_new_no_target_from_template (name, tmpl);
+  g_free (name);
   gst_object_unref (tmpl);
 
-  gst_pad_set_event_function (pad,
-      GST_DEBUG_FUNCPTR (gst_dash_demux_src_event));
-  gst_pad_set_query_function (pad,
-      GST_DEBUG_FUNCPTR (gst_dash_demux_src_query));
-  gst_pad_set_element_private (pad, stream);
-
   gst_pad_set_active (pad, TRUE);
   GST_INFO_OBJECT (demux, "Creating srcpad %s:%s", GST_DEBUG_PAD_NAME (pad));
   return pad;
 }
 
 static void
-gst_dash_demux_expose_streams (GstDashDemux * demux)
+gst_dash_demux_reset (GstAdaptiveDemux * ademux)
 {
-  GSList *iter;
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    GST_LOG_OBJECT (stream->pad, "Exposing stream %d %" GST_PTR_FORMAT,
-        stream->index, stream->input_caps);
-
-    gst_element_add_pad (GST_ELEMENT (demux), gst_object_ref (stream->pad));
-  }
-  gst_element_no_more_pads (GST_ELEMENT_CAST (demux));
-}
-
-static void
-gst_dash_demux_remove_streams (GstDashDemux * demux, GSList * streams)
-{
-  GSList *iter;
-  GstEvent *eos = gst_event_new_eos ();
-
-  for (iter = streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;;
-
-    GST_LOG_OBJECT (stream->pad, "Removing stream %d %" GST_PTR_FORMAT,
-        stream->index, stream->input_caps);
-    gst_pad_push_event (stream->pad, gst_event_ref (eos));
-    gst_pad_set_active (stream->pad, FALSE);
-    gst_element_remove_pad (GST_ELEMENT (demux), stream->pad);
-    gst_dash_demux_stream_free (stream);
-  }
-  gst_event_unref (eos);
-  g_slist_free (streams);
-}
-
-static gboolean
-gst_dash_demux_advance_period (GstDashDemux * demux)
-{
-  GSList *old_period = NULL;
-  GSList *iter;
-  GstEvent *seg_evt;
-
-  GST_DEBUG_OBJECT (demux, "Advancing period from %p", demux->streams);
-
-  if (demux->streams) {
-    g_assert (demux->streams == demux->next_periods->data);
-
-    demux->next_periods = g_slist_remove (demux->next_periods, demux->streams);
-    old_period = demux->streams;
-    demux->streams = NULL;
-  }
-
-  GST_DEBUG_OBJECT (demux, "Next period %p", demux->next_periods);
-
-  if (demux->next_periods) {
-    demux->streams = demux->next_periods->data;
-  } else {
-    GST_DEBUG_OBJECT (demux, "No next periods, return FALSE");
-    GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-    return FALSE;
-  }
-
-  GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-
-  /* TODO protect with lock, using the client lock isn't useful
-   * because causes deadlocks with the event_src handler */
-  gst_dash_demux_expose_streams (demux);
-  seg_evt = gst_event_new_segment (&demux->segment);
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    gst_event_replace (&stream->pending_segment, seg_evt);
-  }
-  gst_event_unref (seg_evt);
-  gst_dash_demux_remove_streams (demux, old_period);
-
-  GST_DASH_DEMUX_CLIENT_LOCK (demux);
-  return TRUE;
-}
-
-static void
-gst_dash_demux_stream_free (GstDashDemuxStream * stream)
-{
-  if (stream->input_caps) {
-    gst_caps_unref (stream->input_caps);
-    stream->input_caps = NULL;
-  }
-  if (stream->pending_segment) {
-    gst_event_unref (stream->pending_segment);
-  }
-  if (stream->pad) {
-    gst_object_unref (stream->pad);
-    stream->pad = NULL;
-  }
-  if (stream->download_task) {
-    gst_task_stop (stream->download_task);
-    gst_object_unref (stream->download_task);
-    g_rec_mutex_clear (&stream->download_task_lock);
-  }
-  g_cond_clear (&stream->download_cond);
-  g_mutex_clear (&stream->download_mutex);
-
-  if (stream->src_srcpad) {
-    gst_object_unref (stream->src_srcpad);
-    stream->src_srcpad = NULL;
-  }
-
-  if (stream->src) {
-    gst_element_set_state (stream->src, GST_STATE_NULL);
-    gst_bin_remove (GST_BIN_CAST (stream->demux), stream->src);
-    stream->src = NULL;
-  }
-
-  g_cond_clear (&stream->fragment_download_cond);
-  g_mutex_clear (&stream->fragment_download_lock);
-
-  g_free (stream);
-}
-
-static void
-gst_dash_demux_reset (GstDashDemux * demux, gboolean dispose)
-{
-  GSList *iter;
+  GstDashDemux *demux = GST_DASH_DEMUX_CAST (ademux);
 
   GST_DEBUG_OBJECT (demux, "Resetting demux");
 
   demux->end_of_period = FALSE;
   demux->end_of_manifest = FALSE;
 
-  gst_dash_demux_stop (demux);
-  gst_dash_demux_wait_stop (demux);
-  if (demux->downloader)
-    gst_uri_downloader_reset (demux->downloader);
-
-  if (demux->next_periods) {
-    g_assert (demux->next_periods->data == demux->streams);
-    demux->next_periods =
-        g_slist_delete_link (demux->next_periods, demux->next_periods);
-  }
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-    if (stream->pad) {
-      GST_INFO_OBJECT (demux, "Removing stream pad %s:%s",
-          GST_DEBUG_PAD_NAME (stream->pad));
-      gst_element_remove_pad (GST_ELEMENT (demux), stream->pad);
-    }
-    gst_dash_demux_stream_free (stream);
-  }
-  g_slist_free (demux->streams);
-  demux->streams = NULL;
-
-  for (iter = demux->next_periods; iter; iter = g_slist_next (iter)) {
-    GSList *streams = iter->data;
-    g_slist_free_full (streams, (GDestroyNotify) gst_dash_demux_stream_free);
-  }
-  g_slist_free (demux->next_periods);
-  demux->next_periods = NULL;
-
-  if (demux->manifest) {
-    gst_buffer_unref (demux->manifest);
-    demux->manifest = NULL;
-  }
   if (demux->client) {
     gst_mpd_client_free (demux->client);
     demux->client = NULL;
   }
-  if (!dispose) {
-    demux->client = gst_mpd_client_new ();
-  }
+  gst_dash_demux_clock_drift_free (demux->clock_drift);
+  demux->clock_drift = NULL;
+  demux->client = gst_mpd_client_new ();
 
-  gst_segment_init (&demux->segment, GST_FORMAT_TIME);
-  demux->last_manifest_update = GST_CLOCK_TIME_NONE;
-  demux->cancelled = FALSE;
-}
-
-static GstFlowReturn
-gst_dash_demux_refresh_mpd (GstDashDemux * demux)
-{
-  GstFragment *download;
-  GstBuffer *buffer;
-  GstClockTime duration, now = gst_util_get_timestamp ();
-  gint64 update_period = demux->client->mpd_node->minimumUpdatePeriod;
-
-  if (update_period == -1) {
-    GST_DEBUG_OBJECT (demux, "minimumUpdatePeriod unspecified, "
-        "will not update MPD");
-    return GST_FLOW_OK;
-  }
-
-  /* init reference time for manifest file updates */
-  if (!GST_CLOCK_TIME_IS_VALID (demux->last_manifest_update))
-    demux->last_manifest_update = now;
-
-  GST_DEBUG_OBJECT (demux,
-      "Next update: %" GST_TIME_FORMAT " now: %" GST_TIME_FORMAT,
-      GST_TIME_ARGS ((demux->last_manifest_update +
-              update_period * GST_MSECOND)), GST_TIME_ARGS (now));
-
-  /* update the manifest file */
-  if (now >= demux->last_manifest_update + update_period * GST_MSECOND) {
-    GST_DEBUG_OBJECT (demux, "Updating manifest file from URL %s",
-        demux->client->mpd_uri);
-    download = gst_uri_downloader_fetch_uri (demux->downloader,
-        demux->client->mpd_uri, NULL, TRUE, TRUE, TRUE, NULL);
-    if (download) {
-      GstMpdClient *new_client = NULL;
-
-      buffer = gst_fragment_get_buffer (download);
-      g_object_unref (download);
-      /* parse the manifest file */
-      if (buffer != NULL) {
-        GstMapInfo mapinfo;
-
-        new_client = gst_mpd_client_new ();
-
-        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);
-
-        if (gst_mpd_parse (new_client, (gchar *) mapinfo.data, mapinfo.size)) {
-          const gchar *period_id;
-          guint period_idx;
-          GSList *iter;
-
-          /* prepare the new manifest and try to transfer the stream position
-           * status from the old manifest client  */
-
-          gst_buffer_unmap (buffer, &mapinfo);
-          gst_buffer_unref (buffer);
-
-          GST_DEBUG_OBJECT (demux, "Updating manifest");
-
-          period_id = gst_mpd_client_get_period_id (demux->client);
-          period_idx = gst_mpd_client_get_period_index (demux->client);
-
-          /* setup video, audio and subtitle streams, starting from current Period */
-          if (!gst_mpd_client_setup_media_presentation (new_client)) {
-            /* TODO */
-          }
-
-          if (period_idx) {
-            if (!gst_mpd_client_set_period_id (new_client, period_id)) {
-              GST_DEBUG_OBJECT (demux,
-                  "Error setting up the updated manifest file");
-              return GST_FLOW_EOS;
-            }
-          } else {
-            if (!gst_mpd_client_set_period_index (new_client, period_idx)) {
-              GST_DEBUG_OBJECT (demux,
-                  "Error setting up the updated manifest file");
-              return GST_FLOW_EOS;
-            }
-          }
-
-          if (!gst_dash_demux_setup_mpdparser_streams (demux, new_client)) {
-            GST_ERROR_OBJECT (demux, "Failed to setup streams on manifest "
-                "update");
-            return GST_FLOW_ERROR;
-          }
-
-          /* update the streams to play from the next segment */
-          for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-            GstDashDemuxStream *demux_stream = iter->data;
-            GstActiveStream *new_stream = demux_stream->active_stream;
-            GstClockTime ts;
-
-            if (!new_stream) {
-              GST_DEBUG_OBJECT (demux,
-                  "Stream of index %d is missing from manifest update",
-                  demux_stream->index);
-              return GST_FLOW_EOS;
-            }
-
-            if (gst_mpd_client_get_next_fragment_timestamp (demux->client,
-                    demux_stream->index, &ts)) {
-              gst_mpd_client_stream_seek (new_client, new_stream, ts);
-            } else
-                if (gst_mpd_client_get_last_fragment_timestamp (demux->client,
-                    demux_stream->index, &ts)) {
-              /* try to set to the old timestamp + 1 */
-              gst_mpd_client_stream_seek (new_client, new_stream, ts + 1);
-            }
-          }
-
-          gst_mpd_client_free (demux->client);
-          demux->client = new_client;
-
-          /* Send an updated duration message */
-          duration =
-              gst_mpd_client_get_media_presentation_duration (demux->client);
-
-          if (duration != GST_CLOCK_TIME_NONE) {
-            GST_DEBUG_OBJECT (demux,
-                "Sending duration message : %" GST_TIME_FORMAT,
-                GST_TIME_ARGS (duration));
-            gst_element_post_message (GST_ELEMENT (demux),
-                gst_message_new_duration_changed (GST_OBJECT (demux)));
-          } else {
-            GST_DEBUG_OBJECT (demux,
-                "mediaPresentationDuration unknown, can not send the duration message");
-          }
-          demux->last_manifest_update = gst_util_get_timestamp ();
-          GST_DEBUG_OBJECT (demux, "Manifest file successfully updated");
-        } else {
-          /* In most cases, this will happen if we set a wrong url in the
-           * source element and we have received the 404 HTML response instead of
-           * the manifest */
-          GST_WARNING_OBJECT (demux, "Error parsing the manifest.");
-          gst_buffer_unmap (buffer, &mapinfo);
-          gst_buffer_unref (buffer);
-        }
-      } else {
-        /* download suceeded, but resulting buffer is NULL */
-        GST_WARNING_OBJECT (demux, "Error validating the manifest.");
-      }
-    } else {
-      /* download failed */
-      GST_WARNING_OBJECT (demux,
-          "Failed to update the manifest file from URL %s",
-          demux->client->mpd_uri);
-    }
-  }
-  return GST_FLOW_OK;
-}
-
-static GstFlowReturn
-gst_dash_demux_combine_flows (GstDashDemux * demux)
-{
-  gboolean all_notlinked = TRUE;
-  GSList *iter;
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-
-    if (stream->last_ret != GST_FLOW_NOT_LINKED)
-      all_notlinked = FALSE;
-
-    if (stream->last_ret <= GST_FLOW_NOT_NEGOTIATED
-        || stream->last_ret == GST_FLOW_FLUSHING)
-      return stream->last_ret;
-  }
-  if (all_notlinked)
-    return GST_FLOW_NOT_LINKED;
-  return GST_FLOW_OK;
-}
-
-
-/* gst_dash_demux_stream_download_loop:
- * 
- * Loop for the "download' task that fetches fragments based on the 
- * selected representations.
- * 
- * During playback:  
- * 
- * It sequentially fetches fragments corresponding to the current 
- * representations and pushes them downstream
- * 
- * When a new set of fragments has been downloaded, it evaluates the
- * download time to check if we can or should switch to a different 
- * set of representations.
- *
- * Teardown:
- * 
- * The task will exit when it encounters an error or when the end of the
- * manifest has been reached.
- */
-static void
-gst_dash_demux_stream_download_loop (GstDashDemuxStream * stream)
-{
-  GstDashDemux *demux = stream->demux;
-  GstFlowReturn flow_ret = GST_FLOW_OK;
-  GstClockTime fragment_ts = GST_CLOCK_TIME_NONE;
-  GstEvent *caps_event;
-
-  GST_LOG_OBJECT (stream->pad, "Starting download loop");
-
-  GST_DASH_DEMUX_CLIENT_LOCK (demux);
-  if (demux->cancelled) {
-    goto cancelled;
-  }
-
-  if (gst_mpd_client_is_live (demux->client)
-      && demux->client->mpd_uri != NULL) {
-    switch (gst_dash_demux_refresh_mpd (demux)) {
-      case GST_FLOW_EOS:
-        GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-        goto end_of_manifest;
-      default:
-        break;
-    }
-  }
-
-  /* try to switch to another set of representations if needed */
-  caps_event = gst_dash_demux_stream_select_representation_unlocked (stream);
-  GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-
-  if (G_UNLIKELY (caps_event && !gst_pad_push_event (stream->pad, caps_event))) {
-    /* TODO fail if caps is rejected */
-  }
-
-  /* fetch the next fragment */
-  flow_ret = gst_dash_demux_stream_get_next_fragment (stream, &fragment_ts);
-
-  GST_DASH_DEMUX_CLIENT_LOCK (demux);
-  if (demux->cancelled) {
-    goto cancelled;
-  }
-
-  stream->last_ret = flow_ret;
-  switch (flow_ret) {
-    case GST_FLOW_OK:
-      break;
-    case GST_FLOW_NOT_LINKED:
-      gst_task_pause (stream->download_task);
-      if (gst_dash_demux_combine_flows (demux) == GST_FLOW_NOT_LINKED) {
-        GST_ELEMENT_ERROR (demux, STREAM, FAILED,
-            (_("Internal data stream error.")),
-            ("stream stopped, reason %s",
-                gst_flow_get_name (GST_FLOW_NOT_LINKED)));
-      }
-      break;
-
-    case GST_FLOW_FLUSHING:
-      gst_dash_demux_stop (demux);
-      break;
-
-    case GST_FLOW_EOS:
-      GST_DEBUG_OBJECT (stream->pad, "EOS");
-      stream->stream_eos = TRUE;
-      if (gst_dash_demux_all_streams_eop (demux)) {
-        GST_INFO_OBJECT (stream->pad, "Reached the end of the Period");
-
-        if (gst_mpd_client_has_next_period (demux->client)) {
-
-          GST_INFO_OBJECT (demux, "Starting next period");
-          /* setup video, audio and subtitle streams, starting from the next Period */
-          if (!gst_mpd_client_set_period_index (demux->client,
-                  gst_mpd_client_get_period_index (demux->client) + 1)
-              || !gst_dash_demux_setup_all_streams (demux)) {
-          }
-
-          stream->last_ret = GST_FLOW_OK;
-          /* start playing from the first segment of the new period */
-          gst_mpd_client_set_segment_index_for_all_streams (demux->client, 0);
-
-          gst_dash_demux_advance_period (demux);
-
-          gst_dash_demux_resume_download_task (demux);
-          GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-
-          /* This pad is now finished, we lost its reference */
-          return;
-        }
-      }
-      gst_task_pause (stream->download_task);
-      break;
-    case GST_FLOW_ERROR:
-      /* Download failed 'by itself'
-       * in case this is live, we might be ahead or before playback, where
-       * segments don't exist (are still being created or were already deleted)
-       * so we either wait or jump ahead */
-      if (gst_mpd_client_is_live (demux->client)) {
-        gint64 time_diff;
-        gint pos;
-
-        pos =
-            gst_mpd_client_check_time_position (demux->client,
-            stream->active_stream, fragment_ts, &time_diff);
-        GST_DEBUG_OBJECT (stream->pad,
-            "Checked position for fragment ts %" GST_TIME_FORMAT
-            ", res: %d, diff: %" G_GINT64_FORMAT, GST_TIME_ARGS (fragment_ts),
-            pos, time_diff);
-
-        time_diff *= GST_USECOND;
-        if (pos < 0) {
-          /* we're behind, try moving to the 'present' */
-          GDateTime *now = g_date_time_new_now_utc ();
-
-          GST_DEBUG_OBJECT (stream->pad,
-              "Falling behind live stream, moving forward");
-          gst_mpd_client_seek_to_time (demux->client, now);
-          g_date_time_unref (now);
-
-        } else if (pos > 0) {
-          /* we're ahead, wait a little */
-
-          GST_DEBUG_OBJECT (stream->pad,
-              "Waiting for next segment to be created");
-          gst_mpd_client_set_segment_index (stream->active_stream,
-              stream->active_stream->segment_idx - 1);
-          gst_dash_demux_download_wait (stream, time_diff);
-        } else {
-          gst_mpd_client_set_segment_index (stream->active_stream,
-              stream->active_stream->segment_idx - 1);
-          demux->client->update_failed_count++;
-        }
-      } else {
-        demux->client->update_failed_count++;
-      }
-
-      if (demux->client->update_failed_count <= DEFAULT_FAILED_COUNT) {
-        GST_WARNING_OBJECT (stream->pad, "Could not fetch the next fragment");
-        goto quit;
-      } else {
-        goto error_downloading;
-      }
-      break;
-    default:
-      break;
-  }
-
-  if (G_LIKELY (stream->last_ret != GST_FLOW_ERROR))
-    demux->client->update_failed_count = 0;
-
-quit:
-  GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-
-  if (G_UNLIKELY (stream->last_ret == GST_FLOW_EOS)) {
-    gst_pad_push_event (stream->pad, gst_event_new_eos ());
-  }
-
-  GST_DEBUG_OBJECT (stream->pad, "Finishing download loop");
-  return;
-
-cancelled:
-  {
-    GST_WARNING_OBJECT (stream->pad, "Cancelled, leaving download task");
-    GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-    return;
-  }
-
-end_of_manifest:
-  {
-    GST_INFO_OBJECT (stream->pad, "End of manifest, leaving download task");
-    gst_task_stop (stream->download_task);
-    /* TODO should push eos? */
-    GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-    return;
-  }
-
-error_downloading:
-  {
-    GST_ELEMENT_ERROR (demux, RESOURCE, NOT_FOUND,
-        ("Could not fetch the next fragment, leaving download task"), (NULL));
-    gst_task_stop (stream->download_task);
-    GST_DASH_DEMUX_CLIENT_UNLOCK (demux);
-    return;
-  }
-}
-
-static void
-gst_dash_demux_resume_download_task (GstDashDemux * demux)
-{
-  GSList *iter;
-
-  for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-    GstDashDemuxStream *stream = iter->data;
-    gst_task_start (stream->download_task);
-  }
-}
-
-/*
- * gst_dash_demux_stream_select_representation_unlocked:
- *
- * Select the most appropriate media representation based on current target 
- * bitrate.
- */
-static GstEvent *
-gst_dash_demux_stream_select_representation_unlocked (GstDashDemuxStream *
-    stream)
-{
-  GstActiveStream *active_stream = NULL;
-  GList *rep_list = NULL;
-  gint new_index;
-  GstDashDemux *demux = stream->demux;
-  guint64 bitrate = 0;
-
-  active_stream = stream->active_stream;
-  if (active_stream == NULL)
-    return FALSE;
-
-  /* retrieve representation list */
-  if (active_stream->cur_adapt_set)
-    rep_list = active_stream->cur_adapt_set->Representations;
-  if (!rep_list)
-    return FALSE;
-
-  /* compare the time when the fragment was downloaded with the time when it was
-   * scheduled */
-  if (stream->download_total_time)
-    bitrate =
-        (stream->download_total_bytes * 8) /
-        ((double) stream->download_total_time / G_GUINT64_CONSTANT (1000000));
-
-  GST_DEBUG_OBJECT (stream->pad,
-      "Downloaded %u bytes in %" GST_TIME_FORMAT ". Bitrate is : %d",
-      (guint) stream->download_total_bytes,
-      GST_TIME_ARGS (stream->download_total_time * GST_USECOND),
-      (gint) bitrate);
-
-  /* Take old rate into account too */
-  if (stream->current_download_rate != -1)
-    bitrate = (stream->current_download_rate + bitrate * 3) / 4;
-  if (bitrate > G_MAXINT)
-    bitrate = G_MAXINT;
-  stream->current_download_rate = bitrate;
-  bitrate *= demux->bandwidth_usage;
-
-  GST_DEBUG_OBJECT (stream->pad,
-      "Trying to change to bitrate: %" G_GUINT64_FORMAT, bitrate);
-
-  /* get representation index with current max_bandwidth */
-  new_index = gst_mpdparser_get_rep_idx_with_max_bandwidth (rep_list, bitrate);
-
-  /* if no representation has the required bandwidth, take the lowest one */
-  if (new_index == -1)
-    new_index = gst_mpdparser_get_rep_idx_with_min_bandwidth (rep_list);
-
-  if (new_index != active_stream->representation_idx) {
-    GstRepresentationNode *rep = g_list_nth_data (rep_list, new_index);
-    GST_INFO_OBJECT (demux, "Changing representation idx: %d %d %u",
-        stream->index, new_index, rep->bandwidth);
-    if (gst_mpd_client_setup_representation (demux->client, active_stream, rep)) {
-      stream->need_header = TRUE;
-      GST_INFO_OBJECT (demux, "Switching bitrate to %d",
-          active_stream->cur_representation->bandwidth);
-      gst_caps_unref (stream->input_caps);
-      stream->input_caps = gst_dash_demux_get_input_caps (demux, active_stream);
-      return gst_event_new_caps (gst_caps_ref (stream->input_caps));
-    } else {
-      GST_WARNING_OBJECT (demux, "Can not switch representation, aborting...");
-      return NULL;
-    }
-  }
-  return NULL;
-}
-
-static void
-gst_dash_demux_download_header_fragment (GstDashDemux * demux,
-    GstDashDemuxStream * stream, gchar * path, gint64 range_start,
-    gint64 range_end)
-{
-  gchar *next_header_uri;
-
-  if (strncmp (path, "http://", 7) != 0) {
-    next_header_uri =
-        g_strconcat (gst_mpdparser_get_baseURL (demux->client, stream->index),
-        path, NULL);
-    g_free (path);
-  } else {
-    next_header_uri = path;
-  }
-
-  gst_dash_demux_stream_download_uri (demux, stream, next_header_uri,
-      range_start, range_end);
-  g_free (next_header_uri);
-}
-
-static void
-gst_dash_demux_get_next_header (GstDashDemux * demux,
-    GstDashDemuxStream * stream)
-{
-  gchar *initializationURL;
-  gint64 range_start, range_end;
-
-  if (!gst_mpd_client_get_next_header (demux->client, &initializationURL,
-          stream->index, &range_start, &range_end))
-    return;
-
-  GST_INFO_OBJECT (demux, "Fetching header %s %" G_GINT64_FORMAT "-%"
-      G_GINT64_FORMAT, initializationURL, range_start, range_end);
-  gst_dash_demux_download_header_fragment (demux, stream,
-      initializationURL, range_start, range_end);
-
-  /* check if we have an index */
-  if (!demux->cancelled && stream->last_ret == GST_FLOW_OK      /* TODO check for other valid types */
-      && gst_mpd_client_get_next_header_index (demux->client,
-          &initializationURL, stream->index, &range_start, &range_end)) {
-    GST_INFO_OBJECT (demux,
-        "Fetching index %s %" G_GINT64_FORMAT "-%" G_GINT64_FORMAT,
-        initializationURL, range_start, range_end);
-    gst_dash_demux_download_header_fragment (demux, stream,
-        initializationURL, range_start, range_end);
-  }
+  demux->n_audio_streams = 0;
+  demux->n_video_streams = 0;
 }
 
 static GstCaps *
@@ -1875,14 +901,491 @@
 }
 
 static void
-gst_dash_demux_wait_for_fragment_to_be_available (GstDashDemux * demux,
-    GstDashDemuxStream * stream)
+gst_dash_demux_stream_update_headers_info (GstAdaptiveDemuxStream * stream)
 {
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+  gchar *path = NULL;
+
+  gst_mpd_client_get_next_header (dashdemux->client,
+      &path, dashstream->index,
+      &stream->fragment.header_range_start, &stream->fragment.header_range_end);
+
+  if (path != NULL && strncmp (path, "http://", 7) != 0) {
+    stream->fragment.header_uri =
+        gst_uri_join_strings (gst_mpdparser_get_baseURL (dashdemux->client,
+            dashstream->index), path);
+    g_free (path);
+  } else {
+    stream->fragment.header_uri = path;
+  }
+  path = NULL;
+
+  gst_mpd_client_get_next_header_index (dashdemux->client,
+      &path, dashstream->index,
+      &stream->fragment.index_range_start, &stream->fragment.index_range_end);
+
+  if (path != NULL && strncmp (path, "http://", 7) != 0) {
+    stream->fragment.index_uri =
+        gst_uri_join_strings (gst_mpdparser_get_baseURL (dashdemux->client,
+            dashstream->index), path);
+    g_free (path);
+  } else {
+    stream->fragment.index_uri = path;
+  }
+}
+
+static GstFlowReturn
+gst_dash_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+  GstClockTime ts;
+  GstMediaFragmentInfo fragment;
+  gboolean isombff;
+
+  gst_adaptive_demux_stream_fragment_clear (&stream->fragment);
+
+  isombff = gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client);
+
+  if (GST_ADAPTIVE_DEMUX_STREAM_NEED_HEADER (stream) && isombff) {
+    gst_dash_demux_stream_update_headers_info (stream);
+    dashstream->sidx_base_offset = stream->fragment.index_range_end + 1;
+    if (dashstream->sidx_index != 0) {
+      /* request only the index to be downloaded as we need to reposition the
+       * stream to a subsegment */
+      return GST_FLOW_OK;
+    }
+  }
+
+  if (gst_mpd_client_get_next_fragment_timestamp (dashdemux->client,
+          dashstream->index, &ts)) {
+    if (GST_ADAPTIVE_DEMUX_STREAM_NEED_HEADER (stream)) {
+      gst_adaptive_demux_stream_fragment_clear (&stream->fragment);
+      gst_dash_demux_stream_update_headers_info (stream);
+    }
+
+    gst_mpd_client_get_next_fragment (dashdemux->client, dashstream->index,
+        &fragment);
+
+    stream->fragment.uri = fragment.uri;
+    if (isombff && dashstream->sidx_index != 0) {
+      GstSidxBoxEntry *entry = SIDX_CURRENT_ENTRY (dashstream);
+      stream->fragment.range_start =
+          dashstream->sidx_base_offset + entry->offset;
+      stream->fragment.timestamp = entry->pts;
+      stream->fragment.duration = entry->duration;
+      if (stream->demux->segment.rate < 0.0) {
+        stream->fragment.range_end =
+            stream->fragment.range_start + entry->size - 1;
+      } else {
+        stream->fragment.range_end = fragment.range_end;
+      }
+    } else {
+      stream->fragment.timestamp = fragment.timestamp;
+      stream->fragment.duration = fragment.duration;
+      stream->fragment.range_start =
+          MAX (fragment.range_start, dashstream->sidx_base_offset);
+      stream->fragment.range_end = fragment.range_end;
+    }
+
+    return GST_FLOW_OK;
+  }
+
+  return GST_FLOW_EOS;
+}
+
+static void
+gst_dash_demux_stream_sidx_seek (GstDashDemuxStream * dashstream,
+    GstClockTime ts)
+{
+  GstSidxBox *sidx = SIDX (dashstream);
+  gint i;
+
+  /* TODO optimize to a binary search */
+  for (i = 0; i < sidx->entries_count; i++) {
+    if (sidx->entries[i].pts + sidx->entries[i].duration >= ts)
+      break;
+  }
+  sidx->entry_index = i;
+  dashstream->sidx_index = i;
+  if (i < sidx->entries_count)
+    dashstream->sidx_current_remaining = sidx->entries[i].size;
+  else
+    dashstream->sidx_current_remaining = 0;
+}
+
+static GstFlowReturn
+gst_dash_demux_stream_seek (GstAdaptiveDemuxStream * stream, GstClockTime ts)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+
+  if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) {
+    if (dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
+      gst_dash_demux_stream_sidx_seek (dashstream, ts);
+    } else {
+      /* no index yet, seek when we have it */
+      dashstream->pending_seek_ts = ts;
+    }
+  }
+
+  gst_mpd_client_stream_seek (dashdemux->client, dashstream->active_stream, ts);
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_dash_demux_stream_has_next_subfragment (GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstSidxBox *sidx = SIDX (dashstream);
+
+  if (dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
+    if (stream->demux->segment.rate > 0.0) {
+      if (sidx->entry_index + 1 < sidx->entries_count)
+        return TRUE;
+    } else {
+      if (sidx->entry_index >= 1)
+        return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+static gboolean
+gst_dash_demux_stream_advance_subfragment (GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+
+  GstSidxBox *sidx = SIDX (dashstream);
+  gboolean fragment_finished = TRUE;
+
+  if (dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
+    if (stream->demux->segment.rate > 0.0) {
+      sidx->entry_index++;
+      if (sidx->entry_index < sidx->entries_count) {
+        fragment_finished = FALSE;
+      }
+    } else {
+      sidx->entry_index--;
+      if (sidx->entry_index >= 0) {
+        fragment_finished = FALSE;
+      }
+    }
+  }
+
+  GST_DEBUG_OBJECT (stream->pad, "New sidx index: %d / %d. "
+      "Finished fragment: %d", sidx->entry_index, sidx->entries_count,
+      fragment_finished);
+
+  if (!fragment_finished) {
+    dashstream->sidx_current_remaining = sidx->entries[sidx->entry_index].size;
+  }
+  return !fragment_finished;
+}
+
+static gboolean
+gst_dash_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+
+  if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) {
+    if (gst_dash_demux_stream_has_next_subfragment (stream))
+      return TRUE;
+  }
+
+  return gst_mpd_client_has_next_segment (dashdemux->client,
+      dashstream->active_stream, stream->demux->segment.rate > 0.0);
+}
+
+static GstFlowReturn
+gst_dash_demux_stream_advance_fragment (GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+
+  GST_DEBUG_OBJECT (stream->pad, "Advance fragment");
+
+  if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) {
+    if (gst_dash_demux_stream_advance_subfragment (stream))
+      return GST_FLOW_OK;
+  }
+
+  return gst_mpd_client_advance_segment (dashdemux->client,
+      dashstream->active_stream, stream->demux->segment.rate > 0.0);
+}
+
+static gboolean
+gst_dash_demux_stream_select_bitrate (GstAdaptiveDemuxStream * stream,
+    guint64 bitrate)
+{
+  GstActiveStream *active_stream = NULL;
+  GList *rep_list = NULL;
+  gint new_index;
+  GstDashDemux *demux = GST_DASH_DEMUX_CAST (stream->demux);
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
+  gboolean ret = FALSE;
+
+  active_stream = dashstream->active_stream;
+  if (active_stream == NULL) {
+    goto end;
+  }
+
+  /* retrieve representation list */
+  if (active_stream->cur_adapt_set)
+    rep_list = active_stream->cur_adapt_set->Representations;
+  if (!rep_list) {
+    goto end;
+  }
+
+  GST_DEBUG_OBJECT (stream->pad,
+      "Trying to change to bitrate: %" G_GUINT64_FORMAT, bitrate);
+
+  /* get representation index with current max_bandwidth */
+  new_index = gst_mpdparser_get_rep_idx_with_max_bandwidth (rep_list, bitrate);
+
+  /* if no representation has the required bandwidth, take the lowest one */
+  if (new_index == -1)
+    new_index = gst_mpdparser_get_rep_idx_with_min_bandwidth (rep_list);
+
+  if (new_index != active_stream->representation_idx) {
+    GstRepresentationNode *rep = g_list_nth_data (rep_list, new_index);
+    GST_INFO_OBJECT (demux, "Changing representation idx: %d %d %u",
+        dashstream->index, new_index, rep->bandwidth);
+    if (gst_mpd_client_setup_representation (demux->client, active_stream, rep)) {
+      GstCaps *caps;
+
+      GST_INFO_OBJECT (demux, "Switching bitrate to %d",
+          active_stream->cur_representation->bandwidth);
+      caps = gst_dash_demux_get_input_caps (demux, active_stream);
+      gst_adaptive_demux_stream_set_caps (stream, caps);
+      ret = TRUE;
+
+    } else {
+      GST_WARNING_OBJECT (demux, "Can not switch representation, aborting...");
+    }
+  }
+
+  if (gst_mpd_client_has_isoff_ondemand_profile (demux->client)) {
+
+    /* store our current position to change to the same one in a different
+     * representation if needed */
+    dashstream->sidx_index = SIDX (dashstream)->entry_index;
+    if (ret) {
+      /* TODO cache indexes to avoid re-downloading and parsing */
+      /* if we switched, we need a new index */
+      gst_isoff_sidx_parser_clear (&dashstream->sidx_parser);
+      gst_isoff_sidx_parser_init (&dashstream->sidx_parser);
+    }
+  }
+
+end:
+  return ret;
+}
+
+static gboolean
+gst_dash_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
+{
+  gdouble rate;
+  GstFormat format;
+  GstSeekFlags flags;
+  GstSeekType start_type, stop_type;
+  gint64 start, stop;
+  GList *list;
+  GstClockTime current_pos, target_pos;
+  guint current_period;
+  GstStreamPeriod *period;
+  GList *iter;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  gboolean switched_period = FALSE;
+
+  gst_event_parse_seek (seek, &rate, &format, &flags, &start_type, &start,
+      &stop_type, &stop);
+
+  /* TODO check if start-type/stop-type is SET */
+  if (demux->segment.rate > 0.0)
+    target_pos = (GstClockTime) demux->segment.start;
+  else
+    target_pos = (GstClockTime) demux->segment.stop;
+
+  /* select the requested Period in the Media Presentation */
+  current_period = 0;
+  for (list = g_list_first (dashdemux->client->periods); list;
+      list = g_list_next (list)) {
+    period = list->data;
+    current_pos = period->start;
+    current_period = period->number;
+    GST_DEBUG_OBJECT (demux, "Looking at period %u) start:%"
+        GST_TIME_FORMAT " - duration:%"
+        GST_TIME_FORMAT ") for position %" GST_TIME_FORMAT,
+        current_period, GST_TIME_ARGS (current_pos),
+        GST_TIME_ARGS (period->duration), GST_TIME_ARGS (target_pos));
+    if (current_pos <= target_pos
+        && target_pos <= current_pos + period->duration) {
+      break;
+    }
+  }
+  if (list == NULL) {
+    GST_WARNING_OBJECT (demux, "Could not find seeked Period");
+    return FALSE;
+  }
+  if (current_period != gst_mpd_client_get_period_index (dashdemux->client)) {
+    GST_DEBUG_OBJECT (demux, "Seeking to Period %d", current_period);
+
+    /* clean old active stream list, if any */
+    gst_active_streams_free (dashdemux->client);
+
+    /* setup video, audio and subtitle streams, starting from the new Period */
+    if (!gst_mpd_client_set_period_index (dashdemux->client, current_period)
+        || !gst_dash_demux_setup_all_streams (dashdemux))
+      return FALSE;
+    switched_period = TRUE;
+  }
+
+  /* Update the current sequence on all streams */
+  for (iter = (switched_period ? demux->next_streams : demux->streams); iter;
+      iter = g_list_next (iter)) {
+    GstDashDemuxStream *dashstream = iter->data;
+
+    if (flags & GST_SEEK_FLAG_FLUSH) {
+      gst_isoff_sidx_parser_clear (&dashstream->sidx_parser);
+      gst_isoff_sidx_parser_init (&dashstream->sidx_parser);
+    }
+    gst_dash_demux_stream_seek (iter->data, target_pos);
+  }
+  return TRUE;
+}
+
+static gint64
+gst_dash_demux_get_manifest_update_interval (GstAdaptiveDemux * demux)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  return MIN (dashdemux->client->mpd_node->minimumUpdatePeriod * 1000,
+      SLOW_CLOCK_UPDATE_INTERVAL);
+}
+
+static GstFlowReturn
+gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux,
+    GstBuffer * buffer)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  GstMpdClient *new_client = NULL;
+  GstMapInfo mapinfo;
+
+  GST_DEBUG_OBJECT (demux, "Updating manifest file from URL");
+
+  /* parse the manifest file */
+  new_client = gst_mpd_client_new ();
+  new_client->mpd_uri = g_strdup (demux->manifest_uri);
+  new_client->mpd_base_uri = g_strdup (demux->manifest_base_uri);
+  gst_buffer_map (buffer, &mapinfo, GST_MAP_READ);
+
+  if (gst_mpd_parse (new_client, (gchar *) mapinfo.data, mapinfo.size)) {
+    const gchar *period_id;
+    guint period_idx;
+    GList *iter;
+    GList *streams_iter;
+
+    /* prepare the new manifest and try to transfer the stream position
+     * status from the old manifest client  */
+
+    GST_DEBUG_OBJECT (demux, "Updating manifest");
+
+    period_id = gst_mpd_client_get_period_id (dashdemux->client);
+    period_idx = gst_mpd_client_get_period_index (dashdemux->client);
+
+    /* setup video, audio and subtitle streams, starting from current Period */
+    if (!gst_mpd_client_setup_media_presentation (new_client)) {
+      /* TODO */
+    }
+
+    if (period_id) {
+      if (!gst_mpd_client_set_period_id (new_client, period_id)) {
+        GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
+        return GST_FLOW_EOS;
+      }
+    } else {
+      if (!gst_mpd_client_set_period_index (new_client, period_idx)) {
+        GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
+        return GST_FLOW_EOS;
+      }
+    }
+
+    if (!gst_dash_demux_setup_mpdparser_streams (dashdemux, new_client)) {
+      GST_ERROR_OBJECT (demux, "Failed to setup streams on manifest " "update");
+      return GST_FLOW_ERROR;
+    }
+
+    /* update the streams to play from the next segment */
+    for (iter = demux->streams, streams_iter = new_client->active_streams;
+        iter && streams_iter;
+        iter = g_list_next (iter), streams_iter = g_list_next (streams_iter)) {
+      GstDashDemuxStream *demux_stream = iter->data;
+      GstActiveStream *new_stream = streams_iter->data;
+      GstClockTime ts;
+
+      if (!new_stream) {
+        GST_DEBUG_OBJECT (demux,
+            "Stream of index %d is missing from manifest update",
+            demux_stream->index);
+        return GST_FLOW_EOS;
+      }
+
+      if (gst_mpd_client_get_next_fragment_timestamp (dashdemux->client,
+              demux_stream->index, &ts)
+          || gst_mpd_client_get_last_fragment_timestamp_end (dashdemux->client,
+              demux_stream->index, &ts)) {
+
+        /* Due to rounding when doing the timescale conversions it might happen
+         * that the ts falls back to a previous segment, leading the same data
+         * to be downloaded twice. We try to work around this by always adding
+         * 10 microseconds to get back to the correct segment. The errors are
+         * usually on the order of nanoseconds so it should be enough.
+         */
+        GST_DEBUG_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (demux_stream),
+            "Current position: %" GST_TIME_FORMAT ", updating to %"
+            GST_TIME_FORMAT, GST_TIME_ARGS (ts),
+            GST_TIME_ARGS (ts + (10 * GST_USECOND)));
+        ts += 10 * GST_USECOND;
+        gst_mpd_client_stream_seek (new_client, new_stream, ts);
+      }
+
+      demux_stream->active_stream = new_stream;
+    }
+
+    gst_mpd_client_free (dashdemux->client);
+    dashdemux->client = new_client;
+
+    GST_DEBUG_OBJECT (demux, "Manifest file successfully updated");
+    if (dashdemux->clock_drift) {
+      gst_dash_demux_poll_clock_drift (dashdemux);
+    }
+  } else {
+    /* In most cases, this will happen if we set a wrong url in the
+     * source element and we have received the 404 HTML response instead of
+     * the manifest */
+    GST_WARNING_OBJECT (demux, "Error parsing the manifest.");
+    gst_buffer_unmap (buffer, &mapinfo);
+    return GST_FLOW_ERROR;
+  }
+
+  gst_buffer_unmap (buffer, &mapinfo);
+
+  return GST_FLOW_OK;
+}
+
+static gint64
+gst_dash_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream *
+    stream)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (stream->demux);
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
   GstDateTime *seg_end_time;
-  GstActiveStream *active_stream = stream->active_stream;
+  GstActiveStream *active_stream = dashstream->active_stream;
 
   seg_end_time =
-      gst_mpd_client_get_next_segment_availability_end_time (demux->client,
+      gst_mpd_client_get_next_segment_availability_end_time (dashdemux->client,
       active_stream);
 
   if (seg_end_time) {
@@ -1893,500 +1396,618 @@
     diff = gst_mpd_client_calculate_time_difference (cur_time, seg_end_time);
     gst_date_time_unref (seg_end_time);
     gst_date_time_unref (cur_time);
-    if (diff > 0) {
-      GST_DEBUG_OBJECT (demux,
-          "Selected fragment has end timestamp > now (%" G_GINT64_FORMAT
-          "), delaying download", diff);
-      gst_dash_demux_download_wait (stream, diff);
+    /* subtract the server's clock drift, so that if the server's
+       time is behind our idea of UTC, we need to sleep for longer
+       before requesting a fragment */
+    return diff - gst_dash_demux_get_clock_compensation (dashdemux);
+  }
+  return 0;
+}
+
+static gboolean
+gst_dash_demux_has_next_period (GstAdaptiveDemux * demux)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+
+  if (demux->segment.rate >= 0)
+    return gst_mpd_client_has_next_period (dashdemux->client);
+  else
+    return gst_mpd_client_has_previous_period (dashdemux->client);
+}
+
+static void
+gst_dash_demux_advance_period (GstAdaptiveDemux * demux)
+{
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+
+  g_return_if_fail (gst_mpd_client_has_next_period (dashdemux->client));
+
+  if (demux->segment.rate >= 0) {
+    if (!gst_mpd_client_set_period_index (dashdemux->client,
+            gst_mpd_client_get_period_index (dashdemux->client) + 1)) {
+      /* TODO error */
+      return;
+    }
+  } else {
+    if (!gst_mpd_client_set_period_index (dashdemux->client,
+            gst_mpd_client_get_period_index (dashdemux->client) - 1)) {
+      /* TODO error */
+      return;
     }
   }
+
+  gst_dash_demux_setup_all_streams (dashdemux);
+  gst_mpd_client_seek_to_first_segment (dashdemux->client);
+}
+
+static GstBuffer *
+_gst_buffer_split (GstBuffer * buffer, gint offset, gsize size)
+{
+  GstBuffer *newbuf = gst_buffer_copy_region (buffer,
+      GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META
+      | GST_BUFFER_COPY_MEMORY, offset, size == -1 ? size : size - offset);
+
+  gst_buffer_resize (buffer, 0, offset);
+
+  return newbuf;
 }
 
 static GstFlowReturn
-_src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+gst_dash_demux_stream_fragment_finished (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
 {
-  GstPad *srcpad = (GstPad *) parent;
-  GstDashDemux *demux = (GstDashDemux *) GST_PAD_PARENT (srcpad);
-  GstDashDemuxStream *stream = gst_pad_get_element_private (srcpad);
-  GstFlowReturn ret;
-  gboolean discont = FALSE;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  GstDashDemuxStream *dashstream = (GstDashDemuxStream *) stream;
 
-  if (stream->starting_fragment) {
-    if (demux->segment.rate < 0)
-      /* Set DISCONT flag for every first buffer in reverse playback mode
-       * as each fragment for its own has to be reversed */
-      discont = TRUE;
-    stream->starting_fragment = FALSE;
+  if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client) &&
+      dashstream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
+    /* fragment is advanced on data_received when byte limits are reached */
+    if (gst_dash_demux_stream_has_next_fragment (stream))
+      return GST_FLOW_OK;
+    return GST_FLOW_EOS;
+  }
 
-    GST_LOG_OBJECT (stream->pad, "set fragment pts=%" GST_TIME_FORMAT,
-        GST_TIME_ARGS (stream->current_fragment.timestamp));
+  if (G_UNLIKELY (stream->downloading_header || stream->downloading_index))
+    return GST_FLOW_OK;
 
-    GST_BUFFER_PTS (buffer) = stream->current_fragment.timestamp;
+  return gst_adaptive_demux_stream_advance_fragment (demux, stream,
+      stream->fragment.duration);
+}
 
-    if (stream->pending_segment) {
-      if (demux->timestamp_offset == -1)
-        demux->timestamp_offset = GST_BUFFER_PTS (buffer);
-      else
-        demux->timestamp_offset =
-            MIN (GST_BUFFER_PTS (buffer), demux->timestamp_offset);
+static GstFlowReturn
+gst_dash_demux_data_received (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstDashDemuxStream *dash_stream = (GstDashDemuxStream *) stream;
+  GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstBuffer *buffer;
+  gsize available;
 
-      /* And send a newsegment */
-      gst_pad_push_event (stream->pad, stream->pending_segment);
-      stream->pending_segment = NULL;
+  if (!gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client))
+    return GST_ADAPTIVE_DEMUX_CLASS (parent_class)->data_received (demux,
+        stream);
+
+  if (stream->downloading_index) {
+    GstIsoffParserResult res;
+    guint consumed;
+
+    available = gst_adapter_available (stream->adapter);
+    buffer = gst_adapter_take_buffer (stream->adapter, available);
+
+    if (dash_stream->sidx_parser.status != GST_ISOFF_SIDX_PARSER_FINISHED) {
+      res =
+          gst_isoff_sidx_parser_add_buffer (&dash_stream->sidx_parser, buffer,
+          &consumed);
+
+      if (res == GST_ISOFF_PARSER_ERROR) {
+      } else if (res == GST_ISOFF_PARSER_UNEXPECTED) {
+        /* this is not a 'sidx' index, just skip it and continue playback */
+      } else {
+        /* when finished, prepare for real data streaming */
+        if (dash_stream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
+          if (GST_CLOCK_TIME_IS_VALID (dash_stream->pending_seek_ts)) {
+            gst_dash_demux_stream_sidx_seek (dash_stream,
+                dash_stream->pending_seek_ts);
+            dash_stream->pending_seek_ts = GST_CLOCK_TIME_NONE;
+          } else {
+            SIDX (dash_stream)->entry_index = dash_stream->sidx_index;
+          }
+          dash_stream->sidx_current_remaining =
+              SIDX_CURRENT_ENTRY (dash_stream)->size;
+        } else if (consumed < available) {
+          GstBuffer *pending;
+          /* we still need to keep some data around for the next parsing round
+           * so just push what was already processed by the parser */
+          pending = _gst_buffer_split (buffer, consumed, -1);
+          gst_adapter_push (stream->adapter, pending);
+        }
+      }
     }
+    ret = gst_adaptive_demux_stream_push_buffer (stream, buffer);
+  } else if (dash_stream->sidx_parser.status == GST_ISOFF_SIDX_PARSER_FINISHED) {
 
-    /* make timestamp start from 0 by subtracting the offset */
-    GST_BUFFER_PTS (buffer) -= demux->timestamp_offset;
+    while (ret == GST_FLOW_OK
+        && ((available = gst_adapter_available (stream->adapter)) > 0)) {
+      gboolean advance = FALSE;
 
-    stream->position = demux->segment.position = GST_BUFFER_PTS (buffer);
+      if (available < dash_stream->sidx_current_remaining) {
+        buffer = gst_adapter_take_buffer (stream->adapter, available);
+        dash_stream->sidx_current_remaining -= available;
+      } else {
+        buffer =
+            gst_adapter_take_buffer (stream->adapter,
+            dash_stream->sidx_current_remaining);
+        dash_stream->sidx_current_remaining = 0;
+        advance = TRUE;
+      }
+      ret = gst_adaptive_demux_stream_push_buffer (stream, buffer);
+      if (advance) {
+        GstFlowReturn new_ret;
+        new_ret =
+            gst_adaptive_demux_stream_advance_fragment (demux, stream,
+            SIDX_CURRENT_ENTRY (dash_stream)->duration);
 
-  } else {
-    GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
-  }
-
-  if (stream->discont) {
-    discont = TRUE;
-    stream->discont = FALSE;
-  }
-
-  if (discont) {
-    GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous");
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-  } else {
-    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
-  }
-
-  GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
-  GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
-  GST_BUFFER_OFFSET (buffer) =
-      gst_mpd_client_get_segment_index (stream->active_stream) - 1;
-
-  /* accumulate time and size to get this chunk */
-  stream->download_total_time +=
-      g_get_monotonic_time () - stream->download_start_time;
-  stream->download_total_bytes += gst_buffer_get_size (buffer);
-
-  ret = gst_proxy_pad_chain_default (pad, parent, buffer);
-  stream->download_start_time = g_get_monotonic_time ();
-  GST_LOG_OBJECT (pad, "Chain res: %d %s", ret, gst_flow_get_name (ret));
-
-  if (ret != GST_FLOW_OK) {
-    if (ret < GST_FLOW_EOS) {
-      GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
-          ("stream stopped, reason %s", gst_flow_get_name (ret)));
-
-      /* TODO push this on all pads */
-      gst_pad_push_event (stream->pad, gst_event_new_eos ());
-    } else {
-      GST_DEBUG_OBJECT (stream->pad, "stream stopped, reason %s",
-          gst_flow_get_name (ret));
+        /* only overwrite if it was OK before */
+        if (ret == GST_FLOW_OK)
+          ret = new_ret;
+      }
     }
-
-    /* TODO properly stop tasks */
-    /* gst_hls_demux_pause_tasks (demux); */
-    g_cond_signal (&stream->fragment_download_cond);
+  } else {
+    /* this should be the main header, just push it all */
+    ret =
+        gst_adaptive_demux_stream_push_buffer (stream,
+        gst_adapter_take_buffer (stream->adapter,
+            gst_adapter_available (stream->adapter)));
   }
 
-  stream->last_ret = ret;
-
   return ret;
 }
 
-static gboolean
-_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+static void
+gst_dash_demux_stream_free (GstAdaptiveDemuxStream * stream)
 {
-  GstPad *srcpad = GST_PAD_CAST (parent);
-  GstDashDemuxStream *stream = gst_pad_get_element_private (srcpad);
+  GstDashDemuxStream *dash_stream = (GstDashDemuxStream *) stream;
 
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      g_cond_signal (&stream->fragment_download_cond);
-      break;
-    default:
-      break;
+  gst_isoff_sidx_parser_clear (&dash_stream->sidx_parser);
+}
+
+static GstDashDemuxClockDrift *
+gst_dash_demux_clock_drift_new (void)
+{
+  GstDashDemuxClockDrift *clock_drift;
+
+  clock_drift = g_slice_new0 (GstDashDemuxClockDrift);
+  g_mutex_init (&clock_drift->clock_lock);
+  g_cond_init (&clock_drift->clock_cond);
+  clock_drift->next_update = g_get_monotonic_time ();
+  return clock_drift;
+}
+
+static void
+gst_dash_demux_clock_drift_free (GstDashDemuxClockDrift * clock_drift)
+{
+  if (clock_drift) {
+    g_mutex_lock (&clock_drift->clock_lock);
+    if (clock_drift->ntp_clock)
+      g_object_unref (clock_drift->ntp_clock);
+    g_cond_clear (&clock_drift->clock_cond);
+    g_mutex_unlock (&clock_drift->clock_lock);
+    g_mutex_clear (&clock_drift->clock_lock);
+    g_slice_free (GstDashDemuxClockDrift, clock_drift);
+  }
+}
+
+/*
+ * The value attribute of the UTCTiming element contains a white-space
+ * separated list of servers that are recommended to be used in
+ * combination with the NTP protocol as defined in IETF RFC 5905 for
+ * getting the appropriate time.
+ *
+ * The DASH standard does not specify which version of NTP. This
+ * function only works with NTPv4 servers.
+*/
+static GstDateTime *
+gst_dash_demux_poll_ntp_server (GstDashDemuxClockDrift * clock_drift,
+    gchar ** urls)
+{
+  GstClockTime ntp_clock_time;
+  GDateTime *dt, *dt2;
+
+  if (!clock_drift->ntp_clock) {
+    GResolver *resolver;
+    GList *inet_addrs;
+    GError *err;
+    gchar *ip_addr;
+
+    resolver = g_resolver_get_default ();
+    /* We don't round-robin NTP servers. If the manifest specifies multiple
+       NTP time servers, select one at random */
+    clock_drift->selected_url = g_random_int_range (0, g_strv_length (urls));
+    GST_DEBUG ("Connecting to NTP time server %s",
+        urls[clock_drift->selected_url]);
+    inet_addrs = g_resolver_lookup_by_name (resolver,
+        urls[clock_drift->selected_url], NULL, &err);
+    g_object_unref (resolver);
+    if (!inet_addrs || g_list_length (inet_addrs) == 0) {
+      GST_ERROR ("Failed to resolve hostname of NTP server: %s",
+          err ? (err->message) : "unknown error");
+      if (inet_addrs)
+        g_resolver_free_addresses (inet_addrs);
+      if (err)
+        g_error_free (err);
+      return NULL;
+    }
+    ip_addr =
+        g_inet_address_to_string ((GInetAddress
+            *) (g_list_first (inet_addrs)->data));
+    clock_drift->ntp_clock = gst_ntp_clock_new ("dashntp", ip_addr, 123, 0);
+    g_free (ip_addr);
+    g_resolver_free_addresses (inet_addrs);
+    if (!clock_drift->ntp_clock) {
+      GST_ERROR ("Failed to create NTP clock");
+      return NULL;
+    }
+    if (!gst_clock_wait_for_sync (clock_drift->ntp_clock, 5 * GST_SECOND)) {
+      g_object_unref (clock_drift->ntp_clock);
+      clock_drift->ntp_clock = NULL;
+      GST_ERROR ("Failed to lock to NTP clock");
+      return NULL;
+    }
+  }
+  ntp_clock_time = gst_clock_get_time (clock_drift->ntp_clock);
+  if (ntp_clock_time == GST_CLOCK_TIME_NONE) {
+    GST_ERROR ("Failed to get time from NTP clock");
+    return NULL;
+  }
+  ntp_clock_time -= NTP_TO_UNIX_EPOCH * GST_SECOND;
+  dt = g_date_time_new_from_unix_utc (ntp_clock_time / GST_SECOND);
+  if (!dt) {
+    GST_ERROR ("Failed to create GstDateTime");
+    return NULL;
+  }
+  ntp_clock_time =
+      gst_util_uint64_scale (ntp_clock_time % GST_SECOND, 1000000, GST_SECOND);
+  dt2 = g_date_time_add (dt, ntp_clock_time);
+  g_date_time_unref (dt);
+  return gst_date_time_new_from_g_date_time (dt2);
+}
+
+struct Rfc822TimeZone
+{
+  const gchar *name;
+  gfloat tzoffset;
+};
+
+/*
+ Parse an RFC822 (section 5) date-time from the Date: field in the
+ HTTP response. 
+ See https://tools.ietf.org/html/rfc822#section-5
+*/
+static GstDateTime *
+gst_dash_demux_parse_http_head (GstDashDemuxClockDrift * clock_drift,
+    GstFragment * download)
+{
+  static const gchar *months[] = { NULL, "Jan", "Feb", "Mar", "Apr",
+    "May", "Jun", "Jul", "Aug",
+    "Sep", "Oct", "Nov", "Dec", NULL
+  };
+  static const struct Rfc822TimeZone timezones[] = {
+    {"Z", 0},
+    {"UT", 0},
+    {"GMT", 0},
+    {"BST", 1},
+    {"EST", -5},
+    {"EDT", -4},
+    {"CST", -6},
+    {"CDT", -5},
+    {"MST", -7},
+    {"MDT", -6},
+    {"PST", -8},
+    {"PDT", -7},
+    {NULL, 0}
+  };
+  GstDateTime *value = NULL;
+  const GstStructure *response_headers;
+  const gchar *http_date;
+  const GValue *val;
+  gint ret;
+  const gchar *pos;
+  gint year = -1, month = -1, day = -1, hour = -1, minute = -1, second = -1;
+  gchar zone[6];
+  gchar monthstr[4];
+  gfloat tzoffset = 0;
+  gboolean parsed_tz = FALSE;
+
+  g_return_val_if_fail (download != NULL, NULL);
+  g_return_val_if_fail (download->headers != NULL, NULL);
+
+  val = gst_structure_get_value (download->headers, "response-headers");
+  if (!val) {
+    return NULL;
+  }
+  response_headers = gst_value_get_structure (val);
+  http_date = gst_structure_get_string (response_headers, "Date");
+  if (!http_date) {
+    return NULL;
   }
 
-  gst_event_unref (event);
+  /* skip optional text version of day of the week */
+  pos = strchr (http_date, ',');
+  if (pos)
+    pos++;
+  else
+    pos = http_date;
+  ret =
+      sscanf (pos, "%02d %3s %04d %02d:%02d:%02d %5s", &day, monthstr, &year,
+      &hour, &minute, &second, zone);
+  if (ret == 7) {
+    gchar *z = zone;
+    for (int i = 1; months[i]; ++i) {
+      if (g_ascii_strncasecmp (months[i], monthstr, strlen (months[i])) == 0) {
+        month = i;
+        break;
+      }
+    }
+    while (*z == ' ') {
+      ++z;
+    }
+    for (int i = 0; timezones[i].name && !parsed_tz; ++i) {
+      if (g_ascii_strncasecmp (timezones[i].name, z,
+              strlen (timezones[i].name)) == 0) {
+        tzoffset = timezones[i].tzoffset;
+        parsed_tz = TRUE;
+      }
+    }
+    if (!parsed_tz) {
+      gint hh, mm;
+      gboolean neg = FALSE;
+      /* check if it is in the form +-HHMM */
+      if (*z == '+' || *z == '-') {
+        if (*z == '+')
+          ++z;
+        else if (*z == '-') {
+          ++z;
+          neg = TRUE;
+        }
+        ret = sscanf (z, "%02d%02d", &hh, &mm);
+        if (ret == 2) {
+          tzoffset = hh;
+          tzoffset += mm / 60.0;
+          if (neg)
+            tzoffset = -tzoffset;
+          parsed_tz = TRUE;
+        }
+      }
+    }
+  }
+  if (month > 0 && parsed_tz) {
+    value = gst_date_time_new (tzoffset,
+        year, month, day, hour, minute, second);
+  }
+  return value;
+}
 
-  return TRUE;
+/*
+   The timing information is contained in the message body of the HTTP
+   response and contains a time value formatted according to NTP timestamp
+   format in IETF RFC 5905.
+
+       0                   1                   2                   3
+       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+      |                            Seconds                            |
+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+      |                            Fraction                           |
+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+                             NTP Timestamp Format
+*/
+static GstDateTime *
+gst_dash_demux_parse_http_ntp (GstDashDemuxClockDrift * clock_drift,
+    GstBuffer * buffer)
+{
+  gint64 seconds;
+  guint64 fraction;
+  GDateTime *dt, *dt2;
+  GstMapInfo mapinfo;
+
+  /* See https://tools.ietf.org/html/rfc5905#page-12 for details of
+     the NTP Timestamp Format */
+  gst_buffer_map (buffer, &mapinfo, GST_MAP_READ);
+  if (mapinfo.size != 8) {
+    gst_buffer_unmap (buffer, &mapinfo);
+    return NULL;
+  }
+  seconds = GST_READ_UINT32_BE (mapinfo.data);
+  fraction = GST_READ_UINT32_BE (mapinfo.data + 4);
+  gst_buffer_unmap (buffer, &mapinfo);
+  fraction = gst_util_uint64_scale (fraction, 1000000,
+      G_GUINT64_CONSTANT (1) << 32);
+  /* subtract constant to convert from 1900 based time to 1970 based time */
+  seconds -= NTP_TO_UNIX_EPOCH;
+  dt = g_date_time_new_from_unix_utc (seconds);
+  dt2 = g_date_time_add (dt, fraction);
+  g_date_time_unref (dt);
+  return gst_date_time_new_from_g_date_time (dt2);
+}
+
+/*
+  The timing information is contained in the message body of the
+  HTTP response and contains a time value formatted according to
+  xs:dateTime as defined in W3C XML Schema Part 2: Datatypes specification.
+*/
+static GstDateTime *
+gst_dash_demux_parse_http_xsdate (GstDashDemuxClockDrift * clock_drift,
+    GstBuffer * buffer)
+{
+  GstDateTime *value;
+  GstMapInfo mapinfo;
+
+  /* the string from the server might not be zero terminated */
+  gst_buffer_resize (buffer, 0, gst_buffer_get_size (buffer) + 1);
+  gst_buffer_map (buffer, &mapinfo, GST_MAP_READ | GST_MAP_WRITE);
+  mapinfo.data[mapinfo.size - 1] = '\0';
+  value = gst_date_time_new_from_iso8601_string ((const gchar *) mapinfo.data);
+  gst_buffer_unmap (buffer, &mapinfo);
+  return value;
 }
 
 static gboolean
-_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_dash_demux_poll_clock_drift (GstDashDemux * demux)
 {
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_ALLOCATION:
-      return FALSE;
-      break;
-    default:
-      break;
+  GstDashDemuxClockDrift *clock_drift;
+  GDateTime *start = NULL, *end;
+  GstBuffer *buffer = NULL;
+  GstDateTime *value = NULL;
+  gboolean ret = FALSE;
+  gint64 now;
+  GstMPDUTCTimingType method;
+  gchar **urls;
+
+  g_return_val_if_fail (demux != NULL, FALSE);
+  g_return_val_if_fail (demux->clock_drift != NULL, FALSE);
+  clock_drift = demux->clock_drift;
+  now = g_get_monotonic_time ();
+  if (now < clock_drift->next_update) {
+    /*TODO: If a fragment fails to download in adaptivedemux, it waits
+       for a manifest reload before another attempt to fetch a fragment.
+       Section 10.8.6 of the DVB-DASH standard states that the DASH client
+       shall refresh the manifest and resynchronise to one of the time sources.
+
+       Currently the fact that the manifest refresh follows a download failure
+       does not make it into dashdemux. */
+    return TRUE;
   }
-
-  return gst_pad_query_default (pad, parent, query);
-}
-
-static gboolean
-gst_dash_demux_stream_update_source (GstDashDemuxStream * stream,
-    const gchar * uri, const gchar * referer, gboolean refresh,
-    gboolean allow_cache)
-{
-  GstDashDemux *demux = stream->demux;
-
-  if (!gst_uri_is_valid (uri)) {
-    GST_WARNING_OBJECT (stream->pad, "Invalid URI: %s", uri);
-    stream->last_ret = GST_FLOW_ERROR;
+  urls = gst_mpd_client_get_utc_timing_sources (demux->client,
+      SUPPORTED_CLOCK_FORMATS, &method);
+  if (!urls) {
     return FALSE;
   }
+  /* Update selected_url just in case the number of URLs in the UTCTiming
+     element has shrunk since the last poll */
+  clock_drift->selected_url = clock_drift->selected_url % g_strv_length (urls);
+  g_mutex_lock (&clock_drift->clock_lock);
 
-  if (stream->src != NULL) {
-    gchar *old_protocol, *new_protocol;
-    gchar *old_uri;
-
-    old_uri = gst_uri_handler_get_uri (GST_URI_HANDLER (stream->src));
-    old_protocol = gst_uri_get_protocol (old_uri);
-    new_protocol = gst_uri_get_protocol (uri);
-
-    if (!g_str_equal (old_protocol, new_protocol)) {
-      gst_object_unref (stream->src_srcpad);
-      gst_element_set_state (stream->src, GST_STATE_NULL);
-      gst_bin_remove (GST_BIN_CAST (demux), stream->src);
-      stream->src = NULL;
-      stream->src_srcpad = NULL;
-      GST_DEBUG_OBJECT (demux, "Can't re-use old source element");
-    } else {
-      GError *err = NULL;
-
-      GST_DEBUG_OBJECT (demux, "Re-using old source element");
-      if (!gst_uri_handler_set_uri (GST_URI_HANDLER (stream->src), uri, &err)) {
-        GST_DEBUG_OBJECT (demux, "Failed to re-use old source element: %s",
-            err->message);
-        g_clear_error (&err);
-        gst_element_set_state (stream->src, GST_STATE_NULL);
-        gst_bin_remove (GST_BIN_CAST (demux), stream->src);
-        stream->src = NULL;
-      }
+  if (method == GST_MPD_UTCTIMING_TYPE_NTP) {
+    value = gst_dash_demux_poll_ntp_server (clock_drift, urls);
+    if (!value) {
+      GST_ERROR_OBJECT (demux, "Failed to fetch time from NTP server %s",
+          urls[clock_drift->selected_url]);
+      g_mutex_unlock (&clock_drift->clock_lock);
+      goto quit;
     }
-    g_free (old_uri);
-    g_free (old_protocol);
-    g_free (new_protocol);
   }
-
-  if (stream->src == NULL) {
-    GObjectClass *gobject_class;
-    GstPad *internal_pad;
-
-    stream->src = gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL);
-    if (stream->src == NULL) {
-      GST_ELEMENT_ERROR (demux, CORE, MISSING_PLUGIN,
-          ("Missing plugin to handle URI: '%s'", uri), (NULL));
-      return FALSE;
+  start = g_date_time_new_now_utc ();
+  if (!value) {
+    GstFragment *download;
+    gint64 range_start = 0, range_end = -1;
+    GST_DEBUG_OBJECT (demux, "Fetching current time from %s",
+        urls[clock_drift->selected_url]);
+    if (method == GST_MPD_UTCTIMING_TYPE_HTTP_HEAD) {
+      range_start = -1;
     }
-
-    gobject_class = G_OBJECT_GET_CLASS (stream->src);
-
-    if (g_object_class_find_property (gobject_class, "compress"))
-      g_object_set (stream->src, "compress", FALSE, NULL);
-    if (g_object_class_find_property (gobject_class, "keep-alive"))
-      g_object_set (stream->src, "keep-alive", TRUE, NULL);
-    if (g_object_class_find_property (gobject_class, "extra-headers")) {
-      if (referer || refresh || !allow_cache) {
-        GstStructure *extra_headers = gst_structure_new_empty ("headers");
-
-        if (referer)
-          gst_structure_set (extra_headers, "Referer", G_TYPE_STRING, referer,
-              NULL);
-
-        if (!allow_cache)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "no-cache", NULL);
-        else if (refresh)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "max-age=0", NULL);
-
-        g_object_set (stream->src, "extra-headers", extra_headers, NULL);
-
-        gst_structure_free (extra_headers);
+    download =
+        gst_uri_downloader_fetch_uri_with_range (GST_ADAPTIVE_DEMUX_CAST
+        (demux)->downloader, urls[clock_drift->selected_url], NULL, TRUE, TRUE,
+        TRUE, range_start, range_end, NULL);
+    if (download) {
+      if (method == GST_MPD_UTCTIMING_TYPE_HTTP_HEAD && download->headers) {
+        value = gst_dash_demux_parse_http_head (clock_drift, download);
       } else {
-        g_object_set (stream->src, "extra-headers", NULL, NULL);
+        buffer = gst_fragment_get_buffer (download);
       }
+      g_object_unref (download);
     }
-
-    gst_element_set_locked_state (stream->src, TRUE);
-    gst_bin_add (GST_BIN_CAST (demux), stream->src);
-    stream->src_srcpad = gst_element_get_static_pad (stream->src, "src");
-
-    gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (stream->pad),
-        stream->src_srcpad);
-
-    /* set up our internal pad to drop all events from
-     * the http src we don't care about. On the chain function
-     * we just push the buffer forward, but this way dash can get
-     * the flow return from downstream */
-    internal_pad =
-        GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (stream->pad)));
-    gst_pad_set_chain_function (GST_PAD_CAST (internal_pad), _src_chain);
-    gst_pad_set_event_function (GST_PAD_CAST (internal_pad), _src_event);
-    /* need to set query otherwise deadlocks happen with allocation queries */
-    gst_pad_set_query_function (GST_PAD_CAST (internal_pad), _src_query);
-    gst_object_unref (internal_pad);
   }
-  return TRUE;
-}
-
-/* must be called with the stream's fragment_download_lock */
-static void
-gst_dash_demux_stream_download_uri (GstDashDemux * demux,
-    GstDashDemuxStream * stream, const gchar * uri, gint64 start, gint64 end)
-{
-  GST_DEBUG_OBJECT (stream->pad, "Downloading uri: %s, range:%" G_GINT64_FORMAT
-      " - %" G_GINT64_FORMAT, uri, start, end);
-
-  if (!gst_dash_demux_stream_update_source (stream, uri, NULL, FALSE, TRUE)) {
-    return;
+  g_mutex_unlock (&clock_drift->clock_lock);
+  if (!value && !buffer) {
+    GST_ERROR_OBJECT (demux, "Failed to fetch time from %s",
+        urls[clock_drift->selected_url]);
+    goto quit;
   }
-
-  if (gst_element_set_state (stream->src,
-          GST_STATE_READY) != GST_STATE_CHANGE_FAILURE) {
-    if (start != 0 || end != -1) {
-      if (!gst_element_send_event (stream->src, gst_event_new_seek (1.0,
-                  GST_FORMAT_BYTES, (GstSeekFlags) GST_SEEK_FLAG_FLUSH,
-                  GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, end))) {
-
-        /* looks like the source can't handle seeks in READY */
-/*
-        *err = g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_NOT_IMPLEMENTED,
-            "Source element can't handle range requests");
-*/
-        stream->last_ret = GST_FLOW_ERROR;
-      }
-    }
-
-    if (G_LIKELY (stream->last_ret == GST_FLOW_OK)) {
-      /* flush the proxypads so that the EOS state is reset */
-      gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_start ());
-      gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_stop (TRUE));
-
-      stream->download_start_time = g_get_monotonic_time ();
-      gst_element_sync_state_with_parent (stream->src);
-
-      /* wait for the fragment to be completely downloaded */
-      GST_DEBUG_OBJECT (stream->pad,
-          "Waiting for fragment download to finish: %s", uri);
-      g_cond_wait (&stream->fragment_download_cond,
-          &stream->fragment_download_lock);
-    }
-  } else {
-    stream->last_ret = GST_FLOW_CUSTOM_ERROR;
+  end = g_date_time_new_now_utc ();
+  if (!value && method == GST_MPD_UTCTIMING_TYPE_HTTP_NTP) {
+    value = gst_dash_demux_parse_http_ntp (clock_drift, buffer);
+  } else if (!value) {
+    /* GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE or GST_MPD_UTCTIMING_TYPE_HTTP_ISO */
+    value = gst_dash_demux_parse_http_xsdate (clock_drift, buffer);
   }
-
-  gst_element_set_state (stream->src, GST_STATE_READY);
-}
-
-static void
-gst_dash_demux_stream_download_fragment (GstDashDemux * demux,
-    GstDashDemuxStream * stream)
-{
-  GstActiveStream *active_stream;
-  guint stream_idx = stream->index;
-  GstMediaFragmentInfo *fragment = &stream->current_fragment;
-
-  if (G_UNLIKELY (stream->restart_download)) {
-    GstSegment segment;
-    GstClockTime cur, ts;
-    gint64 pos;
-    GstEvent *seg_event;
-
-    GST_DEBUG_OBJECT (stream->pad,
-        "Reactivating stream after to reconfigure event");
-
-    cur = GST_CLOCK_TIME_IS_VALID (stream->position) ? stream->position : 0;
-
-    if (gst_pad_peer_query_position (stream->pad, GST_FORMAT_TIME, &pos)) {
-      ts = (GstClockTime) pos;
-      GST_DEBUG_OBJECT (stream->pad, "Downstream position: %"
-          GST_TIME_FORMAT, GST_TIME_ARGS (ts));
+  if (buffer)
+    gst_buffer_unref (buffer);
+  if (value) {
+    GTimeSpan download_duration = g_date_time_difference (end, start);
+    GDateTime *client_now, *server_now;
+    /* We don't know when the server sampled its clock, but we know
+       it must have been before "end" and probably after "start".
+       A reasonable estimate is to use (start+end)/2
+     */
+    client_now = g_date_time_add (start, download_duration / 2);
+    server_now = gst_date_time_to_g_date_time (value);
+    /* If gst_date_time_new_from_iso8601_string is given an unsupported
+       ISO 8601 format, it can return a GstDateTime that is not valid,
+       which causes gst_date_time_to_g_date_time to return NULL */
+    if (server_now) {
+      g_mutex_lock (&clock_drift->clock_lock);
+      clock_drift->clock_compensation =
+          g_date_time_difference (server_now, client_now);
+      clock_drift->got_clock = TRUE;
+      g_cond_broadcast (&clock_drift->clock_cond);
+      g_mutex_unlock (&clock_drift->clock_lock);
+      GST_DEBUG_OBJECT (demux,
+          "Difference between client and server clocks is %lfs",
+          ((double) clock_drift->clock_compensation) / 1000000.0);
+      g_date_time_unref (server_now);
+      ret = TRUE;
     } else {
-      ts = demux->segment.position;
-      GST_DEBUG_OBJECT (stream->pad, "Downstream position query failed, "
-          "failling back to looking at other pads");
+      GST_ERROR_OBJECT (demux, "Failed to parse DateTime from server");
     }
-
-    GST_DEBUG_OBJECT (stream->pad, "Restarting stream at "
-        "position %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
-
-    gst_segment_copy_into (&demux->segment, &segment);
-    if (GST_CLOCK_TIME_IS_VALID (ts)) {
-      gst_mpd_client_stream_seek (demux->client, stream->active_stream, ts);
-
-      if (cur < ts) {
-        segment.position = ts;
-      }
-    }
-    seg_event = gst_event_new_segment (&segment);
-    GST_DEBUG_OBJECT (stream->pad, "Sending restart segment: %"
-        GST_PTR_FORMAT, seg_event);
-    gst_pad_push_event (stream->pad, seg_event);
-
-    stream->restart_download = FALSE;
-  }
-
-  g_mutex_lock (&stream->fragment_download_lock);
-  if (gst_mpd_client_get_next_fragment (demux->client, stream_idx, fragment,
-          stream->demux->segment.rate > 0.0)) {
-    GST_INFO_OBJECT (stream->pad,
-        "Fetching next fragment %s ts:%" GST_TIME_FORMAT " dur:%"
-        GST_TIME_FORMAT " Range:%" G_GINT64_FORMAT "-%" G_GINT64_FORMAT,
-        fragment->uri, GST_TIME_ARGS (fragment->timestamp),
-        GST_TIME_ARGS (fragment->duration),
-        fragment->range_start, fragment->range_end);
-
-    /* Reset last flow return */
-    stream->last_ret = GST_FLOW_OK;
-    stream->starting_fragment = TRUE;
-
-    if (stream->need_header) {
-      /* We need to fetch a new header */
-      gst_dash_demux_get_next_header (demux, stream);
-      stream->need_header = FALSE;
-    }
-
-    if (stream->last_ret != GST_FLOW_OK) {
-      GST_WARNING_OBJECT (stream->pad, "Failed to download headers");
-      goto exit;
-    }
-
-    if (demux->cancelled)
-      goto exit;
-
-    /* it is possible to have an index per fragment, so check and download */
-    if (fragment->index_uri || fragment->index_range_start
-        || fragment->index_range_end != -1) {
-      const gchar *uri = fragment->index_uri;
-
-      if (!uri)                 /* fallback to default media uri */
-        uri = fragment->uri;
-
-      GST_DEBUG_OBJECT (stream->pad,
-          "Fragment index download: %s %" G_GINT64_FORMAT "-%"
-          G_GINT64_FORMAT, uri, fragment->index_range_start,
-          fragment->index_range_end);
-      gst_dash_demux_stream_download_uri (demux, stream, uri,
-          fragment->index_range_start, fragment->index_range_end);
-    }
-
-    if (stream->last_ret != GST_FLOW_OK) {
-      GST_WARNING_OBJECT (stream->pad, "Failed to download fragment headers");
-      goto exit;
-    }
-
-    if (demux->cancelled)
-      goto exit;
-
-    /* now get the real fragment */
-    gst_dash_demux_stream_download_uri (demux, stream, fragment->uri,
-        fragment->range_start, fragment->range_end);
-
-    if (stream->last_ret < GST_FLOW_EOS) {
-      gst_media_fragment_info_clear (fragment);
-      goto exit;
-    }
-
-    active_stream = stream->active_stream;
-    if (active_stream == NULL) {
-      gst_media_fragment_info_clear (fragment);
-      stream->last_ret = GST_FLOW_ERROR;
-      goto exit;
-    }
-
-    if (stream->last_ret == GST_FLOW_OK) {
-      stream->position += fragment->duration;
-    }
-
-    gst_media_fragment_info_clear (fragment);
+    g_date_time_unref (client_now);
+    gst_date_time_unref (value);
   } else {
-    GST_WARNING_OBJECT (demux, "Failed to download fragment for stream %p %d",
-        stream, stream->index);
+    GST_ERROR_OBJECT (demux, "Failed to parse DateTime from server");
   }
-
-
-exit:
-  g_mutex_unlock (&stream->fragment_download_lock);
-
-  if (stream->last_ret == GST_FLOW_OK)
-    gst_element_set_state (stream->src, GST_STATE_READY);
-  else
-    gst_element_set_state (stream->src, GST_STATE_NULL);
-}
-
-/* gst_dash_demux_stream_get_next_fragment:
- *
- * Get the next fragments for the stream with the earlier timestamp.
- * It returns the selected timestamp so the caller can deal with
- * sync issues in case the stream is live.
- * 
- * This function uses the generic URI downloader API.
- *
- * Returns FALSE if an error occured while downloading fragments
- */
-static GstFlowReturn
-gst_dash_demux_stream_get_next_fragment (GstDashDemuxStream * stream,
-    GstClockTime * ts)
-{
-  GstDashDemux *demux = stream->demux;
-
-  if (stream->stream_eos)
-    return GST_FLOW_EOS;
-
-  if (stream->last_ret == GST_FLOW_NOT_LINKED) {
-    GST_LOG_OBJECT (demux, "Skipping stream %p %s:%s : not-linked",
-        stream, GST_DEBUG_PAD_NAME (stream->pad));
-    return GST_FLOW_NOT_LINKED;
-  }
-
-  if (!gst_mpd_client_get_next_fragment_timestamp (demux->client,
-          stream->index, ts)) {
-    GST_INFO_OBJECT (demux,
-        "This Period doesn't contain more fragments for stream %u",
-        stream->index);
-
-    /* check if this is live and we should wait for more data */
-    if (gst_mpd_client_is_live (demux->client)
-        && demux->client->mpd_node->minimumUpdatePeriod != -1) {
-      return GST_FLOW_OK;       /* TODO wait */
+  g_date_time_unref (end);
+quit:
+  if (start)
+    g_date_time_unref (start);
+  /* if multiple URLs were specified, use a simple round-robin to
+     poll each server */
+  g_mutex_lock (&clock_drift->clock_lock);
+  if (method == GST_MPD_UTCTIMING_TYPE_NTP) {
+    clock_drift->next_update = now + FAST_CLOCK_UPDATE_INTERVAL;
+  } else {
+    clock_drift->selected_url =
+        (1 + clock_drift->selected_url) % g_strv_length (urls);
+    if (ret) {
+      clock_drift->next_update = now + SLOW_CLOCK_UPDATE_INTERVAL;
+    } else {
+      clock_drift->next_update = now + FAST_CLOCK_UPDATE_INTERVAL;
     }
-    return GST_FLOW_EOS;
   }
-
-  /*
-   * If this is a live stream, check the segment end time to make sure
-   * it is available to download
-   */
-  if (gst_mpd_client_is_live (demux->client) &&
-      demux->client->mpd_node->minimumUpdatePeriod != -1) {
-
-    gst_dash_demux_wait_for_fragment_to_be_available (demux, stream);
-  }
-
-  /* Get the fragment corresponding to each stream index */
-  gst_dash_demux_stream_download_fragment (demux, stream);
-
-  demux->end_of_period = FALSE;
-
-  if (stream->last_ret != GST_FLOW_OK) {
-    GST_WARNING_OBJECT (stream->pad, "Failed to download fragment: %s",
-        gst_flow_get_name (stream->last_ret));
-  }
-  return stream->last_ret;
+  g_mutex_unlock (&clock_drift->clock_lock);
+  return ret;
 }
 
-static void
-gst_dash_demux_download_wait (GstDashDemuxStream * stream,
-    GstClockTime time_diff)
+static GTimeSpan
+gst_dash_demux_get_clock_compensation (GstDashDemux * demux)
 {
-  gint64 end_time = g_get_monotonic_time () + time_diff / GST_USECOND;
+  GTimeSpan rv = 0;
+  if (demux->clock_drift) {
+    g_mutex_lock (&demux->clock_drift->clock_lock);
+    rv = demux->clock_drift->clock_compensation;
+    g_mutex_unlock (&demux->clock_drift->clock_lock);
+  }
+  GST_LOG_OBJECT (demux, "Clock drift %" GST_STIME_FORMAT, GST_STIME_ARGS (rv));
+  return rv;
+}
 
-  GST_DEBUG_OBJECT (stream->pad, "Download waiting for %" GST_TIME_FORMAT,
-      GST_TIME_ARGS (time_diff));
-  g_cond_wait_until (&stream->download_cond, &stream->download_mutex, end_time);
-  GST_DEBUG_OBJECT (stream->pad, "Download finished waiting");
+static GDateTime *
+gst_dash_demux_get_server_now_utc (GstDashDemux * demux)
+{
+  GDateTime *client_now = g_date_time_new_now_utc ();
+  GDateTime *server_now = g_date_time_add (client_now,
+      gst_dash_demux_get_clock_compensation (demux));
+  g_date_time_unref (client_now);
+  return server_now;
 }
diff --git a/ext/dash/gstdashdemux.h b/ext/dash/gstdashdemux.h
index 0c0f799..ca2af31 100644
--- a/ext/dash/gstdashdemux.h
+++ b/ext/dash/gstdashdemux.h
@@ -31,9 +31,11 @@
 #define __GST_DASH_DEMUX_H__
 
 #include <gst/gst.h>
+#include <gst/adaptivedemux/gstadaptivedemux.h>
 #include <gst/base/gstadapter.h>
 #include <gst/base/gstdataqueue.h>
 #include "gstmpdparser.h"
+#include "gstisoff.h"
 #include <gst/uridownloader/gsturidownloader.h>
 
 G_BEGIN_DECLS
@@ -50,48 +52,26 @@
 #define GST_DASH_DEMUX_CAST(obj) \
 	((GstDashDemux *)obj)
 
+typedef struct _GstDashDemuxClockDrift GstDashDemuxClockDrift;
 typedef struct _GstDashDemuxStream GstDashDemuxStream;
 typedef struct _GstDashDemux GstDashDemux;
 typedef struct _GstDashDemuxClass GstDashDemuxClass;
 
 struct _GstDashDemuxStream
 {
-  GstPad *pad;
-
-  GstDashDemux *demux;
+  GstAdaptiveDemuxStream parent;
 
   gint index;
   GstActiveStream *active_stream;
 
-  GstCaps *input_caps;
-
-  GstFlowReturn last_ret;
-  GstClockTime position;
-  gboolean restart_download;
-
-  GstEvent *pending_segment;
-
-  gboolean stream_eos;
-  gboolean need_header;
-  gboolean discont;
-
-  /* Download task */
-  GMutex download_mutex;
-  GCond download_cond;
-  GstTask *download_task;
-  GRecMutex download_task_lock;
-
-  /* download tooling */
-  GstElement *src;
-  GstPad *src_srcpad;
-  GMutex fragment_download_lock;
-  GCond fragment_download_cond;
   GstMediaFragmentInfo current_fragment;
-  gboolean starting_fragment;
-  gint64 download_start_time;
-  gint64 download_total_time;
-  gint64 download_total_bytes;
-  gint current_download_rate;
+
+  /* index parsing */
+  GstSidxParser sidx_parser;
+  gsize sidx_current_remaining;
+  gint sidx_index;
+  gint64 sidx_base_offset;
+  GstClockTime pending_seek_ts;
 };
 
 /**
@@ -101,40 +81,29 @@
  */
 struct _GstDashDemux
 {
-  GstBin parent;
-  GstPad *sinkpad;
+  GstAdaptiveDemux parent;
 
-  gboolean have_group_id;
-  guint group_id;
-
-  GSList *streams;
   GSList *next_periods;
 
-  GstSegment segment;
-  GstClockTime timestamp_offset;
-
-  GstBuffer *manifest;
-  GstUriDownloader *downloader;
   GstMpdClient *client;         /* MPD client */
   GMutex client_lock;
 
+  GstDashDemuxClockDrift *clock_drift;
+
   gboolean end_of_period;
   gboolean end_of_manifest;
 
   /* Properties */
   GstClockTime max_buffering_time;      /* Maximum buffering time accumulated during playback */
-  gfloat bandwidth_usage;       /* Percentage of the available bandwidth to use       */
   guint64 max_bitrate;          /* max of bitrate supported by target decoder         */
 
-  gboolean cancelled;
-
-  /* Manifest update */
-  GstClockTime last_manifest_update;
+  gint n_audio_streams;
+  gint n_video_streams;
 };
 
 struct _GstDashDemuxClass
 {
-  GstBinClass parent_class;
+  GstAdaptiveDemuxClass parent_class;
 };
 
 GType gst_dash_demux_get_type (void);
diff --git a/ext/dash/gstisoff.c b/ext/dash/gstisoff.c
new file mode 100644
index 0000000..e67b11a
--- /dev/null
+++ b/ext/dash/gstisoff.c
@@ -0,0 +1,187 @@
+/*
+ * ISO File Format parsing library
+ *
+ * gstisoff.h
+ *
+ * Copyright (C) 2015 Samsung Electronics. All rights reserved.
+ *   Author: Thiago Santos <thiagoss@osg.samsung.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.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library (COPYING); if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gstisoff.h"
+#include <gst/base/gstbytereader.h>
+
+void
+gst_isoff_sidx_parser_init (GstSidxParser * parser)
+{
+  parser->status = GST_ISOFF_SIDX_PARSER_INIT;
+  parser->cumulative_entry_size = 0;
+  parser->sidx.entries = NULL;
+  parser->sidx.entries_count = 0;
+}
+
+void
+gst_isoff_sidx_parser_clear (GstSidxParser * parser)
+{
+  g_free (parser->sidx.entries);
+  parser->sidx.entries = NULL;
+}
+
+static void
+gst_isoff_parse_sidx_entry (GstSidxBoxEntry * entry, GstByteReader * reader)
+{
+  guint32 aux;
+
+  aux = gst_byte_reader_get_uint32_be_unchecked (reader);
+  entry->ref_type = aux >> 31;
+  entry->size = aux & 0x7FFFFFFF;
+  entry->duration = gst_byte_reader_get_uint32_be_unchecked (reader);
+  aux = gst_byte_reader_get_uint32_be_unchecked (reader);
+  entry->starts_with_sap = aux >> 31;
+  entry->sap_type = ((aux >> 28) & 0x7);
+  entry->sap_delta_time = aux & 0xFFFFFFF;
+}
+
+GstIsoffParserResult
+gst_isoff_sidx_parser_add_buffer (GstSidxParser * parser, GstBuffer * buffer,
+    guint * consumed)
+{
+  GstIsoffParserResult res = GST_ISOFF_PARSER_OK;
+  GstByteReader reader;
+  GstMapInfo info;
+  gsize remaining;
+  guint32 fourcc;
+
+  if (!gst_buffer_map (buffer, &info, GST_MAP_READ)) {
+    *consumed = 0;
+    return GST_ISOFF_PARSER_ERROR;
+  }
+
+  gst_byte_reader_init (&reader, info.data, info.size);
+
+  switch (parser->status) {
+    case GST_ISOFF_SIDX_PARSER_INIT:
+      if (gst_byte_reader_get_remaining (&reader) < GST_ISOFF_FULL_BOX_SIZE) {
+        break;
+      }
+
+      parser->size = gst_byte_reader_get_uint32_be_unchecked (&reader);
+      fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
+      if (fourcc != GST_ISOFF_FOURCC_SIDX) {
+        res = GST_ISOFF_PARSER_UNEXPECTED;
+        gst_byte_reader_set_pos (&reader, 0);
+        break;
+      }
+      if (parser->size == 1) {
+        if (gst_byte_reader_get_remaining (&reader) < 12) {
+          gst_byte_reader_set_pos (&reader, 0);
+          break;
+        }
+
+        parser->size = gst_byte_reader_get_uint64_be_unchecked (&reader);
+      }
+      if (parser->size == 0) {
+        res = GST_ISOFF_PARSER_ERROR;
+        gst_byte_reader_set_pos (&reader, 0);
+        break;
+      }
+      parser->sidx.version = gst_byte_reader_get_uint8_unchecked (&reader);
+      parser->sidx.flags = gst_byte_reader_get_uint24_le_unchecked (&reader);
+
+      parser->status = GST_ISOFF_SIDX_PARSER_HEADER;
+
+    case GST_ISOFF_SIDX_PARSER_HEADER:
+      remaining = gst_byte_reader_get_remaining (&reader);
+      if (remaining < 12 + (parser->sidx.version == 0 ? 8 : 16)) {
+        break;
+      }
+
+      parser->sidx.ref_id = gst_byte_reader_get_uint32_be_unchecked (&reader);
+      parser->sidx.timescale =
+          gst_byte_reader_get_uint32_be_unchecked (&reader);
+      if (parser->sidx.version == 0) {
+        parser->sidx.earliest_pts =
+            gst_byte_reader_get_uint32_be_unchecked (&reader);
+        parser->sidx.first_offset = parser->sidx.earliest_pts =
+            gst_byte_reader_get_uint32_be_unchecked (&reader);
+      } else {
+        parser->sidx.earliest_pts =
+            gst_byte_reader_get_uint64_be_unchecked (&reader);
+        parser->sidx.first_offset =
+            gst_byte_reader_get_uint64_be_unchecked (&reader);
+      }
+      /* skip 2 reserved bytes */
+      gst_byte_reader_skip_unchecked (&reader, 2);
+      parser->sidx.entries_count =
+          gst_byte_reader_get_uint16_be_unchecked (&reader);
+
+      GST_LOG ("Timescale: %" G_GUINT32_FORMAT, parser->sidx.timescale);
+      GST_LOG ("Earliest pts: %" G_GUINT64_FORMAT, parser->sidx.earliest_pts);
+      GST_LOG ("First offset: %" G_GUINT64_FORMAT, parser->sidx.first_offset);
+
+      parser->cumulative_pts =
+          gst_util_uint64_scale_int_round (parser->sidx.earliest_pts,
+          GST_SECOND, parser->sidx.timescale);
+
+      if (parser->sidx.entries_count) {
+        parser->sidx.entries =
+            g_malloc (sizeof (GstSidxBoxEntry) * parser->sidx.entries_count);
+      }
+      parser->sidx.entry_index = 0;
+
+      parser->status = GST_ISOFF_SIDX_PARSER_DATA;
+
+    case GST_ISOFF_SIDX_PARSER_DATA:
+      while (parser->sidx.entry_index < parser->sidx.entries_count) {
+        GstSidxBoxEntry *entry =
+            &parser->sidx.entries[parser->sidx.entry_index];
+
+        remaining = gst_byte_reader_get_remaining (&reader);
+        if (remaining < 12)
+          break;
+
+        entry->offset = parser->cumulative_entry_size;
+        entry->pts = parser->cumulative_pts;
+        gst_isoff_parse_sidx_entry (entry, &reader);
+        entry->duration = gst_util_uint64_scale_int_round (entry->duration,
+            GST_SECOND, parser->sidx.timescale);
+        parser->cumulative_entry_size += entry->size;
+        parser->cumulative_pts += entry->duration;
+
+        GST_LOG ("Sidx entry %d) offset: %" G_GUINT64_FORMAT ", pts: %"
+            GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT " - size %"
+            G_GUINT32_FORMAT, parser->sidx.entry_index, entry->offset,
+            GST_TIME_ARGS (entry->pts), GST_TIME_ARGS (entry->duration),
+            entry->size);
+
+        parser->sidx.entry_index++;
+      }
+
+      if (parser->sidx.entry_index == parser->sidx.entries_count)
+        parser->status = GST_ISOFF_SIDX_PARSER_FINISHED;
+      else
+        break;
+    case GST_ISOFF_SIDX_PARSER_FINISHED:
+      parser->sidx.entry_index = 0;
+      res = GST_ISOFF_PARSER_DONE;
+      break;
+  }
+
+  *consumed = gst_byte_reader_get_pos (&reader);
+  gst_buffer_unmap (buffer, &info);
+  return res;
+}
diff --git a/ext/dash/gstisoff.h b/ext/dash/gstisoff.h
new file mode 100644
index 0000000..e535c69
--- /dev/null
+++ b/ext/dash/gstisoff.h
@@ -0,0 +1,99 @@
+/*
+ * ISO File Format parsing library
+ *
+ * gstisoff.h
+ *
+ * Copyright (C) 2015 Samsung Electronics. All rights reserved.
+ *   Author: Thiago Santos <thiagoss@osg.samsung.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.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library (COPYING); if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_ISOFF_H__
+#define __GST_ISOFF_H__
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+  GST_ISOFF_PARSER_OK,
+  GST_ISOFF_PARSER_DONE,
+  GST_ISOFF_PARSER_UNEXPECTED,
+  GST_ISOFF_PARSER_ERROR
+} GstIsoffParserResult;
+
+/* this is the minimum size, it can be larger if it
+ * uses extended size or type */
+#define GST_ISOFF_FULL_BOX_SIZE 12
+
+#define GST_ISOFF_FOURCC_SIDX GST_MAKE_FOURCC('s','i','d','x')
+typedef struct _GstSidxBoxEntry
+{
+  gboolean ref_type;
+  guint32 size;
+  GstClockTime duration;
+  gboolean starts_with_sap;
+  guint8 sap_type;
+  guint32 sap_delta_time;
+
+  guint64 offset;
+  GstClockTime pts;
+} GstSidxBoxEntry;
+
+typedef struct _GstSidxBox
+{
+  guint8 version;
+  guint32 flags;
+
+  guint32 ref_id;
+  guint32 timescale;
+  guint64 earliest_pts;
+  guint64 first_offset;
+
+  gint entry_index;
+  gint entries_count;
+
+  GstSidxBoxEntry *entries;
+} GstSidxBox;
+
+typedef enum _GstSidxParserStatus
+{
+  GST_ISOFF_SIDX_PARSER_INIT,
+  GST_ISOFF_SIDX_PARSER_HEADER,
+  GST_ISOFF_SIDX_PARSER_DATA,
+  GST_ISOFF_SIDX_PARSER_FINISHED
+} GstSidxParserStatus;
+
+typedef struct _GstSidxParser
+{
+  GstSidxParserStatus status;
+
+  guint64 size;
+  guint64 cumulative_entry_size;
+  guint64 cumulative_pts;
+
+  GstSidxBox sidx;
+} GstSidxParser;
+
+void gst_isoff_sidx_parser_init (GstSidxParser * parser);
+void gst_isoff_sidx_parser_clear (GstSidxParser * parser);
+GstIsoffParserResult gst_isoff_sidx_parser_add_buffer (GstSidxParser * parser, GstBuffer * buf, guint * consumed);
+
+G_END_DECLS
+
+#endif /* __GST_ISOFF_H__ */
+
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index 29c8c1a..9172f55 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -37,6 +37,8 @@
     const gchar * property_name, gchar ** property_value);
 static gboolean gst_mpdparser_get_xml_prop_string_vector_type (xmlNode * a_node,
     const gchar * property_name, gchar *** property_value);
+static gboolean gst_mpdparser_get_xml_prop_signed_integer (xmlNode * a_node,
+    const gchar * property_name, gint default_val, gint * property_value);
 static gboolean gst_mpdparser_get_xml_prop_unsigned_integer (xmlNode * a_node,
     const gchar * property_name, guint default_val, guint * property_value);
 static gboolean gst_mpdparser_get_xml_prop_unsigned_integer_64 (xmlNode *
@@ -69,6 +71,8 @@
     gchar ** content);
 static gchar *gst_mpdparser_get_xml_node_namespace (xmlNode * a_node,
     const gchar * prefix);
+static gboolean gst_mpdparser_get_xml_node_as_string (xmlNode * a_node,
+    gchar ** content);
 
 /* XML node parsing */
 static void gst_mpdparser_parse_baseURL_node (GList ** list, xmlNode * a_node);
@@ -110,6 +114,8 @@
 static void gst_mpdparser_parse_metrics_node (GList ** list, xmlNode * a_node);
 static void gst_mpdparser_parse_root_node (GstMPDNode ** pointer,
     xmlNode * a_node);
+static void gst_mpdparser_parse_utctiming_node (GList ** list,
+    xmlNode * a_node);
 
 /* Helper functions */
 static gint convert_to_millisecs (gint decimals, gint pos);
@@ -131,11 +137,11 @@
 static gchar *gst_mpdparser_build_URL_from_template (const gchar * url_template,
     const gchar * id, guint number, guint bandwidth, guint64 time);
 static gboolean gst_mpd_client_add_media_segment (GstActiveStream * stream,
-    GstSegmentURLNode * url_node, guint number, guint64 start,
-    GstClockTime start_time, GstClockTime duration);
+    GstSegmentURLNode * url_node, guint number, gint repeat, gint64 scale_start,
+    gint64 scale_duration, GstClockTime start, GstClockTime duration);
 static const gchar *gst_mpdparser_mimetype_to_caps (const gchar * mimeType);
 static GstClockTime gst_mpd_client_get_segment_duration (GstMpdClient * client,
-    GstActiveStream * stream);
+    GstActiveStream * stream, gint64 * scale_duration);
 static GstDateTime *gst_mpd_client_get_availability_start_time (GstMpdClient *
     client);
 
@@ -157,7 +163,8 @@
     GstRepresentationNode * Representation);
 
 /* Segments */
-static guint gst_mpd_client_get_segments_counts (GstActiveStream * stream);
+static guint gst_mpd_client_get_segments_counts (GstMpdClient * client,
+    GstActiveStream * stream);
 
 /* Memory management */
 static GstSegmentTimelineNode *gst_mpdparser_segment_timeline_node_new (void);
@@ -197,10 +204,41 @@
     descriptor_type);
 static void gst_mpdparser_free_content_component_node (GstContentComponentNode *
     content_component_node);
+static void gst_mpdparser_free_utctiming_node (GstUTCTimingNode * timing_type);
 static void gst_mpdparser_free_stream_period (GstStreamPeriod * stream_period);
 static void gst_mpdparser_free_media_segment (GstMediaSegment * media_segment);
 static void gst_mpdparser_free_active_stream (GstActiveStream * active_stream);
 
+struct GstMpdParserUtcTimingMethod
+{
+  const gchar *name;
+  GstMPDUTCTimingType method;
+};
+
+static const struct GstMpdParserUtcTimingMethod
+    gst_mpdparser_utc_timing_methods[] = {
+  {"urn:mpeg:dash:utc:ntp:2014", GST_MPD_UTCTIMING_TYPE_NTP},
+  {"urn:mpeg:dash:utc:sntp:2014", GST_MPD_UTCTIMING_TYPE_SNTP},
+  {"urn:mpeg:dash:utc:http-head:2014", GST_MPD_UTCTIMING_TYPE_HTTP_HEAD},
+  {"urn:mpeg:dash:utc:http-xsdate:2014", GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE},
+  {"urn:mpeg:dash:utc:http-iso:2014", GST_MPD_UTCTIMING_TYPE_HTTP_ISO},
+  {"urn:mpeg:dash:utc:http-ntp:2014", GST_MPD_UTCTIMING_TYPE_HTTP_NTP},
+  {"urn:mpeg:dash:utc:direct:2014", GST_MPD_UTCTIMING_TYPE_DIRECT},
+  /*
+   * Early working drafts used the :2012 namespace and this namespace is
+   * used by some DASH packagers. To work-around these packagers, we also
+   * accept the early draft scheme names.
+   */
+  {"urn:mpeg:dash:utc:ntp:2012", GST_MPD_UTCTIMING_TYPE_NTP},
+  {"urn:mpeg:dash:utc:sntp:2012", GST_MPD_UTCTIMING_TYPE_SNTP},
+  {"urn:mpeg:dash:utc:http-head:2012", GST_MPD_UTCTIMING_TYPE_HTTP_HEAD},
+  {"urn:mpeg:dash:utc:http-xsdate:2012", GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE},
+  {"urn:mpeg:dash:utc:http-iso:2012", GST_MPD_UTCTIMING_TYPE_HTTP_ISO},
+  {"urn:mpeg:dash:utc:http-ntp:2012", GST_MPD_UTCTIMING_TYPE_HTTP_NTP},
+  {"urn:mpeg:dash:utc:direct:2012", GST_MPD_UTCTIMING_TYPE_DIRECT},
+  {NULL, 0}
+};
+
 /* functions to parse node namespaces, content and properties */
 static gboolean
 gst_mpdparser_get_xml_prop_string (xmlNode * a_node,
@@ -249,6 +287,30 @@
 }
 
 static gboolean
+gst_mpdparser_get_xml_prop_signed_integer (xmlNode * a_node,
+    const gchar * property_name, gint default_val, gint * property_value)
+{
+  xmlChar *prop_string;
+  gboolean exists = FALSE;
+
+  *property_value = default_val;
+  prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
+  if (prop_string) {
+    if (sscanf ((const gchar *) prop_string, "%d", property_value) == 1) {
+      exists = TRUE;
+      GST_LOG (" - %s: %d", property_name, *property_value);
+    } else {
+      GST_WARNING
+          ("failed to parse signed integer property %s from xml string %s",
+          property_name, prop_string);
+    }
+    xmlFree (prop_string);
+  }
+
+  return exists;
+}
+
+static gboolean
 gst_mpdparser_get_xml_prop_unsigned_integer (xmlNode * a_node,
     const gchar * property_name, guint default_val, guint * property_value)
 {
@@ -258,7 +320,7 @@
   *property_value = default_val;
   prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
   if (prop_string) {
-    if (sscanf ((gchar *) prop_string, "%u", property_value)) {
+    if (sscanf ((gchar *) prop_string, "%u", property_value) == 1) {
       exists = TRUE;
       GST_LOG (" - %s: %u", property_name, *property_value);
     } else {
@@ -282,7 +344,8 @@
   *property_value = default_val;
   prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
   if (prop_string) {
-    if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT, property_value)) {
+    if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT,
+            property_value) == 1) {
       exists = TRUE;
       GST_LOG (" - %s: %" G_GUINT64_FORMAT, property_name, *property_value);
     } else {
@@ -315,7 +378,7 @@
         exists = TRUE;
         GST_LOG (" - %s:", property_name);
         for (i = 0; i < *value_size; i++) {
-          if (sscanf ((gchar *) str_vector[i], "%u", &prop_uint_vector[i])) {
+          if (sscanf ((gchar *) str_vector[i], "%u", &prop_uint_vector[i]) == 1) {
             GST_LOG ("    %u", prop_uint_vector[i]);
           } else {
             GST_WARNING
@@ -346,7 +409,7 @@
 
   prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
   if (prop_string) {
-    if (sscanf ((gchar *) prop_string, "%lf", property_value)) {
+    if (sscanf ((gchar *) prop_string, "%lf", property_value) == 1) {
       exists = TRUE;
       GST_LOG (" - %s: %lf", property_name, *property_value);
     } else {
@@ -428,7 +491,7 @@
 
   prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
   if (prop_string) {
-    if (sscanf ((gchar *) prop_string, "%u", &prop_SAP_type)
+    if (sscanf ((gchar *) prop_string, "%u", &prop_SAP_type) == 1
         && prop_SAP_type <= 6) {
       exists = TRUE;
       *property_value = (GstSAPType) prop_SAP_type;
@@ -480,10 +543,6 @@
     }
     /* malloc return data structure */
     *property_value = g_slice_new0 (GstRange);
-    if (*property_value == NULL) {
-      GST_WARNING ("Allocation of GstRange failed!");
-      goto error;
-    }
     exists = TRUE;
     (*property_value)->first_byte_pos = first_byte_pos;
     (*property_value)->last_byte_pos = last_byte_pos;
@@ -495,9 +554,9 @@
   return exists;
 
 error:
-  xmlFree (prop_string);
   GST_WARNING ("failed to parse property %s from xml string %s", property_name,
       prop_string);
+  xmlFree (prop_string);
   return FALSE;
 }
 
@@ -537,10 +596,6 @@
     }
     /* malloc return data structure */
     *property_value = g_slice_new0 (GstRatio);
-    if (*property_value == NULL) {
-      GST_WARNING ("Allocation of GstRatio failed!");
-      goto error;
-    }
     exists = TRUE;
     (*property_value)->num = num;
     (*property_value)->den = den;
@@ -551,9 +606,9 @@
   return exists;
 
 error:
-  xmlFree (prop_string);
   GST_WARNING ("failed to parse property %s from xml string %s", property_name,
       prop_string);
+  xmlFree (prop_string);
   return FALSE;
 }
 
@@ -589,10 +644,6 @@
     }
     /* alloc return data structure */
     *property_value = g_slice_new0 (GstFrameRate);
-    if (*property_value == NULL) {
-      GST_WARNING ("Allocation of GstFrameRate failed!");
-      goto error;
-    }
     exists = TRUE;
     (*property_value)->num = num;
     (*property_value)->den = den;
@@ -606,9 +657,9 @@
   return exists;
 
 error:
-  xmlFree (prop_string);
   GST_WARNING ("failed to parse property %s from xml string %s", property_name,
       prop_string);
+  xmlFree (prop_string);
   return FALSE;
 }
 
@@ -641,10 +692,6 @@
 
     /* alloc return data structure */
     *property_value = g_slice_new0 (GstConditionalUintType);
-    if (*property_value == NULL) {
-      GST_WARNING ("Allocation of GstConditionalUintType failed!");
-      goto error;
-    }
     exists = TRUE;
     (*property_value)->flag = flag;
     (*property_value)->value = val;
@@ -656,9 +703,9 @@
   return exists;
 
 error:
-  xmlFree (prop_string);
   GST_WARNING ("failed to parse property %s from xml string %s", property_name,
       prop_string);
+  xmlFree (prop_string);
   return FALSE;
 }
 
@@ -746,9 +793,9 @@
   return exists;
 
 error:
-  xmlFree (prop_string);
   GST_WARNING ("failed to parse property %s from xml string %s", property_name,
       prop_string);
+  xmlFree (prop_string);
   return FALSE;
 }
 
@@ -801,6 +848,7 @@
   gboolean have_ms = FALSE;
   gboolean exists = FALSE;
 
+  *property_value = default_value;
   prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
   if (prop_string) {
     len = xmlStrlen (prop_string);
@@ -923,9 +971,6 @@
     GST_LOG (" - %s: %" G_GINT64_FORMAT, property_name, *property_value);
   }
 
-  if (!exists) {
-    *property_value = default_value;
-  }
   return exists;
 
 error:
@@ -949,6 +994,44 @@
   return exists;
 }
 
+static gboolean
+gst_mpdparser_get_xml_node_as_string (xmlNode * a_node, gchar ** content)
+{
+  gboolean exists = FALSE;
+  const char *txt_encoding;
+  xmlOutputBufferPtr out_buf;
+
+  txt_encoding = (const char *) a_node->doc->encoding;
+  out_buf = xmlAllocOutputBuffer (NULL);
+  g_assert (out_buf != NULL);
+  xmlNodeDumpOutput (out_buf, a_node->doc, a_node, 0, 0, txt_encoding);
+  xmlOutputBufferFlush (out_buf);
+#ifdef LIBXML2_NEW_BUFFER
+  if (xmlOutputBufferGetSize (out_buf) > 0) {
+    *content =
+        (gchar *) xmlStrndup (xmlOutputBufferGetContent (out_buf),
+        xmlOutputBufferGetSize (out_buf));
+    exists = TRUE;
+  }
+#else
+  if (out_buf->conv && out_buf->conv->use > 0) {
+    *content =
+        (gchar *) xmlStrndup (out_buf->conv->content, out_buf->conv->use);
+    exists = TRUE;
+  } else if (out_buf->buffer && out_buf->buffer->use > 0) {
+    *content =
+        (gchar *) xmlStrndup (out_buf->buffer->content, out_buf->buffer->use);
+    exists = TRUE;
+  }
+#endif // LIBXML2_NEW_BUFFER
+  (void) xmlOutputBufferClose (out_buf);
+
+  if (exists) {
+    GST_LOG (" - %s: %s", a_node->name, *content);
+  }
+  return exists;
+}
+
 static gchar *
 gst_mpdparser_get_xml_node_namespace (xmlNode * a_node, const gchar * prefix)
 {
@@ -957,9 +1040,11 @@
 
   if (prefix == NULL) {
     /* return the default namespace */
-    namespace = xmlMemStrdup ((const gchar *) a_node->ns->href);
-    if (namespace) {
-      GST_LOG (" - default namespace: %s", namespace);
+    if (a_node->ns) {
+      namespace = xmlMemStrdup ((const gchar *) a_node->ns->href);
+      if (namespace) {
+        GST_LOG (" - default namespace: %s", namespace);
+      }
     }
   } else {
     /* look for the specified prefix in the namespace list */
@@ -982,10 +1067,6 @@
   GstBaseURL *new_base_url;
 
   new_base_url = g_slice_new0 (GstBaseURL);
-  if (new_base_url == NULL) {
-    GST_WARNING ("Allocation of BaseURL node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_base_url);
 
   GST_LOG ("content of BaseURL node:");
@@ -1004,16 +1085,16 @@
   GstDescriptorType *new_descriptor;
 
   new_descriptor = g_slice_new0 (GstDescriptorType);
-  if (new_descriptor == NULL) {
-    GST_WARNING ("Allocation of DescriptorType node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_descriptor);
 
   GST_LOG ("attributes of %s node:", a_node->name);
   gst_mpdparser_get_xml_prop_string (a_node, "schemeIdUri",
       &new_descriptor->schemeIdUri);
-  gst_mpdparser_get_xml_prop_string (a_node, "value", &new_descriptor->value);
+  if (!gst_mpdparser_get_xml_prop_string (a_node, "value",
+          &new_descriptor->value)) {
+    /* if no value attribute, use XML string representation of the node */
+    gst_mpdparser_get_xml_node_as_string (a_node, &new_descriptor->value);
+  }
 }
 
 static void
@@ -1023,10 +1104,6 @@
   GstContentComponentNode *new_content_component;
 
   new_content_component = g_slice_new0 (GstContentComponentNode);
-  if (new_content_component == NULL) {
-    GST_WARNING ("Allocation of ContentComponent node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_content_component);
 
   GST_LOG ("attributes of ContentComponent node:");
@@ -1074,10 +1151,6 @@
   GstSubRepresentationNode *new_subrep;
 
   new_subrep = g_slice_new0 (GstSubRepresentationNode);
-  if (new_subrep == NULL) {
-    GST_WARNING ("Allocation of SubRepresentation node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_subrep);
 
   GST_LOG ("attributes of SubRepresentation node:");
@@ -1102,14 +1175,10 @@
 
   if (seg_url) {
     clone = g_slice_new0 (GstSegmentURLNode);
-    if (clone) {
-      clone->media = xmlMemStrdup (seg_url->media);
-      clone->mediaRange = gst_mpdparser_clone_range (seg_url->mediaRange);
-      clone->index = xmlMemStrdup (seg_url->index);
-      clone->indexRange = gst_mpdparser_clone_range (seg_url->indexRange);
-    } else {
-      GST_WARNING ("Allocation of SegmentURL node failed!");
-    }
+    clone->media = xmlMemStrdup (seg_url->media);
+    clone->mediaRange = gst_mpdparser_clone_range (seg_url->mediaRange);
+    clone->index = xmlMemStrdup (seg_url->index);
+    clone->indexRange = gst_mpdparser_clone_range (seg_url->indexRange);
   }
 
   return clone;
@@ -1121,10 +1190,6 @@
   GstSegmentURLNode *new_segment_url;
 
   new_segment_url = g_slice_new0 (GstSegmentURLNode);
-  if (new_segment_url == NULL) {
-    GST_WARNING ("Allocation of SegmentURL node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_segment_url);
 
   GST_LOG ("attributes of SegmentURL node:");
@@ -1143,10 +1208,6 @@
 
   gst_mpdparser_free_url_type_node (*pointer);
   *pointer = new_url_type = g_slice_new0 (GstURLType);
-  if (new_url_type == NULL) {
-    GST_WARNING ("Allocation of URLType node failed!");
-    return;
-  }
 
   GST_LOG ("attributes of URLType node:");
   gst_mpdparser_get_xml_prop_string (a_node, "sourceURL",
@@ -1161,18 +1222,16 @@
   xmlNode *cur_node;
   GstSegmentBaseType *seg_base_type;
   guint intval;
+  guint64 int64val;
   gboolean boolval;
   GstRange *rangeval;
 
   gst_mpdparser_free_seg_base_type_ext (*pointer);
   *pointer = seg_base_type = g_slice_new0 (GstSegmentBaseType);
-  if (seg_base_type == NULL) {
-    GST_WARNING ("Allocation of SegmentBaseType node failed!");
-    return;
-  }
 
   /* Initialize values that have defaults */
   seg_base_type->indexRangeExact = FALSE;
+  seg_base_type->timescale = 1;
 
   /* Inherit attribute values from parent */
   if (parent) {
@@ -1189,13 +1248,13 @@
   /* We must retrieve each value first to see if it exists.  If it does not
    * exist, we do not want to overwrite an inherited value */
   GST_LOG ("attributes of SegmentBaseType extension:");
-  if (gst_mpdparser_get_xml_prop_unsigned_integer (a_node, "timescale", 0,
+  if (gst_mpdparser_get_xml_prop_unsigned_integer (a_node, "timescale", 1,
           &intval)) {
     seg_base_type->timescale = intval;
   }
-  if (gst_mpdparser_get_xml_prop_unsigned_integer (a_node,
-          "presentationTimeOffset", 0, &intval)) {
-    seg_base_type->presentationTimeOffset = intval;
+  if (gst_mpdparser_get_xml_prop_unsigned_integer_64 (a_node,
+          "presentationTimeOffset", 0, &int64val)) {
+    seg_base_type->presentationTimeOffset = int64val;
   }
   if (gst_mpdparser_get_xml_prop_range (a_node, "indexRange", &rangeval)) {
     if (seg_base_type->indexRange) {
@@ -1233,13 +1292,9 @@
 
   if (pointer) {
     clone = g_slice_new0 (GstSNode);
-    if (clone) {
-      clone->t = pointer->t;
-      clone->d = pointer->d;
-      clone->r = pointer->r;
-    } else {
-      GST_WARNING ("Allocation of S node failed!");
-    }
+    clone->t = pointer->t;
+    clone->d = pointer->d;
+    clone->r = pointer->r;
   }
 
   return clone;
@@ -1251,10 +1306,6 @@
   GstSNode *new_s_node;
 
   new_s_node = g_slice_new0 (GstSNode);
-  if (new_s_node == NULL) {
-    GST_WARNING ("Allocation of S node failed!");
-    return;
-  }
   g_queue_push_tail (queue, new_s_node);
 
   GST_LOG ("attributes of S node:");
@@ -1262,7 +1313,7 @@
       &new_s_node->t);
   gst_mpdparser_get_xml_prop_unsigned_integer_64 (a_node, "d", 0,
       &new_s_node->d);
-  gst_mpdparser_get_xml_prop_unsigned_integer (a_node, "r", 0, &new_s_node->r);
+  gst_mpdparser_get_xml_prop_signed_integer (a_node, "r", 0, &new_s_node->r);
 }
 
 static GstSegmentTimelineNode *
@@ -1324,10 +1375,9 @@
 
   gst_mpdparser_free_mult_seg_base_type_ext (*pointer);
   *pointer = mult_seg_base_type = g_slice_new0 (GstMultSegmentBaseType);
-  if (mult_seg_base_type == NULL) {
-    GST_WARNING ("Allocation of MultipleSegmentBaseType node failed!");
-    return;
-  }
+
+  mult_seg_base_type->duration = 0;
+  mult_seg_base_type->startNumber = 1;
 
   /* Inherit attribute values from parent */
   if (parent) {
@@ -1344,6 +1394,7 @@
           &intval)) {
     mult_seg_base_type->duration = intval;
   }
+
   if (gst_mpdparser_get_xml_prop_unsigned_integer (a_node, "startNumber", 1,
           &intval)) {
     mult_seg_base_type->startNumber = intval;
@@ -1379,10 +1430,6 @@
 
   gst_mpdparser_free_segment_list_node (*pointer);
   *pointer = new_segment_list = g_slice_new0 (GstSegmentListNode);
-  if (new_segment_list == NULL) {
-    GST_WARNING ("Allocation of SegmentList node failed!");
-    return;
-  }
 
   /* Inherit attribute values from parent */
   if (parent) {
@@ -1422,10 +1469,6 @@
 
   gst_mpdparser_free_representation_base_type (*pointer);
   *pointer = representation_base = g_slice_new0 (GstRepresentationBaseType);
-  if (representation_base == NULL) {
-    GST_WARNING ("Allocation of RepresentationBaseType node failed!");
-    return;
-  }
 
   GST_LOG ("attributes of RepresentationBaseType extension:");
   gst_mpdparser_get_xml_prop_string (a_node, "profiles",
@@ -1483,10 +1526,6 @@
   GstRepresentationNode *new_representation;
 
   new_representation = g_slice_new0 (GstRepresentationNode);
-  if (new_representation == NULL) {
-    GST_WARNING ("Allocation of Representation node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_representation);
 
   GST_LOG ("attributes of Representation node:");
@@ -1537,10 +1576,6 @@
   GstAdaptationSetNode *new_adap_set;
 
   new_adap_set = g_slice_new0 (GstAdaptationSetNode);
-  if (new_adap_set == NULL) {
-    GST_WARNING ("Allocation of AdaptationSet node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_adap_set);
 
   GST_LOG ("attributes of AdaptationSet node:");
@@ -1570,6 +1605,8 @@
       &new_adap_set->maxFrameRate);
   gst_mpdparser_get_xml_prop_cond_uint (a_node, "segmentAlignment",
       &new_adap_set->segmentAlignment);
+  gst_mpdparser_get_xml_prop_boolean (a_node, "bitstreamSwitching",
+      FALSE, &new_adap_set->bitstreamSwitching);
   gst_mpdparser_get_xml_prop_cond_uint (a_node, "subsegmentAlignment",
       &new_adap_set->subsegmentAlignment);
   gst_mpdparser_get_xml_prop_SAP_type (a_node, "subsegmentStartsWithSAP",
@@ -1633,10 +1670,6 @@
   GstSubsetNode *new_subset;
 
   new_subset = g_slice_new0 (GstSubsetNode);
-  if (new_subset == NULL) {
-    GST_WARNING ("Allocation of Subset node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_subset);
 
   GST_LOG ("attributes of Subset node:");
@@ -1653,38 +1686,38 @@
 
   gst_mpdparser_free_segment_template_node (*pointer);
   *pointer = new_segment_template = g_slice_new0 (GstSegmentTemplateNode);
-  if (new_segment_template == NULL) {
-    GST_WARNING ("Allocation of SegmentTemplate node failed!");
-    return;
-  }
-
-  /* Inherit attribute values from parent */
-  if (parent) {
-    new_segment_template->media = xmlMemStrdup (parent->media);
-    new_segment_template->index = xmlMemStrdup (parent->index);
-    new_segment_template->initialization =
-        xmlMemStrdup (parent->initialization);
-    new_segment_template->bitstreamSwitching =
-        xmlMemStrdup (parent->bitstreamSwitching);
-  }
 
   GST_LOG ("extension of SegmentTemplate node:");
   gst_mpdparser_parse_mult_seg_base_type_ext
       (&new_segment_template->MultSegBaseType, a_node,
       (parent ? parent->MultSegBaseType : NULL));
 
+  /* Inherit attribute values from parent when the value isn't found */
   GST_LOG ("attributes of SegmentTemplate node:");
   if (gst_mpdparser_get_xml_prop_string (a_node, "media", &strval)) {
     new_segment_template->media = strval;
+  } else if (parent) {
+    new_segment_template->media = xmlMemStrdup (parent->media);
   }
+
   if (gst_mpdparser_get_xml_prop_string (a_node, "index", &strval)) {
     new_segment_template->index = strval;
+  } else if (parent) {
+    new_segment_template->index = xmlMemStrdup (parent->index);
   }
+
   if (gst_mpdparser_get_xml_prop_string (a_node, "initialization", &strval)) {
     new_segment_template->initialization = strval;
+  } else if (parent) {
+    new_segment_template->initialization =
+        xmlMemStrdup (parent->initialization);
   }
+
   if (gst_mpdparser_get_xml_prop_string (a_node, "bitstreamSwitching", &strval)) {
     new_segment_template->bitstreamSwitching = strval;
+  } else if (parent) {
+    new_segment_template->bitstreamSwitching =
+        xmlMemStrdup (parent->bitstreamSwitching);
   }
 }
 
@@ -1695,14 +1728,8 @@
   GstPeriodNode *new_period;
 
   new_period = g_slice_new0 (GstPeriodNode);
-  if (new_period == NULL) {
-    GST_WARNING ("Allocation of Period node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_period);
 
-  new_period->start = GST_CLOCK_TIME_NONE;
-
   GST_LOG ("attributes of Period node:");
   gst_mpdparser_get_xml_prop_string (a_node, "id", &new_period->id);
   gst_mpdparser_get_xml_prop_duration (a_node, "start", -1, &new_period->start);
@@ -1752,10 +1779,6 @@
   GstProgramInformationNode *new_prog_info;
 
   new_prog_info = g_slice_new0 (GstProgramInformationNode);
-  if (new_prog_info == NULL) {
-    GST_WARNING ("Allocation of ProgramInfo node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_prog_info);
 
   GST_LOG ("attributes of ProgramInformation node:");
@@ -1785,10 +1808,6 @@
   GstMetricsRangeNode *new_metrics_range;
 
   new_metrics_range = g_slice_new0 (GstMetricsRangeNode);
-  if (new_metrics_range == NULL) {
-    GST_WARNING ("Allocation of Metrics Range node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_metrics_range);
 
   GST_LOG ("attributes of Metrics Range node:");
@@ -1805,10 +1824,6 @@
   GstMetricsNode *new_metrics;
 
   new_metrics = g_slice_new0 (GstMetricsNode);
-  if (new_metrics == NULL) {
-    GST_WARNING ("Allocation of Metrics node failed!");
-    return;
-  }
   *list = g_list_append (*list, new_metrics);
 
   GST_LOG ("attributes of Metrics node:");
@@ -1831,6 +1846,46 @@
   }
 }
 
+/* The UTCTiming element is defined in
+ * ISO/IEC 23009-1:2014/PDAM 1 "Information technology — Dynamic adaptive streaming over HTTP (DASH) — Part 1: Media presentation description and segment formats / Amendment 1: High Profile and Availability Time Synchronization"
+ */
+static void
+gst_mpdparser_parse_utctiming_node (GList ** list, xmlNode * a_node)
+{
+  GstUTCTimingNode *new_timing;
+  gchar *method = NULL;
+  gchar *value = NULL;
+
+  new_timing = g_slice_new0 (GstUTCTimingNode);
+
+  GST_LOG ("attributes of UTCTiming node:");
+  if (gst_mpdparser_get_xml_prop_string (a_node, "schemeIdUri", &method)) {
+    for (int i = 0; gst_mpdparser_utc_timing_methods[i].name; ++i) {
+      if (g_ascii_strncasecmp (gst_mpdparser_utc_timing_methods[i].name,
+              method, strlen (gst_mpdparser_utc_timing_methods[i].name)) == 0) {
+        new_timing->method = gst_mpdparser_utc_timing_methods[i].method;
+        break;
+      }
+    }
+    xmlFree (method);
+  }
+
+  if (gst_mpdparser_get_xml_prop_string (a_node, "value", &value)) {
+    int max_tokens = 0;
+    if (GST_MPD_UTCTIMING_TYPE_DIRECT == new_timing->method) {
+      /* The GST_MPD_UTCTIMING_TYPE_DIRECT method is a special case
+       * that is not a space separated list.
+       */
+      max_tokens = 1;
+    }
+    new_timing->urls = g_strsplit (value, " ", max_tokens);
+    xmlFree (value);
+    *list = g_list_append (*list, new_timing);
+  } else {
+    gst_mpdparser_free_utctiming_node (new_timing);
+  }
+}
+
 static void
 gst_mpdparser_parse_root_node (GstMPDNode ** pointer, xmlNode * a_node)
 {
@@ -1839,10 +1894,6 @@
 
   gst_mpdparser_free_mpd_node (*pointer);
   *pointer = new_mpd = g_slice_new0 (GstMPDNode);
-  if (new_mpd == NULL) {
-    GST_WARNING ("Allocation of MPD node failed!");
-    return;
-  }
 
   GST_LOG ("namespaces of root MPD node:");
   new_mpd->default_namespace =
@@ -1889,6 +1940,8 @@
         gst_mpdparser_parse_location_node (&new_mpd->Locations, cur_node);
       } else if (xmlStrcmp (cur_node->name, (xmlChar *) "Metrics") == 0) {
         gst_mpdparser_parse_metrics_node (&new_mpd->Metrics, cur_node);
+      } else if (xmlStrcmp (cur_node->name, (xmlChar *) "UTCTiming") == 0) {
+        gst_mpdparser_parse_utctiming_node (&new_mpd->UTCTiming, cur_node);
       }
     }
   }
@@ -1919,11 +1972,11 @@
     mime = adapt_set->RepresentationBase->mimeType;
   }
 
-  if (strncmp_ext (mime, "audio"))
+  if (strncmp_ext (mime, "audio") == 0)
     return GST_STREAM_AUDIO;
-  if (strncmp_ext (mime, "video"))
+  if (strncmp_ext (mime, "video") == 0)
     return GST_STREAM_VIDEO;
-  if (strncmp_ext (mime, "application"))
+  if (strncmp_ext (mime, "application") == 0)
     return GST_STREAM_APPLICATION;
 
   return GST_STREAM_UNKNOWN;
@@ -2009,14 +2062,14 @@
     if (Representation && Representation->SegmentList
         && Representation->SegmentList->MultSegBaseType
         && Representation->SegmentList->MultSegBaseType->SegBaseType
-        && Representation->SegmentList->MultSegBaseType->
-        SegBaseType->Initialization) {
+        && Representation->SegmentList->MultSegBaseType->SegBaseType->
+        Initialization) {
       SegmentBase = Representation->SegmentList->MultSegBaseType->SegBaseType;
     } else if (AdaptationSet && AdaptationSet->SegmentList
         && AdaptationSet->SegmentList->MultSegBaseType
         && AdaptationSet->SegmentList->MultSegBaseType->SegBaseType
-        && AdaptationSet->SegmentList->MultSegBaseType->
-        SegBaseType->Initialization) {
+        && AdaptationSet->SegmentList->MultSegBaseType->SegBaseType->
+        Initialization) {
       SegmentBase = AdaptationSet->SegmentList->MultSegBaseType->SegBaseType;
     } else if (Period && Period->SegmentList
         && Period->SegmentList->MultSegBaseType
@@ -2064,7 +2117,7 @@
     return -1;
 
   if (max_bandwidth <= 0)       /* 0 => get lowest representation available */
-    return 0;
+    return gst_mpdparser_get_rep_idx_with_min_bandwidth (Representations);
 
   for (list = g_list_first (Representations); list; list = g_list_next (list)) {
     representation = (GstRepresentationNode *) list->data;
@@ -2126,6 +2179,8 @@
         (GDestroyNotify) gst_mpdparser_free_period_node);
     g_list_free_full (mpd_node->Metrics,
         (GDestroyNotify) gst_mpdparser_free_metrics_node);
+    g_list_free_full (mpd_node->UTCTiming,
+        (GDestroyNotify) gst_mpdparser_free_utctiming_node);
     g_slice_free (GstMPDNode, mpd_node);
   }
 }
@@ -2464,6 +2519,16 @@
 }
 
 static void
+gst_mpdparser_free_utctiming_node (GstUTCTimingNode * timing_type)
+{
+  if (timing_type) {
+    if (timing_type->urls)
+      g_strfreev (timing_type->urls);
+    g_slice_free (GstUTCTimingNode, timing_type);
+  }
+}
+
+static void
 gst_mpdparser_free_stream_period (GstStreamPeriod * stream_period)
 {
   if (stream_period) {
@@ -2532,11 +2597,87 @@
   return url_prefix;
 }
 
+/* ISO/IEC 23009-1:2004 5.3.9.4.4 */
+static gboolean
+validate_format (const gchar * format)
+{
+  gchar *p;
+
+  /* Check if there is a % at all */
+  p = strchr (format, '%');
+  if (!p)
+    return TRUE;
+  p++;
+
+  /* Following the % must be a 0, or any of d, x or u.
+   * x and u are not part of the spec, but don't hurt us
+   */
+  if (p[0] == '0') {
+    p++;
+
+    while (g_ascii_isdigit (*p))
+      p++;
+  }
+
+  /* After any 0 and alphanumeric values, there must be
+   * an d, x or u.
+   */
+  if (p[0] != 'd' && p[0] != 'x' && p[0] != 'u')
+    return FALSE;
+  p++;
+
+  /* And then potentially more characters without any
+   * further %, even if the spec does not mention this
+   */
+  p = strchr (p, '%');
+  if (p)
+    return FALSE;
+
+  return TRUE;
+}
+
+static gchar *
+promote_format_to_uint64 (const gchar * format)
+{
+  gchar *p;
+  gchar *promoted_format;
+
+  /* Must be called with a validated format! */
+  g_return_val_if_fail (validate_format (format), NULL);
+
+  /* Check if there is a % at all */
+  p = strchr (format, '%');
+  if (!p)
+    return g_strdup (format);
+  p++;
+
+  /* Following the % must be a 0, or any of d, x or u.
+   * x and u are not part of the spec, but don't hurt us
+   */
+  if (p[0] == '0') {
+    p++;
+
+    while (g_ascii_isdigit (*p))
+      p++;
+  }
+
+  /* After any 0 and alphanumeric values, there must be
+   * an d, x or u. Otherwise validation would have failed
+   */
+  g_assert (p[0] == 'd' || p[0] == 'x' || p[0] == 'u');
+
+  promoted_format =
+      g_strdup_printf ("%.*s" G_GINT64_MODIFIER "%s", (gint) (p - format),
+      format, p);
+
+  return promoted_format;
+}
+
 static gchar *
 gst_mpdparser_build_URL_from_template (const gchar * url_template,
     const gchar * id, guint number, guint bandwidth, guint64 time)
 {
-  static gchar default_format[] = "%01d";
+  static const gchar default_format[] = "%01d";
   gchar **tokens, *token, *ret;
   const gchar *format;
   gint i, num_tokens;
@@ -2562,6 +2703,9 @@
       if (strlen (token) > 6) {
         format = token + 6;     /* format tag */
       }
+      if (!validate_format (format))
+        goto invalid_format;
+
       tokens[i] = g_strdup_printf (format, number);
       g_free (token);
       last_token_par = TRUE;
@@ -2569,16 +2713,24 @@
       if (strlen (token) > 9) {
         format = token + 9;     /* format tag */
       }
+      if (!validate_format (format))
+        goto invalid_format;
+
       tokens[i] = g_strdup_printf (format, bandwidth);
       g_free (token);
       last_token_par = TRUE;
     } else if (!strncmp (token, "Time", 4)) {
+      gchar *promoted_format;
+
       if (strlen (token) > 4) {
         format = token + 4;     /* format tag */
-      } else {
-        format = "%" G_GUINT64_FORMAT;
       }
-      tokens[i] = g_strdup_printf (format, time);
+      if (!validate_format (format))
+        goto invalid_format;
+
+      promoted_format = promote_format_to_uint64 (format);
+      tokens[i] = g_strdup_printf (promoted_format, time);
+      g_free (promoted_format);
       g_free (token);
       last_token_par = TRUE;
     } else if (!g_strcmp0 (token, "")) {
@@ -2586,6 +2738,8 @@
         tokens[i] = g_strdup_printf ("%s", "$");
         g_free (token);
         last_token_par = TRUE;
+      } else {
+        last_token_par = FALSE;
       }
     } else {
       last_token_par = FALSE;
@@ -2593,9 +2747,52 @@
   }
 
   ret = g_strjoinv (NULL, tokens);
+
   g_strfreev (tokens);
 
   return ret;
+
+invalid_format:
+  {
+    GST_ERROR ("Invalid format '%s' in '%s'", format, token);
+
+    g_strfreev (tokens);
+
+    return NULL;
+  }
+}
+
+guint
+gst_mpd_client_get_period_index_at_time (GstMpdClient * client,
+    GstDateTime * time)
+{
+  GList *iter;
+  guint period_idx = G_MAXUINT;
+  guint idx;
+  gint64 time_offset;
+  GstDateTime *avail_start =
+      gst_mpd_client_get_availability_start_time (client);
+  GstStreamPeriod *stream_period;
+
+  if (avail_start == NULL)
+    return 0;
+
+  time_offset = gst_mpd_client_calculate_time_difference (avail_start, time);
+  gst_date_time_unref (avail_start);
+
+  if (time_offset < 0)
+    return 0;
+
+  for (idx = 0, iter = client->periods; iter; idx++, iter = g_list_next (iter)) {
+    stream_period = iter->data;
+    if (stream_period->start <= time_offset
+        && stream_period->start + stream_period->duration > time_offset) {
+      period_idx = idx;
+      break;
+    }
+  }
+
+  return period_idx;
 }
 
 static GstStreamPeriod *
@@ -2614,12 +2811,8 @@
 
   if (range) {
     clone = g_slice_new0 (GstRange);
-    if (clone) {
-      clone->first_byte_pos = range->first_byte_pos;
-      clone->last_byte_pos = range->last_byte_pos;
-    } else {
-      GST_WARNING ("Allocation of GstRange failed!");
-    }
+    clone->first_byte_pos = range->first_byte_pos;
+    clone->last_byte_pos = range->last_byte_pos;
   }
 
   return clone;
@@ -2633,126 +2826,104 @@
 
   if (url) {
     clone = g_slice_new0 (GstURLType);
-    if (clone) {
-      if (url->sourceURL) {
-        clone->sourceURL = xmlMemStrdup (url->sourceURL);
-      }
-      clone->range = gst_mpdparser_clone_range (url->range);
-    } else {
-      GST_WARNING ("Allocation of URLType node failed!");
+    if (url->sourceURL) {
+      clone->sourceURL = xmlMemStrdup (url->sourceURL);
     }
+    clone->range = gst_mpdparser_clone_range (url->range);
   }
 
   return clone;
 }
 
+/*
+ * Combine a base url with the current stream base url from the list of
+ * baseURLs. Takes ownership of base and returns a new base.
+ */
+static GstUri *
+combine_urls (GstUri * base, GList * list, gchar ** query,
+    GstActiveStream * stream)
+{
+  GstBaseURL *baseURL;
+  GstUri *ret = base;
+
+  if (list != NULL) {
+    baseURL = g_list_nth_data (list, stream->baseURL_idx);
+    if (!baseURL) {
+      baseURL = list->data;
+    }
+
+    ret = gst_uri_from_string_with_base (base, baseURL->baseURL);
+    gst_uri_unref (base);
+
+    if (ret && query) {
+      if (*query)
+        g_free (*query);
+      *query = gst_uri_get_query_string (ret);
+      if (*query) {
+        ret = gst_uri_make_writable (ret);
+        gst_uri_set_query_table (ret, NULL);
+      }
+    }
+  }
+
+  return ret;
+}
+
 /* select a stream and extract the baseURL (if present) */
 static gchar *
 gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
     gchar ** query)
 {
   GstStreamPeriod *stream_period;
-  GstBaseURL *baseURL;
-  gchar *mpd_uri;
-  GList *list;
-  static gchar *baseURL_array[5];
-  static gchar empty[] = "";
+  static const gchar empty[] = "";
   gchar *ret = NULL;
+  GstUri *abs_url;
 
-  g_return_val_if_fail (stream != NULL, empty);
+  g_return_val_if_fail (stream != NULL, g_strdup (empty));
   stream_period = gst_mpdparser_get_stream_period (client);
-  g_return_val_if_fail (stream_period != NULL, empty);
-  g_return_val_if_fail (stream_period->period != NULL, empty);
+  g_return_val_if_fail (stream_period != NULL, g_strdup (empty));
+  g_return_val_if_fail (stream_period->period != NULL, g_strdup (empty));
 
-  baseURL_array[0] = baseURL_array[1] = baseURL_array[2] = baseURL_array[3] =
-      empty;
-  baseURL_array[4] = NULL;
+  /* NULLify query return before we start */
+  if (query)
+    *query = NULL;
 
-  /* FIXME: this simple implementation is not fully compliant with RFC 3986 */
-  if ((list = client->mpd_node->BaseURLs) != NULL) {
-    baseURL = g_list_nth_data (list, stream->baseURL_idx);
-    if (!baseURL) {
-      baseURL = list->data;
-    }
-    baseURL_array[0] = baseURL->baseURL;
-  }
-  if ((list = stream_period->period->BaseURLs) != NULL) {
-    baseURL = g_list_nth_data (list, stream->baseURL_idx);
-    if (!baseURL) {
-      baseURL = list->data;
-    }
-    baseURL_array[1] = baseURL->baseURL;
-  }
+  /* initialise base url */
+  abs_url =
+      gst_uri_from_string (client->
+      mpd_base_uri ? client->mpd_base_uri : client->mpd_uri);
+
+  /* combine a BaseURL at the MPD level with the current base url */
+  abs_url = combine_urls (abs_url, client->mpd_node->BaseURLs, query, stream);
+
+  /* combine a BaseURL at the Period level with the current base url */
+  abs_url =
+      combine_urls (abs_url, stream_period->period->BaseURLs, query, stream);
+
   GST_DEBUG ("Current adaptation set id %i (%s)", stream->cur_adapt_set->id,
       stream->cur_adapt_set->contentType);
+  /* combine a BaseURL at the AdaptationSet level with the current base url */
+  abs_url =
+      combine_urls (abs_url, stream->cur_adapt_set->BaseURLs, query, stream);
 
-  if ((list = stream->cur_adapt_set->BaseURLs) != NULL) {
-    baseURL = g_list_nth_data (list, stream->baseURL_idx);
-    if (!baseURL) {
-      baseURL = list->data;
-    }
-    baseURL_array[2] = baseURL->baseURL;
-  }
+  /* combine a BaseURL at the Representation level with the current base url */
+  abs_url =
+      combine_urls (abs_url, stream->cur_representation->BaseURLs, query,
+      stream);
 
-  if ((list = stream->cur_representation->BaseURLs) != NULL) {
-    baseURL = g_list_nth_data (list, stream->baseURL_idx);
-    if (!baseURL) {
-      baseURL = list->data;
-    }
-    baseURL_array[3] = baseURL->baseURL;
-  }
-
-  ret = g_strjoinv (NULL, baseURL_array);
-
-  /* get base URI from MPD file URI, if the "http" scheme is missing */
-  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] == '?') {
-      if (query)
-        *query = g_strdup (ret);
-      g_free (ret);
-      ret = NULL;
-    } else {
-      if (query)
-        *query = NULL;
-    }
-
-    last_sep = strrchr (mpd_uri, '/');
-    if (last_sep) {
-      tmp1 = g_strndup (mpd_uri, last_sep - mpd_uri + 1);
-      if (ret) {
-        tmp2 = ret;
-        ret = g_strconcat (tmp1, tmp2, NULL);
-        g_free (tmp1);
-        g_free (tmp2);
-      } else {
-        ret = tmp1;
-      }
-      GST_INFO ("Got base URI from MPD file URI %s", ret);
-    }
-  }
-
-  if (ret && *query == NULL) {
-    gchar *params = strchr (ret, '?');
-    if (params) {
-      *query = g_strdup (params);
-      params[0] = '\0';         /* can ignore the rest of the string */
-    }
-  }
+  ret = gst_uri_to_string (abs_url);
+  gst_uri_unref (abs_url);
 
   return ret;
 }
 
 static GstClockTime
 gst_mpd_client_get_segment_duration (GstMpdClient * client,
-    GstActiveStream * stream)
+    GstActiveStream * stream, gint64 * scale_dur)
 {
   GstStreamPeriod *stream_period;
   GstMultSegmentBaseType *base = NULL;
   GstClockTime duration = 0;
-  guint timescale;
 
   g_return_val_if_fail (stream != NULL, GST_CLOCK_TIME_NONE);
   stream_period = gst_mpdparser_get_stream_period (client);
@@ -2767,12 +2938,14 @@
   if (base == NULL || base->SegBaseType == NULL) {
     /* this may happen when we have a single segment */
     duration = stream_period->duration;
+    if (scale_dur)
+      *scale_dur = duration;
   } else {
+    /* duration is guint so this cannot overflow */
     duration = base->duration * GST_SECOND;
-    timescale = base->SegBaseType->timescale;
-
-    if (timescale > 1)
-      duration /= timescale;
+    if (scale_dur)
+      *scale_dur = duration;
+    duration /= base->SegBaseType->timescale;
   }
 
   return duration;
@@ -2788,7 +2961,6 @@
   GstMpdClient *client;
 
   client = g_new0 (GstMpdClient, 1);
-  g_mutex_init (&client->lock);
 
   return client;
 }
@@ -2819,8 +2991,6 @@
 
   gst_active_streams_free (client);
 
-  g_mutex_clear (&client->lock);
-
   g_free (client->mpd_uri);
   client->mpd_uri = NULL;
   g_free (client->mpd_base_uri);
@@ -2829,6 +2999,18 @@
   g_free (client);
 }
 
+static void
+gst_mpd_client_check_profiles (GstMpdClient * client)
+{
+  GST_DEBUG ("Profiles: %s", client->mpd_node->profiles);
+
+  if (g_strstr_len (client->mpd_node->profiles, -1,
+          "urn:mpeg:dash:profile:isoff-on-demand:2011")) {
+    client->profile_isoff_ondemand = TRUE;
+    GST_DEBUG ("Found ISOFF on demand profile (2011)");
+  }
+}
+
 gboolean
 gst_mpd_parse (GstMpdClient * client, const gchar * data, gint size)
 {
@@ -2838,19 +3020,18 @@
 
     GST_DEBUG ("MPD file fully buffered, start parsing...");
 
-    GST_MPD_CLIENT_LOCK (client);
     /* parse the complete MPD file into a tree (using the libxml2 default parser API) */
 
     /* this initialize the library and check potential ABI mismatches
      * between the version it was compiled for and the actual shared
      * library used
      */
-    LIBXML_TEST_VERSION
-        /* parse "data" into a document (which is a libxml2 tree structure xmlDoc) */
-        doc = xmlReadMemory (data, size, "noname.xml", NULL, 0);
+    LIBXML_TEST_VERSION;
+
+    /* parse "data" into a document (which is a libxml2 tree structure xmlDoc) */
+    doc = xmlReadMemory (data, size, "noname.xml", NULL, XML_PARSE_NONET);
     if (doc == NULL) {
       GST_ERROR ("failed to parse the MPD file");
-      GST_MPD_CLIENT_UNLOCK (client);
       return FALSE;
     } else {
       /* get the root element node */
@@ -2867,7 +3048,8 @@
       /* free the document */
       xmlFreeDoc (doc);
     }
-    GST_MPD_CLIENT_UNLOCK (client);
+
+    gst_mpd_client_check_profiles (client);
 
     return TRUE;
   }
@@ -2888,6 +3070,61 @@
   return stream->baseURL;
 }
 
+static GstClockTime
+gst_mpdparser_get_segment_end_time (GstMpdClient * client, GPtrArray * segments,
+    const GstMediaSegment * segment, gint index)
+{
+  const GstStreamPeriod *stream_period;
+  GstClockTime end;
+
+  if (segment->repeat >= 0)
+    return segment->start + (segment->repeat + 1) * segment->duration;
+
+  if (index < segments->len - 1) {
+    const GstMediaSegment *next_segment =
+        g_ptr_array_index (segments, index + 1);
+    end = next_segment->start;
+  } else {
+    stream_period = gst_mpdparser_get_stream_period (client);
+    end = stream_period->start + stream_period->duration;
+  }
+  return end;
+}
+
+static gboolean
+gst_mpdparser_find_segment_by_index (GstMpdClient * client,
+    GPtrArray * segments, gint index, GstMediaSegment * result)
+{
+  gint i;
+  for (i = 0; i < segments->len; i++) {
+    GstMediaSegment *s;
+    gint repeat;
+
+    s = g_ptr_array_index (segments, i);
+    if (s->repeat >= 0) {
+      repeat = s->repeat;
+    } else {
+      GstClockTime start = s->start;
+      GstClockTime end =
+          gst_mpdparser_get_segment_end_time (client, segments, s, i);
+      repeat = (guint) (end - start) / s->duration;
+    }
+    if (s->number + repeat >= index) {
+      /* it is in this segment */
+      result->SegmentURL = s->SegmentURL;
+      result->number = index;
+      result->scale_start =
+          s->scale_start + (index - s->number) * s->scale_duration;
+      result->scale_duration = s->scale_duration;
+      result->start = s->start + (index - s->number) * s->duration;
+      result->duration = s->duration;
+      return TRUE;
+    }
+  }
+
+  return FALSE;
+}
+
 gboolean
 gst_mpdparser_get_chunk_by_index (GstMpdClient * client, guint indexStream,
     guint indexChunk, GstMediaSegment * segment)
@@ -2900,26 +3137,20 @@
   stream = g_list_nth_data (client->active_streams, indexStream);
   g_return_val_if_fail (stream != NULL, FALSE);
 
-  if (stream->segments) {
-    GstMediaSegment *list_segment;
-    /* fixed list of segments */
-    if (indexChunk >= stream->segments->len)
-      return FALSE;
+  indexChunk += 1;
 
-    list_segment = g_ptr_array_index (stream->segments, indexChunk);
-    segment->SegmentURL = list_segment->SegmentURL;
-    segment->number = list_segment->number;
-    segment->start = list_segment->start;
-    segment->start_time = list_segment->start_time;
-    segment->duration = list_segment->duration;
+  if (stream->segments) {
+    return gst_mpdparser_find_segment_by_index (client, stream->segments,
+        indexChunk, segment);
   } else {
     GstClockTime duration;
     GstStreamPeriod *stream_period;
+    gint64 scale_dur;
 
-    g_return_val_if_fail (stream->cur_seg_template->
-        MultSegBaseType->SegmentTimeline == NULL, FALSE);
+    g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
+        SegmentTimeline == NULL, FALSE);
     /* segment template generator */
-    duration = gst_mpd_client_get_segment_duration (client, stream);
+    duration = gst_mpd_client_get_segment_duration (client, stream, &scale_dur);
     if (!GST_CLOCK_TIME_IS_VALID (duration))
       return FALSE;
 
@@ -2927,11 +3158,13 @@
 
     segment->number = indexChunk
         + stream->cur_seg_template->MultSegBaseType->startNumber;
-    segment->start_time = duration * indexChunk;
+    segment->scale_start = indexChunk * scale_dur;
+    segment->scale_duration = scale_dur;
+    segment->start = duration * indexChunk;
     segment->duration = duration;
     segment->SegmentURL = NULL;
 
-    if (segment->start_time > stream_period->start + stream_period->duration) {
+    if (segment->start >= stream_period->duration) {
       return FALSE;
     }
   }
@@ -2940,26 +3173,29 @@
 
 static gboolean
 gst_mpd_client_add_media_segment (GstActiveStream * stream,
-    GstSegmentURLNode * url_node, guint number, guint64 start,
-    GstClockTime start_time, GstClockTime duration)
+    GstSegmentURLNode * url_node, guint number, gint repeat,
+    gint64 scale_start, gint64 scale_duration,
+    GstClockTime start, GstClockTime duration)
 {
   GstMediaSegment *media_segment;
 
   g_return_val_if_fail (stream->segments != NULL, FALSE);
 
   media_segment = g_slice_new0 (GstMediaSegment);
-  if (media_segment == NULL) {
-    GST_WARNING ("Allocation of GstMediaSegment struct failed!");
-    return FALSE;
-  }
 
   media_segment->SegmentURL = url_node;
   media_segment->number = number;
+  media_segment->scale_start = scale_start;
+  media_segment->scale_duration = scale_duration;
   media_segment->start = start;
-  media_segment->start_time = start_time;
   media_segment->duration = duration;
+  media_segment->repeat = repeat;
 
   g_ptr_array_add (stream->segments, media_segment);
+  GST_LOG ("Added new segment: number %d, repeat %d, "
+      "ts: %" GST_TIME_FORMAT ", dur: %"
+      GST_TIME_FORMAT, number, repeat,
+      GST_TIME_ARGS (start), GST_TIME_ARGS (duration));
 
   return TRUE;
 }
@@ -3024,8 +3260,8 @@
                 stream->cur_adapt_set, representation)) == NULL) {
       GST_DEBUG ("No useful SegmentList node for the current Representation");
       /* here we should have a single segment for each representation, whose URL is encoded in the baseURL element */
-      if (!gst_mpd_client_add_media_segment (stream, NULL, 1, 0, PeriodStart,
-              PeriodEnd)) {
+      if (!gst_mpd_client_add_media_segment (stream, NULL, 1, 0, 0,
+              PeriodEnd - PeriodStart, 0, PeriodEnd - PeriodStart)) {
         return FALSE;
       }
     } else {
@@ -3040,7 +3276,7 @@
       /* build segment list */
       i = stream->cur_segment_list->MultSegBaseType->startNumber;
       start = 0;
-      start_time = PeriodStart;
+      start_time = 0;
 
       GST_LOG ("Building media segment list using a SegmentList node");
       if (stream->cur_segment_list->MultSegBaseType->SegmentTimeline) {
@@ -3051,45 +3287,44 @@
         timeline = stream->cur_segment_list->MultSegBaseType->SegmentTimeline;
         for (list = g_queue_peek_head_link (&timeline->S); list;
             list = g_list_next (list)) {
-          guint j, timescale;
+          guint timescale;
 
           S = (GstSNode *) list->data;
           GST_LOG ("Processing S node: d=%" G_GUINT64_FORMAT " r=%d t=%"
               G_GUINT64_FORMAT, S->d, S->r, S->t);
-          duration = S->d * GST_SECOND;
           timescale =
               stream->cur_segment_list->MultSegBaseType->SegBaseType->timescale;
-          if (timescale > 1)
-            duration /= timescale;
+          duration = gst_util_uint64_scale (S->d, GST_SECOND, timescale);
+
           if (S->t > 0) {
             start = S->t;
-            start_time = S->t * GST_SECOND;
-            if (timescale > 1)
-              start_time /= timescale;
+            start_time = gst_util_uint64_scale (S->t, GST_SECOND, timescale);
           }
 
-          for (j = 0; j <= S->r && SegmentURL != NULL; j++) {
-            if (!gst_mpd_client_add_media_segment (stream, SegmentURL->data, i,
-                    start, start_time, duration)) {
-              return FALSE;
-            }
-            i++;
-            start += S->d;
-            start_time += duration;
-            SegmentURL = g_list_next (SegmentURL);
+          if (!gst_mpd_client_add_media_segment (stream, SegmentURL->data, i,
+                  S->r, start, S->d, start_time, duration)) {
+            return FALSE;
           }
+          i += S->r + 1;
+          start_time += duration * (S->r + 1);
+          start += S->d * (S->r + 1);
+          SegmentURL = g_list_next (SegmentURL);
         }
       } else {
-        duration = gst_mpd_client_get_segment_duration (client, stream);
+        gint64 scale_dur;
+
+        duration =
+            gst_mpd_client_get_segment_duration (client, stream, &scale_dur);
         if (!GST_CLOCK_TIME_IS_VALID (duration))
           return FALSE;
 
         while (SegmentURL) {
-          if (!gst_mpd_client_add_media_segment (stream, SegmentURL->data, i, 0,
-                  start_time, duration)) {
+          if (!gst_mpd_client_add_media_segment (stream, SegmentURL->data, i,
+                  0, start, scale_dur, start_time, duration)) {
             return FALSE;
           }
           i++;
+          start += scale_dur;
           start_time += duration;
           SegmentURL = g_list_next (SegmentURL);
         }
@@ -3109,52 +3344,56 @@
 
       gst_mpdparser_init_active_stream_segments (stream);
       /* here we should have a single segment for each representation, whose URL is encoded in the baseURL element */
-      if (!gst_mpd_client_add_media_segment (stream, NULL, 1, 0, 0, PeriodEnd)) {
+      if (!gst_mpd_client_add_media_segment (stream, NULL, 1, 0, 0,
+              PeriodEnd - PeriodStart, 0, PeriodEnd - PeriodStart)) {
         return FALSE;
       }
     } else {
+      GstMultSegmentBaseType *mult_seg =
+          stream->cur_seg_template->MultSegBaseType;
       /* build segment list */
-      i = stream->cur_seg_template->MultSegBaseType->startNumber;
+      i = mult_seg->startNumber;
       start = 0;
-      start_time = PeriodStart;
+      start_time = 0;
 
       GST_LOG ("Building media segment list using this template: %s",
           stream->cur_seg_template->media);
-      if (stream->cur_seg_template->MultSegBaseType->SegmentTimeline) {
+
+      /* Avoid overflows */
+      stream->presentationTimeOffset =
+          gst_util_uint64_scale (mult_seg->SegBaseType->presentationTimeOffset,
+          GST_SECOND, mult_seg->SegBaseType->timescale);
+      GST_LOG ("Setting stream's presentation time offset to %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (stream->presentationTimeOffset));
+
+      if (mult_seg->SegmentTimeline) {
         GstSegmentTimelineNode *timeline;
         GstSNode *S;
         GList *list;
 
-        timeline = stream->cur_seg_template->MultSegBaseType->SegmentTimeline;
+        timeline = mult_seg->SegmentTimeline;
         gst_mpdparser_init_active_stream_segments (stream);
         for (list = g_queue_peek_head_link (&timeline->S); list;
             list = g_list_next (list)) {
-          guint j, timescale;
+          guint timescale;
 
           S = (GstSNode *) list->data;
           GST_LOG ("Processing S node: d=%" G_GUINT64_FORMAT " r=%u t=%"
               G_GUINT64_FORMAT, S->d, S->r, S->t);
-          duration = S->d * GST_SECOND;
-          timescale =
-              stream->cur_seg_template->MultSegBaseType->SegBaseType->timescale;
-          if (timescale > 1)
-            duration /= timescale;
+          timescale = mult_seg->SegBaseType->timescale;
+          duration = gst_util_uint64_scale (S->d, GST_SECOND, timescale);
           if (S->t > 0) {
             start = S->t;
-            start_time = S->t * GST_SECOND;
-            if (timescale > 1)
-              start_time /= timescale;
+            start_time = gst_util_uint64_scale (S->t, GST_SECOND, timescale);
           }
 
-          for (j = 0; j <= S->r; j++) {
-            if (!gst_mpd_client_add_media_segment (stream, NULL, i, start,
-                    start_time, duration)) {
-              return FALSE;
-            }
-            i++;
-            start += S->d;
-            start_time += duration;
+          if (!gst_mpd_client_add_media_segment (stream, NULL, i, S->r, start,
+                  S->d, start_time, duration)) {
+            return FALSE;
           }
+          i += S->r + 1;
+          start += S->d * (S->r + 1);
+          start_time += duration * (S->r + 1);
         }
       } else {
         /* NOP - The segment is created on demand with the template, no need
@@ -3168,9 +3407,9 @@
       g_ptr_array_index (stream->segments, stream->segments->len - 1) : NULL;
 
   if (last_media_segment && GST_CLOCK_TIME_IS_VALID (PeriodEnd)) {
-    if (last_media_segment->start_time + last_media_segment->duration >
-        PeriodEnd) {
-      last_media_segment->duration = PeriodEnd - last_media_segment->start_time;
+    if (last_media_segment->start + last_media_segment->duration > PeriodEnd) {
+      last_media_segment->duration =
+          PeriodEnd - PeriodStart - last_media_segment->start;
       GST_LOG ("Fixed duration of last segment: %" GST_TIME_FORMAT,
           GST_TIME_ARGS (last_media_segment->duration));
     }
@@ -3199,7 +3438,6 @@
   g_return_val_if_fail (client->mpd_node != NULL, FALSE);
 
   GST_DEBUG ("Building the list of Periods in the Media Presentation");
-  GST_MPD_CLIENT_LOCK (client);
   /* clean the old period list, if any */
   if (client->periods) {
     g_list_foreach (client->periods,
@@ -3216,6 +3454,12 @@
     period_node = (GstPeriodNode *) list->data;
     if (period_node->start != -1) {
       /* we have a regular period */
+      /* start cannot be smaller than previous start */
+      if (list != g_list_first (client->mpd_node->Periods)
+          && start >= period_node->start * GST_MSECOND) {
+        /* Invalid MPD file: duration would be negative or zero */
+        goto syntax_error;
+      }
       start = period_node->start * GST_MSECOND;
     } else if (duration != GST_CLOCK_TIME_NONE) {
       /* start time inferred from previous period, this is still a regular period */
@@ -3230,13 +3474,26 @@
       goto early;
     }
 
-    if (period_node->duration != -1) {
-      duration = period_node->duration * GST_MSECOND;
-    } else if ((next = g_list_next (list)) != NULL) {
+    /* compute duration.
+       If there is a start time for the next period, or this is the last period
+       and mediaPresentationDuration was set, those values will take precedence
+       over a configured period duration in computing this period's duration
+
+       ISO/IEC 23009-1:2014(E), chapter 5.3.2.1
+       "The Period extends until the PeriodStart of the next Period, or until
+       the end of the Media Presentation in the case of the last Period."
+     */
+    if ((next = g_list_next (list)) != NULL) {
       /* try to infer this period duration from the start time of the next period */
       GstPeriodNode *next_period_node = next->data;
       if (next_period_node->start != -1) {
+        if (start >= next_period_node->start * GST_MSECOND) {
+          /* Invalid MPD file: duration would be negative or zero */
+          goto syntax_error;
+        }
         duration = next_period_node->start * GST_MSECOND - start;
+      } else if (period_node->duration != -1) {
+        duration = period_node->duration * GST_MSECOND;
       } else if (client->mpd_node->type == GST_MPD_FILE_TYPE_DYNAMIC) {
         /* might be a live file, ignore unspecified duration */
       } else {
@@ -3245,8 +3502,14 @@
       }
     } else if (client->mpd_node->mediaPresentationDuration != -1) {
       /* last Period of the Media Presentation */
+      if (client->mpd_node->mediaPresentationDuration * GST_MSECOND <= start) {
+        /* Invalid MPD file: duration would be negative or zero */
+        goto syntax_error;
+      }
       duration =
           client->mpd_node->mediaPresentationDuration * GST_MSECOND - start;
+    } else if (period_node->duration != -1) {
+      duration = period_node->duration * GST_MSECOND;
     } else if (client->mpd_node->type == GST_MPD_FILE_TYPE_DYNAMIC) {
       /* might be a live file, ignore unspecified duration */
     } else {
@@ -3255,9 +3518,6 @@
     }
 
     stream_period = g_slice_new0 (GstStreamPeriod);
-    if (stream_period == NULL) {
-      goto no_mem;
-    }
     client->periods = g_list_append (client->periods, stream_period);
     stream_period->period = period_node;
     stream_period->number = idx++;
@@ -3268,28 +3528,20 @@
         GST_TIME_FORMAT, idx, GST_TIME_ARGS (start), GST_TIME_ARGS (duration));
   }
 
-  GST_MPD_CLIENT_UNLOCK (client);
   GST_DEBUG ("Found a total of %d valid Periods in the Media Presentation",
       idx);
   return ret;
 
 early:
-  GST_MPD_CLIENT_UNLOCK (client);
   GST_WARNING
       ("Found an Early Available Period, skipping the rest of the Media Presentation");
   return ret;
 
 syntax_error:
-  GST_MPD_CLIENT_UNLOCK (client);
   GST_WARNING
       ("Cannot get the duration of the Period %d, skipping the rest of the Media Presentation",
       idx);
   return ret;
-
-no_mem:
-  GST_MPD_CLIENT_UNLOCK (client);
-  GST_WARNING ("Allocation of GstStreamPeriod struct failed!");
-  return FALSE;
 }
 
 static GList *
@@ -3329,10 +3581,6 @@
   }
 
   stream = g_slice_new0 (GstActiveStream);
-  if (stream == NULL) {
-    GST_WARNING ("Allocation of active stream struct failed!");
-    return FALSE;
-  }
   gst_mpdparser_init_active_stream_segments (stream);
 
   stream->baseURL_idx = 0;
@@ -3340,7 +3588,7 @@
 
   GST_DEBUG ("0. Current stream %p", stream);
 
-  /* retrive representation list */
+  /* retrieve representation list */
   if (stream->cur_adapt_set != NULL)
     rep_list = stream->cur_adapt_set->Representations;
 
@@ -3368,13 +3616,16 @@
   stream->mimeType =
       gst_mpdparser_representation_get_mimetype (adapt_set, representation);
   if (stream->mimeType == GST_STREAM_UNKNOWN) {
+    GST_WARNING ("Unknown mime type in the representation, aborting...");
     g_slice_free (GstActiveStream, stream);
     return FALSE;
   }
 
   client->active_streams = g_list_append (client->active_streams, stream);
-  if (!gst_mpd_client_setup_representation (client, stream, representation))
+  if (!gst_mpd_client_setup_representation (client, stream, representation)) {
+    GST_WARNING ("Failed to setup the representation, aborting...");
     return FALSE;
+  }
 
   GST_INFO ("Successfully setup the download pipeline for mimeType %d",
       stream->mimeType);
@@ -3387,42 +3638,71 @@
     GstClockTime ts)
 {
   gint index = 0;
+  gint repeat_index = 0;
   GstMediaSegment *selectedChunk = NULL;
+  gboolean in_segment;
 
   g_return_val_if_fail (stream != NULL, 0);
 
-  GST_MPD_CLIENT_LOCK (client);
   if (stream->segments) {
     for (index = 0; index < stream->segments->len; index++) {
       GstMediaSegment *segment = g_ptr_array_index (stream->segments, index);
 
-      GST_DEBUG ("Looking at fragment sequence chunk %d", index);
-      if (segment->start_time <= ts
-          && ts < segment->start_time + segment->duration) {
-        selectedChunk = segment;
-        break;
+      GST_DEBUG ("Looking at fragment sequence chunk %d / %d", index,
+          stream->segments->len);
+      in_segment = FALSE;
+      if (segment->start <= ts) {
+        if (segment->repeat >= 0) {
+          in_segment =
+              ts < segment->start + (segment->repeat + 1) * segment->duration;
+        } else {
+          GstClockTime end =
+              gst_mpdparser_get_segment_end_time (client, stream->segments,
+              segment, index);
+          in_segment = ts < end;
+        }
+        if (in_segment) {
+          selectedChunk = segment;
+          repeat_index = (ts - segment->start) / segment->duration;
+          break;
+        }
       }
     }
 
     if (selectedChunk == NULL) {
-      GST_MPD_CLIENT_UNLOCK (client);
+      stream->segment_index = stream->segments->len;
+      stream->segment_repeat_index = 0;
+      GST_DEBUG ("Seek to after last segment");
       return FALSE;
     }
   } else {
     GstClockTime duration =
-        gst_mpd_client_get_segment_duration (client, stream);
-    g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
-        SegmentTimeline == NULL, FALSE);
+        gst_mpd_client_get_segment_duration (client, stream, NULL);
+    GstStreamPeriod *stream_period = gst_mpdparser_get_stream_period (client);
+    guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
+
+    g_return_val_if_fail (stream->cur_seg_template->
+        MultSegBaseType->SegmentTimeline == NULL, FALSE);
     if (!GST_CLOCK_TIME_IS_VALID (duration)) {
-      GST_MPD_CLIENT_UNLOCK (client);
       return FALSE;
     }
+
+    if (ts > stream_period->start)
+      ts -= stream_period->start;
+    else
+      ts = 0;
+
     index = ts / duration;
+    if (segments_count > 0 && index >= segments_count) {
+      stream->segment_index = segments_count;
+      stream->segment_repeat_index = 0;
+      GST_DEBUG ("Seek to after last segment");
+      return FALSE;
+    }
   }
 
-  gst_mpd_client_set_segment_index (stream, index);
-
-  GST_MPD_CLIENT_UNLOCK (client);
+  stream->segment_repeat_index = repeat_index;
+  stream->segment_index = index;
 
   return TRUE;
 }
@@ -3465,42 +3745,6 @@
   return rv;
 }
 
-gint
-gst_mpd_client_get_segment_index_at_time (GstMpdClient * client,
-    GstActiveStream * stream, const GstDateTime * time)
-{
-  GstClockTime seg_duration;
-  gint64 diff;
-  GstDateTime *avail_start =
-      gst_mpd_client_get_availability_start_time (client);
-  GstStreamPeriod *stream_period = gst_mpdparser_get_stream_period (client);
-
-  if (avail_start == NULL)
-    return -1;
-
-  if (stream_period && stream_period->period) {
-    GstDateTime *t;
-
-    t = gst_mpd_client_add_time_difference (avail_start,
-        stream_period->period->start * 1000);
-    gst_date_time_unref (avail_start);
-    avail_start = t;
-  }
-  diff = gst_mpd_client_calculate_time_difference (avail_start, time);
-  gst_date_time_unref (avail_start);
-
-  if (diff < 0)
-    return -2;
-  if (diff > gst_mpd_client_get_media_presentation_duration (client))
-    return -3;
-
-  /* TODO: Assumes all fragments are roughly the same duration */
-  seg_duration = gst_mpd_client_get_next_fragment_duration (client, stream);
-  if (seg_duration == 0)
-    return -1;
-  return diff / seg_duration;
-}
-
 static GstDateTime *
 gst_mpd_client_get_availability_start_time (GstMpdClient * client)
 {
@@ -3509,38 +3753,41 @@
   if (client == NULL)
     return (GstDateTime *) NULL;
 
-  GST_MPD_CLIENT_LOCK (client);
   start_time = client->mpd_node->availabilityStartTime;
-  gst_date_time_ref (start_time);
-  GST_MPD_CLIENT_UNLOCK (client);
+  if (start_time)
+    gst_date_time_ref (start_time);
   return start_time;
 }
 
 gboolean
-gst_mpd_client_get_last_fragment_timestamp (GstMpdClient * client,
+gst_mpd_client_get_last_fragment_timestamp_end (GstMpdClient * client,
     guint stream_idx, GstClockTime * ts)
 {
   GstActiveStream *stream;
   gint segment_idx;
-  GstMediaSegment currentChunk;
+  GstMediaSegment *currentChunk;
+  GstStreamPeriod *stream_period;
 
   GST_DEBUG ("Stream index: %i", stream_idx);
   stream = g_list_nth_data (client->active_streams, stream_idx);
   g_return_val_if_fail (stream != NULL, 0);
 
-  GST_MPD_CLIENT_LOCK (client);
-  segment_idx = gst_mpd_client_get_segments_counts (stream) - 1;
-  GST_DEBUG ("Looking for fragment sequence chunk %d", segment_idx);
+  segment_idx = gst_mpd_client_get_segments_counts (client, stream) - 1;
+  currentChunk = g_ptr_array_index (stream->segments, segment_idx);
 
-  if (!gst_mpdparser_get_chunk_by_index (client, stream_idx, segment_idx,
-          &currentChunk)) {
-    GST_MPD_CLIENT_UNLOCK (client);
-    return FALSE;
+  if (currentChunk->repeat >= 0) {
+    *ts =
+        currentChunk->start + (currentChunk->duration * (1 +
+            currentChunk->repeat));
+  } else {
+    /* 5.3.9.6.1: negative repeat means repeat till the end of the
+     * period, or the next update of the MPD (which I think is
+     * implicit, as this will all get deleted/recreated), or the
+     * start of the next segment, if any. */
+    stream_period = gst_mpdparser_get_stream_period (client);
+    *ts = stream_period->start + stream_period->duration;
   }
 
-  *ts = currentChunk.start_time;
-  GST_MPD_CLIENT_UNLOCK (client);
-
   return TRUE;
 }
 
@@ -3549,38 +3796,111 @@
     guint stream_idx, GstClockTime * ts)
 {
   GstActiveStream *stream;
-  gint segment_idx;
-  GstMediaSegment currentChunk;
+  GstMediaSegment *currentChunk;
 
   GST_DEBUG ("Stream index: %i", stream_idx);
   stream = g_list_nth_data (client->active_streams, stream_idx);
   g_return_val_if_fail (stream != NULL, 0);
 
-  GST_MPD_CLIENT_LOCK (client);
-  segment_idx = gst_mpd_client_get_segment_index (stream);
-  GST_DEBUG ("Looking for fragment sequence chunk %d", segment_idx);
+  if (stream->segments) {
+    GST_DEBUG ("Looking for fragment sequence chunk %d / %d",
+        stream->segment_index, stream->segments->len);
+    if (stream->segment_index >= stream->segments->len)
+      return FALSE;
+    currentChunk = g_ptr_array_index (stream->segments, stream->segment_index);
 
-  if (!gst_mpdparser_get_chunk_by_index (client, stream_idx, segment_idx,
-          &currentChunk)) {
-    GST_MPD_CLIENT_UNLOCK (client);
-    return FALSE;
+    *ts =
+        currentChunk->start +
+        (currentChunk->duration * stream->segment_repeat_index);
+  } else {
+    GstClockTime duration =
+        gst_mpd_client_get_segment_duration (client, stream, NULL);
+    guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
+
+    g_return_val_if_fail (stream->cur_seg_template->
+        MultSegBaseType->SegmentTimeline == NULL, FALSE);
+    if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0
+            && stream->segment_index >= segments_count)) {
+      return FALSE;
+    }
+    *ts = stream->segment_index * duration;
   }
 
-  *ts = currentChunk.start_time;
-  GST_MPD_CLIENT_UNLOCK (client);
-
   return TRUE;
 }
 
-gboolean
-gst_mpd_client_get_next_fragment (GstMpdClient * client,
-    guint indexStream, GstMediaFragmentInfo * fragment, gboolean forward)
+GstClockTime
+gst_mpd_parser_get_stream_presentation_offset (GstMpdClient * client,
+    guint stream_idx)
 {
   GstActiveStream *stream = NULL;
-  GstMediaSegment currentChunk;
+
+  g_return_val_if_fail (client != NULL, 0);
+  g_return_val_if_fail (client->active_streams != NULL, 0);
+  stream = g_list_nth_data (client->active_streams, stream_idx);
+  g_return_val_if_fail (stream != NULL, 0);
+
+  return stream->presentationTimeOffset;
+}
+
+GstClockTime
+gst_mpd_parser_get_period_start_time (GstMpdClient * client)
+{
+  GstStreamPeriod *stream_period = NULL;
+
+  g_return_val_if_fail (client != NULL, 0);
+  stream_period = gst_mpdparser_get_stream_period (client);
+  g_return_val_if_fail (stream_period != NULL, 0);
+
+  return stream_period->start;
+}
+
+/**
+ * gst_mpd_client_get_utc_timing_sources:
+ * @client: #GstMpdClient to check for UTCTiming elements
+ * @methods: A bit mask of #GstMPDUTCTimingType that specifies the methods
+ *     to search for.
+ * @selected_method: (nullable): The selected method
+ * Returns: (transfer none): A NULL terminated array of URLs of servers
+ *     that use @selected_method to provide a realtime clock.
+ *
+ * Searches the UTCTiming elements found in the manifest for an element
+ * that uses one of the UTC timing methods specified in @selected_method.
+ * If multiple UTCTiming elements are present that support one of the
+ * methods specified in @selected_method, the first one is returned.
+ *
+ * Since: 1.6
+ */
+gchar **
+gst_mpd_client_get_utc_timing_sources (GstMpdClient * client,
+    guint methods, GstMPDUTCTimingType * selected_method)
+{
+  GList *list;
+
+  g_return_val_if_fail (client != NULL, NULL);
+  g_return_val_if_fail (client->mpd_node != NULL, NULL);
+  for (list = g_list_first (client->mpd_node->UTCTiming); list;
+      list = g_list_next (list)) {
+    const GstUTCTimingNode *node = (const GstUTCTimingNode *) list->data;
+    if (node->method & methods) {
+      if (selected_method) {
+        *selected_method = node->method;
+      }
+      return node->urls;
+    }
+  }
+  return NULL;
+}
+
+gboolean
+gst_mpd_client_get_next_fragment (GstMpdClient * client,
+    guint indexStream, GstMediaFragmentInfo * fragment)
+{
+  GstActiveStream *stream = NULL;
+  GstMediaSegment *currentChunk;
   gchar *mediaURL = NULL;
   gchar *indexURL = NULL;
-  guint segment_idx;
+  GstUri *base_url, *frag_url;
 
   /* select stream */
   g_return_val_if_fail (client != NULL, FALSE);
@@ -3589,84 +3909,128 @@
   g_return_val_if_fail (stream != NULL, FALSE);
   g_return_val_if_fail (stream->cur_representation != NULL, FALSE);
 
-  GST_MPD_CLIENT_LOCK (client);
-  segment_idx = gst_mpd_client_get_segment_index (stream);
-  GST_DEBUG ("Looking for fragment sequence chunk %d", segment_idx);
+  if (stream->segments) {
+    GST_DEBUG ("Looking for fragment sequence chunk %d / %d",
+        stream->segment_index, stream->segments->len);
+    if (stream->segment_index >= stream->segments->len)
+      return FALSE;
+  } else {
+    GstClockTime duration = gst_mpd_client_get_segment_duration (client,
+        stream, NULL);
+    guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
 
-  if (!gst_mpdparser_get_chunk_by_index (client, indexStream, segment_idx,
-          &currentChunk)) {
-    GST_MPD_CLIENT_UNLOCK (client);
-    return FALSE;
-  }
-
-  GST_DEBUG ("currentChunk->SegmentURL = %p", currentChunk.SegmentURL);
-  if (currentChunk.SegmentURL != NULL) {
-    mediaURL =
-        g_strdup (gst_mpdparser_get_mediaURL (stream, currentChunk.SegmentURL));
-    indexURL = currentChunk.SegmentURL->index;
-  } else if (stream->cur_seg_template != NULL) {
-    mediaURL =
-        gst_mpdparser_build_URL_from_template (stream->cur_seg_template->media,
-        stream->cur_representation->id, currentChunk.number,
-        stream->cur_representation->bandwidth, currentChunk.start);
-    if (stream->cur_seg_template->index) {
-      indexURL =
-          gst_mpdparser_build_URL_from_template (stream->cur_seg_template->
-          index, stream->cur_representation->id, currentChunk.number,
-          stream->cur_representation->bandwidth, currentChunk.start);
+    g_return_val_if_fail (stream->cur_seg_template->
+        MultSegBaseType->SegmentTimeline == NULL, FALSE);
+    if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0
+            && stream->segment_index >= segments_count)) {
+      return FALSE;
     }
+    fragment->duration = duration;
   }
-  GST_DEBUG ("mediaURL = %s", mediaURL);
-  GST_DEBUG ("indexURL = %s", indexURL);
 
-  fragment->timestamp = currentChunk.start_time;
-  fragment->duration = currentChunk.duration;
-  fragment->discontinuity = segment_idx != currentChunk.number;
+  /* FIXME rework discont checking */
+  /* fragment->discontinuity = segment_idx != currentChunk.number; */
   fragment->range_start = 0;
   fragment->range_end = -1;
   fragment->index_uri = NULL;
   fragment->index_range_start = 0;
   fragment->index_range_end = -1;
-  if (currentChunk.SegmentURL) {
-    if (currentChunk.SegmentURL->mediaRange) {
-      fragment->range_start =
-          currentChunk.SegmentURL->mediaRange->first_byte_pos;
-      fragment->range_end = currentChunk.SegmentURL->mediaRange->last_byte_pos;
+
+  if (stream->segments) {
+    currentChunk = g_ptr_array_index (stream->segments, stream->segment_index);
+
+    GST_DEBUG ("currentChunk->SegmentURL = %p", currentChunk->SegmentURL);
+    if (currentChunk->SegmentURL != NULL) {
+      mediaURL =
+          g_strdup (gst_mpdparser_get_mediaURL (stream,
+              currentChunk->SegmentURL));
+      indexURL = g_strdup (currentChunk->SegmentURL->index);
+    } else if (stream->cur_seg_template != NULL) {
+      mediaURL =
+          gst_mpdparser_build_URL_from_template (stream->
+          cur_seg_template->media, stream->cur_representation->id,
+          currentChunk->number + stream->segment_repeat_index,
+          stream->cur_representation->bandwidth,
+          currentChunk->scale_start +
+          stream->segment_repeat_index * currentChunk->scale_duration);
+      if (stream->cur_seg_template->index) {
+        indexURL =
+            gst_mpdparser_build_URL_from_template (stream->
+            cur_seg_template->index, stream->cur_representation->id,
+            currentChunk->number + stream->segment_repeat_index,
+            stream->cur_representation->bandwidth,
+            currentChunk->scale_start +
+            stream->segment_repeat_index * currentChunk->scale_duration);
+      }
     }
-    if (currentChunk.SegmentURL->indexRange) {
-      fragment->index_range_start =
-          currentChunk.SegmentURL->indexRange->first_byte_pos;
-      fragment->index_range_end =
-          currentChunk.SegmentURL->indexRange->last_byte_pos;
+    GST_DEBUG ("mediaURL = %s", mediaURL);
+    GST_DEBUG ("indexURL = %s", indexURL);
+
+    fragment->timestamp =
+        currentChunk->start +
+        stream->segment_repeat_index * currentChunk->duration;
+    fragment->duration = currentChunk->duration;
+    if (currentChunk->SegmentURL) {
+      if (currentChunk->SegmentURL->mediaRange) {
+        fragment->range_start =
+            currentChunk->SegmentURL->mediaRange->first_byte_pos;
+        fragment->range_end =
+            currentChunk->SegmentURL->mediaRange->last_byte_pos;
+      }
+      if (currentChunk->SegmentURL->indexRange) {
+        fragment->index_range_start =
+            currentChunk->SegmentURL->indexRange->first_byte_pos;
+        fragment->index_range_end =
+            currentChunk->SegmentURL->indexRange->last_byte_pos;
+      }
     }
+  } else {
+    if (stream->cur_seg_template != NULL) {
+      mediaURL =
+          gst_mpdparser_build_URL_from_template (stream->
+          cur_seg_template->media, stream->cur_representation->id,
+          stream->segment_index +
+          stream->cur_seg_template->MultSegBaseType->startNumber,
+          stream->cur_representation->bandwidth,
+          stream->segment_index * fragment->duration);
+      if (stream->cur_seg_template->index) {
+        indexURL =
+            gst_mpdparser_build_URL_from_template (stream->
+            cur_seg_template->index, stream->cur_representation->id,
+            stream->segment_index +
+            stream->cur_seg_template->MultSegBaseType->startNumber,
+            stream->cur_representation->bandwidth,
+            stream->segment_index * fragment->duration);
+      }
+    } else {
+      return FALSE;
+    }
+
+    GST_DEBUG ("mediaURL = %s", mediaURL);
+    GST_DEBUG ("indexURL = %s", indexURL);
+
+    fragment->timestamp = stream->segment_index * fragment->duration;
   }
 
-  if (mediaURL == NULL) {
-    /* single segment with URL encoded in the baseURL syntax element */
-    fragment->uri = g_strdup (stream->baseURL);
-  } else if (strncmp (mediaURL, "http://", 7) != 0) {
-    fragment->uri =
-        g_strconcat (stream->baseURL, mediaURL, stream->queryURL, NULL);
-    g_free (mediaURL);
-  } else if (stream->queryURL) {
-    fragment->uri = g_strconcat (mediaURL, stream->queryURL, NULL);
-    g_free (mediaURL);
-  } else {
-    fragment->uri = mediaURL;
+  base_url = gst_uri_from_string (stream->baseURL);
+  frag_url = gst_uri_from_string_with_base (base_url, mediaURL);
+  g_free (mediaURL);
+  if (stream->queryURL) {
+    frag_url = gst_uri_make_writable (frag_url);
+    gst_uri_set_query_string (frag_url, stream->queryURL);
   }
+  fragment->uri = gst_uri_to_string (frag_url);
+  gst_uri_unref (frag_url);
 
   if (indexURL != NULL) {
-    if (strncmp (indexURL, "http://", 7) != 0) {
-      fragment->index_uri =
-          g_strconcat (stream->baseURL, indexURL, stream->queryURL, NULL);
-      g_free (indexURL);
-    } else if (stream->queryURL) {
-      fragment->index_uri = g_strconcat (indexURL, stream->queryURL, NULL);
-      g_free (indexURL);
-    } else {
-      fragment->index_uri = indexURL;
-    }
-  } else if (fragment->index_range_start || fragment->index_range_end != -1) {
+    frag_url = gst_uri_make_writable (gst_uri_from_string_with_base (base_url,
+            indexURL));
+    gst_uri_set_query_string (frag_url, stream->queryURL);
+    fragment->index_uri = gst_uri_to_string (frag_url);
+    gst_uri_unref (frag_url);
+    g_free (indexURL);
+  } else if (indexURL == NULL && (fragment->index_range_start
+          || fragment->index_range_end != -1)) {
     /* index has no specific URL but has a range, we should only use this if
      * the media also has a range, otherwise we are serving some data twice
      * (in the media fragment and again in the index) */
@@ -3679,9 +4043,7 @@
     }
   }
 
-  gst_mpd_client_set_segment_index (stream,
-      forward ? segment_idx + 1 : segment_idx - 1);
-  GST_MPD_CLIENT_UNLOCK (client);
+  gst_uri_unref (base_url);
 
   GST_DEBUG ("Loading chunk with URL %s", fragment->uri);
 
@@ -3689,6 +4051,147 @@
 }
 
 gboolean
+gst_mpd_client_has_next_segment (GstMpdClient * client,
+    GstActiveStream * stream, gboolean forward)
+{
+  if (forward) {
+    guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
+
+    if (segments_count > 0 && stream->segment_index + 1 == segments_count) {
+      GstMediaSegment *segment;
+
+      segment = g_ptr_array_index (stream->segments, stream->segment_index);
+      if (segment->repeat >= 0
+          && stream->segment_repeat_index >= segment->repeat)
+        return FALSE;
+    } else if (segments_count > 0
+        && stream->segment_index + 1 >= segments_count) {
+      return FALSE;
+    }
+  } else {
+    if (stream->segment_index < 0)
+      return FALSE;
+  }
+
+  return TRUE;
+}
+
+GstFlowReturn
+gst_mpd_client_advance_segment (GstMpdClient * client, GstActiveStream * stream,
+    gboolean forward)
+{
+  GstMediaSegment *segment;
+  GstFlowReturn ret = GST_FLOW_OK;
+  guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
+
+  GST_DEBUG ("Advancing segment. Current: %d / %d r:%d", stream->segment_index,
+      segments_count, stream->segment_repeat_index);
+
+  /* handle special cases first */
+  if (forward) {
+    if (segments_count > 0 && stream->segment_index >= segments_count) {
+      ret = GST_FLOW_EOS;
+      goto done;
+    }
+
+    if (stream->segments == NULL) {
+      if (stream->segment_index < 0) {
+        stream->segment_index = 0;
+      } else {
+        stream->segment_index++;
+        if (segments_count > 0 && stream->segment_index >= segments_count) {
+          ret = GST_FLOW_EOS;
+        }
+      }
+      goto done;
+    }
+
+    /* special case for when playback direction is reverted right at *
+     * the end of the segment list */
+    if (stream->segment_index < 0) {
+      stream->segment_index = 0;
+      goto done;
+    }
+  } else {
+    if (stream->segments == NULL)
+      stream->segment_index--;
+    if (stream->segment_index < 0) {
+      stream->segment_index = -1;
+      ret = GST_FLOW_EOS;
+      goto done;
+    }
+    if (stream->segments == NULL)
+      goto done;
+
+    /* special case for when playback direction is reverted right at *
+     * the end of the segment list */
+    if (stream->segment_index >= segments_count) {
+      stream->segment_index = segments_count - 1;
+      segment = g_ptr_array_index (stream->segments, stream->segment_index);
+      if (segment->repeat >= 0) {
+        stream->segment_repeat_index = segment->repeat;
+      } else {
+        GstClockTime start = segment->start;
+        GstClockTime end =
+            gst_mpdparser_get_segment_end_time (client, stream->segments,
+            segment,
+            stream->segment_index);
+        stream->segment_repeat_index =
+            (guint) (end - start) / segment->duration;
+      }
+      goto done;
+    }
+  }
+
+  /* for the normal cases we can get the segment safely here */
+  segment = g_ptr_array_index (stream->segments, stream->segment_index);
+  if (forward) {
+    if (segment->repeat >= 0 && stream->segment_repeat_index >= segment->repeat) {
+      stream->segment_repeat_index = 0;
+      stream->segment_index++;
+      if (segments_count > 0 && stream->segment_index >= segments_count) {
+        ret = GST_FLOW_EOS;
+        goto done;
+      }
+    } else {
+      stream->segment_repeat_index++;
+    }
+  } else {
+    if (stream->segment_repeat_index == 0) {
+      stream->segment_index--;
+      if (stream->segment_index < 0) {
+        ret = GST_FLOW_EOS;
+        goto done;
+      }
+
+      segment = g_ptr_array_index (stream->segments, stream->segment_index);
+      /* negative repeats only seem to make sense at the end of a list,
+       * so this one will probably not be. Needs some sanity checking
+       * when loading the XML data. */
+      if (segment->repeat >= 0) {
+        stream->segment_repeat_index = segment->repeat;
+      } else {
+        GstClockTime start = segment->start;
+        GstClockTime end =
+            gst_mpdparser_get_segment_end_time (client, stream->segments,
+            segment,
+            stream->segment_index);
+        stream->segment_repeat_index =
+            (guint) (end - start) / segment->duration;
+      }
+    } else {
+      stream->segment_repeat_index--;
+    }
+  }
+
+done:
+  GST_DEBUG ("Advanced to segment: %d / %d r:%d (ret: %s)",
+      stream->segment_index, segments_count,
+      stream->segment_repeat_index, gst_flow_get_name (ret));
+  return ret;
+}
+
+gboolean
 gst_mpd_client_get_next_header (GstMpdClient * client, gchar ** uri,
     guint stream_idx, gint64 * range_start, gint64 * range_end)
 {
@@ -3706,7 +4209,6 @@
   *range_end = -1;
 
   GST_DEBUG ("Looking for current representation header");
-  GST_MPD_CLIENT_LOCK (client);
   *uri = NULL;
   if (stream->cur_segment_base && stream->cur_segment_base->Initialization) {
     *uri =
@@ -3735,7 +4237,6 @@
           stream->cur_representation->bandwidth, 0);
     }
   }
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return *uri == NULL ? FALSE : TRUE;
 }
@@ -3758,7 +4259,6 @@
   *range_end = -1;
 
   GST_DEBUG ("Looking for current representation index");
-  GST_MPD_CLIENT_LOCK (client);
   *uri = NULL;
   if (stream->cur_segment_base && stream->cur_segment_base->indexRange) {
     *uri =
@@ -3782,7 +4282,6 @@
           stream->cur_representation->id, 0,
           stream->cur_representation->bandwidth, 0);
   }
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return *uri == NULL ? FALSE : TRUE;
 }
@@ -3792,26 +4291,30 @@
     GstActiveStream * stream)
 {
   GstMediaSegment *media_segment = NULL;
-  guint seg_idx;
+  gint seg_idx;
 
   g_return_val_if_fail (stream != NULL, 0);
 
-  seg_idx = gst_mpd_client_get_segment_index (stream);
+  seg_idx = stream->segment_index;
 
   if (stream->segments) {
-    if (seg_idx < stream->segments->len)
+    if (seg_idx < stream->segments->len && seg_idx >= 0)
       media_segment = g_ptr_array_index (stream->segments, seg_idx);
 
     return media_segment == NULL ? 0 : media_segment->duration;
   } else {
     GstClockTime duration =
-        gst_mpd_client_get_segment_duration (client, stream);
-    g_return_val_if_fail (stream->cur_seg_template->
-        MultSegBaseType->SegmentTimeline == NULL, 0);
+        gst_mpd_client_get_segment_duration (client, stream, NULL);
+    guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
 
-    if (GST_CLOCK_TIME_IS_VALID (duration))
-      return duration;
-    return 0;
+    g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
+        SegmentTimeline == NULL, 0);
+
+    if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0
+            && seg_idx >= segments_count)) {
+      return 0;
+    }
+    return duration;
   }
 }
 
@@ -3822,14 +4325,12 @@
 
   g_return_val_if_fail (client != NULL, GST_CLOCK_TIME_NONE);
 
-  GST_MPD_CLIENT_LOCK (client);
   if (client->mpd_node->mediaPresentationDuration != -1) {
     duration = client->mpd_node->mediaPresentationDuration * GST_MSECOND;
   } else {
     /* We can only get the duration for on-demand streams */
     duration = GST_CLOCK_TIME_NONE;
   }
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return duration;
 }
@@ -3840,22 +4341,23 @@
   GstStreamPeriod *next_stream_period;
   gboolean ret = FALSE;
   GList *iter;
+  guint period_idx;
 
   g_return_val_if_fail (client != NULL, FALSE);
   g_return_val_if_fail (client->periods != NULL, FALSE);
   g_return_val_if_fail (period_id != NULL, FALSE);
 
-  GST_MPD_CLIENT_LOCK (client);
-  for (iter = client->periods; iter; iter = g_list_next (iter)) {
+  for (period_idx = 0, iter = client->periods; iter;
+      period_idx++, iter = g_list_next (iter)) {
     next_stream_period = iter->data;
 
     if (next_stream_period->period->id
         && strcmp (next_stream_period->period->id, period_id) == 0) {
       ret = TRUE;
+      client->period_idx = period_idx;
       break;
     }
   }
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return ret;
 }
@@ -3869,13 +4371,11 @@
   g_return_val_if_fail (client != NULL, FALSE);
   g_return_val_if_fail (client->periods != NULL, FALSE);
 
-  GST_MPD_CLIENT_LOCK (client);
   next_stream_period = g_list_nth_data (client->periods, period_idx);
   if (next_stream_period != NULL) {
     client->period_idx = period_idx;
     ret = TRUE;
   }
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return ret;
 }
@@ -3886,9 +4386,7 @@
   guint period_idx;
 
   g_return_val_if_fail (client != NULL, 0);
-  GST_MPD_CLIENT_LOCK (client);
   period_idx = client->period_idx;
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return period_idx;
 }
@@ -3900,74 +4398,74 @@
   gchar *period_id = NULL;
 
   g_return_val_if_fail (client != NULL, 0);
-  GST_MPD_CLIENT_LOCK (client);
   period = g_list_nth_data (client->periods, client->period_idx);
   if (period && period->period)
     period_id = period->period->id;
-  GST_MPD_CLIENT_UNLOCK (client);
 
   return period_id;
 }
 
 gboolean
+gst_mpd_client_has_previous_period (GstMpdClient * client)
+{
+  GList *next_stream_period;
+  g_return_val_if_fail (client != NULL, FALSE);
+  g_return_val_if_fail (client->periods != NULL, FALSE);
+
+  next_stream_period =
+      g_list_nth_data (client->periods, client->period_idx - 1);
+
+  return next_stream_period != NULL;
+}
+
+gboolean
 gst_mpd_client_has_next_period (GstMpdClient * client)
 {
   GList *next_stream_period;
   g_return_val_if_fail (client != NULL, FALSE);
   g_return_val_if_fail (client->periods != NULL, FALSE);
 
-  GST_MPD_CLIENT_LOCK (client);
   next_stream_period =
       g_list_nth_data (client->periods, client->period_idx + 1);
-  GST_MPD_CLIENT_UNLOCK (client);
-
   return next_stream_period != NULL;
 }
 
 void
-gst_mpd_client_set_segment_index_for_all_streams (GstMpdClient * client,
-    guint segment_idx)
+gst_mpd_client_seek_to_first_segment (GstMpdClient * client)
 {
   GList *list;
 
   g_return_if_fail (client != NULL);
   g_return_if_fail (client->active_streams != NULL);
 
-  /* FIXME: support multiple streams with different segment duration */
   for (list = g_list_first (client->active_streams); list;
       list = g_list_next (list)) {
     GstActiveStream *stream = (GstActiveStream *) list->data;
     if (stream) {
-      stream->segment_idx = segment_idx;
+      stream->segment_index = 0;
+      stream->segment_repeat_index = 0;
     }
   }
 }
 
-void
-gst_mpd_client_set_segment_index (GstActiveStream * stream, guint segment_idx)
-{
-  g_return_if_fail (stream != NULL);
-
-  stream->segment_idx = segment_idx;
-}
-
-guint
-gst_mpd_client_get_segment_index (GstActiveStream * stream)
-{
-  g_return_val_if_fail (stream != NULL, 0);
-
-  return stream->segment_idx;
-}
-
 static guint
-gst_mpd_client_get_segments_counts (GstActiveStream * stream)
+gst_mpd_client_get_segments_counts (GstMpdClient * client,
+    GstActiveStream * stream)
 {
+  GstStreamPeriod *stream_period;
+
   g_return_val_if_fail (stream != NULL, 0);
 
   if (stream->segments)
     return stream->segments->len;
-  g_return_val_if_fail (stream->cur_seg_template->
-      MultSegBaseType->SegmentTimeline == NULL, 0);
+  g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
+      SegmentTimeline == NULL, 0);
+
+  stream_period = gst_mpdparser_get_stream_period (client);
+  if (stream_period->duration != -1)
+    return gst_util_uint64_scale_ceil (stream_period->duration, 1,
+        gst_mpd_client_get_segment_duration (client, stream, NULL));
+
   return 0;
 }
 
@@ -4121,7 +4619,7 @@
   GList *list;
   const gchar *this_mimeType = "audio";
   gchar *mimeType = NULL;
-  guint nb_adapatation_set = 0;
+  guint nb_adaptation_set = 0;
 
   stream_period = gst_mpdparser_get_stream_period (client);
   g_return_val_if_fail (stream_period != NULL, 0);
@@ -4130,11 +4628,12 @@
   for (list = g_list_first (stream_period->period->AdaptationSets); list;
       list = g_list_next (list)) {
     adapt_set = (GstAdaptationSetNode *) list->data;
-    if (adapt_set) {
+    if (adapt_set && adapt_set->lang) {
       gchar *this_lang = adapt_set->lang;
       GstRepresentationNode *rep;
       rep =
           gst_mpdparser_get_lowest_representation (adapt_set->Representations);
+      mimeType = NULL;
       if (rep->RepresentationBase)
         mimeType = rep->RepresentationBase->mimeType;
       if (!mimeType && adapt_set->RepresentationBase) {
@@ -4142,15 +4641,13 @@
       }
 
       if (strncmp_ext (mimeType, this_mimeType) == 0) {
-        if (this_lang) {
-          nb_adapatation_set++;
-          *lang = g_list_append (*lang, this_lang);
-        }
+        nb_adaptation_set++;
+        *lang = g_list_append (*lang, this_lang);
       }
     }
   }
 
-  return nb_adapatation_set;
+  return nb_adaptation_set;
 }
 
 
@@ -4159,7 +4656,7 @@
     GstActiveStream * stream)
 {
   GstDateTime *availability_start_time, *rv;
-  guint seg_idx;
+  gint seg_idx;
   GstClockTime seg_duration;
   gint64 offset;
   GstStreamPeriod *stream_period;
@@ -4169,8 +4666,8 @@
 
   stream_period = gst_mpdparser_get_stream_period (client);
 
-  seg_idx = gst_mpd_client_get_segment_index (stream);
-  seg_duration = gst_mpd_client_get_segment_duration (client, stream);
+  seg_idx = stream->segment_index;
+  seg_duration = gst_mpd_client_get_segment_duration (client, stream, NULL);
   if (seg_duration == 0)
     return NULL;
   availability_start_time = gst_mpd_client_get_availability_start_time (client);
@@ -4180,9 +4677,14 @@
   if (stream_period && stream_period->period) {
     GstDateTime *t =
         gst_mpd_client_add_time_difference (availability_start_time,
-        stream_period->period->start * 1000);
+        stream_period->start / 1000);
     gst_date_time_unref (availability_start_time);
     availability_start_time = t;
+
+    if (availability_start_time == NULL) {
+      GST_WARNING_OBJECT (client, "Failed to offset availability_start_time");
+      return NULL;
+    }
   }
 
   offset = (1 + seg_idx) * seg_duration;
@@ -4205,7 +4707,7 @@
 
   g_return_val_if_fail (gst_mpd_client_is_live (client), 0);
 
-  duration = gst_mpd_client_get_segment_duration (client, stream);
+  duration = gst_mpd_client_get_segment_duration (client, stream, NULL);
   stream_now = g_date_time_difference (now, start);
   g_date_time_unref (now);
   g_date_time_unref (start);
@@ -4244,7 +4746,7 @@
     *diff = ts_microseconds - stream_now;
     return 1;
   }
-  if (client->mpd_node->timeShiftBufferDepth
+  if (client->mpd_node->timeShiftBufferDepth != -1
       && ts_microseconds <
       stream_now - client->mpd_node->timeShiftBufferDepth) {
     *diff = ts_microseconds - stream_now;
@@ -4270,6 +4772,10 @@
   ts_microseconds = g_date_time_difference (time, start);
   g_date_time_unref (start);
 
+  /* Clamp to availability start time, otherwise calculations wrap around */
+  if (ts_microseconds < 0)
+    ts_microseconds = 0;
+
   ts = ts_microseconds * GST_USECOND;
   for (stream = client->active_streams; stream; stream = g_list_next (stream)) {
     ret = ret & gst_mpd_client_stream_seek (client, stream->data, ts);
@@ -4283,3 +4789,9 @@
   g_free (fragment->uri);
   g_free (fragment->index_uri);
 }
+
+gboolean
+gst_mpd_client_has_isoff_ondemand_profile (GstMpdClient * client)
+{
+  return client->profile_isoff_ondemand;
+}
diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h
index 24755de..14a2390 100644
--- a/ext/dash/gstmpdparser.h
+++ b/ext/dash/gstmpdparser.h
@@ -56,6 +56,7 @@
 typedef struct _GstProgramInformationNode GstProgramInformationNode;
 typedef struct _GstMetricsRangeNode       GstMetricsRangeNode;
 typedef struct _GstMetricsNode            GstMetricsNode;
+typedef struct _GstUTCTimingNode          GstUTCTimingNode;
 typedef struct _GstSNode                  GstSNode;
 typedef struct _GstSegmentTimelineNode    GstSegmentTimelineNode;
 typedef struct _GstSegmentBaseType        GstSegmentBaseType;
@@ -90,6 +91,18 @@
   GST_SAP_TYPE_6
 } GstSAPType;
 
+typedef enum
+{
+  GST_MPD_UTCTIMING_TYPE_UNKNOWN     = 0x00,
+  GST_MPD_UTCTIMING_TYPE_NTP         = 0x01,
+  GST_MPD_UTCTIMING_TYPE_SNTP        = 0x02,
+  GST_MPD_UTCTIMING_TYPE_HTTP_HEAD   = 0x04,
+  GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE = 0x08,
+  GST_MPD_UTCTIMING_TYPE_HTTP_ISO    = 0x10,
+  GST_MPD_UTCTIMING_TYPE_HTTP_NTP    = 0x20,
+  GST_MPD_UTCTIMING_TYPE_DIRECT      = 0x40
+} GstMPDUTCTimingType;
+
 struct _GstBaseURL
 {
   gchar *baseURL;
@@ -125,7 +138,7 @@
 {
   guint64 t;
   guint64 d;
-  guint r;
+  gint r;
 };
 
 struct _GstSegmentTimelineNode
@@ -143,7 +156,7 @@
 struct _GstSegmentBaseType
 {
   guint timescale;
-  guint presentationTimeOffset;
+  guint64 presentationTimeOffset;
   GstRange *indexRange;
   gboolean indexRangeExact;
   /* Initialization node */
@@ -362,6 +375,12 @@
   GList *Reportings;
 };
 
+struct _GstUTCTimingNode {
+  GstMPDUTCTimingType method;
+  /* NULL terminated array of strings */
+  gchar **urls;
+};
+
 struct _GstMPDNode
 {
   gchar *default_namespace;
@@ -390,6 +409,8 @@
   GList *Periods;
   /* list of Metrics nodes */
   GList *Metrics;
+  /* list of GstUTCTimingNode nodes */
+  GList *UTCTiming;
 };
 
 /**
@@ -414,8 +435,10 @@
 {
   GstSegmentURLNode *SegmentURL;              /* this is NULL when using a SegmentTemplate */
   guint number;                               /* segment number */
-  guint64 start;                                /* segment start time in timescale units */
-  GstClockTime start_time;                    /* segment start time */
+  gint repeat;                                /* number of extra repetitions (0 = played only once) */
+  gint64 scale_start;                         /* start time in timescale units */
+  gint64 scale_duration;                      /* duration in timescale units */
+  GstClockTime start;                         /* segment start time */
   GstClockTime duration;                      /* segment duration */
 };
 
@@ -445,7 +468,7 @@
 
   guint baseURL_idx;                          /* index of the baseURL used for last request */
   gchar *baseURL;                             /* active baseURL used for last request */
-  gchar *queryURL;                            /* active baseURL used for last request */
+  gchar *queryURL;                            /* active queryURL used for last request */
   guint max_bandwidth;                        /* max bandwidth allowed for this mimeType */
 
   GstAdaptationSetNode *cur_adapt_set;        /* active adaptation set */
@@ -454,8 +477,10 @@
   GstSegmentBaseType *cur_segment_base;       /* active segment base */
   GstSegmentListNode *cur_segment_list;       /* active segment list */
   GstSegmentTemplateNode *cur_seg_template;   /* active segment template */
-  guint segment_idx;                          /* index of next sequence chunk */
+  gint segment_index;                         /* index of next sequence chunk */
+  guint segment_repeat_index;                 /* index of the repeat count of a segment */
   GPtrArray *segments;                        /* array of GstMediaSegment */
+  GstClockTime presentationTimeOffset;        /* presentation time offset of the current segment */
 };
 
 struct _GstMpdClient
@@ -471,7 +496,9 @@
   gchar *mpd_uri;                             /* manifest file URI */
   gchar *mpd_base_uri;                        /* base URI for resolving relative URIs.
                                                * this will be different for redirects */
-  GMutex lock;
+
+  /* profiles */
+  gboolean profile_isoff_ondemand;
 };
 
 /* Basic initialization/deinitialization functions */
@@ -487,28 +514,29 @@
 gboolean gst_mpd_client_setup_media_presentation (GstMpdClient *client);
 gboolean gst_mpd_client_setup_streaming (GstMpdClient * client, GstAdaptationSetNode * adapt_set);
 gboolean gst_mpd_client_setup_representation (GstMpdClient *client, GstActiveStream *stream, GstRepresentationNode *representation);
-GList * gst_mpd_client_get_adaptation_sets (GstMpdClient * client);
 GstClockTime gst_mpd_client_get_next_fragment_duration (GstMpdClient * client, GstActiveStream * stream);
 GstClockTime gst_mpd_client_get_media_presentation_duration (GstMpdClient *client);
-gboolean gst_mpd_client_get_last_fragment_timestamp (GstMpdClient * client, guint stream_idx, GstClockTime * ts);
+gboolean gst_mpd_client_get_last_fragment_timestamp_end (GstMpdClient * client, guint stream_idx, GstClockTime * ts);
 gboolean gst_mpd_client_get_next_fragment_timestamp (GstMpdClient * client, guint stream_idx, GstClockTime * ts);
-gboolean gst_mpd_client_get_next_fragment (GstMpdClient *client, guint indexStream, GstMediaFragmentInfo * fragment, gboolean forward);
+gboolean gst_mpd_client_get_next_fragment (GstMpdClient *client, guint indexStream, GstMediaFragmentInfo * fragment);
 gboolean gst_mpd_client_get_next_header (GstMpdClient *client, gchar **uri, guint stream_idx, gint64 * range_start, gint64 * range_end);
 gboolean gst_mpd_client_get_next_header_index (GstMpdClient *client, gchar **uri, guint stream_idx, gint64 * range_start, gint64 * range_end);
 gboolean gst_mpd_client_is_live (GstMpdClient * client);
 gboolean gst_mpd_client_stream_seek (GstMpdClient * client, GstActiveStream * stream, GstClockTime ts);
 gboolean gst_mpd_client_seek_to_time (GstMpdClient * client, GDateTime * time);
-GstDateTime *gst_mpd_client_add_time_difference (GstDateTime * t1, gint64 usecs);
-gint gst_mpd_client_get_segment_index_at_time (GstMpdClient *client, GstActiveStream * stream, const GstDateTime *time);
 gint gst_mpd_client_check_time_position (GstMpdClient * client, GstActiveStream * stream, GstClockTime ts, gint64 * diff);
+GstClockTime gst_mpd_parser_get_stream_presentation_offset (GstMpdClient *client, guint stream_idx);
+gchar** gst_mpd_client_get_utc_timing_sources (GstMpdClient *client, guint methods, GstMPDUTCTimingType *selected_method);
+GstClockTime gst_mpd_parser_get_period_start_time (GstMpdClient *client);
 
 /* Period selection */
+guint gst_mpd_client_get_period_index_at_time (GstMpdClient * client, GstDateTime * time);
 gboolean gst_mpd_client_set_period_index (GstMpdClient *client, guint period_idx);
 gboolean gst_mpd_client_set_period_id (GstMpdClient *client, const gchar * period_id);
 guint gst_mpd_client_get_period_index (GstMpdClient *client);
 const gchar *gst_mpd_client_get_period_id (GstMpdClient *client);
 gboolean gst_mpd_client_has_next_period (GstMpdClient *client);
-GstDateTime *gst_mpd_client_get_next_segment_availability_end_time (GstMpdClient * client, GstActiveStream * stream);
+gboolean gst_mpd_client_has_previous_period (GstMpdClient * client);
 
 /* Representation selection */
 gint gst_mpdparser_get_rep_idx_with_max_bandwidth (GList *Representations, gint max_bandwidth);
@@ -524,11 +552,13 @@
 
 /* AdaptationSet */
 guint gst_mpdparser_get_nb_adaptationSet (GstMpdClient *client);
+GList * gst_mpd_client_get_adaptation_sets (GstMpdClient * client);
 
 /* Segment */
-void gst_mpd_client_set_segment_index_for_all_streams (GstMpdClient * client, guint segment_idx);
-guint gst_mpd_client_get_segment_index (GstActiveStream * stream);
-void gst_mpd_client_set_segment_index (GstActiveStream * stream, guint segment_idx);
+gboolean gst_mpd_client_has_next_segment (GstMpdClient * client, GstActiveStream * stream, gboolean forward);
+GstFlowReturn gst_mpd_client_advance_segment (GstMpdClient * client, GstActiveStream * stream, gboolean forward);
+void gst_mpd_client_seek_to_first_segment (GstMpdClient * client);
+GstDateTime *gst_mpd_client_get_next_segment_availability_end_time (GstMpdClient * client, GstActiveStream * stream);
 
 /* Get audio/video stream parameters (mimeType, width, height, rate, number of channels) */
 const gchar *gst_mpd_client_get_stream_mimeType (GstActiveStream * stream);
@@ -542,6 +572,10 @@
 guint gst_mpdparser_get_list_and_nb_of_audio_language (GstMpdClient *client, GList **lang);
 
 gint64 gst_mpd_client_calculate_time_difference (const GstDateTime * t1, const GstDateTime * t2);
+GstDateTime *gst_mpd_client_add_time_difference (GstDateTime * t1, gint64 usecs);
+
+/* profiles */
+gboolean gst_mpd_client_has_isoff_ondemand_profile (GstMpdClient *client);
 
 G_END_DECLS
 
diff --git a/ext/dash/gstplugin.c b/ext/dash/gstplugin.c
index 908a2e4..29f2817 100644
--- a/ext/dash/gstplugin.c
+++ b/ext/dash/gstplugin.c
@@ -8,98 +8,15 @@
 
 #include "gstdashdemux.h"
 
-#define XML_BUFFER_SIZE 16
-#define XML_INC_BUFFER {                                                \
-  pos++;                                                                \
-  if (pos == XML_BUFFER_SIZE) {                                         \
-    pos = 0;                                                            \
-    offset += XML_BUFFER_SIZE;                                          \
-    data = gst_type_find_peek (tf, offset, XML_BUFFER_SIZE);            \
-    if (data == NULL) return FALSE;                                     \
-  } else {                                                              \
-    data++;                                                             \
-  }                                                                     \
-}
-
 static gboolean
-xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
-    gboolean strict)
+dashdemux_init (GstPlugin * plugin)
 {
-  gboolean got_xmldec;
-  const guint8 *data;
-  guint offset = 0;
-  guint pos = 0;
-
-  data = gst_type_find_peek (tf, 0, XML_BUFFER_SIZE);
-  if (!data)
-    return FALSE;
-
-  /* look for the XMLDec
-   * see XML spec 2.8, Prolog and Document Type Declaration
-   * http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd */
-  got_xmldec = (memcmp (data, "<?xml", 5) == 0);
-
-  if (strict && !got_xmldec)
-    return FALSE;
-
-  /* skip XMLDec in any case if we've got one */
-  if (got_xmldec) {
-    pos += 5;
-    data += 5;
-  }
-
-  /* look for the first element, it has to be the requested element. Bail
-   * out if it is not within the first 4kB. */
-  while (data && (offset + pos) < 4096) {
-    while (*data != '<' && (offset + pos) < 4096) {
-      XML_INC_BUFFER;
-    }
-
-    XML_INC_BUFFER;
-    if (!g_ascii_isalpha (*data)) {
-      /* if not alphabetic, it's a PI or an element / attribute declaration
-       * like <?xxx or <!xxx */
-      XML_INC_BUFFER;
-      continue;
-    }
-
-    /* the first normal element, check if it's the one asked for */
-    data = gst_type_find_peek (tf, offset + pos, elen + 1);
-    return (data && element && strncmp ((char *) data, element, elen) == 0);
-  }
-
-  return FALSE;
-}
-
-/*** application/dash+xml typefind helper ***/
-
-static GstStaticCaps dash_caps = GST_STATIC_CAPS ("application/dash+xml");
-
-#define DASH_CAPS gst_static_caps_get (&dash_caps)
-
-static void
-dash_type_find (GstTypeFind * tf, gpointer unused)
-{
-  if (xml_check_first_element (tf, "MPD", 3, FALSE) ||
-      xml_check_first_element (tf, "mpd", 3, FALSE)) {
-    gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, DASH_CAPS);
-  }
-}
-
-static gboolean
-fragmented_init (GstPlugin * plugin)
-{
-  if (!gst_element_register (plugin, "dashdemux", GST_RANK_PRIMARY,
-          GST_TYPE_DASH_DEMUX) || FALSE)
-    return FALSE;
-  if (!gst_type_find_register (plugin, "application/dash+xml",
-          GST_RANK_SECONDARY, dash_type_find, NULL, DASH_CAPS, NULL, NULL))
-    return FALSE;
-  return TRUE;
+  return gst_element_register (plugin, "dashdemux", GST_RANK_PRIMARY,
+      GST_TYPE_DASH_DEMUX);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     dashdemux,
     "DASH demuxer plugin",
-    fragmented_init, VERSION, "LGPL", PACKAGE_NAME, "http://www.gstreamer.org/")
+    dashdemux_init, VERSION, "LGPL", PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/dc1394/Makefile.in b/ext/dc1394/Makefile.in
index e25c7a1..e72f593 100644
--- a/ext/dc1394/Makefile.in
+++ b/ext/dc1394/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/dc1394
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/dc1394/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/dc1394/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,6 +1094,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/dc1394/gstdc1394.c b/ext/dc1394/gstdc1394.c
index 3f28e1f..4a403b4 100644
--- a/ext/dc1394/gstdc1394.c
+++ b/ext/dc1394/gstdc1394.c
@@ -1254,7 +1254,7 @@
     src->camera = NULL;
   }
 
-  return FALSE;;
+  return FALSE;
 
 }
 
diff --git a/ext/directfb/Makefile.in b/ext/directfb/Makefile.in
index 1efb1e2..5de789f 100644
--- a/ext/directfb/Makefile.in
+++ b/ext/directfb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = dfb-example$(EXEEXT)
 subdir = ext/directfb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -237,6 +247,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -254,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -280,8 +293,6 @@
 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@
@@ -294,7 +305,6 @@
 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@
@@ -302,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -328,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -351,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -411,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -431,7 +448,6 @@
 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@
@@ -440,7 +456,6 @@
 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@
@@ -453,7 +468,6 @@
 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@
@@ -467,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -478,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -516,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -551,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -580,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -587,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -616,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -626,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -656,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -683,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -721,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -764,7 +799,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/directfb/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/directfb/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1101,6 +1135,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c
index 83ab7f9..22dd3d7 100644
--- a/ext/directfb/dfbvideosink.c
+++ b/ext/directfb/dfbvideosink.c
@@ -1349,8 +1349,10 @@
   dfbvideosink = GST_DFBVIDEOSINK (bsink);
 
   if (!dfbvideosink->setup) {
-    caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD
-            (dfbvideosink)));
+    GstCaps *tcaps =
+        gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (dfbvideosink));
+    caps = gst_caps_copy (tcaps);
+    gst_caps_unref (tcaps);
     GST_DEBUG_OBJECT (dfbvideosink, "getcaps called and we are not setup yet, "
         "returning template %" GST_PTR_FORMAT, caps);
     goto beach;
@@ -1816,7 +1818,7 @@
       src.h = dfbvideosink->video_height;
     }
     gst_caps_unref (caps);
-    res = surface->GetSize (surface, &dst.w, &dst.h);
+    surface->GetSize (surface, &dst.w, &dst.h);
 
     /* Center / Clip */
     gst_video_sink_center_rect (src, dst, &result, FALSE);
@@ -1908,15 +1910,15 @@
 
     gst_video_frame_unmap (&src_frame);
 
-    res = dest->Unlock (dest);
+    dest->Unlock (dest);
 
     dest->Release (dest);
 
     if (dfbvideosink->backbuffer) {
       if (dfbvideosink->vsync) {
-        res = surface->Flip (surface, NULL, DSFLIP_ONSYNC);
+        surface->Flip (surface, NULL, DSFLIP_ONSYNC);
       } else {
-        res = surface->Flip (surface, NULL, DSFLIP_NONE);
+        surface->Flip (surface, NULL, DSFLIP_NONE);
       }
     }
   } else {
diff --git a/ext/dtls/Makefile.am b/ext/dtls/Makefile.am
new file mode 100644
index 0000000..22e31b9
--- /dev/null
+++ b/ext/dtls/Makefile.am
@@ -0,0 +1,35 @@
+plugin_LTLIBRARIES = libgstdtls.la
+
+libgstdtls_la_SOURCES = \
+    plugin.c \
+    gstdtlsdec.c \
+    gstdtlsenc.c \
+    gstdtlssrtpdemux.c \
+    gstdtlssrtpbin.c \
+    gstdtlssrtpdec.c \
+    gstdtlssrtpenc.c \
+    gstdtlsagent.c \
+    gstdtlsconnection.c \
+    gstdtlscertificate.c
+
+libgstdtls_la_CFLAGS = \
+    $(GST_PLUGINS_BASE_CFLAGS) \
+    $(GST_BASE_CFLAGS) \
+    $(GST_CFLAGS) \
+    $(DTLS_CFLAGS)
+
+libgstdtls_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(DTLS_LIBS)
+libgstdtls_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstdtls_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = \
+    gstdtlsdec.h \
+    gstdtlsenc.h \
+    gstdtlssrtpdemux.h \
+    gstdtlssrtpbin.h \
+    gstdtlssrtpdec.h \
+    gstdtlssrtpenc.h \
+    gstdtlsagent.h \
+    gstdtlsconnection.h \
+    gstdtlscertificate.h
+
diff --git a/sys/qtwrapper/Makefile.in b/ext/dtls/Makefile.in
similarity index 69%
rename from sys/qtwrapper/Makefile.in
rename to ext/dtls/Makefile.in
index a8d369c..3fd5f56 100644
--- a/sys/qtwrapper/Makefile.in
+++ b/ext/dtls/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = sys/qtwrapper
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/dtls
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,23 +164,25 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstqtwrapper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstqtwrapper_la_OBJECTS = libgstqtwrapper_la-qtwrapper.lo \
-	libgstqtwrapper_la-qtutils.lo \
-	libgstqtwrapper_la-codecmapping.lo \
-	libgstqtwrapper_la-audiodecoders.lo \
-	libgstqtwrapper_la-videodecoders.lo \
-	libgstqtwrapper_la-imagedescription.lo
-libgstqtwrapper_la_OBJECTS = $(am_libgstqtwrapper_la_OBJECTS)
+libgstdtls_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstdtls_la_OBJECTS = libgstdtls_la-plugin.lo \
+	libgstdtls_la-gstdtlsdec.lo libgstdtls_la-gstdtlsenc.lo \
+	libgstdtls_la-gstdtlssrtpdemux.lo \
+	libgstdtls_la-gstdtlssrtpbin.lo \
+	libgstdtls_la-gstdtlssrtpdec.lo \
+	libgstdtls_la-gstdtlssrtpenc.lo libgstdtls_la-gstdtlsagent.lo \
+	libgstdtls_la-gstdtlsconnection.lo \
+	libgstdtls_la-gstdtlscertificate.lo
+libgstdtls_la_OBJECTS = $(am_libgstdtls_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 = 
-libgstqtwrapper_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) \
-	$(libgstqtwrapper_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstdtls_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstdtls_la_CFLAGS) $(CFLAGS) \
+	$(libgstdtls_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
@@ -205,8 +217,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstqtwrapper_la_SOURCES)
-DIST_SOURCES = $(libgstqtwrapper_la_SOURCES)
+SOURCES = $(libgstdtls_la_SOURCES)
+DIST_SOURCES = $(libgstdtls_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -232,6 +244,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +262,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +290,6 @@
 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@
@@ -289,7 +302,6 @@
 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@
@@ -297,6 +309,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +337,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +363,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +421,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +445,6 @@
 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@
@@ -435,7 +453,6 @@
 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@
@@ -448,7 +465,6 @@
 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@
@@ -462,6 +478,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +490,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +530,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +566,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +599,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +609,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +645,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +656,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +687,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +713,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +752,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -729,31 +766,38 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstqtwrapper.la
+plugin_LTLIBRARIES = libgstdtls.la
+libgstdtls_la_SOURCES = \
+    plugin.c \
+    gstdtlsdec.c \
+    gstdtlsenc.c \
+    gstdtlssrtpdemux.c \
+    gstdtlssrtpbin.c \
+    gstdtlssrtpdec.c \
+    gstdtlssrtpenc.c \
+    gstdtlsagent.c \
+    gstdtlsconnection.c \
+    gstdtlscertificate.c
 
-# sources used to compile this plug-in
-libgstqtwrapper_la_SOURCES = \
-	qtwrapper.c		\
-	qtutils.c		\
-	codecmapping.c		\
-	audiodecoders.c		\
-	videodecoders.c		\
-	imagedescription.c
+libgstdtls_la_CFLAGS = \
+    $(GST_PLUGINS_BASE_CFLAGS) \
+    $(GST_BASE_CFLAGS) \
+    $(GST_CFLAGS) \
+    $(DTLS_CFLAGS)
 
-
-# flags used to compile this plugin
-# add other _CFLAGS and _LIBS as needed
-libgstqtwrapper_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
-libgstqtwrapper_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
-libgstqtwrapper_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework,CoreAudio,-framework,AudioToolbox,-framework,Carbon,-framework,QuickTime,-framework,QuartzCore
-libgstqtwrapper_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-# headers we need but don't want installed
+libgstdtls_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(DTLS_LIBS)
+libgstdtls_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstdtls_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = \
-	codecmapping.h		\
-	qtwrapper.h		\
-	qtutils.h		\
-	imagedescription.h
+    gstdtlsdec.h \
+    gstdtlsenc.h \
+    gstdtlssrtpdemux.h \
+    gstdtlssrtpbin.h \
+    gstdtlssrtpdec.h \
+    gstdtlssrtpenc.h \
+    gstdtlsagent.h \
+    gstdtlsconnection.h \
+    gstdtlscertificate.h
 
 all: all-am
 
@@ -768,10 +812,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/qtwrapper/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/dtls/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sys/qtwrapper/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/dtls/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -825,8 +868,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstqtwrapper.la: $(libgstqtwrapper_la_OBJECTS) $(libgstqtwrapper_la_DEPENDENCIES) $(EXTRA_libgstqtwrapper_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstqtwrapper_la_LINK) -rpath $(plugindir) $(libgstqtwrapper_la_OBJECTS) $(libgstqtwrapper_la_LIBADD) $(LIBS)
+libgstdtls.la: $(libgstdtls_la_OBJECTS) $(libgstdtls_la_DEPENDENCIES) $(EXTRA_libgstdtls_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstdtls_la_LINK) -rpath $(plugindir) $(libgstdtls_la_OBJECTS) $(libgstdtls_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -834,12 +877,16 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-audiodecoders.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-codecmapping.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-imagedescription.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-qtutils.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-qtwrapper.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-videodecoders.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlsagent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlscertificate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlsconnection.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlsdec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlsenc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlssrtpbin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlssrtpdec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlssrtpdemux.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-gstdtlssrtpenc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdtls_la-plugin.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -865,47 +912,75 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstqtwrapper_la-qtwrapper.lo: qtwrapper.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-qtwrapper.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Tpo -c -o libgstqtwrapper_la-qtwrapper.lo `test -f 'qtwrapper.c' || echo '$(srcdir)/'`qtwrapper.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Tpo $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='qtwrapper.c' object='libgstqtwrapper_la-qtwrapper.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-plugin.lo: plugin.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-plugin.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-plugin.Tpo -c -o libgstdtls_la-plugin.lo `test -f 'plugin.c' || echo '$(srcdir)/'`plugin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-plugin.Tpo $(DEPDIR)/libgstdtls_la-plugin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='plugin.c' object='libgstdtls_la-plugin.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-qtwrapper.lo `test -f 'qtwrapper.c' || echo '$(srcdir)/'`qtwrapper.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-plugin.lo `test -f 'plugin.c' || echo '$(srcdir)/'`plugin.c
 
-libgstqtwrapper_la-qtutils.lo: qtutils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-qtutils.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-qtutils.Tpo -c -o libgstqtwrapper_la-qtutils.lo `test -f 'qtutils.c' || echo '$(srcdir)/'`qtutils.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-qtutils.Tpo $(DEPDIR)/libgstqtwrapper_la-qtutils.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='qtutils.c' object='libgstqtwrapper_la-qtutils.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-gstdtlsdec.lo: gstdtlsdec.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlsdec.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlsdec.Tpo -c -o libgstdtls_la-gstdtlsdec.lo `test -f 'gstdtlsdec.c' || echo '$(srcdir)/'`gstdtlsdec.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlsdec.Tpo $(DEPDIR)/libgstdtls_la-gstdtlsdec.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlsdec.c' object='libgstdtls_la-gstdtlsdec.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-qtutils.lo `test -f 'qtutils.c' || echo '$(srcdir)/'`qtutils.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlsdec.lo `test -f 'gstdtlsdec.c' || echo '$(srcdir)/'`gstdtlsdec.c
 
-libgstqtwrapper_la-codecmapping.lo: codecmapping.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-codecmapping.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-codecmapping.Tpo -c -o libgstqtwrapper_la-codecmapping.lo `test -f 'codecmapping.c' || echo '$(srcdir)/'`codecmapping.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-codecmapping.Tpo $(DEPDIR)/libgstqtwrapper_la-codecmapping.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='codecmapping.c' object='libgstqtwrapper_la-codecmapping.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-gstdtlsenc.lo: gstdtlsenc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlsenc.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlsenc.Tpo -c -o libgstdtls_la-gstdtlsenc.lo `test -f 'gstdtlsenc.c' || echo '$(srcdir)/'`gstdtlsenc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlsenc.Tpo $(DEPDIR)/libgstdtls_la-gstdtlsenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlsenc.c' object='libgstdtls_la-gstdtlsenc.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-codecmapping.lo `test -f 'codecmapping.c' || echo '$(srcdir)/'`codecmapping.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlsenc.lo `test -f 'gstdtlsenc.c' || echo '$(srcdir)/'`gstdtlsenc.c
 
-libgstqtwrapper_la-audiodecoders.lo: audiodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-audiodecoders.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Tpo -c -o libgstqtwrapper_la-audiodecoders.lo `test -f 'audiodecoders.c' || echo '$(srcdir)/'`audiodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Tpo $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='audiodecoders.c' object='libgstqtwrapper_la-audiodecoders.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-gstdtlssrtpdemux.lo: gstdtlssrtpdemux.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlssrtpdemux.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlssrtpdemux.Tpo -c -o libgstdtls_la-gstdtlssrtpdemux.lo `test -f 'gstdtlssrtpdemux.c' || echo '$(srcdir)/'`gstdtlssrtpdemux.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlssrtpdemux.Tpo $(DEPDIR)/libgstdtls_la-gstdtlssrtpdemux.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlssrtpdemux.c' object='libgstdtls_la-gstdtlssrtpdemux.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-audiodecoders.lo `test -f 'audiodecoders.c' || echo '$(srcdir)/'`audiodecoders.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlssrtpdemux.lo `test -f 'gstdtlssrtpdemux.c' || echo '$(srcdir)/'`gstdtlssrtpdemux.c
 
-libgstqtwrapper_la-videodecoders.lo: videodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-videodecoders.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-videodecoders.Tpo -c -o libgstqtwrapper_la-videodecoders.lo `test -f 'videodecoders.c' || echo '$(srcdir)/'`videodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-videodecoders.Tpo $(DEPDIR)/libgstqtwrapper_la-videodecoders.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='videodecoders.c' object='libgstqtwrapper_la-videodecoders.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-gstdtlssrtpbin.lo: gstdtlssrtpbin.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlssrtpbin.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlssrtpbin.Tpo -c -o libgstdtls_la-gstdtlssrtpbin.lo `test -f 'gstdtlssrtpbin.c' || echo '$(srcdir)/'`gstdtlssrtpbin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlssrtpbin.Tpo $(DEPDIR)/libgstdtls_la-gstdtlssrtpbin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlssrtpbin.c' object='libgstdtls_la-gstdtlssrtpbin.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-videodecoders.lo `test -f 'videodecoders.c' || echo '$(srcdir)/'`videodecoders.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlssrtpbin.lo `test -f 'gstdtlssrtpbin.c' || echo '$(srcdir)/'`gstdtlssrtpbin.c
 
-libgstqtwrapper_la-imagedescription.lo: imagedescription.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-imagedescription.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-imagedescription.Tpo -c -o libgstqtwrapper_la-imagedescription.lo `test -f 'imagedescription.c' || echo '$(srcdir)/'`imagedescription.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-imagedescription.Tpo $(DEPDIR)/libgstqtwrapper_la-imagedescription.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='imagedescription.c' object='libgstqtwrapper_la-imagedescription.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdtls_la-gstdtlssrtpdec.lo: gstdtlssrtpdec.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlssrtpdec.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlssrtpdec.Tpo -c -o libgstdtls_la-gstdtlssrtpdec.lo `test -f 'gstdtlssrtpdec.c' || echo '$(srcdir)/'`gstdtlssrtpdec.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlssrtpdec.Tpo $(DEPDIR)/libgstdtls_la-gstdtlssrtpdec.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlssrtpdec.c' object='libgstdtls_la-gstdtlssrtpdec.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-imagedescription.lo `test -f 'imagedescription.c' || echo '$(srcdir)/'`imagedescription.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlssrtpdec.lo `test -f 'gstdtlssrtpdec.c' || echo '$(srcdir)/'`gstdtlssrtpdec.c
+
+libgstdtls_la-gstdtlssrtpenc.lo: gstdtlssrtpenc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlssrtpenc.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlssrtpenc.Tpo -c -o libgstdtls_la-gstdtlssrtpenc.lo `test -f 'gstdtlssrtpenc.c' || echo '$(srcdir)/'`gstdtlssrtpenc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlssrtpenc.Tpo $(DEPDIR)/libgstdtls_la-gstdtlssrtpenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlssrtpenc.c' object='libgstdtls_la-gstdtlssrtpenc.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 $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlssrtpenc.lo `test -f 'gstdtlssrtpenc.c' || echo '$(srcdir)/'`gstdtlssrtpenc.c
+
+libgstdtls_la-gstdtlsagent.lo: gstdtlsagent.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlsagent.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlsagent.Tpo -c -o libgstdtls_la-gstdtlsagent.lo `test -f 'gstdtlsagent.c' || echo '$(srcdir)/'`gstdtlsagent.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlsagent.Tpo $(DEPDIR)/libgstdtls_la-gstdtlsagent.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlsagent.c' object='libgstdtls_la-gstdtlsagent.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 $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlsagent.lo `test -f 'gstdtlsagent.c' || echo '$(srcdir)/'`gstdtlsagent.c
+
+libgstdtls_la-gstdtlsconnection.lo: gstdtlsconnection.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlsconnection.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlsconnection.Tpo -c -o libgstdtls_la-gstdtlsconnection.lo `test -f 'gstdtlsconnection.c' || echo '$(srcdir)/'`gstdtlsconnection.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlsconnection.Tpo $(DEPDIR)/libgstdtls_la-gstdtlsconnection.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlsconnection.c' object='libgstdtls_la-gstdtlsconnection.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 $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlsconnection.lo `test -f 'gstdtlsconnection.c' || echo '$(srcdir)/'`gstdtlsconnection.c
+
+libgstdtls_la-gstdtlscertificate.lo: gstdtlscertificate.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -MT libgstdtls_la-gstdtlscertificate.lo -MD -MP -MF $(DEPDIR)/libgstdtls_la-gstdtlscertificate.Tpo -c -o libgstdtls_la-gstdtlscertificate.lo `test -f 'gstdtlscertificate.c' || echo '$(srcdir)/'`gstdtlscertificate.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdtls_la-gstdtlscertificate.Tpo $(DEPDIR)/libgstdtls_la-gstdtlscertificate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdtlscertificate.c' object='libgstdtls_la-gstdtlscertificate.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 $(libgstdtls_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdtls_la_CFLAGS) $(CFLAGS) -c -o libgstdtls_la-gstdtlscertificate.lo `test -f 'gstdtlscertificate.c' || echo '$(srcdir)/'`gstdtlscertificate.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1120,6 +1195,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/dtls/gstdtlsagent.c b/ext/dtls/gstdtlsagent.c
new file mode 100644
index 0000000..af5b75c
--- /dev/null
+++ b/ext/dtls/gstdtlsagent.c
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstdtlsagent.h"
+
+#ifdef __APPLE__
+# define __AVAILABILITYMACROS__
+# define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_agent_debug);
+#define GST_CAT_DEFAULT gst_dtls_agent_debug
+
+G_DEFINE_TYPE (GstDtlsAgent, gst_dtls_agent, G_TYPE_OBJECT);
+
+#define GST_DTLS_AGENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GST_TYPE_DTLS_AGENT, GstDtlsAgentPrivate))
+
+enum
+{
+  PROP_0,
+  PROP_CERTIFICATE,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+struct _GstDtlsAgentPrivate
+{
+  SSL_CTX *ssl_context;
+
+  GstDtlsCertificate *certificate;
+};
+
+static void gst_dtls_agent_finalize (GObject * gobject);
+static void gst_dtls_agent_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+const gchar *gst_dtls_agent_peek_id (GstDtlsAgent *);
+
+static GRWLock *ssl_locks;
+
+static void
+ssl_locking_function (gint mode, gint lock_num, const gchar * file, gint line)
+{
+  gboolean locking;
+  gboolean reading;
+  GRWLock *lock;
+
+  locking = mode & CRYPTO_LOCK;
+  reading = mode & CRYPTO_READ;
+  lock = &ssl_locks[lock_num];
+
+  GST_LOG_OBJECT (NULL, "%s SSL lock for %s, thread=%p location=%s:%d",
+      locking ? "locking" : "unlocking", reading ? "reading" : "writing",
+      g_thread_self (), file, line);
+
+  if (locking) {
+    if (reading) {
+      g_rw_lock_reader_lock (lock);
+    } else {
+      g_rw_lock_writer_lock (lock);
+    }
+  } else {
+    if (reading) {
+      g_rw_lock_reader_unlock (lock);
+    } else {
+      g_rw_lock_writer_unlock (lock);
+    }
+  }
+}
+
+static gulong
+ssl_thread_id_function (void)
+{
+  return (gulong) g_thread_self ();
+}
+
+void
+_gst_dtls_init_openssl (void)
+{
+  static gsize is_init = 0;
+  gint i;
+  gint num_locks;
+
+  if (g_once_init_enter (&is_init)) {
+    GST_DEBUG_CATEGORY_INIT (gst_dtls_agent_debug, "dtlsagent", 0,
+        "DTLS Agent");
+
+    if (OPENSSL_VERSION_NUMBER < 0x1000100fL) {
+      GST_WARNING_OBJECT (NULL,
+          "Incorrect OpenSSL version, should be >= 1.0.1, is %s",
+          OPENSSL_VERSION_TEXT);
+      g_assert_not_reached ();
+    }
+
+    GST_INFO_OBJECT (NULL, "initializing openssl %lx", OPENSSL_VERSION_NUMBER);
+    SSL_library_init ();
+    SSL_load_error_strings ();
+    ERR_load_BIO_strings ();
+
+    num_locks = CRYPTO_num_locks ();
+    ssl_locks = g_new (GRWLock, num_locks);
+    for (i = 0; i < num_locks; ++i) {
+      g_rw_lock_init (&ssl_locks[i]);
+    }
+    CRYPTO_set_locking_callback (ssl_locking_function);
+    CRYPTO_set_id_callback (ssl_thread_id_function);
+
+    g_once_init_leave (&is_init, 1);
+  }
+}
+
+static void
+gst_dtls_agent_class_init (GstDtlsAgentClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (GstDtlsAgentPrivate));
+
+  gobject_class->set_property = gst_dtls_agent_set_property;
+  gobject_class->finalize = gst_dtls_agent_finalize;
+
+  properties[PROP_CERTIFICATE] =
+      g_param_spec_object ("certificate",
+      "GstDtlsCertificate",
+      "Sets the certificate of the agent",
+      GST_TYPE_DTLS_CERTIFICATE,
+      G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  _gst_dtls_init_openssl ();
+}
+
+static void
+gst_dtls_agent_init (GstDtlsAgent * self)
+{
+  GstDtlsAgentPrivate *priv = GST_DTLS_AGENT_GET_PRIVATE (self);
+  self->priv = priv;
+
+  ERR_clear_error ();
+
+  priv->ssl_context = SSL_CTX_new (DTLSv1_method ());
+  if (ERR_peek_error () || !priv->ssl_context) {
+    char buf[512];
+
+    priv->ssl_context = NULL;
+
+    GST_WARNING_OBJECT (self, "Error creating SSL Context: %s",
+        ERR_error_string (ERR_get_error (), buf));
+
+    g_return_if_reached ();
+  }
+
+  SSL_CTX_set_verify_depth (priv->ssl_context, 2);
+  SSL_CTX_set_tlsext_use_srtp (priv->ssl_context, "SRTP_AES128_CM_SHA1_80");
+  SSL_CTX_set_cipher_list (priv->ssl_context,
+      "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
+  SSL_CTX_set_read_ahead (priv->ssl_context, 1);
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
+  SSL_CTX_set_ecdh_auto (priv->ssl_context, 1);
+#endif
+}
+
+static void
+gst_dtls_agent_finalize (GObject * gobject)
+{
+  GstDtlsAgentPrivate *priv = GST_DTLS_AGENT (gobject)->priv;
+
+  SSL_CTX_free (priv->ssl_context);
+  priv->ssl_context = NULL;
+
+  GST_DEBUG_OBJECT (gobject, "finalized");
+
+  G_OBJECT_CLASS (gst_dtls_agent_parent_class)->finalize (gobject);
+}
+
+static void
+gst_dtls_agent_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsAgent *self = GST_DTLS_AGENT (object);
+  GstDtlsCertificate *certificate;
+
+  switch (prop_id) {
+    case PROP_CERTIFICATE:
+      certificate = GST_DTLS_CERTIFICATE (g_value_get_object (value));
+      g_return_if_fail (GST_IS_DTLS_CERTIFICATE (certificate));
+      g_return_if_fail (self->priv->ssl_context);
+
+      self->priv->certificate = certificate;
+      g_object_ref (certificate);
+
+      if (!SSL_CTX_use_certificate (self->priv->ssl_context,
+              _gst_dtls_certificate_get_internal_certificate (certificate))) {
+        GST_WARNING_OBJECT (self, "could not use certificate");
+        g_return_if_reached ();
+      }
+
+      if (!SSL_CTX_use_PrivateKey (self->priv->ssl_context,
+              _gst_dtls_certificate_get_internal_key (certificate))) {
+        GST_WARNING_OBJECT (self, "could not use private key");
+        g_return_if_reached ();
+      }
+
+      if (!SSL_CTX_check_private_key (self->priv->ssl_context)) {
+        GST_WARNING_OBJECT (self, "invalid private key");
+        g_return_if_reached ();
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+GstDtlsCertificate *
+gst_dtls_agent_get_certificate (GstDtlsAgent * self)
+{
+  g_return_val_if_fail (GST_IS_DTLS_AGENT (self), NULL);
+  if (self->priv->certificate) {
+    g_object_ref (self->priv->certificate);
+  }
+  return self->priv->certificate;
+}
+
+gchar *
+gst_dtls_agent_get_certificate_pem (GstDtlsAgent * self)
+{
+  gchar *pem;
+  g_return_val_if_fail (GST_IS_DTLS_AGENT (self), NULL);
+  g_return_val_if_fail (GST_IS_DTLS_CERTIFICATE (self->priv->certificate),
+      NULL);
+
+  g_object_get (self->priv->certificate, "pem", &pem, NULL);
+
+  return pem;
+}
+
+const GstDtlsAgentContext
+_gst_dtls_agent_peek_context (GstDtlsAgent * self)
+{
+  g_return_val_if_fail (GST_IS_DTLS_AGENT (self), NULL);
+  return self->priv->ssl_context;
+}
diff --git a/ext/dtls/gstdtlsagent.h b/ext/dtls/gstdtlsagent.h
new file mode 100644
index 0000000..fbfa1e8
--- /dev/null
+++ b/ext/dtls/gstdtlsagent.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlsagent_h
+#define gstdtlsagent_h
+
+#include "gstdtlscertificate.h"
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_AGENT            (gst_dtls_agent_get_type())
+#define GST_DTLS_AGENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_AGENT, GstDtlsAgent))
+#define GST_DTLS_AGENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_AGENT, GstDtlsAgentClass))
+#define GST_IS_DTLS_AGENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_AGENT))
+#define GST_IS_DTLS_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_AGENT))
+#define GST_DTLS_AGENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_DTLS_AGENT, GstDtlsAgentClass))
+
+typedef gpointer GstDtlsAgentContext;
+
+typedef struct _GstDtlsAgent        GstDtlsAgent;
+typedef struct _GstDtlsAgentClass   GstDtlsAgentClass;
+typedef struct _GstDtlsAgentPrivate GstDtlsAgentPrivate;
+
+/*
+ * GstDtlsAgent:
+ *
+ * A context for creating GstDtlsConnections with a GstDtlsCertificate.
+ * GstDtlsAgent needs to be constructed with the "certificate" property set.
+ */
+struct _GstDtlsAgent {
+    GObject parent_instance;
+
+    GstDtlsAgentPrivate *priv;
+};
+
+struct _GstDtlsAgentClass {
+    GObjectClass parent_class;
+};
+
+GType gst_dtls_agent_get_type(void) G_GNUC_CONST;
+
+/*
+ * Returns the certificate used by the agent.
+ */
+GstDtlsCertificate *gst_dtls_agent_get_certificate(GstDtlsAgent *);
+
+/*
+ * Returns the certificate used by the agent, in PEM format.
+ */
+gchar *gst_dtls_agent_get_certificate_pem(GstDtlsAgent *self);
+
+/* internal */
+void _gst_dtls_init_openssl(void);
+const GstDtlsAgentContext _gst_dtls_agent_peek_context(GstDtlsAgent *);
+
+G_END_DECLS
+
+#endif /* gstdtlsagent_h */
diff --git a/ext/dtls/gstdtlscertificate.c b/ext/dtls/gstdtlscertificate.c
new file mode 100644
index 0000000..e37494f
--- /dev/null
+++ b/ext/dtls/gstdtlscertificate.c
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstdtlscertificate.h"
+
+#include "gstdtlsagent.h"
+
+#ifdef __APPLE__
+# define __AVAILABILITYMACROS__
+# define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+#include <openssl/ssl.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
+#define GST_CAT_DEFAULT gst_dtls_certificate_debug
+
+G_DEFINE_TYPE_WITH_CODE (GstDtlsCertificate, gst_dtls_certificate,
+    G_TYPE_OBJECT, GST_DEBUG_CATEGORY_INIT (gst_dtls_certificate_debug,
+        "dtlscertificate", 0, "DTLS Certificate"));
+
+#define GST_DTLS_CERTIFICATE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GST_TYPE_DTLS_CERTIFICATE, GstDtlsCertificatePrivate))
+
+enum
+{
+  PROP_0,
+  PROP_PEM,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_PEM NULL
+
+struct _GstDtlsCertificatePrivate
+{
+  X509 *x509;
+  EVP_PKEY *private_key;
+
+  gchar *pem;
+};
+
+static void gst_dtls_certificate_finalize (GObject * gobject);
+static void gst_dtls_certificate_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_certificate_get_property (GObject *, guint prop_id,
+    GValue *, GParamSpec *);
+
+static void init_generated (GstDtlsCertificate *);
+static void init_from_pem_string (GstDtlsCertificate *, const gchar * pem);
+
+static void
+gst_dtls_certificate_class_init (GstDtlsCertificateClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (GstDtlsCertificatePrivate));
+
+  gobject_class->set_property = gst_dtls_certificate_set_property;
+  gobject_class->get_property = gst_dtls_certificate_get_property;
+
+  properties[PROP_PEM] =
+      g_param_spec_string ("pem",
+      "Pem string",
+      "A string containing a X509 certificate and RSA private key in PEM format",
+      DEFAULT_PEM,
+      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  _gst_dtls_init_openssl ();
+
+  gobject_class->finalize = gst_dtls_certificate_finalize;
+}
+
+static void
+gst_dtls_certificate_init (GstDtlsCertificate * self)
+{
+  GstDtlsCertificatePrivate *priv = GST_DTLS_CERTIFICATE_GET_PRIVATE (self);
+  self->priv = priv;
+
+  priv->x509 = NULL;
+  priv->private_key = NULL;
+  priv->pem = NULL;
+}
+
+static void
+gst_dtls_certificate_finalize (GObject * gobject)
+{
+  GstDtlsCertificatePrivate *priv = GST_DTLS_CERTIFICATE (gobject)->priv;
+
+  X509_free (priv->x509);
+  priv->x509 = NULL;
+
+  EVP_PKEY_free (priv->private_key);
+  priv->private_key = NULL;
+
+
+  g_free (priv->pem);
+  priv->pem = NULL;
+
+  G_OBJECT_CLASS (gst_dtls_certificate_parent_class)->finalize (gobject);
+}
+
+static void
+gst_dtls_certificate_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsCertificate *self = GST_DTLS_CERTIFICATE (object);
+  const gchar *pem;
+
+  switch (prop_id) {
+    case PROP_PEM:
+      pem = g_value_get_string (value);
+      if (pem) {
+        init_from_pem_string (self, pem);
+      } else {
+        init_generated (self);
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_certificate_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstDtlsCertificate *self = GST_DTLS_CERTIFICATE (object);
+
+  switch (prop_id) {
+    case PROP_PEM:
+      g_return_if_fail (self->priv->pem);
+      g_value_set_string (value, self->priv->pem);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+init_generated (GstDtlsCertificate * self)
+{
+  GstDtlsCertificatePrivate *priv = self->priv;
+  RSA *rsa;
+  X509_NAME *name = NULL;
+
+  g_return_if_fail (!priv->x509);
+  g_return_if_fail (!priv->private_key);
+
+  priv->private_key = EVP_PKEY_new ();
+
+  if (!priv->private_key) {
+    GST_WARNING_OBJECT (self, "failed to create private key");
+    return;
+  }
+
+  priv->x509 = X509_new ();
+
+  if (!priv->x509) {
+    GST_WARNING_OBJECT (self, "failed to create certificate");
+    EVP_PKEY_free (priv->private_key);
+    priv->private_key = NULL;
+    return;
+  }
+  rsa = RSA_generate_key (2048, RSA_F4, NULL, NULL);
+
+  if (!rsa) {
+    GST_WARNING_OBJECT (self, "failed to generate RSA");
+    EVP_PKEY_free (priv->private_key);
+    priv->private_key = NULL;
+    X509_free (priv->x509);
+    priv->x509 = NULL;
+    return;
+  }
+
+  if (!EVP_PKEY_assign_RSA (priv->private_key, rsa)) {
+    GST_WARNING_OBJECT (self, "failed to assign RSA");
+    RSA_free (rsa);
+    rsa = NULL;
+    EVP_PKEY_free (priv->private_key);
+    priv->private_key = NULL;
+    X509_free (priv->x509);
+    priv->x509 = NULL;
+    return;
+  }
+  rsa = NULL;
+
+  X509_set_version (priv->x509, 2);
+  ASN1_INTEGER_set (X509_get_serialNumber (priv->x509), 0);
+  X509_gmtime_adj (X509_get_notBefore (priv->x509), 0);
+  X509_gmtime_adj (X509_get_notAfter (priv->x509), 31536000L);  /* A year */
+  X509_set_pubkey (priv->x509, priv->private_key);
+
+  name = X509_get_subject_name (priv->x509);
+  X509_NAME_add_entry_by_txt (name, "C", MBSTRING_ASC, (unsigned char *) "SE",
+      -1, -1, 0);
+  X509_NAME_add_entry_by_txt (name, "CN", MBSTRING_ASC,
+      (unsigned char *) "OpenWebRTC", -1, -1, 0);
+  X509_set_issuer_name (priv->x509, name);
+  name = NULL;
+
+  if (!X509_sign (priv->x509, priv->private_key, EVP_sha256 ())) {
+    GST_WARNING_OBJECT (self, "failed to sign certificate");
+    EVP_PKEY_free (priv->private_key);
+    priv->private_key = NULL;
+    X509_free (priv->x509);
+    priv->x509 = NULL;
+    return;
+  }
+
+  self->priv->pem = _gst_dtls_x509_to_pem (priv->x509);
+}
+
+static void
+init_from_pem_string (GstDtlsCertificate * self, const gchar * pem)
+{
+  GstDtlsCertificatePrivate *priv = self->priv;
+  BIO *bio;
+
+  g_return_if_fail (pem);
+  g_return_if_fail (!priv->x509);
+  g_return_if_fail (!priv->private_key);
+
+  bio = BIO_new_mem_buf ((gpointer) pem, -1);
+  g_return_if_fail (bio);
+
+  priv->x509 = PEM_read_bio_X509 (bio, NULL, NULL, NULL);
+
+  if (!priv->x509) {
+    GST_WARNING_OBJECT (self, "failed to read certificate from pem string");
+    return;
+  }
+
+  (void) BIO_reset (bio);
+
+  priv->private_key = PEM_read_bio_PrivateKey (bio, NULL, NULL, NULL);
+
+  BIO_free (bio);
+  bio = NULL;
+
+  if (!priv->private_key) {
+    GST_WARNING_OBJECT (self, "failed to read private key from pem string");
+    X509_free (priv->x509);
+    priv->x509 = NULL;
+    return;
+  }
+
+  self->priv->pem = g_strdup (pem);
+}
+
+gchar *
+_gst_dtls_x509_to_pem (gpointer x509)
+{
+#define GST_DTLS_BIO_BUFFER_SIZE 4096
+  BIO *bio;
+  gchar buffer[GST_DTLS_BIO_BUFFER_SIZE] = { 0 };
+  gint len;
+  gchar *pem = NULL;
+
+  bio = BIO_new (BIO_s_mem ());
+  g_return_val_if_fail (bio, NULL);
+
+  if (!PEM_write_bio_X509 (bio, (X509 *) x509)) {
+    g_warn_if_reached ();
+    goto beach;
+  }
+
+  len = BIO_read (bio, buffer, GST_DTLS_BIO_BUFFER_SIZE);
+  if (!len) {
+    g_warn_if_reached ();
+    goto beach;
+  }
+
+  pem = g_strndup (buffer, len);
+
+beach:
+  BIO_free (bio);
+
+  return pem;
+}
+
+GstDtlsCertificateInternalCertificate
+_gst_dtls_certificate_get_internal_certificate (GstDtlsCertificate * self)
+{
+  g_return_val_if_fail (GST_IS_DTLS_CERTIFICATE (self), NULL);
+  return self->priv->x509;
+}
+
+GstDtlsCertificateInternalKey
+_gst_dtls_certificate_get_internal_key (GstDtlsCertificate * self)
+{
+  g_return_val_if_fail (GST_IS_DTLS_CERTIFICATE (self), NULL);
+  return self->priv->private_key;
+}
diff --git a/ext/dtls/gstdtlscertificate.h b/ext/dtls/gstdtlscertificate.h
new file mode 100644
index 0000000..ae083fe
--- /dev/null
+++ b/ext/dtls/gstdtlscertificate.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlscertificate_h
+#define gstdtlscertificate_h
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_CERTIFICATE            (gst_dtls_certificate_get_type())
+#define GST_DTLS_CERTIFICATE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_CERTIFICATE, GstDtlsCertificate))
+#define GST_DTLS_CERTIFICATE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_CERTIFICATE, GstDtlsCertificateClass))
+#define GST_IS_DTLS_CERTIFICATE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_CERTIFICATE))
+#define GST_IS_DTLS_CERTIFICATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_CERTIFICATE))
+#define GST_DTLS_CERTIFICATE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_DTLS_CERTIFICATE, GstDtlsCertificateClass))
+
+typedef gpointer GstDtlsCertificateInternalCertificate;
+typedef gpointer GstDtlsCertificateInternalKey;
+
+typedef struct _GstDtlsCertificate        GstDtlsCertificate;
+typedef struct _GstDtlsCertificateClass   GstDtlsCertificateClass;
+typedef struct _GstDtlsCertificatePrivate GstDtlsCertificatePrivate;
+
+/*
+ * GstDtlsCertificate:
+ *
+ * Handles a X509 certificate and a private key.
+ * If a certificate is created without the "pem" property, a self-signed certificate is generated.
+ */
+struct _GstDtlsCertificate {
+    GObject parent_instance;
+
+    GstDtlsCertificatePrivate *priv;
+};
+
+struct _GstDtlsCertificateClass {
+    GObjectClass parent_class;
+};
+
+GType gst_dtls_certificate_get_type(void) G_GNUC_CONST;
+
+/* internal */
+GstDtlsCertificateInternalCertificate _gst_dtls_certificate_get_internal_certificate(GstDtlsCertificate *);
+GstDtlsCertificateInternalKey _gst_dtls_certificate_get_internal_key(GstDtlsCertificate *);
+gchar *_gst_dtls_x509_to_pem(gpointer x509);
+
+G_END_DECLS
+
+#endif /* gstdtlscertificate_h */
diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c
new file mode 100644
index 0000000..36f6d63
--- /dev/null
+++ b/ext/dtls/gstdtlsconnection.c
@@ -0,0 +1,935 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstdtlsconnection.h"
+
+#include "gstdtlsagent.h"
+#include "gstdtlscertificate.h"
+
+#ifdef __APPLE__
+# define __AVAILABILITYMACROS__
+# define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_connection_debug);
+#define GST_CAT_DEFAULT gst_dtls_connection_debug
+G_DEFINE_TYPE_WITH_CODE (GstDtlsConnection, gst_dtls_connection, G_TYPE_OBJECT,
+    GST_DEBUG_CATEGORY_INIT (gst_dtls_connection_debug, "dtlsconnection", 0,
+        "DTLS Connection"));
+
+#define GST_DTLS_CONNECTION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GST_TYPE_DTLS_CONNECTION, GstDtlsConnectionPrivate))
+
+#define SRTP_KEY_LEN 16
+#define SRTP_SALT_LEN 14
+
+enum
+{
+  SIGNAL_ON_ENCODER_KEY,
+  SIGNAL_ON_DECODER_KEY,
+  SIGNAL_ON_PEER_CERTIFICATE,
+  NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS];
+
+enum
+{
+  PROP_0,
+  PROP_AGENT,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+static int connection_ex_index;
+
+static GstClock *system_clock;
+static void handle_timeout (gpointer data, gpointer user_data);
+
+struct _GstDtlsConnectionPrivate
+{
+  SSL *ssl;
+  BIO *bio;
+
+  gboolean is_client;
+  gboolean is_alive;
+  gboolean keys_exported;
+
+  GMutex mutex;
+  GCond condition;
+  gpointer bio_buffer;
+  gint bio_buffer_len;
+  gint bio_buffer_offset;
+
+  GClosure *send_closure;
+
+  gboolean timeout_pending;
+  GThreadPool *thread_pool;
+};
+
+static void gst_dtls_connection_finalize (GObject * gobject);
+static void gst_dtls_connection_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+
+static void log_state (GstDtlsConnection *, const gchar * str);
+static void export_srtp_keys (GstDtlsConnection *);
+static void openssl_poll (GstDtlsConnection *);
+static int openssl_verify_callback (int preverify_ok,
+    X509_STORE_CTX * x509_ctx);
+
+static BIO_METHOD *BIO_s_gst_dtls_connection (void);
+static int bio_method_write (BIO *, const char *data, int size);
+static int bio_method_read (BIO *, char *out_buffer, int size);
+static long bio_method_ctrl (BIO *, int cmd, long arg1, void *arg2);
+static int bio_method_new (BIO *);
+static int bio_method_free (BIO *);
+
+static void
+gst_dtls_connection_class_init (GstDtlsConnectionClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (GstDtlsConnectionPrivate));
+
+  gobject_class->set_property = gst_dtls_connection_set_property;
+
+  connection_ex_index =
+      SSL_get_ex_new_index (0, (gpointer) "gstdtlsagent connection index", NULL,
+      NULL, NULL);
+
+  signals[SIGNAL_ON_DECODER_KEY] =
+      g_signal_new ("on-decoder-key", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_NONE, 3,
+      G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
+
+  signals[SIGNAL_ON_ENCODER_KEY] =
+      g_signal_new ("on-encoder-key", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_NONE, 3,
+      G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
+
+  signals[SIGNAL_ON_PEER_CERTIFICATE] =
+      g_signal_new ("on-peer-certificate", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
+
+  properties[PROP_AGENT] =
+      g_param_spec_object ("agent",
+      "DTLS Agent",
+      "Agent to use in creation of the connection",
+      GST_TYPE_DTLS_AGENT,
+      G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  _gst_dtls_init_openssl ();
+
+  gobject_class->finalize = gst_dtls_connection_finalize;
+
+  system_clock = gst_system_clock_obtain ();
+}
+
+static void
+gst_dtls_connection_init (GstDtlsConnection * self)
+{
+  GstDtlsConnectionPrivate *priv = GST_DTLS_CONNECTION_GET_PRIVATE (self);
+  self->priv = priv;
+
+  priv->ssl = NULL;
+  priv->bio = NULL;
+
+  priv->send_closure = NULL;
+
+  priv->is_client = FALSE;
+  priv->is_alive = TRUE;
+  priv->keys_exported = FALSE;
+
+  priv->bio_buffer = NULL;
+  priv->bio_buffer_len = 0;
+  priv->bio_buffer_offset = 0;
+
+  g_mutex_init (&priv->mutex);
+  g_cond_init (&priv->condition);
+
+  /* Thread pool for handling timeouts, we only need one thread for that
+   * really and share threads with all other thread pools around there as
+   * this is not going to happen very often */
+  priv->thread_pool = g_thread_pool_new (handle_timeout, self, 1, FALSE, NULL);
+  g_assert (priv->thread_pool);
+  priv->timeout_pending = FALSE;
+}
+
+static void
+gst_dtls_connection_finalize (GObject * gobject)
+{
+  GstDtlsConnection *self = GST_DTLS_CONNECTION (gobject);
+  GstDtlsConnectionPrivate *priv = self->priv;
+
+  g_thread_pool_free (priv->thread_pool, TRUE, TRUE);
+  priv->thread_pool = NULL;
+
+  SSL_free (priv->ssl);
+  priv->ssl = NULL;
+
+  if (priv->send_closure) {
+    g_closure_unref (priv->send_closure);
+    priv->send_closure = NULL;
+  }
+
+  g_mutex_clear (&priv->mutex);
+  g_cond_clear (&priv->condition);
+
+  GST_DEBUG_OBJECT (self, "finalized");
+
+  G_OBJECT_CLASS (gst_dtls_connection_parent_class)->finalize (gobject);
+}
+
+static void
+gst_dtls_connection_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsConnection *self = GST_DTLS_CONNECTION (object);
+  GstDtlsAgent *agent;
+  GstDtlsConnectionPrivate *priv = self->priv;
+  SSL_CTX *ssl_context;
+
+  switch (prop_id) {
+    case PROP_AGENT:
+      g_return_if_fail (!priv->ssl);
+      agent = GST_DTLS_AGENT (g_value_get_object (value));
+      g_return_if_fail (GST_IS_DTLS_AGENT (agent));
+
+      ssl_context = _gst_dtls_agent_peek_context (agent);
+
+      priv->ssl = SSL_new (ssl_context);
+      g_return_if_fail (priv->ssl);
+
+      priv->bio = BIO_new (BIO_s_gst_dtls_connection ());
+      g_return_if_fail (priv->bio);
+
+      priv->bio->ptr = self;
+      SSL_set_bio (priv->ssl, priv->bio, priv->bio);
+
+      SSL_set_verify (priv->ssl,
+          SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
+          openssl_verify_callback);
+      SSL_set_ex_data (priv->ssl, connection_ex_index, self);
+
+      log_state (self, "connection created");
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+void
+gst_dtls_connection_start (GstDtlsConnection * self, gboolean is_client)
+{
+  GstDtlsConnectionPrivate *priv;
+
+  priv = self->priv;
+
+  g_return_if_fail (priv->send_closure);
+  g_return_if_fail (priv->ssl);
+  g_return_if_fail (priv->bio);
+
+  GST_TRACE_OBJECT (self, "locking @ start");
+  g_mutex_lock (&priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ start");
+
+  priv->is_alive = TRUE;
+  priv->bio_buffer = NULL;
+  priv->bio_buffer_len = 0;
+  priv->bio_buffer_offset = 0;
+  priv->keys_exported = FALSE;
+
+  priv->is_client = is_client;
+  if (priv->is_client) {
+    SSL_set_connect_state (priv->ssl);
+  } else {
+    SSL_set_accept_state (priv->ssl);
+  }
+  log_state (self, "initial state set");
+
+  openssl_poll (self);
+
+  log_state (self, "first poll done");
+
+  GST_TRACE_OBJECT (self, "unlocking @ start");
+  g_mutex_unlock (&priv->mutex);
+}
+
+static void
+handle_timeout (gpointer data, gpointer user_data)
+{
+  GstDtlsConnection *self = user_data;
+  GstDtlsConnectionPrivate *priv;
+  gint ret;
+
+  priv = self->priv;
+
+  g_mutex_lock (&priv->mutex);
+  priv->timeout_pending = FALSE;
+  if (priv->is_alive) {
+    ret = DTLSv1_handle_timeout (priv->ssl);
+
+    GST_DEBUG_OBJECT (self, "handle timeout returned %d, is_alive: %d", ret,
+        priv->is_alive);
+
+    if (ret < 0) {
+      GST_WARNING_OBJECT (self, "handling timeout failed");
+    } else if (ret > 0) {
+      log_state (self, "handling timeout before poll");
+      openssl_poll (self);
+      log_state (self, "handling timeout after poll");
+    }
+  }
+  g_mutex_unlock (&priv->mutex);
+}
+
+static gboolean
+schedule_timeout_handling (GstClock * clock, GstClockTime time, GstClockID id,
+    gpointer user_data)
+{
+  GstDtlsConnection *self = user_data;
+
+  g_mutex_lock (&self->priv->mutex);
+  if (self->priv->is_alive && !self->priv->timeout_pending) {
+    self->priv->timeout_pending = TRUE;
+
+    GST_TRACE_OBJECT (self, "Schedule timeout now");
+    g_thread_pool_push (self->priv->thread_pool, GINT_TO_POINTER (0xc0ffee),
+        NULL);
+  }
+  g_mutex_unlock (&self->priv->mutex);
+
+  return TRUE;
+}
+
+static void
+gst_dtls_connection_check_timeout_locked (GstDtlsConnection * self)
+{
+  GstDtlsConnectionPrivate *priv;
+  struct timeval timeout;
+  gint64 end_time, wait_time;
+
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
+
+  priv = self->priv;
+
+  if (DTLSv1_get_timeout (priv->ssl, &timeout)) {
+    wait_time = timeout.tv_sec * G_USEC_PER_SEC + timeout.tv_usec;
+
+    GST_DEBUG_OBJECT (self, "waiting for %" G_GINT64_FORMAT " usec", wait_time);
+    if (wait_time) {
+      GstClockID clock_id;
+#ifndef G_DISABLE_ASSERT
+      GstClockReturn clock_return;
+#endif
+
+      end_time = gst_clock_get_time (system_clock) + wait_time * GST_USECOND;
+
+      clock_id = gst_clock_new_single_shot_id (system_clock, end_time);
+#ifndef G_DISABLE_ASSERT
+      clock_return =
+#else
+      (void)
+#endif
+          gst_clock_id_wait_async (clock_id, schedule_timeout_handling,
+          g_object_ref (self), (GDestroyNotify) g_object_unref);
+      g_assert (clock_return == GST_CLOCK_OK);
+      gst_clock_id_unref (clock_id);
+    } else {
+      if (self->priv->is_alive && !self->priv->timeout_pending) {
+        self->priv->timeout_pending = TRUE;
+        GST_TRACE_OBJECT (self, "Schedule timeout now");
+
+        g_thread_pool_push (self->priv->thread_pool, GINT_TO_POINTER (0xc0ffee),
+            NULL);
+      }
+    }
+  } else {
+    GST_DEBUG_OBJECT (self, "no timeout set");
+  }
+}
+
+void
+gst_dtls_connection_check_timeout (GstDtlsConnection * self)
+{
+  GstDtlsConnectionPrivate *priv;
+
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
+
+  priv = self->priv;
+
+  GST_TRACE_OBJECT (self, "locking @ start_timeout");
+  g_mutex_lock (&priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ start_timeout");
+  gst_dtls_connection_check_timeout_locked (self);
+  g_mutex_unlock (&priv->mutex);
+  GST_TRACE_OBJECT (self, "unlocking @ start_timeout");
+}
+
+void
+gst_dtls_connection_stop (GstDtlsConnection * self)
+{
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
+  g_return_if_fail (self->priv->ssl);
+  g_return_if_fail (self->priv->bio);
+
+  GST_DEBUG_OBJECT (self, "stopping connection");
+
+  GST_TRACE_OBJECT (self, "locking @ stop");
+  g_mutex_lock (&self->priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ stop");
+
+  self->priv->is_alive = FALSE;
+  GST_TRACE_OBJECT (self, "signaling @ stop");
+  g_cond_signal (&self->priv->condition);
+  GST_TRACE_OBJECT (self, "signaled @ stop");
+
+  GST_TRACE_OBJECT (self, "unlocking @ stop");
+  g_mutex_unlock (&self->priv->mutex);
+
+  GST_DEBUG_OBJECT (self, "stopped connection");
+}
+
+void
+gst_dtls_connection_close (GstDtlsConnection * self)
+{
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
+  g_return_if_fail (self->priv->ssl);
+  g_return_if_fail (self->priv->bio);
+
+  GST_DEBUG_OBJECT (self, "closing connection");
+
+  GST_TRACE_OBJECT (self, "locking @ close");
+  g_mutex_lock (&self->priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ close");
+
+  if (self->priv->is_alive) {
+    self->priv->is_alive = FALSE;
+    g_cond_signal (&self->priv->condition);
+  }
+
+  GST_TRACE_OBJECT (self, "unlocking @ close");
+  g_mutex_unlock (&self->priv->mutex);
+
+  GST_DEBUG_OBJECT (self, "closed connection");
+}
+
+void
+gst_dtls_connection_set_send_callback (GstDtlsConnection * self,
+    GClosure * closure)
+{
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
+
+  GST_TRACE_OBJECT (self, "locking @ set_send_callback");
+  g_mutex_lock (&self->priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ set_send_callback");
+
+  if (self->priv->send_closure) {
+    g_closure_unref (self->priv->send_closure);
+    self->priv->send_closure = NULL;
+  }
+  self->priv->send_closure = closure;
+
+  if (closure && G_CLOSURE_NEEDS_MARSHAL (closure)) {
+    g_closure_set_marshal (closure, g_cclosure_marshal_generic);
+  }
+
+  GST_TRACE_OBJECT (self, "unlocking @ set_send_callback");
+  g_mutex_unlock (&self->priv->mutex);
+}
+
+gint
+gst_dtls_connection_process (GstDtlsConnection * self, gpointer data, gint len)
+{
+  GstDtlsConnectionPrivate *priv;
+  gint result;
+
+  g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
+  g_return_val_if_fail (self->priv->ssl, 0);
+  g_return_val_if_fail (self->priv->bio, 0);
+
+  priv = self->priv;
+
+  GST_TRACE_OBJECT (self, "locking @ process");
+  g_mutex_lock (&priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ process");
+
+  g_warn_if_fail (!priv->bio_buffer);
+
+  priv->bio_buffer = data;
+  priv->bio_buffer_len = len;
+  priv->bio_buffer_offset = 0;
+
+  log_state (self, "process start");
+
+  if (SSL_want_write (priv->ssl)) {
+    openssl_poll (self);
+    log_state (self, "process want write, after poll");
+  }
+
+  result = SSL_read (priv->ssl, data, len);
+
+  log_state (self, "process after read");
+
+  openssl_poll (self);
+
+  log_state (self, "process after poll");
+
+  GST_DEBUG_OBJECT (self, "read result: %d", result);
+
+  GST_TRACE_OBJECT (self, "unlocking @ process");
+  g_mutex_unlock (&priv->mutex);
+
+  return result;
+}
+
+gint
+gst_dtls_connection_send (GstDtlsConnection * self, gpointer data, gint len)
+{
+  int ret = 0;
+
+  g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
+
+  g_return_val_if_fail (self->priv->ssl, 0);
+  g_return_val_if_fail (self->priv->bio, 0);
+
+  GST_TRACE_OBJECT (self, "locking @ send");
+  g_mutex_lock (&self->priv->mutex);
+  GST_TRACE_OBJECT (self, "locked @ send");
+
+  if (SSL_is_init_finished (self->priv->ssl)) {
+    ret = SSL_write (self->priv->ssl, data, len);
+    GST_DEBUG_OBJECT (self, "data sent: input was %d B, output is %d B", len,
+        ret);
+  } else {
+    GST_WARNING_OBJECT (self,
+        "tried to send data before handshake was complete");
+    ret = 0;
+  }
+
+  GST_TRACE_OBJECT (self, "unlocking @ send");
+  g_mutex_unlock (&self->priv->mutex);
+
+  return ret;
+}
+
+/*
+     ######   #######  ##    ##
+    ##    ## ##     ## ###   ##
+    ##       ##     ## ####  ##
+    ##       ##     ## ## ## ##
+    ##       ##     ## ##  ####
+    ##    ## ##     ## ##   ###
+     ######   #######  ##    ##
+*/
+
+static void
+log_state (GstDtlsConnection * self, const gchar * str)
+{
+  GstDtlsConnectionPrivate *priv = self->priv;
+  guint states = 0;
+
+  states |= (! !SSL_is_init_finished (priv->ssl) << 0);
+  states |= (! !SSL_in_init (priv->ssl) << 4);
+  states |= (! !SSL_in_before (priv->ssl) << 8);
+  states |= (! !SSL_in_connect_init (priv->ssl) << 12);
+  states |= (! !SSL_in_accept_init (priv->ssl) << 16);
+  states |= (! !SSL_want_write (priv->ssl) << 20);
+  states |= (! !SSL_want_read (priv->ssl) << 24);
+
+  GST_LOG_OBJECT (self, "%s: role=%s buf=(%d,%p:%d/%d) %x|%x %s",
+      str,
+      priv->is_client ? "client" : "server",
+      pqueue_size (priv->ssl->d1->sent_messages),
+      priv->bio_buffer,
+      priv->bio_buffer_offset,
+      priv->bio_buffer_len,
+      states, SSL_get_state (priv->ssl), SSL_state_string_long (priv->ssl));
+}
+
+static void
+export_srtp_keys (GstDtlsConnection * self)
+{
+  typedef struct
+  {
+    guint8 v[SRTP_KEY_LEN];
+  } Key;
+
+  typedef struct
+  {
+    guint8 v[SRTP_SALT_LEN];
+  } Salt;
+
+  struct
+  {
+    Key client_key;
+    Key server_key;
+    Salt client_salt;
+    Salt server_salt;
+  } exported_keys;
+
+  struct
+  {
+    Key key;
+    Salt salt;
+  } client_key, server_key;
+
+  SRTP_PROTECTION_PROFILE *profile;
+  GstDtlsSrtpCipher cipher;
+  GstDtlsSrtpAuth auth;
+  gint success;
+
+  static gchar export_string[] = "EXTRACTOR-dtls_srtp";
+
+  success = SSL_export_keying_material (self->priv->ssl,
+      (gpointer) & exported_keys, 60, export_string, strlen (export_string),
+      NULL, 0, 0);
+
+  if (!success) {
+    GST_WARNING_OBJECT (self, "failed to export srtp keys");
+    return;
+  }
+
+  profile = SSL_get_selected_srtp_profile (self->priv->ssl);
+
+  GST_INFO_OBJECT (self, "keys received, profile is %s", profile->name);
+
+  switch (profile->id) {
+    case SRTP_AES128_CM_SHA1_80:
+      cipher = GST_DTLS_SRTP_CIPHER_AES_128_ICM;
+      auth = GST_DTLS_SRTP_AUTH_HMAC_SHA1_80;
+      break;
+    case SRTP_AES128_CM_SHA1_32:
+      cipher = GST_DTLS_SRTP_CIPHER_AES_128_ICM;
+      auth = GST_DTLS_SRTP_AUTH_HMAC_SHA1_32;
+      break;
+    default:
+      GST_WARNING_OBJECT (self, "invalid crypto suite set by handshake");
+      goto beach;
+  }
+
+  client_key.key = exported_keys.client_key;
+  server_key.key = exported_keys.server_key;
+  client_key.salt = exported_keys.client_salt;
+  server_key.salt = exported_keys.server_salt;
+
+  if (self->priv->is_client) {
+    g_signal_emit (self, signals[SIGNAL_ON_ENCODER_KEY], 0, &client_key, cipher,
+        auth);
+    g_signal_emit (self, signals[SIGNAL_ON_DECODER_KEY], 0, &server_key,
+        cipher, auth);
+  } else {
+    g_signal_emit (self, signals[SIGNAL_ON_ENCODER_KEY], 0, &server_key,
+        cipher, auth);
+    g_signal_emit (self, signals[SIGNAL_ON_DECODER_KEY], 0, &client_key, cipher,
+        auth);
+  }
+
+beach:
+  self->priv->keys_exported = TRUE;
+}
+
+static void
+openssl_poll (GstDtlsConnection * self)
+{
+  int ret;
+  char buf[512];
+  int error;
+
+  log_state (self, "poll: before handshake");
+
+  ret = SSL_do_handshake (self->priv->ssl);
+
+  log_state (self, "poll: after handshake");
+
+  if (ret == 1) {
+    if (!self->priv->keys_exported) {
+      GST_INFO_OBJECT (self,
+          "handshake just completed successfully, exporting keys");
+      export_srtp_keys (self);
+    } else {
+      GST_INFO_OBJECT (self, "handshake is completed");
+    }
+    return;
+  } else {
+    if (ret == 0) {
+      GST_DEBUG_OBJECT (self, "do_handshake encountered EOF");
+    } else if (ret == -1) {
+      GST_WARNING_OBJECT (self, "do_handshake encountered BIO error");
+    } else {
+      GST_DEBUG_OBJECT (self, "do_handshake returned %d", ret);
+    }
+  }
+
+  error = SSL_get_error (self->priv->ssl, ret);
+
+  switch (error) {
+    case SSL_ERROR_NONE:
+      GST_WARNING_OBJECT (self, "no error, handshake should be done");
+      break;
+    case SSL_ERROR_SSL:
+      GST_LOG_OBJECT (self, "SSL error %d: %s", error,
+          ERR_error_string (ERR_get_error (), buf));
+      break;
+    case SSL_ERROR_WANT_READ:
+      GST_LOG_OBJECT (self, "SSL wants read");
+      break;
+    case SSL_ERROR_WANT_WRITE:
+      GST_LOG_OBJECT (self, "SSL wants write");
+      break;
+    case SSL_ERROR_SYSCALL:{
+      GST_LOG_OBJECT (self, "SSL syscall (error) : %lu", ERR_get_error ());
+      break;
+    }
+    default:
+      GST_WARNING_OBJECT (self, "Unknown SSL error: %d, ret: %d", error, ret);
+  }
+}
+
+static int
+openssl_verify_callback (int preverify_ok, X509_STORE_CTX * x509_ctx)
+{
+  GstDtlsConnection *self;
+  SSL *ssl;
+  BIO *bio;
+  gchar *pem = NULL;
+  gboolean accepted = FALSE;
+
+  ssl =
+      X509_STORE_CTX_get_ex_data (x509_ctx,
+      SSL_get_ex_data_X509_STORE_CTX_idx ());
+  self = SSL_get_ex_data (ssl, connection_ex_index);
+  g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), FALSE);
+
+  pem = _gst_dtls_x509_to_pem (x509_ctx->cert);
+
+  if (!pem) {
+    GST_WARNING_OBJECT (self,
+        "failed to convert received certificate to pem format");
+  } else {
+    bio = BIO_new (BIO_s_mem ());
+    if (bio) {
+      gchar buffer[2048];
+      gint len;
+
+      len =
+          X509_NAME_print_ex (bio, X509_get_subject_name (x509_ctx->cert), 1,
+          XN_FLAG_MULTILINE);
+      BIO_read (bio, buffer, len);
+      buffer[len] = '\0';
+      GST_DEBUG_OBJECT (self, "Peer certificate received:\n%s", buffer);
+      BIO_free (bio);
+    } else {
+      GST_DEBUG_OBJECT (self, "failed to create certificate print membio");
+    }
+
+    g_signal_emit (self, signals[SIGNAL_ON_PEER_CERTIFICATE], 0, pem,
+        &accepted);
+    g_free (pem);
+  }
+
+  return accepted;
+}
+
+/*
+    ########  ####  #######
+    ##     ##  ##  ##     ##
+    ##     ##  ##  ##     ##
+    ########   ##  ##     ##
+    ##     ##  ##  ##     ##
+    ##     ##  ##  ##     ##
+    ########  ####  #######
+*/
+
+static BIO_METHOD custom_bio_methods = {
+  BIO_TYPE_BIO,
+  "stream",
+  bio_method_write,
+  bio_method_read,
+  NULL,
+  NULL,
+  bio_method_ctrl,
+  bio_method_new,
+  bio_method_free,
+  NULL,
+};
+
+static BIO_METHOD *
+BIO_s_gst_dtls_connection (void)
+{
+  return &custom_bio_methods;
+}
+
+static int
+bio_method_write (BIO * bio, const char *data, int size)
+{
+  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
+
+  GST_LOG_OBJECT (self, "BIO: writing %d", size);
+
+  if (self->priv->send_closure) {
+    GValue values[3] = { G_VALUE_INIT };
+
+    g_value_init (&values[0], GST_TYPE_DTLS_CONNECTION);
+    g_value_set_object (&values[0], self);
+
+    g_value_init (&values[1], G_TYPE_POINTER);
+    g_value_set_pointer (&values[1], (gpointer) data);
+
+    g_value_init (&values[2], G_TYPE_INT);
+    g_value_set_int (&values[2], size);
+
+    g_closure_invoke (self->priv->send_closure, NULL, 3, values, NULL);
+  }
+
+  return size;
+}
+
+static int
+bio_method_read (BIO * bio, char *out_buffer, int size)
+{
+  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
+  GstDtlsConnectionPrivate *priv = self->priv;
+  guint internal_size;
+  gint copy_size;
+
+  internal_size = priv->bio_buffer_len - priv->bio_buffer_offset;
+
+  if (!priv->bio_buffer) {
+    GST_LOG_OBJECT (self, "BIO: EOF");
+    return 0;
+  }
+
+  if (!out_buffer || size <= 0) {
+    GST_WARNING_OBJECT (self, "BIO: read got invalid arguments");
+    if (internal_size) {
+      BIO_set_retry_read (bio);
+    }
+    return internal_size;
+  }
+
+  if (size > internal_size) {
+    copy_size = internal_size;
+  } else {
+    copy_size = size;
+  }
+
+  GST_DEBUG_OBJECT (self,
+      "reading %d/%d bytes %d at offset %d, output buff size is %d", copy_size,
+      priv->bio_buffer_len, internal_size, priv->bio_buffer_offset, size);
+
+  memcpy (out_buffer, (guint8 *) priv->bio_buffer + priv->bio_buffer_offset,
+      copy_size);
+  priv->bio_buffer_offset += copy_size;
+
+  if (priv->bio_buffer_len == priv->bio_buffer_offset) {
+    priv->bio_buffer = NULL;
+  }
+
+  return copy_size;
+}
+
+static long
+bio_method_ctrl (BIO * bio, int cmd, long arg1, void *arg2)
+{
+  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
+  GstDtlsConnectionPrivate *priv = self->priv;
+
+  switch (cmd) {
+    case BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT:
+    case BIO_CTRL_DGRAM_SET_RECV_TIMEOUT:
+      GST_LOG_OBJECT (self, "BIO: Timeout set");
+      gst_dtls_connection_check_timeout_locked (self);
+      return 1;
+    case BIO_CTRL_RESET:
+      priv->bio_buffer = NULL;
+      priv->bio_buffer_len = 0;
+      priv->bio_buffer_offset = 0;
+      GST_LOG_OBJECT (self, "BIO: EOF reset");
+      return 1;
+    case BIO_CTRL_EOF:{
+      gint eof = !(priv->bio_buffer_len - priv->bio_buffer_offset);
+      GST_LOG_OBJECT (self, "BIO: EOF query returned %d", eof);
+      return eof;
+    }
+    case BIO_CTRL_WPENDING:
+      GST_LOG_OBJECT (self, "BIO: pending write");
+      return 1;
+    case BIO_CTRL_PENDING:{
+      gint pending = priv->bio_buffer_len - priv->bio_buffer_offset;
+      GST_LOG_OBJECT (self, "BIO: %d bytes pending", pending);
+      return pending;
+    }
+    case BIO_CTRL_FLUSH:
+      GST_LOG_OBJECT (self, "BIO: flushing");
+      return 1;
+    case BIO_CTRL_DGRAM_QUERY_MTU:
+      GST_DEBUG_OBJECT (self, "BIO: MTU query, returning 0...");
+      return 0;
+    case BIO_CTRL_DGRAM_MTU_EXCEEDED:
+      GST_WARNING_OBJECT (self, "BIO: MTU exceeded");
+      return 0;
+    default:
+      GST_LOG_OBJECT (self, "BIO: unhandled ctrl, %d", cmd);
+      return 0;
+  }
+}
+
+static int
+bio_method_new (BIO * bio)
+{
+  GST_LOG_OBJECT (NULL, "BIO: new");
+
+  bio->shutdown = 0;
+  bio->init = 1;
+
+  return 1;
+}
+
+static int
+bio_method_free (BIO * bio)
+{
+  if (!bio) {
+    GST_LOG_OBJECT (NULL, "BIO free called with null bio");
+    return 0;
+  }
+
+  GST_LOG_OBJECT (GST_DTLS_CONNECTION (bio->ptr), "BIO free");
+  return 0;
+}
diff --git a/ext/dtls/gstdtlsconnection.h b/ext/dtls/gstdtlsconnection.h
new file mode 100644
index 0000000..6260b93
--- /dev/null
+++ b/ext/dtls/gstdtlsconnection.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlsconnection_h
+#define gstdtlsconnection_h
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_CONNECTION            (gst_dtls_connection_get_type())
+#define GST_DTLS_CONNECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_CONNECTION, GstDtlsConnection))
+#define GST_DTLS_CONNECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_CONNECTION, GstDtlsConnectionClass))
+#define GST_IS_DTLS_CONNECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_CONNECTION))
+#define GST_IS_DTLS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_CONNECTION))
+#define GST_DTLS_CONNECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_DTLS_CONNECTION, GstDtlsConnectionClass))
+
+typedef struct _GstDtlsConnection        GstDtlsConnection;
+typedef struct _GstDtlsConnectionClass   GstDtlsConnectionClass;
+typedef struct _GstDtlsConnectionPrivate GstDtlsConnectionPrivate;
+
+/**
+ * GstDtlsSrtpCipher:
+ * @GST_DTLS_SRTP_CIPHER_AES_128_ICM: aes-128-icm
+ *
+ * SRTP Cipher selected by the DTLS handshake, should match the enums in gstsrtp
+ */
+typedef enum {
+    GST_DTLS_SRTP_CIPHER_AES_128_ICM = 1
+} GstDtlsSrtpCipher;
+
+/**
+ * GstDtlsSrtpAuth:
+ * @GST_DTLS_SRTP_AUTH_HMAC_SHA1_32: hmac-sha1-32
+ * @GST_DTLS_SRTP_AUTH_HMAC_SHA1_80: hmac-sha1-80
+ *
+ * SRTP Auth selected by the DTLS handshake, should match the enums in gstsrtp
+ */
+typedef enum {
+    GST_DTLS_SRTP_AUTH_HMAC_SHA1_32 = 1,
+    GST_DTLS_SRTP_AUTH_HMAC_SHA1_80 = 2
+} GstDtlsSrtpAuth;
+
+#define GST_DTLS_SRTP_MASTER_KEY_LENGTH 30
+
+/*
+ * GstDtlsConnection:
+ *
+ * A class that handles a single DTLS connection.
+ * Any connection needs to be created with the agent property set.
+ * Once the DTLS handshake is completed, on-encoder-key and on-decoder-key will be signalled.
+ */
+struct _GstDtlsConnection {
+    GObject parent_instance;
+
+    GstDtlsConnectionPrivate *priv;
+};
+
+struct _GstDtlsConnectionClass {
+    GObjectClass parent_class;
+};
+
+GType gst_dtls_connection_get_type(void) G_GNUC_CONST;
+
+void gst_dtls_connection_start(GstDtlsConnection *, gboolean is_client);
+void gst_dtls_connection_check_timeout(GstDtlsConnection *);
+
+/*
+ * Stops the connections, it is not required to call this function.
+ */
+void gst_dtls_connection_stop(GstDtlsConnection *);
+
+/*
+ * Closes the connection, the function will block until the connection has been stopped.
+ * If stop is called some time before, close will return instantly.
+ */
+void gst_dtls_connection_close(GstDtlsConnection *);
+
+/*
+ * Sets the closure that will be called whenever data needs to be sent.
+ *
+ * The closure will get called with the following arguments:
+ * void cb(GstDtlsConnection *, gpointer data, gint length, gpointer user_data)
+ */
+void gst_dtls_connection_set_send_callback(GstDtlsConnection *, GClosure *);
+
+/*
+ * Processes data that has been recevied, the transformation is done in-place.
+ * Returns the length of the plaintext data that was decoded, if no data is available, 0<= will be returned.
+ */
+gint gst_dtls_connection_process(GstDtlsConnection *, gpointer ptr, gint len);
+
+/*
+ * If the DTLS handshake is completed this function will encode the given data.
+ * Returns the length of the data sent, or 0 if the DTLS handshake is not completed.
+ */
+gint gst_dtls_connection_send(GstDtlsConnection *, gpointer ptr, gint len);
+
+G_END_DECLS
+
+#endif /* gstdtlsconnection_h */
diff --git a/ext/dtls/gstdtlsdec.c b/ext/dtls/gstdtlsdec.c
new file mode 100644
index 0000000..ac6ba77
--- /dev/null
+++ b/ext/dtls/gstdtlsdec.c
@@ -0,0 +1,745 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlsdec.h"
+
+#include "gstdtlscertificate.h"
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-dtls")
+    );
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS_ANY);
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_dec_debug);
+#define GST_CAT_DEFAULT gst_dtls_dec_debug
+
+#define gst_dtls_dec_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDtlsDec, gst_dtls_dec, GST_TYPE_ELEMENT,
+    GST_DEBUG_CATEGORY_INIT (gst_dtls_dec_debug, "dtlsdec", 0, "DTLS Decoder"));
+
+enum
+{
+  SIGNAL_ON_KEY_RECEIVED,
+  NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS];
+
+enum
+{
+  PROP_0,
+  PROP_CONNECTION_ID,
+  PROP_PEM,
+  PROP_PEER_PEM,
+
+  PROP_DECODER_KEY,
+  PROP_SRTP_CIPHER,
+  PROP_SRTP_AUTH,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_CONNECTION_ID NULL
+#define DEFAULT_PEM NULL
+#define DEFAULT_PEER_PEM NULL
+
+#define DEFAULT_DECODER_KEY NULL
+#define DEFAULT_SRTP_CIPHER 0
+#define DEFAULT_SRTP_AUTH 0
+
+
+static void gst_dtls_dec_finalize (GObject *);
+static void gst_dtls_dec_dispose (GObject *);
+static void gst_dtls_dec_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_dec_get_property (GObject *, guint prop_id, GValue *,
+    GParamSpec *);
+
+static GstStateChangeReturn gst_dtls_dec_change_state (GstElement *,
+    GstStateChange);
+static GstPad *gst_dtls_dec_request_new_pad (GstElement *, GstPadTemplate *,
+    const gchar * name, const GstCaps *);
+static void gst_dtls_dec_release_pad (GstElement *, GstPad *);
+
+static void on_key_received (GstDtlsConnection *, gpointer key, guint cipher,
+    guint auth, GstDtlsDec *);
+static gboolean on_peer_certificate_received (GstDtlsConnection *, gchar * pem,
+    GstDtlsDec *);
+static GstFlowReturn sink_chain (GstPad *, GstObject * parent, GstBuffer *);
+static GstFlowReturn sink_chain_list (GstPad *, GstObject * parent,
+    GstBufferList *);
+
+static GstDtlsAgent *get_agent_by_pem (const gchar * pem);
+static void agent_weak_ref_notify (gchar * pem, GstDtlsAgent *);
+static void create_connection (GstDtlsDec *, gchar * id);
+static void connection_weak_ref_notify (gchar * id, GstDtlsConnection *);
+
+static void
+gst_dtls_dec_class_init (GstDtlsDecClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = (GstElementClass *) klass;
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_dtls_dec_finalize);
+  gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_dtls_dec_dispose);
+  gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_dtls_dec_set_property);
+  gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_dtls_dec_get_property);
+
+  element_class->change_state = GST_DEBUG_FUNCPTR (gst_dtls_dec_change_state);
+  element_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_dtls_dec_request_new_pad);
+  element_class->release_pad = GST_DEBUG_FUNCPTR (gst_dtls_dec_release_pad);
+
+  signals[SIGNAL_ON_KEY_RECEIVED] =
+      g_signal_new ("on-key-received", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+
+  properties[PROP_CONNECTION_ID] =
+      g_param_spec_string ("connection-id",
+      "Connection id",
+      "Every encoder/decoder pair should have the same, unique, connection-id",
+      DEFAULT_CONNECTION_ID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_PEM] =
+      g_param_spec_string ("pem",
+      "PEM string",
+      "A string containing a X509 certificate and RSA private key in PEM format",
+      DEFAULT_PEM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_PEER_PEM] =
+      g_param_spec_string ("peer-pem",
+      "Peer PEM string",
+      "The X509 certificate received in the DTLS handshake, in PEM format",
+      DEFAULT_PEER_PEM, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_DECODER_KEY] =
+      g_param_spec_boxed ("decoder-key",
+      "Decoder key",
+      "SRTP key that should be used by the decoder",
+      GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_CIPHER] =
+      g_param_spec_uint ("srtp-cipher",
+      "SRTP cipher",
+      "The SRTP cipher selected in the DTLS handshake. "
+      "The value will be set to an GstDtlsSrtpCipher.",
+      0, GST_DTLS_SRTP_CIPHER_AES_128_ICM, DEFAULT_SRTP_CIPHER,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_AUTH] =
+      g_param_spec_uint ("srtp-auth",
+      "SRTP authentication",
+      "The SRTP authentication selected in the DTLS handshake. "
+      "The value will be set to an GstDtlsSrtpAuth.",
+      0, GST_DTLS_SRTP_AUTH_HMAC_SHA1_80, DEFAULT_SRTP_AUTH,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+
+  gst_element_class_set_static_metadata (element_class,
+      "DTLS Decoder",
+      "Decoder/Network/DTLS",
+      "Decodes DTLS packets", "Patrik Oldsberg patrik.oldsberg@ericsson.com");
+}
+
+static void
+gst_dtls_dec_init (GstDtlsDec * self)
+{
+  self->agent = get_agent_by_pem (NULL);
+  self->connection_id = NULL;
+  self->connection = NULL;
+  self->peer_pem = NULL;
+
+  self->decoder_key = NULL;
+  self->srtp_cipher = DEFAULT_SRTP_CIPHER;
+  self->srtp_auth = DEFAULT_SRTP_AUTH;
+
+  g_mutex_init (&self->src_mutex);
+
+  self->src = NULL;
+  self->sink = gst_pad_new_from_static_template (&sink_template, "sink");
+  g_return_if_fail (self->sink);
+
+  gst_pad_set_chain_function (self->sink, GST_DEBUG_FUNCPTR (sink_chain));
+  gst_pad_set_chain_list_function (self->sink,
+      GST_DEBUG_FUNCPTR (sink_chain_list));
+
+  gst_element_add_pad (GST_ELEMENT (self), self->sink);
+}
+
+static void
+gst_dtls_dec_finalize (GObject * object)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (object);
+
+  if (self->decoder_key) {
+    gst_buffer_unref (self->decoder_key);
+    self->decoder_key = NULL;
+  }
+
+  g_free (self->connection_id);
+  self->connection_id = NULL;
+
+  g_free (self->peer_pem);
+  self->peer_pem = NULL;
+
+  g_mutex_clear (&self->src_mutex);
+
+  GST_LOG_OBJECT (self, "finalized");
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_dtls_dec_dispose (GObject * object)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (object);
+
+  if (self->agent) {
+    g_object_unref (self->agent);
+    self->agent = NULL;
+  }
+
+  if (self->connection) {
+    g_object_unref (self->connection);
+    self->connection = NULL;
+  }
+
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gst_dtls_dec_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (object);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      g_free (self->connection_id);
+      self->connection_id = g_value_dup_string (value);
+      g_return_if_fail (self->agent);
+      create_connection (self, self->connection_id);
+      break;
+    case PROP_PEM:
+      if (self->agent) {
+        g_object_unref (self->agent);
+      }
+      self->agent = get_agent_by_pem (g_value_get_string (value));
+      if (self->connection_id) {
+        create_connection (self, self->connection_id);
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_dec_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (object);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      g_value_set_string (value, self->connection_id);
+      break;
+    case PROP_PEM:
+      g_value_take_string (value,
+          gst_dtls_agent_get_certificate_pem (self->agent));
+      break;
+    case PROP_PEER_PEM:
+      g_value_set_string (value, self->peer_pem);
+      break;
+    case PROP_DECODER_KEY:
+      g_value_set_boxed (value, self->decoder_key);
+      break;
+    case PROP_SRTP_CIPHER:
+      g_value_set_uint (value, self->srtp_cipher);
+      break;
+    case PROP_SRTP_AUTH:
+      g_value_set_uint (value, self->srtp_auth);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static GstStateChangeReturn
+gst_dtls_dec_change_state (GstElement * element, GstStateChange transition)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (self->connection) {
+        g_signal_connect_object (self->connection,
+            "on-decoder-key", G_CALLBACK (on_key_received), self, 0);
+        g_signal_connect_object (self->connection,
+            "on-peer-certificate", G_CALLBACK (on_peer_certificate_received),
+            self, 0);
+      } else {
+        GST_WARNING_OBJECT (self,
+            "trying to change state to ready without connection id and pem");
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  return ret;
+}
+
+static gboolean
+forward_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
+{
+  GstPad *srcpad = GST_PAD_CAST (user_data);
+  GstFlowReturn ret;
+
+  ret = gst_pad_store_sticky_event (srcpad, *event);
+  if (ret != GST_FLOW_OK) {
+    GST_DEBUG_OBJECT (srcpad, "storing sticky event %p (%s) failed: %s", *event,
+        GST_EVENT_TYPE_NAME (*event), gst_flow_get_name (ret));
+  }
+
+  return TRUE;
+}
+
+static GstPad *
+gst_dtls_dec_request_new_pad (GstElement * element,
+    GstPadTemplate * tmpl, const gchar * name, const GstCaps * caps)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (element);
+  GstPad *pad;
+
+  GST_DEBUG_OBJECT (element, "requesting pad");
+
+  g_return_val_if_fail (!self->src, NULL);
+  g_return_val_if_fail (tmpl->direction == GST_PAD_SRC, NULL);
+
+  g_mutex_lock (&self->src_mutex);
+  if (self->src) {
+    GST_ERROR_OBJECT (self, "Pad %s:%s exists already",
+        GST_DEBUG_PAD_NAME (self->src));
+    g_mutex_unlock (&self->src_mutex);
+    return NULL;
+  }
+
+  self->src = pad = gst_pad_new_from_template (tmpl, name);
+
+  g_mutex_unlock (&self->src_mutex);
+
+  gst_pad_set_active (pad, TRUE);
+
+  if (caps)
+    gst_pad_set_caps (pad, (GstCaps *) caps);
+
+  /* Forward sticky events to the new srcpad */
+  gst_pad_sticky_events_foreach (self->sink, forward_sticky_events, self->src);
+
+  gst_element_add_pad (element, pad);
+
+  return pad;
+}
+
+static void
+gst_dtls_dec_release_pad (GstElement * element, GstPad * pad)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (element);
+
+  g_return_if_fail (self->src == pad);
+
+  g_mutex_lock (&self->src_mutex);
+
+  self->src = NULL;
+  g_mutex_unlock (&self->src_mutex);
+
+  GST_DEBUG_OBJECT (self, "releasing src pad");
+
+  gst_element_remove_pad (element, pad);
+}
+
+static void
+on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher,
+    guint auth, GstDtlsDec * self)
+{
+  gpointer key_dup;
+  gchar *key_str;
+
+  g_return_if_fail (GST_IS_DTLS_DEC (self));
+
+  self->srtp_cipher = cipher;
+  self->srtp_auth = auth;
+
+  key_dup = g_memdup (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+
+  if (self->decoder_key) {
+    gst_buffer_unref (self->decoder_key);
+    self->decoder_key = NULL;
+  }
+
+  self->decoder_key =
+      gst_buffer_new_wrapped (key_dup, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+
+  key_str = g_base64_encode (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+  GST_INFO_OBJECT (self, "received key: %s", key_str);
+  g_free (key_str);
+
+  g_signal_emit (self, signals[SIGNAL_ON_KEY_RECEIVED], 0);
+}
+
+static gboolean
+signal_peer_certificate_received (GWeakRef * ref)
+{
+  GstDtlsDec *self;
+
+  self = g_weak_ref_get (ref);
+  g_weak_ref_clear (ref);
+  g_free (ref);
+  ref = NULL;
+
+  if (self) {
+    g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PEER_PEM]);
+    g_object_unref (self);
+    self = NULL;
+  }
+
+  return FALSE;
+}
+
+static gboolean
+on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem,
+    GstDtlsDec * self)
+{
+  GWeakRef *ref;
+
+  g_return_val_if_fail (GST_IS_DTLS_DEC (self), TRUE);
+
+  GST_DEBUG_OBJECT (self, "Received peer certificate PEM: \n%s", pem);
+
+  if (self->peer_pem != NULL) {
+    g_free (self->peer_pem);
+    self->peer_pem = NULL;
+  }
+  self->peer_pem = g_strdup (pem);
+
+  ref = g_new (GWeakRef, 1);
+  g_weak_ref_init (ref, self);
+
+  g_idle_add ((GSourceFunc) signal_peer_certificate_received, ref);
+
+  return TRUE;
+}
+
+static gint
+process_buffer (GstDtlsDec * self, GstBuffer * buffer)
+{
+  GstMapInfo map_info;
+  gint size;
+
+  if (!gst_buffer_map (buffer, &map_info, GST_MAP_READWRITE))
+    return 0;
+
+  if (!map_info.size) {
+    gst_buffer_unmap (buffer, &map_info);
+    return 0;
+  }
+
+  size =
+      gst_dtls_connection_process (self->connection, map_info.data,
+      map_info.size);
+  gst_buffer_unmap (buffer, &map_info);
+
+  if (size <= 0)
+    return size;
+
+  gst_buffer_set_size (buffer, size);
+
+  return size;
+}
+
+static gboolean
+process_buffer_from_list (GstBuffer ** buffer, guint idx, gpointer user_data)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (user_data);
+  gint size;
+
+  *buffer = gst_buffer_make_writable (*buffer);
+  size = process_buffer (self, *buffer);
+  if (size <= 0)
+    gst_buffer_replace (buffer, NULL);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+sink_chain_list (GstPad * pad, GstObject * parent, GstBufferList * list)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (parent);
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstPad *other_pad;
+
+  list = gst_buffer_list_make_writable (list);
+  gst_buffer_list_foreach (list, process_buffer_from_list, self);
+
+  if (gst_buffer_list_length (list) == 0) {
+    GST_DEBUG_OBJECT (self, "Not produced any buffers");
+    gst_buffer_list_unref (list);
+
+    return GST_FLOW_OK;
+  }
+
+  g_mutex_lock (&self->src_mutex);
+  other_pad = self->src;
+  if (other_pad)
+    gst_object_ref (other_pad);
+  g_mutex_unlock (&self->src_mutex);
+
+  if (other_pad) {
+    GST_LOG_OBJECT (self, "decoded buffer list with length %u, pushing",
+        gst_buffer_list_length (list));
+    ret = gst_pad_push_list (other_pad, list);
+    gst_object_unref (other_pad);
+  } else {
+    GST_LOG_OBJECT (self, "dropped buffer list with length %d, not linked",
+        gst_buffer_list_length (list));
+    gst_buffer_list_unref (list);
+  }
+
+  return ret;
+}
+
+static GstFlowReturn
+sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstDtlsDec *self = GST_DTLS_DEC (parent);
+  GstFlowReturn ret = GST_FLOW_OK;
+  gint size;
+  GstPad *other_pad;
+
+  if (!self->agent) {
+    gst_buffer_unref (buffer);
+    return GST_FLOW_OK;
+  }
+
+  GST_DEBUG_OBJECT (self, "received buffer from %s with length %zd",
+      self->connection_id, gst_buffer_get_size (buffer));
+
+  buffer = gst_buffer_make_writable (buffer);
+  size = process_buffer (self, buffer);
+
+  if (size <= 0) {
+    gst_buffer_unref (buffer);
+
+    return GST_FLOW_OK;
+  }
+
+  g_mutex_lock (&self->src_mutex);
+  other_pad = self->src;
+  if (other_pad)
+    gst_object_ref (other_pad);
+  g_mutex_unlock (&self->src_mutex);
+
+  if (other_pad) {
+    GST_LOG_OBJECT (self, "decoded buffer with length %d, pushing", size);
+    ret = gst_pad_push (other_pad, buffer);
+    gst_object_unref (other_pad);
+  } else {
+    GST_LOG_OBJECT (self, "dropped buffer with length %d, not linked", size);
+    gst_buffer_unref (buffer);
+  }
+
+  return ret;
+}
+
+static GHashTable *agent_table = NULL;
+G_LOCK_DEFINE_STATIC (agent_table);
+
+static GstDtlsAgent *generated_cert_agent = NULL;
+
+static GstDtlsAgent *
+get_agent_by_pem (const gchar * pem)
+{
+  GstDtlsAgent *agent;
+
+  if (!pem) {
+    if (g_once_init_enter (&generated_cert_agent)) {
+      GstDtlsAgent *new_agent;
+
+      new_agent = g_object_new (GST_TYPE_DTLS_AGENT, "certificate",
+          g_object_new (GST_TYPE_DTLS_CERTIFICATE, NULL), NULL);
+
+      GST_DEBUG_OBJECT (generated_cert_agent,
+          "no agent with generated cert found, creating new");
+      g_once_init_leave (&generated_cert_agent, new_agent);
+    } else {
+      GST_DEBUG_OBJECT (generated_cert_agent,
+          "using agent with generated cert");
+    }
+
+    agent = generated_cert_agent;
+    g_object_ref (agent);
+  } else {
+    G_LOCK (agent_table);
+
+    if (!agent_table) {
+      agent_table =
+          g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+    }
+
+    agent = GST_DTLS_AGENT (g_hash_table_lookup (agent_table, pem));
+
+    if (!agent) {
+      agent = g_object_new (GST_TYPE_DTLS_AGENT,
+          "certificate", g_object_new (GST_TYPE_DTLS_CERTIFICATE, "pem", pem,
+              NULL), NULL);
+
+      g_object_weak_ref (G_OBJECT (agent), (GWeakNotify) agent_weak_ref_notify,
+          (gpointer) g_strdup (pem));
+
+      g_hash_table_insert (agent_table, g_strdup (pem), agent);
+
+      GST_DEBUG_OBJECT (agent, "no agent found, created new");
+    } else {
+      g_object_ref (agent);
+      GST_DEBUG_OBJECT (agent, "agent found");
+    }
+
+    G_UNLOCK (agent_table);
+  }
+
+
+  return agent;
+}
+
+static void
+agent_weak_ref_notify (gchar * pem, GstDtlsAgent * agent)
+{
+  G_LOCK (agent_table);
+  g_hash_table_remove (agent_table, pem);
+  G_UNLOCK (agent_table);
+
+  g_free (pem);
+  pem = NULL;
+}
+
+static GHashTable *connection_table = NULL;
+G_LOCK_DEFINE_STATIC (connection_table);
+
+GstDtlsConnection *
+gst_dtls_dec_fetch_connection (gchar * id)
+{
+  GstDtlsConnection *connection;
+  g_return_val_if_fail (id, NULL);
+
+  GST_DEBUG ("fetching '%s' from connection table, size is %d",
+      id, g_hash_table_size (connection_table));
+
+  G_LOCK (connection_table);
+
+  connection = g_hash_table_lookup (connection_table, id);
+
+  if (connection) {
+    g_object_ref (connection);
+    g_hash_table_remove (connection_table, id);
+  } else {
+    GST_WARNING ("no connection with id '%s' found", id);
+  }
+
+  G_UNLOCK (connection_table);
+
+  return connection;
+}
+
+static void
+create_connection (GstDtlsDec * self, gchar * id)
+{
+  g_return_if_fail (GST_IS_DTLS_DEC (self));
+  g_return_if_fail (GST_IS_DTLS_AGENT (self->agent));
+
+  if (self->connection) {
+    g_object_unref (self->connection);
+    self->connection = NULL;
+  }
+
+  G_LOCK (connection_table);
+
+  if (!connection_table) {
+    connection_table =
+        g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+  }
+
+  if (g_hash_table_contains (connection_table, id)) {
+    G_UNLOCK (connection_table);
+
+    g_return_if_reached ();
+  }
+
+  self->connection =
+      g_object_new (GST_TYPE_DTLS_CONNECTION, "agent", self->agent, NULL);
+
+  g_object_weak_ref (G_OBJECT (self->connection),
+      (GWeakNotify) connection_weak_ref_notify, g_strdup (id));
+
+  g_hash_table_insert (connection_table, g_strdup (id), self->connection);
+
+  G_UNLOCK (connection_table);
+}
+
+static void
+connection_weak_ref_notify (gchar * id, GstDtlsConnection * connection)
+{
+  G_LOCK (connection_table);
+  g_hash_table_remove (connection_table, id);
+  G_UNLOCK (connection_table);
+
+  g_free (id);
+  id = NULL;
+}
diff --git a/ext/dtls/gstdtlsdec.h b/ext/dtls/gstdtlsdec.h
new file mode 100644
index 0000000..7165bf7
--- /dev/null
+++ b/ext/dtls/gstdtlsdec.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlsdec_h
+#define gstdtlsdec_h
+
+#include "gstdtlsagent.h"
+#include "gstdtlsconnection.h"
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_DEC \
+    (gst_dtls_dec_get_type())
+#define GST_DTLS_DEC(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_DEC, GstDtlsDec))
+#define GST_DTLS_DEC_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_DEC, GstDtlsDecClass))
+#define GST_IS_DTLS_DEC(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_DEC))
+#define GST_IS_DTLS_DEC_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_DEC))
+
+typedef struct _GstDtlsDec GstDtlsDec;
+typedef struct _GstDtlsDecClass GstDtlsDecClass;
+
+struct _GstDtlsDec {
+    GstElement element;
+
+    GstPad *src;
+    GstPad *sink;
+    GMutex src_mutex;
+
+    GstDtlsAgent *agent;
+    GstDtlsConnection *connection;
+    GMutex connection_mutex;
+    gchar *connection_id;
+    gchar *peer_pem;
+
+    GstBuffer *decoder_key;
+    guint srtp_cipher;
+    guint srtp_auth;
+};
+
+struct _GstDtlsDecClass {
+    GstElementClass parent_class;
+};
+
+GType gst_dtls_dec_get_type(void);
+
+gboolean gst_dtls_dec_plugin_init(GstPlugin *);
+
+GstDtlsConnection *gst_dtls_dec_fetch_connection(gchar *id);
+
+G_END_DECLS
+
+#endif /* gstdtlsdec_h */
diff --git a/ext/dtls/gstdtlsenc.c b/ext/dtls/gstdtlsenc.c
new file mode 100644
index 0000000..b78ff4a
--- /dev/null
+++ b/ext/dtls/gstdtlsenc.c
@@ -0,0 +1,550 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlsenc.h"
+
+#include "gstdtlsdec.h"
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-dtls")
+    );
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_enc_debug);
+#define GST_CAT_DEFAULT gst_dtls_enc_debug
+
+#define gst_dtls_enc_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDtlsEnc, gst_dtls_enc, GST_TYPE_ELEMENT,
+    GST_DEBUG_CATEGORY_INIT (gst_dtls_enc_debug, "dtlsenc", 0, "DTLS Encoder"));
+
+enum
+{
+  SIGNAL_ON_KEY_RECEIVED,
+  NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS];
+
+enum
+{
+  PROP_0,
+  PROP_CONNECTION_ID,
+  PROP_IS_CLIENT,
+
+  PROP_ENCODER_KEY,
+  PROP_SRTP_CIPHER,
+  PROP_SRTP_AUTH,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_CONNECTION_ID NULL
+#define DEFAULT_IS_CLIENT FALSE
+
+#define DEFAULT_ENCODER_KEY NULL
+#define DEFAULT_SRTP_CIPHER 0
+#define DEFAULT_SRTP_AUTH 0
+
+#define INITIAL_QUEUE_SIZE 64
+
+static void gst_dtls_enc_finalize (GObject *);
+static void gst_dtls_enc_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_enc_get_property (GObject *, guint prop_id, GValue *,
+    GParamSpec *);
+
+static GstStateChangeReturn gst_dtls_enc_change_state (GstElement *,
+    GstStateChange);
+static GstPad *gst_dtls_enc_request_new_pad (GstElement *, GstPadTemplate *,
+    const gchar * name, const GstCaps *);
+
+static gboolean src_activate_mode (GstPad *, GstObject *, GstPadMode,
+    gboolean active);
+static void src_task_loop (GstPad *);
+
+static GstFlowReturn sink_chain (GstPad *, GstObject *, GstBuffer *);
+
+static void on_key_received (GstDtlsConnection *, gpointer key, guint cipher,
+    guint auth, GstDtlsEnc *);
+static void on_send_data (GstDtlsConnection *, gconstpointer data, gint length,
+    GstDtlsEnc *);
+
+static void
+gst_dtls_enc_class_init (GstDtlsEncClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = (GstElementClass *) klass;
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_dtls_enc_finalize);
+  gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_dtls_enc_set_property);
+  gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_dtls_enc_get_property);
+
+  element_class->change_state = GST_DEBUG_FUNCPTR (gst_dtls_enc_change_state);
+  element_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_dtls_enc_request_new_pad);
+
+  signals[SIGNAL_ON_KEY_RECEIVED] =
+      g_signal_new ("on-key-received", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+
+  properties[PROP_CONNECTION_ID] =
+      g_param_spec_string ("connection-id",
+      "Connection id",
+      "Every encoder/decoder pair should have the same, unique, connection-id",
+      DEFAULT_CONNECTION_ID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_IS_CLIENT] =
+      g_param_spec_boolean ("is-client",
+      "Is client",
+      "Set to true if the decoder should act as"
+      "client and initiate the handshake",
+      DEFAULT_IS_CLIENT,
+      GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_ENCODER_KEY] =
+      g_param_spec_boxed ("encoder-key",
+      "Encoder key",
+      "Master key that should be used by the SRTP encoder",
+      GST_TYPE_BUFFER, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_CIPHER] =
+      g_param_spec_uint ("srtp-cipher",
+      "SRTP cipher",
+      "The SRTP cipher selected in the DTLS handshake. "
+      "The value will be set to an GstDtlsSrtpCipher.",
+      0, GST_DTLS_SRTP_CIPHER_AES_128_ICM, DEFAULT_SRTP_CIPHER,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_AUTH] =
+      g_param_spec_uint ("srtp-auth",
+      "SRTP authentication",
+      "The SRTP authentication selected in the DTLS handshake. "
+      "The value will be set to an GstDtlsSrtpAuth.",
+      0, GST_DTLS_SRTP_AUTH_HMAC_SHA1_80, DEFAULT_SRTP_AUTH,
+      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+
+  gst_element_class_set_static_metadata (element_class,
+      "DTLS Encoder",
+      "Encoder/Network/DTLS",
+      "Encodes packets with DTLS",
+      "Patrik Oldsberg patrik.oldsberg@ericsson.com");
+}
+
+static void
+gst_dtls_enc_init (GstDtlsEnc * self)
+{
+  self->connection_id = NULL;
+  self->connection = NULL;
+
+  self->is_client = DEFAULT_IS_CLIENT;
+
+  self->encoder_key = NULL;
+  self->srtp_cipher = DEFAULT_SRTP_CIPHER;
+  self->srtp_auth = DEFAULT_SRTP_AUTH;
+
+  g_queue_init (&self->queue);
+  g_mutex_init (&self->queue_lock);
+  g_cond_init (&self->queue_cond_add);
+
+  self->src = gst_pad_new_from_static_template (&src_template, "src");
+  g_return_if_fail (self->src);
+
+  gst_pad_set_activatemode_function (self->src,
+      GST_DEBUG_FUNCPTR (src_activate_mode));
+
+  gst_element_add_pad (GST_ELEMENT (self), self->src);
+}
+
+static void
+gst_dtls_enc_finalize (GObject * object)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (object);
+
+  if (self->encoder_key) {
+    gst_buffer_unref (self->encoder_key);
+    self->encoder_key = NULL;
+  }
+
+  if (self->connection_id) {
+    g_free (self->connection_id);
+    self->connection_id = NULL;
+  }
+
+  g_mutex_lock (&self->queue_lock);
+  g_queue_foreach (&self->queue, (GFunc) gst_buffer_unref, NULL);
+  g_queue_clear (&self->queue);
+  g_mutex_unlock (&self->queue_lock);
+
+  g_mutex_clear (&self->queue_lock);
+  g_cond_clear (&self->queue_cond_add);
+
+  GST_LOG_OBJECT (self, "finalized");
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_dtls_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (object);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      if (self->connection_id != NULL) {
+        g_free (self->connection_id);
+        self->connection_id = NULL;
+      }
+      self->connection_id = g_value_dup_string (value);
+      break;
+    case PROP_IS_CLIENT:
+      self->is_client = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_enc_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (object);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      g_value_set_string (value, self->connection_id);
+      break;
+    case PROP_IS_CLIENT:
+      g_value_set_boolean (value, self->is_client);
+      break;
+    case PROP_ENCODER_KEY:
+      g_value_set_boxed (value, self->encoder_key);
+      break;
+    case PROP_SRTP_CIPHER:
+      g_value_set_uint (value, self->srtp_cipher);
+      break;
+    case PROP_SRTP_AUTH:
+      g_value_set_uint (value, self->srtp_auth);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static GstStateChangeReturn
+gst_dtls_enc_change_state (GstElement * element, GstStateChange transition)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (self->connection_id) {
+        self->connection = gst_dtls_dec_fetch_connection (self->connection_id);
+
+        if (!self->connection) {
+          GST_WARNING_OBJECT (self,
+              "invalid connection id: '%s', connection not found or already in use",
+              self->connection_id);
+          return GST_STATE_CHANGE_FAILURE;
+        }
+
+        g_signal_connect_object (self->connection,
+            "on-encoder-key", G_CALLBACK (on_key_received), self, 0);
+
+        gst_dtls_connection_set_send_callback (self->connection,
+            g_cclosure_new (G_CALLBACK (on_send_data), self, NULL));
+      } else {
+        GST_WARNING_OBJECT (self,
+            "trying to change state to ready without connection id");
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      GST_DEBUG_OBJECT (self, "stopping connection %s", self->connection_id);
+
+      gst_dtls_connection_stop (self->connection);
+      break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      GST_DEBUG_OBJECT (self, "closing connection %s", self->connection_id);
+
+      if (self->connection) {
+        gst_dtls_connection_close (self->connection);
+        gst_dtls_connection_set_send_callback (self->connection, NULL);
+        g_object_unref (self->connection);
+        self->connection = NULL;
+      }
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      GST_DEBUG_OBJECT (self, "starting connection %s", self->connection_id);
+      gst_dtls_connection_start (self->connection, self->is_client);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static GstPad *
+gst_dtls_enc_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
+{
+  GstPad *sink;
+  gboolean ret;
+
+  GST_DEBUG_OBJECT (element, "sink pad requested");
+
+  g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
+
+  sink = gst_pad_new_from_template (templ, name);
+  g_return_val_if_fail (sink, NULL);
+
+  if (caps) {
+    g_object_set (sink, "caps", caps, NULL);
+  }
+
+  gst_pad_set_chain_function (sink, GST_DEBUG_FUNCPTR (sink_chain));
+
+  ret = gst_pad_set_active (sink, TRUE);
+  g_warn_if_fail (ret);
+
+  gst_element_add_pad (element, sink);
+
+  return sink;
+}
+
+static gboolean
+src_activate_mode (GstPad * pad, GstObject * parent, GstPadMode mode,
+    gboolean active)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (parent);
+  gboolean success = TRUE;
+  g_return_val_if_fail (mode == GST_PAD_MODE_PUSH, FALSE);
+
+  if (active) {
+    GST_DEBUG_OBJECT (self, "src pad activating in push mode");
+
+    self->flushing = FALSE;
+    self->send_initial_events = TRUE;
+    success =
+        gst_pad_start_task (pad, (GstTaskFunction) src_task_loop, self->src,
+        NULL);
+    if (!success) {
+      GST_WARNING_OBJECT (self, "failed to activate pad task");
+    }
+  } else {
+    GST_DEBUG_OBJECT (self, "deactivating src pad");
+
+    g_mutex_lock (&self->queue_lock);
+    g_queue_foreach (&self->queue, (GFunc) gst_buffer_unref, NULL);
+    g_queue_clear (&self->queue);
+    self->flushing = TRUE;
+    g_cond_signal (&self->queue_cond_add);
+    g_mutex_unlock (&self->queue_lock);
+    success = gst_pad_stop_task (pad);
+    if (!success) {
+      GST_WARNING_OBJECT (self, "failed to deactivate pad task");
+    }
+  }
+
+  return success;
+}
+
+static void
+src_task_loop (GstPad * pad)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (GST_PAD_PARENT (pad));
+  GstFlowReturn ret;
+  GstBuffer *buffer;
+  gboolean check_connection_timeout = FALSE;
+
+  GST_TRACE_OBJECT (self, "src loop: acquiring lock");
+  g_mutex_lock (&self->queue_lock);
+  GST_TRACE_OBJECT (self, "src loop: acquired lock");
+
+  if (self->flushing) {
+    GST_LOG_OBJECT (self, "src task loop entered on inactive pad");
+    GST_TRACE_OBJECT (self, "src loop: releasing lock");
+    g_mutex_unlock (&self->queue_lock);
+    return;
+  }
+
+  while (g_queue_is_empty (&self->queue)) {
+    GST_TRACE_OBJECT (self, "src loop: queue empty, waiting for add");
+    g_cond_wait (&self->queue_cond_add, &self->queue_lock);
+    GST_TRACE_OBJECT (self, "src loop: add signaled");
+
+    if (self->flushing) {
+      GST_LOG_OBJECT (self, "pad inactive, task returning");
+      GST_TRACE_OBJECT (self, "src loop: releasing lock");
+      g_mutex_unlock (&self->queue_lock);
+      return;
+    }
+  }
+  GST_TRACE_OBJECT (self, "src loop: queue has element");
+
+  buffer = g_queue_pop_head (&self->queue);
+  g_mutex_unlock (&self->queue_lock);
+
+  if (self->send_initial_events) {
+    GstSegment segment;
+    gchar s_id[32];
+    GstCaps *caps;
+
+    self->send_initial_events = FALSE;
+
+    g_snprintf (s_id, sizeof (s_id), "dtlsenc-%08x", g_random_int ());
+    gst_pad_push_event (self->src, gst_event_new_stream_start (s_id));
+    caps = gst_caps_new_empty_simple ("application/x-dtls");
+    gst_pad_push_event (self->src, gst_event_new_caps (caps));
+    gst_caps_unref (caps);
+    gst_segment_init (&segment, GST_FORMAT_BYTES);
+    gst_pad_push_event (self->src, gst_event_new_segment (&segment));
+    check_connection_timeout = TRUE;
+  }
+
+  GST_TRACE_OBJECT (self, "src loop: releasing lock");
+
+  ret = gst_pad_push (self->src, buffer);
+  if (check_connection_timeout)
+    gst_dtls_connection_check_timeout (self->connection);
+
+  if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+    GST_WARNING_OBJECT (self, "failed to push buffer on src pad: %s",
+        gst_flow_get_name (ret));
+  }
+}
+
+static GstFlowReturn
+sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstDtlsEnc *self = GST_DTLS_ENC (parent);
+  GstMapInfo map_info;
+  gint ret;
+
+  gst_buffer_map (buffer, &map_info, GST_MAP_READ);
+
+  if (map_info.size) {
+    ret =
+        gst_dtls_connection_send (self->connection, map_info.data,
+        map_info.size);
+    if (ret != map_info.size) {
+      GST_WARNING_OBJECT (self,
+          "error sending data: %d B were written, expected value was %zd B",
+          ret, map_info.size);
+    }
+  }
+
+  gst_buffer_unmap (buffer, &map_info);
+
+  gst_buffer_unref (buffer);
+
+  return GST_FLOW_OK;
+}
+
+static void
+on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher,
+    guint auth, GstDtlsEnc * self)
+{
+  gpointer key_dup;
+  gchar *key_str;
+
+  g_return_if_fail (GST_IS_DTLS_ENC (self));
+  g_return_if_fail (GST_IS_DTLS_CONNECTION (connection));
+
+  self->srtp_cipher = cipher;
+  self->srtp_auth = auth;
+
+  key_dup = g_memdup (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+
+  if (self->encoder_key) {
+    gst_buffer_unref (self->encoder_key);
+    self->encoder_key = NULL;
+  }
+
+  self->encoder_key =
+      gst_buffer_new_wrapped (key_dup, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+
+  key_str = g_base64_encode (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH);
+  GST_INFO_OBJECT (self, "received key: %s", key_str);
+  g_free (key_str);
+
+  g_signal_emit (self, signals[SIGNAL_ON_KEY_RECEIVED], 0);
+}
+
+static void
+on_send_data (GstDtlsConnection * connection, gconstpointer data, gint length,
+    GstDtlsEnc * self)
+{
+  GstBuffer *buffer;
+
+  GST_DEBUG_OBJECT (self, "sending data from %s with length %d",
+      self->connection_id, length);
+
+  buffer = gst_buffer_new_wrapped (g_memdup (data, length), length);
+
+  GST_TRACE_OBJECT (self, "send data: acquiring lock");
+  g_mutex_lock (&self->queue_lock);
+  GST_TRACE_OBJECT (self, "send data: acquired lock");
+
+  g_queue_push_tail (&self->queue, buffer);
+
+  GST_TRACE_OBJECT (self, "send data: signaling add");
+  g_cond_signal (&self->queue_cond_add);
+
+  GST_TRACE_OBJECT (self, "send data: releasing lock");
+  g_mutex_unlock (&self->queue_lock);
+}
diff --git a/ext/dtls/gstdtlsenc.h b/ext/dtls/gstdtlsenc.h
new file mode 100644
index 0000000..622936f
--- /dev/null
+++ b/ext/dtls/gstdtlsenc.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlsenc_h
+#define gstdtlsenc_h
+
+#include "gstdtlsagent.h"
+#include "gstdtlsconnection.h"
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_ENC (gst_dtls_enc_get_type())
+#define GST_DTLS_ENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_ENC, GstDtlsEnc))
+#define GST_DTLS_ENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_ENC, GstDtlsEncClass))
+#define GST_IS_DTLS_ENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_ENC))
+#define GST_IS_DTLS_ENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_ENC))
+
+typedef struct _GstDtlsEnc GstDtlsEnc;
+typedef struct _GstDtlsEncClass GstDtlsEncClass;
+
+struct _GstDtlsEnc {
+    GstElement element;
+
+    GstPad *src;
+
+    GQueue queue;
+    GMutex queue_lock;
+    GCond queue_cond_add;
+    gboolean flushing;
+
+    GstDtlsConnection *connection;
+    gchar *connection_id;
+
+    gboolean is_client;
+
+    GstBuffer *encoder_key;
+    guint srtp_cipher;
+    guint srtp_auth;
+
+    gboolean send_initial_events;
+};
+
+struct _GstDtlsEncClass {
+    GstElementClass parent_class;
+};
+
+GType gst_dtls_enc_get_type(void);
+
+gboolean gst_dtls_enc_plugin_init(GstPlugin *);
+
+G_END_DECLS
+
+#endif /* gstdtlsenc_h */
diff --git a/ext/dtls/gstdtlssrtpbin.c b/ext/dtls/gstdtlssrtpbin.c
new file mode 100644
index 0000000..a4104ff
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpbin.c
@@ -0,0 +1,242 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlssrtpbin.h"
+
+#define gst_dtls_srtp_bin_parent_class parent_class
+G_DEFINE_ABSTRACT_TYPE (GstDtlsSrtpBin, gst_dtls_srtp_bin, GST_TYPE_BIN);
+
+enum
+{
+  PROP_0,
+  PROP_CONNECTION_ID,
+  PROP_KEY,
+  PROP_SRTP_AUTH,
+  PROP_SRTP_CIPHER,
+  PROP_SRTCP_AUTH,
+  PROP_SRTCP_CIPHER,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_CONNECTION_ID NULL
+#define DEFAULT_KEY NULL
+#define DEFAULT_SRTP_AUTH NULL
+#define DEFAULT_SRTP_CIPHER NULL
+#define DEFAULT_SRTCP_AUTH NULL
+#define DEFAULT_SRTCP_CIPHER NULL
+
+static void gst_dtls_srtp_bin_finalize (GObject *);
+static void gst_dtls_srtp_bin_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_srtp_bin_get_property (GObject *, guint prop_id,
+    GValue *, GParamSpec *);
+
+static void
+gst_dtls_srtp_bin_class_init (GstDtlsSrtpBinClass * klass)
+{
+  GObjectClass *gobject_class;
+
+  gobject_class = (GObjectClass *) klass;
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_dtls_srtp_bin_finalize);
+  gobject_class->set_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_bin_set_property);
+  gobject_class->get_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_bin_get_property);
+
+  klass->remove_dtls_element = NULL;
+
+  properties[PROP_CONNECTION_ID] =
+      g_param_spec_string ("connection-id",
+      "Connection id",
+      "Every encoder/decoder pair should have the same, unique, connection-id",
+      DEFAULT_CONNECTION_ID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_KEY] =
+      g_param_spec_boxed ("key",
+      "Key",
+      "SRTP master key, if this property is set, DTLS will be disabled",
+      GST_TYPE_BUFFER,
+      G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_CIPHER] =
+      g_param_spec_string ("srtp-cipher",
+      "SRTP Cipher",
+      "SRTP cipher name, should be 'null' or 'aes-128-icm', "
+      "if this property is set, DTLS will be disabled",
+      DEFAULT_SRTP_CIPHER,
+      G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTCP_CIPHER] =
+      g_param_spec_string ("srtcp-cipher",
+      "SRTCP Cipher",
+      "SRTCP cipher name, should be 'null' or 'aes-128-icm', "
+      "if this property is set, DTLS will be disabled",
+      DEFAULT_SRTCP_CIPHER,
+      G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTP_AUTH] =
+      g_param_spec_string ("srtp-auth",
+      "SRTP Auth",
+      "SRTP auth name, should be 'null', 'hmac-sha1-32' or 'hmac-sha1-80', "
+      "if this property is set, DTLS will be disabled",
+      DEFAULT_SRTP_AUTH,
+      G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_SRTCP_AUTH] =
+      g_param_spec_string ("srtcp-auth",
+      "SRTCP Auth",
+      "SRTCP auth name, should be 'null', 'hmac-sha1-32' or 'hmac-sha1-80', "
+      "if this property is set, DTLS will be disabled",
+      DEFAULT_SRTCP_AUTH,
+      G_PARAM_READWRITE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+}
+
+static void
+gst_dtls_srtp_bin_init (GstDtlsSrtpBin * self)
+{
+  self->key = NULL;
+  self->key_is_set = FALSE;
+  self->srtp_auth = NULL;
+  self->srtp_cipher = NULL;
+  self->srtcp_auth = NULL;
+  self->srtcp_cipher = NULL;
+}
+
+static void
+gst_dtls_srtp_bin_finalize (GObject * object)
+{
+  GstDtlsSrtpBin *self = GST_DTLS_SRTP_BIN (object);
+
+  if (self->key) {
+    gst_buffer_unref (self->key);
+    self->key = NULL;
+  }
+  g_free (self->srtp_auth);
+  self->srtp_auth = NULL;
+  g_free (self->srtp_cipher);
+  self->srtp_cipher = NULL;
+  g_free (self->srtcp_auth);
+  self->srtcp_auth = NULL;
+  g_free (self->srtcp_cipher);
+  self->srtcp_cipher = NULL;
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_dtls_srtp_bin_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpBin *self = GST_DTLS_SRTP_BIN (object);
+  GstDtlsSrtpBinClass *klass = GST_DTLS_SRTP_BIN_GET_CLASS (self);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      if (self->dtls_element) {
+        g_object_set_property (G_OBJECT (self->dtls_element), "connection-id",
+            value);
+      } else {
+        g_warning ("tried to set connection-id after disabling DTLS");
+      }
+      break;
+    case PROP_KEY:
+      if (self->key) {
+        gst_buffer_unref (self->key);
+      }
+      self->key = g_value_dup_boxed (value);
+      self->key_is_set = TRUE;
+      klass->remove_dtls_element (self);
+      break;
+    case PROP_SRTP_AUTH:
+      g_free (self->srtp_auth);
+      self->srtp_auth = g_value_dup_string (value);
+      klass->remove_dtls_element (self);
+      break;
+    case PROP_SRTP_CIPHER:
+      g_free (self->srtp_cipher);
+      self->srtp_cipher = g_value_dup_string (value);
+      klass->remove_dtls_element (self);
+      break;
+    case PROP_SRTCP_AUTH:
+      g_free (self->srtcp_auth);
+      self->srtcp_auth = g_value_dup_string (value);
+      klass->remove_dtls_element (self);
+      break;
+    case PROP_SRTCP_CIPHER:
+      g_free (self->srtcp_cipher);
+      self->srtcp_cipher = g_value_dup_string (value);
+      klass->remove_dtls_element (self);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_srtp_bin_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpBin *self = GST_DTLS_SRTP_BIN (object);
+
+  switch (prop_id) {
+    case PROP_CONNECTION_ID:
+      if (self->dtls_element) {
+        g_object_get_property (G_OBJECT (self->dtls_element), "connection-id",
+            value);
+      } else {
+        g_warning ("tried to get connection-id after disabling DTLS");
+      }
+      break;
+    case PROP_KEY:
+      if (self->key) {
+        g_value_set_boxed (value, self->key);
+      }
+      break;
+    case PROP_SRTP_AUTH:
+      g_value_set_string (value, self->srtp_auth);
+      break;
+    case PROP_SRTP_CIPHER:
+      g_value_set_string (value, self->srtp_cipher);
+      break;
+    case PROP_SRTCP_AUTH:
+      g_value_set_string (value, self->srtcp_auth);
+      break;
+    case PROP_SRTCP_CIPHER:
+      g_value_set_string (value, self->srtcp_cipher);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
diff --git a/ext/dtls/gstdtlssrtpbin.h b/ext/dtls/gstdtlssrtpbin.h
new file mode 100644
index 0000000..2922241
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpbin.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlssrtpbin_h
+#define gstdtlssrtpbin_h
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_SRTP_BIN (gst_dtls_srtp_bin_get_type())
+#define GST_DTLS_SRTP_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_SRTP_BIN, GstDtlsSrtpBin))
+#define GST_DTLS_SRTP_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_SRTP_BIN, GstDtlsSrtpBinClass))
+#define GST_DTLS_SRTP_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_DTLS_SRTP_BIN, GstDtlsSrtpBinClass))
+#define GST_IS_DTLS_SRTP_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_SRTP_BIN))
+#define GST_IS_DTLS_SRTP_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_SRTP_BIN))
+
+typedef struct _GstDtlsSrtpBin GstDtlsSrtpBin;
+typedef struct _GstDtlsSrtpBinClass GstDtlsSrtpBinClass;
+
+struct _GstDtlsSrtpBin {
+    GstBin bin;
+
+    GstElement *dtls_element;
+
+    gboolean key_is_set;
+    GstBuffer *key;
+    gchar *srtp_cipher;
+    gchar *srtp_auth;
+    gchar *srtcp_cipher;
+    gchar *srtcp_auth;
+};
+
+struct _GstDtlsSrtpBinClass {
+    GstBinClass parent_class;
+
+    void (*remove_dtls_element)(GstDtlsSrtpBin *);
+};
+
+GType gst_dtls_srtp_bin_get_type(void);
+
+G_END_DECLS
+
+#endif /* gstdtlssrtpbin_h */
diff --git a/ext/dtls/gstdtlssrtpdec.c b/ext/dtls/gstdtlssrtpdec.c
new file mode 100644
index 0000000..5e29a0f
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpdec.c
@@ -0,0 +1,467 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlssrtpdec.h"
+
+#include "gstdtlsconnection.h"
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate rtp_src_template =
+GST_STATIC_PAD_TEMPLATE ("rtp_src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+static GstStaticPadTemplate rtcp_src_template =
+GST_STATIC_PAD_TEMPLATE ("rtcp_src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtcp")
+    );
+
+static GstStaticPadTemplate data_src_template =
+GST_STATIC_PAD_TEMPLATE ("data_src",
+    GST_PAD_SRC,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS_ANY);
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_srtp_dec_debug);
+#define GST_CAT_DEFAULT gst_dtls_srtp_dec_debug
+
+#define gst_dtls_srtp_dec_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDtlsSrtpDec, gst_dtls_srtp_dec,
+    GST_TYPE_DTLS_SRTP_BIN, GST_DEBUG_CATEGORY_INIT (gst_dtls_srtp_dec_debug,
+        "dtlssrtpdec", 0, "DTLS Decoder"));
+
+enum
+{
+  PROP_0,
+  PROP_PEM,
+  PROP_PEER_PEM,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_PEM NULL
+#define DEFAULT_PEER_PEM NULL
+
+static void gst_dtls_srtp_dec_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_srtp_dec_get_property (GObject *, guint prop_id,
+    GValue *, GParamSpec *);
+
+static GstPad *gst_dtls_srtp_dec_request_new_pad (GstElement *,
+    GstPadTemplate *, const gchar * name, const GstCaps *);
+static void gst_dtls_srtp_dec_release_pad (GstElement *, GstPad *);
+
+static GstCaps *on_decoder_request_key (GstElement * srtp_decoder, guint ssrc,
+    GstDtlsSrtpBin *);
+static void on_peer_pem (GstElement * srtp_decoder, GParamSpec * pspec,
+    GstDtlsSrtpDec * self);
+
+static void gst_dtls_srtp_dec_remove_dtls_element (GstDtlsSrtpBin *);
+static GstPadProbeReturn remove_dtls_decoder_probe_callback (GstPad *,
+    GstPadProbeInfo *, GstElement *);
+
+static void
+gst_dtls_srtp_dec_class_init (GstDtlsSrtpDecClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+  GstDtlsSrtpBinClass *dtls_srtp_bin_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = (GstElementClass *) klass;
+  dtls_srtp_bin_class = (GstDtlsSrtpBinClass *) klass;
+
+  gobject_class->set_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_dec_set_property);
+  gobject_class->get_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_dec_get_property);
+
+  element_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_dec_request_new_pad);
+  element_class->release_pad =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_dec_release_pad);
+
+  dtls_srtp_bin_class->remove_dtls_element =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_dec_remove_dtls_element);
+
+  properties[PROP_PEM] =
+      g_param_spec_string ("pem",
+      "PEM string",
+      "A string containing a X509 certificate and RSA private key in PEM format",
+      DEFAULT_PEM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  properties[PROP_PEER_PEM] =
+      g_param_spec_string ("peer-pem",
+      "Peer PEM string",
+      "The X509 certificate received in the DTLS handshake, in PEM format",
+      DEFAULT_PEER_PEM, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&rtp_src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&rtcp_src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&data_src_template));
+
+  gst_element_class_set_static_metadata (element_class,
+      "DTLS-SRTP Decoder",
+      "Decoder/Network/DTLS/SRTP",
+      "Decodes SRTP packets with a key received from DTLS",
+      "Patrik Oldsberg patrik.oldsberg@ericsson.com");
+}
+
+static void
+gst_dtls_srtp_dec_init (GstDtlsSrtpDec * self)
+{
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (GST_ELEMENT (self));
+  GstPadTemplate *templ;
+  GstPad *target_pad, *ghost_pad;
+  gboolean ret;
+
+/*
+                                 +-----------+
+            +--------------+  .-o|  dtlsdec  |o-R----data
+            |          dtls|o-'  +-----------+
+    sink---o|  dtlsdemux   |
+            |       srt(c)p|o-.  +-----------+
+            +--------------+  '-o|srtp    rtp|o------rtp
+                                 |  srtpdec  |
+                                o|srtcp  rtcp|o------rtcp
+                                 +-----------+
+*/
+
+  self->srtp_dec = gst_element_factory_make ("srtpdec", "srtp-decoder");
+  if (!self->srtp_dec) {
+    GST_ERROR_OBJECT (self,
+        "failed to create srtp_dec, is the srtp plugin registered?");
+    return;
+  }
+  self->dtls_srtp_demux =
+      gst_element_factory_make ("dtlssrtpdemux", "dtls-srtp-demux");
+  if (!self->dtls_srtp_demux) {
+    GST_ERROR_OBJECT (self, "failed to create dtls_srtp_demux");
+    return;
+  }
+  self->bin.dtls_element = gst_element_factory_make ("dtlsdec", "dtls-decoder");
+  if (!self->bin.dtls_element) {
+    GST_ERROR_OBJECT (self, "failed to create dtls_dec");
+    return;
+  }
+
+  gst_bin_add_many (GST_BIN (self),
+      self->dtls_srtp_demux, self->bin.dtls_element, self->srtp_dec, NULL);
+
+  ret =
+      gst_element_link_pads (self->dtls_srtp_demux, "dtls_src",
+      self->bin.dtls_element, NULL);
+  g_return_if_fail (ret);
+  ret =
+      gst_element_link_pads (self->dtls_srtp_demux, "rtp_src", self->srtp_dec,
+      "rtp_sink");
+  g_return_if_fail (ret);
+
+  templ = gst_element_class_get_pad_template (klass, "rtp_src");
+  target_pad = gst_element_get_static_pad (self->srtp_dec, "rtp_src");
+  ghost_pad = gst_ghost_pad_new_from_template ("rtp_src", target_pad, templ);
+  gst_object_unref (target_pad);
+  g_return_if_fail (ghost_pad);
+
+  ret = gst_element_add_pad (GST_ELEMENT (self), ghost_pad);
+  g_return_if_fail (ret);
+
+  templ = gst_element_class_get_pad_template (klass, "rtcp_src");
+  target_pad = gst_element_get_static_pad (self->srtp_dec, "rtcp_src");
+  ghost_pad = gst_ghost_pad_new_from_template ("rtcp_src", target_pad, templ);
+  gst_object_unref (target_pad);
+  g_return_if_fail (ghost_pad);
+
+  ret = gst_element_add_pad (GST_ELEMENT (self), ghost_pad);
+  g_return_if_fail (ret);
+
+  templ = gst_element_class_get_pad_template (klass, "sink");
+  target_pad = gst_element_get_static_pad (self->dtls_srtp_demux, "sink");
+  ghost_pad = gst_ghost_pad_new_from_template ("sink", target_pad, templ);
+  gst_object_unref (target_pad);
+  g_return_if_fail (ghost_pad);
+
+  ret = gst_element_add_pad (GST_ELEMENT (self), ghost_pad);
+  g_return_if_fail (ret);
+
+  g_signal_connect (self->srtp_dec, "request-key",
+      G_CALLBACK (on_decoder_request_key), self);
+  g_signal_connect (self->bin.dtls_element, "notify::peer-pem",
+      G_CALLBACK (on_peer_pem), self);
+}
+
+static void
+gst_dtls_srtp_dec_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpDec *self = GST_DTLS_SRTP_DEC (object);
+
+  switch (prop_id) {
+    case PROP_PEM:
+      if (self->bin.dtls_element) {
+        g_object_set_property (G_OBJECT (self->bin.dtls_element), "pem", value);
+      } else {
+        GST_WARNING_OBJECT (self, "tried to set pem after disabling DTLS");
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_srtp_dec_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpDec *self = GST_DTLS_SRTP_DEC (object);
+
+  switch (prop_id) {
+    case PROP_PEM:
+      if (self->bin.dtls_element) {
+        g_object_get_property (G_OBJECT (self->bin.dtls_element), "pem", value);
+      } else {
+        GST_WARNING_OBJECT (self, "tried to get pem after disabling DTLS");
+      }
+      break;
+    case PROP_PEER_PEM:
+      if (self->bin.dtls_element) {
+        g_object_get_property (G_OBJECT (self->bin.dtls_element), "peer-pem",
+            value);
+      } else {
+        GST_WARNING_OBJECT (self, "tried to get peer-pem after disabling DTLS");
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static GstPad *
+gst_dtls_srtp_dec_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
+{
+  GstDtlsSrtpDec *self = GST_DTLS_SRTP_DEC (element);
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
+  GstPad *ghost_pad = NULL;
+  gboolean ret;
+
+  GST_DEBUG_OBJECT (element, "pad requested");
+
+  g_return_val_if_fail (self->bin.dtls_element, NULL);
+  g_return_val_if_fail (!self->bin.key_is_set, NULL);
+
+  if (templ == gst_element_class_get_pad_template (klass, "data_src")) {
+    GstPad *target_pad;
+
+    target_pad = gst_element_get_request_pad (self->bin.dtls_element, "src");
+
+    ghost_pad = gst_ghost_pad_new_from_template (name, target_pad, templ);
+    gst_object_unref (target_pad);
+    g_return_val_if_fail (ghost_pad, NULL);
+
+    ret = gst_pad_set_active (ghost_pad, TRUE);
+    g_return_val_if_fail (ret, NULL);
+    ret = gst_element_add_pad (element, ghost_pad);
+    g_return_val_if_fail (ret, NULL);
+
+    GST_LOG_OBJECT (self, "added data src pad");
+
+    if (caps) {
+      g_object_set (ghost_pad, "caps", caps, NULL);
+    }
+
+    return ghost_pad;
+  }
+
+  g_return_val_if_reached (NULL);
+}
+
+static void
+gst_dtls_srtp_dec_release_pad (GstElement * element, GstPad * pad)
+{
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
+  GstDtlsSrtpDec *self = GST_DTLS_SRTP_DEC (element);
+
+  if (GST_PAD_PAD_TEMPLATE (pad) ==
+      gst_element_class_get_pad_template (klass, "data_src")) {
+    GstGhostPad *ghost_pad;
+    GstPad *target_pad;
+
+    ghost_pad = GST_GHOST_PAD (pad);
+    target_pad = gst_ghost_pad_get_target (ghost_pad);
+
+    if (target_pad != NULL) {
+      gst_element_release_request_pad (self->bin.dtls_element, target_pad);
+
+      gst_object_unref (target_pad);
+      gst_ghost_pad_set_target (GST_GHOST_PAD (pad), NULL);
+    }
+  }
+
+  gst_element_remove_pad (element, pad);
+}
+
+static GstCaps *
+on_decoder_request_key (GstElement * srtp_decoder,
+    guint ssrc, GstDtlsSrtpBin * bin)
+{
+  GstCaps *key_caps;
+  GstBuffer *key_buffer = NULL;
+  guint cipher;
+  guint auth;
+
+  if (bin->key_is_set) {
+    if (bin->key) {
+      if (bin->srtp_cipher && bin->srtp_auth && bin->srtcp_cipher
+          && bin->srtcp_auth) {
+        GST_DEBUG_OBJECT (bin, "setting srtp key");
+        return gst_caps_new_simple ("application/x-srtp",
+            "srtp-key", GST_TYPE_BUFFER, gst_buffer_copy (bin->key),
+            "srtp-auth", G_TYPE_STRING, bin->srtp_auth,
+            "srtcp-auth", G_TYPE_STRING, bin->srtcp_auth,
+            "srtp-cipher", G_TYPE_STRING, bin->srtp_cipher,
+            "srtcp-cipher", G_TYPE_STRING, bin->srtcp_cipher, NULL);
+      } else {
+        GST_WARNING_OBJECT (bin,
+            "srtp key is set but not all ciphers and auths");
+        return NULL;
+      }
+    }
+
+    GST_DEBUG_OBJECT (bin, "setting srtp key to null");
+    return gst_caps_new_simple ("application/x-srtp",
+        "srtp-key", GST_TYPE_BUFFER, NULL,
+        "srtp-auth", G_TYPE_STRING, "null",
+        "srtcp-auth", G_TYPE_STRING, "null",
+        "srtp-cipher", G_TYPE_STRING, "null",
+        "srtcp-cipher", G_TYPE_STRING, "null", NULL);
+  }
+
+  if (bin->dtls_element) {
+    g_object_get (bin->dtls_element, "decoder-key", &key_buffer, NULL);
+  }
+
+  if (key_buffer) {
+    g_object_get (bin->dtls_element,
+        "srtp-cipher", &cipher, "srtp-auth", &auth, NULL);
+
+    g_return_val_if_fail (cipher == GST_DTLS_SRTP_CIPHER_AES_128_ICM, NULL);
+
+    key_caps = gst_caps_new_simple ("application/x-srtp",
+        "srtp-key", GST_TYPE_BUFFER, key_buffer,
+        "srtp-cipher", G_TYPE_STRING, "aes-128-icm",
+        "srtcp-cipher", G_TYPE_STRING, "aes-128-icm", NULL);
+
+    switch (auth) {
+      case GST_DTLS_SRTP_AUTH_HMAC_SHA1_32:
+        gst_caps_set_simple (key_caps,
+            "srtp-auth", G_TYPE_STRING, "hmac-sha1-32",
+            "srtcp-auth", G_TYPE_STRING, "hmac-sha1-32", NULL);
+        break;
+      case GST_DTLS_SRTP_AUTH_HMAC_SHA1_80:
+        gst_caps_set_simple (key_caps,
+            "srtp-auth", G_TYPE_STRING, "hmac-sha1-80",
+            "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80", NULL);
+        break;
+      default:
+        g_return_val_if_reached (NULL);
+        break;
+    }
+
+    gst_buffer_unref (key_buffer);
+
+    return key_caps;
+  } else {
+    GST_WARNING_OBJECT (bin, "no srtp key available yet");
+  }
+
+  return NULL;
+}
+
+static void
+on_peer_pem (GstElement * srtp_decoder, GParamSpec * pspec,
+    GstDtlsSrtpDec * self)
+{
+  g_return_if_fail (self);
+  g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PEER_PEM]);
+}
+
+static void
+gst_dtls_srtp_dec_remove_dtls_element (GstDtlsSrtpBin * bin)
+{
+  GstDtlsSrtpDec *self = GST_DTLS_SRTP_DEC (bin);
+  GstPad *demux_pad;
+  gulong id;
+
+  if (!bin->dtls_element) {
+    return;
+  }
+
+  demux_pad = gst_element_get_static_pad (self->dtls_srtp_demux, "dtls_src");
+
+  id = gst_pad_add_probe (demux_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
+      (GstPadProbeCallback) remove_dtls_decoder_probe_callback,
+      bin->dtls_element, NULL);
+  g_return_if_fail (id);
+  bin->dtls_element = NULL;
+
+  gst_pad_push_event (demux_pad,
+      gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
+          gst_structure_new_empty ("dummy")));
+
+  gst_object_unref (demux_pad);
+}
+
+static GstPadProbeReturn
+remove_dtls_decoder_probe_callback (GstPad * pad,
+    GstPadProbeInfo * info, GstElement * element)
+{
+  gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info));
+
+  gst_element_set_state (GST_ELEMENT (element), GST_STATE_NULL);
+  gst_bin_remove (GST_BIN (GST_ELEMENT_PARENT (element)), element);
+
+  return GST_PAD_PROBE_OK;
+}
diff --git a/ext/dtls/gstdtlssrtpdec.h b/ext/dtls/gstdtlssrtpdec.h
new file mode 100644
index 0000000..3d64c15
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpdec.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlssrtpdec_h
+#define gstdtlssrtpdec_h
+
+#include "gstdtlssrtpbin.h"
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_SRTP_DEC (gst_dtls_srtp_dec_get_type())
+#define GST_DTLS_SRTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_SRTP_DEC, GstDtlsSrtpDec))
+#define GST_DTLS_SRTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_SRTP_DEC, GstDtlsSrtpDecClass))
+#define GST_IS_DTLS_SRTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_SRTP_DEC))
+#define GST_IS_DTLS_SRTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_SRTP_DEC))
+
+typedef struct _GstDtlsSrtpDec GstDtlsSrtpDec;
+typedef struct _GstDtlsSrtpDecClass GstDtlsSrtpDecClass;
+
+struct _GstDtlsSrtpDec {
+    GstDtlsSrtpBin bin;
+
+    GstElement *dtls_srtp_demux;
+    GstElement *srtp_dec;
+};
+
+struct _GstDtlsSrtpDecClass {
+    GstDtlsSrtpBinClass parent_class;
+};
+
+GType gst_dtls_srtp_dec_get_type(void);
+
+gboolean gst_dtls_srtp_dec_plugin_init(GstPlugin *);
+
+G_END_DECLS
+
+#endif /* gstdtlssrtpdec_h */
diff --git a/ext/dtls/gstdtlssrtpdemux.c b/ext/dtls/gstdtlssrtpdemux.c
new file mode 100644
index 0000000..f52d5fb
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpdemux.c
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlssrtpdemux.h"
+
+#define PACKET_IS_DTLS(b) (b > 0x13 && b < 0x40)
+#define PACKET_IS_RTP(b) (b > 0x7f && b < 0xc0)
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate rtp_src_template =
+    GST_STATIC_PAD_TEMPLATE ("rtp_src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp;"
+        "application/x-rtcp;" "application/x-srtp;" "application/x-srtcp")
+    );
+
+static GstStaticPadTemplate dtls_src_template =
+GST_STATIC_PAD_TEMPLATE ("dtls_src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-dtls")
+    );
+
+GST_DEBUG_CATEGORY_STATIC (gst_gst_dtls_srtp_demux_debug);
+#define GST_CAT_DEFAULT gst_gst_dtls_srtp_demux_debug
+
+#define gst_dtls_srtp_demux_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDtlsSrtpDemux, gst_dtls_srtp_demux,
+    GST_TYPE_ELEMENT, GST_DEBUG_CATEGORY_INIT (gst_gst_dtls_srtp_demux_debug,
+        "dtlssrtpdemux", 0, "DTLS SRTP Demultiplexer"));
+
+static GstFlowReturn sink_chain (GstPad *, GstObject * self, GstBuffer *);
+
+static void
+gst_dtls_srtp_demux_class_init (GstDtlsSrtpDemuxClass * klass)
+{
+  GstElementClass *element_class;
+
+  element_class = (GstElementClass *) klass;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&rtp_src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&dtls_src_template));
+
+  gst_element_class_set_static_metadata (element_class,
+      "DTLS SRTP Demultiplexer",
+      "DTLS/SRTP/Demux",
+      "Demultiplexes DTLS and SRTP packets",
+      "Patrik Oldsberg patrik.oldsberg@ericsson.com");
+}
+
+static void
+gst_dtls_srtp_demux_init (GstDtlsSrtpDemux * self)
+{
+  GstPad *sink;
+
+  sink = gst_pad_new_from_static_template (&sink_template, "sink");
+  self->rtp_src =
+      gst_pad_new_from_static_template (&rtp_src_template, "rtp_src");
+  self->dtls_src =
+      gst_pad_new_from_static_template (&dtls_src_template, "dtls_src");
+  g_return_if_fail (sink);
+  g_return_if_fail (self->rtp_src);
+  g_return_if_fail (self->dtls_src);
+
+  gst_pad_set_chain_function (sink, GST_DEBUG_FUNCPTR (sink_chain));
+
+  gst_element_add_pad (GST_ELEMENT (self), sink);
+  gst_element_add_pad (GST_ELEMENT (self), self->rtp_src);
+  gst_element_add_pad (GST_ELEMENT (self), self->dtls_src);
+}
+
+static GstFlowReturn
+sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstDtlsSrtpDemux *self = GST_DTLS_SRTP_DEMUX (parent);
+  guint8 first_byte;
+
+  if (gst_buffer_get_size (buffer) == 0) {
+    GST_LOG_OBJECT (self, "received buffer with size 0");
+    gst_buffer_unref (buffer);
+    return GST_FLOW_OK;
+  }
+
+  if (gst_buffer_extract (buffer, 0, &first_byte, 1) != 1) {
+    GST_WARNING_OBJECT (self, "could not extract first byte from buffer");
+    gst_buffer_unref (buffer);
+    return GST_FLOW_OK;
+  }
+
+  if (PACKET_IS_DTLS (first_byte)) {
+    GST_LOG_OBJECT (self, "pushing dtls packet");
+
+    return gst_pad_push (self->dtls_src, buffer);
+  }
+
+  if (PACKET_IS_RTP (first_byte)) {
+    GST_LOG_OBJECT (self, "pushing rtp packet");
+
+    return gst_pad_push (self->rtp_src, buffer);
+  }
+
+  GST_WARNING_OBJECT (self, "received invalid buffer: %x", first_byte);
+  gst_buffer_unref (buffer);
+  return GST_FLOW_OK;
+}
diff --git a/ext/dtls/gstdtlssrtpdemux.h b/ext/dtls/gstdtlssrtpdemux.h
new file mode 100644
index 0000000..59f7fc3
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpdemux.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlssrtpdemux_h
+#define gstdtlssrtpdemux_h
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_SRTP_DEMUX \
+    (gst_dtls_srtp_demux_get_type())
+#define GST_DTLS_SRTP_DEMUX(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_SRTP_DEMUX, GstDtlsSrtpDemux))
+#define GST_DTLS_SRTP_DEMUX_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_SRTP_DEMUX, GstDtlsSrtpDemuxClass))
+#define GST_IS_DTLS_SRTP_DEMUX(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_SRTP_DEMUX))
+#define GST_IS_DTLS_SRTP_DEMUX_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_SRTP_DEMUX))
+
+typedef struct _GstDtlsSrtpDemux GstDtlsSrtpDemux;
+typedef struct _GstDtlsSrtpDemuxClass GstDtlsSrtpDemuxClass;
+
+struct _GstDtlsSrtpDemux {
+    GstElement element;
+
+    GstPad *rtp_src;
+    GstPad *dtls_src;
+};
+
+struct _GstDtlsSrtpDemuxClass {
+    GstElementClass parent_class;
+};
+
+GType gst_dtls_srtp_demux_get_type(void);
+
+gboolean gst_dtls_srtp_demux_plugin_init(GstPlugin *);
+
+G_END_DECLS
+
+#endif /* gstdtlssrtpdemux_h */
diff --git a/ext/dtls/gstdtlssrtpenc.c b/ext/dtls/gstdtlssrtpenc.c
new file mode 100644
index 0000000..941afac
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpenc.c
@@ -0,0 +1,469 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlssrtpenc.h"
+
+#include <stdio.h>
+
+static GstStaticPadTemplate rtp_sink_template =
+    GST_STATIC_PAD_TEMPLATE ("rtp_sink_%d",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS ("application/x-rtp;application/x-rtcp")
+    );
+
+static GstStaticPadTemplate rtcp_sink_template =
+    GST_STATIC_PAD_TEMPLATE ("rtcp_sink_%d",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS ("application/x-rtp;application/x-rtcp")
+    );
+
+static GstStaticPadTemplate data_sink_template =
+GST_STATIC_PAD_TEMPLATE ("data_sink",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+GST_DEBUG_CATEGORY_STATIC (gst_dtls_srtp_enc_debug);
+#define GST_CAT_DEFAULT gst_dtls_srtp_enc_debug
+
+#define gst_dtls_srtp_enc_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDtlsSrtpEnc, gst_dtls_srtp_enc,
+    GST_TYPE_DTLS_SRTP_BIN, GST_DEBUG_CATEGORY_INIT (gst_dtls_srtp_enc_debug,
+        "dtlssrtpenc", 0, "DTLS Decoder"));
+
+enum
+{
+  SIGNAL_ON_KEY_SET,
+  NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS];
+
+enum
+{
+  PROP_0,
+  PROP_IS_CLIENT,
+  NUM_PROPERTIES
+};
+
+static GParamSpec *properties[NUM_PROPERTIES];
+
+#define DEFAULT_IS_CLIENT FALSE
+
+static gboolean transform_enum (GBinding *, const GValue * source_value,
+    GValue * target_value, GEnumClass *);
+
+static void gst_dtls_srtp_enc_set_property (GObject *, guint prop_id,
+    const GValue *, GParamSpec *);
+static void gst_dtls_srtp_enc_get_property (GObject *, guint prop_id,
+    GValue *, GParamSpec *);
+
+static GstPad *add_ghost_pad (GstElement *, const gchar * name, GstPad *,
+    GstPadTemplate *);
+static GstPad *gst_dtls_srtp_enc_request_new_pad (GstElement *,
+    GstPadTemplate *, const gchar * name, const GstCaps *);
+
+static void on_key_received (GObject * encoder, GstDtlsSrtpEnc *);
+
+static void gst_dtls_srtp_enc_remove_dtls_element (GstDtlsSrtpBin *);
+static GstPadProbeReturn remove_dtls_encoder_probe_callback (GstPad *,
+    GstPadProbeInfo *, GstElement *);
+
+static void
+gst_dtls_srtp_enc_class_init (GstDtlsSrtpEncClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+  GstDtlsSrtpBinClass *dtls_srtp_bin_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = (GstElementClass *) klass;
+  dtls_srtp_bin_class = (GstDtlsSrtpBinClass *) klass;
+
+  gobject_class->set_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_enc_set_property);
+  gobject_class->get_property =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_enc_get_property);
+
+  element_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_enc_request_new_pad);
+
+  dtls_srtp_bin_class->remove_dtls_element =
+      GST_DEBUG_FUNCPTR (gst_dtls_srtp_enc_remove_dtls_element);
+
+  signals[SIGNAL_ON_KEY_SET] =
+      g_signal_new ("on-key-set", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+
+  properties[PROP_IS_CLIENT] =
+      g_param_spec_boolean ("is-client",
+      "Is client",
+      "Set to true if the decoder should act as "
+      "client and initiate the handshake",
+      DEFAULT_IS_CLIENT,
+      GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&rtp_sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&rtcp_sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&data_sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_template));
+
+  gst_element_class_set_static_metadata (element_class,
+      "DTLS-SRTP Encoder",
+      "Encoder/Network/DTLS/SRTP",
+      "Encodes SRTP packets with a key received from DTLS",
+      "Patrik Oldsberg patrik.oldsberg@ericsson.com");
+}
+
+static void
+gst_dtls_srtp_enc_init (GstDtlsSrtpEnc * self)
+{
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (GST_ELEMENT (self));
+  static GEnumClass *cipher_enum_class, *auth_enum_class;
+  gboolean ret;
+
+/*
+                 +--------------------+     +-----------------+
+     rtp_sink-R-o|rtp_sink     rtp_src|o-R-o|                 |
+                 |       srtpenc      |     |                 |
+    rtcp_sink-R-o|srtcp_sink  rtcp_src|o-R-o|                 |
+                 +--------------------+     |     funnel      |o---src
+                                            |                 |
+                 +--------------------+     |                 |
+    data_sink-R-o|       dtlsenc      |o---o|                 |
+                 +--------------------+     +-----------------+
+*/
+
+  self->srtp_enc = gst_element_factory_make ("srtpenc", "srtp-encoder");
+  if (!self->srtp_enc) {
+    GST_ERROR_OBJECT (self,
+        "failed to create srtp encoder, is the srtp plugin registered?");
+    return;
+  }
+  g_return_if_fail (self->srtp_enc);
+  self->bin.dtls_element = gst_element_factory_make ("dtlsenc", "dtls-encoder");
+  if (!self->bin.dtls_element) {
+    GST_ERROR_OBJECT (self, "failed to create dtls encoder");
+    return;
+  }
+  self->funnel = gst_element_factory_make ("funnel", "funnel");
+  if (!self->funnel) {
+    GST_ERROR_OBJECT (self, "failed to create funnel");
+    return;
+  }
+
+  gst_bin_add_many (GST_BIN (self), self->bin.dtls_element, self->srtp_enc,
+      self->funnel, NULL);
+
+  ret = gst_element_link (self->bin.dtls_element, self->funnel);
+  g_return_if_fail (ret);
+
+  add_ghost_pad (GST_ELEMENT (self), "src",
+      gst_element_get_static_pad (self->funnel, "src"),
+      gst_element_class_get_pad_template (klass, "src"));
+
+  g_signal_connect (self->bin.dtls_element, "on-key-received",
+      G_CALLBACK (on_key_received), self);
+
+  if (g_once_init_enter (&cipher_enum_class)) {
+    GType type = g_type_from_name ("GstSrtpCipherType");
+    g_assert (type);
+    g_once_init_leave (&cipher_enum_class, g_type_class_peek (type));
+  }
+  if (g_once_init_enter (&auth_enum_class)) {
+    GType type = g_type_from_name ("GstSrtpAuthType");
+    g_assert (type);
+    g_once_init_leave (&auth_enum_class, g_type_class_peek (type));
+  }
+
+  g_object_set (self->srtp_enc, "random-key", TRUE, NULL);
+
+  g_object_bind_property (G_OBJECT (self), "key", self->srtp_enc, "key",
+      G_BINDING_DEFAULT);
+  g_object_bind_property_full (G_OBJECT (self), "srtp-cipher", self->srtp_enc,
+      "rtp-cipher", G_BINDING_DEFAULT, (GBindingTransformFunc) transform_enum,
+      NULL, cipher_enum_class, NULL);
+  g_object_bind_property_full (G_OBJECT (self), "srtcp-cipher", self->srtp_enc,
+      "rtcp-cipher", G_BINDING_DEFAULT, (GBindingTransformFunc) transform_enum,
+      NULL, cipher_enum_class, NULL);
+  g_object_bind_property_full (G_OBJECT (self), "srtp-auth", self->srtp_enc,
+      "rtp-auth", G_BINDING_DEFAULT, (GBindingTransformFunc) transform_enum,
+      NULL, auth_enum_class, NULL);
+  g_object_bind_property_full (G_OBJECT (self), "srtcp-auth", self->srtp_enc,
+      "rtcp-auth", G_BINDING_DEFAULT, (GBindingTransformFunc) transform_enum,
+      NULL, auth_enum_class, NULL);
+}
+
+static gboolean
+transform_enum (GBinding * binding, const GValue * source_value,
+    GValue * target_value, GEnumClass * enum_class)
+{
+  GEnumValue *enum_value;
+  const gchar *nick;
+
+  nick = g_value_get_string (source_value);
+  g_return_val_if_fail (nick, FALSE);
+
+  enum_value = g_enum_get_value_by_nick (enum_class, nick);
+  g_return_val_if_fail (enum_value, FALSE);
+
+  GST_DEBUG_OBJECT (g_binding_get_source (binding),
+      "transforming enum from %s to %d", nick, enum_value->value);
+
+  g_value_set_enum (target_value, enum_value->value);
+
+  return TRUE;
+}
+
+static void
+gst_dtls_srtp_enc_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpEnc *self = GST_DTLS_SRTP_ENC (object);
+
+  switch (prop_id) {
+    case PROP_IS_CLIENT:
+      if (self->bin.dtls_element) {
+        g_object_set_property (G_OBJECT (self->bin.dtls_element), "is-client",
+            value);
+      } else {
+        GST_WARNING_OBJECT (self,
+            "tried to set is-client after disabling DTLS");
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static void
+gst_dtls_srtp_enc_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstDtlsSrtpEnc *self = GST_DTLS_SRTP_ENC (object);
+
+  switch (prop_id) {
+    case PROP_IS_CLIENT:
+      if (self->bin.dtls_element) {
+        g_object_get_property (G_OBJECT (self->bin.dtls_element), "is-client",
+            value);
+      } else {
+        GST_WARNING_OBJECT (self,
+            "tried to get is-client after disabling DTLS");
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+  }
+}
+
+static GstPad *
+add_ghost_pad (GstElement * element,
+    const gchar * name, GstPad * target, GstPadTemplate * templ)
+{
+  GstPad *pad;
+  gboolean ret;
+
+  pad = gst_ghost_pad_new_from_template (name, target, templ);
+  gst_object_unref (target);
+  target = NULL;
+
+  ret = gst_pad_set_active (pad, TRUE);
+  g_warn_if_fail (ret);
+
+  ret = gst_element_add_pad (element, pad);
+  g_warn_if_fail (ret);
+
+  return pad;
+}
+
+static GstPad *
+gst_dtls_srtp_enc_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
+{
+  GstDtlsSrtpEnc *self = GST_DTLS_SRTP_ENC (element);
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
+  GstPad *target_pad;
+  GstPad *ghost_pad = NULL;
+  guint pad_n;
+  gchar *srtp_src_name;
+
+  GST_DEBUG_OBJECT (element, "pad requested");
+
+  g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
+  g_return_val_if_fail (self->srtp_enc, NULL);
+
+  if (templ == gst_element_class_get_pad_template (klass, "rtp_sink_%d")) {
+    target_pad = gst_element_get_request_pad (self->srtp_enc, name);
+    g_return_val_if_fail (target_pad, NULL);
+
+    sscanf (GST_PAD_NAME (target_pad), "rtp_sink_%d", &pad_n);
+    srtp_src_name = g_strdup_printf ("rtp_src_%d", pad_n);
+
+    gst_element_link_pads (self->srtp_enc, srtp_src_name, self->funnel, NULL);
+
+    g_free (srtp_src_name);
+
+    ghost_pad = add_ghost_pad (element, name, target_pad, templ);
+
+    GST_LOG_OBJECT (self, "added rtp sink pad");
+  } else if (templ == gst_element_class_get_pad_template (klass,
+          "rtcp_sink_%d")) {
+    target_pad = gst_element_get_request_pad (self->srtp_enc, name);
+    g_return_val_if_fail (target_pad, NULL);
+
+    sscanf (GST_PAD_NAME (target_pad), "rtcp_sink_%d", &pad_n);
+    srtp_src_name = g_strdup_printf ("rtcp_src_%d", pad_n);
+
+    gst_element_link_pads (self->srtp_enc, srtp_src_name, self->funnel, NULL);
+
+    g_free (srtp_src_name);
+
+    ghost_pad = add_ghost_pad (element, name, target_pad, templ);
+
+    GST_LOG_OBJECT (self, "added rtcp sink pad");
+  } else if (templ == gst_element_class_get_pad_template (klass, "data_sink")) {
+    g_return_val_if_fail (self->bin.dtls_element, NULL);
+    target_pad = gst_element_get_request_pad (self->bin.dtls_element, "sink");
+
+    ghost_pad = add_ghost_pad (element, name, target_pad, templ);
+
+    GST_LOG_OBJECT (self, "added data sink pad");
+  } else {
+    g_warn_if_reached ();
+  }
+
+  if (caps && ghost_pad) {
+    g_object_set (ghost_pad, "caps", caps, NULL);
+  }
+
+  return ghost_pad;
+}
+
+static void
+on_key_received (GObject * encoder, GstDtlsSrtpEnc * self)
+{
+  GstDtlsSrtpBin *bin = GST_DTLS_SRTP_BIN (self);
+  GstBuffer *buffer = NULL;
+  guint cipher, auth;
+
+  if (!(bin->key_is_set || bin->srtp_cipher || bin->srtp_auth
+          || bin->srtcp_cipher || bin->srtcp_auth)) {
+    g_object_get (encoder,
+        "encoder-key", &buffer,
+        "srtp-cipher", &cipher, "srtp-auth", &auth, NULL);
+
+    g_object_set (self->srtp_enc,
+        "rtp-cipher", cipher,
+        "rtcp-cipher", cipher,
+        "rtp-auth", auth,
+        "rtcp-auth", auth, "key", buffer, "random-key", FALSE, NULL);
+
+    gst_buffer_unref (buffer);
+
+    g_signal_emit (self, signals[SIGNAL_ON_KEY_SET], 0);
+  } else {
+    GST_DEBUG_OBJECT (self,
+        "ignoring keys received from DTLS handshake, key struct is set");
+  }
+}
+
+static void
+gst_dtls_srtp_enc_remove_dtls_element (GstDtlsSrtpBin * bin)
+{
+  GstDtlsSrtpEnc *self = GST_DTLS_SRTP_ENC (bin);
+  GstPad *dtls_sink_pad, *peer_pad;
+  gulong id;
+  guint rtp_cipher = 1, rtcp_cipher = 1, rtp_auth = 1, rtcp_auth = 1;
+
+  if (!bin->dtls_element) {
+    return;
+  }
+
+  g_object_get (self->srtp_enc,
+      "rtp-cipher", &rtp_cipher,
+      "rtcp-cipher", &rtcp_cipher,
+      "rtp-auth", &rtp_auth, "rtcp-auth", &rtcp_auth, NULL);
+
+  if (!rtp_cipher && !rtcp_cipher && !rtp_auth && !rtcp_auth) {
+    g_object_set (self->srtp_enc, "random-key", FALSE, NULL);
+  }
+
+  dtls_sink_pad = gst_element_get_static_pad (bin->dtls_element, "sink");
+
+  if (!dtls_sink_pad) {
+    gst_element_set_state (GST_ELEMENT (bin->dtls_element), GST_STATE_NULL);
+    gst_bin_remove (GST_BIN (self), bin->dtls_element);
+    bin->dtls_element = NULL;
+    return;
+  }
+
+  peer_pad = gst_pad_get_peer (dtls_sink_pad);
+  g_return_if_fail (peer_pad);
+  gst_object_unref (dtls_sink_pad);
+  dtls_sink_pad = NULL;
+
+  id = gst_pad_add_probe (peer_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
+      (GstPadProbeCallback) remove_dtls_encoder_probe_callback,
+      bin->dtls_element, NULL);
+  g_return_if_fail (id);
+  bin->dtls_element = NULL;
+
+  gst_pad_push_event (peer_pad,
+      gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
+          gst_structure_new_empty ("dummy")));
+
+  gst_object_unref (peer_pad);
+}
+
+static GstPadProbeReturn
+remove_dtls_encoder_probe_callback (GstPad * pad,
+    GstPadProbeInfo * info, GstElement * element)
+{
+  gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info));
+
+  gst_element_set_state (GST_ELEMENT (element), GST_STATE_NULL);
+  gst_bin_remove (GST_BIN (GST_ELEMENT_PARENT (element)), element);
+
+  return GST_PAD_PROBE_OK;
+}
diff --git a/ext/dtls/gstdtlssrtpenc.h b/ext/dtls/gstdtlssrtpenc.h
new file mode 100644
index 0000000..5dd603d
--- /dev/null
+++ b/ext/dtls/gstdtlssrtpenc.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifndef gstdtlssrtpenc_h
+#define gstdtlssrtpenc_h
+
+#include "gstdtlssrtpbin.h"
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DTLS_SRTP_ENC (gst_dtls_srtp_enc_get_type())
+#define GST_DTLS_SRTP_ENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DTLS_SRTP_ENC, GstDtlsSrtpEnc))
+#define GST_DTLS_SRTP_ENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DTLS_SRTP_ENC, GstDtlsSrtpEncClass))
+#define GST_IS_DTLS_SRTP_ENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DTLS_SRTP_ENC))
+#define GST_IS_DTLS_SRTP_ENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DTLS_SRTP_ENC))
+
+typedef struct _GstDtlsSrtpEnc GstDtlsSrtpEnc;
+typedef struct _GstDtlsSrtpEncClass GstDtlsSrtpEncClass;
+
+struct _GstDtlsSrtpEnc {
+    GstDtlsSrtpBin bin;
+
+    GstElement *srtp_enc;
+    GstElement *funnel;
+};
+
+struct _GstDtlsSrtpEncClass {
+    GstDtlsSrtpBinClass parent_class;
+};
+
+GType gst_dtls_srtp_enc_get_type(void);
+
+gboolean gst_dtls_srtp_enc_plugin_init(GstPlugin *);
+
+guint gst_dtls_srtp_enc_get_cipher_value_by_nick(const gchar *cipher_nick);
+guint gst_dtls_srtp_enc_get_auth_value_by_nick(const gchar *auth_nick);
+
+G_END_DECLS
+
+#endif /* gstdtlssrtpenc_h */
diff --git a/ext/dtls/plugin.c b/ext/dtls/plugin.c
new file mode 100644
index 0000000..e531eff
--- /dev/null
+++ b/ext/dtls/plugin.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdtlsdec.h"
+#include "gstdtlsenc.h"
+#include "gstdtlssrtpenc.h"
+#include "gstdtlssrtpdec.h"
+#include "gstdtlssrtpdemux.h"
+
+#include <gst/gst.h>
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  return gst_element_register (plugin, "dtlsenc", GST_RANK_NONE,
+      GST_TYPE_DTLS_ENC)
+      && gst_element_register (plugin, "dtlsdec", GST_RANK_NONE,
+      GST_TYPE_DTLS_DEC)
+      && gst_element_register (plugin, "dtlssrtpdec", GST_RANK_NONE,
+      GST_TYPE_DTLS_SRTP_DEC)
+      && gst_element_register (plugin, "dtlssrtpenc", GST_RANK_NONE,
+      GST_TYPE_DTLS_SRTP_ENC)
+      && gst_element_register (plugin, "dtlssrtpdemux", GST_RANK_NONE,
+      GST_TYPE_DTLS_SRTP_DEMUX);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    dtls,
+    "DTLS decoder and encoder plugins",
+    plugin_init, PACKAGE_VERSION, "BSD", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/dts/Makefile.in b/ext/dts/Makefile.in
index 405d5a9..d92e265 100644
--- a/ext/dts/Makefile.in
+++ b/ext/dts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/dts
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/dts/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/dts/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,6 +1096,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c
index a14d08f..c1f12c5 100644
--- a/ext/dts/gstdtsdec.c
+++ b/ext/dts/gstdtsdec.c
@@ -209,6 +209,10 @@
   dtsdec->request_channels = DCA_CHANNEL;
   dtsdec->dynamic_range_compression = FALSE;
 
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (dtsdec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dtsdec));
+
   /* retrieve and intercept base class chain.
    * Quite HACKish, but that's dvd specs for you,
    * since one buffer needs to be split into 2 frames */
@@ -442,6 +446,8 @@
         (guint) dts->bit_rate, NULL);
     gst_audio_decoder_merge_tags (GST_AUDIO_DECODER (dts), taglist,
         GST_TAG_MERGE_REPLACE);
+    if (taglist)
+      gst_tag_list_unref (taglist);
   }
 }
 
@@ -452,10 +458,13 @@
   gint channels, i, num_blocks;
   gboolean need_renegotiation = FALSE;
   guint8 *data;
-  gsize size;
   GstMapInfo map;
   gint chans;
-  gint length = 0, flags, sample_rate, bit_rate, frame_length;
+#ifndef G_DISABLE_ASSERT
+  gsize size;
+  gint length;
+#endif
+  gint flags, sample_rate, bit_rate, frame_length;
   GstFlowReturn result = GST_FLOW_OK;
   GstBuffer *outbuf;
 
@@ -468,15 +477,24 @@
   /* parsed stuff already, so this should work out fine */
   gst_buffer_map (buffer, &map, GST_MAP_READ);
   data = map.data;
+
+#ifndef G_DISABLE_ASSERT
   size = map.size;
   g_assert (size >= 7);
+#endif
 
   bit_rate = dts->bit_rate;
   sample_rate = dts->sample_rate;
   flags = 0;
+
+#ifndef G_DISABLE_ASSERT
   length = dca_syncinfo (dts->state, data, &flags, &sample_rate, &bit_rate,
       &frame_length);
   g_assert (length == size);
+#else
+  (void) dca_syncinfo (dts->state, data, &flags, &sample_rate, &bit_rate,
+      &frame_length);
+#endif
 
   if (flags != dts->prev_flags) {
     dts->prev_flags = flags;
@@ -591,7 +609,6 @@
 
   gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
   data = map.data;
-  size = map.size;
   {
     guint8 *ptr = data;
     for (i = 0; i < num_blocks; i++) {
diff --git a/ext/faac/Makefile.am b/ext/faac/Makefile.am
index 8727a21..007c66d 100644
--- a/ext/faac/Makefile.am
+++ b/ext/faac/Makefile.am
@@ -11,18 +11,3 @@
 libgstfaac_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstfaac.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfaac -:SHARED libgstfaac \
-	 -:TAGS eng debug \
-	 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfaac_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfaac_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfaac_la_LDFLAGS) \
-	           $(libgstfaac_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/ext/faac/Makefile.in b/ext/faac/Makefile.in
index e2cde62..bdfe289 100644
--- a/ext/faac/Makefile.in
+++ b/ext/faac/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/faac
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/faac/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/faac/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,21 +1096,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfaac -:SHARED libgstfaac \
-	 -:TAGS eng debug \
-	 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfaac_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfaac_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfaac_la_LDFLAGS) \
-	           $(libgstfaac_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index 4bea1ce..a4a7c36 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -55,12 +55,6 @@
                     "64000, " \
                     "88200, " \
                     "96000"
-#define SINK_CAPS \
-    "audio/x-raw, "                \
-    "format = (string) "GST_AUDIO_NE (S16) ", "  \
-    "layout = (string) interleaved, " \
-    "rate = (int) {" SAMPLE_RATES "}, "   \
-    "channels = (int) [ 1, 6 ] "
 
 /* these don't seem to work? */
 #if 0
@@ -82,23 +76,20 @@
     "channels = (int) [ 1, 6 ], "      \
     "rate = (int) {" SAMPLE_RATES "}, "   \
     "stream-format = (string) { adts, raw }, " \
-    "base-profile = (string) { main, lc, ssr, ltp }; " \
+    "base-profile = (string) { main, lc, ssr, ltp }, " \
+    "framed = (boolean) true; " \
     "audio/mpeg, "                     \
     "mpegversion = (int) 2, "   \
     "channels = (int) [ 1, 6 ], "      \
     "rate = (int) {" SAMPLE_RATES "}, "   \
     "stream-format = (string) { adts, raw }, " \
-    "profile = (string) { main, lc }"
+    "profile = (string) { main, lc }," \
+    "framed = (boolean) true; "
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (SRC_CAPS));
 
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (SINK_CAPS));
-
 enum
 {
   PROP_0,
@@ -122,9 +113,9 @@
 static void gst_faac_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
 
+static GstCaps *gst_faac_enc_generate_sink_caps (void);
 static gboolean gst_faac_configure_source_pad (GstFaac * faac,
     GstAudioInfo * info);
-static GstCaps *gst_faac_getcaps (GstAudioEncoder * enc, GstCaps * filter);
 
 static gboolean gst_faac_stop (GstAudioEncoder * enc);
 static gboolean gst_faac_set_format (GstAudioEncoder * enc,
@@ -152,7 +143,7 @@
   static GType gst_faac_brtype_type = 0;
 
   if (!gst_faac_brtype_type) {
-    static GEnumValue gst_faac_brtype[] = {
+    static const GEnumValue gst_faac_brtype[] = {
       {VBR, "VBR", "VBR encoding"},
       {ABR, "ABR", "ABR encoding"},
       {0, NULL, NULL},
@@ -172,7 +163,7 @@
   static GType gst_faac_shortctl_type = 0;
 
   if (!gst_faac_shortctl_type) {
-    static GEnumValue gst_faac_shortctl[] = {
+    static const GEnumValue gst_faac_shortctl[] = {
       {SHORTCTL_NORMAL, "SHORTCTL_NORMAL", "Normal block type"},
       {SHORTCTL_NOSHORT, "SHORTCTL_NOSHORT", "No short blocks"},
       {SHORTCTL_NOLONG, "SHORTCTL_NOLONG", "No long blocks"},
@@ -192,14 +183,20 @@
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
   GstAudioEncoderClass *base_class = GST_AUDIO_ENCODER_CLASS (klass);
+  GstCaps *sink_caps;
+  GstPadTemplate *sink_templ;
 
   gobject_class->set_property = gst_faac_set_property;
   gobject_class->get_property = gst_faac_get_property;
 
   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));
+
+  sink_caps = gst_faac_enc_generate_sink_caps ();
+  sink_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps);
+  gst_element_class_add_pad_template (gstelement_class, sink_templ);
+  gst_caps_unref (sink_caps);
 
   gst_element_class_set_static_metadata (gstelement_class, "AAC audio encoder",
       "Codec/Encoder/Audio",
@@ -209,7 +206,6 @@
   base_class->stop = GST_DEBUG_FUNCPTR (gst_faac_stop);
   base_class->set_format = GST_DEBUG_FUNCPTR (gst_faac_set_format);
   base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_faac_handle_frame);
-  base_class->getcaps = GST_DEBUG_FUNCPTR (gst_faac_getcaps);
 
   /* properties */
   g_object_class_install_property (gobject_class, PROP_QUALITY,
@@ -247,6 +243,7 @@
 static void
 gst_faac_init (GstFaac * faac)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (faac));
 }
 
 static void
@@ -297,58 +294,67 @@
 };
 
 static GstCaps *
-gst_faac_getcaps (GstAudioEncoder * enc, GstCaps * filter)
+gst_faac_enc_generate_sink_caps (void)
 {
-  static volatile gsize sinkcaps = 0;
+  GstCaps *caps = gst_caps_new_empty ();
+  GstStructure *s, *t;
+  gint i, c;
+  static const int rates[] = {
+    8000, 11025, 12000, 16000, 22050, 24000,
+    32000, 44100, 48000, 64000, 88200, 96000
+  };
+  GValue rates_arr = { 0, };
+  GValue tmp_v = { 0, };
 
-  if (g_once_init_enter (&sinkcaps)) {
-    GstCaps *tmp = gst_caps_new_empty ();
-    GstStructure *s, *t;
-    gint i, c;
-    static const int rates[] = {
-      8000, 11025, 12000, 16000, 22050, 24000,
-      32000, 44100, 48000, 64000, 88200, 96000
-    };
-    GValue rates_arr = { 0, };
-    GValue tmp_v = { 0, };
-
-    g_value_init (&rates_arr, GST_TYPE_LIST);
-    g_value_init (&tmp_v, G_TYPE_INT);
-    for (i = 0; i < G_N_ELEMENTS (rates); i++) {
-      g_value_set_int (&tmp_v, rates[i]);
-      gst_value_list_append_value (&rates_arr, &tmp_v);
-    }
-    g_value_unset (&tmp_v);
-
-    s = gst_structure_new ("audio/x-raw",
-        "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
-        "layout", G_TYPE_STRING, "interleaved", NULL);
-    gst_structure_set_value (s, "rate", &rates_arr);
-
-    for (i = 1; i <= 6; i++) {
-      guint64 channel_mask = 0;
-      t = gst_structure_copy (s);
-
-      gst_structure_set (t, "channels", G_TYPE_INT, i, NULL);
-      if (i > 1) {
-        for (c = 0; c < i; c++)
-          channel_mask |=
-              G_GUINT64_CONSTANT (1) << aac_channel_positions[i - 1][c];
-
-        gst_structure_set (t, "channel-mask", GST_TYPE_BITMASK, channel_mask,
-            NULL);
-      }
-      gst_caps_append_structure (tmp, t);
-    }
-    gst_structure_free (s);
-    g_value_unset (&rates_arr);
-
-    GST_DEBUG_OBJECT (enc, "Generated sinkcaps: %" GST_PTR_FORMAT, tmp);
-
-    g_once_init_leave (&sinkcaps, (gsize) tmp);
+  g_value_init (&rates_arr, GST_TYPE_LIST);
+  g_value_init (&tmp_v, G_TYPE_INT);
+  for (i = 0; i < G_N_ELEMENTS (rates); i++) {
+    g_value_set_int (&tmp_v, rates[i]);
+    gst_value_list_append_value (&rates_arr, &tmp_v);
   }
+  g_value_unset (&tmp_v);
 
-  return gst_audio_encoder_proxy_getcaps (enc, (GstCaps *) sinkcaps, filter);
+  s = gst_structure_new ("audio/x-raw",
+      "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
+      "layout", G_TYPE_STRING, "interleaved", NULL);
+  gst_structure_set_value (s, "rate", &rates_arr);
+
+  t = gst_structure_copy (s);
+  gst_structure_set (t, "channels", G_TYPE_INT, 1, NULL);
+  gst_caps_append_structure (caps, t);
+
+  for (i = 2; i <= 6; i++) {
+    guint64 channel_mask = 0;
+    t = gst_structure_copy (s);
+
+    gst_structure_set (t, "channels", G_TYPE_INT, i, NULL);
+    for (c = 0; c < i; c++)
+      channel_mask |= G_GUINT64_CONSTANT (1) << aac_channel_positions[i - 1][c];
+
+    gst_structure_set (t, "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
+    gst_caps_append_structure (caps, t);
+  }
+  gst_structure_free (s);
+  g_value_unset (&rates_arr);
+
+  GST_DEBUG ("Generated sinkcaps: %" GST_PTR_FORMAT, caps);
+  return caps;
+}
+
+static void
+gst_faac_set_tags (GstFaac * faac)
+{
+  GstTagList *taglist;
+
+  /* create a taglist and add a bitrate tag to it */
+  taglist = gst_tag_list_new_empty ();
+  gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
+      GST_TAG_BITRATE, faac->bitrate, NULL);
+
+  gst_audio_encoder_merge_tags (GST_AUDIO_ENCODER (faac), taglist,
+      GST_TAG_MERGE_REPLACE);
+
+  gst_tag_list_unref (taglist);
 }
 
 static gboolean
@@ -385,6 +391,8 @@
   if (!result)
     goto done;
 
+  gst_faac_set_tags (faac);
+
   /* report needs to base class */
   gst_audio_encoder_set_frame_samples_min (enc, faac->samples);
   gst_audio_encoder_set_frame_samples_max (enc, faac->samples);
@@ -550,7 +558,7 @@
       "channels", G_TYPE_INT, info->channels,
       "rate", G_TYPE_INT, info->rate,
       "stream-format", G_TYPE_STRING, (faac->outputformat ? "adts" : "raw"),
-      NULL);
+      "framed", G_TYPE_BOOLEAN, TRUE, NULL);
 
   /* DecoderSpecificInfo is only available for mpegversion=4 */
   if (faac->mpegversion == 4) {
diff --git a/ext/faad/Makefile.am b/ext/faad/Makefile.am
index cf405f4..2aef183 100644
--- a/ext/faad/Makefile.am
+++ b/ext/faad/Makefile.am
@@ -10,18 +10,3 @@
 libgstfaad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstfaad.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfaad -:SHARED libgstfaad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfaad_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfaad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfaad_la_LDFLAGS) \
-	           $(libgstfaad_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/ext/faad/Makefile.in b/ext/faad/Makefile.in
index fcc0c2c..fcb507e 100644
--- a/ext/faad/Makefile.in
+++ b/ext/faad/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/faad
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/faad/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/faad/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,21 +1096,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfaad -:SHARED libgstfaad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfaad_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfaad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfaad_la_LDFLAGS) \
-	           $(libgstfaad_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index d9313d5..65a3f89 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -175,6 +175,9 @@
 static void
 gst_faad_init (GstFaad * faad)
 {
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (faad), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (faad));
   gst_faad_reset (faad);
 }
 
@@ -456,7 +459,6 @@
         GST_WARNING_OBJECT (faad,
             "Unsupported FAAD channel position 0x%x encountered", fpos[n]);
         return FALSE;
-        break;
       }
     }
   }
@@ -471,6 +473,7 @@
   gboolean fmt_change = FALSE;
   GstAudioInfo ainfo;
   gint i;
+  GstAudioChannelPosition position[6];
 
   /* see if we need to renegotiate */
   if (info->samplerate != faad->samplerate ||
@@ -496,10 +499,6 @@
   g_free (faad->channel_positions);
   faad->channel_positions = g_memdup (info->channel_position, faad->channels);
 
-  /* FIXME: Use the GstAudioInfo of GstAudioDecoder for all of this */
-  gst_audio_info_init (&ainfo);
-  gst_audio_info_set_format (&ainfo, GST_AUDIO_FORMAT_S16, faad->samplerate,
-      faad->channels, NULL);
   faad->bps = 16 / 8;
 
   if (!gst_faad_chanpos_to_gst (faad, faad->channel_positions,
@@ -507,14 +506,11 @@
     GST_DEBUG_OBJECT (faad, "Could not map channel positions");
     return FALSE;
   }
-  memcpy (ainfo.position, faad->aac_positions,
+
+  memcpy (position, faad->aac_positions, sizeof (position));
+  gst_audio_channel_positions_to_valid_order (position, faad->channels);
+  memcpy (faad->gst_positions, position,
       faad->channels * sizeof (GstAudioChannelPosition));
-  gst_audio_channel_positions_to_valid_order (ainfo.position, faad->channels);
-  memcpy (faad->gst_positions, ainfo.position,
-      faad->channels * sizeof (GstAudioChannelPosition));
-  /* Unset UNPOSITIONED flag */
-  if (ainfo.position[0] != GST_AUDIO_CHANNEL_POSITION_NONE)
-    ainfo.flags &= ~GST_AUDIO_FLAG_UNPOSITIONED;
 
   /* get the remap table */
   memset (faad->reorder_map, 0, sizeof (faad->reorder_map));
@@ -529,6 +525,11 @@
     }
   }
 
+  /* FIXME: Use the GstAudioInfo of GstAudioDecoder for all of this */
+  gst_audio_info_init (&ainfo);
+  gst_audio_info_set_format (&ainfo, GST_AUDIO_FORMAT_S16, faad->samplerate,
+      faad->channels, position);
+
   ret = gst_audio_decoder_set_output_format (GST_AUDIO_DECODER (faad), &ainfo);
 
   return ret;
@@ -890,7 +891,8 @@
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  return gst_element_register (plugin, "faad", GST_RANK_PRIMARY, GST_TYPE_FAAD);
+  return gst_element_register (plugin, "faad", GST_RANK_SECONDARY,
+      GST_TYPE_FAAD);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
diff --git a/ext/flite/Makefile.in b/ext/flite/Makefile.in
index 6a0d794..989e817 100644
--- a/ext/flite/Makefile.in
+++ b/ext/flite/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/flite
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +236,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +254,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +282,6 @@
 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@
@@ -284,7 +294,6 @@
 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@
@@ -292,6 +301,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +329,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +355,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +413,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +437,6 @@
 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@
@@ -430,7 +445,6 @@
 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@
@@ -443,7 +457,6 @@
 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@
@@ -457,6 +470,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +482,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +522,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +558,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +591,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +601,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +637,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +648,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +679,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +705,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +744,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +790,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/flite/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/flite/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,6 +1106,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/fluidsynth/Makefile.in b/ext/fluidsynth/Makefile.in
index 5920456..98fc841 100644
--- a/ext/fluidsynth/Makefile.in
+++ b/ext/fluidsynth/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 target_triplet = @target@
 @USE_FLUIDSYNTH_TRUE@am__append_1 = libgstfluidsynthmidi.la
 subdir = ext/fluidsynth
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,6 +129,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -235,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -252,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -278,8 +291,6 @@
 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@
@@ -292,7 +303,6 @@
 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@
@@ -300,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -326,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -349,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -409,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -429,7 +446,6 @@
 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@
@@ -438,7 +454,6 @@
 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@
@@ -451,7 +466,6 @@
 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@
@@ -465,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -476,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -514,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -549,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -578,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -585,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -614,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -624,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -654,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -681,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -719,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -764,7 +799,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/fluidsynth/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/fluidsynth/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,6 +1107,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
index b1796f6..1a634ef 100644
--- a/ext/gl/Makefile.am
+++ b/ext/gl/Makefile.am
@@ -1,83 +1,93 @@
-
 plugin_LTLIBRARIES = libgstopengl.la
 
-AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-AM_LIBS = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
-
-# full opengl required
-if USE_OPENGL
-OPENGL_SOURCES =  \
-	gstglfilterblur.c \
-	gstglfilterblur.h \
-	gstglfiltersobel.c \
-	gstglfiltersobel.h \
-	gstglfilterlaplacian.c \
-	gstglfilterlaplacian.h \
-	gstglfilterglass.c \
-	gstglfilterglass.h \
-	gstglfilterapp.c \
-	gstglfilterapp.h \
-	gstglfilterreflectedscreen.c \
-	gstglfilterreflectedscreen.h \
-	gstgldeinterlace.c \
-	gstgldeinterlace.h \
-	gltestsrc.c \
-	gltestsrc.h \
-	gstgltestsrc.c \
-	gstgltestsrc.h \
-	gstglmosaic.c \
-	gstglmosaic.h \
-	effects/gstgleffectscurves.h \
-	effects/gstgleffectstretch.c \
-	effects/gstgleffecttunnel.c \
-	effects/gstgleffectfisheye.c \
-	effects/gstgleffecttwirl.c \
-	effects/gstgleffectbulge.c \
-	effects/gstgleffectsquare.c \
-	effects/gstgleffectlumatocurve.c \
-	effects/gstgleffectlumatocurve.h \
-	effects/gstgleffectrgbtocurve.c \
-	effects/gstgleffectsin.c \
-	effects/gstgleffectglow.c \
-	effects/gstgleffectxray.c
-
-if HAVE_PNG
-OPENGL_SOURCES += \
-	gstglbumper.c \
-	gstglbumper.h \
-	gstgldifferencematte.c \
-	gstgldifferencematte.h
-if HAVE_JPEG
-OPENGL_SOURCES += \
-	gstgloverlay.c \
-	gstgloverlay.h
-endif
-endif
-endif
-
 libgstopengl_la_SOURCES = \
 	gstopengl.c \
+	gstglbasemixer.c \
+	gstgluploadelement.c \
+	gstgldownloadelement.c \
+	gstglcolorconvertelement.c \
+	gstglfilterbin.c \
+	gstglmixerbin.c \
+	gstglsinkbin.c \
+	gstglsrcbin.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 \
+	effects/gstgleffectstretch.c \
+	effects/gstgleffectfisheye.c \
+	effects/gstgleffecttwirl.c \
+	effects/gstgleffectbulge.c \
+	effects/gstgleffecttunnel.c \
+	effects/gstgleffectsquare.c \
+	effects/gstgleffectlumatocurve.c \
+	effects/gstgleffectrgbtocurve.c \
+	effects/gstgleffectsin.c \
+	effects/gstgleffectxray.c \
+	effects/gstgleffectglow.c \
+	effects/gstgleffectblur.c \
+	effects/gstgleffectsobel.c \
+	effects/gstgleffectlaplacian.c \
 	gstglcolorscale.c \
-	gstglcolorscale.h \
 	gstglmixer.c \
-	gstglmixer.h \
-	gstglmixerpad.h \
 	gstglvideomixer.c \
-	gstglvideomixer.h \
 	gstglfiltershader.c \
+	gstglfilterapp.c
+
+noinst_HEADERS = \
+	gstglbasemixer.h \
+	gstgluploadelement.h \
+	gstgldownloadelement.h \
+	gstglcolorconvertelement.h \
+	gstglfilterbin.h \
+	gstglmixerbin.h \
+	gstglsinkbin.h \
+	gstglsrcbin.h \
+	gstglimagesink.h \
+	gstglfiltercube.h \
+	gstgleffects.h \
+	effects/gstgleffectssources.h \
+	gstglcolorscale.h \
+	gstglmixer.h \
+	gstglvideomixer.h \
 	gstglfiltershader.h \
-	$(OPENGL_SOURCES)
+	gstglfilterapp.h
+
+# full opengl required
+if USE_OPENGL
+libgstopengl_la_SOURCES += \
+	gstglfilterglass.c \
+	gstgldeinterlace.c \
+	gstglviewconvert.c \
+	gstglstereosplit.c \
+	gstglstereomix.c \
+	gltestsrc.c \
+	gstgltestsrc.c \
+	gstglmosaic.c
+
+noinst_HEADERS += \
+	gstglfilterglass.h \
+	gstgldeinterlace.h \
+	gstglstereosplit.h \
+	gstglstereomix.h \
+	gstglviewconvert.h \
+	gltestsrc.h \
+	gstgltestsrc.h \
+	gstglmosaic.h \
+	effects/gstgleffectscurves.h \
+	effects/gstgleffectlumatocurve.h
+
+if HAVE_PNG
+libgstopengl_la_SOURCES += \
+	gstgldifferencematte.c
+
+noinst_HEADERS += \
+	gstgldifferencematte.h
+endif
+endif
 
 if HAVE_GRAPHENE
 libgstopengl_la_SOURCES += \
@@ -85,6 +95,32 @@
 	gstgltransformation.h
 endif
 
+if HAVE_JPEG
+if HAVE_PNG
+libgstopengl_la_SOURCES += \
+	gstgloverlay.c
+
+noinst_HEADERS += \
+	gstgloverlay.h
+endif
+endif
+
+if HAVE_WINDOW_COCOA
+libgstopengl_la_SOURCES += \
+	caopengllayersink.m
+
+noinst_HEADERS += \
+	caopengllayersink.h
+endif
+
+libgstopengl_la_OBJCFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_OBJCFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GL_OBJCFLAGS)
+
 # check order of CFLAGS and LIBS, shouldn't the order be the other way around
 # (like in AM_CFLAGS)?
 libgstopengl_la_CFLAGS = \
@@ -111,5 +147,6 @@
 	$(GRAPHENE_LIBS)
 
 libgstopengl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --tag=CC
+
 
diff --git a/ext/gl/Makefile.in b/ext/gl/Makefile.in
index 2655825..b818f8a 100644
--- a/ext/gl/Makefile.in
+++ b/ext/gl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,8 +14,19 @@
 
 @SET_MAKE@
 
+
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,23 +90,53 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__append_1 = \
-@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstglbumper.c \
-@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstglbumper.h \
-@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstgldifferencematte.c \
+
+# full opengl required
+@USE_OPENGL_TRUE@am__append_1 = \
+@USE_OPENGL_TRUE@	gstglfilterglass.c \
+@USE_OPENGL_TRUE@	gstgldeinterlace.c \
+@USE_OPENGL_TRUE@	gstglviewconvert.c \
+@USE_OPENGL_TRUE@	gstglstereosplit.c \
+@USE_OPENGL_TRUE@	gstglstereomix.c \
+@USE_OPENGL_TRUE@	gltestsrc.c \
+@USE_OPENGL_TRUE@	gstgltestsrc.c \
+@USE_OPENGL_TRUE@	gstglmosaic.c
+
+@USE_OPENGL_TRUE@am__append_2 = \
+@USE_OPENGL_TRUE@	gstglfilterglass.h \
+@USE_OPENGL_TRUE@	gstgldeinterlace.h \
+@USE_OPENGL_TRUE@	gstglstereosplit.h \
+@USE_OPENGL_TRUE@	gstglstereomix.h \
+@USE_OPENGL_TRUE@	gstglviewconvert.h \
+@USE_OPENGL_TRUE@	gltestsrc.h \
+@USE_OPENGL_TRUE@	gstgltestsrc.h \
+@USE_OPENGL_TRUE@	gstglmosaic.h \
+@USE_OPENGL_TRUE@	effects/gstgleffectscurves.h \
+@USE_OPENGL_TRUE@	effects/gstgleffectlumatocurve.h
+
+@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__append_3 = \
+@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstgldifferencematte.c
+
+@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__append_4 = \
 @HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstgldifferencematte.h
 
-@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__append_2 = \
-@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@am__append_5 = \
 @HAVE_GRAPHENE_TRUE@	gstgltransformation.c \
 @HAVE_GRAPHENE_TRUE@	gstgltransformation.h
 
+@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@am__append_6 = \
+@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@	gstgloverlay.c
+
+@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@am__append_7 = \
+@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@	gstgloverlay.h
+
+@HAVE_WINDOW_COCOA_TRUE@am__append_8 = \
+@HAVE_WINDOW_COCOA_TRUE@	caopengllayersink.m
+
+@HAVE_WINDOW_COCOA_TRUE@am__append_9 = \
+@HAVE_WINDOW_COCOA_TRUE@	caopengllayersink.h
+
 subdir = ext/gl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -103,6 +144,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -116,7 +158,6 @@
 	$(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 \
@@ -133,6 +174,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -174,60 +217,48 @@
 	$(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 \
-	effects/gstgleffectssources.h effects/gstgleffectidentity.c \
-	effects/gstgleffectmirror.c effects/gstgleffectsqueeze.c \
-	gstglcolorscale.c gstglcolorscale.h gstglmixer.c gstglmixer.h \
-	gstglmixerpad.h gstglvideomixer.c gstglvideomixer.h \
-	gstglfiltershader.c gstglfiltershader.h gstglfilterblur.c \
-	gstglfilterblur.h gstglfiltersobel.c gstglfiltersobel.h \
-	gstglfilterlaplacian.c gstglfilterlaplacian.h \
-	gstglfilterglass.c gstglfilterglass.h gstglfilterapp.c \
-	gstglfilterapp.h gstglfilterreflectedscreen.c \
-	gstglfilterreflectedscreen.h gstgldeinterlace.c \
-	gstgldeinterlace.h gltestsrc.c gltestsrc.h gstgltestsrc.c \
-	gstgltestsrc.h gstglmosaic.c gstglmosaic.h \
-	effects/gstgleffectscurves.h effects/gstgleffectstretch.c \
-	effects/gstgleffecttunnel.c effects/gstgleffectfisheye.c \
-	effects/gstgleffecttwirl.c effects/gstgleffectbulge.c \
+am__libgstopengl_la_SOURCES_DIST = gstopengl.c gstglbasemixer.c \
+	gstgluploadelement.c gstgldownloadelement.c \
+	gstglcolorconvertelement.c gstglfilterbin.c gstglmixerbin.c \
+	gstglsinkbin.c gstglsrcbin.c gstglimagesink.c \
+	gstglfiltercube.c gstgleffects.c effects/gstgleffectssources.c \
+	effects/gstgleffectidentity.c effects/gstgleffectmirror.c \
+	effects/gstgleffectsqueeze.c effects/gstgleffectstretch.c \
+	effects/gstgleffectfisheye.c effects/gstgleffecttwirl.c \
+	effects/gstgleffectbulge.c effects/gstgleffecttunnel.c \
 	effects/gstgleffectsquare.c effects/gstgleffectlumatocurve.c \
-	effects/gstgleffectlumatocurve.h \
 	effects/gstgleffectrgbtocurve.c effects/gstgleffectsin.c \
-	effects/gstgleffectglow.c effects/gstgleffectxray.c \
-	gstglbumper.c gstglbumper.h gstgldifferencematte.c \
-	gstgldifferencematte.h gstgloverlay.c gstgloverlay.h \
-	gstgltransformation.c gstgltransformation.h
+	effects/gstgleffectxray.c effects/gstgleffectglow.c \
+	effects/gstgleffectblur.c effects/gstgleffectsobel.c \
+	effects/gstgleffectlaplacian.c gstglcolorscale.c gstglmixer.c \
+	gstglvideomixer.c gstglfiltershader.c gstglfilterapp.c \
+	gstglfilterglass.c gstgldeinterlace.c gstglviewconvert.c \
+	gstglstereosplit.c gstglstereomix.c gltestsrc.c gstgltestsrc.c \
+	gstglmosaic.c gstgldifferencematte.c gstgltransformation.c \
+	gstgltransformation.h gstgloverlay.c caopengllayersink.m
 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
-@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__objects_2 = libgstopengl_la-gstgloverlay.lo
-@USE_OPENGL_TRUE@am__objects_3 = libgstopengl_la-gstglfilterblur.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglfiltersobel.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglfilterlaplacian.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglfilterglass.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglfilterapp.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglfilterreflectedscreen.lo \
+@USE_OPENGL_TRUE@am__objects_1 = libgstopengl_la-gstglfilterglass.lo \
 @USE_OPENGL_TRUE@	libgstopengl_la-gstgldeinterlace.lo \
+@USE_OPENGL_TRUE@	libgstopengl_la-gstglviewconvert.lo \
+@USE_OPENGL_TRUE@	libgstopengl_la-gstglstereosplit.lo \
+@USE_OPENGL_TRUE@	libgstopengl_la-gstglstereomix.lo \
 @USE_OPENGL_TRUE@	libgstopengl_la-gltestsrc.lo \
 @USE_OPENGL_TRUE@	libgstopengl_la-gstgltestsrc.lo \
-@USE_OPENGL_TRUE@	libgstopengl_la-gstglmosaic.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectstretch.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffecttunnel.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectfisheye.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffecttwirl.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectbulge.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectsquare.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectlumatocurve.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectrgbtocurve.lo \
-@USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectsin.lo \
-@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 =  \
+@USE_OPENGL_TRUE@	libgstopengl_la-gstglmosaic.lo
+@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__objects_2 = libgstopengl_la-gstgldifferencematte.lo
+@HAVE_GRAPHENE_TRUE@am__objects_3 =  \
 @HAVE_GRAPHENE_TRUE@	libgstopengl_la-gstgltransformation.lo
+@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@am__objects_4 = libgstopengl_la-gstgloverlay.lo
+@HAVE_WINDOW_COCOA_TRUE@am__objects_5 =  \
+@HAVE_WINDOW_COCOA_TRUE@	libgstopengl_la-caopengllayersink.lo
 am_libgstopengl_la_OBJECTS = libgstopengl_la-gstopengl.lo \
+	libgstopengl_la-gstglbasemixer.lo \
+	libgstopengl_la-gstgluploadelement.lo \
+	libgstopengl_la-gstgldownloadelement.lo \
+	libgstopengl_la-gstglcolorconvertelement.lo \
+	libgstopengl_la-gstglfilterbin.lo \
+	libgstopengl_la-gstglmixerbin.lo \
+	libgstopengl_la-gstglsinkbin.lo libgstopengl_la-gstglsrcbin.lo \
 	libgstopengl_la-gstglimagesink.lo \
 	libgstopengl_la-gstglfiltercube.lo \
 	libgstopengl_la-gstgleffects.lo \
@@ -235,19 +266,35 @@
 	effects/libgstopengl_la-gstgleffectidentity.lo \
 	effects/libgstopengl_la-gstgleffectmirror.lo \
 	effects/libgstopengl_la-gstgleffectsqueeze.lo \
+	effects/libgstopengl_la-gstgleffectstretch.lo \
+	effects/libgstopengl_la-gstgleffectfisheye.lo \
+	effects/libgstopengl_la-gstgleffecttwirl.lo \
+	effects/libgstopengl_la-gstgleffectbulge.lo \
+	effects/libgstopengl_la-gstgleffecttunnel.lo \
+	effects/libgstopengl_la-gstgleffectsquare.lo \
+	effects/libgstopengl_la-gstgleffectlumatocurve.lo \
+	effects/libgstopengl_la-gstgleffectrgbtocurve.lo \
+	effects/libgstopengl_la-gstgleffectsin.lo \
+	effects/libgstopengl_la-gstgleffectxray.lo \
+	effects/libgstopengl_la-gstgleffectglow.lo \
+	effects/libgstopengl_la-gstgleffectblur.lo \
+	effects/libgstopengl_la-gstgleffectsobel.lo \
+	effects/libgstopengl_la-gstgleffectlaplacian.lo \
 	libgstopengl_la-gstglcolorscale.lo \
 	libgstopengl_la-gstglmixer.lo \
 	libgstopengl_la-gstglvideomixer.lo \
-	libgstopengl_la-gstglfiltershader.lo $(am__objects_3) \
-	$(am__objects_4)
+	libgstopengl_la-gstglfiltershader.lo \
+	libgstopengl_la-gstglfilterapp.lo $(am__objects_1) \
+	$(am__objects_2) $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5)
 libgstopengl_la_OBJECTS = $(am_libgstopengl_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 = 
-libgstopengl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+libgstopengl_la_LINK = $(LIBTOOL) $(AM_V_lt) \
 	$(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstopengl_la_CFLAGS) $(CFLAGS) \
+	$(OBJCLD) $(libgstopengl_la_OBJCFLAGS) $(OBJCFLAGS) \
 	$(libgstopengl_la_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -283,6 +330,24 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
+OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)
+LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_OBJCFLAGS) $(OBJCFLAGS)
+AM_V_OBJC = $(am__v_OBJC_@AM_V@)
+am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@)
+am__v_OBJC_0 = @echo "  OBJC    " $@;
+am__v_OBJC_1 = 
+OBJCLD = $(OBJC)
+OBJCLINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@)
+am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@)
+am__v_OBJCLD_0 = @echo "  OBJCLD  " $@;
+am__v_OBJCLD_1 = 
 SOURCES = $(libgstopengl_la_SOURCES)
 DIST_SOURCES = $(am__libgstopengl_la_SOURCES_DIST)
 am__can_run_installinfo = \
@@ -290,6 +355,18 @@
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__noinst_HEADERS_DIST = gstglbasemixer.h gstgluploadelement.h \
+	gstgldownloadelement.h gstglcolorconvertelement.h \
+	gstglfilterbin.h gstglmixerbin.h gstglsinkbin.h gstglsrcbin.h \
+	gstglimagesink.h gstglfiltercube.h gstgleffects.h \
+	effects/gstgleffectssources.h gstglcolorscale.h gstglmixer.h \
+	gstglvideomixer.h gstglfiltershader.h gstglfilterapp.h \
+	gstglfilterglass.h gstgldeinterlace.h gstglstereosplit.h \
+	gstglstereomix.h gstglviewconvert.h gltestsrc.h gstgltestsrc.h \
+	gstglmosaic.h effects/gstgleffectscurves.h \
+	effects/gstgleffectlumatocurve.h gstgldifferencematte.h \
+	gstgloverlay.h caopengllayersink.h
+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
@@ -309,6 +386,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -326,8 +404,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -352,8 +432,6 @@
 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@
@@ -366,7 +444,6 @@
 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@
@@ -374,6 +451,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -400,11 +479,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -423,8 +505,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -483,10 +563,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -503,7 +587,6 @@
 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@
@@ -512,7 +595,6 @@
 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@
@@ -525,7 +607,6 @@
 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@
@@ -539,6 +620,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -550,6 +632,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -588,6 +672,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -623,10 +708,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -652,6 +741,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -659,7 +751,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -688,6 +787,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -698,6 +798,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -728,17 +829,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -755,6 +855,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -793,6 +894,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -807,43 +909,39 @@
 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)
+libgstopengl_la_SOURCES = gstopengl.c gstglbasemixer.c \
+	gstgluploadelement.c gstgldownloadelement.c \
+	gstglcolorconvertelement.c gstglfilterbin.c gstglmixerbin.c \
+	gstglsinkbin.c gstglsrcbin.c gstglimagesink.c \
+	gstglfiltercube.c gstgleffects.c effects/gstgleffectssources.c \
+	effects/gstgleffectidentity.c effects/gstgleffectmirror.c \
+	effects/gstgleffectsqueeze.c effects/gstgleffectstretch.c \
+	effects/gstgleffectfisheye.c effects/gstgleffecttwirl.c \
+	effects/gstgleffectbulge.c effects/gstgleffecttunnel.c \
+	effects/gstgleffectsquare.c effects/gstgleffectlumatocurve.c \
+	effects/gstgleffectrgbtocurve.c effects/gstgleffectsin.c \
+	effects/gstgleffectxray.c effects/gstgleffectglow.c \
+	effects/gstgleffectblur.c effects/gstgleffectsobel.c \
+	effects/gstgleffectlaplacian.c gstglcolorscale.c gstglmixer.c \
+	gstglvideomixer.c gstglfiltershader.c gstglfilterapp.c \
+	$(am__append_1) $(am__append_3) $(am__append_5) \
+	$(am__append_6) $(am__append_8)
+noinst_HEADERS = gstglbasemixer.h gstgluploadelement.h \
+	gstgldownloadelement.h gstglcolorconvertelement.h \
+	gstglfilterbin.h gstglmixerbin.h gstglsinkbin.h gstglsrcbin.h \
+	gstglimagesink.h gstglfiltercube.h gstgleffects.h \
+	effects/gstgleffectssources.h gstglcolorscale.h gstglmixer.h \
+	gstglvideomixer.h gstglfiltershader.h gstglfilterapp.h \
+	$(am__append_2) $(am__append_4) $(am__append_7) \
+	$(am__append_9)
+libgstopengl_la_OBJCFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_OBJCFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GL_OBJCFLAGS)
 
-# full opengl required
-@USE_OPENGL_TRUE@OPENGL_SOURCES = gstglfilterblur.c gstglfilterblur.h \
-@USE_OPENGL_TRUE@	gstglfiltersobel.c gstglfiltersobel.h \
-@USE_OPENGL_TRUE@	gstglfilterlaplacian.c gstglfilterlaplacian.h \
-@USE_OPENGL_TRUE@	gstglfilterglass.c gstglfilterglass.h \
-@USE_OPENGL_TRUE@	gstglfilterapp.c gstglfilterapp.h \
-@USE_OPENGL_TRUE@	gstglfilterreflectedscreen.c \
-@USE_OPENGL_TRUE@	gstglfilterreflectedscreen.h \
-@USE_OPENGL_TRUE@	gstgldeinterlace.c gstgldeinterlace.h \
-@USE_OPENGL_TRUE@	gltestsrc.c gltestsrc.h gstgltestsrc.c \
-@USE_OPENGL_TRUE@	gstgltestsrc.h gstglmosaic.c gstglmosaic.h \
-@USE_OPENGL_TRUE@	effects/gstgleffectscurves.h \
-@USE_OPENGL_TRUE@	effects/gstgleffectstretch.c \
-@USE_OPENGL_TRUE@	effects/gstgleffecttunnel.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectfisheye.c \
-@USE_OPENGL_TRUE@	effects/gstgleffecttwirl.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectbulge.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectsquare.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectlumatocurve.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectlumatocurve.h \
-@USE_OPENGL_TRUE@	effects/gstgleffectrgbtocurve.c \
-@USE_OPENGL_TRUE@	effects/gstgleffectsin.c \
-@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 gstglmixer.c gstglmixer.h \
-	gstglmixerpad.h gstglvideomixer.c gstglvideomixer.h \
-	gstglfiltershader.c gstglfiltershader.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)?
@@ -871,11 +969,11 @@
 	$(GRAPHENE_LIBS)
 
 libgstopengl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --tag=CC
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .m .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -888,7 +986,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/gl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -957,14 +1054,14 @@
 	effects/$(am__dirstamp) effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectstretch.lo:  \
 	effects/$(am__dirstamp) effects/$(DEPDIR)/$(am__dirstamp)
-effects/libgstopengl_la-gstgleffecttunnel.lo: effects/$(am__dirstamp) \
-	effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectfisheye.lo:  \
 	effects/$(am__dirstamp) effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffecttwirl.lo: effects/$(am__dirstamp) \
 	effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectbulge.lo: effects/$(am__dirstamp) \
 	effects/$(DEPDIR)/$(am__dirstamp)
+effects/libgstopengl_la-gstgleffecttunnel.lo: effects/$(am__dirstamp) \
+	effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectsquare.lo: effects/$(am__dirstamp) \
 	effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectlumatocurve.lo:  \
@@ -973,13 +1070,19 @@
 	effects/$(am__dirstamp) effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectsin.lo: effects/$(am__dirstamp) \
 	effects/$(DEPDIR)/$(am__dirstamp)
-effects/libgstopengl_la-gstgleffectglow.lo: effects/$(am__dirstamp) \
-	effects/$(DEPDIR)/$(am__dirstamp)
 effects/libgstopengl_la-gstgleffectxray.lo: effects/$(am__dirstamp) \
 	effects/$(DEPDIR)/$(am__dirstamp)
+effects/libgstopengl_la-gstgleffectglow.lo: effects/$(am__dirstamp) \
+	effects/$(DEPDIR)/$(am__dirstamp)
+effects/libgstopengl_la-gstgleffectblur.lo: effects/$(am__dirstamp) \
+	effects/$(DEPDIR)/$(am__dirstamp)
+effects/libgstopengl_la-gstgleffectsobel.lo: effects/$(am__dirstamp) \
+	effects/$(DEPDIR)/$(am__dirstamp)
+effects/libgstopengl_la-gstgleffectlaplacian.lo:  \
+	effects/$(am__dirstamp) effects/$(DEPDIR)/$(am__dirstamp)
 
 libgstopengl.la: $(libgstopengl_la_OBJECTS) $(libgstopengl_la_DEPENDENCIES) $(EXTRA_libgstopengl_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstopengl_la_LINK) -rpath $(plugindir) $(libgstopengl_la_OBJECTS) $(libgstopengl_la_LIBADD) $(LIBS)
+	$(AM_V_OBJCLD)$(libgstopengl_la_LINK) -rpath $(plugindir) $(libgstopengl_la_OBJECTS) $(libgstopengl_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -989,36 +1092,46 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-caopengllayersink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gltestsrc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglbumper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglbasemixer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglcolorconvertelement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglcolorscale.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgldeinterlace.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgldifferencematte.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgldownloadelement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgleffects.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterapp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterblur.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterbin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfiltercube.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterglass.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterlaplacian.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfilterreflectedscreen.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfiltershader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglfiltersobel.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglimagesink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglmixer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglmixerbin.Plo@am__quote@
 @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-gstglsinkbin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglsrcbin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglstereomix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglstereosplit.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-gstgluploadelement.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-gstglviewconvert.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-gstgleffectblur.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectbulge.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectfisheye.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectidentity.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectlaplacian.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectlumatocurve.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectmirror.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectrgbtocurve.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectsin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectsobel.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectsquare.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectsqueeze.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectssources.Plo@am__quote@
@@ -1058,6 +1171,62 @@
 @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-gstopengl.lo `test -f 'gstopengl.c' || echo '$(srcdir)/'`gstopengl.c
 
+libgstopengl_la-gstglbasemixer.lo: gstglbasemixer.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-gstglbasemixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglbasemixer.Tpo -c -o libgstopengl_la-gstglbasemixer.lo `test -f 'gstglbasemixer.c' || echo '$(srcdir)/'`gstglbasemixer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglbasemixer.Tpo $(DEPDIR)/libgstopengl_la-gstglbasemixer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglbasemixer.c' object='libgstopengl_la-gstglbasemixer.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-gstglbasemixer.lo `test -f 'gstglbasemixer.c' || echo '$(srcdir)/'`gstglbasemixer.c
+
+libgstopengl_la-gstgluploadelement.lo: gstgluploadelement.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-gstgluploadelement.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgluploadelement.Tpo -c -o libgstopengl_la-gstgluploadelement.lo `test -f 'gstgluploadelement.c' || echo '$(srcdir)/'`gstgluploadelement.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgluploadelement.Tpo $(DEPDIR)/libgstopengl_la-gstgluploadelement.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgluploadelement.c' object='libgstopengl_la-gstgluploadelement.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-gstgluploadelement.lo `test -f 'gstgluploadelement.c' || echo '$(srcdir)/'`gstgluploadelement.c
+
+libgstopengl_la-gstgldownloadelement.lo: gstgldownloadelement.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-gstgldownloadelement.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgldownloadelement.Tpo -c -o libgstopengl_la-gstgldownloadelement.lo `test -f 'gstgldownloadelement.c' || echo '$(srcdir)/'`gstgldownloadelement.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgldownloadelement.Tpo $(DEPDIR)/libgstopengl_la-gstgldownloadelement.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgldownloadelement.c' object='libgstopengl_la-gstgldownloadelement.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-gstgldownloadelement.lo `test -f 'gstgldownloadelement.c' || echo '$(srcdir)/'`gstgldownloadelement.c
+
+libgstopengl_la-gstglcolorconvertelement.lo: gstglcolorconvertelement.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-gstglcolorconvertelement.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglcolorconvertelement.Tpo -c -o libgstopengl_la-gstglcolorconvertelement.lo `test -f 'gstglcolorconvertelement.c' || echo '$(srcdir)/'`gstglcolorconvertelement.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglcolorconvertelement.Tpo $(DEPDIR)/libgstopengl_la-gstglcolorconvertelement.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglcolorconvertelement.c' object='libgstopengl_la-gstglcolorconvertelement.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-gstglcolorconvertelement.lo `test -f 'gstglcolorconvertelement.c' || echo '$(srcdir)/'`gstglcolorconvertelement.c
+
+libgstopengl_la-gstglfilterbin.lo: gstglfilterbin.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-gstglfilterbin.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterbin.Tpo -c -o libgstopengl_la-gstglfilterbin.lo `test -f 'gstglfilterbin.c' || echo '$(srcdir)/'`gstglfilterbin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterbin.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterbin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterbin.c' object='libgstopengl_la-gstglfilterbin.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-gstglfilterbin.lo `test -f 'gstglfilterbin.c' || echo '$(srcdir)/'`gstglfilterbin.c
+
+libgstopengl_la-gstglmixerbin.lo: gstglmixerbin.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-gstglmixerbin.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglmixerbin.Tpo -c -o libgstopengl_la-gstglmixerbin.lo `test -f 'gstglmixerbin.c' || echo '$(srcdir)/'`gstglmixerbin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglmixerbin.Tpo $(DEPDIR)/libgstopengl_la-gstglmixerbin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglmixerbin.c' object='libgstopengl_la-gstglmixerbin.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-gstglmixerbin.lo `test -f 'gstglmixerbin.c' || echo '$(srcdir)/'`gstglmixerbin.c
+
+libgstopengl_la-gstglsinkbin.lo: gstglsinkbin.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-gstglsinkbin.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglsinkbin.Tpo -c -o libgstopengl_la-gstglsinkbin.lo `test -f 'gstglsinkbin.c' || echo '$(srcdir)/'`gstglsinkbin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglsinkbin.Tpo $(DEPDIR)/libgstopengl_la-gstglsinkbin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglsinkbin.c' object='libgstopengl_la-gstglsinkbin.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-gstglsinkbin.lo `test -f 'gstglsinkbin.c' || echo '$(srcdir)/'`gstglsinkbin.c
+
+libgstopengl_la-gstglsrcbin.lo: gstglsrcbin.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-gstglsrcbin.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglsrcbin.Tpo -c -o libgstopengl_la-gstglsrcbin.lo `test -f 'gstglsrcbin.c' || echo '$(srcdir)/'`gstglsrcbin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglsrcbin.Tpo $(DEPDIR)/libgstopengl_la-gstglsrcbin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglsrcbin.c' object='libgstopengl_la-gstglsrcbin.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-gstglsrcbin.lo `test -f 'gstglsrcbin.c' || echo '$(srcdir)/'`gstglsrcbin.c
+
 libgstopengl_la-gstglimagesink.lo: gstglimagesink.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-gstglimagesink.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglimagesink.Tpo -c -o libgstopengl_la-gstglimagesink.lo `test -f 'gstglimagesink.c' || echo '$(srcdir)/'`gstglimagesink.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglimagesink.Tpo $(DEPDIR)/libgstopengl_la-gstglimagesink.Plo
@@ -1107,104 +1276,6 @@
 @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 effects/libgstopengl_la-gstgleffectsqueeze.lo `test -f 'effects/gstgleffectsqueeze.c' || echo '$(srcdir)/'`effects/gstgleffectsqueeze.c
 
-libgstopengl_la-gstglcolorscale.lo: gstglcolorscale.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-gstglcolorscale.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglcolorscale.Tpo -c -o libgstopengl_la-gstglcolorscale.lo `test -f 'gstglcolorscale.c' || echo '$(srcdir)/'`gstglcolorscale.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglcolorscale.Tpo $(DEPDIR)/libgstopengl_la-gstglcolorscale.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglcolorscale.c' object='libgstopengl_la-gstglcolorscale.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-gstglcolorscale.lo `test -f 'gstglcolorscale.c' || echo '$(srcdir)/'`gstglcolorscale.c
-
-libgstopengl_la-gstglmixer.lo: gstglmixer.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-gstglmixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglmixer.Tpo -c -o libgstopengl_la-gstglmixer.lo `test -f 'gstglmixer.c' || echo '$(srcdir)/'`gstglmixer.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglmixer.Tpo $(DEPDIR)/libgstopengl_la-gstglmixer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglmixer.c' object='libgstopengl_la-gstglmixer.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-gstglmixer.lo `test -f 'gstglmixer.c' || echo '$(srcdir)/'`gstglmixer.c
-
-libgstopengl_la-gstglvideomixer.lo: gstglvideomixer.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-gstglvideomixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo $(DEPDIR)/libgstopengl_la-gstglvideomixer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglvideomixer.c' object='libgstopengl_la-gstglvideomixer.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-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
-
-libgstopengl_la-gstglfiltershader.lo: gstglfiltershader.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-gstglfiltershader.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo -c -o libgstopengl_la-gstglfiltershader.lo `test -f 'gstglfiltershader.c' || echo '$(srcdir)/'`gstglfiltershader.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo $(DEPDIR)/libgstopengl_la-gstglfiltershader.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfiltershader.c' object='libgstopengl_la-gstglfiltershader.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-gstglfiltershader.lo `test -f 'gstglfiltershader.c' || echo '$(srcdir)/'`gstglfiltershader.c
-
-libgstopengl_la-gstglfilterblur.lo: gstglfilterblur.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-gstglfilterblur.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterblur.Tpo -c -o libgstopengl_la-gstglfilterblur.lo `test -f 'gstglfilterblur.c' || echo '$(srcdir)/'`gstglfilterblur.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterblur.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterblur.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterblur.c' object='libgstopengl_la-gstglfilterblur.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-gstglfilterblur.lo `test -f 'gstglfilterblur.c' || echo '$(srcdir)/'`gstglfilterblur.c
-
-libgstopengl_la-gstglfiltersobel.lo: gstglfiltersobel.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-gstglfiltersobel.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfiltersobel.Tpo -c -o libgstopengl_la-gstglfiltersobel.lo `test -f 'gstglfiltersobel.c' || echo '$(srcdir)/'`gstglfiltersobel.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfiltersobel.Tpo $(DEPDIR)/libgstopengl_la-gstglfiltersobel.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfiltersobel.c' object='libgstopengl_la-gstglfiltersobel.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-gstglfiltersobel.lo `test -f 'gstglfiltersobel.c' || echo '$(srcdir)/'`gstglfiltersobel.c
-
-libgstopengl_la-gstglfilterlaplacian.lo: gstglfilterlaplacian.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-gstglfilterlaplacian.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterlaplacian.Tpo -c -o libgstopengl_la-gstglfilterlaplacian.lo `test -f 'gstglfilterlaplacian.c' || echo '$(srcdir)/'`gstglfilterlaplacian.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterlaplacian.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterlaplacian.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterlaplacian.c' object='libgstopengl_la-gstglfilterlaplacian.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-gstglfilterlaplacian.lo `test -f 'gstglfilterlaplacian.c' || echo '$(srcdir)/'`gstglfilterlaplacian.c
-
-libgstopengl_la-gstglfilterglass.lo: gstglfilterglass.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-gstglfilterglass.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterglass.Tpo -c -o libgstopengl_la-gstglfilterglass.lo `test -f 'gstglfilterglass.c' || echo '$(srcdir)/'`gstglfilterglass.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterglass.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterglass.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterglass.c' object='libgstopengl_la-gstglfilterglass.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-gstglfilterglass.lo `test -f 'gstglfilterglass.c' || echo '$(srcdir)/'`gstglfilterglass.c
-
-libgstopengl_la-gstglfilterapp.lo: gstglfilterapp.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-gstglfilterapp.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterapp.Tpo -c -o libgstopengl_la-gstglfilterapp.lo `test -f 'gstglfilterapp.c' || echo '$(srcdir)/'`gstglfilterapp.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterapp.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterapp.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterapp.c' object='libgstopengl_la-gstglfilterapp.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-gstglfilterapp.lo `test -f 'gstglfilterapp.c' || echo '$(srcdir)/'`gstglfilterapp.c
-
-libgstopengl_la-gstglfilterreflectedscreen.lo: gstglfilterreflectedscreen.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-gstglfilterreflectedscreen.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterreflectedscreen.Tpo -c -o libgstopengl_la-gstglfilterreflectedscreen.lo `test -f 'gstglfilterreflectedscreen.c' || echo '$(srcdir)/'`gstglfilterreflectedscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterreflectedscreen.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterreflectedscreen.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterreflectedscreen.c' object='libgstopengl_la-gstglfilterreflectedscreen.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-gstglfilterreflectedscreen.lo `test -f 'gstglfilterreflectedscreen.c' || echo '$(srcdir)/'`gstglfilterreflectedscreen.c
-
-libgstopengl_la-gstgldeinterlace.lo: gstgldeinterlace.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-gstgldeinterlace.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Tpo -c -o libgstopengl_la-gstgldeinterlace.lo `test -f 'gstgldeinterlace.c' || echo '$(srcdir)/'`gstgldeinterlace.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Tpo $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgldeinterlace.c' object='libgstopengl_la-gstgldeinterlace.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-gstgldeinterlace.lo `test -f 'gstgldeinterlace.c' || echo '$(srcdir)/'`gstgldeinterlace.c
-
-libgstopengl_la-gltestsrc.lo: gltestsrc.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-gltestsrc.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gltestsrc.Tpo -c -o libgstopengl_la-gltestsrc.lo `test -f 'gltestsrc.c' || echo '$(srcdir)/'`gltestsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gltestsrc.Tpo $(DEPDIR)/libgstopengl_la-gltestsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gltestsrc.c' object='libgstopengl_la-gltestsrc.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-gltestsrc.lo `test -f 'gltestsrc.c' || echo '$(srcdir)/'`gltestsrc.c
-
-libgstopengl_la-gstgltestsrc.lo: gstgltestsrc.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-gstgltestsrc.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgltestsrc.Tpo -c -o libgstopengl_la-gstgltestsrc.lo `test -f 'gstgltestsrc.c' || echo '$(srcdir)/'`gstgltestsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgltestsrc.Tpo $(DEPDIR)/libgstopengl_la-gstgltestsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgltestsrc.c' object='libgstopengl_la-gstgltestsrc.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-gstgltestsrc.lo `test -f 'gstgltestsrc.c' || echo '$(srcdir)/'`gstgltestsrc.c
-
-libgstopengl_la-gstglmosaic.lo: gstglmosaic.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-gstglmosaic.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglmosaic.Tpo -c -o libgstopengl_la-gstglmosaic.lo `test -f 'gstglmosaic.c' || echo '$(srcdir)/'`gstglmosaic.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglmosaic.Tpo $(DEPDIR)/libgstopengl_la-gstglmosaic.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglmosaic.c' object='libgstopengl_la-gstglmosaic.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-gstglmosaic.lo `test -f 'gstglmosaic.c' || echo '$(srcdir)/'`gstglmosaic.c
-
 effects/libgstopengl_la-gstgleffectstretch.lo: effects/gstgleffectstretch.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 effects/libgstopengl_la-gstgleffectstretch.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Tpo -c -o effects/libgstopengl_la-gstgleffectstretch.lo `test -f 'effects/gstgleffectstretch.c' || echo '$(srcdir)/'`effects/gstgleffectstretch.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Plo
@@ -1212,13 +1283,6 @@
 @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 effects/libgstopengl_la-gstgleffectstretch.lo `test -f 'effects/gstgleffectstretch.c' || echo '$(srcdir)/'`effects/gstgleffectstretch.c
 
-effects/libgstopengl_la-gstgleffecttunnel.lo: effects/gstgleffecttunnel.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 effects/libgstopengl_la-gstgleffecttunnel.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Tpo -c -o effects/libgstopengl_la-gstgleffecttunnel.lo `test -f 'effects/gstgleffecttunnel.c' || echo '$(srcdir)/'`effects/gstgleffecttunnel.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffecttunnel.c' object='effects/libgstopengl_la-gstgleffecttunnel.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 effects/libgstopengl_la-gstgleffecttunnel.lo `test -f 'effects/gstgleffecttunnel.c' || echo '$(srcdir)/'`effects/gstgleffecttunnel.c
-
 effects/libgstopengl_la-gstgleffectfisheye.lo: effects/gstgleffectfisheye.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 effects/libgstopengl_la-gstgleffectfisheye.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectfisheye.Tpo -c -o effects/libgstopengl_la-gstgleffectfisheye.lo `test -f 'effects/gstgleffectfisheye.c' || echo '$(srcdir)/'`effects/gstgleffectfisheye.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectfisheye.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectfisheye.Plo
@@ -1240,6 +1304,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 effects/libgstopengl_la-gstgleffectbulge.lo `test -f 'effects/gstgleffectbulge.c' || echo '$(srcdir)/'`effects/gstgleffectbulge.c
 
+effects/libgstopengl_la-gstgleffecttunnel.lo: effects/gstgleffecttunnel.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 effects/libgstopengl_la-gstgleffecttunnel.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Tpo -c -o effects/libgstopengl_la-gstgleffecttunnel.lo `test -f 'effects/gstgleffecttunnel.c' || echo '$(srcdir)/'`effects/gstgleffecttunnel.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffecttunnel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffecttunnel.c' object='effects/libgstopengl_la-gstgleffecttunnel.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 effects/libgstopengl_la-gstgleffecttunnel.lo `test -f 'effects/gstgleffecttunnel.c' || echo '$(srcdir)/'`effects/gstgleffecttunnel.c
+
 effects/libgstopengl_la-gstgleffectsquare.lo: effects/gstgleffectsquare.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 effects/libgstopengl_la-gstgleffectsquare.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectsquare.Tpo -c -o effects/libgstopengl_la-gstgleffectsquare.lo `test -f 'effects/gstgleffectsquare.c' || echo '$(srcdir)/'`effects/gstgleffectsquare.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectsquare.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectsquare.Plo
@@ -1268,13 +1339,6 @@
 @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 effects/libgstopengl_la-gstgleffectsin.lo `test -f 'effects/gstgleffectsin.c' || echo '$(srcdir)/'`effects/gstgleffectsin.c
 
-effects/libgstopengl_la-gstgleffectglow.lo: effects/gstgleffectglow.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 effects/libgstopengl_la-gstgleffectglow.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Tpo -c -o effects/libgstopengl_la-gstgleffectglow.lo `test -f 'effects/gstgleffectglow.c' || echo '$(srcdir)/'`effects/gstgleffectglow.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffectglow.c' object='effects/libgstopengl_la-gstgleffectglow.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 effects/libgstopengl_la-gstgleffectglow.lo `test -f 'effects/gstgleffectglow.c' || echo '$(srcdir)/'`effects/gstgleffectglow.c
-
 effects/libgstopengl_la-gstgleffectxray.lo: effects/gstgleffectxray.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 effects/libgstopengl_la-gstgleffectxray.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectxray.Tpo -c -o effects/libgstopengl_la-gstgleffectxray.lo `test -f 'effects/gstgleffectxray.c' || echo '$(srcdir)/'`effects/gstgleffectxray.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectxray.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectxray.Plo
@@ -1282,12 +1346,124 @@
 @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 effects/libgstopengl_la-gstgleffectxray.lo `test -f 'effects/gstgleffectxray.c' || echo '$(srcdir)/'`effects/gstgleffectxray.c
 
-libgstopengl_la-gstglbumper.lo: gstglbumper.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-gstglbumper.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglbumper.Tpo -c -o libgstopengl_la-gstglbumper.lo `test -f 'gstglbumper.c' || echo '$(srcdir)/'`gstglbumper.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglbumper.Tpo $(DEPDIR)/libgstopengl_la-gstglbumper.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglbumper.c' object='libgstopengl_la-gstglbumper.lo' libtool=yes @AMDEPBACKSLASH@
+effects/libgstopengl_la-gstgleffectglow.lo: effects/gstgleffectglow.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 effects/libgstopengl_la-gstgleffectglow.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Tpo -c -o effects/libgstopengl_la-gstgleffectglow.lo `test -f 'effects/gstgleffectglow.c' || echo '$(srcdir)/'`effects/gstgleffectglow.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectglow.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffectglow.c' object='effects/libgstopengl_la-gstgleffectglow.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-gstglbumper.lo `test -f 'gstglbumper.c' || echo '$(srcdir)/'`gstglbumper.c
+@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 effects/libgstopengl_la-gstgleffectglow.lo `test -f 'effects/gstgleffectglow.c' || echo '$(srcdir)/'`effects/gstgleffectglow.c
+
+effects/libgstopengl_la-gstgleffectblur.lo: effects/gstgleffectblur.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 effects/libgstopengl_la-gstgleffectblur.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectblur.Tpo -c -o effects/libgstopengl_la-gstgleffectblur.lo `test -f 'effects/gstgleffectblur.c' || echo '$(srcdir)/'`effects/gstgleffectblur.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectblur.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectblur.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffectblur.c' object='effects/libgstopengl_la-gstgleffectblur.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 effects/libgstopengl_la-gstgleffectblur.lo `test -f 'effects/gstgleffectblur.c' || echo '$(srcdir)/'`effects/gstgleffectblur.c
+
+effects/libgstopengl_la-gstgleffectsobel.lo: effects/gstgleffectsobel.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 effects/libgstopengl_la-gstgleffectsobel.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectsobel.Tpo -c -o effects/libgstopengl_la-gstgleffectsobel.lo `test -f 'effects/gstgleffectsobel.c' || echo '$(srcdir)/'`effects/gstgleffectsobel.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectsobel.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectsobel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffectsobel.c' object='effects/libgstopengl_la-gstgleffectsobel.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 effects/libgstopengl_la-gstgleffectsobel.lo `test -f 'effects/gstgleffectsobel.c' || echo '$(srcdir)/'`effects/gstgleffectsobel.c
+
+effects/libgstopengl_la-gstgleffectlaplacian.lo: effects/gstgleffectlaplacian.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 effects/libgstopengl_la-gstgleffectlaplacian.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectlaplacian.Tpo -c -o effects/libgstopengl_la-gstgleffectlaplacian.lo `test -f 'effects/gstgleffectlaplacian.c' || echo '$(srcdir)/'`effects/gstgleffectlaplacian.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectlaplacian.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectlaplacian.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='effects/gstgleffectlaplacian.c' object='effects/libgstopengl_la-gstgleffectlaplacian.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 effects/libgstopengl_la-gstgleffectlaplacian.lo `test -f 'effects/gstgleffectlaplacian.c' || echo '$(srcdir)/'`effects/gstgleffectlaplacian.c
+
+libgstopengl_la-gstglcolorscale.lo: gstglcolorscale.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-gstglcolorscale.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglcolorscale.Tpo -c -o libgstopengl_la-gstglcolorscale.lo `test -f 'gstglcolorscale.c' || echo '$(srcdir)/'`gstglcolorscale.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglcolorscale.Tpo $(DEPDIR)/libgstopengl_la-gstglcolorscale.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglcolorscale.c' object='libgstopengl_la-gstglcolorscale.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-gstglcolorscale.lo `test -f 'gstglcolorscale.c' || echo '$(srcdir)/'`gstglcolorscale.c
+
+libgstopengl_la-gstglmixer.lo: gstglmixer.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-gstglmixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglmixer.Tpo -c -o libgstopengl_la-gstglmixer.lo `test -f 'gstglmixer.c' || echo '$(srcdir)/'`gstglmixer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglmixer.Tpo $(DEPDIR)/libgstopengl_la-gstglmixer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglmixer.c' object='libgstopengl_la-gstglmixer.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-gstglmixer.lo `test -f 'gstglmixer.c' || echo '$(srcdir)/'`gstglmixer.c
+
+libgstopengl_la-gstglvideomixer.lo: gstglvideomixer.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-gstglvideomixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo $(DEPDIR)/libgstopengl_la-gstglvideomixer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglvideomixer.c' object='libgstopengl_la-gstglvideomixer.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-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
+
+libgstopengl_la-gstglfiltershader.lo: gstglfiltershader.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-gstglfiltershader.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo -c -o libgstopengl_la-gstglfiltershader.lo `test -f 'gstglfiltershader.c' || echo '$(srcdir)/'`gstglfiltershader.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo $(DEPDIR)/libgstopengl_la-gstglfiltershader.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfiltershader.c' object='libgstopengl_la-gstglfiltershader.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-gstglfiltershader.lo `test -f 'gstglfiltershader.c' || echo '$(srcdir)/'`gstglfiltershader.c
+
+libgstopengl_la-gstglfilterapp.lo: gstglfilterapp.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-gstglfilterapp.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterapp.Tpo -c -o libgstopengl_la-gstglfilterapp.lo `test -f 'gstglfilterapp.c' || echo '$(srcdir)/'`gstglfilterapp.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterapp.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterapp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterapp.c' object='libgstopengl_la-gstglfilterapp.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-gstglfilterapp.lo `test -f 'gstglfilterapp.c' || echo '$(srcdir)/'`gstglfilterapp.c
+
+libgstopengl_la-gstglfilterglass.lo: gstglfilterglass.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-gstglfilterglass.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfilterglass.Tpo -c -o libgstopengl_la-gstglfilterglass.lo `test -f 'gstglfilterglass.c' || echo '$(srcdir)/'`gstglfilterglass.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfilterglass.Tpo $(DEPDIR)/libgstopengl_la-gstglfilterglass.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglfilterglass.c' object='libgstopengl_la-gstglfilterglass.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-gstglfilterglass.lo `test -f 'gstglfilterglass.c' || echo '$(srcdir)/'`gstglfilterglass.c
+
+libgstopengl_la-gstgldeinterlace.lo: gstgldeinterlace.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-gstgldeinterlace.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Tpo -c -o libgstopengl_la-gstgldeinterlace.lo `test -f 'gstgldeinterlace.c' || echo '$(srcdir)/'`gstgldeinterlace.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Tpo $(DEPDIR)/libgstopengl_la-gstgldeinterlace.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgldeinterlace.c' object='libgstopengl_la-gstgldeinterlace.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-gstgldeinterlace.lo `test -f 'gstgldeinterlace.c' || echo '$(srcdir)/'`gstgldeinterlace.c
+
+libgstopengl_la-gstglviewconvert.lo: gstglviewconvert.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-gstglviewconvert.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglviewconvert.Tpo -c -o libgstopengl_la-gstglviewconvert.lo `test -f 'gstglviewconvert.c' || echo '$(srcdir)/'`gstglviewconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglviewconvert.Tpo $(DEPDIR)/libgstopengl_la-gstglviewconvert.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglviewconvert.c' object='libgstopengl_la-gstglviewconvert.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-gstglviewconvert.lo `test -f 'gstglviewconvert.c' || echo '$(srcdir)/'`gstglviewconvert.c
+
+libgstopengl_la-gstglstereosplit.lo: gstglstereosplit.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-gstglstereosplit.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglstereosplit.Tpo -c -o libgstopengl_la-gstglstereosplit.lo `test -f 'gstglstereosplit.c' || echo '$(srcdir)/'`gstglstereosplit.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglstereosplit.Tpo $(DEPDIR)/libgstopengl_la-gstglstereosplit.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglstereosplit.c' object='libgstopengl_la-gstglstereosplit.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-gstglstereosplit.lo `test -f 'gstglstereosplit.c' || echo '$(srcdir)/'`gstglstereosplit.c
+
+libgstopengl_la-gstglstereomix.lo: gstglstereomix.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-gstglstereomix.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglstereomix.Tpo -c -o libgstopengl_la-gstglstereomix.lo `test -f 'gstglstereomix.c' || echo '$(srcdir)/'`gstglstereomix.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglstereomix.Tpo $(DEPDIR)/libgstopengl_la-gstglstereomix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglstereomix.c' object='libgstopengl_la-gstglstereomix.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-gstglstereomix.lo `test -f 'gstglstereomix.c' || echo '$(srcdir)/'`gstglstereomix.c
+
+libgstopengl_la-gltestsrc.lo: gltestsrc.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-gltestsrc.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gltestsrc.Tpo -c -o libgstopengl_la-gltestsrc.lo `test -f 'gltestsrc.c' || echo '$(srcdir)/'`gltestsrc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gltestsrc.Tpo $(DEPDIR)/libgstopengl_la-gltestsrc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gltestsrc.c' object='libgstopengl_la-gltestsrc.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-gltestsrc.lo `test -f 'gltestsrc.c' || echo '$(srcdir)/'`gltestsrc.c
+
+libgstopengl_la-gstgltestsrc.lo: gstgltestsrc.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-gstgltestsrc.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgltestsrc.Tpo -c -o libgstopengl_la-gstgltestsrc.lo `test -f 'gstgltestsrc.c' || echo '$(srcdir)/'`gstgltestsrc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgltestsrc.Tpo $(DEPDIR)/libgstopengl_la-gstgltestsrc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgltestsrc.c' object='libgstopengl_la-gstgltestsrc.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-gstgltestsrc.lo `test -f 'gstgltestsrc.c' || echo '$(srcdir)/'`gstgltestsrc.c
+
+libgstopengl_la-gstglmosaic.lo: gstglmosaic.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-gstglmosaic.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglmosaic.Tpo -c -o libgstopengl_la-gstglmosaic.lo `test -f 'gstglmosaic.c' || echo '$(srcdir)/'`gstglmosaic.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglmosaic.Tpo $(DEPDIR)/libgstopengl_la-gstglmosaic.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglmosaic.c' object='libgstopengl_la-gstglmosaic.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-gstglmosaic.lo `test -f 'gstglmosaic.c' || echo '$(srcdir)/'`gstglmosaic.c
 
 libgstopengl_la-gstgldifferencematte.lo: gstgldifferencematte.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-gstgldifferencematte.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgldifferencematte.Tpo -c -o libgstopengl_la-gstgldifferencematte.lo `test -f 'gstgldifferencematte.c' || echo '$(srcdir)/'`gstgldifferencematte.c
@@ -1296,6 +1472,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-gstgldifferencematte.lo `test -f 'gstgldifferencematte.c' || echo '$(srcdir)/'`gstgldifferencematte.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
+
 libgstopengl_la-gstgloverlay.lo: gstgloverlay.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-gstgloverlay.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgloverlay.Tpo -c -o libgstopengl_la-gstgloverlay.lo `test -f 'gstgloverlay.c' || echo '$(srcdir)/'`gstgloverlay.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgloverlay.Tpo $(DEPDIR)/libgstopengl_la-gstgloverlay.Plo
@@ -1303,12 +1486,36 @@
 @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
+.m.o:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepOBJC_TRUE@	$(OBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ $<
+
+.m.obj:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepOBJC_TRUE@	$(OBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.m.lo:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepOBJC_TRUE@	$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $<
+
+libgstopengl_la-caopengllayersink.lo: caopengllayersink.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstopengl_la-caopengllayersink.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-caopengllayersink.Tpo -c -o libgstopengl_la-caopengllayersink.lo `test -f 'caopengllayersink.m' || echo '$(srcdir)/'`caopengllayersink.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-caopengllayersink.Tpo $(DEPDIR)/libgstopengl_la-caopengllayersink.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='caopengllayersink.m' object='libgstopengl_la-caopengllayersink.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstopengl_la-caopengllayersink.lo `test -f 'caopengllayersink.m' || echo '$(srcdir)/'`caopengllayersink.m
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1401,7 +1608,7 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
 installdirs:
 	for dir in "$(DESTDIR)$(plugindir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -1526,6 +1733,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/gl/caopengllayersink.h b/ext/gl/caopengllayersink.h
new file mode 100644
index 0000000..b28eb3f
--- /dev/null
+++ b/ext/gl/caopengllayersink.h
@@ -0,0 +1,100 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 __CA_OPENGL_LAYER_SINK_H__
+#define __CA_OPENGL_LAYER_SINK_H__
+
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+
+#include <gst/gl/gl.h>
+#include <gst/gl/cocoa/gstglcaopengllayer.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_CA_OPENGL_LAYER_SINK \
+    (gst_ca_opengl_layer_sink_get_type())
+#define GST_CA_OPENGL_LAYER_SINK(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CA_OPENGL_LAYER_SINK,GstCAOpenGLLayerSink))
+#define GST_CA_OPENGL_LAYER_SINK_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CA_OPENGL_LAYER_SINK,GstCAOpenGLLayerSinkClass))
+#define GST_IS_CA_OPENGL_LAYER_SINK(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CA_OPENGL_LAYER_SINK))
+#define GST_IS_CA_OPENGL_LAYER_SINK_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CA_OPENGL_LAYER_SINK))
+
+typedef struct _GstCAOpenGLLayerSink GstCAOpenGLLayerSink;
+typedef struct _GstCAOpenGLLayerSinkClass GstCAOpenGLLayerSinkClass;
+
+struct _GstCAOpenGLLayerSink
+{
+    GstVideoSink video_sink;
+
+    /* caps */
+    GstVideoInfo info;
+    GstCaps *gl_caps;
+
+    /* gl state */
+    GstGLDisplay *display;
+    GstGLContext *other_context;
+    GstGLContext *context;
+
+    guint      next_tex;
+    GstBuffer *next_buffer;
+    GstBuffer *next_sync;
+
+    GstGLCAOpenGLLayer *layer;
+
+    volatile gint to_quit;
+    gboolean keep_aspect_ratio;
+
+    GstBufferPool *pool;
+
+    /* avoid replacing the stored_buffer while drawing */
+    GMutex drawing_lock;
+    GstBuffer *stored_buffer;
+    GstBuffer *stored_sync;
+    GLuint redisplay_texture;
+
+    gboolean caps_change;
+    guint window_width;
+    guint window_height;
+
+    /* gl state */
+    GstGLShader *redisplay_shader;
+    GLuint vao;
+    GLuint vertex_buffer;
+    GLuint vbo_indices;
+    GLint  attr_position;
+    GLint  attr_texture;
+};
+
+struct _GstCAOpenGLLayerSinkClass
+{
+    GstVideoSinkClass video_sink_class;
+};
+
+GType gst_ca_opengl_layer_sink_get_type(void);
+GType gst_ca_opengl_layer_sink_bin_get_type (void);
+
+G_END_DECLS
+
+#endif /* __CA_OPENGL_LAYER_SINK__ */
diff --git a/ext/gl/caopengllayersink.m b/ext/gl/caopengllayersink.m
new file mode 100644
index 0000000..22954ff
--- /dev/null
+++ b/ext/gl/caopengllayersink.m
@@ -0,0 +1,1059 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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-caopengllayersink
+ *
+ * caopengllayersink renders incoming video frames to CAOpenGLLayer that
+ * can be retrieved through the layer property and placed in the Core
+ * Animation render tree.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "caopengllayersink.h"
+#include "gstglsinkbin.h"
+#include <QuartzCore/QuartzCore.h>
+
+GST_DEBUG_CATEGORY (gst_debug_ca_sink);
+#define GST_CAT_DEFAULT gst_debug_ca_sink
+
+typedef GstGLSinkBin GstCAOpenGLLayerSinkBin;
+typedef GstGLSinkBinClass GstCAOpenGLLayerSinkBinClass;
+
+G_DEFINE_TYPE (GstCAOpenGLLayerSinkBin, gst_ca_opengl_layer_sink_bin,
+    GST_TYPE_GL_SINK_BIN);
+
+enum
+{
+  PROP_BIN_0,
+  PROP_BIN_QOS,
+  PROP_BIN_FORCE_ASPECT_RATIO,
+  PROP_BIN_LAST_SAMPLE,
+  PROP_BIN_LAYER,
+};
+
+static void
+_on_notify_layer (GObject * object, GParamSpec *pspec, gpointer user_data)
+{
+  GstCAOpenGLLayerSinkBin *self = user_data;
+
+  g_object_notify (G_OBJECT (self), "layer");
+}
+
+static void
+gst_ca_opengl_layer_sink_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec)
+{
+  g_object_set_property (G_OBJECT (GST_GL_SINK_BIN (object)->sink),
+      param_spec->name, value);
+}
+
+static void
+gst_ca_opengl_layer_sink_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec)
+{
+  g_object_get_property (G_OBJECT (GST_GL_SINK_BIN (object)->sink),
+      param_spec->name, value);
+}
+
+static void
+gst_ca_opengl_layer_sink_bin_init (GstCAOpenGLLayerSinkBin * self)
+{
+  GstGLCAOpenGLLayer *sink = g_object_new (GST_TYPE_CA_OPENGL_LAYER_SINK, NULL);
+
+  g_signal_connect (sink, "notify::layer", G_CALLBACK (_on_notify_layer), self);
+
+  gst_gl_sink_bin_finish_init_with_element (GST_GL_SINK_BIN (self),
+      GST_ELEMENT (sink));
+}
+
+static void
+gst_ca_opengl_layer_sink_bin_class_init (GstCAOpenGLLayerSinkBinClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->get_property = gst_ca_opengl_layer_sink_bin_get_property;
+  gobject_class->set_property = gst_ca_opengl_layer_sink_bin_set_property;
+
+  g_object_class_install_property (gobject_class, PROP_BIN_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_BIN_LAST_SAMPLE,
+      g_param_spec_boxed ("last-sample", "Last Sample",
+          "The last sample received in the sink", GST_TYPE_SAMPLE,
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_BIN_LAYER,
+      g_param_spec_pointer ("layer", "CAOpenGLLayer",
+          "OpenGL Core Animation layer",
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_BIN_QOS,
+      g_param_spec_boolean ("qos", "Quality of Service",
+          "Generate Quality-of-Service events upstream", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+#define GST_CA_OPENGL_LAYER_SINK_GET_LOCK(glsink) \
+  (GST_CA_OPENGL_LAYER_SINK(glsink)->drawing_lock)
+#define GST_CA_OPENGL_LAYER_SINK_LOCK(glsink) \
+  (g_mutex_lock(&GST_CA_OPENGL_LAYER_SINK_GET_LOCK (glsink)))
+#define GST_CA_OPENGL_LAYER_SINK_UNLOCK(glsink) \
+  (g_mutex_unlock(&GST_CA_OPENGL_LAYER_SINK_GET_LOCK (glsink)))
+
+#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 SUPPORTED_GL_APIS GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3
+
+static void gst_ca_opengl_layer_sink_thread_init_redisplay (GstCAOpenGLLayerSink * ca_sink);
+static void gst_ca_opengl_layer_sink_cleanup_glthread (GstCAOpenGLLayerSink * ca_sink);
+static void gst_ca_opengl_layer_sink_on_resize (GstCAOpenGLLayerSink * ca_sink,
+    gint width, gint height);
+static void gst_ca_opengl_layer_sink_on_draw (GstCAOpenGLLayerSink * ca_sink);
+
+static void gst_ca_opengl_layer_sink_finalize (GObject * object);
+static void gst_ca_opengl_layer_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_ca_opengl_layer_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static gboolean gst_ca_opengl_layer_sink_stop (GstBaseSink * bsink);
+
+static gboolean gst_ca_opengl_layer_sink_query (GstBaseSink * bsink, GstQuery * query);
+static void gst_ca_opengl_layer_sink_set_context (GstElement * element,
+    GstContext * context);
+
+static GstStateChangeReturn gst_ca_opengl_layer_sink_change_state (GstElement *
+    element, GstStateChange transition);
+
+static void gst_ca_opengl_layer_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end);
+static gboolean gst_ca_opengl_layer_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
+static GstFlowReturn gst_ca_opengl_layer_sink_prepare (GstBaseSink * bsink,
+    GstBuffer * buf);
+static GstFlowReturn gst_ca_opengl_layer_sink_show_frame (GstVideoSink * bsink,
+    GstBuffer * buf);
+static gboolean gst_ca_opengl_layer_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+
+static GstStaticPadTemplate gst_ca_opengl_layer_sink_template =
+    GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA"))
+    );
+
+enum
+{
+  PROP_0,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_CONTEXT,
+  PROP_LAYER,
+};
+
+#define gst_ca_opengl_layer_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstCAOpenGLLayerSink, gst_ca_opengl_layer_sink,
+    GST_TYPE_VIDEO_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_ca_sink,
+        "caopengllayersink", 0, "CAOpenGLLayer Video Sink"));
+
+static void
+gst_ca_opengl_layer_sink_class_init (GstCAOpenGLLayerSinkClass * klass)
+{
+  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_ca_opengl_layer_sink_set_property;
+  gobject_class->get_property = gst_ca_opengl_layer_sink_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_CONTEXT,
+      g_param_spec_object ("context",
+          "OpenGL context",
+          "Get OpenGL context",
+          GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_LAYER,
+      g_param_spec_pointer ("layer", "CAOpenGLLayer",
+          "OpenGL Core Animation layer",
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_set_metadata (element_class, "CAOpenGLLayer video sink",
+      "Sink/Video", "A video sink based on CAOpenGLLayer",
+      "Matthew Waters <matthew@centricular.com>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_ca_opengl_layer_sink_template));
+
+  gobject_class->finalize = gst_ca_opengl_layer_sink_finalize;
+
+  gstelement_class->change_state = gst_ca_opengl_layer_sink_change_state;
+  gstelement_class->set_context = gst_ca_opengl_layer_sink_set_context;
+  gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_ca_opengl_layer_sink_query);
+  gstbasesink_class->set_caps = gst_ca_opengl_layer_sink_set_caps;
+  gstbasesink_class->get_times = gst_ca_opengl_layer_sink_get_times;
+  gstbasesink_class->prepare = gst_ca_opengl_layer_sink_prepare;
+  gstbasesink_class->propose_allocation = gst_ca_opengl_layer_sink_propose_allocation;
+  gstbasesink_class->stop = gst_ca_opengl_layer_sink_stop;
+
+  gstvideosink_class->show_frame =
+      GST_DEBUG_FUNCPTR (gst_ca_opengl_layer_sink_show_frame);
+}
+
+static void
+gst_ca_opengl_layer_sink_init (GstCAOpenGLLayerSink * ca_sink)
+{
+  ca_sink->display = NULL;
+  ca_sink->keep_aspect_ratio = TRUE;
+  ca_sink->pool = NULL;
+  ca_sink->stored_buffer = NULL;
+  ca_sink->redisplay_texture = 0;
+
+  g_mutex_init (&ca_sink->drawing_lock);
+}
+
+static void
+gst_ca_opengl_layer_sink_finalize (GObject * object)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+
+  g_return_if_fail (GST_IS_CA_OPENGL_LAYER_SINK (object));
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (object);
+
+  g_mutex_clear (&ca_sink->drawing_lock);
+
+  GST_DEBUG ("finalized");
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_ca_opengl_layer_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+
+  g_return_if_fail (GST_IS_CA_OPENGL_LAYER_SINK (object));
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+    {
+      ca_sink->keep_aspect_ratio = g_value_get_boolean (value);
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_ca_opengl_layer_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+
+  g_return_if_fail (GST_IS_CA_OPENGL_LAYER_SINK (object));
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+      g_value_set_boolean (value, ca_sink->keep_aspect_ratio);
+      break;
+    case PROP_CONTEXT:
+      g_value_set_object (value, ca_sink->context);
+      break;
+    case PROP_LAYER:
+      g_value_set_pointer (value, ca_sink->layer);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+_create_layer (gpointer data)
+{
+  GstCAOpenGLLayerSink *ca_sink = data;
+
+  if (!ca_sink->layer) {
+    ca_sink->layer = [[NSClassFromString(@"GstGLCAOpenGLLayer") alloc]
+        initWithGstGLContext:GST_GL_CONTEXT_COCOA (ca_sink->context)];
+    [ca_sink->layer setDrawCallback:(GstGLWindowCB)gst_ca_opengl_layer_sink_on_draw
+        data:ca_sink notify:NULL];
+    [ca_sink->layer setResizeCallback:(GstGLWindowResizeCB)gst_ca_opengl_layer_sink_on_resize
+        data:ca_sink notify:NULL];
+    g_object_notify (G_OBJECT (ca_sink), "layer");
+  }
+}
+
+static void
+_invoke_on_main (GstGLWindowCB func, gpointer data)
+{
+  if ([NSThread isMainThread]) {
+    func (data);
+  } else {
+    dispatch_sync (dispatch_get_main_queue (), ^{
+      func (data);
+    });
+  }
+}
+
+static gboolean
+_ensure_gl_setup (GstCAOpenGLLayerSink * ca_sink)
+{
+  GError *error = NULL;
+
+  if (!gst_gl_ensure_element_data (ca_sink, &ca_sink->display,
+          &ca_sink->other_context))
+    return FALSE;
+
+  gst_gl_display_filter_gl_api (ca_sink->display, SUPPORTED_GL_APIS);
+
+  if (!ca_sink->context) {
+    if (!gst_gl_display_create_context (ca_sink->display,
+            ca_sink->other_context, &ca_sink->context, &error)) {
+      goto context_error;
+    }
+  }
+
+  if (!ca_sink->layer)
+    _invoke_on_main ((GstGLWindowCB) _create_layer, ca_sink);
+
+  return TRUE;
+
+context_error:
+  {
+    GST_ELEMENT_ERROR (ca_sink, RESOURCE, NOT_FOUND, ("%s", error->message),
+        (NULL));
+    gst_object_unref (ca_sink->context);
+    ca_sink->context = NULL;
+    return FALSE;
+  }
+}
+
+static gboolean
+gst_ca_opengl_layer_sink_query (GstBaseSink * bsink, GstQuery * query)
+{
+  GstCAOpenGLLayerSink *ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+      gboolean ret;
+
+      ret =
+          gst_gl_handle_context_query ((GstElement *) ca_sink, query,
+          &ca_sink->display, &ca_sink->other_context);
+      if (ca_sink->display)
+        gst_gl_display_filter_gl_api (ca_sink->display, SUPPORTED_GL_APIS);
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT,
+            ca_sink->context, NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = ca_sink->context != NULL;
+      }
+      GST_DEBUG_OBJECT (ca_sink, "context query of type %s %i",
+          context_type, ret);
+
+      if (ret)
+        return ret;
+    }
+    case GST_QUERY_DRAIN:
+    {
+      GstBuffer *buf = NULL;
+
+      GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+      ca_sink->redisplay_texture = 0;
+      buf = ca_sink->stored_buffer;
+      ca_sink->stored_buffer = NULL;
+      GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+
+      if (buf)
+        gst_buffer_unref (buf);
+
+      gst_buffer_replace (&ca_sink->next_buffer, NULL);
+      gst_buffer_replace (&ca_sink->next_sync, NULL);
+
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
+}
+
+static gboolean
+gst_ca_opengl_layer_sink_stop (GstBaseSink * bsink)
+{
+  GstCAOpenGLLayerSink *ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+
+  if (ca_sink->pool) {
+    gst_object_unref (ca_sink->pool);
+    ca_sink->pool = NULL;
+  }
+
+  if (ca_sink->gl_caps) {
+    gst_caps_unref (ca_sink->gl_caps);
+    ca_sink->gl_caps = NULL;
+  }
+
+  return TRUE;
+}
+
+static void
+gst_ca_opengl_layer_sink_set_context (GstElement * element, GstContext * context)
+{
+  GstCAOpenGLLayerSink *ca_sink = GST_CA_OPENGL_LAYER_SINK (element);
+
+  gst_gl_handle_set_context (element, context, &ca_sink->display,
+      &ca_sink->other_context);
+
+  if (ca_sink->display)
+    gst_gl_display_filter_gl_api (ca_sink->display, SUPPORTED_GL_APIS);
+}
+
+static GstStateChangeReturn
+gst_ca_opengl_layer_sink_change_state (GstElement * element, GstStateChange transition)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  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)));
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      _ensure_gl_setup (ca_sink);
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      g_atomic_int_set (&ca_sink->to_quit, 0);
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+      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_PLAYING_TO_PAUSED:
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+    {
+      /* mark the redisplay_texture as unavailable (=0)
+       * to avoid drawing
+       */
+      GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+      ca_sink->redisplay_texture = 0;
+
+      gst_buffer_replace (&ca_sink->stored_sync, NULL);
+
+      if (ca_sink->stored_buffer) {
+        gst_buffer_unref (ca_sink->stored_buffer);
+        ca_sink->stored_buffer = NULL;
+      }
+      gst_buffer_replace (&ca_sink->next_buffer, NULL);
+      gst_buffer_replace (&ca_sink->next_sync, NULL);
+      GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+
+      if (ca_sink->pool) {
+        gst_buffer_pool_set_active (ca_sink->pool, FALSE);
+        gst_object_unref (ca_sink->pool);
+        ca_sink->pool = NULL;
+      }
+
+      GST_VIDEO_SINK_WIDTH (ca_sink) = 1;
+      GST_VIDEO_SINK_HEIGHT (ca_sink) = 1;
+      if (ca_sink->context) {
+        gst_object_unref (ca_sink->context);
+        ca_sink->context = NULL;
+      }
+
+      if (ca_sink->display) {
+        gst_object_unref (ca_sink->display);
+        ca_sink->display = NULL;
+      }
+      break;
+    }
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_ca_opengl_layer_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+
+  if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+    *start = GST_BUFFER_TIMESTAMP (buf);
+    if (GST_BUFFER_DURATION_IS_VALID (buf))
+      *end = *start + GST_BUFFER_DURATION (buf);
+    else {
+      if (GST_VIDEO_INFO_FPS_N (&ca_sink->info) > 0) {
+        *end = *start +
+            gst_util_uint64_scale_int (GST_SECOND,
+            GST_VIDEO_INFO_FPS_D (&ca_sink->info),
+            GST_VIDEO_INFO_FPS_N (&ca_sink->info));
+      }
+    }
+  }
+}
+
+static gboolean
+gst_ca_opengl_layer_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+  gint width;
+  gint height;
+  gboolean ok;
+  gint par_n, par_d;
+  gint display_par_n, display_par_d;
+  guint display_ratio_num, display_ratio_den;
+  GstVideoInfo vinfo;
+
+  GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps);
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+
+  ok = gst_video_info_from_caps (&vinfo, caps);
+  if (!ok)
+    return FALSE;
+
+  width = GST_VIDEO_INFO_WIDTH (&vinfo);
+  height = GST_VIDEO_INFO_HEIGHT (&vinfo);
+
+  par_n = GST_VIDEO_INFO_PAR_N (&vinfo);
+  par_d = GST_VIDEO_INFO_PAR_D (&vinfo);
+
+  if (!par_n)
+    par_n = 1;
+
+  display_par_n = 1;
+  display_par_d = 1;
+
+  ok = gst_video_calculate_display_ratio (&display_ratio_num,
+      &display_ratio_den, width, height, par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (!ok)
+    return FALSE;
+
+  GST_TRACE ("PAR: %u/%u DAR:%u/%u", par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (height % display_ratio_den == 0) {
+    GST_DEBUG ("keeping video height");
+    GST_VIDEO_SINK_WIDTH (ca_sink) = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    GST_VIDEO_SINK_HEIGHT (ca_sink) = height;
+  } else if (width % display_ratio_num == 0) {
+    GST_DEBUG ("keeping video width");
+    GST_VIDEO_SINK_WIDTH (ca_sink) = width;
+    GST_VIDEO_SINK_HEIGHT (ca_sink) = (guint)
+        gst_util_uint64_scale_int (width, display_ratio_den, display_ratio_num);
+  } else {
+    GST_DEBUG ("approximating while keeping video height");
+    GST_VIDEO_SINK_WIDTH (ca_sink) = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    GST_VIDEO_SINK_HEIGHT (ca_sink) = height;
+  }
+  GST_DEBUG ("scaling to %dx%d", GST_VIDEO_SINK_WIDTH (ca_sink),
+      GST_VIDEO_SINK_HEIGHT (ca_sink));
+
+  ca_sink->info = vinfo;
+  if (!_ensure_gl_setup (ca_sink))
+    return FALSE;
+
+  ca_sink->caps_change = TRUE;
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_ca_opengl_layer_sink_prepare (GstBaseSink * bsink, GstBuffer * buf)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+  GstBuffer *next_sync, *old_sync, *old_buffer;
+  GstVideoFrame gl_frame;
+  GstGLSyncMeta *sync_meta;
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+
+  GST_TRACE ("preparing buffer:%p", buf);
+
+  if (GST_VIDEO_SINK_WIDTH (ca_sink) < 1 ||
+      GST_VIDEO_SINK_HEIGHT (ca_sink) < 1) {
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+
+  if (!_ensure_gl_setup (ca_sink))
+    return GST_FLOW_NOT_NEGOTIATED;
+
+  if (!gst_video_frame_map (&gl_frame, &ca_sink->info, buf,
+          GST_MAP_READ | GST_MAP_GL)) {
+    goto upload_failed;
+  }
+
+  ca_sink->next_tex = *(guint *) gl_frame.data[0];
+
+  next_sync = gst_buffer_new ();
+  sync_meta = gst_buffer_add_gl_sync_meta (ca_sink->context, next_sync);
+  gst_gl_sync_meta_set_sync_point (sync_meta, ca_sink->context);
+
+  GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+  ca_sink->next_tex = *(guint *) gl_frame.data[0];
+
+  old_buffer = ca_sink->next_buffer;
+  ca_sink->next_buffer = gst_buffer_ref (buf);
+
+  old_sync = ca_sink->next_sync;
+  ca_sink->next_sync = next_sync;
+  GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+
+  if (old_buffer)
+    gst_buffer_unref (old_buffer);
+  if (old_sync)
+    gst_buffer_unref (old_sync);
+
+  gst_video_frame_unmap (&gl_frame);
+
+  return GST_FLOW_OK;
+
+upload_failed:
+  {
+    GST_ELEMENT_ERROR (ca_sink, RESOURCE, NOT_FOUND,
+        ("%s", "Failed to upload buffer"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+}
+
+static GstFlowReturn
+gst_ca_opengl_layer_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
+{
+  GstCAOpenGLLayerSink *ca_sink;
+  GstBuffer *stored_buffer, *old_sync;
+
+  GST_TRACE ("rendering buffer:%p", buf);
+
+  ca_sink = GST_CA_OPENGL_LAYER_SINK (vsink);
+
+  GST_TRACE ("redisplay texture:%u of size:%ux%u, window size:%ux%u",
+      ca_sink->next_tex, GST_VIDEO_INFO_WIDTH (&ca_sink->info),
+      GST_VIDEO_INFO_HEIGHT (&ca_sink->info),
+      GST_VIDEO_SINK_WIDTH (ca_sink),
+      GST_VIDEO_SINK_HEIGHT (ca_sink));
+
+  /* Avoid to release the texture while drawing */
+  GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+  ca_sink->redisplay_texture = ca_sink->next_tex;
+
+  stored_buffer = ca_sink->stored_buffer;
+  ca_sink->stored_buffer = gst_buffer_ref (ca_sink->next_buffer);
+
+  old_sync = ca_sink->stored_sync;
+  ca_sink->stored_sync = gst_buffer_ref (ca_sink->next_sync);
+  GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+
+  /* The layer will automatically call the draw callback to draw the new
+   * content */
+  [CATransaction begin];
+  [ca_sink->layer setNeedsDisplay];
+  [CATransaction commit];
+
+  GST_TRACE ("post redisplay");
+
+  if (stored_buffer)
+    gst_buffer_unref (stored_buffer);
+  if (old_sync)
+    gst_buffer_unref (old_sync);
+
+  if (g_atomic_int_get (&ca_sink->to_quit) != 0) {
+    GST_ELEMENT_ERROR (ca_sink, RESOURCE, NOT_FOUND,
+        ("%s", gst_gl_context_get_error ()), (NULL));
+    return GST_FLOW_ERROR;
+  }
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_ca_opengl_layer_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
+{
+  GstCAOpenGLLayerSink *ca_sink = GST_CA_OPENGL_LAYER_SINK (bsink);
+  GstStructure *config;
+  GstCaps *caps;
+  guint size;
+  gboolean need_pool;
+
+  if (!_ensure_gl_setup (ca_sink))
+    return FALSE;
+
+  gst_query_parse_allocation (query, &caps, &need_pool);
+
+  if (caps == NULL)
+    goto no_caps;
+
+  if (need_pool) {
+    GstVideoInfo info;
+
+    if (!gst_video_info_from_caps (&info, caps))
+      goto invalid_caps;
+
+    /* the normal size of a frame */
+    size = info.size;
+
+    if (ca_sink->pool) {
+      GstCaps *pcaps;
+
+      /* we had a pool, check caps */
+      GST_DEBUG_OBJECT (ca_sink, "check existing pool caps");
+      config = gst_buffer_pool_get_config (ca_sink->pool);
+      gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
+
+      if (!gst_caps_is_equal (caps, pcaps)) {
+        GST_DEBUG_OBJECT (ca_sink, "pool has different caps");
+        /* different caps, we can't use this pool */
+        gst_object_unref (ca_sink->pool);
+        ca_sink->pool = NULL;
+      }
+      gst_structure_free (config);
+    }
+
+    if (ca_sink->pool == NULL) {
+      GST_DEBUG_OBJECT (ca_sink, "create new pool");
+
+      ca_sink->pool = gst_gl_buffer_pool_new (ca_sink->context);
+      config = gst_buffer_pool_get_config (ca_sink->pool);
+      gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+
+      if (!gst_buffer_pool_set_config (ca_sink->pool, config))
+        goto config_failed;
+    }
+
+    /* we need at least 2 buffer because we hold on to the last one */
+    gst_query_add_allocation_pool (query, ca_sink->pool, size, 2, 0);
+  }
+
+  if (ca_sink->context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
+
+  return TRUE;
+
+  /* ERRORS */
+no_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "no caps specified");
+    return FALSE;
+  }
+invalid_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
+    return FALSE;
+  }
+config_failed:
+  {
+    GST_DEBUG_OBJECT (bsink, "failed setting config");
+    return FALSE;
+  }
+}
+
+/* *INDENT-OFF* */
+static const GLfloat vertices[] = {
+     1.0f,  1.0f, 0.0f, 1.0f, 0.0f,
+    -1.0f,  1.0f, 0.0f, 0.0f, 0.0f,
+    -1.0f, -1.0f, 0.0f, 0.0f, 1.0f,
+     1.0f, -1.0f, 0.0f, 1.0f, 1.0f
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+/* *INDENT-ON* */
+
+static void
+_bind_buffer (GstCAOpenGLLayerSink * ca_sink)
+{
+  const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, ca_sink->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, ca_sink->vertex_buffer);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (ca_sink->attr_position, 3, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (ca_sink->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (ca_sink->attr_position);
+  gl->EnableVertexAttribArray (ca_sink->attr_texture);
+}
+
+static void
+_unbind_buffer (GstCAOpenGLLayerSink * ca_sink)
+{
+  const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (ca_sink->attr_position);
+  gl->DisableVertexAttribArray (ca_sink->attr_texture);
+}
+
+/* Called in the gl thread */
+static void
+gst_ca_opengl_layer_sink_thread_init_redisplay (GstCAOpenGLLayerSink * ca_sink)
+{
+  const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+
+  ca_sink->redisplay_shader = gst_gl_shader_new (ca_sink->context);
+
+  if (!gst_gl_shader_compile_with_default_vf_and_check
+      (ca_sink->redisplay_shader, &ca_sink->attr_position,
+          &ca_sink->attr_texture))
+    gst_ca_opengl_layer_sink_cleanup_glthread (ca_sink);
+
+  if (gl->GenVertexArrays) {
+    gl->GenVertexArrays (1, &ca_sink->vao);
+    gl->BindVertexArray (ca_sink->vao);
+  }
+
+  if (!ca_sink->vertex_buffer) {
+    gl->GenBuffers (1, &ca_sink->vertex_buffer);
+    gl->BindBuffer (GL_ARRAY_BUFFER, ca_sink->vertex_buffer);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+  }
+
+  if (!ca_sink->vbo_indices) {
+    gl->GenBuffers (1, &ca_sink->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, ca_sink->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+  }
+
+  if (gl->GenVertexArrays) {
+    _bind_buffer (ca_sink);
+    gl->BindVertexArray (0);
+  }
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+}
+
+static void
+gst_ca_opengl_layer_sink_cleanup_glthread (GstCAOpenGLLayerSink * ca_sink)
+{
+  const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+
+  if (ca_sink->redisplay_shader) {
+    gst_object_unref (ca_sink->redisplay_shader);
+    ca_sink->redisplay_shader = NULL;
+  }
+
+  if (ca_sink->vao) {
+    gl->DeleteVertexArrays (1, &ca_sink->vao);
+    ca_sink->vao = 0;
+  }
+
+  if (ca_sink->vbo_indices) {
+    gl->DeleteBuffers (1, &ca_sink->vbo_indices);
+    ca_sink->vbo_indices = 0;
+  }
+
+  if (ca_sink->vertex_buffer) {
+    gl->DeleteBuffers (1, &ca_sink->vertex_buffer);
+    ca_sink->vertex_buffer = 0;
+  }
+}
+
+static void
+gst_ca_opengl_layer_sink_on_resize (GstCAOpenGLLayerSink * ca_sink, gint width, gint height)
+{
+  /* Here ca_sink members (ex:ca_sink->info) have a life time of set_caps.
+   * It means that they cannot not change between two set_caps
+   */
+  const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+
+  GST_TRACE ("GL Window resized to %ux%u", width, height);
+
+  width = MAX (1, width);
+  height = MAX (1, height);
+
+  ca_sink->window_width = width;
+  ca_sink->window_height = height;
+
+  /* default reshape */
+  if (ca_sink->keep_aspect_ratio) {
+    GstVideoRectangle src, dst, result;
+
+    src.x = 0;
+    src.y = 0;
+    src.w = GST_VIDEO_SINK_WIDTH (ca_sink);
+    src.h = GST_VIDEO_SINK_HEIGHT (ca_sink);
+
+    dst.x = 0;
+    dst.y = 0;
+    dst.w = width;
+    dst.h = height;
+
+    gst_video_sink_center_rect (src, dst, &result, TRUE);
+    gl->Viewport (result.x, result.y, result.w, result.h);
+  } else {
+    gl->Viewport (0, 0, width, height);
+  }
+}
+
+static void
+gst_ca_opengl_layer_sink_on_draw (GstCAOpenGLLayerSink * ca_sink)
+{
+  /* Here ca_sink members (ex:ca_sink->info) have a life time of set_caps.
+   * It means that they cannot not change between two set_caps as well as
+   * for the redisplay_texture size.
+   * Whereas redisplay_texture id changes every sink_render
+   */
+
+  const GstGLFuncs *gl = NULL;
+  GstGLSyncMeta *sync_meta;
+
+  g_return_if_fail (GST_IS_CA_OPENGL_LAYER_SINK (ca_sink));
+
+  gl = ca_sink->context->gl_vtable;
+
+  GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+
+  if (G_UNLIKELY (!ca_sink->redisplay_shader)) {
+    gst_ca_opengl_layer_sink_thread_init_redisplay (ca_sink);
+  }
+
+  /* check if texture is ready for being drawn */
+  if (!ca_sink->redisplay_texture) {
+    gl->ClearColor (0.0f, 0.0f, 0.0f, 1.0f);
+    gl->Clear (GL_COLOR_BUFFER_BIT);
+    GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+    return;
+  }
+
+  /* opengl scene */
+  GST_TRACE ("redrawing texture:%u", ca_sink->redisplay_texture);
+
+  if (ca_sink->caps_change) {
+    GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+    gst_ca_opengl_layer_sink_on_resize (ca_sink, ca_sink->window_width,
+        ca_sink->window_height);
+    GST_CA_OPENGL_LAYER_SINK_LOCK (ca_sink);
+    ca_sink->caps_change = TRUE;
+  }
+
+  sync_meta = gst_buffer_get_gl_sync_meta (ca_sink->stored_sync);
+  if (sync_meta)
+    gst_gl_sync_meta_wait (sync_meta, gst_gl_context_get_current ());
+
+  gl->BindTexture (GL_TEXTURE_2D, 0);
+
+  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
+  gl->Clear (GL_COLOR_BUFFER_BIT);
+
+  gst_gl_shader_use (ca_sink->redisplay_shader);
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (ca_sink->vao);
+  else
+    _bind_buffer (ca_sink);
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, ca_sink->redisplay_texture);
+  gst_gl_shader_set_uniform_1i (ca_sink->redisplay_shader, "tex", 0);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (0);
+  else
+    _unbind_buffer (ca_sink);
+
+  /* end default opengl scene */
+  GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
+}
diff --git a/ext/gl/effects/gstgleffectblur.c b/ext/gl/effects/gstgleffectblur.c
new file mode 100644
index 0000000..f03af37
--- /dev/null
+++ b/ext/gl/effects/gstgleffectblur.c
@@ -0,0 +1,118 @@
+/*
+ * GStreamer
+ * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
+ * Copyright (C) 2015 Michał Dębski <debski.mi.zd@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 "../gstgleffects.h"
+
+static float *
+gst_gl_effects_blur_kernel (void)
+{
+  /* gaussian kernel (well, actually vector), size 9, standard
+   * deviation 3.0 */
+  /* FIXME: make this a runtime property */
+  static gfloat *kernel = NULL;
+  if (G_UNLIKELY (NULL == kernel)) {
+    /* 3x3 matrix */
+    kernel = g_malloc (sizeof (gfloat) * 9);
+    fill_gaussian_kernel (kernel, 7, 3.f);
+  }
+  return kernel;
+}
+
+static void
+gst_gl_effects_blur_callback_hconv (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "hconv0",
+              hconv7_fragment_source_gles2))) {
+    GstGLFilter *filter = GST_GL_FILTER (effects);
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1f (shader, "gauss_width", width);
+    gst_gl_shader_set_uniform_1fv (shader, "kernel", 7,
+        gst_gl_effects_blur_kernel ());
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+static void
+gst_gl_effects_blur_callback_vconv (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "vconv0",
+              vconv7_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1f (shader, "gauss_height", height);
+    gst_gl_shader_set_uniform_1fv (shader, "kernel", 7,
+        gst_gl_effects_blur_kernel ());
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+void
+gst_gl_effects_blur (GstGLEffects * effects)
+{
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  gst_gl_filter_render_to_target (filter, TRUE, effects->intexture,
+      effects->midtexture[0], gst_gl_effects_blur_callback_hconv, effects);
+  gst_gl_filter_render_to_target (filter, FALSE, effects->midtexture[0],
+      effects->outtexture, gst_gl_effects_blur_callback_vconv, effects);
+}
diff --git a/ext/gl/effects/gstgleffectbulge.c b/ext/gl/effects/gstgleffectbulge.c
index a59f276..9856321 100644
--- a/ext/gl/effects/gstgleffectbulge.c
+++ b/ext/gl/effects/gstgleffectbulge.c
@@ -30,38 +30,29 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "bulge0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "bulge",
+      bulge_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "bulge0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          bulge_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize bulge shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectfisheye.c b/ext/gl/effects/gstgleffectfisheye.c
index 80456ff..285deb3 100644
--- a/ext/gl/effects/gstgleffectfisheye.c
+++ b/ext/gl/effects/gstgleffectfisheye.c
@@ -30,38 +30,29 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "fisheye0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "fisheye",
+      fisheye_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "fisheye0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          fisheye_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize fisheye shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectglow.c b/ext/gl/effects/gstgleffectglow.c
index c3adeeb..9fc09e0 100644
--- a/ext/gl/effects/gstgleffectglow.c
+++ b/ext/gl/effects/gstgleffectglow.c
@@ -33,32 +33,25 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "glow0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "luma_threshold",
+      luma_threshold_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "glow0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          luma_threshold_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize luma threshold shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
@@ -73,42 +66,34 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "glow1");
+  shader = gst_gl_effects_get_fragment_shader (effects, "hconv7",
+      hconv7_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "glow1", shader);
-  }
+  if (!shader)
+    return;
 
   if (!kernel_ready) {
     fill_gaussian_kernel (gauss_kernel, 7, 10.0);
     kernel_ready = TRUE;
   }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          hconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize hconv7 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
-    return;
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
   }
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1fv (shader, "kernel", 7, gauss_kernel);
-  gst_gl_shader_set_uniform_1f (shader, "height", height);
+  gst_gl_shader_set_uniform_1f (shader, "gauss_width", width);
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
@@ -120,37 +105,30 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "glow2");
+  shader = gst_gl_effects_get_fragment_shader (effects, "vconv7",
+      vconv7_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "glow2", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          vconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize vcon7 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1fv (shader, "kernel", 7, gauss_kernel);
-  gst_gl_shader_set_uniform_1f (shader, "width", width);
+  gst_gl_shader_set_uniform_1f (shader, "gauss_height", height);
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
@@ -162,41 +140,32 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "glow3");
+  shader = gst_gl_effects_get_fragment_shader (effects, "sum",
+      sum_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "glow3", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          sum_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize sum shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE2);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, effects->intexture);
-  gl->Disable (GL_TEXTURE_2D);
 
-  gst_gl_shader_set_uniform_1f (shader, "alpha", 1.0);
+  gst_gl_shader_set_uniform_1f (shader, "alpha", 1.0f);
   gst_gl_shader_set_uniform_1i (shader, "base", 2);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1f (shader, "beta", (gfloat) 1 / 3.5f);
   gst_gl_shader_set_uniform_1i (shader, "blend", 1);
@@ -212,11 +181,14 @@
   /* threshold */
   gst_gl_filter_render_to_target (filter, TRUE, effects->intexture,
       effects->midtexture[0], gst_gl_effects_glow_step_one, effects);
+
   /* blur */
   gst_gl_filter_render_to_target (filter, FALSE, effects->midtexture[0],
       effects->midtexture[1], gst_gl_effects_glow_step_two, effects);
+
   gst_gl_filter_render_to_target (filter, FALSE, effects->midtexture[1],
       effects->midtexture[2], gst_gl_effects_glow_step_three, effects);
+
   /* add blurred luma to intexture */
   gst_gl_filter_render_to_target (filter, FALSE, effects->midtexture[2],
       effects->outtexture, gst_gl_effects_glow_step_four, effects);
diff --git a/ext/gl/effects/gstgleffectidentity.c b/ext/gl/effects/gstgleffectidentity.c
index 5cf06e0..9740cc7 100644
--- a/ext/gl/effects/gstgleffectidentity.c
+++ b/ext/gl/effects/gstgleffectidentity.c
@@ -23,20 +23,15 @@
 
 #include "../gstgleffects.h"
 
-#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,
     gpointer data)
 {
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
+  GstGLShader *shader;
 
 #if GST_GL_HAVE_OPENGL
   if (USING_OPENGL (context)) {
@@ -44,35 +39,27 @@
     gl->LoadIdentity ();
   }
 #endif
-#if GST_GL_HAVE_GLES2
-  if (USING_GLES2 (context)) {
-    GstGLShader *shader =
-        g_hash_table_lookup (effects->shaderstable, "identity0");
 
-    if (!shader) {
-      shader = gst_gl_shader_new (context);
-      g_hash_table_insert (effects->shaderstable, (gchar *) "identity0",
-          shader);
+  shader = g_hash_table_lookup (effects->shaderstable, "identity0");
+  if (!shader) {
+    shader = gst_gl_shader_new (context);
+    g_hash_table_insert (effects->shaderstable, (gchar *) "identity0", shader);
 
-      if (!gst_gl_shader_compile_with_default_vf_and_check (shader,
-              &filter->draw_attr_position_loc,
-              &filter->draw_attr_texture_loc)) {
-        /* gst gl context error is already set */
-        GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-            ("Failed to initialize identity shader, %s",
-                gst_gl_context_get_error ()), (NULL));
-        return;
-      }
+    if (!gst_gl_shader_compile_with_default_vf_and_check (shader,
+            &filter->draw_attr_position_loc, &filter->draw_attr_texture_loc)) {
+      /* gst gl context error is already set */
+      GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
+          ("Failed to initialize identity shader, %s",
+              gst_gl_context_get_error ()), (NULL));
+      return;
     }
-    gst_gl_shader_use (shader);
-
-    gl->ActiveTexture (GL_TEXTURE0);
-    gl->Enable (GL_TEXTURE_2D);
-    gl->BindTexture (GL_TEXTURE_2D, texture);
-
-    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
   }
-#endif
+  gst_gl_shader_use (shader);
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, texture);
+
+  gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
diff --git a/ext/gl/effects/gstgleffectlaplacian.c b/ext/gl/effects/gstgleffectlaplacian.c
new file mode 100644
index 0000000..ca5b88c
--- /dev/null
+++ b/ext/gl/effects/gstgleffectlaplacian.c
@@ -0,0 +1,72 @@
+/*
+ * GStreamer
+ * Copyright (C) 2008-2010 Filippo Argiolas <filippo.argiolas@gmail.com>
+ * Copyright (C) 2015 Michał Dębski <debski.mi.zd@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 "../gstgleffects.h"
+
+static void
+gst_gl_effects_laplacian_callback (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "conv0",
+              conv9_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+    static gfloat kernel[9] = { 0.0, -1.0, 0.0,
+      -1.0, 4.0, -1.0,
+      0.0, -1.0, 0.0
+    };
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1f (shader, "height", height);
+    gst_gl_shader_set_uniform_1f (shader, "width", width);
+    gst_gl_shader_set_uniform_1fv (shader, "kernel", 9, kernel);
+    gst_gl_shader_set_uniform_1i (shader, "invert", effects->invert);
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+void
+gst_gl_effects_laplacian (GstGLEffects * effects)
+{
+  gst_gl_filter_render_to_target (GST_GL_FILTER (effects), TRUE,
+      effects->intexture, effects->outtexture,
+      gst_gl_effects_laplacian_callback, effects);
+}
diff --git a/ext/gl/effects/gstgleffectlumatocurve.c b/ext/gl/effects/gstgleffectlumatocurve.c
index 643e34b..158fda0 100644
--- a/ext/gl/effects/gstgleffectlumatocurve.c
+++ b/ext/gl/effects/gstgleffectlumatocurve.c
@@ -31,61 +31,71 @@
 {
   GstGLShader *shader;
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "lumamap0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "luma_to_curve",
+      luma_to_curve_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "lumamap0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          luma_to_curve_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize luma to curve shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   if (effects->curve[curve_index] == 0) {
     /* this parameters are needed to have a right, predictable, mapping */
     gl->GenTextures (1, &effects->curve[curve_index]);
-    gl->Enable (GL_TEXTURE_1D);
-    gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 
-    gl->TexImage1D (GL_TEXTURE_1D, 0, curve->bytes_per_pixel,
-        curve->width, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (context)) {
+      gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 
-    gl->Disable (GL_TEXTURE_1D);
+      gl->TexImage1D (GL_TEXTURE_1D, 0, curve->bytes_per_pixel,
+          curve->width, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+    }
+#endif
+    if (USING_GLES2 (context) || USING_OPENGL3 (context)) {
+      gl->BindTexture (GL_TEXTURE_2D, effects->curve[curve_index]);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+      gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGB,
+          curve->width, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+    }
   }
 
   gl->ActiveTexture (GL_TEXTURE2);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 2);
 
-  gl->Disable (GL_TEXTURE_2D);
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->ActiveTexture (GL_TEXTURE1);
+    gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
 
-  gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_1D);
-  gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
+    gst_gl_shader_set_uniform_1i (shader, "curve", 1);
+  }
+#endif
+  if (USING_GLES2 (context) || USING_OPENGL3 (context)) {
+    gl->ActiveTexture (GL_TEXTURE1);
+    gl->BindTexture (GL_TEXTURE_2D, effects->curve[curve_index]);
 
-  gst_gl_shader_set_uniform_1i (shader, "curve", 1);
-
-  gl->Disable (GL_TEXTURE_1D);
+    gst_gl_shader_set_uniform_1i (shader, "curve", 1);
+  }
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
diff --git a/ext/gl/effects/gstgleffectmirror.c b/ext/gl/effects/gstgleffectmirror.c
index 35f87e1..5080099 100644
--- a/ext/gl/effects/gstgleffectmirror.c
+++ b/ext/gl/effects/gstgleffectmirror.c
@@ -23,12 +23,6 @@
 
 #include "../gstgleffects.h"
 
-#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,
     gpointer data)
@@ -36,42 +30,15 @@
   GstGLShader *shader;
   GstGLFilter *filter = GST_GL_FILTER (data);
   GstGLEffects *effects = GST_GL_EFFECTS (filter);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "mirror0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "mirror",
+      mirror_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "mirror0", shader);
+  if (!shader)
+    return;
 
-#if GST_GL_HAVE_GLES2
-    if (USING_GLES2 (context)) {
-      if (!gst_gl_shader_compile_with_default_v_and_check (shader,
-              mirror_fragment_source_gles2, &filter->draw_attr_position_loc,
-              &filter->draw_attr_texture_loc)) {
-        /* gst gl context error is already set */
-        GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-            ("Failed to initialize squeeze shader, %s",
-                gst_gl_context_get_error ()), (NULL));
-        return;
-      }
-    }
-#endif
-#if GST_GL_HAVE_OPENGL
-    if (USING_OPENGL (context)) {
-      if (!gst_gl_shader_compile_and_check (shader,
-              mirror_fragment_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-        gst_gl_context_set_error (context,
-            "Failed to initialize mirror shader");
-        GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-            ("%s", gst_gl_context_get_error ()), (NULL));
-        return;
-      }
-
-    }
-#endif
-  }
 #if GST_GL_HAVE_OPENGL
   if (USING_OPENGL (context)) {
     gl->MatrixMode (GL_PROJECTION);
@@ -82,18 +49,10 @@
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-#if GST_GL_HAVE_OPENGL
-  if (USING_OPENGL (filter->context)) {
-    gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-    gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-  }
-#endif
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectrgbtocurve.c b/ext/gl/effects/gstgleffectrgbtocurve.c
index 3e4dda6..e2b6bdb 100644
--- a/ext/gl/effects/gstgleffectrgbtocurve.c
+++ b/ext/gl/effects/gstgleffectrgbtocurve.c
@@ -31,61 +31,70 @@
 {
   GstGLShader *shader;
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "rgbmap0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "rgb_to_curve",
+      rgb_to_curve_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "rgbmap0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          rgb_to_curve_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize rgb to curve shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   if (effects->curve[curve_index] == 0) {
     /* this parameters are needed to have a right, predictable, mapping */
     gl->GenTextures (1, &effects->curve[curve_index]);
-    gl->Enable (GL_TEXTURE_1D);
-    gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-    gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (context)) {
+      gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+      gl->TexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 
-    gl->TexImage1D (GL_TEXTURE_1D, 0, curve->bytes_per_pixel,
-        curve->width, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+      gl->TexImage1D (GL_TEXTURE_1D, 0, GL_RGB,
+          curve->width, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+    }
+#endif
+    if (USING_GLES2 (context) || USING_OPENGL3 (context)) {
+      gl->BindTexture (GL_TEXTURE_2D, effects->curve[curve_index]);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
-    gl->Disable (GL_TEXTURE_1D);
+      gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGB,
+          curve->width, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, curve->pixel_data);
+    }
   }
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gl->Disable (GL_TEXTURE_2D);
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->ActiveTexture (GL_TEXTURE1);
+    gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
 
-  gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_1D);
-  gl->BindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);
+    gst_gl_shader_set_uniform_1i (shader, "curve", 1);
+  }
+#endif
+  if (USING_GLES2 (context) || USING_OPENGL3 (context)) {
+    gl->ActiveTexture (GL_TEXTURE1);
+    gl->BindTexture (GL_TEXTURE_2D, effects->curve[curve_index]);
 
-  gst_gl_shader_set_uniform_1i (shader, "curve", 1);
-
-  gl->Disable (GL_TEXTURE_1D);
+    gst_gl_shader_set_uniform_1i (shader, "curve", 1);
+  }
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
diff --git a/ext/gl/effects/gstgleffectsin.c b/ext/gl/effects/gstgleffectsin.c
index 2a6c051..5c09e8b 100644
--- a/ext/gl/effects/gstgleffectsin.c
+++ b/ext/gl/effects/gstgleffectsin.c
@@ -30,31 +30,25 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "sin0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "sin",
+      sin_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "sin0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          sin_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize sin shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
diff --git a/ext/gl/effects/gstgleffectsobel.c b/ext/gl/effects/gstgleffectsobel.c
new file mode 100644
index 0000000..8996b93
--- /dev/null
+++ b/ext/gl/effects/gstgleffectsobel.c
@@ -0,0 +1,168 @@
+/*
+ * GStreamer
+ * Copyright (C) 2008-2010 Filippo Argiolas <filippo.argiolas@gmail.com>
+ * Copyright (C) 2015 Michał Dębski <debski.mi.zd@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 "../gstgleffects.h"
+
+static void
+gst_gl_effects_sobel_callback_desaturate (gint width, gint height,
+    guint texture, gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "desat0",
+              desaturate_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+static void
+gst_gl_effects_sobel_callback_hconv (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "hconv0",
+              sep_sobel_hconv3_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1f (shader, "width", width);
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+static void
+gst_gl_effects_sobel_callback_vconv (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "vconv0",
+              sep_sobel_vconv3_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1f (shader, "height", height);
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+static void
+gst_gl_effects_sobel_callback_length (gint width, gint height, guint texture,
+    gpointer data)
+{
+  GstGLShader *shader = NULL;
+  GstGLEffects *effects = GST_GL_EFFECTS (data);
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  if (NULL != (shader = gst_gl_effects_get_fragment_shader (effects, "len0",
+              sep_sobel_length_fragment_source_gles2))) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+#if GST_GL_HAVE_OPENGL
+    if (USING_OPENGL (GST_GL_BASE_FILTER (filter)->context)) {
+      gl->MatrixMode (GL_PROJECTION);
+      gl->LoadIdentity ();
+    }
+#endif
+
+    gst_gl_shader_use (shader);
+
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, texture);
+
+    gst_gl_shader_set_uniform_1i (shader, "tex", 0);
+    gst_gl_shader_set_uniform_1i (shader, "invert", effects->invert);
+
+    gst_gl_filter_draw_texture (filter, texture, width, height);
+  }
+}
+
+void
+gst_gl_effects_sobel (GstGLEffects * effects)
+{
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+
+  gst_gl_filter_render_to_target (filter, TRUE,
+      effects->intexture, effects->midtexture[0],
+      gst_gl_effects_sobel_callback_desaturate, effects);
+  gst_gl_filter_render_to_target (filter, FALSE,
+      effects->midtexture[0], effects->midtexture[1],
+      gst_gl_effects_sobel_callback_hconv, effects);
+  gst_gl_filter_render_to_target (filter, FALSE,
+      effects->midtexture[1], effects->midtexture[0],
+      gst_gl_effects_sobel_callback_vconv, effects);
+  gst_gl_filter_render_to_target (filter, FALSE,
+      effects->midtexture[0], effects->outtexture,
+      gst_gl_effects_sobel_callback_length, effects);
+}
diff --git a/ext/gl/effects/gstgleffectsquare.c b/ext/gl/effects/gstgleffectsquare.c
index 7b4271e..e74c943 100644
--- a/ext/gl/effects/gstgleffectsquare.c
+++ b/ext/gl/effects/gstgleffectsquare.c
@@ -30,38 +30,29 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "square0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "square",
+      square_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "square0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          square_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize square shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectsqueeze.c b/ext/gl/effects/gstgleffectsqueeze.c
index 421ef27..2dbded5 100644
--- a/ext/gl/effects/gstgleffectsqueeze.c
+++ b/ext/gl/effects/gstgleffectsqueeze.c
@@ -23,12 +23,6 @@
 
 #include "../gstgleffects.h"
 
-#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,
     gpointer data)
@@ -36,41 +30,15 @@
   GstGLShader *shader;
   GstGLFilter *filter = GST_GL_FILTER (data);
   GstGLEffects *effects = GST_GL_EFFECTS (data);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "squeeze0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "squeeze",
+      squeeze_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "squeeze0", shader);
+  if (!shader)
+    return;
 
-#if GST_GL_HAVE_GLES2
-    if (USING_GLES2 (context)) {
-      if (!gst_gl_shader_compile_with_default_v_and_check (shader,
-              squeeze_fragment_source_gles2, &filter->draw_attr_position_loc,
-              &filter->draw_attr_texture_loc)) {
-        /* gst gl context error is already set */
-        GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-            ("Failed to initialize squeeze shader, %s",
-                gst_gl_context_get_error ()), (NULL));
-        return;
-      }
-    }
-#endif
-#if GST_GL_HAVE_OPENGL
-    if (USING_OPENGL (context)) {
-      if (!gst_gl_shader_compile_and_check (shader,
-              squeeze_fragment_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-        gst_gl_context_set_error (context,
-            "Failed to initialize squeeze shader");
-        GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-            ("%s", gst_gl_context_get_error ()), (NULL));
-        return;
-      }
-    }
-#endif
-  }
 #if GST_GL_HAVE_OPENGL
   if (USING_OPENGL (context)) {
     gl->MatrixMode (GL_PROJECTION);
@@ -81,18 +49,10 @@
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-#if GST_GL_HAVE_OPENGL
-  if (USING_OPENGL (filter->context)) {
-    gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-    gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-  }
-#endif
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectssources.c b/ext/gl/effects/gstgleffectssources.c
index 0b4d2d6..3da856c 100644
--- a/ext/gl/effects/gstgleffectssources.c
+++ b/ext/gl/effects/gstgleffectssources.c
@@ -65,7 +65,6 @@
 /* *INDENT-OFF* */
 
 /* Mirror effect */
-#if GST_GL_HAVE_OPENGL
 const gchar *mirror_fragment_source_opengl =
   "uniform sampler2D tex;"
   "void main () {"
@@ -77,42 +76,29 @@
   "  vec4 color = texture2D (tex, texturecoord);"
   "  gl_FragColor = color * gl_Color;"
   "}";
-#endif
-#if GST_GL_HAVE_GLES2
+
 const gchar *mirror_fragment_source_gles2 =
-  "precision mediump float;"
-  "varying vec2 v_texCoord;"
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = v_texCoord.xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  float normcoord = texturecoord.x - 0.5;"
   "  normcoord *= sign (normcoord);"
   "  texturecoord.x = normcoord + 0.5;"
   "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
-#endif
 
-/* Squeeze effect */
-#if GST_GL_HAVE_OPENGL
-const gchar *squeeze_fragment_source_opengl =
-  "uniform sampler2D tex;"
-  "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
-  "  vec2 normcoord = texturecoord - 0.5;"
-  "  float r = length (normcoord);"
-  "  r = pow(r, 0.40)*1.3;"
-  "  normcoord = normcoord / r;"
-  "  texturecoord = (normcoord + 0.5);"
-  "  gl_FragColor = texture2D (tex, texturecoord);"
-  "}";
-#endif
-#if GST_GL_HAVE_GLES2
 const gchar *squeeze_fragment_source_gles2 =
-  "precision mediump float;"
-  "varying vec2 v_texCoord;"
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = v_texCoord.xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord = texturecoord - 0.5;"
   "  float r = length (normcoord);"
   "  r = pow(r, 0.40)*1.3;"
@@ -120,27 +106,31 @@
   "  texturecoord = (normcoord + 0.5);"
   "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
-#endif
 
-/* Stretch Effect */
-const gchar *stretch_fragment_source =
+const gchar *stretch_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+	"  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   "  normcoord = texturecoord - 0.5;"
   "  float r = length (normcoord);"
   "  normcoord *= 2.0 - smoothstep(0.0, 0.35, r);"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord);"
-  "  gl_FragColor = color * gl_Color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-/* Light Tunnel effect */
-const gchar *tunnel_fragment_source =
+const gchar *tunnel_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   /* little trick with normalized coords to obtain a circle with
    * rect textures */
@@ -148,30 +138,33 @@
   "  float r = length(normcoord);"
   "  normcoord *= clamp (r, 0.0, 0.275) / r;"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord); "
-  "  gl_FragColor = color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-/* FishEye effect */
-const gchar *fisheye_fragment_source =
+const gchar *fisheye_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   "  normcoord = texturecoord - 0.5;"
   "  float r = length (normcoord);"
   "  normcoord *= r * sqrt(2);"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord);"
-  "  gl_FragColor = color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-
-/* Twirl effect */
-const gchar *twirl_fragment_source =
-  "uniform sampler2D tex;"
+const gchar *twirl_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
+	"uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   "  normcoord = texturecoord - 0.5;"
   "  float r = length (normcoord);"
@@ -184,56 +177,64 @@
   /* rotate */
   "  normcoord *= mat2(c, s, -s, c);"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord); "
-  "  gl_FragColor = color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-
-/* Bulge effect */
-const gchar *bulge_fragment_source =
+const gchar *bulge_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   "  normcoord = texturecoord - 0.5;"
   "  float r =  length (normcoord);"
   "  normcoord *= smoothstep (-0.05, 0.25, r);"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord);"
-  "  gl_FragColor = color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-
-/* Square Effect */
-const gchar *square_fragment_source =
+const gchar *square_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].xy;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec2 normcoord;"
   "  normcoord = texturecoord - 0.5;"
   "  float r = length (normcoord);"
   "  normcoord *= 1.0 + smoothstep(0.125, 0.25, abs(normcoord));"
   "  normcoord /= 2.0; /* zoom amount */"
   "  texturecoord = normcoord + 0.5;"
-  "  vec4 color = texture2D (tex, texturecoord);"
-  "  gl_FragColor = color * gl_Color;"
+  "  gl_FragColor = texture2D (tex, texturecoord);"
   "}";
 
-
-const gchar *luma_threshold_fragment_source =
+const gchar *luma_threshold_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].st;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec4 color = texture2D(tex, texturecoord);"
   "  float luma = dot(color.rgb, vec3(0.2125, 0.7154, 0.0721));"    /* BT.709 (from orange book) */
   "  gl_FragColor = vec4 (vec3 (smoothstep (0.30, 0.50, luma)), color.a);"
   "}";
 
-const gchar *sep_sobel_length_fragment_source =
+const gchar *sep_sobel_length_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "uniform bool invert;"
   "void main () {"
-  "  vec4 g = texture2D (tex, gl_TexCoord[0].st);"
+  "  vec4 g = texture2D (tex, v_texcoord.xy);"
   /* restore black background with grey edges */
   "  g -= vec4(0.5, 0.5, 0.0, 0.0);"
   "  float len = length (g);"
@@ -242,21 +243,29 @@
   "  gl_FragColor = abs(vec4(vec3(float(invert) - len), 1.0));"
   "}";
 
-const gchar *desaturate_fragment_source =
+const gchar *desaturate_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec4 color = texture2D (tex, gl_TexCoord[0].st);"
+  "  vec4 color = texture2D (tex, v_texcoord.xy);"
   "  float luma = dot(color.rgb, vec3(0.2125, 0.7154, 0.0721));"
   "  gl_FragColor = vec4(vec3(luma), color.a);"
   "}";
 
-const gchar *sep_sobel_hconv3_fragment_source =
+const gchar *sep_sobel_hconv3_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "uniform float width;"
   "void main () {"
   "  float w = 1.0 / width;"
   "  vec2 texturecoord[3];"
-  "  texturecoord[1] = gl_TexCoord[0].st;"
+  "  texturecoord[1] = v_texcoord.xy;"
   "  texturecoord[0] = texturecoord[1] - vec2(w, 0.0);"
   "  texturecoord[2] = texturecoord[1] + vec2(w, 0.0);"
   "  float grad_kern[3];"
@@ -277,13 +286,17 @@
   "  gl_FragColor = sum + vec4(0.0, 0.5, 0.0, 0.0);"
   "}";
 
-const gchar *sep_sobel_vconv3_fragment_source =
+const gchar *sep_sobel_vconv3_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "uniform float height;"
   "void main () {"
   "  float h = 1.0 / height;"
   "  vec2 texturecoord[3];"
-  "  texturecoord[1] = gl_TexCoord[0].st;"
+  "  texturecoord[1] = v_texcoord.xy;"
   "  texturecoord[0] = texturecoord[1] - vec2(0.0, h);"
   "  texturecoord[2] = texturecoord[1] + vec2(0.0, h);"
   "  float grad_kern[3];"
@@ -304,15 +317,18 @@
   "  gl_FragColor = sum + vec4(0.5, 0.0, 0.0, 0.0);"
   "}";
 
-/* horizontal convolution 7x7 */
-const gchar *hconv7_fragment_source =
+const gchar *hconv7_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "uniform float kernel[7];"
-  "uniform float width;"
+  "uniform float gauss_width;"
   "void main () {"
-  "  float w = 1.0 / width;"
+  "  float w = 1.0 / gauss_width;"
   "  vec2 texturecoord[7];"
-  "  texturecoord[3] = gl_TexCoord[0].st;"
+  "  texturecoord[3] = v_texcoord.xy;"
   "  texturecoord[2] = texturecoord[3] - vec2(w, 0.0);"
   "  texturecoord[1] = texturecoord[2] - vec2(w, 0.0);"
   "  texturecoord[0] = texturecoord[1] - vec2(w, 0.0);"
@@ -329,14 +345,18 @@
   "}";
 
 /* vertical convolution 7x7 */
-const gchar *vconv7_fragment_source =
+const gchar *vconv7_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "uniform float kernel[7];"
-  "uniform float height;"
+  "uniform float gauss_height;"
   "void main () {"
-  "  float h = 1.0 / height;"
+  "  float h = 1.0 / gauss_height;"
   "  vec2 texturecoord[7];"
-  "  texturecoord[3] = gl_TexCoord[0].st;"
+  "  texturecoord[3] = v_texcoord.xy;"
   "  texturecoord[2] = texturecoord[3] - vec2(0.0, h);"
   "  texturecoord[1] = texturecoord[2] - vec2(0.0, h);"
   "  texturecoord[0] = texturecoord[1] - vec2(0.0, h);"
@@ -352,60 +372,78 @@
   "  gl_FragColor = sum;"
   "}";
 
-
 /* TODO: support several blend modes */
-const gchar *sum_fragment_source =
+const gchar *sum_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D base;"
   "uniform sampler2D blend;"
   "uniform float alpha;"
   "uniform float beta;"
   "void main () {"
-  "  vec4 basecolor = texture2D (base, gl_TexCoord[0].st);"
-  "  vec4 blendcolor = texture2D (blend, gl_TexCoord[0].st);"
+  "  vec4 basecolor = texture2D (base, v_texcoord.xy);"
+  "  vec4 blendcolor = texture2D (blend, v_texcoord.xy);"
   "  gl_FragColor = alpha * basecolor + beta * blendcolor;"
   "}";
 
-const gchar *multiply_fragment_source =
+const gchar *multiply_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D base;"
   "uniform sampler2D blend;"
   "uniform float alpha;"
   "void main () {"
-  "  vec4 basecolor = texture2D (base, gl_TexCoord[0].st);"
-  "  vec4 blendcolor = texture2D (blend, gl_TexCoord[0].st);"
+  "  vec4 basecolor = texture2D (base, v_texcoord.xy);"
+  "  vec4 blendcolor = texture2D (blend, v_texcoord.xy);"
   "  gl_FragColor = (1.0 - alpha) * basecolor + alpha * basecolor * blendcolor;"
   "}";
 
 /* lut operations, map luma to tex1d, see orange book (chapter 19) */
-const gchar *luma_to_curve_fragment_source =
+const gchar *luma_to_curve_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
-  "uniform sampler1D curve;"
+  "uniform sampler2D curve;"
   "void main () {"
-  "  vec2 texturecoord = gl_TexCoord[0].st;"
+  "  vec2 texturecoord = v_texcoord.xy;"
   "  vec4 color = texture2D (tex, texturecoord);"
   "  float luma = dot(color.rgb, vec3(0.2125, 0.7154, 0.0721));"
-  "  color = texture1D(curve, luma);"
+  "  color = texture2D (curve, vec2(luma, 0.0));"
   "  gl_FragColor = color;"
   "}";
 
-
 /* lut operations, map rgb to tex1d, see orange book (chapter 19) */
-const gchar *rgb_to_curve_fragment_source =
+const gchar *rgb_to_curve_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
-  "uniform sampler1D curve;"
+  "uniform sampler2D curve;"
   "void main () {"
-  "  vec4 color = texture2D (tex, gl_TexCoord[0].st);"
+  "  vec4 color = texture2D (tex, v_texcoord.xy);"
   "  vec4 outcolor;"
-  "  outcolor.r = texture1D(curve, color.r).r;"
-  "  outcolor.g = texture1D(curve, color.g).g;"
-  "  outcolor.b = texture1D(curve, color.b).b;"
+  "  outcolor.r = texture2D (curve, vec2(color.r, 0.0)).r;"
+  "  outcolor.g = texture2D (curve, vec2(color.g, 0.0)).g;"
+  "  outcolor.b = texture2D (curve, vec2(color.b, 0.0)).b;"
   "  outcolor.a = color.a;"
   "  gl_FragColor = outcolor;"
   "}";
 
-const gchar *sin_fragment_source =
+const gchar *sin_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
   "uniform sampler2D tex;"
   "void main () {"
-  "  vec4 color = texture2D (tex, vec2(gl_TexCoord[0].st));"
+  "  vec4 color = texture2D (tex, vec2(v_texcoord.xy));"
   "  float luma = dot(color.rgb, vec3(0.2125, 0.7154, 0.0721));"
 /* calculate hue with the Preucil formula */
   "  float cosh = color.r - 0.5*(color.g + color.b);"
@@ -457,4 +495,40 @@
   "gl_FragColor = vec4 (step (0.12, length (savedcolor - currentcolor)));"
   "}";
 
+/* This filter is meant as a demo of gst-plugins-gl + glsl
+   capabilities. So I'm keeping this shader readable enough. If and
+   when this shader will be used in production be careful to hard code
+   kernel into the shader and remove unneeded zero multiplications in
+   the convolution */
+const gchar *conv9_fragment_source_gles2 =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;"
+  "uniform sampler2D tex;"
+  "uniform float kernel[9];"
+  "uniform float width, height;"
+  "uniform bool invert;"
+  "void main () {"
+  "  float w = 1.0 / width;"
+  "  float h = 1.0 / height;"
+  "  vec2 texturecoord[9];"
+  "  texturecoord[4] = v_texcoord.xy;"                    /*  0  0 */
+  "  texturecoord[5] = texturecoord[4] + vec2(w,   0.0);" /*  1  0 */
+  "  texturecoord[2] = texturecoord[5] - vec2(0.0, h);"   /*  1 -1 */
+  "  texturecoord[1] = texturecoord[2] - vec2(w,   0.0);" /*  0 -1 */
+  "  texturecoord[0] = texturecoord[1] - vec2(w,   0.0);" /* -1 -1 */
+  "  texturecoord[3] = texturecoord[0] + vec2(0.0, h);"   /* -1  0 */
+  "  texturecoord[6] = texturecoord[3] + vec2(0.0, h);"   /* -1  1 */
+  "  texturecoord[7] = texturecoord[6] + vec2(w,   0.0);" /*  0  1 */
+  "  texturecoord[8] = texturecoord[7] + vec2(w,   0.0);" /*  1  1 */
+  "  int i;"
+  "  vec3 sum = vec3 (0.0);"
+  "  for (i = 0; i < 9; i++) { "
+  "    vec4 neighbor = texture2D (tex, texturecoord[i]);"
+  "    sum += neighbor.xyz * kernel[i];"
+  "  }"
+  "  gl_FragColor = vec4 (abs(sum - vec3(float(invert))), 1.0);"
+  "}";
+
 /* *INDENT-ON* */
diff --git a/ext/gl/effects/gstgleffectssources.h b/ext/gl/effects/gstgleffectssources.h
index 68a6f57..fcd5c93 100644
--- a/ext/gl/effects/gstgleffectssources.h
+++ b/ext/gl/effects/gstgleffectssources.h
@@ -21,35 +21,31 @@
 #ifndef __GST_GL_EFFECTS_SOURCES_H__
 #define __GST_GL_EFFECTS_SOURCES_H__
 
-#if GST_GL_HAVE_OPENGL
-extern const gchar *mirror_fragment_source_opengl;
-extern const gchar *squeeze_fragment_source_opengl;
-#endif
-#if GST_GL_HAVE_GLES2
 extern const gchar *mirror_fragment_source_gles2;
 extern const gchar *squeeze_fragment_source_gles2;
-#endif
-extern const gchar *stretch_fragment_source;
-extern const gchar *tunnel_fragment_source;
-extern const gchar *fisheye_fragment_source;
-extern const gchar *twirl_fragment_source;
-extern const gchar *bulge_fragment_source;
-extern const gchar *square_fragment_source;
-extern const gchar *luma_threshold_fragment_source;
-extern const gchar *sep_sobel_length_fragment_source;
-extern const gchar *desaturate_fragment_source;
-extern const gchar *sep_sobel_hconv3_fragment_source;
-extern const gchar *sep_sobel_vconv3_fragment_source;
-extern const gchar *hconv7_fragment_source;
-extern const gchar *vconv7_fragment_source;
-extern const gchar *sum_fragment_source;
-extern const gchar *luma_to_curve_fragment_source;
-extern const gchar *rgb_to_curve_fragment_source;
-extern const gchar *sin_fragment_source;
+extern const gchar *stretch_fragment_source_gles2;
+extern const gchar *fisheye_fragment_source_gles2;
+extern const gchar *twirl_fragment_source_gles2;
+extern const gchar *bulge_fragment_source_gles2;
+extern const gchar *tunnel_fragment_source_gles2;
+extern const gchar *square_fragment_source_gles2;
+extern const gchar *luma_threshold_fragment_source_gles2;
+extern const gchar *hconv7_fragment_source_gles2;
+extern const gchar *vconv7_fragment_source_gles2;
+extern const gchar *sum_fragment_source_gles2;
+extern const gchar *luma_to_curve_fragment_source_gles2;
+extern const gchar *rgb_to_curve_fragment_source_gles2;
+extern const gchar *sin_fragment_source_gles2;
+extern const gchar *desaturate_fragment_source_gles2;
+extern const gchar *sep_sobel_hconv3_fragment_source_gles2;
+extern const gchar *sep_sobel_vconv3_fragment_source_gles2;
+extern const gchar *sep_sobel_length_fragment_source_gles2;
+extern const gchar *multiply_fragment_source_gles2;
+extern const gchar *conv9_fragment_source_gles2;
+
 extern const gchar *interpolate_fragment_source;
 extern const gchar *texture_interp_fragment_source;
 extern const gchar *difference_fragment_source;
-extern const gchar *multiply_fragment_source;
 
 void fill_gaussian_kernel (float *kernel, int size, float sigma);
 
diff --git a/ext/gl/effects/gstgleffectstretch.c b/ext/gl/effects/gstgleffectstretch.c
index 859f64e..d132bd0 100644
--- a/ext/gl/effects/gstgleffectstretch.c
+++ b/ext/gl/effects/gstgleffectstretch.c
@@ -30,38 +30,28 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "stretch0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "stretch",
+      stretch_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "stretch0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          stretch_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize stretch shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
+
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
   }
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
-
+#endif
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffecttunnel.c b/ext/gl/effects/gstgleffecttunnel.c
index 479434a..5029c51 100644
--- a/ext/gl/effects/gstgleffecttunnel.c
+++ b/ext/gl/effects/gstgleffecttunnel.c
@@ -30,38 +30,29 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "tunnel0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "tunnel",
+      tunnel_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "tunnel0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          tunnel_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize tunnel shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffecttwirl.c b/ext/gl/effects/gstgleffecttwirl.c
index 4a6d749..6c73f19 100644
--- a/ext/gl/effects/gstgleffecttwirl.c
+++ b/ext/gl/effects/gstgleffecttwirl.c
@@ -30,38 +30,29 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "twirl0");
+  shader = gst_gl_effects_get_fragment_shader (effects, "twirl",
+      twirl_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (GST_GL_FILTER (effects)->context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "twirl0", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          twirl_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize twirl shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 0);
 
-  gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
-  gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
-
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
diff --git a/ext/gl/effects/gstgleffectxray.c b/ext/gl/effects/gstgleffectxray.c
index 6657a9b..c045cb6 100644
--- a/ext/gl/effects/gstgleffectxray.c
+++ b/ext/gl/effects/gstgleffectxray.c
@@ -45,42 +45,34 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray1");
+  shader = gst_gl_effects_get_fragment_shader (effects, "hconv7",
+      hconv7_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray1", shader);
-  }
+  if (!shader)
+    return;
 
   if (!kernel_ready) {
     fill_gaussian_kernel (gauss_kernel, 7, 1.5);
     kernel_ready = TRUE;
   }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          hconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize hconv7 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
-    return;
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
   }
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1fv (shader, "kernel", 9, gauss_kernel);
-  gst_gl_shader_set_uniform_1f (shader, "width", width);
+  gst_gl_shader_set_uniform_1f (shader, "gauss_width", width);
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
@@ -92,37 +84,30 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray2");
+  shader = gst_gl_effects_get_fragment_shader (effects, "vconv7",
+      vconv7_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray2", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          vconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize vconv7 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1fv (shader, "kernel", 9, gauss_kernel);
-  gst_gl_shader_set_uniform_1f (shader, "height", height);
+  gst_gl_shader_set_uniform_1f (shader, "gauss_height", height);
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
@@ -135,34 +120,26 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray_desat");
+  shader = gst_gl_effects_get_fragment_shader (effects, "desaturate",
+      desaturate_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray_desat", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          desaturate_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize desaturate shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_filter_draw_texture (filter, texture, width, height);
@@ -175,35 +152,26 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray_sob_hconv");
+  shader = gst_gl_effects_get_fragment_shader (effects, "sobel_hconv3",
+      sep_sobel_hconv3_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_hconv",
-        shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          sep_sobel_hconv3_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize sobel hvonc3 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1f (shader, "width", width);
@@ -218,35 +186,26 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray_sob_vconv");
+  shader = gst_gl_effects_get_fragment_shader (effects, "sobel_vconv3",
+      sep_sobel_vconv3_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_vconv",
-        shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          sep_sobel_vconv3_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize sobel vconv3 shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1f (shader, "height", height);
@@ -261,35 +220,26 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray_sob_len");
+  shader = gst_gl_effects_get_fragment_shader (effects, "sobel_length",
+      sep_sobel_length_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_len",
-        shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          sep_sobel_length_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context,
-        "Failed to initialize seobel length shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "tex", 1);
   gst_gl_shader_set_uniform_1i (shader, "invert", TRUE);
@@ -305,40 +255,31 @@
   GstGLShader *shader;
   GstGLEffects *effects = GST_GL_EFFECTS (data);
   GstGLFilter *filter = GST_GL_FILTER (effects);
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
-  shader = g_hash_table_lookup (effects->shaderstable, "xray4");
+  shader = gst_gl_effects_get_fragment_shader (effects, "multiply",
+      multiply_fragment_source_gles2);
 
-  if (!shader) {
-    shader = gst_gl_shader_new (context);
-    g_hash_table_insert (effects->shaderstable, (gchar *) "xray4", shader);
-  }
-
-  if (!gst_gl_shader_compile_and_check (shader,
-          multiply_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (context, "Failed to initialize multiply shader");
-    GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+  if (!shader)
     return;
-  }
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (USING_OPENGL (context)) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (shader);
 
   gl->ActiveTexture (GL_TEXTURE2);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, effects->midtexture[2]);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (shader, "base", 2);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1f (shader, "alpha", (gfloat) 0.5f);
   gst_gl_shader_set_uniform_1i (shader, "blend", 1);
diff --git a/ext/gl/gltestsrc.c b/ext/gl/gltestsrc.c
index db28017..c4a2765 100644
--- a/ext/gl/gltestsrc.c
+++ b/ext/gl/gltestsrc.c
@@ -92,7 +92,6 @@
     glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
     glDisable (GL_CULL_FACE);
-    glDisable (GL_TEXTURE_2D);
 
     glMatrixMode (GL_PROJECTION);
     glLoadIdentity ();
@@ -188,30 +187,80 @@
 #endif
 }
 
+/* *INDENT-OFF* */
+
+static const GLfloat positions[] = {
+     -1.0,  1.0,  0.0, 1.0,
+      1.0,  1.0,  0.0, 1.0,
+      1.0, -1.0,  0.0, 1.0,
+     -1.0, -1.0,  0.0, 1.0,
+  };
+static const GLfloat identitiy_matrix[] = {
+      1.0,  0.0,  0.0, 0.0,
+      0.0,  1.0,  0.0, 0.0,
+      0.0,  0.0,  1.0, 0.0,
+      0.0,  0.0,  0.0, 1.0,
+  };
+
+/* *INDENT-ON* */
+
 void
-gst_gl_test_src_snow (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
+gst_gl_test_src_shader (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
 {
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (v->context) & GST_GL_API_OPENGL) {
-    glClearColor (0.0, 0.0, 0.0, 1.0);
-    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
-    glMatrixMode (GL_PROJECTION);
-    glLoadIdentity ();
+  GstGLFuncs *gl = v->context->gl_vtable;
 
-    glMatrixMode (GL_MODELVIEW);
-    glLoadIdentity ();
+/* *INDENT-OFF* */
+  const GLfloat uvs[] = {
+     0.0,  1.0,
+     1.0,  1.0,
+     1.0,  0.0,
+     0.0,  0.0,
+  };
+/* *INDENT-ON* */
 
-    /* FIXME snow requires a fragment shader.  Please write. */
-    glColor4f (0.5, 0.5, 0.5, 1.0);
-    glBegin (GL_QUADS);
-    glVertex3f (-1.0 + 2.0 * (0.0), -1.0 + 2.0 * 1, 0);
-    glVertex3f (-1.0 + 2.0 * (1.0), -1.0 + 2.0 * 1, 0);
-    glVertex3f (-1.0 + 2.0 * (1.0), -1.0 + 2.0 * (0.0), 0);
-    glVertex3f (-1.0 + 2.0 * (0.0), -1.0 + 2.0 * (0.0), 0);
-    glEnd ();
+  GLushort indices[] = { 0, 1, 2, 3, 0 };
+
+  GLint attr_position_loc = -1;
+  GLint attr_uv_loc = -1;
+
+  if (gst_gl_context_get_gl_api (v->context)) {
+
+    gst_gl_context_clear_shader (v->context);
+    gl->BindTexture (GL_TEXTURE_2D, 0);
+
+    gst_gl_shader_use (v->shader);
+
+    attr_position_loc =
+        gst_gl_shader_get_attribute_location (v->shader, "position");
+
+    attr_uv_loc = gst_gl_shader_get_attribute_location (v->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_uv_loc, 2, GL_FLOAT, GL_FALSE, 0, uvs);
+
+    gl->EnableVertexAttribArray (attr_position_loc);
+    gl->EnableVertexAttribArray (attr_uv_loc);
+
+    gst_gl_shader_set_uniform_matrix_4fv (v->shader, "mvp",
+        1, GL_FALSE, identitiy_matrix);
+
+    gst_gl_shader_set_uniform_1f (v->shader, "time",
+        (gfloat) v->running_time / GST_SECOND);
+
+    gst_gl_shader_set_uniform_1f (v->shader, "aspect_ratio",
+        (gfloat) w / (gfloat) h);
+
+    gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, indices);
+
+    gl->DisableVertexAttribArray (attr_position_loc);
+    gl->DisableVertexAttribArray (attr_uv_loc);
+
+    gst_gl_context_clear_shader (v->context);
   }
-#endif
 }
 
 static void
@@ -257,168 +306,70 @@
   gst_gl_test_src_unicolor (v, buffer, w, h, vts_colors + COLOR_BLUE);
 }
 
+static void
+gst_gl_test_src_checkers (GstGLTestSrc * v, gint checker_width)
+{
+
+  GstGLFuncs *gl = v->context->gl_vtable;
+
+  GLushort indices[] = { 0, 1, 2, 3, 0 };
+
+  GLint attr_position_loc = -1;
+
+  if (gst_gl_context_get_gl_api (v->context)) {
+
+    gst_gl_context_clear_shader (v->context);
+    gl->BindTexture (GL_TEXTURE_2D, 0);
+
+    gst_gl_shader_use (v->shader);
+
+    attr_position_loc =
+        gst_gl_shader_get_attribute_location (v->shader, "position");
+
+    /* Load the vertex position */
+    gl->VertexAttribPointer (attr_position_loc, 4, GL_FLOAT,
+        GL_FALSE, 0, positions);
+
+    gl->EnableVertexAttribArray (attr_position_loc);
+
+    gst_gl_shader_set_uniform_matrix_4fv (v->shader, "mvp",
+        1, GL_FALSE, identitiy_matrix);
+
+    gst_gl_shader_set_uniform_1f (v->shader, "checker_width", checker_width);
+
+    gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, indices);
+
+    gl->DisableVertexAttribArray (attr_position_loc);
+
+    gst_gl_context_clear_shader (v->context);
+  }
+}
+
+
 void
 gst_gl_test_src_checkers1 (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
 {
-#if 0
-  int x, y;
-  paintinfo pi = { NULL, };
-  paintinfo *p = &pi;
-  struct fourcc_list_struct *fourcc;
-
-  p->width = w;
-  p->height = h;
-  fourcc = v->fourcc;
-  if (fourcc == NULL)
-    return;
-
-  fourcc->paint_setup (p, dest);
-  p->paint_hline = fourcc->paint_hline;
-
-  for (y = 0; y < h; y++) {
-    p->color = vts_colors + COLOR_GREEN;
-    p->paint_hline (p, 0, y, w);
-    for (x = (y % 2); x < w; x += 2) {
-      p->color = vts_colors + COLOR_RED;
-      p->paint_hline (p, x, y, 1);
-    }
-  }
-#endif
+  gst_gl_test_src_checkers (v, 1);
 }
 
+
 void
 gst_gl_test_src_checkers2 (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
 {
-#if 0
-  int x, y;
-  paintinfo pi = { NULL, };
-  paintinfo *p = &pi;
-  struct fourcc_list_struct *fourcc;
-
-  p->width = w;
-  p->height = h;
-  fourcc = v->fourcc;
-  if (fourcc == NULL)
-    return;
-
-  fourcc->paint_setup (p, dest);
-  p->paint_hline = fourcc->paint_hline;
-
-  p->color = vts_colors + COLOR_GREEN;
-  for (y = 0; y < h; y++) {
-    p->paint_hline (p, 0, y, w);
-  }
-
-  for (y = 0; y < h; y += 2) {
-    for (x = ((y % 4) == 0) ? 0 : 2; x < w; x += 4) {
-      guint len = (x < (w - 1)) ? 2 : (w - x);
-
-      p->color = vts_colors + COLOR_RED;
-      p->paint_hline (p, x, y + 0, len);
-      if (G_LIKELY ((y + 1) < h)) {
-        p->paint_hline (p, x, y + 1, len);
-      }
-    }
-  }
-#endif
+  gst_gl_test_src_checkers (v, 2);
 }
 
 void
 gst_gl_test_src_checkers4 (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
 {
-#if 0
-  int x, y;
-  paintinfo pi = { NULL, };
-  paintinfo *p = &pi;
-  struct fourcc_list_struct *fourcc;
+  gst_gl_test_src_checkers (v, 4);
 
-  p->width = w;
-  p->height = h;
-  fourcc = v->fourcc;
-  if (fourcc == NULL)
-    return;
-
-  fourcc->paint_setup (p, dest);
-  p->paint_hline = fourcc->paint_hline;
-
-  p->color = vts_colors + COLOR_GREEN;
-  for (y = 0; y < h; y++) {
-    p->paint_hline (p, 0, y, w);
-  }
-
-  for (y = 0; y < h; y += 4) {
-    for (x = ((y % 8) == 0) ? 0 : 4; x < w; x += 8) {
-      guint len = (x < (w - 3)) ? 4 : (w - x);
-
-      p->color = vts_colors + COLOR_RED;
-      p->paint_hline (p, x, y + 0, len);
-      if (G_LIKELY ((y + 1) < h)) {
-        p->paint_hline (p, x, y + 1, len);
-        if (G_LIKELY ((y + 2) < h)) {
-          p->paint_hline (p, x, y + 2, len);
-          if (G_LIKELY ((y + 3) < h)) {
-            p->paint_hline (p, x, y + 3, len);
-          }
-        }
-      }
-    }
-  }
-#endif
 }
 
 void
 gst_gl_test_src_checkers8 (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
 {
-#if 0
-  int x, y;
-  paintinfo pi = { NULL, };
-  paintinfo *p = &pi;
-  struct fourcc_list_struct *fourcc;
-
-  p->width = w;
-  p->height = h;
-  fourcc = v->fourcc;
-  if (fourcc == NULL)
-    return;
-
-  fourcc->paint_setup (p, dest);
-  p->paint_hline = fourcc->paint_hline;
-
-  p->color = vts_colors + COLOR_GREEN;
-  for (y = 0; y < h; y++) {
-    p->paint_hline (p, 0, y, w);
-  }
-
-  for (y = 0; y < h; y += 8) {
-    for (x = ((GST_ROUND_UP_8 (y) % 16) == 0) ? 0 : 8; x < w; x += 16) {
-      guint len = (x < (w - 7)) ? 8 : (w - x);
-
-      p->color = vts_colors + COLOR_RED;
-      p->paint_hline (p, x, y + 0, len);
-      if (G_LIKELY ((y + 1) < h)) {
-        p->paint_hline (p, x, y + 1, len);
-        if (G_LIKELY ((y + 2) < h)) {
-          p->paint_hline (p, x, y + 2, len);
-          if (G_LIKELY ((y + 3) < h)) {
-            p->paint_hline (p, x, y + 3, len);
-            if (G_LIKELY ((y + 4) < h)) {
-              p->paint_hline (p, x, y + 4, len);
-              if (G_LIKELY ((y + 5) < h)) {
-                p->paint_hline (p, x, y + 5, len);
-                if (G_LIKELY ((y + 6) < h)) {
-                  p->paint_hline (p, x, y + 6, len);
-                  if (G_LIKELY ((y + 7) < h)) {
-                    p->paint_hline (p, x, y + 7, len);
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-#endif
+  gst_gl_test_src_checkers (v, 8);
 }
 
 void
diff --git a/ext/gl/gltestsrc.h b/ext/gl/gltestsrc.h
index f79ffee..102109e 100644
--- a/ext/gl/gltestsrc.h
+++ b/ext/gl/gltestsrc.h
@@ -32,7 +32,7 @@
 
 void    gst_gl_test_src_smpte        (GstGLTestSrc * v,
                                          GstBuffer *buffer, int w, int h);
-void    gst_gl_test_src_snow         (GstGLTestSrc * v,
+void    gst_gl_test_src_shader       (GstGLTestSrc * v,
                                          GstBuffer *buffer, int w, int h);
 void    gst_gl_test_src_black        (GstGLTestSrc * v,
                                          GstBuffer *buffer, int w, int h);
diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c
new file mode 100644
index 0000000..3bad769
--- /dev/null
+++ b/ext/gl/gstglbasemixer.c
@@ -0,0 +1,718 @@
+/* Generic video mixer plugin
+ *
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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/video/video.h>
+
+#include "gstglbasemixer.h"
+
+#define gst_gl_base_mixer_parent_class parent_class
+G_DEFINE_ABSTRACT_TYPE (GstGLBaseMixer, gst_gl_base_mixer,
+    GST_TYPE_VIDEO_AGGREGATOR);
+static gboolean gst_gl_base_mixer_do_bufferpool (GstGLBaseMixer * mix,
+    GstCaps * outcaps);
+
+#define GST_CAT_DEFAULT gst_gl_base_mixer_debug
+GST_DEBUG_CATEGORY (gst_gl_base_mixer_debug);
+
+static void gst_gl_base_mixer_pad_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_gl_base_mixer_pad_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+
+static void gst_gl_base_mixer_set_context (GstElement * element,
+    GstContext * context);
+static GstStateChangeReturn gst_gl_base_mixer_change_state (GstElement *
+    element, GstStateChange transition);
+
+enum
+{
+  PROP_PAD_0
+};
+
+#define GST_GL_BASE_MIXER_GET_PRIVATE(obj)  \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_GL_BASE_MIXER, GstGLBaseMixerPrivate))
+
+struct _GstGLBaseMixerPrivate
+{
+  gboolean negotiated;
+
+  GstGLContext *other_context;
+
+  GstBufferPool *pool;
+  GstAllocator *allocator;
+  GstAllocationParams params;
+  GstQuery *query;
+};
+
+G_DEFINE_TYPE (GstGLBaseMixerPad, gst_gl_base_mixer_pad,
+    GST_TYPE_VIDEO_AGGREGATOR_PAD);
+
+static void
+gst_gl_base_mixer_pad_class_init (GstGLBaseMixerPadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstVideoAggregatorPadClass *vaggpad_class =
+      (GstVideoAggregatorPadClass *) klass;
+
+  gobject_class->set_property = gst_gl_base_mixer_pad_set_property;
+  gobject_class->get_property = gst_gl_base_mixer_pad_get_property;
+
+  vaggpad_class->set_info = NULL;
+  vaggpad_class->prepare_frame = NULL;
+  vaggpad_class->clean_frame = NULL;
+}
+
+static void
+gst_gl_base_mixer_pad_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_gl_base_mixer_pad_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;
+  }
+}
+
+static gboolean
+_negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (vagg);
+
+  return gst_gl_base_mixer_do_bufferpool (mix, caps);
+}
+
+static gboolean
+_default_propose_allocation (GstGLBaseMixer * mix, GstGLBaseMixerPad * pad,
+    GstQuery * decide_query, GstQuery * query)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_gl_base_mixer_sink_query (GstAggregator * agg, GstAggregatorPad * bpad,
+    GstQuery * query)
+{
+  gboolean ret = FALSE;
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (agg);
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+  GstGLBaseMixerPad *pad = GST_GL_BASE_MIXER_PAD (bpad);
+
+  GST_TRACE ("QUERY %" GST_PTR_FORMAT, query);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ALLOCATION:
+    {
+      GstQuery *decide_query = NULL;
+
+      GST_OBJECT_LOCK (mix);
+      if (G_UNLIKELY (!mix->priv->negotiated)) {
+        GST_DEBUG_OBJECT (mix,
+            "not negotiated yet, can't answer ALLOCATION query");
+        GST_OBJECT_UNLOCK (mix);
+        return FALSE;
+      }
+      if ((decide_query = mix->priv->query))
+        gst_query_ref (decide_query);
+      GST_OBJECT_UNLOCK (mix);
+
+      GST_DEBUG_OBJECT (mix,
+          "calling propose allocation with query %" GST_PTR_FORMAT,
+          decide_query);
+
+      /* pass the query to the propose_allocation vmethod if any */
+      if (mix_class->propose_allocation)
+        ret = mix_class->propose_allocation (mix, pad, decide_query, query);
+      else
+        ret = FALSE;
+
+      if (decide_query)
+        gst_query_unref (decide_query);
+
+      GST_DEBUG_OBJECT (mix, "ALLOCATION ret %d, %" GST_PTR_FORMAT, ret, query);
+      return ret;
+    }
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+
+      ret = gst_gl_handle_context_query ((GstElement *) mix, query,
+          &mix->display, &mix->priv->other_context);
+      if (mix->display)
+        gst_gl_display_filter_gl_api (mix->display,
+            mix_class->supported_gl_api);
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, mix->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = mix->context != NULL;
+      }
+      GST_LOG_OBJECT (mix, "context query of type %s %i", context_type, ret);
+
+      if (ret)
+        return ret;
+
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_AGGREGATOR_CLASS (parent_class)->sink_query (agg, bpad, query);;
+}
+
+static void
+gst_gl_base_mixer_pad_init (GstGLBaseMixerPad * mixerpad)
+{
+}
+
+/* GLBaseMixer signals and args */
+enum
+{
+  /* FILL ME */
+  LAST_SIGNAL
+};
+
+enum
+{
+  PROP_0,
+  PROP_CONTEXT
+};
+
+static gboolean gst_gl_base_mixer_src_query (GstAggregator * agg,
+    GstQuery * query);
+
+static gboolean
+gst_gl_base_mixer_src_activate_mode (GstAggregator * aggregator,
+    GstPadMode mode, gboolean active);
+static gboolean gst_gl_base_mixer_stop (GstAggregator * agg);
+static gboolean gst_gl_base_mixer_start (GstAggregator * agg);
+
+static void gst_gl_base_mixer_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gl_base_mixer_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static gboolean gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix,
+    GstQuery * query);
+static gboolean gst_gl_base_mixer_set_allocation (GstGLBaseMixer * mix,
+    GstBufferPool * pool, GstAllocator * allocator,
+    GstAllocationParams * params, GstQuery * query);
+
+static void
+gst_gl_base_mixer_class_init (GstGLBaseMixerClass * 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);
+
+  g_type_class_add_private (klass, sizeof (GstGLBaseMixerPrivate));
+
+  gobject_class->get_property = gst_gl_base_mixer_get_property;
+  gobject_class->set_property = gst_gl_base_mixer_set_property;
+
+  element_class->set_context =
+      GST_DEBUG_FUNCPTR (gst_gl_base_mixer_set_context);
+  element_class->change_state = gst_gl_base_mixer_change_state;
+
+  agg_class->sinkpads_type = GST_TYPE_GL_BASE_MIXER_PAD;
+  agg_class->sink_query = gst_gl_base_mixer_sink_query;
+  agg_class->src_query = gst_gl_base_mixer_src_query;
+  agg_class->src_activate = gst_gl_base_mixer_src_activate_mode;
+  agg_class->stop = gst_gl_base_mixer_stop;
+  agg_class->start = gst_gl_base_mixer_start;
+
+  videoaggregator_class->negotiated_caps = _negotiated_caps;
+
+  klass->propose_allocation = _default_propose_allocation;
+
+  g_object_class_install_property (gobject_class, PROP_CONTEXT,
+      g_param_spec_object ("context",
+          "OpenGL context",
+          "Get OpenGL context",
+          GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  /* Register the pad class */
+  g_type_class_ref (GST_TYPE_GL_BASE_MIXER_PAD);
+
+  klass->supported_gl_api = GST_GL_API_ANY;
+}
+
+static void
+gst_gl_base_mixer_reset (GstGLBaseMixer * mix)
+{
+  /* clean up collect data */
+  mix->priv->negotiated = FALSE;
+}
+
+static void
+gst_gl_base_mixer_init (GstGLBaseMixer * mix)
+{
+  mix->priv = GST_GL_BASE_MIXER_GET_PRIVATE (mix);
+
+  gst_gl_base_mixer_reset (mix);
+}
+
+static void
+gst_gl_base_mixer_set_context (GstElement * element, GstContext * context)
+{
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (element);
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+
+  gst_gl_handle_set_context (element, context, &mix->display,
+      &mix->priv->other_context);
+
+  if (mix->display)
+    gst_gl_display_filter_gl_api (mix->display, mix_class->supported_gl_api);
+}
+
+static gboolean
+gst_gl_base_mixer_activate (GstGLBaseMixer * mix, gboolean active)
+{
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+  gboolean result = TRUE;
+
+  if (active) {
+    if (!gst_gl_ensure_element_data (mix, &mix->display,
+            &mix->priv->other_context))
+      return FALSE;
+
+    gst_gl_display_filter_gl_api (mix->display, mix_class->supported_gl_api);
+  }
+
+  return result;
+}
+
+static gboolean
+gst_gl_base_mixer_src_activate_mode (GstAggregator * aggregator,
+    GstPadMode mode, gboolean active)
+{
+  GstGLBaseMixer *mix;
+  gboolean result = FALSE;
+
+  mix = GST_GL_BASE_MIXER (aggregator);
+
+  switch (mode) {
+    case GST_PAD_MODE_PUSH:
+    case GST_PAD_MODE_PULL:
+      result = gst_gl_base_mixer_activate (mix, active);
+      break;
+    default:
+      result = TRUE;
+      break;
+  }
+  return result;
+}
+
+static gboolean
+gst_gl_base_mixer_src_query (GstAggregator * agg, GstQuery * query)
+{
+  gboolean res = FALSE;
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (agg);
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+
+      res = gst_gl_handle_context_query ((GstElement *) mix, query,
+          &mix->display, &mix->priv->other_context);
+      if (mix->display)
+        gst_gl_display_filter_gl_api (mix->display,
+            mix_class->supported_gl_api);
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, mix->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        res = mix->context != NULL;
+      }
+      GST_LOG_OBJECT (mix, "context query of type %s %i", context_type, res);
+
+      if (res)
+        return res;
+
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_AGGREGATOR_CLASS (parent_class)->src_query (agg, query);
+}
+
+static gboolean
+_find_local_gl_context (GstGLBaseMixer * mix)
+{
+  GstQuery *query;
+  GstContext *context;
+  const GstStructure *s;
+
+  if (mix->context)
+    return TRUE;
+
+  query = gst_query_new_context ("gst.gl.local_context");
+  if (!mix->context && gst_gl_run_query (GST_ELEMENT (mix), query, GST_PAD_SRC)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &mix->context,
+          NULL);
+    }
+  }
+  if (!mix->context
+      && gst_gl_run_query (GST_ELEMENT (mix), query, GST_PAD_SINK)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &mix->context,
+          NULL);
+    }
+  }
+
+  GST_DEBUG_OBJECT (mix, "found local context %p", mix->context);
+
+  gst_query_unref (query);
+
+  if (mix->context)
+    return TRUE;
+
+  return FALSE;
+}
+
+static gboolean
+gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query)
+{
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+  GError *error = NULL;
+  gboolean ret = TRUE;
+
+  if (!gst_gl_ensure_element_data (mix, &mix->display,
+          &mix->priv->other_context))
+    return FALSE;
+
+  gst_gl_display_filter_gl_api (mix->display, mix_class->supported_gl_api);
+
+  _find_local_gl_context (mix);
+
+  if (!mix->context) {
+    GST_OBJECT_LOCK (mix->display);
+    do {
+      if (mix->context) {
+        gst_object_unref (mix->context);
+        mix->context = NULL;
+      }
+      /* just get a GL context.  we don't care */
+      mix->context =
+          gst_gl_display_get_gl_context_for_thread (mix->display, NULL);
+      if (!mix->context) {
+        if (!gst_gl_display_create_context (mix->display,
+                mix->priv->other_context, &mix->context, &error)) {
+          GST_OBJECT_UNLOCK (mix->display);
+          goto context_error;
+        }
+      }
+    } while (!gst_gl_display_add_context (mix->display, mix->context));
+    GST_OBJECT_UNLOCK (mix->display);
+  }
+
+  if (mix_class->decide_allocation)
+    ret = mix_class->decide_allocation (mix, query);
+
+  return ret;
+
+context_error:
+  {
+    GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", error->message),
+        (NULL));
+    g_clear_error (&error);
+    return FALSE;
+  }
+}
+
+/* takes ownership of the pool, allocator and query */
+static gboolean
+gst_gl_base_mixer_set_allocation (GstGLBaseMixer * mix,
+    GstBufferPool * pool, GstAllocator * allocator,
+    GstAllocationParams * params, GstQuery * query)
+{
+  GstAllocator *oldalloc;
+  GstBufferPool *oldpool;
+  GstQuery *oldquery;
+  GstGLBaseMixerPrivate *priv = mix->priv;
+
+  GST_DEBUG ("storing allocation query");
+
+  GST_OBJECT_LOCK (mix);
+  oldpool = priv->pool;
+  priv->pool = pool;
+
+  oldalloc = priv->allocator;
+  priv->allocator = allocator;
+
+  oldquery = priv->query;
+  priv->query = query;
+
+  if (params)
+    priv->params = *params;
+  else
+    gst_allocation_params_init (&priv->params);
+  GST_OBJECT_UNLOCK (mix);
+
+  if (oldpool) {
+    GST_DEBUG_OBJECT (mix, "deactivating old pool %p", oldpool);
+    gst_buffer_pool_set_active (oldpool, FALSE);
+    gst_object_unref (oldpool);
+  }
+  if (oldalloc) {
+    gst_object_unref (oldalloc);
+  }
+  if (oldquery) {
+    gst_query_unref (oldquery);
+  }
+  return TRUE;
+}
+
+static gboolean
+gst_gl_base_mixer_do_bufferpool (GstGLBaseMixer * mix, GstCaps * outcaps)
+{
+  GstQuery *query;
+  gboolean result = TRUE;
+  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 (agg->srcpad, query)) {
+    /* not a problem, just debug a little */
+    GST_DEBUG_OBJECT (mix, "peer ALLOCATION query failed");
+  }
+
+  GST_DEBUG_OBJECT (mix, "calling decide_allocation");
+  result = gst_gl_base_mixer_decide_allocation (mix, query);
+
+  GST_DEBUG_OBJECT (mix, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result,
+      query);
+
+  if (!result)
+    goto no_decide_allocation;
+
+  /* we got configuration from our peer or the decide_allocation method,
+   * parse them */
+  if (gst_query_get_n_allocation_params (query) > 0) {
+    gst_query_parse_nth_allocation_param (query, 0, &allocator, &params);
+  } else {
+    allocator = NULL;
+    gst_allocation_params_init (&params);
+  }
+
+  if (gst_query_get_n_allocation_pools (query) > 0)
+    gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL);
+
+  /* now store */
+  result =
+      gst_gl_base_mixer_set_allocation (mix, pool, allocator, &params, query);
+
+  return result;
+
+  /* Errors */
+no_decide_allocation:
+  {
+    GST_WARNING_OBJECT (mix, "Failed to decide allocation");
+    gst_query_unref (query);
+
+    return result;
+  }
+}
+
+GstBufferPool *
+gst_gl_base_mixer_get_buffer_pool (GstGLBaseMixer * mix)
+{
+  GstBufferPool *pool;
+
+  GST_OBJECT_LOCK (mix);
+  pool = mix->priv->pool;
+  if (pool)
+    gst_object_ref (pool);
+  GST_OBJECT_UNLOCK (mix);
+
+  return pool;
+}
+
+static void
+gst_gl_base_mixer_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstGLBaseMixer *mixer = GST_GL_BASE_MIXER (object);
+
+  switch (prop_id) {
+    case PROP_CONTEXT:
+      g_value_set_object (value, mixer->context);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_base_mixer_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;
+  }
+}
+
+static gboolean
+gst_gl_base_mixer_start (GstAggregator * agg)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_gl_base_mixer_stop (GstAggregator * agg)
+{
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (agg);
+
+  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->context) {
+    gst_object_unref (mix->context);
+    mix->context = NULL;
+  }
+
+  gst_gl_base_mixer_reset (mix);
+
+  return TRUE;
+}
+
+static GstStateChangeReturn
+gst_gl_base_mixer_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLBaseMixer *mix = GST_GL_BASE_MIXER (element);
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  GST_DEBUG_OBJECT (mix, "changing state: %s => %s",
+      gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+      gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_gl_ensure_element_data (element, &mix->display,
+              &mix->priv->other_context))
+        return GST_STATE_CHANGE_FAILURE;
+
+      gst_gl_display_filter_gl_api (mix->display, mix_class->supported_gl_api);
+      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_READY_TO_NULL:
+      if (mix->priv->other_context) {
+        gst_object_unref (mix->priv->other_context);
+        mix->priv->other_context = NULL;
+      }
+
+      if (mix->display) {
+        gst_object_unref (mix->display);
+        mix->display = NULL;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstglbasemixer.h b/ext/gl/gstglbasemixer.h
new file mode 100644
index 0000000..6282ccb
--- /dev/null
+++ b/ext/gl/gstglbasemixer.h
@@ -0,0 +1,103 @@
+/*
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@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_BASE_MIXER_H__
+#define __GST_GL_BASE_MIXER_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+#include <gst/video/gstvideoaggregator.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_GL_BASE_MIXER_PAD (gst_gl_base_mixer_pad_get_type())
+#define GST_GL_BASE_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_MIXER_PAD, GstGLBaseMixerPad))
+#define GST_GL_BASE_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_BASE_MIXER_PAD, GstGLBaseMixerPadClass))
+#define GST_IS_GL_BASE_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BASE_MIXER_PAD))
+#define GST_IS_GL_BASE_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_BASE_MIXER_PAD))
+#define GST_GL_BASE_MIXER_PAD_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_BASE_MIXER_PAD,GstGLBaseMixerPadClass))
+
+typedef struct _GstGLBaseMixerPad GstGLBaseMixerPad;
+typedef struct _GstGLBaseMixerPadClass GstGLBaseMixerPadClass;
+
+/* all information needed for one video stream */
+struct _GstGLBaseMixerPad
+{
+  GstVideoAggregatorPad parent;                /* subclass the pad */
+};
+
+struct _GstGLBaseMixerPadClass
+{
+  GstVideoAggregatorPadClass parent_class;
+};
+
+GType gst_gl_base_mixer_pad_get_type (void);
+
+#define GST_TYPE_GL_BASE_MIXER (gst_gl_base_mixer_get_type())
+#define GST_GL_BASE_MIXER(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_MIXER, GstGLBaseMixer))
+#define GST_GL_BASE_MIXER_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_BASE_MIXER, GstGLBaseMixerClass))
+#define GST_IS_GL_BASE_MIXER(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BASE_MIXER))
+#define GST_IS_GL_BASE_MIXER_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_BASE_MIXER))
+#define GST_GL_BASE_MIXER_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_BASE_MIXER,GstGLBaseMixerClass))
+
+typedef struct _GstGLBaseMixer GstGLBaseMixer;
+typedef struct _GstGLBaseMixerClass GstGLBaseMixerClass;
+typedef struct _GstGLBaseMixerPrivate GstGLBaseMixerPrivate;
+
+struct _GstGLBaseMixer
+{
+  GstVideoAggregator     vaggregator;
+
+  GstGLDisplay          *display;
+  GstGLContext          *context;
+
+  gpointer _padding[GST_PADDING];
+
+  GstGLBaseMixerPrivate *priv;
+};
+
+struct _GstGLBaseMixerClass
+{
+  GstVideoAggregatorClass parent_class;
+  GstGLAPI supported_gl_api;
+
+  gboolean (*propose_allocation) (GstGLBaseMixer * mix, GstGLBaseMixerPad * pad, GstQuery * decide_query, GstQuery *query);
+  gboolean (*decide_allocation) (GstGLBaseMixer * mix, GstQuery * decide_query);
+
+  gpointer _padding[GST_PADDING];
+};
+
+GType gst_gl_base_mixer_get_type(void);
+
+GstBufferPool *gst_gl_base_mixer_get_buffer_pool (GstGLBaseMixer * mix);
+
+G_END_DECLS
+#endif /* __GST_GL_BASE_MIXER_H__ */
diff --git a/ext/gl/gstglbumper.c b/ext/gl/gstglbumper.c
deleted file mode 100644
index 5303427..0000000
--- a/ext/gl/gstglbumper.c
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Cyril Comparon <cyril.comparon@gmail.com>
- * Copyright (C) 2008 Julien Isorce <julien.isorce@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-glbumper
- *
- * Bump mapping using the normal method.
- *
- * <refsect2>
- * <title>Examples</title>
- * |[
- * gst-launch -v videotestsrc ! glupload ! glbumper location=normalmap.bmp ! glimagesink
- * ]| A pipeline to test normal mapping.
- * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <png.h>
-#include "gstglbumper.h"
-
-#if PNG_LIBPNG_VER >= 10400
-#define int_p_NULL         NULL
-#define png_infopp_NULL    NULL
-#endif
-
-#define GST_CAT_DEFAULT gst_gl_bumper_debug
-GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
-enum
-{
-  PROP_0,
-  PROP_LOCATION
-};
-
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_bumper_debug, "glbumper", 0, "glbumper element");
-
-G_DEFINE_TYPE_WITH_CODE (GstGLBumper, gst_gl_bumper, GST_TYPE_GL_FILTER,
-    DEBUG_INIT);
-
-static void gst_gl_bumper_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_gl_bumper_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-
-static void gst_gl_bumper_reset (GstGLFilter * filter);
-static gboolean gst_gl_bumper_init_shader (GstGLFilter * filter);
-static gboolean gst_gl_bumper_filter_texture (GstGLFilter * filter,
-    guint in_tex, guint out_tex);
-static void gst_gl_bumper_callback (gint width, gint height, guint texture,
-    gpointer stuff);
-
-//vertex source
-static const gchar *bumper_v_src =
-    "attribute vec3 aTangent;\n"
-    "\n"
-    "varying vec3 vNormal;\n"
-    "varying vec3 vTangent;\n"
-    "varying vec3 vVertexToLight0;\n"
-    "varying vec3 vVertexToLight1;\n"
-    "\n"
-    "void main()\n"
-    "{\n"
-    "  // transform the vertex\n"
-    "  gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;\n"
-    "\n"
-    "  // transform the normal and the tangent to scene coords\n"
-    "  vNormal = normalize(gl_NormalMatrix * gl_Normal);\n"
-    "  vTangent = normalize(gl_NormalMatrix * aTangent);\n"
-    "\n"
-    "  // transforming the vertex position to modelview-space\n"
-    "  //const vec4 vertexInSceneCoords = gl_ModelViewMatrix * gl_Vertex;\n"
-    "\n"
-    "  // calculate the vector from the vertex position to the light position\n"
-    "  vVertexToLight0 = normalize(gl_LightSource[0].position).xyz;\n"
-    "  vVertexToLight1 = normalize(gl_LightSource[1].position).xyz;\n"
-    "\n"
-    "  // transit vertex color\n"
-    "  gl_FrontColor = gl_BackColor = gl_Color;\n"
-    "\n"
-    "  // use the two first sets of texture coordinates in the fragment shader\n"
-    "  gl_TexCoord[0] = gl_MultiTexCoord0;\n"
-    "  gl_TexCoord[1] = gl_MultiTexCoord1;\n" "}\n";
-
-//fragment source
-static const gchar *bumper_f_src =
-    "uniform sampler2D texture0;\n"
-    "uniform sampler2D texture1;\n"
-    "\n"
-    "varying vec3 vNormal;\n"
-    "varying vec3 vTangent;\n"
-    "varying vec3 vVertexToLight0;\n"
-    "varying vec3 vVertexToLight1;\n"
-    "\n"
-    "void main()\n"
-    "{\n"
-    "  // get the color of the textures\n"
-    "  vec4 textureColor = texture2D(texture0, gl_TexCoord[0].st);\n"
-    "  vec3 normalmapItem = texture2D(texture1, gl_TexCoord[1].st).xyz * 2.0 - 1.0;\n"
-    "\n"
-    "  // calculate matrix that transform from tangent space to normalmap space (contrary of intuition)\n"
-    "  vec3 binormal = cross(vNormal, vTangent);\n"
-    "  mat3 tangentSpace2normalmapSpaceMat = mat3(vTangent, binormal, vNormal);\n"
-    "\n"
-    "  // disturb the normal\n"
-    "  vec3 disturbedNormal = tangentSpace2normalmapSpaceMat * normalmapItem;\n"
-    "\n"
-    "  // calculate the diffuse term and clamping it to [0;1]\n"
-    "  float diffuseTerm0 = clamp(dot(disturbedNormal, vVertexToLight0), 0.0, 1.0);\n"
-    "  float diffuseTerm1 = clamp(dot(disturbedNormal, vVertexToLight1), 0.0, 1.0);\n"
-    "\n"
-    "  vec3 irradiance = (diffuseTerm0 * gl_LightSource[0].diffuse.rgb + diffuseTerm1 * gl_LightSource[1].diffuse.rgb);\n"
-    "\n"
-    "  // calculate the final color\n"
-    "  gl_FragColor = vec4(irradiance * textureColor.rgb, textureColor.w);\n"
-    "}\n";
-
-#define LOAD_ERROR(context, msg) { gst_gl_context_set_error (context, "unable to load %s: %s", bumper->location, msg); return; }
-
-//png reading error handler
-static void
-user_warning_fn (png_structp png_ptr, png_const_charp warning_msg)
-{
-  g_warning ("%s\n", warning_msg);
-}
-
-//Called in the gl thread
-static void
-gst_gl_bumper_init_resources (GstGLFilter * filter)
-{
-  GstGLBumper *bumper = GST_GL_BUMPER (filter);
-  GstGLContext *context = filter->context;
-  const GstGLFuncs *gl = context->gl_vtable;
-
-  png_structp png_ptr;
-  png_infop info_ptr;
-  png_uint_32 width = 0;
-  png_uint_32 height = 0;
-  gint bit_depth = 0;
-  gint color_type = 0;
-  gint interlace_type = 0;
-  png_FILE_p fp = NULL;
-  guint y = 0;
-  guchar *raw_data = NULL;
-  guchar **rows = NULL;
-  png_byte magic[8];
-  gint n_read;
-
-  if (!bumper->location) {
-    gst_gl_context_set_error (context, "A filename is required");
-    return;
-  }
-
-  /* BEGIN load png image file */
-
-  if ((fp = fopen (bumper->location, "rb")) == NULL)
-    LOAD_ERROR (context, "file not found");
-
-  /* Read magic number */
-  n_read = fread (magic, 1, sizeof (magic), fp);
-  if (n_read != sizeof (magic)) {
-    fclose (fp);
-    LOAD_ERROR (context, "can't read PNG magic number");
-  }
-
-  /* Check for valid magic number */
-  if (png_sig_cmp (magic, 0, sizeof (magic))) {
-    fclose (fp);
-    LOAD_ERROR (context, "not a valid PNG image");
-  }
-
-  png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-
-  if (png_ptr == NULL) {
-    fclose (fp);
-    LOAD_ERROR (context, "failed to initialize the png_struct");
-  }
-
-  png_set_error_fn (png_ptr, NULL, NULL, user_warning_fn);
-
-  info_ptr = png_create_info_struct (png_ptr);
-  if (info_ptr == NULL) {
-    fclose (fp);
-    png_destroy_read_struct (&png_ptr, png_infopp_NULL, png_infopp_NULL);
-    LOAD_ERROR (context,
-        "failed to initialize the memory for image information");
-  }
-
-  png_init_io (png_ptr, fp);
-
-  png_set_sig_bytes (png_ptr, sizeof (magic));
-
-  png_read_info (png_ptr, info_ptr);
-
-  png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-      &interlace_type, int_p_NULL, int_p_NULL);
-
-  if (color_type != PNG_COLOR_TYPE_RGB) {
-    fclose (fp);
-    png_destroy_read_struct (&png_ptr, png_infopp_NULL, png_infopp_NULL);
-    LOAD_ERROR (context, "color type is not rgb");
-  }
-
-  raw_data = (guchar *) malloc (sizeof (guchar) * width * height * 3);
-
-  rows = (guchar **) malloc (sizeof (guchar *) * height);
-
-  for (y = 0; y < height; ++y)
-    rows[y] = (guchar *) (raw_data + y * width * 3);
-
-  png_read_image (png_ptr, rows);
-
-  free (rows);
-
-  png_read_end (png_ptr, info_ptr);
-  png_destroy_read_struct (&png_ptr, &info_ptr, png_infopp_NULL);
-  fclose (fp);
-
-  /* END load png image file */
-
-  bumper->bumpmap_width = width;
-  bumper->bumpmap_height = height;
-
-  gl->GenTextures (1, &bumper->bumpmap);
-  gl->BindTexture (GL_TEXTURE_2D, bumper->bumpmap);
-  gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA,
-      bumper->bumpmap_width, bumper->bumpmap_height, 0,
-      GL_RGB, GL_UNSIGNED_BYTE, raw_data);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-  free (raw_data);
-}
-
-//Called in the gl thread
-static void
-gst_gl_bumper_reset_resources (GstGLFilter * filter)
-{
-  GstGLBumper *bumper = GST_GL_BUMPER (filter);
-
-  if (bumper->bumpmap) {
-    glDeleteTextures (1, &bumper->bumpmap);
-    bumper->bumpmap = 0;
-  }
-}
-
-static void
-gst_gl_bumper_class_init (GstGLBumperClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-  gobject_class->set_property = gst_gl_bumper_set_property;
-  gobject_class->get_property = gst_gl_bumper_get_property;
-
-  GST_GL_FILTER_CLASS (klass)->filter_texture = gst_gl_bumper_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->display_init_cb = gst_gl_bumper_init_resources;
-  GST_GL_FILTER_CLASS (klass)->display_reset_cb = gst_gl_bumper_reset_resources;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_bumper_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_bumper_reset;
-
-  g_object_class_install_property (gobject_class,
-      PROP_LOCATION, g_param_spec_string ("location",
-          "Normal map location",
-          "Normal map location", NULL,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gst_element_class_set_metadata (element_class, "OpenGL bumper filter",
-      "Filter/Effect/Video", "Bump mapping filter",
-      "Cyril Comparon <cyril.comparon@gmail.com>, "
-      "Julien Isorce <julien.isorce@gmail.com>");
-}
-
-static void
-gst_gl_bumper_init (GstGLBumper * bumper)
-{
-  bumper->shader = NULL;
-  bumper->bumpmap = 0;
-  bumper->bumpmap_width = 0;
-  bumper->bumpmap_height = 0;
-  bumper->location = NULL;
-}
-
-static void
-gst_gl_bumper_reset (GstGLFilter * filter)
-{
-  GstGLBumper *bumper_filter = GST_GL_BUMPER (filter);
-
-  //blocking call, wait the opengl thread has destroyed the shader
-  if (bumper_filter->shader)
-    gst_gl_context_del_shader (filter->context, bumper_filter->shader);
-  bumper_filter->shader = NULL;
-}
-
-static void
-gst_gl_bumper_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstGLBumper *bumper = GST_GL_BUMPER (object);
-
-  switch (prop_id) {
-    case PROP_LOCATION:
-      if (bumper->location != NULL)
-        g_free (bumper->location);
-      bumper->location = g_value_dup_string (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_gl_bumper_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstGLBumper *bumper = GST_GL_BUMPER (object);
-
-  switch (prop_id) {
-    case PROP_LOCATION:
-      g_value_set_string (value, bumper->location);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_gl_bumper_init_shader (GstGLFilter * filter)
-{
-  GstGLBumper *bumper = GST_GL_BUMPER (filter);
-
-  //blocking call, wait the opengl thread has compiled the shader
-  return gst_gl_context_gen_shader (filter->context, bumper_v_src, bumper_f_src,
-      &bumper->shader);
-}
-
-static gboolean
-gst_gl_bumper_filter_texture (GstGLFilter * filter, guint in_tex, guint out_tex)
-{
-  gpointer bumper_filter = GST_GL_BUMPER (filter);
-
-  //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, gst_gl_bumper_callback,
-      GST_VIDEO_INFO_WIDTH (&filter->in_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->in_info),
-      in_tex, 45,
-      (gdouble) GST_VIDEO_INFO_WIDTH (&filter->out_info) /
-      (gdouble) GST_VIDEO_INFO_HEIGHT (&filter->out_info), 0.1, 50,
-      GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, bumper_filter);
-
-  return TRUE;
-}
-
-typedef struct _MeshData
-{
-  float x, y, z;                /* Vertex */
-  float nx, ny, nz;             /* Normal */
-  float s0, t0;                 /* TexCoord0 */
-  float s1, t1;                 /* TexCoord1 */
-  float va0, vb0, vc0;          /* VertexAttrib */
-} MeshData;
-
-//opengl scene, params: input texture (not the output filter->texture)
-static void
-gst_gl_bumper_callback (gint width, gint height, guint texture, gpointer stuff)
-{
-  static GLfloat xrot = 0;
-  static GLfloat yrot = 0;
-  static GLfloat zrot = 0;
-
-  GstGLFuncs *gl;
-  GstGLBumper *bumper = GST_GL_BUMPER (stuff);
-  GstGLContext *context = GST_GL_FILTER (bumper)->context;
-  GLint locTangent = 0;
-
-  //choose the lights
-  GLfloat light_direction0[] = { 1.0, 0.0, -1.0, 0.0 }; // light goes along -x
-  GLfloat light_direction1[] = { -1.0, 0.0, -1.0, 0.0 };        // light goes along x
-  GLfloat light_diffuse0[] = { 1.0, 1.0, 1.0, 1.0 };
-  GLfloat light_diffuse1[] = { 1.0, 1.0, 1.0, 1.0 };
-  GLfloat mat_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
-
-/* *INDENT-OFF* */
-  MeshData mesh[] = {
-   /* |     Vertex      |     Normal      |TexCoord0|TexCoord1|  VertexAttrib  | */
-/*F*/ { 1.0,  1.0, -1.0,  0.0,  0.0, -1.0, 0.0, 0.0, 0.0, 0.0,  0.0,  1.0,  0.0},
-/*r*/ { 1.0, -1.0, -1.0,  0.0,  0.0, -1.0, 1.0, 0.0, 1.0, 0.0,  0.0,  1.0,  0.0},
-/*o*/ {-1.0, -1.0, -1.0,  0.0,  0.0, -1.0, 1.0, 1.0, 1.0, 1.0,  0.0,  1.0,  0.0},
-      {-1.0,  1.0, -1.0,  0.0,  0.0, -1.0, 0.0, 1.0, 0.0, 1.0,  0.0,  1.0,  0.0},
-/*R*/ {-1.0,  1.0, -1.0, -1.0,  0.0,  0.0, 0.0, 0.0, 0.0, 0.0,  0.0,  1.0,  0.0},
-/*i*/ {-1.0, -1.0, -1.0, -1.0,  0.0,  0.0, 1.0, 0.0, 1.0, 0.0,  0.0,  1.0,  0.0},
-/*g*/ {-1.0, -1.0,  1.0, -1.0,  0.0,  0.0, 1.0, 1.0, 1.0, 1.0,  0.0,  1.0,  0.0},
-      {-1.0,  1.0,  1.0, -1.0,  0.0,  0.0, 0.0, 1.0, 0.0, 1.0,  0.0,  1.0,  0.0},
-/*B*/ {-1.0,  1.0,  1.0,  0.0,  0.0,  1.0, 0.0, 0.0, 0.0, 0.0,  0.0,  1.0,  0.0},
-/*a*/ {-1.0, -1.0,  1.0,  0.0,  0.0,  1.0, 1.0, 0.0, 1.0, 0.0,  0.0,  1.0,  0.0},
-/*c*/ { 1.0, -1.0,  1.0,  0.0,  0.0,  1.0, 1.0, 1.0, 1.0, 1.0,  0.0,  1.0,  0.0},
-      { 1.0,  1.0,  1.0,  0.0,  0.0,  1.0, 0.0, 1.0, 0.0, 1.0,  0.0,  1.0,  0.0},
-/*L*/ { 1.0,  1.0,  1.0,  1.0,  0.0,  0.0, 0.0, 0.0, 0.0, 0.0,  0.0,  1.0,  0.0},
-/*e*/ { 1.0, -1.0,  1.0,  1.0,  0.0,  0.0, 1.0, 0.0, 1.0, 0.0,  0.0,  1.0,  0.0},
-/*f*/ { 1.0, -1.0, -1.0,  1.0,  0.0,  0.0, 1.0, 1.0, 1.0, 1.0,  0.0,  1.0,  0.0},
-      { 1.0,  1.0, -1.0,  1.0,  0.0,  0.0, 0.0, 1.0, 0.0, 1.0,  0.0,  1.0,  0.0},
-/*T*/ { 1.0,  1.0,  1.0,  0.0,  1.0,  0.0, 0.0, 0.0, 0.0, 0.0,  0.0,  0.0,  1.0},
-/*o*/ { 1.0,  1.0, -1.0,  0.0,  1.0,  0.0, 1.0, 0.0, 1.0, 0.0,  0.0,  0.0,  1.0},
-/*p*/ {-1.0,  1.0, -1.0,  0.0,  1.0,  0.0, 1.0, 1.0, 1.0, 1.0,  0.0,  0.0,  1.0},
-      {-1.0,  1.0,  1.0,  0.0,  1.0,  0.0, 0.0, 1.0, 0.0, 1.0,  0.0,  0.0,  1.0},
-/*B*/ { 1.0, -1.0, -1.0,  0.0, -1.0,  0.0, 0.0, 0.0, 0.0, 0.0,  0.0,  0.0, -1.0},
-/*o*/ { 1.0, -1.0,  1.0,  0.0, -1.0,  0.0, 1.0, 0.0, 1.0, 0.0,  0.0,  0.0, -1.0},
-/*t*/ {-1.0, -1.0,  1.0,  0.0, -1.0,  0.0, 1.0, 1.0, 1.0, 1.0,  0.0,  0.0, -1.0},
-      {-1.0, -1.0, -1.0,  0.0, -1.0,  0.0, 0.0, 1.0, 0.0, 1.0,  0.0,  0.0, -1.0},
-  };
-
-  GLushort indices[] = {
-    0, 1, 2,
-    0, 2, 3,
-    4, 5, 6,
-    4, 6, 7,
-    8, 9, 10,
-    8, 10, 11,
-    12, 13, 14,
-    12, 14, 15,
-    16, 17, 18,
-    16, 18, 19,
-    20, 21, 22,
-    20, 22, 23
-  };
-
-/* *INDENT-ON* */
-
-  gl = GST_GL_FILTER (bumper)->context->gl_vtable;
-
-  //eye point
-  gl->MatrixMode (GL_PROJECTION);
-  gluLookAt (0.0, 0.0, -6.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
-  gl->MatrixMode (GL_MODELVIEW);
-
-  //scene conf
-  gl->Enable (GL_DEPTH_TEST);
-  gl->DepthFunc (GL_LEQUAL);
-  gl->Hint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-
-  gl->ShadeModel (GL_SMOOTH);
-
-  //set the lights
-  gl->Lightfv (GL_LIGHT0, GL_POSITION, light_direction0);
-  gl->Lightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse0);
-  gl->Lightfv (GL_LIGHT1, GL_POSITION, light_direction1);
-  gl->Lightfv (GL_LIGHT1, GL_DIFFUSE, light_diffuse1);
-  gl->Materialfv (GL_FRONT, GL_DIFFUSE, mat_diffuse);
-  gl->ColorMaterial (GL_FRONT_AND_BACK, GL_DIFFUSE);
-  gl->Enable (GL_COLOR_MATERIAL);
-  gl->Enable (GL_LIGHTING);
-  gl->Enable (GL_LIGHT0);
-  gl->Enable (GL_LIGHT1);
-  //configure shader
-  gst_gl_shader_use (bumper->shader);
-  locTangent =
-      gst_gl_shader_get_attribute_location (bumper->shader, "aTangent");
-
-  //set the normal map
-  gl->ActiveTexture (GL_TEXTURE1);
-  gst_gl_shader_set_uniform_1i (bumper->shader, "texture1", 1);
-  gl->BindTexture (GL_TEXTURE_2D, bumper->bumpmap);
-
-  //set the video texture
-  gl->ActiveTexture (GL_TEXTURE0);
-  gst_gl_shader_set_uniform_1i (bumper->shader, "texture0", 0);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-
-  gl->Rotatef (xrot, 1.0f, 0.0f, 0.0f);
-  gl->Rotatef (yrot, 0.0f, 1.0f, 0.0f);
-  gl->Rotatef (zrot, 0.0f, 0.0f, 1.0f);
-
-  gl->EnableVertexAttribArray (locTangent);
-
-  gl->ClientActiveTexture (GL_TEXTURE0);
-  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->EnableClientState (GL_VERTEX_ARRAY);
-  gl->EnableClientState (GL_NORMAL_ARRAY);
-
-  gl->VertexAttribPointer (locTangent, 3, GL_FLOAT, 0, sizeof (MeshData),
-      &mesh[0].va0);
-  gl->VertexPointer (3, GL_FLOAT, sizeof (MeshData), &mesh[0].x);
-  gl->NormalPointer (GL_FLOAT, sizeof (MeshData), &mesh[0].nx);
-  gl->TexCoordPointer (2, GL_FLOAT, sizeof (MeshData), &mesh[0].s0);
-
-  gl->ClientActiveTexture (GL_TEXTURE1);
-  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->TexCoordPointer (2, GL_FLOAT, sizeof (MeshData), &mesh[0].s1);
-
-  gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices);
-
-  gl->DisableClientState (GL_VERTEX_ARRAY);
-  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->DisableClientState (GL_NORMAL_ARRAY);
-
-  gl->ClientActiveTexture (GL_TEXTURE0);
-  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-
-  gl->DisableVertexAttribArray (locTangent);
-
-  gst_gl_context_clear_shader (context);
-
-  gl->Disable (GL_LIGHT0);
-  gl->Disable (GL_LIGHT1);
-  gl->Disable (GL_LIGHTING);
-  gl->Disable (GL_COLOR_MATERIAL);
-
-  xrot += 1.0f;
-  yrot += 0.9f;
-  zrot += 0.6f;
-}
diff --git a/ext/gl/gstglbumper.h b/ext/gl/gstglbumper.h
deleted file mode 100644
index b1a1dc0..0000000
--- a/ext/gl/gstglbumper.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* 
- * GStreamer
- * Copyright (C) 2008 Julien Isorce <julien.isorce@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_BUMPER_H_
-#define _GST_GL_BUMPER_H_
-
-#include <gst/gl/gstglfilter.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GL_BUMPER            (gst_gl_bumper_get_type())
-#define GST_GL_BUMPER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BUMPER,GstGLBumper))
-#define GST_IS_GL_BUMPER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BUMPER))
-#define GST_GL_BUMPER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_BUMPER,GstGLBumperClass))
-#define GST_IS_GL_BUMPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_BUMPER))
-#define GST_GL_BUMPER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_BUMPER,GstGLBumperClass))
-
-typedef struct _GstGLBumper GstGLBumper;
-typedef struct _GstGLBumperClass GstGLBumperClass;
-
-struct _GstGLBumper
-{
-  GstGLFilter filter;
-  GstGLShader *shader;
-  GLuint bumpmap;
-  gint bumpmap_width;
-  gint bumpmap_height;
-  gchar *location;
-};
-
-struct _GstGLBumperClass
-{
-  GstGLFilterClass filter_class;
-};
-
-GType gst_gl_bumper_get_type (void);
-
-G_END_DECLS
-
-#endif /* _GST_GLBUMPER_H_ */
diff --git a/ext/gl/gstglcolorconvertelement.c b/ext/gl/gstglcolorconvertelement.c
new file mode 100644
index 0000000..e4ff6ca
--- /dev/null
+++ b/ext/gl/gstglcolorconvertelement.c
@@ -0,0 +1,257 @@
+/*
+ * GStreamer
+ * Copyright (C) 2012-2014 Matthew Waters <ystree00@gmail.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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/gl/gl.h>
+#include "gstglcolorconvertelement.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_color_convert_element_debug);
+#define GST_CAT_DEFAULT gst_gl_color_convert_element_debug
+
+G_DEFINE_TYPE_WITH_CODE (GstGLColorConvertElement, gst_gl_color_convert_element,
+    GST_TYPE_GL_BASE_FILTER,
+    GST_DEBUG_CATEGORY_INIT (gst_gl_color_convert_element_debug,
+        "glconvertelement", 0, "convert");
+    );
+
+static gboolean gst_gl_color_convert_element_set_caps (GstBaseTransform * bt,
+    GstCaps * in_caps, GstCaps * out_caps);
+static GstCaps *gst_gl_color_convert_element_transform_caps (GstBaseTransform *
+    bt, GstPadDirection direction, GstCaps * caps, GstCaps * filter);
+static gboolean gst_gl_color_convert_element_get_unit_size (GstBaseTransform *
+    trans, GstCaps * caps, gsize * size);
+static gboolean
+gst_gl_color_convert_element_filter_meta (GstBaseTransform * trans,
+    GstQuery * query, GType api, const GstStructure * params);
+static gboolean gst_gl_color_convert_element_decide_allocation (GstBaseTransform
+    * trans, GstQuery * query);
+static GstFlowReturn
+gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * inbuf, GstBuffer ** outbuf);
+static GstFlowReturn gst_gl_color_convert_element_transform (GstBaseTransform *
+    bt, GstBuffer * inbuf, GstBuffer * outbuf);
+static GstCaps *gst_gl_color_convert_element_fixate_caps (GstBaseTransform *
+    bt, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
+
+static GstStaticPadTemplate gst_gl_color_convert_element_src_pad_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS ";"
+        GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS));
+
+static GstStaticPadTemplate gst_gl_color_convert_element_sink_pad_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS ";"
+        GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS));
+
+static gboolean
+gst_gl_color_convert_element_stop (GstBaseTransform * bt)
+{
+  GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (bt);
+
+  if (convert->convert) {
+    gst_object_unref (convert->convert);
+    convert->convert = NULL;
+  }
+
+  gst_caps_replace (&convert->in_caps, NULL);
+  gst_caps_replace (&convert->out_caps, NULL);
+
+  return
+      GST_BASE_TRANSFORM_CLASS (gst_gl_color_convert_element_parent_class)->stop
+      (bt);
+}
+
+static void
+gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass)
+{
+  GstBaseTransformClass *bt_class = GST_BASE_TRANSFORM_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  bt_class->transform_caps = gst_gl_color_convert_element_transform_caps;
+  bt_class->set_caps = gst_gl_color_convert_element_set_caps;
+  bt_class->get_unit_size = gst_gl_color_convert_element_get_unit_size;
+  bt_class->filter_meta = gst_gl_color_convert_element_filter_meta;
+  bt_class->decide_allocation = gst_gl_color_convert_element_decide_allocation;
+  bt_class->prepare_output_buffer =
+      gst_gl_color_convert_element_prepare_output_buffer;
+  bt_class->transform = gst_gl_color_convert_element_transform;
+  bt_class->stop = gst_gl_color_convert_element_stop;
+  bt_class->fixate_caps = gst_gl_color_convert_element_fixate_caps;
+
+  bt_class->passthrough_on_same_caps = TRUE;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get
+      (&gst_gl_color_convert_element_src_pad_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get
+      (&gst_gl_color_convert_element_sink_pad_template));
+
+  gst_element_class_set_metadata (element_class,
+      "OpenGL color converter", "Filter/Converter/Video",
+      "Converts between color spaces using OpenGL shaders",
+      "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_color_convert_element_init (GstGLColorConvertElement * convert)
+{
+  gst_base_transform_set_prefer_passthrough (GST_BASE_TRANSFORM (convert),
+      TRUE);
+}
+
+static gboolean
+gst_gl_color_convert_element_set_caps (GstBaseTransform * bt,
+    GstCaps * in_caps, GstCaps * out_caps)
+{
+  GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (bt);
+
+  gst_caps_replace (&convert->in_caps, in_caps);
+  gst_caps_replace (&convert->out_caps, out_caps);
+
+  if (convert->convert)
+    gst_gl_color_convert_set_caps (convert->convert, in_caps, out_caps);
+
+  return TRUE;
+}
+
+static GstCaps *
+gst_gl_color_convert_element_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  GstGLContext *context = GST_GL_BASE_FILTER (bt)->context;
+
+  return gst_gl_color_convert_transform_caps (context, direction, caps, filter);
+}
+
+static gboolean
+gst_gl_color_convert_element_get_unit_size (GstBaseTransform * trans,
+    GstCaps * caps, gsize * size)
+{
+  gboolean ret = FALSE;
+  GstVideoInfo info;
+
+  ret = gst_video_info_from_caps (&info, caps);
+  if (ret)
+    *size = GST_VIDEO_INFO_SIZE (&info);
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_color_convert_element_filter_meta (GstBaseTransform * trans,
+    GstQuery * query, GType api, const GstStructure * params)
+{
+  /* propose all metadata upstream */
+  return TRUE;
+}
+
+static gboolean
+gst_gl_color_convert_element_decide_allocation (GstBaseTransform * trans,
+    GstQuery * query)
+{
+  GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (trans);
+  GstGLContext *context;
+
+  /* get gl context */
+  if (!GST_BASE_TRANSFORM_CLASS
+      (gst_gl_color_convert_element_parent_class)->decide_allocation (trans,
+          query))
+    return FALSE;
+
+  context = GST_GL_BASE_FILTER (trans)->context;
+
+  if (!convert->convert)
+    convert->convert = gst_gl_color_convert_new (context);
+
+  if (!gst_gl_color_convert_set_caps (convert->convert, convert->in_caps,
+          convert->out_caps))
+    return FALSE;
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * inbuf, GstBuffer ** outbuf)
+{
+  GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (bt);
+  GstBaseTransformClass *bclass;
+
+  bclass = GST_BASE_TRANSFORM_GET_CLASS (bt);
+
+  if (gst_base_transform_is_passthrough (bt)) {
+    *outbuf = inbuf;
+    return GST_FLOW_OK;
+  }
+
+  if (!convert->convert)
+    return GST_FLOW_NOT_NEGOTIATED;
+
+  *outbuf = gst_gl_color_convert_perform (convert->convert, inbuf);
+  if (!*outbuf) {
+    GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND,
+        ("%s", "Failed to convert video buffer"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+
+  /* basetransform doesn't unref if they're the same */
+  if (inbuf == *outbuf)
+    gst_buffer_unref (*outbuf);
+  else
+    bclass->copy_metadata (bt, inbuf, *outbuf);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_gl_color_convert_element_transform (GstBaseTransform * bt,
+    GstBuffer * inbuf, GstBuffer * outbuf)
+{
+  return GST_FLOW_OK;
+}
+
+static GstCaps *
+gst_gl_color_convert_element_fixate_caps (GstBaseTransform *
+    bt, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
+{
+  GstCaps *ret;
+
+  ret =
+      GST_BASE_TRANSFORM_CLASS
+      (gst_gl_color_convert_element_parent_class)->fixate_caps (bt, direction,
+      caps, othercaps);
+
+  if (direction == GST_PAD_SINK) {
+    if (gst_caps_is_subset (caps, ret)) {
+      gst_caps_replace (&ret, caps);
+    }
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstglcolorconvertelement.h b/ext/gl/gstglcolorconvertelement.h
new file mode 100644
index 0000000..2a0dd1d
--- /dev/null
+++ b/ext/gl/gstglcolorconvertelement.h
@@ -0,0 +1,59 @@
+/*
+ * 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_COLOR_CONVERT_ELEMENT_H__
+#define __GST_GL_COLOR_CONVERT_ELEMENT_H__
+
+#include <gst/video/video.h>
+#include <gst/gstmemory.h>
+
+#include <gst/gl/gstgl_fwd.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_color_convert_element_get_type (void);
+#define GST_TYPE_GL_COLOR_CONVERT_ELEMENT (gst_gl_color_convert_element_get_type())
+#define GST_GL_COLOR_CONVERT_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_COLOR_CONVERT_ELEMENT,GstGLColorConvertElement))
+#define GST_GL_COLOR_CONVERT_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLColorConvertElementClass))
+#define GST_IS_GL_COLOR_CONVERT_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_COLOR_CONVERT_ELEMENT))
+#define GST_IS_GL_COLOR_CONVERT_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_COLOR_CONVERT_ELEMENT))
+#define GST_GL_COLOR_CONVERT_ELEMENT_CAST(obj) ((GstGLColorConvertElement*)(obj))
+
+typedef struct _GstGLColorConvertElement GstGLColorConvertElement;
+typedef struct _GstGLColorConvertElementClass GstGLColorConvertElementClass;
+typedef struct _GstGLColorConvertElementPrivate GstGLColorConvertElementPrivate;
+
+struct _GstGLColorConvertElement
+{
+  GstGLBaseFilter        parent;
+
+  GstGLColorConvert *convert;
+  GstCaps *in_caps;
+  GstCaps *out_caps;
+};
+
+struct _GstGLColorConvertElementClass
+{
+  GstGLBaseFilterClass object_class;
+};
+
+G_END_DECLS
+
+#endif /* __GST_GL_COLOR_CONVERT_ELEMENT_H__ */
diff --git a/ext/gl/gstglcolorscale.c b/ext/gl/gstglcolorscale.c
index e56da5b..a79e524 100644
--- a/ext/gl/gstglcolorscale.c
+++ b/ext/gl/gstglcolorscale.c
@@ -32,12 +32,12 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! "video/x-raw-yuv" ! glcolorscale ! ximagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw ! glcolorscale ! ximagesink
  * ]| A pipeline to test colorspace conversion.
  * FBO is required.
   |[
- * gst-launch -v videotestsrc ! "video/x-raw-yuv, width=640, height=480, format=(fourcc)AYUV" ! glcolorscale ! \
- *   "video/x-raw-yuv, width=320, height=240, format=(fourcc)YV12" ! autovideosink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw, width=640, height=480, format=AYUV ! glcolorscale ! \
+ *   video/x-raw, width=320, height=240, format=YV12 ! videoconvert ! autovideosink
  * ]| A pipeline to test hardware scaling and colorspace conversion.
  * FBO and GLSL are required.
  * </refsect2>
@@ -61,7 +61,7 @@
 
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_colorscale_debug, "glcolorscale", 0, "glcolorscale element");
-
+#define gst_gl_colorscale_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLColorscale, gst_gl_colorscale,
     GST_TYPE_GL_FILTER, DEBUG_INIT);
 
@@ -70,17 +70,13 @@
 static void gst_gl_colorscale_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-#if GST_GL_HAVE_GLES2
 static gboolean gst_gl_colorscale_gen_gl_resources (GstGLFilter * filter);
-static void gst_gl_colorscale_del_gl_resources (GstGLFilter * filter);
-#endif
+static gboolean gst_gl_colorscale_del_gl_resources (GstBaseTransform * trans);
 
 static gboolean gst_gl_colorscale_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
-#if GST_GL_HAVE_OPENGL
 static void gst_gl_colorscale_callback (gint width, gint height,
     guint texture, gpointer stuff);
-#endif
 
 static void
 gst_gl_colorscale_class_init (GstGLColorscaleClass * klass)
@@ -101,23 +97,22 @@
       "Filter/Effect/Video", "Colorspace converter and video scaler",
       "Julien Isorce <julien.isorce@gmail.com>");
 
-#if GST_GL_HAVE_GLES2
-  filter_class->onInitFBO =
+  filter_class->init_fbo =
       GST_DEBUG_FUNCPTR (gst_gl_colorscale_gen_gl_resources);
-  filter_class->onStop = GST_DEBUG_FUNCPTR (gst_gl_colorscale_del_gl_resources);
-#endif
 
   filter_class->filter_texture = gst_gl_colorscale_filter_texture;
 
+  basetransform_class->stop =
+      GST_DEBUG_FUNCPTR (gst_gl_colorscale_del_gl_resources);
   basetransform_class->passthrough_on_same_caps = TRUE;
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2;
 }
 
 static void
 gst_gl_colorscale_init (GstGLColorscale * colorscale)
 {
-#if GST_GL_HAVE_GLES2
   colorscale->shader = NULL;
-#endif
 }
 
 static void
@@ -142,7 +137,6 @@
   }
 }
 
-#if GST_GL_HAVE_GLES2
 static void
 _compile_identity_shader (GstGLContext * context, GstGLColorscale * colorscale)
 {
@@ -163,12 +157,13 @@
 {
   GstGLColorscale *colorscale = GST_GL_COLORSCALE (filter);
 
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_GLES2) {
-    gst_gl_context_thread_add (filter->context,
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      (GST_GL_API_GLES2 | GST_GL_API_OPENGL3)) {
+    gst_gl_context_thread_add (GST_GL_BASE_FILTER (filter)->context,
         (GstGLContextThreadFunc) _compile_identity_shader, colorscale);
 
     if (!colorscale->shader) {
-      gst_gl_context_set_error (filter->context,
+      gst_gl_context_set_error (GST_GL_BASE_FILTER (filter)->context,
           "Failed to initialize identity shader");
       GST_ELEMENT_ERROR (colorscale, RESOURCE, NOT_FOUND, ("%s",
               gst_gl_context_get_error ()), (NULL));
@@ -179,17 +174,19 @@
   return TRUE;
 }
 
-static void
-gst_gl_colorscale_del_gl_resources (GstGLFilter * filter)
+static gboolean
+gst_gl_colorscale_del_gl_resources (GstBaseTransform * trans)
 {
-  GstGLColorscale *colorscale = GST_GL_COLORSCALE (filter);
+  GstGLColorscale *colorscale = GST_GL_COLORSCALE (trans);
 
   if (colorscale->shader) {
-    gst_gl_context_del_shader (filter->context, colorscale->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+        colorscale->shader);
     colorscale->shader = NULL;
   }
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
-#endif
 
 static gboolean
 gst_gl_colorscale_filter_texture (GstGLFilter * filter, guint in_tex,
@@ -199,35 +196,34 @@
 
   colorscale = GST_GL_COLORSCALE (filter);
 
-#if GST_GL_HAVE_GLES2
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_GLES2)
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      (GST_GL_API_GLES2 | GST_GL_API_OPENGL3))
     gst_gl_filter_render_to_target_with_shader (filter, TRUE, in_tex, out_tex,
         colorscale->shader);
-#endif
 
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL)
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      GST_GL_API_OPENGL)
     gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
         gst_gl_colorscale_callback, colorscale);
-#endif
 
   return TRUE;
 }
 
-#if GST_GL_HAVE_OPENGL
 static void
 gst_gl_colorscale_callback (gint width, gint height, guint texture,
     gpointer stuff)
 {
   GstGLFilter *filter = GST_GL_FILTER (stuff);
 
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL) {
-    const GstGLFuncs *gl = filter->context->gl_vtable;
+#if GST_GL_HAVE_OPENGL
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      GST_GL_API_OPENGL) {
+    const GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
     gl->MatrixMode (GL_PROJECTION);
     gl->LoadIdentity ();
   }
+#endif
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
-#endif
diff --git a/ext/gl/gstglcolorscale.h b/ext/gl/gstglcolorscale.h
index 101b905..9335996 100644
--- a/ext/gl/gstglcolorscale.h
+++ b/ext/gl/gstglcolorscale.h
@@ -43,9 +43,7 @@
 {
     GstGLFilter filter;
 
-#if GST_GL_HAVE_GLES2
     GstGLShader *shader;
-#endif
 };
 
 struct _GstGLColorscaleClass
diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
index b420fa6..2d48749 100644
--- a/ext/gl/gstgldeinterlace.c
+++ b/ext/gl/gstgldeinterlace.c
@@ -48,7 +48,7 @@
 
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_deinterlace_debug, "gldeinterlace", 0, "gldeinterlace element");
-
+#define gst_gl_deinterlace_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLDeinterlace, gst_gl_deinterlace,
     GST_TYPE_GL_FILTER, DEBUG_INIT);
 
@@ -57,7 +57,7 @@
 static void gst_gl_deinterlace_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
 
-static void gst_gl_deinterlace_reset (GstGLFilter * filter);
+static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
 static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
 static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
     GstBuffer * inbuf, GstBuffer * outbuf);
@@ -163,11 +163,14 @@
       "Deinterlacing based on fragment shaders",
       "Julien Isorce <julien.isorce@mail.com>");
 
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
+
   GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_deinterlace_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_deinterlace_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_deinterlace_reset;
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
 }
 
 static void
@@ -178,19 +181,20 @@
   filter->prev_tex = 0;
 }
 
-static void
-gst_gl_deinterlace_reset (GstGLFilter * filter)
+static gboolean
+gst_gl_deinterlace_reset (GstBaseTransform * trans)
 {
-  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
+  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
 
-  if (deinterlace_filter->prev_buffer) {
-    gst_buffer_unref (deinterlace_filter->prev_buffer);
-    deinterlace_filter->prev_buffer = NULL;
-  }
+  gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
+
   //blocking call, wait the opengl thread has destroyed the shader
   if (deinterlace_filter->shader)
-    gst_gl_context_del_shader (filter->context, deinterlace_filter->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+        deinterlace_filter->shader);
   deinterlace_filter->shader = NULL;
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static void
@@ -225,8 +229,8 @@
   GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
 
   //blocking call, wait the opengl thread has compiled the shader
-  return gst_gl_context_gen_shader (filter->context, 0, greedyh_fragment_source,
-      &deinterlace_filter->shader);
+  return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
+      greedyh_fragment_source, &deinterlace_filter->shader);
 }
 
 static gboolean
@@ -250,10 +254,7 @@
 
   gst_gl_filter_filter_texture (filter, inbuf, outbuf);
 
-  if (deinterlace_filter->prev_buffer) {
-    gst_buffer_unref (deinterlace_filter->prev_buffer);
-  }
-  deinterlace_filter->prev_buffer = gst_buffer_ref (inbuf);
+  gst_buffer_replace (&deinterlace_filter->prev_buffer, inbuf);
 
   return TRUE;
 }
@@ -265,7 +266,7 @@
 {
   GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
   guint temp;
 
   GLfloat verts[] = { -1.0, -1.0,
@@ -289,10 +290,8 @@
 
   gst_gl_shader_use (deinterlace_filter->shader);
 
-  gl->Enable (GL_TEXTURE_2D);
-
   if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
-    gst_gl_context_gen_texture (filter->context,
+    gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
         &deinterlace_filter->prev_tex,
         GST_VIDEO_INFO_FORMAT (&filter->out_info),
         GST_VIDEO_INFO_WIDTH (&filter->out_info),
@@ -305,7 +304,6 @@
 
   gl->ActiveTexture (GL_TEXTURE0);
   gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
       5.0f / 255.0f);
@@ -339,8 +337,6 @@
   gl->ClientActiveTexture (GL_TEXTURE0);
   gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
 
-  gl->Disable (GL_TEXTURE_2D);
-
   if (texture == filter->in_tex_id) {
     temp = filter->in_tex_id;
     filter->in_tex_id = deinterlace_filter->prev_tex;
diff --git a/ext/gl/gstgldifferencematte.c b/ext/gl/gstgldifferencematte.c
index f04c4c4..b2b5fa5 100644
--- a/ext/gl/gstgldifferencematte.c
+++ b/ext/gl/gstgldifferencematte.c
@@ -61,9 +61,6 @@
 static void gst_gl_differencematte_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
 
-static void gst_gl_differencematte_init_resources (GstGLFilter * filter);
-static void gst_gl_differencematte_reset_resources (GstGLFilter * filter);
-
 static gboolean gst_gl_differencematte_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
 
@@ -81,7 +78,7 @@
 gst_gl_differencematte_init_gl_resources (GstGLFilter * filter)
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
   gint i;
 
   for (i = 0; i < 4; i++) {
@@ -95,42 +92,47 @@
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    differencematte->shader[i] = gst_gl_shader_new (filter->context);
+    differencematte->shader[i] =
+        gst_gl_shader_new (GST_GL_BASE_FILTER (filter)->context);
   }
 
-  if (!gst_gl_shader_compile_and_check (differencematte->shader[0],
-          difference_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (GST_GL_FILTER (differencematte)->context,
+  if (!gst_gl_shader_compile_with_default_v_and_check (differencematte->shader
+          [0], difference_fragment_source, &filter->draw_attr_position_loc,
+          &filter->draw_attr_texture_loc)) {
+    gst_gl_context_set_error (GST_GL_BASE_FILTER (differencematte)->context,
         "Failed to initialize difference shader");
-    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND, ("%s",
+            gst_gl_context_get_error ()), (NULL));
     return;
   }
 
-  if (!gst_gl_shader_compile_and_check (differencematte->shader[1],
-          hconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (GST_GL_FILTER (differencematte)->context,
+  if (!gst_gl_shader_compile_with_default_v_and_check (differencematte->shader
+          [1], hconv7_fragment_source_gles2, &filter->draw_attr_position_loc,
+          &filter->draw_attr_texture_loc)) {
+    gst_gl_context_set_error (GST_GL_BASE_FILTER (differencematte)->context,
         "Failed to initialize hconv7 shader");
-    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND, ("%s",
+            gst_gl_context_get_error ()), (NULL));
     return;
   }
 
-  if (!gst_gl_shader_compile_and_check (differencematte->shader[2],
-          vconv7_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (GST_GL_FILTER (differencematte)->context,
+  if (!gst_gl_shader_compile_with_default_v_and_check (differencematte->shader
+          [2], vconv7_fragment_source_gles2, &filter->draw_attr_position_loc,
+          &filter->draw_attr_texture_loc)) {
+    gst_gl_context_set_error (GST_GL_BASE_FILTER (differencematte)->context,
         "Failed to initialize vconv7 shader");
-    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND, ("%s",
+            gst_gl_context_get_error ()), (NULL));
     return;
   }
 
-  if (!gst_gl_shader_compile_and_check (differencematte->shader[3],
-          texture_interp_fragment_source, GST_GL_SHADER_FRAGMENT_SOURCE)) {
-    gst_gl_context_set_error (GST_GL_FILTER (differencematte)->context,
+  if (!gst_gl_shader_compile_with_default_v_and_check (differencematte->shader
+          [3], texture_interp_fragment_source, &filter->draw_attr_position_loc,
+          &filter->draw_attr_texture_loc)) {
+    gst_gl_context_set_error (GST_GL_BASE_FILTER (differencematte)->context,
         "Failed to initialize interp shader");
-    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
-        ("%s", gst_gl_context_get_error ()), (NULL));
+    GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND, ("%s",
+            gst_gl_context_get_error ()), (NULL));
     return;
   }
 }
@@ -140,7 +142,7 @@
 gst_gl_differencematte_reset_gl_resources (GstGLFilter * filter)
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
   gint i;
 
   gl->DeleteTextures (1, &differencematte->savedbgtexture);
@@ -179,8 +181,6 @@
       gst_gl_differencematte_init_gl_resources;
   GST_GL_FILTER_CLASS (klass)->display_reset_cb =
       gst_gl_differencematte_reset_gl_resources;
-  GST_GL_FILTER_CLASS (klass)->onStart = gst_gl_differencematte_init_resources;
-  GST_GL_FILTER_CLASS (klass)->onStop = gst_gl_differencematte_reset_resources;
 
   g_object_class_install_property (gobject_class,
       PROP_LOCATION,
@@ -193,6 +193,9 @@
       "Gstreamer OpenGL DifferenceMatte", "Filter/Effect/Video",
       "Saves a background frame and replace it with a pixbuf",
       "Filippo Argiolas <filippo.argiolas@gmail.com>");
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2;
 }
 
 static void
@@ -212,12 +215,6 @@
 }
 
 static void
-gst_gl_differencematte_reset_resources (GstGLFilter * filter)
-{
-//  GstGLDifferenceMatte* differencematte = GST_GL_DIFFERENCEMATTE(filter);
-}
-
-static void
 gst_gl_differencematte_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
@@ -253,17 +250,11 @@
 }
 
 static void
-gst_gl_differencematte_init_resources (GstGLFilter * filter)
-{
-//  GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (filter);
-}
-
-static void
 gst_gl_differencematte_save_texture (gint width, gint height, guint texture,
     gpointer stuff)
 {
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   gl->LoadIdentity ();
@@ -276,7 +267,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (data);
   GstGLFilter *filter = GST_GL_FILTER (data);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->DeleteTextures (1, &differencematte->newbgtexture);
   gl->GenTextures (1, &differencematte->newbgtexture);
@@ -309,7 +300,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   gl->LoadIdentity ();
@@ -317,16 +308,12 @@
   gst_gl_shader_use (differencematte->shader[0]);
 
   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 (differencematte->shader[0], "current", 0);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, differencematte->savedbgtexture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (differencematte->shader[0], "saved", 1);
 
@@ -339,7 +326,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   gl->LoadIdentity ();
@@ -347,9 +334,7 @@
   gst_gl_shader_use (differencematte->shader[1]);
 
   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 (differencematte->shader[1], "tex", 0);
 
@@ -366,7 +351,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   gl->LoadIdentity ();
@@ -374,9 +359,7 @@
   gst_gl_shader_use (differencematte->shader[2]);
 
   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 (differencematte->shader[2], "tex", 0);
 
@@ -393,7 +376,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   glLoadIdentity ();
@@ -401,23 +384,17 @@
   gst_gl_shader_use (differencematte->shader[3]);
 
   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 (differencematte->shader[3], "blend", 0);
 
   gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, differencematte->newbgtexture);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (differencematte->shader[3], "base", 1);
 
   gl->ActiveTexture (GL_TEXTURE2);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, differencematte->midtexture[2]);
-  gl->Disable (GL_TEXTURE_2D);
 
   gst_gl_shader_set_uniform_1i (differencematte->shader[3], "alpha", 2);
 
@@ -430,7 +407,7 @@
 {
   GstGLDifferenceMatte *differencematte = GST_GL_DIFFERENCEMATTE (stuff);
   GstGLFilter *filter = GST_GL_FILTER (differencematte);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gl->MatrixMode (GL_PROJECTION);
   gl->LoadIdentity ();
@@ -452,8 +429,8 @@
       differencematte->pixbuf = NULL;
 
     /* if loader failed then context is turned off */
-    gst_gl_context_thread_add (filter->context, init_pixbuf_texture,
-        differencematte);
+    gst_gl_context_thread_add (GST_GL_BASE_FILTER (filter)->context,
+        init_pixbuf_texture, differencematte);
 
     /* save current frame, needed to calculate difference between
      * this frame and next ones */
@@ -515,7 +492,7 @@
   guchar **rows = NULL;
   gint filler;
 
-  if (!filter->context)
+  if (!GST_GL_BASE_FILTER (filter)->context)
     return TRUE;
 
   if ((fp = fopen (differencematte->location, "rb")) == NULL)
diff --git a/ext/gl/gstgldownloadelement.c b/ext/gl/gstgldownloadelement.c
new file mode 100644
index 0000000..94a6e7a
--- /dev/null
+++ b/ext/gl/gstgldownloadelement.c
@@ -0,0 +1,195 @@
+/*
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gl/gl.h>
+#include "gstgldownloadelement.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_download_element_debug);
+#define GST_CAT_DEFAULT gst_gl_download_element_debug
+
+#define gst_gl_download_element_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLDownloadElement, gst_gl_download_element,
+    GST_TYPE_GL_BASE_FILTER,
+    GST_DEBUG_CATEGORY_INIT (gst_gl_download_element_debug, "gldownloadelement",
+        0, "download element"););
+
+static gboolean gst_gl_download_element_get_unit_size (GstBaseTransform * trans,
+    GstCaps * caps, gsize * size);
+static GstCaps *gst_gl_download_element_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter);
+static gboolean gst_gl_download_element_set_caps (GstBaseTransform * bt,
+    GstCaps * in_caps, GstCaps * out_caps);
+static GstFlowReturn
+gst_gl_download_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * buffer, GstBuffer ** outbuf);
+static GstFlowReturn gst_gl_download_element_transform (GstBaseTransform * bt,
+    GstBuffer * buffer, GstBuffer * outbuf);
+
+static GstStaticPadTemplate gst_gl_download_element_src_pad_template =
+    GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw; video/x-raw(memory:GLMemory)"));
+
+static GstStaticPadTemplate gst_gl_download_element_sink_pad_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw(memory:GLMemory)"));
+
+static void
+gst_gl_download_element_class_init (GstGLDownloadElementClass * klass)
+{
+  GstBaseTransformClass *bt_class = GST_BASE_TRANSFORM_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  bt_class->transform_caps = gst_gl_download_element_transform_caps;
+  bt_class->set_caps = gst_gl_download_element_set_caps;
+  bt_class->get_unit_size = gst_gl_download_element_get_unit_size;
+  bt_class->prepare_output_buffer =
+      gst_gl_download_element_prepare_output_buffer;
+  bt_class->transform = gst_gl_download_element_transform;
+
+  bt_class->passthrough_on_same_caps = TRUE;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_gl_download_element_src_pad_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_gl_download_element_sink_pad_template));
+
+  gst_element_class_set_metadata (element_class,
+      "OpenGL uploader", "Filter/Video",
+      "Downloads data from OpenGL", "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_download_element_init (GstGLDownloadElement * download)
+{
+  gst_base_transform_set_prefer_passthrough (GST_BASE_TRANSFORM (download),
+      TRUE);
+}
+
+static gboolean
+gst_gl_download_element_set_caps (GstBaseTransform * bt, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  GstVideoInfo out_info;
+
+  if (!gst_video_info_from_caps (&out_info, out_caps))
+    return FALSE;
+
+  return TRUE;
+}
+
+static GstCaps *
+_set_caps_features (const GstCaps * caps, const gchar * feature_name)
+{
+  GstCaps *tmp = gst_caps_copy (caps);
+  guint n = gst_caps_get_size (tmp);
+  guint i = 0;
+
+  for (i = 0; i < n; i++)
+    gst_caps_set_features (tmp, i,
+        gst_caps_features_from_string (feature_name));
+
+  return tmp;
+}
+
+static GstCaps *
+gst_gl_download_element_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  GstCaps *result, *tmp;
+
+  if (direction == GST_PAD_SRC) {
+    tmp = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+    tmp = gst_caps_merge (gst_caps_ref (caps), tmp);
+  } else {
+    tmp = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
+    tmp = gst_caps_merge (gst_caps_ref (caps), tmp);
+  }
+
+  if (filter) {
+    result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+  } else {
+    result = tmp;
+  }
+
+  GST_DEBUG_OBJECT (bt, "returning caps %" GST_PTR_FORMAT, result);
+
+  return result;
+}
+
+static gboolean
+gst_gl_download_element_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
+    gsize * size)
+{
+  gboolean ret = FALSE;
+  GstVideoInfo info;
+
+  ret = gst_video_info_from_caps (&info, caps);
+  if (ret)
+    *size = GST_VIDEO_INFO_SIZE (&info);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_gl_download_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * inbuf, GstBuffer ** outbuf)
+{
+  GstCaps *src_caps = gst_pad_get_current_caps (bt->srcpad);
+  GstCapsFeatures *features = NULL;
+  gint i, n;
+
+  *outbuf = inbuf;
+
+  if (src_caps)
+    features = gst_caps_get_features (src_caps, 0);
+
+  n = gst_buffer_n_memory (*outbuf);
+  for (i = 0; i < n; i++) {
+    GstMemory *mem = gst_buffer_peek_memory (*outbuf, i);
+
+    if (gst_is_gl_memory (mem)) {
+      if (!features || gst_caps_features_contains (features,
+              GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY)) {
+        gst_gl_memory_download_transfer ((GstGLMemory *) mem);
+      }
+    }
+  }
+
+  if (src_caps)
+    gst_caps_unref (src_caps);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_gl_download_element_transform (GstBaseTransform * bt,
+    GstBuffer * inbuf, GstBuffer * outbuf)
+{
+  return GST_FLOW_OK;
+}
diff --git a/ext/gl/gstgldownloadelement.h b/ext/gl/gstgldownloadelement.h
new file mode 100644
index 0000000..eabfeec
--- /dev/null
+++ b/ext/gl/gstgldownloadelement.h
@@ -0,0 +1,56 @@
+/*
+ * 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_DOWNLOAD_ELEMENT_H__
+#define __GST_GL_DOWNLOAD_ELEMENT_H__
+
+#include <gst/video/video.h>
+#include <gst/gstmemory.h>
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_download_element_get_type (void);
+#define GST_TYPE_GL_DOWNLOAD_ELEMENT (gst_gl_download_element_get_type())
+#define GST_GL_DOWNLOAD_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DOWNLOAD_ELEMENT,GstGLDownloadElement))
+#define GST_GL_DOWNLOAD_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLDownloadElementClass))
+#define GST_IS_GL_DOWNLOAD_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DOWNLOAD_ELEMENT))
+#define GST_IS_GL_DOWNLOAD_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_DOWNLOAD_ELEMENT))
+#define GST_GL_DOWNLOAD_ELEMENT_CAST(obj) ((GstGLDownloadElement*)(obj))
+
+typedef struct _GstGLDownloadElement GstGLDownloadElement;
+typedef struct _GstGLDownloadElementClass GstGLDownloadElementClass;
+
+struct _GstGLDownloadElement
+{
+  /* <private> */
+  GstGLBaseFilter  parent;
+};
+
+struct _GstGLDownloadElementClass
+{
+  /* <private> */
+  GstGLBaseFilterClass object_class;
+};
+
+G_END_DECLS
+
+#endif /* __GST_GL_DOWNLOAD_ELEMENT_H__ */
diff --git a/ext/gl/gstgleffects.c b/ext/gl/gstgleffects.c
index c142821..6cf5afc 100644
--- a/ext/gl/gstgleffects.c
+++ b/ext/gl/gstgleffects.c
@@ -39,19 +39,21 @@
 #include <gst/gl/gstglconfig.h>
 #include "gstgleffects.h"
 
-#define GST_TYPE_GL_EFFECTS            (gst_gl_effects_get_type())
-#define GST_GL_EFFECTS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_GL_EFFECTS,GstGLEffects))
-#define GST_IS_GL_EFFECTS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_GL_EFFECTS))
-#define GST_GL_EFFECTS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) , GST_TYPE_GL_EFFECTS,GstGLEffectsClass))
-#define GST_IS_GL_EFFECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) , GST_TYPE_GL_EFFECTS))
-#define GST_GL_EFFECTS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) , GST_TYPE_GL_EFFECTS,GstGLEffectsClass))
-
 #define GST_CAT_DEFAULT gst_gl_effects_debug
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
 
+enum
+{
+  PROP_0 = 0x0,
+  PROP_EFFECT = 0x1 << 1,
+  PROP_HSWAP = 0x1 << 2,
+  PROP_INVERT = 0x1 << 3
+};
+
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_effects_debug, "gleffects", 0, "gleffects element");
 
+#define gst_gl_effects_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLEffects, gst_gl_effects, GST_TYPE_GL_FILTER,
     DEBUG_INIT);
 
@@ -60,8 +62,8 @@
 static void gst_gl_effects_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static void gst_gl_effects_init_resources (GstGLFilter * filter);
-static void gst_gl_effects_reset_resources (GstGLFilter * filter);
+static gboolean gst_gl_effects_init_resources (GstBaseTransform * trans);
+static gboolean gst_gl_effects_reset_resources (GstBaseTransform * trans);
 
 static gboolean gst_gl_effects_on_init_gl_context (GstGLFilter * filter);
 
@@ -70,6 +72,8 @@
 
 static gboolean gst_gl_effects_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
+static gboolean gst_gl_effects_filters_is_property_supported (const
+    GstGLEffectsFilterDescriptor *, gint property);
 
 /* dont' forget to edit the following when a new effect is added */
 typedef enum
@@ -90,24 +94,24 @@
   GST_GL_EFFECT_XRAY,
   GST_GL_EFFECT_SIN,
   GST_GL_EFFECT_GLOW,
+  GST_GL_EFFECT_SOBEL,
+  GST_GL_EFFECT_BLUR,
+  GST_GL_EFFECT_LAPLACIAN,
   GST_GL_N_EFFECTS
 } GstGLEffectsEffect;
 
-#define GST_TYPE_GL_EFFECTS_EFFECT (gst_gl_effects_effect_get_type ())
-static GType
-gst_gl_effects_effect_get_type (void)
+static const GEnumValue *
+gst_gl_effects_get_effects (void)
 {
-  static GType gl_effects_effect_type = 0;
   static const GEnumValue effect_types[] = {
     {GST_GL_EFFECT_IDENTITY, "Do nothing Effect", "identity"},
     {GST_GL_EFFECT_MIRROR, "Mirror Effect", "mirror"},
     {GST_GL_EFFECT_SQUEEZE, "Squeeze Effect", "squeeze"},
-#if GST_GL_HAVE_OPENGL
     {GST_GL_EFFECT_STRETCH, "Stretch Effect", "stretch"},
+    {GST_GL_EFFECT_TUNNEL, "Light Tunnel Effect", "tunnel"},
     {GST_GL_EFFECT_FISHEYE, "FishEye Effect", "fisheye"},
     {GST_GL_EFFECT_TWIRL, "Twirl Effect", "twirl"},
     {GST_GL_EFFECT_BULGE, "Bulge Effect", "bulge"},
-    {GST_GL_EFFECT_TUNNEL, "Light Tunnel Effect", "tunnel"},
     {GST_GL_EFFECT_SQUARE, "Square Effect", "square"},
     {GST_GL_EFFECT_HEAT, "Heat Signature Effect", "heat"},
     {GST_GL_EFFECT_SEPIA, "Sepia Toning Effect", "sepia"},
@@ -116,13 +120,23 @@
     {GST_GL_EFFECT_XRAY, "Glowing negative effect", "xray"},
     {GST_GL_EFFECT_SIN, "All Grey but Red Effect", "sin"},
     {GST_GL_EFFECT_GLOW, "Glow Lighting Effect", "glow"},
-#endif
+    {GST_GL_EFFECT_SOBEL, "Sobel edge detection Effect", "sobel"},
+    {GST_GL_EFFECT_BLUR, "Blur with 9x9 separable convolution Effect", "blur"},
+    {GST_GL_EFFECT_LAPLACIAN, "Laplacian Convolution Demo Effect", "laplacian"},
     {0, NULL, NULL}
   };
+  return effect_types;
+}
 
+#define GST_TYPE_GL_EFFECTS_EFFECT (gst_gl_effects_effect_get_type ())
+static GType
+gst_gl_effects_effect_get_type (void)
+{
+  static GType gl_effects_effect_type = 0;
   if (!gl_effects_effect_type) {
     gl_effects_effect_type =
-        g_enum_register_static ("GstGLEffectsEffect", effect_types);
+        g_enum_register_static ("GstGLEffectsEffect",
+        gst_gl_effects_get_effects ());
   }
   return gl_effects_effect_type;
 }
@@ -130,61 +144,127 @@
 static void
 gst_gl_effects_set_effect (GstGLEffects * effects, gint effect_type)
 {
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (effects);
 
   switch (effect_type) {
     case GST_GL_EFFECT_IDENTITY:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_identity;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_MIRROR:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_mirror;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_SQUEEZE:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_squeeze;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
-#if GST_GL_HAVE_OPENGL
     case GST_GL_EFFECT_STRETCH:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_stretch;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_TUNNEL:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_tunnel;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_FISHEYE:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_fisheye;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_TWIRL:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_twirl;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_BULGE:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_bulge;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_SQUARE:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_square;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_HEAT:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_heat;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_SEPIA:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_sepia;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_XPRO:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_xpro;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_LUMA_XPRO:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_luma_xpro;
-      break;
-    case GST_GL_EFFECT_XRAY:
-      effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_xray;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_SIN:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_sin;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
+      break;
+    case GST_GL_EFFECT_XRAY:
+      effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_sin;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
     case GST_GL_EFFECT_GLOW:
       effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_glow;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
       break;
-#endif
+    case GST_GL_EFFECT_SOBEL:
+      effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_sobel;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
+      break;
+    case GST_GL_EFFECT_BLUR:
+      effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_blur;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
+      break;
+    case GST_GL_EFFECT_LAPLACIAN:
+      effects->effect = (GstGLEffectProcessFunc) gst_gl_effects_laplacian;
+      filter_class->supported_gl_api =
+          GST_GL_API_GLES2 | GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+      effects->current_effect = effect_type;
+      break;
     default:
       g_assert_not_reached ();
   }
+
   effects->current_effect = effect_type;
 }
 
@@ -193,7 +273,9 @@
 gst_gl_effects_init_gl_resources (GstGLFilter * filter)
 {
   GstGLEffects *effects = GST_GL_EFFECTS (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  GstGLFuncs *gl = context->gl_vtable;
+  guint internal_format;
   gint i = 0;
 
   for (i = 0; i < NEEDED_TEXTURES; i++) {
@@ -205,10 +287,13 @@
 
     gl->GenTextures (1, &effects->midtexture[i]);
     gl->BindTexture (GL_TEXTURE_2D, effects->midtexture[i]);
-    gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8,
+    internal_format =
+        gst_gl_sized_gl_format_from_gl_format_type (context, GL_RGBA,
+        GL_UNSIGNED_BYTE);
+    gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format,
         GST_VIDEO_INFO_WIDTH (&filter->out_info),
-        GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-        0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+        GST_VIDEO_INFO_HEIGHT (&filter->out_info), 0, GL_RGBA, GL_UNSIGNED_BYTE,
+        NULL);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -221,7 +306,7 @@
 gst_gl_effects_reset_gl_resources (GstGLFilter * filter)
 {
   GstGLEffects *effects = GST_GL_EFFECTS (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
   gint i = 0;
 
   for (i = 0; i < NEEDED_TEXTURES; i++) {
@@ -237,31 +322,52 @@
 static void
 gst_gl_effects_class_init (GstGLEffectsClass * klass)
 {
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
 
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_gl_effects_set_property;
-  gobject_class->get_property = gst_gl_effects_get_property;
+  GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_effects_init_resources;
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_effects_reset_resources;
 
   GST_GL_FILTER_CLASS (klass)->filter_texture = gst_gl_effects_filter_texture;
   GST_GL_FILTER_CLASS (klass)->display_init_cb =
       gst_gl_effects_init_gl_resources;
   GST_GL_FILTER_CLASS (klass)->display_reset_cb =
       gst_gl_effects_reset_gl_resources;
-  GST_GL_FILTER_CLASS (klass)->onStart = gst_gl_effects_init_resources;
-  GST_GL_FILTER_CLASS (klass)->onStop = gst_gl_effects_reset_resources;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_effects_on_init_gl_context;
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_effects_on_init_gl_context;
 
-  g_object_class_install_property (gobject_class,
-      PROP_EFFECT,
-      g_param_spec_enum ("effect",
-          "Effect",
-          "Select which effect apply to GL video texture",
-          GST_TYPE_GL_EFFECTS_EFFECT,
-          GST_GL_EFFECT_IDENTITY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  klass->filter_descriptor = NULL;
+
+  gst_element_class_set_metadata (element_class,
+      "Gstreamer OpenGL Effects", "Filter/Effect/Video",
+      "GL Shading Language effects",
+      "Filippo Argiolas <filippo.argiolas@gmail.com>");
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
+}
+
+static void
+gst_gl_effects_filter_class_init (GstGLEffectsClass * klass,
+    const GstGLEffectsFilterDescriptor * filter_descriptor)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  klass->filter_descriptor = filter_descriptor;
+
+  gobject_class->set_property = gst_gl_effects_set_property;
+  gobject_class->get_property = gst_gl_effects_get_property;
+
+  /* if filterDescriptor is null it's a generic gleffects */
+  if (!filter_descriptor) {
+    g_object_class_install_property (gobject_class,
+        PROP_EFFECT,
+        g_param_spec_enum ("effect",
+            "Effect",
+            "Select which effect apply to GL video texture",
+            GST_TYPE_GL_EFFECTS_EFFECT,
+            GST_GL_EFFECT_IDENTITY,
+            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  }
+
   g_object_class_install_property (gobject_class,
       PROP_HSWAP,
       g_param_spec_boolean ("hswap",
@@ -269,10 +375,14 @@
           "Switch video texture left to right, useful with webcams",
           FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  gst_element_class_set_metadata (element_class,
-      "Gstreamer OpenGL Effects", "Filter/Effect/Video",
-      "GL Shading Language effects",
-      "Filippo Argiolas <filippo.argiolas@gmail.com>");
+  /* FIXME: make it work on every effect */
+  if (gst_gl_effects_filters_is_property_supported (filter_descriptor,
+          PROP_INVERT)) {
+    g_object_class_install_property (gobject_class, PROP_INVERT,
+        g_param_spec_boolean ("invert", "Invert the colors for sobel effect",
+            "Invert colors to get dark edges on bright background when using sobel effect",
+            FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  }
 }
 
 static void
@@ -296,8 +406,16 @@
 static void
 gst_gl_effects_init (GstGLEffects * effects)
 {
-  effects->effect = gst_gl_effects_identity;
   effects->horizontal_swap = FALSE;
+  effects->invert = FALSE;
+  effects->effect = gst_gl_effects_identity;
+}
+
+static void
+gst_gl_effects_filter_init (GstGLEffects * effects)
+{
+  gst_gl_effects_set_effect (effects,
+      GST_GL_EFFECTS_GET_CLASS (effects)->filter_descriptor->effect);
 }
 
 static void
@@ -307,25 +425,27 @@
   GstGLFilter *filter = (GstGLFilter *) data;
 
   //blocking call, wait the opengl thread has destroyed the shader
-  gst_gl_context_del_shader (filter->context, shader);
+  gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
 
   value = NULL;
 }
 
-static void
-gst_gl_effects_reset_resources (GstGLFilter * filter)
+static gboolean
+gst_gl_effects_reset_resources (GstBaseTransform * trans)
 {
-  GstGLEffects *effects = GST_GL_EFFECTS (filter);
+  GstGLEffects *effects = GST_GL_EFFECTS (trans);
 
   /* release shaders in the gl thread */
   g_hash_table_foreach (effects->shaderstable, gst_gl_effects_ghash_func_clean,
-      filter);
+      effects);
 
   /* clean the htable without calling values destructors
    * because shaders have been released in the glthread
    * through the foreach func */
   g_hash_table_unref (effects->shaderstable);
   effects->shaderstable = NULL;
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static void
@@ -341,6 +461,9 @@
     case PROP_HSWAP:
       effects->horizontal_swap = g_value_get_boolean (value);
       break;
+    case PROP_INVERT:
+      effects->invert = g_value_get_boolean (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -360,16 +483,19 @@
     case PROP_HSWAP:
       g_value_set_boolean (value, effects->horizontal_swap);
       break;
+    case PROP_INVERT:
+      g_value_set_boolean (value, effects->invert);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
 }
 
-static void
-gst_gl_effects_init_resources (GstGLFilter * filter)
+static gboolean
+gst_gl_effects_init_resources (GstBaseTransform * trans)
 {
-  GstGLEffects *effects = GST_GL_EFFECTS (filter);
+  GstGLEffects *effects = GST_GL_EFFECTS (trans);
   gint i;
 
   effects->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
@@ -380,6 +506,8 @@
   for (i = 0; i < GST_GL_EFFECTS_N_CURVES; i++) {
     effects->curve[i] = 0;
   }
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
 }
 
 static gboolean
@@ -398,9 +526,149 @@
   effects->outtexture = out_tex;
 
   if (effects->horizontal_swap == TRUE)
-    gst_gl_context_thread_add (filter->context, set_horizontal_swap, effects);
+    gst_gl_context_thread_add (GST_GL_BASE_FILTER (filter)->context,
+        set_horizontal_swap, effects);
 
   effects->effect (effects);
 
   return TRUE;
 }
+
+GstGLShader *
+gst_gl_effects_get_fragment_shader (GstGLEffects * effects,
+    const gchar * shader_name, const gchar * shader_source_gles2)
+{
+  GstGLShader *shader = NULL;
+  GstGLFilter *filter = GST_GL_FILTER (effects);
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+
+  shader = g_hash_table_lookup (effects->shaderstable, shader_name);
+
+  if (!shader) {
+    shader = gst_gl_shader_new (context);
+    if (!gst_gl_shader_compile_with_default_v_and_check (shader,
+            shader_source_gles2, &filter->draw_attr_position_loc,
+            &filter->draw_attr_texture_loc)) {
+      /* gst gl context error is already set */
+      GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
+          ("Failed to initialize %s shader, %s",
+              shader_name, gst_gl_context_get_error ()), (NULL));
+      gst_object_unref (shader);
+      shader = NULL;
+    }
+  }
+
+  if (!shader)
+    return NULL;
+
+  g_hash_table_insert (effects->shaderstable, (gchar *) shader_name, shader);
+
+  return shader;
+}
+
+static const GstGLEffectsFilterDescriptor *
+gst_gl_effects_filters_supported_properties (void)
+{
+  /* Horizontal swap property is supported by all filters */
+  static const GstGLEffectsFilterDescriptor effects[] = {
+    {GST_GL_EFFECT_SOBEL, PROP_INVERT, NULL},
+    {GST_GL_EFFECT_LAPLACIAN, PROP_INVERT, NULL},
+    {0, 0, NULL}
+  };
+  return effects;
+}
+
+static inline gboolean
+gst_gl_effects_filters_is_property_supported (const GstGLEffectsFilterDescriptor
+    * descriptor, gint property)
+{
+  /* generic filter (NULL descriptor) supports all properties */
+  return !descriptor || (descriptor->supported_properties & property);
+}
+
+static const GstGLEffectsFilterDescriptor *
+gst_gl_effects_filters_descriptors (void)
+{
+  static GstGLEffectsFilterDescriptor *descriptors = NULL;
+  if (!descriptors) {
+    const GEnumValue *e;
+    const GEnumValue *effect = gst_gl_effects_get_effects ();
+    const GstGLEffectsFilterDescriptor *defined;
+    guint n_filters = 0, i;
+
+    for (e = effect; NULL != e->value_nick; ++e, ++n_filters) {
+    }
+
+    descriptors = g_new0 (GstGLEffectsFilterDescriptor, n_filters + 1);
+    for (i = 0; i < n_filters; ++i, ++effect) {
+      descriptors[i].effect = effect->value;
+      descriptors[i].filter_name = effect->value_nick;
+    }
+
+    for (defined = gst_gl_effects_filters_supported_properties ();
+        0 != defined->supported_properties; ++defined) {
+
+      for (i = 0; i < n_filters; ++i) {
+        if (descriptors[i].effect == defined->effect) {
+          descriptors[i].supported_properties = defined->supported_properties;
+          break;
+        }
+      }
+      if (i >= n_filters) {
+        GST_WARNING ("Could not match gstgleffects-%s descriptor",
+            defined->filter_name);
+      }
+    }
+  }
+  return descriptors;
+}
+
+gboolean
+gst_gl_effects_register_filters (GstPlugin * plugin, GstRank rank)
+{
+  static volatile gsize registered = 0;
+
+  if (g_once_init_enter (&registered)) {
+    GTypeInfo info = {
+      sizeof (GstGLEffectsClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gst_gl_effects_filter_class_init,
+      NULL,
+      NULL,
+      sizeof (GstGLEffects),
+      0,
+      NULL
+    };
+    GType generic_type =
+        g_type_register_static (GST_TYPE_GL_EFFECTS, "GstGLEffectsGeneric",
+        &info, 0);
+
+    if (gst_element_register (plugin, "gleffects", rank, generic_type)) {
+      const GstGLEffectsFilterDescriptor *filters;
+      for (filters = gst_gl_effects_filters_descriptors ();
+          NULL != filters->filter_name; ++filters) {
+        gchar *name = g_strdup_printf ("gleffects_%s", filters->filter_name);
+        GTypeInfo info = {
+          sizeof (GstGLEffectsClass),
+          NULL,
+          NULL,
+          (GClassInitFunc) gst_gl_effects_filter_class_init,
+          NULL,
+          filters,
+          sizeof (GstGLEffects),
+          0,
+          (GInstanceInitFunc) gst_gl_effects_filter_init
+        };
+        GType type =
+            g_type_register_static (GST_TYPE_GL_EFFECTS, name, &info, 0);
+        if (!gst_element_register (plugin, name, rank, type)) {
+          GST_WARNING ("Could not register %s", name);
+        }
+        g_free (name);
+      }
+    }
+    g_once_init_leave (&registered, generic_type);
+  }
+  return registered;
+}
diff --git a/ext/gl/gstgleffects.h b/ext/gl/gstgleffects.h
index 71bec25..82c33a9 100644
--- a/ext/gl/gstgleffects.h
+++ b/ext/gl/gstgleffects.h
@@ -26,7 +26,6 @@
 
 G_BEGIN_DECLS
 
-
 #define GST_TYPE_GL_EFFECTS            (gst_gl_effects_get_type())
 #define GST_GL_EFFECTS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_GL_EFFECTS,GstGLEffects))
 #define GST_IS_GL_EFFECTS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_GL_EFFECTS))
@@ -34,9 +33,21 @@
 #define GST_IS_GL_EFFECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) , GST_TYPE_GL_EFFECTS))
 #define GST_GL_EFFECTS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) , GST_TYPE_GL_EFFECTS,GstGLEffectsClass))
 
+#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 _GstGLEffects GstGLEffects;
 typedef struct _GstGLEffectsClass GstGLEffectsClass;
 
+typedef struct {
+  gint effect;
+  guint supported_properties;
+  const gchar *filter_name;
+} GstGLEffectsFilterDescriptor;
+
 typedef void (* GstGLEffectProcessFunc) (GstGLEffects *effects);
 
 #define NEEDED_TEXTURES 5
@@ -66,22 +77,19 @@
   GHashTable *shaderstable;
 
   gboolean horizontal_swap; /* switch left to right */
+  gboolean invert; /* colours */
 };
 
 struct _GstGLEffectsClass
 {
   GstGLFilterClass filter_class;
+  const GstGLEffectsFilterDescriptor *filter_descriptor;
 };
 
-enum
-{
-  PROP_0,
-  PROP_EFFECT,
-  PROP_HSWAP
-};
-
-
 GType gst_gl_effects_get_type (void);
+gboolean gst_gl_effects_register_filters (GstPlugin *, GstRank);
+GstGLShader* gst_gl_effects_get_fragment_shader (GstGLEffects *effects,
+    const gchar * shader_name, const gchar * shader_source_gles2);
 
 void gst_gl_effects_identity (GstGLEffects *effects);
 void gst_gl_effects_mirror (GstGLEffects *effects);
@@ -99,6 +107,9 @@
 void gst_gl_effects_luma_xpro (GstGLEffects *effects);
 void gst_gl_effects_sin (GstGLEffects *effects);
 void gst_gl_effects_glow (GstGLEffects *effects);
+void gst_gl_effects_sobel (GstGLEffects *effects);
+void gst_gl_effects_blur (GstGLEffects *effects);
+void gst_gl_effects_laplacian (GstGLEffects *effects);
 
 G_END_DECLS
 
diff --git a/ext/gl/gstglfilterapp.c b/ext/gl/gstglfilterapp.c
index d7dbd88..e347e28 100644
--- a/ext/gl/gstglfilterapp.c
+++ b/ext/gl/gstglfilterapp.c
@@ -111,6 +111,9 @@
       "OpenGL application filter", "Filter/Effect",
       "Use client callbacks to define the scene",
       "Julien Isorce <julien.isorce@gmail.com>");
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
 }
 
 static void
@@ -161,23 +164,42 @@
   app_filter->default_draw = !drawn;
 }
 
+struct glcb2
+{
+  GLCB func;
+  gpointer data;
+  guint texture;
+  guint width;
+  guint height;
+};
+
+/* convenience functions to simplify filter development */
+static void
+_glcb2 (gpointer data)
+{
+  struct glcb2 *cb = data;
+
+  cb->func (cb->width, cb->height, cb->texture, cb->data);
+}
+
 static gboolean
 gst_gl_filter_app_filter_texture (GstGLFilter * filter, guint in_tex,
     guint out_tex)
 {
   GstGLFilterApp *app_filter = GST_GL_FILTER_APP (filter);
+  struct glcb2 cb;
+
+  cb.func = (GLCB) _emit_draw_signal;
+  cb.data = filter;
+  cb.texture = in_tex;
+  cb.width = GST_VIDEO_INFO_WIDTH (&filter->in_info);
+  cb.height = GST_VIDEO_INFO_HEIGHT (&filter->in_info);
 
   //blocking call, use a FBO
-  gst_gl_context_use_fbo (filter->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_FILTER (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);
+      filter->fbo, filter->depthbuffer, out_tex, _glcb2, &cb);
 
   if (app_filter->default_draw) {
     gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
@@ -193,10 +215,16 @@
     gpointer stuff)
 {
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      GST_GL_API_OPENGL) {
+    GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
diff --git a/ext/gl/gstglfilterbin.c b/ext/gl/gstglfilterbin.c
new file mode 100644
index 0000000..946d66c
--- /dev/null
+++ b/ext/gl/gstglfilterbin.c
@@ -0,0 +1,271 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gstglfilterbin.h"
+
+#define GST_CAT_DEFAULT gst_gl_filter_bin_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+/* Properties */
+enum
+{
+  PROP_0,
+  PROP_FILTER,
+};
+
+enum
+{
+  SIGNAL_0,
+  SIGNAL_CREATE_ELEMENT,
+  LAST_SIGNAL
+};
+
+static guint gst_gl_filter_bin_signals[LAST_SIGNAL] = { 0 };
+
+#define gst_gl_filter_bin_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLFilterBin, gst_gl_filter_bin,
+    GST_TYPE_BIN, GST_DEBUG_CATEGORY_INIT (gst_gl_filter_bin_debug,
+        "glfilterbin", 0, "glfilterbin element"););
+
+static void gst_gl_filter_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_gl_filter_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+
+static GstStateChangeReturn gst_gl_filter_bin_change_state (GstElement *
+    element, GstStateChange transition);
+
+static GstStaticPadTemplate _src_pad_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw(ANY)"));
+
+static void
+gst_gl_filter_bin_class_init (GstGLFilterBinClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstCaps *upload_caps;
+
+  element_class->change_state = gst_gl_filter_bin_change_state;
+
+  gobject_class->set_property = gst_gl_filter_bin_set_property;
+  gobject_class->get_property = gst_gl_filter_bin_get_property;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&_src_pad_template));
+
+  upload_caps = gst_gl_upload_get_input_template_caps ();
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, upload_caps));
+  gst_caps_unref (upload_caps);
+
+  g_object_class_install_property (gobject_class, PROP_FILTER,
+      g_param_spec_object ("filter",
+          "GL filter element",
+          "The GL filter chain to use",
+          GST_TYPE_ELEMENT,
+          GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE |
+          G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstFilterBin::create-element:
+   * @object: the #GstGLFilterBin
+   *
+   * Will be emitted when we need the processing element/s that this bin will use
+   *
+   * Returns: a new #GstElement
+   */
+  gst_gl_filter_bin_signals[SIGNAL_CREATE_ELEMENT] =
+      g_signal_new ("create-element", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      GST_TYPE_ELEMENT, 0);
+
+  gst_element_class_set_metadata (element_class,
+      "GL Filter Bin", "Filter/Video",
+      "Infrastructure to process GL textures",
+      "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_filter_bin_init (GstGLFilterBin * self)
+{
+  GstPad *pad;
+
+  self->upload = gst_element_factory_make ("glupload", NULL);
+  self->in_convert = gst_element_factory_make ("glcolorconvert", NULL);
+  self->out_convert = gst_element_factory_make ("glcolorconvert", NULL);
+  self->download = gst_element_factory_make ("gldownload", NULL);
+
+  gst_bin_add (GST_BIN (self), self->upload);
+  gst_bin_add (GST_BIN (self), self->in_convert);
+  gst_bin_add (GST_BIN (self), self->out_convert);
+  gst_bin_add (GST_BIN (self), self->download);
+
+  gst_element_link_pads (self->upload, "src", self->in_convert, "sink");
+  gst_element_link_pads (self->out_convert, "src", self->download, "sink");
+
+  pad = gst_element_get_static_pad (self->download, "src");
+  if (pad) {
+    GST_DEBUG_OBJECT (self, "setting target src pad %" GST_PTR_FORMAT, pad);
+    self->srcpad = gst_ghost_pad_new ("src", pad);
+    gst_element_add_pad (GST_ELEMENT_CAST (self), self->srcpad);
+    gst_object_unref (pad);
+  }
+
+  pad = gst_element_get_static_pad (self->upload, "sink");
+  if (pad) {
+    GST_DEBUG_OBJECT (self, "setting target sink pad %" GST_PTR_FORMAT, pad);
+    self->sinkpad = gst_ghost_pad_new ("sink", pad);
+    gst_element_add_pad (GST_ELEMENT_CAST (self), self->sinkpad);
+    gst_object_unref (pad);
+  }
+}
+
+static gboolean
+_connect_filter_element (GstGLFilterBin * self)
+{
+  gboolean res = TRUE;
+
+  gst_object_set_name (GST_OBJECT (self->filter), "filter");
+  res &= gst_bin_add (GST_BIN (self), self->filter);
+
+  res &= gst_element_link_pads (self->in_convert, "src", self->filter, "sink");
+  res &= gst_element_link_pads (self->filter, "src", self->out_convert, "sink");
+
+  if (!res)
+    GST_ERROR_OBJECT (self, "Failed to link filter element into the pipeline");
+
+  return res;
+}
+
+void
+gst_gl_filter_bin_finish_init_with_element (GstGLFilterBin * self,
+    GstElement * element)
+{
+  g_return_if_fail (GST_IS_ELEMENT (element));
+
+  self->filter = element;
+
+  if (!_connect_filter_element (self)) {
+    gst_object_unref (self->filter);
+    self->filter = NULL;
+  }
+}
+
+void
+gst_gl_filter_bin_finish_init (GstGLFilterBin * self)
+{
+  GstGLFilterBinClass *klass = GST_GL_FILTER_BIN_GET_CLASS (self);
+  GstElement *element = NULL;
+
+  if (klass->create_element)
+    element = klass->create_element ();
+
+  if (element)
+    gst_gl_filter_bin_finish_init_with_element (self, element);
+}
+
+static void
+gst_gl_filter_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLFilterBin *self = GST_GL_FILTER_BIN (object);
+
+  switch (prop_id) {
+    case PROP_FILTER:
+      g_value_set_object (value, self->filter);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_filter_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLFilterBin *self = GST_GL_FILTER_BIN (object);
+
+  switch (prop_id) {
+    case PROP_FILTER:
+    {
+      GstElement *filter = g_value_get_object (value);
+      if (self->filter)
+        gst_bin_remove (GST_BIN (self), self->filter);
+      self->filter = filter;
+      if (filter) {
+        gst_object_ref_sink (filter);
+        _connect_filter_element (self);
+      }
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static GstStateChangeReturn
+gst_gl_filter_bin_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLFilterBin *self = GST_GL_FILTER_BIN (element);
+  GstGLFilterBinClass *klass = GST_GL_FILTER_BIN_GET_CLASS (self);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!self->filter) {
+        if (klass->create_element)
+          self->filter = klass->create_element ();
+
+        if (!self->filter)
+          g_signal_emit (element,
+              gst_gl_filter_bin_signals[SIGNAL_CREATE_ELEMENT], 0,
+              &self->filter);
+
+        if (!self->filter) {
+          GST_ERROR_OBJECT (element, "Failed to retrieve element");
+          return GST_STATE_CHANGE_FAILURE;
+        }
+        if (!_connect_filter_element (self))
+          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) {
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstglfilterbin.h b/ext/gl/gstglfilterbin.h
new file mode 100644
index 0000000..4a77c6c
--- /dev/null
+++ b/ext/gl/gstglfilterbin.h
@@ -0,0 +1,80 @@
+/*
+ * GStreamer
+ * Copyright (C) 2007 David Schleef <ds@schleef.org>
+ * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GST_GL_FILTER_BIN_H_
+#define _GST_GL_FILTER_BIN_H_
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/video/video.h>
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_filter_bin_get_type(void);
+#define GST_TYPE_GL_FILTER_BIN            (gst_gl_filter_bin_get_type())
+#define GST_GL_FILTER_BIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTER_BIN,GstGLFilterBin))
+#define GST_IS_GL_FILTER_BIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FILTER_BIN))
+#define GST_GL_FILTER_BIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_FILTER_BIN,GstGLFilterBinClass))
+#define GST_IS_GL_FILTER_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTER_BIN))
+#define GST_GL_FILTER_BIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTER_BIN,GstGLFilterBinClass))
+
+typedef struct _GstGLFilterBin GstGLFilterBin;
+typedef struct _GstGLFilterBinClass GstGLFilterBinClass;
+
+/**
+ * GstGLFilterBin:
+ * @parent: parent #GstBin
+ */
+struct _GstGLFilterBin
+{
+  GstBin   parent;
+
+  GstPad *srcpad;
+  GstPad *sinkpad;
+
+  GstElement *upload;
+  GstElement *in_convert;
+  GstElement *filter;
+  GstElement *out_convert;
+  GstElement *download;
+};
+
+/**
+ * GstGLFilterBinClass:
+ * @parent_class: parent class
+ */
+struct _GstGLFilterBinClass
+{
+  GstBinClass parent_class;
+
+  GstElement * (*create_element) (void);
+};
+
+void gst_gl_filter_bin_finish_init (GstGLFilterBin * self);
+void gst_gl_filter_bin_finish_init_with_element (GstGLFilterBin * self,
+    GstElement * element);
+
+G_END_DECLS
+
+#endif /* _GST_GL_FILTER_BIN_H_ */
diff --git a/ext/gl/gstglfilterblur.c b/ext/gl/gstglfilterblur.c
deleted file mode 100644
index fd275ec..0000000
--- a/ext/gl/gstglfilterblur.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-/**
- * SECTION:element-glfilterblur
- *
- * Blur with 9x9 separable convolution.
- *
- * <refsect2>
- * <title>Examples</title>
- * |[
- * gst-launch videotestsrc ! glupload ! glfilterblur ! glimagesink
- * ]|
- * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstglfilterblur.h"
-#include "effects/gstgleffectssources.h"
-
-#define GST_CAT_DEFAULT gst_gl_filterblur_debug
-GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_filterblur_debug, "glfilterblur", 0, "glfilterblur element");
-
-G_DEFINE_TYPE_WITH_CODE (GstGLFilterBlur, gst_gl_filterblur,
-    GST_TYPE_GL_FILTER, DEBUG_INIT);
-
-static void gst_gl_filterblur_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_gl_filterblur_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-static void gst_gl_filter_filterblur_reset (GstGLFilter * filter);
-
-static gboolean gst_gl_filterblur_init_shader (GstGLFilter * filter);
-static gboolean gst_gl_filterblur_filter_texture (GstGLFilter * filter,
-    guint in_tex, guint out_tex);
-static void gst_gl_filterblur_hcallback (gint width, gint height, guint texture,
-    gpointer stuff);
-static void gst_gl_filterblur_vcallback (gint width, gint height, guint texture,
-    gpointer stuff);
-
-
-static void
-gst_gl_filterblur_init_resources (GstGLFilter * filter)
-{
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gl->GenTextures (1, &filterblur->midtexture);
-  gl->BindTexture (GL_TEXTURE_2D, filterblur->midtexture);
-  gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8,
-      GST_VIDEO_INFO_WIDTH (&filter->out_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-      0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-}
-
-static void
-gst_gl_filterblur_reset_resources (GstGLFilter * filter)
-{
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gl->DeleteTextures (1, &filterblur->midtexture);
-}
-
-static void
-gst_gl_filterblur_class_init (GstGLFilterBlurClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_gl_filterblur_set_property;
-  gobject_class->get_property = gst_gl_filterblur_get_property;
-
-  gst_element_class_set_metadata (element_class, "Gstreamer OpenGL Blur",
-      "Filter/Effect/Video", "Blur with 9x9 separable convolution",
-      "Filippo Argiolas <filippo.argiolas@gmail.com>");
-
-  GST_GL_FILTER_CLASS (klass)->filter_texture =
-      gst_gl_filterblur_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->display_init_cb =
-      gst_gl_filterblur_init_resources;
-  GST_GL_FILTER_CLASS (klass)->display_reset_cb =
-      gst_gl_filterblur_reset_resources;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filterblur_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_filterblur_reset;
-}
-
-static void
-gst_gl_filterblur_init (GstGLFilterBlur * filterblur)
-{
-  filterblur->shader0 = NULL;
-  filterblur->shader1 = NULL;
-  filterblur->midtexture = 0;
-  /* gaussian kernel (well, actually vector), size 9, standard
-   * deviation 3.0 */
-  /* FIXME: eventually make this a runtime property */
-  fill_gaussian_kernel (filterblur->gauss_kernel, 7, 3.0);
-}
-
-static void
-gst_gl_filter_filterblur_reset (GstGLFilter * filter)
-{
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-
-  //blocking call, wait the opengl thread has destroyed the shader
-  if (filterblur->shader0)
-    gst_gl_context_del_shader (filter->context, filterblur->shader0);
-  filterblur->shader0 = NULL;
-
-  //blocking call, wait the opengl thread has destroyed the shader
-  if (filterblur->shader1)
-    gst_gl_context_del_shader (filter->context, filterblur->shader1);
-  filterblur->shader1 = NULL;
-}
-
-static void
-gst_gl_filterblur_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  /* GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (object); */
-
-  switch (prop_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_gl_filterblur_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  /* GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (object); */
-
-  switch (prop_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_gl_filterblur_init_shader (GstGLFilter * filter)
-{
-  GstGLFilterBlur *blur_filter = GST_GL_FILTERBLUR (filter);
-
-  //blocking call, wait the opengl thread has compiled the shader
-  if (!gst_gl_context_gen_shader (filter->context, 0, hconv7_fragment_source,
-          &blur_filter->shader0))
-    return FALSE;
-
-  //blocking call, wait the opengl thread has compiled the shader
-  if (!gst_gl_context_gen_shader (filter->context, 0, vconv7_fragment_source,
-          &blur_filter->shader1))
-    return FALSE;
-
-  return TRUE;
-}
-
-static gboolean
-gst_gl_filterblur_filter_texture (GstGLFilter * filter, guint in_tex,
-    guint out_tex)
-{
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-
-  gst_gl_filter_render_to_target (filter, TRUE, in_tex,
-      filterblur->midtexture, gst_gl_filterblur_hcallback, filterblur);
-
-  gst_gl_filter_render_to_target (filter, FALSE, filterblur->midtexture,
-      out_tex, gst_gl_filterblur_vcallback, filterblur);
-
-  return TRUE;
-}
-
-static void
-gst_gl_filterblur_hcallback (gint width, gint height, guint texture,
-    gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
-
-  gst_gl_shader_use (filterblur->shader0);
-
-  gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
-
-  gst_gl_shader_set_uniform_1i (filterblur->shader0, "tex", 1);
-  gst_gl_shader_set_uniform_1fv (filterblur->shader0, "kernel", 7,
-      filterblur->gauss_kernel);
-  gst_gl_shader_set_uniform_1f (filterblur->shader0, "width", width);
-
-  gst_gl_filter_draw_texture (filter, texture, width, height);
-}
-
-
-static void
-gst_gl_filterblur_vcallback (gint width, gint height, guint texture,
-    gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
-
-  gst_gl_shader_use (filterblur->shader1);
-
-  gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
-
-  gst_gl_shader_set_uniform_1i (filterblur->shader1, "tex", 1);
-  gst_gl_shader_set_uniform_1fv (filterblur->shader1, "kernel", 7,
-      filterblur->gauss_kernel);
-  gst_gl_shader_set_uniform_1f (filterblur->shader1, "height", height);
-
-  gst_gl_filter_draw_texture (filter, texture, width, height);
-}
diff --git a/ext/gl/gstglfilterblur.h b/ext/gl/gstglfilterblur.h
deleted file mode 100644
index 9604d05..0000000
--- a/ext/gl/gstglfilterblur.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _GST_GL_FILTERBLUR_H_
-#define _GST_GL_FILTERBLUR_H_
-
-#include <gst/gl/gstglfilter.h>
-
-#define GST_TYPE_GL_FILTERBLUR            (gst_gl_filterblur_get_type())
-#define GST_GL_FILTERBLUR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTERBLUR,GstGLFilterBlur))
-#define GST_IS_GL_FILTERBLUR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FILTERBLUR))
-#define GST_GL_FILTERBLUR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_FILTERBLUR,GstGLFilterBlurClass))
-#define GST_IS_GL_FILTERBLUR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTERBLUR))
-#define GST_GL_FILTERBLUR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTERBLUR,GstGLFilterBlurClass))
-
-typedef struct _GstGLFilterBlur GstGLFilterBlur;
-typedef struct _GstGLFilterBlurClass GstGLFilterBlurClass;
-
-struct _GstGLFilterBlur
-{
-  GstGLFilter filter;
-  GstGLShader *shader0;
-  GstGLShader *shader1;
-
-  GLuint midtexture;
-  float gauss_kernel[7];
-};
-
-struct _GstGLFilterBlurClass
-{
-  GstGLFilterClass filter_class;
-};
-
-GType gst_gl_filterblur_get_type (void);
-
-#endif /* _GST_GL_FILTERBLUR_H_ */
diff --git a/ext/gl/gstglfiltercube.c b/ext/gl/gstglfiltercube.c
index 35bf677..d389310 100644
--- a/ext/gl/gstglfiltercube.c
+++ b/ext/gl/gstglfiltercube.c
@@ -26,15 +26,15 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! glupload ! glfiltercube ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! glfiltercube ! glimagesink
  * ]| A pipeline to mpa textures on the 6 cube faces..
  * FBO is required.
  * |[
- * gst-launch -v videotestsrc ! glupload ! glfiltercube ! video/x-raw-gl, width=640, height=480 ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! glfiltercube ! video/x-raw, width=640, height=480 ! glimagesink
  * ]| Resize scene after drawing the cube.
  * The scene size is greater than the input video size.
   |[
- * gst-launch -v videotestsrc ! glupload ! video/x-raw-gl, width=640, height=480  ! glfiltercube ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw, width=640, height=480  ! glfiltercube ! glimagesink
  * ]| Resize scene before drawing the cube.
  * The scene size is greater than the input video size.
  * </refsect2>
@@ -64,7 +64,7 @@
 
 #define DEBUG_INIT \
     GST_DEBUG_CATEGORY_INIT (gst_gl_filter_cube_debug, "glfiltercube", 0, "glfiltercube element");
-
+#define gst_gl_filter_cube_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLFilterCube, gst_gl_filter_cube,
     GST_TYPE_GL_FILTER, DEBUG_INIT);
 
@@ -73,29 +73,23 @@
 static void gst_gl_filter_cube_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
+static gboolean gst_gl_filter_cube_stop (GstBaseTransform * trans);
+
 static gboolean gst_gl_filter_cube_set_caps (GstGLFilter * filter,
     GstCaps * incaps, GstCaps * outcaps);
-#if GST_GL_HAVE_GLES2
-static void gst_gl_filter_cube_reset (GstGLFilter * filter);
+static void gst_gl_filter_cube_reset_gl (GstGLFilter * filter);
 static gboolean gst_gl_filter_cube_init_shader (GstGLFilter * filter);
-static void _callback_gles2 (gint width, gint height, guint texture,
-    gpointer stuff);
-#endif
-#if GST_GL_HAVE_OPENGL
-static void _callback_opengl (gint width, gint height, guint texture,
-    gpointer stuff);
-#endif
+static void _callback (gpointer stuff);
 static gboolean gst_gl_filter_cube_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
 
-#if GST_GL_HAVE_GLES2
 /* vertex source */
 static const gchar *cube_v_src =
     "attribute vec4 a_position;                                   \n"
-    "attribute vec2 a_texCoord;                                   \n"
+    "attribute vec2 a_texcoord;                                   \n"
     "uniform mat4 u_matrix;                                       \n"
     "uniform float xrot_degree, yrot_degree, zrot_degree;         \n"
-    "varying vec2 v_texCoord;                                     \n"
+    "varying vec2 v_texcoord;                                     \n"
     "void main()                                                  \n"
     "{                                                            \n"
     "   float PI = 3.14159265;                                    \n"
@@ -118,19 +112,20 @@
     "            0.0,        0.0,        1.0, 0.0,                \n"
     "            0.0,        0.0,        0.0, 1.0 );              \n"
     "   gl_Position = u_matrix * matZ * matY * matX * a_position; \n"
-    "   v_texCoord = a_texCoord;                                  \n"
+    "   v_texcoord = a_texcoord;                                  \n"
     "}                                                            \n";
 
 /* fragment source */
 static const gchar *cube_f_src =
-    "precision mediump float;                            \n"
-    "varying vec2 v_texCoord;                            \n"
+    "#ifdef GL_ES\n"
+    "precision mediump float;\n"
+    "#endif\n"
+    "varying vec2 v_texcoord;                            \n"
     "uniform sampler2D s_texture;                        \n"
     "void main()                                         \n"
     "{                                                   \n"
-    "  gl_FragColor = texture2D( s_texture, v_texCoord );\n"
+    "  gl_FragColor = texture2D( s_texture, v_texcoord );\n"
     "}                                                   \n";
-#endif
 
 static void
 gst_gl_filter_cube_class_init (GstGLFilterCubeClass * klass)
@@ -144,10 +139,10 @@
   gobject_class->set_property = gst_gl_filter_cube_set_property;
   gobject_class->get_property = gst_gl_filter_cube_get_property;
 
-#if GST_GL_HAVE_GLES2
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filter_cube_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_cube_reset;
-#endif
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_filter_cube_stop;
+
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_filter_cube_init_shader;
+  GST_GL_FILTER_CLASS (klass)->display_reset_cb = gst_gl_filter_cube_reset_gl;
   GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_filter_cube_set_caps;
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_filter_cube_filter_texture;
@@ -157,7 +152,7 @@
           0.0f, 1.0f, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_GREEN,
-      g_param_spec_float ("green", "Green", "Background reen color",
+      g_param_spec_float ("green", "Green", "Background green color",
           0.0f, 1.0f, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_BLUE,
@@ -186,6 +181,9 @@
   gst_element_class_set_metadata (element_class, "OpenGL cube filter",
       "Filter/Effect/Video", "Map input texture on the 6 cube faces",
       "Julien Isorce <julien.isorce@gmail.com>");
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
 }
 
 static void
@@ -279,16 +277,46 @@
   return TRUE;
 }
 
-#if GST_GL_HAVE_GLES2
 static void
-gst_gl_filter_cube_reset (GstGLFilter * filter)
+gst_gl_filter_cube_reset_gl (GstGLFilter * filter)
 {
   GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter);
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+  if (cube_filter->vao) {
+    gl->DeleteVertexArrays (1, &cube_filter->vao);
+    cube_filter->vao = 0;
+  }
+
+  if (cube_filter->vertex_buffer) {
+    gl->DeleteBuffers (1, &cube_filter->vertex_buffer);
+    cube_filter->vertex_buffer = 0;
+  }
+
+  if (cube_filter->vbo_indices) {
+    gl->DeleteBuffers (1, &cube_filter->vbo_indices);
+    cube_filter->vbo_indices = 0;
+  }
+
+  if (cube_filter->shader) {
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context,
+        cube_filter->shader);
+    cube_filter->shader = NULL;
+  }
+}
+
+static gboolean
+gst_gl_filter_cube_stop (GstBaseTransform * trans)
+{
+  GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (trans);
 
   /* blocking call, wait the opengl thread has destroyed the shader */
   if (cube_filter->shader)
-    gst_gl_context_del_shader (filter->context, cube_filter->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+        cube_filter->shader);
   cube_filter->shader = NULL;
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static gboolean
@@ -296,166 +324,35 @@
 {
   GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter);
 
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_GLES2) {
-    /* blocking call, wait the opengl thread has compiled the shader */
-    return gst_gl_context_gen_shader (filter->context, cube_v_src, cube_f_src,
-        &cube_filter->shader);
+  if (cube_filter->shader) {
+    gst_object_unref (cube_filter->shader);
+    cube_filter->shader = NULL;
   }
-  return TRUE;
+
+  /* blocking call, wait the opengl thread has compiled the shader */
+  return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+      cube_v_src, cube_f_src, &cube_filter->shader);
 }
-#endif
 
 static gboolean
 gst_gl_filter_cube_filter_texture (GstGLFilter * filter, guint in_tex,
     guint out_tex)
 {
   GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter);
-  GLCB cb = NULL;
-  GstGLAPI api;
 
-  api = gst_gl_context_get_gl_api (GST_GL_FILTER (cube_filter)->context);
-
-#if GST_GL_HAVE_OPENGL
-  if (api & GST_GL_API_OPENGL)
-    cb = _callback_opengl;
-#endif
-#if GST_GL_HAVE_GLES2
-  if (api & GST_GL_API_GLES2)
-    cb = _callback_gles2;
-#endif
+  cube_filter->in_tex = in_tex;
 
   /* blocking call, use a FBO */
-  gst_gl_context_use_fbo (filter->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_FILTER (filter)->context,
       GST_VIDEO_INFO_WIDTH (&filter->out_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-      filter->fbo, filter->depthbuffer, out_tex,
-      cb,
-      GST_VIDEO_INFO_WIDTH (&filter->in_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->in_info),
-      in_tex, cube_filter->fovy, cube_filter->aspect,
-      cube_filter->znear, cube_filter->zfar,
-      GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, (gpointer) cube_filter);
+      GST_VIDEO_INFO_HEIGHT (&filter->out_info), filter->fbo,
+      filter->depthbuffer, out_tex, _callback, (gpointer) cube_filter);
 
   return TRUE;
 }
 
-/* opengl scene, params: input texture (not the output filter->texture) */
-#if GST_GL_HAVE_OPENGL
-static void
-_callback_opengl (gint width, gint height, guint texture, gpointer stuff)
-{
-  GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (stuff);
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  static GLfloat xrot = 0;
-  static GLfloat yrot = 0;
-  static GLfloat zrot = 0;
-
 /* *INDENT-OFF* */
-  const GLfloat v_vertices[] = {
- /*|     Vertex     | TexCoord |*/ 
-    /* front face */
-     1.0,  1.0, -1.0, 0.0, 0.0,
-     1.0, -1.0, -1.0, 1.0, 0.0,
-    -1.0, -1.0, -1.0, 1.0, 1.0,
-    -1.0,  1.0, -1.0, 0.0, 1.0,
-    /* back face */
-    -1.0,  1.0,  1.0, 0.0, 0.0,
-    -1.0, -1.0,  1.0, 1.0, 0.0,
-     1.0, -1.0,  1.0, 1.0, 1.0,
-     1.0,  1.0,  1.0, 0.0, 1.0,
-    /* right face */
-    -1.0,  1.0, -1.0, 0.0, 0.0,
-    -1.0, -1.0, -1.0, 1.0, 0.0,
-    -1.0, -1.0,  1.0, 1.0, 1.0,
-    -1.0,  1.0,  1.0, 0.0, 1.0,
-    /* left face */
-     1.0,  1.0,  1.0, 0.0, 0.0,
-     1.0, -1.0,  1.0, 1.0, 0.0,
-     1.0, -1.0, -1.0, 1.0, 1.0,
-     1.0,  1.0, -1.0, 0.0, 1.0,
-    /* top face */
-     1.0,  1.0,  1.0, 0.0, 0.0,
-     1.0,  1.0, -1.0, 1.0, 0.0,
-    -1.0,  1.0, -1.0, 1.0, 1.0,
-    -1.0,  1.0,  1.0, 0.0, 1.0,
-    /* bottom face */
-     1.0, -1.0,  1.0, 0.0, 0.0,
-     1.0, -1.0, -1.0, 1.0, 0.0,
-    -1.0, -1.0, -1.0, 1.0, 1.0,
-    -1.0, -1.0,  1.0, 0.0, 1.0,
-  };
-/* *INDENT-ON* */
-
-  GLushort indices[] = {
-    0, 1, 2,
-    0, 2, 3,
-    4, 5, 6,
-    4, 6, 7,
-    8, 9, 10,
-    8, 10, 11,
-    12, 13, 14,
-    12, 14, 15,
-    16, 17, 18,
-    16, 18, 19,
-    20, 21, 22,
-    20, 22, 23
-  };
-
-  gl->Enable (GL_DEPTH_TEST);
-
-  gl->Enable (GL_TEXTURE_2D);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-
-  gl->ClearColor (cube_filter->red, cube_filter->green, cube_filter->blue, 0.0);
-  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-  gl->MatrixMode (GL_PROJECTION);
-  gluLookAt (0.0, 0.0, -6.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
-  gl->MatrixMode (GL_MODELVIEW);
-  gl->LoadIdentity ();
-
-//  gl->Translatef (0.0f, 0.0f, -5.0f);
-
-  gl->Rotatef (xrot, 1.0f, 0.0f, 0.0f);
-  gl->Rotatef (yrot, 0.0f, 1.0f, 0.0f);
-  gl->Rotatef (zrot, 0.0f, 0.0f, 1.0f);
-
-  gl->ClientActiveTexture (GL_TEXTURE0);
-  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->EnableClientState (GL_VERTEX_ARRAY);
-
-  gl->VertexPointer (3, GL_FLOAT, 5 * sizeof (float), v_vertices);
-  gl->TexCoordPointer (2, GL_FLOAT, 5 * sizeof (float), &v_vertices[3]);
-
-  gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices);
-
-  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->DisableClientState (GL_VERTEX_ARRAY);
-
-  gl->Disable (GL_DEPTH_TEST);
-
-  xrot += 0.3f;
-  yrot += 0.2f;
-  zrot += 0.4f;
-}
-#endif
-
-#if GST_GL_HAVE_GLES2
-static void
-_callback_gles2 (gint width, gint height, guint texture, gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  static GLfloat xrot = 0;
-  static GLfloat yrot = 0;
-  static GLfloat zrot = 0;
-
-/* *INDENT-OFF* */
-  const GLfloat v_vertices[] = {
+static const GLfloat vertices[] = {
  /*|     Vertex     | TexCoord |*/ 
     /* front face */
      1.0,  1.0, -1.0, 1.0, 0.0,
@@ -487,10 +384,9 @@
      1.0,  1.0, -1.0, 1.0, 1.0,
     -1.0,  1.0, -1.0, 0.0, 1.0,
     -1.0,  1.0,  1.0, 0.0, 0.0
-  };
-/* *INDENT-ON* */
+};
 
-  GLushort indices[] = {
+static const GLushort indices[] = {
     0, 1, 2,
     0, 2, 3,
     4, 5, 6,
@@ -503,10 +399,57 @@
     16, 18, 19,
     20, 21, 22,
     20, 22, 23
-  };
+};
+/* *INDENT-ON* */
 
-  GLint attr_position_loc = 0;
-  GLint attr_texture_loc = 0;
+static void
+_bind_buffer (GstGLFilterCube * cube_filter)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (cube_filter)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, cube_filter->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, cube_filter->vertex_buffer);
+
+  cube_filter->attr_position =
+      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_position");
+
+  cube_filter->attr_texture =
+      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_texcoord");
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (cube_filter->attr_position, 3, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (cube_filter->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (cube_filter->attr_position);
+  gl->EnableVertexAttribArray (cube_filter->attr_texture);
+}
+
+static void
+_unbind_buffer (GstGLFilterCube * cube_filter)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (cube_filter)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (cube_filter->attr_position);
+  gl->DisableVertexAttribArray (cube_filter->attr_texture);
+}
+
+static void
+_callback (gpointer stuff)
+{
+  GstGLFilter *filter = GST_GL_FILTER (stuff);
+  GstGLFilterCube *cube_filter = GST_GL_FILTER_CUBE (filter);
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+  static GLfloat xrot = 0;
+  static GLfloat yrot = 0;
+  static GLfloat zrot = 0;
 
   const GLfloat matrix[] = {
     0.5f, 0.0f, 0.0f, 0.0f,
@@ -522,24 +465,8 @@
 
   gst_gl_shader_use (cube_filter->shader);
 
-  attr_position_loc =
-      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_position");
-  attr_texture_loc =
-      gst_gl_shader_get_attribute_location (cube_filter->shader, "a_texCoord");
-
-  /* Load the vertex position */
-  gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
-      GL_FALSE, 5 * sizeof (GLfloat), v_vertices);
-
-  /* Load the texture coordinate */
-  gl->VertexAttribPointer (attr_texture_loc, 2, GL_FLOAT,
-      GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[3]);
-
-  gl->EnableVertexAttribArray (attr_position_loc);
-  gl->EnableVertexAttribArray (attr_texture_loc);
-
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
+  gl->BindTexture (GL_TEXTURE_2D, cube_filter->in_tex);
   gst_gl_shader_set_uniform_1i (cube_filter->shader, "s_texture", 0);
   gst_gl_shader_set_uniform_1f (cube_filter->shader, "xrot_degree", xrot);
   gst_gl_shader_set_uniform_1f (cube_filter->shader, "yrot_degree", yrot);
@@ -547,10 +474,42 @@
   gst_gl_shader_set_uniform_matrix_4fv (cube_filter->shader, "u_matrix", 1,
       GL_FALSE, matrix);
 
-  gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices);
+  if (!cube_filter->vertex_buffer) {
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &cube_filter->vao);
+      gl->BindVertexArray (cube_filter->vao);
+    }
 
-  gl->DisableVertexAttribArray (attr_position_loc);
-  gl->DisableVertexAttribArray (attr_texture_loc);
+    gl->GenBuffers (1, &cube_filter->vertex_buffer);
+    gl->BindBuffer (GL_ARRAY_BUFFER, cube_filter->vertex_buffer);
+    gl->BufferData (GL_ARRAY_BUFFER, 6 * 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+
+    gl->GenBuffers (1, &cube_filter->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, cube_filter->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+
+    if (gl->GenVertexArrays) {
+      _bind_buffer (cube_filter);
+      gl->BindVertexArray (0);
+    }
+
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+    gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+  }
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (cube_filter->vao);
+  else
+    _bind_buffer (cube_filter);
+
+  gl->DrawElements (GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, 0);
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (0);
+  else
+    _unbind_buffer (cube_filter);
 
   gl->Disable (GL_DEPTH_TEST);
 
@@ -558,4 +517,3 @@
   yrot += 0.2f;
   zrot += 0.4f;
 }
-#endif
diff --git a/ext/gl/gstglfiltercube.h b/ext/gl/gstglfiltercube.h
index c3e1488..88b51a6 100644
--- a/ext/gl/gstglfiltercube.h
+++ b/ext/gl/gstglfiltercube.h
@@ -51,6 +51,13 @@
     gdouble aspect;
     gdouble znear;
     gdouble zfar;
+
+    guint              in_tex;
+    GLuint             vao;
+    GLuint             vbo_indices;
+    GLuint             vertex_buffer;
+    GLint              attr_position;
+    GLint              attr_texture;
 };
 
 struct _GstGLFilterCubeClass
diff --git a/ext/gl/gstglfilterglass.c b/ext/gl/gstglfilterglass.c
index 4b26552..863793c 100644
--- a/ext/gl/gstglfilterglass.c
+++ b/ext/gl/gstglfilterglass.c
@@ -27,11 +27,11 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! glupload ! glfilterglass ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! glfilterglass ! glimagesink
  * ]| A pipeline inspired from http://www.mdk.org.pl/2007/11/17/gl-colorspace-conversions
  * FBO is required.
  * |[
- * gst-launch -v videotestsrc ! glupload ! glfilterglass ! "video/x-raw-gl, width=640, height=480" ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! glfilterglass ! video/x-raw, width=640, height=480 ! glimagesink
  * ]| The scene is greater than the input size.
  * </refsect2>
  */
@@ -53,7 +53,7 @@
 
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_filter_glass_debug, "glfilterglass", 0, "glfilterglass element");
-
+#define gst_gl_filter_glass_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLFilterGlass, gst_gl_filter_glass,
     GST_TYPE_GL_FILTER, DEBUG_INIT);
 
@@ -62,7 +62,8 @@
 static void gst_gl_filter_glass_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static void gst_gl_filter_glass_reset (GstGLFilter * filter);
+static gboolean gst_gl_filter_glass_reset (GstBaseTransform * trans);
+
 static gboolean gst_gl_filter_glass_init_shader (GstGLFilter * filter);
 static gboolean gst_gl_filter_glass_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
@@ -160,8 +161,10 @@
 
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_filter_glass_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filter_glass_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_glass_reset;
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_filter_glass_init_shader;
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_filter_glass_reset;
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
 }
 
 static void
@@ -171,19 +174,22 @@
   filter->timestamp = 0;
 }
 
-static void
-gst_gl_filter_glass_reset (GstGLFilter * filter)
+static gboolean
+gst_gl_filter_glass_reset (GstBaseTransform * trans)
 {
-  GstGLFilterGlass *glass_filter = GST_GL_FILTER_GLASS (filter);
+  GstGLFilterGlass *glass_filter = GST_GL_FILTER_GLASS (trans);
 
   //blocking call, wait the opengl thread has destroyed the shader
   if (glass_filter->shader)
-    gst_gl_context_del_shader (filter->context, glass_filter->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+        glass_filter->shader);
   glass_filter->shader = NULL;
   if (glass_filter->passthrough_shader)
-    gst_gl_context_del_shader (filter->context,
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
         glass_filter->passthrough_shader);
   glass_filter->passthrough_shader = NULL;
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static void
@@ -220,12 +226,13 @@
 
   //blocking call, wait the opengl thread has compiled the shader
   ret =
-      gst_gl_context_gen_shader (filter->context, glass_vertex_source,
-      glass_fragment_source, &glass_filter->shader);
+      gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+      glass_vertex_source, glass_fragment_source, &glass_filter->shader);
   if (ret)
     ret =
-        gst_gl_context_gen_shader (filter->context, passthrough_vertex,
-        passthrough_fragment, &glass_filter->passthrough_shader);
+        gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+        passthrough_vertex, passthrough_fragment,
+        &glass_filter->passthrough_shader);
 
   return ret;
 }
@@ -238,7 +245,7 @@
   glass_filter->in_tex = in_tex;
 
   //blocking call, use a FBO
-  gst_gl_context_use_fbo_v2 (filter->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_FILTER (filter)->context,
       GST_VIDEO_INFO_WIDTH (&filter->out_info),
       GST_VIDEO_INFO_HEIGHT (&filter->out_info),
       filter->fbo, filter->depthbuffer, out_tex,
@@ -260,7 +267,7 @@
 gst_gl_filter_glass_draw_background_gradient (GstGLFilterGlass * glass)
 {
   GstGLFilter *filter = GST_GL_FILTER (glass);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
 /* *INDENT-OFF* */
   gfloat mesh[] = {
@@ -301,7 +308,7 @@
     gfloat start_alpha, gfloat stop_alpha, gboolean reversed, gfloat rotation)
 {
   GstGLFilterGlass *glass_filter = GST_GL_FILTER_GLASS (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gfloat topy = reversed ? center_y - 1.0f : center_y + 1.0f;
   gfloat bottomy = reversed ? center_y + 1.0f : center_y - 1.0f;
@@ -322,9 +329,7 @@
   };
 
   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 (glass_filter->shader, "tex", 0);
   gst_gl_shader_set_uniform_1f (glass_filter->shader, "yrot", rotation);
@@ -356,7 +361,7 @@
 
   GstGLFilter *filter = GST_GL_FILTER (stuff);
   GstGLFilterGlass *glass_filter = GST_GL_FILTER_GLASS (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gint width = GST_VIDEO_INFO_WIDTH (&filter->out_info);
   gint height = GST_VIDEO_INFO_HEIGHT (&filter->out_info);
@@ -399,8 +404,7 @@
   gst_gl_filter_glass_draw_video_plane (filter, width, height, texture,
       0.0f, 0.0f, 1.0f, 1.0f, FALSE, rotation);
 
-  gst_gl_context_clear_shader (filter->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
 
-  gl->Disable (GL_TEXTURE_2D);
   gl->Disable (GL_BLEND);
 }
diff --git a/ext/gl/gstglfilterlaplacian.c b/ext/gl/gstglfilterlaplacian.c
deleted file mode 100644
index 6424a9c..0000000
--- a/ext/gl/gstglfilterlaplacian.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008-2010 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-/**
- * SECTION:element-glfilterlaplacian
- *
- * Laplacian Convolution Demo Filter.
- *
- * <refsect2>
- * <title>Examples</title>
- * |[
- * gst-launch videotestsrc ! glupload ! glfilterlaplacian ! glimagesink
- * ]|
- * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstglfilterlaplacian.h"
-
-#define GST_CAT_DEFAULT gst_gl_filter_laplacian_debug
-GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
-enum
-{
-  PROP_0
-};
-
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_filter_laplacian_debug, "glfilterlaplacian", 0, "glfilterlaplacian element");
-
-G_DEFINE_TYPE_WITH_CODE (GstGLFilterLaplacian, gst_gl_filter_laplacian,
-    GST_TYPE_GL_FILTER, DEBUG_INIT);
-
-static void gst_gl_filter_laplacian_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_gl_filter_laplacian_get_property (GObject * object,
-    guint prop_id, GValue * value, GParamSpec * pspec);
-
-static void gst_gl_filter_laplacian_reset (GstGLFilter * filter);
-static gboolean gst_gl_filter_laplacian_init_shader (GstGLFilter * filter);
-static gboolean gst_gl_filter_laplacian_filter_texture (GstGLFilter * filter,
-    guint in_tex, guint out_tex);
-static void gst_gl_filter_laplacian_callback (gint width, gint height,
-    guint texture, gpointer stuff);
-
-/* *INDENT-OFF* */
-
-/* This filter is meant as a demo of gst-plugins-gl + glsl
-   capabilities. So I'm keeping this shader readable enough. If and
-   when this shader will be used in production be careful to hard code
-   kernel into the shader and remove unneeded zero multiplications in
-   the convolution */
-static const gchar *convolution_fragment_source =
-  "uniform sampler2D tex;"
-  "uniform float kernel[9];"
-  "uniform float width, height;"
-  "void main () {"
-  "  float w = 1.0 / width;"
-  "  float h = 1.0 / height;"
-  "  vec2 texturecoord[9];"
-  "  texturecoord[4] = gl_TexCoord[0].st;"                /*  0  0 */
-  "  texturecoord[5] = texturecoord[4] + vec2(w,   0.0);" /*  1  0 */
-  "  texturecoord[2] = texturecoord[5] - vec2(0.0, h);" /*  1 -1 */
-  "  texturecoord[1] = texturecoord[2] - vec2(w,   0.0);" /*  0 -1 */
-  "  texturecoord[0] = texturecoord[1] - vec2(w,   0.0);" /* -1 -1 */
-  "  texturecoord[3] = texturecoord[0] + vec2(0.0, h);" /* -1  0 */
-  "  texturecoord[6] = texturecoord[3] + vec2(0.0, h);" /* -1  1 */
-  "  texturecoord[7] = texturecoord[6] + vec2(w,   0.0);" /*  0  1 */
-  "  texturecoord[8] = texturecoord[7] + vec2(w,   0.0);" /*  1  1 */
-  "  int i;"
-  "  vec4 sum = vec4 (0.0);"
-  "  for (i = 0; i < 9; i++) { "
-  "    vec4 neighbor = texture2D(tex, texturecoord[i]);"
-  "    sum += neighbor * kernel[i];"
-  "  }"
-  "  gl_FragColor = sum;"
-  "}";
-/* *INDENT-ON* */
-
-static void
-gst_gl_filter_laplacian_class_init (GstGLFilterLaplacianClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_gl_filter_laplacian_set_property;
-  gobject_class->get_property = gst_gl_filter_laplacian_get_property;
-
-  gst_element_class_set_metadata (element_class,
-      "OpenGL laplacian filter", "Filter/Effect/Video",
-      "Laplacian Convolution Demo Filter",
-      "Filippo Argiolas <filippo.argiolas@gmail.com>");
-
-  GST_GL_FILTER_CLASS (klass)->filter_texture =
-      gst_gl_filter_laplacian_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filter_laplacian_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_laplacian_reset;
-}
-
-static void
-gst_gl_filter_laplacian_init (GstGLFilterLaplacian * filter)
-{
-  filter->shader = NULL;
-}
-
-static void
-gst_gl_filter_laplacian_reset (GstGLFilter * filter)
-{
-  GstGLFilterLaplacian *laplacian_filter = GST_GL_FILTER_LAPLACIAN (filter);
-
-  //blocking call, wait the opengl thread has destroyed the shader
-  if (laplacian_filter->shader)
-    gst_gl_context_del_shader (filter->context, laplacian_filter->shader);
-  laplacian_filter->shader = NULL;
-}
-
-static void
-gst_gl_filter_laplacian_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  //GstGLFilterLaplacian *filter = GST_GL_FILTER_LAPLACIAN (object);
-
-  switch (prop_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_gl_filter_laplacian_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  //GstGLFilterLaplacian *filter = GST_GL_FILTER_LAPLACIAN (object);
-
-  switch (prop_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_gl_filter_laplacian_init_shader (GstGLFilter * filter)
-{
-  GstGLFilterLaplacian *laplacian_filter = GST_GL_FILTER_LAPLACIAN (filter);
-
-  //blocking call, wait the opengl thread has compiled the shader
-  return gst_gl_context_gen_shader (filter->context, 0,
-      convolution_fragment_source, &laplacian_filter->shader);
-}
-
-static gboolean
-gst_gl_filter_laplacian_filter_texture (GstGLFilter * filter, guint in_tex,
-    guint out_tex)
-{
-  gpointer laplacian_filter = GST_GL_FILTER_LAPLACIAN (filter);
-
-
-  //blocking call, use a FBO
-  gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
-      gst_gl_filter_laplacian_callback, laplacian_filter);
-
-  return TRUE;
-}
-
-//opengl scene, params: input texture (not the output filter->texture)
-static void
-gst_gl_filter_laplacian_callback (gint width, gint height, guint texture,
-    gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFilterLaplacian *laplacian_filter = GST_GL_FILTER_LAPLACIAN (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gfloat kernel[9] = { 0.0, -1.0, 0.0,
-    -1.0, 4.0, -1.0,
-    0.0, -1.0, 0.0
-  };
-
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
-
-  gst_gl_shader_use (laplacian_filter->shader);
-
-  gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-
-  gst_gl_shader_set_uniform_1i (laplacian_filter->shader, "tex", 0);
-  gst_gl_shader_set_uniform_1fv (laplacian_filter->shader, "kernel", 9, kernel);
-  gst_gl_shader_set_uniform_1f (laplacian_filter->shader, "width",
-      (gfloat) width);
-  gst_gl_shader_set_uniform_1f (laplacian_filter->shader, "height",
-      (gfloat) height);
-
-  gst_gl_filter_draw_texture (filter, texture, width, height);
-}
diff --git a/ext/gl/gstglfilterlaplacian.h b/ext/gl/gstglfilterlaplacian.h
deleted file mode 100644
index 90a54e3..0000000
--- a/ext/gl/gstglfilterlaplacian.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 
- * GStreamer
- * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _GST_GL_FILTERLAPLACIAN_H_
-#define _GST_GL_FILTERLAPLACIAN_H_
-
-#include <gst/gl/gstglfilter.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GL_FILTER_LAPLACIAN            (gst_gl_filter_laplacian_get_type())
-#define GST_GL_FILTER_LAPLACIAN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTER_LAPLACIAN,GstGLFilterLaplacian))
-#define GST_IS_GL_FILTER_LAPLACIAN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FILTER_LAPLACIAN))
-#define GST_GL_FILTER_LAPLACIAN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_FILTER_LAPLACIAN,GstGLFilterLaplacianClass))
-#define GST_IS_GL_FILTER_LAPLACIAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTER_LAPLACIAN))
-#define GST_GL_FILTER_LAPLACIAN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTER_LAPLACIAN,GstGLFilterLaplacianClass))
-
-typedef struct _GstGLFilterLaplacian GstGLFilterLaplacian;
-typedef struct _GstGLFilterLaplacianClass GstGLFilterLaplacianClass;
-
-struct _GstGLFilterLaplacian
-{
-  GstGLFilter filter;
-  GstGLShader *shader;
-};
-
-struct _GstGLFilterLaplacianClass
-{
-  GstGLFilterClass filter_class;
-};
-
-GType gst_gl_filter_laplacian_get_type (void);
-
-G_END_DECLS
-
-#endif /* _GST_GLFILTERLAPLACIAN_H_ */
diff --git a/ext/gl/gstglfilterreflectedscreen.c b/ext/gl/gstglfilterreflectedscreen.c
deleted file mode 100644
index c1ef34d..0000000
--- a/ext/gl/gstglfilterreflectedscreen.c
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2010 Pierre Pouzol<pierre.pouzol@hotmail.fr>
- *
- * 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-glfilterreflectedscreen
- *
- * Map Video Texture upon a screen, on a reflecting surface
- *
- * <refsect2>
- * <title>Examples</title>
- * |[
- * gst-launch videotestsrc ! glupload ! glfilterreflectedscreen ! glimagesink
- * ]|
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <math.h>
-#include "gstglfilterreflectedscreen.h"
-
-#define GST_CAT_DEFAULT gst_gl_filter_reflected_screen_debug
-GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
-enum
-{
-  PROP_0,
-  PROP_ACTIVE_GRAPHIC_MODE,
-  PROP_SEPARATED_SCREEN,
-  PROP_SHOW_FLOOR,
-  PROP_FOVY,
-  PROP_ASPECT,
-  PROP_ZNEAR,
-  PROP_ZFAR
-};
-
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_filter_reflected_screen_debug, "glfilterreflectedscreen", 0, "glfilterreflectedscreen element");
-
-G_DEFINE_TYPE_WITH_CODE (GstGLFilterReflectedScreen,
-    gst_gl_filter_reflected_screen, GST_TYPE_GL_FILTER, DEBUG_INIT);
-
-static void gst_gl_filter_reflected_screen_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_gl_filter_reflected_screen_get_property (GObject * object,
-    guint prop_id, GValue * value, GParamSpec * pspec);
-
-static gboolean gst_gl_filter_reflected_screen_filter_texture (GstGLFilter *
-    filter, guint in_tex, guint out_tex);
-
-static void gst_gl_filter_reflected_screen_draw_background ();
-static void gst_gl_filter_reflected_screen_draw_floor ();
-static void gst_gl_filter_reflected_screen_draw_screen (GstGLFilter * filter,
-    gint width, gint height, guint texture);
-static void gst_gl_filter_reflected_screen_draw_separated_screen (GstGLFilter *
-    filter, gint width, gint height, guint texture, gfloat alphs, gfloat alphe);
-
-static void gst_gl_filter_reflected_screen_callback (gint width, gint height,
-    guint texture, gpointer stuff);
-
-static GLfloat LightPos[] = { 4.0f, -4.0f, 6.0f, 1.0f };        // Light Position
-static GLfloat LightAmb[] = { 4.0f, 4.0f, 4.0f, 1.0f }; // Ambient Light
-static GLfloat LightDif[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // Diffuse Light
-
-static void
-gst_gl_filter_reflected_screen_class_init (GstGLFilterReflectedScreenClass *
-    klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_gl_filter_reflected_screen_set_property;
-  gobject_class->get_property = gst_gl_filter_reflected_screen_get_property;
-
-  GST_GL_FILTER_CLASS (klass)->filter_texture =
-      gst_gl_filter_reflected_screen_filter_texture;
-
-  g_object_class_install_property (gobject_class, PROP_ACTIVE_GRAPHIC_MODE,
-      g_param_spec_boolean ("active-graphic-mode",
-          "Activate graphic mode",
-          "Allow user to activate stencil buffer and blending.",
-          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_SEPARATED_SCREEN,
-      g_param_spec_boolean ("separated-screen",
-          "Create a separation space",
-          "Allow to insert a space between the two screen. Will cancel 'show floor' if active. Value are TRUE or FALSE(default)",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_SHOW_FLOOR,
-      g_param_spec_boolean ("show-floor",
-          "Show the support",
-          "Allow the user to show the supportive floor. Will cancel 'separated screen' if active. Value are TRUE(default) or FALSE",
-          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_FOVY,
-      g_param_spec_double ("fovy", "Fovy", "Field of view angle in degrees",
-          0.0, 180.0, 60, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_ASPECT,
-      g_param_spec_double ("aspect", "Aspect",
-          "Field of view in the x direction", 1.0, 100, 1.0,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_ZNEAR,
-      g_param_spec_double ("znear", "Znear",
-          "Specifies the distance from the viewer to the near clipping plane",
-          0.0000000001, 100.0, 0.1,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_ZFAR,
-      g_param_spec_double ("zfar", "Zfar",
-          "Specifies the distance from the viewer to the far clipping plane",
-          0.0, 1000.0, 100.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gst_element_class_set_metadata (element_class,
-      "OpenGL Reflected Screen filter", "Filter/Effect/Video",
-      "Reflected Screen Filter", "Pierre POUZOL <pierre.pouzol@hotmail.fr>");
-}
-
-static void
-gst_gl_filter_reflected_screen_init (GstGLFilterReflectedScreen * filter)
-{
-  filter->active_graphic_mode = TRUE;
-  filter->separated_screen = FALSE;
-  filter->show_floor = TRUE;
-  filter->fovy = 90;
-  filter->aspect = 1.0;
-  filter->znear = 0.1;
-  filter->zfar = 1000;
-}
-
-static void
-gst_gl_filter_reflected_screen_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstGLFilterReflectedScreen *filter = GST_GL_FILTER_REFLECTED_SCREEN (object);
-
-  switch (prop_id) {
-    case PROP_ACTIVE_GRAPHIC_MODE:
-      filter->active_graphic_mode = g_value_get_boolean (value);
-      break;
-    case PROP_SEPARATED_SCREEN:
-      filter->separated_screen = g_value_get_boolean (value);
-      break;
-    case PROP_SHOW_FLOOR:
-      filter->show_floor = g_value_get_boolean (value);
-      break;
-    case PROP_FOVY:
-      filter->fovy = g_value_get_double (value);
-      break;
-    case PROP_ASPECT:
-      filter->aspect = g_value_get_double (value);
-      break;
-    case PROP_ZNEAR:
-      filter->znear = g_value_get_double (value);
-      break;
-    case PROP_ZFAR:
-      filter->zfar = g_value_get_double (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_gl_filter_reflected_screen_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstGLFilterReflectedScreen *filter = GST_GL_FILTER_REFLECTED_SCREEN (object);
-
-  switch (prop_id) {
-    case PROP_ACTIVE_GRAPHIC_MODE:
-      g_value_set_boolean (value, filter->active_graphic_mode);
-      break;
-    case PROP_SEPARATED_SCREEN:
-      g_value_set_boolean (value, filter->separated_screen);
-      break;
-    case PROP_SHOW_FLOOR:
-      g_value_set_boolean (value, filter->show_floor);
-      break;
-    case PROP_FOVY:
-      g_value_set_double (value, filter->fovy);
-      break;
-    case PROP_ASPECT:
-      g_value_set_double (value, filter->aspect);
-      break;
-    case PROP_ZNEAR:
-      g_value_set_double (value, filter->znear);
-      break;
-    case PROP_ZFAR:
-      g_value_set_double (value, filter->zfar);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_gl_filter_reflected_screen_filter_texture (GstGLFilter * filter,
-    guint in_tex, guint out_tex)
-{
-  GstGLFilterReflectedScreen *reflected_screen_filter =
-      GST_GL_FILTER_REFLECTED_SCREEN (filter);
-
-  //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,
-      gst_gl_filter_reflected_screen_callback,
-      GST_VIDEO_INFO_WIDTH (&filter->in_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->in_info), in_tex,
-      reflected_screen_filter->fovy, reflected_screen_filter->aspect,
-      reflected_screen_filter->znear, reflected_screen_filter->zfar,
-      GST_GL_DISPLAY_PROJECTION_PERSPECTIVE,
-      (gpointer) reflected_screen_filter);
-
-  return TRUE;
-}
-
-static void
-gst_gl_filter_reflected_screen_draw_separated_screen (GstGLFilter * filter,
-    gint width, gint height, guint texture, gfloat alphs, gfloat alphe)
-{
-  //enable ARB Rectangular texturing
-  //that's necessary to have the video displayed on our screen (with gstreamer)
-  glEnable (GL_TEXTURE_2D);
-  glBindTexture (GL_TEXTURE_2D, texture);
-  //configure parameters for the texturing
-  //the two first are used to specified how the texturing will be done if the screen is greater than the texture herself
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  //the next two specified how the texture will comport near the limits
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-  //creating screen and setting the texture (depending on texture's height and width)
-  glBegin (GL_QUADS);
-
-  // right Face
-  glColor4f (1.0f, 1.0f, 1.0f, alphs);
-  glTexCoord2f (0.5f, 1.0f);
-  glVertex3f (-0.75f, 0.0f, -1.0f);
-  glColor4f (1.0f, 1.0f, 1.0f, alphe);
-  glTexCoord2f (0.5f, 0.0f);
-  glVertex3f (-0.75f, 1.25f, -1.0f);
-  glTexCoord2f (1.0f, 0.0f);
-  glVertex3f (1.25f, 1.25f, -1.0f);
-  glColor4f (1.0f, 1.0f, 1.0f, alphs);
-  glTexCoord2f (1.0f, 1.0f);
-  glVertex3f (1.25f, 0.0f, -1.0f);
-  // Left Face
-  glColor4f (1.0f, 1.0f, 1.0f, alphs);
-  glTexCoord2f (0.5f, 1.0f);
-  glVertex3f (-1.0f, 0.0f, -0.75f);
-  glTexCoord2f (0.0f, 1.0f);
-  glVertex3f (-1.0f, 0.0f, 1.25f);
-  glColor4f (1.0f, 1.0f, 1.0f, alphe);
-  glTexCoord2f (0.0f, 0.0f);
-  glVertex3f (-1.0f, 1.25f, 1.25f);
-  glTexCoord2f (0.5f, 0.0f);
-  glVertex3f (-1.0f, 1.25f, -0.75f);
-
-  glEnd ();
-  glDisable (GL_TEXTURE_2D);
-}
-
-static void
-gst_gl_filter_reflected_screen_draw_screen (GstGLFilter * filter,
-    gint width, gint height, guint texture)
-{
-  //enable ARB Rectangular texturing
-  //that's necessary to have the video displayed on our screen (with gstreamer)
-  glEnable (GL_TEXTURE_2D);
-  glBindTexture (GL_TEXTURE_2D, texture);
-  //configure parameters for the texturing
-  //the two first are used to specified how the texturing will be done if the screen is greater than the texture herself
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  //the next two specified how the texture will comport near the limits
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-  //creating screen and setting the texture (depending on texture's height and width)
-  glBegin (GL_QUADS);
-
-  glTexCoord2f (0.5f, 1.0f);
-  glVertex3f (-1.0f, 0.0f, -1.0f);
-  glTexCoord2f (0.5f, 0.0f);
-  glVertex3f (-1.0f, 1.0f, -1.0f);
-  glTexCoord2f (1.0f, 0.0f);
-  glVertex3f (1.0f, 1.0f, -1.0f);
-  glTexCoord2f (1.0f, 1.0f);
-  glVertex3f (1.0f, 0.0f, -1.0f);
-  // Left Face
-  glTexCoord2f (0.5f, 1.0f);
-  glVertex3f (-1.0f, 0.0f, -1.0f);
-  glTexCoord2f (0.0f, 1.0f);
-  glVertex3f (-1.0f, 0.0f, 1.0f);
-  glTexCoord2f (0.0f, 0.0f);
-  glVertex3f (-1.0f, 1.0f, 1.0f);
-  glTexCoord2f (0.5f, 0.0f);
-  glVertex3f (-1.0f, 1.0f, -1.0f);
-
-  glEnd ();
-
-  //disable this kind of texturing (useless for the gluDisk)
-  glDisable (GL_TEXTURE_2D);
-}
-
-static void
-gst_gl_filter_reflected_screen_draw_background (void)
-{
-  glBegin (GL_QUADS);
-
-  // right Face
-
-  glColor4f (0.0f, 0.0f, 0.0f, 1.0f);
-  glVertex3f (-10.0f, -10.0f, -1.0f);
-
-  glColor4f (0.0f, 0.0f, 0.2f, 1.0f);
-  glVertex3f (-10.0f, 10.0f, -1.0f);
-  glVertex3f (10.0f, 10.0f, -1.0f);
-  glVertex3f (10.0f, -10.0f, -1.0f);
-
-  glEnd ();
-}
-
-static void
-gst_gl_filter_reflected_screen_draw_floor (void)
-{
-  GLUquadricObj *q;
-  //create a quadric for the floor's drawing
-  q = gluNewQuadric ();
-  //configure this quadric's parameter (for lighting and texturing)
-  gluQuadricNormals (q, GL_SMOOTH);
-  gluQuadricTexture (q, GL_FALSE);
-
-  //drawing the disk. The texture are mapped thanks to the parameter we gave to the GLUquadric q
-  gluDisk (q, 0.0, 2.2, 50, 1);
-}
-
-//opengl scene, params: input texture (not the output filter->texture)
-static void
-gst_gl_filter_reflected_screen_callback (gint width, gint height, guint texture,
-    gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFilterReflectedScreen *reflected_screen_filter =
-      GST_GL_FILTER_REFLECTED_SCREEN (stuff);
-
-  glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-
-  //load identity befor tracing
-  glLoadIdentity ();
-  //camera translation
-  glTranslatef (0.0f, 0.1f, -1.3f);
-  //camera configuration
-  if (reflected_screen_filter->separated_screen)
-    gluLookAt (0.1, -0.25, 2.0, 0.025, 0.0, 0.0, 0.0, 1.0, 0.0);
-  else
-    gluLookAt (0.1, -0.35, 2.0, 0.025, 0.0, 0.0, 0.0, 1.0, 0.0);
-
-  gst_gl_filter_reflected_screen_draw_background ();
-
-  if (reflected_screen_filter->separated_screen) {
-    glEnable (GL_BLEND);
-
-    glPushMatrix ();
-    glScalef (1.0f, -1.0f, 1.0f);
-    glTranslatef (0.0f, 0.0f, 1.2f);
-    glRotatef (-45.0f, 0.0, 1.0, 0.0);
-    gst_gl_filter_reflected_screen_draw_separated_screen (filter, width, height,
-        texture, 1.0f, 1.0f);
-    glPopMatrix ();
-
-    if (reflected_screen_filter->active_graphic_mode) {
-      //configuration of the transparency function
-      glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-      glTranslatef (0.0f, 0.0f, 1.2f);
-      glRotatef (-45.0f, 0.0, 1.0, 0.0);
-      gst_gl_filter_reflected_screen_draw_separated_screen (filter, width,
-          height, texture, 0.5f, 0.0f);
-      glDisable (GL_BLEND);
-    }
-  }
-  if (reflected_screen_filter->show_floor) {
-    glLightfv (GL_LIGHT0, GL_AMBIENT, LightAmb);
-    glLightfv (GL_LIGHT0, GL_DIFFUSE, LightDif);
-    glLightfv (GL_LIGHT0, GL_POSITION, LightPos);
-
-    //enable lighting
-    glEnable (GL_LIGHT0);
-    glEnable (GL_LIGHTING);
-
-    if (reflected_screen_filter->active_graphic_mode) {
-      glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-      //enable stencil buffer use
-      glEnable (GL_STENCIL_TEST);
-      //setting the stencil buffer. Each time a pixel will be drawn by now, this pixel value will be set to 1
-      glStencilFunc (GL_ALWAYS, 1, 1);
-      glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);
-
-      //disable the zbuffer
-      glDisable (GL_DEPTH_TEST);
-      //make a rotation of 90 degree on x axis. By default, gluDisk draw a disk on z axis
-      glRotatef (-90.0f, 1.0, 0.0, 0.0);
-      //draw the floor. Each pixel representing this floor will now have a value of 1 on stencil buffer
-      gst_gl_filter_reflected_screen_draw_floor ();
-      //make an anti-rotation of 90 degree to draw the rest of the scene on the right angle
-      glRotatef (90.0f, 1.0, 0.0, 0.0);
-      //enable zbuffer again
-      glEnable (GL_DEPTH_TEST);
-      //enable the drawing to be shown
-      glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-      //say that the next object have to be drawn ONLY where the stencil buffer's pixel's value is 1
-      glStencilFunc (GL_EQUAL, 1, 1);
-      glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP);
-
-      //save the actual matrix
-      glPushMatrix ();
-      glLightfv (GL_LIGHT0, GL_POSITION, LightPos);
-      //translate the object on z axis
-      glTranslatef (0.0f, 0.0f, 1.4f);
-      //rotate it (because the drawing method place the user behind the left part of the screen)
-      glRotatef (-45.0f, 0.0, 1.0, 0.0);
-      //draw the reflexion
-      gst_gl_filter_reflected_screen_draw_screen (filter, width, height,
-          texture);
-      //return to the saved matrix position
-      glPopMatrix ();
-      //end of the stencil buffer uses
-      glDisable (GL_STENCIL_TEST);
-
-      //enable the blending to mix the floor and reflexion color
-      glEnable (GL_BLEND);
-      glDisable (GL_LIGHTING);
-      //specified a white color (for the floor) with 20% transparency
-      glColor4f (1.0f, 1.0f, 1.0f, 0.8f);
-      //configuration of the transparency function
-      glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    }
-    //draw the floor (which will appear this time)
-    glRotatef (-90.0f, 1.0, 0.0, 0.0);
-    gst_gl_filter_reflected_screen_draw_floor ();
-    glRotatef (90.0f, 1.0, 0.0, 0.0);
-    glDisable (GL_BLEND);
-    glEnable (GL_LIGHTING);
-    //draw the real object
-    //scale on y axis. The object must be drawn upside down (to suggest a reflexion)
-    glScalef (1.0f, -1.0f, 1.0f);
-    glTranslatef (0.0f, 0.0f, 1.4f);
-    glRotatef (-45.0f, 0.0, 1.0, 0.0);
-    gst_gl_filter_reflected_screen_draw_screen (filter, width, height, texture);
-    glDisable (GL_LIGHTING);
-  }
-}
diff --git a/ext/gl/gstglfilterreflectedscreen.h b/ext/gl/gstglfilterreflectedscreen.h
deleted file mode 100644
index a739689..0000000
--- a/ext/gl/gstglfilterreflectedscreen.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Pierre Pouzol<pierre.pouzol@hotmail.fr>
- *
- * 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_FILTERREFLECTEDSCREEN_H_
-#define _GST_GL_FILTERREFLECTEDSCREEN_H_
-
-#include <gst/gl/gstglfilter.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GL_FILTER_REFLECTED_SCREEN          (gst_gl_filter_reflected_screen_get_type())
-#define GST_GL_FILTER_REFLECTED_SCREEN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTER_REFLECTED_SCREEN,GstGLFilterReflectedScreen))
-#define GST_IS_GL_FILTER_REFLECTED_SCREEN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FILTER_REFLECTED_SCREEN))
-#define GST_GL_FILTER_REFLECTED_SCREEN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_FILTER_REFLECTED_SCREEN,GstGLFilterReflectedScreenClass))
-#define GST_IS_GL_FILTER_REFLECTED_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTER_REFLECTED_SCREEN))
-#define GST_GL_FILTER_REFLECTED_SCREEN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTER_REFLECTED_SCREEN,GstGLFilterReflectedScreenClass))
-
-typedef struct _GstGLFilterReflectedScreen GstGLFilterReflectedScreen;
-typedef struct _GstGLFilterReflectedScreenClass GstGLFilterReflectedScreenClass;
-
-struct _GstGLFilterReflectedScreen
-{
-	GstGLFilter filter;
-	gdouble fovy;
-	gdouble aspect;
-	gdouble znear;
-	gdouble zfar;
-
-	gboolean active_graphic_mode;
-	gboolean separated_screen;
-	gboolean show_floor;
-};
-
-struct _GstGLFilterReflectedScreenClass
-{
-	GstGLFilterClass filter_class;
-};
-
-GType gst_gl_filter_reflected_screen_get_type (void);
-
-G_END_DECLS
-
-#endif /* _GST_GLFILTERREFLECTEDSCREEN_H_ */
-
diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c
index 5da6ed4..e201f74 100644
--- a/ext/gl/gstglfiltershader.c
+++ b/ext/gl/gstglfiltershader.c
@@ -67,7 +67,7 @@
 
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_filtershader_debug, "glshader", 0, "glshader element");
-
+#define gst_gl_filtershader_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLFilterShader, gst_gl_filtershader,
     GST_TYPE_GL_FILTER, DEBUG_INIT);
 
@@ -75,7 +75,7 @@
     const GValue * value, GParamSpec * pspec);
 static void gst_gl_filtershader_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static void gst_gl_filter_filtershader_reset (GstGLFilter * filter);
+static gboolean gst_gl_filter_filtershader_reset (GstBaseTransform * trans);
 
 static gboolean gst_gl_filtershader_load_shader (GstGLFilterShader *
     filter_shader, char *filename, char **storage);
@@ -93,10 +93,16 @@
 static void
 gst_gl_filtershader_init_resources (GstGLFilter * filter)
 {
-  glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8,
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  guint internal_format;
+
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (context, GL_RGBA,
+      GL_UNSIGNED_BYTE);
+  glTexImage2D (GL_TEXTURE_2D, 0, internal_format,
       GST_VIDEO_INFO_WIDTH (&filter->out_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-      0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+      GST_VIDEO_INFO_HEIGHT (&filter->out_info), 0, GL_RGBA, GL_UNSIGNED_BYTE,
+      NULL);
   glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
   glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -140,6 +146,8 @@
       "OpenGL fragment shader filter", "Filter/Effect",
       "Load GLSL fragment shader from file", "<luc.deschenaux@freesurf.ch>");
 
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_filter_filtershader_reset;
+
   GST_GL_FILTER_CLASS (klass)->filter = gst_gl_filtershader_filter;
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_filtershader_filter_texture;
@@ -147,8 +155,10 @@
       gst_gl_filtershader_init_resources;
   GST_GL_FILTER_CLASS (klass)->display_reset_cb =
       gst_gl_filtershader_reset_resources;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filtershader_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_filtershader_reset;
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_filtershader_init_shader;
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
 }
 
 static void
@@ -157,15 +167,18 @@
   filtershader->shader0 = NULL;
 }
 
-static void
-gst_gl_filter_filtershader_reset (GstGLFilter * filter)
+static gboolean
+gst_gl_filter_filtershader_reset (GstBaseTransform * trans)
 {
-  GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (filter);
+  GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (trans);
 
   //blocking call, wait the opengl thread has destroyed the shader
   if (filtershader->shader0)
-    gst_gl_context_del_shader (filter->context, filtershader->shader0);
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+        filtershader->shader0);
   filtershader->shader0 = NULL;
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static void
@@ -182,8 +195,9 @@
         g_free (filtershader->filename);
       }
       if (filtershader->compiled) {
-        //gst_gl_context_del_shader (filtershader->filter.context, filtershader->shader0);
-        gst_gl_filter_filtershader_reset (&filtershader->filter);
+        if (filtershader->shader0)
+          gst_gl_context_del_shader (GST_GL_BASE_FILTER (filtershader)->context,
+              filtershader->shader0);
         filtershader->shader0 = 0;
       }
       filtershader->filename = g_strdup (g_value_get_string (value));
@@ -323,8 +337,8 @@
     return FALSE;
 
   //blocking call, wait the opengl thread has compiled the shader
-  if (!gst_gl_context_gen_shader (filter->context, text_vertex_shader,
-          hfilter_fragment_source, &filtershader->shader0))
+  if (!gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+          text_vertex_shader, hfilter_fragment_source, &filtershader->shader0))
     return FALSE;
 
 
@@ -392,26 +406,11 @@
 {
   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 };
-
-#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
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   gst_gl_shader_use (filtershader->shader0);
 
   gl->ActiveTexture (GL_TEXTURE0);
-  gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
 
   gst_gl_shader_set_uniform_1i (filtershader->shader0, "tex", 0);
@@ -420,10 +419,10 @@
   gst_gl_shader_set_uniform_1f (filtershader->shader0, "time",
       filtershader->time);
 
-  filtershader->attr_position_loc =
+  filter->draw_attr_position_loc =
       gst_gl_shader_get_attribute_location (filtershader->shader0,
       "a_position");
-  filtershader->attr_texture_loc =
+  filter->draw_attr_texture_loc =
       gst_gl_shader_get_attribute_location (filtershader->shader0,
       "a_texcoord");
 
@@ -442,19 +441,5 @@
 
   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);
+  gst_gl_filter_draw_texture (filter, texture, width, height);
 }
diff --git a/ext/gl/gstglfiltersobel.c b/ext/gl/gstglfiltersobel.c
deleted file mode 100644
index 538f96e..0000000
--- a/ext/gl/gstglfiltersobel.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008-2010 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-/**
- * SECTION:element-glfiltersobel.
- *
- * Sobel Edge Detection.
- *
- * <refsect2>
- * <title>Examples</title>
- * |[
- * gst-launch videotestsrc ! glupload ! glfiltersobel ! glimagesink
- * ]|
- * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstglfiltersobel.h"
-#include "effects/gstgleffectssources.h"
-
-enum
-{
-  PROP_0,
-  PROP_INVERT
-};
-
-#define GST_CAT_DEFAULT gst_gl_filtersobel_debug
-GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_filtersobel_debug, "glfiltersobel", 0, "glfiltersobel element");
-
-G_DEFINE_TYPE_WITH_CODE (GstGLFilterSobel, gst_gl_filtersobel,
-    GST_TYPE_GL_FILTER, DEBUG_INIT);
-
-static void gst_gl_filtersobel_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_gl_filtersobel_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-static void gst_gl_filter_filtersobel_reset (GstGLFilter * filter);
-
-static gboolean gst_gl_filtersobel_init_shader (GstGLFilter * filter);
-static gboolean gst_gl_filtersobel_filter_texture (GstGLFilter * filter,
-    guint in_tex, guint out_tex);
-
-static void gst_gl_filtersobel_length (gint width, gint height, guint texture,
-    gpointer stuff);
-
-static void
-gst_gl_filtersobel_init_resources (GstGLFilter * filter)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-  int i;
-
-  for (i = 0; i < 2; i++) {
-    gl->GenTextures (1, &filtersobel->midtexture[i]);
-    gl->BindTexture (GL_TEXTURE_2D, filtersobel->midtexture[i]);
-    gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8,
-        GST_VIDEO_INFO_WIDTH (&filter->out_info),
-        GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-        0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-  }
-}
-
-static void
-gst_gl_filtersobel_reset_resources (GstGLFilter * filter)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-  int i;
-
-  for (i = 0; i < 2; i++) {
-    gl->DeleteTextures (1, &filtersobel->midtexture[i]);
-  }
-}
-
-static void
-gst_gl_filtersobel_class_init (GstGLFilterSobelClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_gl_filtersobel_set_property;
-  gobject_class->get_property = gst_gl_filtersobel_get_property;
-
-  GST_GL_FILTER_CLASS (klass)->filter_texture =
-      gst_gl_filtersobel_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->display_init_cb =
-      gst_gl_filtersobel_init_resources;
-  GST_GL_FILTER_CLASS (klass)->display_reset_cb =
-      gst_gl_filtersobel_reset_resources;
-  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_filtersobel_init_shader;
-  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_filter_filtersobel_reset;
-
-  g_object_class_install_property (gobject_class,
-      PROP_INVERT,
-      g_param_spec_boolean ("invert",
-          "Invert the colors",
-          "Invert colors to get dark edges on bright background",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gst_element_class_set_metadata (element_class,
-      "Gstreamer OpenGL Sobel", "Filter/Effect/Video", "Sobel edge detection",
-      "Filippo Argiolas <filippo.argiolas@gmail.com>");
-}
-
-static void
-gst_gl_filtersobel_init (GstGLFilterSobel * filtersobel)
-{
-  int i;
-  filtersobel->hconv = NULL;
-  filtersobel->vconv = NULL;
-  filtersobel->invert = FALSE;
-  for (i = 0; i < 2; i++) {
-    filtersobel->midtexture[i] = 0;
-  }
-}
-
-static void
-gst_gl_filter_filtersobel_reset (GstGLFilter * filter)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-
-  //blocking call, wait the opengl thread has destroyed the shader
-  if (filtersobel->desat)
-    gst_gl_context_del_shader (filter->context, filtersobel->desat);
-  filtersobel->desat = NULL;
-
-  if (filtersobel->hconv)
-    gst_gl_context_del_shader (filter->context, filtersobel->hconv);
-  filtersobel->hconv = NULL;
-
-  if (filtersobel->vconv)
-    gst_gl_context_del_shader (filter->context, filtersobel->vconv);
-  filtersobel->vconv = NULL;
-
-  if (filtersobel->len)
-    gst_gl_context_del_shader (filter->context, filtersobel->len);
-  filtersobel->len = NULL;
-}
-
-static void
-gst_gl_filtersobel_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (object);
-
-  switch (prop_id) {
-    case PROP_INVERT:
-      filtersobel->invert = g_value_get_boolean (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_gl_filtersobel_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (object);
-
-  switch (prop_id) {
-    case PROP_INVERT:
-      g_value_set_boolean (value, filtersobel->invert);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_gl_filtersobel_init_shader (GstGLFilter * filter)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-  gboolean ret = TRUE;
-
-  //blocking call, wait the opengl thread has compiled the shader
-  ret =
-      gst_gl_context_gen_shader (filter->context, 0, desaturate_fragment_source,
-      &filtersobel->desat);
-  ret &=
-      gst_gl_context_gen_shader (filter->context, 0,
-      sep_sobel_hconv3_fragment_source, &filtersobel->hconv);
-  ret &=
-      gst_gl_context_gen_shader (filter->context, 0,
-      sep_sobel_vconv3_fragment_source, &filtersobel->vconv);
-  ret &=
-      gst_gl_context_gen_shader (filter->context, 0,
-      sep_sobel_length_fragment_source, &filtersobel->len);
-
-  return ret;
-}
-
-static gboolean
-gst_gl_filtersobel_filter_texture (GstGLFilter * filter, guint in_tex,
-    guint out_tex)
-{
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-
-  gst_gl_filter_render_to_target_with_shader (filter, TRUE, in_tex,
-      filtersobel->midtexture[0], filtersobel->desat);
-  gst_gl_filter_render_to_target_with_shader (filter, FALSE,
-      filtersobel->midtexture[0], filtersobel->midtexture[1],
-      filtersobel->hconv);
-  gst_gl_filter_render_to_target_with_shader (filter, FALSE,
-      filtersobel->midtexture[1], filtersobel->midtexture[0],
-      filtersobel->vconv);
-  gst_gl_filter_render_to_target (filter, FALSE, filtersobel->midtexture[0],
-      out_tex, gst_gl_filtersobel_length, filtersobel);
-
-  return TRUE;
-}
-
-static void
-gst_gl_filtersobel_length (gint width, gint height, guint texture,
-    gpointer stuff)
-{
-  GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
-  GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter);
-
-  glMatrixMode (GL_PROJECTION);
-  glLoadIdentity ();
-
-  gst_gl_shader_use (filtersobel->len);
-
-  gl->ActiveTexture (GL_TEXTURE1);
-  gl->Enable (GL_TEXTURE_2D);
-  gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
-
-  gst_gl_shader_set_uniform_1i (filtersobel->len, "tex", 1);
-  gst_gl_shader_set_uniform_1i (filtersobel->len, "invert",
-      filtersobel->invert);
-
-  gst_gl_filter_draw_texture (filter, texture, width, height);
-}
diff --git a/ext/gl/gstglfiltersobel.h b/ext/gl/gstglfiltersobel.h
deleted file mode 100644
index 3b88baf..0000000
--- a/ext/gl/gstglfiltersobel.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _GST_GL_FILTERSOBEL_H_
-#define _GST_GL_FILTERSOBEL_H_
-
-#include <gst/gl/gstglfilter.h>
-
-#define GST_TYPE_GL_FILTERSOBEL            (gst_gl_filtersobel_get_type())
-#define GST_GL_FILTERSOBEL(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTERSOBEL,GstGLFilterSobel))
-#define GST_IS_GL_FILTERSOBEL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FILTERSOBEL))
-#define GST_GL_FILTERSOBEL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_FILTERSOBEL,GstGLFilterSobelClass))
-#define GST_IS_GL_FILTERSOBEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTERSOBEL))
-#define GST_GL_FILTERSOBEL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTERSOBEL,GstGLFilterSobelClass))
-
-typedef struct _GstGLFilterSobel GstGLFilterSobel;
-typedef struct _GstGLFilterSobelClass GstGLFilterSobelClass;
-
-struct _GstGLFilterSobel
-{
-  GstGLFilter filter;
-  GstGLShader *hconv;
-  GstGLShader *vconv;
-  GstGLShader *len;
-  GstGLShader *desat;
-
-  GLuint midtexture[5];
-
-  gboolean invert;
-};
-
-struct _GstGLFilterSobelClass
-{
-  GstGLFilterClass filter_class;
-};
-
-GType gst_gl_filtersobel_get_type (void);
-
-#endif /* _GST_GL_FILTERSOBEL_H_ */
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index cd3a9ff..f629df7 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
  * Copyright (C) 2005,2006,2007 David A. Schleef <ds@schleef.org>
  * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -56,12 +57,12 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! "video/x-raw-rgb" ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw ! glimagesink
  * ]| A pipeline to test hardware scaling.
  * No special opengl extension is used in this pipeline, that's why it should work
  * with OpenGL >= 1.1. That's the case if you are using the MESA3D driver v1.3.
  * |[
- * gst-launch -v videotestsrc ! "video/x-raw-yuv, format=(fourcc)I420" ! glimagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw,format=I420 ! glimagesink
  * ]| A pipeline to test hardware scaling and hardware colorspace conversion.
  * When your driver supports GLSL (OpenGL Shading Language needs OpenGL >= 2.1),
  * the 4 following format YUY2, UYVY, I420, YV12 and AYUV are converted to RGB32
@@ -70,12 +71,12 @@
  * the you can use YUY2 and UYVY. In this case the colorspace conversion is automatically
  * made when loading the texture and therefore no framebuffer is used.
  * |[
- * gst-launch -v gltestsrc ! glimagesink
+ * gst-launch-1.0 -v gltestsrc ! glimagesink
  * ]| A pipeline 100% OpenGL.
  * No special opengl extension is used in this pipeline, that's why it should work
  * with OpenGL >= 1.1. That's the case if you are using the MESA3D driver v1.3.
  * |[
- * gst-plugins-gl/tests/examples/generic/cube
+ * gst-plugins-bas/tests/examples/gl/generic/cube
  * ]| The graphic FPS scene can be greater than the input video FPS.
  * The graphic scene can be written from a client code through the
  * two glfilterapp properties.
@@ -87,16 +88,179 @@
 #endif
 
 #include <gst/video/videooverlay.h>
+#include <gst/video/navigation.h>
 
 #include "gstglimagesink.h"
+#include "gstglsinkbin.h"
 
 #if GST_GL_HAVE_PLATFORM_EGL
 #include <gst/gl/egl/gsteglimagememory.h>
 #endif
 
+#include <gst/gl/gstglviewconvert.h>
+
 GST_DEBUG_CATEGORY (gst_debug_glimage_sink);
 #define GST_CAT_DEFAULT gst_debug_glimage_sink
 
+#define DEFAULT_SHOW_PREROLL_FRAME  TRUE
+#define DEFAULT_HANDLE_EVENTS       TRUE
+#define DEFAULT_FORCE_ASPECT_RATIO  TRUE
+#define DEFAULT_IGNORE_ALPHA        TRUE
+
+#define DEFAULT_MULTIVIEW_MODE GST_VIDEO_MULTIVIEW_MODE_MONO
+#define DEFAULT_MULTIVIEW_FLAGS GST_VIDEO_MULTIVIEW_FLAGS_NONE
+#define DEFAULT_MULTIVIEW_DOWNMIX GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS
+
+typedef GstGLSinkBin GstGLImageSinkBin;
+typedef GstGLSinkBinClass GstGLImageSinkBinClass;
+
+G_DEFINE_TYPE (GstGLImageSinkBin, gst_gl_image_sink_bin, GST_TYPE_GL_SINK_BIN);
+
+enum
+{
+  PROP_BIN_0,
+  PROP_BIN_FORCE_ASPECT_RATIO,
+  PROP_BIN_PIXEL_ASPECT_RATIO,
+  PROP_BIN_HANDLE_EVENTS,
+  PROP_BIN_CONTEXT,
+  PROP_BIN_IGNORE_ALPHA,
+  PROP_BIN_SHOW_PREROLL_FRAME,
+  PROP_BIN_OUTPUT_MULTIVIEW_LAYOUT,
+  PROP_BIN_OUTPUT_MULTIVIEW_FLAGS,
+  PROP_BIN_OUTPUT_MULTIVIEW_DOWNMIX_MODE
+};
+
+enum
+{
+  SIGNAL_BIN_0,
+  SIGNAL_BIN_CLIENT_DRAW,
+  SIGNAL_BIN_CLIENT_RESHAPE,
+  SIGNAL_BIN_LAST,
+};
+
+static guint gst_gl_image_sink_bin_signals[SIGNAL_BIN_LAST] = { 0 };
+
+static void
+gst_gl_image_sink_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec)
+{
+  g_object_set_property (G_OBJECT (GST_GL_SINK_BIN (object)->sink),
+      param_spec->name, value);
+}
+
+static void
+gst_gl_image_sink_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec)
+{
+  g_object_get_property (G_OBJECT (GST_GL_SINK_BIN (object)->sink),
+      param_spec->name, value);
+}
+
+static gboolean
+_on_client_reshape (GstGLImageSink * sink, GstGLContext * context,
+    guint width, guint height, gpointer data)
+{
+  gboolean ret;
+
+  g_signal_emit (data, gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_RESHAPE],
+      0, context, width, height, &ret);
+
+  return ret;
+}
+
+static gboolean
+_on_client_draw (GstGLImageSink * sink, GstGLContext * context,
+    GstSample * sample, gpointer data)
+{
+  gboolean ret;
+
+  g_signal_emit (data, gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW], 0,
+      context, sample, &ret);
+
+  return ret;
+}
+
+static void
+gst_gl_image_sink_bin_init (GstGLImageSinkBin * self)
+{
+  GstGLImageSink *sink = g_object_new (GST_TYPE_GLIMAGE_SINK, NULL);
+
+  g_signal_connect (sink, "client-reshape", (GCallback) _on_client_reshape,
+      self);
+  g_signal_connect (sink, "client-draw", (GCallback) _on_client_draw, self);
+
+  gst_gl_sink_bin_finish_init_with_element (GST_GL_SINK_BIN (self),
+      GST_ELEMENT (sink));
+}
+
+static void
+gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->get_property = gst_gl_image_sink_bin_get_property;
+  gobject_class->set_property = gst_gl_image_sink_bin_set_property;
+
+  /* gl sink */
+  g_object_class_install_property (gobject_class, PROP_BIN_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio",
+          DEFAULT_FORCE_ASPECT_RATIO,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_BIN_HANDLE_EVENTS,
+      g_param_spec_boolean ("handle-events", "Handle XEvents",
+          "When enabled, XEvents will be selected and handled",
+          DEFAULT_HANDLE_EVENTS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_BIN_IGNORE_ALPHA,
+      g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
+          "When enabled, alpha will be ignored and converted to black",
+          DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_BIN_CONTEXT,
+      g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
+          GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_BIN_PIXEL_ASPECT_RATIO,
+      gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
+          "The pixel aspect ratio of the device", 0, 1, G_MAXINT, 1, 1, 1,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* video sink */
+  g_object_class_install_property (gobject_class, PROP_BIN_SHOW_PREROLL_FRAME,
+      g_param_spec_boolean ("show-preroll-frame", "Show preroll frame",
+          "Whether to render video frames during preroll",
+          DEFAULT_SHOW_PREROLL_FRAME,
+          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class,
+      PROP_BIN_OUTPUT_MULTIVIEW_LAYOUT,
+      g_param_spec_enum ("output-multiview-mode", "Output Multiview Mode",
+          "Choose output mode for multiview/3D video",
+          GST_TYPE_VIDEO_MULTIVIEW_MODE, DEFAULT_MULTIVIEW_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class,
+      PROP_BIN_OUTPUT_MULTIVIEW_FLAGS,
+      g_param_spec_flags ("output-multiview-flags", "Output Multiview Flags",
+          "Output multiview layout modifier flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, DEFAULT_MULTIVIEW_FLAGS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class,
+      PROP_BIN_OUTPUT_MULTIVIEW_DOWNMIX_MODE,
+      g_param_spec_enum ("output-multiview-downmix-mode",
+          "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_MULTIVIEW_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW] =
+      g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+      0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 2,
+      GST_GL_TYPE_CONTEXT, GST_TYPE_SAMPLE);
+
+  gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_RESHAPE] =
+      g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
+}
+
 #define GST_GLIMAGE_SINK_GET_LOCK(glsink) \
   (GST_GLIMAGE_SINK(glsink)->drawing_lock)
 #define GST_GLIMAGE_SINK_LOCK(glsink) \
@@ -110,9 +274,10 @@
 #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
+#define SUPPORTED_GL_APIS GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3
+
 static void gst_glimage_sink_thread_init_redisplay (GstGLImageSink * gl_sink);
-#endif
+static void gst_glimage_sink_cleanup_glthread (GstGLImageSink * gl_sink);
 static void gst_glimage_sink_on_close (GstGLImageSink * gl_sink);
 static void gst_glimage_sink_on_resize (GstGLImageSink * gl_sink,
     gint width, gint height);
@@ -125,8 +290,6 @@
 static void gst_glimage_sink_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * param_spec);
 
-static gboolean gst_glimage_sink_stop (GstBaseSink * bsink);
-
 static gboolean gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query);
 static void gst_glimage_sink_set_context (GstElement * element,
     GstContext * context);
@@ -137,6 +300,8 @@
 static void gst_glimage_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
     GstClockTime * start, GstClockTime * end);
 static gboolean gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
+static GstCaps *gst_glimage_sink_get_caps (GstBaseSink * bsink,
+    GstCaps * filter);
 static GstFlowReturn gst_glimage_sink_prepare (GstBaseSink * bsink,
     GstBuffer * buf);
 static GstFlowReturn gst_glimage_sink_show_frame (GstVideoSink * bsink,
@@ -149,22 +314,24 @@
 static void gst_glimage_sink_set_window_handle (GstVideoOverlay * overlay,
     guintptr id);
 static void gst_glimage_sink_expose (GstVideoOverlay * overlay);
+static void gst_glimage_sink_set_render_rectangle (GstVideoOverlay * overlay,
+    gint x, gint y, gint width, gint height);
+static void gst_glimage_sink_handle_events (GstVideoOverlay * overlay,
+    gboolean handle_events);
+static gboolean update_output_format (GstGLImageSink * glimage_sink);
+
+#define GST_GL_SINK_CAPS \
+    GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")
+
+#define GST_GL_SINK_OVERLAY_CAPS \
+    GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY "," \
+            GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, "RGBA")
 
 static GstStaticPadTemplate gst_glimage_sink_template =
     GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-#if GST_GL_HAVE_PLATFORM_EGL
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, "RGBA") "; "
-#endif
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
-            "RGBA") "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
-    );
+    GST_STATIC_CAPS (GST_GL_SINK_CAPS ";" GST_GL_SINK_OVERLAY_CAPS));
 
 enum
 {
@@ -172,7 +339,12 @@
   ARG_DISPLAY,
   PROP_FORCE_ASPECT_RATIO,
   PROP_PIXEL_ASPECT_RATIO,
-  PROP_OTHER_CONTEXT
+  PROP_CONTEXT,
+  PROP_HANDLE_EVENTS,
+  PROP_IGNORE_ALPHA,
+  PROP_OUTPUT_MULTIVIEW_LAYOUT,
+  PROP_OUTPUT_MULTIVIEW_FLAGS,
+  PROP_OUTPUT_MULTIVIEW_DOWNMIX_MODE
 };
 
 enum
@@ -185,10 +357,97 @@
 
 static guint gst_glimage_sink_signals[LAST_SIGNAL] = { 0 };
 
+static void
+_display_size_to_stream_size (GstGLImageSink * gl_sink, gdouble x,
+    gdouble y, gdouble * stream_x, gdouble * stream_y)
+{
+  gdouble stream_width, stream_height;
+
+  stream_width = (gdouble) GST_VIDEO_INFO_WIDTH (&gl_sink->out_info);
+  stream_height = (gdouble) GST_VIDEO_INFO_HEIGHT (&gl_sink->out_info);
+
+  /* from display coordinates to stream coordinates */
+  if (gl_sink->display_rect.w > 0)
+    *stream_x =
+        (x - gl_sink->display_rect.x) / gl_sink->display_rect.w * stream_width;
+  else
+    *stream_x = 0.;
+
+  /* clip to stream size */
+  if (*stream_x < 0.)
+    *stream_x = 0.;
+  if (*stream_x > GST_VIDEO_INFO_WIDTH (&gl_sink->out_info))
+    *stream_x = GST_VIDEO_INFO_WIDTH (&gl_sink->out_info);
+
+  /* same for y-axis */
+  if (gl_sink->display_rect.h > 0)
+    *stream_y =
+        (y - gl_sink->display_rect.y) / gl_sink->display_rect.h * stream_height;
+  else
+    *stream_y = 0.;
+
+  if (*stream_y < 0.)
+    *stream_y = 0.;
+  if (*stream_y > GST_VIDEO_INFO_HEIGHT (&gl_sink->out_info))
+    *stream_y = GST_VIDEO_INFO_HEIGHT (&gl_sink->out_info);
+
+  GST_TRACE ("transform %fx%f into %fx%f", x, y, *stream_x, *stream_y);
+}
+
+static void
+gst_glimage_sink_navigation_send_event (GstNavigation * navigation, GstStructure
+    * structure)
+{
+  GstGLImageSink *sink = GST_GLIMAGE_SINK (navigation);
+  GstEvent *event = NULL;
+  GstPad *pad = NULL;
+  GstGLWindow *window;
+  guint width, height;
+  gdouble x, y;
+
+  if (!sink->context)
+    return;
+
+  window = gst_gl_context_get_window (sink->context);
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+
+  width = GST_VIDEO_SINK_WIDTH (sink);
+  height = GST_VIDEO_SINK_HEIGHT (sink);
+  gst_gl_window_get_surface_dimensions (window, &width, &height);
+
+  event = gst_event_new_navigation (structure);
+
+  pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink));
+  /* Converting pointer coordinates to the non scaled geometry */
+  if (width != 0 && gst_structure_get_double (structure, "pointer_x", &x)
+      && height != 0 && gst_structure_get_double (structure, "pointer_y", &y)) {
+    gdouble stream_x, stream_y;
+
+    _display_size_to_stream_size (sink, x, y, &stream_x, &stream_y);
+
+    gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE,
+        stream_x, "pointer_y", G_TYPE_DOUBLE, stream_y, NULL);
+  }
+
+  if (GST_IS_PAD (pad) && GST_IS_EVENT (event))
+    gst_pad_send_event (pad, event);
+
+  gst_object_unref (pad);
+  gst_object_unref (window);
+}
+
+static void
+gst_glimage_sink_navigation_interface_init (GstNavigationInterface * iface)
+{
+  iface->send_event = gst_glimage_sink_navigation_send_event;
+}
+
 #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,
         gst_glimage_sink_video_overlay_init);
+    G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
+        gst_glimage_sink_navigation_interface_init);
     GST_DEBUG_CATEGORY_INIT (gst_debug_glimage_sink, "glimagesink", 0,
         "OpenGL Video Sink"));
 
@@ -210,14 +469,10 @@
   gobject_class->set_property = gst_glimage_sink_set_property;
   gobject_class->get_property = gst_glimage_sink_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_DISPLAY,
-      g_param_spec_string ("display", "Display", "Display name",
-          NULL, G_PARAM_READWRITE | 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",
-          "When enabled, scaling will respect original aspect ratio", TRUE,
+      g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio",
+          DEFAULT_FORCE_ASPECT_RATIO,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
@@ -225,11 +480,39 @@
           "The pixel aspect ratio of the device", 0, 1, G_MAXINT, 1, 1, 1,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, PROP_OTHER_CONTEXT,
-      g_param_spec_object ("other-context",
-          "External OpenGL context",
-          "Give an external OpenGL context with which to share textures",
-          GST_GL_TYPE_CONTEXT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_CONTEXT,
+      g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
+          GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
+      g_param_spec_boolean ("handle-events", "Handle XEvents",
+          "When enabled, XEvents will be selected and handled",
+          DEFAULT_HANDLE_EVENTS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA,
+      g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
+          "When enabled, alpha will be ignored and converted to black",
+          DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_MULTIVIEW_LAYOUT,
+      g_param_spec_enum ("output-multiview-mode",
+          "Output Multiview Mode",
+          "Choose output mode for multiview/3D video",
+          GST_TYPE_VIDEO_MULTIVIEW_MODE, DEFAULT_MULTIVIEW_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_MULTIVIEW_FLAGS,
+      g_param_spec_flags ("output-multiview-flags",
+          "Output Multiview Flags",
+          "Output multiview layout modifier flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, DEFAULT_MULTIVIEW_FLAGS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class,
+      PROP_OUTPUT_MULTIVIEW_DOWNMIX_MODE,
+      g_param_spec_enum ("output-multiview-downmix-mode",
+          "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_MULTIVIEW_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gst_element_class_set_metadata (element_class, "OpenGL video sink",
       "Sink/Video", "A videosink based on OpenGL",
@@ -252,7 +535,7 @@
   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);
+      G_TYPE_BOOLEAN, 2, GST_GL_TYPE_CONTEXT, GST_TYPE_SAMPLE);
 
   /**
    * GstGLImageSink::client-reshape:
@@ -269,7 +552,7 @@
   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);
+      G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
 
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&gst_glimage_sink_template));
@@ -280,10 +563,10 @@
   gstelement_class->set_context = gst_glimage_sink_set_context;
   gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_glimage_sink_query);
   gstbasesink_class->set_caps = gst_glimage_sink_set_caps;
+  gstbasesink_class->get_caps = gst_glimage_sink_get_caps;
   gstbasesink_class->get_times = gst_glimage_sink_get_times;
   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);
@@ -292,16 +575,20 @@
 static void
 gst_glimage_sink_init (GstGLImageSink * glimage_sink)
 {
-  glimage_sink->display_name = NULL;
   glimage_sink->window_id = 0;
   glimage_sink->new_window_id = 0;
   glimage_sink->display = NULL;
   glimage_sink->keep_aspect_ratio = TRUE;
   glimage_sink->par_n = 0;
   glimage_sink->par_d = 1;
-  glimage_sink->pool = NULL;
-  glimage_sink->stored_buffer = NULL;
   glimage_sink->redisplay_texture = 0;
+  glimage_sink->handle_events = TRUE;
+  glimage_sink->ignore_alpha = TRUE;
+  glimage_sink->overlay_compositor = NULL;
+
+  glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE;
+  glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS;
+  glimage_sink->mview_downmix_mode = DEFAULT_MULTIVIEW_DOWNMIX;
 
   g_mutex_init (&glimage_sink->drawing_lock);
 }
@@ -317,12 +604,6 @@
   glimage_sink = GST_GLIMAGE_SINK (object);
 
   switch (prop_id) {
-    case ARG_DISPLAY:
-    {
-      g_free (glimage_sink->display_name);
-      glimage_sink->display_name = g_strdup (g_value_get_string (value));
-      break;
-    }
     case PROP_FORCE_ASPECT_RATIO:
     {
       glimage_sink->keep_aspect_ratio = g_value_get_boolean (value);
@@ -334,13 +615,31 @@
       glimage_sink->par_d = gst_value_get_fraction_denominator (value);
       break;
     }
-    case PROP_OTHER_CONTEXT:
-    {
-      if (glimage_sink->other_context)
-        gst_object_unref (glimage_sink->other_context);
-      glimage_sink->other_context = g_value_dup_object (value);
+    case PROP_HANDLE_EVENTS:
+      gst_glimage_sink_handle_events (GST_VIDEO_OVERLAY (glimage_sink),
+          g_value_get_boolean (value));
       break;
-    }
+    case PROP_IGNORE_ALPHA:
+      glimage_sink->ignore_alpha = g_value_get_boolean (value);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_LAYOUT:
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
+      glimage_sink->mview_output_mode = g_value_get_enum (value);
+      glimage_sink->output_mode_changed = TRUE;
+      GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_FLAGS:
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
+      glimage_sink->mview_output_flags = g_value_get_flags (value);
+      glimage_sink->output_mode_changed = TRUE;
+      GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_DOWNMIX_MODE:
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
+      glimage_sink->mview_downmix_mode = g_value_get_enum (value);
+      glimage_sink->output_mode_changed = TRUE;
+      GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -355,16 +654,8 @@
   g_return_if_fail (GST_IS_GLIMAGE_SINK (object));
 
   glimage_sink = GST_GLIMAGE_SINK (object);
-
   g_mutex_clear (&glimage_sink->drawing_lock);
 
-  if (glimage_sink->other_context) {
-    gst_object_unref (glimage_sink->other_context);
-    glimage_sink->other_context = NULL;
-  }
-
-  g_free (glimage_sink->display_name);
-
   GST_DEBUG ("finalized");
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -380,17 +671,29 @@
   glimage_sink = GST_GLIMAGE_SINK (object);
 
   switch (prop_id) {
-    case ARG_DISPLAY:
-      g_value_set_string (value, glimage_sink->display_name);
-      break;
     case PROP_FORCE_ASPECT_RATIO:
       g_value_set_boolean (value, glimage_sink->keep_aspect_ratio);
       break;
     case PROP_PIXEL_ASPECT_RATIO:
       gst_value_set_fraction (value, glimage_sink->par_n, glimage_sink->par_d);
       break;
-    case PROP_OTHER_CONTEXT:
-      g_value_set_object (value, glimage_sink->other_context);
+    case PROP_CONTEXT:
+      g_value_set_object (value, glimage_sink->context);
+      break;
+    case PROP_HANDLE_EVENTS:
+      g_value_set_boolean (value, glimage_sink->handle_events);
+      break;
+    case PROP_IGNORE_ALPHA:
+      g_value_set_boolean (value, glimage_sink->ignore_alpha);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_LAYOUT:
+      g_value_set_enum (value, glimage_sink->mview_output_mode);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_FLAGS:
+      g_value_set_flags (value, glimage_sink->mview_output_flags);
+      break;
+    case PROP_OUTPUT_MULTIVIEW_DOWNMIX_MODE:
+      g_value_set_enum (value, glimage_sink->mview_downmix_mode);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -398,66 +701,130 @@
   }
 }
 
+static void
+gst_glimage_sink_key_event_cb (GstGLWindow * window, char *event_name, char
+    *key_string, GstGLImageSink * gl_sink)
+{
+  GST_DEBUG_OBJECT (gl_sink, "glimagesink event %s key %s pressed", event_name,
+      key_string);
+  gst_navigation_send_key_event (GST_NAVIGATION (gl_sink),
+      event_name, key_string);
+}
+
+static void
+gst_glimage_sink_mouse_event_cb (GstGLWindow * window, char *event_name,
+    int button, double posx, double posy, GstGLImageSink * gl_sink)
+{
+  GST_DEBUG_OBJECT (gl_sink, "glimagesink event %s at %g, %g", event_name, posx,
+      posy);
+  gst_navigation_send_mouse_event (GST_NAVIGATION (gl_sink),
+      event_name, button, posx, posy);
+}
+
 static gboolean
 _ensure_gl_setup (GstGLImageSink * gl_sink)
 {
   GError *error = NULL;
 
-  if (!gst_gl_ensure_display (gl_sink, &gl_sink->display))
-    return FALSE;
+  GST_TRACE_OBJECT (gl_sink, "Ensuring setup");
 
   if (!gl_sink->context) {
-    GstGLWindow *window;
+    GST_OBJECT_LOCK (gl_sink->display);
+    do {
+      GstGLContext *other_context = NULL;
+      GstGLWindow *window = NULL;
 
-    gl_sink->context = gst_gl_context_new (gl_sink->display);
-    if (!gl_sink->context)
-      goto context_creation_error;
+      if (gl_sink->context) {
+        gst_object_unref (gl_sink->context);
+        gl_sink->context = NULL;
+      }
 
-    window = gst_gl_context_get_window (gl_sink->context);
+      GST_DEBUG_OBJECT (gl_sink,
+          "No current context, creating one for %" GST_PTR_FORMAT,
+          gl_sink->display);
 
-    if (!gl_sink->window_id && !gl_sink->new_window_id)
-      gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (gl_sink));
+      if (gl_sink->other_context) {
+        other_context = gst_object_ref (gl_sink->other_context);
+      } else {
+        other_context =
+            gst_gl_display_get_gl_context_for_thread (gl_sink->display, NULL);
+      }
 
-    if (gl_sink->window_id != gl_sink->new_window_id) {
-      gl_sink->window_id = gl_sink->new_window_id;
-      gst_gl_window_set_window_handle (window, gl_sink->window_id);
-    }
+      if (!gst_gl_display_create_context (gl_sink->display,
+              other_context, &gl_sink->context, &error)) {
+        if (other_context)
+          gst_object_unref (other_context);
+        GST_OBJECT_UNLOCK (gl_sink->display);
+        goto context_error;
+      }
 
-    if (!gst_gl_context_create (gl_sink->context, gl_sink->other_context,
-            &error)) {
+      GST_DEBUG_OBJECT (gl_sink,
+          "created context %" GST_PTR_FORMAT " from other context %"
+          GST_PTR_FORMAT, gl_sink->context, gl_sink->other_context);
+
+      window = gst_gl_context_get_window (gl_sink->context);
+
+      GST_DEBUG_OBJECT (gl_sink, "got window %" GST_PTR_FORMAT, window);
+
+      if (!gl_sink->window_id && !gl_sink->new_window_id)
+        gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (gl_sink));
+
+      GST_DEBUG_OBJECT (gl_sink,
+          "window_id : %" G_GUINTPTR_FORMAT " , new_window_id : %"
+          G_GUINTPTR_FORMAT, gl_sink->window_id, gl_sink->new_window_id);
+
+      if (gl_sink->window_id != gl_sink->new_window_id) {
+        gl_sink->window_id = gl_sink->new_window_id;
+        GST_DEBUG_OBJECT (gl_sink, "Setting window handle on gl window");
+        gst_gl_window_set_window_handle (window, gl_sink->window_id);
+      }
+
+      gst_gl_window_handle_events (window, gl_sink->handle_events);
+
+      /* setup callbacks */
+      gst_gl_window_set_resize_callback (window,
+          GST_GL_WINDOW_RESIZE_CB (gst_glimage_sink_on_resize),
+          gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
+      gst_gl_window_set_draw_callback (window,
+          GST_GL_WINDOW_CB (gst_glimage_sink_on_draw),
+          gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
+      gst_gl_window_set_close_callback (window,
+          GST_GL_WINDOW_CB (gst_glimage_sink_on_close),
+          gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
+      gl_sink->key_sig_id = g_signal_connect (window, "key-event", G_CALLBACK
+          (gst_glimage_sink_key_event_cb), gl_sink);
+      gl_sink->mouse_sig_id =
+          g_signal_connect (window, "mouse-event",
+          G_CALLBACK (gst_glimage_sink_mouse_event_cb), gl_sink);
+
+      if (gl_sink->x >= 0 && gl_sink->y >= 0 && gl_sink->width > 0 &&
+          gl_sink->height > 0) {
+        gst_gl_window_set_render_rectangle (window, gl_sink->x, gl_sink->y,
+            gl_sink->width, gl_sink->height);
+      }
+
+      if (other_context)
+        gst_object_unref (other_context);
       gst_object_unref (window);
-      goto context_error;
-    }
-
-    /* setup callbacks */
-    gst_gl_window_set_resize_callback (window,
-        GST_GL_WINDOW_RESIZE_CB (gst_glimage_sink_on_resize),
-        gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
-    gst_gl_window_set_draw_callback (window,
-        GST_GL_WINDOW_CB (gst_glimage_sink_on_draw),
-        gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
-    gst_gl_window_set_close_callback (window,
-        GST_GL_WINDOW_CB (gst_glimage_sink_on_close),
-        gst_object_ref (gl_sink), (GDestroyNotify) gst_object_unref);
-
-    gst_object_unref (window);
-  }
+    } while (!gst_gl_display_add_context (gl_sink->display, gl_sink->context));
+    GST_OBJECT_UNLOCK (gl_sink->display);
+  } else
+    GST_TRACE_OBJECT (gl_sink, "Already have a context");
 
   return TRUE;
 
-context_creation_error:
-  {
-    GST_ELEMENT_ERROR (gl_sink, RESOURCE, NOT_FOUND,
-        ("Failed to create GL context"), (NULL));
-    return FALSE;
-  }
-
 context_error:
   {
     GST_ELEMENT_ERROR (gl_sink, RESOURCE, NOT_FOUND, ("%s", error->message),
         (NULL));
-    gst_object_unref (gl_sink->context);
-    gl_sink->context = NULL;
+
+    if (gl_sink->context) {
+      gst_object_unref (gl_sink->context);
+      gl_sink->context = NULL;
+    }
+
+    g_clear_error (&error);
+
     return FALSE;
   }
 }
@@ -471,8 +838,62 @@
   switch (GST_QUERY_TYPE (query)) {
     case GST_QUERY_CONTEXT:
     {
-      return gst_gl_handle_context_query ((GstElement *) glimage_sink, query,
-          &glimage_sink->display);
+      const gchar *context_type;
+      GstContext *context, *old_context;
+
+      res = gst_gl_handle_context_query ((GstElement *) glimage_sink, query,
+          &glimage_sink->display, &glimage_sink->other_context);
+      if (glimage_sink->display)
+        gst_gl_display_filter_gl_api (glimage_sink->display, SUPPORTED_GL_APIS);
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT,
+            glimage_sink->context, NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        res = glimage_sink->context != NULL;
+      }
+      GST_LOG_OBJECT (glimage_sink, "context query of type %s %i", context_type,
+          res);
+
+      if (res)
+        return res;
+      break;
+    }
+    case GST_QUERY_DRAIN:
+    {
+      GstBuffer *buf[2];
+
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
+      glimage_sink->redisplay_texture = 0;
+      buf[0] = glimage_sink->stored_buffer[0];
+      buf[1] = glimage_sink->stored_buffer[1];
+      glimage_sink->stored_buffer[0] = glimage_sink->stored_buffer[1] = NULL;
+      GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+
+      gst_buffer_replace (buf, NULL);
+      gst_buffer_replace (buf + 1, NULL);
+
+      gst_buffer_replace (&glimage_sink->input_buffer, NULL);
+      gst_buffer_replace (&glimage_sink->input_buffer2, NULL);
+      gst_buffer_replace (&glimage_sink->next_buffer, NULL);
+      gst_buffer_replace (&glimage_sink->next_buffer2, NULL);
+      gst_buffer_replace (&glimage_sink->next_sync, NULL);
+
+      res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
       break;
     }
     default:
@@ -484,39 +905,15 @@
 }
 
 static void
-gst_glimage_sink_cleanup_glthread (GstGLImageSink * gl_sink)
-{
-#if GST_GL_HAVE_GLES2
-  if (gl_sink->redisplay_shader) {
-    gst_object_unref (gl_sink->redisplay_shader);
-    gl_sink->redisplay_shader = NULL;
-  }
-#endif
-}
-
-/*
- * GstElement methods
- */
-
-static gboolean
-gst_glimage_sink_stop (GstBaseSink * bsink)
-{
-  GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (bsink);
-
-  if (glimage_sink->pool) {
-    gst_object_unref (glimage_sink->pool);
-    glimage_sink->pool = NULL;
-  }
-
-  return TRUE;
-}
-
-static void
 gst_glimage_sink_set_context (GstElement * element, GstContext * context)
 {
   GstGLImageSink *gl_sink = GST_GLIMAGE_SINK (element);
 
-  gst_gl_handle_set_context (element, context, &gl_sink->display);
+  gst_gl_handle_set_context (element, context, &gl_sink->display,
+      &gl_sink->other_context);
+
+  if (gl_sink->display)
+    gst_gl_display_filter_gl_api (gl_sink->display, SUPPORTED_GL_APIS);
 }
 
 static GstStateChangeReturn
@@ -533,13 +930,20 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_gl_ensure_element_data (glimage_sink, &glimage_sink->display,
+              &glimage_sink->other_context))
+        return GST_STATE_CHANGE_FAILURE;
+
+      gst_gl_display_filter_gl_api (glimage_sink->display, SUPPORTED_GL_APIS);
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
+      if (!_ensure_gl_setup (glimage_sink))
+        return GST_STATE_CHANGE_FAILURE;
+
+      glimage_sink->overlay_compositor =
+          gst_gl_overlay_compositor_new (glimage_sink->context);
+
       g_atomic_int_set (&glimage_sink->to_quit, 0);
-      if (!glimage_sink->display) {
-        if (!gst_gl_ensure_display (glimage_sink, &glimage_sink->display))
-          return GST_STATE_CHANGE_FAILURE;
-      }
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
@@ -556,33 +960,44 @@
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
     {
+      GstBuffer *buf[2];
+
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
       /* mark the redisplay_texture as unavailable (=0)
        * to avoid drawing
        */
-      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;
-      }
+      buf[0] = glimage_sink->stored_buffer[0];
+      buf[1] = glimage_sink->stored_buffer[1];
+      glimage_sink->stored_buffer[0] = glimage_sink->stored_buffer[1] = NULL;
+
+      if (glimage_sink->stored_sync)
+        gst_buffer_unref (glimage_sink->stored_sync);
+      glimage_sink->stored_sync = NULL;
+
       GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
 
-      if (glimage_sink->upload) {
-        gst_object_unref (glimage_sink->upload);
-        glimage_sink->upload = NULL;
-      }
+      gst_buffer_replace (buf, NULL);
+      gst_buffer_replace (buf + 1, NULL);
+
+      gst_object_replace ((GstObject **) & glimage_sink->convert_views, NULL);
+      gst_buffer_replace (&glimage_sink->input_buffer, NULL);
+      gst_buffer_replace (&glimage_sink->input_buffer2, NULL);
+      gst_buffer_replace (&glimage_sink->next_buffer, NULL);
+      gst_buffer_replace (&glimage_sink->next_buffer2, NULL);
+      gst_buffer_replace (&glimage_sink->next_sync, NULL);
 
       glimage_sink->window_id = 0;
-      //but do not reset glimage_sink->new_window_id
-
-      if (glimage_sink->pool) {
-        gst_buffer_pool_set_active (glimage_sink->pool, FALSE);
-        gst_object_unref (glimage_sink->pool);
-        glimage_sink->pool = NULL;
-      }
+      /* but do not reset glimage_sink->new_window_id */
 
       GST_VIDEO_SINK_WIDTH (glimage_sink) = 1;
       GST_VIDEO_SINK_HEIGHT (glimage_sink) = 1;
+      /* Clear cached caps */
+      if (glimage_sink->out_caps) {
+        gst_caps_unref (glimage_sink->out_caps);
+        glimage_sink->out_caps = NULL;
+      }
+
       if (glimage_sink->context) {
         GstGLWindow *window = gst_gl_context_get_window (glimage_sink->context);
 
@@ -593,19 +1008,33 @@
         gst_gl_window_set_draw_callback (window, NULL, NULL, NULL);
         gst_gl_window_set_close_callback (window, NULL, NULL, NULL);
 
+        if (glimage_sink->key_sig_id)
+          g_signal_handler_disconnect (window, glimage_sink->key_sig_id);
+        glimage_sink->key_sig_id = 0;
+        if (glimage_sink->mouse_sig_id)
+          g_signal_handler_disconnect (window, glimage_sink->mouse_sig_id);
+        glimage_sink->mouse_sig_id = 0;
+
+        gst_object_unref (glimage_sink->overlay_compositor);
+        glimage_sink->overlay_compositor = NULL;
+
         gst_object_unref (window);
         gst_object_unref (glimage_sink->context);
         glimage_sink->context = NULL;
       }
+      break;
+    }
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      if (glimage_sink->other_context) {
+        gst_object_unref (glimage_sink->other_context);
+        glimage_sink->other_context = NULL;
+      }
 
       if (glimage_sink->display) {
         gst_object_unref (glimage_sink->display);
         glimage_sink->display = NULL;
       }
       break;
-    }
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      break;
     default:
       break;
   }
@@ -626,43 +1055,57 @@
     if (GST_BUFFER_DURATION_IS_VALID (buf))
       *end = *start + GST_BUFFER_DURATION (buf);
     else {
-      if (GST_VIDEO_INFO_FPS_N (&glimagesink->info) > 0) {
+      if (GST_VIDEO_INFO_FPS_N (&glimagesink->out_info) > 0) {
         *end = *start +
             gst_util_uint64_scale_int (GST_SECOND,
-            GST_VIDEO_INFO_FPS_D (&glimagesink->info),
-            GST_VIDEO_INFO_FPS_N (&glimagesink->info));
+            GST_VIDEO_INFO_FPS_D (&glimagesink->out_info),
+            GST_VIDEO_INFO_FPS_N (&glimagesink->out_info));
       }
     }
   }
 }
 
-static gboolean
-gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+static GstCaps *
+gst_glimage_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
 {
-  GstGLImageSink *glimage_sink;
+  GstCaps *tmp = NULL;
+  GstCaps *result = NULL;
+
+  tmp = gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink));
+
+  if (filter) {
+    GST_DEBUG_OBJECT (bsink, "intersecting with filter caps %" GST_PTR_FORMAT,
+        filter);
+
+    result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+  } else {
+    result = tmp;
+  }
+
+  result = gst_gl_overlay_compositor_add_caps (result);
+
+  GST_DEBUG_OBJECT (bsink, "returning caps: %" GST_PTR_FORMAT, result);
+
+  return result;
+}
+
+static gboolean
+configure_display_from_info (GstGLImageSink * glimage_sink,
+    GstVideoInfo * vinfo)
+{
   gint width;
   gint height;
   gboolean ok;
   gint par_n, par_d;
   gint display_par_n, display_par_d;
   guint display_ratio_num, display_ratio_den;
-  GstVideoInfo vinfo;
-  GstStructure *structure;
-  GstBufferPool *newpool, *oldpool;
 
-  GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps);
+  width = GST_VIDEO_INFO_WIDTH (vinfo);
+  height = GST_VIDEO_INFO_HEIGHT (vinfo);
 
-  glimage_sink = GST_GLIMAGE_SINK (bsink);
-
-  ok = gst_video_info_from_caps (&vinfo, caps);
-  if (!ok)
-    return FALSE;
-
-  width = GST_VIDEO_INFO_WIDTH (&vinfo);
-  height = GST_VIDEO_INFO_HEIGHT (&vinfo);
-
-  par_n = GST_VIDEO_INFO_PAR_N (&vinfo);
-  par_d = GST_VIDEO_INFO_PAR_D (&vinfo);
+  par_n = GST_VIDEO_INFO_PAR_N (vinfo);
+  par_d = GST_VIDEO_INFO_PAR_D (vinfo);
 
   if (!par_n)
     par_n = 1;
@@ -707,42 +1150,233 @@
   GST_DEBUG ("scaling to %dx%d", GST_VIDEO_SINK_WIDTH (glimage_sink),
       GST_VIDEO_SINK_HEIGHT (glimage_sink));
 
-  glimage_sink->info = vinfo;
+  return TRUE;
+}
+
+/* Called with GST_GLIMAGE_SINK lock held, to
+ * copy in_info to out_info and update out_caps */
+static gboolean
+update_output_format (GstGLImageSink * glimage_sink)
+{
+  GstVideoInfo *out_info = &glimage_sink->out_info;
+  gboolean input_is_mono = FALSE;
+  GstVideoMultiviewMode mv_mode;
+  GstGLWindow *window = NULL;
+  gboolean ret;
+
+  *out_info = glimage_sink->in_info;
+
+  mv_mode = GST_VIDEO_INFO_MULTIVIEW_MODE (&glimage_sink->in_info);
+
+  if (mv_mode == GST_VIDEO_MULTIVIEW_MODE_NONE ||
+      mv_mode == GST_VIDEO_MULTIVIEW_MODE_MONO ||
+      mv_mode == GST_VIDEO_MULTIVIEW_MODE_LEFT ||
+      mv_mode == GST_VIDEO_MULTIVIEW_MODE_RIGHT)
+    input_is_mono = TRUE;
+
+  if (input_is_mono == FALSE &&
+      glimage_sink->mview_output_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+    /* Input is multiview, and output wants a conversion - configure 3d converter now,
+     * otherwise defer it until either the caps or the 3D output mode changes */
+    gst_video_multiview_video_info_change_mode (out_info,
+        glimage_sink->mview_output_mode, glimage_sink->mview_output_flags);
+
+    if (glimage_sink->convert_views == NULL) {
+      glimage_sink->convert_views = gst_gl_view_convert_new ();
+      gst_gl_view_convert_set_context (glimage_sink->convert_views,
+          glimage_sink->context);
+    }
+  } else {
+    if (glimage_sink->convert_views) {
+      gst_object_unref (glimage_sink->convert_views);
+      glimage_sink->convert_views = NULL;
+    }
+  }
+
+  ret = configure_display_from_info (glimage_sink, out_info);
+
+  if (glimage_sink->convert_views) {
+    /* Match actual output window size for pixel-aligned output,
+     * even though we can't necessarily match the starting left/right
+     * view parity properly */
+    glimage_sink->out_info.width = MAX (1, glimage_sink->display_rect.w);
+    glimage_sink->out_info.height = MAX (1, glimage_sink->display_rect.h);
+    GST_LOG_OBJECT (glimage_sink, "Set 3D output scale to %d,%d",
+        glimage_sink->display_rect.w, glimage_sink->display_rect.h);
+
+    GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+    gst_gl_view_convert_set_format (glimage_sink->convert_views,
+        &glimage_sink->in_info, &glimage_sink->out_info);
+    g_object_set (glimage_sink->convert_views, "downmix-mode",
+        glimage_sink->mview_downmix_mode, NULL);
+    GST_GLIMAGE_SINK_LOCK (glimage_sink);
+  }
+
+  glimage_sink->output_mode_changed = FALSE;
+
+  if (glimage_sink->context)
+    window = gst_gl_context_get_window (glimage_sink->context);
+  if (window) {
+    gst_gl_window_queue_resize (window);
+    gst_object_unref (window);
+  }
+
+  if (glimage_sink->out_caps)
+    gst_caps_unref (glimage_sink->out_caps);
+  glimage_sink->out_caps = gst_video_info_to_caps (out_info);
+
+  return ret;
+}
+
+static gboolean
+gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstGLImageSink *glimage_sink;
+  gboolean ok;
+  GstVideoInfo vinfo;
+
+  GST_DEBUG_OBJECT (bsink, "set caps with %" GST_PTR_FORMAT, caps);
+
+  glimage_sink = GST_GLIMAGE_SINK (bsink);
+
+  ok = gst_video_info_from_caps (&vinfo, caps);
+  if (!ok)
+    return FALSE;
+
   if (!_ensure_gl_setup (glimage_sink))
     return FALSE;
 
-  newpool = gst_gl_buffer_pool_new (glimage_sink->context);
-  structure = gst_buffer_pool_get_config (newpool);
-  gst_buffer_pool_config_set_params (structure, caps, vinfo.size, 2, 0);
-  gst_buffer_pool_set_config (newpool, structure);
+  GST_GLIMAGE_SINK_LOCK (glimage_sink);
+  glimage_sink->in_info = vinfo;
+  ok = update_output_format (glimage_sink);
 
-  oldpool = glimage_sink->pool;
-  /* we don't activate the pool yet, this will be done by downstream after it
-   * has configured the pool. If downstream does not want our pool we will
-   * activate it when we render into it */
-  glimage_sink->pool = newpool;
+  GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
 
-  /* unref the old sink */
-  if (oldpool) {
-    /* we don't deactivate, some elements might still be using it, it will
-     * be deactivated when the last ref is gone */
-    gst_object_unref (oldpool);
+  return ok;
+}
+
+/* Take the input_buffer and run it through 3D conversion if needed.
+ * Called with glimagesink lock, but might drop it temporarily */
+static gboolean
+prepare_next_buffer (GstGLImageSink * glimage_sink)
+{
+  GstBuffer *in_buffer, *next_buffer, *old_buffer;
+  GstBuffer *in_buffer2 = NULL, *next_buffer2 = NULL, *old_buffer2;
+  GstBuffer *next_sync, *old_sync;
+  GstGLSyncMeta *sync_meta;
+  GstVideoFrame gl_frame;
+  GstGLViewConvert *convert_views = NULL;
+  GstVideoInfo *info;
+
+  if (glimage_sink->input_buffer == NULL)
+    return TRUE;                /* No input buffer to process */
+
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (&glimage_sink->in_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    if (glimage_sink->input_buffer2 == NULL)
+      return TRUE;              /* Need 2nd input buffer to process */
+    in_buffer2 = gst_buffer_ref (glimage_sink->input_buffer2);
   }
 
-  if (glimage_sink->upload)
-    gst_object_unref (glimage_sink->upload);
-  glimage_sink->upload = gst_gl_upload_new (glimage_sink->context);
+  in_buffer = gst_buffer_ref (glimage_sink->input_buffer);
+  if (glimage_sink->convert_views &&
+      (GST_VIDEO_INFO_MULTIVIEW_MODE (&glimage_sink->in_info) !=
+          GST_VIDEO_INFO_MULTIVIEW_MODE (&glimage_sink->out_info) ||
+          GST_VIDEO_INFO_MULTIVIEW_FLAGS (&glimage_sink->in_info) !=
+          GST_VIDEO_INFO_MULTIVIEW_FLAGS (&glimage_sink->out_info)))
+    convert_views = gst_object_ref (glimage_sink->convert_views);
 
-  gst_gl_upload_set_format (glimage_sink->upload, &vinfo);
-  glimage_sink->caps_change = TRUE;
+  GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+
+  if (convert_views) {
+    info = &glimage_sink->out_info;
+
+    if (gst_gl_view_convert_submit_input_buffer (glimage_sink->convert_views,
+            GST_BUFFER_IS_DISCONT (in_buffer), in_buffer) != GST_FLOW_OK) {
+      gst_buffer_replace (&in_buffer2, NULL);
+      goto fail;
+    }
+    if (in_buffer2) {
+      if (gst_gl_view_convert_submit_input_buffer (glimage_sink->convert_views,
+              GST_BUFFER_IS_DISCONT (in_buffer2), in_buffer2) != GST_FLOW_OK) {
+        goto fail;
+      }
+    }
+
+    if (gst_gl_view_convert_get_output (glimage_sink->convert_views,
+            &next_buffer) != GST_FLOW_OK)
+      goto fail;
+    if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) ==
+        GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+      if (gst_gl_view_convert_get_output (glimage_sink->convert_views,
+              &next_buffer2) != GST_FLOW_OK)
+        goto fail;
+    }
+    gst_object_unref (convert_views);
+
+    if (next_buffer == NULL) {
+      /* Not ready to paint a buffer yet */
+      GST_GLIMAGE_SINK_LOCK (glimage_sink);
+      return TRUE;
+    }
+  } else {
+    next_buffer = in_buffer;
+    info = &glimage_sink->in_info;
+  }
+
+  gst_gl_overlay_compositor_upload_overlays (glimage_sink->overlay_compositor,
+      next_buffer);
+
+  /* in_buffer invalid now */
+  if (!gst_video_frame_map (&gl_frame, info, next_buffer,
+          GST_MAP_READ | GST_MAP_GL)) {
+    gst_buffer_unref (next_buffer);
+    goto fail;
+  }
+
+  next_sync = gst_buffer_new ();
+  sync_meta = gst_buffer_add_gl_sync_meta (glimage_sink->context, next_sync);
+  gst_gl_sync_meta_set_sync_point (sync_meta, glimage_sink->context);
+
+  GST_GLIMAGE_SINK_LOCK (glimage_sink);
+  glimage_sink->next_tex = *(guint *) gl_frame.data[0];
+
+  old_buffer = glimage_sink->next_buffer;
+  glimage_sink->next_buffer = next_buffer;
+  old_buffer2 = glimage_sink->next_buffer2;
+  glimage_sink->next_buffer2 = next_buffer2;
+
+  old_sync = glimage_sink->next_sync;
+  glimage_sink->next_sync = next_sync;
+
+  /* Need to drop the lock again, to avoid a deadlock if we're
+   * dropping the last ref on this buffer and it goes back to our
+   * allocator */
+  GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+
+  if (old_buffer)
+    gst_buffer_unref (old_buffer);
+  if (old_buffer2)
+    gst_buffer_unref (old_buffer2);
+  if (old_sync)
+    gst_buffer_unref (old_sync);
+  gst_video_frame_unmap (&gl_frame);
+
+  GST_GLIMAGE_SINK_LOCK (glimage_sink);
 
   return TRUE;
+
+fail:
+  GST_GLIMAGE_SINK_LOCK (glimage_sink);
+  return FALSE;
 }
 
 static GstFlowReturn
 gst_glimage_sink_prepare (GstBaseSink * bsink, GstBuffer * buf)
 {
   GstGLImageSink *glimage_sink;
+  GstBuffer **target;
+  GstBuffer *old_input;
 
   glimage_sink = GST_GLIMAGE_SINK (bsink);
 
@@ -756,9 +1390,29 @@
   if (!_ensure_gl_setup (glimage_sink))
     return GST_FLOW_NOT_NEGOTIATED;
 
-  if (!gst_gl_upload_perform_with_buffer (glimage_sink->upload, buf,
-          &glimage_sink->next_tex))
-    goto upload_failed;
+  GST_GLIMAGE_SINK_LOCK (glimage_sink);
+  target = &glimage_sink->input_buffer;
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (&glimage_sink->in_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME &&
+      !GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE)) {
+    target = &glimage_sink->input_buffer2;
+  }
+  old_input = *target;
+  *target = gst_buffer_ref (buf);
+
+  if (glimage_sink->output_mode_changed)
+    update_output_format (glimage_sink);
+
+  if (!prepare_next_buffer (glimage_sink)) {
+    GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+    if (old_input)
+      gst_buffer_unref (old_input);
+    goto convert_views_failed;
+  }
+  GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+
+  if (old_input)
+    gst_buffer_unref (old_input);
 
   if (glimage_sink->window_id != glimage_sink->new_window_id) {
     GstGLWindow *window = gst_gl_context_get_window (glimage_sink->context);
@@ -770,11 +1424,10 @@
   }
 
   return GST_FLOW_OK;
-
-upload_failed:
+convert_views_failed:
   {
     GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
-        ("%s", "Failed to upload buffer"), (NULL));
+        ("%s", "Failed to convert multiview video buffer"), (NULL));
     return GST_FLOW_ERROR;
   }
 }
@@ -783,27 +1436,17 @@
 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 (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),
-      GST_VIDEO_INFO_HEIGHT (&glimage_sink->info),
+      glimage_sink->next_tex, GST_VIDEO_INFO_WIDTH (&glimage_sink->out_info),
+      GST_VIDEO_INFO_HEIGHT (&glimage_sink->out_info),
       GST_VIDEO_SINK_WIDTH (glimage_sink),
       GST_VIDEO_SINK_HEIGHT (glimage_sink));
 
-  /* 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))
     goto redisplay_failed;
@@ -813,7 +1456,6 @@
   if (g_atomic_int_get (&glimage_sink->to_quit) != 0) {
     GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
         ("%s", gst_gl_context_get_error ()), (NULL));
-    gst_gl_upload_release_buffer (glimage_sink->upload);
     return GST_FLOW_ERROR;
   }
 
@@ -822,22 +1464,21 @@
 /* ERRORS */
 redisplay_failed:
   {
-    gst_gl_upload_release_buffer (glimage_sink->upload);
     GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
         ("%s", gst_gl_context_get_error ()), (NULL));
     return GST_FLOW_ERROR;
   }
 }
 
-
 static void
 gst_glimage_sink_video_overlay_init (GstVideoOverlayInterface * iface)
 {
   iface->set_window_handle = gst_glimage_sink_set_window_handle;
+  iface->set_render_rectangle = gst_glimage_sink_set_render_rectangle;
+  iface->handle_events = gst_glimage_sink_handle_events;
   iface->expose = gst_glimage_sink_expose;
 }
 
-
 static void
 gst_glimage_sink_set_window_handle (GstVideoOverlay * overlay, guintptr id)
 {
@@ -873,20 +1514,49 @@
   }
 }
 
+static void
+gst_glimage_sink_handle_events (GstVideoOverlay * overlay,
+    gboolean handle_events)
+{
+  GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (overlay);
+
+  glimage_sink->handle_events = handle_events;
+  if (G_LIKELY (glimage_sink->context)) {
+    GstGLWindow *window;
+    window = gst_gl_context_get_window (glimage_sink->context);
+    gst_gl_window_handle_events (window, handle_events);
+    gst_object_unref (window);
+  }
+}
+
+static void
+gst_glimage_sink_set_render_rectangle (GstVideoOverlay * overlay,
+    gint x, gint y, gint width, gint height)
+{
+  GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (overlay);
+
+  if (G_LIKELY (glimage_sink->context)) {
+    GstGLWindow *window;
+    window = gst_gl_context_get_window (glimage_sink->context);
+    gst_gl_window_set_render_rectangle (window, x, y, width, height);
+    gst_object_unref (window);
+  }
+
+  glimage_sink->x = x;
+  glimage_sink->y = y;
+  glimage_sink->width = width;
+  glimage_sink->height = height;
+}
+
 static gboolean
 gst_glimage_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
 {
   GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (bsink);
-  GstBufferPool *pool;
   GstStructure *config;
   GstCaps *caps;
   guint size;
   gboolean need_pool;
-  GstStructure *gl_context;
-  gchar *platform, *gl_apis;
-  gpointer handle;
-  GstAllocator *allocator = NULL;
-  GstAllocationParams params;
+  GstStructure *allocation_meta = NULL;
 
   if (!_ensure_gl_setup (glimage_sink))
     return FALSE;
@@ -896,142 +1566,221 @@
   if (caps == NULL)
     goto no_caps;
 
-  if ((pool = glimage_sink->pool))
-    gst_object_ref (pool);
-
-  if (pool != NULL) {
-    GstCaps *pcaps;
-
-    /* we had a pool, check caps */
-    GST_DEBUG_OBJECT (glimage_sink, "check existing pool caps");
-    config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
-
-    if (!gst_caps_is_equal (caps, pcaps)) {
-      GST_DEBUG_OBJECT (glimage_sink, "pool has different caps");
-      /* different caps, we can't use this pool */
-      gst_object_unref (pool);
-      pool = NULL;
-    }
-    gst_structure_free (config);
-  }
-
-  if (pool == NULL && need_pool) {
+  if (need_pool) {
+    GstBufferPool *pool;
     GstVideoInfo info;
 
     if (!gst_video_info_from_caps (&info, caps))
       goto invalid_caps;
 
-    GST_DEBUG_OBJECT (glimage_sink, "create new pool");
-    pool = gst_gl_buffer_pool_new (glimage_sink->context);
-
     /* the normal size of a frame */
     size = info.size;
 
+    GST_DEBUG_OBJECT (glimage_sink, "create new pool");
+
+    pool = gst_gl_buffer_pool_new (glimage_sink->context);
     config = gst_buffer_pool_get_config (pool);
     gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
-    if (!gst_buffer_pool_set_config (pool, config))
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_GL_SYNC_META);
+
+    if (!gst_buffer_pool_set_config (pool, config)) {
+      g_object_unref (pool);
       goto config_failed;
-  }
-  /* we need at least 2 buffer because we hold on to the last one */
-  if (pool) {
+    }
+
+    /* we need at least 2 buffer because we hold on to the last one */
     gst_query_add_allocation_pool (query, pool, size, 2, 0);
-    gst_object_unref (pool);
+    g_object_unref (pool);
   }
 
-  /* we also support various metadata */
-  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
+  if (glimage_sink->context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
 
+  if (glimage_sink->window_width != 0 && glimage_sink->window_height != 0) {
+    allocation_meta =
+        gst_structure_new ("GstVideoOverlayCompositionMeta",
+        "width", G_TYPE_UINT, glimage_sink->window_width,
+        "height", G_TYPE_UINT, glimage_sink->window_height, NULL);
+    GST_DEBUG ("sending alloc query with size %dx%d",
+        glimage_sink->window_width, glimage_sink->window_height);
+  }
 
-  gl_apis =
-      gst_gl_api_to_string (gst_gl_context_get_gl_api (glimage_sink->context));
-  platform =
-      gst_gl_platform_to_string (gst_gl_context_get_gl_platform
-      (glimage_sink->context));
-  handle = (gpointer) gst_gl_context_get_gl_context (glimage_sink->context);
-
-  gl_context =
-      gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
-      GST_GL_TYPE_CONTEXT, glimage_sink->context, "gst.gl.context.handle",
-      G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
-      "gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
   gst_query_add_allocation_meta (query,
-      GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, gl_context);
+      GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, allocation_meta);
 
-  g_free (gl_apis);
-  g_free (platform);
-  gst_structure_free (gl_context);
-
-  gst_allocation_params_init (&params);
-
-  allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
-  gst_query_add_allocation_param (query, allocator, &params);
-  gst_object_unref (allocator);
-
-#if GST_GL_HAVE_PLATFORM_EGL
-  if (gst_gl_context_check_feature (glimage_sink->context,
-          "EGL_KHR_image_base")) {
-    allocator = gst_allocator_find (GST_EGL_IMAGE_MEMORY_TYPE);
-    gst_query_add_allocation_param (query, allocator, &params);
-    gst_object_unref (allocator);
-  }
-#endif
+  if (allocation_meta)
+    gst_structure_free (allocation_meta);
 
   return TRUE;
 
   /* ERRORS */
 no_caps:
   {
-    GST_DEBUG_OBJECT (bsink, "no caps specified");
+    GST_WARNING_OBJECT (bsink, "no caps specified");
     return FALSE;
   }
 invalid_caps:
   {
-    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
+    GST_WARNING_OBJECT (bsink, "invalid caps specified");
     return FALSE;
   }
 config_failed:
   {
-    GST_DEBUG_OBJECT (bsink, "failed setting config");
+    GST_WARNING_OBJECT (bsink, "failed setting config");
     return FALSE;
   }
 }
 
-#if GST_GL_HAVE_GLES2
+/* *INDENT-OFF* */
+static const GLfloat vertices[] = {
+     1.0f,  1.0f, 0.0f, 1.0f, 0.0f,
+    -1.0f,  1.0f, 0.0f, 0.0f, 0.0f,
+    -1.0f, -1.0f, 0.0f, 0.0f, 1.0f,
+     1.0f, -1.0f, 0.0f, 1.0f, 1.0f
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+/* *INDENT-ON* */
+
+static void
+_bind_buffer (GstGLImageSink * gl_sink)
+{
+  const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, gl_sink->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, gl_sink->vertex_buffer);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (gl_sink->attr_position, 3, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (gl_sink->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (gl_sink->attr_position);
+  gl->EnableVertexAttribArray (gl_sink->attr_texture);
+}
+
+static void
+_unbind_buffer (GstGLImageSink * gl_sink)
+{
+  const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (gl_sink->attr_position);
+  gl->DisableVertexAttribArray (gl_sink->attr_texture);
+}
+
 /* Called in the gl thread */
 static void
 gst_glimage_sink_thread_init_redisplay (GstGLImageSink * gl_sink)
 {
+  const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+
   gl_sink->redisplay_shader = gst_gl_shader_new (gl_sink->context);
 
   if (!gst_gl_shader_compile_with_default_vf_and_check
-      (gl_sink->redisplay_shader, &gl_sink->redisplay_attr_position_loc,
-          &gl_sink->redisplay_attr_texture_loc))
+      (gl_sink->redisplay_shader, &gl_sink->attr_position,
+          &gl_sink->attr_texture))
     gst_glimage_sink_cleanup_glthread (gl_sink);
-}
-#endif
 
+  if (gl->GenVertexArrays) {
+    gl->GenVertexArrays (1, &gl_sink->vao);
+    gl->BindVertexArray (gl_sink->vao);
+  }
+
+  if (!gl_sink->vertex_buffer) {
+    gl->GenBuffers (1, &gl_sink->vertex_buffer);
+    gl->BindBuffer (GL_ARRAY_BUFFER, gl_sink->vertex_buffer);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+  }
+
+  if (!gl_sink->vbo_indices) {
+    gl->GenBuffers (1, &gl_sink->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, gl_sink->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+  }
+
+  if (gl->GenVertexArrays) {
+    _bind_buffer (gl_sink);
+    gl->BindVertexArray (0);
+  }
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+}
+
+static void
+gst_glimage_sink_cleanup_glthread (GstGLImageSink * gl_sink)
+{
+  const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+
+  if (gl_sink->redisplay_shader) {
+    gst_object_unref (gl_sink->redisplay_shader);
+    gl_sink->redisplay_shader = NULL;
+  }
+
+  if (gl_sink->vao) {
+    gl->DeleteVertexArrays (1, &gl_sink->vao);
+    gl_sink->vao = 0;
+  }
+
+  if (gl_sink->vertex_buffer) {
+    gl->DeleteBuffers (1, &gl_sink->vertex_buffer);
+    gl_sink->vertex_buffer = 0;
+  }
+
+  if (gl_sink->vbo_indices) {
+    gl->DeleteBuffers (1, &gl_sink->vbo_indices);
+    gl_sink->vbo_indices = 0;
+  }
+
+  gst_gl_overlay_compositor_free_overlays (gl_sink->overlay_compositor);
+}
+
+/* Called with object lock held */
 static void
 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
+  /* Here gl_sink members (ex:gl_sink->out_info) have a life time of set_caps.
+   * It means that they cannot change between two set_caps
    */
-  const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+  const GstGLFuncs *gl;
   gboolean do_reshape;
+  gboolean reconfigure;
 
-  GST_TRACE ("GL Window resized to %ux%u", width, height);
+  GST_DEBUG_OBJECT (gl_sink, "GL Window resized to %ux%u", width, height);
 
   /* check if a client reshape callback is registered */
   g_signal_emit (gl_sink, gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL], 0,
-      width, height, &do_reshape);
+      gl_sink->context, width, height, &do_reshape);
+  GST_GLIMAGE_SINK_LOCK (gl_sink);
 
+  gl = gl_sink->context->gl_vtable;
   width = MAX (1, width);
   height = MAX (1, height);
 
+  /* Check if we would suggest a different width/height now */
+  reconfigure = ((gl_sink->window_width != width)
+      || (gl_sink->window_height != height))
+      && (gl_sink->window_width != 0)
+      && (gl_sink->window_height != 0);
+
   gl_sink->window_width = width;
   gl_sink->window_height = height;
 
+  if (reconfigure) {
+    GST_DEBUG ("Sending reconfigure event on sinkpad.");
+    gst_pad_push_event (GST_BASE_SINK (gl_sink)->sinkpad,
+        gst_event_new_reconfigure ());
+  }
+
   /* default reshape */
   if (!do_reshape) {
     if (gl_sink->keep_aspect_ratio) {
@@ -1048,26 +1797,32 @@
       dst.h = height;
 
       gst_video_sink_center_rect (src, dst, &result, TRUE);
-      gl->Viewport (result.x, result.y, result.w, result.h);
+      gl_sink->output_mode_changed |= (result.w != gl_sink->display_rect.w);
+      gl_sink->output_mode_changed |= (result.h != gl_sink->display_rect.h);
+      gl_sink->display_rect = result;
     } else {
-      gl->Viewport (0, 0, width, height);
-    }
-#if GST_GL_HAVE_OPENGL
-    if (USING_OPENGL (gl_sink->context)) {
-      gl->MatrixMode (GL_PROJECTION);
-      gl->LoadIdentity ();
-      gluOrtho2D (0, width, 0, height);
-      gl->MatrixMode (GL_MODELVIEW);
-    }
-#endif
-  }
-}
+      gl_sink->output_mode_changed |= (width != gl_sink->display_rect.w);
+      gl_sink->output_mode_changed |= (height != gl_sink->display_rect.h);
 
+      gl_sink->display_rect.x = 0;
+      gl_sink->display_rect.y = 0;
+      gl_sink->display_rect.w = width;
+      gl_sink->display_rect.h = height;
+    }
+
+    gl->Viewport (gl_sink->display_rect.x, gl_sink->display_rect.y,
+        gl_sink->display_rect.w, gl_sink->display_rect.h);
+    GST_DEBUG_OBJECT (gl_sink, "GL output area now %u,%u %ux%u",
+        gl_sink->display_rect.x, gl_sink->display_rect.y,
+        gl_sink->display_rect.w, gl_sink->display_rect.h);
+  }
+  GST_GLIMAGE_SINK_UNLOCK (gl_sink);
+}
 
 static void
 gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
 {
-  /* Here gl_sink members (ex:gl_sink->info) have a life time of set_caps.
+  /* Here gl_sink members (ex:gl_sink->out_info) have a life time of set_caps.
    * It means that they cannot not change between two set_caps as well as
    * for the redisplay_texture size.
    * Whereas redisplay_texture id changes every sink_render
@@ -1075,7 +1830,9 @@
 
   const GstGLFuncs *gl = NULL;
   GstGLWindow *window = NULL;
-  gboolean do_redisplay;
+  gboolean do_redisplay = FALSE;
+  GstGLSyncMeta *sync_meta = NULL;
+  GstSample *sample = NULL;
 
   g_return_if_fail (GST_IS_GLIMAGE_SINK (gl_sink));
 
@@ -1095,101 +1852,69 @@
   /* opengl scene */
   GST_TRACE ("redrawing texture:%u", gl_sink->redisplay_texture);
 
-  if (gl_sink->caps_change) {
-    GST_GLIMAGE_SINK_UNLOCK (gl_sink);
-    gst_glimage_sink_on_resize (gl_sink, gl_sink->window_width,
-        gl_sink->window_height);
-    GST_GLIMAGE_SINK_LOCK (gl_sink);
-    gl_sink->caps_change = FALSE;
-  }
+  sync_meta = gst_buffer_get_gl_sync_meta (gl_sink->stored_sync);
+  if (sync_meta)
+    gst_gl_sync_meta_wait (sync_meta, gst_gl_context_get_current ());
 
   /* make sure that the environnement is clean */
   gst_gl_context_clear_shader (gl_sink->context);
-
+  gl->BindTexture (GL_TEXTURE_2D, 0);
 #if GST_GL_HAVE_OPENGL
   if (USING_OPENGL (gl_sink->context))
     gl->Disable (GL_TEXTURE_2D);
 #endif
 
-  gl->BindTexture (GL_TEXTURE_2D, 0);
-
+  sample = gst_sample_new (gl_sink->stored_buffer[0],
+      gl_sink->out_caps, &GST_BASE_SINK (gl_sink)->segment, NULL);
   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);
+      gl_sink->context, sample, &do_redisplay);
+  gst_sample_unref (sample);
+
+  if (gl_sink->stored_buffer[1]) {
+    sample = gst_sample_new (gl_sink->stored_buffer[1],
+        gl_sink->out_caps, &GST_BASE_SINK (gl_sink)->segment, NULL);
+    g_signal_emit (gl_sink, gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL], 0,
+        gl_sink->context, sample, &do_redisplay);
+    gst_sample_unref (sample);
+  }
 
   if (!do_redisplay) {
-#if GST_GL_HAVE_OPENGL
-    if (USING_OPENGL (gl_sink->context)) {
-      GLfloat verts[8] = { 1.0f, 1.0f,
-        -1.0f, 1.0f,
-        -1.0f, -1.0f,
-        1.0f, -1.0f
-      };
-      GLfloat texcoords[8] = { 1.0f, 0.0f,
-        0.0f, 0.0f,
-        0.0f, 1.0f,
-        1.0f, 1.0f
-      };
+    gfloat alpha = gl_sink->ignore_alpha ? 1.0f : 0.0f;
 
-      gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-      gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    gl->ClearColor (0.0, 0.0, 0.0, alpha);
+    gl->Clear (GL_COLOR_BUFFER_BIT);
 
-      gl->MatrixMode (GL_PROJECTION);
-      gl->LoadIdentity ();
-
-      gl->Enable (GL_TEXTURE_2D);
-      gl->BindTexture (GL_TEXTURE_2D, gl_sink->redisplay_texture);
-
-      gl->EnableClientState (GL_VERTEX_ARRAY);
-      gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-      gl->VertexPointer (2, GL_FLOAT, 0, &verts);
-      gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
-
-      gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
-
-      gl->DisableClientState (GL_VERTEX_ARRAY);
-      gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-
-      gl->Disable (GL_TEXTURE_2D);
+    if (gl_sink->ignore_alpha) {
+      gl->BlendColor (0.0, 0.0, 0.0, alpha);
+      gl->BlendFunc (GL_SRC_ALPHA, GL_CONSTANT_COLOR);
+      gl->BlendEquation (GL_FUNC_ADD);
+      gl->Enable (GL_BLEND);
     }
-#endif
-#if GST_GL_HAVE_GLES2
-    if (USING_GLES2 (gl_sink->context)) {
-      const GLfloat vVertices[] = { 1.0f, 1.0f, 0.0f,
-        1.0f, 0.0f,
-        -1.0f, 1.0f, 0.0f,
-        0.0f, 0.0f,
-        -1.0f, -1.0f, 0.0f,
-        0.0f, 1.0f,
-        1.0f, -1.0f, 0.0f,
-        1.0f, 1.0f
-      };
 
-      GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+    gst_gl_shader_use (gl_sink->redisplay_shader);
 
-      gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-      gl->Clear (GL_COLOR_BUFFER_BIT);
+    if (gl->GenVertexArrays)
+      gl->BindVertexArray (gl_sink->vao);
+    else
+      _bind_buffer (gl_sink);
 
-      gst_gl_shader_use (gl_sink->redisplay_shader);
+    gl->ActiveTexture (GL_TEXTURE0);
+    gl->BindTexture (GL_TEXTURE_2D, gl_sink->redisplay_texture);
+    gst_gl_shader_set_uniform_1i (gl_sink->redisplay_shader, "tex", 0);
 
-      /* Load the vertex position */
-      gl->VertexAttribPointer (gl_sink->redisplay_attr_position_loc, 3,
-          GL_FLOAT, GL_FALSE, 5 * sizeof (GLfloat), vVertices);
+    gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
 
-      /* Load the texture coordinate */
-      gl->VertexAttribPointer (gl_sink->redisplay_attr_texture_loc, 2,
-          GL_FLOAT, GL_FALSE, 5 * sizeof (GLfloat), &vVertices[3]);
+    gst_gl_context_clear_shader (gl_sink->context);
 
-      gl->EnableVertexAttribArray (gl_sink->redisplay_attr_position_loc);
-      gl->EnableVertexAttribArray (gl_sink->redisplay_attr_texture_loc);
+    if (gl->GenVertexArrays)
+      gl->BindVertexArray (0);
+    else
+      _unbind_buffer (gl_sink);
 
-      gl->ActiveTexture (GL_TEXTURE0);
-      gl->BindTexture (GL_TEXTURE_2D, gl_sink->redisplay_texture);
-      gst_gl_shader_set_uniform_1i (gl_sink->redisplay_shader, "tex", 0);
+    if (gl_sink->ignore_alpha)
+      gl->Disable (GL_BLEND);
 
-      gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
-    }
-#endif
+    gst_gl_overlay_compositor_draw_overlays (gl_sink->overlay_compositor);
   }
   /* end default opengl scene */
   window->is_drawing = FALSE;
@@ -1201,9 +1926,22 @@
 static void
 gst_glimage_sink_on_close (GstGLImageSink * gl_sink)
 {
+  GstGLWindow *window;
+
   gst_gl_context_set_error (gl_sink->context, "Output window was closed");
 
+  window = gst_gl_context_get_window (gl_sink->context);
+
+  if (gl_sink->key_sig_id)
+    g_signal_handler_disconnect (window, gl_sink->key_sig_id);
+  gl_sink->key_sig_id = 0;
+  if (gl_sink->mouse_sig_id)
+    g_signal_handler_disconnect (window, gl_sink->mouse_sig_id);
+  gl_sink->mouse_sig_id = 0;
+
   g_atomic_int_set (&gl_sink->to_quit, 1);
+
+  gst_object_unref (window);
 }
 
 static gboolean
@@ -1211,33 +1949,71 @@
 {
   GstGLWindow *window;
   gboolean alive;
+  GstBuffer *old_stored_buffer[2], *old_sync;
 
   window = gst_gl_context_get_window (gl_sink->context);
   if (!window)
     return FALSE;
 
   if (gst_gl_window_is_running (window)) {
+    gulong handler_id =
+        g_signal_handler_find (GST_ELEMENT_PARENT (gl_sink), G_SIGNAL_MATCH_ID,
+        gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW], 0,
+        NULL, NULL, NULL);
 
-#if GST_GL_HAVE_GLES2
-    if (USING_GLES2 (gl_sink->context)) {
+    if (G_UNLIKELY (!gl_sink->redisplay_shader) && (!handler_id
+            || !gl_sink->other_context)) {
+      gst_gl_window_send_message (window,
+          GST_GL_WINDOW_CB (gst_glimage_sink_thread_init_redisplay), gl_sink);
+
+      /* if the shader is still null it means it failed to be useable */
       if (G_UNLIKELY (!gl_sink->redisplay_shader)) {
-        gst_gl_window_send_message (window,
-            GST_GL_WINDOW_CB (gst_glimage_sink_thread_init_redisplay), gl_sink);
-
-        /* if the shader is still null it means it failed to be useable */
-        if (G_UNLIKELY (!gl_sink->redisplay_shader)) {
-          gst_object_unref (window);
-          return FALSE;
-        }
+        gst_object_unref (window);
+        return FALSE;
       }
+
+      gst_gl_window_set_preferred_size (window, GST_VIDEO_SINK_WIDTH (gl_sink),
+          GST_VIDEO_SINK_HEIGHT (gl_sink));
+      gst_gl_window_show (window);
     }
-#endif
+
+    /* Recreate the output texture if needed */
+    GST_GLIMAGE_SINK_LOCK (gl_sink);
+    if (gl_sink->output_mode_changed && gl_sink->input_buffer != NULL) {
+      GST_DEBUG ("Recreating output after mode/size change");
+      update_output_format (gl_sink);
+      prepare_next_buffer (gl_sink);
+    }
+
+    if (gl_sink->next_buffer == NULL) {
+      /* Nothing to display yet */
+      GST_GLIMAGE_SINK_UNLOCK (gl_sink);
+      return TRUE;
+    }
+
+    /* Avoid to release the texture while drawing */
+    gl_sink->redisplay_texture = gl_sink->next_tex;
+    old_stored_buffer[0] = gl_sink->stored_buffer[0];
+    old_stored_buffer[1] = gl_sink->stored_buffer[1];
+    gl_sink->stored_buffer[0] = gst_buffer_ref (gl_sink->next_buffer);
+    if (gl_sink->next_buffer2)
+      gl_sink->stored_buffer[1] = gst_buffer_ref (gl_sink->next_buffer2);
+    else
+      gl_sink->stored_buffer[1] = NULL;
+
+    old_sync = gl_sink->stored_sync;
+    gl_sink->stored_sync = gst_buffer_ref (gl_sink->next_sync);
+    GST_GLIMAGE_SINK_UNLOCK (gl_sink);
+
+    gst_buffer_replace (old_stored_buffer, NULL);
+    gst_buffer_replace (old_stored_buffer + 1, NULL);
+    if (old_sync)
+      gst_buffer_unref (old_sync);
 
     /* Drawing is asynchronous: gst_gl_window_draw is not blocking
      * It means that it does not wait for stuff to be executed in other threads
      */
-    gst_gl_window_draw (window, GST_VIDEO_SINK_WIDTH (gl_sink),
-        GST_VIDEO_SINK_HEIGHT (gl_sink));
+    gst_gl_window_draw (window);
   }
   alive = gst_gl_window_is_running (window);
   gst_object_unref (window);
diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h
index 25e6a13..f7b3bfb 100644
--- a/ext/gl/gstglimagesink.h
+++ b/ext/gl/gstglimagesink.h
@@ -51,43 +51,72 @@
 {
     GstVideoSink video_sink;
 
-    //properties
-    gchar *display_name;
-
     guintptr window_id;
     guintptr new_window_id;
+    gulong mouse_sig_id;
+    gulong key_sig_id;
 
-    //caps
-    GstVideoInfo info;
+    /* GstVideoOverlay::set_render_rectangle() cache */
+    gint x;
+    gint y;
+    gint width;
+    gint height;
+
+    /* Input info before 3d stereo output conversion, if any */
+    GstVideoInfo in_info;
+
+    /* format/caps we actually hand off to the app */
+    GstVideoInfo out_info;
+    GstCaps *out_caps;
 
     GstGLDisplay *display;
     GstGLContext *context;
     GstGLContext *other_context;
+    gboolean handle_events;
+    gboolean ignore_alpha;
 
-    GstGLUpload *upload;
+    GstGLViewConvert *convert_views;
+
+    /* Original input RGBA buffer, ready for display,
+     * or possible reconversion through the views filter */
+    GstBuffer *input_buffer;
+    /* Secondary view buffer - when operating in frame-by-frame mode */
+    GstBuffer *input_buffer2;
+
     guint      next_tex;
+    GstBuffer *next_buffer;
+    GstBuffer *next_buffer2; /* frame-by-frame 2nd view */
+    GstBuffer *next_sync;
 
     volatile gint to_quit;
     gboolean keep_aspect_ratio;
     gint par_n, par_d;
 
-    GstBufferPool *pool;
-
     /* avoid replacing the stored_buffer while drawing */
     GMutex drawing_lock;
-    GstBuffer *stored_buffer;
+    GstBuffer *stored_buffer[2];
+    GstBuffer *stored_sync;
     GLuint redisplay_texture;
 
     gboolean caps_change;
     guint window_width;
     guint window_height;
 
-#if GST_GL_HAVE_GLES2
-  GstGLShader *redisplay_shader;
-  GLint redisplay_attr_position_loc;
-  GLint redisplay_attr_texture_loc;
-#endif
+    GstVideoRectangle display_rect;
 
+    GstGLShader *redisplay_shader;
+    GLuint vao;
+    GLuint vbo_indices;
+    GLuint vertex_buffer;
+    GLint  attr_position;
+    GLint  attr_texture;
+
+    GstVideoMultiviewMode mview_output_mode;
+    GstVideoMultiviewFlags mview_output_flags;
+    gboolean output_mode_changed;
+    GstGLStereoDownmix mview_downmix_mode;
+
+    GstGLOverlayCompositor *overlay_compositor;
 };
 
 struct _GstGLImageSinkClass
@@ -96,6 +125,7 @@
 };
 
 GType gst_glimage_sink_get_type(void);
+GType gst_gl_image_sink_bin_get_type(void);
 
 G_END_DECLS
 
diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c
index 6a2d9a4..401e4ed 100644
--- a/ext/gl/gstglmixer.c
+++ b/ext/gl/gstglmixer.c
@@ -24,23 +24,16 @@
 #endif
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads.h>
 #include <gst/video/video.h>
 
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
 #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);
+#if GST_GL_HAVE_PLATFORM_EGL
+#include <gst/gl/egl/gsteglimagememory.h>
+#endif
 
+#define gst_gl_mixer_parent_class parent_class
+G_DEFINE_ABSTRACT_TYPE (GstGLMixer, gst_gl_mixer, GST_TYPE_GL_BASE_MIXER);
 
 #define GST_CAT_DEFAULT gst_gl_mixer_debug
 GST_DEBUG_CATEGORY (gst_gl_mixer_debug);
@@ -49,10 +42,6 @@
     GValue * value, GParamSpec * pspec);
 static void gst_gl_mixer_pad_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
-static void gst_gl_mixer_pad_finalize (GObject * object);
-
-static void gst_gl_mixer_set_context (GstElement * element,
-    GstContext * context);
 
 enum
 {
@@ -66,41 +55,26 @@
 {
   gboolean negotiated;
 
-  GstBufferPool *pool;
-  gboolean pool_active;
-  GstAllocator *allocator;
-  GstAllocationParams params;
-  GstQuery *query;
-
   gboolean gl_resource_ready;
   GMutex gl_resource_lock;
   GCond gl_resource_cond;
 };
 
-G_DEFINE_TYPE (GstGLMixerPad, gst_gl_mixer_pad, GST_TYPE_VIDEO_AGGREGATOR_PAD);
+G_DEFINE_TYPE (GstGLMixerPad, gst_gl_mixer_pad, GST_TYPE_GL_BASE_MIXER_PAD);
 
 static void
 gst_gl_mixer_pad_class_init (GstGLMixerPadClass * klass)
 {
   GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstVideoAggregatorPadClass *vaggpad_class =
+      (GstVideoAggregatorPadClass *) klass;
 
   gobject_class->set_property = gst_gl_mixer_pad_set_property;
   gobject_class->get_property = gst_gl_mixer_pad_get_property;
 
-  gobject_class->finalize = gst_gl_mixer_pad_finalize;
-}
-
-static void
-gst_gl_mixer_pad_finalize (GObject * object)
-{
-  GstGLMixerPad *pad = GST_GL_MIXER_PAD (object);
-
-  if (pad->upload) {
-    gst_object_unref (pad->upload);
-    pad->upload = NULL;
-  }
-
-  G_OBJECT_CLASS (gst_gl_mixer_pad_parent_class)->finalize (object);
+  vaggpad_class->set_info = NULL;
+  vaggpad_class->prepare_frame = NULL;
+  vaggpad_class->clean_frame = NULL;
 }
 
 static void
@@ -129,113 +103,81 @@
 _negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps)
 {
   GstGLMixer *mix = GST_GL_MIXER (vagg);
-  gboolean ret = gst_gl_mixer_do_bufferpool (mix, caps);
+  gboolean ret;
 
-  mix->priv->negotiated = ret;
+  mix->priv->negotiated = TRUE;
 
   gst_caps_replace (&mix->out_caps, caps);
 
+  ret = GST_VIDEO_AGGREGATOR_CLASS (parent_class)->negotiated_caps (vagg, caps);
+
   return ret;
 }
 
-static gboolean
-gst_gl_mixer_propose_allocation (GstGLMixer * mix,
-    GstQuery * decide_query, GstQuery * query)
+static void
+_find_best_format (GstVideoAggregator * vagg, GstCaps * downstream_caps,
+    GstVideoInfo * best_info, gboolean * at_least_one_alpha)
 {
-  GstBufferPool *pool;
+  GstVideoInfo tmp_info;
+
+  GST_VIDEO_AGGREGATOR_CLASS (parent_class)->find_best_format (vagg,
+      downstream_caps, best_info, at_least_one_alpha);
+
+  gst_video_info_set_format (&tmp_info, GST_VIDEO_FORMAT_RGBA,
+      best_info->width, best_info->height);
+  tmp_info.par_n = best_info->par_n;
+  tmp_info.par_d = best_info->par_d;
+  tmp_info.fps_n = best_info->fps_n;
+  tmp_info.fps_d = best_info->fps_d;
+  tmp_info.flags = best_info->flags;
+  tmp_info.interlace_mode = best_info->interlace_mode;
+  *best_info = tmp_info;
+}
+
+static gboolean
+gst_gl_mixer_propose_allocation (GstGLBaseMixer * base_mix,
+    GstGLBaseMixerPad * base_pad, GstQuery * decide_query, GstQuery * query)
+{
+  GstGLMixer *mix = GST_GL_MIXER (base_mix);
+  GstGLContext *context = base_mix->context;
+  GstBufferPool *pool = NULL;
   GstStructure *config;
   GstCaps *caps;
   guint size = 0;
   gboolean need_pool;
-  GError *error = NULL;
-  GstStructure *gl_context;
-  gchar *platform, *gl_apis;
-  gpointer handle;
-  GstAllocator *allocator = NULL;
-  GstAllocationParams params;
 
   gst_query_parse_allocation (query, &caps, &need_pool);
 
   if (caps == NULL)
     goto no_caps;
 
-  if ((pool = mix->priv->pool))
-    gst_object_ref (pool);
-
-  if (pool != NULL) {
-    GstCaps *pcaps;
-
-    /* we had a pool, check caps */
-    GST_DEBUG_OBJECT (mix, "check existing pool caps");
-    config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
-
-    if (!gst_caps_is_equal (caps, pcaps)) {
-      GST_DEBUG_OBJECT (mix, "pool has different caps");
-      /* different caps, we can't use this pool */
-      gst_object_unref (pool);
-      pool = NULL;
-    }
-    gst_structure_free (config);
-  }
-
-  if (!gst_gl_ensure_display (mix, &mix->display))
-    return FALSE;
-
-  if (!mix->context) {
-    mix->context = gst_gl_context_new (mix->display);
-    if (!gst_gl_context_create (mix->context, NULL, &error))
-      goto context_error;
-  }
-
-  if (pool == NULL && need_pool) {
+  if (need_pool) {
     GstVideoInfo info;
 
     if (!gst_video_info_from_caps (&info, caps))
       goto invalid_caps;
 
     GST_DEBUG_OBJECT (mix, "create new pool");
-    pool = gst_gl_buffer_pool_new (mix->context);
+    pool = gst_gl_buffer_pool_new (context);
 
     /* the normal size of a frame */
     size = info.size;
 
     config = gst_buffer_pool_get_config (pool);
     gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
-    if (!gst_buffer_pool_set_config (pool, config))
-      goto config_failed;
-  }
 
-  if (pool) {
+    if (!gst_buffer_pool_set_config (pool, config)) {
+      g_object_unref (pool);
+      goto config_failed;
+    }
+
     gst_query_add_allocation_pool (query, pool, size, 1, 0);
-    gst_object_unref (pool);
+    g_object_unref (pool);
   }
 
   /* we also support various metadata */
-  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
-
-  gl_apis = gst_gl_api_to_string (gst_gl_context_get_gl_api (mix->context));
-  platform =
-      gst_gl_platform_to_string (gst_gl_context_get_gl_platform (mix->context));
-  handle = (gpointer) gst_gl_context_get_gl_context (mix->context);
-
-  gl_context =
-      gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
-      GST_GL_TYPE_CONTEXT, mix->context, "gst.gl.context.handle",
-      G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
-      "gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
-  gst_query_add_allocation_meta (query,
-      GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, gl_context);
-
-  g_free (gl_apis);
-  g_free (platform);
-  gst_structure_free (gl_context);
-
-  gst_allocation_params_init (&params);
-
-  allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
-  gst_query_add_allocation_param (query, allocator, &params);
-  gst_object_unref (allocator);
+  if (context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
 
   return TRUE;
 
@@ -255,12 +197,68 @@
     GST_DEBUG_OBJECT (mix, "failed setting config");
     return FALSE;
   }
-context_error:
-  {
-    GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", error->message),
-        (NULL));
-    return FALSE;
+}
+
+static gboolean
+gst_gl_mixer_pad_sink_acceptcaps (GstPad * pad, GstGLMixer * mix,
+    GstCaps * caps)
+{
+  gboolean ret;
+  GstCaps *template_caps;
+
+  GST_DEBUG_OBJECT (pad, "try accept caps of %" GST_PTR_FORMAT, caps);
+
+  template_caps = gst_pad_get_pad_template_caps (pad);
+  template_caps = gst_caps_make_writable (template_caps);
+
+  ret = gst_caps_can_intersect (caps, template_caps);
+  GST_DEBUG_OBJECT (pad, "%saccepted caps %" GST_PTR_FORMAT,
+      (ret ? "" : "not "), caps);
+  gst_caps_unref (template_caps);
+
+  return ret;
+}
+
+/* copies the given caps */
+static GstCaps *
+_update_caps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  return gst_gl_caps_replace_all_caps_features (caps,
+      GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+}
+
+static GstCaps *
+gst_gl_mixer_pad_sink_getcaps (GstPad * pad, GstGLMixer * mix, GstCaps * filter)
+{
+  GstCaps *sinkcaps;
+  GstCaps *template_caps;
+  GstCaps *filtered_caps;
+  GstCaps *returned_caps;
+
+  template_caps = gst_pad_get_pad_template_caps (pad);
+
+  sinkcaps = gst_pad_get_current_caps (pad);
+  if (sinkcaps == NULL) {
+    sinkcaps = gst_caps_ref (template_caps);
+  } else {
+    sinkcaps = gst_caps_merge (sinkcaps, gst_caps_ref (template_caps));
   }
+
+  if (filter) {
+    filtered_caps = gst_caps_intersect (sinkcaps, filter);
+    gst_caps_unref (sinkcaps);
+  } else {
+    filtered_caps = sinkcaps;   /* pass ownership */
+  }
+
+  returned_caps = gst_caps_intersect (filtered_caps, template_caps);
+
+  gst_caps_unref (template_caps);
+  gst_caps_unref (filtered_caps);
+
+  GST_DEBUG_OBJECT (pad, "returning %" GST_PTR_FORMAT, returned_caps);
+
+  return returned_caps;
 }
 
 static gboolean
@@ -273,39 +271,25 @@
   GST_TRACE ("QUERY %" GST_PTR_FORMAT, query);
 
   switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_ALLOCATION:
+    case GST_QUERY_CAPS:
     {
-      GstQuery *decide_query = NULL;
-      gboolean negotiated;
+      GstCaps *filter, *caps;
 
-      GST_OBJECT_LOCK (mix);
-      if (G_UNLIKELY (!(negotiated = mix->priv->negotiated))) {
-        GST_DEBUG_OBJECT (mix,
-            "not negotiated yet, can't answer ALLOCATION query");
-        GST_OBJECT_UNLOCK (mix);
-        return FALSE;
-      }
-      if ((decide_query = mix->priv->query))
-        gst_query_ref (decide_query);
-      GST_OBJECT_UNLOCK (mix);
-
-      GST_DEBUG_OBJECT (mix,
-          "calling propose allocation with query %" GST_PTR_FORMAT,
-          decide_query);
-
-      /* pass the query to the propose_allocation vmethod if any */
-      ret = gst_gl_mixer_propose_allocation (mix, decide_query, query);
-
-      if (decide_query)
-        gst_query_unref (decide_query);
-
-      GST_DEBUG_OBJECT (mix, "ALLOCATION ret %d, %" GST_PTR_FORMAT, ret, query);
+      gst_query_parse_caps (query, &filter);
+      caps = gst_gl_mixer_pad_sink_getcaps (GST_PAD (bpad), mix, filter);
+      gst_query_set_caps_result (query, caps);
+      gst_caps_unref (caps);
+      ret = TRUE;
       break;
     }
-    case GST_QUERY_CONTEXT:
+    case GST_QUERY_ACCEPT_CAPS:
     {
-      ret = gst_gl_handle_context_query ((GstElement *) mix, query,
-          &mix->display);
+      GstCaps *caps;
+
+      gst_query_parse_accept_caps (query, &caps);
+      ret = gst_gl_mixer_pad_sink_acceptcaps (GST_PAD (bpad), mix, caps);
+      gst_query_set_accept_caps_result (query, ret);
+      ret = TRUE;
       break;
     }
     default:
@@ -330,7 +314,7 @@
 
 enum
 {
-  PROP_0
+  PROP_0,
 };
 
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@@ -338,11 +322,7 @@
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
         (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
-            "RGBA")
-        "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+            "RGBA"))
     );
 
 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
@@ -350,20 +330,12 @@
     GST_PAD_REQUEST,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
         (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
-            "RGBA")
-        "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+            "RGBA"))
     );
 
 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 GstFlowReturn gst_gl_mixer_get_output_buffer (GstVideoAggregator *
+    videoaggregator, GstBuffer ** outbuf);
 static gboolean gst_gl_mixer_stop (GstAggregator * agg);
 static gboolean gst_gl_mixer_start (GstAggregator * agg);
 
@@ -376,28 +348,22 @@
 static void gst_gl_mixer_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static gboolean gst_gl_mixer_decide_allocation (GstGLMixer * mix,
+static gboolean gst_gl_mixer_decide_allocation (GstGLBaseMixer * mix,
     GstQuery * query);
-static gboolean gst_gl_mixer_set_allocation (GstGLMixer * mix,
-    GstBufferPool * pool, GstAllocator * allocator,
-    GstAllocationParams * params, GstQuery * query);
 
 static void gst_gl_mixer_finalize (GObject * object);
 
 static void
 gst_gl_mixer_class_init (GstGLMixerClass * klass)
 {
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
   GstVideoAggregatorClass *videoaggregator_class =
       (GstVideoAggregatorClass *) klass;
   GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+  GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_CLASS (klass);;
 
-  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glmixer", 0, "opengl mixer");
-
-  gobject_class = (GObjectClass *) klass;
-  element_class = GST_ELEMENT_CLASS (klass);
+  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glmixer", 0, "OpenGL mixer");
 
   g_type_class_add_private (klass, sizeof (GstGLMixerPrivate));
 
@@ -411,32 +377,30 @@
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&sink_factory));
 
-  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;
+  videoaggregator_class->update_caps = _update_caps;
+  videoaggregator_class->find_best_format = _find_best_format;
 
+  mix_class->propose_allocation = gst_gl_mixer_propose_allocation;
+  mix_class->decide_allocation = gst_gl_mixer_decide_allocation;
 
   /* Register the pad class */
   g_type_class_ref (GST_TYPE_GL_MIXER_PAD);
 
   klass->set_caps = NULL;
-
 }
 
 static void
 gst_gl_mixer_reset (GstGLMixer * mix)
 {
-  /* clean up collect data */
   mix->priv->negotiated = FALSE;
 }
 
@@ -445,7 +409,6 @@
 {
   mix->priv = GST_GL_MIXER_GET_PRIVATE (mix);
   mix->array_buffers = 0;
-  mix->display = NULL;
   mix->fbo = 0;
   mix->depthbuffer = 0;
 
@@ -459,90 +422,46 @@
 static void
 gst_gl_mixer_finalize (GObject * object)
 {
-  GstGLMixerPrivate *priv = GST_GL_MIXER (object)->priv;
+  GstGLMixer *mix = GST_GL_MIXER (object);
+  GstGLMixerPrivate *priv = mix->priv;
+
+  if (mix->out_caps)
+    gst_caps_unref (mix->out_caps);
 
   g_mutex_clear (&priv->gl_resource_lock);
   g_cond_clear (&priv->gl_resource_cond);
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-static void
-gst_gl_mixer_set_context (GstElement * element, GstContext * context)
-{
-  GstGLMixer *mix = GST_GL_MIXER (element);
-
-  gst_gl_handle_set_context (element, context, &mix->display);
-}
-
-static gboolean
-gst_gl_mixer_activate (GstGLMixer * mix, gboolean active)
-{
-  gboolean result = TRUE;
-
-  if (active) {
-    if (!gst_gl_ensure_display (mix, &mix->display))
-      result = FALSE;
-  }
-
-  return result;
-}
-
-static gboolean
-gst_gl_mixer_src_activate_mode (GstAggregator * aggregator, GstPadMode mode,
-    gboolean active)
-{
-  GstGLMixer *mix;
-  gboolean result = FALSE;
-
-  mix = GST_GL_MIXER (aggregator);
-
-  switch (mode) {
-    case GST_PAD_MODE_PUSH:
-    case GST_PAD_MODE_PULL:
-      result = gst_gl_mixer_activate (mix, active);
-      break;
-    default:
-      result = TRUE;
-      break;
-  }
-  return result;
-}
-
 static gboolean
 gst_gl_mixer_query_caps (GstPad * pad, GstAggregator * agg, GstQuery * query)
 {
-  GstCaps *filter, *caps;
-  GstStructure *s;
-  gint n;
-
-  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+  GstCaps *filter, *current_caps, *retcaps, *template_caps;
 
   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);
+  template_caps = gst_pad_get_pad_template_caps (agg->srcpad);
+
+  current_caps = gst_pad_get_current_caps (pad);
+  if (current_caps == NULL)
+    retcaps = gst_caps_ref (template_caps);
+  else {
+    retcaps = gst_caps_merge (current_caps, template_caps);
+    template_caps = NULL;
   }
 
-  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);
-    }
+  if (filter) {
+    current_caps =
+        gst_caps_intersect_full (filter, retcaps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (retcaps);
+    retcaps = current_caps;
   }
 
-  if (filter)
-    caps = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+  gst_query_set_caps_result (query, retcaps);
+  gst_caps_unref (retcaps);
 
-  gst_query_set_caps_result (query, caps);
-  gst_caps_unref (caps);
+  if (template_caps)
+    gst_caps_unref (template_caps);
 
   return TRUE;
 }
@@ -551,15 +470,8 @@
 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:
-    {
-      res = gst_gl_handle_context_query ((GstElement *) mix, query,
-          &mix->display);
-      break;
-    }
     case GST_QUERY_CAPS:
       res = gst_gl_mixer_query_caps (agg->srcpad, agg, query);
       break;
@@ -576,80 +488,42 @@
     GstBuffer ** outbuf)
 {
   GstGLMixer *mix = GST_GL_MIXER (videoaggregator);
+  GstBufferPool *pool;
+  GstFlowReturn ret;
 
-  if (!mix->priv->pool_active) {
-    if (!gst_buffer_pool_set_active (mix->priv->pool, TRUE)) {
+  pool =
+      gst_gl_base_mixer_get_buffer_pool (GST_GL_BASE_MIXER (videoaggregator));
+
+  if (!pool)
+    return GST_FLOW_NOT_NEGOTIATED;
+
+  if (!gst_buffer_pool_is_active (pool)) {
+    if (!gst_buffer_pool_set_active (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);
+  ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL);
+  gst_object_unref (pool);
+
+  return ret;
 }
 
 static gboolean
-gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
+gst_gl_mixer_decide_allocation (GstGLBaseMixer * base_mix, GstQuery * query)
 {
+  GstGLMixer *mix = GST_GL_MIXER (base_mix);
   GstGLMixerClass *mixer_class = GST_GL_MIXER_GET_CLASS (mix);
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
+  GstGLContext *context = base_mix->context;
   GstBufferPool *pool = NULL;
   GstStructure *config;
   GstCaps *caps;
   guint min, max, size;
   gboolean update_pool;
-  GError *error = NULL;
-  guint idx;
   guint out_width, out_height;
-  GstGLContext *other_context = NULL;
-  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
-
-  if (!gst_gl_ensure_display (mix, &mix->display))
-    return FALSE;
-
-  if (gst_query_find_allocation_meta (query,
-          GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx)) {
-    GstGLContext *context;
-    const GstStructure *upload_meta_params;
-    gpointer handle;
-    gchar *type;
-    gchar *apis;
-
-    gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
-    if (upload_meta_params) {
-      if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
-              GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
-        GstGLContext *old = mix->context;
-
-        mix->context = context;
-        if (old)
-          gst_object_unref (old);
-      } else if (gst_structure_get (upload_meta_params, "gst.gl.context.handle",
-              G_TYPE_POINTER, &handle, "gst.gl.context.type", G_TYPE_STRING,
-              &type, "gst.gl.context.apis", G_TYPE_STRING, &apis, NULL)
-          && handle) {
-        GstGLPlatform platform = GST_GL_PLATFORM_NONE;
-        GstGLAPI gl_apis;
-
-        GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
-            handle, type, apis);
-
-        platform = gst_gl_platform_from_string (type);
-        gl_apis = gst_gl_api_from_string (apis);
-
-        if (gl_apis && platform)
-          other_context =
-              gst_gl_context_new_wrapped (mix->display, (guintptr) handle,
-              platform, gl_apis);
-      }
-    }
-  }
-
-  if (!mix->context) {
-    mix->context = gst_gl_context_new (mix->display);
-    if (!gst_gl_context_create (mix->context, other_context, &error))
-      goto context_error;
-  }
 
   out_width = GST_VIDEO_INFO_WIDTH (&vagg->info);
   out_height = GST_VIDEO_INFO_HEIGHT (&vagg->info);
@@ -657,23 +531,18 @@
   g_mutex_lock (&mix->priv->gl_resource_lock);
   mix->priv->gl_resource_ready = FALSE;
   if (mix->fbo) {
-    gst_gl_context_del_fbo (mix->context, mix->fbo, mix->depthbuffer);
+    gst_gl_context_del_fbo (context, mix->fbo, mix->depthbuffer);
     mix->fbo = 0;
     mix->depthbuffer = 0;
   }
 
-  if (!gst_gl_context_gen_fbo (mix->context, out_width, out_height,
+  if (!gst_gl_context_gen_fbo (context, out_width, out_height,
           &mix->fbo, &mix->depthbuffer)) {
     g_cond_signal (&mix->priv->gl_resource_cond);
     g_mutex_unlock (&mix->priv->gl_resource_lock);
     goto context_error;
   }
 
-  if (mix->out_tex_id)
-    gst_gl_context_del_texture (mix->context, &mix->out_tex_id);
-  gst_gl_context_gen_texture (mix->context, &mix->out_tex_id,
-      GST_VIDEO_FORMAT_RGBA, out_width, out_height);
-
   gst_query_parse_allocation (query, &caps, NULL);
 
   if (mixer_class->set_caps)
@@ -698,11 +567,10 @@
   }
 
   if (!pool)
-    pool = gst_gl_buffer_pool_new (mix->context);
-
+    pool = gst_gl_buffer_pool_new (context);
   config = gst_buffer_pool_get_config (pool);
-  gst_buffer_pool_config_set_params (config, caps, size, min, max);
 
+  gst_buffer_pool_config_set_params (config, caps, size, min, max);
   gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
 
   gst_buffer_pool_set_config (pool, config);
@@ -718,110 +586,11 @@
 
 context_error:
   {
-    GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", error->message),
-        (NULL));
+    GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("Context error"), (NULL));
     return FALSE;
   }
 }
 
-/* takes ownership of the pool, allocator and query */
-static gboolean
-gst_gl_mixer_set_allocation (GstGLMixer * mix,
-    GstBufferPool * pool, GstAllocator * allocator,
-    GstAllocationParams * params, GstQuery * query)
-{
-  GstAllocator *oldalloc;
-  GstBufferPool *oldpool;
-  GstQuery *oldquery;
-  GstGLMixerPrivate *priv = mix->priv;
-
-  GST_DEBUG ("storing allocation query");
-
-  GST_OBJECT_LOCK (mix);
-  oldpool = priv->pool;
-  priv->pool = pool;
-  priv->pool_active = FALSE;
-
-  oldalloc = priv->allocator;
-  priv->allocator = allocator;
-
-  oldquery = priv->query;
-  priv->query = query;
-
-  if (params)
-    priv->params = *params;
-  else
-    gst_allocation_params_init (&priv->params);
-  GST_OBJECT_UNLOCK (mix);
-
-  if (oldpool) {
-    GST_DEBUG_OBJECT (mix, "deactivating old pool %p", oldpool);
-    gst_buffer_pool_set_active (oldpool, FALSE);
-    gst_object_unref (oldpool);
-  }
-  if (oldalloc) {
-    gst_object_unref (oldalloc);
-  }
-  if (oldquery) {
-    gst_query_unref (oldquery);
-  }
-  return TRUE;
-}
-
-static gboolean
-gst_gl_mixer_do_bufferpool (GstGLMixer * mix, GstCaps * outcaps)
-{
-  GstQuery *query;
-  gboolean result = TRUE;
-  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 (agg->srcpad, query)) {
-    /* not a problem, just debug a little */
-    GST_DEBUG_OBJECT (mix, "peer ALLOCATION query failed");
-  }
-
-  GST_DEBUG_OBJECT (mix, "calling decide_allocation");
-  result = gst_gl_mixer_decide_allocation (mix, query);
-
-  GST_DEBUG_OBJECT (mix, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result,
-      query);
-
-  if (!result)
-    goto no_decide_allocation;
-
-  /* we got configuration from our peer or the decide_allocation method,
-   * parse them */
-  if (gst_query_get_n_allocation_params (query) > 0) {
-    gst_query_parse_nth_allocation_param (query, 0, &allocator, &params);
-  } else {
-    allocator = NULL;
-    gst_allocation_params_init (&params);
-  }
-
-  if (gst_query_get_n_allocation_pools (query) > 0)
-    gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL);
-
-  /* now store */
-  result = gst_gl_mixer_set_allocation (mix, pool, allocator, &params, query);
-
-  return result;
-
-  /* Errors */
-no_decide_allocation:
-  {
-    GST_WARNING_OBJECT (mix, "Failed to decide allocation");
-    gst_query_unref (query);
-
-    return result;
-  }
-}
-
 gboolean
 gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf)
 {
@@ -835,34 +604,15 @@
   GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
   GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (mix);
   GstGLMixerPrivate *priv = mix->priv;
-  gboolean to_download =
-      gst_caps_features_is_equal (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
-      gst_caps_get_features (mix->out_caps, 0));
-  GstMapFlags out_map_flags = GST_MAP_WRITE;
 
   GST_TRACE ("Processing buffers");
 
-  to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (outbuf, 0));
-
-  if (!to_download)
-    out_map_flags |= GST_MAP_GL;
-
-  if (!gst_video_frame_map (&out_frame, &vagg->info, outbuf, out_map_flags)) {
+  if (!gst_video_frame_map (&out_frame, &vagg->info, outbuf,
+          GST_MAP_WRITE | GST_MAP_GL)) {
     return FALSE;
   }
 
-  if (!to_download) {
-    out_tex = *(guint *) out_frame.data[0];
-  } else {
-    GST_INFO ("Output Buffer does not contain correct memory, "
-        "attempting to wrap for download");
-
-    if (!mix->download)
-      mix->download = gst_gl_download_new (mix->context);
-
-    gst_gl_download_set_format (mix->download, &out_frame.info);
-    out_tex = mix->out_tex_id;
-  }
+  out_tex = *(guint *) out_frame.data[0];
 
   GST_OBJECT_LOCK (mix);
   walk = element->sinkpads;
@@ -883,24 +633,26 @@
     walk = g_list_next (walk);
 
     if (vaggpad->buffer != NULL) {
-      guint in_tex;
+      GstVideoInfo gl_info;
+      GstVideoFrame gl_frame;
+      GstGLSyncMeta *sync_meta;
 
-      if (!pad->upload) {
-        pad->upload = gst_gl_upload_new (mix->context);
+      gst_video_info_set_format (&gl_info,
+          GST_VIDEO_FORMAT_RGBA,
+          GST_VIDEO_INFO_WIDTH (&vaggpad->info),
+          GST_VIDEO_INFO_HEIGHT (&vaggpad->info));
 
-        gst_gl_upload_set_format (pad->upload, &vaggpad->info);
+      sync_meta = gst_buffer_get_gl_sync_meta (vaggpad->buffer);
+      if (sync_meta)
+        gst_gl_sync_meta_wait (sync_meta, GST_GL_BASE_MIXER (mix)->context);
+
+      if (gst_video_frame_map (&gl_frame, &gl_info, vaggpad->buffer,
+              GST_MAP_READ | GST_MAP_GL)) {
+        frame->texture = *(guint *) gl_frame.data[0];
+        gst_video_frame_unmap (&gl_frame);
       }
-
-      if (!gst_gl_upload_perform_with_buffer (pad->upload,
-              vaggpad->buffer, &in_tex)) {
-        ++array_index;
-        pad->mapped = FALSE;
-        continue;
-      }
-      pad->mapped = TRUE;
-
-      frame->texture = in_tex;
     }
+
     ++array_index;
   }
 
@@ -920,29 +672,7 @@
 
   g_mutex_unlock (&priv->gl_resource_lock);
 
-  if (to_download) {
-    if (!gst_gl_download_perform_with_data (mix->download, out_tex,
-            out_frame.data)) {
-      GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s",
-              "Failed to download video frame"), (NULL));
-      res = FALSE;
-      goto out;
-    }
-  }
-
 out:
-  i = 0;
-  walk = GST_ELEMENT (mix)->sinkpads;
-  while (walk) {
-    GstGLMixerPad *pad = GST_GL_MIXER_PAD (walk->data);
-
-    if (pad->mapped)
-      gst_gl_upload_release_buffer (pad->upload);
-
-    pad->mapped = FALSE;
-    walk = g_list_next (walk);
-    i++;
-  }
   GST_OBJECT_UNLOCK (mix);
 
   gst_video_frame_unmap (&out_frame);
@@ -980,20 +710,24 @@
   return mix_class->process_buffers (mix, mix->array_buffers, outbuf);
 }
 
-
-
 static GstFlowReturn
 gst_gl_mixer_aggregate_frames (GstVideoAggregator * vagg, GstBuffer * outbuf)
 {
   gboolean res = FALSE;
   GstGLMixer *mix = GST_GL_MIXER (vagg);
   GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (vagg);
+  GstGLContext *context = GST_GL_BASE_MIXER (mix)->context;
+  GstGLSyncMeta *sync_meta;
 
   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);
 
+  sync_meta = gst_buffer_get_gl_sync_meta (outbuf);
+  if (sync_meta)
+    gst_gl_sync_meta_set_sync_point (sync_meta, context);
+
   return res ? GST_FLOW_OK : GST_FLOW_ERROR;
 }
 
@@ -1019,19 +753,6 @@
   }
 }
 
-static gboolean
-_clean_upload (GstAggregator * agg, GstPad * aggpad, gpointer udata)
-{
-  GstGLMixerPad *pad = GST_GL_MIXER_PAD (aggpad);
-
-  if (pad->upload) {
-    gst_object_unref (pad->upload);
-    pad->upload = NULL;
-  }
-
-  return TRUE;
-}
-
 static void
 _free_glmixer_frame_data (GstGLMixerFrameData * frame)
 {
@@ -1045,13 +766,10 @@
   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,
+  mix->array_buffers = g_ptr_array_new_full (element->numsinkpads, NULL);
+  mix->frames = 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);
@@ -1061,7 +779,7 @@
 
   GST_OBJECT_UNLOCK (mix);
 
-  return TRUE;
+  return GST_AGGREGATOR_CLASS (parent_class)->start (agg);
 }
 
 static gboolean
@@ -1069,9 +787,7 @@
 {
   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;
+  GstGLContext *context = GST_GL_BASE_MIXER (mix)->context;
 
   GST_OBJECT_LOCK (agg);
   g_ptr_array_free (mix->frames, TRUE);
@@ -1083,37 +799,12 @@
   if (mixer_class->reset)
     mixer_class->reset (mix);
   if (mix->fbo) {
-    gst_gl_context_del_fbo (mix->context, mix->fbo, mix->depthbuffer);
+    gst_gl_context_del_fbo (context, mix->fbo, mix->depthbuffer);
     mix->fbo = 0;
     mix->depthbuffer = 0;
   }
-  if (mix->download) {
-    gst_object_unref (mix->download);
-    mix->download = NULL;
-  }
 
-  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;
+  return GST_AGGREGATOR_CLASS (parent_class)->stop (agg);
 }
diff --git a/ext/gl/gstglmixer.h b/ext/gl/gstglmixer.h
index d66ef30..01eed34 100644
--- a/ext/gl/gstglmixer.h
+++ b/ext/gl/gstglmixer.h
@@ -24,10 +24,43 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/gl/gl.h>
-#include "gstglmixerpad.h"
+#include "gstglbasemixer.h"
 
 G_BEGIN_DECLS
 
+typedef struct _GstGLMixer GstGLMixer;
+typedef struct _GstGLMixerClass GstGLMixerClass;
+typedef struct _GstGLMixerPrivate GstGLMixerPrivate;
+typedef struct _GstGLMixerFrameData GstGLMixerFrameData;
+
+#define GST_TYPE_GL_MIXER_PAD (gst_gl_mixer_pad_get_type())
+#define GST_GL_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER_PAD, GstGLMixerPad))
+#define GST_GL_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_MIXER_PAD, GstGLMixerPadClass))
+#define GST_IS_GL_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_MIXER_PAD))
+#define GST_IS_GL_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_MIXER_PAD))
+#define GST_GL_MIXER_PAD_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER_PAD,GstGLMixerPadClass))
+
+typedef struct _GstGLMixerPad GstGLMixerPad;
+typedef struct _GstGLMixerPadClass GstGLMixerPadClass;
+
+/* all information needed for one video stream */
+struct _GstGLMixerPad
+{
+  GstGLBaseMixerPad parent;
+};
+
+struct _GstGLMixerPadClass
+{
+  GstGLBaseMixerPadClass parent_class;
+};
+
+GType gst_gl_mixer_pad_get_type (void);
+
 #define GST_TYPE_GL_MIXER (gst_gl_mixer_get_type())
 #define GST_GL_MIXER(obj) \
         (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER, GstGLMixer))
@@ -40,11 +73,6 @@
 #define GST_GL_MIXER_GET_CLASS(obj) \
         (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER,GstGLMixerClass))
 
-typedef struct _GstGLMixer GstGLMixer;
-typedef struct _GstGLMixerClass GstGLMixerClass;
-typedef struct _GstGLMixerPrivate GstGLMixerPrivate;
-typedef struct _GstGLMixerFrameData GstGLMixerFrameData;
-
 typedef gboolean (*GstGLMixerSetCaps) (GstGLMixer* mixer,
   GstCaps* outcaps);
 typedef void (*GstGLMixerReset) (GstGLMixer *mixer);
@@ -55,27 +83,22 @@
 
 struct _GstGLMixer
 {
-  GstVideoAggregator vaggregator;
-
-  GstGLMixerPrivate *priv;
+  GstGLBaseMixer vaggregator;
 
   GPtrArray *array_buffers;
   GPtrArray *frames;
 
-  GLuint out_tex_id;
-  GstGLDownload *download;
-
-  GstGLDisplay *display;
-  GstGLContext *context;
   GLuint fbo;
   GLuint depthbuffer;
 
   GstCaps *out_caps;
+
+  GstGLMixerPrivate *priv;
 };
 
 struct _GstGLMixerClass
 {
-  GstVideoAggregatorClass parent_class;
+  GstGLBaseMixerClass parent_class;
 
   GstGLMixerSetCaps set_caps;
   GstGLMixerReset reset;
diff --git a/ext/gl/gstglmixerbin.c b/ext/gl/gstglmixerbin.c
new file mode 100644
index 0000000..c6488b5
--- /dev/null
+++ b/ext/gl/gstglmixerbin.c
@@ -0,0 +1,576 @@
+/*
+ *
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gstglmixerbin.h"
+
+#define GST_CAT_DEFAULT gst_gl_mixer_bin_debug
+GST_DEBUG_CATEGORY (gst_gl_mixer_bin_debug);
+
+#define DEFAULT_LATENCY        0
+
+struct input_chain
+{
+  GstGLMixerBin *self;
+  GstGhostPad *ghost_pad;
+  GstElement *upload;
+  GstElement *in_convert;
+  GstPad *mixer_pad;
+};
+
+static void
+_free_input_chain (struct input_chain *chain)
+{
+  if (!chain)
+    return;
+
+  chain->ghost_pad = NULL;
+
+  if (chain->upload) {
+    gst_element_set_state (chain->upload, GST_STATE_NULL);
+    gst_bin_remove (GST_BIN (chain->self), chain->upload);
+    chain->upload = NULL;
+  }
+
+  if (chain->in_convert) {
+    gst_element_set_state (chain->in_convert, GST_STATE_NULL);
+    gst_bin_remove (GST_BIN (chain->self), chain->in_convert);
+    chain->in_convert = NULL;
+  }
+
+  if (chain->mixer_pad) {
+    gst_element_release_request_pad (chain->self->mixer, chain->mixer_pad);
+    gst_object_unref (chain->mixer_pad);
+    chain->mixer_pad = NULL;
+  }
+
+  g_free (chain);
+}
+
+struct _GstGLMixerBinPrivate
+{
+  gboolean running;
+
+  GList *input_chains;
+};
+
+enum
+{
+  PROP_0,
+  PROP_MIXER,
+  PROP_LATENCY,
+};
+
+enum
+{
+  SIGNAL_0,
+  SIGNAL_CREATE_ELEMENT,
+  LAST_SIGNAL
+};
+
+static void gst_gl_mixer_bin_child_proxy_init (gpointer g_iface,
+    gpointer iface_data);
+
+#define GST_GL_MIXER_BIN_GET_PRIVATE(o)					\
+  (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_MIXER_BIN, GstGLMixerBinPrivate))
+G_DEFINE_TYPE_WITH_CODE (GstGLMixerBin, gst_gl_mixer_bin, GST_TYPE_BIN,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
+        gst_gl_mixer_bin_child_proxy_init));
+
+static guint gst_gl_mixer_bin_signals[LAST_SIGNAL] = { 0 };
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw(ANY)")
+    );
+
+static void gst_gl_mixer_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gl_mixer_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_gl_mixer_bin_dispose (GObject * object);
+
+static GstPad *gst_gl_mixer_bin_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps);
+static void gst_gl_mixer_bin_release_pad (GstElement * element, GstPad * pad);
+static GstStateChangeReturn gst_gl_mixer_bin_change_state (GstElement *
+    element, GstStateChange transition);
+
+static void
+gst_gl_mixer_bin_class_init (GstGLMixerBinClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstCaps *upload_caps;
+
+  g_type_class_add_private (klass, sizeof (GstGLMixerBinPrivate));
+
+  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glmixerbin", 0,
+      "opengl mixer bin");
+
+  element_class->request_new_pad = gst_gl_mixer_bin_request_new_pad;
+  element_class->release_pad = gst_gl_mixer_bin_release_pad;
+  element_class->change_state = gst_gl_mixer_bin_change_state;
+
+  gobject_class->get_property = gst_gl_mixer_bin_get_property;
+  gobject_class->set_property = gst_gl_mixer_bin_set_property;
+  gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_gl_mixer_bin_dispose);
+
+  g_object_class_install_property (gobject_class, PROP_MIXER,
+      g_param_spec_object ("mixer",
+          "GL mixer element",
+          "The GL mixer chain to use",
+          GST_TYPE_ELEMENT,
+          GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE |
+          G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_LATENCY,
+      g_param_spec_int64 ("latency", "Buffer latency",
+          "Additional latency in live mode to allow upstream "
+          "to take longer to produce buffers for the current "
+          "position", 0,
+          (G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND - 1),
+          DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstMixerBin::create-element:
+   * @object: the #GstGLMixerBin
+   *
+   * Will be emitted when we need the processing element/s that this bin will use
+   *
+   * Returns: a new #GstElement
+   */
+  gst_gl_mixer_bin_signals[SIGNAL_CREATE_ELEMENT] =
+      g_signal_new ("create-element", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      GST_TYPE_ELEMENT, 0);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_factory));
+
+  upload_caps = gst_gl_upload_get_input_template_caps ();
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("sink_%u", GST_PAD_SINK, GST_PAD_REQUEST,
+          upload_caps));
+  gst_caps_unref (upload_caps);
+
+  gst_element_class_set_metadata (element_class, "OpenGL video_mixer empty bin",
+      "Bin/Filter/Effect/Video/Mixer", "OpenGL video_mixer empty bin",
+      "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_mixer_bin_init (GstGLMixerBin * self)
+{
+  gboolean res = TRUE;
+  GstPad *pad;
+
+  self->priv = GST_GL_MIXER_BIN_GET_PRIVATE (self);
+
+  self->out_convert = gst_element_factory_make ("glcolorconvert", NULL);
+  self->download = gst_element_factory_make ("gldownload", NULL);
+  res &= gst_bin_add (GST_BIN (self), self->out_convert);
+  res &= gst_bin_add (GST_BIN (self), self->download);
+
+  res &=
+      gst_element_link_pads (self->out_convert, "src", self->download, "sink");
+
+  pad = gst_element_get_static_pad (self->download, "src");
+  if (!pad) {
+    res = FALSE;
+  } else {
+    GST_DEBUG_OBJECT (self, "setting target src pad %" GST_PTR_FORMAT, pad);
+    self->srcpad = gst_ghost_pad_new ("src", pad);
+    gst_element_add_pad (GST_ELEMENT_CAST (self), self->srcpad);
+    gst_object_unref (pad);
+  }
+
+  if (!res)
+    GST_ERROR_OBJECT (self, "failed to create output chain");
+}
+
+static void
+gst_gl_mixer_bin_dispose (GObject * object)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (object);
+  GList *l = self->priv->input_chains;
+
+  while (l) {
+    struct input_chain *chain = l->data;
+
+    if (self->mixer && chain->mixer_pad) {
+      gst_element_release_request_pad (GST_ELEMENT (self->mixer),
+          chain->mixer_pad);
+      gst_object_unref (chain->mixer_pad);
+      chain->mixer_pad = NULL;
+    }
+
+    l = l->next;
+  }
+
+  g_list_free_full (self->priv->input_chains, (GDestroyNotify) g_free);
+
+  G_OBJECT_CLASS (gst_gl_mixer_bin_parent_class)->dispose (object);
+}
+
+static gboolean
+_create_input_chain (GstGLMixerBin * self, struct input_chain *chain,
+    GstPad * mixer_pad)
+{
+  GstGLMixerBinClass *klass = GST_GL_MIXER_BIN_GET_CLASS (self);
+  GstPad *pad;
+  gboolean res = TRUE;
+  gchar *name;
+
+  chain->self = self;
+  chain->mixer_pad = mixer_pad;
+
+  chain->upload = gst_element_factory_make ("glupload", NULL);
+  chain->in_convert = gst_element_factory_make ("glcolorconvert", NULL);
+
+  res &= gst_bin_add (GST_BIN (self), chain->in_convert);
+  res &= gst_bin_add (GST_BIN (self), chain->upload);
+
+  pad = gst_element_get_static_pad (chain->in_convert, "src");
+  if (gst_pad_link (pad, mixer_pad) != GST_PAD_LINK_OK) {
+    gst_object_unref (pad);
+    return FALSE;
+  }
+  gst_object_unref (pad);
+  res &=
+      gst_element_link_pads (chain->upload, "src", chain->in_convert, "sink");
+
+  pad = gst_element_get_static_pad (chain->upload, "sink");
+  if (!pad) {
+    return FALSE;
+  } else {
+    GST_DEBUG_OBJECT (self, "setting target sink pad %" GST_PTR_FORMAT, pad);
+    name = gst_object_get_name (GST_OBJECT (mixer_pad));
+    if (klass->create_input_pad) {
+      chain->ghost_pad = klass->create_input_pad (self, chain->mixer_pad);
+      gst_object_set_name (GST_OBJECT (chain->ghost_pad), name);
+      gst_ghost_pad_set_target (chain->ghost_pad, pad);
+    } else {
+      chain->ghost_pad =
+          GST_GHOST_PAD (gst_ghost_pad_new (GST_PAD_NAME (chain->mixer_pad),
+              pad));
+    }
+    g_free (name);
+
+    GST_OBJECT_LOCK (self);
+    if (self->priv->running)
+      gst_pad_set_active (GST_PAD (chain->ghost_pad), TRUE);
+    GST_OBJECT_UNLOCK (self);
+
+    gst_element_add_pad (GST_ELEMENT_CAST (self), GST_PAD (chain->ghost_pad));
+    gst_object_unref (pad);
+  }
+
+  gst_element_sync_state_with_parent (chain->upload);
+  gst_element_sync_state_with_parent (chain->in_convert);
+
+  return TRUE;
+}
+
+static GstPadTemplate *
+_find_element_pad_template (GstElement * element,
+    GstPadDirection direction, GstPadPresence presence)
+{
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
+  GList *templ_list = gst_element_class_get_pad_template_list (klass);
+  GstPadTemplate *templ;
+
+  /* find suitable template */
+  while (templ_list) {
+    templ = (GstPadTemplate *) templ_list->data;
+
+    if (GST_PAD_TEMPLATE_DIRECTION (templ) != direction
+        || GST_PAD_TEMPLATE_PRESENCE (templ) != presence) {
+      templ_list = templ_list->next;
+      templ = NULL;
+      continue;
+    }
+
+    break;
+  }
+
+  return templ;
+}
+
+static gboolean
+_connect_mixer_element (GstGLMixerBin * self)
+{
+  gboolean res = TRUE;
+
+  g_return_val_if_fail (self->priv->input_chains == NULL, FALSE);
+
+  gst_object_set_name (GST_OBJECT (self->mixer), "mixer");
+  res &= gst_bin_add (GST_BIN (self), self->mixer);
+
+  res &= gst_element_link_pads (self->mixer, "src", self->out_convert, "sink");
+
+  if (!res)
+    GST_ERROR_OBJECT (self, "Failed to link mixer element into the pipeline");
+
+  gst_element_sync_state_with_parent (self->mixer);
+
+  return res;
+}
+
+void
+gst_gl_mixer_bin_finish_init_with_element (GstGLMixerBin * self,
+    GstElement * element)
+{
+  g_return_if_fail (GST_IS_ELEMENT (element));
+
+  self->mixer = element;
+
+  if (!_connect_mixer_element (self)) {
+    gst_object_unref (self->mixer);
+    self->mixer = NULL;
+  }
+}
+
+void
+gst_gl_mixer_bin_finish_init (GstGLMixerBin * self)
+{
+  GstGLMixerBinClass *klass = GST_GL_MIXER_BIN_GET_CLASS (self);
+  GstElement *element = NULL;
+
+  if (klass->create_element)
+    element = klass->create_element ();
+
+  if (element)
+    gst_gl_mixer_bin_finish_init_with_element (self, element);
+}
+
+static void
+gst_gl_mixer_bin_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (object);
+
+  switch (prop_id) {
+    case PROP_MIXER:
+      g_value_set_object (value, self->mixer);
+      break;
+    default:
+      if (self->mixer)
+        g_object_get_property (G_OBJECT (self->mixer), pspec->name, value);
+      break;
+  }
+}
+
+static void
+gst_gl_mixer_bin_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (object);
+
+  switch (prop_id) {
+    case PROP_MIXER:
+    {
+      GstElement *mixer = g_value_get_object (value);
+      /* FIXME: deal with replacing a mixer */
+      g_return_if_fail (!self->mixer || (self->mixer == mixer));
+      self->mixer = mixer;
+      if (mixer) {
+        gst_object_ref_sink (mixer);
+        _connect_mixer_element (self);
+      }
+      break;
+    }
+    default:
+      if (self->mixer)
+        g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+      break;
+  }
+}
+
+static GstPad *
+gst_gl_mixer_bin_request_new_pad (GstElement * element, GstPadTemplate * templ,
+    const gchar * req_name, const GstCaps * caps)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (element);
+  GstPadTemplate *mixer_templ;
+  struct input_chain *chain;
+  GstPad *mixer_pad;
+
+  chain = g_new0 (struct input_chain, 1);
+
+  mixer_templ = _find_element_pad_template (self->mixer,
+      GST_PAD_TEMPLATE_DIRECTION (templ), GST_PAD_TEMPLATE_PRESENCE (templ));
+  g_return_val_if_fail (mixer_templ, NULL);
+
+  mixer_pad =
+      gst_element_request_pad (self->mixer, mixer_templ, req_name, NULL);
+  g_return_val_if_fail (mixer_pad, NULL);
+
+  if (!_create_input_chain (self, chain, mixer_pad)) {
+    gst_element_release_request_pad (self->mixer, mixer_pad);
+    _free_input_chain (chain);
+    return NULL;
+  }
+
+  GST_OBJECT_LOCK (element);
+  self->priv->input_chains = g_list_prepend (self->priv->input_chains, chain);
+  GST_OBJECT_UNLOCK (element);
+
+  gst_child_proxy_child_added (GST_CHILD_PROXY (self),
+      G_OBJECT (chain->ghost_pad), GST_OBJECT_NAME (chain->ghost_pad));
+
+  return GST_PAD (chain->ghost_pad);
+}
+
+static void
+gst_gl_mixer_bin_release_pad (GstElement * element, GstPad * pad)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (element);
+  GList *l = self->priv->input_chains;
+  gboolean released = FALSE;
+
+  GST_OBJECT_LOCK (element);
+  while (l) {
+    struct input_chain *chain = l->data;
+    if (GST_PAD (chain->ghost_pad) == pad) {
+      self->priv->input_chains =
+          g_list_remove_link (self->priv->input_chains, l);
+      GST_OBJECT_UNLOCK (element);
+
+      _free_input_chain (chain);
+      gst_element_remove_pad (element, pad);
+      released = TRUE;
+      break;
+    }
+    l = l->next;
+  }
+  if (!released)
+    GST_OBJECT_UNLOCK (element);
+}
+
+static GstStateChangeReturn
+gst_gl_mixer_bin_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (element);
+  GstGLMixerBinClass *klass = GST_GL_MIXER_BIN_GET_CLASS (self);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      GST_OBJECT_LOCK (element);
+      if (!self->mixer) {
+        if (klass->create_element)
+          self->mixer = klass->create_element ();
+
+        if (!self->mixer)
+          g_signal_emit (element,
+              gst_gl_mixer_bin_signals[SIGNAL_CREATE_ELEMENT], 0, &self->mixer);
+
+        if (!self->mixer) {
+          GST_ERROR_OBJECT (element, "Failed to retrieve element");
+          GST_OBJECT_UNLOCK (element);
+          return GST_STATE_CHANGE_FAILURE;
+        }
+        GST_OBJECT_UNLOCK (element);
+        if (!_connect_mixer_element (self))
+          return GST_STATE_CHANGE_FAILURE;
+
+        GST_OBJECT_LOCK (element);
+      }
+      self->priv->running = TRUE;
+      GST_OBJECT_UNLOCK (element);
+      break;
+    default:
+      break;
+  }
+
+  ret =
+      GST_ELEMENT_CLASS (gst_gl_mixer_bin_parent_class)->change_state (element,
+      transition);
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      GST_OBJECT_LOCK (self);
+      self->priv->running = FALSE;
+      GST_OBJECT_UNLOCK (self);
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static GObject *
+gst_gl_mixer_bin_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
+    guint index)
+{
+  GstGLMixerBin *mixer = GST_GL_MIXER_BIN (child_proxy);
+  GstBin *bin = GST_BIN_CAST (child_proxy);
+  GObject *res = NULL;
+
+  GST_OBJECT_LOCK (bin);
+  /* XXX: not exactly thread safe with ordering */
+  if (index < bin->numchildren) {
+    if ((res = g_list_nth_data (bin->children, index)))
+      gst_object_ref (res);
+  } else {
+    struct input_chain *chain;
+    if ((chain =
+            g_list_nth_data (mixer->priv->input_chains,
+                index - bin->numchildren))) {
+      res = gst_object_ref (chain->ghost_pad);
+    }
+  }
+  GST_OBJECT_UNLOCK (bin);
+
+  return res;
+}
+
+static guint
+gst_gl_mixer_bin_child_proxy_get_children_count (GstChildProxy * child_proxy)
+{
+  GstGLMixerBin *mixer = GST_GL_MIXER_BIN (child_proxy);
+  GstBin *bin = GST_BIN_CAST (child_proxy);
+  guint num;
+
+  GST_OBJECT_LOCK (bin);
+  num = bin->numchildren + g_list_length (mixer->priv->input_chains);
+  GST_OBJECT_UNLOCK (bin);
+
+  return num;
+}
+
+static void
+gst_gl_mixer_bin_child_proxy_init (gpointer g_iface, gpointer iface_data)
+{
+  GstChildProxyInterface *iface = g_iface;
+
+  iface->get_children_count = gst_gl_mixer_bin_child_proxy_get_children_count;
+  iface->get_child_by_index = gst_gl_mixer_bin_child_proxy_get_child_by_index;
+}
diff --git a/ext/gl/gstglmixerbin.h b/ext/gl/gstglmixerbin.h
new file mode 100644
index 0000000..5e5bb60
--- /dev/null
+++ b/ext/gl/gstglmixerbin.h
@@ -0,0 +1,72 @@
+/*
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@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_MIXER_BIN_H__
+#define __GST_GL_MIXER_BIN_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_mixer_bin_get_type(void);
+#define GST_TYPE_GL_MIXER_BIN (gst_gl_mixer_bin_get_type())
+#define GST_GL_MIXER_BIN(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER_BIN, GstGLMixerBin))
+#define GST_GL_MIXER_BIN_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_MIXER_BIN, GstGLMixerBinClass))
+#define GST_IS_GL_MIXER_BIN(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_MIXER_BIN))
+#define GST_IS_GL_MIXER_BIN_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_MIXER_BIN))
+#define GST_GL_MIXER_BIN_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER_BIN,GstGLMixerBinClass))
+
+typedef struct _GstGLMixerBin GstGLMixerBin;
+typedef struct _GstGLMixerBinClass GstGLMixerBinClass;
+typedef struct _GstGLMixerBinPrivate GstGLMixerBinPrivate;
+
+struct _GstGLMixerBin
+{
+  GstBin parent;
+
+  GstElement *mixer;
+  GstElement *out_convert;
+  GstElement *download;
+  GstPad *srcpad;
+
+  GstGLMixerBinPrivate *priv;
+};
+
+struct _GstGLMixerBinClass
+{
+  GstBinClass parent_class;
+
+  GstElement * (*create_element) (void);
+  GstGhostPad * (*create_input_pad) (GstGLMixerBin * self, GstPad * mixer_pad);
+};
+
+void gst_gl_mixer_bin_finish_init (GstGLMixerBin * self);
+void gst_gl_mixer_bin_finish_init_with_element (GstGLMixerBin * self,
+    GstElement * element);
+
+G_END_DECLS
+#endif /* __GST_GL_MIXER_BIN_H__ */
diff --git a/ext/gl/gstglmixerpad.h b/ext/gl/gstglmixerpad.h
deleted file mode 100644
index d2fb829..0000000
--- a/ext/gl/gstglmixerpad.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* 
- * GStreamer
- * Copyright (C) 2009 Julien Isorce <julien.isorce@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_MIXER_PAD_H__
-#define __GST_GL_MIXER_PAD_H__
-
-#include <gst/gst.h>
-#include <gst/video/gstvideoaggregator.h>
-
-#include <gst/gl/gstgldisplay.h>
-#include <gst/gl/gstglupload.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_GL_MIXER_PAD (gst_gl_mixer_pad_get_type())
-#define GST_GL_MIXER_PAD(obj) \
-        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER_PAD, GstGLMixerPad))
-#define GST_GL_MIXER_PAD_CLASS(klass) \
-        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_MIXER_PAD, GstGLMixerPadiClass))
-#define GST_IS_GL_MIXER_PAD(obj) \
-        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_MIXER_PAD))
-#define GST_IS_GL_MIXER_PAD_CLASS(klass) \
-        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_MIXER_PAD))
-
-typedef struct _GstGLMixerPad GstGLMixerPad;
-typedef struct _GstGLMixerPadClass GstGLMixerPadClass;
-
-/* all information needed for one video stream */
-struct _GstGLMixerPad
-{
-  GstVideoAggregatorPad parent;                /* subclass the pad */
-
-  /* <private> */
-  GstGLUpload *upload;
-  guint in_tex_id;
-  gboolean mapped;
-};
-
-struct _GstGLMixerPadClass
-{
-  GstVideoAggregatorPadClass parent_class;
-};
-
-GType gst_gl_mixer_pad_get_type (void);
-
-G_END_DECLS
-#endif /* __GST_GL_MIXER_PAD_H__ */
diff --git a/ext/gl/gstglmosaic.c b/ext/gl/gstglmosaic.c
index 5a5c418..0a98341 100644
--- a/ext/gl/gstglmosaic.c
+++ b/ext/gl/gstglmosaic.c
@@ -29,7 +29,12 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch-0.10 videotestsrc ! "video/x-raw-yuv, format=(fourcc)YUY2" ! glupload ! queue ! glmosaic name=m ! glimagesink videotestsrc pattern=12 ! "video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)5/1, width=100, height=200" ! glupload ! queue ! m. videotestsrc ! "video/x-raw-rgb, framerate=(fraction)15/1, width=1500, height=1500" ! glupload ! gleffects effect=3 ! queue ! m. videotestsrc ! glupload ! gleffects effect=2 ! queue ! m.  videotestsrc ! glupload ! glfiltercube ! queue ! m. videotestsrc ! glupload ! gleffects effect=6 ! queue ! m.
+ * gst-launch-1.0 videotestsrc ! video/x-raw, format=YUY2 ! queue ! glmosaic name=m ! glimagesink \
+ *     videotestsrc pattern=12 ! video/x-raw, format=I420, framerate=5/1, width=100, height=200 ! queue ! m. \
+ *     videotestsrc ! video/x-raw, framerate=15/1, width=1500, height=1500 ! gleffects effect=3 ! queue ! m. \
+ *     videotestsrc ! gleffects effect=2 ! queue ! m.  \
+ *     videotestsrc ! glfiltercube ! queue ! m. \
+ *     videotestsrc ! gleffects effect=6 ! queue ! m.
  * ]|
  * FBO (Frame Buffer Object) is required.
  * </refsect2>
@@ -129,6 +134,8 @@
   GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_mosaic_init_shader;
   GST_GL_MIXER_CLASS (klass)->reset = gst_gl_mosaic_reset;
   GST_GL_MIXER_CLASS (klass)->process_textures = gst_gl_mosaic_process_textures;
+
+  GST_GL_BASE_MIXER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
 }
 
 static void
@@ -173,7 +180,8 @@
 
   //blocking call, wait the opengl thread has destroyed the shader
   if (mosaic->shader)
-    gst_gl_context_del_shader (mixer->context, mosaic->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_MIXER (mixer)->context,
+        mosaic->shader);
   mosaic->shader = NULL;
 }
 
@@ -183,8 +191,8 @@
   GstGLMosaic *mosaic = GST_GL_MOSAIC (mixer);
 
   //blocking call, wait the opengl thread has compiled the shader
-  return gst_gl_context_gen_shader (mixer->context, mosaic_v_src, mosaic_f_src,
-      &mosaic->shader);
+  return gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context,
+      mosaic_v_src, mosaic_f_src, &mosaic->shader);
 }
 
 static gboolean
@@ -196,7 +204,7 @@
   mosaic->input_frames = frames;
 
   //blocking call, use a FBO
-  gst_gl_context_use_fbo_v2 (mix->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_MIXER (mix)->context,
       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);
@@ -210,7 +218,7 @@
 {
   GstGLMosaic *mosaic = GST_GL_MOSAIC (stuff);
   GstGLMixer *mixer = GST_GL_MIXER (mosaic);
-  GstGLFuncs *gl = mixer->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_MIXER (mixer)->context->gl_vtable;
 
   static GLfloat xrot = 0;
   static GLfloat yrot = 0;
@@ -232,9 +240,8 @@
 
   guint count = 0;
 
-  gst_gl_context_clear_shader (mixer->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_MIXER (mixer)->context);
   gl->BindTexture (GL_TEXTURE_2D, 0);
-  gl->Disable (GL_TEXTURE_2D);
 
   gl->Enable (GL_DEPTH_TEST);
 
@@ -337,7 +344,7 @@
 
   gl->Disable (GL_DEPTH_TEST);
 
-  gst_gl_context_clear_shader (mixer->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_MIXER (mixer)->context);
 
   xrot += 0.6f;
   yrot += 0.4f;
diff --git a/ext/gl/gstgloverlay.c b/ext/gl/gstgloverlay.c
index ba108a9..ca07f8b 100644
--- a/ext/gl/gstgloverlay.c
+++ b/ext/gl/gstgloverlay.c
@@ -26,18 +26,17 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch  videotestsrc ! "video/x-raw-rgb" ! glupload ! gloverlay location=imagefile ! glimagesink
+ * gst-launch-1.0 videotestsrc ! gloverlay location=image.jpg ! glimagesink
  * ]|
  * FBO (Frame Buffer Object) is required.
  * </refsect2>
  */
 
-/* FIXME: Redo this */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include <gst/base/gsttypefindhelper.h>
 #include <gst/gl/gstglconfig.h>
 
 #include "gstgloverlay.h"
@@ -70,39 +69,66 @@
 static void gst_gl_overlay_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static void gst_gl_overlay_init_resources (GstGLFilter * filter);
-static void gst_gl_overlay_reset_resources (GstGLFilter * filter);
-
+static void gst_gl_overlay_before_transform (GstBaseTransform * trans,
+    GstBuffer * outbuf);
 static gboolean gst_gl_overlay_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
 
-static gint gst_gl_overlay_load_png (GstGLFilter * filter);
-static gint gst_gl_overlay_load_jpeg (GstGLFilter * filter);
+static gboolean gst_gl_overlay_load_png (GstGLOverlay * overlay, FILE * fp);
+static gboolean gst_gl_overlay_load_jpeg (GstGLOverlay * overlay, FILE * fp);
 
 enum
 {
   PROP_0,
   PROP_LOCATION,
-  PROP_XPOS_PNG,
-  PROP_YPOS_PNG,
-  PROP_SIZE_PNG,
-  PROP_XPOS_VIDEO,
-  PROP_YPOS_VIDEO,
-  PROP_SIZE_VIDEO,
-  PROP_VIDEOTOP,
-  PROP_ROTATE_PNG,
-  PROP_ROTATE_VIDEO,
-  PROP_ANGLE_PNG,
-  PROP_ANGLE_VIDEO,
-  PROP_RATIO_VIDEO
+  PROP_OFFSET_X,
+  PROP_OFFSET_Y,
+  PROP_RELATIVE_X,
+  PROP_RELATIVE_Y,
+  PROP_OVERLAY_WIDTH,
+  PROP_OVERLAY_HEIGHT,
+  PROP_ALPHA
 };
 
+/* *INDENT-OFF* */
+/* vertex source */
+static const gchar *overlay_v_src =
+    "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"
+    "}";
+
+/* fragment source */
+static const gchar *overlay_f_src =
+    "#ifdef GL_ES\n"
+    "precision mediump float;\n"
+    "#endif\n"
+    "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, rgba.a * alpha);\n"
+    "}\n";
+/* *INDENT-ON* */
 
 /* init resources that need a gl context */
-static void
+static gboolean
 gst_gl_overlay_init_gl_resources (GstGLFilter * filter)
 {
-//  GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
+  GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
+
+  if (overlay->shader)
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context,
+        overlay->shader);
+
+  return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+      overlay_v_src, overlay_f_src, &overlay->shader);
 }
 
 /* free resources that need a gl context */
@@ -110,9 +136,43 @@
 gst_gl_overlay_reset_gl_resources (GstGLFilter * filter)
 {
   GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
-  gl->DeleteTextures (1, &overlay->pbuftexture);
+  if (overlay->shader) {
+    gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context,
+        overlay->shader);
+    overlay->shader = NULL;
+  }
+
+  if (overlay->image_memory) {
+    gst_memory_unref ((GstMemory *) overlay->image_memory);
+    overlay->image_memory = NULL;
+  }
+
+  if (overlay->vao) {
+    gl->DeleteVertexArrays (1, &overlay->vao);
+    overlay->vao = 0;
+  }
+
+  if (overlay->vbo) {
+    gl->DeleteBuffers (1, &overlay->vbo);
+    overlay->vbo = 0;
+  }
+
+  if (overlay->vbo_indices) {
+    gl->DeleteBuffers (1, &overlay->vbo_indices);
+    overlay->vbo_indices = 0;
+  }
+
+  if (overlay->overlay_vao) {
+    gl->DeleteVertexArrays (1, &overlay->overlay_vao);
+    overlay->overlay_vao = 0;
+  }
+
+  if (overlay->overlay_vbo) {
+    gl->DeleteBuffers (1, &overlay->overlay_vbo);
+    overlay->overlay_vbo = 0;
+  }
 }
 
 static void
@@ -129,311 +189,84 @@
 
   GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_overlay_set_caps;
   GST_GL_FILTER_CLASS (klass)->filter_texture = gst_gl_overlay_filter_texture;
-  GST_GL_FILTER_CLASS (klass)->display_init_cb =
-      gst_gl_overlay_init_gl_resources;
   GST_GL_FILTER_CLASS (klass)->display_reset_cb =
       gst_gl_overlay_reset_gl_resources;
-  GST_GL_FILTER_CLASS (klass)->onStart = gst_gl_overlay_init_resources;
-  GST_GL_FILTER_CLASS (klass)->onStop = gst_gl_overlay_reset_resources;
+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_overlay_init_gl_resources;
 
-  g_object_class_install_property (gobject_class,
-      PROP_LOCATION,
-      g_param_spec_string ("location",
-          "Location of the image",
-          "Location of the image", NULL,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  GST_BASE_TRANSFORM_CLASS (klass)->before_transform =
+      GST_DEBUG_FUNCPTR (gst_gl_overlay_before_transform);
 
-  g_object_class_install_property (gobject_class,
-      PROP_XPOS_PNG,
-      g_param_spec_int ("xpos-png",
-          "X position of overlay image in percents",
-          "X position of overlay image in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_YPOS_PNG,
-      g_param_spec_int ("ypos-png",
-          "Y position of overlay image in percents",
-          "Y position of overlay image in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_SIZE_PNG,
-      g_param_spec_int ("proportion-png",
-          "Relative size of overlay image, in percents",
-          "Relative size of iverlay image, in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_XPOS_VIDEO,
-      g_param_spec_int ("xpos-video",
-          "X position of overlay video in percents",
-          "X position of overlay video in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_YPOS_VIDEO,
-      g_param_spec_int ("ypos-video",
-          "Y position of overlay video in percents",
-          "Y position of overlay video in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_SIZE_VIDEO,
-      g_param_spec_int ("proportion-video",
-          "Relative size of overlay video, in percents",
-          "Relative size of iverlay video, in percents",
-          0, 100, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_VIDEOTOP,
-      g_param_spec_boolean ("video-top",
-          "Video-top", "Video is over png image", FALSE,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_ROTATE_PNG,
-      g_param_spec_int ("rotate-png",
-          "choose rotation axis for the moment only Y axis is implemented",
-          "choose rotation axis for the moment only Y axis is implemented",
-          0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_ROTATE_VIDEO,
-      g_param_spec_int ("rotate-video",
-          "choose rotation axis for the moment only Y axis is implemented",
-          "choose rotation axis for the moment only Y axis is implemented",
-          0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_ANGLE_PNG,
-      g_param_spec_int ("angle-png",
-          "choose angle in axis to choosen between -90 and 90",
-          "choose angle in axis to choosen between -90 and 90",
-          -90, 90, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_ANGLE_VIDEO,
-      g_param_spec_int ("angle-video",
-          "choose angle in axis to choosen between -90 and 90",
-          "choose angle in axis to choosen between -90 and 90",
-          -90, 90, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class,
-      PROP_RATIO_VIDEO,
-      g_param_spec_int ("ratio-video",
-          "choose ratio video between 0 and 3\n \t\t\t0 : Default ratio\n\t\t\t1 : 4 / 3\n\t\t\t2 : 16 / 9\n\t\t\t3 : 16 / 10",
-          "choose ratio video between 0 and 3\n \t\t\t0 : Default ratio\n\t\t\t1 : 4 / 3\n\t\t\t2 : 16 / 9\n\t\t\t3 : 16 / 10",
-          0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_LOCATION,
+      g_param_spec_string ("location", "location",
+          "Location of image file to overlay", NULL, GST_PARAM_CONTROLLABLE
+          | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OFFSET_X,
+      g_param_spec_int ("offset-x", "X Offset",
+          "For positive value, horizontal offset of overlay image in pixels from"
+          " left of video image. For negative value, horizontal offset of overlay"
+          " image in pixels from right of video image", G_MININT, G_MAXINT, 0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OFFSET_Y,
+      g_param_spec_int ("offset-y", "Y Offset",
+          "For positive value, vertical offset of overlay image in pixels from"
+          " top of video image. For negative value, vertical offset of overlay"
+          " image in pixels from bottom of video image", G_MININT, G_MAXINT, 0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_RELATIVE_X,
+      g_param_spec_double ("relative-x", "Relative X Offset",
+          "Horizontal offset of overlay image in fractions of video image "
+          "width, from top-left corner of video image", 0.0, 1.0, 0.0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_RELATIVE_Y,
+      g_param_spec_double ("relative-y", "Relative Y Offset",
+          "Vertical offset of overlay image in fractions of video image "
+          "height, from top-left corner of video image", 0.0, 1.0, 0.0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OVERLAY_WIDTH,
+      g_param_spec_int ("overlay-width", "Overlay Width",
+          "Width of overlay image in pixels (0 = same as overlay image)", 0,
+          G_MAXINT, 0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OVERLAY_HEIGHT,
+      g_param_spec_int ("overlay-height", "Overlay Height",
+          "Height of overlay image in pixels (0 = same as overlay image)", 0,
+          G_MAXINT, 0,
+          GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE
+          | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ALPHA,
+      g_param_spec_double ("alpha", "Alpha", "Global alpha of overlay image",
+          0.0, 1.0, 1.0, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING
+          | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gst_element_class_set_metadata (element_class,
       "Gstreamer OpenGL Overlay", "Filter/Effect/Video",
-      "Overlay GL video texture with a PNG image",
-      "Filippo Argiolas <filippo.argiolas@gmail.com>");
+      "Overlay GL video texture with a JPEG/PNG image",
+      "Filippo Argiolas <filippo.argiolas@gmail.com>, "
+      "Matthew Waters <matthew@centricular.com>");
 
-  /*
-     g_object_class_install_property (gobject_class,
-     PROP_STRETCH,
-     g_param_spec_boolean ("stretch",
-     "Stretch the image to texture size",
-     "Stretch the image to fit video texture size",
-     TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-   */
-}
-
-static void
-gst_gl_overlay_calc_ratio_video (GstGLOverlay * o, gfloat * video_ratio_w,
-    gfloat * video_ratio_h)
-{
-  if (o->ratio_video == 0) {
-    o->ratio_texture = (gfloat) o->ratio_window;
-    *video_ratio_w = (gfloat) o->width_window;
-    *video_ratio_h = (gfloat) o->height_window;
-  } else if (o->ratio_video == 1) {
-    o->ratio_texture = (gfloat) 1.33;
-    *video_ratio_w = 4.0;
-    *video_ratio_h = 3.0;
-  } else if (o->ratio_video == 2) {
-    o->ratio_texture = (gfloat) 1.77;
-    *video_ratio_w = 16.0;
-    *video_ratio_h = 9.0;
-  } else {
-    o->ratio_texture = (gfloat) 1.6;
-    *video_ratio_w = 16.0;
-    *video_ratio_h = 10.0;
-  }
-}
-
-static void
-gst_gl_overlay_init_texture (GstGLOverlay * o, GLuint tex, int flag)
-{
-  GstGLFilter *filter = GST_GL_FILTER (o);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
-
-  if (flag == 0 && o->type_file == 2) {
-    gl->Enable (GL_TEXTURE_2D);
-    gl->BindTexture (GL_TEXTURE_2D, tex);
-  } else {
-    gl->Enable (GL_TEXTURE_2D);
-    gl->BindTexture (GL_TEXTURE_2D, tex);
-  }
-}
-
-static void
-gst_gl_overlay_draw (GstGLOverlay * o, int flag)
-{
-  GstGLFilter *filter = GST_GL_FILTER (o);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
-
-  float y = 0.0f;
-  float width = 0.0f;
-  float height = 0.0f;
-
-/* *INDENT-OFF* */
-  float v_vertices[] = {
- /*|            Vertex             | TexCoord  |*/
-    -o->ratio_x + o->posx, y, 0.0f, 0.0f,  0.0f,
-     o->ratio_x + o->posx, y, 0.0f, width, 0.0f,
-     o->ratio_x + o->posx, y, 0.0f, width, height,
-    -o->ratio_x + o->posx, y, 0.0f, 0.0,   height,
-  };
-
-  GLushort indices[] = {
-    0, 1, 2,
-    0, 2, 3,
-  };
-/* *INDENT-ON* */
-
-  if (flag == 1) {
-    width = 1.0f;
-    height = 1.0f;
-  } else if (flag == 0 && o->type_file == 1) {
-    width = (gfloat) o->width;
-    height = (gfloat) o->height;
-  } else if (flag == 0 && o->type_file == 2) {
-    width = 1.0f;
-    height = 1.0f;
-  }
-
-  v_vertices[8] = width;
-  v_vertices[13] = width;
-  v_vertices[14] = height;
-  v_vertices[19] = height;
-
-  y = (o->type_file == 2 && flag == 0 ? o->ratio_y : -o->ratio_y) + o->posy;
-  v_vertices[1] = y;
-  v_vertices[6] = y;
-  y = (o->type_file == 2 && flag == 0 ? -o->ratio_y : o->ratio_y) + o->posy;
-  v_vertices[11] = y;
-  v_vertices[16] = y;
-
-  gst_gl_context_clear_shader (filter->context);
-
-  gl->ClientActiveTexture (GL_TEXTURE0);
-  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->EnableClientState (GL_VERTEX_ARRAY);
-
-  gl->VertexPointer (3, GL_FLOAT, 5 * sizeof (float), v_vertices);
-  gl->TexCoordPointer (2, GL_FLOAT, 5 * sizeof (float), &v_vertices[3]);
-
-  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
-
-  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-  gl->DisableClientState (GL_VERTEX_ARRAY);
-}
-
-static void
-gst_gl_overlay_calc_proportion (GstGLOverlay * o, int flag, float size_texture,
-    float width, float height)
-{
-  if ((1.59f < o->ratio_window && o->ratio_window < 1.61f
-          && 1.77f < o->ratio_texture && o->ratio_texture < 1.78f)
-      || (1.3f < o->ratio_window && o->ratio_window < 1.34f
-          && ((1.7f < o->ratio_texture && o->ratio_texture < 1.78f)
-              || (1.59f < o->ratio_texture && o->ratio_texture < 1.61f)))) {
-    o->ratio_x = o->ratio_window * (gfloat) size_texture / 100.0f;
-    o->ratio_y =
-        (o->ratio_window / width) * height * (gfloat) size_texture / 100.0f;
-  } else {
-    o->ratio_x = o->ratio_texture * (gfloat) size_texture / 100.0f;
-    o->ratio_y = 1.0f * size_texture / 100.0f;
-  }
-  o->posx =
-      ((o->ratio_window - o->ratio_x) * ((flag ==
-              1 ? o->pos_x_video : o->pos_x_png) - 50.0f) / 50.0f);
-  o->posy =
-      (1.0f - o->ratio_y) * (((flag ==
-              1 ? o->pos_y_video : o->pos_y_png) - 50.0f) / 50.0f);
-}
-
-static void
-gst_gl_overlay_load_texture (GstGLOverlay * o, GLuint tex, int flag)
-{
-  GstGLFilter *filter = GST_GL_FILTER (o);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
-
-  gfloat video_ratio_w;
-  gfloat video_ratio_h;
-
-  o->ratio_window = (gfloat) o->width_window / (gfloat) o->height_window;
-
-  gl->MatrixMode (GL_MODELVIEW);
-  gl->ActiveTexture (GL_TEXTURE0);
-
-  gst_gl_overlay_init_texture (o, tex, flag);
-
-  gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  gl->Enable (GL_BLEND);
-  gl->Translatef (0.0f, 0.0f, -1.43f);
-
-  if (flag == 1) {
-    if (o->rotate_video)
-      gl->Rotatef (o->angle_video, 0, 1, 0);
-    gst_gl_overlay_calc_ratio_video (o, &video_ratio_w, &video_ratio_h);
-    gst_gl_overlay_calc_proportion (o, flag, o->size_video, video_ratio_w,
-        video_ratio_h);
-  } else {
-    o->ratio_texture = (gfloat) o->width / (gfloat) o->height;
-    if (o->rotate_png == 2)
-      gl->Rotatef (o->angle_png, 0, 1, 0);
-    gst_gl_overlay_calc_proportion (o, flag, o->size_png, (gfloat) o->width,
-        (gfloat) o->height);
-  }
-
-  gst_gl_overlay_draw (o, flag);
-  if (flag == 1)
-    gl->Disable (GL_TEXTURE_2D);
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
 }
 
 static void
 gst_gl_overlay_init (GstGLOverlay * overlay)
 {
-  overlay->location = NULL;
-  overlay->pixbuf = NULL;
-  overlay->pbuftexture = 0;
-  overlay->pbuftexture = 0;
-  overlay->width = 0;
-  overlay->height = 0;
-  overlay->pos_x_png = 0;
-  overlay->pos_y_png = 0;
-  overlay->size_png = 100;
-  overlay->pos_x_video = 0;
-  overlay->pos_y_video = 0;
-  overlay->size_video = 100;
-  overlay->video_top = FALSE;
-  overlay->rotate_png = 0;
-  overlay->rotate_video = 0;
-  overlay->angle_png = 0;
-  overlay->angle_video = 0;
-  overlay->ratio_video = 0;
-  //  overlay->stretch = TRUE;
-  overlay->pbuf_has_changed = FALSE;
-}
+  overlay->offset_x = 0;
+  overlay->offset_y = 0;
 
-static void
-gst_gl_overlay_reset_resources (GstGLFilter * filter)
-{
-  // GstGLOverlay* overlay = GST_GL_OVERLAY(filter);
+  overlay->relative_x = 0.0;
+  overlay->relative_y = 0.0;
+
+  overlay->overlay_width = 0;
+  overlay->overlay_height = 0;
+
+  overlay->alpha = 1.0;
 }
 
 static void
@@ -446,49 +279,36 @@
     case PROP_LOCATION:
       if (overlay->location != NULL)
         g_free (overlay->location);
-      overlay->pbuf_has_changed = TRUE;
+      overlay->location_has_changed = TRUE;
       overlay->location = g_value_dup_string (value);
       break;
-    case PROP_XPOS_PNG:
-      overlay->pos_x_png = g_value_get_int (value);
+    case PROP_OFFSET_X:
+      overlay->offset_x = g_value_get_int (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_YPOS_PNG:
-      overlay->pos_y_png = g_value_get_int (value);
+    case PROP_OFFSET_Y:
+      overlay->offset_y = g_value_get_int (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_SIZE_PNG:
-      overlay->size_png = g_value_get_int (value);
+    case PROP_RELATIVE_X:
+      overlay->relative_x = g_value_get_double (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_XPOS_VIDEO:
-      overlay->pos_x_video = g_value_get_int (value);
+    case PROP_RELATIVE_Y:
+      overlay->relative_y = g_value_get_double (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_YPOS_VIDEO:
-      overlay->pos_y_video = g_value_get_int (value);
+    case PROP_OVERLAY_WIDTH:
+      overlay->overlay_width = g_value_get_int (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_SIZE_VIDEO:
-      overlay->size_video = g_value_get_int (value);
+    case PROP_OVERLAY_HEIGHT:
+      overlay->overlay_height = g_value_get_int (value);
+      overlay->geometry_change = TRUE;
       break;
-    case PROP_VIDEOTOP:
-      overlay->video_top = g_value_get_boolean (value);
+    case PROP_ALPHA:
+      overlay->alpha = g_value_get_double (value);
       break;
-    case PROP_ROTATE_PNG:
-      overlay->rotate_png = g_value_get_int (value);
-      break;
-    case PROP_ROTATE_VIDEO:
-      overlay->rotate_video = g_value_get_int (value);
-      break;
-    case PROP_ANGLE_PNG:
-      overlay->angle_png = g_value_get_int (value);
-      break;
-    case PROP_ANGLE_VIDEO:
-      overlay->angle_video = g_value_get_int (value);
-      break;
-    case PROP_RATIO_VIDEO:
-      overlay->ratio_video = (gfloat) g_value_get_int (value);
-      break;
-      /*  case PROP_STRETCH:
-         overlay->stretch = g_value_get_boolean (value);
-         break;
-       */
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -505,46 +325,27 @@
     case PROP_LOCATION:
       g_value_set_string (value, overlay->location);
       break;
-    case PROP_XPOS_PNG:
-      g_value_set_int (value, overlay->pos_x_png);
+    case PROP_OFFSET_X:
+      g_value_set_int (value, overlay->offset_x);
       break;
-    case PROP_YPOS_PNG:
-      g_value_set_int (value, overlay->pos_y_png);
+    case PROP_OFFSET_Y:
+      g_value_set_int (value, overlay->offset_y);
       break;
-    case PROP_SIZE_PNG:
-      g_value_set_int (value, overlay->size_png);
+    case PROP_RELATIVE_X:
+      g_value_set_double (value, overlay->relative_x);
       break;
-    case PROP_XPOS_VIDEO:
-      g_value_set_int (value, overlay->pos_x_video);
+    case PROP_RELATIVE_Y:
+      g_value_set_double (value, overlay->relative_y);
       break;
-    case PROP_YPOS_VIDEO:
-      g_value_set_int (value, overlay->pos_y_video);
+    case PROP_OVERLAY_WIDTH:
+      g_value_set_int (value, overlay->overlay_width);
       break;
-    case PROP_SIZE_VIDEO:
-      g_value_set_int (value, overlay->size_video);
+    case PROP_OVERLAY_HEIGHT:
+      g_value_set_int (value, overlay->overlay_height);
       break;
-    case PROP_VIDEOTOP:
-      g_value_set_boolean (value, overlay->video_top);
+    case PROP_ALPHA:
+      g_value_set_double (value, overlay->alpha);
       break;
-    case PROP_ROTATE_PNG:
-      g_value_set_int (value, overlay->rotate_png);
-      break;
-    case PROP_ROTATE_VIDEO:
-      g_value_set_int (value, overlay->rotate_video);
-      break;
-    case PROP_ANGLE_PNG:
-      g_value_set_int (value, overlay->angle_png);
-      break;
-    case PROP_ANGLE_VIDEO:
-      g_value_set_int (value, overlay->angle_video);
-      break;
-    case PROP_RATIO_VIDEO:
-      g_value_set_int (value, (gint) overlay->ratio_video);
-      break;
-      /*  case PROP_STRETCH:
-         g_value_set_boolean (value, overlay->stretch);
-         break;
-       */
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -563,78 +364,264 @@
   gst_structure_get_int (s, "width", &width);
   gst_structure_get_int (s, "height", &height);
 
-  overlay->width_window = (gfloat) width;
-  overlay->height_window = (gfloat) height;
+  overlay->window_width = width;
+  overlay->window_height = height;
 
   return TRUE;
 }
 
 static void
-gst_gl_overlay_init_resources (GstGLFilter * filter)
+_unbind_buffer (GstGLOverlay * overlay)
 {
-//  GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (overlay)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (overlay->attr_position);
+  gl->DisableVertexAttribArray (overlay->attr_texture);
 }
 
 static void
+_bind_buffer (GstGLOverlay * overlay, GLuint vbo)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (overlay)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, overlay->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, vbo);
+
+  gl->EnableVertexAttribArray (overlay->attr_position);
+  gl->EnableVertexAttribArray (overlay->attr_texture);
+
+  gl->VertexAttribPointer (overlay->attr_position, 3, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), (void *) 0);
+  gl->VertexAttribPointer (overlay->attr_texture, 2, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+}
+
+/* *INDENT-OFF* */
+float v_vertices[] = {
+/*|      Vertex     | TexCoord  |*/
+  -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+   1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+   1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
+  -1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3, };
+/* *INDENT-ON* */
+
+static void
 gst_gl_overlay_callback (gint width, gint height, guint texture, gpointer stuff)
 {
   GstGLOverlay *overlay = GST_GL_OVERLAY (stuff);
   GstGLFilter *filter = GST_GL_FILTER (overlay);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
+  GstMapInfo map_info;
+  guint image_tex;
+  gboolean memory_mapped = FALSE;
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
-  gluPerspective (70.0f,
-      (GLfloat) overlay->width_window / (GLfloat) overlay->height_window, 1.0f,
-      1000.0f);
-  gl->Enable (GL_DEPTH_TEST);
-  gluLookAt (0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
-  if (!overlay->video_top) {
-    if (overlay->pbuftexture != 0)
-      gst_gl_overlay_load_texture (overlay, overlay->pbuftexture, 0);
-    // if (overlay->stretch) {
-    //   width = (gfloat) overlay->width;
-    //   height = (gfloat) overlay->height;
-    // }
+#if GST_GL_HAVE_OPENGL
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context) &
+      GST_GL_API_OPENGL) {
+
+    gl->MatrixMode (GL_PROJECTION);
     gl->LoadIdentity ();
-    gst_gl_overlay_load_texture (overlay, texture, 1);
-  } else {
-    gst_gl_overlay_load_texture (overlay, texture, 1);
-    if (overlay->pbuftexture == 0)
-      return;
-    // if (overlay->stretch) {
-    //   width = (gfloat) overlay->width;
-    //   height = (gfloat) overlay->height;
-    // }
-    gl->LoadIdentity ();
-    gst_gl_overlay_load_texture (overlay, overlay->pbuftexture, 0);
   }
+#endif
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, texture);
+
+  gst_gl_shader_use (overlay->shader);
+
+  gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", 1.0f);
+  gst_gl_shader_set_uniform_1i (overlay->shader, "texture", 0);
+
+  overlay->attr_position =
+      gst_gl_shader_get_attribute_location (overlay->shader, "a_position");
+  overlay->attr_texture =
+      gst_gl_shader_get_attribute_location (overlay->shader, "a_texcoord");
+
+  if (!overlay->vbo) {
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &overlay->vao);
+      gl->BindVertexArray (overlay->vao);
+    }
+
+    gl->GenBuffers (1, &overlay->vbo);
+    gl->BindBuffer (GL_ARRAY_BUFFER, overlay->vbo);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), v_vertices,
+        GL_STATIC_DRAW);
+
+    gl->GenBuffers (1, &overlay->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, overlay->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+
+    if (gl->GenVertexArrays) {
+      _bind_buffer (overlay, overlay->vbo);
+      gl->BindVertexArray (0);
+    }
+
+    gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  }
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (overlay->vao);
+  else
+    _bind_buffer (overlay, overlay->vbo);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
+
+  if (!overlay->image_memory)
+    goto out;
+
+  if (!gst_memory_map ((GstMemory *) overlay->image_memory, &map_info,
+          GST_MAP_READ | GST_MAP_GL) || map_info.data == NULL)
+    goto out;
+
+  memory_mapped = TRUE;
+  image_tex = *(guint *) map_info.data;
+
+  if (!overlay->overlay_vbo) {
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &overlay->overlay_vao);
+      gl->BindVertexArray (overlay->overlay_vao);
+    }
+
+    gl->GenBuffers (1, &overlay->overlay_vbo);
+    gl->BindBuffer (GL_ARRAY_BUFFER, overlay->overlay_vbo);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, overlay->vbo_indices);
+    overlay->geometry_change = TRUE;
+  }
+
+  if (gl->GenVertexArrays) {
+    gl->BindVertexArray (overlay->overlay_vao);
+  }
+
+  if (overlay->geometry_change) {
+    gint render_width, render_height;
+    gfloat x, y, image_width, image_height;
+
+    /* *INDENT-OFF* */
+    float vertices[] = {
+     -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+      1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+      1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
+     -1.0f,  1.0f, 0.0f, 0.0,  1.0f,
+    };
+    /* *INDENT-ON* */
+
+    /* scale from [0, 1] -> [-1, 1] */
+    x = ((gfloat) overlay->offset_x / (gfloat) overlay->window_width +
+        overlay->relative_x) * 2.0f - 1.0;
+    y = ((gfloat) overlay->offset_y / (gfloat) overlay->window_height +
+        overlay->relative_y) * 2.0f - 1.0;
+    /* scale from [0, 1] -> [0, 2] */
+    render_width =
+        overlay->overlay_width >
+        0 ? overlay->overlay_width : overlay->image_width;
+    render_height =
+        overlay->overlay_height >
+        0 ? overlay->overlay_height : overlay->image_height;
+    image_width =
+        ((gfloat) render_width / (gfloat) overlay->window_width) * 2.0f;
+    image_height =
+        ((gfloat) render_height / (gfloat) overlay->window_height) * 2.0f;
+
+    vertices[0] = vertices[15] = x;
+    vertices[5] = vertices[10] = x + image_width;
+    vertices[1] = vertices[6] = y;
+    vertices[11] = vertices[16] = y + image_height;
+
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+  }
+
+  if (!gl->GenVertexArrays || overlay->geometry_change) {
+    _bind_buffer (overlay, overlay->overlay_vbo);
+  }
+
+  gl->BindTexture (GL_TEXTURE_2D, image_tex);
+  gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
+
+  gl->Enable (GL_BLEND);
+  gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  gl->BlendEquation (GL_FUNC_ADD);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
+
+  gl->Disable (GL_BLEND);
+
+out:
+  if (gl->GenVertexArrays) {
+    gl->BindVertexArray (0);
+  } else {
+    _unbind_buffer (overlay);
+  }
+
+  gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
+
+  if (memory_mapped)
+    gst_memory_unmap ((GstMemory *) overlay->image_memory, &map_info);
+
+  overlay->geometry_change = FALSE;
 }
 
-static void
-init_pixbuf_texture (GstGLContext * context, gpointer data)
+static gboolean
+load_file (GstGLOverlay * overlay)
 {
-  GstGLOverlay *overlay = GST_GL_OVERLAY (data);
-  GstGLFilter *filter = GST_GL_FILTER (overlay);
-  const GstGLFuncs *gl = filter->context->gl_vtable;
+  FILE *fp;
+  guint8 buff[16];
+  gsize n_read;
+  GstCaps *caps;
+  GstStructure *structure;
+  gboolean success = FALSE;
 
-  if (overlay->pixbuf) {
-    gl->DeleteTextures (1, &overlay->pbuftexture);
-    gl->GenTextures (1, &overlay->pbuftexture);
-    if (overlay->type_file == 1) {
-      gl->BindTexture (GL_TEXTURE_2D, overlay->pbuftexture);
-      gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA,
-          (gint) overlay->width, (gint) overlay->height, 0,
-          GL_RGBA, GL_UNSIGNED_BYTE, overlay->pixbuf);
-    } else if (overlay->type_file == 2) {
-      gl->BindTexture (GL_TEXTURE_2D, overlay->pbuftexture);
-      gl->TexImage2D (GL_TEXTURE_2D, 0, overlay->internalFormat,
-          overlay->width, overlay->height, 0, overlay->format,
-          GL_UNSIGNED_BYTE, overlay->pixbuf);
-      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-      gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    }
+  if (overlay->location == NULL)
+    return TRUE;
+
+  if ((fp = fopen (overlay->location, "rb")) == NULL) {
+    GST_ELEMENT_ERROR (overlay, RESOURCE, NOT_FOUND, ("Can't open file"),
+        ("File: %s", overlay->location));
+    return FALSE;
   }
+
+  n_read = fread (buff, 1, sizeof (buff), fp);
+  if (n_read != sizeof (buff)) {
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE, ("Can't read file header"),
+        ("File: %s", overlay->location));
+    goto out;
+  }
+
+  caps = gst_type_find_helper_for_data (GST_OBJECT (overlay), buff,
+      sizeof (buff), NULL);
+
+  if (caps == NULL) {
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE, ("Can't find file type"),
+        ("File: %s", overlay->location));
+    goto out;
+  }
+
+  fseek (fp, 0, SEEK_SET);
+
+  structure = gst_caps_get_structure (caps, 0);
+  if (gst_structure_has_name (structure, "image/jpeg")) {
+    success = gst_gl_overlay_load_jpeg (overlay, fp);
+  } else if (gst_structure_has_name (structure, "image/png")) {
+    success = gst_gl_overlay_load_png (overlay, fp);
+  } else {
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE, ("Image type not supported"),
+        ("File: %s", overlay->location));
+  }
+
+out:
+  fclose (fp);
+  gst_caps_replace (&caps, NULL);
+
+  return success;
 }
 
 static gboolean
@@ -643,18 +630,16 @@
 {
   GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
 
-  if (overlay->pbuf_has_changed && (overlay->location != NULL)) {
-    if ((overlay->type_file = gst_gl_overlay_load_png (filter)) == 0)
-      if ((overlay->type_file = gst_gl_overlay_load_jpeg (filter)) == 0)
-        overlay->pixbuf = NULL;
-    /* if loader failed then context is turned off */
-    gst_gl_context_thread_add (filter->context, init_pixbuf_texture, overlay);
-    if (overlay->pixbuf) {
-      free (overlay->pixbuf);
-      overlay->pixbuf = NULL;
+  if (overlay->location_has_changed) {
+    if (overlay->image_memory) {
+      gst_memory_unref ((GstMemory *) overlay->image_memory);
+      overlay->image_memory = NULL;
     }
 
-    overlay->pbuf_has_changed = FALSE;
+    if (!load_file (overlay))
+      return FALSE;
+
+    overlay->location_has_changed = FALSE;
   }
 
   gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
@@ -664,58 +649,80 @@
 }
 
 static void
+gst_gl_overlay_before_transform (GstBaseTransform * trans, GstBuffer * outbuf)
+{
+  GstClockTime stream_time;
+
+  stream_time = gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME,
+      GST_BUFFER_TIMESTAMP (outbuf));
+
+  if (GST_CLOCK_TIME_IS_VALID (stream_time))
+    gst_object_sync_values (GST_OBJECT (trans), stream_time);
+}
+
+static void
 user_warning_fn (png_structp png_ptr, png_const_charp warning_msg)
 {
   g_warning ("%s\n", warning_msg);
 }
 
-#define LOAD_ERROR(msg) { GST_WARNING ("unable to load %s: %s", overlay->location, msg); return FALSE; }
-
-static gint
-gst_gl_overlay_load_jpeg (GstGLFilter * filter)
+static gboolean
+gst_gl_overlay_load_jpeg (GstGLOverlay * overlay, FILE * fp)
 {
-  GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
-  FILE *fp = NULL;
+  GstVideoInfo v_info;
+  GstVideoAlignment v_align;
+  GstMapInfo map_info;
   struct jpeg_decompress_struct cinfo;
   struct jpeg_error_mgr jerr;
   JSAMPROW j;
   int i;
 
-  fp = fopen (overlay->location, "rb");
-  if (!fp) {
-    g_error ("error: couldn't open file!\n");
-    return 0;
-  }
   jpeg_create_decompress (&cinfo);
   cinfo.err = jpeg_std_error (&jerr);
   jpeg_stdio_src (&cinfo, fp);
   jpeg_read_header (&cinfo, TRUE);
   jpeg_start_decompress (&cinfo);
-  overlay->width = cinfo.image_width;
-  overlay->height = cinfo.image_height;
-  overlay->internalFormat = cinfo.num_components;
+  overlay->image_width = cinfo.image_width;
+  overlay->image_height = cinfo.image_height;
+
   if (cinfo.num_components == 1)
-    overlay->format = GL_LUMINANCE;
+    gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_Y444,
+        overlay->image_width, overlay->image_height);
   else
-    overlay->format = GL_RGB;
-  overlay->pixbuf = (GLubyte *) malloc (sizeof (GLubyte) * overlay->width
-      * overlay->height * overlay->internalFormat);
-  for (i = 0; i < overlay->height; ++i) {
-    j = (overlay->pixbuf +
-        (((int) overlay->height - (i +
-                    1)) * (int) overlay->width * overlay->internalFormat));
+    gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_RGB,
+        overlay->image_width, overlay->image_height);
+
+  gst_video_alignment_reset (&v_align);
+  v_align.stride_align[0] = 32 - 1;
+  gst_video_info_align (&v_info, &v_align);
+
+  overlay->image_memory = (GstGLMemory *)
+      gst_gl_memory_alloc (GST_GL_BASE_FILTER (overlay)->context,
+      NULL, &v_info, 0, &v_align);
+
+  if (!gst_memory_map ((GstMemory *) overlay->image_memory, &map_info,
+          GST_MAP_WRITE)) {
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE, ("failed to map memory"),
+        ("File: %s", overlay->location));
+    return FALSE;
+  }
+
+  for (i = 0; i < overlay->image_height; ++i) {
+    j = map_info.data + v_info.stride[0] * i;
     jpeg_read_scanlines (&cinfo, &j, 1);
   }
   jpeg_finish_decompress (&cinfo);
   jpeg_destroy_decompress (&cinfo);
-  fclose (fp);
-  return 2;
+  gst_memory_unmap ((GstMemory *) overlay->image_memory, &map_info);
+
+  return TRUE;
 }
 
-static gint
-gst_gl_overlay_load_png (GstGLFilter * filter)
+static gboolean
+gst_gl_overlay_load_png (GstGLOverlay * overlay, FILE * fp)
 {
-  GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
+  GstVideoInfo v_info;
+  GstMapInfo map_info;
 
   png_structp png_ptr;
   png_infop info_ptr;
@@ -724,46 +731,48 @@
   gint bit_depth = 0;
   gint color_type = 0;
   gint interlace_type = 0;
-  png_FILE_p fp = NULL;
   guint y = 0;
   guchar **rows = NULL;
   gint filler;
   png_byte magic[8];
   gint n_read;
 
-  if (!filter->context)
-    return 1;
-
-  if ((fp = fopen (overlay->location, "rb")) == NULL)
-    LOAD_ERROR ("file not found");
+  if (!GST_GL_BASE_FILTER (overlay)->context)
+    return FALSE;
 
   /* Read magic number */
   n_read = fread (magic, 1, sizeof (magic), fp);
   if (n_read != sizeof (magic)) {
-    fclose (fp);
-    LOAD_ERROR ("can't read PNG magic number");
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("can't read PNG magic number"), ("File: %s", overlay->location));
+    return FALSE;
   }
 
   /* Check for valid magic number */
   if (png_sig_cmp (magic, 0, sizeof (magic))) {
-    fclose (fp);
-    LOAD_ERROR ("not a valid PNG image");
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("not a valid PNG image"), ("File: %s", overlay->location));
+    return FALSE;
   }
 
   png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 
   if (png_ptr == NULL) {
-    fclose (fp);
-    LOAD_ERROR ("failed to initialize the png_struct");
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("failed to initialize the png_struct"), ("File: %s",
+            overlay->location));
+    return FALSE;
   }
 
   png_set_error_fn (png_ptr, NULL, NULL, user_warning_fn);
 
   info_ptr = png_create_info_struct (png_ptr);
   if (info_ptr == NULL) {
-    fclose (fp);
     png_destroy_read_struct (&png_ptr, png_infopp_NULL, png_infopp_NULL);
-    LOAD_ERROR ("failed to initialize the memory for image information");
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("failed to initialize the memory for image information"),
+        ("File: %s", overlay->location));
+    return FALSE;
   }
 
   png_init_io (png_ptr, fp);
@@ -782,28 +791,39 @@
   }
 
   if (color_type != PNG_COLOR_TYPE_RGB_ALPHA) {
-    fclose (fp);
     png_destroy_read_struct (&png_ptr, png_infopp_NULL, png_infopp_NULL);
-    LOAD_ERROR ("color type is not rgb");
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("color type is not rgb"), ("File: %s", overlay->location));
+    return FALSE;
   }
 
-  overlay->width = width;
-  overlay->height = height;
+  overlay->image_width = width;
+  overlay->image_height = height;
 
-  overlay->pixbuf = (guchar *) malloc (sizeof (guchar) * width * height * 4);
+  gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_RGBA, width, height);
+  overlay->image_memory = (GstGLMemory *)
+      gst_gl_memory_alloc (GST_GL_BASE_FILTER (overlay)->context,
+      NULL, &v_info, 0, NULL);
 
+  if (!gst_memory_map ((GstMemory *) overlay->image_memory, &map_info,
+          GST_MAP_WRITE)) {
+    png_destroy_read_struct (&png_ptr, &info_ptr, png_infopp_NULL);
+    GST_ELEMENT_ERROR (overlay, STREAM, DECODE,
+        ("failed to map memory"), ("File: %s", overlay->location));
+    return FALSE;
+  }
   rows = (guchar **) malloc (sizeof (guchar *) * height);
 
   for (y = 0; y < height; ++y)
-    rows[y] = (guchar *) (overlay->pixbuf + y * width * 4);
+    rows[y] = (guchar *) (map_info.data + y * width * 4);
 
   png_read_image (png_ptr, rows);
 
   free (rows);
+  gst_memory_unmap ((GstMemory *) overlay->image_memory, &map_info);
 
   png_read_end (png_ptr, info_ptr);
   png_destroy_read_struct (&png_ptr, &info_ptr, png_infopp_NULL);
-  fclose (fp);
 
-  return 1;
+  return TRUE;
 }
diff --git a/ext/gl/gstgloverlay.h b/ext/gl/gstgloverlay.h
index 50e6ef4..565aaab 100644
--- a/ext/gl/gstgloverlay.h
+++ b/ext/gl/gstgloverlay.h
@@ -37,37 +37,38 @@
 
 struct _GstGLOverlay
 {
-  GstGLFilter filter;
-  gchar *location;
-  gboolean pbuf_has_changed;
-  gint8 pos_x_png;
-  gint8 pos_y_png;
-  guint8 size_png;
-  gint8 pos_x_video;
-  gint8 pos_y_video;
-  guint8 size_video;
-  gboolean video_top;
-  guint8 rotate_png;
-  guint8 rotate_video;
-  gint8 angle_png;
-  gint8 angle_video;
-  guchar *pixbuf;
-  gint width, height;
-  GLuint pbuftexture;
-  GLint internalFormat;
-  GLenum format;
-  gint type_file;               // 0 = No; 1 = PNG and 2 = JPEG
-  gfloat width_window;
-  gfloat height_window;
-  gfloat posx;
-  gfloat posy;
-  gfloat ratio_window;
-  gfloat ratio_texture;
-  gfloat ratio_x;
-  gfloat ratio_y;
-  gfloat ratio_video;
+  GstGLFilter  filter;
 
-/*  gboolean stretch; */
+  /* properties */
+  gchar        *location;
+  gint          offset_x;
+  gint          offset_y;
+
+  gdouble       relative_x;
+  gdouble       relative_y;
+
+  gint          overlay_width;
+  gint          overlay_height;
+
+  gdouble       alpha;
+
+  /* <private> */
+  GstGLShader  *shader;
+  GstGLMemory  *image_memory;
+
+  gboolean      location_has_changed;
+  gint          window_width, window_height;
+  gint          image_width, image_height;
+
+  gboolean      geometry_change;
+
+  GLuint        vao;
+  GLuint        overlay_vao;
+  GLuint        vbo;
+  GLuint        overlay_vbo;
+  GLuint        vbo_indices;
+  GLuint        attr_position;
+  GLuint        attr_texture;
 };
 
 struct _GstGLOverlayClass
diff --git a/ext/gl/gstglsinkbin.c b/ext/gl/gstglsinkbin.c
new file mode 100644
index 0000000..cab615f
--- /dev/null
+++ b/ext/gl/gstglsinkbin.c
@@ -0,0 +1,456 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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/video/videooverlay.h>
+#include <gst/video/navigation.h>
+
+#include "gstglsinkbin.h"
+
+GST_DEBUG_CATEGORY (gst_debug_gl_sink_bin);
+#define GST_CAT_DEFAULT gst_debug_gl_sink_bin
+
+static void gst_gl_sink_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_gl_sink_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static GstStateChangeReturn gst_gl_sink_bin_change_state (GstElement * element,
+    GstStateChange transition);
+
+static void gst_gl_sink_bin_video_overlay_init (gpointer g_iface,
+    gpointer g_iface_data);
+static void gst_gl_sink_bin_navigation_interface_init (gpointer g_iface,
+    gpointer g_iface_data);
+
+#define DEFAULT_SYNC                TRUE
+#define DEFAULT_MAX_LATENESS        -1
+#define DEFAULT_QOS                 FALSE
+#define DEFAULT_ASYNC               TRUE
+#define DEFAULT_TS_OFFSET           0
+#define DEFAULT_BLOCKSIZE           4096
+#define DEFAULT_RENDER_DELAY        0
+#define DEFAULT_ENABLE_LAST_SAMPLE  TRUE
+#define DEFAULT_THROTTLE_TIME       0
+#define DEFAULT_MAX_BITRATE         0
+
+enum
+{
+  PROP_0,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_SINK,
+  PROP_SYNC,
+  PROP_MAX_LATENESS,
+  PROP_QOS,
+  PROP_ASYNC,
+  PROP_TS_OFFSET,
+  PROP_ENABLE_LAST_SAMPLE,
+  PROP_LAST_SAMPLE,
+  PROP_BLOCKSIZE,
+  PROP_RENDER_DELAY,
+  PROP_THROTTLE_TIME,
+  PROP_MAX_BITRATE,
+};
+
+enum
+{
+  SIGNAL_0,
+  SIGNAL_CREATE_ELEMENT,
+  SIGNAL_LAST,
+};
+
+static guint gst_gl_sink_bin_signals[SIGNAL_LAST] = { 0, };
+
+#define gst_gl_sink_bin_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLSinkBin, gst_gl_sink_bin,
+    GST_TYPE_BIN, G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
+        gst_gl_sink_bin_video_overlay_init);
+    G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
+        gst_gl_sink_bin_navigation_interface_init);
+    GST_DEBUG_CATEGORY_INIT (gst_debug_gl_sink_bin, "glimagesink", 0,
+        "OpenGL Video Sink Bin"));
+
+static void
+gst_gl_sink_bin_class_init (GstGLSinkBinClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+  GstCaps *upload_caps;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = GST_ELEMENT_CLASS (klass);
+
+  element_class->change_state = gst_gl_sink_bin_change_state;
+
+  gobject_class->set_property = gst_gl_sink_bin_set_property;
+  gobject_class->get_property = gst_gl_sink_bin_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_SINK,
+      g_param_spec_object ("sink",
+          "GL sink element",
+          "The GL sink chain to use",
+          GST_TYPE_ELEMENT,
+          GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE |
+          G_PARAM_STATIC_STRINGS));
+
+  /* base sink */
+  g_object_class_install_property (gobject_class, PROP_SYNC,
+      g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_SYNC,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_MAX_LATENESS,
+      g_param_spec_int64 ("max-lateness", "Max Lateness",
+          "Maximum number of nanoseconds that a buffer can be late before it "
+          "is dropped (-1 unlimited)", -1, G_MAXINT64, DEFAULT_MAX_LATENESS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_QOS,
+      g_param_spec_boolean ("qos", "Qos",
+          "Generate Quality-of-Service events upstream", DEFAULT_QOS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ASYNC,
+      g_param_spec_boolean ("async", "Async",
+          "Go asynchronously to PAUSED", DEFAULT_ASYNC,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_TS_OFFSET,
+      g_param_spec_int64 ("ts-offset", "TS Offset",
+          "Timestamp offset in nanoseconds", G_MININT64, G_MAXINT64,
+          DEFAULT_TS_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ENABLE_LAST_SAMPLE,
+      g_param_spec_boolean ("enable-last-sample", "Enable Last Buffer",
+          "Enable the last-sample property", DEFAULT_ENABLE_LAST_SAMPLE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_LAST_SAMPLE,
+      g_param_spec_boxed ("last-sample", "Last Sample",
+          "The last sample received in the sink", GST_TYPE_SAMPLE,
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_BLOCKSIZE,
+      g_param_spec_uint ("blocksize", "Block size",
+          "Size in bytes to pull per buffer (0 = default)", 0, G_MAXUINT,
+          DEFAULT_BLOCKSIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_RENDER_DELAY,
+      g_param_spec_uint64 ("render-delay", "Render Delay",
+          "Additional render delay of the sink in nanoseconds", 0, G_MAXUINT64,
+          DEFAULT_RENDER_DELAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_THROTTLE_TIME,
+      g_param_spec_uint64 ("throttle-time", "Throttle time",
+          "The time to keep between rendered buffers (0 = disabled)", 0,
+          G_MAXUINT64, DEFAULT_THROTTLE_TIME,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_MAX_BITRATE,
+      g_param_spec_uint64 ("max-bitrate", "Max Bitrate",
+          "The maximum bits per second to render (0 = disabled)", 0,
+          G_MAXUINT64, DEFAULT_MAX_BITRATE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstGLSinkBin::create-element:
+   * @object: the #GstGLSinkBin
+   *
+   * Will be emitted when we need the processing element/s that this bin will use
+   *
+   * Returns: a new #GstElement
+   */
+  gst_gl_sink_bin_signals[SIGNAL_CREATE_ELEMENT] =
+      g_signal_new ("create-element", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      GST_TYPE_ELEMENT, 0);
+
+  gst_element_class_set_metadata (element_class,
+      "GL Sink Bin", "Sink/Video",
+      "Infrastructure to process GL textures",
+      "Matthew Waters <matthew@centricular.com>");
+
+  upload_caps = gst_gl_upload_get_input_template_caps ();
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, upload_caps));
+  gst_caps_unref (upload_caps);
+}
+
+static void
+gst_gl_sink_bin_init (GstGLSinkBin * self)
+{
+  gboolean res = TRUE;
+  GstPad *pad;
+
+  self->upload = gst_element_factory_make ("glupload", NULL);
+  self->convert = gst_element_factory_make ("glcolorconvert", NULL);
+
+  res &= gst_bin_add (GST_BIN (self), self->upload);
+  res &= gst_bin_add (GST_BIN (self), self->convert);
+
+  res &= gst_element_link_pads (self->upload, "src", self->convert, "sink");
+
+  pad = gst_element_get_static_pad (self->upload, "sink");
+  if (!pad) {
+    res = FALSE;
+  } else {
+    GST_DEBUG_OBJECT (self, "setting target sink pad %" GST_PTR_FORMAT, pad);
+    self->sinkpad = gst_ghost_pad_new ("sink", pad);
+    gst_element_add_pad (GST_ELEMENT_CAST (self), self->sinkpad);
+    gst_object_unref (pad);
+  }
+
+  if (!res) {
+    GST_WARNING_OBJECT (self, "Failed to add/connect the necessary machinery");
+  }
+}
+
+static gboolean
+_connect_sink_element (GstGLSinkBin * self)
+{
+  gboolean res = TRUE;
+
+  gst_object_set_name (GST_OBJECT (self->sink), "sink");
+  res &= gst_bin_add (GST_BIN (self), self->sink);
+
+  res &= gst_element_link_pads (self->convert, "src", self->sink, "sink");
+
+  if (!res)
+    GST_ERROR_OBJECT (self, "Failed to link sink element into the pipeline");
+
+  return res;
+}
+
+void
+gst_gl_sink_bin_finish_init_with_element (GstGLSinkBin * self,
+    GstElement * element)
+{
+  g_return_if_fail (GST_IS_ELEMENT (element));
+
+  self->sink = element;
+
+  if (!_connect_sink_element (self)) {
+    gst_object_unref (self->sink);
+    self->sink = NULL;
+  }
+}
+
+void
+gst_gl_sink_bin_finish_init (GstGLSinkBin * self)
+{
+  GstGLSinkBinClass *klass = GST_GL_SINK_BIN_GET_CLASS (self);
+  GstElement *element = NULL;
+
+  if (klass->create_element)
+    element = klass->create_element ();
+
+  if (element)
+    gst_gl_sink_bin_finish_init_with_element (self, element);
+}
+
+static void
+gst_gl_sink_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (object);
+
+  switch (prop_id) {
+    case PROP_SINK:
+    {
+      GstElement *sink = g_value_get_object (value);
+      if (self->sink)
+        gst_bin_remove (GST_BIN (self), self->sink);
+      self->sink = sink;
+      if (sink) {
+        gst_object_ref_sink (sink);
+        _connect_sink_element (self);
+      }
+      break;
+    }
+    default:
+      if (self->sink)
+        g_object_set_property (G_OBJECT (self->sink), pspec->name, value);
+      break;
+  }
+}
+
+static void
+gst_gl_sink_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (object);
+
+  switch (prop_id) {
+    case PROP_SINK:
+      g_value_set_object (value, self->sink);
+      break;
+    default:
+      if (self->sink)
+        g_object_get_property (G_OBJECT (self->sink), pspec->name, value);
+      break;
+  }
+}
+
+static GstStateChangeReturn
+gst_gl_sink_bin_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (element);
+  GstGLSinkBinClass *klass = GST_GL_SINK_BIN_GET_CLASS (self);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  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)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!self->sink) {
+        if (klass->create_element)
+          self->sink = klass->create_element ();
+
+        if (!self->sink)
+          g_signal_emit (element,
+              gst_gl_sink_bin_signals[SIGNAL_CREATE_ELEMENT], 0, &self->sink);
+
+        if (!self->sink) {
+          GST_ERROR_OBJECT (element, "Failed to retrieve element");
+          return GST_STATE_CHANGE_FAILURE;
+        }
+        if (!_connect_sink_element (self))
+          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) {
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_gl_sink_bin_navigation_send_event (GstNavigation * navigation, GstStructure
+    * structure)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (navigation);
+  GstElement *nav =
+      gst_bin_get_by_interface (GST_BIN (self), GST_TYPE_NAVIGATION);
+
+  if (nav) {
+    gst_navigation_send_event (GST_NAVIGATION (nav), structure);
+    structure = NULL;
+    gst_object_unref (nav);
+  } else {
+    GstEvent *event = gst_event_new_navigation (structure);
+    structure = NULL;
+    gst_element_send_event (GST_ELEMENT (self), event);
+  }
+}
+
+static void
+gst_gl_sink_bin_navigation_interface_init (gpointer g_iface,
+    gpointer g_iface_data)
+{
+  GstNavigationInterface *iface = (GstNavigationInterface *) g_iface;
+  iface->send_event = gst_gl_sink_bin_navigation_send_event;
+}
+
+static void
+gst_gl_sink_bin_overlay_expose (GstVideoOverlay * overlay)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (overlay);
+  GstVideoOverlay *overlay_element = NULL;
+
+  overlay_element =
+      GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (self),
+          GST_TYPE_VIDEO_OVERLAY));
+
+  if (overlay_element) {
+    gst_video_overlay_expose (overlay_element);
+    gst_object_unref (overlay_element);
+  }
+}
+
+static void
+gst_gl_sink_bin_overlay_handle_events (GstVideoOverlay * overlay,
+    gboolean handle_events)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (overlay);
+  GstVideoOverlay *overlay_element = NULL;
+
+  overlay_element =
+      GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (self),
+          GST_TYPE_VIDEO_OVERLAY));
+
+  if (overlay_element) {
+    gst_video_overlay_handle_events (overlay_element, handle_events);
+    gst_object_unref (overlay_element);
+  }
+}
+
+static void
+gst_gl_sink_bin_overlay_set_render_rectangle (GstVideoOverlay * overlay, gint x,
+    gint y, gint width, gint height)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (overlay);
+  GstVideoOverlay *overlay_element = NULL;
+
+  overlay_element =
+      GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (self),
+          GST_TYPE_VIDEO_OVERLAY));
+
+  if (overlay_element) {
+    gst_video_overlay_set_render_rectangle (overlay_element, x, y, width,
+        height);
+    gst_object_unref (overlay_element);
+  }
+}
+
+static void
+gst_gl_sink_bin_overlay_set_window_handle (GstVideoOverlay * overlay,
+    guintptr handle)
+{
+  GstGLSinkBin *self = GST_GL_SINK_BIN (overlay);
+  GstVideoOverlay *overlay_element = NULL;
+
+  overlay_element =
+      GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (self),
+          GST_TYPE_VIDEO_OVERLAY));
+
+  if (overlay_element) {
+    gst_video_overlay_set_window_handle (overlay_element, handle);
+    gst_object_unref (overlay_element);
+  }
+}
+
+static void
+gst_gl_sink_bin_video_overlay_init (gpointer g_iface, gpointer g_iface_data)
+{
+  GstVideoOverlayInterface *iface = (GstVideoOverlayInterface *) g_iface;
+  iface->expose = gst_gl_sink_bin_overlay_expose;
+  iface->handle_events = gst_gl_sink_bin_overlay_handle_events;
+  iface->set_render_rectangle = gst_gl_sink_bin_overlay_set_render_rectangle;
+  iface->set_window_handle = gst_gl_sink_bin_overlay_set_window_handle;
+}
diff --git a/ext/gl/gstglsinkbin.h b/ext/gl/gstglsinkbin.h
new file mode 100644
index 0000000..1dbb40d
--- /dev/null
+++ b/ext/gl/gstglsinkbin.h
@@ -0,0 +1,75 @@
+/*
+ * GStreamer
+ * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
+ * Copyright (C) 2005,2006,2007 David A. Schleef <ds@schleef.org>
+ * Copyright (C) 2008 Julien Isorce <julien.isorce@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_SINK_BIN_H_
+#define _GST_GL_SINK_BIN_H_
+
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_sink_bin_get_type(void);
+#define GST_TYPE_GL_SINK_BIN \
+    (gst_gl_sink_bin_get_type())
+#define GST_GL_SINK_BIN(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_SINK_BIN,GstGLSinkBin))
+#define GST_GL_SINK_BIN_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_SINK_BIN,GstGLSinkBinClass))
+#define GST_IS_GL_SINK_BIN(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_SINK_BIN))
+#define GST_IS_GL_SINK_BIN_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_SINK_BIN))
+#define GST_GL_SINK_BIN_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_SINK_BIN,GstGLSinkBinClass))
+
+typedef struct _GstGLSinkBin GstGLSinkBin;
+typedef struct _GstGLSinkBinClass GstGLSinkBinClass;
+
+struct _GstGLSinkBin
+{
+  GstBin parent;
+
+  GstPad *sinkpad;
+
+  GstElement *upload;
+  GstElement *convert;
+  GstElement *sink;
+};
+
+struct _GstGLSinkBinClass
+{
+  GstBinClass parent_class;
+
+  GstElement * (*create_element) (void);
+};
+
+void gst_gl_sink_bin_finish_init (GstGLSinkBin * self);
+void gst_gl_sink_bin_finish_init_with_element (GstGLSinkBin * self,
+    GstElement * element);
+
+G_END_DECLS
+
+#endif
diff --git a/ext/gl/gstglsrcbin.c b/ext/gl/gstglsrcbin.c
new file mode 100644
index 0000000..9eb66d3
--- /dev/null
+++ b/ext/gl/gstglsrcbin.c
@@ -0,0 +1,267 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gstglsrcbin.h"
+
+GST_DEBUG_CATEGORY (gst_debug_gl_src_bin);
+#define GST_CAT_DEFAULT gst_debug_gl_src_bin
+
+static void gst_gl_src_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_gl_src_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static GstStateChangeReturn gst_gl_src_bin_change_state (GstElement * element,
+    GstStateChange transition);
+
+static GstStaticPadTemplate gst_gl_src_bin_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw(ANY)"));
+
+enum
+{
+  PROP_0,
+  PROP_SRC,
+};
+
+enum
+{
+  SIGNAL_0,
+  SIGNAL_CREATE_ELEMENT,
+  SIGNAL_LAST,
+};
+
+static guint gst_gl_src_bin_signals[SIGNAL_LAST] = { 0, };
+
+#define gst_gl_src_bin_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLSrcBin, gst_gl_src_bin,
+    GST_TYPE_BIN,
+    GST_DEBUG_CATEGORY_INIT (gst_debug_gl_src_bin, "glsrcbin", 0,
+        "OpenGL Video Src Bin"));
+
+static void
+gst_gl_src_bin_class_init (GstGLSrcBinClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = GST_ELEMENT_CLASS (klass);
+
+  element_class->change_state = gst_gl_src_bin_change_state;
+
+  gobject_class->set_property = gst_gl_src_bin_set_property;
+  gobject_class->get_property = gst_gl_src_bin_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_SRC,
+      g_param_spec_object ("src",
+          "GL src element",
+          "The GL src chain to use",
+          GST_TYPE_ELEMENT,
+          GST_PARAM_MUTABLE_READY | G_PARAM_READWRITE |
+          G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstGLSrcBin::create-element:
+   * @object: the #GstGLSrcBin
+   *
+   * Will be emitted when we need the processing element/s that this bin will use
+   *
+   * Returns: a new #GstElement
+   */
+  gst_gl_src_bin_signals[SIGNAL_CREATE_ELEMENT] =
+      g_signal_new ("create-element", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      GST_TYPE_ELEMENT, 0);
+
+  gst_element_class_set_metadata (element_class,
+      "GL Src Bin", "Src/Video",
+      "Infrastructure to process GL textures",
+      "Matthew Waters <matthew@centricular.com>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_gl_src_bin_template));
+}
+
+static void
+gst_gl_src_bin_init (GstGLSrcBin * self)
+{
+  gboolean res = TRUE;
+  GstPad *pad;
+
+  self->download = gst_element_factory_make ("gldownload", NULL);
+  self->convert = gst_element_factory_make ("glcolorconvert", NULL);
+
+  res &= gst_bin_add (GST_BIN (self), self->download);
+  res &= gst_bin_add (GST_BIN (self), self->convert);
+
+  res &= gst_element_link_pads (self->convert, "src", self->download, "sink");
+
+  pad = gst_element_get_static_pad (self->download, "src");
+  if (!pad) {
+    res = FALSE;
+  } else {
+    GST_DEBUG_OBJECT (self, "setting target src pad %" GST_PTR_FORMAT, pad);
+    self->srcpad = gst_ghost_pad_new ("src", pad);
+    gst_element_add_pad (GST_ELEMENT_CAST (self), self->srcpad);
+    gst_object_unref (pad);
+  }
+
+  if (!res) {
+    GST_WARNING_OBJECT (self, "Failed to add/connect the necessary machinery");
+  }
+}
+
+static gboolean
+_connect_src_element (GstGLSrcBin * self)
+{
+  gboolean res = TRUE;
+
+  gst_object_set_name (GST_OBJECT (self->src), "src");
+  res &= gst_bin_add (GST_BIN (self), self->src);
+
+  res &= gst_element_link_pads (self->src, "src", self->convert, "sink");
+
+  if (!res)
+    GST_ERROR_OBJECT (self, "Failed to link src element into the pipeline");
+
+  return res;
+}
+
+void
+gst_gl_src_bin_finish_init_with_element (GstGLSrcBin * self,
+    GstElement * element)
+{
+  g_return_if_fail (GST_IS_ELEMENT (element));
+
+  self->src = element;
+
+  if (!_connect_src_element (self)) {
+    gst_object_unref (self->src);
+    self->src = NULL;
+  }
+}
+
+void
+gst_gl_src_bin_finish_init (GstGLSrcBin * self)
+{
+  GstGLSrcBinClass *klass = GST_GL_SRC_BIN_GET_CLASS (self);
+  GstElement *element = NULL;
+
+  if (klass->create_element)
+    element = klass->create_element ();
+
+  if (element)
+    gst_gl_src_bin_finish_init_with_element (self, element);
+}
+
+static void
+gst_gl_src_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLSrcBin *self = GST_GL_SRC_BIN (object);
+
+  switch (prop_id) {
+    case PROP_SRC:
+    {
+      GstElement *src = g_value_get_object (value);
+      if (self->src)
+        gst_bin_remove (GST_BIN (self), self->src);
+      self->src = src;
+      if (src) {
+        gst_object_ref_sink (src);
+        _connect_src_element (self);
+      }
+      break;
+    }
+    default:
+      if (self->src)
+        g_object_set_property (G_OBJECT (self->src), pspec->name, value);
+      break;
+  }
+}
+
+static void
+gst_gl_src_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLSrcBin *self = GST_GL_SRC_BIN (object);
+
+  switch (prop_id) {
+    case PROP_SRC:
+      g_value_set_object (value, self->src);
+      break;
+    default:
+      if (self->src)
+        g_object_get_property (G_OBJECT (self->src), pspec->name, value);
+      break;
+  }
+}
+
+static GstStateChangeReturn
+gst_gl_src_bin_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLSrcBin *self = GST_GL_SRC_BIN (element);
+  GstGLSrcBinClass *klass = GST_GL_SRC_BIN_GET_CLASS (self);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  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)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!self->src) {
+        if (klass->create_element)
+          self->src = klass->create_element ();
+
+        if (!self->src)
+          g_signal_emit (element,
+              gst_gl_src_bin_signals[SIGNAL_CREATE_ELEMENT], 0, &self->src);
+
+        if (!self->src) {
+          GST_ERROR_OBJECT (element, "Failed to retrieve element");
+          return GST_STATE_CHANGE_FAILURE;
+        }
+        if (!_connect_src_element (self))
+          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) {
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstglsrcbin.h b/ext/gl/gstglsrcbin.h
new file mode 100644
index 0000000..4230168
--- /dev/null
+++ b/ext/gl/gstglsrcbin.h
@@ -0,0 +1,71 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_SRC_BIN_H_
+#define _GST_GL_SRC_BIN_H_
+
+#include <gst/gst.h>
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_src_bin_get_type(void);
+#define GST_TYPE_GL_SRC_BIN \
+    (gst_gl_src_bin_get_type())
+#define GST_GL_SRC_BIN(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_SRC_BIN,GstGLSrcBin))
+#define GST_GL_SRC_BIN_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_SRC_BIN,GstGLSrcBinClass))
+#define GST_IS_GL_SRC_BIN(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_SRC_BIN))
+#define GST_IS_GL_SRC_BIN_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_SRC_BIN))
+#define GST_GL_SRC_BIN_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_SRC_BIN,GstGLSrcBinClass))
+
+typedef struct _GstGLSrcBin GstGLSrcBin;
+typedef struct _GstGLSrcBinClass GstGLSrcBinClass;
+
+struct _GstGLSrcBin
+{
+  GstBin parent;
+
+  GstPad *srcpad;
+
+  GstElement *src;
+  GstElement *convert;
+  GstElement *download;
+};
+
+struct _GstGLSrcBinClass
+{
+  GstBinClass parent_class;
+
+  GstElement * (*create_element) (void);
+};
+
+void gst_gl_src_bin_finish_init (GstGLSrcBin * self);
+void gst_gl_src_bin_finish_init_with_element (GstGLSrcBin * self,
+    GstElement * element);
+
+G_END_DECLS
+
+#endif
diff --git a/ext/gl/gstglstereomix.c b/ext/gl/gstglstereomix.c
new file mode 100644
index 0000000..b880d06
--- /dev/null
+++ b/ext/gl/gstglstereomix.c
@@ -0,0 +1,708 @@
+/*
+ * Combine video streams to 3D stereo
+ *
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2014 Jan Schmidt <jan@noraisin.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstglstereomix.h"
+
+#define GST_CAT_DEFAULT gst_gl_stereo_mix_debug
+GST_DEBUG_CATEGORY (gst_gl_stereo_mix_debug);
+
+#define gst_gl_stereo_mix_parent_class parent_class
+G_DEFINE_TYPE (GstGLStereoMix, gst_gl_stereo_mix, GST_TYPE_GL_MIXER);
+
+static GstCaps *_update_caps (GstVideoAggregator * vagg, GstCaps * caps);
+static gboolean _negotiated_caps (GstVideoAggregator * videoaggregator,
+    GstCaps * caps);
+gboolean gst_gl_stereo_mix_make_output (GstGLStereoMix * mix);
+static gboolean gst_gl_stereo_mix_process_frames (GstGLStereoMix * mixer,
+    GPtrArray * in_frames);
+
+#define DEFAULT_DOWNMIX GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS
+
+/* GLStereoMix signals and args */
+enum
+{
+  /* FILL ME */
+  LAST_SIGNAL
+};
+
+enum
+{
+  PROP_0,
+  PROP_DOWNMIX_MODE
+};
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
+            "RGBA")
+        "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+    );
+
+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
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
+            "RGBA")
+        "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+    );
+
+static GstFlowReturn gst_gl_stereo_mix_get_output_buffer (GstVideoAggregator *
+    videoaggregator, GstBuffer ** outbuf);
+static gboolean gst_gl_stereo_mix_stop (GstAggregator * agg);
+static gboolean gst_gl_stereo_mix_start (GstAggregator * agg);
+static gboolean gst_gl_stereo_mix_src_query (GstAggregator * agg,
+    GstQuery * query);
+
+static void
+gst_gl_stereo_mix_find_best_format (GstVideoAggregator * vagg,
+    GstCaps * downstream_caps, GstVideoInfo * best_info,
+    gboolean * at_least_one_alpha);
+
+static void gst_gl_stereo_mix_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gl_stereo_mix_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static void gst_gl_stereo_mix_finalize (GObject * object);
+
+static GstFlowReturn
+gst_gl_stereo_mix_aggregate_frames (GstVideoAggregator * vagg,
+    GstBuffer * outbuffer);
+
+static void
+gst_gl_stereo_mix_class_init (GstGLStereoMixClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstVideoAggregatorClass *videoaggregator_class =
+      (GstVideoAggregatorClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+  GstGLBaseMixerClass *base_mix_class = (GstGLBaseMixerClass *) klass;
+
+  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glstereomixer", 0,
+      "opengl stereoscopic mixer");
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_gl_stereo_mix_finalize);
+
+  gobject_class->get_property = gst_gl_stereo_mix_get_property;
+  gobject_class->set_property = gst_gl_stereo_mix_set_property;
+
+  gst_element_class_set_metadata (element_class, "OpenGL stereo video combiner",
+      "Filter/Effect/Video", "OpenGL stereo video combiner",
+      "Jan Schmidt <jan@centricular.com>");
+
+  g_object_class_install_property (gobject_class, PROP_DOWNMIX_MODE,
+      g_param_spec_enum ("downmix-mode", "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_factory));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_factory));
+
+  agg_class->stop = gst_gl_stereo_mix_stop;
+  agg_class->start = gst_gl_stereo_mix_start;
+  agg_class->src_query = gst_gl_stereo_mix_src_query;
+
+  videoaggregator_class->aggregate_frames = gst_gl_stereo_mix_aggregate_frames;
+  videoaggregator_class->update_caps = _update_caps;
+  videoaggregator_class->negotiated_caps = _negotiated_caps;
+  videoaggregator_class->get_output_buffer =
+      gst_gl_stereo_mix_get_output_buffer;
+  videoaggregator_class->find_best_format = gst_gl_stereo_mix_find_best_format;
+  videoaggregator_class->preserve_update_caps_result = TRUE;
+
+  base_mix_class->supported_gl_api = GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
+}
+
+static void
+gst_gl_stereo_mix_init (GstGLStereoMix * mix)
+{
+}
+
+static void
+gst_gl_stereo_mix_finalize (GObject * object)
+{
+  //GstGLStereoMix *mix = GST_GL_STEREO_MIX (object);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+gst_gl_stereo_mix_query_caps (GstPad * pad, GstAggregator * agg,
+    GstQuery * query)
+{
+  GstCaps *filter, *caps;
+
+  gst_query_parse_caps (query, &filter);
+
+  caps = gst_pad_get_current_caps (agg->srcpad);
+  if (caps == NULL) {
+    caps = gst_pad_get_pad_template_caps (agg->srcpad);
+  }
+
+  if (filter)
+    caps = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+
+  gst_query_set_caps_result (query, caps);
+  gst_caps_unref (caps);
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_stereo_mix_src_query (GstAggregator * agg, GstQuery * query)
+{
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CAPS:
+      return gst_gl_stereo_mix_query_caps (agg->srcpad, agg, query);
+      break;
+    default:
+      break;
+  }
+
+  return GST_AGGREGATOR_CLASS (parent_class)->src_query (agg, query);
+}
+
+
+static GstFlowReturn
+gst_gl_stereo_mix_get_output_buffer (GstVideoAggregator * videoaggregator,
+    GstBuffer ** outbuf)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (videoaggregator);
+  GstFlowReturn ret = GST_FLOW_OK;
+
+#if 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"));
+      return GST_FLOW_ERROR;
+    }
+    mix->priv->pool_active = TRUE;
+  }
+
+  return gst_buffer_pool_acquire_buffer (mix->priv->pool, outbuf, NULL);
+#endif
+
+  if (!gst_gl_stereo_mix_make_output (mix)) {
+    gst_buffer_replace (&mix->primary_out, NULL);
+    gst_buffer_replace (&mix->auxilliary_out, NULL);
+    GST_ELEMENT_ERROR (mix, RESOURCE, SETTINGS,
+        ("Failed to generate output"), ("failed to generate output"));
+    ret = GST_FLOW_ERROR;
+  }
+
+  if (mix->auxilliary_out) {
+    *outbuf = mix->auxilliary_out;
+    mix->auxilliary_out = NULL;
+  } else {
+    *outbuf = mix->primary_out;
+    mix->primary_out = NULL;
+  }
+  return ret;
+}
+
+gboolean
+gst_gl_stereo_mix_make_output (GstGLStereoMix * mix)
+{
+  guint i;
+  GList *walk;
+  gboolean res = FALSE;
+  guint array_index = 0;
+  GstElement *element = GST_ELEMENT (mix);
+  gboolean missing_buffer = FALSE;
+
+  GST_LOG_OBJECT (mix, "Processing buffers");
+
+  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 (GstGLStereoMixFrameData);
+  while (walk) {
+    GstGLMixerPad *pad = GST_GL_MIXER_PAD (walk->data);
+    GstVideoAggregatorPad *vaggpad = walk->data;
+    GstGLStereoMixFrameData *frame;
+
+    GST_LOG_OBJECT (mix, "Checking pad %" GST_PTR_FORMAT, vaggpad);
+
+    frame = g_ptr_array_index (mix->frames, array_index);
+    frame->base.pad = pad;
+    frame->buf = NULL;
+
+    walk = g_list_next (walk);
+
+    if (vaggpad->buffer != NULL) {
+      frame->buf = vaggpad->buffer;
+
+      GST_DEBUG_OBJECT (pad, "Got buffer %" GST_PTR_FORMAT, frame->buf);
+    } else {
+      GST_LOG_OBJECT (mix, "No buffer on pad %" GST_PTR_FORMAT, vaggpad);
+      missing_buffer = TRUE;
+    }
+    ++array_index;
+  }
+  if (missing_buffer) {
+    /* We're still waiting for a buffer to turn up on at least one input */
+    GST_WARNING_OBJECT (mix, "Not generating output - need more input buffers");
+    res = TRUE;
+    goto out;
+  }
+
+  /* Copy GL memory from each input frame to the output */
+  if (!gst_gl_stereo_mix_process_frames (mix, mix->frames)) {
+    GST_LOG_OBJECT (mix, "Failed to process frames to output");
+    goto out;
+  }
+
+  if (mix->primary_out == NULL)
+    goto out;
+
+  res = TRUE;
+
+out:
+  GST_OBJECT_UNLOCK (mix);
+
+  return res;
+}
+
+static GstFlowReturn
+gst_gl_stereo_mix_aggregate_frames (GstVideoAggregator * vagg,
+    GstBuffer * outbuf)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (vagg);
+  /* If we're operating in frame-by-frame mode, push
+   * the primary view now, and let the parent class
+   * push the remaining auxilliary view */
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (&vagg->info) ==
+      GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    /* Transfer the timestamps video-agg put on the aux buffer */
+    gst_buffer_copy_into (mix->primary_out, outbuf,
+        GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+    gst_aggregator_finish_buffer (GST_AGGREGATOR (vagg), mix->primary_out);
+    mix->primary_out = NULL;
+
+    /* And actually, we don't want timestamps on the aux buffer */
+    GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
+    GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE;
+  }
+  return GST_FLOW_OK;
+}
+
+static void
+gst_gl_stereo_mix_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (object);
+
+  switch (prop_id) {
+    case PROP_DOWNMIX_MODE:
+      g_value_set_enum (value, mix->downmix_mode);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_stereo_mix_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (object);
+
+  switch (prop_id) {
+    case PROP_DOWNMIX_MODE:
+      mix->downmix_mode = g_value_get_enum (value);
+      if (mix->viewconvert)
+        g_object_set_property (G_OBJECT (mix->viewconvert), "downmix-mode",
+            value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+_free_glmixer_frame_data (GstGLStereoMixFrameData * frame)
+{
+  if (frame == NULL)
+    return;
+  if (frame->buf)
+    gst_buffer_unref (frame->buf);
+  g_slice_free1 (sizeof (GstGLStereoMixFrameData), frame);
+}
+
+static gboolean
+gst_gl_stereo_mix_start (GstAggregator * agg)
+{
+  guint i;
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (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 (GstGLStereoMixFrameData);
+
+  mix->viewconvert = gst_gl_view_convert_new ();
+  g_object_set (G_OBJECT (mix->viewconvert), "downmix-mode",
+      mix->downmix_mode, NULL);
+
+  GST_OBJECT_UNLOCK (mix);
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_stereo_mix_stop (GstAggregator * agg)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (agg);
+
+  if (!GST_AGGREGATOR_CLASS (parent_class)->stop (agg))
+    return FALSE;
+
+  GST_OBJECT_LOCK (agg);
+  g_ptr_array_free (mix->frames, TRUE);
+  mix->frames = NULL;
+  g_ptr_array_free (mix->array_buffers, TRUE);
+  mix->array_buffers = NULL;
+  GST_OBJECT_UNLOCK (agg);
+
+  if (mix->viewconvert) {
+    gst_object_unref (mix->viewconvert);
+    mix->viewconvert = NULL;
+  }
+
+  return TRUE;
+}
+
+/* Convert to caps that can be accepted by this element... */
+static GstCaps *
+get_converted_caps (GstGLStereoMix * mix, GstCaps * caps)
+{
+#if 0
+  GstGLContext *context = GST_GL_BASE_MIXER (mix)->context;
+  GstCaps *result, *tmp;
+
+  GST_LOG_OBJECT (mix, "Converting caps %" GST_PTR_FORMAT, caps);
+  result = gst_gl_upload_transform_caps (context, GST_PAD_SINK, caps, NULL);
+  tmp = result;
+  GST_TRACE_OBJECT (mix, "transfer returned caps %" GST_PTR_FORMAT, tmp);
+
+  result =
+      gst_gl_color_convert_transform_caps (context, GST_PAD_SINK, tmp, NULL);
+  gst_caps_unref (tmp);
+  GST_TRACE_OBJECT (mix, "convert returned caps %" GST_PTR_FORMAT, tmp);
+
+  tmp = result;
+  result = gst_gl_view_convert_transform_caps (mix->viewconvert,
+      GST_PAD_SINK, tmp, NULL);
+  gst_caps_unref (tmp);
+#else
+  GstCaps *result;
+
+  GST_LOG_OBJECT (mix, "Converting caps %" GST_PTR_FORMAT, caps);
+  result = gst_gl_view_convert_transform_caps (mix->viewconvert,
+      GST_PAD_SINK, caps, NULL);
+#endif
+
+  GST_LOG_OBJECT (mix, "returning caps %" GST_PTR_FORMAT, result);
+
+  return result;
+}
+
+/* Return the possible output caps we decided in find_best_format() */
+static GstCaps *
+_update_caps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (vagg);
+
+  return gst_caps_ref (mix->out_caps);
+}
+
+/* Called after videoaggregator fixates our caps */
+static gboolean
+_negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (vagg);
+
+  GST_LOG_OBJECT (mix, "Configured output caps %" GST_PTR_FORMAT, caps);
+
+  if (GST_VIDEO_AGGREGATOR_CLASS (parent_class)->negotiated_caps)
+    if (!GST_VIDEO_AGGREGATOR_CLASS (parent_class)->negotiated_caps (vagg,
+            caps))
+      return FALSE;
+
+  /* Update the glview_convert output */
+  if (!gst_video_info_from_caps (&mix->out_info, caps))
+    return FALSE;
+
+  /* We can configure the view_converter now */
+  gst_gl_view_convert_set_context (mix->viewconvert,
+      GST_GL_BASE_MIXER (mix)->context);
+  gst_gl_view_convert_set_format (mix->viewconvert, &mix->mix_info,
+      &mix->out_info);
+
+  return TRUE;
+
+}
+
+static gboolean
+gst_gl_stereo_mix_process_frames (GstGLStereoMix * mixer, GPtrArray * frames)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mixer);
+  GstBuffer *converted_buffer, *inbuf;
+  GstVideoInfo *out_info = &vagg->info;
+  gint count = 0;
+#ifndef G_DISABLE_ASSERT
+  gint n;
+#endif
+  gint v, views;
+  gint valid_views = 0;
+
+  inbuf = gst_buffer_new ();
+  while (count < frames->len) {
+    GstGLStereoMixFrameData *frame;
+    GstMemory *in_mem;
+
+    frame = g_ptr_array_index (frames, count);
+    GST_LOG_OBJECT (mixer, "Handling frame %d", count);
+
+    if (!frame) {
+      GST_DEBUG ("skipping texture, null frame");
+      count++;
+      continue;
+    }
+
+    in_mem = gst_buffer_get_memory (frame->buf, 0);
+
+    GST_LOG_OBJECT (mixer,
+        "Appending memory %" GST_PTR_FORMAT " to intermediate buffer", in_mem);
+    /* Appending the memory to a 2nd buffer locks it
+     * exclusive a 2nd time, which will mark it for
+     * copy-on-write. The ref will keep the memory
+     * alive but we add a parent_buffer_meta to also
+     * prevent the input buffer from returning to any buffer
+     * pool it might belong to
+     */
+    gst_buffer_append_memory (inbuf, in_mem);
+    /* Use parent buffer meta to keep input buffer alive */
+    gst_buffer_add_parent_buffer_meta (inbuf, frame->buf);
+
+    count++;
+    valid_views++;
+  }
+
+  if (mixer->mix_info.views != valid_views) {
+    GST_WARNING_OBJECT (mixer, "Not enough input views to process");
+    return FALSE;
+  }
+
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (out_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    views = out_info->views;
+  else
+    views = 1;
+
+  if (gst_gl_view_convert_submit_input_buffer (mixer->viewconvert,
+          FALSE, inbuf) != GST_FLOW_OK)
+    return FALSE;
+
+  /* Clear any existing buffers, just in case */
+  gst_buffer_replace (&mixer->primary_out, NULL);
+  gst_buffer_replace (&mixer->auxilliary_out, NULL);
+
+  if (gst_gl_view_convert_get_output (mixer->viewconvert,
+          &mixer->primary_out) != GST_FLOW_OK)
+    return FALSE;
+
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (out_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    if (gst_gl_view_convert_get_output (mixer->viewconvert,
+            &mixer->auxilliary_out) != GST_FLOW_OK)
+      return FALSE;
+  }
+
+  if (mixer->primary_out == NULL)
+    return FALSE;
+
+  converted_buffer = mixer->primary_out;
+
+#ifndef G_DISABLE_ASSERT
+  n = gst_buffer_n_memory (converted_buffer);
+  g_assert (n == GST_VIDEO_INFO_N_PLANES (out_info) * views);
+#endif
+
+  for (v = 0; v < views; v++) {
+    gst_buffer_add_video_meta_full (converted_buffer, v,
+        GST_VIDEO_INFO_FORMAT (out_info),
+        GST_VIDEO_INFO_WIDTH (out_info),
+        GST_VIDEO_INFO_HEIGHT (out_info),
+        GST_VIDEO_INFO_N_PLANES (out_info), out_info->offset, out_info->stride);
+    if (mixer->auxilliary_out) {
+      gst_buffer_add_video_meta_full (mixer->auxilliary_out, v,
+          GST_VIDEO_INFO_FORMAT (out_info),
+          GST_VIDEO_INFO_WIDTH (out_info),
+          GST_VIDEO_INFO_HEIGHT (out_info),
+          GST_VIDEO_INFO_N_PLANES (out_info), out_info->offset,
+          out_info->stride);
+    }
+  }
+
+  return TRUE;
+}
+
+/* Iterate the input sink pads, and choose the blend format
+ * we will generate before output conversion, which is RGBA
+ * at some suitable size */
+static void
+gst_gl_stereo_mix_find_best_format (GstVideoAggregator * vagg,
+    GstCaps * downstream_caps, GstVideoInfo * best_info,
+    gboolean * at_least_one_alpha)
+{
+  GstGLStereoMix *mix = GST_GL_STEREO_MIX (vagg);
+  GList *l;
+  gint best_width = -1, best_height = -1;
+  gdouble best_fps = -1, cur_fps;
+  gint best_fps_n = 0, best_fps_d = 1;
+  GstVideoInfo *mix_info;
+  GstCaps *blend_caps, *tmp_caps;
+
+  /* We'll deal with alpha internally, so just tell aggregator to
+   * be quiet */
+  *at_least_one_alpha = FALSE;
+
+  GST_OBJECT_LOCK (vagg);
+
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *pad = l->data;
+    GstVideoInfo tmp = pad->info;
+    gint this_width, this_height;
+    gint fps_n, fps_d;
+
+    if (!pad->info.finfo)
+      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;
+
+    /* Convert to per-view width/height for unpacked forms */
+    gst_video_multiview_video_info_change_mode (&tmp,
+        GST_VIDEO_MULTIVIEW_MODE_SEPARATED, GST_VIDEO_MULTIVIEW_FLAGS_NONE);
+
+    this_width = GST_VIDEO_INFO_WIDTH (&tmp);
+    this_height = GST_VIDEO_INFO_HEIGHT (&tmp);
+    fps_n = GST_VIDEO_INFO_FPS_N (&tmp);
+    fps_d = GST_VIDEO_INFO_FPS_D (&tmp);
+
+    GST_INFO_OBJECT (vagg, "Input pad %" GST_PTR_FORMAT
+        " w %u h %u", pad, this_width, this_height);
+
+    if (this_width == 0 || this_height == 0)
+      continue;
+
+    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;
+    }
+
+    /* FIXME: Preserve PAR for at least one input when different sized inputs */
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  mix_info = &mix->mix_info;
+  gst_video_info_set_format (mix_info, GST_VIDEO_FORMAT_RGBA, best_width,
+      best_height);
+
+  GST_VIDEO_INFO_FPS_N (mix_info) = best_fps_n;
+  GST_VIDEO_INFO_FPS_D (mix_info) = best_fps_d;
+
+  GST_VIDEO_INFO_MULTIVIEW_MODE (mix_info) = GST_VIDEO_MULTIVIEW_MODE_SEPARATED;
+  GST_VIDEO_INFO_VIEWS (mix_info) = 2;
+
+  /* FIXME: If input is marked as flipped or flopped, preserve those flags */
+  GST_VIDEO_INFO_MULTIVIEW_FLAGS (mix_info) = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+
+  /* Choose our output format based on downstream preferences */
+  blend_caps = gst_video_info_to_caps (mix_info);
+
+  gst_caps_set_features (blend_caps, 0,
+      gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY));
+
+  tmp_caps = get_converted_caps (GST_GL_STEREO_MIX (vagg), blend_caps);
+  gst_caps_unref (blend_caps);
+
+  if (mix->out_caps)
+    gst_caps_unref (mix->out_caps);
+
+  mix->out_caps = gst_caps_intersect (downstream_caps, tmp_caps);
+  gst_caps_unref (tmp_caps);
+
+  GST_DEBUG_OBJECT (vagg, "Possible output caps %" GST_PTR_FORMAT,
+      mix->out_caps);
+  /* Tell videoaggregator our preferred size. Actual info gets
+   * overridden during caps nego */
+  *best_info = *mix_info;
+}
diff --git a/ext/gl/gstglstereomix.h b/ext/gl/gstglstereomix.h
new file mode 100644
index 0000000..debe347
--- /dev/null
+++ b/ext/gl/gstglstereomix.h
@@ -0,0 +1,83 @@
+/*
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2014 Jan Schmidt <jan@noraisin.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_GL_STEREO_MIX_H__
+#define __GST_GL_STEREO_MIX_H__
+
+#include "gstglmixer.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_GL_STEREO_MIX (gst_gl_stereo_mix_get_type())
+#define GST_GL_STEREO_MIX(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_STEREO_MIX, GstGLStereoMix))
+#define GST_GL_STEREO_MIX_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_STEREO_MIX, GstGLStereoMixClass))
+#define GST_IS_GL_STEREO_MIX(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_STEREO_MIX))
+#define GST_IS_GL_STEREO_MIX_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_STEREO_MIX))
+#define GST_GL_STEREO_MIX_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_STEREO_MIX,GstGLStereoMixClass))
+
+typedef struct _GstGLStereoMix GstGLStereoMix;
+typedef struct _GstGLStereoMixClass GstGLStereoMixClass;
+typedef struct _GstGLStereoMixFrameData GstGLStereoMixFrameData;
+
+struct _GstGLStereoMix
+{
+  GstGLMixer mixer;
+
+  GPtrArray *array_buffers;
+  GPtrArray *frames;
+
+  GLuint out_tex_id;
+  GstGLDownload *download;
+
+  GstGLViewConvert *viewconvert;
+  GstGLStereoDownmix downmix_mode;
+
+  GstCaps *out_caps;
+  GstVideoInfo out_info;
+
+  GstVideoInfo mix_info;
+
+  GPtrArray *input_frames;
+  GstBuffer *primary_out;
+  GstBuffer *auxilliary_out;
+};
+
+struct _GstGLStereoMixClass
+{
+    GstGLMixerClass mixer_class;
+};
+
+struct _GstGLStereoMixFrameData
+{
+  GstGLMixerFrameData base;
+  gboolean mapped;
+  GstBuffer *buf;
+};
+
+GType gst_gl_stereo_mix_get_type(void);
+
+G_END_DECLS
+#endif /* __GST_GL_STEREO_MIX_H__ */
diff --git a/ext/gl/gstglstereosplit.c b/ext/gl/gstglstereosplit.c
new file mode 100644
index 0000000..e175df8
--- /dev/null
+++ b/ext/gl/gstglstereosplit.c
@@ -0,0 +1,931 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Jan Schmidt <jan@centricular.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-glstereosplit
+ *
+ * Receive a stereoscopic video stream and split into left/right
+ *
+ * <refsect2>
+ * <title>Examples</title>
+ * |[
+ * gst-launch videotestsrc ! glstereosplit name=s ! queue ! glimagesink s. ! queue ! glimagesink
+ * ]|
+ * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstglstereosplit.h"
+
+#if GST_GL_HAVE_PLATFORM_EGL
+#include <gst/gl/egl/gsteglimagememory.h>
+#endif
+
+#define GST_CAT_DEFAULT gst_gl_stereosplit_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+#define SUPPORTED_GL_APIS GST_GL_API_OPENGL | GST_GL_API_OPENGL3
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_gl_stereosplit_debug, "glstereosplit", 0, "glstereosplit element");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLStereoSplit, gst_gl_stereosplit,
+    GST_TYPE_ELEMENT, DEBUG_INIT);
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK, GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA") "; "
+#if GST_GL_HAVE_PLATFORM_EGL
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
+            "RGBA") "; "
+#endif
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)
+    )
+    );
+
+static GstStaticPadTemplate src_left_template = GST_STATIC_PAD_TEMPLATE ("left",
+    GST_PAD_SRC, GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA")
+#if 0
+        "; "
+#if GST_GL_HAVE_PLATFORM_EGL
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
+            "RGBA") "; "
+#endif
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)
+#endif
+    )
+    );
+
+static GstStaticPadTemplate src_right_template =
+    GST_STATIC_PAD_TEMPLATE ("right",
+    GST_PAD_SRC, GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA")
+#if 0
+        "; "
+#if GST_GL_HAVE_PLATFORM_EGL
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
+            "RGBA") "; "
+#endif
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)
+#endif
+    )
+    );
+
+static void stereosplit_reset (GstGLStereoSplit * self);
+static void stereosplit_finalize (GstGLStereoSplit * self);
+static void stereosplit_set_context (GstElement * element,
+    GstContext * context);
+static GstFlowReturn stereosplit_chain (GstPad * pad, GstGLStereoSplit * split,
+    GstBuffer * buf);
+static GstStateChangeReturn stereosplit_change_state (GstElement * element,
+    GstStateChange transition);
+static gboolean stereosplit_sink_query (GstPad * pad, GstObject * parent,
+    GstQuery * query);
+static gboolean stereosplit_sink_event (GstPad * pad, GstObject * parent,
+    GstEvent * event);
+static gboolean stereosplit_src_query (GstPad * pad, GstObject * parent,
+    GstQuery * query);
+static gboolean stereosplit_src_event (GstPad * pad, GstObject * parent,
+    GstEvent * event);
+static gboolean ensure_context (GstGLStereoSplit * self);
+
+static void
+gst_gl_stereosplit_class_init (GstGLStereoSplitClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  gst_element_class_set_static_metadata (element_class,
+      "GLStereoSplit", "Codec/Converter",
+      "Splits a stereoscopic stream into separate left/right streams",
+      "Jan Schmidt <jan@centricular.com>\n"
+      "Matthew Waters <matthew@centricular.com>");
+
+  gobject_class->finalize = (GObjectFinalizeFunc) (stereosplit_finalize);
+
+  element_class->change_state = stereosplit_change_state;
+  element_class->set_context = stereosplit_set_context;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_left_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_right_template));
+}
+
+static void
+gst_gl_stereosplit_init (GstGLStereoSplit * self)
+{
+  GstPad *pad;
+
+  pad = self->sink_pad =
+      gst_pad_new_from_static_template (&sink_template, "sink");
+
+  gst_pad_set_chain_function (pad, (GstPadChainFunction) (stereosplit_chain));
+  gst_pad_set_query_function (pad, stereosplit_sink_query);
+  gst_pad_set_event_function (pad, stereosplit_sink_event);
+
+  gst_element_add_pad (GST_ELEMENT (self), self->sink_pad);
+
+  pad = self->left_pad =
+      gst_pad_new_from_static_template (&src_left_template, "left");
+  gst_pad_set_query_function (pad, stereosplit_src_query);
+  gst_pad_set_event_function (pad, stereosplit_src_event);
+  gst_element_add_pad (GST_ELEMENT (self), self->left_pad);
+
+  pad = self->right_pad =
+      gst_pad_new_from_static_template (&src_right_template, "right");
+  gst_pad_set_query_function (pad, stereosplit_src_query);
+  gst_pad_set_event_function (pad, stereosplit_src_event);
+  gst_element_add_pad (GST_ELEMENT (self), self->right_pad);
+
+  self->viewconvert = gst_gl_view_convert_new ();
+}
+
+static void
+stereosplit_reset (GstGLStereoSplit * self)
+{
+  if (self->upload)
+    gst_object_replace ((GstObject **) & self->upload, NULL);
+  if (self->convert)
+    gst_object_replace ((GstObject **) & self->convert, NULL);
+  if (self->context)
+    gst_object_replace ((GstObject **) & self->context, NULL);
+  if (self->display)
+    gst_object_replace ((GstObject **) & self->display, NULL);
+}
+
+static void
+stereosplit_finalize (GstGLStereoSplit * self)
+{
+  GObjectClass *klass = G_OBJECT_CLASS (gst_gl_stereosplit_parent_class);
+
+  if (self->viewconvert)
+    gst_object_replace ((GstObject **) & self->viewconvert, NULL);
+
+  klass->finalize ((GObject *) (self));
+}
+
+static void
+stereosplit_set_context (GstElement * element, GstContext * context)
+{
+  GstGLStereoSplit *stereosplit = GST_GL_STEREOSPLIT (element);
+
+  gst_gl_handle_set_context (element, context, &stereosplit->display,
+      &stereosplit->other_context);
+
+  if (stereosplit->display)
+    gst_gl_display_filter_gl_api (stereosplit->display, SUPPORTED_GL_APIS);
+}
+
+static GstStateChangeReturn
+stereosplit_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLStereoSplit *stereosplit = GST_GL_STEREOSPLIT (element);
+  GstStateChangeReturn result;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_gl_ensure_element_data (element, &stereosplit->display,
+              &stereosplit->other_context))
+        return GST_STATE_CHANGE_FAILURE;
+
+      gst_gl_display_filter_gl_api (stereosplit->display, SUPPORTED_GL_APIS);
+      break;
+    default:
+      break;
+  }
+
+  result =
+      GST_ELEMENT_CLASS (gst_gl_stereosplit_parent_class)->change_state
+      (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      if (stereosplit->other_context) {
+        gst_object_unref (stereosplit->other_context);
+        stereosplit->other_context = NULL;
+      }
+
+      if (stereosplit->display) {
+        gst_object_unref (stereosplit->display);
+        stereosplit->display = NULL;
+      }
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      stereosplit_reset (stereosplit);
+      break;
+    default:
+      break;
+  }
+
+  return result;
+}
+
+static GstCaps *
+stereosplit_transform_caps (GstGLStereoSplit * self, GstPadDirection direction,
+    GstCaps * caps, GstCaps * filter)
+{
+  GstCaps *next_caps;
+
+  /* FIXME: Is this the right way to ensure a context here ? */
+  if (!ensure_context (self))
+    return NULL;
+
+  if (direction == GST_PAD_SINK) {
+    next_caps =
+        gst_gl_upload_transform_caps (self->context, direction, caps, filter);
+    caps = next_caps;
+
+    next_caps =
+        gst_gl_color_convert_transform_caps (self->context, direction, caps,
+        NULL);
+    gst_caps_unref (caps);
+    caps = next_caps;
+
+    next_caps =
+        gst_gl_view_convert_transform_caps (self->viewconvert, direction, caps,
+        NULL);
+    gst_caps_unref (caps);
+  } else {
+    next_caps =
+        gst_gl_view_convert_transform_caps (self->viewconvert, direction, caps,
+        filter);
+    caps = next_caps;
+
+    next_caps =
+        gst_gl_color_convert_transform_caps (self->context, direction, caps,
+        NULL);
+    gst_caps_unref (caps);
+    caps = next_caps;
+
+    next_caps =
+        gst_gl_upload_transform_caps (self->context, direction, caps, NULL);
+    gst_caps_unref (caps);
+  }
+
+  return next_caps;
+}
+
+static GstCaps *
+strip_mview_fields (GstCaps * incaps, GstVideoMultiviewFlags keep_flags)
+{
+  GstCaps *outcaps = gst_caps_make_writable (incaps);
+
+  gint i, n;
+
+  n = gst_caps_get_size (outcaps);
+  for (i = 0; i < n; i++) {
+    GstStructure *st = gst_caps_get_structure (outcaps, i);
+    GstVideoMultiviewFlags flags, mask;
+
+    gst_structure_remove_field (st, "multiview-mode");
+    if (gst_structure_get_flagset (st, "multiview-flags", &flags, &mask)) {
+      flags &= keep_flags;
+      mask = keep_flags;
+      gst_structure_set (st, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, flags, mask, NULL);
+    }
+  }
+
+  return outcaps;
+}
+
+static gboolean stereosplit_do_bufferpool (GstGLStereoSplit * self,
+    GstCaps * caps);
+
+static GstCaps *
+stereosplit_get_src_caps (GstGLStereoSplit * split,
+    GstPad * pad, GstVideoMultiviewMode preferred_mode)
+{
+  GstCaps *outcaps, *tmp, *templ_caps;
+  GValue item = G_VALUE_INIT, list = G_VALUE_INIT;
+
+  /* Get the template format */
+  templ_caps = gst_pad_get_pad_template_caps (pad);
+
+  /* And limit down to the preferred mode or mono */
+  templ_caps = gst_caps_make_writable (templ_caps);
+
+  g_value_init (&item, G_TYPE_STRING);
+  g_value_init (&list, GST_TYPE_LIST);
+  g_value_set_static_string (&item,
+      gst_video_multiview_mode_to_caps_string (preferred_mode));
+  gst_value_list_append_value (&list, &item);
+  g_value_set_static_string (&item,
+      gst_video_multiview_mode_to_caps_string (GST_VIDEO_MULTIVIEW_MODE_MONO));
+  gst_value_list_append_value (&list, &item);
+
+  gst_caps_set_value (templ_caps, "multiview-mode", &list);
+
+  g_value_unset (&list);
+  g_value_unset (&item);
+
+  /* And intersect with the peer */
+  if ((tmp = gst_pad_peer_query_caps (pad, NULL)) == NULL) {
+    gst_caps_unref (templ_caps);
+    return NULL;
+  }
+
+  outcaps = gst_caps_intersect_full (tmp, templ_caps, GST_CAPS_INTERSECT_FIRST);
+  gst_caps_unref (tmp);
+  gst_caps_unref (templ_caps);
+
+  GST_DEBUG_OBJECT (split, "Src pad %" GST_PTR_FORMAT " caps %" GST_PTR_FORMAT,
+      pad, outcaps);
+  return outcaps;
+}
+
+static gboolean
+stereosplit_set_output_caps (GstGLStereoSplit * split, GstCaps * sinkcaps)
+{
+  GstCaps *left = NULL, *right = NULL, *tridcaps = NULL;
+  GstCaps *tmp, *combined;
+  gboolean res = FALSE;
+
+  /* Choose some preferred output caps.
+   * Keep input width/height and PAR, preserve preferred output
+   * multiview flags for flipping/flopping if any, and set each
+   * left right pad to either left/mono and right/mono, as they prefer
+   */
+
+  /* Calculate what downstream can collectively support */
+  left =
+      stereosplit_get_src_caps (split, split->left_pad,
+      GST_VIDEO_MULTIVIEW_MODE_LEFT);
+  if (left == NULL)
+    goto fail;
+  right =
+      stereosplit_get_src_caps (split, split->right_pad,
+      GST_VIDEO_MULTIVIEW_MODE_RIGHT);
+  if (right == NULL)
+    goto fail;
+
+  tridcaps = stereosplit_transform_caps (split, GST_PAD_SINK, sinkcaps, NULL);
+
+  if (!tridcaps || gst_caps_is_empty (tridcaps)) {
+    GST_ERROR_OBJECT (split,
+        "Failed to transform input caps %" GST_PTR_FORMAT, sinkcaps);
+    goto fail;
+  }
+
+  /* Preserve downstream preferred flipping/flopping */
+  tmp =
+      strip_mview_fields (gst_caps_ref (left),
+      GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED |
+      GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED);
+  combined = gst_caps_intersect (tridcaps, tmp);
+  gst_caps_unref (tridcaps);
+  gst_caps_unref (tmp);
+  tridcaps = combined;
+
+  tmp =
+      strip_mview_fields (gst_caps_ref (right),
+      GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED |
+      GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED);
+  combined = gst_caps_intersect (tridcaps, tmp);
+  gst_caps_unref (tridcaps);
+  gst_caps_unref (tmp);
+  tridcaps = combined;
+
+  if (G_UNLIKELY (gst_caps_is_empty (tridcaps))) {
+    gst_caps_unref (tridcaps);
+    goto fail;
+  }
+
+  /* Now generate the version for each output pad */
+  GST_DEBUG_OBJECT (split, "Attempting to set output caps %" GST_PTR_FORMAT,
+      tridcaps);
+  tmp = gst_caps_intersect (tridcaps, left);
+  gst_caps_unref (left);
+  left = tmp;
+  left = gst_caps_fixate (left);
+  if (!gst_pad_set_caps (split->left_pad, left)) {
+    GST_ERROR_OBJECT (split,
+        "Failed to set left output caps %" GST_PTR_FORMAT, left);
+    goto fail;
+  }
+
+  tmp = gst_caps_intersect (tridcaps, right);
+  gst_caps_unref (right);
+  right = tmp;
+  right = gst_caps_fixate (right);
+  if (!gst_pad_set_caps (split->right_pad, right)) {
+    GST_ERROR_OBJECT (split,
+        "Failed to set right output caps %" GST_PTR_FORMAT, right);
+    goto fail;
+  }
+
+  /* FIXME: Provide left and right caps to do_bufferpool */
+  stereosplit_do_bufferpool (split, left);
+
+  res = TRUE;
+
+fail:
+  if (left)
+    gst_caps_unref (left);
+  if (right)
+    gst_caps_unref (right);
+  if (tridcaps)
+    gst_caps_unref (tridcaps);
+  return res;
+}
+
+static gboolean
+_find_local_gl_context (GstGLStereoSplit * split)
+{
+  GstQuery *query;
+  GstContext *context;
+  const GstStructure *s;
+
+  if (split->context)
+    return TRUE;
+
+  query = gst_query_new_context ("gst.gl.local_context");
+  if (!split->context
+      && gst_gl_run_query (GST_ELEMENT (split), query, GST_PAD_SRC)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &split->context,
+          NULL);
+    }
+  }
+  if (!split->context
+      && gst_gl_run_query (GST_ELEMENT (split), query, GST_PAD_SINK)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &split->context,
+          NULL);
+    }
+  }
+
+  GST_DEBUG_OBJECT (split, "found local context %p", split->context);
+
+  gst_query_unref (query);
+
+  if (split->context)
+    return TRUE;
+
+  return FALSE;
+}
+
+static void
+_init_upload (GstGLStereoSplit * split)
+{
+  GstGLContext *context = split->context;
+
+  if (!split->upload) {
+    GstCaps *in_caps = gst_pad_get_current_caps (GST_PAD (split->sink_pad));
+    GstCaps *split_caps = gst_pad_get_current_caps (split->left_pad);
+    GstCaps *upload_caps = gst_caps_copy (in_caps);
+    GstCapsFeatures *gl_features =
+        gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+    GstCaps *gl_caps;
+
+    split->upload = gst_gl_upload_new (context);
+
+    gst_caps_set_features (upload_caps, 0,
+        gst_caps_features_copy (gl_features));
+    gst_gl_upload_set_caps (split->upload, in_caps, upload_caps);
+    gst_caps_unref (in_caps);
+
+    gl_caps = gst_caps_copy (upload_caps);
+    gst_caps_set_simple (gl_caps, "format", G_TYPE_STRING, "RGBA", NULL);
+    gst_caps_set_features (gl_caps, 0, gst_caps_features_copy (gl_features));
+
+    if (!split->convert) {
+      split->convert = gst_gl_color_convert_new (context);
+      gst_gl_color_convert_set_caps (split->convert, upload_caps, gl_caps);
+    }
+
+    gst_caps_unref (upload_caps);
+    gst_caps_features_free (gl_features);
+
+    gst_gl_view_convert_set_context (split->viewconvert, split->context);
+
+    split_caps = gst_caps_make_writable (split_caps);
+    gst_caps_set_simple (split_caps, "multiview-mode", G_TYPE_STRING,
+        "separated", "views", G_TYPE_INT, 2, NULL);
+
+    gst_gl_view_convert_set_caps (split->viewconvert, gl_caps, split_caps);
+
+    gst_caps_unref (split_caps);
+    gst_caps_unref (gl_caps);
+  }
+}
+
+static gboolean
+ensure_context (GstGLStereoSplit * self)
+{
+  GError *error = NULL;
+
+  if (!gst_gl_ensure_element_data (self, &self->display, &self->other_context))
+    return FALSE;
+
+  gst_gl_display_filter_gl_api (self->display, SUPPORTED_GL_APIS);
+
+  _find_local_gl_context (self);
+
+  if (!self->context) {
+    GST_OBJECT_LOCK (self->display);
+    do {
+      if (self->context)
+        gst_object_unref (self->context);
+      /* just get a GL context.  we don't care */
+      self->context =
+          gst_gl_display_get_gl_context_for_thread (self->display, NULL);
+      if (!self->context) {
+        if (!gst_gl_display_create_context (self->display, self->other_context,
+                &self->context, &error)) {
+          GST_OBJECT_UNLOCK (self->display);
+          goto context_error;
+        }
+      }
+    } while (!gst_gl_display_add_context (self->display, self->context));
+    GST_OBJECT_UNLOCK (self->display);
+  }
+
+  return TRUE;
+
+context_error:
+  {
+    GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, ("%s", error->message),
+        (NULL));
+    g_clear_error (&error);
+    return FALSE;
+  }
+}
+
+static gboolean
+stereosplit_decide_allocation (GstGLStereoSplit * self, GstQuery * query)
+{
+  if (!ensure_context (self))
+    return FALSE;
+  if (self->upload)
+    gst_object_replace ((GstObject **) & self->upload, NULL);
+  if (self->convert)
+    gst_object_replace ((GstObject **) & self->convert, NULL);
+
+  return TRUE;
+
+}
+
+static gboolean
+stereosplit_propose_allocation (GstGLStereoSplit * self, GstQuery * query)
+{
+
+  if (!gst_gl_ensure_element_data (self, &self->display, &self->other_context))
+    return FALSE;
+
+  _init_upload (self);
+
+  gst_gl_upload_propose_allocation (self->upload, NULL, query);
+
+  return TRUE;
+}
+
+static gboolean
+stereosplit_do_bufferpool (GstGLStereoSplit * self, GstCaps * caps)
+{
+  GstQuery *query;
+
+  query = gst_query_new_allocation (caps, TRUE);
+  if (!gst_pad_peer_query (self->left_pad, query)) {
+    if (!gst_pad_peer_query (self->right_pad, query)) {
+      GST_DEBUG_OBJECT (self, "peer ALLOCATION query failed on both src pads");
+    }
+  }
+
+  if (!stereosplit_decide_allocation (self, query)) {
+    gst_query_unref (query);
+    return FALSE;
+  }
+
+  gst_query_unref (query);
+  return TRUE;
+}
+
+static GstFlowReturn
+stereosplit_chain (GstPad * pad, GstGLStereoSplit * split, GstBuffer * buf)
+{
+  GstBuffer *uploaded_buffer, *converted_buffer, *left, *right;
+  GstBuffer *split_buffer = NULL;
+  GstFlowReturn ret;
+  gint i, n_planes;
+
+  if (!split->upload)
+    _init_upload (split);
+
+  n_planes = GST_VIDEO_INFO_N_PLANES (&split->viewconvert->out_info);
+
+  GST_LOG_OBJECT (split, "chaining buffer %" GST_PTR_FORMAT, buf);
+
+  if (GST_GL_UPLOAD_DONE != gst_gl_upload_perform_with_buffer (split->upload,
+          buf, &uploaded_buffer)) {
+    gst_buffer_unref (buf);
+    GST_ELEMENT_ERROR (split, RESOURCE, NOT_FOUND, ("%s",
+            "Failed to upload buffer"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+  gst_buffer_unref (buf);
+
+  if (!(converted_buffer =
+          gst_gl_color_convert_perform (split->convert, uploaded_buffer))) {
+    GST_ELEMENT_ERROR (split, RESOURCE, NOT_FOUND, ("%s",
+            "Failed to convert buffer"), (NULL));
+    gst_buffer_unref (uploaded_buffer);
+    return GST_FLOW_ERROR;
+  }
+  gst_buffer_unref (uploaded_buffer);
+
+  if (gst_gl_view_convert_submit_input_buffer (split->viewconvert,
+          GST_BUFFER_IS_DISCONT (converted_buffer),
+          converted_buffer) != GST_FLOW_OK) {
+    GST_ELEMENT_ERROR (split, RESOURCE, NOT_FOUND, ("%s",
+            "Failed to 3d convert buffer"),
+        ("Could not get submit input buffer"));
+    return GST_FLOW_ERROR;
+  }
+
+  ret = gst_gl_view_convert_get_output (split->viewconvert, &split_buffer);
+  if (ret != GST_FLOW_OK) {
+    GST_ELEMENT_ERROR (split, RESOURCE, NOT_FOUND, ("%s",
+            "Failed to 3d convert buffer"), ("Could not get output buffer"));
+    return GST_FLOW_ERROR;
+  }
+  if (split_buffer == NULL)
+    return GST_FLOW_OK;         /* Need another input buffer */
+
+  left = gst_buffer_new ();
+  gst_buffer_copy_into (left, buf,
+      GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+  GST_BUFFER_FLAG_UNSET (left, GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
+
+  gst_buffer_add_parent_buffer_meta (left, split_buffer);
+
+  for (i = 0; i < n_planes; i++) {
+    GstMemory *mem = gst_buffer_get_memory (split_buffer, i);
+    gst_buffer_append_memory (left, mem);
+  }
+
+  ret = gst_pad_push (split->left_pad, gst_buffer_ref (left));
+  /* Allow unlinked on the first pad - as long as the 2nd isn't unlinked */
+  gst_buffer_unref (left);
+  if (G_UNLIKELY (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)) {
+    gst_buffer_unref (split_buffer);
+    return ret;
+  }
+
+  right = gst_buffer_new ();
+  gst_buffer_copy_into (right, buf,
+      GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+  GST_BUFFER_FLAG_UNSET (left, GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
+  gst_buffer_add_parent_buffer_meta (right, split_buffer);
+  for (i = n_planes; i < n_planes * 2; i++) {
+    GstMemory *mem = gst_buffer_get_memory (split_buffer, i);
+    gst_buffer_append_memory (right, mem);
+  }
+
+  ret = gst_pad_push (split->right_pad, gst_buffer_ref (right));
+  gst_buffer_unref (right);
+  gst_buffer_unref (split_buffer);
+  return ret;
+}
+
+static gboolean
+stereosplit_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  GstGLStereoSplit *split = GST_GL_STEREOSPLIT (parent);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+      gboolean ret;
+
+      ret = gst_gl_handle_context_query ((GstElement *) split, query,
+          &split->display, &split->other_context);
+      if (split->display)
+        gst_gl_display_filter_gl_api (split->display, SUPPORTED_GL_APIS);
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, split->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = split->context != NULL;
+      }
+      GST_LOG_OBJECT (split, "context query of type %s %i", context_type, ret);
+
+      if (ret)
+        return ret;
+
+      return gst_pad_query_default (pad, parent, query);
+    }
+      /* FIXME: Handle caps query */
+    default:
+      return gst_pad_query_default (pad, parent, query);
+  }
+}
+
+static gboolean
+stereosplit_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  return gst_pad_event_default (pad, parent, event);
+}
+
+static gboolean
+stereosplit_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  GstGLStereoSplit *split = GST_GL_STEREOSPLIT (parent);
+
+  GST_DEBUG_OBJECT (split, "sink query %s",
+      gst_query_type_get_name (GST_QUERY_TYPE (query)));
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+      gboolean ret;
+
+      ret = gst_gl_handle_context_query ((GstElement *) split, query,
+          &split->display, &split->other_context);
+      if (split->display)
+        gst_gl_display_filter_gl_api (split->display, SUPPORTED_GL_APIS);
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, split->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = split->context != NULL;
+      }
+      GST_LOG_OBJECT (split, "context query of type %s %i", context_type, ret);
+
+      if (ret)
+        return ret;
+
+      return gst_pad_query_default (pad, parent, query);
+    }
+    case GST_QUERY_ALLOCATION:
+    {
+      return stereosplit_propose_allocation (split, query);
+    }
+    case GST_QUERY_ACCEPT_CAPS:
+    {
+      GstCaps *possible, *caps;
+      gboolean allowed;
+
+      gst_query_parse_accept_caps (query, &caps);
+
+      if (!(possible = gst_pad_query_caps (split->sink_pad, caps)))
+        return FALSE;
+
+      allowed = gst_caps_is_subset (caps, possible);
+      gst_caps_unref (possible);
+
+      gst_query_set_accept_caps_result (query, allowed);
+      return allowed;
+    }
+    case GST_QUERY_CAPS:
+    {
+      GstCaps *filter, *left, *right, *combined, *ret, *templ_caps;
+
+      gst_query_parse_caps (query, &filter);
+
+      /* Calculate what downstream can collectively support */
+      if (!(left = gst_pad_peer_query_caps (split->left_pad, NULL)))
+        return FALSE;
+      if (!(right = gst_pad_peer_query_caps (split->right_pad, NULL)))
+        return FALSE;
+
+      /* Strip out multiview mode and flags that might break the
+       * intersection, since we can convert.
+       * We could keep downstream preferred flip/flopping and list
+       * separated as preferred in the future which might
+       * theoretically allow us an easier conversion, but it's not essential
+       */
+      left = strip_mview_fields (left, GST_VIDEO_MULTIVIEW_FLAGS_NONE);
+      right = strip_mview_fields (right, GST_VIDEO_MULTIVIEW_FLAGS_NONE);
+
+      combined = gst_caps_intersect (left, right);
+      gst_caps_unref (left);
+      gst_caps_unref (right);
+
+      /* Intersect peer caps with our template formats */
+      templ_caps = gst_pad_get_pad_template_caps (split->left_pad);
+      ret =
+          gst_caps_intersect_full (combined, templ_caps,
+          GST_CAPS_INTERSECT_FIRST);
+      gst_caps_unref (templ_caps);
+
+      gst_caps_unref (combined);
+      combined = ret;
+
+      if (!combined || gst_caps_is_empty (combined)) {
+        gst_caps_unref (combined);
+        return FALSE;
+      }
+
+      /* Convert from the src pad caps to input formats we support */
+      ret = stereosplit_transform_caps (split, GST_PAD_SRC, combined, filter);
+      gst_caps_unref (combined);
+      combined = ret;
+
+      /* Intersect with the sink pad template then */
+      templ_caps = gst_pad_get_pad_template_caps (split->sink_pad);
+      ret =
+          gst_caps_intersect_full (combined, templ_caps,
+          GST_CAPS_INTERSECT_FIRST);
+      gst_caps_unref (templ_caps);
+
+      GST_LOG_OBJECT (split, "Returning sink pad caps %" GST_PTR_FORMAT, ret);
+
+      gst_query_set_caps_result (query, ret);
+      return !gst_caps_is_empty (ret);
+    }
+    default:
+      return gst_pad_query_default (pad, parent, query);
+  }
+}
+
+static gboolean
+stereosplit_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  GstGLStereoSplit *split = GST_GL_STEREOSPLIT (parent);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:
+    {
+      GstCaps *caps;
+
+      gst_event_parse_caps (event, &caps);
+
+      return stereosplit_set_output_caps (split, caps);
+    }
+    default:
+      return gst_pad_event_default (pad, parent, event);
+  }
+}
diff --git a/ext/gl/gstglstereosplit.h b/ext/gl/gstglstereosplit.h
new file mode 100644
index 0000000..5a1e3c6
--- /dev/null
+++ b/ext/gl/gstglstereosplit.h
@@ -0,0 +1,66 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Jan Schmidt <jan@centricular.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_STEREOSPLIT_H__
+#define __GST_GL_STEREOSPLIT_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_GL_STEREOSPLIT            (gst_gl_stereosplit_get_type())
+#define GST_GL_STEREOSPLIT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_STEREOSPLIT,GstGLStereoSplit))
+#define GST_IS_GL_STEREOSPLIT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_STEREOSPLIT))
+#define GST_GL_STEREOSPLIT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_STEREOSPLIT,GstGLStereoSplitClass))
+#define GST_IS_GL_STEREOSPLIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_STEREOSPLIT))
+#define GST_GL_STEREOSPLIT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_STEREOSPLIT,GstGLStereoSplitClass))
+
+typedef struct _GstGLStereoSplit GstGLStereoSplit;
+typedef struct _GstGLStereoSplitClass GstGLStereoSplitClass;
+
+struct _GstGLStereoSplit
+{
+  GstElement parent;
+
+  GstPad *sink_pad;
+  GstPad *left_pad;
+  GstPad *right_pad;
+
+  GstGLDisplay      *display;
+  GstGLContext      *context;
+  GstGLContext      *other_context;
+
+  GstGLUpload       *upload;
+  GstGLColorConvert *convert;
+  GstGLViewConvert    *viewconvert;
+};
+
+struct _GstGLStereoSplitClass
+{
+  GstElementClass parent_class;
+};
+
+GType gst_gl_stereosplit_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c
index e443df0..93ddfda 100644
--- a/ext/gl/gstgltestsrc.c
+++ b/ext/gl/gstgltestsrc.c
@@ -3,6 +3,7 @@
  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
  * Copyright (C) 2002,2007 David A. Schleef <ds@schleef.org>
  * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -47,11 +48,8 @@
 #include "gltestsrc.h"
 #include <gst/gst-i18n-plugin.h>
 
-#if GST_GL_HAVE_PLATFORM_EGL
-#include <gst/gl/egl/gsteglimagememory.h>
-#endif
-
 #define USE_PEER_BUFFERALLOC
+#define SUPPORTED_GL_APIS GST_GL_API_OPENGL
 
 GST_DEBUG_CATEGORY_STATIC (gl_test_src_debug);
 #define GST_CAT_DEFAULT gl_test_src_debug
@@ -70,14 +68,7 @@
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
         (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-#if GST_GL_HAVE_PLATFORM_EGL
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
-            "RGBA") "; "
-#endif
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
-            "RGBA") "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+            "RGBA"))
     );
 
 #define gst_gl_test_src_parent_class parent_class
@@ -99,6 +90,8 @@
 static gboolean gst_gl_test_src_query (GstBaseSrc * bsrc, GstQuery * query);
 static void gst_gl_test_src_set_context (GstElement * element,
     GstContext * context);
+static GstStateChangeReturn gst_gl_test_src_change_state (GstElement * element,
+    GstStateChange transition);
 
 static void gst_gl_test_src_get_times (GstBaseSrc * basesrc,
     GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
@@ -111,6 +104,8 @@
 
 static void gst_gl_test_src_callback (gpointer stuff);
 
+static gboolean gst_gl_test_src_init_shader (GstGLTestSrc * gltestsrc);
+
 #define GST_TYPE_GL_TEST_SRC_PATTERN (gst_gl_test_src_pattern_get_type ())
 static GType
 gst_gl_test_src_pattern_get_type (void)
@@ -130,6 +125,7 @@
     {GST_GL_TEST_SRC_CHECKERS8, "Checkers 8px", "checkers-8"},
     {GST_GL_TEST_SRC_CIRCULAR, "Circular", "circular"},
     {GST_GL_TEST_SRC_BLINK, "Blink", "blink"},
+    {GST_GL_TEST_SRC_MANDELBROT, "Mandelbrot Fractal", "mandelbrot"},
     {0, NULL, NULL}
   };
 
@@ -181,6 +177,7 @@
       gst_static_pad_template_get (&src_factory));
 
   element_class->set_context = gst_gl_test_src_set_context;
+  element_class->change_state = gst_gl_test_src_change_state;
 
   gstbasesrc_class->set_caps = gst_gl_test_src_setcaps;
   gstbasesrc_class->is_seekable = gst_gl_test_src_is_seekable;
@@ -227,6 +224,97 @@
   return caps;
 }
 
+const gchar *snow_vertex_src = "attribute vec4 position; \
+    attribute vec2 uv; \
+    uniform mat4 mvp; \
+    varying vec2 out_uv; \
+    void main() \
+    { \
+       gl_Position = mvp * position; \
+       out_uv = uv; \
+    }";
+
+const gchar *snow_fragment_src = "uniform float time; \
+    varying vec2 out_uv; \
+    \
+    float rand(vec2 co){ \
+        return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453); \
+    } \
+    void main() \
+    { \
+      gl_FragColor = rand(time * out_uv) * vec4(1); \
+    }";
+
+const gchar *mandelbrot_vertex_src = "attribute vec4 position; \
+    attribute vec2 uv; \
+    uniform mat4 mvp; \
+    uniform float aspect_ratio; \
+    varying vec2 fractal_position; \
+    \
+    void main() \
+    { \
+       gl_Position = mvp * position; \
+       fractal_position = vec2(uv.y - 0.8, aspect_ratio * (uv.x - 0.5)); \
+       fractal_position *= 2.5; \
+    }";
+
+const gchar *mandelbrot_fragment_src = "uniform float time; \
+    varying vec2 fractal_position; \
+    \
+    const vec4 K = vec4(1.0, 0.66, 0.33, 3.0); \
+    \
+    vec4 hsv_to_rgb(float hue, float saturation, float value) { \
+      vec4 p = abs(fract(vec4(hue) + K) * 6.0 - K.wwww); \
+      return value * mix(K.xxxx, clamp(p - K.xxxx, 0.0, 1.0), saturation); \
+    } \
+    \
+    vec4 i_to_rgb(int i) { \
+      float hue = float(i) / 100.0 + sin(time); \
+      return hsv_to_rgb(hue, 0.5, 0.8); \
+    } \
+    \
+    vec2 pow_2_complex(vec2 c) { \
+      return vec2(c.x*c.x - c.y*c.y, 2.0 * c.x * c.y); \
+    } \
+    \
+    vec2 mandelbrot(vec2 c, vec2 c0) { \
+      return pow_2_complex(c) + c0; \
+    } \
+    \
+    vec4 iterate_pixel(vec2 position) { \
+      vec2 c = vec2(0); \
+      for (int i=0; i < 100; i++) { \
+        if (c.x*c.x + c.y*c.y > 2.0*2.0) \
+          return i_to_rgb(i); \
+        c = mandelbrot(c, position); \
+      } \
+      return vec4(0, 0, 0, 1); \
+    } \
+    \
+    void main() { \
+      gl_FragColor = iterate_pixel(fractal_position); \
+    }";
+
+
+const gchar *checkers_vertex_src = "attribute vec4 position; \
+    uniform mat4 mvp; \
+    void main() \
+    { \
+       gl_Position = mvp * position; \
+    }";
+
+const gchar *checkers_fragment_src = "uniform float checker_width; \
+    void main() \
+    { \
+      vec2 xy_index= floor((gl_FragCoord.xy-vec2(0.5,0.5))/checker_width); \
+      vec2 xy_mod=mod(xy_index,vec2(2.0,2.0)); \
+      float result=mod(xy_mod.x+xy_mod.y,2.0); \
+      gl_FragColor.r=step(result,0.5); \
+      gl_FragColor.g=1.0-gl_FragColor.r; \
+      gl_FragColor.ba=vec2(0,1); \
+    }";
+
+
 static void
 gst_gl_test_src_set_pattern (GstGLTestSrc * gltestsrc, gint pattern_type)
 {
@@ -239,7 +327,9 @@
       gltestsrc->make_image = gst_gl_test_src_smpte;
       break;
     case GST_GL_TEST_SRC_SNOW:
-      gltestsrc->make_image = gst_gl_test_src_snow;
+      gltestsrc->vertex_src = snow_vertex_src;
+      gltestsrc->fragment_src = snow_fragment_src;
+      gltestsrc->make_image = gst_gl_test_src_shader;
       break;
     case GST_GL_TEST_SRC_BLACK:
       gltestsrc->make_image = gst_gl_test_src_black;
@@ -257,15 +347,23 @@
       gltestsrc->make_image = gst_gl_test_src_blue;
       break;
     case GST_GL_TEST_SRC_CHECKERS1:
+      gltestsrc->vertex_src = checkers_vertex_src;
+      gltestsrc->fragment_src = checkers_fragment_src;
       gltestsrc->make_image = gst_gl_test_src_checkers1;
       break;
     case GST_GL_TEST_SRC_CHECKERS2:
+      gltestsrc->vertex_src = checkers_vertex_src;
+      gltestsrc->fragment_src = checkers_fragment_src;
       gltestsrc->make_image = gst_gl_test_src_checkers2;
       break;
     case GST_GL_TEST_SRC_CHECKERS4:
+      gltestsrc->vertex_src = checkers_vertex_src;
+      gltestsrc->fragment_src = checkers_fragment_src;
       gltestsrc->make_image = gst_gl_test_src_checkers4;
       break;
     case GST_GL_TEST_SRC_CHECKERS8:
+      gltestsrc->vertex_src = checkers_vertex_src;
+      gltestsrc->fragment_src = checkers_fragment_src;
       gltestsrc->make_image = gst_gl_test_src_checkers8;
       break;
     case GST_GL_TEST_SRC_CIRCULAR:
@@ -274,6 +372,11 @@
     case GST_GL_TEST_SRC_BLINK:
       gltestsrc->make_image = gst_gl_test_src_black;
       break;
+    case GST_GL_TEST_SRC_MANDELBROT:
+      gltestsrc->vertex_src = mandelbrot_vertex_src;
+      gltestsrc->fragment_src = mandelbrot_fragment_src;
+      gltestsrc->make_image = gst_gl_test_src_shader;
+      break;
     default:
       g_assert_not_reached ();
   }
@@ -351,7 +454,11 @@
 {
   GstGLTestSrc *src = GST_GL_TEST_SRC (element);
 
-  gst_gl_handle_set_context (element, context, &src->display);
+  gst_gl_handle_set_context (element, context, &src->display,
+      &src->other_context);
+
+  if (src->display)
+    gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
 }
 
 static gboolean
@@ -365,8 +472,39 @@
   switch (GST_QUERY_TYPE (query)) {
     case GST_QUERY_CONTEXT:
     {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+
       res = gst_gl_handle_context_query ((GstElement *) src, query,
-          &src->display);
+          &src->display, &src->other_context);
+      if (src->display)
+        gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, src->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        res = src->context != NULL;
+      }
+      GST_LOG_OBJECT (src, "context query of type %s %i", context_type, res);
+
+      if (res)
+        return res;
+
       break;
     }
     case GST_QUERY_CONVERT:
@@ -379,13 +517,14 @@
           gst_video_info_convert (&src->out_info, src_fmt, src_val, dest_fmt,
           &dest_val);
       gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val);
-      break;
+
+      return res;
     }
     default:
-      res = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
+      break;
   }
 
-  return res;
+  return GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
 }
 
 static void
@@ -448,6 +587,19 @@
   return TRUE;
 }
 
+static gboolean
+gst_gl_test_src_init_shader (GstGLTestSrc * gltestsrc)
+{
+  if (gst_gl_context_get_gl_api (gltestsrc->context)) {
+    /* blocking call, wait until the opengl thread has compiled the shader */
+    if (gltestsrc->vertex_src == NULL)
+      return FALSE;
+    return gst_gl_context_gen_shader (gltestsrc->context, gltestsrc->vertex_src,
+        gltestsrc->fragment_src, &gltestsrc->shader);
+  }
+  return TRUE;
+}
+
 static GstFlowReturn
 gst_gl_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
 {
@@ -455,16 +607,8 @@
   GstClockTime next_time;
   gint width, height;
   GstVideoFrame out_frame;
+  GstGLSyncMeta *sync_meta;
   guint out_tex;
-  gboolean to_download =
-      gst_caps_features_is_equal (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
-      gst_caps_get_features (src->out_caps, 0));
-  GstMapFlags out_map_flags = GST_MAP_WRITE;
-
-  to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (buffer, 0));
-
-  if (!to_download)
-    out_map_flags |= GST_MAP_GL;
 
   if (G_UNLIKELY (!src->negotiated || !src->context))
     goto not_negotiated;
@@ -484,48 +628,27 @@
       src->make_image = gst_gl_test_src_black;
   }
 
-  if (!gst_video_frame_map (&out_frame, &src->out_info, buffer, out_map_flags)) {
+  if (!gst_video_frame_map (&out_frame, &src->out_info, buffer,
+          GST_MAP_WRITE | GST_MAP_GL)) {
     return GST_FLOW_NOT_NEGOTIATED;
   }
 
-  if (!to_download) {
-    out_tex = *(guint *) out_frame.data[0];
-  } else {
-    GST_INFO ("Output Buffer does not contain correct meta, "
-        "attempting to wrap for download");
-
-    if (!src->download)
-      src->download = gst_gl_download_new (src->context);
-
-    gst_gl_download_set_format (src->download, &out_frame.info);
-
-    if (!src->out_tex_id) {
-      gst_gl_context_gen_texture (src->context, &src->out_tex_id,
-          GST_VIDEO_FORMAT_RGBA, GST_VIDEO_FRAME_WIDTH (&out_frame),
-          GST_VIDEO_FRAME_HEIGHT (&out_frame));
-    }
-    out_tex = src->out_tex_id;
-  }
+  out_tex = *(guint *) out_frame.data[0];
 
   gst_buffer_replace (&src->buffer, buffer);
 
-  //blocking call, generate a FBO
   if (!gst_gl_context_use_fbo_v2 (src->context, width, height, src->fbo,
           src->depthbuffer, out_tex, gst_gl_test_src_callback,
           (gpointer) src)) {
     goto not_negotiated;
   }
 
-  if (to_download) {
-    if (!gst_gl_download_perform_with_data (src->download, out_tex,
-            out_frame.data)) {
-      GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s",
-              "Failed to init upload format"), (NULL));
-      return FALSE;
-    }
-  }
   gst_video_frame_unmap (&out_frame);
 
+  sync_meta = gst_buffer_get_gl_sync_meta (buffer);
+  if (sync_meta)
+    gst_gl_sync_meta_set_sync_point (sync_meta, src->context);
+
   GST_BUFFER_TIMESTAMP (buffer) = src->timestamp_offset + src->running_time;
   GST_BUFFER_OFFSET (buffer) = src->n_frames;
   src->n_frames++;
@@ -562,9 +685,11 @@
 {
   GstGLTestSrc *src = GST_GL_TEST_SRC (basesrc);
 
-  if (!gst_gl_ensure_display (src, &src->display))
+  if (!gst_gl_ensure_element_data (src, &src->display, &src->other_context))
     return FALSE;
 
+  gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
+
   src->running_time = 0;
   src->n_frames = 0;
   src->negotiated = FALSE;
@@ -580,13 +705,9 @@
   gst_caps_replace (&src->out_caps, NULL);
 
   if (src->context) {
-    if (src->out_tex_id) {
-      gst_gl_context_del_texture (src->context, &src->out_tex_id);
-    }
-
-    if (src->download) {
-      gst_object_unref (src->download);
-      src->download = NULL;
+    if (src->shader) {
+      gst_object_unref (src->shader);
+      src->shader = NULL;
     }
     //blocking call, delete the FBO
     gst_gl_context_del_fbo (src->context, src->fbo, src->depthbuffer);
@@ -594,12 +715,46 @@
     src->context = NULL;
   }
 
-  if (src->display) {
-    gst_object_unref (src->display);
-    src->display = NULL;
+  return TRUE;
+}
+
+static gboolean
+_find_local_gl_context (GstGLTestSrc * src)
+{
+  GstQuery *query;
+  GstContext *context;
+  const GstStructure *s;
+
+  if (src->context)
+    return TRUE;
+
+  query = gst_query_new_context ("gst.gl.local_context");
+  if (!src->context && gst_gl_run_query (GST_ELEMENT (src), query, GST_PAD_SRC)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &src->context,
+          NULL);
+    }
+  }
+  if (!src->context
+      && gst_gl_run_query (GST_ELEMENT (src), query, GST_PAD_SINK)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &src->context,
+          NULL);
+    }
   }
 
-  return TRUE;
+  GST_DEBUG_OBJECT (src, "found local context %p", src->context);
+
+  gst_query_unref (query);
+
+  if (src->context)
+    return TRUE;
+
+  return FALSE;
 }
 
 static gboolean
@@ -612,55 +767,34 @@
   guint min, max, size;
   gboolean update_pool;
   GError *error = NULL;
-  guint idx;
   guint out_width, out_height;
-  GstGLContext *other_context = NULL;
 
-  if (!gst_gl_ensure_display (src, &src->display))
+  if (!gst_gl_ensure_element_data (src, &src->display, &src->other_context))
     return FALSE;
 
-  if (gst_query_find_allocation_meta (query,
-          GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx)) {
-    GstGLContext *context;
-    const GstStructure *upload_meta_params;
-    gpointer handle;
-    gchar *type;
-    gchar *apis;
+  gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
 
-    gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
-    if (upload_meta_params) {
-      if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
-              GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
-        GstGLContext *old = src->context;
-
-        src->context = context;
-        if (old)
-          gst_object_unref (old);
-      } else if (gst_structure_get (upload_meta_params, "gst.gl.context.handle",
-              G_TYPE_POINTER, &handle, "gst.gl.context.type", G_TYPE_STRING,
-              &type, "gst.gl.context.apis", G_TYPE_STRING, &apis, NULL)
-          && handle) {
-        GstGLPlatform platform = GST_GL_PLATFORM_NONE;
-        GstGLAPI gl_apis;
-
-        GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
-            handle, type, apis);
-
-        platform = gst_gl_platform_from_string (type);
-        gl_apis = gst_gl_api_from_string (apis);
-
-        if (gl_apis && platform)
-          other_context =
-              gst_gl_context_new_wrapped (src->display, (guintptr) handle,
-              platform, gl_apis);
-      }
-    }
-  }
+  _find_local_gl_context (src);
 
   if (!src->context) {
-    src->context = gst_gl_context_new (src->display);
-    if (!gst_gl_context_create (src->context, other_context, &error))
-      goto context_error;
+    GST_OBJECT_LOCK (src->display);
+    do {
+      if (src->context) {
+        gst_object_unref (src->context);
+        src->context = NULL;
+      }
+      /* just get a GL context.  we don't care */
+      src->context =
+          gst_gl_display_get_gl_context_for_thread (src->display, NULL);
+      if (!src->context) {
+        if (!gst_gl_display_create_context (src->display, src->other_context,
+                &src->context, &error)) {
+          GST_OBJECT_UNLOCK (src->display);
+          goto context_error;
+        }
+      }
+    } while (!gst_gl_display_add_context (src->display, src->context));
+    GST_OBJECT_UNLOCK (src->display);
   }
 
   out_width = GST_VIDEO_INFO_WIDTH (&src->out_info);
@@ -686,12 +820,22 @@
     update_pool = FALSE;
   }
 
-  if (!pool)
+  if (!pool || !GST_IS_GL_BUFFER_POOL (pool)) {
+    /* can't use this pool */
+    if (pool)
+      gst_object_unref (pool);
     pool = gst_gl_buffer_pool_new (src->context);
-
+  }
   config = gst_buffer_pool_get_config (pool);
+
   gst_buffer_pool_config_set_params (config, caps, size, min, max);
   gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
+  if (gst_query_find_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, NULL))
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_GL_SYNC_META);
+  gst_buffer_pool_config_add_option (config,
+      GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META);
+
   gst_buffer_pool_set_config (pool, config);
 
   if (update_pool)
@@ -699,6 +843,8 @@
   else
     gst_query_add_allocation_pool (query, pool, size, min, max);
 
+  gst_gl_test_src_init_shader (src);
+
   gst_object_unref (pool);
 
   return TRUE;
@@ -707,7 +853,9 @@
   {
     GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
         (NULL));
-    gst_object_unref (src->context);
+    g_clear_error (&error);
+    if (src->context)
+      gst_object_unref (src->context);
     src->context = NULL;
     return FALSE;
   }
@@ -725,3 +873,48 @@
   gst_buffer_unref (src->buffer);
   src->buffer = NULL;
 }
+
+static GstStateChangeReturn
+gst_gl_test_src_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGLTestSrc *src = GST_GL_TEST_SRC (element);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  GST_DEBUG_OBJECT (src, "changing state: %s => %s",
+      gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+      gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_gl_ensure_element_data (element, &src->display,
+              &src->other_context))
+        return GST_STATE_CHANGE_FAILURE;
+
+      gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
+      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_READY_TO_NULL:
+      if (src->other_context) {
+        gst_object_unref (src->other_context);
+        src->other_context = NULL;
+      }
+
+      if (src->display) {
+        gst_object_unref (src->display);
+        src->display = NULL;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstgltestsrc.h b/ext/gl/gstgltestsrc.h
index 73f9f34..1c045c7 100644
--- a/ext/gl/gstgltestsrc.h
+++ b/ext/gl/gstgltestsrc.h
@@ -72,7 +72,8 @@
     GST_GL_TEST_SRC_CHECKERS4,
     GST_GL_TEST_SRC_CHECKERS8,
     GST_GL_TEST_SRC_CIRCULAR,
-    GST_GL_TEST_SRC_BLINK
+    GST_GL_TEST_SRC_BLINK,
+    GST_GL_TEST_SRC_MANDELBROT
 } GstGLTestSrcPattern;
 
 typedef struct _GstGLTestSrc GstGLTestSrc;
@@ -98,19 +99,21 @@
     GLuint fbo;
     GLuint depthbuffer;
 
+    GstGLShader *shader;
+
     GstBuffer* buffer;
     GstBufferPool *pool;
 
-    guint out_tex_id;
-    GstGLDownload *download;
-
     GstGLDisplay *display;
-    GstGLContext *context;
+    GstGLContext *context, *other_context;
     gint64 timestamp_offset;              /* base offset */
     GstClockTime running_time;            /* total running time */
     gint64 n_frames;                      /* total frames sent */
     gboolean negotiated;
 
+    const gchar *vertex_src;
+    const gchar *fragment_src;
+
     void (*make_image) (GstGLTestSrc* v, GstBuffer* buffer, gint w, gint h);
 
     GstCaps *out_caps;
diff --git a/ext/gl/gstgltransformation.c b/ext/gl/gstgltransformation.c
index 0da8860..38b5743 100644
--- a/ext/gl/gstgltransformation.c
+++ b/ext/gl/gstgltransformation.c
@@ -44,16 +44,20 @@
 #include "config.h"
 #endif
 
-#include <gst/gl/gstglapi.h>
 #include "gstgltransformation.h"
 
+#include <gst/gl/gstglapi.h>
+#include <graphene-gobject.h>
+
 #define GST_CAT_DEFAULT gst_gl_transformation_debug
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
 
+#define gst_gl_transformation_parent_class parent_class
+
 enum
 {
   PROP_0,
-  PROP_FOVY,
+  PROP_FOV,
   PROP_ORTHO,
   PROP_TRANSLATION_X,
   PROP_TRANSLATION_Y,
@@ -62,7 +66,11 @@
   PROP_ROTATION_Y,
   PROP_ROTATION_Z,
   PROP_SCALE_X,
-  PROP_SCALE_Y
+  PROP_SCALE_Y,
+  PROP_MVP,
+  PROP_PIVOT_X,
+  PROP_PIVOT_Y,
+  PROP_PIVOT_Z,
 };
 
 #define DEBUG_INIT \
@@ -79,7 +87,8 @@
 static gboolean gst_gl_transformation_set_caps (GstGLFilter * filter,
     GstCaps * incaps, GstCaps * outcaps);
 
-static void gst_gl_transformation_reset (GstGLFilter * filter);
+static void gst_gl_transformation_reset_gl (GstGLFilter * filter);
+static gboolean gst_gl_transformation_stop (GstBaseTransform * trans);
 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 *
@@ -124,14 +133,16 @@
   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)->init_fbo = gst_gl_transformation_init_shader;
+  GST_GL_FILTER_CLASS (klass)->display_reset_cb =
+      gst_gl_transformation_reset_gl;
   GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_transformation_set_caps;
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_transformation_filter_texture;
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_transformation_stop;
 
-  g_object_class_install_property (gobject_class, PROP_FOVY,
-      g_param_spec_float ("fovy", "Fovy", "Field of view angle in degrees",
+  g_object_class_install_property (gobject_class, PROP_FOV,
+      g_param_spec_float ("fov", "Fov", "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,
@@ -161,44 +172,75 @@
   /* 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.",
+          "Translates the video at the X-Axis, in universal [0-1] coordinate.",
           -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.",
+          "Translates the video at the Y-Axis, in universal [0-1] coordinate.",
           -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.",
+          "Translates the video at the Z-Axis, in universal [0-1] coordinate.",
           -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.",
+          "Scale multiplier 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.",
+          "Scale multiplier for the Y-Axis.",
           0.0, G_MAXFLOAT, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  /* Pivot */
+  g_object_class_install_property (gobject_class, PROP_PIVOT_X,
+      g_param_spec_float ("pivot-x", "X Pivot",
+          "Rotation pivot point X coordinate, where 0 is the center,"
+          " -1 the lef +1 the right boarder and <-1, >1 outside.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_PIVOT_Y,
+      g_param_spec_float ("pivot-y", "Y Pivot",
+          "Rotation pivot point X coordinate, where 0 is the center,"
+          " -1 the lef +1 the right boarder and <-1, >1 outside.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_PIVOT_Z,
+      g_param_spec_float ("pivot-z", "Z Pivot",
+          "Relevant for rotation in 3D space. You look into the negative Z axis direction",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* MVP */
+  g_object_class_install_property (gobject_class, PROP_MVP,
+      g_param_spec_boxed ("mvp-matrix",
+          "Modelview Projection Matrix",
+          "The final Graphene 4x4 Matrix for transformation",
+          GRAPHENE_TYPE_MATRIX, G_PARAM_READABLE | 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>");
+
+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2;
 }
 
 static void
 gst_gl_transformation_init (GstGLTransformation * filter)
 {
   filter->shader = NULL;
-  filter->fovy = 90;
-  filter->aspect = 0;
+  filter->fov = 90;
+  filter->aspect = 1.0;
   filter->znear = 0.1;
   filter->zfar = 100;
 
@@ -214,9 +256,17 @@
 gst_gl_transformation_build_mvp (GstGLTransformation * transformation)
 {
   graphene_point3d_t translation_vector =
-      GRAPHENE_POINT3D_INIT (transformation->xtranslation,
-      transformation->ytranslation,
-      transformation->ztranslation);
+      GRAPHENE_POINT3D_INIT (transformation->xtranslation * 2.0 *
+      transformation->aspect,
+      transformation->ytranslation * 2.0,
+      transformation->ztranslation * 2.0);
+
+  graphene_point3d_t pivot_vector =
+      GRAPHENE_POINT3D_INIT (-transformation->xpivot * transformation->aspect,
+      transformation->ypivot,
+      -transformation->zpivot);
+
+  graphene_point3d_t negative_pivot_vector;
 
   graphene_matrix_t model_matrix;
   graphene_matrix_t projection_matrix;
@@ -231,14 +281,26 @@
   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,
+  /* Translate into pivot origin */
+  graphene_matrix_init_translate (&model_matrix, &pivot_vector);
+
+  /* Scale */
+  graphene_matrix_scale (&model_matrix,
+      transformation->xscale, transformation->yscale, 1.0f);
+
+  /* Rotation */
+  graphene_matrix_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);
+
+  /* Translate back from pivot origin */
+  graphene_point3d_scale (&pivot_vector, -1.0, &negative_pivot_vector);
+  graphene_matrix_translate (&model_matrix, &negative_pivot_vector);
+
+  /* Translation */
   graphene_matrix_translate (&model_matrix, &translation_vector);
 
   if (transformation->ortho) {
@@ -247,7 +309,7 @@
         -1, 1, transformation->znear, transformation->zfar);
   } else {
     graphene_matrix_init_perspective (&projection_matrix,
-        transformation->fovy,
+        transformation->fov,
         transformation->aspect, transformation->znear, transformation->zfar);
   }
 
@@ -265,8 +327,8 @@
   GstGLTransformation *filter = GST_GL_TRANSFORMATION (object);
 
   switch (prop_id) {
-    case PROP_FOVY:
-      filter->fovy = g_value_get_float (value);
+    case PROP_FOV:
+      filter->fov = g_value_get_float (value);
       break;
     case PROP_ORTHO:
       filter->ortho = g_value_get_boolean (value);
@@ -295,6 +357,20 @@
     case PROP_SCALE_Y:
       filter->yscale = g_value_get_float (value);
       break;
+    case PROP_PIVOT_X:
+      filter->xpivot = g_value_get_float (value);
+      break;
+    case PROP_PIVOT_Y:
+      filter->ypivot = g_value_get_float (value);
+      break;
+    case PROP_PIVOT_Z:
+      filter->zpivot = g_value_get_float (value);
+      break;
+    case PROP_MVP:
+      if (g_value_get_boxed (value) != NULL)
+        filter->mvp_matrix = *((graphene_matrix_t *) g_value_get_boxed (value));
+      return;
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -309,8 +385,8 @@
   GstGLTransformation *filter = GST_GL_TRANSFORMATION (object);
 
   switch (prop_id) {
-    case PROP_FOVY:
-      g_value_set_float (value, filter->fovy);
+    case PROP_FOV:
+      g_value_set_float (value, filter->fov);
       break;
     case PROP_ORTHO:
       g_value_set_boolean (value, filter->ortho);
@@ -339,6 +415,18 @@
     case PROP_SCALE_Y:
       g_value_set_float (value, filter->yscale);
       break;
+    case PROP_PIVOT_X:
+      g_value_set_float (value, filter->xpivot);
+      break;
+    case PROP_PIVOT_Y:
+      g_value_set_float (value, filter->ypivot);
+      break;
+    case PROP_PIVOT_Z:
+      g_value_set_float (value, filter->zpivot);
+      break;
+    case PROP_MVP:
+      g_value_set_boxed (value, (gconstpointer) & filter->mvp_matrix);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -355,20 +443,53 @@
       (gdouble) GST_VIDEO_INFO_WIDTH (&filter->out_info) /
       (gdouble) GST_VIDEO_INFO_HEIGHT (&filter->out_info);
 
+  transformation->caps_change = TRUE;
+
   gst_gl_transformation_build_mvp (transformation);
 
   return TRUE;
 }
 
 static void
-gst_gl_transformation_reset (GstGLFilter * filter)
+gst_gl_transformation_reset_gl (GstGLFilter * filter)
 {
   GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+  const GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
+
+  if (transformation->vao) {
+    gl->DeleteVertexArrays (1, &transformation->vao);
+    transformation->vao = 0;
+  }
+
+  if (transformation->vertex_buffer) {
+    gl->DeleteBuffers (1, &transformation->vertex_buffer);
+    transformation->vertex_buffer = 0;
+  }
+
+  if (transformation->vbo_indices) {
+    gl->DeleteBuffers (1, &transformation->vbo_indices);
+    transformation->vbo_indices = 0;
+  }
+
+  if (transformation->shader) {
+    gst_object_unref (transformation->shader);
+    transformation->shader = NULL;
+  }
+}
+
+static gboolean
+gst_gl_transformation_stop (GstBaseTransform * trans)
+{
+  GstGLBaseFilter *basefilter = GST_GL_BASE_FILTER (trans);
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (trans);
 
   /* 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;
+  if (basefilter->context && transformation->shader) {
+    gst_gl_context_del_shader (basefilter->context, transformation->shader);
+    transformation->shader = NULL;
+  }
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
 }
 
 static gboolean
@@ -376,10 +497,15 @@
 {
   GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
 
-  if (gst_gl_context_get_gl_api (filter->context)) {
+  if (transformation->shader) {
+    gst_object_unref (transformation->shader);
+    transformation->shader = NULL;
+  }
+
+  if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (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 gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
+        cube_v_src, cube_f_src, &transformation->shader);
   }
   return TRUE;
 }
@@ -393,7 +519,7 @@
   transformation->in_tex = in_tex;
 
   /* blocking call, use a FBO */
-  gst_gl_context_use_fbo_v2 (filter->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_FILTER (filter)->context,
       GST_VIDEO_INFO_WIDTH (&filter->out_info),
       GST_VIDEO_INFO_HEIGHT (&filter->out_info),
       filter->fbo, filter->depthbuffer,
@@ -402,63 +528,80 @@
   return TRUE;
 }
 
+static const GLushort indices[] = { 0, 1, 2, 3, 0 };
+
+static void
+_upload_vertices (GstGLTransformation * transformation)
+{
+  const GstGLFuncs *gl =
+      GST_GL_BASE_FILTER (transformation)->context->gl_vtable;
+
+/* *INDENT-OFF* */
+  GLfloat vertices[] = {
+     -transformation->aspect,  1.0,  0.0, 1.0, 0.0, 1.0,
+      transformation->aspect,  1.0,  0.0, 1.0, 1.0, 1.0,
+      transformation->aspect, -1.0,  0.0, 1.0, 1.0, 0.0,
+     -transformation->aspect, -1.0,  0.0, 1.0, 0.0, 0.0
+  };
+  /* *INDENT-ON* */
+
+  gl->BindBuffer (GL_ARRAY_BUFFER, transformation->vertex_buffer);
+
+  gl->BufferData (GL_ARRAY_BUFFER, 4 * 6 * sizeof (GLfloat), vertices,
+      GL_STATIC_DRAW);
+}
+
+static void
+_bind_buffer (GstGLTransformation * transformation)
+{
+  const GstGLFuncs *gl =
+      GST_GL_BASE_FILTER (transformation)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, transformation->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, transformation->vertex_buffer);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (transformation->attr_position, 4, GL_FLOAT,
+      GL_FALSE, 6 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (transformation->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      6 * sizeof (GLfloat), (void *) (4 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (transformation->attr_position);
+  gl->EnableVertexAttribArray (transformation->attr_texture);
+}
+
+static void
+_unbind_buffer (GstGLTransformation * transformation)
+{
+  const GstGLFuncs *gl =
+      GST_GL_BASE_FILTER (transformation)->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (transformation->attr_position);
+  gl->DisableVertexAttribArray (transformation->attr_texture);
+}
+
 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 };
+  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
 
   GLfloat temp_matrix[16];
 
-  GLint attr_position_loc = 0;
-  GLint attr_texture_loc = 0;
-
-  gst_gl_context_clear_shader (filter->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
   gl->BindTexture (GL_TEXTURE_2D, 0);
 
-  gl->ClearColor (0.f, 0.f, 0.f, 0.f);
+  gl->ClearColor (0.f, 0.f, 0.f, 1.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);
@@ -467,10 +610,46 @@
   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);
+  if (!transformation->vertex_buffer) {
+    transformation->attr_position =
+        gst_gl_shader_get_attribute_location (transformation->shader,
+        "position");
 
-  gl->DisableVertexAttribArray (attr_position_loc);
-  gl->DisableVertexAttribArray (attr_texture_loc);
+    transformation->attr_texture =
+        gst_gl_shader_get_attribute_location (transformation->shader, "uv");
 
-  gst_gl_context_clear_shader (filter->context);
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &transformation->vao);
+      gl->BindVertexArray (transformation->vao);
+    }
+
+    gl->GenBuffers (1, &transformation->vertex_buffer);
+
+    gl->GenBuffers (1, &transformation->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, transformation->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+
+    transformation->caps_change = TRUE;
+  }
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (transformation->vao);
+
+  if (transformation->caps_change) {
+    _upload_vertices (transformation);
+    _bind_buffer (transformation);
+  } else if (!gl->GenVertexArrays) {
+    _bind_buffer (transformation);
+  }
+
+  gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, 0);
+
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (0);
+  else
+    _unbind_buffer (transformation);
+
+  gst_gl_context_clear_shader (GST_GL_BASE_FILTER (filter)->context);
+  transformation->caps_change = FALSE;
 }
diff --git a/ext/gl/gstgltransformation.h b/ext/gl/gstgltransformation.h
index 05145fb..6b9051a 100644
--- a/ext/gl/gstgltransformation.h
+++ b/ext/gl/gstgltransformation.h
@@ -22,7 +22,7 @@
 #define _GST_GL_TRANSFORMATION_H_
 
 #include <gst/gl/gstglfilter.h>
-#include <graphene-1.0/graphene.h>
+#include <graphene.h>
 
 G_BEGIN_DECLS
 
@@ -41,6 +41,11 @@
     GstGLFilter filter;
 
     GstGLShader *shader;
+    GLuint       vao;
+    GLuint       vbo_indices;
+    GLuint       vertex_buffer;
+    GLint        attr_position;
+    GLint        attr_texture;
 
     guint in_tex;
 
@@ -55,14 +60,20 @@
     gfloat ytranslation;
     gfloat ztranslation;
 
+    gfloat xpivot;
+    gfloat ypivot;
+    gfloat zpivot;
+
     /* perspective */
-    gfloat fovy;
+    gfloat fov;
     gfloat aspect;
     gfloat znear;
     gfloat zfar;
     gboolean ortho;
 
     graphene_matrix_t mvp_matrix;
+
+    gboolean caps_change;
 };
 
 struct _GstGLTransformationClass
diff --git a/ext/gl/gstgluploadelement.c b/ext/gl/gstgluploadelement.c
new file mode 100644
index 0000000..83ff24c
--- /dev/null
+++ b/ext/gl/gstgluploadelement.c
@@ -0,0 +1,248 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 <gst/gl/gl.h>
+#include "gstgluploadelement.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_element_debug);
+#define GST_CAT_DEFAULT gst_gl_upload_element_debug
+
+#define gst_gl_upload_element_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLUploadElement, gst_gl_upload_element,
+    GST_TYPE_GL_BASE_FILTER,
+    GST_DEBUG_CATEGORY_INIT (gst_gl_upload_element_debug, "gluploadelement", 0,
+        "glupload Element"););
+
+static gboolean gst_gl_upload_element_get_unit_size (GstBaseTransform * trans,
+    GstCaps * caps, gsize * size);
+static GstCaps *_gst_gl_upload_element_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter);
+static gboolean _gst_gl_upload_element_set_caps (GstBaseTransform * bt,
+    GstCaps * in_caps, GstCaps * out_caps);
+static gboolean gst_gl_upload_element_filter_meta (GstBaseTransform * trans,
+    GstQuery * query, GType api, const GstStructure * params);
+static gboolean _gst_gl_upload_element_propose_allocation (GstBaseTransform *
+    bt, GstQuery * decide_query, GstQuery * query);
+static gboolean _gst_gl_upload_element_decide_allocation (GstBaseTransform *
+    trans, GstQuery * query);
+static GstFlowReturn
+gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * buffer, GstBuffer ** outbuf);
+static GstFlowReturn gst_gl_upload_element_transform (GstBaseTransform * bt,
+    GstBuffer * buffer, GstBuffer * outbuf);
+static gboolean gst_gl_upload_element_stop (GstBaseTransform * bt);
+
+static GstStaticPadTemplate gst_gl_upload_element_src_pad_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw(ANY)"));
+
+static void
+gst_gl_upload_element_class_init (GstGLUploadElementClass * klass)
+{
+  GstBaseTransformClass *bt_class = GST_BASE_TRANSFORM_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstCaps *upload_caps;
+
+  bt_class->transform_caps = _gst_gl_upload_element_transform_caps;
+  bt_class->set_caps = _gst_gl_upload_element_set_caps;
+  bt_class->filter_meta = gst_gl_upload_element_filter_meta;
+  bt_class->propose_allocation = _gst_gl_upload_element_propose_allocation;
+  bt_class->decide_allocation = _gst_gl_upload_element_decide_allocation;
+  bt_class->get_unit_size = gst_gl_upload_element_get_unit_size;
+  bt_class->prepare_output_buffer = gst_gl_upload_element_prepare_output_buffer;
+  bt_class->transform = gst_gl_upload_element_transform;
+  bt_class->stop = gst_gl_upload_element_stop;
+
+  bt_class->passthrough_on_same_caps = TRUE;
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_gl_upload_element_src_pad_template));
+
+  upload_caps = gst_gl_upload_get_input_template_caps ();
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, upload_caps));
+  gst_caps_unref (upload_caps);
+
+  gst_element_class_set_metadata (element_class,
+      "OpenGL uploader", "Filter/Video",
+      "Uploads data into OpenGL", "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_upload_element_init (GstGLUploadElement * upload)
+{
+  gst_base_transform_set_prefer_passthrough (GST_BASE_TRANSFORM (upload), TRUE);
+}
+
+static gboolean
+gst_gl_upload_element_stop (GstBaseTransform * bt)
+{
+  GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt);
+
+  if (upload->upload) {
+    gst_object_unref (upload->upload);
+    upload->upload = NULL;
+  }
+
+  gst_caps_replace (&upload->in_caps, NULL);
+  gst_caps_replace (&upload->out_caps, NULL);
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (bt);
+}
+
+static gboolean
+gst_gl_upload_element_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
+    gsize * size)
+{
+  gboolean ret = FALSE;
+  GstVideoInfo info;
+
+  ret = gst_video_info_from_caps (&info, caps);
+  if (ret)
+    *size = GST_VIDEO_INFO_SIZE (&info);
+
+  return TRUE;
+}
+
+static GstCaps *
+_gst_gl_upload_element_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  GstGLContext *context = GST_GL_BASE_FILTER (bt)->context;
+
+  return gst_gl_upload_transform_caps (context, direction, caps, filter);
+}
+
+static gboolean
+gst_gl_upload_element_filter_meta (GstBaseTransform * trans, GstQuery * query,
+    GType api, const GstStructure * params)
+{
+  /* propose all metadata upstream */
+  return TRUE;
+}
+
+static gboolean
+_gst_gl_upload_element_propose_allocation (GstBaseTransform * bt,
+    GstQuery * decide_query, GstQuery * query)
+{
+  GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt);
+  gboolean ret;
+
+  if (!upload->upload)
+    return FALSE;
+
+  ret = GST_BASE_TRANSFORM_CLASS (parent_class)->propose_allocation (bt,
+      decide_query, query);
+  gst_gl_upload_propose_allocation (upload->upload, decide_query, query);
+
+  return ret;
+}
+
+static gboolean
+_gst_gl_upload_element_decide_allocation (GstBaseTransform * trans,
+    GstQuery * query)
+{
+  GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (trans);
+  GstGLContext *context;
+  gboolean ret;
+
+  ret =
+      GST_BASE_TRANSFORM_CLASS
+      (gst_gl_upload_element_parent_class)->decide_allocation (trans, query);
+  if (!ret)
+    return FALSE;
+
+  context = GST_GL_BASE_FILTER (trans)->context;
+
+  if (!upload->upload)
+    upload->upload = gst_gl_upload_new (context);
+
+  return gst_gl_upload_set_caps (upload->upload, upload->in_caps,
+      upload->out_caps);
+}
+
+static gboolean
+_gst_gl_upload_element_set_caps (GstBaseTransform * bt, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt);
+
+  gst_caps_replace (&upload->in_caps, in_caps);
+  gst_caps_replace (&upload->out_caps, out_caps);
+
+  if (upload->upload)
+    return gst_gl_upload_set_caps (upload->upload, in_caps, out_caps);
+
+  return TRUE;
+}
+
+GstFlowReturn
+gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt,
+    GstBuffer * buffer, GstBuffer ** outbuf)
+{
+  GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt);
+  GstGLUploadReturn ret;
+  GstBaseTransformClass *bclass;
+
+  bclass = GST_BASE_TRANSFORM_GET_CLASS (bt);
+
+  if (gst_base_transform_is_passthrough (bt)) {
+    *outbuf = buffer;
+    return GST_FLOW_OK;
+  }
+
+  if (!upload->upload)
+    return GST_FLOW_NOT_NEGOTIATED;
+
+  ret = gst_gl_upload_perform_with_buffer (upload->upload, buffer, outbuf);
+  /* FIXME Having to release after perform is an aberation */
+  gst_gl_upload_release_buffer (upload->upload);
+
+  if (ret != GST_GL_UPLOAD_DONE || *outbuf == NULL) {
+    GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND, ("%s",
+            "Failed to upload buffer"), (NULL));
+    if (*outbuf)
+      gst_buffer_unref (*outbuf);
+    return GST_FLOW_ERROR;
+  }
+
+  /* basetransform doesn't unref if they're the same */
+  if (buffer == *outbuf)
+    gst_buffer_unref (*outbuf);
+  else
+    bclass->copy_metadata (bt, buffer, *outbuf);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_gl_upload_element_transform (GstBaseTransform * bt, GstBuffer * buffer,
+    GstBuffer * outbuf)
+{
+  return GST_FLOW_OK;
+}
diff --git a/ext/gl/gstgluploadelement.h b/ext/gl/gstgluploadelement.h
new file mode 100644
index 0000000..615773c
--- /dev/null
+++ b/ext/gl/gstgluploadelement.h
@@ -0,0 +1,69 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_ELEMENT_H__
+#define __GST_GL_UPLOAD_ELEMENT_H__
+
+#include <gst/video/video.h>
+
+#include <gst/gl/gstgl_fwd.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_upload_element_get_type (void);
+#define GST_TYPE_GL_UPLOAD_ELEMENT (gst_gl_upload_element_get_type())
+#define GST_GL_UPLOAD_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD_ELEMENT,GstGLUploadElement))
+#define GST_GL_UPLOAD_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_UPLOAD_ELEMENT,GstGLUploadElementClass))
+#define GST_IS_GL_UPLOAD_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_UPLOAD_ELEMENT))
+#define GST_IS_GL_UPLOAD_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_UPLOAD_ELEMENT))
+#define GST_GL_UPLOAD_ELEMENT_CAST(obj) ((GstGLUploadElement*)(obj))
+
+typedef struct _GstGLUploadElement GstGLUploadElement;
+typedef struct _GstGLUploadElementClass GstGLUploadElementClass;
+typedef struct _GstGLUploadElementPrivate GstGLUploadElementPrivate;
+
+/**
+ * GstGLUploadElement
+ *
+ * Opaque #GstGLUploadElement object
+ */
+struct _GstGLUploadElement
+{
+  /* <private> */
+  GstGLBaseFilter     parent;
+
+  GstGLUpload *upload;
+  GstCaps *in_caps;
+  GstCaps *out_caps;
+};
+
+/**
+ * GstGLUploadElementClass:
+ *
+ * The #GstGLUploadElementClass struct only contains private data
+ */
+struct _GstGLUploadElementClass
+{
+  GstGLBaseFilterClass object_class;
+};
+
+G_END_DECLS
+
+#endif /* __GST_GL_UPLOAD_ELEMENT_H__ */
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index 22e9b7f..d17a744 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -21,17 +21,21 @@
 /**
  * SECTION:element-glvideomixer
  *
- * glmixer sub element. N gl sink pads to 1 source pad.
- * N + 1 OpenGL contexts shared together.
- * N <= 6 because the rendering is more a like a cube than a video_mixer
- * Each opengl input stream is rendered on a cube face
+ * Composites a number of streams into a single output scene using OpenGL in
+ * a similar fashion to compositor and videomixer. See the compositor plugin
+ * for documentation about the #GstGLVideoMixerPad properties.
  *
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch-0.10 videotestsrc ! "video/x-raw-yuv, format=(fourcc)YUY2" ! glupload ! queue ! glvideomixer name=m ! glimagesink videotestsrc pattern=12 ! "video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)5/1, width=100, height=200" ! glupload ! queue ! m. videotestsrc ! "video/x-raw-rgb, framerate=(fraction)15/1, width=1500, height=1500" ! glupload ! gleffects effect=3 ! queue ! m. videotestsrc ! glupload ! gleffects effect=2 ! queue ! m.  videotestsrc ! glupload ! glfiltercube ! queue ! m. videotestsrc ! glupload ! gleffects effect=6 ! queue ! m.
+ * gst-launch-1.0  glvideomixer name=m ! glimagesink \
+ *     videotestsrc ! video/x-raw, format=YUY2 ! m. \
+ *     videotestsrc pattern=12 ! video/x-raw, format=I420, framerate=5/1, width=100, height=200 ! queue ! m. \
+ *     videotestsrc ! video/x-raw, format=RGB, framerate=15/1, width=1500, height=1500 ! gleffects effect=3 ! queue ! m. \
+ *     videotestsrc ! gleffects effect=2 ! queue ! m.  \
+ *     videotestsrc ! glfiltercube ! queue ! m. \
+ *     videotestsrc ! gleffects effect=6 ! queue ! m.
  * ]|
- * FBO (Frame Buffer Object) is required.
  * </refsect2>
  */
 
@@ -40,13 +44,381 @@
 #endif
 
 #include "gstglvideomixer.h"
+#include "gstglmixerbin.h"
 
 #define GST_CAT_DEFAULT gst_gl_video_mixer_debug
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
 
+#define GST_GL_TYPE_VIDEO_MIXER_BACKGROUND (gst_gl_video_mixer_background_get_type())
+static GType
+gst_gl_video_mixer_background_get_type (void)
+{
+  static GType mixer_background_type = 0;
+
+  static const GEnumValue mixer_background[] = {
+    {GST_GL_VIDEO_MIXER_BACKGROUND_CHECKER, "Checker pattern", "checker"},
+    {GST_GL_VIDEO_MIXER_BACKGROUND_BLACK, "Black", "black"},
+    {GST_GL_VIDEO_MIXER_BACKGROUND_WHITE, "White", "white"},
+    {GST_GL_VIDEO_MIXER_BACKGROUND_TRANSPARENT,
+        "Transparent Background to enable further compositing", "transparent"},
+    {0, NULL, NULL},
+  };
+
+  if (!mixer_background_type) {
+    mixer_background_type =
+        g_enum_register_static ("GstGLVideoMixerBackground", mixer_background);
+  }
+  return mixer_background_type;
+}
+
+typedef struct _GstGLMixerControlBindingProxy GstGLMixerControlBindingProxy;
+typedef struct _GstGLMixerControlBindingProxyClass
+    GstGLMixerControlBindingProxyClass;
+
+struct _GstGLMixerControlBindingProxy
+{
+  GstControlBinding parent;
+
+  GstObject *ref_object;
+  const gchar *property_name;
+};
+
+struct _GstGLMixerControlBindingProxyClass
+{
+  GstControlBindingClass parent_class;
+};
+
+GType gst_gl_mixer_control_binding_proxy_get_type (void);
+#define GST_TYPE_GL_MIXER_CONTROL_BINDING \
+  (gst_gl_mixer_control_binding_proxy_get_type())
+
+G_DEFINE_TYPE (GstGLMixerControlBindingProxy,
+    gst_gl_mixer_control_binding_proxy, GST_TYPE_CONTROL_BINDING);
+
+static void
+gst_gl_mixer_control_binding_proxy_init (GstGLMixerControlBindingProxy * self)
+{
+}
+
+static gboolean
+gst_gl_mixer_control_binding_proxy_sync_values (GstControlBinding * binding,
+    GstObject * object, GstClockTime timestamp, GstClockTime last_sync)
+{
+  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
+      binding;
+  GstControlBinding *ref_binding;
+  gboolean ret = TRUE;
+
+  ref_binding = gst_object_get_control_binding (self->ref_object,
+      self->property_name);
+
+  if (ref_binding) {
+    ret = gst_control_binding_sync_values (ref_binding, self->ref_object,
+        timestamp, last_sync);
+    gst_object_unref (ref_binding);
+  }
+
+  return ret;
+}
+
+static GValue *
+gst_gl_mixer_control_binding_proxy_get_value (GstControlBinding * binding,
+    GstClockTime timestamp)
+{
+  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
+      binding;
+  GstControlBinding *ref_binding;
+  GValue *ret = NULL;
+
+  ref_binding = gst_object_get_control_binding (self->ref_object,
+      self->property_name);
+
+  if (ref_binding) {
+    ret = gst_control_binding_get_value (ref_binding, timestamp);
+    gst_object_unref (ref_binding);
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_gl_mixer_control_binding_proxy_get_value_array (GstControlBinding * binding,
+    GstClockTime timestamp, GstClockTime interval, guint n_values,
+    gpointer values)
+{
+  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
+      binding;
+  GstControlBinding *ref_binding;
+  gboolean ret = FALSE;
+
+  ref_binding = gst_object_get_control_binding (self->ref_object,
+      self->property_name);
+
+  if (ref_binding) {
+    ret = gst_control_binding_get_value_array (ref_binding, timestamp,
+        interval, n_values, values);
+    gst_object_unref (ref_binding);
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_gl_mixer_control_binding_proxy_get_g_value_array (GstControlBinding *
+    binding, GstClockTime timestamp, GstClockTime interval, guint n_values,
+    GValue * values)
+{
+  GstGLMixerControlBindingProxy *self = (GstGLMixerControlBindingProxy *)
+      binding;
+  GstControlBinding *ref_binding;
+  gboolean ret = FALSE;
+
+  ref_binding = gst_object_get_control_binding (self->ref_object,
+      self->property_name);
+
+  if (ref_binding) {
+    ret = gst_control_binding_get_g_value_array (ref_binding, timestamp,
+        interval, n_values, values);
+    gst_object_unref (ref_binding);
+  }
+
+  return ret;
+}
+
+
+static void
+    gst_gl_mixer_control_binding_proxy_class_init
+    (GstGLMixerControlBindingProxyClass * klass)
+{
+  GstControlBindingClass *cb_class = GST_CONTROL_BINDING_CLASS (klass);
+
+  cb_class->sync_values = gst_gl_mixer_control_binding_proxy_sync_values;
+  cb_class->get_value = gst_gl_mixer_control_binding_proxy_get_value;
+  cb_class->get_value_array =
+      gst_gl_mixer_control_binding_proxy_get_value_array;
+  cb_class->get_g_value_array =
+      gst_gl_mixer_control_binding_proxy_get_g_value_array;
+}
+
+static GstControlBinding *
+gst_gl_mixer_control_binding_proxy_new (GstObject * object,
+    const gchar * property_name, GstObject * ref_object,
+    const gchar * ref_property_name)
+{
+  GstGLMixerControlBindingProxy *self =
+      g_object_new (GST_TYPE_GL_MIXER_CONTROL_BINDING, "object", object,
+      "name", property_name, NULL);
+
+  self->ref_object = ref_object;
+  self->property_name = ref_property_name;
+
+  return (GstControlBinding *) self;
+}
+
+
+#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
+#define DEFAULT_PAD_ZORDER 0
+
+enum
+{
+  PROP_INPUT_0,
+  PROP_INPUT_XPOS,
+  PROP_INPUT_YPOS,
+  PROP_INPUT_WIDTH,
+  PROP_INPUT_HEIGHT,
+  PROP_INPUT_ALPHA,
+  PROP_INPUT_ZORDER,
+};
+
+static void gst_gl_video_mixer_input_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+static void gst_gl_video_mixer_input_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+
+typedef struct _GstGLVideoMixerInput GstGLVideoMixerInput;
+typedef GstGhostPadClass GstGLVideoMixerInputClass;
+
+struct _GstGLVideoMixerInput
+{
+  GstGhostPad parent;
+
+  GstSegment segment;
+
+  GstPad *mixer_pad;
+};
+
+GType gst_gl_video_mixer_input_get_type (void);
+G_DEFINE_TYPE (GstGLVideoMixerInput, gst_gl_video_mixer_input,
+    GST_TYPE_GHOST_PAD);
+
+static void
+gst_gl_video_mixer_input_init (GstGLVideoMixerInput * self)
+{
+}
+
+static void
+gst_gl_video_mixer_input_class_init (GstGLVideoMixerInputClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->set_property = gst_gl_video_mixer_input_set_property;
+  gobject_class->get_property = gst_gl_video_mixer_input_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_INPUT_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_object_class_install_property (gobject_class, PROP_INPUT_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_INPUT_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_INPUT_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_INPUT_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_INPUT_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_input_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLVideoMixerInput *self = (GstGLVideoMixerInput *) object;
+
+  if (self->mixer_pad)
+    g_object_get_property (G_OBJECT (self->mixer_pad), pspec->name, value);
+}
+
+static void
+gst_gl_video_mixer_input_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLVideoMixerInput *self = (GstGLVideoMixerInput *) object;
+
+  if (self->mixer_pad)
+    g_object_set_property (G_OBJECT (self->mixer_pad), pspec->name, value);
+}
+
+static GstGhostPad *
+_create_video_mixer_input (GstGLMixerBin * self, GstPad * mixer_pad)
+{
+  GstGLVideoMixerInput *input =
+      g_object_new (gst_gl_video_mixer_input_get_type (), "name",
+      GST_OBJECT_NAME (mixer_pad), "direction", GST_PAD_DIRECTION (mixer_pad),
+      NULL);
+  GstControlBinding *cb;
+
+  if (!gst_ghost_pad_construct (GST_GHOST_PAD (input))) {
+    gst_object_unref (input);
+    return NULL;
+  }
+#define ADD_PROXY_CONTROL_BINDING(prop)                                \
+  cb = gst_gl_mixer_control_binding_proxy_new (GST_OBJECT (mixer_pad), \
+      G_STRINGIFY (prop), GST_OBJECT (input), G_STRINGIFY (prop));     \
+  gst_object_add_control_binding (GST_OBJECT (mixer_pad), cb)
+
+  ADD_PROXY_CONTROL_BINDING (zorder);
+  ADD_PROXY_CONTROL_BINDING (xpos);
+  ADD_PROXY_CONTROL_BINDING (ypos);
+  ADD_PROXY_CONTROL_BINDING (width);
+  ADD_PROXY_CONTROL_BINDING (height);
+  ADD_PROXY_CONTROL_BINDING (alpha);
+
+#undef ADD_PROXY_CONTROL_BINDING
+
+  input->mixer_pad = mixer_pad;
+
+  return GST_GHOST_PAD (input);
+}
+
+enum
+{
+  PROP_BIN_0,
+  PROP_BIN_BACKGROUND,
+};
+#define DEFAULT_BACKGROUND GST_GL_VIDEO_MIXER_BACKGROUND_CHECKER
+
+static void gst_gl_video_mixer_bin_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+static void gst_gl_video_mixer_bin_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+
+typedef GstGLMixerBin GstGLVideoMixerBin;
+typedef GstGLMixerBinClass GstGLVideoMixerBinClass;
+
+G_DEFINE_TYPE (GstGLVideoMixerBin, gst_gl_video_mixer_bin,
+    GST_TYPE_GL_MIXER_BIN);
+
+static void
+gst_gl_video_mixer_bin_init (GstGLVideoMixerBin * self)
+{
+  GstGLMixerBin *mix_bin = GST_GL_MIXER_BIN (self);
+
+  gst_gl_mixer_bin_finish_init_with_element (mix_bin,
+      g_object_new (GST_TYPE_GL_VIDEO_MIXER, NULL));
+}
+
+static void
+gst_gl_video_mixer_bin_class_init (GstGLVideoMixerBinClass * klass)
+{
+  GstGLMixerBinClass *mixer_class = GST_GL_MIXER_BIN_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  mixer_class->create_input_pad = _create_video_mixer_input;
+
+  gobject_class->set_property = gst_gl_video_mixer_bin_set_property;
+  gobject_class->get_property = gst_gl_video_mixer_bin_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_BIN_BACKGROUND,
+      g_param_spec_enum ("background", "Background", "Background type",
+          GST_GL_TYPE_VIDEO_MIXER_BACKGROUND,
+          DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_set_metadata (element_class, "OpenGL video_mixer bin",
+      "Bin/Filter/Effect/Video/Compositor", "OpenGL video_mixer bin",
+      "Matthew Waters <matthew@centricular.com>");
+}
+
+static void
+gst_gl_video_mixer_bin_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (object);
+
+  if (self->mixer)
+    g_object_get_property (G_OBJECT (self->mixer), pspec->name, value);
+}
+
+static void
+gst_gl_video_mixer_bin_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLMixerBin *self = GST_GL_MIXER_BIN (object);
+
+  if (self->mixer)
+    g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+}
+
 enum
 {
   PROP_0,
+  PROP_BACKGROUND,
 };
 
 #define DEBUG_INIT \
@@ -60,7 +432,7 @@
 static void gst_gl_video_mixer_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static gboolean _update_info (GstVideoAggregator * vagg, GstVideoInfo * info);
+static GstCaps *_update_caps (GstVideoAggregator * vagg, GstCaps * caps);
 static void gst_gl_video_mixer_reset (GstGLMixer * mixer);
 static gboolean gst_gl_video_mixer_init_shader (GstGLMixer * mixer,
     GstCaps * outcaps);
@@ -69,6 +441,7 @@
     GPtrArray * in_frames, guint out_tex);
 static void gst_gl_video_mixer_callback (gpointer stuff);
 
+/* *INDENT-OFF* */
 /* vertex source */
 static const gchar *video_mixer_v_src =
     "attribute vec4 a_position;                                   \n"
@@ -93,6 +466,38 @@
     "  gl_FragColor = vec4(rgba.rgb, rgba.a * alpha);\n"
     "}                                                   \n";
 
+/* checker vertex source */
+static const gchar *checker_v_src =
+    "attribute vec4 a_position;\n"
+    "void main()\n"
+    "{\n"
+    "   gl_Position = a_position;\n"
+    "}\n";
+
+/* checker fragment source */
+static const gchar *checker_f_src =
+    "#ifdef GL_ES\n"
+    "precision mediump float;\n"
+    "#endif\n"
+    "const float blocksize = 8.0;\n"
+    "void main ()\n"
+    "{\n"
+    "  vec4 high = vec4(0.667, 0.667, 0.667, 1.0);\n"
+    "  vec4 low = vec4(0.333, 0.333, 0.333, 1.0);\n"
+    "  if (mod(gl_FragCoord.x, blocksize * 2.0) >= blocksize) {\n"
+    "    if (mod(gl_FragCoord.y, blocksize * 2.0) >= blocksize)\n"
+    "      gl_FragColor = low;\n"
+    "    else\n"
+    "      gl_FragColor = high;\n"
+    "  } else {\n"
+    "    if (mod(gl_FragCoord.y, blocksize * 2.0) < blocksize)\n"
+    "      gl_FragColor = low;\n"
+    "    else\n"
+    "      gl_FragColor = high;\n"
+    "  }\n"
+    "}\n";
+/* *INDENT-ON* */
+
 #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))
@@ -121,6 +526,9 @@
   gint xpos, ypos;
   gint width, height;
   gdouble alpha;
+
+  gboolean geometry_change;
+  GLuint vertex_buffer;
 };
 
 struct _GstGLVideoMixerPadClass
@@ -137,11 +545,6 @@
 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,
@@ -226,15 +629,19 @@
   switch (prop_id) {
     case PROP_PAD_XPOS:
       pad->xpos = g_value_get_int (value);
+      pad->geometry_change = TRUE;
       break;
     case PROP_PAD_YPOS:
       pad->ypos = g_value_get_int (value);
+      pad->geometry_change = TRUE;
       break;
     case PROP_PAD_WIDTH:
       pad->width = g_value_get_int (value);
+      pad->geometry_change = TRUE;
       break;
     case PROP_PAD_HEIGHT:
       pad->height = g_value_get_int (value);
+      pad->geometry_change = TRUE;
       break;
     case PROP_PAD_ALPHA:
       pad->alpha = g_value_get_double (value);
@@ -263,21 +670,30 @@
 
   gst_element_class_set_metadata (element_class, "OpenGL video_mixer",
       "Filter/Effect/Video/Compositor", "OpenGL video_mixer",
-      "Julien Isorce <julien.isorce@gmail.com>");
+      "Matthew Waters <matthew@centricular.com>");
+
+  g_object_class_install_property (gobject_class, PROP_BACKGROUND,
+      g_param_spec_enum ("background", "Background", "Background type",
+          GST_GL_TYPE_VIDEO_MIXER_BACKGROUND,
+          DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   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;
 
-  vagg_class->update_info = _update_info;
+  vagg_class->update_caps = _update_caps;
 
   agg_class->sinkpads_type = GST_TYPE_GL_VIDEO_MIXER_PAD;
+
+  GST_GL_BASE_MIXER_CLASS (klass)->supported_gl_api =
+      GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2;
 }
 
 static void
 gst_gl_video_mixer_init (GstGLVideoMixer * video_mixer)
 {
+  video_mixer->background = DEFAULT_BACKGROUND;
   video_mixer->shader = NULL;
   video_mixer->input_frames = NULL;
 }
@@ -286,7 +702,12 @@
 gst_gl_video_mixer_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
+  GstGLVideoMixer *mixer = GST_GL_VIDEO_MIXER (object);
+
   switch (prop_id) {
+    case PROP_BACKGROUND:
+      mixer->background = g_value_get_enum (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -297,19 +718,79 @@
 gst_gl_video_mixer_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
+  GstGLVideoMixer *mixer = GST_GL_VIDEO_MIXER (object);
+
   switch (prop_id) {
+    case PROP_BACKGROUND:
+      g_value_set_enum (value, mixer->background);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
 }
 
-static gboolean
-_update_info (GstVideoAggregator * vagg, GstVideoInfo * info)
+static void
+_mixer_pad_get_output_size (GstGLVideoMixer * mix,
+    GstGLVideoMixerPad * mix_pad, gint * width, gint * height)
 {
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
+  GstVideoAggregatorPad *vagg_pad = GST_VIDEO_AGGREGATOR_PAD (mix_pad);
+  gint pad_width, pad_height;
+  guint dar_n, dar_d;
+
+  /* FIXME: Anything better we can do here? */
+  if (!vagg_pad->info.finfo
+      || vagg_pad->info.finfo->format == GST_VIDEO_FORMAT_UNKNOWN) {
+    GST_DEBUG_OBJECT (mix_pad, "Have no caps yet");
+    *width = 0;
+    *height = 0;
+    return;
+  }
+
+  pad_width =
+      mix_pad->width <=
+      0 ? GST_VIDEO_INFO_WIDTH (&vagg_pad->info) : mix_pad->width;
+  pad_height =
+      mix_pad->height <=
+      0 ? GST_VIDEO_INFO_HEIGHT (&vagg_pad->info) : mix_pad->height;
+
+  gst_video_calculate_display_ratio (&dar_n, &dar_d, pad_width, pad_height,
+      GST_VIDEO_INFO_PAR_N (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_D (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_N (&vagg->info), GST_VIDEO_INFO_PAR_D (&vagg->info)
+      );
+  GST_LOG_OBJECT (mix_pad, "scaling %ux%u by %u/%u (%u/%u / %u/%u)", pad_width,
+      pad_height, dar_n, dar_d, GST_VIDEO_INFO_PAR_N (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_D (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_N (&vagg->info), GST_VIDEO_INFO_PAR_D (&vagg->info));
+
+  if (pad_height % dar_n == 0) {
+    pad_width = gst_util_uint64_scale_int (pad_height, dar_n, dar_d);
+  } else if (pad_width % dar_d == 0) {
+    pad_height = gst_util_uint64_scale_int (pad_width, dar_d, dar_n);
+  } else {
+    pad_width = gst_util_uint64_scale_int (pad_height, dar_n, dar_d);
+  }
+
+  if (width)
+    *width = pad_width;
+  if (height)
+    *height = pad_height;
+}
+
+static GstCaps *
+_update_caps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  GstGLVideoMixer *mix = GST_GL_VIDEO_MIXER (vagg);
   GList *l;
   gint best_width = -1, best_height = -1;
-  gboolean ret = FALSE;
+  GstVideoInfo info;
+  GstCaps *ret = NULL;
+  int i;
+
+  caps = gst_caps_make_writable (caps);
+  gst_video_info_from_caps (&info, caps);
 
   GST_OBJECT_LOCK (vagg);
   for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
@@ -318,15 +799,7 @@
     gint this_width, this_height;
     gint width, height;
 
-    if (mixer_pad->width > 0)
-      width = mixer_pad->width;
-    else
-      width = GST_VIDEO_INFO_WIDTH (&vaggpad->info);
-
-    if (mixer_pad->height > 0)
-      height = mixer_pad->height;
-    else
-      height = GST_VIDEO_INFO_HEIGHT (&vaggpad->info);
+    _mixer_pad_get_output_size (mix, mixer_pad, &width, &height);
 
     if (width == 0 || height == 0)
       continue;
@@ -341,25 +814,74 @@
   }
   GST_OBJECT_UNLOCK (vagg);
 
-  if (best_width > 0 && best_height > 0) {
-    info->width = best_width;
-    info->height = best_height;
-    ret = TRUE;
+  ret =
+      GST_VIDEO_AGGREGATOR_CLASS (gst_gl_video_mixer_parent_class)->update_caps
+      (vagg, caps);
+
+  for (i = 0; i < gst_caps_get_size (ret); i++) {
+    GstStructure *s = gst_caps_get_structure (ret, i);
+
+    gst_structure_set (s, "width", G_TYPE_INT, best_width, "height", G_TYPE_INT,
+        best_height, NULL);
   }
 
   return ret;
 }
 
+static gboolean
+_reset_pad_gl (GstAggregator * agg, GstAggregatorPad * aggpad, gpointer udata)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_MIXER (agg)->context->gl_vtable;
+  GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (aggpad);
+
+  if (pad->vertex_buffer) {
+    gl->DeleteBuffers (1, &pad->vertex_buffer);
+    pad->vertex_buffer = 0;
+  }
+
+  return FALSE;
+}
+
+static void
+_reset_gl (GstGLContext * context, GstGLVideoMixer * video_mixer)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_MIXER (video_mixer)->context->gl_vtable;
+
+  if (video_mixer->vao) {
+    gl->DeleteVertexArrays (1, &video_mixer->vao);
+    video_mixer->vao = 0;
+  }
+
+  if (video_mixer->vbo_indices) {
+    gl->DeleteBuffers (1, &video_mixer->vbo_indices);
+    video_mixer->vbo_indices = 0;
+  }
+
+  gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (video_mixer), _reset_pad_gl,
+      NULL);
+}
+
 static void
 gst_gl_video_mixer_reset (GstGLMixer * mixer)
 {
   GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (mixer);
+  GstGLContext *context = GST_GL_BASE_MIXER (mixer)->context;
 
   video_mixer->input_frames = NULL;
 
+  GST_DEBUG_OBJECT (mixer, "context:%p", context);
+
   if (video_mixer->shader)
-    gst_gl_context_del_shader (mixer->context, video_mixer->shader);
+    gst_gl_context_del_shader (context, video_mixer->shader);
   video_mixer->shader = NULL;
+
+  if (video_mixer->checker)
+    gst_gl_context_del_shader (context, video_mixer->checker);
+  video_mixer->checker = NULL;
+
+  if (GST_GL_BASE_MIXER (mixer)->context)
+    gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _reset_gl,
+        mixer);
 }
 
 static gboolean
@@ -368,10 +890,11 @@
   GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (mixer);
 
   if (video_mixer->shader)
-    gst_gl_context_del_shader (mixer->context, video_mixer->shader);
+    gst_gl_context_del_shader (GST_GL_BASE_MIXER (mixer)->context,
+        video_mixer->shader);
 
-  return gst_gl_context_gen_shader (mixer->context, video_mixer_v_src,
-      video_mixer_f_src, &video_mixer->shader);
+  return gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context,
+      video_mixer_v_src, video_mixer_f_src, &video_mixer->shader);
 }
 
 static gboolean
@@ -382,7 +905,7 @@
 
   video_mixer->input_frames = frames;
 
-  gst_gl_context_use_fbo_v2 (mix->context,
+  gst_gl_context_use_fbo_v2 (GST_GL_BASE_MIXER (mix)->context,
       GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR (mix)->info),
       GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR (mix)->info),
       mix->fbo, mix->depthbuffer,
@@ -391,37 +914,134 @@
   return TRUE;
 }
 
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+static void
+_init_vbo_indices (GstGLVideoMixer * mixer)
+{
+  const GstGLFuncs *gl = GST_GL_BASE_MIXER (mixer)->context->gl_vtable;
+
+  if (!mixer->vbo_indices) {
+    gl->GenBuffers (1, &mixer->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, mixer->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+  }
+}
+
+static gboolean
+_draw_checker_background (GstGLVideoMixer * video_mixer)
+{
+  GstGLMixer *mixer = GST_GL_MIXER (video_mixer);
+  const GstGLFuncs *gl = GST_GL_BASE_MIXER (mixer)->context->gl_vtable;
+  gint attr_position_loc = 0;
+
+  /* *INDENT-OFF* */
+  gfloat v_vertices[] = {
+    -1.0,-1.0,-1.0f,
+     1.0,-1.0,-1.0f,
+     1.0, 1.0,-1.0f,
+    -1.0, 1.0,-1.0f,
+  };
+  /* *INDENT-ON* */
+
+  if (!video_mixer->checker) {
+    if (!gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context,
+            checker_v_src, checker_f_src, &video_mixer->checker))
+      return FALSE;
+  }
+
+  gst_gl_shader_use (video_mixer->checker);
+  attr_position_loc =
+      gst_gl_shader_get_attribute_location (video_mixer->checker, "a_position");
+
+  _init_vbo_indices (video_mixer);
+
+  if (!video_mixer->checker_vbo) {
+    gl->GenBuffers (1, &video_mixer->checker_vbo);
+    gl->BindBuffer (GL_ARRAY_BUFFER, video_mixer->checker_vbo);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 3 * sizeof (GLfloat), v_vertices,
+        GL_STATIC_DRAW);
+  } else {
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, video_mixer->vbo_indices);
+    gl->BindBuffer (GL_ARRAY_BUFFER, video_mixer->checker_vbo);
+  }
+
+  gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
+      GL_FALSE, 3 * sizeof (GLfloat), (void *) 0);
+
+  gl->EnableVertexAttribArray (attr_position_loc);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
+
+  gl->DisableVertexAttribArray (attr_position_loc);
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  return TRUE;
+}
+
+static gboolean
+_draw_background (GstGLVideoMixer * video_mixer)
+{
+  GstGLMixer *mixer = GST_GL_MIXER (video_mixer);
+  const GstGLFuncs *gl = GST_GL_BASE_MIXER (mixer)->context->gl_vtable;
+
+  switch (video_mixer->background) {
+    case GST_GL_VIDEO_MIXER_BACKGROUND_BLACK:
+      gl->ClearColor (0.0, 0.0, 0.0, 1.0);
+      gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+      break;
+    case GST_GL_VIDEO_MIXER_BACKGROUND_WHITE:
+      gl->ClearColor (1.0, 1.0, 1.0, 1.0);
+      gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+      break;
+    case GST_GL_VIDEO_MIXER_BACKGROUND_TRANSPARENT:
+      gl->ClearColor (0.0, 0.0, 0.0, 0.0);
+      gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+      break;
+    case GST_GL_VIDEO_MIXER_BACKGROUND_CHECKER:
+      return _draw_checker_background (video_mixer);
+      break;
+    default:
+      break;
+  }
+
+  return TRUE;
+}
+
 /* opengl scene, params: input texture (not the output mixer->texture) */
 static void
 gst_gl_video_mixer_callback (gpointer stuff)
 {
   GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (stuff);
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (stuff);
   GstGLMixer *mixer = GST_GL_MIXER (video_mixer);
-  GstGLFuncs *gl = mixer->context->gl_vtable;
+  GstGLFuncs *gl = GST_GL_BASE_MIXER (mixer)->context->gl_vtable;
 
   GLint attr_position_loc = 0;
   GLint attr_texture_loc = 0;
   guint out_width, out_height;
 
-  const GLushort indices[] = {
-    0, 1, 2,
-    0, 2, 3
-  };
-
   guint count = 0;
 
-  out_width = GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR (stuff)->info);
-  out_height = GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR (stuff)->info);
+  out_width = GST_VIDEO_INFO_WIDTH (&vagg->info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&vagg->info);
 
-  gst_gl_context_clear_shader (mixer->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_MIXER (mixer)->context);
   gl->BindTexture (GL_TEXTURE_2D, 0);
-  gl->Disable (GL_TEXTURE_2D);
 
   gl->Disable (GL_DEPTH_TEST);
   gl->Disable (GL_CULL_FACE);
 
-  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+  if (gl->GenVertexArrays) {
+    if (!video_mixer->vao)
+      gl->GenVertexArrays (1, &video_mixer->vao);
+    gl->BindVertexArray (video_mixer->vao);
+  }
+
+  if (!_draw_background (video_mixer))
+    return;
 
   gst_gl_shader_use (video_mixer->shader);
 
@@ -435,19 +1055,18 @@
   while (count < video_mixer->input_frames->len) {
     GstGLMixerFrameData *frame;
     GstGLVideoMixerPad *pad;
+    GstVideoInfo *v_info;
+    guint in_tex;
+    guint in_width, in_height;
+
     /* *INDENT-OFF* */
     gfloat v_vertices[] = {
-      /* front face */
       -1.0,-1.0,-1.0f, 0.0f, 0.0f,
        1.0,-1.0,-1.0f, 1.0f, 0.0f,
        1.0, 1.0,-1.0f, 1.0f, 1.0f,
       -1.0, 1.0,-1.0f, 0.0f, 1.0f,
     };
     /* *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);
     if (!frame) {
@@ -456,8 +1075,9 @@
       continue;
     }
     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);
+    v_info = &GST_VIDEO_AGGREGATOR_PAD (pad)->info;
+    in_width = GST_VIDEO_INFO_WIDTH (v_info);
+    in_height = GST_VIDEO_INFO_HEIGHT (v_info);
 
     if (!frame->texture || in_width <= 0 || in_height <= 0
         || pad->alpha == 0.0f) {
@@ -468,34 +1088,45 @@
     }
 
     in_tex = frame->texture;
-    pad_width = pad->width <= 0 ? in_width : pad->width;
-    pad_height = pad->height <= 0 ? in_height : pad->height;
 
-    w = ((gfloat) pad_width / (gfloat) out_width);
-    h = ((gfloat) pad_height / (gfloat) out_height);
+    _init_vbo_indices (video_mixer);
 
-    /* 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);
+    if (pad->geometry_change || !pad->vertex_buffer) {
+      gint pad_width, pad_height;
+      gfloat w, h;
 
-    gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
-        GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[0]);
+      _mixer_pad_get_output_size (video_mixer, pad, &pad_width, &pad_height);
 
-    gl->VertexAttribPointer (attr_texture_loc, 2, GL_FLOAT,
-        GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[3]);
+      w = ((gfloat) pad_width / (gfloat) out_width);
+      h = ((gfloat) pad_height / (gfloat) out_height);
 
-    gl->EnableVertexAttribArray (attr_position_loc);
-    gl->EnableVertexAttribArray (attr_texture_loc);
+      /* 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);
+
+      if (!pad->vertex_buffer)
+        gl->GenBuffers (1, &pad->vertex_buffer);
+
+      gl->BindBuffer (GL_ARRAY_BUFFER, pad->vertex_buffer);
+
+      gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), v_vertices,
+          GL_STATIC_DRAW);
+
+      pad->geometry_change = FALSE;
+    } else {
+      gl->BindBuffer (GL_ARRAY_BUFFER, pad->vertex_buffer);
+    }
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, video_mixer->vbo_indices);
 
     gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     gl->BlendEquation (GL_FUNC_ADD);
@@ -505,7 +1136,16 @@
     gst_gl_shader_set_uniform_1i (video_mixer->shader, "texture", 0);
     gst_gl_shader_set_uniform_1f (video_mixer->shader, "alpha", pad->alpha);
 
-    gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
+    gl->EnableVertexAttribArray (attr_position_loc);
+    gl->EnableVertexAttribArray (attr_texture_loc);
+
+    gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
+        GL_FALSE, 5 * sizeof (GLfloat), (void *) 0);
+
+    gl->VertexAttribPointer (attr_texture_loc, 2, GL_FLOAT,
+        GL_FALSE, 5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+    gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
 
     ++count;
   }
@@ -513,9 +1153,14 @@
   gl->DisableVertexAttribArray (attr_position_loc);
   gl->DisableVertexAttribArray (attr_texture_loc);
 
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (0);
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
   gl->BindTexture (GL_TEXTURE_2D, 0);
 
   gl->Disable (GL_BLEND);
 
-  gst_gl_context_clear_shader (mixer->context);
+  gst_gl_context_clear_shader (GST_GL_BASE_MIXER (mixer)->context);
 }
diff --git a/ext/gl/gstglvideomixer.h b/ext/gl/gstglvideomixer.h
index ae2f367..0d0252b 100644
--- a/ext/gl/gstglvideomixer.h
+++ b/ext/gl/gstglvideomixer.h
@@ -22,7 +22,6 @@
 #define _GST_GL_VIDEO_MIXER_H_
 
 #include "gstglmixer.h"
-#include "gstglmixerpad.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +35,37 @@
 typedef struct _GstGLVideoMixer GstGLVideoMixer;
 typedef struct _GstGLVideoMixerClass GstGLVideoMixerClass;
 
+/**
+ * GstGLVideoMixerBackground:
+ * @GST_GL_VIDEO_MIXER_BACKGROUND_CHECKER: checker pattern background
+ * @GST_GL_VIDEO_MIXER_BACKGROUND_BLACK: solid color black background
+ * @GST_GL_VIDEO_MIXER_BACKGROUND_WHITE: solid color white background
+ * @GST_GL_VIDEO_MIXER_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
+{
+  GST_GL_VIDEO_MIXER_BACKGROUND_CHECKER,
+  GST_GL_VIDEO_MIXER_BACKGROUND_BLACK,
+  GST_GL_VIDEO_MIXER_BACKGROUND_WHITE,
+  GST_GL_VIDEO_MIXER_BACKGROUND_TRANSPARENT,
+}
+GstGLVideoMixerBackground;
+
 struct _GstGLVideoMixer
 {
     GstGLMixer mixer;
 
+    GstGLVideoMixerBackground background;
+
     GstGLShader *shader;
+    GstGLShader *checker;
     GPtrArray *input_frames;
+
+    GLuint vao;
+    GLuint vbo_indices;
+    GLuint checker_vbo;
 };
 
 struct _GstGLVideoMixerClass
@@ -50,6 +74,7 @@
 };
 
 GType gst_gl_video_mixer_get_type (void);
+GType gst_gl_video_mixer_bin_get_type (void);
 
 G_END_DECLS
 
diff --git a/ext/gl/gstglviewconvert.c b/ext/gl/gstglviewconvert.c
new file mode 100644
index 0000000..5a3c9fe
--- /dev/null
+++ b/ext/gl/gstglviewconvert.c
@@ -0,0 +1,354 @@
+/*
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@mail.com>
+ * Copyright (C) 2014 Jan Schmidt <jan@centricular.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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-glviewconvert
+ *
+ * Convert stereoscopic video between different representations using fragment shaders.
+ *
+ * The element can use either property settings or caps negotiation to choose the
+ * input and output formats to process.
+ *
+ * <refsect2>
+ * <title>Examples</title>
+ * |[
+ * gst-launch-1.0 videotestsrc ! glviewconvert ! glimagesink
+ * ]|
+ * |[
+ * gst-launch-1.0 videotestsrc pattern=checkers-1 ! glviewconvert input-mode-override=side-by-side ! glimagesink -v
+ * ]|
+ * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/base/gstbasetransform.h>
+#include "gstglviewconvert.h"
+
+#define GST_CAT_DEFAULT gst_gl_view_convert_element_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_0,
+  PROP_INPUT_LAYOUT,
+  PROP_INPUT_FLAGS,
+  PROP_OUTPUT_LAYOUT,
+  PROP_OUTPUT_FLAGS,
+  PROP_OUTPUT_DOWNMIX_MODE
+};
+
+#define DEFAULT_DOWNMIX GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_gl_view_convert_element_debug, "glview_convertelement", 0, "glview_convert element");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLViewConvertElement, gst_gl_view_convert_element,
+    GST_TYPE_GL_FILTER, DEBUG_INIT);
+#define parent_class gst_gl_view_convert_element_parent_class
+
+static void gst_gl_view_convert_dispose (GObject * object);
+static void gst_gl_view_convert_element_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+static void gst_gl_view_convert_element_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+
+static gboolean gst_gl_view_convert_element_stop (GstBaseTransform * bt);
+static gboolean
+gst_gl_view_convert_element_set_caps (GstGLFilter * filter, GstCaps * incaps,
+    GstCaps * outcaps);
+static GstCaps *gst_gl_view_convert_element_transform_internal_caps (GstGLFilter
+    * filter, GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps);
+static GstCaps *gst_gl_view_convert_element_fixate_caps (GstBaseTransform *
+    trans, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
+static GstFlowReturn
+gst_gl_view_convert_element_submit_input_buffer (GstBaseTransform * trans,
+    gboolean is_discont, GstBuffer * input);
+static gboolean
+gst_gl_view_convert_element_generate_output_buffer (GstBaseTransform * bt,
+    GstBuffer ** outbuf);
+
+static void
+gst_gl_view_convert_element_class_init (GstGLViewConvertElementClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->set_property = gst_gl_view_convert_element_set_property;
+  gobject_class->get_property = gst_gl_view_convert_element_get_property;
+  gobject_class->dispose = gst_gl_view_convert_dispose;
+
+  gst_element_class_set_metadata (element_class,
+      "OpenGL Multiview/3D conversion filter", "Filter",
+      "Convert stereoscopic/multiview video formats",
+      "Jan Schmidt <jan@centricular.com>\n"
+      "Matthew Waters <matthew@centricular.com>");
+
+  GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_view_convert_element_set_caps;
+
+  GST_GL_FILTER_CLASS (klass)->transform_internal_caps =
+      gst_gl_view_convert_element_transform_internal_caps;
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_view_convert_element_stop;
+  GST_BASE_TRANSFORM_CLASS (klass)->fixate_caps =
+      gst_gl_view_convert_element_fixate_caps;
+  GST_BASE_TRANSFORM_CLASS (klass)->submit_input_buffer =
+      gst_gl_view_convert_element_submit_input_buffer;
+  GST_BASE_TRANSFORM_CLASS (klass)->generate_output =
+      gst_gl_view_convert_element_generate_output_buffer;
+
+  g_object_class_install_property (gobject_class, PROP_INPUT_LAYOUT,
+      g_param_spec_enum ("input-mode-override",
+          "Input Multiview Mode Override",
+          "Override any input information about multiview layout",
+          GST_TYPE_VIDEO_MULTIVIEW_FRAME_PACKING,
+          GST_VIDEO_MULTIVIEW_MODE_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_INPUT_FLAGS,
+      g_param_spec_flags ("input-flags-override",
+          "Input Multiview Flags Override",
+          "Override any input information about multiview layout flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_LAYOUT,
+      g_param_spec_enum ("output-mode-override",
+          "Output Multiview Mode Override",
+          "Override automatic output mode selection for multiview layout",
+          GST_TYPE_VIDEO_MULTIVIEW_MODE, GST_VIDEO_MULTIVIEW_MODE_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_FLAGS,
+      g_param_spec_flags ("output-flags-override",
+          "Output Multiview Flags Override",
+          "Override automatic negotiation for output multiview layout flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_DOWNMIX_MODE,
+      g_param_spec_enum ("downmix-mode", "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_gl_view_convert_element_init (GstGLViewConvertElement * convert)
+{
+  convert->viewconvert = gst_gl_view_convert_new ();
+}
+
+static void
+gst_gl_view_convert_dispose (GObject * object)
+{
+  GstGLViewConvertElement *convert = GST_GL_VIEW_CONVERT_ELEMENT (object);
+
+  if (convert->viewconvert) {
+    gst_object_unref (convert->viewconvert);
+    convert->viewconvert = NULL;
+  }
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static gboolean
+gst_gl_view_convert_element_set_caps (GstGLFilter * filter, GstCaps * incaps,
+    GstCaps * outcaps)
+{
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (filter);
+  GstCapsFeatures *gl_features;
+  gboolean ret;
+
+  GST_DEBUG_OBJECT (filter, "incaps %" GST_PTR_FORMAT
+      " outcaps %" GST_PTR_FORMAT, incaps, outcaps);
+  /* The view_convert component needs RGBA caps */
+  incaps = gst_caps_copy (incaps);
+  outcaps = gst_caps_copy (outcaps);
+
+  gst_caps_set_simple (incaps, "format", G_TYPE_STRING, "RGBA", NULL);
+  gl_features =
+      gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  gst_caps_set_features (incaps, 0, gl_features);
+
+  gst_caps_set_simple (outcaps, "format", G_TYPE_STRING, "RGBA", NULL);
+  gl_features =
+      gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  gst_caps_set_features (outcaps, 0, gl_features);
+
+  ret = gst_gl_view_convert_set_caps (viewconvert_filter->viewconvert,
+      incaps, outcaps);
+
+  gst_caps_unref (incaps);
+  gst_caps_unref (outcaps);
+
+  return ret;
+}
+
+static GstCaps *
+gst_gl_view_convert_element_transform_internal_caps (GstGLFilter * filter,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps)
+{
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (filter);
+  GstCaps *result;
+
+  GST_DEBUG_OBJECT (filter, "dir %s transforming caps: %" GST_PTR_FORMAT,
+      direction == GST_PAD_SINK ? "sink" : "src", caps);
+
+  result =
+      gst_gl_view_convert_transform_caps (viewconvert_filter->viewconvert,
+      direction, caps, NULL);
+
+  GST_DEBUG_OBJECT (filter, "returning caps: %" GST_PTR_FORMAT, result);
+
+  return result;
+}
+
+static GstCaps *
+gst_gl_view_convert_element_fixate_caps (GstBaseTransform * trans,
+    GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
+{
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (trans);
+
+  othercaps = gst_gl_view_convert_fixate_caps (viewconvert_filter->viewconvert,
+      direction, caps, othercaps);
+
+  if (gst_caps_is_empty (othercaps))
+    return othercaps;
+
+  /* Let GLfilter do the rest */
+  return
+      GST_BASE_TRANSFORM_CLASS
+      (gst_gl_view_convert_element_parent_class)->fixate_caps (trans, direction,
+      caps, othercaps);
+}
+
+static gboolean
+gst_gl_view_convert_element_stop (GstBaseTransform * bt)
+{
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (bt);
+
+  gst_gl_view_convert_reset (viewconvert_filter->viewconvert);
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (bt);
+}
+
+static void
+gst_gl_view_convert_element_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLViewConvertElement *convert = GST_GL_VIEW_CONVERT_ELEMENT (object);
+
+  switch (prop_id) {
+    case PROP_INPUT_LAYOUT:
+    case PROP_INPUT_FLAGS:
+      g_object_set_property (G_OBJECT (convert->viewconvert), pspec->name,
+          value);
+      gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (convert));
+      break;
+    case PROP_OUTPUT_LAYOUT:
+    case PROP_OUTPUT_FLAGS:
+      g_object_set_property (G_OBJECT (convert->viewconvert), pspec->name,
+          value);
+      gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (convert));
+      break;
+    case PROP_OUTPUT_DOWNMIX_MODE:
+      g_object_set_property (G_OBJECT (convert->viewconvert), pspec->name,
+          value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_view_convert_element_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLViewConvertElement *convert = GST_GL_VIEW_CONVERT_ELEMENT (object);
+
+  switch (prop_id) {
+    case PROP_INPUT_LAYOUT:
+    case PROP_INPUT_FLAGS:
+    case PROP_OUTPUT_LAYOUT:
+    case PROP_OUTPUT_FLAGS:
+    case PROP_OUTPUT_DOWNMIX_MODE:
+      g_object_get_property (G_OBJECT (convert->viewconvert), pspec->name,
+          value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static GstFlowReturn
+gst_gl_view_convert_element_submit_input_buffer (GstBaseTransform * trans,
+    gboolean is_discont, GstBuffer * input)
+{
+  GstGLContext *context = GST_GL_BASE_FILTER (trans)->context;
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (trans);
+  GstFlowReturn ret;
+
+  ret =
+      GST_BASE_TRANSFORM_CLASS (parent_class)->submit_input_buffer (trans,
+      is_discont, input);
+  if (ret != GST_FLOW_OK || trans->queued_buf == NULL)
+    return ret;
+
+  gst_gl_view_convert_set_context (viewconvert_filter->viewconvert, context);
+
+  /* Takes the ref to the input buffer */
+  ret =
+      gst_gl_view_convert_submit_input_buffer (viewconvert_filter->viewconvert,
+      is_discont, input);
+  trans->queued_buf = NULL;
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_gl_view_convert_element_generate_output_buffer (GstBaseTransform * bt,
+    GstBuffer ** outbuf_ptr)
+{
+  GstGLFilter *filter = GST_GL_FILTER (bt);
+  GstGLViewConvertElement *viewconvert_filter =
+      GST_GL_VIEW_CONVERT_ELEMENT (bt);
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  ret = gst_gl_view_convert_get_output (viewconvert_filter->viewconvert,
+      outbuf_ptr);
+
+  if (ret != GST_FLOW_OK) {
+    GST_ELEMENT_ERROR (filter, RESOURCE, SETTINGS,
+        ("failed to perform view conversion on input buffer"), (NULL));
+    return ret;
+  }
+
+  return ret;
+}
diff --git a/ext/gl/gstglviewconvert.h b/ext/gl/gstglviewconvert.h
new file mode 100644
index 0000000..1403d27
--- /dev/null
+++ b/ext/gl/gstglviewconvert.h
@@ -0,0 +1,53 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Jan Schmidt <jan@centricular.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_VIEW_CONVERT_ELEMENT_H_
+#define _GST_GL_VIEW_CONVERT_ELEMENT_H_
+
+#include <gst/gl/gstglviewconvert.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_GL_VIEW_CONVERT_ELEMENT            (gst_gl_view_convert_element_get_type())
+#define GST_GL_VIEW_CONVERT_ELEMENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_VIEW_CONVERT_ELEMENT,GstGLViewConvertElement))
+#define GST_IS_GL_VIEW_CONVERT_ELEMENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_VIEW_CONVERT_ELEMENT))
+#define GST_GL_VIEW_CONVERT_ELEMENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_VIEW_CONVERT_ELEMENT,GstGLViewConvertElementClass))
+#define GST_IS_GL_VIEW_CONVERT_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_VIEW_CONVERT_ELEMENT))
+#define GST_GL_VIEW_CONVERT_ELEMENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_VIEW_CONVERT_ELEMENT,GstGLViewConvertElementClass))
+
+typedef struct _GstGLViewConvertElement GstGLViewConvertElement;
+typedef struct _GstGLViewConvertElementClass GstGLViewConvertElementClass;
+
+struct _GstGLViewConvertElement
+{
+  GstGLFilter filter;
+
+  GstGLViewConvert *viewconvert;
+};
+
+struct _GstGLViewConvertElementClass
+{
+  GstGLFilterClass filter_class;
+};
+
+GType gst_gl_view_convert_element_get_type (void);
+
+G_END_DECLS
+#endif /* _GST_GL_VIEW_CONVERT_H_ */
diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index a4b2540..1fad0a2 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
@@ -31,10 +31,10 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch-0.10 --gst-debug=gldisplay:3 videotestsrc ! glimagesink
+ * gst-launch-1.0 --gst-debug=gldisplay:3 videotestsrc ! glimagesink
  * ]| A debugging pipeline.
   |[
- * GST_GL_SHADER_DEBUG=1 gst-launch-0.10 videotestsrc ! glimagesink
+ * GST_DEBUG=gl*:6 gst-launch-1.0 videotestsrc ! glimagesink
  * ]| A debugging pipelines related to shaders.
  * </refsect2>
  */
@@ -44,37 +44,52 @@
 #endif
 
 #include "gstglimagesink.h"
+#include "gstgluploadelement.h"
+#include "gstgldownloadelement.h"
+#include "gstglcolorconvertelement.h"
+#include "gstglfilterbin.h"
+#include "gstglsinkbin.h"
+#include "gstglsrcbin.h"
+#include "gstglmixerbin.h"
 
 #include "gstglfiltercube.h"
 #include "gstgleffects.h"
 #include "gstglcolorscale.h"
 #include "gstglvideomixer.h"
 #include "gstglfiltershader.h"
+#include "gstglfilterapp.h"
+#include "gstglstereosplit.h"
+#include "gstglstereomix.h"
+
 #if HAVE_GRAPHENE
 #include "gstgltransformation.h"
 #endif
+#if HAVE_JPEG
+#if HAVE_PNG
+#include "gstgloverlay.h"
+#endif /* HAVE_PNG */
+#endif /* HAVE_JPEG */
 
 #if GST_GL_HAVE_OPENGL
 #include "gstgltestsrc.h"
-#include "gstglfilterlaplacian.h"
 #include "gstglfilterglass.h"
-#include "gstglfilterapp.h"
-#include "gstglfilterblur.h"
-#include "gstglfilterreflectedscreen.h"
-#include "gstglfiltersobel.h"
+/* #include "gstglfilterreflectedscreen.h" */
 #include "gstgldeinterlace.h"
+#include "gstglviewconvert.h"
 #include "gstglmosaic.h"
 #if HAVE_PNG
 #include "gstgldifferencematte.h"
-#include "gstglbumper.h"
-#if HAVE_JPEG
-#include "gstgloverlay.h"
-#endif /* HAVE_JPEG */
+/* #include "gstglbumper.h" */
 #endif /* HAVE_PNG */
 #endif /* GST_GL_HAVE_OPENGL */
 
+#if GST_GL_HAVE_WINDOW_COCOA
+/* avoid including Cocoa/CoreFoundation from a C file... */
+extern GType gst_ca_opengl_layer_sink_bin_get_type (void);
+#endif
+
 #ifdef USE_EGL_RPI
-#include <bcm_host.h>
+extern void bcm_host_init (void);
 #endif
 
 #if GST_GL_HAVE_WINDOW_X11
@@ -101,7 +116,47 @@
 #endif
 
   if (!gst_element_register (plugin, "glimagesink",
-          GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) {
+          GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glimagesinkelement",
+          GST_RANK_NONE, gst_glimage_sink_get_type ())) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glupload",
+          GST_RANK_NONE, GST_TYPE_GL_UPLOAD_ELEMENT)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "gldownload",
+          GST_RANK_NONE, GST_TYPE_GL_DOWNLOAD_ELEMENT)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glcolorconvert",
+          GST_RANK_NONE, GST_TYPE_GL_COLOR_CONVERT_ELEMENT)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glfilterbin",
+          GST_RANK_NONE, GST_TYPE_GL_FILTER_BIN)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glsinkbin",
+          GST_RANK_NONE, GST_TYPE_GL_SINK_BIN)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glsrcbin",
+          GST_RANK_NONE, GST_TYPE_GL_SRC_BIN)) {
+    return FALSE;
+  }
+
+  if (!gst_element_register (plugin, "glmixerbin",
+          GST_RANK_NONE, GST_TYPE_GL_MIXER_BIN)) {
     return FALSE;
   }
 
@@ -115,10 +170,10 @@
     return FALSE;
   }
 #endif
-  if (!gst_element_register (plugin, "gleffects",
-          GST_RANK_NONE, gst_gl_effects_get_type ())) {
+
+  if (!gst_gl_effects_register_filters (plugin, GST_RANK_NONE)) {
     return FALSE;
-  }
+  };
 
   if (!gst_element_register (plugin, "glcolorscale",
           GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) {
@@ -126,54 +181,58 @@
   }
 
   if (!gst_element_register (plugin, "glvideomixer",
-          GST_RANK_NONE, GST_TYPE_GL_VIDEO_MIXER)) {
+          GST_RANK_NONE, gst_gl_video_mixer_bin_get_type ())) {
     return FALSE;
   }
+
+  if (!gst_element_register (plugin, "glvideomixerelement",
+          GST_RANK_NONE, gst_gl_video_mixer_get_type ())) {
+    return FALSE;
+  }
+
   if (!gst_element_register (plugin, "glshader",
           GST_RANK_NONE, gst_gl_filtershader_get_type ())) {
     return FALSE;
   }
-#if GST_GL_HAVE_OPENGL
-  if (!gst_element_register (plugin, "gltestsrc",
-          GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
-    return FALSE;
-  }
-
-  if (!gst_element_register (plugin, "glfilterblur",
-          GST_RANK_NONE, gst_gl_filterblur_get_type ())) {
-    return FALSE;
-  }
-
-  if (!gst_element_register (plugin, "glfiltersobel",
-          GST_RANK_NONE, gst_gl_filtersobel_get_type ())) {
-    return FALSE;
-  }
-
-  if (!gst_element_register (plugin, "glfilterlaplacian",
-          GST_RANK_NONE, GST_TYPE_GL_FILTER_LAPLACIAN)) {
-    return FALSE;
-  }
-
-  if (!gst_element_register (plugin, "glfilterglass",
-          GST_RANK_NONE, GST_TYPE_GL_FILTER_GLASS)) {
-    return FALSE;
-  }
 
   if (!gst_element_register (plugin, "glfilterapp",
           GST_RANK_NONE, GST_TYPE_GL_FILTER_APP)) {
     return FALSE;
   }
+#if HAVE_JPEG
+#if HAVE_PNG
+  if (!gst_element_register (plugin, "gloverlay",
+          GST_RANK_NONE, gst_gl_overlay_get_type ())) {
+    return FALSE;
+  }
+#endif /* HAVE_PNG */
+#endif /* HAVE_JPEG */
+#if GST_GL_HAVE_OPENGL
+  if (!gst_element_register (plugin, "gltestsrc",
+          GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
+    return FALSE;
+  }
 
+  if (!gst_element_register (plugin, "glfilterglass",
+          GST_RANK_NONE, GST_TYPE_GL_FILTER_GLASS)) {
+    return FALSE;
+  }
+#if 0
   if (!gst_element_register (plugin, "glfilterreflectedscreen",
           GST_RANK_NONE, GST_TYPE_GL_FILTER_REFLECTED_SCREEN)) {
     return FALSE;
   }
-
+#endif
   if (!gst_element_register (plugin, "gldeinterlace",
           GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
     return FALSE;
   }
 
+  if (!gst_element_register (plugin, "glviewconvert",
+          GST_RANK_NONE, GST_TYPE_GL_VIEW_CONVERT_ELEMENT)) {
+    return FALSE;
+  }
+
   if (!gst_element_register (plugin, "glmosaic",
           GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
     return FALSE;
@@ -183,19 +242,28 @@
           GST_RANK_NONE, gst_gl_differencematte_get_type ())) {
     return FALSE;
   }
-
+#if 0
   if (!gst_element_register (plugin, "glbumper",
           GST_RANK_NONE, gst_gl_bumper_get_type ())) {
     return FALSE;
   }
-#if HAVE_JPEG
-  if (!gst_element_register (plugin, "gloverlay",
-          GST_RANK_NONE, gst_gl_overlay_get_type ())) {
+#endif
+#endif /* HAVE_PNG */
+  if (!gst_element_register (plugin, "glstereosplit",
+          GST_RANK_NONE, GST_TYPE_GL_STEREOSPLIT)) {
     return FALSE;
   }
-#endif /* HAVE_JPEG */
-#endif /* HAVE_PNG */
+  if (!gst_element_register (plugin, "glstereomix",
+          GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
+    return FALSE;
+  }
 #endif /* GST_GL_HAVE_OPENGL */
+#if GST_GL_HAVE_WINDOW_COCOA
+  if (!gst_element_register (plugin, "caopengllayersink",
+          GST_RANK_NONE, gst_ca_opengl_layer_sink_bin_get_type ())) {
+    return FALSE;
+  }
+#endif
 
   return TRUE;
 }
diff --git a/ext/gme/Makefile.in b/ext/gme/Makefile.in
index 1215bcf..d3f60ab 100644
--- a/ext/gme/Makefile.in
+++ b/ext/gme/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/gme
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gme/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/gme/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/gsettings/Makefile.in b/ext/gsettings/Makefile.in
index 0d637a8..a6e1aab 100644
--- a/ext/gsettings/Makefile.in
+++ b/ext/gsettings/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,9 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/gsettings
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(srcdir)/org.freedesktop.gstreamer.default-elements.gschema.xml.in \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -91,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +112,6 @@
 	$(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 \
@@ -121,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =  \
@@ -238,6 +247,9 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(srcdir)/org.freedesktop.gstreamer.default-elements.gschema.xml.in \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -255,8 +267,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -281,8 +295,6 @@
 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@
@@ -295,7 +307,6 @@
 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@
@@ -303,6 +314,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -329,11 +342,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -352,8 +368,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -412,10 +426,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -432,7 +450,6 @@
 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@
@@ -441,7 +458,6 @@
 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@
@@ -454,7 +470,6 @@
 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@
@@ -468,6 +483,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -479,6 +495,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -517,6 +535,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -552,10 +571,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -581,6 +604,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -588,7 +614,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -617,6 +650,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -627,6 +661,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -657,17 +692,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -684,6 +718,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -722,6 +757,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -782,7 +818,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gsettings/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/gsettings/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1142,6 +1177,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml: org.freedesktop.gstreamer.default-elements.gschema.xml
 	cp org.freedesktop.gstreamer.default-elements.gschema.xml org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml
diff --git a/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml b/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
index e3c9a6e..ed0c4ce 100644
--- a/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
+++ b/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml
@@ -5,7 +5,7 @@
       <summary>default GStreamer sound events audiosink</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="sounds-audiosink-description" type="s">
@@ -18,7 +18,7 @@
       <summary>default GStreamer audiosink for Audio/Video Conferencing</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="chat-audiosink-description" type="s">
@@ -31,7 +31,7 @@
       <summary>default GStreamer audiosink for Music and Movies</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="music-audiosink-description" type="s">
diff --git a/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in b/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
index 58f1b33..1a13b3a 100644
--- a/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
+++ b/ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
@@ -5,7 +5,7 @@
       <summary>default GStreamer sound events audiosink</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="sounds-audiosink-description" type="s">
@@ -18,7 +18,7 @@
       <summary>default GStreamer audiosink for Audio/Video Conferencing</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="chat-audiosink-description" type="s">
@@ -31,7 +31,7 @@
       <summary>default GStreamer audiosink for Music and Movies</summary>
       <description>GStreamer can play audio using any number of
       output elements. Some possible choices are osssink, pulsesink
-      and alsasink. The audiosink can be a partial pipeline instea
+      and alsasink. The audiosink can be a partial pipeline instead
       of just one element.</description>
     </key>
     <key name="music-audiosink-description" type="s">
diff --git a/ext/gsm/Makefile.in b/ext/gsm/Makefile.in
index 0a3369c..835c500 100644
--- a/ext/gsm/Makefile.in
+++ b/ext/gsm/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/gsm
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +791,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gsm/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/gsm/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1081,6 +1115,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c
index 33b3950..e02631f 100644
--- a/ext/gsm/gstgsmdec.c
+++ b/ext/gsm/gstgsmdec.c
@@ -105,6 +105,9 @@
 gst_gsmdec_init (GstGSMDec * gsmdec)
 {
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (gsmdec), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (gsmdec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (gsmdec));
 }
 
 static gboolean
diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c
index d9a0aee..54ede2e 100644
--- a/ext/gsm/gstgsmenc.c
+++ b/ext/gsm/gstgsmenc.c
@@ -97,6 +97,7 @@
 static void
 gst_gsmenc_init (GstGSMEnc * gsmenc)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (gsmenc));
 }
 
 static gboolean
diff --git a/ext/gtk/Makefile.am b/ext/gtk/Makefile.am
new file mode 100644
index 0000000..f2e8c55
--- /dev/null
+++ b/ext/gtk/Makefile.am
@@ -0,0 +1,47 @@
+# preamble
+NULL =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+DISTCLEANFILES =
+lib_LTLIBRARIES =
+
+# source
+sources = \
+	gtkgstbasewidget.c \
+	gtkgstbasewidget.h \
+	gtkgstwidget.c \
+	gtkgstwidget.h \
+	gstgtkbasesink.c \
+	gstgtkbasesink.h \
+	gstgtksink.c \
+	gstgtksink.h \
+	gstplugin.c \
+	$(NULL)
+
+libgstgtksink_la_CFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GTK3_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS)
+libgstgtksink_la_LIBADD = \
+	$(GTK3_LIBS) \
+	$(GST_BASE_LIBS) \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION)
+
+libgstgtksink_la_SOURCES = $(sources)
+libgstgtksink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstgtksink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+if USE_GTK3_GL
+if USE_GL
+libgstgtksink_la_SOURCES += gstgtkglsink.c gstgtkglsink.h gtkgstglwidget.c gtkgstglwidget.h
+libgstgtksink_la_LIBADD += \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
+endif
+endif
+
+plugin_LTLIBRARIES = libgstgtksink.la
diff --git a/sys/qtwrapper/Makefile.in b/ext/gtk/Makefile.in
similarity index 69%
copy from sys/qtwrapper/Makefile.in
copy to ext/gtk/Makefile.in
index a8d369c..6fca266 100644
--- a/sys/qtwrapper/Makefile.in
+++ b/ext/gtk/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +89,11 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = sys/qtwrapper
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am__append_1 = gstgtkglsink.c gstgtkglsink.h gtkgstglwidget.c gtkgstglwidget.h
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am__append_2 = \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
+
+subdir = ext/gtk
 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 \
@@ -90,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +115,6 @@
 	$(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 \
@@ -120,6 +131,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -151,26 +163,34 @@
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(plugindir)"
-LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstqtwrapper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstqtwrapper_la_OBJECTS = libgstqtwrapper_la-qtwrapper.lo \
-	libgstqtwrapper_la-qtutils.lo \
-	libgstqtwrapper_la-codecmapping.lo \
-	libgstqtwrapper_la-audiodecoders.lo \
-	libgstqtwrapper_la-videodecoders.lo \
-	libgstqtwrapper_la-imagedescription.lo
-libgstqtwrapper_la_OBJECTS = $(am_libgstqtwrapper_la_OBJECTS)
+libgstgtksink_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_2)
+am__libgstgtksink_la_SOURCES_DIST = gtkgstbasewidget.c \
+	gtkgstbasewidget.h gtkgstwidget.c gtkgstwidget.h \
+	gstgtkbasesink.c gstgtkbasesink.h gstgtksink.c gstgtksink.h \
+	gstplugin.c gstgtkglsink.c gstgtkglsink.h gtkgstglwidget.c \
+	gtkgstglwidget.h
+am__objects_1 =
+am__objects_2 = libgstgtksink_la-gtkgstbasewidget.lo \
+	libgstgtksink_la-gtkgstwidget.lo \
+	libgstgtksink_la-gstgtkbasesink.lo \
+	libgstgtksink_la-gstgtksink.lo libgstgtksink_la-gstplugin.lo \
+	$(am__objects_1)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am__objects_3 = libgstgtksink_la-gstgtkglsink.lo \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	libgstgtksink_la-gtkgstglwidget.lo
+am_libgstgtksink_la_OBJECTS = $(am__objects_2) $(am__objects_3)
+libgstgtksink_la_OBJECTS = $(am_libgstgtksink_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 = 
-libgstqtwrapper_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) \
-	$(libgstqtwrapper_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstgtksink_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstgtksink_la_CFLAGS) $(CFLAGS) \
+	$(libgstgtksink_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
@@ -205,14 +225,13 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstqtwrapper_la_SOURCES)
-DIST_SOURCES = $(libgstqtwrapper_la_SOURCES)
+SOURCES = $(libgstgtksink_la_SOURCES)
+DIST_SOURCES = $(am__libgstgtksink_la_SOURCES_DIST)
 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
@@ -232,6 +251,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +269,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +297,6 @@
 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@
@@ -289,7 +309,6 @@
 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@
@@ -297,6 +316,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +344,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +370,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +428,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +452,6 @@
 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@
@@ -435,7 +460,6 @@
 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@
@@ -448,7 +472,6 @@
 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@
@@ -462,6 +485,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +497,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +537,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +573,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +606,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +616,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +652,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +663,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +694,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +720,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +759,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -729,33 +773,45 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstqtwrapper.la
 
-# sources used to compile this plug-in
-libgstqtwrapper_la_SOURCES = \
-	qtwrapper.c		\
-	qtutils.c		\
-	codecmapping.c		\
-	audiodecoders.c		\
-	videodecoders.c		\
-	imagedescription.c
+# preamble
+NULL = 
+BUILT_SOURCES = 
+CLEANFILES = 
+EXTRA_DIST = 
+DISTCLEANFILES = 
+lib_LTLIBRARIES = 
 
+# source
+sources = \
+	gtkgstbasewidget.c \
+	gtkgstbasewidget.h \
+	gtkgstwidget.c \
+	gtkgstwidget.h \
+	gstgtkbasesink.c \
+	gstgtkbasesink.h \
+	gstgtksink.c \
+	gstgtksink.h \
+	gstplugin.c \
+	$(NULL)
 
-# flags used to compile this plugin
-# add other _CFLAGS and _LIBS as needed
-libgstqtwrapper_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
-libgstqtwrapper_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
-libgstqtwrapper_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework,CoreAudio,-framework,AudioToolbox,-framework,Carbon,-framework,QuickTime,-framework,QuartzCore
-libgstqtwrapper_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+libgstgtksink_la_CFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GTK3_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS)
 
-# headers we need but don't want installed
-noinst_HEADERS = \
-	codecmapping.h		\
-	qtwrapper.h		\
-	qtutils.h		\
-	imagedescription.h
-
-all: all-am
+libgstgtksink_la_LIBADD = $(GTK3_LIBS) $(GST_BASE_LIBS) \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(am__append_2)
+libgstgtksink_la_SOURCES = $(sources) $(am__append_1)
+libgstgtksink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstgtksink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+plugin_LTLIBRARIES = libgstgtksink.la
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -768,10 +824,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/qtwrapper/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/gtk/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sys/qtwrapper/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/gtk/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -790,6 +845,41 @@
 	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}; \
+	}
+
 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
 	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
@@ -825,8 +915,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstqtwrapper.la: $(libgstqtwrapper_la_OBJECTS) $(libgstqtwrapper_la_DEPENDENCIES) $(EXTRA_libgstqtwrapper_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstqtwrapper_la_LINK) -rpath $(plugindir) $(libgstqtwrapper_la_OBJECTS) $(libgstqtwrapper_la_LIBADD) $(LIBS)
+libgstgtksink.la: $(libgstgtksink_la_OBJECTS) $(libgstgtksink_la_DEPENDENCIES) $(EXTRA_libgstgtksink_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstgtksink_la_LINK) -rpath $(plugindir) $(libgstgtksink_la_OBJECTS) $(libgstgtksink_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -834,12 +924,13 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-audiodecoders.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-codecmapping.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-imagedescription.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-qtutils.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-qtwrapper.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstqtwrapper_la-videodecoders.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gstgtkbasesink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gstgtkglsink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gstgtksink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gstplugin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gtkgstbasewidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gtkgstglwidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgtksink_la-gtkgstwidget.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -865,47 +956,54 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstqtwrapper_la-qtwrapper.lo: qtwrapper.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-qtwrapper.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Tpo -c -o libgstqtwrapper_la-qtwrapper.lo `test -f 'qtwrapper.c' || echo '$(srcdir)/'`qtwrapper.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Tpo $(DEPDIR)/libgstqtwrapper_la-qtwrapper.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='qtwrapper.c' object='libgstqtwrapper_la-qtwrapper.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gtkgstbasewidget.lo: gtkgstbasewidget.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gtkgstbasewidget.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gtkgstbasewidget.Tpo -c -o libgstgtksink_la-gtkgstbasewidget.lo `test -f 'gtkgstbasewidget.c' || echo '$(srcdir)/'`gtkgstbasewidget.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gtkgstbasewidget.Tpo $(DEPDIR)/libgstgtksink_la-gtkgstbasewidget.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtkgstbasewidget.c' object='libgstgtksink_la-gtkgstbasewidget.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-qtwrapper.lo `test -f 'qtwrapper.c' || echo '$(srcdir)/'`qtwrapper.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gtkgstbasewidget.lo `test -f 'gtkgstbasewidget.c' || echo '$(srcdir)/'`gtkgstbasewidget.c
 
-libgstqtwrapper_la-qtutils.lo: qtutils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-qtutils.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-qtutils.Tpo -c -o libgstqtwrapper_la-qtutils.lo `test -f 'qtutils.c' || echo '$(srcdir)/'`qtutils.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-qtutils.Tpo $(DEPDIR)/libgstqtwrapper_la-qtutils.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='qtutils.c' object='libgstqtwrapper_la-qtutils.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gtkgstwidget.lo: gtkgstwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gtkgstwidget.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gtkgstwidget.Tpo -c -o libgstgtksink_la-gtkgstwidget.lo `test -f 'gtkgstwidget.c' || echo '$(srcdir)/'`gtkgstwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gtkgstwidget.Tpo $(DEPDIR)/libgstgtksink_la-gtkgstwidget.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtkgstwidget.c' object='libgstgtksink_la-gtkgstwidget.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-qtutils.lo `test -f 'qtutils.c' || echo '$(srcdir)/'`qtutils.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gtkgstwidget.lo `test -f 'gtkgstwidget.c' || echo '$(srcdir)/'`gtkgstwidget.c
 
-libgstqtwrapper_la-codecmapping.lo: codecmapping.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-codecmapping.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-codecmapping.Tpo -c -o libgstqtwrapper_la-codecmapping.lo `test -f 'codecmapping.c' || echo '$(srcdir)/'`codecmapping.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-codecmapping.Tpo $(DEPDIR)/libgstqtwrapper_la-codecmapping.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='codecmapping.c' object='libgstqtwrapper_la-codecmapping.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gstgtkbasesink.lo: gstgtkbasesink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gstgtkbasesink.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gstgtkbasesink.Tpo -c -o libgstgtksink_la-gstgtkbasesink.lo `test -f 'gstgtkbasesink.c' || echo '$(srcdir)/'`gstgtkbasesink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gstgtkbasesink.Tpo $(DEPDIR)/libgstgtksink_la-gstgtkbasesink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgtkbasesink.c' object='libgstgtksink_la-gstgtkbasesink.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-codecmapping.lo `test -f 'codecmapping.c' || echo '$(srcdir)/'`codecmapping.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gstgtkbasesink.lo `test -f 'gstgtkbasesink.c' || echo '$(srcdir)/'`gstgtkbasesink.c
 
-libgstqtwrapper_la-audiodecoders.lo: audiodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-audiodecoders.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Tpo -c -o libgstqtwrapper_la-audiodecoders.lo `test -f 'audiodecoders.c' || echo '$(srcdir)/'`audiodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Tpo $(DEPDIR)/libgstqtwrapper_la-audiodecoders.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='audiodecoders.c' object='libgstqtwrapper_la-audiodecoders.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gstgtksink.lo: gstgtksink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gstgtksink.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gstgtksink.Tpo -c -o libgstgtksink_la-gstgtksink.lo `test -f 'gstgtksink.c' || echo '$(srcdir)/'`gstgtksink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gstgtksink.Tpo $(DEPDIR)/libgstgtksink_la-gstgtksink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgtksink.c' object='libgstgtksink_la-gstgtksink.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-audiodecoders.lo `test -f 'audiodecoders.c' || echo '$(srcdir)/'`audiodecoders.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gstgtksink.lo `test -f 'gstgtksink.c' || echo '$(srcdir)/'`gstgtksink.c
 
-libgstqtwrapper_la-videodecoders.lo: videodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-videodecoders.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-videodecoders.Tpo -c -o libgstqtwrapper_la-videodecoders.lo `test -f 'videodecoders.c' || echo '$(srcdir)/'`videodecoders.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-videodecoders.Tpo $(DEPDIR)/libgstqtwrapper_la-videodecoders.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='videodecoders.c' object='libgstqtwrapper_la-videodecoders.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gstplugin.lo: gstplugin.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gstplugin.Tpo -c -o libgstgtksink_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gstplugin.Tpo $(DEPDIR)/libgstgtksink_la-gstplugin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstplugin.c' object='libgstgtksink_la-gstplugin.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-videodecoders.lo `test -f 'videodecoders.c' || echo '$(srcdir)/'`videodecoders.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gstplugin.lo `test -f 'gstplugin.c' || echo '$(srcdir)/'`gstplugin.c
 
-libgstqtwrapper_la-imagedescription.lo: imagedescription.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -MT libgstqtwrapper_la-imagedescription.lo -MD -MP -MF $(DEPDIR)/libgstqtwrapper_la-imagedescription.Tpo -c -o libgstqtwrapper_la-imagedescription.lo `test -f 'imagedescription.c' || echo '$(srcdir)/'`imagedescription.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstqtwrapper_la-imagedescription.Tpo $(DEPDIR)/libgstqtwrapper_la-imagedescription.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='imagedescription.c' object='libgstqtwrapper_la-imagedescription.lo' libtool=yes @AMDEPBACKSLASH@
+libgstgtksink_la-gstgtkglsink.lo: gstgtkglsink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gstgtkglsink.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gstgtkglsink.Tpo -c -o libgstgtksink_la-gstgtkglsink.lo `test -f 'gstgtkglsink.c' || echo '$(srcdir)/'`gstgtkglsink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gstgtkglsink.Tpo $(DEPDIR)/libgstgtksink_la-gstgtkglsink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgtkglsink.c' object='libgstgtksink_la-gstgtkglsink.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 $(libgstqtwrapper_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstqtwrapper_la_CFLAGS) $(CFLAGS) -c -o libgstqtwrapper_la-imagedescription.lo `test -f 'imagedescription.c' || echo '$(srcdir)/'`imagedescription.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gstgtkglsink.lo `test -f 'gstgtkglsink.c' || echo '$(srcdir)/'`gstgtkglsink.c
+
+libgstgtksink_la-gtkgstglwidget.lo: gtkgstglwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -MT libgstgtksink_la-gtkgstglwidget.lo -MD -MP -MF $(DEPDIR)/libgstgtksink_la-gtkgstglwidget.Tpo -c -o libgstgtksink_la-gtkgstglwidget.lo `test -f 'gtkgstglwidget.c' || echo '$(srcdir)/'`gtkgstglwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgtksink_la-gtkgstglwidget.Tpo $(DEPDIR)/libgstgtksink_la-gtkgstglwidget.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtkgstglwidget.c' object='libgstgtksink_la-gtkgstglwidget.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 $(libgstgtksink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgtksink_la_CFLAGS) $(CFLAGS) -c -o libgstgtksink_la-gtkgstglwidget.lo `test -f 'gtkgstglwidget.c' || echo '$(srcdir)/'`gtkgstglwidget.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -996,13 +1094,15 @@
 	  fi; \
 	done
 check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -1024,18 +1124,21 @@
 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)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 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-pluginLTLIBRARIES \
-	mostlyclean-am
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-pluginLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -1061,7 +1164,7 @@
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-libLTLIBRARIES
 
 install-html: install-html-am
 
@@ -1101,24 +1204,27 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pluginLTLIBRARIES
 
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
+	clean-libLTLIBRARIES clean-libtool clean-pluginLTLIBRARIES \
+	cscopelist-am ctags ctags-am distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	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
+	uninstall-libLTLIBRARIES uninstall-pluginLTLIBRARIES
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/ext/gtk/gstgtkbasesink.c b/ext/gtk/gstgtkbasesink.c
new file mode 100644
index 0000000..d0744a0
--- /dev/null
+++ b/ext/gtk/gstgtkbasesink.c
@@ -0,0 +1,400 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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:gtkgstsink
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstgtkbasesink.h"
+
+GST_DEBUG_CATEGORY (gst_debug_gtk_base_sink);
+#define GST_CAT_DEFAULT gst_debug_gtk_base_sink
+
+#define DEFAULT_FORCE_ASPECT_RATIO  TRUE
+#define DEFAULT_PAR_N               0
+#define DEFAULT_PAR_D               1
+#define DEFAULT_IGNORE_ALPHA        TRUE
+
+static void gst_gtk_base_sink_finalize (GObject * object);
+static void gst_gtk_base_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_gtk_base_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static gboolean gst_gtk_base_sink_start (GstBaseSink * bsink);
+
+static GstStateChangeReturn
+gst_gtk_base_sink_change_state (GstElement * element,
+    GstStateChange transition);
+
+static void gst_gtk_base_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end);
+static gboolean gst_gtk_base_sink_set_caps (GstBaseSink * bsink,
+    GstCaps * caps);
+static GstFlowReturn gst_gtk_base_sink_show_frame (GstVideoSink * bsink,
+    GstBuffer * buf);
+
+static void
+gst_gtk_base_sink_navigation_interface_init (GstNavigationInterface * iface);
+
+enum
+{
+  PROP_0,
+  PROP_WIDGET,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_PIXEL_ASPECT_RATIO,
+  PROP_IGNORE_ALPHA,
+};
+
+#define gst_gtk_base_sink_parent_class parent_class
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstGtkBaseSink, gst_gtk_base_sink,
+    GST_TYPE_VIDEO_SINK,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
+        gst_gtk_base_sink_navigation_interface_init);
+    GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_sink,
+        "gtkbasesink", 0, "Gtk Video Sink base class"));
+
+static void
+gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+  GstBaseSinkClass *gstbasesink_class;
+  GstVideoSinkClass *gstvideosink_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+  gstbasesink_class = (GstBaseSinkClass *) klass;
+  gstvideosink_class = (GstVideoSinkClass *) klass;
+
+  gobject_class->set_property = gst_gtk_base_sink_set_property;
+  gobject_class->get_property = gst_gtk_base_sink_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_WIDGET,
+      g_param_spec_object ("widget", "Gtk Widget",
+          "The GtkWidget to place in the widget hierarchy "
+          "(must only be get from the GTK main thread)",
+          GTK_TYPE_WIDGET, G_PARAM_READABLE | 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",
+          "When enabled, scaling will respect original aspect ratio",
+          DEFAULT_FORCE_ASPECT_RATIO,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
+      gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
+          "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D,
+          G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA,
+      g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
+          "When enabled, alpha will be ignored and converted to black",
+          DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gobject_class->finalize = gst_gtk_base_sink_finalize;
+
+  gstelement_class->change_state = gst_gtk_base_sink_change_state;
+  gstbasesink_class->set_caps = gst_gtk_base_sink_set_caps;
+  gstbasesink_class->get_times = gst_gtk_base_sink_get_times;
+  gstbasesink_class->start = gst_gtk_base_sink_start;
+
+  gstvideosink_class->show_frame = gst_gtk_base_sink_show_frame;
+}
+
+static void
+gst_gtk_base_sink_init (GstGtkBaseSink * gtk_sink)
+{
+  gtk_sink->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
+  gtk_sink->par_n = DEFAULT_PAR_N;
+  gtk_sink->par_d = DEFAULT_PAR_D;
+  gtk_sink->ignore_alpha = DEFAULT_IGNORE_ALPHA;
+}
+
+static void
+gst_gtk_base_sink_finalize (GObject * object)
+{
+  GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object);;
+
+  g_clear_object (&gtk_sink->widget);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+widget_destroy_cb (GtkWidget * widget, GstGtkBaseSink * gtk_sink)
+{
+  GST_OBJECT_LOCK (gtk_sink);
+  g_clear_object (&gtk_sink->widget);
+  GST_OBJECT_UNLOCK (gtk_sink);
+}
+
+static GtkGstBaseWidget *
+gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sink)
+{
+  if (gtk_sink->widget != NULL)
+    return gtk_sink->widget;
+
+  /* Ensure GTK is initialized, this has no side effect if it was already
+   * initialized. Also, we do that lazily, so the application can be first */
+  if (!gtk_init_check (NULL, NULL)) {
+    GST_ERROR_OBJECT (gtk_sink, "Could not ensure GTK initialization.");
+    return NULL;
+  }
+
+  g_assert (GST_GTK_BASE_SINK_GET_CLASS (gtk_sink)->create_widget);
+  gtk_sink->widget = (GtkGstBaseWidget *)
+      GST_GTK_BASE_SINK_GET_CLASS (gtk_sink)->create_widget ();
+
+  gtk_sink->bind_aspect_ratio =
+      g_object_bind_property (gtk_sink, "force-aspect-ratio", gtk_sink->widget,
+      "force-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+  gtk_sink->bind_pixel_aspect_ratio =
+      g_object_bind_property (gtk_sink, "pixel-aspect-ratio", gtk_sink->widget,
+      "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+  gtk_sink->bind_ignore_alpha =
+      g_object_bind_property (gtk_sink, "ignore-alpha", gtk_sink->widget,
+      "ignore-alpha", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+
+  /* Take the floating ref, other wise the destruction of the container will
+   * make this widget disapear possibly before we are done. */
+  gst_object_ref_sink (gtk_sink->widget);
+  g_signal_connect (gtk_sink->widget, "destroy",
+      G_CALLBACK (widget_destroy_cb), gtk_sink);
+
+  /* back pointer */
+  gtk_gst_base_widget_set_element (GTK_GST_BASE_WIDGET (gtk_sink->widget),
+      GST_ELEMENT (gtk_sink));
+
+  return gtk_sink->widget;
+}
+
+static void
+gst_gtk_base_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object);
+
+  switch (prop_id) {
+    case PROP_WIDGET:
+      g_value_set_object (value, gst_gtk_base_sink_get_widget (gtk_sink));
+      break;
+    case PROP_FORCE_ASPECT_RATIO:
+      g_value_set_boolean (value, gtk_sink->force_aspect_ratio);
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      gst_value_set_fraction (value, gtk_sink->par_n, gtk_sink->par_d);
+      break;
+    case PROP_IGNORE_ALPHA:
+      g_value_set_boolean (value, gtk_sink->ignore_alpha);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gtk_base_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+      gtk_sink->force_aspect_ratio = g_value_get_boolean (value);
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      gtk_sink->par_n = gst_value_get_fraction_numerator (value);
+      gtk_sink->par_d = gst_value_get_fraction_denominator (value);
+      break;
+    case PROP_IGNORE_ALPHA:
+      gtk_sink->ignore_alpha = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gtk_base_sink_navigation_send_event (GstNavigation * navigation,
+    GstStructure * structure)
+{
+  GstGtkBaseSink *sink = GST_GTK_BASE_SINK (navigation);
+  GstEvent *event;
+  GstPad *pad;
+
+  event = gst_event_new_navigation (structure);
+  pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink));
+
+  GST_TRACE_OBJECT (sink, "navigation event %" GST_PTR_FORMAT, structure);
+
+  if (GST_IS_PAD (pad) && GST_IS_EVENT (event))
+    gst_pad_send_event (pad, event);
+
+  gst_object_unref (pad);
+}
+
+static void
+gst_gtk_base_sink_navigation_interface_init (GstNavigationInterface * iface)
+{
+  iface->send_event = gst_gtk_base_sink_navigation_send_event;
+}
+
+static gboolean
+gst_gtk_base_sink_start (GstBaseSink * bsink)
+{
+  GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink);
+  GstGtkBaseSinkClass *klass = GST_GTK_BASE_SINK_GET_CLASS (bsink);
+  GtkWidget *toplevel;
+
+  if (gst_gtk_base_sink_get_widget (gst_sink) == NULL)
+    return FALSE;
+
+  /* After this point, gtk_sink->widget will always be set */
+
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gst_sink->widget));
+  if (!gtk_widget_is_toplevel (toplevel)) {
+    GtkWidget *window;
+
+    /* sanity check */
+    g_assert (klass->window_title);
+
+    /* User did not add widget its own UI, let's popup a new GtkWindow to
+     * make gst-launch-1.0 work. */
+    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
+    gtk_window_set_title (GTK_WINDOW (window), klass->window_title);
+    gtk_container_add (GTK_CONTAINER (window), toplevel);
+    gtk_widget_show_all (window);
+  }
+
+  return TRUE;
+}
+
+static GstStateChangeReturn
+gst_gtk_base_sink_change_state (GstElement * element, GstStateChange transition)
+{
+  GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (element);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  GST_DEBUG_OBJECT (element, "changing state: %s => %s",
+      gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+      gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
+
+  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_OBJECT_LOCK (gtk_sink);
+      if (gtk_sink->widget)
+        gtk_gst_base_widget_set_buffer (gtk_sink->widget, NULL);
+      GST_OBJECT_UNLOCK (gtk_sink);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_gtk_base_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end)
+{
+  GstGtkBaseSink *gtk_sink;
+
+  gtk_sink = GST_GTK_BASE_SINK (bsink);
+
+  if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+    *start = GST_BUFFER_TIMESTAMP (buf);
+    if (GST_BUFFER_DURATION_IS_VALID (buf))
+      *end = *start + GST_BUFFER_DURATION (buf);
+    else {
+      if (GST_VIDEO_INFO_FPS_N (&gtk_sink->v_info) > 0) {
+        *end = *start +
+            gst_util_uint64_scale_int (GST_SECOND,
+            GST_VIDEO_INFO_FPS_D (&gtk_sink->v_info),
+            GST_VIDEO_INFO_FPS_N (&gtk_sink->v_info));
+      }
+    }
+  }
+}
+
+gboolean
+gst_gtk_base_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (bsink);
+
+  GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps);
+
+  if (!gst_video_info_from_caps (&gtk_sink->v_info, caps))
+    return FALSE;
+
+  GST_OBJECT_LOCK (gtk_sink);
+
+  if (gtk_sink->widget == NULL) {
+    GST_OBJECT_UNLOCK (gtk_sink);
+    GST_ELEMENT_ERROR (gtk_sink, RESOURCE, NOT_FOUND,
+        ("%s", "Output widget was destroyed"), (NULL));
+    return FALSE;
+  }
+
+  if (!gtk_gst_base_widget_set_format (gtk_sink->widget, &gtk_sink->v_info))
+    return FALSE;
+
+  GST_OBJECT_UNLOCK (gtk_sink);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_gtk_base_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
+{
+  GstGtkBaseSink *gtk_sink;
+
+  GST_TRACE ("rendering buffer:%p", buf);
+
+  gtk_sink = GST_GTK_BASE_SINK (vsink);
+
+  GST_OBJECT_LOCK (vsink);
+
+  if (gtk_sink->widget == NULL) {
+    GST_OBJECT_UNLOCK (gtk_sink);
+    GST_ELEMENT_ERROR (gtk_sink, RESOURCE, NOT_FOUND,
+        ("%s", "Output widget was destroyed"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+
+  gtk_gst_base_widget_set_buffer (gtk_sink->widget, buf);
+
+  GST_OBJECT_UNLOCK (gtk_sink);
+
+  return GST_FLOW_OK;
+}
diff --git a/ext/gtk/gstgtkbasesink.h b/ext/gtk/gstgtkbasesink.h
new file mode 100644
index 0000000..6158d81
--- /dev/null
+++ b/ext/gtk/gstgtkbasesink.h
@@ -0,0 +1,90 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_GTK_BASE_SINK_H__
+#define __GST_GTK_BASE_SINK_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+
+#include "gtkgstbasewidget.h"
+
+#define GST_TYPE_GTK_BASE_SINK            (gst_gtk_base_sink_get_type())
+#define GST_GTK_BASE_SINK(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GTK_BASE_SINK,GstGtkBaseSink))
+#define GST_GTK_BASE_SINK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GTK_BASE_SINK,GstGtkBaseSinkClass))
+#define GST_GTK_BASE_SINK_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GTK_BASE_SINK, GstGtkBaseSinkClass))
+#define GST_IS_GTK_BASE_SINK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GTK_BASE_SINK))
+#define GST_IS_GTK_BASE_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GTK_BASE_SINK))
+#define GST_GTK_BASE_SINK_CAST(obj)       ((GstGtkBaseSink*)(obj))
+
+G_BEGIN_DECLS
+
+typedef struct _GstGtkBaseSink GstGtkBaseSink;
+typedef struct _GstGtkBaseSinkClass GstGtkBaseSinkClass;
+
+GType gst_gtk_base_sink_get_type (void);
+
+/**
+ * GstGtkBaseSink:
+ *
+ * Opaque #GstGtkBaseSink object
+ */
+struct _GstGtkBaseSink
+{
+  /* <private> */
+  GstVideoSink         parent;
+
+  GstVideoInfo         v_info;
+
+  GtkGstBaseWidget     *widget;
+
+  /* properties */
+  gboolean             force_aspect_ratio;
+  GBinding             *bind_aspect_ratio;
+
+  gint                  par_n;
+  gint                  par_d;
+  GBinding             *bind_pixel_aspect_ratio;
+
+  gboolean              ignore_alpha;
+  GBinding             *bind_ignore_alpha;
+};
+
+/**
+ * GstGtkBaseSinkClass:
+ *
+ * The #GstGtkBaseSinkClass struct only contains private data
+ */
+struct _GstGtkBaseSinkClass
+{
+  GstVideoSinkClass object_class;
+
+  /* metadata */
+  const gchar *window_title;
+
+  /* virtuals */
+  GtkWidget* (*create_widget) (void);
+};
+
+G_END_DECLS
+
+#endif /* __GST_GTK_BASE_SINK_H__ */
diff --git a/ext/gtk/gstgtkglsink.c b/ext/gtk/gstgtkglsink.c
new file mode 100644
index 0000000..d59880c
--- /dev/null
+++ b/ext/gtk/gstgtkglsink.c
@@ -0,0 +1,331 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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:gstgtkglsink
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstgtkglsink.h"
+#include "gtkgstglwidget.h"
+
+GST_DEBUG_CATEGORY (gst_debug_gtk_gl_sink);
+#define GST_CAT_DEFAULT gst_debug_gtk_gl_sink
+
+static gboolean gst_gtk_gl_sink_start (GstBaseSink * bsink);
+static gboolean gst_gtk_gl_sink_stop (GstBaseSink * bsink);
+static gboolean gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * query);
+static gboolean gst_gtk_gl_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+static GstCaps *gst_gtk_gl_sink_get_caps (GstBaseSink * bsink,
+    GstCaps * filter);
+
+static GstStaticPadTemplate gst_gtk_gl_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")));
+
+#define gst_gtk_gl_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink,
+    GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink,
+        "gtkglsink", 0, "Gtk Video Sink"));
+
+static void
+gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass)
+{
+  GstElementClass *gstelement_class;
+  GstBaseSinkClass *gstbasesink_class;
+  GstGtkBaseSinkClass *gstgtkbasesink_class;
+
+  gstelement_class = (GstElementClass *) klass;
+  gstbasesink_class = (GstBaseSinkClass *) klass;
+  gstgtkbasesink_class = (GstGtkBaseSinkClass *) klass;
+
+  gstbasesink_class->query = gst_gtk_gl_sink_query;
+  gstbasesink_class->propose_allocation = gst_gtk_gl_sink_propose_allocation;
+  gstbasesink_class->start = gst_gtk_gl_sink_start;
+  gstbasesink_class->stop = gst_gtk_gl_sink_stop;
+  gstbasesink_class->get_caps = gst_gtk_gl_sink_get_caps;
+
+  gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new;
+  gstgtkbasesink_class->window_title = "Gtk+ GL renderer";
+
+  gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink",
+      "Sink/Video", "A video sink that renders to a GtkWidget",
+      "Matthew Waters <matthew@centricular.com>");
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_gtk_gl_sink_template));
+}
+
+static void
+gst_gtk_gl_sink_init (GstGtkGLSink * gtk_sink)
+{
+}
+
+static gboolean
+gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * query)
+{
+  GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink);
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+
+      res = gst_gl_handle_context_query ((GstElement *) gtk_sink, query,
+          &gtk_sink->display, &gtk_sink->gtk_context);
+
+      if (gtk_sink->display)
+        gst_gl_display_filter_gl_api (gtk_sink->display, GST_GL_API_OPENGL3);
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, gtk_sink->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        res = gtk_sink->context != NULL;
+      }
+      GST_LOG_OBJECT (gtk_sink, "context query of type %s %i", context_type,
+          res);
+      break;
+    }
+    default:
+      res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
+      break;
+  }
+
+  return res;
+}
+
+static void
+_size_changed_cb (GtkWidget * widget, GdkRectangle * rectangle,
+    GstGtkGLSink * gtk_sink)
+{
+  gint scale_factor, width, height;
+  gboolean reconfigure;
+
+  scale_factor = gtk_widget_get_scale_factor (widget);
+  width = scale_factor * gtk_widget_get_allocated_width (widget);
+  height = scale_factor * gtk_widget_get_allocated_height (widget);
+
+  GST_OBJECT_LOCK (gtk_sink);
+  reconfigure =
+      (width != gtk_sink->display_width || height != gtk_sink->display_height);
+  gtk_sink->display_width = width;
+  gtk_sink->display_height = height;
+  GST_OBJECT_UNLOCK (gtk_sink);
+
+  if (reconfigure) {
+    GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad.");
+    gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad,
+        gst_event_new_reconfigure ());
+  }
+}
+
+static gboolean
+gst_gtk_gl_sink_start (GstBaseSink * bsink)
+{
+  GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink);
+  GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink);
+  GtkGstGLWidget *gst_widget;
+
+  if (!GST_BASE_SINK_CLASS (parent_class)->start (bsink))
+    return FALSE;
+
+  /* After this point, gtk_sink->widget will always be set */
+  gst_widget = GTK_GST_GL_WIDGET (base_sink->widget);
+
+  /* Track the allocation size */
+  g_signal_connect (gst_widget, "size-allocate", G_CALLBACK (_size_changed_cb),
+      gtk_sink);
+  _size_changed_cb (GTK_WIDGET (gst_widget), NULL, gtk_sink);
+
+  if (!gtk_gst_gl_widget_init_winsys (gst_widget))
+    return FALSE;
+
+  gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget);
+  gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget);
+  gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget);
+
+  if (!gtk_sink->display || !gtk_sink->context || !gtk_sink->gtk_context)
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+gst_gtk_gl_sink_stop (GstBaseSink * bsink)
+{
+  GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink);
+
+  if (gtk_sink->display) {
+    gst_object_unref (gtk_sink->display);
+    gtk_sink->display = NULL;
+  }
+
+  if (gtk_sink->context) {
+    gst_object_unref (gtk_sink->context);
+    gtk_sink->context = NULL;
+  }
+
+  if (gtk_sink->gtk_context) {
+    gst_object_unref (gtk_sink->gtk_context);
+    gtk_sink->gtk_context = NULL;
+  }
+
+  return TRUE;
+}
+
+static gboolean
+gst_gtk_gl_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
+{
+  GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink);
+  GstBufferPool *pool = NULL;
+  GstStructure *config;
+  GstCaps *caps;
+  guint size;
+  gboolean need_pool;
+  GstStructure *allocation_meta = NULL;
+  gint display_width, display_height;
+
+  if (!gtk_sink->display || !gtk_sink->context)
+    return FALSE;
+
+  gst_query_parse_allocation (query, &caps, &need_pool);
+
+  if (caps == NULL)
+    goto no_caps;
+
+  if (need_pool) {
+    GstVideoInfo info;
+
+    if (!gst_video_info_from_caps (&info, caps))
+      goto invalid_caps;
+
+    GST_DEBUG_OBJECT (gtk_sink, "create new pool");
+    pool = gst_gl_buffer_pool_new (gtk_sink->context);
+
+    /* the normal size of a frame */
+    size = info.size;
+
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_GL_SYNC_META);
+
+    if (!gst_buffer_pool_set_config (pool, config))
+      goto config_failed;
+
+    /* we need at least 2 buffer because we hold on to the last one */
+    gst_query_add_allocation_pool (query, pool, size, 2, 0);
+    gst_object_unref (pool);
+  }
+
+  GST_OBJECT_LOCK (gtk_sink);
+  display_width = gtk_sink->display_width;
+  display_height = gtk_sink->display_height;
+  GST_OBJECT_UNLOCK (gtk_sink);
+
+  if (display_width != 0 && display_height != 0) {
+    GST_DEBUG_OBJECT (gtk_sink, "sending alloc query with size %dx%d",
+        display_width, display_height);
+    allocation_meta = gst_structure_new ("GstVideoOverlayCompositionMeta",
+        "width", G_TYPE_UINT, display_width,
+        "height", G_TYPE_UINT, display_height, NULL);
+  }
+
+  gst_query_add_allocation_meta (query,
+      GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, allocation_meta);
+
+  if (allocation_meta)
+    gst_structure_free (allocation_meta);
+
+  /* we also support various metadata */
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
+
+  if (gtk_sink->context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
+
+  return TRUE;
+
+  /* ERRORS */
+no_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "no caps specified");
+    return FALSE;
+  }
+invalid_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
+    return FALSE;
+  }
+config_failed:
+  {
+    GST_DEBUG_OBJECT (bsink, "failed setting config");
+    return FALSE;
+  }
+}
+
+static GstCaps *
+gst_gtk_gl_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
+{
+  GstCaps *tmp = NULL;
+  GstCaps *result = NULL;
+
+  tmp = gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink));
+
+  if (filter) {
+    GST_DEBUG_OBJECT (bsink, "intersecting with filter caps %" GST_PTR_FORMAT,
+        filter);
+
+    result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+  } else {
+    result = tmp;
+  }
+
+  result = gst_gl_overlay_compositor_add_caps (result);
+
+  GST_DEBUG_OBJECT (bsink, "returning caps: %" GST_PTR_FORMAT, result);
+
+  return result;
+}
diff --git a/ext/gtk/gstgtkglsink.h b/ext/gtk/gstgtkglsink.h
new file mode 100644
index 0000000..789cf33
--- /dev/null
+++ b/ext/gtk/gstgtkglsink.h
@@ -0,0 +1,82 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_GTK_GL_SINK_H__
+#define __GST_GTK_GL_SINK_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+
+#include "gstgtkbasesink.h"
+
+
+#define GST_TYPE_GTK_GL_SINK            (gst_gtk_gl_sink_get_type())
+#define GST_GTK_GL_SINK(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GTK_GL_SINK,GstGtkGLSink))
+#define GST_GTK_GL_SINK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GTK_GL_SINK,GstGtkGLSinkClass))
+#define GST_IS_GTK_GL_SINK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GTK_GL_SINK))
+#define GST_IS_GTK_GL_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GTK_GL_SINK))
+#define GST_GTK_GL_SINK_CAST(obj)       ((GstGtkGLSink*)(obj))
+
+G_BEGIN_DECLS
+
+typedef struct _GstGtkGLSink GstGtkGLSink;
+typedef struct _GstGtkGLSinkClass GstGtkGLSinkClass;
+
+GType gst_gtk_gl_sink_get_type (void);
+
+/**
+ * GstGtkGLSink:
+ *
+ * Opaque #GstGtkGLSink object
+ */
+struct _GstGtkGLSink
+{
+  /* <private> */
+  GstGtkBaseSink        parent;
+
+  GstGLDisplay         *display;
+  GstGLContext         *context;
+  GstGLContext         *gtk_context;
+
+  GstGLUpload          *upload;
+  GstBuffer            *uploaded_buffer;
+
+  /* read/write with object lock */
+  gint                  display_width;
+  gint                  display_height;
+};
+
+/**
+ * GstGtkGLSinkClass:
+ *
+ * The #GstGtkGLSinkClass struct only contains private data
+ */
+struct _GstGtkGLSinkClass
+{
+  /* <private> */
+  GstGtkBaseSinkClass object_class;
+};
+
+G_END_DECLS
+
+#endif /* __GST_GTK_GL_SINK_H__ */
diff --git a/ext/gtk/gstgtksink.c b/ext/gtk/gstgtksink.c
new file mode 100644
index 0000000..4659221
--- /dev/null
+++ b/ext/gtk/gstgtksink.c
@@ -0,0 +1,72 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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:gtkgstsink
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gtkgstwidget.h"
+#include "gstgtksink.h"
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define FORMATS "{ BGRx, BGRA }"
+#else
+#define FORMATS "{ xRGB, ARGB }"
+#endif
+
+static GstStaticPadTemplate gst_gtk_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (FORMATS))
+    );
+
+#define gst_gtk_sink_parent_class parent_class
+G_DEFINE_TYPE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK);
+
+static void
+gst_gtk_sink_class_init (GstGtkSinkClass * klass)
+{
+  GstElementClass *gstelement_class;
+  GstGtkBaseSinkClass *base_class;
+
+  gstelement_class = (GstElementClass *) klass;
+  base_class = (GstGtkBaseSinkClass *) klass;
+
+  base_class->create_widget = gtk_gst_widget_new;
+  base_class->window_title = "Gtk+ Cairo renderer";
+
+  gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink",
+      "Sink/Video", "A video sink that renders to a GtkWidget",
+      "Matthew Waters <matthew@centricular.com>");
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_gtk_sink_template));
+}
+
+static void
+gst_gtk_sink_init (GstGtkSink * gtk_sink)
+{
+}
diff --git a/ext/gtk/gstgtksink.h b/ext/gtk/gstgtksink.h
new file mode 100644
index 0000000..7dad3b0
--- /dev/null
+++ b/ext/gtk/gstgtksink.h
@@ -0,0 +1,69 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_GTK_SINK_H__
+#define __GST_GTK_SINK_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+
+#include "gstgtkbasesink.h"
+
+#define GST_TYPE_GTK_SINK            (gst_gtk_sink_get_type())
+#define GST_GTK_SINK(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GTK_SINK,GstGtkSink))
+#define GST_GTK_SINK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GTK_SINK,GstGtkSinkClass))
+#define GST_IS_GTK_SINK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GTK_SINK))
+#define GST_IS_GTK_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GTK_SINK))
+#define GST_GTK_SINK_CAST(obj)       ((GstGtkSink*)(obj))
+
+G_BEGIN_DECLS
+
+typedef struct _GstGtkSink GstGtkSink;
+typedef struct _GstGtkSinkClass GstGtkSinkClass;
+
+GType gst_gtk_sink_get_type (void);
+
+/**
+ * GstGtkSink:
+ *
+ * Opaque #GstGtkSink object
+ */
+struct _GstGtkSink
+{
+  /* <private> */
+  GstGtkBaseSink       parent;
+};
+
+/**
+ * GstGtkSinkClass:
+ *
+ * The #GstGtkSinkClass struct only contains private data
+ */
+struct _GstGtkSinkClass
+{
+  /* <private> */
+  GstGtkBaseSinkClass object_class;
+};
+
+G_END_DECLS
+
+#endif /* __GST_GTK_SINK_H__ */
diff --git a/ext/gtk/gstplugin.c b/ext/gtk/gstplugin.c
new file mode 100644
index 0000000..4c5d26b
--- /dev/null
+++ b/ext/gtk/gstplugin.c
@@ -0,0 +1,52 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gstgtksink.h"
+#if defined(HAVE_GTK3_GL)
+#include "gstgtkglsink.h"
+#endif
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  if (!gst_element_register (plugin, "gtksink",
+          GST_RANK_NONE, GST_TYPE_GTK_SINK)) {
+    return FALSE;
+  }
+#if defined(HAVE_GTK3_GL)
+  if (!gst_element_register (plugin, "gtkglsink",
+          GST_RANK_NONE, GST_TYPE_GTK_GL_SINK)) {
+    return FALSE;
+  }
+#endif
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    gstgtk,
+    "Gtk+ sink",
+    plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
diff --git a/ext/gtk/gtkgstbasewidget.c b/ext/gtk/gtkgstbasewidget.c
new file mode 100644
index 0000000..390ac24
--- /dev/null
+++ b/ext/gtk/gtkgstbasewidget.c
@@ -0,0 +1,491 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gtkgstbasewidget.h"
+
+#define DEFAULT_FORCE_ASPECT_RATIO  TRUE
+#define DEFAULT_PAR_N               0
+#define DEFAULT_PAR_D               1
+#define DEFAULT_IGNORE_ALPHA        TRUE
+
+enum
+{
+  PROP_0,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_PIXEL_ASPECT_RATIO,
+  PROP_IGNORE_ALPHA,
+};
+
+static void
+gtk_gst_base_widget_get_preferred_width (GtkWidget * widget, gint * min,
+    gint * natural)
+{
+  GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget;
+  gint video_width = gst_widget->display_width;
+
+  if (!gst_widget->negotiated)
+    video_width = 10;
+
+  if (min)
+    *min = 1;
+  if (natural)
+    *natural = video_width;
+}
+
+static void
+gtk_gst_base_widget_get_preferred_height (GtkWidget * widget, gint * min,
+    gint * natural)
+{
+  GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget;
+  gint video_height = gst_widget->display_height;
+
+  if (!gst_widget->negotiated)
+    video_height = 10;
+
+  if (min)
+    *min = 1;
+  if (natural)
+    *natural = video_height;
+}
+
+static void
+gtk_gst_base_widget_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GtkGstBaseWidget *gtk_widget = GTK_GST_BASE_WIDGET (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+      gtk_widget->force_aspect_ratio = g_value_get_boolean (value);
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      gtk_widget->par_n = gst_value_get_fraction_numerator (value);
+      gtk_widget->par_d = gst_value_get_fraction_denominator (value);
+      break;
+    case PROP_IGNORE_ALPHA:
+      gtk_widget->ignore_alpha = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gtk_gst_base_widget_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GtkGstBaseWidget *gtk_widget = GTK_GST_BASE_WIDGET (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+      g_value_set_boolean (value, gtk_widget->force_aspect_ratio);
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      gst_value_set_fraction (value, gtk_widget->par_n, gtk_widget->par_d);
+      break;
+    case PROP_IGNORE_ALPHA:
+      g_value_set_boolean (value, gtk_widget->ignore_alpha);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+_calculate_par (GtkGstBaseWidget * widget, GstVideoInfo * info)
+{
+  gboolean ok;
+  gint width, height;
+  gint par_n, par_d;
+  gint display_par_n, display_par_d;
+
+  width = GST_VIDEO_INFO_WIDTH (info);
+  height = GST_VIDEO_INFO_HEIGHT (info);
+
+  par_n = GST_VIDEO_INFO_PAR_N (info);
+  par_d = GST_VIDEO_INFO_PAR_D (info);
+
+  if (!par_n)
+    par_n = 1;
+
+  /* get display's PAR */
+  if (widget->par_n != 0 && widget->par_d != 0) {
+    display_par_n = widget->par_n;
+    display_par_d = widget->par_d;
+  } else {
+    display_par_n = 1;
+    display_par_d = 1;
+  }
+
+
+  ok = gst_video_calculate_display_ratio (&widget->display_ratio_num,
+      &widget->display_ratio_den, width, height, par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (ok) {
+    GST_LOG ("PAR: %u/%u DAR:%u/%u", par_n, par_d, display_par_n,
+        display_par_d);
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+static void
+_apply_par (GtkGstBaseWidget * widget)
+{
+  guint display_ratio_num, display_ratio_den;
+  gint width, height;
+
+  width = GST_VIDEO_INFO_WIDTH (&widget->v_info);
+  height = GST_VIDEO_INFO_HEIGHT (&widget->v_info);
+
+  display_ratio_num = widget->display_ratio_num;
+  display_ratio_den = widget->display_ratio_den;
+
+  if (height % display_ratio_den == 0) {
+    GST_DEBUG ("keeping video height");
+    widget->display_width = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    widget->display_height = height;
+  } else if (width % display_ratio_num == 0) {
+    GST_DEBUG ("keeping video width");
+    widget->display_width = width;
+    widget->display_height = (guint)
+        gst_util_uint64_scale_int (width, display_ratio_den, display_ratio_num);
+  } else {
+    GST_DEBUG ("approximating while keeping video height");
+    widget->display_width = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    widget->display_height = height;
+  }
+
+  GST_DEBUG ("scaling to %dx%d", widget->display_width, widget->display_height);
+}
+
+static gboolean
+_queue_draw (GtkGstBaseWidget * widget)
+{
+  GTK_GST_BASE_WIDGET_LOCK (widget);
+  widget->draw_id = 0;
+
+  if (widget->pending_resize) {
+    widget->pending_resize = FALSE;
+
+    widget->v_info = widget->pending_v_info;
+    widget->negotiated = TRUE;
+
+    _apply_par (widget);
+
+    gtk_widget_queue_resize (GTK_WIDGET (widget));
+  } else {
+    gtk_widget_queue_draw (GTK_WIDGET (widget));
+  }
+
+  GTK_GST_BASE_WIDGET_UNLOCK (widget);
+
+  return G_SOURCE_REMOVE;
+}
+
+static const gchar *
+_gdk_key_to_navigation_string (guint keyval)
+{
+  /* TODO: expand */
+  switch (keyval) {
+#define KEY(key) case GDK_KEY_ ## key: return G_STRINGIFY(key)
+      KEY (Up);
+      KEY (Down);
+      KEY (Left);
+      KEY (Right);
+      KEY (Home);
+      KEY (End);
+#undef KEY
+    default:
+      return NULL;
+  }
+}
+
+static gboolean
+gtk_gst_base_widget_key_event (GtkWidget * widget, GdkEventKey * event)
+{
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget);
+  GstElement *element;
+
+  if ((element = g_weak_ref_get (&base_widget->element))) {
+    if (GST_IS_NAVIGATION (element)) {
+      const gchar *str = _gdk_key_to_navigation_string (event->keyval);
+      const gchar *key_type =
+          event->type == GDK_KEY_PRESS ? "key-press" : "key-release";
+
+      if (!str)
+        str = event->string;
+
+      gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str);
+    }
+    g_object_unref (element);
+  }
+
+  return FALSE;
+}
+
+static void
+_fit_stream_to_allocated_size (GtkGstBaseWidget * base_widget,
+    GtkAllocation * allocation, GstVideoRectangle * result)
+{
+  if (base_widget->force_aspect_ratio) {
+    GstVideoRectangle src, dst;
+
+    src.x = 0;
+    src.y = 0;
+    src.w = base_widget->display_width;
+    src.h = base_widget->display_height;
+
+    dst.x = 0;
+    dst.y = 0;
+    dst.w = allocation->width;
+    dst.h = allocation->height;
+
+    gst_video_sink_center_rect (src, dst, result, TRUE);
+  } else {
+    result->x = 0;
+    result->y = 0;
+    result->w = allocation->width;
+    result->h = allocation->height;
+  }
+}
+
+static void
+_display_size_to_stream_size (GtkGstBaseWidget * base_widget, gdouble x,
+    gdouble y, gdouble * stream_x, gdouble * stream_y)
+{
+  gdouble stream_width, stream_height;
+  GtkAllocation allocation;
+  GstVideoRectangle result;
+
+  gtk_widget_get_allocation (GTK_WIDGET (base_widget), &allocation);
+  _fit_stream_to_allocated_size (base_widget, &allocation, &result);
+
+  stream_width = (gdouble) GST_VIDEO_INFO_WIDTH (&base_widget->v_info);
+  stream_height = (gdouble) GST_VIDEO_INFO_HEIGHT (&base_widget->v_info);
+
+  /* from display coordinates to stream coordinates */
+  if (result.w > 0)
+    *stream_x = (x - result.x) / result.w * stream_width;
+  else
+    *stream_x = 0.;
+
+  /* clip to stream size */
+  if (*stream_x < 0.)
+    *stream_x = 0.;
+  if (*stream_x > GST_VIDEO_INFO_WIDTH (&base_widget->v_info))
+    *stream_x = GST_VIDEO_INFO_WIDTH (&base_widget->v_info);
+
+  /* same for y-axis */
+  if (result.h > 0)
+    *stream_y = (y - result.y) / result.h * stream_height;
+  else
+    *stream_y = 0.;
+
+  if (*stream_y < 0.)
+    *stream_y = 0.;
+  if (*stream_y > GST_VIDEO_INFO_HEIGHT (&base_widget->v_info))
+    *stream_y = GST_VIDEO_INFO_HEIGHT (&base_widget->v_info);
+
+  GST_TRACE ("transform %fx%f into %fx%f", x, y, *stream_x, *stream_y);
+}
+
+static gboolean
+gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event)
+{
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget);
+  GstElement *element;
+
+  if ((element = g_weak_ref_get (&base_widget->element))) {
+    if (GST_IS_NAVIGATION (element)) {
+      const gchar *key_type =
+          event->type ==
+          GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release";
+      gdouble x, y;
+
+      _display_size_to_stream_size (base_widget, event->x, event->y, &x, &y);
+
+      gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type,
+          event->button, x, y);
+    }
+    g_object_unref (element);
+  }
+
+  return FALSE;
+}
+
+static gboolean
+gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event)
+{
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget);
+  GstElement *element;
+
+  if ((element = g_weak_ref_get (&base_widget->element))) {
+    if (GST_IS_NAVIGATION (element)) {
+      gdouble x, y;
+
+      _display_size_to_stream_size (base_widget, event->x, event->y, &x, &y);
+
+      gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move",
+          0, x, y);
+    }
+    g_object_unref (element);
+  }
+
+  return FALSE;
+}
+
+void
+gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass)
+{
+  GObjectClass *gobject_klass = (GObjectClass *) klass;
+  GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass;
+
+  gobject_klass->set_property = gtk_gst_base_widget_set_property;
+  gobject_klass->get_property = gtk_gst_base_widget_get_property;
+
+  g_object_class_install_property (gobject_klass, PROP_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio",
+          DEFAULT_FORCE_ASPECT_RATIO,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_klass, PROP_PIXEL_ASPECT_RATIO,
+      gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
+          "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D,
+          G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_klass, PROP_IGNORE_ALPHA,
+      g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
+          "When enabled, alpha will be ignored and converted to black",
+          DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width;
+  widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height;
+  widget_klass->key_press_event = gtk_gst_base_widget_key_event;
+  widget_klass->key_release_event = gtk_gst_base_widget_key_event;
+  widget_klass->button_press_event = gtk_gst_base_widget_button_event;
+  widget_klass->button_release_event = gtk_gst_base_widget_button_event;
+  widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event;
+}
+
+void
+gtk_gst_base_widget_init (GtkGstBaseWidget * widget)
+{
+  int event_mask;
+
+  widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
+  widget->par_n = DEFAULT_PAR_N;
+  widget->par_d = DEFAULT_PAR_D;
+  widget->ignore_alpha = DEFAULT_IGNORE_ALPHA;
+
+  gst_video_info_init (&widget->v_info);
+  gst_video_info_init (&widget->pending_v_info);
+
+  g_weak_ref_init (&widget->element, NULL);
+  g_mutex_init (&widget->lock);
+
+  gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE);
+  event_mask = gtk_widget_get_events (GTK_WIDGET (widget));
+  event_mask |= GDK_KEY_PRESS_MASK
+      | GDK_KEY_RELEASE_MASK
+      | GDK_BUTTON_PRESS_MASK
+      | GDK_BUTTON_RELEASE_MASK
+      | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK;
+  gtk_widget_set_events (GTK_WIDGET (widget), event_mask);
+}
+
+void
+gtk_gst_base_widget_finalize (GObject * object)
+{
+  GtkGstBaseWidget *widget = GTK_GST_BASE_WIDGET (object);
+
+  gst_buffer_replace (&widget->pending_buffer, NULL);
+  gst_buffer_replace (&widget->buffer, NULL);
+  g_mutex_clear (&widget->lock);
+  g_weak_ref_clear (&widget->element);
+
+  if (widget->draw_id)
+    g_source_remove (widget->draw_id);
+}
+
+void
+gtk_gst_base_widget_set_element (GtkGstBaseWidget * widget,
+    GstElement * element)
+{
+  g_weak_ref_set (&widget->element, element);
+}
+
+gboolean
+gtk_gst_base_widget_set_format (GtkGstBaseWidget * widget,
+    GstVideoInfo * v_info)
+{
+  GTK_GST_BASE_WIDGET_LOCK (widget);
+
+  if (gst_video_info_is_equal (&widget->v_info, v_info)) {
+    GTK_GST_BASE_WIDGET_UNLOCK (widget);
+    return TRUE;
+  }
+
+  if (!_calculate_par (widget, v_info)) {
+    GTK_GST_BASE_WIDGET_UNLOCK (widget);
+    return FALSE;
+  }
+
+  widget->pending_resize = TRUE;
+  widget->pending_v_info = *v_info;
+
+  GTK_GST_BASE_WIDGET_UNLOCK (widget);
+
+  return TRUE;
+}
+
+void
+gtk_gst_base_widget_set_buffer (GtkGstBaseWidget * widget, GstBuffer * buffer)
+{
+  /* As we have no type, this is better then no check */
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  GTK_GST_BASE_WIDGET_LOCK (widget);
+
+  gst_buffer_replace (&widget->pending_buffer, buffer);
+
+  if (!widget->draw_id) {
+    widget->draw_id = g_idle_add_full (G_PRIORITY_DEFAULT,
+        (GSourceFunc) _queue_draw, widget, NULL);
+  }
+
+  GTK_GST_BASE_WIDGET_UNLOCK (widget);
+}
diff --git a/ext/gtk/gtkgstbasewidget.h b/ext/gtk/gtkgstbasewidget.h
new file mode 100644
index 0000000..13737c6
--- /dev/null
+++ b/ext/gtk/gtkgstbasewidget.h
@@ -0,0 +1,97 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 __GTK_GST_BASE_WIDGET_H__
+#define __GTK_GST_BASE_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+#define GTK_GST_BASE_WIDGET(w)         ((GtkGstBaseWidget *)(w))
+#define GTK_GST_BASE_WIDGET_CLASS(k)   ((GtkGstBaseWidgetClass *)(k))
+#define GTK_GST_BASE_WIDGET_LOCK(w)    g_mutex_lock(&((GtkGstBaseWidget*)(w))->lock)
+#define GTK_GST_BASE_WIDGET_UNLOCK(w)  g_mutex_unlock(&((GtkGstBaseWidget*)(w))->lock)
+
+G_BEGIN_DECLS
+
+typedef struct _GtkGstBaseWidget GtkGstBaseWidget;
+typedef struct _GtkGstBaseWidgetClass GtkGstBaseWidgetClass;
+
+struct _GtkGstBaseWidget
+{
+  union {
+    GtkDrawingArea drawing_area;
+#if GTK_CHECK_VERSION(3, 15, 0)
+    GtkGLArea gl_area;
+#endif
+  } parent;
+
+  /* properties */
+  gboolean force_aspect_ratio;
+  gint par_n, par_d;
+  gboolean ignore_alpha;
+
+  gint display_width;
+  gint display_height;
+
+  gboolean negotiated;
+  GstBuffer *pending_buffer;
+  GstBuffer *buffer;
+  GstVideoInfo v_info;
+
+  /* resize */
+  gboolean pending_resize;
+  GstVideoInfo pending_v_info;
+  guint display_ratio_num;
+  guint display_ratio_den;
+
+  /*< private >*/
+  GMutex lock;
+  GWeakRef element;
+
+  /* Pending draw idles callback */
+  guint draw_id;
+};
+
+struct _GtkGstBaseWidgetClass
+{
+  union {
+    GtkDrawingAreaClass drawing_area_class;
+#if GTK_CHECK_VERSION(3, 15, 0)
+    GtkGLAreaClass gl_area_class;
+#endif
+  } parent_class;
+};
+
+/* For implementer */
+void            gtk_gst_base_widget_class_init           (GtkGstBaseWidgetClass * klass);
+void            gtk_gst_base_widget_init                 (GtkGstBaseWidget * widget);
+
+void            gtk_gst_base_widget_finalize             (GObject * object);
+
+/* API */
+gboolean        gtk_gst_base_widget_set_format           (GtkGstBaseWidget * widget, GstVideoInfo * v_info);
+void            gtk_gst_base_widget_set_buffer           (GtkGstBaseWidget * widget, GstBuffer * buffer);
+void            gtk_gst_base_widget_set_element          (GtkGstBaseWidget * widget, GstElement * element);
+
+G_END_DECLS
+
+#endif /* __GTK_GST_BASE_WIDGET_H__ */
diff --git a/ext/gtk/gtkgstglwidget.c b/ext/gtk/gtkgstglwidget.c
new file mode 100644
index 0000000..b16725f
--- /dev/null
+++ b/ext/gtk/gtkgstglwidget.c
@@ -0,0 +1,582 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gtkgstglwidget.h"
+#include <gst/video/video.h>
+
+#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (GDK_WINDOWING_X11)
+#include <gdk/gdkx.h>
+#include <gst/gl/x11/gstgldisplay_x11.h>
+#include <gst/gl/x11/gstglcontext_glx.h>
+#endif
+
+#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (GDK_WINDOWING_WAYLAND)
+#include <gdk/gdkwayland.h>
+#include <gst/gl/wayland/gstgldisplay_wayland.h>
+#endif
+
+/**
+ * SECTION:gtkgstglwidget
+ * @short_description: a #GtkGLArea that renders GStreamer video #GstBuffers
+ * @see_also: #GtkGLArea, #GstBuffer
+ *
+ * #GtkGstGLWidget is an #GtkWidget that renders GStreamer video buffers.
+ */
+
+#define GST_CAT_DEFAULT gtk_gst_gl_widget_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+G_DEFINE_TYPE_WITH_CODE (GtkGstGLWidget, gtk_gst_gl_widget, GTK_TYPE_GL_AREA,
+    GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gtkgstglwidget", 0,
+        "Gtk Gst GL Widget");
+    );
+
+#define GTK_GST_GL_WIDGET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+    GTK_TYPE_GST_GL_WIDGET, GtkGstGLWidgetPrivate))
+
+struct _GtkGstGLWidgetPrivate
+{
+  gboolean initted;
+  GstGLDisplay *display;
+  GdkGLContext *gdk_context;
+  GstGLContext *other_context;
+  GstGLContext *context;
+  GstGLUpload *upload;
+  GstGLShader *shader;
+  GLuint vao;
+  GLuint vertex_buffer;
+  GLint attr_position;
+  GLint attr_texture;
+  GLuint current_tex;
+  GstGLOverlayCompositor *overlay_compositor;
+};
+
+static const GLfloat vertices[] = {
+  1.0f, 1.0f, 0.0f, 1.0f, 0.0f,
+  -1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
+  -1.0f, -1.0f, 0.0f, 0.0f, 1.0f,
+  1.0f, -1.0f, 0.0f, 1.0f, 1.0f
+};
+
+static void
+gtk_gst_gl_widget_bind_buffer (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  const GstGLFuncs *gl = priv->context->gl_vtable;
+
+  gl->BindBuffer (GL_ARRAY_BUFFER, priv->vertex_buffer);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (priv->attr_position, 3, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (priv->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (priv->attr_position);
+  gl->EnableVertexAttribArray (priv->attr_texture);
+}
+
+static void
+gtk_gst_gl_widget_unbind_buffer (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  const GstGLFuncs *gl = priv->context->gl_vtable;
+
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (priv->attr_position);
+  gl->DisableVertexAttribArray (priv->attr_texture);
+}
+
+static void
+gtk_gst_gl_widget_init_redisplay (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  const GstGLFuncs *gl = priv->context->gl_vtable;
+
+  priv->shader = gst_gl_shader_new (priv->context);
+
+  gst_gl_shader_compile_with_default_vf_and_check (priv->shader,
+      &priv->attr_position, &priv->attr_texture);
+
+  if (gl->GenVertexArrays) {
+    gl->GenVertexArrays (1, &priv->vao);
+    gl->BindVertexArray (priv->vao);
+  }
+
+  gl->GenBuffers (1, &priv->vertex_buffer);
+  gl->BindBuffer (GL_ARRAY_BUFFER, priv->vertex_buffer);
+  gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+      GL_STATIC_DRAW);
+
+  if (gl->GenVertexArrays) {
+    gtk_gst_gl_widget_bind_buffer (gst_widget);
+    gl->BindVertexArray (0);
+  }
+
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  priv->overlay_compositor =
+      gst_gl_overlay_compositor_new (priv->other_context);
+
+  priv->initted = TRUE;
+}
+
+static void
+_redraw_texture (GtkGstGLWidget * gst_widget, guint tex)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  const GstGLFuncs *gl = priv->context->gl_vtable;
+  const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+  if (gst_widget->base.force_aspect_ratio) {
+    GstVideoRectangle src, dst, result;
+    gint widget_width, widget_height, widget_scale;
+
+    gl->ClearColor (0.0, 0.0, 0.0, 0.0);
+    gl->Clear (GL_COLOR_BUFFER_BIT);
+
+    widget_scale = gtk_widget_get_scale_factor ((GtkWidget *) gst_widget);
+    widget_width = gtk_widget_get_allocated_width ((GtkWidget *) gst_widget);
+    widget_height = gtk_widget_get_allocated_height ((GtkWidget *) gst_widget);
+
+    src.x = 0;
+    src.y = 0;
+    src.w = gst_widget->base.display_width;
+    src.h = gst_widget->base.display_height;
+
+    dst.x = 0;
+    dst.y = 0;
+    dst.w = widget_width * widget_scale;
+    dst.h = widget_height * widget_scale;
+
+    gst_video_sink_center_rect (src, dst, &result, TRUE);
+
+    gl->Viewport (result.x, result.y, result.w, result.h);
+  }
+
+  gst_gl_shader_use (priv->shader);
+
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (priv->vao);
+  else
+    gtk_gst_gl_widget_bind_buffer (gst_widget);
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, tex);
+  gst_gl_shader_set_uniform_1i (priv->shader, "tex", 0);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
+
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (0);
+  else
+    gtk_gst_gl_widget_unbind_buffer (gst_widget);
+
+  gl->BindTexture (GL_TEXTURE_2D, 0);
+}
+
+static inline void
+_draw_black (GstGLContext * context)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
+  gl->Clear (GL_COLOR_BUFFER_BIT);
+}
+
+static gboolean
+gtk_gst_gl_widget_render (GtkGLArea * widget, GdkGLContext * context)
+{
+  GtkGstGLWidgetPrivate *priv = GTK_GST_GL_WIDGET (widget)->priv;
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget);
+
+  GTK_GST_BASE_WIDGET_LOCK (widget);
+
+  if (!priv->context || !priv->other_context)
+    goto done;
+
+  gst_gl_context_activate (priv->other_context, TRUE);
+
+  if (!priv->initted)
+    gtk_gst_gl_widget_init_redisplay (GTK_GST_GL_WIDGET (widget));
+
+  if (!priv->initted || !base_widget->negotiated) {
+    _draw_black (priv->other_context);
+    goto done;
+  }
+
+  /* Upload latest buffer */
+  if (base_widget->pending_buffer) {
+    GstBuffer *buffer = base_widget->pending_buffer;
+    GstVideoFrame gl_frame;
+    GstGLSyncMeta *sync_meta;
+
+    if (!gst_video_frame_map (&gl_frame, &base_widget->v_info, buffer,
+            GST_MAP_READ | GST_MAP_GL)) {
+      _draw_black (priv->other_context);
+      goto done;
+    }
+
+    gst_gl_overlay_compositor_upload_overlays (priv->overlay_compositor,
+        buffer);
+
+    sync_meta = gst_buffer_get_gl_sync_meta (buffer);
+    if (sync_meta) {
+      gst_gl_sync_meta_set_sync_point (sync_meta, priv->context);
+      gst_gl_sync_meta_wait (sync_meta, priv->other_context);
+    }
+
+    priv->current_tex = *(guint *) gl_frame.data[0];
+
+    gst_video_frame_unmap (&gl_frame);
+
+    if (base_widget->buffer)
+      gst_buffer_unref (base_widget->buffer);
+
+    /* Keep the buffer to ensure current_tex stay valid */
+    base_widget->buffer = buffer;
+    base_widget->pending_buffer = NULL;
+  }
+
+  GST_DEBUG ("rendering buffer %p with gdk context %p",
+      base_widget->buffer, context);
+
+  _redraw_texture (GTK_GST_GL_WIDGET (widget), priv->current_tex);
+  gst_gl_overlay_compositor_draw_overlays (priv->overlay_compositor);
+
+done:
+  if (priv->other_context)
+    gst_gl_context_activate (priv->other_context, FALSE);
+
+  GTK_GST_BASE_WIDGET_UNLOCK (widget);
+  return FALSE;
+}
+
+typedef void (*ThreadFunc) (gpointer data);
+
+struct invoke_context
+{
+  ThreadFunc func;
+  gpointer data;
+  GMutex lock;
+  GCond cond;
+  gboolean fired;
+};
+
+static gboolean
+_invoke_func (struct invoke_context *info)
+{
+  g_mutex_lock (&info->lock);
+  info->func (info->data);
+  info->fired = TRUE;
+  g_cond_signal (&info->cond);
+  g_mutex_unlock (&info->lock);
+
+  return G_SOURCE_REMOVE;
+}
+
+static void
+_invoke_on_main (ThreadFunc func, gpointer data)
+{
+  GMainContext *main_context = g_main_context_default ();
+  struct invoke_context info;
+
+  g_mutex_init (&info.lock);
+  g_cond_init (&info.cond);
+  info.fired = FALSE;
+  info.func = func;
+  info.data = data;
+
+  g_main_context_invoke (main_context, (GSourceFunc) _invoke_func, &info);
+
+  g_mutex_lock (&info.lock);
+  while (!info.fired)
+    g_cond_wait (&info.cond, &info.lock);
+  g_mutex_unlock (&info.lock);
+
+  g_mutex_clear (&info.lock);
+  g_cond_clear (&info.cond);
+}
+
+static void
+_reset_gl (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  const GstGLFuncs *gl = priv->other_context->gl_vtable;
+
+  if (!priv->gdk_context)
+    priv->gdk_context = gtk_gl_area_get_context (GTK_GL_AREA (gst_widget));
+
+  if (priv->gdk_context == NULL)
+    return;
+
+  gdk_gl_context_make_current (priv->gdk_context);
+  gst_gl_context_activate (priv->other_context, TRUE);
+
+  if (priv->vao) {
+    gl->DeleteVertexArrays (1, &priv->vao);
+    priv->vao = 0;
+  }
+
+  if (priv->vertex_buffer) {
+    gl->DeleteBuffers (1, &priv->vertex_buffer);
+    priv->vertex_buffer = 0;
+  }
+
+  if (priv->upload) {
+    gst_object_unref (priv->upload);
+    priv->upload = NULL;
+  }
+
+  if (priv->shader) {
+    gst_object_unref (priv->shader);
+    priv->shader = NULL;
+  }
+
+  if (priv->overlay_compositor)
+    gst_object_unref (priv->overlay_compositor);
+
+  gst_gl_context_activate (priv->other_context, FALSE);
+
+  gst_object_unref (priv->other_context);
+  priv->other_context = NULL;
+
+  gdk_gl_context_clear_current ();
+
+  g_object_unref (priv->gdk_context);
+  priv->gdk_context = NULL;
+}
+
+static void
+gtk_gst_gl_widget_finalize (GObject * object)
+{
+  GtkGstGLWidgetPrivate *priv = GTK_GST_GL_WIDGET (object)->priv;
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (object);
+
+  if (priv->other_context)
+    _invoke_on_main ((ThreadFunc) _reset_gl, base_widget);
+
+  if (priv->context)
+    gst_object_unref (priv->context);
+
+  if (priv->display)
+    gst_object_unref (priv->display);
+
+  gtk_gst_base_widget_finalize (object);
+  G_OBJECT_CLASS (gtk_gst_gl_widget_parent_class)->finalize (object);
+}
+
+static void
+gtk_gst_gl_widget_class_init (GtkGstGLWidgetClass * klass)
+{
+  GObjectClass *gobject_klass = (GObjectClass *) klass;
+  GtkGLAreaClass *gl_widget_klass = (GtkGLAreaClass *) klass;
+
+  g_type_class_add_private (klass, sizeof (GtkGstGLWidgetPrivate));
+  gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass));
+
+  gobject_klass->finalize = gtk_gst_gl_widget_finalize;
+  gl_widget_klass->render = gtk_gst_gl_widget_render;
+}
+
+static void
+gtk_gst_gl_widget_init (GtkGstGLWidget * gst_widget)
+{
+  GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (gst_widget);
+  GdkDisplay *display;
+  GtkGstGLWidgetPrivate *priv;
+
+  gtk_gst_base_widget_init (base_widget);
+
+  gst_widget->priv = priv = GTK_GST_GL_WIDGET_GET_PRIVATE (gst_widget);
+
+  display = gdk_display_get_default ();
+
+#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (GDK_WINDOWING_X11)
+  if (GDK_IS_X11_DISPLAY (display))
+    priv->display = (GstGLDisplay *)
+        gst_gl_display_x11_new_with_display (gdk_x11_display_get_xdisplay
+        (display));
+#endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (GDK_WINDOWING_WAYLAND)
+  if (GDK_IS_WAYLAND_DISPLAY (display)) {
+    struct wl_display *wayland_display =
+        gdk_wayland_display_get_wl_display (display);
+    priv->display = (GstGLDisplay *)
+        gst_gl_display_wayland_new_with_display (wayland_display);
+  }
+#endif
+
+  (void) display;
+
+  if (!priv->display)
+    priv->display = gst_gl_display_new ();
+
+  gtk_gl_area_set_has_alpha (GTK_GL_AREA (gst_widget),
+      !base_widget->ignore_alpha);
+}
+
+static void
+_get_gl_context (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  GstGLPlatform platform;
+  GstGLAPI gl_api;
+  guintptr gl_handle;
+
+  gtk_widget_realize (GTK_WIDGET (gst_widget));
+
+  if (priv->gdk_context)
+    g_object_unref (priv->gdk_context);
+  priv->gdk_context = gtk_gl_area_get_context (GTK_GL_AREA (gst_widget));
+  if (priv->gdk_context == NULL) {
+    GError *error = gtk_gl_area_get_error (GTK_GL_AREA (gst_widget));
+
+    GST_ERROR_OBJECT (gst_widget, "Error creating GdkGLContext : %s",
+        error ? error->message : "No error set by Gdk");
+    g_clear_error (&error);
+    g_assert_not_reached ();
+    return;
+  }
+
+  g_object_ref (priv->gdk_context);
+
+  gdk_gl_context_make_current (priv->gdk_context);
+
+#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (GDK_WINDOWING_X11)
+  if (GST_IS_GL_DISPLAY_X11 (priv->display)) {
+    platform = GST_GL_PLATFORM_GLX;
+    gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
+    gl_handle = gst_gl_context_get_current_gl_context (platform);
+    if (gl_handle)
+      priv->other_context =
+          gst_gl_context_new_wrapped (priv->display, gl_handle,
+          platform, gl_api);
+  }
+#endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (GDK_WINDOWING_WAYLAND)
+  if (GST_IS_GL_DISPLAY_WAYLAND (priv->display)) {
+    platform = GST_GL_PLATFORM_EGL;
+    gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
+    gl_handle = gst_gl_context_get_current_gl_context (platform);
+    if (gl_handle)
+      priv->other_context =
+          gst_gl_context_new_wrapped (priv->display, gl_handle,
+          platform, gl_api);
+  }
+#endif
+
+  (void) platform;
+  (void) gl_api;
+  (void) gl_handle;
+
+  if (priv->other_context) {
+    GError *error = NULL;
+
+    gst_gl_context_activate (priv->other_context, TRUE);
+    if (!gst_gl_context_fill_info (priv->other_context, &error)) {
+      GST_ERROR ("failed to retrieve gdk context info: %s", error->message);
+      g_clear_error (&error);
+      g_object_unref (priv->other_context);
+      priv->other_context = NULL;
+    } else {
+      gst_gl_context_activate (priv->other_context, FALSE);
+    }
+  }
+}
+
+GtkWidget *
+gtk_gst_gl_widget_new (void)
+{
+  return (GtkWidget *) g_object_new (GTK_TYPE_GST_GL_WIDGET, NULL);
+}
+
+gboolean
+gtk_gst_gl_widget_init_winsys (GtkGstGLWidget * gst_widget)
+{
+  GtkGstGLWidgetPrivate *priv = gst_widget->priv;
+  GError *error = NULL;
+
+  g_return_val_if_fail (GTK_IS_GST_GL_WIDGET (gst_widget), FALSE);
+
+  GTK_GST_BASE_WIDGET_LOCK (gst_widget);
+
+  if (priv->display && priv->gdk_context && priv->other_context) {
+    GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+    return TRUE;
+  }
+
+  if (!priv->other_context) {
+    GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+    _invoke_on_main ((ThreadFunc) _get_gl_context, gst_widget);
+    GTK_GST_BASE_WIDGET_LOCK (gst_widget);
+  }
+
+  if (!GST_GL_IS_CONTEXT (priv->other_context)) {
+    GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+    return FALSE;
+  }
+
+  if (!gst_gl_display_create_context (priv->display, priv->other_context,
+          &priv->context, &error)) {
+    g_clear_error (&error);
+    GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+    return FALSE;
+  }
+
+  GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+  return TRUE;
+}
+
+GstGLContext *
+gtk_gst_gl_widget_get_gtk_context (GtkGstGLWidget * gst_widget)
+{
+  if (!gst_widget->priv->other_context)
+    return NULL;
+
+  return gst_object_ref (gst_widget->priv->other_context);
+}
+
+GstGLContext *
+gtk_gst_gl_widget_get_context (GtkGstGLWidget * gst_widget)
+{
+  if (!gst_widget->priv->context)
+    return NULL;
+
+  return gst_object_ref (gst_widget->priv->context);
+}
+
+GstGLDisplay *
+gtk_gst_gl_widget_get_display (GtkGstGLWidget * gst_widget)
+{
+  if (!gst_widget->priv->display)
+    return NULL;
+
+  return gst_object_ref (gst_widget->priv->display);
+}
diff --git a/ext/gtk/gtkgstglwidget.h b/ext/gtk/gtkgstglwidget.h
new file mode 100644
index 0000000..7f055c4
--- /dev/null
+++ b/ext/gtk/gtkgstglwidget.h
@@ -0,0 +1,77 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 __GTK_GST_GL_WIDGET_H__
+#define __GTK_GST_GL_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+#include <gst/gl/gl.h>
+
+#include "gtkgstbasewidget.h"
+
+G_BEGIN_DECLS
+
+GType gtk_gst_gl_widget_get_type (void);
+#define GTK_TYPE_GST_GL_WIDGET (gtk_gst_gl_widget_get_type())
+#define GTK_GST_GL_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GTK_TYPE_GST_GL_WIDGET,GtkGstGLWidget))
+#define GTK_GST_GL_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GTK_TYPE_GST_GL_WIDGET,GtkGstGLWidgetClass))
+#define GTK_IS_GST_GL_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GTK_TYPE_GST_GL_WIDGET))
+#define GTK_IS_GST_GL_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GTK_TYPE_GST_GL_WIDGET))
+#define GTK_GST_GL_WIDGET_CAST(obj) ((GtkGstGLWidget*)(obj))
+
+typedef struct _GtkGstGLWidget GtkGstGLWidget;
+typedef struct _GtkGstGLWidgetClass GtkGstGLWidgetClass;
+typedef struct _GtkGstGLWidgetPrivate GtkGstGLWidgetPrivate;
+
+/**
+ * GtkGstGLWidget:
+ *
+ * Opaque #GtkGstGLWidget object
+ */
+struct _GtkGstGLWidget
+{
+  /* <private> */
+  GtkGstBaseWidget base;
+
+  GtkGstGLWidgetPrivate   *priv;
+};
+
+/**
+ * GtkGstGLWidgetClass:
+ *
+ * The #GtkGstGLWidgetClass struct only contains private data
+ */
+struct _GtkGstGLWidgetClass
+{
+  /* <private> */
+  GtkGstBaseWidgetClass base_class;
+};
+
+GtkWidget *     gtk_gst_gl_widget_new (void);
+
+gboolean        gtk_gst_gl_widget_init_winsys          (GtkGstGLWidget * widget);
+GstGLDisplay *  gtk_gst_gl_widget_get_display          (GtkGstGLWidget * widget);
+GstGLContext *  gtk_gst_gl_widget_get_context          (GtkGstGLWidget * widget);
+GstGLContext *  gtk_gst_gl_widget_get_gtk_context      (GtkGstGLWidget * widget);
+
+G_END_DECLS
+
+#endif /* __GTK_GST_GL_WIDGET_H__ */
diff --git a/ext/gtk/gtkgstwidget.c b/ext/gtk/gtkgstwidget.c
new file mode 100644
index 0000000..5fe238a
--- /dev/null
+++ b/ext/gtk/gtkgstwidget.c
@@ -0,0 +1,190 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gtkgstwidget.h"
+#include <gst/video/video.h>
+
+/**
+ * SECTION:gtkgstwidget
+ * @short_description: a #GtkWidget that renders GStreamer video #GstBuffers
+ * @see_also: #GtkDrawingArea, #GstBuffer
+ *
+ * #GtkGstWidget is an #GtkWidget that renders GStreamer video buffers.
+ */
+
+G_DEFINE_TYPE (GtkGstWidget, gtk_gst_widget, GTK_TYPE_DRAWING_AREA);
+
+static gboolean
+gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr)
+{
+  GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget;
+  guint widget_width, widget_height;
+  cairo_surface_t *surface;
+  GstVideoFrame frame;
+
+  widget_width = gtk_widget_get_allocated_width (widget);
+  widget_height = gtk_widget_get_allocated_height (widget);
+
+  GTK_GST_BASE_WIDGET_LOCK (gst_widget);
+
+  /* There is not much to optimize in term of redisplay, so simply swap the
+   * pending_buffer with the active buffer */
+  if (gst_widget->pending_buffer) {
+    if (gst_widget->buffer)
+      gst_buffer_unref (gst_widget->buffer);
+    gst_widget->buffer = gst_widget->pending_buffer;
+    gst_widget->pending_buffer = NULL;
+  }
+
+  /* failed to map the video frame */
+  if (gst_widget->negotiated && gst_widget->buffer
+      && gst_video_frame_map (&frame, &gst_widget->v_info,
+          gst_widget->buffer, GST_MAP_READ)) {
+    gdouble scale_x = (gdouble) widget_width / gst_widget->display_width;
+    gdouble scale_y = (gdouble) widget_height / gst_widget->display_height;
+    GstVideoRectangle result;
+    cairo_format_t format;
+
+    gst_widget->v_info = frame.info;
+    if (frame.info.finfo->format == GST_VIDEO_FORMAT_ARGB ||
+        frame.info.finfo->format == GST_VIDEO_FORMAT_BGRA) {
+      format = CAIRO_FORMAT_ARGB32;
+    } else {
+      format = CAIRO_FORMAT_RGB24;
+    }
+
+    surface = cairo_image_surface_create_for_data (frame.data[0],
+        format, frame.info.width, frame.info.height, frame.info.stride[0]);
+
+    if (gst_widget->force_aspect_ratio) {
+      GstVideoRectangle src, dst;
+
+      src.x = 0;
+      src.y = 0;
+      src.w = gst_widget->display_width;
+      src.h = gst_widget->display_height;
+
+      dst.x = 0;
+      dst.y = 0;
+      dst.w = widget_width;
+      dst.h = widget_height;
+
+      gst_video_sink_center_rect (src, dst, &result, TRUE);
+
+      scale_x = scale_y = MIN (scale_x, scale_y);
+    } else {
+      result.x = 0;
+      result.y = 0;
+      result.w = widget_width;
+      result.h = widget_height;
+    }
+
+    if (gst_widget->ignore_alpha) {
+      GdkRGBA color = { 0.0, 0.0, 0.0, 1.0 };
+
+      gdk_cairo_set_source_rgba (cr, &color);
+      if (result.x > 0) {
+        cairo_rectangle (cr, 0, 0, result.x, widget_height);
+        cairo_fill (cr);
+      }
+      if (result.y > 0) {
+        cairo_rectangle (cr, 0, 0, widget_width, result.y);
+        cairo_fill (cr);
+      }
+      if (result.w < widget_width) {
+        cairo_rectangle (cr, result.x + result.w, 0, widget_width - result.w,
+            widget_height);
+        cairo_fill (cr);
+      }
+      if (result.h < widget_height) {
+        cairo_rectangle (cr, 0, result.y + result.h, widget_width,
+            widget_height - result.h);
+        cairo_fill (cr);
+      }
+    }
+
+    scale_x *= (gdouble) gst_widget->display_width / (gdouble) frame.info.width;
+    scale_y *=
+        (gdouble) gst_widget->display_height / (gdouble) frame.info.height;
+
+    cairo_translate (cr, result.x, result.y);
+    cairo_scale (cr, scale_x, scale_y);
+    cairo_rectangle (cr, 0, 0, result.w, result.h);
+    cairo_set_source_surface (cr, surface, 0, 0);
+    cairo_paint (cr);
+
+    cairo_surface_destroy (surface);
+
+    gst_video_frame_unmap (&frame);
+  } else {
+    GdkRGBA color;
+
+    if (gst_widget->ignore_alpha) {
+      color.red = color.blue = color.green = 0.0;
+      color.alpha = 1.0;
+    } else {
+      gtk_style_context_get_color (gtk_widget_get_style_context (widget),
+          GTK_STATE_FLAG_NORMAL, &color);
+    }
+    gdk_cairo_set_source_rgba (cr, &color);
+    cairo_rectangle (cr, 0, 0, widget_width, widget_height);
+    cairo_fill (cr);
+  }
+
+  GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+  return FALSE;
+}
+
+static void
+gtk_gst_widget_finalize (GObject * object)
+{
+  gtk_gst_base_widget_finalize (object);
+
+  G_OBJECT_CLASS (gtk_gst_widget_parent_class)->finalize (object);
+}
+
+static void
+gtk_gst_widget_class_init (GtkGstWidgetClass * klass)
+{
+  GObjectClass *gobject_klass = (GObjectClass *) klass;
+  GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass;
+
+  gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass));
+  gobject_klass->finalize = gtk_gst_widget_finalize;
+  widget_klass->draw = gtk_gst_widget_draw;
+}
+
+static void
+gtk_gst_widget_init (GtkGstWidget * widget)
+{
+  gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget));
+}
+
+GtkWidget *
+gtk_gst_widget_new (void)
+{
+  return (GtkWidget *) g_object_new (GTK_TYPE_GST_WIDGET, NULL);
+}
diff --git a/ext/gtk/gtkgstwidget.h b/ext/gtk/gtkgstwidget.h
new file mode 100644
index 0000000..427eeba
--- /dev/null
+++ b/ext/gtk/gtkgstwidget.h
@@ -0,0 +1,68 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 __GTK_GST_WIDGET_H__
+#define __GTK_GST_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+
+#include "gtkgstbasewidget.h"
+
+G_BEGIN_DECLS
+
+GType gtk_gst_widget_get_type (void);
+#define GTK_TYPE_GST_WIDGET (gtk_gst_widget_get_type())
+#define GTK_GST_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GTK_TYPE_GST_WIDGET,GtkGstWidget))
+#define GTK_GST_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GTK_TYPE_GST_WIDGET,GtkGstWidgetClass))
+#define GTK_IS_GST_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GTK_TYPE_GST_WIDGET))
+#define GST_IS_GST_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GTK_TYPE_GST_WIDGET))
+#define GTK_GST_WIDGET_CAST(obj) ((GtkGstWidget*)(obj))
+
+typedef struct _GtkGstWidget GtkGstWidget;
+typedef struct _GtkGstWidgetClass GtkGstWidgetClass;
+
+/**
+ * GtkGstWidget:
+ *
+ * Opaque #GtkGstWidget object
+ */
+struct _GtkGstWidget
+{
+  /* <private> */
+  GtkGstBaseWidget base;
+};
+
+/**
+ * GtkGstWidgetClass:
+ *
+ * The #GtkGstWidgetClass struct only contains private data
+ */
+struct _GtkGstWidgetClass
+{
+  /* <private> */
+  GtkGstBaseWidgetClass base_class;
+};
+
+GtkWidget *     gtk_gst_widget_new (void);
+
+G_END_DECLS
+
+#endif /* __GTK_GST_WIDGET_H__ */
diff --git a/ext/hls/Makefile.am b/ext/hls/Makefile.am
index cedf183..f66880f 100644
--- a/ext/hls/Makefile.am
+++ b/ext/hls/Makefile.am
@@ -11,8 +11,9 @@
 libgstfragmented_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) $(LIBGCRYPT_CFLAGS) $(NETTLE_CFLAGS)
 libgstfragmented_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
+        $(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
 	$(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
-	$(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) $(LIBM) $(LIBGCRYPT_LIBS) $(NETTLE_LIBS)
+	$(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) $(LIBM) $(LIBGCRYPT_LIBS) $(NETTLE_LIBS) $(OPENSSL_LIBS)
 libgstfragmented_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -no-undefined
 libgstfragmented_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
@@ -23,17 +24,3 @@
 	gsthlssink.h			\
 	gstm3u8playlist.h		\
 	m3u8.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsthls -:SHARED libgsthls \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsthls_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsthls_la_CFLAGS) \
-	 -:LDFLAGS $(libgsthls_la_LDFLAGS) \
-	           $(libgsthls_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/ext/hls/Makefile.in b/ext/hls/Makefile.in
index 02c0432..81c5e97 100644
--- a/ext/hls/Makefile.in
+++ b/ext/hls/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/hls
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -155,10 +165,11 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstfragmented_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
+	$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@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_libgstfragmented_la_OBJECTS = libgstfragmented_la-m3u8.lo \
 	libgstfragmented_la-gsthlsdemux.lo \
 	libgstfragmented_la-gstfragmentedplugin.lo \
@@ -234,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -251,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -277,8 +291,6 @@
 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@
@@ -291,7 +303,6 @@
 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@
@@ -299,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -325,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -348,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -408,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -428,7 +446,6 @@
 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@
@@ -437,7 +454,6 @@
 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@
@@ -450,7 +466,6 @@
 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@
@@ -464,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -475,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -513,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -548,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -577,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -584,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -613,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -623,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -653,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -680,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -718,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -742,8 +778,9 @@
 libgstfragmented_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS) $(LIBGCRYPT_CFLAGS) $(NETTLE_CFLAGS)
 libgstfragmented_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \
+        $(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
 	$(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
-	$(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) $(LIBM) $(LIBGCRYPT_LIBS) $(NETTLE_LIBS)
+	$(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS) $(LIBM) $(LIBGCRYPT_LIBS) $(NETTLE_LIBS) $(OPENSSL_LIBS)
 
 libgstfragmented_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -no-undefined
 libgstfragmented_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
@@ -772,7 +809,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/hls/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/hls/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1113,20 +1149,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsthls -:SHARED libgsthls \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsthls_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsthls_la_CFLAGS) \
-	 -:LDFLAGS $(libgsthls_la_LDFLAGS) \
-	           $(libgsthls_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index b11d07e..91178e2 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -31,7 +31,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch souphttpsrc location=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 ! hlsdemux ! decodebin2 ! videoconvert ! videoscale ! autovideosink
+ * gst-launch-1.0 souphttpsrc location=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 ! hlsdemux ! decodebin ! videoconvert ! videoscale ! autovideosink
  * ]|
  * </refsect2>
  */
@@ -44,15 +44,6 @@
 #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,
@@ -71,15 +62,10 @@
   PROP_0,
 
   PROP_FRAGMENTS_CACHE,
-  PROP_BITRATE_LIMIT,
-  PROP_CONNECTION_SPEED,
   PROP_LAST
 };
 
 #define DEFAULT_FRAGMENTS_CACHE 1
-#define DEFAULT_FAILED_COUNT 3
-#define DEFAULT_BITRATE_LIMIT 0.8
-#define DEFAULT_CONNECTION_SPEED    0
 
 /* GObject */
 static void gst_hls_demux_set_property (GObject * object, guint prop_id,
@@ -92,33 +78,15 @@
 static GstStateChangeReturn
 gst_hls_demux_change_state (GstElement * element, GstStateChange transition);
 
-static void gst_hls_demux_handle_message (GstBin * bin, GstMessage * msg);
-
 /* GstHLSDemux */
-static GstFlowReturn gst_hls_demux_chain (GstPad * pad, GstObject * parent,
-    GstBuffer * buf);
-static gboolean gst_hls_demux_sink_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_hls_demux_src_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_hls_demux_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query);
-static void gst_hls_demux_stream_loop (GstHLSDemux * demux);
-static void gst_hls_demux_updates_loop (GstHLSDemux * demux);
-static void gst_hls_demux_stop (GstHLSDemux * demux);
-static void gst_hls_demux_pause_tasks (GstHLSDemux * demux);
-static gboolean gst_hls_demux_switch_playlist (GstHLSDemux * demux);
-static gboolean gst_hls_demux_get_next_fragment (GstHLSDemux * demux,
-    gboolean * end_of_playlist, GError ** err);
 static gboolean gst_hls_demux_update_playlist (GstHLSDemux * demux,
     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 * base_uri);
 static gchar *gst_hls_src_buf_to_utf8_playlist (GstBuffer * buf);
 
 static gboolean gst_hls_demux_change_playlist (GstHLSDemux * demux,
-    guint max_bitrate);
+    guint max_bitrate, gboolean * changed);
 static GstBuffer *gst_hls_demux_decrypt_fragment (GstHLSDemux * demux,
     GstBuffer * encrypted_buffer, GError ** err);
 static gboolean
@@ -126,44 +94,43 @@
     const guint8 * iv_data);
 static void gst_hls_demux_decrypt_end (GstHLSDemux * demux);
 
+static gboolean gst_hls_demux_is_live (GstAdaptiveDemux * demux);
+static GstClockTime gst_hls_demux_get_duration (GstAdaptiveDemux * demux);
+static gint64 gst_hls_demux_get_manifest_update_interval (GstAdaptiveDemux *
+    demux);
+static gboolean gst_hls_demux_process_manifest (GstAdaptiveDemux * demux,
+    GstBuffer * buf);
+static GstFlowReturn gst_hls_demux_update_manifest (GstAdaptiveDemux * demux);
+static gboolean gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek);
+static gboolean
+gst_hls_demux_start_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static GstFlowReturn gst_hls_demux_finish_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static GstFlowReturn gst_hls_demux_data_received (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static gboolean gst_hls_demux_stream_has_next_fragment (GstAdaptiveDemuxStream *
+    stream);
+static GstFlowReturn gst_hls_demux_advance_fragment (GstAdaptiveDemuxStream *
+    stream);
+static GstFlowReturn gst_hls_demux_update_fragment_info (GstAdaptiveDemuxStream
+    * stream);
+static gboolean gst_hls_demux_select_bitrate (GstAdaptiveDemuxStream * stream,
+    guint64 bitrate);
+static void gst_hls_demux_reset (GstAdaptiveDemux * demux);
+static gboolean gst_hls_demux_get_live_seek_range (GstAdaptiveDemux * demux,
+    gint64 * start, gint64 * stop);
+
 #define gst_hls_demux_parent_class parent_class
-G_DEFINE_TYPE (GstHLSDemux, gst_hls_demux, GST_TYPE_BIN);
+G_DEFINE_TYPE (GstHLSDemux, gst_hls_demux, GST_TYPE_ADAPTIVE_DEMUX);
 
 static void
 gst_hls_demux_dispose (GObject * obj)
 {
   GstHLSDemux *demux = GST_HLS_DEMUX (obj);
 
-  if (demux->stream_task) {
-    gst_object_unref (demux->stream_task);
-    g_rec_mutex_clear (&demux->stream_lock);
-    demux->stream_task = NULL;
-  }
-
-  if (demux->updates_task) {
-    gst_object_unref (demux->updates_task);
-    g_rec_mutex_clear (&demux->updates_lock);
-    demux->updates_task = NULL;
-  }
-
-  if (demux->downloader != NULL) {
-    g_object_unref (demux->downloader);
-    demux->downloader = NULL;
-  }
-
-  gst_hls_demux_reset (demux, TRUE);
-
-  if (demux->src_srcpad) {
-    gst_object_unref (demux->src_srcpad);
-    demux->src_srcpad = NULL;
-  }
-
-  g_mutex_clear (&demux->download_lock);
-  g_cond_clear (&demux->download_cond);
-  g_mutex_clear (&demux->updates_timed_lock);
-  g_cond_clear (&demux->updates_timed_cond);
-  g_mutex_clear (&demux->fragment_download_lock);
-  g_cond_clear (&demux->fragment_download_cond);
+  gst_hls_demux_reset (GST_ADAPTIVE_DEMUX_CAST (demux));
+  gst_m3u8_client_free (demux->client);
 
   G_OBJECT_CLASS (parent_class)->dispose (obj);
 }
@@ -173,35 +140,24 @@
 {
   GObjectClass *gobject_class;
   GstElementClass *element_class;
-  GstBinClass *bin_class;
+  GstAdaptiveDemuxClass *adaptivedemux_class;
 
   gobject_class = (GObjectClass *) klass;
   element_class = (GstElementClass *) klass;
-  bin_class = (GstBinClass *) klass;
+  adaptivedemux_class = (GstAdaptiveDemuxClass *) klass;
 
   gobject_class->set_property = gst_hls_demux_set_property;
   gobject_class->get_property = gst_hls_demux_get_property;
   gobject_class->dispose = gst_hls_demux_dispose;
 
+#ifndef GST_REMOVE_DEPRECATED
   g_object_class_install_property (gobject_class, PROP_FRAGMENTS_CACHE,
       g_param_spec_uint ("fragments-cache", "Fragments cache",
           "Number of fragments needed to be cached to start playing "
           "(DEPRECATED: Has no effect since 1.3.1)",
           1, G_MAXUINT, DEFAULT_FRAGMENTS_CACHE,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_BITRATE_LIMIT,
-      g_param_spec_float ("bitrate-limit",
-          "Bitrate limit in %",
-          "Limit of the available bitrate to use when switching to alternates.",
-          0, 1, DEFAULT_BITRATE_LIMIT,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
-      g_param_spec_uint ("connection-speed", "Connection Speed",
-          "Network connection speed in kbps (0 = unknown)",
-          0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+#endif
 
   element_class->change_state = GST_DEBUG_FUNCPTR (gst_hls_demux_change_state);
 
@@ -218,7 +174,25 @@
       "Marc-Andre Lureau <marcandre.lureau@gmail.com>\n"
       "Andoni Morales Alastruey <ylatuya@gmail.com>");
 
-  bin_class->handle_message = gst_hls_demux_handle_message;
+  adaptivedemux_class->is_live = gst_hls_demux_is_live;
+  adaptivedemux_class->get_live_seek_range = gst_hls_demux_get_live_seek_range;
+  adaptivedemux_class->get_duration = gst_hls_demux_get_duration;
+  adaptivedemux_class->get_manifest_update_interval =
+      gst_hls_demux_get_manifest_update_interval;
+  adaptivedemux_class->process_manifest = gst_hls_demux_process_manifest;
+  adaptivedemux_class->update_manifest = gst_hls_demux_update_manifest;
+  adaptivedemux_class->reset = gst_hls_demux_reset;
+  adaptivedemux_class->seek = gst_hls_demux_seek;
+  adaptivedemux_class->stream_has_next_fragment =
+      gst_hls_demux_stream_has_next_fragment;
+  adaptivedemux_class->stream_advance_fragment = gst_hls_demux_advance_fragment;
+  adaptivedemux_class->stream_update_fragment_info =
+      gst_hls_demux_update_fragment_info;
+  adaptivedemux_class->stream_select_bitrate = gst_hls_demux_select_bitrate;
+
+  adaptivedemux_class->start_fragment = gst_hls_demux_start_fragment;
+  adaptivedemux_class->finish_fragment = gst_hls_demux_finish_fragment;
+  adaptivedemux_class->data_received = gst_hls_demux_data_received;
 
   GST_DEBUG_CATEGORY_INIT (gst_hls_demux_debug, "hlsdemux", 0,
       "hlsdemux element");
@@ -227,61 +201,16 @@
 static void
 gst_hls_demux_init (GstHLSDemux * demux)
 {
-  /* sink pad */
-  demux->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
-  gst_pad_set_chain_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_hls_demux_chain));
-  gst_pad_set_event_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_hls_demux_sink_event));
-  gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
-
-  /* Downloader */
-  demux->downloader = gst_uri_downloader_new ();
-
   demux->do_typefind = TRUE;
-
-  /* Properties */
-  demux->bitrate_limit = DEFAULT_BITRATE_LIMIT;
-  demux->connection_speed = DEFAULT_CONNECTION_SPEED;
-
-  g_mutex_init (&demux->download_lock);
-  g_cond_init (&demux->download_cond);
-  g_mutex_init (&demux->updates_timed_lock);
-  g_cond_init (&demux->updates_timed_cond);
-  g_mutex_init (&demux->fragment_download_lock);
-  g_cond_init (&demux->fragment_download_cond);
-
-  /* Updates task */
-  g_rec_mutex_init (&demux->updates_lock);
-  demux->updates_task =
-      gst_task_new ((GstTaskFunction) gst_hls_demux_updates_loop, demux, NULL);
-  gst_task_set_lock (demux->updates_task, &demux->updates_lock);
-
-  /* Streaming task */
-  g_rec_mutex_init (&demux->stream_lock);
-  demux->stream_task =
-      gst_task_new ((GstTaskFunction) gst_hls_demux_stream_loop, demux, NULL);
-  gst_task_set_lock (demux->stream_task, &demux->stream_lock);
-
-  demux->have_group_id = FALSE;
-  demux->group_id = G_MAXUINT;
 }
 
 static void
 gst_hls_demux_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstHLSDemux *demux = GST_HLS_DEMUX (object);
-
   switch (prop_id) {
     case PROP_FRAGMENTS_CACHE:
       break;
-    case PROP_BITRATE_LIMIT:
-      demux->bitrate_limit = g_value_get_float (value);
-      break;
-    case PROP_CONNECTION_SPEED:
-      demux->connection_speed = g_value_get_uint (value) * 1000;
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -292,18 +221,10 @@
 gst_hls_demux_get_property (GObject * object, guint prop_id, GValue * value,
     GParamSpec * pspec)
 {
-  GstHLSDemux *demux = GST_HLS_DEMUX (object);
-
   switch (prop_id) {
     case PROP_FRAGMENTS_CACHE:
       g_value_set_uint (value, 1);
       break;
-    case PROP_BITRATE_LIMIT:
-      g_value_set_float (value, demux->bitrate_limit);
-      break;
-    case PROP_CONNECTION_SPEED:
-      g_value_set_uint (value, demux->connection_speed / 1000);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -318,11 +239,7 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-      gst_hls_demux_reset (demux, FALSE);
-      gst_uri_downloader_reset (demux->downloader);
-      break;
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      demux->adapter = gst_adapter_new ();
+      gst_hls_demux_reset (GST_ADAPTIVE_DEMUX_CAST (demux));
       break;
     default:
       break;
@@ -332,14 +249,7 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_hls_demux_stop (demux);
-      gst_task_join (demux->updates_task);
-      gst_task_join (demux->stream_task);
-      gst_hls_demux_reset (demux, FALSE);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_object_unref (demux->adapter);
-      demux->adapter = NULL;
+      gst_hls_demux_reset (GST_ADAPTIVE_DEMUX_CAST (demux));
       break;
     default:
       break;
@@ -347,950 +257,520 @@
   return ret;
 }
 
-static void
-gst_hls_demux_handle_message (GstBin * bin, GstMessage * msg)
+static GstPad *
+gst_hls_demux_create_pad (GstHLSDemux * hlsdemux)
 {
-  GstHLSDemux *demux = GST_HLS_DEMUX_CAST (bin);
+  gchar *name;
+  GstPadTemplate *tmpl;
+  GstPad *pad;
 
-  switch (GST_MESSAGE_TYPE (msg)) {
-    case GST_MESSAGE_ERROR:{
-      GError *err = NULL;
-      gchar *debug = NULL;
-      gchar *new_error = NULL;
+  name = g_strdup_printf ("src_%u", hlsdemux->srcpad_counter++);
+  tmpl = gst_static_pad_template_get (&srctemplate);
+  pad = gst_ghost_pad_new_no_target_from_template (name, tmpl);
+  gst_object_unref (tmpl);
+  g_free (name);
 
-      gst_message_parse_error (msg, &err, &debug);
+  return pad;
+}
 
-      GST_WARNING_OBJECT (demux, "Source posted error: %d:%d %s (%s)",
-          err->domain, err->code, err->message, debug);
+static guint64
+gst_hls_demux_get_bitrate (GstHLSDemux * hlsdemux)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (hlsdemux);
 
-      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);
-
-      g_error_free (err);
-      g_free (debug);
-      gst_message_unref (msg);
-      msg = NULL;
-    }
-      break;
-    default:
-      break;
+  /* Valid because hlsdemux only has a single output */
+  if (demux->streams) {
+    GstAdaptiveDemuxStream *stream = demux->streams->data;
+    return stream->current_download_rate;
   }
 
-  if (msg)
-    GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
+  return 0;
 }
 
 static gboolean
-gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
 {
-  GstHLSDemux *demux;
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+  GstFormat format;
+  GstSeekFlags flags;
+  GstSeekType start_type, stop_type;
+  gint64 start, stop;
+  gdouble rate;
+  GList *walk, *current_file = NULL;
+  GstClockTime current_pos, target_pos;
+  gint64 current_sequence;
+  GstM3U8MediaFile *file;
+  guint64 bitrate;
 
-  demux = GST_HLS_DEMUX (parent);
+  gst_event_parse_seek (seek, &rate, &format, &flags, &start_type, &start,
+      &stop_type, &stop);
 
-  switch (event->type) {
-    case GST_EVENT_SEEK:
-    {
-      gdouble rate;
-      GstFormat format;
-      GstSeekFlags flags;
-      GstSeekType start_type, stop_type;
-      gint64 start, stop;
-      GList *walk;
-      GstClockTime current_pos, target_pos;
-      gint64 current_sequence;
-      GstM3U8MediaFile *file;
+  bitrate = gst_hls_demux_get_bitrate (hlsdemux);
 
-      GST_INFO_OBJECT (demux, "Received GST_EVENT_SEEK");
-
-      if (gst_m3u8_client_is_live (demux->client)) {
-        GST_WARNING_OBJECT (demux, "Received seek event for live stream");
-        gst_event_unref (event);
-        return FALSE;
-      }
-
-      gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
-          &stop_type, &stop);
-
-      if (format != GST_FORMAT_TIME) {
-        gst_event_unref (event);
-        return FALSE;
-      }
-
-      if ((rate > 1.0 || rate < -1.0) && (!demux->client->main
-              || !demux->client->main->iframe_lists)) {
-        GST_ERROR_OBJECT (demux,
-            "Trick modes only allowed for streams with I-frame lists");
-        gst_event_unref (event);
-        return FALSE;
-      }
-
-      GST_DEBUG_OBJECT (demux, "seek event, rate: %f start: %" GST_TIME_FORMAT
-          " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start),
-          GST_TIME_ARGS (stop));
-
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        GST_DEBUG_OBJECT (demux, "sending flush start");
-        gst_pad_push_event (demux->srcpad, gst_event_new_flush_start ());
-      }
-
-      gst_hls_demux_pause_tasks (demux);
-
-      /* wait for streaming to finish */
-      g_rec_mutex_lock (&demux->updates_lock);
-      g_rec_mutex_unlock (&demux->updates_lock);
-
-      g_rec_mutex_lock (&demux->stream_lock);
-
-      /* properly cleanup pending decryption status */
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        if (demux->adapter)
-          gst_adapter_clear (demux->adapter);
-        if (demux->pending_buffer)
-          gst_buffer_unref (demux->pending_buffer);
-        demux->pending_buffer = NULL;
-        gst_hls_demux_decrypt_end (demux);
-      }
-
-      /* Use I-frame variants for trick modes */
-      if ((rate > 1.0 || rate < -1.0) && demux->segment.rate >= -1.0
-          && demux->segment.rate <= 1.0) {
-        GError *err = NULL;
-
-        GST_M3U8_CLIENT_LOCK (demux->client);
-        /* Switch to I-frame variant */
-        demux->client->main->current_variant =
-            demux->client->main->iframe_lists;
-        GST_M3U8_CLIENT_UNLOCK (demux->client);
-        gst_m3u8_client_set_current (demux->client,
-            demux->client->main->iframe_lists->data);
-        gst_uri_downloader_reset (demux->downloader);
-        if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-          g_rec_mutex_unlock (&demux->stream_lock);
-          GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not switch playlist",
-              err);
-          gst_event_unref (event);
-          return FALSE;
-        }
-        demux->discont = TRUE;
-        demux->new_playlist = TRUE;
-        demux->do_typefind = TRUE;
-        demux->end_of_playlist = FALSE;
-
-        gst_hls_demux_change_playlist (demux,
-            demux->current_download_rate * demux->bitrate_limit / ABS (rate));
-      } else if (rate > -1.0 && rate <= 1.0 && (demux->segment.rate < -1.0
-              || demux->segment.rate > 1.0)) {
-        GError *err = NULL;
-
-        GST_M3U8_CLIENT_LOCK (demux->client);
-        /* Switch to normal variant */
-        demux->client->main->current_variant = demux->client->main->lists;
-        GST_M3U8_CLIENT_UNLOCK (demux->client);
-        gst_m3u8_client_set_current (demux->client,
-            demux->client->main->lists->data);
-
-        gst_uri_downloader_reset (demux->downloader);
-
-        if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-          g_rec_mutex_unlock (&demux->stream_lock);
-
-          GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not switch playlist",
-              err);
-          gst_event_unref (event);
-          return FALSE;
-        }
-        demux->discont = TRUE;
-        demux->new_playlist = TRUE;
-        demux->do_typefind = TRUE;
-        demux->end_of_playlist = FALSE;
-
-        gst_hls_demux_change_playlist (demux,
-            demux->current_download_rate * demux->bitrate_limit);
-      }
-
-      GST_M3U8_CLIENT_LOCK (demux->client);
-      file = GST_M3U8_MEDIA_FILE (demux->client->current->files->data);
-      current_sequence = file->sequence;
-      current_pos = 0;
-      target_pos = rate > 0 ? start : stop;
-      /* FIXME: Here we need proper discont handling */
-      for (walk = demux->client->current->files; walk; walk = walk->next) {
-        file = walk->data;
-
-        current_sequence = file->sequence;
-        if (current_pos <= target_pos
-            && target_pos < current_pos + file->duration) {
-          break;
-        }
-        current_pos += file->duration;
-      }
-      GST_M3U8_CLIENT_UNLOCK (demux->client);
-
-      if (walk == NULL) {
-        GST_DEBUG_OBJECT (demux, "seeking further than track duration");
-        current_sequence++;
-      }
-
-      GST_M3U8_CLIENT_LOCK (demux->client);
-      GST_DEBUG_OBJECT (demux, "seeking to sequence %u",
-          (guint) current_sequence);
-      demux->client->sequence = current_sequence;
-      demux->client->sequence_position = current_pos;
-      GST_M3U8_CLIENT_UNLOCK (demux->client);
-
-      gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
-          start, stop_type, stop, NULL);
-      demux->need_segment = TRUE;
-
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        GST_DEBUG_OBJECT (demux, "sending flush stop");
-        gst_pad_push_event (demux->srcpad, gst_event_new_flush_stop (TRUE));
-      }
-
-      demux->stop_updates_task = FALSE;
-      gst_uri_downloader_reset (demux->downloader);
-      demux->stop_stream_task = FALSE;
-
-      gst_task_start (demux->updates_task);
-      g_rec_mutex_unlock (&demux->stream_lock);
-
-      gst_event_unref (event);
-      return TRUE;
-    }
-    case GST_EVENT_LATENCY:{
-      /* Upstream and our internal source are irrelevant
-       * for latency, and we should not fail here to
-       * configure the latency */
-      gst_event_unref (event);
-      return TRUE;
-    }
-    default:
-      break;
+  /* properly cleanup pending decryption status */
+  if (flags & GST_SEEK_FLAG_FLUSH) {
+    gst_hls_demux_decrypt_end (hlsdemux);
   }
 
-  return gst_pad_event_default (pad, parent, event);
-}
+  /* Use I-frame variants for trick modes */
+  if (hlsdemux->client->main->iframe_lists && rate < -1.0
+      && demux->segment.rate >= -1.0 && demux->segment.rate <= 1.0) {
+    GError *err = NULL;
 
-static gboolean
-gst_hls_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstHLSDemux *demux;
-  GstQuery *query;
-  gboolean ret;
-
-  demux = GST_HLS_DEMUX (parent);
-
-  switch (event->type) {
-    case GST_EVENT_EOS:{
-      gchar *playlist = NULL;
-
-      if (demux->playlist == NULL) {
-        GST_WARNING_OBJECT (demux, "Received EOS without a playlist.");
-        break;
-      }
-
-      GST_DEBUG_OBJECT (demux,
-          "Got EOS on the sink pad: main playlist fetched");
-
-      query = gst_query_new_uri ();
-      ret = gst_pad_peer_query (demux->sinkpad, query);
-      if (ret) {
-        gboolean permanent;
-        gchar *uri, *redirect_uri;
-
-        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) {
-          gst_hls_demux_set_location (demux, redirect_uri, NULL);
-        } else {
-          gst_hls_demux_set_location (demux, uri, redirect_uri);
-        }
-        g_free (uri);
-        g_free (redirect_uri);
-      }
-      gst_query_unref (query);
-
-      playlist = gst_hls_src_buf_to_utf8_playlist (demux->playlist);
-      demux->playlist = NULL;
-      if (playlist == NULL) {
-        GST_WARNING_OBJECT (demux, "Error validating first playlist.");
-      } else if (!gst_m3u8_client_update (demux->client, playlist)) {
-        /* In most cases, this will happen if we set a wrong url in the
-         * source element and we have received the 404 HTML response instead of
-         * the playlist */
-        GST_ELEMENT_ERROR (demux, STREAM, DECODE, ("Invalid playlist."),
-            (NULL));
-        return FALSE;
-      }
-
-      if (!ret && gst_m3u8_client_is_live (demux->client)) {
-        GST_ELEMENT_ERROR (demux, RESOURCE, NOT_FOUND,
-            ("Failed querying the playlist uri, "
-                "required for live sources."), (NULL));
-        return FALSE;
-      }
-
-      gst_task_start (demux->updates_task);
-      gst_event_unref (event);
-      return TRUE;
+    GST_M3U8_CLIENT_LOCK (hlsdemux->client);
+    /* Switch to I-frame variant */
+    hlsdemux->client->main->current_variant =
+        hlsdemux->client->main->iframe_lists;
+    GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+    gst_m3u8_client_set_current (hlsdemux->client,
+        hlsdemux->client->main->iframe_lists->data);
+    gst_uri_downloader_reset (demux->downloader);
+    if (!gst_hls_demux_update_playlist (hlsdemux, FALSE, &err)) {
+      GST_ELEMENT_ERROR_FROM_ERROR (hlsdemux, "Could not switch playlist", err);
+      return FALSE;
     }
-    case GST_EVENT_SEGMENT:
-      /* Swallow newsegments, we'll push our own */
-      gst_event_unref (event);
-      return TRUE;
-    default:
-      break;
+    //hlsdemux->discont = TRUE;
+    hlsdemux->do_typefind = TRUE;
+
+    gst_hls_demux_change_playlist (hlsdemux, bitrate / ABS (rate), NULL);
+  } else if (rate > -1.0 && rate <= 1.0 && (demux->segment.rate < -1.0
+          || demux->segment.rate > 1.0)) {
+    GError *err = NULL;
+    GST_M3U8_CLIENT_LOCK (hlsdemux->client);
+    /* Switch to normal variant */
+    hlsdemux->client->main->current_variant = hlsdemux->client->main->lists;
+    GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+    gst_m3u8_client_set_current (hlsdemux->client,
+        hlsdemux->client->main->lists->data);
+    gst_uri_downloader_reset (demux->downloader);
+    if (!gst_hls_demux_update_playlist (hlsdemux, FALSE, &err)) {
+      GST_ELEMENT_ERROR_FROM_ERROR (hlsdemux, "Could not switch playlist", err);
+      return FALSE;
+    }
+    //hlsdemux->discont = TRUE;
+    hlsdemux->do_typefind = TRUE;
+    /* TODO why not continue using the same? that was being used up to now? */
+    gst_hls_demux_change_playlist (hlsdemux, bitrate, NULL);
   }
 
-  return gst_pad_event_default (pad, parent, event);
-}
+  GST_M3U8_CLIENT_LOCK (hlsdemux->client);
+  file = GST_M3U8_MEDIA_FILE (hlsdemux->client->current->files->data);
+  current_sequence = file->sequence;
+  current_pos = 0;
+  target_pos = rate > 0 ? start : stop;
+  /* FIXME: Here we need proper discont handling */
+  for (walk = hlsdemux->client->current->files; walk; walk = walk->next) {
+    file = walk->data;
 
-static gboolean
-gst_hls_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
-{
-  GstHLSDemux *hlsdemux;
-  gboolean ret = FALSE;
-
-  if (query == NULL)
-    return FALSE;
-
-  hlsdemux = GST_HLS_DEMUX (parent);
-
-  switch (query->type) {
-    case GST_QUERY_DURATION:{
-      GstClockTime duration = -1;
-      GstFormat fmt;
-
-      gst_query_parse_duration (query, &fmt, NULL);
-      if (fmt == GST_FORMAT_TIME) {
-        duration = gst_m3u8_client_get_duration (hlsdemux->client);
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0) {
-          gst_query_set_duration (query, GST_FORMAT_TIME, duration);
-          ret = TRUE;
-        }
-      }
-      GST_INFO_OBJECT (hlsdemux, "GST_QUERY_DURATION returns %s with duration %"
-          GST_TIME_FORMAT, ret ? "TRUE" : "FALSE", GST_TIME_ARGS (duration));
+    current_sequence = file->sequence;
+    current_file = walk;
+    if (current_pos <= target_pos && target_pos < current_pos + file->duration) {
       break;
     }
-    case GST_QUERY_URI:
-      if (hlsdemux->client) {
-        /* FIXME: Do we answer with the variant playlist, with the current
-         * playlist or the the uri of the least downlowaded fragment? */
-        gst_query_set_uri (query, gst_m3u8_client_get_uri (hlsdemux->client));
-        ret = TRUE;
-      }
-      break;
-    case GST_QUERY_SEEKING:{
-      GstFormat fmt;
-      gint64 stop = -1;
-
-      gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
-      GST_INFO_OBJECT (hlsdemux, "Received GST_QUERY_SEEKING with format %d",
-          fmt);
-      if (fmt == GST_FORMAT_TIME) {
-        GstClockTime duration;
-
-        duration = gst_m3u8_client_get_duration (hlsdemux->client);
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0)
-          stop = duration;
-
-        gst_query_set_seeking (query, fmt,
-            !gst_m3u8_client_is_live (hlsdemux->client), 0, stop);
-        ret = TRUE;
-        GST_INFO_OBJECT (hlsdemux, "GST_QUERY_SEEKING returning with stop : %"
-            GST_TIME_FORMAT, GST_TIME_ARGS (stop));
-      }
-      break;
-    }
-    default:
-      /* Don't fordward queries upstream because of the special nature of this
-       * "demuxer", which relies on the upstream element only to be fed with the
-       * first playlist */
-      break;
+    current_pos += file->duration;
   }
 
-  return ret;
+  if (walk == NULL) {
+    GST_DEBUG_OBJECT (demux, "seeking further than track duration");
+    current_sequence++;
+  }
+
+  GST_DEBUG_OBJECT (demux, "seeking to sequence %u", (guint) current_sequence);
+  hlsdemux->reset_pts = TRUE;
+  hlsdemux->client->sequence = current_sequence;
+  hlsdemux->client->current_file =
+      current_file ? current_file : hlsdemux->client->current->files;
+  hlsdemux->client->sequence_position = current_pos;
+  GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+
+  return TRUE;
 }
 
 static GstFlowReturn
-gst_hls_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
+gst_hls_demux_update_manifest (GstAdaptiveDemux * demux)
 {
-  GstHLSDemux *demux = GST_HLS_DEMUX (parent);
-
-  if (demux->playlist == NULL)
-    demux->playlist = buf;
-  else
-    demux->playlist = gst_buffer_append (demux->playlist, buf);
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+  if (!gst_hls_demux_update_playlist (hlsdemux, TRUE, NULL))
+    return GST_FLOW_ERROR;
 
   return GST_FLOW_OK;
 }
 
-static void
-gst_hls_demux_pause_tasks (GstHLSDemux * demux)
+static gboolean
+gst_hls_demux_setup_streams (GstAdaptiveDemux * demux)
 {
-  if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) {
-    g_mutex_lock (&demux->updates_timed_lock);
-    demux->stop_updates_task = TRUE;
-    g_cond_signal (&demux->updates_timed_cond);
-    g_mutex_unlock (&demux->updates_timed_lock);
-    gst_uri_downloader_cancel (demux->downloader);
-    gst_task_pause (demux->updates_task);
-  }
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
 
-  if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED) {
-    g_mutex_lock (&demux->download_lock);
-    demux->stop_stream_task = TRUE;
-    g_cond_signal (&demux->download_cond);
-    g_mutex_unlock (&demux->download_lock);
-    g_mutex_lock (&demux->fragment_download_lock);
-    g_cond_signal (&demux->fragment_download_cond);
-    g_mutex_unlock (&demux->fragment_download_lock);
-    gst_task_pause (demux->stream_task);
-  }
+  /* only 1 output supported */
+  gst_adaptive_demux_stream_new (demux, gst_hls_demux_create_pad (hlsdemux));
+
+  hlsdemux->reset_pts = TRUE;
+
+  return TRUE;
 }
 
-static void
-gst_hls_demux_stop (GstHLSDemux * demux)
+
+static gboolean
+gst_hls_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf)
 {
-  if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) {
-    g_mutex_lock (&demux->updates_timed_lock);
-    demux->stop_updates_task = TRUE;
-    g_cond_signal (&demux->updates_timed_cond);
-    g_mutex_unlock (&demux->updates_timed_lock);
-    gst_uri_downloader_cancel (demux->downloader);
-    gst_task_stop (demux->updates_task);
-    g_rec_mutex_lock (&demux->updates_lock);
-    g_rec_mutex_unlock (&demux->updates_lock);
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+  gchar *playlist = NULL;
+
+  gst_hls_demux_set_location (hlsdemux, demux->manifest_uri,
+      demux->manifest_base_uri);
+
+  playlist = gst_hls_src_buf_to_utf8_playlist (buf);
+  if (playlist == NULL) {
+    GST_WARNING_OBJECT (demux, "Error validating first playlist.");
+    return FALSE;
+  } else if (!gst_m3u8_client_update (hlsdemux->client, playlist)) {
+    /* In most cases, this will happen if we set a wrong url in the
+     * source element and we have received the 404 HTML response instead of
+     * the playlist */
+    GST_ELEMENT_ERROR (demux, STREAM, DECODE, ("Invalid playlist."), (NULL));
+    return FALSE;
   }
 
-  if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED) {
-    g_mutex_lock (&demux->download_lock);
-    demux->stop_stream_task = TRUE;
-    g_cond_signal (&demux->download_cond);
-    g_mutex_unlock (&demux->download_lock);
-    g_mutex_lock (&demux->fragment_download_lock);
-    g_cond_signal (&demux->fragment_download_cond);
-    g_mutex_unlock (&demux->fragment_download_lock);
-    gst_task_stop (demux->stream_task);
-    g_rec_mutex_lock (&demux->stream_lock);
-    g_rec_mutex_unlock (&demux->stream_lock);
+  /* If this playlist is a variant playlist, select the first one
+   * and update it */
+  if (gst_m3u8_client_has_variant_playlist (hlsdemux->client)) {
+    GstM3U8 *child = NULL;
+    GError *err = NULL;
+
+    if (demux->connection_speed == 0) {
+      GST_M3U8_CLIENT_LOCK (hlsdemux->client);
+      child = hlsdemux->client->main->current_variant->data;
+      GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+    } else {
+      GList *tmp = gst_m3u8_client_get_playlist_for_bitrate (hlsdemux->client,
+          demux->connection_speed);
+
+      child = GST_M3U8 (tmp->data);
+    }
+
+    gst_m3u8_client_set_current (hlsdemux->client, child);
+    if (!gst_hls_demux_update_playlist (hlsdemux, FALSE, &err)) {
+      GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not fetch the child playlist",
+          err);
+      return FALSE;
+    }
   }
+
+  return gst_hls_demux_setup_streams (demux);
+}
+
+static GstClockTime
+gst_hls_demux_get_duration (GstAdaptiveDemux * demux)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+
+  return gst_m3u8_client_get_duration (hlsdemux->client);
+}
+
+static gboolean
+gst_hls_demux_is_live (GstAdaptiveDemux * demux)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+
+  return gst_m3u8_client_is_live (hlsdemux->client);
+}
+
+static gboolean
+gst_hls_demux_start_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+
+  if (hlsdemux->current_key) {
+    GError *err = NULL;
+    GstFragment *key_fragment;
+    GstBuffer *key_buffer;
+    GstMapInfo key_info;
+
+    /* new key? */
+    if (hlsdemux->key_url
+        && strcmp (hlsdemux->key_url, hlsdemux->current_key) == 0) {
+      key_fragment = g_object_ref (hlsdemux->key_fragment);
+    } else {
+      g_free (hlsdemux->key_url);
+      hlsdemux->key_url = NULL;
+
+      if (hlsdemux->key_fragment)
+        g_object_unref (hlsdemux->key_fragment);
+      hlsdemux->key_fragment = NULL;
+
+      GST_INFO_OBJECT (demux, "Fetching key %s", hlsdemux->current_key);
+      key_fragment =
+          gst_uri_downloader_fetch_uri (demux->downloader,
+          hlsdemux->current_key, hlsdemux->client->main ?
+          hlsdemux->client->main->uri : NULL, FALSE, FALSE,
+          hlsdemux->client->current ? hlsdemux->client->current->
+          allowcache : TRUE, &err);
+      if (key_fragment == NULL)
+        goto key_failed;
+      hlsdemux->key_url = g_strdup (hlsdemux->current_key);
+      hlsdemux->key_fragment = g_object_ref (key_fragment);
+    }
+
+    key_buffer = gst_fragment_get_buffer (key_fragment);
+    gst_buffer_map (key_buffer, &key_info, GST_MAP_READ);
+
+    gst_hls_demux_decrypt_start (hlsdemux, key_info.data, hlsdemux->current_iv);
+
+    gst_buffer_unmap (key_buffer, &key_info);
+    gst_buffer_unref (key_buffer);
+    g_object_unref (key_fragment);
+  }
+
+  return TRUE;
+
+key_failed:
+  /* TODO Raise this error to the user */
+  GST_WARNING_OBJECT (demux, "Failed to decrypt data");
+  return FALSE;
 }
 
 static GstFlowReturn
-_src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstBuffer * buffer, gboolean force)
 {
-  GstPad *srcpad = (GstPad *) parent;
-  GstHLSDemux *demux = (GstHLSDemux *) GST_PAD_PARENT (srcpad);
-  GstFlowReturn ret;
-  GstCaps *caps;
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
 
-  /* Is it encrypted? */
-  if (demux->current_key) {
-    GError *err = NULL;
-    GstBuffer *tmp_buffer;
-    gsize available;
+  if (G_UNLIKELY (hlsdemux->do_typefind && buffer != NULL)) {
+    GstCaps *caps = NULL;
+    GstMapInfo info;
+    guint buffer_size;
+    GstTypeFindProbability prob = GST_TYPE_FIND_NONE;
 
-    /* restart the decrypting lib for a new fragment */
-    if (demux->reset_crypto) {
-      GstFragment *key_fragment;
-      GstBuffer *key_buffer;
-      GstMapInfo key_info;
+    gst_buffer_map (buffer, &info, GST_MAP_READ);
+    buffer_size = info.size;
 
-      /* new key? */
-      if (demux->key_url && strcmp (demux->key_url, demux->current_key) == 0) {
-        key_fragment = g_object_ref (demux->key_fragment);
+    /* Typefind could miss if buffer is too small. In this case we
+     * will retry later */
+    if (buffer_size >= (2 * 1024)) {
+      caps =
+          gst_type_find_helper_for_data (GST_OBJECT_CAST (hlsdemux), info.data,
+          info.size, &prob);
+    }
+    gst_buffer_unmap (buffer, &info);
+
+    if (G_UNLIKELY (!caps)) {
+      /* Only fail typefinding if we already a good amount of data
+       * and we still don't know the type */
+      if (buffer_size > (2 * 1024 * 1024) || force) {
+        GST_ELEMENT_ERROR (hlsdemux, STREAM, TYPE_NOT_FOUND,
+            ("Could not determine type of stream"), (NULL));
+        gst_buffer_unref (buffer);
+        return GST_FLOW_NOT_NEGOTIATED;
       } else {
-        g_free (demux->key_url);
-        demux->key_url = NULL;
-
-        if (demux->key_fragment)
-          g_object_unref (demux->key_fragment);
-        demux->key_fragment = NULL;
-
-        GST_INFO_OBJECT (demux, "Fetching key %s", demux->current_key);
-        key_fragment =
-            gst_uri_downloader_fetch_uri (demux->downloader,
-            demux->current_key, demux->client->main ?
-            demux->client->main->uri : NULL, FALSE, FALSE,
-            demux->client->current ? demux->client->current->allowcache : TRUE,
-            &err);
-        if (key_fragment == NULL)
-          goto key_failed;
-        demux->key_url = g_strdup (demux->current_key);
-        demux->key_fragment = g_object_ref (key_fragment);
+        if (hlsdemux->pending_buffer)
+          hlsdemux->pending_buffer =
+              gst_buffer_append (buffer, hlsdemux->pending_buffer);
+        else
+          hlsdemux->pending_buffer = buffer;
+        return GST_FLOW_OK;
       }
-
-      key_buffer = gst_fragment_get_buffer (key_fragment);
-      gst_buffer_map (key_buffer, &key_info, GST_MAP_READ);
-
-      gst_hls_demux_decrypt_start (demux, key_info.data, demux->current_iv);
-
-      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);
+    GST_DEBUG_OBJECT (hlsdemux, "Typefind result: %" GST_PTR_FORMAT " prob:%d",
+        caps, prob);
+
+    gst_adaptive_demux_stream_set_caps (stream, caps);
+    hlsdemux->do_typefind = FALSE;
+  }
+
+  if (buffer)
+    return gst_adaptive_demux_stream_push_buffer (stream, buffer);
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_hls_demux_finish_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  if (hlsdemux->current_key)
+    gst_hls_demux_decrypt_end (hlsdemux);
+
+  /* ideally this should be empty, but this eos might have been
+   * caused by an error on the source element */
+  GST_DEBUG_OBJECT (demux, "Data still on the adapter when EOS was received"
+      ": %" G_GSIZE_FORMAT, gst_adapter_available (stream->adapter));
+  gst_adapter_clear (stream->adapter);
+
+  if (stream->last_ret == GST_FLOW_OK) {
+    if (hlsdemux->pending_buffer) {
+      if (hlsdemux->current_key) {
+        GstMapInfo info;
+        gssize unpadded_size;
+
+        /* Handle pkcs7 unpadding here */
+        gst_buffer_map (hlsdemux->pending_buffer, &info, GST_MAP_READ);
+        unpadded_size = info.size - info.data[info.size - 1];
+        gst_buffer_unmap (hlsdemux->pending_buffer, &info);
+
+        gst_buffer_resize (hlsdemux->pending_buffer, 0, unpadded_size);
+      }
+
+      ret =
+          gst_hls_demux_handle_buffer (demux, stream, hlsdemux->pending_buffer,
+          TRUE);
+      hlsdemux->pending_buffer = NULL;
+    }
+  } else {
+    if (hlsdemux->pending_buffer)
+      gst_buffer_unref (hlsdemux->pending_buffer);
+    hlsdemux->pending_buffer = NULL;
+  }
+
+  if (ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED)
+    return gst_adaptive_demux_stream_advance_fragment (demux, stream,
+        stream->fragment.duration);
+  return ret;
+}
+
+static GstFlowReturn
+gst_hls_demux_data_received (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
+  gsize available;
+  GstBuffer *buffer = NULL;
+
+  available = gst_adapter_available (stream->adapter);
+
+  /* Is it encrypted? */
+  if (hlsdemux->current_key) {
+    GError *err = NULL;
+    GstBuffer *tmp_buffer;
 
     /* must be a multiple of 16 */
-    available = gst_adapter_available (demux->adapter) & (~0xF);
+    available = available & (~0xF);
 
     if (available == 0) {
       return GST_FLOW_OK;
     }
 
-    buffer = gst_adapter_take_buffer (demux->adapter, available);
-    buffer = gst_hls_demux_decrypt_fragment (demux, buffer, &err);
+    buffer = gst_adapter_take_buffer (stream->adapter, available);
+    buffer = gst_hls_demux_decrypt_fragment (hlsdemux, buffer, &err);
     if (buffer == NULL) {
       GST_ELEMENT_ERROR (demux, STREAM, DECODE, ("Failed to decrypt buffer"),
           ("decryption failed %s", err->message));
       g_error_free (err);
-
-      demux->last_ret = GST_FLOW_ERROR;
       return GST_FLOW_ERROR;
     }
 
-    tmp_buffer = demux->pending_buffer;
-    demux->pending_buffer = buffer;
+    tmp_buffer = hlsdemux->pending_buffer;
+    hlsdemux->pending_buffer = buffer;
     buffer = tmp_buffer;
-  }
-
-  if (!buffer) {
-    return GST_FLOW_OK;
-  }
-
-  if (demux->starting_fragment) {
-    GST_LOG_OBJECT (demux, "set buffer pts=%" GST_TIME_FORMAT,
-        GST_TIME_ARGS (demux->current_timestamp));
-    GST_BUFFER_PTS (buffer) = demux->current_timestamp;
-
-    if (demux->segment.rate < 0)
-      /* Set DISCONT flag for every first buffer in reverse playback mode
-       * as each fragment for its own has to be reversed */
-      demux->discont = TRUE;
-    demux->starting_fragment = FALSE;
-    demux->segment.position = GST_BUFFER_PTS (buffer);
   } else {
-    GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
-  }
-
-  GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
-  GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
-
-  /* We actually need to do this every time we switch bitrate */
-  if (G_UNLIKELY (demux->do_typefind)) {
-    caps = gst_type_find_helper_for_buffer (NULL, buffer, NULL);
-    if (G_UNLIKELY (!caps)) {
-      GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND,
-          ("Could not determine type of stream"), (NULL));
-      gst_buffer_unref (buffer);
-      demux->last_ret = GST_FLOW_NOT_NEGOTIATED;
-      return GST_FLOW_NOT_NEGOTIATED;
+    buffer = gst_adapter_take_buffer (stream->adapter, available);
+    if (hlsdemux->pending_buffer) {
+      buffer = gst_buffer_append (hlsdemux->pending_buffer, buffer);
+      hlsdemux->pending_buffer = NULL;
     }
-
-    if (!demux->input_caps || !gst_caps_is_equal (caps, demux->input_caps)) {
-      gst_caps_replace (&demux->input_caps, caps);
-      GST_INFO_OBJECT (demux, "Input source caps: %" GST_PTR_FORMAT,
-          demux->input_caps);
-    }
-    gst_pad_set_caps (srcpad, caps);
-    demux->do_typefind = FALSE;
-    gst_caps_unref (caps);
   }
 
-  if (demux->discont) {
-    GST_DEBUG_OBJECT (demux, "Marking fragment as discontinuous");
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-    demux->discont = FALSE;
-  } else {
-    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
-  }
-
-  demux->starting_fragment = FALSE;
-
-  if (demux->need_segment) {
-    /* And send a newsegment */
-    GST_DEBUG_OBJECT (demux, "Sending segment event: %"
-        GST_SEGMENT_FORMAT, &demux->segment);
-    gst_pad_push_event (demux->srcpad, gst_event_new_segment (&demux->segment));
-    demux->need_segment = FALSE;
-  }
-
-  /* accumulate time and size to get this chunk */
-  demux->download_total_time +=
-      g_get_monotonic_time () - demux->download_start_time;
-  demux->download_total_bytes += gst_buffer_get_size (buffer);
-
-  ret = gst_proxy_pad_chain_default (pad, parent, buffer);
-  demux->download_start_time = g_get_monotonic_time ();
-
-  if (ret != GST_FLOW_OK) {
-    if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
-      GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
-          ("stream stopped, reason %s", gst_flow_get_name (ret)));
-      gst_pad_push_event (demux->srcpad, gst_event_new_eos ());
-    } else {
-      GST_DEBUG_OBJECT (demux, "stream stopped, reason %s",
-          gst_flow_get_name (ret));
-    }
-    gst_hls_demux_pause_tasks (demux);
-  }
-
-  /* avoid having the source handle the same error again */
-  demux->last_ret = ret;
-  ret = GST_FLOW_OK;
-
-  return ret;
-
-key_failed:
-  /* TODO Raise this error to the user */
-  GST_WARNING_OBJECT (demux, "Failed to decrypt data");
-  demux->last_ret = GST_FLOW_ERROR;
-  return GST_FLOW_ERROR;
+  return gst_hls_demux_handle_buffer (demux, stream, buffer, FALSE);
 }
 
 static gboolean
-_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_hls_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream)
 {
-  GstPad *srcpad = GST_PAD_CAST (parent);
-  GstHLSDemux *demux = (GstHLSDemux *) GST_PAD_PARENT (srcpad);;
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (stream->demux);
 
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      if (demux->current_key)
-        gst_hls_demux_decrypt_end (demux);
+  return gst_m3u8_client_has_next_fragment (hlsdemux->client,
+      stream->demux->segment.rate > 0);
+}
 
-      /* ideally this should be empty, but this eos might have been
-       * caused by an error on the source element */
-      GST_DEBUG_OBJECT (demux, "Data still on the adapter when EOS was received"
-          ": %" G_GSIZE_FORMAT, gst_adapter_available (demux->adapter));
-      gst_adapter_clear (demux->adapter);
+static GstFlowReturn
+gst_hls_demux_advance_fragment (GstAdaptiveDemuxStream * stream)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (stream->demux);
 
-      /* pending buffer is only used for encrypted streams */
-      if (demux->last_ret == GST_FLOW_OK) {
-        if (demux->pending_buffer) {
-          GstMapInfo info;
-          gsize unpadded_size;
+  gst_m3u8_client_advance_fragment (hlsdemux->client,
+      stream->demux->segment.rate > 0);
+  hlsdemux->reset_pts = FALSE;
+  return GST_FLOW_OK;
+}
 
-          /* Handle pkcs7 unpadding here */
-          gst_buffer_map (demux->pending_buffer, &info, GST_MAP_READ);
-          unpadded_size = info.size - info.data[info.size - 1];
-          gst_buffer_unmap (demux->pending_buffer, &info);
+static GstFlowReturn
+gst_hls_demux_update_fragment_info (GstAdaptiveDemuxStream * stream)
+{
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (stream->demux);
+  gchar *next_fragment_uri;
+  GstClockTime duration;
+  GstClockTime timestamp;
+  gboolean discont;
+  gint64 range_start, range_end;
+  gchar *key = NULL;
+  guint8 *iv = NULL;
 
-          gst_buffer_resize (demux->pending_buffer, 0, unpadded_size);
-
-          demux->download_total_time +=
-              g_get_monotonic_time () - demux->download_start_time;
-          demux->download_total_bytes +=
-              gst_buffer_get_size (demux->pending_buffer);
-          demux->last_ret = gst_pad_push (demux->srcpad, demux->pending_buffer);
-
-          demux->pending_buffer = NULL;
-        }
-      } else {
-        if (demux->pending_buffer)
-          gst_buffer_unref (demux->pending_buffer);
-        demux->pending_buffer = NULL;
-      }
-
-      GST_DEBUG_OBJECT (demux, "Fragment download finished");
-
-      g_mutex_lock (&demux->fragment_download_lock);
-      g_cond_signal (&demux->fragment_download_cond);
-      g_mutex_unlock (&demux->fragment_download_lock);
-      break;
-    default:
-      break;
+  if (!gst_m3u8_client_get_next_fragment (hlsdemux->client, &discont,
+          &next_fragment_uri, &duration, &timestamp, &range_start, &range_end,
+          &key, &iv, stream->demux->segment.rate > 0)) {
+    GST_INFO_OBJECT (hlsdemux, "This playlist doesn't contain more fragments");
+    return GST_FLOW_EOS;
   }
 
-  gst_event_unref (event);
+  /* set up our source for download */
+  if (hlsdemux->reset_pts || discont) {
+    stream->fragment.timestamp = timestamp;
+  } else {
+    stream->fragment.timestamp = GST_CLOCK_TIME_NONE;
+  }
 
-  return TRUE;
+  if (hlsdemux->current_key)
+    g_free (hlsdemux->current_key);
+  hlsdemux->current_key = key;
+  if (hlsdemux->current_iv)
+    g_free (hlsdemux->current_iv);
+  hlsdemux->current_iv = iv;
+  g_free (stream->fragment.uri);
+  stream->fragment.uri = next_fragment_uri;
+  stream->fragment.range_start = range_start;
+  stream->fragment.range_end = range_end;
+  if (discont)
+    stream->discont = discont;
+
+  return GST_FLOW_OK;
 }
 
 static gboolean
-_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_hls_demux_select_bitrate (GstAdaptiveDemuxStream * stream, guint64 bitrate)
 {
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_ALLOCATION:
-      return FALSE;
-      break;
-    default:
-      break;
-  }
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (stream->demux);
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (stream->demux);
+  gboolean changed = FALSE;
 
-  return gst_pad_query_default (pad, parent, query);
+  GST_M3U8_CLIENT_LOCK (hlsdemux->client);
+  if (!hlsdemux->client->main->lists) {
+    GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+    return FALSE;
+  }
+  GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);
+
+  /* FIXME: Currently several issues have be found when letting bitrate adaptation
+   * happen using trick modes (such as 'All streams finished without buffers') and
+   * the adaptive algorithm does not properly behave. */
+  if (demux->segment.rate != 1.0)
+    return FALSE;
+
+  gst_hls_demux_change_playlist (hlsdemux, bitrate, &changed);
+  if (changed)
+    gst_hls_demux_setup_streams (GST_ADAPTIVE_DEMUX_CAST (hlsdemux));
+  return changed;
 }
 
 static void
-switch_pads (GstHLSDemux * demux)
+gst_hls_demux_reset (GstAdaptiveDemux * ademux)
 {
-  GstPad *oldpad = demux->srcpad;
-  GstEvent *event;
-  gchar *stream_id;
-  gchar *name;
-  GstPadTemplate *tmpl;
-  GstProxyPad *internal_pad;
+  GstHLSDemux *demux = GST_HLS_DEMUX_CAST (ademux);
 
-  GST_DEBUG_OBJECT (demux, "Switching pad (oldpad:%p)", oldpad);
-
-  if (oldpad) {
-    gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (oldpad), NULL);
-  }
-
-  /* First create and activate new pad */
-  name = g_strdup_printf ("src_%u", demux->srcpad_counter++);
-  tmpl = gst_static_pad_template_get (&srctemplate);
-  demux->srcpad =
-      gst_ghost_pad_new_from_template (name, demux->src_srcpad, tmpl);
-  gst_object_unref (tmpl);
-  g_free (name);
-
-  /* set up our internal pad to drop all events from
-   * the http src we don't care about. On the chain function
-   * we just push the buffer forward, but this way hls can get
-   * the flow return from downstream */
-  internal_pad = gst_proxy_pad_get_internal (GST_PROXY_PAD (demux->srcpad));
-  gst_pad_set_chain_function (GST_PAD_CAST (internal_pad), _src_chain);
-  gst_pad_set_event_function (GST_PAD_CAST (internal_pad), _src_event);
-  /* need to set query otherwise deadlocks happen with allocation queries */
-  gst_pad_set_query_function (GST_PAD_CAST (internal_pad), _src_query);
-  gst_object_unref (internal_pad);
-
-  gst_pad_set_event_function (demux->srcpad,
-      GST_DEBUG_FUNCPTR (gst_hls_demux_src_event));
-  gst_pad_set_query_function (demux->srcpad,
-      GST_DEBUG_FUNCPTR (gst_hls_demux_src_query));
-  gst_pad_use_fixed_caps (demux->srcpad);
-  gst_pad_set_active (demux->srcpad, TRUE);
-
-  stream_id =
-      gst_pad_create_stream_id (demux->srcpad, GST_ELEMENT_CAST (demux), NULL);
-
-  event = gst_pad_get_sticky_event (demux->sinkpad, GST_EVENT_STREAM_START, 0);
-  if (event) {
-    if (gst_event_parse_group_id (event, &demux->group_id))
-      demux->have_group_id = TRUE;
-    else
-      demux->have_group_id = FALSE;
-    gst_event_unref (event);
-  } else if (!demux->have_group_id) {
-    demux->have_group_id = TRUE;
-    demux->group_id = gst_util_group_id_next ();
-  }
-  event = gst_event_new_stream_start (stream_id);
-  if (demux->have_group_id)
-    gst_event_set_group_id (event, demux->group_id);
-
-  gst_pad_push_event (demux->srcpad, event);
-  g_free (stream_id);
-
-  gst_element_add_pad (GST_ELEMENT (demux), demux->srcpad);
-
-  gst_element_no_more_pads (GST_ELEMENT (demux));
-
-  demux->new_playlist = FALSE;
-
-  if (oldpad) {
-    /* Push out EOS */
-    gst_pad_push_event (oldpad, gst_event_new_eos ());
-    gst_pad_set_active (oldpad, FALSE);
-    gst_element_remove_pad (GST_ELEMENT (demux), oldpad);
-  }
-}
-
-static void
-gst_hls_demux_configure_src_pad (GstHLSDemux * demux)
-{
-  if (G_UNLIKELY (!demux->srcpad || demux->new_playlist)) {
-    switch_pads (demux);
-    demux->need_segment = TRUE;
-  }
-}
-
-static void
-gst_hls_demux_stream_loop (GstHLSDemux * demux)
-{
-  gboolean end_of_playlist;
-  GError *err = NULL;
-
-  /* This task will download fragments as fast as possible, sends
-   * SEGMENT and CAPS events and switches pads if necessary.
-   * If downloading a fragment fails we try again up to 3 times
-   * after waiting a bit. If we're at the end of the playlist
-   * we wait for the playlist to update before getting the next
-   * fragment.
-   */
-  GST_DEBUG_OBJECT (demux, "Enter task");
-
-  if (demux->stop_stream_task)
-    goto pause_task;
-
-  /* Check if we're done with our segment */
-  if (demux->segment.rate > 0) {
-    if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop)
-        && demux->segment.position >= demux->segment.stop)
-      goto end_of_playlist;
-  } else {
-    if (GST_CLOCK_TIME_IS_VALID (demux->segment.start)
-        && demux->segment.position < demux->segment.start)
-      goto end_of_playlist;
-  }
-
-  demux->next_download = g_get_monotonic_time ();
-  if (!gst_hls_demux_get_next_fragment (demux, &end_of_playlist, &err)) {
-    if (demux->stop_stream_task) {
-      g_clear_error (&err);
-      goto pause_task;
-    }
-
-    if (end_of_playlist) {
-      if (!gst_m3u8_client_is_live (demux->client)) {
-        GST_DEBUG_OBJECT (demux, "End of playlist");
-        demux->end_of_playlist = TRUE;
-        goto end_of_playlist;
-      } else {
-        g_mutex_lock (&demux->download_lock);
-
-        /* Wait until we're cancelled or there's something for
-         * us to download in the playlist or the playlist
-         * became non-live */
-        while (TRUE) {
-          if (demux->stop_stream_task) {
-            g_mutex_unlock (&demux->download_lock);
-            goto pause_task;
-          }
-
-          /* Got a new fragment or not live anymore? */
-          if (gst_m3u8_client_get_next_fragment (demux->client, NULL, NULL,
-                  NULL, NULL, NULL, NULL, NULL, NULL, demux->segment.rate > 0)
-              || !gst_m3u8_client_is_live (demux->client))
-            break;
-
-          GST_DEBUG_OBJECT (demux,
-              "No fragment left but live playlist, wait a bit");
-          g_cond_wait (&demux->download_cond, &demux->download_lock);
-        }
-        g_mutex_unlock (&demux->download_lock);
-        GST_DEBUG_OBJECT (demux, "Retrying now");
-        return;
-      }
-    } else {
-      demux->download_failed_count++;
-      if (demux->download_failed_count <= DEFAULT_FAILED_COUNT) {
-        GST_WARNING_OBJECT (demux, "Could not fetch the next fragment");
-        g_clear_error (&err);
-
-        /* First try to update the playlist for non-live playlists
-         * in case the URIs have changed in the meantime. But only
-         * try it the first time, after that we're going to wait a
-         * a bit to not flood the server */
-        if (demux->download_failed_count == 1
-            && !gst_m3u8_client_is_live (demux->client)
-            && gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-          /* Retry immediately, the playlist actually has changed */
-          GST_DEBUG_OBJECT (demux, "Updated the playlist");
-          return;
-        } else {
-          /* Wait half the fragment duration before retrying */
-          demux->next_download +=
-              gst_util_uint64_scale
-              (gst_m3u8_client_get_current_fragment_duration (demux->client),
-              G_USEC_PER_SEC, 2 * GST_SECOND);
-        }
-
-        g_clear_error (&err);
-
-        g_mutex_lock (&demux->download_lock);
-        if (demux->stop_stream_task) {
-          g_mutex_unlock (&demux->download_lock);
-          goto pause_task;
-        }
-        g_cond_wait_until (&demux->download_cond, &demux->download_lock,
-            demux->next_download);
-        g_mutex_unlock (&demux->download_lock);
-        GST_DEBUG_OBJECT (demux, "Retrying now");
-
-        /* Refetch the playlist now after we waited */
-        if (!gst_m3u8_client_is_live (demux->client)
-            && gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-          GST_DEBUG_OBJECT (demux, "Updated the playlist");
-        }
-        return;
-      } else {
-        GST_ELEMENT_ERROR_FROM_ERROR (demux,
-            "Could not fetch the next fragment", err);
-        goto pause_task;
-      }
-    }
-  } else {
-    demux->download_failed_count = 0;
-    gst_m3u8_client_advance_fragment (demux->client, demux->segment.rate > 0);
-
-    if (demux->stop_updates_task) {
-      goto pause_task;
-    }
-  }
-
-  if (demux->stop_updates_task) {
-    goto pause_task;
-  }
-
-  /* try to switch to another bitrate if needed */
-  gst_hls_demux_switch_playlist (demux);
-  demux->download_total_bytes = 0;
-  demux->download_total_time = 0;
-
-  GST_DEBUG_OBJECT (demux, "Finished pushing fragment");
-
-  return;
-
-end_of_playlist:
-  {
-    GST_DEBUG_OBJECT (demux, "Reached end of playlist, sending EOS");
-
-    gst_hls_demux_configure_src_pad (demux);
-
-    gst_pad_push_event (demux->srcpad, gst_event_new_eos ());
-    gst_hls_demux_pause_tasks (demux);
-    return;
-  }
-
-pause_task:
-  {
-    GST_DEBUG_OBJECT (demux, "Pause task");
-    /* Pausing a stopped task will start it */
-    gst_hls_demux_pause_tasks (demux);
-    return;
-  }
-}
-
-static void
-gst_hls_demux_reset (GstHLSDemux * demux, gboolean dispose)
-{
-  demux->end_of_playlist = FALSE;
-  demux->stop_updates_task = FALSE;
   demux->do_typefind = TRUE;
-
-  demux->download_failed_count = 0;
+  demux->reset_pts = TRUE;
 
   g_free (demux->key_url);
   demux->key_url = NULL;
@@ -1299,54 +779,27 @@
     g_object_unref (demux->key_fragment);
   demux->key_fragment = NULL;
 
-  if (demux->input_caps) {
-    gst_caps_unref (demux->input_caps);
-    demux->input_caps = NULL;
-  }
-
-  if (demux->playlist) {
-    gst_buffer_unref (demux->playlist);
-    demux->playlist = NULL;
-  }
-
   if (demux->client) {
     gst_m3u8_client_free (demux->client);
     demux->client = NULL;
   }
-
-  if (!dispose) {
-    demux->client = gst_m3u8_client_new ("", NULL);
-  }
-
-  gst_segment_init (&demux->segment, GST_FORMAT_TIME);
-  demux->need_segment = TRUE;
-  demux->discont = TRUE;
-
-  demux->have_group_id = FALSE;
-  demux->group_id = G_MAXUINT;
+  /* TODO recreated on hls only if reset was not for disposing */
+  demux->client = gst_m3u8_client_new ("", NULL);
 
   demux->srcpad_counter = 0;
-  if (demux->srcpad) {
-    gst_element_remove_pad (GST_ELEMENT_CAST (demux), demux->srcpad);
-    demux->srcpad = NULL;
-  }
-
-  if (demux->src) {
-    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)
     gst_buffer_unref (demux->pending_buffer);
   demux->pending_buffer = NULL;
-  demux->current_key = NULL;
-  demux->current_iv = NULL;
-  gst_hls_demux_decrypt_end (demux);
+  if (demux->current_key) {
+    g_free (demux->current_key);
+    demux->current_key = NULL;
+  }
+  if (demux->current_iv) {
+    g_free (demux->current_iv);
+    demux->current_iv = NULL;
+  }
 
-  demux->current_download_rate = -1;
+  gst_hls_demux_decrypt_end (demux);
 }
 
 static gboolean
@@ -1361,122 +814,6 @@
   return TRUE;
 }
 
-void
-gst_hls_demux_updates_loop (GstHLSDemux * demux)
-{
-  /* Loop for updating of the playlist. This periodically checks if
-   * the playlist is updated and does so, then signals the streaming
-   * thread in case it can continue downloading now.
-   * For non-live playlists this thread is not doing much else than
-   * setting up the initial playlist and then stopping. */
-
-  /* block until the next scheduled update or the signal to quit this thread */
-  GST_DEBUG_OBJECT (demux, "Started updates task");
-
-  /* If this playlist is a variant playlist, select the first one
-   * and update it */
-  if (gst_m3u8_client_has_variant_playlist (demux->client)) {
-    GstM3U8 *child = NULL;
-    GError *err = NULL;
-
-    if (demux->connection_speed == 0) {
-      GST_M3U8_CLIENT_LOCK (demux->client);
-      child = demux->client->main->current_variant->data;
-      GST_M3U8_CLIENT_UNLOCK (demux->client);
-    } else {
-      GList *tmp = gst_m3u8_client_get_playlist_for_bitrate (demux->client,
-          demux->connection_speed);
-
-      child = GST_M3U8 (tmp->data);
-    }
-
-    gst_m3u8_client_set_current (demux->client, child);
-    if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-      GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not fetch the child playlist",
-          err);
-      goto error;
-    }
-  }
-
-  if (!gst_m3u8_client_is_live (demux->client)) {
-    GstClockTime duration = gst_m3u8_client_get_duration (demux->client);
-
-    GST_DEBUG_OBJECT (demux, "Sending duration message : %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (duration));
-    if (duration != GST_CLOCK_TIME_NONE)
-      gst_element_post_message (GST_ELEMENT (demux),
-          gst_message_new_duration_changed (GST_OBJECT (demux)));
-  }
-
-  /* Now start stream task */
-  gst_task_start (demux->stream_task);
-
-  demux->next_update =
-      g_get_monotonic_time () +
-      gst_util_uint64_scale (gst_m3u8_client_get_target_duration
-      (demux->client), G_USEC_PER_SEC, GST_SECOND);
-
-  /* Updating playlist only needed for live playlists */
-  while (gst_m3u8_client_is_live (demux->client)) {
-    GError *err = NULL;
-
-    /* Wait here until we should do the next update or we're cancelled */
-    GST_DEBUG_OBJECT (demux, "Wait for next playlist update");
-    g_mutex_lock (&demux->updates_timed_lock);
-    if (demux->stop_updates_task) {
-      g_mutex_unlock (&demux->updates_timed_lock);
-      goto quit;
-    }
-    g_cond_wait_until (&demux->updates_timed_cond, &demux->updates_timed_lock,
-        demux->next_update);
-    if (demux->stop_updates_task) {
-      g_mutex_unlock (&demux->updates_timed_lock);
-      goto quit;
-    }
-    g_mutex_unlock (&demux->updates_timed_lock);
-
-    GST_DEBUG_OBJECT (demux, "Updating playlist");
-    if (!gst_hls_demux_update_playlist (demux, TRUE, &err)) {
-      if (demux->stop_updates_task)
-        goto quit;
-      demux->client->update_failed_count++;
-      if (demux->client->update_failed_count <= DEFAULT_FAILED_COUNT) {
-        GST_WARNING_OBJECT (demux, "Could not update the playlist");
-        demux->next_update =
-            g_get_monotonic_time () +
-            gst_util_uint64_scale (gst_m3u8_client_get_target_duration
-            (demux->client), G_USEC_PER_SEC, 2 * GST_SECOND);
-      } else {
-        GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not update playlist", err);
-        goto error;
-      }
-    } else {
-      GST_DEBUG_OBJECT (demux, "Updated playlist successfully");
-      demux->next_update =
-          g_get_monotonic_time () +
-          gst_util_uint64_scale (gst_m3u8_client_get_target_duration
-          (demux->client), G_USEC_PER_SEC, GST_SECOND);
-      /* Wake up download task */
-      g_mutex_lock (&demux->download_lock);
-      g_cond_signal (&demux->download_cond);
-      g_mutex_unlock (&demux->download_lock);
-    }
-  }
-
-quit:
-  {
-    GST_DEBUG_OBJECT (demux, "Stopped updates task");
-    gst_task_pause (demux->updates_task);
-    return;
-  }
-
-error:
-  {
-    GST_DEBUG_OBJECT (demux, "Stopped updates task because of error");
-    gst_hls_demux_pause_tasks (demux);
-  }
-}
-
 static gchar *
 gst_hls_src_buf_to_utf8_playlist (GstBuffer * buf)
 {
@@ -1494,13 +831,11 @@
   memcpy (playlist, info.data, info.size);
 
   gst_buffer_unmap (buf, &info);
-  gst_buffer_unref (buf);
   return playlist;
 
 validate_error:
   gst_buffer_unmap (buf, &info);
 map_error:
-  gst_buffer_unref (buf);
   return NULL;
 }
 
@@ -1508,42 +843,50 @@
 gst_hls_demux_update_playlist (GstHLSDemux * demux, gboolean update,
     GError ** err)
 {
+  GstAdaptiveDemux *adaptive_demux = GST_ADAPTIVE_DEMUX (demux);
   GstFragment *download;
   GstBuffer *buf;
   gchar *playlist;
   gboolean main_checked = FALSE, updated = FALSE;
-  const gchar *uri;
+  gchar *uri, *main_uri;
 
 retry:
   uri = gst_m3u8_client_get_current_uri (demux->client);
+  main_uri = gst_m3u8_client_get_uri (demux->client);
   download =
-      gst_uri_downloader_fetch_uri (demux->downloader, uri,
-      demux->client->main ? demux->client->main->uri : NULL, TRUE, TRUE, TRUE,
-      err);
+      gst_uri_downloader_fetch_uri (adaptive_demux->downloader, uri, main_uri,
+      TRUE, TRUE, TRUE, err);
+  g_free (main_uri);
   if (download == NULL) {
-    if (update && !main_checked
+    if (!adaptive_demux->cancelled && update && !main_checked
         && gst_m3u8_client_has_variant_playlist (demux->client)
-        && demux->client->main) {
+        && gst_m3u8_client_has_main (demux->client)) {
       GError *err2 = NULL;
+      main_uri = gst_m3u8_client_get_uri (demux->client);
       GST_INFO_OBJECT (demux,
           "Updating playlist %s failed, attempt to refresh variant playlist %s",
-          uri, demux->client->main->uri);
+          uri, main_uri);
       download =
-          gst_uri_downloader_fetch_uri (demux->downloader,
-          demux->client->main->uri, NULL, TRUE, TRUE, TRUE, &err2);
+          gst_uri_downloader_fetch_uri (adaptive_demux->downloader,
+          main_uri, NULL, TRUE, TRUE, TRUE, &err2);
+      g_free (main_uri);
       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);
+        gst_buffer_unref (buf);
 
         if (playlist == NULL) {
           GST_WARNING_OBJECT (demux,
               "Failed to validate variant playlist encoding");
+          g_free (uri);
+          g_object_unref (download);
           return FALSE;
         }
 
+        g_free (uri);
         if (download->redirect_permanent && download->redirect_uri) {
           uri = download->redirect_uri;
           base_uri = NULL;
@@ -1555,6 +898,7 @@
         if (!gst_m3u8_client_update_variant_playlist (demux->client, playlist,
                 uri, base_uri)) {
           GST_WARNING_OBJECT (demux, "Failed to update the variant playlist");
+          g_object_unref (download);
           return FALSE;
         }
 
@@ -1564,12 +908,15 @@
         main_checked = TRUE;
         goto retry;
       } else {
+        g_free (uri);
         return FALSE;
       }
     } else {
+      g_free (uri);
       return FALSE;
     }
   }
+  g_free (uri);
 
   /* Set the base URI of the playlist to the redirect target if any */
   GST_M3U8_CLIENT_LOCK (demux->client);
@@ -1586,6 +933,7 @@
 
   buf = gst_fragment_get_buffer (download);
   playlist = gst_hls_src_buf_to_utf8_playlist (buf);
+  gst_buffer_unref (buf);
   g_object_unref (download);
 
   if (playlist == NULL) {
@@ -1617,7 +965,7 @@
     if (demux->client->sequence >= last_sequence - 3) {
       GST_DEBUG_OBJECT (demux, "Sequence is beyond playlist. Moving back to %u",
           (guint) (last_sequence - 3));
-      demux->need_segment = TRUE;
+      //demux->need_segment = TRUE;
       demux->client->sequence = last_sequence - 3;
     }
     GST_M3U8_CLIENT_UNLOCK (demux->client);
@@ -1631,8 +979,20 @@
      * position
      */
     GST_M3U8_CLIENT_LOCK (demux->client);
+
+    /* Valid because hlsdemux only has a single output */
+    if (GST_ADAPTIVE_DEMUX_CAST (demux)->streams) {
+      GstAdaptiveDemuxStream *stream =
+          GST_ADAPTIVE_DEMUX_CAST (demux)->streams->data;
+      target_pos = stream->segment.position;
+    } else {
+      target_pos = 0;
+    }
+    if (GST_CLOCK_TIME_IS_VALID (demux->client->sequence_position)) {
+      target_pos = MAX (target_pos, demux->client->sequence_position);
+    }
+
     current_pos = 0;
-    target_pos = demux->segment.position;
     for (walk = demux->client->current->files; walk; walk = walk->next) {
       GstM3U8MediaFile *file = walk->data;
 
@@ -1655,15 +1015,17 @@
 }
 
 static gboolean
-gst_hls_demux_change_playlist (GstHLSDemux * demux, guint max_bitrate)
+gst_hls_demux_change_playlist (GstHLSDemux * demux, guint max_bitrate,
+    gboolean * changed)
 {
   GList *previous_variant, *current_variant;
   gint old_bandwidth, new_bandwidth;
+  GstAdaptiveDemux *adaptive_demux = GST_ADAPTIVE_DEMUX_CAST (demux);
+  GstAdaptiveDemuxStream *stream;
 
-  /* If user specifies a connection speed never use a playlist with a bandwidth
-   * superior than it */
-  if (demux->connection_speed != 0 && max_bitrate > demux->connection_speed)
-    max_bitrate = demux->connection_speed;
+  g_return_val_if_fail (adaptive_demux->streams != NULL, FALSE);
+
+  stream = adaptive_demux->streams->data;
 
   previous_variant = demux->client->main->current_variant;
   current_variant = gst_m3u8_client_get_playlist_for_bitrate (demux->client,
@@ -1688,17 +1050,23 @@
 
   GST_INFO_OBJECT (demux, "Client was on %dbps, max allowed is %dbps, switching"
       " to bitrate %dbps", old_bandwidth, max_bitrate, new_bandwidth);
-  demux->discont = TRUE;
-  demux->new_playlist = TRUE;
+  stream->discont = TRUE;
 
   if (gst_hls_demux_update_playlist (demux, FALSE, NULL)) {
-    GstStructure *s;
-
-    s = gst_structure_new ("playlist",
-        "uri", G_TYPE_STRING, gst_m3u8_client_get_current_uri (demux->client),
-        "bitrate", G_TYPE_INT, new_bandwidth, NULL);
+    gchar *uri;
+    gchar *main_uri;
+    uri = gst_m3u8_client_get_current_uri (demux->client);
+    main_uri = gst_m3u8_client_get_uri (demux->client);
     gst_element_post_message (GST_ELEMENT_CAST (demux),
-        gst_message_new_element (GST_OBJECT_CAST (demux), s));
+        gst_message_new_element (GST_OBJECT_CAST (demux),
+            gst_structure_new (GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME,
+                "manifest-uri", G_TYPE_STRING,
+                main_uri, "uri", G_TYPE_STRING,
+                uri, "bitrate", G_TYPE_INT, new_bandwidth, NULL)));
+    g_free (uri);
+    g_free (main_uri);
+    if (changed)
+      *changed = TRUE;
   } else {
     GList *failover = NULL;
 
@@ -1723,7 +1091,7 @@
         GST_M3U8 (g_list_first (demux->client->main->lists)->data)->bandwidth)
       return FALSE;
     else
-      return gst_hls_demux_change_playlist (demux, new_bandwidth - 1);
+      return gst_hls_demux_change_playlist (demux, new_bandwidth - 1, changed);
   }
 
   /* Force typefinding since we might have changed media type */
@@ -1732,42 +1100,44 @@
   return TRUE;
 }
 
+#if defined(HAVE_OPENSSL)
 static gboolean
-gst_hls_demux_switch_playlist (GstHLSDemux * demux)
+gst_hls_demux_decrypt_start (GstHLSDemux * demux, const guint8 * key_data,
+    const guint8 * iv_data)
 {
-  gint64 bitrate;
-
-  /* compare the time when the fragment was downloaded with the time when it was
-   * scheduled */
-  bitrate =
-      (demux->download_total_bytes * 8) / ((double) demux->download_total_time /
-      G_GUINT64_CONSTANT (1000000));
-
-  GST_DEBUG_OBJECT (demux,
-      "Downloaded %u bytes in %" GST_TIME_FORMAT ". Bitrate is : %d",
-      (guint) demux->download_total_bytes,
-      GST_TIME_ARGS (demux->download_total_time * GST_USECOND), (gint) bitrate);
-
-  /* Take old rate into account too */
-  if (demux->current_download_rate != -1)
-    bitrate = (demux->current_download_rate + bitrate * 3) / 4;
-  if (bitrate > G_MAXINT)
-    bitrate = G_MAXINT;
-  demux->current_download_rate = bitrate;
-
-  GST_DEBUG_OBJECT (demux, "Using current download rate: %d", (gint) bitrate);
-
-  GST_M3U8_CLIENT_LOCK (demux->client);
-  if (!demux->client->main->lists) {
-    GST_M3U8_CLIENT_UNLOCK (demux->client);
-    return TRUE;
-  }
-  GST_M3U8_CLIENT_UNLOCK (demux->client);
-
-  return gst_hls_demux_change_playlist (demux, bitrate * demux->bitrate_limit);
+  EVP_CIPHER_CTX_init (&demux->aes_ctx);
+  if (!EVP_DecryptInit_ex (&demux->aes_ctx, EVP_aes_128_cbc (), NULL, key_data,
+          iv_data))
+    return FALSE;
+  EVP_CIPHER_CTX_set_padding (&demux->aes_ctx, 0);
+  return TRUE;
 }
 
-#ifdef HAVE_NETTLE
+static gboolean
+decrypt_fragment (GstHLSDemux * demux, gsize length,
+    const guint8 * encrypted_data, guint8 * decrypted_data)
+{
+  int len, flen = 0;
+
+  if (G_UNLIKELY (length > G_MAXINT || length % 16 != 0))
+    return FALSE;
+
+  len = (int) length;
+  if (!EVP_DecryptUpdate (&demux->aes_ctx, decrypted_data, &len, encrypted_data,
+          len))
+    return FALSE;
+  EVP_DecryptFinal_ex (&demux->aes_ctx, decrypted_data + len, &flen);
+  g_return_val_if_fail (len + flen == length, FALSE);
+  return TRUE;
+}
+
+static void
+gst_hls_demux_decrypt_end (GstHLSDemux * demux)
+{
+  EVP_CIPHER_CTX_cleanup (&demux->aes_ctx);
+}
+
+#elif defined(HAVE_NETTLE)
 static gboolean
 gst_hls_demux_decrypt_start (GstHLSDemux * demux, const guint8 * key_data,
     const guint8 * iv_data)
@@ -1887,196 +1257,20 @@
   return NULL;
 }
 
-static gboolean
-gst_hls_demux_update_source (GstHLSDemux * demux, const gchar * uri,
-    const gchar * referer, gboolean refresh, gboolean allow_cache)
+static gint64
+gst_hls_demux_get_manifest_update_interval (GstAdaptiveDemux * demux)
 {
-  if (!gst_uri_is_valid (uri))
-    return FALSE;
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
 
-  if (demux->src != NULL) {
-    gchar *old_protocol, *new_protocol;
-    gchar *old_uri;
-
-    old_uri = gst_uri_handler_get_uri (GST_URI_HANDLER (demux->src));
-    old_protocol = gst_uri_get_protocol (old_uri);
-    new_protocol = gst_uri_get_protocol (uri);
-
-    if (!g_str_equal (old_protocol, new_protocol)) {
-      gst_object_unref (demux->src_srcpad);
-      gst_element_set_state (demux->src, GST_STATE_NULL);
-      gst_bin_remove (GST_BIN_CAST (demux), demux->src);
-      demux->src = NULL;
-      demux->src_srcpad = NULL;
-      GST_DEBUG_OBJECT (demux, "Can't re-use old source element");
-    } else {
-      GError *err = NULL;
-
-      GST_DEBUG_OBJECT (demux, "Re-using old source element");
-      if (!gst_uri_handler_set_uri (GST_URI_HANDLER (demux->src), uri, &err)) {
-        GST_DEBUG_OBJECT (demux, "Failed to re-use old source element: %s",
-            err->message);
-        g_clear_error (&err);
-        gst_element_set_state (demux->src, GST_STATE_NULL);
-        gst_bin_remove (GST_BIN_CAST (demux), demux->src);
-        demux->src = NULL;
-      }
-    }
-    g_free (old_uri);
-    g_free (old_protocol);
-    g_free (new_protocol);
-  }
-
-  if (demux->src == NULL) {
-    GObjectClass *gobject_class;
-
-    demux->src = gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL);
-    if (demux->src == NULL) {
-      GST_WARNING_OBJECT (demux, "No element to handle uri: %s", uri);
-      return FALSE;
-    }
-
-    gobject_class = G_OBJECT_GET_CLASS (demux->src);
-
-    if (g_object_class_find_property (gobject_class, "compress"))
-      g_object_set (demux->src, "compress", FALSE, NULL);
-    if (g_object_class_find_property (gobject_class, "keep-alive"))
-      g_object_set (demux->src, "keep-alive", TRUE, NULL);
-    if (g_object_class_find_property (gobject_class, "extra-headers")) {
-      if (referer || refresh || !allow_cache) {
-        GstStructure *extra_headers = gst_structure_new_empty ("headers");
-
-        if (referer)
-          gst_structure_set (extra_headers, "Referer", G_TYPE_STRING, referer,
-              NULL);
-
-        if (!allow_cache)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "no-cache", NULL);
-        else if (refresh)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "max-age=0", NULL);
-
-        g_object_set (demux->src, "extra-headers", extra_headers, NULL);
-
-        gst_structure_free (extra_headers);
-      } else {
-        g_object_set (demux->src, "extra-headers", NULL, NULL);
-      }
-    }
-
-    gst_element_set_locked_state (demux->src, TRUE);
-    gst_bin_add (GST_BIN_CAST (demux), demux->src);
-    demux->src_srcpad = gst_element_get_static_pad (demux->src, "src");
-  }
-  return TRUE;
+  return gst_util_uint64_scale (gst_m3u8_client_get_target_duration
+      (hlsdemux->client), G_USEC_PER_SEC, GST_SECOND);
 }
 
 static gboolean
-gst_hls_demux_get_next_fragment (GstHLSDemux * demux,
-    gboolean * end_of_playlist, GError ** err)
+gst_hls_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
+    gint64 * stop)
 {
-  const gchar *next_fragment_uri;
-  GstClockTime duration;
-  GstClockTime timestamp;
-  gboolean discont;
-  gint64 range_start, range_end;
-  const gchar *key = NULL;
-  const guint8 *iv = NULL;
+  GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
 
-  *end_of_playlist = FALSE;
-  if (!gst_m3u8_client_get_next_fragment (demux->client, &discont,
-          &next_fragment_uri, &duration, &timestamp, &range_start, &range_end,
-          &key, &iv, demux->segment.rate > 0)) {
-    GST_INFO_OBJECT (demux, "This playlist doesn't contain more fragments");
-    *end_of_playlist = TRUE;
-    return FALSE;
-  }
-
-  g_mutex_lock (&demux->fragment_download_lock);
-  GST_DEBUG_OBJECT (demux,
-      "Fetching next fragment %s %" GST_TIME_FORMAT "(range=%" G_GINT64_FORMAT
-      "-%" G_GINT64_FORMAT ")", next_fragment_uri, GST_TIME_ARGS (timestamp),
-      range_start, range_end);
-
-  /* set up our source for download */
-  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,
-          FALSE,
-          demux->client->current ? demux->client->current->allowcache : TRUE)) {
-    *err =
-        g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_MISSING_PLUGIN,
-        "Missing plugin to handle URI: '%s'", next_fragment_uri);
-    g_mutex_unlock (&demux->fragment_download_lock);
-    return FALSE;
-  }
-
-  gst_hls_demux_configure_src_pad (demux);
-
-  if (gst_element_set_state (demux->src,
-          GST_STATE_READY) != GST_STATE_CHANGE_FAILURE) {
-    if (range_start != 0 || range_end != -1) {
-      if (!gst_element_send_event (demux->src, gst_event_new_seek (1.0,
-                  GST_FORMAT_BYTES, (GstSeekFlags) GST_SEEK_FLAG_FLUSH,
-                  GST_SEEK_TYPE_SET, range_start, GST_SEEK_TYPE_SET,
-                  range_end))) {
-
-        /* looks like the source can't handle seeks in READY */
-        *err = g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_NOT_IMPLEMENTED,
-            "Source element can't handle range requests");
-        demux->last_ret = GST_FLOW_ERROR;
-      }
-    }
-
-    if (G_LIKELY (demux->last_ret == GST_FLOW_OK)) {
-      /* flush the proxypads so that the EOS state is reset */
-      gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_start ());
-      gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_stop (TRUE));
-
-      demux->download_start_time = g_get_monotonic_time ();
-      gst_element_sync_state_with_parent (demux->src);
-
-      /* wait for the fragment to be completely downloaded */
-      GST_DEBUG_OBJECT (demux, "Waiting for fragment download to finish: %s",
-          next_fragment_uri);
-      g_cond_wait (&demux->fragment_download_cond,
-          &demux->fragment_download_lock);
-    }
-  } else {
-    demux->last_ret = GST_FLOW_CUSTOM_ERROR;
-  }
-  g_mutex_unlock (&demux->fragment_download_lock);
-
-  if (demux->last_ret != GST_FLOW_OK) {
-    gst_element_set_state (demux->src, GST_STATE_NULL);
-    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)
-      demux->segment.position += demux->current_duration;
-  }
-
-  if (demux->last_ret != GST_FLOW_OK)
-    return FALSE;
-
-  return TRUE;
+  return gst_m3u8_client_get_seek_range (hlsdemux->client, start, stop);
 }
diff --git a/ext/hls/gsthlsdemux.h b/ext/hls/gsthlsdemux.h
index 76f6f84..daa3670 100644
--- a/ext/hls/gsthlsdemux.h
+++ b/ext/hls/gsthlsdemux.h
@@ -25,11 +25,12 @@
 #define __GST_HLS_DEMUX_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstadapter.h>
 #include "m3u8.h"
 #include "gstfragmented.h"
-#include <gst/uridownloader/gsturidownloader.h>
-#ifdef HAVE_NETTLE
+#include <gst/adaptivedemux/gstadaptivedemux.h>
+#if defined(HAVE_OPENSSL)
+#include <openssl/evp.h>
+#elif defined(HAVE_NETTLE)
 #include <nettle/aes.h>
 #include <nettle/cbc.h>
 #else
@@ -61,91 +62,39 @@
  */
 struct _GstHLSDemux
 {
-  GstBin parent;
+  GstAdaptiveDemux parent;
 
-  GstPad *sinkpad;
-  GstPad *srcpad;
   gint srcpad_counter;
 
-  gboolean have_group_id;
-  guint group_id;
-
-  GstBuffer *playlist;
-  GstCaps *input_caps;
-  GstUriDownloader *downloader;
   gchar *uri;                   /* Original playlist URI */
   GstM3U8Client *client;        /* M3U8 client */
   gboolean do_typefind;         /* Whether we need to typefind the next buffer */
-  gboolean new_playlist;        /* Whether a new playlist is about to start and pads should be switched */
-
-  /* Properties */
-  guint fragments_cache;        /* number of fragments needed to be cached to start playing */
-  gfloat bitrate_limit;         /* limit of the available bitrate to use */
-  guint connection_speed;       /* Network connection speed in kbps (0 = unknown) */
-
-  /* Streaming task */
-  GstTask *stream_task;
-  GRecMutex stream_lock;
-  gboolean stop_stream_task;
-  GMutex download_lock;         /* Used for protecting queue and the two conds */
-  GCond download_cond;          /* Signalled when something is added to the queue */
-  gboolean end_of_playlist;
-  gint download_failed_count;
-  gint64 next_download;
-
-  /* Updates task */
-  GstTask *updates_task;
-  GRecMutex updates_lock;
-  gint64 next_update;           /* Time of the next update */
-  gboolean stop_updates_task;
-  GMutex updates_timed_lock;
-  GCond updates_timed_cond;     /* Signalled when the playlist should be updated */
-
-  /* Position in the stream */
-  GstSegment segment;
-  gboolean need_segment;
-  gboolean discont;
 
   /* Cache for the last key */
   gchar *key_url;
   GstFragment *key_fragment;
 
-  /* Current download rate (bps) */
-  gint current_download_rate;
-
-  /* fragment download tooling */
-  GstElement *src;
-  GstPad *src_srcpad; /* handy link to src's src pad */
-  GMutex fragment_download_lock;
-  GCond fragment_download_cond;
-  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
+#if defined(HAVE_OPENSSL)
+  EVP_CIPHER_CTX aes_ctx;
+#elif defined(HAVE_NETTLE)
   struct CBC_CTX (struct aes_ctx, AES_BLOCK_SIZE) aes_ctx;
 #else
   gcry_cipher_hd_t aes_ctx;
 #endif
-  const gchar *current_key;
-  const guint8 *current_iv;
-  GstAdapter *adapter; /* used to accumulate 16 bytes multiple chunks */
+  gchar *current_key;
+  guint8 *current_iv;
   GstBuffer *pending_buffer; /* decryption scenario:
                               * the last buffer can only be pushed when
                               * resized, so need to store and wait for
                               * EOS to know it is the last */
+
+  gboolean reset_pts;
 };
 
 struct _GstHLSDemuxClass
 {
-  GstBinClass parent_class;
+  GstAdaptiveDemuxClass parent_class;
 };
 
 GType gst_hls_demux_get_type (void);
diff --git a/ext/hls/gsthlssink.c b/ext/hls/gsthlssink.c
index 44093a6..de5e84c 100644
--- a/ext/hls/gsthlssink.c
+++ b/ext/hls/gsthlssink.c
@@ -51,6 +51,8 @@
 #define DEFAULT_TARGET_DURATION 15
 #define DEFAULT_PLAYLIST_LENGTH 5
 
+#define GST_M3U8_PLAYLIST_VERSION 3
+
 enum
 {
   PROP_0,
@@ -83,6 +85,8 @@
 static GstStateChangeReturn
 gst_hls_sink_change_state (GstElement * element, GstStateChange trans);
 static gboolean schedule_next_key_unit (GstHlsSink * sink);
+static GstFlowReturn gst_hls_sink_chain_list (GstPad * pad, GstObject * parent,
+    GstBufferList * list);
 
 static void
 gst_hls_sink_dispose (GObject * object)
@@ -161,8 +165,9 @@
   g_object_class_install_property (gobject_class, PROP_PLAYLIST_LENGTH,
       g_param_spec_uint ("playlist-length", "Playlist length",
           "Length of HLS playlist. To allow players to conform to section 6.3.3 "
-          "of the HLS specification, this should be at least 3.",
-          1, G_MAXUINT, DEFAULT_PLAYLIST_LENGTH,
+          "of the HLS specification, this should be at least 3. If set to 0, "
+          "the playlist will be infinite.",
+          0, G_MAXUINT, DEFAULT_PLAYLIST_LENGTH,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
@@ -177,6 +182,7 @@
       gst_hls_sink_ghost_event_probe, sink, NULL);
   gst_pad_add_probe (sink->ghostpad, GST_PAD_PROBE_TYPE_BUFFER,
       gst_hls_sink_ghost_buffer_probe, sink, NULL);
+  gst_pad_set_chain_list_function (sink->ghostpad, gst_hls_sink_chain_list);
 
   sink->location = g_strdup (DEFAULT_LOCATION);
   sink->playlist_location = g_strdup (DEFAULT_PLAYLIST_LOCATION);
@@ -204,7 +210,9 @@
 
   if (sink->playlist)
     gst_m3u8_playlist_free (sink->playlist);
-  sink->playlist = gst_m3u8_playlist_new (6, sink->playlist_length, FALSE);
+  sink->playlist =
+      gst_m3u8_playlist_new (GST_M3U8_PLAYLIST_VERSION, sink->playlist_length,
+      FALSE);
 }
 
 static gboolean
@@ -245,6 +253,25 @@
 }
 
 static void
+gst_hls_sink_write_playlist (GstHlsSink * sink)
+{
+  char *playlist_content;
+  GError *error = NULL;
+
+  playlist_content = gst_m3u8_playlist_render (sink->playlist);
+  if (!g_file_set_contents (sink->playlist_location,
+          playlist_content, -1, &error)) {
+    GST_ERROR ("Failed to write playlist: %s", error->message);
+    GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
+        (("Failed to write playlist '%s'."), error->message), (NULL));
+    g_error_free (error);
+    error = NULL;
+  }
+  g_free (playlist_content);
+
+}
+
+static void
 gst_hls_sink_handle_message (GstBin * bin, GstMessage * message)
 {
   GstHlsSink *sink = GST_HLS_SINK_CAST (bin);
@@ -252,12 +279,9 @@
   switch (message->type) {
     case GST_MESSAGE_ELEMENT:
     {
-      GFile *file;
-      const char *filename, *title;
-      char *playlist_content;
+      const char *filename;
       GstClockTime running_time, duration;
       gboolean discont = FALSE;
-      GError *error = NULL;
       gchar *entry_location;
       const GstStructure *structure;
 
@@ -270,8 +294,6 @@
       duration = running_time - sink->last_running_time;
       sink->last_running_time = running_time;
 
-      file = g_file_new_for_path (filename);
-      title = "ciao";
       GST_INFO_OBJECT (sink, "COUNT %d", sink->index);
       if (sink->playlist_root == NULL)
         entry_location = g_path_get_basename (filename);
@@ -281,19 +303,11 @@
         g_free (name);
       }
 
-      gst_m3u8_playlist_add_entry (sink->playlist, entry_location, file,
-          title, duration, sink->index, discont);
+      gst_m3u8_playlist_add_entry (sink->playlist, entry_location,
+          NULL, duration, sink->index, discont);
       g_free (entry_location);
-      playlist_content = gst_m3u8_playlist_render (sink->playlist);
-      if (!g_file_set_contents (sink->playlist_location,
-              playlist_content, -1, &error)) {
-        GST_ERROR ("Failed to write playlist: %s", error->message);
-        GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
-            (("Failed to write playlist '%s'."), error->message), (NULL));
-        g_error_free (error);
-        error = NULL;
-      }
-      g_free (playlist_content);
+
+      gst_hls_sink_write_playlist (sink);
 
       /* multifilesink is starting a new file. It means that upstream sent a key
        * unit and we can schedule the next key unit now.
@@ -308,6 +322,11 @@
       message = NULL;
       break;
     }
+    case GST_MESSAGE_EOS:{
+      sink->playlist->end_list = TRUE;
+      gst_hls_sink_write_playlist (sink);
+      break;
+    }
     default:
       break;
   }
@@ -497,6 +516,19 @@
   return res;
 }
 
+static void
+gst_hls_sink_check_schedule_next_key_unit (GstHlsSink * sink, GstBuffer * buf)
+{
+  GstClockTime timestamp;
+
+  timestamp = GST_BUFFER_TIMESTAMP (buf);
+  if (!GST_CLOCK_TIME_IS_VALID (timestamp))
+    return;
+
+  sink->last_running_time = gst_segment_to_running_time (&sink->segment,
+      GST_FORMAT_TIME, timestamp);
+  schedule_next_key_unit (sink);
+}
 
 static GstPadProbeReturn
 gst_hls_sink_ghost_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
@@ -504,19 +536,45 @@
 {
   GstHlsSink *sink = GST_HLS_SINK_CAST (data);
   GstBuffer *buffer = gst_pad_probe_info_get_buffer (info);
-  GstClockTime timestamp;
 
-  timestamp = GST_BUFFER_TIMESTAMP (buffer);
-  if (sink->target_duration == 0 || !GST_CLOCK_TIME_IS_VALID (timestamp)
-      || sink->waiting_fku)
+  if (sink->target_duration == 0 || sink->waiting_fku)
     return GST_PAD_PROBE_OK;
 
-  sink->last_running_time = gst_segment_to_running_time (&sink->segment,
-      GST_FORMAT_TIME, timestamp);
-  schedule_next_key_unit (sink);
+  gst_hls_sink_check_schedule_next_key_unit (sink, buffer);
   return GST_PAD_PROBE_OK;
 }
 
+static GstFlowReturn
+gst_hls_sink_chain_list (GstPad * pad, GstObject * parent, GstBufferList * list)
+{
+  guint i, len;
+  GstBuffer *buffer;
+  GstFlowReturn ret;
+  GstHlsSink *sink = GST_HLS_SINK_CAST (parent);
+
+  if (sink->target_duration == 0 || sink->waiting_fku)
+    return gst_proxy_pad_chain_list_default (pad, parent, list);
+
+  GST_DEBUG_OBJECT (pad, "chaining each group in list as a merged buffer");
+
+  len = gst_buffer_list_length (list);
+
+  ret = GST_FLOW_OK;
+  for (i = 0; i < len; i++) {
+    buffer = gst_buffer_list_get (list, i);
+
+    if (!sink->waiting_fku)
+      gst_hls_sink_check_schedule_next_key_unit (sink, buffer);
+
+    ret = gst_pad_chain (pad, gst_buffer_ref (buffer));
+    if (ret != GST_FLOW_OK)
+      break;
+  }
+  gst_buffer_list_unref (list);
+
+  return ret;
+}
+
 gboolean
 gst_hls_sink_plugin_init (GstPlugin * plugin)
 {
diff --git a/ext/hls/gstm3u8playlist.c b/ext/hls/gstm3u8playlist.c
index f30a667..f2c556b 100644
--- a/ext/hls/gstm3u8playlist.c
+++ b/ext/hls/gstm3u8playlist.c
@@ -43,19 +43,17 @@
 };
 
 static GstM3U8Entry *
-gst_m3u8_entry_new (const gchar * url, GFile * file, const gchar * title,
+gst_m3u8_entry_new (const gchar * url, const gchar * title,
     gfloat duration, gboolean discontinuous)
 {
   GstM3U8Entry *entry;
 
   g_return_val_if_fail (url != NULL, NULL);
-  g_return_val_if_fail (title != NULL, NULL);
 
   entry = g_new0 (GstM3U8Entry, 1);
   entry->url = g_strdup (url);
   entry->title = g_strdup (title);
   entry->duration = duration;
-  entry->file = file;
   entry->discontinuous = discontinuous;
   return entry;
 }
@@ -67,8 +65,6 @@
 
   g_free (entry->url);
   g_free (entry->title);
-  if (entry->file != NULL)
-    g_object_unref (entry->file);
   g_free (entry);
 }
 
@@ -83,12 +79,12 @@
     return g_strdup_printf ("%s" M3U8_INT_INF_TAG,
         entry->discontinuous ? M3U8_DISCONTINUITY_TAG : "",
         (gint) ((entry->duration + 500 * GST_MSECOND) / GST_SECOND),
-        entry->title, entry->url);
+        entry->title ? entry->title : "", entry->url);
 
   return g_strdup_printf ("%s" M3U8_FLOAT_INF_TAG,
       entry->discontinuous ? M3U8_DISCONTINUITY_TAG : "",
       g_ascii_dtostr (buf, sizeof (buf), (entry->duration / GST_SECOND)),
-      entry->title, entry->url);
+      entry->title ? entry->title : "", entry->url);
 }
 
 GstM3U8Playlist *
@@ -120,21 +116,20 @@
 
 gboolean
 gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
-    const gchar * url, GFile * file, const gchar * title,
+    const gchar * url, const gchar * title,
     gfloat duration, guint index, gboolean discontinuous)
 {
   GstM3U8Entry *entry;
 
   g_return_val_if_fail (playlist != NULL, FALSE);
   g_return_val_if_fail (url != NULL, FALSE);
-  g_return_val_if_fail (title != NULL, FALSE);
 
   if (playlist->type == GST_M3U8_PLAYLIST_TYPE_VOD)
     return FALSE;
 
-  entry = gst_m3u8_entry_new (url, file, title, duration, discontinuous);
+  entry = gst_m3u8_entry_new (url, title, duration, discontinuous);
 
-  if (playlist->window_size != -1) {
+  if (playlist->window_size > 0) {
     /* Delete old entries from the playlist */
     while (playlist->entries->length >= playlist->window_size) {
       GstM3U8Entry *old_entry;
diff --git a/ext/hls/gstm3u8playlist.h b/ext/hls/gstm3u8playlist.h
index bc81aed..0e95132 100644
--- a/ext/hls/gstm3u8playlist.h
+++ b/ext/hls/gstm3u8playlist.h
@@ -36,7 +36,6 @@
   gfloat duration;
   gchar *title;
   gchar *url;
-  GFile *file;
   gboolean discontinuous;
 };
 
@@ -61,7 +60,6 @@
 void gst_m3u8_playlist_free (GstM3U8Playlist * playlist);
 gboolean gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
     				     const gchar * url,
-    				     GFile * file,
 				     const gchar *title,
 				     gfloat duration,
 				     guint index,
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index 7fa9699..b931749 100644
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -51,8 +51,8 @@
 
 static GstM3U8 *gst_m3u8_new (void);
 static void gst_m3u8_free (GstM3U8 * m3u8);
-static gboolean gst_m3u8_update (GstM3U8 * m3u8, gchar * data,
-    gboolean * updated);
+static gboolean gst_m3u8_update (GstM3U8Client * client, GstM3U8 * m3u8,
+    gchar * data, gboolean * updated);
 static GstM3U8MediaFile *gst_m3u8_media_file_new (gchar * uri,
     gchar * title, GstClockTime duration, guint sequence);
 static void gst_m3u8_media_file_free (GstM3U8MediaFile * self);
@@ -382,7 +382,8 @@
  * @data: a m3u8 playlist text data, taking ownership
  */
 static gboolean
-gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
+gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data,
+    gboolean * updated)
 {
   gint val;
   GstClockTime duration;
@@ -418,11 +419,13 @@
   g_free (self->last_data);
   self->last_data = data;
 
+  client->current_file = NULL;
   if (self->files) {
     g_list_foreach (self->files, (GFunc) gst_m3u8_media_file_free, NULL);
     g_list_free (self->files);
     self->files = NULL;
   }
+  client->duration = GST_CLOCK_TIME_NONE;
 
   /* By default, allow caching */
   self->allowcache = TRUE;
@@ -486,8 +489,7 @@
           if (offset != -1) {
             file->offset = offset;
           } else {
-            GstM3U8MediaFile *prev =
-                self->files ? g_list_last (self->files)->data : NULL;
+            GstM3U8MediaFile *prev = self->files ? self->files->data : NULL;
 
             if (!prev) {
               offset = 0;
@@ -507,156 +509,9 @@
         title = NULL;
         discontinuity = FALSE;
         size = offset = -1;
-        self->files = g_list_append (self->files, file);
+        self->files = g_list_prepend (self->files, file);
       }
 
-    } else if (g_str_has_prefix (data, "#EXT-X-ENDLIST")) {
-      self->endlist = TRUE;
-    } else if (g_str_has_prefix (data, "#EXT-X-VERSION:")) {
-      if (int_from_string (data + 15, &data, &val))
-        self->version = val;
-    } else if (g_str_has_prefix (data, "#EXT-X-STREAM-INF:") ||
-        g_str_has_prefix (data, "#EXT-X-I-FRAME-STREAM-INF:")) {
-      gchar *v, *a;
-      gboolean iframe = g_str_has_prefix (data, "#EXT-X-I-FRAME-STREAM-INF:");
-      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)) {
-        if (g_str_equal (a, "BANDWIDTH")) {
-          if (!int_from_string (v, NULL, &new_list->bandwidth))
-            GST_WARNING ("Error while reading BANDWIDTH");
-        } else if (g_str_equal (a, "PROGRAM-ID")) {
-          if (!int_from_string (v, NULL, &new_list->program_id))
-            GST_WARNING ("Error while reading PROGRAM-ID");
-        } else if (g_str_equal (a, "CODECS")) {
-          g_free (new_list->codecs);
-          new_list->codecs = g_strdup (v);
-        } else if (g_str_equal (a, "RESOLUTION")) {
-          if (!int_from_string (v, &v, &new_list->width))
-            GST_WARNING ("Error while reading RESOLUTION width");
-          if (!v || *v != 'x') {
-            GST_WARNING ("Missing height");
-          } else {
-            v = g_utf8_next_char (v);
-            if (!int_from_string (v, NULL, &new_list->height))
-              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;
-
-          uri = unquote_string (uri);
-          if (uri) {
-            uri = uri_join (self->base_uri ? self->base_uri : 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 (iframe) {
-        if (g_list_find_custom (self->iframe_lists, new_list->uri,
-                (GCompareFunc) _m3u8_compare_uri)) {
-          GST_DEBUG ("Already have a list with this URI");
-          gst_m3u8_free (new_list);
-        } else {
-          self->iframe_lists = g_list_append (self->iframe_lists, new_list);
-        }
-      } else if (list != NULL) {
-        GST_WARNING ("Found a list without a uri..., dropping");
-        gst_m3u8_free (list);
-      } else {
-        list = new_list;
-      }
-    } else if (g_str_has_prefix (data, "#EXT-X-TARGETDURATION:")) {
-      if (int_from_string (data + 22, &data, &val))
-        self->targetduration = val * GST_SECOND;
-    } else if (g_str_has_prefix (data, "#EXT-X-MEDIA-SEQUENCE:")) {
-      if (int_from_string (data + 22, &data, &val))
-        self->mediasequence = val;
-    } else if (g_str_has_prefix (data, "#EXT-X-DISCONTINUITY")) {
-      discontinuity = TRUE;
-    } else if (g_str_has_prefix (data, "#EXT-X-PROGRAM-DATE-TIME:")) {
-      /* <YYYY-MM-DDThh:mm:ssZ> */
-      GST_DEBUG ("FIXME parse date");
-    } else if (g_str_has_prefix (data, "#EXT-X-ALLOW-CACHE:")) {
-      self->allowcache = g_ascii_strcasecmp (data + 19, "YES") == 0;
-    } else if (g_str_has_prefix (data, "#EXT-X-KEY:")) {
-      gchar *v, *a;
-
-      data = data + 11;
-
-      /* IV and KEY are only valid until the next #EXT-X-KEY */
-      have_iv = FALSE;
-      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;
-
-          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;
-          gint i;
-
-          if (strlen (ivp) < 32 + 2 || (!g_str_has_prefix (ivp, "0x")
-                  && !g_str_has_prefix (ivp, "0X"))) {
-            GST_WARNING ("Can't read IV");
-            continue;
-          }
-
-          ivp += 2;
-          for (i = 0; i < 16; i++) {
-            gint h, l;
-
-            h = g_ascii_xdigit_value (*ivp);
-            ivp++;
-            l = g_ascii_xdigit_value (*ivp);
-            ivp++;
-            if (h == -1 || l == -1) {
-              i = -1;
-              break;
-            }
-            iv[i] = (h << 4) | l;
-          }
-
-          if (i == -1) {
-            GST_WARNING ("Can't read IV");
-            continue;
-          }
-          have_iv = TRUE;
-        } else if (g_str_equal (a, "METHOD")) {
-          if (!g_str_equal (v, "AES-128")) {
-            GST_WARNING ("Encryption method %s not supported", v);
-            continue;
-          }
-        }
-      }
     } else if (g_str_has_prefix (data, "#EXTINF:")) {
       gdouble fval;
       if (!double_from_string (data + 8, &data, &fval)) {
@@ -664,8 +519,11 @@
         goto next_line;
       }
       duration = fval * (gdouble) GST_SECOND;
-      if (duration > self->targetduration)
-        GST_WARNING ("EXTINF duration > TARGETDURATION");
+      if (self->targetduration > 0 && duration > self->targetduration) {
+        GST_WARNING ("EXTINF duration (%" GST_TIME_FORMAT
+            ") > TARGETDURATION (%" GST_TIME_FORMAT ")",
+            GST_TIME_ARGS (duration), GST_TIME_ARGS (self->targetduration));
+      }
       if (!data || *data != ',')
         goto next_line;
       data = g_utf8_next_char (data);
@@ -673,14 +531,166 @@
         g_free (title);
         title = g_strdup (data);
       }
-    } else if (g_str_has_prefix (data, "#EXT-X-BYTERANGE:")) {
-      gchar *v = data + 17;
+    } else if (g_str_has_prefix (data, "#EXT-X-")) {
+      gchar *data_ext_x = data + 7;
 
-      if (int64_from_string (v, &v, &size)) {
-        if (*v == '@' && !int64_from_string (v + 1, &v, &offset))
+      /* All these entries start with #EXT-X- */
+      if (g_str_has_prefix (data_ext_x, "ENDLIST")) {
+        self->endlist = TRUE;
+      } else if (g_str_has_prefix (data_ext_x, "VERSION:")) {
+        if (int_from_string (data + 15, &data, &val))
+          self->version = val;
+      } else if (g_str_has_prefix (data_ext_x, "STREAM-INF:") ||
+          g_str_has_prefix (data_ext_x, "I-FRAME-STREAM-INF:")) {
+        gchar *v, *a;
+        gboolean iframe = g_str_has_prefix (data_ext_x, "I-FRAME-STREAM-INF:");
+        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)) {
+          if (g_str_equal (a, "BANDWIDTH")) {
+            if (!int_from_string (v, NULL, &new_list->bandwidth))
+              GST_WARNING ("Error while reading BANDWIDTH");
+          } else if (g_str_equal (a, "PROGRAM-ID")) {
+            if (!int_from_string (v, NULL, &new_list->program_id))
+              GST_WARNING ("Error while reading PROGRAM-ID");
+          } else if (g_str_equal (a, "CODECS")) {
+            g_free (new_list->codecs);
+            new_list->codecs = g_strdup (v);
+          } else if (g_str_equal (a, "RESOLUTION")) {
+            if (!int_from_string (v, &v, &new_list->width))
+              GST_WARNING ("Error while reading RESOLUTION width");
+            if (!v || *v != 'x') {
+              GST_WARNING ("Missing height");
+            } else {
+              v = g_utf8_next_char (v);
+              if (!int_from_string (v, NULL, &new_list->height))
+                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;
+
+            uri = unquote_string (uri);
+            if (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 (iframe) {
+          if (g_list_find_custom (self->iframe_lists, new_list->uri,
+                  (GCompareFunc) _m3u8_compare_uri)) {
+            GST_DEBUG ("Already have a list with this URI");
+            gst_m3u8_free (new_list);
+          } else {
+            self->iframe_lists = g_list_append (self->iframe_lists, new_list);
+          }
+        } else if (list != NULL) {
+          GST_WARNING ("Found a list without a uri..., dropping");
+          gst_m3u8_free (list);
+        } else {
+          list = new_list;
+        }
+      } else if (g_str_has_prefix (data_ext_x, "TARGETDURATION:")) {
+        if (int_from_string (data + 22, &data, &val))
+          self->targetduration = val * GST_SECOND;
+      } else if (g_str_has_prefix (data_ext_x, "MEDIA-SEQUENCE:")) {
+        if (int_from_string (data + 22, &data, &val))
+          self->mediasequence = val;
+      } else if (g_str_has_prefix (data_ext_x, "DISCONTINUITY")) {
+        discontinuity = TRUE;
+      } else if (g_str_has_prefix (data_ext_x, "PROGRAM-DATE-TIME:")) {
+        /* <YYYY-MM-DDThh:mm:ssZ> */
+        GST_DEBUG ("FIXME parse date");
+      } else if (g_str_has_prefix (data_ext_x, "ALLOW-CACHE:")) {
+        self->allowcache = g_ascii_strcasecmp (data + 19, "YES") == 0;
+      } else if (g_str_has_prefix (data_ext_x, "KEY:")) {
+        gchar *v, *a;
+
+        data = data + 11;
+
+        /* IV and KEY are only valid until the next #EXT-X-KEY */
+        have_iv = FALSE;
+        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;
+
+            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;
+            gint i;
+
+            if (strlen (ivp) < 32 + 2 || (!g_str_has_prefix (ivp, "0x")
+                    && !g_str_has_prefix (ivp, "0X"))) {
+              GST_WARNING ("Can't read IV");
+              continue;
+            }
+
+            ivp += 2;
+            for (i = 0; i < 16; i++) {
+              gint h, l;
+
+              h = g_ascii_xdigit_value (*ivp);
+              ivp++;
+              l = g_ascii_xdigit_value (*ivp);
+              ivp++;
+              if (h == -1 || l == -1) {
+                i = -1;
+                break;
+              }
+              iv[i] = (h << 4) | l;
+            }
+
+            if (i == -1) {
+              GST_WARNING ("Can't read IV");
+              continue;
+            }
+            have_iv = TRUE;
+          } else if (g_str_equal (a, "METHOD")) {
+            if (!g_str_equal (v, "AES-128")) {
+              GST_WARNING ("Encryption method %s not supported", v);
+              continue;
+            }
+          }
+        }
+      } else if (g_str_has_prefix (data_ext_x, "BYTERANGE:")) {
+        gchar *v = data + 17;
+
+        if (int64_from_string (v, &v, &size)) {
+          if (*v == '@' && !int64_from_string (v + 1, &v, &offset))
+            goto next_line;
+        } else {
           goto next_line;
+        }
       } else {
-        goto next_line;
+        GST_LOG ("Ignored line: %s", data);
       }
     } else {
       GST_LOG ("Ignored line: %s", data);
@@ -695,6 +705,8 @@
   g_free (current_key);
   current_key = NULL;
 
+  self->files = g_list_reverse (self->files);
+
   /* reorder playlists by bitrate */
   if (self->lists) {
     gchar *top_variant_uri = NULL;
@@ -723,6 +735,38 @@
       self->current_variant = g_list_find_custom (self->lists, top_variant_uri,
           (GCompareFunc) _m3u8_compare_uri);
   }
+  /* calculate the start and end times of this media playlist. */
+  if (self->files) {
+    GList *walk;
+    GstM3U8MediaFile *file;
+    GstClockTime duration = 0;
+
+    for (walk = self->files; walk; walk = walk->next) {
+      file = walk->data;
+      duration += file->duration;
+      if (file->sequence > client->highest_sequence_number) {
+        if (client->highest_sequence_number >= 0) {
+          /* if an update of the media playlist has been missed, there
+             will be a gap between self->highest_sequence_number and the
+             first sequence number in this media playlist. In this situation
+             assume that the missing fragments had a duration of
+             targetduration each */
+          client->last_file_end +=
+              (file->sequence - client->highest_sequence_number -
+              1) * self->targetduration;
+        }
+        client->last_file_end += file->duration;
+        client->highest_sequence_number = file->sequence;
+      }
+    }
+    if (GST_M3U8_CLIENT_IS_LIVE (client)) {
+      client->first_file_start = client->last_file_end - duration;
+      GST_DEBUG ("Live playlist range %" GST_TIME_FORMAT " -> %"
+          GST_TIME_FORMAT, GST_TIME_ARGS (client->first_file_start),
+          GST_TIME_ARGS (client->last_file_end));
+    }
+    client->duration = duration;
+  }
 
   return TRUE;
 }
@@ -737,9 +781,12 @@
   client = g_new0 (GstM3U8Client, 1);
   client->main = gst_m3u8_new ();
   client->current = NULL;
+  client->current_file = NULL;
   client->sequence = -1;
   client->sequence_position = 0;
   client->update_failed_count = 0;
+  client->highest_sequence_number = -1;
+  client->duration = GST_CLOCK_TIME_NONE;
   g_mutex_init (&client->lock);
   gst_m3u8_set_uri (client->main, g_strdup (uri), g_strdup (base_uri), NULL);
 
@@ -765,6 +812,8 @@
   if (m3u8 != self->current) {
     self->current = m3u8;
     self->update_failed_count = 0;
+    self->duration = GST_CLOCK_TIME_NONE;
+    self->current_file = NULL;
   }
   GST_M3U8_CLIENT_UNLOCK (self);
 }
@@ -781,7 +830,7 @@
   GST_M3U8_CLIENT_LOCK (self);
   m3u8 = self->current ? self->current : self->main;
 
-  if (!gst_m3u8_update (m3u8, data, &updated))
+  if (!gst_m3u8_update (self, m3u8, data, &updated))
     goto out;
 
   if (!updated) {
@@ -804,8 +853,16 @@
   }
 
   if (m3u8->files && self->sequence == -1) {
-    self->sequence =
-        GST_M3U8_MEDIA_FILE (g_list_first (m3u8->files)->data)->sequence;
+    if (GST_M3U8_CLIENT_IS_LIVE (self)) {
+      /* for live streams, start GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE from
+         the end of the playlist. See section 6.3.3 of HLS draft */
+      gint pos =
+          g_list_length (m3u8->files) - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE;
+      self->current_file = g_list_nth (m3u8->files, pos >= 0 ? pos : 0);
+    } else {
+      self->current_file = g_list_first (m3u8->files);
+    }
+    self->sequence = GST_M3U8_MEDIA_FILE (self->current_file->data)->sequence;
     self->sequence_position = 0;
     GST_DEBUG ("Setting first sequence at %u", (guint) self->sequence);
   }
@@ -870,15 +927,16 @@
     }
 
     if (unmatched_lists != NULL) {
-      g_list_free (unmatched_lists);
+      GST_WARNING ("Unable to match all playlists");
 
-      /* 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;
+      for (list_entry = unmatched_lists; list_entry;
+          list_entry = list_entry->next) {
+        if (list_entry->data == self->current) {
+          GST_WARNING ("Unable to match current playlist");
+        }
+      }
+
+      g_list_free (unmatched_lists);
     }
 
     /* Switch out the variant playlist */
@@ -913,30 +971,49 @@
 {
   GstM3U8MediaFile *file;
 
-  if (!forward)
+  if (forward) {
+    while (l) {
+      file = l->data;
+
+      if (file->sequence >= client->sequence)
+        break;
+
+      l = l->next;
+    }
+  } else {
     l = g_list_last (l);
 
-  while (l) {
-    file = l->data;
+    while (l) {
+      file = l->data;
 
-    if (forward && file->sequence >= client->sequence)
-      break;
-    else if (!forward && file->sequence <= client->sequence)
-      break;
+      if (file->sequence <= client->sequence)
+        break;
 
-    l = (forward ? l->next : l->prev);
+      l = l->prev;
+    }
   }
 
   return l;
 }
 
+static gboolean
+has_next_fragment (GstM3U8Client * client, GList * l, gboolean forward)
+{
+  l = find_next_fragment (client, l, forward);
+
+  if (l) {
+    return (forward && l->next) || (!forward && l->prev);
+  }
+
+  return FALSE;
+}
+
 gboolean
 gst_m3u8_client_get_next_fragment (GstM3U8Client * client,
-    gboolean * discontinuity, const gchar ** uri, GstClockTime * duration,
+    gboolean * discontinuity, gchar ** uri, GstClockTime * duration,
     GstClockTime * timestamp, gint64 * range_start, gint64 * range_end,
-    const gchar ** key, const guint8 ** iv, gboolean forward)
+    gchar ** key, guint8 ** iv, gboolean forward)
 {
-  GList *l;
   GstM3U8MediaFile *file;
 
   g_return_val_if_fail (client != NULL, FALSE);
@@ -948,13 +1025,17 @@
     GST_M3U8_CLIENT_UNLOCK (client);
     return FALSE;
   }
-  l = find_next_fragment (client, client->current->files, forward);
-  if (!l) {
+  if (!client->current_file) {
+    client->current_file =
+        find_next_fragment (client, client->current->files, forward);
+  }
+
+  if (!client->current_file) {
     GST_M3U8_CLIENT_UNLOCK (client);
     return FALSE;
   }
 
-  file = GST_M3U8_MEDIA_FILE (l->data);
+  file = GST_M3U8_MEDIA_FILE (client->current_file->data);
   GST_DEBUG ("Got fragment with sequence %u (client sequence %u)",
       (guint) file->sequence, (guint) client->sequence);
 
@@ -964,7 +1045,7 @@
   if (discontinuity)
     *discontinuity = client->sequence != file->sequence || file->discont;
   if (uri)
-    *uri = file->uri;
+    *uri = g_strdup (file->uri);
   if (duration)
     *duration = file->duration;
   if (range_start)
@@ -972,9 +1053,11 @@
   if (range_end)
     *range_end = file->size != -1 ? file->offset + file->size - 1 : -1;
   if (key)
-    *key = file->key;
-  if (iv)
-    *iv = file->iv;
+    *key = g_strdup (file->key);
+  if (iv) {
+    *iv = g_new (guint8, sizeof (file->iv));
+    memcpy (*iv, file->iv, sizeof (file->iv));
+  }
 
   client->sequence = file->sequence;
 
@@ -982,32 +1065,108 @@
   return TRUE;
 }
 
+gboolean
+gst_m3u8_client_has_next_fragment (GstM3U8Client * client, gboolean forward)
+{
+  gboolean ret;
+
+  g_return_val_if_fail (client != NULL, FALSE);
+  g_return_val_if_fail (client->current != NULL, FALSE);
+
+  GST_M3U8_CLIENT_LOCK (client);
+  GST_DEBUG ("Checking if has next fragment %" G_GINT64_FORMAT,
+      client->sequence + (forward ? 1 : -1));
+  if (client->current_file) {
+    ret =
+        (forward ? client->current_file->next : client->current_file->prev) !=
+        NULL;
+  } else {
+    ret = has_next_fragment (client, client->current->files, forward);
+  }
+  GST_M3U8_CLIENT_UNLOCK (client);
+  return ret;
+}
+
+static void
+alternate_advance (GstM3U8Client * client, gboolean forward)
+{
+  gint targetnum = client->sequence;
+  GList *tmp;
+  GstM3U8MediaFile *mf;
+
+  /* figure out the target seqnum */
+  if (forward)
+    targetnum += 1;
+  else
+    targetnum -= 1;
+
+  for (tmp = client->current->files; tmp; tmp = tmp->next) {
+    mf = (GstM3U8MediaFile *) tmp->data;
+    if (mf->sequence == targetnum)
+      break;
+  }
+  if (tmp == NULL) {
+    GST_WARNING ("Can't find next fragment");
+    return;
+  }
+  client->current_file = tmp;
+  client->sequence = targetnum;
+  if (forward)
+    client->sequence_position += mf->duration;
+  else {
+    if (client->sequence_position > mf->duration)
+      client->sequence_position -= mf->duration;
+    else
+      client->sequence_position = 0;
+  }
+}
+
 void
 gst_m3u8_client_advance_fragment (GstM3U8Client * client, gboolean forward)
 {
-  GList *l;
   GstM3U8MediaFile *file;
 
   g_return_if_fail (client != NULL);
   g_return_if_fail (client->current != NULL);
 
   GST_M3U8_CLIENT_LOCK (client);
-  GST_DEBUG ("Looking for fragment %" G_GINT64_FORMAT, client->sequence);
-  l = g_list_find_custom (client->current->files, client,
-      (GCompareFunc) _find_current);
-  if (l == NULL) {
-    GST_ERROR ("Could not find current fragment");
-    GST_M3U8_CLIENT_UNLOCK (client);
-    return;
+  if (!client->current_file) {
+    GList *l;
+
+    GST_DEBUG ("Looking for fragment %" G_GINT64_FORMAT, client->sequence);
+    l = g_list_find_custom (client->current->files, client,
+        (GCompareFunc) _find_current);
+    if (l == NULL) {
+      GST_DEBUG
+          ("Could not find current fragment, trying next fragment directly");
+      alternate_advance (client, forward);
+      GST_M3U8_CLIENT_UNLOCK (client);
+      return;
+    }
+    client->current_file = l;
   }
 
-  file = GST_M3U8_MEDIA_FILE (l->data);
+  file = GST_M3U8_MEDIA_FILE (client->current_file->data);
   GST_DEBUG ("Advancing from sequence %u", (guint) file->sequence);
   if (forward) {
-    client->sequence = file->sequence + 1;
+    client->current_file = client->current_file->next;
+    if (client->current_file) {
+      client->sequence =
+          GST_M3U8_MEDIA_FILE (client->current_file->data)->sequence;
+    } else {
+      client->sequence = file->sequence + 1;
+    }
+
     client->sequence_position += file->duration;
   } else {
-    client->sequence = file->sequence - 1;
+    client->current_file = client->current_file->prev;
+    if (client->current_file) {
+      client->sequence =
+          GST_M3U8_MEDIA_FILE (client->current_file->data)->sequence;
+    } else {
+      client->sequence = file->sequence - 1;
+    }
+
     if (client->sequence_position > file->duration)
       client->sequence_position -= file->duration;
     else
@@ -1025,7 +1184,7 @@
 GstClockTime
 gst_m3u8_client_get_duration (GstM3U8Client * client)
 {
-  GstClockTime duration = 0;
+  GstClockTime duration = GST_CLOCK_TIME_NONE;
 
   g_return_val_if_fail (client != NULL, GST_CLOCK_TIME_NONE);
 
@@ -1035,9 +1194,15 @@
     GST_M3U8_CLIENT_UNLOCK (client);
     return GST_CLOCK_TIME_NONE;
   }
-  if (client->current->files)
-    g_list_foreach (client->current->files, (GFunc) _sum_duration, &duration);
+
+  if (!GST_CLOCK_TIME_IS_VALID (client->duration) && client->current->files) {
+    client->duration = 0;
+    g_list_foreach (client->current->files, (GFunc) _sum_duration,
+        &client->duration);
+  }
+  duration = client->duration;
   GST_M3U8_CLIENT_UNLOCK (client);
+
   return duration;
 }
 
@@ -1054,33 +1219,49 @@
   return duration;
 }
 
-const gchar *
+gchar *
 gst_m3u8_client_get_uri (GstM3U8Client * client)
 {
-  const gchar *uri;
+  gchar *uri;
 
   g_return_val_if_fail (client != NULL, NULL);
 
   GST_M3U8_CLIENT_LOCK (client);
-  uri = client->main->uri;
+  uri = client->main ? g_strdup (client->main->uri) : NULL;
   GST_M3U8_CLIENT_UNLOCK (client);
   return uri;
 }
 
-const gchar *
+gchar *
 gst_m3u8_client_get_current_uri (GstM3U8Client * client)
 {
-  const gchar *uri;
+  gchar *uri;
 
   g_return_val_if_fail (client != NULL, NULL);
 
   GST_M3U8_CLIENT_LOCK (client);
-  uri = client->current->uri;
+  uri = g_strdup (client->current->uri);
   GST_M3U8_CLIENT_UNLOCK (client);
   return uri;
 }
 
 gboolean
+gst_m3u8_client_has_main (GstM3U8Client * client)
+{
+  gboolean ret;
+
+  g_return_val_if_fail (client != NULL, FALSE);
+
+  GST_M3U8_CLIENT_LOCK (client);
+  if (client->main)
+    ret = TRUE;
+  else
+    ret = FALSE;
+  GST_M3U8_CLIENT_UNLOCK (client);
+  return ret;
+}
+
+gboolean
 gst_m3u8_client_has_variant_playlist (GstM3U8Client * client)
 {
   gboolean ret;
@@ -1101,10 +1282,7 @@
   g_return_val_if_fail (client != NULL, FALSE);
 
   GST_M3U8_CLIENT_LOCK (client);
-  if (!client->current || client->current->endlist)
-    ret = FALSE;
-  else
-    ret = TRUE;
+  ret = GST_M3U8_CLIENT_IS_LIVE (client);
   GST_M3U8_CLIENT_UNLOCK (client);
   return ret;
 }
@@ -1213,3 +1391,43 @@
   GST_M3U8_CLIENT_UNLOCK (client);
   return dur;
 }
+
+gboolean
+gst_m3u8_client_get_seek_range (GstM3U8Client * client, gint64 * start,
+    gint64 * stop)
+{
+  GstClockTime duration = 0;
+  GList *walk;
+  GstM3U8MediaFile *file;
+  guint count;
+
+  g_return_val_if_fail (client != NULL, FALSE);
+
+  GST_M3U8_CLIENT_LOCK (client);
+
+  if (client->current == NULL || client->current->files == NULL) {
+    GST_M3U8_CLIENT_UNLOCK (client);
+    return FALSE;
+  }
+
+  count = g_list_length (client->current->files);
+
+  /* count is used to make sure the seek range is never closer than
+     GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments from the end of the
+     playlist - see 6.3.3. "Playing the Playlist file" of the HLS draft */
+  for (walk = client->current->files;
+      walk && count >= GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE; walk = walk->next) {
+    file = walk->data;
+    --count;
+    duration += file->duration;
+  }
+
+  if (duration <= 0) {
+    GST_M3U8_CLIENT_UNLOCK (client);
+    return FALSE;
+  }
+  *start = client->first_file_start;
+  *stop = *start + duration;
+  GST_M3U8_CLIENT_UNLOCK (client);
+  return TRUE;
+}
diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h
index 2344b22..6c4b6c6 100644
--- a/ext/hls/m3u8.h
+++ b/ext/hls/m3u8.h
@@ -35,6 +35,19 @@
 #define GST_M3U8_CLIENT_LOCK(c) g_mutex_lock (&c->lock);
 #define GST_M3U8_CLIENT_UNLOCK(c) g_mutex_unlock (&c->lock);
 
+#define GST_M3U8_CLIENT_IS_LIVE(c) ((!(c)->current || (c)->current->endlist) ? FALSE : TRUE)
+/* hlsdemux must not get closer to the end of a live stream than
+   GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments. Section 6.3.3
+   "Playing the Playlist file" of the HLS draft states that this
+   value is three fragments */
+#define GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE 3
+
+/* hlsdemux must not get closer to the end of a live stream than
+   GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments. Section 6.3.3
+   "Playing the Playlist file" of the HLS draft states that this
+   value is three fragments */
+#define GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE 3
+
 struct _GstM3U8
 {
   gchar *uri;                   /* actually downloaded URI */
@@ -82,8 +95,13 @@
   GstM3U8 *main;                /* main playlist */
   GstM3U8 *current;
   guint update_failed_count;
+  GList *current_file;
   gint64 sequence;              /* the next sequence for this client */
   GstClockTime sequence_position; /* position of this sequence */
+  gint64 highest_sequence_number; /* largest seen sequence number */
+  GstClockTime first_file_start; /* timecode of the start of the first fragment in the current media playlist */
+  GstClockTime last_file_end; /* timecode of the end of the last fragment in the current media playlist */
+  GstClockTime duration; /* cached total duration */
   GMutex lock;
 };
 
@@ -94,14 +112,16 @@
 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,
+    gboolean * discontinuity, gchar ** uri, GstClockTime * duration,
     GstClockTime * timestamp, gint64 * range_start, gint64 * range_end,
-    const gchar ** key, const guint8 ** iv, gboolean forward);
+    gchar ** key, guint8 ** iv, gboolean forward);
+gboolean gst_m3u8_client_has_next_fragment (GstM3U8Client * client, gboolean forward);
 void gst_m3u8_client_advance_fragment (GstM3U8Client * client, gboolean forward);
 GstClockTime gst_m3u8_client_get_duration (GstM3U8Client * client);
 GstClockTime gst_m3u8_client_get_target_duration (GstM3U8Client * client);
-const gchar *gst_m3u8_client_get_uri(GstM3U8Client * client);
-const gchar *gst_m3u8_client_get_current_uri(GstM3U8Client * client);
+gchar *gst_m3u8_client_get_uri(GstM3U8Client * client);
+gchar *gst_m3u8_client_get_current_uri(GstM3U8Client * client);
+gboolean gst_m3u8_client_has_main(GstM3U8Client * client);
 gboolean gst_m3u8_client_has_variant_playlist(GstM3U8Client * client);
 gboolean gst_m3u8_client_is_live(GstM3U8Client * client);
 GList * gst_m3u8_client_get_playlist_for_bitrate (GstM3U8Client * client,
@@ -109,5 +129,7 @@
 
 guint64 gst_m3u8_client_get_current_fragment_duration (GstM3U8Client * client);
 
+gboolean gst_m3u8_client_get_seek_range(GstM3U8Client * client, gint64 * start, gint64 * stop);
+
 G_END_DECLS
 #endif /* __M3U8_H__ */
diff --git a/ext/kate/Makefile.in b/ext/kate/Makefile.in
index 02809b3..8b9857a 100644
--- a/ext/kate/Makefile.in
+++ b/ext/kate/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/kate
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -233,6 +243,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -250,8 +261,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -276,8 +289,6 @@
 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@
@@ -290,7 +301,6 @@
 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@
@@ -298,6 +308,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -324,11 +336,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -347,8 +362,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -407,10 +420,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -427,7 +444,6 @@
 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@
@@ -436,7 +452,6 @@
 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@
@@ -449,7 +464,6 @@
 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@
@@ -463,6 +477,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -474,6 +489,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -512,6 +529,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -547,10 +565,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -576,6 +598,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -583,7 +608,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -612,6 +644,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -622,6 +655,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -652,17 +686,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -679,6 +712,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -717,6 +751,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -763,7 +798,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/kate/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/kate/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1120,6 +1154,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c
index cb89e0c..8748498 100644
--- a/ext/kate/gstkatedec.c
+++ b/ext/kate/gstkatedec.c
@@ -237,6 +237,114 @@
   }
 }
 
+static GstFlowReturn
+gst_kate_dec_handle_kate_event (GstKateDec * kd, const kate_event * ev)
+{
+  GstFlowReturn rflow = GST_FLOW_OK;
+  GstKateFormat format = GST_KATE_FORMAT_UNDEFINED;
+  gchar *escaped;
+  GstBuffer *buffer;
+  size_t len;
+  gboolean plain = TRUE;
+
+  if (kd->remove_markup && ev->text_markup_type != kate_markup_none) {
+    size_t len0 = ev->len + 1;
+    escaped = g_strdup (ev->text);
+    if (escaped) {
+      kate_text_remove_markup (ev->text_encoding, escaped, &len0);
+    }
+    plain = TRUE;
+  } else if (ev->text_markup_type == kate_markup_none) {
+    /* no pango markup yet, escape text */
+    /* TODO: actually do the pango thing */
+    escaped = g_strdup (ev->text);
+    plain = TRUE;
+  } else {
+    escaped = g_strdup (ev->text);
+    plain = FALSE;
+  }
+
+  if (G_LIKELY (escaped)) {
+    len = strlen (escaped);
+    if (len > 0) {
+      GST_DEBUG_OBJECT (kd, "kate event: %s, escaped %s", ev->text, escaped);
+      buffer = gst_buffer_new_and_alloc (len + 1);
+      if (G_LIKELY (buffer)) {
+        GstCaps *caps;
+        if (plain)
+          format = GST_KATE_FORMAT_TEXT_UTF8;
+        else
+          format = GST_KATE_FORMAT_TEXT_PANGO_MARKUP;
+        if (format != kd->output_format) {
+          caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
+              (format == GST_KATE_FORMAT_TEXT_UTF8) ? "utf8" : "pango-markup",
+              NULL);
+          gst_pad_push_event (kd->srcpad, gst_event_new_caps (caps));
+          gst_caps_unref (caps);
+          kd->output_format = format;
+        }
+        /* allocate and copy the NULs, but don't include them in passed size */
+        gst_buffer_fill (buffer, 0, escaped, len + 1);
+        gst_buffer_resize (buffer, 0, len);
+        GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND;
+        GST_BUFFER_DURATION (buffer) =
+            (ev->end_time - ev->start_time) * GST_SECOND;
+        rflow = gst_pad_push (kd->srcpad, buffer);
+        if (rflow == GST_FLOW_NOT_LINKED) {
+          GST_DEBUG_OBJECT (kd, "source pad not linked, ignored");
+        } else if (rflow != GST_FLOW_OK) {
+          GST_WARNING_OBJECT (kd, "failed to push buffer: %s",
+              gst_flow_get_name (rflow));
+        }
+      } else {
+        GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
+            ("Failed to create buffer"));
+        rflow = GST_FLOW_ERROR;
+      }
+    } else {
+      GST_WARNING_OBJECT (kd, "Empty string, nothing to do");
+      rflow = GST_FLOW_OK;
+    }
+    g_free (escaped);
+  } else {
+    GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
+        ("Failed to allocate string"));
+    rflow = GST_FLOW_ERROR;
+  }
+
+  /* if there's a background paletted bitmap, construct a DVD SPU for it */
+  if (ev->bitmap && ev->palette) {
+    GstBuffer *buffer = gst_kate_spu_encode_spu (kd, ev);
+    if (buffer) {
+      GstCaps *caps;
+
+      GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND;
+      GST_BUFFER_DURATION (buffer) =
+          (ev->end_time - ev->start_time) * GST_SECOND;
+
+      if (kd->output_format != GST_KATE_FORMAT_SPU) {
+        caps = gst_caps_new_empty_simple (GST_KATE_SPU_MIME_TYPE);
+        gst_pad_push_event (kd->srcpad, gst_event_new_caps (caps));
+        gst_caps_unref (caps);
+        kd->output_format = GST_KATE_FORMAT_SPU;
+      }
+
+      rflow = gst_pad_push (kd->srcpad, buffer);
+      if (rflow == GST_FLOW_NOT_LINKED) {
+        GST_DEBUG_OBJECT (kd, "source pad not linked, ignored");
+      } else if (rflow != GST_FLOW_OK) {
+        GST_WARNING_OBJECT (kd, "failed to push buffer: %s",
+            gst_flow_get_name (rflow));
+      }
+    } else {
+      GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
+          ("failed to create SPU from paletted bitmap"));
+      rflow = GST_FLOW_ERROR;
+    }
+  }
+  return rflow;
+}
+
 /* GstElement vmethod implementations */
 
 /* chain function
@@ -246,7 +354,6 @@
 static GstFlowReturn
 gst_kate_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 {
-  GstKateFormat format = GST_KATE_FORMAT_UNDEFINED;
   GstKateDec *kd = GST_KATE_DEC (parent);
   const kate_event *ev = NULL;
   GstFlowReturn rflow = GST_FLOW_OK;
@@ -267,106 +374,7 @@
   }
 
   if (ev) {
-    gchar *escaped;
-    GstBuffer *buffer;
-    size_t len;
-    gboolean plain = TRUE;
-
-    if (kd->remove_markup && ev->text_markup_type != kate_markup_none) {
-      size_t len0 = ev->len + 1;
-      escaped = g_strdup (ev->text);
-      if (escaped) {
-        kate_text_remove_markup (ev->text_encoding, escaped, &len0);
-      }
-      plain = TRUE;
-    } else if (ev->text_markup_type == kate_markup_none) {
-      /* no pango markup yet, escape text */
-      /* TODO: actually do the pango thing */
-      escaped = g_strdup (ev->text);
-      plain = TRUE;
-    } else {
-      escaped = g_strdup (ev->text);
-      plain = FALSE;
-    }
-
-    if (G_LIKELY (escaped)) {
-      len = strlen (escaped);
-      if (len > 0) {
-        GST_DEBUG_OBJECT (kd, "kate event: %s, escaped %s", ev->text, escaped);
-        buffer = gst_buffer_new_and_alloc (len + 1);
-        if (G_LIKELY (buffer)) {
-          GstCaps *caps;
-          if (plain)
-            format = GST_KATE_FORMAT_TEXT_UTF8;
-          else
-            format = GST_KATE_FORMAT_TEXT_PANGO_MARKUP;
-          if (format != kd->output_format) {
-            caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
-                (format == GST_KATE_FORMAT_TEXT_UTF8) ? "utf8" : "pango-markup",
-                NULL);
-            gst_pad_push_event (kd->srcpad, gst_event_new_caps (caps));
-            gst_caps_unref (caps);
-            kd->output_format = format;
-          }
-          /* allocate and copy the NULs, but don't include them in passed size */
-          gst_buffer_fill (buffer, 0, escaped, len + 1);
-          gst_buffer_resize (buffer, 0, len);
-          GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND;
-          GST_BUFFER_DURATION (buffer) =
-              (ev->end_time - ev->start_time) * GST_SECOND;
-          rflow = gst_pad_push (kd->srcpad, buffer);
-          if (rflow == GST_FLOW_NOT_LINKED) {
-            GST_DEBUG_OBJECT (kd, "source pad not linked, ignored");
-          } else if (rflow != GST_FLOW_OK) {
-            GST_WARNING_OBJECT (kd, "failed to push buffer: %s",
-                gst_flow_get_name (rflow));
-          }
-        } else {
-          GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
-              ("Failed to create buffer"));
-          rflow = GST_FLOW_ERROR;
-        }
-      } else {
-        GST_WARNING_OBJECT (kd, "Empty string, nothing to do");
-        rflow = GST_FLOW_OK;
-      }
-      g_free (escaped);
-    } else {
-      GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
-          ("Failed to allocate string"));
-      rflow = GST_FLOW_ERROR;
-    }
-
-    /* if there's a background paletted bitmap, construct a DVD SPU for it */
-    if (ev->bitmap && ev->palette) {
-      GstBuffer *buffer = gst_kate_spu_encode_spu (kd, ev);
-      if (buffer) {
-        GstCaps *caps;
-
-        GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND;
-        GST_BUFFER_DURATION (buffer) =
-            (ev->end_time - ev->start_time) * GST_SECOND;
-
-        if (kd->output_format != GST_KATE_FORMAT_SPU) {
-          caps = gst_caps_new_empty_simple (GST_KATE_SPU_MIME_TYPE);
-          gst_pad_push_event (kd->srcpad, gst_event_new_caps (caps));
-          gst_caps_unref (caps);
-          kd->output_format = GST_KATE_FORMAT_SPU;
-        }
-
-        rflow = gst_pad_push (kd->srcpad, buffer);
-        if (rflow == GST_FLOW_NOT_LINKED) {
-          GST_DEBUG_OBJECT (kd, "source pad not linked, ignored");
-        } else if (rflow != GST_FLOW_OK) {
-          GST_WARNING_OBJECT (kd, "failed to push buffer: %s",
-              gst_flow_get_name (rflow));
-        }
-      } else {
-        GST_ELEMENT_ERROR (kd, STREAM, DECODE, (NULL),
-            ("failed to create SPU from paletted bitmap"));
-        rflow = GST_FLOW_ERROR;
-      }
-    }
+    rflow = gst_kate_dec_handle_kate_event (kd, ev);
   }
 
 not_in_seg:
@@ -401,12 +409,73 @@
 }
 
 static gboolean
+gst_kate_dec_set_caps (GstKateDec * kd, GstCaps * caps)
+{
+  GstStructure *structure = gst_caps_get_structure (caps, 0);
+  GstFlowReturn rflow = GST_FLOW_OK;
+
+  if (gst_structure_has_field (structure, "streamheader")) {
+    const GValue *value;
+    GstBuffer *buf;
+    const kate_event *ev;
+
+    value = gst_structure_get_value (structure, "streamheader");
+
+    if (GST_VALUE_HOLDS_BUFFER (value)) {
+      buf = gst_value_get_buffer (value);
+
+      gst_kate_util_decoder_base_chain_kate_packet (&kd->decoder,
+          GST_ELEMENT_CAST (kd), kd->sinkpad, buf, kd->srcpad, kd->srcpad,
+          &kd->src_caps, &ev);
+
+      if (ev) {
+        rflow = gst_kate_dec_handle_kate_event (kd, ev);
+      }
+    } else if (GST_VALUE_HOLDS_ARRAY (value)) {
+      gint i, size = gst_value_array_get_size (value);
+
+      for (i = 0; i < size; i++) {
+        const GValue *v = gst_value_array_get_value (value, i);
+
+        buf = gst_value_get_buffer (v);
+        gst_kate_util_decoder_base_chain_kate_packet (&kd->decoder,
+            GST_ELEMENT_CAST (kd), kd->sinkpad, buf, kd->srcpad, kd->srcpad,
+            &kd->src_caps, &ev);
+
+        if (ev) {
+          rflow = gst_kate_dec_handle_kate_event (kd, ev);
+          if (rflow != GST_FLOW_OK && rflow != GST_FLOW_NOT_LINKED)
+            break;
+        }
+      }
+    } else {
+      GST_WARNING_OBJECT (kd, "Unhandled streamheader type: %s",
+          G_VALUE_TYPE_NAME (value));
+    }
+  }
+
+  return rflow == GST_FLOW_OK || rflow == GST_FLOW_NOT_LINKED;
+}
+
+static gboolean
 gst_kate_dec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
   GstKateDec *kd = GST_KATE_DEC (parent);
   gboolean res = TRUE;
 
-  GST_LOG_OBJECT (pad, "Event on sink pad: %s", GST_EVENT_TYPE_NAME (event));
+  GST_LOG_OBJECT (pad, "Event on sink pad: %" GST_PTR_FORMAT, event);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:{
+      GstCaps *caps;
+
+      gst_event_parse_caps (event, &caps);
+      gst_kate_dec_set_caps (kd, caps);
+      break;
+    }
+    default:
+      break;
+  }
 
   /* Delay events till we've set caps */
   if (gst_kate_util_decoder_base_queue_event (&kd->decoder, event,
@@ -430,7 +499,6 @@
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEGMENT:
-      gst_kate_util_decoder_base_segment_event (&kd->decoder, event);
       break;
 
     case GST_EVENT_FLUSH_START:
diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c
index e5b519b..93777ab 100644
--- a/ext/kate/gstkateutil.c
+++ b/ext/kate/gstkateutil.c
@@ -153,6 +153,10 @@
     case GST_EVENT_EOS:
       can_be_queued = FALSE;
       break;
+    case GST_EVENT_SEGMENT:
+      gst_kate_util_decoder_base_segment_event (decoder, event);
+      can_be_queued = TRUE;
+      break;
     default:
       can_be_queued = TRUE;
       break;
diff --git a/ext/ladspa/Makefile.in b/ext/ladspa/Makefile.in
index ba7dd1f..3dc9dd9 100644
--- a/ext/ladspa/Makefile.in
+++ b/ext/ladspa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/ladspa
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -232,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +288,6 @@
 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@
@@ -289,7 +300,6 @@
 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@
@@ -297,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +443,6 @@
 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@
@@ -435,7 +451,6 @@
 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@
@@ -448,7 +463,6 @@
 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@
@@ -462,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -780,7 +815,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/ladspa/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/ladspa/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1121,6 +1155,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/libde265/Makefile.am b/ext/libde265/Makefile.am
new file mode 100644
index 0000000..e90096c
--- /dev/null
+++ b/ext/libde265/Makefile.am
@@ -0,0 +1,15 @@
+plugin_LTLIBRARIES = libgstlibde265.la
+
+libgstlibde265_la_SOURCES = \
+	gstlibde265.c \
+	libde265-dec.c
+
+libgstlibde265_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
+	$(LIBDE265_CFLAGS)
+libgstlibde265_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) \
+	$(LIBDE265_LIBS)
+libgstlibde265_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstlibde265_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = \
+	libde265-dec.h
diff --git a/ext/mythtv/Makefile.in b/ext/libde265/Makefile.in
similarity index 85%
copy from ext/mythtv/Makefile.in
copy to ext/libde265/Makefile.in
index 055754c..59bfd82 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/libde265/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/libde265
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,18 +164,20 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstlibde265_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+am_libgstlibde265_la_OBJECTS = libgstlibde265_la-gstlibde265.lo \
+	libgstlibde265_la-libde265-dec.lo
+libgstlibde265_la_OBJECTS = $(am_libgstlibde265_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstlibde265_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstlibde265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstlibde265_la_CFLAGS) $(CFLAGS) \
+	$(libgstlibde265_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
@@ -200,8 +212,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(libgstlibde265_la_SOURCES)
+DIST_SOURCES = $(libgstlibde265_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +285,6 @@
 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@
@@ -284,7 +297,6 @@
 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@
@@ -292,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +440,6 @@
 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@
@@ -430,7 +448,6 @@
 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@
@@ -443,7 +460,6 @@
 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@
@@ -457,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,24 +761,21 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+plugin_LTLIBRARIES = libgstlibde265.la
+libgstlibde265_la_SOURCES = \
+	gstlibde265.c \
+	libde265-dec.c
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+libgstlibde265_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
+	$(LIBDE265_CFLAGS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
+libgstlibde265_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) \
+	$(LIBDE265_LIBS)
 
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
+libgstlibde265_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstlibde265_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = \
-	gstmythtvsrc.h
+	libde265-dec.h
 
 all: all-am
 
@@ -756,10 +790,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/libde265/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/libde265/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -813,8 +846,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libgstlibde265.la: $(libgstlibde265_la_OBJECTS) $(libgstlibde265_la_DEPENDENCIES) $(EXTRA_libgstlibde265_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstlibde265_la_LINK) -rpath $(plugindir) $(libgstlibde265_la_OBJECTS) $(libgstlibde265_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +855,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstlibde265_la-gstlibde265.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstlibde265_la-libde265-dec.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +882,19 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+libgstlibde265_la-gstlibde265.lo: gstlibde265.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstlibde265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstlibde265_la_CFLAGS) $(CFLAGS) -MT libgstlibde265_la-gstlibde265.lo -MD -MP -MF $(DEPDIR)/libgstlibde265_la-gstlibde265.Tpo -c -o libgstlibde265_la-gstlibde265.lo `test -f 'gstlibde265.c' || echo '$(srcdir)/'`gstlibde265.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstlibde265_la-gstlibde265.Tpo $(DEPDIR)/libgstlibde265_la-gstlibde265.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstlibde265.c' object='libgstlibde265_la-gstlibde265.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstlibde265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstlibde265_la_CFLAGS) $(CFLAGS) -c -o libgstlibde265_la-gstlibde265.lo `test -f 'gstlibde265.c' || echo '$(srcdir)/'`gstlibde265.c
+
+libgstlibde265_la-libde265-dec.lo: libde265-dec.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstlibde265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstlibde265_la_CFLAGS) $(CFLAGS) -MT libgstlibde265_la-libde265-dec.lo -MD -MP -MF $(DEPDIR)/libgstlibde265_la-libde265-dec.Tpo -c -o libgstlibde265_la-libde265-dec.lo `test -f 'libde265-dec.c' || echo '$(srcdir)/'`libde265-dec.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstlibde265_la-libde265-dec.Tpo $(DEPDIR)/libgstlibde265_la-libde265-dec.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libde265-dec.c' object='libgstlibde265_la-libde265-dec.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 $(libgstlibde265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstlibde265_la_CFLAGS) $(CFLAGS) -c -o libgstlibde265_la-libde265-dec.lo `test -f 'libde265-dec.c' || echo '$(srcdir)/'`libde265-dec.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1068,6 +1109,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/libde265/gstlibde265.c b/ext/libde265/gstlibde265.c
new file mode 100644
index 0000000..d44412c
--- /dev/null
+++ b/ext/libde265/gstlibde265.c
@@ -0,0 +1,41 @@
+/*
+ * GStreamer HEVC/H.265 video codec.
+ *
+ * Copyright (c) 2014 struktur AG, Joachim Bauch <bauch@struktur.de>
+ *
+ * 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 "libde265-dec.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  gboolean ret;
+
+  ret = gst_libde265_dec_plugin_init (plugin);
+  return ret;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    libde265,
+    "HEVC/H.265 decoder using libde265",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/libde265/libde265-dec.c b/ext/libde265/libde265-dec.c
new file mode 100644
index 0000000..7cba37a
--- /dev/null
+++ b/ext/libde265/libde265-dec.c
@@ -0,0 +1,937 @@
+/*
+ * GStreamer HEVC/H.265 video codec.
+ *
+ * Copyright (c) 2014 struktur AG, Joachim Bauch <bauch@struktur.de>
+ *
+ * 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-libde265dec
+ *
+ * Decodes HEVC/H.265 video.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 filesrc location=bitstream.hevc ! 'video/x-hevc,stream-format=byte-stream,framerate=25/1' ! libde265dec ! autovideosink
+ * ]| The above pipeline decodes the HEVC/H.265 bitstream and renders it to the screen.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "libde265-dec.h"
+
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef G_OS_WIN32
+#include <windows.h>
+#endif
+#define g_get_num_processors gst_g_get_num_processors
+static guint
+gst_g_get_num_processors (void)
+{
+  guint threads = 0;
+
+#if defined(_SC_NPROC_ONLN)
+  threads = sysconf (_SC_NPROC_ONLN);
+#elif defined(_SC_NPROCESSORS_ONLN)
+  threads = sysconf (_SC_NPROCESSORS_ONLN);
+#elif defined(G_OS_WIN32)
+  {
+    SYSTEM_INFO sysinfo;
+    DWORD_PTR process_cpus;
+    DWORD_PTR system_cpus;
+
+    /* This *never* fails, but doesn't take CPU affinity into account */
+    GetSystemInfo (&sysinfo);
+    threads = (int) sysinfo.dwNumberOfProcessors;
+
+    /* This *can* fail, but produces correct results if affinity mask is used,
+     * unlike the simpler code above.
+     */
+    if (GetProcessAffinityMask (GetCurrentProcess (),
+            &process_cpus, &system_cpus)) {
+      unsigned int count;
+
+      for (count = 0; process_cpus != 0; process_cpus >>= 1)
+        if (process_cpus & 1)
+          count++;
+    }
+  }
+#else
+#warning "Don't know how to get number of CPU cores, will use the default thread count"
+  threads = DEFAULT_THREAD_COUNT;
+#endif
+
+  if (threads > 0)
+    return threads;
+
+  return 1;
+}
+#endif /* !GLIB_CHECK_VERSION(2, 36, 0) */
+
+/* use two decoder threads if no information about
+ * available CPU cores can be retrieved */
+#define DEFAULT_THREAD_COUNT        2
+
+#define parent_class gst_libde265_dec_parent_class
+G_DEFINE_TYPE (GstLibde265Dec, gst_libde265_dec, GST_TYPE_VIDEO_DECODER);
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS
+    ("video/x-h265, stream-format=(string) { hvc1, hev1, byte-stream }, "
+        "alignment=(string) { au, nal }")
+    );
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    );
+
+enum
+{
+  PROP_0,
+  PROP_MAX_THREADS,
+  PROP_LAST
+};
+
+#define DEFAULT_FORMAT      GST_TYPE_LIBDE265_FORMAT_PACKETIZED
+#define DEFAULT_MAX_THREADS 0
+
+static void gst_libde265_dec_finalize (GObject * object);
+
+static void gst_libde265_dec_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_libde265_dec_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static gboolean gst_libde265_dec_start (GstVideoDecoder * decoder);
+static gboolean gst_libde265_dec_stop (GstVideoDecoder * decoder);
+static gboolean gst_libde265_dec_set_format (GstVideoDecoder * decoder,
+    GstVideoCodecState * state);
+static gboolean gst_libde265_dec_flush (GstVideoDecoder * decoder);
+static GstFlowReturn gst_libde265_dec_finish (GstVideoDecoder * decoder);
+static GstFlowReturn _gst_libde265_return_image (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame, const struct de265_image *img);
+static GstFlowReturn gst_libde265_dec_handle_frame (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame);
+static GstFlowReturn _gst_libde265_image_available (GstVideoDecoder * decoder,
+    int width, int height);
+
+static void
+gst_libde265_dec_class_init (GstLibde265DecClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstVideoDecoderClass *decoder_class = GST_VIDEO_DECODER_CLASS (klass);
+  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->finalize = gst_libde265_dec_finalize;
+  gobject_class->set_property = gst_libde265_dec_set_property;
+  gobject_class->get_property = gst_libde265_dec_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_MAX_THREADS,
+      g_param_spec_int ("max-threads", "Maximum decode threads",
+          "Maximum number of worker threads to spawn. (0 = auto)",
+          0, G_MAXINT, DEFAULT_MAX_THREADS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  decoder_class->start = GST_DEBUG_FUNCPTR (gst_libde265_dec_start);
+  decoder_class->stop = GST_DEBUG_FUNCPTR (gst_libde265_dec_stop);
+  decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_libde265_dec_set_format);
+  decoder_class->flush = GST_DEBUG_FUNCPTR (gst_libde265_dec_flush);
+  decoder_class->finish = GST_DEBUG_FUNCPTR (gst_libde265_dec_finish);
+  decoder_class->handle_frame =
+      GST_DEBUG_FUNCPTR (gst_libde265_dec_handle_frame);
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&sink_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "HEVC/H.265 decoder",
+      "Codec/Decoder/Video",
+      "Decodes HEVC/H.265 video streams using libde265",
+      "struktur AG <opensource@struktur.de>");
+}
+
+static inline void
+_gst_libde265_dec_reset_decoder (GstLibde265Dec * dec)
+{
+  dec->ctx = NULL;
+  dec->buffer_full = 0;
+  dec->codec_data = NULL;
+  dec->codec_data_size = 0;
+  dec->input_state = NULL;
+  dec->output_state = NULL;
+}
+
+static void
+gst_libde265_dec_init (GstLibde265Dec * dec)
+{
+  dec->format = DEFAULT_FORMAT;
+  dec->max_threads = DEFAULT_MAX_THREADS;
+  dec->length_size = 4;
+  _gst_libde265_dec_reset_decoder (dec);
+  gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), TRUE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
+}
+
+static inline void
+_gst_libde265_dec_free_decoder (GstLibde265Dec * dec)
+{
+  if (dec->ctx != NULL) {
+    de265_free_decoder (dec->ctx);
+  }
+  free (dec->codec_data);
+  if (dec->input_state != NULL) {
+    gst_video_codec_state_unref (dec->input_state);
+  }
+  if (dec->output_state != NULL) {
+    gst_video_codec_state_unref (dec->output_state);
+  }
+  _gst_libde265_dec_reset_decoder (dec);
+}
+
+static void
+gst_libde265_dec_finalize (GObject * object)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (object);
+
+  _gst_libde265_dec_free_decoder (dec);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_libde265_dec_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (object);
+
+  switch (prop_id) {
+    case PROP_MAX_THREADS:
+      dec->max_threads = g_value_get_int (value);
+      if (dec->max_threads) {
+        GST_DEBUG_OBJECT (dec, "Max. threads set to %d", dec->max_threads);
+      } else {
+        GST_DEBUG_OBJECT (dec, "Max. threads set to auto");
+      }
+      break;
+    default:
+      break;
+  }
+}
+
+static void
+gst_libde265_dec_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (object);
+
+  switch (prop_id) {
+    case PROP_MAX_THREADS:
+      g_value_set_int (value, dec->max_threads);
+      break;
+    default:
+      break;
+  }
+}
+
+struct GstLibde265FrameRef
+{
+  GstVideoDecoder *decoder;
+  GstVideoCodecFrame *frame;
+  GstVideoFrame vframe;
+  GstBuffer *buffer;
+  gboolean mapped;
+};
+
+static void
+gst_libde265_dec_release_frame_ref (struct GstLibde265FrameRef *ref)
+{
+  if (ref->mapped) {
+    gst_video_frame_unmap (&ref->vframe);
+  }
+  gst_video_codec_frame_unref (ref->frame);
+  gst_buffer_replace (&ref->buffer, NULL);
+  g_free (ref);
+}
+
+static int
+gst_libde265_dec_get_buffer (de265_decoder_context * ctx,
+    struct de265_image_spec *spec, struct de265_image *img, void *userdata)
+{
+  GstVideoDecoder *base = (GstVideoDecoder *) userdata;
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (base);
+  GstVideoCodecFrame *frame = NULL;
+  int i;
+  int width = spec->width;
+  int height = spec->height;
+  GstFlowReturn ret;
+  struct GstLibde265FrameRef *ref;
+  GstVideoInfo *info;
+  int frame_number;
+
+  frame_number = (uintptr_t) de265_get_image_user_data (img) - 1;
+  if (G_UNLIKELY (frame_number == -1)) {
+    /* should not happen... */
+    GST_WARNING_OBJECT (base, "Frame has no number assigned!");
+    goto fallback;
+  }
+
+  frame = gst_video_decoder_get_frame (base, frame_number);
+  if (G_UNLIKELY (frame == NULL)) {
+    /* should not happen... */
+    GST_WARNING_OBJECT (base, "Couldn't get codec frame!");
+    goto fallback;
+  }
+
+  if (width % spec->alignment) {
+    width += spec->alignment - (width % spec->alignment);
+  }
+  if (width != spec->visible_width || height != spec->visible_height) {
+    /* clipping not supported for now */
+    goto fallback;
+  }
+
+  ret = _gst_libde265_image_available (base, width, height);
+  if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+    GST_ERROR_OBJECT (dec, "Failed to notify about available image");
+    goto fallback;
+  }
+
+  ret =
+      gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER (dec), frame);
+  if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+    GST_ERROR_OBJECT (dec, "Failed to allocate output buffer");
+    goto fallback;
+  }
+
+  ref = (struct GstLibde265FrameRef *) g_malloc0 (sizeof (*ref));
+  g_assert (ref != NULL);
+  ref->decoder = base;
+  ref->frame = frame;
+
+  gst_buffer_replace (&ref->buffer, frame->output_buffer);
+  gst_buffer_replace (&frame->output_buffer, NULL);
+
+  info = &dec->output_state->info;
+  if (!gst_video_frame_map (&ref->vframe, info, ref->buffer, GST_MAP_READWRITE)) {
+    GST_ERROR_OBJECT (dec, "Failed to map frame output buffer");
+    goto error;
+  }
+
+  ref->mapped = TRUE;
+  if (GST_VIDEO_FRAME_PLANE_STRIDE (&ref->vframe,
+          0) < width * GST_VIDEO_FRAME_COMP_PSTRIDE (&ref->vframe, 0)) {
+    GST_DEBUG_OBJECT (dec, "plane 0: pitch too small (%d/%d*%d)",
+        GST_VIDEO_FRAME_PLANE_STRIDE (&ref->vframe, 0), width,
+        GST_VIDEO_FRAME_COMP_PSTRIDE (&ref->vframe, 0));
+    goto error;
+  }
+
+  if (GST_VIDEO_FRAME_COMP_HEIGHT (&ref->vframe, 0) < height) {
+    GST_DEBUG_OBJECT (dec, "plane 0: lines too few (%d/%d)",
+        GST_VIDEO_FRAME_COMP_HEIGHT (&ref->vframe, 0), height);
+    goto error;
+  }
+
+  for (i = 0; i < 3; i++) {
+    uint8_t *data;
+    int stride = GST_VIDEO_FRAME_PLANE_STRIDE (&ref->vframe, i);
+    if (stride % spec->alignment) {
+      GST_DEBUG_OBJECT (dec, "plane %d: pitch not aligned (%d%%%d)",
+          i, stride, spec->alignment);
+      goto error;
+    }
+
+    data = GST_VIDEO_FRAME_PLANE_DATA (&ref->vframe, i);
+    if ((uintptr_t) (data) % spec->alignment) {
+      GST_DEBUG_OBJECT (dec, "plane %d not aligned", i);
+      goto error;
+    }
+
+    de265_set_image_plane (img, i, data, stride, ref);
+  }
+  return 1;
+
+error:
+  gst_libde265_dec_release_frame_ref (ref);
+  frame = NULL;
+
+fallback:
+  if (frame != NULL) {
+    gst_video_codec_frame_unref (frame);
+  }
+  return de265_get_default_image_allocation_functions ()->get_buffer (ctx,
+      spec, img, userdata);
+}
+
+static void
+gst_libde265_dec_release_buffer (de265_decoder_context * ctx,
+    struct de265_image *img, void *userdata)
+{
+  GstVideoDecoder *base = (GstVideoDecoder *) userdata;
+  struct GstLibde265FrameRef *ref =
+      (struct GstLibde265FrameRef *) de265_get_image_plane_user_data (img, 0);
+  if (ref == NULL) {
+    de265_get_default_image_allocation_functions ()->release_buffer (ctx, img,
+        userdata);
+    return;
+  }
+  gst_libde265_dec_release_frame_ref (ref);
+  (void) base;                  /* unused */
+}
+
+static gboolean
+gst_libde265_dec_start (GstVideoDecoder * decoder)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+  int threads = dec->max_threads;
+  struct de265_image_allocation allocation;
+
+  _gst_libde265_dec_free_decoder (dec);
+  dec->ctx = de265_new_decoder ();
+  if (dec->ctx == NULL) {
+    return FALSE;
+  }
+  if (threads == 0) {
+    threads = g_get_num_processors ();
+
+    /* NOTE: We start more threads than cores for now, as some threads
+     * might get blocked while waiting for dependent data. Having more
+     * threads increases decoding speed by about 10% */
+    threads *= 2;
+  }
+  if (threads > 1) {
+    if (threads > 32) {
+      /* TODO: this limit should come from the libde265 headers */
+      threads = 32;
+    }
+    de265_start_worker_threads (dec->ctx, threads);
+  }
+  GST_INFO_OBJECT (dec, "Using libde265 %s with %d worker threads",
+      de265_get_version (), threads);
+
+  allocation.get_buffer = gst_libde265_dec_get_buffer;
+  allocation.release_buffer = gst_libde265_dec_release_buffer;
+  de265_set_image_allocation_functions (dec->ctx, &allocation, decoder);
+  /* NOTE: we explicitly disable hash checks for now */
+  de265_set_parameter_bool (dec->ctx, DE265_DECODER_PARAM_BOOL_SEI_CHECK_HASH,
+      0);
+  return TRUE;
+}
+
+static gboolean
+gst_libde265_dec_stop (GstVideoDecoder * decoder)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+
+  _gst_libde265_dec_free_decoder (dec);
+
+  return TRUE;
+}
+
+static gboolean
+gst_libde265_dec_flush (GstVideoDecoder * decoder)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+
+  de265_reset (dec->ctx);
+  dec->buffer_full = 0;
+  if (dec->codec_data != NULL
+      && dec->format == GST_TYPE_LIBDE265_FORMAT_BYTESTREAM) {
+    int more;
+    de265_error err =
+        de265_push_data (dec->ctx, dec->codec_data, dec->codec_data_size, 0,
+        NULL);
+    if (!de265_isOK (err)) {
+      GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+          ("Failed to push codec data: %s (code=%d)",
+              de265_get_error_text (err), err), (NULL));
+      return FALSE;
+    }
+    de265_push_end_of_NAL (dec->ctx);
+    do {
+      err = de265_decode (dec->ctx, &more);
+      switch (err) {
+        case DE265_OK:
+          break;
+
+        case DE265_ERROR_IMAGE_BUFFER_FULL:
+        case DE265_ERROR_WAITING_FOR_INPUT_DATA:
+          /* not really an error */
+          more = 0;
+          break;
+
+        default:
+          if (!de265_isOK (err)) {
+            GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                ("Failed to decode codec data: %s (code=%d)",
+                    de265_get_error_text (err), err), (NULL));
+            return FALSE;
+          }
+      }
+    } while (more);
+  }
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_libde265_dec_finish (GstVideoDecoder * decoder)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+  de265_error err;
+  const struct de265_image *img;
+  int more;
+  GstFlowReturn result;
+
+  err = de265_flush_data (dec->ctx);
+  if (!de265_isOK (err)) {
+    GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+        ("Failed to flush decoder: %s (code=%d)",
+            de265_get_error_text (err), err), (NULL));
+    return GST_FLOW_ERROR;
+  }
+
+  do {
+    err = de265_decode (dec->ctx, &more);
+    switch (err) {
+      case DE265_OK:
+      case DE265_ERROR_IMAGE_BUFFER_FULL:
+        img = de265_get_next_picture (dec->ctx);
+        if (img != NULL) {
+          result = _gst_libde265_return_image (decoder, NULL, img);
+          if (result != GST_FLOW_OK) {
+            return result;
+          }
+        }
+        break;
+
+      case DE265_ERROR_WAITING_FOR_INPUT_DATA:
+        /* not really an error */
+        more = 0;
+        break;
+
+      default:
+        if (!de265_isOK (err)) {
+          GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+              ("Failed to decode codec data: %s (code=%d)",
+                  de265_get_error_text (err), err), (NULL));
+          return FALSE;
+        }
+    }
+  } while (more);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+_gst_libde265_image_available (GstVideoDecoder * decoder, int width, int height)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+
+  if (G_UNLIKELY (dec->output_state == NULL
+          || width != dec->output_state->info.width
+          || height != dec->output_state->info.height)) {
+    GstVideoCodecState *state =
+        gst_video_decoder_set_output_state (decoder, GST_VIDEO_FORMAT_I420,
+        width, height, dec->input_state);
+    if (state == NULL) {
+      GST_ERROR_OBJECT (dec, "Failed to set output state");
+      return GST_FLOW_ERROR;
+    }
+    if (!gst_video_decoder_negotiate (decoder)) {
+      GST_ERROR_OBJECT (dec, "Failed to negotiate format");
+      return GST_FLOW_ERROR;
+    }
+    if (dec->output_state != NULL) {
+      gst_video_codec_state_unref (dec->output_state);
+    }
+    dec->output_state = state;
+    GST_DEBUG_OBJECT (dec, "Frame dimensions are %d x %d", width, height);
+  }
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_libde265_dec_set_format (GstVideoDecoder * decoder,
+    GstVideoCodecState * state)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+
+  if (dec->input_state != NULL) {
+    gst_video_codec_state_unref (dec->input_state);
+  }
+  dec->input_state = state;
+  if (state != NULL) {
+    gst_video_codec_state_ref (state);
+  }
+  if (state != NULL && state->caps != NULL) {
+    GstStructure *str;
+    const GValue *value;
+    str = gst_caps_get_structure (state->caps, 0);
+    if ((value = gst_structure_get_value (str, "codec_data"))) {
+      GstMapInfo info;
+      guint8 *data;
+      gsize size;
+      GstBuffer *buf;
+      de265_error err;
+      int more;
+
+      buf = gst_value_get_buffer (value);
+      if (!gst_buffer_map (buf, &info, GST_MAP_READ)) {
+        GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+            ("Failed to map codec data"), (NULL));
+        return FALSE;
+      }
+      data = info.data;
+      size = info.size;
+      free (dec->codec_data);
+      dec->codec_data = malloc (size);
+      g_assert (dec->codec_data != NULL);
+      dec->codec_data_size = size;
+      memcpy (dec->codec_data, data, size);
+      if (size > 3 && (data[0] || data[1] || data[2] > 1)) {
+        /* encoded in "hvcC" format (assume version 0) */
+        dec->format = GST_TYPE_LIBDE265_FORMAT_PACKETIZED;
+        if (size > 22) {
+          int i;
+          int num_param_sets;
+          int pos;
+          if (data[0] != 0) {
+            GST_ELEMENT_WARNING (decoder, STREAM,
+                DECODE, ("Unsupported extra data version %d, decoding may fail",
+                    data[0]), (NULL));
+          }
+          dec->length_size = (data[21] & 3) + 1;
+          num_param_sets = data[22];
+          pos = 23;
+          for (i = 0; i < num_param_sets; i++) {
+            int j;
+            int nal_count;
+            if (pos + 3 > size) {
+              GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                  ("Buffer underrun in extra header (%d >= %" G_GSIZE_FORMAT
+                      ")", pos + 3, size), (NULL));
+              return FALSE;
+            }
+            /* ignore flags + NAL type (1 byte) */
+            nal_count = data[pos + 1] << 8 | data[pos + 2];
+            pos += 3;
+            for (j = 0; j < nal_count; j++) {
+              int nal_size;
+              if (pos + 2 > size) {
+                GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                    ("Buffer underrun in extra nal header (%d >= %"
+                        G_GSIZE_FORMAT ")", pos + 2, size), (NULL));
+                return FALSE;
+              }
+              nal_size = data[pos] << 8 | data[pos + 1];
+              if (pos + 2 + nal_size > size) {
+                GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                    ("Buffer underrun in extra nal (%d >= %" G_GSIZE_FORMAT ")",
+                        pos + 2 + nal_size, size), (NULL));
+                return FALSE;
+              }
+              err =
+                  de265_push_NAL (dec->ctx, data + pos + 2, nal_size, 0, NULL);
+              if (!de265_isOK (err)) {
+                GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                    ("Failed to push data: %s (%d)", de265_get_error_text (err),
+                        err), (NULL));
+                return FALSE;
+              }
+              pos += 2 + nal_size;
+            }
+          }
+        }
+        GST_DEBUG ("Assuming packetized data (%d bytes length)",
+            dec->length_size);
+      } else {
+        dec->format = GST_TYPE_LIBDE265_FORMAT_BYTESTREAM;
+        GST_DEBUG_OBJECT (dec, "Assuming non-packetized data");
+        err = de265_push_data (dec->ctx, data, size, 0, NULL);
+        if (!de265_isOK (err)) {
+          gst_buffer_unmap (buf, &info);
+          GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+              ("Failed to push codec data: %s (code=%d)",
+                  de265_get_error_text (err), err), (NULL));
+          return FALSE;
+        }
+      }
+      gst_buffer_unmap (buf, &info);
+      de265_push_end_of_NAL (dec->ctx);
+      do {
+        err = de265_decode (dec->ctx, &more);
+        switch (err) {
+          case DE265_OK:
+            break;
+
+          case DE265_ERROR_IMAGE_BUFFER_FULL:
+          case DE265_ERROR_WAITING_FOR_INPUT_DATA:
+            /* not really an error */
+            more = 0;
+            break;
+
+          default:
+            if (!de265_isOK (err)) {
+              GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+                  ("Failed to decode codec data: %s (code=%d)",
+                      de265_get_error_text (err), err), (NULL));
+              return FALSE;
+            }
+        }
+      } while (more);
+    } else if ((value = gst_structure_get_value (str, "stream-format"))) {
+      const gchar *str = g_value_get_string (value);
+      if (strcmp (str, "byte-stream") == 0) {
+        dec->format = GST_TYPE_LIBDE265_FORMAT_BYTESTREAM;
+        GST_DEBUG_OBJECT (dec, "Assuming raw byte-stream");
+      }
+    }
+  }
+
+  return TRUE;
+}
+
+static GstFlowReturn
+_gst_libde265_return_image (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame, const struct de265_image *img)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+  struct GstLibde265FrameRef *ref;
+  GstFlowReturn result;
+  GstVideoFrame outframe;
+  GstVideoCodecFrame *out_frame;
+  int frame_number;
+
+  ref = (struct GstLibde265FrameRef *) de265_get_image_plane_user_data (img, 0);
+  if (ref != NULL) {
+    /* decoder is using direct rendering */
+    out_frame = gst_video_codec_frame_ref (ref->frame);
+    if (frame != NULL) {
+      gst_video_codec_frame_unref (frame);
+    }
+    gst_buffer_replace (&out_frame->output_buffer, ref->buffer);
+    gst_buffer_replace (&ref->buffer, NULL);
+    return gst_video_decoder_finish_frame (decoder, out_frame);
+  }
+
+  result =
+      _gst_libde265_image_available (decoder, de265_get_image_width (img, 0),
+      de265_get_image_height (img, 0));
+  if (result != GST_FLOW_OK) {
+    GST_ERROR_OBJECT (dec, "Failed to notify about available image");
+    return result;
+  }
+
+  frame_number = (uintptr_t) de265_get_image_user_data (img) - 1;
+  if (frame_number != -1) {
+    out_frame = gst_video_decoder_get_frame (decoder, frame_number);
+  } else {
+    out_frame = NULL;
+  }
+  if (frame != NULL) {
+    gst_video_codec_frame_unref (frame);
+  }
+
+  if (out_frame == NULL) {
+    GST_ERROR_OBJECT (dec, "No frame available to return");
+    return GST_FLOW_ERROR;
+  }
+
+  result = gst_video_decoder_allocate_output_frame (decoder, out_frame);
+  if (result != GST_FLOW_OK) {
+    GST_ERROR_OBJECT (dec, "Failed to allocate output frame");
+    return result;
+  }
+
+  g_assert (dec->output_state != NULL);
+  if (!gst_video_frame_map (&outframe, &dec->output_state->info,
+          out_frame->output_buffer, GST_MAP_WRITE)) {
+    GST_ERROR_OBJECT (dec, "Failed to map output buffer");
+    return GST_FLOW_ERROR;
+  }
+
+  for (int plane = 0; plane < 3; plane++) {
+    int width = de265_get_image_width (img, plane);
+    int height = de265_get_image_height (img, plane);
+    int srcstride = width;
+    int dststride = GST_VIDEO_FRAME_COMP_STRIDE (&outframe, plane);
+    const uint8_t *src = de265_get_image_plane (img, plane, &srcstride);
+    uint8_t *dest = GST_VIDEO_FRAME_COMP_DATA (&outframe, plane);
+    if (srcstride == width && dststride == width) {
+      memcpy (dest, src, height * width);
+    } else {
+      while (height--) {
+        memcpy (dest, src, width);
+        src += srcstride;
+        dest += dststride;
+      }
+    }
+  }
+  gst_video_frame_unmap (&outframe);
+  return gst_video_decoder_finish_frame (decoder, out_frame);
+}
+
+static GstFlowReturn
+gst_libde265_dec_handle_frame (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame)
+{
+  GstLibde265Dec *dec = GST_LIBDE265_DEC (decoder);
+  uint8_t *frame_data;
+  uint8_t *end_data;
+  const struct de265_image *img;
+  de265_error ret = DE265_OK;
+  int more = 0;
+  GstClockTime pts;
+  gsize size;
+  GstMapInfo info;
+
+  pts = frame->pts;
+  if (pts == GST_CLOCK_TIME_NONE) {
+    pts = frame->dts;
+  }
+
+  if (!gst_buffer_map (frame->input_buffer, &info, GST_MAP_READ)) {
+    GST_ERROR_OBJECT (dec, "Failed to map input buffer");
+    return GST_FLOW_ERROR;
+  }
+
+  frame_data = info.data;
+  size = info.size;
+  end_data = frame_data + size;
+
+  if (size > 0) {
+    if (dec->format == GST_TYPE_LIBDE265_FORMAT_PACKETIZED) {
+      /* stream contains length fields and NALs */
+      uint8_t *start_data = frame_data;
+      while (start_data + dec->length_size <= end_data) {
+        int nal_size = 0;
+        int i;
+        for (i = 0; i < dec->length_size; i++) {
+          nal_size = (nal_size << 8) | start_data[i];
+        }
+        if (start_data + dec->length_size + nal_size > end_data) {
+          GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+              ("Overflow in input data, check stream format"), (NULL));
+          goto error_input;
+        }
+        ret =
+            de265_push_NAL (dec->ctx, start_data + dec->length_size, nal_size,
+            (de265_PTS) pts,
+            (void *) (uintptr_t) (frame->system_frame_number + 1));
+        if (ret != DE265_OK) {
+          GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+              ("Error while pushing data: %s (code=%d)",
+                  de265_get_error_text (ret), ret), (NULL));
+          goto error_input;
+        }
+        start_data += dec->length_size + nal_size;
+      }
+    } else {
+      ret =
+          de265_push_data (dec->ctx, frame_data, size, (de265_PTS) pts,
+          (void *) (uintptr_t) (frame->system_frame_number + 1));
+      if (ret != DE265_OK) {
+        GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+            ("Error while pushing data: %s (code=%d)",
+                de265_get_error_text (ret), ret), (NULL));
+        goto error_input;
+      }
+    }
+  } else {
+    ret = de265_flush_data (dec->ctx);
+    if (ret != DE265_OK) {
+      GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+          ("Error while flushing data: %s (code=%d)",
+              de265_get_error_text (ret), ret), (NULL));
+      goto error_input;
+    }
+  }
+  gst_buffer_unmap (frame->input_buffer, &info);
+
+  /* decode as much as possible */
+  do {
+    ret = de265_decode (dec->ctx, &more);
+  } while (more && ret == DE265_OK);
+
+  switch (ret) {
+    case DE265_OK:
+    case DE265_ERROR_WAITING_FOR_INPUT_DATA:
+      break;
+
+    case DE265_ERROR_IMAGE_BUFFER_FULL:
+      dec->buffer_full = 1;
+      if ((img = de265_peek_next_picture (dec->ctx)) == NULL) {
+        return GST_FLOW_OK;
+      }
+      break;
+
+    default:
+      GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+          ("Error while decoding: %s (code=%d)", de265_get_error_text (ret),
+              ret), (NULL));
+      return GST_FLOW_ERROR;
+  }
+
+  while ((ret = de265_get_warning (dec->ctx)) != DE265_OK) {
+    GST_ELEMENT_WARNING (decoder, STREAM, DECODE,
+        ("%s (code=%d)", de265_get_error_text (ret), ret), (NULL));
+  }
+
+  img = de265_get_next_picture (dec->ctx);
+  if (img == NULL) {
+    /* need more data */
+    return GST_FLOW_OK;
+  }
+
+  return _gst_libde265_return_image (decoder, frame, img);
+
+error_input:
+  gst_buffer_unmap (frame->input_buffer, &info);
+  return GST_FLOW_ERROR;
+}
+
+gboolean
+gst_libde265_dec_plugin_init (GstPlugin * plugin)
+{
+  /* create an elementfactory for the libde265 decoder element */
+  if (!gst_element_register (plugin, "libde265dec",
+          GST_RANK_SECONDARY, GST_TYPE_LIBDE265_DEC))
+    return FALSE;
+
+  return TRUE;
+}
diff --git a/ext/libde265/libde265-dec.h b/ext/libde265/libde265-dec.h
new file mode 100644
index 0000000..03b76bd
--- /dev/null
+++ b/ext/libde265/libde265-dec.h
@@ -0,0 +1,71 @@
+/*
+ * GStreamer HEVC/H.265 video codec.
+ *
+ * Copyright (c) 2014 struktur AG, Joachim Bauch <bauch@struktur.de>
+ *
+ * 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_LIBDE265_DEC_H__
+#define __GST_LIBDE265_DEC_H__
+
+#include <gst/gst.h>
+#include <gst/video/gstvideodecoder.h>
+
+#include <libde265/de265.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_LIBDE265_DEC \
+    (gst_libde265_dec_get_type())
+#define GST_LIBDE265_DEC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LIBDE265_DEC,GstLibde265Dec))
+#define GST_LIBDE265_DEC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LIBDE265_DEC,GstLibde265DecClass))
+
+typedef enum
+{
+  GST_TYPE_LIBDE265_FORMAT_PACKETIZED,
+  GST_TYPE_LIBDE265_FORMAT_BYTESTREAM
+} GstLibde265DecFormat;
+
+typedef struct _GstLibde265Dec
+{
+  GstVideoDecoder parent;
+
+  /* private */
+  de265_decoder_context *ctx;
+  GstLibde265DecFormat format;
+  int length_size;
+  int max_threads;
+  int buffer_full;
+  void *codec_data;
+  int codec_data_size;
+  GstVideoCodecState *input_state;
+  GstVideoCodecState *output_state;
+} GstLibde265Dec;
+
+typedef struct _GstLibde265DecClass
+{
+  GstVideoDecoderClass parent;
+} GstLibde265DecClass;
+
+GType gst_libde265_dec_get_type (void);
+
+G_END_DECLS
+
+gboolean gst_libde265_dec_plugin_init (GstPlugin * plugin);
+
+#endif /* __GST_LIBDE265_DEC_H__ */
diff --git a/ext/libmms/Makefile.in b/ext/libmms/Makefile.in
index 0820cdc..48f6770 100644
--- a/ext/libmms/Makefile.in
+++ b/ext/libmms/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/libmms
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/libmms/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/libmms/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1057,6 +1091,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/libvisual/Makefile.in b/ext/libvisual/Makefile.in
index 1cd7d32..44d1fc8 100644
--- a/ext/libvisual/Makefile.in
+++ b/ext/libvisual/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/libvisual
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -226,6 +235,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -243,8 +253,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -269,8 +281,6 @@
 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@
@@ -283,7 +293,6 @@
 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@
@@ -291,6 +300,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -317,11 +328,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -340,8 +354,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -400,10 +412,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -420,7 +436,6 @@
 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@
@@ -429,7 +444,6 @@
 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@
@@ -442,7 +456,6 @@
 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@
@@ -456,6 +469,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -467,6 +481,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -505,6 +521,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -540,10 +557,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -569,6 +590,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -576,7 +600,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -605,6 +636,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -615,6 +647,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -645,17 +678,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -672,6 +704,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -710,6 +743,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +785,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/libvisual/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/libvisual/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,6 +1093,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/lv2/Makefile.in b/ext/lv2/Makefile.in
index 210e759..99b921c 100644
--- a/ext/lv2/Makefile.in
+++ b/ext/lv2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/lv2
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +791,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/lv2/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/lv2/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1065,6 +1099,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/mimic/Makefile.in b/ext/mimic/Makefile.in
index aa004f1..015ac79 100644
--- a/ext/mimic/Makefile.in
+++ b/ext/mimic/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/mimic
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mimic/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/mimic/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,6 +1107,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/modplug/Makefile.in b/ext/modplug/Makefile.in
index f3c565c..785f490 100644
--- a/ext/modplug/Makefile.in
+++ b/ext/modplug/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/modplug
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/modplug/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/modplug/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc
index 1f7115e..683fbaa 100644
--- a/ext/modplug/gstmodplug.cc
+++ b/ext/modplug/gstmodplug.cc
@@ -34,7 +34,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v filesrc location=1990s-nostalgia.xm ! modplug ! audioconvert ! alsasink
+ * gst-launch-1.0 -v filesrc location=1990s-nostalgia.xm ! modplug ! audioconvert ! alsasink
  * ]| Play a FastTracker xm file.
  * </refsect2>
  */
@@ -43,10 +43,6 @@
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 /* Required to not get an undefined warning
  * https://bugzilla.gnome.org/show_bug.cgi?id=613795
  */
@@ -332,19 +328,10 @@
   gboolean flush;
   gint64 cur, stop;
   GstSegment seg;
-/* FIXME timestamp is set but not used */
-#if 0
-  guint64 timestamp;
-#endif
 
   if (modplug->frequency == 0)
     goto no_song;
 
-#if 0
-  timestamp = gst_util_uint64_scale_int (modplug->offset, GST_SECOND,
-      modplug->frequency);
-#endif
-
   gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur,
       &stop_type, &stop);
 
diff --git a/ext/mpeg2enc/Makefile.in b/ext/mpeg2enc/Makefile.in
index ffbad22..c628ea5 100644
--- a/ext/mpeg2enc/Makefile.in
+++ b/ext/mpeg2enc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/mpeg2enc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -768,7 +803,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mpeg2enc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/mpeg2enc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1109,6 +1143,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index 539a690..9e631e3 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -448,7 +448,6 @@
       /* no special action as there is not much to flush;
        * neither is it possible to halt the mpeg encoding loop */
       goto done;
-      break;
     case GST_EVENT_FLUSH_STOP:
       /* forward event */
       result = gst_pad_push_event (enc->srcpad, event);
@@ -461,7 +460,6 @@
       enc->srcresult = GST_FLOW_OK;
       GST_MPEG2ENC_MUTEX_UNLOCK (enc);
       goto done;
-      break;
     case GST_EVENT_EOS:
       /* inform the encoding task that it can stop now */
       GST_MPEG2ENC_MUTEX_LOCK (enc);
@@ -472,7 +470,6 @@
       /* eat this event for now, task will send eos when finished */
       gst_event_unref (event);
       goto done;
-      break;
     case GST_EVENT_CAPS:
     {
       GstCaps *caps;
@@ -481,7 +478,6 @@
       result = gst_mpeg2enc_setcaps (enc, pad, caps);
       gst_event_unref (event);
       goto done;
-      break;
     }
     default:
       /* for a serialized event, wait until an earlier buffer is gone,
diff --git a/ext/mpg123/Makefile.am b/ext/mpg123/Makefile.am
index 3acdfa4..6c96207 100644
--- a/ext/mpg123/Makefile.am
+++ b/ext/mpg123/Makefile.am
@@ -10,18 +10,3 @@
 libgstmpg123_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstmpg123audiodec.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpg123 -:SHARED libgstmpg123 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpg123_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpg123_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpg123_la_LDFLAGS) \
-	           $(libgstmpg123_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-@GST_API_VERSION@' \
-	> $@
diff --git a/ext/mpg123/Makefile.in b/ext/mpg123/Makefile.in
index 0d03fff..1363a7f 100644
--- a/ext/mpg123/Makefile.in
+++ b/ext/mpg123/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/mpg123
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mpg123/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/mpg123/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,21 +1096,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpg123 -:SHARED libgstmpg123 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpg123_la_SOURCES) \
-	 -:CPPFLAGS $(CPPFLAGS) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpg123_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpg123_la_LDFLAGS) \
-	           $(libgstmpg123_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-@GST_API_VERSION@' \
-	> $@
 
 # 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.
diff --git a/ext/mpg123/gstmpg123audiodec.c b/ext/mpg123/gstmpg123audiodec.c
index 791dba9..aa8598c 100644
--- a/ext/mpg123/gstmpg123audiodec.c
+++ b/ext/mpg123/gstmpg123audiodec.c
@@ -66,7 +66,7 @@
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/mpeg, "
-        "mpegversion = (int) { 1 }, "
+        "mpegversion = (int) 1, "
         "layer = (int) [ 1, 3 ], "
         "rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, "
         "channels = (int) [ 1, 2 ], " "parsed = (boolean) true ")
@@ -197,6 +197,9 @@
 {
   mpg123_decoder->handle = NULL;
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (mpg123_decoder), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (mpg123_decoder), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (mpg123_decoder));
 }
 
 
@@ -438,44 +441,12 @@
 static gboolean
 gst_mpg123_audio_dec_set_format (GstAudioDecoder * dec, GstCaps * input_caps)
 {
-/* Using the parsed information upstream, and the list of allowed caps
- * downstream, this code tries to find a suitable audio info. It is important
- * to keep in mind that the rate and number of channels should never deviate
- * from the one the bitstream has, otherwise mpg123 has to mix channels and/or
- * resample (and as its docs say, its internal resampler is very crude). The
- * sample format, however, can be chosen freely, because the MPEG specs do not
- * mandate any special format. Therefore, rate and number of channels are taken
- * from upstream (which parsed the MPEG frames, so the input_caps contain
- * exactly the rate and number of channels the bitstream actually has), while
- * the sample format is chosen by trying out all caps that are allowed by
- * downstream. This way, the output is adjusted to what the downstream prefers.
- *
- * Also, the new output audio info is not set immediately. Instead, it is
- * considered the "next audioinfo". The code waits for mpg123 to notice the new
- * format (= when mpg123_decode_frame() returns MPG123_AUDIO_DEC_NEW_FORMAT),
- * and then sets the next audioinfo. Otherwise, the next audioinfo is set too
- * soon, which may cause problems with mp3s containing several format headers.
- * One example would be an mp3 with the first 30 seconds using 44.1 kHz, then
- * the next 30 seconds using 32 kHz. Rare, but possible.
- *
- * STEPS:
- *
- * 1. get rate and channels from input_caps
- * 2. get allowed caps from src pad
- * 3. for each structure in allowed caps:
- * 3.1. take format
- * 3.2. if the combination of format with rate and channels is unsupported by
- *      mpg123, go to (3), or exit with error if there are no more structures
- *      to try
- * 3.3. create next audioinfo out of rate,channels,format, and exit
- */
-
-
-  int rate, channels;
+  /* "encoding" is the sample format specifier for mpg123 */
+  int encoding;
+  int sample_rate, num_channels;
+  GstAudioFormat format;
   GstMpg123AudioDec *mpg123_decoder;
-  GstCaps *allowed_srccaps;
-  guint structure_nr;
-  gboolean match_found = FALSE;
+  gboolean retval = FALSE;
 
   mpg123_decoder = GST_MPG123_AUDIO_DEC (dec);
 
@@ -483,7 +454,7 @@
 
   mpg123_decoder->has_next_audioinfo = FALSE;
 
-  /* Get rate and channels from input_caps */
+  /* Get sample rate and number of channels from input_caps */
   {
     GstStructure *structure;
     gboolean err = FALSE;
@@ -492,110 +463,126 @@
      * input caps structures don't make sense */
     structure = gst_caps_get_structure (input_caps, 0);
 
-    if (!gst_structure_get_int (structure, "rate", &rate)) {
+    if (!gst_structure_get_int (structure, "rate", &sample_rate)) {
       err = TRUE;
       GST_ERROR_OBJECT (dec, "Input caps do not have a rate value");
     }
-    if (!gst_structure_get_int (structure, "channels", &channels)) {
+    if (!gst_structure_get_int (structure, "channels", &num_channels)) {
       err = TRUE;
       GST_ERROR_OBJECT (dec, "Input caps do not have a channel value");
     }
 
-    if (err)
-      return FALSE;
+    if (G_UNLIKELY (err))
+      goto done;
   }
 
-  /* Get the caps that are allowed by downstream */
+  /* Get sample format from the allowed src caps */
   {
-    GstCaps *allowed_srccaps_unnorm =
+    GstCaps *allowed_srccaps =
         gst_pad_get_allowed_caps (GST_AUDIO_DECODER_SRC_PAD (dec));
-    if (!allowed_srccaps_unnorm) {
-      GST_ERROR_OBJECT (dec, "Allowed src caps are NULL");
-      return FALSE;
-    }
-    allowed_srccaps = gst_caps_normalize (allowed_srccaps_unnorm);
-  }
 
-  /* Go through all allowed caps, pick the first one that matches */
-  for (structure_nr = 0; structure_nr < gst_caps_get_size (allowed_srccaps);
-      ++structure_nr) {
-    GstStructure *structure;
-    gchar const *format_str;
-    GstAudioFormat format;
-    int encoding;
+    if (allowed_srccaps == NULL) {
+      /* srcpad is not linked (yet), so no peer information is available;
+       * just use the default sample format (16 bit signed integer) */
+      GST_DEBUG_OBJECT (mpg123_decoder,
+          "srcpad is not linked (yet) -> using S16 sample format");
+      format = GST_AUDIO_FORMAT_S16;
+      encoding = MPG123_ENC_SIGNED_16;
+    } else if (gst_caps_is_empty (allowed_srccaps)) {
+      gst_caps_unref (allowed_srccaps);
+      goto done;
+    } else {
+      gchar const *format_str;
+      GValue const *format_value;
 
-    structure = gst_caps_get_structure (allowed_srccaps, structure_nr);
+      /* Look at the sample format values from the first structure */
+      GstStructure *structure = gst_caps_get_structure (allowed_srccaps, 0);
+      format_value = gst_structure_get_value (structure, "format");
 
-    format_str = gst_structure_get_string (structure, "format");
-    if (format_str == NULL) {
-      GST_DEBUG_OBJECT (dec, "Could not get format from src caps");
-      continue;
-    }
+      if (format_value == NULL) {
+        gst_caps_unref (allowed_srccaps);
+        goto done;
+      } else if (GST_VALUE_HOLDS_LIST (format_value)) {
+        /* if value is a format list, pick the first entry */
+        GValue const *fmt_list_value =
+            gst_value_list_get_value (format_value, 0);
+        format_str = g_value_get_string (fmt_list_value);
+      } else if (G_VALUE_HOLDS_STRING (format_value)) {
+        /* if value is a string, use it directly */
+        format_str = g_value_get_string (format_value);
+      } else {
+        GST_ERROR_OBJECT (mpg123_decoder, "unexpected type for 'format' field "
+            "in caps structure %" GST_PTR_FORMAT, structure);
+        gst_caps_unref (allowed_srccaps);
+        goto done;
+      }
 
-    format = gst_audio_format_from_string (format_str);
-    if (format == GST_AUDIO_FORMAT_UNKNOWN) {
-      GST_DEBUG_OBJECT (dec, "Unknown format %s", format_str);
-      continue;
-    }
+      /* get the format value from the string */
+      format = gst_audio_format_from_string (format_str);
+      gst_caps_unref (allowed_srccaps);
 
-    switch (format) {
-      case GST_AUDIO_FORMAT_S16:
-        encoding = MPG123_ENC_SIGNED_16;
-        break;
-      case GST_AUDIO_FORMAT_S24:
-        encoding = MPG123_ENC_SIGNED_24;
-        break;
-      case GST_AUDIO_FORMAT_S32:
-        encoding = MPG123_ENC_SIGNED_32;
-        break;
-      case GST_AUDIO_FORMAT_U16:
-        encoding = MPG123_ENC_UNSIGNED_16;
-        break;
-      case GST_AUDIO_FORMAT_U24:
-        encoding = MPG123_ENC_UNSIGNED_24;
-        break;
-      case GST_AUDIO_FORMAT_U32:
-        encoding = MPG123_ENC_UNSIGNED_32;
-        break;
-      case GST_AUDIO_FORMAT_F32:
-        encoding = MPG123_ENC_FLOAT_32;
-        break;
-      default:
-        GST_DEBUG_OBJECT (dec,
-            "Format %s in srccaps is not supported", format_str);
-        continue;
-    }
+      g_assert (format != GST_AUDIO_FORMAT_UNKNOWN);
 
-    {
-      int err;
-
-      /* Cleanup old formats & set new one */
-      mpg123_format_none (mpg123_decoder->handle);
-      err = mpg123_format (mpg123_decoder->handle, rate, channels, encoding);
-      if (err != MPG123_OK) {
-        GST_DEBUG_OBJECT (dec,
-            "mpg123 cannot use caps %" GST_PTR_FORMAT
-            " because mpg123_format() failed: %s", structure,
-            mpg123_strerror (mpg123_decoder->handle));
-        continue;
+      /* convert format to mpg123 encoding */
+      switch (format) {
+        case GST_AUDIO_FORMAT_S16:
+          encoding = MPG123_ENC_SIGNED_16;
+          break;
+        case GST_AUDIO_FORMAT_S24:
+          encoding = MPG123_ENC_SIGNED_24;
+          break;
+        case GST_AUDIO_FORMAT_S32:
+          encoding = MPG123_ENC_SIGNED_32;
+          break;
+        case GST_AUDIO_FORMAT_U16:
+          encoding = MPG123_ENC_UNSIGNED_16;
+          break;
+        case GST_AUDIO_FORMAT_U24:
+          encoding = MPG123_ENC_UNSIGNED_24;
+          break;
+        case GST_AUDIO_FORMAT_U32:
+          encoding = MPG123_ENC_UNSIGNED_32;
+          break;
+        case GST_AUDIO_FORMAT_F32:
+          encoding = MPG123_ENC_FLOAT_32;
+          break;
+        default:
+          g_assert_not_reached ();
+          goto done;
       }
     }
-
-    gst_audio_info_init (&(mpg123_decoder->next_audioinfo));
-    gst_audio_info_set_format (&(mpg123_decoder->next_audioinfo), format, rate,
-        channels, NULL);
-    GST_LOG_OBJECT (dec, "The next audio format is: %s, %u Hz, %u channels",
-        format_str, rate, channels);
-    mpg123_decoder->has_next_audioinfo = TRUE;
-
-    match_found = TRUE;
-
-    break;
   }
 
-  gst_caps_unref (allowed_srccaps);
+  /* Sample rate, number of channels, and sample format are known at this point.
+   * Set the audioinfo structure's values and the mpg123 format. */
+  {
+    int err;
 
-  return match_found;
+    /* clear all existing format settings from the mpg123 instance */
+    mpg123_format_none (mpg123_decoder->handle);
+    /* set the chosen format */
+    err =
+        mpg123_format (mpg123_decoder->handle, sample_rate, num_channels,
+        encoding);
+
+    if (err != MPG123_OK) {
+      GST_WARNING_OBJECT (dec,
+          "mpg123_format() failed: %s",
+          mpg123_strerror (mpg123_decoder->handle));
+    } else {
+      gst_audio_info_init (&(mpg123_decoder->next_audioinfo));
+      gst_audio_info_set_format (&(mpg123_decoder->next_audioinfo), format,
+          sample_rate, num_channels, NULL);
+      GST_LOG_OBJECT (dec, "The next audio format is: %s, %u Hz, %u channels",
+          gst_audio_format_to_string (format), sample_rate, num_channels);
+      mpg123_decoder->has_next_audioinfo = TRUE;
+
+      retval = TRUE;
+    }
+  }
+
+done:
+  return retval;
 }
 
 
@@ -624,7 +611,8 @@
     mpg123_decoder->handle = NULL;
   }
 
-  mpg123_decoder->has_next_audioinfo = FALSE;
+  if (hard)
+    mpg123_decoder->has_next_audioinfo = FALSE;
 
   /* opening/closing feeds do not affect the format defined by the
    * mpg123_format() call that was made in gst_mpg123_audio_dec_set_format(),
diff --git a/ext/mplex/Makefile.in b/ext/mplex/Makefile.in
index d144ec5..292c67c 100644
--- a/ext/mplex/Makefile.in
+++ b/ext/mplex/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/mplex
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -766,7 +801,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mplex/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/mplex/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1099,6 +1133,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 94bf948..b109d18 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -190,8 +190,7 @@
 {
   GstElement *element = GST_ELEMENT (mplex);
 
-  mplex->srcpad =
-      gst_pad_new_from_static_template (&src_templ, "src");
+  mplex->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
   gst_element_add_pad (element, mplex->srcpad);
   gst_pad_use_fixed_caps (mplex->srcpad);
   gst_pad_set_activatemode_function (mplex->srcpad,
@@ -507,7 +506,7 @@
       result = gst_mplex_setcaps (sinkpad, caps);
       gst_event_unref (event);
       goto done;
-      break;
+
     }
     default:
       /* for a serialized event, wait until earlier data is gone,
@@ -537,7 +536,8 @@
   if (G_UNLIKELY (mplex->srcresult == GST_FLOW_CUSTOM_SUCCESS)
       && mplex->job->video_tracks == mplex->num_vpads
       && mplex->job->audio_tracks == mplex->num_apads) {
-    gst_pad_start_task (mplex->srcpad, (GstTaskFunction) gst_mplex_loop, mplex, NULL);
+    gst_pad_start_task (mplex->srcpad, (GstTaskFunction) gst_mplex_loop, mplex,
+        NULL);
     mplex->srcresult = GST_FLOW_OK;
   }
 }
diff --git a/ext/musepack/Makefile.in b/ext/musepack/Makefile.in
index 6923541..aafd9ae 100644
--- a/ext/musepack/Makefile.in
+++ b/ext/musepack/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/musepack
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/musepack/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/musepack/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1071,6 +1105,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/mythtv/Makefile.am b/ext/mythtv/Makefile.am
deleted file mode 100644
index 0deff63..0000000
--- a/ext/mythtv/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-
-plugin_LTLIBRARIES =	libgstmythtvsrc.la
-
-libgstmythtvsrc_la_SOURCES =	\
-		gstmythtvsrc.c
-
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
-
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
-
diff --git a/ext/mythtv/gstmythtvsrc.c b/ext/mythtv/gstmythtvsrc.c
deleted file mode 100644
index 174ab86..0000000
--- a/ext/mythtv/gstmythtvsrc.c
+++ /dev/null
@@ -1,1016 +0,0 @@
-/*
- * GStreamer MythTV Plug-in 
- * Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
- * Copyright (C) <2007> Renato Filho <renato.filho@indt.org.br>  
- * This library is free software; you can
- * redistribute it and/or modify it under the terms of the GNU Library
- * General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library 
- * General Public License for more details. You should have received a copy 
- * of the GNU Library General Public License along with this library; if
- * not, write to the Free Software Foundation, Inc., 51 Franklin St,
- * Fifth Floor, Boston, MA 02110-1301, USA. 
- */
-
-/**
- * SECTION:element-mythtvsrc
- * @see_also: nuvdemux
- *
- * MythTVSrc allows to access a remote MythTV backend streaming Video/Audio server,
- * and to render audio and video content through a TCP/IP connection to a specific
- * port on this server, and based on a known MythTV protocol that is based on 
- * some message passing, such as REQUEST_BLOCK on a specified number of bytes, to get
- * some chunk of remote file data.
- * You should pass the information aboute the remote MythTV backend server 
- * through the #GstMythtvSrc:location property.
- * 
- * <refsect2>
- * <title>Examples</title>
- * <para>
- * If you want to get the LiveTV content (set channel, TV tuner, RemoteEncoder, 
- * Recorder), use the following URI:
- * <programlisting>
- *  myth://xxx.xxx.xxx.xxx:6543/livetv?channel=BBC
- * </programlisting>
- *
- * This URI will configure the Recorder instance (used to change the channel,
- * start the TV multimedia content transmition, etc.), using
- * the IP address (xxx.xxx.xxx.xxx) and port number (6543) of the MythTV backend 
- * server, and setting the channel name to "BBC". 
- * 
- * To get a already recorded the MythTV NUV file, put the following URI:
- * <programlisting>
- *  myth://xxx.xxx.xxx.xxx:6543/filename.nuv
- * </programlisting>
- * 
- * Another possible way to use the LiveTV content, and just in the case you want to 
- * use the mysql database, put the location URI in the following format:
- * <programlisting>
- *  myth://mythtv:mythtv@xxx.xxx.xxx.xxx:6543/?mythconverg&channel=9
- * </programlisting>
- * 
- * Where the first field is the protocol (myth), the second and third are user 
- * name (mythtv) and password (mythtv), then backend host name and port number, 
- * and the last field is the database name (mythconverg).
- * </para>
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstmythtvsrc.h"
-#include <gmyth/gmyth_file.h>
-#include <gmyth/gmyth_file_transfer.h>
-#include <gmyth/gmyth_file_local.h>
-#include <gmyth/gmyth_livetv.h>
-
-#include <gmyth/gmyth_socket.h>
-#include <gmyth/gmyth_tvchain.h>
-
-#include <string.h>
-#include <unistd.h>
-
-GST_DEBUG_CATEGORY_STATIC (mythtvsrc_debug);
-#define GST_GMYTHTV_ID_NUM                  1
-#define GST_GMYTHTV_CHANNEL_DEFAULT_NUM     (-1)
-#define GMYTHTV_VERSION_DEFAULT             30
-#define GMYTHTV_TRANSFER_MAX_WAITS          100
-#define GMYTHTV_TRANSFER_MAX_RESENDS        2
-#define GMYTHTV_TRANSFER_MAX_BUFFER         (128*1024)
-#define READ_SIZE                           (14*1024)
-#define READ_SIZE_LIVETV                    (80*1024)
-#define GST_FLOW_ERROR_NO_DATA              (-101)
-
-static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS_ANY);
-enum
-{
-  PROP_0,
-  PROP_LOCATION,
-  PROP_GMYTHTV_VERSION,
-  PROP_GMYTHTV_LIVE,
-  PROP_GMYTHTV_LIVEID,
-  PROP_GMYTHTV_LIVE_CHAINID,
-  PROP_GMYTHTV_ENABLE_TIMING_POSITION,
-  PROP_GMYTHTV_CHANNEL_NUM
-};
-
-static void gst_mythtv_src_clear (GstMythtvSrc * mythtv_src);
-
-static void gst_mythtv_src_finalize (GObject * gobject);
-
-static GstFlowReturn gst_mythtv_src_create (GstPushSrc * psrc,
-    GstBuffer ** outbuf);
-
-static gboolean gst_mythtv_src_start (GstBaseSrc * bsrc);
-static gboolean gst_mythtv_src_stop (GstBaseSrc * bsrc);
-static gboolean gst_mythtv_src_get_size (GstBaseSrc * bsrc, guint64 * size);
-static gboolean gst_mythtv_src_is_seekable (GstBaseSrc * push_src);
-
-static GstFlowReturn gst_mythtv_src_do_seek (GstBaseSrc * base,
-    GstSegment * segment);
-
-static GstStateChangeReturn
-gst_mythtv_src_change_state (GstElement * element, GstStateChange transition);
-
-static void gst_mythtv_src_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_mythtv_src_get_property (GObject * object,
-    guint prop_id, GValue * value, GParamSpec * pspec);
-
-static void gst_mythtv_src_uri_handler_init (gpointer g_iface,
-    gpointer iface_data);
-
-#if 0
-static gboolean gst_mythtv_src_handle_query (GstPad * pad, GstQuery * query);
-static gboolean gst_mythtv_src_handle_event (GstPad * pad, GstEvent * event);
-#endif
-
-static GMythFileReadResult do_read_request_response (GstMythtvSrc * src,
-    guint size, GByteArray * data_ptr);
-
-static void
-_urihandler_init (GType type)
-{
-  static const GInterfaceInfo urihandler_info = {
-    gst_mythtv_src_uri_handler_init,
-    NULL,
-    NULL
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info);
-
-  GST_DEBUG_CATEGORY_INIT (mythtvsrc_debug, "mythtvsrc", 0, "MythTV src");
-}
-
-GST_BOILERPLATE_FULL (GstMythtvSrc, gst_mythtv_src, GstPushSrc,
-    GST_TYPE_PUSH_SRC, _urihandler_init)
-     static void gst_mythtv_src_base_init (gpointer g_class)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&srctemplate));
-
-  gst_element_class_set_static_metadata (element_class, "MythTV client source",
-      "Source/Network",
-      "Control and receive data as a client over the network "
-      "via raw socket connections using the MythTV protocol",
-      "Rosfran Borges <rosfran.borges@indt.org.br>, "
-      "Renato Filho <renato.filho@indt.org.br>");
-
-  element_class->change_state = gst_mythtv_src_change_state;
-
-}
-
-static void
-gst_mythtv_src_class_init (GstMythtvSrcClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstPushSrcClass *gstpushsrc_class;
-  GstBaseSrcClass *gstbasesrc_class;
-
-  gobject_class = (GObjectClass *) klass;
-  gstbasesrc_class = (GstBaseSrcClass *) klass;
-  gstpushsrc_class = (GstPushSrcClass *) klass;
-
-  gobject_class->set_property = gst_mythtv_src_set_property;
-  gobject_class->get_property = gst_mythtv_src_get_property;
-  gobject_class->finalize = gst_mythtv_src_finalize;
-
-  g_object_class_install_property
-      (gobject_class, PROP_LOCATION,
-      g_param_spec_string ("location", "Location",
-          "The location. In the form:"
-          "\n\t\t\tmyth://a.com/file.nuv"
-          "\n\t\t\tmyth://a.com:23223/file.nuv"
-          "\n\t\t\tmyth://a.com/?channel=123"
-          "\n\t\t\tmyth://a.com/?channel=Channel%203"
-          "\n\t\t\ta.com/file.nuv - default scheme 'myth'",
-          "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_VERSION,
-      g_param_spec_int ("mythtv-version", "mythtv-version",
-          "Change MythTV version", 26, 30, 26,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_LIVEID,
-      g_param_spec_int ("mythtv-live-id", "mythtv-live-id",
-          "Change MythTV version",
-          0, 200, GST_GMYTHTV_ID_NUM,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_LIVE_CHAINID,
-      g_param_spec_string ("mythtv-live-chainid", "mythtv-live-chainid",
-          "Sets the MythTV chain ID (from TV Chain)", "",
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_LIVE,
-      g_param_spec_boolean ("mythtv-live", "mythtv-live",
-          "Enable MythTV Live TV content streaming", FALSE,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_ENABLE_TIMING_POSITION,
-      g_param_spec_boolean ("mythtv-enable-timing-position",
-          "mythtv-enable-timing-position",
-          "Enable MythTV Live TV content size continuous updating",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property
-      (gobject_class, PROP_GMYTHTV_CHANNEL_NUM,
-      g_param_spec_string ("mythtv-channel", "mythtv-channel",
-          "Change MythTV channel number", "",
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_mythtv_src_start);
-  gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_mythtv_src_stop);
-  gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_mythtv_src_get_size);
-  gstbasesrc_class->is_seekable =
-      GST_DEBUG_FUNCPTR (gst_mythtv_src_is_seekable);
-  gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_mythtv_src_do_seek);
-  gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_mythtv_src_create);
-
-  GST_DEBUG_CATEGORY_INIT (mythtvsrc_debug, "mythtvsrc", 0,
-      "MythTV Client Source");
-}
-
-static void
-gst_mythtv_src_init (GstMythtvSrc * this, GstMythtvSrcClass * g_class)
-{
-  this->file = NULL;
-  this->unique_setup = FALSE;
-  this->mythtv_version = GMYTHTV_VERSION_DEFAULT;
-  this->state = GST_MYTHTV_SRC_FILE_TRANSFER;
-  this->bytes_read = 0;
-  this->prev_content_size = 0;
-  this->content_size = 0;
-  this->read_offset = 0;
-  this->content_size_last = 0;
-  this->live_tv = FALSE;
-  this->enable_timing_position = FALSE;
-  this->update_prog_chain = FALSE;
-  this->user_agent = g_strdup ("mythtvsrc");
-  this->update_prog_chain = FALSE;
-  this->channel_name = NULL;
-  this->eos = FALSE;
-  this->wait_to_transfer = 0;
-  this->spawn_livetv = NULL;
-  gst_base_src_set_format (GST_BASE_SRC (this), GST_FORMAT_BYTES);
-#if 0
-  gst_pad_set_event_function (GST_BASE_SRC_PAD (GST_BASE_SRC (this)),
-      gst_mythtv_src_handle_event);
-#endif
-#if 0
-  gst_pad_set_query_function (GST_BASE_SRC_PAD (GST_BASE_SRC (this)),
-      gst_mythtv_src_handle_query);
-#endif
-
-}
-
-static void
-gst_mythtv_src_clear (GstMythtvSrc * mythtv_src)
-{
-  mythtv_src->unique_setup = FALSE;
-
-#if 0
-  if (mythtv_src->spawn_livetv) {
-    g_object_unref (mythtv_src->spawn_livetv);
-    mythtv_src->spawn_livetv = NULL;
-  }
-
-  if (mythtv_src->file) {
-    g_object_unref (mythtv_src->file);
-    mythtv_src->file = NULL;
-  }
-
-  if (mythtv_src->backend_info) {
-    g_object_unref (mythtv_src->backend_info);
-    mythtv_src->backend_info = NULL;
-  }
-#endif
-}
-
-static void
-gst_mythtv_src_finalize (GObject * gobject)
-{
-  GstMythtvSrc *this = GST_MYTHTV_SRC (gobject);
-
-  gst_mythtv_src_clear (this);
-
-  if (this->uri_name) {
-    g_free (this->uri_name);
-    this->uri_name = NULL;
-  }
-
-  if (this->user_agent) {
-    g_free (this->user_agent);
-    this->user_agent = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->finalize (gobject);
-}
-
-static GMythFileReadResult
-do_read_request_response (GstMythtvSrc * src, guint size, GByteArray * data_ptr)
-{
-  gint read = 0;
-  guint sizetoread = size;
-  gint max_iters = GMYTHTV_TRANSFER_MAX_RESENDS;
-  GMythFileReadResult result;
-
-  GST_LOG_OBJECT (src, "Starting: Reading %d bytes...", sizetoread);
-
-  result = GMYTH_FILE_READ_OK;
-  /*
-   * Loop sending the Myth File Transfer request: Retry whilst
-   * authentication fails and we supply it. 
-   */
-
-  while (sizetoread == size && --max_iters > 0) {
-    /*
-     * if ( gmyth_backend_info_is_local_file(src->backend_info) ) 
-     */
-    if (IS_GMYTH_FILE_LOCAL (src->file))
-      result = gmyth_file_local_read (GMYTH_FILE_LOCAL (src->file),
-          data_ptr, sizetoread, src->live_tv);
-    else if (IS_GMYTH_FILE_TRANSFER (src->file))
-      result = gmyth_file_transfer_read (GMYTH_FILE_TRANSFER (src->file),
-          data_ptr, sizetoread, src->live_tv);
-
-    if (data_ptr->len > 0) {
-      read += data_ptr->len;
-      sizetoread -= data_ptr->len;
-    } else if (data_ptr->len <= 0) {
-      if (src->live_tv == FALSE) {
-        result = GMYTH_FILE_READ_EOF;
-        goto eos;
-      } else {
-        if (result == GMYTH_FILE_READ_ERROR) {  /* -314 */
-          GST_INFO_OBJECT (src, "[LiveTV] FileTransfer READ_ERROR!");
-        }
-        goto done;
-      }
-    }
-    /*
-     * else if (data_ptr->len == 0) goto done; 
-     */
-    if (read == sizetoread)
-      goto done;
-  }
-
-  if ((read < 0 && !src->live_tv) || max_iters == 0) {
-    result = GMYTH_FILE_READ_EOF;
-    goto eos;
-  }
-  goto done;
-
-eos:
-  src->eos = TRUE;
-
-done:
-  GST_LOG_OBJECT (src, "Finished read: result %d", result);
-  return result;
-}
-
-static GstFlowReturn
-gst_mythtv_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
-{
-  GstMythtvSrc *src;
-  GstFlowReturn ret = GST_FLOW_OK;
-  GByteArray *buffer;
-  GMythFileReadResult result = GMYTH_FILE_READ_OK;
-
-  src = GST_MYTHTV_SRC (psrc);
-
-  buffer = g_byte_array_new ();
-  if (src->live_tv)
-    result = do_read_request_response (src, READ_SIZE_LIVETV, buffer);
-  else
-    result = do_read_request_response (src, READ_SIZE, buffer);
-
-  if (result == GMYTH_FILE_READ_ERROR)
-    goto read_error;
-
-  *outbuf = gst_buffer_new ();
-  GST_BUFFER_SIZE (*outbuf) = buffer->len;
-  GST_BUFFER_MALLOCDATA (*outbuf) = buffer->data;
-  GST_BUFFER_DATA (*outbuf) = GST_BUFFER_MALLOCDATA (*outbuf);
-  GST_BUFFER_OFFSET (*outbuf) = src->read_offset;
-  GST_BUFFER_OFFSET_END (*outbuf) =
-      src->read_offset + GST_BUFFER_SIZE (*outbuf);
-
-  src->read_offset += GST_BUFFER_SIZE (*outbuf);
-  src->bytes_read += GST_BUFFER_SIZE (*outbuf);
-
-  g_byte_array_free (buffer, FALSE);
-
-  if (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN) {
-    GstPad *peer;
-
-    peer = gst_pad_get_peer (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)));
-    gst_pad_send_event (peer,
-        gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
-
-    gst_object_unref (peer);
-  }
-
-  if (src->eos || (!src->live_tv && (src->bytes_read >= src->content_size)))
-    ret = GST_FLOW_UNEXPECTED;
-
-  GST_LOG_OBJECT (src, "Create finished: %d", ret);
-  return ret;
-
-read_error:
-  GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
-      ("Could not read any bytes (%d, %s)", result, src->uri_name));
-  return GST_FLOW_ERROR;
-}
-
-static gboolean
-gst_mythtv_src_do_seek (GstBaseSrc * base, GstSegment * segment)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (base);
-  gint64 new_offset = -1;
-  gint64 actual_seek = segment->start;
-  gboolean ret = TRUE;
-
-  GST_LOG_OBJECT (src, "seek, segment: %" GST_SEGMENT_FORMAT, segment);
-
-  if (segment->format != GST_FORMAT_BYTES) {
-    ret = FALSE;
-    goto done;
-  }
-  GST_LOG_OBJECT (src, "actual_seek = %" G_GINT64_FORMAT ", read_offset = "
-      "%" G_GINT64_FORMAT, actual_seek, src->read_offset);
-  /*
-   * verify if it needs to seek 
-   */
-  if (src->read_offset != actual_seek) {
-    if (IS_GMYTH_FILE_LOCAL (src->file))
-      new_offset = gmyth_file_local_seek (GMYTH_FILE_LOCAL (src->file),
-          segment->start, G_SEEK_SET);
-    else if (IS_GMYTH_FILE_TRANSFER (src->file))
-      new_offset = gmyth_file_transfer_seek (GMYTH_FILE_TRANSFER (src->file),
-          segment->start, G_SEEK_SET);
-    if (G_UNLIKELY (new_offset < 0)) {
-      ret = FALSE;
-      if (!src->live_tv)
-        goto eos;
-    }
-
-    src->read_offset = new_offset;
-
-    if (ret == FALSE) {
-      GST_INFO_OBJECT (src, "Failed to set the SEEK on segment!");
-    }
-  }
-
-done:
-  return ret;
-
-eos:
-  GST_DEBUG_OBJECT (src, "EOS found on seeking!!!");
-  return FALSE;
-}
-
-/*
- * create a socket for connecting to remote server 
- */
-static gboolean
-gst_mythtv_src_start (GstBaseSrc * bsrc)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (bsrc);
-
-  GString *chain_id_local = NULL;
-  GMythURI *gmyth_uri = NULL;
-  gboolean ret = TRUE;
-  GstBaseSrc *basesrc;
-  GstMessage *msg;
-
-  if (src->unique_setup == FALSE) {
-    src->unique_setup = TRUE;
-  } else {
-    goto done;
-  }
-
-  gmyth_uri = gmyth_uri_new_with_value (src->uri_name);
-  src->backend_info = gmyth_backend_info_new_with_uri (src->uri_name);
-  src->live_tv = gmyth_uri_is_livetv (gmyth_uri);
-
-  if (src->live_tv) {
-    gchar *ch = gmyth_uri_get_channel_name (gmyth_uri);
-    src->spawn_livetv = gmyth_livetv_new (src->backend_info);
-
-    if (ch != NULL)
-      src->channel_name = ch;
-
-    if (src->channel_name != NULL) {
-      gboolean result;
-
-      result = gmyth_livetv_channel_name_setup (src->spawn_livetv,
-          src->channel_name);
-      if (result == FALSE) {
-        GST_INFO_OBJECT (src, "LiveTV setup felt down on error");
-        ret = FALSE;
-        goto init_failed;
-      }
-    } else {
-      if (gmyth_livetv_setup (src->spawn_livetv) == FALSE) {
-        GST_INFO_OBJECT (src, "LiveTV setup felt down on error");
-        ret = FALSE;
-        goto init_failed;
-      }
-    }
-
-    src->file =
-        GMYTH_FILE (gmyth_livetv_create_file_transfer (src->spawn_livetv));
-    if (NULL == src->file) {
-      GST_INFO_OBJECT (src, "[LiveTV] FileTransfer equals to NULL");
-      ret = FALSE;
-      goto init_failed;
-    }
-
-    /*
-     * Check if the file is local to this specific client renderer 
-     */
-    if (gmyth_uri_is_local_file (gmyth_uri))
-      ret = gmyth_file_local_open (GMYTH_FILE_LOCAL (src->file));
-    else
-      ret = gmyth_file_transfer_open (GMYTH_FILE_TRANSFER (src->file),
-          (src->spawn_livetv->uri != NULL ?
-              gmyth_uri_get_path (src->spawn_livetv->uri) :
-              src->spawn_livetv->proginfo->pathname->str));
-    /*
-     * sets the mythtvsrc "location" property 
-     */
-    g_object_set (src, "location", gmyth_file_get_uri (src->file), NULL);
-
-    if (!ret) {
-      GST_INFO_OBJECT (src,
-          "Error: couldn't open the FileTransfer from LiveTV source!");
-      g_object_unref (src->file);
-      src->file = NULL;
-      goto init_failed;
-    }
-  } /* If live-tv */
-  else {
-    /*
-     * Check if the file is local to this specific client renderer,
-     * and tries to open a local connection 
-     */
-    if (gmyth_uri_is_local_file (gmyth_uri)) {
-      src->file = GMYTH_FILE (gmyth_file_local_new (src->backend_info));
-      ret = gmyth_file_local_open (GMYTH_FILE_LOCAL (src->file));
-    } else {
-      src->file = GMYTH_FILE (gmyth_file_transfer_new (src->backend_info));
-      ret =
-          gmyth_file_transfer_open (GMYTH_FILE_TRANSFER (src->file),
-          src->uri_name);
-    }
-  }
-
-  if (NULL == src->file) {
-    GST_INFO_OBJECT (src, "FileTransfer is NULL");
-    goto init_failed;
-  }
-
-  if (ret == FALSE) {
-    GST_INFO_OBJECT (src,
-        "MythTV FileTransfer request failed when setting up socket connection!");
-    goto begin_req_failed;
-  }
-
-  GST_INFO_OBJECT (src, "MythTV FileTransfer filesize = %" G_GINT64_FORMAT ", "
-      "content_size = %" G_GINT64_FORMAT, gmyth_file_get_filesize (src->file),
-      src->content_size);
-
-  src->content_size = gmyth_file_get_filesize (src->file);
-
-  msg = gst_message_new_duration_changed (GST_OBJECT (src));
-  gst_element_post_message (GST_ELEMENT (src), msg);
-
-  src->do_start = FALSE;
-
-  basesrc = GST_BASE_SRC_CAST (src);
-  gst_segment_set_duration (&basesrc->segment, GST_FORMAT_BYTES,
-      src->content_size);
-  gst_element_post_message (GST_ELEMENT (src),
-      gst_message_new_duration_changed (GST_OBJECT (src)));
-#if 0
-  gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (src)),
-      gst_event_new_new_segment (TRUE, 1.0,
-          GST_FORMAT_BYTES, 0, src->content_size, 0));
-#endif
-done:
-  if (gmyth_uri != NULL) {
-    g_object_unref (gmyth_uri);
-    gmyth_uri = NULL;
-  }
-
-  if (chain_id_local != NULL) {
-    g_string_free (chain_id_local, TRUE);
-    chain_id_local = NULL;
-  }
-
-  return TRUE;
-
-  /*
-   * ERRORS
-   */
-init_failed:
-  if (gmyth_uri != NULL) {
-    g_object_unref (gmyth_uri);
-    gmyth_uri = NULL;
-  }
-
-  if (src->spawn_livetv != NULL) {
-    g_object_unref (src->spawn_livetv);
-    src->spawn_livetv = NULL;
-  }
-
-  GST_ELEMENT_ERROR (src, LIBRARY, INIT,
-      (NULL),
-      ("Could not initialize MythTV library (%i, %s)", ret, src->uri_name));
-
-
-  gst_mythtv_src_clear (src);
-
-  return FALSE;
-begin_req_failed:
-  if (gmyth_uri != NULL) {
-    g_object_unref (gmyth_uri);
-    gmyth_uri = NULL;
-  }
-
-  GST_ELEMENT_ERROR (src, LIBRARY, INIT,
-      (NULL),
-      ("Could not begin request sent to MythTV server (%i, %s)",
-          ret, src->uri_name));
-  return FALSE;
-}
-
-static gboolean
-gst_mythtv_src_get_size (GstBaseSrc * bsrc, guint64 * size)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (bsrc);
-  gboolean ret = TRUE;
-
-  GST_LOG_OBJECT (src,
-      "Differs from previous content size: %d (max.: %d)",
-      abs (src->content_size - src->prev_content_size),
-      GMYTHTV_TRANSFER_MAX_BUFFER);
-
-  if (src->live_tv) {
-    ret = FALSE;
-  } else if (src->live_tv && src->enable_timing_position
-      && (abs (src->content_size - src->bytes_read) <
-          GMYTHTV_TRANSFER_MAX_BUFFER)) {
-    gint64 new_offset;
-
-    new_offset = gmyth_recorder_get_file_position (src->spawn_livetv->recorder);
-    if (new_offset > 0 && new_offset > src->content_size) {
-      src->content_size = new_offset;
-    } else if (new_offset < src->content_size) {
-      src->update_prog_chain = TRUE;
-    }
-  }
-
-  *size = src->content_size;
-  GST_LOG_OBJECT (src, "Content size = %" G_GINT64_FORMAT, src->content_size);
-  return ret;
-}
-
-/*
- * close the socket and associated resources used both to recover from
- * errors and go to NULL state 
- */
-static gboolean
-gst_mythtv_src_stop (GstBaseSrc * bsrc)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (bsrc);
-
-  gst_mythtv_src_clear (src);
-  return TRUE;
-}
-
-#if 0
-static gint64
-gst_mythtv_src_get_position (GstMythtvSrc * src)
-{
-  gint64 size_tmp = 0;
-  guint max_tries = 2;
-
-  if (src->live_tv == TRUE &&
-      (abs (src->content_size - src->bytes_read) <
-          GMYTHTV_TRANSFER_MAX_BUFFER)) {
-
-  get_file_pos:
-    g_usleep (10);
-    size_tmp = gmyth_recorder_get_file_position (src->spawn_livetv->recorder);
-    if (size_tmp > (src->content_size + GMYTHTV_TRANSFER_MAX_BUFFER))
-      src->content_size = size_tmp;
-    else if (size_tmp > 0 && --max_tries > 0)
-      goto get_file_pos;
-    GST_LOG_OBJECT (src, "file_position = %" G_GINT64_FORMAT, size_tmp);
-    /*
-     * sets the last content size amount before it can be updated 
-     */
-    src->prev_content_size = src->content_size;
-  }
-  return src->content_size;
-}
-
-static gboolean
-gst_mythtv_src_handle_event (GstPad * pad, GstEvent * event)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (GST_PAD_PARENT (pad));
-  gint64 cont_size = 0;
-  gboolean ret = TRUE;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      if (src->live_tv) {
-        cont_size = gst_mythtv_src_get_position (src);
-        if (cont_size > src->content_size) {
-          src->content_size = cont_size;
-          src->eos = FALSE;
-        } else {
-          src->eos = TRUE;
-          gst_element_set_state (GST_ELEMENT (src), GST_STATE_NULL);
-          gst_element_set_locked_state (GST_ELEMENT (src), FALSE);
-        }
-      }
-      break;
-    default:
-      ret = gst_pad_event_default (pad, event);
-  }
-  GST_DEBUG_OBJECT (src, "HANDLE EVENT %d", ret);
-  return ret;
-}
-#endif
-static gboolean
-gst_mythtv_src_is_seekable (GstBaseSrc * push_src)
-{
-  return TRUE;
-}
-
-#if 0
-static gboolean
-gst_mythtv_src_handle_query (GstPad * pad, GstQuery * query)
-{
-  gboolean res = FALSE;
-  GstMythtvSrc *myth = GST_MYTHTV_SRC (gst_pad_get_parent (pad));
-  GstFormat formt;
-
-
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_POSITION:
-      gst_query_parse_position (query, &formt, NULL);
-      if (formt == GST_FORMAT_BYTES) {
-        gst_query_set_position (query, formt, myth->read_offset);
-        GST_DEBUG_OBJECT (myth, "POS %" G_GINT64_FORMAT, myth->read_offset);
-        res = TRUE;
-      } else if (formt == GST_FORMAT_TIME) {
-        res = gst_pad_query_default (pad, query);
-      }
-      break;
-    case GST_QUERY_DURATION:
-      gst_query_parse_duration (query, &formt, NULL);
-      if (formt == GST_FORMAT_BYTES) {
-        gint64 size = myth->content_size;
-
-        gst_query_set_duration (query, GST_FORMAT_BYTES, 10);
-        GST_DEBUG_OBJECT (myth, "SIZE %" G_GINT64_FORMAT, size);
-        res = TRUE;
-      } else if (formt == GST_FORMAT_TIME) {
-        res = gst_pad_query_default (pad, query);
-      }
-      break;
-    default:
-      res = gst_pad_query_default (pad, query);
-      break;
-  }
-
-  gst_object_unref (myth);
-
-  return res;
-}
-#endif
-static GstStateChangeReturn
-gst_mythtv_src_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_FAILURE;
-  GstMythtvSrc *src = GST_MYTHTV_SRC (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      if (!src->uri_name) {
-        GST_WARNING_OBJECT (src, "Invalid location");
-        return ret;
-      }
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      if (src->live_tv) {
-        if (!gmyth_recorder_send_frontend_ready_command
-            (src->spawn_livetv->recorder))
-          GST_WARNING_OBJECT (src,
-              "Couldn't send the FRONTEND_READY message to the backend!");
-        else
-          GST_DEBUG_OBJECT (src, "FRONTEND_READY was sent to the backend");
-      }
-      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_READY_TO_NULL:
-      gst_mythtv_src_clear (src);
-      break;
-    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-static void
-gst_mythtv_src_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstMythtvSrc *mythtvsrc = GST_MYTHTV_SRC (object);
-
-  GST_OBJECT_LOCK (mythtvsrc);
-  switch (prop_id) {
-    case PROP_LOCATION:
-      if (!g_value_get_string (value)) {
-        GST_WARNING ("location property cannot be NULL");
-        break;
-      }
-
-      if (mythtvsrc->uri_name != NULL) {
-        g_free (mythtvsrc->uri_name);
-        mythtvsrc->uri_name = NULL;
-      }
-      mythtvsrc->uri_name = g_value_dup_string (value);
-      break;
-    case PROP_GMYTHTV_VERSION:
-      mythtvsrc->mythtv_version = g_value_get_int (value);
-      break;
-    case PROP_GMYTHTV_LIVEID:
-      mythtvsrc->live_tv_id = g_value_get_int (value);
-      break;
-    case PROP_GMYTHTV_LIVE:
-      mythtvsrc->live_tv = g_value_get_boolean (value);
-      break;
-    case PROP_GMYTHTV_ENABLE_TIMING_POSITION:
-      mythtvsrc->enable_timing_position = g_value_get_boolean (value);
-      break;
-    case PROP_GMYTHTV_LIVE_CHAINID:
-      if (!g_value_get_string (value)) {
-        GST_WARNING_OBJECT (object,
-            "MythTV Live chainid property cannot be NULL");
-        break;
-      }
-
-      if (mythtvsrc->live_chain_id != NULL) {
-        g_free (mythtvsrc->live_chain_id);
-        mythtvsrc->live_chain_id = NULL;
-      }
-      mythtvsrc->live_chain_id = g_value_dup_string (value);
-      break;
-    case PROP_GMYTHTV_CHANNEL_NUM:
-      mythtvsrc->channel_name = g_value_dup_string (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-
-  GST_OBJECT_UNLOCK (mythtvsrc);
-}
-
-static void
-gst_mythtv_src_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstMythtvSrc *mythtvsrc = GST_MYTHTV_SRC (object);
-
-  GST_OBJECT_LOCK (mythtvsrc);
-  switch (prop_id) {
-    case PROP_LOCATION:
-      g_value_set_string (value, mythtvsrc->uri_name);
-      break;
-    case PROP_GMYTHTV_VERSION:
-      g_value_set_int (value, mythtvsrc->mythtv_version);
-      break;
-    case PROP_GMYTHTV_LIVEID:
-      g_value_set_int (value, mythtvsrc->live_tv_id);
-      break;
-    case PROP_GMYTHTV_LIVE:
-      g_value_set_boolean (value, mythtvsrc->live_tv);
-      break;
-    case PROP_GMYTHTV_ENABLE_TIMING_POSITION:
-      g_value_set_boolean (value, mythtvsrc->enable_timing_position);
-      break;
-    case PROP_GMYTHTV_LIVE_CHAINID:
-      g_value_set_string (value, mythtvsrc->live_chain_id);
-      break;
-    case PROP_GMYTHTV_CHANNEL_NUM:
-      g_value_set_string (value, mythtvsrc->channel_name);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-  GST_OBJECT_UNLOCK (mythtvsrc);
-}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "mythtvsrc", GST_RANK_NONE,
-      GST_TYPE_MYTHTV_SRC);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    mythtv,
-    "lib MythTV src",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
-
-
-/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
-gst_mythtv_src_uri_get_type (void)
-{
-  return GST_URI_SRC;
-}
-
-static gchar **
-gst_mythtv_src_uri_get_protocols (void)
-{
-  static const gchar *protocols[] = { "myth", "myths", NULL };
-
-  return (gchar **) protocols;
-}
-
-static const gchar *
-gst_mythtv_src_uri_get_uri (GstURIHandler * handler)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (handler);
-
-  return src->uri_name;
-}
-
-static gboolean
-gst_mythtv_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
-{
-  GstMythtvSrc *src = GST_MYTHTV_SRC (handler);
-
-  gchar *protocol;
-
-  protocol = gst_uri_get_protocol (uri);
-  if ((strcmp (protocol, "myth") != 0)
-      && (strcmp (protocol, "myths") != 0)) {
-    g_free (protocol);
-    return FALSE;
-  }
-  g_free (protocol);
-  g_object_set (src, "location", uri, NULL);
-
-  return TRUE;
-}
-
-static void
-gst_mythtv_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
-{
-  GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
-
-  iface->get_type = gst_mythtv_src_uri_get_type;
-  iface->get_protocols = gst_mythtv_src_uri_get_protocols;
-  iface->get_uri = gst_mythtv_src_uri_get_uri;
-  iface->set_uri = gst_mythtv_src_uri_set_uri;
-}
diff --git a/ext/mythtv/gstmythtvsrc.h b/ext/mythtv/gstmythtvsrc.h
deleted file mode 100644
index 1f5536d..0000000
--- a/ext/mythtv/gstmythtvsrc.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) <2006> INdT - Rosfran Borges <rosfran.borges@indt.org.br>
- * Copyright (C) <2007> INdT - Rentao Filho <renato.filho@indt.org.br>
- *
- * This library is free software; you can
- * redistribute it and/or modify it under the terms of the GNU Library
- * General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
- * General Public License for more details. You should have received a copy
- * of the GNU Library General Public License along with this library; if
- * not, write to the Free Software Foundation, Inc., 51 Franklin St,
- * Fifth Floor, Boston, MA 02110-1301, USA. 
- */
-
-#ifndef __GST_MYTHTV_SRC_H__
-#define __GST_MYTHTV_SRC_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstbasesrc.h>
-#include <gst/base/gstpushsrc.h>
-#include <stdio.h>
-
-#include <gmyth/gmyth_socket.h>
-#include <gmyth/gmyth_file.h>
-#include <gmyth/gmyth_file_transfer.h>
-#include <gmyth/gmyth_file_local.h>
-#include <gmyth/gmyth_livetv.h>
-#include <gmyth/gmyth_backendinfo.h>
-
-G_BEGIN_DECLS
-#define GST_TYPE_MYTHTV_SRC \
-  (gst_mythtv_src_get_type())
-#define GST_MYTHTV_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
-#define GST_MYTHTV_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
-#define GST_IS_MYTHTV_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
-#define GST_IS_MYTHTV_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
-typedef struct _GstMythtvSrc GstMythtvSrc;
-typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
-
-typedef enum {
-  GST_MYTHTV_SRC_FILE_TRANSFER,
-  GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
-  GST_MYTHTV_SRC_INVALID_DATA
-} GstMythtvState;
-
-struct _GstMythtvSrc {
-  GstPushSrc      element;
-
-  /*
-   * MythFileTransfer 
-   */
-  GMythFile      *file;
-  GMythLiveTV    *spawn_livetv;
-  GMythBackendInfo *backend_info;
-  GstMythtvState  state;
-  gchar          *uri_name;
-  gchar          *user_agent;
-  gchar          *live_chain_id;
-  gint            mythtv_version;
-  gint64          content_size;
-  gint64          prev_content_size;
-  gint64          content_size_last;
-  guint64         bytes_read;
-  gint64          read_offset;
-  gboolean        eos;
-  gboolean        do_start;
-  gboolean        unique_setup;
-  gboolean        live_tv;
-  gboolean        enable_timing_position;
-  gint            live_tv_id;
-  gchar          *channel_name;
-  guint           mode;
-
-  /*
-   * MythTV capabilities 
-   */
-  GstCaps        *mythtv_caps;
-  gboolean        update_prog_chain;
-
-  /*
-   * stablish a maximum iteration value to the IS_RECORDING message 
-   */
-  guint           wait_to_transfer;
-};
-
-struct _GstMythtvSrcClass {
-  GstPushSrcClass parent_class;
-};
-
-GType           gst_mythtv_src_get_type(void);
-
-G_END_DECLS
-#endif /* __GST_MYTHTV_SRC_H__ */
diff --git a/ext/nas/Makefile.in b/ext/nas/Makefile.in
index dcbf3df..49b213c 100644
--- a/ext/nas/Makefile.in
+++ b/ext/nas/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/nas
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/nas/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/nas/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,6 +1094,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/neon/Makefile.in b/ext/neon/Makefile.in
index 6296d26..abfe08c 100644
--- a/ext/neon/Makefile.in
+++ b/ext/neon/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/neon
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/neon/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/neon/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1057,6 +1091,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/ofa/Makefile.in b/ext/ofa/Makefile.in
index e45577c..18693a3 100644
--- a/ext/ofa/Makefile.in
+++ b/ext/ofa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/ofa
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -757,7 +792,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/ofa/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/ofa/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1066,6 +1100,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/openal/Makefile.in b/ext/openal/Makefile.in
index 5153da1..e867a7a 100644
--- a/ext/openal/Makefile.in
+++ b/ext/openal/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/openal
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -232,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +288,6 @@
 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@
@@ -289,7 +300,6 @@
 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@
@@ -297,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +443,6 @@
 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@
@@ -435,7 +451,6 @@
 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@
@@ -448,7 +463,6 @@
 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@
@@ -462,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -758,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/openal/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/openal/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1083,6 +1117,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am
index 3ba1c34..72472fb 100644
--- a/ext/opencv/Makefile.am
+++ b/ext/opencv/Makefile.am
@@ -1,7 +1,7 @@
 plugin_LTLIBRARIES = libgstopencv.la
 
 # sources used to compile this plug-in
-libgstopencv_la_SOURCES = gstopencv.c \
+libgstopencv_la_SOURCES = gstopencv.cpp \
 			gstopencvvideofilter.c \
 			gstopencvutils.c \
 			gstcvdilate.c \
@@ -11,9 +11,8 @@
 			gstcvlaplace.c \
 			gstcvsmooth.c \
 			gstcvsobel.c \
-			gstedgedetect.c \
-			gstfaceblur.c \
-			gstfacedetect.c \
+			gstedgedetect.cpp \
+			gstfaceblur.cpp \
 			gsthanddetect.c \
 			gstpyramidsegment.c \
 			gsttemplatematch.c \
@@ -21,6 +20,7 @@
 			gstmotioncells.c \
 			gstskindetect.c \
 			gstretinex.c \
+			gstfacedetect.cpp \
 			gstsegmentation.cpp \
 			gstgrabcut.cpp \
 			gstdisparity.cpp \
diff --git a/ext/opencv/Makefile.in b/ext/opencv/Makefile.in
index 5f62a08..c55a7b2 100644
--- a/ext/opencv/Makefile.in
+++ b/ext/opencv/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/opencv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,6 +129,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -168,13 +178,13 @@
 	libgstopencv_la-gstcvsmooth.lo libgstopencv_la-gstcvsobel.lo \
 	libgstopencv_la-gstedgedetect.lo \
 	libgstopencv_la-gstfaceblur.lo \
-	libgstopencv_la-gstfacedetect.lo \
 	libgstopencv_la-gsthanddetect.lo \
 	libgstopencv_la-gstpyramidsegment.lo \
 	libgstopencv_la-gsttemplatematch.lo \
 	libgstopencv_la-gsttextoverlay.lo \
 	libgstopencv_la-gstmotioncells.lo \
 	libgstopencv_la-gstskindetect.lo libgstopencv_la-gstretinex.lo \
+	libgstopencv_la-gstfacedetect.lo \
 	libgstopencv_la-gstsegmentation.lo \
 	libgstopencv_la-gstgrabcut.lo libgstopencv_la-gstdisparity.lo \
 	libgstopencv_la-motioncells_wrapper.lo \
@@ -268,6 +278,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -285,8 +296,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -311,8 +324,6 @@
 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@
@@ -325,7 +336,6 @@
 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@
@@ -333,6 +343,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -359,11 +371,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -382,8 +397,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -442,10 +455,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -462,7 +479,6 @@
 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@
@@ -471,7 +487,6 @@
 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@
@@ -484,7 +499,6 @@
 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@
@@ -498,6 +512,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -509,6 +524,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -547,6 +564,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -582,10 +600,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -611,6 +633,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -618,7 +643,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -647,6 +679,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -657,6 +690,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -687,17 +721,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -714,6 +747,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -752,6 +786,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -768,7 +803,7 @@
 plugin_LTLIBRARIES = libgstopencv.la
 
 # sources used to compile this plug-in
-libgstopencv_la_SOURCES = gstopencv.c \
+libgstopencv_la_SOURCES = gstopencv.cpp \
 			gstopencvvideofilter.c \
 			gstopencvutils.c \
 			gstcvdilate.c \
@@ -778,9 +813,8 @@
 			gstcvlaplace.c \
 			gstcvsmooth.c \
 			gstcvsobel.c \
-			gstedgedetect.c \
-			gstfaceblur.c \
-			gstfacedetect.c \
+			gstedgedetect.cpp \
+			gstfaceblur.cpp \
 			gsthanddetect.c \
 			gstpyramidsegment.c \
 			gsttemplatematch.c \
@@ -788,6 +822,7 @@
 			gstmotioncells.c \
 			gstskindetect.c \
 			gstretinex.c \
+			gstfacedetect.cpp \
 			gstsegmentation.cpp \
 			gstgrabcut.cpp \
 			gstdisparity.cpp \
@@ -857,7 +892,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/opencv/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/opencv/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -970,13 +1004,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstopencv_la-gstopencv.lo: gstopencv.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gstopencv.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstopencv.Tpo -c -o libgstopencv_la-gstopencv.lo `test -f 'gstopencv.c' || echo '$(srcdir)/'`gstopencv.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstopencv.Tpo $(DEPDIR)/libgstopencv_la-gstopencv.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstopencv.c' object='libgstopencv_la-gstopencv.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 $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -c -o libgstopencv_la-gstopencv.lo `test -f 'gstopencv.c' || echo '$(srcdir)/'`gstopencv.c
-
 libgstopencv_la-gstopencvvideofilter.lo: gstopencvvideofilter.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gstopencvvideofilter.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstopencvvideofilter.Tpo -c -o libgstopencv_la-gstopencvvideofilter.lo `test -f 'gstopencvvideofilter.c' || echo '$(srcdir)/'`gstopencvvideofilter.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstopencvvideofilter.Tpo $(DEPDIR)/libgstopencv_la-gstopencvvideofilter.Plo
@@ -1040,27 +1067,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -c -o libgstopencv_la-gstcvsobel.lo `test -f 'gstcvsobel.c' || echo '$(srcdir)/'`gstcvsobel.c
 
-libgstopencv_la-gstedgedetect.lo: gstedgedetect.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gstedgedetect.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstedgedetect.Tpo -c -o libgstopencv_la-gstedgedetect.lo `test -f 'gstedgedetect.c' || echo '$(srcdir)/'`gstedgedetect.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstedgedetect.Tpo $(DEPDIR)/libgstopencv_la-gstedgedetect.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstedgedetect.c' object='libgstopencv_la-gstedgedetect.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 $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -c -o libgstopencv_la-gstedgedetect.lo `test -f 'gstedgedetect.c' || echo '$(srcdir)/'`gstedgedetect.c
-
-libgstopencv_la-gstfaceblur.lo: gstfaceblur.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gstfaceblur.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstfaceblur.Tpo -c -o libgstopencv_la-gstfaceblur.lo `test -f 'gstfaceblur.c' || echo '$(srcdir)/'`gstfaceblur.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstfaceblur.Tpo $(DEPDIR)/libgstopencv_la-gstfaceblur.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstfaceblur.c' object='libgstopencv_la-gstfaceblur.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 $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -c -o libgstopencv_la-gstfaceblur.lo `test -f 'gstfaceblur.c' || echo '$(srcdir)/'`gstfaceblur.c
-
-libgstopencv_la-gstfacedetect.lo: gstfacedetect.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gstfacedetect.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstfacedetect.Tpo -c -o libgstopencv_la-gstfacedetect.lo `test -f 'gstfacedetect.c' || echo '$(srcdir)/'`gstfacedetect.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstfacedetect.Tpo $(DEPDIR)/libgstopencv_la-gstfacedetect.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstfacedetect.c' object='libgstopencv_la-gstfacedetect.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 $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -c -o libgstopencv_la-gstfacedetect.lo `test -f 'gstfacedetect.c' || echo '$(srcdir)/'`gstfacedetect.c
-
 libgstopencv_la-gsthanddetect.lo: gsthanddetect.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CFLAGS) $(CFLAGS) -MT libgstopencv_la-gsthanddetect.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gsthanddetect.Tpo -c -o libgstopencv_la-gsthanddetect.lo `test -f 'gsthanddetect.c' || echo '$(srcdir)/'`gsthanddetect.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gsthanddetect.Tpo $(DEPDIR)/libgstopencv_la-gsthanddetect.Plo
@@ -1134,6 +1140,34 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
+libgstopencv_la-gstopencv.lo: gstopencv.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopencv_la-gstopencv.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstopencv.Tpo -c -o libgstopencv_la-gstopencv.lo `test -f 'gstopencv.cpp' || echo '$(srcdir)/'`gstopencv.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstopencv.Tpo $(DEPDIR)/libgstopencv_la-gstopencv.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstopencv.cpp' object='libgstopencv_la-gstopencv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopencv_la-gstopencv.lo `test -f 'gstopencv.cpp' || echo '$(srcdir)/'`gstopencv.cpp
+
+libgstopencv_la-gstedgedetect.lo: gstedgedetect.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopencv_la-gstedgedetect.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstedgedetect.Tpo -c -o libgstopencv_la-gstedgedetect.lo `test -f 'gstedgedetect.cpp' || echo '$(srcdir)/'`gstedgedetect.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstedgedetect.Tpo $(DEPDIR)/libgstopencv_la-gstedgedetect.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstedgedetect.cpp' object='libgstopencv_la-gstedgedetect.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopencv_la-gstedgedetect.lo `test -f 'gstedgedetect.cpp' || echo '$(srcdir)/'`gstedgedetect.cpp
+
+libgstopencv_la-gstfaceblur.lo: gstfaceblur.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopencv_la-gstfaceblur.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstfaceblur.Tpo -c -o libgstopencv_la-gstfaceblur.lo `test -f 'gstfaceblur.cpp' || echo '$(srcdir)/'`gstfaceblur.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstfaceblur.Tpo $(DEPDIR)/libgstopencv_la-gstfaceblur.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstfaceblur.cpp' object='libgstopencv_la-gstfaceblur.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopencv_la-gstfaceblur.lo `test -f 'gstfaceblur.cpp' || echo '$(srcdir)/'`gstfaceblur.cpp
+
+libgstopencv_la-gstfacedetect.lo: gstfacedetect.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopencv_la-gstfacedetect.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstfacedetect.Tpo -c -o libgstopencv_la-gstfacedetect.lo `test -f 'gstfacedetect.cpp' || echo '$(srcdir)/'`gstfacedetect.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstfacedetect.Tpo $(DEPDIR)/libgstopencv_la-gstfacedetect.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstfacedetect.cpp' object='libgstopencv_la-gstfacedetect.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopencv_la-gstfacedetect.lo `test -f 'gstfacedetect.cpp' || echo '$(srcdir)/'`gstfacedetect.cpp
+
 libgstopencv_la-gstsegmentation.lo: gstsegmentation.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopencv_la-gstsegmentation.lo -MD -MP -MF $(DEPDIR)/libgstopencv_la-gstsegmentation.Tpo -c -o libgstopencv_la-gstsegmentation.lo `test -f 'gstsegmentation.cpp' || echo '$(srcdir)/'`gstsegmentation.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopencv_la-gstsegmentation.Tpo $(DEPDIR)/libgstopencv_la-gstsegmentation.Plo
@@ -1406,6 +1440,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-opencv_haarcascadesDATA uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp
index 5eaa67f..eaa013f 100644
--- a/ext/opencv/MotionCells.cpp
+++ b/ext/opencv/MotionCells.cpp
@@ -54,6 +54,7 @@
 #include <math.h>
 #include <gst/gst.h>
 #include "MotionCells.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 MotionCells::MotionCells ()
 {
@@ -75,7 +76,12 @@
   m_beta = 0.5;
   m_useAlpha = false;
   m_isVisible = false;
-
+  m_pCells = NULL;
+  m_gridx = 0;
+  m_gridy = 0;
+  m_cellwidth = 0;
+  m_cellheight = 0;
+  m_sensitivity = 0;
 }
 
 MotionCells::~MotionCells ()
diff --git a/ext/opencv/MotionCells.h b/ext/opencv/MotionCells.h
index 5c6d131..41bb9c7 100644
--- a/ext/opencv/MotionCells.h
+++ b/ext/opencv/MotionCells.h
@@ -45,7 +45,7 @@
 #ifndef MOTIONCELLS_H_
 #define MOTIONCELLS_H_
 
-#include <cv.h>                 // includes OpenCV definitions
+#include <opencv2/core/core_c.h>
 #ifdef HAVE_HIGHGUI_H
 #include <highgui.h>            // includes highGUI definitions
 #endif
diff --git a/ext/opencv/gstcvdilate.c b/ext/opencv/gstcvdilate.c
index 3b55f45..da0713d 100644
--- a/ext/opencv/gstcvdilate.c
+++ b/ext/opencv/gstcvdilate.c
@@ -48,6 +48,7 @@
 #include <gst/gst.h>
 
 #include "gstcvdilate.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_dilate_debug);
 #define GST_CAT_DEFAULT gst_cv_dilate_debug
diff --git a/ext/opencv/gstcvdilate.h b/ext/opencv/gstcvdilate.h
index 21c3fbf..fdacdd8 100644
--- a/ext/opencv/gstcvdilate.h
+++ b/ext/opencv/gstcvdilate.h
@@ -45,7 +45,7 @@
 #define __GST_CV_DILATE_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include "gstcvdilateerode.h"
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstcvdilateerode.h b/ext/opencv/gstcvdilateerode.h
index 20b55a6..94425f5 100644
--- a/ext/opencv/gstcvdilateerode.h
+++ b/ext/opencv/gstcvdilateerode.h
@@ -45,7 +45,7 @@
 #define __GST_CV_DILATE_ERODE_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstcvequalizehist.c b/ext/opencv/gstcvequalizehist.c
index 5c6526a..7384df1 100644
--- a/ext/opencv/gstcvequalizehist.c
+++ b/ext/opencv/gstcvequalizehist.c
@@ -49,6 +49,7 @@
 
 #include "gstopencvutils.h"
 #include "gstcvequalizehist.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_equalize_hist_debug);
 #define GST_CAT_DEFAULT gst_cv_equalize_hist_debug
diff --git a/ext/opencv/gstcvequalizehist.h b/ext/opencv/gstcvequalizehist.h
index 0be379d..d1d600d 100644
--- a/ext/opencv/gstcvequalizehist.h
+++ b/ext/opencv/gstcvequalizehist.h
@@ -45,7 +45,7 @@
 #define __GST_CV_EQUALIZE_HIST_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstcverode.c b/ext/opencv/gstcverode.c
index a869a84..4c62624 100644
--- a/ext/opencv/gstcverode.c
+++ b/ext/opencv/gstcverode.c
@@ -48,6 +48,7 @@
 #include <gst/gst.h>
 
 #include "gstcverode.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_erode_debug);
 #define GST_CAT_DEFAULT gst_cv_erode_debug
diff --git a/ext/opencv/gstcverode.h b/ext/opencv/gstcverode.h
index bc474f3..3f2944a 100644
--- a/ext/opencv/gstcverode.h
+++ b/ext/opencv/gstcverode.h
@@ -45,7 +45,7 @@
 #define __GST_CV_ERODE_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include "gstcvdilateerode.h"
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstcvlaplace.c b/ext/opencv/gstcvlaplace.c
index bd71ae6..5b95618 100644
--- a/ext/opencv/gstcvlaplace.c
+++ b/ext/opencv/gstcvlaplace.c
@@ -49,6 +49,7 @@
 
 #include "gstopencvutils.h"
 #include "gstcvlaplace.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_laplace_debug);
 #define GST_CAT_DEFAULT gst_cv_laplace_debug
diff --git a/ext/opencv/gstcvlaplace.h b/ext/opencv/gstcvlaplace.h
index 93201e4..098b347 100644
--- a/ext/opencv/gstcvlaplace.h
+++ b/ext/opencv/gstcvlaplace.h
@@ -45,7 +45,7 @@
 #define __GST_CV_LAPLACE_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstcvsmooth.c b/ext/opencv/gstcvsmooth.c
index ec36173..169fd16 100644
--- a/ext/opencv/gstcvsmooth.c
+++ b/ext/opencv/gstcvsmooth.c
@@ -49,6 +49,7 @@
 
 #include "gstopencvutils.h"
 #include "gstcvsmooth.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_smooth_debug);
 #define GST_CAT_DEFAULT gst_cv_smooth_debug
@@ -63,10 +64,10 @@
 {
   PROP_0,
   PROP_SMOOTH_TYPE,
-  PROP_PARAM1,
-  PROP_PARAM2,
-  PROP_PARAM3,
-  PROP_PARAM4
+  PROP_WIDTH,
+  PROP_HEIGHT,
+  PROP_COLORSIGMA,
+  PROP_SPATIALSIGMA
 };
 
 /* blur-no-scale only handle: gray 8bits -> gray 16bits
@@ -101,10 +102,10 @@
 }
 
 #define DEFAULT_CV_SMOOTH_TYPE CV_GAUSSIAN
-#define DEFAULT_PARAM1 3
-#define DEFAULT_PARAM2 0.0
-#define DEFAULT_PARAM3 0.0
-#define DEFAULT_PARAM4 0.0
+#define DEFAULT_WIDTH 3
+#define DEFAULT_HEIGHT 0
+#define DEFAULT_COLORSIGMA 0.0
+#define DEFAULT_SPATIALSIGMA 0.0
 
 G_DEFINE_TYPE (GstCvSmooth, gst_cv_smooth, GST_TYPE_OPENCV_VIDEO_FILTER);
 
@@ -144,35 +145,35 @@
           GST_TYPE_CV_SMOOTH_TYPE,
           DEFAULT_CV_SMOOTH_TYPE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
       );
-  g_object_class_install_property (gobject_class, PROP_PARAM1,
-      g_param_spec_int ("param1", "param1 (aperture width)",
+  g_object_class_install_property (gobject_class, PROP_WIDTH,
+      g_param_spec_int ("width", "width (aperture width)",
           "The aperture width (Must be positive and odd)."
           "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com"
           "/documentation/image_filtering.html#cvSmooth", 1, G_MAXINT,
-          DEFAULT_PARAM1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, PROP_PARAM2,
-      g_param_spec_int ("param2", "param2 (aperture height)",
+          DEFAULT_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_HEIGHT,
+      g_param_spec_int ("height", "height (aperture height)",
           "The aperture height, if zero, the width is used."
           "(Must be positive and odd or zero, unuset in median and bilateral "
           "types). Check cvSmooth OpenCV docs: http://opencv.willowgarage.com"
           "/documentation/image_filtering.html#cvSmooth", 0, G_MAXINT,
-          DEFAULT_PARAM2, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, PROP_PARAM3,
-      g_param_spec_double ("param3", "param3 (gaussian standard deviation or "
+          DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_COLORSIGMA,
+      g_param_spec_double ("color", "color (gaussian standard deviation or "
           "color sigma",
           "If type is gaussian, this means the standard deviation."
           "If type is bilateral, this means the color-sigma. If zero, "
           "Default values are used."
           "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com"
           "/documentation/image_filtering.html#cvSmooth",
-          0, G_MAXDOUBLE, DEFAULT_PARAM3,
+          0, G_MAXDOUBLE, DEFAULT_COLORSIGMA,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, PROP_PARAM4,
-      g_param_spec_double ("param4", "param4 (spatial sigma, bilateral only)",
+  g_object_class_install_property (gobject_class, PROP_SPATIALSIGMA,
+      g_param_spec_double ("spatial", "spatial (spatial sigma, bilateral only)",
           "Only used in bilateral type, means the spatial-sigma."
           "Check cvSmooth OpenCV docs: http://opencv.willowgarage.com"
           "/documentation/image_filtering.html#cvSmooth",
-          0, G_MAXDOUBLE, DEFAULT_PARAM4,
+          0, G_MAXDOUBLE, DEFAULT_SPATIALSIGMA,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gst_element_class_set_static_metadata (element_class,
@@ -200,10 +201,10 @@
 gst_cv_smooth_init (GstCvSmooth * filter)
 {
   filter->type = DEFAULT_CV_SMOOTH_TYPE;
-  filter->param1 = DEFAULT_PARAM1;
-  filter->param2 = DEFAULT_PARAM2;
-  filter->param3 = DEFAULT_PARAM3;
-  filter->param4 = DEFAULT_PARAM4;
+  filter->width = DEFAULT_WIDTH;
+  filter->height = DEFAULT_HEIGHT;
+  filter->colorsigma = DEFAULT_COLORSIGMA;
+  filter->spatialsigma = DEFAULT_SPATIALSIGMA;
 
   gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
 }
@@ -237,33 +238,33 @@
     case PROP_SMOOTH_TYPE:
       gst_cv_smooth_change_type (filter, g_value_get_enum (value));
       break;
-    case PROP_PARAM1:{
+    case PROP_WIDTH:{
       gint prop = g_value_get_int (value);
 
       if (prop % 2 == 1) {
-        filter->param1 = prop;
+        filter->width = prop;
       } else {
-        GST_WARNING_OBJECT (filter, "Ignoring value for param1, not odd"
+        GST_WARNING_OBJECT (filter, "Ignoring value for width, not odd"
             "(%d)", prop);
       }
     }
       break;
-    case PROP_PARAM2:{
+    case PROP_HEIGHT:{
       gint prop = g_value_get_int (value);
 
       if (prop % 2 == 1 || prop == 0) {
-        filter->param1 = prop;
+        filter->height = prop;
       } else {
-        GST_WARNING_OBJECT (filter, "Ignoring value for param2, not odd"
+        GST_WARNING_OBJECT (filter, "Ignoring value for height, not odd"
             " nor zero (%d)", prop);
       }
     }
       break;
-    case PROP_PARAM3:
-      filter->param3 = g_value_get_double (value);
+    case PROP_COLORSIGMA:
+      filter->colorsigma = g_value_get_double (value);
       break;
-    case PROP_PARAM4:
-      filter->param4 = g_value_get_double (value);
+    case PROP_SPATIALSIGMA:
+      filter->spatialsigma = g_value_get_double (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -281,17 +282,17 @@
     case PROP_SMOOTH_TYPE:
       g_value_set_enum (value, filter->type);
       break;
-    case PROP_PARAM1:
-      g_value_set_int (value, filter->param1);
+    case PROP_WIDTH:
+      g_value_set_int (value, filter->width);
       break;
-    case PROP_PARAM2:
-      g_value_set_int (value, filter->param2);
+    case PROP_HEIGHT:
+      g_value_set_int (value, filter->height);
       break;
-    case PROP_PARAM3:
-      g_value_set_double (value, filter->param3);
+    case PROP_COLORSIGMA:
+      g_value_set_double (value, filter->colorsigma);
       break;
-    case PROP_PARAM4:
-      g_value_set_double (value, filter->param4);
+    case PROP_SPATIALSIGMA:
+      g_value_set_double (value, filter->spatialsigma);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -305,8 +306,8 @@
 {
   GstCvSmooth *filter = GST_CV_SMOOTH (base);
 
-  cvSmooth (img, outimg, filter->type, filter->param1, filter->param2,
-      filter->param3, filter->param4);
+  cvSmooth (img, outimg, filter->type, filter->width, filter->height,
+      filter->colorsigma, filter->spatialsigma);
 
   return GST_FLOW_OK;
 }
@@ -317,8 +318,8 @@
 {
   GstCvSmooth *filter = GST_CV_SMOOTH (base);
 
-  cvSmooth (img, img, filter->type, filter->param1, filter->param2,
-      filter->param3, filter->param4);
+  cvSmooth (img, img, filter->type, filter->width, filter->height,
+      filter->colorsigma, filter->spatialsigma);
 
   return GST_FLOW_OK;
 }
diff --git a/ext/opencv/gstcvsmooth.h b/ext/opencv/gstcvsmooth.h
index 16521d9..c3e5164 100644
--- a/ext/opencv/gstcvsmooth.h
+++ b/ext/opencv/gstcvsmooth.h
@@ -45,7 +45,7 @@
 #define __GST_CV_SMOOTH_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -71,10 +71,10 @@
 
   gint type;
 
-  gint param1;
-  gint param2;
-  gdouble param3;
-  gdouble param4;
+  gint width;
+  gint height;
+  gdouble colorsigma;
+  gdouble spatialsigma;
 };
 
 struct _GstCvSmoothClass 
diff --git a/ext/opencv/gstcvsobel.c b/ext/opencv/gstcvsobel.c
index cd21189..1d9b151 100644
--- a/ext/opencv/gstcvsobel.c
+++ b/ext/opencv/gstcvsobel.c
@@ -49,6 +49,7 @@
 
 #include "gstopencvutils.h"
 #include "gstcvsobel.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_cv_sobel_debug);
 #define GST_CAT_DEFAULT gst_cv_sobel_debug
diff --git a/ext/opencv/gstcvsobel.h b/ext/opencv/gstcvsobel.h
index 55885d3..c6719a0 100644
--- a/ext/opencv/gstcvsobel.h
+++ b/ext/opencv/gstcvsobel.h
@@ -45,7 +45,7 @@
 #define __GST_CV_SOBEL_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstdisparity.h b/ext/opencv/gstdisparity.h
index a1e0bdc..adbb9ae 100644
--- a/ext/opencv/gstdisparity.h
+++ b/ext/opencv/gstdisparity.h
@@ -45,7 +45,7 @@
 #define __GST_DISPARITY_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <opencv2/legacy/legacy.hpp>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gstedgedetect.c b/ext/opencv/gstedgedetect.cpp
similarity index 95%
rename from ext/opencv/gstedgedetect.c
rename to ext/opencv/gstedgedetect.cpp
index bb85de4..5ecf8ec 100644
--- a/ext/opencv/gstedgedetect.c
+++ b/ext/opencv/gstedgedetect.cpp
@@ -64,6 +64,7 @@
 
 #include "gstopencvutils.h"
 #include "gstedgedetect.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_edge_detect_debug);
 #define GST_CAT_DEFAULT gst_edge_detect_debug
@@ -144,19 +145,19 @@
   g_object_class_install_property (gobject_class, PROP_MASK,
       g_param_spec_boolean ("mask", "Mask",
           "Sets whether the detected edges should be used as a mask on the original input or not",
-          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_THRESHOLD1,
       g_param_spec_int ("threshold1", "Threshold1",
           "Threshold value for canny edge detection", 0, 1000, 50,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_THRESHOLD2,
       g_param_spec_int ("threshold2", "Threshold2",
           "Second threshold value for canny edge detection", 0, 1000, 150,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_APERTURE,
       g_param_spec_int ("aperture", "Aperture",
           "Aperture size for Sobel operator (Must be either 3, 5 or 7", 3, 7, 3,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
 
   gst_element_class_set_static_metadata (element_class,
       "edgedetect",
@@ -311,8 +312,6 @@
   filter->cvImage->imageData = (char *) in_info.data;
 
   cvCvtColor (filter->cvImage, filter->cvGray, CV_RGB2GRAY);
-  cvSmooth (filter->cvGray, filter->cvEdge, CV_BLUR, 3, 3, 0, 0);
-  cvNot (filter->cvGray, filter->cvEdge);
   cvCanny (filter->cvGray, filter->cvEdge, filter->threshold1,
       filter->threshold2, filter->aperture);
 
@@ -324,7 +323,8 @@
   }
 
   outbuf = gst_buffer_new_and_alloc (filter->cvCEdge->imageSize);
-  gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1);
+  gst_buffer_copy_into (outbuf, buf,
+      (GstBufferCopyFlags) GST_BUFFER_COPY_METADATA, 0, -1);
 
   gst_buffer_map (outbuf, &out_info, GST_MAP_WRITE);
   memcpy (out_info.data, filter->cvCEdge->imageData,
diff --git a/ext/opencv/gstedgedetect.h b/ext/opencv/gstedgedetect.h
index 065dccf..23c95e6 100644
--- a/ext/opencv/gstedgedetect.h
+++ b/ext/opencv/gstedgedetect.h
@@ -47,7 +47,7 @@
 #define __GST_EDGE_DETECT_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+#include <opencv2/core/core_c.h>
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
diff --git a/ext/opencv/gstfaceblur.c b/ext/opencv/gstfaceblur.c
deleted file mode 100644
index fbf39e5..0000000
--- a/ext/opencv/gstfaceblur.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
- * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
- * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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-faceblur
- *
- * Blurs faces in images and videos.
- *
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch-0.10 videotestsrc ! decodebin ! videoconvert ! faceblur ! videoconvert ! xvimagesink
- * ]|
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
-#include "gstfaceblur.h"
-
-GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
-#define GST_CAT_DEFAULT gst_face_blur_debug
-
-#define DEFAULT_PROFILE OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
-    G_DIR_SEPARATOR_S "opencv" G_DIR_SEPARATOR_S "haarcascades" \
-    G_DIR_SEPARATOR_S "haarcascade_frontalface_default.xml"
-
-enum
-{
-  PROP_0,
-  PROP_PROFILE
-};
-
-/* the capabilities of the inputs and outputs.
- */
-static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
-    );
-
-static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
-    );
-
-G_DEFINE_TYPE (GstFaceBlur, gst_face_blur, GST_TYPE_OPENCV_VIDEO_FILTER);
-
-static void gst_face_blur_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_face_blur_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-
-
-static gboolean gst_face_blur_set_caps (GstOpencvVideoFilter * transform,
-    gint in_width, gint in_height, gint in_depth, gint in_channels,
-    gint out_width, gint out_height, gint out_depth, gint out_channels);
-static GstFlowReturn gst_face_blur_transform_ip (GstOpencvVideoFilter *
-    transform, GstBuffer * buffer, IplImage * img);
-
-static void gst_face_blur_load_profile (GstFaceBlur * filter);
-
-/* Clean up */
-static void
-gst_face_blur_finalize (GObject * obj)
-{
-  GstFaceBlur *filter = GST_FACE_BLUR (obj);
-
-  if (filter->cvGray)
-    cvReleaseImage (&filter->cvGray);
-
-  if (filter->cvStorage)
-    cvReleaseMemStorage (&filter->cvStorage);
-
-  if (filter->cvCascade)
-    cvReleaseHaarClassifierCascade (&filter->cvCascade);
-
-  g_free (filter->profile);
-
-  G_OBJECT_CLASS (gst_face_blur_parent_class)->finalize (obj);
-}
-
-
-/* initialize the faceblur's class */
-static void
-gst_face_blur_class_init (GstFaceBlurClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstOpencvVideoFilterClass *gstopencvbasefilter_class;
-
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  gobject_class = (GObjectClass *) klass;
-  gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
-
-  gstopencvbasefilter_class->cv_trans_ip_func = gst_face_blur_transform_ip;
-  gstopencvbasefilter_class->cv_set_caps = gst_face_blur_set_caps;
-
-  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_face_blur_finalize);
-  gobject_class->set_property = gst_face_blur_set_property;
-  gobject_class->get_property = gst_face_blur_get_property;
-
-  g_object_class_install_property (gobject_class, PROP_PROFILE,
-      g_param_spec_string ("profile", "Profile",
-          "Location of Haar cascade file to use for face blurion",
-          DEFAULT_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gst_element_class_set_static_metadata (element_class,
-      "faceblur",
-      "Filter/Effect/Video",
-      "Blurs faces in images and videos",
-      "Michael Sheldon <mike@mikeasoft.com>");
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_factory));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_factory));
-}
-
-/* initialize the new element
- * instantiate pads and add them to element
- * set pad calback functions
- * initialize instance structure
- */
-static void
-gst_face_blur_init (GstFaceBlur * filter)
-{
-  filter->profile = g_strdup (DEFAULT_PROFILE);
-  gst_face_blur_load_profile (filter);
-
-  gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
-      TRUE);
-}
-
-static void
-gst_face_blur_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstFaceBlur *filter = GST_FACE_BLUR (object);
-
-  switch (prop_id) {
-    case PROP_PROFILE:
-      g_free (filter->profile);
-      filter->profile = g_value_dup_string (value);
-      gst_face_blur_load_profile (filter);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_face_blur_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstFaceBlur *filter = GST_FACE_BLUR (object);
-
-  switch (prop_id) {
-    case PROP_PROFILE:
-      g_value_set_string (value, filter->profile);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static gboolean
-gst_face_blur_set_caps (GstOpencvVideoFilter * transform,
-    gint in_width, gint in_height, gint in_depth, gint in_channels,
-    gint out_width, gint out_height, gint out_depth, gint out_channels)
-{
-  GstFaceBlur *filter = GST_FACE_BLUR (transform);
-
-  if (filter->cvGray)
-    cvReleaseImage (&filter->cvGray);
-  filter->cvGray =
-      cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, 1);
-
-  if (filter->cvStorage)
-    cvClearMemStorage (filter->cvStorage);
-  else
-    filter->cvStorage = cvCreateMemStorage (0);
-
-  return TRUE;
-}
-
-static GstFlowReturn
-gst_face_blur_transform_ip (GstOpencvVideoFilter * transform,
-    GstBuffer * buffer, IplImage * img)
-{
-  GstFaceBlur *filter = GST_FACE_BLUR (transform);
-  CvSeq *faces;
-  int i;
-
-  if (!filter->cvCascade)
-    return GST_FLOW_OK;
-
-  cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
-  cvClearMemStorage (filter->cvStorage);
-
-  faces =
-      cvHaarDetectObjects (filter->cvGray, filter->cvCascade,
-      filter->cvStorage, 1.1, 2, 0, cvSize (30, 30)
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
-      , cvSize (0, 0)
-#endif
-      );
-
-  for (i = 0; i < (faces ? faces->total : 0); i++) {
-    CvRect *r = (CvRect *) cvGetSeqElem (faces, i);
-    cvSetImageROI (img, *r);
-    cvSmooth (img, img, CV_BLUR, 11, 11, 0, 0);
-    cvSmooth (img, img, CV_GAUSSIAN, 11, 11, 0, 0);
-    cvResetImageROI (img);
-  }
-
-  return GST_FLOW_OK;
-}
-
-
-static void
-gst_face_blur_load_profile (GstFaceBlur * filter)
-{
-  if (filter->cvCascade)
-    cvReleaseHaarClassifierCascade (&filter->cvCascade);
-  filter->cvCascade =
-      (CvHaarClassifierCascade *) cvLoad (filter->profile, 0, 0, 0);
-  if (!filter->cvCascade)
-    GST_WARNING ("Couldn't load Haar classifier cascade: %s.", filter->profile);
-}
-
-
-/* entry point to initialize the plug-in
- * initialize the plug-in itself
- * register the element factories and other features
- */
-gboolean
-gst_face_blur_plugin_init (GstPlugin * plugin)
-{
-  /* debug category for filtering log messages */
-  GST_DEBUG_CATEGORY_INIT (gst_face_blur_debug, "faceblur",
-      0, "Blurs faces in images and videos");
-
-  return gst_element_register (plugin, "faceblur", GST_RANK_NONE,
-      GST_TYPE_FACE_BLUR);
-}
diff --git a/ext/opencv/gstfaceblur.cpp b/ext/opencv/gstfaceblur.cpp
new file mode 100644
index 0000000..40ff4f8
--- /dev/null
+++ b/ext/opencv/gstfaceblur.cpp
@@ -0,0 +1,410 @@
+/*
+ * GStreamer
+ * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
+ * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
+ * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
+ * which case the following provisions apply instead of the ones
+ * mentioned above:
+ *
+ * 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-faceblur
+ *
+ * Blurs faces in images and videos.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 autovideosrc ! videoconvert ! faceblur ! videoconvert ! autovideosink
+ * ]|
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gst/gst.h>
+#include <vector>
+
+#include "gstopencvutils.h"
+#include "gstfaceblur.h"
+#include <opencv2/imgproc/imgproc_c.h>
+#include <opencv2/imgproc/imgproc.hpp>
+
+GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
+#define GST_CAT_DEFAULT gst_face_blur_debug
+
+#define DEFAULT_PROFILE OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
+    G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
+    G_DIR_SEPARATOR_S "haarcascade_frontalface_default.xml"
+#define DEFAULT_SCALE_FACTOR 1.25
+#define DEFAULT_FLAGS CV_HAAR_DO_CANNY_PRUNING
+#define DEFAULT_MIN_NEIGHBORS 3
+#define DEFAULT_MIN_SIZE_WIDTH 30
+#define DEFAULT_MIN_SIZE_HEIGHT 30
+
+using namespace cv;
+enum
+{
+  PROP_0,
+  PROP_PROFILE,
+  PROP_SCALE_FACTOR,
+  PROP_MIN_NEIGHBORS,
+  PROP_FLAGS,
+  PROP_MIN_SIZE_WIDTH,
+  PROP_MIN_SIZE_HEIGHT
+};
+
+/**
+ * GstOpencvFaceDetectFlags:
+ * @GST_CAMERABIN_FLAG_SOURCE_RESIZE: enable video crop and scale
+ *   after capture
+ *
+ * Flags parameter to OpenCV's cvHaarDetectObjects function.
+ */
+typedef enum
+{
+  GST_OPENCV_FACE_BLUR_HAAR_DO_CANNY_PRUNING = (1 << 0)
+} GstOpencvFaceBlurFlags;
+
+#define GST_TYPE_OPENCV_FACE_BLUR_FLAGS (gst_opencv_face_blur_flags_get_type())
+
+static void
+register_gst_opencv_face_blur_flags (GType * id)
+{
+  static const GFlagsValue values[] = {
+    {(guint) GST_OPENCV_FACE_BLUR_HAAR_DO_CANNY_PRUNING,
+        "Do Canny edge detection to discard some regions", "do-canny-pruning"},
+    {0, NULL, NULL}
+  };
+  *id = g_flags_register_static ("GstOpencvFaceBlurFlags", values);
+}
+
+static GType
+gst_opencv_face_blur_flags_get_type (void)
+{
+  static GType id;
+  static GOnce once = G_ONCE_INIT;
+
+  g_once (&once, (GThreadFunc) register_gst_opencv_face_blur_flags, &id);
+  return id;
+}
+
+/* the capabilities of the inputs and outputs.
+ */
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
+    );
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB"))
+    );
+
+G_DEFINE_TYPE (GstFaceBlur, gst_face_blur, GST_TYPE_OPENCV_VIDEO_FILTER);
+
+static void gst_face_blur_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_face_blur_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+
+static gboolean gst_face_blur_set_caps (GstOpencvVideoFilter * transform,
+    gint in_width, gint in_height, gint in_depth, gint in_channels,
+    gint out_width, gint out_height, gint out_depth, gint out_channels);
+static GstFlowReturn gst_face_blur_transform_ip (GstOpencvVideoFilter *
+    transform, GstBuffer * buffer, IplImage * img);
+
+static CascadeClassifier *gst_face_blur_load_profile (GstFaceBlur *
+    filter, gchar * profile);
+
+/* Clean up */
+static void
+gst_face_blur_finalize (GObject * obj)
+{
+  GstFaceBlur *filter = GST_FACE_BLUR (obj);
+
+  if (filter->cvGray)
+    cvReleaseImage (&filter->cvGray);
+
+  if (filter->cvCascade)
+    delete filter->cvCascade;
+
+  g_free (filter->profile);
+
+  G_OBJECT_CLASS (gst_face_blur_parent_class)->finalize (obj);
+}
+
+
+/* initialize the faceblur's class */
+static void
+gst_face_blur_class_init (GstFaceBlurClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstOpencvVideoFilterClass *gstopencvbasefilter_class;
+
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  gobject_class = (GObjectClass *) klass;
+  gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
+
+  gstopencvbasefilter_class->cv_trans_ip_func = gst_face_blur_transform_ip;
+  gstopencvbasefilter_class->cv_set_caps = gst_face_blur_set_caps;
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_face_blur_finalize);
+  gobject_class->set_property = gst_face_blur_set_property;
+  gobject_class->get_property = gst_face_blur_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_PROFILE,
+      g_param_spec_string ("profile", "Profile",
+          "Location of Haar cascade file to use for face blurion",
+          DEFAULT_PROFILE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_FLAGS,
+      g_param_spec_flags ("flags", "Flags", "Flags to cvHaarDetectObjects",
+          GST_TYPE_OPENCV_FACE_BLUR_FLAGS, DEFAULT_FLAGS,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_SCALE_FACTOR,
+      g_param_spec_double ("scale-factor", "Scale factor",
+          "Factor by which the windows is scaled after each scan", 1.1, 10.0,
+          DEFAULT_SCALE_FACTOR,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_MIN_NEIGHBORS,
+      g_param_spec_int ("min-neighbors", "Mininum neighbors",
+          "Minimum number (minus 1) of neighbor rectangles that makes up "
+          "an object", 0, G_MAXINT, DEFAULT_MIN_NEIGHBORS,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_MIN_SIZE_WIDTH,
+      g_param_spec_int ("min-size-width", "Minimum size width",
+          "Minimum window width size", 0, G_MAXINT, DEFAULT_MIN_SIZE_WIDTH,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_MIN_SIZE_HEIGHT,
+      g_param_spec_int ("min-size-height", "Minimum size height",
+          "Minimum window height size", 0, G_MAXINT, DEFAULT_MIN_SIZE_HEIGHT,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  gst_element_class_set_static_metadata (element_class,
+      "faceblur",
+      "Filter/Effect/Video",
+      "Blurs faces in images and videos",
+      "Michael Sheldon <mike@mikeasoft.com>,Robert Jobbagy <jobbagy.robert@gmail.com>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_factory));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_factory));
+}
+
+/* initialize the new element
+ * instantiate pads and add them to element
+ * set pad calback functions
+ * initialize instance structure
+ */
+static void
+gst_face_blur_init (GstFaceBlur * filter)
+{
+  filter->profile = g_strdup (DEFAULT_PROFILE);
+  filter->cvCascade = gst_face_blur_load_profile (filter, filter->profile);
+  filter->sent_profile_load_failed_msg = FALSE;
+  filter->scale_factor = DEFAULT_SCALE_FACTOR;
+  filter->min_neighbors = DEFAULT_MIN_NEIGHBORS;
+  filter->flags = DEFAULT_FLAGS;
+  filter->min_size_width = DEFAULT_MIN_SIZE_WIDTH;
+  filter->min_size_height = DEFAULT_MIN_SIZE_HEIGHT;
+
+  gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
+      TRUE);
+}
+
+static void
+gst_face_blur_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstFaceBlur *filter = GST_FACE_BLUR (object);
+
+  switch (prop_id) {
+    case PROP_PROFILE:
+      g_free (filter->profile);
+      if (filter->cvCascade)
+        delete filter->cvCascade;
+      filter->profile = g_value_dup_string (value);
+      filter->cvCascade = gst_face_blur_load_profile (filter, filter->profile);
+      filter->sent_profile_load_failed_msg = FALSE;
+      break;
+    case PROP_SCALE_FACTOR:
+      filter->scale_factor = g_value_get_double (value);
+      break;
+    case PROP_MIN_NEIGHBORS:
+      filter->min_neighbors = g_value_get_int (value);
+      break;
+    case PROP_MIN_SIZE_WIDTH:
+      filter->min_size_width = g_value_get_int (value);
+      break;
+    case PROP_MIN_SIZE_HEIGHT:
+      filter->min_size_height = g_value_get_int (value);
+      break;
+    case PROP_FLAGS:
+      filter->flags = g_value_get_flags (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_face_blur_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstFaceBlur *filter = GST_FACE_BLUR (object);
+
+  switch (prop_id) {
+    case PROP_PROFILE:
+      g_value_set_string (value, filter->profile);
+      break;
+    case PROP_SCALE_FACTOR:
+      g_value_set_double (value, filter->scale_factor);
+      break;
+    case PROP_MIN_NEIGHBORS:
+      g_value_set_int (value, filter->min_neighbors);
+      break;
+    case PROP_MIN_SIZE_WIDTH:
+      g_value_set_int (value, filter->min_size_width);
+      break;
+    case PROP_MIN_SIZE_HEIGHT:
+      g_value_set_int (value, filter->min_size_height);
+      break;
+    case PROP_FLAGS:
+      g_value_set_flags (value, filter->flags);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_face_blur_set_caps (GstOpencvVideoFilter * transform,
+    gint in_width, gint in_height, gint in_depth, gint in_channels,
+    gint out_width, gint out_height, gint out_depth, gint out_channels)
+{
+  GstFaceBlur *filter = GST_FACE_BLUR (transform);
+
+  if (filter->cvGray)
+    cvReleaseImage (&filter->cvGray);
+  filter->cvGray =
+      cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, 1);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_face_blur_transform_ip (GstOpencvVideoFilter * transform,
+    GstBuffer * buffer, IplImage * img)
+{
+  GstFaceBlur *filter = GST_FACE_BLUR (transform);
+  vector < Rect > faces;
+  unsigned int i;
+
+  if (!filter->cvCascade) {
+    if (filter->profile != NULL
+        && filter->sent_profile_load_failed_msg == FALSE) {
+      GST_ELEMENT_WARNING (filter, RESOURCE, NOT_FOUND,
+          ("Profile %s is missing.", filter->profile),
+          ("missing faceblur profile file %s", filter->profile));
+      filter->sent_profile_load_failed_msg = TRUE;
+    }
+    return GST_FLOW_OK;
+  }
+
+  cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
+
+  Mat image (filter->cvGray, Rect (filter->cvGray->origin,
+          filter->cvGray->origin, filter->cvGray->width,
+          filter->cvGray->height));
+  filter->cvCascade->detectMultiScale (image, faces, filter->scale_factor,
+      filter->min_neighbors, filter->flags,
+      cvSize (filter->min_size_width, filter->min_size_height), cvSize (0, 0));
+
+  if (!faces.empty ()) {
+
+    for (i = 0; i < faces.size (); ++i) {
+      Rect *r = &faces[i];
+      Mat roi (img, Rect (r->x, r->y, r->width, r->height));
+      blur (roi, roi, Size (11, 11));
+      GaussianBlur (roi, roi, Size (11, 11), 0, 0);
+    }
+  }
+
+  return GST_FLOW_OK;
+}
+
+static CascadeClassifier *
+gst_face_blur_load_profile (GstFaceBlur * filter, gchar * profile)
+{
+  CascadeClassifier *cascade;
+
+  cascade = new CascadeClassifier (profile);
+  if (cascade->empty ()) {
+    GST_ERROR_OBJECT (filter, "Invalid profile file: %s", profile);
+    delete cascade;
+    return NULL;
+  }
+  return cascade;
+}
+
+
+/* entry point to initialize the plug-in
+ * initialize the plug-in itself
+ * register the element factories and other features
+ */
+gboolean
+gst_face_blur_plugin_init (GstPlugin * plugin)
+{
+  /* debug category for filtering log messages */
+  GST_DEBUG_CATEGORY_INIT (gst_face_blur_debug, "faceblur",
+      0, "Blurs faces in images and videos");
+
+  return gst_element_register (plugin, "faceblur", GST_RANK_NONE,
+      GST_TYPE_FACE_BLUR);
+}
diff --git a/ext/opencv/gstfaceblur.h b/ext/opencv/gstfaceblur.h
index f3547ce..890c0c9 100644
--- a/ext/opencv/gstfaceblur.h
+++ b/ext/opencv/gstfaceblur.h
@@ -3,6 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
+ * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -47,13 +48,10 @@
 #define __GST_FACE_BLUR_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+#include <opencv2/core/version.hpp>
 
 #include "gstopencvvideofilter.h"
-
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
 #include <opencv2/objdetect/objdetect.hpp>
-#endif
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
@@ -74,13 +72,18 @@
 {
   GstOpencvVideoFilter element;
 
-  gboolean display;
+  gboolean sent_profile_load_failed_msg;
 
   gchar *profile;
+  gboolean display;
+  gdouble scale_factor;
+  gint min_neighbors;
+  gint flags;
+  gint min_size_width;
+  gint min_size_height;
 
   IplImage *cvGray;
-  CvHaarClassifierCascade *cvCascade;
-  CvMemStorage *cvStorage;
+  cv::CascadeClassifier *cvCascade;
 };
 
 struct _GstFaceBlurClass
diff --git a/ext/opencv/gstfacedetect.c b/ext/opencv/gstfacedetect.cpp
similarity index 71%
rename from ext/opencv/gstfacedetect.c
rename to ext/opencv/gstfacedetect.cpp
index d921647..7ec6e39 100644
--- a/ext/opencv/gstfacedetect.c
+++ b/ext/opencv/gstfacedetect.cpp
@@ -4,7 +4,8 @@
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
  * Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
- * 
+ * Copyright (C) 2014 Robert Jobbagy <jobbagy.robert@gmail.com>
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -48,19 +49,20 @@
  * SECTION:element-facedetect
  *
  * Performs face detection on videos and images.
+ * If you have high cpu load you need to use videoscale with capsfilter and reduce the video resolution.
  *
  * The image is scaled down multiple times using the GstFaceDetect::scale-factor
- * until the size is &lt;= GstFaceDetect::min-size-width or 
- * GstFaceDetect::min-size-height. 
+ * until the size is &lt;= GstFaceDetect::min-size-width or
+ * GstFaceDetect::min-size-height.
  *
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch-0.10 autovideosrc ! decodebin2 ! colorspace ! facedetect ! videoconvert ! xvimagesink
+ * gst-launch-1.0 autovideosrc ! decodebin ! colorspace ! facedetect ! videoconvert ! xvimagesink
  * ]| Detect and show faces
  * |[
- * gst-launch-0.10 autovideosrc ! video/x-raw,width=320,height=240 ! videoconvert ! facedetect min-size-width=60 min-size-height=60 ! colorspace ! xvimagesink
- * ]| Detect large faces on a smaller image 
+ * gst-launch-1.0 autovideosrc ! video/x-raw,width=320,height=240 ! videoconvert ! facedetect min-size-width=60 min-size-height=60 ! colorspace ! xvimagesink
+ * ]| Detect large faces on a smaller image
  *
  * </refsect2>
  */
@@ -76,26 +78,30 @@
 
 #include <gst/gst.h>
 #include <gst/video/gstvideometa.h>
+#include <vector>
 
 #include "gstopencvutils.h"
 #include "gstfacedetect.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug);
 #define GST_CAT_DEFAULT gst_face_detect_debug
 
 #define HAAR_CASCADES_DIR OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
-    G_DIR_SEPARATOR_S "opencv" G_DIR_SEPARATOR_S "haarcascades" \
+    G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
     G_DIR_SEPARATOR_S
 #define DEFAULT_FACE_PROFILE HAAR_CASCADES_DIR "haarcascade_frontalface_default.xml"
 #define DEFAULT_NOSE_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_nose.xml"
 #define DEFAULT_MOUTH_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_mouth.xml"
 #define DEFAULT_EYES_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_eyepair_small.xml"
-#define DEFAULT_SCALE_FACTOR 1.1
-#define DEFAULT_FLAGS 0
+#define DEFAULT_SCALE_FACTOR 1.25
+#define DEFAULT_FLAGS CV_HAAR_DO_CANNY_PRUNING
 #define DEFAULT_MIN_NEIGHBORS 3
-#define DEFAULT_MIN_SIZE_WIDTH 0
-#define DEFAULT_MIN_SIZE_HEIGHT 0
+#define DEFAULT_MIN_SIZE_WIDTH 30
+#define DEFAULT_MIN_SIZE_HEIGHT 30
+#define DEFAULT_MIN_STDDEV 0
 
+using namespace cv;
 /* Filter signals and args */
 enum
 {
@@ -116,7 +122,8 @@
   PROP_FLAGS,
   PROP_MIN_SIZE_WIDTH,
   PROP_MIN_SIZE_HEIGHT,
-  PROP_UPDATES
+  PROP_UPDATES,
+  PROP_MIN_STDDEV
 };
 
 
@@ -132,6 +139,28 @@
 
 #define GST_TYPE_OPENCV_FACE_DETECT_FLAGS (gst_opencv_face_detect_flags_get_type())
 
+inline void
+structure_and_message (const vector < Rect > &rectangles, const gchar * name,
+    guint rx, guint ry, GstFaceDetect * filter, GstStructure * s)
+{
+  Rect sr = rectangles[0];
+  gchar *nx = g_strconcat (name, "->x", NULL);
+  gchar *ny = g_strconcat (name, "->y", NULL);
+  gchar *nw = g_strconcat (name, "->width", NULL);
+  gchar *nh = g_strconcat (name, "->height", NULL);
+
+  GST_LOG_OBJECT (filter,
+      "%s/%" G_GSIZE_FORMAT ": x,y = %4u,%4u: w.h = %4u,%4u",
+      name, rectangles.size (), rx + sr.x, ry + sr.y, sr.width, sr.height);
+  gst_structure_set (s, nx, G_TYPE_UINT, rx + sr.x, ny, G_TYPE_UINT, ry + sr.y,
+      nw, G_TYPE_UINT, sr.width, nh, G_TYPE_UINT, sr.height, NULL);
+
+  g_free (nx);
+  g_free (ny);
+  g_free (nw);
+  g_free (nh);
+}
+
 static void
 register_gst_opencv_face_detect_flags (GType * id)
 {
@@ -206,7 +235,7 @@
 static GstFlowReturn gst_face_detect_transform_ip (GstOpencvVideoFilter * base,
     GstBuffer * buf, IplImage * img);
 
-static CvHaarClassifierCascade *gst_face_detect_load_profile (GstFaceDetect *
+static CascadeClassifier *gst_face_detect_load_profile (GstFaceDetect *
     filter, gchar * profile);
 
 /* Clean up */
@@ -217,8 +246,6 @@
 
   if (filter->cvGray)
     cvReleaseImage (&filter->cvGray);
-  if (filter->cvStorage)
-    cvReleaseMemStorage (&filter->cvStorage);
 
   g_free (filter->face_profile);
   g_free (filter->nose_profile);
@@ -226,13 +253,13 @@
   g_free (filter->eyes_profile);
 
   if (filter->cvFaceDetect)
-    cvReleaseHaarClassifierCascade (&filter->cvFaceDetect);
+    delete (filter->cvFaceDetect);
   if (filter->cvNoseDetect)
-    cvReleaseHaarClassifierCascade (&filter->cvNoseDetect);
+    delete (filter->cvNoseDetect);
   if (filter->cvMouthDetect)
-    cvReleaseHaarClassifierCascade (&filter->cvMouthDetect);
+    delete (filter->cvMouthDetect);
   if (filter->cvEyesDetect)
-    cvReleaseHaarClassifierCascade (&filter->cvEyesDetect);
+    delete (filter->cvEyesDetect);
 
   G_OBJECT_CLASS (gst_face_detect_parent_class)->finalize (obj);
 }
@@ -258,52 +285,66 @@
   g_object_class_install_property (gobject_class, PROP_DISPLAY,
       g_param_spec_boolean ("display", "Display",
           "Sets whether the detected faces should be highlighted in the output",
-          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
 
   g_object_class_install_property (gobject_class, PROP_FACE_PROFILE,
       g_param_spec_string ("profile", "Face profile",
           "Location of Haar cascade file to use for face detection",
-          DEFAULT_FACE_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_FACE_PROFILE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_NOSE_PROFILE,
       g_param_spec_string ("nose-profile", "Nose profile",
           "Location of Haar cascade file to use for nose detection",
-          DEFAULT_NOSE_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_NOSE_PROFILE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_MOUTH_PROFILE,
       g_param_spec_string ("mouth-profile", "Mouth profile",
           "Location of Haar cascade file to use for mouth detection",
-          DEFAULT_MOUTH_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_MOUTH_PROFILE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_EYES_PROFILE,
       g_param_spec_string ("eyes-profile", "Eyes profile",
           "Location of Haar cascade file to use for eye-pair detection",
-          DEFAULT_EYES_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_EYES_PROFILE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
 
   g_object_class_install_property (gobject_class, PROP_FLAGS,
       g_param_spec_flags ("flags", "Flags", "Flags to cvHaarDetectObjects",
           GST_TYPE_OPENCV_FACE_DETECT_FLAGS, DEFAULT_FLAGS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_SCALE_FACTOR,
       g_param_spec_double ("scale-factor", "Scale factor",
           "Factor by which the frame is scaled after each object scan",
           1.1, 10.0, DEFAULT_SCALE_FACTOR,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_MIN_NEIGHBORS,
       g_param_spec_int ("min-neighbors", "Mininum neighbors",
           "Minimum number (minus 1) of neighbor rectangles that makes up "
           "an object", 0, G_MAXINT, DEFAULT_MIN_NEIGHBORS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_MIN_SIZE_WIDTH,
       g_param_spec_int ("min-size-width", "Minimum face width",
           "Minimum area width to be recognized as a face", 0, G_MAXINT,
-          DEFAULT_MIN_SIZE_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_MIN_SIZE_WIDTH,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_MIN_SIZE_HEIGHT,
       g_param_spec_int ("min-size-height", "Minimum face height",
           "Minimum area height to be recognized as a face", 0, G_MAXINT,
-          DEFAULT_MIN_SIZE_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_MIN_SIZE_HEIGHT,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (gobject_class, PROP_UPDATES,
       g_param_spec_enum ("updates", "Updates",
           "When send update bus messages, if at all",
           GST_TYPE_FACE_DETECT_UPDATES, GST_FACEDETECT_UPDATES_EVERY_FRAME,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+  g_object_class_install_property (gobject_class, PROP_MIN_STDDEV,
+      g_param_spec_int ("min-stddev", "Minimum image standard deviation",
+          "Minimum image average standard deviation: on images with standard "
+          "deviation lesser than this value facedetection will not be "
+          "performed. Setting this property help to save cpu and reduce "
+          "false positives not performing face detection on images with "
+          "little changes", 0, 255, DEFAULT_MIN_STDDEV,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
 
   gst_element_class_set_static_metadata (element_class,
       "facedetect",
@@ -334,6 +375,7 @@
   filter->flags = DEFAULT_FLAGS;
   filter->min_size_width = DEFAULT_MIN_SIZE_WIDTH;
   filter->min_size_height = DEFAULT_MIN_SIZE_HEIGHT;
+  filter->min_stddev = DEFAULT_MIN_STDDEV;
   filter->cvFaceDetect =
       gst_face_detect_load_profile (filter, filter->face_profile);
   filter->cvNoseDetect =
@@ -358,7 +400,7 @@
     case PROP_FACE_PROFILE:
       g_free (filter->face_profile);
       if (filter->cvFaceDetect)
-        cvReleaseHaarClassifierCascade (&filter->cvFaceDetect);
+        delete (filter->cvFaceDetect);
       filter->face_profile = g_value_dup_string (value);
       filter->cvFaceDetect =
           gst_face_detect_load_profile (filter, filter->face_profile);
@@ -366,7 +408,7 @@
     case PROP_NOSE_PROFILE:
       g_free (filter->nose_profile);
       if (filter->cvNoseDetect)
-        cvReleaseHaarClassifierCascade (&filter->cvNoseDetect);
+        delete (filter->cvNoseDetect);
       filter->nose_profile = g_value_dup_string (value);
       filter->cvNoseDetect =
           gst_face_detect_load_profile (filter, filter->nose_profile);
@@ -374,7 +416,7 @@
     case PROP_MOUTH_PROFILE:
       g_free (filter->mouth_profile);
       if (filter->cvMouthDetect)
-        cvReleaseHaarClassifierCascade (&filter->cvMouthDetect);
+        delete (filter->cvMouthDetect);
       filter->mouth_profile = g_value_dup_string (value);
       filter->cvMouthDetect =
           gst_face_detect_load_profile (filter, filter->mouth_profile);
@@ -382,7 +424,7 @@
     case PROP_EYES_PROFILE:
       g_free (filter->eyes_profile);
       if (filter->cvEyesDetect)
-        cvReleaseHaarClassifierCascade (&filter->cvEyesDetect);
+        delete (filter->cvEyesDetect);
       filter->eyes_profile = g_value_dup_string (value);
       filter->cvEyesDetect =
           gst_face_detect_load_profile (filter, filter->eyes_profile);
@@ -402,6 +444,9 @@
     case PROP_MIN_SIZE_HEIGHT:
       filter->min_size_height = g_value_get_int (value);
       break;
+    case PROP_MIN_STDDEV:
+      filter->min_stddev = g_value_get_int (value);
+      break;
     case PROP_FLAGS:
       filter->flags = g_value_get_flags (value);
       break;
@@ -448,6 +493,9 @@
     case PROP_MIN_SIZE_HEIGHT:
       g_value_set_int (value, filter->min_size_height);
       break;
+    case PROP_MIN_STDDEV:
+      g_value_set_int (value, filter->min_stddev);
+      break;
     case PROP_FLAGS:
       g_value_set_flags (value, filter->flags);
       break;
@@ -478,11 +526,6 @@
   filter->cvGray = cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U,
       1);
 
-  if (!filter->cvStorage)
-    filter->cvStorage = cvCreateMemStorage (0);
-  else
-    cvClearMemStorage (filter->cvStorage);
-
   return TRUE;
 }
 
@@ -507,18 +550,27 @@
   return gst_message_new_element (GST_OBJECT (filter), s);
 }
 
-static CvSeq *
+static void
 gst_face_detect_run_detector (GstFaceDetect * filter,
-    CvHaarClassifierCascade * detector, gint min_size_width,
-    gint min_size_height)
+    CascadeClassifier * detector, gint min_size_width,
+    gint min_size_height, Rect r, vector < Rect > &faces)
 {
-  return cvHaarDetectObjects (filter->cvGray, detector,
-      filter->cvStorage, filter->scale_factor, filter->min_neighbors,
-      filter->flags, cvSize (min_size_width, min_size_height)
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
-      , cvSize (0, 0)
-#endif
-      );
+  double img_stddev = 0;
+  if (filter->min_stddev > 0) {
+    CvScalar mean, stddev;
+    cvAvgSdv (filter->cvGray, &mean, &stddev, NULL);
+    img_stddev = stddev.val[0];
+  }
+  if (img_stddev >= filter->min_stddev) {
+    Mat roi (filter->cvGray, r);
+    detector->detectMultiScale (roi, faces, filter->scale_factor,
+        filter->min_neighbors, filter->flags, cvSize (min_size_width,
+            min_size_height), cvSize (0, 0));
+  } else {
+    GST_LOG_OBJECT (filter,
+        "Calculated stddev %f lesser than min_stddev %d, detection not performed",
+        img_stddev, filter->min_stddev);
+  }
 }
 
 /* 
@@ -535,12 +587,15 @@
     GstStructure *s;
     GValue facelist = { 0 };
     GValue facedata = { 0 };
-    CvSeq *faces;
-    CvSeq *mouth = NULL, *nose = NULL, *eyes = NULL;
-    gint i;
+    vector < Rect > faces;
+    vector < Rect > mouth;
+    vector < Rect > nose;
+    vector < Rect > eyes;
     gboolean do_display = FALSE;
     gboolean post_msg = FALSE;
 
+    Mat mtxOrg (img, false);
+
     if (filter->display) {
       if (gst_buffer_is_writable (buf)) {
         do_display = TRUE;
@@ -550,17 +605,18 @@
     }
 
     cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
-    cvClearMemStorage (filter->cvStorage);
 
-    faces = gst_face_detect_run_detector (filter, filter->cvFaceDetect,
-        filter->min_size_width, filter->min_size_height);
+    gst_face_detect_run_detector (filter, filter->cvFaceDetect,
+        filter->min_size_width, filter->min_size_height,
+        Rect (filter->cvGray->origin, filter->cvGray->origin,
+            filter->cvGray->width, filter->cvGray->height), faces);
 
     switch (filter->updates) {
       case GST_FACEDETECT_UPDATES_EVERY_FRAME:
         post_msg = TRUE;
         break;
       case GST_FACEDETECT_UPDATES_ON_CHANGE:
-        if (faces && faces->total > 0) {
+        if (!faces.empty ()) {
           if (!filter->face_detected)
             post_msg = TRUE;
         } else {
@@ -570,7 +626,7 @@
         }
         break;
       case GST_FACEDETECT_UPDATES_ON_FACE:
-        if (faces && faces->total > 0) {
+        if (!faces.empty ()) {
           post_msg = TRUE;
         } else {
           post_msg = FALSE;
@@ -584,107 +640,78 @@
         break;
     }
 
-    filter->face_detected = faces ? faces->total > 0 : FALSE;
+    filter->face_detected = !faces.empty ()? TRUE : FALSE;
 
     if (post_msg) {
       msg = gst_face_detect_message_new (filter, buf);
       g_value_init (&facelist, GST_TYPE_LIST);
     }
 
-    for (i = 0; i < (faces ? faces->total : 0); i++) {
-      CvRect *r = (CvRect *) cvGetSeqElem (faces, i);
+    for (unsigned int i = 0; i < faces.size (); ++i) {
+      Rect r = faces[i];
       guint mw = filter->min_size_width / 8;
       guint mh = filter->min_size_height / 8;
       guint rnx = 0, rny = 0, rnw, rnh;
       guint rmx = 0, rmy = 0, rmw, rmh;
       guint rex = 0, rey = 0, rew, reh;
+      guint rhh = r.height / 2;
       gboolean have_nose, have_mouth, have_eyes;
 
       /* detect face features */
 
       if (filter->cvNoseDetect) {
-        rnx = r->x + r->width / 4;
-        rny = r->y + r->height / 4;
-        rnw = r->width / 2;
-        rnh = r->height / 2;
-        cvSetImageROI (filter->cvGray, cvRect (rnx, rny, rnw, rnh));
-        nose =
-            gst_face_detect_run_detector (filter, filter->cvNoseDetect, mw, mh);
-        have_nose = (nose && nose->total);
-        cvResetImageROI (filter->cvGray);
+        rnx = r.x + r.width / 4;
+        rny = r.y + r.height / 4;
+        rnw = r.width / 2;
+        rnh = rhh;
+        gst_face_detect_run_detector (filter, filter->cvNoseDetect, mw, mh,
+            Rect (rnx, rny, rnw, rnh), nose);
+        have_nose = !nose.empty ();
       } else {
         have_nose = FALSE;
       }
 
       if (filter->cvMouthDetect) {
-        rmx = r->x;
-        rmy = r->y + r->height / 2;
-        rmw = r->width;
-        rmh = r->height / 2;
-        cvSetImageROI (filter->cvGray, cvRect (rmx, rmy, rmw, rmh));
-        mouth =
-            gst_face_detect_run_detector (filter, filter->cvMouthDetect, mw,
-            mh);
-        have_mouth = (mouth && mouth->total);
-        cvResetImageROI (filter->cvGray);
+        rmx = r.x;
+        rmy = r.y + r.height / 2;
+        rmw = r.width;
+        rmh = rhh;
+        gst_face_detect_run_detector (filter, filter->cvMouthDetect, mw,
+            mh, Rect (rmx, rmy, rmw, rmh), mouth);
+        have_mouth = !mouth.empty ();
       } else {
         have_mouth = FALSE;
       }
 
       if (filter->cvEyesDetect) {
-        rex = r->x;
-        rey = r->y;
-        rew = r->width;
-        reh = r->height / 2;
-        cvSetImageROI (filter->cvGray, cvRect (rex, rey, rew, reh));
-        eyes =
-            gst_face_detect_run_detector (filter, filter->cvEyesDetect, mw, mh);
-        have_eyes = (eyes && eyes->total);
-        cvResetImageROI (filter->cvGray);
+        rex = r.x;
+        rey = r.y;
+        rew = r.width;
+        reh = rhh;
+        gst_face_detect_run_detector (filter, filter->cvEyesDetect, mw, mh,
+            Rect (rex, rey, rew, reh), eyes);
+        have_eyes = !eyes.empty ();
       } else {
         have_eyes = FALSE;
       }
 
       GST_LOG_OBJECT (filter,
-          "%2d/%2d: x,y = %4u,%4u: w.h = %4u,%4u : features(e,n,m) = %d,%d,%d",
-          i, faces->total, r->x, r->y, r->width, r->height,
-          have_eyes, have_nose, have_mouth);
+          "%2d/%2" G_GSIZE_FORMAT
+          ": x,y = %4u,%4u: w.h = %4u,%4u : features(e,n,m) = %d,%d,%d", i,
+          faces.size (), r.x, r.y, r.width, r.height, have_eyes, have_nose,
+          have_mouth);
       if (post_msg) {
         s = gst_structure_new ("face",
-            "x", G_TYPE_UINT, r->x,
-            "y", G_TYPE_UINT, r->y,
-            "width", G_TYPE_UINT, r->width,
-            "height", G_TYPE_UINT, r->height, NULL);
-        if (have_nose) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (nose, 0);
-          GST_LOG_OBJECT (filter, "nose/%d: x,y = %4u,%4u: w.h = %4u,%4u",
-              nose->total, rnx + sr->x, rny + sr->y, sr->width, sr->height);
-          gst_structure_set (s,
-              "nose->x", G_TYPE_UINT, rnx + sr->x,
-              "nose->y", G_TYPE_UINT, rny + sr->y,
-              "nose->width", G_TYPE_UINT, sr->width,
-              "nose->height", G_TYPE_UINT, sr->height, NULL);
-        }
-        if (have_mouth) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (mouth, 0);
-          GST_LOG_OBJECT (filter, "mouth/%d: x,y = %4u,%4u: w.h = %4u,%4u",
-              mouth->total, rmx + sr->x, rmy + sr->y, sr->width, sr->height);
-          gst_structure_set (s,
-              "mouth->x", G_TYPE_UINT, rmx + sr->x,
-              "mouth->y", G_TYPE_UINT, rmy + sr->y,
-              "mouth->width", G_TYPE_UINT, sr->width,
-              "mouth->height", G_TYPE_UINT, sr->height, NULL);
-        }
-        if (have_eyes) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (eyes, 0);
-          GST_LOG_OBJECT (filter, "eyes/%d: x,y = %4u,%4u: w.h = %4u,%4u",
-              eyes->total, rex + sr->x, rey + sr->y, sr->width, sr->height);
-          gst_structure_set (s,
-              "eyes->x", G_TYPE_UINT, rex + sr->x,
-              "eyes->y", G_TYPE_UINT, rey + sr->y,
-              "eyes->width", G_TYPE_UINT, sr->width,
-              "eyes->height", G_TYPE_UINT, sr->height, NULL);
-        }
+            "x", G_TYPE_UINT, r.x,
+            "y", G_TYPE_UINT, r.y,
+            "width", G_TYPE_UINT, r.width,
+            "height", G_TYPE_UINT, r.height, NULL);
+        if (have_nose)
+          structure_and_message (nose, "nose", rnx, rny, filter, s);
+        if (have_mouth)
+          structure_and_message (mouth, "mouth", rmx, rmy, filter, s);
+        if (have_eyes)
+          structure_and_message (eyes, "eyes", rex, rey, filter, s);
 
         g_value_init (&facedata, GST_TYPE_STRUCTURE);
         g_value_take_boxed (&facedata, s);
@@ -695,60 +722,59 @@
 
       if (do_display) {
         CvPoint center;
-        CvSize axes;
+        Size axes;
         gdouble w, h;
         gint cb = 255 - ((i & 3) << 7);
         gint cg = 255 - ((i & 12) << 5);
         gint cr = 255 - ((i & 48) << 3);
 
-        w = r->width / 2;
-        h = r->height / 2;
-        center.x = cvRound ((r->x + w));
-        center.y = cvRound ((r->y + h));
+        w = r.width / 2;
+        h = r.height / 2;
+        center.x = cvRound ((r.x + w));
+        center.y = cvRound ((r.y + h));
         axes.width = w;
         axes.height = h * 1.25; /* tweak for face form */
-        cvEllipse (img, center, axes, 0.0, 0.0, 360.0, CV_RGB (cr, cg, cb),
-            3, 8, 0);
+        ellipse (mtxOrg, center, axes, 0, 0, 360, Scalar (cr, cg, cb), 3, 8, 0);
 
         if (have_nose) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (nose, 0);
+          Rect sr = nose[0];
 
-          w = sr->width / 2;
-          h = sr->height / 2;
-          center.x = cvRound ((rnx + sr->x + w));
-          center.y = cvRound ((rny + sr->y + h));
+          w = sr.width / 2;
+          h = sr.height / 2;
+          center.x = cvRound ((rnx + sr.x + w));
+          center.y = cvRound ((rny + sr.y + h));
           axes.width = w;
           axes.height = h * 1.25;       /* tweak for nose form */
-          cvEllipse (img, center, axes, 0.0, 0.0, 360.0, CV_RGB (cr, cg, cb),
-              1, 8, 0);
+          ellipse (mtxOrg, center, axes, 0, 0, 360, Scalar (cr, cg, cb), 1, 8,
+              0);
         }
         if (have_mouth) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (mouth, 0);
+          Rect sr = mouth[0];
 
-          w = sr->width / 2;
-          h = sr->height / 2;
-          center.x = cvRound ((rmx + sr->x + w));
-          center.y = cvRound ((rmy + sr->y + h));
+          w = sr.width / 2;
+          h = sr.height / 2;
+          center.x = cvRound ((rmx + sr.x + w));
+          center.y = cvRound ((rmy + sr.y + h));
           axes.width = w * 1.5; /* tweak for mouth form */
           axes.height = h;
-          cvEllipse (img, center, axes, 0.0, 0.0, 360.0, CV_RGB (cr, cg, cb),
-              1, 8, 0);
+          ellipse (mtxOrg, center, axes, 0, 0, 360, Scalar (cr, cg, cb), 1, 8,
+              0);
         }
         if (have_eyes) {
-          CvRect *sr = (CvRect *) cvGetSeqElem (eyes, 0);
+          Rect sr = eyes[0];
 
-          w = sr->width / 2;
-          h = sr->height / 2;
-          center.x = cvRound ((rex + sr->x + w));
-          center.y = cvRound ((rey + sr->y + h));
+          w = sr.width / 2;
+          h = sr.height / 2;
+          center.x = cvRound ((rex + sr.x + w));
+          center.y = cvRound ((rey + sr.y + h));
           axes.width = w * 1.5; /* tweak for eyes form */
           axes.height = h;
-          cvEllipse (img, center, axes, 0.0, 0.0, 360.0, CV_RGB (cr, cg, cb),
-              1, 8, 0);
+          ellipse (mtxOrg, center, axes, 0, 0, 360, Scalar (cr, cg, cb), 1, 8,
+              0);
         }
       }
       gst_buffer_add_video_region_of_interest_meta (buf, "face",
-          (guint) r->x, (guint) r->y, (guint) r->width, (guint) r->height);
+          (guint) r.x, (guint) r.y, (guint) r.width, (guint) r.height);
     }
 
     if (post_msg) {
@@ -757,21 +783,25 @@
       g_value_unset (&facelist);
       gst_element_post_message (GST_ELEMENT (filter), msg);
     }
+    mtxOrg.release ();
   }
 
   return GST_FLOW_OK;
 }
 
 
-static CvHaarClassifierCascade *
+static CascadeClassifier *
 gst_face_detect_load_profile (GstFaceDetect * filter, gchar * profile)
 {
-  CvHaarClassifierCascade *cascade;
+  CascadeClassifier *cascade;
 
-  if (!(cascade = (CvHaarClassifierCascade *) cvLoad (profile, 0, 0, 0))) {
-    GST_WARNING_OBJECT (filter, "Couldn't load Haar classifier cascade: %s.",
-        profile);
+  cascade = new CascadeClassifier (profile);
+  if (cascade->empty ()) {
+    GST_ERROR_OBJECT (filter, "Invalid profile file: %s", profile);
+    delete cascade;
+    return NULL;
   }
+
   return cascade;
 }
 
diff --git a/ext/opencv/gstfacedetect.h b/ext/opencv/gstfacedetect.h
index ac51c52..3c5acf3 100644
--- a/ext/opencv/gstfacedetect.h
+++ b/ext/opencv/gstfacedetect.h
@@ -4,6 +4,7 @@
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
  * Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
+ * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -48,12 +49,10 @@
 #define __GST_FACE_DETECT_H__
 
 #include <gst/gst.h>
+#include <opencv2/core/version.hpp>
 #include <cv.h>
 #include "gstopencvvideofilter.h"
-
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
 #include <opencv2/objdetect/objdetect.hpp>
-#endif
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
@@ -102,14 +101,14 @@
   gint flags;
   gint min_size_width;
   gint min_size_height;
+  gint min_stddev;
   gint updates;
 
   IplImage *cvGray;
-  CvHaarClassifierCascade *cvFaceDetect;
-  CvHaarClassifierCascade *cvNoseDetect;
-  CvHaarClassifierCascade *cvMouthDetect;
-  CvHaarClassifierCascade *cvEyesDetect;
-  CvMemStorage *cvStorage;
+  cv::CascadeClassifier *cvFaceDetect;
+  cv::CascadeClassifier *cvNoseDetect;
+  cv::CascadeClassifier *cvMouthDetect;
+  cv::CascadeClassifier *cvEyesDetect;
 };
 
 struct _GstFaceDetectClass
diff --git a/ext/opencv/gstgrabcut.cpp b/ext/opencv/gstgrabcut.cpp
index 8b57306..c9ff4f9 100644
--- a/ext/opencv/gstgrabcut.cpp
+++ b/ext/opencv/gstgrabcut.cpp
@@ -89,7 +89,9 @@
 extern "C"
 {
 #include <gst/video/gstvideometa.h>
+#include <opencv2/imgproc/imgproc_c.h>
 }
+#include <opencv2/imgproc/imgproc.hpp>
 GST_DEBUG_CATEGORY_STATIC (gst_grabcut_debug);
 #define GST_CAT_DEFAULT gst_grabcut_debug
 
diff --git a/ext/opencv/gstgrabcut.h b/ext/opencv/gstgrabcut.h
index ec7dc96..de988bb 100644
--- a/ext/opencv/gstgrabcut.h
+++ b/ext/opencv/gstgrabcut.h
@@ -47,8 +47,9 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/video/gstvideofilter.h>
+#include <opencv2/core/core_c.h>
 
-#include <cv.h>
+
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
diff --git a/ext/opencv/gsthanddetect.c b/ext/opencv/gsthanddetect.c
index 1ec29aa..c4dd390 100644
--- a/ext/opencv/gsthanddetect.c
+++ b/ext/opencv/gsthanddetect.c
@@ -63,6 +63,7 @@
 /* element header */
 #include "gsthanddetect.h"
 #include "gstopencvutils.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug);
 #define GST_CAT_DEFAULT gst_handdetect_debug
@@ -112,7 +113,8 @@
 static GstFlowReturn gst_handdetect_transform_ip (GstOpencvVideoFilter *
     transform, GstBuffer * buffer, IplImage * img);
 
-static void gst_handdetect_load_profile (GstHanddetect * filter);
+static CvHaarClassifierCascade *gst_handdetect_load_profile (GstHanddetect *
+    filter, gchar * profile);
 
 static void gst_handdetect_navigation_interface_init (GstNavigationInterface *
     iface);
@@ -160,8 +162,6 @@
     cvReleaseImage (&filter->cvGray);
   if (filter->cvStorage)
     cvReleaseMemStorage (&filter->cvStorage);
-  if (filter->cvStorage_palm)
-    cvReleaseMemStorage (&filter->cvStorage_palm);
   g_free (filter->profile_fist);
   g_free (filter->profile_palm);
 
@@ -269,7 +269,10 @@
   filter->roi_height = 0;
   filter->display = TRUE;
 
-  gst_handdetect_load_profile (filter);
+  filter->cvCascade_fist =
+      gst_handdetect_load_profile (filter, filter->profile_fist);
+  filter->cvCascade_palm =
+      gst_handdetect_load_profile (filter, filter->profile_palm);
 
   gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
       TRUE);
@@ -284,13 +287,19 @@
   switch (prop_id) {
     case PROP_PROFILE_FIST:
       g_free (filter->profile_fist);
+      if (filter->cvCascade_fist)
+        cvReleaseHaarClassifierCascade (&filter->cvCascade_fist);
       filter->profile_fist = g_value_dup_string (value);
-      gst_handdetect_load_profile (filter);
+      filter->cvCascade_fist =
+          gst_handdetect_load_profile (filter, filter->profile_fist);
       break;
     case PROP_PROFILE_PALM:
       g_free (filter->profile_palm);
+      if (filter->cvCascade_palm)
+        cvReleaseHaarClassifierCascade (&filter->cvCascade_palm);
       filter->profile_palm = g_value_dup_string (value);
-      gst_handdetect_load_profile (filter);
+      filter->cvCascade_palm =
+          gst_handdetect_load_profile (filter, filter->profile_palm);
       break;
     case PROP_DISPLAY:
       filter->display = g_value_get_boolean (value);
@@ -371,10 +380,6 @@
     filter->cvStorage = cvCreateMemStorage (0);
   else
     cvClearMemStorage (filter->cvStorage);
-  if (!filter->cvStorage_palm)
-    filter->cvStorage_palm = cvCreateMemStorage (0);
-  else
-    cvClearMemStorage (filter->cvStorage_palm);
   return TRUE;
 }
 
@@ -403,11 +408,8 @@
   /* detect FIST gesture fist */
   hands =
       cvHaarDetectObjects (filter->cvGray, filter->cvCascade_fist,
-      filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24)
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
-      , cvSize (0, 0)
-#endif
-      );
+      filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24),
+      cvSize (0, 0));
 
   /* if FIST gesture detected */
   if (hands && hands->total > 0) {
@@ -429,7 +431,7 @@
     if (filter->prev_r == NULL)
       filter->prev_r = &temp_r;
     /* Get the best FIST gesture */
-    for (i = 0; i < (hands ? hands->total : 0); i++) {
+    for (i = 0; i < hands->total; i++) {
       r = (CvRect *) cvGetSeqElem (hands, i);
       distance = (int) sqrt (pow ((r->x - filter->prev_r->x),
               2) + pow ((r->y - filter->prev_r->y), 2));
@@ -495,11 +497,8 @@
     /* if NO FIST gesture, detecting PALM gesture */
     hands =
         cvHaarDetectObjects (filter->cvGray, filter->cvCascade_palm,
-        filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24)
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
-        , cvSize (0, 0)
-#endif
-        );
+        filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24),
+        cvSize (0, 0));
     /* if PALM detected */
     if (hands && hands->total > 0) {
       int min_distance, distance;
@@ -522,7 +521,7 @@
       if (filter->prev_r == NULL)
         filter->prev_r = &temp_r;
       /* Get the best PALM gesture */
-      for (i = 0; i < (hands ? hands->total : 0); i++) {
+      for (i = 0; i < hands->total; i++) {
         r = (CvRect *) cvGetSeqElem (hands, i);
         distance = (int) sqrt (pow ((r->x - filter->prev_r->x),
                 2) + pow ((r->y - filter->prev_r->y), 2));
@@ -607,26 +606,18 @@
   return GST_FLOW_OK;
 }
 
-static void
-gst_handdetect_load_profile (GstHanddetect * filter)
+static CvHaarClassifierCascade *
+gst_handdetect_load_profile (GstHanddetect * filter, gchar * profile)
 {
-  GST_DEBUG_OBJECT (filter, "Loading profiles...\n");
-  filter->cvCascade_fist =
-      (CvHaarClassifierCascade *) cvLoad (filter->profile_fist, 0, 0, 0);
-  filter->cvCascade_palm =
-      (CvHaarClassifierCascade *) cvLoad (filter->profile_palm, 0, 0, 0);
-  if (!filter->cvCascade_fist || !filter->cvCascade_palm)
-    GST_WARNING_OBJECT (filter,
-        "WARNING: Could not load HAAR classifier cascade: %s.\n",
-        filter->profile_fist);
-  else
-    GST_DEBUG_OBJECT (filter, "Loaded profile %s\n", filter->profile_fist);
-  if (!filter->cvCascade_palm)
-    GST_WARNING_OBJECT (filter,
-        "WARNING: Could not load HAAR classifier cascade: %s.\n",
-        filter->profile_palm);
-  else
-    GST_DEBUG_OBJECT (filter, "Loaded profile %s\n", filter->profile_palm);
+  CvHaarClassifierCascade *cascade;
+
+  if (profile == NULL)
+    return NULL;
+  if (!(cascade = (CvHaarClassifierCascade *) cvLoad (profile, 0, 0, 0))) {
+    GST_WARNING_OBJECT (filter, "Couldn't load Haar classifier cascade: %s.",
+        profile);
+  }
+  return cascade;
 }
 
 /* Entry point to initialize the plug-in
diff --git a/ext/opencv/gsthanddetect.h b/ext/opencv/gsthanddetect.h
index 129784f..01a30bd 100644
--- a/ext/opencv/gsthanddetect.h
+++ b/ext/opencv/gsthanddetect.h
@@ -51,12 +51,14 @@
 
 #include "gstopencvvideofilter.h"
 /* opencv */
-#include <cv.h>
-#include <cxcore.h>
-#include <highgui.h>
-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
-#include <opencv2/objdetect/objdetect.hpp>
+#include <opencv2/core/version.hpp>
+#ifdef HAVE_HIGHGUI_H
+#include <highgui.h>            // includes highGUI definitions
 #endif
+#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
+#include <opencv2/highgui/highgui_c.h>            // includes highGUI definitions
+#endif
+#include <opencv2/objdetect/objdetect.hpp>
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
@@ -93,7 +95,6 @@
   CvHaarClassifierCascade *cvCascade_fist;
   CvHaarClassifierCascade *cvCascade_palm;
   CvMemStorage *cvStorage;
-  CvMemStorage *cvStorage_palm;
   CvRect *prev_r;
   CvRect *best_r;
 };
diff --git a/ext/opencv/gstmotioncells.c b/ext/opencv/gstmotioncells.c
index 0a3c0c2..2de99ab 100644
--- a/ext/opencv/gstmotioncells.c
+++ b/ext/opencv/gstmotioncells.c
@@ -374,7 +374,7 @@
   filter->prev_buff_timestamp = 0;
   filter->cur_buff_timestamp = 0;
   filter->diff_timestamp = -1;
-  gettimeofday (&filter->tv, NULL);
+  g_get_current_time (&filter->tv);
   filter->starttime = 1000 * filter->tv.tv_sec;
   filter->previous_motion = FALSE;
   filter->changed_datafile = FALSE;
diff --git a/ext/opencv/gstmotioncells.h b/ext/opencv/gstmotioncells.h
index 6d4b123..0a7daa0 100644
--- a/ext/opencv/gstmotioncells.h
+++ b/ext/opencv/gstmotioncells.h
@@ -46,7 +46,7 @@
 #define __GST_MOTIONCELLS_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+#include <opencv2/core/core_c.h>
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
@@ -106,7 +106,7 @@
   guint64 consecutive_motion;
   gint width, height;
   //time stuff
-  struct timeval tv;
+  GTimeVal tv;
   double framerate;
 };
 
diff --git a/ext/opencv/gstopencv.c b/ext/opencv/gstopencv.cpp
similarity index 98%
rename from ext/opencv/gstopencv.c
rename to ext/opencv/gstopencv.cpp
index 3184518..4077ba6 100644
--- a/ext/opencv/gstopencv.c
+++ b/ext/opencv/gstopencv.cpp
@@ -1,7 +1,7 @@
 /* GStreamer
  * Copyright (C) <2009> Kapil Agrawal <kapil@mediamagictechnologies.com>
  *
- * gstopencv.c: plugin registering
+ * gstopencv.cpp: plugin registering
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
diff --git a/ext/opencv/gstopencvutils.c b/ext/opencv/gstopencvutils.c
index 6655b07..89901bf 100644
--- a/ext/opencv/gstopencvutils.c
+++ b/ext/opencv/gstopencvutils.c
@@ -24,6 +24,7 @@
 #endif
 
 #include "gstopencvutils.h"
+#include <opencv2/core/types_c.h>
 
 static gboolean
 gst_opencv_get_ipl_depth_and_channels (GstStructure * structure,
diff --git a/ext/opencv/gstopencvutils.h b/ext/opencv/gstopencvutils.h
index 82a2795..84123f1 100644
--- a/ext/opencv/gstopencvutils.h
+++ b/ext/opencv/gstopencvutils.h
@@ -29,7 +29,7 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 
-#include <cv.h>
+
 
 gboolean
 gst_opencv_get_ipldepth (gint depth, gint bpp, gint * ipldepth);
diff --git a/ext/opencv/gstopencvvideofilter.h b/ext/opencv/gstopencvvideofilter.h
index fce3b32..7fbafe9 100644
--- a/ext/opencv/gstopencvvideofilter.h
+++ b/ext/opencv/gstopencvvideofilter.h
@@ -46,7 +46,7 @@
 
 #include <gst/gst.h>
 #include <gst/video/gstvideofilter.h>
-#include <cv.h>
+#include <opencv2/core/core_c.h>
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
diff --git a/ext/opencv/gstpyramidsegment.c b/ext/opencv/gstpyramidsegment.c
index 6c5292b..618ffdf 100644
--- a/ext/opencv/gstpyramidsegment.c
+++ b/ext/opencv/gstpyramidsegment.c
@@ -158,7 +158,7 @@
 
   g_object_class_install_property (gobject_class, PROP_LEVEL,
       g_param_spec_int ("level", "Level",
-          "Maximum level of the pyramid segmentation", 0, 4, 4,
+          "Maximum level of the pyramid segmentation", 1, 4, 4,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gst_element_class_set_static_metadata (element_class,
diff --git a/ext/opencv/gstpyramidsegment.h b/ext/opencv/gstpyramidsegment.h
index 7d7bcf5..586ef2c 100644
--- a/ext/opencv/gstpyramidsegment.h
+++ b/ext/opencv/gstpyramidsegment.h
@@ -47,7 +47,7 @@
 #define __GST_PYRAMID_SEGMENT_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+#include <opencv2/core/version.hpp>
 
 #if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204
 #include <opencv2/legacy/legacy.hpp>
diff --git a/ext/opencv/gstretinex.c b/ext/opencv/gstretinex.c
index 8c64b80..9a7c8dc 100644
--- a/ext/opencv/gstretinex.c
+++ b/ext/opencv/gstretinex.c
@@ -64,6 +64,7 @@
 
 #include <gst/gst.h>
 #include "gstretinex.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_retinex_debug);
 #define GST_CAT_DEFAULT gst_retinex_debug
@@ -331,6 +332,8 @@
      where O is the output, H is a gaussian 2d filter and I is the input image
      sum_i means summatory on var i with i in [0..scales) and wi are the weights */
   else if (METHOD_MULTISCALE == retinex->method) {
+    int i;
+
     /* allocate or reallocate the weights and sigmas according to scales */
     if (retinex->current_scales != retinex->scales || !retinex->sigmas) {
       retinex->weights =
@@ -339,7 +342,7 @@
       retinex->sigmas =
           (double *) g_realloc (retinex->sigmas,
           sizeof (double) * retinex->scales);
-      for (int i = 0; i < retinex->scales; i++) {
+      for (i = 0; i < retinex->scales; i++) {
         retinex->weights[i] = 1.0 / (double) retinex->scales;
         retinex->sigmas[i] = 10.0 + 4.0 * (double) retinex->scales;
       }
@@ -351,7 +354,7 @@
     cvLog (retinex->cvA, retinex->cvB);
 
     /*  Filter at each scale */
-    for (int i = 0; i < retinex->scales; i++) {
+    for (i = 0; i < retinex->scales; i++) {
       filter_size = (int) floor (retinex->sigmas[i] * 6) / 2;
       filter_size = filter_size * 2 + 1;
 
diff --git a/ext/opencv/gstretinex.h b/ext/opencv/gstretinex.h
index 24a7c5e..c53d230 100644
--- a/ext/opencv/gstretinex.h
+++ b/ext/opencv/gstretinex.h
@@ -47,8 +47,8 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/video/gstvideofilter.h>
+#include <opencv2/core/core_c.h>
 
-#include <cv.h>
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
diff --git a/ext/opencv/gstsegmentation.cpp b/ext/opencv/gstsegmentation.cpp
index ec03b80..79cbb49 100644
--- a/ext/opencv/gstsegmentation.cpp
+++ b/ext/opencv/gstsegmentation.cpp
@@ -94,6 +94,7 @@
 
 #include "gstsegmentation.h"
 #include <opencv2/video/background_segm.hpp>
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_segmentation_debug);
 #define GST_CAT_DEFAULT gst_segmentation_debug
diff --git a/ext/opencv/gstsegmentation.h b/ext/opencv/gstsegmentation.h
index 0357770..9400853 100644
--- a/ext/opencv/gstsegmentation.h
+++ b/ext/opencv/gstsegmentation.h
@@ -46,8 +46,9 @@
 
 #include <gst/gst.h>
 #include <gst/video/gstvideofilter.h>
+#include <opencv2/core/core_c.h>
 
-#include <cv.h>
+
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */
diff --git a/ext/opencv/gstskindetect.c b/ext/opencv/gstskindetect.c
index 9cd5633..caf38ec 100644
--- a/ext/opencv/gstskindetect.c
+++ b/ext/opencv/gstskindetect.c
@@ -62,6 +62,8 @@
 
 #include "gstopencvutils.h"
 #include "gstskindetect.h"
+#include <opencv2/imgproc/imgproc_c.h>
+#include <opencv2/legacy/compat.hpp>
 
 GST_DEBUG_CATEGORY_STATIC (gst_skin_detect_debug);
 #define GST_CAT_DEFAULT gst_skin_detect_debug
diff --git a/ext/opencv/gstskindetect.h b/ext/opencv/gstskindetect.h
index 9789834..910d22e 100644
--- a/ext/opencv/gstskindetect.h
+++ b/ext/opencv/gstskindetect.h
@@ -47,7 +47,7 @@
 #define __GST_SKIN_DETECT_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
diff --git a/ext/opencv/gsttemplatematch.c b/ext/opencv/gsttemplatematch.c
index 507b218..21d8cd4 100644
--- a/ext/opencv/gsttemplatematch.c
+++ b/ext/opencv/gsttemplatematch.c
@@ -63,8 +63,10 @@
 
 #include <gst/gst.h>
 
+#include "../../gst-libs/gst/gst-i18n-plugin.h"
 #include "gstopencvutils.h"
 #include "gsttemplatematch.h"
+#include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug);
 #define GST_CAT_DEFAULT gst_template_match_debug
@@ -113,7 +115,8 @@
 static GstFlowReturn gst_template_match_chain (GstPad * pad, GstObject * parent,
     GstBuffer * buf);
 
-static void gst_template_match_load_template (GstTemplateMatch * filter);
+static void gst_template_match_load_template (GstTemplateMatch * filter,
+    gchar * template);
 static void gst_template_match_match (IplImage * input, IplImage * template,
     IplImage * dist_image, double *best_res, CvPoint * best_pos, int method);
 
@@ -176,13 +179,12 @@
 
   gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
   gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
-  filter->template = NULL;
+  filter->templ = NULL;
   filter->display = TRUE;
   filter->cvTemplateImage = NULL;
   filter->cvDistImage = NULL;
   filter->cvImage = NULL;
   filter->method = DEFAULT_METHOD;
-  gst_template_match_load_template (filter);
 }
 
 static void
@@ -193,6 +195,7 @@
 
   switch (prop_id) {
     case PROP_METHOD:
+      GST_OBJECT_LOCK (filter);
       switch (g_value_get_int (value)) {
         case 0:
           filter->method = CV_TM_SQDIFF;
@@ -213,13 +216,15 @@
           filter->method = CV_TM_CCOEFF_NORMED;
           break;
       }
+      GST_OBJECT_UNLOCK (filter);
       break;
     case PROP_TEMPLATE:
-      filter->template = (char *) g_value_get_string (value);
-      gst_template_match_load_template (filter);
+      gst_template_match_load_template (filter, g_value_dup_string (value));
       break;
     case PROP_DISPLAY:
+      GST_OBJECT_LOCK (filter);
       filter->display = g_value_get_boolean (value);
+      GST_OBJECT_UNLOCK (filter);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -238,7 +243,7 @@
       g_value_set_int (value, filter->method);
       break;
     case PROP_TEMPLATE:
-      g_value_set_string (value, filter->template);
+      g_value_set_string (value, filter->templ);
       break;
     case PROP_DISPLAY:
       g_value_set_boolean (value, filter->display);
@@ -293,6 +298,7 @@
   GstTemplateMatch *filter;
   filter = GST_TEMPLATE_MATCH (object);
 
+  g_free (filter->templ);
   if (filter->cvImage) {
     cvReleaseImageHeader (&filter->cvImage);
   }
@@ -316,12 +322,11 @@
   CvPoint best_pos;
   double best_res;
   GstMapInfo info;
+  GstMessage *m = NULL;
 
   filter = GST_TEMPLATE_MATCH (parent);
 
-  /* FIXME Why template == NULL returns OK?
-   * shouldn't it be a passthrough instead? */
-  if ((!filter) || (!buf) || filter->template == NULL) {
+  if ((!filter) || (!buf)) {
     return GST_FLOW_OK;
   }
   GST_LOG_OBJECT (filter, "Buffer size %u", (guint) gst_buffer_get_size (buf));
@@ -330,7 +335,8 @@
   gst_buffer_map (buf, &info, GST_MAP_READWRITE);
   filter->cvImage->imageData = (char *) info.data;
 
-  if (!filter->cvDistImage) {
+  GST_OBJECT_LOCK (filter);
+  if (filter->cvTemplateImage && !filter->cvDistImage) {
     if (filter->cvTemplateImage->width > filter->cvImage->width) {
       GST_WARNING ("Template Image is wider than input image");
     } else if (filter->cvTemplateImage->height > filter->cvImage->height) {
@@ -351,9 +357,8 @@
       }
     }
   }
-  if (filter->cvTemplateImage && filter->cvImage && filter->cvDistImage) {
+  if (filter->cvTemplateImage && filter->cvDistImage) {
     GstStructure *s;
-    GstMessage *m;
 
     gst_template_match_match (filter->cvImage, filter->cvTemplateImage,
         filter->cvDistImage, &best_res, &best_pos, filter->method);
@@ -366,33 +371,46 @@
         "result", G_TYPE_DOUBLE, best_res, NULL);
 
     m = gst_message_new_element (GST_OBJECT (filter), s);
-    gst_element_post_message (GST_ELEMENT (filter), m);
 
     if (filter->display) {
       CvPoint corner = best_pos;
+      CvScalar color;
+      if (filter->method == CV_TM_SQDIFF_NORMED
+          || filter->method == CV_TM_CCORR_NORMED
+          || filter->method == CV_TM_CCOEFF_NORMED) {
+        /* Yellow growing redder as match certainty approaches 1.0.  This can
+           only be applied with method == *_NORMED as the other match methods
+           aren't normalized to be in range 0.0 - 1.0 */
+        color = CV_RGB (255, 255 - pow (255, best_res), 32);
+      } else {
+        color = CV_RGB (255, 32, 32);
+      }
 
       buf = gst_buffer_make_writable (buf);
 
       corner.x += filter->cvTemplateImage->width;
       corner.y += filter->cvTemplateImage->height;
-      cvRectangle (filter->cvImage, best_pos, corner, CV_RGB (255, 32, 32), 3,
-          8, 0);
+      cvRectangle (filter->cvImage, best_pos, corner, color, 3, 8, 0);
     }
 
   }
+  GST_OBJECT_UNLOCK (filter);
 
+  if (m) {
+    gst_element_post_message (GST_ELEMENT (filter), m);
+  }
   return gst_pad_push (filter->srcpad, buf);
 }
 
 
 
 static void
-gst_template_match_match (IplImage * input, IplImage * template,
+gst_template_match_match (IplImage * input, IplImage * templ,
     IplImage * dist_image, double *best_res, CvPoint * best_pos, int method)
 {
   double dist_min = 0, dist_max = 0;
   CvPoint min_pos, max_pos;
-  cvMatchTemplate (input, template, dist_image, method);
+  cvMatchTemplate (input, templ, dist_image, method);
   cvMinMaxLoc (dist_image, &dist_min, &dist_max, &min_pos, &max_pos, NULL);
   if ((CV_TM_SQDIFF_NORMED == method) || (CV_TM_SQDIFF == method)) {
     *best_res = dist_min;
@@ -407,22 +425,40 @@
 }
 
 
+/* We take ownership of template here */
 static void
-gst_template_match_load_template (GstTemplateMatch * filter)
+gst_template_match_load_template (GstTemplateMatch * filter, gchar * templ)
 {
-  if (filter->template) {
+  gchar *oldTemplateFilename = NULL;
+  IplImage *oldTemplateImage = NULL, *newTemplateImage = NULL, *oldDistImage =
+      NULL;
 
-    if (filter->cvTemplateImage) {
-      cvReleaseImage (&filter->cvTemplateImage);
-    }
-    filter->cvTemplateImage =
-        cvLoadImage (filter->template, CV_LOAD_IMAGE_COLOR);
-
-    if (!filter->cvTemplateImage) {
-      GST_WARNING ("Couldn't load template image: %s. error: %s",
-          filter->template, g_strerror (errno));
+  if (templ) {
+    newTemplateImage = cvLoadImage (templ, CV_LOAD_IMAGE_COLOR);
+    if (!newTemplateImage) {
+      /* Unfortunately OpenCV doesn't seem to provide any way of finding out
+         why the image load failed, so we can't be more specific than FAILED: */
+      GST_ELEMENT_WARNING (filter, RESOURCE, FAILED,
+          (_("OpenCV failed to load template image")),
+          ("While attempting to load template '%s'", templ));
+      g_free (templ);
+      templ = NULL;
     }
   }
+
+  GST_OBJECT_LOCK (filter);
+  oldTemplateFilename = filter->templ;
+  filter->templ = templ;
+  oldTemplateImage = filter->cvTemplateImage;
+  filter->cvTemplateImage = newTemplateImage;
+  oldDistImage = filter->cvDistImage;
+  /* This will be recreated in the chain function as required: */
+  filter->cvDistImage = NULL;
+  GST_OBJECT_UNLOCK (filter);
+
+  cvReleaseImage (&oldDistImage);
+  cvReleaseImage (&oldTemplateImage);
+  g_free (oldTemplateFilename);
 }
 
 
diff --git a/ext/opencv/gsttemplatematch.h b/ext/opencv/gsttemplatematch.h
index 6b67000..b6c0426 100644
--- a/ext/opencv/gsttemplatematch.h
+++ b/ext/opencv/gsttemplatematch.h
@@ -47,7 +47,7 @@
 #define __GST_TEMPLATE_MATCH_H__
 
 #include <gst/gst.h>
-#include <cv.h>
+
 #ifdef HAVE_HIGHGUI_H
 #include <highgui.h>            // includes highGUI definitions
 #endif
@@ -79,7 +79,7 @@
   gint method;
   gboolean display;
 
-  gchar *template;
+  gchar *templ;
 
   IplImage *cvImage, *cvGray, *cvTemplateImage, *cvDistImage;
 };
diff --git a/ext/opencv/gsttextoverlay.c b/ext/opencv/gsttextoverlay.c
index 1a9459d..9f7e4b7 100644
--- a/ext/opencv/gsttextoverlay.c
+++ b/ext/opencv/gsttextoverlay.c
@@ -137,10 +137,6 @@
     cvReleaseImage (&filter->cvImage);
   }
 
-  if (filter->cvStorage) {
-    cvReleaseMemStorage (&filter->cvStorage);
-  }
-
   g_free (filter->textbuf);
 
   G_OBJECT_CLASS (gst_opencv_text_overlay_parent_class)->finalize (obj);
@@ -360,9 +356,6 @@
       }
       filter->cvImage = cvCreateImage (cvSize (width, height), IPL_DEPTH_8U, 3);
 
-      if (!filter->cvStorage) {
-        filter->cvStorage = cvCreateMemStorage (0);
-      }
       break;
     }
     default:
diff --git a/ext/opencv/gsttextoverlay.h b/ext/opencv/gsttextoverlay.h
index cf59b35..e92ab07 100644
--- a/ext/opencv/gsttextoverlay.h
+++ b/ext/opencv/gsttextoverlay.h
@@ -48,6 +48,7 @@
 
 #include <gst/gst.h>
 #include "gstopencvutils.h"
+#include <opencv2/core/core_c.h>
 G_BEGIN_DECLS
 
 /* #defines don't like whitespacey bits */
@@ -72,7 +73,6 @@
   GstPad *sinkpad, *srcpad;
 
   IplImage *cvImage;
-  CvMemStorage *cvStorage;
   CvFont font;  
 
   gint xpos;
diff --git a/ext/opencv/motioncells_wrapper.cpp b/ext/opencv/motioncells_wrapper.cpp
index dc52443..e9794cf 100644
--- a/ext/opencv/motioncells_wrapper.cpp
+++ b/ext/opencv/motioncells_wrapper.cpp
@@ -89,12 +89,15 @@
 {
   int idx = 0;
   idx = searchIdx (p_id);
-  return motioncellsvector.at (idx).mc->performDetectionMotionCells (p_image,
-      p_sensitivity, p_framerate, p_gridx, p_gridy, p_timestamp_millisec,
-      p_isVisible, p_useAlpha, motionmaskcoord_count, motionmaskcoords,
-      motionmaskcells_count, motionmaskcellsidx, motioncellscolor,
-      motioncells_count, motioncellsidx, starttime, p_datafile,
-      p_changed_datafile, p_thickness);
+  if (idx > -1)
+    return motioncellsvector.at (idx).mc->performDetectionMotionCells (p_image,
+        p_sensitivity, p_framerate, p_gridx, p_gridy, p_timestamp_millisec,
+        p_isVisible, p_useAlpha, motionmaskcoord_count, motionmaskcoords,
+        motionmaskcells_count, motionmaskcellsidx, motioncellscolor,
+        motioncells_count, motioncellsidx, starttime, p_datafile,
+        p_changed_datafile, p_thickness);
+  else
+    return -1;
 }
 
 
@@ -103,7 +106,8 @@
 {
   int idx = 0;
   idx = searchIdx (p_id);
-  motioncellsvector.at (idx).mc->setPrevFrame (p_prevFrame);
+  if (idx > -1)
+    motioncellsvector.at (idx).mc->setPrevFrame (p_prevFrame);
 }
 
 char *
@@ -113,10 +117,8 @@
   idx = searchIdx (p_id);
   if (idx > -1)
     return motioncellsvector.at (idx).mc->getMotionCellsIdx ();
-  else {
+  else
     return p_str;
-  }
-
 }
 
 int
@@ -161,9 +163,8 @@
   idx = searchIdx (p_id);
   if (idx > -1)
     return motioncellsvector.at (idx).mc->getDatafileInitFailed ();
-  else {
+  else
     return p_str;
-  }
 }
 
 char *
@@ -173,9 +174,8 @@
   idx = searchIdx (p_id);
   if (idx > -1)
     return motioncellsvector.at (idx).mc->getDatafileSaveFailed ();
-  else {
+  else
     return p_str;
-  }
 }
 
 int
diff --git a/ext/openexr/Makefile.in b/ext/openexr/Makefile.in
index 8c78ecc..e2f4878 100644
--- a/ext/openexr/Makefile.in
+++ b/ext/openexr/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/openexr
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -247,6 +257,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -264,8 +275,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -290,8 +303,6 @@
 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@
@@ -304,7 +315,6 @@
 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@
@@ -312,6 +322,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -338,11 +350,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -361,8 +376,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -421,10 +434,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -441,7 +458,6 @@
 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@
@@ -450,7 +466,6 @@
 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@
@@ -463,7 +478,6 @@
 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@
@@ -477,6 +491,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -488,6 +503,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -526,6 +543,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -561,10 +579,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -590,6 +612,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -597,7 +622,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -626,6 +658,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -636,6 +669,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -666,17 +700,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -693,6 +726,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -731,6 +765,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -780,7 +815,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/openexr/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/openexr/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1121,6 +1155,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/openexr/gstopenexrdec.cpp b/ext/openexr/gstopenexrdec.cpp
index d2d1dff..a334b0a 100644
--- a/ext/openexr/gstopenexrdec.cpp
+++ b/ext/openexr/gstopenexrdec.cpp
@@ -151,6 +151,9 @@
   GstVideoDecoder *decoder = (GstVideoDecoder *) self;
 
   gst_video_decoder_set_packetized (decoder, FALSE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (self), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (self));
 }
 
 static gboolean
diff --git a/ext/openh264/Makefile.am b/ext/openh264/Makefile.am
new file mode 100644
index 0000000..69ab459
--- /dev/null
+++ b/ext/openh264/Makefile.am
@@ -0,0 +1,16 @@
+plugin_LTLIBRARIES = libgstopenh264.la
+
+libgstopenh264_la_SOURCES = \
+    gstopenh264plugin.c \
+    gstopenh264enc.cpp \
+    gstopenh264dec.cpp
+
+libgstopenh264_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(OPENH264_CFLAGS)
+libgstopenh264_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENH264_CFLAGS)
+libgstopenh264_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-1.0 $(GST_LIBS) $(OPENH264_LIBS)
+libgstopenh264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstopenh264_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = \
+    gstopenh264dec.h \
+    gstopenh264enc.h
diff --git a/ext/mythtv/Makefile.in b/ext/openh264/Makefile.in
similarity index 77%
copy from ext/mythtv/Makefile.in
copy to ext/openh264/Makefile.in
index 055754c..1eb69b4 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/openh264/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/openh264
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,18 +164,20 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+libgstopenh264_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstopenh264_la_OBJECTS = libgstopenh264_la-gstopenh264plugin.lo \
+	libgstopenh264_la-gstopenh264enc.lo \
+	libgstopenh264_la-gstopenh264dec.lo
+libgstopenh264_la_OBJECTS = $(am_libgstopenh264_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstopenh264_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CXXLD) $(libgstopenh264_la_CXXFLAGS) $(CXXFLAGS) \
+	$(libgstopenh264_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
@@ -200,8 +212,26 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libgstopenh264_la_SOURCES)
+DIST_SOURCES = $(libgstopenh264_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +257,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +275,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +303,6 @@
 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@
@@ -284,7 +315,6 @@
 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@
@@ -292,6 +322,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +350,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +376,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +434,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +458,6 @@
 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@
@@ -430,7 +466,6 @@
 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@
@@ -443,7 +478,6 @@
 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@
@@ -457,6 +491,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +503,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +543,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +579,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +612,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +622,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +658,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +669,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +700,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +726,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +765,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,29 +779,25 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+plugin_LTLIBRARIES = libgstopenh264.la
+libgstopenh264_la_SOURCES = \
+    gstopenh264plugin.c \
+    gstopenh264enc.cpp \
+    gstopenh264dec.cpp
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
-
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
+libgstopenh264_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(OPENH264_CFLAGS)
+libgstopenh264_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENH264_CFLAGS)
+libgstopenh264_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-1.0 $(GST_LIBS) $(OPENH264_LIBS)
+libgstopenh264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstopenh264_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = \
-	gstmythtvsrc.h
+    gstopenh264dec.h \
+    gstopenh264enc.h
 
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .cpp .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -756,10 +807,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/openh264/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/openh264/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -813,8 +863,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libgstopenh264.la: $(libgstopenh264_la_OBJECTS) $(libgstopenh264_la_DEPENDENCIES) $(EXTRA_libgstopenh264_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libgstopenh264_la_LINK) -rpath $(plugindir) $(libgstopenh264_la_OBJECTS) $(libgstopenh264_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +872,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopenh264_la-gstopenh264dec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopenh264_la-gstopenh264enc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopenh264_la-gstopenh264plugin.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +900,50 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+libgstopenh264_la-gstopenh264plugin.lo: gstopenh264plugin.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CFLAGS) $(CFLAGS) -MT libgstopenh264_la-gstopenh264plugin.lo -MD -MP -MF $(DEPDIR)/libgstopenh264_la-gstopenh264plugin.Tpo -c -o libgstopenh264_la-gstopenh264plugin.lo `test -f 'gstopenh264plugin.c' || echo '$(srcdir)/'`gstopenh264plugin.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenh264_la-gstopenh264plugin.Tpo $(DEPDIR)/libgstopenh264_la-gstopenh264plugin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstopenh264plugin.c' object='libgstopenh264_la-gstopenh264plugin.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CFLAGS) $(CFLAGS) -c -o libgstopenh264_la-gstopenh264plugin.lo `test -f 'gstopenh264plugin.c' || echo '$(srcdir)/'`gstopenh264plugin.c
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+libgstopenh264_la-gstopenh264enc.lo: gstopenh264enc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopenh264_la-gstopenh264enc.lo -MD -MP -MF $(DEPDIR)/libgstopenh264_la-gstopenh264enc.Tpo -c -o libgstopenh264_la-gstopenh264enc.lo `test -f 'gstopenh264enc.cpp' || echo '$(srcdir)/'`gstopenh264enc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenh264_la-gstopenh264enc.Tpo $(DEPDIR)/libgstopenh264_la-gstopenh264enc.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstopenh264enc.cpp' object='libgstopenh264_la-gstopenh264enc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopenh264_la-gstopenh264enc.lo `test -f 'gstopenh264enc.cpp' || echo '$(srcdir)/'`gstopenh264enc.cpp
+
+libgstopenh264_la-gstopenh264dec.lo: gstopenh264dec.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CXXFLAGS) $(CXXFLAGS) -MT libgstopenh264_la-gstopenh264dec.lo -MD -MP -MF $(DEPDIR)/libgstopenh264_la-gstopenh264dec.Tpo -c -o libgstopenh264_la-gstopenh264dec.lo `test -f 'gstopenh264dec.cpp' || echo '$(srcdir)/'`gstopenh264dec.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenh264_la-gstopenh264dec.Tpo $(DEPDIR)/libgstopenh264_la-gstopenh264dec.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstopenh264dec.cpp' object='libgstopenh264_la-gstopenh264dec.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstopenh264_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenh264_la_CXXFLAGS) $(CXXFLAGS) -c -o libgstopenh264_la-gstopenh264dec.lo `test -f 'gstopenh264dec.cpp' || echo '$(srcdir)/'`gstopenh264dec.cpp
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1068,6 +1158,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/openh264/gstopenh264dec.cpp b/ext/openh264/gstopenh264dec.cpp
new file mode 100644
index 0000000..6333fe4
--- /dev/null
+++ b/ext/openh264/gstopenh264dec.cpp
@@ -0,0 +1,437 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <wels/codec_api.h>
+#include <wels/codec_app_def.h>
+#include <wels/codec_def.h>
+
+#include "gstopenh264dec.h"
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideodecoder.h>
+#include <string.h>             /* for memcpy */
+
+
+#define GST_OPENH264DEC_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ( \
+                                     (obj), GST_TYPE_OPENH264DEC, \
+                                     GstOpenh264DecPrivate))
+
+GST_DEBUG_CATEGORY_STATIC (gst_openh264dec_debug_category);
+#define GST_CAT_DEFAULT gst_openh264dec_debug_category
+
+/* prototypes */
+
+
+static void gst_openh264dec_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_openh264dec_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec);
+
+static gboolean gst_openh264dec_start (GstVideoDecoder * decoder);
+static gboolean gst_openh264dec_stop (GstVideoDecoder * decoder);
+
+static gboolean gst_openh264dec_set_format (GstVideoDecoder * decoder,
+    GstVideoCodecState * state);
+static gboolean gst_openh264dec_reset (GstVideoDecoder * decoder,
+    gboolean hard);
+static GstFlowReturn gst_openh264dec_finish (GstVideoDecoder * decoder);
+static GstFlowReturn gst_openh264dec_handle_frame (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame);
+static gboolean gst_openh264dec_decide_allocation (GstVideoDecoder * decoder,
+    GstQuery * query);
+
+enum
+{
+  PROP_0,
+  N_PROPERTIES
+};
+
+struct _GstOpenh264DecPrivate
+{
+  ISVCDecoder *decoder;
+  GstVideoCodecState *input_state;
+  guint width, height;
+};
+
+/* pad templates */
+
+static GstStaticPadTemplate gst_openh264dec_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS
+    ("video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,profile=(string){constrained-baseline,baseline}"));
+
+static GstStaticPadTemplate gst_openh264dec_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420")));
+
+/* class initialization */
+
+G_DEFINE_TYPE_WITH_CODE (GstOpenh264Dec, gst_openh264dec,
+    GST_TYPE_VIDEO_DECODER,
+    GST_DEBUG_CATEGORY_INIT (gst_openh264dec_debug_category, "openh264dec", 0,
+        "debug category for openh264dec element"));
+
+static void
+gst_openh264dec_class_init (GstOpenh264DecClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstVideoDecoderClass *video_decoder_class = GST_VIDEO_DECODER_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (GstOpenh264DecPrivate));
+
+  /* Setting up pads and setting metadata should be moved to
+     base_class_init if you intend to subclass this class. */
+  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
+      gst_static_pad_template_get (&gst_openh264dec_sink_template));
+  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
+      gst_static_pad_template_get (&gst_openh264dec_src_template));
+
+  gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass),
+      "OpenH264 video decoder", "Decoder/Video", "OpenH264 video decoder",
+      "Ericsson AB, http://www.ericsson.com");
+  gobject_class->set_property = gst_openh264dec_set_property;
+  gobject_class->get_property = gst_openh264dec_get_property;
+
+  video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_openh264dec_start);
+  video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_openh264dec_stop);
+
+  video_decoder_class->set_format =
+      GST_DEBUG_FUNCPTR (gst_openh264dec_set_format);
+  video_decoder_class->reset = GST_DEBUG_FUNCPTR (gst_openh264dec_reset);
+  video_decoder_class->finish = GST_DEBUG_FUNCPTR (gst_openh264dec_finish);
+  video_decoder_class->handle_frame =
+      GST_DEBUG_FUNCPTR (gst_openh264dec_handle_frame);
+  video_decoder_class->decide_allocation =
+      GST_DEBUG_FUNCPTR (gst_openh264dec_decide_allocation);
+}
+
+static void
+gst_openh264dec_init (GstOpenh264Dec * openh264dec)
+{
+  openh264dec->priv = GST_OPENH264DEC_GET_PRIVATE (openh264dec);
+  openh264dec->priv->decoder = NULL;
+
+  gst_video_decoder_set_packetized (GST_VIDEO_DECODER (openh264dec), TRUE);
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (openh264dec), TRUE);
+}
+
+void
+gst_openh264dec_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (object);
+
+  GST_DEBUG_OBJECT (openh264dec, "set_property");
+
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_openh264dec_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (object);
+
+  GST_DEBUG_OBJECT (openh264dec, "get_property");
+
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_openh264dec_start (GstVideoDecoder * decoder)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+  gint ret;
+  SDecodingParam dec_param = { 0 };
+
+  if (openh264dec->priv->decoder != NULL) {
+    openh264dec->priv->decoder->Uninitialize ();
+    WelsDestroyDecoder (openh264dec->priv->decoder);
+    openh264dec->priv->decoder = NULL;
+  }
+  WelsCreateDecoder (&(openh264dec->priv->decoder));
+
+  dec_param.uiTargetDqLayer = 255;
+  dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY;
+  dec_param.eOutputColorFormat = videoFormatI420;
+  dec_param.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
+
+  ret = openh264dec->priv->decoder->Initialize (&dec_param);
+
+  GST_DEBUG_OBJECT (openh264dec,
+      "openh264_dec_start called, openh264dec %sinitialized OK!",
+      (ret != cmResultSuccess) ? "NOT " : "");
+
+  return (ret == cmResultSuccess);
+}
+
+static gboolean
+gst_openh264dec_stop (GstVideoDecoder * decoder)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+
+  if (openh264dec->priv->decoder) {
+    openh264dec->priv->decoder->Uninitialize ();
+    WelsDestroyDecoder (openh264dec->priv->decoder);
+    openh264dec->priv->decoder = NULL;
+  }
+
+  if (openh264dec->priv->input_state) {
+    gst_video_codec_state_unref (openh264dec->priv->input_state);
+    openh264dec->priv->input_state = NULL;
+  }
+  openh264dec->priv->width = openh264dec->priv->height = 0;
+
+  return TRUE;
+}
+
+static gboolean
+gst_openh264dec_set_format (GstVideoDecoder * decoder,
+    GstVideoCodecState * state)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+
+  GST_DEBUG_OBJECT (openh264dec,
+      "openh264_dec_set_format called, caps: %" GST_PTR_FORMAT, state->caps);
+
+  if (openh264dec->priv->input_state) {
+    gst_video_codec_state_unref (openh264dec->priv->input_state);
+    openh264dec->priv->input_state = NULL;
+  }
+  openh264dec->priv->input_state = gst_video_codec_state_ref (state);
+
+  return TRUE;
+}
+
+static gboolean
+gst_openh264dec_reset (GstVideoDecoder * decoder, gboolean hard)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+
+  GST_DEBUG_OBJECT (openh264dec, "reset");
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_openh264dec_handle_frame (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+  GstMapInfo map_info;
+  GstVideoCodecState *state;
+  SBufferInfo dst_buf_info;
+  DECODING_STATE ret;
+  guint8 *yuvdata[3];
+  GstFlowReturn flow_status;
+  GstVideoFrame video_frame;
+  guint actual_width, actual_height;
+  guint i;
+  guint8 *p;
+  guint row_stride, component_width, component_height, src_width, row;
+
+  if (frame) {
+    if (!gst_buffer_map (frame->input_buffer, &map_info, GST_MAP_READ)) {
+      GST_ERROR_OBJECT (openh264dec, "Cannot map input buffer!");
+      gst_video_codec_frame_unref (frame);
+      return GST_FLOW_ERROR;
+    }
+
+    GST_LOG_OBJECT (openh264dec, "handle frame, %d",
+        map_info.size > 4 ? map_info.data[4] & 0x1f : -1);
+
+    memset (&dst_buf_info, 0, sizeof (SBufferInfo));
+    ret =
+        openh264dec->priv->decoder->DecodeFrame2 (map_info.data, map_info.size,
+        yuvdata, &dst_buf_info);
+
+    if (ret == dsNoParamSets) {
+      GST_DEBUG_OBJECT (openh264dec, "Requesting a key unit");
+      gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decoder),
+          gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+              FALSE, 0));
+    }
+
+    if (ret != dsErrorFree && ret != dsNoParamSets) {
+      GST_DEBUG_OBJECT (openh264dec, "Requesting a key unit");
+      gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decoder),
+          gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+              FALSE, 0));
+      GST_LOG_OBJECT (openh264dec, "error decoding nal, return code: %d", ret);
+    }
+
+    gst_buffer_unmap (frame->input_buffer, &map_info);
+    gst_video_codec_frame_unref (frame);
+    frame = NULL;
+  } else {
+    memset (&dst_buf_info, 0, sizeof (SBufferInfo));
+    ret =
+        openh264dec->priv->decoder->DecodeFrame2 (NULL, 0, yuvdata,
+        &dst_buf_info);
+    if (ret != dsErrorFree) {
+      gst_video_codec_frame_unref (frame);
+      return GST_FLOW_EOS;
+    }
+  }
+
+  /* FIXME: openh264 has no way for us to get a connection
+   * between the input and output frames, we just have to
+   * guess based on the input. Fortunately openh264 can
+   * only do baseline profile. */
+  frame = gst_video_decoder_get_oldest_frame (decoder);
+  if (!frame) {
+    /* Can only happen in finish() */
+    return GST_FLOW_EOS;
+  }
+
+  /* No output available yet */
+  if (dst_buf_info.iBufferStatus != 1) {
+    gst_video_codec_frame_unref (frame);
+    return (frame ? GST_FLOW_OK : GST_FLOW_EOS);
+  }
+
+  actual_width = dst_buf_info.UsrData.sSystemBuffer.iWidth;
+  actual_height = dst_buf_info.UsrData.sSystemBuffer.iHeight;
+
+  if (!gst_pad_has_current_caps (GST_VIDEO_DECODER_SRC_PAD (openh264dec))
+      || actual_width != openh264dec->priv->width
+      || actual_height != openh264dec->priv->height) {
+    state =
+        gst_video_decoder_set_output_state (decoder, GST_VIDEO_FORMAT_I420,
+        actual_width, actual_height, openh264dec->priv->input_state);
+    openh264dec->priv->width = actual_width;
+    openh264dec->priv->height = actual_height;
+
+    if (!gst_video_decoder_negotiate (decoder)) {
+      GST_ERROR_OBJECT (openh264dec,
+          "Failed to negotiate with downstream elements");
+      gst_video_codec_state_unref (state);
+      gst_video_codec_frame_unref (frame);
+      return GST_FLOW_NOT_NEGOTIATED;
+    }
+  } else {
+    state = gst_video_decoder_get_output_state (decoder);
+  }
+
+  flow_status = gst_video_decoder_allocate_output_frame (decoder, frame);
+  if (flow_status != GST_FLOW_OK) {
+    gst_video_codec_state_unref (state);
+    gst_video_codec_frame_unref (frame);
+    return flow_status;
+  }
+
+  if (!gst_video_frame_map (&video_frame, &state->info, frame->output_buffer,
+          GST_MAP_WRITE)) {
+    GST_ERROR_OBJECT (openh264dec, "Cannot map output buffer!");
+    gst_video_codec_state_unref (state);
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+
+  for (i = 0; i < 3; i++) {
+    p = GST_VIDEO_FRAME_COMP_DATA (&video_frame, i);
+    row_stride = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, i);
+    component_width = GST_VIDEO_FRAME_COMP_WIDTH (&video_frame, i);
+    component_height = GST_VIDEO_FRAME_COMP_HEIGHT (&video_frame, i);
+    src_width =
+        i <
+        1 ? dst_buf_info.UsrData.sSystemBuffer.
+        iStride[0] : dst_buf_info.UsrData.sSystemBuffer.iStride[1];
+    for (row = 0; row < component_height; row++) {
+      memcpy (p, yuvdata[i], component_width);
+      p += row_stride;
+      yuvdata[i] += src_width;
+    }
+  }
+  gst_video_codec_state_unref (state);
+  gst_video_frame_unmap (&video_frame);
+
+  return gst_video_decoder_finish_frame (decoder, frame);
+}
+
+static GstFlowReturn
+gst_openh264dec_finish (GstVideoDecoder * decoder)
+{
+  GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
+
+  GST_DEBUG_OBJECT (openh264dec, "finish");
+
+  /* Decoder not negotiated yet */
+  if (openh264dec->priv->width == 0)
+    return GST_FLOW_OK;
+
+  /* Drain all pending frames */
+  while ((gst_openh264dec_handle_frame (decoder, NULL)) == GST_FLOW_OK);
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_openh264dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
+{
+  GstVideoCodecState *state;
+  GstBufferPool *pool;
+  guint size, min, max;
+  GstStructure *config;
+
+  if (!GST_VIDEO_DECODER_CLASS (gst_openh264dec_parent_class)->decide_allocation
+      (decoder, query))
+    return FALSE;
+
+  state = gst_video_decoder_get_output_state (decoder);
+
+  gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
+
+  config = gst_buffer_pool_get_config (pool);
+  if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) {
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_VIDEO_META);
+  }
+
+  gst_buffer_pool_set_config (pool, config);
+
+  gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
+
+  gst_object_unref (pool);
+  gst_video_codec_state_unref (state);
+
+  return TRUE;
+}
diff --git a/ext/openh264/gstopenh264dec.h b/ext/openh264/gstopenh264dec.h
new file mode 100644
index 0000000..3d56ab4
--- /dev/null
+++ b/ext/openh264/gstopenh264dec.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+/*/
+\*\ GstOPENH264Dec
+/*/
+
+#ifndef _GST_OPENH264DEC_H_
+#define _GST_OPENH264DEC_H_
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideodecoder.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_OPENH264DEC          (gst_openh264dec_get_type())
+#define GST_OPENH264DEC(obj)          (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OPENH264DEC,GstOpenh264Dec))
+#define GST_OPENH264DEC_CLASS(klass)  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OPENH264DEC,GstOpenh264DecClass))
+#define GST_IS_OPENH264DEC(obj)       (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OPENH264DEC))
+#define GST_IS_OPENH264DEC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPENH264DEC))
+
+typedef struct _GstOpenh264Dec GstOpenh264Dec;
+typedef struct _GstOpenh264DecClass GstOpenh264DecClass;
+typedef struct _GstOpenh264DecPrivate GstOpenh264DecPrivate;
+
+struct _GstOpenh264Dec
+{
+    GstVideoDecoder base_openh264dec;
+
+    /*< private >*/
+    GstOpenh264DecPrivate *priv;
+};
+
+struct _GstOpenh264DecClass
+{
+    GstVideoDecoderClass base_openh264dec_class;
+};
+
+GType gst_openh264dec_get_type(void);
+
+G_END_DECLS
+#endif
diff --git a/ext/openh264/gstopenh264enc.cpp b/ext/openh264/gstopenh264enc.cpp
new file mode 100644
index 0000000..4461ae2
--- /dev/null
+++ b/ext/openh264/gstopenh264enc.cpp
@@ -0,0 +1,1008 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstopenh264enc.h"
+
+#include <gst/gst.h>
+#include <gst/base/base.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideoencoder.h>
+#include <string.h>
+
+#include <wels/codec_api.h>
+#include <wels/codec_app_def.h>
+#include <wels/codec_def.h>
+#include <wels/codec_ver.h>
+
+#define GST_OPENH264ENC_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), GST_TYPE_OPENH264ENC, GstOpenh264EncPrivate))
+
+GST_DEBUG_CATEGORY_STATIC (gst_openh264enc_debug_category);
+#define GST_CAT_DEFAULT gst_openh264enc_debug_category
+
+#define GST_TYPE_USAGE_TYPE (gst_openh264enc_usage_type_get_type ())
+static GType
+gst_openh264enc_usage_type_get_type (void)
+{
+  static GType usage_type = 0;
+
+  if (!usage_type) {
+    static const GEnumValue usage_types[] = {
+      {CAMERA_VIDEO_REAL_TIME, "video from camera", "camera"},
+      {SCREEN_CONTENT_REAL_TIME, "screen content", "screen"},
+      {0, NULL, NULL},
+    };
+
+    usage_type = g_enum_register_static ("EUsageType", usage_types);
+  }
+
+  return usage_type;
+}
+
+#define GST_TYPE_RC_MODES (gst_openh264enc_rc_modes_get_type ())
+static GType
+gst_openh264enc_rc_modes_get_type (void)
+{
+  static GType rc_modes_type = 0;
+
+  if (!rc_modes_type) {
+    static const GEnumValue rc_modes_types[] = {
+      {RC_QUALITY_MODE, "Quality mode", "quality"},
+      {RC_BITRATE_MODE, "Bitrate mode", "bitrate"},
+      {RC_BUFFERBASED_MODE, "No bitrate control, just using buffer status", "buffer"},
+      {RC_OFF_MODE, "Rate control off mode", "off"},
+      {0, NULL, NULL},
+    };
+
+    rc_modes_type = g_enum_register_static ("RC_MODES", rc_modes_types);
+  }
+
+  return rc_modes_type;
+}
+
+typedef enum _GstOpenh264encDeblockingMode
+{
+  GST_OPENH264_DEBLOCKING_ON = 0,
+  GST_OPENH264_DEBLOCKING_OFF = 1,
+  GST_OPENH264_DEBLOCKING_NOT_SLICE_BOUNDARIES = 2
+} GstOpenh264encDeblockingMode;
+
+#define GST_TYPE_OPENH264ENC_DEBLOCKING_MODE (gst_openh264enc_deblocking_mode_get_type ())
+static GType
+gst_openh264enc_deblocking_mode_get_type (void)
+{
+  static const GEnumValue types[] = {
+    {GST_OPENH264_DEBLOCKING_ON, "Deblocking on", "on"},
+    {GST_OPENH264_DEBLOCKING_OFF, "Deblocking off", "off"},
+    {GST_OPENH264_DEBLOCKING_NOT_SLICE_BOUNDARIES,
+        "Deblocking on, except for slice boundaries", "not-slice-boundaries"},
+    {0, NULL, NULL},
+  };
+  static gsize id = 0;
+
+  if (g_once_init_enter (& id)) {
+    GType _id = g_enum_register_static ("GstOpenh264encDeblockingModes", types);
+    g_once_init_leave (& id, _id);
+  }
+
+  return (GType) id;
+}
+
+#define GST_TYPE_OPENH264ENC_SLICE_MODE (gst_openh264enc_slice_mode_get_type ())
+static GType
+gst_openh264enc_slice_mode_get_type (void)
+{
+  static const GEnumValue types[] = {
+    {SM_FIXEDSLCNUM_SLICE, "num-slices slices", "n-slices"},
+    {SM_AUTO_SLICE, "Number of slices equal to number of threads", "auto"},
+    {0, NULL, NULL},
+  };
+  static gsize id = 0;
+
+  if (g_once_init_enter (& id)) {
+    GType _id = g_enum_register_static ("GstOpenh264encSliceModes", types);
+    g_once_init_leave (& id, _id);
+  }
+
+  return (GType) id;
+}
+
+#define GST_TYPE_OPENH264ENC_COMPLEXITY (gst_openh264enc_complexity_get_type ())
+static GType
+gst_openh264enc_complexity_get_type (void)
+{
+  static const GEnumValue types[] = {
+    {LOW_COMPLEXITY, "Low complexity / high speed encoding", "low"},
+    {MEDIUM_COMPLEXITY, "Medium complexity / medium speed encoding", "medium"},
+    {HIGH_COMPLEXITY, "High complexity / low speed encoding", "high"},
+    {0, NULL, NULL},
+  };
+  static gsize id = 0;
+
+  if (g_once_init_enter (& id)) {
+    GType _id = g_enum_register_static ("GstOpenh264encComplexity", types);
+    g_once_init_leave (& id, _id);
+  }
+
+  return (GType) id;
+}
+
+/* prototypes */
+
+static void gst_openh264enc_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_openh264enc_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec);
+static void gst_openh264enc_finalize (GObject * object);
+static gboolean gst_openh264enc_start (GstVideoEncoder * encoder);
+static gboolean gst_openh264enc_stop (GstVideoEncoder * encoder);
+static gboolean gst_openh264enc_set_format (GstVideoEncoder * encoder,
+    GstVideoCodecState * state);
+static GstFlowReturn gst_openh264enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame);
+static GstFlowReturn gst_openh264enc_finish (GstVideoEncoder * encoder);
+static gboolean gst_openh264enc_propose_allocation (GstVideoEncoder * encoder,
+    GstQuery * query);
+static void gst_openh264enc_set_usage_type (GstOpenh264Enc * openh264enc,
+    gint usage_type);
+static void gst_openh264enc_set_rate_control (GstOpenh264Enc * openh264enc,
+    gint rc_mode);
+
+
+#define DEFAULT_BITRATE            (128000)
+#define DEFAULT_GOP_SIZE           (90)
+#define DEFAULT_MAX_SLICE_SIZE     (1500000)
+#define DROP_BITRATE               20000
+#define START_FRAMERATE            30
+#define DEFAULT_USAGE_TYPE         CAMERA_VIDEO_REAL_TIME
+#define DEFAULT_RATE_CONTROL       RC_QUALITY_MODE
+#define DEFAULT_MULTI_THREAD       0
+#define DEFAULT_ENABLE_DENOISE     FALSE
+#define DEFAULT_ENABLE_FRAME_SKIP  FALSE
+#define DEFAULT_DEBLOCKING_MODE GST_OPENH264_DEBLOCKING_ON
+#define DEFAULT_BACKGROUND_DETECTION TRUE
+#define DEFAULT_ADAPTIVE_QUANTIZATION TRUE
+#define DEFAULT_SCENE_CHANGE_DETECTION TRUE
+#define DEFAULT_SLICE_MODE      SM_FIXEDSLCNUM_SLICE
+#define DEFAULT_NUM_SLICES      1
+#define DEFAULT_COMPLEXITY      MEDIUM_COMPLEXITY
+
+enum
+{
+  PROP_0,
+  PROP_USAGE_TYPE,
+  PROP_BITRATE,
+  PROP_GOP_SIZE,
+  PROP_MAX_SLICE_SIZE,
+  PROP_RATE_CONTROL,
+  PROP_MULTI_THREAD,
+  PROP_ENABLE_DENOISE,
+  PROP_ENABLE_FRAME_SKIP,
+  PROP_DEBLOCKING_MODE,
+  PROP_BACKGROUND_DETECTION,
+  PROP_ADAPTIVE_QUANTIZATION,
+  PROP_SCENE_CHANGE_DETECTION,
+  PROP_SLICE_MODE,
+  PROP_NUM_SLICES,
+  PROP_COMPLEXITY,
+  N_PROPERTIES
+};
+
+struct _GstOpenh264EncPrivate
+{
+  ISVCEncoder *encoder;
+  EUsageType usage_type;
+  guint gop_size;
+  RC_MODES rate_control;
+  guint max_slice_size;
+  guint bitrate;
+  guint framerate;
+  guint multi_thread;
+  gboolean enable_denoise;
+  gboolean enable_frame_skip;
+  GstVideoCodecState *input_state;
+  guint32 drop_bitrate;
+  guint64 time_per_frame;
+  guint64 frame_count;
+  guint64 previous_timestamp;
+  GstOpenh264encDeblockingMode deblocking_mode;
+  gboolean background_detection;
+  gboolean adaptive_quantization;
+  gboolean scene_change_detection;
+  SliceModeEnum slice_mode;
+  guint num_slices;
+  ECOMPLEXITY_MODE complexity;
+};
+
+/* pad templates */
+
+static GstStaticPadTemplate gst_openh264enc_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    );
+
+static GstStaticPadTemplate gst_openh264enc_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS
+    ("video/x-h264, stream-format=(string)\"avc\", alignment=(string)\"au\", profile=(string)\"baseline\"")
+    );
+
+/* class initialization */
+
+G_DEFINE_TYPE_WITH_CODE (GstOpenh264Enc, gst_openh264enc,
+    GST_TYPE_VIDEO_ENCODER,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL);
+    GST_DEBUG_CATEGORY_INIT (gst_openh264enc_debug_category, "openh264enc", 0,
+        "debug category for openh264enc element"));
+
+static void
+gst_openh264enc_class_init (GstOpenh264EncClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstVideoEncoderClass *video_encoder_class = GST_VIDEO_ENCODER_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (GstOpenh264EncPrivate));
+
+  /* Setting up pads and setting metadata should be moved to
+     base_class_init if you intend to subclass this class. */
+  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
+      gst_static_pad_template_get (&gst_openh264enc_src_template));
+  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
+      gst_static_pad_template_get (&gst_openh264enc_sink_template));
+
+  gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass),
+      "OpenH264 video encoder", "Encoder/Video", "OpenH264 video encoder",
+      "Ericsson AB, http://www.ericsson.com");
+
+  gobject_class->set_property = gst_openh264enc_set_property;
+  gobject_class->get_property = gst_openh264enc_get_property;
+  gobject_class->finalize = gst_openh264enc_finalize;
+  video_encoder_class->start = GST_DEBUG_FUNCPTR (gst_openh264enc_start);
+  video_encoder_class->stop = GST_DEBUG_FUNCPTR (gst_openh264enc_stop);
+  video_encoder_class->set_format =
+      GST_DEBUG_FUNCPTR (gst_openh264enc_set_format);
+  video_encoder_class->handle_frame =
+      GST_DEBUG_FUNCPTR (gst_openh264enc_handle_frame);
+  video_encoder_class->propose_allocation =
+      GST_DEBUG_FUNCPTR (gst_openh264enc_propose_allocation);
+  video_encoder_class->finish = GST_DEBUG_FUNCPTR (gst_openh264enc_finish);
+
+  /* define properties */
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_USAGE_TYPE,
+      g_param_spec_enum ("usage-type", "Usage type",
+          "Type of video content",
+          GST_TYPE_USAGE_TYPE, CAMERA_VIDEO_REAL_TIME,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_RATE_CONTROL,
+      g_param_spec_enum ("rate-control", "Rate control",
+          "Rate control mode",
+          GST_TYPE_RC_MODES, RC_QUALITY_MODE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MULTI_THREAD,
+      g_param_spec_uint ("multi-thread", "Number of threads",
+          "The number of threads.",
+          0, G_MAXUINT, DEFAULT_MULTI_THREAD,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_ENABLE_DENOISE,
+      g_param_spec_boolean ("enable-denoise", "Denoise Control",
+          "Denoise control",
+          FALSE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_ENABLE_FRAME_SKIP,
+      g_param_spec_boolean ("enable-frame-skip", "Skip Frames",
+          "Skip frames to reach target bitrate",
+          FALSE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_BITRATE,
+      g_param_spec_uint ("bitrate", "Bitrate",
+          "Bitrate (in bits per second)",
+          0, G_MAXUINT, DEFAULT_BITRATE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_GOP_SIZE,
+      g_param_spec_uint ("gop-size", "GOP size",
+          "Number of frames between intra frames",
+          0, G_MAXUINT, DEFAULT_GOP_SIZE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_MAX_SLICE_SIZE,
+      g_param_spec_uint ("max-slice-size", "Max slice size",
+          "The maximum size of one slice (in bytes).",
+          0, G_MAXUINT, DEFAULT_MAX_SLICE_SIZE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass),
+      PROP_DEBLOCKING_MODE, g_param_spec_enum ("deblocking",
+          "Deblocking mode", "Deblocking mode",
+          GST_TYPE_OPENH264ENC_DEBLOCKING_MODE, DEFAULT_DEBLOCKING_MODE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_BACKGROUND_DETECTION,
+      g_param_spec_boolean ("background-detection", "Background detection",
+          "Background detection", DEFAULT_BACKGROUND_DETECTION,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_ADAPTIVE_QUANTIZATION,
+      g_param_spec_boolean ("adaptive-quantization", "Adaptive quantization",
+          "Adaptive quantization", DEFAULT_ADAPTIVE_QUANTIZATION,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_SCENE_CHANGE_DETECTION,
+      g_param_spec_boolean ("scene-change-detection",
+          "Scene change detection", "Scene change detection",
+          DEFAULT_SCENE_CHANGE_DETECTION,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SLICE_MODE,
+      g_param_spec_enum ("slice-mode", "Slice mode", "Slice mode",
+          GST_TYPE_OPENH264ENC_SLICE_MODE, DEFAULT_SLICE_MODE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_NUM_SLICES,
+      g_param_spec_uint ("num-slices", "Number of slices",
+          "The number of slices (needs slice-mode=n-slices)",
+          0, G_MAXUINT, DEFAULT_NUM_SLICES,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_COMPLEXITY,
+      g_param_spec_enum ("complexity", "Complexity / quality / speed tradeoff", "Complexity",
+          GST_TYPE_OPENH264ENC_COMPLEXITY, DEFAULT_COMPLEXITY,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+}
+
+static void
+gst_openh264enc_init (GstOpenh264Enc * openh264enc)
+{
+  openh264enc->priv = GST_OPENH264ENC_GET_PRIVATE (openh264enc);
+  openh264enc->priv->gop_size = DEFAULT_GOP_SIZE;
+  openh264enc->priv->usage_type = DEFAULT_USAGE_TYPE;
+  openh264enc->priv->rate_control = DEFAULT_RATE_CONTROL;
+  openh264enc->priv->multi_thread = DEFAULT_MULTI_THREAD;
+  openh264enc->priv->max_slice_size = DEFAULT_MAX_SLICE_SIZE;
+  openh264enc->priv->bitrate = DEFAULT_BITRATE;
+  openh264enc->priv->framerate = START_FRAMERATE;
+  openh264enc->priv->input_state = NULL;
+  openh264enc->priv->time_per_frame = GST_SECOND / openh264enc->priv->framerate;
+  openh264enc->priv->frame_count = 0;
+  openh264enc->priv->previous_timestamp = 0;
+  openh264enc->priv->drop_bitrate = DROP_BITRATE;
+  openh264enc->priv->enable_denoise = DEFAULT_ENABLE_DENOISE;
+  openh264enc->priv->enable_frame_skip = DEFAULT_ENABLE_FRAME_SKIP;
+  openh264enc->priv->deblocking_mode = DEFAULT_DEBLOCKING_MODE;
+  openh264enc->priv->background_detection = DEFAULT_BACKGROUND_DETECTION;
+  openh264enc->priv->adaptive_quantization = DEFAULT_ADAPTIVE_QUANTIZATION;
+  openh264enc->priv->scene_change_detection = DEFAULT_SCENE_CHANGE_DETECTION;
+  openh264enc->priv->slice_mode = DEFAULT_SLICE_MODE;
+  openh264enc->priv->num_slices = DEFAULT_NUM_SLICES;
+  openh264enc->priv->encoder = NULL;
+  openh264enc->priv->complexity = DEFAULT_COMPLEXITY;
+  gst_openh264enc_set_usage_type (openh264enc, CAMERA_VIDEO_REAL_TIME);
+  gst_openh264enc_set_rate_control (openh264enc, RC_QUALITY_MODE);
+}
+
+static void
+gst_openh264enc_set_usage_type (GstOpenh264Enc * openh264enc, gint usage_type)
+{
+  switch (usage_type) {
+    case CAMERA_VIDEO_REAL_TIME:
+      openh264enc->priv->usage_type = CAMERA_VIDEO_REAL_TIME;
+      break;
+    case SCREEN_CONTENT_REAL_TIME:
+      openh264enc->priv->usage_type = SCREEN_CONTENT_REAL_TIME;
+      break;
+    default:
+      g_assert_not_reached ();
+  }
+}
+
+static void
+gst_openh264enc_set_rate_control (GstOpenh264Enc * openh264enc, gint rc_mode)
+{
+  switch (rc_mode) {
+    case RC_QUALITY_MODE:
+      openh264enc->priv->rate_control = RC_QUALITY_MODE;
+      break;
+    case RC_BITRATE_MODE:
+      openh264enc->priv->rate_control = RC_BITRATE_MODE;
+      break;
+    case RC_BUFFERBASED_MODE:
+      openh264enc->priv->rate_control = RC_BUFFERBASED_MODE;
+      break;
+    case RC_OFF_MODE:
+      openh264enc->priv->rate_control = RC_OFF_MODE;
+      break;
+    default:
+      g_assert_not_reached ();
+  }
+}
+
+void
+gst_openh264enc_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (object);
+
+  GST_DEBUG_OBJECT (openh264enc, "set_property");
+
+  switch (property_id) {
+    case PROP_BITRATE:
+      openh264enc->priv->bitrate = g_value_get_uint (value);
+      break;
+
+    case PROP_MULTI_THREAD:
+      openh264enc->priv->multi_thread = g_value_get_uint (value);
+      break;
+
+    case PROP_USAGE_TYPE:
+      gst_openh264enc_set_usage_type (openh264enc, g_value_get_enum (value));
+      break;
+
+    case PROP_ENABLE_DENOISE:
+      openh264enc->priv->enable_denoise = g_value_get_boolean (value);
+      break;
+
+    case PROP_ENABLE_FRAME_SKIP:
+      openh264enc->priv->enable_frame_skip = g_value_get_boolean (value);
+      break;
+
+    case PROP_RATE_CONTROL:
+      gst_openh264enc_set_rate_control (openh264enc, g_value_get_enum (value));
+      break;
+
+    case PROP_GOP_SIZE:
+      openh264enc->priv->gop_size = g_value_get_uint (value);
+      break;
+
+    case PROP_MAX_SLICE_SIZE:
+      openh264enc->priv->max_slice_size = g_value_get_uint (value);
+      break;
+
+    case PROP_DEBLOCKING_MODE:
+      openh264enc->priv->deblocking_mode =
+          (GstOpenh264encDeblockingMode) g_value_get_enum (value);
+      break;
+
+    case PROP_BACKGROUND_DETECTION:
+      openh264enc->priv->background_detection = g_value_get_boolean (value);
+      break;
+
+    case PROP_ADAPTIVE_QUANTIZATION:
+      openh264enc->priv->adaptive_quantization = g_value_get_boolean (value);
+      break;
+
+    case PROP_SCENE_CHANGE_DETECTION:
+      openh264enc->priv->scene_change_detection = g_value_get_boolean (value);
+      break;
+
+    case PROP_SLICE_MODE:
+      openh264enc->priv->slice_mode = (SliceModeEnum) g_value_get_enum (value);
+      break;
+
+    case PROP_NUM_SLICES:
+      openh264enc->priv->num_slices = g_value_get_uint (value);
+      break;
+
+    case PROP_COMPLEXITY:
+      openh264enc->priv->complexity = (ECOMPLEXITY_MODE) g_value_get_enum (value);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_openh264enc_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (object);
+
+  GST_DEBUG_OBJECT (openh264enc, "get_property");
+
+  switch (property_id) {
+    case PROP_USAGE_TYPE:
+      g_value_set_enum (value, openh264enc->priv->usage_type);
+      break;
+
+    case PROP_RATE_CONTROL:
+      g_value_set_enum (value, openh264enc->priv->rate_control);
+      break;
+
+    case PROP_BITRATE:
+      g_value_set_uint (value, openh264enc->priv->bitrate);
+      break;
+
+    case PROP_ENABLE_DENOISE:
+      g_value_set_boolean (value, openh264enc->priv->enable_denoise);
+      break;
+
+    case PROP_ENABLE_FRAME_SKIP:
+      g_value_set_boolean (value, openh264enc->priv->enable_frame_skip);
+      break;
+
+    case PROP_MULTI_THREAD:
+      g_value_set_uint (value, openh264enc->priv->multi_thread);
+      break;
+
+    case PROP_GOP_SIZE:
+      g_value_set_uint (value, openh264enc->priv->gop_size);
+      break;
+
+    case PROP_MAX_SLICE_SIZE:
+      g_value_set_uint (value, openh264enc->priv->max_slice_size);
+      break;
+
+    case PROP_DEBLOCKING_MODE:
+      g_value_set_enum (value, openh264enc->priv->deblocking_mode);
+      break;
+
+    case PROP_BACKGROUND_DETECTION:
+      g_value_set_boolean (value, openh264enc->priv->background_detection);
+      break;
+
+    case PROP_ADAPTIVE_QUANTIZATION:
+      g_value_set_boolean (value, openh264enc->priv->adaptive_quantization);
+      break;
+
+    case PROP_SCENE_CHANGE_DETECTION:
+      g_value_set_boolean (value, openh264enc->priv->scene_change_detection);
+      break;
+
+    case PROP_SLICE_MODE:
+      g_value_set_enum (value, openh264enc->priv->slice_mode);
+      break;
+
+    case PROP_NUM_SLICES:
+      g_value_set_uint (value, openh264enc->priv->num_slices);
+      break;
+
+    case PROP_COMPLEXITY:
+      g_value_set_enum (value, openh264enc->priv->complexity);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_openh264enc_finalize (GObject * object)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (object);
+
+  GST_DEBUG_OBJECT (openh264enc, "finalize");
+
+  /* clean up object here */
+
+  if (openh264enc->priv->input_state) {
+    gst_video_codec_state_unref (openh264enc->priv->input_state);
+  }
+  openh264enc->priv->input_state = NULL;
+
+  G_OBJECT_CLASS (gst_openh264enc_parent_class)->finalize (object);
+}
+
+static gboolean
+gst_openh264enc_start (GstVideoEncoder * encoder)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (encoder);
+  GST_DEBUG_OBJECT (openh264enc, "start");
+
+  return TRUE;
+}
+
+static gboolean
+gst_openh264enc_stop (GstVideoEncoder * encoder)
+{
+  GstOpenh264Enc *openh264enc;
+
+  openh264enc = GST_OPENH264ENC (encoder);
+
+  if (openh264enc->priv->encoder != NULL) {
+    openh264enc->priv->encoder->Uninitialize ();
+    WelsDestroySVCEncoder (openh264enc->priv->encoder);
+    openh264enc->priv->encoder = NULL;
+  }
+  openh264enc->priv->encoder = NULL;
+
+  if (openh264enc->priv->input_state) {
+    gst_video_codec_state_unref (openh264enc->priv->input_state);
+  }
+  openh264enc->priv->input_state = NULL;
+
+  GST_DEBUG_OBJECT (openh264enc, "openh264_enc_stop called");
+
+  return TRUE;
+}
+
+
+static gboolean
+gst_openh264enc_set_format (GstVideoEncoder * encoder,
+    GstVideoCodecState * state)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (encoder);
+  GstOpenh264EncPrivate *priv = openh264enc->priv;
+  gchar *debug_caps;
+  SFrameBSInfo bsInfo;
+  guint width, height, fps_n, fps_d;
+  SEncParamExt enc_params;
+  gint ret;
+  guchar *nal_sps_data = NULL;
+  gint nal_sps_length = 0;
+  guchar *nal_pps_data = NULL;
+  gint nal_pps_length = 0;
+  guchar *sps_tmp_buf;
+  guchar *codec_data_tmp_buf;
+  GstBuffer *codec_data;
+  GstCaps *outcaps;
+  GstVideoCodecState *output_state;
+  openh264enc->priv->frame_count = 0;
+  int video_format = videoFormatI420;
+
+  debug_caps = gst_caps_to_string (state->caps);
+  GST_DEBUG_OBJECT (openh264enc, "gst_e26d4_enc_set_format called, caps: %s",
+      debug_caps);
+  g_free (debug_caps);
+
+  gst_openh264enc_stop (encoder);
+
+  if (priv->input_state) {
+    gst_video_codec_state_unref (priv->input_state);
+  }
+  priv->input_state = gst_video_codec_state_ref (state);
+
+  width = GST_VIDEO_INFO_WIDTH (&state->info);
+  height = GST_VIDEO_INFO_HEIGHT (&state->info);
+  fps_n = GST_VIDEO_INFO_FPS_N (&state->info);
+  fps_d = GST_VIDEO_INFO_FPS_D (&state->info);
+
+  if (priv->encoder != NULL) {
+    priv->encoder->Uninitialize ();
+    WelsDestroySVCEncoder (priv->encoder);
+    priv->encoder = NULL;
+  }
+  WelsCreateSVCEncoder (&(priv->encoder));
+  unsigned int uiTraceLevel = WELS_LOG_ERROR;
+  priv->encoder->SetOption(ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
+
+  priv->encoder->GetDefaultParams (&enc_params);
+
+  enc_params.iUsageType = openh264enc->priv->usage_type;
+  enc_params.iPicWidth = width;
+  enc_params.iPicHeight = height;
+  enc_params.iTargetBitrate = openh264enc->priv->bitrate;
+  enc_params.iRCMode = RC_QUALITY_MODE;
+  enc_params.iTemporalLayerNum = 1;
+  enc_params.iSpatialLayerNum = 1;
+  enc_params.iLtrMarkPeriod = 30;
+  enc_params.iMultipleThreadIdc = openh264enc->priv->multi_thread;
+  enc_params.bEnableDenoise = openh264enc->priv->enable_denoise;
+  enc_params.iComplexityMode = priv->complexity;
+  enc_params.uiIntraPeriod = priv->gop_size;
+  enc_params.bEnableBackgroundDetection =
+      openh264enc->priv->background_detection;
+  enc_params.bEnableAdaptiveQuant = openh264enc->priv->adaptive_quantization;
+  enc_params.bEnableSceneChangeDetect =
+      openh264enc->priv->scene_change_detection;
+  enc_params.bEnableFrameSkip = openh264enc->priv->enable_frame_skip;
+  enc_params.bEnableLongTermReference = 0;
+#if OPENH264_MINOR >= 4
+  enc_params.eSpsPpsIdStrategy = CONSTANT_ID;
+#else
+  enc_params.bEnableSpsPpsIdAddition = 1;
+#endif
+  enc_params.bPrefixNalAddingCtrl = 0;
+  enc_params.fMaxFrameRate = fps_n * 1.0 / fps_d;
+  enc_params.iLoopFilterDisableIdc = openh264enc->priv->deblocking_mode;
+  enc_params.sSpatialLayers[0].uiProfileIdc = PRO_BASELINE;
+  enc_params.sSpatialLayers[0].iVideoWidth = width;
+  enc_params.sSpatialLayers[0].iVideoHeight = height;
+  enc_params.sSpatialLayers[0].fFrameRate = fps_n * 1.0 / fps_d;
+  enc_params.sSpatialLayers[0].iSpatialBitrate = openh264enc->priv->bitrate;
+  enc_params.sSpatialLayers[0].sSliceCfg.uiSliceMode =
+      openh264enc->priv->slice_mode;
+  enc_params.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum =
+      openh264enc->priv->num_slices;
+
+  priv->framerate = (1 + fps_n / fps_d);
+
+  ret = priv->encoder->InitializeExt (&enc_params);
+
+  if (ret != cmResultSuccess) {
+    GST_ERROR_OBJECT (openh264enc, "failed to initialize encoder");
+    return FALSE;
+  }
+
+  priv->encoder->SetOption(ENCODER_OPTION_DATAFORMAT, &video_format);
+
+  memset (&bsInfo, 0, sizeof (SFrameBSInfo));
+
+  ret = priv->encoder->EncodeParameterSets (&bsInfo);
+
+  nal_sps_data = bsInfo.sLayerInfo[0].pBsBuf + 4;
+  nal_sps_length = bsInfo.sLayerInfo[0].pNalLengthInByte[0] - 4;
+
+  nal_pps_data = bsInfo.sLayerInfo[0].pBsBuf + nal_sps_length + 8;
+  nal_pps_length = bsInfo.sLayerInfo[0].pNalLengthInByte[1] - 4;
+
+  if (ret != cmResultSuccess) {
+    GST_ELEMENT_ERROR (openh264enc, STREAM, ENCODE,
+        ("Could not create headers"), ("Could not create SPS"));
+    return FALSE;
+  }
+
+  sps_tmp_buf = (guchar *) (g_memdup (nal_sps_data, nal_sps_length));
+
+  codec_data_tmp_buf =
+      (guchar *) g_malloc (5 + 3 + nal_sps_length + 3 + nal_pps_length);
+  codec_data_tmp_buf[0] = 1; /* version 1 */ ;
+  codec_data_tmp_buf[1] = sps_tmp_buf[1];       /* profile */
+  codec_data_tmp_buf[2] = sps_tmp_buf[2];       /* profile constraints */
+  codec_data_tmp_buf[3] = sps_tmp_buf[3];       /* level */
+  codec_data_tmp_buf[4] = 1;    /* NAL length marker length minus one */
+  codec_data_tmp_buf[5] = 1;    /* Number of SPS */
+  GST_WRITE_UINT16_BE (codec_data_tmp_buf + 6, nal_sps_length);
+  memcpy (codec_data_tmp_buf + 8, sps_tmp_buf, nal_sps_length);
+
+  g_free (sps_tmp_buf);
+
+  codec_data_tmp_buf[8 + nal_sps_length] = 1;   /* Number of PPS */
+  GST_WRITE_UINT16_BE (codec_data_tmp_buf + 8 + nal_sps_length + 1,
+      nal_pps_length);
+  memcpy (codec_data_tmp_buf + 8 + nal_sps_length + 3, nal_pps_data,
+      nal_pps_length);
+
+  GST_DEBUG_OBJECT (openh264enc, "Got SPS of size %d and PPS of size %d",
+      nal_sps_length, nal_pps_length);
+
+  codec_data =
+      gst_buffer_new_wrapped (codec_data_tmp_buf,
+      5 + 3 + nal_sps_length + 3 + nal_pps_length);
+
+  outcaps =
+      gst_caps_copy (gst_static_pad_template_get_caps
+      (&gst_openh264enc_src_template));
+  gst_caps_set_simple (outcaps, "codec_data", GST_TYPE_BUFFER, codec_data,
+      NULL);
+  gst_buffer_unref (codec_data);
+
+  output_state = gst_video_encoder_set_output_state (encoder, outcaps, state);
+  gst_video_codec_state_unref (output_state);
+
+  return gst_video_encoder_negotiate (encoder);
+}
+
+static gboolean
+gst_openh264enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query)
+{
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+
+  return
+      GST_VIDEO_ENCODER_CLASS
+      (gst_openh264enc_parent_class)->propose_allocation (encoder, query);
+}
+
+static GstFlowReturn
+gst_openh264enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (encoder);
+  SSourcePicture *src_pic = NULL;
+  GstVideoFrame video_frame;
+  gboolean force_keyframe;
+  gint ret;
+  SFrameBSInfo frame_info;
+  gfloat fps;
+  GstVideoEncoder *base_encoder = GST_VIDEO_ENCODER (openh264enc);
+
+  if (frame) {
+    src_pic = new SSourcePicture;
+
+    if (src_pic == NULL) {
+      if (frame)
+        gst_video_codec_frame_unref (frame);
+      return GST_FLOW_ERROR;
+    }
+    //fill default src_pic
+    src_pic->iColorFormat = videoFormatI420;
+    src_pic->uiTimeStamp = 0;
+  }
+
+  openh264enc->priv->frame_count++;
+  if (frame) {
+    if (G_UNLIKELY (openh264enc->priv->frame_count == 1)) {
+      openh264enc->priv->time_per_frame =
+          (GST_NSECOND / openh264enc->priv->framerate);
+      openh264enc->priv->previous_timestamp = frame->pts;
+    } else {
+      openh264enc->priv->time_per_frame =
+          openh264enc->priv->time_per_frame * 0.8 + (frame->pts -
+          openh264enc->priv->previous_timestamp) * 0.2;
+      openh264enc->priv->previous_timestamp = frame->pts;
+      if (openh264enc->priv->frame_count % 10 == 0) {
+        fps = GST_SECOND / (gdouble) openh264enc->priv->time_per_frame;
+        openh264enc->priv->encoder->SetOption (ENCODER_OPTION_FRAME_RATE, &fps);
+      }
+    }
+  }
+
+  if (openh264enc->priv->bitrate <= openh264enc->priv->drop_bitrate) {
+    GST_LOG_OBJECT (openh264enc, "Dropped frame due to too low bitrate");
+    if (frame) {
+      gst_video_encoder_finish_frame (encoder, frame);
+      delete src_pic;
+    }
+    return GST_FLOW_OK;
+  }
+
+  if (frame) {
+    gst_video_frame_map (&video_frame, &openh264enc->priv->input_state->info,
+        frame->input_buffer, GST_MAP_READ);
+    src_pic->iPicWidth = GST_VIDEO_FRAME_WIDTH (&video_frame);
+    src_pic->iPicHeight = GST_VIDEO_FRAME_HEIGHT (&video_frame);
+    src_pic->iStride[0] = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 0);
+    src_pic->iStride[1] = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 1);
+    src_pic->iStride[2] = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 2);
+    src_pic->pData[0] = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 0);
+    src_pic->pData[1] = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 1);
+    src_pic->pData[2] = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 2);
+
+    force_keyframe = GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame);
+    if (force_keyframe) {
+      openh264enc->priv->encoder->ForceIntraFrame (true);
+      GST_DEBUG_OBJECT (openh264enc,
+          "Got force key unit event, next frame coded as intra picture");
+    }
+  }
+
+  memset (&frame_info, 0, sizeof (SFrameBSInfo));
+  ret = openh264enc->priv->encoder->EncodeFrame (src_pic, &frame_info);
+  if (ret != cmResultSuccess) {
+    if (frame) {
+      gst_video_frame_unmap (&video_frame);
+      gst_video_codec_frame_unref (frame);
+      delete src_pic;
+      GST_ELEMENT_ERROR (openh264enc, STREAM, ENCODE,
+          ("Could not encode frame"), ("Openh264 returned %d", ret));
+      return GST_FLOW_ERROR;
+    } else {
+      return GST_FLOW_EOS;
+    }
+  }
+
+  if (videoFrameTypeSkip == frame_info.eFrameType) {
+    if (frame) {
+      gst_video_frame_unmap (&video_frame);
+      gst_video_encoder_finish_frame (base_encoder, frame);
+      delete src_pic;
+    }
+
+    return GST_FLOW_OK;
+  }
+
+  if (frame) {
+    gst_video_frame_unmap (&video_frame);
+    gst_video_codec_frame_unref (frame);
+    delete src_pic;
+    src_pic = NULL;
+    frame = NULL;
+  }
+
+  /* FIXME: openh264 has no way for us to get a connection
+   * between the input and output frames, we just have to
+   * guess based on the input */
+  frame = gst_video_encoder_get_oldest_frame (base_encoder);
+  if (!frame) {
+    GST_ELEMENT_ERROR (openh264enc, STREAM, ENCODE,
+        ("Could not encode frame"), ("openh264enc returned %d", ret));
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+
+  SLayerBSInfo *bs_info = &frame_info.sLayerInfo[0];
+  gint nal_size = bs_info->pNalLengthInByte[0] - 4;
+  guchar *nal_sps_data, *nal_pps_data;
+  gint nal_sps_length, nal_pps_length, idr_length, tmp_buf_length;
+
+  if (videoFrameTypeIDR == frame_info.eFrameType) {
+    GstMapInfo map;
+
+    /* sps */
+    nal_sps_data = frame_info.sLayerInfo[0].pBsBuf + 4;
+    nal_sps_length = frame_info.sLayerInfo[0].pNalLengthInByte[0] - 4;
+    /* pps */
+    nal_pps_data = nal_sps_data + frame_info.sLayerInfo[0].pNalLengthInByte[0];
+    nal_pps_length = frame_info.sLayerInfo[0].pNalLengthInByte[1] - 4;
+    /* idr */
+    bs_info = &frame_info.sLayerInfo[1];
+    idr_length = bs_info->pNalLengthInByte[0] - 4;
+
+    tmp_buf_length = nal_sps_length + 2 + nal_pps_length + 2 + idr_length + 2;
+    frame->output_buffer =
+        gst_video_encoder_allocate_output_buffer (encoder, tmp_buf_length);
+    gst_buffer_map (frame->output_buffer, &map, GST_MAP_WRITE);
+
+    GST_WRITE_UINT16_BE (map.data, nal_sps_length);
+    memcpy (map.data + 2, nal_sps_data, nal_sps_length);
+
+    GST_WRITE_UINT16_BE (map.data + nal_sps_length + 2, nal_pps_length);
+    memcpy (map.data + nal_sps_length + 2 + 2, nal_pps_data, nal_pps_length);
+
+    GST_WRITE_UINT16_BE (map.data + nal_sps_length + 2 + nal_pps_length + 2,
+        idr_length);
+    memcpy (map.data + nal_sps_length + 2 + nal_pps_length + 2 + 2,
+        bs_info->pBsBuf + 4, idr_length);
+
+    gst_buffer_unmap (frame->output_buffer, &map);
+
+    GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
+  } else {
+    GstMapInfo map;
+
+    tmp_buf_length = nal_size + 2;
+    frame->output_buffer =
+        gst_video_encoder_allocate_output_buffer (encoder, tmp_buf_length);
+    gst_buffer_map (frame->output_buffer, &map, GST_MAP_WRITE);
+
+    GST_WRITE_UINT16_BE (map.data, nal_size);
+    memcpy (map.data + 2, bs_info->pBsBuf + 4, nal_size);
+
+    gst_buffer_unmap (frame->output_buffer, &map);
+
+    GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame);
+  }
+
+  GST_LOG_OBJECT (openh264enc, "openh264 picture %scoded OK!",
+      (ret != cmResultSuccess) ? "NOT " : "");
+
+  return gst_video_encoder_finish_frame (encoder, frame);
+}
+
+static GstFlowReturn
+gst_openh264enc_finish (GstVideoEncoder * encoder)
+{
+  GstOpenh264Enc *openh264enc = GST_OPENH264ENC (encoder);
+
+  if (openh264enc->priv->frame_count == 0)
+    return GST_FLOW_OK;
+
+  /* Drain encoder */
+  while ((gst_openh264enc_handle_frame (encoder, NULL)) == GST_FLOW_OK);
+
+  return GST_FLOW_OK;
+}
diff --git a/ext/openh264/gstopenh264enc.h b/ext/openh264/gstopenh264enc.h
new file mode 100644
index 0000000..009210a
--- /dev/null
+++ b/ext/openh264/gstopenh264enc.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+/*/
+\*\ GstOpenh264Enc
+/*/
+
+#ifndef _GST_OPENH264ENC_H_
+#define _GST_OPENH264ENC_H_
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideoencoder.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_OPENH264ENC          (gst_openh264enc_get_type())
+#define GST_OPENH264ENC(obj)          (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OPENH264ENC,GstOpenh264Enc))
+#define GST_OPENH264ENC_CLASS(klass)  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OPENH264ENC,GstOpenh264EncClass))
+#define GST_IS_OPENH264ENC(obj)       (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OPENH264ENC))
+#define GST_IS_OPENH264ENC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPENH264ENC))
+
+typedef struct _GstOpenh264Enc GstOpenh264Enc;
+typedef struct _GstOpenh264EncClass GstOpenh264EncClass;
+typedef struct _GstOpenh264EncPrivate GstOpenh264EncPrivate;
+
+struct _GstOpenh264Enc
+{
+    GstVideoEncoder base_openh264enc;
+
+    /*< private >*/
+    GstOpenh264EncPrivate *priv;
+};
+
+struct _GstOpenh264EncClass
+{
+    GstVideoEncoderClass base_openh264enc_class;
+};
+
+GType gst_openh264enc_get_type(void);
+
+G_END_DECLS
+#endif
diff --git a/ext/openh264/gstopenh264plugin.c b/ext/openh264/gstopenh264plugin.c
new file mode 100644
index 0000000..15957d7
--- /dev/null
+++ b/ext/openh264/gstopenh264plugin.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2014, Ericsson AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */
+
+/*
+ * Openh264 GStreamer plugin
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gst/gst.h>
+#include "gstopenh264dec.h"
+#include "gstopenh264enc.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  gst_element_register (plugin, "openh264dec", GST_RANK_MARGINAL,
+      GST_TYPE_OPENH264DEC);
+  gst_element_register (plugin, "openh264enc", GST_RANK_MARGINAL,
+      GST_TYPE_OPENH264ENC);
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    openh264,
+    "OpenH264 encoder/decoder plugin",
+    plugin_init,
+    VERSION, "BSD", "OpenWebRTC GStreamer plugins", "http://www.ericsson.com")
diff --git a/ext/openjpeg/Makefile.in b/ext/openjpeg/Makefile.in
index 4f5464b..9817127 100644
--- a/ext/openjpeg/Makefile.in
+++ b/ext/openjpeg/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/openjpeg
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -758,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/openjpeg/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/openjpeg/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1083,6 +1117,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/openjpeg/gstopenjpegdec.c b/ext/openjpeg/gstopenjpegdec.c
index 363da6a..53dc5f6 100644
--- a/ext/openjpeg/gstopenjpegdec.c
+++ b/ext/openjpeg/gstopenjpegdec.c
@@ -109,6 +109,9 @@
 
   gst_video_decoder_set_packetized (decoder, TRUE);
   gst_video_decoder_set_needs_format (decoder, TRUE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (self), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (self));
   opj_set_default_decoder_parameters (&self->params);
 #ifdef HAVE_OPENJPEG_1
   self->params.cp_limit_decoding = NO_LIMITATION;
diff --git a/ext/openjpeg/gstopenjpegenc.c b/ext/openjpeg/gstopenjpegenc.c
index 7c138be..a68493c 100644
--- a/ext/openjpeg/gstopenjpegenc.c
+++ b/ext/openjpeg/gstopenjpegenc.c
@@ -203,6 +203,8 @@
 static void
 gst_openjpeg_enc_init (GstOpenJPEGEnc * self)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (self));
+
   opj_set_default_encoder_parameters (&self->params);
 
   self->params.cp_fixed_quality = 1;
@@ -369,7 +371,7 @@
       data_out[2]++;
       data_out[3]++;
     }
-    data_in += sstride;;
+    data_in += sstride;
   }
 }
 
@@ -406,7 +408,7 @@
       data_out[2]++;
       data_out[3]++;
     }
-    data_in += sstride;;
+    data_in += sstride;
   }
 }
 
diff --git a/ext/openni2/Makefile.in b/ext/openni2/Makefile.in
index b578da0..b4e0f21 100644
--- a/ext/openni2/Makefile.in
+++ b/ext/openni2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/openni2
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -763,7 +798,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/openni2/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/openni2/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1080,6 +1114,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/opus/Makefile.in b/ext/opus/Makefile.in
index efe4d18..03a8d8c 100644
--- a/ext/opus/Makefile.in
+++ b/ext/opus/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/opus
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -232,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +288,6 @@
 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@
@@ -289,7 +300,6 @@
 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@
@@ -297,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +443,6 @@
 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@
@@ -435,7 +451,6 @@
 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@
@@ -448,7 +463,6 @@
 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@
@@ -462,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -764,7 +799,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/opus/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/opus/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1129,6 +1163,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/opus/gstopuscommon.c b/ext/opus/gstopuscommon.c
index 227d44a..febccd8 100644
--- a/ext/opus/gstopuscommon.c
+++ b/ext/opus/gstopuscommon.c
@@ -94,13 +94,18 @@
     GstDebugCategory * category, const char *msg, int n_channels,
     const guint8 * table)
 {
-  char s[8 + 256 * 4] = "[ ";   /* enough for 256 times "255 " at most */
   int n;
+  GString *s;
 
+  if (gst_debug_category_get_threshold (category) < GST_LEVEL_INFO)
+    return;
+
+  s = g_string_new ("[ ");
   for (n = 0; n < n_channels; ++n) {
-    size_t len = strlen (s);
-    snprintf (s + len, sizeof (s) - len, "%d ", table[n]);
+    g_string_append_printf (s, "%d ", table[n]);
   }
-  strcat (s, "]");
-  GST_CAT_LEVEL_LOG (category, GST_LEVEL_INFO, element, "%s: %s", msg, s);
+  g_string_append (s, "]");
+
+  GST_CAT_LEVEL_LOG (category, GST_LEVEL_INFO, element, "%s: %s", msg, s->str);
+  g_string_free (s, TRUE);
 }
diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c
index d2fc646..7b7a10b 100644
--- a/ext/opus/gstopusdec.c
+++ b/ext/opus/gstopusdec.c
@@ -56,7 +56,7 @@
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
-        "format = (string) { " GST_AUDIO_NE (S16) " }, "
+        "format = (string) " GST_AUDIO_NE (S16) ", "
         "layout = (string) interleaved, "
         "rate = (int) { 48000, 24000, 16000, 12000, 8000 }, "
         "channels = (int) [ 1, 8 ] ")
@@ -157,6 +157,7 @@
   dec->r128_gain = 0;
   dec->sample_rate = 0;
   dec->n_channels = 0;
+  dec->leftover_plc_duration = 0;
 }
 
 static void
@@ -166,6 +167,9 @@
   dec->apply_gain = DEFAULT_APPLY_GAIN;
 
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
 
   gst_opus_dec_reset (dec);
 }
@@ -181,8 +185,11 @@
   gst_audio_decoder_set_plc_aware (dec, TRUE);
 
   if (odec->use_inband_fec) {
-    gst_audio_decoder_set_latency (dec, 2 * GST_MSECOND + GST_MSECOND / 2,
-        120 * GST_MSECOND);
+    /* opusdec outputs samples directly from an input buffer, except if
+     * FEC is on, in which case it buffers one buffer in case one buffer
+     * goes missing.
+     */
+    gst_audio_decoder_set_latency (dec, 120 * GST_MSECOND, 120 * GST_MSECOND);
   }
 
   return TRUE;
@@ -221,12 +228,30 @@
     caps = gst_caps_truncate (caps);
     caps = gst_caps_make_writable (caps);
     s = gst_caps_get_structure (caps, 0);
-    gst_structure_fixate_field_nearest_int (s, "rate", 48000);
+
+    if (gst_structure_has_field (s, "rate"))
+      gst_structure_fixate_field_nearest_int (s, "rate", dec->sample_rate);
+    else
+      gst_structure_set (s, "rate", G_TYPE_INT, dec->sample_rate, NULL);
     gst_structure_get_int (s, "rate", &dec->sample_rate);
-    gst_structure_fixate_field_nearest_int (s, "channels", dec->n_channels);
+
+    if (gst_structure_has_field (s, "channels"))
+      gst_structure_fixate_field_nearest_int (s, "channels", dec->n_channels);
+    else
+      gst_structure_set (s, "channels", G_TYPE_INT, dec->n_channels, NULL);
     gst_structure_get_int (s, "channels", &dec->n_channels);
+
     gst_caps_unref (caps);
-  } else {
+  }
+
+  if (dec->n_channels == 0) {
+    GST_DEBUG_OBJECT (dec, "Using a default of 2 channels");
+    dec->n_channels = 2;
+    pos = NULL;
+  }
+
+  if (dec->sample_rate == 0) {
+    GST_DEBUG_OBJECT (dec, "Using a default of 48kHz sample rate");
     dec->sample_rate = 48000;
   }
 
@@ -272,13 +297,8 @@
   gst_buffer_map (buf, &map, GST_MAP_READ);
   data = map.data;
 
-  if (!(dec->n_channels == 0 || dec->n_channels == data[9])) {
-    gst_buffer_unmap (buf, &map);
-    GST_ERROR_OBJECT (dec, "Opus ID header has invalid channels");
-    return GST_FLOW_ERROR;
-  }
-
   dec->n_channels = data[9];
+  dec->sample_rate = GST_READ_UINT32_LE (data + 12);
   dec->pre_skip = GST_READ_UINT16_LE (data + 10);
   dec->r128_gain = GST_READ_UINT16_LE (data + 16);
   dec->r128_gain_volume = gst_opus_dec_get_r128_volume (dec->r128_gain);
@@ -424,12 +444,58 @@
     size = 0;
   }
 
-  /* use maximum size (120 ms) as the number of returned samples is
-     not constant over the stream. */
-  samples = 120 * dec->sample_rate / 1000;
+  if (gst_buffer_get_size (buffer) == 0) {
+    GstClockTime const opus_plc_alignment = 2500 * GST_USECOND;
+    GstClockTime aligned_missing_duration;
+    GstClockTime missing_duration = GST_BUFFER_DURATION (buffer);
+
+    GST_DEBUG_OBJECT (dec,
+        "missing buffer, doing PLC duration %" GST_TIME_FORMAT
+        " plus leftover %" GST_TIME_FORMAT, GST_TIME_ARGS (missing_duration),
+        GST_TIME_ARGS (dec->leftover_plc_duration));
+
+    /* add the leftover PLC duration to that of the buffer */
+    missing_duration += dec->leftover_plc_duration;
+
+    /* align the combined buffer and leftover PLC duration to multiples
+     * of 2.5ms, always rounding down, and store excess duration for later */
+    aligned_missing_duration =
+        (missing_duration / opus_plc_alignment) * opus_plc_alignment;
+    dec->leftover_plc_duration = missing_duration - aligned_missing_duration;
+
+    /* Opus' PLC cannot operate with less than 2.5ms; skip PLC
+     * and accumulate the missing duration in the leftover_plc_duration
+     * for the next PLC attempt */
+    if (aligned_missing_duration < opus_plc_alignment) {
+      GST_DEBUG_OBJECT (dec,
+          "current duration %" GST_TIME_FORMAT
+          " of missing data not enough for PLC (minimum needed: %"
+          GST_TIME_FORMAT ") - skipping", GST_TIME_ARGS (missing_duration),
+          GST_TIME_ARGS (opus_plc_alignment));
+      goto done;
+    }
+
+    /* convert the duration (in nanoseconds) to sample count */
+    samples =
+        gst_util_uint64_scale_int (aligned_missing_duration, dec->sample_rate,
+        GST_SECOND);
+
+    GST_DEBUG_OBJECT (dec,
+        "calculated PLC frame length: %" GST_TIME_FORMAT
+        " num frame samples: %d new leftover: %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (aligned_missing_duration), samples,
+        GST_TIME_ARGS (dec->leftover_plc_duration));
+  } else {
+    /* use maximum size (120 ms) as the number of returned samples is
+       not constant over the stream. */
+    samples = 120 * dec->sample_rate / 1000;
+  }
+
   packet_size = samples * dec->n_channels * 2;
 
-  outbuf = gst_buffer_new_and_alloc (packet_size);
+  outbuf =
+      gst_audio_decoder_allocate_output_buffer (GST_AUDIO_DECODER (dec),
+      packet_size);
   if (!outbuf) {
     goto buffer_failed;
   }
@@ -438,7 +504,7 @@
   out_data = (gint16 *) omap.data;
 
   if (dec->use_inband_fec) {
-    if (dec->last_buffer) {
+    if (gst_buffer_get_size (dec->last_buffer) > 0) {
       /* normal delayed decode */
       GST_LOG_OBJECT (dec, "FEC enabled, decoding last delayed buffer");
       n = opus_multistream_decode (dec->state, data, size, out_data, samples,
@@ -539,9 +605,22 @@
   gboolean ret = TRUE;
   GstStructure *s;
   const GValue *streamheader;
+  GstCaps *old_caps;
 
   GST_DEBUG_OBJECT (dec, "set_format: %" GST_PTR_FORMAT, caps);
 
+  if ((old_caps = gst_pad_get_current_caps (GST_AUDIO_DECODER_SINK_PAD (bdec)))) {
+    if (gst_caps_is_equal (caps, old_caps)) {
+      gst_caps_unref (old_caps);
+      GST_DEBUG_OBJECT (dec, "caps didn't change");
+      goto done;
+    }
+
+    GST_DEBUG_OBJECT (dec, "caps have changed, resetting decoder");
+    gst_opus_dec_reset (dec);
+    gst_caps_unref (old_caps);
+  }
+
   s = gst_caps_get_structure (caps, 0);
   if ((streamheader = gst_structure_get_value (s, "streamheader")) &&
       G_VALUE_HOLDS (streamheader, GST_TYPE_ARRAY) &&
@@ -567,6 +646,22 @@
         goto done;
       gst_buffer_replace (&dec->vorbiscomment, buf);
     }
+  } else {
+    /* defaults if not in the caps */
+    dec->n_channels = 2;
+    dec->sample_rate = 48000;
+
+    gst_structure_get_int (s, "channels", &dec->n_channels);
+    gst_structure_get_int (s, "rate", &dec->sample_rate);
+
+    /* default stereo mapping */
+    dec->channel_mapping_family = 0;
+    dec->channel_mapping[0] = 0;
+    dec->channel_mapping[1] = 1;
+    dec->n_streams = 1;
+    dec->n_stereo_streams = 1;
+
+    gst_opus_dec_negotiate (dec, NULL);
   }
 
 done:
diff --git a/ext/opus/gstopusdec.h b/ext/opus/gstopusdec.h
index 7248778..f8d43a9 100644
--- a/ext/opus/gstopusdec.h
+++ b/ext/opus/gstopusdec.h
@@ -24,7 +24,7 @@
 
 #include <gst/gst.h>
 #include <gst/audio/gstaudiodecoder.h>
-#include <opus/opus_multistream.h>
+#include <opus_multistream.h>
 
 G_BEGIN_DECLS
 
@@ -71,6 +71,8 @@
   gboolean use_inband_fec;
   GstBuffer *last_buffer;
   gboolean primed;
+
+  guint64 leftover_plc_duration;
 };
 
 struct _GstOpusDecClass {
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index f9cf624..7fad248 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -44,7 +44,7 @@
 #include <string.h>
 #include <time.h>
 #include <math.h>
-#include <opus/opus.h>
+#include <opus.h>
 
 #include <gst/gsttagsetter.h>
 #include <gst/audio/audio.h>
@@ -114,6 +114,51 @@
   return id;
 }
 
+#define GST_OPUS_ENC_TYPE_AUDIO_TYPE (gst_opus_enc_audio_type_get_type())
+static GType
+gst_opus_enc_audio_type_get_type (void)
+{
+  static const GEnumValue values[] = {
+    {OPUS_APPLICATION_AUDIO, "Generic audio", "generic"},
+    {OPUS_APPLICATION_VOIP, "Voice", "voice"},
+    {0, NULL, NULL}
+  };
+  static volatile GType id = 0;
+
+  if (g_once_init_enter ((gsize *) & id)) {
+    GType _id;
+
+    _id = g_enum_register_static ("GstOpusEncAudioType", values);
+
+    g_once_init_leave ((gsize *) & id, _id);
+  }
+
+  return id;
+}
+
+#define GST_OPUS_ENC_TYPE_BITRATE_TYPE (gst_opus_enc_bitrate_type_get_type())
+static GType
+gst_opus_enc_bitrate_type_get_type (void)
+{
+  static const GEnumValue values[] = {
+    {BITRATE_TYPE_CBR, "CBR", "cbr"},
+    {BITRATE_TYPE_VBR, "VBR", "vbr"},
+    {BITRATE_TYPE_CONSTRAINED_VBR, "Constrained VBR", "constrained-vbr"},
+    {0, NULL, NULL}
+  };
+  static volatile GType id = 0;
+
+  if (g_once_init_enter ((gsize *) & id)) {
+    GType _id;
+
+    _id = g_enum_register_static ("GstOpusEncBitrateType", values);
+
+    g_once_init_leave ((gsize *) & id, _id);
+  }
+
+  return id;
+}
+
 #define FORMAT_STR GST_AUDIO_NE(S16)
 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
@@ -132,11 +177,13 @@
     );
 
 #define DEFAULT_AUDIO           TRUE
+#define DEFAULT_AUDIO_TYPE      OPUS_APPLICATION_AUDIO
 #define DEFAULT_BITRATE         64000
 #define DEFAULT_BANDWIDTH       OPUS_BANDWIDTH_FULLBAND
 #define DEFAULT_FRAMESIZE       20
 #define DEFAULT_CBR             TRUE
 #define DEFAULT_CONSTRAINED_VBR TRUE
+#define DEFAULT_BITRATE_TYPE    BITRATE_TYPE_CBR
 #define DEFAULT_COMPLEXITY      10
 #define DEFAULT_INBAND_FEC      FALSE
 #define DEFAULT_DTX             FALSE
@@ -147,11 +194,13 @@
 {
   PROP_0,
   PROP_AUDIO,
+  PROP_AUDIO_TYPE,
   PROP_BITRATE,
   PROP_BANDWIDTH,
   PROP_FRAME_SIZE,
   PROP_CBR,
   PROP_CONSTRAINED_VBR,
+  PROP_BITRATE_TYPE,
   PROP_COMPLEXITY,
   PROP_INBAND_FEC,
   PROP_DTX,
@@ -172,6 +221,7 @@
 static void gst_opus_enc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 
+static void gst_opus_enc_set_tags (GstOpusEnc * enc);
 static gboolean gst_opus_enc_start (GstAudioEncoder * benc);
 static gboolean gst_opus_enc_stop (GstAudioEncoder * benc);
 static gboolean gst_opus_enc_set_format (GstAudioEncoder * benc,
@@ -188,6 +238,22 @@
     G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
 
 static void
+gst_opus_enc_set_tags (GstOpusEnc * enc)
+{
+  GstTagList *taglist;
+
+  /* create a taglist and add a bitrate tag to it */
+  taglist = gst_tag_list_new_empty ();
+  gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
+      GST_TAG_BITRATE, enc->bitrate, NULL);
+
+  gst_audio_encoder_merge_tags (GST_AUDIO_ENCODER (enc), taglist,
+      GST_TAG_MERGE_REPLACE);
+
+  gst_tag_list_unref (taglist);
+}
+
+static void
 gst_opus_enc_class_init (GstOpusEncClass * klass)
 {
   GObjectClass *gobject_class;
@@ -218,13 +284,18 @@
   base_class->getcaps = GST_DEBUG_FUNCPTR (gst_opus_enc_sink_getcaps);
 
   g_object_class_install_property (gobject_class, PROP_AUDIO,
-      g_param_spec_boolean ("audio", "Audio or voice",
-          "Audio or voice", DEFAULT_AUDIO,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+      g_param_spec_boolean ("audio",
+          "Audio or voice",
+          "Audio or voice (DEPRECATED: use audio-type)", DEFAULT_AUDIO,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+  g_object_class_install_property (gobject_class, PROP_AUDIO_TYPE,
+      g_param_spec_enum ("audio-type", "What type of audio to optimize for",
+          "What type of audio to optimize for", GST_OPUS_ENC_TYPE_AUDIO_TYPE,
+          DEFAULT_AUDIO_TYPE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BITRATE,
       g_param_spec_int ("bitrate", "Encoding Bit-rate",
-          "Specify an encoding bit-rate (in bps).",
-          LOWEST_BITRATE, HIGHEST_BITRATE, DEFAULT_BITRATE,
+          "Specify an encoding bit-rate (in bps).", LOWEST_BITRATE,
+          HIGHEST_BITRATE, DEFAULT_BITRATE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
           GST_PARAM_MUTABLE_PLAYING));
   g_object_class_install_property (gobject_class, PROP_BANDWIDTH,
@@ -239,13 +310,19 @@
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
           GST_PARAM_MUTABLE_PLAYING));
   g_object_class_install_property (gobject_class, PROP_CBR,
-      g_param_spec_boolean ("cbr", "Constant bit rate", "Constant bit rate",
-          DEFAULT_CBR,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-          GST_PARAM_MUTABLE_PLAYING));
+      g_param_spec_boolean ("cbr", "Constant bit rate",
+          "Constant bit rate (DEPRECATED: use bitrate-type)", DEFAULT_CBR,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_PLAYING
+          | G_PARAM_DEPRECATED));
   g_object_class_install_property (gobject_class, PROP_CONSTRAINED_VBR,
       g_param_spec_boolean ("constrained-vbr", "Constrained VBR",
-          "Constrained VBR", DEFAULT_CONSTRAINED_VBR,
+          "Constrained VBR (DEPRECATED: use bitrate-type)",
+          DEFAULT_CONSTRAINED_VBR,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_PLAYING
+          | G_PARAM_DEPRECATED));
+  g_object_class_install_property (gobject_class, PROP_BITRATE_TYPE,
+      g_param_spec_enum ("bitrate-type", "Bitrate type", "Bitrate type",
+          GST_OPUS_ENC_TYPE_BITRATE_TYPE, DEFAULT_BITRATE_TYPE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
           GST_PARAM_MUTABLE_PLAYING));
   g_object_class_install_property (gobject_class, PROP_COMPLEXITY,
@@ -299,6 +376,8 @@
 
   GST_DEBUG_OBJECT (enc, "init");
 
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
+
   g_mutex_init (&enc->property_lock);
 
   enc->n_channels = -1;
@@ -308,13 +387,13 @@
   enc->bitrate = DEFAULT_BITRATE;
   enc->bandwidth = DEFAULT_BANDWIDTH;
   enc->frame_size = DEFAULT_FRAMESIZE;
-  enc->cbr = DEFAULT_CBR;
-  enc->constrained_vbr = DEFAULT_CONSTRAINED_VBR;
+  enc->bitrate_type = DEFAULT_BITRATE_TYPE;
   enc->complexity = DEFAULT_COMPLEXITY;
   enc->inband_fec = DEFAULT_INBAND_FEC;
   enc->dtx = DEFAULT_DTX;
   enc->packet_loss_percentage = DEFAULT_PACKET_LOSS_PERCENT;
   enc->max_payload_size = DEFAULT_MAX_PAYLOAD_SIZE;
+  enc->audio_type = DEFAULT_AUDIO_TYPE;
 
   /* arrange granulepos marking (and required perfect ts) */
   gst_audio_encoder_set_mark_granule (benc, TRUE);
@@ -327,8 +406,7 @@
   GstOpusEnc *enc = GST_OPUS_ENC (benc);
 
   GST_DEBUG_OBJECT (enc, "start");
-  enc->tags = gst_tag_list_new_empty ();
-  enc->header_sent = FALSE;
+  enc->encoded_samples = 0;
 
   return TRUE;
 }
@@ -339,16 +417,10 @@
   GstOpusEnc *enc = GST_OPUS_ENC (benc);
 
   GST_DEBUG_OBJECT (enc, "stop");
-  enc->header_sent = FALSE;
   if (enc->state) {
     opus_multistream_encoder_destroy (enc->state);
     enc->state = NULL;
   }
-  gst_tag_list_unref (enc->tags);
-  enc->tags = NULL;
-  g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL);
-  g_slist_free (enc->headers);
-  enc->headers = NULL;
   gst_tag_setter_reset_tags (GST_TAG_SETTER (enc));
 
   return TRUE;
@@ -626,6 +698,9 @@
     return FALSE;
   }
 
+  /* update the tags */
+  gst_opus_enc_set_tags (enc);
+
   enc->frame_samples = gst_opus_enc_get_frame_samples (enc);
 
   /* feedback to base class */
@@ -640,6 +715,8 @@
 gst_opus_enc_setup (GstOpusEnc * enc)
 {
   int error = OPUS_OK;
+  GstCaps *caps;
+  gboolean ret;
 
 #ifndef GST_DISABLE_GST_DEBUG
   GST_DEBUG_OBJECT (enc,
@@ -657,17 +734,18 @@
   enc->state = opus_multistream_encoder_create (enc->sample_rate,
       enc->n_channels, enc->n_channels - enc->n_stereo_streams,
       enc->n_stereo_streams, enc->encoding_channel_mapping,
-      enc->audio_or_voip ? OPUS_APPLICATION_AUDIO : OPUS_APPLICATION_VOIP,
-      &error);
+      enc->audio_type, &error);
   if (!enc->state || error != OPUS_OK)
     goto encoder_creation_failed;
 
   opus_multistream_encoder_ctl (enc->state, OPUS_SET_BITRATE (enc->bitrate), 0);
   opus_multistream_encoder_ctl (enc->state, OPUS_SET_BANDWIDTH (enc->bandwidth),
       0);
-  opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (!enc->cbr), 0);
   opus_multistream_encoder_ctl (enc->state,
-      OPUS_SET_VBR_CONSTRAINT (enc->constrained_vbr), 0);
+      OPUS_SET_VBR (enc->bitrate_type != BITRATE_TYPE_CBR), 0);
+  opus_multistream_encoder_ctl (enc->state,
+      OPUS_SET_VBR_CONSTRAINT (enc->bitrate_type ==
+          BITRATE_TYPE_CONSTRAINED_VBR), 0);
   opus_multistream_encoder_ctl (enc->state,
       OPUS_SET_COMPLEXITY (enc->complexity), 0);
   opus_multistream_encoder_ctl (enc->state,
@@ -678,7 +756,18 @@
 
   GST_LOG_OBJECT (enc, "we have frame size %d", enc->frame_size);
 
-  return TRUE;
+  gst_opus_header_create_caps (&caps, NULL, enc->n_channels,
+      enc->n_stereo_streams, enc->sample_rate, enc->channel_mapping_family,
+      enc->decoding_channel_mapping,
+      gst_tag_setter_get_tag_list (GST_TAG_SETTER (enc)));
+
+  /* negotiate with these caps */
+  GST_DEBUG_OBJECT (enc, "here are the caps: %" GST_PTR_FORMAT, caps);
+
+  ret = gst_audio_encoder_set_output_format (GST_AUDIO_ENCODER (enc), caps);
+  gst_caps_unref (caps);
+
+  return ret;
 
 encoder_creation_failed:
   GST_ERROR_OBJECT (enc, "Encoder creation failed");
@@ -704,6 +793,9 @@
       gst_tag_setter_merge_tags (setter, list, mode);
       break;
     }
+    case GST_EVENT_SEGMENT:
+      enc->encoded_samples = 0;
+      break;
 
     default:
       break;
@@ -730,9 +822,7 @@
   peercaps = gst_pad_peer_query_caps (GST_AUDIO_ENCODER_SRC_PAD (benc), NULL);
   if (!peercaps) {
     GST_DEBUG_OBJECT (benc, "No peercaps, returning template sink caps");
-    return
-        gst_caps_copy (gst_pad_get_pad_template_caps
-        (GST_AUDIO_ENCODER_SINK_PAD (benc)));
+    return gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SINK_PAD (benc));
   }
 
   tcaps = gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SRC_PAD (benc));
@@ -793,6 +883,8 @@
   GstMapInfo omap;
   gint outsize;
   GstBuffer *outbuf;
+  GstSegment *segment;
+  GstClockTime duration;
 
   guint max_payload_size;
   gint frame_samples;
@@ -813,6 +905,26 @@
     if (G_UNLIKELY (bsize % bytes)) {
       GST_DEBUG_OBJECT (enc, "draining; adding silence samples");
 
+      /* If encoding part of a frame, and we have no set stop time on
+       * the output segment, we update the segment stop time to reflect
+       * the last sample. This will let oggmux set the last page's
+       * granpos to tell a decoder the dummy samples should be clipped.
+       */
+      segment = &GST_AUDIO_ENCODER_OUTPUT_SEGMENT (enc);
+      if (!GST_CLOCK_TIME_IS_VALID (segment->stop)) {
+        int input_samples = bsize / (enc->n_channels * 2);
+        GST_DEBUG_OBJECT (enc,
+            "No stop time and partial frame, updating segment");
+        duration =
+            gst_util_uint64_scale (enc->encoded_samples + input_samples,
+            GST_SECOND, enc->sample_rate);
+        segment->stop = segment->start + duration;
+        GST_DEBUG_OBJECT (enc, "new output segment %" GST_SEGMENT_FORMAT,
+            segment);
+        gst_pad_push_event (GST_AUDIO_ENCODER_SRC_PAD (enc),
+            gst_event_new_segment (segment));
+      }
+
       size = ((bsize / bytes) + 1) * bytes;
       mdata = g_malloc0 (size);
       memcpy (mdata, bdata, bsize);
@@ -828,7 +940,9 @@
 
   g_assert (size == bytes);
 
-  outbuf = gst_buffer_new_and_alloc (max_payload_size * enc->n_channels);
+  outbuf =
+      gst_audio_encoder_allocate_output_buffer (GST_AUDIO_ENCODER (enc),
+      max_payload_size * enc->n_channels);
   if (!outbuf)
     goto done;
 
@@ -864,6 +978,7 @@
   ret =
       gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf,
       frame_samples);
+  enc->encoded_samples += frame_samples;
 
 done:
 
@@ -884,29 +999,6 @@
 
   enc = GST_OPUS_ENC (benc);
   GST_DEBUG_OBJECT (enc, "handle_frame");
-
-  if (!enc->header_sent) {
-    GstCaps *caps;
-
-    g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL);
-    g_slist_free (enc->headers);
-    enc->headers = NULL;
-
-    gst_opus_header_create_caps (&caps, &enc->headers, enc->n_channels,
-        enc->n_stereo_streams, enc->sample_rate, enc->channel_mapping_family,
-        enc->decoding_channel_mapping,
-        gst_tag_setter_get_tag_list (GST_TAG_SETTER (enc)));
-
-
-    /* negotiate with these caps */
-    GST_DEBUG_OBJECT (enc, "here are the caps: %" GST_PTR_FORMAT, caps);
-
-    gst_audio_encoder_set_output_format (benc, caps);
-    gst_caps_unref (caps);
-
-    enc->header_sent = TRUE;
-  }
-
   GST_DEBUG_OBJECT (enc, "received buffer %p of %" G_GSIZE_FORMAT " bytes", buf,
       buf ? gst_buffer_get_size (buf) : 0);
 
@@ -927,7 +1019,11 @@
 
   switch (prop_id) {
     case PROP_AUDIO:
-      g_value_set_boolean (value, enc->audio_or_voip);
+      g_value_set_boolean (value,
+          enc->audio_type == OPUS_APPLICATION_AUDIO ? TRUE : FALSE);
+      break;
+    case PROP_AUDIO_TYPE:
+      g_value_set_enum (value, enc->audio_type);
       break;
     case PROP_BITRATE:
       g_value_set_int (value, enc->bitrate);
@@ -939,10 +1035,18 @@
       g_value_set_enum (value, enc->frame_size);
       break;
     case PROP_CBR:
-      g_value_set_boolean (value, enc->cbr);
+      GST_WARNING_OBJECT (enc,
+          "cbr property is deprecated; use bitrate-type instead");
+      g_value_set_boolean (value, enc->bitrate_type == BITRATE_TYPE_CBR);
       break;
     case PROP_CONSTRAINED_VBR:
-      g_value_set_boolean (value, enc->constrained_vbr);
+      GST_WARNING_OBJECT (enc,
+          "constrained-vbr property is deprecated; use bitrate-type instead");
+      g_value_set_boolean (value,
+          enc->bitrate_type == BITRATE_TYPE_CONSTRAINED_VBR);
+      break;
+    case PROP_BITRATE_TYPE:
+      g_value_set_enum (value, enc->bitrate_type);
       break;
     case PROP_COMPLEXITY:
       g_value_set_int (value, enc->complexity);
@@ -986,7 +1090,12 @@
 
   switch (prop_id) {
     case PROP_AUDIO:
-      enc->audio_or_voip = g_value_get_boolean (value);
+      enc->audio_type =
+          g_value_get_boolean (value) ? OPUS_APPLICATION_AUDIO :
+          OPUS_APPLICATION_VOIP;
+      break;
+    case PROP_AUDIO_TYPE:
+      enc->audio_type = g_value_get_enum (value);
       break;
     case PROP_BITRATE:
       GST_OPUS_UPDATE_PROPERTY (bitrate, int, BITRATE);
@@ -1002,15 +1111,44 @@
       g_mutex_unlock (&enc->property_lock);
       break;
     case PROP_CBR:
-      /* this one has an opposite meaning to the opus ctl... */
+      GST_WARNING_OBJECT (enc,
+          "cbr property is deprecated; use bitrate-type instead");
+      g_warning ("cbr property is deprecated; use bitrate-type instead");
       g_mutex_lock (&enc->property_lock);
-      enc->cbr = g_value_get_boolean (value);
-      if (enc->state)
-        opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (!enc->cbr));
+      enc->bitrate_type = BITRATE_TYPE_CBR;
+      if (enc->state) {
+        opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (FALSE));
+        opus_multistream_encoder_ctl (enc->state,
+            OPUS_SET_VBR_CONSTRAINT (FALSE), 0);
+      }
       g_mutex_unlock (&enc->property_lock);
       break;
     case PROP_CONSTRAINED_VBR:
-      GST_OPUS_UPDATE_PROPERTY (constrained_vbr, boolean, VBR_CONSTRAINT);
+      GST_WARNING_OBJECT (enc,
+          "constrained-vbr property is deprecated; use bitrate-type instead");
+      g_warning
+          ("constrained-vbr property is deprecated; use bitrate-type instead");
+      g_mutex_lock (&enc->property_lock);
+      enc->bitrate_type = BITRATE_TYPE_CONSTRAINED_VBR;
+      if (enc->state) {
+        opus_multistream_encoder_ctl (enc->state, OPUS_SET_VBR (TRUE));
+        opus_multistream_encoder_ctl (enc->state,
+            OPUS_SET_VBR_CONSTRAINT (TRUE), 0);
+      }
+      g_mutex_unlock (&enc->property_lock);
+      break;
+    case PROP_BITRATE_TYPE:
+      /* this one has an opposite meaning to the opus ctl... */
+      g_mutex_lock (&enc->property_lock);
+      enc->bitrate_type = g_value_get_enum (value);
+      if (enc->state) {
+        opus_multistream_encoder_ctl (enc->state,
+            OPUS_SET_VBR (enc->bitrate_type != BITRATE_TYPE_CBR));
+        opus_multistream_encoder_ctl (enc->state,
+            OPUS_SET_VBR_CONSTRAINT (enc->bitrate_type ==
+                BITRATE_TYPE_CONSTRAINED_VBR), 0);
+      }
+      g_mutex_unlock (&enc->property_lock);
       break;
     case PROP_COMPLEXITY:
       GST_OPUS_UPDATE_PROPERTY (complexity, int, COMPLEXITY);
diff --git a/ext/opus/gstopusenc.h b/ext/opus/gstopusenc.h
index 64f95e3..43eaac8 100644
--- a/ext/opus/gstopusenc.h
+++ b/ext/opus/gstopusenc.h
@@ -27,7 +27,7 @@
 #include <gst/gst.h>
 #include <gst/audio/gstaudioencoder.h>
 
-#include <opus/opus_multistream.h>
+#include <opus_multistream.h>
 
 G_BEGIN_DECLS
 
@@ -45,6 +45,13 @@
 #define MAX_FRAME_SIZE 2000*2
 #define MAX_FRAME_BYTES 2000
 
+typedef enum
+{
+  BITRATE_TYPE_CBR,
+  BITRATE_TYPE_VBR,
+  BITRATE_TYPE_CONSTRAINED_VBR,
+} GstOpusEncBitrateType;
+
 typedef struct _GstOpusEnc GstOpusEnc;
 typedef struct _GstOpusEncClass GstOpusEncClass;
 
@@ -57,12 +64,11 @@
   GMutex                property_lock;
 
   /* properties */
-  gboolean              audio_or_voip;
+  gint                  audio_type;
   gint                  bitrate;
   gint                  bandwidth;
   gint                  frame_size;
-  gboolean              cbr;
-  gboolean              constrained_vbr;
+  GstOpusEncBitrateType bitrate_type;
   gint                  complexity;
   gboolean              inband_fec;
   gboolean              dtx;
@@ -73,11 +79,7 @@
   gint                  n_channels;
   gint                  sample_rate;
 
-  gboolean              header_sent;
-
-  GSList                *headers;
-
-  GstTagList            *tags;
+  guint64               encoded_samples;
 
   guint8                channel_mapping_family;
   guint8                encoding_channel_mapping[256];
diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c
index 3011716..1521c1c 100644
--- a/ext/opus/gstopusheader.c
+++ b/ext/opus/gstopusheader.c
@@ -96,16 +96,17 @@
 /*
  * (really really) FIXME: move into core (dixit tpm)
  */
-/**
+/*
  * _gst_caps_set_buffer_array:
- * @caps: a #GstCaps
+ * @caps: (transfer full): a #GstCaps
  * @field: field in caps to set
  * @buf: header buffers
  *
  * Adds given buffers to an array of buffers set as the given @field
  * on the given @caps.  List of buffer arguments must be NULL-terminated.
  *
- * Returns: input caps with a streamheader field added, or NULL if some error
+ * Returns: (transfer full): input caps with a streamheader field added, or NULL
+ *     if some error occurred
  */
 static GstCaps *
 _gst_caps_set_buffer_array (GstCaps * caps, const gchar * field,
@@ -156,17 +157,21 @@
     GstBuffer * buf1, GstBuffer * buf2)
 {
   int n_streams, family;
+  gint channels, rate;
   gboolean multistream;
   GstMapInfo map;
   guint8 *data;
 
   g_return_if_fail (caps);
-  g_return_if_fail (headers && !*headers);
+  g_return_if_fail (!headers || !*headers);
   g_return_if_fail (gst_buffer_get_size (buf1) >= 19);
 
   gst_buffer_map (buf1, &map, GST_MAP_READ);
   data = map.data;
 
+  channels = data[9];
+  rate = GST_READ_UINT32_LE (data + 12);
+
   /* work out the number of streams */
   family = data[18];
   if (family == 0) {
@@ -182,16 +187,27 @@
     }
   }
 
+  /* TODO: should probably also put the channel mapping into the caps too once
+   * we actually support multi channel, and pre-skip and other fields */
+
   gst_buffer_unmap (buf1, &map);
 
   /* mark and put on caps */
   multistream = n_streams > 1;
   *caps = gst_caps_new_simple ("audio/x-opus",
-      "multistream", G_TYPE_BOOLEAN, multistream, NULL);
+      "multistream", G_TYPE_BOOLEAN, multistream,
+      "channels", G_TYPE_INT, channels, NULL);
+
+  if (rate > 0) {
+    gst_caps_set_simple (*caps, "rate", G_TYPE_INT, rate, NULL);
+  }
+
   *caps = _gst_caps_set_buffer_array (*caps, "streamheader", buf1, buf2, NULL);
 
-  *headers = g_slist_prepend (*headers, gst_buffer_ref (buf2));
-  *headers = g_slist_prepend (*headers, gst_buffer_ref (buf1));
+  if (headers) {
+    *headers = g_slist_prepend (*headers, gst_buffer_ref (buf2));
+    *headers = g_slist_prepend (*headers, gst_buffer_ref (buf1));
+  }
 }
 
 void
@@ -202,7 +218,7 @@
   GstBuffer *buf1, *buf2;
 
   g_return_if_fail (caps);
-  g_return_if_fail (headers && !*headers);
+  g_return_if_fail (!headers || !*headers);
   g_return_if_fail (nchannels > 0);
   g_return_if_fail (sample_rate >= 0);  /* 0 -> unset */
   g_return_if_fail (channel_mapping_family == 0 || channel_mapping);
diff --git a/ext/opus/gstopusparse.c b/ext/opus/gstopusparse.c
index 8ede3a3..71f0639 100644
--- a/ext/opus/gstopusparse.c
+++ b/ext/opus/gstopusparse.c
@@ -39,7 +39,7 @@
 #endif
 
 #include <string.h>
-#include <opus/opus.h>
+#include <opus.h>
 #include "gstopusheader.h"
 #include "gstopusparse.h"
 
@@ -359,7 +359,7 @@
       channel_mapping_family = 0;
       channel_mapping[0] = 0;
       channel_mapping[1] = 1;
-      gst_opus_header_create_caps (&caps, &parse->headers, channels, 1, 0,
+      gst_opus_header_create_caps (&caps, &parse->headers, channels, 1, 48000,
           channel_mapping_family, channel_mapping, NULL);
     }
 
diff --git a/ext/opus/gstrtpopusdepay.c b/ext/opus/gstrtpopusdepay.c
index da6d51e..abb7218 100644
--- a/ext/opus/gstrtpopusdepay.c
+++ b/ext/opus/gstrtpopusdepay.c
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
+#include <gst/audio/audio.h>
 #include "gstrtpopusdepay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpopusdepay_debug);
@@ -39,14 +40,14 @@
         "media = (string) \"audio\", "
         "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ","
         "clock-rate = (int) 48000, "
-        "encoding-name = (string) \"X-GST-OPUS-DRAFT-SPITTKA-00\"")
+        "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\" }")
     );
 
 static GstStaticPadTemplate gst_rtp_opus_depay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-opus")
+    GST_STATIC_CAPS ("audio/x-opus, multistream = (boolean) FALSE")
     );
 
 static GstBuffer *gst_rtp_opus_depay_process (GstRTPBaseDepayload * depayload,
@@ -92,9 +93,40 @@
 gst_rtp_opus_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
 {
   GstCaps *srccaps;
+  GstStructure *s;
   gboolean ret;
+  const gchar *sprop_stereo, *sprop_maxcapturerate;
 
-  srccaps = gst_caps_new_empty_simple ("audio/x-opus");
+  srccaps =
+      gst_caps_new_simple ("audio/x-opus", "multistream", G_TYPE_BOOLEAN, FALSE,
+      NULL);
+
+  s = gst_caps_get_structure (caps, 0);
+  if ((sprop_stereo = gst_structure_get_string (s, "sprop-stereo"))) {
+    if (strcmp (sprop_stereo, "0") == 0)
+      gst_caps_set_simple (srccaps, "channels", G_TYPE_INT, 1, NULL);
+    else if (strcmp (sprop_stereo, "1") == 0)
+      gst_caps_set_simple (srccaps, "channels", G_TYPE_INT, 2, NULL);
+    else
+      GST_WARNING_OBJECT (depayload, "Unknown sprop-stereo value '%s'",
+          sprop_stereo);
+  }
+
+  if ((sprop_maxcapturerate =
+          gst_structure_get_string (s, "sprop-maxcapturerate"))) {
+    gulong rate;
+    gchar *tailptr;
+
+    rate = strtoul (sprop_maxcapturerate, &tailptr, 10);
+    if (rate > INT_MAX || *tailptr != '\0') {
+      GST_WARNING_OBJECT (depayload,
+          "Failed to parse sprop-maxcapturerate value '%s'",
+          sprop_maxcapturerate);
+    } else {
+      gst_caps_set_simple (srccaps, "rate", G_TYPE_INT, rate, NULL);
+    }
+  }
+
   ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
 
   GST_DEBUG_OBJECT (depayload,
@@ -106,6 +138,25 @@
   return ret;
 }
 
+static gboolean
+foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
+{
+  GstRTPOpusDepay *depay = user_data;
+  const GstMetaInfo *info = (*meta)->info;
+  const gchar *const *tags = gst_meta_api_type_get_tags (info->api);
+
+  if (!tags || (g_strv_length ((gchar **) tags) == 1
+          && gst_meta_api_type_has_tag (info->api,
+              g_quark_from_string (GST_META_TAG_AUDIO_STR)))) {
+    GST_DEBUG_OBJECT (depay, "keeping metadata %s", g_type_name (info->api));
+  } else {
+    GST_DEBUG_OBJECT (depay, "dropping metadata %s", g_type_name (info->api));
+    *meta = NULL;
+  }
+
+  return TRUE;
+}
+
 static GstBuffer *
 gst_rtp_opus_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
 {
@@ -116,5 +167,9 @@
   outbuf = gst_rtp_buffer_get_payload_buffer (&rtpbuf);
   gst_rtp_buffer_unmap (&rtpbuf);
 
+  outbuf = gst_buffer_make_writable (outbuf);
+  /* Filter away all metas that are not sensible to copy */
+  gst_buffer_foreach_meta (outbuf, foreach_metadata, depayload);
+
   return outbuf;
 }
diff --git a/ext/opus/gstrtpopuspay.c b/ext/opus/gstrtpopuspay.c
index 69ad51e..ead49a5 100644
--- a/ext/opus/gstrtpopuspay.c
+++ b/ext/opus/gstrtpopuspay.c
@@ -26,6 +26,7 @@
 #include <string.h>
 
 #include <gst/rtp/gstrtpbuffer.h>
+#include <gst/audio/audio.h>
 
 #include "gstrtpopuspay.h"
 
@@ -48,11 +49,14 @@
         "media = (string) \"audio\", "
         "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
         "clock-rate = (int) 48000, "
-        "encoding-name = (string) \"X-GST-OPUS-DRAFT-SPITTKA-00\"")
+        "encoding-params = (string) \"2\", "
+        "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\" }")
     );
 
 static gboolean gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload,
     GstCaps * caps);
+static GstCaps *gst_rtp_opus_pay_getcaps (GstRTPBasePayload * payload,
+    GstPad * pad, GstCaps * filter);
 static GstFlowReturn gst_rtp_opus_pay_handle_buffer (GstRTPBasePayload *
     payload, GstBuffer * buffer);
 
@@ -68,6 +72,7 @@
   element_class = GST_ELEMENT_CLASS (klass);
 
   gstbasertppayload_class->set_caps = gst_rtp_opus_pay_setcaps;
+  gstbasertppayload_class->get_caps = gst_rtp_opus_pay_getcaps;
   gstbasertppayload_class->handle_buffer = gst_rtp_opus_pay_handle_buffer;
 
   gst_element_class_add_pad_template (element_class,
@@ -94,26 +99,114 @@
 gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
 {
   gboolean res;
+  GstCaps *src_caps;
+  GstStructure *s;
+  char *encoding_name;
+  gint channels, rate;
+  const char *sprop_stereo = NULL;
+  char *sprop_maxcapturerate = NULL;
+
+  src_caps = gst_pad_get_allowed_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload));
+  if (src_caps) {
+    src_caps = gst_caps_make_writable (src_caps);
+    src_caps = gst_caps_truncate (src_caps);
+    s = gst_caps_get_structure (src_caps, 0);
+    gst_structure_fixate_field_string (s, "encoding-name", "OPUS");
+    encoding_name = g_strdup (gst_structure_get_string (s, "encoding-name"));
+    gst_caps_unref (src_caps);
+  } else {
+    encoding_name = g_strdup ("X-GST-OPUS-DRAFT-SPITTKA-00");
+  }
+
+  s = gst_caps_get_structure (caps, 0);
+  if (gst_structure_get_int (s, "channels", &channels)) {
+    if (channels > 2) {
+      GST_ERROR_OBJECT (payload,
+          "More than 2 channels with multistream=FALSE is invalid");
+      return FALSE;
+    } else if (channels == 2) {
+      sprop_stereo = "1";
+    } else {
+      sprop_stereo = "0";
+    }
+  }
+
+  if (gst_structure_get_int (s, "rate", &rate)) {
+    sprop_maxcapturerate = g_strdup_printf ("%d", rate);
+  }
 
   gst_rtp_base_payload_set_options (payload, "audio", FALSE,
-      "X-GST-OPUS-DRAFT-SPITTKA-00", 48000);
-  res = gst_rtp_base_payload_set_outcaps (payload, NULL);
+      encoding_name, 48000);
+  g_free (encoding_name);
+
+  if (sprop_maxcapturerate && sprop_stereo) {
+    res =
+        gst_rtp_base_payload_set_outcaps (payload, "sprop-maxcapturerate",
+        G_TYPE_STRING, sprop_maxcapturerate, "sprop-stereo", G_TYPE_STRING,
+        sprop_stereo, NULL);
+  } else if (sprop_maxcapturerate) {
+    res =
+        gst_rtp_base_payload_set_outcaps (payload, "sprop-maxcapturerate",
+        G_TYPE_STRING, sprop_maxcapturerate, NULL);
+  } else if (sprop_stereo) {
+    res =
+        gst_rtp_base_payload_set_outcaps (payload, "sprop-stereo",
+        G_TYPE_STRING, sprop_stereo, NULL);
+  } else {
+    res = gst_rtp_base_payload_set_outcaps (payload, NULL);
+  }
+
+  g_free (sprop_maxcapturerate);
 
   return res;
 }
 
+typedef struct
+{
+  GstRtpOPUSPay *pay;
+  GstBuffer *outbuf;
+} CopyMetaData;
+
+static gboolean
+foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
+{
+  CopyMetaData *data = user_data;
+  GstRtpOPUSPay *pay = data->pay;
+  GstBuffer *outbuf = data->outbuf;
+  const GstMetaInfo *info = (*meta)->info;
+  const gchar *const *tags = gst_meta_api_type_get_tags (info->api);
+
+  if (!tags || (g_strv_length ((gchar **) tags) == 1
+          && gst_meta_api_type_has_tag (info->api,
+              g_quark_from_string (GST_META_TAG_AUDIO_STR)))) {
+    GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
+    GST_DEBUG_OBJECT (pay, "copy metadata %s", g_type_name (info->api));
+    /* simply copy then */
+    info->transform_func (outbuf, *meta, inbuf,
+        _gst_meta_transform_copy, &copy_data);
+  } else {
+    GST_DEBUG_OBJECT (pay, "not copying metadata %s", g_type_name (info->api));
+  }
+
+  return TRUE;
+}
+
 static GstFlowReturn
 gst_rtp_opus_pay_handle_buffer (GstRTPBasePayload * basepayload,
     GstBuffer * buffer)
 {
   GstBuffer *outbuf;
   GstClockTime pts, dts, duration;
+  CopyMetaData data;
 
   pts = GST_BUFFER_PTS (buffer);
   dts = GST_BUFFER_DTS (buffer);
   duration = GST_BUFFER_DURATION (buffer);
 
   outbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
+  data.pay = GST_RTP_OPUS_PAY (basepayload);
+  data.outbuf = outbuf;
+  gst_buffer_foreach_meta (buffer, foreach_metadata, &data);
   outbuf = gst_buffer_append (outbuf, buffer);
 
   GST_BUFFER_PTS (outbuf) = pts;
@@ -123,3 +216,62 @@
   /* Push out */
   return gst_rtp_base_payload_push (basepayload, outbuf);
 }
+
+static GstCaps *
+gst_rtp_opus_pay_getcaps (GstRTPBasePayload * payload,
+    GstPad * pad, GstCaps * filter)
+{
+  GstCaps *caps, *peercaps, *tcaps;
+  GstStructure *s;
+  const gchar *stereo;
+
+  if (pad == GST_RTP_BASE_PAYLOAD_SRCPAD (payload))
+    return
+        GST_RTP_BASE_PAYLOAD_CLASS (gst_rtp_opus_pay_parent_class)->get_caps
+        (payload, pad, filter);
+
+  tcaps = gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload));
+  peercaps = gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload),
+      tcaps);
+  gst_caps_unref (tcaps);
+  if (!peercaps)
+    return
+        GST_RTP_BASE_PAYLOAD_CLASS (gst_rtp_opus_pay_parent_class)->get_caps
+        (payload, pad, filter);
+
+  if (gst_caps_is_empty (peercaps))
+    return peercaps;
+
+  caps = gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SINKPAD (payload));
+
+  s = gst_caps_get_structure (peercaps, 0);
+  stereo = gst_structure_get_string (s, "stereo");
+  if (stereo != NULL) {
+    caps = gst_caps_make_writable (caps);
+
+    if (!strcmp (stereo, "1")) {
+      GstCaps *caps2 = gst_caps_copy (caps);
+
+      gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
+      gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 1, NULL);
+      caps = gst_caps_merge (caps, caps2);
+    } else if (!strcmp (stereo, "0")) {
+      GstCaps *caps2 = gst_caps_copy (caps);
+
+      gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
+      gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 2, NULL);
+      caps = gst_caps_merge (caps, caps2);
+    }
+  }
+  gst_caps_unref (peercaps);
+
+  if (filter) {
+    GstCaps *tmp = gst_caps_intersect_full (caps, filter,
+        GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (caps);
+    caps = tmp;
+  }
+
+  GST_DEBUG_OBJECT (payload, "Returning caps: %" GST_PTR_FORMAT, caps);
+  return caps;
+}
diff --git a/ext/qt/Makefile.am b/ext/qt/Makefile.am
new file mode 100644
index 0000000..059ee7b
--- /dev/null
+++ b/ext/qt/Makefile.am
@@ -0,0 +1,51 @@
+plugin_LTLIBRARIES = libqtsink.la
+
+noinst_HEADERS = \
+	gstqsgtexture.h \
+	gstqtsink.h \
+	qtitem.h
+
+moc_generated = \
+	moc_qtitem.cc \
+	moc_gstqsgtexture.cc
+
+#anything generated by the Qt tools...
+BUILT_SOURCES = $(moc_generated)
+CLEANFILES = $(moc_generated)
+
+nodist_libqtsink_la_SOURCES = $(BUILT_SOURCES)
+
+libqtsink_la_SOURCES = \
+	gstqsgtexture.cc \
+	qtitem.cc \
+	gstqtsink.cc \
+	gstqtsink.h \
+	gstplugin.cc
+
+libqtsink_la_CXXFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(QT_CFLAGS)
+
+libqtsink_la_LIBADD = \
+	$(GST_BASE_LIBS) \
+	$(GST_PLUGINS_BASE_LIBS) \
+	$(QT_LIBS) \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	-lgstvideo-$(GST_API_VERSION)
+
+libqtsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libqtsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+
+$(moc_generated): moc_%.cc: %.h
+	@MOC@ -o $@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $<
+
+ui-%.h: %.ui
+	@UIC@ -o $@ $<
+
+qrc-%.cc: %.qrc
+	@RCC@ -o $@ $<
diff --git a/ext/mythtv/Makefile.in b/ext/qt/Makefile.in
similarity index 68%
copy from ext/mythtv/Makefile.in
copy to ext/qt/Makefile.in
index 055754c..8c8c11e 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/qt/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/qt
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,18 +164,26 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+libqtsink_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
+am_libqtsink_la_OBJECTS = libqtsink_la-gstqsgtexture.lo \
+	libqtsink_la-qtitem.lo libqtsink_la-gstqtsink.lo \
+	libqtsink_la-gstplugin.lo
+am__objects_1 = libqtsink_la-moc_qtitem.lo \
+	libqtsink_la-moc_gstqsgtexture.lo
+am__objects_2 = $(am__objects_1)
+nodist_libqtsink_la_OBJECTS = $(am__objects_2)
+libqtsink_la_OBJECTS = $(am_libqtsink_la_OBJECTS) \
+	$(nodist_libqtsink_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libqtsink_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CXXLD) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) \
+	$(libqtsink_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
@@ -182,6 +200,24 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -200,8 +236,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(libqtsink_la_SOURCES) $(nodist_libqtsink_la_SOURCES)
+DIST_SOURCES = $(libqtsink_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +263,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +281,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +309,6 @@
 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@
@@ -284,7 +321,6 @@
 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@
@@ -292,6 +328,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +356,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +382,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +440,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +464,6 @@
 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@
@@ -430,7 +472,6 @@
 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@
@@ -443,7 +484,6 @@
 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@
@@ -457,6 +497,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +509,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +549,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +585,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +618,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +628,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +664,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +675,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +706,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +732,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +771,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,29 +785,50 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
-
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
-
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
+plugin_LTLIBRARIES = libqtsink.la
 noinst_HEADERS = \
-	gstmythtvsrc.h
+	gstqsgtexture.h \
+	gstqtsink.h \
+	qtitem.h
 
-all: all-am
+moc_generated = \
+	moc_qtitem.cc \
+	moc_gstqsgtexture.cc
+
+
+#anything generated by the Qt tools...
+BUILT_SOURCES = $(moc_generated)
+CLEANFILES = $(moc_generated)
+nodist_libqtsink_la_SOURCES = $(BUILT_SOURCES)
+libqtsink_la_SOURCES = \
+	gstqsgtexture.cc \
+	qtitem.cc \
+	gstqtsink.cc \
+	gstqtsink.h \
+	gstplugin.cc
+
+libqtsink_la_CXXFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) \
+	$(GST_BASE_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(QT_CFLAGS)
+
+libqtsink_la_LIBADD = \
+	$(GST_BASE_LIBS) \
+	$(GST_PLUGINS_BASE_LIBS) \
+	$(QT_LIBS) \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	-lgstvideo-$(GST_API_VERSION)
+
+libqtsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libqtsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .cc .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -756,10 +838,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/qt/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/qt/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -813,8 +894,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libqtsink.la: $(libqtsink_la_OBJECTS) $(libqtsink_la_DEPENDENCIES) $(EXTRA_libqtsink_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libqtsink_la_LINK) -rpath $(plugindir) $(libqtsink_la_OBJECTS) $(libqtsink_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,38 +903,78 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-gstplugin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-gstqsgtexture.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-gstqtsink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-moc_gstqsgtexture.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-moc_qtitem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqtsink_la-qtitem.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 $@ $<
+.cc.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -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) '$<'`
+.cc.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -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 $@ $<
+.cc.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+libqtsink_la-gstqsgtexture.lo: gstqsgtexture.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-gstqsgtexture.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-gstqsgtexture.Tpo -c -o libqtsink_la-gstqsgtexture.lo `test -f 'gstqsgtexture.cc' || echo '$(srcdir)/'`gstqsgtexture.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-gstqsgtexture.Tpo $(DEPDIR)/libqtsink_la-gstqsgtexture.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstqsgtexture.cc' object='libqtsink_la-gstqsgtexture.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-gstqsgtexture.lo `test -f 'gstqsgtexture.cc' || echo '$(srcdir)/'`gstqsgtexture.cc
+
+libqtsink_la-qtitem.lo: qtitem.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-qtitem.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-qtitem.Tpo -c -o libqtsink_la-qtitem.lo `test -f 'qtitem.cc' || echo '$(srcdir)/'`qtitem.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-qtitem.Tpo $(DEPDIR)/libqtsink_la-qtitem.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='qtitem.cc' object='libqtsink_la-qtitem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-qtitem.lo `test -f 'qtitem.cc' || echo '$(srcdir)/'`qtitem.cc
+
+libqtsink_la-gstqtsink.lo: gstqtsink.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-gstqtsink.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-gstqtsink.Tpo -c -o libqtsink_la-gstqtsink.lo `test -f 'gstqtsink.cc' || echo '$(srcdir)/'`gstqtsink.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-gstqtsink.Tpo $(DEPDIR)/libqtsink_la-gstqtsink.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstqtsink.cc' object='libqtsink_la-gstqtsink.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-gstqtsink.lo `test -f 'gstqtsink.cc' || echo '$(srcdir)/'`gstqtsink.cc
+
+libqtsink_la-gstplugin.lo: gstplugin.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-gstplugin.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-gstplugin.Tpo -c -o libqtsink_la-gstplugin.lo `test -f 'gstplugin.cc' || echo '$(srcdir)/'`gstplugin.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-gstplugin.Tpo $(DEPDIR)/libqtsink_la-gstplugin.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstplugin.cc' object='libqtsink_la-gstplugin.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-gstplugin.lo `test -f 'gstplugin.cc' || echo '$(srcdir)/'`gstplugin.cc
+
+libqtsink_la-moc_qtitem.lo: moc_qtitem.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-moc_qtitem.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-moc_qtitem.Tpo -c -o libqtsink_la-moc_qtitem.lo `test -f 'moc_qtitem.cc' || echo '$(srcdir)/'`moc_qtitem.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-moc_qtitem.Tpo $(DEPDIR)/libqtsink_la-moc_qtitem.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='moc_qtitem.cc' object='libqtsink_la-moc_qtitem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-moc_qtitem.lo `test -f 'moc_qtitem.cc' || echo '$(srcdir)/'`moc_qtitem.cc
+
+libqtsink_la-moc_gstqsgtexture.lo: moc_gstqsgtexture.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -MT libqtsink_la-moc_gstqsgtexture.lo -MD -MP -MF $(DEPDIR)/libqtsink_la-moc_gstqsgtexture.Tpo -c -o libqtsink_la-moc_gstqsgtexture.lo `test -f 'moc_gstqsgtexture.cc' || echo '$(srcdir)/'`moc_gstqsgtexture.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libqtsink_la-moc_gstqsgtexture.Tpo $(DEPDIR)/libqtsink_la-moc_gstqsgtexture.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='moc_gstqsgtexture.cc' object='libqtsink_la-moc_gstqsgtexture.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libqtsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqtsink_la_CXXFLAGS) $(CXXFLAGS) -c -o libqtsink_la-moc_gstqsgtexture.lo `test -f 'moc_gstqsgtexture.cc' || echo '$(srcdir)/'`moc_gstqsgtexture.cc
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -944,13 +1065,15 @@
 	  fi; \
 	done
 check-am: all-am
-check: check-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: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -972,6 +1095,7 @@
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -980,6 +1104,7 @@
 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-pluginLTLIBRARIES \
@@ -1051,7 +1176,7 @@
 
 uninstall-am: uninstall-pluginLTLIBRARIES
 
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
@@ -1068,6 +1193,17 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
+
+$(moc_generated): moc_%.cc: %.h
+	@MOC@ -o $@ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(MOC_CPPFLAGS) $<
+
+ui-%.h: %.ui
+	@UIC@ -o $@ $<
+
+qrc-%.cc: %.qrc
+	@RCC@ -o $@ $<
 
 # 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.
diff --git a/ext/qt/gstplugin.cc b/ext/qt/gstplugin.cc
new file mode 100644
index 0000000..70b6310
--- /dev/null
+++ b/ext/qt/gstplugin.cc
@@ -0,0 +1,46 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 "gstqtsink.h"
+#include <QQmlApplicationEngine>
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  if (!gst_element_register (plugin, "qmlglsink",
+          GST_RANK_NONE, GST_TYPE_QT_SINK)) {
+    return FALSE;
+  }
+  /* this means the plugin must be loaded before the qml engine is loaded */
+  qmlRegisterType<QtGLVideoItem> ("org.freedesktop.gstreamer.GLVideoItem", 1, 0, "GstGLVideoItem");
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    qt,
+    "Qt sink",
+    plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
new file mode 100644
index 0000000..12810fa
--- /dev/null
+++ b/ext/qt/gstqsgtexture.cc
@@ -0,0 +1,173 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 <gst/video/video.h>
+#include <gst/gl/gl.h>
+#include "gstqsgtexture.h"
+
+#define GST_CAT_DEFAULT gst_qsg_texture_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+GstQSGTexture::GstQSGTexture ()
+{
+  static volatile gsize _debug;
+
+  initializeOpenGLFunctions();
+
+  if (g_once_init_enter (&_debug)) {
+    GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtqsgtexture", 0,
+        "Qt Scenegraph Texture");
+    g_once_init_leave (&_debug, 1);
+  }
+
+  gst_video_info_init (&this->v_info);
+  this->buffer_ = NULL;
+  this->sync_buffer_ = gst_buffer_new ();
+}
+
+GstQSGTexture::~GstQSGTexture ()
+{
+  gst_buffer_replace (&this->buffer_, NULL);
+  gst_buffer_replace (&this->sync_buffer_, NULL);
+}
+
+/* only called from the streaming thread with scene graph thread blocked */
+void
+GstQSGTexture::setCaps (GstCaps * caps)
+{
+  GST_LOG ("%p setCaps %" GST_PTR_FORMAT, this, caps);
+
+  gst_video_info_from_caps (&this->v_info, caps);
+}
+
+/* only called from the streaming thread with scene graph thread blocked */
+gboolean
+GstQSGTexture::setBuffer (GstBuffer * buffer)
+{
+  GST_LOG ("%p setBuffer %" GST_PTR_FORMAT, this, buffer);
+  /* FIXME: update more state here */
+  if (!gst_buffer_replace (&this->buffer_, buffer))
+    return FALSE;
+
+  this->qt_context_ = gst_gl_context_get_current ();
+
+  return TRUE;
+}
+
+/* only called from qt's scene graph render thread */
+void
+GstQSGTexture::bind ()
+{
+  const GstGLFuncs *gl;
+  GstGLContext *context;
+  GstGLSyncMeta *sync_meta;
+  GstMemory *mem;
+  guint tex_id;
+
+  if (!this->buffer_)
+    return;
+  if (GST_VIDEO_INFO_FORMAT (&this->v_info) == GST_VIDEO_FORMAT_UNKNOWN)
+    return;
+
+  this->mem_ = gst_buffer_peek_memory (this->buffer_, 0);
+  if (!this->mem_)
+    return;
+
+  g_assert (this->qt_context_);
+  gl = this->qt_context_->gl_vtable;
+
+  /* FIXME: should really lock the memory to prevent write access */
+  if (!gst_video_frame_map (&this->v_frame, &this->v_info, this->buffer_,
+        (GstMapFlags) (GST_MAP_READ | GST_MAP_GL))) {
+    g_assert_not_reached ();
+    return;
+  }
+
+  mem = gst_buffer_peek_memory (this->buffer_, 0);
+  g_assert (gst_is_gl_memory (mem));
+
+  context = ((GstGLBaseBuffer *)mem)->context;
+
+  sync_meta = gst_buffer_get_gl_sync_meta (this->sync_buffer_);
+  if (!sync_meta)
+    sync_meta = gst_buffer_add_gl_sync_meta (context, this->sync_buffer_);
+
+  gst_gl_sync_meta_set_sync_point (sync_meta, context);
+
+  gst_gl_sync_meta_wait (sync_meta, this->qt_context_);
+
+  tex_id = *(guint *) this->v_frame.data[0];
+  GST_LOG ("%p binding Qt texture %u", this, tex_id);
+
+  gl->BindTexture (GL_TEXTURE_2D, tex_id);
+
+  gst_video_frame_unmap (&this->v_frame);
+}
+
+/* can be called from any thread */
+int
+GstQSGTexture::textureId () const
+{
+  int tex_id = 0;
+
+  if (this->buffer_) {
+    GstMemory *mem = gst_buffer_peek_memory (this->buffer_, 0);
+
+    tex_id = ((GstGLMemory *) mem)->tex_id;
+  }
+
+  GST_LOG ("%p get texture id %u", this, tex_id);
+
+  return tex_id;
+}
+
+/* can be called from any thread */
+QSize
+GstQSGTexture::textureSize () const
+{
+  if (GST_VIDEO_INFO_FORMAT (&this->v_info) == GST_VIDEO_FORMAT_UNKNOWN)
+    return QSize (0, 0);
+
+  GST_TRACE ("%p get texture size %ux%u", this, this->v_info.width,
+      this->v_info.height);
+
+  return QSize (this->v_info.width, this->v_info.height);
+}
+
+/* can be called from any thread */
+bool
+GstQSGTexture::hasAlphaChannel () const
+{
+  /* FIXME: support RGB textures */
+  return true;
+}
+
+/* can be called from any thread */
+bool
+GstQSGTexture::hasMipmaps () const
+{
+  return false;
+}
diff --git a/ext/qt/gstqsgtexture.h b/ext/qt/gstqsgtexture.h
new file mode 100644
index 0000000..bf8f03f
--- /dev/null
+++ b/ext/qt/gstqsgtexture.h
@@ -0,0 +1,56 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_QSG_TEXTURE_H__
+#define __GST_QSG_TEXTURE_H__
+
+#include <gst/gst.h>
+#include <QSGTexture>
+#include <QOpenGLFunctions>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+
+class GstQSGTexture : public QSGTexture, protected QOpenGLFunctions
+{
+    Q_OBJECT
+public:
+    GstQSGTexture ();
+    ~GstQSGTexture ();
+
+    void setCaps (GstCaps * caps);
+    gboolean setBuffer (GstBuffer * buffer);
+
+    /* QSGTexture */
+    void bind ();
+    int textureId () const;
+    QSize textureSize () const;
+    bool hasAlphaChannel () const;
+    bool hasMipmaps () const;
+
+private:
+    GstBuffer * buffer_;
+    GstBuffer * sync_buffer_;
+    GstGLContext * qt_context_;
+    GstMemory * mem_;
+    GstVideoInfo v_info;
+    GstVideoFrame v_frame;
+};
+
+#endif /* __GST_QSG_TEXTURE_H__ */
diff --git a/ext/qt/gstqtsink.cc b/ext/qt/gstqtsink.cc
new file mode 100644
index 0000000..9ff13b0
--- /dev/null
+++ b/ext/qt/gstqtsink.cc
@@ -0,0 +1,500 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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:gstqtsink
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstqtsink.h"
+#include <QGuiApplication>
+
+#define GST_CAT_DEFAULT gst_debug_qt_gl_sink
+GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
+
+static void gst_qt_sink_finalize (GObject * object);
+static void gst_qt_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_qt_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static gboolean gst_qt_sink_stop (GstBaseSink * bsink);
+
+static gboolean gst_qt_sink_query (GstBaseSink * bsink, GstQuery * query);
+
+static GstStateChangeReturn
+gst_qt_sink_change_state (GstElement * element, GstStateChange transition);
+
+static void gst_qt_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end);
+static gboolean gst_qt_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
+static GstFlowReturn gst_qt_sink_show_frame (GstVideoSink * bsink,
+    GstBuffer * buf);
+static gboolean gst_qt_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+
+static GstStaticPadTemplate gst_qt_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")));
+
+#define DEFAULT_FORCE_ASPECT_RATIO  TRUE
+#define DEFAULT_PAR_N               0
+#define DEFAULT_PAR_D               1
+
+enum
+{
+  ARG_0,
+  PROP_WIDGET,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_PIXEL_ASPECT_RATIO,
+};
+
+enum
+{
+  SIGNAL_0,
+  LAST_SIGNAL
+};
+
+#define gst_qt_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstQtSink, gst_qt_sink,
+    GST_TYPE_VIDEO_SINK, GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT,
+        "qtsink", 0, "Qt Video Sink"));
+
+static void
+gst_qt_sink_class_init (GstQtSinkClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+  GstBaseSinkClass *gstbasesink_class;
+  GstVideoSinkClass *gstvideosink_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+  gstbasesink_class = (GstBaseSinkClass *) klass;
+  gstvideosink_class = (GstVideoSinkClass *) klass;
+
+  gobject_class->set_property = gst_qt_sink_set_property;
+  gobject_class->get_property = gst_qt_sink_get_property;
+
+  gst_element_class_set_metadata (gstelement_class, "Qt Video Sink",
+      "Sink/Video", "A video sink the renders to a QQuickItem",
+      "Matthew Waters <matthew@centricular.com>");
+
+  g_object_class_install_property (gobject_class, PROP_WIDGET,
+      g_param_spec_pointer ("widget", "QQuickItem",
+          "The QQuickItem to place in the object heirachy",
+          (GParamFlags) (G_PARAM_READWRITE | 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",
+          "When enabled, scaling will respect original aspect ratio",
+          DEFAULT_FORCE_ASPECT_RATIO,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
+      gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
+          "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D,
+          G_MAXINT, 1, 1, 1,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_qt_sink_template));
+
+  gobject_class->finalize = gst_qt_sink_finalize;
+
+  gstelement_class->change_state = gst_qt_sink_change_state;
+  gstbasesink_class->query = gst_qt_sink_query;
+  gstbasesink_class->set_caps = gst_qt_sink_set_caps;
+  gstbasesink_class->get_times = gst_qt_sink_get_times;
+  gstbasesink_class->propose_allocation = gst_qt_sink_propose_allocation;
+  gstbasesink_class->stop = gst_qt_sink_stop;
+
+  gstvideosink_class->show_frame = gst_qt_sink_show_frame;
+}
+
+static void
+gst_qt_sink_init (GstQtSink * qt_sink)
+{
+}
+
+static void
+gst_qt_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (object);
+
+  switch (prop_id) {
+    case PROP_WIDGET:
+      qt_sink->widget = static_cast<QtGLVideoItem *> (g_value_get_pointer (value));
+      break;
+    case PROP_FORCE_ASPECT_RATIO:
+      g_return_if_fail (qt_sink->widget);
+      qt_sink->widget->setForceAspectRatio (g_value_get_boolean (value));
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      g_return_if_fail (qt_sink->widget);
+      qt_sink->widget->setDAR (gst_value_get_fraction_numerator (value),
+          gst_value_get_fraction_denominator (value));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+_reset (GstQtSink * qt_sink)
+{
+  if (qt_sink->display) {
+    gst_object_unref (qt_sink->display);
+    qt_sink->display = NULL;
+  }
+
+  if (qt_sink->context) {
+    gst_object_unref (qt_sink->context);
+    qt_sink->context = NULL;
+  }
+
+  if (qt_sink->qt_context) {
+    gst_object_unref (qt_sink->qt_context);
+    qt_sink->qt_context = NULL;
+  }
+}
+
+static void
+gst_qt_sink_finalize (GObject * object)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (object);
+
+  _reset (qt_sink);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_qt_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (object);
+
+  switch (prop_id) {
+    case PROP_WIDGET:
+      g_value_set_pointer (value, qt_sink->widget);
+      break;
+    case PROP_FORCE_ASPECT_RATIO:
+      if (qt_sink->widget)
+        g_value_set_boolean (value, qt_sink->widget->getForceAspectRatio ());
+      else
+        g_value_set_boolean (value, DEFAULT_FORCE_ASPECT_RATIO);
+      break;
+    case PROP_PIXEL_ASPECT_RATIO:
+      if (qt_sink->widget) {
+        gint num, den;
+        qt_sink->widget->getDAR (&num, &den);
+        gst_value_set_fraction (value, num, den);
+      } else {
+        gst_value_set_fraction (value, DEFAULT_PAR_N, DEFAULT_PAR_D);
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_qt_sink_query (GstBaseSink * bsink, GstQuery * query)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (bsink);
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+      gboolean ret;
+
+      ret = gst_gl_handle_context_query ((GstElement *) qt_sink, query,
+          &qt_sink->display, &qt_sink->qt_context);
+
+      if (qt_sink->display)
+        gst_gl_display_filter_gl_api (qt_sink->display, gst_gl_context_get_gl_api (qt_sink->qt_context));
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, qt_sink->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = qt_sink->context != NULL;
+      }
+      GST_LOG_OBJECT (qt_sink, "context query of type %s %i", context_type,
+          ret);
+
+      if (ret)
+        return ret;
+    }
+    default:
+      res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
+      break;
+  }
+
+  return res;
+}
+
+static gboolean
+gst_qt_sink_stop (GstBaseSink * bsink)
+{
+  return TRUE;
+}
+
+static GstStateChangeReturn
+gst_qt_sink_change_state (GstElement * element, GstStateChange transition)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (element);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  QGuiApplication *app;
+
+  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)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
+      if (!app) {
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
+            ("%s", "Failed to connect to Qt"),
+            ("%s", "Could not retrieve QGuiApplication instance"));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+
+      if (!qt_sink->widget) {
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
+            ("%s", "Required property \'widget\' not set"),
+            (NULL));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+
+      if (!qt_item_init_winsys (qt_sink->widget)) {
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
+            ("%s", "Could not initialize window system"),
+            (NULL));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+
+      qt_sink->display = qt_item_get_display (qt_sink->widget);
+      qt_sink->context = qt_item_get_context (qt_sink->widget);
+      qt_sink->qt_context = qt_item_get_qt_context (qt_sink->widget);
+
+      if (!qt_sink->display || !qt_sink->context || !qt_sink->qt_context) {
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
+            ("%s", "Could not retrieve window system OpenGL configuration"),
+            (NULL));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+      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_PLAYING_TO_PAUSED:
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      qt_item_set_buffer (qt_sink->widget, NULL);
+      break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_qt_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end)
+{
+  GstQtSink *qt_sink;
+
+  qt_sink = GST_QT_SINK (bsink);
+
+  if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+    *start = GST_BUFFER_TIMESTAMP (buf);
+    if (GST_BUFFER_DURATION_IS_VALID (buf))
+      *end = *start + GST_BUFFER_DURATION (buf);
+    else {
+      if (GST_VIDEO_INFO_FPS_N (&qt_sink->v_info) > 0) {
+        *end = *start +
+            gst_util_uint64_scale_int (GST_SECOND,
+            GST_VIDEO_INFO_FPS_D (&qt_sink->v_info),
+            GST_VIDEO_INFO_FPS_N (&qt_sink->v_info));
+      }
+    }
+  }
+}
+
+gboolean
+gst_qt_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (bsink);
+
+  GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps);
+
+  if (!gst_video_info_from_caps (&qt_sink->v_info, caps))
+    return FALSE;
+
+  if (!qt_item_set_caps (qt_sink->widget, caps))
+    return FALSE;
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_qt_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
+{
+  GstQtSink *qt_sink;
+
+  GST_TRACE ("rendering buffer:%p", buf);
+
+  qt_sink = GST_QT_SINK (vsink);
+
+  qt_item_set_buffer (qt_sink->widget, buf);
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_qt_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
+{
+  GstQtSink *qt_sink = GST_QT_SINK (bsink);
+  GstBufferPool *pool;
+  GstStructure *config;
+  GstCaps *caps;
+  guint size;
+  gboolean need_pool;
+
+  if (!qt_sink->display || !qt_sink->context)
+    return FALSE;
+
+  gst_query_parse_allocation (query, &caps, &need_pool);
+
+  if (caps == NULL)
+    goto no_caps;
+
+  if ((pool = qt_sink->pool))
+    gst_object_ref (pool);
+
+  if (pool != NULL) {
+    GstCaps *pcaps;
+
+    /* we had a pool, check caps */
+    GST_DEBUG_OBJECT (qt_sink, "check existing pool caps");
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
+
+    if (!gst_caps_is_equal (caps, pcaps)) {
+      GST_DEBUG_OBJECT (qt_sink, "pool has different caps");
+      /* different caps, we can't use this pool */
+      gst_object_unref (pool);
+      pool = NULL;
+    }
+    gst_structure_free (config);
+  }
+
+  if (pool == NULL && need_pool) {
+    GstVideoInfo info;
+
+    if (!gst_video_info_from_caps (&info, caps))
+      goto invalid_caps;
+
+    GST_DEBUG_OBJECT (qt_sink, "create new pool");
+    pool = gst_gl_buffer_pool_new (qt_sink->context);
+
+    /* the normal size of a frame */
+    size = info.size;
+
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+    if (!gst_buffer_pool_set_config (pool, config))
+      goto config_failed;
+  }
+  /* we need at least 2 buffer because we hold on to the last one */
+  if (pool) {
+    gst_query_add_allocation_pool (query, pool, size, 2, 0);
+    gst_object_unref (pool);
+  }
+
+  /* we also support various metadata */
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
+
+  if (qt_sink->context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
+
+  return TRUE;
+
+  /* ERRORS */
+no_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "no caps specified");
+    return FALSE;
+  }
+invalid_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
+    return FALSE;
+  }
+config_failed:
+  {
+    GST_DEBUG_OBJECT (bsink, "failed setting config");
+    return FALSE;
+  }
+}
diff --git a/ext/qt/gstqtsink.h b/ext/qt/gstqtsink.h
new file mode 100644
index 0000000..9a1cfbe
--- /dev/null
+++ b/ext/qt/gstqtsink.h
@@ -0,0 +1,81 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_QT_SINK_H__
+#define __GST_QT_SINK_H__
+
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+#include <gst/video/video.h>
+#include <gst/gl/gl.h>
+#include "qtitem.h"
+
+typedef struct _GstQtSink GstQtSink;
+typedef struct _GstQtSinkClass GstQtSinkClass;
+typedef struct _GstQtSinkPrivate GstQtSinkPrivate;
+
+G_BEGIN_DECLS
+
+GType gst_qt_sink_get_type (void);
+#define GST_TYPE_QT_SINK            (gst_qt_sink_get_type())
+#define GST_QT_SINK(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QT_SINK,GstQtSink))
+#define GST_QT_SINK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QT_SINK,GstQtSinkClass))
+#define GST_IS_QT_SINK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QT_SINK))
+#define GST_IS_QT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QT_SINK))
+#define GST_QT_SINK_CAST(obj)       ((GstQtSink*)(obj))
+
+/**
+ * GstQtSink:
+ *
+ * Opaque #GstQtSink object
+ */
+struct _GstQtSink
+{
+  /* <private> */
+  GstVideoSink          parent;
+
+  QtGLVideoItem        *widget;
+
+  GstVideoInfo          v_info;
+  GstBufferPool        *pool;
+
+  GstGLDisplay         *display;
+  GstGLContext         *context;
+  GstGLContext         *qt_context;
+
+  GstQtSinkPrivate  *priv;
+};
+
+/**
+ * GstQtSinkClass:
+ *
+ * The #GstQtSinkClass struct only contains private data
+ */
+struct _GstQtSinkClass
+{
+  /* <private> */
+  GstVideoSinkClass object_class;
+};
+
+GstQtSink *    gst_qt_sink_new (void);
+
+G_END_DECLS
+
+#endif /* __GST_QT_SINK_H__ */
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
new file mode 100644
index 0000000..7c53979
--- /dev/null
+++ b/ext/qt/qtitem.cc
@@ -0,0 +1,494 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 <gst/video/video.h>
+#include <QGuiApplication>
+#include <QQuickWindow>
+#include <QSGSimpleTextureNode>
+#include "qtitem.h"
+#include "gstqsgtexture.h"
+
+#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (HAVE_QT_X11)
+#include <QX11Info>
+#include <gst/gl/x11/gstgldisplay_x11.h>
+#include <gst/gl/x11/gstglcontext_glx.h>
+#endif
+
+#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_WAYLAND)
+#include <gst/gl/wayland/gstgldisplay_wayland.h>
+#endif
+
+/**
+ * SECTION:gtkgstglwidget
+ * @short_description: a #GtkGLArea that renders GStreamer video #GstBuffers
+ * @see_also: #GtkGLArea, #GstBuffer
+ *
+ * #QtGLVideoItem is an #GtkWidget that renders GStreamer video buffers.
+ */
+
+#define GST_CAT_DEFAULT qt_item_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+#define GTK_GST_GL_WIDGET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+    GTK_TYPE_GST_GL_WIDGET, QtGLVideoItemPrivate))
+
+#define DEFAULT_FORCE_ASPECT_RATIO  TRUE
+#define DEFAULT_PAR_N               0
+#define DEFAULT_PAR_D               1
+
+enum
+{
+  PROP_0,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_PIXEL_ASPECT_RATIO,
+};
+
+struct _QtGLVideoItemPrivate
+{
+  GMutex lock;
+
+  /* properties */
+  gboolean force_aspect_ratio;
+  gint par_n, par_d;
+
+  gint display_width;
+  gint display_height;
+
+  gboolean negotiated;
+  GstBuffer *buffer;
+  GstCaps *caps;
+  GstVideoInfo v_info;
+
+  gboolean initted;
+  GstGLDisplay *display;
+  QOpenGLContext *qt_context;
+  GstGLContext *other_context;
+  GstGLContext *context;
+};
+
+QtGLVideoItem::QtGLVideoItem()
+{
+  QGuiApplication *app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
+  static volatile gsize _debug;
+
+  g_assert (app != NULL);
+
+  if (g_once_init_enter (&_debug)) {
+    GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
+    g_once_init_leave (&_debug, 1);
+  }
+
+  this->setFlag (QQuickItem::ItemHasContents, true);
+
+  this->priv = g_new0 (QtGLVideoItemPrivate, 1);
+
+  this->priv->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
+  this->priv->par_n = DEFAULT_PAR_N;
+  this->priv->par_d = DEFAULT_PAR_D;
+
+  g_mutex_init (&this->priv->lock);
+
+#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
+  if (QString::fromUtf8 ("xcb") == app->platformName())
+    this->priv->display = (GstGLDisplay *)
+        gst_gl_display_x11_new_with_display (QX11Info::display ());
+#endif
+
+  if (!this->priv->display)
+    this->priv->display = gst_gl_display_new ();
+
+  connect(this, SIGNAL(windowChanged(QQuickWindow*)), this,
+          SLOT(handleWindowChanged(QQuickWindow*)));
+
+  GST_DEBUG ("%p init Qt Video Item", this);
+}
+
+QtGLVideoItem::~QtGLVideoItem()
+{
+  g_mutex_clear (&this->priv->lock);
+
+  g_free (this->priv);
+  this->priv = NULL;
+}
+
+void
+QtGLVideoItem::setDAR(gint num, gint den)
+{
+  this->priv->par_n = num;
+  this->priv->par_d = den;
+}
+
+void
+QtGLVideoItem::getDAR(gint * num, gint * den)
+{
+  if (num)
+    *num = this->priv->par_n;
+  if (den)
+    *den = this->priv->par_d;
+}
+
+void
+QtGLVideoItem::setForceAspectRatio(bool far)
+{
+  this->priv->force_aspect_ratio = far;
+}
+
+bool
+QtGLVideoItem::getForceAspectRatio()
+{
+  return this->priv->force_aspect_ratio;
+}
+
+QSGNode *
+QtGLVideoItem::updatePaintNode(QSGNode * oldNode,
+    UpdatePaintNodeData * updatePaintNodeData)
+{
+  QSGSimpleTextureNode *texNode = static_cast<QSGSimpleTextureNode *> (oldNode);
+  GstVideoRectangle src, dst, result;
+  GstQSGTexture *tex;
+
+  g_mutex_lock (&this->priv->lock);
+  gst_gl_context_activate (this->priv->other_context, TRUE);
+
+  GST_TRACE ("%p updatePaintNode", this);
+
+  if (!this->priv->caps) {
+    g_mutex_unlock (&this->priv->lock);
+    return NULL;
+  }
+
+  if (!texNode) {
+    texNode = new QSGSimpleTextureNode ();
+    texNode->setOwnsTexture (true);
+  } else {
+    tex = static_cast<GstQSGTexture *> (texNode->texture());
+  }
+
+  tex = new GstQSGTexture ();
+  tex->setCaps (this->priv->caps);
+  tex->setBuffer (this->priv->buffer);
+  texNode->setTexture (tex);
+
+  if (this->priv->force_aspect_ratio) {
+    src.w = this->priv->display_width;
+    src.h = this->priv->display_height;
+
+    dst.x = boundingRect().x();
+    dst.y = boundingRect().y();
+    dst.w = boundingRect().width();
+    dst.h = boundingRect().height();
+
+    gst_video_sink_center_rect (src, dst, &result, TRUE);
+  } else {
+    result.x = boundingRect().x();
+    result.y = boundingRect().y();
+    result.w = boundingRect().width();
+    result.h = boundingRect().height();
+  }
+
+  texNode->setRect (QRectF (result.x, result.y, result.w, result.h));
+
+  gst_gl_context_activate (this->priv->other_context, FALSE);
+  g_mutex_unlock (&this->priv->lock);
+
+  return texNode;
+}
+
+static void
+_reset (QtGLVideoItem * qt_item)
+{
+  gst_buffer_replace (&qt_item->priv->buffer, NULL);
+
+  gst_caps_replace (&qt_item->priv->caps, NULL);
+
+  qt_item->priv->negotiated = FALSE;
+  qt_item->priv->initted = FALSE;
+}
+
+void
+qt_item_set_buffer (QtGLVideoItem * widget, GstBuffer * buffer)
+{
+  g_return_if_fail (widget != NULL);
+  g_return_if_fail (widget->priv->negotiated);
+
+  g_mutex_lock (&widget->priv->lock);
+
+  gst_buffer_replace (&widget->priv->buffer, buffer);
+
+  QMetaObject::invokeMethod(widget, "update", Qt::QueuedConnection);
+
+  g_mutex_unlock (&widget->priv->lock);
+}
+
+void
+QtGLVideoItem::onSceneGraphInitialized ()
+{
+  GstGLPlatform platform;
+  GstGLAPI gl_api;
+  guintptr gl_handle;
+
+  GST_DEBUG ("scene graph initialization with Qt GL context %p",
+      this->window()->openglContext ());
+
+  if (this->priv->qt_context == this->window()->openglContext ())
+    return;
+
+  this->priv->qt_context = this->window()->openglContext ();
+  if (this->priv->qt_context == NULL) {
+    g_assert_not_reached ();
+    return;
+  }
+
+#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
+  if (GST_IS_GL_DISPLAY_X11 (this->priv->display)) {
+    platform = GST_GL_PLATFORM_GLX;
+    gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
+    gl_handle = gst_gl_context_get_current_gl_context (platform);
+    if (gl_handle)
+      this->priv->other_context =
+          gst_gl_context_new_wrapped (this->priv->display, gl_handle,
+          platform, gl_api);
+  }
+#endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && defined (HAVE_QT_WAYLAND)
+  if (GST_IS_GL_DISPLAY_WAYLAND (this->priv->display)) {
+    platform = GST_GL_PLATFORM_EGL;
+    gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
+    gl_handle = gst_gl_context_get_current_gl_context (platform);
+    if (gl_handle)
+      this->priv->other_context =
+          gst_gl_context_new_wrapped (this->priv->display, gl_handle,
+          platform, gl_api);
+  }
+#endif
+
+  (void) platform;
+  (void) gl_api;
+  (void) gl_handle;
+
+  if (this->priv->other_context) {
+    GError *error = NULL;
+
+    gst_gl_context_activate (this->priv->other_context, TRUE);
+    if (!gst_gl_context_fill_info (this->priv->other_context, &error)) {
+      GST_ERROR ("%p failed to retrieve qt context info: %s", this, error->message);
+      g_object_unref (this->priv->other_context);
+      this->priv->other_context = NULL;
+    } else {
+      gst_gl_display_filter_gl_api (this->priv->display, gst_gl_context_get_gl_api (this->priv->other_context));
+      gst_gl_context_activate (this->priv->other_context, FALSE);
+    }
+  }
+
+  GST_DEBUG ("%p created wrapped GL context %" GST_PTR_FORMAT, this,
+      this->priv->other_context);
+}
+
+void
+QtGLVideoItem::onSceneGraphInvalidated ()
+{
+  GST_FIXME ("%p scene graph invalidated", this);
+}
+
+gboolean
+qt_item_init_winsys (QtGLVideoItem * widget)
+{
+  g_return_val_if_fail (widget != NULL, FALSE);
+
+  g_mutex_lock (&widget->priv->lock);
+
+  if (widget->priv->display && widget->priv->qt_context
+      && widget->priv->other_context && widget->priv->context) {
+    /* already have the necessary state */
+    g_mutex_unlock (&widget->priv->lock);
+    return TRUE;
+  }
+
+  if (!GST_IS_GL_DISPLAY (widget->priv->display)) {
+    GST_ERROR ("%p failed to retrieve display connection %" GST_PTR_FORMAT,
+        widget, widget->priv->display);
+    g_mutex_unlock (&widget->priv->lock);
+    return FALSE;
+  }
+
+  if (!GST_GL_IS_CONTEXT (widget->priv->other_context)) {
+    GST_ERROR ("%p failed to retrieve wrapped context %" GST_PTR_FORMAT, widget,
+        widget->priv->other_context);
+    g_mutex_unlock (&widget->priv->lock);
+    return FALSE;
+  }
+
+  widget->priv->context = gst_gl_context_new (widget->priv->display);
+
+  if (!widget->priv->context) {
+    g_mutex_unlock (&widget->priv->lock);
+    return FALSE;
+  }
+
+  gst_gl_context_create (widget->priv->context, widget->priv->other_context,
+      NULL);
+
+  g_mutex_unlock (&widget->priv->lock);
+  return TRUE;
+}
+
+void
+QtGLVideoItem::handleWindowChanged(QQuickWindow *win)
+{
+  if (win) {
+    connect(win, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection);
+    connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(onSceneGraphInvalidated()), Qt::DirectConnection);
+  } else {
+    this->priv->qt_context = NULL;
+  }
+}
+
+static gboolean
+_calculate_par (QtGLVideoItem * widget, GstVideoInfo * info)
+{
+  gboolean ok;
+  gint width, height;
+  gint par_n, par_d;
+  gint display_par_n, display_par_d;
+  guint display_ratio_num, display_ratio_den;
+
+  width = GST_VIDEO_INFO_WIDTH (info);
+  height = GST_VIDEO_INFO_HEIGHT (info);
+
+  par_n = GST_VIDEO_INFO_PAR_N (info);
+  par_d = GST_VIDEO_INFO_PAR_D (info);
+
+  if (!par_n)
+    par_n = 1;
+
+  /* get display's PAR */
+  if (widget->priv->par_n != 0 && widget->priv->par_d != 0) {
+    display_par_n = widget->priv->par_n;
+    display_par_d = widget->priv->par_d;
+  } else {
+    display_par_n = 1;
+    display_par_d = 1;
+  }
+
+  ok = gst_video_calculate_display_ratio (&display_ratio_num,
+      &display_ratio_den, width, height, par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (!ok)
+    return FALSE;
+
+  GST_LOG ("PAR: %u/%u DAR:%u/%u", par_n, par_d, display_par_n, display_par_d);
+
+  if (height % display_ratio_den == 0) {
+    GST_DEBUG ("keeping video height");
+    widget->priv->display_width = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    widget->priv->display_height = height;
+  } else if (width % display_ratio_num == 0) {
+    GST_DEBUG ("keeping video width");
+    widget->priv->display_width = width;
+    widget->priv->display_height = (guint)
+        gst_util_uint64_scale_int (width, display_ratio_den, display_ratio_num);
+  } else {
+    GST_DEBUG ("approximating while keeping video height");
+    widget->priv->display_width = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    widget->priv->display_height = height;
+  }
+  GST_DEBUG ("scaling to %dx%d", widget->priv->display_width,
+      widget->priv->display_height);
+
+  return TRUE;
+}
+
+gboolean
+qt_item_set_caps (QtGLVideoItem * widget, GstCaps * caps)
+{
+  GstVideoInfo v_info;
+
+  g_return_val_if_fail (widget != NULL, FALSE);
+  g_return_val_if_fail (GST_IS_CAPS (caps), FALSE);
+  g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE);
+
+  if (widget->priv->caps && gst_caps_is_equal_fixed (widget->priv->caps, caps))
+    return TRUE;
+
+  if (!gst_video_info_from_caps (&v_info, caps))
+    return FALSE;
+
+  g_mutex_lock (&widget->priv->lock);
+
+  _reset (widget);
+
+  gst_caps_replace (&widget->priv->caps, caps);
+
+  if (!_calculate_par (widget, &v_info)) {
+    g_mutex_unlock (&widget->priv->lock);
+    return FALSE;
+  }
+
+  widget->priv->v_info = v_info;
+  widget->priv->negotiated = TRUE;
+
+  g_mutex_unlock (&widget->priv->lock);
+
+  return TRUE;
+}
+
+GstGLContext *
+qt_item_get_qt_context (QtGLVideoItem * qt_item)
+{
+  g_return_val_if_fail (qt_item != NULL, NULL);
+
+  if (!qt_item->priv->other_context)
+    return NULL;
+
+  return (GstGLContext *) gst_object_ref (qt_item->priv->other_context);
+}
+
+GstGLContext *
+qt_item_get_context (QtGLVideoItem * qt_item)
+{
+  g_return_val_if_fail (qt_item != NULL, NULL);
+
+  if (!qt_item->priv->context)
+    return NULL;
+
+  return (GstGLContext *) gst_object_ref (qt_item->priv->context);
+}
+
+GstGLDisplay *
+qt_item_get_display (QtGLVideoItem * qt_item)
+{
+  g_return_val_if_fail (qt_item != NULL, NULL);
+
+  if (!qt_item->priv->display)
+    return NULL;
+
+  return (GstGLDisplay *) gst_object_ref (qt_item->priv->display);
+}
diff --git a/ext/qt/qtitem.h b/ext/qt/qtitem.h
new file mode 100644
index 0000000..afd2869
--- /dev/null
+++ b/ext/qt/qtitem.h
@@ -0,0 +1,72 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 __QT_ITEM_H__
+#define __QT_ITEM_H__
+
+#include <gst/gst.h>
+#include <gst/gl/gl.h>
+#include <QQuickItem>
+#include <QOpenGLContext>
+#include <QOpenGLFunctions>
+
+typedef struct _QtGLVideoItemPrivate QtGLVideoItemPrivate;
+
+class QtGLVideoItem : public QQuickItem, protected QOpenGLFunctions
+{
+    Q_OBJECT
+public:
+    QtGLVideoItem();
+    ~QtGLVideoItem();
+
+    void setDAR(gint, gint);
+    void getDAR(gint *, gint *);
+    void setForceAspectRatio(bool);
+    bool getForceAspectRatio();
+
+    /* private for C interface ... */
+    QtGLVideoItemPrivate *priv;
+
+private Q_SLOTS:
+    void handleWindowChanged(QQuickWindow * win);
+    void onSceneGraphInitialized();
+    void onSceneGraphInvalidated();
+
+protected:
+    QSGNode * updatePaintNode (QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData);
+
+private:
+    void setViewportSize(const QSize &size);
+    void shareContext();
+
+    QSize m_viewportSize;
+};
+
+extern "C"
+{
+void            qt_item_set_buffer (QtGLVideoItem * widget, GstBuffer * buffer);
+gboolean        qt_item_set_caps (QtGLVideoItem * widget, GstCaps * caps);
+gboolean        qt_item_init_winsys (QtGLVideoItem * widget);
+GstGLContext *  qt_item_get_qt_context (QtGLVideoItem * qt_item);
+GstGLContext *  qt_item_get_context (QtGLVideoItem * qt_item);
+GstGLDisplay *  qt_item_get_display (QtGLVideoItem * qt_item);
+}
+
+#endif /* __QT_ITEM_H__ */
diff --git a/ext/resindvd/Makefile.in b/ext/resindvd/Makefile.in
index 2d9f4af..b57f80d 100644
--- a/ext/resindvd/Makefile.in
+++ b/ext/resindvd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/resindvd
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -237,6 +247,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -254,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -280,8 +293,6 @@
 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@
@@ -294,7 +305,6 @@
 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@
@@ -302,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -328,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -351,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -411,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -431,7 +448,6 @@
 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@
@@ -440,7 +456,6 @@
 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@
@@ -453,7 +468,6 @@
 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@
@@ -467,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -478,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -516,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -551,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -580,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -587,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -616,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -626,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -656,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -683,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -721,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -784,7 +819,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/resindvd/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/resindvd/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1157,6 +1191,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c
index fcf9d75..48002ba 100644
--- a/ext/resindvd/gstmpegdemux.c
+++ b/ext/resindvd/gstmpegdemux.c
@@ -942,22 +942,20 @@
       demux->bytes_since_scr = 0;
 
       GST_DEBUG_OBJECT (demux,
-          "demux: received new segment start %" G_GINT64_FORMAT " stop %"
-          G_GINT64_FORMAT " time %" G_GINT64_FORMAT
-          " base %" G_GINT64_FORMAT, start, stop, time, base);
+          "demux: received new segment %" GST_SEGMENT_FORMAT,
+          &demux->sink_segment);
 #if 0
       g_print ("demux: received new segment start %" G_GINT64_FORMAT " stop %"
           G_GINT64_FORMAT " time %" G_GINT64_FORMAT
           " base %" G_GINT64_FORMAT "\n", start, stop, time, base);
 #endif
-      position = base - start;
-      adjust = position + SCR_MUNGE;
+      adjust = base - start + SCR_MUNGE;
       if (adjust >= 0)
         demux->scr_adjust = GSTTIME_TO_MPEGTIME (adjust);
       else
         demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust);
 
-      start = SCR_MUNGE;
+      position = start = SCR_MUNGE;
       base = 0;
 
       if (stop != -1)
@@ -973,12 +971,9 @@
       demux->src_segment.position = position;
 
       GST_DEBUG_OBJECT (demux,
-          "sending new segment: rate %g format %d, start: %"
-          G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT ", time: %"
-          G_GINT64_FORMAT ", base: %" G_GINT64_FORMAT
+          "sending new segment %" GST_SEGMENT_FORMAT
           ", scr_adjust: %" G_GINT64_FORMAT "(%" GST_TIME_FORMAT ")",
-          segment->rate, segment->format, start, stop, time, base,
-          demux->scr_adjust,
+          &demux->src_segment, demux->scr_adjust,
           GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->scr_adjust)));
 #if 0
       g_print ("sending new segment: rate %g format %d, start: %"
@@ -1396,8 +1391,6 @@
 
     /* marker:1==1 ! mux_rate:22 ! marker:1==1 */
     new_rate = (scr2 & 0x007ffffe) >> 1;
-
-    data += 8;
   }
   new_rate *= MPEG_MUX_RATE_MULT;
 
diff --git a/ext/resindvd/gstmpegdesc.c b/ext/resindvd/gstmpegdesc.c
index 598a3b7..42dc5fb 100644
--- a/ext/resindvd/gstmpegdesc.c
+++ b/ext/resindvd/gstmpegdesc.c
@@ -57,7 +57,7 @@
   if (length > size)
     return 0;
 
-  return length + 2;;
+  return length + 2;
 }
 
 GstMPEGDescriptor *
diff --git a/ext/resindvd/rsninputselector.c b/ext/resindvd/rsninputselector.c
index df3537f..75d8724 100644
--- a/ext/resindvd/rsninputselector.c
+++ b/ext/resindvd/rsninputselector.c
@@ -1535,6 +1535,7 @@
 
       /* perform the query on all sinkpads and combine the results. We take the
        * max of min and the min of max for the result latency. */
+      res = TRUE;
       GST_INPUT_SELECTOR_LOCK (sel);
       for (walk = GST_ELEMENT_CAST (sel)->sinkpads; walk;
           walk = g_list_next (walk)) {
@@ -1544,9 +1545,6 @@
           GstClockTime min, max;
           gboolean live;
 
-          /* one query succeeded, we succeed too */
-          res = TRUE;
-
           gst_query_parse_latency (query, &live, &min, &max);
 
           GST_DEBUG_OBJECT (sinkpad,
@@ -1560,9 +1558,11 @@
               resmax = max;
             else if (max < resmax)
               resmax = max;
-            if (reslive == FALSE)
-              reslive = live;
+            reslive = TRUE;
           }
+        } else {
+          GST_LOG_OBJECT (sinkpad, "latency query failed");
+          res = FALSE;
         }
       }
       GST_INPUT_SELECTOR_UNLOCK (sel);
diff --git a/ext/rsvg/Makefile.in b/ext/rsvg/Makefile.in
index 83f9120..cf80441 100644
--- a/ext/rsvg/Makefile.in
+++ b/ext/rsvg/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/rsvg
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -758,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/rsvg/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/rsvg/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1083,6 +1117,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/rsvg/gstrsvgdec.c b/ext/rsvg/gstrsvgdec.c
index a17c935..17ebcb1 100644
--- a/ext/rsvg/gstrsvgdec.c
+++ b/ext/rsvg/gstrsvgdec.c
@@ -104,6 +104,9 @@
 {
   GstVideoDecoder *decoder = GST_VIDEO_DECODER (rsvg);
   gst_video_decoder_set_packetized (decoder, FALSE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (rsvg), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (rsvg));
 }
 
 static void
@@ -203,8 +206,7 @@
 
 
   if (!gst_video_frame_map (&vframe,
-          &gst_video_decoder_get_output_state (decoder)->info,
-          frame->output_buffer, GST_MAP_READWRITE)) {
+          &output_state->info, frame->output_buffer, GST_MAP_READWRITE)) {
     GST_ERROR_OBJECT (rsvg, "Failed to get SVG image");
     g_object_unref (handle);
     gst_video_codec_state_unref (output_state);
diff --git a/ext/rtmp/Makefile.in b/ext/rtmp/Makefile.in
index 2a8c11b..dc9ce82 100644
--- a/ext/rtmp/Makefile.in
+++ b/ext/rtmp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/rtmp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/rtmp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/rtmp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1074,6 +1108,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/rtmp/gstrtmpsink.c b/ext/rtmp/gstrtmpsink.c
index 0e2e850..d2e7dbf 100644
--- a/ext/rtmp/gstrtmpsink.c
+++ b/ext/rtmp/gstrtmpsink.c
@@ -75,6 +75,7 @@
 static void gst_rtmp_sink_finalize (GObject * object);
 static gboolean gst_rtmp_sink_stop (GstBaseSink * sink);
 static gboolean gst_rtmp_sink_start (GstBaseSink * sink);
+static gboolean gst_rtmp_sink_event (GstBaseSink * sink, GstEvent * event);
 static GstFlowReturn gst_rtmp_sink_render (GstBaseSink * sink, GstBuffer * buf);
 
 #define gst_rtmp_sink_parent_class parent_class
@@ -113,6 +114,7 @@
   gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_rtmp_sink_start);
   gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_rtmp_sink_stop);
   gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_rtmp_sink_render);
+  gstbasesink_class->event = gst_rtmp_sink_event;
 
   GST_DEBUG_CATEGORY_INIT (gst_rtmp_sink_debug, "rtmpsink", 0,
       "RTMP server element");
@@ -177,6 +179,7 @@
   RTMP_EnableWrite (sink->rtmp);
 
   sink->first = TRUE;
+  sink->have_write_error = FALSE;
 
   return TRUE;
 }
@@ -206,7 +209,13 @@
 {
   GstRTMPSink *sink = GST_RTMP_SINK (bsink);
   GstBuffer *reffed_buf = NULL;
-  GstMapInfo map;
+  GstMapInfo map = GST_MAP_INFO_INIT;
+
+  if (sink->rtmp == NULL) {
+    /* Do not crash */
+    GST_ELEMENT_ERROR (sink, RESOURCE, WRITE, (NULL), ("Failed to write data"));
+    return GST_FLOW_ERROR;
+  }
 
   if (sink->first) {
     /* open the connection */
@@ -219,6 +228,7 @@
         sink->rtmp = NULL;
         g_free (sink->rtmp_uri);
         sink->rtmp_uri = NULL;
+        sink->have_write_error = TRUE;
         return GST_FLOW_ERROR;
       }
       GST_DEBUG_OBJECT (sink, "Opened connection to %s", sink->rtmp_uri);
@@ -241,6 +251,9 @@
     sink->cache = NULL;
   }
 
+  if (sink->have_write_error)
+    goto write_failed;
+
   GST_LOG_OBJECT (sink, "Sending %" G_GSIZE_FORMAT " bytes to RTMP server",
       gst_buffer_get_size (buf));
 
@@ -262,6 +275,7 @@
     gst_buffer_unmap (buf, &map);
     if (reffed_buf)
       gst_buffer_unref (reffed_buf);
+    sink->have_write_error = TRUE;
     return GST_FLOW_ERROR;
   }
 }
@@ -330,8 +344,10 @@
       free (playpath.av_val);
   }
 
-  if (ret)
+  if (ret) {
+    sink->have_write_error = FALSE;
     GST_DEBUG_OBJECT (sink, "Changed URI to %s", GST_STR_NULL (uri));
+  }
 
   return ret;
 }
@@ -364,6 +380,22 @@
   }
 }
 
+static gboolean
+gst_rtmp_sink_event (GstBaseSink * sink, GstEvent * event)
+{
+  GstRTMPSink *rtmpsink = GST_RTMP_SINK (sink);
+
+  switch (event->type) {
+    case GST_EVENT_FLUSH_STOP:
+      rtmpsink->have_write_error = FALSE;
+      break;
+    default:
+      break;
+  }
+
+  return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
+}
+
 static void
 gst_rtmp_sink_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
diff --git a/ext/rtmp/gstrtmpsink.h b/ext/rtmp/gstrtmpsink.h
index d89b0a4..523f5ae 100644
--- a/ext/rtmp/gstrtmpsink.h
+++ b/ext/rtmp/gstrtmpsink.h
@@ -55,6 +55,7 @@
 
   GstBuffer *cache; /* Cached buffer */
   gboolean first;
+  gboolean have_write_error;
 };
 
 struct _GstRTMPSinkClass {
diff --git a/ext/sbc/Makefile.in b/ext/sbc/Makefile.in
index 606a741..5394977 100644
--- a/ext/sbc/Makefile.in
+++ b/ext/sbc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/sbc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -765,7 +800,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/sbc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/sbc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1090,6 +1124,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/sbc/gstsbcdec.c b/ext/sbc/gstsbcdec.c
index 9e2eb5b..5031dd9 100644
--- a/ext/sbc/gstsbcdec.c
+++ b/ext/sbc/gstsbcdec.c
@@ -236,6 +236,9 @@
 gst_sbc_dec_init (GstSbcDec * dec)
 {
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
 
   dec->samples_per_frame = 0;
   dec->frame_len = 0;
diff --git a/ext/sbc/gstsbcenc.c b/ext/sbc/gstsbcenc.c
index 7aef4db..02ca1be 100644
--- a/ext/sbc/gstsbcenc.c
+++ b/ext/sbc/gstsbcenc.c
@@ -362,6 +362,7 @@
 static void
 gst_sbc_enc_init (GstSbcEnc * self)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (self));
   self->subbands = 0;
   self->blocks = 0;
   self->rate = 0;
diff --git a/ext/schroedinger/Makefile.in b/ext/schroedinger/Makefile.in
index e51d7ff..def5014 100644
--- a/ext/schroedinger/Makefile.in
+++ b/ext/schroedinger/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/schroedinger
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -767,7 +802,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/schroedinger/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/schroedinger/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1100,6 +1134,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c
index 0a273fa..6ac6ae9 100644
--- a/ext/schroedinger/gstschrodec.c
+++ b/ext/schroedinger/gstschrodec.c
@@ -58,6 +58,10 @@
   SchroDecoder *decoder;
 
   gboolean seq_header_buffer_seen;
+  gint next;
+  gint prev;
+  gint parse_code;
+  gboolean header_read;
 };
 
 struct _GstSchroDecClass
@@ -151,6 +155,10 @@
 
   schro_dec->decoder = schro_decoder_new ();
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (schro_dec), FALSE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (schro_dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (schro_dec));
+  schro_dec->header_read = FALSE;
 }
 
 static gboolean
@@ -163,7 +171,11 @@
 static gboolean
 gst_schro_dec_stop (GstVideoDecoder * dec)
 {
+  GstSchroDec *schro_dec;
 
+  schro_dec = GST_SCHRO_DEC (dec);
+
+  schro_dec->header_read = FALSE;
   return TRUE;
 }
 
@@ -178,7 +190,7 @@
 
   if (schro_dec->decoder)
     schro_decoder_reset (schro_dec->decoder);
-
+  schro_dec->header_read = FALSE;
   return TRUE;
 }
 
@@ -278,9 +290,6 @@
 {
   GstSchroDec *schro_decoder;
   unsigned char header[SCHRO_PARSE_HEADER_SIZE];
-  int next;
-  int prev;
-  int parse_code;
   int av, loc;
 
   GST_DEBUG_OBJECT (base_video_decoder, "parse");
@@ -295,58 +304,65 @@
   GST_DEBUG ("available %d", av);
 
   /* Check for header */
-  loc =
-      gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x42424344, 0,
-      av - 3);
-  if (G_UNLIKELY (loc == -1)) {
-    GST_DEBUG_OBJECT (schro_decoder, "No header");
-    gst_adapter_flush (adapter, av - 3);
-    return GST_VIDEO_DECODER_FLOW_NEED_DATA;
+  if (schro_decoder->header_read == FALSE) {
+    /* Check for header */
+    loc =
+        gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x42424344, 0,
+        av - (SCHRO_PARSE_HEADER_SIZE - 1));
+    if (G_UNLIKELY (loc == -1)) {
+      GST_DEBUG_OBJECT (schro_decoder, "No header");
+      gst_adapter_flush (adapter, av - (SCHRO_PARSE_HEADER_SIZE - 1));
+      return GST_VIDEO_DECODER_FLOW_NEED_DATA;
+    }
+
+    /* Skip data until header */
+    if (loc > 0)
+      gst_adapter_flush (adapter, loc);
+
+    gst_adapter_copy (adapter, header, 0, SCHRO_PARSE_HEADER_SIZE);
+
+    schro_decoder->parse_code = header[4];
+    schro_decoder->next = GST_READ_UINT32_BE (header + 5);
+    schro_decoder->prev = GST_READ_UINT32_BE (header + 9);
+
+    GST_DEBUG ("%08x %02x %08x %08x",
+        GST_READ_UINT32_BE (header), schro_decoder->parse_code,
+        schro_decoder->next, schro_decoder->prev);
+
+    if (memcmp (header, "BBCD", 4) != 0 || (schro_decoder->next & 0xf0000000)
+        || (schro_decoder->prev & 0xf0000000)) {
+      gst_adapter_flush (adapter, 1);
+      return GST_VIDEO_DECODER_FLOW_NEED_DATA;
+    }
+    schro_decoder->header_read = TRUE;
   }
-
-  /* Skip data until header */
-  if (loc > 0)
-    gst_adapter_flush (adapter, loc);
-
-  gst_adapter_copy (adapter, header, 0, SCHRO_PARSE_HEADER_SIZE);
-
-  parse_code = header[4];
-  next = GST_READ_UINT32_BE (header + 5);
-  prev = GST_READ_UINT32_BE (header + 9);
-
-  GST_DEBUG ("%08x %02x %08x %08x",
-      GST_READ_UINT32_BE (header), parse_code, next, prev);
-
-  if (memcmp (header, "BBCD", 4) != 0 ||
-      (next & 0xf0000000) || (prev & 0xf0000000)) {
-    gst_adapter_flush (adapter, 1);
-    return GST_VIDEO_DECODER_FLOW_NEED_DATA;
-  }
-
-  if (SCHRO_PARSE_CODE_IS_END_OF_SEQUENCE (parse_code)) {
-    if (next != 0 && next != SCHRO_PARSE_HEADER_SIZE) {
-      GST_WARNING ("next is not 0 or 13 in EOS packet (%d)", next);
+  if (SCHRO_PARSE_CODE_IS_END_OF_SEQUENCE (schro_decoder->parse_code)) {
+    if (schro_decoder->next != 0
+        && schro_decoder->next != SCHRO_PARSE_HEADER_SIZE) {
+      GST_WARNING ("next is not 0 or 13 in EOS packet (%d)",
+          schro_decoder->next);
     }
 
     gst_video_decoder_add_to_frame (base_video_decoder,
         SCHRO_PARSE_HEADER_SIZE);
 
     SCHRO_DEBUG ("eos");
-
+    schro_decoder->header_read = FALSE;
     return gst_video_decoder_have_frame (base_video_decoder);
   }
 
-  if (gst_adapter_available (adapter) < next) {
+  if (gst_adapter_available (adapter) < schro_decoder->next) {
     return GST_VIDEO_DECODER_FLOW_NEED_DATA;
-  }
+  } else
+    schro_decoder->header_read = FALSE;
 
-  if (SCHRO_PARSE_CODE_IS_SEQ_HEADER (parse_code)) {
+  if (SCHRO_PARSE_CODE_IS_SEQ_HEADER (schro_decoder->parse_code)) {
     guint8 *data;
 
-    data = g_malloc (next);
+    data = g_malloc (schro_decoder->next);
 
-    gst_adapter_copy (adapter, data, 0, next);
-    parse_sequence_header (schro_decoder, data, next);
+    gst_adapter_copy (adapter, data, 0, schro_decoder->next);
+    parse_sequence_header (schro_decoder, data, schro_decoder->next);
 
     GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
 
@@ -395,11 +411,11 @@
   }
 
   if (!schro_decoder->seq_header_buffer_seen) {
-    gst_adapter_flush (adapter, next);
+    gst_adapter_flush (adapter, schro_decoder->next);
     return GST_FLOW_OK;
   }
 
-  if (SCHRO_PARSE_CODE_IS_PICTURE (parse_code)) {
+  if (SCHRO_PARSE_CODE_IS_PICTURE (schro_decoder->parse_code)) {
     guint8 tmp[4];
 
     gst_adapter_copy (adapter, tmp, SCHRO_PARSE_HEADER_SIZE, 4);
@@ -408,11 +424,10 @@
      * do anything with presentation_frame_number */
     frame->presentation_frame_number = GST_READ_UINT32_BE (tmp);
 
-    gst_video_decoder_add_to_frame (base_video_decoder, next);
-
+    gst_video_decoder_add_to_frame (base_video_decoder, schro_decoder->next);
     return gst_video_decoder_have_frame (base_video_decoder);
   } else {
-    gst_video_decoder_add_to_frame (base_video_decoder, next);
+    gst_video_decoder_add_to_frame (base_video_decoder, schro_decoder->next);
   }
 
   return GST_FLOW_OK;
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c
index f1a7493..6cd761f 100644
--- a/ext/schroedinger/gstschroenc.c
+++ b/ext/schroedinger/gstschroenc.c
@@ -240,6 +240,8 @@
 {
   GST_DEBUG ("gst_schro_enc_init");
 
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (schro_enc));
+
   /* Normally, we'd create the encoder in ->start(), but we use the
    * encoder to store object properties.  So it needs to be created
    * here. */
diff --git a/ext/sdl/Makefile.in b/ext/sdl/Makefile.in
index a74159c..0f5207e 100644
--- a/ext/sdl/Makefile.in
+++ b/ext/sdl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/sdl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -760,7 +795,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/sdl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/sdl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1085,6 +1119,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/smoothstreaming/Makefile.am b/ext/smoothstreaming/Makefile.am
index a683f75..5f331f3 100644
--- a/ext/smoothstreaming/Makefile.am
+++ b/ext/smoothstreaming/Makefile.am
@@ -7,6 +7,7 @@
 libgstsmoothstreaming_la_LIBADD = \
     $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
     $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+    $(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
     $(GST_PLUGINS_BASE_LIBS) \
     -lgsttag-$(GST_API_VERSION) \
     $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) $(LIBXML2_LIBS)
@@ -18,18 +19,3 @@
 
 noinst_HEADERS = gstmssdemux.h \
 	gstmssmanifest.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmoothstreaming -:SHARED libgstsmoothstreaming \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmoothstreaming_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstsmoothstreaming_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmoothstreaming_la_LDFLAGS) \
-	           $(libgstsmoothstreaming_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
diff --git a/ext/smoothstreaming/Makefile.in b/ext/smoothstreaming/Makefile.in
index 406f452..793690c 100644
--- a/ext/smoothstreaming/Makefile.in
+++ b/ext/smoothstreaming/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/smoothstreaming
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -156,6 +166,7 @@
 am__DEPENDENCIES_1 =
 libgstsmoothstreaming_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
 	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_libgstsmoothstreaming_la_OBJECTS =  \
@@ -233,6 +244,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -250,8 +262,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -276,8 +290,6 @@
 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@
@@ -290,7 +302,6 @@
 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@
@@ -298,6 +309,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -324,11 +337,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -347,8 +363,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -407,10 +421,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -427,7 +445,6 @@
 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@
@@ -436,7 +453,6 @@
 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@
@@ -449,7 +465,6 @@
 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@
@@ -463,6 +478,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -474,6 +490,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -512,6 +530,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -547,10 +566,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -576,6 +599,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -583,7 +609,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -612,6 +645,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -622,6 +656,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -652,17 +687,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -679,6 +713,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -717,6 +752,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -738,6 +774,7 @@
 libgstsmoothstreaming_la_LIBADD = \
     $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
     $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+    $(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la \
     $(GST_PLUGINS_BASE_LIBS) \
     -lgsttag-$(GST_API_VERSION) \
     $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) $(LIBXML2_LIBS)
@@ -767,7 +804,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/smoothstreaming/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/smoothstreaming/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1092,20 +1128,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmoothstreaming -:SHARED libgstsmoothstreaming \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmoothstreaming_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstsmoothstreaming_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmoothstreaming_la_LDFLAGS) \
-	           $(libgstsmoothstreaming_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
index d76654e..8f10d7d 100644
--- a/ext/smoothstreaming/gstmssdemux.c
+++ b/ext/smoothstreaming/gstmssdemux.c
@@ -77,19 +77,14 @@
 
 GST_DEBUG_CATEGORY (mssdemux_debug);
 
-#define DEFAULT_CONNECTION_SPEED 0
 #define DEFAULT_MAX_QUEUE_SIZE_BUFFERS 0
 #define DEFAULT_BITRATE_LIMIT 0.8
 
-#define MAX_DOWNLOAD_ERROR_COUNT 3
-
 enum
 {
   PROP_0,
 
-  PROP_CONNECTION_SPEED,
   PROP_MAX_QUEUE_SIZE_BUFFERS,
-  PROP_BITRATE_LIMIT,
   PROP_LAST
 };
 
@@ -113,42 +108,46 @@
     GST_STATIC_CAPS_ANY);
 
 #define gst_mss_demux_parent_class parent_class
-G_DEFINE_TYPE (GstMssDemux, gst_mss_demux, GST_TYPE_BIN);
+G_DEFINE_TYPE (GstMssDemux, gst_mss_demux, GST_TYPE_ADAPTIVE_DEMUX);
 
 static void gst_mss_demux_dispose (GObject * object);
 static void gst_mss_demux_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 static void gst_mss_demux_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static GstStateChangeReturn gst_mss_demux_change_state (GstElement * element,
-    GstStateChange transition);
-static void gst_mss_demux_handle_message (GstBin * bin, GstMessage * msg);
-static GstFlowReturn gst_mss_demux_chain (GstPad * pad, GstObject * parent,
+
+static gboolean gst_mss_demux_is_live (GstAdaptiveDemux * demux);
+static gboolean gst_mss_demux_process_manifest (GstAdaptiveDemux * demux,
     GstBuffer * buffer);
-static GstFlowReturn gst_mss_demux_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_mss_demux_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query);
-
-static void gst_mss_demux_download_loop (GstMssDemuxStream * stream);
-static GstFlowReturn gst_mss_demux_stream_push_event (GstMssDemuxStream *
-    stream, GstEvent * event);
-static GstFlowReturn gst_mss_demux_combine_flows (GstMssDemux * mssdemux);
-
-static gboolean gst_mss_demux_process_manifest (GstMssDemux * mssdemux);
-static void
-gst_mss_demux_stop_tasks (GstMssDemux * mssdemux, gboolean immediate);
+static GstClockTime gst_mss_demux_get_duration (GstAdaptiveDemux * demux);
+static void gst_mss_demux_reset (GstAdaptiveDemux * demux);
+static GstFlowReturn gst_mss_demux_stream_seek (GstAdaptiveDemuxStream * stream,
+    GstClockTime ts);
+static gboolean
+gst_mss_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream);
+static GstFlowReturn
+gst_mss_demux_stream_advance_fragment (GstAdaptiveDemuxStream * stream);
+static gboolean gst_mss_demux_stream_select_bitrate (GstAdaptiveDemuxStream *
+    stream, guint64 bitrate);
+static GstFlowReturn
+gst_mss_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream);
+static gboolean gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek);
+static gint64
+gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
+static GstFlowReturn
+gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+    GstBuffer * buffer);
 
 static void
 gst_mss_demux_class_init (GstMssDemuxClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
-  GstBinClass *gstbin_class;
+  GstAdaptiveDemuxClass *gstadaptivedemux_class;
 
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
-  gstbin_class = (GstBinClass *) klass;
+  gstadaptivedemux_class = (GstAdaptiveDemuxClass *) klass;
 
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&gst_mss_demux_sink_template));
@@ -165,30 +164,33 @@
   gobject_class->set_property = gst_mss_demux_set_property;
   gobject_class->get_property = gst_mss_demux_get_property;
 
-  g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
-      g_param_spec_uint ("connection-speed", "Connection Speed",
-          "Network connection speed in kbps (0 = unknown)",
-          0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
+#ifndef GST_REMOVE_DEPRECATED
   g_object_class_install_property (gobject_class, PROP_MAX_QUEUE_SIZE_BUFFERS,
       g_param_spec_uint ("max-queue-size-buffers", "Max queue size in buffers",
           "Maximum buffers that can be stored in each internal stream queue "
           "(0 = infinite) (deprecated)", 0, G_MAXUINT,
           DEFAULT_MAX_QUEUE_SIZE_BUFFERS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED));
+#endif
 
-  g_object_class_install_property (gobject_class, PROP_BITRATE_LIMIT,
-      g_param_spec_float ("bitrate-limit",
-          "Bitrate limit in %",
-          "Limit of the available bitrate to use when switching to alternates.",
-          0, 1, DEFAULT_BITRATE_LIMIT,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_mss_demux_change_state);
-
-  gstbin_class->handle_message = gst_mss_demux_handle_message;
+  gstadaptivedemux_class->process_manifest = gst_mss_demux_process_manifest;
+  gstadaptivedemux_class->is_live = gst_mss_demux_is_live;
+  gstadaptivedemux_class->get_duration = gst_mss_demux_get_duration;
+  gstadaptivedemux_class->get_manifest_update_interval =
+      gst_mss_demux_get_manifest_update_interval;
+  gstadaptivedemux_class->reset = gst_mss_demux_reset;
+  gstadaptivedemux_class->seek = gst_mss_demux_seek;
+  gstadaptivedemux_class->stream_seek = gst_mss_demux_stream_seek;
+  gstadaptivedemux_class->stream_advance_fragment =
+      gst_mss_demux_stream_advance_fragment;
+  gstadaptivedemux_class->stream_has_next_fragment =
+      gst_mss_demux_stream_has_next_fragment;
+  gstadaptivedemux_class->stream_select_bitrate =
+      gst_mss_demux_stream_select_bitrate;
+  gstadaptivedemux_class->stream_update_fragment_info =
+      gst_mss_demux_stream_update_fragment_info;
+  gstadaptivedemux_class->update_manifest_data =
+      gst_mss_demux_update_manifest_data;
 
   GST_DEBUG_CATEGORY_INIT (mssdemux_debug, "mssdemux", 0, "mssdemux plugin");
 }
@@ -196,135 +198,32 @@
 static void
 gst_mss_demux_init (GstMssDemux * mssdemux)
 {
-  mssdemux->sinkpad =
-      gst_pad_new_from_static_template (&gst_mss_demux_sink_template, "sink");
-  gst_pad_set_chain_function (mssdemux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_mss_demux_chain));
-  gst_pad_set_event_function (mssdemux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_mss_demux_event));
-  gst_element_add_pad (GST_ELEMENT_CAST (mssdemux), mssdemux->sinkpad);
-
   mssdemux->data_queue_max_size = DEFAULT_MAX_QUEUE_SIZE_BUFFERS;
-  mssdemux->bitrate_limit = DEFAULT_BITRATE_LIMIT;
 
-  mssdemux->have_group_id = FALSE;
-  mssdemux->group_id = G_MAXUINT;
-}
-
-static GstMssDemuxStream *
-gst_mss_demux_stream_new (GstMssDemux * mssdemux,
-    GstMssStream * manifeststream, GstPad * srcpad)
-{
-  GstMssDemuxStream *stream;
-
-  stream = g_new0 (GstMssDemuxStream, 1);
-
-  /* Downloading task */
-  g_rec_mutex_init (&stream->download_lock);
-  stream->download_task =
-      gst_task_new ((GstTaskFunction) gst_mss_demux_download_loop, stream,
-      NULL);
-  gst_task_set_lock (stream->download_task, &stream->download_lock);
-
-  stream->pad = srcpad;
-  stream->manifest_stream = manifeststream;
-  stream->parent = mssdemux;
-
-  gst_segment_init (&stream->segment, GST_FORMAT_TIME);
-  g_cond_init (&stream->fragment_download_cond);
-  g_mutex_init (&stream->fragment_download_lock);
-
-  return stream;
+  gst_adaptive_demux_set_stream_struct_size (GST_ADAPTIVE_DEMUX_CAST (mssdemux),
+      sizeof (GstMssDemuxStream));
 }
 
 static void
-gst_mss_demux_stream_free (GstMssDemuxStream * stream)
+gst_mss_demux_reset (GstAdaptiveDemux * demux)
 {
-  if (stream->download_task) {
-    if (GST_TASK_STATE (stream->download_task) != GST_TASK_STOPPED) {
-      GST_DEBUG_OBJECT (stream->parent, "Leaving streaming task %s:%s",
-          GST_DEBUG_PAD_NAME (stream->pad));
-      g_cond_signal (&stream->fragment_download_cond);
-      gst_task_stop (stream->download_task);
-      GST_LOG_OBJECT (stream->parent, "Waiting for task to finish");
-      gst_task_join (stream->download_task);
-      GST_LOG_OBJECT (stream->parent, "Finished");
-    }
-    gst_object_unref (stream->download_task);
-    g_rec_mutex_clear (&stream->download_lock);
-    stream->download_task = NULL;
-  }
-
-  if (stream->pending_segment) {
-    gst_event_unref (stream->pending_segment);
-    stream->pending_segment = NULL;
-  }
-
-  if (stream->src_srcpad) {
-    gst_object_unref (stream->src_srcpad);
-    stream->src_srcpad = NULL;
-  }
-
-  if (stream->src) {
-    gst_element_set_state (stream->src, GST_STATE_NULL);
-    gst_bin_remove (GST_BIN_CAST (stream->parent), stream->src);
-    stream->src = NULL;
-  }
-
-  g_cond_clear (&stream->fragment_download_cond);
-  g_mutex_clear (&stream->fragment_download_lock);
-
-  if (stream->pad) {
-    gst_object_unref (stream->pad);
-    stream->pad = NULL;
-  }
-  if (stream->caps)
-    gst_caps_unref (stream->caps);
-  g_free (stream);
-}
-
-static void
-gst_mss_demux_reset (GstMssDemux * mssdemux)
-{
-  GSList *iter;
-
-  gst_mss_demux_stop_tasks (mssdemux, TRUE);
-
-  if (mssdemux->manifest_buffer) {
-    gst_buffer_unref (mssdemux->manifest_buffer);
-    mssdemux->manifest_buffer = NULL;
-  }
-
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-    if (stream->pad)
-      gst_element_remove_pad (GST_ELEMENT_CAST (mssdemux), stream->pad);
-    gst_mss_demux_stream_free (stream);
-  }
-  g_slist_free (mssdemux->streams);
-  mssdemux->streams = NULL;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
   if (mssdemux->manifest) {
     gst_mss_manifest_free (mssdemux->manifest);
     mssdemux->manifest = NULL;
   }
-
-  mssdemux->n_videos = mssdemux->n_audios = 0;
   g_free (mssdemux->base_url);
   mssdemux->base_url = NULL;
-  g_free (mssdemux->manifest_uri);
-  mssdemux->manifest_uri = NULL;
 
-  mssdemux->have_group_id = FALSE;
-  mssdemux->group_id = G_MAXUINT;
+  mssdemux->n_videos = mssdemux->n_audios = 0;
+
 }
 
 static void
 gst_mss_demux_dispose (GObject * object)
 {
-  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (object);
-
-  gst_mss_demux_reset (mssdemux);
+  gst_mss_demux_reset (GST_ADAPTIVE_DEMUX_CAST (object));
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
@@ -336,20 +235,9 @@
   GstMssDemux *mssdemux = GST_MSS_DEMUX (object);
 
   switch (prop_id) {
-    case PROP_CONNECTION_SPEED:
-      GST_OBJECT_LOCK (mssdemux);
-      mssdemux->connection_speed = g_value_get_uint (value) * 1000;
-      mssdemux->update_bitrates = TRUE;
-      GST_DEBUG_OBJECT (mssdemux, "Connection speed set to %" G_GUINT64_FORMAT,
-          mssdemux->connection_speed);
-      GST_OBJECT_UNLOCK (mssdemux);
-      break;
     case PROP_MAX_QUEUE_SIZE_BUFFERS:
       mssdemux->data_queue_max_size = g_value_get_uint (value);
       break;
-    case PROP_BITRATE_LIMIT:
-      mssdemux->bitrate_limit = g_value_get_float (value);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -363,395 +251,85 @@
   GstMssDemux *mssdemux = GST_MSS_DEMUX (object);
 
   switch (prop_id) {
-    case PROP_CONNECTION_SPEED:
-      g_value_set_uint (value, mssdemux->connection_speed / 1000);
-      break;
     case PROP_MAX_QUEUE_SIZE_BUFFERS:
       g_value_set_uint (value, mssdemux->data_queue_max_size);
       break;
-    case PROP_BITRATE_LIMIT:
-      g_value_set_float (value, mssdemux->bitrate_limit);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
 }
 
-static GstStateChangeReturn
-gst_mss_demux_change_state (GstElement * element, GstStateChange transition)
+static gboolean
+gst_mss_demux_is_live (GstAdaptiveDemux * demux)
 {
-  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (element);
-  GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_mss_demux_reset (mssdemux);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      break;
-    default:
-      break;
-  }
+  g_return_val_if_fail (mssdemux->manifest != NULL, FALSE);
 
-  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  return result;
+  return gst_mss_manifest_is_live (mssdemux->manifest);
 }
 
-static void
-gst_mss_demux_handle_message (GstBin * bin, GstMessage * msg)
+static GstClockTime
+gst_mss_demux_get_duration (GstAdaptiveDemux * demux)
 {
-  GstMssDemux *demux = GST_MSS_DEMUX_CAST (bin);
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
-  switch (GST_MESSAGE_TYPE (msg)) {
-    case GST_MESSAGE_ERROR:{
-      GSList *iter;
-      GstMssDemuxStream *stream;
-      GError *err = NULL;
-      gchar *debug = NULL;
+  g_return_val_if_fail (mssdemux->manifest != NULL, FALSE);
 
-      for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
-        stream = iter->data;
-        if (GST_OBJECT_CAST (stream->src) == GST_MESSAGE_SRC (msg)) {
-          gst_message_parse_error (msg, &err, &debug);
-
-          GST_WARNING_OBJECT (stream->pad, "Source posted error: %d:%d %s (%s)",
-              err->domain, err->code, err->message, debug);
-
-          /* error, but ask to retry */
-          stream->last_ret = GST_FLOW_CUSTOM_ERROR;
-          g_cond_signal (&stream->fragment_download_cond);
-
-          g_error_free (err);
-          g_free (debug);
-          break;
-        }
-      }
-
-      gst_message_unref (msg);
-      msg = NULL;
-    }
-      break;
-    default:
-      break;
-  }
-
-  if (msg)
-    GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
+  return gst_mss_manifest_get_gst_duration (mssdemux->manifest);
 }
 
-
 static GstFlowReturn
-gst_mss_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+gst_mss_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream)
 {
-  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (parent);
-  if (mssdemux->manifest_buffer == NULL)
-    mssdemux->manifest_buffer = buffer;
-  else
-    mssdemux->manifest_buffer =
-        gst_buffer_append (mssdemux->manifest_buffer, buffer);
+  GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (stream->demux);
+  GstFlowReturn ret;
+  gchar *path = NULL;
 
-  GST_INFO_OBJECT (mssdemux, "Received manifest buffer, total size is %i bytes",
-      (gint) gst_buffer_get_size (mssdemux->manifest_buffer));
+  gst_adaptive_demux_stream_fragment_clear (&stream->fragment);
+  ret = gst_mss_stream_get_fragment_url (mssstream->manifest_stream, &path);
 
+  if (ret == GST_FLOW_OK) {
+    stream->fragment.uri = g_strdup_printf ("%s/%s", mssdemux->base_url, path);
+    stream->fragment.timestamp =
+        gst_mss_stream_get_fragment_gst_timestamp (mssstream->manifest_stream);
+    stream->fragment.duration =
+        gst_mss_stream_get_fragment_gst_duration (mssstream->manifest_stream);
+  }
+  g_free (path);
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_mss_demux_stream_seek (GstAdaptiveDemuxStream * stream, GstClockTime ts)
+{
+  GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
+
+  gst_mss_stream_seek (mssstream->manifest_stream, ts);
   return GST_FLOW_OK;
 }
 
-static void
-gst_mss_demux_start (GstMssDemux * mssdemux)
+static GstFlowReturn
+gst_mss_demux_stream_advance_fragment (GstAdaptiveDemuxStream * stream)
 {
-  GSList *iter;
+  GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
 
-  GST_INFO_OBJECT (mssdemux, "Starting streams' tasks");
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-    gst_task_start (stream->download_task);
-  }
+  if (stream->demux->segment.rate >= 0)
+    return gst_mss_stream_advance_fragment (mssstream->manifest_stream);
+  else
+    return gst_mss_stream_regress_fragment (mssstream->manifest_stream);
 }
 
-static gboolean
-gst_mss_demux_push_src_event (GstMssDemux * mssdemux, GstEvent * event)
+static GstCaps *
+create_mss_caps (GstMssDemuxStream * stream, GstCaps * caps)
 {
-  GSList *iter;
-  gboolean ret = TRUE;
-
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-    gst_event_ref (event);
-    ret = ret & gst_pad_push_event (stream->pad, event);
-  }
-  gst_event_unref (event);
-  return ret;
-}
-
-static gboolean
-gst_mss_demux_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (parent);
-  gboolean forward = TRUE;
-  gboolean ret = TRUE;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_FLUSH_STOP:
-      gst_mss_demux_reset (mssdemux);
-      break;
-    case GST_EVENT_EOS:
-      if (mssdemux->manifest_buffer == NULL) {
-        GST_WARNING_OBJECT (mssdemux, "Received EOS without a manifest.");
-        break;
-      }
-      GST_INFO_OBJECT (mssdemux, "Received EOS");
-
-      if (gst_mss_demux_process_manifest (mssdemux))
-        gst_mss_demux_start (mssdemux);
-      forward = FALSE;
-      break;
-    default:
-      break;
-  }
-
-  if (forward) {
-    ret = gst_pad_event_default (pad, parent, event);
-  } else {
-    gst_event_unref (event);
-  }
-
-  return ret;
-}
-
-static void
-gst_mss_demux_stop_tasks (GstMssDemux * mssdemux, gboolean immediate)
-{
-  GSList *iter;
-
-  GST_OBJECT_LOCK (mssdemux);
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-
-    gst_task_stop (stream->download_task);
-    stream->cancelled = TRUE;
-    if (immediate)
-      g_cond_signal (&stream->fragment_download_cond);
-  }
-  GST_OBJECT_UNLOCK (mssdemux);
-
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-
-    gst_task_join (stream->download_task);
-    stream->download_error_count = 0;
-  }
-}
-
-static void
-gst_mss_demux_restart_tasks (GstMssDemux * mssdemux)
-{
-  GSList *iter;
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-    stream->cancelled = FALSE;
-    gst_task_start (stream->download_task);
-  }
-}
-
-static gboolean
-gst_mss_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstMssDemux *mssdemux;
-
-  mssdemux = GST_MSS_DEMUX_CAST (parent);
-
-  switch (event->type) {
-    case GST_EVENT_SEEK:
-    {
-      gdouble rate;
-      GstFormat format;
-      GstSeekFlags flags;
-      GstSeekType start_type, stop_type;
-      gint64 start, stop;
-      GstEvent *newsegment;
-      GSList *iter;
-      gboolean update;
-
-      GST_INFO_OBJECT (mssdemux, "Received GST_EVENT_SEEK");
-
-      gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
-          &stop_type, &stop);
-
-      if (format != GST_FORMAT_TIME)
-        goto not_supported;
-
-      GST_DEBUG_OBJECT (mssdemux,
-          "seek event, rate: %f start: %" GST_TIME_FORMAT " stop: %"
-          GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
-
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        GstEvent *flush = gst_event_new_flush_start ();
-        GST_DEBUG_OBJECT (mssdemux, "sending flush start");
-
-        gst_event_set_seqnum (flush, gst_event_get_seqnum (event));
-        gst_mss_demux_push_src_event (mssdemux, flush);
-      }
-
-      gst_mss_demux_stop_tasks (mssdemux, TRUE);
-
-      if (!gst_mss_manifest_seek (mssdemux->manifest, start)) {;
-        GST_WARNING_OBJECT (mssdemux, "Could not find seeked fragment");
-        goto not_supported;
-      }
-
-      for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-        GstMssDemuxStream *stream = iter->data;
-
-        stream->eos = FALSE;
-        if (flags & GST_SEEK_FLAG_FLUSH) {
-          stream->last_ret = GST_FLOW_OK;
-        }
-
-        gst_segment_do_seek (&stream->segment, rate, format, flags,
-            start_type, start, stop_type, stop, &update);
-
-        newsegment = gst_event_new_segment (&stream->segment);
-        gst_event_set_seqnum (newsegment, gst_event_get_seqnum (event));
-        if (stream->pending_segment)
-          gst_event_unref (stream->pending_segment);
-        stream->pending_segment = newsegment;
-      }
-
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        GstEvent *flush = gst_event_new_flush_stop (TRUE);
-        GST_DEBUG_OBJECT (mssdemux, "sending flush stop");
-
-        gst_event_set_seqnum (flush, gst_event_get_seqnum (event));
-        gst_mss_demux_push_src_event (mssdemux, flush);
-      }
-
-      gst_mss_demux_restart_tasks (mssdemux);
-
-      gst_event_unref (event);
-      return TRUE;
-    }
-    case GST_EVENT_RECONFIGURE:{
-      GSList *iter;
-
-      for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-        GstMssDemuxStream *stream = iter->data;
-
-        if (stream->pad == pad) {
-          GST_OBJECT_LOCK (mssdemux);
-
-          if (stream->last_ret == GST_FLOW_NOT_LINKED) {
-            GST_DEBUG_OBJECT (stream->pad, "Received reconfigure");
-            stream->restart_download = TRUE;
-            gst_task_start (stream->download_task);
-          }
-          GST_OBJECT_UNLOCK (mssdemux);
-          gst_event_unref (event);
-          return TRUE;
-        }
-      }
-    }
-      break;
-    case GST_EVENT_LATENCY:{
-      /* Upstream and our internal source are irrelevant
-       * for latency, and we should not fail here to
-       * configure the latency */
-      gst_event_unref (event);
-      return TRUE;
-    }
-    default:
-      break;
-  }
-
-  return gst_pad_event_default (pad, parent, event);
-
-not_supported:
-  gst_event_unref (event);
-  return FALSE;
-}
-
-static gboolean
-gst_mss_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
-{
-  GstMssDemux *mssdemux;
-  gboolean ret = FALSE;
-
-  if (query == NULL)
-    return FALSE;
-
-  mssdemux = GST_MSS_DEMUX (parent);
-
-  switch (query->type) {
-    case GST_QUERY_DURATION:{
-      GstClockTime duration = -1;
-      GstFormat fmt;
-
-      gst_query_parse_duration (query, &fmt, NULL);
-      if (fmt == GST_FORMAT_TIME && mssdemux->manifest) {
-        /* TODO should we use the streams accumulated duration or the main manifest duration? */
-        duration = gst_mss_manifest_get_gst_duration (mssdemux->manifest);
-
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0) {
-          gst_query_set_duration (query, GST_FORMAT_TIME, duration);
-          ret = TRUE;
-        }
-      }
-      GST_INFO_OBJECT (mssdemux, "GST_QUERY_DURATION returns %s with duration %"
-          GST_TIME_FORMAT, ret ? "TRUE" : "FALSE", GST_TIME_ARGS (duration));
-      break;
-    }
-    case GST_QUERY_LATENCY:{
-      gboolean live = FALSE;
-
-      live = mssdemux->manifest
-          && gst_mss_manifest_is_live (mssdemux->manifest);
-
-      gst_query_set_latency (query, live, 0, -1);
-      ret = TRUE;
-      break;
-    }
-    case GST_QUERY_SEEKING:{
-      GstFormat fmt;
-      gint64 stop = -1;
-
-      if (!mssdemux->manifest) {
-        return FALSE;           /* no seeking without manifest */
-      } else if (gst_mss_manifest_is_live (mssdemux->manifest)) {
-        return FALSE;           /* no live seeking */
-      }
-
-      gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
-      GST_INFO_OBJECT (mssdemux, "Received GST_QUERY_SEEKING with format %d",
-          fmt);
-      if (fmt == GST_FORMAT_TIME) {
-        GstClockTime duration;
-        duration = gst_mss_manifest_get_gst_duration (mssdemux->manifest);
-        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0)
-          stop = duration;
-        gst_query_set_seeking (query, fmt, TRUE, 0, stop);
-        ret = TRUE;
-        GST_INFO_OBJECT (mssdemux, "GST_QUERY_SEEKING returning with stop : %"
-            GST_TIME_FORMAT, GST_TIME_ARGS (stop));
-      }
-      break;
-    }
-    default:
-      /* Don't fordward queries upstream because of the special nature of this
-       *  "demuxer", which relies on the upstream element only to be fed
-       *  the Manifest
-       */
-      break;
-  }
-
-  return ret;
-}
-
-static void
-_set_src_pad_functions (GstPad * pad)
-{
-  gst_pad_set_query_function (pad, GST_DEBUG_FUNCPTR (gst_mss_demux_src_query));
-  gst_pad_set_event_function (pad, GST_DEBUG_FUNCPTR (gst_mss_demux_src_event));
+  return gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING,
+      "mss-fragmented", "timescale", G_TYPE_UINT64,
+      gst_mss_stream_get_timescale (stream->manifest_stream), "media-caps",
+      GST_TYPE_CAPS, caps, NULL);
 }
 
 static GstPad *
@@ -786,13 +364,13 @@
     return NULL;
   }
 
-  _set_src_pad_functions (srcpad);
   return srcpad;
 }
 
-static void
-gst_mss_demux_create_streams (GstMssDemux * mssdemux)
+static gboolean
+gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
 {
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
   GSList *streams = gst_mss_manifest_get_streams (mssdemux->manifest);
   GSList *iter;
 
@@ -801,13 +379,19 @@
     GST_ELEMENT_ERROR (mssdemux, STREAM, DEMUX,
         (_("This file contains no playable streams.")),
         ("no streams found at the Manifest"));
-    return;
+    return FALSE;
   }
 
+  GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %u",
+      demux->connection_speed);
+  gst_mss_manifest_change_bitrate (mssdemux->manifest, demux->connection_speed);
+
   for (iter = streams; iter; iter = g_slist_next (iter)) {
     GstPad *srcpad = NULL;
     GstMssDemuxStream *stream = NULL;
     GstMssStream *manifeststream = iter->data;
+    GstCaps *caps;
+    const gchar *lang;
 
     srcpad = _create_pad (mssdemux, manifeststream);
 
@@ -815,220 +399,45 @@
       continue;
     }
 
-    stream = gst_mss_demux_stream_new (mssdemux, manifeststream, srcpad);
-    gst_pad_set_element_private (srcpad, stream);
+    stream = (GstMssDemuxStream *)
+        gst_adaptive_demux_stream_new (GST_ADAPTIVE_DEMUX_CAST (mssdemux),
+        srcpad);
+    stream->manifest_stream = manifeststream;
     gst_mss_stream_set_active (manifeststream, TRUE);
-    mssdemux->streams = g_slist_append (mssdemux->streams, stream);
-  }
-
-  /* select initial bitrates */
-  GST_OBJECT_LOCK (mssdemux);
-  GST_INFO_OBJECT (mssdemux, "Changing max bitrate to %" G_GUINT64_FORMAT,
-      mssdemux->connection_speed);
-  gst_mss_manifest_change_bitrate (mssdemux->manifest,
-      mssdemux->connection_speed);
-  mssdemux->update_bitrates = FALSE;
-  GST_OBJECT_UNLOCK (mssdemux);
-}
-
-static GstCaps *
-create_mss_caps (GstMssDemuxStream * stream, GstCaps * caps)
-{
-  return gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING,
-      "mss-fragmented", "timescale", G_TYPE_UINT64,
-      gst_mss_stream_get_timescale (stream->manifest_stream), "media-caps",
-      GST_TYPE_CAPS, caps, NULL);
-}
-
-static gboolean
-gst_mss_demux_expose_stream (GstMssDemux * mssdemux, GstMssDemuxStream * stream)
-{
-  GstCaps *caps;
-  GstCaps *media_caps;
-  GstPad *pad = stream->pad;
-
-  media_caps = gst_mss_stream_get_caps (stream->manifest_stream);
-
-  if (media_caps) {
-    gchar *name = gst_pad_get_name (pad);
-    const gchar *lang;
-    GstEvent *event;
-    gchar *stream_id;
-    gst_pad_set_active (pad, TRUE);
-
-    caps = create_mss_caps (stream, media_caps);
-    gst_caps_unref (media_caps);
-
-    stream_id =
-        gst_pad_create_stream_id (pad, GST_ELEMENT_CAST (mssdemux), name);
-
-    event =
-        gst_pad_get_sticky_event (mssdemux->sinkpad, GST_EVENT_STREAM_START, 0);
-    if (event) {
-      if (gst_event_parse_group_id (event, &mssdemux->group_id))
-        mssdemux->have_group_id = TRUE;
-      else
-        mssdemux->have_group_id = FALSE;
-      gst_event_unref (event);
-    } else if (!mssdemux->have_group_id) {
-      mssdemux->have_group_id = TRUE;
-      mssdemux->group_id = gst_util_group_id_next ();
-    }
-    event = gst_event_new_stream_start (stream_id);
-    if (mssdemux->have_group_id)
-      gst_event_set_group_id (event, mssdemux->group_id);
-
-    gst_pad_push_event (pad, event);
-    g_free (stream_id);
-    g_free (name);
-
-    gst_pad_set_caps (pad, caps);
-    if (stream->caps)
-      gst_caps_unref (stream->caps);
-    stream->caps = caps;
+    caps = gst_mss_stream_get_caps (stream->manifest_stream);
+    gst_adaptive_demux_stream_set_caps (GST_ADAPTIVE_DEMUX_STREAM_CAST (stream),
+        create_mss_caps (stream, caps));
+    gst_caps_unref (caps);
 
     lang = gst_mss_stream_get_lang (stream->manifest_stream);
     if (lang != NULL) {
       GstTagList *tags;
 
       tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL);
-      gst_pad_push_event (stream->pad, gst_event_new_tag (tags));
-    }
-
-    gst_pad_push_event (stream->pad, gst_event_new_segment (&stream->segment));
-
-    GST_INFO_OBJECT (mssdemux, "Adding srcpad %s:%s with caps %" GST_PTR_FORMAT,
-        GST_DEBUG_PAD_NAME (pad), caps);
-    gst_object_ref (pad);
-
-    gst_element_add_pad (GST_ELEMENT_CAST (mssdemux), pad);
-  } else {
-    GST_WARNING_OBJECT (mssdemux,
-        "Couldn't get caps from manifest stream %p %s, not exposing it", stream,
-        GST_PAD_NAME (stream->pad));
-    return FALSE;
-  }
-  return TRUE;
-}
-
-static gboolean
-gst_mss_demux_process_manifest (GstMssDemux * mssdemux)
-{
-  GstQuery *query;
-  gboolean ret;
-  GSList *iter;
-
-  g_return_val_if_fail (mssdemux->manifest_buffer != NULL, FALSE);
-  g_return_val_if_fail (mssdemux->manifest == NULL, FALSE);
-
-  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_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 (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");
-    }
-
-    g_free (uri);
-    g_free (redirect_uri);
-  }
-  gst_query_unref (query);
-
-  if (mssdemux->base_url == NULL) {
-    GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND,
-        (_("Couldn't get the Manifest's URI")),
-        ("need to get the manifest's URI from upstream elements"));
-    return FALSE;
-  }
-
-  GST_INFO_OBJECT (mssdemux, "Received manifest: %i bytes",
-      (gint) gst_buffer_get_size (mssdemux->manifest_buffer));
-
-  mssdemux->manifest = gst_mss_manifest_new (mssdemux->manifest_buffer);
-  if (!mssdemux->manifest) {
-    GST_ELEMENT_ERROR (mssdemux, STREAM, FORMAT, ("Bad manifest file"),
-        ("Xml manifest file couldn't be parsed"));
-    return FALSE;
-  }
-
-  GST_INFO_OBJECT (mssdemux, "Live stream: %d",
-      gst_mss_manifest_is_live (mssdemux->manifest));
-
-  gst_mss_demux_create_streams (mssdemux);
-  for (iter = mssdemux->streams; iter;) {
-    GSList *current = iter;
-    GstMssDemuxStream *stream = iter->data;
-    iter = g_slist_next (iter); /* do it ourselves as we want it done in the beginning of the loop */
-    if (!gst_mss_demux_expose_stream (mssdemux, stream)) {
-      gst_mss_demux_stream_free (stream);
-      mssdemux->streams = g_slist_delete_link (mssdemux->streams, current);
+      gst_adaptive_demux_stream_set_tags (GST_ADAPTIVE_DEMUX_STREAM_CAST
+          (stream), tags);
     }
   }
 
-  if (!mssdemux->streams) {
-    /* no streams */
-    GST_WARNING_OBJECT (mssdemux, "Couldn't identify the caps for any of the "
-        "streams found in the manifest");
-    GST_ELEMENT_ERROR (mssdemux, STREAM, DEMUX,
-        (_("This file contains no playable streams.")),
-        ("No known stream formats found at the Manifest"));
-    return FALSE;
-  }
-
-  gst_element_no_more_pads (GST_ELEMENT_CAST (mssdemux));
   return TRUE;
 }
 
 static void
-gst_mss_demux_reload_manifest (GstMssDemux * mssdemux)
+gst_mss_demux_update_base_url (GstMssDemux * mssdemux)
 {
-  GstUriDownloader *downloader;
-  GstFragment *manifest_data;
-  GstBuffer *manifest_buffer;
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (mssdemux);
   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);
+      g_strdup (demux->manifest_base_uri ? demux->manifest_base_uri : demux->
+      manifest_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';
@@ -1036,581 +445,116 @@
     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);
-
-  gst_mss_manifest_reload_fragments (mssdemux->manifest, manifest_buffer);
-  gst_buffer_replace (&mssdemux->manifest_buffer, manifest_buffer);
-  gst_buffer_unref (manifest_buffer);
-
-  g_object_unref (downloader);
 }
 
-static GstEvent *
-gst_mss_demux_reconfigure_stream (GstMssDemuxStream * stream)
+static gboolean
+gst_mss_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf)
 {
-  GstEvent *capsevent = NULL;
-  GstMssDemux *mssdemux = stream->parent;
-  guint64 bitrate = 0;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
-  if (stream->download_total_time)
-    bitrate =
-        (stream->download_total_bytes * 8) /
-        ((double) stream->download_total_time / G_GUINT64_CONSTANT (1000000));
+  gst_mss_demux_update_base_url (mssdemux);
 
-  if (stream->current_download_rate != -1)
-    bitrate = (stream->current_download_rate + bitrate * 3) / 4;
-  if (bitrate > G_MAXINT)
-    bitrate = G_MAXINT;
-  stream->current_download_rate = bitrate;
-  bitrate *= mssdemux->bitrate_limit;
-
-  if (mssdemux->connection_speed) {
-    bitrate = MIN (mssdemux->connection_speed, bitrate);
+  mssdemux->manifest = gst_mss_manifest_new (buf);
+  if (!mssdemux->manifest) {
+    GST_ELEMENT_ERROR (mssdemux, STREAM, FORMAT, ("Bad manifest file"),
+        ("Xml manifest file couldn't be parsed"));
+    return FALSE;
   }
+  return gst_mss_demux_setup_streams (demux);
+}
+
+static gboolean
+gst_mss_demux_stream_select_bitrate (GstAdaptiveDemuxStream * stream,
+    guint64 bitrate)
+{
+  GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
+  gboolean ret = FALSE;
 
   GST_DEBUG_OBJECT (stream->pad,
-      "Current stream download bitrate %" G_GUINT64_FORMAT, bitrate);
+      "Using stream download bitrate %" G_GUINT64_FORMAT, bitrate);
 
-  if (gst_mss_stream_select_bitrate (stream->manifest_stream, bitrate)) {
+  if (gst_mss_stream_select_bitrate (mssstream->manifest_stream, bitrate)) {
     GstCaps *caps;
-    caps = gst_mss_stream_get_caps (stream->manifest_stream);
+    GstCaps *msscaps;
+    caps = gst_mss_stream_get_caps (mssstream->manifest_stream);
 
     GST_DEBUG_OBJECT (stream->pad,
         "Starting streams reconfiguration due to bitrate changes");
-    if (stream->caps)
-      gst_caps_unref (stream->caps);
-    stream->caps = create_mss_caps (stream, caps);
+    msscaps = create_mss_caps (mssstream, caps);
 
     GST_DEBUG_OBJECT (stream->pad,
         "Stream changed bitrate to %" G_GUINT64_FORMAT " caps: %"
         GST_PTR_FORMAT,
-        gst_mss_stream_get_current_bitrate (stream->manifest_stream), caps);
+        gst_mss_stream_get_current_bitrate (mssstream->manifest_stream), caps);
 
     gst_caps_unref (caps);
 
-    capsevent = gst_event_new_caps (stream->caps);
+    gst_adaptive_demux_stream_set_caps (stream, msscaps);
+    ret = TRUE;
     GST_DEBUG_OBJECT (stream->pad, "Finished streams reconfiguration");
   }
-  return capsevent;
-}
-
-static GstFlowReturn
-_src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
-{
-  GstPad *srcpad = (GstPad *) parent;
-  GstMssDemux *demux = (GstMssDemux *) GST_PAD_PARENT (srcpad);
-  GstMssDemuxStream *stream = gst_pad_get_element_private (srcpad);
-  GstFlowReturn ret;
-  gboolean discont = FALSE;
-
-  if (stream->starting_fragment) {
-#if 0
-    if (demux->segment.rate < 0)
-      /* Set DISCONT flag for every first buffer in reverse playback mode
-       * as each fragment for its own has to be reversed */
-      discont = TRUE;
-#endif
-    stream->starting_fragment = FALSE;
-
-    GST_BUFFER_PTS (buffer) =
-        gst_mss_stream_get_fragment_gst_timestamp (stream->manifest_stream);
-
-    GST_LOG_OBJECT (stream->pad, "set fragment pts=%" GST_TIME_FORMAT,
-        GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
-
-    if (stream->pending_segment) {
-      /* And send a newsegment */
-      gst_pad_push_event (stream->pad, stream->pending_segment);
-      stream->pending_segment = NULL;
-    }
-    stream->segment.position = GST_BUFFER_PTS (buffer);
-
-  } else {
-    GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
-  }
-
-  if (discont) {
-    GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous");
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-  } else {
-    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
-  }
-
-  GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
-  GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
-
-  /* accumulate time and size to get this chunk */
-  stream->download_total_time +=
-      g_get_monotonic_time () - stream->download_start_time;
-  stream->download_total_bytes += gst_buffer_get_size (buffer);
-
-  stream->have_data = TRUE;
-
-  ret = gst_proxy_pad_chain_default (pad, parent, buffer);
-  stream->download_start_time = g_get_monotonic_time ();
-  GST_LOG_OBJECT (pad, "Chain res: %d %s", ret, gst_flow_get_name (ret));
-
-  if (ret != GST_FLOW_OK) {
-    if (ret < GST_FLOW_EOS) {
-      GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
-          ("stream stopped, reason %s", gst_flow_get_name (ret)));
-
-      /* TODO push this on all pads */
-      gst_pad_push_event (stream->pad, gst_event_new_eos ());
-    } else {
-      GST_DEBUG_OBJECT (stream->pad, "stream stopped, reason %s",
-          gst_flow_get_name (ret));
-    }
-
-    /* TODO properly stop tasks */
-    /* gst_hls_demux_pause_tasks (demux); */
-  }
-
-  /* avoid having the source handle the same error again */
-  stream->last_ret = ret;
-  ret = GST_FLOW_OK;
-
   return ret;
 }
 
 static gboolean
-_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
 {
-  GstPad *srcpad = GST_PAD_CAST (parent);
-  GstMssDemuxStream *stream = gst_pad_get_element_private (srcpad);
+  gdouble rate;
+  GstFormat format;
+  GstSeekFlags flags;
+  GstSeekType start_type, stop_type;
+  gint64 start, stop;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      g_cond_signal (&stream->fragment_download_cond);
-      break;
-    default:
-      break;
-  }
+  gst_event_parse_seek (seek, &rate, &format, &flags, &start_type, &start,
+      &stop_type, &stop);
 
-  gst_event_unref (event);
+  GST_DEBUG_OBJECT (mssdemux,
+      "seek event, rate: %f start: %" GST_TIME_FORMAT " stop: %"
+      GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
+
+  gst_mss_manifest_seek (mssdemux->manifest, start);
 
   return TRUE;
 }
 
 static gboolean
-_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_mss_demux_stream_has_next_fragment (GstAdaptiveDemuxStream * stream)
 {
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_ALLOCATION:
-      return FALSE;
-      break;
-    default:
-      break;
-  }
+  GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
 
-  return gst_pad_query_default (pad, parent, query);
+  return gst_mss_stream_has_next_fragment (mssstream->manifest_stream);
 }
 
-static gboolean
-gst_mss_demux_stream_update_source (GstMssDemuxStream * stream,
-    const gchar * uri, const gchar * referer, gboolean refresh,
-    gboolean allow_cache)
+static gint64
+gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux)
 {
-  GstMssDemux *demux = stream->parent;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
+  GstClockTime interval;
 
-  if (!gst_uri_is_valid (uri)) {
-    GST_WARNING_OBJECT (stream->pad, "Invalid URI: %s", uri);
-    stream->last_ret = GST_FLOW_ERROR;
-    return FALSE;
-  }
+  /* Not much information about this in the MSS spec. It seems that
+   * the fragments contain an UUID box that should tell the next
+   * fragments time and duration so one wouldn't need to fetch
+   * the Manifest again, but we need a fallback here. So use 2 times
+   * the current fragment duration */
 
-  if (stream->src != NULL) {
-    gchar *old_protocol, *new_protocol;
-    gchar *old_uri;
+  interval = gst_mss_manifest_get_min_fragment_duration (mssdemux->manifest);
+  if (!GST_CLOCK_TIME_IS_VALID (interval))
+    interval = 2 * GST_SECOND;  /* default to 2 seconds */
 
-    old_uri = gst_uri_handler_get_uri (GST_URI_HANDLER (stream->src));
-    old_protocol = gst_uri_get_protocol (old_uri);
-    new_protocol = gst_uri_get_protocol (uri);
+  interval = 2 * (interval / GST_USECOND);
 
-    if (!g_str_equal (old_protocol, new_protocol)) {
-      gst_object_unref (stream->src_srcpad);
-      gst_element_set_state (stream->src, GST_STATE_NULL);
-      gst_bin_remove (GST_BIN_CAST (demux), stream->src);
-      stream->src = NULL;
-      stream->src_srcpad = NULL;
-      GST_DEBUG_OBJECT (demux, "Can't re-use old source element");
-    } else {
-      GError *err = NULL;
-
-      GST_DEBUG_OBJECT (demux, "Re-using old source element");
-      if (!gst_uri_handler_set_uri (GST_URI_HANDLER (stream->src), uri, &err)) {
-        GST_DEBUG_OBJECT (demux, "Failed to re-use old source element: %s",
-            err->message);
-        g_clear_error (&err);
-        gst_element_set_state (stream->src, GST_STATE_NULL);
-        gst_bin_remove (GST_BIN_CAST (demux), stream->src);
-        stream->src = NULL;
-      }
-    }
-    g_free (old_uri);
-    g_free (old_protocol);
-    g_free (new_protocol);
-  }
-
-  if (stream->src == NULL) {
-    GObjectClass *gobject_class;
-    GstPad *internal_pad;
-
-    stream->src = gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL);
-    if (stream->src == NULL) {
-      GST_ELEMENT_ERROR (demux, CORE, MISSING_PLUGIN,
-          ("Missing plugin to handle URI: '%s'", uri), (NULL));
-      return FALSE;
-    }
-
-    gobject_class = G_OBJECT_GET_CLASS (stream->src);
-
-    if (g_object_class_find_property (gobject_class, "compress"))
-      g_object_set (stream->src, "compress", FALSE, NULL);
-    if (g_object_class_find_property (gobject_class, "keep-alive"))
-      g_object_set (stream->src, "keep-alive", TRUE, NULL);
-    if (g_object_class_find_property (gobject_class, "extra-headers")) {
-      if (referer || refresh || !allow_cache) {
-        GstStructure *extra_headers = gst_structure_new_empty ("headers");
-
-        if (referer)
-          gst_structure_set (extra_headers, "Referer", G_TYPE_STRING, referer,
-              NULL);
-
-        if (!allow_cache)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "no-cache", NULL);
-        else if (refresh)
-          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
-              "max-age=0", NULL);
-
-        g_object_set (stream->src, "extra-headers", extra_headers, NULL);
-
-        gst_structure_free (extra_headers);
-      } else {
-        g_object_set (stream->src, "extra-headers", NULL, NULL);
-      }
-    }
-
-    gst_element_set_locked_state (stream->src, TRUE);
-    gst_bin_add (GST_BIN_CAST (demux), stream->src);
-    stream->src_srcpad = gst_element_get_static_pad (stream->src, "src");
-
-    gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (stream->pad),
-        stream->src_srcpad);
-
-    /* set up our internal pad to drop all events from
-     * the http src we don't care about. On the chain function
-     * we just push the buffer forward, but this way dash can get
-     * the flow return from downstream */
-    internal_pad =
-        GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (stream->pad)));
-    gst_pad_set_chain_function (GST_PAD_CAST (internal_pad), _src_chain);
-    gst_pad_set_event_function (GST_PAD_CAST (internal_pad), _src_event);
-    /* need to set query otherwise deadlocks happen with allocation queries */
-    gst_pad_set_query_function (GST_PAD_CAST (internal_pad), _src_query);
-    gst_object_unref (internal_pad);
-  }
-  return TRUE;
-}
-
-/* must be called with the stream's fragment_download_lock */
-static void
-gst_mss_demux_stream_download_uri (GstMssDemux * demux,
-    GstMssDemuxStream * stream, const gchar * uri, gint64 start, gint64 end)
-{
-  GST_DEBUG_OBJECT (stream->pad, "Downloading uri: %s, range:%" G_GINT64_FORMAT
-      " - %" G_GINT64_FORMAT, uri, start, end);
-
-  if (!gst_mss_demux_stream_update_source (stream, uri, NULL, FALSE, TRUE)) {
-    return;
-  }
-
-  if (gst_element_set_state (stream->src,
-          GST_STATE_READY) != GST_STATE_CHANGE_FAILURE) {
-    if (start != 0 || end != -1) {
-      if (!gst_element_send_event (stream->src, gst_event_new_seek (1.0,
-                  GST_FORMAT_BYTES, (GstSeekFlags) GST_SEEK_FLAG_FLUSH,
-                  GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, end))) {
-
-        /* looks like the source can't handle seeks in READY */
-/*
-        *err = g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_NOT_IMPLEMENTED,
-            "Source element can't handle range requests");
-*/
-        stream->last_ret = GST_FLOW_ERROR;
-      }
-    }
-
-    if (G_LIKELY (stream->last_ret == GST_FLOW_OK)) {
-      /* flush the proxypads so that the EOS state is reset */
-      gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_start ());
-      gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_stop (TRUE));
-
-      stream->download_start_time = g_get_monotonic_time ();
-      gst_element_sync_state_with_parent (stream->src);
-
-      /* wait for the fragment to be completely downloaded */
-      GST_DEBUG_OBJECT (stream->pad,
-          "Waiting for fragment download to finish: %s", uri);
-      g_cond_wait (&stream->fragment_download_cond,
-          &stream->fragment_download_lock);
-    }
-  } else {
-    stream->last_ret = GST_FLOW_CUSTOM_ERROR;
-  }
-
-  gst_element_set_state (stream->src, GST_STATE_READY);
+  return interval;
 }
 
 static GstFlowReturn
-gst_mss_demux_stream_download_fragment (GstMssDemuxStream * stream)
+gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+    GstBuffer * buffer)
 {
-  GstMssDemux *mssdemux = stream->parent;
-  gchar *path = NULL;
-  gchar *url = NULL;
-  GstFlowReturn ret = GST_FLOW_OK;
+  GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
 
-  /* special case for not-linked streams */
-  if (stream->last_ret == GST_FLOW_NOT_LINKED) {
-    GST_DEBUG_OBJECT (stream->pad, "Skipping download for not-linked stream %p",
-        stream);
-    return GST_FLOW_NOT_LINKED;
-  }
+  gst_mss_demux_update_base_url (mssdemux);
 
-  g_mutex_lock (&stream->fragment_download_lock);
-  GST_DEBUG_OBJECT (stream->pad, "Getting url for stream");
-  ret = gst_mss_stream_get_fragment_url (stream->manifest_stream, &path);
-  switch (ret) {
-    case GST_FLOW_OK:
-      break;                    /* all is good, let's go */
-    case GST_FLOW_EOS:
-      g_free (path);
-      if (gst_mss_manifest_is_live (mssdemux->manifest)) {
-        gst_mss_demux_reload_manifest (mssdemux);
-        g_mutex_unlock (&stream->fragment_download_lock);
-        return GST_FLOW_OK;
-      }
-      g_mutex_unlock (&stream->fragment_download_lock);
-      return GST_FLOW_EOS;
-    case GST_FLOW_ERROR:
-      g_mutex_unlock (&stream->fragment_download_lock);
-      g_free (path);
-      goto error;
-    default:
-      break;
-  }
-  if (!path) {
-    goto no_url_error;
-  }
-  GST_DEBUG_OBJECT (mssdemux, "Got url path '%s' for stream %p", path, stream);
-
-  url = g_strdup_printf ("%s/%s", mssdemux->base_url, path);
-
-  GST_DEBUG_OBJECT (mssdemux, "Got url '%s' for stream %p", url, stream);
-
-  stream->starting_fragment = TRUE;
-
-  gst_mss_demux_stream_download_uri (mssdemux, stream, url, 0, -1);
-
-  g_free (path);
-  g_free (url);
-  g_mutex_unlock (&stream->fragment_download_lock);
-
-  if (stream->last_ret != GST_FLOW_OK) {
-    GST_INFO_OBJECT (mssdemux, "No fragment downloaded");
-    /* TODO check if we are truly stoping */
-    if (stream->last_ret != GST_FLOW_ERROR
-        && gst_mss_manifest_is_live (mssdemux->manifest)) {
-      /* looks like there is no way of knowing when a live stream has ended
-       * Have to assume we are falling behind and cause a manifest reload */
-      return GST_FLOW_OK;
-    }
-  }
-
-  return stream->last_ret;
-
-no_url_error:
-  {
-    GST_ELEMENT_ERROR (mssdemux, STREAM, DEMUX,
-        (_("Failed to get fragment URL.")),
-        ("An error happened when getting fragment URL"));
-    gst_task_pause (stream->download_task);
-    return GST_FLOW_ERROR;
-  }
-error:
-  {
-    GST_WARNING_OBJECT (mssdemux, "Error while pushing fragment");
-    gst_task_pause (stream->download_task);
-    return GST_FLOW_ERROR;
-  }
-}
-
-static void
-gst_mss_demux_download_loop (GstMssDemuxStream * stream)
-{
-  GstMssDemux *mssdemux = stream->parent;
-  GstFlowReturn ret;
-  GstEvent *gap = NULL;
-  GstEvent *capsevent = NULL;
-
-  GST_LOG_OBJECT (stream->pad, "download loop start");
-
-  GST_OBJECT_LOCK (mssdemux);
-  if (G_UNLIKELY (stream->restart_download)) {
-    GstClockTime cur, ts;
-    gint64 pos;
-
-    GST_DEBUG_OBJECT (stream->pad,
-        "Activating stream due to reconfigure event");
-
-    cur = stream->segment.position;
-
-    if (gst_pad_peer_query_position (stream->pad, GST_FORMAT_TIME, &pos)) {
-      ts = (GstClockTime) pos;
-      GST_DEBUG_OBJECT (mssdemux, "Downstream position: %"
-          GST_TIME_FORMAT, GST_TIME_ARGS (ts));
-    } else {
-      GST_DEBUG_OBJECT (mssdemux, "Downstream position query failed, "
-          "failling back to segment position");
-      ts = stream->segment.position;
-    }
-
-    /* we might have already pushed this data */
-    ts = MAX (ts, cur);
-
-    GST_DEBUG_OBJECT (stream->pad, "Restarting stream at "
-        "position %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
-
-    if (GST_CLOCK_TIME_IS_VALID (ts)) {
-      gst_mss_stream_seek (stream->manifest_stream, ts);
-
-      if (cur < ts) {
-        gap = gst_event_new_gap (cur, ts - cur);
-      }
-    }
-
-    stream->restart_download = FALSE;
-    stream->last_ret = GST_FLOW_OK;
-  }
-  capsevent = gst_mss_demux_reconfigure_stream (stream);
-  GST_OBJECT_UNLOCK (mssdemux);
-
-  if (G_UNLIKELY (gap != NULL))
-    gst_pad_push_event (stream->pad, gap);
-  if (G_UNLIKELY (capsevent != NULL))
-    gst_pad_push_event (stream->pad, capsevent);
-
-  ret = gst_mss_demux_stream_download_fragment (stream);
-
-  GST_OBJECT_LOCK (mssdemux);
-  if (stream->cancelled) {
-    GST_OBJECT_UNLOCK (mssdemux);
-    stream->last_ret = GST_FLOW_FLUSHING;
-    goto cancelled;
-  }
-
-  switch (ret) {
-    case GST_FLOW_OK:
-      stream->download_error_count = 0;
-      stream->segment.position +=
-          gst_mss_stream_get_fragment_gst_duration (stream->manifest_stream);
-      gst_mss_stream_advance_fragment (stream->manifest_stream);
-      break;                    /* all is good, let's go */
-
-    case GST_FLOW_EOS:
-      GST_DEBUG_OBJECT (stream->pad, "EOS, stopping download loop");
-      /* we push the EOS after releasing the object lock */
-      gst_task_pause (stream->download_task);
-      break;
-
-    case GST_FLOW_NOT_LINKED:
-      gst_task_pause (stream->download_task);
-      if (gst_mss_demux_combine_flows (mssdemux) == GST_FLOW_NOT_LINKED) {
-        GST_ELEMENT_ERROR (mssdemux, STREAM, FAILED,
-            (_("Internal data stream error.")),
-            ("stream stopped, reason %s",
-                gst_flow_get_name (GST_FLOW_NOT_LINKED)));
-      }
-      break;
-
-    case GST_FLOW_FLUSHING:{
-      GSList *iter;
-
-      for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-        GstMssDemuxStream *other;
-
-        other = iter->data;
-        gst_task_pause (other->download_task);
-      }
-    }
-      break;
-
-    default:
-      if (ret <= GST_FLOW_ERROR) {
-        GST_WARNING_OBJECT (mssdemux, "Error while downloading fragment");
-        if (++stream->download_error_count >= MAX_DOWNLOAD_ERROR_COUNT) {
-          goto download_error;
-        }
-      }
-      break;
-  }
-  GST_OBJECT_UNLOCK (mssdemux);
-
-  if (G_UNLIKELY (ret == GST_FLOW_EOS)) {
-    gst_mss_demux_stream_push_event (stream, gst_event_new_eos ());
-  }
-
-end:
-  GST_LOG_OBJECT (stream->pad, "download loop end");
-  return;
-
-cancelled:
-  {
-    GST_DEBUG_OBJECT (stream->pad, "Stream has been cancelled");
-    goto end;
-  }
-download_error:
-  {
-    GST_OBJECT_UNLOCK (mssdemux);
-    GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND,
-        (_("Couldn't download fragments")),
-        ("fragment downloading has failed too much consecutive times"));
-    goto end;
-  }
-}
-
-static GstFlowReturn
-gst_mss_demux_combine_flows (GstMssDemux * mssdemux)
-{
-  gboolean all_notlinked = TRUE;
-  GSList *iter;
-
-  for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) {
-    GstMssDemuxStream *stream = iter->data;
-
-    if (stream->last_ret != GST_FLOW_NOT_LINKED)
-      all_notlinked = FALSE;
-
-    if (stream->last_ret <= GST_FLOW_NOT_NEGOTIATED
-        || stream->last_ret == GST_FLOW_FLUSHING)
-      return stream->last_ret;
-  }
-  if (all_notlinked)
-    return GST_FLOW_NOT_LINKED;
+  gst_mss_manifest_reload_fragments (mssdemux->manifest, buffer);
   return GST_FLOW_OK;
 }
-
-static gboolean
-gst_mss_demux_stream_push_event (GstMssDemuxStream * stream, GstEvent * event)
-{
-  gboolean ret;
-
-  if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
-    stream->eos = TRUE;
-  }
-  GST_DEBUG_OBJECT (stream->pad, "Pushing event %" GST_PTR_FORMAT, event);
-  ret = gst_pad_push_event (stream->pad, event);
-  return ret;
-}
diff --git a/ext/smoothstreaming/gstmssdemux.h b/ext/smoothstreaming/gstmssdemux.h
index 284c59d..cc5ff7f 100644
--- a/ext/smoothstreaming/gstmssdemux.h
+++ b/ext/smoothstreaming/gstmssdemux.h
@@ -24,6 +24,7 @@
 #define __GST_MSSDEMUX_H__
 
 #include <gst/gst.h>
+#include <gst/adaptivedemux/gstadaptivedemux.h>
 #include <gst/base/gstadapter.h>
 #include <gst/base/gstdataqueue.h>
 #include "gstmssmanifest.h"
@@ -52,75 +53,29 @@
 typedef struct _GstMssDemuxClass GstMssDemuxClass;
 
 struct _GstMssDemuxStream {
-  GstPad *pad;
-
-  GstCaps *caps;
-
-  GstMssDemux *parent;
+  GstAdaptiveDemuxStream parent;
 
   GstMssStream *manifest_stream;
-
-#if 0
-  GstUriDownloader *downloader;
-#endif
-
-  GstEvent *pending_segment;
-
-  GstSegment segment;
-
-  /* Downloading task */
-  GstTask *download_task;
-  GRecMutex download_lock;
-
-  GstFlowReturn last_ret;
-  gboolean eos;
-  gboolean have_data;
-  gboolean cancelled;
-  gboolean restart_download;
-
-  guint download_error_count;
-
-  /* download tooling */
-  GstElement *src;
-  GstPad *src_srcpad;
-  GMutex fragment_download_lock;
-  GCond fragment_download_cond;
-  gboolean starting_fragment;
-  gint64 download_start_time;
-  gint64 download_total_time;
-  gint64 download_total_bytes;
-  gint current_download_rate;
 };
 
 struct _GstMssDemux {
-  GstBin bin;
+  GstAdaptiveDemux bin;
 
   /* pads */
   GstPad *sinkpad;
 
-  gboolean have_group_id;
-  guint group_id;
-
-  GstBuffer *manifest_buffer;
-
   GstMssManifest *manifest;
   gchar *base_url;
-  gchar *manifest_uri;
 
-  GSList *streams;
   guint n_videos;
   guint n_audios;
 
-  gboolean update_bitrates;
-
   /* properties */
-  guint64 connection_speed; /* in bps */
   guint data_queue_max_size;
-  gfloat bitrate_limit;
 };
 
 struct _GstMssDemuxClass {
-  GstBinClass parent_class;
+  GstAdaptiveDemuxClass parent_class;
 };
 
 GType gst_mss_demux_get_type (void);
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
index 5582b03..e92e3da 100644
--- a/ext/smoothstreaming/gstmssmanifest.c
+++ b/ext/smoothstreaming/gstmssmanifest.c
@@ -44,6 +44,7 @@
 #define MSS_PROP_DURATION             "d"
 #define MSS_PROP_LANGUAGE             "Language"
 #define MSS_PROP_NUMBER               "n"
+#define MSS_PROP_REPETITIONS          "r"
 #define MSS_PROP_STREAM_DURATION      "Duration"
 #define MSS_PROP_TIME                 "t"
 #define MSS_PROP_TIMESCALE            "TimeScale"
@@ -54,6 +55,7 @@
   guint number;
   guint64 time;
   guint64 duration;
+  guint repetitions;
 } GstMssStreamFragment;
 
 typedef struct _GstMssStreamQuality
@@ -77,6 +79,7 @@
   gchar *url;
   gchar *lang;
 
+  guint fragment_repetition_index;
   GList *current_fragment;
   GList *current_quality;
 
@@ -95,6 +98,93 @@
   GSList *streams;
 };
 
+/* For parsing and building a fragments list */
+typedef struct _GstMssFragmentListBuilder
+{
+  GList *fragments;
+
+  GstMssStreamFragment *previous_fragment;
+  guint fragment_number;
+  guint64 fragment_time_accum;
+} GstMssFragmentListBuilder;
+
+static void
+gst_mss_fragment_list_builder_init (GstMssFragmentListBuilder * builder)
+{
+  builder->fragments = NULL;
+  builder->previous_fragment = NULL;
+  builder->fragment_time_accum = 0;
+  builder->fragment_number = 0;
+}
+
+static void
+gst_mss_fragment_list_builder_add (GstMssFragmentListBuilder * builder,
+    xmlNodePtr node)
+{
+  gchar *duration_str;
+  gchar *time_str;
+  gchar *seqnum_str;
+  gchar *repetition_str;
+  GstMssStreamFragment *fragment = g_new (GstMssStreamFragment, 1);
+
+  duration_str = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_DURATION);
+  time_str = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_TIME);
+  seqnum_str = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_NUMBER);
+  repetition_str =
+      (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_REPETITIONS);
+
+  /* use the node's seq number or use the previous + 1 */
+  if (seqnum_str) {
+    fragment->number = g_ascii_strtoull (seqnum_str, NULL, 10);
+    xmlFree (seqnum_str);
+    builder->fragment_number = fragment->number;
+  } else {
+    fragment->number = builder->fragment_number;
+  }
+  builder->fragment_number = fragment->number + 1;
+
+  if (repetition_str) {
+    fragment->repetitions = g_ascii_strtoull (repetition_str, NULL, 10);
+    xmlFree (repetition_str);
+  } else {
+    fragment->repetitions = 1;
+  }
+
+  if (time_str) {
+    fragment->time = g_ascii_strtoull (time_str, NULL, 10);
+
+    xmlFree (time_str);
+    builder->fragment_time_accum = fragment->time;
+  } else {
+    fragment->time = builder->fragment_time_accum;
+  }
+
+  /* if we have a previous fragment, means we need to set its duration */
+  if (builder->previous_fragment)
+    builder->previous_fragment->duration =
+        (fragment->time -
+        builder->previous_fragment->time) /
+        builder->previous_fragment->repetitions;
+
+  if (duration_str) {
+    fragment->duration = g_ascii_strtoull (duration_str, NULL, 10);
+
+    builder->previous_fragment = NULL;
+    builder->fragment_time_accum += fragment->duration * fragment->repetitions;
+    xmlFree (duration_str);
+  } else {
+    /* store to set the duration at the next iteration */
+    builder->previous_fragment = fragment;
+  }
+
+  /* we reverse it later */
+  builder->fragments = g_list_prepend (builder->fragments, fragment);
+  GST_LOG ("Adding fragment number: %u, time: %" G_GUINT64_FORMAT
+      ", duration: %" G_GUINT64_FORMAT ", repetitions: %u",
+      fragment->number, fragment->time, fragment->duration,
+      fragment->repetitions);
+}
+
 static GstBuffer *gst_buffer_from_hex_string (const gchar * s);
 
 static gboolean
@@ -143,9 +233,9 @@
 _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
 {
   xmlNodePtr iter;
-  GstMssStreamFragment *previous_fragment = NULL;
-  guint fragment_number = 0;
-  guint64 fragment_time_accum = 0;
+  GstMssFragmentListBuilder builder;
+
+  gst_mss_fragment_list_builder_init (&builder);
 
   stream->xmlnode = node;
 
@@ -155,51 +245,7 @@
 
   for (iter = node->children; iter; iter = iter->next) {
     if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
-      gchar *duration_str;
-      gchar *time_str;
-      gchar *seqnum_str;
-      GstMssStreamFragment *fragment = g_new (GstMssStreamFragment, 1);
-
-      duration_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_DURATION);
-      time_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_TIME);
-      seqnum_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_NUMBER);
-
-      /* use the node's seq number or use the previous + 1 */
-      if (seqnum_str) {
-        fragment->number = g_ascii_strtoull (seqnum_str, NULL, 10);
-        xmlFree (seqnum_str);
-        fragment_number = fragment->number;
-      } else {
-        fragment->number = fragment_number;
-      }
-      fragment_number = fragment->number + 1;
-
-      if (time_str) {
-        fragment->time = g_ascii_strtoull (time_str, NULL, 10);
-
-        xmlFree (time_str);
-        fragment_time_accum = fragment->time;
-      } else {
-        fragment->time = fragment_time_accum;
-      }
-
-      /* if we have a previous fragment, means we need to set its duration */
-      if (previous_fragment)
-        previous_fragment->duration = fragment->time - previous_fragment->time;
-
-      if (duration_str) {
-        fragment->duration = g_ascii_strtoull (duration_str, NULL, 10);
-
-        previous_fragment = NULL;
-        fragment_time_accum += fragment->duration;
-        xmlFree (duration_str);
-      } else {
-        /* store to set the duration at the next iteration */
-        previous_fragment = fragment;
-      }
-
-      /* we reverse it later */
-      stream->fragments = g_list_prepend (stream->fragments, fragment);
+      gst_mss_fragment_list_builder_add (&builder, iter);
     } else if (node_has_type (iter, MSS_NODE_STREAM_QUALITY)) {
       GstMssStreamQuality *quality = gst_mss_stream_quality_new (iter);
       stream->qualities = g_list_prepend (stream->qualities, quality);
@@ -208,7 +254,7 @@
     }
   }
 
-  stream->fragments = g_list_reverse (stream->fragments);
+  stream->fragments = g_list_reverse (builder.fragments);
 
   /* order them from smaller to bigger based on bitrates */
   stream->qualities =
@@ -304,6 +350,8 @@
     ret = MSS_STREAM_TYPE_VIDEO;
   } else if (strcmp (prop, "audio") == 0) {
     ret = MSS_STREAM_TYPE_AUDIO;
+  } else {
+    GST_DEBUG ("Unsupported stream type: %s", prop);
   }
   xmlFree (prop);
   return ret;
@@ -421,7 +469,7 @@
   GstBuffer *buffer;
   gchar *sps_str;
   gchar *pps_str;
-  GstH264NalUnit nalu;
+  GstH264NalUnit nalu = { 0, };
   GstH264SPS sps_struct;
   GstH264ParserResult parseres;
   GstMapInfo spsinfo;
@@ -455,6 +503,8 @@
   nalu.offset = 0;
   nalu.sc_offset = 0;
   nalu.valid = TRUE;
+  nalu.header_bytes = 0;
+  nalu.extension_type = GST_H264_NAL_EXTENSION_NONE;
 
   parseres = gst_h264_parse_sps (&nalu, &sps_struct, TRUE);
   if (parseres == GST_H264_PARSER_OK) {
@@ -674,7 +724,8 @@
     gst_structure_set (structure, "rate", G_TYPE_INT, rate, NULL);
 
   if (q->bitrate)
-    gst_structure_set (structure, "bitrate", G_TYPE_INT, q->bitrate, NULL);
+    gst_structure_set (structure, "bitrate", G_TYPE_INT, (int) q->bitrate,
+        NULL);
 
   if (codec_data)
     gst_structure_set (structure, "codec_data", GST_TYPE_BUFFER, codec_data,
@@ -774,6 +825,29 @@
   return gstdur;
 }
 
+GstClockTime
+gst_mss_manifest_get_min_fragment_duration (GstMssManifest * manifest)
+{
+  GSList *iter;
+  GstClockTime dur = GST_CLOCK_TIME_NONE;
+  GstClockTime iter_dur;
+
+  for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
+    GstMssStream *stream = iter->data;
+
+    iter_dur = gst_mss_stream_get_fragment_gst_duration (stream);
+    if (iter_dur != GST_CLOCK_TIME_NONE && iter_dur != 0) {
+      if (GST_CLOCK_TIME_IS_VALID (dur)) {
+        dur = MIN (dur, iter_dur);
+      } else {
+        dur = iter_dur;
+      }
+    }
+  }
+
+  return dur;
+}
+
 GstCaps *
 gst_mss_stream_get_caps (GstMssStream * stream)
 {
@@ -794,6 +868,7 @@
 {
   gchar *tmp;
   gchar *start_time_str;
+  guint64 time;
   GstMssStreamFragment *fragment;
   GstMssStreamQuality *quality = stream->current_quality->data;
 
@@ -804,7 +879,9 @@
 
   fragment = stream->current_fragment->data;
 
-  start_time_str = g_strdup_printf ("%" G_GUINT64_FORMAT, fragment->time);
+  time =
+      fragment->time + fragment->duration * stream->fragment_repetition_index;
+  start_time_str = g_strdup_printf ("%" G_GUINT64_FORMAT, time);
 
   tmp = g_regex_replace_literal (stream->regex_bitrate, stream->url,
       strlen (stream->url), 0, quality->bitrate_str, 0, NULL);
@@ -829,12 +906,19 @@
 
   g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
 
-  if (!stream->current_fragment)
-    return GST_CLOCK_TIME_NONE;
+  if (!stream->current_fragment) {
+    GList *last = g_list_last (stream->fragments);
+    if (last == NULL)
+      return GST_CLOCK_TIME_NONE;
+
+    fragment = last->data;
+    return fragment->time + (fragment->duration * fragment->repetitions);
+  }
 
   fragment = stream->current_fragment->data;
 
-  time = fragment->time;
+  time =
+      fragment->time + (fragment->duration * stream->fragment_repetition_index);
   timescale = gst_mss_stream_get_timescale (stream);
   return (GstClockTime) gst_util_uint64_scale_round (time, GST_SECOND,
       timescale);
@@ -860,20 +944,61 @@
       timescale);
 }
 
+gboolean
+gst_mss_stream_has_next_fragment (GstMssStream * stream)
+{
+  g_return_val_if_fail (stream->active, FALSE);
+
+  if (stream->current_fragment == NULL)
+    return FALSE;
+
+  return TRUE;
+}
+
 GstFlowReturn
 gst_mss_stream_advance_fragment (GstMssStream * stream)
 {
+  GstMssStreamFragment *fragment;
   g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
 
   if (stream->current_fragment == NULL)
     return GST_FLOW_EOS;
 
+  fragment = stream->current_fragment->data;
+  stream->fragment_repetition_index++;
+  if (stream->fragment_repetition_index < fragment->repetitions) {
+    return GST_FLOW_OK;
+  }
+
+  stream->fragment_repetition_index = 0;
   stream->current_fragment = g_list_next (stream->current_fragment);
   if (stream->current_fragment == NULL)
     return GST_FLOW_EOS;
   return GST_FLOW_OK;
 }
 
+GstFlowReturn
+gst_mss_stream_regress_fragment (GstMssStream * stream)
+{
+  GstMssStreamFragment *fragment;
+  g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
+
+  if (stream->current_fragment == NULL)
+    return GST_FLOW_EOS;
+
+  fragment = stream->current_fragment->data;
+  if (stream->fragment_repetition_index == 0) {
+    stream->current_fragment = g_list_previous (stream->current_fragment);
+    if (stream->current_fragment == NULL)
+      return GST_FLOW_EOS;
+    fragment = stream->current_fragment->data;
+    stream->fragment_repetition_index = fragment->repetitions - 1;
+  } else {
+    stream->fragment_repetition_index--;
+  }
+  return GST_FLOW_OK;
+}
+
 const gchar *
 gst_mss_stream_type_name (GstMssStreamType streamtype)
 {
@@ -893,17 +1018,14 @@
  *
  * @time: time in nanoseconds
  */
-gboolean
+void
 gst_mss_manifest_seek (GstMssManifest * manifest, guint64 time)
 {
-  gboolean ret = TRUE;
   GSList *iter;
 
   for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
-    ret = gst_mss_stream_seek (iter->data, time) & ret;
+    gst_mss_stream_seek (iter->data, time);
   }
-
-  return ret;
 }
 
 /**
@@ -911,27 +1033,30 @@
  *
  * @time: time in nanoseconds
  */
-gboolean
+void
 gst_mss_stream_seek (GstMssStream * stream, guint64 time)
 {
   GList *iter;
   guint64 timescale;
+  GstMssStreamFragment *fragment = NULL;
 
   timescale = gst_mss_stream_get_timescale (stream);
   time = gst_util_uint64_scale_round (time, timescale, GST_SECOND);
 
+  GST_DEBUG ("Stream %s seeking to %" G_GUINT64_FORMAT, stream->url, time);
+
   for (iter = stream->fragments; iter; iter = g_list_next (iter)) {
     GList *next = g_list_next (iter);
     if (next) {
-      GstMssStreamFragment *fragment = next->data;
+      fragment = next->data;
 
       if (fragment->time > time) {
         stream->current_fragment = iter;
         break;
       }
     } else {
-      GstMssStreamFragment *fragment = iter->data;
-      if (fragment->time + fragment->duration > time) {
+      fragment = iter->data;
+      if (fragment->time + fragment->repetitions * fragment->duration > time) {
         stream->current_fragment = iter;
       } else {
         stream->current_fragment = NULL;        /* EOS */
@@ -940,7 +1065,16 @@
     }
   }
 
-  return TRUE;
+  /* position inside the repetitions */
+  if (stream->current_fragment) {
+    fragment = stream->current_fragment->data;
+    stream->fragment_repetition_index =
+        (time - fragment->time) / fragment->duration;
+  }
+
+  GST_DEBUG ("Stream %s seeked to fragment time %" G_GUINT64_FORMAT
+      " repetition %u", stream->url, fragment->time,
+      stream->fragment_repetition_index);
 }
 
 guint64
@@ -972,89 +1106,28 @@
 gst_mss_stream_reload_fragments (GstMssStream * stream, xmlNodePtr streamIndex)
 {
   xmlNodePtr iter;
-  GList *new_fragments = NULL;
-  GstMssStreamFragment *previous_fragment = NULL;
-  GstMssStreamFragment *current_fragment =
-      stream->current_fragment ? stream->current_fragment->data : NULL;
-  guint64 current_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
-  guint fragment_number = 0;
-  guint64 fragment_time_accum = 0;
+  guint64 current_gst_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
+  GstMssFragmentListBuilder builder;
 
-  if (!current_fragment && stream->fragments) {
-    current_fragment = g_list_last (stream->fragments)->data;
-  } else if (g_list_previous (stream->current_fragment)) {
-    /* rewind one as this is the next to be pushed */
-    current_fragment = g_list_previous (stream->current_fragment)->data;
-  } else {
-    current_fragment = NULL;
-  }
+  gst_mss_fragment_list_builder_init (&builder);
 
-  if (current_fragment) {
-    current_time = current_fragment->time;
-    fragment_number = current_fragment->number;
-    fragment_time_accum = current_fragment->time;
-  }
+  GST_DEBUG ("Current position: %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (current_gst_time));
 
   for (iter = streamIndex->children; iter; iter = iter->next) {
     if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
-      gchar *duration_str;
-      gchar *time_str;
-      gchar *seqnum_str;
-      GstMssStreamFragment *fragment = g_new (GstMssStreamFragment, 1);
-
-      duration_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_DURATION);
-      time_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_TIME);
-      seqnum_str = (gchar *) xmlGetProp (iter, (xmlChar *) MSS_PROP_NUMBER);
-
-      /* use the node's seq number or use the previous + 1 */
-      if (seqnum_str) {
-        fragment->number = g_ascii_strtoull (seqnum_str, NULL, 10);
-        xmlFree (seqnum_str);
-      } else {
-        fragment->number = fragment_number;
-      }
-      fragment_number = fragment->number + 1;
-
-      if (time_str) {
-        fragment->time = g_ascii_strtoull (time_str, NULL, 10);
-        xmlFree (time_str);
-        fragment_time_accum = fragment->time;
-      } else {
-        fragment->time = fragment_time_accum;
-      }
-
-      /* if we have a previous fragment, means we need to set its duration */
-      if (previous_fragment)
-        previous_fragment->duration = fragment->time - previous_fragment->time;
-
-      if (duration_str) {
-        fragment->duration = g_ascii_strtoull (duration_str, NULL, 10);
-
-        previous_fragment = NULL;
-        fragment_time_accum += fragment->duration;
-        xmlFree (duration_str);
-      } else {
-        /* store to set the duration at the next iteration */
-        previous_fragment = fragment;
-      }
-
-      if (fragment->time > current_time) {
-        new_fragments = g_list_append (new_fragments, fragment);
-      } else {
-        previous_fragment = NULL;
-        g_free (fragment);
-      }
-
+      gst_mss_fragment_list_builder_add (&builder, iter);
     } else {
       /* TODO gst log this */
     }
   }
 
   /* store the new fragments list */
-  if (new_fragments) {
+  if (builder.fragments) {
     g_list_free_full (stream->fragments, g_free);
-    stream->fragments = new_fragments;
-    stream->current_fragment = new_fragments;
+    stream->fragments = g_list_reverse (builder.fragments);
+    stream->current_fragment = stream->fragments;
+    gst_mss_stream_seek (stream, current_gst_time);
   }
 }
 
diff --git a/ext/smoothstreaming/gstmssmanifest.h b/ext/smoothstreaming/gstmssmanifest.h
index 8db1e67..364f6d1 100644
--- a/ext/smoothstreaming/gstmssmanifest.h
+++ b/ext/smoothstreaming/gstmssmanifest.h
@@ -44,11 +44,14 @@
 guint64 gst_mss_manifest_get_timescale (GstMssManifest * manifest);
 guint64 gst_mss_manifest_get_duration (GstMssManifest * manifest);
 GstClockTime gst_mss_manifest_get_gst_duration (GstMssManifest * manifest);
-gboolean gst_mss_manifest_seek (GstMssManifest * manifest, guint64 time);
+void gst_mss_manifest_seek (GstMssManifest * manifest, guint64 time);
 gboolean gst_mss_manifest_change_bitrate (GstMssManifest *manifest, guint64 bitrate);
 guint64 gst_mss_manifest_get_current_bitrate (GstMssManifest * manifest);
 gboolean gst_mss_manifest_is_live (GstMssManifest * manifest);
+gint64 gst_mss_manifest_get_dvr_window_length (GstMssManifest * manifest);
+gint gst_mss_manifest_get_look_ahead_fragments_count (GstMssManifest * manifest);
 void gst_mss_manifest_reload_fragments (GstMssManifest * manifest, GstBuffer * data);
+GstClockTime gst_mss_manifest_get_min_fragment_duration (GstMssManifest * manifest);
 
 GstMssStreamType gst_mss_stream_get_type (GstMssStream *stream);
 GstCaps * gst_mss_stream_get_caps (GstMssStream * stream);
@@ -59,8 +62,10 @@
 GstFlowReturn gst_mss_stream_get_fragment_url (GstMssStream * stream, gchar ** url);
 GstClockTime gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream);
 GstClockTime gst_mss_stream_get_fragment_gst_duration (GstMssStream * stream);
+gboolean gst_mss_stream_has_next_fragment (GstMssStream * stream);
 GstFlowReturn gst_mss_stream_advance_fragment (GstMssStream * stream);
-gboolean gst_mss_stream_seek (GstMssStream * stream, guint64 time);
+GstFlowReturn gst_mss_stream_regress_fragment (GstMssStream * stream);
+void gst_mss_stream_seek (GstMssStream * stream, guint64 time);
 const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
 
 const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);
diff --git a/ext/sndfile/Makefile.in b/ext/sndfile/Makefile.in
index 176b9f6..bd0983e 100644
--- a/ext/sndfile/Makefile.in
+++ b/ext/sndfile/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/sndfile
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/sndfile/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/sndfile/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1066,6 +1100,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/sndfile/gstsf.c b/ext/sndfile/gstsf.c
index 1370342..ab589bd 100644
--- a/ext/sndfile/gstsf.c
+++ b/ext/sndfile/gstsf.c
@@ -44,30 +44,15 @@
     sf_command (NULL, SFC_GET_FORMAT_MAJOR, &format_info, sizeof (format_info));
 
     switch (format_info.format) {
-      case SF_FORMAT_AIFF:     /* Apple/SGI AIFF format */
-        fmt = "audio/x-aiff";
-        break;
-      case SF_FORMAT_AU:       /* Sun/NeXT AU format */
-        fmt = "audio/x-au";
-        break;
-      case SF_FORMAT_FLAC:     /* FLAC lossless file format */
-        fmt = "audio/x-flac";
-        break;
       case SF_FORMAT_IRCAM:    /* Berkeley/IRCAM/CARL */
         fmt = "audio/x-ircam";
         break;
       case SF_FORMAT_NIST:     /* Sphere NIST format. */
         fmt = "audio/x-nist";
         break;
-      case SF_FORMAT_OGG:      /* Xiph OGG container */
-        fmt = "audio/ogg";
-        break;
       case SF_FORMAT_PAF:      /* Ensoniq PARIS file format. */
         fmt = "audio/x-paris";
         break;
-      case SF_FORMAT_RAW:      /* RAW PCM data. */
-        fmt = "audio/x-raw";
-        break;
       case SF_FORMAT_SDS:      /* Midi Sample Dump Standard */
         fmt = "audio/x-sds";
         break;
@@ -77,10 +62,6 @@
       case SF_FORMAT_VOC:      /* VOC files. */
         fmt = "audio/x-voc";
         break;
-      case SF_FORMAT_WAV:      /* Microsoft WAV format */
-      case SF_FORMAT_WAVEX:    /* MS WAVE with WAVEFORMATEX */
-        fmt = "audio/x-wav";
-        break;
       case SF_FORMAT_W64:      /* Sonic Foundry's 64 bit RIFF/WAV */
         fmt = "audio/x-w64";
         break;
@@ -90,6 +71,18 @@
       case SF_FORMAT_RF64:     /* RF64 WAV file */
         fmt = "audio/x-rf64";
         break;
+        /* does not make sense to expose that */
+      case SF_FORMAT_RAW:      /* RAW PCM data. */
+        /* we have other elements to handle these */
+      case SF_FORMAT_AIFF:     /* Apple/SGI AIFF format */
+      case SF_FORMAT_AU:       /* Sun/NeXT AU format */
+      case SF_FORMAT_FLAC:     /* FLAC lossless file format */
+      case SF_FORMAT_OGG:      /* Xiph OGG container */
+      case SF_FORMAT_WAV:      /* Microsoft WAV format */
+      case SF_FORMAT_WAVEX:    /* MS WAVE with WAVEFORMATEX */
+        fmt = NULL;
+        GST_LOG ("skipping format '%s'", format_info.name);
+        break;
       case SF_FORMAT_MAT4:     /* Matlab (tm) V4.2 / GNU Octave 2.0 */
       case SF_FORMAT_MAT5:     /* Matlab (tm) V5.0 / GNU Octave 2.1 */
       case SF_FORMAT_PVF:      /* Portable Voice Format */
diff --git a/ext/sndio/Makefile.in b/ext/sndio/Makefile.in
index c9e9c84..05fc3fd 100644
--- a/ext/sndio/Makefile.in
+++ b/ext/sndio/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/sndio
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/sndio/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/sndio/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1076,6 +1110,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/soundtouch/Makefile.in b/ext/soundtouch/Makefile.in
index 4ba662d..760f867 100644
--- a/ext/soundtouch/Makefile.in
+++ b/ext/soundtouch/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/soundtouch
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -248,6 +258,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -265,8 +276,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -291,8 +304,6 @@
 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@
@@ -305,7 +316,6 @@
 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@
@@ -313,6 +323,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -339,11 +351,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -362,8 +377,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -422,10 +435,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -442,7 +459,6 @@
 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@
@@ -451,7 +467,6 @@
 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@
@@ -464,7 +479,6 @@
 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@
@@ -478,6 +492,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -489,6 +504,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -527,6 +544,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -562,10 +580,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -591,6 +613,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -598,7 +623,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -627,6 +659,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -637,6 +670,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -667,17 +701,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -694,6 +727,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -732,6 +766,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -773,7 +808,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/soundtouch/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/soundtouch/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1122,6 +1156,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc
index 7d2e6dc..2f33adf 100644
--- a/ext/soundtouch/gstpitch.cc
+++ b/ext/soundtouch/gstpitch.cc
@@ -679,6 +679,7 @@
 static gboolean
 gst_pitch_process_segment (GstPitch * pitch, GstEvent ** event)
 {
+  gint seqnum;
   gdouble out_seg_rate, our_arate;
   gfloat stream_time_ratio;
   GstSegment seg;
@@ -732,8 +733,10 @@
 
   GST_LOG_OBJECT (pitch->sinkpad, "out segment %" GST_SEGMENT_FORMAT, &seg);
 
+  seqnum = gst_event_get_seqnum (*event);
   gst_event_unref (*event);
   *event = gst_event_new_segment (&seg);
+  gst_event_set_seqnum (*event, seqnum);
 
   return TRUE;
 }
diff --git a/ext/spandsp/Makefile.in b/ext/spandsp/Makefile.in
index 2906f8c..5f87c51 100644
--- a/ext/spandsp/Makefile.in
+++ b/ext/spandsp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/spandsp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/spandsp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/spandsp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1077,6 +1111,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/spandsp/gstspanplc.c b/ext/spandsp/gstspanplc.c
index c30c0d7..d3ff53f 100644
--- a/ext/spandsp/gstspanplc.c
+++ b/ext/spandsp/gstspanplc.c
@@ -188,8 +188,7 @@
   GstSpanPlc *plc = GST_SPAN_PLC (parent);
   GstMapInfo map;
 
-  if (plc->plc_state->missing_samples != 0)
-    buffer = gst_buffer_make_writable (buffer);
+  buffer = gst_buffer_make_writable (buffer);
   gst_buffer_map (buffer, &map, GST_MAP_READWRITE);
   plc_rx (plc->plc_state, (int16_t *) map.data, map.size / 2);
   gst_buffer_unmap (buffer, &map);
diff --git a/ext/spc/Makefile.in b/ext/spc/Makefile.in
index 57a58b8..1696584 100644
--- a/ext/spc/Makefile.in
+++ b/ext/spc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/spc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/spc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/spc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1064,6 +1098,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/srtp/Makefile.in b/ext/srtp/Makefile.in
index 6cae5c3..5d089fd 100644
--- a/ext/srtp/Makefile.in
+++ b/ext/srtp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -23,7 +23,17 @@
 #glib_gen_basename=colorbalance
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -87,9 +97,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 subdir = ext/srtp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -98,6 +105,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -111,7 +119,6 @@
 	$(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 \
@@ -128,6 +135,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -238,6 +246,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gst-glib-gen.mak $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -255,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -281,8 +293,6 @@
 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@
@@ -295,7 +305,6 @@
 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@
@@ -303,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -329,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -352,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -412,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -432,7 +448,6 @@
 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@
@@ -441,7 +456,6 @@
 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@
@@ -454,7 +468,6 @@
 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@
@@ -468,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -479,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -517,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -552,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -581,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -588,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -617,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -627,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -657,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -684,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -722,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -777,7 +811,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/srtp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/srtp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -786,7 +819,7 @@
 	    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/gst-glib-gen.mak:
+$(top_srcdir)/common/gst-glib-gen.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1115,6 +1148,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # these are all the rules generating the relevant files
 $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
diff --git a/ext/srtp/gstsrtp.c b/ext/srtp/gstsrtp.c
index d371bf3..0e2cf9f 100644
--- a/ext/srtp/gstsrtp.c
+++ b/ext/srtp/gstsrtp.c
@@ -162,6 +162,12 @@
               NULL);
           ret = TRUE;
           break;
+        case GST_RTCP_TYPE_APP:
+        case GST_RTCP_TYPE_RTPFB:
+        case GST_RTCP_TYPE_PSFB:
+          *ssrc = gst_rtcp_packet_fb_get_sender_ssrc (&packet);
+          ret = TRUE;
+          break;
         default:
           break;
       }
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index 18e25d1..2b814a4 100644
--- a/ext/srtp/gstsrtpdec.c
+++ b/ext/srtp/gstsrtpdec.c
@@ -52,7 +52,7 @@
  * packets (encryption and authentication) and out RTP and RTCP. It
  * receives packet of type 'application/x-srtp' or 'application/x-srtcp'
  * on its sink pad, and outs packets of type 'application/x-rtp' or
- * 'application/x-rtcp' on its sink pad.
+ * 'application/x-rtcp' on its source pad.
  *
  * For each packet received, it checks if the internal SSRC is in the list
  * of streams already in use. If this is not the case, it sends a signal to
@@ -126,6 +126,8 @@
 GST_DEBUG_CATEGORY_STATIC (gst_srtp_dec_debug);
 #define GST_CAT_DEFAULT gst_srtp_dec_debug
 
+#define DEFAULT_REPLAY_WINDOW_SIZE 128
+
 /* Filter signals and args */
 enum
 {
@@ -139,7 +141,8 @@
 
 enum
 {
-  PROP_0
+  PROP_0,
+  PROP_REPLAY_WINDOW_SIZE
 };
 
 /* the capabilities of the inputs and outputs.
@@ -178,6 +181,11 @@
 
 G_DEFINE_TYPE (GstSrtpDec, gst_srtp_dec, GST_TYPE_ELEMENT);
 
+static void gst_srtp_dec_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_srtp_dec_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
 static void gst_srtp_dec_clear_streams (GstSrtpDec * filter);
 static void gst_srtp_dec_remove_stream (GstSrtpDec * filter, guint ssrc);
 
@@ -231,10 +239,15 @@
 static void
 gst_srtp_dec_class_init (GstSrtpDecClass * klass)
 {
+  GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
 
+  gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
 
+  gobject_class->set_property = gst_srtp_dec_set_property;
+  gobject_class->get_property = gst_srtp_dec_get_property;
+
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&rtp_src_template));
   gst_element_class_add_pad_template (gstelement_class,
@@ -256,6 +269,13 @@
   klass->clear_streams = GST_DEBUG_FUNCPTR (gst_srtp_dec_clear_streams);
   klass->remove_stream = GST_DEBUG_FUNCPTR (gst_srtp_dec_remove_stream);
 
+  /* Install properties */
+  g_object_class_install_property (gobject_class, PROP_REPLAY_WINDOW_SIZE,
+      g_param_spec_uint ("replay-window-size", "Replay window size",
+          "Size of the replay protection window",
+          64, 0x8000, DEFAULT_REPLAY_WINDOW_SIZE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   /* Install signals */
   /**
    * GstSrtpDec::request-key:
@@ -337,6 +357,8 @@
 static void
 gst_srtp_dec_init (GstSrtpDec * filter)
 {
+  filter->replay_window_size = DEFAULT_REPLAY_WINDOW_SIZE;
+
   filter->rtp_sinkpad =
       gst_pad_new_from_static_template (&rtp_sink_template, "rtp_sink");
   gst_pad_set_event_function (filter->rtp_sinkpad,
@@ -387,6 +409,46 @@
 }
 
 static void
+gst_srtp_dec_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstSrtpDec *filter = GST_SRTP_DEC (object);
+
+  GST_OBJECT_LOCK (filter);
+
+  switch (prop_id) {
+    case PROP_REPLAY_WINDOW_SIZE:
+      filter->replay_window_size = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_srtp_dec_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstSrtpDec *filter = GST_SRTP_DEC (object);
+
+  GST_OBJECT_LOCK (filter);
+
+  switch (prop_id) {
+    case PROP_REPLAY_WINDOW_SIZE:
+      g_value_set_uint (value, filter->replay_window_size);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+}
+
+static void
 gst_srtp_dec_remove_stream (GstSrtpDec * filter, guint ssrc)
 {
   GstSrtpDecSsrcStream *stream = NULL;
@@ -520,6 +582,7 @@
 
   policy.ssrc.value = ssrc;
   policy.ssrc.type = ssrc_specific;
+  policy.window_size = filter->replay_window_size;
   policy.next = NULL;
 
   /* If it is the first stream, create the session
@@ -560,20 +623,18 @@
     gboolean * is_rtcp)
 {
   GstSrtpDecSsrcStream *stream = NULL;
+  GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
 
-  if (!(*is_rtcp)) {
-    GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
+  if (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
+    if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
+        || gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
+      *ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
 
-    if (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
-      if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
-          || gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
-        *ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
-
-        gst_rtp_buffer_unmap (&rtpbuf);
-        goto have_ssrc;
-      }
       gst_rtp_buffer_unmap (&rtpbuf);
+      *is_rtcp = FALSE;
+      goto have_ssrc;
     }
+    gst_rtp_buffer_unmap (&rtpbuf);
   }
 
   if (rtcp_buffer_get_ssrc (buf, ssrc)) {
@@ -703,6 +764,9 @@
     else
       GST_WARNING_OBJECT (filter, "Could not set stream with SSRC %u", ssrc);
     gst_caps_unref (caps);
+  } else {
+    GST_WARNING_OBJECT (filter, "Could not get caps for stream with SSRC %u",
+        ssrc);
   }
 
   return stream;
@@ -770,6 +834,14 @@
       gst_event_unref (event);
       return ret;
     case GST_EVENT_SEGMENT:
+      /* Make sure to send a caps event downstream before the segment event,
+       * even if upstream didn't */
+      if (!gst_pad_has_current_caps (filter->rtp_srcpad)) {
+        GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtp");
+
+        gst_pad_set_caps (filter->rtp_srcpad, caps);
+        gst_caps_unref (caps);
+      }
       filter->rtp_has_segment = TRUE;
       break;
     case GST_EVENT_FLUSH_STOP:
@@ -797,6 +869,14 @@
       gst_event_unref (event);
       return ret;
     case GST_EVENT_SEGMENT:
+      /* Make sure to send a caps event downstream before the segment event,
+       * even if upstream didn't */
+      if (!gst_pad_has_current_caps (filter->rtcp_srcpad)) {
+        GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp");
+
+        gst_pad_set_caps (filter->rtcp_srcpad, caps);
+        gst_caps_unref (caps);
+      }
       filter->rtcp_has_segment = TRUE;
       break;
     case GST_EVENT_FLUSH_STOP:
@@ -1005,33 +1085,16 @@
 
 }
 
-static GstFlowReturn
-gst_srtp_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
-    gboolean is_rtcp)
+/*
+ * This function should be called while holding the filter lock
+ */
+static gboolean
+gst_srtp_dec_decode_buffer (GstSrtpDec * filter, GstPad * pad, GstBuffer * buf,
+    gboolean is_rtcp, guint32 ssrc)
 {
-  GstSrtpDec *filter = GST_SRTP_DEC (parent);
-  GstPad *otherpad;
-  err_status_t err = err_status_ok;
-  GstSrtpDecSsrcStream *stream = NULL;
-  GstFlowReturn ret = GST_FLOW_OK;
-  gint size;
-  guint32 ssrc = 0;
   GstMapInfo map;
-
-  GST_OBJECT_LOCK (filter);
-
-  /* Check if this stream exists, if not create a new stream */
-
-  if (!(stream = validate_buffer (filter, buf, &ssrc, &is_rtcp))) {
-    GST_OBJECT_UNLOCK (filter);
-    GST_WARNING_OBJECT (filter, "Invalid buffer, dropping");
-    goto drop_buffer;
-  }
-
-  if (!STREAM_HAS_CRYPTO (stream)) {
-    GST_OBJECT_UNLOCK (filter);
-    goto push_out;
-  }
+  err_status_t err;
+  gint size;
 
   GST_LOG_OBJECT (pad, "Received %s buffer of size %" G_GSIZE_FORMAT
       " with SSRC = %u", is_rtcp ? "RTCP" : "RTP", gst_buffer_get_size (buf),
@@ -1040,11 +1103,11 @@
   /* Change buffer to remove protection */
   buf = gst_buffer_make_writable (buf);
 
-unprotect:
-
   gst_buffer_map (buf, &map, GST_MAP_READWRITE);
   size = map.size;
 
+unprotect:
+
   gst_srtp_init_event_reporter ();
 
   if (is_rtcp)
@@ -1076,8 +1139,6 @@
     err = srtp_unprotect (filter->session, map.data, &size);
   }
 
-  gst_buffer_unmap (buf, &map);
-
   GST_OBJECT_UNLOCK (filter);
 
   if (err != err_status_ok) {
@@ -1115,10 +1176,51 @@
         break;
     }
 
+    gst_buffer_unmap (buf, &map);
+
+    GST_OBJECT_LOCK (filter);
+    return FALSE;
+  }
+
+  gst_buffer_unmap (buf, &map);
+
+  gst_buffer_set_size (buf, size);
+
+  GST_OBJECT_LOCK (filter);
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_srtp_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
+    gboolean is_rtcp)
+{
+  GstSrtpDec *filter = GST_SRTP_DEC (parent);
+  GstPad *otherpad;
+  GstSrtpDecSsrcStream *stream = NULL;
+  GstFlowReturn ret = GST_FLOW_OK;
+  guint32 ssrc = 0;
+
+  GST_OBJECT_LOCK (filter);
+
+  /* Check if this stream exists, if not create a new stream */
+
+  if (!(stream = validate_buffer (filter, buf, &ssrc, &is_rtcp))) {
+    GST_OBJECT_UNLOCK (filter);
+    GST_WARNING_OBJECT (filter, "Invalid buffer, dropping");
     goto drop_buffer;
   }
 
-  gst_buffer_set_size (buf, size);
+  if (!STREAM_HAS_CRYPTO (stream)) {
+    GST_OBJECT_UNLOCK (filter);
+    goto push_out;
+  }
+
+  if (!gst_srtp_dec_decode_buffer (filter, pad, buf, is_rtcp, ssrc)) {
+    GST_OBJECT_UNLOCK (filter);
+    goto drop_buffer;
+  }
+
+  GST_OBJECT_UNLOCK (filter);
 
   /* If all is well, we may have reached soft limit */
   if (gst_srtp_get_soft_limit_reached ())
diff --git a/ext/srtp/gstsrtpdec.h b/ext/srtp/gstsrtpdec.h
index 41862e0..644092a 100644
--- a/ext/srtp/gstsrtpdec.h
+++ b/ext/srtp/gstsrtpdec.h
@@ -71,6 +71,8 @@
 {
   GstElement element;
 
+  guint replay_window_size;
+
   GstPad *rtp_sinkpad, *rtp_srcpad;
   GstPad *rtcp_sinkpad, *rtcp_srcpad;
 
diff --git a/ext/srtp/gstsrtpenc.c b/ext/srtp/gstsrtpenc.c
index 20d3e36..eb00886 100644
--- a/ext/srtp/gstsrtpenc.c
+++ b/ext/srtp/gstsrtpenc.c
@@ -162,6 +162,14 @@
   PROP_ALLOW_REPEAT_TX
 };
 
+typedef struct ProcessBufferItData
+{
+  GstSrtpEnc *filter;
+  GstPad *pad;
+  GstBufferList *out_list;
+  gboolean is_rtcp;
+} ProcessBufferItData;
+
 /* the capabilities of the inputs and outputs.
  *
  * describe the real formats here.
@@ -219,6 +227,10 @@
     GstBuffer * buf);
 static GstFlowReturn gst_srtp_enc_chain_rtcp (GstPad * pad, GstObject * parent,
     GstBuffer * buf);
+static GstFlowReturn gst_srtp_enc_chain_list_rtp (GstPad * pad,
+    GstObject * parent, GstBufferList * buf);
+static GstFlowReturn gst_srtp_enc_chain_list_rtcp (GstPad * pad,
+    GstObject * parent, GstBufferList * buf);
 
 static gboolean gst_srtp_enc_sink_event_rtp (GstPad * pad, GstObject * parent,
     GstEvent * event);
@@ -389,6 +401,8 @@
 }
 
 /* Create stream
+ *
+ * Should be called with the filter locked
  */
 static err_status_t
 gst_srtp_enc_create_session (GstSrtpEnc * filter)
@@ -400,30 +414,26 @@
 
   memset (&policy, 0, sizeof (srtp_policy_t));
 
-  GST_OBJECT_LOCK (filter);
-
   if (HAS_CRYPTO (filter)) {
     guint expected;
     gsize keysize;
 
     if (filter->key == NULL) {
-      GST_OBJECT_UNLOCK (filter);
       GST_ELEMENT_ERROR (filter, LIBRARY, SETTINGS,
           ("Cipher is not NULL, key must be set"),
           ("Cipher is not NULL, key must be set"));
-      return FALSE;
+      return err_status_fail;
     }
 
     expected = max_cipher_key_size (filter);
     keysize = gst_buffer_get_size (filter->key);
 
     if (expected != keysize) {
-      GST_OBJECT_UNLOCK (filter);
       GST_ELEMENT_ERROR (filter, LIBRARY, SETTINGS,
           ("Master key size is wrong"),
           ("Expected master key of %d bytes, but received %" G_GSIZE_FORMAT
               " bytes", expected, keysize));
-      return FALSE;
+      return err_status_fail;
     }
   }
 
@@ -457,24 +467,26 @@
   if (HAS_CRYPTO (filter))
     gst_buffer_unmap (filter->key, &map);
 
-  GST_OBJECT_UNLOCK (filter);
-
   return ret;
 }
 
 /* Release ressources and set default values
  */
 static void
-gst_srtp_enc_reset (GstSrtpEnc * filter)
+gst_srtp_enc_reset_no_lock (GstSrtpEnc * filter)
 {
-  GST_OBJECT_LOCK (filter);
-
   if (!filter->first_session)
     srtp_dealloc (filter->session);
 
   filter->first_session = TRUE;
   filter->key_changed = FALSE;
+}
 
+static void
+gst_srtp_enc_reset (GstSrtpEnc * filter)
+{
+  GST_OBJECT_LOCK (filter);
+  gst_srtp_enc_reset_no_lock (filter);
   GST_OBJECT_UNLOCK (filter);
 }
 
@@ -509,6 +521,8 @@
       GST_DEBUG_FUNCPTR (gst_srtp_enc_iterate_internal_links_rtp));
   gst_pad_set_chain_function (sinkpad,
       GST_DEBUG_FUNCPTR (gst_srtp_enc_chain_rtp));
+  gst_pad_set_chain_list_function (sinkpad,
+      GST_DEBUG_FUNCPTR (gst_srtp_enc_chain_list_rtp));
   gst_pad_set_event_function (sinkpad,
       GST_DEBUG_FUNCPTR (gst_srtp_enc_sink_event_rtp));
   gst_pad_set_active (sinkpad, TRUE);
@@ -553,6 +567,8 @@
       GST_DEBUG_FUNCPTR (gst_srtp_enc_iterate_internal_links_rtcp));
   gst_pad_set_chain_function (sinkpad,
       GST_DEBUG_FUNCPTR (gst_srtp_enc_chain_rtcp));
+  gst_pad_set_chain_list_function (sinkpad,
+      GST_DEBUG_FUNCPTR (gst_srtp_enc_chain_list_rtcp));
   gst_pad_set_event_function (sinkpad,
       GST_DEBUG_FUNCPTR (gst_srtp_enc_sink_event_rtcp));
   gst_pad_set_active (sinkpad, TRUE);
@@ -949,90 +965,66 @@
 }
 
 static GstFlowReturn
-gst_srtp_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
+gst_srtp_enc_check_set_caps (GstSrtpEnc * filter, GstPad * pad,
     gboolean is_rtcp)
 {
-  GstSrtpEnc *filter = GST_SRTP_ENC (parent);
-  GstFlowReturn ret = GST_FLOW_OK;
-  GstPad *otherpad = NULL;
-  err_status_t err = err_status_ok;
-  gint size_max, size;
-  GstBuffer *bufout = NULL;
   gboolean do_setcaps = FALSE;
-  GstMapInfo mapin, mapout;
 
-  if (!is_rtcp) {
-    GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
+  GST_OBJECT_LOCK (filter);
 
-    if (!gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
-      GST_ELEMENT_ERROR (filter, STREAM, WRONG_TYPE, (NULL),
-          ("Could not map RTP buffer"));
-      ret = GST_FLOW_ERROR;
-      goto out;
-    }
-
-    gst_rtp_buffer_unmap (&rtpbuf);
-  } else {
-    GstRTCPBuffer rtcpbuf = GST_RTCP_BUFFER_INIT;
-
-    if (!gst_rtcp_buffer_map (buf, GST_MAP_READ, &rtcpbuf)) {
-      GST_ELEMENT_ERROR (filter, STREAM, WRONG_TYPE, (NULL),
-          ("Could not map RTCP buffer"));
-      ret = GST_FLOW_ERROR;
-      goto out;
-    }
-    gst_rtcp_buffer_unmap (&rtcpbuf);
+  if (filter->key_changed) {
+    gst_srtp_enc_reset_no_lock (filter);
+    do_setcaps = TRUE;
   }
 
-  do_setcaps = filter->key_changed;
-  if (filter->key_changed)
-    gst_srtp_enc_reset (filter);
   if (filter->first_session) {
     err_status_t status = gst_srtp_enc_create_session (filter);
+
     if (status != err_status_ok) {
+      GST_OBJECT_UNLOCK (filter);
       GST_ELEMENT_ERROR (filter, LIBRARY, INIT,
           ("Could not initialize SRTP encoder"),
           ("Failed to add stream to SRTP encoder (err: %d)", status));
-      ret = GST_FLOW_ERROR;
-      goto out;
+      return GST_FLOW_ERROR;
     }
   }
-  GST_OBJECT_LOCK (filter);
+
+  GST_OBJECT_UNLOCK (filter);
 
   /* Update source caps if asked */
   if (do_setcaps) {
     GstCaps *caps;
-    GST_OBJECT_UNLOCK (filter);
 
     caps = gst_pad_get_current_caps (pad);
     if (!gst_srtp_enc_sink_setcaps (pad, filter, caps, is_rtcp)) {
       gst_caps_unref (caps);
-      ret = GST_FLOW_NOT_NEGOTIATED;
-      goto out;
+      return GST_FLOW_NOT_NEGOTIATED;
     }
     gst_caps_unref (caps);
-
-    GST_OBJECT_LOCK (filter);
   }
 
-  if (!HAS_CRYPTO (filter)) {
-    GST_OBJECT_UNLOCK (filter);
-    otherpad = get_rtp_other_pad (pad);
-    return gst_pad_push (otherpad, buf);
-  }
+  return GST_FLOW_OK;
+}
 
+static GstBuffer *
+gst_srtp_enc_process_buffer (GstSrtpEnc * filter, GstPad * pad,
+    GstBuffer * buf, gboolean is_rtcp)
+{
+  gint size_max, size;
+  GstBuffer *bufout = NULL;
+  GstMapInfo mapout;
+  err_status_t err;
 
   /* Create a bigger buffer to add protection */
-  size_max = gst_buffer_get_size (buf) + SRTP_MAX_TRAILER_LEN + 10;
+  size = gst_buffer_get_size (buf);
+  size_max = size + SRTP_MAX_TRAILER_LEN + 10;
   bufout = gst_buffer_new_allocate (NULL, size_max, NULL);
 
-  gst_buffer_map (buf, &mapin, GST_MAP_READ);
   gst_buffer_map (bufout, &mapout, GST_MAP_READWRITE);
 
-  size = mapin.size;
-  memcpy (mapout.data, mapin.data, mapin.size);
+  gst_buffer_extract (buf, 0, mapout.data, size);
 
-  gst_buffer_unmap (buf, &mapin);
+  GST_OBJECT_LOCK (filter);
 
   gst_srtp_init_event_reporter ();
 
@@ -1041,18 +1033,63 @@
   else
     err = srtp_protect (filter->session, mapout.data, &size);
 
-  gst_buffer_unmap (bufout, &mapout);
-
   GST_OBJECT_UNLOCK (filter);
 
+  gst_buffer_unmap (bufout, &mapout);
+
   if (err == err_status_ok) {
     /* Buffer protected */
     gst_buffer_set_size (bufout, size);
     gst_buffer_copy_into (bufout, buf, GST_BUFFER_COPY_METADATA, 0, -1);
 
-    GST_LOG_OBJECT (pad, "Encing %s buffer of size %d",
+    GST_LOG_OBJECT (pad, "Encoding %s buffer of size %d",
         is_rtcp ? "RTCP" : "RTP", size);
 
+  } else if (err == err_status_key_expired) {
+
+    GST_ELEMENT_ERROR (GST_ELEMENT_CAST (filter), STREAM, ENCODE,
+        ("Key usage limit has been reached"),
+        ("Unable to protect buffer (hard key usage limit reached)"));
+    goto fail;
+
+  } else {
+    /* srtp_protect failed */
+    GST_ELEMENT_ERROR (filter, LIBRARY, FAILED, (NULL),
+        ("Unable to protect buffer (protect failed) code %d", err));
+    goto fail;
+  }
+
+  return bufout;
+
+fail:
+  gst_buffer_unref (bufout);
+  return NULL;
+}
+
+static GstFlowReturn
+gst_srtp_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
+    gboolean is_rtcp)
+{
+  GstSrtpEnc *filter = GST_SRTP_ENC (parent);
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstPad *otherpad;
+  GstBuffer *bufout = NULL;
+
+  if ((ret = gst_srtp_enc_check_set_caps (filter, pad, is_rtcp)) != GST_FLOW_OK) {
+    goto out;
+  }
+
+  GST_OBJECT_LOCK (filter);
+
+  if (!HAS_CRYPTO (filter)) {
+    GST_OBJECT_UNLOCK (filter);
+    otherpad = get_rtp_other_pad (pad);
+    return gst_pad_push (otherpad, buf);
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+
+  if ((bufout = gst_srtp_enc_process_buffer (filter, pad, buf, is_rtcp))) {
     /* Push buffer to source pad */
     otherpad = get_rtp_other_pad (pad);
     ret = gst_pad_push (otherpad, bufout);
@@ -1060,29 +1097,22 @@
 
     if (ret != GST_FLOW_OK)
       goto out;
-
-  } else if (err == err_status_key_expired) {
-
-    GST_ELEMENT_ERROR (GST_ELEMENT_CAST (filter), STREAM, ENCODE,
-        ("Key usage limit has been reached"),
-        ("Unable to protect buffer (hard key usage limit reached)"));
-    gst_buffer_unref (bufout);
-    goto fail;
-
   } else {
-    /* srtp_protect failed */
-    GST_ELEMENT_ERROR (filter, LIBRARY, FAILED, (NULL),
-        ("Unable to protect buffer (protect failed) code %d", err));
-    gst_buffer_unref (bufout);
     goto fail;
   }
 
+  GST_OBJECT_LOCK (filter);
+
   if (gst_srtp_get_soft_limit_reached ()) {
+    GST_OBJECT_UNLOCK (filter);
     g_signal_emit (filter, gst_srtp_enc_signals[SIGNAL_SOFT_LIMIT], 0);
+    GST_OBJECT_LOCK (filter);
     if (filter->random_key && !filter->key_changed)
       gst_srtp_enc_replace_random_key (filter);
   }
 
+  GST_OBJECT_UNLOCK (filter);
+
 out:
 
   gst_buffer_unref (buf);
@@ -1094,6 +1124,96 @@
   goto out;
 }
 
+static gboolean
+process_buffer_it (GstBuffer ** buffer, guint index, gpointer user_data)
+{
+  ProcessBufferItData *data = user_data;
+  GstBuffer *bufout;
+
+  if ((bufout =
+          gst_srtp_enc_process_buffer (data->filter, data->pad, *buffer,
+              data->is_rtcp))) {
+    gst_buffer_list_add (data->out_list, bufout);
+  } else {
+    GST_WARNING_OBJECT (data->filter, "Error encoding buffer, dropping");
+  }
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_srtp_enc_chain_list (GstPad * pad, GstObject * parent,
+    GstBufferList * buf_list, gboolean is_rtcp)
+{
+  GstSrtpEnc *filter = GST_SRTP_ENC (parent);
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstPad *otherpad;
+  GstBufferList *out_list = NULL;
+  ProcessBufferItData process_data;
+
+  GST_LOG_OBJECT (pad, "Buffer chain with list of %d",
+      gst_buffer_list_length (buf_list));
+
+  if (!gst_buffer_list_length (buf_list))
+    goto out;
+
+  if ((ret = gst_srtp_enc_check_set_caps (filter, pad, is_rtcp)) != GST_FLOW_OK)
+    goto out;
+
+  GST_OBJECT_LOCK (filter);
+
+  if (!HAS_CRYPTO (filter)) {
+    GST_OBJECT_UNLOCK (filter);
+    otherpad = get_rtp_other_pad (pad);
+    return gst_pad_push_list (otherpad, buf_list);
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+
+  out_list = gst_buffer_list_new ();
+
+  process_data.filter = filter;
+  process_data.pad = pad;
+  process_data.is_rtcp = is_rtcp;
+  process_data.out_list = out_list;
+
+  gst_buffer_list_foreach (buf_list, process_buffer_it, &process_data);
+
+  if (!gst_buffer_list_length (out_list)) {
+    gst_buffer_list_unref (out_list);
+    ret = GST_FLOW_OK;
+    goto out;
+  }
+
+  /* Push buffer to source pad */
+  otherpad = get_rtp_other_pad (pad);
+  GST_LOG_OBJECT (pad, "Pushing buffer chain of %d",
+      gst_buffer_list_length (buf_list));
+  ret = gst_pad_push_list (otherpad, out_list);
+
+  if (ret != GST_FLOW_OK) {
+    goto out;
+  }
+
+  GST_OBJECT_LOCK (filter);
+
+  if (gst_srtp_get_soft_limit_reached ()) {
+    GST_OBJECT_UNLOCK (filter);
+    g_signal_emit (filter, gst_srtp_enc_signals[SIGNAL_SOFT_LIMIT], 0);
+    GST_OBJECT_LOCK (filter);
+    if (filter->random_key && !filter->key_changed)
+      gst_srtp_enc_replace_random_key (filter);
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+
+out:
+
+  gst_buffer_list_unref (buf_list);
+
+  return ret;
+}
+
 static GstFlowReturn
 gst_srtp_enc_chain_rtp (GstPad * pad, GstObject * parent, GstBuffer * buf)
 {
@@ -1106,6 +1226,20 @@
   return gst_srtp_enc_chain (pad, parent, buf, TRUE);
 }
 
+static GstFlowReturn
+gst_srtp_enc_chain_list_rtp (GstPad * pad, GstObject * parent,
+    GstBufferList * buf_list)
+{
+  return gst_srtp_enc_chain_list (pad, parent, buf_list, FALSE);
+}
+
+static GstFlowReturn
+gst_srtp_enc_chain_list_rtcp (GstPad * pad, GstObject * parent,
+    GstBufferList * buf_list)
+{
+  return gst_srtp_enc_chain_list (pad, parent, buf_list, TRUE);
+}
+
 
 /* Change state
  */
@@ -1138,8 +1272,10 @@
             "RTCP authentication can't be NULL if encryption is not NULL.");
         return GST_STATE_CHANGE_FAILURE;
       }
+      GST_OBJECT_LOCK (filter);
       if (!filter->first_session)
-        gst_srtp_enc_reset (filter);
+        gst_srtp_enc_reset_no_lock (filter);
+      GST_OBJECT_UNLOCK (filter);
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       break;
diff --git a/ext/teletextdec/Makefile.in b/ext/teletextdec/Makefile.in
index a9e57cc..d02215a 100644
--- a/ext/teletextdec/Makefile.in
+++ b/ext/teletextdec/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/teletextdec
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/teletextdec/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/teletextdec/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1066,6 +1100,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/timidity/Makefile.in b/ext/timidity/Makefile.in
index d816507..2102ab0 100644
--- a/ext/timidity/Makefile.in
+++ b/ext/timidity/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 @USE_TIMIDITY_TRUE@am__append_1 = libgsttimidity.la
 @USE_WILDMIDI_TRUE@am__append_2 = libgstwildmidi.la
 subdir = ext/timidity
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -246,6 +256,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -263,8 +274,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -289,8 +302,6 @@
 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@
@@ -303,7 +314,6 @@
 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@
@@ -311,6 +321,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -337,11 +349,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -360,8 +375,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -420,10 +433,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -440,7 +457,6 @@
 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@
@@ -449,7 +465,6 @@
 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@
@@ -462,7 +477,6 @@
 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@
@@ -476,6 +490,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -487,6 +502,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -525,6 +542,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -560,10 +578,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -589,6 +611,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -596,7 +621,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -625,6 +657,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -635,6 +668,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -665,17 +699,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -692,6 +725,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -730,6 +764,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -783,7 +818,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/timidity/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/timidity/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1103,6 +1137,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/voaacenc/Makefile.in b/ext/voaacenc/Makefile.in
index eeef105..c58445a 100644
--- a/ext/voaacenc/Makefile.in
+++ b/ext/voaacenc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/voaacenc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -768,7 +803,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/voaacenc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/voaacenc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1085,6 +1119,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/voaacenc/gstvoaacenc.c b/ext/voaacenc/gstvoaacenc.c
index a7fa260..315f373 100644
--- a/ext/voaacenc/gstvoaacenc.c
+++ b/ext/voaacenc/gstvoaacenc.c
@@ -26,7 +26,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch filesrc location=abc.wav ! wavparse ! audioresample ! audioconvert ! voaacenc ! filesink location=abc.aac
+ * gst-launch-1.0 filesrc location=abc.wav ! wavparse ! audioresample ! audioconvert ! voaacenc ! filesink location=abc.aac
  * ]|
  * </refsect2>
  */
@@ -66,13 +66,19 @@
                     "88200, " \
                     "96000"
 
+/* voaacenc only supports 1 or 2 channels */
 static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_NE (S16) ", "
         "layout = (string) interleaved, "
-        "rate = (int) { " SAMPLE_RATES " }, " "channels = (int) [1, 2]")
+        "rate = (int) { " SAMPLE_RATES " }, " "channels = (int) 1;"
+        "audio/x-raw, "
+        "format = (string) " GST_AUDIO_NE (S16) ", "
+        "layout = (string) interleaved, "
+        "rate = (int) { " SAMPLE_RATES " }, " "channels = (int) 2, "
+        "channel-mask=(bitmask)0x3")
     );
 
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
@@ -98,7 +104,6 @@
     GstAudioInfo * info);
 static GstFlowReturn gst_voaacenc_handle_frame (GstAudioEncoder * enc,
     GstBuffer * in_buf);
-static GstCaps *gst_voaacenc_getcaps (GstAudioEncoder * enc, GstCaps * filter);
 
 G_DEFINE_TYPE (GstVoAacEnc, gst_voaacenc, GST_TYPE_AUDIO_ENCODER);
 
@@ -150,7 +155,6 @@
   base_class->stop = GST_DEBUG_FUNCPTR (gst_voaacenc_stop);
   base_class->set_format = GST_DEBUG_FUNCPTR (gst_voaacenc_set_format);
   base_class->handle_frame = GST_DEBUG_FUNCPTR (gst_voaacenc_handle_frame);
-  base_class->getcaps = GST_DEBUG_FUNCPTR (gst_voaacenc_getcaps);
 
   g_object_class_install_property (object_class, PROP_BITRATE,
       g_param_spec_int ("bitrate",
@@ -173,6 +177,7 @@
 static void
 gst_voaacenc_init (GstVoAacEnc * voaacenc)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (voaacenc));
   voaacenc->bitrate = VOAAC_ENC_DEFAULT_BITRATE;
   voaacenc->output_format = VOAAC_ENC_DEFAULT_OUTPUTFORMAT;
 
@@ -240,76 +245,6 @@
       GST_AUDIO_CHANNEL_POSITION_LFE1}
 };
 
-static gpointer
-gst_voaacenc_generate_sink_caps (gpointer data)
-{
-  GstCaps *caps;
-  gint i, c;
-  static const int rates[] = {
-    8000, 11025, 12000, 16000, 22050, 24000,
-    32000, 44100, 48000, 64000, 88200, 96000
-  };
-  GValue rates_arr = { 0, };
-  GValue tmp = { 0, };
-  GstStructure *s, *t;
-
-  g_value_init (&rates_arr, GST_TYPE_LIST);
-  g_value_init (&tmp, G_TYPE_INT);
-  for (i = 0; i < G_N_ELEMENTS (rates); i++) {
-    g_value_set_int (&tmp, rates[i]);
-    gst_value_list_append_value (&rates_arr, &tmp);
-  }
-  g_value_unset (&tmp);
-
-  s = gst_structure_new ("audio/x-raw",
-      "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
-      "layout", G_TYPE_STRING, "interleaved", NULL);
-  gst_structure_set_value (s, "rate", &rates_arr);
-
-  caps = gst_caps_new_empty ();
-
-  for (i = 1; i <= 2 /* VOAAC_ENC_MAX_CHANNELS */ ; i++) {
-    guint64 channel_mask = 0;
-    t = gst_structure_copy (s);
-
-    gst_structure_set (t, "channels", G_TYPE_INT, i, NULL);
-    if (i > 1) {
-      for (c = 0; c < i; c++)
-        channel_mask |=
-            G_GUINT64_CONSTANT (1) << aac_channel_positions[i - 1][c];
-
-      gst_structure_set (t, "channel-mask", GST_TYPE_BITMASK, channel_mask,
-          NULL);
-    }
-    gst_caps_append_structure (caps, t);
-  }
-
-  gst_structure_free (s);
-  g_value_unset (&rates_arr);
-
-  GST_DEBUG ("generated sink caps: %" GST_PTR_FORMAT, caps);
-  return caps;
-}
-
-static GstCaps *
-gst_voaacenc_get_sink_caps (void)
-{
-  static GOnce g_once = G_ONCE_INIT;
-  GstCaps *caps;
-
-  g_once (&g_once, gst_voaacenc_generate_sink_caps, NULL);
-  caps = g_once.retval;
-
-  return caps;
-}
-
-static GstCaps *
-gst_voaacenc_getcaps (GstAudioEncoder * benc, GstCaps * filter)
-{
-  return gst_audio_encoder_proxy_getcaps (benc, gst_voaacenc_get_sink_caps (),
-      filter);
-}
-
 /* check downstream caps to configure format */
 static void
 gst_voaacenc_negotiate (GstVoAacEnc * voaacenc)
@@ -376,18 +311,20 @@
     caps = gst_caps_new_simple ("audio/mpeg",
         "mpegversion", G_TYPE_INT, VOAAC_ENC_MPEGVERSION,
         "channels", G_TYPE_INT, voaacenc->channels,
-        "rate", G_TYPE_INT, voaacenc->rate,
-        "stream-format", G_TYPE_STRING,
-        (voaacenc->output_format ? "adts" : "raw")
-        , NULL);
+        "rate", G_TYPE_INT, voaacenc->rate, NULL);
 
     gst_codec_utils_aac_caps_set_level_and_profile (caps, map.data,
         VOAAC_ENC_CODECDATA_LEN);
     gst_buffer_unmap (codec_data, &map);
 
     if (!voaacenc->output_format) {
-      gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data,
-          NULL);
+      gst_caps_set_simple (caps,
+          "stream-format", G_TYPE_STRING, "raw",
+          "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
+    } else {
+      gst_caps_set_simple (caps,
+          "stream-format", G_TYPE_STRING, "adts",
+          "framed", G_TYPE_BOOLEAN, TRUE, NULL);
     }
     gst_buffer_unref (codec_data);
   }
diff --git a/ext/voamrwbenc/Makefile.in b/ext/voamrwbenc/Makefile.in
index db49b74..05c12be 100644
--- a/ext/voamrwbenc/Makefile.in
+++ b/ext/voamrwbenc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/voamrwbenc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,6 +129,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -762,7 +797,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/voamrwbenc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/voamrwbenc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1100,6 +1134,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pluginLTLIBRARIES uninstall-presetDATA
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/voamrwbenc/gstvoamrwbenc.c b/ext/voamrwbenc/gstvoamrwbenc.c
index e68565d..ae09f06 100644
--- a/ext/voamrwbenc/gstvoamrwbenc.c
+++ b/ext/voamrwbenc/gstvoamrwbenc.c
@@ -57,7 +57,7 @@
 gst_voamrwbenc_bandmode_get_type (void)
 {
   static GType gst_voamrwbenc_bandmode_type = 0;
-  static GEnumValue gst_voamrwbenc_bandmode[] = {
+  static const GEnumValue gst_voamrwbenc_bandmode[] = {
     {MR660, "MR660", "MR660"},
     {MR885, "MR885", "MR885"},
     {MR1265, "MR1265", "MR1265"},
@@ -190,6 +190,8 @@
 static void
 gst_voamrwbenc_init (GstVoAmrWbEnc * amrwbenc)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (amrwbenc));
+
   /* init rest */
   amrwbenc->handle = NULL;
   amrwbenc->channels = 0;
diff --git a/ext/wayland/Makefile.am b/ext/wayland/Makefile.am
index 58c1e99..e12d99a 100644
--- a/ext/wayland/Makefile.am
+++ b/ext/wayland/Makefile.am
@@ -2,7 +2,8 @@
 
 libgstwaylandsink_la_SOURCES =  \
 	gstwaylandsink.c \
-	waylandpool.c \
+	wlshmallocator.c \
+	wlbuffer.c \
 	wldisplay.c \
 	wlwindow.c \
 	wlvideoformat.c \
@@ -20,7 +21,8 @@
 
 noinst_HEADERS = \
 	gstwaylandsink.h \
-	waylandpool.h \
+	wlshmallocator.h \
+	wlbuffer.h \
 	wldisplay.h \
 	wlwindow.h \
 	wlvideoformat.h \
@@ -37,7 +39,9 @@
 
 gstwaylandsink.c: scaler-client-protocol.h
 
-waylandpool.c: scaler-client-protocol.h
+wlshmallocator.c: scaler-client-protocol.h
+
+wlbuffer.c: scaler-client-protocol.h
 
 wldisplay.c: scaler-client-protocol.h
 
diff --git a/ext/wayland/Makefile.in b/ext/wayland/Makefile.in
index 01d996f..f6af1f7 100644
--- a/ext/wayland/Makefile.in
+++ b/ext/wayland/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/wayland
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -159,7 +169,8 @@
 	$(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-wlshmallocator.lo \
+	libgstwaylandsink_la-wlbuffer.lo \
 	libgstwaylandsink_la-wldisplay.lo \
 	libgstwaylandsink_la-wlwindow.lo \
 	libgstwaylandsink_la-wlvideoformat.lo \
@@ -234,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -251,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -277,8 +291,6 @@
 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@
@@ -291,7 +303,6 @@
 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@
@@ -299,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -325,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -348,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -408,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -428,7 +446,6 @@
 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@
@@ -437,7 +454,6 @@
 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@
@@ -450,7 +466,6 @@
 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@
@@ -464,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -475,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -513,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -548,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -577,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -584,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -613,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -623,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -653,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -680,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -718,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -734,7 +770,8 @@
 plugin_LTLIBRARIES = libgstwaylandsink.la
 libgstwaylandsink_la_SOURCES = \
 	gstwaylandsink.c \
-	waylandpool.c \
+	wlshmallocator.c \
+	wlbuffer.c \
 	wldisplay.c \
 	wlwindow.c \
 	wlvideoformat.c \
@@ -753,7 +790,8 @@
 libgstwaylandsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = \
 	gstwaylandsink.h \
-	waylandpool.h \
+	wlshmallocator.h \
+	wlbuffer.h \
 	wldisplay.h \
 	wlwindow.h \
 	wlvideoformat.h \
@@ -777,7 +815,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/wayland/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/wayland/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -842,8 +879,9 @@
 
 @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-wlbuffer.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-wlshmallocator.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@
 
@@ -878,12 +916,19 @@
 @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-gstwaylandsink.lo `test -f 'gstwaylandsink.c' || echo '$(srcdir)/'`gstwaylandsink.c
 
-libgstwaylandsink_la-waylandpool.lo: waylandpool.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-waylandpool.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-waylandpool.Tpo -c -o libgstwaylandsink_la-waylandpool.lo `test -f 'waylandpool.c' || echo '$(srcdir)/'`waylandpool.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-waylandpool.Tpo $(DEPDIR)/libgstwaylandsink_la-waylandpool.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='waylandpool.c' object='libgstwaylandsink_la-waylandpool.lo' libtool=yes @AMDEPBACKSLASH@
+libgstwaylandsink_la-wlshmallocator.lo: wlshmallocator.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-wlshmallocator.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-wlshmallocator.Tpo -c -o libgstwaylandsink_la-wlshmallocator.lo `test -f 'wlshmallocator.c' || echo '$(srcdir)/'`wlshmallocator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-wlshmallocator.Tpo $(DEPDIR)/libgstwaylandsink_la-wlshmallocator.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wlshmallocator.c' object='libgstwaylandsink_la-wlshmallocator.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-waylandpool.lo `test -f 'waylandpool.c' || echo '$(srcdir)/'`waylandpool.c
+@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-wlshmallocator.lo `test -f 'wlshmallocator.c' || echo '$(srcdir)/'`wlshmallocator.c
+
+libgstwaylandsink_la-wlbuffer.lo: wlbuffer.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-wlbuffer.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-wlbuffer.Tpo -c -o libgstwaylandsink_la-wlbuffer.lo `test -f 'wlbuffer.c' || echo '$(srcdir)/'`wlbuffer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-wlbuffer.Tpo $(DEPDIR)/libgstwaylandsink_la-wlbuffer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wlbuffer.c' object='libgstwaylandsink_la-wlbuffer.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-wlbuffer.lo `test -f 'wlbuffer.c' || echo '$(srcdir)/'`wlbuffer.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
@@ -1127,6 +1172,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 %-protocol.c : %.xml
 	$(wayland_scanner) code < $< > $@
@@ -1136,7 +1183,9 @@
 
 gstwaylandsink.c: scaler-client-protocol.h
 
-waylandpool.c: scaler-client-protocol.h
+wlshmallocator.c: scaler-client-protocol.h
+
+wlbuffer.c: scaler-client-protocol.h
 
 wldisplay.c: scaler-client-protocol.h
 
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
index d029d83..b4d6f61 100644
--- a/ext/wayland/gstwaylandsink.c
+++ b/ext/wayland/gstwaylandsink.c
@@ -43,7 +43,8 @@
 
 #include "gstwaylandsink.h"
 #include "wlvideoformat.h"
-#include "waylandpool.h"
+#include "wlbuffer.h"
+#include "wlshmallocator.h"
 
 #include <gst/wayland/wayland.h>
 #include <gst/video/videooverlay.h>
@@ -211,14 +212,8 @@
 
   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));
-    }
+  if (sink->display)
     g_object_unref (sink->display);
-  }
   if (sink->window)
     g_object_unref (sink->window);
   if (sink->pool)
@@ -338,11 +333,7 @@
           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);
+          gst_wl_window_render (sink->window, NULL, NULL);
         }
       }
       break;
@@ -359,27 +350,10 @@
        * 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);
+      g_clear_object (&sink->pool);
       break;
     default:
       break;
@@ -432,7 +406,7 @@
     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));
+      g_value_set_string (&value, gst_wl_shm_format_to_string (fmt));
       gst_value_list_append_value (&list, &value);
     }
 
@@ -466,7 +440,6 @@
   GArray *formats;
   gint i;
   GstStructure *structure;
-  static GstAllocationParams params = { 0, 0, 0, 15, };
 
   sink = GST_WAYLAND_SINK (bsink);
 
@@ -476,7 +449,7 @@
   if (!gst_video_info_from_caps (&info, caps))
     goto invalid_format;
 
-  format = gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&info));
+  format = gst_video_format_to_wl_shm_format (GST_VIDEO_INFO_FORMAT (&info));
   if ((gint) format == -1)
     goto invalid_format;
 
@@ -491,13 +464,14 @@
     goto unsupported_format;
 
   /* create a new pool for the new configuration */
-  newpool = gst_wayland_buffer_pool_new (sink->display);
+  newpool = gst_video_buffer_pool_new ();
   if (!newpool)
     goto pool_failed;
 
   structure = gst_buffer_pool_get_config (newpool);
   gst_buffer_pool_config_set_params (structure, caps, info.size, 2, 0);
-  gst_buffer_pool_config_set_allocator (structure, NULL, &params);
+  gst_buffer_pool_config_set_allocator (structure, gst_wl_shm_allocator_get (),
+      NULL);
   if (!gst_buffer_pool_set_config (newpool, structure))
     goto config_failed;
 
@@ -519,7 +493,7 @@
 unsupported_format:
   {
     GST_DEBUG_OBJECT (sink, "Format %s is not available on the display",
-        gst_wayland_format_to_string (format));
+        gst_wl_shm_format_to_string (format));
     return FALSE;
   }
 pool_failed:
@@ -539,76 +513,20 @@
 gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
 {
   GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
-  GstBufferPool *pool = NULL;
   GstStructure *config;
-  GstCaps *caps;
-  guint size;
-  gboolean need_pool;
+  guint size, min_bufs, max_bufs;
 
-  gst_query_parse_allocation (query, &caps, &need_pool);
+  config = gst_buffer_pool_get_config (sink->pool);
+  gst_buffer_pool_config_get_params (config, NULL, &size, &min_bufs, &max_bufs);
 
-  if (caps == NULL)
-    goto no_caps;
+  /* we do have a pool for sure (created in set_caps),
+   * so let's propose it anyway, but also propose the allocator on its own */
+  gst_query_add_allocation_pool (query, sink->pool, size, min_bufs, max_bufs);
+  gst_query_add_allocation_param (query, gst_wl_shm_allocator_get (), NULL);
 
-  if (sink->pool)
-    pool = gst_object_ref (sink->pool);
-
-  if (pool != NULL) {
-    GstCaps *pcaps;
-
-    /* we had a pool, check caps */
-    config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
-
-    if (!gst_caps_is_equal (caps, pcaps)) {
-      /* different caps, we can't use this pool */
-      gst_object_unref (pool);
-      pool = NULL;
-    }
-    gst_structure_free (config);
-  }
-
-  if (pool == NULL && need_pool) {
-    GstVideoInfo info;
-
-    if (!gst_video_info_from_caps (&info, caps))
-      goto invalid_caps;
-
-    GST_DEBUG_OBJECT (sink, "create new pool");
-    pool = gst_wayland_buffer_pool_new (sink->display);
-
-    /* the normal size of a frame */
-    size = info.size;
-
-    config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_set_params (config, caps, size, 2, 0);
-    if (!gst_buffer_pool_set_config (pool, config))
-      goto config_failed;
-  }
-  if (pool) {
-    gst_query_add_allocation_pool (query, pool, size, 2, 0);
-    gst_object_unref (pool);
-  }
+  gst_structure_free (config);
 
   return TRUE;
-
-  /* ERRORS */
-no_caps:
-  {
-    GST_DEBUG_OBJECT (bsink, "no caps specified");
-    return FALSE;
-  }
-invalid_caps:
-  {
-    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
-    return FALSE;
-  }
-config_failed:
-  {
-    GST_DEBUG_OBJECT (bsink, "failed setting config");
-    gst_object_unref (pool);
-    return FALSE;
-  }
 }
 
 static GstFlowReturn
@@ -637,29 +555,23 @@
 static void
 render_last_buffer (GstWaylandSink * sink)
 {
-  GstWlMeta *meta;
+  GstWlBuffer *wlbuffer;
+  const GstVideoInfo *info = NULL;
   struct wl_surface *surface;
   struct wl_callback *callback;
 
-  meta = gst_buffer_get_wl_meta (sink->last_buffer);
+  wlbuffer = gst_buffer_get_wl_buffer (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);
+  if (G_UNLIKELY (sink->video_info_changed)) {
+    info = &sink->video_info;
+    sink->video_info_changed = FALSE;
+  }
+  gst_wl_window_render (sink->window, wlbuffer, info);
 }
 
 static GstFlowReturn
@@ -667,7 +579,7 @@
 {
   GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
   GstBuffer *to_render;
-  GstWlMeta *meta;
+  GstWlBuffer *wlbuffer;
   GstFlowReturn ret = GST_FLOW_OK;
 
   g_mutex_lock (&sink->render_lock);
@@ -681,57 +593,86 @@
     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 (!sink->window) {
       /* 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))
+  /* make sure that the application has called set_render_rectangle() */
+  if (G_UNLIKELY (sink->window->render_rectangle.w == 0))
     goto no_window_size;
 
-  meta = gst_buffer_get_wl_meta (buffer);
+  wlbuffer = gst_buffer_get_wl_buffer (buffer);
 
-  if (meta && meta->pool->display == sink->display) {
-    GST_LOG_OBJECT (sink, "buffer %p from our pool, writing directly", buffer);
+  if (G_LIKELY (wlbuffer && wlbuffer->display == sink->display)) {
+    GST_LOG_OBJECT (sink, "buffer %p has a wl_buffer from our display, "
+        "writing directly", buffer);
     to_render = buffer;
   } else {
-    GstMapInfo src;
-    GST_LOG_OBJECT (sink, "buffer %p not from our pool, copying", buffer);
+    GstMemory *mem;
+    struct wl_buffer *wbuf = NULL;
 
-    if (!sink->pool)
-      goto no_pool;
+    GST_LOG_OBJECT (sink, "buffer %p does not have a wl_buffer from our "
+        "display, creating it", buffer);
 
-    if (!gst_buffer_pool_set_active (sink->pool, TRUE))
-      goto activate_failed;
+    mem = gst_buffer_peek_memory (buffer, 0);
 
-    ret = gst_buffer_pool_acquire_buffer (sink->pool, &to_render, NULL);
-    if (ret != GST_FLOW_OK)
-      goto no_buffer;
+    if (gst_is_wl_shm_memory (mem)) {
+      wbuf = gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+          &sink->video_info);
+    }
 
-    gst_buffer_map (buffer, &src, GST_MAP_READ);
-    gst_buffer_fill (to_render, 0, src.data, src.size);
-    gst_buffer_unmap (buffer, &src);
+    if (wbuf) {
+      gst_buffer_add_wl_buffer (buffer, wbuf, sink->display);
+      to_render = buffer;
+    } else {
+      GstMapInfo src;
+      /* we don't know how to create a wl_buffer directly from the provided
+       * memory, so we have to copy the data to a memory that we know how
+       * to handle... */
+
+      GST_LOG_OBJECT (sink, "buffer %p cannot have a wl_buffer, "
+          "copying to wl_shm memory", buffer);
+
+      /* sink->pool always exists (created in set_caps), but it may not
+       * be active if upstream is not using it */
+      if (!gst_buffer_pool_is_active (sink->pool) &&
+          !gst_buffer_pool_set_active (sink->pool, TRUE))
+        goto activate_failed;
+
+      ret = gst_buffer_pool_acquire_buffer (sink->pool, &to_render, NULL);
+      if (ret != GST_FLOW_OK)
+        goto no_buffer;
+
+      /* the first time we acquire a buffer,
+       * we need to attach a wl_buffer on it */
+      wlbuffer = gst_buffer_get_wl_buffer (buffer);
+      if (G_UNLIKELY (!wlbuffer)) {
+        mem = gst_buffer_peek_memory (to_render, 0);
+        wbuf = gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
+            &sink->video_info);
+        if (G_UNLIKELY (!wbuf))
+          goto no_wl_buffer;
+
+        gst_buffer_add_wl_buffer (buffer, wbuf, sink->display);
+      }
+
+      gst_buffer_map (buffer, &src, GST_MAP_READ);
+      gst_buffer_fill (to_render, 0, src.data, src.size);
+      gst_buffer_unmap (buffer, &src);
+    }
+  }
+
+  /* drop double rendering */
+  if (G_UNLIKELY (to_render == sink->last_buffer)) {
+    GST_LOG_OBJECT (sink, "Buffer already being rendered");
+    goto done;
   }
 
   gst_buffer_replace (&sink->last_buffer, to_render);
@@ -751,14 +692,12 @@
   }
 no_buffer:
   {
-    GST_WARNING_OBJECT (sink, "could not create image");
+    GST_WARNING_OBJECT (sink, "could not create buffer");
     goto done;
   }
-no_pool:
+no_wl_buffer:
   {
-    GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
-        ("Internal error: can't allocate images"),
-        ("We don't have a bufferpool negotiated"));
+    GST_ERROR_OBJECT (sink, "could not create wl_buffer out of wl_shm memory");
     ret = GST_FLOW_ERROR;
     goto done;
   }
@@ -873,14 +812,14 @@
   g_return_if_fail (sink != NULL);
 
   g_mutex_lock (&sink->render_lock);
-  if (!sink->window || !sink->window->subsurface) {
+  if (!sink->window || !sink->window->area_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);
+  wl_subsurface_set_sync (sink->window->area_subsurface);
   g_mutex_unlock (&sink->render_lock);
 }
 
@@ -891,14 +830,14 @@
   g_return_if_fail (sink != NULL);
 
   g_mutex_lock (&sink->render_lock);
-  if (!sink->window || !sink->window->subsurface) {
+  if (!sink->window || !sink->window->area_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);
+  wl_subsurface_set_desync (sink->window->area_subsurface);
   g_mutex_unlock (&sink->render_lock);
 }
 
@@ -908,6 +847,8 @@
   GST_DEBUG_CATEGORY_INIT (gstwayland_debug, "waylandsink", 0,
       " wayland video sink");
 
+  gst_wl_shm_allocator_register ();
+
   return gst_element_register (plugin, "waylandsink", GST_RANK_MARGINAL,
       GST_TYPE_WAYLAND_SINK);
 }
diff --git a/ext/wayland/scaler-client-protocol.h b/ext/wayland/scaler-client-protocol.h
index bfdbd16..5274081 100644
--- a/ext/wayland/scaler-client-protocol.h
+++ b/ext/wayland/scaler-client-protocol.h
@@ -38,6 +38,7 @@
 struct wl_resource;
 
 struct wl_scaler;
+struct wl_surface;
 struct wl_viewport;
 
 extern const struct wl_interface wl_scaler_interface;
diff --git a/ext/wayland/waylandpool.c b/ext/wayland/waylandpool.c
deleted file mode 100644
index de20602..0000000
--- a/ext/wayland/waylandpool.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/* 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
- * 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 "waylandpool.h"
-#include "wldisplay.h"
-#include "wlvideoformat.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-
-GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-#define GST_CAT_DEFAULT gstwayland_debug
-
-/* wl metadata */
-GType
-gst_wl_meta_api_get_type (void)
-{
-  static volatile GType type;
-  static const gchar *tags[] =
-      { "memory", "size", "colorspace", "orientation", NULL };
-
-  if (g_once_init_enter (&type)) {
-    GType _type = gst_meta_api_type_register ("GstWlMetaAPI", tags);
-    g_once_init_leave (&type, _type);
-  }
-  return type;
-}
-
-static void
-gst_wl_meta_free (GstWlMeta * meta, GstBuffer * buffer)
-{
-  GST_DEBUG ("destroying wl_buffer %p", meta->wbuffer);
-  wl_buffer_destroy (meta->wbuffer);
-}
-
-const GstMetaInfo *
-gst_wl_meta_get_info (void)
-{
-  static const GstMetaInfo *wl_meta_info = NULL;
-
-  if (g_once_init_enter (&wl_meta_info)) {
-    const GstMetaInfo *meta =
-        gst_meta_register (GST_WL_META_API_TYPE, "GstWlMeta",
-        sizeof (GstWlMeta), (GstMetaInitFunction) NULL,
-        (GstMetaFreeFunction) gst_wl_meta_free,
-        (GstMetaTransformFunction) NULL);
-    g_once_init_leave (&wl_meta_info, meta);
-  }
-  return wl_meta_info;
-}
-
-/* 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 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 = 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))
-    goto wrong_config;
-
-  if (caps == NULL)
-    goto no_caps;
-
-  /* now parse the caps from the config */
-  if (!gst_video_info_from_caps (&self->info, caps))
-    goto wrong_caps;
-
-  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 */
-
-  return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
-  /* ERRORS */
-wrong_config:
-  {
-    GST_WARNING_OBJECT (pool, "invalid config");
-    return FALSE;
-  }
-no_caps:
-  {
-    GST_WARNING_OBJECT (pool, "no caps in config");
-    return FALSE;
-  }
-wrong_caps:
-  {
-    GST_WARNING_OBJECT (pool,
-        "failed getting geometry from caps %" GST_PTR_FORMAT, caps);
-    return FALSE;
-  }
-}
-
-static gboolean
-gst_wayland_buffer_pool_start (GstBufferPool * pool)
-{
-  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL (pool);
-  guint size = 0;
-  int fd;
-  char filename[1024];
-  static int init = 0;
-
-  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_OBJECT (pool, "opening temp file %s failed: %s", filename,
-        strerror (errno));
-    return FALSE;
-  }
-  if (ftruncate (fd, size) < 0) {
-    GST_ERROR_OBJECT (pool, "ftruncate failed: %s", strerror (errno));
-    close (fd);
-    return FALSE;
-  }
-
-  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 FALSE;
-  }
-
-  self->wl_pool = wl_shm_create_pool (self->display->shm, fd, size);
-  unlink (filename);
-  close (fd);
-
-  self->size = size;
-  self->used = 0;
-
-  return GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
-}
-
-static gboolean
-gst_wayland_buffer_pool_stop (GstBufferPool * pool)
-{
-  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL (pool);
-
-  GST_DEBUG_OBJECT (self, "Stopping wayland buffer pool");
-
-  munmap (self->data, self->size);
-  wl_shm_pool_destroy (self->wl_pool);
-
-  self->wl_pool = NULL;
-  self->size = 0;
-  self->used = 0;
-
-  /* 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);
-
-  return GST_BUFFER_POOL_CLASS (parent_class)->stop (pool);
-}
-
-static GstFlowReturn
-gst_wayland_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
-    GstBufferPoolAcquireParams * params)
-{
-  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;
-
-  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;
-
-  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;
-
-  /* ERROR */
-no_buffer:
-  {
-    GST_WARNING_OBJECT (pool, "can't create buffer");
-    return GST_FLOW_ERROR;
-  }
-}
-
-GstBufferPool *
-gst_wayland_buffer_pool_new (GstWlDisplay * display)
-{
-  GstWaylandBufferPool *pool;
-
-  g_return_val_if_fail (GST_IS_WL_DISPLAY (display), NULL);
-  pool = g_object_new (GST_TYPE_WAYLAND_BUFFER_POOL, NULL);
-  pool->display = g_object_ref (display);
-
-  return GST_BUFFER_POOL_CAST (pool);
-}
diff --git a/ext/wayland/waylandpool.h b/ext/wayland/waylandpool.h
deleted file mode 100644
index ad5020b..0000000
--- a/ext/wayland/waylandpool.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* 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
- * 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_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
-
-#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())
-
-#define gst_buffer_get_wl_meta(b) ((GstWlMeta*)gst_buffer_get_meta((b),GST_WL_META_API_TYPE))
-
-struct _GstWlMeta {
-  GstMeta meta;
-
-  GstWaylandBufferPool *pool;
-  struct wl_buffer *wbuffer;
-  gboolean used_by_compositor;
-};
-
-/* buffer pool */
-struct _GstWaylandBufferPool
-{
-  GstBufferPool bufferpool;
-  GstWlDisplay *display;
-
-  /* external configuration */
-  GstVideoInfo info;
-
-  /* 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
-{
-  GstBufferPoolClass parent_class;
-};
-
-GType gst_wayland_buffer_pool_get_type (void);
-
-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
-
-#endif /*__GST_WAYLAND_BUFFER_POOL_H__*/
diff --git a/ext/wayland/wlbuffer.c b/ext/wayland/wlbuffer.c
new file mode 100644
index 0000000..4ac99ef
--- /dev/null
+++ b/ext/wayland/wlbuffer.c
@@ -0,0 +1,232 @@
+/* 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.
+ */
+
+/* GstWlBuffer wraps wl_buffer and provides a mechanism for preventing
+ * buffers from being re-used while the compositor is using them. This
+ * is achieved by adding a reference to the GstBuffer as soon as its
+ * associated wl_buffer is sent to the compositor and by removing this
+ * reference as soon as the compositor sends a wl_buffer::release message.
+ *
+ * This mechanism is a bit complicated, though, because it adds cyclic
+ * references that can be dangerous. The reference cycles looks like:
+ *
+ *   ----------------
+ *   | GstWlDisplay | ---------------------------->
+ *   ----------------                              |
+ *                                                 |
+ *                                                 V
+ *   -----------------     -------------     ---------------
+ *   | GstBufferPool | --> | GstBuffer | ==> | GstWlBuffer |
+ *   |               | <-- |           | <-- |             |
+ *   -----------------     -------------     ---------------
+ *
+ * A GstBufferPool normally holds references to its GstBuffers and each buffer
+ * holds a reference to a GstWlBuffer (saved in the GstMiniObject qdata).
+ * When a GstBuffer is in use, it holds a reference back to the pool and the
+ * pool doesn't hold a reference to the GstBuffer. When the GstBuffer is unrefed
+ * externally, it returns back to the pool and the pool holds again a reference
+ * to the buffer.
+ *
+ * Now when the compositor is using a buffer, the GstWlBuffer also holds a ref
+ * to the GstBuffer, which prevents it from returning to the pool. When the
+ * last GstWlBuffer receives a release event and unrefs the last GstBuffer,
+ * the GstBufferPool will be able to stop and if no-one is holding a strong
+ * ref to it, it will be destroyed. This will destroy the pool's GstBuffers and
+ * also the GstWlBuffers. This will all happen in the same context of the last
+ * gst_buffer_unref, which will be called from the buffer_release() callback.
+ *
+ * The problem here lies in the fact that buffer_release() will be called
+ * from the event loop thread of GstWlDisplay, so it's as if the display
+ * holds a reference to the GstWlBuffer, but without having an actual reference.
+ * When we kill the display, there is no way for the GstWlBuffer, the associated
+ * GstBuffer and the GstBufferPool to get destroyed, so we are going to leak a
+ * fair ammount of memory.
+ *
+ * Normally, this rarely happens, because the compositor releases buffers
+ * almost immediately and when waylandsink stops, they are already released.
+ *
+ * However, we want to be absolutely certain, so a solution is introduced
+ * by registering all the GstWlBuffers with the display and explicitly
+ * releasing all the buffer references as soon as the display is destroyed.
+ *
+ * When the GstWlDisplay is finalized, it takes a reference to all the
+ * registered GstWlBuffers and then calls gst_wl_buffer_force_release_and_unref,
+ * which releases the potential reference to the GstBuffer, destroys the
+ * underlying wl_buffer and removes the reference that GstWlDisplay is holding.
+ * At that point, either the GstBuffer is alive somewhere and still holds a ref
+ * to the GstWlBuffer, which it will release when it gets destroyed, or the
+ * GstBuffer was destroyed in the meantime and the GstWlBuffer gets destroyed
+ * as soon as we remove the reference that GstWlDisplay holds.
+ */
+
+#include "wlbuffer.h"
+
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
+
+G_DEFINE_TYPE (GstWlBuffer, gst_wl_buffer, G_TYPE_OBJECT);
+
+static G_DEFINE_QUARK (GstWlBufferQDataQuark, gst_wl_buffer_qdata);
+
+static void
+gst_wl_buffer_dispose (GObject * gobject)
+{
+  GstWlBuffer *self = GST_WL_BUFFER (gobject);
+
+  GST_TRACE_OBJECT (self, "dispose");
+
+  /* if the display is shutting down and we are trying to dipose
+   * the GstWlBuffer from another thread, unregister_buffer() will
+   * block and in the end the display will increase the refcount
+   * of this GstWlBuffer, so it will not be finalized */
+  if (self->display)
+    gst_wl_display_unregister_buffer (self->display, self);
+
+  G_OBJECT_CLASS (gst_wl_buffer_parent_class)->dispose (gobject);
+}
+
+static void
+gst_wl_buffer_finalize (GObject * gobject)
+{
+  GstWlBuffer *self = GST_WL_BUFFER (gobject);
+
+  GST_TRACE_OBJECT (self, "finalize");
+
+  if (self->wlbuffer)
+    wl_buffer_destroy (self->wlbuffer);
+
+  G_OBJECT_CLASS (gst_wl_buffer_parent_class)->finalize (gobject);
+}
+
+static void
+gst_wl_buffer_class_init (GstWlBufferClass * klass)
+{
+  GObjectClass *object_class = (GObjectClass *) klass;
+
+  object_class->dispose = gst_wl_buffer_dispose;
+  object_class->finalize = gst_wl_buffer_finalize;
+}
+
+static void
+gst_wl_buffer_init (GstWlBuffer * self)
+{
+}
+
+static void
+buffer_release (void *data, struct wl_buffer *wl_buffer)
+{
+  GstWlBuffer *self = data;
+
+  GST_LOG_OBJECT (self, "wl_buffer::release (GstBuffer: %p)", self->gstbuffer);
+
+  self->used_by_compositor = FALSE;
+
+  /* unref should be last, because it may end up destroying the GstWlBuffer */
+  gst_buffer_unref (self->gstbuffer);
+}
+
+static const struct wl_buffer_listener buffer_listener = {
+  buffer_release
+};
+
+static void
+gstbuffer_disposed (GstWlBuffer * self)
+{
+  g_assert (!self->used_by_compositor);
+  self->gstbuffer = NULL;
+
+  GST_TRACE_OBJECT (self, "owning GstBuffer was finalized");
+
+  /* this will normally destroy the GstWlBuffer, unless the display is
+   * finalizing and it has taken an additional reference to it */
+  g_object_unref (self);
+}
+
+GstWlBuffer *
+gst_buffer_add_wl_buffer (GstBuffer * gstbuffer, struct wl_buffer *wlbuffer,
+    GstWlDisplay * display)
+{
+  GstWlBuffer *self;
+
+  self = g_object_new (GST_TYPE_WL_BUFFER, NULL);
+  self->gstbuffer = gstbuffer;
+  self->wlbuffer = wlbuffer;
+  self->display = display;
+
+  gst_wl_display_register_buffer (self->display, self);
+
+  wl_buffer_add_listener (self->wlbuffer, &buffer_listener, self);
+
+  gst_mini_object_set_qdata ((GstMiniObject *) gstbuffer,
+      gst_wl_buffer_qdata_quark (), self, (GDestroyNotify) gstbuffer_disposed);
+
+  return self;
+}
+
+GstWlBuffer *
+gst_buffer_get_wl_buffer (GstBuffer * gstbuffer)
+{
+  return gst_mini_object_get_qdata ((GstMiniObject *) gstbuffer,
+      gst_wl_buffer_qdata_quark ());
+}
+
+void
+gst_wl_buffer_force_release_and_unref (GstWlBuffer * self)
+{
+  /* Force a buffer release.
+   * At this point, the GstWlDisplay has killed its event loop,
+   * so we don't need to worry about buffer_release() being called
+   * at the same time from the event loop thread */
+  if (self->used_by_compositor) {
+    GST_DEBUG_OBJECT (self, "forcing wl_buffer::release (GstBuffer: %p)",
+        self->gstbuffer);
+    self->used_by_compositor = FALSE;
+    gst_buffer_unref (self->gstbuffer);
+  }
+
+  /* Finalize this GstWlBuffer early.
+   * This method has been called as a result of the display shutting down,
+   * so we need to stop using any wayland resources and disconnect from
+   * the display. The GstWlBuffer stays alive, though, to avoid race
+   * conditions with the GstBuffer being destroyed from another thread.
+   * The last reference is either owned by the GstBuffer or by us and
+   * it will be released at the end of this function. */
+  GST_TRACE_OBJECT (self, "finalizing early");
+  wl_buffer_destroy (self->wlbuffer);
+  self->wlbuffer = NULL;
+  self->display = NULL;
+
+  /* remove the reference that the caller (GstWlDisplay) owns */
+  g_object_unref (self);
+}
+
+void
+gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface)
+{
+  g_return_if_fail (self->used_by_compositor == FALSE);
+
+  wl_surface_attach (surface, self->wlbuffer, 0, 0);
+
+  /* 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 re-used until the compositor releases it. */
+  gst_buffer_ref (self->gstbuffer);
+  self->used_by_compositor = TRUE;
+}
diff --git a/ext/wayland/wlbuffer.h b/ext/wayland/wlbuffer.h
new file mode 100644
index 0000000..cbb50f7
--- /dev/null
+++ b/ext/wayland/wlbuffer.h
@@ -0,0 +1,67 @@
+/* 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_BUFFER_H__
+#define __GST_WL_BUFFER_H__
+
+#include "wldisplay.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WL_BUFFER                  (gst_wl_buffer_get_type ())
+#define GST_WL_BUFFER(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_BUFFER, GstWlBuffer))
+#define GST_IS_WL_BUFFER(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_BUFFER))
+#define GST_WL_BUFFER_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_BUFFER, GstWlBufferClass))
+#define GST_IS_WL_BUFFER_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_BUFFER))
+#define GST_WL_BUFFER_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_BUFFER, GstWlBufferClass))
+
+typedef struct _GstWlBuffer GstWlBuffer;
+typedef struct _GstWlBufferClass GstWlBufferClass;
+
+struct _GstWlBuffer
+{
+  GObject parent_instance;
+
+  struct wl_buffer * wlbuffer;
+  GstBuffer *gstbuffer;
+
+  GstWlDisplay *display;
+
+  gboolean used_by_compositor;
+};
+
+struct _GstWlBufferClass
+{
+  GObjectClass parent_class;
+};
+
+GType gst_wl_buffer_get_type (void);
+
+GstWlBuffer * gst_buffer_add_wl_buffer (GstBuffer * gstbuffer,
+    struct wl_buffer * wlbuffer, GstWlDisplay * display);
+GstWlBuffer * gst_buffer_get_wl_buffer (GstBuffer * gstbuffer);
+
+void gst_wl_buffer_force_release_and_unref (GstWlBuffer * self);
+
+void gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface);
+
+G_END_DECLS
+
+#endif /* __GST_WL_BUFFER_H__ */
diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
index 46efab9..8c5eeaf 100644
--- a/ext/wayland/wldisplay.c
+++ b/ext/wayland/wldisplay.c
@@ -23,6 +23,7 @@
 #endif
 
 #include "wldisplay.h"
+#include "wlbuffer.h"
 
 #include <errno.h>
 
@@ -45,6 +46,8 @@
 {
   self->formats = g_array_new (FALSE, FALSE, sizeof (uint32_t));
   self->wl_fd_poll = gst_poll_new (TRUE);
+  self->buffers = g_hash_table_new (g_direct_hash, g_direct_equal);
+  g_mutex_init (&self->buffers_mutex);
 }
 
 static void
@@ -53,12 +56,23 @@
   GstWlDisplay *self = GST_WL_DISPLAY (gobject);
 
   gst_poll_set_flushing (self->wl_fd_poll, TRUE);
+  g_thread_join (self->thread);
 
-  if (self->thread)
-    g_thread_join (self->thread);
+  /* to avoid buffers being unregistered from another thread
+   * at the same time, take their ownership */
+  g_mutex_lock (&self->buffers_mutex);
+  self->shutting_down = TRUE;
+  g_hash_table_foreach (self->buffers, (GHFunc) g_object_ref, NULL);
+  g_mutex_unlock (&self->buffers_mutex);
+
+  g_hash_table_foreach (self->buffers,
+      (GHFunc) gst_wl_buffer_force_release_and_unref, NULL);
+  g_hash_table_remove_all (self->buffers);
 
   g_array_unref (self->formats);
   gst_poll_free (self->wl_fd_poll);
+  g_hash_table_unref (self->buffers);
+  g_mutex_clear (&self->buffers_mutex);
 
   if (self->shm)
     wl_shm_destroy (self->shm);
@@ -266,3 +280,26 @@
 
   return self;
 }
+
+void
+gst_wl_display_register_buffer (GstWlDisplay * self, gpointer buf)
+{
+  g_assert (!self->shutting_down);
+
+  GST_TRACE_OBJECT (self, "registering GstWlBuffer %p", buf);
+
+  g_mutex_lock (&self->buffers_mutex);
+  g_hash_table_add (self->buffers, buf);
+  g_mutex_unlock (&self->buffers_mutex);
+}
+
+void
+gst_wl_display_unregister_buffer (GstWlDisplay * self, gpointer buf)
+{
+  GST_TRACE_OBJECT (self, "unregistering GstWlBuffer %p", buf);
+
+  g_mutex_lock (&self->buffers_mutex);
+  if (G_LIKELY (!self->shutting_down))
+    g_hash_table_remove (self->buffers, buf);
+  g_mutex_unlock (&self->buffers_mutex);
+}
diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h
index 0224406..5505d60 100644
--- a/ext/wayland/wldisplay.h
+++ b/ext/wayland/wldisplay.h
@@ -58,6 +58,10 @@
   gboolean own_display;
   GThread *thread;
   GstPoll *wl_fd_poll;
+
+  GMutex buffers_mutex;
+  GHashTable *buffers;
+  gboolean shutting_down;
 };
 
 struct _GstWlDisplayClass
@@ -71,6 +75,10 @@
 GstWlDisplay *gst_wl_display_new_existing (struct wl_display * display,
     gboolean take_ownership, GError ** error);
 
+/* see wlbuffer.c for explanation */
+void gst_wl_display_register_buffer (GstWlDisplay * self, gpointer buf);
+void gst_wl_display_unregister_buffer (GstWlDisplay * self, gpointer buf);
+
 G_END_DECLS
 
 #endif /* __GST_WL_DISPLAY_H__ */
diff --git a/ext/wayland/wlshmallocator.c b/ext/wayland/wlshmallocator.c
new file mode 100644
index 0000000..6d82b23
--- /dev/null
+++ b/ext/wayland/wlshmallocator.c
@@ -0,0 +1,181 @@
+/* GStreamer Wayland video sink
+ *
+ * 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
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "wlshmallocator.h"
+#include "wlvideoformat.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
+
+G_DEFINE_TYPE (GstWlShmAllocator, gst_wl_shm_allocator, GST_TYPE_ALLOCATOR);
+
+static GstMemory *
+gst_wl_shm_allocator_alloc (GstAllocator * allocator, gsize size,
+    GstAllocationParams * params)
+{
+  GstWlShmAllocator *self = GST_WL_SHM_ALLOCATOR (allocator);
+  char filename[1024];
+  static int init = 0;
+  int fd;
+  gpointer data;
+  GstWlShmMemory *mem;
+
+  /* TODO: make use of the allocation params, if necessary */
+
+  /* allocate shm pool */
+  snprintf (filename, 1024, "%s/%s-%d-%s", g_get_user_runtime_dir (),
+      "wayland-shm", init++, "XXXXXX");
+
+  fd = g_mkstemp (filename);
+  if (fd < 0) {
+    GST_ERROR_OBJECT (self, "opening temp file %s failed: %s", filename,
+        strerror (errno));
+    return NULL;
+  }
+  if (ftruncate (fd, size) < 0) {
+    GST_ERROR_OBJECT (self, "ftruncate failed: %s", strerror (errno));
+    close (fd);
+    return NULL;
+  }
+
+  data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+  if (data == MAP_FAILED) {
+    GST_ERROR_OBJECT (self, "mmap failed: %s", strerror (errno));
+    close (fd);
+    return NULL;
+  }
+
+  unlink (filename);
+
+  mem = g_slice_new0 (GstWlShmMemory);
+  gst_memory_init ((GstMemory *) mem, GST_MEMORY_FLAG_NO_SHARE, allocator, NULL,
+      size, 0, 0, size);
+  mem->data = data;
+  mem->fd = fd;
+
+  return (GstMemory *) mem;
+}
+
+static void
+gst_wl_shm_allocator_free (GstAllocator * allocator, GstMemory * memory)
+{
+  GstWlShmMemory *shm_mem = (GstWlShmMemory *) memory;
+
+  if (shm_mem->fd != -1)
+    close (shm_mem->fd);
+  munmap (shm_mem->data, memory->maxsize);
+
+  g_slice_free (GstWlShmMemory, shm_mem);
+}
+
+static gpointer
+gst_wl_shm_mem_map (GstMemory * mem, gsize maxsize, GstMapFlags flags)
+{
+  return ((GstWlShmMemory *) mem)->data;
+}
+
+static void
+gst_wl_shm_mem_unmap (GstMemory * mem)
+{
+}
+
+static void
+gst_wl_shm_allocator_class_init (GstWlShmAllocatorClass * klass)
+{
+  GstAllocatorClass *alloc_class = (GstAllocatorClass *) klass;
+
+  alloc_class->alloc = GST_DEBUG_FUNCPTR (gst_wl_shm_allocator_alloc);
+  alloc_class->free = GST_DEBUG_FUNCPTR (gst_wl_shm_allocator_free);
+}
+
+static void
+gst_wl_shm_allocator_init (GstWlShmAllocator * self)
+{
+  self->parent_instance.mem_type = GST_ALLOCATOR_WL_SHM;
+  self->parent_instance.mem_map = gst_wl_shm_mem_map;
+  self->parent_instance.mem_unmap = gst_wl_shm_mem_unmap;
+
+  GST_OBJECT_FLAG_SET (self, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
+}
+
+void
+gst_wl_shm_allocator_register (void)
+{
+  gst_allocator_register (GST_ALLOCATOR_WL_SHM,
+      g_object_new (GST_TYPE_WL_SHM_ALLOCATOR, NULL));
+}
+
+GstAllocator *
+gst_wl_shm_allocator_get (void)
+{
+  return gst_allocator_find (GST_ALLOCATOR_WL_SHM);
+}
+
+gboolean
+gst_is_wl_shm_memory (GstMemory * mem)
+{
+  return gst_memory_is_type (mem, GST_ALLOCATOR_WL_SHM);
+}
+
+struct wl_buffer *
+gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
+    const GstVideoInfo * info)
+{
+  GstWlShmMemory *shm_mem = (GstWlShmMemory *) mem;
+  gint width, height, stride;
+  gsize size;
+  enum wl_shm_format format;
+  struct wl_shm_pool *wl_pool;
+  struct wl_buffer *wbuffer;
+
+  width = GST_VIDEO_INFO_WIDTH (info);
+  height = GST_VIDEO_INFO_HEIGHT (info);
+  stride = GST_VIDEO_INFO_PLANE_STRIDE (info, 0);
+  size = GST_VIDEO_INFO_SIZE (info);
+  format = gst_video_format_to_wl_shm_format (GST_VIDEO_INFO_FORMAT (info));
+
+  g_return_val_if_fail (gst_is_wl_shm_memory (mem), NULL);
+  g_return_val_if_fail (size <= mem->size, NULL);
+  g_return_val_if_fail (shm_mem->fd != -1, NULL);
+
+  GST_DEBUG_OBJECT (mem->allocator, "Creating wl_buffer of size %"
+      G_GSSIZE_FORMAT " (%d x %d, stride %d), format %s", size, width, height,
+      stride, gst_wl_shm_format_to_string (format));
+
+  wl_pool = wl_shm_create_pool (display->shm, shm_mem->fd, mem->size);
+  wbuffer = wl_shm_pool_create_buffer (wl_pool, 0, width, height, stride,
+      format);
+
+  close (shm_mem->fd);
+  shm_mem->fd = -1;
+  wl_shm_pool_destroy (wl_pool);
+
+  return wbuffer;
+}
diff --git a/ext/wayland/wlshmallocator.h b/ext/wayland/wlshmallocator.h
new file mode 100644
index 0000000..f12882c
--- /dev/null
+++ b/ext/wayland/wlshmallocator.h
@@ -0,0 +1,74 @@
+/* GStreamer Wayland video sink
+ *
+ * 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
+ * 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_WL_SHM_ALLOCATOR_H__
+#define __GST_WL_SHM_ALLOCATOR_H__
+
+#include <gst/video/video.h>
+#include <wayland-client-protocol.h>
+#include "wldisplay.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WL_SHM_ALLOCATOR                  (gst_wl_shm_allocator_get_type ())
+#define GST_WL_SHM_ALLOCATOR(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocator))
+#define GST_IS_WL_SHM_ALLOCATOR(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_SHM_ALLOCATOR))
+#define GST_WL_SHM_ALLOCATOR_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocatorClass))
+#define GST_IS_WL_SHM_ALLOCATOR_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_SHM_ALLOCATOR))
+#define GST_WL_SHM_ALLOCATOR_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_SHM_ALLOCATOR, GstWlShmAllocatorClass))
+
+#define GST_ALLOCATOR_WL_SHM "wl_shm"
+
+typedef struct _GstWlShmMemory GstWlShmMemory;
+typedef struct _GstWlShmAllocator GstWlShmAllocator;
+typedef struct _GstWlShmAllocatorClass GstWlShmAllocatorClass;
+
+struct _GstWlShmMemory
+{
+  GstMemory parent;
+
+  gpointer data;
+  gint fd;
+};
+
+struct _GstWlShmAllocator
+{
+  GstAllocator parent_instance;
+};
+
+struct _GstWlShmAllocatorClass
+{
+  GstAllocatorClass parent_class;
+};
+
+GType gst_wl_shm_allocator_get_type (void);
+
+void gst_wl_shm_allocator_register (void);
+GstAllocator * gst_wl_shm_allocator_get (void);
+
+gboolean gst_is_wl_shm_memory (GstMemory * mem);
+struct wl_buffer * gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem,
+    GstWlDisplay * display, const GstVideoInfo * info);
+
+G_END_DECLS
+
+#endif /* __GST_WL_SHM_ALLOCATOR_H__ */
diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c
index f2166f9..1302da6 100644
--- a/ext/wayland/wlvideoformat.c
+++ b/ext/wayland/wlvideoformat.c
@@ -78,7 +78,7 @@
 };
 
 enum wl_shm_format
-gst_video_format_to_wayland_format (GstVideoFormat format)
+gst_video_format_to_wl_shm_format (GstVideoFormat format)
 {
   guint i;
 
@@ -86,12 +86,12 @@
     if (formats[i].gst_format == format)
       return formats[i].wl_format;
 
-  GST_WARNING ("wayland video format not found");
+  GST_WARNING ("wayland shm video format not found");
   return -1;
 }
 
 GstVideoFormat
-gst_wayland_format_to_video_format (enum wl_shm_format wl_format)
+gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format)
 {
   guint i;
 
@@ -104,8 +104,8 @@
 }
 
 const gchar *
-gst_wayland_format_to_string (enum wl_shm_format wl_format)
+gst_wl_shm_format_to_string (enum wl_shm_format wl_format)
 {
   return gst_video_format_to_string
-      (gst_wayland_format_to_video_format (wl_format));
+      (gst_wl_shm_format_to_video_format (wl_format));
 }
diff --git a/ext/wayland/wlvideoformat.h b/ext/wayland/wlvideoformat.h
index 72efc81..e8ec7ae 100644
--- a/ext/wayland/wlvideoformat.h
+++ b/ext/wayland/wlvideoformat.h
@@ -24,15 +24,15 @@
 #ifndef __GST_WL_VIDEO_FORMAT_H__
 #define __GST_WL_VIDEO_FORMAT_H__
 
-#include <wayland-client.h>
+#include <wayland-client-protocol.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);
+enum wl_shm_format gst_video_format_to_wl_shm_format (GstVideoFormat format);
+GstVideoFormat gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format);
 
-const gchar *gst_wayland_format_to_string (enum wl_shm_format wl_format);
+const gchar *gst_wl_shm_format_to_string (enum wl_shm_format wl_format);
 
 G_END_DECLS
 
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
index ea6c681..a964335 100644
--- a/ext/wayland/wlwindow.c
+++ b/ext/wayland/wlwindow.c
@@ -25,6 +25,8 @@
 #endif
 
 #include "wlwindow.h"
+#include "wlshmallocator.h"
+#include "wlbuffer.h"
 
 GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
 #define GST_CAT_DEFAULT gstwayland_debug
@@ -78,12 +80,15 @@
     wl_shell_surface_destroy (self->shell_surface);
   }
 
-  if (self->subsurface) {
-    wl_subsurface_destroy (self->subsurface);
-  }
+  wl_viewport_destroy (self->video_viewport);
+  wl_subsurface_destroy (self->video_subsurface);
+  wl_surface_destroy (self->video_surface);
 
-  wl_viewport_destroy (self->viewport);
-  wl_surface_destroy (self->surface);
+  if (self->area_subsurface) {
+    wl_subsurface_destroy (self->area_subsurface);
+  }
+  wl_viewport_destroy (self->area_viewport);
+  wl_surface_destroy (self->area_surface);
 
   g_clear_object (&self->display);
 
@@ -91,44 +96,84 @@
 }
 
 static GstWlWindow *
-gst_wl_window_new_internal (GstWlDisplay * display, struct wl_surface *surface)
+gst_wl_window_new_internal (GstWlDisplay * display)
 {
   GstWlWindow *window;
+  GstVideoInfo info;
+  GstBuffer *buf;
+  GstMapInfo mapinfo;
+  struct wl_buffer *wlbuf;
+  GstWlBuffer *gwlbuf;
   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->area_surface = wl_compositor_create_surface (display->compositor);
+  window->video_surface = wl_compositor_create_surface (display->compositor);
 
-  window->viewport = wl_scaler_get_viewport (display->scaler, window->surface);
+  wl_proxy_set_queue ((struct wl_proxy *) window->area_surface, display->queue);
+  wl_proxy_set_queue ((struct wl_proxy *) window->video_surface,
+      display->queue);
+
+  /* embed video_surface in area_surface */
+  window->video_subsurface =
+      wl_subcompositor_get_subsurface (display->subcompositor,
+      window->video_surface, window->area_surface);
+  wl_subsurface_set_desync (window->video_subsurface);
+
+  window->area_viewport = wl_scaler_get_viewport (display->scaler,
+      window->area_surface);
+  window->video_viewport = wl_scaler_get_viewport (display->scaler,
+      window->video_surface);
+
+  /* draw the area_subsurface */
+  gst_video_info_set_format (&info,
+      /* we want WL_SHM_FORMAT_XRGB8888 */
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+      GST_VIDEO_FORMAT_xRGB,
+#else
+      GST_VIDEO_FORMAT_BGRx,
+#endif
+      1, 1);
+
+  buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info.size, NULL);
+  gst_buffer_map (buf, &mapinfo, GST_MAP_WRITE);
+  *((guint32 *) mapinfo.data) = 0;      /* paint it black */
+  gst_buffer_unmap (buf, &mapinfo);
+  wlbuf =
+      gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
+      display, &info);
+  gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, display);
+  gst_wl_buffer_attach (gwlbuf, window->area_surface);
+
+  /* at this point, the GstWlBuffer keeps the buffer
+   * alive and will free it on wl_buffer::release */
+  gst_buffer_unref (buf);
 
   /* do not accept input */
   region = wl_compositor_create_region (display->compositor);
-  wl_surface_set_input_region (surface, region);
+  wl_surface_set_input_region (window->area_surface, region);
+  wl_region_destroy (region);
+
+  region = wl_compositor_create_region (display->compositor);
+  wl_surface_set_input_region (window->video_surface, region);
   wl_region_destroy (region);
 
   return window;
 }
 
 GstWlWindow *
-gst_wl_window_new_toplevel (GstWlDisplay * display, GstVideoInfo * video_info)
+gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info)
 {
   GstWlWindow *window;
+  gint width;
 
-  window = gst_wl_window_new_internal (display,
-      wl_compositor_create_surface (display->compositor));
+  window = gst_wl_window_new_internal (display);
 
-  gst_wl_window_set_video_info (window, video_info);
-  gst_wl_window_set_render_rectangle (window, 0, 0, window->video_width,
-      window->video_height);
-
+  /* go toplevel */
   window->shell_surface = wl_shell_get_shell_surface (display->shell,
-      window->surface);
+      window->area_surface);
 
   if (window->shell_surface) {
     wl_shell_surface_add_listener (window->shell_surface,
@@ -141,6 +186,11 @@
     return NULL;
   }
 
+  /* set the initial size to be the same as the reported video size */
+  width =
+      gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
+  gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height);
+
   return window;
 }
 
@@ -149,13 +199,13 @@
     struct wl_surface * parent)
 {
   GstWlWindow *window;
+  window = gst_wl_window_new_internal (display);
 
-  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);
+  /* embed in parent */
+  window->area_subsurface =
+      wl_subcompositor_get_subsurface (display->subcompositor,
+      window->area_surface, parent);
+  wl_subsurface_set_desync (window->area_subsurface);
 
   return window;
 }
@@ -173,7 +223,7 @@
 {
   g_return_val_if_fail (window != NULL, NULL);
 
-  return window->surface;
+  return window->video_surface;
 }
 
 gboolean
@@ -185,23 +235,32 @@
 }
 
 static void
-gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit)
+gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit)
 {
   GstVideoRectangle src = { 0, };
   GstVideoRectangle res;
 
+  /* center the video_subsurface inside area_subsurface */
   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);
+  wl_subsurface_set_position (window->video_subsurface, res.x, res.y);
+  wl_viewport_set_destination (window->video_viewport, res.w, res.h);
 
   if (commit) {
-    wl_surface_damage (window->surface, 0, 0, res.w, res.h);
-    wl_surface_commit (window->surface);
+    wl_surface_damage (window->video_surface, 0, 0, res.w, res.h);
+    wl_surface_commit (window->video_surface);
+  }
+
+  if (gst_wl_window_is_toplevel (window)) {
+    struct wl_region *region;
+
+    region = wl_compositor_create_region (window->display->compositor);
+    wl_region_add (region, 0, 0, window->render_rectangle.w,
+        window->render_rectangle.h);
+    wl_surface_set_input_region (window->area_surface, region);
+    wl_region_destroy (region);
   }
 
   /* this is saved for use in wl_surface_damage */
@@ -210,16 +269,37 @@
 }
 
 void
-gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info)
+gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer,
+    const GstVideoInfo * info)
 {
-  g_return_if_fail (window != NULL);
+  if (G_UNLIKELY (info)) {
+    window->video_width =
+        gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
+    window->video_height = info->height;
 
-  window->video_width =
-      gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
-  window->video_height = info->height;
+    wl_subsurface_set_sync (window->video_subsurface);
+    gst_wl_window_resize_video_surface (window, FALSE);
+  }
 
-  if (window->render_rectangle.w != 0)
-    gst_wl_window_resize_internal (window, FALSE);
+  if (G_LIKELY (buffer))
+    gst_wl_buffer_attach (buffer, window->video_surface);
+  else
+    wl_surface_attach (window->video_surface, NULL, 0, 0);
+
+  wl_surface_damage (window->video_surface, 0, 0, window->surface_width,
+      window->surface_height);
+  wl_surface_commit (window->video_surface);
+
+  if (G_UNLIKELY (info)) {
+    /* commit also the parent (area_surface) in order to change
+     * the position of the video_subsurface */
+    wl_surface_damage (window->area_surface, 0, 0, window->render_rectangle.w,
+        window->render_rectangle.h);
+    wl_surface_commit (window->area_surface);
+    wl_subsurface_set_desync (window->video_subsurface);
+  }
+
+  wl_display_flush (window->display->display);
 }
 
 void
@@ -233,6 +313,21 @@
   window->render_rectangle.w = w;
   window->render_rectangle.h = h;
 
+  /* position the area inside the parent - needs a parent commit to apply */
+  if (window->area_subsurface)
+    wl_subsurface_set_position (window->area_subsurface, x, y);
+
+  /* change the size of the area */
+  wl_viewport_set_destination (window->area_viewport, w, h);
+
+  if (window->video_width != 0) {
+    wl_subsurface_set_sync (window->video_subsurface);
+    gst_wl_window_resize_video_surface (window, TRUE);
+  }
+
+  wl_surface_damage (window->area_surface, 0, 0, w, h);
+  wl_surface_commit (window->area_surface);
+
   if (window->video_width != 0)
-    gst_wl_window_resize_internal (window, TRUE);
+    wl_subsurface_set_desync (window->video_subsurface);
 }
diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h
index f4cb360..e22cb26 100644
--- a/ext/wayland/wlwindow.h
+++ b/ext/wayland/wlwindow.h
@@ -22,6 +22,7 @@
 #define __GST_WL_WINDOW_H__
 
 #include "wldisplay.h"
+#include "wlbuffer.h"
 #include <gst/video/video.h>
 
 G_BEGIN_DECLS
@@ -41,16 +42,19 @@
   GObject parent_instance;
 
   GstWlDisplay *display;
-  struct wl_surface *surface;
-  struct wl_subsurface *subsurface;
-  struct wl_viewport *viewport;
+  struct wl_surface *area_surface;
+  struct wl_subsurface *area_subsurface;
+  struct wl_viewport *area_viewport;
+  struct wl_surface *video_surface;
+  struct wl_subsurface *video_subsurface;
+  struct wl_viewport *video_viewport;
   struct wl_shell_surface *shell_surface;
 
-  /* the size of the destination area where we are overlaying our subsurface */
+  /* the size and position of the area_(sub)surface */
   GstVideoRectangle render_rectangle;
   /* the size of the video in the buffers */
   gint video_width, video_height;
-  /* the size of the (sub)surface */
+  /* the size of the video_(sub)surface */
   gint surface_width, surface_height;
 };
 
@@ -62,7 +66,7 @@
 GType gst_wl_window_get_type (void);
 
 GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
-        GstVideoInfo * video_info);
+        const GstVideoInfo * info);
 GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
         struct wl_surface * parent);
 
@@ -70,8 +74,8 @@
 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_render (GstWlWindow * window, GstWlBuffer * buffer,
+        const GstVideoInfo * info);
 void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
         gint w, gint h);
 
diff --git a/ext/webp/Makefile.am b/ext/webp/Makefile.am
index 25c3557..ece138b 100644
--- a/ext/webp/Makefile.am
+++ b/ext/webp/Makefile.am
@@ -1,9 +1,10 @@
 plugin_LTLIBRARIES = libgstwebp.la
 
-noinst_HEADERS = gstwebpdec.h
+noinst_HEADERS = gstwebpdec.h gstwebpenc.h
 
 libgstwebp_la_SOURCES = gstwebp.c \
-			gstwebpdec.c
+			gstwebpdec.c \
+			gstwebpenc.c
 
 libgstwebp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(WEBP_CFLAGS)
 libgstwebp_la_LIBADD = \
diff --git a/ext/webp/Makefile.in b/ext/webp/Makefile.in
index ff443b0..cbfbe0f 100644
--- a/ext/webp/Makefile.in
+++ b/ext/webp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/webp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -158,7 +168,7 @@
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
 am_libgstwebp_la_OBJECTS = libgstwebp_la-gstwebp.lo \
-	libgstwebp_la-gstwebpdec.lo
+	libgstwebp_la-gstwebpdec.lo libgstwebp_la-gstwebpenc.lo
 libgstwebp_la_OBJECTS = $(am_libgstwebp_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -727,9 +762,10 @@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwebp.la
-noinst_HEADERS = gstwebpdec.h
+noinst_HEADERS = gstwebpdec.h gstwebpenc.h
 libgstwebp_la_SOURCES = gstwebp.c \
-			gstwebpdec.c
+			gstwebpdec.c \
+			gstwebpenc.c
 
 libgstwebp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(WEBP_CFLAGS)
 libgstwebp_la_LIBADD = \
@@ -757,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/webp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/webp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -822,6 +857,7 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwebp_la-gstwebp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwebp_la-gstwebpdec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwebp_la-gstwebpenc.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -861,6 +897,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 $(libgstwebp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwebp_la_CFLAGS) $(CFLAGS) -c -o libgstwebp_la-gstwebpdec.lo `test -f 'gstwebpdec.c' || echo '$(srcdir)/'`gstwebpdec.c
 
+libgstwebp_la-gstwebpenc.lo: gstwebpenc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwebp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwebp_la_CFLAGS) $(CFLAGS) -MT libgstwebp_la-gstwebpenc.lo -MD -MP -MF $(DEPDIR)/libgstwebp_la-gstwebpenc.Tpo -c -o libgstwebp_la-gstwebpenc.lo `test -f 'gstwebpenc.c' || echo '$(srcdir)/'`gstwebpenc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwebp_la-gstwebpenc.Tpo $(DEPDIR)/libgstwebp_la-gstwebpenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstwebpenc.c' object='libgstwebp_la-gstwebpenc.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 $(libgstwebp_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwebp_la_CFLAGS) $(CFLAGS) -c -o libgstwebp_la-gstwebpenc.lo `test -f 'gstwebpenc.c' || echo '$(srcdir)/'`gstwebpenc.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1074,6 +1117,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/webp/gstwebp.c b/ext/webp/gstwebp.c
index d0c1831..bd13e65 100644
--- a/ext/webp/gstwebp.c
+++ b/ext/webp/gstwebp.c
@@ -26,11 +26,13 @@
 #include <gst/gst.h>
 
 #include "gstwebpdec.h"
+#include "gstwebpenc.h"
 
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
   gst_webp_dec_register (plugin);
+  gst_webp_enc_register (plugin);
 
   return TRUE;
 }
diff --git a/ext/webp/gstwebpdec.c b/ext/webp/gstwebpdec.c
index 8ffb4ef..6877cd4 100644
--- a/ext/webp/gstwebpdec.c
+++ b/ext/webp/gstwebpdec.c
@@ -139,6 +139,9 @@
   dec->bypass_filtering = FALSE;
   dec->no_fancy_upsampling = FALSE;
   dec->use_threads = FALSE;
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
 }
 
 static gboolean
@@ -236,13 +239,12 @@
 gst_webp_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
 {
   GstWebPDec *webpdec = (GstWebPDec *) decoder;
-  GstVideoInfo *info = &state->info;
 
   if (webpdec->input_state)
     gst_video_codec_state_unref (webpdec->input_state);
   webpdec->input_state = gst_video_codec_state_ref (state);
 
-  if (GST_VIDEO_INFO_FPS_N (info) != 1 && GST_VIDEO_INFO_FPS_D (info) != 1)
+  if (decoder->input_segment.format == GST_FORMAT_TIME)
     gst_video_decoder_set_packetized (decoder, TRUE);
   else
     gst_video_decoder_set_packetized (decoder, FALSE);
diff --git a/ext/webp/gstwebpdec.h b/ext/webp/gstwebpdec.h
index bf2586e..6b89470 100644
--- a/ext/webp/gstwebpdec.h
+++ b/ext/webp/gstwebpdec.h
@@ -71,4 +71,6 @@
 GType gst_webp_dec_get_type (void);
 gboolean gst_webp_dec_register (GstPlugin * plugin);
 
+G_END_DECLS
+
 #endif /* __GST_WEBP_DEC_H__ */
diff --git a/ext/webp/gstwebpenc.c b/ext/webp/gstwebpenc.c
new file mode 100644
index 0000000..75891ea
--- /dev/null
+++ b/ext/webp/gstwebpenc.c
@@ -0,0 +1,404 @@
+/* GStreamer
+ * Copyright (C) <2014> Sreerenj Balachandran <sreerenjb@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.
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <stdlib.h>             /* free */
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
+
+#include "gstwebpenc.h"
+
+#define GST_CAT_DEFAULT webpenc_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_0,
+  PROP_LOSSLESS,
+  PROP_QUALITY,
+  PROP_SPEED,
+  PROP_PRESET
+};
+
+#define DEFAULT_LOSSLESS FALSE
+#define DEFAULT_QUALITY 90
+#define DEFAULT_SPEED 4
+#define DEFAULT_PRESET WEBP_PRESET_PHOTO
+
+static void gst_webp_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_webp_enc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static gboolean gst_webp_enc_start (GstVideoEncoder * benc);
+static gboolean gst_webp_enc_stop (GstVideoEncoder * benc);
+static gboolean gst_webp_enc_set_format (GstVideoEncoder * encoder,
+    GstVideoCodecState * state);
+static GstFlowReturn gst_webp_enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame);
+static gboolean gst_webp_enc_propose_allocation (GstVideoEncoder * encoder,
+    GstQuery * query);
+
+static GstStaticPadTemplate webp_enc_sink_factory =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ I420, YV12, RGB, RGBA}"))
+    );
+static GstStaticPadTemplate webp_enc_src_factory =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("image/webp, "
+        "framerate = (fraction) [0/1, MAX], "
+        "width = (int) [ 16, 16383 ], " "height = (int) [ 16, 16383 ]")
+    );
+
+enum
+{
+  GST_WEBP_PRESET_DEFAULT,
+  GST_WEBP_PRESET_PICTURE,
+  GST_WEBP_PRESET_PHOTO,
+  GST_WEBP_PRESET_DRAWING,
+  GST_WEBP_PRESET_ICON,
+  GST_WEBP_PREET_TEXT
+};
+
+static const GEnumValue preset_values[] = {
+  {GST_WEBP_PRESET_DEFAULT, "Default", "none"},
+  {GST_WEBP_PRESET_PICTURE, "Digital picture,inner shot", "picture"},
+  {GST_WEBP_PRESET_PHOTO, "Outdoor photo, natural lighting", "photo"},
+  {GST_WEBP_PRESET_DRAWING, "Hand or Line drawing", "drawing"},
+  {GST_WEBP_PRESET_ICON, "Small-sized colorful images", "icon"},
+  {GST_WEBP_PREET_TEXT, "text-like", "text"},
+  {0, NULL, NULL},
+};
+
+#define GST_WEBP_ENC_PRESET_TYPE (gst_webp_enc_preset_get_type())
+static GType
+gst_webp_enc_preset_get_type (void)
+{
+  static GType preset_type = 0;
+
+  if (!preset_type) {
+    preset_type = g_enum_register_static ("GstWebpEncPreset", preset_values);
+  }
+  return preset_type;
+}
+
+#define gst_webp_enc_parent_class parent_class
+G_DEFINE_TYPE (GstWebpEnc, gst_webp_enc, GST_TYPE_VIDEO_ENCODER);
+
+static void
+gst_webp_enc_class_init (GstWebpEncClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+  GstVideoEncoderClass *venc_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = (GstElementClass *) klass;
+  venc_class = (GstVideoEncoderClass *) klass;
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->set_property = gst_webp_enc_set_property;
+  gobject_class->get_property = gst_webp_enc_get_property;
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&webp_enc_sink_factory));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&webp_enc_src_factory));
+  gst_element_class_set_static_metadata (element_class, "WEBP image encoder",
+      "Codec/Encoder/Image",
+      "Encode images in WEBP format",
+      "Sreerenj Balachandran <sreerenjb@gnome.org>");
+
+  venc_class->start = gst_webp_enc_start;
+  venc_class->stop = gst_webp_enc_stop;
+  venc_class->set_format = gst_webp_enc_set_format;
+  venc_class->handle_frame = gst_webp_enc_handle_frame;
+  venc_class->propose_allocation = gst_webp_enc_propose_allocation;
+
+  g_object_class_install_property (gobject_class, PROP_LOSSLESS,
+      g_param_spec_boolean ("lossless", "Lossless",
+          "Enable lossless encoding",
+          DEFAULT_LOSSLESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_QUALITY,
+      g_param_spec_float ("quality", "quality-level",
+          "quality level, between 0 (smallest file) and 100 (biggest)",
+          0, 100, DEFAULT_QUALITY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_SPEED,
+      g_param_spec_uint ("speed", "Compression Method",
+          "quality/speed trade-off (0=fast, 6=slower-better)",
+          0, 6, DEFAULT_SPEED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PRESET,
+      g_param_spec_enum ("preset", "preset tuning",
+          "Preset name for visual tuning",
+          GST_WEBP_ENC_PRESET_TYPE, DEFAULT_PRESET,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  GST_DEBUG_CATEGORY_INIT (webpenc_debug, "webpenc", 0,
+      "WEBP encoding element");
+}
+
+static void
+gst_webp_enc_init (GstWebpEnc * webpenc)
+{
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (webpenc));
+
+  webpenc->lossless = DEFAULT_LOSSLESS;
+  webpenc->quality = DEFAULT_QUALITY;
+  webpenc->speed = DEFAULT_SPEED;
+  webpenc->preset = DEFAULT_PRESET;
+
+  webpenc->use_argb = FALSE;
+  webpenc->rgb_format = GST_VIDEO_FORMAT_UNKNOWN;
+}
+
+static gboolean
+gst_webp_enc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state)
+{
+  GstWebpEnc *enc = GST_WEBP_ENC (encoder);
+  GstVideoCodecState *output_state;
+  GstVideoInfo *info;
+  GstVideoFormat format;
+
+  info = &state->info;
+  format = GST_VIDEO_INFO_FORMAT (info);
+
+  if (GST_VIDEO_INFO_IS_YUV (info)) {
+    switch (format) {
+      case GST_VIDEO_FORMAT_I420:
+      case GST_VIDEO_FORMAT_YV12:
+        enc->webp_color_space = WEBP_YUV420;
+        break;
+      default:
+        break;
+    }
+  } else {
+    if (GST_VIDEO_INFO_IS_RGB (info)) {
+      enc->rgb_format = format;
+      enc->use_argb = 1;
+    }
+  }
+
+  if (enc->input_state)
+    gst_video_codec_state_unref (enc->input_state);
+  enc->input_state = gst_video_codec_state_ref (state);
+
+  output_state =
+      gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (enc),
+      gst_caps_new_empty_simple ("image/webp"), enc->input_state);
+  gst_video_codec_state_unref (output_state);
+
+  return TRUE;
+}
+
+static gboolean
+gst_webp_set_picture_params (GstWebpEnc * enc)
+{
+  GstVideoInfo *info;
+  gboolean ret = TRUE;
+
+  info = &enc->input_state->info;
+
+  if (!WebPPictureInit (&enc->webp_picture)) {
+    ret = FALSE;
+    goto failed_pic_init;
+  }
+
+  enc->webp_picture.use_argb = enc->use_argb;
+  if (!enc->use_argb)
+    enc->webp_picture.colorspace = enc->webp_color_space;
+
+  enc->webp_picture.width = GST_VIDEO_INFO_WIDTH (info);
+  enc->webp_picture.height = GST_VIDEO_INFO_HEIGHT (info);
+
+  WebPMemoryWriterInit (&enc->webp_writer);
+  enc->webp_picture.writer = WebPMemoryWrite;
+  enc->webp_picture.custom_ptr = &enc->webp_writer;
+
+  return ret;
+
+failed_pic_init:
+  {
+    GST_ERROR_OBJECT (enc, "Failed to Initialize WebPPicture !");
+    return ret;
+  }
+}
+
+static GstFlowReturn
+gst_webp_enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame)
+{
+  GstWebpEnc *enc = GST_WEBP_ENC (encoder);
+  GstBuffer *out_buffer = NULL;
+  GstVideoFrame vframe;
+
+  GST_LOG_OBJECT (enc, "got new frame");
+
+  gst_webp_set_picture_params (enc);
+
+  if (!gst_video_frame_map (&vframe, &enc->input_state->info,
+          frame->input_buffer, GST_MAP_READ))
+    return GST_FLOW_ERROR;
+
+  if (!enc->use_argb) {
+    enc->webp_picture.y = GST_VIDEO_FRAME_COMP_DATA (&vframe, 0);
+    enc->webp_picture.u = GST_VIDEO_FRAME_COMP_DATA (&vframe, 1);
+    enc->webp_picture.v = GST_VIDEO_FRAME_COMP_DATA (&vframe, 2);
+
+    enc->webp_picture.y_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 0);
+    enc->webp_picture.uv_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 1);
+
+  } else {
+    switch (enc->rgb_format) {
+      case GST_VIDEO_FORMAT_RGB:
+        WebPPictureImportRGB (&enc->webp_picture,
+            GST_VIDEO_FRAME_COMP_DATA (&vframe, 0),
+            GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 0));
+        break;
+      case GST_VIDEO_FORMAT_RGBA:
+        WebPPictureImportRGBA (&enc->webp_picture,
+            GST_VIDEO_FRAME_COMP_DATA (&vframe, 0),
+            GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 0));
+        break;
+      default:
+        break;
+    }
+  }
+
+  if (WebPEncode (&enc->webp_config, &enc->webp_picture)) {
+    WebPPictureFree (&enc->webp_picture);
+
+    out_buffer = gst_buffer_new_allocate (NULL, enc->webp_writer.size, NULL);
+    if (!out_buffer) {
+      GST_ERROR_OBJECT (enc, "Failed to create output buffer");
+      return GST_FLOW_ERROR;
+    }
+    gst_buffer_fill (out_buffer, 0, enc->webp_writer.mem,
+        enc->webp_writer.size);
+    free (enc->webp_writer.mem);
+  } else {
+    GST_ERROR_OBJECT (enc, "Failed to encode WebPPicture");
+    return GST_FLOW_ERROR;
+  }
+
+  gst_video_frame_unmap (&vframe);
+  frame->output_buffer = out_buffer;
+  return gst_video_encoder_finish_frame (encoder, frame);
+}
+
+static gboolean
+gst_webp_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query)
+{
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+  return
+      GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder,
+      query);
+}
+
+static void
+gst_webp_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstWebpEnc *webpenc = GST_WEBP_ENC (object);
+
+  switch (prop_id) {
+    case PROP_LOSSLESS:
+      webpenc->lossless = g_value_get_boolean (value);
+      break;
+    case PROP_QUALITY:
+      webpenc->quality = g_value_get_float (value);
+      break;
+    case PROP_SPEED:
+      webpenc->speed = g_value_get_uint (value);
+      break;
+    case PROP_PRESET:
+      webpenc->preset = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+}
+
+static void
+gst_webp_enc_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstWebpEnc *webpenc = GST_WEBP_ENC (object);
+
+  switch (prop_id) {
+    case PROP_LOSSLESS:
+      g_value_set_boolean (value, webpenc->lossless);
+      break;
+    case PROP_QUALITY:
+      g_value_set_float (value, webpenc->quality);
+      break;
+    case PROP_SPEED:
+      g_value_set_uint (value, webpenc->speed);
+      break;
+    case PROP_PRESET:
+      g_value_set_enum (value, webpenc->preset);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_webp_enc_start (GstVideoEncoder * benc)
+{
+  GstWebpEnc *enc = (GstWebpEnc *) benc;
+
+  if (!WebPConfigPreset (&enc->webp_config, enc->preset, enc->quality)) {
+    GST_ERROR_OBJECT (enc, "Failed to Initialize WebPConfig ");
+    return FALSE;
+  }
+
+  enc->webp_config.lossless = enc->lossless;
+  enc->webp_config.method = enc->speed;
+  if (!WebPValidateConfig (&enc->webp_config)) {
+    GST_ERROR_OBJECT (enc, "Failed to Validate the WebPConfig");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+static gboolean
+gst_webp_enc_stop (GstVideoEncoder * benc)
+{
+  GstWebpEnc *enc = GST_WEBP_ENC (benc);
+  if (enc->input_state)
+    gst_video_codec_state_unref (enc->input_state);
+  return TRUE;
+}
+
+gboolean
+gst_webp_enc_register (GstPlugin * plugin)
+{
+  return gst_element_register (plugin, "webpenc",
+      GST_RANK_PRIMARY, GST_TYPE_WEBP_ENC);
+}
diff --git a/ext/webp/gstwebpenc.h b/ext/webp/gstwebpenc.h
new file mode 100644
index 0000000..be1d11c
--- /dev/null
+++ b/ext/webp/gstwebpenc.h
@@ -0,0 +1,76 @@
+/* GStreamer
+ * Copyright (C) <2014> Sreerenj Balachandran <sreerenjb@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.
+ */
+#ifndef __GST_WEBPENC_H__
+#define __GST_WEBPENC_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <webp/encode.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WEBP_ENC \
+  (gst_webp_enc_get_type())
+#define GST_WEBP_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WEBP_ENC,GstWebpEnc))
+#define GST_WEBP_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WEBP_ENC,GstWebpEncClass))
+#define GST_IS_WEBP_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WEBP_ENC))
+#define GST_IS_WEBP_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WEBP_ENC))
+
+typedef struct _GstWebpEnc GstWebpEnc;
+typedef struct _GstWebpEncClass GstWebpEncClass;
+
+/**
+ * GstWebpEnc:
+ *
+ * Opaque data structure.
+ */
+struct _GstWebpEnc
+{
+  GstVideoEncoder element;
+
+  GstVideoCodecState *input_state;
+
+  gboolean lossless;
+  gfloat quality;
+  guint speed;
+  gint preset;
+
+  gboolean use_argb;
+  GstVideoFormat rgb_format;
+
+  WebPEncCSP webp_color_space;
+  struct WebPConfig webp_config;
+  struct WebPPicture webp_picture;
+  WebPMemoryWriter webp_writer;
+};
+
+struct _GstWebpEncClass
+{
+  GstVideoEncoderClass parent_class;
+};
+
+GType gst_webp_enc_get_type (void);
+gboolean gst_webp_enc_register (GstPlugin * plugin);
+
+G_END_DECLS
+#endif /* __GST_WEBPENC_H__ */
diff --git a/ext/x265/Makefile.am b/ext/x265/Makefile.am
new file mode 100644
index 0000000..0f1e7f5
--- /dev/null
+++ b/ext/x265/Makefile.am
@@ -0,0 +1,17 @@
+plugin_LTLIBRARIES = libgstx265.la
+
+libgstx265_la_SOURCES = gstx265enc.c
+libgstx265_la_CFLAGS = \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(X265_CFLAGS)
+libgstx265_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION) \
+	-lgstpbutils-$(GST_API_VERSION) \
+	$(GST_LIBS) \
+	$(X265_LIBS)
+libgstx265_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstx265_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = gstx265enc.h
diff --git a/ext/mythtv/Makefile.in b/ext/x265/Makefile.in
similarity index 88%
rename from ext/mythtv/Makefile.in
rename to ext/x265/Makefile.in
index 055754c..cc4f3c4 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/x265/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = ext/x265
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,18 +164,18 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+libgstx265_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstx265_la_OBJECTS = libgstx265_la-gstx265enc.lo
+libgstx265_la_OBJECTS = $(am_libgstx265_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstx265_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstx265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstx265_la_CFLAGS) $(CFLAGS) \
+	$(libgstx265_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
@@ -200,8 +210,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(libgstx265_la_SOURCES)
+DIST_SOURCES = $(libgstx265_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,25 +759,23 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
-
-libgstmythtvsrc_la_CFLAGS = \
+plugin_LTLIBRARIES = libgstx265.la
+libgstx265_la_SOURCES = gstx265enc.c
+libgstx265_la_CFLAGS = \
+	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+	$(X265_CFLAGS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
+libgstx265_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION) \
+	-lgstpbutils-$(GST_API_VERSION) \
+	$(GST_LIBS) \
+	$(X265_LIBS)
 
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
-
+libgstx265_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstx265_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+noinst_HEADERS = gstx265enc.h
 all: all-am
 
 .SUFFIXES:
@@ -756,10 +789,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/x265/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu ext/x265/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -813,8 +845,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libgstx265.la: $(libgstx265_la_OBJECTS) $(libgstx265_la_DEPENDENCIES) $(EXTRA_libgstx265_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstx265_la_LINK) -rpath $(plugindir) $(libgstx265_la_OBJECTS) $(libgstx265_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +854,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstx265_la-gstx265enc.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +880,12 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+libgstx265_la-gstx265enc.lo: gstx265enc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstx265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstx265_la_CFLAGS) $(CFLAGS) -MT libgstx265_la-gstx265enc.lo -MD -MP -MF $(DEPDIR)/libgstx265_la-gstx265enc.Tpo -c -o libgstx265_la-gstx265enc.lo `test -f 'gstx265enc.c' || echo '$(srcdir)/'`gstx265enc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstx265_la-gstx265enc.Tpo $(DEPDIR)/libgstx265_la-gstx265enc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstx265enc.c' object='libgstx265_la-gstx265enc.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstx265_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstx265_la_CFLAGS) $(CFLAGS) -c -o libgstx265_la-gstx265enc.lo `test -f 'gstx265enc.c' || echo '$(srcdir)/'`gstx265enc.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1068,6 +1100,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/x265/gstx265enc.c b/ext/x265/gstx265enc.c
new file mode 100644
index 0000000..08a4a3e
--- /dev/null
+++ b/ext/x265/gstx265enc.c
@@ -0,0 +1,1269 @@
+/* GStreamer H265 encoder plugin
+ * Copyright (C) 2005 Michal Benes <michal.benes@itonis.tv>
+ * Copyright (C) 2005 Josef Zlomek <josef.zlomek@itonis.tv>
+ * Copyright (C) 2008 Mark Nauwelaerts <mnauw@users.sf.net>
+ * Copyright (C) 2014 Thijs Vermeir <thijs.vermeir@barco.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-x265enc
+ *
+ * This element encodes raw video into H265 compressed data.
+ *
+ **/
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include "gstx265enc.h"
+
+#include <gst/pbutils/pbutils.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
+#include <gst/video/gstvideopool.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+GST_DEBUG_CATEGORY_STATIC (x265_enc_debug);
+#define GST_CAT_DEFAULT x265_enc_debug
+
+enum
+{
+  PROP_0,
+  PROP_BITRATE,
+  PROP_QP,
+  PROP_OPTION_STRING,
+  PROP_X265_LOG_LEVEL,
+  PROP_SPEED_PRESET,
+  PROP_TUNE
+};
+
+static GString *x265enc_defaults;
+
+#define PROP_BITRATE_DEFAULT            (2 * 1024)
+#define PROP_QP_DEFAULT                 -1
+#define PROP_OPTION_STRING_DEFAULT      ""
+#define PROP_LOG_LEVEL_DEFAULT           -1     // None
+#define PROP_SPEED_PRESET_DEFAULT        6      // Medium
+#define PROP_TUNE_DEFAULT                2      // SSIM
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define FORMATS "I420, Y444, I420_10LE, Y444_10LE"
+#else
+#define FORMATS "I420, Y444, I420_10BE, Y444_10BE"
+#endif
+
+#define GST_X265_ENC_LOG_LEVEL_TYPE (gst_x265_enc_log_level_get_type())
+static GType
+gst_x265_enc_log_level_get_type (void)
+{
+  static GType log_level = 0;
+
+  static const GEnumValue log_levels[] = {
+    {X265_LOG_NONE, "No logging", "none"},
+    {X265_LOG_ERROR, "Error", "error"},
+    {X265_LOG_WARNING, "Warning", "warning"},
+    {X265_LOG_INFO, "Info", "info"},
+    {X265_LOG_DEBUG, "Debug", "debug"},
+    {X265_LOG_FULL, "Full", "full"},
+    {0, NULL, NULL}
+  };
+
+  if (!log_level) {
+    log_level = g_enum_register_static ("GstX265LogLevel", log_levels);
+  }
+  return log_level;
+}
+
+#define GST_X265_ENC_SPEED_PRESET_TYPE (gst_x265_enc_speed_preset_get_type())
+static GType
+gst_x265_enc_speed_preset_get_type (void)
+{
+  static GType speed_preset = 0;
+  static GEnumValue *speed_presets;
+  int n, i;
+
+  if (speed_preset != 0)
+    return speed_preset;
+
+  n = 0;
+  while (x265_preset_names[n] != NULL)
+    n++;
+
+  speed_presets = g_new0 (GEnumValue, n + 2);
+
+  speed_presets[0].value = 0;
+  speed_presets[0].value_name = "No preset";
+  speed_presets[0].value_nick = "No preset";
+
+  for (i = 0; i < n; i++) {
+    speed_presets[i + 1].value = i + 1;
+    speed_presets[i + 1].value_name = x265_preset_names[i];
+    speed_presets[i + 1].value_nick = x265_preset_names[i];
+  }
+
+  speed_preset = g_enum_register_static ("GstX265SpeedPreset", speed_presets);
+
+  return speed_preset;
+}
+
+#define GST_X265_ENC_TUNE_TYPE (gst_x265_enc_tune_get_type())
+static GType
+gst_x265_enc_tune_get_type (void)
+{
+  static GType tune = 0;
+  static GEnumValue *tune_values;
+  int n, i;
+
+  if (tune != 0)
+    return tune;
+
+  n = 0;
+  while (x265_tune_names[n] != NULL)
+    n++;
+
+  tune_values = g_new0 (GEnumValue, n + 2);
+
+  tune_values[0].value = 0;
+  tune_values[0].value_name = "No tunning";
+  tune_values[0].value_nick = "No tunning";
+
+  for (i = 0; i < n; i++) {
+    tune_values[i + 1].value = i + 1;
+    tune_values[i + 1].value_name = x265_tune_names[i];
+    tune_values[i + 1].value_nick = x265_tune_names[i];
+  }
+
+  tune = g_enum_register_static ("GstX265Tune", tune_values);
+
+  return tune;
+}
+
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw, "
+        "format = (string) { " FORMATS " }, "
+        "framerate = (fraction) [0, MAX], "
+        "width = (int) [ 4, MAX ], " "height = (int) [ 4, MAX ]")
+    );
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-h265, "
+        "framerate = (fraction) [0/1, MAX], "
+        "width = (int) [ 4, MAX ], " "height = (int) [ 4, MAX ], "
+        "stream-format = (string) { avc, byte-stream }, "
+        "alignment = (string) au, " "profile = (string) { main }")
+    );
+
+static void gst_x265_enc_finalize (GObject * object);
+static gboolean gst_x265_enc_start (GstVideoEncoder * encoder);
+static gboolean gst_x265_enc_stop (GstVideoEncoder * encoder);
+static gboolean gst_x265_enc_flush (GstVideoEncoder * encoder);
+
+static gboolean gst_x265_enc_init_encoder (GstX265Enc * encoder);
+static void gst_x265_enc_close_encoder (GstX265Enc * encoder);
+
+static GstFlowReturn gst_x265_enc_finish (GstVideoEncoder * encoder);
+static GstFlowReturn gst_x265_enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame);
+static void gst_x265_enc_flush_frames (GstX265Enc * encoder, gboolean send);
+static GstFlowReturn gst_x265_enc_encode_frame (GstX265Enc * encoder,
+    x265_picture * pic_in, GstVideoCodecFrame * input_frame, guint32 * i_nal,
+    gboolean send);
+static gboolean gst_x265_enc_set_format (GstVideoEncoder * video_enc,
+    GstVideoCodecState * state);
+static gboolean gst_x265_enc_propose_allocation (GstVideoEncoder * encoder,
+    GstQuery * query);
+
+static void gst_x265_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_x265_enc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+#define gst_x265_enc_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstX265Enc, gst_x265_enc, GST_TYPE_VIDEO_ENCODER,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
+
+static void
+set_value (GValue * val, gint count, ...)
+{
+  const gchar *fmt = NULL;
+  GValue sval = G_VALUE_INIT;
+  va_list ap;
+  gint i;
+
+  g_value_init (&sval, G_TYPE_STRING);
+
+  if (count > 1)
+    g_value_init (val, GST_TYPE_LIST);
+
+  va_start (ap, count);
+  for (i = 0; i < count; i++) {
+    fmt = va_arg (ap, const gchar *);
+    g_value_set_string (&sval, fmt);
+    if (count > 1) {
+      gst_value_list_append_value (val, &sval);
+    }
+  }
+  va_end (ap);
+
+  if (count == 1)
+    *val = sval;
+  else
+    g_value_unset (&sval);
+}
+
+static void
+gst_x265_enc_add_x265_chroma_format (GstStructure * s,
+    int x265_chroma_format_local)
+{
+  GValue fmt = G_VALUE_INIT;
+
+  if (x265_max_bit_depth >= 10) {
+    GST_INFO ("This x265 build supports %d-bit depth", x265_max_bit_depth);
+    if (x265_chroma_format_local == 0) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+      set_value (&fmt, 4, "I420", "Y444", "I420_10LE", "Y444_10LE");
+#else
+      set_value (&fmt, 4, "I420", "Y444", "I420_10BE", "Y444_10BE");
+#endif
+    } else if (x265_chroma_format_local == X265_CSP_I444) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+      set_value (&fmt, 2, "Y444", "Y444_10LE");
+#else
+      set_value (&fmt, 2, "Y444", "Y444_10BE");
+#endif
+    } else if (x265_chroma_format_local == X265_CSP_I420) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+      set_value (&fmt, 2, "I420", "I420_10LE");
+#else
+      set_value (&fmt, 2, "I420", "I420_10BE");
+#endif
+    } else {
+      GST_ERROR ("Unsupported chroma format %d", x265_chroma_format_local);
+    }
+  } else if (x265_max_bit_depth == 8) {
+    GST_INFO ("This x265 build supports 8-bit depth");
+    if (x265_chroma_format_local == 0) {
+      set_value (&fmt, 2, "I420", "Y444");
+    } else if (x265_chroma_format_local == X265_CSP_I444) {
+      set_value (&fmt, 1, "Y444");
+    } else if (x265_chroma_format_local == X265_CSP_I420) {
+      set_value (&fmt, 1, "I420");
+    } else {
+      GST_ERROR ("Unsupported chroma format %d", x265_chroma_format_local);
+    }
+  }
+
+  if (G_VALUE_TYPE (&fmt) != G_TYPE_INVALID)
+    gst_structure_take_value (s, "format", &fmt);
+}
+
+static GstCaps *
+gst_x265_enc_get_supported_input_caps (void)
+{
+  GstCaps *caps;
+  int x265_chroma_format = 0;
+
+  caps = gst_caps_new_simple ("video/x-raw",
+      "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1,
+      "width", GST_TYPE_INT_RANGE, 4, G_MAXINT,
+      "height", GST_TYPE_INT_RANGE, 4, G_MAXINT, NULL);
+
+  gst_x265_enc_add_x265_chroma_format (gst_caps_get_structure (caps, 0),
+      x265_chroma_format);
+
+  GST_DEBUG ("returning %" GST_PTR_FORMAT, caps);
+  return caps;
+}
+
+static gboolean
+gst_x265_enc_sink_query (GstVideoEncoder * enc, GstQuery * query)
+{
+  gboolean res;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ACCEPT_CAPS:{
+      GstCaps *acceptable, *caps;
+
+      acceptable = gst_x265_enc_get_supported_input_caps ();
+      gst_query_parse_accept_caps (query, &caps);
+
+      gst_query_set_accept_caps_result (query,
+          gst_caps_is_subset (caps, acceptable));
+      gst_caps_unref (acceptable);
+      res = TRUE;
+    }
+      break;
+    default:
+      res = GST_VIDEO_ENCODER_CLASS (parent_class)->sink_query (enc, query);
+      break;
+  }
+
+  return res;
+}
+
+static GstCaps *
+gst_x265_enc_sink_getcaps (GstVideoEncoder * enc, GstCaps * filter)
+{
+  GstCaps *supported_incaps;
+  GstCaps *ret;
+
+  supported_incaps = gst_x265_enc_get_supported_input_caps ();
+
+  ret = gst_video_encoder_proxy_getcaps (enc, supported_incaps, filter);
+  if (supported_incaps)
+    gst_caps_unref (supported_incaps);
+  return ret;
+}
+
+static void
+gst_x265_enc_class_init (GstX265EncClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+  GstVideoEncoderClass *gstencoder_class;
+
+  x265enc_defaults = g_string_new ("");
+
+  gobject_class = G_OBJECT_CLASS (klass);
+  element_class = GST_ELEMENT_CLASS (klass);
+  gstencoder_class = GST_VIDEO_ENCODER_CLASS (klass);
+
+  gobject_class->set_property = gst_x265_enc_set_property;
+  gobject_class->get_property = gst_x265_enc_get_property;
+  gobject_class->finalize = gst_x265_enc_finalize;
+
+  gstencoder_class->set_format = GST_DEBUG_FUNCPTR (gst_x265_enc_set_format);
+  gstencoder_class->handle_frame =
+      GST_DEBUG_FUNCPTR (gst_x265_enc_handle_frame);
+  gstencoder_class->start = GST_DEBUG_FUNCPTR (gst_x265_enc_start);
+  gstencoder_class->stop = GST_DEBUG_FUNCPTR (gst_x265_enc_stop);
+  gstencoder_class->flush = GST_DEBUG_FUNCPTR (gst_x265_enc_flush);
+  gstencoder_class->finish = GST_DEBUG_FUNCPTR (gst_x265_enc_finish);
+  gstencoder_class->getcaps = GST_DEBUG_FUNCPTR (gst_x265_enc_sink_getcaps);
+  gstencoder_class->sink_query = GST_DEBUG_FUNCPTR (gst_x265_enc_sink_query);
+  gstencoder_class->propose_allocation =
+      GST_DEBUG_FUNCPTR (gst_x265_enc_propose_allocation);
+
+  g_object_class_install_property (gobject_class, PROP_BITRATE,
+      g_param_spec_uint ("bitrate", "Bitrate", "Bitrate in kbit/sec", 1,
+          100 * 1024, PROP_BITRATE_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+          GST_PARAM_MUTABLE_PLAYING));
+
+  g_object_class_install_property (gobject_class, PROP_QP,
+      g_param_spec_int ("qp", "Quantization parameter",
+          "QP for P slices in (implied) CQP mode (-1 = disabled)", -1,
+          51, PROP_QP_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_OPTION_STRING,
+      g_param_spec_string ("option-string", "Option string",
+          "String of x264 options (overridden by element properties)",
+          PROP_OPTION_STRING_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_X265_LOG_LEVEL,
+      g_param_spec_enum ("log-level", "(internal) x265 log level",
+          "x265 log level", GST_X265_ENC_LOG_LEVEL_TYPE,
+          PROP_LOG_LEVEL_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_SPEED_PRESET,
+      g_param_spec_enum ("speed-preset", "Speed preset",
+          "Preset name for speed/quality tradeoff options",
+          GST_X265_ENC_SPEED_PRESET_TYPE, PROP_SPEED_PRESET_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TUNE,
+      g_param_spec_enum ("tune", "Tune options",
+          "Preset name for tuning options", GST_X265_ENC_TUNE_TYPE,
+          PROP_TUNE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_set_static_metadata (element_class,
+      "x265enc", "Codec/Encoder/Video", "H265 Encoder",
+      "Thijs Vermeir <thijs.vermeir@barco.com>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_factory));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_factory));
+}
+
+/* initialize the new element
+ * instantiate pads and add them to element
+ * set functions
+ * initialize structure
+ */
+static void
+gst_x265_enc_init (GstX265Enc * encoder)
+{
+  x265_param_default (&encoder->x265param);
+
+  encoder->push_header = TRUE;
+
+  encoder->bitrate = PROP_BITRATE_DEFAULT;
+  encoder->qp = PROP_QP_DEFAULT;
+  encoder->option_string_prop = g_string_new (PROP_OPTION_STRING_DEFAULT);
+  encoder->log_level = PROP_LOG_LEVEL_DEFAULT;
+  encoder->speed_preset = PROP_SPEED_PRESET_DEFAULT;
+  encoder->tune = PROP_TUNE_DEFAULT;
+}
+
+typedef struct
+{
+  GstVideoCodecFrame *frame;
+  GstVideoFrame vframe;
+} FrameData;
+
+static FrameData *
+gst_x265_enc_queue_frame (GstX265Enc * enc, GstVideoCodecFrame * frame,
+    GstVideoInfo * info)
+{
+  GstVideoFrame vframe;
+  FrameData *fdata;
+
+  if (!gst_video_frame_map (&vframe, info, frame->input_buffer, GST_MAP_READ))
+    return NULL;
+
+  fdata = g_slice_new (FrameData);
+  fdata->frame = gst_video_codec_frame_ref (frame);
+  fdata->vframe = vframe;
+
+  enc->pending_frames = g_list_prepend (enc->pending_frames, fdata);
+
+  return fdata;
+}
+
+static void
+gst_x265_enc_dequeue_frame (GstX265Enc * enc, GstVideoCodecFrame * frame)
+{
+  GList *l;
+
+  for (l = enc->pending_frames; l; l = l->next) {
+    FrameData *fdata = l->data;
+
+    if (fdata->frame != frame)
+      continue;
+
+    gst_video_frame_unmap (&fdata->vframe);
+    gst_video_codec_frame_unref (fdata->frame);
+    g_slice_free (FrameData, fdata);
+
+    enc->pending_frames = g_list_delete_link (enc->pending_frames, l);
+    return;
+  }
+}
+
+static void
+gst_x265_enc_dequeue_all_frames (GstX265Enc * enc)
+{
+  GList *l;
+
+  for (l = enc->pending_frames; l; l = l->next) {
+    FrameData *fdata = l->data;
+
+    gst_video_frame_unmap (&fdata->vframe);
+    gst_video_codec_frame_unref (fdata->frame);
+    g_slice_free (FrameData, fdata);
+  }
+  g_list_free (enc->pending_frames);
+  enc->pending_frames = NULL;
+}
+
+static gboolean
+gst_x265_enc_start (GstVideoEncoder * encoder)
+{
+  //GstX265Enc *x265enc = GST_X265_ENC (encoder);
+
+  return TRUE;
+}
+
+static gboolean
+gst_x265_enc_stop (GstVideoEncoder * encoder)
+{
+  GstX265Enc *x265enc = GST_X265_ENC (encoder);
+
+  GST_DEBUG_OBJECT (encoder, "stop encoder");
+
+  gst_x265_enc_flush_frames (x265enc, FALSE);
+  gst_x265_enc_close_encoder (x265enc);
+  gst_x265_enc_dequeue_all_frames (x265enc);
+
+  if (x265enc->input_state)
+    gst_video_codec_state_unref (x265enc->input_state);
+  x265enc->input_state = NULL;
+
+  return TRUE;
+}
+
+
+static gboolean
+gst_x265_enc_flush (GstVideoEncoder * encoder)
+{
+  GstX265Enc *x265enc = GST_X265_ENC (encoder);
+
+  GST_DEBUG_OBJECT (encoder, "flushing encoder");
+
+  gst_x265_enc_flush_frames (x265enc, FALSE);
+  gst_x265_enc_close_encoder (x265enc);
+  gst_x265_enc_dequeue_all_frames (x265enc);
+
+  gst_x265_enc_init_encoder (x265enc);
+
+  return TRUE;
+}
+
+static void
+gst_x265_enc_finalize (GObject * object)
+{
+  GstX265Enc *encoder = GST_X265_ENC (object);
+
+  if (encoder->input_state)
+    gst_video_codec_state_unref (encoder->input_state);
+  encoder->input_state = NULL;
+
+  gst_x265_enc_close_encoder (encoder);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gint
+gst_x265_enc_gst_to_x265_video_format (GstVideoFormat format, gint * nplanes)
+{
+  switch (format) {
+    case GST_VIDEO_FORMAT_I420:
+    case GST_VIDEO_FORMAT_YV12:
+    case GST_VIDEO_FORMAT_I420_10LE:
+    case GST_VIDEO_FORMAT_I420_10BE:
+      if (nplanes)
+        *nplanes = 3;
+      return X265_CSP_I420;
+    case GST_VIDEO_FORMAT_Y444:
+    case GST_VIDEO_FORMAT_Y444_10LE:
+    case GST_VIDEO_FORMAT_Y444_10BE:
+      if (nplanes)
+        *nplanes = 3;
+      return X265_CSP_I444;
+    default:
+      g_return_val_if_reached (GST_VIDEO_FORMAT_UNKNOWN);
+  }
+}
+
+/*
+ * gst_x265_enc_parse_options
+ * @encoder: Encoder to which options are assigned
+ * @str: Option string
+ *
+ * Parse option string and assign to x265 parameters
+ *
+ */
+static gboolean
+gst_x265_enc_parse_options (GstX265Enc * encoder, const gchar * str)
+{
+  GStrv kvpairs;
+  guint npairs, i;
+  gint parse_result = 0, ret = 0;
+  gchar *options = (gchar *) str;
+
+  while (*options == ':')
+    options++;
+
+  kvpairs = g_strsplit (options, ":", 0);
+  npairs = g_strv_length (kvpairs);
+
+  for (i = 0; i < npairs; i++) {
+    GStrv key_val = g_strsplit (kvpairs[i], "=", 2);
+
+    parse_result =
+        x265_param_parse (&encoder->x265param, key_val[0], key_val[1]);
+
+    if (parse_result == X265_PARAM_BAD_NAME) {
+      GST_ERROR_OBJECT (encoder, "Bad name for option %s=%s",
+          key_val[0] ? key_val[0] : "", key_val[1] ? key_val[1] : "");
+    }
+    if (parse_result == X265_PARAM_BAD_VALUE) {
+      GST_ERROR_OBJECT (encoder,
+          "Bad value for option %s=%s (Note: a NULL value for a non-boolean triggers this)",
+          key_val[0] ? key_val[0] : "", key_val[1] ? key_val[1] : "");
+    }
+
+    g_strfreev (key_val);
+
+    if (parse_result)
+      ret++;
+  }
+
+  g_strfreev (kvpairs);
+  return !ret;
+}
+
+/*
+ * gst_x265_enc_init_encoder
+ * @encoder:  Encoder which should be initialized.
+ *
+ * Initialize x265 encoder.
+ *
+ */
+static gboolean
+gst_x265_enc_init_encoder (GstX265Enc * encoder)
+{
+  GstVideoInfo *info;
+
+  if (!encoder->input_state) {
+    GST_DEBUG_OBJECT (encoder, "Have no input state yet");
+    return FALSE;
+  }
+
+  info = &encoder->input_state->info;
+
+  /* make sure that the encoder is closed */
+  gst_x265_enc_close_encoder (encoder);
+
+  GST_OBJECT_LOCK (encoder);
+
+  if (x265_param_default_preset (&encoder->x265param,
+          x265_preset_names[encoder->speed_preset - 1],
+          x265_tune_names[encoder->tune - 1]) < 0) {
+    GST_DEBUG_OBJECT (encoder, "preset or tune unrecognized");
+    GST_OBJECT_UNLOCK (encoder);
+    return FALSE;
+  }
+
+  /* set up encoder parameters */
+  encoder->x265param.logLevel = encoder->log_level;
+  encoder->x265param.internalCsp =
+      gst_x265_enc_gst_to_x265_video_format (info->finfo->format, NULL);
+  if (info->fps_d == 0 || info->fps_n == 0) {
+  } else {
+    encoder->x265param.fpsNum = info->fps_n;
+    encoder->x265param.fpsDenom = info->fps_d;
+  }
+  encoder->x265param.sourceWidth = info->width;
+  encoder->x265param.sourceHeight = info->height;
+  if (info->par_d > 0) {
+    encoder->x265param.vui.sarWidth = info->par_n;
+    encoder->x265param.vui.sarHeight = info->par_d;
+  }
+
+  if (encoder->qp != -1) {
+    /* CQP */
+    encoder->x265param.rc.qp = encoder->qp;
+    encoder->x265param.rc.rateControlMode = X265_RC_CQP;
+  } else {
+    /* ABR */
+    encoder->x265param.rc.bitrate = encoder->bitrate;
+    encoder->x265param.rc.rateControlMode = X265_RC_ABR;
+  }
+
+  /* apply option-string property */
+  if (encoder->option_string_prop && encoder->option_string_prop->len) {
+    GST_DEBUG_OBJECT (encoder, "Applying option-string: %s",
+        encoder->option_string_prop->str);
+    if (gst_x265_enc_parse_options (encoder,
+            encoder->option_string_prop->str) == FALSE) {
+      GST_DEBUG_OBJECT (encoder, "Your option-string contains errors.");
+      GST_OBJECT_UNLOCK (encoder);
+      return FALSE;
+    }
+  }
+
+  encoder->reconfig = FALSE;
+
+  /* good start, will be corrected if needed */
+  encoder->dts_offset = 0;
+
+  GST_OBJECT_UNLOCK (encoder);
+
+  encoder->x265enc = x265_encoder_open (&encoder->x265param);
+  if (!encoder->x265enc) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE,
+        ("Can not initialize x265 encoder."), (NULL));
+    return FALSE;
+  }
+
+  encoder->push_header = TRUE;
+
+  return TRUE;
+}
+
+/* gst_x265_enc_close_encoder
+ * @encoder:  Encoder which should close.
+ *
+ * Close x265 encoder.
+ */
+static void
+gst_x265_enc_close_encoder (GstX265Enc * encoder)
+{
+  if (encoder->x265enc != NULL) {
+    x265_encoder_close (encoder->x265enc);
+    encoder->x265enc = NULL;
+  }
+}
+
+static x265_nal *
+gst_x265_enc_bytestream_to_nal (x265_nal * input)
+{
+  x265_nal *output;
+  int i, j, zeros;
+
+  output = g_malloc (sizeof (x265_nal));
+  output->payload = g_malloc (input->sizeBytes - 4);
+  output->sizeBytes = input->sizeBytes - 4;
+  output->type = input->type;
+
+  zeros = 0;
+  for (i = 4, j = 0; i < input->sizeBytes; (i++, j++)) {
+    if (input->payload[i] == 0x00) {
+      zeros++;
+    } else if (input->payload[i] == 0x03 && zeros == 2) {
+      zeros = 0;
+      j--;
+      output->sizeBytes--;
+      continue;
+    } else {
+      zeros = 0;
+    }
+    output->payload[j] = input->payload[i];
+  }
+
+  return output;
+}
+
+static void
+x265_nal_free (x265_nal * nal)
+{
+  g_free (nal->payload);
+  g_free (nal);
+}
+
+static gboolean
+gst_x265_enc_set_level_tier_and_profile (GstX265Enc * encoder, GstCaps * caps)
+{
+  x265_nal *nal, *vps_nal;
+  guint32 i_nal;
+  int header_return;
+  gboolean ret = TRUE;
+
+  GST_DEBUG_OBJECT (encoder, "set profile, level and tier");
+
+  header_return = x265_encoder_headers (encoder->x265enc, &nal, &i_nal);
+  if (header_return < 0) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 header failed."),
+        ("x265_encoder_headers return code=%d", header_return));
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (encoder, "%d nal units in header", i_nal);
+
+  g_assert (nal[0].type == NAL_UNIT_VPS);
+  vps_nal = gst_x265_enc_bytestream_to_nal (&nal[0]);
+
+  GST_MEMDUMP ("VPS", vps_nal->payload, vps_nal->sizeBytes);
+
+  if (!gst_codec_utils_h265_caps_set_level_tier_and_profile (caps,
+          vps_nal->payload + 6, vps_nal->sizeBytes - 6)) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 failed."),
+        ("Failed to find correct level, tier or profile in VPS"));
+    ret = FALSE;
+  }
+
+  x265_nal_free (vps_nal);
+
+  return ret;
+}
+
+static GstBuffer *
+gst_x265_enc_get_header_buffer (GstX265Enc * encoder)
+{
+  x265_nal *nal;
+  guint32 i_nal, i, offset;
+  gint32 vps_idx, sps_idx, pps_idx;
+  int header_return;
+  GstBuffer *buf;
+
+  header_return = x265_encoder_headers (encoder->x265enc, &nal, &i_nal);
+  if (header_return < 0) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 header failed."),
+        ("x265_encoder_headers return code=%d", header_return));
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (encoder, "%d nal units in header", i_nal);
+
+  /* x265 returns also non header nal units with the call x265_encoder_headers.
+   * The usefull headers are sequential (VPS, SPS and PPS), so we look for this
+   * nal units and only copy these tree nal units as the header */
+
+  vps_idx = sps_idx = pps_idx = -1;
+  for (i = 0; i < i_nal; i++) {
+    if (nal[i].type == 32) {
+      vps_idx = i;
+    } else if (nal[i].type == 33) {
+      sps_idx = i;
+    } else if (nal[i].type == 34) {
+      pps_idx = i;
+    }
+  }
+
+  if (vps_idx == -1 || sps_idx == -1 || pps_idx == -1) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 header failed."),
+        ("x265_encoder_headers did not return VPS, SPS and PPS"));
+    return FALSE;
+  }
+
+  offset = 0;
+  buf =
+      gst_buffer_new_allocate (NULL,
+      nal[vps_idx].sizeBytes + nal[sps_idx].sizeBytes + nal[pps_idx].sizeBytes,
+      NULL);
+  gst_buffer_fill (buf, offset, nal[vps_idx].payload, nal[vps_idx].sizeBytes);
+  offset += nal[vps_idx].sizeBytes;
+  gst_buffer_fill (buf, offset, nal[sps_idx].payload, nal[sps_idx].sizeBytes);
+  offset += nal[sps_idx].sizeBytes;
+  gst_buffer_fill (buf, offset, nal[pps_idx].payload, nal[pps_idx].sizeBytes);
+
+  return buf;
+}
+
+/* gst_x265_enc_set_src_caps
+ * Returns: TRUE on success.
+ */
+static gboolean
+gst_x265_enc_set_src_caps (GstX265Enc * encoder, GstCaps * caps)
+{
+  GstCaps *outcaps;
+  GstStructure *structure;
+  GstVideoCodecState *state;
+  GstTagList *tags;
+
+  outcaps = gst_caps_new_empty_simple ("video/x-h265");
+  structure = gst_caps_get_structure (outcaps, 0);
+
+  gst_structure_set (structure, "stream-format", G_TYPE_STRING, "byte-stream",
+      NULL);
+  gst_structure_set (structure, "alignment", G_TYPE_STRING, "au", NULL);
+
+  if (!gst_x265_enc_set_level_tier_and_profile (encoder, outcaps)) {
+    gst_caps_unref (outcaps);
+    return FALSE;
+  }
+
+  state = gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder),
+      outcaps, encoder->input_state);
+  GST_DEBUG_OBJECT (encoder, "output caps: %" GST_PTR_FORMAT, state->caps);
+  gst_video_codec_state_unref (state);
+
+  tags = gst_tag_list_new_empty ();
+  gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER, "x265",
+      GST_TAG_ENCODER_VERSION, x265_version_str, NULL);
+  gst_video_encoder_merge_tags (GST_VIDEO_ENCODER (encoder), tags,
+      GST_TAG_MERGE_REPLACE);
+  gst_tag_list_unref (tags);
+
+  return TRUE;
+}
+
+static void
+gst_x265_enc_set_latency (GstX265Enc * encoder)
+{
+  GstVideoInfo *info = &encoder->input_state->info;
+  gint max_delayed_frames;
+  GstClockTime latency;
+
+  /* FIXME get a real value from the encoder, this is currently not exposed */
+  if (encoder->tune > 0 && encoder->tune <= G_N_ELEMENTS (x265_tune_names) &&
+      strcmp (x265_tune_names[encoder->tune - 1], "zerolatency") == 0)
+    max_delayed_frames = 0;
+  else
+    max_delayed_frames = 5;
+
+  if (info->fps_n) {
+    latency = gst_util_uint64_scale_ceil (GST_SECOND * info->fps_d,
+        max_delayed_frames, info->fps_n);
+  } else {
+    /* FIXME: Assume 25fps. This is better than reporting no latency at
+     * all and then later failing in live pipelines
+     */
+    latency = gst_util_uint64_scale_ceil (GST_SECOND * 1,
+        max_delayed_frames, 25);
+  }
+
+  GST_INFO_OBJECT (encoder,
+      "Updating latency to %" GST_TIME_FORMAT " (%d frames)",
+      GST_TIME_ARGS (latency), max_delayed_frames);
+
+  gst_video_encoder_set_latency (GST_VIDEO_ENCODER (encoder), latency, latency);
+}
+
+static gboolean
+gst_x265_enc_set_format (GstVideoEncoder * video_enc,
+    GstVideoCodecState * state)
+{
+  GstX265Enc *encoder = GST_X265_ENC (video_enc);
+  GstVideoInfo *info = &state->info;
+
+  /* If the encoder is initialized, do not reinitialize it again if not
+   * necessary */
+  if (encoder->x265enc) {
+    GstVideoInfo *old = &encoder->input_state->info;
+
+    if (info->finfo->format == old->finfo->format
+        && info->width == old->width && info->height == old->height
+        && info->fps_n == old->fps_n && info->fps_d == old->fps_d
+        && info->par_n == old->par_n && info->par_d == old->par_d) {
+      gst_video_codec_state_unref (encoder->input_state);
+      encoder->input_state = gst_video_codec_state_ref (state);
+      return TRUE;
+    }
+
+    /* clear out pending frames */
+    gst_x265_enc_flush_frames (encoder, TRUE);
+  }
+
+  if (encoder->input_state)
+    gst_video_codec_state_unref (encoder->input_state);
+  encoder->input_state = gst_video_codec_state_ref (state);
+
+  if (!gst_x265_enc_init_encoder (encoder))
+    return FALSE;
+
+  if (!gst_x265_enc_set_src_caps (encoder, state->caps)) {
+    gst_x265_enc_close_encoder (encoder);
+    return FALSE;
+  }
+
+  gst_x265_enc_set_latency (encoder);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_x265_enc_finish (GstVideoEncoder * encoder)
+{
+  GST_DEBUG_OBJECT (encoder, "finish encoder");
+
+  gst_x265_enc_flush_frames (GST_X265_ENC (encoder), TRUE);
+  gst_x265_enc_flush_frames (GST_X265_ENC (encoder), TRUE);
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_x265_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query)
+{
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+
+  return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder,
+      query);
+}
+
+/* chain function
+ * this function does the actual processing
+ */
+static GstFlowReturn
+gst_x265_enc_handle_frame (GstVideoEncoder * video_enc,
+    GstVideoCodecFrame * frame)
+{
+  GstX265Enc *encoder = GST_X265_ENC (video_enc);
+  GstVideoInfo *info = &encoder->input_state->info;
+  GstFlowReturn ret;
+  x265_picture pic_in;
+  guint32 i_nal, i;
+  FrameData *fdata;
+  gint nplanes = 0;
+
+  if (G_UNLIKELY (encoder->x265enc == NULL))
+    goto not_inited;
+
+  /* set up input picture */
+  x265_picture_init (&encoder->x265param, &pic_in);
+
+  fdata = gst_x265_enc_queue_frame (encoder, frame, info);
+  if (!fdata)
+    goto invalid_frame;
+
+  pic_in.colorSpace =
+      gst_x265_enc_gst_to_x265_video_format (info->finfo->format, &nplanes);
+  for (i = 0; i < nplanes; i++) {
+    pic_in.planes[i] = GST_VIDEO_FRAME_PLANE_DATA (&fdata->vframe, i);
+    pic_in.stride[i] = GST_VIDEO_FRAME_COMP_STRIDE (&fdata->vframe, i);
+  }
+
+  pic_in.sliceType = X265_TYPE_AUTO;
+  pic_in.pts = frame->pts;
+  pic_in.dts = frame->dts;
+  pic_in.bitDepth = info->finfo->depth[0];
+  pic_in.userData = GINT_TO_POINTER (frame->system_frame_number);
+
+  ret = gst_x265_enc_encode_frame (encoder, &pic_in, frame, &i_nal, TRUE);
+
+  /* input buffer is released later on */
+  return ret;
+
+/* ERRORS */
+not_inited:
+  {
+    GST_WARNING_OBJECT (encoder, "Got buffer before set_caps was called");
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+invalid_frame:
+  {
+    GST_ERROR_OBJECT (encoder, "Failed to map frame");
+    return GST_FLOW_ERROR;
+  }
+}
+
+static GstFlowReturn
+gst_x265_enc_encode_frame (GstX265Enc * encoder, x265_picture * pic_in,
+    GstVideoCodecFrame * input_frame, guint32 * i_nal, gboolean send)
+{
+  GstVideoCodecFrame *frame = NULL;
+  GstBuffer *out_buf = NULL;
+  x265_picture pic_out;
+  x265_nal *nal;
+  int i_size, i, offset;
+  int encoder_return;
+  GstFlowReturn ret = GST_FLOW_OK;
+  gboolean update_latency = FALSE;
+
+  if (G_UNLIKELY (encoder->x265enc == NULL)) {
+    if (input_frame)
+      gst_video_codec_frame_unref (input_frame);
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+
+  GST_OBJECT_LOCK (encoder);
+  if (encoder->reconfig) {
+    // x265_encoder_reconfig is not yet implemented thus we shut down and re-create encoder
+    gst_x265_enc_init_encoder (encoder);
+    update_latency = TRUE;
+  }
+
+  if (pic_in && input_frame) {
+    if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (input_frame)) {
+      GST_INFO_OBJECT (encoder, "Forcing key frame");
+      pic_in->sliceType = X265_TYPE_IDR;
+    }
+  }
+  GST_OBJECT_UNLOCK (encoder);
+
+  if (G_UNLIKELY (update_latency))
+    gst_x265_enc_set_latency (encoder);
+
+  encoder_return = x265_encoder_encode (encoder->x265enc,
+      &nal, i_nal, pic_in, &pic_out);
+
+  GST_DEBUG_OBJECT (encoder, "encoder result (%d) with %u nal units",
+      encoder_return, *i_nal);
+
+  if (encoder_return < 0) {
+    GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 frame failed."),
+        ("x265_encoder_encode return code=%d", encoder_return));
+    ret = GST_FLOW_ERROR;
+    /* Make sure we finish this frame */
+    frame = input_frame;
+    goto out;
+  }
+
+  /* Input frame is now queued */
+  if (input_frame)
+    gst_video_codec_frame_unref (input_frame);
+
+  if (!*i_nal) {
+    ret = GST_FLOW_OK;
+    GST_LOG_OBJECT (encoder, "no output yet");
+    goto out;
+  }
+
+  frame = gst_video_encoder_get_frame (GST_VIDEO_ENCODER (encoder),
+      GPOINTER_TO_INT (pic_out.userData));
+  g_assert (frame || !send);
+
+  GST_DEBUG_OBJECT (encoder,
+      "output picture ready POC=%d system=%d frame found %d", pic_out.poc,
+      GPOINTER_TO_INT (pic_out.userData), frame != NULL);
+
+  if (!send || !frame) {
+    GST_LOG_OBJECT (encoder, "not sending (%d) or frame not found (%d)", send,
+        frame != NULL);
+    ret = GST_FLOW_OK;
+    goto out;
+  }
+
+  i_size = 0;
+  offset = 0;
+  for (i = 0; i < *i_nal; i++)
+    i_size += nal[i].sizeBytes;
+  out_buf = gst_buffer_new_allocate (NULL, i_size, NULL);
+  for (i = 0; i < *i_nal; i++) {
+    gst_buffer_fill (out_buf, offset, nal[i].payload, nal[i].sizeBytes);
+    offset += nal[i].sizeBytes;
+  }
+
+  frame->output_buffer = out_buf;
+
+  if (encoder->push_header) {
+    GstBuffer *header;
+
+    header = gst_x265_enc_get_header_buffer (encoder);
+    frame->output_buffer = gst_buffer_append (header, frame->output_buffer);
+    encoder->push_header = FALSE;
+  }
+
+  GST_LOG_OBJECT (encoder,
+      "output: dts %" G_GINT64_FORMAT " pts %" G_GINT64_FORMAT,
+      (gint64) pic_out.dts, (gint64) pic_out.pts);
+
+  frame->dts = pic_out.dts + encoder->dts_offset;
+
+out:
+  if (frame) {
+    gst_x265_enc_dequeue_frame (encoder, frame);
+    ret = gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (encoder), frame);
+  }
+
+  return ret;
+}
+
+static void
+gst_x265_enc_flush_frames (GstX265Enc * encoder, gboolean send)
+{
+  GstFlowReturn flow_ret;
+  guint32 i_nal;
+
+  /* first send the remaining frames */
+  if (encoder->x265enc)
+    do {
+      flow_ret = gst_x265_enc_encode_frame (encoder, NULL, NULL, &i_nal, send);
+    } while (flow_ret == GST_FLOW_OK && i_nal > 0);
+}
+
+static void
+gst_x265_enc_reconfig (GstX265Enc * encoder)
+{
+  encoder->x265param.rc.bitrate = encoder->bitrate;
+  encoder->reconfig = TRUE;
+}
+
+static void
+gst_x265_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstX265Enc *encoder;
+  GstState state;
+
+  encoder = GST_X265_ENC (object);
+
+  GST_OBJECT_LOCK (encoder);
+
+  state = GST_STATE (encoder);
+  if ((state != GST_STATE_READY && state != GST_STATE_NULL) &&
+      !(pspec->flags & GST_PARAM_MUTABLE_PLAYING))
+    goto wrong_state;
+
+  switch (prop_id) {
+    case PROP_BITRATE:
+      encoder->bitrate = g_value_get_uint (value);
+      break;
+    case PROP_QP:
+      encoder->qp = g_value_get_int (value);
+      break;
+    case PROP_OPTION_STRING:
+      g_string_assign (encoder->option_string_prop, g_value_get_string (value));
+      break;
+    case PROP_X265_LOG_LEVEL:
+      encoder->log_level = g_value_get_enum (value);
+      break;
+    case PROP_SPEED_PRESET:
+      encoder->speed_preset = g_value_get_enum (value);
+      break;
+    case PROP_TUNE:
+      encoder->tune = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  gst_x265_enc_reconfig (encoder);
+  GST_OBJECT_UNLOCK (encoder);
+  return;
+
+wrong_state:
+  {
+    GST_WARNING_OBJECT (encoder, "setting property in wrong state");
+    GST_OBJECT_UNLOCK (encoder);
+  }
+}
+
+static void
+gst_x265_enc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstX265Enc *encoder;
+
+  encoder = GST_X265_ENC (object);
+
+  GST_OBJECT_LOCK (encoder);
+  switch (prop_id) {
+    case PROP_BITRATE:
+      g_value_set_uint (value, encoder->bitrate);
+      break;
+    case PROP_QP:
+      g_value_set_int (value, encoder->qp);
+      break;
+    case PROP_OPTION_STRING:
+      g_value_set_string (value, encoder->option_string_prop->str);
+      break;
+    case PROP_X265_LOG_LEVEL:
+      g_value_set_enum (value, encoder->log_level);
+      break;
+    case PROP_SPEED_PRESET:
+      g_value_set_enum (value, encoder->speed_preset);
+      break;
+    case PROP_TUNE:
+      g_value_set_enum (value, encoder->tune);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+  GST_OBJECT_UNLOCK (encoder);
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (x265_enc_debug, "x265enc", 0,
+      "h265 encoding element");
+
+  GST_INFO ("x265 build: %u", X265_BUILD);
+
+  return gst_element_register (plugin, "x265enc",
+      GST_RANK_PRIMARY, GST_TYPE_X265_ENC);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    x265,
+    "x265-based H265 plugins",
+    plugin_init, VERSION, "GPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/ext/x265/gstx265enc.h b/ext/x265/gstx265enc.h
new file mode 100644
index 0000000..58ba7c0
--- /dev/null
+++ b/ext/x265/gstx265enc.h
@@ -0,0 +1,88 @@
+/* GStreamer H265 encoder plugin
+ * Copyright (C) 2005 Michal Benes <michal.benes@itonis.tv>
+ * Copyright (C) 2005 Josef Zlomek <josef.zlomek@itonis.tv>
+ * Copyright (C) 2014 Thijs Vermeir <thijs.vermeir@barco.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_X265_ENC_H__
+#define __GST_X265_ENC_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideoencoder.h>
+#include "_stdint.h"
+#include <x265.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_X265_ENC \
+  (gst_x265_enc_get_type())
+#define GST_X265_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_X265_ENC,GstX265Enc))
+#define GST_X265_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_X265_ENC,GstX265EncClass))
+#define GST_IS_X265_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_X265_ENC))
+#define GST_IS_X265_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_X265_ENC))
+typedef struct _GstX265Enc GstX265Enc;
+typedef struct _GstX265EncClass GstX265EncClass;
+
+struct _GstX265Enc
+{
+  GstVideoEncoder element;
+
+  /*< private > */
+  x265_encoder *x265enc;
+  x265_param x265param;
+  GstClockTime dts_offset;
+  gboolean push_header;
+
+  /* List of frame/buffer mapping structs for
+   * pending frames */
+  GList *pending_frames;
+
+  /* properties */
+  guint bitrate;
+  gint qp;
+  gint log_level;
+  gint tune;
+  gint speed_preset;
+  GString *option_string_prop;  /* option-string property */
+  /*GString *option_string; *//* used by set prop */
+
+  /* input description */
+  GstVideoCodecState *input_state;
+
+  /* configuration changed  while playing */
+  gboolean reconfig;
+
+  /* from the downstream caps */
+  const gchar *peer_profile;
+  gboolean peer_intra_profile;
+  /*const x265_level_t *peer_level; */
+};
+
+struct _GstX265EncClass
+{
+  GstVideoEncoderClass parent_class;
+};
+
+GType gst_x265_enc_get_type (void);
+
+G_END_DECLS
+#endif /* __GST_X265_ENC_H__ */
diff --git a/ext/xvid/Makefile.in b/ext/xvid/Makefile.in
index b26f0d2..d4f05b5 100644
--- a/ext/xvid/Makefile.in
+++ b/ext/xvid/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/xvid
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/xvid/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/xvid/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,6 +1107,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/zbar/Makefile.in b/ext/zbar/Makefile.in
index e24b4a3..8fc7da1 100644
--- a/ext/zbar/Makefile.in
+++ b/ext/zbar/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = ext/zbar
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/zbar/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu ext/zbar/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1057,6 +1091,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/ext/zbar/gstzbar.c b/ext/zbar/gstzbar.c
index e96d3ae..2bb0a7d 100644
--- a/ext/zbar/gstzbar.c
+++ b/ext/zbar/gstzbar.c
@@ -22,6 +22,8 @@
  *
  * Detect bar codes in the video streams and send them as element messages to
  * the #GstBus if .#GstZBar:message property is %TRUE.
+ * If the .#GstZBar:attach-frame property is %TRUE, the posted barcode message
+ * includes a sample of the frame where the barcode was detected (Since 1.6).
  *
  * The element generate messages named
  * <classname>&quot;barcode&quot;</classname>. The structure containes these
@@ -56,6 +58,14 @@
  *   values.
  *   </para>
  * </listitem>
+ * <listitem>
+ *   <para>
+ *   GstSample
+ *   <classname>&quot;frame&quot;</classname>:
+ *   the frame in which the barcode message was detected, if
+ *   the .#GstZBar:attach-frame property was set to %TRUE (Since 1.6)
+ *   </para>
+ * </listitem>
  * </itemizedlist>
  *
  * <refsect2>
@@ -95,15 +105,16 @@
 {
   PROP_0,
   PROP_MESSAGE,
+  PROP_ATTACH_FRAME,
   PROP_CACHE
 };
 
 #define DEFAULT_CACHE    FALSE
 #define DEFAULT_MESSAGE  TRUE
+#define DEFAULT_ATTACH_FRAME FALSE
 
-/* FIXME: add YVU9 and YUV9 once we have a GstVideoFormat for that */
 #define ZBAR_YUV_CAPS \
-    "{ Y800, I420, YV12, NV12, NV21, Y41B, Y42B }"
+    "{ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }"
 
 static GstStaticPadTemplate gst_zbar_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -156,6 +167,19 @@
           "Post a barcode message for each detected code",
           DEFAULT_MESSAGE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  /**
+   * GstZBar::attach-frame:
+   *
+   * Attach the frame in which the barcode was detected to the posted
+   * barcode message.
+   *
+   * Since: 1.6
+   */
+  g_object_class_install_property (gobject_class, PROP_ATTACH_FRAME,
+      g_param_spec_boolean ("attach-frame", "Attach frame",
+          "Attach a frame dump to each barcode message",
+          DEFAULT_ATTACH_FRAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   g_object_class_install_property (gobject_class, PROP_CACHE,
       g_param_spec_boolean ("cache", "cache",
           "Enable or disable the inter-image result cache",
@@ -186,6 +210,7 @@
 {
   zbar->cache = DEFAULT_CACHE;
   zbar->message = DEFAULT_MESSAGE;
+  zbar->attach_frame = DEFAULT_ATTACH_FRAME;
 
   zbar->scanner = zbar_image_scanner_create ();
 }
@@ -216,6 +241,9 @@
     case PROP_MESSAGE:
       zbar->message = g_value_get_boolean (value);
       break;
+    case PROP_ATTACH_FRAME:
+      zbar->attach_frame = g_value_get_boolean (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -238,6 +266,9 @@
     case PROP_MESSAGE:
       g_value_set_boolean (value, zbar->message);
       break;
+    case PROP_ATTACH_FRAME:
+      g_value_set_boolean (value, zbar->attach_frame);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -268,6 +299,10 @@
 
   /* scan the image for barcodes */
   n = zbar_scan_image (zbar->scanner, image);
+  if (G_UNLIKELY (n == -1)) {
+    GST_WARNING_OBJECT (zbar, "Error trying to scan frame. Skipping");
+    goto out;
+  }
   if (n == 0)
     goto out;
 
@@ -287,15 +322,29 @@
     if (zbar->message) {
       GstMessage *m;
       GstStructure *s;
+      GstSample *sample;
+      GstCaps *sample_caps;
 
-      /* post a message */
       s = gst_structure_new ("barcode",
           "timestamp", G_TYPE_UINT64, GST_BUFFER_TIMESTAMP (frame->buffer),
           "type", G_TYPE_STRING, zbar_get_symbol_name (typ),
           "symbol", G_TYPE_STRING, data, "quality", G_TYPE_INT, quality, NULL);
+
+      if (zbar->attach_frame) {
+        /* create a sample from image */
+        sample_caps = gst_video_info_to_caps (&frame->info);
+        sample = gst_sample_new (frame->buffer, sample_caps, NULL, NULL);
+        gst_caps_unref (sample_caps);
+        gst_structure_set (s, "frame", GST_TYPE_SAMPLE, sample, NULL);
+        gst_sample_unref (sample);
+      }
+
       m = gst_message_new_element (GST_OBJECT (zbar), s);
       gst_element_post_message (GST_ELEMENT (zbar), m);
-    }
+
+    } else if (zbar->attach_frame)
+      GST_WARNING_OBJECT (zbar,
+          "attach-frame=true has no effect if message=false");
   }
 
 out:
diff --git a/ext/zbar/gstzbar.h b/ext/zbar/gstzbar.h
index bb2e15b..c07e01d 100644
--- a/ext/zbar/gstzbar.h
+++ b/ext/zbar/gstzbar.h
@@ -53,6 +53,7 @@
 
   /* properties */
   gboolean message;
+  gboolean attach_frame;
   gboolean cache;
 
   /* internals */
diff --git a/gst-libs/Makefile.in b/gst-libs/Makefile.in
index 0c3ae85..58217c4 100644
--- a/gst-libs/Makefile.in
+++ b/gst-libs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -176,6 +186,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -218,8 +229,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -244,8 +257,6 @@
 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@
@@ -258,7 +269,6 @@
 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@
@@ -266,6 +276,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -292,11 +304,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -315,8 +330,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -375,10 +388,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -395,7 +412,6 @@
 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@
@@ -404,7 +420,6 @@
 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@
@@ -417,7 +432,6 @@
 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@
@@ -431,6 +445,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -442,6 +457,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -480,6 +497,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -515,10 +533,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -544,6 +566,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -551,7 +576,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -580,6 +612,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -590,6 +623,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -620,17 +654,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -647,6 +680,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -685,6 +719,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -714,7 +749,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1009,6 +1043,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am
index b3f23f4..a7380f8 100644
--- a/gst-libs/gst/Makefile.am
+++ b/gst-libs/gst/Makefile.am
@@ -10,9 +10,27 @@
 WAYLAND_DIR=wayland
 endif
 
-SUBDIRS = interfaces basecamerabinsrc codecparsers \
-	 insertbin uridownloader mpegts base video $(GL_DIR) $(WAYLAND_DIR)
+SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \
+	 insertbin 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 wayland base video
+DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \
+	codecparsers insertbin mpegts wayland base video
+
+#dependencies
+video: base
+
+adaptivedemux: uridownloader
+
+INDEPENDENT_SUBDIRS = \
+	interfaces basecamerabinsrc codecparsers insertbin uridownloader \
+	mpegts base $(GL_DIR) $(WAYLAND_DIR)
+
+.PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
+
+independent-subdirs: $(INDEPENDENT_SUBDIRS)
+
+$(INDEPENDENT_SUBDIRS):
+	$(MAKE) -C $@
+
+all-recursive: independent-subdirs
diff --git a/gst-libs/gst/Makefile.in b/gst-libs/gst/Makefile.in
index 4b2cc29..5fe9b91 100644
--- a/gst-libs/gst/Makefile.in
+++ b/gst-libs/gst/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(noinst_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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -178,6 +188,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -220,8 +231,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -246,8 +259,6 @@
 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@
@@ -260,7 +271,6 @@
 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@
@@ -268,6 +278,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -294,11 +306,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -317,8 +332,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -377,10 +390,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -397,7 +414,6 @@
 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@
@@ -406,7 +422,6 @@
 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@
@@ -419,7 +434,6 @@
 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@
@@ -433,6 +447,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -444,6 +459,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -482,6 +499,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -517,10 +535,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -546,6 +568,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -553,7 +578,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -582,6 +614,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -592,6 +625,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -622,17 +656,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -649,6 +682,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -687,6 +721,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -703,12 +738,16 @@
 @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 base video $(GL_DIR) $(WAYLAND_DIR)
+SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \
+	 insertbin 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 wayland base video
+DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \
+	codecparsers insertbin mpegts wayland base video
+
+INDEPENDENT_SUBDIRS = \
+	interfaces basecamerabinsrc codecparsers insertbin uridownloader \
+	mpegts base $(GL_DIR) $(WAYLAND_DIR)
 
 all: all-recursive
 
@@ -725,7 +764,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1020,6 +1058,22 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
+
+#dependencies
+video: base
+
+adaptivedemux: uridownloader
+
+.PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
+
+independent-subdirs: $(INDEPENDENT_SUBDIRS)
+
+$(INDEPENDENT_SUBDIRS):
+	$(MAKE) -C $@
+
+all-recursive: independent-subdirs
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst-libs/gst/adaptivedemux/Makefile.am b/gst-libs/gst/adaptivedemux/Makefile.am
new file mode 100644
index 0000000..be4baac
--- /dev/null
+++ b/gst-libs/gst/adaptivedemux/Makefile.am
@@ -0,0 +1,22 @@
+
+lib_LTLIBRARIES = libgstadaptivedemux-@GST_API_VERSION@.la
+
+CLEANFILES = $(BUILT_SOURCES)
+
+libgstadaptivedemux_@GST_API_VERSION@_la_SOURCES = \
+	gstadaptivedemux.c
+
+libgstadaptivedemux_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/adaptivedemux
+
+noinst_HEADERS = gstadaptivedemux.h
+
+libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_CFLAGS)
+libgstadaptivedemux_@GST_API_VERSION@_la_LIBADD = \
+	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+	-lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
+
+libgstadaptivedemux_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
diff --git a/ext/mythtv/Makefile.in b/gst-libs/gst/adaptivedemux/Makefile.in
similarity index 82%
copy from ext/mythtv/Makefile.in
copy to gst-libs/gst/adaptivedemux/Makefile.in
index 055754c..ad3d6aa 100644
--- a/ext/mythtv/Makefile.in
+++ b/gst-libs/gst/adaptivedemux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = gst-libs/gst/adaptivedemux
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -151,21 +161,25 @@
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(plugindir)"
-LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstadaptivedemux_@GST_API_VERSION@_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+am_libgstadaptivedemux_@GST_API_VERSION@_la_OBJECTS =  \
+	libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.lo
+libgstadaptivedemux_@GST_API_VERSION@_la_OBJECTS =  \
+	$(am_libgstadaptivedemux_@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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstadaptivedemux_@GST_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+	--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS) \
+	$(CFLAGS) $(libgstadaptivedemux_@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
@@ -200,8 +214,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(libgstadaptivedemux_@GST_API_VERSION@_la_SOURCES)
+DIST_SOURCES = $(libgstadaptivedemux_@GST_API_VERSION@_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +287,6 @@
 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@
@@ -284,7 +299,6 @@
 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@
@@ -292,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +442,6 @@
 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@
@@ -430,7 +450,6 @@
 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@
@@ -443,7 +462,6 @@
 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@
@@ -457,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,25 +763,24 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+lib_LTLIBRARIES = libgstadaptivedemux-@GST_API_VERSION@.la
+CLEANFILES = $(BUILT_SOURCES)
+libgstadaptivedemux_@GST_API_VERSION@_la_SOURCES = \
+	gstadaptivedemux.c
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+libgstadaptivedemux_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/adaptivedemux
+noinst_HEADERS = gstadaptivedemux.h
+libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_CFLAGS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
+libgstadaptivedemux_@GST_API_VERSION@_la_LIBADD = \
+	$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \
+	-lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
 
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
-
+libgstadaptivedemux_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
 all: all-am
 
 .SUFFIXES:
@@ -756,10 +794,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/adaptivedemux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu gst-libs/gst/adaptivedemux/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,33 +815,33 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
-install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+	@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)$(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)"; \
+	  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-pluginLTLIBRARIES:
+uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+	@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)$(plugindir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
+	  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-pluginLTLIBRARIES:
-	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
-	@list='$(plugin_LTLIBRARIES)'; \
+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`; \
@@ -813,8 +850,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+libgstadaptivedemux-@GST_API_VERSION@.la: $(libgstadaptivedemux_@GST_API_VERSION@_la_OBJECTS) $(libgstadaptivedemux_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstadaptivedemux_@GST_API_VERSION@_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstadaptivedemux_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstadaptivedemux_@GST_API_VERSION@_la_OBJECTS) $(libgstadaptivedemux_@GST_API_VERSION@_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +859,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +885,12 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.lo: gstadaptivedemux.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) $(libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.lo -MD -MP -MF $(DEPDIR)/libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.Tpo -c -o libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.lo `test -f 'gstadaptivedemux.c' || echo '$(srcdir)/'`gstadaptivedemux.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.Tpo $(DEPDIR)/libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstadaptivedemux.c' object='libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@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) $(libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstadaptivedemux_@GST_API_VERSION@_la-gstadaptivedemux.lo `test -f 'gstadaptivedemux.c' || echo '$(srcdir)/'`gstadaptivedemux.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -947,7 +984,7 @@
 check: check-am
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
+	for dir in "$(DESTDIR)$(libdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -972,6 +1009,7 @@
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -982,7 +1020,7 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1003,13 +1041,13 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am:
 
 install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-libLTLIBRARIES
 
 install-html: install-html-am
 
@@ -1049,24 +1087,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
 	ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-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
+	install-info-am install-libLTLIBRARIES 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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
new file mode 100644
index 0000000..9f74c65
--- /dev/null
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -0,0 +1,2783 @@
+/* GStreamer
+ *
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *   Author: Thiago Santos <thiagoss@osg.samsung.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:gstadaptivedemux
+ * @short_description: Base class for adaptive demuxers
+ * @see_also:
+ *
+ * What is an adaptive demuxer?
+ * Adaptive demuxers are special demuxers in the sense that they don't
+ * actually demux data received from upstream but download the data
+ * themselves.
+ *
+ * Adaptive formats (HLS, DASH, MSS) are composed of a manifest file and
+ * a set of fragments. The manifest describes the available media and
+ * the sequence of fragments to use. Each fragments contains a small
+ * part of the media (typically only a few seconds). It is possible for
+ * the manifest to have the same media available in different configurations
+ * (bitrates for example) so that the client can select the one that
+ * best suits its scenario (network fluctuation, hardware requirements...).
+ * It is possible to switch from one representation of the media to another
+ * during playback. That's why it is called 'adaptive', because it can be
+ * adapted to the client's needs.
+ *
+ * Architectural overview:
+ * The manifest is received by the demuxer in its sink pad and, upon receiving
+ * EOS, it parses the manifest and exposes the streams available in it. For
+ * each stream a source element will be created and will download the list
+ * of fragments one by one. Once a fragment is finished downloading, the next
+ * URI is set to the source element and it starts fetching it and pushing
+ * through the stream's pad. This implies that each stream is independent from
+ * each other as it runs on a separate thread.
+ *
+ * After downloading each fragment, the download rate of it is calculated and
+ * the demuxer has a chance to switch to a different bitrate if needed. The
+ * switch can be done by simply pushing a new caps before the next fragment
+ * when codecs are the same, or by exposing a new pad group if it needs
+ * a codec change.
+ *
+ * Extra features:
+ * - Not linked streams: Streams that are not-linked have their download threads
+ *                       interrupted to save network bandwidth. When they are
+ *                       relinked a reconfigure event is received and the
+ *                       stream is restarted.
+ *
+ * Subclasses:
+ * While GstAdaptiveDemux is responsible for the workflow, it knows nothing
+ * about the intrinsics of the subclass formats, so the subclasses are
+ * resposible for maintaining the manifest data structures and stream
+ * information.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstadaptivedemux.h"
+#include "gst/gst-i18n-plugin.h"
+#include <gst/base/gstadapter.h>
+
+GST_DEBUG_CATEGORY (adaptivedemux_debug);
+#define GST_CAT_DEFAULT adaptivedemux_debug
+
+#define GST_ADAPTIVE_DEMUX_GET_PRIVATE(obj)  \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_ADAPTIVE_DEMUX, \
+        GstAdaptiveDemuxPrivate))
+
+#define MAX_DOWNLOAD_ERROR_COUNT 3
+#define DEFAULT_FAILED_COUNT 3
+#define DEFAULT_LOOKBACK_FRAGMENTS 3
+#define DEFAULT_CONNECTION_SPEED 0
+#define DEFAULT_BITRATE_LIMIT 0.8
+
+enum
+{
+  PROP_0,
+  PROP_LOOKBACK_FRAGMENTS,
+  PROP_CONNECTION_SPEED,
+  PROP_BITRATE_LIMIT,
+  PROP_LAST
+};
+
+enum GstAdaptiveDemuxFlowReturn
+{
+  GST_ADAPTIVE_DEMUX_FLOW_SWITCH = GST_FLOW_CUSTOM_SUCCESS_2 + 1
+};
+
+struct _GstAdaptiveDemuxPrivate
+{
+  GstAdapter *input_adapter;
+  gboolean have_manifest;
+
+  GstUriDownloader *downloader;
+
+  GList *old_streams;
+
+  GstTask *updates_task;
+  GRecMutex updates_lock;
+  GMutex updates_timed_lock;
+  GCond updates_timed_cond;
+  gboolean stop_updates_task;
+  gint update_failed_count;
+
+  gint64 next_update;
+
+  gboolean exposing;
+  guint32 segment_seqnum;
+};
+
+static GstBinClass *parent_class = NULL;
+static void gst_adaptive_demux_class_init (GstAdaptiveDemuxClass * klass);
+static void gst_adaptive_demux_init (GstAdaptiveDemux * dec,
+    GstAdaptiveDemuxClass * klass);
+static void gst_adaptive_demux_finalize (GObject * object);
+static GstStateChangeReturn gst_adaptive_demux_change_state (GstElement *
+    element, GstStateChange transition);
+
+static void gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg);
+
+static gboolean gst_adaptive_demux_sink_event (GstPad * pad, GstObject * parent,
+    GstEvent * event);
+static GstFlowReturn gst_adaptive_demux_sink_chain (GstPad * pad,
+    GstObject * parent, GstBuffer * buffer);
+static gboolean gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
+    GstQuery * query);
+static gboolean gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
+    GstEvent * event);
+
+static gboolean
+gst_adaptive_demux_push_src_event (GstAdaptiveDemux * demux, GstEvent * event);
+
+static void gst_adaptive_demux_updates_loop (GstAdaptiveDemux * demux);
+static void gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream *
+    stream);
+static void gst_adaptive_demux_reset (GstAdaptiveDemux * demux);
+static gboolean gst_adaptive_demux_expose_streams (GstAdaptiveDemux * demux,
+    gboolean first_and_live);
+static gboolean gst_adaptive_demux_is_live (GstAdaptiveDemux * demux);
+static GstFlowReturn gst_adaptive_demux_stream_seek (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime ts);
+static gboolean gst_adaptive_demux_stream_has_next_fragment (GstAdaptiveDemux *
+    demux, GstAdaptiveDemuxStream * stream);
+static gboolean gst_adaptive_demux_stream_select_bitrate (GstAdaptiveDemux *
+    demux, GstAdaptiveDemuxStream * stream, guint64 bitrate);
+static GstFlowReturn
+gst_adaptive_demux_stream_update_fragment_info (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static gint64
+gst_adaptive_demux_stream_get_fragment_waiting_time (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static GstFlowReturn gst_adaptive_demux_update_manifest (GstAdaptiveDemux *
+    demux);
+static GstFlowReturn
+gst_adaptive_demux_update_manifest_default (GstAdaptiveDemux * demux);
+static gboolean gst_adaptive_demux_has_next_period (GstAdaptiveDemux * demux);
+static void gst_adaptive_demux_advance_period (GstAdaptiveDemux * demux);
+
+static void gst_adaptive_demux_stream_free (GstAdaptiveDemuxStream * stream);
+static GstFlowReturn
+gst_adaptive_demux_stream_push_event (GstAdaptiveDemuxStream * stream,
+    GstEvent * event);
+static void gst_adaptive_demux_stream_download_wait (GstAdaptiveDemuxStream *
+    stream, GstClockTime time_diff);
+
+static void gst_adaptive_demux_start_tasks (GstAdaptiveDemux * demux);
+static void gst_adaptive_demux_stop_tasks (GstAdaptiveDemux * demux);
+static GstFlowReturn gst_adaptive_demux_combine_flows (GstAdaptiveDemux *
+    demux);
+static void
+gst_adaptive_demux_stream_fragment_download_finish (GstAdaptiveDemuxStream *
+    stream, GstFlowReturn ret, GError * err);
+static GstFlowReturn
+gst_adaptive_demux_stream_data_received_default (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+static GstFlowReturn
+gst_adaptive_demux_stream_finish_fragment_default (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream);
+
+
+/* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
+ * method to get to the padtemplates */
+GType
+gst_adaptive_demux_get_type (void)
+{
+  static volatile gsize type = 0;
+
+  if (g_once_init_enter (&type)) {
+    GType _type;
+    static const GTypeInfo info = {
+      sizeof (GstAdaptiveDemuxClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gst_adaptive_demux_class_init,
+      NULL,
+      NULL,
+      sizeof (GstAdaptiveDemux),
+      0,
+      (GInstanceInitFunc) gst_adaptive_demux_init,
+    };
+
+    _type = g_type_register_static (GST_TYPE_BIN,
+        "GstAdaptiveDemux", &info, G_TYPE_FLAG_ABSTRACT);
+    g_once_init_leave (&type, _type);
+  }
+  return type;
+}
+
+static void
+gst_adaptive_demux_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX (object);
+
+  switch (prop_id) {
+    case PROP_LOOKBACK_FRAGMENTS:
+      demux->num_lookback_fragments = g_value_get_uint (value);
+      break;
+    case PROP_CONNECTION_SPEED:
+      demux->connection_speed = g_value_get_uint (value) * 1000;
+      GST_DEBUG_OBJECT (demux, "Connection speed set to %u",
+          demux->connection_speed);
+      break;
+    case PROP_BITRATE_LIMIT:
+      demux->bitrate_limit = g_value_get_float (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_adaptive_demux_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX (object);
+
+  switch (prop_id) {
+    case PROP_LOOKBACK_FRAGMENTS:
+      g_value_set_uint (value, demux->num_lookback_fragments);
+      break;
+    case PROP_CONNECTION_SPEED:
+      g_value_set_uint (value, demux->connection_speed / 1000);
+      break;
+    case PROP_BITRATE_LIMIT:
+      g_value_set_float (value, demux->bitrate_limit);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_adaptive_demux_class_init (GstAdaptiveDemuxClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+  GstBinClass *gstbin_class;
+
+  gobject_class = G_OBJECT_CLASS (klass);
+  gstelement_class = GST_ELEMENT_CLASS (klass);
+  gstbin_class = GST_BIN_CLASS (klass);
+
+  GST_DEBUG_CATEGORY_INIT (adaptivedemux_debug, "adaptivedemux", 0,
+      "Base Adaptive Demux");
+
+  parent_class = g_type_class_peek_parent (klass);
+  g_type_class_add_private (klass, sizeof (GstAdaptiveDemuxPrivate));
+
+  gobject_class->set_property = gst_adaptive_demux_set_property;
+  gobject_class->get_property = gst_adaptive_demux_get_property;
+  gobject_class->finalize = gst_adaptive_demux_finalize;
+
+  g_object_class_install_property (gobject_class, PROP_LOOKBACK_FRAGMENTS,
+      g_param_spec_uint ("num-lookback-fragments",
+          "Number of fragments to look back",
+          "The number of fragments the demuxer will look back to calculate an average bitrate",
+          1, G_MAXUINT, DEFAULT_LOOKBACK_FRAGMENTS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
+
+  g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
+      g_param_spec_uint ("connection-speed", "Connection Speed",
+          "Network connection speed in kbps (0 = calculate from downloaded"
+          " fragments)", 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* FIXME 2.0: rename this property to bandwidth-usage or any better name */
+  g_object_class_install_property (gobject_class, PROP_BITRATE_LIMIT,
+      g_param_spec_float ("bitrate-limit",
+          "Bitrate limit in %",
+          "Limit of the available bitrate to use when switching to alternates.",
+          0, 1, DEFAULT_BITRATE_LIMIT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gstelement_class->change_state = gst_adaptive_demux_change_state;
+
+  gstbin_class->handle_message = gst_adaptive_demux_handle_message;
+
+  klass->data_received = gst_adaptive_demux_stream_data_received_default;
+  klass->finish_fragment = gst_adaptive_demux_stream_finish_fragment_default;
+  klass->update_manifest = gst_adaptive_demux_update_manifest_default;
+}
+
+static void
+gst_adaptive_demux_init (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxClass * klass)
+{
+  GstPadTemplate *pad_template;
+  GstPad *pad;
+
+  GST_DEBUG_OBJECT (demux, "gst_adaptive_demux_init");
+
+  demux->priv = GST_ADAPTIVE_DEMUX_GET_PRIVATE (demux);
+  demux->priv->input_adapter = gst_adapter_new ();
+  demux->downloader = gst_uri_downloader_new ();
+  demux->stream_struct_size = sizeof (GstAdaptiveDemuxStream);
+  demux->priv->segment_seqnum = gst_util_seqnum_next ();
+  demux->have_group_id = FALSE;
+  demux->group_id = G_MAXUINT;
+
+  gst_segment_init (&demux->segment, GST_FORMAT_TIME);
+
+  g_rec_mutex_init (&demux->priv->updates_lock);
+  demux->priv->updates_task =
+      gst_task_new ((GstTaskFunction) gst_adaptive_demux_updates_loop,
+      demux, NULL);
+  gst_task_set_lock (demux->priv->updates_task, &demux->priv->updates_lock);
+
+  g_mutex_init (&demux->priv->updates_timed_lock);
+  g_cond_init (&demux->priv->updates_timed_cond);
+
+  g_cond_init (&demux->manifest_cond);
+  g_mutex_init (&demux->manifest_lock);
+
+  pad_template =
+      gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "sink");
+  g_return_if_fail (pad_template != NULL);
+
+  demux->sinkpad = pad = gst_pad_new_from_template (pad_template, "sink");
+  gst_pad_set_event_function (demux->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_adaptive_demux_sink_event));
+  gst_pad_set_chain_function (demux->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_adaptive_demux_sink_chain));
+
+  /* Properties */
+  demux->num_lookback_fragments = DEFAULT_LOOKBACK_FRAGMENTS;
+  demux->bitrate_limit = DEFAULT_BITRATE_LIMIT;
+  demux->connection_speed = DEFAULT_CONNECTION_SPEED;
+
+  gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
+}
+
+static void
+gst_adaptive_demux_finalize (GObject * object)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (object);
+  GstAdaptiveDemuxPrivate *priv = demux->priv;
+
+  GST_DEBUG_OBJECT (object, "finalize");
+
+  g_object_unref (priv->input_adapter);
+  g_object_unref (demux->downloader);
+
+  g_mutex_clear (&priv->updates_timed_lock);
+  g_cond_clear (&priv->updates_timed_cond);
+  g_cond_clear (&demux->manifest_cond);
+  g_object_unref (priv->updates_task);
+  g_rec_mutex_clear (&priv->updates_lock);
+  g_mutex_clear (&demux->manifest_lock);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static GstStateChangeReturn
+gst_adaptive_demux_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (element);
+  GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_adaptive_demux_reset (demux);
+      break;
+    default:
+      break;
+  }
+
+  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  return result;
+}
+
+static gboolean
+gst_adaptive_demux_sink_event (GstPad * pad, GstObject * parent,
+    GstEvent * event)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (parent);
+  GstAdaptiveDemuxClass *demux_class;
+
+  switch (event->type) {
+    case GST_EVENT_FLUSH_STOP:
+      gst_adaptive_demux_reset (demux);
+      break;
+    case GST_EVENT_EOS:{
+      GstQuery *query;
+      gboolean query_res;
+      gboolean ret = TRUE;
+      gsize available;
+      GstBuffer *manifest_buffer;
+
+      demux_class = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+      available = gst_adapter_available (demux->priv->input_adapter);
+
+      if (available == 0) {
+        GST_WARNING_OBJECT (demux, "Received EOS without a manifest.");
+        break;
+      }
+
+      GST_DEBUG_OBJECT (demux, "Got EOS on the sink pad: manifest fetched");
+
+      /* Need to get the URI to use it as a base to generate the fragment's
+       * uris */
+      query = gst_query_new_uri ();
+      query_res = gst_pad_peer_query (pad, query);
+      GST_MANIFEST_LOCK (demux);
+      if (query_res) {
+        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->manifest_uri = redirect_uri;
+          demux->manifest_base_uri = NULL;
+          g_free (uri);
+        } else {
+          demux->manifest_uri = uri;
+          demux->manifest_base_uri = redirect_uri;
+        }
+
+        GST_DEBUG_OBJECT (demux, "Fetched manifest at URI: %s (base: %s)",
+            demux->manifest_uri, GST_STR_NULL (demux->manifest_base_uri));
+      } else {
+        GST_WARNING_OBJECT (demux, "Upstream URI query failed.");
+      }
+      gst_query_unref (query);
+
+      /* Let the subclass parse the manifest */
+      manifest_buffer =
+          gst_adapter_take_buffer (demux->priv->input_adapter, available);
+      if (!demux_class->process_manifest (demux, manifest_buffer)) {
+        /* In most cases, this will happen if we set a wrong url in the
+         * source element and we have received the 404 HTML response instead of
+         * the manifest */
+        GST_ELEMENT_ERROR (demux, STREAM, DECODE, ("Invalid manifest."),
+            (NULL));
+        ret = FALSE;
+      } else {
+        demux->priv->have_manifest = TRUE;
+      }
+      gst_buffer_unref (manifest_buffer);
+
+      gst_element_post_message (GST_ELEMENT_CAST (demux),
+          gst_message_new_element (GST_OBJECT_CAST (demux),
+              gst_structure_new (GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME,
+                  "manifest-uri", G_TYPE_STRING,
+                  demux->manifest_uri, "uri", G_TYPE_STRING,
+                  demux->manifest_uri,
+                  "manifest-download-start", GST_TYPE_CLOCK_TIME,
+                  GST_CLOCK_TIME_NONE,
+                  "manifest-download-stop", GST_TYPE_CLOCK_TIME,
+                  gst_util_get_timestamp (), NULL)));
+
+      if (ret) {
+        /* Send duration message */
+        if (!gst_adaptive_demux_is_live (demux)) {
+          GstClockTime duration = demux_class->get_duration (demux);
+
+          if (duration != GST_CLOCK_TIME_NONE) {
+            GST_DEBUG_OBJECT (demux,
+                "Sending duration message : %" GST_TIME_FORMAT,
+                GST_TIME_ARGS (duration));
+            gst_element_post_message (GST_ELEMENT (demux),
+                gst_message_new_duration_changed (GST_OBJECT (demux)));
+          } else {
+            GST_DEBUG_OBJECT (demux,
+                "media duration unknown, can not send the duration message");
+          }
+        }
+
+        if (demux->next_streams) {
+          gst_adaptive_demux_expose_streams (demux,
+              gst_adaptive_demux_is_live (demux));
+          gst_adaptive_demux_start_tasks (demux);
+          if (gst_adaptive_demux_is_live (demux)) {
+            /* Task to periodically update the manifest */
+            gst_task_start (demux->priv->updates_task);
+          }
+        } else {
+          /* no streams */
+          GST_WARNING_OBJECT (demux, "No streams created from manifest");
+          GST_ELEMENT_ERROR (demux, STREAM, DEMUX,
+              (_("This file contains no playable streams.")),
+              ("No known stream formats found at the Manifest"));
+          ret = FALSE;
+        }
+
+      }
+      GST_MANIFEST_UNLOCK (demux);
+
+      gst_event_unref (event);
+      return ret;
+    }
+    case GST_EVENT_SEGMENT:
+      /* Swallow newsegments, we'll push our own */
+      gst_event_unref (event);
+      return TRUE;
+    default:
+      break;
+  }
+
+  return gst_pad_event_default (pad, parent, event);
+}
+
+static GstFlowReturn
+gst_adaptive_demux_sink_chain (GstPad * pad, GstObject * parent,
+    GstBuffer * buffer)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (parent);
+  gst_adapter_push (demux->priv->input_adapter, buffer);
+
+  GST_INFO_OBJECT (demux, "Received manifest buffer, total size is %i bytes",
+      (gint) gst_adapter_available (demux->priv->input_adapter));
+
+  return GST_FLOW_OK;
+}
+
+static void
+gst_adaptive_demux_reset (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  GList *iter;
+
+  gst_adaptive_demux_stop_tasks (demux);
+  gst_uri_downloader_reset (demux->downloader);
+
+  if (klass->reset)
+    klass->reset (demux);
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+    if (stream->pad)
+      gst_element_remove_pad (GST_ELEMENT_CAST (demux), stream->pad);
+    gst_adaptive_demux_stream_free (stream);
+  }
+  g_list_free (demux->streams);
+  demux->streams = NULL;
+
+  if (demux->priv->old_streams) {
+    g_list_free_full (demux->priv->old_streams,
+        (GDestroyNotify) gst_adaptive_demux_stream_free);
+    demux->priv->old_streams = NULL;
+  }
+
+  g_free (demux->manifest_uri);
+  g_free (demux->manifest_base_uri);
+  demux->manifest_uri = NULL;
+  demux->manifest_base_uri = NULL;
+
+  gst_adapter_clear (demux->priv->input_adapter);
+  demux->priv->have_manifest = FALSE;
+
+  gst_segment_init (&demux->segment, GST_FORMAT_TIME);
+
+  demux->have_group_id = FALSE;
+  demux->group_id = G_MAXUINT;
+  demux->priv->exposing = FALSE;
+  demux->priv->segment_seqnum = gst_util_seqnum_next ();
+}
+
+static void
+gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
+{
+  GstAdaptiveDemux *demux = GST_ADAPTIVE_DEMUX_CAST (bin);
+
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_ERROR:{
+      GList *iter;
+      GstAdaptiveDemuxStream *stream;
+      GError *err = NULL;
+      gchar *debug = NULL;
+      gchar *new_error = NULL;
+
+      for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+        stream = iter->data;
+        if (GST_OBJECT_CAST (stream->src) == GST_MESSAGE_SRC (msg)) {
+          gst_message_parse_error (msg, &err, &debug);
+
+          GST_WARNING_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream),
+              "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 */
+          gst_adaptive_demux_stream_fragment_download_finish (stream,
+              GST_FLOW_CUSTOM_ERROR, err);
+
+          g_error_free (err);
+          g_free (debug);
+          break;
+        }
+      }
+
+      gst_message_unref (msg);
+      msg = NULL;
+    }
+      break;
+    default:
+      break;
+  }
+
+  if (msg)
+    GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
+}
+
+void
+gst_adaptive_demux_set_stream_struct_size (GstAdaptiveDemux * demux,
+    gsize struct_size)
+{
+  demux->stream_struct_size = struct_size;
+}
+
+static gboolean
+gst_adaptive_demux_expose_stream (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstPad *pad = stream->pad;
+  gchar *name = gst_pad_get_name (pad);
+  GstEvent *event;
+  gchar *stream_id;
+
+  gst_pad_set_active (pad, TRUE);
+  stream->need_header = TRUE;
+
+  stream_id = gst_pad_create_stream_id (pad, GST_ELEMENT_CAST (demux), name);
+
+  event =
+      gst_pad_get_sticky_event (GST_ADAPTIVE_DEMUX_SINK_PAD (demux),
+      GST_EVENT_STREAM_START, 0);
+  if (event) {
+    if (gst_event_parse_group_id (event, &demux->group_id))
+      demux->have_group_id = TRUE;
+    else
+      demux->have_group_id = FALSE;
+    gst_event_unref (event);
+  } else if (!demux->have_group_id) {
+    demux->have_group_id = TRUE;
+    demux->group_id = gst_util_group_id_next ();
+  }
+  event = gst_event_new_stream_start (stream_id);
+  if (demux->have_group_id)
+    gst_event_set_group_id (event, demux->group_id);
+
+  gst_pad_push_event (pad, event);
+  g_free (stream_id);
+  g_free (name);
+
+  GST_DEBUG_OBJECT (demux, "Adding srcpad %s:%s with caps %" GST_PTR_FORMAT,
+      GST_DEBUG_PAD_NAME (pad), stream->pending_caps);
+
+  if (stream->pending_caps) {
+    gst_pad_set_caps (pad, stream->pending_caps);
+    gst_caps_unref (stream->pending_caps);
+    stream->pending_caps = NULL;
+  }
+
+  stream->download_finished = FALSE;
+  stream->discont = FALSE;
+
+  gst_object_ref (pad);
+
+  return gst_element_add_pad (GST_ELEMENT_CAST (demux), pad);
+}
+
+static GstClockTime
+gst_adaptive_demux_stream_get_presentation_offset (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemuxClass *klass;
+
+  klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->get_presentation_offset == NULL)
+    return 0;
+
+  return klass->get_presentation_offset (demux, stream);
+}
+
+static GstClockTime
+gst_adaptive_demux_get_period_start_time (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass;
+
+  klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->get_period_start_time == NULL)
+    return 0;
+
+  return klass->get_period_start_time (demux);
+}
+
+static gboolean
+gst_adaptive_demux_expose_streams (GstAdaptiveDemux * demux,
+    gboolean first_and_live)
+{
+  GList *iter;
+  GList *old_streams;
+  GstClockTime period_start, min_pts = GST_CLOCK_TIME_NONE;
+
+  g_return_val_if_fail (demux->next_streams != NULL, FALSE);
+
+  demux->priv->exposing = TRUE;
+  old_streams = demux->streams;
+  demux->streams = demux->next_streams;
+  demux->next_streams = NULL;
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+
+    if (!gst_adaptive_demux_expose_stream (demux,
+            GST_ADAPTIVE_DEMUX_STREAM_CAST (stream))) {
+      /* TODO act on error */
+    }
+
+    if (first_and_live) {
+      /* TODO we only need the first timestamp, maybe create a simple function */
+      gst_adaptive_demux_stream_update_fragment_info (demux, stream);
+
+      if (GST_CLOCK_TIME_IS_VALID (min_pts)) {
+        min_pts = MIN (min_pts, stream->fragment.timestamp);
+      } else {
+        min_pts = stream->fragment.timestamp;
+      }
+    }
+  }
+
+  /* For live streams, the subclass is supposed to seek to the current
+   * fragment and then tell us its timestamp in stream->fragment.timestamp.
+   * We now also have to seek our demuxer segment to reflect this.
+   *
+   * FIXME: This needs some refactoring at some point.
+   */
+  if (first_and_live) {
+    gst_segment_do_seek (&demux->segment, demux->segment.rate, GST_FORMAT_TIME,
+        GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, min_pts, GST_SEEK_TYPE_NONE, -1,
+        NULL);
+  }
+
+  period_start = gst_adaptive_demux_get_period_start_time (demux);
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+    GstClockTime offset;
+
+    offset = gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+    stream->segment = demux->segment;
+
+    /* The demuxer segment is just built from seek events, but for each stream
+     * we have to adjust segments according to the current period and the
+     * stream specific presentation time offset.
+     *
+     * For each period, buffer timestamps start again from 0. Additionally the
+     * buffer timestamps are shifted by the stream specific presentation time
+     * offset, so the first buffer timestamp of a period is 0 + presentation
+     * time offset. If the stream contains timestamps itself, this is also
+     * supposed to be the presentation time stored inside the stream.
+     *
+     * The stream time over periods is supposed to be continuous, that is the
+     * buffer timestamp 0 + presentation time offset should map to the start
+     * time of the current period.
+     *
+     *
+     * The adjustment of the stream segments as such works the following.
+     *
+     * If the demuxer segment start is bigger than the period start, this
+     * means that we have to drop some media at the beginning of the current
+     * period, e.g. because a seek into the middle of the period has
+     * happened. The amount of media to drop is the difference between the
+     * period start and the demuxer segment start, and as each period starts
+     * again from 0, this difference is going to be the actual stream's
+     * segment start. As all timestamps of the stream are shifted by the
+     * presentation time offset, we will also have to move the segment start
+     * by that offset.
+     *
+     * Now the running time and stream time at the stream's segment start has to
+     * be the one that is stored inside the demuxer's segment, which means
+     * that segment.base and segment.time have to be copied over.
+     *
+     *
+     * If the demuxer segment start is smaller than the period start time,
+     * this means that the whole period is inside the segment. As each period
+     * starts timestamps from 0, and additionally timestamps are shifted by
+     * the presentation time offset, the stream's first timestamp (and as such
+     * the stream's segment start) has to be the presentation time offset.
+     * The stream time at the segment start is supposed to be the stream time
+     * of the period start according to the demuxer segment, so the stream
+     * segment's time would be set to that. The same goes for the stream
+     * segment's base, which is supposed to be the running time of the period
+     * start according to the demuxer's segment.
+     *
+     *
+     * For the first case where not the complete period is inside the segment,
+     * the segment time and base as calculated by the second case would be
+     * equivalent.
+     */
+
+    if (demux->segment.start > period_start) {
+      stream->segment.start = demux->segment.start - period_start + offset;
+      stream->segment.position = offset;
+      stream->segment.time = demux->segment.time;
+      stream->segment.base = demux->segment.base;
+    } else {
+      stream->segment.start = offset;
+      stream->segment.position = offset;
+      stream->segment.time =
+          gst_segment_to_stream_time (&demux->segment, GST_FORMAT_TIME,
+          period_start);
+      stream->segment.base =
+          gst_segment_to_running_time (&demux->segment, GST_FORMAT_TIME,
+          period_start);
+    }
+
+    stream->pending_segment = gst_event_new_segment (&stream->segment);
+    gst_event_set_seqnum (stream->pending_segment, demux->priv->segment_seqnum);
+  }
+
+  gst_element_no_more_pads (GST_ELEMENT_CAST (demux));
+  demux->priv->exposing = FALSE;
+
+  if (old_streams) {
+    GstEvent *eos = gst_event_new_eos ();
+
+    for (iter = old_streams; iter; iter = g_list_next (iter)) {
+      GstAdaptiveDemuxStream *stream = iter->data;
+
+      GST_LOG_OBJECT (stream->pad, "Removing stream");
+      gst_pad_push_event (stream->pad, gst_event_ref (eos));
+      gst_pad_set_active (stream->pad, FALSE);
+      gst_element_remove_pad (GST_ELEMENT (demux), stream->pad);
+    }
+    gst_event_unref (eos);
+
+    /* The list should be freed from another thread as we can't properly
+     * cleanup a GstTask from itself */
+    GST_OBJECT_LOCK (demux);
+    demux->priv->old_streams =
+        g_list_concat (demux->priv->old_streams, old_streams);
+    GST_OBJECT_UNLOCK (demux);
+  }
+
+  return TRUE;
+}
+
+GstAdaptiveDemuxStream *
+gst_adaptive_demux_stream_new (GstAdaptiveDemux * demux, GstPad * pad)
+{
+  GstAdaptiveDemuxStream *stream;
+
+  stream = g_malloc0 (demux->stream_struct_size);
+
+  /* Downloading task */
+  g_rec_mutex_init (&stream->download_lock);
+  stream->download_task =
+      gst_task_new ((GstTaskFunction) gst_adaptive_demux_stream_download_loop,
+      stream, NULL);
+  gst_task_set_lock (stream->download_task, &stream->download_lock);
+
+  stream->pad = pad;
+  stream->demux = demux;
+  stream->fragment_bitrates =
+      g_malloc0 (sizeof (guint64) * demux->num_lookback_fragments);
+  gst_pad_set_element_private (pad, stream);
+
+  gst_pad_set_query_function (pad,
+      GST_DEBUG_FUNCPTR (gst_adaptive_demux_src_query));
+  gst_pad_set_event_function (pad,
+      GST_DEBUG_FUNCPTR (gst_adaptive_demux_src_event));
+
+  gst_segment_init (&stream->segment, GST_FORMAT_TIME);
+  g_cond_init (&stream->fragment_download_cond);
+  g_mutex_init (&stream->fragment_download_lock);
+  stream->adapter = gst_adapter_new ();
+
+  demux->next_streams = g_list_append (demux->next_streams, stream);
+
+  return stream;
+}
+
+static void
+gst_adaptive_demux_stream_free (GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->stream_free)
+    klass->stream_free (stream);
+
+  g_clear_error (&stream->last_error);
+  if (stream->download_task) {
+    if (GST_TASK_STATE (stream->download_task) != GST_TASK_STOPPED) {
+      GST_DEBUG_OBJECT (demux, "Leaving streaming task %s:%s",
+          GST_DEBUG_PAD_NAME (stream->pad));
+
+      g_cond_signal (&stream->fragment_download_cond);
+      gst_task_stop (stream->download_task);
+    }
+    GST_LOG_OBJECT (demux, "Waiting for task to finish");
+    gst_task_join (stream->download_task);
+    GST_LOG_OBJECT (demux, "Finished");
+    gst_object_unref (stream->download_task);
+    g_rec_mutex_clear (&stream->download_lock);
+    stream->download_task = NULL;
+  }
+
+  gst_adaptive_demux_stream_fragment_clear (&stream->fragment);
+
+  if (stream->pending_segment) {
+    gst_event_unref (stream->pending_segment);
+    stream->pending_segment = NULL;
+  }
+
+  if (stream->pending_events) {
+    g_list_free_full (stream->pending_events, (GDestroyNotify) gst_event_unref);
+    stream->pending_events = NULL;
+  }
+
+  if (stream->src_srcpad) {
+    gst_object_unref (stream->src_srcpad);
+    stream->src_srcpad = NULL;
+  }
+
+  if (stream->src) {
+    gst_element_set_state (stream->src, GST_STATE_NULL);
+    gst_bin_remove (GST_BIN_CAST (demux), stream->src);
+    stream->src = NULL;
+  }
+
+  g_cond_clear (&stream->fragment_download_cond);
+  g_mutex_clear (&stream->fragment_download_lock);
+
+  g_free (stream->fragment_bitrates);
+
+  if (stream->pad) {
+    gst_object_unref (stream->pad);
+    stream->pad = NULL;
+  }
+  if (stream->pending_caps)
+    gst_caps_unref (stream->pending_caps);
+
+  g_object_unref (stream->adapter);
+
+  g_free (stream);
+}
+
+static gboolean
+gst_adaptive_demux_get_live_seek_range (GstAdaptiveDemux * demux,
+    gint64 * range_start, gint64 * range_stop)
+{
+  GstAdaptiveDemuxClass *klass;
+
+  klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  g_return_val_if_fail (klass->get_live_seek_range, FALSE);
+
+  return klass->get_live_seek_range (demux, range_start, range_stop);
+}
+
+static gboolean
+gst_adaptive_demux_can_seek (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass;
+
+  klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  if (gst_adaptive_demux_is_live (demux)) {
+    return klass->get_live_seek_range != NULL;
+  }
+
+  return klass->seek != NULL;
+}
+
+static gboolean
+gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
+    GstEvent * event)
+{
+  GstAdaptiveDemux *demux;
+  GstAdaptiveDemuxClass *demux_class;
+
+  demux = GST_ADAPTIVE_DEMUX_CAST (parent);
+  demux_class = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  switch (event->type) {
+    case GST_EVENT_SEEK:
+    {
+      gdouble rate;
+      GstFormat format;
+      GstSeekFlags flags;
+      GstSeekType start_type, stop_type;
+      gint64 start, stop;
+      guint32 seqnum;
+      gboolean update;
+      gboolean ret = TRUE;
+      GstSegment oldsegment;
+
+      GST_INFO_OBJECT (demux, "Received seek event");
+
+      GST_MANIFEST_LOCK (demux);
+      if (!gst_adaptive_demux_can_seek (demux)) {
+        GST_MANIFEST_UNLOCK (demux);
+        gst_event_unref (event);
+        return FALSE;
+      }
+      GST_MANIFEST_UNLOCK (demux);
+
+      gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
+          &stop_type, &stop);
+
+      if (format != GST_FORMAT_TIME) {
+        gst_event_unref (event);
+        return FALSE;
+      }
+
+      if (gst_adaptive_demux_is_live (demux)) {
+        gint64 range_start, range_stop;
+        if (!gst_adaptive_demux_get_live_seek_range (demux, &range_start,
+                &range_stop)) {
+          gst_event_unref (event);
+          return FALSE;
+        }
+        if (start < range_start || start >= range_stop) {
+          GST_WARNING_OBJECT (demux, "Seek to invalid position");
+          gst_event_unref (event);
+          return FALSE;
+        }
+      }
+
+      seqnum = gst_event_get_seqnum (event);
+
+      GST_DEBUG_OBJECT (demux,
+          "seek event, rate: %f type: %d start: %" GST_TIME_FORMAT " stop: %"
+          GST_TIME_FORMAT, rate, start_type, GST_TIME_ARGS (start),
+          GST_TIME_ARGS (stop));
+
+      /* have a backup in case seek fails */
+      gst_segment_copy_into (&demux->segment, &oldsegment);
+
+      gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
+          start, stop_type, stop, &update);
+
+      if (flags & GST_SEEK_FLAG_FLUSH) {
+        GstEvent *fevent;
+
+        GST_DEBUG_OBJECT (demux, "sending flush start");
+        fevent = gst_event_new_flush_start ();
+        gst_event_set_seqnum (fevent, seqnum);
+        gst_adaptive_demux_push_src_event (demux, fevent);
+      }
+      gst_adaptive_demux_stop_tasks (demux);
+      GST_DEBUG_OBJECT (demux, "Seeking to segment %" GST_SEGMENT_FORMAT,
+          &demux->segment);
+
+      GST_MANIFEST_LOCK (demux);
+      ret = demux_class->seek (demux, event);
+
+      if (!ret) {
+        /* Is there anything else we can do if it fails? */
+        gst_segment_copy_into (&oldsegment, &demux->segment);
+      } else {
+        demux->priv->segment_seqnum = seqnum;
+      }
+
+      if (flags & GST_SEEK_FLAG_FLUSH) {
+        GstEvent *fevent;
+
+        GST_DEBUG_OBJECT (demux, "Sending flush stop on all pad");
+        fevent = gst_event_new_flush_stop (TRUE);
+        gst_event_set_seqnum (fevent, seqnum);
+        gst_adaptive_demux_push_src_event (demux, fevent);
+      }
+
+      if (demux->next_streams) {
+        gst_adaptive_demux_expose_streams (demux, FALSE);
+      } else {
+        GList *iter;
+        GstClockTime period_start =
+            gst_adaptive_demux_get_period_start_time (demux);
+
+        for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+          GstAdaptiveDemuxStream *stream = iter->data;
+          GstEvent *seg_evt;
+          GstClockTime offset;
+
+          /* See comments in gst_adaptive_demux_get_period_start_time() for
+           * an explanation of the segment modifications */
+          stream->segment = demux->segment;
+          offset =
+              gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+          stream->segment.start += offset - period_start;
+          stream->segment.position = stream->segment.start;
+          seg_evt = gst_event_new_segment (&stream->segment);
+          gst_event_set_seqnum (seg_evt, demux->priv->segment_seqnum);
+          gst_event_replace (&stream->pending_segment, seg_evt);
+          gst_event_unref (seg_evt);
+        }
+      }
+
+      /* Restart the demux */
+      gst_adaptive_demux_start_tasks (demux);
+      GST_MANIFEST_UNLOCK (demux);
+
+      gst_event_unref (event);
+      return ret;
+    }
+    case GST_EVENT_RECONFIGURE:{
+      GList *iter;
+
+      /* When exposing pads reconfigure events are received as result
+       * of the linking of the pads. The exposing and reconfigure happens
+       * from the same thread. This prevents a deadlock and, although
+       * not beautiful, makes this safe by avoiding that the demux->streams
+       * list gets modified while this loop is running */
+      if (!demux->priv->exposing)
+        GST_MANIFEST_LOCK (demux);
+
+      for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+        GstAdaptiveDemuxStream *stream = iter->data;
+
+        if (stream->pad == pad) {
+          g_mutex_lock (&stream->fragment_download_lock);
+          if (stream->last_ret == GST_FLOW_NOT_LINKED) {
+            stream->last_ret = GST_FLOW_OK;
+            stream->restart_download = TRUE;
+            stream->need_header = TRUE;
+            stream->discont = TRUE;
+            GST_DEBUG_OBJECT (stream->pad, "Restarting download loop");
+            gst_task_start (stream->download_task);
+          }
+          g_mutex_unlock (&stream->fragment_download_lock);
+          gst_event_unref (event);
+          if (!demux->priv->exposing)
+            GST_MANIFEST_UNLOCK (demux);
+          return TRUE;
+        }
+      }
+      if (!demux->priv->exposing)
+        GST_MANIFEST_UNLOCK (demux);
+    }
+      break;
+    case GST_EVENT_LATENCY:{
+      /* Upstream and our internal source are irrelevant
+       * for latency, and we should not fail here to
+       * configure the latency */
+      gst_event_unref (event);
+      return TRUE;
+    }
+    default:
+      break;
+  }
+
+  return gst_pad_event_default (pad, parent, event);
+}
+
+static gboolean
+gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
+    GstQuery * query)
+{
+  GstAdaptiveDemux *demux;
+  GstAdaptiveDemuxClass *demux_class;
+  gboolean ret = FALSE;
+
+  if (query == NULL)
+    return FALSE;
+
+  demux = GST_ADAPTIVE_DEMUX_CAST (parent);
+  demux_class = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  switch (query->type) {
+    case GST_QUERY_DURATION:{
+      GstClockTime duration = -1;
+      GstFormat fmt;
+
+      GST_MANIFEST_LOCK (demux);
+      gst_query_parse_duration (query, &fmt, NULL);
+      if (fmt == GST_FORMAT_TIME && demux->priv->have_manifest
+          && !gst_adaptive_demux_is_live (demux)) {
+        duration = demux_class->get_duration (demux);
+
+        if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0) {
+          gst_query_set_duration (query, GST_FORMAT_TIME, duration);
+          ret = TRUE;
+        }
+      }
+      GST_MANIFEST_UNLOCK (demux);
+      GST_LOG_OBJECT (demux, "GST_QUERY_DURATION returns %s with duration %"
+          GST_TIME_FORMAT, ret ? "TRUE" : "FALSE", GST_TIME_ARGS (duration));
+      break;
+    }
+    case GST_QUERY_LATENCY:{
+      gst_query_set_latency (query, FALSE, 0, -1);
+      ret = TRUE;
+      break;
+    }
+    case GST_QUERY_SEEKING:{
+      GstFormat fmt;
+      gint64 stop = -1;
+      gint64 start = 0;
+
+      GST_MANIFEST_LOCK (demux);
+      if (!demux->priv->have_manifest) {
+        GST_MANIFEST_UNLOCK (demux);
+        GST_INFO_OBJECT (demux,
+            "Don't have manifest yet, can't answer seeking query");
+        return FALSE;           /* can't answer without manifest */
+      }
+
+      gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
+      GST_INFO_OBJECT (demux, "Received GST_QUERY_SEEKING with format %d", fmt);
+      if (fmt == GST_FORMAT_TIME) {
+        GstClockTime duration;
+        gboolean can_seek = gst_adaptive_demux_can_seek (demux);
+
+        ret = TRUE;
+        if (can_seek) {
+          if (gst_adaptive_demux_is_live (demux)) {
+            ret = gst_adaptive_demux_get_live_seek_range (demux, &start, &stop);
+          } else {
+            duration = demux_class->get_duration (demux);
+            if (GST_CLOCK_TIME_IS_VALID (duration) && duration > 0)
+              stop = duration;
+          }
+        }
+        gst_query_set_seeking (query, fmt, can_seek, start, stop);
+        GST_INFO_OBJECT (demux, "GST_QUERY_SEEKING returning with start : %"
+            GST_TIME_FORMAT ", stop : %" GST_TIME_FORMAT,
+            GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
+      }
+      GST_MANIFEST_UNLOCK (demux);
+      break;
+    }
+    case GST_QUERY_URI:
+      /* TODO HLS can answer this differently it seems */
+      GST_MANIFEST_LOCK (demux);
+      if (demux->manifest_uri) {
+        /* FIXME: (hls) Do we answer with the variant playlist, with the current
+         * playlist or the the uri of the last downlowaded fragment? */
+        gst_query_set_uri (query, demux->manifest_uri);
+        ret = TRUE;
+      }
+      GST_MANIFEST_UNLOCK (demux);
+      break;
+    default:
+      /* Don't forward queries upstream because of the special nature of this
+       *  "demuxer", which relies on the upstream element only to be fed
+       *  the Manifest
+       */
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_adaptive_demux_start_tasks (GstAdaptiveDemux * demux)
+{
+  GList *iter;
+
+  GST_INFO_OBJECT (demux, "Starting streams' tasks");
+  demux->cancelled = FALSE;
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+    stream->last_ret = GST_FLOW_OK;
+    gst_task_start (stream->download_task);
+  }
+}
+
+static void
+gst_adaptive_demux_stop_tasks (GstAdaptiveDemux * demux)
+{
+  GList *iter;
+
+  demux->cancelled = TRUE;
+
+  demux->priv->stop_updates_task = TRUE;
+  gst_task_stop (demux->priv->updates_task);
+  g_cond_signal (&demux->priv->updates_timed_cond);
+
+  GST_MANIFEST_LOCK (demux);
+  g_cond_broadcast (&demux->manifest_cond);
+  GST_MANIFEST_UNLOCK (demux);
+
+  gst_uri_downloader_cancel (demux->downloader);
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+
+    gst_task_stop (stream->download_task);
+    if (stream->src)
+      gst_element_set_state (stream->src, GST_STATE_READY);
+    g_mutex_lock (&stream->fragment_download_lock);
+    stream->download_finished = TRUE;
+    g_cond_signal (&stream->fragment_download_cond);
+    g_mutex_unlock (&stream->fragment_download_lock);
+  }
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+
+    gst_task_join (stream->download_task);
+    stream->download_error_count = 0;
+    stream->need_header = TRUE;
+    gst_adapter_clear (stream->adapter);
+  }
+  gst_task_join (demux->priv->updates_task);
+}
+
+static gboolean
+gst_adaptive_demux_push_src_event (GstAdaptiveDemux * demux, GstEvent * event)
+{
+  GList *iter;
+  gboolean ret = TRUE;
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+    gst_event_ref (event);
+    ret = ret & gst_pad_push_event (stream->pad, event);
+  }
+  gst_event_unref (event);
+  return ret;
+}
+
+void
+gst_adaptive_demux_stream_set_caps (GstAdaptiveDemuxStream * stream,
+    GstCaps * caps)
+{
+  GST_DEBUG_OBJECT (stream->pad, "setting new caps for stream %" GST_PTR_FORMAT,
+      caps);
+  gst_caps_replace (&stream->pending_caps, caps);
+  gst_caps_unref (caps);
+}
+
+void
+gst_adaptive_demux_stream_set_tags (GstAdaptiveDemuxStream * stream,
+    GstTagList * tags)
+{
+  GST_DEBUG_OBJECT (stream->pad, "setting new tags for stream %" GST_PTR_FORMAT,
+      tags);
+  if (stream->pending_tags) {
+    gst_tag_list_unref (stream->pending_tags);
+  }
+  stream->pending_tags = tags;
+}
+
+void
+gst_adaptive_demux_stream_queue_event (GstAdaptiveDemuxStream * stream,
+    GstEvent * event)
+{
+  stream->pending_events = g_list_append (stream->pending_events, event);
+}
+
+static guint64
+_update_average_bitrate (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, guint64 new_bitrate)
+{
+  gint index = stream->moving_index % demux->num_lookback_fragments;
+
+  stream->moving_bitrate -= stream->fragment_bitrates[index];
+  stream->fragment_bitrates[index] = new_bitrate;
+  stream->moving_bitrate += new_bitrate;
+
+  stream->moving_index += 1;
+
+  if (stream->moving_index > demux->num_lookback_fragments)
+    return stream->moving_bitrate / demux->num_lookback_fragments;
+  return stream->moving_bitrate / stream->moving_index;
+}
+
+static guint64
+gst_adaptive_demux_stream_update_current_bitrate (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  guint64 average_bitrate;
+  guint64 fragment_bitrate;
+
+  fragment_bitrate =
+      (stream->fragment_total_size * 8) /
+      ((double) stream->fragment_total_time / G_GUINT64_CONSTANT (1000000));
+  stream->fragment_total_size = 0;
+  stream->fragment_total_time = 0;
+
+  average_bitrate = _update_average_bitrate (demux, stream, fragment_bitrate);
+
+  GST_INFO_OBJECT (stream, "last fragment bitrate was %" G_GUINT64_FORMAT,
+      fragment_bitrate);
+  GST_INFO_OBJECT (stream,
+      "Last %u fragments average bitrate is %" G_GUINT64_FORMAT,
+      demux->num_lookback_fragments, average_bitrate);
+
+  /* Conservative approach, make sure we don't upgrade too fast */
+  stream->current_download_rate = MIN (average_bitrate, fragment_bitrate);
+
+  if (demux->connection_speed) {
+    GST_LOG_OBJECT (demux, "Connection-speed is set to %u kbps, using it",
+        demux->connection_speed / 1000);
+    return demux->connection_speed;
+  }
+
+  stream->current_download_rate *= demux->bitrate_limit;
+  GST_DEBUG_OBJECT (demux, "Bitrate after bitrate limit (%0.2f): %"
+      G_GUINT64_FORMAT, demux->bitrate_limit, stream->current_download_rate);
+
+  return stream->current_download_rate;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_combine_flows (GstAdaptiveDemux * demux)
+{
+  gboolean all_notlinked = TRUE;
+  gboolean all_eos = TRUE;
+  GList *iter;
+
+  for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+    GstAdaptiveDemuxStream *stream = iter->data;
+
+    g_mutex_lock (&stream->fragment_download_lock);
+    if (stream->last_ret != GST_FLOW_NOT_LINKED) {
+      all_notlinked = FALSE;
+      if (stream->last_ret != GST_FLOW_EOS)
+        all_eos = FALSE;
+    }
+
+    if (stream->last_ret <= GST_FLOW_NOT_NEGOTIATED
+        || stream->last_ret == GST_FLOW_FLUSHING) {
+      g_mutex_unlock (&stream->fragment_download_lock);
+      return stream->last_ret;
+    }
+    g_mutex_unlock (&stream->fragment_download_lock);
+  }
+  if (all_notlinked)
+    return GST_FLOW_NOT_LINKED;
+  else if (all_eos)
+    return GST_FLOW_EOS;
+  return GST_FLOW_OK;
+}
+
+GstFlowReturn
+gst_adaptive_demux_stream_push_buffer (GstAdaptiveDemuxStream * stream,
+    GstBuffer * buffer)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+  GstFlowReturn ret = GST_FLOW_OK;
+  gboolean discont = FALSE;
+
+  if (stream->first_fragment_buffer) {
+    GstClockTime offset =
+        gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+    GstClockTime period_start =
+        gst_adaptive_demux_get_period_start_time (demux);
+
+    if (demux->segment.rate < 0)
+      /* Set DISCONT flag for every first buffer in reverse playback mode
+       * as each fragment for its own has to be reversed */
+      discont = TRUE;
+
+    GST_BUFFER_PTS (buffer) = stream->fragment.timestamp;
+    if (GST_BUFFER_PTS_IS_VALID (buffer))
+      GST_BUFFER_PTS (buffer) += offset;
+
+    if (GST_BUFFER_PTS_IS_VALID (buffer)) {
+      stream->segment.position = GST_BUFFER_PTS (buffer);
+
+      /* Convert from position inside the stream's segment to the demuxer's
+       * segment, they are not necessarily the same */
+      if (stream->segment.position - offset + period_start >
+          demux->segment.position)
+        demux->segment.position =
+            stream->segment.position - offset + period_start;
+    }
+  } else {
+    GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
+  }
+
+  if (stream->discont) {
+    discont = TRUE;
+    stream->discont = FALSE;
+  }
+
+  if (discont) {
+    GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous");
+    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
+  } else {
+    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
+  }
+
+  stream->first_fragment_buffer = FALSE;
+
+  GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
+  GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
+
+  if (G_UNLIKELY (stream->pending_caps)) {
+    GST_DEBUG_OBJECT (stream->pad, "Setting pending caps: %" GST_PTR_FORMAT,
+        stream->pending_caps);
+    gst_pad_set_caps (stream->pad, stream->pending_caps);
+    gst_caps_unref (stream->pending_caps);
+    stream->pending_caps = NULL;
+  }
+  if (G_UNLIKELY (stream->pending_segment)) {
+    GST_DEBUG_OBJECT (stream->pad, "Sending pending seg: %" GST_PTR_FORMAT,
+        stream->pending_segment);
+    gst_pad_push_event (stream->pad, stream->pending_segment);
+    stream->pending_segment = NULL;
+  }
+  if (G_UNLIKELY (stream->pending_tags)) {
+    GST_DEBUG_OBJECT (stream->pad, "Sending pending tags: %" GST_PTR_FORMAT,
+        stream->pending_tags);
+    gst_pad_push_event (stream->pad, gst_event_new_tag (stream->pending_tags));
+    stream->pending_tags = NULL;
+  }
+  while (stream->pending_events != NULL) {
+    GstEvent *event = stream->pending_events->data;
+
+    if (!gst_pad_push_event (stream->pad, event))
+      GST_ERROR_OBJECT (stream->pad, "Failed to send pending event");
+
+    stream->pending_events =
+        g_list_delete_link (stream->pending_events, stream->pending_events);
+  }
+
+  ret = gst_pad_push (stream->pad, buffer);
+  GST_LOG_OBJECT (stream->pad, "Push result: %d %s", ret,
+      gst_flow_get_name (ret));
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_finish_fragment_default (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  /* No need to advance, this isn't a real fragment */
+  if (G_UNLIKELY (stream->downloading_header || stream->downloading_index))
+    return GST_FLOW_OK;
+
+  return gst_adaptive_demux_stream_advance_fragment (demux, stream,
+      stream->fragment.duration);
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_data_received_default (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstBuffer *buffer;
+
+  buffer = gst_adapter_take_buffer (stream->adapter,
+      gst_adapter_available (stream->adapter));
+  return gst_adaptive_demux_stream_push_buffer (stream, buffer);
+}
+
+static GstFlowReturn
+_src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstPad *srcpad = (GstPad *) parent;
+  GstAdaptiveDemuxStream *stream = gst_pad_get_element_private (srcpad);
+  GstAdaptiveDemux *demux = stream->demux;
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  if (stream->starting_fragment) {
+    GstClockTime offset =
+        gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+    GstClockTime period_start =
+        gst_adaptive_demux_get_period_start_time (demux);
+
+    stream->starting_fragment = FALSE;
+    if (klass->start_fragment) {
+      klass->start_fragment (demux, stream);
+    }
+
+    GST_BUFFER_PTS (buffer) = stream->fragment.timestamp;
+    if (GST_BUFFER_PTS_IS_VALID (buffer))
+      GST_BUFFER_PTS (buffer) += offset;
+
+    GST_LOG_OBJECT (stream->pad, "set fragment pts=%" GST_TIME_FORMAT,
+        GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
+
+    if (GST_BUFFER_PTS_IS_VALID (buffer)) {
+      stream->segment.position = GST_BUFFER_PTS (buffer);
+
+      /* Convert from position inside the stream's segment to the demuxer's
+       * segment, they are not necessarily the same */
+      if (stream->segment.position - offset + period_start >
+          demux->segment.position)
+        demux->segment.position =
+            stream->segment.position - offset + period_start;
+    }
+
+  } else {
+    GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
+  }
+
+  stream->download_total_time +=
+      g_get_monotonic_time () - stream->download_chunk_start_time;
+  stream->download_total_bytes += gst_buffer_get_size (buffer);
+
+  stream->fragment_total_size += gst_buffer_get_size (buffer);
+  stream->fragment_total_time +=
+      g_get_monotonic_time () - stream->download_chunk_start_time;
+
+  gst_adapter_push (stream->adapter, buffer);
+  GST_DEBUG_OBJECT (stream->pad, "Received buffer of size %" G_GSIZE_FORMAT
+      ". Now %" G_GSIZE_FORMAT " on adapter", gst_buffer_get_size (buffer),
+      gst_adapter_available (stream->adapter));
+  ret = klass->data_received (demux, stream);
+  stream->download_chunk_start_time = g_get_monotonic_time ();
+
+  if (ret != GST_FLOW_OK) {
+    if (ret < GST_FLOW_EOS) {
+      GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
+          ("stream stopped, reason %s", gst_flow_get_name (ret)));
+
+      /* TODO push this on all pads */
+      gst_pad_push_event (stream->pad, gst_event_new_eos ());
+    } else {
+      GST_DEBUG_OBJECT (stream->pad, "stream stopped, reason %s",
+          gst_flow_get_name (ret));
+    }
+
+    gst_adaptive_demux_stream_fragment_download_finish (stream, ret, NULL);
+    if (ret == (GstFlowReturn) GST_ADAPTIVE_DEMUX_FLOW_SWITCH)
+      ret = GST_FLOW_EOS;       /* return EOS to make the source stop */
+  }
+
+  return ret;
+}
+
+static void
+gst_adaptive_demux_stream_fragment_download_finish (GstAdaptiveDemuxStream *
+    stream, GstFlowReturn ret, GError * err)
+{
+  g_mutex_lock (&stream->fragment_download_lock);
+  stream->download_finished = TRUE;
+
+  GST_DEBUG_OBJECT (stream->pad, "Download finish: %d %s - err: %p", ret,
+      gst_flow_get_name (ret), err);
+
+  /* if we have an error, only replace last_ret if it was OK before to avoid
+   * overwriting the first error we got */
+  if (stream->last_ret == GST_FLOW_OK) {
+    stream->last_ret = ret;
+    if (err) {
+      g_clear_error (&stream->last_error);
+      stream->last_error = g_error_copy (err);
+    }
+  }
+  g_cond_signal (&stream->fragment_download_cond);
+  g_mutex_unlock (&stream->fragment_download_lock);
+}
+
+static gboolean
+_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  GstPad *srcpad = GST_PAD_CAST (parent);
+  GstAdaptiveDemuxStream *stream = gst_pad_get_element_private (srcpad);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_EOS:{
+      GstAdaptiveDemuxClass *klass;
+      GstFlowReturn ret;
+
+      klass = GST_ADAPTIVE_DEMUX_GET_CLASS (stream->demux);
+      ret = klass->finish_fragment (stream->demux, stream);
+      gst_adaptive_demux_stream_fragment_download_finish (stream, ret, NULL);
+      break;
+    }
+    default:
+      break;
+  }
+
+  gst_event_unref (event);
+
+  return TRUE;
+}
+
+static gboolean
+_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ALLOCATION:
+      return FALSE;
+      break;
+    default:
+      break;
+  }
+
+  return gst_pad_query_default (pad, parent, query);
+}
+
+static gboolean
+gst_adaptive_demux_stream_wait_manifest_update (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  gboolean ret = TRUE;
+
+  /* Wait until we're cancelled or there's something for
+   * us to download in the playlist or the playlist
+   * became non-live */
+  while (TRUE) {
+    if (demux->cancelled) {
+      ret = FALSE;
+      break;
+    }
+
+    GST_DEBUG_OBJECT (demux, "No fragment left but live playlist, wait a bit");
+    g_cond_wait (&demux->manifest_cond, GST_MANIFEST_GET_LOCK (demux));
+
+    /* Got a new fragment or not live anymore? */
+    if (gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
+      GST_DEBUG_OBJECT (demux, "new fragment available, "
+          "not waiting for manifest update");
+      ret = TRUE;
+      break;
+    }
+
+    if (!gst_adaptive_demux_is_live (demux)) {
+      GST_DEBUG_OBJECT (demux, "Not live anymore, "
+          "not waiting for manifest update");
+      ret = FALSE;
+      break;
+    }
+  }
+  GST_DEBUG_OBJECT (demux, "Retrying now");
+  return ret;
+}
+
+static gboolean
+_adaptive_demux_pad_remove_eos_sticky (GstPad * pad, GstEvent ** event,
+    gpointer udata)
+{
+  if (GST_EVENT_TYPE (*event) == GST_EVENT_EOS) {
+    gst_event_replace (event, NULL);
+    return FALSE;
+  }
+  return TRUE;
+}
+
+static void
+gst_adaptive_demux_stream_clear_eos_and_flush_state (GstAdaptiveDemuxStream *
+    stream)
+{
+  GstPad *internal_pad;
+
+  internal_pad =
+      GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (stream->pad)));
+  gst_pad_sticky_events_foreach (internal_pad,
+      _adaptive_demux_pad_remove_eos_sticky, NULL);
+  GST_OBJECT_FLAG_UNSET (internal_pad, GST_PAD_FLAG_EOS);
+  /* In case the stream is recovering from a flushing seek it is also needed
+   * to remove the flushing state from this pad. The flushing state is set
+   * because of the flow return propagating until the source element */
+  GST_PAD_UNSET_FLUSHING (internal_pad);
+
+  gst_object_unref (internal_pad);
+}
+
+static gboolean
+gst_adaptive_demux_stream_update_source (GstAdaptiveDemuxStream * stream,
+    const gchar * uri, const gchar * referer, gboolean refresh,
+    gboolean allow_cache)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+
+  if (!gst_uri_is_valid (uri)) {
+    GST_WARNING_OBJECT (stream->pad, "Invalid URI: %s", uri);
+    return FALSE;
+  }
+
+  if (stream->src != NULL) {
+    gchar *old_protocol, *new_protocol;
+    gchar *old_uri;
+
+    old_uri = gst_uri_handler_get_uri (GST_URI_HANDLER (stream->src));
+    old_protocol = gst_uri_get_protocol (old_uri);
+    new_protocol = gst_uri_get_protocol (uri);
+
+    if (!g_str_equal (old_protocol, new_protocol)) {
+      gst_object_unref (stream->src_srcpad);
+      gst_element_set_state (stream->src, GST_STATE_NULL);
+      gst_bin_remove (GST_BIN_CAST (demux), stream->src);
+      stream->src = NULL;
+      stream->src_srcpad = NULL;
+      GST_DEBUG_OBJECT (demux, "Can't re-use old source element");
+    } else {
+      GError *err = NULL;
+
+      GST_DEBUG_OBJECT (demux, "Re-using old source element");
+      if (!gst_uri_handler_set_uri (GST_URI_HANDLER (stream->src), uri, &err)) {
+        GST_DEBUG_OBJECT (demux, "Failed to re-use old source element: %s",
+            err->message);
+        g_clear_error (&err);
+        gst_object_unref (stream->src_srcpad);
+        gst_element_set_state (stream->src, GST_STATE_NULL);
+        gst_bin_remove (GST_BIN_CAST (demux), stream->src);
+        stream->src = NULL;
+        stream->src_srcpad = NULL;
+      }
+    }
+    g_free (old_uri);
+    g_free (old_protocol);
+    g_free (new_protocol);
+  }
+
+  if (stream->src == NULL) {
+    GObjectClass *gobject_class;
+    GstPad *internal_pad;
+
+    stream->src = gst_element_make_from_uri (GST_URI_SRC, uri, NULL, NULL);
+    if (stream->src == NULL) {
+      GST_ELEMENT_ERROR (demux, CORE, MISSING_PLUGIN,
+          ("Missing plugin to handle URI: '%s'", uri), (NULL));
+      return FALSE;
+    }
+
+    gobject_class = G_OBJECT_GET_CLASS (stream->src);
+
+    if (g_object_class_find_property (gobject_class, "compress"))
+      g_object_set (stream->src, "compress", FALSE, NULL);
+    if (g_object_class_find_property (gobject_class, "keep-alive"))
+      g_object_set (stream->src, "keep-alive", TRUE, NULL);
+    if (g_object_class_find_property (gobject_class, "extra-headers")) {
+      if (referer || refresh || !allow_cache) {
+        GstStructure *extra_headers = gst_structure_new_empty ("headers");
+
+        if (referer)
+          gst_structure_set (extra_headers, "Referer", G_TYPE_STRING, referer,
+              NULL);
+
+        if (!allow_cache)
+          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
+              "no-cache", NULL);
+        else if (refresh)
+          gst_structure_set (extra_headers, "Cache-Control", G_TYPE_STRING,
+              "max-age=0", NULL);
+
+        g_object_set (stream->src, "extra-headers", extra_headers, NULL);
+
+        gst_structure_free (extra_headers);
+      } else {
+        g_object_set (stream->src, "extra-headers", NULL, NULL);
+      }
+    }
+
+    gst_element_set_locked_state (stream->src, TRUE);
+    gst_bin_add (GST_BIN_CAST (demux), stream->src);
+    stream->src_srcpad = gst_element_get_static_pad (stream->src, "src");
+
+    gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (stream->pad),
+        stream->src_srcpad);
+
+    /* set up our internal pad to drop all events from
+     * the http src we don't care about. On the chain function
+     * we just push the buffer forward, but this way dash can get
+     * the flow return from downstream */
+    internal_pad =
+        GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (stream->pad)));
+    gst_pad_set_chain_function (GST_PAD_CAST (internal_pad), _src_chain);
+    gst_pad_set_event_function (GST_PAD_CAST (internal_pad), _src_event);
+    /* need to set query otherwise deadlocks happen with allocation queries */
+    gst_pad_set_query_function (GST_PAD_CAST (internal_pad), _src_query);
+    gst_object_unref (internal_pad);
+  }
+  return TRUE;
+}
+
+/* must be called with the stream's fragment_download_lock */
+static GstFlowReturn
+gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, const gchar * uri, gint64 start,
+    gint64 end)
+{
+  GstFlowReturn ret = GST_FLOW_OK;
+  GST_DEBUG_OBJECT (stream->pad, "Downloading uri: %s, range:%" G_GINT64_FORMAT
+      " - %" G_GINT64_FORMAT, uri, start, end);
+
+  stream->download_finished = FALSE;
+
+  if (!gst_adaptive_demux_stream_update_source (stream, uri, NULL, FALSE, TRUE)) {
+    g_mutex_lock (&stream->fragment_download_lock);
+    ret = stream->last_ret = GST_FLOW_ERROR;
+    g_mutex_unlock (&stream->fragment_download_lock);
+    return ret;
+  }
+
+  if (gst_element_set_state (stream->src,
+          GST_STATE_READY) != GST_STATE_CHANGE_FAILURE) {
+    if (start != 0 || end != -1) {
+      if (!gst_element_send_event (stream->src, gst_event_new_seek (1.0,
+                  GST_FORMAT_BYTES, (GstSeekFlags) GST_SEEK_FLAG_FLUSH,
+                  GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, end))) {
+
+        /* looks like the source can't handle seeks in READY */
+        g_clear_error (&stream->last_error);
+        stream->last_error = g_error_new (GST_CORE_ERROR,
+            GST_CORE_ERROR_NOT_IMPLEMENTED,
+            "Source element can't handle range requests");
+        stream->last_ret = GST_FLOW_ERROR;
+      }
+    }
+
+    g_mutex_lock (&stream->fragment_download_lock);
+    if (G_LIKELY (stream->last_ret == GST_FLOW_OK)) {
+      stream->download_start_time = g_get_monotonic_time ();
+      stream->download_chunk_start_time = g_get_monotonic_time ();
+      g_mutex_unlock (&stream->fragment_download_lock);
+      gst_element_sync_state_with_parent (stream->src);
+      g_mutex_lock (&stream->fragment_download_lock);
+
+      /* wait for the fragment to be completely downloaded */
+      GST_DEBUG_OBJECT (stream->pad,
+          "Waiting for fragment download to finish: %s", uri);
+      while (!stream->demux->cancelled && !stream->download_finished) {
+        g_cond_wait (&stream->fragment_download_cond,
+            &stream->fragment_download_lock);
+      }
+      ret = stream->last_ret;
+
+      GST_DEBUG_OBJECT (stream->pad, "Fragment download finished: %s %d %s",
+          uri, stream->last_ret, gst_flow_get_name (stream->last_ret));
+    }
+    g_mutex_unlock (&stream->fragment_download_lock);
+  } else {
+    g_mutex_lock (&stream->fragment_download_lock);
+    if (stream->last_ret == GST_FLOW_OK)
+      stream->last_ret = GST_FLOW_CUSTOM_ERROR;
+    ret = GST_FLOW_CUSTOM_ERROR;
+    g_mutex_unlock (&stream->fragment_download_lock);
+  }
+
+  /* flush the proxypads so that the EOS state is reset */
+  gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_start ());
+  gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_stop (TRUE));
+
+  gst_element_set_state (stream->src, GST_STATE_READY);
+  gst_adaptive_demux_stream_clear_eos_and_flush_state (stream);
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_download_header_fragment (GstAdaptiveDemuxStream *
+    stream)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  if (stream->fragment.header_uri != NULL) {
+    GST_DEBUG_OBJECT (demux, "Fetching header %s %" G_GINT64_FORMAT "-%"
+        G_GINT64_FORMAT, stream->fragment.header_uri,
+        stream->fragment.header_range_start, stream->fragment.header_range_end);
+
+    stream->downloading_header = TRUE;
+    ret = gst_adaptive_demux_stream_download_uri (demux, stream,
+        stream->fragment.header_uri, stream->fragment.header_range_start,
+        stream->fragment.header_range_end);
+    stream->downloading_header = FALSE;
+  }
+
+  /* check if we have an index */
+  if (!demux->cancelled && ret == GST_FLOW_OK) {        /* TODO check for other valid types */
+
+    if (stream->fragment.index_uri != NULL) {
+      GST_DEBUG_OBJECT (demux,
+          "Fetching index %s %" G_GINT64_FORMAT "-%" G_GINT64_FORMAT,
+          stream->fragment.index_uri,
+          stream->fragment.index_range_start, stream->fragment.index_range_end);
+      stream->downloading_index = TRUE;
+      ret = gst_adaptive_demux_stream_download_uri (demux, stream,
+          stream->fragment.index_uri, stream->fragment.index_range_start,
+          stream->fragment.index_range_end);
+      stream->downloading_index = FALSE;
+    }
+  }
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_download_fragment (GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+  gchar *url = NULL;
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  g_mutex_lock (&stream->fragment_download_lock);
+  stream->starting_fragment = TRUE;
+  stream->last_ret = GST_FLOW_OK;
+  stream->first_fragment_buffer = TRUE;
+  g_mutex_unlock (&stream->fragment_download_lock);
+
+  if (stream->fragment.uri == NULL && stream->fragment.header_uri == NULL &&
+      stream->fragment.index_uri == NULL)
+    goto no_url_error;
+
+  if (stream->need_header) {
+    ret = gst_adaptive_demux_stream_download_header_fragment (stream);
+    stream->need_header = FALSE;
+    if (ret != GST_FLOW_OK) {
+      return ret;
+    }
+  }
+
+  url = stream->fragment.uri;
+  GST_DEBUG_OBJECT (stream->pad, "Got url '%s' for stream %p", url, stream);
+  if (url) {
+    ret =
+        gst_adaptive_demux_stream_download_uri (demux, stream, url,
+        stream->fragment.range_start, stream->fragment.range_end);
+    GST_DEBUG_OBJECT (stream->pad, "Fragment download result: %d %s",
+        stream->last_ret, gst_flow_get_name (stream->last_ret));
+    if (ret != GST_FLOW_OK) {
+      /* TODO check if we are truly stoping */
+      if (ret == GST_FLOW_CUSTOM_ERROR && gst_adaptive_demux_is_live (demux)) {
+        if (++stream->download_error_count <= MAX_DOWNLOAD_ERROR_COUNT) {
+          /* looks like there is no way of knowing when a live stream has ended
+           * Have to assume we are falling behind and cause a manifest reload */
+          GST_DEBUG_OBJECT (stream->pad,
+              "Converting error of live stream to EOS");
+          return GST_FLOW_EOS;
+        }
+      } else if (ret == GST_FLOW_CUSTOM_ERROR
+          && !gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
+        /* If this is the last fragment, consider failures EOS and not actual
+         * errors. Due to rounding errors in the durations, the last fragment
+         * might not actually exist */
+        GST_DEBUG_OBJECT (stream->pad,
+            "Converting error for last fragment to EOS");
+        return GST_FLOW_EOS;
+      }
+    }
+  }
+
+  return ret;
+
+no_url_error:
+  {
+    GST_ELEMENT_ERROR (demux, STREAM, DEMUX,
+        (_("Failed to get fragment URL.")),
+        ("An error happened when getting fragment URL"));
+    gst_task_stop (stream->download_task);
+    return GST_FLOW_ERROR;
+  }
+}
+
+static void
+gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemux *demux = stream->demux;
+  guint64 next_download = 0;
+  GstFlowReturn ret;
+  gboolean live;
+
+  GST_LOG_OBJECT (stream->pad, "download loop start");
+
+  /* Check if we're done with our segment */
+  if (demux->segment.rate > 0) {
+    if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop)
+        && stream->segment.position >= stream->segment.stop) {
+      ret = GST_FLOW_EOS;
+      gst_task_stop (stream->download_task);
+      goto end_of_manifest;
+    }
+  } else {
+    if (GST_CLOCK_TIME_IS_VALID (demux->segment.start)
+        && stream->segment.position < stream->segment.start) {
+      ret = GST_FLOW_EOS;
+      gst_task_stop (stream->download_task);
+      goto end_of_manifest;
+    }
+  }
+
+  GST_OBJECT_LOCK (demux);
+  if (demux->cancelled) {
+    stream->last_ret = GST_FLOW_FLUSHING;
+    goto cancelled;
+  }
+
+  /* Cleanup old streams if any */
+  if (G_UNLIKELY (demux->priv->old_streams != NULL)) {
+    GList *old_streams = demux->priv->old_streams;
+    demux->priv->old_streams = NULL;
+    GST_OBJECT_UNLOCK (demux);
+
+    /* Need to unlock as it might post messages to the bus */
+    GST_DEBUG_OBJECT (stream->pad, "Cleaning up old streams");
+    g_list_free_full (old_streams,
+        (GDestroyNotify) gst_adaptive_demux_stream_free);
+    GST_DEBUG_OBJECT (stream->pad, "Cleaning up old streams (done)");
+  } else {
+    GST_OBJECT_UNLOCK (demux);
+  }
+
+  GST_MANIFEST_LOCK (demux);
+  if (G_UNLIKELY (stream->restart_download)) {
+    GstSegment segment;
+    GstEvent *seg_event;
+    GstClockTime cur, ts;
+    gint64 pos;
+
+    GST_DEBUG_OBJECT (stream->pad,
+        "Activating stream due to reconfigure event");
+
+    cur = ts =
+        gst_segment_to_stream_time (&stream->segment, GST_FORMAT_TIME,
+        stream->segment.position);
+
+    if (gst_pad_peer_query_position (stream->pad, GST_FORMAT_TIME, &pos)) {
+      ts = (GstClockTime) pos;
+      GST_DEBUG_OBJECT (demux, "Downstream position: %"
+          GST_TIME_FORMAT, GST_TIME_ARGS (ts));
+    } else {
+      /* query other pads as some faulty element in the pad's branch might
+       * reject position queries. This should be better than using the
+       * demux segment position that can be much ahead */
+      GList *iter;
+
+      for (iter = demux->streams; iter != NULL; iter = g_list_next (iter)) {
+        GstAdaptiveDemuxStream *cur_stream =
+            (GstAdaptiveDemuxStream *) iter->data;
+
+        if (gst_pad_peer_query_position (cur_stream->pad, GST_FORMAT_TIME,
+                &pos)) {
+          ts = (GstClockTime) pos;
+          GST_DEBUG_OBJECT (stream->pad, "Downstream position: %"
+              GST_TIME_FORMAT, GST_TIME_ARGS (ts));
+          break;
+        }
+      }
+    }
+
+    /* we might have already pushed this data */
+    ts = MAX (ts, cur);
+
+    GST_DEBUG_OBJECT (stream->pad, "Restarting stream at "
+        "position %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
+    gst_segment_copy_into (&demux->segment, &segment);
+
+    if (GST_CLOCK_TIME_IS_VALID (ts)) {
+      GstClockTime offset, period_start;
+
+      offset =
+          gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+      period_start = gst_adaptive_demux_get_period_start_time (demux);
+
+      /* TODO check return */
+      gst_adaptive_demux_stream_seek (demux, stream, ts);
+
+      segment.position = ts - period_start + offset;
+    }
+
+    /* The stream's segment is still correct except for
+     * the position, so let's send a new one with the
+     * updated position */
+    seg_event = gst_event_new_segment (&stream->segment);
+    gst_event_set_seqnum (seg_event, demux->priv->segment_seqnum);
+    GST_DEBUG_OBJECT (stream->pad, "Sending restart segment: %"
+        GST_PTR_FORMAT, seg_event);
+    gst_pad_push_event (stream->pad, seg_event);
+
+    stream->restart_download = FALSE;
+  }
+  GST_OBJECT_LOCK (demux);
+  if (demux->cancelled) {
+    stream->last_ret = GST_FLOW_FLUSHING;
+    GST_MANIFEST_UNLOCK (demux);
+    goto cancelled;
+  }
+  GST_OBJECT_UNLOCK (demux);
+
+  live = gst_adaptive_demux_is_live (demux);
+
+  ret = gst_adaptive_demux_stream_update_fragment_info (demux, stream);
+  GST_DEBUG_OBJECT (stream->pad, "Fragment info update result: %d %s",
+      ret, gst_flow_get_name (ret));
+  if (ret == GST_FLOW_OK) {
+
+    /* wait for live fragments to be available */
+    if (live) {
+      gint64 wait_time =
+          gst_adaptive_demux_stream_get_fragment_waiting_time (demux, stream);
+      GST_MANIFEST_UNLOCK (demux);
+      if (wait_time > 0)
+        gst_adaptive_demux_stream_download_wait (stream, wait_time);
+    } else {
+      GST_MANIFEST_UNLOCK (demux);
+    }
+
+    GST_OBJECT_LOCK (demux);
+    if (demux->cancelled) {
+      stream->last_ret = GST_FLOW_FLUSHING;
+      goto cancelled;
+    }
+    GST_OBJECT_UNLOCK (demux);
+
+    stream->last_ret = GST_FLOW_OK;
+    next_download = g_get_monotonic_time ();
+    ret = gst_adaptive_demux_stream_download_fragment (stream);
+
+    GST_OBJECT_LOCK (demux);
+    if (demux->cancelled) {
+      stream->last_ret = GST_FLOW_FLUSHING;
+      goto cancelled;
+    }
+    GST_OBJECT_UNLOCK (demux);
+
+    GST_MANIFEST_LOCK (demux);
+  } else {
+    stream->last_ret = ret;
+  }
+
+  switch (ret) {
+    case GST_FLOW_OK:
+      break;                    /* all is good, let's go */
+    case GST_FLOW_EOS:
+      GST_DEBUG_OBJECT (stream->pad, "EOS, checking to stop download loop");
+      /* we push the EOS after releasing the object lock */
+      if (gst_adaptive_demux_is_live (demux)) {
+        if (gst_adaptive_demux_stream_wait_manifest_update (demux, stream)) {
+          GST_MANIFEST_UNLOCK (demux);
+          return;
+        }
+        gst_task_stop (stream->download_task);
+      } else {
+        gst_task_stop (stream->download_task);
+        if (gst_adaptive_demux_combine_flows (demux) == GST_FLOW_EOS) {
+          if (gst_adaptive_demux_has_next_period (demux)) {
+            gst_adaptive_demux_advance_period (demux);
+            ret = GST_FLOW_OK;
+          }
+        }
+      }
+      break;
+
+    case GST_FLOW_NOT_LINKED:
+      gst_task_stop (stream->download_task);
+      if (gst_adaptive_demux_combine_flows (demux)
+          == GST_FLOW_NOT_LINKED) {
+        GST_ELEMENT_ERROR (demux, STREAM, FAILED,
+            (_("Internal data stream error.")), ("stream stopped, reason %s",
+                gst_flow_get_name (GST_FLOW_NOT_LINKED)));
+      }
+      break;
+
+    case GST_FLOW_FLUSHING:{
+      GList *iter;
+
+      for (iter = demux->streams; iter; iter = g_list_next (iter)) {
+        GstAdaptiveDemuxStream *other;
+
+        other = iter->data;
+        gst_task_stop (other->download_task);
+      }
+    }
+      break;
+
+    default:
+      if (ret <= GST_FLOW_ERROR) {
+        gboolean is_live = gst_adaptive_demux_is_live (demux);
+        GST_WARNING_OBJECT (demux, "Error while downloading fragment");
+        if (++stream->download_error_count > MAX_DOWNLOAD_ERROR_COUNT) {
+          GST_MANIFEST_UNLOCK (demux);
+          goto download_error;
+        }
+
+        g_clear_error (&stream->last_error);
+
+        /* First try to update the playlist for non-live playlists
+         * in case the URIs have changed in the meantime. But only
+         * try it the first time, after that we're going to wait a
+         * a bit to not flood the server */
+        if (stream->download_error_count == 1 && !is_live) {
+          /* TODO hlsdemux had more options to this function (boolean and err) */
+          GST_MANIFEST_UNLOCK (demux);
+          if (gst_adaptive_demux_update_manifest (demux) == GST_FLOW_OK) {
+            /* Retry immediately, the playlist actually has changed */
+            GST_DEBUG_OBJECT (demux, "Updated the playlist");
+            return;
+          }
+          GST_MANIFEST_LOCK (demux);
+        }
+
+        /* Wait half the fragment duration before retrying */
+        next_download +=
+            gst_util_uint64_scale
+            (stream->fragment.duration, G_USEC_PER_SEC, 2 * GST_SECOND);
+
+        GST_MANIFEST_UNLOCK (demux);
+        g_mutex_lock (&stream->fragment_download_lock);
+        if (demux->cancelled) {
+          g_mutex_unlock (&stream->fragment_download_lock);
+          return;
+        }
+        g_cond_wait_until (&stream->fragment_download_cond,
+            &stream->fragment_download_lock, next_download);
+        g_mutex_unlock (&stream->fragment_download_lock);
+        GST_DEBUG_OBJECT (demux, "Retrying now");
+
+        /* Refetch the playlist now after we waited */
+        if (!is_live
+            && gst_adaptive_demux_update_manifest (demux) == GST_FLOW_OK) {
+          GST_DEBUG_OBJECT (demux, "Updated the playlist");
+        }
+        return;
+      }
+      break;
+  }
+
+  GST_MANIFEST_UNLOCK (demux);
+end_of_manifest:
+  if (G_UNLIKELY (ret == GST_FLOW_EOS)) {
+    gst_adaptive_demux_stream_push_event (stream, gst_event_new_eos ());
+  }
+
+end:
+  GST_LOG_OBJECT (stream->pad, "download loop end");
+  return;
+
+cancelled:
+  {
+    GST_DEBUG_OBJECT (stream->pad, "Stream has been cancelled");
+    GST_OBJECT_UNLOCK (demux);
+    goto end;
+  }
+download_error:
+  {
+    GstMessage *msg;
+
+    if (stream->last_error) {
+      gchar *debug = g_strdup_printf ("Error on stream %s:%s",
+          GST_DEBUG_PAD_NAME (stream->pad));
+      msg =
+          gst_message_new_error (GST_OBJECT_CAST (demux), stream->last_error,
+          debug);
+      GST_ERROR_OBJECT (stream->pad, "Download error: %s",
+          stream->last_error->message);
+      g_free (debug);
+    } else {
+      GError *err =
+          g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_NOT_FOUND,
+          _("Couldn't download fragments"));
+      msg =
+          gst_message_new_error (GST_OBJECT_CAST (demux), err,
+          "Fragment downloading has failed consecutive times");
+      g_error_free (err);
+      GST_ERROR_OBJECT (stream->pad,
+          "Download error: Couldn't download fragments, too many failures");
+    }
+
+    gst_element_post_message (GST_ELEMENT_CAST (demux), msg);
+    goto end;
+  }
+}
+
+static void
+gst_adaptive_demux_updates_loop (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  /* Loop for updating of the playlist. This periodically checks if
+   * the playlist is updated and does so, then signals the streaming
+   * thread in case it can continue downloading now. */
+
+  /* block until the next scheduled update or the signal to quit this thread */
+  GST_DEBUG_OBJECT (demux, "Started updates task");
+
+  demux->priv->next_update =
+      g_get_monotonic_time () + klass->get_manifest_update_interval (demux);
+
+  /* Updating playlist only needed for live playlists */
+  while (gst_adaptive_demux_is_live (demux)) {
+    GstFlowReturn ret = GST_FLOW_OK;
+
+    /* Wait here until we should do the next update or we're cancelled */
+    GST_DEBUG_OBJECT (demux, "Wait for next playlist update");
+
+    g_mutex_lock (&demux->priv->updates_timed_lock);
+    if (demux->priv->stop_updates_task) {
+      g_mutex_unlock (&demux->priv->updates_timed_lock);
+      goto quit;
+    }
+    g_cond_wait_until (&demux->priv->updates_timed_cond,
+        &demux->priv->updates_timed_lock, demux->priv->next_update);
+    if (demux->priv->stop_updates_task) {
+      g_mutex_unlock (&demux->priv->updates_timed_lock);
+      goto quit;
+    }
+    g_mutex_unlock (&demux->priv->updates_timed_lock);
+
+    GST_DEBUG_OBJECT (demux, "Updating playlist");
+    ret = gst_adaptive_demux_update_manifest (demux);
+    if (ret == GST_FLOW_EOS) {
+    } else if (ret != GST_FLOW_OK) {
+      if (demux->priv->stop_updates_task)
+        goto quit;
+      demux->priv->update_failed_count++;
+      if (demux->priv->update_failed_count <= DEFAULT_FAILED_COUNT) {
+        GST_WARNING_OBJECT (demux, "Could not update the playlist");
+        demux->priv->next_update =
+            g_get_monotonic_time () +
+            klass->get_manifest_update_interval (demux);
+      } else {
+        GST_ELEMENT_ERROR (demux, STREAM, FAILED,
+            (_("Internal data stream error.")), ("Could not update playlist"));
+        goto error;
+      }
+    } else {
+      GST_DEBUG_OBJECT (demux, "Updated playlist successfully");
+      GST_MANIFEST_LOCK (demux);
+      demux->priv->next_update =
+          g_get_monotonic_time () + klass->get_manifest_update_interval (demux);
+      /* Wake up download task */
+      g_cond_broadcast (&demux->manifest_cond);
+      GST_MANIFEST_UNLOCK (demux);
+    }
+  }
+
+quit:
+  {
+    GST_DEBUG_OBJECT (demux, "Stopped updates task");
+    gst_task_stop (demux->priv->updates_task);
+    return;
+  }
+
+error:
+  {
+    GST_DEBUG_OBJECT (demux, "Stopped updates task because of error");
+    gst_task_stop (demux->priv->updates_task);
+  }
+}
+
+
+static gboolean
+gst_adaptive_demux_stream_push_event (GstAdaptiveDemuxStream * stream,
+    GstEvent * event)
+{
+  gboolean ret;
+
+  if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
+    stream->eos = TRUE;
+  }
+  GST_DEBUG_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream),
+      "Pushing event %" GST_PTR_FORMAT, event);
+  ret = gst_pad_push_event (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream), event);
+  return ret;
+}
+
+static gboolean
+gst_adaptive_demux_is_live (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->is_live)
+    return klass->is_live (demux);
+  return FALSE;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_seek (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime ts)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->stream_seek)
+    return klass->stream_seek (stream, ts);
+  return GST_FLOW_ERROR;
+}
+
+static gboolean
+gst_adaptive_demux_stream_has_next_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  gboolean ret = TRUE;
+
+  if (klass->stream_has_next_fragment)
+    ret = klass->stream_has_next_fragment (stream);
+
+  return ret;
+}
+
+GstFlowReturn
+gst_adaptive_demux_stream_advance_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime duration)
+{
+  GstFlowReturn ret;
+
+  GST_MANIFEST_LOCK (demux);
+  if (stream->last_ret == GST_FLOW_OK) {
+    stream->last_ret =
+        gst_adaptive_demux_stream_advance_fragment_unlocked (demux, stream,
+        duration);
+  }
+  ret = stream->last_ret;
+  GST_MANIFEST_UNLOCK (demux);
+
+  return ret;
+}
+
+GstFlowReturn
+gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime duration)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  GstFlowReturn ret;
+
+  g_return_val_if_fail (klass->stream_advance_fragment != NULL, GST_FLOW_ERROR);
+
+  stream->download_error_count = 0;
+  g_clear_error (&stream->last_error);
+  stream->download_total_time +=
+      g_get_monotonic_time () - stream->download_chunk_start_time;
+  stream->fragment_total_time +=
+      g_get_monotonic_time () - stream->download_chunk_start_time;
+
+  /* FIXME - url has no indication of byte ranges for subsegments */
+  gst_element_post_message (GST_ELEMENT_CAST (demux),
+      gst_message_new_element (GST_OBJECT_CAST (demux),
+          gst_structure_new (GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME,
+              "manifest-uri", G_TYPE_STRING,
+              demux->manifest_uri, "uri", G_TYPE_STRING,
+              stream->fragment.uri, "fragment-start-time",
+              GST_TYPE_CLOCK_TIME, stream->download_start_time,
+              "fragment-stop-time", GST_TYPE_CLOCK_TIME,
+              gst_util_get_timestamp (), "fragment-size", G_TYPE_UINT64,
+              stream->download_total_bytes, "fragment-download-time",
+              GST_TYPE_CLOCK_TIME,
+              stream->download_total_time * GST_USECOND, NULL)));
+
+  if (GST_CLOCK_TIME_IS_VALID (duration)) {
+    GstClockTime offset =
+        gst_adaptive_demux_stream_get_presentation_offset (demux, stream);
+    GstClockTime period_start =
+        gst_adaptive_demux_get_period_start_time (demux);
+
+    stream->segment.position += duration;
+
+    /* Convert from position inside the stream's segment to the demuxer's
+     * segment, they are not necessarily the same */
+    if (stream->segment.position - offset + period_start >
+        demux->segment.position)
+      demux->segment.position =
+          stream->segment.position - offset + period_start;
+  }
+
+  if (gst_adaptive_demux_is_live (demux)
+      || gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
+    ret = klass->stream_advance_fragment (stream);
+  } else {
+    ret = GST_FLOW_EOS;
+  }
+
+  stream->download_start_time = stream->download_chunk_start_time =
+      g_get_monotonic_time ();
+
+  if (ret == GST_FLOW_OK) {
+    if (gst_adaptive_demux_stream_select_bitrate (demux, stream,
+            gst_adaptive_demux_stream_update_current_bitrate (demux, stream))) {
+      stream->need_header = TRUE;
+      gst_adapter_clear (stream->adapter);
+      ret = (GstFlowReturn) GST_ADAPTIVE_DEMUX_FLOW_SWITCH;
+    }
+
+    /* the subclass might want to switch pads */
+    if (G_UNLIKELY (demux->next_streams)) {
+      gst_task_stop (stream->download_task);
+      /* TODO only allow switching streams if other downloads are not ongoing */
+      GST_DEBUG_OBJECT (demux, "Subclass wants new pads "
+          "to do bitrate switching");
+      gst_adaptive_demux_expose_streams (demux, FALSE);
+      gst_adaptive_demux_start_tasks (demux);
+      ret = GST_FLOW_EOS;
+    }
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_adaptive_demux_stream_select_bitrate (GstAdaptiveDemux *
+    demux, GstAdaptiveDemuxStream * stream, guint64 bitrate)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  /* FIXME: Currently several issues have be found when letting bitrate adaptation
+   * happen using trick modes (such as 'All streams finished without buffers') and
+   * the adaptive algorithm does not properly behave. */
+  if (demux->segment.rate != 1.0)
+    return FALSE;
+
+  if (klass->stream_select_bitrate)
+    return klass->stream_select_bitrate (stream, bitrate);
+  return FALSE;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_stream_update_fragment_info (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  g_return_val_if_fail (klass->stream_update_fragment_info != NULL,
+      GST_FLOW_ERROR);
+
+  return klass->stream_update_fragment_info (stream);
+}
+
+static gint64
+gst_adaptive_demux_stream_get_fragment_waiting_time (GstAdaptiveDemux *
+    demux, GstAdaptiveDemuxStream * stream)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  if (klass->stream_get_fragment_waiting_time)
+    return klass->stream_get_fragment_waiting_time (stream);
+  return 0;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_update_manifest_default (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  GstFragment *download;
+  GstBuffer *buffer;
+  GstFlowReturn ret;
+
+  download = gst_uri_downloader_fetch_uri (demux->downloader,
+      demux->manifest_uri, NULL, TRUE, TRUE, TRUE, NULL);
+  if (download) {
+    GST_MANIFEST_LOCK (demux);
+    g_free (demux->manifest_uri);
+    g_free (demux->manifest_base_uri);
+    if (download->redirect_permanent && download->redirect_uri) {
+      demux->manifest_uri = g_strdup (download->redirect_uri);
+      demux->manifest_base_uri = NULL;
+    } else {
+      demux->manifest_uri = g_strdup (download->uri);
+      demux->manifest_base_uri = g_strdup (download->redirect_uri);
+    }
+
+    buffer = gst_fragment_get_buffer (download);
+    g_object_unref (download);
+    ret = klass->update_manifest_data (demux, buffer);
+    gst_buffer_unref (buffer);
+    GST_MANIFEST_UNLOCK (demux);
+    /* FIXME: Should the manifest uri vars be reverted to original
+     * values if updating fails? */
+  } else {
+    ret = GST_FLOW_NOT_LINKED;
+  }
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_adaptive_demux_update_manifest (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  GstFlowReturn ret;
+
+  ret = klass->update_manifest (demux);
+
+  if (ret == GST_FLOW_OK) {
+    GstClockTime duration;
+    GST_MANIFEST_LOCK (demux);
+    /* Send an updated duration message */
+    duration = klass->get_duration (demux);
+    GST_MANIFEST_UNLOCK (demux);
+    if (duration != GST_CLOCK_TIME_NONE) {
+      GST_DEBUG_OBJECT (demux,
+          "Sending duration message : %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (duration));
+      gst_element_post_message (GST_ELEMENT (demux),
+          gst_message_new_duration_changed (GST_OBJECT (demux)));
+    } else {
+      GST_DEBUG_OBJECT (demux,
+          "Duration unknown, can not send the duration message");
+    }
+  }
+
+  return ret;
+}
+
+void
+gst_adaptive_demux_stream_fragment_clear (GstAdaptiveDemuxStreamFragment * f)
+{
+  g_free (f->uri);
+  f->uri = NULL;
+  f->range_start = 0;
+  f->range_end = -1;
+
+  g_free (f->header_uri);
+  f->header_uri = NULL;
+  f->header_range_start = 0;
+  f->header_range_end = -1;
+
+  g_free (f->index_uri);
+  f->index_uri = NULL;
+  f->index_range_start = 0;
+  f->index_range_end = -1;
+}
+
+static gboolean
+gst_adaptive_demux_has_next_period (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+  gboolean ret = FALSE;
+
+  if (klass->has_next_period)
+    ret = klass->has_next_period (demux);
+  GST_DEBUG_OBJECT (demux, "Has next period: %d", ret);
+  return ret;
+}
+
+static void
+gst_adaptive_demux_advance_period (GstAdaptiveDemux * demux)
+{
+  GstAdaptiveDemuxClass *klass = GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
+
+  g_return_if_fail (klass->advance_period != NULL);
+
+  GST_DEBUG_OBJECT (demux, "Advancing to next period");
+  klass->advance_period (demux);
+  gst_adaptive_demux_expose_streams (demux, FALSE);
+  gst_adaptive_demux_start_tasks (demux);
+}
+
+static void
+gst_adaptive_demux_stream_download_wait (GstAdaptiveDemuxStream * stream,
+    GstClockTime time_diff)
+{
+  gint64 end_time = g_get_monotonic_time () + time_diff / GST_USECOND;
+
+  GST_DEBUG_OBJECT (stream->pad, "Download waiting for %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (time_diff));
+  g_mutex_lock (&stream->fragment_download_lock);
+  g_cond_wait_until (&stream->fragment_download_cond,
+      &stream->fragment_download_lock, end_time);
+  g_mutex_unlock (&stream->fragment_download_lock);
+  GST_DEBUG_OBJECT (stream->pad, "Download finished waiting");
+}
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
new file mode 100644
index 0000000..b65b6d6
--- /dev/null
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
@@ -0,0 +1,461 @@
+/* GStreamer
+ *
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *   Author: Thiago Santos <thiagoss@osg.samsung.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_ADAPTIVE_DEMUX_H_
+#define _GST_ADAPTIVE_DEMUX_H_
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+#include <gst/uridownloader/gsturidownloader.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_ADAPTIVE_DEMUX \
+  (gst_adaptive_demux_get_type())
+#define GST_ADAPTIVE_DEMUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ADAPTIVE_DEMUX,GstAdaptiveDemux))
+#define GST_ADAPTIVE_DEMUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ADAPTIVE_DEMUX,GstAdaptiveDemuxClass))
+#define GST_ADAPTIVE_DEMUX_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_ADAPTIVE_DEMUX,GstAdaptiveDemuxClass))
+#define GST_IS_ADAPTIVE_DEMUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ADAPTIVE_DEMUX))
+#define GST_IS_ADAPTIVE_DEMUX_CLASS(obj) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ADAPTIVE_DEMUX))
+#define GST_ADAPTIVE_DEMUX_CAST(obj) ((GstAdaptiveDemux *)obj)
+
+#define GST_ADAPTIVE_DEMUX_STREAM_CAST(obj) ((GstAdaptiveDemuxStream *)obj)
+
+/**
+ * GST_ADAPTIVE_DEMUX_SINK_NAME:
+ *
+ * The name of the templates for the sink pad.
+ */
+#define GST_ADAPTIVE_DEMUX_SINK_NAME    "sink"
+
+/**
+ * GST_ADAPTIVE_DEMUX_SINK_PAD:
+ * @obj: a #GstAdaptiveDemux
+ *
+ * Gives the pointer to the sink #GstPad object of the element.
+ */
+#define GST_ADAPTIVE_DEMUX_SINK_PAD(obj)        (((GstAdaptiveDemux *) (obj))->sinkpad)
+
+#define GST_ADAPTIVE_DEMUX_STREAM_PAD(obj)      (((GstAdaptiveDemuxStream *) (obj))->pad)
+
+#define GST_ADAPTIVE_DEMUX_STREAM_NEED_HEADER(obj) (((GstAdaptiveDemuxStream *) (obj))->need_header)
+
+/**
+ * GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME:
+ *
+ * Name of the ELEMENT type messages posted by dashdemux with statistics.
+ *
+ * Since: 1.6
+ */
+#define GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME "adaptive-streaming-statistics"
+
+#define GST_MANIFEST_GET_LOCK(d) (&(GST_ADAPTIVE_DEMUX_CAST(d)->manifest_lock))
+#define GST_MANIFEST_LOCK(d) (g_mutex_lock (GST_MANIFEST_GET_LOCK (d)))
+#define GST_MANIFEST_UNLOCK(d) (g_mutex_unlock (GST_MANIFEST_GET_LOCK (d)))
+
+#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
+
+typedef struct _GstAdaptiveDemuxStreamFragment GstAdaptiveDemuxStreamFragment;
+typedef struct _GstAdaptiveDemuxStream GstAdaptiveDemuxStream;
+typedef struct _GstAdaptiveDemux GstAdaptiveDemux;
+typedef struct _GstAdaptiveDemuxClass GstAdaptiveDemuxClass;
+typedef struct _GstAdaptiveDemuxPrivate GstAdaptiveDemuxPrivate;
+
+struct _GstAdaptiveDemuxStreamFragment
+{
+  GstClockTime timestamp;
+  GstClockTime duration;
+
+  gchar *uri;
+  gint64 range_start;
+  gint64 range_end;
+
+  /* when headers are needed */
+  gchar *header_uri;
+  gint64 header_range_start;
+  gint64 header_range_end;
+
+  /* when index is needed */
+  gchar *index_uri;
+  gint64 index_range_start;
+  gint64 index_range_end;
+};
+
+struct _GstAdaptiveDemuxStream
+{
+  GstPad *pad;
+
+  GstAdaptiveDemux *demux;
+
+  GstSegment segment;
+
+  GstAdapter *adapter;
+
+  GstCaps *pending_caps;
+  GstEvent *pending_segment;
+  GstTagList *pending_tags;
+  gboolean need_header;
+  GList *pending_events;
+
+  GstFlowReturn last_ret;
+  GError *last_error;
+
+  GstTask *download_task;
+  GRecMutex download_lock;
+
+  gboolean restart_download;
+  gboolean discont;
+
+  gboolean downloading_header;
+  gboolean downloading_index;
+
+  /* download tooling */
+  GstElement *src;
+  GstPad *src_srcpad;
+  GMutex fragment_download_lock;
+  GCond fragment_download_cond;
+  gboolean download_finished;
+  gboolean starting_fragment;
+  gboolean first_fragment_buffer;
+  gint64 download_start_time;
+  gint64 download_chunk_start_time;
+  gint64 download_total_time;
+  gint64 download_total_bytes;
+  guint64 current_download_rate;
+
+  /* Per fragment download information */
+  guint64 fragment_total_time;
+  guint64 fragment_total_size;
+
+  /* Average for the last fragments */
+  guint64 moving_bitrate;
+  guint moving_index;
+  guint64 *fragment_bitrates;
+
+  GstAdaptiveDemuxStreamFragment fragment;
+
+  guint download_error_count;
+
+  /* TODO check if used */
+  gboolean eos;
+};
+
+/**
+ * GstAdaptiveDemux:
+ *
+ * The opaque #GstAdaptiveDemux data structure.
+ */
+struct _GstAdaptiveDemux
+{
+  /*< private >*/
+  GstBin     bin;
+
+  gsize stream_struct_size;
+
+  /*< protected >*/
+  GstPad         *sinkpad;
+
+  GstUriDownloader *downloader;
+
+  GList *streams;
+  GList *next_streams;
+
+  GstSegment segment;
+
+  gboolean cancelled;
+
+  GMutex manifest_lock;
+  GCond manifest_cond;
+
+  gchar *manifest_uri;
+  gchar *manifest_base_uri;
+
+  /* Properties */
+  guint num_lookback_fragments;
+  gfloat bitrate_limit;         /* limit of the available bitrate to use */
+  guint connection_speed;
+
+  gboolean have_group_id;
+  guint group_id;
+
+  /* < private > */
+  GstAdaptiveDemuxPrivate *priv;
+};
+
+/**
+ * GstAdaptiveDemuxClass:
+ *
+ */
+struct _GstAdaptiveDemuxClass
+{
+  /*< private >*/
+  GstBinClass bin_class;
+
+  /*< public >*/
+
+  /**
+   * process_manifest: Parse the manifest
+   * @demux: #GstAdaptiveDemux
+   * @manifest: the manifest to be parsed
+   *
+   * Parse the manifest and add the created streams using
+   * gst_adaptive_demux_stream_new()
+   *
+   * Returns: #TRUE if successful
+   */
+  gboolean      (*process_manifest) (GstAdaptiveDemux * demux, GstBuffer * manifest);
+
+  /**
+   * get_manifest_update_interval:
+   * @demux: #GstAdaptiveDemux
+   *
+   * Used during live streaming, the subclass should return the interval
+   * between successive manifest updates
+   *
+   * Returns: the update interval in microseconds
+   */
+  gint64        (*get_manifest_update_interval) (GstAdaptiveDemux * demux);
+
+  /**
+   * update_manifest:
+   * @demux: #GstAdaptiveDemux
+   *
+   * During live streaming, this will be called for the subclass to update its
+   * manifest with the new version. By default it fetches the manifest URI
+   * and passes it to GstAdaptiveDemux::update_manifest_data().
+   *
+   * Returns: #GST_FLOW_OK is all succeeded, #GST_FLOW_EOS if the stream ended
+   *          or #GST_FLOW_ERROR if an error happened
+   */
+  GstFlowReturn (*update_manifest) (GstAdaptiveDemux * demux);
+
+  /**
+   * update_manifest_data:
+   * @demux: #GstAdaptiveDemux
+   * @buf: Downloaded manifest data
+   *
+   * During live streaming, this will be called for the subclass to update its
+   * manifest with the new version
+   *
+   * Returns: #GST_FLOW_OK is all succeeded, #GST_FLOW_EOS if the stream ended
+   *          or #GST_FLOW_ERROR if an error happened
+   */
+  GstFlowReturn (*update_manifest_data) (GstAdaptiveDemux * demux, GstBuffer * buf);
+
+  gboolean      (*is_live)          (GstAdaptiveDemux * demux);
+  GstClockTime  (*get_duration)     (GstAdaptiveDemux * demux);
+
+  /**
+   * reset:
+   * @demux: #GstAdaptiveDemux
+   *
+   * Reset the internal state of the subclass, getting ready to restart with
+   * a new stream afterwards
+   */
+  void          (*reset)            (GstAdaptiveDemux * demux);
+
+  /**
+   * seek:
+   * @demux: #GstAdaptiveDemux
+   * @seek: a seek #GstEvent
+   *
+   * The demuxer should seek on all its streams to the specified position
+   * in the seek event
+   *
+   * Returns: #TRUE if successful
+   */
+  gboolean      (*seek)             (GstAdaptiveDemux * demux, GstEvent * seek);
+
+  /**
+   * has_next_period:
+   * @demux: #GstAdaptiveDemux
+   *
+   * Checks if there is a next period following the current one.
+   * DASH can have multiple medias chained in its manifest, when one finishes
+   * this function is called to verify if there is a new period to be played
+   * in sequence.
+   *
+   * Returns: #TRUE if there is another period
+   */
+  gboolean      (*has_next_period)  (GstAdaptiveDemux * demux);
+  /**
+   * advance_period:
+   * @demux: #GstAdaptiveDemux
+   *
+   * Advances the manifest to the next period. New streams should be created
+   * using gst_adaptive_demux_stream_new().
+   */
+  void          (*advance_period)  (GstAdaptiveDemux * demux);
+
+  void          (*stream_free)     (GstAdaptiveDemuxStream * stream);
+  GstFlowReturn (*stream_seek)     (GstAdaptiveDemuxStream * stream, GstClockTime ts);
+  gboolean      (*stream_has_next_fragment)  (GstAdaptiveDemuxStream * stream);
+  GstFlowReturn (*stream_advance_fragment) (GstAdaptiveDemuxStream * stream);
+  /**
+   * stream_update_fragment_info:
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * Requests the stream to set the information about the current fragment to its
+   * current fragment struct
+   *
+   * Returns: #GST_FLOW_OK in success, #GST_FLOW_ERROR on error and #GST_FLOW_EOS
+   *          if there is no fragment.
+   */
+  GstFlowReturn (*stream_update_fragment_info) (GstAdaptiveDemuxStream * stream);
+  /**
+   * stream_select_bitrate:
+   * @stream: #GstAdaptiveDemuxStream
+   * @bitrate: the bitrate to select (in bytes per second)
+   *
+   * The stream should try to select the bitrate that is the greater, but not
+   * greater than the requested bitrate. If it needs a codec change it should
+   * create the new stream using gst_adaptive_demux_stream_new(). If it only
+   * needs a caps change it should set the new caps using
+   * gst_adaptive_demux_stream_set_caps().
+   *
+   * Returns: #TRUE if the stream changed bitrate, #FALSE otherwise
+   */
+  gboolean      (*stream_select_bitrate) (GstAdaptiveDemuxStream * stream, guint64 bitrate);
+  /**
+   * stream_get_fragment_waiting_time:
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * For live streams, requests how much time should be waited before starting
+   * to download the fragment. This is useful to avoid downloading a fragment that
+   * isn't available yet.
+   *
+   * Returns: The waiting time in microsseconds
+   */
+  gint64        (*stream_get_fragment_waiting_time) (GstAdaptiveDemuxStream * stream);
+
+  /**
+   * start_fragment:
+   * @demux: #GstAdaptiveDemux
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * Notifies the subclass that the given stream is starting the download
+   * of a new fragment. Can be used to reset/init internal state that is
+   * needed before each fragment, like decryption engines.
+   *
+   * Returns: #TRUE if successful.
+   */
+  gboolean      (*start_fragment) (GstAdaptiveDemux * demux, GstAdaptiveDemuxStream * stream);
+  /**
+   * finish_fragment:
+   * @demux: #GstAdaptiveDemux
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * Notifies the subclass that a fragment download was finished.
+   * It can be used to cleanup internal state after a fragment and
+   * also push any pending data before moving to the next fragment.
+   */
+  GstFlowReturn (*finish_fragment) (GstAdaptiveDemux * demux, GstAdaptiveDemuxStream * stream);
+  /**
+   * data_received:
+   * @demux: #GstAdaptiveDemux
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * Notifies the subclass that a fragment chunk was downloaded. The subclass
+   * can look at the data at the adapter and modify/push data as desired.
+   *
+   * Returns: #GST_FLOW_OK if successful, #GST_FLOW_ERROR in case of error.
+   */
+  GstFlowReturn (*data_received) (GstAdaptiveDemux * demux, GstAdaptiveDemuxStream * stream);
+
+  /**
+   * get_live_seek_range:
+   * @demux: #GstAdaptiveDemux
+   * @start: pointer to put the start position allowed to seek to
+   * @stop: pointer to put the stop position allowed to seek to
+   *
+   * Gets the allowed seek start and stop positions for the current live stream
+   *
+   * Return: %TRUE if successful
+   */
+  gboolean (*get_live_seek_range) (GstAdaptiveDemux * demux, gint64 * start, gint64 * stop);
+
+  /**
+   * get_presentation_offset:
+   * @demux: #GstAdaptiveDemux
+   * @stream: #GstAdaptiveDemuxStream
+   *
+   * Gets the delay to apply to @stream.
+   *
+   * Return: a #GstClockTime representing the (positive) time offset to apply to
+   * @stream.
+   */
+  GstClockTime (*get_presentation_offset) (GstAdaptiveDemux *demux, GstAdaptiveDemuxStream *stream);
+
+  /**
+   * get_period_start_time:
+   * @demux: #GstAdaptiveDemux
+   *
+   * Gets the start time of the current period. Timestamps are resetting to 0
+   * after each period but we have to maintain a continuous stream and running
+   * time so need to know the start time of the current period.
+   *
+   * Return: a #GstClockTime representing the start time of the currently
+   * selected period.
+   */
+  GstClockTime (*get_period_start_time) (GstAdaptiveDemux *demux);
+};
+
+GType    gst_adaptive_demux_get_type (void);
+
+void     gst_adaptive_demux_set_stream_struct_size (GstAdaptiveDemux * demux,
+                                                    gsize struct_size);
+
+
+GstAdaptiveDemuxStream *gst_adaptive_demux_stream_new (GstAdaptiveDemux * demux,
+                                                       GstPad * pad);
+void gst_adaptive_demux_stream_set_caps (GstAdaptiveDemuxStream * stream,
+                                         GstCaps * caps);
+void gst_adaptive_demux_stream_set_tags (GstAdaptiveDemuxStream * stream,
+                                         GstTagList * tags);
+void gst_adaptive_demux_stream_fragment_clear (GstAdaptiveDemuxStreamFragment * f);
+
+GstFlowReturn gst_adaptive_demux_stream_push_buffer (GstAdaptiveDemuxStream * stream, GstBuffer * buffer);
+GstFlowReturn
+gst_adaptive_demux_stream_advance_fragment (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime duration);
+void gst_adaptive_demux_stream_queue_event (GstAdaptiveDemuxStream * stream,
+    GstEvent * event);
+
+GstFlowReturn
+gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux,
+    GstAdaptiveDemuxStream * stream, GstClockTime duration);
+
+G_END_DECLS
+
+#endif
+
diff --git a/gst-libs/gst/base/Makefile.in b/gst-libs/gst/base/Makefile.in
index 4df2ab1..be85119 100644
--- a/gst-libs/gst/base/Makefile.in
+++ b/gst-libs/gst/base/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/base
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +790,6 @@
 	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*) \
@@ -1063,6 +1097,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/base/gstaggregator.c b/gst-libs/gst/base/gstaggregator.c
index e12ed93..9d31649 100644
--- a/gst-libs/gst/base/gstaggregator.c
+++ b/gst-libs/gst/base/gstaggregator.c
@@ -1,4 +1,4 @@
-/* GStreamer
+/* GStreamer aggregator base class
  * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
  * Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.org>
  *
@@ -29,8 +29,8 @@
  * 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.
+ *    Base class for mixers and muxers. Subclasses should at least implement
+ *    the #GstAggregatorClass.aggregate() virtual method.
  *  </para></listitem>
  *  <listitem><para>
  *    When data is queued on all pads, tha aggregate vmethod is called.
@@ -54,6 +54,12 @@
  *    subclass, it should instead return GST_FLOW_EOS in its aggregate
  *    implementation.
  *  </para></listitem>
+ *  <listitem><para>
+ *    Note that the aggregator logic regarding gap event handling is to turn
+ *    these into gap buffers with matching PTS and duration. It will also
+ *    flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE
+ *    to ease their identification and subsequent processing.
+ *  </para></listitem>
  * </itemizedlist>
  */
 
@@ -65,65 +71,187 @@
 
 #include "gstaggregator.h"
 
+typedef enum
+{
+  GST_AGGREGATOR_START_TIME_SELECTION_ZERO,
+  GST_AGGREGATOR_START_TIME_SELECTION_FIRST,
+  GST_AGGREGATOR_START_TIME_SELECTION_SET
+} GstAggregatorStartTimeSelection;
+
+static GType
+gst_aggregator_start_time_selection_get_type (void)
+{
+  static GType gtype = 0;
+
+  if (gtype == 0) {
+    static const GEnumValue values[] = {
+      {GST_AGGREGATOR_START_TIME_SELECTION_ZERO,
+          "Start at 0 running time (default)", "zero"},
+      {GST_AGGREGATOR_START_TIME_SELECTION_FIRST,
+          "Start at first observed input running time", "first"},
+      {GST_AGGREGATOR_START_TIME_SELECTION_SET,
+          "Set start time with start-time property", "set"},
+      {0, NULL, NULL}
+    };
+
+    gtype = g_enum_register_static ("GstAggregatorStartTimeSelection", values);
+  }
+  return gtype;
+}
 
 /*  Might become API */
 static void gst_aggregator_merge_tags (GstAggregator * aggregator,
     const GstTagList * tags, GstTagMergeMode mode);
+static void gst_aggregator_set_latency_property (GstAggregator * agg,
+    gint64 latency);
+static gint64 gst_aggregator_get_latency_property (GstAggregator * agg);
+
+
+/* Locking order, locks in this element must always be taken in this order
+ *
+ * standard sink pad stream lock -> GST_PAD_STREAM_LOCK (aggpad)
+ * Aggregator pad flush lock -> PAD_FLUSH_LOCK(aggpad)
+ * standard src pad stream lock -> GST_PAD_STREAM_LOCK (srcpad)
+ * Aggregator src lock -> SRC_LOCK(agg) w/ SRC_WAIT/BROADCAST
+ * standard element object lock -> GST_OBJECT_LOCK(agg)
+ * Aggregator pad lock -> PAD_LOCK (aggpad) w/ PAD_WAIT/BROADCAST_EVENT(aggpad)
+ * standard src pad object lock -> GST_OBJECT_LOCK(srcpad)
+ * standard sink pad object lock -> GST_OBJECT_LOCK(aggpad)
+ */
+
+
+static GstClockTime gst_aggregator_get_latency_unlocked (GstAggregator * self);
 
 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",              \
+#define PAD_LOCK(pad)   G_STMT_START {                                  \
+  GST_TRACE_OBJECT (pad, "Taking PAD 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_mutex_lock(&pad->priv->lock);                                       \
+  GST_TRACE_OBJECT (pad, "Took PAD 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",          \
+#define PAD_UNLOCK(pad)  G_STMT_START {                                 \
+  GST_TRACE_OBJECT (pad, "Releasing PAD lock from thread %p",           \
+      g_thread_self());                                                 \
+  g_mutex_unlock(&pad->priv->lock);                                     \
+  GST_TRACE_OBJECT (pad, "Release PAD 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",               \
+  GST_LOG_OBJECT (pad, "Waiting for buffer to be consumed 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_cond_wait(&(((GstAggregatorPad* )pad)->priv->event_cond),           \
+      (&((GstAggregatorPad*)pad)->priv->lock));                         \
+  GST_LOG_OBJECT (pad, "DONE Waiting for buffer to be consumed 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)); \
-  }
+#define PAD_BROADCAST_EVENT(pad) G_STMT_START {                        \
+  GST_LOG_OBJECT (pad, "Signaling buffer consumed from thread %p",     \
+        g_thread_self());                                              \
+  g_cond_broadcast(&(((GstAggregatorPad* )pad)->priv->event_cond));    \
+  } G_STMT_END
+
+
+#define PAD_FLUSH_LOCK(pad)     G_STMT_START {                          \
+  GST_TRACE_OBJECT (pad, "Taking lock from thread %p",                  \
+        g_thread_self());                                               \
+  g_mutex_lock(&pad->priv->flush_lock);                                 \
+  GST_TRACE_OBJECT (pad, "Took lock from thread %p",                    \
+        g_thread_self());                                               \
+  } G_STMT_END
+
+#define PAD_FLUSH_UNLOCK(pad)   G_STMT_START {                          \
+  GST_TRACE_OBJECT (pad, "Releasing lock from thread %p",               \
+        g_thread_self());                                               \
+  g_mutex_unlock(&pad->priv->flush_lock);                               \
+  GST_TRACE_OBJECT (pad, "Release lock from thread %p",                 \
+        g_thread_self());                                               \
+  } G_STMT_END
+
+#define SRC_LOCK(self)   G_STMT_START {                             \
+  GST_TRACE_OBJECT (self, "Taking src lock from thread %p",         \
+      g_thread_self());                                             \
+  g_mutex_lock(&self->priv->src_lock);                              \
+  GST_TRACE_OBJECT (self, "Took src lock from thread %p",           \
+        g_thread_self());                                           \
+  } G_STMT_END
+
+#define SRC_UNLOCK(self)  G_STMT_START {                            \
+  GST_TRACE_OBJECT (self, "Releasing src lock from thread %p",      \
+        g_thread_self());                                           \
+  g_mutex_unlock(&self->priv->src_lock);                            \
+  GST_TRACE_OBJECT (self, "Released src lock from thread %p",       \
+        g_thread_self());                                           \
+  } G_STMT_END
+
+#define SRC_WAIT(self) G_STMT_START {                               \
+  GST_LOG_OBJECT (self, "Waiting for src on thread %p",             \
+        g_thread_self());                                           \
+  g_cond_wait(&(self->priv->src_cond), &(self->priv->src_lock));    \
+  GST_LOG_OBJECT (self, "DONE Waiting for src on thread %p",        \
+        g_thread_self());                                           \
+  } G_STMT_END
+
+#define SRC_BROADCAST(self) G_STMT_START {                          \
+    GST_LOG_OBJECT (self, "Signaling src from thread %p",           \
+        g_thread_self());                                           \
+    if (self->priv->aggregate_id)                                   \
+      gst_clock_id_unschedule (self->priv->aggregate_id);           \
+    g_cond_broadcast(&(self->priv->src_cond));                      \
+  } G_STMT_END
 
 struct _GstAggregatorPadPrivate
 {
+  /* Following fields are protected by the PAD_LOCK */
+  GstFlowReturn flow_return;
   gboolean pending_flush_start;
   gboolean pending_flush_stop;
   gboolean pending_eos;
-  gboolean flushing;
 
-  GMutex event_lock;
+  GQueue buffers;
+  guint num_buffers;
+  GstClockTime head_position;
+  GstClockTime tail_position;
+  GstClockTime head_time;
+  GstClockTime tail_time;
+  GstClockTime time_level;
+
+  gboolean eos;
+
+  GMutex lock;
   GCond event_cond;
+  /* This lock prevents a flush start processing happening while
+   * the chain function is also happening.
+   */
+  GMutex flush_lock;
 };
 
 static gboolean
-_aggpad_flush (GstAggregatorPad * aggpad, GstAggregator * agg)
+gst_aggregator_pad_flush (GstAggregatorPad * aggpad, GstAggregator * agg)
 {
   GstAggregatorPadClass *klass = GST_AGGREGATOR_PAD_GET_CLASS (aggpad);
 
-  aggpad->eos = FALSE;
-  aggpad->priv->flushing = FALSE;
+  PAD_LOCK (aggpad);
+  aggpad->priv->pending_eos = FALSE;
+  aggpad->priv->eos = FALSE;
+  aggpad->priv->flow_return = GST_FLOW_OK;
+  GST_OBJECT_LOCK (aggpad);
+  gst_segment_init (&aggpad->segment, GST_FORMAT_UNDEFINED);
+  gst_segment_init (&aggpad->clip_segment, GST_FORMAT_UNDEFINED);
+  GST_OBJECT_UNLOCK (aggpad);
+  aggpad->priv->head_position = GST_CLOCK_TIME_NONE;
+  aggpad->priv->tail_position = GST_CLOCK_TIME_NONE;
+  aggpad->priv->head_time = GST_CLOCK_TIME_NONE;
+  aggpad->priv->tail_time = GST_CLOCK_TIME_NONE;
+  aggpad->priv->time_level = 0;
+  PAD_UNLOCK (aggpad);
 
   if (klass->flush)
     return klass->flush (aggpad, agg);
@@ -136,47 +264,46 @@
  *************************************/
 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
+/* All members are protected by the object lock unless otherwise noted */
 
 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;
-  GList *gsources;
+  gboolean running;             /* protected by src_lock */
 
   gint seqnum;
-  gboolean send_stream_start;
+  gboolean send_stream_start;   /* protected by srcpad stream lock */
   gboolean send_segment;
   gboolean flush_seeking;
   gboolean pending_flush_start;
-  gboolean send_eos;
-  GstFlowReturn flow_return;
+  gboolean send_eos;            /* protected by srcpad stream lock */
 
-  GstCaps *srccaps;
+  GstCaps *srccaps;             /* protected by the srcpad stream lock */
 
   GstTagList *tags;
   gboolean tags_changed;
+
+  gboolean peer_latency_live;   /* protected by src_lock */
+  GstClockTime peer_latency_min;        /* protected by src_lock */
+  GstClockTime peer_latency_max;        /* protected by src_lock */
+  gboolean has_peer_latency;
+
+  GstClockTime sub_latency_min; /* protected by src_lock */
+  GstClockTime sub_latency_max; /* protected by src_lock */
+
+  /* aggregate */
+  GstClockID aggregate_id;      /* protected by src_lock */
+  GMutex src_lock;
+  GCond src_cond;
+
+  gboolean first_buffer;
+  GstAggregatorStartTimeSelection start_time_selection;
+  GstClockTime start_time;
+
+  /* properties */
+  gint64 latency;               /* protected by both src_lock and all pad locks */
 };
 
 typedef struct
@@ -184,13 +311,31 @@
   GstEvent *event;
   gboolean result;
   gboolean flush;
+
+  gboolean one_actually_seeked;
 } EventData;
 
+#define DEFAULT_LATENCY              0
+#define DEFAULT_START_TIME_SELECTION GST_AGGREGATOR_START_TIME_SELECTION_ZERO
+#define DEFAULT_START_TIME           (-1)
+
+enum
+{
+  PROP_0,
+  PROP_LATENCY,
+  PROP_START_TIME_SELECTION,
+  PROP_START_TIME,
+  PROP_LAST
+};
+
+static GstFlowReturn gst_aggregator_pad_chain_internal (GstAggregator * self,
+    GstAggregatorPad * aggpad, GstBuffer * buffer, gboolean head);
+
 /**
  * gst_aggregator_iterate_sinkpads:
  * @self: The #GstAggregator
- * @func: The function to call.
- * @user_data: The data to pass to @func.
+ * @func: (scope call): The function to call.
+ * @user_data: (closure): The data to pass to @func.
  *
  * Iterate the sinkpads of aggregator to call a function on them.
  *
@@ -216,7 +361,7 @@
     switch (gst_iterator_next (iter, &item)) {
       case GST_ITERATOR_OK:
       {
-        GstPad *pad;
+        GstAggregatorPad *pad;
 
         pad = g_value_get_object (&item);
 
@@ -226,8 +371,9 @@
           break;
         }
 
-        GST_LOG_OBJECT (self, "calling function on pad %s:%s",
-            GST_DEBUG_PAD_NAME (pad));
+        GST_LOG_OBJECT (pad, "calling function %s on pad",
+            GST_DEBUG_FUNCPTR_NAME (func));
+
         result = func (self, pad, user_data);
 
         done = !result;
@@ -264,47 +410,86 @@
   return result;
 }
 
-static inline gboolean
-_check_all_pads_with_data_or_eos (GstAggregator * self,
-    GstAggregatorPad * aggpad)
+static gboolean
+gst_aggregator_pad_queue_is_empty (GstAggregatorPad * pad)
 {
-  if (aggpad->buffer || aggpad->eos) {
-    return TRUE;
-  }
-
-  GST_LOG_OBJECT (aggpad, "Not ready to be aggregated");
-
-  return FALSE;
+  return (g_queue_peek_tail (&pad->priv->buffers) == NULL);
 }
 
-/**
- * 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)
+static gboolean
+gst_aggregator_check_pads_ready (GstAggregator * self)
 {
-  gst_caps_replace (&self->priv->srccaps, caps);
+  GstAggregatorPad *pad;
+  GList *l, *sinkpads;
+
+  GST_LOG_OBJECT (self, "checking pads");
+
+  GST_OBJECT_LOCK (self);
+
+  sinkpads = GST_ELEMENT_CAST (self)->sinkpads;
+  if (sinkpads == NULL)
+    goto no_sinkpads;
+
+  for (l = sinkpads; l != NULL; l = l->next) {
+    pad = l->data;
+
+    PAD_LOCK (pad);
+
+    /* In live mode, having a single pad with buffers is enough to
+     * generate a start time from it. In non-live mode all pads need
+     * to have a buffer
+     */
+    if (self->priv->peer_latency_live &&
+        !gst_aggregator_pad_queue_is_empty (pad))
+      self->priv->first_buffer = FALSE;
+
+    if (gst_aggregator_pad_queue_is_empty (pad) && !pad->priv->eos) {
+      PAD_UNLOCK (pad);
+      goto pad_not_ready;
+    }
+    PAD_UNLOCK (pad);
+
+  }
+
+  self->priv->first_buffer = FALSE;
+
+  GST_OBJECT_UNLOCK (self);
+  GST_LOG_OBJECT (self, "pads are ready");
+  return TRUE;
+
+no_sinkpads:
+  {
+    GST_LOG_OBJECT (self, "pads not ready: no sink pads");
+    GST_OBJECT_UNLOCK (self);
+    return FALSE;
+  }
+pad_not_ready:
+  {
+    GST_LOG_OBJECT (pad, "pad not ready to be aggregated yet");
+    GST_OBJECT_UNLOCK (self);
+    return FALSE;
+  }
 }
 
 static void
-_reset_flow_values (GstAggregator * self)
+gst_aggregator_reset_flow_values (GstAggregator * self)
 {
-  self->priv->flow_return = GST_FLOW_FLUSHING;
+  GST_OBJECT_LOCK (self);
   self->priv->send_stream_start = TRUE;
   self->priv->send_segment = TRUE;
   gst_segment_init (&self->segment, GST_FORMAT_TIME);
+  self->priv->first_buffer = TRUE;
+  GST_OBJECT_UNLOCK (self);
 }
 
 static inline void
-_push_mandatory_events (GstAggregator * self)
+gst_aggregator_push_mandatory_events (GstAggregator * self)
 {
   GstAggregatorPrivate *priv = self->priv;
+  GstEvent *segment = NULL;
+  GstEvent *tags = NULL;
 
-  if (g_atomic_int_get (&self->priv->send_stream_start)) {
+  if (self->priv->send_stream_start) {
     gchar s_id[32];
 
     GST_INFO_OBJECT (self, "pushing stream start");
@@ -313,7 +498,7 @@
     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);
+    self->priv->send_stream_start = FALSE;
   }
 
   if (self->priv->srccaps) {
@@ -328,163 +513,392 @@
     self->priv->srccaps = NULL;
   }
 
-  if (g_atomic_int_get (&self->priv->send_segment)) {
-    if (!g_atomic_int_get (&self->priv->flush_seeking)) {
-      GstEvent *segev = gst_event_new_segment (&self->segment);
+  GST_OBJECT_LOCK (self);
+  if (self->priv->send_segment && !self->priv->flush_seeking) {
+    segment = gst_event_new_segment (&self->segment);
 
-      if (!self->priv->seqnum)
-        self->priv->seqnum = gst_event_get_seqnum (segev);
-      else
-        gst_event_set_seqnum (segev, self->priv->seqnum);
+    if (!self->priv->seqnum)
+      self->priv->seqnum = gst_event_get_seqnum (segment);
+    else
+      gst_event_set_seqnum (segment, self->priv->seqnum);
+    self->priv->send_segment = FALSE;
 
-      GST_DEBUG_OBJECT (self, "pushing segment %" GST_PTR_FORMAT, segev);
-      gst_pad_push_event (self->srcpad, segev);
-      g_atomic_int_set (&self->priv->send_segment, FALSE);
-    }
+    GST_DEBUG_OBJECT (self, "pushing segment %" GST_PTR_FORMAT, segment);
   }
 
-  if (priv->tags && priv->tags_changed) {
-    gst_pad_push_event (self->srcpad,
-        gst_event_new_tag (gst_tag_list_ref (priv->tags)));
+  if (priv->tags && priv->tags_changed && !self->priv->flush_seeking) {
+    tags = gst_event_new_tag (gst_tag_list_ref (priv->tags));
     priv->tags_changed = FALSE;
   }
+  GST_OBJECT_UNLOCK (self);
+
+  if (segment)
+    gst_pad_push_event (self->srcpad, segment);
+  if (tags)
+    gst_pad_push_event (self->srcpad, tags);
+
+}
+
+/**
+ * gst_aggregator_set_src_caps:
+ * @self: The #GstAggregator
+ * @caps: The #GstCaps to set 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_PAD_STREAM_LOCK (self->srcpad);
+  gst_caps_replace (&self->priv->srccaps, caps);
+  gst_aggregator_push_mandatory_events (self);
+  GST_PAD_STREAM_UNLOCK (self->srcpad);
 }
 
 /**
  * gst_aggregator_finish_buffer:
  * @self: The #GstAggregator
- * @buffer: the #GstBuffer to push.
+ * @buffer: (transfer full): the #GstBuffer to push.
  *
- * This method will take care of sending mandatory events before pushing
- * the provided buffer.
+ * This method will push the provided output buffer downstream. If needed,
+ * mandatory events such as stream-start, caps, and segment events will be
+ * sent before pushing the buffer.
  */
 GstFlowReturn
 gst_aggregator_finish_buffer (GstAggregator * self, GstBuffer * buffer)
 {
-  _push_mandatory_events (self);
+  gst_aggregator_push_mandatory_events (self);
 
-  if (!g_atomic_int_get (&self->priv->flush_seeking) &&
-      gst_pad_is_active (self->srcpad)) {
+  GST_OBJECT_LOCK (self);
+  if (!self->priv->flush_seeking && gst_pad_is_active (self->srcpad)) {
     GST_TRACE_OBJECT (self, "pushing buffer %" GST_PTR_FORMAT, buffer);
+    GST_OBJECT_UNLOCK (self);
     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));
+        self->priv->flush_seeking, gst_pad_is_active (self->srcpad));
+    GST_OBJECT_UNLOCK (self);
     gst_buffer_unref (buffer);
     return GST_FLOW_OK;
   }
 }
 
 static void
-_push_eos (GstAggregator * self)
+gst_aggregator_push_eos (GstAggregator * self)
 {
   GstEvent *event;
-  _push_mandatory_events (self);
+  gst_aggregator_push_mandatory_events (self);
 
-  self->priv->send_eos = FALSE;
   event = gst_event_new_eos ();
+
+  GST_OBJECT_LOCK (self);
+  self->priv->send_eos = FALSE;
   gst_event_set_seqnum (event, self->priv->seqnum);
+  GST_OBJECT_UNLOCK (self);
+
   gst_pad_push_event (self->srcpad, event);
 }
 
-
-static void
-_destroy_gsource (GSource * source)
+static GstClockTime
+gst_aggregator_get_next_time (GstAggregator * self)
 {
-  g_source_destroy (source);
-  g_source_unref (source);
-}
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self);
 
-static void
-_remove_all_sources (GstAggregator * self)
-{
-  GstAggregatorPrivate *priv = self->priv;
+  if (klass->get_next_time)
+    return klass->get_next_time (self);
 
-  MAIN_CONTEXT_LOCK (self);
-  g_list_free_full (priv->gsources, (GDestroyNotify) _destroy_gsource);
-  priv->gsources = NULL;
-  MAIN_CONTEXT_UNLOCK (self);
+  return GST_CLOCK_TIME_NONE;
 }
 
 static gboolean
-aggregate_func (GstAggregator * self)
+gst_aggregator_wait_and_check (GstAggregator * self, gboolean * timeout)
+{
+  GstClockTime latency;
+  GstClockTime start;
+  gboolean res;
+
+  *timeout = FALSE;
+
+  SRC_LOCK (self);
+
+  latency = gst_aggregator_get_latency_unlocked (self);
+
+  if (gst_aggregator_check_pads_ready (self)) {
+    GST_DEBUG_OBJECT (self, "all pads have data");
+    SRC_UNLOCK (self);
+
+    return TRUE;
+  }
+
+  /* Before waiting, check if we're actually still running */
+  if (!self->priv->running || !self->priv->send_eos) {
+    SRC_UNLOCK (self);
+
+    return FALSE;
+  }
+
+  start = gst_aggregator_get_next_time (self);
+
+  /* If we're not live, or if we use the running time
+   * of the first buffer as start time, we wait until
+   * all pads have buffers.
+   * Otherwise (i.e. if we are live!), we wait on the clock
+   * and if a pad does not have a buffer in time we ignore
+   * that pad.
+   */
+  if (!GST_CLOCK_TIME_IS_VALID (latency) ||
+      !GST_IS_CLOCK (GST_ELEMENT_CLOCK (self)) ||
+      !GST_CLOCK_TIME_IS_VALID (start) ||
+      (self->priv->first_buffer
+          && self->priv->start_time_selection ==
+          GST_AGGREGATOR_START_TIME_SELECTION_FIRST)) {
+    /* We wake up here when something happened, and below
+     * then check if we're ready now. If we return FALSE,
+     * we will be directly called again.
+     */
+    SRC_WAIT (self);
+  } else {
+    GstClockTime base_time, time;
+    GstClock *clock;
+    GstClockReturn status;
+    GstClockTimeDiff jitter;
+
+    GST_DEBUG_OBJECT (self, "got subclass start time: %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (start));
+
+    GST_OBJECT_LOCK (self);
+    base_time = GST_ELEMENT_CAST (self)->base_time;
+    clock = GST_ELEMENT_CLOCK (self);
+    if (clock)
+      gst_object_ref (clock);
+    GST_OBJECT_UNLOCK (self);
+
+    time = base_time + start;
+    time += latency;
+
+    GST_DEBUG_OBJECT (self, "possibly waiting for clock to reach %"
+        GST_TIME_FORMAT " (base %" GST_TIME_FORMAT " start %" GST_TIME_FORMAT
+        " latency %" GST_TIME_FORMAT " current %" GST_TIME_FORMAT ")",
+        GST_TIME_ARGS (time),
+        GST_TIME_ARGS (GST_ELEMENT_CAST (self)->base_time),
+        GST_TIME_ARGS (start), GST_TIME_ARGS (latency),
+        GST_TIME_ARGS (gst_clock_get_time (clock)));
+
+    self->priv->aggregate_id = gst_clock_new_single_shot_id (clock, time);
+    gst_object_unref (clock);
+    SRC_UNLOCK (self);
+
+    jitter = 0;
+    status = gst_clock_id_wait (self->priv->aggregate_id, &jitter);
+
+    SRC_LOCK (self);
+    if (self->priv->aggregate_id) {
+      gst_clock_id_unref (self->priv->aggregate_id);
+      self->priv->aggregate_id = NULL;
+    }
+
+    GST_DEBUG_OBJECT (self,
+        "clock returned %d (jitter: %s%" GST_TIME_FORMAT ")",
+        status, (jitter < 0 ? "-" : " "),
+        GST_TIME_ARGS ((jitter < 0 ? -jitter : jitter)));
+
+    /* we timed out */
+    if (status == GST_CLOCK_OK || status == GST_CLOCK_EARLY) {
+      SRC_UNLOCK (self);
+      *timeout = TRUE;
+      return TRUE;
+    }
+  }
+
+  res = gst_aggregator_check_pads_ready (self);
+  SRC_UNLOCK (self);
+
+  return res;
+}
+
+static gboolean
+check_events (GstAggregator * self, GstAggregatorPad * pad, gpointer user_data)
+{
+  GstEvent *event = NULL;
+  GstAggregatorClass *klass = NULL;
+  gboolean *processed_event = user_data;
+
+  do {
+    event = NULL;
+
+    PAD_LOCK (pad);
+    if (gst_aggregator_pad_queue_is_empty (pad) && pad->priv->pending_eos) {
+      pad->priv->pending_eos = FALSE;
+      pad->priv->eos = TRUE;
+    }
+    if (GST_IS_EVENT (g_queue_peek_tail (&pad->priv->buffers))) {
+      event = g_queue_pop_tail (&pad->priv->buffers);
+      PAD_BROADCAST_EVENT (pad);
+    }
+    PAD_UNLOCK (pad);
+    if (event) {
+      if (processed_event)
+        *processed_event = TRUE;
+      if (klass == NULL)
+        klass = GST_AGGREGATOR_GET_CLASS (self);
+
+      GST_LOG_OBJECT (pad, "Processing %" GST_PTR_FORMAT, event);
+      klass->sink_event (self, pad, event);
+    }
+  } while (event != NULL);
+
+  return TRUE;
+}
+
+static void
+gst_aggregator_pad_set_flushing (GstAggregatorPad * aggpad,
+    GstFlowReturn flow_return, gboolean full)
+{
+  GList *item;
+
+  PAD_LOCK (aggpad);
+  if (flow_return == GST_FLOW_NOT_LINKED)
+    aggpad->priv->flow_return = MIN (flow_return, aggpad->priv->flow_return);
+  else
+    aggpad->priv->flow_return = flow_return;
+
+  item = g_queue_peek_head_link (&aggpad->priv->buffers);
+  while (item) {
+    GList *next = item->next;
+
+    /* In partial flush, we do like the pad, we get rid of non-sticky events
+     * and EOS/SEGMENT.
+     */
+    if (full || GST_IS_BUFFER (item->data) ||
+        GST_EVENT_TYPE (item->data) == GST_EVENT_EOS ||
+        GST_EVENT_TYPE (item->data) == GST_EVENT_SEGMENT ||
+        !GST_EVENT_IS_STICKY (item->data)) {
+      gst_mini_object_unref (item->data);
+      g_queue_delete_link (&aggpad->priv->buffers, item);
+    }
+    item = next;
+  }
+  aggpad->priv->num_buffers = 0;
+
+  PAD_BROADCAST_EVENT (aggpad);
+  PAD_UNLOCK (aggpad);
+}
+
+static void
+gst_aggregator_aggregate_func (GstAggregator * self)
 {
   GstAggregatorPrivate *priv = self->priv;
   GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self);
+  gboolean timeout = FALSE;
 
-  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);
+  GST_LOG_OBJECT (self, "Checking aggregate");
+  while (priv->send_eos && priv->running) {
+    GstFlowReturn flow_return;
+    gboolean processed_event = FALSE;
+
+    gst_aggregator_iterate_sinkpads (self, check_events, NULL);
+
+    if (!gst_aggregator_wait_and_check (self, &timeout))
+      continue;
+
+    gst_aggregator_iterate_sinkpads (self, check_events, &processed_event);
+    if (processed_event)
+      continue;
+
+    GST_TRACE_OBJECT (self, "Actually aggregating!");
+    flow_return = klass->aggregate (self, timeout);
+
+    GST_OBJECT_LOCK (self);
+    if (flow_return == GST_FLOW_FLUSHING && priv->flush_seeking) {
+      /* We don't want to set the pads to flushing, but we want to
+       * stop the thread, so just break here */
+      GST_OBJECT_UNLOCK (self);
+      break;
+    }
+    GST_OBJECT_UNLOCK (self);
+
+    if (flow_return == GST_FLOW_EOS || flow_return == GST_FLOW_ERROR) {
+      gst_aggregator_push_eos (self);
+    }
+
+    GST_LOG_OBJECT (self, "flow return is %s", gst_flow_get_name (flow_return));
+
+    if (flow_return != GST_FLOW_OK) {
+      GList *item;
+
+      GST_OBJECT_LOCK (self);
+      for (item = GST_ELEMENT (self)->sinkpads; item; item = item->next) {
+        GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (item->data);
+
+        gst_aggregator_pad_set_flushing (aggpad, flow_return, TRUE);
+      }
+      GST_OBJECT_UNLOCK (self);
+      break;
+    }
+  }
+
+  /* Pause the task here, the only ways to get here are:
+   * 1) We're stopping, in which case the task is stopped anyway
+   * 2) We got a flow error above, in which case it might take
+   *    some time to forward the flow return upstream and we
+   *    would otherwise call the task function over and over
+   *    again without doing anything
+   */
+  gst_pad_pause_task (self->srcpad);
 }
 
 static gboolean
-_start (GstAggregator * self)
+gst_aggregator_start (GstAggregator * self)
 {
+  GstAggregatorClass *klass;
+  gboolean result;
+
   self->priv->running = TRUE;
   self->priv->send_stream_start = TRUE;
   self->priv->send_segment = TRUE;
   self->priv->send_eos = TRUE;
   self->priv->srccaps = NULL;
-  self->priv->flow_return = GST_FLOW_OK;
 
-  return TRUE;
+  klass = GST_AGGREGATOR_GET_CLASS (self);
+
+  if (klass->start)
+    result = klass->start (self);
+  else
+    result = TRUE;
+
+  return result;
 }
 
 static gboolean
 _check_pending_flush_stop (GstAggregatorPad * pad)
 {
-  return (!pad->priv->pending_flush_stop && !pad->priv->pending_flush_start);
+  gboolean res;
+
+  PAD_LOCK (pad);
+  res = (!pad->priv->pending_flush_stop && !pad->priv->pending_flush_start);
+  PAD_UNLOCK (pad);
+
+  return res;
 }
 
 static gboolean
-_stop_srcpad_task (GstAggregator * self, GstEvent * flush_start)
+gst_aggregator_stop_srcpad_task (GstAggregator * self, GstEvent * flush_start)
 {
   gboolean res = TRUE;
 
   GST_INFO_OBJECT (self, "%s srcpad task",
       flush_start ? "Pausing" : "Stopping");
 
+  SRC_LOCK (self);
   self->priv->running = FALSE;
+  SRC_BROADCAST (self);
+  SRC_UNLOCK (self);
 
-  /*  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);
   }
@@ -495,135 +909,181 @@
 }
 
 static void
-_start_srcpad_task (GstAggregator * self)
+gst_aggregator_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)
-{
-  GSource *source;
-  GstAggregatorPrivate *priv = self->priv;
-
-  MAIN_CONTEXT_LOCK (self);
-  source = g_idle_source_new ();
-  g_source_set_callback (source, (GSourceFunc) aggregate_func, self, NULL);
-  priv->gsources = g_list_prepend (priv->gsources, source);
-  g_source_attach (source, priv->mcontext);
-  MAIN_CONTEXT_UNLOCK (self);
+      (GstTaskFunction) gst_aggregator_aggregate_func, self, NULL);
 }
 
 static GstFlowReturn
-_flush (GstAggregator * self)
+gst_aggregator_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);
+  GST_OBJECT_LOCK (self);
+  priv->send_segment = TRUE;
+  priv->flush_seeking = FALSE;
+  priv->tags_changed = FALSE;
+  GST_OBJECT_UNLOCK (self);
   if (klass->flush)
     ret = klass->flush (self);
 
   return ret;
 }
 
+
+/* Called with GstAggregator's object lock held */
+
 static gboolean
-_all_flush_stop_received (GstAggregator * self)
+gst_aggregator_all_flush_stop_received_locked (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;
 }
 
+static void
+gst_aggregator_flush_start (GstAggregator * self, GstAggregatorPad * aggpad,
+    GstEvent * event)
+{
+  GstAggregatorPrivate *priv = self->priv;
+  GstAggregatorPadPrivate *padpriv = aggpad->priv;
+
+  gst_aggregator_pad_set_flushing (aggpad, GST_FLOW_FLUSHING, FALSE);
+
+  PAD_FLUSH_LOCK (aggpad);
+  PAD_LOCK (aggpad);
+  if (padpriv->pending_flush_start) {
+    GST_DEBUG_OBJECT (aggpad, "Expecting FLUSH_STOP now");
+
+    padpriv->pending_flush_start = FALSE;
+    padpriv->pending_flush_stop = TRUE;
+  }
+  PAD_UNLOCK (aggpad);
+
+  GST_OBJECT_LOCK (self);
+  if (priv->flush_seeking) {
+    /* If flush_seeking we forward the first FLUSH_START */
+    if (priv->pending_flush_start) {
+      priv->pending_flush_start = FALSE;
+      GST_OBJECT_UNLOCK (self);
+
+      GST_INFO_OBJECT (self, "Flushing, pausing srcpad task");
+      gst_aggregator_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;
+    } else {
+      GST_OBJECT_UNLOCK (self);
+      gst_event_unref (event);
+    }
+  } else {
+    GST_OBJECT_UNLOCK (self);
+    gst_event_unref (event);
+  }
+  PAD_FLUSH_UNLOCK (aggpad);
+}
+
+/* Must be called with the the PAD_LOCK held */
+static void
+update_time_level (GstAggregatorPad * aggpad, gboolean head)
+{
+  if (head) {
+    if (GST_CLOCK_TIME_IS_VALID (aggpad->priv->head_position) &&
+        aggpad->clip_segment.format == GST_FORMAT_TIME)
+      aggpad->priv->head_time =
+          gst_segment_to_running_time (&aggpad->clip_segment,
+          GST_FORMAT_TIME, aggpad->priv->head_position);
+    else
+      aggpad->priv->head_time = GST_CLOCK_TIME_NONE;
+  } else {
+    if (GST_CLOCK_TIME_IS_VALID (aggpad->priv->tail_position) &&
+        aggpad->segment.format == GST_FORMAT_TIME)
+      aggpad->priv->tail_time =
+          gst_segment_to_running_time (&aggpad->segment,
+          GST_FORMAT_TIME, aggpad->priv->tail_position);
+    else
+      aggpad->priv->tail_time = aggpad->priv->head_time;
+  }
+
+  if (aggpad->priv->head_time == GST_CLOCK_TIME_NONE ||
+      aggpad->priv->tail_time == GST_CLOCK_TIME_NONE) {
+    aggpad->priv->time_level = 0;
+    return;
+  }
+
+  if (aggpad->priv->tail_time > aggpad->priv->head_time)
+    aggpad->priv->time_level = 0;
+  else
+    aggpad->priv->time_level = aggpad->priv->head_time -
+        aggpad->priv->tail_time;
+}
+
+
 /* GstAggregator vmethods default implementations */
 static gboolean
-_sink_event (GstAggregator * self, GstAggregatorPad * aggpad, GstEvent * event)
+gst_aggregator_default_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");
-          _stop_srcpad_task (self, event);
-          priv->flow_return = GST_FLOW_OK;
-
-          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;
-        }
-      }
-
+      gst_aggregator_flush_start (self, aggpad, event);
       /* We forward only in one case: right after flush_seeking */
+      event = NULL;
       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)) {
+      gst_aggregator_pad_flush (aggpad, self);
+      GST_OBJECT_LOCK (self);
+      if (priv->flush_seeking) {
         g_atomic_int_set (&aggpad->priv->pending_flush_stop, FALSE);
+        if (gst_aggregator_all_flush_stop_received_locked (self)) {
+          GST_OBJECT_UNLOCK (self);
+          /* That means we received FLUSH_STOP/FLUSH_STOP on
+           * all sinkpads -- Seeking is Done... sending FLUSH_STOP */
+          gst_aggregator_flush (self);
+          gst_pad_push_event (self->srcpad, event);
+          event = NULL;
+          SRC_LOCK (self);
+          priv->send_eos = TRUE;
+          SRC_BROADCAST (self);
+          SRC_UNLOCK (self);
 
-        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);
-          }
+          GST_INFO_OBJECT (self, "Releasing source pad STREAM_LOCK");
+          GST_PAD_STREAM_UNLOCK (self->srcpad);
+          gst_aggregator_start_srcpad_task (self);
+        } else {
+          GST_OBJECT_UNLOCK (self);
         }
+      } else {
+        GST_OBJECT_UNLOCK (self);
       }
 
       /* We never forward the event */
@@ -637,28 +1097,79 @@
        * 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;
+      SRC_LOCK (self);
+      PAD_LOCK (aggpad);
+      if (gst_aggregator_pad_queue_is_empty (aggpad)) {
+        aggpad->priv->eos = TRUE;
       } else {
         aggpad->priv->pending_eos = TRUE;
       }
-      PAD_UNLOCK_EVENT (aggpad);
+      PAD_UNLOCK (aggpad);
 
-      _add_aggregate_gsource (self);
+      SRC_BROADCAST (self);
+      SRC_UNLOCK (self);
       goto eat;
     }
     case GST_EVENT_SEGMENT:
     {
-      PAD_LOCK_EVENT (aggpad);
+      PAD_LOCK (aggpad);
+      GST_OBJECT_LOCK (aggpad);
       gst_event_copy_segment (event, &aggpad->segment);
-      PAD_UNLOCK_EVENT (aggpad);
+      update_time_level (aggpad, FALSE);
+      GST_OBJECT_UNLOCK (aggpad);
+      PAD_UNLOCK (aggpad);
+
+      GST_OBJECT_LOCK (self);
+      self->priv->seqnum = gst_event_get_seqnum (event);
+      GST_OBJECT_UNLOCK (self);
       goto eat;
     }
     case GST_EVENT_STREAM_START:
     {
       goto eat;
     }
+    case GST_EVENT_GAP:
+    {
+      GstClockTime pts, endpts;
+      GstClockTime duration;
+      GstBuffer *gapbuf;
+
+      gst_event_parse_gap (event, &pts, &duration);
+      gapbuf = gst_buffer_new ();
+
+      if (GST_CLOCK_TIME_IS_VALID (duration))
+        endpts = pts + duration;
+      else
+        endpts = GST_CLOCK_TIME_NONE;
+
+      GST_OBJECT_LOCK (aggpad);
+      res = gst_segment_clip (&aggpad->segment, GST_FORMAT_TIME, pts, endpts,
+          &pts, &endpts);
+      GST_OBJECT_UNLOCK (aggpad);
+
+      if (!res) {
+        GST_WARNING_OBJECT (self, "GAP event outside segment, dropping");
+        goto eat;
+      }
+
+      if (GST_CLOCK_TIME_IS_VALID (endpts) && GST_CLOCK_TIME_IS_VALID (pts))
+        duration = endpts - pts;
+      else
+        duration = GST_CLOCK_TIME_NONE;
+
+      GST_BUFFER_PTS (gapbuf) = pts;
+      GST_BUFFER_DURATION (gapbuf) = duration;
+      GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP);
+      GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_DROPPABLE);
+
+      if (gst_aggregator_pad_chain_internal (self, aggpad, gapbuf, FALSE) !=
+          GST_FLOW_OK) {
+        GST_WARNING_OBJECT (self, "Failed to chain gap buffer");
+        res = FALSE;
+      }
+
+      goto eat;
+    }
     case GST_EVENT_TAG:
     {
       GstTagList *tags;
@@ -690,41 +1201,54 @@
   return res;
 }
 
-static gboolean
-_flush_pad (GstAggregator * self, GstAggregatorPad * pad, gpointer unused_udata)
+static inline gboolean
+gst_aggregator_stop_pad (GstAggregator * self, GstAggregatorPad * pad,
+    gpointer unused_udata)
 {
-  _aggpad_flush (pad, self);
+  gst_aggregator_pad_flush (pad, self);
 
   return TRUE;
 }
 
 static gboolean
-_stop (GstAggregator * agg)
+gst_aggregator_stop (GstAggregator * agg)
 {
-  _reset_flow_values (agg);
+  GstAggregatorClass *klass;
+  gboolean result;
 
-  gst_aggregator_iterate_sinkpads (agg,
-      (GstAggregatorPadForeachFunc) _flush_pad, NULL);
+  gst_aggregator_reset_flow_values (agg);
+
+  gst_aggregator_iterate_sinkpads (agg, gst_aggregator_stop_pad, NULL);
+
+  klass = GST_AGGREGATOR_GET_CLASS (agg);
+
+  if (klass->stop)
+    result = klass->stop (agg);
+  else
+    result = TRUE;
+
+  agg->priv->has_peer_latency = FALSE;
+  agg->priv->peer_latency_live = FALSE;
+  agg->priv->peer_latency_min = agg->priv->peer_latency_max = FALSE;
 
   if (agg->priv->tags)
     gst_tag_list_unref (agg->priv->tags);
   agg->priv->tags = NULL;
 
-  return TRUE;
+  return result;
 }
 
 /* GstElement vmethods implementations */
 static GstStateChangeReturn
-_change_state (GstElement * element, GstStateChange transition)
+gst_aggregator_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);
+      if (!gst_aggregator_start (self))
+        goto error_start;
       break;
     default:
       break;
@@ -738,7 +1262,10 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      agg_class->stop (self);
+      if (!gst_aggregator_stop (self)) {
+        /* What to do in this case? Error out? */
+        GST_ERROR_OBJECT (self, "Subclass failed to stop.");
+      }
       break;
     default:
       break;
@@ -746,34 +1273,38 @@
 
   return ret;
 
+/* ERRORS */
 failure:
   {
     GST_ERROR_OBJECT (element, "parent failed state change");
     return ret;
   }
+error_start:
+  {
+    GST_ERROR_OBJECT (element, "Subclass failed to start");
+    return GST_STATE_CHANGE_FAILURE;
+  }
 }
 
 static void
-_release_pad (GstElement * element, GstPad * pad)
+gst_aggregator_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);
+  SRC_LOCK (self);
+  gst_aggregator_pad_set_flushing (aggpad, GST_FLOW_FLUSHING, TRUE);
   gst_element_remove_pad (element, pad);
 
-  /* Something changed make sure we try to aggregate */
-  _add_aggregate_gsource (self);
+  self->priv->has_peer_latency = FALSE;
+  SRC_BROADCAST (self);
+  SRC_UNLOCK (self);
 }
 
 static GstPad *
-_request_new_pad (GstElement * element,
+gst_aggregator_request_new_pad (GstElement * element,
     GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
 {
   GstAggregator *self;
@@ -804,6 +1335,7 @@
     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 {
@@ -811,6 +1343,7 @@
   }
 
   GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (agg_pad));
+  self->priv->has_peer_latency = FALSE;
 
   if (priv->running)
     gst_pad_set_active (GST_PAD (agg_pad), TRUE);
@@ -821,8 +1354,169 @@
   return GST_PAD (agg_pad);
 }
 
+/* Must be called with SRC_LOCK held */
+
 static gboolean
-_src_query (GstAggregator * self, GstQuery * query)
+gst_aggregator_query_latency_unlocked (GstAggregator * self, GstQuery * query)
+{
+  gboolean query_ret, live;
+  GstClockTime our_latency, min, max;
+
+  query_ret = gst_pad_query_default (self->srcpad, GST_OBJECT (self), query);
+
+  if (!query_ret) {
+    GST_WARNING_OBJECT (self, "Latency query failed");
+    return FALSE;
+  }
+
+  gst_query_parse_latency (query, &live, &min, &max);
+
+  our_latency = self->priv->latency;
+
+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (min))) {
+    GST_ERROR_OBJECT (self, "Invalid minimum latency %" GST_TIME_FORMAT
+        ". Please file a bug at " PACKAGE_BUGREPORT ".", GST_TIME_ARGS (min));
+    return FALSE;
+  }
+
+  if (min > max && GST_CLOCK_TIME_IS_VALID (max)) {
+    GST_ELEMENT_WARNING (self, CORE, CLOCK, (NULL),
+        ("Impossible to configure latency: max %" GST_TIME_FORMAT " < min %"
+            GST_TIME_FORMAT ". Add queues or other buffering elements.",
+            GST_TIME_ARGS (max), GST_TIME_ARGS (min)));
+    return FALSE;
+  }
+
+  self->priv->peer_latency_live = live;
+  self->priv->peer_latency_min = min;
+  self->priv->peer_latency_max = max;
+  self->priv->has_peer_latency = TRUE;
+
+  /* add our own */
+  min += our_latency;
+  min += self->priv->sub_latency_min;
+  if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max)
+      && GST_CLOCK_TIME_IS_VALID (max))
+    max += self->priv->sub_latency_max + our_latency;
+  else
+    max = GST_CLOCK_TIME_NONE;
+
+  if (live && min > max) {
+    GST_ELEMENT_WARNING (self, CORE, NEGOTIATION,
+        ("%s", "Latency too big"),
+        ("The requested latency value is too big for the current pipeline. "
+            "Limiting to %" G_GINT64_FORMAT, max));
+    min = max;
+    /* FIXME: This could in theory become negative, but in
+     * that case all is lost anyway */
+    self->priv->latency -= min - max;
+    /* FIXME: shouldn't we g_object_notify() the change here? */
+  }
+
+  SRC_BROADCAST (self);
+
+  GST_DEBUG_OBJECT (self, "configured latency live:%s min:%" G_GINT64_FORMAT
+      " max:%" G_GINT64_FORMAT, live ? "true" : "false", min, max);
+
+  gst_query_set_latency (query, live, min, max);
+
+  return query_ret;
+}
+
+/*
+ * MUST be called with the src_lock held.
+ *
+ * See  gst_aggregator_get_latency() for doc
+ */
+static GstClockTime
+gst_aggregator_get_latency_unlocked (GstAggregator * self)
+{
+  GstClockTime latency;
+
+  g_return_val_if_fail (GST_IS_AGGREGATOR (self), 0);
+
+  if (!self->priv->has_peer_latency) {
+    GstQuery *query = gst_query_new_latency ();
+    gboolean ret;
+
+    ret = gst_aggregator_query_latency_unlocked (self, query);
+    gst_query_unref (query);
+    if (!ret)
+      return GST_CLOCK_TIME_NONE;
+  }
+
+  if (!self->priv->has_peer_latency || !self->priv->peer_latency_live)
+    return GST_CLOCK_TIME_NONE;
+
+  /* latency_min is never GST_CLOCK_TIME_NONE by construction */
+  latency = self->priv->peer_latency_min;
+
+  /* add our own */
+  latency += self->priv->latency;
+  latency += self->priv->sub_latency_min;
+
+  return latency;
+}
+
+/**
+ * gst_aggregator_get_latency:
+ * @self: a #GstAggregator
+ *
+ * Retrieves the latency values reported by @self in response to the latency
+ * query, or %GST_CLOCK_TIME_NONE if there is not live source connected and the element
+ * will not wait for the clock.
+ *
+ * Typically only called by subclasses.
+ *
+ * Returns: The latency or %GST_CLOCK_TIME_NONE if the element does not sync
+ */
+GstClockTime
+gst_aggregator_get_latency (GstAggregator * self)
+{
+  GstClockTime ret;
+
+  SRC_LOCK (self);
+  ret = gst_aggregator_get_latency_unlocked (self);
+  SRC_UNLOCK (self);
+
+  return ret;
+}
+
+static gboolean
+gst_aggregator_send_event (GstElement * element, GstEvent * event)
+{
+  GstAggregator *self = GST_AGGREGATOR (element);
+
+  GST_STATE_LOCK (element);
+  if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK &&
+      GST_STATE (element) < GST_STATE_PAUSED) {
+    gdouble rate;
+    GstFormat fmt;
+    GstSeekFlags flags;
+    GstSeekType start_type, stop_type;
+    gint64 start, stop;
+
+    gst_event_parse_seek (event, &rate, &fmt, &flags, &start_type,
+        &start, &stop_type, &stop);
+
+    GST_OBJECT_LOCK (self);
+    gst_segment_do_seek (&self->segment, rate, fmt, flags, start_type, start,
+        stop_type, stop, NULL);
+    self->priv->seqnum = gst_event_get_seqnum (event);
+    self->priv->first_buffer = FALSE;
+    GST_OBJECT_UNLOCK (self);
+
+    GST_DEBUG_OBJECT (element, "Storing segment %" GST_PTR_FORMAT, event);
+  }
+  GST_STATE_UNLOCK (element);
+
+
+  return GST_ELEMENT_CLASS (aggregator_parent_class)->send_event (element,
+      event);
+}
+
+static gboolean
+gst_aggregator_default_src_query (GstAggregator * self, GstQuery * query)
 {
   gboolean res = TRUE;
 
@@ -837,24 +1531,27 @@
       gst_query_set_seeking (query, format, FALSE, 0, -1);
       res = TRUE;
 
-      goto discard;
-    }
-    default:
       break;
+    }
+    case GST_QUERY_LATENCY:
+      SRC_LOCK (self);
+      res = gst_aggregator_query_latency_unlocked (self, query);
+      SRC_UNLOCK (self);
+      break;
+    default:
+      return gst_pad_query_default (self->srcpad, GST_OBJECT (self), query);
   }
 
-  return gst_pad_query_default (self->srcpad, GST_OBJECT (self), query);
-
-discard:
   return res;
 }
 
 static gboolean
-event_forward_func (GstPad * pad, EventData * evdata)
+gst_aggregator_event_forward_func (GstPad * pad, gpointer user_data)
 {
+  EventData *evdata = user_data;
   gboolean ret = TRUE;
   GstPad *peer = gst_pad_get_peer (pad);
-  GstAggregatorPadPrivate *padpriv = GST_AGGREGATOR_PAD (pad)->priv;
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
 
   if (peer) {
     ret = gst_pad_send_event (peer, gst_event_ref (evdata->event));
@@ -862,60 +1559,85 @@
     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 (GST_EVENT_TYPE (evdata->event) == GST_EVENT_SEEK) {
+      GstQuery *seeking = gst_query_new_seeking (GST_FORMAT_TIME);
+
+      if (gst_pad_query (peer, seeking)) {
+        gboolean seekable;
+
+        gst_query_parse_seeking (seeking, NULL, &seekable, NULL, NULL);
+
+        if (seekable == FALSE) {
+          GST_INFO_OBJECT (pad,
+              "Source not seekable, We failed but it does not matter!");
+
+          ret = TRUE;
+        }
+      } else {
+        GST_ERROR_OBJECT (pad, "Query seeking FAILED");
+      }
+
+      gst_query_unref (seeking);
+    }
 
     if (evdata->flush) {
-      padpriv->pending_flush_start = FALSE;
-      padpriv->pending_flush_stop = FALSE;
+      PAD_LOCK (aggpad);
+      aggpad->priv->pending_flush_start = FALSE;
+      aggpad->priv->pending_flush_stop = FALSE;
+      PAD_UNLOCK (aggpad);
     }
+  } else {
+    evdata->one_actually_seeked = TRUE;
   }
 
+  evdata->result &= ret;
+
   /* 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)
+static EventData
+gst_aggregator_forward_event_to_all_sinkpads (GstAggregator * self,
+    GstEvent * event, gboolean flush)
 {
   EventData evdata;
 
   evdata.event = event;
   evdata.result = TRUE;
   evdata.flush = flush;
+  evdata.one_actually_seeked = FALSE;
 
   /* 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);
+  if (flush) {
+    GList *l;
+
+    GST_OBJECT_LOCK (self);
+    for (l = GST_ELEMENT_CAST (self)->sinkpads; l != NULL; l = l->next) {
+      GstAggregatorPad *pad = l->data;
+
+      PAD_LOCK (pad);
+      pad->priv->pending_flush_start = TRUE;
+      pad->priv->pending_flush_stop = FALSE;
+      PAD_UNLOCK (pad);
+    }
+    GST_OBJECT_UNLOCK (self);
+  }
+
+  gst_pad_forward (self->srcpad, gst_aggregator_event_forward_func, &evdata);
 
   gst_event_unref (event);
 
-  return evdata.result;
+  return evdata;
 }
 
 static gboolean
-_do_seek (GstAggregator * self, GstEvent * event)
+gst_aggregator_do_seek (GstAggregator * self, GstEvent * event)
 {
   gdouble rate;
   GstFormat fmt;
@@ -923,7 +1645,7 @@
   GstSeekType start_type, stop_type;
   gint64 start, stop;
   gboolean flush;
-  gboolean res;
+  EventData evdata;
   GstAggregatorPrivate *priv = self->priv;
 
   gst_event_parse_seek (event, &rate, &fmt, &flags, &start_type,
@@ -933,40 +1655,46 @@
 
   flush = flags & GST_SEEK_FLAG_FLUSH;
 
+  GST_OBJECT_LOCK (self);
   if (flush) {
-    g_atomic_int_set (&priv->pending_flush_start, TRUE);
-    g_atomic_int_set (&priv->flush_seeking, TRUE);
+    priv->pending_flush_start = TRUE;
+    priv->flush_seeking = TRUE;
   }
 
   gst_segment_do_seek (&self->segment, rate, fmt, flags, start_type, start,
       stop_type, stop, NULL);
 
+  /* Seeking sets a position */
+  self->priv->first_buffer = FALSE;
+  GST_OBJECT_UNLOCK (self);
+
   /* forward the seek upstream */
-  res = _forward_event_to_all_sinkpads (self, event, flush);
+  evdata = gst_aggregator_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);
+  if (!evdata.result || !evdata.one_actually_seeked) {
+    GST_OBJECT_LOCK (self);
+    priv->flush_seeking = FALSE;
+    priv->pending_flush_start = FALSE;
+    GST_OBJECT_UNLOCK (self);
   }
 
-  GST_INFO_OBJECT (self, "seek done, result: %d", res);
+  GST_INFO_OBJECT (self, "seek done, result: %d", evdata.result);
 
-  return res;
+  return evdata.result;
 }
 
 static gboolean
-_src_event (GstAggregator * self, GstEvent * event)
+gst_aggregator_default_src_event (GstAggregator * self, GstEvent * event)
 {
+  EventData evdata;
   gboolean res = TRUE;
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:
     {
       gst_event_ref (event);
-      res = _do_seek (self, event);
-      if (res)
-        self->priv->seqnum = gst_event_get_seqnum (event);
+      res = gst_aggregator_do_seek (self, event);
       gst_event_unref (event);
       event = NULL;
       goto done;
@@ -984,14 +1712,16 @@
     }
   }
 
-  return _forward_event_to_all_sinkpads (self, event, FALSE);
+  evdata = gst_aggregator_forward_event_to_all_sinkpads (self, event, FALSE);
+  res = evdata.result;
 
 done:
   return res;
 }
 
 static gboolean
-src_event_func (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_aggregator_src_pad_event_func (GstPad * pad, GstObject * parent,
+    GstEvent * event)
 {
   GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
 
@@ -999,7 +1729,8 @@
 }
 
 static gboolean
-src_query_func (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_aggregator_src_pad_query_func (GstPad * pad, GstObject * parent,
+    GstQuery * query)
 {
   GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
 
@@ -1007,7 +1738,7 @@
 }
 
 static gboolean
-src_activate_mode (GstPad * pad,
+gst_aggregator_src_pad_activate_mode_func (GstPad * pad,
     GstObject * parent, GstPadMode mode, gboolean active)
 {
   GstAggregator *self = GST_AGGREGATOR (parent);
@@ -1024,7 +1755,7 @@
       case GST_PAD_MODE_PUSH:
       {
         GST_INFO_OBJECT (pad, "Activating pad!");
-        _start_srcpad_task (self);
+        gst_aggregator_start_srcpad_task (self);
         return TRUE;
       }
       default:
@@ -1037,13 +1768,14 @@
 
   /* deactivating */
   GST_INFO_OBJECT (self, "Deactivating srcpad");
-  _stop_srcpad_task (self, FALSE);
+  gst_aggregator_stop_srcpad_task (self, FALSE);
 
   return TRUE;
 }
 
 static gboolean
-_sink_query (GstAggregator * self, GstAggregatorPad * aggpad, GstQuery * query)
+gst_aggregator_default_sink_query (GstAggregator * self,
+    GstAggregatorPad * aggpad, GstQuery * query)
 {
   GstPad *pad = GST_PAD (aggpad);
 
@@ -1055,20 +1787,129 @@
 {
   GstAggregator *self = (GstAggregator *) object;
 
-  g_mutex_clear (&self->priv->mcontext_lock);
+  g_mutex_clear (&self->priv->src_lock);
+  g_cond_clear (&self->priv->src_cond);
 
   G_OBJECT_CLASS (aggregator_parent_class)->finalize (object);
 }
 
+/*
+ * gst_aggregator_set_latency_property:
+ * @agg: a #GstAggregator
+ * @latency: the new latency value (in nanoseconds).
+ *
+ * Sets the new latency value to @latency. This value is used to limit the
+ * amount of time a pad waits for data to appear before considering the pad
+ * as unresponsive.
+ */
 static void
-gst_aggregator_dispose (GObject * object)
+gst_aggregator_set_latency_property (GstAggregator * self, gint64 latency)
 {
-  GstAggregator *self = (GstAggregator *) object;
+  gboolean changed;
 
-  G_OBJECT_CLASS (aggregator_parent_class)->dispose (object);
+  g_return_if_fail (GST_IS_AGGREGATOR (self));
+  g_return_if_fail (GST_CLOCK_TIME_IS_VALID (latency));
 
-  g_main_context_unref (self->priv->mcontext);
-  _remove_all_sources (self);
+  SRC_LOCK (self);
+  changed = (self->priv->latency != latency);
+
+  if (changed) {
+    GList *item;
+
+    GST_OBJECT_LOCK (self);
+    /* First lock all the pads */
+    for (item = GST_ELEMENT_CAST (self)->sinkpads; item; item = item->next) {
+      GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (item->data);
+      PAD_LOCK (aggpad);
+    }
+
+    self->priv->latency = latency;
+
+    SRC_BROADCAST (self);
+
+    /* Now wake up the pads */
+    for (item = GST_ELEMENT_CAST (self)->sinkpads; item; item = item->next) {
+      GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (item->data);
+      PAD_BROADCAST_EVENT (aggpad);
+      PAD_UNLOCK (aggpad);
+    }
+    GST_OBJECT_UNLOCK (self);
+  }
+
+  SRC_UNLOCK (self);
+
+  if (changed)
+    gst_element_post_message (GST_ELEMENT_CAST (self),
+        gst_message_new_latency (GST_OBJECT_CAST (self)));
+}
+
+/*
+ * gst_aggregator_get_latency_property:
+ * @agg: a #GstAggregator
+ *
+ * Gets the latency value. See gst_aggregator_set_latency for
+ * more details.
+ *
+ * Returns: The time in nanoseconds to wait for data to arrive on a sink pad 
+ * before a pad is deemed unresponsive. A value of -1 means an
+ * unlimited time.
+ */
+static gint64
+gst_aggregator_get_latency_property (GstAggregator * agg)
+{
+  gint64 res;
+
+  g_return_val_if_fail (GST_IS_AGGREGATOR (agg), -1);
+
+  GST_OBJECT_LOCK (agg);
+  res = agg->priv->latency;
+  GST_OBJECT_UNLOCK (agg);
+
+  return res;
+}
+
+static void
+gst_aggregator_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAggregator *agg = GST_AGGREGATOR (object);
+
+  switch (prop_id) {
+    case PROP_LATENCY:
+      gst_aggregator_set_latency_property (agg, g_value_get_int64 (value));
+      break;
+    case PROP_START_TIME_SELECTION:
+      agg->priv->start_time_selection = g_value_get_enum (value);
+      break;
+    case PROP_START_TIME:
+      agg->priv->start_time = g_value_get_uint64 (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_aggregator_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAggregator *agg = GST_AGGREGATOR (object);
+
+  switch (prop_id) {
+    case PROP_LATENCY:
+      g_value_set_int64 (value, gst_aggregator_get_latency_property (agg));
+      break;
+    case PROP_START_TIME_SELECTION:
+      g_value_set_enum (value, agg->priv->start_time_selection);
+      break;
+    case PROP_START_TIME:
+      g_value_set_uint64 (value, agg->priv->start_time);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
 }
 
 /* GObject vmethods implementations */
@@ -1085,21 +1926,47 @@
       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->sink_event = gst_aggregator_default_sink_event;
+  klass->sink_query = gst_aggregator_default_sink_query;
 
-  klass->src_event = _src_event;
-  klass->src_query = _src_query;
+  klass->src_event = gst_aggregator_default_src_event;
+  klass->src_query = gst_aggregator_default_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);
+  gstelement_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);
+  gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_aggregator_send_event);
+  gstelement_class->release_pad =
+      GST_DEBUG_FUNCPTR (gst_aggregator_release_pad);
+  gstelement_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_aggregator_change_state);
 
+  gobject_class->set_property = gst_aggregator_set_property;
+  gobject_class->get_property = gst_aggregator_get_property;
   gobject_class->finalize = gst_aggregator_finalize;
-  gobject_class->dispose = gst_aggregator_dispose;
+
+  g_object_class_install_property (gobject_class, PROP_LATENCY,
+      g_param_spec_int64 ("latency", "Buffer latency",
+          "Additional latency in live mode to allow upstream "
+          "to take longer to produce buffers for the current "
+          "position (in nanoseconds)", 0,
+          (G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND - 1),
+          DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_START_TIME_SELECTION,
+      g_param_spec_enum ("start-time-selection", "Start Time Selection",
+          "Decides which start time is output",
+          gst_aggregator_start_time_selection_get_type (),
+          DEFAULT_START_TIME_SELECTION,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_START_TIME,
+      g_param_spec_uint64 ("start-time", "Start Time",
+          "Start time to use if start-time-selection=set", 0,
+          G_MAXUINT64,
+          DEFAULT_START_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  GST_DEBUG_REGISTER_FUNCPTR (gst_aggregator_stop_pad);
 }
 
 static void
@@ -1122,21 +1989,30 @@
 
   priv->padcount = -1;
   priv->tags_changed = FALSE;
-  _reset_flow_values (self);
 
-  priv->mcontext = g_main_context_new ();
+  self->priv->peer_latency_live = FALSE;
+  self->priv->peer_latency_min = self->priv->sub_latency_min = 0;
+  self->priv->peer_latency_max = self->priv->sub_latency_max = 0;
+  self->priv->has_peer_latency = FALSE;
+  gst_aggregator_reset_flow_values (self);
+
   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_DEBUG_FUNCPTR (gst_aggregator_src_pad_event_func));
   gst_pad_set_query_function (self->srcpad,
-      GST_DEBUG_FUNCPTR ((GstPadQueryFunction) src_query_func));
+      GST_DEBUG_FUNCPTR (gst_aggregator_src_pad_query_func));
   gst_pad_set_activatemode_function (self->srcpad,
-      GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) src_activate_mode));
+      GST_DEBUG_FUNCPTR (gst_aggregator_src_pad_activate_mode_func));
 
   gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
 
-  g_mutex_init (&self->priv->mcontext_lock);
+  self->priv->latency = DEFAULT_LATENCY;
+  self->priv->start_time_selection = DEFAULT_START_TIME_SELECTION;
+  self->priv->start_time = DEFAULT_START_TIME;
+
+  g_mutex_init (&self->priv->src_lock);
+  g_cond_init (&self->priv->src_cond);
 }
 
 /* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
@@ -1167,100 +2043,309 @@
   return type;
 }
 
+/* Must be called with SRC lock and PAD lock held */
+static gboolean
+gst_aggregator_pad_has_space (GstAggregator * self, GstAggregatorPad * aggpad)
+{
+  /* Empty queue always has space */
+  if (g_queue_get_length (&aggpad->priv->buffers) == 0)
+    return TRUE;
+
+  /* We also want at least two buffers, one is being processed and one is ready
+   * for the next iteration when we operate in live mode. */
+  if (self->priv->peer_latency_live && aggpad->priv->num_buffers < 2)
+    return TRUE;
+
+  /* zero latency, if there is a buffer, it's full */
+  if (self->priv->latency == 0)
+    return FALSE;
+
+  /* Allow no more buffers than the latency */
+  return (aggpad->priv->time_level <= self->priv->latency);
+}
+
+/* Must be called with the PAD_LOCK held */
+static void
+apply_buffer (GstAggregatorPad * aggpad, GstBuffer * buffer, gboolean head)
+{
+  GstClockTime timestamp;
+
+  if (GST_BUFFER_DTS_IS_VALID (buffer))
+    timestamp = GST_BUFFER_DTS (buffer);
+  else
+    timestamp = GST_BUFFER_PTS (buffer);
+
+  if (timestamp == GST_CLOCK_TIME_NONE) {
+    if (head)
+      timestamp = aggpad->priv->head_position;
+    else
+      timestamp = aggpad->priv->tail_position;
+  }
+
+  /* add duration */
+  if (GST_BUFFER_DURATION_IS_VALID (buffer))
+    timestamp += GST_BUFFER_DURATION (buffer);
+
+  if (head)
+    aggpad->priv->head_position = timestamp;
+  else
+    aggpad->priv->tail_position = timestamp;
+
+  update_time_level (aggpad, head);
+}
+
 static GstFlowReturn
-_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
+gst_aggregator_pad_chain_internal (GstAggregator * self,
+    GstAggregatorPad * aggpad, GstBuffer * buffer, gboolean head)
 {
   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);
+  GstAggregatorClass *aggclass = GST_AGGREGATOR_GET_CLASS (self);
+  GstFlowReturn flow_return;
+  GstClockTime buf_pts;
 
   GST_DEBUG_OBJECT (aggpad, "Start chaining a buffer %" GST_PTR_FORMAT, buffer);
 
-  if (g_atomic_int_get (&aggpad->priv->flushing) == TRUE)
+  PAD_FLUSH_LOCK (aggpad);
+
+  PAD_LOCK (aggpad);
+  flow_return = aggpad->priv->flow_return;
+  if (flow_return != GST_FLOW_OK)
     goto flushing;
 
-  if (g_atomic_int_get (&aggpad->priv->pending_eos) == TRUE)
+  if (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)
+  flow_return = aggpad->priv->flow_return;
+  if (flow_return != GST_FLOW_OK)
     goto flushing;
 
+  PAD_UNLOCK (aggpad);
 
-  if (aggclass->clip) {
+  if (aggclass->clip && head) {
     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);
+  if (actual_buf == NULL) {
+    GST_LOG_OBJECT (actual_buf, "Buffer dropped by clip function");
+    goto done;
+  }
 
-  _add_aggregate_gsource (self);
+  buf_pts = GST_BUFFER_PTS (actual_buf);
+
+  for (;;) {
+    SRC_LOCK (self);
+    PAD_LOCK (aggpad);
+    if (gst_aggregator_pad_has_space (self, aggpad)
+        && aggpad->priv->flow_return == GST_FLOW_OK) {
+      if (head)
+        g_queue_push_head (&aggpad->priv->buffers, actual_buf);
+      else
+        g_queue_push_tail (&aggpad->priv->buffers, actual_buf);
+      apply_buffer (aggpad, actual_buf, head);
+      aggpad->priv->num_buffers++;
+      actual_buf = buffer = NULL;
+      SRC_BROADCAST (self);
+      break;
+    }
+
+    flow_return = aggpad->priv->flow_return;
+    if (flow_return != GST_FLOW_OK) {
+      SRC_UNLOCK (self);
+      goto flushing;
+    }
+    GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed");
+    SRC_UNLOCK (self);
+    PAD_WAIT_EVENT (aggpad);
+
+    PAD_UNLOCK (aggpad);
+  }
+
+  if (self->priv->first_buffer) {
+    GstClockTime start_time;
+
+    switch (self->priv->start_time_selection) {
+      case GST_AGGREGATOR_START_TIME_SELECTION_ZERO:
+      default:
+        start_time = 0;
+        break;
+      case GST_AGGREGATOR_START_TIME_SELECTION_FIRST:
+        if (aggpad->segment.format == GST_FORMAT_TIME) {
+          start_time = buf_pts;
+          if (start_time != -1) {
+            start_time = MAX (start_time, aggpad->segment.start);
+            start_time =
+                gst_segment_to_running_time (&aggpad->segment, GST_FORMAT_TIME,
+                start_time);
+          }
+        } else {
+          start_time = 0;
+          GST_WARNING_OBJECT (aggpad,
+              "Ignoring request of selecting the first start time "
+              "as the segment is a %s segment instead of a time segment",
+              gst_format_get_name (aggpad->segment.format));
+        }
+        break;
+      case GST_AGGREGATOR_START_TIME_SELECTION_SET:
+        start_time = self->priv->start_time;
+        if (start_time == -1)
+          start_time = 0;
+        break;
+    }
+
+    if (start_time != -1) {
+      if (self->segment.position == -1)
+        self->segment.position = start_time;
+      else
+        self->segment.position = MIN (start_time, self->segment.position);
+      self->segment.start = MIN (start_time, self->segment.start);
+      self->segment.time = MIN (start_time, self->segment.time);
+
+      GST_DEBUG_OBJECT (self, "Selecting start time %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (start_time));
+    }
+  }
+
+  PAD_UNLOCK (aggpad);
+  SRC_UNLOCK (self);
+
+done:
+
+  PAD_FLUSH_UNLOCK (aggpad);
 
   GST_DEBUG_OBJECT (aggpad, "Done chaining");
 
-  return priv->flow_return;
+  return flow_return;
 
 flushing:
+  PAD_UNLOCK (aggpad);
+  PAD_FLUSH_UNLOCK (aggpad);
 
-  gst_buffer_unref (buffer);
-  GST_DEBUG_OBJECT (aggpad, "We are flushing");
+  GST_DEBUG_OBJECT (aggpad, "Pad is %s, dropping buffer",
+      gst_flow_get_name (flow_return));
+  if (buffer)
+    gst_buffer_unref (buffer);
 
-  return GST_FLOW_FLUSHING;
+  return flow_return;
 
 eos:
+  PAD_UNLOCK (aggpad);
+  PAD_FLUSH_UNLOCK (aggpad);
 
   gst_buffer_unref (buffer);
-  GST_DEBUG_OBJECT (pad, "We are EOS already...");
+  GST_DEBUG_OBJECT (aggpad, "We are EOS already...");
 
   return GST_FLOW_EOS;
 }
 
-static gboolean
-pad_query_func (GstPad * pad, GstObject * parent, GstQuery * query)
+static GstFlowReturn
+gst_aggregator_pad_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
 {
+  return gst_aggregator_pad_chain_internal (GST_AGGREGATOR_CAST (object),
+      GST_AGGREGATOR_PAD_CAST (pad), buffer, TRUE);
+}
+
+static gboolean
+gst_aggregator_pad_query_func (GstPad * pad, GstObject * parent,
+    GstQuery * query)
+{
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
   GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
 
+  if (GST_QUERY_IS_SERIALIZED (query)) {
+    PAD_LOCK (aggpad);
+
+    while (!gst_aggregator_pad_queue_is_empty (aggpad)
+        && aggpad->priv->flow_return == GST_FLOW_OK) {
+      GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed");
+      PAD_WAIT_EVENT (aggpad);
+    }
+
+    if (aggpad->priv->flow_return != GST_FLOW_OK)
+      goto flushing;
+
+    PAD_UNLOCK (aggpad);
+  }
+
   return klass->sink_query (GST_AGGREGATOR (parent),
       GST_AGGREGATOR_PAD (pad), query);
+
+flushing:
+  GST_DEBUG_OBJECT (aggpad, "Pad is %s, dropping query",
+      gst_flow_get_name (aggpad->priv->flow_return));
+  PAD_UNLOCK (aggpad);
+  return FALSE;
 }
 
 static gboolean
-pad_event_func (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_aggregator_pad_event_func (GstPad * pad, GstObject * parent,
+    GstEvent * event)
 {
+  GstAggregator *self = GST_AGGREGATOR (parent);
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
   GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
 
-  return klass->sink_event (GST_AGGREGATOR (parent),
-      GST_AGGREGATOR_PAD (pad), event);
+  if (GST_EVENT_IS_SERIALIZED (event) && GST_EVENT_TYPE (event) != GST_EVENT_EOS
+      /* && GST_EVENT_TYPE (event) != GST_EVENT_SEGMENT_DONE */ ) {
+    SRC_LOCK (self);
+    PAD_LOCK (aggpad);
+
+    if (aggpad->priv->flow_return != GST_FLOW_OK
+        && GST_EVENT_TYPE (event) != GST_EVENT_FLUSH_STOP)
+      goto flushing;
+
+    if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
+      GST_OBJECT_LOCK (aggpad);
+      gst_event_copy_segment (event, &aggpad->clip_segment);
+      aggpad->priv->head_position = aggpad->clip_segment.position;
+      update_time_level (aggpad, TRUE);
+      GST_OBJECT_UNLOCK (aggpad);
+    }
+
+    if (!gst_aggregator_pad_queue_is_empty (aggpad) &&
+        GST_EVENT_TYPE (event) != GST_EVENT_FLUSH_STOP) {
+      GST_DEBUG_OBJECT (aggpad, "Store event in queue: %" GST_PTR_FORMAT,
+          event);
+      g_queue_push_head (&aggpad->priv->buffers, event);
+      event = NULL;
+      SRC_BROADCAST (self);
+    }
+    PAD_UNLOCK (aggpad);
+    SRC_UNLOCK (self);
+  }
+
+  if (event)
+    return klass->sink_event (self, aggpad, event);
+  else
+    return TRUE;
+
+flushing:
+  GST_DEBUG_OBJECT (aggpad, "Pad is %s, dropping event",
+      gst_flow_get_name (aggpad->priv->flow_return));
+  PAD_UNLOCK (aggpad);
+  SRC_UNLOCK (self);
+  if (GST_EVENT_IS_STICKY (event))
+    gst_pad_store_sticky_event (pad, event);
+  gst_event_unref (event);
+  return FALSE;
 }
 
 static gboolean
-pad_activate_mode_func (GstPad * pad,
+gst_aggregator_pad_activate_mode_func (GstPad * pad,
     GstObject * parent, GstPadMode mode, gboolean active)
 {
+  GstAggregator *self = GST_AGGREGATOR (parent);
   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);
+    SRC_LOCK (self);
+    gst_aggregator_pad_set_flushing (aggpad, GST_FLOW_FLUSHING, TRUE);
+    SRC_BROADCAST (self);
+    SRC_UNLOCK (self);
   } else {
-    g_atomic_int_set (&aggpad->priv->flushing, FALSE);
-    PAD_LOCK_EVENT (aggpad);
+    PAD_LOCK (aggpad);
+    aggpad->priv->flow_return = GST_FLOW_OK;
     PAD_BROADCAST_EVENT (aggpad);
-    PAD_UNLOCK_EVENT (aggpad);
+    PAD_UNLOCK (aggpad);
   }
 
   return TRUE;
@@ -1269,22 +2354,21 @@
 /***********************************
  * GstAggregatorPad implementation  *
  ************************************/
-static GstPadClass *aggregator_pad_parent_class = NULL;
 G_DEFINE_TYPE (GstAggregatorPad, gst_aggregator_pad, GST_TYPE_PAD);
 
 static void
-_pad_constructed (GObject * object)
+gst_aggregator_pad_constructed (GObject * object)
 {
   GstPad *pad = GST_PAD (object);
 
   gst_pad_set_chain_function (pad,
-      GST_DEBUG_FUNCPTR ((GstPadChainFunction) _chain));
+      GST_DEBUG_FUNCPTR (gst_aggregator_pad_chain));
   gst_pad_set_event_function (pad,
-      GST_DEBUG_FUNCPTR ((GstPadEventFunction) pad_event_func));
+      GST_DEBUG_FUNCPTR (gst_aggregator_pad_event_func));
   gst_pad_set_query_function (pad,
-      GST_DEBUG_FUNCPTR ((GstPadQueryFunction) pad_query_func));
+      GST_DEBUG_FUNCPTR (gst_aggregator_pad_query_func));
   gst_pad_set_activatemode_function (pad,
-      GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) pad_activate_mode_func));
+      GST_DEBUG_FUNCPTR (gst_aggregator_pad_activate_mode_func));
 }
 
 static void
@@ -1292,23 +2376,21 @@
 {
   GstAggregatorPad *pad = (GstAggregatorPad *) object;
 
-  g_mutex_clear (&pad->priv->event_lock);
   g_cond_clear (&pad->priv->event_cond);
+  g_mutex_clear (&pad->priv->flush_lock);
+  g_mutex_clear (&pad->priv->lock);
 
-  G_OBJECT_CLASS (aggregator_pad_parent_class)->finalize (object);
+  G_OBJECT_CLASS (gst_aggregator_pad_parent_class)->finalize (object);
 }
 
 static void
 gst_aggregator_pad_dispose (GObject * object)
 {
   GstAggregatorPad *pad = (GstAggregatorPad *) object;
-  GstBuffer *buf;
 
-  buf = gst_aggregator_pad_steal_buffer (pad);
-  if (buf)
-    gst_buffer_unref (buf);
+  gst_aggregator_pad_set_flushing (pad, GST_FLOW_FLUSHING, TRUE);
 
-  G_OBJECT_CLASS (aggregator_pad_parent_class)->dispose (object);
+  G_OBJECT_CLASS (gst_aggregator_pad_parent_class)->dispose (object);
 }
 
 static void
@@ -1316,12 +2398,11 @@
 {
   GObjectClass *gobject_class = (GObjectClass *) klass;
 
-  aggregator_pad_parent_class = g_type_class_peek_parent (klass);
   g_type_class_add_private (klass, sizeof (GstAggregatorPadPrivate));
 
-  gobject_class->constructed = GST_DEBUG_FUNCPTR (_pad_constructed);
-  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aggregator_pad_finalize);
-  gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_aggregator_pad_dispose);
+  gobject_class->constructed = gst_aggregator_pad_constructed;
+  gobject_class->finalize = gst_aggregator_pad_finalize;
+  gobject_class->dispose = gst_aggregator_pad_dispose;
 }
 
 static void
@@ -1331,10 +2412,11 @@
       G_TYPE_INSTANCE_GET_PRIVATE (pad, GST_TYPE_AGGREGATOR_PAD,
       GstAggregatorPadPrivate);
 
-  pad->buffer = NULL;
-  g_mutex_init (&pad->priv->event_lock);
+  g_queue_init (&pad->priv->buffers);
   g_cond_init (&pad->priv->event_cond);
 
+  g_mutex_init (&pad->priv->flush_lock);
+  g_mutex_init (&pad->priv->lock);
 }
 
 /**
@@ -1351,24 +2433,49 @@
 {
   GstBuffer *buffer = NULL;
 
-  PAD_LOCK_EVENT (pad);
-  if (pad->buffer) {
+  PAD_LOCK (pad);
+  if (GST_IS_BUFFER (g_queue_peek_tail (&pad->priv->buffers)))
+    buffer = g_queue_pop_tail (&pad->priv->buffers);
+
+  if (buffer) {
+    apply_buffer (pad, buffer, FALSE);
+    pad->priv->num_buffers--;
     GST_TRACE_OBJECT (pad, "Consuming buffer");
-    buffer = pad->buffer;
-    pad->buffer = NULL;
-    if (pad->priv->pending_eos) {
+    if (gst_aggregator_pad_queue_is_empty (pad) && pad->priv->pending_eos) {
       pad->priv->pending_eos = FALSE;
-      pad->eos = TRUE;
+      pad->priv->eos = TRUE;
     }
     PAD_BROADCAST_EVENT (pad);
-    GST_DEBUG_OBJECT (pad, "Consummed: %" GST_PTR_FORMAT, buffer);
+    GST_DEBUG_OBJECT (pad, "Consumed: %" GST_PTR_FORMAT, buffer);
   }
-  PAD_UNLOCK_EVENT (pad);
+  PAD_UNLOCK (pad);
 
   return buffer;
 }
 
 /**
+ * gst_aggregator_pad_drop_buffer:
+ * @pad: the pad where to drop any pending buffer
+ *
+ * Drop the buffer currently queued in @pad.
+ *
+ * Returns: TRUE if there was a buffer queued in @pad, or FALSE if not.
+ */
+gboolean
+gst_aggregator_pad_drop_buffer (GstAggregatorPad * pad)
+{
+  GstBuffer *buf;
+
+  buf = gst_aggregator_pad_steal_buffer (pad);
+
+  if (buf == NULL)
+    return FALSE;
+
+  gst_buffer_unref (buf);
+  return TRUE;
+}
+
+/**
  * gst_aggregator_pad_get_buffer:
  * @pad: the pad to get buffer from
  *
@@ -1381,14 +2488,32 @@
 {
   GstBuffer *buffer = NULL;
 
-  PAD_LOCK_EVENT (pad);
-  if (pad->buffer)
-    buffer = gst_buffer_ref (pad->buffer);
-  PAD_UNLOCK_EVENT (pad);
+  PAD_LOCK (pad);
+  buffer = g_queue_peek_tail (&pad->priv->buffers);
+  /* The tail should always be a buffer, because if it is an event,
+   * it will be consumed immeditaly in gst_aggregator_steal_buffer */
+
+  if (GST_IS_BUFFER (buffer))
+    gst_buffer_ref (buffer);
+  else
+    buffer = NULL;
+  PAD_UNLOCK (pad);
 
   return buffer;
 }
 
+gboolean
+gst_aggregator_pad_is_eos (GstAggregatorPad * pad)
+{
+  gboolean is_eos;
+
+  PAD_LOCK (pad);
+  is_eos = pad->priv->eos;
+  PAD_UNLOCK (pad);
+
+  return is_eos;
+}
+
 /**
  * gst_aggregator_merge_tags:
  * @self: a #GstAggregator
@@ -1423,3 +2548,43 @@
   self->priv->tags_changed = TRUE;
   GST_OBJECT_UNLOCK (self);
 }
+
+/**
+ * gst_aggregator_set_latency:
+ * @self: a #GstAggregator
+ * @min_latency: minimum latency
+ * @max_latency: maximum latency
+ *
+ * Lets #GstAggregator sub-classes tell the baseclass what their internal
+ * latency is. Will also post a LATENCY message on the bus so the pipeline
+ * can reconfigure its global latency.
+ */
+void
+gst_aggregator_set_latency (GstAggregator * self,
+    GstClockTime min_latency, GstClockTime max_latency)
+{
+  gboolean changed = FALSE;
+
+  g_return_if_fail (GST_IS_AGGREGATOR (self));
+  g_return_if_fail (GST_CLOCK_TIME_IS_VALID (min_latency));
+  g_return_if_fail (max_latency >= min_latency);
+
+  SRC_LOCK (self);
+  if (self->priv->sub_latency_min != min_latency) {
+    self->priv->sub_latency_min = min_latency;
+    changed = TRUE;
+  }
+  if (self->priv->sub_latency_max != max_latency) {
+    self->priv->sub_latency_max = max_latency;
+    changed = TRUE;
+  }
+
+  if (changed)
+    SRC_BROADCAST (self);
+  SRC_UNLOCK (self);
+
+  if (changed) {
+    gst_element_post_message (GST_ELEMENT_CAST (self),
+        gst_message_new_latency (GST_OBJECT_CAST (self)));
+  }
+}
diff --git a/gst-libs/gst/base/gstaggregator.h b/gst-libs/gst/base/gstaggregator.h
index 507da13..8eda7dc 100644
--- a/gst-libs/gst/base/gstaggregator.h
+++ b/gst-libs/gst/base/gstaggregator.h
@@ -1,9 +1,7 @@
-/* GStreamer
+/* GStreamer aggregator base class
  * 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
@@ -46,6 +44,7 @@
 
 #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_CAST(obj)       ((GstAggregatorPad *)(obj))
 #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))
@@ -70,9 +69,10 @@
 {
   GstPad                       parent;
 
-  GstBuffer                 *  buffer;
-  GstSegment                   segment;
-  gboolean                     eos;
+  /* Protected by the OBJECT_LOCK */
+  GstSegment segment;
+  /* Segment to use in the clip function, before the queue */
+  GstSegment clip_segment;
 
   /* < Private > */
   GstAggregatorPadPrivate   *  priv;
@@ -95,7 +95,7 @@
   GstFlowReturn (*flush)     (GstAggregatorPad * aggpad, GstAggregator * aggregator);
 
   /*< private >*/
-  gpointer      _gst_reserved[GST_PADDING];
+  gpointer      _gst_reserved[GST_PADDING_LARGE];
 };
 
 GType gst_aggregator_pad_get_type           (void);
@@ -106,6 +106,8 @@
 
 GstBuffer * gst_aggregator_pad_steal_buffer (GstAggregatorPad *  pad);
 GstBuffer * gst_aggregator_pad_get_buffer   (GstAggregatorPad *  pad);
+gboolean    gst_aggregator_pad_drop_buffer  (GstAggregatorPad *  pad);
+gboolean    gst_aggregator_pad_is_eos       (GstAggregatorPad *  pad);
 
 /*********************
  * GstAggregator API *
@@ -113,18 +115,20 @@
 
 #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_CAST(obj)       ((GstAggregator *)(obj))
 #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
+#define GST_FLOW_NOT_HANDLED           GST_FLOW_CUSTOM_SUCCESS
 
 /**
  * GstAggregator:
- * @aggregator_pads: #GList of #GstAggregatorPad managed by this #GstAggregator.
+ * @srcpad: the aggregator's source pad
+ * @segment: the output segment
  *
- * Collectpads object.
+ * Aggregator base class object structure.
  */
 struct _GstAggregator
 {
@@ -132,12 +136,13 @@
 
   GstPad                *  srcpad;
 
+  /* Only access with the object lock held */
   GstSegment               segment;
 
   /*< private >*/
   GstAggregatorPrivate  *  priv;
 
-  gpointer                 _gst_reserved[GST_PADDING];
+  gpointer                 _gst_reserved[GST_PADDING_LARGE];
 };
 
 /**
@@ -176,13 +181,18 @@
  *                  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.
+ *                  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
+ *                  Called when the element goes from READY to PAUSED.
+ *                  The subclass should get ready to process
  *                  aggregated buffers.
+ * @get_next_time:  Optional.
+ *                  Called when the element needs to know the running time of the next
+ *                  rendered buffer for live pipelines. This causes deadline
+ *                  based aggregation to occur. Defaults to returning
+ *                  GST_CLOCK_TIME_NONE causing the element to wait for buffers
+ *                  on all sink pads before aggregating.
  *
  * The aggregator base class will handle in a thread-safe way all manners of
  * concurrent flushes, seeks, pad additions and removals, leaving to the
@@ -201,41 +211,58 @@
 
   GstFlowReturn     (*flush)          (GstAggregator    *  aggregator);
 
-  GstFlowReturn     (*clip)           (GstAggregator    *  agg,
-                                       GstAggregatorPad *  bpad,
+  GstFlowReturn     (*clip)           (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstBuffer        *  buf,
                                        GstBuffer        ** outbuf);
 
   /* sinkpads virtual methods */
-  gboolean          (*sink_event)     (GstAggregator    *  aggregate,
-                                       GstAggregatorPad *  bpad,
+  gboolean          (*sink_event)     (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstEvent         *  event);
 
-  gboolean          (*sink_query)     (GstAggregator    *  aggregate,
-                                       GstAggregatorPad *  bpad,
+  gboolean          (*sink_query)     (GstAggregator    *  aggregator,
+                                       GstAggregatorPad *  aggregator_pad,
                                        GstQuery         *  query);
 
   /* srcpad virtual methods */
-  gboolean          (*src_event)      (GstAggregator    *  aggregate,
+  gboolean          (*src_event)      (GstAggregator    *  aggregator,
                                        GstEvent         *  event);
 
-  gboolean          (*src_query)      (GstAggregator    *  aggregate,
+  gboolean          (*src_query)      (GstAggregator    *  aggregator,
                                        GstQuery         *  query);
 
   gboolean          (*src_activate)   (GstAggregator    *  aggregator,
                                        GstPadMode          mode,
                                        gboolean            active);
 
-  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator);
+  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator,
+                                       gboolean            timeout);
 
   gboolean          (*stop)           (GstAggregator    *  aggregator);
 
   gboolean          (*start)          (GstAggregator    *  aggregator);
 
+  GstClockTime      (*get_next_time)  (GstAggregator    *  aggregator);
+
   /*< private >*/
-  gpointer          _gst_reserved[GST_PADDING];
+  gpointer          _gst_reserved[GST_PADDING_LARGE];
 };
 
+/************************************
+ * GstAggregator convenience macros *
+ ***********************************/
+
+/**
+ * GST_AGGREGATOR_SRC_PAD:
+ * @agg: a #GstAggregator
+ *
+ * Convenience macro to access the source pad of #GstAggregator
+ *
+ * Since: 1.6
+ */
+#define GST_AGGREGATOR_SRC_PAD(agg) (((GstAggregator *)(agg))->srcpad)
+
 /*************************
  * GstAggregator methods *
  ************************/
@@ -245,16 +272,22 @@
 void           gst_aggregator_set_src_caps          (GstAggregator                *  agg,
                                                      GstCaps                      *  caps);
 
+void           gst_aggregator_set_latency           (GstAggregator                *  self,
+                                                     GstClockTime                    min_latency,
+                                                     GstClockTime                    max_latency);
+
 GType gst_aggregator_get_type(void);
 
-/* API that should eventually land in GstElement itself*/
-typedef gboolean (*GstAggregatorPadForeachFunc)    (GstAggregator                 *  self,
-                                                    GstPad                        *  pad,
+/* API that should eventually land in GstElement itself (FIXME) */
+typedef gboolean (*GstAggregatorPadForeachFunc)    (GstAggregator                 *  aggregator,
+                                                    GstAggregatorPad              *  aggregator_pad,
                                                     gpointer                         user_data);
+
 gboolean gst_aggregator_iterate_sinkpads           (GstAggregator                 *  self,
                                                     GstAggregatorPadForeachFunc      func,
                                                     gpointer                         user_data);
 
+GstClockTime  gst_aggregator_get_latency           (GstAggregator                 *  self);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/basecamerabinsrc/Makefile.am b/gst-libs/gst/basecamerabinsrc/Makefile.am
index 51f10ba..64126e3 100644
--- a/gst-libs/gst/basecamerabinsrc/Makefile.am
+++ b/gst-libs/gst/basecamerabinsrc/Makefile.am
@@ -23,17 +23,3 @@
 	-lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
 
 libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstbasecamerabinsrc -:STATIC libgstbasecamerabinsrc-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc \
-	 -:HEADERS $(libgstbasecamerabinsrcinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/basecamerabinsrc/Makefile.in b/gst-libs/gst/basecamerabinsrc/Makefile.in
index 944fde6..ff60208 100644
--- a/gst-libs/gst/basecamerabinsrc/Makefile.in
+++ b/gst-libs/gst/basecamerabinsrc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,9 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/basecamerabinsrc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgstbasecamerabinsrc_@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 \
@@ -91,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +112,6 @@
 	$(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 \
@@ -121,6 +128,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -218,6 +228,7 @@
   esac
 HEADERS = $(libgstbasecamerabinsrc_@GST_API_VERSION@include_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -235,8 +246,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -261,8 +274,6 @@
 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@
@@ -275,7 +286,6 @@
 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@
@@ -283,6 +293,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -309,11 +321,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -332,8 +347,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -392,10 +405,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -412,7 +429,6 @@
 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@
@@ -421,7 +437,6 @@
 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@
@@ -434,7 +449,6 @@
 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@
@@ -448,6 +462,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -459,6 +474,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -497,6 +514,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -532,10 +550,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -561,6 +583,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -568,7 +593,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -597,6 +629,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -607,6 +640,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -637,17 +671,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -664,6 +697,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -702,6 +736,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/basecamerabinsrc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/basecamerabinsrc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1057,20 +1091,8 @@
 	uninstall-am uninstall-libLTLIBRARIES \
 	uninstall-libgstbasecamerabinsrc_@GST_API_VERSION@includeHEADERS
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstbasecamerabinsrc -:STATIC libgstbasecamerabinsrc-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/basecamerabinsrc \
-	 -:HEADERS $(libgstbasecamerabinsrcinclude_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.
diff --git a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
index abc3a44..ed3e74c 100644
--- a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
+++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
@@ -40,7 +40,7 @@
  * During construct_pipeline() vmethod a subclass can add several elements into
  * the bin and expose 3 srcs pads as ghostpads implementing the 3 pad templates.
  *
- * However the subclass is responsable for adding the pad templates for the
+ * However the subclass is responsible for adding the pad templates for the
  * source pads and they must be named "vidsrc", "imgsrc" and "vfsrc". The pad
  * templates should be installed in the subclass' class_init function, like so:
  * |[
@@ -62,7 +62,7 @@
  * ]|
  *
  * It is also possible to add regular pads from the subclass and implement the
- * dataflow methods on these pads. This way all functionality can be implemneted
+ * dataflow methods on these pads. This way all functionality can be implemented
  * directly in the subclass without extra elements.
  *
  * The src will receive the capture mode from #GstCameraBin2 on the
diff --git a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
index 1b93663..828b700 100644
--- a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
+++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
@@ -34,6 +34,7 @@
 #include "gstcamerabinpreview.h"
 
 G_BEGIN_DECLS
+
 #define GST_TYPE_BASE_CAMERA_SRC \
   (gst_base_camera_src_get_type())
 #define GST_BASE_CAMERA_SRC(obj) \
@@ -140,4 +141,6 @@
 void gst_base_camera_src_post_preview (GstBaseCameraSrc *self, GstSample * sample);
 // XXX add methods to get/set img capture and vid capture caps..
 
+G_END_DECLS
+
 #endif /* __GST_BASE_CAMERA_SRC_H__ */
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index 06af5b2..cfdc074 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -231,14 +231,9 @@
 {
   g_return_if_fail (preview != NULL);
 
-  if (preview->processing_lock.p) {
-    g_mutex_clear (&preview->processing_lock);
-    preview->processing_lock.p = NULL;
-  }
-  if (preview->processing_cond.p) {
-    g_cond_clear (&preview->processing_cond);
-    preview->processing_cond.p = NULL;
-  }
+  g_mutex_clear (&preview->processing_lock);
+  g_cond_clear (&preview->processing_cond);
+
   if (preview->pipeline) {
     gst_element_set_state (preview->pipeline, GST_STATE_NULL);
     gst_object_unref (preview->pipeline);
diff --git a/gst-libs/gst/codecparsers/Makefile.am b/gst-libs/gst/codecparsers/Makefile.am
index eff6e83..e2498db 100644
--- a/gst-libs/gst/codecparsers/Makefile.am
+++ b/gst-libs/gst/codecparsers/Makefile.am
@@ -4,6 +4,7 @@
 	gstmpegvideoparser.c gsth264parser.c gstvc1parser.c gstmpeg4parser.c \
 	gsth265parser.c gstvp8parser.c gstvp8rangedecoder.c \
 	parserutils.c nalutils.c dboolhuff.c vp8utils.c \
+	gstjpegparser.c \
 	gstmpegvideometa.c
 
 libgstcodecparsers_@GST_API_VERSION@includedir = \
@@ -14,6 +15,7 @@
 libgstcodecparsers_@GST_API_VERSION@include_HEADERS = \
 	gstmpegvideoparser.h gsth264parser.h gstvc1parser.h gstmpeg4parser.h \
 	gsth265parser.h gstvp8parser.h gstvp8rangedecoder.h \
+	gstjpegparser.h \
 	gstmpegvideometa.h
 
 libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS = \
@@ -35,19 +37,3 @@
 	$(GST_LT_LDFLAGS)
 
 EXTRA_DIST = dboolhuff.LICENSE dboolhuff.PATENTS dboolhuff.AUTHORS
-
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstcodecparsers -:STATIC libgstcodecparsers-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcodecparsers_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcodecparsers_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstcodecparsers@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/codecparsers \
-	 -:HEADERS $(libgstcodecparsersinclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/codecparsers/Makefile.in b/gst-libs/gst/codecparsers/Makefile.in
index b2d206a..ab95814 100644
--- a/gst-libs/gst/codecparsers/Makefile.in
+++ b/gst-libs/gst/codecparsers/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,10 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/codecparsers
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgstcodecparsers_@GST_API_VERSION@include_HEADERS) \
-	$(noinst_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 \
@@ -92,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +112,6 @@
 	$(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 \
@@ -122,6 +128,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstcodecparsers_@GST_API_VERSION@include_HEADERS) \
+	$(noinst_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -172,6 +181,7 @@
 	libgstcodecparsers_@GST_API_VERSION@_la-nalutils.lo \
 	libgstcodecparsers_@GST_API_VERSION@_la-dboolhuff.lo \
 	libgstcodecparsers_@GST_API_VERSION@_la-vp8utils.lo \
+	libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.lo \
 	libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.lo
 libgstcodecparsers_@GST_API_VERSION@_la_OBJECTS =  \
 	$(am_libgstcodecparsers_@GST_API_VERSION@_la_OBJECTS)
@@ -246,6 +256,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -263,8 +274,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -289,8 +302,6 @@
 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@
@@ -303,7 +314,6 @@
 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@
@@ -311,6 +321,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -337,11 +349,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -360,8 +375,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -420,10 +433,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -440,7 +457,6 @@
 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@
@@ -449,7 +465,6 @@
 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@
@@ -462,7 +477,6 @@
 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@
@@ -476,6 +490,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -487,6 +502,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -525,6 +542,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -560,10 +578,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -589,6 +611,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -596,7 +621,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -625,6 +657,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -635,6 +668,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -665,17 +699,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -692,6 +725,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -730,6 +764,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,6 +783,7 @@
 	gstmpegvideoparser.c gsth264parser.c gstvc1parser.c gstmpeg4parser.c \
 	gsth265parser.c gstvp8parser.c gstvp8rangedecoder.c \
 	parserutils.c nalutils.c dboolhuff.c vp8utils.c \
+	gstjpegparser.c \
 	gstmpegvideometa.c
 
 libgstcodecparsers_@GST_API_VERSION@includedir = \
@@ -757,6 +793,7 @@
 libgstcodecparsers_@GST_API_VERSION@include_HEADERS = \
 	gstmpegvideoparser.h gsth264parser.h gstvc1parser.h gstmpeg4parser.h \
 	gsth265parser.h gstvp8parser.h gstvp8rangedecoder.h \
+	gstjpegparser.h \
 	gstmpegvideometa.h
 
 libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS = \
@@ -794,7 +831,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/codecparsers/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/codecparsers/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -860,6 +896,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-dboolhuff.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gsth264parser.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gsth265parser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpeg4parser.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideoparser.Plo@am__quote@
@@ -971,6 +1008,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) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstcodecparsers_@GST_API_VERSION@_la-vp8utils.lo `test -f 'vp8utils.c' || echo '$(srcdir)/'`vp8utils.c
 
+libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.lo: gstjpegparser.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) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.lo -MD -MP -MF $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.Tpo -c -o libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.lo `test -f 'gstjpegparser.c' || echo '$(srcdir)/'`gstjpegparser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.Tpo $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstjpegparser.c' object='libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.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) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstcodecparsers_@GST_API_VERSION@_la-gstjpegparser.lo `test -f 'gstjpegparser.c' || echo '$(srcdir)/'`gstjpegparser.c
+
 libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.lo: gstmpegvideometa.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) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.lo -MD -MP -MF $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.Tpo -c -o libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.lo `test -f 'gstmpegvideometa.c' || echo '$(srcdir)/'`gstmpegvideometa.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.Tpo $(DEPDIR)/libgstcodecparsers_@GST_API_VERSION@_la-gstmpegvideometa.Plo
@@ -1216,22 +1260,8 @@
 	uninstall-am uninstall-libLTLIBRARIES \
 	uninstall-libgstcodecparsers_@GST_API_VERSION@includeHEADERS
 
+.PRECIOUS: Makefile
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstcodecparsers -:STATIC libgstcodecparsers-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcodecparsers_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcodecparsers_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstcodecparsers@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/codecparsers \
-	 -:HEADERS $(libgstcodecparsersinclude_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.
diff --git a/gst-libs/gst/codecparsers/dboolhuff.c b/gst-libs/gst/codecparsers/dboolhuff.c
index 0007d7a..692d78b 100644
--- a/gst-libs/gst/codecparsers/dboolhuff.c
+++ b/gst-libs/gst/codecparsers/dboolhuff.c
@@ -11,65 +11,63 @@
 
 #include "dboolhuff.h"
 
-int vp8dx_start_decode(BOOL_DECODER *br,
-                       const unsigned char *source,
-                       unsigned int source_sz,
-                       vp8_decrypt_cb *decrypt_cb,
-                       void *decrypt_state)
+int
+vp8dx_start_decode (BOOL_DECODER * br,
+    const unsigned char *source,
+    unsigned int source_sz, vp8_decrypt_cb * decrypt_cb, void *decrypt_state)
 {
-    br->user_buffer_end = source+source_sz;
-    br->user_buffer     = source;
-    br->value    = 0;
-    br->count    = -8;
-    br->range    = 255;
-    br->decrypt_cb = decrypt_cb;
-    br->decrypt_state = decrypt_state;
+  br->user_buffer_end = source + source_sz;
+  br->user_buffer = source;
+  br->value = 0;
+  br->count = -8;
+  br->range = 255;
+  br->decrypt_cb = decrypt_cb;
+  br->decrypt_state = decrypt_state;
 
-    if (source_sz && !source)
-        return 1;
+  if (source_sz && !source)
+    return 1;
 
-    /* Populate the buffer */
-    vp8dx_bool_decoder_fill(br);
+  /* Populate the buffer */
+  vp8dx_bool_decoder_fill (br);
 
-    return 0;
+  return 0;
 }
 
-void vp8dx_bool_decoder_fill(BOOL_DECODER *br)
+void
+vp8dx_bool_decoder_fill (BOOL_DECODER * br)
 {
-    const unsigned char *bufptr = br->user_buffer;
-    VP8_BD_VALUE value = br->value;
-    int count = br->count;
-    int shift = VP8_BD_VALUE_SIZE - 8 - (count + 8);
-    size_t bytes_left = br->user_buffer_end - bufptr;
-    size_t bits_left = bytes_left * CHAR_BIT;
-    int x = (int)(shift + CHAR_BIT - bits_left);
-    int loop_end = 0;
-    unsigned char decrypted[sizeof(VP8_BD_VALUE) + 1];
+  const unsigned char *bufptr = br->user_buffer;
+  VP8_BD_VALUE value = br->value;
+  int count = br->count;
+  int shift = VP8_BD_VALUE_SIZE - 8 - (count + 8);
+  size_t bytes_left = br->user_buffer_end - bufptr;
+  size_t bits_left = bytes_left * CHAR_BIT;
+  int x = (int) (shift + CHAR_BIT - bits_left);
+  int loop_end = 0;
+  unsigned char decrypted[sizeof (VP8_BD_VALUE) + 1];
 
-    if (br->decrypt_cb) {
-        size_t n = bytes_left > sizeof(decrypted) ? sizeof(decrypted) : bytes_left;
-        br->decrypt_cb(br->decrypt_state, bufptr, decrypted, (int)n);
-        bufptr = decrypted;
+  if (br->decrypt_cb) {
+    size_t n =
+        bytes_left > sizeof (decrypted) ? sizeof (decrypted) : bytes_left;
+    br->decrypt_cb (br->decrypt_state, bufptr, decrypted, (int) n);
+    bufptr = decrypted;
+  }
+
+  if (x >= 0) {
+    count += VP8_LOTS_OF_BITS;
+    loop_end = x;
+  }
+
+  if (x < 0 || bits_left) {
+    while (shift >= loop_end) {
+      count += CHAR_BIT;
+      value |= (VP8_BD_VALUE) * bufptr << shift;
+      ++bufptr;
+      ++br->user_buffer;
+      shift -= CHAR_BIT;
     }
+  }
 
-    if(x >= 0)
-    {
-        count += VP8_LOTS_OF_BITS;
-        loop_end = x;
-    }
-
-    if (x < 0 || bits_left)
-    {
-        while(shift >= loop_end)
-        {
-            count += CHAR_BIT;
-            value |= (VP8_BD_VALUE)*bufptr << shift;
-            ++bufptr;
-            ++br->user_buffer;
-            shift -= CHAR_BIT;
-        }
-    }
-
-    br->value = value;
-    br->count = count;
+  br->value = value;
+  br->count = count;
 }
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
index a396554..4092acb 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.c
+++ b/gst-libs/gst/codecparsers/gsth264parser.c
@@ -151,7 +151,7 @@
 } PAR;
 
 /* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */
-static PAR aspect_ratios[17] = {
+static const PAR aspect_ratios[17] = {
   {0, 0},
   {1, 1},
   {12, 11},
@@ -204,6 +204,8 @@
 gst_h264_parse_nalu_header (GstH264NalUnit * nalu)
 {
   guint8 *data = nalu->data + nalu->offset;
+  guint8 svc_extension_flag;
+  GstBitReader br;
 
   if (nalu->size < 1)
     return FALSE;
@@ -211,6 +213,42 @@
   nalu->type = (data[0] & 0x1f);
   nalu->ref_idc = (data[0] & 0x60) >> 5;
   nalu->idr_pic_flag = (nalu->type == 5 ? 1 : 0);
+  nalu->header_bytes = 1;
+
+  nalu->extension_type = GST_H264_NAL_EXTENSION_NONE;
+
+  switch (nalu->type) {
+    case GST_H264_NAL_PREFIX_UNIT:
+    case GST_H264_NAL_SLICE_EXT:
+      if (nalu->size < 4)
+        return FALSE;
+      gst_bit_reader_init (&br, nalu->data + nalu->offset + nalu->header_bytes,
+          nalu->size - nalu->header_bytes);
+
+      svc_extension_flag = gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
+      if (svc_extension_flag) { /* SVC */
+
+        nalu->extension_type = GST_H264_NAL_EXTENSION_SVC;
+
+      } else {                  /* MVC */
+        GstH264NalUnitExtensionMVC *const mvc = &nalu->extension.mvc;
+
+        nalu->extension_type = GST_H264_NAL_EXTENSION_MVC;
+        mvc->non_idr_flag = gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
+        mvc->priority_id = gst_bit_reader_get_bits_uint8_unchecked (&br, 6);
+        mvc->view_id = gst_bit_reader_get_bits_uint16_unchecked (&br, 10);
+        mvc->temporal_id = gst_bit_reader_get_bits_uint8_unchecked (&br, 3);
+        mvc->anchor_pic_flag = gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
+        mvc->inter_view_flag = gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
+
+        /* Update IdrPicFlag (H.7.4.1.1) */
+        nalu->idr_pic_flag = !mvc->non_idr_flag;
+      }
+      nalu->header_bytes += 3;
+      break;
+    default:
+      break;
+  }
 
   GST_DEBUG ("Nal type %u, ref_idc %u", nalu->type, nalu->ref_idc);
   return TRUE;
@@ -242,6 +280,114 @@
   return TRUE;
 }
 
+/* Copy MVC-specific data for subset SPS header */
+static gboolean
+gst_h264_sps_mvc_copy (GstH264SPS * dst_sps, const GstH264SPS * src_sps)
+{
+  GstH264SPSExtMVC *const dst_mvc = &dst_sps->extension.mvc;
+  const GstH264SPSExtMVC *const src_mvc = &src_sps->extension.mvc;
+  guint i, j, k;
+
+  g_assert (dst_sps->extension_type == GST_H264_NAL_EXTENSION_MVC);
+
+  dst_mvc->num_views_minus1 = src_mvc->num_views_minus1;
+  dst_mvc->view = g_new0 (GstH264SPSExtMVCView, dst_mvc->num_views_minus1 + 1);
+  if (!dst_mvc->view)
+    return FALSE;
+
+  dst_mvc->view[0].view_id = src_mvc->view[0].view_id;
+
+  for (i = 1; i <= dst_mvc->num_views_minus1; i++) {
+    GstH264SPSExtMVCView *const dst_view = &dst_mvc->view[i];
+    const GstH264SPSExtMVCView *const src_view = &src_mvc->view[i];
+
+    dst_view->view_id = src_view->view_id;
+
+    dst_view->num_anchor_refs_l0 = src_view->num_anchor_refs_l0;
+    for (j = 0; j < dst_view->num_anchor_refs_l0; j++)
+      dst_view->anchor_ref_l0[j] = src_view->anchor_ref_l0[j];
+
+    dst_view->num_anchor_refs_l1 = src_view->num_anchor_refs_l1;
+    for (j = 0; j < dst_view->num_anchor_refs_l1; j++)
+      dst_view->anchor_ref_l1[j] = src_view->anchor_ref_l1[j];
+
+    dst_view->num_non_anchor_refs_l0 = src_view->num_non_anchor_refs_l0;
+    for (j = 0; j < dst_view->num_non_anchor_refs_l0; j++)
+      dst_view->non_anchor_ref_l0[j] = src_view->non_anchor_ref_l0[j];
+
+    dst_view->num_non_anchor_refs_l1 = src_view->num_non_anchor_refs_l1;
+    for (j = 0; j < dst_view->num_non_anchor_refs_l1; j++)
+      dst_view->non_anchor_ref_l1[j] = src_view->non_anchor_ref_l1[j];
+  }
+
+  dst_mvc->num_level_values_signalled_minus1 =
+      src_mvc->num_level_values_signalled_minus1;
+  dst_mvc->level_value = g_new0 (GstH264SPSExtMVCLevelValue,
+      dst_mvc->num_level_values_signalled_minus1 + 1);
+  if (!dst_mvc->level_value)
+    return FALSE;
+
+  for (i = 0; i <= dst_mvc->num_level_values_signalled_minus1; i++) {
+    GstH264SPSExtMVCLevelValue *const dst_value = &dst_mvc->level_value[i];
+    const GstH264SPSExtMVCLevelValue *const src_value =
+        &src_mvc->level_value[i];
+
+    dst_value->level_idc = src_value->level_idc;
+
+    dst_value->num_applicable_ops_minus1 = src_value->num_applicable_ops_minus1;
+    dst_value->applicable_op = g_new0 (GstH264SPSExtMVCLevelValueOp,
+        dst_value->num_applicable_ops_minus1 + 1);
+    if (!dst_value->applicable_op)
+      return FALSE;
+
+    for (j = 0; j <= dst_value->num_applicable_ops_minus1; j++) {
+      GstH264SPSExtMVCLevelValueOp *const dst_op = &dst_value->applicable_op[j];
+      const GstH264SPSExtMVCLevelValueOp *const src_op =
+          &src_value->applicable_op[j];
+
+      dst_op->temporal_id = src_op->temporal_id;
+      dst_op->num_target_views_minus1 = src_op->num_target_views_minus1;
+      dst_op->target_view_id =
+          g_new (guint16, dst_op->num_target_views_minus1 + 1);
+      if (!dst_op->target_view_id)
+        return FALSE;
+
+      for (k = 0; k <= dst_op->num_target_views_minus1; k++)
+        dst_op->target_view_id[k] = src_op->target_view_id[k];
+      dst_op->num_views_minus1 = src_op->num_views_minus1;
+    }
+  }
+  return TRUE;
+}
+
+/*
+ * gst_h264_sps_copy:
+ * @dst_sps: The destination #GstH264SPS to copy into
+ * @src_sps: The source #GstH264SPS to copy from
+ *
+ * Copies @src_sps into @dst_sps.
+ *
+ * Returns: %TRUE if everything went fine, %FALSE otherwise
+ */
+static gboolean
+gst_h264_sps_copy (GstH264SPS * dst_sps, const GstH264SPS * src_sps)
+{
+  g_return_val_if_fail (dst_sps != NULL, FALSE);
+  g_return_val_if_fail (src_sps != NULL, FALSE);
+
+  gst_h264_sps_clear (dst_sps);
+
+  *dst_sps = *src_sps;
+
+  switch (dst_sps->extension_type) {
+    case GST_H264_NAL_EXTENSION_MVC:
+      if (!gst_h264_sps_mvc_copy (dst_sps, src_sps))
+        return FALSE;
+      break;
+  }
+  return TRUE;
+}
+
 /****** Parsing functions *****/
 
 static gboolean
@@ -251,7 +397,7 @@
 
   GST_DEBUG ("parsing \"HRD Parameters\"");
 
-  READ_UE_ALLOWED (nr, hrd->cpb_cnt_minus1, 0, 31);
+  READ_UE_MAX (nr, hrd->cpb_cnt_minus1, 31);
   READ_UINT8 (nr, hrd->bit_rate_scale, 4);
   READ_UINT8 (nr, hrd->cpb_size_scale, 4);
 
@@ -327,8 +473,8 @@
 
   READ_UINT8 (nr, vui->chroma_loc_info_present_flag, 1);
   if (vui->chroma_loc_info_present_flag) {
-    READ_UE_ALLOWED (nr, vui->chroma_sample_loc_type_top_field, 0, 5);
-    READ_UE_ALLOWED (nr, vui->chroma_sample_loc_type_bottom_field, 0, 5);
+    READ_UE_MAX (nr, vui->chroma_sample_loc_type_top_field, 5);
+    READ_UE_MAX (nr, vui->chroma_sample_loc_type_bottom_field, 5);
   }
 
   READ_UINT8 (nr, vui->timing_info_present_flag, 1);
@@ -367,9 +513,9 @@
   if (vui->bitstream_restriction_flag) {
     READ_UINT8 (nr, vui->motion_vectors_over_pic_boundaries_flag, 1);
     READ_UE (nr, vui->max_bytes_per_pic_denom);
-    READ_UE_ALLOWED (nr, vui->max_bits_per_mb_denom, 0, 16);
-    READ_UE_ALLOWED (nr, vui->log2_max_mv_length_horizontal, 0, 16);
-    READ_UE_ALLOWED (nr, vui->log2_max_mv_length_vertical, 0, 16);
+    READ_UE_MAX (nr, vui->max_bits_per_mb_denom, 16);
+    READ_UE_MAX (nr, vui->log2_max_mv_length_horizontal, 16);
+    READ_UE_MAX (nr, vui->log2_max_mv_length_vertical, 16);
     READ_UE (nr, vui->num_reorder_frames);
     READ_UE (nr, vui->max_dec_frame_buffering);
   }
@@ -497,19 +643,22 @@
 
 static gboolean
 slice_parse_ref_pic_list_modification_1 (GstH264SliceHdr * slice,
-    NalReader * nr, guint list)
+    NalReader * nr, guint list, gboolean is_mvc)
 {
   GstH264RefPicListModification *entries;
   guint8 *ref_pic_list_modification_flag, *n_ref_pic_list_modification;
   guint32 modification_of_pic_nums_idc;
+  gsize max_entries;
   guint i = 0;
 
   if (list == 0) {
     entries = slice->ref_pic_list_modification_l0;
+    max_entries = G_N_ELEMENTS (slice->ref_pic_list_modification_l0);
     ref_pic_list_modification_flag = &slice->ref_pic_list_modification_flag_l0;
     n_ref_pic_list_modification = &slice->n_ref_pic_list_modification_l0;
   } else {
     entries = slice->ref_pic_list_modification_l1;
+    max_entries = G_N_ELEMENTS (slice->ref_pic_list_modification_l1);
     ref_pic_list_modification_flag = &slice->ref_pic_list_modification_flag_l1;
     n_ref_pic_list_modification = &slice->n_ref_pic_list_modification_l1;
   }
@@ -518,16 +667,21 @@
   if (*ref_pic_list_modification_flag) {
     while (1) {
       READ_UE (nr, modification_of_pic_nums_idc);
-      if (modification_of_pic_nums_idc == 3)
-        break;
       if (modification_of_pic_nums_idc == 0 ||
           modification_of_pic_nums_idc == 1) {
-        READ_UE_ALLOWED (nr, entries[i].value.abs_diff_pic_num_minus1, 0,
+        READ_UE_MAX (nr, entries[i].value.abs_diff_pic_num_minus1,
             slice->max_pic_num - 1);
       } else if (modification_of_pic_nums_idc == 2) {
         READ_UE (nr, entries[i].value.long_term_pic_num);
+      } else if (is_mvc && (modification_of_pic_nums_idc == 4 ||
+              modification_of_pic_nums_idc == 5)) {
+        READ_UE (nr, entries[i].value.abs_diff_view_idx_minus1);
       }
       entries[i++].modification_of_pic_nums_idc = modification_of_pic_nums_idc;
+      if (modification_of_pic_nums_idc == 3)
+        break;
+      if (i >= max_entries)
+        goto error;
     }
   }
   *n_ref_pic_list_modification = i;
@@ -540,15 +694,16 @@
 }
 
 static gboolean
-slice_parse_ref_pic_list_modification (GstH264SliceHdr * slice, NalReader * nr)
+slice_parse_ref_pic_list_modification (GstH264SliceHdr * slice, NalReader * nr,
+    gboolean is_mvc)
 {
   if (!GST_H264_IS_I_SLICE (slice) && !GST_H264_IS_SI_SLICE (slice)) {
-    if (!slice_parse_ref_pic_list_modification_1 (slice, nr, 0))
+    if (!slice_parse_ref_pic_list_modification_1 (slice, nr, 0, is_mvc))
       return FALSE;
   }
 
   if (GST_H264_IS_B_SLICE (slice)) {
-    if (!slice_parse_ref_pic_list_modification_1 (slice, nr, 1))
+    if (!slice_parse_ref_pic_list_modification_1 (slice, nr, 1, is_mvc))
       return FALSE;
   }
   return TRUE;
@@ -620,7 +775,7 @@
 
   p = &slice->pred_weight_table;
 
-  READ_UE_ALLOWED (nr, p->luma_log2_weight_denom, 0, 7);
+  READ_UE_MAX (nr, p->luma_log2_weight_denom, 7);
   /* set default values */
   default_luma_weight = 1 << p->luma_log2_weight_denom;
   for (i = 0; i < G_N_ELEMENTS (p->luma_weight_l0); i++)
@@ -633,7 +788,7 @@
   }
 
   if (chroma_array_type != 0) {
-    READ_UE_ALLOWED (nr, p->chroma_log2_weight_denom, 0, 7);
+    READ_UE_MAX (nr, p->chroma_log2_weight_denom, 7);
     /* set default values */
     default_chroma_weight = 1 << p->chroma_log2_weight_denom;
     for (i = 0; i < G_N_ELEMENTS (p->chroma_weight_l0); i++) {
@@ -712,7 +867,7 @@
 
   GST_DEBUG ("parsing \"Buffering period\"");
 
-  READ_UE_ALLOWED (nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (nr, sps_id, GST_H264_MAX_SPS_COUNT - 1);
   sps = gst_h264_parser_get_sps (nalparser, sps_id);
   if (!sps) {
     GST_WARNING ("couldn't find associated sequence parameter set with id: %d",
@@ -731,9 +886,9 @@
 
       for (sched_sel_idx = 0; sched_sel_idx <= hrd->cpb_cnt_minus1;
           sched_sel_idx++) {
-        READ_UINT8 (nr, per->nal_initial_cpb_removal_delay[sched_sel_idx],
+        READ_UINT32 (nr, per->nal_initial_cpb_removal_delay[sched_sel_idx],
             nbits);
-        READ_UINT8 (nr,
+        READ_UINT32 (nr,
             per->nal_initial_cpb_removal_delay_offset[sched_sel_idx], nbits);
       }
     }
@@ -745,9 +900,9 @@
 
       for (sched_sel_idx = 0; sched_sel_idx <= hrd->cpb_cnt_minus1;
           sched_sel_idx++) {
-        READ_UINT8 (nr, per->vcl_initial_cpb_removal_delay[sched_sel_idx],
+        READ_UINT32 (nr, per->vcl_initial_cpb_removal_delay[sched_sel_idx],
             nbits);
-        READ_UINT8 (nr,
+        READ_UINT32 (nr,
             per->vcl_initial_cpb_removal_delay_offset[sched_sel_idx], nbits);
       }
     }
@@ -894,7 +1049,7 @@
     goto error;
   }
 
-  READ_UE_ALLOWED (nr, rp->recovery_frame_cnt, 0, sps->max_frame_num - 1);
+  READ_UE_MAX (nr, rp->recovery_frame_cnt, sps->max_frame_num - 1);
   READ_UINT8 (nr, rp->exact_match_flag, 1);
   READ_UINT8 (nr, rp->broken_link_flag, 1);
   READ_UINT8 (nr, rp->changing_slice_group_idc, 2);
@@ -906,6 +1061,88 @@
   return GST_H264_PARSER_ERROR;
 }
 
+/* Parse SEI stereo_video_info() message */
+static GstH264ParserResult
+gst_h264_parser_parse_stereo_video_info (GstH264NalParser * nalparser,
+    GstH264StereoVideoInfo * info, NalReader * nr)
+{
+  GST_DEBUG ("parsing \"Stereo Video info\"");
+
+  READ_UINT8 (nr, info->field_views_flag, 1);
+  if (info->field_views_flag) {
+    READ_UINT8 (nr, info->top_field_is_left_view_flag, 1);
+  } else {
+    READ_UINT8 (nr, info->current_frame_is_left_view_flag, 1);
+    READ_UINT8 (nr, info->next_frame_is_second_view_flag, 1);
+  }
+  READ_UINT8 (nr, info->left_view_self_contained_flag, 1);
+  READ_UINT8 (nr, info->right_view_self_contained_flag, 1);
+
+  return GST_H264_PARSER_OK;
+
+error:
+  GST_WARNING ("error parsing \"Stereo Video info\"");
+  return GST_H264_PARSER_ERROR;
+}
+
+/* Parse SEI frame_packing_arrangement() message */
+static GstH264ParserResult
+gst_h264_parser_parse_frame_packing (GstH264NalParser * nalparser,
+    GstH264FramePacking * frame_packing, NalReader * nr, guint payload_size)
+{
+  guint8 frame_packing_extension_flag;
+  guint start_pos;
+
+  GST_DEBUG ("parsing \"Frame Packing Arrangement\"");
+
+  start_pos = nal_reader_get_pos (nr);
+  READ_UE (nr, frame_packing->frame_packing_id);
+  READ_UINT8 (nr, frame_packing->frame_packing_cancel_flag, 1);
+
+  if (!frame_packing->frame_packing_cancel_flag) {
+    READ_UINT8 (nr, frame_packing->frame_packing_type, 7);
+    READ_UINT8 (nr, frame_packing->quincunx_sampling_flag, 1);
+    READ_UINT8 (nr, frame_packing->content_interpretation_type, 6);
+    READ_UINT8 (nr, frame_packing->spatial_flipping_flag, 1);
+    READ_UINT8 (nr, frame_packing->frame0_flipped_flag, 1);
+    READ_UINT8 (nr, frame_packing->field_views_flag, 1);
+    READ_UINT8 (nr, frame_packing->current_frame_is_frame0_flag, 1);
+    READ_UINT8 (nr, frame_packing->frame0_self_contained_flag, 1);
+    READ_UINT8 (nr, frame_packing->frame1_self_contained_flag, 1);
+
+    if (!frame_packing->quincunx_sampling_flag &&
+        frame_packing->frame_packing_type !=
+        GST_H264_FRAME_PACKING_TEMPORAL_INTERLEAVING) {
+      READ_UINT8 (nr, frame_packing->frame0_grid_position_x, 4);
+      READ_UINT8 (nr, frame_packing->frame0_grid_position_y, 4);
+      READ_UINT8 (nr, frame_packing->frame1_grid_position_x, 4);
+      READ_UINT8 (nr, frame_packing->frame1_grid_position_y, 4);
+    }
+
+    /* Skip frame_packing_arrangement_reserved_byte */
+    if (!nal_reader_skip (nr, 8))
+      goto error;
+
+    READ_UE_MAX (nr, frame_packing->frame_packing_repetition_period, 16384);
+  }
+
+  READ_UINT8 (nr, frame_packing_extension_flag, 1);
+
+  /* All data that follows within a frame packing arrangement SEI message
+     after the value 1 for frame_packing_arrangement_extension_flag shall
+     be ignored (D.2.25) */
+  if (frame_packing_extension_flag) {
+    nal_reader_skip_long (nr,
+        payload_size - (nal_reader_get_pos (nr) - start_pos));
+  }
+
+  return GST_H264_PARSER_OK;
+
+error:
+  GST_WARNING ("error parsing \"Frame Packing Arrangement\"");
+  return GST_H264_PARSER_ERROR;
+}
+
 static GstH264ParserResult
 gst_h264_parser_parse_sei_message (GstH264NalParser * nalparser,
     NalReader * nr, GstH264SEIMessage * sei)
@@ -951,6 +1188,14 @@
       res = gst_h264_parser_parse_recovery_point (nalparser,
           &sei->payload.recovery_point, nr);
       break;
+    case GST_H264_SEI_STEREO_VIDEO_INFO:
+      res = gst_h264_parser_parse_stereo_video_info (nalparser,
+          &sei->payload.stereo_video_info, nr);
+      break;
+    case GST_H264_SEI_FRAME_PACKING:
+      res = gst_h264_parser_parse_frame_packing (nalparser,
+          &sei->payload.frame_packing, nr, payload_size);
+      break;
     default:
       /* Just consume payloadSize bytes, which does not account for
          emulation prevention bytes */
@@ -1016,6 +1261,8 @@
 {
   guint i;
 
+  for (i = 0; i < GST_H264_MAX_SPS_COUNT; i++)
+    gst_h264_sps_clear (&nalparser->sps[i]);
   for (i = 0; i < GST_H264_MAX_PPS_COUNT; i++)
     gst_h264_pps_clear (&nalparser->pps[i]);
   g_slice_free (GstH264NalParser, nalparser);
@@ -1248,12 +1495,10 @@
   if (res == GST_H264_PARSER_OK) {
     GST_DEBUG ("adding sequence parameter set with id: %d to array", sps->id);
 
-    nalparser->sps[sps->id] = *sps;
+    if (!gst_h264_sps_copy (&nalparser->sps[sps->id], sps))
+      return GST_H264_PARSER_ERROR;
     nalparser->last_sps = &nalparser->sps[sps->id];
   }
-
-
-
   return res;
 }
 
@@ -1269,6 +1514,7 @@
 
   /* set default values for fields that might not be present in the bitstream
      and have valid defaults */
+  sps->extension_type = GST_H264_NAL_EXTENSION_NONE;
   sps->chroma_format_idc = 1;
   sps->separate_colour_plane_flag = 0;
   sps->bit_depth_luma_minus8 = 0;
@@ -1288,25 +1534,28 @@
   READ_UINT8 (nr, sps->constraint_set1_flag, 1);
   READ_UINT8 (nr, sps->constraint_set2_flag, 1);
   READ_UINT8 (nr, sps->constraint_set3_flag, 1);
+  READ_UINT8 (nr, sps->constraint_set4_flag, 1);
+  READ_UINT8 (nr, sps->constraint_set5_flag, 1);
 
-  /* skip reserved_zero_4bits */
-  if (!nal_reader_skip (nr, 4))
+  /* skip reserved_zero_2bits */
+  if (!nal_reader_skip (nr, 2))
     goto error;
 
   READ_UINT8 (nr, sps->level_idc, 8);
 
-  READ_UE_ALLOWED (nr, sps->id, 0, GST_H264_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (nr, sps->id, GST_H264_MAX_SPS_COUNT - 1);
 
   if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
       sps->profile_idc == 122 || sps->profile_idc == 244 ||
       sps->profile_idc == 44 || sps->profile_idc == 83 ||
-      sps->profile_idc == 86) {
-    READ_UE_ALLOWED (nr, sps->chroma_format_idc, 0, 3);
+      sps->profile_idc == 86 || sps->profile_idc == 118 ||
+      sps->profile_idc == 128) {
+    READ_UE_MAX (nr, sps->chroma_format_idc, 3);
     if (sps->chroma_format_idc == 3)
       READ_UINT8 (nr, sps->separate_colour_plane_flag, 1);
 
-    READ_UE_ALLOWED (nr, sps->bit_depth_luma_minus8, 0, 6);
-    READ_UE_ALLOWED (nr, sps->bit_depth_chroma_minus8, 0, 6);
+    READ_UE_MAX (nr, sps->bit_depth_luma_minus8, 6);
+    READ_UE_MAX (nr, sps->bit_depth_chroma_minus8, 6);
     READ_UINT8 (nr, sps->qpprime_y_zero_transform_bypass_flag, 1);
 
     READ_UINT8 (nr, sps->scaling_matrix_present_flag, 1);
@@ -1322,20 +1571,20 @@
     }
   }
 
-  READ_UE_ALLOWED (nr, sps->log2_max_frame_num_minus4, 0, 12);
+  READ_UE_MAX (nr, sps->log2_max_frame_num_minus4, 12);
 
   sps->max_frame_num = 1 << (sps->log2_max_frame_num_minus4 + 4);
 
-  READ_UE_ALLOWED (nr, sps->pic_order_cnt_type, 0, 2);
+  READ_UE_MAX (nr, sps->pic_order_cnt_type, 2);
   if (sps->pic_order_cnt_type == 0) {
-    READ_UE_ALLOWED (nr, sps->log2_max_pic_order_cnt_lsb_minus4, 0, 12);
+    READ_UE_MAX (nr, sps->log2_max_pic_order_cnt_lsb_minus4, 12);
   } else if (sps->pic_order_cnt_type == 1) {
     guint i;
 
     READ_UINT8 (nr, sps->delta_pic_order_always_zero_flag, 1);
     READ_SE (nr, sps->offset_for_non_ref_pic);
     READ_SE (nr, sps->offset_for_top_to_bottom_field);
-    READ_UE_ALLOWED (nr, sps->num_ref_frames_in_pic_order_cnt_cycle, 0, 255);
+    READ_UE_MAX (nr, sps->num_ref_frames_in_pic_order_cnt_cycle, 255);
 
     for (i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; i++)
       READ_SE (nr, sps->offset_for_ref_frame[i]);
@@ -1430,6 +1679,105 @@
   return FALSE;
 }
 
+/* Parse subset_seq_parameter_set() data for MVC */
+static gboolean
+gst_h264_parse_sps_mvc_data (NalReader * nr, GstH264SPS * sps,
+    gboolean parse_vui_params)
+{
+  GstH264SPSExtMVC *const mvc = &sps->extension.mvc;
+  guint8 bit_equal_to_one;
+  guint i, j, k;
+
+  READ_UINT8 (nr, bit_equal_to_one, 1);
+  if (!bit_equal_to_one)
+    return FALSE;
+
+  sps->extension_type = GST_H264_NAL_EXTENSION_MVC;
+
+  READ_UE_MAX (nr, mvc->num_views_minus1, GST_H264_MAX_VIEW_COUNT - 1);
+
+  mvc->view = g_new0 (GstH264SPSExtMVCView, mvc->num_views_minus1 + 1);
+  if (!mvc->view)
+    goto error_allocation_failed;
+
+  for (i = 0; i <= mvc->num_views_minus1; i++)
+    READ_UE_MAX (nr, mvc->view[i].view_id, GST_H264_MAX_VIEW_ID);
+
+  for (i = 1; i <= mvc->num_views_minus1; i++) {
+    /* for RefPicList0 */
+    READ_UE_MAX (nr, mvc->view[i].num_anchor_refs_l0, 15);
+    for (j = 0; j < mvc->view[i].num_anchor_refs_l0; j++) {
+      READ_UE_MAX (nr, mvc->view[i].anchor_ref_l0[j], GST_H264_MAX_VIEW_ID);
+    }
+
+    /* for RefPicList1 */
+    READ_UE_MAX (nr, mvc->view[i].num_anchor_refs_l1, 15);
+    for (j = 0; j < mvc->view[i].num_anchor_refs_l1; j++) {
+      READ_UE_MAX (nr, mvc->view[i].anchor_ref_l1[j], GST_H264_MAX_VIEW_ID);
+    }
+  }
+
+  for (i = 1; i <= mvc->num_views_minus1; i++) {
+    /* for RefPicList0 */
+    READ_UE_MAX (nr, mvc->view[i].num_non_anchor_refs_l0, 15);
+    for (j = 0; j < mvc->view[i].num_non_anchor_refs_l0; j++) {
+      READ_UE_MAX (nr, mvc->view[i].non_anchor_ref_l0[j], GST_H264_MAX_VIEW_ID);
+    }
+
+    /* for RefPicList1 */
+    READ_UE_MAX (nr, mvc->view[i].num_non_anchor_refs_l1, 15);
+    for (j = 0; j < mvc->view[i].num_non_anchor_refs_l1; j++) {
+      READ_UE_MAX (nr, mvc->view[i].non_anchor_ref_l1[j], GST_H264_MAX_VIEW_ID);
+    }
+  }
+
+  READ_UE_MAX (nr, mvc->num_level_values_signalled_minus1, 63);
+
+  mvc->level_value =
+      g_new0 (GstH264SPSExtMVCLevelValue,
+      mvc->num_level_values_signalled_minus1 + 1);
+  if (!mvc->level_value)
+    goto error_allocation_failed;
+
+  for (i = 0; i <= mvc->num_level_values_signalled_minus1; i++) {
+    GstH264SPSExtMVCLevelValue *const level_value = &mvc->level_value[i];
+
+    READ_UINT8 (nr, level_value->level_idc, 8);
+
+    READ_UE_MAX (nr, level_value->num_applicable_ops_minus1, 1023);
+    level_value->applicable_op =
+        g_new0 (GstH264SPSExtMVCLevelValueOp,
+        level_value->num_applicable_ops_minus1 + 1);
+    if (!level_value->applicable_op)
+      goto error_allocation_failed;
+
+    for (j = 0; j <= level_value->num_applicable_ops_minus1; j++) {
+      GstH264SPSExtMVCLevelValueOp *const op = &level_value->applicable_op[j];
+
+      READ_UINT8 (nr, op->temporal_id, 3);
+
+      READ_UE_MAX (nr, op->num_target_views_minus1, 1023);
+      op->target_view_id = g_new (guint16, op->num_target_views_minus1 + 1);
+      if (!op->target_view_id)
+        goto error_allocation_failed;
+
+      for (k = 0; k <= op->num_target_views_minus1; k++)
+        READ_UE_MAX (nr, op->target_view_id[k], GST_H264_MAX_VIEW_ID);
+      READ_UE_MAX (nr, op->num_views_minus1, 1023);
+    }
+  }
+  return TRUE;
+
+error_allocation_failed:
+  GST_WARNING ("failed to allocate memory");
+  gst_h264_sps_clear (sps);
+  return FALSE;
+
+error:
+  gst_h264_sps_clear (sps);
+  return FALSE;
+}
+
 /**
  * gst_h264_parse_sps:
  * @nalu: The #GST_H264_NAL_SPS #GstH264NalUnit to parse
@@ -1449,7 +1797,8 @@
   INITIALIZE_DEBUG_CATEGORY;
   GST_DEBUG ("parsing SPS");
 
-  nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
 
   if (!gst_h264_parse_sps_data (&nr, sps, parse_vui_params))
     goto error;
@@ -1465,6 +1814,99 @@
 }
 
 /**
+ * gst_h264_parser_parse_subset_sps:
+ * @nalparser: a #GstH264NalParser
+ * @nalu: The #GST_H264_NAL_SUBSET_SPS #GstH264NalUnit to parse
+ * @sps: The #GstH264SPS to fill.
+ * @parse_vui_params: Whether to parse the vui_params or not
+ *
+ * Parses @data, and fills in the @sps structure.
+ *
+ * This function fully parses @data and allocates all the necessary
+ * data structures needed for MVC extensions. The resulting @sps
+ * structure shall be deallocated with gst_h264_sps_clear() when it is
+ * no longer needed.
+ *
+ * Note: if the caller doesn't need any of the MVC-specific data, then
+ * gst_h264_parser_parse_sps() is more efficient because those extra
+ * syntax elements are not parsed and no extra memory is allocated.
+ *
+ * Returns: a #GstH264ParserResult
+ *
+ * Since: 1.6
+ */
+GstH264ParserResult
+gst_h264_parser_parse_subset_sps (GstH264NalParser * nalparser,
+    GstH264NalUnit * nalu, GstH264SPS * sps, gboolean parse_vui_params)
+{
+  GstH264ParserResult res;
+
+  res = gst_h264_parse_subset_sps (nalu, sps, parse_vui_params);
+  if (res == GST_H264_PARSER_OK) {
+    GST_DEBUG ("adding sequence parameter set with id: %d to array", sps->id);
+
+    if (!gst_h264_sps_copy (&nalparser->sps[sps->id], sps)) {
+      gst_h264_sps_clear (sps);
+      return GST_H264_PARSER_ERROR;
+    }
+    nalparser->last_sps = &nalparser->sps[sps->id];
+  }
+  return res;
+}
+
+/**
+ * gst_h264_parse_subset_sps:
+ * @nalu: The #GST_H264_NAL_SUBSET_SPS #GstH264NalUnit to parse
+ * @sps: The #GstH264SPS to fill.
+ * @parse_vui_params: Whether to parse the vui_params or not
+ *
+ * Parses @data, and fills in the @sps structure.
+ *
+ * This function fully parses @data and allocates all the necessary
+ * data structures needed for MVC extensions. The resulting @sps
+ * structure shall be deallocated with gst_h264_sps_clear() when it is
+ * no longer needed.
+ *
+ * Note: if the caller doesn't need any of the MVC-specific data, then
+ * gst_h264_parser_parse_sps() is more efficient because those extra
+ * syntax elements are not parsed and no extra memory is allocated.
+ *
+ * Returns: a #GstH264ParserResult
+ *
+ * Since: 1.6
+ */
+GstH264ParserResult
+gst_h264_parse_subset_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
+    gboolean parse_vui_params)
+{
+  NalReader nr;
+
+  INITIALIZE_DEBUG_CATEGORY;
+  GST_DEBUG ("parsing Subset SPS");
+
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
+
+  if (!gst_h264_parse_sps_data (&nr, sps, TRUE))
+    goto error;
+
+  if (sps->profile_idc == GST_H264_PROFILE_MULTIVIEW_HIGH ||
+      sps->profile_idc == GST_H264_PROFILE_STEREO_HIGH) {
+    if (!gst_h264_parse_sps_mvc_data (&nr, sps, parse_vui_params))
+      goto error;
+  }
+
+  sps->valid = TRUE;
+  return GST_H264_PARSER_OK;
+
+error:
+  GST_WARNING ("error parsing \"Subset sequence parameter set\"");
+  gst_h264_sps_clear (sps);
+  sps->valid = FALSE;
+  return GST_H264_PARSER_ERROR;
+}
+
+/**
  * gst_h264_parse_pps:
  * @nalparser: a #GstH264NalParser
  * @nalu: The #GST_H264_NAL_PPS #GstH264NalUnit to parse
@@ -1491,10 +1933,11 @@
   INITIALIZE_DEBUG_CATEGORY;
   GST_DEBUG ("parsing PPS");
 
-  nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
 
-  READ_UE_ALLOWED (&nr, pps->id, 0, GST_H264_MAX_PPS_COUNT - 1);
-  READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (&nr, pps->id, GST_H264_MAX_PPS_COUNT - 1);
+  READ_UE_MAX (&nr, sps_id, GST_H264_MAX_SPS_COUNT - 1);
 
   sps = gst_h264_parser_get_sps (nalparser, sps_id);
   if (!sps) {
@@ -1515,9 +1958,9 @@
 
   READ_UINT8 (&nr, pps->entropy_coding_mode_flag, 1);
   READ_UINT8 (&nr, pps->pic_order_present_flag, 1);
-  READ_UE_ALLOWED (&nr, pps->num_slice_groups_minus1, 0, 7);
+  READ_UE_MAX (&nr, pps->num_slice_groups_minus1, 7);
   if (pps->num_slice_groups_minus1 > 0) {
-    READ_UE_ALLOWED (&nr, pps->slice_group_map_type, 0, 6);
+    READ_UE_MAX (&nr, pps->slice_group_map_type, 6);
 
     if (pps->slice_group_map_type == 0) {
       gint i;
@@ -1548,8 +1991,8 @@
     }
   }
 
-  READ_UE_ALLOWED (&nr, pps->num_ref_idx_l0_active_minus1, 0, 31);
-  READ_UE_ALLOWED (&nr, pps->num_ref_idx_l1_active_minus1, 0, 31);
+  READ_UE_MAX (&nr, pps->num_ref_idx_l0_active_minus1, 31);
+  READ_UE_MAX (&nr, pps->num_ref_idx_l1_active_minus1, 31);
   READ_UINT8 (&nr, pps->weighted_pred_flag, 1);
   READ_UINT8 (&nr, pps->weighted_bipred_idc, 2);
   READ_SE_ALLOWED (&nr, pps->pic_init_qp_minus26, -(26 + qp_bd_offset), 25);
@@ -1676,14 +2119,15 @@
   }
 
 
-  nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
 
   READ_UE (&nr, slice->first_mb_in_slice);
   READ_UE (&nr, slice->type);
 
   GST_DEBUG ("parsing \"Slice header\", slice type %u", slice->type);
 
-  READ_UE_ALLOWED (&nr, pps_id, 0, GST_H264_MAX_PPS_COUNT - 1);
+  READ_UE_MAX (&nr, pps_id, GST_H264_MAX_PPS_COUNT - 1);
   pps = gst_h264_parser_get_pps (nalparser, pps_id);
 
   if (!pps) {
@@ -1701,6 +2145,12 @@
     return GST_H264_PARSER_BROKEN_LINK;
   }
 
+  /* Check we can actually parse this slice (AVC, MVC headers only) */
+  if (sps->extension_type && sps->extension_type != GST_H264_NAL_EXTENSION_MVC) {
+    GST_WARNING ("failed to parse unsupported slice header");
+    return GST_H264_PARSER_BROKEN_DATA;
+  }
+
   /* set default values for fields that might not be present in the bitstream
      and have valid defaults */
   slice->field_pic_flag = 0;
@@ -1733,7 +2183,7 @@
     slice->max_pic_num = sps->max_frame_num;
 
   if (nalu->idr_pic_flag)
-    READ_UE_ALLOWED (&nr, slice->idr_pic_id, 0, G_MAXUINT16);
+    READ_UE_MAX (&nr, slice->idr_pic_id, G_MAXUINT16);
 
   if (sps->pic_order_cnt_type == 0) {
     READ_UINT16 (&nr, slice->pic_order_cnt_lsb,
@@ -1750,7 +2200,7 @@
   }
 
   if (pps->redundant_pic_cnt_present_flag)
-    READ_UE_ALLOWED (&nr, slice->redundant_pic_cnt, 0, G_MAXINT8);
+    READ_UE_MAX (&nr, slice->redundant_pic_cnt, G_MAXINT8);
 
   if (GST_H264_IS_B_SLICE (slice))
     READ_UINT8 (&nr, slice->direct_spatial_mv_pred_flag, 1);
@@ -1761,14 +2211,15 @@
 
     READ_UINT8 (&nr, num_ref_idx_active_override_flag, 1);
     if (num_ref_idx_active_override_flag) {
-      READ_UE_ALLOWED (&nr, slice->num_ref_idx_l0_active_minus1, 0, 31);
+      READ_UE_MAX (&nr, slice->num_ref_idx_l0_active_minus1, 31);
 
       if (GST_H264_IS_B_SLICE (slice))
-        READ_UE_ALLOWED (&nr, slice->num_ref_idx_l1_active_minus1, 0, 31);
+        READ_UE_MAX (&nr, slice->num_ref_idx_l1_active_minus1, 31);
     }
   }
 
-  if (!slice_parse_ref_pic_list_modification (slice, &nr))
+  if (!slice_parse_ref_pic_list_modification (slice, &nr,
+          GST_H264_IS_MVC_NALU (nalu)))
     goto error;
 
   if ((pps->weighted_pred_flag && (GST_H264_IS_P_SLICE (slice)
@@ -1786,7 +2237,7 @@
 
   if (pps->entropy_coding_mode_flag && !GST_H264_IS_I_SLICE (slice) &&
       !GST_H264_IS_SI_SLICE (slice))
-    READ_UE_ALLOWED (&nr, slice->cabac_init_idc, 0, 2);
+    READ_UE_MAX (&nr, slice->cabac_init_idc, 2);
 
   READ_SE_ALLOWED (&nr, slice->slice_qp_delta, -87, 77);
 
@@ -1799,7 +2250,7 @@
   }
 
   if (pps->deblocking_filter_control_present_flag) {
-    READ_UE_ALLOWED (&nr, slice->disable_deblocking_filter_idc, 0, 2);
+    READ_UE_MAX (&nr, slice->disable_deblocking_filter_idc, 2);
     if (slice->disable_deblocking_filter_idc != 1) {
       READ_SE_ALLOWED (&nr, slice->slice_alpha_c0_offset_div2, -6, 6);
       READ_SE_ALLOWED (&nr, slice->slice_beta_offset_div2, -6, 6);
@@ -1827,6 +2278,56 @@
   return GST_H264_PARSER_ERROR;
 }
 
+/* Free MVC-specific data from subset SPS header */
+static void
+gst_h264_sps_mvc_clear (GstH264SPS * sps)
+{
+  GstH264SPSExtMVC *const mvc = &sps->extension.mvc;
+  guint i, j;
+
+  g_assert (sps->extension_type == GST_H264_NAL_EXTENSION_MVC);
+
+  g_free (mvc->view);
+  mvc->view = NULL;
+
+  for (i = 0; i <= mvc->num_level_values_signalled_minus1; i++) {
+    GstH264SPSExtMVCLevelValue *const level_value = &mvc->level_value[i];
+
+    for (j = 0; j <= level_value->num_applicable_ops_minus1; j++) {
+      g_free (level_value->applicable_op[j].target_view_id);
+      level_value->applicable_op[j].target_view_id = NULL;
+    }
+    g_free (level_value->applicable_op);
+    level_value->applicable_op = NULL;
+  }
+  g_free (mvc->level_value);
+  mvc->level_value = NULL;
+
+  /* All meaningful MVC info are now gone, just pretend to be a
+   * standard AVC struct now */
+  sps->extension_type = GST_H264_NAL_EXTENSION_NONE;
+}
+
+/**
+ * gst_h264_sps_clear:
+ * @sps: The #GstH264SPS to free
+ *
+ * Clears all @sps internal resources.
+ *
+ * Since: 1.6
+ */
+void
+gst_h264_sps_clear (GstH264SPS * sps)
+{
+  g_return_if_fail (sps != NULL);
+
+  switch (sps->extension_type) {
+    case GST_H264_NAL_EXTENSION_MVC:
+      gst_h264_sps_mvc_clear (sps);
+      break;
+  }
+}
+
 /**
  * gst_h264_parser_parse_sei:
  * @nalparser: a #GstH264NalParser
@@ -1846,7 +2347,8 @@
   GstH264ParserResult res;
 
   GST_DEBUG ("parsing SEI nal");
-  nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
   *messages = g_array_new (FALSE, FALSE, sizeof (GstH264SEIMessage));
 
   do {
diff --git a/gst-libs/gst/codecparsers/gsth264parser.h b/gst-libs/gst/codecparsers/gsth264parser.h
index 8b2ff65..be5194f 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.h
+++ b/gst-libs/gst/codecparsers/gsth264parser.h
@@ -41,6 +41,8 @@
 
 #define GST_H264_MAX_SPS_COUNT   32
 #define GST_H264_MAX_PPS_COUNT   256
+#define GST_H264_MAX_VIEW_COUNT  1024
+#define GST_H264_MAX_VIEW_ID     (GST_H264_MAX_VIEW_COUNT - 1)
 
 #define GST_H264_IS_P_SLICE(slice)  (((slice)->type % 5) == GST_H264_P_SLICE)
 #define GST_H264_IS_B_SLICE(slice)  (((slice)->type % 5) == GST_H264_B_SLICE)
@@ -49,6 +51,28 @@
 #define GST_H264_IS_SI_SLICE(slice) (((slice)->type % 5) == GST_H264_SI_SLICE)
 
 /**
+ * GST_H264_IS_SVC_NALU:
+ * @nalu: a #GstH264NalUnit
+ *
+ * Check if @nalu is a scalable extension NAL unit.
+ *
+ * Since: 1.6
+ */
+#define GST_H264_IS_SVC_NALU(nalu) \
+  ((nalu)->extension_type == GST_H264_NAL_EXTENSION_SVC)
+
+/**
+ * GST_H264_IS_MVC_NALU:
+ * @nalu: a #GstH264NalUnit
+ *
+ * Check if @nalu is a multiview extension NAL unit.
+ *
+ * Since: 1.6
+ */
+#define GST_H264_IS_MVC_NALU(nalu) \
+  ((nalu)->extension_type == GST_H264_NAL_EXTENSION_MVC)
+
+/**
  * GstH264Profile:
  * @GST_H264_PROFILE_BASELINE: Baseline profile (A.2.1)
  * @GST_H264_PROFILE_MAIN: Main profile (A.2.2)
@@ -103,9 +127,11 @@
  * @GST_H264_NAL_FILLER_DATA: Filler data nal lunit
  * @GST_H264_NAL_SPS_EXT: Sequence parameter set (SPS) extension NAL unit
  * @GST_H264_NAL_PREFIX_UNIT: Prefix NAL unit
- * @GST_H264_NAL_SUBSET_SPS: Subset sequence parameter set (SPS) NAL unit
+ * @GST_H264_NAL_SUBSET_SPS: Subset sequence parameter set (SSPS) NAL unit
+ * @GST_H264_NAL_DEPTH_SPS: Depth parameter set (DPS) NAL unit
  * @GST_H264_NAL_SLICE_AUX: Auxiliary coded picture without partitioning NAL unit
  * @GST_H264_NAL_SLICE_EXT: Coded slice extension NAL unit
+ * @GST_H264_NAL_SLICE_DEPTH: Coded slice extension for depth or 3D-AVC texture view
  *
  * Indicates the type of H264 Nal Units
  */
@@ -127,16 +153,35 @@
   GST_H264_NAL_SPS_EXT      = 13,
   GST_H264_NAL_PREFIX_UNIT  = 14,
   GST_H264_NAL_SUBSET_SPS   = 15,
+  GST_H264_NAL_DEPTH_SPS    = 16,
   GST_H264_NAL_SLICE_AUX    = 19,
-  GST_H264_NAL_SLICE_EXT    = 20
+  GST_H264_NAL_SLICE_EXT    = 20,
+  GST_H264_NAL_SLICE_DEPTH  = 21
 } GstH264NalUnitType;
 
 /**
+ * GstH264NalUnitExtensionType:
+ * @GST_H264_NAL_EXTENSION_NONE: No NAL unit header extension is available
+ * @GST_H264_NAL_EXTENSION_SVC: NAL unit header extension for SVC (Annex G)
+ * @GST_H264_NAL_EXTENSION_MVC: NAL unit header extension for MVC (Annex H)
+ *
+ * Indicates the type of H.264 NAL unit extension.
+ *
+ * Since: 1.6
+ */
+typedef enum
+{
+  GST_H264_NAL_EXTENSION_NONE = 0,
+  GST_H264_NAL_EXTENSION_SVC,
+  GST_H264_NAL_EXTENSION_MVC,
+} GstH264NalUnitExtensionType;
+
+/**
  * GstH264ParserResult:
  * @GST_H264_PARSER_OK: The parsing succeded
  * @GST_H264_PARSER_BROKEN_DATA: The data to parse is broken
  * @GST_H264_PARSER_BROKEN_LINK: The link to structure needed for the parsing couldn't be found
- * @GST_H264_PARSER_ERROR: An error accured when parsing
+ * @GST_H264_PARSER_ERROR: An error occured when parsing
  * @GST_H264_PARSER_NO_NAL: No nal found during the parsing
  * @GST_H264_PARSER_NO_NAL_END: Start of the nal found, but not the end.
  *
@@ -153,10 +198,39 @@
 } GstH264ParserResult;
 
 /**
+ * GstH264FramePackingType:
+ * @GST_H264_FRAME_PACKING_NONE: A complete 2D frame without any frame packing
+ * @GST_H264_FRAME_PACKING_CHECKERBOARD_INTERLEAVING: Checkerboard
+ *   based interleaving
+ * @GST_H264_FRAME_PACKING_COLUMN_INTERLEAVING: Column based interleaving
+ * @GST_H264_FRAME_PACKING_ROW_INTERLEAVING: Row based interleaving
+ * @GST_H264_FRAME_PACKING_SIDE_BY_SIDE: Side-by-side packing
+ * @GST_H264_FRMAE_PACKING_TOP_BOTTOM: Top-Bottom packing
+ * @GST_H264_FRAME_PACKING_TEMPORAL_INTERLEAVING: Temporal interleaving
+ *
+ * Frame packing arrangement types.
+ *
+ * Since: 1.6
+ */
+typedef enum
+{
+  GST_H264_FRAME_PACKING_NONE                           = 6,
+  GST_H264_FRAME_PACKING_CHECKERBOARD_INTERLEAVING      = 0,
+  GST_H264_FRAME_PACKING_COLUMN_INTERLEAVING            = 1,
+  GST_H264_FRAME_PACKING_ROW_INTERLEAVING               = 2,
+  GST_H264_FRAME_PACKING_SIDE_BY_SIDE                   = 3,
+  GST_H264_FRMAE_PACKING_TOP_BOTTOM                     = 4,
+  GST_H264_FRAME_PACKING_TEMPORAL_INTERLEAVING          = 5
+} GstH264FramePackingType;
+
+/**
  * GstH264SEIPayloadType:
  * @GST_H264_SEI_BUF_PERIOD: Buffering Period SEI Message
  * @GST_H264_SEI_PIC_TIMING: Picture Timing SEI Message
  * @GST_H264_SEI_RECOVERY_POINT: Recovery Point SEI Message (D.2.7)
+ * @GST_H264_SEI_STEREO_VIDEO_INFO: stereo video info SEI message (Since: 1.6)
+ * @GST_H264_SEI_FRAME_PACKING: Frame Packing Arrangement (FPA) message that
+ *     contains the 3D arrangement for stereoscopic 3D video (Since: 1.6)
  * ...
  *
  * The type of SEI message.
@@ -166,6 +240,8 @@
   GST_H264_SEI_BUF_PERIOD = 0,
   GST_H264_SEI_PIC_TIMING = 1,
   GST_H264_SEI_RECOVERY_POINT = 6,
+  GST_H264_SEI_STEREO_VIDEO_INFO = 21,
+  GST_H264_SEI_FRAME_PACKING = 45
       /* and more...  */
 } GstH264SEIPayloadType;
 
@@ -221,6 +297,12 @@
 typedef struct _GstH264NalParser              GstH264NalParser;
 
 typedef struct _GstH264NalUnit                GstH264NalUnit;
+typedef struct _GstH264NalUnitExtensionMVC    GstH264NalUnitExtensionMVC;
+
+typedef struct _GstH264SPSExtMVCView          GstH264SPSExtMVCView;
+typedef struct _GstH264SPSExtMVCLevelValue    GstH264SPSExtMVCLevelValue;
+typedef struct _GstH264SPSExtMVCLevelValueOp  GstH264SPSExtMVCLevelValueOp;
+typedef struct _GstH264SPSExtMVC              GstH264SPSExtMVC;
 
 typedef struct _GstH264SPS                    GstH264SPS;
 typedef struct _GstH264PPS                    GstH264PPS;
@@ -237,9 +319,36 @@
 typedef struct _GstH264PicTiming              GstH264PicTiming;
 typedef struct _GstH264BufferingPeriod        GstH264BufferingPeriod;
 typedef struct _GstH264RecoveryPoint          GstH264RecoveryPoint;
+typedef struct _GstH264StereoVideoInfo        GstH264StereoVideoInfo;
+typedef struct _GstH264FramePacking           GstH264FramePacking;
 typedef struct _GstH264SEIMessage             GstH264SEIMessage;
 
 /**
+ * GstH264NalUnitExtensionMVC:
+ * @non_idr_flag: If equal to 0, it specifies that the current access
+ *   unit is an IDR access unit
+ * @priority_id: The priority identifier for the NAL unit
+ * @view_id: The view identifier for the NAL unit
+ * @temporal_id: The temporal identifier for the NAL unit
+ * @anchor_pic_flag: If equal to 1, it specifies that the current
+ *   access unit is an anchor access unit
+ * @inter_view_flag: If equal to 0, it specifies that the current view
+ *   component is not used for inter-view prediction by any other view
+ *   component in the current access unit
+ *
+ * Since: 1.6
+ */
+struct _GstH264NalUnitExtensionMVC
+{
+  guint8 non_idr_flag;
+  guint8 priority_id;
+  guint16 view_id;
+  guint8 temporal_id;
+  guint8 anchor_pic_flag;
+  guint8 inter_view_flag;
+};
+
+/**
  * GstH264NalUnit:
  * @ref_idc: not equal to 0 specifies that the content of the NAL unit
  *  contains a sequence parameter set, a sequence parameter set
@@ -257,6 +366,8 @@
  * @valid: If the nal unit is valid, which means it has
  * already been parsed
  * @data: The data from which the Nalu has been parsed
+ * @header_bytes: The size of the NALU header in bytes (Since 1.6)
+ * @extension_type: the extension type (Since 1.6)
  *
  * Structure defining the Nal unit headers
  */
@@ -273,6 +384,12 @@
   gboolean valid;
 
   guint8 *data;
+
+  guint8 header_bytes;
+  guint8 extension_type;
+  union {
+    GstH264NalUnitExtensionMVC mvc;
+  } extension;
 };
 
 /**
@@ -424,6 +541,105 @@
 };
 
 /**
+ * GstH264SPSExtMVCView:
+ * @num_anchor_refs_l0: specifies the number of view components for
+ *   inter-view prediction in the initialized RefPicList0 in decoding
+ *   anchor view components.
+ * @anchor_ref_l0: specifies the view_id for inter-view prediction in
+ *   the initialized RefPicList0 in decoding anchor view components.
+ * @num_anchor_refs_l1: specifies the number of view components for
+ *   inter-view prediction in the initialized RefPicList1 in decoding
+ *   anchor view components.
+ * @anchor_ref_l1: specifies the view_id for inter-view prediction in
+ *   the initialized RefPicList1 in decoding anchor view components.
+ * @num_non_anchor_refs_l0: specifies the number of view components
+ *   for inter-view prediction in the initialized RefPicList0 in
+ *   decoding non-anchor view components.
+ * @non_anchor_ref_l0: specifies the view_id for inter-view prediction
+ *   in the initialized RefPicList0 in decoding non-anchor view
+ *   components.
+ * @num_non_anchor_refs_l1: specifies the number of view components
+ *   for inter-view prediction in the initialized RefPicList1 in
+ *   decoding non-anchor view components.
+ * @non_anchor_ref_l1: specifies the view_id for inter-view prediction
+ *   in the initialized RefPicList1 in decoding non-anchor view
+ *   components.
+ *
+ * Represents inter-view dependency relationships for the coded video
+ * sequence.
+ *
+ * Since: 1.6
+ */
+struct _GstH264SPSExtMVCView
+{
+  guint16 view_id;
+  guint8 num_anchor_refs_l0;
+  guint16 anchor_ref_l0[15];
+  guint8 num_anchor_refs_l1;
+  guint16 anchor_ref_l1[15];
+  guint8 num_non_anchor_refs_l0;
+  guint16 non_anchor_ref_l0[15];
+  guint8 num_non_anchor_refs_l1;
+  guint16 non_anchor_ref_l1[15];
+};
+
+/**
+ * GstH264SPSExtMVCLevelValueOp:
+ *
+ * Represents an operation point for the coded video sequence.
+ *
+ * Since: 1.6
+ */
+struct _GstH264SPSExtMVCLevelValueOp
+{
+  guint8 temporal_id;
+  guint16 num_target_views_minus1;
+  guint16 *target_view_id;
+  guint16 num_views_minus1;
+};
+
+/**
+ * GstH264SPSExtMVCLevelValue:
+ * @level_idc: specifies the level value signalled for the coded video
+ *   sequence
+ * @num_applicable_ops_minus1: plus 1 specifies the number of
+ *   operation points to which the level indicated by level_idc applies
+ * @applicable_op: specifies the applicable operation point
+ *
+ * Represents level values for a subset of the operation points for
+ * the coded video sequence.
+ *
+ * Since: 1.6
+ */
+struct _GstH264SPSExtMVCLevelValue
+{
+  guint8 level_idc;
+  guint16 num_applicable_ops_minus1;
+  GstH264SPSExtMVCLevelValueOp *applicable_op;
+};
+
+/**
+ * GstH264SPSExtMVC:
+ * @num_views_minus1: plus 1 specifies the maximum number of coded
+ *   views in the coded video sequence
+ * @view: array of #GstH264SPSExtMVCView
+ * @num_level_values_signalled_minus1: plus 1 specifies the number of
+ *   level values signalled for the coded video sequence.
+ * @level_value: array of #GstH264SPSExtMVCLevelValue
+ *
+ * Represents the parsed seq_parameter_set_mvc_extension().
+ *
+ * Since: 1.6
+	 */
+struct _GstH264SPSExtMVC
+{
+  guint16 num_views_minus1;
+  GstH264SPSExtMVCView *view;
+  guint8 num_level_values_signalled_minus1;
+  GstH264SPSExtMVCLevelValue *level_value;
+};
+
+/**
  * GstH264SPS:
  * @id: The ID of the sequence parameter set
  * @profile_idc: indicate the profile to which the coded video sequence conforms
@@ -439,6 +655,8 @@
   guint8 constraint_set1_flag;
   guint8 constraint_set2_flag;
   guint8 constraint_set3_flag;
+  guint8 constraint_set4_flag;
+  guint8 constraint_set5_flag;
   guint8 level_idc;
 
   guint8 chroma_format_idc;
@@ -494,6 +712,12 @@
   gint crop_rect_x, crop_rect_y;
   gint fps_num, fps_den;
   gboolean valid;
+
+  /* Subset SPS extensions */
+  guint8 extension_type;
+  union {
+    GstH264SPSExtMVC mvc;
+  } extension;
 };
 
 /**
@@ -556,6 +780,8 @@
     guint32 abs_diff_pic_num_minus1;
     /* if modification_of_pic_nums_idc == 2 */
     guint32 long_term_pic_num;
+    /* if modification_of_pic_nums_idc == 4 || 5 */
+    guint32 abs_diff_view_idx_minus1;
   } value;
 };
 
@@ -687,6 +913,46 @@
   guint32 time_offset;
 };
 
+/**
+ * GstH264FramePacking:
+ *
+ * Since: 1.6
+ */
+struct _GstH264FramePacking
+{
+  guint32 frame_packing_id;
+  guint8 frame_packing_cancel_flag;
+  guint8 frame_packing_type; /* GstH264FramePackingType */
+  guint8 quincunx_sampling_flag;
+  guint8 content_interpretation_type;
+  guint8 spatial_flipping_flag;
+  guint8 frame0_flipped_flag;
+  guint8 field_views_flag;
+  guint8 current_frame_is_frame0_flag;
+  guint8 frame0_self_contained_flag;
+  guint8 frame1_self_contained_flag;
+  guint8 frame0_grid_position_x;
+  guint8 frame0_grid_position_y;
+  guint8 frame1_grid_position_x;
+  guint8 frame1_grid_position_y;
+  guint16 frame_packing_repetition_period;
+};
+
+/**
+ * GstH264StereoVideoInfo:
+ *
+ * Since: 1.6
+ */
+struct _GstH264StereoVideoInfo
+{
+  guint8 field_views_flag;
+  guint8 top_field_is_left_view_flag;
+  guint8 current_frame_is_left_view_flag;
+  guint8 next_frame_is_second_view_flag;
+  guint8 left_view_self_contained_flag;
+  guint8 right_view_self_contained_flag;
+};
+
 struct _GstH264PicTiming
 {
   guint32 cpb_removal_delay;
@@ -705,12 +971,12 @@
   GstH264SPS *sps;
 
   /* seq->vui_parameters->nal_hrd_parameters_present_flag */
-  guint8 nal_initial_cpb_removal_delay[32];
-  guint8 nal_initial_cpb_removal_delay_offset[32];
+  guint32 nal_initial_cpb_removal_delay[32];
+  guint32 nal_initial_cpb_removal_delay_offset[32];
 
   /* seq->vui_parameters->vcl_hrd_parameters_present_flag */
-  guint8 vcl_initial_cpb_removal_delay[32];
-  guint8 vcl_initial_cpb_removal_delay_offset[32];
+  guint32 vcl_initial_cpb_removal_delay[32];
+  guint32 vcl_initial_cpb_removal_delay_offset[32];
 };
 
 struct _GstH264RecoveryPoint
@@ -729,6 +995,8 @@
     GstH264BufferingPeriod buffering_period;
     GstH264PicTiming pic_timing;
     GstH264RecoveryPoint recovery_point;
+    GstH264StereoVideoInfo stereo_video_info;
+    GstH264FramePacking frame_packing;
     /* ... could implement more */
   } payload;
 };
@@ -768,6 +1036,9 @@
                                                        GstH264SliceHdr *slice, gboolean parse_pred_weight_table,
                                                        gboolean parse_dec_ref_pic_marking);
 
+GstH264ParserResult gst_h264_parser_parse_subset_sps  (GstH264NalParser *nalparser, GstH264NalUnit *nalu,
+                                                       GstH264SPS *sps, gboolean parse_vui_params);
+
 GstH264ParserResult gst_h264_parser_parse_sps         (GstH264NalParser *nalparser, GstH264NalUnit *nalu,
                                                        GstH264SPS *sps, gboolean parse_vui_params);
 
@@ -779,12 +1050,16 @@
 
 void gst_h264_nal_parser_free                         (GstH264NalParser *nalparser);
 
+GstH264ParserResult gst_h264_parse_subset_sps         (GstH264NalUnit *nalu,
+                                                       GstH264SPS *sps, gboolean parse_vui_params);
+
 GstH264ParserResult gst_h264_parse_sps                (GstH264NalUnit *nalu,
                                                        GstH264SPS *sps, gboolean parse_vui_params);
 
 GstH264ParserResult gst_h264_parse_pps                (GstH264NalParser *nalparser,
                                                        GstH264NalUnit *nalu, GstH264PPS *pps);
 
+void                gst_h264_sps_clear                (GstH264SPS *sps);
 void                gst_h264_pps_clear                (GstH264PPS *pps);
 
 void    gst_h264_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
index fd6e80f..77a4610 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.c
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
@@ -123,21 +123,57 @@
  *  Default scaling list of 32x32 matrix for matrixId = 1
  */
 static const guint8 default_scaling_list2[64] = {
-  16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17,
-  17, 17, 17, 17, 18, 18, 18, 18, 18, 20, 20, 20,
+  16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17,
+  17, 17, 17, 18, 18, 18, 18, 18, 18, 20, 20, 20,
   20, 20, 20, 20, 24, 24, 24, 24, 24, 24, 24, 24,
   25, 25, 25, 25, 25, 25, 25, 28, 28, 28, 28, 28,
   28, 33, 33, 33, 33, 33, 41, 41, 41, 41, 54, 54,
   54, 71, 71, 91
 };
 
+static const guint8 zigzag_4x4[16] = {
+  0, 1, 4, 8,
+  5, 2, 3, 6,
+  9, 12, 13, 10,
+  7, 11, 14, 15,
+};
+
+static const guint8 zigzag_8x8[64] = {
+  0, 1, 8, 16, 9, 2, 3, 10,
+  17, 24, 32, 25, 18, 11, 4, 5,
+  12, 19, 26, 33, 40, 48, 41, 34,
+  27, 20, 13, 6, 7, 14, 21, 28,
+  35, 42, 49, 56, 57, 50, 43, 36,
+  29, 22, 15, 23, 30, 37, 44, 51,
+  58, 59, 52, 45, 38, 31, 39, 46,
+  53, 60, 61, 54, 47, 55, 62, 63
+};
+
+static const guint8 uprightdiagonal_4x4[16] = {
+  0, 4, 1, 8,
+  5, 2, 12, 9,
+  6, 3, 13, 10,
+  7, 14, 11, 15
+};
+
+static const guint8 uprightdiagonal_8x8[64] = {
+  0, 8, 1, 16, 9, 2, 24, 17,
+  10, 3, 32, 25, 18, 11, 4, 40,
+  33, 26, 19, 12, 5, 48, 41, 34,
+  27, 20, 13, 6, 56, 49, 42, 35,
+  28, 21, 14, 7, 57, 50, 43, 36,
+  29, 22, 15, 58, 51, 44, 37, 30,
+  23, 59, 52, 45, 38, 31, 60, 53,
+  46, 39, 61, 54, 47, 62, 55, 63
+};
+
 typedef struct
 {
   guint par_n, par_d;
 } PAR;
 
 /* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */
-static PAR aspect_ratios[17] = {
+static const PAR aspect_ratios[17] = {
   {0, 0},
   {1, 1},
   {12, 11},
@@ -306,14 +342,12 @@
     sub_hrd->cbr_flag[i] = 0;
 
   for (i = 0; i <= CpbCnt; i++) {
-    READ_UE_ALLOWED (nr, sub_hrd->bit_rate_value_minus1[i], 0, G_MAXUINT32 - 1);
-    READ_UE_ALLOWED (nr, sub_hrd->cpb_size_value_minus1[i], 0, G_MAXUINT32 - 1);
+    READ_UE_MAX (nr, sub_hrd->bit_rate_value_minus1[i], G_MAXUINT32 - 1);
+    READ_UE_MAX (nr, sub_hrd->cpb_size_value_minus1[i], G_MAXUINT32 - 1);
 
     if (sub_pic_hrd_params_present_flag) {
-      READ_UE_ALLOWED (nr, sub_hrd->cpb_size_du_value_minus1[i], 0,
-          G_MAXUINT32 - 1);
-      READ_UE_ALLOWED (nr, sub_hrd->bit_rate_du_value_minus1[i], 0,
-          G_MAXUINT32 - 1);
+      READ_UE_MAX (nr, sub_hrd->cpb_size_du_value_minus1[i], G_MAXUINT32 - 1);
+      READ_UE_MAX (nr, sub_hrd->bit_rate_du_value_minus1[i], G_MAXUINT32 - 1);
     }
 
     READ_UINT8 (nr, sub_hrd->cbr_flag[i], 1);
@@ -384,12 +418,12 @@
       hrd->fixed_pic_rate_within_cvs_flag[i] = 1;
 
     if (hrd->fixed_pic_rate_within_cvs_flag[i]) {
-      READ_UE_ALLOWED (nr, hrd->elemental_duration_in_tc_minus1[i], 0, 2047);
+      READ_UE_MAX (nr, hrd->elemental_duration_in_tc_minus1[i], 2047);
     } else
       READ_UINT8 (nr, hrd->low_delay_hrd_flag[i], 1);
 
     if (!hrd->low_delay_hrd_flag[i])
-      READ_UE_ALLOWED (nr, hrd->cpb_cnt_minus1[i], 0, 31);
+      READ_UE_MAX (nr, hrd->cpb_cnt_minus1[i], 31);
 
     if (hrd->nal_hrd_parameters_present_flag)
       if (!gst_h265_parse_sub_layer_hrd_parameters (&hrd->sublayer_hrd_params
@@ -483,8 +517,8 @@
 
   READ_UINT8 (nr, vui->chroma_loc_info_present_flag, 1);
   if (vui->chroma_loc_info_present_flag) {
-    READ_UE_ALLOWED (nr, vui->chroma_sample_loc_type_top_field, 0, 5);
-    READ_UE_ALLOWED (nr, vui->chroma_sample_loc_type_bottom_field, 0, 5);
+    READ_UE_MAX (nr, vui->chroma_sample_loc_type_top_field, 5);
+    READ_UE_MAX (nr, vui->chroma_sample_loc_type_bottom_field, 5);
   }
 
   READ_UINT8 (nr, vui->neutral_chroma_indication_flag, 1);
@@ -513,8 +547,7 @@
 
     READ_UINT8 (nr, vui->poc_proportional_to_timing_flag, 1);
     if (vui->poc_proportional_to_timing_flag)
-      READ_UE_ALLOWED (nr, vui->num_ticks_poc_diff_one_minus1, 0,
-          G_MAXUINT32 - 1);
+      READ_UE_MAX (nr, vui->num_ticks_poc_diff_one_minus1, G_MAXUINT32 - 1);
 
     READ_UINT8 (nr, vui->hrd_parameters_present_flag, 1);
     if (vui->hrd_parameters_present_flag)
@@ -528,11 +561,11 @@
     READ_UINT8 (nr, vui->tiles_fixed_structure_flag, 1);
     READ_UINT8 (nr, vui->motion_vectors_over_pic_boundaries_flag, 1);
     READ_UINT8 (nr, vui->restricted_ref_pic_lists_flag, 1);
-    READ_UE_ALLOWED (nr, vui->min_spatial_segmentation_idc, 0, 4096);
-    READ_UE_ALLOWED (nr, vui->max_bytes_per_pic_denom, 0, 16);
-    READ_UE_ALLOWED (nr, vui->max_bits_per_min_cu_denom, 0, 16);
-    READ_UE_ALLOWED (nr, vui->log2_max_mv_length_horizontal, 0, 16);
-    READ_UE_ALLOWED (nr, vui->log2_max_mv_length_vertical, 0, 15);
+    READ_UE_MAX (nr, vui->min_spatial_segmentation_idc, 4096);
+    READ_UE_MAX (nr, vui->max_bytes_per_pic_denom, 16);
+    READ_UE_MAX (nr, vui->max_bits_per_min_cu_denom, 16);
+    READ_UE_MAX (nr, vui->log2_max_mv_length_horizontal, 16);
+    READ_UE_MAX (nr, vui->log2_max_mv_length_vertical, 15);
   }
 
   return TRUE;
@@ -590,7 +623,7 @@
 
     case GST_H265_QUANT_MATIX_8X8:
     case GST_H265_QUANT_MATIX_16X16:
-      if (matrixId >= 0 && matrixId <= 2)
+      if (matrixId <= 2)
         memcpy (*sl, default_scaling_list1, 64);
       else
         memcpy (*sl, default_scaling_list2, 64);
@@ -649,7 +682,7 @@
         if (!scaling_list_pred_mode_flag) {
           guint8 refMatrixId;
 
-          READ_UE_ALLOWED (nr, scaling_list_pred_matrix_id_delta, 0, matrixId);
+          READ_UE_MAX (nr, scaling_list_pred_matrix_id_delta, matrixId);
 
           if (!scaling_list_pred_matrix_id_delta) {
             if (!get_default_scaling_lists (&sl, sizeId, matrixId))
@@ -710,7 +743,7 @@
 {
   guint8 num_short_term_ref_pic_sets;
   guint8 RefRpsIdx = 0;
-  guint16 deltaRps = 0;
+  gint16 deltaRps = 0;
   guint8 use_delta_flag[16] = { 0 };
   guint8 used_by_curr_pic_flag[16] = { 0 };
   guint32 delta_poc_s0_minus1[16] = { 0 };
@@ -736,10 +769,10 @@
     GstH265ShortTermRefPicSet *RefRPS;
 
     if (stRpsIdx == num_short_term_ref_pic_sets)
-      READ_UE_ALLOWED (nr, stRPS->delta_idx_minus1, 0, stRpsIdx - 1);
+      READ_UE_MAX (nr, stRPS->delta_idx_minus1, stRpsIdx - 1);
 
     READ_UINT8 (nr, stRPS->delta_rps_sign, 1);
-    READ_UE_ALLOWED (nr, stRPS->abs_delta_rps_minus1, 0, 32767);
+    READ_UE_MAX (nr, stRPS->abs_delta_rps_minus1, 32767);
 
     RefRpsIdx = stRpsIdx - stRPS->delta_idx_minus1 - 1; /* 7-45 */
     deltaRps = (1 - 2 * stRPS->delta_rps_sign) * (stRPS->abs_delta_rps_minus1 + 1);     /* 7-46 */
@@ -750,9 +783,6 @@
       READ_UINT8 (nr, used_by_curr_pic_flag[j], 1);
       if (!used_by_curr_pic_flag[j])
         READ_UINT8 (nr, use_delta_flag[j], 1);
-
-      if (used_by_curr_pic_flag[j] || use_delta_flag[j])
-        stRPS->NumDeltaPocs++;
     }
 
     /* 7-47: calcuate NumNegativePics, DeltaPocS0 and UsedByCurrPicS0 */
@@ -803,16 +833,16 @@
 
   } else {
     /* 7-49 */
-    READ_UE_ALLOWED (nr, stRPS->NumNegativePics, 0,
+    READ_UE_MAX (nr, stRPS->NumNegativePics,
         sps->max_dec_pic_buffering_minus1[sps->max_sub_layers_minus1]);
 
     /* 7-50 */
-    READ_UE_ALLOWED (nr, stRPS->NumPositivePics, 0,
+    READ_UE_MAX (nr, stRPS->NumPositivePics,
         (sps->max_dec_pic_buffering_minus1[sps->max_sub_layers_minus1] -
             stRPS->NumNegativePics));
 
     for (i = 0; i < stRPS->NumNegativePics; i++) {
-      READ_UE_ALLOWED (nr, delta_poc_s0_minus1[i], 0, 32767);
+      READ_UE_MAX (nr, delta_poc_s0_minus1[i], 32767);
       /* 7-51 */
       READ_UINT8 (nr, stRPS->UsedByCurrPicS0[i], 1);
 
@@ -827,7 +857,7 @@
     }
 
     for (j = 0; j < stRPS->NumPositivePics; j++) {
-      READ_UE_ALLOWED (nr, delta_poc_s1_minus1[j], 0, 32767);
+      READ_UE_MAX (nr, delta_poc_s1_minus1[j], 32767);
 
       /* 7-52 */
       READ_UINT8 (nr, stRPS->UsedByCurrPicS1[j], 1);
@@ -842,9 +872,11 @@
       }
     }
 
-    /* 7-57 */
-    stRPS->NumDeltaPocs = stRPS->NumPositivePics + stRPS->NumNegativePics;
   }
+
+  /* 7-57 */
+  stRPS->NumDeltaPocs = stRPS->NumPositivePics + stRPS->NumNegativePics;
+
   return TRUE;
 
 error:
@@ -871,9 +903,9 @@
   READ_UINT8 (nr, rpl_mod->ref_pic_list_modification_flag_l0, 1);
 
   if (rpl_mod->ref_pic_list_modification_flag_l0) {
-    for (i = 0; i < slice->num_ref_idx_l0_active_minus1; i++) {
+    for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) {
       READ_UINT32 (nr, rpl_mod->list_entry_l0[i], n);
-      CHECK_ALLOWED (rpl_mod->list_entry_l0[i], 0, (NumPocTotalCurr - 1));
+      CHECK_ALLOWED_MAX (rpl_mod->list_entry_l0[i], (NumPocTotalCurr - 1));
     }
   }
   if (GST_H265_IS_B_SLICE (slice)) {
@@ -881,7 +913,7 @@
     if (rpl_mod->ref_pic_list_modification_flag_l1)
       for (i = 0; i <= slice->num_ref_idx_l1_active_minus1; i++) {
         READ_UINT32 (nr, rpl_mod->list_entry_l1[i], n);
-        CHECK_ALLOWED (rpl_mod->list_entry_l1[i], 0, (NumPocTotalCurr - 1));
+        CHECK_ALLOWED_MAX (rpl_mod->list_entry_l1[i], (NumPocTotalCurr - 1));
       }
   }
 
@@ -904,7 +936,7 @@
 
   p = &slice->pred_weight_table;
 
-  READ_UE_ALLOWED (nr, p->luma_log2_weight_denom, 0, 7);
+  READ_UE_MAX (nr, p->luma_log2_weight_denom, 7);
 
   /* set default values */
   for (i = 0; i < G_N_ELEMENTS (p->chroma_weight_l0_flag); i++) {
@@ -919,8 +951,10 @@
     }
   }
 
-  if (sps->chroma_format_idc != 0)
-    READ_SE_ALLOWED (nr, p->delta_chroma_log2_weight_denom, 0, 7);
+  if (sps->chroma_format_idc != 0) {
+    READ_SE_ALLOWED (nr, p->delta_chroma_log2_weight_denom,
+        (0 - p->luma_log2_weight_denom), (7 - p->luma_log2_weight_denom));
+  }
 
   for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++)
     READ_UINT8 (nr, p->luma_weight_l0_flag[i], 1);
@@ -979,7 +1013,7 @@
 
   GST_DEBUG ("parsing \"Buffering period\"");
 
-  READ_UE_ALLOWED (nr, sps_id, 0, GST_H265_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (nr, sps_id, GST_H265_MAX_SPS_COUNT - 1);
   sps = gst_h265_parser_get_sps (parser, sps_id);
   if (!sps) {
     GST_WARNING ("couldn't find associated sequence parameter set with id: %d",
@@ -1225,7 +1259,7 @@
 
   if (nalu->type == GST_H265_NAL_EOS || nalu->type == GST_H265_NAL_EOB) {
     GST_DEBUG ("end-of-seq or end-of-stream nal found");
-    nalu->size = 0;
+    nalu->size = 2;
     return GST_H265_PARSER_OK;
   }
 
@@ -1255,7 +1289,7 @@
       gst_h265_parser_identify_nalu_unchecked (parser, data, offset, size,
       nalu);
 
-  if (res != GST_H265_PARSER_OK || nalu->size == 0)
+  if (res != GST_H265_PARSER_OK || nalu->size == 2)
     goto beach;
 
   off2 = scan_for_start_codes (data + nalu->offset, size - nalu->offset);
@@ -1272,7 +1306,7 @@
     off2--;
 
   nalu->size = off2;
-  if (nalu->size < 2)
+  if (nalu->size < 3)
     return GST_H265_PARSER_BROKEN_DATA;
 
   GST_DEBUG ("Complete nal found. Off: %d, Size: %d", nalu->offset, nalu->size);
@@ -1443,12 +1477,10 @@
   for (i =
       (vps->sub_layer_ordering_info_present_flag ? 0 :
           vps->max_sub_layers_minus1); i <= vps->max_sub_layers_minus1; i++) {
-    READ_UE_ALLOWED (&nr, vps->max_dec_pic_buffering_minus1[i], 0,
-        G_MAXUINT32 - 1);
-    READ_UE_ALLOWED (&nr, vps->max_num_reorder_pics[i], 0,
+    READ_UE_MAX (&nr, vps->max_dec_pic_buffering_minus1[i], G_MAXUINT32 - 1);
+    READ_UE_MAX (&nr, vps->max_num_reorder_pics[i],
         vps->max_dec_pic_buffering_minus1[i]);
-    READ_UE_ALLOWED (&nr, vps->max_latency_increase_plus1[i], 0,
-        G_MAXUINT32 - 1);
+    READ_UE_MAX (&nr, vps->max_latency_increase_plus1[i], G_MAXUINT32 - 1);
   }
   /* setting default values if vps->sub_layer_ordering_info_present_flag is zero */
   if (!vps->sub_layer_ordering_info_present_flag && vps->max_sub_layers_minus1) {
@@ -1463,10 +1495,10 @@
   }
 
   READ_UINT8 (&nr, vps->max_layer_id, 6);
-  CHECK_ALLOWED (vps->max_layer_id, 0, 0);
+  CHECK_ALLOWED_MAX (vps->max_layer_id, 0);
 
-  READ_UE_ALLOWED (&nr, vps->num_layer_sets_minus1, 0, 1023);
-  CHECK_ALLOWED (vps->num_layer_sets_minus1, 0, 0);
+  READ_UE_MAX (&nr, vps->num_layer_sets_minus1, 1023);
+  CHECK_ALLOWED_MAX (vps->num_layer_sets_minus1, 0);
 
   for (i = 1; i <= vps->num_layer_sets_minus1; i++)
     for (j = 0; j <= vps->max_layer_id; j++)
@@ -1480,15 +1512,14 @@
     READ_UINT8 (&nr, vps->poc_proportional_to_timing_flag, 1);
 
     if (vps->poc_proportional_to_timing_flag)
-      READ_UE_ALLOWED (&nr, vps->num_ticks_poc_diff_one_minus1, 0,
-          G_MAXUINT32 - 1);
+      READ_UE_MAX (&nr, vps->num_ticks_poc_diff_one_minus1, G_MAXUINT32 - 1);
 
-    READ_UE_ALLOWED (&nr, vps->num_hrd_parameters, 0, 1024);
-    CHECK_ALLOWED (vps->num_hrd_parameters, 0, 1);
+    READ_UE_MAX (&nr, vps->num_hrd_parameters, 1024);
+    CHECK_ALLOWED_MAX (vps->num_hrd_parameters, 1);
 
     if (vps->num_hrd_parameters) {
-      READ_UE_ALLOWED (&nr, vps->hrd_layer_set_idx, 0, 1023);
-      CHECK_ALLOWED (vps->hrd_layer_set_idx, 0, 0);
+      READ_UE_MAX (&nr, vps->hrd_layer_set_idx, 1023);
+      CHECK_ALLOWED_MAX (vps->hrd_layer_set_idx, 0);
 
       if (!gst_h265_parse_hrd_parameters (&vps->hrd_params, &nr,
               vps->cprms_present_flag, vps->max_sub_layers_minus1))
@@ -1553,6 +1584,8 @@
   GstH265VPS *vps;
   guint8 vps_id;
   guint i;
+  guint subwc[] = { 1, 2, 2, 1, 1 };
+  guint subhc[] = { 1, 2, 1, 1, 1 };
   GstH265VUIParams *vui = NULL;
 
   INITIALIZE_DEBUG_CATEGORY;
@@ -1588,9 +1621,9 @@
           sps->max_sub_layers_minus1))
     goto error;
 
-  READ_UE_ALLOWED (&nr, sps->id, 0, GST_H265_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (&nr, sps->id, GST_H265_MAX_SPS_COUNT - 1);
 
-  READ_UE_ALLOWED (&nr, sps->chroma_format_idc, 0, 3);
+  READ_UE_MAX (&nr, sps->chroma_format_idc, 3);
   if (sps->chroma_format_idc == 3)
     READ_UINT8 (&nr, sps->separate_colour_plane_flag, 1);
 
@@ -1605,19 +1638,18 @@
     READ_UE (&nr, sps->conf_win_bottom_offset);
   }
 
-  READ_UE_ALLOWED (&nr, sps->bit_depth_luma_minus8, 0, 6);
-  READ_UE_ALLOWED (&nr, sps->bit_depth_chroma_minus8, 0, 6);
-  READ_UE_ALLOWED (&nr, sps->log2_max_pic_order_cnt_lsb_minus4, 0, 12);
+  READ_UE_MAX (&nr, sps->bit_depth_luma_minus8, 6);
+  READ_UE_MAX (&nr, sps->bit_depth_chroma_minus8, 6);
+  READ_UE_MAX (&nr, sps->log2_max_pic_order_cnt_lsb_minus4, 12);
 
   READ_UINT8 (&nr, sps->sub_layer_ordering_info_present_flag, 1);
   for (i =
       (sps->sub_layer_ordering_info_present_flag ? 0 :
           sps->max_sub_layers_minus1); i <= sps->max_sub_layers_minus1; i++) {
-    READ_UE_ALLOWED (&nr, sps->max_dec_pic_buffering_minus1[i], 0, 16);
-    READ_UE_ALLOWED (&nr, sps->max_num_reorder_pics[i], 0,
+    READ_UE_MAX (&nr, sps->max_dec_pic_buffering_minus1[i], 16);
+    READ_UE_MAX (&nr, sps->max_num_reorder_pics[i],
         sps->max_dec_pic_buffering_minus1[i]);
-    READ_UE_ALLOWED (&nr, sps->max_latency_increase_plus1[i], 0,
-        G_MAXUINT32 - 1);
+    READ_UE_MAX (&nr, sps->max_latency_increase_plus1[i], G_MAXUINT32 - 1);
   }
   /* setting default values if sps->sub_layer_ordering_info_present_flag is zero */
   if (!sps->sub_layer_ordering_info_present_flag && sps->max_sub_layers_minus1) {
@@ -1633,12 +1665,12 @@
 
   /* The limits are calculted based on the profile_tier_level constraint
    * in Annex-A: CtbLog2SizeY = 4 to 6 */
-  READ_UE_ALLOWED (&nr, sps->log2_min_luma_coding_block_size_minus3, 0, 3);
-  READ_UE_ALLOWED (&nr, sps->log2_diff_max_min_luma_coding_block_size, 0, 6);
-  READ_UE_ALLOWED (&nr, sps->log2_min_transform_block_size_minus2, 0, 3);
-  READ_UE_ALLOWED (&nr, sps->log2_diff_max_min_transform_block_size, 0, 3);
-  READ_UE_ALLOWED (&nr, sps->max_transform_hierarchy_depth_inter, 0, 4);
-  READ_UE_ALLOWED (&nr, sps->max_transform_hierarchy_depth_intra, 0, 4);
+  READ_UE_MAX (&nr, sps->log2_min_luma_coding_block_size_minus3, 3);
+  READ_UE_MAX (&nr, sps->log2_diff_max_min_luma_coding_block_size, 6);
+  READ_UE_MAX (&nr, sps->log2_min_transform_block_size_minus2, 3);
+  READ_UE_MAX (&nr, sps->log2_diff_max_min_transform_block_size, 3);
+  READ_UE_MAX (&nr, sps->max_transform_hierarchy_depth_inter, 4);
+  READ_UE_MAX (&nr, sps->max_transform_hierarchy_depth_intra, 4);
 
   READ_UINT8 (&nr, sps->scaling_list_enabled_flag, 1);
   if (sps->scaling_list_enabled_flag) {
@@ -1656,14 +1688,12 @@
   if (sps->pcm_enabled_flag) {
     READ_UINT8 (&nr, sps->pcm_sample_bit_depth_luma_minus1, 4);
     READ_UINT8 (&nr, sps->pcm_sample_bit_depth_chroma_minus1, 4);
-    READ_UE_ALLOWED (&nr, sps->log2_min_pcm_luma_coding_block_size_minus3, 0,
-        2);
-    READ_UE_ALLOWED (&nr, sps->log2_diff_max_min_pcm_luma_coding_block_size, 0,
-        2);
+    READ_UE_MAX (&nr, sps->log2_min_pcm_luma_coding_block_size_minus3, 2);
+    READ_UE_MAX (&nr, sps->log2_diff_max_min_pcm_luma_coding_block_size, 2);
     READ_UINT8 (&nr, sps->pcm_loop_filter_disabled_flag, 1);
   }
 
-  READ_UE_ALLOWED (&nr, sps->num_short_term_ref_pic_sets, 0, 64);
+  READ_UE_MAX (&nr, sps->num_short_term_ref_pic_sets, 64);
   for (i = 0; i < sps->num_short_term_ref_pic_sets; i++)
     if (!gst_h265_parser_parse_short_term_ref_pic_sets
         (&sps->short_term_ref_pic_set[i], &nr, i, sps))
@@ -1671,7 +1701,7 @@
 
   READ_UINT8 (&nr, sps->long_term_ref_pics_present_flag, 1);
   if (sps->long_term_ref_pics_present_flag) {
-    READ_UE_ALLOWED (&nr, sps->num_long_term_ref_pics_sps, 0, 32);
+    READ_UE_MAX (&nr, sps->num_long_term_ref_pics_sps, 32);
     for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) {
       READ_UINT16 (&nr, sps->lt_ref_pic_poc_lsb_sps[i],
           sps->log2_max_pic_order_cnt_lsb_minus4 + 4);
@@ -1705,7 +1735,20 @@
     goto error;
   }
 
-  /* ToDo: Add crop_rectangle dimensions */
+  if (sps->conformance_window_flag) {
+    const guint crop_unit_x = subwc[sps->chroma_format_idc];
+    const guint crop_unit_y = subhc[sps->chroma_format_idc];
+
+    sps->crop_rect_width = sps->width -
+        (sps->conf_win_left_offset + sps->conf_win_right_offset) * crop_unit_x;
+    sps->crop_rect_height = sps->height -
+        (sps->conf_win_top_offset + sps->conf_win_bottom_offset) * crop_unit_y;
+    sps->crop_rect_x = sps->conf_win_left_offset * crop_unit_x;
+    sps->crop_rect_y = sps->conf_win_top_offset * crop_unit_y;
+
+    GST_LOG ("crop_rectangle x=%u y=%u width=%u, height=%u", sps->crop_rect_x,
+        sps->crop_rect_y, sps->crop_rect_width, sps->crop_rect_height);
+  }
 
   sps->fps_num = 0;
   sps->fps_den = 1;
@@ -1752,6 +1795,7 @@
   GstH265SPS *sps;
   gint sps_id;
   gint qp_bd_offset;
+  guint32 CtbSizeY, MinCbLog2SizeY, CtbLog2SizeY;
   guint8 i;
 
   INITIALIZE_DEBUG_CATEGORY;
@@ -1760,8 +1804,8 @@
   nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
       nalu->size - nalu->header_bytes);
 
-  READ_UE_ALLOWED (&nr, pps->id, 0, GST_H265_MAX_PPS_COUNT - 1);
-  READ_UE_ALLOWED (&nr, sps_id, 0, GST_H265_MAX_SPS_COUNT - 1);
+  READ_UE_MAX (&nr, pps->id, GST_H265_MAX_PPS_COUNT - 1);
+  READ_UE_MAX (&nr, sps_id, GST_H265_MAX_SPS_COUNT - 1);
 
   sps = gst_h265_parser_get_sps (parser, sps_id);
   if (!sps) {
@@ -1772,6 +1816,14 @@
   pps->sps = sps;
   qp_bd_offset = 6 * sps->bit_depth_luma_minus8;
 
+  MinCbLog2SizeY = sps->log2_min_luma_coding_block_size_minus3 + 3;
+  CtbLog2SizeY = MinCbLog2SizeY + sps->log2_diff_max_min_luma_coding_block_size;
+  CtbSizeY = 1 << CtbLog2SizeY;
+  pps->PicHeightInCtbsY =
+      ceil ((gdouble) sps->pic_height_in_luma_samples / (gdouble) CtbSizeY);
+  pps->PicWidthInCtbsY =
+      ceil ((gdouble) sps->pic_width_in_luma_samples / (gdouble) CtbSizeY);
+
   /* set default values for fields that might not be present in the bitstream
      and have valid defaults */
   pps->diff_cu_qp_delta_depth = 0;
@@ -1790,8 +1842,8 @@
   READ_UINT8 (&nr, pps->sign_data_hiding_enabled_flag, 1);
   READ_UINT8 (&nr, pps->cabac_init_present_flag, 1);
 
-  READ_UE_ALLOWED (&nr, pps->num_ref_idx_l0_default_active_minus1, 0, 14);
-  READ_UE_ALLOWED (&nr, pps->num_ref_idx_l1_default_active_minus1, 0, 14);
+  READ_UE_MAX (&nr, pps->num_ref_idx_l0_default_active_minus1, 14);
+  READ_UE_MAX (&nr, pps->num_ref_idx_l1_default_active_minus1, 14);
   READ_SE_ALLOWED (&nr, pps->init_qp_minus26, -(26 + qp_bd_offset), 25);
 
   READ_UINT8 (&nr, pps->constrained_intra_pred_flag, 1);
@@ -1799,7 +1851,7 @@
 
   READ_UINT8 (&nr, pps->cu_qp_delta_enabled_flag, 1);
   if (pps->cu_qp_delta_enabled_flag)
-    READ_UE_ALLOWED (&nr, pps->diff_cu_qp_delta_depth, 0,
+    READ_UE_MAX (&nr, pps->diff_cu_qp_delta_depth,
         sps->log2_diff_max_min_luma_coding_block_size);
 
   READ_SE_ALLOWED (&nr, pps->cb_qp_offset, -12, 12);
@@ -1813,16 +1865,40 @@
   READ_UINT8 (&nr, pps->entropy_coding_sync_enabled_flag, 1);
 
   if (pps->tiles_enabled_flag) {
-    READ_UE_ALLOWED (&nr, pps->num_tile_columns_minus1, 1, 19);
-    READ_UE_ALLOWED (&nr, pps->num_tile_rows_minus1, 1, 21);
+    READ_UE_ALLOWED (&nr, pps->num_tile_columns_minus1, 0, 19);
+    READ_UE_ALLOWED (&nr, pps->num_tile_rows_minus1, 0, 21);
 
     READ_UINT8 (&nr, pps->uniform_spacing_flag, 1);
-    if (!pps->uniform_spacing_flag) {
-      for (i = 0; i < pps->num_tile_columns_minus1; i++)
+    /* 6.5.1, 6-4, 6-5, 7.4.3.3.1 */
+    if (pps->uniform_spacing_flag) {
+      guint8 num_col = pps->num_tile_columns_minus1 + 1;
+      guint8 num_row = pps->num_tile_rows_minus1 + 1;
+      for (i = 0; i < num_col; i++) {
+        pps->column_width_minus1[i] =
+            ((i + 1) * pps->PicWidthInCtbsY / num_col
+            - i * pps->PicWidthInCtbsY / num_col) - 1;
+      }
+      for (i = 0; i < num_row; i++) {
+        pps->row_height_minus1[i] =
+            ((i + 1) * pps->PicHeightInCtbsY / num_row
+            - i * pps->PicHeightInCtbsY / num_row) - 1;
+      }
+    } else {
+      pps->column_width_minus1[pps->num_tile_columns_minus1] =
+          pps->PicWidthInCtbsY - 1;
+      for (i = 0; i < pps->num_tile_columns_minus1; i++) {
         READ_UE (&nr, pps->column_width_minus1[i]);
+        pps->column_width_minus1[pps->num_tile_columns_minus1] -=
+            (pps->column_width_minus1[i] + 1);
+      }
 
-      for (i = 0; i < pps->num_tile_rows_minus1; i++)
+      pps->row_height_minus1[pps->num_tile_rows_minus1] =
+          pps->PicHeightInCtbsY - 1;
+      for (i = 0; i < pps->num_tile_rows_minus1; i++) {
         READ_UE (&nr, pps->row_height_minus1[i]);
+        pps->row_height_minus1[pps->num_tile_rows_minus1] -=
+            (pps->row_height_minus1[i] + 1);
+      }
     }
     READ_UINT8 (&nr, pps->loop_filter_across_tiles_enabled_flag, 1);
   }
@@ -1850,7 +1926,7 @@
       goto error;
 
   READ_UINT8 (&nr, pps->lists_modification_present_flag, 1);
-  READ_UE_ALLOWED (&nr, pps->log2_parallel_merge_level_minus2, 0, 4);
+  READ_UE_MAX (&nr, pps->log2_parallel_merge_level_minus2, 4);
   READ_UINT8 (&nr, pps->slice_segment_header_extension_present_flag, 1);
   READ_UINT8 (&nr, pps->pps_extension_flag, 1);
 
@@ -1909,15 +1985,9 @@
   GstH265PPS *pps;
   GstH265SPS *sps;
   guint i;
-  guint CurrRpsIdx = 0;
   GstH265ShortTermRefPicSet *stRPS = NULL;
   guint32 UsedByCurrPicLt[16];
   guint32 PicSizeInCtbsY;
-  guint32 PicWidthInCtbsY;
-  guint32 PicHeightInCtbsY;
-  guint32 CtbSizeY;
-  guint32 MinCbLog2SizeY;
-  guint32 CtbLog2SizeY;
   gint NumPocTotalCurr = 0;
 
   if (!nalu->size) {
@@ -1936,7 +2006,7 @@
       && nalu->type <= RESERVED_IRAP_NAL_TYPE_MAX)
     READ_UINT8 (&nr, slice->no_output_of_prior_pics_flag, 1);
 
-  READ_UE_ALLOWED (&nr, pps_id, 0, GST_H265_MAX_PPS_COUNT - 1);
+  READ_UE_MAX (&nr, pps_id, GST_H265_MAX_PPS_COUNT - 1);
   pps = gst_h265_parser_get_pps (parser, pps_id);
   if (!pps) {
     GST_WARNING
@@ -1953,14 +2023,7 @@
     return GST_H265_PARSER_BROKEN_LINK;
   }
 
-  MinCbLog2SizeY = sps->log2_min_luma_coding_block_size_minus3 + 3;
-  CtbLog2SizeY = MinCbLog2SizeY + sps->log2_diff_max_min_luma_coding_block_size;
-  CtbSizeY = 1 << CtbLog2SizeY;
-  PicHeightInCtbsY =
-      ceil ((gdouble) sps->pic_height_in_luma_samples / (gdouble) CtbSizeY);
-  PicWidthInCtbsY =
-      ceil ((gdouble) sps->pic_width_in_luma_samples / (gdouble) CtbSizeY);
-  PicSizeInCtbsY = PicWidthInCtbsY * PicHeightInCtbsY;
+  PicSizeInCtbsY = pps->PicWidthInCtbsY * pps->PicHeightInCtbsY;
   /* set default values for fields that might not be present in the bitstream
    * and have valid defaults */
   slice->dependent_slice_segment_flag = 0;
@@ -2002,7 +2065,7 @@
   if (!slice->dependent_slice_segment_flag) {
     for (i = 0; i < pps->num_extra_slice_header_bits; i++)
       nal_reader_skip (&nr, 1);
-    READ_UE_ALLOWED (&nr, slice->type, 0, 63);
+    READ_UE_MAX (&nr, slice->type, 63);
 
 
     if (pps->output_flag_present_flag)
@@ -2014,7 +2077,6 @@
         && (nalu->type != GST_H265_NAL_SLICE_IDR_N_LP)) {
       READ_UINT16 (&nr, slice->pic_order_cnt_lsb,
           (sps->log2_max_pic_order_cnt_lsb_minus4 + 4));
-      CHECK_ALLOWED (slice->pic_order_cnt_lsb, 0, G_MAXUINT16);
 
       READ_UINT8 (&nr, slice->short_term_ref_pic_set_sps_flag, 1);
       if (!slice->short_term_ref_pic_set_sps_flag) {
@@ -2025,7 +2087,7 @@
       } else if (sps->num_short_term_ref_pic_sets > 1) {
         const guint n = ceil_log2 (sps->num_short_term_ref_pic_sets);
         READ_UINT8 (&nr, slice->short_term_ref_pic_set_idx, n);
-        CHECK_ALLOWED (slice->short_term_ref_pic_set_idx, 0,
+        CHECK_ALLOWED_MAX (slice->short_term_ref_pic_set_idx,
             sps->num_short_term_ref_pic_sets - 1);
       }
 
@@ -2033,10 +2095,10 @@
         guint32 limit;
 
         if (sps->num_long_term_ref_pics_sps > 0)
-          READ_UE_ALLOWED (&nr, slice->num_long_term_sps, 0,
+          READ_UE_MAX (&nr, slice->num_long_term_sps,
               sps->num_long_term_ref_pics_sps);
 
-        READ_UE_ALLOWED (&nr, slice->num_long_term_pics, 0, 16);
+        READ_UE_MAX (&nr, slice->num_long_term_pics, 16);
         limit = slice->num_long_term_sps + slice->num_long_term_pics;
         for (i = 0; i < limit; i++) {
           if (i < slice->num_long_term_sps) {
@@ -2074,9 +2136,9 @@
       READ_UINT8 (&nr, slice->num_ref_idx_active_override_flag, 1);
 
       if (slice->num_ref_idx_active_override_flag) {
-        READ_UE_ALLOWED (&nr, slice->num_ref_idx_l0_active_minus1, 0, 14);
+        READ_UE_MAX (&nr, slice->num_ref_idx_l0_active_minus1, 14);
         if (GST_H265_IS_B_SLICE (slice))
-          READ_UE_ALLOWED (&nr, slice->num_ref_idx_l1_active_minus1, 0, 14);
+          READ_UE_MAX (&nr, slice->num_ref_idx_l1_active_minus1, 14);
       } else {
         /*set default values */
         slice->num_ref_idx_l0_active_minus1 =
@@ -2085,24 +2147,25 @@
             pps->num_ref_idx_l1_default_active_minus1;
       }
 
+      /* calculate NumPocTotalCurr */
+      if (slice->short_term_ref_pic_set_sps_flag)
+        stRPS = &sps->short_term_ref_pic_set[slice->short_term_ref_pic_set_idx];
+      else
+        stRPS = &slice->short_term_ref_pic_sets;
+
+      for (i = 0; i < stRPS->NumNegativePics; i++)
+        if (stRPS->UsedByCurrPicS0[i])
+          NumPocTotalCurr++;
+      for (i = 0; i < stRPS->NumPositivePics; i++)
+        if (stRPS->UsedByCurrPicS1[i])
+          NumPocTotalCurr++;
+      for (i = 0;
+          i < (slice->num_long_term_sps + slice->num_long_term_pics); i++)
+        if (UsedByCurrPicLt[i])
+          NumPocTotalCurr++;
+      slice->NumPocTotalCurr = NumPocTotalCurr;
+
       if (pps->lists_modification_present_flag) {
-        /* calculate NumPocTotalCurr */
-        if (slice->short_term_ref_pic_set_sps_flag)
-          CurrRpsIdx = slice->short_term_ref_pic_set_idx;
-        else
-          CurrRpsIdx = sps->num_short_term_ref_pic_sets;
-        stRPS = &sps->short_term_ref_pic_set[CurrRpsIdx];
-        for (i = 0; i < stRPS->NumNegativePics; i++)
-          if (stRPS->UsedByCurrPicS0[i])
-            NumPocTotalCurr++;
-        for (i = 0; i < stRPS->NumPositivePics; i++)
-          if (stRPS->UsedByCurrPicS1[i])
-            NumPocTotalCurr++;
-        for (i = 0;
-            i < (slice->num_long_term_sps + slice->num_long_term_pics); i++)
-          if (UsedByCurrPicLt[i])
-            NumPocTotalCurr++;
-        slice->NumPocTotalCurr = NumPocTotalCurr;
         if (NumPocTotalCurr > 1)
           if (!gst_h265_slice_parse_ref_pic_list_modification (slice, &nr,
                   NumPocTotalCurr))
@@ -2126,11 +2189,11 @@
           if ((GST_H265_IS_P_SLICE (slice))
               || ((GST_H265_IS_B_SLICE (slice))
                   && (slice->collocated_from_l0_flag))) {
-            READ_UE_ALLOWED (&nr, slice->collocated_ref_idx, 0,
+            READ_UE_MAX (&nr, slice->collocated_ref_idx,
                 slice->num_ref_idx_l0_active_minus1);
           } else if ((GST_H265_IS_B_SLICE (slice))
               && (!slice->collocated_from_l0_flag)) {
-            READ_UE_ALLOWED (&nr, slice->collocated_ref_idx, 0,
+            READ_UE_MAX (&nr, slice->collocated_ref_idx,
                 slice->num_ref_idx_l1_active_minus1);
           }
         }
@@ -2139,7 +2202,7 @@
           (pps->weighted_bipred_flag && GST_H265_IS_B_SLICE (slice)))
         if (!gst_h265_slice_parse_pred_weight_table (slice, &nr))
           goto error;
-      READ_UE_ALLOWED (&nr, slice->five_minus_max_num_merge_cand, 0, 4);
+      READ_UE_MAX (&nr, slice->five_minus_max_num_merge_cand, 4);
     }
 
     READ_SE_ALLOWED (&nr, slice->qp_delta, -87, 77);
@@ -2168,17 +2231,18 @@
     guint32 offset_max;
 
     if (!pps->tiles_enabled_flag && pps->entropy_coding_sync_enabled_flag)
-      offset_max = PicHeightInCtbsY - 1;
+      offset_max = pps->PicHeightInCtbsY - 1;
     else if (pps->tiles_enabled_flag && !pps->entropy_coding_sync_enabled_flag)
       offset_max =
           (pps->num_tile_columns_minus1 + 1) * (pps->num_tile_rows_minus1 + 1) -
           1;
     else
-      offset_max = (pps->num_tile_columns_minus1 + 1) * PicHeightInCtbsY - 1;
+      offset_max =
+          (pps->num_tile_columns_minus1 + 1) * pps->PicHeightInCtbsY - 1;
 
-    READ_UE_ALLOWED (&nr, slice->num_entry_point_offsets, 0, offset_max);
+    READ_UE_MAX (&nr, slice->num_entry_point_offsets, offset_max);
     if (slice->num_entry_point_offsets > 0) {
-      READ_UE_ALLOWED (&nr, slice->offset_len_minus1, 0, 31);
+      READ_UE_MAX (&nr, slice->offset_len_minus1, 31);
       slice->entry_point_offset_minus1 =
           g_new0 (guint32, slice->num_entry_point_offsets);
       for (i = 0; i < slice->num_entry_point_offsets; i++)
@@ -2189,12 +2253,20 @@
 
   if (pps->slice_segment_header_extension_present_flag) {
     guint16 slice_segment_header_extension_length;
-    READ_UE_ALLOWED (&nr, slice_segment_header_extension_length, 0, 256);
+    READ_UE_MAX (&nr, slice_segment_header_extension_length, 256);
     for (i = 0; i < slice_segment_header_extension_length; i++)
       if (!nal_reader_skip (&nr, 8))
         goto error;
   }
 
+  /* Skip the byte alignment bits */
+  if (!nal_reader_skip (&nr, 1))
+    goto error;
+  while (!nal_reader_is_byte_aligned (&nr)) {
+    if (!nal_reader_skip (&nr, 1))
+      goto error;
+  }
+
   slice->header_size = nal_reader_get_pos (&nr);
   slice->n_emulation_prevention_bytes = nal_reader_get_epb_count (&nr);
 
@@ -2208,68 +2280,106 @@
   return GST_H265_PARSER_ERROR;
 }
 
-/**
- * gst_h265_parser_parse_sei:
- * @parser: a #GstH265Parser
- * @nalu: The #GST_H265_NAL_SEI #GstH265NalUnit to parse
- * @sei: The #GstH265SEIMessage to fill.
- *
- * Parses @data, and fills the @sei structures.
- * The resulting @sei  structure shall be deallocated with
- * gst_h265_sei_free() when it is no longer needed
- *
- * Returns: a #GstH265ParserResult
- */
-GstH265ParserResult
-gst_h265_parser_parse_sei (GstH265Parser * parser,
-    GstH265NalUnit * nalu, GstH265SEIMessage * sei)
+static gboolean
+nal_reader_has_more_data_in_payload (NalReader * nr,
+    guint32 payload_start_pos_bit, guint32 payloadSize)
 {
-  NalReader nr;
+  if (nal_reader_is_byte_aligned (nr) &&
+      (nal_reader_get_pos (nr) == (payload_start_pos_bit + 8 * payloadSize)))
+    return FALSE;
+
+  return TRUE;
+}
+
+static GstH265ParserResult
+gst_h265_parser_parse_sei_message (GstH265Parser * parser,
+    guint8 nal_type, NalReader * nr, GstH265SEIMessage * sei)
+{
   guint32 payloadSize;
   guint8 payload_type_byte, payload_size_byte;
-#ifndef GST_DISABLE_GST_DEBUG
   guint remaining, payload_size;
-#endif
-  GstH265ParserResult res;
+  guint32 payload_start_pos_bit;
+  GstH265ParserResult res = GST_H265_PARSER_OK;
+
   GST_DEBUG ("parsing \"Sei message\"");
-  nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
-  /* init */
-  memset (sei, 0, sizeof (*sei));
+
   sei->payloadType = 0;
   do {
-    READ_UINT8 (&nr, payload_type_byte, 8);
+    READ_UINT8 (nr, payload_type_byte, 8);
     sei->payloadType += payload_type_byte;
   } while (payload_type_byte == 0xff);
   payloadSize = 0;
   do {
-    READ_UINT8 (&nr, payload_size_byte, 8);
+    READ_UINT8 (nr, payload_size_byte, 8);
     payloadSize += payload_size_byte;
   }
   while (payload_size_byte == 0xff);
-#ifndef GST_DISABLE_GST_DEBUG
-  remaining = nal_reader_get_remaining (&nr) * 8;
-  payload_size = payloadSize < remaining ? payloadSize : remaining;
+
+  remaining = nal_reader_get_remaining (nr);
+  payload_size = payloadSize * 8 < remaining ? payloadSize * 8 : remaining;
+
+  payload_start_pos_bit = nal_reader_get_pos (nr);
   GST_DEBUG
       ("SEI message received: payloadType  %u, payloadSize = %u bytes",
       sei->payloadType, payload_size);
-#endif
-  if (sei->payloadType == GST_H265_SEI_BUF_PERIOD) {
-    /* size not set; might depend on emulation_prevention_three_byte */
-    res = gst_h265_parser_parse_buffering_period (parser,
-        &sei->payload.buffering_period, &nr);
-  } else if (sei->payloadType == GST_H265_SEI_PIC_TIMING) {
-    /* size not set; might depend on emulation_prevention_three_byte */
-    res = gst_h265_parser_parse_pic_timing (parser,
-        &sei->payload.pic_timing, &nr);
-  } else
-    res = GST_H265_PARSER_OK;
+
+  if (nal_type == GST_H265_NAL_PREFIX_SEI) {
+    switch (sei->payloadType) {
+      case GST_H265_SEI_BUF_PERIOD:
+        /* size not set; might depend on emulation_prevention_three_byte */
+        res = gst_h265_parser_parse_buffering_period (parser,
+            &sei->payload.buffering_period, nr);
+        break;
+      case GST_H265_SEI_PIC_TIMING:
+        /* size not set; might depend on emulation_prevention_three_byte */
+        res = gst_h265_parser_parse_pic_timing (parser,
+            &sei->payload.pic_timing, nr);
+        break;
+      default:
+        /* Just consume payloadSize bytes, which does not account for
+           emulation prevention bytes */
+        if (!nal_reader_skip_long (nr, payload_size))
+          goto error;
+        res = GST_H265_PARSER_OK;
+        break;
+    }
+  } else if (nal_type == GST_H265_NAL_SUFFIX_SEI) {
+    switch (sei->payloadType) {
+      default:
+        /* Just consume payloadSize bytes, which does not account for
+           emulation prevention bytes */
+        if (!nal_reader_skip_long (nr, payload_size))
+          goto error;
+        res = GST_H265_PARSER_OK;
+        break;
+    }
+  }
+
+  /* Not parsing the reserved_payload_extension, but it shouldn't be
+   * an issue because of 1: There shall not be any reserved_payload_extension
+   * present in bitstreams conforming to the specification.2. Even though
+   * it is present, the size will be less than total PayloadSize since the
+   * size of reserved_payload_extension is supposed to be
+   * 8 * payloadSize - nEarlierBits - nPayloadZeroBits -1 which means the
+   * the current implementation will still skip all unnecessary bits correctly.
+   * In theory, we can have a more optimized implementation by skipping the
+   * data left in PayLoadSize without out individually checking for each bits,
+   * since the totoal size will be always less than payloadSize*/
+  if (nal_reader_has_more_data_in_payload (nr, payload_start_pos_bit,
+          payloadSize)) {
+    /* Skip the byte alignment bits */
+    if (!nal_reader_skip (nr, 1))
+      goto error;
+    while (!nal_reader_is_byte_aligned (nr)) {
+      if (!nal_reader_skip (nr, 1))
+        goto error;
+    }
+  }
 
   return res;
 
 error:
   GST_WARNING ("error parsing \"Sei message\"");
-  gst_h265_sei_free (sei);
-
   return GST_H265_PARSER_ERROR;
 }
 
@@ -2387,3 +2497,241 @@
     pic_timing->du_cpb_removal_delay_increment_minus1 = 0;
   }
 }
+
+/**
+ * gst_h265_parser_parse_sei:
+ * @nalparser: a #GstH265Parser
+ * @nalu: The #GST_H265_NAL_SEI #GstH265NalUnit to parse
+ * @messages: The GArray of #GstH265SEIMessage to fill. The caller must free it when done.
+ *
+ * Parses @data, create and fills the @messages array.
+ *
+ * Returns: a #GstH265ParserResult
+ */
+GstH265ParserResult
+gst_h265_parser_parse_sei (GstH265Parser * nalparser, GstH265NalUnit * nalu,
+    GArray ** messages)
+{
+  NalReader nr;
+  GstH265SEIMessage sei;
+  GstH265ParserResult res;
+
+  GST_DEBUG ("parsing SEI nal");
+  nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
+      nalu->size - nalu->header_bytes);
+  *messages = g_array_new (FALSE, FALSE, sizeof (GstH265SEIMessage));
+  g_array_set_clear_func (*messages, (GDestroyNotify) gst_h265_sei_free);
+
+  do {
+    res = gst_h265_parser_parse_sei_message (nalparser, nalu->type, &nr, &sei);
+    if (res == GST_H265_PARSER_OK)
+      g_array_append_val (*messages, sei);
+    else
+      break;
+  } while (nal_reader_has_more_data (&nr));
+
+  return res;
+}
+
+
+/**
+ * gst_h265_quant_matrix_4x4_get_zigzag_from_raster:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from raster scan order to
+ * zigzag scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
+    const guint8 quant[16])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 16; i++)
+    out_quant[i] = quant[zigzag_4x4[i]];
+}
+
+/**
+ * gst_h265_quant_matrix_4x4_get_raster_from_zigzag:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from zigzag scan order to
+ * raster scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
+    const guint8 quant[16])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 16; i++)
+    out_quant[zigzag_4x4[i]] = quant[i];
+}
+
+/**
+ * gst_h265_quant_matrix_8x8_get_zigzag_from_raster:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from raster scan order to
+ * zigzag scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
+    const guint8 quant[64])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 64; i++)
+    out_quant[i] = quant[zigzag_8x8[i]];
+}
+
+/**
+ * gst_h265_quant_matrix_8x8_get_raster_from_zigzag:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from zigzag scan order to
+ * raster scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
+    const guint8 quant[64])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 64; i++)
+    out_quant[zigzag_8x8[i]] = quant[i];
+}
+
+/**
+ * gst_h265_quant_matrix_4x4_get_uprightdiagonal_from_raster:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from raster scan order to
+ * uprightdiagonal scan order and store the resulting factors
+ * into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_4x4_get_uprightdiagonal_from_raster (guint8 out_quant[16],
+    const guint8 quant[16])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 16; i++)
+    out_quant[i] = quant[uprightdiagonal_4x4[i]];
+}
+
+/**
+ * gst_h265_quant_matrix_4x4_get_raster_from_uprightdiagonal:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from uprightdiagonal scan order to
+ * raster scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_4x4_get_raster_from_uprightdiagonal (guint8 out_quant[16],
+    const guint8 quant[16])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 16; i++)
+    out_quant[uprightdiagonal_4x4[i]] = quant[i];
+}
+
+/**
+ * gst_h265_quant_matrix_8x8_get_uprightdiagonal_from_raster:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from raster scan order to
+ * uprightdiagonal scan order and store the resulting factors
+ * into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_8x8_get_uprightdiagonal_from_raster (guint8 out_quant[64],
+    const guint8 quant[64])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 64; i++)
+    out_quant[i] = quant[uprightdiagonal_8x8[i]];
+}
+
+/**
+ * gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal:
+ * @out_quant: (out): The resulting quantization matrix
+ * @quant: The source quantization matrix
+ *
+ * Converts quantization matrix @quant from uprightdiagonal scan order to
+ * raster scan order and store the resulting factors into @out_quant.
+ *
+ * Note: it is an error to pass the same table in both @quant and
+ * @out_quant arguments.
+ *
+ * Since: 1.6
+ */
+void
+gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal (guint8 out_quant[64],
+    const guint8 quant[64])
+{
+  guint i;
+
+  g_return_if_fail (out_quant != quant);
+
+  for (i = 0; i < 64; i++)
+    out_quant[uprightdiagonal_8x8[i]] = quant[i];
+}
diff --git a/gst-libs/gst/codecparsers/gsth265parser.h b/gst-libs/gst/codecparsers/gsth265parser.h
index 883b7b2..80cc270 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.h
+++ b/gst-libs/gst/codecparsers/gsth265parser.h
@@ -763,6 +763,8 @@
   /* calculated values */
   guint8 chroma_array_type;
   gint width, height;
+  gint crop_rect_width, crop_rect_height;
+  gint crop_rect_x, crop_rect_y;
   gint fps_num, fps_den;
   gboolean valid;
 };
@@ -825,6 +827,9 @@
 
   guint8 pps_extension_flag;
 
+  /* calculated values */
+  guint32 PicWidthInCtbsY;
+  guint32 PicHeightInCtbsY;
   gboolean valid;
 };
 
@@ -1035,7 +1040,7 @@
 
 GstH265ParserResult gst_h265_parser_parse_sei       (GstH265Parser   * parser,
                                                      GstH265NalUnit  * nalu,
-                                                     GstH265SEIMessage * sei);
+                                                     GArray **messages);
 
 void                gst_h265_parser_free            (GstH265Parser  * parser);
 
@@ -1061,5 +1066,47 @@
 
 void                gst_h265_sei_free       (GstH265SEIMessage * sei);
 
+void    gst_h265_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
+
+void    gst_h265_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
+
+void    gst_h265_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
+
+void    gst_h265_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
+
+#define gst_h265_quant_matrix_16x16_get_zigzag_from_raster \
+        gst_h265_quant_matrix_8x8_get_zigzag_from_raster
+#define gst_h265_quant_matrix_16x16_get_raster_from_zigzag \
+        gst_h265_quant_matrix_8x8_get_raster_from_zigzag
+#define gst_h265_quant_matrix_32x32_get_zigzag_from_raster \
+        gst_h265_quant_matrix_8x8_get_zigzag_from_raster
+#define gst_h265_quant_matrix_32x32_get_raster_from_zigzag \
+        gst_h265_quant_matrix_8x8_get_raster_from_zigzag
+
+void    gst_h265_quant_matrix_4x4_get_uprightdiagonal_from_raster (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
+
+void    gst_h265_quant_matrix_4x4_get_raster_from_uprightdiagonal (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
+
+void    gst_h265_quant_matrix_8x8_get_uprightdiagonal_from_raster (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
+
+void    gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
+
+#define gst_h265_quant_matrix_16x16_get_uprightdiagonal_from_raster \
+        gst_h265_quant_matrix_8x8_get_uprightdiagonal_from_raster
+#define gst_h265_quant_matrix_16x16_get_raster_from_uprightdiagonal\
+        gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal
+#define gst_h265_quant_matrix_32x32_get_uprightdiagonal_from_raster \
+        gst_h265_quant_matrix_8x8_get_uprightdiagonal_from_raster
+#define gst_h265_quant_matrix_32x32_get_raster_from_uprightdiagonal\
+        gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal
+
 G_END_DECLS
 #endif
diff --git a/gst-libs/gst/codecparsers/gstjpegparser.c b/gst-libs/gst/codecparsers/gstjpegparser.c
new file mode 100644
index 0000000..d747a46
--- /dev/null
+++ b/gst-libs/gst/codecparsers/gstjpegparser.c
@@ -0,0 +1,762 @@
+/*  GStreamer JPEG parser
+ *  Copyright (C) 2011-2012 Intel Corporation
+ *  Copyright (C) 2015 Tim-Philipp Müller <tim@centricular.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; either version 2.1
+ *  of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301 USA
+ */
+
+/**
+ * SECTION:gstjpegparser
+ * @short_description: Convenience library for JPEG bitstream parsing.
+ *
+ * <refsect2>
+ * <para>
+ * Provides useful functions for parsing JPEG images
+ * </para>
+ * </refsect2>
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <gst/base/gstbytereader.h>
+#include "gstjpegparser.h"
+
+#ifndef GST_DISABLE_GST_DEBUG
+
+#define GST_CAT_DEFAULT ensure_debug_category()
+
+static GstDebugCategory *
+ensure_debug_category (void)
+{
+  static gsize cat_gonce = 0;
+
+  if (g_once_init_enter (&cat_gonce)) {
+    gsize cat_done;
+
+    cat_done = (gsize) _gst_debug_category_new ("codecparsers_jpeg", 0,
+        "GstJpegCodecParser");
+
+    g_once_init_leave (&cat_gonce, cat_done);
+  }
+
+  return (GstDebugCategory *) cat_gonce;
+}
+#else
+
+#define ensure_debug_category() /* NOOP */
+
+#endif /* GST_DISABLE_GST_DEBUG */
+
+#define DEBUG_PRINT_COMMENT 0
+
+#define READ_UINT8(reader, val) G_STMT_START {                  \
+    if (!gst_byte_reader_get_uint8 ((reader), &(val))) {        \
+      GST_WARNING ("failed to read uint8");                     \
+      goto failed;                                              \
+    }                                                           \
+  } G_STMT_END
+
+#define READ_UINT16(reader, val) G_STMT_START {                 \
+    if (!gst_byte_reader_get_uint16_be ((reader), &(val))) {    \
+      GST_WARNING ("failed to read uint16");                    \
+      goto failed;                                              \
+    }                                                           \
+  } G_STMT_END
+
+#define READ_BYTES(reader, buf, length) G_STMT_START {          \
+    const guint8 *vals;                                         \
+    if (!gst_byte_reader_get_data (reader, length, &vals)) {    \
+      GST_WARNING ("failed to read bytes, size:%d", length);    \
+      goto failed;                                              \
+    }                                                           \
+    memcpy (buf, vals, length);                                 \
+  } G_STMT_END
+
+#define U_READ_UINT8(reader, val) G_STMT_START {                \
+    (val) = gst_byte_reader_get_uint8_unchecked(reader);        \
+  } G_STMT_END
+
+#define U_READ_UINT16(reader, val) G_STMT_START {               \
+    (val) = gst_byte_reader_get_uint16_be_unchecked(reader);    \
+  } G_STMT_END
+
+
+/* Table used to address an 8x8 matrix in zig-zag order */
+/* *INDENT-OFF* */
+static const guint8 zigzag_index[64] = {
+  0,   1,  8, 16,  9,  2,  3, 10,
+  17, 24, 32, 25, 18, 11,  4,  5,
+  12, 19, 26, 33, 40, 48, 41, 34,
+  27, 20, 13,  6,  7, 14, 21, 28,
+  35, 42, 49, 56, 57, 50, 43, 36,
+  29, 22, 15, 23, 30, 37, 44, 51,
+  58, 59, 52, 45, 38, 31, 39, 46,
+  53, 60, 61, 54, 47, 55, 62, 63
+};
+/* *INDENT-ON* */
+
+/* Table K.1 - Luminance quantization table */
+/* *INDENT-OFF* */
+static const guint8 default_luminance_quant_table[64] = {
+  16,  11,  10,  16,  24,  40,  51,  61,
+  12,  12,  14,  19,  26,  58,  60,  55,
+  14,  13,  16,  24,  40,  57,  69,  56,
+  14,  17,  22,  29,  51,  87,  80,  62,
+  18,  22,  37,  56,  68, 109, 103,  77,
+  24,  35,  55,  64,  81, 104, 113,  92,
+  49,  64,  78,  87, 103, 121, 120, 101,
+  72,  92,  95,  98, 112, 100, 103,  99
+};
+/* *INDENT-ON* */
+
+/* Table K.2 - Chrominance quantization table */
+/* *INDENT-OFF* */
+static const guint8 default_chrominance_quant_table[64] = {
+  17,  18,  24,  47,  99,  99,  99,  99,
+  18,  21,  26,  66,  99,  99,  99,  99,
+  24,  26,  56,  99,  99,  99,  99,  99,
+  47,  66,  99,  99,  99,  99,  99,  99,
+  99,  99,  99,  99,  99,  99,  99,  99,
+  99,  99,  99,  99,  99,  99,  99,  99,
+  99,  99,  99,  99,  99,  99,  99,  99,
+  99,  99,  99,  99,  99,  99,  99,  99
+};
+/* *INDENT-ON* */
+
+typedef struct _GstJpegHuffmanTableEntry GstJpegHuffmanTableEntry;
+struct _GstJpegHuffmanTableEntry
+{
+  guint8 value;                 /* category */
+  guint8 length;                /* code length in bits */
+};
+
+/* Table K.3 - Table for luminance DC coefficient differences */
+static const GstJpegHuffmanTableEntry default_luminance_dc_table[] = {
+  {0x00, 2}, {0x01, 3}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3},
+  {0x06, 4}, {0x07, 5}, {0x08, 6}, {0x09, 7}, {0x0a, 8}, {0x0b, 9}
+};
+
+/* Table K.4 - Table for chrominance DC coefficient differences */
+static const GstJpegHuffmanTableEntry default_chrominance_dc_table[] = {
+  {0x00, 2}, {0x01, 2}, {0x02, 2}, {0x03, 3}, {0x04, 4}, {0x05, 5},
+  {0x06, 6}, {0x07, 7}, {0x08, 8}, {0x09, 9}, {0x0a, 10}, {0x0b, 11}
+};
+
+/* Table K.5 - Table for luminance AC coefficients */
+/* *INDENT-OFF* */
+static const GstJpegHuffmanTableEntry default_luminance_ac_table[] = {
+  {0x00,  4}, {0x01,  2}, {0x02,  2}, {0x03,  3}, {0x04,  4}, {0x05,  5},
+  {0x06,  7}, {0x07,  8}, {0x08, 10}, {0x09, 16}, {0x0a, 16}, {0x11,  4},
+  {0x12,  5}, {0x13,  7}, {0x14,  9}, {0x15, 11}, {0x16, 16}, {0x17, 16},
+  {0x18, 16}, {0x19, 16}, {0x1a, 16}, {0x21,  5}, {0x22,  8}, {0x23, 10},
+  {0x24, 12}, {0x25, 16}, {0x26, 16}, {0x27, 16}, {0x28, 16}, {0x29, 16},
+  {0x2a, 16}, {0x31,  6}, {0x32,  9}, {0x33, 12}, {0x34, 16}, {0x35, 16},
+  {0x36, 16}, {0x37, 16}, {0x38, 16}, {0x39, 16}, {0x3a, 16}, {0x41,  6},
+  {0x42, 10}, {0x43, 16}, {0x44, 16}, {0x45, 16}, {0x46, 16}, {0x47, 16},
+  {0x48, 16}, {0x49, 16}, {0x4a, 16}, {0x51,  7}, {0x52, 11}, {0x53, 16},
+  {0x54, 16}, {0x55, 16}, {0x56, 16}, {0x57, 16}, {0x58, 16}, {0x59, 16},
+  {0x5a, 16}, {0x61,  7}, {0x62, 12}, {0x63, 16}, {0x64, 16}, {0x65, 16},
+  {0x66, 16}, {0x67, 16}, {0x68, 16}, {0x69, 16}, {0x6a, 16}, {0x71,  8},
+  {0x72, 12}, {0x73, 16}, {0x74, 16}, {0x75, 16}, {0x76, 16}, {0x77, 16},
+  {0x78, 16}, {0x79, 16}, {0x7a, 16}, {0x81,  9}, {0x82, 15}, {0x83, 16},
+  {0x84, 16}, {0x85, 16}, {0x86, 16}, {0x87, 16}, {0x88, 16}, {0x89, 16},
+  {0x8a, 16}, {0x91,  9}, {0x92, 16}, {0x93, 16}, {0x94, 16}, {0x95, 16},
+  {0x96, 16}, {0x97, 16}, {0x98, 16}, {0x99, 16}, {0x9a, 16}, {0xa1,  9},
+  {0xa2, 16}, {0xa3, 16}, {0xa4, 16}, {0xa5, 16}, {0xa6, 16}, {0xa7, 16},
+  {0xa8, 16}, {0xa9, 16}, {0xaa, 16}, {0xb1, 10}, {0xb2, 16}, {0xb3, 16},
+  {0xb4, 16}, {0xb5, 16}, {0xb6, 16}, {0xb7, 16}, {0xb8, 16}, {0xb9, 16},
+  {0xba, 16}, {0xc1, 10}, {0xc2, 16}, {0xc3, 16}, {0xc4, 16}, {0xc5, 16},
+  {0xc6, 16}, {0xc7, 16}, {0xc8, 16}, {0xc9, 16}, {0xca, 16}, {0xd1, 11},
+  {0xd2, 16}, {0xd3, 16}, {0xd4, 16}, {0xd5, 16}, {0xd6, 16}, {0xd7, 16},
+  {0xd8, 16}, {0xd9, 16}, {0xda, 16}, {0xe1, 16}, {0xe2, 16}, {0xe3, 16},
+  {0xe4, 16}, {0xe5, 16}, {0xe6, 16}, {0xe7, 16}, {0xe8, 16}, {0xe9, 16},
+  {0xea, 16}, {0xf0, 11}, {0xf1, 16}, {0xf2, 16}, {0xf3, 16}, {0xf4, 16},
+  {0xf5, 16}, {0xf6, 16}, {0xf7, 16}, {0xf8, 16}, {0xf9, 16}, {0xfa, 16}
+};
+/* *INDENT-ON* */
+
+/* Table K.6 - Table for chrominance AC coefficients */
+/* *INDENT-OFF* */
+static const GstJpegHuffmanTableEntry default_chrominance_ac_table[] = {
+  {0x00,  2}, {0x01,  2}, {0x02,  3}, {0x03,  4}, {0x04,  5}, {0x05,  5},
+  {0x06,  6}, {0x07,  7}, {0x08,  9}, {0x09, 10}, {0x0a, 12}, {0x11,  4},
+  {0x12,  6}, {0x13,  8}, {0x14,  9}, {0x15, 11}, {0x16, 12}, {0x17, 16},
+  {0x18, 16}, {0x19, 16}, {0x1a, 16}, {0x21,  5}, {0x22,  8}, {0x23, 10},
+  {0x24, 12}, {0x25, 15}, {0x26, 16}, {0x27, 16}, {0x28, 16}, {0x29, 16},
+  {0x2a, 16}, {0x31,  5}, {0x32,  8}, {0x33, 10}, {0x34, 12}, {0x35, 16},
+  {0x36, 16}, {0x37, 16}, {0x38, 16}, {0x39, 16}, {0x3a, 16}, {0x41,  6},
+  {0x42,  9}, {0x43, 16}, {0x44, 16}, {0x45, 16}, {0x46, 16}, {0x47, 16},
+  {0x48, 16}, {0x49, 16}, {0x4a, 16}, {0x51,  6}, {0x52, 10}, {0x53, 16},
+  {0x54, 16}, {0x55, 16}, {0x56, 16}, {0x57, 16}, {0x58, 16}, {0x59, 16},
+  {0x5a, 16}, {0x61,  7}, {0x62, 11}, {0x63, 16}, {0x64, 16}, {0x65, 16},
+  {0x66, 16}, {0x67, 16}, {0x68, 16}, {0x69, 16}, {0x6a, 16}, {0x71,  7},
+  {0x72, 11}, {0x73, 16}, {0x74, 16}, {0x75, 16}, {0x76, 16}, {0x77, 16},
+  {0x78, 16}, {0x79, 16}, {0x7a, 16}, {0x81,  8}, {0x82, 16}, {0x83, 16},
+  {0x84, 16}, {0x85, 16}, {0x86, 16}, {0x87, 16}, {0x88, 16}, {0x89, 16},
+  {0x8a, 16}, {0x91,  9}, {0x92, 16}, {0x93, 16}, {0x94, 16}, {0x95, 16},
+  {0x96, 16}, {0x97, 16}, {0x98, 16}, {0x99, 16}, {0x9a, 16}, {0xa1,  9},
+  {0xa2, 16}, {0xa3, 16}, {0xa4, 16}, {0xa5, 16}, {0xa6, 16}, {0xa7, 16},
+  {0xa8, 16}, {0xa9, 16}, {0xaa, 16}, {0xb1,  9}, {0xb2, 16}, {0xb3, 16},
+  {0xb4, 16}, {0xb5, 16}, {0xb6, 16}, {0xb7, 16}, {0xb8, 16}, {0xb9, 16},
+  {0xba, 16}, {0xc1,  9}, {0xc2, 16}, {0xc3, 16}, {0xc4, 16}, {0xc5, 16},
+  {0xc6, 16}, {0xc7, 16}, {0xc8, 16}, {0xc9, 16}, {0xca, 16}, {0xd1, 11},
+  {0xd2, 16}, {0xd3, 16}, {0xd4, 16}, {0xd5, 16}, {0xd6, 16}, {0xd7, 16},
+  {0xd8, 16}, {0xd9, 16}, {0xda, 16}, {0xe1, 14}, {0xe2, 16}, {0xe3, 16},
+  {0xe4, 16}, {0xe5, 16}, {0xe6, 16}, {0xe7, 16}, {0xe8, 16}, {0xe9, 16},
+  {0xea, 16}, {0xf0, 10}, {0xf1, 15}, {0xf2, 16}, {0xf3, 16}, {0xf4, 16},
+  {0xf5, 16}, {0xf6, 16}, {0xf7, 16}, {0xf8, 16}, {0xf9, 16}, {0xfa, 16}
+};
+/* *INDENT-ON* */
+
+static gint gst_jpeg_scan_for_marker_code (const guint8 * data, gsize size,
+    guint offset);
+
+static inline gboolean
+jpeg_parse_to_next_marker (GstByteReader * br, GstJpegMarker * marker)
+{
+  gint ofs;
+
+  ofs = gst_jpeg_scan_for_marker_code (br->data, br->size, br->byte);
+  if (ofs < 0)
+    return FALSE;
+
+  if (marker)
+    *marker = (GstJpegMarker) br->data[ofs + 1];
+
+  gst_byte_reader_skip_unchecked (br, ofs - br->byte);
+  return TRUE;
+}
+
+/* gst_jpeg_scan_for_marker_code:
+ * @data: The data to parse
+ * @size: The size of @data
+ * @offset: The offset from which to start parsing
+ *
+ * Scans the JPEG bitstream contained in @data for the next marker
+ * code. If found, the function returns an offset to the marker code,
+ * including the 0xff prefix code but excluding any extra fill bytes.
+ *
+ * Returns: offset to the marker code if found, or -1 if not found.
+ */
+static gint
+gst_jpeg_scan_for_marker_code (const guint8 * data, gsize size, guint offset)
+{
+  guint i;
+
+  i = offset + 1;
+  while (i < size) {
+    const guint8 v = data[i];
+    if (v < 0xc0)
+      i += 2;
+    else if (v < 0xff && data[i - 1] == 0xff)
+      return i - 1;
+    else
+      i++;
+  }
+  return -1;
+}
+
+/**
+ * gst_jpeg_segment_parse_frame_header:
+ * @segment: the JPEG segment
+ * @frame_hdr: (out): The #GstJpegFrameHdr structure to fill in
+ *
+ * Parses the @frame_hdr JPEG frame header structure members from @segment.
+ *
+ * The caller must make sure there is enough data for the whole segment
+ * available.
+ *
+ * Returns: TRUE if the frame header was correctly parsed.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_segment_parse_frame_header (const GstJpegSegment * segment,
+    GstJpegFrameHdr * frame_hdr)
+{
+  GstByteReader br;
+  guint8 val;
+  guint i;
+
+  g_return_val_if_fail (segment != NULL, FALSE);
+  g_return_val_if_fail (frame_hdr != NULL, FALSE);
+
+  if (segment->size < 8)
+    return FALSE;
+
+  gst_byte_reader_init (&br, segment->data + segment->offset, segment->size);
+  gst_byte_reader_skip_unchecked (&br, 2);
+
+  U_READ_UINT8 (&br, frame_hdr->sample_precision);
+  U_READ_UINT16 (&br, frame_hdr->height);
+  U_READ_UINT16 (&br, frame_hdr->width);
+  U_READ_UINT8 (&br, frame_hdr->num_components);
+
+  if (frame_hdr->num_components > GST_JPEG_MAX_SCAN_COMPONENTS)
+    return FALSE;
+
+  if (gst_byte_reader_get_remaining (&br) < 3 * frame_hdr->num_components)
+    return FALSE;
+
+  for (i = 0; i < frame_hdr->num_components; i++) {
+    U_READ_UINT8 (&br, frame_hdr->components[i].identifier);
+    U_READ_UINT8 (&br, val);
+    frame_hdr->components[i].horizontal_factor = (val >> 4) & 0x0F;
+    frame_hdr->components[i].vertical_factor = (val & 0x0F);
+    U_READ_UINT8 (&br, frame_hdr->components[i].quant_table_selector);
+    if (frame_hdr->components[i].horizontal_factor > 4
+        || frame_hdr->components[i].vertical_factor > 4
+        || frame_hdr->components[i].quant_table_selector >= 4)
+      return FALSE;
+  }
+
+  if (gst_byte_reader_get_remaining (&br) > 0)
+    GST_DEBUG ("data left at end of frame header segment");
+
+  return TRUE;
+}
+
+/**
+ * gst_jpeg_segment_parse_scan_header:
+ * @segment: the JPEG segment
+ * @scan_hdr: (out): The #GstJpegScanHdr structure to fill in
+ *
+ * Parses the @scan_hdr JPEG scan header structure members from @segment.
+ *
+ * The caller must make sure there is enough data for the whole segment
+ * available.
+ *
+ * Returns: TRUE if the scan header was correctly parsed
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_segment_parse_scan_header (const GstJpegSegment * segment,
+    GstJpegScanHdr * scan_hdr)
+{
+  GstByteReader br;
+  guint8 val;
+  guint i;
+
+  g_return_val_if_fail (segment != NULL, FALSE);
+  g_return_val_if_fail (scan_hdr != NULL, FALSE);
+
+  gst_byte_reader_init (&br, segment->data + segment->offset, segment->size);
+
+  if (segment->size < 3)
+    return FALSE;
+
+  gst_byte_reader_skip_unchecked (&br, 2);
+
+  U_READ_UINT8 (&br, scan_hdr->num_components);
+
+  if (scan_hdr->num_components > GST_JPEG_MAX_SCAN_COMPONENTS)
+    return FALSE;
+
+  if (gst_byte_reader_get_remaining (&br) < 2 * scan_hdr->num_components)
+    return FALSE;
+
+  for (i = 0; i < scan_hdr->num_components; i++) {
+    U_READ_UINT8 (&br, scan_hdr->components[i].component_selector);
+    U_READ_UINT8 (&br, val);
+    scan_hdr->components[i].dc_selector = (val >> 4) & 0x0F;
+    scan_hdr->components[i].ac_selector = val & 0x0F;
+    if (scan_hdr->components[i].dc_selector >= 4
+        || scan_hdr->components[i].ac_selector >= 4)
+      return FALSE;
+  }
+
+  if (gst_byte_reader_get_remaining (&br) < 3)
+    return FALSE;
+
+  /* FIXME: Ss, Se, Ah, Al */
+  gst_byte_reader_skip_unchecked (&br, 3);
+
+  if (gst_byte_reader_get_remaining (&br) > 0)
+    GST_DEBUG ("data left at end of scan header segment");
+
+  return TRUE;
+}
+
+/**
+ * gst_jpeg_segment_parse_huffman_table:
+ * @segment: the JPEG segment
+ * @huff_tables: (out): The #GstJpegHuffmanTables structure to fill in
+ *
+ * Parses the JPEG Huffman table structure members from @segment.
+ *
+ * The caller must make sure there is enough data for the whole segment
+ * available.
+ *
+ * Note: @huf_tables represents the complete set of possible Huffman
+ * tables. However, the parser will only write to the Huffman table
+ * specified by the table destination identifier (Th). While doing so,
+ * the @valid flag of the specified Huffman table will also be set to
+ * %TRUE;
+ *
+ * Returns: TRUE if the Huffman table was correctly parsed.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_segment_parse_huffman_table (const GstJpegSegment * segment,
+    GstJpegHuffmanTables * huff_tables)
+{
+  GstByteReader br;
+  GstJpegHuffmanTable *huf_table;
+  guint8 val, table_class, table_index;
+  guint32 value_count;
+  guint i;
+
+  g_return_val_if_fail (segment != NULL, FALSE);
+  g_return_val_if_fail (huff_tables != NULL, FALSE);
+
+  if (segment->size < 2)
+    return FALSE;
+
+  gst_byte_reader_init (&br, segment->data + segment->offset, segment->size);
+
+  gst_byte_reader_skip_unchecked (&br, 2);
+
+  while (gst_byte_reader_get_remaining (&br) > 0) {
+    U_READ_UINT8 (&br, val);
+    table_class = ((val >> 4) & 0x0F);
+    table_index = (val & 0x0F);
+    if (table_index >= GST_JPEG_MAX_SCAN_COMPONENTS)
+      return FALSE;
+    if (table_class == 0) {
+      huf_table = &huff_tables->dc_tables[table_index];
+    } else {
+      huf_table = &huff_tables->ac_tables[table_index];
+    }
+    READ_BYTES (&br, huf_table->huf_bits, 16);
+    value_count = 0;
+    for (i = 0; i < 16; i++)
+      value_count += huf_table->huf_bits[i];
+    READ_BYTES (&br, huf_table->huf_values, value_count);
+    huf_table->valid = TRUE;
+  }
+  return TRUE;
+
+failed:
+  return FALSE;
+}
+
+/**
+ * gst_jpeg_segment_parse_quantization_table:
+ * @segment: the JPEG segment
+ * @quant_tables: (out): The #GstJpegQuantTables structure to fill in
+ *
+ * Parses the JPEG quantization table structure members from @segment.
+ *
+ * The caller must make sure there is enough data for the whole segment
+ * available.
+ *
+ * Note: @quant_tables represents the complete set of possible
+ * quantization tables. However, the parser will only write to the
+ * quantization table specified by the table destination identifier
+ * (Tq). While doing so, the @valid flag of the specified quantization
+ * table will also be set to %TRUE.
+ *
+ * Returns: TRUE if the quantization table was correctly parsed.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_segment_parse_quantization_table (const GstJpegSegment * segment,
+    GstJpegQuantTables * quant_tables)
+{
+  GstByteReader br;
+  GstJpegQuantTable *quant_table;
+  guint8 val, table_index;
+  guint i;
+
+  g_return_val_if_fail (segment != NULL, FALSE);
+  g_return_val_if_fail (quant_tables != NULL, FALSE);
+
+  if (segment->size < 2)
+    return FALSE;
+
+  gst_byte_reader_init (&br, segment->data + segment->offset, segment->size);
+
+  gst_byte_reader_skip_unchecked (&br, 2);
+
+  while (gst_byte_reader_get_remaining (&br) > 0) {
+    guint8 element_size;
+
+    U_READ_UINT8 (&br, val);
+    table_index = (val & 0x0f);
+    if (table_index >= GST_JPEG_MAX_SCAN_COMPONENTS)
+      return FALSE;
+    quant_table = &quant_tables->quant_tables[table_index];
+    quant_table->quant_precision = ((val >> 4) & 0x0f);
+
+    element_size = (quant_table->quant_precision == 0) ? 1 : 2;
+    if (gst_byte_reader_get_remaining (&br) <
+        GST_JPEG_MAX_QUANT_ELEMENTS * element_size)
+      return FALSE;
+    for (i = 0; i < GST_JPEG_MAX_QUANT_ELEMENTS; i++) {
+      if (!quant_table->quant_precision) {      /* 8-bit values */
+        U_READ_UINT8 (&br, val);
+        quant_table->quant_table[i] = val;
+      } else {                  /* 16-bit values */
+        U_READ_UINT16 (&br, quant_table->quant_table[i]);
+      }
+    }
+    quant_table->valid = TRUE;
+  }
+  return TRUE;
+}
+
+/**
+ * gst_jpeg_segment_parse_restart_interval:
+ * @segment: the JPEG segment
+ * @interval: (out): The parsed restart interval value
+ *
+ * The caller must make sure there is enough data for the whole segment
+ * available.
+ *
+ * Returns: TRUE if the restart interval value was correctly parsed.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_segment_parse_restart_interval (const GstJpegSegment * segment,
+    guint * interval)
+{
+  GstByteReader br;
+  guint16 val;
+
+  g_return_val_if_fail (segment != NULL, FALSE);
+  g_return_val_if_fail (interval != NULL, FALSE);
+
+  if (segment->size < 4)
+    return FALSE;
+
+  gst_byte_reader_init (&br, segment->data + segment->offset, segment->size);
+  gst_byte_reader_skip_unchecked (&br, 2);
+
+  U_READ_UINT16 (&br, val);
+  *interval = val;
+  return TRUE;
+}
+
+static int
+compare_huffman_table_entry (const void *a, const void *b)
+{
+  const GstJpegHuffmanTableEntry *const e1 = *(GstJpegHuffmanTableEntry **) a;
+  const GstJpegHuffmanTableEntry *const e2 = *(GstJpegHuffmanTableEntry **) b;
+
+  if (e1->length == e2->length)
+    return (gint) e1->value - (gint) e2->value;
+  return (gint) e1->length - (gint) e2->length;
+}
+
+static void
+build_huffman_table (GstJpegHuffmanTable * huf_table,
+    const GstJpegHuffmanTableEntry * entries, guint num_entries)
+{
+  const GstJpegHuffmanTableEntry *sorted_entries[256];
+  guint i, j, n;
+
+  g_assert (num_entries <= G_N_ELEMENTS (sorted_entries));
+
+  for (i = 0; i < num_entries; i++)
+    sorted_entries[i] = &entries[i];
+  qsort (sorted_entries, num_entries, sizeof (sorted_entries[0]),
+      compare_huffman_table_entry);
+
+  for (i = 0, j = 1, n = 0; i < num_entries; i++) {
+    const GstJpegHuffmanTableEntry *const e = sorted_entries[i];
+    if (e->length != j) {
+      huf_table->huf_bits[j++ - 1] = n;
+      for (; j < e->length; j++)
+        huf_table->huf_bits[j - 1] = 0;
+      n = 0;
+    }
+    huf_table->huf_values[i] = e->value;
+    n++;
+  }
+  huf_table->huf_bits[j - 1] = n;
+
+  for (; j < G_N_ELEMENTS (huf_table->huf_bits); j++)
+    huf_table->huf_bits[j] = 0;
+  for (; i < G_N_ELEMENTS (huf_table->huf_values); i++)
+    huf_table->huf_values[i] = 0;
+  huf_table->valid = TRUE;
+}
+
+/**
+ * gst_jpeg_get_default_huffman_tables:
+ * @huf_tables: (out): The default DC/AC Huffman tables to fill in
+ *
+ * Fills in @huf_tables with the default AC/DC Huffman tables, as
+ * specified by the JPEG standard.
+ *
+ * Since: 1.6
+ */
+void
+gst_jpeg_get_default_huffman_tables (GstJpegHuffmanTables * huf_tables)
+{
+  g_return_if_fail (huf_tables != NULL);
+
+  /* Build DC tables */
+  build_huffman_table (&huf_tables->dc_tables[0], default_luminance_dc_table,
+      G_N_ELEMENTS (default_luminance_dc_table));
+  build_huffman_table (&huf_tables->dc_tables[1], default_chrominance_dc_table,
+      G_N_ELEMENTS (default_chrominance_dc_table));
+  memcpy (&huf_tables->dc_tables[2], &huf_tables->dc_tables[1],
+      sizeof (huf_tables->dc_tables[2]));
+
+  /* Build AC tables */
+  build_huffman_table (&huf_tables->ac_tables[0], default_luminance_ac_table,
+      G_N_ELEMENTS (default_luminance_ac_table));
+  build_huffman_table (&huf_tables->ac_tables[1], default_chrominance_ac_table,
+      G_N_ELEMENTS (default_chrominance_ac_table));
+  memcpy (&huf_tables->ac_tables[2], &huf_tables->ac_tables[1],
+      sizeof (huf_tables->ac_tables[2]));
+}
+
+static void
+build_quant_table (GstJpegQuantTable * quant_table, const guint8 values[64])
+{
+  guint i;
+
+  for (i = 0; i < 64; i++)
+    quant_table->quant_table[i] = values[zigzag_index[i]];
+  quant_table->quant_precision = 0;     /* Pq = 0 (8-bit precision) */
+  quant_table->valid = TRUE;
+}
+
+/**
+ * gst_jpeg_get_default_quantization_table:
+ * @quant_tables: (out): The default luma/chroma quant-tables in zigzag mode
+ *
+ * Fills in @quant_tables with the default quantization tables, as
+ * specified by the JPEG standard.
+ *
+ * Since: 1.6
+ */
+void
+gst_jpeg_get_default_quantization_tables (GstJpegQuantTables * quant_tables)
+{
+  g_return_if_fail (quant_tables != NULL);
+
+  build_quant_table (&quant_tables->quant_tables[0],
+      default_luminance_quant_table);
+  build_quant_table (&quant_tables->quant_tables[1],
+      default_chrominance_quant_table);
+  build_quant_table (&quant_tables->quant_tables[2],
+      default_chrominance_quant_table);
+}
+
+/**
+ * gst_jpeg_parse:
+ * @segment: (out): pointer to a #GstJpegSegment structure to fill in
+ * @data: The data to parse
+ * @size: The size of @data
+ * @offset: The offset from which to start parsing
+ *
+ * Parses the JPEG bitstream contained in @data, and returns the
+ * detected segment as a #GstJpegSegment.
+ *
+ * Note that a valid segment may be returned with a length that exceeds
+ * the available data. It is up to the caller to make sure there's enough
+ * data available when parsing the segment.
+ *
+ * Returns: TRUE if a packet start code was found.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_jpeg_parse (GstJpegSegment * segment,
+    const guint8 * data, gsize size, guint offset)
+{
+  GstJpegSegment *seg = segment;
+  GstByteReader br;
+  guint16 length;
+
+  g_return_val_if_fail (seg != NULL, FALSE);
+  g_return_val_if_fail (data != NULL, FALSE);
+
+  if (size <= offset) {
+    GST_DEBUG ("failed to parse from offset %u, buffer is too small", offset);
+    return FALSE;
+  }
+
+  size -= offset;
+  gst_byte_reader_init (&br, &data[offset], size);
+
+  if (!jpeg_parse_to_next_marker (&br, &seg->marker)) {
+    GST_DEBUG ("failed to find marker code");
+    return FALSE;
+  }
+
+  gst_byte_reader_skip_unchecked (&br, 2);
+  seg->offset = offset + gst_byte_reader_get_pos (&br);
+  seg->size = -1;
+
+  /* Try to find end of segment */
+  switch (seg->marker) {
+    case GST_JPEG_MARKER_SOI:
+    case GST_JPEG_MARKER_EOI:
+    fixed_size_segment:
+      seg->size = 0;
+      break;
+
+    case (GST_JPEG_MARKER_SOF_MIN + 0):        /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 1):        /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 2):        /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 3):        /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 9):        /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 10):       /* Lf */
+    case (GST_JPEG_MARKER_SOF_MIN + 11):       /* Lf */
+    case GST_JPEG_MARKER_SOS:  /* Ls */
+    case GST_JPEG_MARKER_DQT:  /* Lq */
+    case GST_JPEG_MARKER_DHT:  /* Lh */
+    case GST_JPEG_MARKER_DAC:  /* La */
+    case GST_JPEG_MARKER_DRI:  /* Lr */
+    case GST_JPEG_MARKER_COM:  /* Lc */
+    case GST_JPEG_MARKER_DNL:  /* Ld */
+    variable_size_segment:
+      READ_UINT16 (&br, length);
+      seg->size = length;
+      break;
+
+    default:
+      /* Application data segment length (Lp) */
+      if (seg->marker >= GST_JPEG_MARKER_APP_MIN &&
+          seg->marker <= GST_JPEG_MARKER_APP_MAX)
+        goto variable_size_segment;
+
+      /* Restart markers (fixed size, two bytes only) */
+      if (seg->marker >= GST_JPEG_MARKER_RST_MIN &&
+          seg->marker <= GST_JPEG_MARKER_RST_MAX)
+        goto fixed_size_segment;
+
+      /* Fallback: scan for next marker */
+      if (!jpeg_parse_to_next_marker (&br, NULL))
+        goto failed;
+      seg->size = gst_byte_reader_get_pos (&br) - seg->offset;
+      break;
+  }
+
+  seg->data = data;
+  return TRUE;
+
+failed:
+  return FALSE;
+}
diff --git a/gst-libs/gst/codecparsers/gstjpegparser.h b/gst-libs/gst/codecparsers/gstjpegparser.h
new file mode 100644
index 0000000..98db436
--- /dev/null
+++ b/gst-libs/gst/codecparsers/gstjpegparser.h
@@ -0,0 +1,403 @@
+/*  GStreamer JPEG parser
+ *  Copyright (C) 2011-2012 Intel Corporation
+ *  Copyright (C) 2015 Tim-Philipp Müller <tim@centricular.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; either version 2.1
+ *  of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301 USA
+ */
+
+#ifndef GST_JPEG_PARSER_H
+#define GST_JPEG_PARSER_H
+
+#ifndef GST_USE_UNSTABLE_API
+#  warning "The JPEG parsing 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>
+
+G_BEGIN_DECLS
+
+/**
+ * GST_JPEG_MAX_FRAME_COMPONENTS:
+ *
+ * Maximum number of image components in a frame (Nf).
+ *
+ * Since: 1.6
+ */
+#define GST_JPEG_MAX_FRAME_COMPONENTS   256
+
+/**
+ * GST_JPEG_MAX_SCAN_COMPONENTS:
+ *
+ * Maximum number of image components in a scan (Ns).
+ *
+ * Since: 1.6
+ */
+#define GST_JPEG_MAX_SCAN_COMPONENTS    4
+
+/**
+ * GST_JPEG_MAX_QUANT_ELEMENTS:
+ *
+ * Number of elements in the quantization table.
+ *
+ * Since: 1.6
+ */
+#define GST_JPEG_MAX_QUANT_ELEMENTS     64
+
+typedef struct _GstJpegQuantTable       GstJpegQuantTable;
+typedef struct _GstJpegQuantTables      GstJpegQuantTables;
+typedef struct _GstJpegHuffmanTable     GstJpegHuffmanTable;
+typedef struct _GstJpegHuffmanTables    GstJpegHuffmanTables;
+typedef struct _GstJpegScanComponent    GstJpegScanComponent;
+typedef struct _GstJpegScanHdr          GstJpegScanHdr;
+typedef struct _GstJpegFrameComponent   GstJpegFrameComponent;
+typedef struct _GstJpegFrameHdr         GstJpegFrameHdr;
+typedef struct _GstJpegSegment          GstJpegSegment;
+
+/**
+ * GstJpegMarker:
+ * @GST_JPEG_MARKER_SOF0: Start of frame marker code (Baseline)
+ * @GST_JPEG_MARKER_SOF1: Start of frame marker code (Extended Sequential, Huffman)
+ * @GST_JPEG_MARKER_SOF2: Start of frame marker code (Progressive, Huffman)
+ * @GST_JPEG_MARKER_SOF3: Start of frame marker code (Lossless, Huffman)
+ * @GST_JPEG_MARKER_SOF5: Start of frame marker code (Differential Sequential, Huffman)
+ * @GST_JPEG_MARKER_SOF6: Start of frame marker code (Differential Progressive, Huffman)
+ * @GST_JPEG_MARKER_SOF7: Start of frame marker code (Differential Lossless, Huffman)
+ * @GST_JPEG_MARKER_SOF9: Start of frame marker code (Extended Sequential, Arithmetic)
+ * @GST_JPEG_MARKER_SOF10: Start of frame marker code (Progressive, Arithmetic)
+ * @GST_JPEG_MARKER_SOF11: Start of frame marker code (Lossless, Arithmetic)
+ * @GST_JPEG_MARKER_SOF13: Start of frame marker code (Differential Sequential, Arithmetic)
+ * @GST_JPEG_MARKER_SOF14: Start of frame marker code (Differential Progressive, Arithmetic)
+ * @GST_JPEG_MARKER_SOF15: Start of frame marker code (Differential Lossless, Arithmetic)
+ * @GST_JPEG_MARKER_DHT: Huffman table marker code
+ * @GST_JPEG_MARKER_DAC: Arithmetic coding marker code
+ * @GST_JPEG_MARKER_RST_MIN: Restart interval min marker code
+ * @GST_JPEG_MARKER_RST_MAX: Restart interval max marker code
+ * @GST_JPEG_MARKER_SOI: Start of image marker code
+ * @GST_JPEG_MARKER_EOI: End of image marker code
+ * @GST_JPEG_MARKER_SOS: Start of scan marker code
+ * @GST_JPEG_MARKER_DQT: Define quantization table marker code
+ * @GST_JPEG_MARKER_DNL: Define number of lines marker code
+ * @GST_JPEG_MARKER_DRI: Define restart interval marker code
+ * @GST_JPEG_MARKER_APP0: Application segment 0 marker code
+ * @GST_JPEG_MARKER_APP1: Application segment 1 marker code
+ * @GST_JPEG_MARKER_APP2: Application segment 2 marker code
+ * @GST_JPEG_MARKER_APP3: Application segment 3 marker code
+ * @GST_JPEG_MARKER_APP4: Application segment 4 marker code
+ * @GST_JPEG_MARKER_APP5: Application segment 5 marker code
+ * @GST_JPEG_MARKER_APP6: Application segment 6 marker code
+ * @GST_JPEG_MARKER_APP7: Application segment 7 marker code
+ * @GST_JPEG_MARKER_APP8: Application segment 8 marker code
+ * @GST_JPEG_MARKER_APP9: Application segment 9 marker code
+ * @GST_JPEG_MARKER_APP10: Application segment 10 marker code
+ * @GST_JPEG_MARKER_APP11: Application segment 11 marker code
+ * @GST_JPEG_MARKER_APP12: Application segment 12 marker code
+ * @GST_JPEG_MARKER_APP13: Application segment 13 marker code
+ * @GST_JPEG_MARKER_APP14: Application segment 14 marker code
+ * @GST_JPEG_MARKER_APP15: Application segment 15 marker code
+ * @GST_JPEG_MARKER_COM: Comment marker code
+ *
+ * Indicates the type of JPEG segment.
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_JPEG_MARKER_SOF0          = 0xC0,
+  GST_JPEG_MARKER_SOF1          = 0xC1,
+  GST_JPEG_MARKER_SOF2          = 0xC2,
+  GST_JPEG_MARKER_SOF3          = 0xC3,
+  /* 0xC4 = DHT see below */
+  GST_JPEG_MARKER_SOF5          = 0xC5,
+  GST_JPEG_MARKER_SOF6          = 0xC6,
+  GST_JPEG_MARKER_SOF7          = 0xC7,
+  /* 0xC8 = reserved */
+  GST_JPEG_MARKER_SOF9          = 0xC9,
+  GST_JPEG_MARKER_SOF10         = 0xCA,
+  GST_JPEG_MARKER_SOF11         = 0xCB,
+  /* 0xCC = DAC see below */
+  GST_JPEG_MARKER_SOF13         = 0xCD,
+  GST_JPEG_MARKER_SOF14         = 0xCE,
+  GST_JPEG_MARKER_SOF15         = 0xCF,
+  GST_JPEG_MARKER_DHT           = 0xC4,
+  GST_JPEG_MARKER_DAC           = 0xCC,
+  GST_JPEG_MARKER_RST0          = 0xD0,
+  GST_JPEG_MARKER_RST1          = 0xD1,
+  GST_JPEG_MARKER_RST2          = 0xD2,
+  GST_JPEG_MARKER_RST3          = 0xD3,
+  GST_JPEG_MARKER_RST4          = 0xD4,
+  GST_JPEG_MARKER_RST5          = 0xD5,
+  GST_JPEG_MARKER_RST6          = 0xD6,
+  GST_JPEG_MARKER_RST7          = 0xD7,
+  GST_JPEG_MARKER_SOI           = 0xD8,
+  GST_JPEG_MARKER_EOI           = 0xD9,
+  GST_JPEG_MARKER_SOS           = 0xDA,
+  GST_JPEG_MARKER_DQT           = 0xDB,
+  GST_JPEG_MARKER_DNL           = 0xDC,
+  GST_JPEG_MARKER_DRI           = 0xDD,
+  GST_JPEG_MARKER_APP0          = 0xE0,
+  GST_JPEG_MARKER_APP1          = 0xE1,
+  GST_JPEG_MARKER_APP2          = 0xE2,
+  GST_JPEG_MARKER_APP3          = 0xE3,
+  GST_JPEG_MARKER_APP4          = 0xE4,
+  GST_JPEG_MARKER_APP5          = 0xE5,
+  GST_JPEG_MARKER_APP6          = 0xE6,
+  GST_JPEG_MARKER_APP7          = 0xE7,
+  GST_JPEG_MARKER_APP8          = 0xE8,
+  GST_JPEG_MARKER_APP9          = 0xE9,
+  GST_JPEG_MARKER_APP10         = 0xEA,
+  GST_JPEG_MARKER_APP11         = 0xEB,
+  GST_JPEG_MARKER_APP12         = 0xEC,
+  GST_JPEG_MARKER_APP13         = 0xED,
+  GST_JPEG_MARKER_APP14         = 0xEE,
+  GST_JPEG_MARKER_APP15         = 0xEF,
+  GST_JPEG_MARKER_COM           = 0xFE,
+} GstJpegMarker;
+
+#define GST_JPEG_MARKER_SOF_MIN GST_JPEG_MARKER_SOF0
+#define GST_JPEG_MARKER_SOF_MAX GST_JPEG_MARKER_SOF15
+
+#define GST_JPEG_MARKER_APP_MIN GST_JPEG_MARKER_APP0
+#define GST_JPEG_MARKER_APP_MAX GST_JPEG_MARKER_APP15
+
+#define GST_JPEG_MARKER_RST_MIN GST_JPEG_MARKER_RST0
+#define GST_JPEG_MARKER_RST_MAX GST_JPEG_MARKER_RST7
+
+/**
+ * GstJpegProfile:
+ * @GST_JPEG_PROFILE_BASELINE: Baseline DCT
+ * @GST_JPEG_PROFILE_EXTENDED: Extended sequential DCT
+ * @GST_JPEG_PROFILE_PROGRESSIVE: Progressive DCT
+ * @GST_JPEG_PROFILE_LOSSLESS: Lossless (sequential)
+ *
+ * JPEG encoding processes.
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_JPEG_PROFILE_BASELINE     = 0x00,
+  GST_JPEG_PROFILE_EXTENDED     = 0x01,
+  GST_JPEG_PROFILE_PROGRESSIVE  = 0x02,
+  GST_JPEG_PROFILE_LOSSLESS     = 0x03,
+} GstJpegProfile;
+
+/**
+ * GstJpegEntropyCodingMode:
+ * @GST_JPEG_ENTROPY_CODING_HUFFMAN: Huffman coding
+ * @GST_JPEG_ENTROPY_CODING_ARITHMETIC: arithmetic coding
+ *
+ * JPEG entropy coding mode.
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_JPEG_ENTROPY_CODING_HUFFMAN       = 0x00,
+  GST_JPEG_ENTROPY_CODING_ARITHMETIC    = 0x08
+} GstJpegEntropyCodingMode;
+
+/**
+ * GstJpegQuantTable:
+ * @quant_precision: Quantization table element precision (Pq)
+ * @quant_table: Quantization table elements (Qk)
+ * @valid: If the quantization table is valid, which means it has
+ *   already been parsed
+ *
+ * Quantization table.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegQuantTable
+{
+  guint8 quant_precision;
+  guint16 quant_table[GST_JPEG_MAX_QUANT_ELEMENTS];
+  gboolean valid;
+};
+
+/**
+ * GstJpegQuantTables:
+ * @quant_tables: All quantization tables
+ *
+ * Helper data structure that holds all quantization tables used to
+ * decode an image.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegQuantTables
+{
+  GstJpegQuantTable quant_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
+};
+
+/**
+ * GstJpegHuffmanTable:
+ * @huf_bits: Number of Huffman codes of length i + 1 (Li)
+ * @huf_vales: Value associated with each Huffman code (Vij)
+ * @valid: If the Huffman table is valid, which means it has already
+ *   been parsed
+ *
+ * Huffman table.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegHuffmanTable
+{
+  guint8 huf_bits[16];
+  guint8 huf_values[256];
+  gboolean valid;
+};
+
+/**
+ * GstJpegHuffmanTables:
+ * @dc_tables: DC Huffman tables
+ * @ac_tables: AC Huffman tables
+ *
+ * Helper data structure that holds all AC/DC Huffman tables used to
+ * decode an image.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegHuffmanTables
+{
+  GstJpegHuffmanTable dc_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
+  GstJpegHuffmanTable ac_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
+};
+
+/**
+ * GstJpegScanComponent:
+ * @component_selector: Scan component selector (Csj)
+ * @dc_selector: DC entropy coding table destination selector (Tdj)
+ * @ac_selector: AC entropy coding table destination selector (Taj)
+
+ * Component-specification parameters.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegScanComponent
+{
+    guint8 component_selector;          /* 0 .. 255     */
+    guint8 dc_selector;                 /* 0 .. 3       */
+    guint8 ac_selector;                 /* 0 .. 3       */
+};
+
+/**
+ * GstJpegScanHdr:
+ * @num_components: Number of image components in scan (Ns)
+ * @components: Image components
+ *
+ * Scan header.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegScanHdr
+{
+  guint8 num_components;                /* 1 .. 4       */
+  GstJpegScanComponent components[GST_JPEG_MAX_SCAN_COMPONENTS];
+
+  /*< private >*/
+  guint8 _reserved1; /* Ss */
+  guint8 _reserved2; /* Se */
+  guint8 _reserved3; /* Al */
+  guint8 _reserved4; /* Ah */
+};
+
+/**
+ * GstJpegFrameComponent:
+ * @identifier: Component identifier (Ci)
+ * @horizontal_factor: Horizontal sampling factor (Hi)
+ * @vertical_factor: Vertical sampling factor (Vi)
+ * @quant_table_selector: Quantization table destination selector (Tqi)
+ *
+ * Component-specification parameters.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegFrameComponent
+{
+  guint8 identifier;                    /* 0 .. 255     */
+  guint8 horizontal_factor;             /* 1 .. 4       */
+  guint8 vertical_factor;               /* 1 .. 4       */
+  guint8 quant_table_selector;          /* 0 .. 3       */
+};
+
+/**
+ * GstJpegFrameHdr:
+ * @sample_precision: Sample precision (P)
+ * @height: Number of lines (Y)
+ * @width: Number of samples per line (X)
+ * @num_components: Number of image components in frame (Nf)
+ * @components: Image components
+ * @restart_interval: Number of MCU in the restart interval (Ri)
+ *
+ * Frame header.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegFrameHdr
+{
+  guint8 sample_precision;              /* 2 .. 16      */
+  guint16 width;                        /* 1 .. 65535   */
+  guint16 height;                       /* 0 .. 65535   */
+  guint8 num_components;                /* 1 .. 255     */
+  GstJpegFrameComponent components[GST_JPEG_MAX_FRAME_COMPONENTS];
+};
+
+/**
+ * GstJpegSegment:
+ * @marker: The type of the segment that starts at @offset
+ * @data: the data containing the jpeg segment starting at @offset
+ * @offset: The offset to the segment start in bytes. This is the
+ *   exact start of the segment, no marker code included
+ * @size: The size of the segment in bytes, or -1 if the end was not
+ *   found. It is the exact size of the segment, without the sync byte and
+ *   marker code but including any length bytes.
+ *
+ * A structure that contains the type of a segment, its offset and its size.
+ *
+ * Since: 1.6
+ */
+struct _GstJpegSegment
+{
+  GstJpegMarker marker;
+  const guint8 *data;
+  guint offset;
+  gssize size;
+};
+
+gboolean  gst_jpeg_parse (GstJpegSegment * seg,
+                          const guint8   * data,
+                          gsize            size,
+                          guint            offset);
+
+gboolean  gst_jpeg_segment_parse_frame_header  (const GstJpegSegment  * segment,
+                                                GstJpegFrameHdr       * frame_hdr);
+
+gboolean  gst_jpeg_segment_parse_scan_header   (const GstJpegSegment * segment,
+                                                GstJpegScanHdr       * scan_hdr);
+
+gboolean  gst_jpeg_segment_parse_huffman_table (const GstJpegSegment * segment,
+                                                GstJpegHuffmanTables * huff_tables);
+
+gboolean  gst_jpeg_segment_parse_restart_interval (const GstJpegSegment * segment,
+                                                   guint                * interval);
+
+gboolean  gst_jpeg_segment_parse_quantization_table (const GstJpegSegment * segment,
+                                                     GstJpegQuantTables   * quant_tables);
+
+void      gst_jpeg_get_default_quantization_tables (GstJpegQuantTables * quant_tables);
+
+void      gst_jpeg_get_default_huffman_tables (GstJpegHuffmanTables * huff_tables);
+
+G_END_DECLS
+
+#endif /* GST_JPEG_PARSER_H */
diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.c b/gst-libs/gst/codecparsers/gstmpeg4parser.c
index 4bf63e5..ce156c5 100644
--- a/gst-libs/gst/codecparsers/gstmpeg4parser.c
+++ b/gst-libs/gst/codecparsers/gstmpeg4parser.c
@@ -123,21 +123,21 @@
 };
 
 static const VLCTable mpeg4_dmv_size_vlc_table[] = {
-  {0x00, 2, 0},
-  {0x02, 3, 1},
-  {0x03, 3, 2},
-  {0x04, 3, 3},
-  {0x05, 3, 4},
-  {0x06, 3, 5},
-  {0x0e, 4, 6},
-  {0x1e, 5, 7},
-  {0x3e, 6, 8},
-  {0x7e, 7, 9},
-  {0xfe, 8, 10},
-  {0x1fe, 9, 11},
-  {0x3fe, 10, 12},
-  {0x7fe, 11, 13},
-  {0xffe, 12, 14}
+  {0, 0x00, 2},
+  {1, 0x02, 3},
+  {2, 0x03, 3},
+  {3, 0x04, 3},
+  {4, 0x05, 3},
+  {5, 0x06, 3},
+  {6, 0x0e, 4},
+  {7, 0x1e, 5},
+  {8, 0x3e, 6},
+  {9, 0x7e, 7},
+  {10, 0xfe, 8},
+  {11, 0x1fe, 9},
+  {12, 0x3fe, 10},
+  {13, 0x7fe, 11},
+  {14, 0xffe, 12}
 };
 
 static void
@@ -347,7 +347,7 @@
     }
   }
 
-  return off++;                 /* Take the following 1 into account */
+  return off + 1;               /* Take the following 1 into account */
 }
 
 /**
@@ -1641,7 +1641,7 @@
 
   CHECK_REMAINING (&br, markersize);
 
-  if (gst_bit_reader_get_bits_uint32_unchecked (&br, markersize + 1) != 0x01)
+  if (gst_bit_reader_get_bits_uint32_unchecked (&br, markersize) != 0x01)
     goto failed;
 
   if (vol->shape != GST_MPEG4_RECTANGULAR) {
diff --git a/gst-libs/gst/codecparsers/gstmpegvideometa.c b/gst-libs/gst/codecparsers/gstmpegvideometa.c
index 7f5926f..f7b2f87 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideometa.c
+++ b/gst-libs/gst/codecparsers/gstmpegvideometa.c
@@ -60,6 +60,38 @@
     g_slice_free (GstMpegVideoQuantMatrixExt, mpeg_video_meta->quantext);
 }
 
+static gboolean
+gst_mpeg_video_meta_transform (GstBuffer * dest, GstMeta * meta,
+    GstBuffer * buffer, GQuark type, gpointer data)
+{
+  GstMpegVideoMeta *smeta, *dmeta;
+
+  smeta = (GstMpegVideoMeta *) meta;
+
+  if (GST_META_TRANSFORM_IS_COPY (type)) {
+    GstMetaTransformCopy *copy = data;
+
+    if (!copy->region) {
+      /* only copy if the complete data is copied as well */
+      dmeta =
+          gst_buffer_add_mpeg_video_meta (dest, smeta->sequencehdr,
+          smeta->sequenceext, smeta->sequencedispext, smeta->pichdr,
+          smeta->picext, smeta->quantext);
+
+      if (!dmeta)
+        return FALSE;
+
+      dmeta->num_slices = smeta->num_slices;
+      dmeta->slice_offset = smeta->slice_offset;
+    }
+  } else {
+    /* return FALSE, if transform type is not supported */
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
 GType
 gst_mpeg_video_meta_api_get_type (void)
 {
@@ -86,7 +118,7 @@
         "GstMpegVideoMeta", sizeof (GstMpegVideoMeta),
         (GstMetaInitFunction) gst_mpeg_video_meta_init,
         (GstMetaFreeFunction) gst_mpeg_video_meta_free,
-        (GstMetaTransformFunction) NULL);
+        (GstMetaTransformFunction) gst_mpeg_video_meta_transform);
     g_once_init_leave (&mpeg_video_meta_info, meta);
   }
 
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 081e813..fd16ee0 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -242,7 +242,7 @@
   gint par_n, par_d;
 } PAR;
 
-static PAR aspect_ratios[] = {
+static const PAR aspect_ratios[] = {
   {0, 0},
   {1, 1},
   {12, 11},
diff --git a/gst-libs/gst/codecparsers/nalutils.c b/gst-libs/gst/codecparsers/nalutils.c
index 5d20e81..b949acb 100644
--- a/gst-libs/gst/codecparsers/nalutils.c
+++ b/gst-libs/gst/codecparsers/nalutils.c
@@ -210,16 +210,13 @@
   guint8 bit;
   guint32 value;
 
-  if (G_UNLIKELY (!nal_reader_get_bits_uint8 (nr, &bit, 1))) {
-
+  if (G_UNLIKELY (!nal_reader_get_bits_uint8 (nr, &bit, 1)))
     return FALSE;
-  }
 
   while (bit == 0) {
     i++;
-    if G_UNLIKELY
-      ((!nal_reader_get_bits_uint8 (nr, &bit, 1)))
-          return FALSE;
+    if (G_UNLIKELY (!nal_reader_get_bits_uint8 (nr, &bit, 1)))
+      return FALSE;
   }
 
   if (G_UNLIKELY (i > 32))
diff --git a/gst-libs/gst/codecparsers/nalutils.h b/gst-libs/gst/codecparsers/nalutils.h
index 87a4b33..11cbe7a 100644
--- a/gst-libs/gst/codecparsers/nalutils.h
+++ b/gst-libs/gst/codecparsers/nalutils.h
@@ -80,6 +80,14 @@
 gboolean nal_reader_get_ue (NalReader * nr, guint32 * val);
 gboolean nal_reader_get_se (NalReader * nr, gint32 * val);
 
+#define CHECK_ALLOWED_MAX(val, max) { \
+  if (val > max) { \
+    GST_WARNING ("value greater than max. value: %d, max %d", \
+                     val, max); \
+    goto error; \
+  } \
+}
+
 #define CHECK_ALLOWED(val, min, max) { \
   if (val < min || val > max) { \
     GST_WARNING ("value not in allowed range. value: %d, range %d-%d", \
@@ -130,6 +138,13 @@
   val = tmp; \
 }
 
+#define READ_UE_MAX(nr, val, max) { \
+  guint32 tmp; \
+  READ_UE (nr, tmp); \
+  CHECK_ALLOWED_MAX (tmp, max); \
+  val = tmp; \
+}
+
 #define READ_SE(nr, val) { \
   if (!nal_reader_get_se (nr, &val)) { \
     GST_WARNING ("failed to read SE"); \
diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index ed35144..36f3bf7 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
@@ -6,34 +6,42 @@
 
 noinst_HEADERS =
 
-built_header_configure = gstglconfig.h
+built_sys_header_configure = gstglconfig.h
 
 libgstgl_@GST_API_VERSION@_la_SOURCES = \
 	gstgldisplay.c \
 	gstglcontext.c \
+	gstglbasebuffer.c \
 	gstglmemory.c \
 	gstglbufferpool.c \
 	gstglfilter.c \
-        gstglshader.c \
-        gstglshadervariables.c \
-        gstglcolorconvert.c \
-        gstgldownload.c \
-        gstglupload.c \
-        gstgluploadmeta.c \
-        gstglwindow.c \
-        gstglapi.c \
-        gstglfeature.c \
-        gstglutils.c \
-        gstglframebuffer.c
+	gstglbasefilter.c \
+	gstglshader.c \
+	gstglshadervariables.c \
+	gstglcolorconvert.c \
+	gstgldownload.c \
+	gstglupload.c \
+	gstgluploadmeta.c \
+	gstglwindow.c \
+	gstglapi.c \
+	gstglfeature.c \
+	gstglutils.c \
+	gstglframebuffer.c \
+	gstglsyncmeta.c \
+	gstglviewconvert.c \
+	gstgloverlaycompositor.c \
+	utils/opengl_versions.h
 
 libgstgl_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl
 libgstgl_@GST_API_VERSION@include_HEADERS = \
 	gstglwindow.h \
 	gstgldisplay.h \
 	gstglcontext.h \
+	gstglbasebuffer.h \
 	gstglmemory.h \
 	gstglbufferpool.h \
 	gstglfilter.h \
+	gstglbasefilter.h \
 	gstglshadervariables.h \
 	gstglshader.h \
 	gstglcolorconvert.h \
@@ -44,6 +52,9 @@
 	gstglfeature.h \
 	gstglutils.h \
 	gstglframebuffer.h \
+	gstglsyncmeta.h \
+	gstglviewconvert.h \
+	gstgloverlaycompositor.h \
 	gstgl_fwd.h \
 	gl.h
 
@@ -95,8 +106,8 @@
 libgstgl_@GST_API_VERSION@_la_LIBADD += egl/libgstgl-egl.la
 endif
 
-nodist_libgstgl_@GST_API_VERSION@include_HEADERS = \
-	$(built_header_configure)
+configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst/gl
+nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
 
 libgstgl_@GST_API_VERSION@_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
@@ -113,4 +124,58 @@
 	$(GST_LT_LDFLAGS)
 
 # DISTCLEANFILES is for files generated by configure
-DISTCLEANFILES = $(built_header_configure)
+DISTCLEANFILES = $(built_sys_header_configure)
+
+if HAVE_INTROSPECTION
+BUILT_GIRSOURCES = GstGL-@GST_API_VERSION@.gir
+
+gir_headers=$(patsubst %,$(srcdir)/%, $(libgstgl_@GST_API_VERSION@include_HEADERS))
+gir_sources=$(patsubst %,$(srcdir)/%, $(libgstgl_@GST_API_VERSION@_la_SOURCES))
+
+GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@.la
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
+		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
+		$(INTROSPECTION_SCANNER) -v --namespace GstGL \
+		--nsversion=@GST_API_VERSION@ \
+		--strip-prefix=Gst \
+		--warn-all \
+		--c-include "gst/gl/gl.h" \
+		-I$(top_srcdir)/gst-libs \
+		-I$(top_builddir)/gst-libs \
+		$(GST_PLUGINS_BASE_CFLAGS) \
+		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+		--library=libgstgl-@GST_API_VERSION@.la \
+		--include=Gst-@GST_API_VERSION@ \
+		--include=GstBase-@GST_API_VERSION@ \
+		--libtool="$(top_builddir)/libtool" \
+		--pkg gstreamer-@GST_API_VERSION@ \
+		--pkg gstreamer-base-@GST_API_VERSION@ \
+		--pkg gstreamer-video-@GST_API_VERSION@ \
+		--pkg-export gstreamer-gl-@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@` \
+		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+endif
diff --git a/gst-libs/gst/gl/Makefile.in b/gst-libs/gst/gl/Makefile.in
index 433b7fa..fdbc3ce 100644
--- a/gst-libs/gst/gl/Makefile.in
+++ b/gst-libs/gst/gl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,8 +15,19 @@
 @SET_MAKE@
 
 
+
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -97,9 +108,6 @@
 @USE_EGL_TRUE@am__append_15 = egl
 @USE_EGL_TRUE@am__append_16 = egl/libgstgl-egl.la
 subdir = gst-libs/gst/gl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgstgl_@GST_API_VERSION@include_HEADERS) $(noinst_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 \
@@ -107,6 +115,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -120,7 +129,6 @@
 	$(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 \
@@ -137,6 +145,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstgl_@GST_API_VERSION@include_HEADERS) $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -168,9 +179,10 @@
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(libdir)" \
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
+	"$(DESTDIR)$(typelibsdir)" \
 	"$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)" \
-	"$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)"
+	"$(DESTDIR)$(configexecincludedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstgl_@GST_API_VERSION@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@@ -182,9 +194,11 @@
 am_libgstgl_@GST_API_VERSION@_la_OBJECTS =  \
 	libgstgl_@GST_API_VERSION@_la-gstgldisplay.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglcontext.lo \
+	libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglmemory.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglbufferpool.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglfilter.lo \
+	libgstgl_@GST_API_VERSION@_la-gstglbasefilter.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglshader.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglshadervariables.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglcolorconvert.lo \
@@ -195,7 +209,10 @@
 	libgstgl_@GST_API_VERSION@_la-gstglapi.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglfeature.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglutils.lo \
-	libgstgl_@GST_API_VERSION@_la-gstglframebuffer.lo
+	libgstgl_@GST_API_VERSION@_la-gstglframebuffer.lo \
+	libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.lo \
+	libgstgl_@GST_API_VERSION@_la-gstglviewconvert.lo \
+	libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.lo
 libgstgl_@GST_API_VERSION@_la_OBJECTS =  \
 	$(am_libgstgl_@GST_API_VERSION@_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -255,9 +272,9 @@
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+DATA = $(gir_DATA) $(typelibs_DATA)
 HEADERS = $(libgstgl_@GST_API_VERSION@include_HEADERS) \
-	$(nodist_libgstgl_@GST_API_VERSION@include_HEADERS) \
-	$(noinst_HEADERS)
+	$(nodist_configexecinclude_HEADERS) $(noinst_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 am__recursive_targets = \
@@ -285,6 +302,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -327,8 +345,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -353,8 +373,6 @@
 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@
@@ -367,7 +385,6 @@
 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@
@@ -375,6 +392,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -401,11 +420,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -424,8 +446,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -484,10 +504,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -504,7 +528,6 @@
 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@
@@ -513,7 +536,6 @@
 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@
@@ -526,7 +548,6 @@
 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@
@@ -540,6 +561,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -551,6 +573,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -589,6 +613,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -624,10 +649,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -653,6 +682,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -660,7 +692,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -689,6 +728,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -699,6 +739,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -729,17 +770,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -756,6 +796,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -794,6 +835,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -813,33 +855,41 @@
 	$(am__append_13) $(am__append_15)
 DIST_SUBDIRS = glprototypes android x11 win32 cocoa wayland dispmanx egl eagl
 noinst_HEADERS = 
-built_header_configure = gstglconfig.h
+built_sys_header_configure = gstglconfig.h
 libgstgl_@GST_API_VERSION@_la_SOURCES = \
 	gstgldisplay.c \
 	gstglcontext.c \
+	gstglbasebuffer.c \
 	gstglmemory.c \
 	gstglbufferpool.c \
 	gstglfilter.c \
-        gstglshader.c \
-        gstglshadervariables.c \
-        gstglcolorconvert.c \
-        gstgldownload.c \
-        gstglupload.c \
-        gstgluploadmeta.c \
-        gstglwindow.c \
-        gstglapi.c \
-        gstglfeature.c \
-        gstglutils.c \
-        gstglframebuffer.c
+	gstglbasefilter.c \
+	gstglshader.c \
+	gstglshadervariables.c \
+	gstglcolorconvert.c \
+	gstgldownload.c \
+	gstglupload.c \
+	gstgluploadmeta.c \
+	gstglwindow.c \
+	gstglapi.c \
+	gstglfeature.c \
+	gstglutils.c \
+	gstglframebuffer.c \
+	gstglsyncmeta.c \
+	gstglviewconvert.c \
+	gstgloverlaycompositor.c \
+	utils/opengl_versions.h
 
 libgstgl_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl
 libgstgl_@GST_API_VERSION@include_HEADERS = \
 	gstglwindow.h \
 	gstgldisplay.h \
 	gstglcontext.h \
+	gstglbasebuffer.h \
 	gstglmemory.h \
 	gstglbufferpool.h \
 	gstglfilter.h \
+	gstglbasefilter.h \
 	gstglshadervariables.h \
 	gstglshader.h \
 	gstglcolorconvert.h \
@@ -850,6 +900,9 @@
 	gstglfeature.h \
 	gstglutils.h \
 	gstglframebuffer.h \
+	gstglsyncmeta.h \
+	gstglviewconvert.h \
+	gstgloverlaycompositor.h \
 	gstgl_fwd.h \
 	gl.h
 
@@ -859,9 +912,8 @@
 	$(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)
-
+configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst/gl
+nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
 libgstgl_@GST_API_VERSION@_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
 	-I$(top_builddir)/gst-libs \
@@ -878,7 +930,18 @@
 
 
 # DISTCLEANFILES is for files generated by configure
-DISTCLEANFILES = $(built_header_configure)
+DISTCLEANFILES = $(built_sys_header_configure)
+@HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstGL-@GST_API_VERSION@.gir
+@HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, $(libgstgl_@GST_API_VERSION@include_HEADERS))
+@HAVE_INTROSPECTION_TRUE@gir_sources = $(patsubst %,$(srcdir)/%, $(libgstgl_@GST_API_VERSION@_la_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-recursive
 
 .SUFFIXES:
@@ -895,7 +958,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -959,6 +1021,8 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasefilter.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbufferpool.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglcolorconvert.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglcontext.Plo@am__quote@
@@ -968,11 +1032,14 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglfilter.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglframebuffer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglmemory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.Plo@am__quote@
 @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-gstglsyncmeta.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-gstglviewconvert.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglwindow.Plo@am__quote@
 
 .c.o:
@@ -1013,6 +1080,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-gstglcontext.lo `test -f 'gstglcontext.c' || echo '$(srcdir)/'`gstglcontext.c
 
+libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.lo: gstglbasebuffer.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-gstglbasebuffer.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.lo `test -f 'gstglbasebuffer.c' || echo '$(srcdir)/'`gstglbasebuffer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglbasebuffer.c' object='libgstgl_@GST_API_VERSION@_la-gstglbasebuffer.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-gstglbasebuffer.lo `test -f 'gstglbasebuffer.c' || echo '$(srcdir)/'`gstglbasebuffer.c
+
 libgstgl_@GST_API_VERSION@_la-gstglmemory.lo: gstglmemory.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-gstglmemory.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglmemory.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglmemory.lo `test -f 'gstglmemory.c' || echo '$(srcdir)/'`gstglmemory.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglmemory.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglmemory.Plo
@@ -1034,6 +1108,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-gstglfilter.lo `test -f 'gstglfilter.c' || echo '$(srcdir)/'`gstglfilter.c
 
+libgstgl_@GST_API_VERSION@_la-gstglbasefilter.lo: gstglbasefilter.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-gstglbasefilter.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasefilter.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglbasefilter.lo `test -f 'gstglbasefilter.c' || echo '$(srcdir)/'`gstglbasefilter.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasefilter.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglbasefilter.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglbasefilter.c' object='libgstgl_@GST_API_VERSION@_la-gstglbasefilter.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-gstglbasefilter.lo `test -f 'gstglbasefilter.c' || echo '$(srcdir)/'`gstglbasefilter.c
+
 libgstgl_@GST_API_VERSION@_la-gstglshader.lo: gstglshader.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-gstglshader.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglshader.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglshader.lo `test -f 'gstglshader.c' || echo '$(srcdir)/'`gstglshader.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglshader.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglshader.Plo
@@ -1111,11 +1192,74 @@
 @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-gstglframebuffer.lo `test -f 'gstglframebuffer.c' || echo '$(srcdir)/'`gstglframebuffer.c
 
+libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.lo: gstglsyncmeta.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-gstglsyncmeta.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.lo `test -f 'gstglsyncmeta.c' || echo '$(srcdir)/'`gstglsyncmeta.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglsyncmeta.c' object='libgstgl_@GST_API_VERSION@_la-gstglsyncmeta.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-gstglsyncmeta.lo `test -f 'gstglsyncmeta.c' || echo '$(srcdir)/'`gstglsyncmeta.c
+
+libgstgl_@GST_API_VERSION@_la-gstglviewconvert.lo: gstglviewconvert.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-gstglviewconvert.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglviewconvert.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglviewconvert.lo `test -f 'gstglviewconvert.c' || echo '$(srcdir)/'`gstglviewconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglviewconvert.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglviewconvert.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstglviewconvert.c' object='libgstgl_@GST_API_VERSION@_la-gstglviewconvert.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-gstglviewconvert.lo `test -f 'gstglviewconvert.c' || echo '$(srcdir)/'`gstglviewconvert.c
+
+libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.lo: gstgloverlaycompositor.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-gstgloverlaycompositor.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.lo `test -f 'gstgloverlaycompositor.c' || echo '$(srcdir)/'`gstgloverlaycompositor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgloverlaycompositor.c' object='libgstgl_@GST_API_VERSION@_la-gstgloverlaycompositor.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-gstgloverlaycompositor.lo `test -f 'gstgloverlaycompositor.c' || echo '$(srcdir)/'`gstgloverlaycompositor.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-libgstgl_@GST_API_VERSION@includeHEADERS: $(libgstgl_@GST_API_VERSION@include_HEADERS)
 	@$(NORMAL_INSTALL)
 	@list='$(libgstgl_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstgl_@GST_API_VERSION@includedir)" || list=; \
@@ -1137,27 +1281,27 @@
 	@list='$(libgstgl_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstgl_@GST_API_VERSION@includedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
-install-nodist_libgstgl_@GST_API_VERSION@includeHEADERS: $(nodist_libgstgl_@GST_API_VERSION@include_HEADERS)
+install-nodist_configexecincludeHEADERS: $(nodist_configexecinclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	@list='$(nodist_libgstgl_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstgl_@GST_API_VERSION@includedir)" || list=; \
+	@list='$(nodist_configexecinclude_HEADERS)'; test -n "$(configexecincludedir)" || list=; \
 	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)" || exit 1; \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(configexecincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(configexecincludedir)" || 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)$(libgstgl_@GST_API_VERSION@includedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)" || exit $$?; \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(configexecincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(configexecincludedir)" || exit $$?; \
 	done
 
-uninstall-nodist_libgstgl_@GST_API_VERSION@includeHEADERS:
+uninstall-nodist_configexecincludeHEADERS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(nodist_libgstgl_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstgl_@GST_API_VERSION@includedir)" || list=; \
+	@list='$(nodist_configexecinclude_HEADERS)'; test -n "$(configexecincludedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
+	dir='$(DESTDIR)$(configexecincludedir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
@@ -1315,10 +1459,10 @@
 	done
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
 installdirs: installdirs-recursive
 installdirs-am:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)" "$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)"; do \
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)" "$(DESTDIR)$(configexecincludedir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-recursive
@@ -1343,6 +1487,7 @@
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1375,14 +1520,16 @@
 
 info-am:
 
-install-data-am: install-libgstgl_@GST_API_VERSION@includeHEADERS \
-	install-nodist_libgstgl_@GST_API_VERSION@includeHEADERS
+install-data-am: install-girDATA \
+	install-libgstgl_@GST_API_VERSION@includeHEADERS \
+	install-typelibsDATA
 
 install-dvi: install-dvi-recursive
 
 install-dvi-am:
 
-install-exec-am: install-libLTLIBRARIES
+install-exec-am: install-libLTLIBRARIES \
+	install-nodist_configexecincludeHEADERS
 
 install-html: install-html-recursive
 
@@ -1422,9 +1569,10 @@
 
 ps-am:
 
-uninstall-am: uninstall-libLTLIBRARIES \
+uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
 	uninstall-libgstgl_@GST_API_VERSION@includeHEADERS \
-	uninstall-nodist_libgstgl_@GST_API_VERSION@includeHEADERS
+	uninstall-nodist_configexecincludeHEADERS \
+	uninstall-typelibsDATA
 
 .MAKE: $(am__recursive_targets) install-am install-strip
 
@@ -1434,20 +1582,59 @@
 	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-dvi-am install-exec install-exec-am install-girDATA \
+	install-html install-html-am install-info install-info-am \
 	install-libLTLIBRARIES \
 	install-libgstgl_@GST_API_VERSION@includeHEADERS install-man \
-	install-nodist_libgstgl_@GST_API_VERSION@includeHEADERS \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
+	install-nodist_configexecincludeHEADERS install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	install-typelibsDATA installcheck installcheck-am installdirs \
 	installdirs-am 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-am uninstall-girDATA uninstall-libLTLIBRARIES \
 	uninstall-libgstgl_@GST_API_VERSION@includeHEADERS \
-	uninstall-nodist_libgstgl_@GST_API_VERSION@includeHEADERS
+	uninstall-nodist_configexecincludeHEADERS \
+	uninstall-typelibsDATA
 
+.PRECIOUS: Makefile
+
+
+@HAVE_INTROSPECTION_TRUE@GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@.la
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
+@HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
+@HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstGL \
+@HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--strip-prefix=Gst \
+@HAVE_INTROSPECTION_TRUE@		--warn-all \
+@HAVE_INTROSPECTION_TRUE@		--c-include "gst/gl/gl.h" \
+@HAVE_INTROSPECTION_TRUE@		-I$(top_srcdir)/gst-libs \
+@HAVE_INTROSPECTION_TRUE@		-I$(top_builddir)/gst-libs \
+@HAVE_INTROSPECTION_TRUE@		$(GST_PLUGINS_BASE_CFLAGS) \
+@HAVE_INTROSPECTION_TRUE@		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+@HAVE_INTROSPECTION_TRUE@		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+@HAVE_INTROSPECTION_TRUE@		--library=libgstgl-@GST_API_VERSION@.la \
+@HAVE_INTROSPECTION_TRUE@		--include=Gst-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--include=GstBase-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--libtool="$(top_builddir)/libtool" \
+@HAVE_INTROSPECTION_TRUE@		--pkg gstreamer-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--pkg gstreamer-base-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--pkg gstreamer-video-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--pkg-export gstreamer-gl-@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@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+@HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
 # 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.
diff --git a/gst-libs/gst/gl/android/Makefile.in b/gst-libs/gst/gl/android/Makefile.in
index 0a84ca4..78cbc55 100644
--- a/gst-libs/gst/gl/android/Makefile.in
+++ b/gst-libs/gst/gl/android/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/android
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(libgstglandroidinclude_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libgstglandroidinclude_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -226,6 +236,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -243,8 +254,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -269,8 +282,6 @@
 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@
@@ -283,7 +294,6 @@
 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@
@@ -291,6 +301,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -317,11 +329,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -340,8 +355,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -400,10 +413,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -420,7 +437,6 @@
 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@
@@ -429,7 +445,6 @@
 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@
@@ -442,7 +457,6 @@
 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@
@@ -456,6 +470,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -467,6 +482,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -505,6 +522,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -540,10 +558,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -569,6 +591,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -576,7 +601,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -605,6 +637,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -615,6 +648,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -645,17 +679,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -672,6 +705,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -710,6 +744,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -760,7 +795,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/android/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/android/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1066,6 +1100,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-libgstglandroidincludeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/android/gstglwindow_android_egl.c b/gst-libs/gst/gl/android/gstglwindow_android_egl.c
index 1a70999..9837756 100644
--- a/gst-libs/gst/gl/android/gstglwindow_android_egl.c
+++ b/gst-libs/gst/gl/android/gstglwindow_android_egl.c
@@ -44,15 +44,7 @@
     window);
 static void gst_gl_window_android_egl_set_window_handle (GstGLWindow * window,
     guintptr handle);
-static void gst_gl_window_android_egl_draw (GstGLWindow * window, guint width,
-    guint height);
-static void gst_gl_window_android_egl_run (GstGLWindow * window);
-static void gst_gl_window_android_egl_quit (GstGLWindow * window);
-static void gst_gl_window_android_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
-static gboolean gst_gl_window_android_egl_open (GstGLWindow * window,
-    GError ** error);
-static void gst_gl_window_android_egl_close (GstGLWindow * window);
+static void gst_gl_window_android_egl_draw (GstGLWindow * window);
 
 static void
 gst_gl_window_android_egl_class_init (GstGLWindowAndroidEGLClass * klass)
@@ -68,12 +60,6 @@
   window_class->draw_unlocked =
       GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_draw);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_send_message_async);
-  window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_open);
-  window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_android_egl_close);
 }
 
 static void
@@ -83,104 +69,15 @@
 
 /* Must be called in the gl thread */
 GstGLWindowAndroidEGL *
-gst_gl_window_android_egl_new (void)
+gst_gl_window_android_egl_new (GstGLDisplay * display)
 {
-  GstGLWindowAndroidEGL *window;
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_EGL) == 0)
+    /* we require an egl display to create android windows */
+    return NULL;
 
   GST_DEBUG ("creating Android EGL window");
 
-  window = g_object_new (GST_GL_TYPE_WINDOW_ANDROID_EGL, NULL);
-
-  return window;
-}
-
-static gboolean
-gst_gl_window_android_egl_open (GstGLWindow * window, GError ** error)
-{
-  GstGLWindowAndroidEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-
-  window_egl->main_context = g_main_context_new ();
-  window_egl->loop = g_main_loop_new (window_egl->main_context, FALSE);
-
-  return TRUE;
-}
-
-static void
-gst_gl_window_android_egl_close (GstGLWindow * window)
-{
-  GstGLWindowAndroidEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-
-  g_main_loop_unref (window_egl->loop);
-  g_main_context_unref (window_egl->main_context);
-}
-
-static void
-gst_gl_window_android_egl_run (GstGLWindow * window)
-{
-  GstGLWindowAndroidEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-
-  GST_LOG ("starting main loop");
-  g_main_loop_run (window_egl->loop);
-  GST_LOG ("exiting main loop");
-}
-
-static void
-gst_gl_window_android_egl_quit (GstGLWindow * window)
-{
-  GstGLWindowAndroidEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-
-  GST_LOG ("sending quit");
-
-  g_main_loop_quit (window_egl->loop);
-
-  GST_LOG ("quit sent");
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_window_android_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowAndroidEGL *window_egl;
-  GstGLMessage *message;
-
-  window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_egl->main_context, (GSourceFunc) _run_message,
-      message);
+  return g_object_new (GST_GL_TYPE_WINDOW_ANDROID_EGL, NULL);
 }
 
 static void
@@ -200,17 +97,10 @@
   return (guintptr) window_egl->native_window;
 }
 
-struct draw
-{
-  GstGLWindowAndroidEGL *window;
-  guint width, height;
-};
-
 static void
 draw_cb (gpointer data)
 {
-  struct draw *draw_data = data;
-  GstGLWindowAndroidEGL *window_egl = draw_data->window;
+  GstGLWindowAndroidEGL *window_egl = data;
   GstGLWindow *window = GST_GL_WINDOW (window_egl);
   GstGLContext *context = gst_gl_window_get_context (window);
   GstGLContextEGL *context_egl = GST_GL_CONTEXT_EGL (context);
@@ -218,18 +108,17 @@
 
   if (context_egl->egl_surface) {
     gint width, height;
+    gint window_width, window_height;
 
-    if (eglQuerySurface (context_egl->egl_display,
-            context_egl->egl_surface, EGL_WIDTH, &width) &&
-        eglQuerySurface (context_egl->egl_display,
-            context_egl->egl_surface, EGL_HEIGHT, &height)
-        && (width != window_egl->window_width
+    gst_gl_window_get_surface_dimensions (window, &window_width,
+        &window_height);
+    if (eglQuerySurface (context_egl->egl_display, context_egl->egl_surface,
+            EGL_WIDTH, &width)
+        && eglQuerySurface (context_egl->egl_display, context_egl->egl_surface,
+            EGL_HEIGHT, &height)
+        && (window->queue_resize || width != window_egl->window_width
             || height != window_egl->window_height)) {
-      window_egl->window_width = width;
-      window_egl->window_height = height;
-
-      if (window->resize)
-        window->resize (window->resize_data, width, height);
+      gst_gl_window_resize (window, width, height);
     }
   }
 
@@ -242,16 +131,9 @@
 }
 
 static void
-gst_gl_window_android_egl_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_android_egl_draw (GstGLWindow * window)
 {
-  struct draw draw_data;
-  GstGLWindowAndroidEGL *window_egl = GST_GL_WINDOW_ANDROID_EGL (window);
-
-  draw_data.window = window_egl;
-  draw_data.width = width;
-  draw_data.height = height;
-
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
+  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window);
 }
 
 static guintptr
diff --git a/gst-libs/gst/gl/android/gstglwindow_android_egl.h b/gst-libs/gst/gl/android/gstglwindow_android_egl.h
index 0e927e3..eaada44 100644
--- a/gst-libs/gst/gl/android/gstglwindow_android_egl.h
+++ b/gst-libs/gst/gl/android/gstglwindow_android_egl.h
@@ -23,6 +23,7 @@
 #define __GST_GL_WINDOW_ANDROID_EGL_H__
 
 #include <gst/gl/gl.h>
+#include <gst/gl/egl/gstegl.h>
 
 G_BEGIN_DECLS
 
@@ -44,9 +45,6 @@
   EGLNativeWindowType native_window;
   gint window_width, window_height;
 
-  GMainContext *main_context;
-  GMainLoop *loop;
-
   gpointer _reserved[GST_PADDING];
 };
 
@@ -60,7 +58,7 @@
 
 GType gst_gl_window_android_egl_get_type     (void);
 
-GstGLWindowAndroidEGL * gst_gl_window_android_egl_new  (void);
+GstGLWindowAndroidEGL * gst_gl_window_android_egl_new  (GstGLDisplay * display);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/cocoa/Makefile.am b/gst-libs/gst/gl/cocoa/Makefile.am
index b374079..f45583d 100644
--- a/gst-libs/gst/gl/cocoa/Makefile.am
+++ b/gst-libs/gst/gl/cocoa/Makefile.am
@@ -4,13 +4,20 @@
 
 libgstgl_cocoa_la_SOURCES = \
 	gstglwindow_cocoa.m \
-	gstglcontext_cocoa.m
+	gstglcontext_cocoa.m \
+	gstgldisplay_cocoa.m \
+	gstglcaopengllayer.m
 
 noinst_HEADERS = \
+	gstgldisplay_cocoa.h \
 	gstglwindow_cocoa.h \
-	gstglcontext_cocoa.h \
 	gstgl_cocoa_private.h
 
+libgstgl_cocoaincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/cocoa
+libgstgl_cocoainclude_HEADERS = \
+	gstglcontext_cocoa.h \
+	gstglcaopengllayer.h
+
 libgstgl_cocoa_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
 	-I$(top_builddir)/gst-libs \
diff --git a/gst-libs/gst/gl/cocoa/Makefile.in b/gst-libs/gst/gl/cocoa/Makefile.in
index 98532d4..f2f668b 100644
--- a/gst-libs/gst/gl/cocoa/Makefile.in
+++ b/gst-libs/gst/gl/cocoa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/cocoa
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libgstgl_cocoainclude_HEADERS) \
+	$(noinst_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -127,7 +137,9 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libgstgl_cocoa_la_LIBADD =
 am_libgstgl_cocoa_la_OBJECTS = libgstgl_cocoa_la-gstglwindow_cocoa.lo \
-	libgstgl_cocoa_la-gstglcontext_cocoa.lo
+	libgstgl_cocoa_la-gstglcontext_cocoa.lo \
+	libgstgl_cocoa_la-gstgldisplay_cocoa.lo \
+	libgstgl_cocoa_la-gstglcaopengllayer.lo
 libgstgl_cocoa_la_OBJECTS = $(am_libgstgl_cocoa_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -178,7 +190,35 @@
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-HEADERS = $(noinst_HEADERS)
+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)$(libgstgl_cocoaincludedir)"
+HEADERS = $(libgstgl_cocoainclude_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
@@ -198,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -215,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -241,8 +284,6 @@
 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@
@@ -255,7 +296,6 @@
 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@
@@ -263,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -289,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -312,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -372,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -392,7 +439,6 @@
 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@
@@ -401,7 +447,6 @@
 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@
@@ -414,7 +459,6 @@
 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@
@@ -428,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -439,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -477,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -512,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -541,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -548,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -577,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -587,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -617,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -644,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -682,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -698,13 +763,20 @@
 noinst_LTLIBRARIES = libgstgl-cocoa.la
 libgstgl_cocoa_la_SOURCES = \
 	gstglwindow_cocoa.m \
-	gstglcontext_cocoa.m
+	gstglcontext_cocoa.m \
+	gstgldisplay_cocoa.m \
+	gstglcaopengllayer.m
 
 noinst_HEADERS = \
+	gstgldisplay_cocoa.h \
 	gstglwindow_cocoa.h \
-	gstglcontext_cocoa.h \
 	gstgl_cocoa_private.h
 
+libgstgl_cocoaincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/cocoa
+libgstgl_cocoainclude_HEADERS = \
+	gstglcontext_cocoa.h \
+	gstglcaopengllayer.h
+
 libgstgl_cocoa_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
 	-I$(top_builddir)/gst-libs \
@@ -742,7 +814,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/cocoa/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/cocoa/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -781,7 +852,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_cocoa_la-gstglcaopengllayer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_cocoa_la-gstglcontext_cocoa.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_cocoa_la-gstgldisplay_cocoa.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_cocoa_la-gstglwindow_cocoa.Plo@am__quote@
 
 .m.o:
@@ -822,11 +895,46 @@
 @AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstgl_cocoa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_cocoa_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstgl_cocoa_la-gstglcontext_cocoa.lo `test -f 'gstglcontext_cocoa.m' || echo '$(srcdir)/'`gstglcontext_cocoa.m
 
+libgstgl_cocoa_la-gstgldisplay_cocoa.lo: gstgldisplay_cocoa.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstgl_cocoa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_cocoa_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstgl_cocoa_la-gstgldisplay_cocoa.lo -MD -MP -MF $(DEPDIR)/libgstgl_cocoa_la-gstgldisplay_cocoa.Tpo -c -o libgstgl_cocoa_la-gstgldisplay_cocoa.lo `test -f 'gstgldisplay_cocoa.m' || echo '$(srcdir)/'`gstgldisplay_cocoa.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_cocoa_la-gstgldisplay_cocoa.Tpo $(DEPDIR)/libgstgl_cocoa_la-gstgldisplay_cocoa.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='gstgldisplay_cocoa.m' object='libgstgl_cocoa_la-gstgldisplay_cocoa.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstgl_cocoa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_cocoa_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstgl_cocoa_la-gstgldisplay_cocoa.lo `test -f 'gstgldisplay_cocoa.m' || echo '$(srcdir)/'`gstgldisplay_cocoa.m
+
+libgstgl_cocoa_la-gstglcaopengllayer.lo: gstglcaopengllayer.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstgl_cocoa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_cocoa_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstgl_cocoa_la-gstglcaopengllayer.lo -MD -MP -MF $(DEPDIR)/libgstgl_cocoa_la-gstglcaopengllayer.Tpo -c -o libgstgl_cocoa_la-gstglcaopengllayer.lo `test -f 'gstglcaopengllayer.m' || echo '$(srcdir)/'`gstglcaopengllayer.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_cocoa_la-gstglcaopengllayer.Tpo $(DEPDIR)/libgstgl_cocoa_la-gstglcaopengllayer.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='gstglcaopengllayer.m' object='libgstgl_cocoa_la-gstglcaopengllayer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstgl_cocoa_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_cocoa_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstgl_cocoa_la-gstglcaopengllayer.lo `test -f 'gstglcaopengllayer.m' || echo '$(srcdir)/'`gstglcaopengllayer.m
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-libgstgl_cocoaincludeHEADERS: $(libgstgl_cocoainclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(libgstgl_cocoainclude_HEADERS)'; test -n "$(libgstgl_cocoaincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstgl_cocoaincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libgstgl_cocoaincludedir)" || 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)$(libgstgl_cocoaincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstgl_cocoaincludedir)" || exit $$?; \
+	done
+
+uninstall-libgstgl_cocoaincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgstgl_cocoainclude_HEADERS)'; test -n "$(libgstgl_cocoaincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libgstgl_cocoaincludedir)'; $(am__uninstall_files_from_dir)
 
 ID: $(am__tagged_files)
 	$(am__define_uniq_tagged_files); mkid -fID $$unique
@@ -914,6 +1022,9 @@
 check: check-am
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
 installdirs:
+	for dir in "$(DESTDIR)$(libgstgl_cocoaincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -967,7 +1078,7 @@
 
 info-am:
 
-install-data-am:
+install-data-am: install-libgstgl_cocoaincludeHEADERS
 
 install-dvi: install-dvi-am
 
@@ -1013,7 +1124,7 @@
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-libgstgl_cocoaincludeHEADERS
 
 .MAKE: install-am install-strip
 
@@ -1024,12 +1135,15 @@
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am
+	install-info-am install-libgstgl_cocoaincludeHEADERS \
+	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 tags-am uninstall \
+	uninstall-am uninstall-libgstgl_cocoaincludeHEADERS
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h b/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h
index fa7178b..ae7abc8 100644
--- a/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h
+++ b/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h
@@ -27,13 +27,18 @@
 
 #include "gstglwindow_cocoa.h"
 #include "gstglcontext_cocoa.h"
+#include "gstglcaopengllayer.h"
 
 G_BEGIN_DECLS
 
 struct _GstGLContextCocoaPrivate
 {
-  NSOpenGLContext *gl_context;
-  NSOpenGLContext *external_gl_context;
+  CGLPixelFormatObj pixel_format;
+  CGLContextObj gl_context;
+  CGLContextObj external_gl_context;
+
+  GstGLAPI context_api;
+
   gint source_id;
 };
 
@@ -45,12 +50,16 @@
 /* =============================================================*/
 
 @interface GstGLNSView: NSView {
+@public
   GstGLWindowCocoa *window_cocoa;
+  GstGLCAOpenGLLayer *layer;
 }
-- (id) initWithFrame:(GstGLWindowCocoa *)window rect:(NSRect)contentRect;
+- (id) initWithFrameLayer:(GstGLWindowCocoa *)window rect:(NSRect)contentRect layer:(CALayer *)layerContent;
 @end
 
-gboolean gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa, NSRect rect);
+gboolean gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa);
+
+void _invoke_on_main (GstGLWindowCB func, gpointer data);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h
new file mode 100644
index 0000000..2ed87b7
--- /dev/null
+++ b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h
@@ -0,0 +1,61 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_CA_OPENGL_LAYER__
+#define __GST_GL_CA_OPENGL_LAYER__
+
+#include <gst/gst.h>
+#include <gst/gl/gl.h>
+#include <Cocoa/Cocoa.h>
+
+#include <gst/gl/cocoa/gstglcontext_cocoa.h>
+
+G_BEGIN_DECLS
+
+@interface GstGLCAOpenGLLayer : CAOpenGLLayer {
+@public
+  GstGLContextCocoa *gst_gl_context;
+  CGLContextObj gl_context;
+
+@private
+  GstGLContext *draw_context;
+  CGRect last_bounds;
+  gint expected_dims[4];
+
+  GstGLWindowCB draw_cb;
+  gpointer draw_data;
+  GDestroyNotify draw_notify;
+
+  GstGLWindowResizeCB resize_cb;
+  gpointer resize_data;
+  GDestroyNotify resize_notify;
+
+  gint can_draw;
+  gboolean queue_resize;
+}
+- (void) setDrawCallback:(GstGLWindowCB)cb data:(gpointer)a notify:(GDestroyNotify)notify;
+- (void) setResizeCallback:(GstGLWindowResizeCB)cb data:(gpointer)a notify:(GDestroyNotify)notify;
+- (void) queueResize;
+- (id) initWithGstGLContext: (GstGLContextCocoa *)context;
+@end
+
+G_END_DECLS
+
+#endif /* __GST_GL_CA_OPENGL_LAYER__ */
diff --git a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m
new file mode 100644
index 0000000..cc82c3c
--- /dev/null
+++ b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m
@@ -0,0 +1,232 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 <Cocoa/Cocoa.h>
+
+#include "gstglcaopengllayer.h"
+#include "gstgl_cocoa_private.h"
+
+@implementation GstGLCAOpenGLLayer
+- (void)dealloc {
+  if (self->draw_notify)
+    self->draw_notify (self->draw_data);
+
+  if (self->draw_context)
+    gst_object_unref (self->draw_context);
+
+  GST_TRACE ("dealloc GstGLCAOpenGLLayer %p context %p", self, self->gst_gl_context);
+
+  [super dealloc];
+}
+
+static void
+_context_ready (gpointer data)
+{
+  GstGLCAOpenGLLayer *ca_layer = data;
+
+  g_atomic_int_set (&ca_layer->can_draw, 1);
+}
+
+- (id)initWithGstGLContext:(GstGLContextCocoa *)parent_gl_context {
+  [super init];
+
+  GST_LOG ("init CAOpenGLLayer");
+
+  self->gst_gl_context = parent_gl_context;
+  self.needsDisplayOnBoundsChange = YES;
+
+  gst_gl_window_send_message_async (GST_GL_CONTEXT (parent_gl_context)->window,
+      (GstGLWindowCB) _context_ready, self, NULL);
+
+  return self;
+}
+
+- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask {
+  CGLPixelFormatObj fmt = NULL;
+
+  if (self->gst_gl_context)
+    fmt = gst_gl_context_cocoa_get_pixel_format (self->gst_gl_context);
+
+  if (!fmt) {
+    CGLPixelFormatAttribute attribs[] = {
+      kCGLPFADoubleBuffer,
+      kCGLPFAAccumSize, 32,
+      0
+    };
+    CGLError ret;
+    gint npix = 0;
+
+    GST_DEBUG ("creating new pixel format for CAOpenGLLayer %p", self);
+
+    ret = CGLChoosePixelFormat (attribs, &fmt, &npix);
+    if (ret != kCGLNoError) {
+      GST_ERROR ("CAOpenGLLayer cannot choose a pixel format: %s", CGLErrorString (ret));
+    }
+  }
+
+  return fmt;
+}
+
+- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat {
+  GstGLDisplay *display;
+  CGLContextObj external_context = NULL;
+  CGLError ret;
+  GError *error = NULL;
+
+  if (self->gst_gl_context)
+    external_context = (CGLContextObj) gst_gl_context_get_gl_context (GST_GL_CONTEXT (self->gst_gl_context));
+
+  GST_INFO ("attempting to create CGLContext for CAOpenGLLayer with "
+      "share context %p", external_context);
+
+  ret = CGLCreateContext (pixelFormat, external_context, &self->gl_context);
+  if (ret != kCGLNoError) {
+    GST_ERROR ("failed to create CGL context in CAOpenGLLayer with share context %p: %s", external_context, CGLErrorString(ret));
+    return NULL;
+  }
+
+  if (self->draw_context)
+    gst_object_unref (self->draw_context);
+
+  if (kCGLNoError != CGLSetCurrentContext (self->gl_context)) {
+    GST_ERROR ("failed set cgl context %p current", self->gl_context);
+    return NULL;
+  }
+
+  display = gst_gl_context_get_display (GST_GL_CONTEXT (self->gst_gl_context));
+  self->draw_context = gst_gl_context_new_wrapped (display,
+      (guintptr) self->gl_context, GST_GL_PLATFORM_CGL,
+      gst_gl_context_get_current_gl_api (GST_GL_PLATFORM_CGL, NULL, NULL));
+  gst_object_unref (display);
+
+  if (!self->draw_context) {
+    GST_ERROR ("failed to create wrapped context");
+    return NULL;
+  }
+
+  gst_gl_context_activate (self->draw_context, TRUE);
+  if (!gst_gl_context_fill_info (self->draw_context, &error)) {
+    GST_ERROR ("failed to fill wrapped context information: %s", error->message);
+    return NULL;
+  }
+  gst_gl_context_activate (self->draw_context, FALSE);
+
+  return self->gl_context;
+}
+
+- (void)queueResize {
+  self->queue_resize = TRUE;
+}
+
+- (void)releaseCGLContext:(CGLContextObj)glContext {
+  CGLReleaseContext (glContext);
+}
+
+- (void)setDrawCallback:(GstGLWindowCB)cb data:(gpointer)data
+      notify:(GDestroyNotify)notify {
+  g_return_if_fail (cb);
+
+  if (self->draw_notify)
+    self->draw_notify (self->draw_data);
+
+  self->draw_cb = cb;
+  self->draw_data = data;
+  self->draw_notify = notify;
+}
+
+- (void)setResizeCallback:(GstGLWindowResizeCB)cb data:(gpointer)data
+      notify:(GDestroyNotify)notify {
+  if (self->resize_notify)
+    self->resize_notify (self->resize_notify);
+
+  self->resize_cb = cb;
+  self->resize_data = data;
+  self->resize_notify = notify;
+}
+
+- (BOOL)canDrawInCGLContext:(CGLContextObj)glContext
+               pixelFormat:(CGLPixelFormatObj)pixelFormat
+            forLayerTime:(CFTimeInterval)interval
+             displayTime:(const CVTimeStamp *)timeStamp {
+  return g_atomic_int_get (&self->can_draw);
+}
+
+- (void)drawInCGLContext:(CGLContextObj)glContext
+               pixelFormat:(CGLPixelFormatObj)pixelFormat
+            forLayerTime:(CFTimeInterval)interval
+             displayTime:(const CVTimeStamp *)timeStamp {
+  const GstGLFuncs *gl = ((GstGLContext *)self->gst_gl_context)->gl_vtable;
+  GstVideoRectangle src, dst, result;
+  gint ca_viewport[4];
+
+  GST_LOG ("CAOpenGLLayer drawing with cgl context %p", glContext);
+
+  /* attempt to get the correct viewport back due to CA being too smart
+   * and messing around with it so center the expected viewport into
+   * the CA viewport set up on entry to this function */
+  gl->GetIntegerv (GL_VIEWPORT, ca_viewport);
+
+  gst_gl_context_activate (self->draw_context, TRUE);
+  if (self->queue_resize || self->last_bounds.size.width != self.bounds.size.width
+      || self->last_bounds.size.height != self.bounds.size.height) {
+    if (self->resize_cb) {
+      self->resize_cb (self->resize_data, self.bounds.size.width,
+          self.bounds.size.height);
+
+      gl->GetIntegerv (GL_VIEWPORT, self->expected_dims);
+    } else {
+      /* default to whatever ca gives us */
+      self->expected_dims[0] = ca_viewport[0];
+      self->expected_dims[1] = ca_viewport[1];
+      self->expected_dims[2] = ca_viewport[2];
+      self->expected_dims[3] = ca_viewport[3];
+    }
+
+    self->last_bounds = self.bounds;
+    self->queue_resize = FALSE;
+  }
+
+  src.x = self->expected_dims[0];
+  src.y = self->expected_dims[1];
+  src.w = self->expected_dims[2];
+  src.h = self->expected_dims[3];
+
+  dst.x = ca_viewport[0];
+  dst.y = ca_viewport[1];
+  dst.w = ca_viewport[2];
+  dst.h = ca_viewport[3];
+
+  gst_video_sink_center_rect (src, dst, &result, TRUE);
+
+  gl->Viewport (result.x, result.y, result.w, result.h);
+
+  if (self->draw_cb)
+    self->draw_cb (self->draw_data);
+  gst_gl_context_activate (self->draw_context, FALSE);
+
+  /* flushes the buffer */
+  [super drawInCGLContext:glContext pixelFormat:pixelFormat forLayerTime:interval displayTime:timeStamp];
+}
+
+@end
diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h
index d7f0e04..22069ee 100644
--- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h
+++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h
@@ -60,7 +60,11 @@
 
 GType gst_gl_context_cocoa_get_type (void);
 
-GstGLContextCocoa * gst_gl_context_cocoa_new (void);
+GstGLContextCocoa * gst_gl_context_cocoa_new (GstGLDisplay * display);
+guintptr gst_gl_context_cocoa_get_current_context (void);
+CGLPixelFormatObj gst_gl_context_cocoa_get_pixel_format (GstGLContextCocoa *context);
+void gst_gl_context_cocoa_dump_pixel_format (CGLPixelFormatObj fmt);
+
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
index 44d9d75..bde90f1 100644
--- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
+++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
@@ -38,69 +38,16 @@
 #define GST_GL_CONTEXT_COCOA_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoaPrivate))
 
-G_DEFINE_TYPE (GstGLContextCocoa, gst_gl_context_cocoa, GST_GL_TYPE_CONTEXT);
+GST_DEBUG_CATEGORY_STATIC (gst_gl_context_cocoa_debug);
+#define GST_CAT_DEFAULT gst_gl_context_cocoa_debug
 
-static GMutex nsapp_lock;
-static GCond nsapp_cond;
-
-static gboolean
-gst_gl_window_cocoa_init_nsapp (gpointer data)
-{
-  NSAutoreleasePool *pool = nil;
-
-  g_mutex_lock (&nsapp_lock);
-
-  pool = [[NSAutoreleasePool alloc] init];
-
-  /* The sharedApplication class method initializes
-   * the display environment and connects your program
-   * to the window server and the display server
-   */
-
-  /* TODO: so consider to create GstGLDisplayCocoa
-   * in gst/gl/cocoa/gstgldisplay_cocoa.h/c
-   */
-
-  /* has to be called in the main thread */
-  [NSApplication sharedApplication];
-
-  GST_DEBUG ("NSApp initialized from a GTimeoutSource");
-
-  [pool release];
-
-  g_cond_signal (&nsapp_cond);
-  g_mutex_unlock (&nsapp_lock);
-
-  return FALSE;
-}
-
-static gboolean
-gst_gl_window_cocoa_nsapp_iteration (gpointer data)
-{
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-  NSEvent *event = nil;
-
-  if ([NSThread isMainThread]) {
-
-    while ((event = ([NSApp nextEventMatchingMask:NSAnyEventMask
-      untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]
-      inMode:NSDefaultRunLoopMode dequeue:YES])) != nil) {
-
-      [NSApp sendEvent:event];
-    }
-  }
-
-  [pool release];
-
-  return TRUE;
-}
+G_DEFINE_TYPE_WITH_CODE (GstGLContextCocoa, gst_gl_context_cocoa,
+    GST_GL_TYPE_CONTEXT, GST_DEBUG_CATEGORY_INIT (gst_gl_context_cocoa_debug, "glcontext_cocoa", 0, "Cocoa GL Context"); );
 
 static void
 gst_gl_context_cocoa_class_init (GstGLContextCocoaClass * klass)
 {
   GstGLContextClass *context_class = (GstGLContextClass *) klass;
-  NSAutoreleasePool* pool = nil;
 
   g_type_class_add_private (klass, sizeof (GstGLContextCocoaPrivate));
 
@@ -115,76 +62,6 @@
       GST_DEBUG_FUNCPTR (gst_gl_context_cocoa_get_gl_api);
   context_class->get_gl_platform =
       GST_DEBUG_FUNCPTR (gst_gl_context_cocoa_get_gl_platform);
-
-  pool = [[NSAutoreleasePool alloc] init];
-
-  /* [NSApplication sharedApplication] will usually be
-   * called in your application so it's not necessary
-   * to do that the following. Except for debugging 
-   * purpose like when using gst-launch.
-   * So here we handle the two cases where the first
-   * GstGLContext is either created in the main thread
-   * or from another thread like a streaming thread
-   */
-
-  if ([NSThread isMainThread]) {
-    /* In the main thread so just do the call now */
-
-    /* The sharedApplication class method initializes
-     * the display environment and connects your program
-     * to the window server and the display server
-     */
-
-    /* TODO: so consider to create GstGLDisplayCocoa
-     * in gst/gl/cocoa/gstgldisplay_cocoa.h/c
-     */
-
-    /* has to be called in the main thread */
-    [NSApplication sharedApplication];
-
-    GST_DEBUG ("NSApp initialized");
-  } else {
-    /* Not in the main thread, assume there is a
-     * glib main loop running this is for debugging
-     * purposes so that's ok to let us a chance
-     */
-    GMainContext *context;
-    gboolean is_loop_running = FALSE;
-    gint64 end_time = 0;
-
-    context = g_main_context_default ();
-
-    if (g_main_context_is_owner (context)) {
-      /* At the thread running the default GLib main context but
-       * not the Cocoa main thread
-       * We can't do anything here
-       */
-    } else if (g_main_context_acquire (context)) {
-      /* No main loop running on the default main context,
-       * we can't do anything here */
-      g_main_context_release (context);
-    } else {
-      /* Main loop running on the default main context but it
-       * is not running in this thread */
-      g_mutex_init (&nsapp_lock);
-      g_cond_init (&nsapp_cond);
-
-      g_mutex_lock (&nsapp_lock);
-      g_idle_add_full (G_PRIORITY_HIGH, gst_gl_window_cocoa_init_nsapp, NULL, NULL);
-      end_time = g_get_monotonic_time () + 500 * 1000;
-      is_loop_running = g_cond_wait_until (&nsapp_cond, &nsapp_lock, end_time);
-      g_mutex_unlock (&nsapp_lock);
-
-      if (!is_loop_running) {
-        GST_WARNING ("no mainloop running");
-      }
-
-      g_cond_clear (&nsapp_cond);
-      g_mutex_clear (&nsapp_lock);
-    }
-  }
-
-  [pool release];
 }
 
 static void
@@ -195,11 +72,91 @@
 
 /* Must be called in the gl thread */
 GstGLContextCocoa *
-gst_gl_context_cocoa_new (void)
+gst_gl_context_cocoa_new (GstGLDisplay * display)
 {
-  GstGLContextCocoa *context = g_object_new (GST_GL_TYPE_CONTEXT_COCOA, NULL);
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_COCOA) == 0)
+    /* we require an cocoa display to create CGL contexts */
+    return NULL;
 
-  return context;
+  return g_object_new (GST_GL_TYPE_CONTEXT_COCOA, NULL);
+}
+
+struct pixel_attr
+{
+  CGLPixelFormatAttribute attr;
+  const gchar *attr_name;
+};
+
+static struct pixel_attr pixel_attrs[] = {
+  {kCGLPFAAllRenderers, "All Renderers"},
+  {kCGLPFADoubleBuffer, "Double Buffered"},
+  {kCGLPFAStereo, "Stereo"},
+  {kCGLPFAAuxBuffers, "Aux Buffers"},
+  {kCGLPFAColorSize, "Color Size"},
+  {kCGLPFAAlphaSize, "Alpha Size"},
+  {kCGLPFADepthSize, "Depth Size"},
+  {kCGLPFAStencilSize, "Stencil Size"},
+  {kCGLPFAAccumSize, "Accum Size"},
+  {kCGLPFAMinimumPolicy, "Minimum Policy"},
+  {kCGLPFAMaximumPolicy, "Maximum Policy"},
+  {kCGLPFASampleBuffers, "Sample Buffers"},
+  {kCGLPFASamples, "Samples"},
+  {kCGLPFAAuxDepthStencil, "Aux Depth Stencil"},
+  {kCGLPFAColorFloat, "Color Float"},
+  {kCGLPFAMultisample, "Multisample"},
+  {kCGLPFASupersample, "Supersample"},
+  {kCGLPFARendererID, "Renderer ID"},
+  {kCGLPFANoRecovery, "No Recovery"},
+  {kCGLPFAAccelerated, "Accelerated"},
+  {kCGLPFAClosestPolicy, "Closest Policy"},
+  {kCGLPFABackingStore, "Backing Store"},
+  {kCGLPFADisplayMask, "Display Mask"},
+  {kCGLPFAAllowOfflineRenderers, "Allow Offline Renderers"},
+  {kCGLPFAAcceleratedCompute, "Accelerated Compute"},
+  {kCGLPFAOpenGLProfile, "OpenGL Profile"},
+  {kCGLPFAVirtualScreenCount, "Virtual Screen Count"},
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
+  {kCGLPFACompliant, "Compliant"},
+  {kCGLPFARemotePBuffer, "Remote PBuffer"},
+  {kCGLPFASingleRenderer, "Single Renderer"},
+  {kCGLPFAWindow, "Window"},
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+//  {kCGLPFAOffScreen, "Off Screen"},
+//  {kCGLPFAPBuffer, "PBuffer"},
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+//  {kCGLPFAFullScreen, "Full Screen"},
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
+//  {kCGLPFAMPSafe, "MP Safe"},
+//  {kCGLPFAMultiScreen, "Multi Screen"},
+//  {kCGLPFARobust, "Robust"},
+#endif
+};
+
+void
+gst_gl_context_cocoa_dump_pixel_format (CGLPixelFormatObj fmt)
+{
+  int i;
+
+  for (i = 0; i < G_N_ELEMENTS (pixel_attrs); i++) {
+    gint val;
+    CGLError ret = CGLDescribePixelFormat (fmt, 0, pixel_attrs[i].attr, &val);
+
+    if (ret != kCGLNoError) {
+      GST_WARNING ("failed to get pixel format %p attribute %s", fmt, pixel_attrs[i].attr_name);
+    } else {
+      GST_DEBUG ("Pixel format %p attr %s = %i", fmt, pixel_attrs[i].attr_name,
+          val);
+    }
+  }
+}
+
+CGLPixelFormatObj
+gst_gl_context_cocoa_get_pixel_format (GstGLContextCocoa *context)
+{
+  return context->priv->pixel_format;
 }
 
 static gboolean
@@ -210,105 +167,125 @@
   GstGLContextCocoaPrivate *priv = context_cocoa->priv;
   GstGLWindow *window = gst_gl_context_get_window (context);
   GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
-  __block NSOpenGLContext *glContext = nil;
+  GstGLAPI context_api = GST_GL_API_NONE;
+  const GLint swapInterval = 1;
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+  CGLPixelFormatObj fmt = NULL;
+  CGLContextObj glContext;
+  CGLPixelFormatAttribute attribs[] = {
+    kCGLPFADoubleBuffer,
+    kCGLPFAAccumSize, 32,
+    0
+  };
+  CGLError ret;
+  gint pix_fmt_i = 0;
+  gint npix;
 
-  priv->source_id = g_timeout_add (200, gst_gl_window_cocoa_nsapp_iteration, NULL);
+  if ((gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) == GST_GL_API_NONE) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR,
+        GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
+        "The CGL backend only supports GL and GL3");
+    goto error;
+  }
 
   priv->gl_context = nil;
   if (other_context)
-    priv->external_gl_context = (NSOpenGLContext *) gst_gl_context_get_gl_context (other_context);
+    priv->external_gl_context = (CGLContextObj) gst_gl_context_get_gl_context (other_context);
   else
     priv->external_gl_context = NULL;
 
-  dispatch_sync (dispatch_get_main_queue (), ^{
-    NSAutoreleasePool *pool;
-    NSOpenGLPixelFormat *fmt = nil;
-    GstGLNSView *glView = nil;
-    NSOpenGLPixelFormatAttribute attribs[] = {
-      NSOpenGLPFADoubleBuffer,
-      NSOpenGLPFAAccumSize, 32,
-      0
-    };
-    NSRect rect;
-    NSWindow *window_handle;
+  if (priv->external_gl_context) {
+    gint profile;
 
-    pool = [[NSAutoreleasePool alloc] init];
+    fmt = CGLGetPixelFormat (priv->external_gl_context);
 
-    rect.origin.x = 0;
-    rect.origin.y = 0;
-    rect.size.width = 320;
-    rect.size.height = 240;
-
-    gst_gl_window_cocoa_create_window (window_cocoa, rect);
-    window_handle = (NSWindow *) gst_gl_window_get_window_handle (window);
-
-    fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
-    if (!fmt) {
-      gst_object_unref (window);
-      GST_WARNING ("cannot create NSOpenGLPixelFormat");
-      return;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+    /* core profile is only available in >= 10.7 */
+    if (kCGLNoError == CGLDescribePixelFormat (fmt, 0, kCGLPFAOpenGLProfile,
+          &profile)) {
+      if (profile == kCGLOGLPVersion_3_2_Core) {
+        context_api = GST_GL_API_OPENGL3;
+      } else {
+        context_api =GST_GL_API_OPENGL;
+      }
     }
-
-    glView = [[GstGLNSView alloc] initWithFrame:window_cocoa rect:rect];
-
-    [window_handle setContentView:glView];
-
-    glContext = [[NSOpenGLContext alloc] initWithFormat:fmt
-      shareContext:context_cocoa->priv->external_gl_context];
-
-    GST_DEBUG ("NSOpenGL context created: %"G_GUINTPTR_FORMAT, (guintptr) glContext);
-
-    context_cocoa->priv->gl_context = glContext;
-
-    [glContext setView:glView];
-
-    [pool release];
-  });
-
-  if (!glContext) {
-    g_source_remove (priv->source_id);
-    priv->source_id = 0;
-    return FALSE;
+#else
+    context_api = GST_GL_API_OPENGL;
+#endif
   }
 
-  /* OpenGL context is made current only one time threre.
-   * Indeed, all OpenGL calls are made in only one thread,
-   * the Application thread */
-  [glContext makeCurrentContext];
+  if (!fmt) {
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+    if (gl_api & GST_GL_API_OPENGL3) {
+      attribs[pix_fmt_i++] = kCGLPFAOpenGLProfile;
+      attribs[pix_fmt_i++] = (int) kCGLOGLPVersion_3_2_Core;
+      context_api = GST_GL_API_OPENGL3;
+    } else {
+      context_api = GST_GL_API_OPENGL;
+    }
+#else
+    context_api = GST_GL_API_OPENGL;
+#endif
 
-  [glContext update];
+    attribs[pix_fmt_i++] = 0;
+
+    ret = CGLChoosePixelFormat (attribs, &fmt, &npix);
+    if (ret != kCGLNoError) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR,
+          GST_GL_CONTEXT_ERROR_WRONG_CONFIG, "cannot choose a pixel format: %s", CGLErrorString (ret));
+      goto error;
+    }
+  }
+
+  gst_gl_context_cocoa_dump_pixel_format (fmt);
+
+  ret = CGLCreateContext (fmt, priv->external_gl_context, &glContext);
+  if (ret != kCGLNoError) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
+        "failed to create context: %s", CGLErrorString (ret));
+    goto error;
+  }
+
+  context_cocoa->priv->pixel_format = fmt;
+  context_cocoa->priv->gl_context = glContext;
+
+  _invoke_on_main ((GstGLWindowCB) gst_gl_window_cocoa_create_window,
+      window_cocoa);
+
+  if (!context_cocoa->priv->gl_context) {
+    goto error;
+  }
+
+  GST_INFO_OBJECT (context, "GL context created: %p", context_cocoa->priv->gl_context);
+
+  CGLSetCurrentContext (context_cocoa->priv->gl_context);
 
   /* Back and front buffers are swapped only during the vertical retrace of the monitor.
    * Discarded if you configured your driver to Never-use-V-Sync.
    */
-  NS_DURING {
-    if (glContext) {
-      const GLint swapInterval = 1;
-      [glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
-    }
-  } NS_HANDLER {
-     GST_DEBUG ("your back-end does not implement NSOpenglContext::setValues\n");
-  }
-  NS_ENDHANDLER
+  CGLSetParameter (context_cocoa->priv->gl_context, kCGLCPSwapInterval, &swapInterval);
 
-  GST_DEBUG ("opengl GstGLNSWindow initialized");
+  context_cocoa->priv->context_api = context_api;
 
-  gst_object_unref (window);
+  if (window)
+    gst_object_unref (window);
+  [pool release];
 
   return TRUE;
+
+error:
+  {
+    if (window)
+      gst_object_unref (window);
+    [pool release];
+    return FALSE;
+  }
 }
 
 static void
 gst_gl_context_cocoa_destroy_context (GstGLContext *context)
 {
-  GstGLContextCocoa *context_cocoa = GST_GL_CONTEXT_COCOA (context);
-  GstGLContextCocoaPrivate *priv = context_cocoa->priv;
-
   /* FIXME: Need to release context and other things? */
-  if (priv->source_id) {
-    g_source_remove (priv->source_id);
-    priv->source_id = 0;
-  }
 }
 
 static guintptr
@@ -320,21 +297,21 @@
 static gboolean
 gst_gl_context_cocoa_activate (GstGLContext * context, gboolean activate)
 {
-  GstGLContextCocoa *context_cocoa;
+  GstGLContextCocoa *context_cocoa = GST_GL_CONTEXT_COCOA (context);
+  gpointer context_handle = activate ? context_cocoa->priv->gl_context : NULL;
 
-  context_cocoa = GST_GL_CONTEXT_COCOA (context);
-
-  if (activate)
-    [context_cocoa->priv->gl_context makeCurrentContext];
-  else
-    [NSOpenGLContext clearCurrentContext];
-  return TRUE;
+  return kCGLNoError == CGLSetCurrentContext (context_handle);
 }
 
 static GstGLAPI
 gst_gl_context_cocoa_get_gl_api (GstGLContext * context)
 {
-  return GST_GL_API_OPENGL;
+  GstGLContextCocoa *context_cocoa = GST_GL_CONTEXT_COCOA (context);
+
+  if (context_cocoa->priv->gl_context)
+    return context_cocoa->priv->context_api;
+
+  return GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
 }
 
 static GstGLPlatform
@@ -342,3 +319,9 @@
 {
   return GST_GL_PLATFORM_CGL;
 }
+
+guintptr
+gst_gl_context_cocoa_get_current_context (void)
+{
+  return (guintptr) CGLGetCurrentContext ();
+}
diff --git a/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.h b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.h
new file mode 100644
index 0000000..5551f0f
--- /dev/null
+++ b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.h
@@ -0,0 +1,62 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Julien Isorce <julien.isorce@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_DISPLAY_COCOA_H__
+#define __GST_GL_DISPLAY_COCOA_H__
+
+#include <gst/gst.h>
+
+#include <gst/gl/gstgl_fwd.h>
+#include <gst/gl/gstgldisplay.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_display_cocoa_get_type (void);
+
+#define GST_TYPE_GL_DISPLAY_COCOA             (gst_gl_display_cocoa_get_type())
+#define GST_GL_DISPLAY_COCOA(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY_COCOA,GstGLDisplayCocoa))
+#define GST_GL_DISPLAY_COCOA_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_DISPLAY_COCOA,GstGLDisplayCocoaClass))
+#define GST_IS_GL_DISPLAY_COCOA(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY_COCOA))
+#define GST_IS_GL_DISPLAY_COCOA_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY_COCOA))
+#define GST_GL_DISPLAY_COCOA_CAST(obj)        ((GstGLDisplayCocoa*)(obj))
+
+typedef struct _GstGLDisplayCocoa GstGLDisplayCocoa;
+typedef struct _GstGLDisplayCocoaClass GstGLDisplayCocoaClass;
+
+/**
+ * GstGLDisplayCocoa:
+ *
+ * Initialized NSApp if the application has not done it.
+ */
+struct _GstGLDisplayCocoa
+{
+  GstGLDisplay          parent;
+};
+
+struct _GstGLDisplayCocoaClass
+{
+  GstGLDisplayClass object_class;
+};
+
+GstGLDisplayCocoa *gst_gl_display_cocoa_new (void);
+
+G_END_DECLS
+
+#endif /* __GST_GL_DISPLAY_COCOA_H__ */
diff --git a/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m
new file mode 100644
index 0000000..f7c0252
--- /dev/null
+++ b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m
@@ -0,0 +1,247 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Julien Isorce <julien.isorce@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 <Cocoa/Cocoa.h>
+
+#include <gst/gl/cocoa/gstgldisplay_cocoa.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
+#define GST_CAT_DEFAULT gst_gl_display_debug
+
+G_DEFINE_TYPE (GstGLDisplayCocoa, gst_gl_display_cocoa, GST_TYPE_GL_DISPLAY);
+
+static void gst_gl_display_cocoa_finalize (GObject * object);
+static guintptr gst_gl_display_cocoa_get_handle (GstGLDisplay * display);
+
+/* Define this if the GLib patch from
+ * https://bugzilla.gnome.org/show_bug.cgi?id=741450
+ * is used
+ */
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
+
+static GstGLDisplayCocoa *singleton = NULL;
+static gint nsapp_source_id = 0;
+static GMutex nsapp_lock;
+static GCond nsapp_cond;
+
+static gboolean
+gst_gl_display_cocoa_nsapp_iteration (gpointer data)
+{
+  NSAutoreleasePool *pool = nil;
+  NSEvent *event = nil;
+
+  if (![NSThread isMainThread]) {
+    GST_WARNING ("NSApp iteration not running in the main thread");
+    return FALSE;
+  }
+
+  pool = [[NSAutoreleasePool alloc] init];
+
+  while ((event = ([NSApp nextEventMatchingMask:NSAnyEventMask
+      untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]
+      inMode:NSDefaultRunLoopMode dequeue:YES])) != nil) {
+    [NSApp sendEvent:event];
+  }
+
+  [pool release];
+
+  return TRUE;
+}
+
+static void
+gst_gl_display_cocoa_open_and_attach_source (gpointer data)
+{
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+  if ([NSThread isMainThread]) {
+    /* The sharedApplication class method initializes
+     * the display environment and connects your program
+     * to the window server and the display server.
+     * It has to be done in the main thread.
+     */
+    [NSApplication sharedApplication];
+
+    GST_DEBUG ("Custom NSApp initialization done");
+
+    nsapp_source_id = g_timeout_add (60, gst_gl_display_cocoa_nsapp_iteration,
+        NULL);
+
+    GST_DEBUG ("NSApp iteration loop attached, id %d", nsapp_source_id);
+  }
+
+  [pool release];
+}
+
+static gboolean
+gst_gl_display_cocoa_init_nsapp (gpointer data)
+{
+  g_mutex_lock (&nsapp_lock);
+
+  gst_gl_display_cocoa_open_and_attach_source (data);
+
+  g_cond_signal (&nsapp_cond);
+  g_mutex_unlock (&nsapp_lock);
+
+  return FALSE;
+}
+
+static GstGLDisplayCocoa *
+gst_gl_display_cocoa_setup_nsapp (gpointer data)
+{
+  GMainContext *context = g_main_context_default ();
+  gint delta_ms = 0;
+
+  g_mutex_lock (&nsapp_lock);
+
+  if (singleton) {
+    GST_DEBUG ("Get existing display");
+    singleton = gst_object_ref (singleton);
+    g_mutex_unlock (&nsapp_lock);
+    return singleton;
+  }
+
+  if (NSApp != nil && !singleton) {
+    GstGLDisplayCocoa *ret = g_object_new (GST_TYPE_GL_DISPLAY_COCOA, NULL);
+    g_mutex_unlock (&nsapp_lock);
+    return ret;
+  }
+
+  /* All application have to start with [NSApplication sharedApplication]
+   * so if NSApp is nil here let's assume this is a debugging application
+   * that runs a glib main loop. */
+  g_assert (NSApp == nil);
+
+  GST_DEBUG ("The application has not initialized NSApp");
+
+  if ([NSThread isMainThread]) {
+
+    GST_DEBUG ("Setting up NSApp from the main thread");
+    if (g_main_context_is_owner (context)) {
+      GST_DEBUG ("The main thread own the context");
+      gst_gl_display_cocoa_open_and_attach_source (data);
+    } else if (g_main_context_acquire (context)) {
+      GST_DEBUG ("The main loop should be shortly running in the main thread");
+      gst_gl_display_cocoa_open_and_attach_source (data);
+      g_main_context_release (context);
+    } else {
+      GST_WARNING ("Main loop running in another thread");
+    }
+  } else {
+
+    GST_DEBUG ("Setting up NSApp not from the main thread");
+
+    if (g_main_context_is_owner (context)) {
+      GST_WARNING ("Default context not own by the main thread");
+      delta_ms = -1;
+    } else if (g_main_context_acquire (context)) {
+      GST_DEBUG ("The main loop should be shortly running in the main thread");
+      delta_ms = 1000;
+      g_main_context_release (context);
+    } else {
+      GST_DEBUG ("Main loop running in main thread");
+      delta_ms = 500;
+    }
+
+    if (delta_ms > 0) {
+      gint64 end_time = g_get_monotonic_time () + delta_ms * 1000;;
+      g_idle_add_full (G_PRIORITY_HIGH, gst_gl_display_cocoa_init_nsapp, data, NULL);
+      g_cond_wait_until (&nsapp_cond, &nsapp_lock, end_time);
+    }
+  }
+
+  if (NSApp == nil) {
+    GST_ERROR ("Custom NSApp initialization failed");
+  } else {
+    GST_DEBUG ("Create display");
+    singleton = g_object_new (GST_TYPE_GL_DISPLAY_COCOA, NULL);
+  }
+
+  g_mutex_unlock (&nsapp_lock);
+
+  return singleton;
+}
+
+#endif
+
+static void
+gst_gl_display_cocoa_class_init (GstGLDisplayCocoaClass * klass)
+{
+  GST_GL_DISPLAY_CLASS (klass)->get_handle =
+      GST_DEBUG_FUNCPTR (gst_gl_display_cocoa_get_handle);
+
+  G_OBJECT_CLASS (klass)->finalize = gst_gl_display_cocoa_finalize;
+}
+
+static void
+gst_gl_display_cocoa_init (GstGLDisplayCocoa * display_cocoa)
+{
+  GstGLDisplay *display = (GstGLDisplay *) display_cocoa;
+  display->type = GST_GL_DISPLAY_TYPE_COCOA;
+}
+
+static void
+gst_gl_display_cocoa_finalize (GObject * object)
+{
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
+  g_mutex_lock (&nsapp_lock);
+  if (singleton) {
+    GST_DEBUG ("Destroy display");
+    singleton = NULL;
+    if (nsapp_source_id) {
+      GST_DEBUG ("Remove NSApp loop iteration, id %d", nsapp_source_id);
+      g_source_remove (nsapp_source_id);
+    }
+    nsapp_source_id = 0;
+    g_mutex_unlock (&nsapp_lock);
+  }
+  g_mutex_unlock (&nsapp_lock);
+#endif
+
+  G_OBJECT_CLASS (gst_gl_display_cocoa_parent_class)->finalize (object);
+}
+
+/**
+ * gst_gl_display_cocoa_new:
+ *
+ * Create a new #GstGLDisplayCocoa.
+ *
+ * Returns: (transfer full): a new #GstGLDisplayCocoa or %NULL
+ */
+GstGLDisplayCocoa *
+gst_gl_display_cocoa_new (void)
+{
+  GST_DEBUG_CATEGORY_GET (gst_gl_display_debug, "gldisplay");
+
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
+  return gst_gl_display_cocoa_setup_nsapp (NULL);
+#else
+  return g_object_new (GST_TYPE_GL_DISPLAY_COCOA, NULL);
+#endif
+}
+
+static guintptr
+gst_gl_display_cocoa_get_handle (GstGLDisplay * display)
+{
+  return (guintptr) NSApp;
+}
diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h
index 9d2eda0..21c5917 100644
--- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h
+++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h
@@ -58,7 +58,9 @@
 
 GType gst_gl_window_cocoa_get_type     (void);
 
-GstGLWindowCocoa * gst_gl_window_cocoa_new (void);
+GstGLWindowCocoa * gst_gl_window_cocoa_new (GstGLDisplay * display);
+
+void gst_gl_window_cocoa_draw_thread (GstGLWindowCocoa *window_cocoa);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m
index f9aa330..9c37e6c 100644
--- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m
+++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m
@@ -24,6 +24,7 @@
 #endif
 
 #include <Cocoa/Cocoa.h>
+#include <QuartzCore/QuartzCore.h>
 
 #include "gstgl_cocoa_private.h"
 
@@ -64,35 +65,38 @@
   GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
 #define gst_gl_window_cocoa_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLWindowCocoa, gst_gl_window_cocoa, GST_GL_TYPE_WINDOW, DEBUG_INIT);
+static void gst_gl_window_cocoa_finalize (GObject * object);
 
 static gboolean gst_gl_window_cocoa_open (GstGLWindow *window, GError **err);
 static void gst_gl_window_cocoa_close (GstGLWindow *window);
 static guintptr gst_gl_window_cocoa_get_window_handle (GstGLWindow * window);
 static void gst_gl_window_cocoa_set_window_handle (GstGLWindow * window,
     guintptr handle);
-static void gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height);
-static void gst_gl_window_cocoa_run (GstGLWindow * window);
-static void gst_gl_window_cocoa_quit (GstGLWindow * window);
-static void gst_gl_window_cocoa_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static void gst_gl_window_cocoa_draw (GstGLWindow * window);
+static void gst_gl_window_cocoa_set_preferred_size (GstGLWindow * window,
+    gint width, gint height);
+static void gst_gl_window_cocoa_show (GstGLWindow * window);
+static void gst_gl_window_cocoa_queue_resize (GstGLWindow * window);
 
 struct _GstGLWindowCocoaPrivate
 {
   GstGLNSWindow *internal_win_id;
   NSView *external_view;
   gboolean visible;
-  GMainContext *main_context;
-  GMainLoop *loop;
+  gint preferred_width;
+  gint preferred_height;
 
   GLint viewport_dim[4];
+
+  /* atomic set when the internal NSView has been created */
+  int view_ready;
 };
 
 static void
 gst_gl_window_cocoa_class_init (GstGLWindowCocoaClass * klass)
 {
-  GstGLWindowClass *window_class;
-
-  window_class = (GstGLWindowClass *) klass;
+  GstGLWindowClass *window_class = (GstGLWindowClass *) klass;
+  GObjectClass *gobject_class = (GObjectClass *) klass;
 
   g_type_class_add_private (klass, sizeof (GstGLWindowCocoaPrivate));
 
@@ -104,32 +108,56 @@
       GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_set_window_handle);
   window_class->draw_unlocked = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_draw);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_send_message_async);
+  window_class->set_preferred_size =
+      GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_set_preferred_size);
+  window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_show);
+  window_class->queue_resize = GST_DEBUG_FUNCPTR (gst_gl_window_cocoa_queue_resize);
+
+  gobject_class->finalize = gst_gl_window_cocoa_finalize;
 }
 
 static void
 gst_gl_window_cocoa_init (GstGLWindowCocoa * window)
 {
   window->priv = GST_GL_WINDOW_COCOA_GET_PRIVATE (window);
+
+  window->priv->preferred_width = 320;
+  window->priv->preferred_height = 240;
 }
 
-/* Must be called in the gl thread */
-GstGLWindowCocoa *
-gst_gl_window_cocoa_new (void)
+static void
+gst_gl_window_cocoa_finalize (GObject * object)
 {
-  GstGLWindowCocoa *window = g_object_new (GST_GL_TYPE_WINDOW_COCOA, NULL);
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
 
-  return window;
+GstGLWindowCocoa *
+gst_gl_window_cocoa_new (GstGLDisplay * display)
+{
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_COCOA) == 0)
+    /* we require an cocoa display to create CGL windows */
+    return NULL;
+
+  return g_object_new (GST_GL_TYPE_WINDOW_COCOA, NULL);
 }
 
 /* Must be called from the main thread */
 gboolean
-gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa, NSRect rect)
+gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa)
 {
   GstGLWindowCocoaPrivate *priv = window_cocoa->priv;
+  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
+  NSRect mainRect = [[NSScreen mainScreen] visibleFrame];
+  gint h = priv->preferred_height;
+  gint y = mainRect.size.height > h ? (mainRect.size.height - h) * 0.5 : 0;
+  NSRect rect = NSMakeRect (0, y, priv->preferred_width, priv->preferred_height);
+  NSRect windowRect = NSMakeRect (0, y, priv->preferred_width, priv->preferred_height);
+  GstGLContext *context = gst_gl_window_get_context (window);
+  GstGLContextCocoa *context_cocoa = GST_GL_CONTEXT_COCOA (context);
+  GstGLCAOpenGLLayer *layer = [[GstGLCAOpenGLLayer alloc] initWithGstGLContext:context_cocoa];
+  GstGLNSView *glView = [[GstGLNSView alloc] initWithFrameLayer:window_cocoa rect:windowRect layer:layer];
+
+  gst_object_unref (context);
 
   priv->internal_win_id = [[GstGLNSWindow alloc] initWithContentRect:rect styleMask: 
       (NSTitledWindowMask | NSClosableWindowMask |
@@ -138,6 +166,10 @@
 
       GST_DEBUG ("NSWindow id: %"G_GUINTPTR_FORMAT, (guintptr) priv->internal_win_id);
 
+  [priv->internal_win_id setContentView:glView];
+
+  g_atomic_int_set (&window_cocoa->priv->view_ready, 1);
+
   return TRUE;
 }
 
@@ -148,22 +180,13 @@
 
   window_cocoa = GST_GL_WINDOW_COCOA (window);
 
-  window_cocoa->priv->main_context = g_main_context_new ();
-  window_cocoa->priv->loop =
-      g_main_loop_new (window_cocoa->priv->main_context, FALSE);
-
   return TRUE;
 }
 
 static void
 gst_gl_window_cocoa_close (GstGLWindow *window)
 {
-  GstGLWindowCocoa *window_cocoa;
-
-  window_cocoa = GST_GL_WINDOW_COCOA (window);
-
-  g_main_loop_unref (window_cocoa->priv->loop);
-  g_main_context_unref (window_cocoa->priv->main_context);
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
 
   [window_cocoa->priv->internal_win_id release];
   window_cocoa->priv->internal_win_id = nil;
@@ -211,150 +234,141 @@
   }
 }
 
-/* Thread safe */
-struct draw
-{
-  GstGLWindowCocoa *window;
-  guint width, height;
-};
-
 static void
-draw_cb (gpointer data)
+_show_window (gpointer data)
 {
-  struct draw *draw_data = data;
-  GstGLWindowCocoa *window_cocoa = draw_data->window;
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (data);
   GstGLWindowCocoaPrivate *priv = window_cocoa->priv;
 
-  /* useful when set_window_handle is called before
-   * the internal NSWindow */
-  if (priv->external_view && !priv->visible) {
-    gst_gl_window_cocoa_set_window_handle (GST_GL_WINDOW (window_cocoa), (guintptr) priv->external_view);
-    priv->visible = TRUE;
+  GST_DEBUG_OBJECT (window_cocoa, "make the window available\n");
+  [priv->internal_win_id makeMainWindow];
+  [priv->internal_win_id orderFrontRegardless];
+  [priv->internal_win_id setViewsNeedDisplay:YES];
+
+  priv->visible = TRUE;
+}
+
+static void
+gst_gl_window_cocoa_show (GstGLWindow * window)
+{
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
+  GstGLWindowCocoaPrivate *priv = window_cocoa->priv;
+
+  if (!priv->visible) {
+    /* useful when set_window_handle is called before
+     * the internal NSWindow */
+    if (priv->external_view) {
+      gst_gl_window_cocoa_set_window_handle (window, (guintptr) priv->external_view);
+      priv->visible = TRUE;
+      return;
+    }
+
+    if (!priv->external_view && !priv->visible)
+      _invoke_on_main ((GstGLWindowCB) _show_window, window);
   }
+}
 
-  if (!priv->external_view && !priv->visible) {
-    dispatch_sync (dispatch_get_main_queue (), ^{
-      NSRect mainRect = [[NSScreen mainScreen] visibleFrame];
-      NSRect windowRect = [priv->internal_win_id frame];
-      gint x = 0;
-      gint y = 0;
+static void
+gst_gl_window_cocoa_queue_resize (GstGLWindow * window)
+{
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
+  GstGLNSView *view;
 
-      GST_DEBUG ("main screen rect: %d %d %d %d\n", (int) mainRect.origin.x,
-          (int) mainRect.origin.y, (int) mainRect.size.width,
-          (int) mainRect.size.height);
+  if (!g_atomic_int_get (&window_cocoa->priv->view_ready))
+    return;
 
-      windowRect.origin.x += x;
-      windowRect.origin.y += mainRect.size.height > y ? (mainRect.size.height - y) * 0.5 : y;
-      windowRect.size.width = draw_data->width;
-      windowRect.size.height = draw_data->height;
+  view = (GstGLNSView *)[window_cocoa->priv->internal_win_id contentView];
 
-      GST_DEBUG ("window rect: %d %d %d %d\n", (int) windowRect.origin.x,
-          (int) windowRect.origin.y, (int) windowRect.size.width,
-          (int) windowRect.size.height);
+  [view->layer queueResize];
+}
 
-      x += 20;
-      y += 20;
+static void
+gst_gl_window_cocoa_draw (GstGLWindow * window)
+{
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
+  GstGLNSView *view;
 
-      [priv->internal_win_id setFrame:windowRect display:NO];
-      GST_DEBUG ("make the window available\n");
-      [priv->internal_win_id makeMainWindow];
+  /* As the view is created asynchronously in the main thread we cannot know
+   * exactly when it will be ready to draw to */
+  if (!g_atomic_int_get (&window_cocoa->priv->view_ready))
+    return;
 
-      [priv->internal_win_id orderFrontRegardless];
+  view = (GstGLNSView *)[window_cocoa->priv->internal_win_id contentView];
 
-      [priv->internal_win_id setViewsNeedDisplay:YES];
-    });
-    priv->visible = TRUE;
-  }
+  /* this redraws the GstGLCAOpenGLLayer which calls
+   * gst_gl_window_cocoa_draw_thread(). Use an explicit CATransaction since we
+   * don't know how often the main runloop is running.
+   */
+  [CATransaction begin];
+  [view setNeedsDisplay:YES];
+  [CATransaction commit];
+}
 
-  if (g_main_loop_is_running (priv->loop)) {
+static void
+gst_gl_window_cocoa_set_preferred_size (GstGLWindow * window, gint width,
+    gint height)
+{
+  GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window);
+
+  window_cocoa->priv->preferred_width = width;
+  window_cocoa->priv->preferred_height = height;
+}
+
+static void
+gst_gl_cocoa_draw_cb (GstGLWindowCocoa *window_cocoa)
+{
+  GstGLWindowCocoaPrivate *priv = window_cocoa->priv;
+  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
+
+  if (gst_gl_window_is_running (window)) {
     if (![priv->internal_win_id isClosed]) {
-      GstGLContext *context = gst_gl_window_get_context (GST_GL_WINDOW (window_cocoa));
-      NSOpenGLContext * glContext = (NSOpenGLContext *) gst_gl_context_get_gl_context (context);
+     GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
 
       /* draw opengl scene in the back buffer */
-      GST_GL_WINDOW (window_cocoa)->draw (GST_GL_WINDOW (window_cocoa)->draw_data);
-
-      /* Copy the back buffer to the front buffer */
-      [glContext flushBuffer];
-
-      gst_object_unref (context);
+      if (window->draw)
+        window->draw (window->draw_data);
     }
   }
 }
 
 static void
-gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_cocoa_resize_cb (GstGLNSView * view, guint width, guint height)
 {
-  struct draw draw_data;
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+  GstGLWindowCocoa *window_cocoa = view->window_cocoa;
+  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
+  GstGLContext *context = gst_gl_window_get_context (window);
 
-  draw_data.window = GST_GL_WINDOW_COCOA (window);
-  draw_data.width = width;
-  draw_data.height = height;
+  if (gst_gl_window_is_running (window) && ![window_cocoa->priv->internal_win_id isClosed]) {
+    const GstGLFuncs *gl;
+    NSRect bounds = [view bounds];
+    NSRect visibleRect = [view visibleRect];
+    gint viewport_dim[4];
 
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
-}
+    gl = context->gl_vtable;
 
-static void
-gst_gl_window_cocoa_run (GstGLWindow * window)
-{
-  GstGLWindowCocoa *window_cocoa;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+    bounds = [view convertRectToBacking:bounds];
+    visibleRect = [view convertRectToBacking:visibleRect];
+#endif
 
-  window_cocoa = GST_GL_WINDOW_COCOA (window);
+    GST_DEBUG_OBJECT (window, "Window resized: bounds %lf %lf %lf %lf "
+                      "visibleRect %lf %lf %lf %lf",
+                      bounds.origin.x, bounds.origin.y,
+                      bounds.size.width, bounds.size.height,
+                      visibleRect.origin.x, visibleRect.origin.y,
+                      visibleRect.size.width, visibleRect.size.height);
 
-  GST_LOG ("starting main loop");
-  g_main_loop_run (window_cocoa->priv->loop);
-  GST_LOG ("exiting main loop");
-}
+    gst_gl_window_resize (window, width, height);
+    gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
 
-/* Thread safe */
-static void
-gst_gl_window_cocoa_quit (GstGLWindow * window)
-{
-  GstGLWindowCocoa *window_cocoa;
+    gl->Viewport (viewport_dim[0] - visibleRect.origin.x,
+                  viewport_dim[1] - visibleRect.origin.y,
+                  viewport_dim[2], viewport_dim[3]);
+  }
 
-  window_cocoa = GST_GL_WINDOW_COCOA (window);
-
-  g_main_loop_quit (window_cocoa->priv->loop);
-}
-
-/* Thread safe */
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_window_cocoa_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowCocoa *window_cocoa;
-  GstGLMessage *message;
-
-  window_cocoa = GST_GL_WINDOW_COCOA (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_cocoa->priv->main_context,
-      (GSourceFunc) _run_message, message);
+  gst_object_unref (context);
+  [pool release];
 }
 
 /* =============================================================*/
@@ -385,7 +399,7 @@
 
   [self setTitle:@"OpenGL renderer"];
 
-  [self setBackgroundColor:[NSColor clearColor]];
+  [self setBackgroundColor:[NSColor blackColor]];
 
   [self orderOut:window_cocoa->priv->internal_win_id];
 
@@ -437,13 +451,14 @@
 
   GST_DEBUG ("user clicked the close button\n");
   [window_cocoa->priv->internal_win_id setClosed];
-  gst_gl_window_send_message_async (GST_GL_WINDOW (window_cocoa), (GstGLWindowCB) close_window_cb, gst_object_ref (window_cocoa), (GDestroyNotify) gst_object_unref);
+  gst_gl_window_send_message_async (GST_GL_WINDOW (window_cocoa),
+      (GstGLWindowCB) close_window_cb, gst_object_ref (window_cocoa),
+      (GDestroyNotify) gst_object_unref);
   return YES;
 }
 
 @end
 
-
 /* =============================================================*/
 /*                                                              */
 /*                GstGLNSView implementation              */
@@ -453,66 +468,38 @@
 @implementation GstGLNSView
 
 /* Must be called from the application main thread */
-- (id)initWithFrame:(GstGLWindowCocoa *)window rect:(NSRect)contentRect {
+- (id)initWithFrameLayer:(GstGLWindowCocoa *)window rect:(NSRect)contentRect layer:(CALayer *)layerContent {
 
   self = [super initWithFrame: contentRect];
 
   window_cocoa = window;
 
-  [self setWantsLayer:NO];
+  /* The order of the next two calls matters.  This creates a layer-hosted
+   * NSView.  Calling setWantsLayer before setLayer will create a
+   * layer-backed NSView.  See the apple developer documentation on the
+   * difference.
+   */
+  [self setLayer:layerContent];
+  [self setWantsLayer:YES];
+  self->layer = (GstGLCAOpenGLLayer *)layerContent;
+  [self->layer setDrawCallback:(GstGLWindowCB)gst_gl_cocoa_draw_cb
+      data:window notify:NULL];
+  [self->layer setResizeCallback:(GstGLWindowResizeCB)gst_gl_cocoa_resize_cb
+      data:self notify:NULL];
 
-  /* Get notified about changes */
-  [self setPostsFrameChangedNotifications:YES];
-  [[NSNotificationCenter defaultCenter] addObserver: self selector:@selector(reshape:) name: NSViewFrameDidChangeNotification object: self];
+  [self setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawOnSetNeedsDisplay];
+
   [self setWantsBestResolutionOpenGLSurface:YES];
 
   return self;
 }
 
 - (void) dealloc {
-  [[NSNotificationCenter defaultCenter] removeObserver: self];
+  [self->layer release];
+
   [super dealloc];
 }
 
-struct resize
-{
-  GstGLWindowCocoa * window;
-  NSRect bounds, visibleRect;
-};
-
-static void
-resize_cb (gpointer data)
-{
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-  struct resize *resize_data = data;
-  GstGLWindowCocoa *window_cocoa = resize_data->window;
-  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
-  GstGLContext *context = gst_gl_window_get_context (window);
-  NSOpenGLContext * glContext = (NSOpenGLContext *) gst_gl_context_get_gl_context (context);
-
-  if (g_main_loop_is_running (window_cocoa->priv->loop) && ![window_cocoa->priv->internal_win_id isClosed]) {
-    const GstGLFuncs *gl;
-
-    [glContext update];
-
-    gl = context->gl_vtable;
-
-    if (window->resize) {
-      window->resize (window->resize_data, resize_data->bounds.size.width, resize_data->bounds.size.height);
-      gl->GetIntegerv (GL_VIEWPORT, window_cocoa->priv->viewport_dim);
-    }
-
-    gl->Viewport (window_cocoa->priv->viewport_dim[0] - resize_data->visibleRect.origin.x,
-                  window_cocoa->priv->viewport_dim[1] - resize_data->visibleRect.origin.y,
-                  window_cocoa->priv->viewport_dim[2], window_cocoa->priv->viewport_dim[3]);
-
-    GST_GL_WINDOW (window_cocoa)->draw (GST_GL_WINDOW (window_cocoa)->draw_data);
-    [glContext flushBuffer];
-  }
-  gst_object_unref (context);
-  [pool release];
-}
-
 - (void)renewGState {
   /* Don't update the screen until we redraw, this
    * prevents flickering during scrolling, clipping,
@@ -523,40 +510,6 @@
   [super renewGState];
 }
 
-- (void)reshape: (NSNotification*)notification {
-  GstGLWindow *window;
-
-  window = GST_GL_WINDOW (window_cocoa);
-
-  if (window->resize) {
-    NSRect bounds = [self bounds];
-    NSRect visibleRect = [self visibleRect];
-    struct resize *resize_data = g_new (struct resize, 1);
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
-    bounds = [self convertRectToBacking:bounds];
-    visibleRect = [self convertRectToBacking:visibleRect];
-#endif
-
-    GST_DEBUG_OBJECT (window, "Window resized: bounds %lf %lf %lf %lf "
-                      "visibleRect %lf %lf %lf %lf",
-                      bounds.origin.x, bounds.origin.y,
-                      bounds.size.width, bounds.size.height,
-                      visibleRect.origin.x, visibleRect.origin.y,
-                      visibleRect.size.width, visibleRect.size.height);
-
-    resize_data->window = window_cocoa;
-    resize_data->bounds = bounds;
-    resize_data->visibleRect = visibleRect;
-
-    gst_gl_window_send_message_async (GST_GL_WINDOW (window_cocoa), (GstGLWindowCB) resize_cb, resize_data, (GDestroyNotify) g_free);
-  }
-}
-
-- (void)drawRect: (NSRect)dirtyRect {
-  [self reshape:nil];
-}
-
 - (BOOL) isOpaque {
     return YES;
 }
@@ -567,3 +520,14 @@
 
 @end
 
+void
+_invoke_on_main (GstGLWindowCB func, gpointer data)
+{
+  if ([NSThread isMainThread]) {
+    func (data);
+  } else {
+    dispatch_async (dispatch_get_main_queue (), ^{
+      func (data);
+    });
+  }
+}
diff --git a/gst-libs/gst/gl/dispmanx/Makefile.in b/gst-libs/gst/gl/dispmanx/Makefile.in
index 5832b48..8752b29 100644
--- a/gst-libs/gst/gl/dispmanx/Makefile.in
+++ b/gst-libs/gst/gl/dispmanx/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/dispmanx
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -198,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -215,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -241,8 +254,6 @@
 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@
@@ -255,7 +266,6 @@
 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@
@@ -263,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -289,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -312,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -372,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -392,7 +409,6 @@
 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@
@@ -401,7 +417,6 @@
 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@
@@ -414,7 +429,6 @@
 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@
@@ -428,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -439,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -477,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -512,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -541,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -548,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -577,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -587,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -617,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -644,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -682,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -730,7 +765,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/dispmanx/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/dispmanx/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1011,6 +1045,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
index 6533835..26e6df7 100644
--- a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
+++ b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
@@ -29,6 +29,17 @@
 
 #include "gstglwindow_dispmanx_egl.h"
 
+
+#ifndef ELEMENT_CHANGE_LAYER
+/* copied from interface/vmcs_host/vc_vchi_dispmanx.h of userland.git */
+#define ELEMENT_CHANGE_LAYER          (1<<0)
+#define ELEMENT_CHANGE_OPACITY        (1<<1)
+#define ELEMENT_CHANGE_DEST_RECT      (1<<2)
+#define ELEMENT_CHANGE_SRC_RECT       (1<<3)
+#define ELEMENT_CHANGE_MASK_RESOURCE  (1<<4)
+#define ELEMENT_CHANGE_TRANSFORM      (1<<5)
+#endif
+
 #define GST_CAT_DEFAULT gst_gl_window_debug
 
 #define gst_gl_window_dispmanx_egl_parent_class parent_class
@@ -39,12 +50,9 @@
     window);
 static void gst_gl_window_dispmanx_egl_set_window_handle (GstGLWindow * window,
     guintptr handle);
-static void gst_gl_window_dispmanx_egl_draw (GstGLWindow * window, guint width,
-    guint height);
-static void gst_gl_window_dispmanx_egl_run (GstGLWindow * window);
-static void gst_gl_window_dispmanx_egl_quit (GstGLWindow * window);
-static void gst_gl_window_dispmanx_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static void gst_gl_window_dispmanx_egl_set_preferred_size (GstGLWindow * window,
+    gint width, gint height);
+static void gst_gl_window_dispmanx_egl_show (GstGLWindow * window);
 static void gst_gl_window_dispmanx_egl_close (GstGLWindow * window);
 static gboolean gst_gl_window_dispmanx_egl_open (GstGLWindow * window,
     GError ** error);
@@ -52,7 +60,7 @@
 
 
 static void window_resize (GstGLWindowDispmanxEGL * window_egl, guint width,
-    guint height);
+    guint height, gboolean visible);
 
 static void
 gst_gl_window_dispmanx_egl_class_init (GstGLWindowDispmanxEGLClass * klass)
@@ -63,44 +71,40 @@
       GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_get_window_handle);
   window_class->set_window_handle =
       GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_set_window_handle);
-  window_class->draw_unlocked =
-      GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_draw);
-  window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_send_message_async);
+  window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_show);
   window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_close);
   window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_open);
   window_class->get_display =
       GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_get_display);
+  window_class->set_preferred_size =
+      GST_DEBUG_FUNCPTR (gst_gl_window_dispmanx_egl_set_preferred_size);
 }
 
 static void
-gst_gl_window_dispmanx_egl_init (GstGLWindowDispmanxEGL * window)
+gst_gl_window_dispmanx_egl_init (GstGLWindowDispmanxEGL * window_egl)
 {
+  window_egl->egldisplay = EGL_DEFAULT_DISPLAY;
+
+  window_egl->visible = FALSE;
+  window_egl->display = 0;
+  window_egl->dp_width = 0;
+  window_egl->dp_height = 0;
+  window_egl->native.element = 0;
+  window_egl->native.width = 0;
+  window_egl->native.height = 0;
 }
 
 /* Must be called in the gl thread */
 GstGLWindowDispmanxEGL *
-gst_gl_window_dispmanx_egl_new (void)
+gst_gl_window_dispmanx_egl_new (GstGLDisplay * display)
 {
-  GstGLWindowDispmanxEGL *window;
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_EGL) == 0)
+    /* we require an egl display to create dispmanx windows */
+    return NULL;
 
   GST_DEBUG ("creating Dispmanx EGL window");
 
-  window = g_object_new (GST_GL_TYPE_WINDOW_DISPMANX_EGL, NULL);
-
-  window->egldisplay = EGL_DEFAULT_DISPLAY;
-
-  window->display = 0;
-  window->dp_width = 0;
-  window->dp_height = 0;
-  window->native.element = 0;
-  window->native.width = 0;
-  window->native.height = 0;
-
-  return window;
+  return g_object_new (GST_GL_TYPE_WINDOW_DISPMANX_EGL, NULL);
 }
 
 static void
@@ -118,10 +122,7 @@
   }
   vc_dispmanx_display_close (window_egl->display);
 
-  g_main_loop_unref (window_egl->loop);
-  window_egl->loop = NULL;
-  g_main_context_unref (window_egl->main_context);
-  window_egl->main_context = NULL;
+  GST_GL_WINDOW_CLASS (parent_class)->close (window);
 }
 
 static gboolean
@@ -131,94 +132,36 @@
   gint ret = graphics_get_display_size (0, &window_egl->dp_width,
       &window_egl->dp_height);
   if (ret < 0) {
-    GST_ERROR ("Can't open display");
+    g_set_error (error, GST_GL_WINDOW_ERROR,
+        GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE, "Can't open display");
     return FALSE;
   }
   GST_DEBUG ("Got display size: %dx%d\n", window_egl->dp_width,
       window_egl->dp_height);
 
+  window_egl->native.element = 0;
+
+  return GST_GL_WINDOW_CLASS (parent_class)->open (window, error);
+}
+
+gboolean
+gst_gl_window_dispmanx_egl_create_window (GstGLWindowDispmanxEGL * window_egl)
+{
   window_egl->native.width = 0;
   window_egl->native.height = 0;
   window_egl->display = vc_dispmanx_display_open (0);
-  window_egl->native.element = 0;
-
-  window_egl->main_context = g_main_context_new ();
-  window_egl->loop = g_main_loop_new (window_egl->main_context, FALSE);
-
-  window_resize (window_egl, 16, 16);
-
+  window_resize (window_egl, 16, 16, FALSE);
   return TRUE;
 }
 
-static void
-gst_gl_window_dispmanx_egl_run (GstGLWindow * window)
-{
-  GstGLWindowDispmanxEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
-
-  GST_LOG ("starting main loop");
-  g_main_loop_run (window_egl->loop);
-  GST_LOG ("exiting main loop");
-}
-
-static void
-gst_gl_window_dispmanx_egl_quit (GstGLWindow * window)
-{
-  GstGLWindowDispmanxEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
-
-  GST_LOG ("sending quit");
-
-  g_main_loop_quit (window_egl->loop);
-
-  GST_LOG ("quit sent");
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_window_dispmanx_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowDispmanxEGL *window_egl;
-  GstGLMessage *message;
-
-  window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_egl->main_context, (GSourceFunc) _run_message,
-      message);
-}
-
 static guintptr
 gst_gl_window_dispmanx_egl_get_window_handle (GstGLWindow * window)
 {
-  return (guintptr) & GST_GL_WINDOW_DISPMANX_EGL (window)->native;
+  GstGLWindowDispmanxEGL *window_egl;
+  window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
+  if (window_egl->native.element)
+    return (guintptr) & window_egl->native;
+  return 0;
 }
 
 static void
@@ -228,18 +171,34 @@
 }
 
 static void
-window_resize (GstGLWindowDispmanxEGL * window_egl, guint width, guint height)
+gst_gl_window_dispmanx_egl_set_preferred_size (GstGLWindow * window, gint width,
+    gint height)
 {
-  GST_DEBUG ("resizing window from %ux%u to %ux%u",
-      window_egl->native.width, window_egl->native.height, width, height);
+  GstGLWindowDispmanxEGL *window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
+
+  GST_DEBUG_OBJECT (window, "set preferred size to %dx%d", width, height);
+  window_egl->preferred_width = width;
+  window_egl->preferred_height = height;
+}
+
+static void
+window_resize (GstGLWindowDispmanxEGL * window_egl, guint width, guint height,
+    gboolean visible)
+{
+  GstGLWindow *window = GST_GL_WINDOW (window_egl);
+
+  GST_DEBUG ("resizing %s window from %ux%u to %ux%u",
+      visible ? "visible" : "invisible", window_egl->native.width,
+      window_egl->native.height, width, height);
 
   if (window_egl->display) {
     VC_RECT_T dst_rect;
     VC_RECT_T src_rect;
     GstVideoRectangle src, dst, res;
     DISPMANX_UPDATE_HANDLE_T dispman_update;
+    uint32_t opacity = visible ? 255 : 0;
     VC_DISPMANX_ALPHA_T alpha =
-        { DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, 255, 0 };
+        { DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, opacity, 0 };
 
     /* Center width*height frame inside dp_width*dp_height */
     src.w = width;
@@ -263,9 +222,12 @@
     dispman_update = vc_dispmanx_update_start (0);
 
     if (window_egl->native.element) {
+      uint32_t change_flags =
+          ELEMENT_CHANGE_OPACITY | ELEMENT_CHANGE_DEST_RECT |
+          ELEMENT_CHANGE_SRC_RECT;
       vc_dispmanx_element_change_attributes (dispman_update,
-          window_egl->native.element, 0x00000110, 0, 0, &dst_rect, &src_rect, 0,
-          0);
+          window_egl->native.element, change_flags, 0, opacity, &dst_rect,
+          &src_rect, 0, 0);
     } else {
       window_egl->native.element = vc_dispmanx_element_add (dispman_update,
           window_egl->display, 0, &dst_rect, 0, &src_rect,
@@ -274,55 +236,24 @@
 
     vc_dispmanx_update_submit_sync (dispman_update);
 
-    if (GST_GL_WINDOW (window_egl)->resize)
-      GST_GL_WINDOW (window_egl)->resize (GST_GL_WINDOW (window_egl)->
-          resize_data, width, height);
+    if (window->resize)
+      window->resize (window->resize_data, width, height);
   }
 
   window_egl->native.width = width;
   window_egl->native.height = height;
 }
 
-struct draw
-{
-  GstGLWindowDispmanxEGL *window;
-  guint width, height;
-};
-
 static void
-draw_cb (gpointer data)
+gst_gl_window_dispmanx_egl_show (GstGLWindow * window)
 {
-  struct draw *draw_data = data;
-  GstGLWindowDispmanxEGL *window_egl = draw_data->window;
-  GstGLWindow *window = GST_GL_WINDOW (window_egl);
-  GstGLContext *context = gst_gl_window_get_context (window);
-  GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
+  GstGLWindowDispmanxEGL *window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
 
-  if (window_egl->native.width != draw_data->width
-      || window_egl->native.height != draw_data->height) {
-    GST_DEBUG ("dimensions don't match, attempting resize");
-    window_resize (window_egl, draw_data->width, draw_data->height);
+  if (!window_egl->visible) {
+    window_resize (window_egl, window_egl->preferred_width,
+        window_egl->preferred_height, TRUE);
+    window_egl->visible = TRUE;
   }
-
-  if (window->draw)
-    window->draw (window->draw_data);
-
-  context_class->swap_buffers (context);
-
-  gst_object_unref (context);
-}
-
-static void
-gst_gl_window_dispmanx_egl_draw (GstGLWindow * window, guint width,
-    guint height)
-{
-  struct draw draw_data;
-
-  draw_data.window = GST_GL_WINDOW_DISPMANX_EGL (window);
-  draw_data.width = width;
-  draw_data.height = height;
-
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
 }
 
 static guintptr
diff --git a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h
index a3f11a2..df23eb5 100644
--- a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h
+++ b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h
@@ -23,8 +23,25 @@
 
 #include <gst/video/gstvideosink.h>
 #include <gst/gl/gl.h>
+#include <gst/gl/egl/gstegl.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#ifndef __VCCOREVER__
+#define __VCCOREVER__ 0x04000000
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC optimize ("gnu89-inline")
+#endif
+
 #include <bcm_host.h>
 
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#pragma GCC reset_options
+#pragma GCC diagnostic pop
+#endif
+
 G_BEGIN_DECLS
 
 #define GST_GL_TYPE_WINDOW_DISPMANX_EGL         (gst_gl_window_dispmanx_egl_get_type())
@@ -48,8 +65,10 @@
   uint32_t dp_width;
   EGL_DISPMANX_WINDOW_T native;
 
-  GMainContext *main_context;
-  GMainLoop *loop;
+  gint preferred_width;
+  gint preferred_height;
+
+  gboolean visible;
 
   gpointer _reserved[GST_PADDING];
 };
@@ -64,7 +83,8 @@
 
 GType gst_gl_window_dispmanx_egl_get_type     (void);
 
-GstGLWindowDispmanxEGL * gst_gl_window_dispmanx_egl_new  (void);
+GstGLWindowDispmanxEGL * gst_gl_window_dispmanx_egl_new  (GstGLDisplay * display);
+gboolean gst_gl_window_dispmanx_egl_create_window (GstGLWindowDispmanxEGL * window_egl);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/eagl/Makefile.in b/gst-libs/gst/gl/eagl/Makefile.in
index 85bc0f6..9d9f88e 100644
--- a/gst-libs/gst/gl/eagl/Makefile.in
+++ b/gst-libs/gst/gl/eagl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/eagl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -198,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -215,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -241,8 +254,6 @@
 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@
@@ -255,7 +266,6 @@
 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@
@@ -263,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -289,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -312,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -372,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -392,7 +409,6 @@
 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@
@@ -401,7 +417,6 @@
 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@
@@ -414,7 +429,6 @@
 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@
@@ -428,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -439,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -477,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -512,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -541,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -548,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -577,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -587,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -617,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -644,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -682,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -742,7 +777,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/eagl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/eagl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1031,6 +1065,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/eagl/gstglcontext_eagl.h b/gst-libs/gst/gl/eagl/gstglcontext_eagl.h
index bc4618c..bd6cd20 100644
--- a/gst-libs/gst/gl/eagl/gstglcontext_eagl.h
+++ b/gst-libs/gst/gl/eagl/gstglcontext_eagl.h
@@ -57,10 +57,13 @@
 
 GType gst_gl_context_eagl_get_type (void);
 
-GstGLContextEagl * gst_gl_context_eagl_new (void);
+GstGLContextEagl * gst_gl_context_eagl_new (GstGLDisplay * display);
 
+void gst_gl_context_eagl_update_layer (GstGLContext * context);
+void gst_gl_context_eagl_resize (GstGLContextEagl * eagl_context);
 void gst_gl_context_eagl_prepare_draw (GstGLContextEagl * context);
 void gst_gl_context_eagl_finish_draw (GstGLContextEagl * context);
+guintptr gst_gl_context_eagl_get_current_context (void);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/eagl/gstglcontext_eagl.m b/gst-libs/gst/gl/eagl/gstglcontext_eagl.m
index e3b71f3..55a803f 100644
--- a/gst-libs/gst/gl/eagl/gstglcontext_eagl.m
+++ b/gst-libs/gst/gl/eagl/gstglcontext_eagl.m
@@ -92,115 +92,35 @@
 
 /* Must be called in the gl thread */
 GstGLContextEagl *
-gst_gl_context_eagl_new (void)
+gst_gl_context_eagl_new (GstGLDisplay * display)
 {
-  GstGLContextEagl *context = g_object_new (GST_GL_TYPE_CONTEXT_EAGL, NULL);
-
-  return context;
+  /* there isn't actually a display type for eagl yet? */
+  return g_object_new (GST_GL_TYPE_CONTEXT_EAGL, NULL);
 }
 
-static gboolean
-gst_gl_context_eagl_create_context (GstGLContext * context, GstGLAPI gl_api,
-    GstGLContext * other_context, GError ** error)
+void
+gst_gl_context_eagl_resize (GstGLContextEagl * eagl_context)
 {
-  GstGLContextEagl *context_eagl = GST_GL_CONTEXT_EAGL (context);
-  GstGLContextEaglPrivate *priv = context_eagl->priv;
-  GstGLWindow *window = gst_gl_context_get_window (context);
-  UIView *window_handle = nil;
+  int width, height;
 
-  dispatch_sync (dispatch_get_main_queue (), ^{
-    if (other_context) {
-      EAGLContext *external_gl_context = (EAGLContext *)
-          gst_gl_context_get_gl_context (other_context);
-      EAGLSharegroup *share_group = [external_gl_context sharegroup];
-
-      priv->eagl_context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2 sharegroup:share_group];
-      [share_group release];
-    } else {
-      priv->eagl_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
-    }
-  });
-
-  if (window)
-    window_handle = (UIView *) gst_gl_window_get_window_handle (window);
-
-  if (window_handle) {
-    __block GLuint framebuffer;
-    __block GLuint color_renderbuffer;
-    __block GLuint depth_renderbuffer;
-    __block GLint width;
-    __block GLint height;
-    __block CAEAGLLayer *eagl_layer;
-    GLenum status;
-
-    dispatch_sync (dispatch_get_main_queue (), ^{
-          eagl_layer = (CAEAGLLayer *)[window_handle layer];
-          [EAGLContext setCurrentContext:priv->eagl_context];
-
-          /* Allocate framebuffer */
-          glGenFramebuffers (1, &framebuffer);
-          glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
-          /* Allocate color render buffer */
-          glGenRenderbuffers (1, &color_renderbuffer);
-          glBindRenderbuffer (GL_RENDERBUFFER, color_renderbuffer);
-          [priv->eagl_context renderbufferStorage: GL_RENDERBUFFER fromDrawable:eagl_layer];
-          glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-              GL_RENDERBUFFER, color_renderbuffer);
-          /* Get renderbuffer width/height */
-          glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH,
-              &width);
-          glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT,
-              &height);
-          /* allocate depth render buffer */
-          glGenRenderbuffers (1, &depth_renderbuffer);
-          glBindRenderbuffer (GL_RENDERBUFFER, depth_renderbuffer);
-          glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width,
-              height);
-          glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
-              GL_RENDERBUFFER, depth_renderbuffer);
-          [EAGLContext setCurrentContext:nil];
-    });
-
-    [EAGLContext setCurrentContext:priv->eagl_context];
-
-    glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
-    /* check creation status */
-    status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
-    if (status != GL_FRAMEBUFFER_COMPLETE) {
-      GST_ERROR ("Failed to make complete framebuffer object %x", status);
-      if (window)
-        gst_object_unref (window);
-      return FALSE;
-    }
-    glBindFramebuffer (GL_FRAMEBUFFER, 0);
-
-    priv->eagl_layer = eagl_layer;
-    priv->framebuffer = framebuffer;
-    priv->color_renderbuffer = color_renderbuffer;
-    priv->depth_renderbuffer = depth_renderbuffer;
-  } else {
-    priv->eagl_layer = NULL;
-    priv->framebuffer = 0;
-    priv->color_renderbuffer = 0;
-    priv->depth_renderbuffer = 0;
-  }
-
-  if (window)
-    gst_object_unref (window);
-
-  return TRUE;
+  glBindRenderbuffer (GL_RENDERBUFFER, eagl_context->priv->color_renderbuffer);
+  [eagl_context->priv->eagl_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:eagl_context->priv->eagl_layer];
+  glGetRenderbufferParameteriv (GL_RENDERBUFFER,
+      GL_RENDERBUFFER_WIDTH, &width);
+  glGetRenderbufferParameteriv (GL_RENDERBUFFER,
+      GL_RENDERBUFFER_HEIGHT, &height);
+  glBindRenderbuffer (GL_RENDERBUFFER, eagl_context->priv->depth_renderbuffer);
+  glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width,
+      height);
 }
 
 static void
-gst_gl_context_eagl_destroy_context (GstGLContext * context)
+gst_gl_context_eagl_release_layer (GstGLContext * context)
 {
   GstGLContextEagl *context_eagl;
 
   context_eagl = GST_GL_CONTEXT_EAGL (context);
 
-  if (!context_eagl->priv->eagl_context)
-    return;
-
   if (context_eagl->priv->eagl_layer) {
     gst_gl_context_eagl_activate (context, TRUE);
 
@@ -217,6 +137,120 @@
     context_eagl->priv->eagl_layer = nil;
     gst_gl_context_eagl_activate (context, FALSE);
   }
+}
+
+void
+gst_gl_context_eagl_update_layer (GstGLContext * context)
+{
+  GLuint framebuffer;
+  GLuint color_renderbuffer;
+  GLuint depth_renderbuffer;
+  GLint width;
+  GLint height;
+  CAEAGLLayer *eagl_layer;
+  GLenum status;
+  GstGLContextEagl *context_eagl = GST_GL_CONTEXT_EAGL (context);
+  GstGLContextEaglPrivate *priv = context_eagl->priv;
+  UIView *window_handle = nil;
+  GstGLWindow *window = gst_gl_context_get_window (context);
+  if (window)
+    window_handle = (UIView *) gst_gl_window_get_window_handle (window);
+
+  if (!window_handle) {
+    GST_INFO_OBJECT (context, "window handle not set yet, not updating layer");
+    goto out;
+  }
+
+  GST_INFO_OBJECT (context, "updating layer, frame %fx%f",
+      window_handle.frame.size.width, window_handle.frame.size.height);
+
+  if (priv->eagl_layer)
+    gst_gl_context_eagl_release_layer (context);
+
+  eagl_layer = (CAEAGLLayer *)[window_handle layer];
+  [EAGLContext setCurrentContext:priv->eagl_context];
+
+  /* Allocate framebuffer */
+  glGenFramebuffers (1, &framebuffer);
+  glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
+  /* Allocate color render buffer */
+  glGenRenderbuffers (1, &color_renderbuffer);
+  glBindRenderbuffer (GL_RENDERBUFFER, color_renderbuffer);
+  [priv->eagl_context renderbufferStorage: GL_RENDERBUFFER fromDrawable:eagl_layer];
+  glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+      GL_RENDERBUFFER, color_renderbuffer);
+  /* Get renderbuffer width/height */
+  glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH,
+      &width);
+  glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT,
+      &height);
+  /* allocate depth render buffer */
+  glGenRenderbuffers (1, &depth_renderbuffer);
+  glBindRenderbuffer (GL_RENDERBUFFER, depth_renderbuffer);
+  glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width,
+      height);
+  glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
+      GL_RENDERBUFFER, depth_renderbuffer);
+
+  /* check creation status */
+  status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
+  if (status != GL_FRAMEBUFFER_COMPLETE) {
+    GST_ERROR ("Failed to make complete framebuffer object %x", status);
+    goto out;
+  }
+  glBindRenderbuffer (GL_RENDERBUFFER, 0);
+  glBindFramebuffer (GL_FRAMEBUFFER, 0);
+
+  priv->eagl_layer = eagl_layer;
+  priv->framebuffer = framebuffer;
+  priv->color_renderbuffer = color_renderbuffer;
+  priv->depth_renderbuffer = depth_renderbuffer;
+
+out:
+  if (window)
+    gst_object_unref (window);
+}
+
+static gboolean
+gst_gl_context_eagl_create_context (GstGLContext * context, GstGLAPI gl_api,
+    GstGLContext * other_context, GError ** error)
+{
+  GstGLContextEagl *context_eagl = GST_GL_CONTEXT_EAGL (context);
+  GstGLContextEaglPrivate *priv = context_eagl->priv;
+
+  if (other_context) {
+    EAGLContext *external_gl_context = (EAGLContext *)
+        gst_gl_context_get_gl_context (other_context);
+    EAGLSharegroup *share_group = [external_gl_context sharegroup];
+
+    priv->eagl_context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2 sharegroup:share_group];
+    [share_group release];
+  } else {
+    priv->eagl_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+  }
+
+  priv->eagl_layer = NULL;
+  priv->framebuffer = 0;
+  priv->color_renderbuffer = 0;
+  priv->depth_renderbuffer = 0;
+
+  GST_INFO_OBJECT (context, "context created, updating layer");
+  gst_gl_context_eagl_update_layer (context);
+
+  return TRUE;
+}
+
+static void
+gst_gl_context_eagl_destroy_context (GstGLContext * context)
+{
+  GstGLContextEagl *context_eagl;
+
+  context_eagl = GST_GL_CONTEXT_EAGL (context);
+
+  if (!context_eagl->priv->eagl_context)
+    return;
+
+  gst_gl_context_eagl_release_layer (context);
 
   [context_eagl->priv->eagl_context release];
   context_eagl->priv->eagl_context = nil;
@@ -243,16 +277,14 @@
     return TRUE;
   }
   
-  dispatch_sync (dispatch_get_main_queue (), ^{
-    CAEAGLLayer *eagl_layer;
-    NSDictionary * dict =[NSDictionary dictionaryWithObjectsAndKeys:
-	    [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking,
-		kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
+  CAEAGLLayer *eagl_layer;
+  NSDictionary * dict =[NSDictionary dictionaryWithObjectsAndKeys:
+      [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking,
+      kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
 
-    eagl_layer = (CAEAGLLayer *)[window_handle layer];
-    [eagl_layer setOpaque:YES];
-    [eagl_layer setDrawableProperties:dict];
-  });
+  eagl_layer = (CAEAGLLayer *)[window_handle layer];
+  [eagl_layer setOpaque:YES];
+  [eagl_layer setDrawableProperties:dict];
 
   gst_object_unref (window);
 
@@ -341,3 +373,8 @@
   return GST_GL_PLATFORM_EAGL;
 }
 
+guintptr
+gst_gl_context_eagl_get_current_context (void)
+{
+  return (guintptr) [EAGLContext currentContext];
+}
diff --git a/gst-libs/gst/gl/eagl/gstglwindow_eagl.h b/gst-libs/gst/gl/eagl/gstglwindow_eagl.h
index 6e71b7e..ce3d0b3 100644
--- a/gst-libs/gst/gl/eagl/gstglwindow_eagl.h
+++ b/gst-libs/gst/gl/eagl/gstglwindow_eagl.h
@@ -57,7 +57,7 @@
 
 GType gst_gl_window_eagl_get_type     (void);
 
-GstGLWindowEagl * gst_gl_window_eagl_new (void);
+GstGLWindowEagl * gst_gl_window_eagl_new (GstGLDisplay * display);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
index 53f03ca..dfd889f 100644
--- a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
+++ b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
@@ -45,30 +45,21 @@
 static guintptr gst_gl_window_eagl_get_window_handle (GstGLWindow * window);
 static void gst_gl_window_eagl_set_window_handle (GstGLWindow * window,
     guintptr handle);
-static void gst_gl_window_eagl_draw (GstGLWindow * window, guint width,
-    guint height);
-static void gst_gl_window_eagl_run (GstGLWindow * window);
-static void gst_gl_window_eagl_quit (GstGLWindow * window);
-static void gst_gl_window_eagl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
-static gboolean gst_gl_window_eagl_open (GstGLWindow * window, GError ** error);
-static void gst_gl_window_eagl_close (GstGLWindow * window);
+static void gst_gl_window_eagl_set_preferred_size (GstGLWindow * window,
+    gint width, gint height);
+static void gst_gl_window_eagl_draw (GstGLWindow * window);
 
 struct _GstGLWindowEaglPrivate
 {
   UIView *view;
   gint window_width, window_height;
-
-  GMainContext *main_context;
-  GMainLoop *loop;
+  gint preferred_width, preferred_height;
 };
 
 static void
 gst_gl_window_eagl_class_init (GstGLWindowEaglClass * klass)
 {
-  GstGLWindowClass *window_class;
-
-  window_class = (GstGLWindowClass *) klass;
+  GstGLWindowClass *window_class = (GstGLWindowClass *) klass;
 
   g_type_class_add_private (klass, sizeof (GstGLWindowEaglPrivate));
 
@@ -80,27 +71,23 @@
       GST_DEBUG_FUNCPTR (gst_gl_window_eagl_set_window_handle);
   window_class->draw_unlocked = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_draw);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_eagl_send_message_async);
-  window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_open);
-  window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_eagl_close);
+  window_class->set_preferred_size =
+      GST_DEBUG_FUNCPTR (gst_gl_window_eagl_set_preferred_size);
 }
 
 static void
 gst_gl_window_eagl_init (GstGLWindowEagl * window)
 {
   window->priv = GST_GL_WINDOW_EAGL_GET_PRIVATE (window);
+
 }
 
 /* Must be called in the gl thread */
 GstGLWindowEagl *
-gst_gl_window_eagl_new (void)
+gst_gl_window_eagl_new (GstGLDisplay * display)
 {
-  GstGLWindowEagl *window = g_object_new (GST_GL_TYPE_WINDOW_EAGL, NULL);
-
-  return window;
+  /* there isn't an eagl display type */
+  return g_object_new (GST_GL_TYPE_WINDOW_EAGL, NULL);
 }
 
 static guintptr
@@ -119,113 +106,31 @@
 gst_gl_window_eagl_set_window_handle (GstGLWindow * window, guintptr handle)
 {
   GstGLWindowEagl *window_eagl;
+  GstGLContext *context;
 
   window_eagl = GST_GL_WINDOW_EAGL (window);
+  context = gst_gl_window_get_context (window);
 
   window_eagl->priv->view = (UIView *) handle;
-}
+  GST_INFO_OBJECT (context, "handle set, updating layer");
+  gst_gl_context_eagl_update_layer (context);
 
-static gboolean
-gst_gl_window_eagl_open (GstGLWindow * window, GError ** error)
-{
-  GstGLWindowEagl *window_eagl;
-
-  window_eagl = GST_GL_WINDOW_EAGL (window);
-
-  window_eagl->priv->main_context = g_main_context_new ();
-  window_eagl->priv->loop =
-      g_main_loop_new (window_eagl->priv->main_context, FALSE);
-
-  return TRUE;
+  gst_object_unref (context);
 }
 
 static void
-gst_gl_window_eagl_close (GstGLWindow * window)
+gst_gl_window_eagl_set_preferred_size (GstGLWindow * window, gint width, gint height)
 {
-  GstGLWindowEagl *window_eagl;
+  GstGLWindowEagl *window_eagl = GST_GL_WINDOW_EAGL (window);
 
-  window_eagl = GST_GL_WINDOW_EAGL (window);
-
-  g_main_loop_unref (window_eagl->priv->loop);
-  g_main_context_unref (window_eagl->priv->main_context);
+  window_eagl->priv->preferred_width = width;
+  window_eagl->priv->preferred_height = height;
 }
 
 static void
-gst_gl_window_eagl_run (GstGLWindow * window)
-{
-  GstGLWindowEagl *window_eagl;
-
-  window_eagl = GST_GL_WINDOW_EAGL (window);
-
-  GST_LOG ("starting main loop");
-  g_main_loop_run (window_eagl->priv->loop);
-  GST_LOG ("exiting main loop");
-}
-
-static void
-gst_gl_window_eagl_quit (GstGLWindow * window)
-{
-  GstGLWindowEagl *window_eagl;
-
-  window_eagl = GST_GL_WINDOW_EAGL (window);
-
-  GST_LOG ("sending quit");
-
-  g_main_loop_quit (window_eagl->priv->loop);
-
-  GST_LOG ("quit sent");
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_window_eagl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowEagl *window_eagl;
-  GstGLMessage *message;
-
-  window_eagl = GST_GL_WINDOW_EAGL (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_eagl->priv->main_context,
-      (GSourceFunc) _run_message, message);
-}
-
-struct draw
-{
-  GstGLWindowEagl *window;
-  guint width, height;
-};
-
-static void
 draw_cb (gpointer data)
 {
-  struct draw *draw_data = data;
-  GstGLWindowEagl *window_eagl = draw_data->window;
+  GstGLWindowEagl *window_eagl = data;
   GstGLWindow *window = GST_GL_WINDOW (window_eagl);
   GstGLContext *context = gst_gl_window_get_context (window);
   GstGLContextEagl *eagl_context = GST_GL_CONTEXT_EAGL (context);
@@ -238,12 +143,16 @@
     eagl_layer = (CAEAGLLayer *)[window_eagl->priv->view layer];
     size = eagl_layer.frame.size;
 
-    if (window_eagl->priv->window_width != size.width || window_eagl->priv->window_height != size.height) {
+    if (window->queue_resize || window_eagl->priv->window_width != size.width ||
+        window_eagl->priv->window_height != size.height) {
+
       window_eagl->priv->window_width = size.width;
       window_eagl->priv->window_height = size.height;
 
-      if (window->resize)
-        window->resize (window->resize_data, size.width, size.height);
+      gst_gl_context_eagl_resize (eagl_context);
+
+      gst_gl_window_resize (window, window_eagl->priv->window_width,
+            window_eagl->priv->window_height);
     }
   }
 
@@ -260,13 +169,7 @@
 }
 
 static void
-gst_gl_window_eagl_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_eagl_draw (GstGLWindow * window)
 {
-  struct draw draw_data;
-
-  draw_data.window = GST_GL_WINDOW_EAGL (window);
-  draw_data.width = width;
-  draw_data.height = height;
-
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
+  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window);
 }
diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
index 946b40b..b808178 100644
--- a/gst-libs/gst/gl/egl/Makefile.am
+++ b/gst-libs/gst/gl/egl/Makefile.am
@@ -7,13 +7,14 @@
 	gstglcontext_egl.c \
 	gsteglimagememory.c
 
-noinst_HEADERS = \
-	gstglcontext_egl.h
+noinst_HEADERS =
 
 libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
 libgstgl_eglinclude_HEADERS = \
 	gstgldisplay_egl.h \
-	gsteglimagememory.h
+	gstglcontext_egl.h \
+	gsteglimagememory.h \
+	gstegl.h
 
 libgstgl_egl_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
diff --git a/gst-libs/gst/gl/egl/Makefile.in b/gst-libs/gst/gl/egl/Makefile.in
index dde426d..b061290 100644
--- a/gst-libs/gst/gl/egl/Makefile.in
+++ b/gst-libs/gst/gl/egl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,9 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/egl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(libgstgl_eglinclude_HEADERS) \
-	$(noinst_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 \
@@ -91,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +112,6 @@
 	$(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 \
@@ -121,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libgstgl_eglinclude_HEADERS) \
+	$(noinst_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +283,6 @@
 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@
@@ -285,7 +295,6 @@
 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@
@@ -293,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +438,6 @@
 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@
@@ -431,7 +446,6 @@
 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@
@@ -444,7 +458,6 @@
 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@
@@ -458,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -731,13 +765,13 @@
 	gstglcontext_egl.c \
 	gsteglimagememory.c
 
-noinst_HEADERS = \
-	gstglcontext_egl.h
-
+noinst_HEADERS = 
 libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
 libgstgl_eglinclude_HEADERS = \
 	gstgldisplay_egl.h \
-	gsteglimagememory.h
+	gstglcontext_egl.h \
+	gsteglimagememory.h \
+	gstegl.h
 
 libgstgl_egl_la_CFLAGS = \
 	-I$(top_srcdir)/gst-libs \
@@ -767,7 +801,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/egl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/egl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1089,6 +1122,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-libgstgl_eglincludeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/egl/gstegl.h b/gst-libs/gst/gl/egl/gstegl.h
new file mode 100644
index 0000000..4fc2f3d
--- /dev/null
+++ b/gst-libs/gst/gl/egl/gstegl.h
@@ -0,0 +1,47 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_EGL_H_
+#define _GST_EGL_H_
+
+#include <gst/gl/gstglconfig.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#ifndef __VCCOREVER__
+#define __VCCOREVER__ 0x04000000
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC optimize ("gnu89-inline")
+#endif
+
+#ifndef EGL_EGLEXT_PROTOTYPES
+#define EGL_EGLEXT_PROTOTYPES 1
+#endif
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#pragma GCC reset_options
+#pragma GCC diagnostic pop
+#endif
+
+#endif /* _GST_EGL_H_ */
diff --git a/gst-libs/gst/gl/egl/gsteglimagememory.c b/gst-libs/gst/gl/egl/gsteglimagememory.c
index 5a023a5..eb45830 100644
--- a/gst-libs/gst/gl/egl/gsteglimagememory.c
+++ b/gst-libs/gst/gl/egl/gsteglimagememory.c
@@ -25,27 +25,10 @@
 #endif
 
 #include "gsteglimagememory.h"
-#include "gstglcontext_egl.h"
 
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_EGL_IMAGE_MEMORY);
 #define GST_CAT_DEFAULT GST_CAT_EGL_IMAGE_MEMORY
 
-typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
-    gpointer data);
-
-typedef struct
-{
-  GstMemory parent;
-
-  GstGLContextEGL *context;
-  EGLImageKHR image;
-  GstVideoGLTextureType type;
-  GstVideoGLTextureOrientation orientation;
-
-  gpointer user_data;
-  GstEGLImageDestroyNotify user_data_destroy;
-} GstEGLImageMemory;
-
 #define GST_EGL_IMAGE_MEMORY(mem) ((GstEGLImageMemory*)(mem))
 
 gboolean
@@ -211,7 +194,7 @@
 gst_egl_image_allocator_init_instance (gpointer data)
 {
   GstAllocator *allocator =
-      g_object_new (gst_egl_image_allocator_get_type (), NULL);;
+      g_object_new (gst_egl_image_allocator_get_type (), NULL);
 
   GST_DEBUG_CATEGORY_INIT (GST_CAT_EGL_IMAGE_MEMORY, "eglimagememory", 0,
       "EGLImage Memory");
@@ -317,13 +300,7 @@
 
     gl = GST_GL_CONTEXT (GST_EGL_IMAGE_MEMORY (mem)->context)->gl_vtable;
 
-    if (i == 0)
-      gl->ActiveTexture (GL_TEXTURE0);
-    else if (i == 1)
-      gl->ActiveTexture (GL_TEXTURE1);
-    else if (i == 2)
-      gl->ActiveTexture (GL_TEXTURE2);
-
+    gl->ActiveTexture (GL_TEXTURE0 + i);
     gl->BindTexture (GL_TEXTURE_2D, texture_id[i]);
     gl->EGLImageTargetTexture2D (GL_TEXTURE_2D,
         gst_egl_image_memory_get_image (mem));
diff --git a/gst-libs/gst/gl/egl/gsteglimagememory.h b/gst-libs/gst/gl/egl/gsteglimagememory.h
index bfcbaaa..ce1fd44 100644
--- a/gst-libs/gst/gl/egl/gsteglimagememory.h
+++ b/gst-libs/gst/gl/egl/gsteglimagememory.h
@@ -29,13 +29,32 @@
 #include <gst/video/video.h>
 
 #include <gst/gl/gl.h>
+#include "gstglcontext_egl.h"
 
 G_BEGIN_DECLS
 
+typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
+    gpointer data);
+
+typedef struct _GstEGLImageMemory GstEGLImageMemory;
+
 #define GST_EGL_IMAGE_MEMORY_TYPE "EGLImage"
 
 #define GST_CAPS_FEATURE_MEMORY_EGL_IMAGE "memory:EGLImage"
 
+struct _GstEGLImageMemory
+{
+  GstMemory parent;
+
+  GstGLContextEGL *context;
+  EGLImageKHR image;
+  GstVideoGLTextureType type;
+  GstVideoGLTextureOrientation orientation;
+
+  gpointer user_data;
+  GstEGLImageDestroyNotify user_data_destroy;
+};
+
 void gst_egl_image_memory_init (void);
 gboolean gst_egl_image_memory_setup_buffer (GstGLContext * context, GstVideoInfo * info, GstBuffer * buffer);
 gboolean gst_is_egl_image_memory (GstMemory * mem);
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c
index 4ccec8d..3a4aa35 100644
--- a/gst-libs/gst/gl/egl/gstglcontext_egl.c
+++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c
@@ -29,14 +29,23 @@
  */
 
 #include "gstglcontext_egl.h"
+#include <gst/gl/egl/gstegl.h>
 
 #if GST_GL_HAVE_WINDOW_X11
 #include "../x11/gstglwindow_x11.h"
 #include <gst/gl/x11/gstgldisplay_x11.h>
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+#include "../wayland/gstglwindow_wayland_egl.h"
+#endif
 #if GST_GL_HAVE_WINDOW_WIN32
 #include "../win32/gstglwindow_win32.h"
 #endif
+#if GST_GL_HAVE_WINDOW_DISPMANX
+#include "../dispmanx/gstglwindow_dispmanx_egl.h"
+#endif
+
+#define GST_CAT_DEFAULT gst_gl_context_debug
 
 static gboolean gst_gl_context_egl_create_context (GstGLContext * context,
     GstGLAPI gl_api, GstGLContext * other_context, GError ** error);
@@ -51,8 +60,6 @@
 static GstGLAPI gst_gl_context_egl_get_gl_api (GstGLContext * context);
 static GstGLPlatform gst_gl_context_egl_get_gl_platform (GstGLContext *
     context);
-static gpointer gst_gl_context_egl_get_proc_address (GstGLContext * context,
-    const gchar * name);
 static gboolean gst_gl_context_egl_check_feature (GstGLContext * context,
     const gchar * feature);
 
@@ -82,6 +89,8 @@
       GST_DEBUG_FUNCPTR (gst_gl_context_egl_get_proc_address);
   context_class->check_feature =
       GST_DEBUG_FUNCPTR (gst_gl_context_egl_check_feature);
+  context_class->get_current_context =
+      GST_DEBUG_FUNCPTR (gst_gl_context_egl_get_current_context);
 }
 
 static void
@@ -91,11 +100,11 @@
 
 /* Must be called in the gl thread */
 GstGLContextEGL *
-gst_gl_context_egl_new (void)
+gst_gl_context_egl_new (GstGLDisplay * display)
 {
-  GstGLContextEGL *window = g_object_new (GST_GL_TYPE_CONTEXT_EGL, NULL);
-
-  return window;
+  /* XXX: display type could theoretically be anything, as long as
+   * eglGetDisplay supports it. */
+  return g_object_new (GST_GL_TYPE_CONTEXT_EGL, NULL);
 }
 
 static const gchar *
@@ -179,16 +188,19 @@
   else
     config_attrib[i++] = EGL_OPENGL_BIT;
 #if defined(USE_EGL_RPI) && GST_GL_HAVE_WINDOW_WAYLAND
-  /* The configurations r=5 g=6 b=5 seems to be buggy whereas
+  /* The configurations with a=0 seems to be buggy whereas
    * it works when using dispmanx directly */
-  config_attrib[i++] = EGL_BUFFER_SIZE;
-  config_attrib[i++] = 24;
-  /* same with a=0 */
   config_attrib[i++] = EGL_ALPHA_SIZE;
   config_attrib[i++] = 1;
 #endif
   config_attrib[i++] = EGL_DEPTH_SIZE;
   config_attrib[i++] = 16;
+  config_attrib[i++] = EGL_RED_SIZE;
+  config_attrib[i++] = 1;
+  config_attrib[i++] = EGL_GREEN_SIZE;
+  config_attrib[i++] = 1;
+  config_attrib[i++] = EGL_BLUE_SIZE;
+  config_attrib[i++] = 1;
   config_attrib[i++] = EGL_NONE;
 
   if (eglChooseConfig (egl->egl_display, config_attrib,
@@ -216,7 +228,7 @@
   GstGLWindow *window = NULL;
   EGLNativeWindowType window_handle = (EGLNativeWindowType) 0;
   gint i = 0;
-  EGLint context_attrib[3];
+  EGLint context_attrib[5];
   EGLint majorVersion;
   EGLint minorVersion;
   const gchar *egl_exts;
@@ -227,6 +239,8 @@
   egl = GST_GL_CONTEXT_EGL (context);
   window = gst_gl_context_get_window (context);
 
+  GST_DEBUG_OBJECT (context, "Creating EGL context");
+
   if (other_context) {
     if (gst_gl_context_get_gl_platform (other_context) != GST_GL_PLATFORM_EGL) {
       g_set_error (error, GST_GL_CONTEXT_ERROR,
@@ -328,18 +342,43 @@
     goto failure;
   }
 
-  GST_DEBUG ("about to create gl context\n");
+  egl_exts = eglQueryString (egl->egl_display, EGL_EXTENSIONS);
+
+  GST_DEBUG ("about to create gl context");
 
   if (egl->gl_api & GST_GL_API_GLES2) {
     context_attrib[i++] = EGL_CONTEXT_CLIENT_VERSION;
     context_attrib[i++] = 2;
   }
+#if !defined(GST_DISABLE_GST_DEBUG) && defined(EGL_KHR_create_context)
+  if (gst_gl_check_extension ("EGL_KHR_create_context", egl_exts)) {
+    context_attrib[i++] = EGL_CONTEXT_FLAGS_KHR;
+    context_attrib[i++] = EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR;
+  }
+#endif
   context_attrib[i++] = EGL_NONE;
 
   egl->egl_context =
       eglCreateContext (egl->egl_display, egl->egl_config,
       (EGLContext) external_gl_context, context_attrib);
 
+#ifdef EGL_KHR_create_context
+  if (egl->egl_context == EGL_NO_CONTEXT && egl->gl_api & GST_GL_API_GLES2
+      && eglGetError () != EGL_SUCCESS) {
+    /* try without EGL_CONTEXT_FLAGS flags as it was added to
+     * EGL_KHR_create_context for gles contexts */
+    int i;
+    for (i = 0; i < G_N_ELEMENTS (context_attrib); i++) {
+      if (context_attrib[i] == EGL_CONTEXT_FLAGS_KHR ||
+          context_attrib[i] == EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR)
+        context_attrib[i] = EGL_NONE;
+    }
+    egl->egl_context =
+        eglCreateContext (egl->egl_display, egl->egl_config,
+        (EGLContext) external_gl_context, context_attrib);
+  }
+#endif
+
   if (egl->egl_context != EGL_NO_CONTEXT) {
     GST_INFO ("gl context created: %" G_GUINTPTR_FORMAT,
         (guintptr) egl->egl_context);
@@ -350,14 +389,18 @@
         gst_gl_context_egl_get_error_string ());
     goto failure;
   }
-
-  egl_exts = eglQueryString (egl->egl_display, EGL_EXTENSIONS);
+  /* FIXME do we want a window vfunc ? */
+#if GST_GL_HAVE_WINDOW_X11
+  if (GST_GL_IS_WINDOW_X11 (context->window)) {
+    gst_gl_window_x11_create_window ((GstGLWindowX11 *) context->window);
+  }
+#endif
 
   if (other_context == NULL) {
-    /* FIXME do we want a window vfunc ? */
-#if GST_GL_HAVE_WINDOW_X11
-    if (GST_GL_IS_WINDOW_X11 (context->window)) {
-      gst_gl_window_x11_create_window ((GstGLWindowX11 *) context->window);
+#if GST_GL_HAVE_WINDOW_WAYLAND
+    if (GST_GL_IS_WINDOW_WAYLAND_EGL (context->window)) {
+      gst_gl_window_wayland_egl_create_window ((GstGLWindowWaylandEGL *)
+          context->window);
     }
 #endif
 #if GST_GL_HAVE_WINDOW_WIN32
@@ -365,6 +408,12 @@
       gst_gl_window_win32_create_window ((GstGLWindowWin32 *) context->window);
     }
 #endif
+#if GST_GL_HAVE_WINDOW_DISPMANX
+    if (GST_GL_IS_WINDOW_DISPMANX_EGL (context->window)) {
+      gst_gl_window_dispmanx_egl_create_window ((GstGLWindowDispmanxEGL *)
+          context->window);
+    }
+#endif
   }
 
   if (window)
@@ -372,13 +421,18 @@
         (EGLNativeWindowType) gst_gl_window_get_window_handle (window);
 
   if (window_handle) {
+    GST_DEBUG ("Creating EGLSurface from window_handle %p",
+        (void *) window_handle);
     egl->egl_surface =
         eglCreateWindowSurface (egl->egl_display, egl->egl_config,
         window_handle, NULL);
+    /* Store window handle for later comparision */
+    egl->window_handle = window_handle;
   } else if (!gst_gl_check_extension ("EGL_KHR_surfaceless_context", egl_exts)) {
     EGLint surface_attrib[7];
     gint j = 0;
 
+    GST_DEBUG ("Surfaceless context, creating PBufferSurface");
     /* FIXME: Width/height doesn't seem to matter but we can't leave them
      * at 0, otherwise X11 complains about BadValue */
     surface_attrib[j++] = EGL_WIDTH;
@@ -393,6 +447,7 @@
         eglCreatePbufferSurface (egl->egl_display, egl->egl_config,
         surface_attrib);
   } else {
+    GST_DEBUG ("No surface/handle !");
     egl->egl_surface = EGL_NO_SURFACE;
     need_surface = FALSE;
   }
@@ -446,11 +501,16 @@
 
   gst_gl_context_egl_activate (context, FALSE);
 
-  if (egl->egl_surface)
+  if (egl->egl_surface) {
     eglDestroySurface (egl->egl_display, egl->egl_surface);
+    egl->egl_surface = EGL_NO_SURFACE;
+  }
 
-  if (egl->egl_context)
+  if (egl->egl_context) {
     eglDestroyContext (egl->egl_display, egl->egl_context);
+    egl->egl_context = NULL;
+  }
+  egl->window_handle = 0;
 
   eglReleaseThread ();
 }
@@ -463,13 +523,52 @@
 
   egl = GST_GL_CONTEXT_EGL (context);
 
-  if (activate)
+  if (activate) {
+    GstGLWindow *window = gst_gl_context_get_window (context);
+    EGLNativeWindowType handle = 0;
+    /* Check if the backing handle changed */
+    if (window) {
+      handle = (EGLNativeWindowType) gst_gl_window_get_window_handle (window);
+      gst_object_unref (window);
+    }
+    if (handle && handle != egl->window_handle) {
+      GST_DEBUG_OBJECT (context,
+          "Handle changed (have:%p, now:%p), switching surface",
+          (void *) egl->window_handle, (void *) handle);
+      if (egl->egl_surface) {
+        result = eglDestroySurface (egl->egl_display, egl->egl_surface);
+        egl->egl_surface = EGL_NO_SURFACE;
+        if (!result) {
+          GST_ERROR_OBJECT (context, "Failed to destroy old window surface: %s",
+              gst_gl_context_egl_get_error_string ());
+          goto done;
+        }
+      }
+      egl->egl_surface =
+          eglCreateWindowSurface (egl->egl_display, egl->egl_config, handle,
+          NULL);
+      egl->window_handle = handle;
+
+      if (egl->egl_surface == EGL_NO_SURFACE) {
+        GST_ERROR_OBJECT (context, "Failed to create window surface: %s",
+            gst_gl_context_egl_get_error_string ());
+        result = FALSE;
+        goto done;
+      }
+    }
     result = eglMakeCurrent (egl->egl_display, egl->egl_surface,
         egl->egl_surface, egl->egl_context);
-  else
+  } else
     result = eglMakeCurrent (egl->egl_display, EGL_NO_SURFACE,
         EGL_NO_SURFACE, EGL_NO_CONTEXT);
 
+  if (!result) {
+    GST_ERROR_OBJECT (context,
+        "Failed to bind context to the current rendering thread: %s",
+        gst_gl_context_egl_get_error_string ());
+  }
+
+done:
   return result;
 }
 
@@ -522,13 +621,41 @@
   return NULL;
 }
 
-static gpointer
-gst_gl_context_egl_get_proc_address (GstGLContext * context, const gchar * name)
+gpointer
+gst_gl_context_egl_get_proc_address (GstGLAPI gl_api, const gchar * name)
 {
   gpointer result = NULL;
   static GOnce g_once = G_ONCE_INIT;
 
-  result = gst_gl_context_default_get_proc_address (context, name);
+#ifdef __APPLE__
+#if GST_GL_HAVE_OPENGL && !defined(GST_GL_LIBGL_MODULE_NAME)
+  if (!result && (gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3))) {
+    static GModule *module_opengl = NULL;
+    if (g_once_init_enter (&module_opengl)) {
+      GModule *setup_module_opengl =
+          g_module_open ("libGL.dylib", G_MODULE_BIND_LAZY);
+      g_once_init_leave (&module_opengl, setup_module_opengl);
+    }
+    if (module_opengl)
+      g_module_symbol (module_opengl, name, &result);
+  }
+#endif
+#if GST_GL_HAVE_GLES2 && !defined(GST_GL_LIBGLESV2_MODULE_NAME)
+  if (!result && (gl_api & (GST_GL_API_GLES2))) {
+    static GModule *module_gles2 = NULL;
+    if (g_once_init_enter (&module_gles2)) {
+      GModule *setup_module_gles2 =
+          g_module_open ("libGLESv2.dylib", G_MODULE_BIND_LAZY);
+      g_once_init_leave (&module_gles2, setup_module_gles2);
+    }
+    if (module_gles2)
+      g_module_symbol (module_gles2, name, &result);
+  }
+#endif
+#endif // __APPLE__
+
+  if (!result)
+    result = gst_gl_context_default_get_proc_address (gl_api, name);
 
   g_once (&g_once, load_egl_module, NULL);
 
@@ -560,3 +687,9 @@
 
   return FALSE;
 }
+
+guintptr
+gst_gl_context_egl_get_current_context (void)
+{
+  return (guintptr) eglGetCurrentContext ();
+}
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.h b/gst-libs/gst/gl/egl/gstglcontext_egl.h
index 9601865..88b8bd7 100644
--- a/gst-libs/gst/gl/egl/gstglcontext_egl.h
+++ b/gst-libs/gst/gl/egl/gstglcontext_egl.h
@@ -23,12 +23,14 @@
 
 #include <gst/gst.h>
 #include <gst/gl/gl.h>
+#include <gst/gl/egl/gstegl.h>
 
 G_BEGIN_DECLS
 
 typedef struct _GstGLContextEGL GstGLContextEGL;
 typedef struct _GstGLContextEGLClass GstGLContextEGLClass;
 
+GType gst_gl_context_egl_get_type     (void);
 #define GST_GL_TYPE_CONTEXT_EGL         (gst_gl_context_egl_get_type())
 #define GST_GL_CONTEXT_EGL(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGL))
 #define GST_GL_CONTEXT_EGL_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGLClass))
@@ -49,14 +51,18 @@
   EGLImageKHR (*eglCreateImage) (EGLDisplay dpy, EGLContext ctx, EGLenum target,
       EGLClientBuffer buffer, const EGLint *attrib_list);
   EGLBoolean (*eglDestroyImage) (EGLDisplay dpy, EGLImageKHR image);
+
+  /* Cached handle */
+  EGLNativeWindowType window_handle;
 };
 
 struct _GstGLContextEGLClass {
   GstGLContextClass parent;
 };
 
-GType gst_gl_context_egl_get_type     (void);
-GstGLContextEGL * gst_gl_context_egl_new (void);
+GstGLContextEGL *   gst_gl_context_egl_new                  (GstGLDisplay * display);
+guintptr            gst_gl_context_egl_get_current_context  (void);
+gpointer            gst_gl_context_egl_get_proc_address     (GstGLAPI gl_api, const gchar * name);
 
 /* TODO:
  * add support for EGL_NO_CONTEXT
diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.h b/gst-libs/gst/gl/egl/gstgldisplay_egl.h
index 2e47319..18c7e4f 100644
--- a/gst-libs/gst/gl/egl/gstgldisplay_egl.h
+++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.h
@@ -23,6 +23,7 @@
 
 #include <gst/gst.h>
 #include <gst/gl/gstgldisplay.h>
+#include <gst/gl/egl/gstegl.h>
 
 G_BEGIN_DECLS
 
diff --git a/gst-libs/gst/gl/gl.h b/gst-libs/gst/gl/gl.h
index d5debe6..4b1e8ef 100644
--- a/gst-libs/gst/gl/gl.h
+++ b/gst-libs/gst/gl/gl.h
@@ -39,10 +39,15 @@
 #include <gst/gl/gstglupload.h>
 #include <gst/gl/gstgluploadmeta.h>
 #include <gst/gl/gstgldownload.h>
+#include <gst/gl/gstglbasebuffer.h>
 #include <gst/gl/gstglmemory.h>
 #include <gst/gl/gstglbufferpool.h>
 #include <gst/gl/gstglframebuffer.h>
+#include <gst/gl/gstglbasefilter.h>
+#include <gst/gl/gstglviewconvert.h>
 #include <gst/gl/gstglfilter.h>
 #include <gst/gl/gstglshadervariables.h>
+#include <gst/gl/gstglsyncmeta.h>
+#include <gst/gl/gstgloverlaycompositor.h>
 
 #endif /* __GST_GL_H__ */
diff --git a/gst-libs/gst/gl/glprototypes/Makefile.am b/gst-libs/gst/gl/glprototypes/Makefile.am
index 6528630..6ea90db 100644
--- a/gst-libs/gst/gl/glprototypes/Makefile.am
+++ b/gst-libs/gst/gl/glprototypes/Makefile.am
@@ -11,5 +11,9 @@
 	opengl.h \
 	shaders.h \
 	gstgl_compat.h \
-	gstgl_gles2compat.h
+	gstgl_gles2compat.h \
+	debug.h \
+	vao.h \
+	sync.h \
+	buffers.h
 
diff --git a/gst-libs/gst/gl/glprototypes/Makefile.in b/gst-libs/gst/gl/glprototypes/Makefile.in
index 81ebb05..f1889a0 100644
--- a/gst-libs/gst/gl/glprototypes/Makefile.in
+++ b/gst-libs/gst/gl/glprototypes/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/glprototypes
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(prototype_HEADERS) README
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(prototype_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -190,6 +200,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -207,8 +218,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -233,8 +246,6 @@
 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@
@@ -247,7 +258,6 @@
 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@
@@ -255,6 +265,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -281,11 +293,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -304,8 +319,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -364,10 +377,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -384,7 +401,6 @@
 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@
@@ -393,7 +409,6 @@
 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@
@@ -406,7 +421,6 @@
 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@
@@ -420,6 +434,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -431,6 +446,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -469,6 +486,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -504,10 +522,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -533,6 +555,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -540,7 +565,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -569,6 +601,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -579,6 +612,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -609,17 +643,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -636,6 +669,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -674,6 +708,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -699,7 +734,11 @@
 	opengl.h \
 	shaders.h \
 	gstgl_compat.h \
-	gstgl_gles2compat.h
+	gstgl_gles2compat.h \
+	debug.h \
+	vao.h \
+	sync.h \
+	buffers.h
 
 all: all-am
 
@@ -716,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/glprototypes/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/glprototypes/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -963,6 +1001,8 @@
 	ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-prototypeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/glprototypes/all_functions.h b/gst-libs/gst/gl/glprototypes/all_functions.h
index 12f9a62..c6af415 100644
--- a/gst-libs/gst/gl/glprototypes/all_functions.h
+++ b/gst-libs/gst/gl/glprototypes/all_functions.h
@@ -26,3 +26,7 @@
 #include "gles.h"
 #include "opengl.h"
 #include "shaders.h"
+#include "debug.h"
+#include "vao.h"
+#include "sync.h"
+#include "buffers.h"
diff --git a/gst-libs/gst/gl/glprototypes/base.h b/gst-libs/gst/gl/glprototypes/base.h
index ab25e7e..f0528b7 100644
--- a/gst-libs/gst/gl/glprototypes/base.h
+++ b/gst-libs/gst/gl/glprototypes/base.h
@@ -178,6 +178,10 @@
 GST_GL_EXT_FUNCTION (GLboolean, IsEnabled, (GLenum cap))
 GST_GL_EXT_FUNCTION (void, LineWidth, (GLfloat width))
 GST_GL_EXT_FUNCTION (void, PolygonOffset, (GLfloat factor, GLfloat units))
+GST_GL_EXT_FUNCTION (void, TexParameterf,
+                     (GLenum target,
+                      GLenum pname,
+                      GLfloat param))
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (texture_3d,
@@ -298,6 +302,14 @@
 GST_GL_EXT_FUNCTION (void *, MapBuffer,
                    (GLenum		 target,
                     GLenum		 access))
+GST_GL_EXT_END ()
+
+GST_GL_EXT_BEGIN (unmap_buffer,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2,
+                  1, 5,
+                  3, 0,
+                  "ARB\0OES\0",
+                  "vertex_buffer_object\0mapbuffer\0")
 GST_GL_EXT_FUNCTION (GLboolean, UnmapBuffer,
                    (GLenum		 target))
 GST_GL_EXT_END ()
@@ -305,10 +317,12 @@
 GST_GL_EXT_BEGIN (gl3,
                   GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
-                  3, 1,
+                  3, 0,
                   3, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (const GLubyte*, GetStringi,
                      (GLenum name, GLint index))
+GST_GL_EXT_FUNCTION (void *, MapBufferRange,
+                     (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access))
 GST_GL_EXT_END ()
diff --git a/gst-libs/gst/gl/glprototypes/buffers.h b/gst-libs/gst/gl/glprototypes/buffers.h
new file mode 100644
index 0000000..5e73c62
--- /dev/null
+++ b/gst-libs/gst/gl/glprototypes/buffers.h
@@ -0,0 +1,48 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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.
+ */
+
+GST_GL_EXT_BEGIN (buffer_copy_sub_data,
+                  GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES2,
+                  3, 1,
+                  3, 0,
+                  /* extension is available in GL 3.0 */
+                  "\0",
+                  "\0")
+GST_GL_EXT_FUNCTION (void, CopyBufferSubData,
+                     (GLenum                readTarget,
+                      GLenum                writeTarget,
+                      GLintptr              readOffset,
+                      GLintptr              writeOffset,
+                      GLsizeiptr            size))
+GST_GL_EXT_END ()
+
+GST_GL_EXT_BEGIN (get_buffer_sub_data,
+                  GST_GL_API_OPENGL3,
+                  1, 5,
+                  255, 255,
+                  "\0",
+                  "\0")
+GST_GL_EXT_FUNCTION (void, GetBufferSubData,
+                     (GLenum                target,
+                      GLintptr              offset,
+                      GLsizeiptr            size,
+                      void *                data))
+GST_GL_EXT_END ()
diff --git a/gst-libs/gst/gl/glprototypes/debug.h b/gst-libs/gst/gl/glprototypes/debug.h
new file mode 100644
index 0000000..6c53ea2
--- /dev/null
+++ b/gst-libs/gst/gl/glprototypes/debug.h
@@ -0,0 +1,90 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <ystreet00@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.
+ */
+
+GST_GL_EXT_BEGIN (debug,
+                  GST_GL_API_OPENGL3,
+                  4, 3,
+                  255, 255,
+                  "KHR:\0KHR\0ARB\0",
+                  "debug\0debug_output\0")
+GST_GL_EXT_FUNCTION (void, DebugMessageControl,
+                     (GLenum source,
+                      GLenum type,
+                      GLenum severity,
+                      GLsizei count,
+                      const GLuint* ids,
+                      gboolean enabled))
+GST_GL_EXT_FUNCTION (void, DebugMessageInsert,
+                     (GLenum source,
+                      GLenum type,
+                      GLenum severity,
+                      GLsizei length,
+                      const gchar *message))
+GST_GL_EXT_FUNCTION (void, DebugMessageCallback,
+                     (GST_GL_DEBUG_PROC callback,
+                      gpointer user_data))
+GST_GL_EXT_FUNCTION (GLuint, GetDebugMessageLog,
+                     (GLuint count,
+                      GLsizei bufSize,
+                      GLenum* sources,
+                      GLenum* types,
+                      GLuint* ids,
+                      GLenum* severities,
+                      GLsizei* lengths,
+                      gchar* messageLog))
+GST_GL_EXT_FUNCTION (void, GetPointerv,
+                     (GLenum pname,
+                      gpointer * params))
+GST_GL_EXT_END ()                      
+
+GST_GL_EXT_BEGIN (khr_debug,
+                  GST_GL_API_OPENGL3,
+                  4, 3,
+                  255, 255,
+                  "KHR:\0KHR\0",
+                  "debug\0")
+GST_GL_EXT_FUNCTION (void, PushDebugGroup,
+                     (GLenum source,
+                      GLuint id,
+                      GLsizei length,
+                      const gchar * message))
+GST_GL_EXT_FUNCTION (void, PopDebugGroup, (void))
+GST_GL_EXT_FUNCTION (void, ObjectLabel,
+                     (GLenum identifier,
+                      GLuint name,
+                      GLsizei length,
+                      const gchar *label))
+GST_GL_EXT_FUNCTION (void, GetObjectLabel,
+                     (GLenum identifier,
+                      GLuint name,
+                      GLsizei bufSize, 
+                      GLsizei *length,
+                      gchar *label))
+GST_GL_EXT_FUNCTION (void, ObjectPtrLabel,
+                     (gpointer ptr,
+                      GLsizei length,
+                      const gchar *label))
+GST_GL_EXT_FUNCTION (void, GetObjectPtrLabel,
+                     (gpointer ptr,
+                      GLsizei bufSize,
+                      GLsizei *length,
+                      gchar *label))
+GST_GL_EXT_END ()
+
diff --git a/gst-libs/gst/gl/glprototypes/gstgl_compat.h b/gst-libs/gst/gl/glprototypes/gstgl_compat.h
index 5e1f8bb..a4f963d 100644
--- a/gst-libs/gst/gl/glprototypes/gstgl_compat.h
+++ b/gst-libs/gst/gl/glprototypes/gstgl_compat.h
@@ -36,5 +36,29 @@
 #if !GST_GL_HAVE_GLINTPTR
 typedef ptrdiff_t GLintptr;
 #endif
+#if !GST_GL_HAVE_GLSYNC
+typedef gpointer GLsync;
+#endif
+#if !GST_GL_HAVE_GLUINT64
+typedef guint64 GLuint64;
+#endif
+
+#if !defined(GST_GL_DEBUG_PROC)
+#if defined(GLDEBUGPROC)
+#define GST_GL_DEBUG_PROC GLDEBUGPROC
+#elif defined(GLDEBUGPROCARB)
+#define GST_GL_DEBUG_PROC GLDEBUGPROCARB
+#elif defined(GLDEBUGPROCKHR)
+#define GST_GL_DEBUG_PROC GLDEBUGPROCKHR
+#else
+typedef void (GSTGLAPI *GST_GL_DEBUG_PROC) (GLenum source,
+                                            GLenum type,
+                                            GLuint id,
+                                            GLenum severity,
+                                            GLsizei length,
+                                            const gchar* message,
+                                            gpointer user_data);
+#endif
+#endif
 
 #endif
diff --git a/gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h b/gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h
index b185e6a..d282990 100644
--- a/gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h
+++ b/gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h
@@ -31,7 +31,6 @@
 //FIXME:
 #define GL_RGB16 GL_RGB565
 #define GL_RGB8 GL_RGB
-#define GL_RGBA8 GL_RGBA
 //END FIXME
 
 /* UNSUPPORTED */
diff --git a/gst-libs/gst/gl/glprototypes/opengl.h b/gst-libs/gst/gl/glprototypes/opengl.h
index 24ba20d..ac47d52 100644
--- a/gst-libs/gst/gl/glprototypes/opengl.h
+++ b/gst-libs/gst/gl/glprototypes/opengl.h
@@ -57,6 +57,8 @@
                      (double near_val, double far_val))
 GST_GL_EXT_FUNCTION (void, DrawBuffer,
                      (GLenum mode))
+GST_GL_EXT_FUNCTION (void, ClearDepth,
+                     (double depth))
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (only_in_big_gl_compat,
diff --git a/gst-libs/gst/gl/glprototypes/sync.h b/gst-libs/gst/gl/glprototypes/sync.h
new file mode 100644
index 0000000..3181037
--- /dev/null
+++ b/gst-libs/gst/gl/glprototypes/sync.h
@@ -0,0 +1,46 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.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.
+ */
+
+GST_GL_EXT_BEGIN (sync,
+                  GST_GL_API_OPENGL3,
+                  3, 2,
+                  3, 0,
+                  "",
+                  "")
+GST_GL_EXT_FUNCTION (GLsync, FenceSync,
+                     (GLenum condition,
+                      GLbitfield flags))
+GST_GL_EXT_FUNCTION (GLboolean, IsSync,
+                     (GLsync sync))
+GST_GL_EXT_FUNCTION (void, DeleteSync,
+                     (GLsync sync))
+GST_GL_EXT_FUNCTION (GLenum, ClientWaitSync,
+                     (GLsync sync,
+                      GLbitfield flags,
+                      GLuint64 timeout))
+GST_GL_EXT_FUNCTION (void, WaitSync,
+                     (GLsync sync,
+                      GLbitfield flags,
+                      GLuint64 timeout))
+GST_GL_EXT_FUNCTION (void, GetSynciv,
+                     (GLsync sync,
+                      GLenum flags,
+                      GLuint64 timeout))
+GST_GL_EXT_END ()
diff --git a/gst-libs/gst/gl/glprototypes/vao.h b/gst-libs/gst/gl/glprototypes/vao.h
new file mode 100644
index 0000000..32d1159
--- /dev/null
+++ b/gst-libs/gst/gl/glprototypes/vao.h
@@ -0,0 +1,37 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.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.
+ */
+
+GST_GL_EXT_BEGIN (vao,
+                  GST_GL_API_OPENGL3 | GST_GL_API_GLES2,
+                  3, 0,
+                  3, 0,
+                  "ARB:\0OES\0",
+                  "vertex_array_object\0")
+GST_GL_EXT_FUNCTION (void, GenVertexArrays,
+                     (GLsizei               n,
+                      GLuint               *arrays))
+GST_GL_EXT_FUNCTION (void, DeleteVertexArrays,
+                     (GLsizei               n,
+                      GLuint               *arrays))
+GST_GL_EXT_FUNCTION (void, BindVertexArray,
+                     (GLuint                array))
+GST_GL_EXT_FUNCTION (GLboolean, IsVertexArray,
+                     (GLuint                array))
+GST_GL_EXT_END ()
diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
index b0eedc0..cb29c6d 100644
--- a/gst-libs/gst/gl/gstgl_fwd.h
+++ b/gst-libs/gst/gl/gstgl_fwd.h
@@ -39,6 +39,10 @@
 typedef struct _GstGLWindowPrivate GstGLWindowPrivate;
 typedef struct _GstGLWindowClass   GstGLWindowClass;
 
+typedef struct _GstGLBaseBuffer GstGLBaseBuffer;
+typedef struct _GstGLBaseBufferAllocator GstGLBaseBufferAllocator;
+typedef struct _GstGLBaseBufferAllocatorClass GstGLBaseBufferAllocatorClass;
+
 typedef struct _GstGLMemory GstGLMemory;
 typedef struct _GstGLAllocator GstGLAllocator;
 typedef struct _GstGLAllocatorClass GstGLAllocatorClass;
@@ -63,6 +67,20 @@
 typedef struct _GstGLColorConvertClass GstGLColorConvertClass;
 typedef struct _GstGLColorConvertPrivate GstGLColorConvertPrivate;
 
+typedef struct _GstGLBaseFilter GstGLBaseFilter;
+typedef struct _GstGLBaseFilterClass GstGLBaseFilterClass;
+typedef struct _GstGLBaseFilterPrivate GstGLBaseFilterPrivate;
+
+typedef struct _GstGLFilter GstGLFilter;
+typedef struct _GstGLFilterClass GstGLFilterClass;
+
+typedef struct _GstGLViewConvert GstGLViewConvert;
+typedef struct _GstGLViewConvertClass GstGLViewConvertClass;
+typedef struct _GstGLViewConvertPrivate GstGLViewConvertPrivate;
+
+typedef struct _GstGLOverlayCompositor GstGLOverlayCompositor;
+typedef struct _GstGLOverlayCompositorClass GstGLOverlayCompositorClass;
+
 G_END_DECLS
 
 #endif /* __GST_GL_FWD_H__ */
diff --git a/gst-libs/gst/gl/gstglapi.c b/gst-libs/gst/gl/gstglapi.c
index 5d7e621..3bee14b 100644
--- a/gst-libs/gst/gl/gstglapi.c
+++ b/gst-libs/gst/gl/gstglapi.c
@@ -24,8 +24,7 @@
 #include "gstglapi.h"
 
 /**
- * gst_gl_api_to_string():
- *
+ * gst_gl_api_to_string:
  * @api: a #GstGLAPI to stringify
  *
  * Returns: A space seperated string of the OpenGL api's enabled in @api
@@ -78,11 +77,10 @@
 }
 
 /**
- * gst_gl_api_from_string():
+ * gst_gl_api_from_string:
+ * @api_s: a space seperated string of OpenGL apis
  *
- * @apis_s: a space seperated string of OpenGL apis
- *
- * Returns: The #GstGLAPI represented by @apis_s
+ * Returns: The #GstGLAPI represented by @api_s
  */
 GstGLAPI
 gst_gl_api_from_string (const gchar * apis_s)
@@ -121,8 +119,7 @@
 }
 
 /**
- * gst_gl_platform_to_string():
- *
+ * gst_gl_platform_to_string:
  * @api: a #GstGLPlatform to stringify
  *
  * Returns: A space seperated string of the OpenGL platforms enabled in @api
@@ -165,8 +162,7 @@
 }
 
 /**
- * gst_gl_platform_from_string():
- *
+ * gst_gl_platform_from_string:
  * @platform_s: a space seperated string of OpenGL platformss
  *
  * Returns: The #GstGLPlatform represented by @platform_s
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h
index 83b94a2..dd44b45 100644
--- a/gst-libs/gst/gl/gstglapi.h
+++ b/gst-libs/gst/gl/gstglapi.h
@@ -22,39 +22,13 @@
 #define __GST_GL_API_H__
 
 #include <gst/gl/gstglconfig.h>
-#include <gst/gl/glprototypes/gstgl_compat.h>
-
-#if GST_GL_HAVE_PLATFORM_EGL
-
-#if defined (USE_EGL_RPI) && defined(__GNUC__)
-#ifndef __VCCOREVER__
-#define __VCCOREVER__ 0x04000000
-#endif
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#pragma GCC optimize ("gnu89-inline")
-#endif
-
-#ifndef EGL_EGLEXT_PROTOTYPES
-#define EGL_EGLEXT_PROTOTYPES 1
-#endif
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#if defined (USE_EGL_RPI) && defined(__GNUC__)
-#pragma GCC reset_options
-#pragma GCC diagnostic pop
-#endif
-
-#endif
 
 /* OpenGL 2.0 for Embedded Systems */
 #if GST_GL_HAVE_GLES2
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
 #endif
-# ifdef __APPLE__
+# if GST_GL_HAVE_PLATFORM_EAGL
 #  include <OpenGLES/ES2/gl.h>
 #  include <OpenGLES/ES2/glext.h>
 # else
@@ -75,11 +49,9 @@
 #   define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
 #   include <OpenGL/gl3.h>
 #  endif
-#  include <OpenGL/glu.h>
 # else
 #  include <GL/gl.h>
-#  include <GL/glu.h>
-#  if __WIN32__ || _WIN32
+#  if defined(__WIN32__) || defined(_WIN32)
 #   include <GL/glext.h>
 #  endif
 # endif
@@ -90,6 +62,7 @@
 #else
 #define GSTGLAPI
 #endif
+#include <gst/gl/glprototypes/gstgl_compat.h>
 
 #include <gst/gst.h>
 
@@ -125,7 +98,7 @@
 #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;
+  ret (GSTGLAPI *name) args;
 #define GST_GL_EXT_END()
 
 typedef struct _GstGLFuncs
diff --git a/gst-libs/gst/gl/gstglbasebuffer.c b/gst-libs/gst/gl/gstglbasebuffer.c
new file mode 100644
index 0000000..495e104
--- /dev/null
+++ b/gst-libs/gst/gl/gstglbasebuffer.c
@@ -0,0 +1,666 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 <string.h>
+
+#include "gstglbasebuffer.h"
+#include "gstglutils.h"
+
+/**
+ * SECTION:gstglbuffer
+ * @short_description: memory subclass for GL buffers
+ * @see_also: #GstMemory, #GstAllocator
+ *
+ * GstGLBaseBuffer is a #GstMemory subclass providing support for the mapping of
+ * GL buffers.  
+ *
+ * Data is uploaded or downloaded from the GPU as is necessary.
+ */
+
+/* Implementation notes:
+ *
+ * Currently does not take into account GLES2 differences (no mapbuffer)
+ */
+
+#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))
+
+/* compatibility definitions... */
+#ifndef GL_MAP_READ_BIT
+#define GL_MAP_READ_BIT 0x0001
+#endif
+#ifndef GL_MAP_WRITE_BIT
+#define GL_MAP_WRITE_BIT 0x0002
+#endif
+#ifndef GL_COPY_READ_BUFFER
+#define GL_COPY_READ_BUFFER 0x8F36
+#endif
+#ifndef GL_COPY_WRITE_BUFFER
+#define GL_COPY_WRITE_BUFFER 0x8F37
+#endif
+
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BASE_BUFFER);
+#define GST_CAT_DEFUALT GST_CAT_GL_BASE_BUFFER
+
+static GstAllocator *_gl_base_buffer_allocator;
+
+GQuark
+gst_gl_base_buffer_error_quark (void)
+{
+  return g_quark_from_static_string ("gst-gl-base-buffer-error-quark");
+}
+
+static gboolean
+_default_create (GstGLBaseBuffer * mem, GError ** error)
+{
+  g_set_error (error, GST_GL_BASE_BUFFER_ERROR, GST_GL_BASE_BUFFER_ERROR_FAILED,
+      "subclass should define create() vfunc");
+
+  g_critical ("subclass should override "
+      "GstGLBaseBufferAllocatorClass::create() function");
+
+  return FALSE;
+}
+
+struct create_data
+{
+  GstGLBaseBuffer *mem;
+  gboolean result;
+};
+
+static void
+_mem_create_gl (GstGLContext * context, struct create_data *transfer)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  GError *error = NULL;
+
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS (transfer->mem->mem.allocator);
+
+  g_return_if_fail (alloc_class->create != NULL);
+
+  if ((transfer->result = alloc_class->create (transfer->mem, &error)))
+    return;
+
+  g_assert (error != NULL);
+
+  GST_CAT_ERROR (GST_CAT_GL_BASE_BUFFER, "Failed to create GL buffer: %s",
+      error->message);
+  g_clear_error (&error);
+}
+
+void
+gst_gl_base_buffer_init (GstGLBaseBuffer * mem, GstAllocator * allocator,
+    GstMemory * parent, GstGLContext * context, GstAllocationParams * params,
+    gsize size)
+{
+  gsize align = gst_memory_alignment, offset = 0, maxsize = size;
+  GstMemoryFlags flags = 0;
+  struct create_data data;
+
+  if (params) {
+    flags = params->flags;
+    align |= params->align;
+    offset = params->prefix;
+    maxsize += params->prefix + params->padding + align;
+  }
+
+  gst_memory_init (GST_MEMORY_CAST (mem), flags, allocator, parent, maxsize,
+      align, offset, size);
+
+  mem->context = gst_object_ref (context);
+  mem->data = NULL;
+  mem->alloc_data = NULL;
+
+  g_mutex_init (&mem->lock);
+
+  data.mem = mem;
+
+  gst_gl_context_thread_add (context,
+      (GstGLContextThreadFunc) _mem_create_gl, &data);
+  if (!data.result) {
+    GST_CAT_ERROR (GST_CAT_GL_BASE_BUFFER,
+        "Could not create GL buffer with context:%p", context);
+  }
+
+  GST_CAT_DEBUG (GST_CAT_GL_BASE_BUFFER, "new GL buffer memory:%p size:%"
+      G_GSIZE_FORMAT, mem, maxsize);
+}
+
+static gpointer
+_align_data (gpointer data, gsize align, gsize * maxsize)
+{
+  guint8 *ret = data;
+  gsize aoffset;
+
+  /* do alignment */
+  if ((aoffset = ((guintptr) ret & align))) {
+    aoffset = (align + 1) - aoffset;
+    ret += aoffset;
+    *maxsize -= aoffset;
+  }
+
+  return ret;
+}
+
+/* subclass usage only */
+GstGLBaseBuffer *
+gst_gl_base_buffer_alloc_data (GstGLBaseBuffer * gl_mem)
+{
+  GstMemory *mem = (GstMemory *) gl_mem;
+
+  if (gl_mem->data)
+    return gl_mem;
+
+  GST_CAT_LOG (GST_CAT_GL_BASE_BUFFER, "%p attempting allocation of data "
+      "pointer of size %" G_GSIZE_FORMAT, gl_mem, mem->maxsize);
+  gl_mem->alloc_data = g_try_malloc (mem->maxsize);
+
+  if (gl_mem->alloc_data == NULL) {
+    gst_memory_unref (mem);
+    return NULL;
+  }
+
+  gl_mem->data = _align_data (gl_mem->alloc_data, mem->align, &mem->maxsize);
+
+  GST_CAT_DEBUG (GST_CAT_GL_BASE_BUFFER, "%p allocated data pointer alloc %p, "
+      "data %p", gl_mem, gl_mem->alloc_data, gl_mem->data);
+
+  return gl_mem;
+}
+
+/* XXX: add as API? */
+static gpointer
+gst_gl_base_buffer_cpu_access (GstGLBaseBuffer * mem,
+    GstMapInfo * info, gsize size)
+{
+  const GstGLFuncs *gl = mem->context->gl_vtable;
+  gpointer data, ret;
+
+  gst_gl_base_buffer_alloc_data (mem);
+  ret = mem->data;
+
+  GST_CAT_LOG (GST_CAT_GL_BASE_BUFFER, "mapping id %d size %" G_GSIZE_FORMAT,
+      mem->id, size);
+
+  /* The extra data pointer indirection/memcpy is needed for coherent across
+   * concurrent map()'s in both GL and CPU */
+  if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD)
+      && (info->flags & GST_MAP_GL) == 0 && (info->flags & GST_MAP_READ) != 0) {
+    gl->BindBuffer (mem->target, mem->id);
+
+    if (gl->MapBufferRange) {
+      /* FIXME: optionally remove this with a flag and return the
+       * glMapBufferRange pointer (requires
+       * GL_ARB_buffer_storage/GL4/GL_COHERENT_BIT) */
+      guint gl_map_flags = GL_MAP_READ_BIT;
+
+      data = gl->MapBufferRange (mem->target, 0, size, gl_map_flags);
+
+      if (data)
+        memcpy (mem->data, data, size);
+
+      gl->UnmapBuffer (mem->target);
+      ret = mem->data;
+    } else if (gl->GetBufferSubData) {
+      gl->GetBufferSubData (mem->target, 0, size, mem->data);
+      ret = mem->data;
+    } else {
+      ret = NULL;
+    }
+    gl->BindBuffer (mem->target, 0);
+  }
+
+  return ret;
+}
+
+/* XXX: add as API? */
+static void
+gst_gl_base_buffer_upload_cpu_write (GstGLBaseBuffer * mem, GstMapInfo * info,
+    gsize size)
+{
+  const GstGLFuncs *gl = mem->context->gl_vtable;
+  gpointer data;
+
+  if (!mem->data)
+    /* no data pointer has been written */
+    return;
+
+  /* The extra data pointer indirection/memcpy is needed for coherent across
+   * concurrent map()'s in both GL and CPU */
+  /* FIXME: uploading potentially half-written data for libav pushing READWRITE
+   * mapped buffers */
+  if (GST_MEMORY_FLAG_IS_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD)
+      || (mem->map_flags & GST_MAP_WRITE) != 0) {
+    gl->BindBuffer (mem->target, mem->id);
+
+    if (gl->MapBufferRange) {
+      /* FIXME: optionally remove this with a flag and return the
+       * glMapBufferRange pointer (requires
+       * GL_ARB_buffer_storage/GL4/GL_COHERENT_BIT) */
+      guint gl_map_flags = GL_MAP_WRITE_BIT;
+
+      data = gl->MapBufferRange (mem->target, 0, size, gl_map_flags);
+
+      if (data)
+        memcpy (data, mem->data, size);
+
+      gl->UnmapBuffer (mem->target);
+    } else if (gl->BufferSubData) {
+      gl->BufferSubData (mem->target, 0, size, mem->data);
+    }
+    gl->BindBuffer (mem->target, 0);
+  }
+}
+
+static gpointer
+_default_map_buffer (GstGLBaseBuffer * mem, GstMapInfo * info, gsize size)
+{
+  if ((info->flags & GST_MAP_GL) != 0) {
+    if (info->flags & GST_MAP_READ) {
+      gst_gl_base_buffer_upload_cpu_write (mem, info, size);
+    }
+    return &mem->id;
+  } else {
+    return gst_gl_base_buffer_cpu_access (mem, info, size);
+  }
+
+  return NULL;
+}
+
+struct map_data
+{
+  GstGLBaseBuffer *mem;
+  GstMapInfo *info;
+  gsize size;
+  gpointer data;
+};
+
+static void
+_map_data_gl (GstGLContext * context, struct map_data *transfer)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  GstGLBaseBuffer *mem = transfer->mem;
+  GstMapInfo *info = transfer->info;
+
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS (transfer->mem->mem.allocator);
+
+  g_return_if_fail (alloc_class->map_buffer != NULL);
+
+  g_mutex_lock (&mem->lock);
+
+  GST_CAT_LOG (GST_CAT_GL_BASE_BUFFER, "mapping mem %p id %d flags %04x", mem,
+      mem->id, info->flags);
+
+  /* FIXME: validate map flags based on the memory domain */
+  if (mem->map_count++ == 0)
+    mem->map_flags = info->flags;
+  else {
+    /* assert that the flags are a subset of the first map flags */
+    g_assert ((((GST_MAP_GL - 1) & info->flags) & mem->map_flags) != 0);
+    GST_CAT_LOG (GST_CAT_GL_BASE_BUFFER, "multiple map no %d flags %04x "
+        "all flags %04x", mem->map_count, info->flags, mem->map_flags);
+  }
+
+  if ((info->flags & GST_MAP_GL) != (mem->map_flags & GST_MAP_GL))
+    mem->map_flags |= GST_MAP_GL;
+
+  if (info->flags & GST_MAP_GL)
+    mem->gl_map_count++;
+
+  transfer->data = alloc_class->map_buffer (transfer->mem, transfer->info,
+      transfer->size);
+
+  if (transfer->data) {
+    if (info->flags & GST_MAP_GL) {
+      if (info->flags & GST_MAP_WRITE)
+        GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+      GST_MEMORY_FLAG_UNSET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
+    } else {
+      if (info->flags & GST_MAP_WRITE)
+        GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
+      GST_MEMORY_FLAG_UNSET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+    }
+  }
+
+  g_mutex_unlock (&mem->lock);
+}
+
+static gpointer
+_mem_map_full (GstGLBaseBuffer * mem, GstMapInfo * info, gsize size)
+{
+  struct map_data transfer;
+
+  transfer.mem = mem;
+  transfer.info = info;
+  transfer.size = size;
+  transfer.data = NULL;
+
+  gst_gl_context_thread_add (mem->context,
+      (GstGLContextThreadFunc) _map_data_gl, &transfer);
+
+  return transfer.data;
+}
+
+static void
+_default_unmap_buffer (GstGLBaseBuffer * mem, GstMapInfo * info)
+{
+  /* XXX: optimistically transfer data */
+}
+
+struct unmap_data
+{
+  GstGLBaseBuffer *mem;
+  GstMapInfo *info;
+};
+
+static void
+_unmap_data_gl (GstGLContext * context, struct unmap_data *transfer)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  GstGLBaseBuffer *mem = transfer->mem;
+  GstMapInfo *info = transfer->info;
+
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS (transfer->mem->mem.allocator);
+
+  g_return_if_fail (alloc_class->unmap_buffer != NULL);
+
+  g_mutex_lock (&mem->lock);
+
+  GST_CAT_LOG (GST_CAT_GL_BASE_BUFFER, "unmapping mem %p id %d flags %04x", mem,
+      mem->id, info->flags);
+
+  alloc_class->unmap_buffer (transfer->mem, transfer->info);
+
+  if (info->flags & GST_MAP_GL && --mem->gl_map_count)
+    /* unset the gl flag */
+    mem->map_flags &= ~GST_MAP_GL;
+
+  if (--mem->map_count <= 0) {
+    mem->map_flags = 0;
+  }
+
+  if (info->flags & GST_MAP_GL) {
+    if (info->flags & GST_MAP_WRITE)
+      GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+  } else {
+    if (info->flags & GST_MAP_WRITE)
+      GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
+  }
+
+  g_mutex_unlock (&mem->lock);
+}
+
+static void
+_mem_unmap_full (GstGLBaseBuffer * mem, GstMapInfo * info)
+{
+  struct unmap_data transfer;
+
+  transfer.mem = mem;
+  transfer.info = info;
+
+  gst_gl_context_thread_add (mem->context,
+      (GstGLContextThreadFunc) _unmap_data_gl, &transfer);
+}
+
+gboolean
+gst_gl_base_buffer_copy_buffer_sub_data (GstGLBaseBuffer * src,
+    GstGLBaseBuffer * dest, gssize offset, gssize size)
+{
+  const GstGLFuncs *gl = src->context->gl_vtable;
+  GstMapInfo sinfo, dinfo;
+
+  if (!gl->CopyBufferSubData)
+    /* This is GL(ES) 3.0+ only */
+    return FALSE;
+
+  if (!gst_memory_map ((GstMemory *) src, &sinfo, GST_MAP_READ | GST_MAP_GL)) {
+    GST_CAT_WARNING (GST_CAT_GL_BASE_BUFFER,
+        "failed to read map source memory %p", src);
+    return FALSE;
+  }
+
+  if (!gst_memory_map ((GstMemory *) dest, &dinfo, GST_MAP_WRITE | GST_MAP_GL)) {
+    GST_CAT_WARNING (GST_CAT_GL_BASE_BUFFER,
+        "failed to write map destination memory %p", dest);
+    gst_memory_unmap ((GstMemory *) src, &sinfo);
+    return FALSE;
+  }
+
+  gl->BindBuffer (GL_COPY_READ_BUFFER, src->id);
+  gl->BindBuffer (GL_COPY_WRITE_BUFFER, dest->id);
+  gl->CopyBufferSubData (GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
+      offset, 0, size);
+
+  gst_memory_unmap ((GstMemory *) src, &sinfo);
+  gst_memory_unmap ((GstMemory *) dest, &dinfo);
+
+  return TRUE;
+}
+
+gboolean
+gst_gl_base_buffer_memcpy (GstGLBaseBuffer * src, GstGLBaseBuffer * dest,
+    gssize offset, gssize size)
+{
+  GstMapInfo sinfo, dinfo;
+
+  if (!gst_memory_map ((GstMemory *) src, &sinfo, GST_MAP_READ)) {
+    GST_CAT_WARNING (GST_CAT_GL_BASE_BUFFER,
+        "could not read map source memory %p", src);
+    return FALSE;
+  }
+
+  if (!gst_memory_map ((GstMemory *) dest, &dinfo, GST_MAP_WRITE)) {
+    GST_CAT_WARNING (GST_CAT_GL_BASE_BUFFER,
+        "could not write map dest memory %p", dest);
+    gst_memory_unmap ((GstMemory *) src, &sinfo);
+    return FALSE;
+  }
+
+  GST_CAT_DEBUG (GST_CAT_GL_BASE_BUFFER,
+      "memcpy %" G_GSSIZE_FORMAT " memory %p -> %p", size, src, dest);
+  memcpy (dinfo.data, sinfo.data + offset, size);
+  gst_memory_unmap ((GstMemory *) dest, &dinfo);
+  gst_memory_unmap ((GstMemory *) src, &sinfo);
+
+  return TRUE;
+}
+
+static GstGLBaseBuffer *
+_default_copy (GstGLBaseBuffer * src, gssize offset, gssize size)
+{
+  return NULL;
+}
+
+struct copy_params
+{
+  GstGLBaseBuffer *src;
+  GstGLBaseBuffer *dest;
+  gssize offset;
+  gssize size;
+  gboolean result;
+};
+
+static void
+_mem_copy_gl (GstGLContext * context, struct copy_params *transfer)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS (transfer->src->mem.allocator);
+
+  g_return_if_fail (alloc_class->copy != NULL);
+
+  transfer->dest =
+      alloc_class->copy (transfer->src, transfer->offset, transfer->size);
+}
+
+static GstMemory *
+_mem_copy (GstGLBaseBuffer * src, gssize offset, gssize size)
+{
+  struct copy_params transfer;
+
+  transfer.dest = NULL;
+  transfer.src = src;
+  transfer.offset = offset;
+  transfer.size = size;
+  if (size == -1 || size > 0)
+    gst_gl_context_thread_add (src->context,
+        (GstGLContextThreadFunc) _mem_copy_gl, &transfer);
+
+  return (GstMemory *) transfer.dest;
+}
+
+static GstMemory *
+_mem_share (GstGLBaseBuffer * mem, gssize offset, gssize size)
+{
+  return NULL;
+}
+
+static gboolean
+_mem_is_span (GstGLBaseBuffer * mem1, GstGLBaseBuffer * mem2, gsize * offset)
+{
+  return FALSE;
+}
+
+static GstMemory *
+_mem_alloc (GstAllocator * allocator, gsize size, GstAllocationParams * params)
+{
+  g_critical ("Subclass should override GstAllocatorClass::alloc() function");
+
+  return NULL;
+}
+
+static void
+_default_destroy (GstGLBaseBuffer * mem)
+{
+}
+
+static void
+_destroy_gl_objects (GstGLContext * context, GstGLBaseBuffer * mem)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+
+  alloc_class = GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS (mem->mem.allocator);
+
+  g_return_if_fail (alloc_class->destroy != NULL);
+
+  alloc_class->destroy (mem);
+}
+
+static void
+_mem_free (GstAllocator * allocator, GstMemory * memory)
+{
+  GstGLBaseBuffer *mem = (GstGLBaseBuffer *) memory;
+
+  GST_CAT_TRACE (GST_CAT_GL_BASE_BUFFER, "freeing buffer memory:%p id:%u", mem,
+      mem->id);
+
+  gst_gl_context_thread_add (mem->context,
+      (GstGLContextThreadFunc) _destroy_gl_objects, mem);
+
+  g_mutex_clear (&mem->lock);
+
+  if (mem->alloc_data) {
+    g_free (mem->alloc_data);
+    mem->alloc_data = NULL;
+  }
+  mem->data = NULL;
+
+  gst_object_unref (mem->context);
+}
+
+G_DEFINE_TYPE (GstGLBaseBufferAllocator, gst_gl_base_buffer_allocator,
+    GST_TYPE_ALLOCATOR);
+
+static void
+gst_gl_base_buffer_allocator_class_init (GstGLBaseBufferAllocatorClass * klass)
+{
+  GstAllocatorClass *allocator_class = (GstAllocatorClass *) klass;
+
+  allocator_class->alloc = _mem_alloc;
+  allocator_class->free = _mem_free;
+
+  klass->create = _default_create;
+  klass->map_buffer = _default_map_buffer;
+  klass->unmap_buffer = _default_unmap_buffer;
+  klass->copy = _default_copy;
+  klass->destroy = _default_destroy;
+}
+
+static void
+gst_gl_base_buffer_allocator_init (GstGLBaseBufferAllocator * allocator)
+{
+  GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
+
+  alloc->mem_type = GST_GL_MEMORY_ALLOCATOR;
+  alloc->mem_map_full = (GstMemoryMapFullFunction) _mem_map_full;
+  alloc->mem_unmap_full = (GstMemoryUnmapFullFunction) _mem_unmap_full;
+  alloc->mem_copy = (GstMemoryCopyFunction) _mem_copy;
+  alloc->mem_share = (GstMemoryShareFunction) _mem_share;
+  alloc->mem_is_span = (GstMemoryIsSpanFunction) _mem_is_span;
+}
+
+/**
+ * gst_gl_base_buffer_init_once:
+ *
+ * Initializes the GL Buffer allocator. It is safe to call this function
+ * multiple times.  This must be called before any other GstGLBaseBuffer operation.
+ */
+void
+gst_gl_base_buffer_init_once (void)
+{
+  static volatile gsize _init = 0;
+
+  if (g_once_init_enter (&_init)) {
+    GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_BASE_BUFFER, "glbuffer", 0,
+        "OpenGL Buffer");
+
+    _gl_base_buffer_allocator =
+        g_object_new (gst_gl_base_buffer_allocator_get_type (), NULL);
+
+    gst_allocator_register (GST_GL_BASE_BUFFER_ALLOCATOR_NAME,
+        gst_object_ref (_gl_base_buffer_allocator));
+    g_once_init_leave (&_init, 1);
+  }
+}
+
+/**
+ * gst_is_gl_base_buffer:
+ * @mem:a #GstMemory
+ * 
+ * Returns: whether the memory at @mem is a #GstGLBaseBuffer
+ */
+gboolean
+gst_is_gl_base_buffer (GstMemory * mem)
+{
+  return mem != NULL && mem->allocator != NULL &&
+      g_type_is_a (G_OBJECT_TYPE (mem->allocator),
+      GST_TYPE_GL_BASE_BUFFER_ALLOCATOR);
+}
diff --git a/gst-libs/gst/gl/gstglbasebuffer.h b/gst-libs/gst/gl/gstglbasebuffer.h
new file mode 100644
index 0000000..87c688d
--- /dev/null
+++ b/gst-libs/gst/gl/gstglbasebuffer.h
@@ -0,0 +1,164 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_BASE_BUFFER_H_
+#define _GST_GL_BASE_BUFFER_H_
+
+#include <gst/gst.h>
+#include <gst/gstallocator.h>
+#include <gst/gstmemory.h>
+
+#include <gst/gl/gstgl_fwd.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_GL_BASE_BUFFER_ALLOCATOR (gst_gl_base_buffer_allocator_get_type())
+GType gst_gl_base_buffer_allocator_get_type(void);
+
+#define GST_IS_GL_BASE_BUFFER_ALLOCATOR(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_ALLOCATOR))
+#define GST_IS_GL_BASE_BUFFER_ALLOCATOR_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_BASE_BUFFER_ALLOCATOR))
+#define GST_GL_BASE_BUFFER_ALLOCATOR_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_BASE_BUFFER_ALLOCATOR, GstGLBaseBufferAllocatorClass))
+#define GST_GL_BASE_BUFFER_ALLOCATOR(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_BASE_BUFFER_ALLOCATOR, GstGLBaseBufferAllocator))
+#define GST_GL_BASE_BUFFER_ALLOCATOR_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_BASE_BUFFER_ALLOCATOR, GstGLBaseBufferAllocatorClass))
+#define GST_GL_BASE_BUFFER_ALLOCATOR_CAST(obj)            ((GstGLBaseBufferAllocator *)(obj))
+
+GQuark gst_gl_base_buffer_error_quark (void);
+#define GST_GL_BASE_BUFFER_ERROR (gst_gl_base_buffer_error_quark ())
+
+typedef enum
+{
+  GST_GL_BASE_BUFFER_ERROR_FAILED,
+  GST_GL_BASE_BUFFER_ERROR_OLD_LIBS,
+  GST_GL_BASE_BUFFER_ERROR_RESOURCE_UNAVAILABLE,
+} GstGLBufferError;
+
+typedef enum
+{
+  GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD   = (GST_MEMORY_FLAG_LAST << 0),
+  GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD     = (GST_MEMORY_FLAG_LAST << 1)
+} GstGLBaseBufferFlags;
+
+/**
+ * GST_MAP_GL:
+ *
+ * Flag indicating that we should map the GL object instead of to system memory.
+ *
+ * Combining #GST_MAP_GL with #GST_MAP_WRITE has the same semantics as though
+ * you are writing to OpenGL. Conversely, combining #GST_MAP_GL with
+ * #GST_MAP_READ has the same semantics as though you are reading from OpenGL.
+ */
+#define GST_MAP_GL (GST_MAP_FLAG_LAST << 1)
+
+/**
+ * GstGLBaseBuffer:
+ * @mem: the parent object
+ * @context: the #GstGLContext to use for GL operations
+ * @id: the buffer id for this memory
+ * @target: the GL target of this texture for binding purposes
+ *
+ * Represents information about a GL buffer
+ */
+struct _GstGLBaseBuffer
+{
+  GstMemory             mem;
+
+  GstGLContext         *context;
+  guint                 id;
+  guint                 target;
+
+  /* <protected> */
+  GMutex                lock;
+
+  GstMapFlags           map_flags;       /* cumulative map flags */
+  gint                  map_count;
+  gint                  gl_map_count;
+
+  gpointer              data;
+  /* <private> */
+  gpointer              alloc_data;
+};
+
+typedef gboolean          (*GstGLBaseBufferAllocatorCreateFunction)      (GstGLBaseBuffer * buffer, GError ** error);
+typedef gpointer          (*GstGLBaseBufferAllocatorMapBufferFunction)   (GstGLBaseBuffer * buffer, GstMapInfo * info, gsize maxsize);
+typedef void              (*GstGLBaseBufferAllocatorUnmapBufferFunction) (GstGLBaseBuffer * buffer, GstMapInfo * info);
+typedef GstGLBaseBuffer * (*GstGLBaseBufferAllocatorCopyFunction)        (GstGLBaseBuffer * buffer, gssize offset, gssize size);
+typedef void              (*GstGLBaseBufferAllocatorDestroyFunction)     (GstGLBaseBuffer * buffer);
+
+/**
+ * GstGLBaseBufferAllocator
+ *
+ * Opaque #GstGLAllocator struct
+ */
+struct _GstGLBaseBufferAllocator
+{
+  GstAllocator parent;
+};
+
+/**
+ * GstGLBaseBufferAllocatorClass:
+ *
+ * The #GstGLBaseBufferAllocatorClass only contains private data
+ */
+struct _GstGLBaseBufferAllocatorClass
+{
+  GstAllocatorClass parent_class;
+
+  GstGLBaseBufferAllocatorCreateFunction      create;
+  GstGLBaseBufferAllocatorMapBufferFunction   map_buffer;
+  GstGLBaseBufferAllocatorUnmapBufferFunction unmap_buffer;
+  GstGLBaseBufferAllocatorCopyFunction        copy;
+  GstGLBaseBufferAllocatorDestroyFunction     destroy;
+};
+
+#include <gst/gl/gl.h>
+
+#define GST_CAPS_FEATURE_MEMORY_GL_BUFFER "memory:GLBuffer"
+
+/**
+ * GST_GL_BASE_BUFFER_ALLOCATOR_NAME:
+ *
+ * The name of the GL buffer allocator
+ */
+#define GST_GL_BASE_BUFFER_ALLOCATOR_NAME   "GLBuffer"
+
+void          gst_gl_base_buffer_init_once (void);
+gboolean      gst_is_gl_base_buffer        (GstMemory * mem);
+
+void          gst_gl_base_buffer_init      (GstGLBaseBuffer * mem,
+                                            GstAllocator * allocator,
+                                            GstMemory * parent,
+                                            GstGLContext * context,
+                                            GstAllocationParams * params,
+                                            gsize maxsize);
+
+GstGLBaseBuffer * gst_gl_base_buffer_alloc_data  (GstGLBaseBuffer * gl_mem);
+
+gboolean gst_gl_base_buffer_copy_buffer_sub_data (GstGLBaseBuffer * src,
+                                                  GstGLBaseBuffer * dest,
+                                                  gssize offset,
+                                                  gssize size);
+gboolean gst_gl_base_buffer_memcpy               (GstGLBaseBuffer * src,
+                                                  GstGLBaseBuffer * dest,
+                                                  gssize offset,
+                                                  gssize size);
+
+G_END_DECLS
+
+#endif /* _GST_GL_BUFFER_H_ */
diff --git a/gst-libs/gst/gl/gstglbasefilter.c b/gst-libs/gst/gl/gstglbasefilter.c
new file mode 100644
index 0000000..e7b2e23
--- /dev/null
+++ b/gst-libs/gst/gl/gstglbasefilter.c
@@ -0,0 +1,428 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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/video/gstvideometa.h>
+
+#include <gst/gl/gl.h>
+
+#define GST_CAT_DEFAULT gst_gl_base_filter_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+#define GST_GL_BASE_FILTER_GET_PRIVATE(o) \
+  (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_BASE_FILTER, GstGLBaseFilterPrivate))
+
+struct _GstGLBaseFilterPrivate
+{
+  GstGLContext *other_context;
+
+  gboolean gl_result;
+  gboolean gl_started;
+};
+
+/* Properties */
+enum
+{
+  PROP_0,
+  PROP_CONTEXT
+};
+
+#define gst_gl_base_filter_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstGLBaseFilter, gst_gl_base_filter,
+    GST_TYPE_BASE_TRANSFORM, GST_DEBUG_CATEGORY_INIT (gst_gl_base_filter_debug,
+        "glbasefilter", 0, "glbasefilter element");
+    );
+
+static void gst_gl_base_filter_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gl_base_filter_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static void gst_gl_base_filter_set_context (GstElement * element,
+    GstContext * context);
+static GstStateChangeReturn gst_gl_base_filter_change_state (GstElement *
+    element, GstStateChange transition);
+static gboolean gst_gl_base_filter_query (GstBaseTransform * trans,
+    GstPadDirection direction, GstQuery * query);
+static void gst_gl_base_filter_reset (GstGLBaseFilter * filter);
+static gboolean gst_gl_base_filter_start (GstBaseTransform * bt);
+static gboolean gst_gl_base_filter_stop (GstBaseTransform * bt);
+static gboolean gst_gl_base_filter_decide_allocation (GstBaseTransform * trans,
+    GstQuery * query);
+
+/* GstGLContextThreadFunc */
+static void gst_gl_base_filter_gl_start (GstGLContext * context, gpointer data);
+static void gst_gl_base_filter_gl_stop (GstGLContext * context, gpointer data);
+
+static void
+gst_gl_base_filter_class_init (GstGLBaseFilterClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  g_type_class_add_private (klass, sizeof (GstGLBaseFilterPrivate));
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->set_property = gst_gl_base_filter_set_property;
+  gobject_class->get_property = gst_gl_base_filter_get_property;
+
+  GST_BASE_TRANSFORM_CLASS (klass)->query = gst_gl_base_filter_query;
+  GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_base_filter_start;
+  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_base_filter_stop;
+  GST_BASE_TRANSFORM_CLASS (klass)->decide_allocation =
+      gst_gl_base_filter_decide_allocation;
+
+  element_class->set_context = gst_gl_base_filter_set_context;
+  element_class->change_state = gst_gl_base_filter_change_state;
+
+  g_object_class_install_property (gobject_class, PROP_CONTEXT,
+      g_param_spec_object ("context",
+          "OpenGL context",
+          "Get OpenGL context",
+          GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  klass->supported_gl_api = GST_GL_API_ANY;
+}
+
+static void
+gst_gl_base_filter_init (GstGLBaseFilter * filter)
+{
+  filter->priv = GST_GL_BASE_FILTER_GET_PRIVATE (filter);
+}
+
+static void
+gst_gl_base_filter_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;
+  }
+}
+
+static void
+gst_gl_base_filter_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (object);
+
+  switch (prop_id) {
+    case PROP_CONTEXT:
+      g_value_set_object (value, filter->context);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_base_filter_set_context (GstElement * element, GstContext * context)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (element);
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+
+  gst_gl_handle_set_context (element, context, &filter->display,
+      &filter->priv->other_context);
+  if (filter->display)
+    gst_gl_display_filter_gl_api (filter->display,
+        filter_class->supported_gl_api);
+}
+
+static gboolean
+_find_local_gl_context (GstGLBaseFilter * filter)
+{
+  GstQuery *query;
+  GstContext *context;
+  const GstStructure *s;
+
+  if (filter->context)
+    return TRUE;
+
+  query = gst_query_new_context ("gst.gl.local_context");
+  if (!filter->context
+      && gst_gl_run_query (GST_ELEMENT (filter), query, GST_PAD_SRC)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &filter->context,
+          NULL);
+    }
+  }
+  if (!filter->context
+      && gst_gl_run_query (GST_ELEMENT (filter), query, GST_PAD_SINK)) {
+    gst_query_parse_context (query, &context);
+    if (context) {
+      s = gst_context_get_structure (context);
+      gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &filter->context,
+          NULL);
+    }
+  }
+
+  GST_DEBUG_OBJECT (filter, "found local context %p", filter->context);
+
+  gst_query_unref (query);
+
+  if (filter->context)
+    return TRUE;
+
+  return FALSE;
+}
+
+static gboolean
+gst_gl_base_filter_query (GstBaseTransform * trans, GstPadDirection direction,
+    GstQuery * query)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (trans);
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ALLOCATION:
+    {
+      if (direction == GST_PAD_SINK
+          && gst_base_transform_is_passthrough (trans)) {
+        _find_local_gl_context (filter);
+
+        return gst_pad_peer_query (GST_BASE_TRANSFORM_SRC_PAD (trans), query);
+      }
+      break;
+    }
+    case GST_QUERY_CONTEXT:
+    {
+      const gchar *context_type;
+      GstContext *context, *old_context;
+      gboolean ret;
+
+      ret = gst_gl_handle_context_query ((GstElement *) filter, query,
+          &filter->display, &filter->priv->other_context);
+      if (filter->display)
+        gst_gl_display_filter_gl_api (filter->display,
+            filter_class->supported_gl_api);
+
+      gst_query_parse_context_type (query, &context_type);
+
+      if (g_strcmp0 (context_type, "gst.gl.local_context") == 0) {
+        GstStructure *s;
+
+        gst_query_parse_context (query, &old_context);
+
+        if (old_context)
+          context = gst_context_copy (old_context);
+        else
+          context = gst_context_new ("gst.gl.local_context", FALSE);
+
+        s = gst_context_writable_structure (context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, filter->context,
+            NULL);
+        gst_query_set_context (query, context);
+        gst_context_unref (context);
+
+        ret = filter->context != NULL;
+      }
+      GST_LOG_OBJECT (filter, "context query of type %s %i", context_type, ret);
+
+      if (ret)
+        return ret;
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction,
+      query);
+}
+
+static void
+gst_gl_base_filter_reset (GstGLBaseFilter * filter)
+{
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+
+  if (filter->context) {
+    if (filter_class->gl_stop != NULL) {
+      gst_gl_context_thread_add (filter->context, gst_gl_base_filter_gl_stop,
+          filter);
+    }
+
+    gst_object_unref (filter->context);
+    filter->context = NULL;
+  }
+}
+
+static gboolean
+gst_gl_base_filter_start (GstBaseTransform * bt)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_gl_base_filter_stop (GstBaseTransform * bt)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (bt);
+
+  gst_gl_base_filter_reset (filter);
+
+  return TRUE;
+}
+
+static void
+gst_gl_base_filter_gl_start (GstGLContext * context, gpointer data)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (data);
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+
+  if (filter_class->gl_start) {
+    filter->priv->gl_result = filter_class->gl_start (filter);
+  } else {
+    filter->priv->gl_result = TRUE;
+  }
+
+  filter->priv->gl_started |= filter->priv->gl_result;
+}
+
+static void
+gst_gl_base_filter_gl_stop (GstGLContext * context, gpointer data)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (data);
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+
+  if (filter->priv->gl_started) {
+    if (filter_class->gl_stop)
+      filter_class->gl_stop (filter);
+  }
+
+  filter->priv->gl_started = FALSE;
+}
+
+static gboolean
+gst_gl_base_filter_decide_allocation (GstBaseTransform * trans,
+    GstQuery * query)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (trans);
+  GError *error = NULL;
+  gboolean new_context = FALSE;
+
+  if (!filter->context)
+    new_context = TRUE;
+
+  _find_local_gl_context (filter);
+
+  if (!filter->context) {
+    GST_OBJECT_LOCK (filter->display);
+    do {
+      if (filter->context)
+        gst_object_unref (filter->context);
+      /* just get a GL context.  we don't care */
+      filter->context =
+          gst_gl_display_get_gl_context_for_thread (filter->display, NULL);
+      if (!filter->context) {
+        if (!gst_gl_display_create_context (filter->display,
+                filter->priv->other_context, &filter->context, &error)) {
+          GST_OBJECT_UNLOCK (filter->display);
+          goto context_error;
+        }
+      }
+    } while (!gst_gl_display_add_context (filter->display, filter->context));
+    GST_OBJECT_UNLOCK (filter->display);
+  }
+
+  if (new_context) {
+    if (filter->priv->gl_started)
+      gst_gl_context_thread_add (filter->context, gst_gl_base_filter_gl_stop,
+          filter);
+
+    gst_gl_context_thread_add (filter->context, gst_gl_base_filter_gl_start,
+        filter);
+
+    if (!filter->priv->gl_result)
+      goto error;
+  }
+
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->decide_allocation (trans,
+      query);
+
+context_error:
+  {
+    GST_ELEMENT_ERROR (trans, RESOURCE, NOT_FOUND, ("%s", error->message),
+        (NULL));
+    g_clear_error (&error);
+    return FALSE;
+  }
+error:
+  {
+    GST_ELEMENT_ERROR (trans, LIBRARY, INIT,
+        ("Subclass failed to initialize."), (NULL));
+    return FALSE;
+  }
+}
+
+static GstStateChangeReturn
+gst_gl_base_filter_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstGLBaseFilter *filter = GST_GL_BASE_FILTER (element);
+  GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  GST_DEBUG_OBJECT (filter, "changing state: %s => %s",
+      gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+      gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_gl_ensure_element_data (element, &filter->display,
+              &filter->priv->other_context))
+        return GST_STATE_CHANGE_FAILURE;
+
+      gst_gl_display_filter_gl_api (filter->display,
+          filter_class->supported_gl_api);
+      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_READY_TO_NULL:
+      if (filter->priv->other_context) {
+        gst_object_unref (filter->priv->other_context);
+        filter->priv->other_context = NULL;
+      }
+
+      if (filter->display) {
+        gst_object_unref (filter->display);
+        filter->display = NULL;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/gst-libs/gst/gl/gstglbasefilter.h b/gst-libs/gst/gl/gstglbasefilter.h
new file mode 100644
index 0000000..5ed3980
--- /dev/null
+++ b/gst-libs/gst/gl/gstglbasefilter.h
@@ -0,0 +1,83 @@
+/*
+ * GStreamer
+ * Copyright (C) 2007 David Schleef <ds@schleef.org>
+ * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GST_GL_BASE_FILTER_H_
+#define _GST_GL_BASE_FILTER_H_
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/video/video.h>
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_base_filter_get_type(void);
+#define GST_TYPE_GL_BASE_FILTER            (gst_gl_base_filter_get_type())
+#define GST_GL_BASE_FILTER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_FILTER,GstGLBaseFilter))
+#define GST_IS_GL_BASE_FILTER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BASE_FILTER))
+#define GST_GL_BASE_FILTER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_BASE_FILTER,GstGLBaseFilterClass))
+#define GST_IS_GL_BASE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_BASE_FILTER))
+#define GST_GL_BASE_FILTER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_BASE_FILTER,GstGLBaseFilterClass))
+
+/**
+ * GstGLBaseFilter:
+ * @base_transform: parent #GstBaseTransform
+ * @display: the currently configured #GstGLDisplay
+ * @context: the currently configured #GstGLContext
+ *
+ * #GstGLBaseFilter is a base class that provides the logic of getting the
+ * GL context from the pipeline.
+ */
+struct _GstGLBaseFilter
+{
+  GstBaseTransform   parent;
+
+  GstGLDisplay      *display;
+  GstGLContext      *context;
+
+  /* <private> */
+  gpointer _padding[GST_PADDING];
+
+  GstGLBaseFilterPrivate *priv;
+};
+
+/**
+ * GstGLBaseFilterClass:
+ * @base_transform_class: parent class
+ * @gl_start: called in the GL thread to setup the element GL state.
+ * @gl_stop: called in the GL thread to setup the element GL state.
+ */
+struct _GstGLBaseFilterClass
+{
+  GstBaseTransformClass parent_class;
+  GstGLAPI supported_gl_api;
+
+  gboolean (*gl_start)          (GstGLBaseFilter *filter);
+  void     (*gl_stop)           (GstGLBaseFilter *filter);
+
+  gpointer _padding[GST_PADDING];
+};
+
+G_END_DECLS
+
+#endif /* _GST_GL_BASE_FILTER_H_ */
diff --git a/gst-libs/gst/gl/gstglbufferpool.c b/gst-libs/gst/gl/gstglbufferpool.c
index e716527..69ac2d8 100644
--- a/gst-libs/gst/gl/gstglbufferpool.c
+++ b/gst-libs/gst/gl/gstglbufferpool.c
@@ -24,6 +24,7 @@
 
 #include "gl.h"
 #include "gstglbufferpool.h"
+#include "gstglutils.h"
 
 #if GST_GL_HAVE_PLATFORM_EGL
 #include <gst/gl/egl/gsteglimagememory.h>
@@ -50,7 +51,10 @@
   GstCaps *caps;
   gint im_format;
   GstVideoInfo info;
+  GstVideoAlignment valign;
   gboolean add_videometa;
+  gboolean add_uploadmeta;
+  gboolean add_glsyncmeta;
   gboolean want_eglimage;
   GstBuffer *last_buffer;
 };
@@ -71,7 +75,11 @@
 static const gchar **
 gst_gl_buffer_pool_get_options (GstBufferPool * pool)
 {
-  static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META, NULL
+  static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META,
+    GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META,
+    GST_BUFFER_POOL_OPTION_GL_SYNC_META,
+    GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT,
+    NULL
   };
 
   return options;
@@ -83,12 +91,16 @@
   GstGLBufferPool *glpool = GST_GL_BUFFER_POOL_CAST (pool);
   GstGLBufferPoolPrivate *priv = glpool->priv;
   GstVideoInfo info;
-  GstCaps *caps;
-  GstAllocator *allocator;
+  GstCaps *caps = NULL;
+  guint min_buffers, max_buffers;
+  guint max_align, n;
+  GstAllocator *allocator = NULL;
   GstAllocationParams alloc_params;
   gboolean reset = TRUE;
+  gint p;
 
-  if (!gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL))
+  if (!gst_buffer_pool_config_get_params (config, &caps, NULL, &min_buffers,
+          &max_buffers))
     goto wrong_config;
 
   if (caps == NULL)
@@ -104,11 +116,16 @@
   if (!gst_buffer_pool_config_get_allocator (config, &allocator, &alloc_params))
     goto wrong_config;
 
+  if (priv->allocator)
+    gst_object_unref (priv->allocator);
+
   if (!allocator) {
     gst_gl_memory_init ();
-    allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+    priv->allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+  } else {
+    priv->allocator = gst_object_ref (allocator);
   }
-  priv->allocator = allocator;
+
   priv->params = alloc_params;
 
   priv->im_format = GST_VIDEO_INFO_FORMAT (&info);
@@ -123,14 +140,51 @@
 
   priv->add_videometa = gst_buffer_pool_config_has_option (config,
       GST_BUFFER_POOL_OPTION_VIDEO_META);
+  priv->add_uploadmeta = gst_buffer_pool_config_has_option (config,
+      GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META);
+  priv->add_glsyncmeta = gst_buffer_pool_config_has_option (config,
+      GST_BUFFER_POOL_OPTION_GL_SYNC_META);
 
 #if GST_GL_HAVE_PLATFORM_EGL
-  priv->want_eglimage = (priv->allocator
-      && g_strcmp0 (priv->allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0);
+  g_assert (priv->allocator != NULL);
+  priv->want_eglimage =
+      (g_strcmp0 (priv->allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0);
 #else
   priv->want_eglimage = FALSE;
 #endif
 
+  max_align = alloc_params.align;
+
+  if (gst_buffer_pool_config_has_option (config,
+          GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT)) {
+
+    priv->add_videometa = TRUE;
+
+    gst_buffer_pool_config_get_video_alignment (config, &priv->valign);
+
+    for (n = 0; n < GST_VIDEO_MAX_PLANES; ++n)
+      max_align |= priv->valign.stride_align[n];
+
+    for (n = 0; n < GST_VIDEO_MAX_PLANES; ++n)
+      priv->valign.stride_align[n] = max_align;
+
+    gst_video_info_align (&priv->info, &priv->valign);
+
+    gst_buffer_pool_config_set_video_alignment (config, &priv->valign);
+  } else {
+    gst_video_alignment_reset (&priv->valign);
+  }
+
+  if (alloc_params.align < max_align) {
+    GST_WARNING_OBJECT (pool, "allocation params alignment %u is smaller "
+        "than the max specified video stride alignment %u, fixing",
+        (guint) alloc_params.align, max_align);
+
+    alloc_params.align = max_align;
+    gst_buffer_pool_config_set_allocator (config, allocator, &alloc_params);
+    priv->params = alloc_params;
+  }
+
   if (reset) {
     if (glpool->upload)
       gst_object_unref (glpool->upload);
@@ -138,6 +192,17 @@
     glpool->upload = gst_gl_upload_meta_new (glpool->context);
   }
 
+  /* Recalulate the size and offset as we don't add padding between planes. */
+  priv->info.size = 0;
+  for (p = 0; p < GST_VIDEO_INFO_N_PLANES (&priv->info); p++) {
+    priv->info.offset[p] = priv->info.size;
+    priv->info.size +=
+        gst_gl_get_plane_data_size (&priv->info, &priv->valign, p);
+  }
+
+  gst_buffer_pool_config_set_params (config, caps, priv->info.size,
+      min_buffers, max_buffers);
+
   return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
 
   /* ERRORS */
@@ -188,9 +253,11 @@
   GstGLBufferPool *glpool = GST_GL_BUFFER_POOL_CAST (pool);
   GstGLBufferPoolPrivate *priv = glpool->priv;
   GstVideoInfo *info;
+  GstVideoAlignment *valign;
   GstBuffer *buf;
 
   info = &priv->info;
+  valign = &priv->valign;
 
   if (!(buf = gst_buffer_new ())) {
     goto no_buffer;
@@ -208,10 +275,15 @@
   }
 #endif
 
-  if (!gst_gl_memory_setup_buffer (glpool->context, info, buf))
+  if (!gst_gl_memory_setup_buffer (glpool->context, &priv->params, info,
+          valign, buf))
     goto mem_create_failed;
 
-  gst_gl_upload_meta_add_to_buffer (glpool->upload, buf);
+  if (priv->add_uploadmeta)
+    gst_gl_upload_meta_add_to_buffer (glpool->upload, buf);
+
+  if (priv->add_glsyncmeta)
+    gst_buffer_add_gl_sync_meta (glpool->context, buf);
 
   *buffer = buf;
 
@@ -274,7 +346,7 @@
 
 /**
  * gst_gl_buffer_pool_new:
- * @display: the #GstGLDisplay to use
+ * @context: the #GstGLContext to use
  *
  * Returns: a #GstBufferPool that allocates buffers with #GstGLMemory
  */
@@ -286,7 +358,8 @@
   pool = g_object_new (GST_TYPE_GL_BUFFER_POOL, NULL);
   pool->context = gst_object_ref (context);
 
-  GST_LOG_OBJECT (pool, "new GL buffer pool %p", pool);
+  GST_LOG_OBJECT (pool, "new GL buffer pool for context %" GST_PTR_FORMAT,
+      context);
 
   return GST_BUFFER_POOL_CAST (pool);
 }
@@ -338,6 +411,7 @@
   priv->caps = NULL;
   priv->im_format = GST_VIDEO_FORMAT_UNKNOWN;
   priv->add_videometa = TRUE;
+  priv->add_glsyncmeta = FALSE;
   priv->want_eglimage = FALSE;
   priv->last_buffer = FALSE;
 
@@ -368,4 +442,9 @@
     gst_object_unref (pool->context);
     pool->context = NULL;
   }
+
+  if (priv->allocator) {
+    gst_object_unref (priv->allocator);
+    priv->allocator = NULL;
+  }
 }
diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
index 2c76694..5915a39 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.c
+++ b/gst-libs/gst/gl/gstglcolorconvert.c
@@ -110,7 +110,7 @@
 static const gfloat from_rgb_bt709_vcoeff[] = { 0.440654, -0.400285, -0.040370 };
 
 
-/** GRAY16 to RGB conversion 
+/* GRAY16 to RGB conversion
  *  data transfered as GL_LUMINANCE_ALPHA then convert back to GRAY16 
  *  high byte weight as : 255*256/65535 
  *  ([0~1] denormalize to [0~255],shift to high byte,normalize to [0~1])
@@ -136,7 +136,24 @@
       " gl_FragColor = vec4(t.%c, t.%c, t.%c, t.%c);\n"
       "}";
 
-/** GRAY16 to RGB conversion 
+static const gchar frag_APPLE_YUV_TO_RGB[] =
+      "#ifdef GL_ES\n"
+      "precision mediump float;\n"
+      "#endif\n"
+      "varying vec2 v_texcoord;\n"
+      "uniform float width;\n"
+      "uniform float height;\n"
+      "uniform sampler2DRect tex;\n"
+      "uniform vec2 tex_scale0;\n"
+      "uniform vec2 tex_scale1;\n"
+      "uniform vec2 tex_scale2;\n"
+      "void main(void)\n"
+      "{\n"
+      " vec4 t = texture2DRect(tex, v_texcoord * vec2(width, height) * tex_scale0);\n"
+      " gl_FragColor = vec4(t.%c, t.%c, t.%c, t.%c);\n"
+      "}";
+
+/* GRAY16 to RGB conversion
  *  data transfered as GL_LUMINANCE_ALPHA then convert back to GRAY16 
  *  high byte weight as : 255*256/65535 
  *  ([0~1] denormalize to [0~255],shift to high byte,normalize to [0~1])
@@ -206,7 +223,7 @@
     "  gl_FragColor = vec4(a,y,u,v);\n"
     "}\n";
 
-/** YUV to RGB conversion */
+/* YUV to RGB conversion */
 static const char frag_PLANAR_YUV_to_RGB[] =
     "#ifdef GL_ES\n"
     "precision mediump float;\n"
@@ -278,7 +295,7 @@
     "  gl_FragData[2] = vec4(v, 0.0, 0.0, 1.0);\n"
     "}\n";
 
-/** NV12/NV21 to RGB conversion */
+/* NV12/NV21 to RGB conversion */
 static const char frag_NV12_NV21_to_RGB[] = {
       "#ifdef GL_ES\n"
       "precision mediump float;\n"
@@ -303,6 +320,35 @@
       "}"
 };
 
+/* RGB to NV12/NV21 conversion */
+/* NV12: u, v
+   NV21: v, u */
+static const char frag_RGB_to_NV12_NV21[] = {
+    "#ifdef GL_ES\n"
+    "precision mediump float;\n"
+    "#endif\n"
+    "varying vec2 v_texcoord;\n"
+    "uniform sampler2D tex;\n"
+    "uniform vec2 tex_scale0;\n"
+    "uniform vec2 tex_scale1;\n"
+    "uniform vec2 tex_scale2;\n"
+    RGB_TO_YUV_COEFFICIENTS
+    "void main(void) {\n"
+    "  float y, u, v;\n"
+    "  vec4 texel, uv_texel;\n"
+    "  texel = texture2D(tex, v_texcoord * tex_scale0).%c%c%c%c;\n"
+    "  uv_texel = texture2D(tex, v_texcoord * tex_scale0 * 2.0).%c%c%c%c;\n"
+    "  y = dot(texel.rgb, coeff1);\n"
+    "  u = dot(uv_texel.rgb, coeff2);\n"
+    "  v = dot(uv_texel.rgb, coeff3);\n"
+    "  y += offset.x;\n"
+    "  u += offset.y;\n"
+    "  v += offset.z;\n"
+    "  gl_FragData[0] = vec4(y, 0.0, 0.0, 1.0);\n"
+    "  gl_FragData[1] = vec4(%c, %c, 0.0, 1.0);\n"
+    "}"
+};
+
 /* YUY2:r,g,a
    UYVY:a,b,r */
 static const gchar frag_YUY2_UYVY_to_RGB[] =
@@ -392,6 +438,15 @@
     "   v_texcoord = a_texcoord;  \n"
     "}                            \n";
 
+static const GLfloat vertices[] = {
+     1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+    -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+    -1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
+     1.0f,  1.0f, 0.0f, 1.0f, 1.0f
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
 /* *INDENT-ON* */
 
 struct ConvertInfo
@@ -415,6 +470,12 @@
 
   GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
   GstGLMemory *out_tex[GST_VIDEO_MAX_PLANES];
+
+  GLuint vao;
+  GLuint vertex_buffer;
+  GLuint vbo_indices;
+  GLuint attr_position;
+  GLuint attr_texture;
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_gl_color_convert_debug);
@@ -466,6 +527,9 @@
   gst_video_info_set_format (&convert->out_info, GST_VIDEO_FORMAT_ENCODED, 0,
       0);
 
+  GST_DEBUG_OBJECT (convert,
+      "Created new colorconvert for context %" GST_PTR_FORMAT, context);
+
   return convert;
 }
 
@@ -487,6 +551,27 @@
 }
 
 static void
+_reset_gl (GstGLContext * context, GstGLColorConvert * convert)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  if (convert->priv->vao) {
+    gl->DeleteVertexArrays (1, &convert->priv->vao);
+    convert->priv->vao = 0;
+  }
+
+  if (convert->priv->vertex_buffer) {
+    gl->DeleteBuffers (1, &convert->priv->vertex_buffer);
+    convert->priv->vertex_buffer = 0;
+  }
+
+  if (convert->priv->vbo_indices) {
+    gl->DeleteBuffers (1, &convert->priv->vbo_indices);
+    convert->priv->vbo_indices = 0;
+  }
+}
+
+static void
 gst_gl_color_convert_reset (GstGLColorConvert * convert)
 {
   guint i;
@@ -511,49 +596,186 @@
     gst_object_unref (convert->shader);
     convert->shader = NULL;
   }
+
+  if (convert->context) {
+    gst_gl_context_thread_add (convert->context,
+        (GstGLContextThreadFunc) _reset_gl, convert);
+  }
 }
 
-static void
-_gst_gl_color_convert_set_format_unlocked (GstGLColorConvert * convert,
-    GstVideoInfo * in_info, GstVideoInfo * out_info)
+static gboolean
+_gst_gl_color_convert_can_passthrough (GstVideoInfo * in, GstVideoInfo * out)
 {
-  g_return_if_fail (convert != NULL);
-  g_return_if_fail (in_info);
-  g_return_if_fail (out_info);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
-      GST_VIDEO_FORMAT_UNKNOWN);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
-      GST_VIDEO_FORMAT_ENCODED);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (out_info) !=
-      GST_VIDEO_FORMAT_UNKNOWN);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (out_info) !=
-      GST_VIDEO_FORMAT_ENCODED);
+  gint i;
 
-  if (gst_video_info_is_equal (&convert->in_info, in_info) &&
-      gst_video_info_is_equal (&convert->out_info, out_info))
-    return;
+  if (GST_VIDEO_INFO_FORMAT (in) != GST_VIDEO_INFO_FORMAT (out))
+    return FALSE;
+  if (GST_VIDEO_INFO_WIDTH (in) != GST_VIDEO_INFO_WIDTH (out))
+    return FALSE;
+  if (GST_VIDEO_INFO_HEIGHT (in) != GST_VIDEO_INFO_HEIGHT (out))
+    return FALSE;
+  if (GST_VIDEO_INFO_SIZE (in) != GST_VIDEO_INFO_SIZE (out))
+    return FALSE;
+
+  for (i = 0; i < in->finfo->n_planes; i++) {
+    if (in->stride[i] != out->stride[i])
+      return FALSE;
+    if (in->offset[i] != out->offset[i])
+      return FALSE;
+  }
+
+  if (!gst_video_colorimetry_is_equal (&in->colorimetry, &out->colorimetry))
+    return FALSE;
+  if (in->chroma_site != out->chroma_site)
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+_gst_gl_color_convert_set_caps_unlocked (GstGLColorConvert * convert,
+    GstCaps * in_caps, GstCaps * out_caps)
+{
+  GstVideoInfo in_info, out_info;
+  GstCapsFeatures *in_features, *out_features;
+
+  g_return_val_if_fail (convert != NULL, FALSE);
+  g_return_val_if_fail (in_caps, FALSE);
+  g_return_val_if_fail (out_caps, FALSE);
+
+  GST_LOG_OBJECT (convert, "Setting caps in %" GST_PTR_FORMAT
+      " out %" GST_PTR_FORMAT, in_caps, out_caps);
+
+  if (!gst_video_info_from_caps (&in_info, in_caps))
+    g_assert_not_reached ();
+
+  if (!gst_video_info_from_caps (&out_info, out_caps))
+    g_assert_not_reached ();
+
+  g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&in_info) !=
+      GST_VIDEO_FORMAT_UNKNOWN, FALSE);
+  g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&in_info) !=
+      GST_VIDEO_FORMAT_ENCODED, FALSE);
+  g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&out_info) !=
+      GST_VIDEO_FORMAT_UNKNOWN, FALSE);
+  g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&out_info) !=
+      GST_VIDEO_FORMAT_ENCODED, FALSE);
+
+  in_features = gst_caps_get_features (in_caps, 0);
+  out_features = gst_caps_get_features (out_caps, 0);
+
+  if (!gst_caps_features_contains (in_features,
+          GST_CAPS_FEATURE_MEMORY_GL_MEMORY)
+      || !gst_caps_features_contains (out_features,
+          GST_CAPS_FEATURE_MEMORY_GL_MEMORY)) {
+    return FALSE;
+  }
+
+  if (gst_video_info_is_equal (&convert->in_info, &in_info) &&
+      gst_video_info_is_equal (&convert->out_info, &out_info))
+    return TRUE;
 
   gst_gl_color_convert_reset (convert);
-  convert->in_info = *in_info;
-  convert->out_info = *out_info;
+  convert->in_info = in_info;
+  convert->out_info = out_info;
   convert->initted = FALSE;
+
+  /* If input and output are identical, pass through directly */
+  convert->passthrough =
+      _gst_gl_color_convert_can_passthrough (&in_info, &out_info);
+#ifndef GST_DISABLE_GST_DEBUG
+  if (G_UNLIKELY (convert->passthrough))
+    GST_DEBUG_OBJECT (convert,
+        "Configuring passthrough mode for same in/out caps");
+  else {
+    GST_DEBUG_OBJECT (convert, "Color converting %" GST_PTR_FORMAT
+        " to %" GST_PTR_FORMAT, in_caps, out_caps);
+  }
+#endif
+
+  return TRUE;
 }
 
 /**
- * gst_gl_color_convert_set_format:
+ * gst_gl_color_convert_set_caps:
  * @convert: a #GstGLColorConvert
- * @in_info: input #GstVideoInfo
- * @out_info: output #GstVideoInfo
+ * @in_caps: input #GstCaps
+ * @out_caps: output #GstCaps
  *
  * Initializes @convert with the information required for conversion.
  */
-void
-gst_gl_color_convert_set_format (GstGLColorConvert * convert,
-    GstVideoInfo * in_info, GstVideoInfo * out_info)
+gboolean
+gst_gl_color_convert_set_caps (GstGLColorConvert * convert,
+    GstCaps * in_caps, GstCaps * out_caps)
 {
+  gboolean ret;
+
   GST_OBJECT_LOCK (convert);
-  _gst_gl_color_convert_set_format_unlocked (convert, in_info, out_info);
+  ret = _gst_gl_color_convert_set_caps_unlocked (convert, in_caps, out_caps);
   GST_OBJECT_UNLOCK (convert);
+
+  return ret;
+}
+
+/* copies the given caps */
+static GstCaps *
+gst_gl_color_convert_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);
+    gst_structure_remove_fields (st, "format", "colorimetry", "chroma-site",
+        NULL);
+
+    gst_caps_append_structure_full (res, st,
+        gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL));
+  }
+
+  return res;
+}
+
+GstCaps *
+gst_gl_color_convert_transform_caps (GstGLContext * convert,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  GstCaps *templ, *result;
+
+  templ =
+      gst_caps_from_string (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+      (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, GST_GL_COLOR_CONVERT_FORMATS));
+
+  caps = gst_gl_color_convert_caps_remove_format_info (caps);
+
+  result = gst_caps_intersect (caps, templ);
+  gst_caps_unref (caps);
+  gst_caps_unref (templ);
+
+  result = gst_gl_overlay_compositor_add_caps (result);
+
+  if (filter) {
+    GstCaps *tmp;
+
+    tmp = gst_caps_intersect_full (filter, result, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (result);
+    result = tmp;
+  }
+
+  return result;
 }
 
 /**
@@ -562,7 +784,7 @@
  * @inbuf: the texture ids for input formatted according to in_info
  *
  * Converts the data contained by @inbuf using the formats specified by the
- * #GstVideoInfo<!--  -->s passed to gst_gl_color_convert_set_format() 
+ * #GstVideoInfo<!--  -->s passed to gst_gl_color_convert_set_caps() 
  *
  * Returns: a converted #GstBuffer or %NULL%
  */
@@ -587,7 +809,7 @@
   g_return_val_if_fail (convert != NULL, FALSE);
   g_return_val_if_fail (inbuf, FALSE);
 
-  if (gst_video_info_is_equal (&convert->in_info, &convert->out_info))
+  if (G_UNLIKELY (convert->passthrough))
     return gst_buffer_ref (inbuf);
 
   convert->inbuf = inbuf;
@@ -597,7 +819,7 @@
 
   if (!convert->priv->result) {
     if (convert->outbuf)
-      gst_object_unref (convert->outbuf);
+      gst_buffer_unref (convert->outbuf);
     convert->outbuf = NULL;
     return NULL;
   }
@@ -642,13 +864,29 @@
 {
   GString *ret = g_string_sized_new (4);
   gchar *expect, *want;
+  gchar *orig_want;
   int len;
+  gboolean discard_output = TRUE;
 
-  if (g_ascii_strcasecmp (expected, wanted) == 0)
+  if (g_ascii_strcasecmp (expected, wanted) == 0) {
+    g_string_free (ret, TRUE);
     return g_ascii_strdown (expected, -1);
+  }
 
   expect = g_ascii_strdown (expected, -1);
-  want = g_ascii_strdown (wanted, -1);
+  orig_want = want = g_ascii_strdown (wanted, -1);
+
+  if (strcmp (expect, "rgb16") == 0 || strcmp (expect, "bgr16") == 0) {
+    gchar *temp = expect;
+    expect = g_strndup (temp, 3);
+    g_free (temp);
+  }
+
+  if (strcmp (want, "rgb16") == 0 || strcmp (want, "bgr16") == 0) {
+    gchar *temp = want;
+    orig_want = want = g_strndup (temp, 3);
+    g_free (temp);
+  }
 
   /* pad want with 'a's */
   if ((len = strlen (want)) < 4) {
@@ -658,7 +896,7 @@
       len++;
     }
     g_free (want);
-    want = new_want;
+    orig_want = want = new_want;
   }
 
   /* pad expect with 'a's */
@@ -683,7 +921,7 @@
 
     if (!(val = strchr (expect, needle))
         && needle == 'a' && !(val = strchr (expect, 'x')))
-      goto fail;
+      goto out;
 
     idx = (gint) (val - expect);
 
@@ -691,11 +929,12 @@
     want = &want[1];
   }
 
-  return g_string_free (ret, FALSE);
+  discard_output = FALSE;
+out:
+  g_free (orig_want);
+  g_free (expect);
 
-fail:
-  g_string_free (ret, TRUE);
-  return NULL;
+  return g_string_free (ret, discard_output);
 }
 
 static void
@@ -737,84 +976,111 @@
   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);
-#if GST_GL_HAVE_PLATFORM_EAGL
-  gboolean texture_rg = FALSE;
-#else
   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");
+      || gst_gl_context_check_gl_version (convert->context, GST_GL_API_GLES2, 3,
+      0)
+      || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg")
+      || gst_gl_context_check_gl_version (convert->context, GST_GL_API_OPENGL3,
+      3, 0);
+  gboolean apple_ycbcr = gst_gl_context_check_feature (convert->context,
+      "GL_APPLE_ycbcr_422");
+  gboolean in_tex_rectangular = FALSE;
+
+#if GST_GL_HAVE_OPENGL
+  GstMemory *memory = gst_buffer_peek_memory (convert->inbuf, 0);
+  if (gst_is_gl_memory (memory) && (USING_OPENGL (convert->context)
+          || USING_OPENGL3 (convert->context))) {
+    in_tex_rectangular =
+        ((GstGLMemory *) memory)->tex_target == GL_TEXTURE_RECTANGLE;
+  }
 #endif
 
   info->out_n_textures = 1;
 
-  switch (GST_VIDEO_INFO_FORMAT (&convert->in_info)) {
-    case GST_VIDEO_FORMAT_AYUV:
-      info->frag_prog = g_strdup_printf (frag_AYUV_to_RGB, pixel_order[0],
-          pixel_order[1], pixel_order[2], pixel_order[3]);
-      info->in_n_textures = 1;
-      info->shader_tex_names[0] = "tex";
-      break;
-    case GST_VIDEO_FORMAT_I420:
-    case GST_VIDEO_FORMAT_Y444:
-    case GST_VIDEO_FORMAT_Y42B:
-    case GST_VIDEO_FORMAT_Y41B:
-      info->frag_prog = g_strdup_printf (frag_PLANAR_YUV_to_RGB, pixel_order[0],
-          pixel_order[1], pixel_order[2], pixel_order[3]);
-      info->in_n_textures = 3;
-      info->shader_tex_names[0] = "Ytex";
-      info->shader_tex_names[1] = "Utex";
-      info->shader_tex_names[2] = "Vtex";
-      break;
-    case GST_VIDEO_FORMAT_YV12:
-      info->frag_prog = g_strdup_printf (frag_PLANAR_YUV_to_RGB, pixel_order[0],
-          pixel_order[1], pixel_order[2], pixel_order[3]);
-      info->in_n_textures = 3;
-      info->shader_tex_names[0] = "Ytex";
-      info->shader_tex_names[1] = "Vtex";
-      info->shader_tex_names[2] = "Utex";
-      break;
-    case GST_VIDEO_FORMAT_YUY2:
-    {
-      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";
-      break;
+  if (in_tex_rectangular && apple_ycbcr
+      && gst_buffer_n_memory (convert->inbuf) == 1) {
+    /* FIXME: We should probably also check if tex_target actually is using
+     * the Apple YCbCr422 extension. It could also be a normal UYVY texture
+     * with RB or Lum/Alpha
+     */
+    info->frag_prog =
+        g_strdup_printf (frag_APPLE_YUV_TO_RGB, pixel_order[0], pixel_order[1],
+        pixel_order[2], pixel_order[3]);
+    info->in_n_textures = 1;
+    info->shader_tex_names[0] = "tex";
+  } else {
+    switch (GST_VIDEO_INFO_FORMAT (&convert->in_info)) {
+      case GST_VIDEO_FORMAT_AYUV:
+        info->frag_prog = g_strdup_printf (frag_AYUV_to_RGB, pixel_order[0],
+            pixel_order[1], pixel_order[2], pixel_order[3]);
+        info->in_n_textures = 1;
+        info->shader_tex_names[0] = "tex";
+        break;
+      case GST_VIDEO_FORMAT_I420:
+      case GST_VIDEO_FORMAT_Y444:
+      case GST_VIDEO_FORMAT_Y42B:
+      case GST_VIDEO_FORMAT_Y41B:
+        info->frag_prog =
+            g_strdup_printf (frag_PLANAR_YUV_to_RGB, pixel_order[0],
+            pixel_order[1], pixel_order[2], pixel_order[3]);
+        info->in_n_textures = 3;
+        info->shader_tex_names[0] = "Ytex";
+        info->shader_tex_names[1] = "Utex";
+        info->shader_tex_names[2] = "Vtex";
+        break;
+      case GST_VIDEO_FORMAT_YV12:
+        info->frag_prog =
+            g_strdup_printf (frag_PLANAR_YUV_to_RGB, pixel_order[0],
+            pixel_order[1], pixel_order[2], pixel_order[3]);
+        info->in_n_textures = 3;
+        info->shader_tex_names[0] = "Ytex";
+        info->shader_tex_names[1] = "Vtex";
+        info->shader_tex_names[2] = "Utex";
+        break;
+      case GST_VIDEO_FORMAT_YUY2:
+      {
+        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";
+        break;
+      }
+      case GST_VIDEO_FORMAT_NV12:
+      {
+        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:
+      {
+        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:
+      {
+        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";
+        break;
+      }
+      default:
+        break;
     }
-    case GST_VIDEO_FORMAT_NV12:
-    {
-      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:
-    {
-      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:
-    {
-      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";
-      break;
-    }
-    default:
-      break;
   }
 
   if (gst_video_colorimetry_matches (&convert->in_info.colorimetry,
@@ -891,6 +1157,20 @@
           "u", "y", "v", "y");
       info->out_n_textures = 1;
       break;
+    case GST_VIDEO_FORMAT_NV12:
+      info->frag_prog = g_strdup_printf (frag_RGB_to_NV12_NV21,
+          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', 'v');
+      info->out_n_textures = 2;
+      break;
+    case GST_VIDEO_FORMAT_NV21:
+      info->frag_prog = g_strdup_printf (frag_RGB_to_NV12_NV21,
+          pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
+          pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
+          'v', 'u');
+      info->out_n_textures = 2;
+      break;
     default:
       break;
   }
@@ -948,13 +1228,13 @@
   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);
-#if GST_GL_HAVE_PLATFORM_EAGL
-  gboolean texture_rg = FALSE;
-#else
   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");
-#endif
+      || gst_gl_context_check_gl_version (convert->context, GST_GL_API_GLES2, 3,
+      0)
+      || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg")
+      || gst_gl_context_check_gl_version (convert->context, GST_GL_API_OPENGL3,
+      3, 0);
 
   info->in_n_textures = 1;
   info->out_n_textures = 1;
@@ -986,6 +1266,38 @@
   g_free (pixel_order);
 }
 
+static void
+_bind_buffer (GstGLColorConvert * convert)
+{
+  const GstGLFuncs *gl = convert->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, convert->priv->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, convert->priv->vertex_buffer);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (convert->priv->attr_position, 3, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (convert->priv->attr_texture, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+  gl->EnableVertexAttribArray (convert->priv->attr_position);
+  gl->EnableVertexAttribArray (convert->priv->attr_texture);
+}
+
+static void
+_unbind_buffer (GstGLColorConvert * convert)
+{
+  const GstGLFuncs *gl = convert->context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (convert->priv->attr_position);
+  gl->DisableVertexAttribArray (convert->priv->attr_texture);
+}
+
 /* Called in the gl thread */
 static gboolean
 _init_convert (GstGLColorConvert * convert)
@@ -1068,9 +1380,9 @@
   if (!res)
     goto error;
 
-  convert->shader_attr_position_loc =
+  convert->priv->attr_position =
       gst_gl_shader_get_attribute_location (convert->shader, "a_position");
-  convert->shader_attr_texture_loc =
+  convert->priv->attr_texture =
       gst_gl_shader_get_attribute_location (convert->shader, "a_texcoord");
 
   gst_gl_shader_use (convert->shader);
@@ -1109,6 +1421,31 @@
     goto error;
   }
 
+  if (!convert->priv->vertex_buffer) {
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &convert->priv->vao);
+      gl->BindVertexArray (convert->priv->vao);
+    }
+
+    gl->GenBuffers (1, &convert->priv->vertex_buffer);
+    gl->BindBuffer (GL_ARRAY_BUFFER, convert->priv->vertex_buffer);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+
+    gl->GenBuffers (1, &convert->priv->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, convert->priv->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+
+    if (gl->GenVertexArrays) {
+      _bind_buffer (convert);
+      gl->BindVertexArray (0);
+    }
+
+    gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  }
+
   gl->BindTexture (GL_TEXTURE_2D, 0);
 
   convert->initted = TRUE;
@@ -1144,6 +1481,7 @@
   GstGLFuncs *gl;
   guint out_width, out_height;
   GLuint fake_texture = 0;      /* a FBO must hava texture to init */
+  GLenum internal_format;
 
   gl = convert->context->gl_vtable;
 
@@ -1166,9 +1504,7 @@
   /* setup the render buffer for depth */
   gl->GenRenderbuffers (1, &convert->depth_buffer);
   gl->BindRenderbuffer (GL_RENDERBUFFER, convert->depth_buffer);
-  if (USING_OPENGL (convert->context)) {
-    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT,
-        out_width, out_height);
+  if (USING_OPENGL (convert->context) || USING_OPENGL3 (convert->context)) {
     gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH24_STENCIL8,
         out_width, out_height);
   }
@@ -1180,8 +1516,11 @@
   /* a fake texture is attached to the convert FBO (cannot init without it) */
   gl->GenTextures (1, &fake_texture);
   gl->BindTexture (GL_TEXTURE_2D, fake_texture);
-  gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, out_width, out_height,
-      0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (convert->context, GL_RGBA,
+      GL_UNSIGNED_BYTE);
+  gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format, out_width, out_height, 0,
+      GL_RGBA, GL_UNSIGNED_BYTE, NULL);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -1217,45 +1556,27 @@
   return TRUE;
 }
 
-/* Called by the idle function in the gl thread */
-void
-_do_convert (GstGLContext * context, GstGLColorConvert * convert)
+static gboolean
+_do_convert_one_view (GstGLContext * context, GstGLColorConvert * convert,
+    guint view_num)
 {
   guint in_width, in_height, out_width, out_height;
   struct ConvertInfo *c_info = &convert->priv->convert_info;
   GstMapInfo out_info[GST_VIDEO_MAX_PLANES], in_info[GST_VIDEO_MAX_PLANES];
   gboolean res = TRUE;
   gint i, j = 0;
+  const gint in_plane_offset = view_num * c_info->in_n_textures;
+  const gint out_plane_offset = view_num * c_info->out_n_textures;
 
   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;
-  }
-
-  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++) {
     convert->priv->in_tex[i] =
-        (GstGLMemory *) gst_buffer_peek_memory (convert->inbuf, i);
+        (GstGLMemory *) gst_buffer_peek_memory (convert->inbuf,
+        i + in_plane_offset);
     if (!gst_is_gl_memory ((GstMemory *) convert->priv->in_tex[i])) {
       GST_ERROR_OBJECT (convert, "input must be GstGLMemory");
       res = FALSE;
@@ -1272,23 +1593,34 @@
 
   for (j = 0; j < c_info->out_n_textures; j++) {
     GstGLMemory *out_tex =
-        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf, j);
+        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf,
+        j + out_plane_offset);
+    gint mem_width, mem_height;
+
     if (!gst_is_gl_memory ((GstMemory *) out_tex)) {
       GST_ERROR_OBJECT (convert, "output must be GstGLMemory");
       res = FALSE;
       goto out;
     }
 
+    mem_width = gst_gl_memory_get_texture_width (out_tex);
+    mem_height = gst_gl_memory_get_texture_height (out_tex);
+
     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) {
+        || out_width != mem_width || out_height != mem_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 */
+      GstVideoInfo temp_info;
+
+      gst_video_info_set_format (&temp_info, GST_VIDEO_FORMAT_RGBA, out_width,
+          out_height);
+
       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);
+            (GstGLMemory *) gst_gl_memory_alloc (context, NULL, &temp_info, 0,
+            NULL);
     } else {
       convert->priv->out_tex[j] = out_tex;
     }
@@ -1315,12 +1647,18 @@
 out:
   for (j--; j >= 0; j--) {
     GstGLMemory *out_tex =
-        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf, j);
+        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf,
+        j + out_plane_offset);
+    gint mem_width, mem_height;
+
     gst_memory_unmap ((GstMemory *) convert->priv->out_tex[j], &out_info[j]);
 
+    mem_width = gst_gl_memory_get_texture_width (out_tex);
+    mem_height = gst_gl_memory_get_texture_height (out_tex);
+
     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) {
+        || out_width != mem_width || out_height != mem_height) {
       GstMapInfo to_info, from_info;
 
       if (!gst_memory_map ((GstMemory *) convert->priv->out_tex[j], &from_info,
@@ -1338,8 +1676,8 @@
         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);
+          out_tex->tex_id, out_tex->tex_type, mem_width, mem_height,
+          GST_VIDEO_INFO_PLANE_STRIDE (&out_tex->info, out_tex->plane), FALSE);
       gst_memory_unmap ((GstMemory *) convert->priv->out_tex[j], &from_info);
       gst_memory_unmap ((GstMemory *) out_tex, &to_info);
     } else {
@@ -1349,22 +1687,76 @@
 
   /* 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);
+    GstMemory *mem1 =
+        gst_buffer_get_memory (convert->outbuf, 1 + out_plane_offset);
+    GstMemory *mem2 =
+        gst_buffer_get_memory (convert->outbuf, 2 + out_plane_offset);
 
-    gst_buffer_replace_memory (convert->outbuf, 1, mem2);
-    gst_buffer_replace_memory (convert->outbuf, 2, mem1);
+    gst_buffer_replace_memory (convert->outbuf, 1 + out_plane_offset, mem2);
+    gst_buffer_replace_memory (convert->outbuf, 2 + out_plane_offset, mem1);
   }
 
   for (i--; i >= 0; i--) {
     gst_memory_unmap ((GstMemory *) convert->priv->in_tex[i], &in_info[i]);
   }
 
+  return res;
+}
+
+/* Called by the idle function in the gl thread */
+void
+_do_convert (GstGLContext * context, GstGLColorConvert * convert)
+{
+  GstVideoInfo *in_info = &convert->in_info;
+  gboolean res = TRUE;
+  gint views, v;
+  GstVideoOverlayCompositionMeta *composition_meta;
+
+  convert->outbuf = NULL;
+
+  if (!_init_convert (convert)) {
+    convert->priv->result = FALSE;
+    return;
+  }
+
+  convert->outbuf = gst_buffer_new ();
+  if (!gst_gl_memory_setup_buffer (convert->context, NULL, &convert->out_info,
+          NULL, convert->outbuf)) {
+    convert->priv->result = FALSE;
+    return;
+  }
+
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (in_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    views = GST_VIDEO_INFO_VIEWS (in_info);
+  else
+    views = 1;
+
+  /* Handle all views on input and output one at a time */
+  for (v = 0; res && v < views; v++)
+    res = _do_convert_one_view (context, convert, v);
+
   if (!res) {
     gst_buffer_unref (convert->outbuf);
     convert->outbuf = NULL;
   }
 
+  if (convert->outbuf) {
+    GstGLSyncMeta *sync_meta =
+        gst_buffer_add_gl_sync_meta (convert->context, convert->outbuf);
+
+    if (sync_meta)
+      gst_gl_sync_meta_set_sync_point (sync_meta, convert->context);
+  }
+
+  composition_meta =
+      gst_buffer_get_video_overlay_composition_meta (convert->inbuf);
+  if (composition_meta) {
+    GST_DEBUG ("found video overlay composition meta, appliying on output.");
+    gst_buffer_add_video_overlay_composition_meta
+        (convert->outbuf, composition_meta->overlay);
+  }
+
   convert->priv->result = res;
   return;
 }
@@ -1377,19 +1769,7 @@
   guint out_width, out_height;
   gint i;
 
-  GLint viewport_dim[4];
-
-  const GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
-    1.0f, 0.0f,
-    -1.0f, -1.0f, 0.0f,
-    0.0f, 0.0f,
-    -1.0f, 1.0f, 0.0f,
-    0.0f, 1.0f,
-    1.0f, 1.0f, 0.0f,
-    1.0f, 1.0f
-  };
-
-  GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+  GLint viewport_dim[4] = { 0 };
 
   GLenum multipleRT[] = {
     GL_COLOR_ATTACHMENT0,
@@ -1422,29 +1802,24 @@
 
   gl->Viewport (0, 0, out_width, out_height);
 
-  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
   gst_gl_shader_use (convert->shader);
 
-  gl->VertexAttribPointer (convert->shader_attr_position_loc, 3,
-      GL_FLOAT, GL_FALSE, 5 * sizeof (GLfloat), vVertices);
-  gl->VertexAttribPointer (convert->shader_attr_texture_loc, 2,
-      GL_FLOAT, GL_FALSE, 5 * sizeof (GLfloat), &vVertices[3]);
-
-  gl->EnableVertexAttribArray (convert->shader_attr_position_loc);
-  gl->EnableVertexAttribArray (convert->shader_attr_texture_loc);
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (convert->priv->vao);
+  else
+    _bind_buffer (convert);
 
   for (i = c_info->in_n_textures - 1; i >= 0; i--) {
     gchar *scale_name = g_strdup_printf ("tex_scale%u", i);
+    GstGLMemory *m = convert->priv->in_tex[i];
+    guint tex_target = m->tex_target;
 
     gl->ActiveTexture (GL_TEXTURE0 + i);
-    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);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    gl->BindTexture (tex_target, convert->priv->in_tex[i]->tex_id);
+    gl->TexParameteri (tex_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    gl->TexParameteri (tex_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    gl->TexParameteri (tex_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    gl->TexParameteri (tex_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
     gst_gl_shader_set_uniform_2fv (convert->shader, scale_name, 1,
         convert->priv->in_tex[i]->tex_scaling);
@@ -1452,10 +1827,12 @@
     g_free (scale_name);
   }
 
-  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
 
-  gl->DisableVertexAttribArray (convert->shader_attr_position_loc);
-  gl->DisableVertexAttribArray (convert->shader_attr_texture_loc);
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (0);
+  else
+    _unbind_buffer (convert);
 
   if (gl->DrawBuffer)
     gl->DrawBuffer (GL_NONE);
diff --git a/gst-libs/gst/gl/gstglcolorconvert.h b/gst-libs/gst/gl/gstglcolorconvert.h
index 9b905c7..8e66be4 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.h
+++ b/gst-libs/gst/gl/gstglcolorconvert.h
@@ -53,6 +53,7 @@
   GstVideoInfo     out_info;
 
   gboolean         initted;
+  gboolean         passthrough;
 
   GstBuffer *    inbuf;
   GstBuffer *    outbuf;
@@ -61,8 +62,6 @@
   GLuint           fbo;
   GLuint           depth_buffer;
   GstGLShader     *shader;
-  GLint            shader_attr_position_loc;
-  GLint            shader_attr_texture_loc;
 
   /* <private> */
   GstGLColorConvertPrivate *priv;
@@ -88,20 +87,31 @@
 #define GST_GL_COLOR_CONVERT_FORMATS "{ 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 }"
+                               "GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }"
 
 /**
  * GST_GL_COLOR_CONVERT_VIDEO_CAPS:
  *
  * The currently supported #GstCaps that can be converted
  */
-#define GST_GL_COLOR_CONVERT_VIDEO_CAPS GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)
+#define GST_GL_COLOR_CONVERT_VIDEO_CAPS \
+    GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, \
+        GST_GL_COLOR_CONVERT_FORMATS)
+
+#define GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS \
+    GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY \
+        "," GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, \
+        GST_GL_COLOR_CONVERT_FORMATS)
 
 GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context);
 
-void     gst_gl_color_convert_set_format    (GstGLColorConvert * convert,
-                                             GstVideoInfo * in_info,
-                                             GstVideoInfo * out_info);
+GstCaps *   gst_gl_color_convert_transform_caps (GstGLContext * convert,
+                                                 GstPadDirection direction,
+                                                 GstCaps * caps,
+                                                 GstCaps * filter);
+gboolean    gst_gl_color_convert_set_caps    (GstGLColorConvert * convert,
+                                              GstCaps           * in_caps,
+                                              GstCaps           * out_caps);
 
 GstBuffer * gst_gl_color_convert_perform    (GstGLColorConvert * convert, GstBuffer * inbuf);
 
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index a197bf1..d177df8 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -40,15 +40,15 @@
 #define _GNU_SOURCE
 #endif
 
-#ifndef GL_NUM_EXTENSIONS
-#define GL_NUM_EXTENSIONS 0x0000821d
-#endif
-
 #include <gmodule.h>
 
 #include "gl.h"
 #include "gstglcontext.h"
 
+#ifndef GL_NUM_EXTENSIONS
+#define GL_NUM_EXTENSIONS 0x0000821d
+#endif
+
 #if GST_GL_HAVE_PLATFORM_GLX
 #include "x11/gstglcontext_glx.h"
 #endif
@@ -65,7 +65,11 @@
 #include "eagl/gstglcontext_eagl.h"
 #endif
 
+GST_DEBUG_CATEGORY_STATIC (gst_performance);
+static GPrivate current_context_key;
+
 static GModule *module_self;
+static GOnce module_self_gonce = G_ONCE_INIT;
 
 #if GST_GL_HAVE_OPENGL
 static GOnce module_opengl_gonce = G_ONCE_INIT;
@@ -117,10 +121,47 @@
 }
 #endif
 
+static gpointer
+load_self_module (gpointer user_data)
+{
+  module_self = g_module_open (NULL, G_MODULE_BIND_LAZY);
+
+  return NULL;
+}
+
 #if GST_GL_HAVE_GLES3
 #error "Add module loading support for GLES3"
 #endif
 
+/* Context sharedness es tracked by a unique id stored in each context object
+ * in order track complex creation/deletion scenarios.  As a result, sharedness
+ * can only be successfully validated between two GstGLContext's where one is
+ * not a wrapped context.
+ *
+ * As there is no API at the winsys level to tell whether two OpenGL contexts
+ * can share GL resources, this is the next best thing.
+ */
+static volatile guint sharegroup_idx;
+
+static guint
+_new_sharegroup_id (void)
+{
+  guint current, ret;
+
+  do {
+    current = g_atomic_int_get (&sharegroup_idx);
+    ret = current + 1;
+
+    /* 0 is special */
+    if (ret == 0)
+      ret++;
+  } while (!g_atomic_int_compare_and_exchange (&sharegroup_idx, current, ret));
+
+  GST_TRACE ("generated new share group id %u", ret);
+
+  return ret;
+}
+
 #define GST_CAT_DEFAULT gst_gl_context_debug
 GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
 
@@ -130,13 +171,13 @@
 #define GST_GL_CONTEXT_GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT, GstGLContextPrivate))
 
+static void _init_debug (void);
+
 static gpointer gst_gl_context_create_thread (GstGLContext * context);
 static void gst_gl_context_finalize (GObject * object);
 
 struct _GstGLContextPrivate
 {
-  GstGLDisplay *display;
-
   GThread *gl_thread;
   GThread *active_thread;
 
@@ -149,6 +190,7 @@
   gboolean alive;
 
   GWeakRef other_context_ref;
+  guint sharegroup_id;
   GError **error;
 
   gint gl_major;
@@ -196,7 +238,7 @@
   if (context->window)
     return;
 
-  window = gst_gl_window_new (context->priv->display);
+  window = gst_gl_window_new (context->display);
 
   gst_gl_context_set_window (context, window);
 
@@ -225,12 +267,12 @@
 {
   g_type_class_add_private (klass, sizeof (GstGLContextPrivate));
 
-  module_self = g_module_open (NULL, G_MODULE_BIND_LAZY);
-
   klass->get_proc_address =
       GST_DEBUG_FUNCPTR (gst_gl_context_default_get_proc_address);
 
   G_OBJECT_CLASS (klass)->finalize = gst_gl_context_finalize;
+
+  _init_debug ();
 }
 
 static void
@@ -241,6 +283,7 @@
   if (g_once_init_enter (&_init)) {
     GST_DEBUG_CATEGORY_INIT (gst_gl_context_debug, "glcontext", 0,
         "glcontext element");
+    GST_DEBUG_CATEGORY_GET (gst_performance, "GST_PERFORMANCE");
     g_once_init_leave (&_init, 1);
   }
 }
@@ -264,27 +307,28 @@
   _init_debug ();
 
   user_choice = g_getenv ("GST_GL_PLATFORM");
-  GST_INFO ("creating a context, user choice:%s", user_choice);
+  GST_INFO ("creating a context for display %" GST_PTR_FORMAT
+      ", user choice:%s", display, user_choice);
+#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 (display));
+#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 ());
+    context = GST_GL_CONTEXT (gst_gl_context_glx_new (display));
 #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_CGL
-  if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl")))
-    context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ());
+    context = GST_GL_CONTEXT (gst_gl_context_egl_new (display));
 #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 ());
+    context = GST_GL_CONTEXT (gst_gl_context_wgl_new (display));
   }
 #endif
 #if GST_GL_HAVE_PLATFORM_EAGL
   if (!context && (!user_choice || g_strstr_len (user_choice, 5, "eagl")))
-    context = GST_GL_CONTEXT (gst_gl_context_eagl_new ());
+    context = GST_GL_CONTEXT (gst_gl_context_eagl_new (display));
 #endif
 
   if (!context) {
@@ -295,7 +339,11 @@
     return NULL;
   }
 
-  context->priv->display = gst_object_ref (display);
+  context->display = gst_object_ref (display);
+
+  GST_DEBUG_OBJECT (context,
+      "Done creating context for display %" GST_PTR_FORMAT " (user_choice:%s)",
+      display, user_choice);
 
   return context;
 }
@@ -319,9 +367,15 @@
 {
   GstGLContext *context;
   GstGLWrappedContext *context_wrap = NULL;
+  GstGLContextClass *context_class;
+  GstGLAPI display_api;
 
   _init_debug ();
 
+  display_api = gst_gl_display_get_gl_api (display);
+  g_return_val_if_fail ((display_api & available_apis) != GST_GL_API_NONE,
+      NULL);
+
   context_wrap = g_object_new (GST_GL_TYPE_WRAPPED_CONTEXT, NULL);
 
   if (!context_wrap) {
@@ -333,14 +387,233 @@
 
   context = (GstGLContext *) context_wrap;
 
-  context->priv->display = gst_object_ref (display);
+  context->display = gst_object_ref (display);
+  context->priv->sharegroup_id = _new_sharegroup_id ();
   context_wrap->handle = handle;
   context_wrap->platform = context_type;
   context_wrap->available_apis = available_apis;
 
+  context_class = GST_GL_CONTEXT_GET_CLASS (context);
+
+#if GST_GL_HAVE_PLATFORM_GLX
+  if (context_type == GST_GL_PLATFORM_GLX) {
+    context_class->get_current_context = gst_gl_context_glx_get_current_context;
+    context_class->get_proc_address = gst_gl_context_glx_get_proc_address;
+  }
+#endif
+#if GST_GL_HAVE_PLATFORM_EGL
+  if (context_type == GST_GL_PLATFORM_EGL) {
+    context_class->get_current_context = gst_gl_context_egl_get_current_context;
+    context_class->get_proc_address = gst_gl_context_egl_get_proc_address;
+  }
+#endif
+#if GST_GL_HAVE_PLATFORM_CGL
+  if (context_type == GST_GL_PLATFORM_CGL) {
+    context_class->get_current_context =
+        gst_gl_context_cocoa_get_current_context;
+    context_class->get_proc_address = gst_gl_context_default_get_proc_address;
+  }
+#endif
+#if GST_GL_HAVE_PLATFORM_WGL
+  if (context_type == GST_GL_PLATFORM_WGL) {
+    context_class->get_current_context = gst_gl_context_wgl_get_current_context;
+    context_class->get_proc_address = gst_gl_context_wgl_get_proc_address;
+  }
+#endif
+#if GST_GL_HAVE_PLATFORM_EAGL
+  if (context_type == GST_GL_PLATFORM_EAGL) {
+    context_class->get_current_context =
+        gst_gl_context_eagl_get_current_context;
+    context_class->get_proc_address = gst_gl_context_default_get_proc_address;
+  }
+#endif
+
+  if (!context_class->get_current_context) {
+    /* we don't have API support */
+    gst_object_unref (context);
+    return NULL;
+  }
+
   return context;
 }
 
+/**
+ * gst_gl_context_get_current_gl_context:
+ * @context_type: a #GstGLPlatform specifying the type of context to retrieve
+ *
+ * Returns: The OpenGL context handle current in the calling thread or %NULL
+ *
+ * Since: 1.6
+ */
+guintptr
+gst_gl_context_get_current_gl_context (GstGLPlatform context_type)
+{
+  guintptr handle = 0;
+
+  _init_debug ();
+
+#if GST_GL_HAVE_PLATFORM_GLX
+  if (!handle && (context_type & GST_GL_PLATFORM_GLX) != 0)
+    handle = gst_gl_context_glx_get_current_context ();
+#endif
+#if GST_GL_HAVE_PLATFORM_EGL
+  if (!handle && (context_type & GST_GL_PLATFORM_EGL) != 0)
+    handle = gst_gl_context_egl_get_current_context ();
+#endif
+#if GST_GL_HAVE_PLATFORM_CGL
+  if (!handle && (context_type & GST_GL_PLATFORM_CGL) != 0)
+    handle = gst_gl_context_cocoa_get_current_context ();
+#endif
+#if GST_GL_HAVE_PLATFORM_WGL
+  if (!handle && (context_type & GST_GL_PLATFORM_WGL) != 0)
+    handle = gst_gl_context_wgl_get_current_context ();
+#endif
+#if GST_GL_HAVE_PLATFORM_EAGL
+  if (!handle && (context_type & GST_GL_PLATFORM_EAGL) != 0)
+    handle = gst_gl_context_eagl_get_current_context ();
+#endif
+
+  if (!handle)
+    GST_WARNING ("Could not retrieve current context");
+
+  return handle;
+}
+
+gpointer
+gst_gl_context_get_proc_address_with_platform (GstGLPlatform context_type,
+    GstGLAPI gl_api, const gchar * name)
+{
+  gpointer ret = NULL;
+
+#if GST_GL_HAVE_PLATFORM_GLX
+  if (!ret && (context_type & GST_GL_PLATFORM_GLX) != 0)
+    ret = gst_gl_context_glx_get_proc_address (gl_api, name);
+#endif
+#if GST_GL_HAVE_PLATFORM_EGL
+  if (!ret && (context_type & GST_GL_PLATFORM_EGL) != 0)
+    ret = gst_gl_context_egl_get_proc_address (gl_api, name);
+#endif
+#if GST_GL_HAVE_PLATFORM_WGL
+  if (!ret && (context_type & GST_GL_PLATFORM_WGL) != 0)
+    ret = gst_gl_context_wgl_get_proc_address (gl_api, name);
+#endif
+  /* CGL and EAGL rely on the default impl */
+
+  if (!ret)
+    ret = gst_gl_context_default_get_proc_address (gl_api, name);
+
+  return ret;
+}
+
+/**
+ * gst_gl_context_get_current_gl_api:
+ * @platform: the #GstGLPlatform to retrieve the API for
+ * @major: (out): (allow-none): the major version
+ * @minor: (out): (allow-none): the minor version
+ *
+ * If an error occurs, @major and @minor aren't modified and %GST_GL_API_NONE is
+ * returned.
+ *
+ * Returns: The version supported by the OpenGL context current in the calling
+ *          thread or %GST_GL_API_NONE
+ *
+ * Since: 1.6
+ */
+GstGLAPI
+gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major,
+    guint * minor)
+{
+  const GLubyte *(*GetString) (GLenum name);
+#if GST_GL_HAVE_OPENGL
+  void (*GetIntegerv) (GLenum name, GLuint * n);
+#endif
+  const gchar *version;
+  gint maj, min, n;
+  GstGLAPI ret = (1 << 31);
+
+  _init_debug ();
+
+  while (ret != GST_GL_API_NONE) {
+    /* FIXME: attempt to delve into the platform specific GetProcAddress */
+    GetString =
+        gst_gl_context_get_proc_address_with_platform (platform, ret,
+        "glGetString");
+#if GST_GL_HAVE_OPENGL
+    GetIntegerv =
+        gst_gl_context_get_proc_address_with_platform (platform, ret,
+        "glGetIntegerv");
+#endif
+    if (!GetString) {
+      goto next;
+    }
+
+    version = (const gchar *) GetString (GL_VERSION);
+    if (!version)
+      goto next;
+
+    /* strlen (x.x) == 3 */
+    n = strlen (version);
+    if (n < 3)
+      goto next;
+
+    if (g_strstr_len (version, 9, "OpenGL ES")) {
+      /* strlen (OpenGL ES x.x) == 13 */
+      if (n < 13)
+        goto next;
+
+      sscanf (&version[10], "%d.%d", &maj, &min);
+
+      if (maj <= 0 || min < 0)
+        goto next;
+
+      if (maj == 1) {
+        ret = GST_GL_API_GLES1;
+        break;
+      } else if (maj == 2 || maj == 3) {
+        ret = GST_GL_API_GLES2;
+        break;
+      }
+
+      goto next;
+    } else {
+      sscanf (version, "%d.%d", &maj, &min);
+
+      if (maj <= 0 || min < 0)
+        goto next;
+
+#if GST_GL_HAVE_OPENGL
+      if (GetIntegerv && (maj > 3 || (maj == 3 && min > 1))) {
+        GLuint context_flags = 0;
+
+        ret = GST_GL_API_NONE;
+        GetIntegerv (GL_CONTEXT_PROFILE_MASK, &context_flags);
+        if (context_flags & GL_CONTEXT_CORE_PROFILE_BIT)
+          ret |= GST_GL_API_OPENGL3;
+        if (context_flags & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
+          ret |= GST_GL_API_OPENGL;
+        break;
+      }
+#endif
+      ret = GST_GL_API_OPENGL;
+      break;
+    }
+
+  next:
+    /* iterate through the apis */
+    ret >>= 1;
+  }
+
+  if (ret == GST_GL_API_NONE)
+    return GST_GL_API_NONE;
+
+  if (major)
+    *major = maj;
+  if (minor)
+    *minor = min;
+
+  return ret;
+}
+
 static void
 gst_gl_context_finalize (GObject * object)
 {
@@ -352,7 +625,7 @@
 
     if (context->priv->alive) {
       g_mutex_lock (&context->priv->render_lock);
-      GST_INFO ("send quit gl window loop");
+      GST_INFO_OBJECT (context, "send quit gl window loop");
       gst_gl_window_quit (context->window);
       while (context->priv->alive) {
         g_cond_wait (&context->priv->destroy_cond, &context->priv->render_lock);
@@ -364,16 +637,16 @@
 
     if (context->priv->gl_thread) {
       gpointer ret = g_thread_join (context->priv->gl_thread);
-      GST_INFO ("gl thread joined");
+      GST_INFO_OBJECT (context, "gl thread joined");
       if (ret != NULL)
-        GST_ERROR ("gl thread returned a non-null pointer");
+        GST_ERROR_OBJECT (context, "gl thread returned a non-null pointer");
       context->priv->gl_thread = NULL;
     }
 
     gst_object_unref (context->window);
   }
 
-  gst_object_unref (context->priv->display);
+  gst_object_unref (context->display);
 
   if (context->gl_vtable) {
     g_slice_free (GstGLFuncs, context->gl_vtable);
@@ -388,6 +661,7 @@
   g_free (context->priv->gl_exts);
   g_weak_ref_clear (&context->priv->other_context_ref);
 
+  GST_DEBUG_OBJECT (context, "End of finalize");
   G_OBJECT_CLASS (gst_gl_context_parent_class)->finalize (object);
 }
 
@@ -415,11 +689,18 @@
   context_class = GST_GL_CONTEXT_GET_CLASS (context);
   g_return_val_if_fail (context_class->activate != NULL, FALSE);
 
+  GST_DEBUG_OBJECT (context, "activate:%d", activate);
+
   GST_OBJECT_LOCK (context);
   result = context_class->activate (context, activate);
 
-  context->priv->active_thread = result
-      && activate ? context->priv->gl_thread : NULL;
+  if (result && activate) {
+    context->priv->active_thread = g_thread_self ();
+    g_private_set (&current_context_key, context);
+  } else {
+    context->priv->active_thread = NULL;
+    g_private_set (&current_context_key, NULL);
+  }
   GST_OBJECT_UNLOCK (context);
 
   return result;
@@ -431,7 +712,7 @@
  *
  * Returns: (transfer full): The #GThread, @context is current in or NULL
  *
- * Since: 1.4.5
+ * Since: 1.6
  */
 GThread *
 gst_gl_context_get_thread (GstGLContext * context)
@@ -481,7 +762,7 @@
  * specific function does not exist, NULL is returned instead.
  *
  * Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
- * be retreived using this method.
+ * be retrieved using this method.
  *
  * Returns: a function pointer or NULL
  *
@@ -492,23 +773,22 @@
 {
   gpointer ret;
   GstGLContextClass *context_class;
+  GstGLAPI gl_api;
 
   g_return_val_if_fail (GST_GL_IS_CONTEXT (context), NULL);
-  g_return_val_if_fail (!GST_GL_IS_WRAPPED_CONTEXT (context), NULL);
   context_class = GST_GL_CONTEXT_GET_CLASS (context);
   g_return_val_if_fail (context_class->get_proc_address != NULL, NULL);
 
-  ret = context_class->get_proc_address (context, name);
+  gl_api = gst_gl_context_get_gl_api (context);
+  ret = context_class->get_proc_address (gl_api, name);
 
   return ret;
 }
 
 gpointer
-gst_gl_context_default_get_proc_address (GstGLContext * context,
-    const gchar * name)
+gst_gl_context_default_get_proc_address (GstGLAPI gl_api, const gchar * name)
 {
   gpointer ret = NULL;
-  GstGLAPI gl_api = gst_gl_context_get_gl_api (context);
 
   /* First try to load symbol from the selected GL API for this context */
 #if GST_GL_HAVE_GLES2
@@ -528,6 +808,7 @@
 #endif
 
   /* Otherwise fall back to the current module */
+  g_once (&module_self_gonce, load_self_module, NULL);
   if (!ret)
     g_module_symbol (module_self, name, &ret);
 
@@ -552,6 +833,8 @@
 {
   g_return_val_if_fail (!GST_GL_IS_WRAPPED_CONTEXT (context), FALSE);
 
+  GST_DEBUG_OBJECT (context, "window:%" GST_PTR_FORMAT, window);
+
   /* we can't change the window while we are running */
   if (context->priv->alive)
     return FALSE;
@@ -584,61 +867,23 @@
 {
   g_return_val_if_fail (GST_GL_IS_CONTEXT (context), NULL);
 
-  if (GST_GL_IS_WRAPPED_CONTEXT (context))
+  if (GST_GL_IS_WRAPPED_CONTEXT (context)) {
+    GST_WARNING_OBJECT (context, "context is not toplevel, returning NULL");
     return NULL;
+  }
 
   _ensure_window (context);
 
   return gst_object_ref (context->window);
 }
 
-static gboolean
-_share_group_descendant (GstGLContext * context, GstGLContext * other_context,
-    GstGLContext ** root)
-{
-  GstGLContext *next = gst_object_ref (context);
-  GstGLContext *prev = NULL;
-
-  /* given a context tree where --> means "has other gl context":
-   *
-   * a-->b-->c-->d
-   *    /   /
-   *   e   /
-   *      /
-   * f-->g
-   *
-   * return TRUE if @other_context is a descendant of @context
-   *
-   * e.g. [a, b], [f, d], [e, c] are all descendants
-   * but [b, a], [d, f], [e, f] are not descendants.  Provide the root node (d)
-   * so that we can check if two chains end up at the end with the same
-   * GstGLContext
-   */
-
-  while (next != NULL) {
-    if (next == other_context) {
-      gst_object_unref (next);
-      if (root)
-        *root = NULL;
-      return TRUE;
-    }
-
-    prev = next;
-    next = g_weak_ref_get (&next->priv->other_context_ref);
-    gst_object_unref (prev);
-  }
-
-  if (root != NULL)
-    *root = prev;
-
-  return FALSE;
-}
-
 /**
  * gst_gl_context_can_share:
  * @context: a #GstGLContext
  * @other_context: another #GstGLContext
  *
+ * Note: This will always fail for two wrapped #GstGLContext's
+ *
  * Returns: whether @context and @other_context are able to share OpenGL
  *      resources.
  *
@@ -647,16 +892,12 @@
 gboolean
 gst_gl_context_can_share (GstGLContext * context, GstGLContext * other_context)
 {
-  GstGLContext *root1, *root2;
-
   g_return_val_if_fail (GST_GL_IS_CONTEXT (context), FALSE);
   g_return_val_if_fail (GST_GL_IS_CONTEXT (other_context), FALSE);
 
   /* check if the contexts are descendants or the root nodes are the same */
-  return context == other_context
-      || _share_group_descendant (context, other_context, &root1)
-      || _share_group_descendant (other_context, context, &root2)
-      || ((root1 != NULL || root2 != NULL) && root1 == root2);
+  return context->priv->sharegroup_id != 0
+      && context->priv->sharegroup_id == other_context->priv->sharegroup_id;
 }
 
 /**
@@ -686,6 +927,9 @@
 
   g_return_val_if_fail (GST_GL_IS_CONTEXT (context), FALSE);
   g_return_val_if_fail (!GST_GL_IS_WRAPPED_CONTEXT (context), FALSE);
+
+  GST_DEBUG_OBJECT (context, " other_context:%" GST_PTR_FORMAT, other_context);
+
   _ensure_window (context);
 
   g_mutex_lock (&context->priv->render_lock);
@@ -693,6 +937,10 @@
   if (!context->priv->created) {
     g_weak_ref_set (&context->priv->other_context_ref, other_context);
     context->priv->error = error;
+    if (other_context == NULL)
+      context->priv->sharegroup_id = _new_sharegroup_id ();
+    else
+      context->priv->sharegroup_id = other_context->priv->sharegroup_id;
 
     context->priv->gl_thread = g_thread_new ("gstglcontext",
         (GThreadFunc) gst_gl_context_create_thread, context);
@@ -701,7 +949,7 @@
 
     context->priv->created = TRUE;
 
-    GST_INFO ("gl thread created");
+    GST_INFO_OBJECT (context, "gl thread created");
   }
 
   alive = context->priv->alive;
@@ -711,6 +959,154 @@
   return alive;
 }
 
+#ifndef GL_DEBUG_TYPE_ERROR
+#define GL_DEBUG_TYPE_ERROR 0x824C
+#endif
+#ifndef GL_DEBUG_TYPE_DEPRECATED_BEHAVIOUR
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOUR 0x824D
+#endif
+#ifndef GL_DEBUG_TYPE_UNDEFINED_BEHAVIOUR
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOUR 0x824E
+#endif
+#ifndef GL_DEBUG_TYPE_PORTABILITY
+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
+#endif
+#ifndef GL_DEBUG_TYPE_PERFORMANCE
+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
+#endif
+#ifndef GL_DEBUG_TYPE_MARKER
+#define GL_DEBUG_TYPE_MARKER 0x8268
+#endif
+#ifndef GL_DEBUG_TYPE_OTHER
+#define GL_DEBUG_TYPE_OTHER 0x8251
+#endif
+
+#ifndef GL_DEBUG_SEVERITY_HIGH
+#define GL_DEBUG_SEVERITY_HIGH 0x9146
+#endif
+#ifndef GL_DEBUG_SEVERITY_MEDIUM
+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
+#endif
+#ifndef GL_DEBUG_SEVERITY_LOW
+#define GL_DEBUG_SEVERITY_LOW 0x9148
+#endif
+#ifndef GL_DEBUG_SEVERITY_NOTIFICATION
+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
+#endif
+
+#ifndef GL_DEBUG_SOURCE_API
+#define GL_DEBUG_SOURCE_API 0x8246
+#endif
+#ifndef GL_DEBUG_SOURCE_WINDOW_SYSTEM
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
+#endif
+#ifndef GL_DEBUG_SOURCE_SHADER_COMPILER
+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
+#endif
+#ifndef GL_DEBUG_SOURCE_THIRD_PARTY
+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
+#endif
+#ifndef GL_DEBUG_SOURCE_APPLICATION
+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
+#endif
+#ifndef GL_DEBUG_SOURCE_OTHER
+#define GL_DEBUG_SOURCE_OTHER 0x824B
+#endif
+
+#if !defined(GST_DISABLE_GST_DEBUG)
+static inline const gchar *
+_debug_severity_to_string (GLenum severity)
+{
+  switch (severity) {
+    case GL_DEBUG_SEVERITY_HIGH:
+      return "high";
+    case GL_DEBUG_SEVERITY_MEDIUM:
+      return "medium";
+    case GL_DEBUG_SEVERITY_LOW:
+      return "low";
+    case GL_DEBUG_SEVERITY_NOTIFICATION:
+      return "notification";
+    default:
+      return "invalid";
+  }
+}
+
+static inline const gchar *
+_debug_source_to_string (GLenum source)
+{
+  switch (source) {
+    case GL_DEBUG_SOURCE_API:
+      return "API";
+    case GL_DEBUG_SOURCE_WINDOW_SYSTEM:
+      return "winsys";
+    case GL_DEBUG_SOURCE_SHADER_COMPILER:
+      return "shader compiler";
+    case GL_DEBUG_SOURCE_THIRD_PARTY:
+      return "third party";
+    case GL_DEBUG_SOURCE_APPLICATION:
+      return "application";
+    case GL_DEBUG_SOURCE_OTHER:
+      return "other";
+    default:
+      return "invalid";
+  }
+}
+
+static inline const gchar *
+_debug_type_to_string (GLenum type)
+{
+  switch (type) {
+    case GL_DEBUG_TYPE_ERROR:
+      return "error";
+    case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOUR:
+      return "deprecated";
+    case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOUR:
+      return "undefined";
+    case GL_DEBUG_TYPE_PORTABILITY:
+      return "portability";
+    case GL_DEBUG_TYPE_PERFORMANCE:
+      return "performance";
+    case GL_DEBUG_TYPE_MARKER:
+      return "debug marker";
+    case GL_DEBUG_TYPE_OTHER:
+      return "other";
+    default:
+      return "invalid";
+  }
+}
+
+static void GSTGLAPI
+_gst_gl_debug_callback (GLenum source, GLenum type, GLuint id, GLenum severity,
+    GLsizei length, const gchar * message, gpointer user_data)
+{
+  GstGLContext *context = user_data;
+  const gchar *severity_str = _debug_severity_to_string (severity);
+  const gchar *source_str = _debug_source_to_string (source);
+  const gchar *type_str = _debug_type_to_string (type);
+
+  switch (type) {
+    case GL_DEBUG_TYPE_ERROR:
+    case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOUR:
+      GST_ERROR_OBJECT (context, "%s: GL %s from %s id:%u, %s", severity_str,
+          type_str, source_str, id, message);
+      break;
+    case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOUR:
+    case GL_DEBUG_TYPE_PORTABILITY:
+      GST_FIXME_OBJECT (context, "%s: GL %s from %s id:%u, %s", severity_str,
+          type_str, source_str, id, message);
+      break;
+    case GL_DEBUG_TYPE_PERFORMANCE:
+      GST_CAT_DEBUG_OBJECT (gst_performance, context, "%s: GL %s from %s id:%u,"
+          " %s", severity_str, type_str, source_str, id, message);
+      break;
+    default:
+      GST_DEBUG_OBJECT (context, "%s: GL %s from %s id:%u, %s", severity_str,
+          type_str, source_str, id, message);
+      break;
+  }
+}
+#endif
+
 static gboolean
 _create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major,
     gint * gl_minor, GError ** error)
@@ -722,13 +1118,26 @@
 
   gl = context->gl_vtable;
 
-  GST_INFO ("GL_VERSION: %s",
+  if (!gl->GetString || !gl->GetString (GL_VERSION)) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+        "glGetString not defined or returned invalid value");
+    return FALSE;
+  }
+
+  if (!gl->GetString (GL_SHADING_LANGUAGE_VERSION)) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+        "No GL shader support available");
+    return FALSE;
+  }
+
+  GST_INFO_OBJECT (context, "GL_VERSION: %s",
       GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION)));
-  GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s", GST_STR_NULL ((const gchar *)
+  GST_INFO_OBJECT (context, "GL_SHADING_LANGUAGE_VERSION: %s",
+      GST_STR_NULL ((const gchar *)
           gl->GetString (GL_SHADING_LANGUAGE_VERSION)));
-  GST_INFO ("GL_VENDOR: %s",
+  GST_INFO_OBJECT (context, "GL_VENDOR: %s",
       GST_STR_NULL ((const gchar *) gl->GetString (GL_VENDOR)));
-  GST_INFO ("GL_RENDERER: %s",
+  GST_INFO_OBJECT (context, "GL_RENDERER: %s",
       GST_STR_NULL ((const gchar *) gl->GetString (GL_RENDERER)));
 
   gl_err = gl->GetError ();
@@ -790,7 +1199,8 @@
   const GstGLFuncs *gl = context->gl_vtable;
   GString *ext_g_str = g_string_sized_new (1024);
   const gchar *ext_const_c_str = NULL;
-  int i, n;
+  GLint i = 0;
+  GLint n = 0;
 
   gl->GetIntegerv (GL_NUM_EXTENSIONS, &n);
 
@@ -811,27 +1221,36 @@
   GstGLContextClass *context_class;
   GstGLWindowClass *window_class;
   GstGLFuncs *gl;
-  gboolean ret = FALSE;
-  GstGLAPI compiled_api, user_api, gl_api;
+  GstGLAPI compiled_api, user_api, gl_api, display_api;
   gchar *api_string;
   gchar *compiled_api_s;
-  gchar *user_api_string;
+  gchar *user_api_s;
+  gchar *display_api_s;
   const gchar *user_choice;
   GError **error;
   GstGLContext *other_context;
-  GString *ext_g_str = NULL;
-  const gchar *ext_const_c_str = NULL;
 
   g_mutex_lock (&context->priv->render_lock);
 
+  GST_DEBUG_OBJECT (context, "Creating thread");
+
   error = context->priv->error;
   other_context = g_weak_ref_get (&context->priv->other_context_ref);
 
   context_class = GST_GL_CONTEXT_GET_CLASS (context);
   window_class = GST_GL_WINDOW_GET_CLASS (context->window);
 
+  display_api = gst_gl_display_get_gl_api_unlocked (context->display);
+  if (display_api == GST_GL_API_NONE) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
+        "Cannot create context with satisfying requested apis "
+        "(display has no GL api!)");
+    goto failure;
+  }
+
   if (window_class->open) {
     if (!window_class->open (context->window, error)) {
+      GST_WARNING_OBJECT (context, "Failed to open window");
       g_assert (error == NULL || *error != NULL);
       goto failure;
     }
@@ -839,49 +1258,58 @@
 
   gl = context->gl_vtable;
   compiled_api = _compiled_api ();
-
-  user_choice = g_getenv ("GST_GL_API");
-
-  user_api = gst_gl_api_from_string (user_choice);
-  user_api_string = gst_gl_api_to_string (user_api);
-
   compiled_api_s = gst_gl_api_to_string (compiled_api);
 
-  if ((user_api & compiled_api) == GST_GL_API_NONE) {
+  user_choice = g_getenv ("GST_GL_API");
+  user_api = gst_gl_api_from_string (user_choice);
+  user_api_s = gst_gl_api_to_string (user_api);
+
+  display_api_s = gst_gl_api_to_string (display_api);
+
+  if ((user_api & compiled_api & display_api) == GST_GL_API_NONE) {
     g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
         "Cannot create context with the user requested api (%s).  "
-        "We have support for (%s)", user_api_string, compiled_api_s);
-    g_free (user_api_string);
+        "We have support for (%s), display api (%s)", user_api_s,
+        compiled_api_s, display_api_s);
+    g_free (user_api_s);
     g_free (compiled_api_s);
+    g_free (display_api_s);
     goto failure;
   }
 
   if (context_class->choose_format &&
       !context_class->choose_format (context, error)) {
+    GST_WARNING_OBJECT (context, "Failed to choose format");
     g_assert (error == NULL || *error != NULL);
     g_free (compiled_api_s);
-    g_free (user_api_string);
+    g_free (user_api_s);
+    g_free (display_api_s);
     goto failure;
   }
 
-  GST_INFO ("Attempting to create opengl context. user chosen api(s) (%s), "
-      "compiled api support (%s)", user_api_string, compiled_api_s);
+  GST_INFO_OBJECT (context,
+      "Attempting to create opengl context. user chosen api(s) (%s), "
+      "compiled api support (%s) display api (%s)", user_api_s, compiled_api_s,
+      display_api_s);
 
-  if (!context_class->create_context (context, compiled_api & user_api,
-          other_context, error)) {
+  if (!context_class->create_context (context,
+          compiled_api & user_api & display_api, other_context, error)) {
+    GST_WARNING_OBJECT (context, "Failed to create context");
     g_assert (error == NULL || *error != NULL);
     g_free (compiled_api_s);
-    g_free (user_api_string);
+    g_free (user_api_s);
+    g_free (display_api_s);
     goto failure;
   }
-  GST_INFO ("created context");
+  GST_INFO_OBJECT (context, "created context");
 
-  if (!context_class->activate (context, TRUE)) {
+  if (!gst_gl_context_activate (context, TRUE)) {
     g_set_error (error, GST_GL_CONTEXT_ERROR,
         GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE,
         "Failed to activate the GL Context");
     g_free (compiled_api_s);
-    g_free (user_api_string);
+    g_free (user_api_s);
+    g_free (display_api_s);
     goto failure;
   }
 
@@ -889,22 +1317,141 @@
   g_assert (gl_api != GST_GL_API_NONE && gl_api != GST_GL_API_ANY);
 
   api_string = gst_gl_api_to_string (gl_api);
-  GST_INFO ("available GL APIs: %s", api_string);
+  GST_INFO_OBJECT (context, "available GL APIs: %s", api_string);
 
-  if (((compiled_api & gl_api) & user_api) == GST_GL_API_NONE) {
+  if (((compiled_api & gl_api & display_api) & user_api) == GST_GL_API_NONE) {
     g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
         "failed to create context, context "
         "could not provide correct api. user (%s), compiled (%s), context (%s)",
-        user_api_string, compiled_api_s, api_string);
+        user_api_s, compiled_api_s, api_string);
     g_free (api_string);
     g_free (compiled_api_s);
-    g_free (user_api_string);
+    g_free (user_api_s);
+    g_free (display_api_s);
     goto failure;
   }
 
   g_free (api_string);
   g_free (compiled_api_s);
-  g_free (user_api_string);
+  g_free (user_api_s);
+  g_free (display_api_s);
+
+  GST_DEBUG_OBJECT (context, "Filling info");
+  if (!gst_gl_context_fill_info (context, error)) {
+    g_assert (error == NULL || *error != NULL);
+    goto failure;
+  }
+
+  context->priv->alive = TRUE;
+
+  if (gl->DebugMessageCallback) {
+#if !defined(GST_DISABLE_GST_DEBUG)
+    GST_INFO_OBJECT (context, "Enabling GL context debugging");
+    /* enable them all */
+    gl->DebugMessageControl (GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, 0,
+        GL_TRUE);
+    gl->DebugMessageCallback (_gst_gl_debug_callback, context);
+#endif
+  }
+
+  if (other_context) {
+    GST_DEBUG_OBJECT (context, "Unreffing other_context %" GST_PTR_FORMAT,
+        other_context);
+    gst_object_unref (other_context);
+  }
+
+  g_cond_signal (&context->priv->create_cond);
+
+//  g_mutex_unlock (&context->priv->render_lock);
+  gst_gl_window_send_message_async (context->window,
+      (GstGLWindowCB) _unlock_create_thread, context, NULL);
+
+  gst_gl_window_run (context->window);
+
+  GST_INFO_OBJECT (context, "loop exited");
+
+  g_mutex_lock (&context->priv->render_lock);
+
+  context->priv->alive = FALSE;
+
+  gst_gl_context_activate (context, FALSE);
+
+  context_class->destroy_context (context);
+
+  /* User supplied callback */
+  if (context->window->close)
+    context->window->close (context->window->close_data);
+
+  /* window specific shutdown */
+  if (window_class->close) {
+    window_class->close (context->window);
+  }
+
+  g_cond_signal (&context->priv->destroy_cond);
+
+  g_mutex_unlock (&context->priv->render_lock);
+
+  return NULL;
+
+failure:
+  {
+    if (other_context)
+      gst_object_unref (other_context);
+
+    g_cond_signal (&context->priv->create_cond);
+    g_mutex_unlock (&context->priv->render_lock);
+    return NULL;
+  }
+}
+
+/**
+ * gst_gl_context_destroy:
+ * @context: a #GstGLContext:
+ *
+ * Destroys an OpenGL context.
+ *
+ * Should only be called after gst_gl_context_create() has been successfully
+ * called for this context.
+ *
+ * Since: 1.6
+ */
+void
+gst_gl_context_destroy (GstGLContext * context)
+{
+  GstGLContextClass *context_class;
+
+  g_return_if_fail (GST_GL_IS_CONTEXT (context));
+  context_class = GST_GL_CONTEXT_GET_CLASS (context);
+  g_return_if_fail (context_class->destroy_context != NULL);
+
+  context_class->destroy_context (context);
+}
+
+/**
+ * gst_gl_context_fill_info:
+ * @context: a #GstGLContext:
+ *
+ * Fills @context's info (version, extensions, vtable, etc) from the GL
+ * context in the current thread.  Typically used with wrapped contexts to
+ * allow wrapped contexts to be used as regular #GstGLContext's.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_gl_context_fill_info (GstGLContext * context, GError ** error)
+{
+  GstGLFuncs *gl;
+  GString *ext_g_str = NULL;
+  const gchar *ext_const_c_str = NULL;
+  GstGLAPI gl_api;
+  gboolean ret;
+
+  g_return_val_if_fail (GST_GL_IS_CONTEXT (context), FALSE);
+  g_return_val_if_fail (context->priv->active_thread == g_thread_self (),
+      FALSE);
+
+  gl = context->gl_vtable;
+  gl_api = gst_gl_context_get_gl_api (context);
 
   gl->GetError = gst_gl_context_get_proc_address (context, "glGetError");
   gl->GetString = gst_gl_context_get_proc_address (context, "glGetString");
@@ -948,50 +1495,31 @@
     context->priv->gl_exts = g_strdup (ext_const_c_str);
   }
 
-  context->priv->alive = TRUE;
-
-  g_cond_signal (&context->priv->create_cond);
-
-//  g_mutex_unlock (&context->priv->render_lock);
-  gst_gl_window_send_message_async (context->window,
-      (GstGLWindowCB) _unlock_create_thread, context, NULL);
-
-  gst_gl_window_run (context->window);
-
-  GST_INFO ("loop exited\n");
-
-  g_mutex_lock (&context->priv->render_lock);
-
-  context->priv->alive = FALSE;
-
-  context_class->activate (context, FALSE);
-
-  context_class->destroy_context (context);
-
-  /* User supplied callback */
-  if (context->window->close)
-    context->window->close (context->window->close_data);
-
-  /* window specific shutdown */
-  if (window_class->close) {
-    window_class->close (context->window);
+  if (gl_api & GST_GL_API_OPENGL3
+      && !gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 4, 1)
+      && !gst_gl_check_extension ("GL_ARB_ES2_compatibility",
+          context->priv->gl_exts)) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+        "An opengl3 context created but the required ES2 compatibility was not found");
+    goto failure;
   }
 
-  g_cond_signal (&context->priv->destroy_cond);
+  /* Does not implement OES_vertex_array_object properly, see
+   * https://bugzilla.gnome.org/show_bug.cgi?id=750185 */
+  if (g_strcmp0 ((const gchar *) gl->GetString (GL_VENDOR),
+          "Imagination Technologies") == 0
+      && g_strcmp0 ((const gchar *) gl->GetString (GL_RENDERER),
+          "PowerVR SGX 544MP") == 0) {
+    gl->GenVertexArrays = NULL;
+    gl->DeleteVertexArrays = NULL;
+    gl->BindVertexArray = NULL;
+    gl->IsVertexArray = NULL;
+  }
 
-  g_mutex_unlock (&context->priv->render_lock);
-
-  return NULL;
+  return TRUE;
 
 failure:
-  {
-    if (other_context)
-      gst_object_unref (other_context);
-
-    g_cond_signal (&context->priv->create_cond);
-    g_mutex_unlock (&context->priv->render_lock);
-    return NULL;
-  }
+  return FALSE;
 }
 
 /**
@@ -1054,7 +1582,7 @@
 {
   g_return_val_if_fail (GST_GL_IS_CONTEXT (context), NULL);
 
-  return gst_object_ref (context->priv->display);
+  return gst_object_ref (context->display);
 }
 
 typedef struct
@@ -1067,7 +1595,8 @@
 static void
 _gst_gl_context_thread_run_generic (RunGenericData * data)
 {
-  GST_TRACE ("running function:%p data:%p", data->func, data->data);
+  GST_TRACE_OBJECT (data->context, "running function:%p data:%p", data->func,
+      data->data);
 
   data->func (data->context, data->data);
 }
@@ -1093,7 +1622,12 @@
 
   g_return_if_fail (GST_GL_IS_CONTEXT (context));
   g_return_if_fail (func != NULL);
-  g_return_if_fail (!GST_GL_IS_WRAPPED_CONTEXT (context));
+
+  if (GST_GL_IS_WRAPPED_CONTEXT (context)) {
+    g_return_if_fail (context->priv->active_thread == g_thread_self ());
+    func (context, data);
+    return;
+  }
 
   rdata.context = context;
   rdata.data = data;
@@ -1123,7 +1657,7 @@
 gst_gl_context_get_gl_version (GstGLContext * context, gint * maj, gint * min)
 {
   g_return_if_fail (GST_GL_IS_CONTEXT (context));
-  g_return_if_fail (maj == NULL && min == NULL);
+  g_return_if_fail (maj != NULL && min != NULL);
 
   if (maj)
     *maj = context->priv->gl_major;
@@ -1196,6 +1730,21 @@
   return context_class->check_feature (context, feature);
 }
 
+/**
+ * gst_gl_context_get_current:
+ *
+ * See also gst_gl_context_activate().
+ *
+ * Returns: the #GstGLContext active in the current thread or %NULL
+ *
+ * Since: 1.6
+ */
+GstGLContext *
+gst_gl_context_get_current (void)
+{
+  return g_private_get (&current_context_key);
+}
+
 static GstGLAPI
 gst_gl_wrapped_context_get_gl_api (GstGLContext * context)
 {
@@ -1223,9 +1772,12 @@
 static gboolean
 gst_gl_wrapped_context_activate (GstGLContext * context, gboolean activate)
 {
-  g_assert_not_reached ();
+  if (activate)
+    context->priv->gl_thread = g_thread_self ();
+  else
+    context->priv->gl_thread = NULL;
 
-  return FALSE;
+  return TRUE;
 }
 
 static void
diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h
index 7d6a842..16b9d11 100644
--- a/gst-libs/gst/gl/gstglcontext.h
+++ b/gst-libs/gst/gl/gstglcontext.h
@@ -29,7 +29,7 @@
 
 #define GST_GL_TYPE_CONTEXT         (gst_gl_context_get_type())
 #define GST_GL_CONTEXT(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT, GstGLContext))
-#define GST_GL_CONTEXT_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT, GstGLContextClass))
+#define GST_GL_CONTEXT_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GST_GL_TYPE_CONTEXT, GstGLContextClass))
 #define GST_GL_IS_CONTEXT(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT))
 #define GST_GL_IS_CONTEXT_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT))
 #define GST_GL_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT, GstGLContextClass))
@@ -72,6 +72,7 @@
   /*< private >*/
   GstObject parent;
 
+  GstGLDisplay *display;
   GstGLWindow  *window;
 
   GstGLFuncs *gl_vtable;
@@ -95,10 +96,11 @@
 struct _GstGLContextClass {
   GstObjectClass parent_class;
 
+  guintptr      (*get_current_context) (void);
   guintptr      (*get_gl_context)     (GstGLContext *context);
   GstGLAPI      (*get_gl_api)         (GstGLContext *context);
   GstGLPlatform (*get_gl_platform)    (GstGLContext *context);
-  gpointer      (*get_proc_address)   (GstGLContext *context, const gchar *name);
+  gpointer      (*get_proc_address)   (GstGLAPI gl_api, const gchar *name);
   gboolean      (*activate)           (GstGLContext *context, gboolean activate);
   gboolean      (*choose_format)      (GstGLContext *context, GError **error);
   gboolean      (*create_context)     (GstGLContext *context, GstGLAPI gl_api,
@@ -121,6 +123,7 @@
 
 gboolean      gst_gl_context_activate         (GstGLContext *context, gboolean activate);
 GThread *     gst_gl_context_get_thread       (GstGLContext *context);
+GstGLContext * gst_gl_context_get_current     (void);
 
 GstGLDisplay * gst_gl_context_get_display (GstGLContext *context);
 gpointer      gst_gl_context_get_proc_address (GstGLContext *context, const gchar *name);
@@ -130,8 +133,10 @@
 gboolean      gst_gl_context_can_share        (GstGLContext * context, GstGLContext *other_context);
 
 gboolean      gst_gl_context_create           (GstGLContext *context, GstGLContext *other_context, GError ** error);
+void          gst_gl_context_destroy          (GstGLContext *context);
 
-gpointer      gst_gl_context_default_get_proc_address (GstGLContext *context, const gchar *name);
+gpointer      gst_gl_context_default_get_proc_address (GstGLAPI gl_api, const gchar *name);
+gpointer      gst_gl_context_get_proc_address_with_platform (GstGLPlatform, GstGLAPI gl_api, const gchar *name);
 
 gboolean      gst_gl_context_set_window (GstGLContext *context, GstGLWindow *window);
 GstGLWindow * gst_gl_context_get_window (GstGLContext *context);
@@ -140,10 +145,17 @@
 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);
 
+guintptr      gst_gl_context_get_current_gl_context     (GstGLPlatform platform);
+GstGLAPI      gst_gl_context_get_current_gl_api         (GstGLPlatform platform, guint *major, guint *minor);
+
+gboolean gst_gl_context_fill_info (GstGLContext * context, GError ** error);
+
 /* FIXME: remove */
 void gst_gl_context_thread_add (GstGLContext * context,
     GstGLContextThreadFunc func, gpointer data);
 
+GST_DEBUG_CATEGORY_EXTERN (gst_gl_context_debug);
+
 G_END_DECLS
 
 #endif /* __GST_GL_CONTEXT_H__ */
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index 6b7b835..51c1df5 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -56,9 +56,15 @@
 #include "gl.h"
 #include "gstgldisplay.h"
 
+#if GST_GL_HAVE_WINDOW_COCOA
+#include <gst/gl/cocoa/gstgldisplay_cocoa.h>
+#endif
 #if GST_GL_HAVE_WINDOW_X11
 #include <gst/gl/x11/gstgldisplay_x11.h>
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+#include <gst/gl/wayland/gstgldisplay_wayland.h>
+#endif
 #if GST_GL_HAVE_PLATFORM_EGL
 #include <gst/gl/egl/gstgldisplay_egl.h>
 #include <gst/gl/egl/gsteglimagememory.h>
@@ -78,12 +84,23 @@
 #define GST_GL_DISPLAY_GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_DISPLAY, GstGLDisplayPrivate))
 
+enum
+{
+  SIGNAL_0,
+  CREATE_CONTEXT,
+  LAST_SIGNAL
+};
+
+static guint gst_gl_display_signals[LAST_SIGNAL] = { 0 };
+
 static void gst_gl_display_finalize (GObject * object);
 static guintptr gst_gl_display_default_get_handle (GstGLDisplay * display);
 
 struct _GstGLDisplayPrivate
 {
-  gint dummy;
+  GstGLAPI gl_api;
+
+  GList *contexts;
 };
 
 static void
@@ -91,6 +108,22 @@
 {
   g_type_class_add_private (klass, sizeof (GstGLDisplayPrivate));
 
+  /**
+   * GstGLDisplay::create-context:
+   * @object: the #GstGLDisplay
+   * @context: other context to share resources with.
+   *
+   * Overrides the @GstGLContext creation mechanism.
+   * It can be called in any thread and it is emitted with
+   * display's object lock held.
+   *
+   * Returns: the new context.
+   */
+  gst_gl_display_signals[CREATE_CONTEXT] =
+      g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      GST_GL_TYPE_CONTEXT, 1, GST_GL_TYPE_CONTEXT);
+
   klass->get_handle = gst_gl_display_default_get_handle;
 
   G_OBJECT_CLASS (klass)->finalize = gst_gl_display_finalize;
@@ -102,9 +135,11 @@
   display->priv = GST_GL_DISPLAY_GET_PRIVATE (display);
 
   display->type = GST_GL_DISPLAY_TYPE_ANY;
+  display->priv->gl_api = GST_GL_API_ANY;
 
   GST_TRACE ("init %p", display);
 
+  gst_gl_base_buffer_init_once ();
   gst_gl_memory_init ();
 
 #if GST_GL_HAVE_PLATFORM_EGL
@@ -115,7 +150,17 @@
 static void
 gst_gl_display_finalize (GObject * object)
 {
-  GST_TRACE ("finalize %p", object);
+  GstGLDisplay *display = GST_GL_DISPLAY (object);
+  GList *l;
+
+  GST_TRACE_OBJECT (object, "finalizing");
+
+  for (l = display->priv->contexts; l; l = l->next) {
+    g_weak_ref_clear ((GWeakRef *) l->data);
+    g_free (l->data);
+  }
+
+  g_list_free (display->priv->contexts);
 
   G_OBJECT_CLASS (gst_gl_display_parent_class)->finalize (object);
 }
@@ -146,8 +191,11 @@
       GST_STR_NULL (user_choice), GST_STR_NULL (platform_choice));
 
 #if GST_GL_HAVE_WINDOW_COCOA
-  if (!display && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
-    display = g_object_new (GST_TYPE_GL_DISPLAY, NULL);
+  if (!display && (!user_choice || g_strstr_len (user_choice, 5, "cocoa"))) {
+    display = GST_GL_DISPLAY (gst_gl_display_cocoa_new ());
+    if (!display)
+      return NULL;
+  }
 #endif
 #if GST_GL_HAVE_WINDOW_X11
   if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
@@ -155,7 +203,7 @@
 #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);
+    display = GST_GL_DISPLAY (gst_gl_display_wayland_new (NULL));
 #endif
 #if GST_GL_HAVE_PLATFORM_EGL
   if (!display && (!platform_choice
@@ -193,6 +241,62 @@
 }
 
 /**
+ * gst_gl_display_filter_gl_api:
+ * @display: a #GstGLDisplay
+ * @gl_api: a #GstGLAPI to filter with
+ *
+ * limit the use of OpenGL to the requested @gl_api.  This is intended to allow
+ * application and elements to request a specific set of OpenGL API's based on
+ * what they support.  See gst_gl_context_get_gl_api() for the retreiving the
+ * API supported by a #GstGLContext.
+ */
+void
+gst_gl_display_filter_gl_api (GstGLDisplay * display, GstGLAPI gl_api)
+{
+  gchar *gl_api_s;
+
+  g_return_if_fail (GST_IS_GL_DISPLAY (display));
+
+  gl_api_s = gst_gl_api_to_string (gl_api);
+  GST_TRACE_OBJECT (display, "filtering with api %s", gl_api_s);
+  g_free (gl_api_s);
+
+  GST_OBJECT_LOCK (display);
+  display->priv->gl_api &= gl_api;
+  GST_OBJECT_UNLOCK (display);
+}
+
+GstGLAPI
+gst_gl_display_get_gl_api_unlocked (GstGLDisplay * display)
+{
+  g_return_val_if_fail (GST_IS_GL_DISPLAY (display), GST_GL_API_NONE);
+
+  return display->priv->gl_api;
+}
+
+/**
+ * gst_gl_display_get_gl_api:
+ * @display: a #GstGLDisplay
+ *
+ * see gst_gl_display_filter_gl_api() for what the returned value represents
+ *
+ * Returns: the #GstGLAPI configured for @display
+ */
+GstGLAPI
+gst_gl_display_get_gl_api (GstGLDisplay * display)
+{
+  GstGLAPI ret;
+
+  g_return_val_if_fail (GST_IS_GL_DISPLAY (display), GST_GL_API_NONE);
+
+  GST_OBJECT_LOCK (display);
+  ret = display->priv->gl_api;
+  GST_OBJECT_UNLOCK (display);
+
+  return ret;
+}
+
+/**
  * gst_gl_display_get_handle_type:
  * @display: a #GstGLDisplay
  *
@@ -224,8 +328,10 @@
 
   g_return_if_fail (context != NULL);
 
-  GST_CAT_LOG (gst_context, "setting GstGLDisplay(%p) on context(%p)", display,
-      context);
+  if (display)
+    GST_CAT_LOG (gst_context,
+        "setting GstGLDisplay(%" GST_PTR_FORMAT ") on context(%" GST_PTR_FORMAT
+        ")", display, context);
 
   s = gst_context_writable_structure (context);
   gst_structure_set (s, GST_GL_DISPLAY_CONTEXT_TYPE, GST_TYPE_GL_DISPLAY,
@@ -259,3 +365,201 @@
 
   return ret;
 }
+
+/**
+ * gst_gl_display_create_context:
+ * @display: a #GstGLDisplay
+ * @other_context: other #GstGLContext to share resources with.
+ * @p_context: resulting #GstGLContext
+ * @error: resulting #GError
+ *
+ * It requires the display's object lock to be held.
+ *
+ * Returns: whether a new context could be created.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_gl_display_create_context (GstGLDisplay * display,
+    GstGLContext * other_context, GstGLContext ** p_context, GError ** error)
+{
+  GstGLContext *context = NULL;
+  gboolean ret = FALSE;
+
+  g_return_val_if_fail (display != NULL, FALSE);
+  g_return_val_if_fail (p_context != NULL, FALSE);
+  g_return_val_if_fail (error != NULL, FALSE);
+  g_return_val_if_fail (*error == NULL, FALSE);
+
+  g_signal_emit (display, gst_gl_display_signals[CREATE_CONTEXT], 0,
+      other_context, &context);
+
+  if (context) {
+    *p_context = context;
+    return TRUE;
+  }
+
+  context = gst_gl_context_new (display);
+  if (!context) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+        "Failed to create GL context");
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (display,
+      "creating context %" GST_PTR_FORMAT " from other context %"
+      GST_PTR_FORMAT, context, other_context);
+
+  ret = gst_gl_context_create (context, other_context, error);
+
+  if (ret)
+    *p_context = context;
+
+  return ret;
+}
+
+static GstGLContext *
+_get_gl_context_for_thread_unlocked (GstGLDisplay * display, GThread * thread)
+{
+  GstGLContext *context = NULL;
+  GList *prev = NULL, *l = display->priv->contexts;
+
+  while (l) {
+    GWeakRef *ref = l->data;
+    GThread *context_thread;
+
+    context = g_weak_ref_get (ref);
+    if (!context) {
+      /* remove dead contexts */
+      g_weak_ref_clear (l->data);
+      display->priv->contexts = g_list_delete_link (display->priv->contexts, l);
+      l = prev ? prev->next : display->priv->contexts;
+      continue;
+    }
+
+    context_thread = gst_gl_context_get_thread (context);
+    if (thread != NULL && thread == context_thread) {
+      g_thread_unref (context_thread);
+      gst_object_unref (context);
+      prev = l;
+      l = l->next;
+      continue;
+    }
+
+    if (context_thread)
+      g_thread_unref (context_thread);
+    return context;
+  }
+
+  return NULL;
+}
+
+/**
+ * gst_gl_display_get_gl_context_for_thread:
+ * @display: a #GstGLDisplay
+ * @thread: a #GThread
+ *
+ * Returns: (transfer full): the #GstGLContext current on @thread or %NULL
+ *
+ * Must be called with the object lock held.
+ *
+ * Since: 1.6
+ */
+GstGLContext *
+gst_gl_display_get_gl_context_for_thread (GstGLDisplay * display,
+    GThread * thread)
+{
+  GstGLContext *context;
+
+  g_return_val_if_fail (GST_IS_GL_DISPLAY (display), NULL);
+
+  context = _get_gl_context_for_thread_unlocked (display, thread);
+  GST_DEBUG_OBJECT (display, "returning context %" GST_PTR_FORMAT " for thread "
+      "%p", context, thread);
+
+  return context;
+}
+
+static gboolean
+_check_collision (GstGLContext * context, GstGLContext * collision)
+{
+  GThread *thread, *collision_thread;
+  gboolean ret = FALSE;
+
+  if (!context || !collision)
+    return FALSE;
+
+  thread = gst_gl_context_get_thread (context);
+  collision_thread = gst_gl_context_get_thread (collision);
+
+  if (!thread || !collision_thread) {
+    ret = FALSE;
+    goto out;
+  }
+
+  if (collision == context) {
+    ret = TRUE;
+    goto out;
+  }
+
+out:
+  if (thread)
+    g_thread_unref (thread);
+  if (collision_thread)
+    g_thread_unref (collision_thread);
+
+  return ret;
+}
+
+/**
+ * gst_gl_display_add_context:
+ * @display: a #GstGLDisplay
+ * @context: (transfer none): a #GstGLContext
+ *
+ * Returns: whether @context was successfully added. %FALSE may be returned
+ * if there already exists another context for @context's active thread.
+ *
+ * Must be called with the object lock held.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_gl_display_add_context (GstGLDisplay * display, GstGLContext * context)
+{
+  GstGLContext *collision = NULL;
+  GstGLDisplay *context_display;
+  gboolean ret = TRUE;
+  GThread *thread;
+  GWeakRef *ref;
+
+  g_return_val_if_fail (GST_IS_GL_DISPLAY (display), FALSE);
+  g_return_val_if_fail (GST_GL_IS_CONTEXT (context), FALSE);
+
+  context_display = gst_gl_context_get_display (context);
+  g_assert (context_display == display);
+  gst_object_unref (context_display);
+
+  thread = gst_gl_context_get_thread (context);
+  if (thread) {
+    collision = _get_gl_context_for_thread_unlocked (display, thread);
+    g_thread_unref (thread);
+    if (_check_collision (context, collision)) {
+      ret = FALSE;
+      goto out;
+    }
+  }
+
+  ref = g_new0 (GWeakRef, 1);
+  g_weak_ref_init (ref, context);
+
+  display->priv->contexts = g_list_prepend (display->priv->contexts, ref);
+
+out:
+  if (collision)
+    gst_object_unref (collision);
+
+  GST_DEBUG_OBJECT (display, "%ssuccessfully inserted context %" GST_PTR_FORMAT,
+      ret ? "" : "un", context);
+
+  return ret;
+}
diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h
index 09489a6..9341884 100644
--- a/gst-libs/gst/gl/gstgldisplay.h
+++ b/gst-libs/gst/gl/gstgldisplay.h
@@ -83,11 +83,22 @@
 
 guintptr         gst_gl_display_get_handle             (GstGLDisplay * display);
 GstGLDisplayType gst_gl_display_get_handle_type        (GstGLDisplay * display);
+void             gst_gl_display_filter_gl_api          (GstGLDisplay * display,
+                                                        GstGLAPI api);
+GstGLAPI         gst_gl_display_get_gl_api             (GstGLDisplay * display);
+GstGLAPI         gst_gl_display_get_gl_api_unlocked    (GstGLDisplay * display);
 
 #define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"
 void     gst_context_set_gl_display (GstContext * context, GstGLDisplay * display);
 gboolean gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display);
 
+gboolean  gst_gl_display_create_context (GstGLDisplay * display,
+    GstGLContext * other_context, GstGLContext ** p_context, GError **error);
+GstGLContext * gst_gl_display_get_gl_context_for_thread (GstGLDisplay * display,
+    GThread * thread);
+gboolean gst_gl_display_add_context (GstGLDisplay * display,
+    GstGLContext * context);
+
 G_END_DECLS
 
 #endif /* __GST_GL_DISPLAY_H__ */
diff --git a/gst-libs/gst/gl/gstgldownload.c b/gst-libs/gst/gl/gstgldownload.c
index 47e277a..8f045c7 100644
--- a/gst-libs/gst/gl/gstgldownload.c
+++ b/gst-libs/gst/gl/gstgldownload.c
@@ -43,14 +43,17 @@
 #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 _do_download (GstGLDownload * download, guint texture_id,
-    gpointer data[GST_VIDEO_MAX_PLANES]);
+static gboolean _do_download (GstGLDownload * download, GstBuffer * inbuf);
 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]);
+    download, GLuint texture_id, GLuint texture_target,
+    gpointer data[GST_VIDEO_MAX_PLANES]);
 static void gst_gl_download_reset (GstGLDownload * download);
 
 /* *INDENT-ON* */
+/* Define the maximum number of planes we can handle - max 2 views per buffer */
+#define GST_GL_DOWNLOAD_MAX_VIEWS 2
+#define GST_GL_DOWNLOAD_MAX_PLANES (GST_VIDEO_MAX_PLANES * GST_GL_DOWNLOAD_MAX_VIEWS)
 
 struct _GstGLDownloadPrivate
 {
@@ -60,7 +63,12 @@
   const gchar *ARGB;
   const gchar *vert_shader;
 
-  GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
+  GstBuffer *inbuf;
+  /* Temporary wrapped texture for perform_with_data download */
+  GstGLMemory *in_tex;
+
+  /* Output data planes */
+  gpointer out_data[GST_GL_DOWNLOAD_MAX_PLANES];
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_gl_download_debug);
@@ -137,22 +145,16 @@
 static void
 gst_gl_download_reset (GstGLDownload * download)
 {
-  guint i;
-
-  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    if (download->priv->in_tex[i]) {
-      gst_memory_unref ((GstMemory *) download->priv->in_tex[i]);
-      download->priv->in_tex[i] = NULL;
-    }
+  if (download->priv->in_tex) {
+    gst_memory_unref ((GstMemory *) download->priv->in_tex);
+    download->priv->in_tex = NULL;
   }
 }
 
 /**
  * gst_gl_download_set_format:
  * @download: a #GstGLDownload
- * @v_format: a #GstVideoFormat
- * @out_width: the width to download to
- * @out_height: the height to download to
+ * @out_info: a #GstVideoInfo
  *
  * Initializes @download with the information required for download.
  */
@@ -179,19 +181,87 @@
   GST_OBJECT_UNLOCK (download);
 }
 
+static GstCaps *
+_set_caps_features (const GstCaps * caps, const gchar * feature_name)
+{
+  GstCaps *tmp = gst_caps_copy (caps);
+  guint n = gst_caps_get_size (tmp);
+  guint i = 0;
+
+  for (i = 0; i < n; i++) {
+    GstCapsFeatures *features;
+
+    features = gst_caps_features_new (feature_name, NULL);
+    gst_caps_set_features (tmp, i, features);
+  }
+
+  return tmp;
+}
+
+GstCaps *
+gst_gl_download_transform_caps (GstGLContext * context,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  GstCaps *gl_templ, *templ, *result, *tmp;
+
+  templ =
+      gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS));
+  gl_templ =
+      gst_caps_from_string (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+      (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, GST_GL_COLOR_CONVERT_FORMATS));
+
+  if (direction == GST_PAD_SRC) {
+    tmp = gst_caps_intersect_full (caps, templ, GST_CAPS_INTERSECT_FIRST);
+    result = _set_caps_features (tmp, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+    gst_caps_unref (tmp);
+    tmp = result;
+  } else {
+    tmp = gst_caps_ref (caps);
+  }
+
+  result =
+      gst_gl_color_convert_transform_caps (context, direction, tmp, filter);
+  gst_caps_unref (tmp);
+  tmp = result;
+
+  if (direction == GST_PAD_SINK) {
+    result = _set_caps_features (tmp, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
+    gst_caps_unref (tmp);
+    tmp = result;
+    result = gst_caps_intersect_full (tmp, templ, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+    tmp = result;
+  }
+
+  if (filter) {
+    result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+  } else {
+    result = tmp;
+  }
+  gst_caps_unref (templ);
+  gst_caps_unref (gl_templ);
+
+  return result;
+}
+
 /**
  * gst_gl_download_perform_with_data:
  * @download: a #GstGLDownload
  * @texture_id: the texture id to download
+ * @texture_target: the GL texture target
  * @data: (out): where the downloaded data should go
  *
  * Downloads @texture_id into @data. @data size and format is specified by
- * the #GstVideoFormat passed to gst_gl_download_set_format() 
+ * the #GstVideoFormat passed to gst_gl_download_set_format()
+ *
+ * This method can only be used for download a single view.
  *
  * Returns: whether the download was successful
  */
 gboolean
-gst_gl_download_perform_with_data (GstGLDownload * download, GLuint texture_id,
+gst_gl_download_perform_with_data (GstGLDownload * download,
+    GLuint texture_id, GLuint texture_target,
     gpointer data[GST_VIDEO_MAX_PLANES])
 {
   gboolean ret;
@@ -200,17 +270,23 @@
 
   GST_OBJECT_LOCK (download);
   ret =
-      _gst_gl_download_perform_with_data_unlocked (download, texture_id, data);
+      _gst_gl_download_perform_with_data_unlocked (download,
+      texture_id, texture_target, data);
   GST_OBJECT_UNLOCK (download);
 
   return ret;
 }
 
+/* This method only supports one input texture */
 static gboolean
 _gst_gl_download_perform_with_data_unlocked (GstGLDownload * download,
-    GLuint texture_id, gpointer data[GST_VIDEO_MAX_PLANES])
+    GLuint texture_id, GLuint texture_target,
+    gpointer data[GST_VIDEO_MAX_PLANES])
 {
   guint i;
+  gboolean res;
+  GstBuffer *inbuf;
+  guint out_width, out_height;
 
   g_return_val_if_fail (download != NULL, FALSE);
   g_return_val_if_fail (texture_id > 0, FALSE);
@@ -223,27 +299,54 @@
     g_return_val_if_fail (data[i] != NULL, FALSE);
   }
 
-  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);
+  if (!download->priv->in_tex) {
+    GstVideoInfo temp_info;
 
-  download->priv->in_tex[0]->tex_id = texture_id;
+    gst_video_info_set_format (&temp_info, GST_VIDEO_FORMAT_RGBA,
+        GST_VIDEO_INFO_WIDTH (&download->info),
+        GST_VIDEO_INFO_HEIGHT (&download->info));
 
-  return _do_download (download, texture_id, data);
+    download->priv->in_tex =
+        gst_gl_memory_wrapped_texture (download->context,
+        texture_id, texture_target, &temp_info, 0, NULL, NULL, NULL);
+  }
+
+
+  out_width = GST_VIDEO_INFO_WIDTH (&download->info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&download->info);
+
+  GST_TRACE ("doing download of texture:%u (%ux%u)",
+      download->priv->in_tex->tex_id, out_width, out_height);
+
+  download->priv->in_tex->tex_id = texture_id;
+
+  inbuf = gst_buffer_new ();
+  gst_buffer_append_memory (inbuf,
+      gst_memory_ref ((GstMemory *) download->priv->in_tex));
+
+  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++)
+    download->priv->out_data[i] = data[i];
+  /* Clear remaining planes for safety */
+  while (i < GST_GL_DOWNLOAD_MAX_PLANES)
+    download->priv->out_data[i++] = NULL;
+
+  res = _do_download (download, inbuf);
+
+  download->priv->inbuf = NULL;
+  gst_buffer_unref (inbuf);
+
+  return res;
 }
 
 static gboolean
 _init_download (GstGLDownload * download)
 {
   GstVideoFormat v_format;
-  guint out_width, out_height;
-  GstVideoInfo in_info;
+  GstCaps *in_caps, *out_caps;
+  GstCapsFeatures *out_gl_features;
+  gboolean res;
 
   v_format = GST_VIDEO_INFO_FORMAT (&download->info);
-  out_width = GST_VIDEO_INFO_WIDTH (&download->info);
-  out_height = GST_VIDEO_INFO_HEIGHT (&download->info);
 
   if (download->initted)
     return TRUE;
@@ -260,59 +363,142 @@
     }
   }
 
-  gst_video_info_set_format (&in_info, GST_VIDEO_FORMAT_RGBA, out_width,
-      out_height);
+  out_gl_features =
+      gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  out_caps = gst_video_info_to_caps (&download->info);
+  gst_caps_set_features (out_caps, 0, out_gl_features);
 
-  gst_gl_color_convert_set_format (download->convert, &in_info,
-      &download->info);
+  in_caps = gst_caps_copy (out_caps);
+  gst_caps_set_simple (in_caps, "format", G_TYPE_STRING, "RGBA", NULL);
 
-  return TRUE;
+  res = gst_gl_color_convert_set_caps (download->convert, in_caps, out_caps);
+
+  gst_caps_unref (in_caps);
+  gst_caps_unref (out_caps);
+
+  return res;
 }
 
 static gboolean
-_do_download (GstGLDownload * download, guint texture_id,
-    gpointer data[GST_VIDEO_MAX_PLANES])
+_do_download (GstGLDownload * download, GstBuffer * inbuf)
 {
-  guint out_width, out_height;
-  GstBuffer *inbuf, *outbuf;
+  GstBuffer *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);
+  GstVideoInfo *info;
+  guint views, out_planes;
+  gpointer *data = download->priv->out_data;
 
   if (!download->initted) {
-    if (!_init_download (download))
+    if (!_init_download (download)) {
+      GST_DEBUG_OBJECT (download, "Failed to initialise");
       return FALSE;
+    }
   }
 
-  GST_TRACE ("doing download of texture:%u (%ux%u)",
-      download->priv->in_tex[0]->tex_id, out_width, out_height);
-
-  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)
+  if (!outbuf) {
+    GST_DEBUG_OBJECT (download, "Failed to colour convert for output");
     return FALSE;
+  }
 
-  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&download->info); i++) {
+  info = &download->info;
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    views = GST_VIDEO_INFO_VIEWS (info);
+  else
+    views = 1;
+  out_planes = GST_VIDEO_INFO_N_PLANES (info) * views;
+
+  for (i = 0; i < out_planes; i++) {
     GstMemory *out_mem = gst_buffer_peek_memory (outbuf, i);
-    gpointer temp_data = ((GstGLMemory *) out_mem)->data;
-    ((GstGLMemory *) out_mem)->data = data[i];
+    gpointer temp_data = ((GstGLBaseBuffer *) out_mem)->data;
+    ((GstGLBaseBuffer *) 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;
+    ((GstGLBaseBuffer *) out_mem)->data = temp_data;
+    GST_MINI_OBJECT_FLAG_SET (out_mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
   }
 
-  gst_buffer_unref (inbuf);
   gst_buffer_unref (outbuf);
 
   return ret;
 }
+
+static gboolean
+_gst_gl_download_perform_unlocked (GstGLDownload * download,
+    GstBuffer * inbuf, GstBuffer * outbuf)
+{
+  guint i;
+  gboolean res = FALSE;
+  guint out_width, out_height;
+  GstVideoFrame out_frame;
+
+  g_return_val_if_fail (download != NULL, FALSE);
+  g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&download->info) !=
+      GST_VIDEO_FORMAT_UNKNOWN
+      && GST_VIDEO_INFO_FORMAT (&download->info) != GST_VIDEO_FORMAT_ENCODED,
+      FALSE);
+
+  out_width = GST_VIDEO_INFO_WIDTH (&download->info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&download->info);
+
+  GST_TRACE_OBJECT (download, "doing download of buffer %" GST_PTR_FORMAT
+      " (%ux%u)", inbuf, out_width, out_height);
+
+  /* FIXME: Map multiple views */
+  if (!gst_video_frame_map (&out_frame, &download->info, outbuf, GST_MAP_WRITE))
+    return FALSE;
+
+  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&download->info); i++) {
+    if (out_frame.data[i] == NULL)
+      goto fail;
+    download->priv->out_data[i] = out_frame.data[i];
+  }
+  while (i < GST_GL_DOWNLOAD_MAX_PLANES)
+    download->priv->out_data[i++] = NULL;
+
+  res = _do_download (download, inbuf);
+
+fail:
+  gst_video_frame_unmap (&out_frame);
+  download->priv->inbuf = NULL;
+
+  return res;
+}
+
+/**
+ * gst_gl_download_perform:
+ * @download: a #GstGLDownload
+ * @inbuf: (transfer none): a #GstBuffer input buffer
+ * @outbuf: (transfer none) (out): a #GstBuffer output buffer
+ *
+ * Downloads the contents of @inbuf into @outbuf.
+ *
+ * The output buffer contents must match the #GstVideoFormat passed
+ * to gst_gl_download_set_format(), and the input buffer must
+ * contain #GstGLMemory memory items.
+ *
+ * This method supports downloading multiple views.
+ *
+ * Returns: whether the download was successful
+ */
+gboolean
+gst_gl_download_perform (GstGLDownload * download,
+    GstBuffer * inbuf, GstBuffer * outbuf)
+{
+  gboolean ret;
+
+  g_return_val_if_fail (download != NULL, FALSE);
+
+  GST_OBJECT_LOCK (download);
+  ret = _gst_gl_download_perform_unlocked (download, inbuf, outbuf);
+  GST_OBJECT_UNLOCK (download);
+
+  return ret;
+}
diff --git a/gst-libs/gst/gl/gstgldownload.h b/gst-libs/gst/gl/gstgldownload.h
index 531e4f4..d476854 100644
--- a/gst-libs/gst/gl/gstgldownload.h
+++ b/gst-libs/gst/gl/gstgldownload.h
@@ -73,9 +73,16 @@
 GstGLDownload * gst_gl_download_new          (GstGLContext * context);
 
 void gst_gl_download_set_format                (GstGLDownload * download, GstVideoInfo * out_info);
+GstCaps * gst_gl_download_transform_caps       (GstGLContext * convert,
+                                                GstPadDirection direction,
+                                                GstCaps * caps,
+                                                GstCaps * filter);
 
-gboolean gst_gl_download_perform_with_data          (GstGLDownload * download, GLuint texture_id,
+gboolean gst_gl_download_perform_with_data          (GstGLDownload * download,
+                                                     GLuint texture_id, GLuint texture_target,
                                                      gpointer data[GST_VIDEO_MAX_PLANES]);
+gboolean gst_gl_download_perform (GstGLDownload * download,
+                                  GstBuffer *inbuf, GstBuffer *outbuf);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 26bf3f9..fd29ee0 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -24,6 +24,8 @@
 #include "config.h"
 #endif
 
+#include <gst/video/gstvideometa.h>
+
 #include "gstglfilter.h"
 
 #if GST_GL_HAVE_PLATFORM_EGL
@@ -35,65 +37,46 @@
 
 
 static GstStaticPadTemplate gst_gl_filter_src_pad_template =
-    GST_STATIC_PAD_TEMPLATE ("src",
+GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
         (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-#if GST_GL_HAVE_PLATFORM_EGL
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
-            "RGBA") "; "
-#endif
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
-            "RGBA") "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+            "RGBA"))
     );
 
 static GstStaticPadTemplate gst_gl_filter_sink_pad_template =
-    GST_STATIC_PAD_TEMPLATE ("sink",
+GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
         (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
-            "RGBA") "; "
-#if GST_GL_HAVE_PLATFORM_EGL
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE,
-            "RGBA") "; "
-#endif
-        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") "; "
-        GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
+            "RGBA"))
     );
 
 /* Properties */
 enum
 {
   PROP_0,
-  PROP_OTHER_CONTEXT
 };
 
-#define DEBUG_INIT \
-  GST_DEBUG_CATEGORY_INIT (gst_gl_filter_debug, "glfilter", 0, "glfilter element");
 #define gst_gl_filter_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstGLFilter, gst_gl_filter, GST_TYPE_BASE_TRANSFORM,
-    DEBUG_INIT);
+G_DEFINE_TYPE_WITH_CODE (GstGLFilter, gst_gl_filter, GST_TYPE_GL_BASE_FILTER,
+    GST_DEBUG_CATEGORY_INIT (gst_gl_filter_debug, "glfilter", 0,
+        "glfilter element"););
 
 static void gst_gl_filter_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 static void gst_gl_filter_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static void gst_gl_filter_set_context (GstElement * element,
-    GstContext * context);
-static gboolean gst_gl_filter_query (GstBaseTransform * trans,
-    GstPadDirection direction, GstQuery * query);
 static GstCaps *gst_gl_filter_transform_caps (GstBaseTransform * bt,
     GstPadDirection direction, GstCaps * caps, GstCaps * filter);
+static GstCaps *default_transform_internal_caps (GstGLFilter * filter,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps);
 static GstCaps *gst_gl_filter_fixate_caps (GstBaseTransform * bt,
     GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
 static void gst_gl_filter_reset (GstGLFilter * filter);
-static gboolean gst_gl_filter_start (GstBaseTransform * bt);
 static gboolean gst_gl_filter_stop (GstBaseTransform * bt);
 static gboolean gst_gl_filter_get_unit_size (GstBaseTransform * trans,
     GstCaps * caps, gsize * size);
@@ -105,10 +88,8 @@
     GstQuery * query);
 static gboolean gst_gl_filter_set_caps (GstBaseTransform * bt, GstCaps * incaps,
     GstCaps * outcaps);
-
-/* GstGLContextThreadFunc */
-static void gst_gl_filter_start_gl (GstGLContext * context, gpointer data);
-static void gst_gl_filter_stop_gl (GstGLContext * context, gpointer data);
+static gboolean gst_gl_filter_gl_start (GstGLBaseFilter * filter);
+static void gst_gl_filter_gl_stop (GstGLBaseFilter * filter);
 
 static void
 gst_gl_filter_class_init (GstGLFilterClass * klass)
@@ -126,8 +107,6 @@
       gst_gl_filter_transform_caps;
   GST_BASE_TRANSFORM_CLASS (klass)->fixate_caps = gst_gl_filter_fixate_caps;
   GST_BASE_TRANSFORM_CLASS (klass)->transform = gst_gl_filter_transform;
-  GST_BASE_TRANSFORM_CLASS (klass)->query = gst_gl_filter_query;
-  GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_filter_start;
   GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_filter_stop;
   GST_BASE_TRANSFORM_CLASS (klass)->set_caps = gst_gl_filter_set_caps;
   GST_BASE_TRANSFORM_CLASS (klass)->propose_allocation =
@@ -136,50 +115,29 @@
       gst_gl_filter_decide_allocation;
   GST_BASE_TRANSFORM_CLASS (klass)->get_unit_size = gst_gl_filter_get_unit_size;
 
-  element_class->set_context = gst_gl_filter_set_context;
+  GST_GL_BASE_FILTER_CLASS (klass)->gl_start = gst_gl_filter_gl_start;
+  GST_GL_BASE_FILTER_CLASS (klass)->gl_stop = gst_gl_filter_gl_stop;
 
-  g_object_class_install_property (gobject_class, PROP_OTHER_CONTEXT,
-      g_param_spec_object ("other-context",
-          "External OpenGL context",
-          "Give an external OpenGL context with which to share textures",
-          GST_GL_TYPE_CONTEXT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  klass->transform_internal_caps = default_transform_internal_caps;
 
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&gst_gl_filter_src_pad_template));
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&gst_gl_filter_sink_pad_template));
-
-  klass->set_caps = NULL;
-  klass->filter = NULL;
-  klass->display_init_cb = NULL;
-  klass->display_reset_cb = NULL;
-  klass->onInitFBO = NULL;
-  klass->onStart = NULL;
-  klass->onStop = NULL;
-  klass->onReset = NULL;
-  klass->filter_texture = NULL;
 }
 
 static void
 gst_gl_filter_init (GstGLFilter * filter)
 {
-  gst_gl_filter_reset (filter);
+  filter->draw_attr_position_loc = -1;
+  filter->draw_attr_texture_loc = -1;
 }
 
 static void
 gst_gl_filter_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstGLFilter *filter = GST_GL_FILTER (object);
-
   switch (prop_id) {
-    case PROP_OTHER_CONTEXT:
-    {
-      if (filter->other_context)
-        gst_object_unref (filter->other_context);
-      filter->other_context = g_value_dup_object (value);
-      break;
-    }
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -190,12 +148,7 @@
 gst_gl_filter_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
-  GstGLFilter *filter = GST_GL_FILTER (object);
-
   switch (prop_id) {
-    case PROP_OTHER_CONTEXT:
-      g_value_set_object (value, filter->other_context);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -203,150 +156,101 @@
 }
 
 static void
-gst_gl_filter_set_context (GstElement * element, GstContext * context)
-{
-  GstGLFilter *filter = GST_GL_FILTER (element);
-
-  gst_gl_handle_set_context (element, context, &filter->display);
-}
-
-static gboolean
-gst_gl_filter_query (GstBaseTransform * trans, GstPadDirection direction,
-    GstQuery * query)
-{
-  GstGLFilter *filter;
-
-  filter = GST_GL_FILTER (trans);
-
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_ALLOCATION:
-    {
-      if (direction == GST_PAD_SINK
-          && gst_base_transform_is_passthrough (trans))
-        return gst_pad_peer_query (GST_BASE_TRANSFORM_SRC_PAD (trans), query);
-      break;
-    }
-    case GST_QUERY_CONTEXT:
-    {
-      return gst_gl_handle_context_query ((GstElement *) filter, query,
-          &filter->display);
-      break;
-    }
-    default:
-      break;
-  }
-
-  return GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction,
-      query);;
-}
-
-static void
 gst_gl_filter_reset (GstGLFilter * filter)
 {
-  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
-
   gst_caps_replace (&filter->out_caps, NULL);
-
-  if (filter->upload) {
-    gst_object_unref (filter->upload);
-    filter->upload = NULL;
-  }
-
-  if (filter->download) {
-    gst_object_unref (filter->download);
-    filter->download = NULL;
-  }
-
-  if (filter->context) {
-    if (filter_class->onReset)
-      filter_class->onReset (filter);
-
-    if (filter_class->display_reset_cb != NULL) {
-      gst_gl_context_thread_add (filter->context, gst_gl_filter_stop_gl,
-          filter);
-    }
-    //blocking call, delete the FBO
-    if (filter->fbo != 0) {
-      gst_gl_context_del_fbo (filter->context, filter->fbo,
-          filter->depthbuffer);
-    }
-
-    if (filter->in_tex_id) {
-      gst_gl_context_del_texture (filter->context, &filter->in_tex_id);
-      filter->in_tex_id = 0;
-    }
-
-    if (filter->out_tex_id) {
-      gst_gl_context_del_texture (filter->context, &filter->out_tex_id);
-      filter->out_tex_id = 0;
-    }
-
-    gst_object_unref (filter->context);
-    filter->context = NULL;
-  }
-
-  if (filter->display) {
-    gst_object_unref (filter->display);
-    filter->display = NULL;
-  }
-
-  filter->fbo = 0;
-  filter->depthbuffer = 0;
-  filter->default_shader = NULL;
-  if (filter->other_context)
-    gst_object_unref (filter->other_context);
-  filter->other_context = NULL;
-
-  if (filter->context)
-    gst_object_unref (filter->context);
-  filter->context = NULL;
-}
-
-static gboolean
-gst_gl_filter_start (GstBaseTransform * bt)
-{
-  GstGLFilter *filter = GST_GL_FILTER (bt);
-  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
-
-  if (!gst_gl_ensure_display (filter, &filter->display))
-    return FALSE;
-
-  if (filter_class->onStart)
-    filter_class->onStart (filter);
-
-  return TRUE;
 }
 
 static gboolean
 gst_gl_filter_stop (GstBaseTransform * bt)
 {
   GstGLFilter *filter = GST_GL_FILTER (bt);
-  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
-
-  if (filter_class->onStop)
-    filter_class->onStop (filter);
 
   gst_gl_filter_reset (filter);
 
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (bt);
+}
+
+static gboolean
+gst_gl_filter_gl_start (GstGLBaseFilter * base_filter)
+{
+  GstGLFilter *filter = GST_GL_FILTER (base_filter);
+  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  gint out_width, out_height;
+
+  out_width = GST_VIDEO_INFO_WIDTH (&filter->out_info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&filter->out_info);
+
+  if (filter->fbo) {
+    gst_gl_context_del_fbo (context, filter->fbo, filter->depthbuffer);
+    filter->fbo = 0;
+    filter->depthbuffer = 0;
+  }
+  //blocking call, generate a FBO
+  if (!gst_gl_context_gen_fbo (context, out_width, out_height,
+          &filter->fbo, &filter->depthbuffer))
+    goto context_error;
+
+  if (filter_class->display_init_cb)
+    filter_class->display_init_cb (filter);
+
+  if (filter_class->init_fbo) {
+    if (!filter_class->init_fbo (filter))
+      goto error;
+  }
+
   return TRUE;
+
+context_error:
+  {
+    GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND, ("Could not generate FBO"),
+        (NULL));
+    return FALSE;
+  }
+error:
+  {
+    GST_ELEMENT_ERROR (filter, LIBRARY, INIT,
+        ("Subclass failed to initialize."), (NULL));
+    return FALSE;
+  }
 }
 
 static void
-gst_gl_filter_start_gl (GstGLContext * context, gpointer data)
+gst_gl_filter_gl_stop (GstGLBaseFilter * base_filter)
 {
-  GstGLFilter *filter = GST_GL_FILTER (data);
+  GstGLFilter *filter = GST_GL_FILTER (base_filter);
   GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  const GstGLFuncs *gl = context->gl_vtable;
 
-  filter_class->display_init_cb (filter);
-}
+  if (filter_class->display_reset_cb)
+    filter_class->display_reset_cb (filter);
 
-static void
-gst_gl_filter_stop_gl (GstGLContext * context, gpointer data)
-{
-  GstGLFilter *filter = GST_GL_FILTER (data);
-  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
+  if (filter->vao) {
+    gl->DeleteVertexArrays (1, &filter->vao);
+    filter->vao = 0;
+  }
 
-  filter_class->display_reset_cb (filter);
+  if (filter->vertex_buffer) {
+    gl->DeleteBuffers (1, &filter->vertex_buffer);
+    filter->vertex_buffer = 0;
+  }
+
+  if (filter->vbo_indices) {
+    gl->DeleteBuffers (1, &filter->vbo_indices);
+    filter->vbo_indices = 0;
+  }
+
+  if (filter->fbo != 0) {
+    gst_gl_context_del_fbo (context, filter->fbo, filter->depthbuffer);
+  }
+
+  filter->fbo = 0;
+  filter->depthbuffer = 0;
+  filter->default_shader = NULL;
+  filter->draw_attr_position_loc = -1;
+  filter->draw_attr_texture_loc = -1;
 }
 
 static GstCaps *
@@ -423,18 +327,13 @@
     /* if both width and height are already fixed, we can't do anything
      * about it anymore */
     if (w && h) {
-      gint n = 1, d = 1;
-
       GST_DEBUG_OBJECT (bt, "dimensions already set to %dx%d, not fixating",
           w, h);
       if (!gst_value_is_fixed (to_par)) {
-        GST_DEBUG_OBJECT (bt, "fixating to_par to %dx%d", n, d);
+        GST_DEBUG_OBJECT (bt, "fixating to_par to %dx%d", 1, 1);
         if (gst_structure_has_field (outs, "pixel-aspect-ratio"))
           gst_structure_fixate_field_nearest_fraction (outs,
               "pixel-aspect-ratio", 1, 1);
-        else if (n != d)
-          gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION,
-              1, 1, NULL);
       }
       goto done;
     }
@@ -588,6 +487,7 @@
               &to_par_n, &to_par_d)) {
         GST_ELEMENT_ERROR (bt, CORE, NEGOTIATION, (NULL),
             ("Error calculating the output scaled size - integer overflow"));
+        gst_structure_free (tmp);
         goto done;
       }
 
@@ -677,36 +577,9 @@
   return othercaps;
 }
 
-
-static GstCaps *
-gst_gl_filter_set_caps_features (const GstCaps * caps,
-    const gchar * feature_name)
-{
-  GstCaps *tmp = gst_caps_copy (caps);
-  guint n = gst_caps_get_size (tmp);
-  guint i = 0;
-
-  for (i = 0; i < n; i++) {
-    GstCapsFeatures *features = gst_caps_get_features (tmp, i);
-    if (features) {
-      guint n_f = gst_caps_features_get_size (features);
-      guint j = 0;
-      for (j = 0; j < n_f; j++) {
-        gst_caps_features_remove_id (features,
-            gst_caps_features_get_nth_id (features, j));
-      }
-    }
-
-    gst_caps_features_add (features, feature_name);
-    gst_caps_set_simple (tmp, "format", G_TYPE_STRING, "RGBA", NULL);
-  }
-
-  return tmp;
-}
-
 /* copies the given caps */
 static GstCaps *
-gst_gl_filter_caps_remove_format_info (GstCaps * caps)
+gst_gl_filter_caps_remove_size (GstCaps * caps)
 {
   GstStructure *st;
   GstCapsFeatures *f;
@@ -726,12 +599,14 @@
       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_structure_set (st, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+
+    /* if pixel aspect ratio, make a range of it */
+    if (gst_structure_has_field (st, "pixel-aspect-ratio")) {
+      gst_structure_set (st, "pixel-aspect-ratio",
+          GST_TYPE_FRACTION_RANGE, 1, G_MAXINT, G_MAXINT, 1, NULL);
+    }
 
     gst_caps_append_structure_full (res, st, gst_caps_features_copy (f));
   }
@@ -740,57 +615,53 @@
 }
 
 static GstCaps *
-gst_gl_filter_transform_caps (GstBaseTransform * bt,
-    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+gst_gl_filter_set_caps_features (const GstCaps * caps,
+    const gchar * feature_name)
 {
+  GstCaps *ret = gst_gl_caps_replace_all_caps_features (caps, feature_name);
+  gst_caps_set_simple (ret, "format", G_TYPE_STRING, "RGBA", NULL);
+  return ret;
+}
+
+static GstCaps *
+default_transform_internal_caps (GstGLFilter * filter,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps)
+{
+  GstCaps *tmp = gst_gl_filter_caps_remove_size (caps);
+
+  GST_DEBUG_OBJECT (filter, "size removal returned caps %" GST_PTR_FORMAT, tmp);
+  return tmp;
+}
+
+static GstCaps *
+gst_gl_filter_transform_caps (GstBaseTransform * bt,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps)
+{
+  GstGLFilter *filter = GST_GL_FILTER (bt);
   GstCaps *tmp = NULL;
   GstCaps *result = NULL;
-  GstCaps *glcaps = gst_gl_filter_set_caps_features (caps,
-      GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
-#if GST_GL_HAVE_PLATFORM_EGL
-  GstCaps *eglcaps = gst_gl_filter_set_caps_features (caps,
-      GST_CAPS_FEATURE_MEMORY_EGL_IMAGE);
-#endif
-  GstCaps *uploadcaps = gst_gl_filter_set_caps_features (caps,
-      GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);
-  GstCaps *raw_caps =
-      gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS));
-  GstCapsFeatures *f;
 
-  tmp = gst_caps_new_empty ();
+  tmp = GST_GL_FILTER_GET_CLASS (filter)->transform_internal_caps (filter,
+      direction, caps, NULL);
 
-  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, raw_caps);
+  result =
+      gst_gl_filter_set_caps_features (tmp, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  gst_caps_unref (tmp);
+  tmp = result;
 
-  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);
+  if (filter_caps) {
+    result =
+        gst_caps_intersect_full (filter_caps, tmp, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (tmp);
   } else {
     result = tmp;
   }
 
-  /* if output still intersects input then prefer the intersection */
-  f = gst_caps_get_features (caps, 0);
-
-  if (!gst_caps_features_is_any (f)
-      && !gst_caps_features_is_equal (f,
-          GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
-    tmp = gst_caps_intersect_full (result, caps, GST_CAPS_INTERSECT_FIRST);
-    result = gst_caps_merge (tmp, result);
-  }
-
   GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result);
 
   return result;
 }
 
-
 static gboolean
 gst_gl_filter_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
     gsize * size)
@@ -827,8 +698,10 @@
 
   gst_caps_replace (&filter->out_caps, outcaps);
 
-  GST_DEBUG ("set_caps %dx%d", GST_VIDEO_INFO_WIDTH (&filter->out_info),
-      GST_VIDEO_INFO_HEIGHT (&filter->out_info));
+  GST_DEBUG_OBJECT (filter, "set_caps %dx%d in %" GST_PTR_FORMAT
+      " out %" GST_PTR_FORMAT,
+      GST_VIDEO_INFO_WIDTH (&filter->out_info),
+      GST_VIDEO_INFO_HEIGHT (&filter->out_info), incaps, outcaps);
 
   return TRUE;
 
@@ -849,126 +722,44 @@
     GstQuery * decide_query, GstQuery * query)
 {
   GstGLFilter *filter = GST_GL_FILTER (trans);
-  GstBufferPool *pool;
-  GstStructure *config;
-  GstCaps *caps, *decide_caps;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  GstCaps *caps;
   guint size;
   gboolean need_pool;
-  GError *error = NULL;
-  GstStructure *gl_context;
-  gchar *platform, *gl_apis;
-  gpointer handle;
-  GstAllocator *allocator = NULL;
-  GstAllocationParams params;
 
   gst_query_parse_allocation (query, &caps, &need_pool);
 
   if (caps == NULL)
     goto no_caps;
 
-  if ((pool = filter->pool))
-    gst_object_ref (pool);
-
-  if (pool != NULL) {
-    GstCaps *pcaps;
-
-    /* we had a pool, check caps */
-    GST_DEBUG_OBJECT (filter, "check existing pool caps");
-    config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
-
-    if (!gst_caps_is_equal (caps, pcaps)) {
-      GST_DEBUG_OBJECT (filter, "pool has different caps");
-      /* different caps, we can't use this pool */
-      gst_object_unref (pool);
-      pool = NULL;
-    }
-    gst_structure_free (config);
-  }
-
-  if (!gst_gl_ensure_display (filter, &filter->display))
-    return FALSE;
-
-  if (!filter->context) {
-    filter->context = gst_gl_context_new (filter->display);
-    if (!gst_gl_context_create (filter->context, filter->other_context, &error))
-      goto context_error;
-  }
-
-  if (pool == NULL && need_pool) {
+  if (need_pool) {
+    GstBufferPool *pool;
+    GstStructure *config;
     GstVideoInfo info;
-    GstBufferPool *decide_pool = NULL;
 
     if (!gst_video_info_from_caps (&info, caps))
       goto invalid_caps;
 
-    if (decide_query) {
-      gst_query_parse_allocation (decide_query, &decide_caps, NULL);
-      decide_pool = gst_base_transform_get_buffer_pool (trans);
+    /* the normal size of a frame */
+    size = info.size;
+
+    GST_DEBUG_OBJECT (filter, "create new pool");
+    pool = gst_gl_buffer_pool_new (context);
+
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+
+    if (!gst_buffer_pool_set_config (pool, config)) {
+      g_object_unref (pool);
+      goto config_failed;
     }
 
-    if (decide_pool && GST_IS_GL_BUFFER_POOL (decide_pool)
-        && gst_caps_is_equal_fixed (decide_caps, caps)) {
-      config = gst_buffer_pool_get_config (pool);
-      gst_buffer_pool_config_get_params (config, NULL, &size, NULL, NULL);
-      gst_structure_free (config);
-
-      pool = decide_pool;
-    } else {
-      GST_DEBUG_OBJECT (filter, "create new pool");
-      if (decide_pool)
-        gst_object_unref (decide_pool);
-      pool = gst_gl_buffer_pool_new (filter->context);
-
-      /* the normal size of a frame */
-      size = info.size;
-
-      config = gst_buffer_pool_get_config (pool);
-      gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
-      if (!gst_buffer_pool_set_config (pool, config))
-        goto config_failed;
-    }
-  }
-  /* we need at least 2 buffer because we hold on to the last one */
-  if (pool) {
     gst_query_add_allocation_pool (query, pool, size, 1, 0);
-    gst_object_unref (pool);
+    g_object_unref (pool);
   }
 
-  /* we also support various metadata */
-  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
-
-  gl_apis = gst_gl_api_to_string (gst_gl_context_get_gl_api (filter->context));
-  platform =
-      gst_gl_platform_to_string (gst_gl_context_get_gl_platform
-      (filter->context));
-  handle = (gpointer) gst_gl_context_get_gl_context (filter->context);
-
-  gl_context =
-      gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
-      GST_GL_TYPE_CONTEXT, filter->context, "gst.gl.context.handle",
-      G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
-      "gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
-  gst_query_add_allocation_meta (query,
-      GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, gl_context);
-
-  g_free (gl_apis);
-  g_free (platform);
-  gst_structure_free (gl_context);
-
-  gst_allocation_params_init (&params);
-
-  allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
-  gst_query_add_allocation_param (query, allocator, &params);
-  gst_object_unref (allocator);
-
-#if GST_GL_HAVE_PLATFORM_EGL
-  if (gst_gl_context_check_feature (filter->context, "EGL_KHR_image_base")) {
-    allocator = gst_allocator_find (GST_EGL_IMAGE_MEMORY_TYPE);
-    gst_query_add_allocation_param (query, allocator, &params);
-    gst_object_unref (allocator);
-  }
-#endif
+  if (context->gl_vtable->FenceSync)
+    gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0);
 
   return TRUE;
 
@@ -988,127 +779,28 @@
     GST_DEBUG_OBJECT (trans, "failed setting config");
     return FALSE;
   }
-context_error:
-  {
-    GST_ELEMENT_ERROR (trans, RESOURCE, NOT_FOUND, ("%s", error->message),
-        (NULL));
-    return FALSE;
-  }
 }
 
 static gboolean
 gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
 {
-  GstGLFilter *filter = GST_GL_FILTER (trans);
-  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
+  GstGLContext *context;
   GstBufferPool *pool = NULL;
   GstStructure *config;
   GstCaps *caps;
   guint min, max, size;
   gboolean update_pool;
-  guint idx;
-  GError *error = NULL;
-  guint in_width, in_height, out_width, out_height;
-  GstGLContext *other_context = NULL;
-
-  if (!gst_gl_ensure_display (filter, &filter->display))
-    return FALSE;
-
-  if (gst_query_find_allocation_meta (query,
-          GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx)) {
-    GstGLContext *context;
-    const GstStructure *upload_meta_params;
-    gpointer handle;
-    gchar *type;
-    gchar *apis;
-
-    gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
-    if (upload_meta_params) {
-      if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
-              GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
-        GstGLContext *old = filter->context;
-
-        filter->context = context;
-        if (old)
-          gst_object_unref (old);
-      } else if (gst_structure_get (upload_meta_params, "gst.gl.context.handle",
-              G_TYPE_POINTER, &handle, "gst.gl.context.type", G_TYPE_STRING,
-              &type, "gst.gl.context.apis", G_TYPE_STRING, &apis, NULL)
-          && handle) {
-        GstGLPlatform platform = GST_GL_PLATFORM_NONE;
-        GstGLAPI gl_apis;
-
-        GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
-            handle, type, apis);
-
-        platform = gst_gl_platform_from_string (type);
-        gl_apis = gst_gl_api_from_string (apis);
-
-        if (gl_apis && platform)
-          other_context =
-              gst_gl_context_new_wrapped (filter->display, (guintptr) handle,
-              platform, gl_apis);
-      }
-    }
-  }
-
-  if (filter->other_context) {
-    if (!other_context) {
-      other_context = filter->other_context;
-    } else {
-      GST_ELEMENT_WARNING (filter, LIBRARY, SETTINGS,
-          ("%s", "Cannot share with more than one GL context"),
-          ("%s", "Cannot share with more than one GL context"));
-    }
-  }
-
-  if (!filter->context) {
-    filter->context = gst_gl_context_new (filter->display);
-    if (!gst_gl_context_create (filter->context, other_context, &error))
-      goto context_error;
-  }
-
-  in_width = GST_VIDEO_INFO_WIDTH (&filter->in_info);
-  in_height = GST_VIDEO_INFO_HEIGHT (&filter->in_info);
-  out_width = GST_VIDEO_INFO_WIDTH (&filter->out_info);
-  out_height = GST_VIDEO_INFO_HEIGHT (&filter->out_info);
-
-  if (filter->fbo) {
-    gst_gl_context_del_fbo (filter->context, filter->fbo, filter->depthbuffer);
-    filter->fbo = 0;
-    filter->depthbuffer = 0;
-  }
-
-  if (filter->in_tex_id) {
-    gst_gl_context_del_texture (filter->context, &filter->in_tex_id);
-    filter->in_tex_id = 0;
-  }
-
-  if (filter->out_tex_id) {
-    gst_gl_context_del_texture (filter->context, &filter->out_tex_id);
-    filter->out_tex_id = 0;
-  }
-  //blocking call, generate a FBO
-  if (!gst_gl_context_gen_fbo (filter->context, out_width, out_height,
-          &filter->fbo, &filter->depthbuffer))
-    goto context_error;
-
-  gst_gl_context_gen_texture (filter->context, &filter->in_tex_id,
-      GST_VIDEO_FORMAT_RGBA, in_width, in_height);
-
-  gst_gl_context_gen_texture (filter->context, &filter->out_tex_id,
-      GST_VIDEO_FORMAT_RGBA, out_width, out_height);
-
-  if (filter_class->display_init_cb != NULL) {
-    gst_gl_context_thread_add (filter->context, gst_gl_filter_start_gl, filter);
-  }
-
-  if (filter_class->onInitFBO) {
-    if (!filter_class->onInitFBO (filter))
-      goto error;
-  }
 
   gst_query_parse_allocation (query, &caps, NULL);
+  if (!caps)
+    return FALSE;
+
+  /* get gl context */
+  if (!GST_BASE_TRANSFORM_CLASS (parent_class)->decide_allocation (trans,
+          query))
+    return FALSE;
+
+  context = GST_GL_BASE_FILTER (trans)->context;
 
   if (gst_query_get_n_allocation_pools (query) > 0) {
     gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
@@ -1124,18 +816,21 @@
     update_pool = FALSE;
   }
 
-  if (!pool)
-    pool = gst_gl_buffer_pool_new (filter->context);
+  if (!pool || !GST_IS_GL_BUFFER_POOL (pool)) {
+    if (pool)
+      gst_object_unref (pool);
+    pool = gst_gl_buffer_pool_new (context);
+  }
 
   config = gst_buffer_pool_get_config (pool);
+
   gst_buffer_pool_config_set_params (config, caps, size, min, max);
   gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
-  gst_buffer_pool_set_config (pool, config);
+  if (gst_query_find_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, NULL))
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_GL_SYNC_META);
 
-  if (filter->upload) {
-    gst_object_unref (filter->upload);
-    filter->upload = NULL;
-  }
+  gst_buffer_pool_set_config (pool, config);
 
   if (update_pool)
     gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
@@ -1145,19 +840,6 @@
   gst_object_unref (pool);
 
   return TRUE;
-
-context_error:
-  {
-    GST_ELEMENT_ERROR (trans, RESOURCE, NOT_FOUND, ("%s", error->message),
-        (NULL));
-    return FALSE;
-  }
-error:
-  {
-    GST_ELEMENT_ERROR (trans, LIBRARY, INIT,
-        ("Subclass failed to initialize."), (NULL));
-    return FALSE;
-  }
 }
 
 /**
@@ -1177,63 +859,37 @@
 {
   GstGLFilterClass *filter_class;
   guint in_tex, out_tex;
-  GstVideoFrame out_frame;
+  GstVideoFrame gl_frame, out_frame;
   gboolean ret;
-  gboolean to_download =
-      gst_caps_features_is_equal (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
-      gst_caps_get_features (filter->out_caps, 0));
-  GstMapFlags out_map_flags = GST_MAP_WRITE;
 
   filter_class = GST_GL_FILTER_GET_CLASS (filter);
 
-  if (!gst_gl_upload_perform_with_buffer (filter->upload, inbuf, &in_tex))
-    return FALSE;
-
-  to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (outbuf, 0));
-
-  if (!to_download)
-    out_map_flags |= GST_MAP_GL;
-
-  if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
-          out_map_flags)) {
+  if (!gst_video_frame_map (&gl_frame, &filter->in_info, inbuf,
+          GST_MAP_READ | GST_MAP_GL)) {
     ret = FALSE;
     goto inbuf_error;
   }
 
-  if (!to_download) {
-    out_tex = *(guint *) out_frame.data[0];
-  } else {
-    GST_LOG ("Output Buffer does not contain correct memory, "
-        "attempting to wrap for download");
+  in_tex = *(guint *) gl_frame.data[0];
 
-    if (!filter->download)
-      filter->download = gst_gl_download_new (filter->context);
-
-    gst_gl_download_set_format (filter->download, &out_frame.info);
-
-    out_tex = filter->out_tex_id;
+  if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
+          GST_MAP_WRITE | GST_MAP_GL)) {
+    ret = FALSE;
+    goto unmap_out_error;
   }
 
+  out_tex = *(guint *) out_frame.data[0];
+
   GST_DEBUG ("calling filter_texture with textures in:%i out:%i", in_tex,
       out_tex);
 
   g_assert (filter_class->filter_texture);
   ret = filter_class->filter_texture (filter, in_tex, out_tex);
 
-  if (to_download) {
-    if (!gst_gl_download_perform_with_data (filter->download, out_tex,
-            out_frame.data)) {
-      GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
-          ("%s", "Failed to download video frame"), (NULL));
-      ret = FALSE;
-      goto error;
-    }
-  }
-
-error:
   gst_video_frame_unmap (&out_frame);
+unmap_out_error:
+  gst_video_frame_unmap (&gl_frame);
 inbuf_error:
-  gst_gl_upload_release_buffer (filter->upload);
 
   return ret;
 }
@@ -1242,31 +898,52 @@
 gst_gl_filter_transform (GstBaseTransform * bt, GstBuffer * inbuf,
     GstBuffer * outbuf)
 {
-  GstGLFilter *filter;
-  GstGLFilterClass *filter_class;
+  GstGLFilter *filter = GST_GL_FILTER (bt);
+  GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (bt);
+  GstGLDisplay *display = GST_GL_BASE_FILTER (bt)->display;
+  GstGLContext *context = GST_GL_BASE_FILTER (bt)->context;
+  GstGLSyncMeta *out_sync_meta, *in_sync_meta;
+  gboolean ret;
 
-  filter = GST_GL_FILTER (bt);
-  filter_class = GST_GL_FILTER_GET_CLASS (bt);
-
-  if (!gst_gl_ensure_display (filter, &filter->display))
+  if (!display)
     return GST_FLOW_NOT_NEGOTIATED;
 
-  if (!filter->upload) {
-    filter->upload = gst_gl_upload_new (filter->context);
-    gst_gl_upload_set_format (filter->upload, &filter->in_info);
-  }
-
   g_assert (filter_class->filter || filter_class->filter_texture);
 
-  if (filter_class->filter)
-    filter_class->filter (filter, inbuf, outbuf);
-  else if (filter_class->filter_texture)
-    gst_gl_filter_filter_texture (filter, inbuf, outbuf);
+  in_sync_meta = gst_buffer_get_gl_sync_meta (inbuf);
+  if (in_sync_meta)
+    gst_gl_sync_meta_wait (in_sync_meta, context);
 
-  return GST_FLOW_OK;
+  if (filter_class->filter)
+    ret = filter_class->filter (filter, inbuf, outbuf);
+  else
+    ret = gst_gl_filter_filter_texture (filter, inbuf, outbuf);
+
+  out_sync_meta = gst_buffer_get_gl_sync_meta (outbuf);
+  if (out_sync_meta)
+    gst_gl_sync_meta_set_sync_point (out_sync_meta, context);
+
+  return ret ? GST_FLOW_OK : GST_FLOW_ERROR;
 }
 
+struct glcb2
+{
+  GLCB func;
+  gpointer data;
+  guint texture;
+  guint width;
+  guint height;
+};
+
 /* convenience functions to simplify filter development */
+static void
+_glcb2 (gpointer data)
+{
+  struct glcb2 *cb = data;
+
+  cb->func (cb->width, cb->height, cb->texture, cb->data);
+}
+
 /**
  * gst_gl_filter_render_to_target:
  * @filter: a #GstGLFilter
@@ -1284,7 +961,9 @@
 gst_gl_filter_render_to_target (GstGLFilter * filter, gboolean resize,
     GLuint input, GLuint target, GLCB func, gpointer data)
 {
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   guint in_width, in_height, out_width, out_height;
+  struct glcb2 cb;
 
   out_width = GST_VIDEO_INFO_WIDTH (&filter->out_info);
   out_height = GST_VIDEO_INFO_HEIGHT (&filter->out_info);
@@ -1299,21 +978,25 @@
   GST_LOG ("rendering to target. in %u, %ux%u out %u, %ux%u", input, in_width,
       in_height, target, out_width, out_height);
 
-  gst_gl_context_use_fbo (filter->context,
-      out_width, out_height,
-      filter->fbo, filter->depthbuffer, target,
-      func, in_width, in_height, input, 0,
-      in_width, 0, in_height, GST_GL_DISPLAY_PROJECTION_ORTHO2D, data);
+  cb.func = func;
+  cb.data = data;
+  cb.texture = input;
+  cb.width = in_width;
+  cb.height = in_height;
+
+  gst_gl_context_use_fbo_v2 (context, out_width, out_height,
+      filter->fbo, filter->depthbuffer, target, _glcb2, &cb);
 }
 
 static void
 _draw_with_shader_cb (gint width, gint height, guint texture, gpointer stuff)
 {
   GstGLFilter *filter = GST_GL_FILTER (stuff);
-  GstGLFuncs *gl = filter->context->gl_vtable;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  GstGLFuncs *gl = context->gl_vtable;
 
 #if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL) {
+  if (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL) {
     gl->MatrixMode (GL_PROJECTION);
     gl->LoadIdentity ();
   }
@@ -1331,6 +1014,23 @@
   gst_gl_filter_draw_texture (filter, texture, width, height);
 }
 
+static void
+_get_attributes (GstGLFilter * filter)
+{
+  if (!filter->default_shader)
+    return;
+
+  if (filter->draw_attr_position_loc == -1)
+    filter->draw_attr_position_loc =
+        gst_gl_shader_get_attribute_location (filter->default_shader,
+        "a_position");
+
+  if (filter->draw_attr_texture_loc == -1)
+    filter->draw_attr_texture_loc =
+        gst_gl_shader_get_attribute_location (filter->default_shader,
+        "a_texcoord");
+}
+
 /**
  * gst_gl_filter_render_to_target_with_shader:
  * @filter: a #GstGLFilter
@@ -1352,10 +1052,59 @@
     gboolean resize, GLuint input, GLuint target, GstGLShader * shader)
 {
   filter->default_shader = shader;
+  _get_attributes (filter);
+
   gst_gl_filter_render_to_target (filter, resize, input, target,
       _draw_with_shader_cb, filter);
 }
 
+/* *INDENT-OFF* */
+static const GLfloat vertices[] = {
+  -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+   1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+   1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
+  -1.0f,  1.0f, 0.0f, 0.0f, 1.0f
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+/* *INDENT-ON* */
+
+static void
+_bind_buffer (GstGLFilter * filter)
+{
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, filter->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, filter->vertex_buffer);
+
+  _get_attributes (filter);
+  /* Load the vertex position */
+  gl->VertexAttribPointer (filter->draw_attr_position_loc, 3, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), (void *) 0);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (filter->draw_attr_texture_loc, 2, GL_FLOAT, GL_FALSE,
+      5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+
+
+  gl->EnableVertexAttribArray (filter->draw_attr_position_loc);
+  gl->EnableVertexAttribArray (filter->draw_attr_texture_loc);
+}
+
+static void
+_unbind_buffer (GstGLFilter * filter)
+{
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+
+  gl->DisableVertexAttribArray (filter->draw_attr_position_loc);
+  gl->DisableVertexAttribArray (filter->draw_attr_texture_loc);
+}
+
 /**
  * gst_gl_filter_draw_texture:
  * @filter: a #GstGLFilter
@@ -1369,72 +1118,47 @@
 gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture,
     guint width, guint height)
 {
-  GstGLContext *context = filter->context;
+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
   GstGLFuncs *gl = context->gl_vtable;
 
   GST_DEBUG ("drawing texture:%u dimensions:%ux%u", texture, width, height);
 
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL) {
-    GLfloat verts[] = { -1.0f, -1.0f,
-      1.0f, -1.0f,
-      1.0f, 1.0f,
-      -1.0f, 1.0f
-    };
-    GLfloat texcoords[] = { 0.0f, 0.0f,
-      1.0f, 0.0f,
-      1.0f, 1.0f,
-      0.0f, 1.0f
-    };
+  {
+    if (!filter->vertex_buffer) {
+      if (gl->GenVertexArrays) {
+        gl->GenVertexArrays (1, &filter->vao);
+        gl->BindVertexArray (filter->vao);
+      }
 
-    gl->ActiveTexture (GL_TEXTURE0);
+      gl->GenBuffers (1, &filter->vertex_buffer);
+      gl->BindBuffer (GL_ARRAY_BUFFER, filter->vertex_buffer);
+      gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+          GL_STATIC_DRAW);
 
-    gl->Enable (GL_TEXTURE_2D);
-    gl->BindTexture (GL_TEXTURE_2D, texture);
+      gl->GenBuffers (1, &filter->vbo_indices);
+      gl->BindBuffer (GL_ARRAY_BUFFER, filter->vbo_indices);
+      gl->BufferData (GL_ARRAY_BUFFER, sizeof (indices), indices,
+          GL_STATIC_DRAW);
 
-    gl->ClientActiveTexture (GL_TEXTURE0);
+      if (gl->GenVertexArrays) {
+        _bind_buffer (filter);
+        gl->BindVertexArray (0);
+      }
 
-    gl->EnableClientState (GL_VERTEX_ARRAY);
-    gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
+      gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+      gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+    }
 
-    gl->VertexPointer (2, GL_FLOAT, 0, &verts);
-    gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
+    if (gl->GenVertexArrays)
+      gl->BindVertexArray (filter->vao);
+    else
+      _bind_buffer (filter);
 
-    gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
+    gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
 
-    gl->DisableClientState (GL_VERTEX_ARRAY);
-    gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
+    if (gl->GenVertexArrays)
+      gl->BindVertexArray (0);
+    else
+      _unbind_buffer (filter);
   }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2) {
-    const GLfloat vVertices[] = {
-      -1.0f, -1.0f, 0.0f,
-      0.0f, 0.0f,
-      1.0, -1.0f, 0.0f,
-      1.0f, 0.0f,
-      1.0f, 1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f
-    };
-
-    GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
-
-    /* glClear (GL_COLOR_BUFFER_BIT); */
-
-    /* Load the vertex position */
-    gl->VertexAttribPointer (filter->draw_attr_position_loc, 3, GL_FLOAT,
-        GL_FALSE, 5 * sizeof (GLfloat), vVertices);
-
-    /* Load the texture coordinate */
-    gl->VertexAttribPointer (filter->draw_attr_texture_loc, 2, GL_FLOAT,
-        GL_FALSE, 5 * sizeof (GLfloat), &vVertices[3]);
-
-    gl->EnableVertexAttribArray (filter->draw_attr_position_loc);
-    gl->EnableVertexAttribArray (filter->draw_attr_texture_loc);
-
-    gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
-
-    gl->DisableVertexAttribArray (filter->draw_attr_position_loc);
-    gl->DisableVertexAttribArray (filter->draw_attr_texture_loc);
-  }
-#endif
 }
diff --git a/gst-libs/gst/gl/gstglfilter.h b/gst-libs/gst/gl/gstglfilter.h
index c786493..94ab333 100644
--- a/gst-libs/gst/gl/gstglfilter.h
+++ b/gst-libs/gst/gl/gstglfilter.h
@@ -24,7 +24,6 @@
 #define _GST_GL_FILTER_H_
 
 #include <gst/gst.h>
-#include <gst/base/gstbasetransform.h>
 #include <gst/video/video.h>
 
 #include <gst/gl/gl.h>
@@ -39,9 +38,6 @@
 #define GST_IS_GL_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_FILTER))
 #define GST_GL_FILTER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_FILTER,GstGLFilterClass))
 
-typedef struct _GstGLFilter GstGLFilter;
-typedef struct _GstGLFilterClass GstGLFilterClass;
-
 /**
  * GstGLFilter:
  * @base_transform: parent #GstBaseTransform
@@ -60,36 +56,27 @@
  */
 struct _GstGLFilter
 {
-  GstBaseTransform   base_transform;
-
-  GstBufferPool     *pool;
-
-  GstGLDisplay      *display;
+  GstGLBaseFilter    parent;
 
   GstVideoInfo       in_info;
   GstVideoInfo       out_info;
 
   GstCaps           *out_caps;
 
+  /* <private> */
   GLuint             fbo;
   GLuint             depthbuffer;
 
-  GstGLUpload       *upload;
-  GstGLDownload     *download;
-
-  /* <private> */
   GLuint             in_tex_id;
   GLuint             out_tex_id;
 
   GstGLShader       *default_shader;
 
-  GstGLContext      *context;
-  GstGLContext      *other_context;
-
-#if GST_GL_HAVE_GLES2
-  GLint draw_attr_position_loc;
-  GLint draw_attr_texture_loc;
-#endif
+  GLuint             vao;
+  GLuint             vbo_indices;
+  GLuint             vertex_buffer;
+  GLint              draw_attr_position_loc;
+  GLint              draw_attr_texture_loc;
 };
 
 /**
@@ -102,25 +89,23 @@
  *          Note: If @filter exists, then @filter_texture is not run
  * @filter_texture: given @in_tex, transform it into @out_tex.  Not used
  *                  if @filter exists
- * @onInitFBO: perform initialization when the Framebuffer object is created
- * @onStart: called when element activates see also #GstBaseTransform
- * @onStop: called when the element deactivates e also #GstBaseTransform
- * @onReset: called on inizialation and after @onStop
+ * @init_fbo: perform initialization when the Framebuffer object is created
  * @display_init_cb: execute arbitrary gl code on start
  * @display_reset_cb: execute arbitrary gl code at stop
+ * @transform_internal_caps: Perform sub-class specific modifications of the
+ *   caps to be processed between upload on input and before download for output.
  */
 struct _GstGLFilterClass
 {
-  GstBaseTransformClass base_transform_class;
+  GstGLBaseFilterClass parent_class;
 
   gboolean (*set_caps)          (GstGLFilter* filter, GstCaps* incaps, GstCaps* outcaps);
   gboolean (*filter)            (GstGLFilter *filter, GstBuffer *inbuf, GstBuffer *outbuf);
   gboolean (*filter_texture)    (GstGLFilter *filter, guint in_tex, guint out_tex);
-  gboolean (*onInitFBO)         (GstGLFilter *filter);
+  gboolean (*init_fbo)          (GstGLFilter *filter);
 
-  void (*onStart)               (GstGLFilter *filter);
-  void (*onStop)                (GstGLFilter *filter);
-  void (*onReset)               (GstGLFilter *filter);
+  GstCaps *(*transform_internal_caps) (GstGLFilter *filter,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps);
 
   /* useful to init and cleanup custom gl resources */
   void (*display_init_cb)       (GstGLFilter *filter);
diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c
index 6cde96c..fb706f5 100644
--- a/gst-libs/gst/gl/gstglframebuffer.c
+++ b/gst-libs/gst/gl/gstglframebuffer.c
@@ -90,6 +90,7 @@
 {
   GLuint fake_texture = 0;
   const GstGLFuncs *gl;
+  GLenum internal_format;
 
   g_return_val_if_fail (GST_IS_GL_FRAMEBUFFER (frame), FALSE);
   g_return_val_if_fail (fbo != NULL && depth != NULL, FALSE);
@@ -112,11 +113,10 @@
   gl->GenRenderbuffers (1, depth);
   gl->BindRenderbuffer (GL_RENDERBUFFER, *depth);
 
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) {
-    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT,
-        width, height);
-    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH24_STENCIL8,
-        width, height);
+  if (gst_gl_context_get_gl_api (frame->context) & (GST_GL_API_OPENGL |
+          GST_GL_API_OPENGL3)) {
+    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width,
+        height);
   }
   if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_GLES2) {
     gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16,
@@ -126,8 +126,11 @@
   /* setup a texture to render to */
   gl->GenTextures (1, &fake_texture);
   gl->BindTexture (GL_TEXTURE_2D, fake_texture);
-  gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8,
-      width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (frame->context, GL_RGBA,
+      GL_UNSIGNED_BYTE);
+  gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format, width, height, 0, GL_RGBA,
+      GL_UNSIGNED_BYTE, NULL);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -141,7 +144,8 @@
   gl->FramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
       GL_RENDERBUFFER, *depth);
 
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) {
+  if (gst_gl_context_get_gl_api (frame->context) & (GST_GL_API_OPENGL |
+          GST_GL_API_OPENGL3)) {
     gl->FramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
         GL_RENDERBUFFER, *depth);
   }
@@ -164,116 +168,12 @@
 }
 
 gboolean
-gst_gl_framebuffer_use (GstGLFramebuffer * frame, gint texture_fbo_width,
-    gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
-    GLuint texture_fbo, GLCB cb, gint input_tex_width,
-    gint input_tex_height, GLuint input_tex, gdouble proj_param1,
-    gdouble proj_param2, gdouble proj_param3, gdouble proj_param4,
-    GstGLDisplayProjection projection, gpointer stuff)
-{
-  const GstGLFuncs *gl;
-#if GST_GL_HAVE_GLES2
-  GLint viewport_dim[4];
-#endif
-
-  g_return_val_if_fail (GST_IS_GL_FRAMEBUFFER (frame), FALSE);
-  g_return_val_if_fail (input_tex_width > 0 && input_tex_height > 0, FALSE);
-  g_return_val_if_fail (texture_fbo_width > 0 && texture_fbo_height > 0, FALSE);
-  g_return_val_if_fail (input_tex != 0, FALSE);
-  g_return_val_if_fail (fbo != 0, FALSE);
-  g_return_val_if_fail (texture_fbo != 0, FALSE);
-  g_return_val_if_fail (cb != NULL, FALSE);
-
-  gl = frame->context->gl_vtable;
-
-  GST_TRACE ("Binding v1 FBO %u dimensions:%ux%u with texture:%u "
-      "dimensions:%ux%u", fbo, texture_fbo_width,
-      texture_fbo_height, texture_fbo, input_tex_width, input_tex_height);
-
-  gl->BindFramebuffer (GL_FRAMEBUFFER, fbo);
-
-  /*setup a texture to render to */
-  gl->BindTexture (GL_TEXTURE_2D, texture_fbo);
-
-  /* attach the texture to the FBO to renderer to */
-  gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-      GL_TEXTURE_2D, texture_fbo, 0);
-
-  gst_gl_context_clear_shader (frame->context);
-
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) {
-    gl->PushAttrib (GL_VIEWPORT_BIT);
-    gl->MatrixMode (GL_PROJECTION);
-    gl->PushMatrix ();
-    gl->LoadIdentity ();
-
-    switch (projection) {
-      case GST_GL_DISPLAY_PROJECTION_ORTHO2D:
-        gluOrtho2D (proj_param1, proj_param2, proj_param3, proj_param4);
-        break;
-      case GST_GL_DISPLAY_PROJECTION_PERSPECTIVE:
-        gluPerspective (proj_param1, proj_param2, proj_param3, proj_param4);
-        break;
-      default:
-        gst_gl_context_set_error (frame->context, "Unknow fbo projection %d",
-            projection);
-    }
-
-    gl->MatrixMode (GL_MODELVIEW);
-    gl->PushMatrix ();
-    gl->LoadIdentity ();
-  }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_GLES2)
-    gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
-#endif
-
-  gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height);
-
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) {
-    const GLenum rt[] = { GL_COLOR_ATTACHMENT0 };
-    gl->DrawBuffers (1, rt);
-  }
-#endif
-
-  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-  cb (input_tex_width, input_tex_height, input_tex, stuff);
-
-#if GST_GL_HAVE_OPENGL
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) {
-    const GLenum rt[] = { GL_NONE };
-    gl->DrawBuffers (1, rt);
-    gl->MatrixMode (GL_PROJECTION);
-    gl->PopMatrix ();
-    gl->MatrixMode (GL_MODELVIEW);
-    gl->PopMatrix ();
-    gl->PopAttrib ();
-  }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_GLES2) {
-    gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2],
-        viewport_dim[3]);
-  }
-#endif
-
-  gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
-
-  return TRUE;
-}
-
-gboolean
 gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width,
     gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
     GLuint texture_fbo, GLCB_V2 cb, gpointer stuff)
 {
   const GstGLFuncs *gl;
-  GLint viewport_dim[4];
+  GLint viewport_dim[4] = { 0 };
 
   g_return_val_if_fail (GST_IS_GL_FRAMEBUFFER (frame), FALSE);
   g_return_val_if_fail (texture_fbo_width > 0 && texture_fbo_height > 0, FALSE);
@@ -299,16 +199,15 @@
 
   gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height);
 
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL)
+  if (gst_gl_context_get_gl_api (frame->context) & (GST_GL_API_OPENGL |
+          GST_GL_API_OPENGL3))
     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);
-
   /* the opengl scene */
   cb (stuff);
 
-  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL)
+  if (gst_gl_context_get_gl_api (frame->context) & (GST_GL_API_OPENGL |
+          GST_GL_API_OPENGL3))
     gl->DrawBuffer (GL_NONE);
 
   gl->Viewport (viewport_dim[0], viewport_dim[1],
diff --git a/gst-libs/gst/gl/gstglframebuffer.h b/gst-libs/gst/gl/gstglframebuffer.h
index 7f1f261..1fc9222 100644
--- a/gst-libs/gst/gl/gstglframebuffer.h
+++ b/gst-libs/gst/gl/gstglframebuffer.h
@@ -58,13 +58,6 @@
 gboolean gst_gl_framebuffer_generate (GstGLFramebuffer *frame, gint width, gint height,
     guint * fbo, guint * depthbuffer);
 
-gboolean gst_gl_framebuffer_use (GstGLFramebuffer * frame, gint texture_fbo_width,
-    gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
-    GLuint texture_fbo, GLCB cb, gint input_tex_width,
-    gint input_tex_height, GLuint input_tex, gdouble proj_param1,
-    gdouble proj_param2, gdouble proj_param3, gdouble proj_param4,
-    GstGLDisplayProjection projection, gpointer stuff);
-
 gboolean gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width,
     gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
     GLuint texture_fbo, GLCB_V2 cb, gpointer stuff);
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 87d57cb..b1bef1e 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -27,13 +27,14 @@
 #include <gst/video/video.h>
 
 #include "gstglmemory.h"
+#include "gstglutils.h"
 
 /**
  * SECTION:gstglmemory
  * @short_description: memory subclass for GL textures
  * @see_also: #GstMemory, #GstAllocator, #GstGLBufferPool
  *
- * GstGLMemory is a #GstMemory subclass providing support for the mapping of
+ * GstGLMemory is a #GstGLBaseBuffer subclass providing support for the mapping of
  * GL textures.  
  *
  * #GstGLMemory is created through gst_gl_memory_alloc() or system memory can
@@ -42,18 +43,40 @@
  * Data is uploaded or downloaded from the GPU as is necessary.
  */
 
+/* Implementation notes
+ *
+ * PBO transfer's are implemented using GstGLBaseBuffer.  We just need to
+ * ensure that the texture data is written/read to/from before/after calling
+ * the parent class which performs the pbo buffer transfer.
+ */
+
 #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 GL_MEM_WIDTH(gl_mem) _get_plane_width (&gl_mem->info, gl_mem->plane)
+#define GL_MEM_HEIGHT(gl_mem) _get_plane_height (&gl_mem->info, gl_mem->plane)
+#define GL_MEM_STRIDE(gl_mem) GST_VIDEO_INFO_PLANE_STRIDE (&gl_mem->info, gl_mem->plane)
+
+#define CONTEXT_SUPPORTS_PBO_UPLOAD(context) \
+    (gst_gl_context_check_gl_version (context, \
+        GST_GL_API_OPENGL | GST_GL_API_OPENGL3, 2, 1) \
+        || gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
+#define CONTEXT_SUPPORTS_PBO_DOWNLOAD(context) \
+    (gst_gl_context_check_gl_version (context, \
+        GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2, 3, 0))
+
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
-#define GST_CAT_DEFUALT GST_CAT_GL_MEMORY
+#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
 
 static GstAllocator *_gl_allocator;
 
 /* compatability definitions... */
+#ifndef GL_RGBA8
+#define GL_RGBA8 0x8058
+#endif
 #ifndef GL_RED
 #define GL_RED 0x1903
 #endif
@@ -72,6 +95,12 @@
 #ifndef GL_PIXEL_UNPACK_BUFFER
 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
 #endif
+#ifndef GL_STREAM_READ
+#define GL_STREAM_READ 0x88E1
+#endif
+#ifndef GL_STREAM_DRAW
+#define GL_STREAM_DRAW 0x88E0
+#endif
 #ifndef GL_STREAM_COPY
 #define GL_STREAM_COPY 0x88E2
 #endif
@@ -79,6 +108,9 @@
 #define GL_UNPACK_ROW_LENGTH 0x0CF2
 #endif
 
+G_DEFINE_TYPE (GstGLAllocator, gst_gl_allocator,
+    GST_TYPE_GL_BASE_BUFFER_ALLOCATOR);
+
 typedef struct
 {
   /* in */
@@ -87,6 +119,7 @@
   guint out_width, out_height;
   guint out_stride;
   gboolean respecify;
+  guint tex_target;
   /* inout */
   guint tex_id;
   /* out */
@@ -154,8 +187,21 @@
       _gl_type_n_bytes (type);
 }
 
-static inline GLenum
-_gst_gl_format_from_gl_texture_type (GstVideoGLTextureType tex_format)
+static inline guint
+_gl_texture_type_n_bytes (GstVideoGLTextureType tex_format)
+{
+  guint format, type;
+
+  format = gst_gl_format_from_gl_texture_type (tex_format);
+  type = GL_UNSIGNED_BYTE;
+  if (tex_format == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
+    type = GL_UNSIGNED_SHORT_5_6_5;
+
+  return _gl_format_type_n_bytes (format, type);
+}
+
+guint
+gst_gl_format_from_gl_texture_type (GstVideoGLTextureType tex_format)
 {
   switch (tex_format) {
     case GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA:
@@ -176,30 +222,15 @@
   }
 }
 
-static inline guint
-_gl_texture_type_n_bytes (GstVideoGLTextureType tex_format)
-{
-  guint format, type;
-
-  format = _gst_gl_format_from_gl_texture_type (tex_format);
-  type = GL_UNSIGNED_BYTE;
-  if (tex_format == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
-    type = GL_UNSIGNED_SHORT_5_6_5;
-
-  return _gl_format_type_n_bytes (format, type);
-}
-
 GstVideoGLTextureType
 gst_gl_texture_type_from_format (GstGLContext * context,
     GstVideoFormat v_format, guint plane)
 {
-#if GST_GL_HAVE_PLATFORM_EAGL
-  gboolean texture_rg = FALSE;
-#else
   gboolean texture_rg =
       gst_gl_context_check_feature (context, "GL_EXT_texture_rg")
-      || gst_gl_context_check_feature (context, "GL_ARB_texture_rg");
-#endif
+      || gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0)
+      || gst_gl_context_check_feature (context, "GL_ARB_texture_rg")
+      || gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 0);
   guint n_plane_components;
 
   switch (v_format) {
@@ -218,6 +249,9 @@
     case GST_VIDEO_FORMAT_BGR:
       n_plane_components = 3;
       break;
+    case GST_VIDEO_FORMAT_RGB16:
+    case GST_VIDEO_FORMAT_BGR16:
+      return GST_VIDEO_GL_TEXTURE_TYPE_RGB16;
     case GST_VIDEO_FORMAT_GRAY16_BE:
     case GST_VIDEO_FORMAT_GRAY16_LE:
     case GST_VIDEO_FORMAT_YUY2:
@@ -265,14 +299,19 @@
   return GST_VIDEO_GL_TEXTURE_TYPE_RGBA;
 }
 
-static inline GLenum
-_sized_gl_format_from_gl_format_type (GLenum format, GLenum type)
+guint
+gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
+    guint format, guint type)
 {
+  gboolean ext_texture_rg =
+      gst_gl_context_check_feature (context, "GL_EXT_texture_rg");
+
   switch (format) {
     case GL_RGBA:
       switch (type) {
         case GL_UNSIGNED_BYTE:
-          return GL_RGBA8;
+          return USING_GLES2 (context)
+              && !USING_GLES3 (context) ? GL_RGBA : GL_RGBA8;
           break;
       }
       break;
@@ -289,6 +328,8 @@
     case GL_RG:
       switch (type) {
         case GL_UNSIGNED_BYTE:
+          if (!USING_GLES3 (context) && USING_GLES2 (context) && ext_texture_rg)
+            return GL_RG;
           return GL_RG8;
           break;
       }
@@ -296,6 +337,8 @@
     case GL_RED:
       switch (type) {
         case GL_UNSIGNED_BYTE:
+          if (!USING_GLES3 (context) && USING_GLES2 (context) && ext_texture_rg)
+            return GL_RED;
           return GL_R8;
           break;
       }
@@ -344,46 +387,43 @@
 typedef struct _GenTexture
 {
   guint width, height;
+  GLenum gl_target;
   GLenum gl_format;
   GLenum gl_type;
   guint result;
 } GenTexture;
 
-static void
-_generate_texture (GstGLContext * context, GenTexture * data)
+/* find the difference between the start of the plane and where the video
+ * data starts in the plane */
+static gsize
+_find_plane_frame_start (GstGLMemory * gl_mem)
 {
-  const GstGLFuncs *gl = context->gl_vtable;
-  GLenum internal_format;
+  gsize plane_start;
+  gint i;
 
-  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);
+  /* find the start of the plane data including padding */
+  plane_start = 0;
+  for (i = 0; i < gl_mem->plane; i++) {
+    plane_start +=
+        gst_gl_get_plane_data_size (&gl_mem->info, &gl_mem->valign, i);
+  }
 
-  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, 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);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-  GST_CAT_LOG (GST_CAT_GL_MEMORY, "generated texture id:%d", data->result);
+  /* offset between the plane data start and where the video frame starts */
+  return (GST_VIDEO_INFO_PLANE_OFFSET (&gl_mem->info,
+          gl_mem->plane)) - plane_start + gl_mem->mem.mem.offset;
 }
 
 static void
-_upload_memory (GstGLContext * context, GstGLMemory * gl_mem)
+_upload_memory (GstGLMemory * gl_mem, GstMapInfo * info, gsize maxsize)
 {
+  GstGLContext *context = gl_mem->mem.context;
   const GstGLFuncs *gl;
-  GLenum gl_format, gl_type;
+  GLenum gl_format, gl_type, gl_target;
+  gpointer data;
+  gsize plane_start;
 
-  if (!GST_GL_MEMORY_FLAG_IS_SET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD)) {
+  if ((gl_mem->transfer_state & GST_GL_MEMORY_TRANSFER_NEED_UPLOAD) == 0)
     return;
-  }
 
   gl = context->gl_vtable;
 
@@ -391,20 +431,36 @@
   if (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
     gl_type = GL_UNSIGNED_SHORT_5_6_5;
 
-  gl_format = _gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
+  gl_format = gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
+  gl_target = gl_mem->tex_target;
 
-  if (USING_OPENGL (context) || USING_GLES3 (context)) {
+  if (USING_OPENGL (context) || USING_GLES3 (context)
+      || USING_OPENGL3 (context)) {
     gl->PixelStorei (GL_UNPACK_ROW_LENGTH, gl_mem->unpack_length);
   } else if (USING_GLES2 (context)) {
     gl->PixelStorei (GL_UNPACK_ALIGNMENT, gl_mem->unpack_length);
   }
 
-  GST_CAT_LOG (GST_CAT_GL_MEMORY, "upload for texture id:%u, %ux%u",
-      gl_mem->tex_id, gl_mem->width, gl_mem->height);
+  GST_LOG ("upload for texture id:%u, with pbo %u %ux%u",
+      gl_mem->tex_id, gl_mem->mem.id, gl_mem->tex_width,
+      GL_MEM_HEIGHT (gl_mem));
 
-  gl->BindTexture (GL_TEXTURE_2D, gl_mem->tex_id);
-  gl->TexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, gl_mem->width, gl_mem->height,
-      gl_format, gl_type, gl_mem->data);
+  /* find the start of the plane data including padding */
+  plane_start = _find_plane_frame_start (gl_mem);
+
+  if (gl_mem->mem.id && CONTEXT_SUPPORTS_PBO_UPLOAD (context)) {
+    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, gl_mem->mem.id);
+    data = (void *) plane_start;
+  } else {
+    data = (gpointer) ((gintptr) plane_start + (gintptr) gl_mem->mem.data);
+  }
+
+  gl->BindTexture (gl_target, gl_mem->tex_id);
+  gl->TexSubImage2D (gl_target, 0, 0, 0, gl_mem->tex_width,
+      GL_MEM_HEIGHT (gl_mem), gl_format, gl_type, data);
+
+  if (gl_mem->mem.id && CONTEXT_SUPPORTS_PBO_UPLOAD (context))
+    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, 0);
 
   /* Reset to default values */
   if (USING_OPENGL (context) || USING_GLES3 (context)) {
@@ -413,41 +469,44 @@
     gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4);
   }
 
-  gl->BindTexture (GL_TEXTURE_2D, 0);
+  gl->BindTexture (gl_target, 0);
 
-  GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+  gl_mem->transfer_state &= ~GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
 }
 
 static inline void
-_calculate_unpack_length (GstGLMemory * gl_mem)
+_calculate_unpack_length (GstGLMemory * gl_mem, GstGLContext * context)
 {
   guint n_gl_bytes;
 
   gl_mem->tex_scaling[0] = 1.0f;
   gl_mem->tex_scaling[1] = 1.0f;
   gl_mem->unpack_length = 1;
+  gl_mem->tex_width = GL_MEM_WIDTH (gl_mem);
 
   n_gl_bytes = _gl_texture_type_n_bytes (gl_mem->tex_type);
   if (n_gl_bytes == 0) {
-    GST_CAT_ERROR (GST_CAT_GL_MEMORY, "Unsupported texture type %d",
-        gl_mem->tex_type);
+    GST_ERROR ("Unsupported texture type %d", gl_mem->tex_type);
     return;
   }
 
-  if (USING_OPENGL (gl_mem->context) || USING_GLES3 (gl_mem->context)) {
-    gl_mem->unpack_length = gl_mem->stride / n_gl_bytes;
-  } else if (USING_GLES2 (gl_mem->context)) {
+  if (USING_OPENGL (context) || USING_GLES3 (context)
+      || USING_OPENGL3 (context)) {
+    gl_mem->unpack_length = GL_MEM_STRIDE (gl_mem) / n_gl_bytes;
+  } else if (USING_GLES2 (context)) {
     guint j = 8;
 
     while (j >= n_gl_bytes) {
-      /* GST_ROUND_UP_j(gl_mem->width * n_gl_bytes) */
-      guint round_up_j = ((gl_mem->width * n_gl_bytes) + j - 1) & ~(j - 1);
+      /* GST_ROUND_UP_j(GL_MEM_WIDTH (gl_mem) * n_gl_bytes) */
+      guint round_up_j =
+          ((GL_MEM_WIDTH (gl_mem) * n_gl_bytes) + j - 1) & ~(j - 1);
 
-      if (round_up_j == gl_mem->stride) {
-        GST_CAT_LOG (GST_CAT_GL_MEMORY, "Found alignment of %u based on width "
+      if (round_up_j == GL_MEM_STRIDE (gl_mem)) {
+        GST_LOG ("Found alignment of %u based on width "
             "(with plane width:%u, plane stride:%u and pixel stride:%u. "
-            "RU%u(%u*%u) = %u)", j, gl_mem->width, gl_mem->stride, n_gl_bytes,
-            j, gl_mem->width, n_gl_bytes, round_up_j);
+            "RU%u(%u*%u) = %u)", j, GL_MEM_WIDTH (gl_mem),
+            GL_MEM_STRIDE (gl_mem), n_gl_bytes, j, GL_MEM_WIDTH (gl_mem),
+            n_gl_bytes, round_up_j);
 
         gl_mem->unpack_length = j;
         break;
@@ -462,213 +521,407 @@
       j = 8;
 
       while (j >= n_gl_bytes) {
-        /* GST_ROUND_UP_j(gl_mem->stride) */
-        guint round_up_j = ((gl_mem->stride) + j - 1) & ~(j - 1);
+        /* GST_ROUND_UP_j((GL_MEM_STRIDE (gl_mem)) */
+        guint round_up_j = ((GL_MEM_STRIDE (gl_mem)) + j - 1) & ~(j - 1);
 
-        if (round_up_j == gl_mem->stride) {
-          GST_CAT_LOG (GST_CAT_GL_MEMORY, "Found alignment of %u based on "
+        if (round_up_j == (GL_MEM_STRIDE (gl_mem))) {
+          GST_LOG ("Found alignment of %u based on "
               "stride (with plane stride:%u and pixel stride:%u. "
-              "RU%u(%u) = %u)", j, gl_mem->stride, n_gl_bytes, j,
-              gl_mem->stride, round_up_j);
+              "RU%u(%u) = %u)", j, GL_MEM_STRIDE (gl_mem), n_gl_bytes, j,
+              GL_MEM_STRIDE (gl_mem), round_up_j);
 
           gl_mem->unpack_length = j;
           gl_mem->tex_scaling[0] =
-              (gfloat) (gl_mem->width * n_gl_bytes) / (gfloat) gl_mem->stride;
-          gl_mem->width = gl_mem->stride / n_gl_bytes;
+              (gfloat) (GL_MEM_WIDTH (gl_mem) * n_gl_bytes) /
+              (gfloat) GL_MEM_STRIDE (gl_mem);
+          gl_mem->tex_width = GL_MEM_STRIDE (gl_mem) / n_gl_bytes;
           break;
         }
         j >>= 1;
       }
 
       if (j < n_gl_bytes) {
-        GST_CAT_ERROR
-            (GST_CAT_GL_MEMORY, "Failed to find matching alignment. Image may "
+        GST_ERROR
+            ("Failed to find matching alignment. Image may "
             "look corrupted. plane width:%u, plane stride:%u and pixel "
-            "stride:%u", gl_mem->width, gl_mem->stride, n_gl_bytes);
+            "stride:%u", GL_MEM_WIDTH (gl_mem), GL_MEM_STRIDE (gl_mem),
+            n_gl_bytes);
       }
     }
   }
 }
 
-static void
-_download_memory (GstGLContext * context, GstGLMemory * gl_mem)
+static guint
+_new_texture (GstGLContext * context, guint target, guint internal_format,
+    guint format, guint type, guint width, guint height)
 {
-  const GstGLFuncs *gl;
-  guint format, type;
-  GLuint fboId;
+  const GstGLFuncs *gl = context->gl_vtable;
+  guint tex_id;
 
-  gl = context->gl_vtable;
-  format = _gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
-  type = GL_UNSIGNED_BYTE;
+  gl->GenTextures (1, &tex_id);
+  gl->BindTexture (target, tex_id);
+  gl->TexImage2D (target, 0, internal_format, width, height, 0, format, type,
+      NULL);
+
+  gl->TexParameteri (target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+  gl->TexParameteri (target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  gl->TexParameteri (target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  gl->TexParameteri (target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+  return tex_id;
+}
+
+static gboolean
+_gl_mem_create (GstGLMemory * gl_mem, GError ** error)
+{
+  GstGLContext *context = gl_mem->mem.context;
+  const GstGLFuncs *gl = context->gl_vtable;
+  GLenum internal_format;
+  GLenum tex_format;
+  GLenum tex_type;
+
+  tex_format = gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
+  tex_type = GL_UNSIGNED_BYTE;
   if (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
-    type = GL_UNSIGNED_SHORT_5_6_5;
+    tex_type = GL_UNSIGNED_SHORT_5_6_5;
 
-  if (!gl->GenFramebuffers) {
-    gst_gl_context_set_error (context, "Cannot download GL texture "
-        "without support for Framebuffers");
-    goto error;
+  GST_TRACE ("Generating texture format:%u type:%u dimensions:%ux%u",
+      tex_format, tex_type, gl_mem->tex_width, GL_MEM_HEIGHT (gl_mem));
+
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (context, tex_format,
+      tex_type);
+
+  if (!gl_mem->tex_id) {
+    gl_mem->tex_id =
+        _new_texture (context, gl_mem->tex_target, internal_format, tex_format,
+        tex_type, gl_mem->tex_width, GL_MEM_HEIGHT (gl_mem));
   }
 
-  if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2
-      && (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
-          || gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA)) {
-    gst_gl_context_set_error (context, "Cannot download GL luminance/"
-        "luminance alpha textures");
-    goto error;
+  GST_LOG ("generated texture id:%d", gl_mem->tex_id);
+
+  if (USING_OPENGL (context) || USING_OPENGL3 (context)
+      || USING_GLES3 (context)) {
+    /* FIXME: lazy init this for resource constrained platforms
+     * Will need to fix pbo detection based on the existence of the mem.id then */
+    gl->GenBuffers (1, &gl_mem->mem.id);
+    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, gl_mem->mem.id);
+    gl->BufferData (GL_PIXEL_UNPACK_BUFFER, gl_mem->mem.mem.maxsize, NULL,
+        GL_STREAM_DRAW);
+    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, 0);
+    GST_LOG ("generated pbo %u", gl_mem->mem.id);
   }
 
-  GST_CAT_LOG (GST_CAT_GL_MEMORY, "downloading memory %p, tex %u into %p",
-      gl_mem, gl_mem->tex_id, gl_mem->data);
-
-  if (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
-      || gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA) {
-    gl->BindTexture (GL_TEXTURE_2D, gl_mem->tex_id);
-    gl->GetTexImage (GL_TEXTURE_2D, 0, format, type, gl_mem->data);
-    gl->BindTexture (GL_TEXTURE_2D, 0);
-  } else {
-    /* FIXME: try and avoid creating and destroying fbo's every download... */
-    /* create a framebuffer object */
-    gl->GenFramebuffers (1, &fboId);
-    gl->BindFramebuffer (GL_FRAMEBUFFER, fboId);
-
-    gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-        GL_TEXTURE_2D, gl_mem->tex_id, 0);
-
-    if (!gst_gl_context_check_framebuffer_status (context))
-      goto fbo_error;
-
-    gl->ReadPixels (0, 0, gl_mem->width, gl_mem->height, format, type,
-        gl_mem->data);
-
-    gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
-
-  fbo_error:
-    gl->DeleteFramebuffers (1, &fboId);
-  }
-
-error:
-  return;
+  return TRUE;
 }
 
 static void
 _gl_mem_init (GstGLMemory * mem, GstAllocator * allocator, GstMemory * parent,
-    GstGLContext * context, GstVideoGLTextureType tex_type, gint width,
-    gint height, gint stride, gpointer user_data, GDestroyNotify notify)
+    GstGLContext * context, GstAllocationParams * params, GstVideoInfo * info,
+    GstVideoAlignment * valign, guint plane, gpointer user_data,
+    GDestroyNotify notify)
 {
-  gsize maxsize;
+  gsize size;
 
-  maxsize = stride * height;
+  g_return_if_fail (plane < GST_VIDEO_INFO_N_PLANES (info));
 
-  gst_memory_init (GST_MEMORY_CAST (mem), GST_MEMORY_FLAG_NO_SHARE,
-      allocator, parent, maxsize, 0, 0, maxsize);
+  mem->info = *info;
+  if (valign)
+    mem->valign = *valign;
+  else
+    gst_video_alignment_reset (&mem->valign);
 
-  mem->context = gst_object_ref (context);
-  mem->tex_type = tex_type;
-  mem->width = width;
-  mem->height = height;
-  mem->stride = stride;
+  /* double-check alignment requirements (caller should've taken care of this) */
+  if (params) {
+    guint max_align, n;
+
+    max_align = gst_memory_alignment;
+    max_align |= params->align;
+    for (n = 0; n < GST_VIDEO_MAX_PLANES; ++n)
+      max_align |= mem->valign.stride_align[n];
+
+    if (params->align < max_align && max_align > gst_memory_alignment) {
+      GST_WARNING ("allocation params alignment %" G_GSIZE_FORMAT " is smaller "
+          "than the max required video alignment %u", params->align, max_align);
+    }
+  }
+
+  size = gst_gl_get_plane_data_size (info, valign, plane);
+
+  /* we always operate on 2D textures unless we're dealing with wrapped textures */
+  mem->tex_target = GL_TEXTURE_2D;
+  mem->tex_type =
+      gst_gl_texture_type_from_format (context, GST_VIDEO_INFO_FORMAT (info),
+      plane);
+  mem->plane = plane;
   mem->notify = notify;
   mem->user_data = user_data;
-  mem->data_wrapped = FALSE;
-  mem->texture_wrapped = FALSE;
 
-  _calculate_unpack_length (mem);
+  _calculate_unpack_length (mem, context);
 
-  GST_CAT_DEBUG (GST_CAT_GL_MEMORY, "new GL texture memory:%p format:%u "
-      "dimensions:%ux%u", mem, tex_type, width, height);
+  /* calls _gl_mem_create() */
+  gst_gl_base_buffer_init ((GstGLBaseBuffer *) mem, allocator, parent, context,
+      params, size);
+
+  GST_DEBUG ("new GL texture context:%" GST_PTR_FORMAT " memory:%p format:%u "
+      "dimensions:%ux%u stride:%u size:%" G_GSIZE_FORMAT, context, mem,
+      mem->tex_type, mem->tex_width, GL_MEM_HEIGHT (mem), GL_MEM_STRIDE (mem),
+      mem->mem.mem.size);
 }
 
 static GstGLMemory *
 _gl_mem_new (GstAllocator * allocator, GstMemory * parent,
-    GstGLContext * context, GstVideoGLTextureType tex_type, gint width,
-    gint height, gint stride, gpointer user_data, GDestroyNotify notify)
+    GstGLContext * context, GstAllocationParams * params, GstVideoInfo * info,
+    GstVideoAlignment * valign, guint plane, gpointer user_data,
+    GDestroyNotify notify)
 {
   GstGLMemory *mem;
-  GenTexture data = { 0, };
   mem = g_slice_new0 (GstGLMemory);
-  _gl_mem_init (mem, allocator, parent, context, tex_type, width, height,
-      stride, user_data, notify);
+  mem->texture_wrapped = FALSE;
 
-  data.width = mem->width;
-  data.height = mem->height;
-  data.gl_format = _gst_gl_format_from_gl_texture_type (tex_type);
-  data.gl_type = GL_UNSIGNED_BYTE;
-  if (tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
-    data.gl_type = GL_UNSIGNED_SHORT_5_6_5;
-
-  gst_gl_context_thread_add (context,
-      (GstGLContextThreadFunc) _generate_texture, &data);
-  if (!data.result) {
-    GST_CAT_WARNING (GST_CAT_GL_MEMORY,
-        "Could not create GL texture with context:%p", context);
-  }
-
-  GST_CAT_TRACE (GST_CAT_GL_MEMORY, "created texture %u", data.result);
-
-  mem->tex_id = data.result;
+  _gl_mem_init (mem, allocator, parent, context, params, info, valign, plane,
+      user_data, notify);
 
   return mem;
 }
 
-static gpointer
-_gl_mem_map (GstGLMemory * gl_mem, gsize maxsize, GstMapFlags flags)
+static gboolean
+_gl_mem_read_pixels (GstGLMemory * gl_mem, gpointer read_pointer)
 {
+  GstGLContext *context = gl_mem->mem.context;
+  const GstGLFuncs *gl = context->gl_vtable;
+  guint format, type;
+  guint fbo;
+
+  format = gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
+  type = GL_UNSIGNED_BYTE;
+  if (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
+    type = GL_UNSIGNED_SHORT_5_6_5;
+
+  /* FIXME: avoid creating a framebuffer every download/copy */
+  gl->GenFramebuffers (1, &fbo);
+  gl->BindFramebuffer (GL_FRAMEBUFFER, fbo);
+
+  gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+      gl_mem->tex_target, gl_mem->tex_id, 0);
+
+  if (!gst_gl_context_check_framebuffer_status (context)) {
+    GST_CAT_WARNING (GST_CAT_GL_MEMORY,
+        "Could not create framebuffer to read pixels for memory %p", gl_mem);
+    gl->DeleteFramebuffers (1, &fbo);
+    return FALSE;
+  }
+
+  gl->ReadPixels (0, 0, gl_mem->tex_width, GL_MEM_HEIGHT (gl_mem), format,
+      type, read_pointer);
+
+  gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
+
+  gl->DeleteFramebuffers (1, &fbo);
+
+  return TRUE;
+}
+
+static gboolean
+_read_pixels_to_pbo (GstGLMemory * gl_mem)
+{
+  const GstGLFuncs *gl = gl_mem->mem.context->gl_vtable;
+
+  if (!gl_mem->mem.id || !CONTEXT_SUPPORTS_PBO_DOWNLOAD (gl_mem->mem.context)
+      || gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+      || gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA)
+    /* unsupported */
+    return FALSE;
+
+  if (gl_mem->transfer_state & GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD) {
+    /* copy texture data into into the pbo and map that */
+    gsize plane_start = _find_plane_frame_start (gl_mem);
+
+    gl->BindBuffer (GL_PIXEL_PACK_BUFFER, gl_mem->mem.id);
+
+    if (!_gl_mem_read_pixels (gl_mem, (gpointer) plane_start)) {
+      gl->BindBuffer (GL_PIXEL_PACK_BUFFER, 0);
+      return FALSE;
+    }
+
+    gl->BindBuffer (GL_PIXEL_PACK_BUFFER, 0);
+    gl_mem->transfer_state &= ~GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
+  }
+
+  return TRUE;
+}
+
+static gpointer
+_pbo_download_transfer (GstGLMemory * gl_mem, GstMapInfo * info, gsize size)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  gpointer data = NULL;
+
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_CLASS (gst_gl_allocator_parent_class);
+
+  /* texture -> pbo */
+  if (info->flags & GST_MAP_READ
+      && gl_mem->transfer_state & GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD) {
+    GST_CAT_TRACE (GST_CAT_GL_MEMORY, "attempting download of texture %u "
+        "using pbo %u", gl_mem->tex_id, gl_mem->mem.id);
+
+    if (!_read_pixels_to_pbo (gl_mem))
+      return NULL;
+  }
+
+  /* get a cpu accessible mapping from the pbo */
+  gl_mem->mem.target = GL_PIXEL_PACK_BUFFER;
+  /* pbo -> data */
+  data = alloc_class->map_buffer ((GstGLBaseBuffer *) gl_mem, info, size);
+
+  return data;
+}
+
+static gpointer
+_gl_mem_download_get_tex_image (GstGLMemory * gl_mem, GstMapInfo * info,
+    gsize size)
+{
+  GstGLContext *context = gl_mem->mem.context;
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  if (size != -1 && size != ((GstMemory *) gl_mem)->maxsize)
+    return NULL;
+
+  if (USING_GLES2 (context) || USING_GLES3 (context))
+    return NULL;
+
+  /* taken care of by read pixels */
+  if (gl_mem->tex_type != GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+      && gl_mem->tex_type != GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA)
+    return NULL;
+
+  if (info->flags & GST_MAP_READ
+      && gl_mem->transfer_state & GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD) {
+    guint format, type;
+
+    GST_CAT_TRACE (GST_CAT_GL_MEMORY, "attempting download of texture %u "
+        "using glGetTexImage", gl_mem->tex_id);
+
+    format = gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
+    type = GL_UNSIGNED_BYTE;
+    if (gl_mem->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
+      type = GL_UNSIGNED_SHORT_5_6_5;
+
+    gl->BindTexture (gl_mem->tex_target, gl_mem->tex_id);
+    gl->GetTexImage (gl_mem->tex_target, 0, format, type, gl_mem->mem.data);
+    gl->BindTexture (gl_mem->tex_target, 0);
+  }
+
+  return gl_mem->mem.data;
+}
+
+static gpointer
+_gl_mem_download_read_pixels (GstGLMemory * gl_mem, GstMapInfo * info,
+    gsize size)
+{
+  if (size != -1 && size != ((GstMemory *) gl_mem)->maxsize)
+    return NULL;
+
+  if (info->flags & GST_MAP_READ
+      && gl_mem->transfer_state & GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD) {
+    GST_CAT_TRACE (GST_CAT_GL_MEMORY, "attempting download of texture %u "
+        "using glReadPixels", gl_mem->tex_id);
+    if (!_gl_mem_read_pixels (gl_mem, gl_mem->mem.data))
+      return NULL;
+  }
+
+  return gl_mem->mem.data;
+}
+
+static gpointer
+_gl_mem_map_cpu_access (GstGLMemory * gl_mem, GstMapInfo * info, gsize size)
+{
+  gpointer data = NULL;
+
+  gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *) gl_mem);
+
+  if (!data && gl_mem->mem.id
+      && CONTEXT_SUPPORTS_PBO_DOWNLOAD (gl_mem->mem.context))
+    data = _pbo_download_transfer (gl_mem, info, size);
+  if (!data)
+    data = _gl_mem_download_get_tex_image (gl_mem, info, size);
+
+  if (!data)
+    data = _gl_mem_download_read_pixels (gl_mem, info, size);
+
+  return data;
+}
+
+static gpointer
+_gl_mem_map_buffer (GstGLMemory * gl_mem, GstMapInfo * info, gsize maxsize)
+{
+  GstGLBaseBufferAllocatorClass *alloc_class;
   gpointer data;
 
-  g_return_val_if_fail (maxsize == gl_mem->mem.maxsize, NULL);
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_CLASS (gst_gl_allocator_parent_class);
 
-  if ((flags & GST_MAP_GL) == GST_MAP_GL) {
-    if ((flags & GST_MAP_READ) == GST_MAP_READ) {
-      GST_CAT_TRACE (GST_CAT_GL_MEMORY, "mapping GL texture:%u for reading",
-          gl_mem->tex_id);
-      if (GST_GL_MEMORY_FLAG_IS_SET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD)) {
-        gst_gl_context_thread_add (gl_mem->context,
-            (GstGLContextThreadFunc) _upload_memory, gl_mem);
-        GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+  if ((info->flags & GST_MAP_GL) == GST_MAP_GL) {
+    if ((info->flags & GST_MAP_READ) == GST_MAP_READ) {
+      GST_TRACE ("mapping GL texture:%u for reading", gl_mem->tex_id);
+
+      if (gl_mem->mem.id && CONTEXT_SUPPORTS_PBO_UPLOAD (gl_mem->mem.context)) {
+        gl_mem->mem.target = GL_PIXEL_UNPACK_BUFFER;
+        /* data -> pbo */
+        alloc_class->map_buffer ((GstGLBaseBuffer *) gl_mem, info, maxsize);
       }
-    } else {
-      GST_CAT_TRACE (GST_CAT_GL_MEMORY, "mapping GL texture:%u for writing",
-          gl_mem->tex_id);
+      /* pbo -> texture */
+      _upload_memory (gl_mem, info, maxsize);
     }
 
+    if ((info->flags & GST_MAP_WRITE) == GST_MAP_WRITE) {
+      GST_TRACE ("mapping GL texture:%u for writing", gl_mem->tex_id);
+      gl_mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
+    }
+    gl_mem->transfer_state &= ~GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
+
     data = &gl_mem->tex_id;
   } else {                      /* not GL */
-    if ((flags & GST_MAP_READ) == GST_MAP_READ) {
-      GST_CAT_TRACE (GST_CAT_GL_MEMORY,
-          "mapping GL texture:%u for reading from system memory",
-          gl_mem->tex_id);
-      if (GST_GL_MEMORY_FLAG_IS_SET (gl_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD)) {
-        gst_gl_context_thread_add (gl_mem->context,
-            (GstGLContextThreadFunc) _download_memory, gl_mem);
-        GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
-      }
-    } else {
-      GST_CAT_TRACE (GST_CAT_GL_MEMORY,
-          "mapping GL texture:%u for writing to system memory", gl_mem->tex_id);
-    }
-
-    data = gl_mem->data;
+    data = _gl_mem_map_cpu_access (gl_mem, info, maxsize);
+    if (info->flags & GST_MAP_WRITE)
+      gl_mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
+    gl_mem->transfer_state &= ~GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
   }
 
-  gl_mem->map_flags = flags;
-
   return data;
 }
 
 static void
-_gl_mem_unmap (GstGLMemory * gl_mem)
+_gl_mem_unmap_cpu_access (GstGLMemory * gl_mem, GstMapInfo * info)
 {
-  if ((gl_mem->map_flags & GST_MAP_WRITE) == GST_MAP_WRITE) {
-    if ((gl_mem->map_flags & GST_MAP_GL) == GST_MAP_GL) {
-      GST_GL_MEMORY_FLAG_SET (gl_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
-      GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
-    } else {
-      GST_GL_MEMORY_FLAG_SET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
-      GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
-    }
-  }
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  const GstGLFuncs *gl;
 
-  gl_mem->map_flags = 0;
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_CLASS (gst_gl_allocator_parent_class);
+  gl = gl_mem->mem.context->gl_vtable;
+
+  if (!gl_mem->mem.id)
+    /* PBO's not supported */
+    return;
+
+  gl_mem->mem.target = GL_PIXEL_PACK_BUFFER;
+  alloc_class->unmap_buffer ((GstGLBaseBuffer *) gl_mem, info);
+  gl->BindBuffer (GL_PIXEL_PACK_BUFFER, 0);
+}
+
+static void
+_gl_mem_unmap_buffer (GstGLMemory * gl_mem, GstMapInfo * info)
+{
+  if ((info->flags & GST_MAP_GL) == 0) {
+    _gl_mem_unmap_cpu_access (gl_mem, info);
+    if (info->flags & GST_MAP_WRITE)
+      gl_mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
+  } else {
+    if (info->flags & GST_MAP_WRITE)
+      gl_mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
+  }
 }
 
 static void
@@ -678,6 +931,7 @@
   GstGLMemoryCopyParams *copy_params;
   GstGLMemory *src;
   guint tex_id;
+  GLuint out_tex_target;
   GLuint fboId;
   gsize out_width, out_height, out_stride;
   GLuint out_gl_format, out_gl_type;
@@ -687,27 +941,28 @@
   copy_params = (GstGLMemoryCopyParams *) data;
   src = copy_params->src;
   tex_id = copy_params->tex_id;
+  out_tex_target = copy_params->tex_target;
   out_width = copy_params->out_width;
   out_height = copy_params->out_height;
   out_stride = copy_params->out_stride;
 
-  gl = src->context->gl_vtable;
-  out_gl_format = _gst_gl_format_from_gl_texture_type (copy_params->out_format);
+  gl = context->gl_vtable;
+  out_gl_format = gst_gl_format_from_gl_texture_type (copy_params->out_format);
   out_gl_type = GL_UNSIGNED_BYTE;
   if (copy_params->out_format == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
     out_gl_type = GL_UNSIGNED_SHORT_5_6_5;
-  in_gl_format = _gst_gl_format_from_gl_texture_type (src->tex_type);
+  in_gl_format = gst_gl_format_from_gl_texture_type (src->tex_type);
   in_gl_type = GL_UNSIGNED_BYTE;
   if (src->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
     in_gl_type = GL_UNSIGNED_SHORT_5_6_5;
 
   if (!gl->GenFramebuffers) {
-    gst_gl_context_set_error (src->context,
+    gst_gl_context_set_error (context,
         "Context, EXT_framebuffer_object not supported");
     goto error;
   }
 
-  in_size = src->height * src->stride;
+  in_size = GL_MEM_HEIGHT (src) * GL_MEM_STRIDE (src);
   out_size = out_height * out_stride;
 
   if (copy_params->respecify) {
@@ -720,24 +975,27 @@
   }
 
   if (!tex_id) {
-    GenTexture data = { 0, };
-    data.width = copy_params->out_width;
-    data.height = copy_params->out_height;
-    data.gl_format = out_gl_format;
-    data.gl_type = GL_UNSIGNED_BYTE;
-    if (copy_params->out_format == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
-      data.gl_type = GL_UNSIGNED_SHORT_5_6_5;
+    guint internal_format;
+    guint out_gl_type;
 
-    _generate_texture (context, &data);
-    tex_id = data.result;
+    out_gl_type = GL_UNSIGNED_BYTE;
+    if (copy_params->out_format == GST_VIDEO_GL_TEXTURE_TYPE_RGB16)
+      out_gl_type = GL_UNSIGNED_SHORT_5_6_5;
+
+    internal_format =
+        gst_gl_sized_gl_format_from_gl_format_type (context, out_gl_format,
+        out_gl_type);
+
+    tex_id =
+        _new_texture (context, out_tex_target, internal_format, out_gl_format,
+        out_gl_type, copy_params->out_width, copy_params->out_height);
   }
 
   if (!tex_id) {
-    GST_CAT_WARNING (GST_CAT_GL_MEMORY,
-        "Could not create GL texture with context:%p", src->context);
+    GST_WARNING ("Could not create GL texture with context:%p", context);
   }
 
-  GST_CAT_LOG (GST_CAT_GL_MEMORY, "copying memory %p, tex %u into texture %i",
+  GST_LOG ("copying memory %p, tex %u into texture %i",
       src, src->tex_id, tex_id);
 
   /* FIXME: try and avoid creating and destroying fbo's every copy... */
@@ -746,17 +1004,17 @@
   gl->BindFramebuffer (GL_FRAMEBUFFER, fboId);
 
   gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-      GL_TEXTURE_2D, src->tex_id, 0);
+      src->tex_target, src->tex_id, 0);
 
 //  if (!gst_gl_context_check_framebuffer_status (src->context))
 //    goto fbo_error;
 
-  gl->BindTexture (GL_TEXTURE_2D, tex_id);
+  gl->BindTexture (out_tex_target, tex_id);
   if (copy_params->respecify) {
-    if (!gl->GenBuffers) {
+    if (!gl->GenBuffers || !src->mem.id) {
       gst_gl_context_set_error (context, "Cannot reinterpret texture contents "
-          "without buffer objects");
-      gl->BindTexture (GL_TEXTURE_2D, 0);
+          "without pixel buffer objects");
+      gl->BindTexture (out_tex_target, 0);
       goto fbo_error;
     }
 
@@ -764,34 +1022,32 @@
         && (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);
+      gl->BindTexture (out_tex_target, 0);
       goto fbo_error;
     }
 
-    if (!src->pbo)
-      gl->GenBuffers (1, &src->pbo);
-
     GST_TRACE ("copying texture data with size of %u*%u*%u",
-        _gl_format_type_n_bytes (in_gl_format, in_gl_type), src->width,
-        src->height);
+        _gl_format_type_n_bytes (in_gl_format, in_gl_type), src->tex_width,
+        GL_MEM_HEIGHT (src));
 
     /* copy tex */
-    gl->BindBuffer (GL_PIXEL_PACK_BUFFER, src->pbo);
+    gl->BindBuffer (GL_PIXEL_PACK_BUFFER, src->mem.id);
     gl->BufferData (GL_PIXEL_PACK_BUFFER, in_size, NULL, GL_STREAM_COPY);
-    gl->ReadPixels (0, 0, src->width, src->height, in_gl_format, in_gl_type, 0);
+    gl->ReadPixels (0, 0, src->tex_width, GL_MEM_HEIGHT (src), in_gl_format,
+        in_gl_type, 0);
     gl->BindBuffer (GL_PIXEL_PACK_BUFFER, 0);
 
-    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, src->pbo);
-    gl->TexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, out_width, out_height,
+    gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, src->mem.id);
+    gl->TexSubImage2D (out_tex_target, 0, 0, 0, out_width, out_height,
         out_gl_format, out_gl_type, 0);
 
     gl->BindBuffer (GL_PIXEL_UNPACK_BUFFER, 0);
   } else {                      /* different sizes */
-    gl->CopyTexImage2D (GL_TEXTURE_2D, 0, out_gl_format, 0, 0, out_width,
+    gl->CopyTexImage2D (out_tex_target, 0, out_gl_format, 0, 0, out_width,
         out_height, 0);
   }
 
-  gl->BindTexture (GL_TEXTURE_2D, 0);
+  gl->BindTexture (out_tex_target, 0);
   gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
 
   gl->DeleteFramebuffers (1, &fboId);
@@ -821,60 +1077,71 @@
 static GstMemory *
 _gl_mem_copy (GstGLMemory * src, gssize offset, gssize size)
 {
-  GstGLMemory *dest;
+  GstGLAllocator *allocator = (GstGLAllocator *) src->mem.mem.allocator;
+  GstMemory *ret = NULL;
 
-  if (GST_GL_MEMORY_FLAG_IS_SET (src, GST_GL_MEMORY_FLAG_NEED_UPLOAD)) {
-    dest = _gl_mem_new (src->mem.allocator, NULL, src->context, src->tex_type,
-        src->width, src->height, src->stride, NULL, NULL);
-    dest->data = g_malloc (src->mem.maxsize);
-    memcpy (dest->data, src->data, src->mem.maxsize);
-    GST_GL_MEMORY_FLAG_SET (dest, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+  /* If not doing a full copy, then copy to sysmem, the 2D represention of the
+   * texture would become wrong */
+  if (offset > 0 || size < src->mem.mem.size) {
+    ret = allocator->fallback_mem_copy (&src->mem.mem, offset, size);
+  } else if (GST_MEMORY_FLAG_IS_SET (src, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD)) {
+    GstAllocationParams params = { 0, src->mem.mem.align, 0, 0 };
+    GstGLMemory *dest;
+
+    dest = _gl_mem_new (src->mem.mem.allocator, NULL, src->mem.context, &params,
+        &src->info, &src->valign, src->plane, NULL, NULL);
+    dest = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *)
+        dest);
+
+    if (dest == NULL) {
+      GST_WARNING ("Could not copy GL Memory");
+      goto done;
+    }
+
+    memcpy (dest->mem.data, (guint8 *) src->mem.data + src->mem.mem.offset,
+        src->mem.mem.size);
+    GST_MINI_OBJECT_FLAG_SET (dest, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
+    dest->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
+    ret = (GstMemory *) dest;
   } else {
+    GstAllocationParams params = { 0, src->mem.mem.align, 0, 0 };
     GstGLMemoryCopyParams copy_params;
+    GstGLMemory *dest;
 
     copy_params.src = src;
     copy_params.tex_id = 0;
     copy_params.out_format = src->tex_type;
-    copy_params.out_width = src->width;
-    copy_params.out_height = src->height;
-    copy_params.out_stride = src->height;
+    copy_params.tex_target = src->tex_target;
+    copy_params.out_width = src->tex_width;
+    copy_params.out_height = GL_MEM_HEIGHT (src);
+    copy_params.out_stride = GL_MEM_STRIDE (src);
     copy_params.respecify = FALSE;
 
-    gst_gl_context_thread_add (src->context, _gl_mem_copy_thread, &copy_params);
-
-    dest = g_slice_new0 (GstGLMemory);
-    _gl_mem_init (dest, src->mem.allocator, NULL, src->context, src->tex_type,
-        src->width, src->height, src->stride, NULL, NULL);
+    _gl_mem_copy_thread (src->mem.context, &copy_params);
 
     if (!copy_params.result) {
-      GST_CAT_WARNING (GST_CAT_GL_MEMORY, "Could not copy GL Memory");
-      gst_memory_unref ((GstMemory *) dest);
-      return NULL;
+      GST_WARNING ("Could not copy GL Memory");
+      goto done;
     }
 
+    dest = g_slice_new0 (GstGLMemory);
+    /* don't create our own texture */
+    dest->texture_wrapped = TRUE;
+    _gl_mem_init (dest, src->mem.mem.allocator, NULL, src->mem.context, &params,
+        &src->info, &src->valign, src->plane, NULL, NULL);
+    dest->texture_wrapped = FALSE;
+
     dest->tex_id = copy_params.tex_id;
-    dest->data = g_malloc (src->mem.maxsize);
-    if (dest->data == NULL) {
-      GST_CAT_WARNING (GST_CAT_GL_MEMORY, "Could not copy GL Memory");
-      gst_memory_unref ((GstMemory *) dest);
-      return NULL;
-    }
-    GST_GL_MEMORY_FLAG_SET (dest, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
+    dest->tex_target = copy_params.tex_target;
+    dest = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *)
+        dest);
+    GST_MINI_OBJECT_FLAG_SET (dest, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+    dest->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
+    ret = (GstMemory *) dest;
   }
 
-  return (GstMemory *) dest;
-}
-
-static GstMemory *
-_gl_mem_share (GstGLMemory * mem, gssize offset, gssize size)
-{
-  return NULL;
-}
-
-static gboolean
-_gl_mem_is_span (GstGLMemory * mem1, GstGLMemory * mem2, gsize * offset)
-{
-  return FALSE;
+done:
+  return ret;
 }
 
 static GstMemory *
@@ -888,15 +1155,15 @@
 }
 
 static void
-_destroy_gl_objects (GstGLContext * context, GstGLMemory * gl_mem)
+_gl_mem_destroy (GstGLMemory * gl_mem)
 {
-  const GstGLFuncs *gl = context->gl_vtable;
+  const GstGLFuncs *gl = gl_mem->mem.context->gl_vtable;
 
   if (gl_mem->tex_id && !gl_mem->texture_wrapped)
     gl->DeleteTextures (1, &gl_mem->tex_id);
 
-  if (gl_mem->pbo)
-    gl->DeleteBuffers (1, &gl_mem->pbo);
+  if (gl_mem->mem.id)
+    gl->DeleteBuffers (1, &gl_mem->mem.id);
 }
 
 static void
@@ -904,21 +1171,49 @@
 {
   GstGLMemory *gl_mem = (GstGLMemory *) mem;
 
-  gst_gl_context_thread_add (gl_mem->context,
-      (GstGLContextThreadFunc) _destroy_gl_objects, gl_mem);
+  GST_ALLOCATOR_CLASS (gst_gl_allocator_parent_class)->free (allocator, mem);
 
   if (gl_mem->notify)
     gl_mem->notify (gl_mem->user_data);
 
-  if (gl_mem->data && !gl_mem->data_wrapped) {
-    g_free (gl_mem->data);
-    gl_mem->data = NULL;
-  }
-
-  gst_object_unref (gl_mem->context);
   g_slice_free (GstGLMemory, gl_mem);
 }
 
+static void
+gst_gl_allocator_class_init (GstGLAllocatorClass * klass)
+{
+  GstGLBaseBufferAllocatorClass *gl_base;
+  GstAllocatorClass *allocator_class;
+
+  gl_base = (GstGLBaseBufferAllocatorClass *) klass;
+  allocator_class = (GstAllocatorClass *) klass;
+
+  gl_base->create = (GstGLBaseBufferAllocatorCreateFunction) _gl_mem_create;
+  gl_base->map_buffer =
+      (GstGLBaseBufferAllocatorMapBufferFunction) _gl_mem_map_buffer;
+  gl_base->unmap_buffer =
+      (GstGLBaseBufferAllocatorUnmapBufferFunction) _gl_mem_unmap_buffer;
+  gl_base->copy = (GstGLBaseBufferAllocatorCopyFunction) _gl_mem_copy;
+  gl_base->destroy = (GstGLBaseBufferAllocatorDestroyFunction) _gl_mem_destroy;
+
+  allocator_class->alloc = _gl_mem_alloc;
+  allocator_class->free = _gl_mem_free;
+}
+
+static void
+gst_gl_allocator_init (GstGLAllocator * allocator)
+{
+  GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
+
+  /* Keep the fallback copy function around, we will need it when copying with
+   * at an offset or smaller size */
+  allocator->fallback_mem_copy = alloc->mem_copy;
+
+  alloc->mem_type = GST_GL_MEMORY_ALLOCATOR;
+
+  GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
+}
+
 /**
  * gst_gl_memory_copy_into_texture:
  * @gl_mem:a #GstGLMemory
@@ -953,6 +1248,7 @@
   GstGLMemoryCopyParams copy_params;
 
   copy_params.src = gl_mem;
+  copy_params.tex_target = gl_mem->tex_target;
   copy_params.tex_id = tex_id;
   copy_params.out_format = tex_type;
   copy_params.out_width = width;
@@ -960,33 +1256,47 @@
   copy_params.out_stride = stride;
   copy_params.respecify = respecify;
 
-  gst_gl_context_thread_add (gl_mem->context, _gl_mem_copy_thread,
+  gst_gl_context_thread_add (gl_mem->mem.context, _gl_mem_copy_thread,
       &copy_params);
 
   return copy_params.result;
 }
 
+/**
+ * gst_gl_memory_wrapped_texture:
+ * @context: a #GstGLContext
+ * @texture_id: the GL texture handle
+ * @texture_target: the GL texture target
+ * @info: the #GstVideoInfo of the memory
+ * @plane: The plane this memory will represent
+ * @user_data: user data
+ * @notify: Destroy callback for the user data
+ *
+ * Wraps a texture handle into a #GstGLMemory.
+ *
+ * Returns: a newly allocated #GstGLMemory
+ */
 GstGLMemory *
-gst_gl_memory_wrapped_texture (GstGLContext * context, guint texture_id,
-    GstVideoGLTextureType tex_type, gint width, gint height, gpointer user_data,
-    GDestroyNotify notify)
+gst_gl_memory_wrapped_texture (GstGLContext * context,
+    guint texture_id, guint texture_target,
+    GstVideoInfo * info, guint plane, GstVideoAlignment * valign,
+    gpointer user_data, GDestroyNotify notify)
 {
   GstGLMemory *mem;
-  guint n_gl_bytes = _gl_texture_type_n_bytes (tex_type);
 
   mem = g_slice_new0 (GstGLMemory);
-  _gl_mem_init (mem, _gl_allocator, NULL, context, tex_type, width, height,
-      width * n_gl_bytes, NULL, NULL);
 
   mem->tex_id = texture_id;
-  mem->texture_wrapped = TRUE;
-  mem->data = g_malloc (mem->mem.maxsize);
-  if (mem->data == NULL) {
-    gst_memory_unref ((GstMemory *) mem);
-    return NULL;
-  }
 
-  GST_GL_MEMORY_FLAG_SET (mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
+  _gl_mem_init (mem, _gl_allocator, NULL, context, NULL, info, valign, plane,
+      user_data, notify);
+
+  mem->tex_target = texture_target;
+  mem->texture_wrapped = TRUE;
+
+  mem = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *) mem);
+  GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+  mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD;
 
   return mem;
 }
@@ -994,82 +1304,133 @@
 /**
  * gst_gl_memory_alloc:
  * @context:a #GstGLContext
- * @v_info: the #GstVideoInfo of the memory
+ * @params: a #GstAllocationParams
+ * @info: the #GstVideoInfo of the memory
+ * @plane: the plane this memory will represent
+ * @valign: the #GstVideoAlignment applied to @info
  *
- * Returns: a #GstMemory object with a GL texture specified by @v_info
+ * Allocated a new #GstGlMemory.
+ *
+ * Returns: a #GstMemory object with a GL texture specified by @vinfo
  *          from @context
  */
 GstMemory *
-gst_gl_memory_alloc (GstGLContext * context, GstVideoGLTextureType tex_type,
-    gint width, gint height, gint stride)
+gst_gl_memory_alloc (GstGLContext * context, GstAllocationParams * params,
+    GstVideoInfo * info, guint plane, GstVideoAlignment * valign)
 {
   GstGLMemory *mem;
 
-  mem = _gl_mem_new (_gl_allocator, NULL, context, tex_type, width, height,
-      stride, NULL, NULL);
-
-  mem->data = g_malloc (mem->mem.maxsize);
-  if (mem->data == NULL) {
-    gst_memory_unref ((GstMemory *) mem);
-    return NULL;
-  }
+  mem = _gl_mem_new (_gl_allocator, NULL, context, params, info, valign, plane,
+      NULL, NULL);
+  mem = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *) mem);
 
   return (GstMemory *) mem;
 }
 
 /**
- * gst_gl_memory_wrapped
+ * gst_gl_memory_wrapped:
  * @context:a #GstGLContext
- * @v_info: the #GstVideoInfo of the memory and data
+ * @info: the #GstVideoInfo of the memory and data
+ * @plane: the plane this memory will represent
+ * @valign: the #GstVideoAlignment applied to @info
  * @data: the data to wrap
  * @user_data: data called with for @notify
  * @notify: function called with @user_data when @data needs to be freed
  * 
+ * Wrapped @data into a #GstGLMemory. This version will account for padding
+ * added to the allocation and expressed through @valign.
+ *
  * Returns: a #GstGLMemory object with a GL texture specified by @v_info
  *          from @context and contents specified by @data
  */
 GstGLMemory *
-gst_gl_memory_wrapped (GstGLContext * context, GstVideoGLTextureType tex_type,
-    gint width, gint height, gint stride, gpointer data, gpointer user_data,
+gst_gl_memory_wrapped (GstGLContext * context, GstVideoInfo * info,
+    guint plane, GstVideoAlignment * valign, gpointer data, gpointer user_data,
     GDestroyNotify notify)
 {
   GstGLMemory *mem;
 
-  mem = _gl_mem_new (_gl_allocator, NULL, context, tex_type, width, height,
-      stride, user_data, notify);
+  mem = _gl_mem_new (_gl_allocator, NULL, context, NULL, info, valign, plane,
+      user_data, notify);
+  if (!mem)
+    return NULL;
 
-  mem->data = data;
-  mem->data_wrapped = TRUE;
+  mem->mem.data = data;
 
-  GST_GL_MEMORY_FLAG_SET (mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+  GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
+  mem->transfer_state |= GST_GL_MEMORY_TRANSFER_NEED_UPLOAD;
 
   return mem;
 }
 
-G_DEFINE_TYPE (GstGLAllocator, gst_gl_allocator, GST_TYPE_ALLOCATOR);
-
 static void
-gst_gl_allocator_class_init (GstGLAllocatorClass * klass)
+_download_transfer (GstGLContext * context, GstGLMemory * gl_mem)
 {
-  GstAllocatorClass *allocator_class;
+  GstGLBaseBuffer *mem = (GstGLBaseBuffer *) gl_mem;
 
-  allocator_class = (GstAllocatorClass *) klass;
+  g_mutex_lock (&mem->lock);
+  if (_read_pixels_to_pbo (gl_mem))
+    GST_CAT_TRACE (GST_CAT_GL_MEMORY, "optimistic download of texture %u "
+        "using pbo %u", gl_mem->tex_id, gl_mem->mem.id);
+  g_mutex_unlock (&mem->lock);
+}
 
-  allocator_class->alloc = _gl_mem_alloc;
-  allocator_class->free = _gl_mem_free;
+void
+gst_gl_memory_download_transfer (GstGLMemory * gl_mem)
+{
+  g_return_if_fail (gst_is_gl_memory ((GstMemory *) gl_mem));
+
+  gst_gl_context_thread_add (gl_mem->mem.context,
+      (GstGLContextThreadFunc) _download_transfer, gl_mem);
 }
 
 static void
-gst_gl_allocator_init (GstGLAllocator * allocator)
+_upload_transfer (GstGLContext * context, GstGLMemory * gl_mem)
 {
-  GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
+  GstGLBaseBufferAllocatorClass *alloc_class;
+  GstGLBaseBuffer *mem = (GstGLBaseBuffer *) gl_mem;
+  GstMapInfo info;
 
-  alloc->mem_type = GST_GL_MEMORY_ALLOCATOR;
-  alloc->mem_map = (GstMemoryMapFunction) _gl_mem_map;
-  alloc->mem_unmap = (GstMemoryUnmapFunction) _gl_mem_unmap;
-  alloc->mem_copy = (GstMemoryCopyFunction) _gl_mem_copy;
-  alloc->mem_share = (GstMemoryShareFunction) _gl_mem_share;
-  alloc->mem_is_span = (GstMemoryIsSpanFunction) _gl_mem_is_span;
+  alloc_class =
+      GST_GL_BASE_BUFFER_ALLOCATOR_CLASS (gst_gl_allocator_parent_class);
+
+  info.flags = GST_MAP_READ | GST_MAP_GL;
+  info.memory = (GstMemory *) mem;
+  /* from gst_memory_map() */
+  info.size = mem->mem.size;
+  info.maxsize = mem->mem.maxsize - mem->mem.offset;
+
+  g_mutex_lock (&mem->lock);
+  mem->target = GL_PIXEL_UNPACK_BUFFER;
+  alloc_class->map_buffer (mem, &info, mem->mem.maxsize);
+  alloc_class->unmap_buffer (mem, &info);
+  g_mutex_unlock (&mem->lock);
+}
+
+void
+gst_gl_memory_upload_transfer (GstGLMemory * gl_mem)
+{
+  g_return_if_fail (gst_is_gl_memory ((GstMemory *) gl_mem));
+
+  if (CONTEXT_SUPPORTS_PBO_UPLOAD (gl_mem->mem.context))
+    gst_gl_context_thread_add (gl_mem->mem.context,
+        (GstGLContextThreadFunc) _upload_transfer, gl_mem);
+}
+
+gint
+gst_gl_memory_get_texture_width (GstGLMemory * gl_mem)
+{
+  g_return_val_if_fail (gst_is_gl_memory ((GstMemory *) gl_mem), 0);
+
+  return gl_mem->tex_width;
+}
+
+gint
+gst_gl_memory_get_texture_height (GstGLMemory * gl_mem)
+{
+  g_return_val_if_fail (gst_is_gl_memory ((GstMemory *) gl_mem), 0);
+
+  return _get_plane_height (&gl_mem->info, gl_mem->plane);
 }
 
 /**
@@ -1103,46 +1464,55 @@
 gboolean
 gst_is_gl_memory (GstMemory * mem)
 {
-  return mem != NULL && mem->allocator == _gl_allocator;
+  return mem != NULL && mem->allocator != NULL
+      && g_type_is_a (G_OBJECT_TYPE (mem->allocator), GST_TYPE_GL_ALLOCATOR);
 }
 
 /**
  * gst_gl_memory_setup_buffer:
  * @context: a #GstGLContext
+ * @params: a #GstAllocationParams
  * @info: a #GstVideoInfo
+ * @valign: the #GstVideoAlignment applied to @info
  * @buffer: a #GstBuffer
  *
  * Adds the required #GstGLMemory<!--  -->s with the correct configuration to
- * @buffer based on @info.
+ * @buffer based on @info. This version handles padding through @valign.
  *
  * Returns: whether the memory's were sucessfully added.
  */
 gboolean
-gst_gl_memory_setup_buffer (GstGLContext * context, GstVideoInfo * info,
-    GstBuffer * buffer)
+gst_gl_memory_setup_buffer (GstGLContext * context,
+    GstAllocationParams * params, GstVideoInfo * info,
+    GstVideoAlignment * valign, GstBuffer * buffer)
 {
   GstGLMemory *gl_mem[GST_VIDEO_MAX_PLANES] = { NULL, };
-  GstVideoGLTextureType tex_type;
-  guint n_mem, i;
+  guint n_mem, i, v, views;
 
   n_mem = GST_VIDEO_INFO_N_PLANES (info);
 
-  for (i = 0; i < n_mem; i++) {
-    tex_type =
-        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),
-        GST_VIDEO_INFO_PLANE_STRIDE (info, i));
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    views = info->views;
+  else
+    views = 1;
 
-    gst_buffer_append_memory (buffer, (GstMemory *) gl_mem[i]);
+  for (v = 0; v < views; v++) {
+    for (i = 0; i < n_mem; i++) {
+      gl_mem[i] =
+          (GstGLMemory *) gst_gl_memory_alloc (context, params, info, i,
+          valign);
+      if (gl_mem[i] == NULL)
+        return FALSE;
+
+      gst_buffer_append_memory (buffer, (GstMemory *) gl_mem[i]);
+    }
+
+    gst_buffer_add_video_meta_full (buffer, v,
+        GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
+        GST_VIDEO_INFO_HEIGHT (info), n_mem, info->offset, info->stride);
   }
 
-  gst_buffer_add_video_meta_full (buffer, 0,
-      GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
-      GST_VIDEO_INFO_HEIGHT (info), n_mem, info->offset, info->stride);
-
   return TRUE;
 }
 
@@ -1150,30 +1520,29 @@
  * gst_gl_memory_setup_wrapped:
  * @context: a #GstGLContext
  * @info: a #GstVideoInfo
+ * @valign: a #GstVideoInfo
  * @data: a list of per plane data pointers
  * @textures: (transfer out): a list of #GstGLMemory
+ * @user_data: user data for the destroy function
+ * @notify: A function called each time a memory is freed
  *
  * Wraps per plane data pointer in @data into the corresponding entry in
- * @textures based on @info.
+ * @textures based on @info and padding from @valign. Note that the @notify
+ * will be called as many time as there is planes.
  *
  * Returns: whether the memory's were sucessfully created.
  */
 gboolean
 gst_gl_memory_setup_wrapped (GstGLContext * context, GstVideoInfo * info,
-    gpointer data[GST_VIDEO_MAX_PLANES],
-    GstGLMemory * textures[GST_VIDEO_MAX_PLANES])
+    GstVideoAlignment * valign, gpointer data[GST_VIDEO_MAX_PLANES],
+    GstGLMemory * textures[GST_VIDEO_MAX_PLANES], gpointer user_data,
+    GDestroyNotify notify)
 {
-  GstVideoGLTextureType tex_type;
   gint i;
 
   for (i = 0; i < GST_VIDEO_INFO_N_PLANES (info); i++) {
-    tex_type =
-        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),
-        GST_VIDEO_INFO_PLANE_STRIDE (info, i), data[i], NULL, NULL);
+    textures[i] = (GstGLMemory *) gst_gl_memory_wrapped (context, info, i,
+        valign, data[i], user_data, notify);
   }
 
   return TRUE;
diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h
index 82c9e88..7bc4607 100644
--- a/gst-libs/gst/gl/gstglmemory.h
+++ b/gst-libs/gst/gl/gstglmemory.h
@@ -26,6 +26,7 @@
 #include <gst/gstmemory.h>
 #include <gst/video/video.h>
 
+#include <gst/gl/gstglbasebuffer.h>
 #include <gst/gl/gl.h>
 
 G_BEGIN_DECLS
@@ -40,140 +41,122 @@
 #define GST_GL_ALLOCATOR_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_ALLOCATOR, GstGLAllocatorClass))
 #define GST_GL_ALLOCATOR_CAST(obj)            ((GstGLAllocator *)(obj))
 
-/**
- * GstGLMemoryFlags:
- *
- * Flags indicating the current state of a #GstGLMemory
- */
-typedef enum
+typedef enum _GstGLMemoryTransfer
 {
-  GST_GL_MEMORY_FLAG_DOWNLOAD_INITTED = (GST_MEMORY_FLAG_LAST << 0),
-  GST_GL_MEMORY_FLAG_UPLOAD_INITTED   = (GST_MEMORY_FLAG_LAST << 1),
-  GST_GL_MEMORY_FLAG_NEED_DOWNLOAD   = (GST_MEMORY_FLAG_LAST << 2),
-  GST_GL_MEMORY_FLAG_NEED_UPLOAD     = (GST_MEMORY_FLAG_LAST << 3)
-} GstGLMemoryFlags;
+  /* force a transfer between the texture and the PBO (if available) */
+  GST_GL_MEMORY_TRANSFER_NEED_UPLOAD = (1 << 0),
+  GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD = (1 << 1),
+} GstGLMemoryTransfer;
 
-/**
- * GST_MAP_GL:
- *
- * Flag indicating that we should map the GL object instead of to system memory.
- *
- * Combining #GST_MAP_GL with #GST_MAP_WRITE has the same semantics as though
- * you are writing to OpenGL. Conversely, combining #GST_MAP_GL with
- * #GST_MAP_READ has the same semantics as though you are reading from OpenGL.
- */
-#define GST_MAP_GL GST_MAP_FLAG_LAST << 1
+#define GST_GL_MEMORY_ADD_TRANSFER(mem,state) ((GstGLMemory *)mem)->transfer_state |= state
 
 /**
  * GstGLMemory:
  * @mem: the parent object
  * @context: the #GstGLContext to use for GL operations
- * @tex_id: the texture id for this memory
- * @v_format: the video format of this texture
- * @gl_format: the format of the texture
- * @width: width of the texture
- * @height: height of the texture
- * @download: the object used to download this texture into @v_format
- * @upload: the object used to upload this texture from @v_format
+ * @tex_id: the GL texture id for this memory
+ * @tex_target: the GL texture target for this memory
+ * @tex_type: the texture type
+ * @info: the texture's #GstVideoInfo
+ * @valign: data alignment for system memory mapping
+ * @plane: data plane in @info
+ * @tex_scaling: GL shader scaling parameters for @valign and/or width/height
  *
  * Represents information about a GL texture
  */
 struct _GstGLMemory
 {
-  GstMemory                    mem;
+  GstGLBaseBuffer       mem;
 
-  GstGLContext         *context;
   guint                 tex_id;
+  guint                 tex_target;
   GstVideoGLTextureType tex_type;
-  gint                  width;
-  gint                  height;
-  gint                  stride;
+  GstVideoInfo          info;
+  GstVideoAlignment     valign;
+  guint                 plane;
   gfloat                tex_scaling[2];
 
   /* <private> */
-  GstMapFlags           map_flags;
-  gpointer              data;
-
-  gboolean              data_wrapped;
+  GstGLMemoryTransfer   transfer_state;
   gboolean              texture_wrapped;
   GDestroyNotify        notify;
   gpointer              user_data;
-  guint                 pbo;
   guint                 unpack_length;
-
-  gpointer              _gst_reserved[GST_PADDING];
+  guint                 tex_width;
 };
 
 #define GST_CAPS_FEATURE_MEMORY_GL_MEMORY "memory:GLMemory"
+#define GST_GL_MEMORY_VIDEO_FORMATS_STR \
+    "{ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, " \
+    "AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, " \
+    "GRAY8, GRAY16_LE, GRAY16_BE }"
 
 /**
  * GST_GL_MEMORY_ALLOCATOR:
  *
- * The name of the GL memore allocator
+ * The name of the GL memory allocator
  */
 #define GST_GL_MEMORY_ALLOCATOR   "GLMemory"
 
-/**
- * GST_GL_MEMORY_FLAGS:
- * @mem: a #GstGLMemory
- *
- * Get the currently set flags on @mem
- */
-#define GST_GL_MEMORY_FLAGS(mem) GST_MEMORY_FLAGS(mem)
-
-/**
- * GST_GL_MEMORY_FLAG_IS_SET:
- * @mem: a #GstGLMemory
- * @flag: a flag
- *
- * Whether @flag is set on @mem
- */
-#define GST_GL_MEMORY_FLAG_IS_SET(mem,flag) GST_MEMORY_FLAG_IS_SET(mem,flag)
-
-/**
- * GST_GL_MEMORY_FLAG_SET:
- * @mem: a #GstGLMemory
- * @flag: a flag
- *
- * Set @flag on @mem
- */
-#define GST_GL_MEMORY_FLAG_SET(mem,flag) GST_MINI_OBJECT_FLAG_SET(mem,flag)
-
-/**
- * GST_GL_MEMORY_FLAG_UNSET:
- * @mem: a #GstGLMemory
- * @flag: a flag
- *
- * Unset @flag on @mem
- */
-#define GST_GL_MEMORY_FLAG_UNSET(mem,flag) GST_MEMORY_FLAG_UNSET(mem,flag)
-
 void          gst_gl_memory_init (void);
 gboolean      gst_is_gl_memory (GstMemory * mem);
 
-GstMemory *   gst_gl_memory_alloc   (GstGLContext * context, GstVideoGLTextureType tex_type, 
-                                     gint width, gint height, gint stride);
-GstGLMemory * gst_gl_memory_wrapped (GstGLContext * context, GstVideoGLTextureType tex_type, 
-                                     gint width, gint height, gint stride,
-                                     gpointer data, gpointer user_data,
+GstMemory *   gst_gl_memory_alloc   (GstGLContext * context,
+                                     GstAllocationParams *params,
+                                     GstVideoInfo * info,
+                                     guint plane,
+                                     GstVideoAlignment *valign);
+GstGLMemory * gst_gl_memory_wrapped (GstGLContext * context,
+                                     GstVideoInfo * info,
+                                     guint plane,
+                                     GstVideoAlignment *valign,
+                                     gpointer data,
+                                     gpointer user_data,
                                      GDestroyNotify notify);
-GstGLMemory * gst_gl_memory_wrapped_texture (GstGLContext * context, guint texture_id,
-                                             GstVideoGLTextureType tex_type, 
-                                             gint width, gint height,
-                                             gpointer user_data, GDestroyNotify notify);
+GstGLMemory * gst_gl_memory_wrapped_texture (GstGLContext * context,
+                                             guint texture_id,
+                                             guint texture_target,
+                                             GstVideoInfo * info,
+                                             guint plane,
+                                             GstVideoAlignment *valign,
+                                             gpointer user_data,
+                                             GDestroyNotify notify);
 
-gboolean      gst_gl_memory_copy_into_texture (GstGLMemory *gl_mem, guint tex_id,
-                                               GstVideoGLTextureType tex_type, 
-                                               gint width, gint height, gint stride,
+void          gst_gl_memory_download_transfer (GstGLMemory * gl_mem);
+void          gst_gl_memory_upload_transfer   (GstGLMemory * gl_mem);
+
+gboolean      gst_gl_memory_copy_into_texture (GstGLMemory *gl_mem,
+                                               guint tex_id,
+                                               GstVideoGLTextureType tex_type,
+                                               gint width,
+                                               gint height,
+                                               gint stride,
                                                gboolean respecify);
 
-gboolean      gst_gl_memory_setup_buffer  (GstGLContext * context, GstVideoInfo * info,
+gboolean      gst_gl_memory_setup_buffer  (GstGLContext * context,
+                                           GstAllocationParams * params,
+                                           GstVideoInfo * info,
+                                           GstVideoAlignment *valign,
                                            GstBuffer * buffer);
-gboolean      gst_gl_memory_setup_wrapped (GstGLContext * context, GstVideoInfo * info,
+gboolean      gst_gl_memory_setup_wrapped (GstGLContext * context,
+                                           GstVideoInfo * info,
+                                           GstVideoAlignment *valign,
                                            gpointer data[GST_VIDEO_MAX_PLANES],
-                                           GstGLMemory *textures[GST_VIDEO_MAX_PLANES]);
+                                           GstGLMemory *textures[GST_VIDEO_MAX_PLANES],
+                                           gpointer user_data,
+                                           GDestroyNotify notify);
 
-GstVideoGLTextureType gst_gl_texture_type_from_format (GstGLContext *context, GstVideoFormat v_format, guint plane);
+gint          gst_gl_memory_get_texture_width  (GstGLMemory * gl_mem);
+gint          gst_gl_memory_get_texture_height (GstGLMemory * gl_mem);
+
+/* utility functions */
+GstVideoGLTextureType gst_gl_texture_type_from_format (GstGLContext *context,
+                                                       GstVideoFormat v_format,
+                                                       guint plane);
+guint                 gst_gl_format_from_gl_texture_type (GstVideoGLTextureType tex_format);
+guint                 gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
+                                                                  guint format,
+                                                                  guint type);
 
 /**
  * GstGLAllocator
@@ -182,7 +165,8 @@
  */
 struct _GstGLAllocator
 {
-  GstAllocator parent;
+  GstGLBaseBufferAllocator parent;
+  GstMemoryCopyFunction fallback_mem_copy;
 };
 
 /**
@@ -192,7 +176,7 @@
  */
 struct _GstGLAllocatorClass
 {
-  GstAllocatorClass parent_class;
+  GstGLBaseBufferAllocatorClass parent_class;
 };
 
 G_END_DECLS
diff --git a/gst-libs/gst/gl/gstgloverlaycompositor.c b/gst-libs/gst/gl/gstgloverlaycompositor.c
new file mode 100644
index 0000000..97a4aab
--- /dev/null
+++ b/gst-libs/gst/gl/gstgloverlaycompositor.c
@@ -0,0 +1,608 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Lubosz Sarnecki <lubosz.sarnecki@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 <stdio.h>
+
+#include "gl.h"
+#include "gstgloverlaycompositor.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_overlay_compositor_debug);
+#define GST_CAT_DEFAULT gst_gl_overlay_compositor_debug
+
+/*****************************************************************************
+ * GstGLCompositionOverlay object is internally used by GstGLOverlayCompositor
+ *****************************************************************************/
+
+#define GST_TYPE_GL_COMPOSITION_OVERLAY (gst_gl_composition_overlay_get_type())
+#define GST_GL_COMPOSITION_OVERLAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_COMPOSITION_OVERLAY,\
+                              GstGLCompositionOverlay))
+
+typedef struct _GstGLCompositionOverlay GstGLCompositionOverlay;
+typedef struct _GstGLCompositionOverlayClass GstGLCompositionOverlayClass;
+
+static GType gst_gl_composition_overlay_get_type (void);
+
+/* *INDENT-OFF* */
+const gchar *fragment_shader =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;\n"
+  "uniform sampler2D tex;\n"
+  "void main(void)\n"
+  "{\n"
+  "  vec4 t = texture2D(tex, v_texcoord);\n"
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+  "  gl_FragColor = t.bgra;\n"
+#else
+  "  gl_FragColor = t.gbar;\n"
+#endif
+  "}";
+/* *INDENT-ON* */
+
+struct _GstGLCompositionOverlay
+{
+  GstObject parent;
+  GstGLContext *context;
+
+  GLuint vao;
+  GLuint index_buffer;
+  GLuint position_buffer;
+  GLuint texcoord_buffer;
+  GLint position_attrib;
+  GLint texcoord_attrib;
+
+  GLfloat positions[16];
+
+  GLuint texture_id;
+  GstGLMemory *gl_memory;
+  GstVideoOverlayRectangle *rectangle;
+};
+
+struct _GstGLCompositionOverlayClass
+{
+  GstObjectClass object_class;
+};
+
+G_DEFINE_TYPE (GstGLCompositionOverlay, gst_gl_composition_overlay,
+    GST_TYPE_OBJECT);
+
+static void
+gst_gl_composition_overlay_init_vertex_buffer (GstGLContext * context,
+    gpointer overlay_pointer)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+  GstGLCompositionOverlay *overlay =
+      (GstGLCompositionOverlay *) overlay_pointer;
+
+  /* *INDENT-OFF* */
+  static const GLfloat texcoords[] = {
+      1.0f, 0.0f,
+      0.0f, 0.0f,
+      0.0f, 1.0f,
+      1.0f, 1.0f
+  };
+
+  static const GLushort indices[] = {
+    0, 1, 2, 0, 2, 3
+  };
+  /* *INDENT-ON* */
+
+  if (gl->GenVertexArrays) {
+    gl->GenVertexArrays (1, &overlay->vao);
+    gl->BindVertexArray (overlay->vao);
+  }
+
+  gl->GenBuffers (1, &overlay->position_buffer);
+  gl->BindBuffer (GL_ARRAY_BUFFER, overlay->position_buffer);
+  gl->BufferData (GL_ARRAY_BUFFER, 4 * 4 * sizeof (GLfloat), overlay->positions,
+      GL_STATIC_DRAW);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (overlay->position_attrib, 4, GL_FLOAT, GL_FALSE,
+      4 * sizeof (GLfloat), NULL);
+
+  gl->GenBuffers (1, &overlay->texcoord_buffer);
+  gl->BindBuffer (GL_ARRAY_BUFFER, overlay->texcoord_buffer);
+  gl->BufferData (GL_ARRAY_BUFFER, 4 * 2 * sizeof (GLfloat), texcoords,
+      GL_STATIC_DRAW);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (overlay->texcoord_attrib, 2, GL_FLOAT, GL_FALSE,
+      2 * sizeof (GLfloat), NULL);
+
+  gl->GenBuffers (1, &overlay->index_buffer);
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, overlay->index_buffer);
+  gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+      GL_STATIC_DRAW);
+
+  gl->EnableVertexAttribArray (overlay->position_attrib);
+  gl->EnableVertexAttribArray (overlay->texcoord_attrib);
+
+  if (gl->GenVertexArrays) {
+    gl->BindVertexArray (0);
+  }
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+}
+
+static void
+gst_gl_composition_overlay_free_vertex_buffer (GstGLContext * context,
+    gpointer overlay_pointer)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+  GstGLCompositionOverlay *overlay =
+      (GstGLCompositionOverlay *) overlay_pointer;
+  if (overlay->vao) {
+    gl->DeleteVertexArrays (1, &overlay->vao);
+    overlay->vao = 0;
+  }
+
+  if (overlay->position_buffer) {
+    gl->DeleteBuffers (1, &overlay->position_buffer);
+    overlay->position_buffer = 0;
+  }
+
+  if (overlay->texcoord_buffer) {
+    gl->DeleteBuffers (1, &overlay->position_buffer);
+    overlay->position_buffer = 0;
+  }
+
+  if (overlay->index_buffer) {
+    gl->DeleteBuffers (1, &overlay->index_buffer);
+    overlay->index_buffer = 0;
+  }
+}
+
+static void
+gst_gl_composition_overlay_bind_vertex_buffer (GstGLCompositionOverlay *
+    overlay)
+{
+  const GstGLFuncs *gl = overlay->context->gl_vtable;
+  gl->BindBuffer (GL_ARRAY_BUFFER, overlay->position_buffer);
+  gl->VertexAttribPointer (overlay->position_attrib, 4, GL_FLOAT, GL_FALSE,
+      4 * sizeof (GLfloat), NULL);
+
+  gl->BindBuffer (GL_ARRAY_BUFFER, overlay->texcoord_buffer);
+  gl->VertexAttribPointer (overlay->texcoord_attrib, 2, GL_FLOAT, GL_FALSE,
+      2 * sizeof (GLfloat), NULL);
+
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, overlay->index_buffer);
+
+  gl->EnableVertexAttribArray (overlay->position_attrib);
+  gl->EnableVertexAttribArray (overlay->texcoord_attrib);
+}
+
+static void
+gst_gl_composition_overlay_finalize (GObject * object)
+{
+  GstGLCompositionOverlay *overlay;
+
+  overlay = GST_GL_COMPOSITION_OVERLAY (object);
+
+  if (overlay->gl_memory)
+    gst_memory_unref ((GstMemory *) overlay->gl_memory);
+
+  if (overlay->context) {
+    gst_gl_context_thread_add (overlay->context,
+        gst_gl_composition_overlay_free_vertex_buffer, overlay);
+    gst_object_unref (overlay->context);
+  }
+
+  G_OBJECT_CLASS (gst_gl_composition_overlay_parent_class)->finalize (object);
+}
+
+
+static void
+gst_gl_composition_overlay_class_init (GstGLCompositionOverlayClass * klass)
+{
+  G_OBJECT_CLASS (klass)->finalize = gst_gl_composition_overlay_finalize;
+}
+
+static void
+gst_gl_composition_overlay_init (GstGLCompositionOverlay * overlay)
+{
+}
+
+static void
+gst_gl_composition_overlay_add_transformation (GstGLCompositionOverlay *
+    overlay, GstBuffer * video_buffer)
+{
+  gint comp_x, comp_y;
+  guint comp_width, comp_height;
+  GstVideoMeta *meta;
+  guint width, height;
+
+  float rel_x, rel_y, rel_w, rel_h;
+
+  meta = gst_buffer_get_video_meta (video_buffer);
+
+  gst_video_overlay_rectangle_get_render_rectangle (overlay->rectangle,
+      &comp_x, &comp_y, &comp_width, &comp_height);
+
+  width = meta->width;
+  height = meta->height;
+
+  /* calculate relative position */
+  rel_x = (float) comp_x / (float) width;
+  rel_y = (float) comp_y / (float) height;
+
+  rel_w = (float) comp_width / (float) width;
+  rel_h = (float) comp_height / (float) height;
+
+  /* transform from [0,1] to [-1,1], invert y axis */
+  rel_x = rel_x * 2.0 - 1.0;
+  rel_y = (1.0 - rel_y) * 2.0 - 1.0;
+  rel_w = rel_w * 2.0;
+  rel_h = rel_h * 2.0;
+
+  /* initialize position array */
+  overlay->positions[0] = rel_x + rel_w;
+  overlay->positions[1] = rel_y;
+  overlay->positions[2] = 0.0;
+  overlay->positions[3] = 1.0;
+  overlay->positions[4] = rel_x;
+  overlay->positions[5] = rel_y;
+  overlay->positions[6] = 0.0;
+  overlay->positions[7] = 1.0;
+  overlay->positions[8] = rel_x;
+  overlay->positions[9] = rel_y - rel_h;
+  overlay->positions[10] = 0.0;
+  overlay->positions[11] = 1.0;
+  overlay->positions[12] = rel_x + rel_w;
+  overlay->positions[13] = rel_y - rel_h;
+  overlay->positions[14] = 0.0;
+  overlay->positions[15] = 1.0;
+
+  gst_gl_context_thread_add (overlay->context,
+      gst_gl_composition_overlay_free_vertex_buffer, overlay);
+
+  gst_gl_context_thread_add (overlay->context,
+      gst_gl_composition_overlay_init_vertex_buffer, overlay);
+
+  GST_DEBUG
+      ("overlay position: (%d,%d) size: %dx%d video size: %dx%d",
+      comp_x, comp_y, comp_width, comp_height, meta->width, meta->height);
+}
+
+/* helper object API functions */
+
+static GstGLCompositionOverlay *
+gst_gl_composition_overlay_new (GstGLContext * context,
+    GstVideoOverlayRectangle * rectangle,
+    GLint position_attrib, GLint texcoord_attrib)
+{
+  GstGLCompositionOverlay *overlay =
+      g_object_new (GST_TYPE_GL_COMPOSITION_OVERLAY, NULL);
+
+  overlay->gl_memory = NULL;
+  overlay->texture_id = -1;
+  overlay->rectangle = rectangle;
+  overlay->context = gst_object_ref (context);
+  overlay->vao = 0;
+  overlay->position_attrib = position_attrib;
+  overlay->texcoord_attrib = texcoord_attrib;
+
+  GST_DEBUG_OBJECT (overlay, "Created new GstGLCompositionOverlay");
+
+  return overlay;
+}
+
+static void
+_video_frame_unmap_and_free (gpointer user_data)
+{
+  GstVideoFrame *frame = user_data;
+
+  gst_video_frame_unmap (frame);
+  g_slice_free (GstVideoFrame, frame);
+}
+
+static void
+gst_gl_composition_overlay_upload (GstGLCompositionOverlay * overlay,
+    GstBuffer * buf)
+{
+  GstGLMemory *comp_gl_memory = NULL;
+  GstBuffer *comp_buffer = NULL;
+  GstBuffer *overlay_buffer = NULL;
+  GstVideoInfo vinfo;
+  GstVideoMeta *vmeta;
+  GstVideoFrame *comp_frame;
+  GstVideoFrame gl_frame;
+
+  comp_buffer =
+      gst_video_overlay_rectangle_get_pixels_unscaled_argb (overlay->rectangle,
+      GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA);
+
+  comp_frame = g_slice_new (GstVideoFrame);
+
+  vmeta = gst_buffer_get_video_meta (comp_buffer);
+  gst_video_info_set_format (&vinfo, vmeta->format, vmeta->width,
+      vmeta->height);
+  vinfo.stride[0] = vmeta->stride[0];
+
+  if (gst_video_frame_map (comp_frame, &vinfo, comp_buffer, GST_MAP_READ)) {
+    gst_gl_composition_overlay_add_transformation (overlay, buf);
+
+    comp_gl_memory =
+        gst_gl_memory_wrapped (overlay->context, &comp_frame->info, 0, NULL,
+        comp_frame->data[0], comp_frame, _video_frame_unmap_and_free);
+
+    overlay_buffer = gst_buffer_new ();
+    gst_buffer_append_memory (overlay_buffer, (GstMemory *) comp_gl_memory);
+
+    if (!gst_video_frame_map (&gl_frame, &comp_frame->info, overlay_buffer,
+            GST_MAP_READ | GST_MAP_GL)) {
+      gst_buffer_unref (overlay_buffer);
+      _video_frame_unmap_and_free (comp_frame);
+      GST_WARNING_OBJECT (overlay, "Cannot upload overlay texture");
+      return;
+    }
+
+    gst_memory_ref ((GstMemory *) comp_gl_memory);
+    overlay->gl_memory = comp_gl_memory;
+    overlay->texture_id = comp_gl_memory->tex_id;
+
+    gst_buffer_unref (overlay_buffer);
+    gst_video_frame_unmap (&gl_frame);
+
+    GST_DEBUG ("uploaded overlay texture %d", overlay->texture_id);
+  } else {
+    g_slice_free (GstVideoFrame, comp_frame);
+  }
+}
+
+static void
+gst_gl_composition_overlay_draw (GstGLCompositionOverlay * overlay,
+    GstGLShader * shader)
+{
+  const GstGLFuncs *gl = overlay->context->gl_vtable;
+  if (gl->GenVertexArrays)
+    gl->BindVertexArray (overlay->vao);
+  else
+    gst_gl_composition_overlay_bind_vertex_buffer (overlay);
+
+  if (overlay->texture_id != -1)
+    gl->BindTexture (GL_TEXTURE_2D, overlay->texture_id);
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
+}
+
+
+/********************************************************************
+ * GstGLOverlayCompositor object, the public helper object to render
+ * GstVideoCompositionOverlayMeta
+ ********************************************************************/
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_gl_overlay_compositor_debug, \
+      "gloverlaycompositor", 0, "overlaycompositor");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLOverlayCompositor, gst_gl_overlay_compositor,
+    GST_TYPE_OBJECT, DEBUG_INIT);
+
+static void gst_gl_overlay_compositor_finalize (GObject * object);
+static gboolean _is_rectangle_in_overlays (GList * overlays,
+    GstVideoOverlayRectangle * rectangle);
+static gboolean _is_overlay_in_rectangles (GstVideoOverlayComposition *
+    composition, GstGLCompositionOverlay * overlay);
+
+static void
+gst_gl_overlay_compositor_class_init (GstGLOverlayCompositorClass * klass)
+{
+  G_OBJECT_CLASS (klass)->finalize = gst_gl_overlay_compositor_finalize;
+}
+
+static void
+gst_gl_overlay_compositor_init (GstGLOverlayCompositor * compositor)
+{
+}
+
+static void
+gst_gl_overlay_compositor_init_gl (GstGLContext * context,
+    gpointer compositor_pointer)
+{
+  GstGLOverlayCompositor *compositor =
+      (GstGLOverlayCompositor *) compositor_pointer;
+
+  if (!gst_gl_shader_compile_with_default_v_and_check (compositor->shader,
+          fragment_shader, &compositor->position_attrib,
+          &compositor->texcoord_attrib)) {
+    GST_ERROR ("could not initialize shader.");
+  }
+}
+
+GstGLOverlayCompositor *
+gst_gl_overlay_compositor_new (GstGLContext * context)
+{
+  GstGLOverlayCompositor *compositor =
+      g_object_new (GST_TYPE_GL_OVERLAY_COMPOSITOR, NULL);
+
+  compositor->context = gst_object_ref (context);
+
+  compositor->shader = gst_gl_shader_new (compositor->context);
+
+  gst_gl_context_thread_add (compositor->context,
+      gst_gl_overlay_compositor_init_gl, compositor);
+
+  GST_DEBUG_OBJECT (compositor, "Created new GstGLOverlayCompositor");
+
+  return compositor;
+}
+
+static void
+gst_gl_overlay_compositor_finalize (GObject * object)
+{
+  GstGLOverlayCompositor *compositor;
+
+  compositor = GST_GL_OVERLAY_COMPOSITOR (object);
+
+  gst_gl_overlay_compositor_free_overlays (compositor);
+
+  if (compositor->context)
+    gst_object_unref (compositor->context);
+
+  if (compositor->shader) {
+    gst_object_unref (compositor->shader);
+    compositor->shader = NULL;
+  }
+
+  G_OBJECT_CLASS (gst_gl_overlay_compositor_parent_class)->finalize (object);
+}
+
+static gboolean
+_is_rectangle_in_overlays (GList * overlays,
+    GstVideoOverlayRectangle * rectangle)
+{
+  GList *l;
+
+  for (l = overlays; l != NULL; l = l->next) {
+    GstGLCompositionOverlay *overlay = (GstGLCompositionOverlay *) l->data;
+    if (overlay->rectangle == rectangle)
+      return TRUE;
+  }
+  return FALSE;
+}
+
+static gboolean
+_is_overlay_in_rectangles (GstVideoOverlayComposition * composition,
+    GstGLCompositionOverlay * overlay)
+{
+  guint i;
+
+  for (i = 0; i < gst_video_overlay_composition_n_rectangles (composition); i++) {
+    GstVideoOverlayRectangle *rectangle =
+        gst_video_overlay_composition_get_rectangle (composition, i);
+    if (overlay->rectangle == rectangle)
+      return TRUE;
+  }
+  return FALSE;
+}
+
+
+void
+gst_gl_overlay_compositor_free_overlays (GstGLOverlayCompositor * compositor)
+{
+  GList *l = compositor->overlays;
+  while (l != NULL) {
+    GList *next = l->next;
+    GstGLCompositionOverlay *overlay = (GstGLCompositionOverlay *) l->data;
+    compositor->overlays = g_list_delete_link (compositor->overlays, l);
+    gst_object_unref (overlay);
+    l = next;
+  }
+  g_list_free (compositor->overlays);
+  compositor->overlays = NULL;
+}
+
+void
+gst_gl_overlay_compositor_upload_overlays (GstGLOverlayCompositor * compositor,
+    GstBuffer * buf)
+{
+  GstVideoOverlayCompositionMeta *composition_meta;
+
+  composition_meta = gst_buffer_get_video_overlay_composition_meta (buf);
+  if (composition_meta) {
+    GstVideoOverlayComposition *composition = NULL;
+    guint num_overlays, i;
+    GList *l = compositor->overlays;
+
+    GST_DEBUG ("GstVideoOverlayCompositionMeta found.");
+
+    composition = composition_meta->overlay;
+    num_overlays = gst_video_overlay_composition_n_rectangles (composition);
+
+    /* add new overlays to list */
+    for (i = 0; i < num_overlays; i++) {
+      GstVideoOverlayRectangle *rectangle =
+          gst_video_overlay_composition_get_rectangle (composition, i);
+
+      if (!_is_rectangle_in_overlays (compositor->overlays, rectangle)) {
+        GstGLCompositionOverlay *overlay =
+            gst_gl_composition_overlay_new (compositor->context, rectangle,
+            compositor->position_attrib, compositor->texcoord_attrib);
+
+        gst_gl_composition_overlay_upload (overlay, buf);
+
+        compositor->overlays = g_list_append (compositor->overlays, overlay);
+      }
+    }
+
+    /* remove old overlays from list */
+    while (l != NULL) {
+      GList *next = l->next;
+      GstGLCompositionOverlay *overlay = (GstGLCompositionOverlay *) l->data;
+      if (!_is_overlay_in_rectangles (composition, overlay)) {
+        compositor->overlays = g_list_delete_link (compositor->overlays, l);
+        gst_object_unref (overlay);
+      }
+      l = next;
+    }
+  } else {
+    gst_gl_overlay_compositor_free_overlays (compositor);
+  }
+}
+
+void
+gst_gl_overlay_compositor_draw_overlays (GstGLOverlayCompositor * compositor)
+{
+  const GstGLFuncs *gl = compositor->context->gl_vtable;
+  if (compositor->overlays != NULL) {
+    GList *l;
+
+    gl->Enable (GL_BLEND);
+    gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+    gst_gl_shader_use (compositor->shader);
+    gl->ActiveTexture (GL_TEXTURE0);
+    gst_gl_shader_set_uniform_1i (compositor->shader, "tex", 0);
+
+    for (l = compositor->overlays; l != NULL; l = l->next) {
+      GstGLCompositionOverlay *overlay = (GstGLCompositionOverlay *) l->data;
+      gst_gl_composition_overlay_draw (overlay, compositor->shader);
+    }
+
+    gl->BindTexture (GL_TEXTURE_2D, 0);
+    gl->Disable (GL_BLEND);
+  }
+}
+
+GstCaps *
+gst_gl_overlay_compositor_add_caps (GstCaps * caps)
+{
+  GstCaps *composition_caps;
+  int i;
+
+  composition_caps = gst_caps_copy (caps);
+
+  for (i = 0; i < gst_caps_get_size (composition_caps); i++) {
+    GstCapsFeatures *f = gst_caps_get_features (composition_caps, i);
+    gst_caps_features_add (f,
+        GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+  }
+
+  caps = gst_caps_merge (composition_caps, caps);
+
+  return caps;
+}
diff --git a/gst-libs/gst/gl/gstgloverlaycompositor.h b/gst-libs/gst/gl/gstgloverlaycompositor.h
new file mode 100644
index 0000000..dcecb49
--- /dev/null
+++ b/gst-libs/gst/gl/gstgloverlaycompositor.h
@@ -0,0 +1,78 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Lubosz Sarnecki <lubosz.sarnecki@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_GL_OVERLAY_COMPOSITOR_H__
+#define __GST_GL_OVERLAY_COMPOSITOR_H__
+
+#include <gst/video/video.h>
+#include <gst/gl/gstgl_fwd.h>
+
+#define GST_TYPE_GL_OVERLAY_COMPOSITOR (gst_gl_overlay_compositor_get_type())
+#define GST_GL_OVERLAY_COMPOSITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_OVERLAY_COMPOSITOR,GstGLOverlayCompositor))
+#define GST_GL_OVERLAY_COMPOSITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_OVERLAY_COMPOSITOR,GstGLOverlayCompositorClass))
+#define GST_IS_GL_OVERLAY_COMPOSITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_OVERLAY_COMPOSITOR))
+#define GST_IS_GL_OVERLAY_COMPOSITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_OVERLAY_COMPOSITOR))
+#define GST_GL_OVERLAY_COMPOSITOR_CAST(obj) ((GstGLOverlayCompositor*)(obj))
+
+G_BEGIN_DECLS
+
+GType gst_gl_overlay_compositor_get_type (void);
+
+/**
+ * GstGLOverlayCompositor
+ *
+ * Opaque #GstGLOverlayCompositor object
+ */
+struct _GstGLOverlayCompositor
+{
+  GstObject parent;
+  GstGLContext *context;
+  guint last_window_width;
+  guint last_window_height;
+
+  GList * overlays;
+ 
+  GstGLShader *shader;
+  GLint  position_attrib;
+  GLint  texcoord_attrib;
+};
+
+/**
+ * GstGLOverlayCompositorClass:
+ *
+ */
+struct _GstGLOverlayCompositorClass
+{
+  GstObjectClass object_class;
+};
+
+GstGLOverlayCompositor *gst_gl_overlay_compositor_new (GstGLContext * context);
+
+void gst_gl_overlay_compositor_free_overlays (GstGLOverlayCompositor * compositor);
+
+void gst_gl_overlay_compositor_upload_overlays (GstGLOverlayCompositor * compositor,
+        GstBuffer * buf);
+
+void gst_gl_overlay_compositor_draw_overlays (GstGLOverlayCompositor * compositor);
+
+GstCaps * gst_gl_overlay_compositor_add_caps(GstCaps * caps);
+
+G_END_DECLS
+#endif /* __GST_GL_OVERLAY_COMPOSITOR_H__ */
diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
index de56223..a41bf38 100644
--- a/gst-libs/gst/gl/gstglshader.c
+++ b/gst-libs/gst/gl/gstglshader.c
@@ -26,28 +26,33 @@
 #include "gl.h"
 #include "gstglshader.h"
 
-#if GST_GL_HAVE_GLES2
+/* FIXME: separate into separate shader stage objects that can be added/removed
+ * independently of the shader program */
+
+static const gchar *es2_version_header = "#version 100\n";
+
 /* *INDENT-OFF* */
 static const gchar *simple_vertex_shader_str_gles2 =
-      "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";
+      "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";
 
 static const gchar *simple_fragment_shader_str_gles2 =
-      "precision mediump float;                            \n"
-      "varying vec2 v_texCoord;                            \n"
-      "uniform sampler2D tex;                              \n"
-      "void main()                                         \n"
-      "{                                                   \n"
-      "  gl_FragColor = texture2D( tex, v_texCoord );      \n"
-      "}                                                   \n";
+      "#ifdef GL_ES\n"
+      "precision mediump float;\n"
+      "#endif\n"
+      "varying vec2 v_texcoord;\n"
+      "uniform sampler2D tex;\n"
+      "void main()\n"
+      "{\n"
+      "  gl_FragColor = texture2D(tex, v_texcoord);\n"
+      "}";
 /* *INDENT-ON* */
-#endif
 
 #ifndef GL_COMPILE_STATUS
 #define GL_COMPILE_STATUS             0x8B81
@@ -107,6 +112,8 @@
   gboolean compiled;
   gboolean active;
 
+  GstGLAPI gl_api;
+
   GstGLShaderVTable vtable;
 };
 
@@ -149,7 +156,7 @@
   shader = GST_GL_SHADER (object);
   priv = shader->priv;
 
-  GST_TRACE ("finalizing shader %u", priv->program_handle);
+  GST_TRACE_OBJECT (shader, "finalizing shader %u", priv->program_handle);
 
   g_free (priv->vertex_src);
   g_free (priv->fragment_src);
@@ -212,6 +219,13 @@
 
 }
 
+int
+gst_gl_shader_get_program_handle (GstGLShader * shader)
+{
+  GstGLShaderPrivate *priv = shader->priv;
+  return (int) priv->program_handle;
+}
+
 static void
 gst_gl_shader_class_init (GstGLShaderClass * klass)
 {
@@ -317,6 +331,9 @@
 
   priv->compiled = FALSE;
   priv->active = FALSE;         /* unused at the moment */
+
+  /* FIXME: add API to get/set this for each shader */
+  priv->gl_api = GST_GL_API_ANY;
 }
 
 static gboolean
@@ -374,6 +391,9 @@
   shader = g_object_new (GST_GL_TYPE_SHADER, NULL);
   shader->context = gst_object_ref (context);
 
+  GST_DEBUG_OBJECT (shader, "Created new GLShader for context %" GST_PTR_FORMAT,
+      context);
+
   return shader;
 }
 
@@ -385,6 +405,80 @@
   return shader->priv->compiled;
 }
 
+static gboolean
+_shader_string_has_version (const gchar * str)
+{
+  gboolean sl_comment = FALSE;
+  gboolean ml_comment = FALSE;
+  gboolean has_version = FALSE;
+  gint i = 0;
+
+  /* search for #version to allow for preceeding comments as allowed by the
+   * GLSL specification */
+  while (str && str[i] != '\0' && i < 1024) {
+    if (sl_comment) {
+      if (str[i] != '\n')
+        sl_comment = FALSE;
+      i++;
+      continue;
+    }
+
+    if (ml_comment) {
+      if (g_strstr_len (&str[i], 2, "*/")) {
+        ml_comment = FALSE;
+        i += 2;
+      } else {
+        i++;
+      }
+      continue;
+    }
+
+    if (g_strstr_len (&str[i], 2, "//")) {
+      sl_comment = TRUE;
+      i += 2;
+      continue;
+    }
+
+    if (g_strstr_len (&str[i], 2, "/*")) {
+      ml_comment = TRUE;
+      i += 2;
+      continue;
+    }
+
+    if (g_strstr_len (&str[i], 1, "#")) {
+      if (g_strstr_len (&str[i], 8, "#version"))
+        has_version = TRUE;
+      break;
+    }
+
+    i++;
+  }
+
+  return has_version;
+}
+
+static void
+_maybe_prepend_version (GstGLShader * shader, const gchar * shader_str,
+    gint * n_vertex_sources, const gchar *** vertex_sources)
+{
+  gint n = 1;
+
+  /* FIXME: this all an educated guess */
+  if (gst_gl_context_check_gl_version (shader->context, GST_GL_API_OPENGL3, 3,
+          0)
+      && (shader->priv->gl_api & GST_GL_API_GLES2) != 0
+      && !_shader_string_has_version (shader_str))
+    n = 2;
+
+  *vertex_sources = g_malloc0 (n * sizeof (gchar *));
+
+  if (n > 1)
+    *vertex_sources[0] = es2_version_header;
+
+  (*vertex_sources)[n - 1] = shader_str;
+  *n_vertex_sources = n;
+}
+
 gboolean
 gst_gl_shader_compile (GstGLShader * shader, GError ** error)
 {
@@ -413,13 +507,22 @@
   g_return_val_if_fail (priv->program_handle, FALSE);
 
   if (priv->vertex_src) {
+    gint n_vertex_sources;
+    const gchar **vertex_sources;
+
+    _maybe_prepend_version (shader, priv->vertex_src, &n_vertex_sources,
+        &vertex_sources);
+
     /* create vertex object */
-    const gchar *vertex_source = priv->vertex_src;
     priv->vertex_handle = priv->vtable.CreateShader (GL_VERTEX_SHADER);
-    gl->ShaderSource (priv->vertex_handle, 1, &vertex_source, NULL);
+    gl->ShaderSource (priv->vertex_handle, n_vertex_sources, vertex_sources,
+        NULL);
+    g_free (vertex_sources);
+
     /* compile */
     gl->CompileShader (priv->vertex_handle);
     /* check everything is ok */
+    status = GL_FALSE;
     gl->GetShaderiv (priv->vertex_handle, GL_COMPILE_STATUS, &status);
 
     priv->vtable.GetShaderInfoLog (priv->vertex_handle,
@@ -445,13 +548,21 @@
   }
 
   if (priv->fragment_src) {
+    gint n_fragment_sources;
+    const gchar **fragment_sources;
+
+    _maybe_prepend_version (shader, priv->fragment_src, &n_fragment_sources,
+        &fragment_sources);
+
     /* create fragment object */
-    const gchar *fragment_source = priv->fragment_src;
     priv->fragment_handle = priv->vtable.CreateShader (GL_FRAGMENT_SHADER);
-    gl->ShaderSource (priv->fragment_handle, 1, &fragment_source, NULL);
+    gl->ShaderSource (priv->fragment_handle, n_fragment_sources,
+        fragment_sources, NULL);
+    g_free (fragment_sources);
     /* compile */
     gl->CompileShader (priv->fragment_handle);
     /* check everything is ok */
+    status = GL_FALSE;
     priv->vtable.GetShaderiv (priv->fragment_handle,
         GL_COMPILE_STATUS, &status);
 
@@ -478,6 +589,7 @@
 
   /* if nothing failed link shaders */
   gl->LinkProgram (priv->program_handle);
+  status = GL_FALSE;
   priv->vtable.GetProgramiv (priv->program_handle, GL_LINK_STATUS, &status);
 
   priv->vtable.GetProgramInfoLog (priv->program_handle,
@@ -627,7 +739,6 @@
   return TRUE;
 }
 
-#if GST_GL_HAVE_GLES2
 gboolean
 gst_gl_shader_compile_with_default_f_and_check (GstGLShader * shader,
     const gchar * v_src, const gint n_attribs, const gchar * attrib_names[],
@@ -641,12 +752,11 @@
 gst_gl_shader_compile_with_default_v_and_check (GstGLShader * shader,
     const gchar * f_src, GLint * pos_loc, GLint * tex_loc)
 {
-  const gchar *attrib_names[2] = { "a_position", "a_texCoord" };
+  const gchar *attrib_names[2] = { "a_position", "a_texcoord" };
   GLint attrib_locs[2] = { 0 };
   gboolean ret = TRUE;
 
-  ret =
-      gst_gl_shader_compile_all_with_attribs_and_check (shader,
+  ret = gst_gl_shader_compile_all_with_attribs_and_check (shader,
       simple_vertex_shader_str_gles2, f_src, 2, attrib_names, attrib_locs);
 
   if (ret) {
@@ -664,7 +774,6 @@
   return gst_gl_shader_compile_with_default_v_and_check (shader,
       simple_fragment_shader_str_gles2, pos_loc, tex_loc);
 }
-#endif
 
 void
 gst_gl_shader_set_uniform_1f (GstGLShader * shader, const gchar * name,
@@ -1125,9 +1234,12 @@
   GstGLShaderPrivate *priv;
   GstGLFuncs *gl;
 
-  g_return_val_if_fail (shader != NULL, 0);
+  g_return_val_if_fail (shader != NULL, -1);
   priv = shader->priv;
-  g_return_val_if_fail (priv->program_handle != 0, 0);
+  g_return_val_if_fail (priv->program_handle != 0, -1);
+  if (0 == priv->vertex_handle)
+    return -1;
+
   gl = shader->context->gl_vtable;
 
   return gl->GetAttribLocation (priv->program_handle, name);
diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
index a56b642..97f98fc 100644
--- a/gst-libs/gst/gl/gstglshader.h
+++ b/gst-libs/gst/gl/gstglshader.h
@@ -67,6 +67,8 @@
 
 GstGLShader * gst_gl_shader_new (GstGLContext *context);
 
+int gst_gl_shader_get_program_handle(GstGLShader * shader);
+
 void          gst_gl_shader_set_vertex_source   (GstGLShader *shader, const gchar *src);
 void          gst_gl_shader_set_fragment_source (GstGLShader *shader, const gchar *src);
 const gchar * gst_gl_shader_get_vertex_source   (GstGLShader *shader);
@@ -77,11 +79,10 @@
 gboolean gst_gl_shader_compile           (GstGLShader *shader, GError **error);
 gboolean gst_gl_shader_compile_and_check (GstGLShader *shader, const gchar *source, GstGLShaderSourceType type);
 gboolean gst_gl_shader_compile_all_with_attribs_and_check (GstGLShader *shader, const gchar *v_src, const gchar *f_src, const gint n_attribs, const gchar *attrib_names[], GLint attrib_locs[]);
-#if GST_GL_HAVE_GLES2
+
 gboolean gst_gl_shader_compile_with_default_f_and_check   (GstGLShader *shader, const gchar *v_src, const gint n_attribs, const gchar *attrib_names[], GLint attrib_locs[]);
 gboolean gst_gl_shader_compile_with_default_v_and_check   (GstGLShader *shader, const gchar *f_src, GLint *pos_loc, GLint *tex_loc);
 gboolean gst_gl_shader_compile_with_default_vf_and_check  (GstGLShader *shader, GLint *pos_loc, GLint *tex_loc);
-#endif
 
 void gst_gl_shader_release       (GstGLShader *shader);
 void gst_gl_shader_use           (GstGLShader *shader);
diff --git a/gst-libs/gst/gl/gstglshadervariables.c b/gst-libs/gst/gl/gstglshadervariables.c
index 4ca2efe..be04c94 100644
--- a/gst-libs/gst/gl/gstglshadervariables.c
+++ b/gst-libs/gst/gl/gstglshadervariables.c
@@ -184,7 +184,7 @@
     return 0;
 
   p0 = variables;
-  trimright (p0, " \t\n");
+  trimright (p0, " \t\r\n");
   lim = variables + strlen (variables);
   e = strchr (p0, ';');
   while (p0 < lim) {
@@ -201,13 +201,13 @@
     e[1] = e1;
 
     trimright (p, " \t");
-    trimleft (p, " \t\n");
+    trimleft (p, " \t\r\n");
 
     t = strtok_r (p, " \t", &saveptr);
     if (!t)
       goto parse_error;
     trimleft (t, " \t");
-    trimright (t, " \t\n");
+    trimright (t, " \t\r\n");
 
     if (t[0]) {
 
@@ -318,7 +318,7 @@
     t = p = p0;
   } else {
     e[1] = 0;
-    trimleft (p0, " \t\n");
+    trimleft (p0, " \t\r\n");
     GST_ERROR ("\n%s", p0);
     e[1] = e1;
   }
@@ -741,7 +741,7 @@
             return _saveptr + j;
         }
         ret->value = (void *) g_malloc (sizeof (float));
-        *((float *) ret->value) = (float) strtod (value, NULL);
+        *((float *) ret->value) = (float) g_ascii_strtod (value, NULL);
 
       } else {
         ret->value = g_malloc (sizeof (float) * ret->count);
@@ -762,7 +762,7 @@
               return _saveptr + (saveptr - t) + j;
           }
 
-          ((float *) ret->value)[i] = (float) strtod (t, NULL);
+          ((float *) ret->value)[i] = (float) g_ascii_strtod (t, NULL);
           t = strtok_r (0, ",", &saveptr);
         }
       }
@@ -925,7 +925,7 @@
           return _saveptr + (saveptr - t) + j;
       }
 
-      ((float *) ret->value)[i] = (float) strtod (t, NULL);
+      ((float *) ret->value)[i] = (float) g_ascii_strtod (t, NULL);
       t = strtok_r (0, ",", &saveptr);
     }
 
@@ -975,7 +975,7 @@
             return _saveptr + (t - value) + j;
         }
 
-        ((float *) ret->value)[k * n + i] = (float) strtod (t, NULL);
+        ((float *) ret->value)[k * n + i] = (float) g_ascii_strtod (t, NULL);
         t = strtok_r (0, ",", &saveptr);
         if (i < (n - 1) && !t)
           return _saveptr + (saveptr - value);
@@ -1424,7 +1424,7 @@
           return _saveptr + (saveptr - t) + j;
       }
 
-      ((float *) ret->value)[i] = (float) strtod (t, NULL);
+      ((float *) ret->value)[i] = (float) g_ascii_strtod (t, NULL);
       t = strtok_r (0, ",", &saveptr);
     }
 
@@ -1474,7 +1474,8 @@
             return _saveptr + (t - value) + j;
         }
 
-        ((float *) ret->value)[k * n * m + i] = (float) strtod (t, NULL);
+        ((float *) ret->value)[k * n * m + i] =
+            (float) g_ascii_strtod (t, NULL);
         t = strtok_r (0, ",", &saveptr);
         if (i < (n * m - 1) && !t)
           return _saveptr + (saveptr - value);
diff --git a/gst-libs/gst/gl/gstglsyncmeta.c b/gst-libs/gst/gl/gstglsyncmeta.c
new file mode 100644
index 0000000..f680353
--- /dev/null
+++ b/gst-libs/gst/gl/gstglsyncmeta.c
@@ -0,0 +1,214 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.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 "gl.h"
+#include "gstglsyncmeta.h"
+
+#define GST_CAT_DEFAULT gst_gl_sync_meta_debug
+GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
+
+#ifndef GL_SYNC_GPU_COMMANDS_COMPLETE
+#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
+#endif
+#ifndef GL_SYNC_FLUSH_COMMANDS_BIT
+#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001
+#endif
+#ifndef GL_TIMEOUT_EXPIRED
+#define GL_TIMEOUT_EXPIRED 0x911B
+#endif
+
+GstGLSyncMeta *
+gst_buffer_add_gl_sync_meta (GstGLContext * context, GstBuffer * buffer)
+{
+  GstGLSyncMeta *meta;
+
+  g_return_val_if_fail (GST_GL_IS_CONTEXT (context), NULL);
+
+  meta =
+      (GstGLSyncMeta *) gst_buffer_add_meta ((buffer), GST_GL_SYNC_META_INFO,
+      NULL);
+
+  if (!meta)
+    return NULL;
+
+  meta->context = gst_object_ref (context);
+  meta->glsync = NULL;
+
+  return meta;
+}
+
+static void
+_set_sync_point (GstGLContext * context, GstGLSyncMeta * sync_meta)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  if (gl->FenceSync) {
+    if (sync_meta->glsync) {
+      GST_LOG ("deleting sync object %p", sync_meta->glsync);
+      gl->DeleteSync (sync_meta->glsync);
+    }
+    sync_meta->glsync = gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+    gl->Flush ();
+    GST_LOG ("setting sync object %p", sync_meta->glsync);
+  } else {
+    gl->Finish ();
+  }
+}
+
+void
+gst_gl_sync_meta_set_sync_point (GstGLSyncMeta * sync_meta,
+    GstGLContext * context)
+{
+  gst_gl_context_thread_add (context,
+      (GstGLContextThreadFunc) _set_sync_point, sync_meta);
+}
+
+static void
+_wait (GstGLContext * context, GstGLSyncMeta * sync_meta)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+  GLenum res;
+
+  if (gl->ClientWaitSync) {
+    do {
+      GST_LOG ("waiting on sync object %p", sync_meta->glsync);
+      res =
+          gl->ClientWaitSync (sync_meta->glsync, GL_SYNC_FLUSH_COMMANDS_BIT,
+          1000000000 /* 1s */ );
+    } while (res == GL_TIMEOUT_EXPIRED);
+  }
+}
+
+void
+gst_gl_sync_meta_wait (GstGLSyncMeta * sync_meta, GstGLContext * context)
+{
+  if (sync_meta->glsync) {
+    gst_gl_context_thread_add (context,
+        (GstGLContextThreadFunc) _wait, sync_meta);
+  }
+}
+
+static gboolean
+_gst_gl_sync_meta_transform (GstBuffer * dest, GstMeta * meta,
+    GstBuffer * buffer, GQuark type, gpointer data)
+{
+  GstGLSyncMeta *dmeta, *smeta;
+
+  smeta = (GstGLSyncMeta *) meta;
+
+  if (GST_META_TRANSFORM_IS_COPY (type)) {
+    GstMetaTransformCopy *copy = data;
+
+    if (!copy->region) {
+      /* only copy if the complete data is copied as well */
+      dmeta = gst_buffer_add_gl_sync_meta (smeta->context, dest);
+
+      if (!dmeta)
+        return FALSE;
+
+      GST_LOG ("copy sync object %p from meta %p to %p", smeta->glsync,
+          smeta, dmeta);
+
+      /* Setting a sync point here relies on GstBuffer copying
+       * metas after data */
+      gst_gl_sync_meta_set_sync_point (dmeta, smeta->context);
+    }
+  } else {
+    /* return FALSE, if transform type is not supported */
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+static void
+_free_gl_sync_meta (GstGLContext * context, GstGLSyncMeta * sync_meta)
+{
+  const GstGLFuncs *gl = context->gl_vtable;
+
+  if (sync_meta->glsync) {
+    GST_LOG ("deleting sync object %p", sync_meta->glsync);
+    gl->DeleteSync (sync_meta->glsync);
+    sync_meta->glsync = NULL;
+  }
+}
+
+static void
+_gst_gl_sync_meta_free (GstGLSyncMeta * sync_meta, GstBuffer * buffer)
+{
+  if (sync_meta->glsync) {
+    gst_gl_context_thread_add (sync_meta->context,
+        (GstGLContextThreadFunc) _free_gl_sync_meta, sync_meta);
+  }
+  gst_object_unref (sync_meta->context);
+}
+
+static gboolean
+_gst_gl_sync_meta_init (GstGLSyncMeta * sync_meta, gpointer params,
+    GstBuffer * buffer)
+{
+  static volatile gsize _init;
+
+  if (g_once_init_enter (&_init)) {
+    GST_DEBUG_CATEGORY_INIT (gst_gl_sync_meta_debug, "glsyncmeta", 0,
+        "glsyncmeta");
+    g_once_init_leave (&_init, 1);
+  }
+
+  sync_meta->context = NULL;
+  sync_meta->glsync = NULL;
+
+  return TRUE;
+}
+
+GType
+gst_gl_sync_meta_api_get_type (void)
+{
+  static volatile GType type = 0;
+  static const gchar *tags[] = { NULL };
+
+  if (g_once_init_enter (&type)) {
+    GType _type = gst_meta_api_type_register ("GstGLSyncMetaAPI", tags);
+    g_once_init_leave (&type, _type);
+  }
+
+  return type;
+}
+
+const GstMetaInfo *
+gst_gl_sync_meta_get_info (void)
+{
+  static const GstMetaInfo *meta_info = NULL;
+
+  if (g_once_init_enter (&meta_info)) {
+    const GstMetaInfo *meta =
+        gst_meta_register (GST_GL_SYNC_META_API_TYPE, "GstGLSyncMeta",
+        sizeof (GstGLSyncMeta), (GstMetaInitFunction) _gst_gl_sync_meta_init,
+        (GstMetaFreeFunction) _gst_gl_sync_meta_free,
+        _gst_gl_sync_meta_transform);
+    g_once_init_leave (&meta_info, meta);
+  }
+
+  return meta_info;
+}
diff --git a/gst-libs/gst/gl/gstglsyncmeta.h b/gst-libs/gst/gl/gstglsyncmeta.h
new file mode 100644
index 0000000..9d79435
--- /dev/null
+++ b/gst-libs/gst/gl/gstglsyncmeta.h
@@ -0,0 +1,54 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.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_SYNC_META_H__
+#define __GST_GL_SYNC_META_H__
+
+#include <gst/gl/gstgl_fwd.h>
+
+G_BEGIN_DECLS
+
+#define GST_GL_SYNC_META_API_TYPE (gst_gl_sync_meta_api_get_type())
+#define GST_GL_SYNC_META_INFO     (gst_gl_sync_meta_get_info())
+typedef struct _GstGLSyncMeta GstGLSyncMeta;
+
+#define GST_BUFFER_POOL_OPTION_GL_SYNC_META "GstBufferPoolOptionGLSyncMeta"
+
+struct _GstGLSyncMeta {
+  /*< private >*/
+  GstMeta parent;
+
+  GstGLContext *context;
+
+  GLsync        glsync;
+};
+
+GType gst_gl_sync_meta_api_get_type (void);
+const GstMetaInfo * gst_gl_sync_meta_get_info (void);
+
+#define gst_buffer_get_gl_sync_meta(b) ((GstGLSyncMeta*)gst_buffer_get_meta((b),GST_GL_SYNC_META_API_TYPE))
+
+GstGLSyncMeta *     gst_buffer_add_gl_sync_meta         (GstGLContext * context, GstBuffer *buffer);
+void                gst_gl_sync_meta_set_sync_point     (GstGLSyncMeta * sync, GstGLContext * context);
+void                gst_gl_sync_meta_wait               (GstGLSyncMeta * sync, GstGLContext * context);
+
+G_END_DECLS
+
+#endif /* __GST_GL_SYNC_META_H__ */
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index ecf6ebb..0addca1 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -47,27 +47,6 @@
 #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 _init_upload (GstGLUpload * upload);
-static gboolean _gst_gl_upload_perform_with_data_unlocked (GstGLUpload * upload,
-    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);
-
-struct _GstGLUploadPrivate
-{
-  gboolean result;
-  guint tex_id;
-
-  gboolean mapped;
-  GstVideoFrame frame;
-
-  GstVideoGLTextureUploadMeta *meta;
-
-  GstBuffer *outbuf;
-  gboolean released;
-};
-
 GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_debug);
 #define GST_CAT_DEFAULT gst_gl_upload_debug
 
@@ -77,10 +56,847 @@
 G_DEFINE_TYPE_WITH_CODE (GstGLUpload, gst_gl_upload, GST_TYPE_OBJECT,
     DEBUG_INIT);
 static void gst_gl_upload_finalize (GObject * object);
+static void gst_gl_upload_release_buffer_unlocked (GstGLUpload * upload);
 
 #define GST_GL_UPLOAD_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
     GST_TYPE_GL_UPLOAD, GstGLUploadPrivate))
 
+/* Define the maximum number of planes we can upload - handle 2 views per buffer */
+#define GST_GL_UPLOAD_MAX_PLANES (GST_VIDEO_MAX_PLANES * 2)
+
+typedef struct _UploadMethod UploadMethod;
+
+struct _GstGLUploadPrivate
+{
+  GstVideoInfo in_info;
+  GstVideoInfo out_info;
+  GstCaps *in_caps;
+  GstCaps *out_caps;
+
+  GstBuffer *outbuf;
+
+  /* all method impl pointers */
+  gpointer *upload_impl;
+
+  /* current method */
+  const UploadMethod *method;
+  gpointer method_impl;
+  int method_i;
+};
+
+static GstCaps *
+_set_caps_features (const GstCaps * caps, const gchar * feature_name)
+{
+  GstCaps *tmp = gst_caps_copy (caps);
+  guint n = gst_caps_get_size (tmp);
+  guint i = 0;
+
+  for (i = 0; i < n; i++) {
+    GstCapsFeatures *features;
+
+    features = gst_caps_features_new (feature_name, NULL);
+    gst_caps_set_features (tmp, i, features);
+  }
+
+  return tmp;
+}
+
+typedef enum
+{
+  METHOD_FLAG_CAN_SHARE_CONTEXT = 1,
+} GstGLUploadMethodFlags;
+
+struct _UploadMethod
+{
+  const gchar *name;
+  GstGLUploadMethodFlags flags;
+
+  GstStaticCaps *input_template_caps;
+
+    gpointer (*new) (GstGLUpload * upload);
+  GstCaps *(*transform_caps) (GstGLContext * context,
+      GstPadDirection direction, GstCaps * caps);
+    gboolean (*accept) (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
+      GstCaps * out_caps);
+  void (*propose_allocation) (gpointer impl, GstQuery * decide_query,
+      GstQuery * query);
+    GstGLUploadReturn (*perform) (gpointer impl, GstBuffer * buffer,
+      GstBuffer ** outbuf);
+  void (*release) (gpointer impl, GstBuffer * buffer);
+  void (*free) (gpointer impl);
+} _UploadMethod;
+
+struct GLMemoryUpload
+{
+  GstGLUpload *upload;
+};
+
+static gpointer
+_gl_memory_upload_new (GstGLUpload * upload)
+{
+  struct GLMemoryUpload *mem = g_new0 (struct GLMemoryUpload, 1);
+
+  mem->upload = upload;
+
+  return mem;
+}
+
+static GstCaps *
+_gl_memory_upload_transform_caps (GstGLContext * context,
+    GstPadDirection direction, GstCaps * caps)
+{
+  return _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+}
+
+static gboolean
+_gl_memory_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  struct GLMemoryUpload *upload = impl;
+  GstCapsFeatures *features;
+  int i;
+
+  features = gst_caps_get_features (out_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    return FALSE;
+
+  features = gst_caps_get_features (in_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY)
+      && !gst_caps_features_contains (features,
+          GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY))
+    return FALSE;
+
+  if (buffer) {
+    GstVideoInfo *in_info = &upload->upload->priv->in_info;
+    guint expected_memories = GST_VIDEO_INFO_N_PLANES (in_info);
+
+    /* Support stereo views for separated multiview mode */
+    if (GST_VIDEO_INFO_MULTIVIEW_MODE (in_info) ==
+        GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+      expected_memories *= GST_VIDEO_INFO_VIEWS (in_info);
+
+    if (gst_buffer_n_memory (buffer) != expected_memories)
+      return FALSE;
+
+    for (i = 0; i < expected_memories; i++) {
+      GstMemory *mem = gst_buffer_peek_memory (buffer, i);
+
+      if (!gst_is_gl_memory (mem))
+        return FALSE;
+    }
+  }
+
+  return TRUE;
+}
+
+static void
+_gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
+    GstQuery * query)
+{
+  struct GLMemoryUpload *upload = impl;
+  GstAllocationParams params;
+  GstAllocator *allocator;
+  GstBufferPool *pool = NULL;
+  guint n_pools, i;
+
+  gst_allocation_params_init (&params);
+
+  allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+  gst_query_add_allocation_param (query, allocator, &params);
+  gst_object_unref (allocator);
+
+  n_pools = gst_query_get_n_allocation_pools (query);
+  for (i = 0; i < n_pools; i++) {
+    gst_query_parse_nth_allocation_pool (query, i, &pool, NULL, NULL, NULL);
+    if (!GST_IS_GL_BUFFER_POOL (pool)) {
+      gst_object_unref (pool);
+      pool = NULL;
+    }
+  }
+
+  if (!pool) {
+    GstStructure *config;
+    GstVideoInfo info;
+    GstCaps *caps;
+    gsize size;
+
+    gst_query_parse_allocation (query, &caps, NULL);
+
+    if (!gst_video_info_from_caps (&info, caps))
+      goto invalid_caps;
+
+    pool = gst_gl_buffer_pool_new (upload->upload->context);
+    config = gst_buffer_pool_get_config (pool);
+
+    /* the normal size of a frame */
+    size = info.size;
+    gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_GL_SYNC_META);
+
+    if (!gst_buffer_pool_set_config (pool, config)) {
+      gst_object_unref (pool);
+      goto config_failed;
+    }
+
+    gst_query_add_allocation_pool (query, pool, size, 1, 0);
+  }
+
+  if (pool)
+    gst_object_unref (pool);
+
+  return;
+
+invalid_caps:
+  {
+    GST_WARNING_OBJECT (upload->upload, "invalid caps specified");
+    return;
+  }
+config_failed:
+  {
+    GST_WARNING_OBJECT (upload->upload, "failed setting config");
+    return;
+  }
+}
+
+static GstGLUploadReturn
+_gl_memory_upload_perform (gpointer impl, GstBuffer * buffer,
+    GstBuffer ** outbuf)
+{
+  struct GLMemoryUpload *upload = impl;
+  GstGLMemory *gl_mem;
+  int i, n;
+
+  n = gst_buffer_n_memory (buffer);
+  for (i = 0; i < n; i++) {
+    GstMemory *mem = gst_buffer_peek_memory (buffer, i);
+
+    gl_mem = (GstGLMemory *) mem;
+    if (!gst_gl_context_can_share (upload->upload->context,
+            gl_mem->mem.context))
+      return GST_GL_UPLOAD_UNSHARED_GL_CONTEXT;
+
+    gst_gl_memory_upload_transfer (gl_mem);
+  }
+
+  *outbuf = gst_buffer_ref (buffer);
+
+  return GST_GL_UPLOAD_DONE;
+}
+
+static void
+_gl_memory_upload_release (gpointer impl, GstBuffer * buffer)
+{
+}
+
+static void
+_gl_memory_upload_free (gpointer impl)
+{
+  g_free (impl);
+}
+
+
+static GstStaticCaps _gl_memory_upload_caps =
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+    (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, GST_GL_MEMORY_VIDEO_FORMATS_STR));
+
+static const UploadMethod _gl_memory_upload = {
+  "GLMemory",
+  METHOD_FLAG_CAN_SHARE_CONTEXT,
+  &_gl_memory_upload_caps,
+  &_gl_memory_upload_new,
+  &_gl_memory_upload_transform_caps,
+  &_gl_memory_upload_accept,
+  &_gl_memory_upload_propose_allocation,
+  &_gl_memory_upload_perform,
+  &_gl_memory_upload_release,
+  &_gl_memory_upload_free
+};
+
+#if GST_GL_HAVE_PLATFORM_EGL
+struct EGLImageUpload
+{
+  GstGLUpload *upload;
+  GstBuffer *buffer;
+  GstBuffer **outbuf;
+};
+
+static gpointer
+_egl_image_upload_new (GstGLUpload * upload)
+{
+  struct EGLImageUpload *image = g_new0 (struct EGLImageUpload, 1);
+
+  image->upload = upload;
+
+  return image;
+}
+
+static GstCaps *
+_egl_image_upload_transform_caps (GstGLContext * context,
+    GstPadDirection direction, GstCaps * caps)
+{
+  GstCaps *ret;
+
+  if (direction == GST_PAD_SINK) {
+    ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  } else {
+    ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_EGL_IMAGE);
+    gst_caps_set_simple (ret, "format", G_TYPE_STRING, "RGBA", NULL);
+  }
+
+  return ret;
+}
+
+static gboolean
+_egl_image_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  struct EGLImageUpload *image = impl;
+  GstCapsFeatures *features;
+  gboolean ret = TRUE;
+  int i;
+
+  features = gst_caps_get_features (in_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_EGL_IMAGE))
+    ret = FALSE;
+
+  features = gst_caps_get_features (out_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    ret = FALSE;
+
+  if (!ret)
+    return FALSE;
+
+  if (buffer) {
+    GstVideoInfo *in_info = &image->upload->priv->in_info;
+    guint expected_memories = GST_VIDEO_INFO_N_PLANES (in_info);
+
+    /* Support stereo views for separated multiview mode */
+    if (GST_VIDEO_INFO_MULTIVIEW_MODE (in_info) ==
+        GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+      expected_memories *= GST_VIDEO_INFO_VIEWS (in_info);
+
+    if (gst_buffer_n_memory (buffer) != expected_memories)
+      return FALSE;
+
+    for (i = 0; i < expected_memories; i++) {
+      GstMemory *mem = gst_buffer_peek_memory (buffer, i);
+
+      if (!gst_is_egl_image_memory (mem))
+        return FALSE;
+    }
+  }
+
+  return TRUE;
+}
+
+static void
+_egl_image_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
+    GstQuery * query)
+{
+  struct EGLImageUpload *image = impl;
+  GstAllocationParams params;
+  GstAllocator *allocator;
+
+  gst_allocation_params_init (&params);
+
+  if (gst_gl_context_check_feature (image->upload->context,
+          "EGL_KHR_image_base")) {
+    allocator = gst_allocator_find (GST_EGL_IMAGE_MEMORY_TYPE);
+    gst_query_add_allocation_param (query, allocator, &params);
+    gst_object_unref (allocator);
+  }
+}
+
+static void
+_egl_image_upload_perform_gl_thread (GstGLContext * context,
+    struct EGLImageUpload *image)
+{
+  guint i, n;
+
+  /* FIXME: buffer pool */
+  *image->outbuf = gst_buffer_new ();
+  gst_gl_memory_setup_buffer (image->upload->context,
+      NULL, &image->upload->priv->out_info, NULL, *image->outbuf);
+
+  n = gst_buffer_n_memory (image->buffer);
+  for (i = 0; i < n; i++) {
+    GstMemory *mem = gst_buffer_peek_memory (image->buffer, i);
+    GstGLMemory *out_gl_mem =
+        (GstGLMemory *) gst_buffer_peek_memory (*image->outbuf, i);
+    const GstGLFuncs *gl = NULL;
+
+    gl = GST_GL_CONTEXT (((GstEGLImageMemory *) mem)->context)->gl_vtable;
+
+    gl->ActiveTexture (GL_TEXTURE0 + i);
+    gl->BindTexture (GL_TEXTURE_2D, out_gl_mem->tex_id);
+    gl->EGLImageTargetTexture2D (GL_TEXTURE_2D,
+        gst_egl_image_memory_get_image (mem));
+  }
+
+  if (GST_IS_GL_BUFFER_POOL (image->buffer->pool))
+    gst_gl_buffer_pool_replace_last_buffer (GST_GL_BUFFER_POOL (image->
+            buffer->pool), image->buffer);
+}
+
+static GstGLUploadReturn
+_egl_image_upload_perform (gpointer impl, GstBuffer * buffer,
+    GstBuffer ** outbuf)
+{
+  struct EGLImageUpload *image = impl;
+
+  image->buffer = buffer;
+  image->outbuf = outbuf;
+
+  gst_gl_context_thread_add (image->upload->context,
+      (GstGLContextThreadFunc) _egl_image_upload_perform_gl_thread, image);
+
+  if (!*image->outbuf)
+    return GST_GL_UPLOAD_ERROR;
+
+  return GST_GL_UPLOAD_DONE;
+}
+
+static void
+_egl_image_upload_release (gpointer impl, GstBuffer * buffer)
+{
+}
+
+static void
+_egl_image_upload_free (gpointer impl)
+{
+  g_free (impl);
+}
+
+static GstStaticCaps _egl_image_upload_caps =
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+    (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, "RGBA"));
+
+static const UploadMethod _egl_image_upload = {
+  "EGLImage",
+  0,
+  &_egl_image_upload_caps,
+  &_egl_image_upload_new,
+  &_egl_image_upload_transform_caps,
+  &_egl_image_upload_accept,
+  &_egl_image_upload_propose_allocation,
+  &_egl_image_upload_perform,
+  &_egl_image_upload_release,
+  &_egl_image_upload_free
+};
+#endif
+
+struct GLUploadMeta
+{
+  GstGLUpload *upload;
+
+  gboolean result;
+  GstVideoGLTextureUploadMeta *meta;
+  guint texture_ids[GST_GL_UPLOAD_MAX_PLANES];
+};
+
+static gpointer
+_upload_meta_upload_new (GstGLUpload * upload)
+{
+  struct GLUploadMeta *meta = g_new0 (struct GLUploadMeta, 1);
+
+  meta->upload = upload;
+
+  return meta;
+}
+
+static GstCaps *
+_upload_meta_upload_transform_caps (GstGLContext * context,
+    GstPadDirection direction, GstCaps * caps)
+{
+  GstCaps *ret;
+
+  if (direction == GST_PAD_SINK) {
+    ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  } else {
+    ret =
+        _set_caps_features (caps,
+        GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);
+    gst_caps_set_simple (ret, "format", G_TYPE_STRING, "RGBA", NULL);
+  }
+
+  return ret;
+}
+
+static gboolean
+_upload_meta_upload_accept (gpointer impl, GstBuffer * buffer,
+    GstCaps * in_caps, GstCaps * out_caps)
+{
+  struct GLUploadMeta *upload = impl;
+  GstCapsFeatures *features;
+  GstVideoGLTextureUploadMeta *meta;
+  gboolean ret = TRUE;
+
+  features = gst_caps_get_features (in_caps, 0);
+
+  if (!gst_caps_features_contains (features,
+          GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META))
+    ret = FALSE;
+
+  features = gst_caps_get_features (out_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    ret = FALSE;
+
+  if (!ret)
+    return ret;
+
+  if (buffer) {
+    if ((meta = gst_buffer_get_video_gl_texture_upload_meta (buffer)) == NULL)
+      return FALSE;
+
+    if (meta->texture_type[0] != GST_VIDEO_GL_TEXTURE_TYPE_RGBA) {
+      GST_FIXME_OBJECT (upload, "only single rgba texture supported");
+      return FALSE;
+    }
+
+    if (meta->texture_orientation !=
+        GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL) {
+      GST_FIXME_OBJECT (upload, "only x-normal, y-normal textures supported");
+      return FALSE;
+    }
+  }
+
+  return TRUE;
+}
+
+static void
+_upload_meta_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
+    GstQuery * query)
+{
+  struct GLUploadMeta *upload = impl;
+  GstStructure *gl_context;
+  gchar *platform, *gl_apis;
+  gpointer handle;
+
+  gl_apis =
+      gst_gl_api_to_string (gst_gl_context_get_gl_api (upload->upload->
+          context));
+  platform =
+      gst_gl_platform_to_string (gst_gl_context_get_gl_platform (upload->
+          upload->context));
+  handle = (gpointer) gst_gl_context_get_gl_context (upload->upload->context);
+
+  gl_context =
+      gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
+      GST_GL_TYPE_CONTEXT, upload->upload->context, "gst.gl.context.handle",
+      G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
+      "gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
+  gst_query_add_allocation_meta (query,
+      GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, gl_context);
+
+  g_free (gl_apis);
+  g_free (platform);
+  gst_structure_free (gl_context);
+}
+
+/*
+ * Uploads using gst_video_gl_texture_upload_meta_upload().
+ * i.e. consumer of GstVideoGLTextureUploadMeta
+ */
+static void
+_do_upload_with_meta (GstGLContext * context, struct GLUploadMeta *upload)
+{
+  if (!gst_video_gl_texture_upload_meta_upload (upload->meta,
+          upload->texture_ids)) {
+    upload->result = FALSE;
+    return;
+  }
+
+  upload->result = TRUE;
+}
+
+static GstGLUploadReturn
+_upload_meta_upload_perform (gpointer impl, GstBuffer * buffer,
+    GstBuffer ** outbuf)
+{
+  struct GLUploadMeta *upload = impl;
+  int i;
+  GstVideoInfo *in_info = &upload->upload->priv->in_info;
+  guint max_planes = GST_VIDEO_INFO_N_PLANES (in_info);
+
+  /* Support stereo views for separated multiview mode */
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (in_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    max_planes *= GST_VIDEO_INFO_VIEWS (in_info);
+
+  GST_LOG_OBJECT (upload, "Attempting upload with GstVideoGLTextureUploadMeta");
+
+  upload->meta = gst_buffer_get_video_gl_texture_upload_meta (buffer);
+
+  /* FIXME: buffer pool */
+  *outbuf = gst_buffer_new ();
+  gst_gl_memory_setup_buffer (upload->upload->context,
+      NULL, &upload->upload->priv->in_info, NULL, *outbuf);
+
+  for (i = 0; i < GST_GL_UPLOAD_MAX_PLANES; i++) {
+    guint tex_id = 0;
+
+    if (i < max_planes) {
+      GstMemory *mem = gst_buffer_peek_memory (*outbuf, i);
+      tex_id = ((GstGLMemory *) mem)->tex_id;
+    }
+
+    upload->texture_ids[i] = tex_id;
+  }
+
+  GST_LOG ("Uploading with GLTextureUploadMeta with textures "
+      "%i,%i,%i,%i / %i,%i,%i,%i",
+      upload->texture_ids[0], upload->texture_ids[1],
+      upload->texture_ids[2], upload->texture_ids[3],
+      upload->texture_ids[4], upload->texture_ids[5],
+      upload->texture_ids[6], upload->texture_ids[7]);
+
+  gst_gl_context_thread_add (upload->upload->context,
+      (GstGLContextThreadFunc) _do_upload_with_meta, upload);
+
+  if (!upload->result)
+    return GST_GL_UPLOAD_ERROR;
+
+  return GST_GL_UPLOAD_DONE;
+}
+
+static void
+_upload_meta_upload_release (gpointer impl, GstBuffer * buffer)
+{
+}
+
+static void
+_upload_meta_upload_free (gpointer impl)
+{
+  struct GLUploadMeta *upload = impl;
+  gint i;
+
+  g_return_if_fail (impl != NULL);
+
+  for (i = 0; i < GST_GL_UPLOAD_MAX_PLANES; i++) {
+    if (upload->texture_ids[i])
+      gst_gl_context_del_texture (upload->upload->context,
+          &upload->texture_ids[i]);
+  }
+  g_free (upload);
+}
+
+static GstStaticCaps _upload_meta_upload_caps =
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+    (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA"));
+
+static const UploadMethod _upload_meta_upload = {
+  "UploadMeta",
+  METHOD_FLAG_CAN_SHARE_CONTEXT,
+  &_upload_meta_upload_caps,
+  &_upload_meta_upload_new,
+  &_upload_meta_upload_transform_caps,
+  &_upload_meta_upload_accept,
+  &_upload_meta_upload_propose_allocation,
+  &_upload_meta_upload_perform,
+  &_upload_meta_upload_release,
+  &_upload_meta_upload_free
+};
+
+struct RawUploadFrame
+{
+  gint ref_count;
+  GstVideoFrame frame;
+};
+
+struct RawUpload
+{
+  GstGLUpload *upload;
+  struct RawUploadFrame *in_frame;
+};
+
+static struct RawUploadFrame *
+_raw_upload_frame_new (struct RawUpload *raw, GstBuffer * buffer)
+{
+  struct RawUploadFrame *frame;
+  GstVideoInfo *info;
+  gint i;
+
+  if (!buffer)
+    return NULL;
+
+  frame = g_slice_new (struct RawUploadFrame);
+  frame->ref_count = 1;
+
+  if (!gst_video_frame_map (&frame->frame, &raw->upload->priv->in_info,
+          buffer, GST_MAP_READ)) {
+    g_slice_free (struct RawUploadFrame, frame);
+    return NULL;
+  }
+
+  raw->upload->priv->in_info = frame->frame.info;
+  info = &raw->upload->priv->in_info;
+
+  /* Recalculate the offsets (and size) */
+  info->size = 0;
+  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (info); i++) {
+    info->offset[i] = info->size;
+    info->size += gst_gl_get_plane_data_size (info, NULL, i);
+  }
+
+  return frame;
+}
+
+static void
+_raw_upload_frame_ref (struct RawUploadFrame *frame)
+{
+  g_atomic_int_inc (&frame->ref_count);
+}
+
+static void
+_raw_upload_frame_unref (struct RawUploadFrame *frame)
+{
+  if (g_atomic_int_dec_and_test (&frame->ref_count)) {
+    gst_video_frame_unmap (&frame->frame);
+    g_slice_free (struct RawUploadFrame, frame);
+  }
+}
+
+static gpointer
+_raw_data_upload_new (GstGLUpload * upload)
+{
+  struct RawUpload *raw = g_new0 (struct RawUpload, 1);
+
+  raw->upload = upload;
+
+  return raw;
+}
+
+static GstCaps *
+_raw_data_upload_transform_caps (GstGLContext * context,
+    GstPadDirection direction, GstCaps * caps)
+{
+  GstCaps *ret;
+
+  if (direction == GST_PAD_SINK) {
+    ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  } else {
+    ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
+  }
+
+  return ret;
+}
+
+static gboolean
+_raw_data_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  struct RawUpload *raw = impl;
+  GstCapsFeatures *features;
+
+  features = gst_caps_get_features (out_caps, 0);
+  if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    return FALSE;
+
+  raw->in_frame = _raw_upload_frame_new (raw, buffer);
+
+  return (raw->in_frame != NULL);
+}
+
+static void
+_raw_data_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
+    GstQuery * query)
+{
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
+}
+
+static GstGLUploadReturn
+_raw_data_upload_perform (gpointer impl, GstBuffer * buffer,
+    GstBuffer ** outbuf)
+{
+  GstGLMemory *in_tex[GST_GL_UPLOAD_MAX_PLANES] = { 0, };
+  struct RawUpload *raw = impl;
+  int i;
+  GstVideoInfo *in_info = &raw->upload->priv->in_info;
+  guint max_planes = GST_VIDEO_INFO_N_PLANES (in_info);
+
+  /* Support stereo views for separated multiview mode */
+  if (GST_VIDEO_INFO_MULTIVIEW_MODE (in_info) ==
+      GST_VIDEO_MULTIVIEW_MODE_SEPARATED)
+    max_planes *= GST_VIDEO_INFO_VIEWS (in_info);
+
+  gst_gl_memory_setup_wrapped (raw->upload->context,
+      &raw->upload->priv->in_info, NULL, raw->in_frame->frame.data, in_tex,
+      raw->in_frame, (GDestroyNotify) _raw_upload_frame_unref);
+
+  /* FIXME Use a buffer pool to cache the generated textures */
+  *outbuf = gst_buffer_new ();
+  for (i = 0; i < max_planes; i++) {
+    _raw_upload_frame_ref (raw->in_frame);
+    gst_buffer_append_memory (*outbuf, (GstMemory *) in_tex[i]);
+  }
+
+  return GST_GL_UPLOAD_DONE;
+}
+
+static void
+_raw_data_upload_release (gpointer impl, GstBuffer * buffer)
+{
+  struct RawUpload *raw = impl;
+  _raw_upload_frame_unref (raw->in_frame);
+  raw->in_frame = NULL;
+}
+
+static void
+_raw_data_upload_free (gpointer impl)
+{
+  struct RawUpload *raw = impl;
+
+  g_free (raw);
+}
+
+static GstStaticCaps _raw_data_upload_caps =
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_GL_MEMORY_VIDEO_FORMATS_STR));
+
+static const UploadMethod _raw_data_upload = {
+  "Raw Data",
+  0,
+  &_raw_data_upload_caps,
+  &_raw_data_upload_new,
+  &_raw_data_upload_transform_caps,
+  &_raw_data_upload_accept,
+  &_raw_data_upload_propose_allocation,
+  &_raw_data_upload_perform,
+  &_raw_data_upload_release,
+  &_raw_data_upload_free
+};
+
+static const UploadMethod *upload_methods[] = { &_gl_memory_upload,
+#if GST_GL_HAVE_PLATFORM_EGL
+  &_egl_image_upload,
+#endif
+  &_upload_meta_upload, &_raw_data_upload
+};
+
+static GMutex upload_global_lock;
+
+GstCaps *
+gst_gl_upload_get_input_template_caps (void)
+{
+  GstCaps *ret = NULL;
+  gint i;
+
+  g_mutex_lock (&upload_global_lock);
+
+  /* FIXME: cache this and invalidate on changes to upload_methods */
+  for (i = 0; i < G_N_ELEMENTS (upload_methods); i++) {
+    GstCaps *template =
+        gst_static_caps_get (upload_methods[i]->input_template_caps);
+    ret = ret == NULL ? template : gst_caps_merge (ret, template);
+  }
+
+  ret = gst_caps_simplify (ret);
+  ret = gst_gl_overlay_compositor_add_caps (ret);
+  g_mutex_unlock (&upload_global_lock);
+
+  return ret;
+}
+
 static void
 gst_gl_upload_class_init (GstGLUploadClass * klass)
 {
@@ -93,11 +909,6 @@
 gst_gl_upload_init (GstGLUpload * upload)
 {
   upload->priv = GST_GL_UPLOAD_GET_PRIVATE (upload);
-
-  upload->context = NULL;
-  upload->priv->tex_id = 0;
-
-  gst_video_info_set_format (&upload->in_info, GST_VIDEO_FORMAT_ENCODED, 0, 0);
 }
 
 /**
@@ -109,12 +920,19 @@
 GstGLUpload *
 gst_gl_upload_new (GstGLContext * context)
 {
-  GstGLUpload *upload;
-
-  upload = g_object_new (GST_TYPE_GL_UPLOAD, NULL);
+  GstGLUpload *upload = g_object_new (GST_TYPE_GL_UPLOAD, NULL);
+  gint i, n;
 
   upload->context = gst_object_ref (context);
-  upload->convert = gst_gl_color_convert_new (context);
+
+  n = G_N_ELEMENTS (upload_methods);
+  upload->priv->upload_impl = g_malloc (sizeof (gpointer) * n);
+  for (i = 0; i < n; i++) {
+    upload->priv->upload_impl[i] = upload_methods[i]->new (upload);
+  }
+
+  GST_DEBUG_OBJECT (upload, "Created new GLUpload for context %" GST_PTR_FORMAT,
+      context);
 
   return upload;
 }
@@ -123,436 +941,278 @@
 gst_gl_upload_finalize (GObject * object)
 {
   GstGLUpload *upload;
+  gint i, n;
 
   upload = GST_GL_UPLOAD (object);
 
-  gst_gl_upload_reset (upload);
+  gst_gl_upload_release_buffer_unlocked (upload);
+
+  if (upload->priv->method_impl)
+    upload->priv->method->free (upload->priv->method_impl);
+  upload->priv->method_i = 0;
 
   if (upload->context) {
     gst_object_unref (upload->context);
     upload->context = NULL;
   }
 
+  if (upload->priv->in_caps) {
+    gst_caps_unref (upload->priv->in_caps);
+    upload->priv->in_caps = NULL;
+  }
+
+  if (upload->priv->out_caps) {
+    gst_caps_unref (upload->priv->out_caps);
+    upload->priv->out_caps = NULL;
+  }
+
+  n = G_N_ELEMENTS (upload_methods);
+  for (i = 0; i < n; i++) {
+    if (upload->priv->upload_impl[i])
+      upload_methods[i]->free (upload->priv->upload_impl[i]);
+  }
+  g_free (upload->priv->upload_impl);
+
   G_OBJECT_CLASS (gst_gl_upload_parent_class)->finalize (object);
 }
 
-static void
-gst_gl_upload_reset (GstGLUpload * upload)
+GstCaps *
+gst_gl_upload_transform_caps (GstGLContext * context, GstPadDirection direction,
+    GstCaps * caps, GstCaps * filter)
 {
-  guint i;
+  GstCaps *result, *tmp;
+  gint i;
 
-  if (upload->priv->tex_id) {
-    gst_gl_context_del_texture (upload->context, &upload->priv->tex_id);
-    upload->priv->tex_id = 0;
+  tmp = gst_caps_new_empty ();
+
+  for (i = 0; i < G_N_ELEMENTS (upload_methods); i++) {
+    GstCaps *tmp2;
+
+    tmp2 = upload_methods[i]->transform_caps (context, direction, caps);
+
+    if (tmp2)
+      tmp = gst_caps_merge (tmp, tmp2);
   }
 
-  if (upload->convert) {
-    gst_object_unref (upload->convert);
-    upload->convert = NULL;
+  tmp = gst_gl_overlay_compositor_add_caps (tmp);
+
+
+  if (filter) {
+    result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+  } else {
+    result = tmp;
   }
 
-  if (upload->out_tex) {
-    gst_memory_unref ((GstMemory *) upload->out_tex);
-    upload->out_tex = NULL;
-  }
-
-  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    if (upload->in_tex[i]) {
-      gst_memory_unref ((GstMemory *) upload->in_tex[i]);
-      upload->in_tex[i] = NULL;
-    }
-  }
-
-  gst_gl_upload_release_buffer (upload);
-}
-
-static void
-_gst_gl_upload_set_format_unlocked (GstGLUpload * upload,
-    GstVideoInfo * in_info)
-{
-  g_return_if_fail (upload != NULL);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
-      GST_VIDEO_FORMAT_UNKNOWN);
-  g_return_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
-      GST_VIDEO_FORMAT_ENCODED);
-
-  if (gst_video_info_is_equal (&upload->in_info, in_info))
-    return;
-
-  gst_gl_upload_reset (upload);
-  upload->convert = gst_gl_color_convert_new (upload->context);
-  upload->in_info = *in_info;
-  upload->initted = FALSE;
+  return result;
 }
 
 /**
- * gst_gl_upload_set_format:
+ * gst_gl_upload_propose_allocation:
  * @upload: a #GstGLUpload
- * @in_info: input #GstVideoInfo
+ * @decide_query: (allow-none): a #GstQuery from a decide allocation
+ * @query: the proposed allocation query
  *
- * Initializes @upload with the information required for upload.
+ * Adds the required allocation parameters to support uploading.
  */
 void
-gst_gl_upload_set_format (GstGLUpload * upload, GstVideoInfo * in_info)
+gst_gl_upload_propose_allocation (GstGLUpload * upload, GstQuery * decide_query,
+    GstQuery * query)
 {
-  GST_OBJECT_LOCK (upload);
-  _gst_gl_upload_set_format_unlocked (upload, in_info);
-  GST_OBJECT_UNLOCK (upload);
+  gint i;
+
+  for (i = 0; i < G_N_ELEMENTS (upload_methods); i++)
+    upload_methods[i]->propose_allocation (upload->priv->upload_impl[i],
+        decide_query, query);
+}
+
+static gboolean
+_gst_gl_upload_set_caps_unlocked (GstGLUpload * upload, GstCaps * in_caps,
+    GstCaps * out_caps)
+{
+  g_return_val_if_fail (upload != NULL, FALSE);
+  g_return_val_if_fail (gst_caps_is_fixed (in_caps), FALSE);
+
+  if (upload->priv->in_caps && upload->priv->out_caps
+      && gst_caps_is_equal (upload->priv->in_caps, in_caps)
+      && gst_caps_is_equal (upload->priv->out_caps, out_caps))
+    return TRUE;
+
+  gst_caps_replace (&upload->priv->in_caps, in_caps);
+  gst_caps_replace (&upload->priv->out_caps, out_caps);
+
+  gst_video_info_from_caps (&upload->priv->in_info, in_caps);
+  gst_video_info_from_caps (&upload->priv->out_info, out_caps);
+
+  if (upload->priv->method_impl)
+    upload->priv->method->free (upload->priv->method_impl);
+  upload->priv->method_impl = NULL;
+  upload->priv->method_i = 0;
+
+  return TRUE;
 }
 
 /**
- * gst_gl_upload_get_format:
+ * gst_gl_upload_set_caps:
  * @upload: a #GstGLUpload
+ * @in_caps: input #GstCaps
+ * @out_caps: output #GstCaps
  *
- * Returns: (transfer none): The #GstVideoInfo set by gst_gl_upload_set_format()
+ * Initializes @upload with the information required for upload.
+ *
+ * Returns: whether @in_caps and @out_caps could be set on @upload
  */
-GstVideoInfo *
-gst_gl_upload_get_format (GstGLUpload * upload)
+gboolean
+gst_gl_upload_set_caps (GstGLUpload * upload, GstCaps * in_caps,
+    GstCaps * out_caps)
 {
-  GstVideoInfo *ret;
+  gboolean ret;
 
   GST_OBJECT_LOCK (upload);
-  ret = &upload->in_info;
+  ret = _gst_gl_upload_set_caps_unlocked (upload, in_caps, out_caps);
   GST_OBJECT_UNLOCK (upload);
 
   return ret;
 }
 
 /**
+ * gst_gl_upload_get_caps:
+ * @upload: a #GstGLUpload
+ * @in_caps: (transfer full) (allow-none) (out): the input #GstCaps
+ * @out_caps: (transfer full) (allow-none) (out): the output #GstCaps
+ *
+ * Returns: (transfer none): The #GstCaps set by gst_gl_upload_set_caps()
+ */
+void
+gst_gl_upload_get_caps (GstGLUpload * upload, GstCaps ** in_caps,
+    GstCaps ** out_caps)
+{
+  GST_OBJECT_LOCK (upload);
+  if (in_caps)
+    *in_caps =
+        upload->priv->in_caps ? gst_caps_ref (upload->priv->in_caps) : NULL;
+  if (out_caps)
+    *out_caps =
+        upload->priv->out_caps ? gst_caps_ref (upload->priv->out_caps) : NULL;
+  GST_OBJECT_UNLOCK (upload);
+}
+
+static void
+gst_gl_upload_release_buffer_unlocked (GstGLUpload * upload)
+{
+  if (upload->priv->outbuf && upload->priv->method_impl) {
+    upload->priv->method->release (upload->priv->method_impl,
+        upload->priv->outbuf);
+    gst_buffer_replace (&upload->priv->outbuf, NULL);
+  }
+}
+
+/**
+ * gst_gl_upload_release_buffer:
+ * @upload: a #GstGLUpload
+ *
+ * Releases any buffers currently referenced by @upload
+ */
+void
+gst_gl_upload_release_buffer (GstGLUpload * upload)
+{
+  g_return_if_fail (upload != NULL);
+
+  GST_OBJECT_LOCK (upload);
+  gst_gl_upload_release_buffer_unlocked (upload);
+  GST_OBJECT_UNLOCK (upload);
+}
+
+static gboolean
+_upload_find_method (GstGLUpload * upload)
+{
+  if (upload->priv->method_i >= G_N_ELEMENTS (upload_methods))
+    return FALSE;
+
+  if (upload->priv->method_impl) {
+    upload->priv->method->free (upload->priv->method_impl);
+    upload->priv->method_impl = NULL;
+  }
+
+  upload->priv->method = upload_methods[upload->priv->method_i];
+  upload->priv->method_impl = upload->priv->method->new (upload);
+
+  GST_DEBUG_OBJECT (upload, "attempting upload with uploader %s",
+      upload->priv->method->name);
+
+  upload->priv->method_i++;
+
+  return TRUE;
+}
+
+/**
  * gst_gl_upload_perform_with_buffer:
  * @upload: a #GstGLUpload
  * @buffer: a #GstBuffer
- * @tex_id: resulting texture
+ * @outbuf_ptr: (allow-none): resulting buffer
  *
  * Uploads @buffer to the texture given by @tex_id.  @tex_id is valid
  * until gst_gl_upload_release_buffer() is called.
  *
  * Returns: whether the upload was successful
  */
-gboolean
+GstGLUploadReturn
 gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer,
-    guint * tex_id)
+    GstBuffer ** outbuf_ptr)
 {
-  GstMemory *mem;
-  GstVideoGLTextureUploadMeta *gl_tex_upload_meta;
-  guint texture_ids[] = { 0, 0, 0, 0 };
-  gint i;
-  gboolean ret;
+  GstGLUploadReturn ret = GST_GL_UPLOAD_ERROR;
 
-  g_return_val_if_fail (upload != NULL, FALSE);
-  g_return_val_if_fail (buffer != NULL, FALSE);
-  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);
-
-  if (gst_is_gl_memory (mem)) {
-    GstGLMemory *gl_mem = (GstGLMemory *) gst_buffer_peek_memory (buffer, 0);
-
-    if (!gst_gl_context_can_share (upload->context, gl_mem->context))
-      goto raw_data_upload;
-
-    if (GST_VIDEO_INFO_FORMAT (&upload->in_info) == GST_VIDEO_FORMAT_RGBA) {
-      GstMapInfo map_info;
-
-      gst_memory_map (mem, &map_info, GST_MAP_READ | GST_MAP_GL);
-      gst_memory_unmap (mem, &map_info);
-
-      *tex_id = ((GstGLMemory *) mem)->tex_id;
-      return TRUE;
-    }
-
-    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);
-    }
-
-    ret = _upload_memory (upload);
-
-    *tex_id = upload->out_tex->tex_id;
-    for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->in_info); i++) {
-      upload->in_tex[i] = NULL;
-    }
-    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);
-#endif
-
-  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));
-
-  /* GstVideoGLTextureUploadMeta */
-  gl_tex_upload_meta = gst_buffer_get_video_gl_texture_upload_meta (buffer);
-  if (gl_tex_upload_meta) {
-    GST_LOG_OBJECT (upload, "Attempting upload with "
-        "GstVideoGLTextureUploadMeta");
-    texture_ids[0] = upload->priv->tex_id;
-
-    if (!gst_gl_upload_perform_with_gl_texture_upload_meta (upload,
-            gl_tex_upload_meta, texture_ids)) {
-      GST_DEBUG_OBJECT (upload, "Upload with GstVideoGLTextureUploadMeta "
-          "failed");
-    } else {
-      upload->priv->mapped = FALSE;
-      *tex_id = upload->priv->tex_id;
-      return TRUE;
-    }
-  }
-
-raw_data_upload:
-  GST_LOG_OBJECT (upload, "Attempting upload with raw data");
-  /* GstVideoMeta map */
-  if (!gst_video_frame_map (&upload->priv->frame, &upload->in_info, buffer,
-          GST_MAP_READ)) {
-    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 (!gst_gl_upload_perform_with_data (upload, tex_id,
-          upload->priv->frame.data)) {
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-void
-gst_gl_upload_release_buffer (GstGLUpload * upload)
-{
-  g_return_if_fail (upload != NULL);
-
-  if (upload->priv->mapped)
-    gst_video_frame_unmap (&upload->priv->frame);
-  upload->priv->mapped = FALSE;
-
-  if (upload->priv->outbuf) {
-    gst_buffer_unref (upload->priv->outbuf);
-    upload->priv->outbuf = NULL;
-  }
-
-  upload->priv->released = TRUE;
-}
-
-/*
- * Uploads using gst_video_gl_texture_upload_meta_upload().
- * i.e. consumer of GstVideoGLTextureUploadMeta
- */
-static void
-_do_upload_with_meta (GstGLContext * context, GstGLUpload * upload)
-{
-  guint texture_ids[] = { upload->priv->tex_id, 0, 0, 0 };
-
-  if (!gst_video_gl_texture_upload_meta_upload (upload->priv->meta,
-          texture_ids))
-    goto error;
-
-  upload->priv->result = TRUE;
-  return;
-
-error:
-  upload->priv->result = FALSE;
-}
-
-/**
- * gst_gl_upload_perform_with_gl_texture_upload_meta:
- * @upload: a #GstGLUpload
- * @meta: a #GstVideoGLTextureUploadMeta
- * @texture_id: resulting GL textures to place the data into.
- *
- * Uploads @meta into @texture_id.
- *
- * Returns: whether the upload was successful
- */
-gboolean
-gst_gl_upload_perform_with_gl_texture_upload_meta (GstGLUpload * upload,
-    GstVideoGLTextureUploadMeta * meta, guint texture_id[4])
-{
-  gboolean ret;
-
-  g_return_val_if_fail (upload != NULL, FALSE);
-  g_return_val_if_fail (meta != NULL, FALSE);
-
-  if (meta->texture_orientation !=
-      GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL)
-    GST_FIXME_OBJECT (upload, "only x-normal,y-normal textures supported, "
-        "the images will not appear the right way up");
-  if (meta->texture_type[0] != GST_VIDEO_GL_TEXTURE_TYPE_RGBA) {
-    GST_FIXME_OBJECT (upload, "only single rgba texture supported");
-    return FALSE;
-  }
+  g_return_val_if_fail (GST_IS_GL_UPLOAD (upload), FALSE);
+  g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
 
   GST_OBJECT_LOCK (upload);
 
-  upload->priv->meta = meta;
-  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));
+  gst_gl_upload_release_buffer_unlocked (upload);
 
-  GST_LOG ("Uploading with GLTextureUploadMeta with textures %i,%i,%i,%i",
-      texture_id[0], texture_id[1], texture_id[2], texture_id[3]);
+#define NEXT_METHOD \
+do { \
+  if (!_upload_find_method (upload)) { \
+    GST_OBJECT_UNLOCK (upload); \
+    return FALSE; \
+  } \
+  goto restart; \
+} while (0)
 
-  gst_gl_context_thread_add (upload->context,
-      (GstGLContextThreadFunc) _do_upload_with_meta, upload);
+  if (!upload->priv->method_impl)
+    _upload_find_method (upload);
 
-  ret = upload->priv->result;
+restart:
+  if (!upload->priv->method->accept (upload->priv->method_impl, buffer,
+          upload->priv->in_caps, upload->priv->out_caps))
+    NEXT_METHOD;
+
+  ret =
+      upload->priv->method->perform (upload->priv->method_impl, buffer,
+      &upload->priv->outbuf);
+  if (ret == GST_GL_UPLOAD_UNSHARED_GL_CONTEXT) {
+    upload->priv->method->free (upload->priv->method_impl);
+    upload->priv->method = &_raw_data_upload;
+    upload->priv->method_impl = upload->priv->method->new (upload);
+    goto restart;
+  } else if (ret == GST_GL_UPLOAD_DONE) {
+    /* we are done */
+  } else {
+    gst_gl_upload_release_buffer_unlocked (upload);
+    upload->priv->method->free (upload->priv->method_impl);
+    upload->priv->method_impl = NULL;
+    NEXT_METHOD;
+  }
+
+  if (outbuf_ptr) {
+    if (buffer != upload->priv->outbuf)
+      gst_buffer_copy_into (upload->priv->outbuf, buffer,
+          GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+    *outbuf_ptr = gst_buffer_ref (upload->priv->outbuf);
+  }
 
   GST_OBJECT_UNLOCK (upload);
 
   return ret;
-}
 
-/**
- * gst_gl_upload_perform_with_data:
- * @upload: a #GstGLUpload
- * @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
- * the #GstVideoInfo<!--  -->s passed to gst_gl_upload_set_format() 
- *
- * Returns: whether the upload was successful
- */
-gboolean
-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);
-
-  GST_OBJECT_LOCK (upload);
-  ret = _gst_gl_upload_perform_with_data_unlocked (upload, texture_id, data);
-  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])
-{
-  gboolean ret;
-  guint i;
-
-  g_return_val_if_fail (upload != NULL, 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,
-        upload->in_tex);
-
-  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    if (upload->in_tex[i]) {
-      upload->in_tex[i]->data = data[i];
-      GST_GL_MEMORY_FLAG_SET (upload->in_tex[i],
-          GST_GL_MEMORY_FLAG_NEED_UPLOAD);
-    }
-  }
-
-  ret = _upload_memory (upload);
-  *texture_id = upload->out_tex->tex_id;
-
-  return ret;
-}
-
-/* Called in the gl thread */
-static gboolean
-_init_upload (GstGLUpload * upload)
-{
-  GstGLFuncs *gl;
-  GstVideoFormat v_format;
-  GstVideoInfo out_info;
-
-  gl = upload->context->gl_vtable;
-
-  v_format = GST_VIDEO_INFO_FORMAT (&upload->in_info);
-
-  GST_INFO ("Initializing texture upload for format:%s",
-      gst_video_format_to_string (v_format));
-
-  if (!gl->CreateProgramObject && !gl->CreateProgram) {
-    gst_gl_context_set_error (upload->context,
-        "Cannot upload YUV formats without OpenGL shaders");
-    goto error;
-  }
-
-  gst_video_info_set_format (&out_info, GST_VIDEO_FORMAT_RGBA,
-      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);
-
-  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;
-
-  return TRUE;
-
-error:
-  return FALSE;
-}
-
-static gboolean
-_upload_memory (GstGLUpload * upload)
-{
-  guint in_width, in_height;
-  guint in_texture[GST_VIDEO_MAX_PLANES];
-  GstBuffer *inbuf;
-  GstVideoFrame out_frame;
-  GstVideoInfo out_info;
-  gint i;
-
-  in_width = GST_VIDEO_INFO_WIDTH (&upload->in_info);
-  in_height = GST_VIDEO_INFO_HEIGHT (&upload->in_info);
-
-  if (!upload->initted) {
-    if (!_init_upload (upload)) {
-      return FALSE;
-    }
-  }
-
-  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 with textures:%u,%u,%u dimensions:%ux%u",
-      in_texture[0], in_texture[1], in_texture[2], in_width, in_height);
-
-  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;
+#undef NEXT_METHOD
 }
diff --git a/gst-libs/gst/gl/gstglupload.h b/gst-libs/gst/gl/gstglupload.h
index 21943b9..5bc4346 100644
--- a/gst-libs/gst/gl/gstglupload.h
+++ b/gst-libs/gst/gl/gstglupload.h
@@ -22,7 +22,6 @@
 #define __GST_GL_UPLOAD_H__
 
 #include <gst/video/video.h>
-#include <gst/gstmemory.h>
 
 #include <gst/gl/gstgl_fwd.h>
 
@@ -37,6 +36,22 @@
 #define GST_GL_UPLOAD_CAST(obj) ((GstGLUpload*)(obj))
 
 /**
+ * GstGLUploadReturn:
+ * @GST_GL_UPLOAD_DONE: No further processing required
+ * @GST_GL_UPLOAD_ERROR: An unspecified error occured
+ * @GST_GL_UPLOAD_UNSUPPORTED: The configuration is unsupported.
+ */
+typedef enum
+{
+  GST_GL_UPLOAD_DONE = 1,
+
+  GST_GL_UPLOAD_ERROR = -1,
+  GST_GL_UPLOAD_UNSUPPORTED = -2,
+  /* <private> */
+  GST_GL_UPLOAD_UNSHARED_GL_CONTEXT = -3,
+} GstGLUploadReturn;
+
+/**
  * GstGLUpload
  *
  * Opaque #GstGLUpload object
@@ -47,17 +62,7 @@
   GstObject        parent;
 
   GstGLContext    *context;
-  GstGLColorConvert *convert;
 
-  /* input data */
-  GstVideoInfo     in_info;
-
-  gboolean         initted;
-
-  GstGLMemory     *in_tex[GST_VIDEO_MAX_PLANES];
-  GstGLMemory     *out_tex;
-
-  /* <private> */
   GstGLUploadPrivate *priv;
 
   gpointer _reserved[GST_PADDING];
@@ -73,17 +78,28 @@
   GstObjectClass object_class;
 };
 
-GstGLUpload * gst_gl_upload_new            (GstGLContext * context);
+GstCaps *     gst_gl_upload_get_input_template_caps (void);
 
-void           gst_gl_upload_set_format    (GstGLUpload * upload, GstVideoInfo * in_info);
-GstVideoInfo * gst_gl_upload_get_format    (GstGLUpload * upload);
+GstGLUpload * gst_gl_upload_new                    (GstGLContext * context);
 
-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,
-                                                   gpointer data[GST_VIDEO_MAX_PLANES]);
+GstCaps *     gst_gl_upload_transform_caps         (GstGLContext * context,
+                                                    GstPadDirection direction,
+                                                    GstCaps * caps,
+                                                    GstCaps * filter);
+gboolean      gst_gl_upload_set_caps               (GstGLUpload * upload,
+                                                    GstCaps * in_caps,
+                                                    GstCaps * out_caps);
+void          gst_gl_upload_get_caps               (GstGLUpload * upload,
+                                                    GstCaps ** in_caps,
+                                                    GstCaps ** out_caps);
+void          gst_gl_upload_propose_allocation     (GstGLUpload * upload,
+                                                    GstQuery * decide_query,
+                                                    GstQuery * query);
 
-gboolean gst_gl_upload_perform_with_gl_texture_upload_meta (GstGLUpload *upload, GstVideoGLTextureUploadMeta *meta, guint texture_id[4]);
+GstGLUploadReturn gst_gl_upload_perform_with_buffer (GstGLUpload * upload,
+                                                    GstBuffer * buffer,
+                                                    GstBuffer ** outbuf);
+void              gst_gl_upload_release_buffer     (GstGLUpload * upload);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/gstgluploadmeta.c b/gst-libs/gst/gl/gstgluploadmeta.c
index fe70d28..e47e006 100644
--- a/gst-libs/gst/gl/gstgluploadmeta.c
+++ b/gst-libs/gst/gl/gstgluploadmeta.c
@@ -100,6 +100,8 @@
 
   upload->context = gst_object_ref (context);
 
+  GST_DEBUG_OBJECT (upload, "Created upload for context %"GST_PTR_FORMAT, upload->context);
+  
   return upload;
 }
 
@@ -108,6 +110,7 @@
 {
   GstGLUploadMeta *upload;
 
+  GST_DEBUG_OBJECT (object, "Finalizing");
   upload = GST_GL_UPLOAD_META (object);
 
   gst_gl_upload_meta_reset (upload);
@@ -202,7 +205,7 @@
   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)) {
+    if (GST_MEMORY_FLAG_IS_SET (in_mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD)) {
       GstMapInfo map_info;
       guint tex_id;
 
@@ -216,25 +219,30 @@
       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);
+      GST_MINI_OBJECT_FLAG_SET (in_mem, GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD);
     } else {
       GstGLMemory *out_mem;
+      gint mem_width, mem_height;
 
-      if (!upload->priv->out_tex[i])
+      if (!upload->priv->out_tex[i]) {
+        /* the GL upload meta creates GL_TEXTURE_2D textures */
         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);
+            texture_id[i], GL_TEXTURE_2D, &upload->info, i, NULL, 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);
+        GST_MINI_OBJECT_FLAG_SET (out_mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
       }
 
+      mem_width = gst_gl_memory_get_texture_width (out_mem);
+      mem_height = gst_gl_memory_get_texture_height (out_mem);
+
       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,
+            out_mem->tex_type, mem_width, mem_height,
+            GST_VIDEO_INFO_PLANE_STRIDE (&out_mem->info, out_mem->plane),
             FALSE)))
         break;
     }
@@ -253,11 +261,7 @@
   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];
+          &upload->info, i, NULL, data[i], NULL, NULL);
   }
 
   return _perform_with_gl_memory (upload, meta, texture_id);
diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c
index c2ea06f..0c0642a 100644
--- a/gst-libs/gst/gl/gstglutils.c
+++ b/gst-libs/gst/gl/gstglutils.c
@@ -31,6 +31,9 @@
 #if GST_GL_HAVE_WINDOW_X11
 #include <gst/gl/x11/gstgldisplay_x11.h>
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+#include <gst/gl/wayland/gstgldisplay_wayland.h>
+#endif
 
 #ifndef GL_FRAMEBUFFER_UNDEFINED
 #define GL_FRAMEBUFFER_UNDEFINED          0x8219
@@ -105,6 +108,7 @@
 _gen_texture (GstGLContext * context, GenTexture * data)
 {
   const GstGLFuncs *gl = context->gl_vtable;
+  GLenum internal_format;
 
   GST_TRACE ("Generating texture format:%u dimensions:%ux%u", data->format,
       data->width, data->height);
@@ -112,9 +116,12 @@
   gl->GenTextures (1, &data->result);
   gl->BindTexture (GL_TEXTURE_2D, data->result);
 
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (context, GL_RGBA,
+      GL_UNSIGNED_BYTE);
   if (data->width > 0 && data->height > 0)
-    gl->TexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, data->width,
-        data->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+    gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format,
+        data->width, data->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
 
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -124,6 +131,7 @@
   GST_LOG ("generated texture id:%d", data->result);
 }
 
+/* deprecated. replaced by GstGLMemory */
 void
 gst_gl_context_gen_texture (GstGLContext * context, GLuint * pTexture,
     GstVideoFormat v_format, GLint width, GLint height)
@@ -142,6 +150,7 @@
   context->gl_vtable->DeleteTextures (1, texture);
 }
 
+/* deprecated. replaced by GstGLMemory */
 void
 gst_gl_context_del_texture (GstGLContext * context, GLuint * pTexture)
 {
@@ -160,6 +169,8 @@
 _gen_texture_full (GstGLContext * context, GenTextureFull * data)
 {
   const GstGLFuncs *gl = context->gl_vtable;
+  GstVideoGLTextureType tex_type;
+  GstVideoFormat v_format;
   GLint glinternalformat = 0;
   GLenum glformat = 0;
   GLenum gltype = 0;
@@ -167,60 +178,14 @@
   gl->GenTextures (1, &data->result);
   gl->BindTexture (GL_TEXTURE_2D, data->result);
 
-  switch (GST_VIDEO_INFO_FORMAT (data->info)) {
-    case GST_VIDEO_FORMAT_RGB:
-    case GST_VIDEO_FORMAT_BGR:
-    {
-      glinternalformat = GL_RGB8;
-      glformat = GL_RGB;
-      gltype = GL_UNSIGNED_BYTE;
-      break;
-    }
-    case GST_VIDEO_FORMAT_RGB16:
-    {
-      glinternalformat = GL_RGB16;
-      glformat = GL_RGB;
-      gltype = GL_UNSIGNED_SHORT_5_6_5;
-      break;
-    }
-    case GST_VIDEO_FORMAT_RGBA:
-    case GST_VIDEO_FORMAT_BGRA:
-    case GST_VIDEO_FORMAT_ARGB:
-    case GST_VIDEO_FORMAT_ABGR:
-    case GST_VIDEO_FORMAT_RGBx:
-    case GST_VIDEO_FORMAT_BGRx:
-    case GST_VIDEO_FORMAT_xRGB:
-    case GST_VIDEO_FORMAT_xBGR:
-    case GST_VIDEO_FORMAT_AYUV:
-    {
-      glinternalformat = GL_RGBA8;
-      glformat = GL_RGBA;
-      gltype = GL_UNSIGNED_BYTE;
-      break;
-    }
-    case GST_VIDEO_FORMAT_NV12:
-    case GST_VIDEO_FORMAT_NV21:
-    {
-      glinternalformat = GL_LUMINANCE;
-      glformat = data->comp == 0 ? GL_LUMINANCE : GL_LUMINANCE_ALPHA;
-      gltype = GL_UNSIGNED_BYTE;
-      break;
-    }
-    case GST_VIDEO_FORMAT_I420:
-    case GST_VIDEO_FORMAT_YV12:
-    case GST_VIDEO_FORMAT_Y444:
-    case GST_VIDEO_FORMAT_Y42B:
-    case GST_VIDEO_FORMAT_Y41B:
-    {
-      glformat = GL_LUMINANCE;
-      gltype = GL_UNSIGNED_BYTE;
-      break;
-    }
-    default:
-      GST_WARNING ("unsupported %s",
-          gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (data->info)));
-      break;
-  }
+  v_format = GST_VIDEO_INFO_FORMAT (data->info);
+  tex_type = gst_gl_texture_type_from_format (context, v_format, data->comp);
+  glformat = gst_gl_format_from_gl_texture_type (tex_type);
+  gltype = GL_UNSIGNED_BYTE;
+  if (v_format == GST_VIDEO_FORMAT_RGB16)
+    gltype = GL_UNSIGNED_SHORT_5_6_5;
+  glinternalformat = gst_gl_sized_gl_format_from_gl_format_type (context,
+      glformat, gltype);
 
   gl->TexImage2D (GL_TEXTURE_2D, 0, glinternalformat,
       GST_VIDEO_INFO_COMP_WIDTH (data->info, data->comp),
@@ -233,6 +198,7 @@
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 }
 
+/* deprecated. replaced by GstGLMemory */
 void
 gst_gl_generate_texture_full (GstGLContext * context, const GstVideoInfo * info,
     const guint comp, gint stride[], gsize offset[], gsize size[],
@@ -290,7 +256,7 @@
     case GST_VIDEO_FORMAT_Y42B:
     case GST_VIDEO_FORMAT_Y41B:
     {
-      stride[comp] = GST_ROUND_UP_4 (GST_VIDEO_INFO_COMP_WIDTH (info, comp));;
+      stride[comp] = GST_ROUND_UP_4 (GST_VIDEO_INFO_COMP_WIDTH (info, comp));
       size[comp] = stride[comp] * GST_VIDEO_INFO_COMP_HEIGHT (info, comp);
       if (comp == 0)
         offset[0] = 0;
@@ -341,68 +307,6 @@
   return TRUE;
 }
 
-typedef struct _UseFBO
-{
-  GstGLFramebuffer *frame;
-  gint texture_fbo_width;
-  gint texture_fbo_height;
-  GLuint fbo;
-  GLuint depth_buffer;
-  GLuint texture_fbo;
-  GLCB cb;
-  gint input_tex_width;
-  gint input_tex_height;
-  GLuint input_tex;
-  gdouble proj_param1;
-  gdouble proj_param2;
-  gdouble proj_param3;
-  gdouble proj_param4;
-  GstGLDisplayProjection projection;
-  gpointer stuff;
-} UseFBO;
-
-static void
-_use_fbo (GstGLContext * context, UseFBO * data)
-{
-  gst_gl_framebuffer_use (data->frame, data->texture_fbo_width,
-      data->texture_fbo_height, data->fbo, data->depth_buffer,
-      data->texture_fbo, data->cb, data->input_tex_width,
-      data->input_tex_height, data->input_tex, data->proj_param1,
-      data->proj_param2, data->proj_param3, data->proj_param4, data->projection,
-      data->stuff);
-}
-
-/* Called by glfilter */
-/* this function really has to be simplified...  do we really need to
-   set projection this way? Wouldn't be better a set_projection
-   separate call? or just make glut functions available out of
-   gst-libs and call it if needed on drawcallback? -- Filippo */
-/* GLCB too.. I think that only needed parameters should be
- * GstGLDisplay *display and gpointer data, or just gpointer data */
-/* ..everything here has to be simplified! */
-gboolean
-gst_gl_context_use_fbo (GstGLContext * context, gint texture_fbo_width,
-    gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
-    GLuint texture_fbo, GLCB cb, gint input_tex_width,
-    gint input_tex_height, GLuint input_tex, gdouble proj_param1,
-    gdouble proj_param2, gdouble proj_param3, gdouble proj_param4,
-    GstGLDisplayProjection projection, gpointer stuff)
-{
-  GstGLFramebuffer *frame = gst_gl_framebuffer_new (context);
-
-  UseFBO data =
-      { frame, texture_fbo_width, texture_fbo_height, fbo, depth_buffer,
-    texture_fbo, cb, input_tex_width, input_tex_height, input_tex,
-    proj_param1, proj_param2, proj_param3, proj_param4, projection, stuff
-  };
-
-  gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _use_fbo, &data);
-
-  gst_object_unref (frame);
-
-  return TRUE;
-}
-
 typedef struct _UseFBO2
 {
   GstGLFramebuffer *frame;
@@ -549,7 +453,7 @@
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_CONTEXT);
 
 static gboolean
-context_pad_query (const GValue * item, GValue * value, gpointer user_data)
+pad_query (const GValue * item, GValue * value, gpointer user_data)
 {
   GstPad *pad = g_value_get_object (item);
   GstQuery *query = user_data;
@@ -562,16 +466,16 @@
     return FALSE;
   }
 
-  GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, pad, "context pad peer query failed");
+  GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, pad, "pad peer query failed");
   return TRUE;
 }
 
-static gboolean
-run_context_query (GstElement * element, GstQuery * query,
+gboolean
+gst_gl_run_query (GstElement * element, GstQuery * query,
     GstPadDirection direction)
 {
   GstIterator *it;
-  GstIteratorFoldFunction func = context_pad_query;
+  GstIteratorFoldFunction func = pad_query;
   GValue res = { 0 };
 
   g_value_init (&res, G_TYPE_BOOLEAN);
@@ -592,8 +496,8 @@
 }
 
 static GstQuery *
-_gst_gl_display_context_query (GstElement * element,
-    GstGLDisplay ** display_ptr, const gchar * display_type)
+_gst_context_query (GstElement * element,
+    gpointer ptr, const gchar * display_type)
 {
   GstQuery *query;
   GstContext *ctxt;
@@ -603,11 +507,11 @@
    *  2b) Query upstream as above.
    */
   query = gst_query_new_context (display_type);
-  if (run_context_query (element, query, GST_PAD_SRC)) {
+  if (gst_gl_run_query (element, query, GST_PAD_SRC)) {
     gst_query_parse_context (query, &ctxt);
     GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,
         "found context (%p) in downstream query", ctxt);
-  } else if (run_context_query (element, query, GST_PAD_SINK)) {
+  } else if (gst_gl_run_query (element, query, GST_PAD_SINK)) {
     gst_query_parse_context (query, &ctxt);
     GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,
         "found context (%p) in upstream query", ctxt);
@@ -623,7 +527,7 @@
     GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,
         "posting need context message");
     msg = gst_message_new_need_context (GST_OBJECT_CAST (element),
-        GST_GL_DISPLAY_CONTEXT_TYPE);
+        display_type);
     gst_element_post_message (element, msg);
   }
 
@@ -637,11 +541,10 @@
 }
 
 static void
-gst_gl_display_context_prepare (GstElement * element,
-    GstGLDisplay ** display_ptr)
+gst_gl_display_context_query (GstElement * element, GstGLDisplay ** display_ptr)
 {
-  GstContext *ctxt;
-  GstQuery *query;
+  GstContext *ctxt = NULL;
+  GstQuery *query = NULL;
 
 #ifndef GST_DISABLE_GST_DEBUG
   if (!GST_CAT_CONTEXT)
@@ -649,19 +552,21 @@
 #endif
 
   query =
-      _gst_gl_display_context_query (element, display_ptr,
-      GST_GL_DISPLAY_CONTEXT_TYPE);
+      _gst_context_query (element, display_ptr, GST_GL_DISPLAY_CONTEXT_TYPE);
   gst_query_parse_context (query, &ctxt);
+
   if (ctxt && gst_context_has_context_type (ctxt, GST_GL_DISPLAY_CONTEXT_TYPE)) {
-    gst_context_get_gl_display (ctxt, display_ptr);
-    if (*display_ptr)
-      goto out;
+    GstGLDisplay *tmp_disp = NULL;
+    if (gst_context_get_gl_display (ctxt, &tmp_disp) && tmp_disp)
+      *display_ptr = tmp_disp;
   }
+
+  if (*display_ptr)
+    goto out;
+
 #if GST_GL_HAVE_WINDOW_X11
   gst_query_unref (query);
-  query =
-      _gst_gl_display_context_query (element, display_ptr,
-      "gst.x11.display.handle");
+  query = _gst_context_query (element, display_ptr, "gst.x11.display.handle");
   gst_query_parse_context (query, &ctxt);
   if (ctxt && gst_context_has_context_type (ctxt, "gst.x11.display.handle")) {
     const GstStructure *s;
@@ -672,15 +577,65 @@
         && display) {
       *display_ptr =
           (GstGLDisplay *) gst_gl_display_x11_new_with_display (display);
-      goto out;
     }
   }
+
+  if (*display_ptr)
+    goto out;
+#endif
+
+#if GST_GL_HAVE_WINDOW_WAYLAND
+  gst_query_unref (query);
+  query =
+      _gst_context_query (element, display_ptr,
+      "GstWaylandDisplayHandleContextType");
+  gst_query_parse_context (query, &ctxt);
+  if (ctxt
+      && gst_context_has_context_type (ctxt,
+          "GstWaylandDisplayHandleContextType")) {
+    const GstStructure *s;
+    struct wl_display *display;
+
+    s = gst_context_get_structure (ctxt);
+    if (gst_structure_get (s, "display", G_TYPE_POINTER, &display, NULL)
+        && display) {
+      *display_ptr =
+          (GstGLDisplay *) gst_gl_display_wayland_new_with_display (display);
+    }
+  }
+
+  if (*display_ptr)
+    goto out;
 #endif
 
 out:
   gst_query_unref (query);
 }
 
+static void
+gst_gl_context_query (GstElement * element, GstGLContext ** context_ptr)
+{
+  GstContext *ctxt;
+  GstQuery *query;
+
+#ifndef GST_DISABLE_GST_DEBUG
+  if (!GST_CAT_CONTEXT)
+    GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
+#endif
+
+  query = _gst_context_query (element, context_ptr, "gst.gl.app_context");
+  gst_query_parse_context (query, &ctxt);
+  if (ctxt && gst_context_has_context_type (ctxt, "gst.gl.app_context")) {
+    const GstStructure *s = gst_context_get_structure (ctxt);
+    GstGLContext *tmp_ctx = NULL;
+    if (gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &tmp_ctx, NULL)
+        && tmp_ctx)
+      *context_ptr = tmp_ctx;
+  }
+
+  gst_query_unref (query);
+}
+
 /*  4) Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT
  *     message.
  */
@@ -705,25 +660,27 @@
 }
 
 gboolean
-gst_gl_ensure_display (gpointer element, GstGLDisplay ** display_ptr)
+gst_gl_ensure_element_data (gpointer element, GstGLDisplay ** display_ptr,
+    GstGLContext ** context_ptr)
 {
   GstGLDisplay *display;
 
   g_return_val_if_fail (element != NULL, FALSE);
   g_return_val_if_fail (display_ptr != NULL, FALSE);
+  g_return_val_if_fail (context_ptr != NULL, FALSE);
 
   /*  1) Check if the element already has a context of the specific
    *     type.
    */
   display = *display_ptr;
   if (gst_gl_display_found (element, display))
-    return TRUE;
+    goto done;
 
-  gst_gl_display_context_prepare (element, display_ptr);
+  gst_gl_display_context_query (element, display_ptr);
 
   /* Neighbour found and it updated the display */
   if (gst_gl_display_found (element, *display_ptr))
-    return TRUE;
+    goto get_gl_context;
 
   /* If no neighboor, or application not interested, use system default */
   display = gst_gl_display_new ();
@@ -732,17 +689,26 @@
 
   gst_gl_display_context_propagate (element, display);
 
-  return display != NULL;
+get_gl_context:
+  if (*context_ptr)
+    goto done;
+
+  gst_gl_context_query (element, context_ptr);
+
+done:
+  return *display_ptr != NULL;
 }
 
 gboolean
 gst_gl_handle_set_context (GstElement * element, GstContext * context,
-    GstGLDisplay ** display)
+    GstGLDisplay ** display, GstGLContext ** other_context)
 {
-  GstGLDisplay *replacement = NULL;
+  GstGLDisplay *display_replacement = NULL;
+  GstGLContext *context_replacement = NULL;
   const gchar *context_type;
 
-  g_return_val_if_fail (display, FALSE);
+  g_return_val_if_fail (display != NULL, FALSE);
+  g_return_val_if_fail (other_context != NULL, FALSE);
 
   if (!context)
     return FALSE;
@@ -750,7 +716,7 @@
   context_type = gst_context_get_context_type (context);
 
   if (g_strcmp0 (context_type, GST_GL_DISPLAY_CONTEXT_TYPE) == 0) {
-    if (!gst_context_get_gl_display (context, &replacement)) {
+    if (!gst_context_get_gl_display (context, &display_replacement)) {
       GST_WARNING_OBJECT (element, "Failed to get display from context");
       return FALSE;
     }
@@ -762,14 +728,54 @@
 
     s = gst_context_get_structure (context);
     if (gst_structure_get (s, "display", G_TYPE_POINTER, &display, NULL))
-      replacement =
+      display_replacement =
           (GstGLDisplay *) gst_gl_display_x11_new_with_display (display);
   }
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+  else if (g_strcmp0 (context_type, "GstWaylandDisplayHandleContextType") == 0) {
+    const GstStructure *s;
+    struct wl_display *display;
 
-  if (replacement) {
+    s = gst_context_get_structure (context);
+    if (gst_structure_get (s, "display", G_TYPE_POINTER, &display, NULL))
+      display_replacement =
+          (GstGLDisplay *) gst_gl_display_wayland_new_with_display (display);
+  }
+#endif
+  else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
+    const GstStructure *s = gst_context_get_structure (context);
+    GstGLDisplay *context_display;
+    GstGLDisplay *element_display;
+
+    if (gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT,
+            &context_replacement, NULL)) {
+      context_display = gst_gl_context_get_display (context_replacement);
+      element_display = display_replacement ? display_replacement : *display;
+      if (element_display
+          && (gst_gl_display_get_handle_type (element_display) &
+              gst_gl_display_get_handle_type (context_display)) == 0) {
+        GST_ELEMENT_WARNING (element, LIBRARY, SETTINGS, ("%s",
+                "Cannot set a GL context with a different display type"), ("%s",
+                "Cannot set a GL context with a different display type"));
+        gst_object_unref (context_replacement);
+        context_replacement = NULL;
+      }
+      gst_object_unref (context_display);
+    }
+  }
+
+  if (display_replacement) {
     GstGLDisplay *old = *display;
-    *display = replacement;
+    *display = display_replacement;
+
+    if (old)
+      gst_object_unref (old);
+  }
+
+  if (context_replacement) {
+    GstGLContext *old = *other_context;
+    *other_context = context_replacement;
 
     if (old)
       gst_object_unref (old);
@@ -780,7 +786,7 @@
 
 gboolean
 gst_gl_handle_context_query (GstElement * element, GstQuery * query,
-    GstGLDisplay ** display)
+    GstGLDisplay ** display, GstGLContext ** other_context)
 {
   gboolean res = FALSE;
   const gchar *context_type;
@@ -789,6 +795,7 @@
   g_return_val_if_fail (element != NULL, FALSE);
   g_return_val_if_fail (query != NULL, FALSE);
   g_return_val_if_fail (display != NULL, FALSE);
+  g_return_val_if_fail (other_context != NULL, FALSE);
 
   gst_query_parse_context_type (query, &context_type);
 
@@ -833,6 +840,95 @@
     res = x11_display != NULL;
   }
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+  else if (g_strcmp0 (context_type, "GstWaylandDisplayHandleContextType") == 0) {
+    GstStructure *s;
+    struct wl_display *wayland_display = NULL;
+
+    gst_query_parse_context (query, &old_context);
+
+    if (old_context)
+      context = gst_context_copy (old_context);
+    else
+      context = gst_context_new ("GstWaylandDisplayHandleContextType", TRUE);
+
+    if (*display
+        && ((*display)->type & GST_GL_DISPLAY_TYPE_WAYLAND) ==
+        GST_GL_DISPLAY_TYPE_WAYLAND)
+      wayland_display =
+          (struct wl_display *) gst_gl_display_get_handle (*display);
+
+    s = gst_context_writable_structure (context);
+    gst_structure_set (s, "display", G_TYPE_POINTER, wayland_display, NULL);
+
+    gst_query_set_context (query, context);
+    gst_context_unref (context);
+
+    res = wayland_display != NULL;
+  }
+#endif
+  else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
+    GstStructure *s;
+
+    gst_query_parse_context (query, &old_context);
+
+    if (old_context)
+      context = gst_context_copy (old_context);
+    else
+      context = gst_context_new ("gst.gl.app_context", TRUE);
+
+    s = gst_context_writable_structure (context);
+    gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, *other_context, NULL);
+    gst_query_set_context (query, context);
+    gst_context_unref (context);
+
+    res = *other_context != NULL;
+  }
 
   return res;
 }
+
+gsize
+gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
+    guint plane)
+{
+  gint padded_height;
+  gsize plane_size;
+
+  padded_height = info->height;
+
+  if (align)
+    padded_height += align->padding_top + align->padding_bottom;
+
+  padded_height =
+      GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info->finfo, plane, padded_height);
+
+  plane_size = GST_VIDEO_INFO_PLANE_STRIDE (info, plane) * padded_height;
+
+  return plane_size;
+}
+
+GstCaps *
+gst_gl_caps_replace_all_caps_features (const GstCaps * caps,
+    const gchar * feature_name)
+{
+  GstCaps *tmp = gst_caps_copy (caps);
+  guint n = gst_caps_get_size (tmp);
+  guint i = 0;
+
+  for (i = 0; i < n; i++) {
+    GstCapsFeatures *features = gst_caps_get_features (tmp, i);
+    if (features) {
+      guint n_f = gst_caps_features_get_size (features);
+      guint j = 0;
+      for (j = 0; j < n_f; j++) {
+        gst_caps_features_remove_id (features,
+            gst_caps_features_get_nth_id (features, j));
+      }
+    }
+
+    gst_caps_features_add (features, feature_name);
+  }
+
+  return tmp;
+}
diff --git a/gst-libs/gst/gl/gstglutils.h b/gst-libs/gst/gl/gstglutils.h
index 13c39ea..ee606e0 100644
--- a/gst-libs/gst/gl/gstglutils.h
+++ b/gst-libs/gst/gl/gstglutils.h
@@ -67,21 +67,18 @@
  */
 typedef void (*GLCB_V2) (gpointer stuff);
 
+/* deprecated. replaced by GstGLMemory */
 void gst_gl_context_gen_texture (GstGLContext * context, GLuint * pTexture,
     GstVideoFormat v_format, GLint width, GLint height);
+/* deprecated. replaced by GstGLMemory */
 void gst_gl_context_del_texture (GstGLContext * context, GLuint * pTexture);
 
+/* deprecated. replaced by GstGLMemory */
 void gst_gl_generate_texture_full (GstGLContext * context, const GstVideoInfo * info,
     const guint comp, gint stride[], gsize offset[], gsize size[], GLuint * pTexture);
 
 gboolean gst_gl_context_gen_fbo (GstGLContext * context, gint width, gint height,
     GLuint * fbo, GLuint * depthbuffer);
-gboolean gst_gl_context_use_fbo (GstGLContext * context, gint texture_fbo_width,
-    gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
-    GLuint texture_fbo, GLCB cb, gint input_texture_width,
-    gint input_texture_height, GLuint input_texture, gdouble proj_param1,
-    gdouble proj_param2, gdouble proj_param3, gdouble proj_param4,
-    GstGLDisplayProjection projection, gpointer stuff);
 gboolean gst_gl_context_use_fbo_v2 (GstGLContext * context, gint texture_fbo_width,
     gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
     GLuint texture_fbo, GLCB_V2 cb, gpointer stuff);
@@ -98,11 +95,19 @@
 void gst_gl_context_set_error (GstGLContext * context, const char * format, ...);
 gchar *gst_gl_context_get_error (void);
 
-gboolean gst_gl_ensure_display (gpointer element, GstGLDisplay **display_ptr);
+gboolean gst_gl_ensure_element_data (gpointer element,
+    GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
 gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context, 
-    GstGLDisplay ** display);
+    GstGLDisplay ** display, GstGLContext ** other_context);
 gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query, 
-    GstGLDisplay ** display);
+    GstGLDisplay ** display, GstGLContext ** other_context);
+
+gboolean gst_gl_run_query (GstElement * element,
+    GstQuery * query, GstPadDirection direction);
+gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
+    guint plane);
+GstCaps * gst_gl_caps_replace_all_caps_features (const GstCaps * caps,
+    const gchar * feature_name);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/gstglviewconvert.c b/gst-libs/gst/gl/gstglviewconvert.c
new file mode 100644
index 0000000..ebe4ed3
--- /dev/null
+++ b/gst-libs/gst/gl/gstglviewconvert.c
@@ -0,0 +1,2000 @@
+/*
+ * GStreamer
+ * Copyright (C) 2009 Julien Isorce <julien.isorce@mail.com>
+ * Copyright (C) 2014 Jan Schmidt <jan@centricular.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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:viewconvert
+ *
+ * Convert stereoscopic/multiview video using fragment shaders.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstglviewconvert.h"
+
+#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 GstStaticCaps caps_template =
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+    (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA"));
+
+#define GST_CAT_DEFAULT gst_gl_view_convert_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_0,
+  PROP_INPUT_LAYOUT,
+  PROP_INPUT_FLAGS,
+  PROP_OUTPUT_LAYOUT,
+  PROP_OUTPUT_FLAGS,
+  PROP_OUTPUT_DOWNMIX_MODE
+};
+
+#define DEFAULT_DOWNMIX GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS
+
+struct _GstGLViewConvertPrivate
+{
+  gboolean result;
+
+  GstVideoMultiviewMode input_mode;
+  GstVideoMultiviewFlags input_flags;
+  GstVideoMultiviewMode output_mode;
+  GstVideoMultiviewFlags output_flags;
+
+  GstBuffer *primary_in;
+  GstBuffer *auxilliary_in;
+
+  GstBuffer *primary_out;
+  GstBuffer *auxilliary_out;
+
+  GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
+  GstGLMemory *out_tex[GST_VIDEO_MAX_PLANES];
+  guint n_out_tex;
+
+  GLuint vao;
+  GLuint vertex_buffer;
+  GLuint vbo_indices;
+  GLuint attr_position;
+  GLuint attr_texture;
+};
+
+#define GST_GL_VIEW_CONVERT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+    GST_TYPE_GL_VIEW_CONVERT, GstGLViewConvertPrivate))
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_gl_view_convert_debug, "glviewconvert", 0, "glviewconvert object");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLViewConvert, gst_gl_view_convert,
+    GST_TYPE_OBJECT, DEBUG_INIT);
+
+static void gst_gl_view_convert_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+static void gst_gl_view_convert_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+static void gst_gl_view_convert_finalize (GObject * object);
+
+static void _do_view_convert (GstGLContext * context,
+    GstGLViewConvert * viewconvert);
+
+GType
+gst_gl_stereo_downmix_mode_get_type (void)
+{
+  static volatile gsize g_define_type_id__volatile = 0;
+  if (g_once_init_enter (&g_define_type_id__volatile)) {
+    static const GEnumValue values[] = {
+      {GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS,
+          "Dubois optimised Green-Magenta anaglyph", "green-magenta-dubois"},
+      {GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS,
+            "Dubois optimised Red-Cyan anaglyph",
+          "red-cyan-dubois"},
+      {GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS,
+          "Dubois optimised Amber-Blue anaglyph", "amber-blue-dubois"},
+      {0, NULL, NULL}
+    };
+    GType g_define_type_id =
+        g_enum_register_static ("GstGLStereoDownmix", values);
+    g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+  }
+  return g_define_type_id__volatile;
+}
+
+/* These match the order and number of DOWNMIX_ANAGLYPH_* modes */
+static GLfloat downmix_matrices[][2][9] = {
+  {                             /* Green-Magenta Dubois */
+        {-0.062, 0.284, -0.015, -0.158, 0.668, -0.027, -0.039, 0.143, 0.021},
+        {0.529, -0.016, 0.009, 0.705, -0.015, 0.075, 0.024, -0.065, 0.937}
+      },
+  {                             /* Red-Cyan Dubois */
+        /* Source of this matrix: http://www.site.uottawa.ca/~edubois/anaglyph/LeastSquaresHowToPhotoshop.pdf */
+        {0.437, -0.062, -0.048, 0.449, -0.062, -0.050, 0.164, -0.024, -0.017},
+        {-0.011, 0.377, -0.026, -0.032, 0.761, -0.093, -0.007, 0.009, 1.234}
+      },
+  {                             /* Amber-blue Dubois */
+        {1.062, -0.026, -0.038, -0.205, 0.908, -0.173, 0.299, 0.068, 0.022},
+        {-0.016, 0.006, 0.094, -0.123, 0.062, 0.185, -0.017, -0.017, 0.911}
+      }
+};
+
+/* *INDENT-OFF* */
+static const gchar *fragment_source =
+  "#ifdef GL_ES\n"
+  "precision mediump float;\n"
+  "#endif\n"
+  "varying vec2 v_texcoord;\n"
+  "uniform sampler2D tex_l;\n"
+  "uniform sampler2D tex_r;\n"
+  "uniform float width;\n"
+  "uniform float height;\n"
+  "uniform mat3 downmix[2];\n"
+  "uniform vec2 tex_scale[2];\n"
+  "uniform vec2 offsets[2];\n"
+  "void main () {\n"
+  "vec4 l, r;\n"
+  /* input */
+  "%s"
+  /* now have left and right pixel into l and r */
+  /* output */
+  "%s"
+  "}\n";
+
+static const gchar *frag_input =
+  "  vec2 l_tex = v_texcoord * tex_scale[0] + offsets[0];\n"
+  "  vec2 r_tex = v_texcoord * tex_scale[1] + offsets[1];\n"
+  "  l = texture2D(tex_l, l_tex).rgba;\n"
+  "  r = texture2D(tex_r, r_tex).rgba;\n";
+
+static const gchar *frag_output_downmix =
+  "  vec3 lcol = l.rgb * l.a + vec3(1.0-l.a);\n"
+  "  vec3 rcol = r.rgb * r.a + vec3(1.0-r.a);\n"
+  "  if (l.a + r.a > 0.0) {\n"
+  "    lcol = clamp (downmix[0] * lcol, 0.0, 1.0);\n"
+  "    rcol = clamp (downmix[1] * rcol, 0.0, 1.0);\n"
+  "    gl_FragColor = vec4 (lcol + rcol, 1.0);\n"
+  "  } else {\n"
+  "    gl_FragColor = vec4 (0.0);\n"
+  "  }\n";
+
+static const gchar *frag_output_left =
+  "  gl_FragColor = l;\n";
+
+static const gchar *frag_output_right =
+  "  gl_FragColor = r;\n";
+
+static const gchar *frag_output_side_by_side =
+  "  if (v_texcoord.x < 0.5) {\n"
+  "    gl_FragColor = l;\n"
+  "  } else {\n"
+  "    gl_FragColor = r;\n"
+  "  };\n";
+
+static const gchar *frag_output_top_bottom =
+  "if (v_texcoord.y < 0.5) {\n"
+  "  gl_FragColor = l;\n"
+  "} else {\n"
+  "  gl_FragColor = r;\n"
+  "};\n";
+
+static const gchar *frag_output_column_interleaved =
+  "if (int(mod(l_tex.x * width, 2.0)) == 0) {\n"
+  "  gl_FragColor = l;\n"
+  "} else {\n"
+  "  gl_FragColor = r;\n"
+  "};\n";
+
+static const gchar *frag_output_row_interleaved =
+  "if (int(mod(l_tex.y * height, 2.0)) == 0) {\n"
+  "  gl_FragColor = l;\n"
+  "} else {\n"
+  "  gl_FragColor = r;\n"
+  "};\n";
+
+static const gchar *frag_output_checkerboard =
+  "if (int(mod(l_tex.x * width, 2.0)) == \n"
+  "    int(mod(l_tex.y * height, 2.0))) {\n"
+  "  gl_FragColor = l;\n"
+  "} else {\n"
+  "  gl_FragColor = r;\n"
+  "};\n";
+
+static const gchar *frag_output_separated =
+  "gl_FragData[0] = l;\n"
+  "gl_FragData[1] = r;\n";
+
+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";
+/* *INDENT-ON* */
+
+static const GLfloat vertices[] = {
+  1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+  -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+  -1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
+  1.0f, 1.0f, 0.0f, 1.0f, 1.0f
+};
+
+static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+static void
+gst_gl_view_convert_class_init (GstGLViewConvertClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  g_type_class_add_private (klass, sizeof (GstGLViewConvertPrivate));
+
+  gobject_class->set_property = gst_gl_view_convert_set_property;
+  gobject_class->get_property = gst_gl_view_convert_get_property;
+  gobject_class->finalize = gst_gl_view_convert_finalize;
+
+  g_object_class_install_property (gobject_class, PROP_INPUT_LAYOUT,
+      g_param_spec_enum ("input-mode-override",
+          "Input Multiview Mode Override",
+          "Override any input information about multiview layout",
+          GST_TYPE_VIDEO_MULTIVIEW_MODE,
+          GST_VIDEO_MULTIVIEW_MODE_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_INPUT_FLAGS,
+      g_param_spec_flags ("input-flags-override",
+          "Input Multiview Flags Override",
+          "Override any input information about multiview layout flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_LAYOUT,
+      g_param_spec_enum ("output-mode-override",
+          "Output Multiview Mode Override",
+          "Override automatic output mode selection for multiview layout",
+          GST_TYPE_VIDEO_MULTIVIEW_MODE, GST_VIDEO_MULTIVIEW_MODE_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_FLAGS,
+      g_param_spec_flags ("output-flags-override",
+          "Output Multiview Flags Override",
+          "Override automatic negotiation for output multiview layout flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_DOWNMIX_MODE,
+      g_param_spec_enum ("downmix-mode", "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_gl_view_convert_init (GstGLViewConvert * convert)
+{
+  convert->priv = GST_GL_VIEW_CONVERT_GET_PRIVATE (convert);
+
+  convert->shader = NULL;
+  convert->downmix_mode = DEFAULT_DOWNMIX;
+  convert->priv->input_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
+  convert->priv->input_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+  convert->priv->output_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
+  convert->priv->output_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+
+  convert->input_mode_override = GST_VIDEO_MULTIVIEW_MODE_NONE;
+  convert->input_flags_override = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+  convert->output_mode_override = GST_VIDEO_MULTIVIEW_MODE_NONE;
+  convert->output_flags_override = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+
+  gst_video_info_init (&convert->in_info);
+  gst_video_info_init (&convert->out_info);
+}
+
+static void
+gst_gl_view_convert_finalize (GObject * object)
+{
+  GstGLViewConvert *viewconvert;
+
+  viewconvert = GST_GL_VIEW_CONVERT (object);
+
+  gst_gl_view_convert_reset (viewconvert);
+
+  gst_buffer_replace (&viewconvert->priv->primary_in, NULL);
+  gst_buffer_replace (&viewconvert->priv->auxilliary_in, NULL);
+  gst_buffer_replace (&viewconvert->priv->primary_out, NULL);
+  gst_buffer_replace (&viewconvert->priv->auxilliary_out, NULL);
+
+  if (viewconvert->context) {
+    gst_object_unref (viewconvert->context);
+    viewconvert->context = NULL;
+  }
+
+  G_OBJECT_CLASS (gst_gl_view_convert_parent_class)->finalize (object);
+}
+
+GstGLViewConvert *
+gst_gl_view_convert_new (void)
+{
+  return g_object_new (GST_TYPE_GL_VIEW_CONVERT, NULL);
+}
+
+void
+gst_gl_view_convert_set_context (GstGLViewConvert * viewconvert,
+    GstGLContext * context)
+{
+  g_return_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert));
+
+  if (gst_object_replace ((GstObject **) & viewconvert->context,
+          GST_OBJECT (context)))
+    gst_gl_view_convert_reset (viewconvert);
+}
+
+gboolean
+gst_gl_view_convert_set_format (GstGLViewConvert * viewconvert,
+    GstVideoInfo * in_info, GstVideoInfo * out_info)
+{
+  g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), FALSE);
+
+  if (gst_video_info_is_equal (in_info, &viewconvert->in_info) &&
+      gst_video_info_is_equal (out_info, &viewconvert->out_info))
+    return TRUE;
+
+  if (GST_VIDEO_INFO_FORMAT (in_info) != GST_VIDEO_FORMAT_RGBA ||
+      GST_VIDEO_INFO_FORMAT (out_info) != GST_VIDEO_FORMAT_RGBA) {
+    GST_ERROR_OBJECT (viewconvert,
+        "Multiview conversion can currently only be performed on RGBA textures");
+    return FALSE;
+  }
+
+  /* FIXME: Compare what changed and decide if we need a full reset or not */
+  GST_OBJECT_LOCK (viewconvert);
+  gst_gl_view_convert_reset (viewconvert);
+
+  viewconvert->in_info = *in_info;
+  viewconvert->out_info = *out_info;
+
+  gst_buffer_replace (&viewconvert->priv->primary_in, NULL);
+  gst_buffer_replace (&viewconvert->priv->auxilliary_in, NULL);
+  gst_buffer_replace (&viewconvert->priv->primary_out, NULL);
+  gst_buffer_replace (&viewconvert->priv->auxilliary_out, NULL);
+  GST_OBJECT_UNLOCK (viewconvert);
+
+  return TRUE;
+}
+
+/**
+ * gst_gl_view_convert_set_caps:
+ * @viewconvert: a #GstGLViewConvert
+ * @in_caps: input #GstCaps
+ * @out_caps: output #GstCaps
+ *
+ * Initializes @viewconvert with the information required for conversion.
+ */
+gboolean
+gst_gl_view_convert_set_caps (GstGLViewConvert * viewconvert,
+    GstCaps * in_caps, GstCaps * out_caps)
+{
+  GstVideoInfo in_info, out_info;
+  GstCapsFeatures *in_features, *out_features;
+
+  g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), FALSE);
+  g_return_val_if_fail (GST_IS_CAPS (in_caps), FALSE);
+  g_return_val_if_fail (GST_IS_CAPS (out_caps), FALSE);
+
+  GST_INFO_OBJECT (viewconvert,
+      "Configuring multiview conversion from caps %" GST_PTR_FORMAT
+      " to %" GST_PTR_FORMAT, in_caps, out_caps);
+
+  in_features = gst_caps_get_features (in_caps, 0);
+  out_features = gst_caps_get_features (out_caps, 0);
+
+  if (!gst_caps_features_contains (in_features,
+          GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    return FALSE;
+  if (!gst_caps_features_contains (out_features,
+          GST_CAPS_FEATURE_MEMORY_GL_MEMORY))
+    return FALSE;
+
+  if (!gst_video_info_from_caps (&in_info, in_caps))
+    return FALSE;
+  if (!gst_video_info_from_caps (&out_info, out_caps))
+    return FALSE;
+
+  return gst_gl_view_convert_set_format (viewconvert, &in_info, &out_info);
+}
+
+/* Function that can halve the value
+ * of ints, fractions, int/fraction ranges and lists of ints/fractions */
+static gboolean
+_halve_value (GValue * out, const GValue * in_value)
+{
+  /* Fundamental fixed types first */
+  if (G_VALUE_HOLDS_INT (in_value)) {
+    g_value_init (out, G_TYPE_INT);
+    g_value_set_int (out, MAX (g_value_get_int (in_value) / 2, 1));
+  } else if (GST_VALUE_HOLDS_FRACTION (in_value)) {
+    gint num, den;
+    num = gst_value_get_fraction_numerator (in_value);
+    den = gst_value_get_fraction_denominator (in_value);
+    g_value_init (out, GST_TYPE_FRACTION);
+    /* Don't adjust 'infinite' fractions */
+    if ((num != 1 || den != 2147483647) && (num != 2147483647 || den != 1)) {
+      /* FIXME - could do better approximation when den > G_MAXINT/2? */
+      den = den > G_MAXINT / 2 ? G_MAXINT : den * 2;
+    }
+    gst_value_set_fraction (out, num, den);
+  } else if (GST_VALUE_HOLDS_INT_RANGE (in_value)) {
+    gint range_min = gst_value_get_int_range_min (in_value);
+    gint range_max = gst_value_get_int_range_max (in_value);
+    gint range_step = gst_value_get_int_range_step (in_value);
+    g_value_init (out, GST_TYPE_INT_RANGE);
+    if (range_min != 1)
+      range_min = MAX (1, range_min / 2);
+    if (range_max != G_MAXINT)
+      range_max = MAX (1, range_max / 2);
+    gst_value_set_int_range_step (out, range_min,
+        range_max, MAX (1, range_step / 2));
+  } else if (GST_VALUE_HOLDS_FRACTION_RANGE (in_value)) {
+    GValue min_out = G_VALUE_INIT;
+    GValue max_out = G_VALUE_INIT;
+    const GValue *range_min = gst_value_get_fraction_range_min (in_value);
+    const GValue *range_max = gst_value_get_fraction_range_max (in_value);
+    _halve_value (&min_out, range_min);
+    _halve_value (&max_out, range_max);
+    g_value_init (out, GST_TYPE_FRACTION_RANGE);
+    gst_value_set_fraction_range (out, &min_out, &max_out);
+    g_value_unset (&min_out);
+    g_value_unset (&max_out);
+  } else if (GST_VALUE_HOLDS_LIST (in_value)) {
+    gint i;
+    g_value_init (out, GST_TYPE_LIST);
+    for (i = 0; i < gst_value_list_get_size (in_value); i++) {
+      const GValue *entry;
+      GValue tmp = G_VALUE_INIT;
+
+      entry = gst_value_list_get_value (in_value, i);
+      /* Random list values might not be the right type */
+      if (!_halve_value (&tmp, entry))
+        goto fail;
+      gst_value_list_append_and_take_value (out, &tmp);
+    }
+  } else {
+    return FALSE;
+  }
+
+  return TRUE;
+fail:
+  g_value_unset (out);
+  return FALSE;
+}
+
+static GstStructure *
+_halve_structure_field (const GstStructure * in, const gchar * field_name)
+{
+  GstStructure *out;
+  const GValue *in_value = gst_structure_get_value (in, field_name);
+  GValue tmp = G_VALUE_INIT;
+
+  if (G_UNLIKELY (in_value == NULL))
+    return gst_structure_copy (in);     /* Field doesn't exist, leave it as is */
+
+  if (!_halve_value (&tmp, in_value))
+    return NULL;
+
+  out = gst_structure_copy (in);
+  gst_structure_set_value (out, field_name, &tmp);
+  g_value_unset (&tmp);
+
+  return out;
+}
+
+/* Function that can double the value
+ * of ints, fractions, int/fraction ranges and lists of ints/fractions */
+static gboolean
+_double_value (GValue * out, const GValue * in_value)
+{
+  /* Fundamental fixed types first */
+  if (G_VALUE_HOLDS_INT (in_value)) {
+    gint n = g_value_get_int (in_value);
+    g_value_init (out, G_TYPE_INT);
+    if (n <= G_MAXINT / 2)
+      g_value_set_int (out, n * 2);
+    else
+      g_value_set_int (out, G_MAXINT);
+  } else if (GST_VALUE_HOLDS_FRACTION (in_value)) {
+    gint num, den;
+    num = gst_value_get_fraction_numerator (in_value);
+    den = gst_value_get_fraction_denominator (in_value);
+    g_value_init (out, GST_TYPE_FRACTION);
+    /* Don't adjust 'infinite' fractions */
+    if ((num != 1 || den != 2147483647) && (num != 2147483647 || den != 1)) {
+      /* FIXME - could do better approximation when num > G_MAXINT/2? */
+      num = num > G_MAXINT / 2 ? G_MAXINT : num * 2;
+    }
+    gst_value_set_fraction (out, num, den);
+  } else if (GST_VALUE_HOLDS_INT_RANGE (in_value)) {
+    gint range_min = gst_value_get_int_range_min (in_value);
+    gint range_max = gst_value_get_int_range_max (in_value);
+    gint range_step = gst_value_get_int_range_step (in_value);
+    if (range_min != 1) {
+      range_min = MIN (G_MAXINT / 2, range_min);
+      range_min *= 2;
+    }
+    if (range_max != G_MAXINT) {
+      range_max = MIN (G_MAXINT / 2, range_max);
+      range_max *= 2;
+    }
+    range_step = MIN (G_MAXINT / 2, range_step);
+    g_value_init (out, GST_TYPE_INT_RANGE);
+    gst_value_set_int_range_step (out, range_min, range_max, range_step);
+  } else if (GST_VALUE_HOLDS_FRACTION_RANGE (in_value)) {
+    GValue min_out = G_VALUE_INIT;
+    GValue max_out = G_VALUE_INIT;
+    const GValue *range_min = gst_value_get_fraction_range_min (in_value);
+    const GValue *range_max = gst_value_get_fraction_range_max (in_value);
+    _double_value (&min_out, range_min);
+    _double_value (&max_out, range_max);
+    g_value_init (out, GST_TYPE_FRACTION_RANGE);
+    gst_value_set_fraction_range (out, &min_out, &max_out);
+    g_value_unset (&min_out);
+    g_value_unset (&max_out);
+  } else if (GST_VALUE_HOLDS_LIST (in_value)) {
+    gint i;
+    g_value_init (out, GST_TYPE_LIST);
+    for (i = 0; i < gst_value_list_get_size (in_value); i++) {
+      const GValue *entry;
+      GValue tmp = G_VALUE_INIT;
+
+      entry = gst_value_list_get_value (in_value, i);
+      /* Random list values might not be the right type */
+      if (!_double_value (&tmp, entry))
+        goto fail;
+      gst_value_list_append_and_take_value (out, &tmp);
+    }
+  } else {
+    return FALSE;
+  }
+
+  return TRUE;
+fail:
+  g_value_unset (out);
+  return FALSE;
+}
+
+static GstStructure *
+_double_structure_field (const GstStructure * in, const gchar * field_name)
+{
+  GstStructure *out;
+  const GValue *in_value = gst_structure_get_value (in, field_name);
+  GValue tmp = G_VALUE_INIT;
+
+  if (G_UNLIKELY (in_value == NULL))
+    return gst_structure_copy (in);     /* Field doesn't exist, leave it as is */
+
+  if (!_double_value (&tmp, in_value))
+    return NULL;
+
+  out = gst_structure_copy (in);
+  gst_structure_set_value (out, field_name, &tmp);
+  g_value_unset (&tmp);
+
+  return out;
+}
+
+/* Return a copy of the caps with the requested field halved in value/range */
+#if 0
+static GstCaps *
+_halve_caps_field (const GstCaps * in, const gchar * field_name)
+{
+  gint i;
+  GstCaps *out = gst_caps_new_empty ();
+
+  for (i = 0; i < gst_caps_get_size (in); i++) {
+    const GstStructure *cur = gst_caps_get_structure (in, i);
+    GstCapsFeatures *f = gst_caps_get_features (in, i);
+
+    GstStructure *res = _halve_structure_field (cur, field_name);
+    out =
+        gst_caps_merge_structure_full (out, res,
+        f ? gst_caps_features_copy (f) : NULL);
+  }
+
+  return out;
+}
+#endif
+
+/* Return a copy of the caps with the requested field doubled in value/range */
+static GstCaps *
+_double_caps_field (const GstCaps * in, const gchar * field_name)
+{
+  gint i;
+  GstCaps *out = gst_caps_new_empty ();
+
+  for (i = 0; i < gst_caps_get_size (in); i++) {
+    const GstStructure *cur = gst_caps_get_structure (in, i);
+    GstCapsFeatures *f = gst_caps_get_features (in, i);
+
+    GstStructure *res = _double_structure_field (cur, field_name);
+    out =
+        gst_caps_merge_structure_full (out, res,
+        f ? gst_caps_features_copy (f) : NULL);
+  }
+
+  return out;
+}
+
+/* Takes ownership of the input caps  */
+static GstCaps *
+_expand_par_for_half_aspect (GstCaps * in, gboolean vertical_half_aspect)
+{
+
+  guint mview_flags, mview_flags_mask;
+  GstCaps *out;
+  GstStructure *tmp;
+
+  out = gst_caps_new_empty ();
+
+  while (gst_caps_get_size (in) > 0) {
+    GstStructure *s;
+    GstCapsFeatures *features;
+
+    features = gst_caps_get_features (in, 0);
+    if (features)
+      features = gst_caps_features_copy (features);
+
+    s = gst_caps_steal_structure (in, 0);
+
+    if (!gst_structure_get_flagset (s, "multiview-flags", &mview_flags,
+            &mview_flags_mask)) {
+      gst_caps_append_structure_full (out, s, features);
+      continue;
+    }
+    /* If the input doesn't care about the half-aspect flag, allow current PAR in either variant */
+    if ((mview_flags_mask & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) == 0) {
+      gst_caps_append_structure_full (out, s, features);
+      continue;
+    }
+    if (!gst_structure_has_field (s, "pixel-aspect-ratio")) {
+      /* No par field, dont-care the half-aspect flag */
+      gst_structure_set (s, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+      gst_caps_append_structure_full (out, s, features);
+      continue;
+    }
+
+    /* Halve or double PAR base on inputs input specified. */
+
+    /* Append a copy with the half-aspect flag as-is */
+    tmp = gst_structure_copy (s);
+    out = gst_caps_merge_structure_full (out, tmp,
+        features ? gst_caps_features_copy (features) : NULL);
+
+    /* and then a copy inverted */
+    if (mview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
+      /* Input is half-aspect. Double/halve the PAR, clear the flag */
+      if (vertical_half_aspect)
+        tmp = _halve_structure_field (s, "pixel-aspect-ratio");
+      else
+        tmp = _double_structure_field (s, "pixel-aspect-ratio");
+      /* Clear the flag */
+      gst_structure_set (tmp, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask | GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+    } else {
+      if (vertical_half_aspect)
+        tmp = _double_structure_field (s, "pixel-aspect-ratio");
+      else
+        tmp = _halve_structure_field (s, "pixel-aspect-ratio");
+      /* Set the flag */
+      gst_structure_set (tmp, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags | GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask | GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+    }
+
+    out = gst_caps_merge_structure_full (out, tmp,
+        features ? gst_caps_features_copy (features) : NULL);
+
+    gst_structure_free (s);
+    if (features)
+      gst_caps_features_free (features);
+  }
+
+  gst_caps_unref (in);
+
+  return out;
+}
+
+/* If input supports top-bottom or row-interleaved, we may halve height to mono frames.
+ * If input supports left-right, checkerboard, quincunx or column-interleaved,
+ * we may halve width to mono frames.
+ * For output of top-bottom or row-interleaved, we may double the mono height
+ * For output of left-right, checkerboard, quincunx or column-interleaved,
+ * we may double the mono width.
+ * In all cases, if input has half-aspect and output does not, we may double the PAR
+ * And if input does *not* have half-aspect flag and output does not, we may halve the PAR
+ */
+static GstCaps *
+_expand_structure (GstGLViewConvert * viewconvert,
+    GstCaps * out_caps, GstStructure * structure, GstCapsFeatures * features)
+{
+  GstCaps *expanded_caps, *tmp;
+  GstCaps *mono_caps;
+  const gchar *default_mview_mode_str = NULL;
+  guint mview_flags, mview_flags_mask;
+  const GValue *in_modes;
+  gint i;
+
+  /* Empty caps to accumulate into */
+  expanded_caps = gst_caps_new_empty ();
+
+  /* First, set defaults if multiview flags are missing */
+  default_mview_mode_str =
+      gst_video_multiview_mode_to_caps_string (GST_VIDEO_MULTIVIEW_MODE_MONO);
+
+  mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+  mview_flags_mask = GST_FLAG_SET_MASK_EXACT;
+
+  if (!gst_structure_has_field (structure, "multiview-mode")) {
+    gst_structure_set (structure,
+        "multiview-mode", G_TYPE_STRING, default_mview_mode_str, NULL);
+  }
+  if (!gst_structure_has_field (structure, "multiview-flags")) {
+    gst_structure_set (structure,
+        "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, mview_flags,
+        mview_flags_mask, NULL);
+  } else {
+    gst_structure_get_flagset (structure, "multiview-flags",
+        &mview_flags, &mview_flags_mask);
+  }
+
+  in_modes = gst_structure_get_value (structure, "multiview-mode");
+  mono_caps = gst_caps_new_empty ();
+  if (gst_value_intersect (NULL, in_modes,
+          gst_video_multiview_get_mono_modes ())) {
+    GstStructure *new_struct = gst_structure_copy (structure);
+    gst_structure_set_value (new_struct, "multiview-mode",
+        gst_video_multiview_get_mono_modes ());
+    /* Half-aspect makes no sense for mono or unpacked, get rid of it */
+    if (mview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
+      gst_structure_set (new_struct, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+    }
+    gst_caps_append_structure_full (mono_caps, new_struct,
+        features ? gst_caps_features_copy (features) : NULL);
+  }
+  if (gst_value_intersect (NULL, in_modes,
+          gst_video_multiview_get_unpacked_modes ())) {
+    GstStructure *new_struct = gst_structure_copy (structure);
+
+    gst_structure_set_value (new_struct, "multiview-mode",
+        gst_video_multiview_get_mono_modes ());
+
+    /* Half-aspect makes no sense for mono or unpacked, get rid of it */
+    if (mview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
+      gst_structure_set (new_struct, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+    }
+    gst_caps_append_structure_full (mono_caps, new_struct,
+        features ? gst_caps_features_copy (features) : NULL);
+  }
+
+  if (gst_value_intersect (NULL, in_modes,
+          gst_video_multiview_get_doubled_height_modes ())) {
+    /* Append mono formats with height halved */
+    GstStructure *new_struct = _halve_structure_field (structure, "height");
+    gst_structure_set_value (new_struct, "multiview-mode",
+        gst_video_multiview_get_mono_modes ());
+    /* Normalise the half-aspect flag away */
+    if (mview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
+      GstStructure *s =
+          _halve_structure_field (new_struct, "pixel-aspect-ratio");
+      gst_structure_set (structure, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask | GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+      gst_structure_free (new_struct);
+      new_struct = s;
+    }
+    mono_caps = gst_caps_merge_structure_full (mono_caps, new_struct,
+        features ? gst_caps_features_copy (features) : NULL);
+  }
+  if (gst_value_intersect (NULL, in_modes,
+          gst_video_multiview_get_doubled_width_modes ())) {
+    /* Append mono formats with width halved */
+    GstStructure *new_struct = _halve_structure_field (structure, "width");
+    gst_structure_set_value (new_struct, "multiview-mode",
+        gst_video_multiview_get_mono_modes ());
+    /* Normalise the half-aspect flag away */
+    if (mview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
+      GstStructure *s =
+          _double_structure_field (new_struct, "pixel-aspect-ratio");
+      gst_structure_set (structure, "multiview-flags",
+          GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags & ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT,
+          mview_flags_mask | GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT, NULL);
+      gst_structure_free (new_struct);
+      new_struct = s;
+    }
+    mono_caps = gst_caps_merge_structure_full (mono_caps, new_struct,
+        features ? gst_caps_features_copy (features) : NULL);
+  }
+  if (gst_value_intersect (NULL, in_modes,
+          gst_video_multiview_get_doubled_size_modes ())) {
+    /* Append checkerboard/doubled size formats with width & height halved */
+    GstStructure *new_struct_w = _halve_structure_field (structure, "width");
+    GstStructure *new_struct_wh =
+        _halve_structure_field (new_struct_w, "height");
+    gst_structure_free (new_struct_w);
+    gst_structure_set_value (new_struct_wh, "multiview-mode",
+        gst_video_multiview_get_mono_modes ());
+    mono_caps = gst_caps_merge_structure_full (mono_caps, new_struct_wh,
+        features ? gst_caps_features_copy (features) : NULL);
+  }
+
+  /* Everything is normalised now, unset the flags we can change */
+  /* Remove the views field, as these are all 'mono' modes
+   * Need to do this before we expand caps back out to frame packed modes */
+  for (i = 0; i < gst_caps_get_size (mono_caps); i++) {
+    GstStructure *s = gst_caps_get_structure (mono_caps, i);
+    gst_structure_remove_fields (s, "views", NULL);
+    if (gst_structure_get_flagset (s, "multiview-flags", &mview_flags,
+            &mview_flags_mask)) {
+      /* Preserve only the half-aspect and mixed-mono flags, for now.
+       * The rest we can change */
+      mview_flags_mask &=
+          (GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT |
+          GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO);
+      gst_structure_set (s, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags, mview_flags_mask, NULL);
+    }
+  }
+
+  GST_TRACE_OBJECT (viewconvert,
+      "Collected single-view caps %" GST_PTR_FORMAT, mono_caps);
+  /* Put unpacked and mono modes first. We don't care about flags. Clear them */
+  tmp = gst_caps_copy (mono_caps);
+  for (i = 0; i < gst_caps_get_size (tmp); i++) {
+    GstStructure *s = gst_caps_get_structure (tmp, i);
+    gst_structure_remove_fields (s, "views", NULL);
+    if (gst_structure_get_flagset (s, "multiview-flags", &mview_flags,
+            &mview_flags_mask)) {
+      /* We can change any flags for mono modes - half-aspect and mixed-mono have no meaning */
+      mview_flags_mask = 0;
+      gst_structure_set (s, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags, mview_flags_mask, NULL);
+    }
+  }
+  expanded_caps = gst_caps_merge (expanded_caps, tmp);
+
+  /* Unpacked output modes have 2 views, for now */
+  tmp = gst_caps_copy (mono_caps);
+  gst_caps_set_value (tmp, "multiview-mode",
+      gst_video_multiview_get_unpacked_modes ());
+  for (i = 0; i < gst_caps_get_size (tmp); i++) {
+    GstStructure *s = gst_caps_get_structure (tmp, i);
+    gst_structure_set (s, "views", G_TYPE_INT, 2, NULL);
+    if (gst_structure_get_flagset (s, "multiview-flags", &mview_flags,
+            &mview_flags_mask)) {
+      /* We can change any flags for unpacked modes - half-aspect and mixed-mono have no meaning */
+      mview_flags_mask = 0;
+      gst_structure_set (s, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
+          mview_flags, mview_flags_mask, NULL);
+    }
+  }
+  expanded_caps = gst_caps_merge (expanded_caps, tmp);
+
+  /* Double height output modes */
+  tmp = _double_caps_field (mono_caps, "height");
+  gst_caps_set_value (tmp, "multiview-mode",
+      gst_video_multiview_get_doubled_height_modes ());
+  tmp = _expand_par_for_half_aspect (tmp, TRUE);
+
+  expanded_caps = gst_caps_merge (expanded_caps, tmp);
+
+  /* Double width output modes */
+  tmp = _double_caps_field (mono_caps, "width");
+  gst_caps_set_value (tmp, "multiview-mode",
+      gst_video_multiview_get_doubled_width_modes ());
+  tmp = _expand_par_for_half_aspect (tmp, FALSE);
+
+  expanded_caps = gst_caps_merge (expanded_caps, tmp);
+
+  /* Double size output modes */
+  {
+    GstCaps *tmp_w = _double_caps_field (mono_caps, "width");
+    tmp = _double_caps_field (tmp_w, "height");
+    gst_caps_unref (tmp_w);
+    gst_caps_set_value (tmp, "multiview-mode",
+        gst_video_multiview_get_doubled_size_modes ());
+    expanded_caps = gst_caps_merge (expanded_caps, tmp);
+  }
+
+  /* We're done with the mono caps now */
+  gst_caps_unref (mono_caps);
+
+  GST_TRACE_OBJECT (viewconvert,
+      "expanded transform caps now %" GST_PTR_FORMAT, expanded_caps);
+
+  if (gst_caps_is_empty (expanded_caps)) {
+    gst_caps_unref (expanded_caps);
+    return out_caps;
+  }
+  /* Really, we can rescale - so at this point we can append full-range
+   * height/width/PAR as an unpreferred final option. */
+  tmp = gst_caps_copy (expanded_caps);
+  gst_caps_set_simple (tmp, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+      "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+
+  out_caps = gst_caps_merge (out_caps, expanded_caps);
+  out_caps = gst_caps_merge (out_caps, tmp);
+  return out_caps;
+}
+
+static GstCaps *
+_intersect_with_mview_mode (GstCaps * caps,
+    GstVideoMultiviewMode mode, GstVideoMultiviewFlags flags)
+{
+  GstCaps *filter, *result;
+  const gchar *caps_str;
+
+  caps_str = gst_video_multiview_mode_to_caps_string (mode);
+
+  filter = gst_caps_new_simple ("video/x-raw",
+      "multiview-mode", G_TYPE_STRING,
+      caps_str, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, flags,
+      GST_FLAG_SET_MASK_EXACT, NULL);
+
+  if (mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME)
+    gst_caps_set_simple (filter, "views", G_TYPE_INT, 2, NULL);
+
+  gst_caps_set_features (filter, 0, gst_caps_features_new_any ());
+
+  GST_DEBUG ("Intersecting target caps %" GST_PTR_FORMAT
+      " with caps %" GST_PTR_FORMAT, caps, filter);
+
+  result = gst_caps_intersect_full (caps, filter, GST_CAPS_INTERSECT_FIRST);
+  gst_caps_unref (filter);
+  return result;
+}
+
+static GstCaps *
+_intersect_with_mview_modes (GstCaps * caps, const GValue * modes)
+{
+  GstCaps *filter, *result;
+
+  filter = gst_caps_new_empty_simple ("video/x-raw");
+
+  gst_caps_set_value (filter, "multiview-mode", modes);
+  gst_caps_set_features (filter, 0, gst_caps_features_new_any ());
+
+  GST_DEBUG ("Intersecting target caps %" GST_PTR_FORMAT
+      " with caps %" GST_PTR_FORMAT, caps, filter);
+
+  result = gst_caps_intersect_full (caps, filter, GST_CAPS_INTERSECT_FIRST);
+  gst_caps_unref (filter);
+  return result;
+}
+
+
+GstCaps *
+gst_gl_view_convert_transform_caps (GstGLViewConvert * viewconvert,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter)
+{
+  gint i;
+  GstCaps *base_caps = gst_static_caps_get (&caps_template);
+  GstCaps *out_caps, *tmp_caps;
+
+  g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), NULL);
+
+  GST_DEBUG_OBJECT (viewconvert, "Direction %s "
+      "input caps %" GST_PTR_FORMAT " filter %" GST_PTR_FORMAT,
+      direction == GST_PAD_SINK ? "sink" : "src", caps, filter);
+
+  /* We can only process GLmemory RGBA caps, start from that */
+  caps = gst_caps_intersect (caps, base_caps);
+  gst_caps_unref (base_caps);
+
+  /* Change input/output to the formats we can convert to/from,
+   * but keep the original caps at the start - we will always prefer
+   * passthrough */
+  if (direction == GST_PAD_SINK) {
+    out_caps = gst_caps_copy (caps);
+    if (viewconvert->input_mode_override != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+      GstVideoMultiviewMode mode = viewconvert->input_mode_override;
+      GstVideoMultiviewFlags flags = viewconvert->input_flags_override;
+
+      const gchar *caps_str = gst_video_multiview_mode_to_caps_string (mode);
+      /* Coerce the input caps before transforming, so the sizes come out right */
+      gst_caps_set_simple (out_caps, "multiview-mode", G_TYPE_STRING,
+          caps_str, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, flags,
+          GST_FLAG_SET_MASK_EXACT, NULL);
+    }
+  } else {
+    out_caps = gst_caps_new_empty ();
+  }
+
+  for (i = 0; i < gst_caps_get_size (caps); i++) {
+    GstStructure *structure = gst_caps_get_structure (caps, i);
+    GstCapsFeatures *features = gst_caps_get_features (caps, i);
+    out_caps = _expand_structure (viewconvert, out_caps, structure, features);
+  }
+
+  if (gst_caps_is_empty (out_caps))
+    goto out;
+
+  /* If we have an output mode override, limit things to that */
+  if (direction == GST_PAD_SINK &&
+      viewconvert->output_mode_override != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+
+    tmp_caps = _intersect_with_mview_mode (out_caps,
+        viewconvert->output_mode_override, viewconvert->output_flags_override);
+
+    gst_caps_unref (out_caps);
+    out_caps = tmp_caps;
+  } else if (viewconvert->input_mode_override != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+    /* Prepend a copy of our preferred input caps in case the peer
+     * can handle them */
+    tmp_caps = _intersect_with_mview_mode (out_caps,
+        viewconvert->input_mode_override, viewconvert->input_flags_override);
+    out_caps = gst_caps_merge (out_caps, tmp_caps);
+  }
+  if (direction == GST_PAD_SRC) {
+    GstStructure *s;
+    /* When generating input caps, we also need a copy of the mono caps
+     * without multiview-mode or flags for backwards compat, at the end */
+    tmp_caps = _intersect_with_mview_mode (caps,
+        GST_VIDEO_MULTIVIEW_MODE_MONO, GST_VIDEO_MULTIVIEW_FLAGS_NONE);
+    if (!gst_caps_is_empty (tmp_caps)) {
+      s = gst_caps_get_structure (tmp_caps, 0);
+      gst_structure_remove_fields (s, "multiview-mode", "multiview-flags",
+          NULL);
+      out_caps = gst_caps_merge (out_caps, tmp_caps);
+    } else
+      gst_caps_unref (tmp_caps);
+  }
+out:
+  gst_caps_unref (caps);
+
+  GST_DEBUG_OBJECT (viewconvert, "Returning caps %" GST_PTR_FORMAT, out_caps);
+  return out_caps;
+}
+
+GstCaps *
+gst_gl_view_convert_fixate_caps (GstGLViewConvert * viewconvert,
+    GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
+{
+  GstVideoMultiviewMode mode = viewconvert->output_mode_override;
+  GstVideoMultiviewFlags flags = viewconvert->output_flags_override;
+  GstCaps *tmp;
+
+  g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), NULL);
+
+  othercaps = gst_caps_make_writable (othercaps);
+  GST_LOG_OBJECT (viewconvert, "dir %s fixating %" GST_PTR_FORMAT
+      " against caps %" GST_PTR_FORMAT,
+      direction == GST_PAD_SINK ? "sink" : "src", othercaps, caps);
+
+  if (direction == GST_PAD_SINK) {
+    if (mode != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+      /* We have a requested output mode and are fixating source caps, try and enforce it */
+      tmp = _intersect_with_mview_mode (othercaps, mode, flags);
+      gst_caps_unref (othercaps);
+      othercaps = tmp;
+    } else {
+      /* See if we can do passthrough */
+      GstVideoInfo info;
+
+      if (gst_video_info_from_caps (&info, caps)) {
+        GstVideoMultiviewMode mode = GST_VIDEO_INFO_MULTIVIEW_MODE (&info);
+        GstVideoMultiviewFlags flags = GST_VIDEO_INFO_MULTIVIEW_FLAGS (&info);
+
+        if (viewconvert->input_mode_override != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+          mode = viewconvert->input_mode_override;
+          flags = viewconvert->input_flags_override;
+        }
+
+        tmp = _intersect_with_mview_mode (othercaps, mode, flags);
+        if (gst_caps_is_empty (tmp)) {
+          /* Nope, we can't pass our input caps downstream */
+          gst_caps_unref (tmp);
+        } else {
+          gst_caps_unref (othercaps);
+          othercaps = tmp;
+          goto done;
+        }
+      }
+
+      /* Prefer an unpacked mode for output */
+      tmp =
+          _intersect_with_mview_modes (othercaps,
+          gst_video_multiview_get_unpacked_modes ());
+      if (!gst_caps_is_empty (tmp)) {
+        gst_caps_unref (othercaps);
+        othercaps = tmp;
+      } else {
+        gst_caps_unref (tmp);
+      }
+    }
+  } else if (viewconvert->input_mode_override != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+    /* See if we can coerce the caps into matching input mode/flags,
+     * in case it doesn't care at all, but allow it not to too */
+    mode = viewconvert->input_mode_override;
+    flags = viewconvert->input_flags_override;
+    tmp = _intersect_with_mview_mode (othercaps, mode, flags);
+    if (gst_caps_is_empty (tmp)) {
+      /* Nope, we can pass our input caps downstream */
+      gst_caps_unref (tmp);
+    } else {
+      gst_caps_unref (othercaps);
+      othercaps = tmp;
+    }
+  }
+
+done:
+  GST_DEBUG_OBJECT (viewconvert, "dir %s fixated to %" GST_PTR_FORMAT
+      " against caps %" GST_PTR_FORMAT,
+      direction == GST_PAD_SINK ? "sink" : "src", othercaps, caps);
+  return othercaps;
+}
+
+void
+gst_gl_view_convert_reset (GstGLViewConvert * viewconvert)
+{
+  g_return_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert));
+  if (viewconvert->shader)
+    gst_gl_context_del_shader (viewconvert->context, viewconvert->shader);
+  viewconvert->shader = NULL;
+  viewconvert->initted = FALSE;
+  viewconvert->reconfigure = FALSE;
+}
+
+static void
+gst_gl_view_convert_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLViewConvert *convert = GST_GL_VIEW_CONVERT (object);
+  switch (prop_id) {
+    case PROP_INPUT_LAYOUT:
+      convert->input_mode_override = g_value_get_enum (value);
+      break;
+    case PROP_INPUT_FLAGS:
+      convert->input_flags_override = g_value_get_flags (value);
+      break;
+    case PROP_OUTPUT_LAYOUT:
+      convert->output_mode_override = g_value_get_enum (value);
+      break;
+    case PROP_OUTPUT_FLAGS:
+      convert->output_flags_override = g_value_get_flags (value);
+      break;
+    case PROP_OUTPUT_DOWNMIX_MODE:
+      convert->downmix_mode = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+  GST_OBJECT_LOCK (convert);
+  convert->reconfigure = TRUE;
+  GST_OBJECT_UNLOCK (convert);
+}
+
+static void
+gst_gl_view_convert_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLViewConvert *convert = GST_GL_VIEW_CONVERT (object);
+  switch (prop_id) {
+    case PROP_INPUT_LAYOUT:
+      g_value_set_enum (value, convert->input_mode_override);
+      break;
+    case PROP_INPUT_FLAGS:
+      g_value_set_flags (value, convert->input_flags_override);
+      break;
+    case PROP_OUTPUT_LAYOUT:
+      g_value_set_enum (value, convert->output_mode_override);
+      break;
+    case PROP_OUTPUT_FLAGS:
+      g_value_set_flags (value, convert->output_flags_override);
+      break;
+    case PROP_OUTPUT_DOWNMIX_MODE:
+      g_value_set_enum (value, convert->downmix_mode);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+GstBuffer *
+gst_gl_view_convert_perform (GstGLViewConvert * viewconvert, GstBuffer * inbuf)
+{
+  GstBuffer *out;
+
+  if (gst_gl_view_convert_submit_input_buffer (viewconvert,
+          GST_BUFFER_IS_DISCONT (inbuf), gst_buffer_ref (inbuf)) != GST_FLOW_OK)
+    return NULL;
+  if (gst_gl_view_convert_get_output (viewconvert, &out) != GST_FLOW_OK)
+    return NULL;
+
+  return out;
+}
+
+/* called by _init_convert (in the gl thread) */
+static gboolean
+_init_view_convert_fbo (GstGLViewConvert * viewconvert)
+{
+  GstGLFuncs *gl;
+  guint out_width, out_height;
+  GLuint fake_texture = 0;      /* a FBO must hava texture to init */
+  GLenum internal_format;
+
+  gl = viewconvert->context->gl_vtable;
+  out_width = GST_VIDEO_INFO_WIDTH (&viewconvert->out_info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&viewconvert->out_info);
+  if (!gl->GenFramebuffers) {
+    /* turn off the pipeline because Frame buffer object is a not present */
+    gst_gl_context_set_error (viewconvert->context,
+        "Frambuffer objects unsupported");
+    return FALSE;
+  }
+
+  /* setup FBO */
+  gl->GenFramebuffers (1, &viewconvert->fbo);
+  gl->BindFramebuffer (GL_FRAMEBUFFER, viewconvert->fbo);
+  /* setup the render buffer for depth */
+  gl->GenRenderbuffers (1, &viewconvert->depth_buffer);
+  gl->BindRenderbuffer (GL_RENDERBUFFER, viewconvert->depth_buffer);
+  if (USING_OPENGL (viewconvert->context)
+      || USING_OPENGL3 (viewconvert->context)) {
+    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT, out_width,
+        out_height);
+    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH24_STENCIL8,
+        out_width, out_height);
+  }
+  if (USING_GLES2 (viewconvert->context)) {
+    gl->RenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16,
+        out_width, out_height);
+  }
+
+  /* a fake texture is attached to the convert FBO (cannot init without it) */
+  gl->GenTextures (1, &fake_texture);
+  gl->BindTexture (GL_TEXTURE_2D, fake_texture);
+  internal_format =
+      gst_gl_sized_gl_format_from_gl_format_type (viewconvert->context, GL_RGBA,
+      GL_UNSIGNED_BYTE);
+  gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format, out_width, out_height,
+      0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  /* attach the texture to the FBO to renderer to */
+  gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+      GL_TEXTURE_2D, fake_texture, 0);
+  /* attach the depth render buffer to the FBO */
+  gl->FramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
+      GL_RENDERBUFFER, viewconvert->depth_buffer);
+  if (USING_OPENGL (viewconvert->context)) {
+    gl->FramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
+        GL_RENDERBUFFER, viewconvert->depth_buffer);
+  }
+
+  if (!gst_gl_context_check_framebuffer_status (viewconvert->context)) {
+    gst_gl_context_set_error (viewconvert->context,
+        "GL framebuffer status incomplete");
+    gl->DeleteTextures (1, &fake_texture);
+    return FALSE;
+  }
+
+  /* unbind the FBO */
+  gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
+  gl->DeleteTextures (1, &fake_texture);
+  return TRUE;
+}
+
+/* free after use */
+static gchar *
+_get_shader_string (GstGLViewConvert * viewconvert,
+    GstVideoMultiviewMode in_mode, GstVideoMultiviewMode out_mode)
+{
+  const gchar *input_str, *output_str;
+  gboolean mono_input = FALSE;
+  switch (in_mode) {
+    case GST_VIDEO_MULTIVIEW_MODE_NONE:
+    case GST_VIDEO_MULTIVIEW_MODE_MONO:
+    case GST_VIDEO_MULTIVIEW_MODE_LEFT:
+    case GST_VIDEO_MULTIVIEW_MODE_RIGHT:
+      mono_input = TRUE;
+      /* Fall through */
+    default:
+      input_str = frag_input;
+      break;
+  }
+
+  switch (out_mode) {
+    case GST_VIDEO_MULTIVIEW_MODE_LEFT:
+      output_str = frag_output_left;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_RIGHT:
+      output_str = frag_output_right;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX:
+      /* FIXME: implement properly with sub-sampling */
+    case GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE:
+      output_str = frag_output_side_by_side;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM:
+      output_str = frag_output_top_bottom;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED:
+      output_str = frag_output_column_interleaved;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED:
+      output_str = frag_output_row_interleaved;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_SEPARATED:
+    case GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME:
+      output_str = frag_output_separated;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD:
+      output_str = frag_output_checkerboard;
+      break;
+    case GST_VIDEO_MULTIVIEW_MODE_NONE:
+    case GST_VIDEO_MULTIVIEW_MODE_MONO:
+    default:
+      if (mono_input)
+        output_str = frag_output_left;
+      else
+        output_str = frag_output_downmix;
+      break;
+  }
+
+  return g_strdup_printf (fragment_source, input_str, output_str);
+}
+
+static void
+_bind_buffer (GstGLViewConvert * viewconvert)
+{
+  const GstGLFuncs *gl = viewconvert->context->gl_vtable;
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, viewconvert->priv->vbo_indices);
+  gl->BindBuffer (GL_ARRAY_BUFFER, viewconvert->priv->vertex_buffer);
+  /* Load the vertex position */
+  gl->VertexAttribPointer (viewconvert->priv->attr_position, 3, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), (void *) 0);
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (viewconvert->priv->attr_texture, 2, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), (void *) (3 * sizeof (GLfloat)));
+  gl->EnableVertexAttribArray (viewconvert->priv->attr_position);
+  gl->EnableVertexAttribArray (viewconvert->priv->attr_texture);
+}
+
+static void
+_unbind_buffer (GstGLViewConvert * viewconvert)
+{
+  const GstGLFuncs *gl = viewconvert->context->gl_vtable;
+  gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+  gl->DisableVertexAttribArray (viewconvert->priv->attr_position);
+  gl->DisableVertexAttribArray (viewconvert->priv->attr_texture);
+}
+
+/* Called in the gl thread */
+static gboolean
+_init_view_convert (GstGLViewConvert * viewconvert)
+{
+  GstGLViewConvertPrivate *priv = viewconvert->priv;
+  GstVideoMultiviewMode in_mode = priv->input_mode;
+  GstVideoMultiviewMode out_mode = priv->output_mode;
+  GstVideoMultiviewFlags in_flags = priv->input_flags;
+  GstVideoMultiviewFlags out_flags = priv->output_flags;
+  gfloat tex_scale[2][2] = {
+    {1., 1.},
+    {1., 1.}
+  };
+  gfloat offsets[2][2] = {
+    {0., 0.},
+    {0., 0.}
+  };
+  gchar *fragment_source_str;
+  GstGLFuncs *gl;
+  gboolean res;
+  gint l_index, r_index;
+
+  gl = viewconvert->context->gl_vtable;
+  if (viewconvert->reconfigure)
+    gst_gl_view_convert_reset (viewconvert);
+  if (viewconvert->initted)
+    return TRUE;
+
+  GST_LOG_OBJECT (viewconvert,
+      "Initializing multiview conversion from %s mode %d flags 0x%x w %u h %u to "
+      "%s mode %d flags 0x%x w %u h %u",
+      gst_video_format_to_string (GST_VIDEO_INFO_FORMAT
+          (&viewconvert->in_info)), in_mode, in_flags,
+      viewconvert->in_info.width, viewconvert->in_info.height,
+      gst_video_format_to_string (GST_VIDEO_INFO_FORMAT
+          (&viewconvert->out_info)), out_mode, out_flags,
+      viewconvert->out_info.width, viewconvert->out_info.height);
+
+  if (!gl->CreateProgramObject && !gl->CreateProgram) {
+    gst_gl_context_set_error (viewconvert->context,
+        "Cannot perform multiview conversion without OpenGL shaders");
+    goto error;
+  }
+  if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) ==
+      (out_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST)) {
+    l_index = 0;
+    r_index = 1;
+  } else {
+    GST_LOG_OBJECT (viewconvert, "Switching left/right views");
+    /* Swap the views */
+    l_index = 1;
+    r_index = 0;
+  }
+
+  if (in_mode < GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE) {        /* unknown/mono/left/right single image */
+  } else if (in_mode == GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE ||
+      in_mode == GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX) {
+    /* Side-by-side input */
+    offsets[r_index][0] += 0.5 * tex_scale[r_index][0];
+    tex_scale[0][0] *= 0.5f;    /* Half horizontal scale */
+    tex_scale[1][0] *= 0.5f;
+  } else if (in_mode == GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM) {  /* top-bottom */
+    offsets[r_index][1] += 0.5 * tex_scale[r_index][1];
+    tex_scale[0][1] *= 0.5f;    /* Half vertical scale */
+    tex_scale[1][1] *= 0.5f;
+  }
+
+  /* Flipped is vertical, flopped is horizontal.
+   * Adjust and offset per-view scaling. This needs to be done
+   * after the input scaling already splits the views, before
+   * adding any output scaling. */
+  if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED) !=
+      (out_flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED)) {
+    offsets[l_index][1] += tex_scale[l_index][1];
+    tex_scale[l_index][1] *= -1.0;
+  }
+  if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED) !=
+      (out_flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED)) {
+    offsets[l_index][0] += tex_scale[l_index][0];
+    tex_scale[l_index][0] *= -1.0;
+  }
+  if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED) !=
+      (out_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED)) {
+    offsets[r_index][1] += tex_scale[r_index][1];
+    tex_scale[r_index][1] *= -1.0;
+  }
+  if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED) !=
+      (out_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED)) {
+    offsets[r_index][0] += tex_scale[r_index][0];
+    tex_scale[r_index][0] *= -1.0;
+  }
+
+  if (out_mode == GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE ||
+      out_mode == GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX) {
+    /* Side-by-Side */
+    offsets[1][0] -= tex_scale[1][0];
+    tex_scale[0][0] *= 2.0f;
+    tex_scale[1][0] *= 2.0f;
+  } else if (out_mode == GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM) {
+    offsets[1][1] -= tex_scale[1][1];
+    tex_scale[0][1] *= 2.0f;
+    tex_scale[1][1] *= 2.0f;
+  }
+
+  GST_DEBUG_OBJECT (viewconvert,
+      "Scaling matrix [ %f, %f ] [ %f %f]. Offsets [ %f, %f ] [ %f, %f ]",
+      tex_scale[0][0], tex_scale[0][1],
+      tex_scale[1][0], tex_scale[1][1],
+      offsets[0][0], offsets[0][1], offsets[1][0], offsets[1][1]);
+  fragment_source_str = _get_shader_string (viewconvert, in_mode, out_mode);
+// g_print ("%s\n", fragment_source_str);
+  res = gst_gl_context_gen_shader (viewconvert->context, text_vertex_shader,
+      fragment_source_str, &viewconvert->shader);
+  g_free (fragment_source_str);
+  if (!res)
+    goto error;
+  viewconvert->priv->attr_position =
+      gst_gl_shader_get_attribute_location (viewconvert->shader, "a_position");
+  viewconvert->priv->attr_texture =
+      gst_gl_shader_get_attribute_location (viewconvert->shader, "a_texcoord");
+  gst_gl_shader_use (viewconvert->shader);
+  gst_gl_shader_set_uniform_2fv (viewconvert->shader, "tex_scale",
+      2, tex_scale[0]);
+  gst_gl_shader_set_uniform_2fv (viewconvert->shader, "offsets", 2, offsets[0]);
+  gst_gl_shader_set_uniform_1f (viewconvert->shader, "width",
+      GST_VIDEO_INFO_WIDTH (&viewconvert->out_info));
+  gst_gl_shader_set_uniform_1f (viewconvert->shader, "height",
+      GST_VIDEO_INFO_HEIGHT (&viewconvert->out_info));
+  gst_gl_shader_set_uniform_matrix_3fv (viewconvert->shader, "downmix",
+      2, FALSE, &downmix_matrices[viewconvert->downmix_mode][0][0]);
+  if (in_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    gst_gl_shader_set_uniform_1i (viewconvert->shader, "tex_l", l_index);
+    gst_gl_shader_set_uniform_1i (viewconvert->shader, "tex_r", r_index);
+  } else {
+    gst_gl_shader_set_uniform_1i (viewconvert->shader, "tex_l", 0);
+    gst_gl_shader_set_uniform_1i (viewconvert->shader, "tex_r", 0);
+  }
+  gst_gl_context_clear_shader (viewconvert->context);
+  if (!_init_view_convert_fbo (viewconvert)) {
+    goto error;
+  }
+
+  if (!viewconvert->priv->vertex_buffer) {
+    if (gl->GenVertexArrays) {
+      gl->GenVertexArrays (1, &viewconvert->priv->vao);
+      gl->BindVertexArray (viewconvert->priv->vao);
+    }
+
+    gl->GenBuffers (1, &viewconvert->priv->vertex_buffer);
+    gl->BindBuffer (GL_ARRAY_BUFFER, viewconvert->priv->vertex_buffer);
+    gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices,
+        GL_STATIC_DRAW);
+    gl->GenBuffers (1, &viewconvert->priv->vbo_indices);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, viewconvert->priv->vbo_indices);
+    gl->BufferData (GL_ELEMENT_ARRAY_BUFFER, sizeof (indices), indices,
+        GL_STATIC_DRAW);
+    if (gl->GenVertexArrays) {
+      _bind_buffer (viewconvert);
+      gl->BindVertexArray (0);
+    }
+
+    gl->BindBuffer (GL_ARRAY_BUFFER, 0);
+    gl->BindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0);
+  }
+
+  gl->BindTexture (GL_TEXTURE_2D, 0);
+  viewconvert->initted = TRUE;
+  return TRUE;
+error:
+  return FALSE;
+}
+
+static gboolean
+_do_view_convert_draw (GstGLContext * context, GstGLViewConvert * viewconvert)
+{
+  GstGLViewConvertPrivate *priv = viewconvert->priv;
+  GstGLFuncs *gl;
+  guint out_width, out_height;
+  gint out_views, i;
+  GLint viewport_dim[4] = { 0 };
+  GLenum multipleRT[] = {
+    GL_COLOR_ATTACHMENT0,
+    GL_COLOR_ATTACHMENT1,
+    GL_COLOR_ATTACHMENT2
+  };
+  GstVideoMultiviewMode in_mode = priv->input_mode;
+  GstVideoMultiviewMode out_mode = priv->output_mode;
+
+  gl = context->gl_vtable;
+  out_width = GST_VIDEO_INFO_WIDTH (&viewconvert->out_info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&viewconvert->out_info);
+  gl->BindFramebuffer (GL_FRAMEBUFFER, viewconvert->fbo);
+  if (out_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      out_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    out_views = viewconvert->out_info.views;
+  } else {
+    out_views = 1;
+  }
+  /* attach the texture to the FBO to renderer to */
+  for (i = 0; i < out_views; i++) {
+    /* needed? */
+    gl->BindTexture (GL_TEXTURE_2D, priv->out_tex[i]->tex_id);
+    gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i,
+        GL_TEXTURE_2D, priv->out_tex[i]->tex_id, 0);
+  }
+
+  if (gl->DrawBuffers)
+    gl->DrawBuffers (out_views, multipleRT);
+  else if (gl->DrawBuffer)
+    gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
+  gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
+  gl->Viewport (0, 0, out_width, out_height);
+  gst_gl_shader_use (viewconvert->shader);
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (priv->vao);
+  else
+    _bind_buffer (viewconvert);
+  if (in_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    if (priv->in_tex[1] == NULL) {
+      GST_ERROR_OBJECT (viewconvert,
+          "No 2nd view available during conversion!");
+      return FALSE;
+    }
+    gl->ActiveTexture (GL_TEXTURE1);
+    gl->BindTexture (GL_TEXTURE_2D, priv->in_tex[1]->tex_id);
+  }
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, priv->in_tex[0]->tex_id);
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, NULL);
+  if (gl->BindVertexArray)
+    gl->BindVertexArray (0);
+  else
+    _unbind_buffer (viewconvert);
+  if (gl->DrawBuffer)
+    gl->DrawBuffer (GL_NONE);
+  /* we are done with the shader */
+  gst_gl_context_clear_shader (context);
+  gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2],
+      viewport_dim[3]);
+  gst_gl_context_check_framebuffer_status (context);
+  gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
+  return TRUE;
+}
+
+static gboolean
+_gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target)
+{
+  *target = gst_buffer_new ();
+  if (!gst_gl_memory_setup_buffer (viewconvert->context, NULL,
+          &viewconvert->out_info, NULL, *target)) {
+    return FALSE;
+  }
+  gst_buffer_add_video_meta_full (*target, 0,
+      GST_VIDEO_INFO_FORMAT (&viewconvert->out_info),
+      GST_VIDEO_INFO_WIDTH (&viewconvert->out_info),
+      GST_VIDEO_INFO_HEIGHT (&viewconvert->out_info),
+      GST_VIDEO_INFO_N_PLANES (&viewconvert->out_info),
+      viewconvert->out_info.offset, viewconvert->out_info.stride);
+
+  return TRUE;
+}
+
+static void
+_do_view_convert (GstGLContext * context, GstGLViewConvert * viewconvert)
+{
+  GstGLViewConvertPrivate *priv = viewconvert->priv;
+  guint in_width, in_height, out_width, out_height;
+  GstMapInfo out_info[GST_VIDEO_MAX_PLANES], in_info[GST_VIDEO_MAX_PLANES];
+  GstGLMemory *dest_tex[GST_VIDEO_MAX_PLANES];
+  gboolean res = TRUE;
+  gint i = 0, j = 0;
+  gint in_views, out_views;
+  GstVideoMultiviewMode in_mode;
+  GstVideoMultiviewMode out_mode;
+
+  out_width = GST_VIDEO_INFO_WIDTH (&viewconvert->out_info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&viewconvert->out_info);
+  in_width = GST_VIDEO_INFO_WIDTH (&viewconvert->in_info);
+  in_height = GST_VIDEO_INFO_HEIGHT (&viewconvert->in_info);
+
+  g_return_if_fail (priv->primary_out == NULL);
+  g_return_if_fail (priv->auxilliary_out == NULL);
+
+  in_mode = priv->input_mode;
+  out_mode = priv->output_mode;
+
+  if (in_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME)
+    in_views = viewconvert->in_info.views;
+  else
+    in_views = 1;
+
+  if (out_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED ||
+      out_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME)
+    out_views = viewconvert->out_info.views;
+  else
+    out_views = 1;
+
+  if (!_init_view_convert (viewconvert)) {
+    priv->result = FALSE;
+    return;
+  }
+
+  if (!_gen_buffer (viewconvert, &priv->primary_out)) {
+    GST_ERROR_OBJECT (viewconvert,
+        "Failed to setup memory for primary output buffer");
+    priv->result = FALSE;
+    return;
+  }
+
+  if (out_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    if (!_gen_buffer (viewconvert, &priv->auxilliary_out)) {
+      GST_ERROR_OBJECT (viewconvert,
+          "Failed to setup memory for second view output buffer");
+      priv->result = FALSE;
+      return;
+    }
+  }
+
+  for (i = 0; i < in_views; i++) {
+    if (in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME && i > 0) {
+      priv->in_tex[i] =
+          (GstGLMemory *) gst_buffer_peek_memory (priv->auxilliary_in, 0);
+    } else {
+      priv->in_tex[i] =
+          (GstGLMemory *) gst_buffer_peek_memory (priv->primary_in, i);
+    }
+    if (!gst_is_gl_memory ((GstMemory *) priv->in_tex[i])) {
+      GST_ERROR_OBJECT (viewconvert, "input must be GstGLMemory");
+      res = FALSE;
+      goto out;
+    }
+    if (!gst_memory_map ((GstMemory *) priv->in_tex[i],
+            &in_info[i], GST_MAP_READ | GST_MAP_GL)) {
+      GST_ERROR_OBJECT (viewconvert, "failed to map input memory %p",
+          priv->in_tex[i]);
+      res = FALSE;
+      goto out;
+    }
+  }
+
+  for (j = 0; j < out_views; j++) {
+    GstGLMemory *out_tex;
+    guint width, height;
+    GstVideoInfo temp_info;
+
+    if (j > 0 && out_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+      dest_tex[j] = out_tex =
+          (GstGLMemory *) gst_buffer_peek_memory (priv->auxilliary_out, 0);
+    } else {
+      dest_tex[j] = out_tex =
+          (GstGLMemory *) gst_buffer_peek_memory (priv->primary_out, j);
+    }
+
+    if (!gst_is_gl_memory ((GstMemory *) out_tex)) {
+      GST_ERROR_OBJECT (viewconvert, "output must be GstGLMemory");
+      res = FALSE;
+      goto out;
+    }
+
+    width = gst_gl_memory_get_texture_width (out_tex);
+    height = gst_gl_memory_get_texture_height (out_tex);
+    gst_video_info_set_format (&temp_info, GST_VIDEO_FORMAT_RGBA, width,
+        height);
+    if (out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+        || out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
+        || out_width != width || out_height != 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 (!priv->out_tex[j])
+        priv->out_tex[j] =
+            (GstGLMemory *) gst_gl_memory_alloc (context, NULL, &temp_info, 0,
+            NULL);
+    } else {
+      priv->out_tex[j] = out_tex;
+    }
+
+    if (!gst_memory_map ((GstMemory *) priv->out_tex[j],
+            &out_info[j], GST_MAP_WRITE | GST_MAP_GL)) {
+      GST_ERROR_OBJECT (viewconvert, "failed to map output memory %p",
+          priv->out_tex[i]);
+      res = FALSE;
+      goto out;
+    }
+  }
+  priv->n_out_tex = out_views;
+
+  GST_LOG_OBJECT (viewconvert, "multiview splitting to textures:%p,%p,%p,%p "
+      "dimensions:%ux%u, from textures:%p,%p,%p,%p dimensions:%ux%u",
+      priv->out_tex[0], priv->out_tex[1],
+      priv->out_tex[2], priv->out_tex[3],
+      out_width, out_height, priv->in_tex[0],
+      priv->in_tex[1], priv->in_tex[2], priv->in_tex[3], in_width, in_height);
+
+  if (!_do_view_convert_draw (context, viewconvert))
+    res = FALSE;
+out:
+  for (j--; j >= 0; j--) {
+    GstGLMemory *out_tex;
+    guint width, height;
+
+    out_tex = dest_tex[j];
+
+    width = gst_gl_memory_get_texture_width (out_tex);
+    height = gst_gl_memory_get_texture_height (out_tex);
+
+    gst_memory_unmap ((GstMemory *) priv->out_tex[j], &out_info[j]);
+    if (out_tex != priv->out_tex[j]) {
+      GstMapInfo to_info, from_info;
+      if (!gst_memory_map ((GstMemory *) priv->out_tex[j],
+              &from_info, GST_MAP_READ | GST_MAP_GL)) {
+        gst_gl_context_set_error (viewconvert->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 (viewconvert->context, "Failed to map "
+            "intermediate memory");
+        res = FALSE;
+        continue;
+      }
+      gst_gl_memory_copy_into_texture (priv->out_tex[j],
+          out_tex->tex_id, out_tex->tex_type, width, height,
+          GST_VIDEO_INFO_PLANE_STRIDE (&out_tex->info, out_tex->plane), FALSE);
+      gst_memory_unmap ((GstMemory *) out_tex, &to_info);
+    }
+
+    priv->out_tex[j] = NULL;
+  }
+
+  for (i--; i >= 0; i--) {
+    gst_memory_unmap ((GstMemory *) priv->in_tex[i], &in_info[i]);
+  }
+
+  if (!res) {
+    gst_buffer_replace (&priv->primary_out, NULL);
+    gst_buffer_replace (&priv->auxilliary_out, NULL);
+  }
+
+  priv->result = res;
+  return;
+}
+
+GstFlowReturn
+gst_gl_view_convert_submit_input_buffer (GstGLViewConvert * viewconvert,
+    gboolean is_discont, GstBuffer * input)
+{
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstVideoMultiviewMode mode;
+  GstBuffer **target;
+
+  if (is_discont) {
+    gst_buffer_replace (&viewconvert->priv->primary_in, NULL);
+    gst_buffer_replace (&viewconvert->priv->auxilliary_in, NULL);
+  }
+
+  mode = viewconvert->input_mode_override;
+  if (mode == GST_VIDEO_MULTIVIEW_MODE_NONE)
+    mode = GST_VIDEO_INFO_MULTIVIEW_MODE (&viewconvert->in_info);
+
+  target = &viewconvert->priv->primary_in;
+
+  /* For frame-by-frame mode, we need to collect the 2nd eye into
+   * our auxilliary buffer */
+  if (mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    if (!GST_BUFFER_FLAG_IS_SET (input, GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE))
+      target = &viewconvert->priv->auxilliary_in;
+  }
+
+  if (*target)
+    gst_buffer_unref (*target);
+  *target = input;
+
+  return ret;
+}
+
+GstFlowReturn
+gst_gl_view_convert_get_output (GstGLViewConvert * viewconvert,
+    GstBuffer ** outbuf_ptr)
+{
+  GstGLViewConvertPrivate *priv = viewconvert->priv;
+  GstBuffer *outbuf = NULL;
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstVideoMultiviewMode in_mode, out_mode;
+  GstVideoMultiviewFlags in_flags, out_flags;
+
+  g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), GST_FLOW_ERROR);
+  g_return_val_if_fail (GST_GL_IS_CONTEXT (viewconvert->context),
+      GST_FLOW_ERROR);
+
+  GST_OBJECT_LOCK (viewconvert);
+
+  /* See if a buffer is available already */
+  if (priv->primary_out) {
+    outbuf = viewconvert->priv->primary_out;
+    priv->primary_out = NULL;
+    goto done;
+  }
+  if (viewconvert->priv->auxilliary_out) {
+    outbuf = priv->auxilliary_out;
+    priv->auxilliary_out = NULL;
+    goto done;
+  }
+
+  /* Check prereqs before processing a new input buffer */
+  if (priv->primary_in == NULL)
+    goto done;
+
+  in_mode = viewconvert->input_mode_override;
+  in_flags = viewconvert->input_flags_override;
+  if (in_mode == GST_VIDEO_MULTIVIEW_MODE_NONE) {
+    in_mode = GST_VIDEO_INFO_MULTIVIEW_MODE (&viewconvert->in_info);
+    in_flags = GST_VIDEO_INFO_MULTIVIEW_FLAGS (&viewconvert->in_info);
+  }
+
+  /* Configured output mode already takes any override
+   * into account */
+  out_mode = GST_VIDEO_INFO_MULTIVIEW_MODE (&viewconvert->out_info);
+  out_flags = GST_VIDEO_INFO_MULTIVIEW_FLAGS (&viewconvert->out_info);
+
+  if (in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
+    /* For frame-by-frame, we need 2 input buffers */
+    if (priv->auxilliary_in == NULL) {
+      GST_LOG_OBJECT (viewconvert,
+          "Can't generate output yet - frame-by-frame mode");
+      goto done;
+    }
+  }
+
+  /* Store the current conversion in the priv vars */
+  priv->input_mode = in_mode;
+  priv->input_flags = in_flags;
+  priv->output_mode = out_mode;
+  priv->output_flags = out_flags;
+
+  if (priv->input_mode == priv->output_mode &&
+      priv->input_flags == priv->output_flags &&
+      viewconvert->in_info.width == viewconvert->out_info.width &&
+      viewconvert->in_info.height == viewconvert->out_info.height) {
+    /* passthrough - just pass input buffers */
+    outbuf = gst_buffer_ref (priv->primary_in);
+    if (in_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME)
+      priv->auxilliary_out = gst_buffer_ref (priv->auxilliary_in);
+    goto done_clear_input;
+  }
+
+  /* Generate new output buffer(s) */
+  gst_gl_context_thread_add (viewconvert->context,
+      (GstGLContextThreadFunc) _do_view_convert, viewconvert);
+
+  if (!priv->result) {
+    if (priv->primary_out)
+      gst_object_unref (priv->primary_out);
+    if (priv->auxilliary_out)
+      gst_object_unref (priv->auxilliary_out);
+    priv->primary_out = NULL;
+    priv->auxilliary_out = NULL;
+    ret = GST_FLOW_ERROR;
+    goto done_clear_input;
+  }
+
+  outbuf = priv->primary_out;
+  gst_buffer_copy_into (outbuf, priv->primary_in,
+      GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+  GST_BUFFER_FLAG_SET (outbuf,
+      GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE |
+      GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW);
+
+  if (priv->auxilliary_out) {
+    gst_buffer_copy_into (priv->auxilliary_out,
+        priv->primary_out, GST_BUFFER_COPY_FLAGS, 0, -1);
+    GST_BUFFER_FLAG_UNSET (priv->auxilliary_out,
+        GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
+  }
+  priv->primary_out = NULL;
+
+done_clear_input:
+  /* Invalidate input buffers now they've been used */
+  gst_buffer_replace (&priv->primary_in, NULL);
+  gst_buffer_replace (&priv->auxilliary_in, NULL);
+
+done:
+  GST_OBJECT_UNLOCK (viewconvert);
+  *outbuf_ptr = outbuf;
+  return ret;
+}
diff --git a/gst-libs/gst/gl/gstglviewconvert.h b/gst-libs/gst/gl/gstglviewconvert.h
new file mode 100644
index 0000000..26a6df9
--- /dev/null
+++ b/gst-libs/gst/gl/gstglviewconvert.h
@@ -0,0 +1,98 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Jan Schmidt <jan@centricular.com>
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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_VIEW_CONVERT_H_
+#define _GST_GL_VIEW_CONVERT_H_
+
+#include <gst/gl/gl.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_GL_VIEW_CONVERT            (gst_gl_view_convert_get_type())
+#define GST_GL_VIEW_CONVERT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_VIEW_CONVERT,GstGLViewConvert))
+#define GST_IS_GL_VIEW_CONVERT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_VIEW_CONVERT))
+#define GST_GL_VIEW_CONVERT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_VIEW_CONVERT,GstGLViewConvertClass))
+#define GST_IS_GL_VIEW_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_VIEW_CONVERT))
+#define GST_GL_VIEW_CONVERT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_VIEW_CONVERT,GstGLViewConvertClass))
+
+#define GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE gst_gl_stereo_downmix_mode_get_type()
+GType gst_gl_stereo_downmix_mode_get_type (void);
+
+enum _GstGLStereoDownmix {
+  GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS,
+  GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS,
+  GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS,
+};
+
+typedef enum _GstGLStereoDownmix GstGLStereoDownmix;
+
+struct _GstGLViewConvert
+{
+  GstObject object;
+
+  GstGLContext *context;
+
+  GstGLShader *shader;
+
+  GstVideoMultiviewMode input_mode_override;
+  GstVideoMultiviewFlags input_flags_override;
+  GstVideoMultiviewMode output_mode_override;
+  GstVideoMultiviewFlags output_flags_override;
+
+  GstGLStereoDownmix downmix_mode;
+
+  GstVideoInfo in_info;
+  GstVideoInfo out_info;
+
+  gboolean initted;
+  gboolean reconfigure;
+
+  GLuint fbo;
+  GLuint depth_buffer;
+
+  GstGLViewConvertPrivate *priv;
+};
+
+struct _GstGLViewConvertClass
+{
+  GstObjectClass object_class;
+};
+
+GType gst_gl_view_convert_get_type (void);
+GstGLViewConvert * gst_gl_view_convert_new (void);
+
+gboolean gst_gl_view_convert_set_format (GstGLViewConvert *viewconvert, GstVideoInfo *in_info,
+    GstVideoInfo *out_info);
+gboolean  gst_gl_view_convert_set_caps (GstGLViewConvert * viewconvert, GstCaps * in_caps, GstCaps * out_caps);
+GstCaps * gst_gl_view_convert_transform_caps (GstGLViewConvert * viewconvert,
+    GstPadDirection direction, GstCaps * caps, GstCaps * filter);
+GstCaps * gst_gl_view_convert_fixate_caps (GstGLViewConvert *viewconvert,
+    GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
+GstFlowReturn gst_gl_view_convert_submit_input_buffer (GstGLViewConvert *viewconvert,
+    gboolean is_discont, GstBuffer * input);
+GstFlowReturn gst_gl_view_convert_get_output (GstGLViewConvert *viewconvert,
+    GstBuffer ** outbuf_ptr);
+
+GstBuffer * gst_gl_view_convert_perform (GstGLViewConvert * viewconvert, GstBuffer *inbuf);
+void gst_gl_view_convert_reset (GstGLViewConvert * viewconvert);
+void gst_gl_view_convert_set_context (GstGLViewConvert *viewconvert, GstGLContext * context);
+
+G_END_DECLS
+#endif /* _GST_GL_VIEW_CONVERT_H_ */
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index a35ca05..4f27cd0 100644
--- a/gst-libs/gst/gl/gstglwindow.c
+++ b/gst-libs/gst/gl/gstglwindow.c
@@ -77,12 +77,27 @@
 #define GST_GL_WINDOW_GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW, GstGLWindowPrivate))
 
+static void gst_gl_window_default_draw (GstGLWindow * window);
+static void gst_gl_window_default_run (GstGLWindow * window);
+static void gst_gl_window_default_quit (GstGLWindow * window);
 static void gst_gl_window_default_send_message (GstGLWindow * window,
     GstGLWindowCB callback, gpointer data);
+static void gst_gl_window_default_send_message_async (GstGLWindow * window,
+    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static gpointer gst_gl_window_navigation_thread (GstGLWindow * window);
+void gst_gl_window_run_navigation (GstGLWindow * window);
+void gst_gl_window_open_navigation (GstGLWindow * window);
+void gst_gl_window_close_navigation (GstGLWindow * window);
+void gst_gl_window_quit_navigation (GstGLWindow * window);
 
 struct _GstGLWindowPrivate
 {
-  GThread *gl_thread;
+  GMainContext *main_context;
+  GMainLoop *loop;
+  GThread *navigation_thread;
+
+  guint surface_width;
+  guint surface_height;
 
   gboolean alive;
 };
@@ -94,9 +109,6 @@
   GstGLWindow parent;
 
   guintptr handle;
-
-  GMainContext *main_context;
-  GMainLoop *loop;
 } GstGLDummyWindow;
 
 typedef struct _GstGLDummyWindowCass
@@ -106,21 +118,86 @@
 
 GstGLDummyWindow *gst_gl_dummy_window_new (void);
 
+enum
+{
+  SIGNAL_0,
+  EVENT_MOUSE_SIGNAL,
+  EVENT_KEY_SIGNAL,
+  LAST_SIGNAL
+};
+
+static guint gst_gl_window_signals[LAST_SIGNAL] = { 0 };
+
 GQuark
 gst_gl_window_error_quark (void)
 {
   return g_quark_from_static_string ("gst-gl-window-error-quark");
 }
 
+static gboolean
+gst_gl_window_default_open (GstGLWindow * window, GError ** error)
+{
+  GstGLWindowPrivate *priv = window->priv;
+
+  if (g_main_context_get_thread_default ()) {
+    if (priv->main_context)
+      g_main_context_unref (priv->main_context);
+    if (priv->loop)
+      g_main_loop_unref (priv->loop);
+    priv->main_context = g_main_context_ref_thread_default ();
+    priv->loop = NULL;
+    priv->alive = TRUE;
+  } else {
+    g_main_context_push_thread_default (priv->main_context);
+  }
+
+  return TRUE;
+}
+
+static void
+gst_gl_window_default_close (GstGLWindow * window)
+{
+  GstGLWindowPrivate *priv = window->priv;
+
+  if (!priv->loop) {
+    priv->alive = FALSE;
+    g_main_context_unref (priv->main_context);
+    priv->main_context = NULL;
+  } else {
+    g_main_context_pop_thread_default (priv->main_context);
+  }
+}
+
+static void
+_init_debug (void)
+{
+  static volatile gsize _init = 0;
+
+  if (g_once_init_enter (&_init)) {
+    GST_DEBUG_CATEGORY_INIT (gst_gl_window_debug, "glwindow", 0,
+        "glwindow element");
+    g_once_init_leave (&_init, 1);
+  }
+}
+
 static void
 gst_gl_window_init (GstGLWindow * window)
 {
-  window->priv = GST_GL_WINDOW_GET_PRIVATE (window);
+  GstGLWindowPrivate *priv = GST_GL_WINDOW_GET_PRIVATE (window);
+  window->priv = priv;
 
   g_mutex_init (&window->lock);
+  g_mutex_init (&window->nav_lock);
+  g_cond_init (&window->nav_create_cond);
+  g_cond_init (&window->nav_destroy_cond);
+  window->nav_created = FALSE;
+  window->nav_alive = FALSE;
   window->is_drawing = FALSE;
 
   g_weak_ref_init (&window->context_ref, NULL);
+
+  priv->main_context = g_main_context_new ();
+  priv->loop = g_main_loop_new (priv->main_context, FALSE);
 }
 
 static void
@@ -128,9 +205,51 @@
 {
   g_type_class_add_private (klass, sizeof (GstGLWindowPrivate));
 
+  klass->open = GST_DEBUG_FUNCPTR (gst_gl_window_default_open);
+  klass->close = GST_DEBUG_FUNCPTR (gst_gl_window_default_close);
+  klass->run = GST_DEBUG_FUNCPTR (gst_gl_window_default_run);
+  klass->quit = GST_DEBUG_FUNCPTR (gst_gl_window_default_quit);
+  klass->draw_unlocked = GST_DEBUG_FUNCPTR (gst_gl_window_default_draw);
+  klass->draw = GST_DEBUG_FUNCPTR (gst_gl_window_default_draw);
   klass->send_message = GST_DEBUG_FUNCPTR (gst_gl_window_default_send_message);
+  klass->send_message_async =
+      GST_DEBUG_FUNCPTR (gst_gl_window_default_send_message_async);
 
   G_OBJECT_CLASS (klass)->finalize = gst_gl_window_finalize;
+
+  /**
+   * GstGLWindow::mouse-event:
+   * @object: the #GstGLWindow
+   * @id: the name of the event
+   * @button: the id of the button
+   * @x: the x coordinate of the mouse event
+   * @y: the y coordinate of the mouse event
+   *
+   * Will be emitted when a mouse event is received by the GstGLwindow.
+   *
+   * Since: 1.6
+   */
+  gst_gl_window_signals[EVENT_MOUSE_SIGNAL] =
+      g_signal_new ("mouse-event", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
+
+  /**
+   * GstGLWindow::key-event:
+   * @object: the #GstGLWindow
+   * @id: the name of the event
+   * @key: the id of the key pressed
+   *
+   * Will be emitted when a key event is received by the GstGLwindow.
+   *
+   * Since: 1.6
+   */
+  gst_gl_window_signals[EVENT_KEY_SIGNAL] =
+      g_signal_new ("key-event", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
+
+  _init_debug ();
 }
 
 /**
@@ -146,22 +265,17 @@
 {
   GstGLWindow *window = NULL;
   const gchar *user_choice;
-  static volatile gsize _init = 0;
 
   g_return_val_if_fail (display != NULL, NULL);
 
-  if (g_once_init_enter (&_init)) {
-    GST_DEBUG_CATEGORY_INIT (gst_gl_window_debug, "glwindow", 0,
-        "glwindow element");
-    g_once_init_leave (&_init, 1);
-  }
+  _init_debug ();
 
   user_choice = g_getenv ("GST_GL_WINDOW");
   GST_INFO ("creating a window, user choice:%s", user_choice);
 
 #if GST_GL_HAVE_WINDOW_COCOA
   if (!window && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
-    window = GST_GL_WINDOW (gst_gl_window_cocoa_new ());
+    window = GST_GL_WINDOW (gst_gl_window_cocoa_new (display));
 #endif
 #if GST_GL_HAVE_WINDOW_X11
   if (!window && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
@@ -169,23 +283,23 @@
 #endif
 #if GST_GL_HAVE_WINDOW_WIN32
   if (!window && (!user_choice || g_strstr_len (user_choice, 5, "win32")))
-    window = GST_GL_WINDOW (gst_gl_window_win32_new ());
+    window = GST_GL_WINDOW (gst_gl_window_win32_new (display));
 #endif
 #if GST_GL_HAVE_WINDOW_WAYLAND
   if (!window && (!user_choice || g_strstr_len (user_choice, 7, "wayland")))
-    window = GST_GL_WINDOW (gst_gl_window_wayland_egl_new ());
+    window = GST_GL_WINDOW (gst_gl_window_wayland_egl_new (display));
 #endif
 #if GST_GL_HAVE_WINDOW_DISPMANX
   if (!window && (!user_choice || g_strstr_len (user_choice, 8, "dispmanx")))
-    window = GST_GL_WINDOW (gst_gl_window_dispmanx_egl_new ());
+    window = GST_GL_WINDOW (gst_gl_window_dispmanx_egl_new (display));
 #endif
 #if GST_GL_HAVE_WINDOW_ANDROID
   if (!window && (!user_choice || g_strstr_len (user_choice, 7, "android")))
-    window = GST_GL_WINDOW (gst_gl_window_android_egl_new ());
+    window = GST_GL_WINDOW (gst_gl_window_android_egl_new (display));
 #endif
 #if GST_GL_HAVE_WINDOW_EAGL
   if (!window && (!user_choice || g_strstr_len (user_choice, 4, "eagl")))
-    window = GST_GL_WINDOW (gst_gl_window_eagl_new ());
+    window = GST_GL_WINDOW (gst_gl_window_eagl_new (display));
 #endif
   if (!window) {
     /* subclass returned a NULL window */
@@ -197,6 +311,17 @@
 
   window->display = gst_object_ref (display);
 
+  g_mutex_lock (&window->nav_lock);
+
+  if (!window->nav_created) {
+    window->priv->navigation_thread = g_thread_new ("gstglnavigation",
+        (GThreadFunc) gst_gl_window_navigation_thread, window);
+
+    g_cond_wait (&window->nav_create_cond, &window->nav_lock);
+    window->nav_created = TRUE;
+  }
+  g_mutex_unlock (&window->nav_lock);
+
   return window;
 }
 
@@ -204,15 +329,77 @@
 gst_gl_window_finalize (GObject * object)
 {
   GstGLWindow *window = GST_GL_WINDOW (object);
+  GstGLWindowPrivate *priv = window->priv;
+
+  if (window->nav_alive) {
+    g_mutex_lock (&window->nav_lock);
+    GST_INFO ("send quit navigation loop");
+    gst_gl_window_quit_navigation (window);
+    while (window->nav_alive) {
+      g_cond_wait (&window->nav_destroy_cond, &window->nav_lock);
+    }
+    g_mutex_unlock (&window->nav_lock);
+  }
+
+  if (priv->loop)
+    g_main_loop_unref (priv->loop);
+
+  if (priv->main_context)
+    g_main_context_unref (priv->main_context);
 
   g_weak_ref_clear (&window->context_ref);
 
   g_mutex_clear (&window->lock);
+  g_mutex_clear (&window->nav_lock);
+  g_cond_clear (&window->nav_create_cond);
+  g_cond_clear (&window->nav_destroy_cond);
   gst_object_unref (window->display);
 
   G_OBJECT_CLASS (gst_gl_window_parent_class)->finalize (object);
 }
 
+typedef struct _GstSetWindowHandleCb
+{
+  GstGLWindow *window;
+  guintptr handle;
+} GstSetWindowHandleCb;
+
+static void
+_set_window_handle_cb (GstSetWindowHandleCb * data)
+{
+  GstGLContext *context = gst_gl_window_get_context (data->window);
+  GstGLWindowClass *window_class = GST_GL_WINDOW_GET_CLASS (data->window);
+  GThread *thread = NULL;
+
+  /* deactivate if necessary */
+  if (context) {
+    thread = gst_gl_context_get_thread (context);
+    if (thread) {
+      /* This is only thread safe iff the context thread == g_thread_self() */
+      g_assert (thread == g_thread_self ());
+      gst_gl_context_activate (context, FALSE);
+    }
+  }
+
+  window_class->set_window_handle (data->window, data->handle);
+
+  /* reactivate */
+  if (context && thread)
+    gst_gl_context_activate (context, TRUE);
+
+  if (context)
+    gst_object_unref (context);
+  if (thread)
+    g_thread_unref (thread);
+}
+
+static void
+_free_swh_cb (GstSetWindowHandleCb * data)
+{
+  gst_object_unref (data->window);
+  g_slice_free (GstSetWindowHandleCb, data);
+}
+
 /**
  * gst_gl_window_set_window_handle:
  * @window: a #GstGLWindow
@@ -227,27 +414,65 @@
 gst_gl_window_set_window_handle (GstGLWindow * window, guintptr handle)
 {
   GstGLWindowClass *window_class;
+  GstSetWindowHandleCb *data;
 
   g_return_if_fail (GST_GL_IS_WINDOW (window));
   g_return_if_fail (handle != 0);
   window_class = GST_GL_WINDOW_GET_CLASS (window);
   g_return_if_fail (window_class->set_window_handle != NULL);
 
-  window_class->set_window_handle (window, handle);
+  data = g_slice_new (GstSetWindowHandleCb);
+  data->window = gst_object_ref (window);
+  data->handle = handle;
+
+  /* FIXME: Move to a message which deactivates, calls implementation, activates */
+  gst_gl_window_send_message_async (window,
+      (GstGLWindowCB) _set_window_handle_cb, data,
+      (GDestroyNotify) _free_swh_cb);
+
+  /* window_class->set_window_handle (window, handle); */
 }
 
+static void
+draw_cb (gpointer data)
+{
+  GstGLWindow *window = GST_GL_WINDOW (data);
+  GstGLContext *context = gst_gl_window_get_context (window);
+  GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
+
+  if (window->queue_resize) {
+    guint width, height;
+
+    gst_gl_window_get_surface_dimensions (window, &width, &height);
+    gst_gl_window_resize (window, width, height);
+  }
+
+  if (window->draw)
+    window->draw (window->draw_data);
+
+  if (context_class->swap_buffers)
+    context_class->swap_buffers (context);
+
+  gst_object_unref (context);
+}
+
+static void
+gst_gl_window_default_draw (GstGLWindow * window)
+{
+  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window);
+}
+
+
 /**
  * gst_gl_window_draw_unlocked:
  * @window: a #GstGLWindow
- * @width: requested width of the window
- * @height: requested height of the window
  *
  * Redraw the window contents.  Implementations should invoke the draw callback.
  *
  * Since: 1.4
  */
 void
-gst_gl_window_draw_unlocked (GstGLWindow * window, guint width, guint height)
+gst_gl_window_draw_unlocked (GstGLWindow * window)
 {
   GstGLWindowClass *window_class;
 
@@ -255,21 +480,21 @@
   window_class = GST_GL_WINDOW_GET_CLASS (window);
   g_return_if_fail (window_class->draw_unlocked != NULL);
 
-  window_class->draw_unlocked (window, width, height);
+  window_class->draw_unlocked (window);
+
+  window->queue_resize = FALSE;
 }
 
 /**
  * gst_gl_window_draw:
  * @window: a #GstGLWindow
- * @width: requested width of the window
- * @height: requested height of the window
  *
  * Redraw the window contents.  Implementations should invoke the draw callback.
  *
  * Since: 1.4
  */
 void
-gst_gl_window_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_draw (GstGLWindow * window)
 {
   GstGLWindowClass *window_class;
 
@@ -282,7 +507,58 @@
     return;
   }
 
-  window_class->draw (window, width, height);
+  window_class->draw (window);
+
+  window->queue_resize = FALSE;
+}
+
+/**
+ * gst_gl_window_set_preferred_size:
+ * @window: a #GstGLWindow
+ * @width: new preferred width
+ * @height: new preferred height
+ *
+ * Set the preferred width and height of the window.  Implementations are free
+ * to ignore this information.
+ *
+ * Since: 1.6
+ */
+void
+gst_gl_window_set_preferred_size (GstGLWindow * window, gint width, gint height)
+{
+  GstGLWindowClass *window_class;
+
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  window_class = GST_GL_WINDOW_GET_CLASS (window);
+
+  if (window_class->set_preferred_size)
+    window_class->set_preferred_size (window, width, height);
+}
+
+/**
+ * gst_gl_window_show:
+ * @window: a #GstGLWindow
+ *
+ * Present the window to the screen.
+ *
+ * Since: 1.6
+ */
+void
+gst_gl_window_show (GstGLWindow * window)
+{
+  GstGLWindowClass *window_class;
+
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  window_class = GST_GL_WINDOW_GET_CLASS (window);
+
+  if (window_class->show)
+    window_class->show (window);
+}
+
+static void
+gst_gl_window_default_run (GstGLWindow * window)
+{
+  g_main_loop_run (window->priv->loop);
 }
 
 /**
@@ -307,6 +583,29 @@
 }
 
 /**
+ * gst_gl_window_run_navigation:
+ * @window: a #GstGLWindow
+ *
+ * Start the execution of the navigation runloop.
+ *
+ * Since: 1.6
+ */
+void
+gst_gl_window_run_navigation (GstGLWindow * window)
+{
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  g_return_if_fail (window->navigation_context != NULL);
+  g_return_if_fail (window->navigation_loop != NULL);
+  g_main_loop_run (window->navigation_loop);
+}
+
+static void
+gst_gl_window_default_quit (GstGLWindow * window)
+{
+  g_main_loop_quit (window->priv->loop);
+}
+
+/**
  * gst_gl_window_quit:
  * @window: a #GstGLWindow
  *
@@ -408,6 +707,42 @@
   window_class->send_message (window, callback, data);
 }
 
+typedef struct _GstGLAsyncMessage
+{
+  GstGLWindowCB callback;
+  gpointer data;
+  GDestroyNotify destroy;
+} GstGLAsyncMessage;
+
+static gboolean
+_run_message_async (GstGLAsyncMessage * message)
+{
+  if (message->callback)
+    message->callback (message->data);
+
+  if (message->destroy)
+    message->destroy (message->data);
+
+  g_slice_free (GstGLAsyncMessage, message);
+
+  return FALSE;
+}
+
+static void
+gst_gl_window_default_send_message_async (GstGLWindow * window,
+    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
+{
+  GstGLWindowPrivate *priv = window->priv;
+  GstGLAsyncMessage *message = g_slice_new (GstGLAsyncMessage);
+
+  message->callback = callback;
+  message->data = data;
+  message->destroy = destroy;
+
+  g_main_context_invoke (priv->main_context, (GSourceFunc) _run_message_async,
+      message);
+}
+
 /**
  * gst_gl_window_send_message_async:
  * @window: a #GstGLWindow
@@ -532,7 +867,9 @@
 gboolean
 gst_gl_window_is_running (GstGLWindow * window)
 {
-  return window->priv->alive;
+  GstGLWindowPrivate *priv = window->priv;
+  return priv->alive && (!priv->loop
+      || g_main_loop_is_running (window->priv->loop));
 }
 
 /**
@@ -591,83 +928,74 @@
   return (GstGLContext *) g_weak_ref_get (&window->context_ref);
 }
 
+/**
+ * gst_gl_window_get_surface_dimensions:
+ * @window: a #GstGLWindow
+ * @width: (out): resulting surface width
+ * @height: (out): resulting surface height
+ *
+ * Since: 1.6
+ */
+void
+gst_gl_window_get_surface_dimensions (GstGLWindow * window, guint * width,
+    guint * height)
+{
+  if (width)
+    *width = window->priv->surface_width;
+  if (height)
+    *height = window->priv->surface_height;
+}
+
 GType gst_gl_dummy_window_get_type (void);
 
 G_DEFINE_TYPE (GstGLDummyWindow, gst_gl_dummy_window, GST_GL_TYPE_WINDOW);
 
-static gboolean
-gst_gl_dummy_window_open (GstGLWindow * window, GError ** error)
+void
+gst_gl_window_open_navigation (GstGLWindow * window)
 {
-  GstGLDummyWindow *dummy = (GstGLDummyWindow *) window;
-
-  dummy->main_context = g_main_context_new ();
-  dummy->loop = g_main_loop_new (dummy->main_context, FALSE);
-
-  return TRUE;
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  g_mutex_lock (&window->nav_lock);
+  window->navigation_context = g_main_context_new ();
+  window->navigation_loop = g_main_loop_new (window->navigation_context, FALSE);
+  g_main_context_push_thread_default (window->navigation_context);
+  window->nav_alive = TRUE;
+  g_cond_signal (&window->nav_create_cond);
+  g_mutex_unlock (&window->nav_lock);
 }
 
-static void
-gst_gl_dummy_window_close (GstGLWindow * window)
+void
+gst_gl_window_close_navigation (GstGLWindow * window)
 {
-  GstGLDummyWindow *dummy = (GstGLDummyWindow *) window;
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  g_return_if_fail (window->navigation_context != NULL);
+  g_return_if_fail (window->navigation_loop != NULL);
 
-  g_main_loop_unref (dummy->loop);
-  g_main_context_unref (dummy->main_context);
+  g_mutex_lock (&window->nav_lock);
+  window->nav_alive = FALSE;
+  g_main_context_pop_thread_default (window->navigation_context);
+  g_main_loop_unref (window->navigation_loop);
+  g_main_context_unref (window->navigation_context);
+  g_cond_signal (&window->nav_destroy_cond);
+  g_mutex_unlock (&window->nav_lock);
 }
 
-static void
-gst_gl_dummy_window_quit (GstGLWindow * window)
+void
+gst_gl_window_quit_navigation (GstGLWindow * window)
 {
-  GstGLDummyWindow *dummy = (GstGLDummyWindow *) window;
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
 
-  g_main_loop_quit (dummy->loop);
+  g_main_loop_quit (window->navigation_loop);
 }
 
-static void
-gst_gl_dummy_window_run (GstGLWindow * window)
+static gpointer
+gst_gl_window_navigation_thread (GstGLWindow * window)
 {
-  GstGLDummyWindow *dummy = (GstGLDummyWindow *) window;
+  gst_gl_window_open_navigation (window);
+  gst_gl_window_run_navigation (window);
+  GST_INFO ("navigation loop exited\n");
+  gst_gl_window_close_navigation (window);
 
-  g_main_loop_run (dummy->loop);
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_dummy_window_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLDummyWindow *dummy;
-  GstGLMessage *message;
-
-  dummy = (GstGLDummyWindow *) window;
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (dummy->main_context, (GSourceFunc) _run_message,
-      message);
+  return NULL;
 }
 
 static void
@@ -686,41 +1014,6 @@
   return (guintptr) dummy->handle;
 }
 
-struct draw
-{
-  GstGLDummyWindow *window;
-  guint width, height;
-};
-
-static void
-draw_cb (gpointer data)
-{
-  struct draw *draw_data = data;
-  GstGLDummyWindow *dummy = draw_data->window;
-  GstGLWindow *window = GST_GL_WINDOW (dummy);
-  GstGLContext *context = gst_gl_window_get_context (window);
-  GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
-
-  if (window->draw)
-    window->draw (window->draw_data);
-
-  context_class->swap_buffers (context);
-
-  gst_object_unref (context);
-}
-
-static void
-gst_gl_dummy_window_draw (GstGLWindow * window, guint width, guint height)
-{
-  struct draw draw_data;
-
-  draw_data.window = (GstGLDummyWindow *) window;
-  draw_data.width = width;
-  draw_data.height = height;
-
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
-}
-
 static guintptr
 gst_gl_dummy_window_get_display (GstGLWindow * window)
 {
@@ -738,14 +1031,6 @@
       GST_DEBUG_FUNCPTR (gst_gl_dummy_window_get_window_handle);
   window_class->set_window_handle =
       GST_DEBUG_FUNCPTR (gst_gl_dummy_window_set_window_handle);
-  window_class->draw_unlocked = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_draw);
-  window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_dummy_window_send_message_async);
-  window_class->open = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_open);
-  window_class->close = GST_DEBUG_FUNCPTR (gst_gl_dummy_window_close);
 }
 
 static void
@@ -759,3 +1044,127 @@
 {
   return g_object_new (gst_gl_dummy_window_get_type (), NULL);
 }
+
+gboolean
+gst_gl_window_key_event_cb (gpointer data)
+{
+  struct key_event *key_data = (struct key_event *) data;
+  GST_DEBUG
+      ("%s called data struct %p window %p key %s event %s ",
+      __func__, key_data, key_data->window, key_data->key_str,
+      key_data->event_type);
+  gst_gl_window_send_key_event (GST_GL_WINDOW (key_data->window),
+      key_data->event_type, key_data->key_str);
+  g_slice_free (struct key_event, key_data);
+  return G_SOURCE_REMOVE;
+}
+
+void
+gst_gl_window_send_key_event (GstGLWindow * window, const char *event_type,
+    const char *key_str)
+{
+  g_signal_emit (window, gst_gl_window_signals[EVENT_KEY_SIGNAL], 0,
+      event_type, key_str);
+}
+
+gboolean
+gst_gl_window_mouse_event_cb (gpointer data)
+{
+  struct mouse_event *mouse_data = (struct mouse_event *) data;
+  GST_DEBUG ("%s called data struct %p mouse event %s button %d at %g, %g",
+      __func__, mouse_data, mouse_data->event_type, mouse_data->button,
+      mouse_data->posx, mouse_data->posy);
+  gst_gl_window_send_mouse_event (GST_GL_WINDOW (mouse_data->window),
+      mouse_data->event_type, mouse_data->button, mouse_data->posx,
+      mouse_data->posy);
+  g_slice_free (struct mouse_event, mouse_data);
+  return G_SOURCE_REMOVE;
+}
+
+void
+gst_gl_window_send_mouse_event (GstGLWindow * window, const char *event_type,
+    int button, double posx, double posy)
+{
+  g_signal_emit (window, gst_gl_window_signals[EVENT_MOUSE_SIGNAL], 0,
+      event_type, button, posx, posy);
+}
+
+/**
+ * gst_gl_window_handle_events:
+ * @window: a #GstGLWindow
+ * @handle_events: a #gboolean indicating if events should be handled or not.
+ *
+ * Tell a @window that it should handle events from the window system. These
+ * events are forwarded upstream as navigation events. In some window systems
+ * events are not propagated in the window hierarchy if a client is listening
+ * for them. This method allows you to disable events handling completely
+ * from the @window.
+ */
+void
+gst_gl_window_handle_events (GstGLWindow * window, gboolean handle_events)
+{
+  GstGLWindowClass *window_class;
+
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  window_class = GST_GL_WINDOW_GET_CLASS (window);
+
+  if (window_class->handle_events)
+    window_class->handle_events (window, handle_events);
+}
+
+/**
+ * gst_gl_window_set_render_rectangle:
+ * @window: a #GstGLWindow
+ * @x: x position
+ * @y: y position
+ * @width: width
+ * @height: height
+ *
+ * Tell a @window that it should render into a specific region of the window
+ * according to the #GstVideoOverlay interface.
+ *
+ * Returns: whether the specified region could be set
+ */
+gboolean
+gst_gl_window_set_render_rectangle (GstGLWindow * window, gint x, gint y,
+    gint width, gint height)
+{
+  GstGLWindowClass *window_class;
+  gboolean ret = FALSE;
+
+  g_return_val_if_fail (GST_GL_IS_WINDOW (window), FALSE);
+  window_class = GST_GL_WINDOW_GET_CLASS (window);
+
+  if (x < 0 || y < 0 || width <= 0 || height <= 0)
+    return FALSE;
+
+  if (window_class->set_render_rectangle)
+    ret = window_class->set_render_rectangle (window, x, y, width, height);
+
+  return ret;
+}
+
+void
+gst_gl_window_queue_resize (GstGLWindow * window)
+{
+  GstGLWindowClass *window_class;
+
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+  window_class = GST_GL_WINDOW_GET_CLASS (window);
+
+  window->queue_resize = TRUE;
+  if (window_class->queue_resize)
+    window_class->queue_resize (window);
+}
+
+void
+gst_gl_window_resize (GstGLWindow * window, guint width, guint height)
+{
+  g_return_if_fail (GST_GL_IS_WINDOW (window));
+
+  if (window->resize)
+    window->resize (window->resize_data, width, height);
+
+  window->priv->surface_width = width;
+  window->priv->surface_height = height;
+}
diff --git a/gst-libs/gst/gl/gstglwindow.h b/gst-libs/gst/gl/gstglwindow.h
index 518661f..e4781c7 100644
--- a/gst-libs/gst/gl/gstglwindow.h
+++ b/gst-libs/gst/gl/gstglwindow.h
@@ -32,7 +32,7 @@
 
 #define GST_GL_TYPE_WINDOW         (gst_gl_window_get_type())
 #define GST_GL_WINDOW(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW, GstGLWindow))
-#define GST_GL_WINDOW_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW, GstGLWindowClass))
+#define GST_GL_WINDOW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GST_GL_TYPE_WINDOW, GstGLWindowClass))
 #define GST_GL_IS_WINDOW(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW))
 #define GST_GL_IS_WINDOW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW))
 #define GST_GL_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW, GstGLWindowClass))
@@ -67,6 +67,11 @@
   GstObject parent;
 
   GMutex        lock;
+  GMutex        nav_lock;
+  GCond         nav_create_cond;
+  GCond         nav_destroy_cond;
+  gboolean      nav_created;
+  gboolean      nav_alive;
 
   GstGLDisplay *display;
   GWeakRef      context_ref;
@@ -85,10 +90,15 @@
   gpointer              resize_data;
   GDestroyNotify        resize_notify;
 
+  gboolean              queue_resize;
+
   /*< private >*/
-  gpointer _reserved[GST_PADDING];
+  GMainContext *navigation_context;
+  GMainLoop *navigation_loop;
 
   GstGLWindowPrivate *priv;
+
+  gpointer _reserved[GST_PADDING];
 };
 
 /**
@@ -107,6 +117,13 @@
  *                      not have been called.  Required to be reentrant.
  * @open: open the connection to the display
  * @close: close the connection to the display
+ * @get_surface_dimensions: get the width and height of the surface we are
+ *                          rendering into.
+ * @handle_events: whether to handle 'extra' events from the windowing system.
+ *                 Basic events like surface moves and resizes are still valid
+ *                 things to listen for.
+ * @set_preferred_size: request that the window change surface size.  The
+ *                      implementation is free to ignore this information.
  */
 struct _GstGLWindowClass {
   GstObjectClass parent_class;
@@ -114,8 +131,8 @@
   guintptr (*get_display)        (GstGLWindow *window);
   void     (*set_window_handle)  (GstGLWindow *window, guintptr id);
   guintptr (*get_window_handle)  (GstGLWindow *window);
-  void     (*draw_unlocked)      (GstGLWindow *window, guint width, guint height);
-  void     (*draw)               (GstGLWindow *window, guint width, guint height);
+  void     (*draw_unlocked)      (GstGLWindow *window);
+  void     (*draw)               (GstGLWindow *window);
   void     (*run)                (GstGLWindow *window);
   void     (*quit)               (GstGLWindow *window);
   void     (*send_message)       (GstGLWindow *window, GstGLWindowCB callback, gpointer data);
@@ -123,35 +140,102 @@
 
   gboolean (*open)               (GstGLWindow *window, GError **error);
   void     (*close)              (GstGLWindow *window);
+  void     (*handle_events)      (GstGLWindow *window, gboolean handle_events);
+  void     (*set_preferred_size) (GstGLWindow *window, gint width, gint height);
+  void     (*show)               (GstGLWindow *window);
+  gboolean (*set_render_rectangle)(GstGLWindow *window, gint x, gint y, gint width, gint height);
+  void     (*queue_resize)       (GstGLWindow *window);
 
   /*< private >*/
   gpointer _reserved[GST_PADDING];
 };
 
-/* methods */
+struct key_event
+{
+  GstGLWindow *window;
+  const char *event_type;
+  const char *key_str;
+};
+
+struct mouse_event
+{
+  GstGLWindow *window;
+  const char *event_type;
+  int button;
+  double posx;
+  double posy;
+};
 
 GQuark gst_gl_window_error_quark (void);
 GType gst_gl_window_get_type     (void);
 
 GstGLWindow * gst_gl_window_new  (GstGLDisplay *display);
 
-void     gst_gl_window_set_draw_callback    (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy_notify);
-void     gst_gl_window_set_resize_callback  (GstGLWindow *window, GstGLWindowResizeCB callback, gpointer data, GDestroyNotify destroy_notify);
-void     gst_gl_window_set_close_callback   (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy_notify);
+/* callbacks */
+void     gst_gl_window_set_draw_callback    (GstGLWindow *window,
+                                             GstGLWindowCB callback,
+                                             gpointer data,
+                                             GDestroyNotify destroy_notify);
+void     gst_gl_window_set_resize_callback  (GstGLWindow *window,
+                                             GstGLWindowResizeCB callback,
+                                             gpointer data,
+                                             GDestroyNotify destroy_notify);
+void     gst_gl_window_set_close_callback   (GstGLWindow *window,
+                                             GstGLWindowCB callback,
+                                             gpointer data,
+                                             GDestroyNotify destroy_notify);
 
 void     gst_gl_window_set_window_handle    (GstGLWindow *window, guintptr handle);
 guintptr gst_gl_window_get_window_handle    (GstGLWindow *window);
-void     gst_gl_window_draw_unlocked        (GstGLWindow *window, guint width, guint height);
-void     gst_gl_window_draw                 (GstGLWindow *window, guint width, guint height);
+
+/* loop/events */
 void     gst_gl_window_run                  (GstGLWindow *window);
 void     gst_gl_window_quit                 (GstGLWindow *window);
-void     gst_gl_window_send_message         (GstGLWindow *window, GstGLWindowCB callback, gpointer data);
-void     gst_gl_window_send_message_async   (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
-guintptr gst_gl_window_get_display          (GstGLWindow *window);
+gboolean gst_gl_window_is_running           (GstGLWindow *window);
+void     gst_gl_window_send_message         (GstGLWindow *window,
+                                             GstGLWindowCB callback,
+                                             gpointer data);
+void     gst_gl_window_send_message_async   (GstGLWindow *window,
+                                             GstGLWindowCB callback,
+                                             gpointer data,
+                                             GDestroyNotify destroy);
 
-GstGLContext * gst_gl_window_get_context (GstGLWindow *window);
+/* navigation */
+void     gst_gl_window_handle_events        (GstGLWindow * window,
+                                             gboolean handle_events);
+gboolean gst_gl_window_key_event_cb         (gpointer data);
+gboolean gst_gl_window_mouse_event_cb       (gpointer data);
+void     gst_gl_window_send_key_event       (GstGLWindow * window,
+                                             const char * event_type,
+                                             const char * key_str);
+void     gst_gl_window_send_mouse_event     (GstGLWindow * window,
+                                             const char * event_type,
+                                             int button,
+                                             double posx,
+                                             double posy);
 
-gboolean gst_gl_window_is_running (GstGLWindow *window);
+/* surfaces/rendering */
+void     gst_gl_window_queue_resize         (GstGLWindow *window);
+void     gst_gl_window_draw_unlocked        (GstGLWindow *window);
+void     gst_gl_window_draw                 (GstGLWindow *window);
+void     gst_gl_window_show                 (GstGLWindow *window);
+void     gst_gl_window_set_preferred_size   (GstGLWindow * window,
+                                             gint width,
+                                             gint height);
+void     gst_gl_window_get_surface_dimensions (GstGLWindow * window,
+                                               guint * width,
+                                               guint * height);
+gboolean gst_gl_window_set_render_rectangle   (GstGLWindow * window,
+                                               gint x,
+                                               gint y,
+                                               gint width,
+                                               gint height);
+
+/* subclass usage only */
+void     gst_gl_window_resize               (GstGLWindow *window, guint width, guint height);
+
+GstGLContext * gst_gl_window_get_context    (GstGLWindow *window);
+guintptr       gst_gl_window_get_display    (GstGLWindow *window);
 
 GST_DEBUG_CATEGORY_EXTERN (gst_gl_window_debug);
 
diff --git a/gst-libs/gst/gl/utils/opengl_versions.h b/gst-libs/gst/gl/utils/opengl_versions.h
new file mode 100644
index 0000000..beeeab6
--- /dev/null
+++ b/gst-libs/gst/gl/utils/opengl_versions.h
@@ -0,0 +1,53 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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 _OPENGL_VERSIONS_H_
+#define _OPENGL_VERSIONS_H_
+
+/* list of known OpenGL versions */
+/* *INDENT-OFF* */
+static const struct { int major, minor; } opengl_versions[] = {
+   {4, 5},
+   {4, 4},
+   {4, 3},
+   {4, 2},
+   {4, 1},
+   {4, 0},
+
+   {3, 3},
+   {3, 2},
+   {3, 1},
+   {3, 0},
+
+   {2, 1},
+   {2, 0},
+
+   {1, 5},
+   {1, 4},
+   {1, 3},
+   {1, 2},
+   {1, 1},
+   {1, 0},
+
+   {0, 0} /* end of list */
+};
+/* *INDENT-ON* */
+
+#endif /* _OPENGL_VERSIONS_H_ */
diff --git a/gst-libs/gst/gl/wayland/Makefile.am b/gst-libs/gst/gl/wayland/Makefile.am
index 9006e67..1b284fb 100644
--- a/gst-libs/gst/gl/wayland/Makefile.am
+++ b/gst-libs/gst/gl/wayland/Makefile.am
@@ -3,10 +3,12 @@
 noinst_LTLIBRARIES = libgstgl-wayland.la
 
 libgstgl_wayland_la_SOURCES = \
+	gstgldisplay_wayland.c \
 	gstglwindow_wayland_egl.c \
 	wayland_event_source.c
 
 noinst_HEADERS = \
+	gstgldisplay_wayland.h \
 	gstglwindow_wayland_egl.h \
 	wayland_event_source.h
 
diff --git a/gst-libs/gst/gl/wayland/Makefile.in b/gst-libs/gst/gl/wayland/Makefile.in
index 8ff9ecf..f713f9a 100644
--- a/gst-libs/gst/gl/wayland/Makefile.in
+++ b/gst-libs/gst/gl/wayland/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/gl/wayland
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -127,6 +137,7 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libgstgl_wayland_la_LIBADD =
 am_libgstgl_wayland_la_OBJECTS =  \
+	libgstgl_wayland_la-gstgldisplay_wayland.lo \
 	libgstgl_wayland_la-gstglwindow_wayland_egl.lo \
 	libgstgl_wayland_la-wayland_event_source.lo
 libgstgl_wayland_la_OBJECTS = $(am_libgstgl_wayland_la_OBJECTS)
@@ -199,6 +210,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +228,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +256,6 @@
 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@
@@ -256,7 +268,6 @@
 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@
@@ -264,6 +275,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +303,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +329,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +387,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +411,6 @@
 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@
@@ -402,7 +419,6 @@
 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@
@@ -415,7 +431,6 @@
 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@
@@ -429,6 +444,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +456,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +496,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +532,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +565,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +575,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +611,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +622,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +653,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +679,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +718,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -698,10 +734,12 @@
 wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-wayland.la
 libgstgl_wayland_la_SOURCES = \
+	gstgldisplay_wayland.c \
 	gstglwindow_wayland_egl.c \
 	wayland_event_source.c
 
 noinst_HEADERS = \
+	gstgldisplay_wayland.h \
 	gstglwindow_wayland_egl.h \
 	wayland_event_source.h
 
@@ -733,7 +771,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/wayland/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/wayland/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -772,6 +809,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_wayland_la-gstgldisplay_wayland.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_wayland_la-gstglwindow_wayland_egl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_wayland_la-wayland_event_source.Plo@am__quote@
 
@@ -799,6 +837,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
+libgstgl_wayland_la-gstgldisplay_wayland.lo: gstgldisplay_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) $(libgstgl_wayland_la_CFLAGS) $(CFLAGS) -MT libgstgl_wayland_la-gstgldisplay_wayland.lo -MD -MP -MF $(DEPDIR)/libgstgl_wayland_la-gstgldisplay_wayland.Tpo -c -o libgstgl_wayland_la-gstgldisplay_wayland.lo `test -f 'gstgldisplay_wayland.c' || echo '$(srcdir)/'`gstgldisplay_wayland.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_wayland_la-gstgldisplay_wayland.Tpo $(DEPDIR)/libgstgl_wayland_la-gstgldisplay_wayland.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgldisplay_wayland.c' object='libgstgl_wayland_la-gstgldisplay_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) $(libgstgl_wayland_la_CFLAGS) $(CFLAGS) -c -o libgstgl_wayland_la-gstgldisplay_wayland.lo `test -f 'gstgldisplay_wayland.c' || echo '$(srcdir)/'`gstgldisplay_wayland.c
+
 libgstgl_wayland_la-gstglwindow_wayland_egl.lo: gstglwindow_wayland_egl.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_wayland_la_CFLAGS) $(CFLAGS) -MT libgstgl_wayland_la-gstglwindow_wayland_egl.lo -MD -MP -MF $(DEPDIR)/libgstgl_wayland_la-gstglwindow_wayland_egl.Tpo -c -o libgstgl_wayland_la-gstglwindow_wayland_egl.lo `test -f 'gstglwindow_wayland_egl.c' || echo '$(srcdir)/'`gstglwindow_wayland_egl.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_wayland_la-gstglwindow_wayland_egl.Tpo $(DEPDIR)/libgstgl_wayland_la-gstglwindow_wayland_egl.Plo
@@ -1022,6 +1067,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c
new file mode 100644
index 0000000..c5c5094
--- /dev/null
+++ b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c
@@ -0,0 +1,160 @@
+/*
+ * GStreamer
+ * Copyright (C) 2013 Matthew Waters <ystreet00@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 <gst/gl/wayland/gstgldisplay_wayland.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
+#define GST_CAT_DEFAULT gst_gl_display_debug
+
+G_DEFINE_TYPE (GstGLDisplayWayland, gst_gl_display_wayland,
+    GST_TYPE_GL_DISPLAY);
+
+static void gst_gl_display_wayland_finalize (GObject * object);
+static guintptr gst_gl_display_wayland_get_handle (GstGLDisplay * display);
+
+static void
+registry_handle_global (void *data, struct wl_registry *registry,
+    uint32_t name, const char *interface, uint32_t version)
+{
+  GstGLDisplayWayland *display = data;
+
+  GST_TRACE_OBJECT (display, "registry_handle_global with registry %p, "
+      "interface %s, version %u", registry, interface, version);
+
+  if (g_strcmp0 (interface, "wl_compositor") == 0) {
+    display->compositor =
+        wl_registry_bind (registry, name, &wl_compositor_interface, 1);
+  } else if (g_strcmp0 (interface, "wl_subcompositor") == 0) {
+    display->subcompositor =
+        wl_registry_bind (registry, name, &wl_subcompositor_interface, 1);
+  } else if (g_strcmp0 (interface, "wl_shell") == 0) {
+    display->shell = wl_registry_bind (registry, name, &wl_shell_interface, 1);
+  }
+}
+
+static const struct wl_registry_listener registry_listener = {
+  registry_handle_global
+};
+
+static void
+_connect_listeners (GstGLDisplayWayland * display)
+{
+  display->registry = wl_display_get_registry (display->display);
+  wl_registry_add_listener (display->registry, &registry_listener, display);
+
+  wl_display_roundtrip (display->display);
+}
+
+static void
+gst_gl_display_wayland_class_init (GstGLDisplayWaylandClass * klass)
+{
+  GST_GL_DISPLAY_CLASS (klass)->get_handle =
+      GST_DEBUG_FUNCPTR (gst_gl_display_wayland_get_handle);
+
+  G_OBJECT_CLASS (klass)->finalize = gst_gl_display_wayland_finalize;
+}
+
+static void
+gst_gl_display_wayland_init (GstGLDisplayWayland * display_wayland)
+{
+  GstGLDisplay *display = (GstGLDisplay *) display_wayland;
+
+  display->type = GST_GL_DISPLAY_TYPE_WAYLAND;
+  display_wayland->foreign_display = FALSE;
+}
+
+static void
+gst_gl_display_wayland_finalize (GObject * object)
+{
+  GstGLDisplayWayland *display_wayland = GST_GL_DISPLAY_WAYLAND (object);
+
+  if (!display_wayland->foreign_display && display_wayland->display) {
+    wl_display_flush (display_wayland->display);
+    wl_display_disconnect (display_wayland->display);
+  }
+
+  G_OBJECT_CLASS (gst_gl_display_wayland_parent_class)->finalize (object);
+}
+
+/**
+ * gst_gl_display_wayland_new:
+ * @name: (allow-none): a display name
+ *
+ * Create a new #GstGLDisplayWayland from the wayland display name.  See wl_display_connect()
+ * for details on what is a valid name.
+ *
+ * Returns: (transfer full): a new #GstGLDisplayWayland or %NULL
+ */
+GstGLDisplayWayland *
+gst_gl_display_wayland_new (const gchar * name)
+{
+  GstGLDisplayWayland *ret;
+
+  GST_DEBUG_CATEGORY_GET (gst_gl_display_debug, "gldisplay");
+
+  ret = g_object_new (GST_TYPE_GL_DISPLAY_WAYLAND, NULL);
+  ret->display = wl_display_connect (name);
+
+  if (!ret->display) {
+    GST_ERROR ("Failed to open X11 display connection with name, \'%s\'", name);
+    return NULL;
+  }
+
+  _connect_listeners (ret);
+
+  return ret;
+}
+
+/**
+ * gst_gl_display_wayland_new_with_display:
+ * @display: an existing, wayland display
+ *
+ * Creates a new display connection from a wl_display Display.
+ *
+ * Returns: (transfer full): a new #GstGLDisplayWayland
+ */
+GstGLDisplayWayland *
+gst_gl_display_wayland_new_with_display (struct wl_display * display)
+{
+  GstGLDisplayWayland *ret;
+
+  g_return_val_if_fail (display != NULL, NULL);
+
+  GST_DEBUG_CATEGORY_GET (gst_gl_display_debug, "gldisplay");
+
+  ret = g_object_new (GST_TYPE_GL_DISPLAY_WAYLAND, NULL);
+
+  ret->display = display;
+  ret->foreign_display = TRUE;
+
+  _connect_listeners (ret);
+
+  return ret;
+}
+
+static guintptr
+gst_gl_display_wayland_get_handle (GstGLDisplay * display)
+{
+  return (guintptr) GST_GL_DISPLAY_WAYLAND (display)->display;
+}
diff --git a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h
new file mode 100644
index 0000000..3612c78
--- /dev/null
+++ b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h
@@ -0,0 +1,75 @@
+/*
+ * GStreamer
+ * Copyright (C) 2013 Matthew Waters <ystreet00@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_DISPLAY_WAYLAND_H__
+#define __GST_GL_DISPLAY_WAYLAND_H__
+
+#include <gst/gst.h>
+
+#include <wayland-client.h>
+
+#include <gst/gl/gstgl_fwd.h>
+#include <gst/gl/gstgldisplay.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_display_wayland_get_type (void);
+
+#define GST_TYPE_GL_DISPLAY_WAYLAND             (gst_gl_display_wayland_get_type())
+#define GST_GL_DISPLAY_WAYLAND(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY_WAYLAND,GstGLDisplayWayland))
+#define GST_GL_DISPLAY_WAYLAND_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_DISPLAY_WAYLAND,GstGLDisplayWaylandClass))
+#define GST_IS_GL_DISPLAY_WAYLAND(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY_WAYLAND))
+#define GST_IS_GL_DISPLAY_WAYLAND_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY_WAYLAND))
+#define GST_GL_DISPLAY_WAYLAND_CAST(obj)        ((GstGLDisplayWayland*)(obj))
+
+typedef struct _GstGLDisplayWayland GstGLDisplayWayland;
+typedef struct _GstGLDisplayWaylandClass GstGLDisplayWaylandClass;
+
+/**
+ * GstGLDisplayWayland:
+ *
+ * the contents of a #GstGLDisplayWayland are private and should only be accessed
+ * through the provided API
+ */
+struct _GstGLDisplayWayland
+{
+  GstGLDisplay            parent;
+
+  struct wl_display       *display;
+  struct wl_registry      *registry;
+  struct wl_compositor    *compositor;
+  struct wl_subcompositor *subcompositor;
+  struct wl_shell         *shell;
+
+  /* <private> */
+  gboolean foreign_display;
+};
+
+struct _GstGLDisplayWaylandClass
+{
+  GstGLDisplayClass object_class;
+};
+
+GstGLDisplayWayland *gst_gl_display_wayland_new (const gchar * name);
+GstGLDisplayWayland *gst_gl_display_wayland_new_with_display (struct wl_display *display);
+
+G_END_DECLS
+
+#endif /* __GST_GL_DISPLAY_WAYLAND_H__ */
diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
index d5853b0..b34ad42 100644
--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
+++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
@@ -32,6 +32,7 @@
 #include "../gstgl_fwd.h"
 #include <gst/gl/gstglcontext.h>
 
+#include "gstgldisplay_wayland.h"
 #include "gstglwindow_wayland_egl.h"
 
 const gchar *WlEGLErrorString ();
@@ -46,17 +47,16 @@
     window);
 static void gst_gl_window_wayland_egl_set_window_handle (GstGLWindow * window,
     guintptr handle);
-static void gst_gl_window_wayland_egl_draw (GstGLWindow * window, guint width,
-    guint height);
-static void gst_gl_window_wayland_egl_run (GstGLWindow * window);
-static void gst_gl_window_wayland_egl_quit (GstGLWindow * window);
-static void gst_gl_window_wayland_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static void gst_gl_window_wayland_egl_show (GstGLWindow * window);
+static void gst_gl_window_wayland_egl_draw (GstGLWindow * window);
 static void gst_gl_window_wayland_egl_close (GstGLWindow * window);
 static gboolean gst_gl_window_wayland_egl_open (GstGLWindow * window,
     GError ** error);
 static guintptr gst_gl_window_wayland_egl_get_display (GstGLWindow * window);
+static gboolean gst_gl_window_wayland_egl_set_render_rectangle (GstGLWindow *
+    window, gint x, gint y, gint width, gint height);
 
+#if 0
 static void
 pointer_handle_enter (void *data, struct wl_pointer *pointer, uint32_t serial,
     struct wl_surface *surface, wl_fixed_t sx_w, wl_fixed_t sy_w)
@@ -91,6 +91,40 @@
 pointer_handle_motion (void *data, struct wl_pointer *pointer, uint32_t time,
     wl_fixed_t sx_w, wl_fixed_t sy_w)
 {
+  GstGLWindowWaylandEGL *window_egl = data;
+
+  window_egl->display.pointer_x = wl_fixed_to_double (sx_w);
+  window_egl->display.pointer_y = wl_fixed_to_double (sy_w);
+}
+
+enum wl_edges
+{
+  WL_EDGE_NONE = 0,
+  WL_EDGE_TOP = 1,
+  WL_EDGE_BOTTOM = 2,
+  WL_EDGE_LEFT = 4,
+  WL_EDGE_RIGHT = 8,
+};
+
+static guint
+_get_closest_pointer_corner (GstGLWindowWaylandEGL * window_egl)
+{
+  guint edges = 0;
+  gdouble win_width, win_height;
+  gdouble p_x, p_y;
+
+  win_width = (gdouble) window_egl->window.window_width;
+  win_height = (gdouble) window_egl->window.window_height;
+  p_x = window_egl->display.pointer_x;
+  p_y = window_egl->display.pointer_y;
+
+  if (win_width == 0.0 || win_height == 0.0)
+    return WL_EDGE_NONE;
+
+  edges |= win_width / 2.0 - p_x < 0.0 ? WL_EDGE_RIGHT : WL_EDGE_LEFT;
+  edges |= win_height / 2.0 - p_y < 0.0 ? WL_EDGE_BOTTOM : WL_EDGE_TOP;
+
+  return edges;
 }
 
 static void
@@ -98,11 +132,16 @@
     uint32_t time, uint32_t button, uint32_t state_w)
 {
   GstGLWindowWaylandEGL *window_egl = data;
+  guint edges = _get_closest_pointer_corner (window_egl);
   window_egl->display.serial = serial;
 
   if (button == BTN_LEFT && state_w == WL_POINTER_BUTTON_STATE_PRESSED)
     wl_shell_surface_move (window_egl->window.shell_surface,
         window_egl->display.seat, serial);
+
+  if (button == BTN_RIGHT && state_w == WL_POINTER_BUTTON_STATE_PRESSED)
+    wl_shell_surface_resize (window_egl->window.shell_surface,
+        window_egl->display.seat, serial, edges);
 }
 
 static void
@@ -149,11 +188,15 @@
 static const struct wl_seat_listener seat_listener = {
   seat_handle_capabilities,
 };
-
+#endif
 static void
 handle_ping (void *data, struct wl_shell_surface *shell_surface,
     uint32_t serial)
 {
+  GstGLWindowWaylandEGL *window_egl = data;
+
+  GST_TRACE_OBJECT (window_egl, "ping received serial %u", serial);
+
   wl_shell_surface_pong (shell_surface, serial);
 }
 
@@ -166,7 +209,8 @@
 {
   GstGLWindowWaylandEGL *window_egl = data;
 
-  GST_DEBUG ("configure event %ix%i", width, height);
+  GST_DEBUG ("configure event on surface %p, %ix%i", shell_surface, width,
+      height);
 
   window_resize (window_egl, width, height);
 }
@@ -182,84 +226,104 @@
   handle_popup_done
 };
 
-static gboolean
-create_surface (GstGLWindowWaylandEGL * window_egl)
-{
-  window_egl->window.surface =
-      wl_compositor_create_surface (window_egl->display.compositor);
-  window_egl->window.shell_surface =
-      wl_shell_get_shell_surface (window_egl->display.shell,
-      window_egl->window.surface);
-
-  wl_shell_surface_add_listener (window_egl->window.shell_surface,
-      &shell_surface_listener, window_egl);
-
-  if (window_egl->window.window_width <= 0)
-    window_egl->window.window_width = 320;
-  if (window_egl->window.window_height <= 0)
-    window_egl->window.window_height = 240;
-
-  window_egl->window.native =
-      wl_egl_window_create (window_egl->window.surface,
-      window_egl->window.window_width, window_egl->window.window_height);
-
-  wl_shell_surface_set_title (window_egl->window.shell_surface,
-      "OpenGL Renderer");
-
-  wl_shell_surface_set_toplevel (window_egl->window.shell_surface);
-
-  return TRUE;
-}
-
 static void
-destroy_surface (GstGLWindowWaylandEGL * window_egl)
+destroy_surfaces (GstGLWindowWaylandEGL * window_egl)
 {
-  if (window_egl->window.native)
-    wl_egl_window_destroy (window_egl->window.native);
-
-  if (window_egl->window.shell_surface)
+  if (window_egl->window.subsurface) {
+    wl_subsurface_destroy (window_egl->window.subsurface);
+    window_egl->window.subsurface = NULL;
+  }
+  if (window_egl->window.shell_surface) {
     wl_shell_surface_destroy (window_egl->window.shell_surface);
-
-  if (window_egl->window.surface)
+    window_egl->window.shell_surface = NULL;
+  }
+  if (window_egl->window.surface) {
     wl_surface_destroy (window_egl->window.surface);
-
-  if (window_egl->window.callback)
-    wl_callback_destroy (window_egl->window.callback);
-
-  g_source_destroy (window_egl->wl_source);
-  g_source_unref (window_egl->wl_source);
-  window_egl->wl_source = NULL;
-  g_main_loop_unref (window_egl->loop);
-  window_egl->loop = NULL, g_main_context_unref (window_egl->main_context);
-  window_egl->main_context = NULL;
-}
-
-static void
-registry_handle_global (void *data, struct wl_registry *registry,
-    uint32_t name, const char *interface, uint32_t version)
-{
-  GstGLWindowWaylandEGL *window_egl = data;
-  struct display *d = &window_egl->display;
-
-  if (g_strcmp0 (interface, "wl_compositor") == 0) {
-    d->compositor =
-        wl_registry_bind (registry, name, &wl_compositor_interface, 1);
-  } else if (g_strcmp0 (interface, "wl_shell") == 0) {
-    d->shell = wl_registry_bind (registry, name, &wl_shell_interface, 1);
-  } else if (g_strcmp0 (interface, "wl_seat") == 0) {
-    d->seat = wl_registry_bind (registry, name, &wl_seat_interface, 1);
-    wl_seat_add_listener (d->seat, &seat_listener, window_egl);
-  } else if (g_strcmp0 (interface, "wl_shm") == 0) {
-    d->shm = wl_registry_bind (registry, name, &wl_shm_interface, 1);
-    d->cursor_theme = wl_cursor_theme_load (NULL, 32, d->shm);
-    d->default_cursor =
-        wl_cursor_theme_get_cursor (d->cursor_theme, "left_ptr");
+    window_egl->window.surface = NULL;
+  }
+  if (window_egl->window.native) {
+    wl_egl_window_destroy (window_egl->window.native);
+    window_egl->window.native = NULL;
   }
 }
 
-static const struct wl_registry_listener registry_listener = {
-  registry_handle_global
-};
+static void
+create_surfaces (GstGLWindowWaylandEGL * window_egl)
+{
+  GstGLDisplayWayland *display =
+      GST_GL_DISPLAY_WAYLAND (GST_GL_WINDOW (window_egl)->display);
+  gint width, height;
+
+  if (!window_egl->window.surface) {
+    window_egl->window.surface =
+        wl_compositor_create_surface (display->compositor);
+    if (window_egl->window.queue)
+      wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.surface,
+          window_egl->window.queue);
+  }
+
+  if (window_egl->window.foreign_surface) {
+    /* (re)parent */
+    if (!display->subcompositor) {
+      GST_ERROR_OBJECT (window_egl,
+          "Wayland server does not support subsurfaces");
+      window_egl->window.foreign_surface = NULL;
+      goto shell_window;
+    }
+
+    if (!window_egl->window.subsurface) {
+      window_egl->window.subsurface =
+          wl_subcompositor_get_subsurface (display->subcompositor,
+          window_egl->window.surface, window_egl->window.foreign_surface);
+      if (window_egl->window.queue)
+        wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.subsurface,
+            window_egl->window.queue);
+
+      wl_subsurface_set_position (window_egl->window.subsurface,
+          window_egl->window.window_x, window_egl->window.window_y);
+      wl_subsurface_set_desync (window_egl->window.subsurface);
+    }
+  } else {
+  shell_window:
+    if (!window_egl->window.shell_surface) {
+      window_egl->window.shell_surface =
+          wl_shell_get_shell_surface (display->shell,
+          window_egl->window.surface);
+      if (window_egl->window.queue)
+        wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.
+            shell_surface, window_egl->window.queue);
+
+      wl_shell_surface_add_listener (window_egl->window.shell_surface,
+          &shell_surface_listener, window_egl);
+
+      wl_shell_surface_set_title (window_egl->window.shell_surface,
+          "OpenGL Renderer");
+      wl_shell_surface_set_toplevel (window_egl->window.shell_surface);
+    }
+  }
+
+  if (window_egl->window.window_width > 0)
+    width = window_egl->window.window_width;
+  else
+    width = 320;
+  window_egl->window.window_width = width;
+
+  if (window_egl->window.window_height > 0)
+    height = window_egl->window.window_height;
+  else
+    height = 240;
+  window_egl->window.window_height = height;
+
+  if (!window_egl->window.native) {
+    gst_gl_window_resize (GST_GL_WINDOW (window_egl), width, height);
+
+    window_egl->window.native =
+        wl_egl_window_create (window_egl->window.surface, width, height);
+    if (window_egl->window.queue)
+      wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.native,
+          window_egl->window.queue);
+  }
+}
 
 static void
 gst_gl_window_wayland_egl_class_init (GstGLWindowWaylandEGLClass * klass)
@@ -272,15 +336,14 @@
       GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_set_window_handle);
   window_class->draw_unlocked =
       GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_draw);
+  window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_show);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_send_message_async);
   window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_close);
   window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_open);
   window_class->get_display =
       GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_get_display);
+  window_class->set_render_rectangle =
+      GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_set_render_rectangle);
 }
 
 static void
@@ -290,15 +353,16 @@
 
 /* Must be called in the gl thread */
 GstGLWindowWaylandEGL *
-gst_gl_window_wayland_egl_new (void)
+gst_gl_window_wayland_egl_new (GstGLDisplay * display)
 {
-  GstGLWindowWaylandEGL *window;
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_WAYLAND)
+      == 0)
+    /* we require a wayland display to create wayland surfaces */
+    return NULL;
 
   GST_DEBUG ("creating Wayland EGL window");
 
-  window = g_object_new (GST_GL_TYPE_WINDOW_WAYLAND_EGL, NULL);
-
-  return window;
+  return g_object_new (GST_GL_TYPE_WINDOW_WAYLAND_EGL, NULL);
 }
 
 static void
@@ -308,127 +372,53 @@
 
   window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
 
-  destroy_surface (window_egl);
+  destroy_surfaces (window_egl);
 
-  if (window_egl->display.cursor_surface)
-    wl_surface_destroy (window_egl->display.cursor_surface);
+  g_source_destroy (window_egl->wl_source);
+  g_source_unref (window_egl->wl_source);
+  window_egl->wl_source = NULL;
 
-  if (window_egl->display.cursor_theme)
-    wl_cursor_theme_destroy (window_egl->display.cursor_theme);
-
-  if (window_egl->display.shell)
-    wl_shell_destroy (window_egl->display.shell);
-
-  if (window_egl->display.compositor)
-    wl_compositor_destroy (window_egl->display.compositor);
-
-  if (window_egl->display.display) {
-    wl_display_flush (window_egl->display.display);
-    wl_display_disconnect (window_egl->display.display);
-  }
+  GST_GL_WINDOW_CLASS (parent_class)->close (window);
 }
 
 static gboolean
 gst_gl_window_wayland_egl_open (GstGLWindow * window, GError ** error)
 {
+  GstGLDisplayWayland *display;
   GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
 
-  window_egl->display.display = wl_display_connect (NULL);
-  if (!window_egl->display.display) {
+  if (!GST_IS_GL_DISPLAY_WAYLAND (window->display)) {
     g_set_error (error, GST_GL_WINDOW_ERROR,
         GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
-        "Failed to connect to Wayland display server");
-    goto error;
+        "Failed to retrieve Wayland display (wrong type?)");
+    return FALSE;
+  }
+  display = GST_GL_DISPLAY_WAYLAND (window->display);
+
+  if (!display->display) {
+    g_set_error (error, GST_GL_WINDOW_ERROR,
+        GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
+        "Failed to retrieve Wayland display");
+    return FALSE;
   }
 
-  window_egl->display.registry =
-      wl_display_get_registry (window_egl->display.display);
-  wl_registry_add_listener (window_egl->display.registry, &registry_listener,
-      window_egl);
+  window_egl->window.queue = wl_display_create_queue (display->display);
 
-  wl_display_dispatch (window_egl->display.display);
+  window_egl->wl_source = wayland_event_source_new (display->display,
+      window_egl->window.queue);
 
-  create_surface (window_egl);
+  if (!GST_GL_WINDOW_CLASS (parent_class)->open (window, error))
+    return FALSE;
 
-  window_egl->display.cursor_surface =
-      wl_compositor_create_surface (window_egl->display.compositor);
-
-  window_egl->wl_source =
-      wayland_event_source_new (window_egl->display.display);
-  window_egl->main_context = g_main_context_new ();
-  window_egl->loop = g_main_loop_new (window_egl->main_context, FALSE);
-
-  g_source_attach (window_egl->wl_source, window_egl->main_context);
+  g_source_attach (window_egl->wl_source, g_main_context_get_thread_default ());
 
   return TRUE;
-
-error:
-  return FALSE;
 }
 
-static void
-gst_gl_window_wayland_egl_run (GstGLWindow * window)
+void
+gst_gl_window_wayland_egl_create_window (GstGLWindowWaylandEGL * window_egl)
 {
-  GstGLWindowWaylandEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
-
-  GST_LOG ("starting main loop");
-  g_main_loop_run (window_egl->loop);
-  GST_LOG ("exiting main loop");
-}
-
-static void
-gst_gl_window_wayland_egl_quit (GstGLWindow * window)
-{
-  GstGLWindowWaylandEGL *window_egl;
-
-  window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
-
-  GST_LOG ("sending quit");
-
-  g_main_loop_quit (window_egl->loop);
-
-  GST_LOG ("quit sent");
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-static void
-gst_gl_window_wayland_egl_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowWaylandEGL *window_egl;
-  GstGLMessage *message;
-
-  window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_egl->main_context, (GSourceFunc) _run_message,
-      message);
+  create_surfaces (window_egl);
 }
 
 static guintptr
@@ -441,6 +431,31 @@
 gst_gl_window_wayland_egl_set_window_handle (GstGLWindow * window,
     guintptr handle)
 {
+  GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
+  struct wl_surface *surface = (struct wl_surface *) handle;
+
+  /* already set the NULL handle */
+  if (surface == NULL && window_egl->window.foreign_surface == NULL)
+    return;
+
+  /* unparent */
+  destroy_surfaces (window_egl);
+  window_egl->window.foreign_surface = surface;
+  create_surfaces (window_egl);
+}
+
+static void
+gst_gl_window_wayland_egl_show (GstGLWindow * window)
+{
+  GstGLDisplayWayland *display_wayland =
+      GST_GL_DISPLAY_WAYLAND (window->display);
+  GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
+
+  create_surfaces (window_egl);
+
+  if (gst_gl_wl_display_roundtrip_queue (display_wayland->display,
+          window_egl->window.queue) < 0)
+    GST_WARNING_OBJECT (window, "failed a roundtrip");
 }
 
 static void
@@ -456,37 +471,30 @@
     wl_egl_window_resize (window_egl->window.native, width, height, 0, 0);
   }
 
-  if (window->resize)
-    window->resize (window->resize_data, width, height);
+  gst_gl_window_resize (window, width, height);
 
   window_egl->window.window_width = width;
   window_egl->window.window_height = height;
-
-#if 0
-  wl_shell_surface_resize (window_egl->window.shell_surface,
-      window_egl->display.seat, window_egl->display.serial, 0);
-#endif
 }
 
-struct draw
-{
-  GstGLWindowWaylandEGL *window;
-  guint width, height;
-};
-
 static void
 draw_cb (gpointer data)
 {
-  struct draw *draw_data = data;
-  GstGLWindowWaylandEGL *window_egl = draw_data->window;
+  GstGLWindowWaylandEGL *window_egl = data;
   GstGLWindow *window = GST_GL_WINDOW (window_egl);
   GstGLContext *context = gst_gl_window_get_context (window);
   GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
 
-  if (window_egl->window.window_width != draw_data->width
-      || window_egl->window.window_height != draw_data->height) {
-    GST_DEBUG ("dimensions don't match, attempting resize");
-    window_resize (window_egl, draw_data->width, draw_data->height);
+  create_surfaces (window_egl);
+
+  if (window_egl->window.subsurface)
+    wl_subsurface_set_desync (window_egl->window.subsurface);
+
+  if (window->queue_resize) {
+    guint width, height;
+
+    gst_gl_window_get_surface_dimensions (window, &width, &height);
+    gst_gl_window_resize (window, width, height);
   }
 
   if (window->draw)
@@ -494,27 +502,78 @@
 
   context_class->swap_buffers (context);
 
+  if (window_egl->window.subsurface)
+    wl_subsurface_set_desync (window_egl->window.subsurface);
+
   gst_object_unref (context);
 }
 
 static void
-gst_gl_window_wayland_egl_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_wayland_egl_draw (GstGLWindow * window)
 {
-  struct draw draw_data;
+  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window);
+}
 
-  draw_data.window = GST_GL_WINDOW_WAYLAND_EGL (window);
-  draw_data.width = width;
-  draw_data.height = height;
+struct SetRenderRectangle
+{
+  GstGLWindowWaylandEGL *window_egl;
+  GstVideoRectangle rect;
+};
 
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
+static void
+_free_set_render_rectangle (struct SetRenderRectangle *render)
+{
+  if (render) {
+    if (render->window_egl)
+      gst_object_unref (render->window_egl);
+    g_free (render);
+  }
+}
+
+static void
+_set_render_rectangle (gpointer data)
+{
+  struct SetRenderRectangle *render = data;
+
+  GST_LOG_OBJECT (render->window_egl, "setting render rectangle %i,%i+%ix%i",
+      render->rect.x, render->rect.y, render->rect.w, render->rect.h);
+
+  if (render->window_egl->window.subsurface) {
+    wl_subsurface_set_sync (render->window_egl->window.subsurface);
+    wl_subsurface_set_position (render->window_egl->window.subsurface,
+        render->rect.x, render->rect.y);
+    render->window_egl->window.window_x = render->rect.x;
+    render->window_egl->window.window_y = render->rect.y;
+  }
+
+  window_resize (render->window_egl, render->rect.w, render->rect.h);
+}
+
+static gboolean
+gst_gl_window_wayland_egl_set_render_rectangle (GstGLWindow * window,
+    gint x, gint y, gint width, gint height)
+{
+  GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
+  struct SetRenderRectangle *render;
+
+  render = g_new0 (struct SetRenderRectangle, 1);
+  render->window_egl = gst_object_ref (window_egl);
+  render->rect.x = x;
+  render->rect.y = y;
+  render->rect.w = width;
+  render->rect.h = height;
+
+  gst_gl_window_send_message_async (window,
+      (GstGLWindowCB) _set_render_rectangle, render,
+      (GDestroyNotify) _free_set_render_rectangle);
+
+  return TRUE;
 }
 
 static guintptr
 gst_gl_window_wayland_egl_get_display (GstGLWindow * window)
 {
-  GstGLWindowWaylandEGL *window_egl;
+  GstGLDisplayWayland *display = GST_GL_DISPLAY_WAYLAND (window->display);
 
-  window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
-
-  return (guintptr) window_egl->display.display;
+  return (guintptr) display->display;
 }
diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
index 21b82da..f76b5b0 100644
--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
+++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
@@ -55,17 +55,24 @@
   struct wl_surface      *cursor_surface;
   struct window          *window;
   guint32                 serial;
+
+  gdouble pointer_x;
+  gdouble pointer_y;
 };
 
 struct window {
   struct display *display;
 
-  struct wl_egl_window      *native;
+  struct wl_event_queue     *queue;
   struct wl_surface         *surface;
   struct wl_shell_surface   *shell_surface;
+  struct wl_egl_window      *native;
+  struct wl_surface         *foreign_surface;
+  struct wl_subsurface      *subsurface;
   struct wl_callback        *callback;
   int fullscreen, configured;
   int window_width, window_height;
+  int window_x, window_y;
 };
 
 struct _GstGLWindowWaylandEGL {
@@ -76,8 +83,6 @@
   struct window  window;
 
   GSource *wl_source;
-  GMainContext *main_context;
-  GMainLoop *loop;
 
   gpointer _reserved[GST_PADDING];
 };
@@ -92,7 +97,9 @@
 
 GType gst_gl_window_wayland_egl_get_type     (void);
 
-GstGLWindowWaylandEGL * gst_gl_window_wayland_egl_new  (void);
+GstGLWindowWaylandEGL * gst_gl_window_wayland_egl_new  (GstGLDisplay * display);
+
+void gst_gl_window_wayland_egl_create_window (GstGLWindowWaylandEGL * window_egl);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/wayland/wayland_event_source.c b/gst-libs/gst/gl/wayland/wayland_event_source.c
index 509a799..114977a 100644
--- a/gst-libs/gst/gl/wayland/wayland_event_source.c
+++ b/gst-libs/gst/gl/wayland/wayland_event_source.c
@@ -38,19 +38,58 @@
 
 #include "wayland_event_source.h"
 
+static void
+sync_callback (void *data, struct wl_callback *callback, uint32_t serial)
+{
+  gboolean *done = data;
+
+  *done = TRUE;
+  wl_callback_destroy (callback);
+}
+
+static const struct wl_callback_listener sync_listener = {
+  sync_callback
+};
+
+gint
+gst_gl_wl_display_roundtrip_queue (struct wl_display *display,
+    struct wl_event_queue *queue)
+{
+  struct wl_callback *callback = wl_display_sync (display);
+  gboolean done = FALSE;
+  gint ret = 0;
+
+  if (callback == NULL)
+    return -1;
+  wl_callback_add_listener (callback, &sync_listener, &done);
+  if (queue) {
+    wl_proxy_set_queue ((struct wl_proxy *) callback, queue);
+    while (!done && ret >= 0)
+      ret = wl_display_dispatch_queue (display, queue);
+  } else {
+    while (!done && ret >= 0)
+      ret = wl_display_dispatch (display);
+  }
+
+  if (ret == -1 && !done)
+    wl_callback_destroy (callback);
+
+  return ret;
+}
+
 typedef struct _WaylandEventSource
 {
   GSource source;
   GPollFD pfd;
   uint32_t mask;
   struct wl_display *display;
+  struct wl_event_queue *queue;
 } WaylandEventSource;
 
 static gboolean
 wayland_event_source_prepare (GSource * base, gint * timeout)
 {
   WaylandEventSource *source = (WaylandEventSource *) base;
-  gboolean retval;
 
   *timeout = -1;
 
@@ -59,9 +98,7 @@
    * writes on idle */
   wl_display_flush (source->display);
 
-  retval = FALSE;               //clutter_events_pending ();
-
-  return retval;
+  return FALSE;
 }
 
 static gboolean
@@ -70,7 +107,7 @@
   WaylandEventSource *source = (WaylandEventSource *) base;
   gboolean retval;
 
-  retval = source->pfd.revents; // || clutter_events_pending();
+  retval = source->pfd.revents;
 
   return retval;
 }
@@ -80,25 +117,18 @@
     GSourceFunc callback, gpointer data)
 {
   WaylandEventSource *source = (WaylandEventSource *) base;
-//  ClutterEvent *event;
 
   if (source->pfd.revents) {
-    wl_display_roundtrip (source->display);
+    if (source->queue)
+      wl_display_dispatch_queue_pending (source->display, source->queue);
+    else
+      wl_display_dispatch_pending (source->display);
     source->pfd.revents = 0;
   }
 
   if (callback)
     callback (data);
 
-#if 0
-  event = clutter_event_get ();
-
-  if (event) {
-    /* forward the event into clutter for emission etc. */
-    clutter_do_event (event);
-    clutter_event_free (event);
-  }
-#endif
   return TRUE;
 }
 
@@ -110,13 +140,15 @@
 };
 
 GSource *
-wayland_event_source_new (struct wl_display *display)
+wayland_event_source_new (struct wl_display *display,
+    struct wl_event_queue *queue)
 {
   WaylandEventSource *source;
 
   source = (WaylandEventSource *)
       g_source_new (&wayland_event_source_funcs, sizeof (WaylandEventSource));
   source->display = display;
+  source->queue = queue;
   source->pfd.fd = wl_display_get_fd (display);
   source->pfd.events = G_IO_IN | G_IO_ERR;
   g_source_add_poll (&source->source, &source->pfd);
diff --git a/gst-libs/gst/gl/wayland/wayland_event_source.h b/gst-libs/gst/gl/wayland/wayland_event_source.h
index e70d568..940a5e0 100644
--- a/gst-libs/gst/gl/wayland/wayland_event_source.h
+++ b/gst-libs/gst/gl/wayland/wayland_event_source.h
@@ -33,7 +33,10 @@
 
 #include <wayland-client.h>
 
-GSource *
-wayland_event_source_new (struct wl_display *display);
+GSource * wayland_event_source_new (struct wl_display *display,
+                                    struct wl_event_queue *queue);
+
+gint      gst_gl_wl_display_roundtrip_queue (struct wl_display *display,
+                                             struct wl_event_queue *queue);
 
 #endif /* __WAYLAND_EVENT_SOURCE_H__ */
diff --git a/gst-libs/gst/gl/win32/Makefile.am b/gst-libs/gst/gl/win32/Makefile.am
index aaea0d7..80da958 100644
--- a/gst-libs/gst/gl/win32/Makefile.am
+++ b/gst-libs/gst/gl/win32/Makefile.am
@@ -3,10 +3,12 @@
 noinst_LTLIBRARIES = libgstgl-win32.la
 
 libgstgl_win32_la_SOURCES = \
-	gstglwindow_win32.c
+	gstglwindow_win32.c \
+	win32_message_source.c
 
 noinst_HEADERS = \
-	gstglwindow_win32.h
+	gstglwindow_win32.h \
+	win32_message_source.h
 
 if USE_WGL
 libgstgl_win32_la_SOURCES += gstglcontext_wgl.c
diff --git a/gst-libs/gst/gl/win32/Makefile.in b/gst-libs/gst/gl/win32/Makefile.in
index e6bdb8d..24df69f 100644
--- a/gst-libs/gst/gl/win32/Makefile.in
+++ b/gst-libs/gst/gl/win32/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 @USE_WGL_TRUE@am__append_1 = gstglcontext_wgl.c
 @USE_WGL_TRUE@am__append_2 = gstglcontext_wgl.h
 subdir = gst-libs/gst/gl/win32
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(am__noinst_HEADERS_DIST)
 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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -129,10 +139,10 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libgstgl_win32_la_LIBADD =
 am__libgstgl_win32_la_SOURCES_DIST = gstglwindow_win32.c \
-	gstglcontext_wgl.c
+	win32_message_source.c gstglcontext_wgl.c
 @USE_WGL_TRUE@am__objects_1 = libgstgl_win32_la-gstglcontext_wgl.lo
 am_libgstgl_win32_la_OBJECTS = libgstgl_win32_la-gstglwindow_win32.lo \
-	$(am__objects_1)
+	libgstgl_win32_la-win32_message_source.lo $(am__objects_1)
 libgstgl_win32_la_OBJECTS = $(am_libgstgl_win32_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -183,7 +193,8 @@
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__noinst_HEADERS_DIST = gstglwindow_win32.h gstglcontext_wgl.h
+am__noinst_HEADERS_DIST = gstglwindow_win32.h win32_message_source.h \
+	gstglcontext_wgl.h
 HEADERS = $(noinst_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
@@ -204,6 +215,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -221,8 +233,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -247,8 +261,6 @@
 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@
@@ -261,7 +273,6 @@
 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@
@@ -269,6 +280,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -295,11 +308,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -318,8 +334,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -378,10 +392,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -398,7 +416,6 @@
 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@
@@ -407,7 +424,6 @@
 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@
@@ -420,7 +436,6 @@
 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@
@@ -434,6 +449,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -445,6 +461,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -483,6 +501,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -518,10 +537,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -547,6 +570,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -554,7 +580,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -583,6 +616,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -593,6 +627,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -623,17 +658,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -650,6 +684,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -688,6 +723,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -702,8 +738,10 @@
 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)
+libgstgl_win32_la_SOURCES = gstglwindow_win32.c win32_message_source.c \
+	$(am__append_1)
+noinst_HEADERS = gstglwindow_win32.h win32_message_source.h \
+	$(am__append_2)
 #if USE_EGL
 #libgstgl_win32_la_SOURCES += gstglwindow_win32_egl.c
 #noinst_HEADERS += gstglwindow_win32_egl.h
@@ -736,7 +774,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/win32/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/win32/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -777,6 +814,7 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_win32_la-gstglcontext_wgl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_win32_la-gstglwindow_win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_win32_la-win32_message_source.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -809,6 +847,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_win32_la_CFLAGS) $(CFLAGS) -c -o libgstgl_win32_la-gstglwindow_win32.lo `test -f 'gstglwindow_win32.c' || echo '$(srcdir)/'`gstglwindow_win32.c
 
+libgstgl_win32_la-win32_message_source.lo: win32_message_source.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_win32_la_CFLAGS) $(CFLAGS) -MT libgstgl_win32_la-win32_message_source.lo -MD -MP -MF $(DEPDIR)/libgstgl_win32_la-win32_message_source.Tpo -c -o libgstgl_win32_la-win32_message_source.lo `test -f 'win32_message_source.c' || echo '$(srcdir)/'`win32_message_source.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_win32_la-win32_message_source.Tpo $(DEPDIR)/libgstgl_win32_la-win32_message_source.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='win32_message_source.c' object='libgstgl_win32_la-win32_message_source.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_win32_la_CFLAGS) $(CFLAGS) -c -o libgstgl_win32_la-win32_message_source.lo `test -f 'win32_message_source.c' || echo '$(srcdir)/'`win32_message_source.c
+
 libgstgl_win32_la-gstglcontext_wgl.lo: gstglcontext_wgl.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_win32_la_CFLAGS) $(CFLAGS) -MT libgstgl_win32_la-gstglcontext_wgl.lo -MD -MP -MF $(DEPDIR)/libgstgl_win32_la-gstglcontext_wgl.Tpo -c -o libgstgl_win32_la-gstglcontext_wgl.lo `test -f 'gstglcontext_wgl.c' || echo '$(srcdir)/'`gstglcontext_wgl.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_win32_la-gstglcontext_wgl.Tpo $(DEPDIR)/libgstgl_win32_la-gstglcontext_wgl.Plo
@@ -1025,6 +1070,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/win32/gstglcontext_wgl.c b/gst-libs/gst/gl/win32/gstglcontext_wgl.c
index 4886e9a..3c2f34a 100644
--- a/gst-libs/gst/gl/win32/gstglcontext_wgl.c
+++ b/gst-libs/gst/gl/win32/gstglcontext_wgl.c
@@ -31,8 +31,19 @@
 #include "gstglcontext_wgl.h"
 #include <GL/wglext.h>
 
+#include "../utils/opengl_versions.h"
+
+struct _GstGLContextWGLPrivate
+{
+  PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
+
+  GstGLAPI context_api;
+};
+
 #define gst_gl_context_wgl_parent_class parent_class
 G_DEFINE_TYPE (GstGLContextWGL, gst_gl_context_wgl, GST_GL_TYPE_CONTEXT);
+#define GST_GL_CONTEXT_WGL_GET_PRIVATE(o) \
+  (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_WGL, GstGLContextWGLPrivate))
 
 static guintptr gst_gl_context_wgl_get_gl_context (GstGLContext * context);
 static void gst_gl_context_wgl_swap_buffers (GstGLContext * context);
@@ -46,14 +57,14 @@
 GstGLAPI gst_gl_context_wgl_get_gl_api (GstGLContext * context);
 static GstGLPlatform gst_gl_context_wgl_get_gl_platform (GstGLContext *
     context);
-static gpointer gst_gl_context_wgl_get_proc_address (GstGLContext * context,
-    const gchar * name);
 
 static void
 gst_gl_context_wgl_class_init (GstGLContextWGLClass * klass)
 {
   GstGLContextClass *context_class = (GstGLContextClass *) klass;
 
+  g_type_class_add_private (klass, sizeof (GstGLContextWGLPrivate));
+
   context_class->get_gl_context =
       GST_DEBUG_FUNCPTR (gst_gl_context_wgl_get_gl_context);
   context_class->choose_format =
@@ -76,15 +87,59 @@
 static void
 gst_gl_context_wgl_init (GstGLContextWGL * context_wgl)
 {
+  context_wgl->priv = GST_GL_CONTEXT_WGL_GET_PRIVATE (context_wgl);
+
+  context_wgl->priv->context_api = GST_GL_API_OPENGL | GST_GL_API_OPENGL3;
 }
 
 /* Must be called in the gl thread */
 GstGLContextWGL *
-gst_gl_context_wgl_new (void)
+gst_gl_context_wgl_new (GstGLDisplay * display)
 {
-  GstGLContextWGL *context = g_object_new (GST_GL_TYPE_CONTEXT_WGL, NULL);
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_WIN32) ==
+      0)
+    /* we require an win32 display handle to create WGL contexts */
+    return NULL;
 
-  return context;
+  return g_object_new (GST_GL_TYPE_CONTEXT_WGL, NULL);
+}
+
+static HGLRC
+_create_context_with_flags (GstGLContextWGL * context_wgl, HDC dpy,
+    HGLRC share_context, gint major, gint minor, gint contextFlags,
+    gint profileMask)
+{
+  HGLRC ret;
+#define N_ATTRIBS 20
+  gint attribs[N_ATTRIBS];
+  gint n = 0;
+
+  if (major) {
+    attribs[n++] = WGL_CONTEXT_MAJOR_VERSION_ARB;
+    attribs[n++] = major;
+  }
+  if (minor) {
+    attribs[n++] = WGL_CONTEXT_MINOR_VERSION_ARB;
+    attribs[n++] = minor;
+  }
+  if (contextFlags) {
+    attribs[n++] = WGL_CONTEXT_FLAGS_ARB;
+    attribs[n++] = contextFlags;
+  }
+  if (profileMask) {
+    attribs[n++] = WGL_CONTEXT_PROFILE_MASK_ARB;
+    attribs[n++] = profileMask;
+  }
+  attribs[n++] = 0;
+
+  g_assert (n < N_ATTRIBS);
+#undef N_ATTRIBS
+
+  ret =
+      context_wgl->priv->wglCreateContextAttribsARB (dpy, share_context,
+      attribs);
+
+  return ret;
 }
 
 static gboolean
@@ -94,7 +149,7 @@
   GstGLWindow *window;
   GstGLContextWGL *context_wgl;
   HGLRC external_gl_context = NULL;
-  PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
+  HGLRC trampoline;
   HDC device;
 
   context_wgl = GST_GL_CONTEXT_WGL (context);
@@ -111,45 +166,81 @@
     external_gl_context = (HGLRC) gst_gl_context_get_gl_context (other_context);
   }
 
-  context_wgl->wgl_context = wglCreateContext (device);
-  if (context_wgl->wgl_context)
+  trampoline = wglCreateContext (device);
+  if (trampoline)
     GST_DEBUG ("gl context created: %" G_GUINTPTR_FORMAT,
-        (guintptr) context_wgl->wgl_context);
+        (guintptr) trampoline);
   else {
     g_set_error (error, GST_GL_CONTEXT_ERROR,
         GST_GL_CONTEXT_ERROR_CREATE_CONTEXT, "failed to create glcontext:0x%x",
         (unsigned int) GetLastError ());
     goto failure;
   }
-  g_assert (context_wgl->wgl_context);
+  g_assert (trampoline);
 
+  /* get extension functions */
+  wglMakeCurrent (device, trampoline);
 
-  if (external_gl_context) {
+  context_wgl->priv->wglCreateContextAttribsARB =
+      (PFNWGLCREATECONTEXTATTRIBSARBPROC)
+      wglGetProcAddress ("wglCreateContextAttribsARB");
 
-    wglMakeCurrent (device, context_wgl->wgl_context);
+  wglMakeCurrent (device, 0);
+  wglDeleteContext (trampoline);
+  trampoline = NULL;
 
-    wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)
-        wglGetProcAddress ("wglCreateContextAttribsARB");
+  if (context_wgl->priv->wglCreateContextAttribsARB != NULL
+      && gl_api & GST_GL_API_OPENGL3) {
+    gint i;
 
-    if (wglCreateContextAttribsARB != NULL) {
-      wglMakeCurrent (device, 0);
-      wglDeleteContext (context_wgl->wgl_context);
-      context_wgl->wgl_context =
-          wglCreateContextAttribsARB (device, external_gl_context, 0);
-      if (context_wgl->wgl_context == NULL) {
+    for (i = 0; i < G_N_ELEMENTS (opengl_versions); i++) {
+      gint profileMask = 0;
+      gint contextFlags = 0;
+
+      if ((opengl_versions[i].major > 3
+              || (opengl_versions[i].major == 3
+                  && opengl_versions[i].minor >= 2))) {
+        profileMask |= WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+        contextFlags |= WGL_CONTEXT_DEBUG_BIT_ARB;
+      } else {
+        break;
+      }
+
+      GST_DEBUG_OBJECT (context, "trying to create a GL %d.%d context",
+          opengl_versions[i].major, opengl_versions[i].minor);
+
+      context_wgl->wgl_context = _create_context_with_flags (context_wgl,
+          device, external_gl_context, opengl_versions[i].major,
+          opengl_versions[i].minor, contextFlags, profileMask);
+
+      if (context_wgl->wgl_context) {
+        context_wgl->priv->context_api = GST_GL_API_OPENGL3;
+        break;
+      }
+    }
+  }
+
+  if (!context_wgl->wgl_context) {
+    context_wgl->wgl_context = wglCreateContext (device);
+
+    if (!context_wgl->wgl_context) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR,
+          GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
+          "Failed to create WGL context 0x%x", (unsigned int) GetLastError ());
+      goto failure;
+    }
+
+    if (external_gl_context) {
+      if (!wglShareLists (external_gl_context, context_wgl->wgl_context)) {
         g_set_error (error, GST_GL_CONTEXT_ERROR,
             GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
-            "failed to share context through wglCreateContextAttribsARB 0x%x",
+            "failed to share contexts through wglShareLists 0x%x",
             (unsigned int) GetLastError ());
         goto failure;
       }
-    } else if (!wglShareLists (external_gl_context, context_wgl->wgl_context)) {
-      g_set_error (error, GST_GL_CONTEXT_ERROR,
-          GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
-          "failed to share contexts through wglShareLists 0x%x",
-          (unsigned int) GetLastError ());
-      goto failure;
     }
+
+    context_wgl->priv->context_api = GST_GL_API_OPENGL;
   }
 
   GST_LOG ("gl context id: %" G_GUINTPTR_FORMAT,
@@ -276,7 +367,9 @@
 GstGLAPI
 gst_gl_context_wgl_get_gl_api (GstGLContext * context)
 {
-  return GST_GL_API_OPENGL;
+  GstGLContextWGL *context_wgl = GST_GL_CONTEXT_WGL (context);
+
+  return context_wgl->priv->context_api;
 }
 
 static GstGLPlatform
@@ -285,14 +378,20 @@
   return GST_GL_PLATFORM_WGL;
 }
 
-static gpointer
-gst_gl_context_wgl_get_proc_address (GstGLContext * context, const gchar * name)
+gpointer
+gst_gl_context_wgl_get_proc_address (GstGLAPI gl_api, const gchar * name)
 {
   gpointer result;
 
-  if (!(result = gst_gl_context_default_get_proc_address (context, name))) {
+  if (!(result = gst_gl_context_default_get_proc_address (gl_api, name))) {
     result = wglGetProcAddress ((LPCSTR) name);
   }
 
   return result;
 }
+
+guintptr
+gst_gl_context_wgl_get_current_context (void)
+{
+  return (guintptr) wglGetCurrentContext ();
+}
diff --git a/gst-libs/gst/gl/win32/gstglcontext_wgl.h b/gst-libs/gst/gl/win32/gstglcontext_wgl.h
index b996dc7..64bf141 100644
--- a/gst-libs/gst/gl/win32/gstglcontext_wgl.h
+++ b/gst-libs/gst/gl/win32/gstglcontext_wgl.h
@@ -34,6 +34,7 @@
 
 typedef struct _GstGLContextWGL        GstGLContextWGL;
 typedef struct _GstGLContextWGLClass   GstGLContextWGLClass;
+typedef struct _GstGLContextWGLPrivate GstGLContextWGLPrivate;
 
 struct _GstGLContextWGL {
   /*< private >*/
@@ -42,6 +43,8 @@
   HGLRC wgl_context;
   HGLRC external_gl_context;
 
+  GstGLContextWGLPrivate *priv;
+
   gpointer _reserved[GST_PADDING];
 };
 
@@ -55,7 +58,9 @@
 
 GType gst_gl_context_wgl_get_type     (void);
 
-GstGLContextWGL * gst_gl_context_wgl_new  (void);
+GstGLContextWGL *   gst_gl_context_wgl_new                  (GstGLDisplay * display);
+guintptr            gst_gl_context_wgl_get_current_context  (void);
+gpointer            gst_gl_context_wgl_get_proc_address     (GstGLAPI gl_api, const gchar * name);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c
index 328c3dd..a2ed3e6 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.c
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c
@@ -24,9 +24,7 @@
 #endif
 
 #include "gstglwindow_win32.h"
-
-#define WM_GST_GL_WINDOW_CUSTOM (WM_APP+1)
-#define WM_GST_GL_WINDOW_QUIT (WM_APP+2)
+#include "win32_message_source.h"
 
 LRESULT CALLBACK window_proc (HWND hWnd, UINT uMsg, WPARAM wParam,
     LPARAM lParam);
@@ -43,7 +41,8 @@
 
 struct _GstGLWindowWin32Private
 {
-  GThread *thread;
+  gint preferred_width;
+  gint preferred_height;
 };
 
 #define GST_CAT_DEFAULT gst_gl_window_win32_debug
@@ -58,12 +57,13 @@
 static void gst_gl_window_win32_set_window_handle (GstGLWindow * window,
     guintptr handle);
 static guintptr gst_gl_window_win32_get_display (GstGLWindow * window);
-static void gst_gl_window_win32_draw (GstGLWindow * window, guint width,
-    guint height);
-static void gst_gl_window_win32_run (GstGLWindow * window);
-static void gst_gl_window_win32_quit (GstGLWindow * window);
-static void gst_gl_window_win32_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static void gst_gl_window_win32_set_preferred_size (GstGLWindow * window,
+    gint width, gint height);
+static void gst_gl_window_win32_show (GstGLWindow * window);
+static void gst_gl_window_win32_draw (GstGLWindow * window);
+gboolean gst_gl_window_win32_open (GstGLWindow * window, GError ** error);
+void gst_gl_window_win32_close (GstGLWindow * window);
+static void release_parent_win_id (GstGLWindowWin32 * window_win32);
 
 static void
 gst_gl_window_win32_class_init (GstGLWindowWin32Class * klass)
@@ -76,28 +76,139 @@
       GST_DEBUG_FUNCPTR (gst_gl_window_win32_set_window_handle);
   window_class->draw_unlocked = GST_DEBUG_FUNCPTR (gst_gl_window_win32_draw);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_win32_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_win32_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_win32_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_win32_send_message_async);
   window_class->get_display =
       GST_DEBUG_FUNCPTR (gst_gl_window_win32_get_display);
+  window_class->set_preferred_size =
+      GST_DEBUG_FUNCPTR (gst_gl_window_win32_set_preferred_size);
+  window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_win32_show);
+  window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_win32_open);
+  window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_win32_close);
 }
 
 static void
 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 */
 GstGLWindowWin32 *
-gst_gl_window_win32_new (void)
+gst_gl_window_win32_new (GstGLDisplay * display)
 {
-  GstGLWindowWin32 *window = g_object_new (GST_GL_TYPE_WINDOW_WIN32, NULL);
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_WIN32) ==
+      0)
+    /* we require an win32 display to create win32 windows */
+    return NULL;
 
-  return window;
+  return g_object_new (GST_GL_TYPE_WINDOW_WIN32, NULL);
+}
+
+static void
+msg_cb (GstGLWindowWin32 * window_win32, MSG * msg, gpointer user_data)
+{
+  GST_TRACE ("handle message");
+  TranslateMessage (msg);
+  DispatchMessage (msg);
+}
+
+gboolean
+gst_gl_window_win32_open (GstGLWindow * window, GError ** error)
+{
+  GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
+
+  if (!GST_GL_WINDOW_CLASS (parent_class)->open (window, error))
+    return FALSE;
+
+  window_win32->msg_source = win32_message_source_new (window_win32);
+  g_source_set_callback (window_win32->msg_source, (GSourceFunc) msg_cb,
+      NULL, NULL);
+  g_source_attach (window_win32->msg_source,
+      g_main_context_get_thread_default ());
+
+  return TRUE;
+}
+
+void
+gst_gl_window_win32_close (GstGLWindow * window)
+{
+  GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
+
+  release_parent_win_id (window_win32);
+
+  if (window_win32->internal_win_id) {
+    RemoveProp (window_win32->internal_win_id, "gl_window");
+    if (!DestroyWindow (window_win32->internal_win_id))
+      GST_WARNING ("failed to destroy window %" G_GUINTPTR_FORMAT
+          ", 0x%x", (guintptr) window_win32->internal_win_id,
+          (unsigned int) GetLastError ());
+  }
+
+  g_source_destroy (window_win32->msg_source);
+  g_source_unref (window_win32->msg_source);
+  window_win32->msg_source = NULL;
+
+  GST_GL_WINDOW_CLASS (parent_class)->close (window);
+}
+
+static void
+set_parent_win_id (GstGLWindowWin32 * window_win32)
+{
+  WNDPROC window_parent_proc;
+  RECT rect;
+
+  if (!window_win32->parent_win_id) {
+    /* no parent so the internal window needs borders and system menu */
+    SetWindowLongPtr (window_win32->internal_win_id, GWL_STYLE,
+        WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW);
+    SetParent (window_win32->internal_win_id, NULL);
+    return;
+  }
+
+  window_parent_proc =
+      (WNDPROC) GetWindowLongPtr (window_win32->parent_win_id, GWLP_WNDPROC);
+
+  GST_DEBUG ("set parent %" G_GUINTPTR_FORMAT,
+      (guintptr) window_win32->parent_win_id);
+
+  SetProp (window_win32->parent_win_id, "gl_window_id",
+      window_win32->internal_win_id);
+  SetProp (window_win32->parent_win_id, "gl_window_parent_proc",
+      (WNDPROC) window_parent_proc);
+  SetWindowLongPtr (window_win32->parent_win_id, GWLP_WNDPROC,
+      (LONG_PTR) sub_class_proc);
+
+  SetWindowLongPtr (window_win32->internal_win_id, GWL_STYLE,
+      WS_CHILD | WS_MAXIMIZE);
+  SetParent (window_win32->internal_win_id, window_win32->parent_win_id);
+
+  /* take changes into account: SWP_FRAMECHANGED */
+  GetClientRect (window_win32->parent_win_id, &rect);
+  SetWindowPos (window_win32->internal_win_id, HWND_TOP, rect.left, rect.top,
+      rect.right, rect.bottom,
+      SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+      SWP_FRAMECHANGED | SWP_NOACTIVATE);
+  MoveWindow (window_win32->internal_win_id, rect.left, rect.top, rect.right,
+      rect.bottom, FALSE);
+}
+
+static void
+release_parent_win_id (GstGLWindowWin32 * window_win32)
+{
+  WNDPROC parent_proc;
+
+  if (!window_win32->parent_win_id)
+    return;
+
+  parent_proc = GetProp (window_win32->parent_win_id, "gl_window_parent_proc");
+  if (!parent_proc)
+    return;
+
+  GST_DEBUG ("release parent %" G_GUINTPTR_FORMAT,
+      (guintptr) window_win32->parent_win_id);
+
+  SetWindowLongPtr (window_win32->parent_win_id, GWLP_WNDPROC,
+      (LONG_PTR) parent_proc);
+
+  RemoveProp (window_win32->parent_win_id, "gl_window_parent_proc");
 }
 
 gboolean
@@ -147,7 +258,6 @@
 
   window_win32->internal_win_id = 0;
   window_win32->device = 0;
-  window_win32->is_closed = FALSE;
   window_win32->visible = FALSE;
 
   window_win32->internal_win_id = CreateWindowEx (0,
@@ -175,6 +285,9 @@
   ShowCursor (TRUE);
 
   GST_LOG ("Created a win32 window");
+
+  set_parent_win_id (window_win32);
+
   return TRUE;
 
 failure:
@@ -195,7 +308,6 @@
 gst_gl_window_win32_set_window_handle (GstGLWindow * window, guintptr id)
 {
   GstGLWindowWin32 *window_win32;
-  HWND parent_id;
 
   window_win32 = GST_GL_WINDOW_WIN32 (window);
 
@@ -204,63 +316,22 @@
     return;
   }
 
-  /* retrieve parent if previously set */
-  parent_id = window_win32->parent_win_id;
-
   if (window_win32->visible) {
     ShowWindow (window_win32->internal_win_id, SW_HIDE);
     window_win32->visible = FALSE;
   }
 
-  if (parent_id) {
-    WNDPROC parent_proc = GetProp (parent_id, "gl_window_parent_proc");
-
-    GST_DEBUG ("release parent %" G_GUINTPTR_FORMAT, (guintptr) parent_id);
-
-    g_return_if_fail (parent_proc);
-
-    SetWindowLongPtr (parent_id, GWLP_WNDPROC, (LONG_PTR) parent_proc);
-    SetParent (window_win32->internal_win_id, NULL);
-
-    RemoveProp (parent_id, "gl_window_parent_proc");
-  }
-  //not 0
-  if (id) {
-    WNDPROC window_parent_proc =
-        (WNDPROC) GetWindowLongPtr ((HWND) id, GWLP_WNDPROC);
-    RECT rect;
-
-    GST_DEBUG ("set parent %" G_GUINTPTR_FORMAT, id);
-
-    SetProp ((HWND) id, "gl_window_id", window_win32->internal_win_id);
-    SetProp ((HWND) id, "gl_window_parent_proc", (WNDPROC) window_parent_proc);
-    SetWindowLongPtr ((HWND) id, GWLP_WNDPROC, (LONG_PTR) sub_class_proc);
-
-    SetWindowLongPtr (window_win32->internal_win_id, GWL_STYLE,
-        WS_CHILD | WS_MAXIMIZE);
-    SetParent (window_win32->internal_win_id, (HWND) id);
-
-    /* take changes into account: SWP_FRAMECHANGED */
-    GetClientRect ((HWND) id, &rect);
-    SetWindowPos (window_win32->internal_win_id, HWND_TOP, rect.left, rect.top,
-        rect.right, rect.bottom,
-        SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
-        SWP_FRAMECHANGED | SWP_NOACTIVATE);
-    MoveWindow (window_win32->internal_win_id, rect.left, rect.top, rect.right,
-        rect.bottom, FALSE);
-  } else {
-    /* no parent so the internal window needs borders and system menu */
-    SetWindowLongPtr (window_win32->internal_win_id, GWL_STYLE,
-        WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW);
-  }
+  release_parent_win_id (window_win32);
   window_win32->parent_win_id = (HWND) id;
+  set_parent_win_id (window_win32);
 }
 
-/* Thread safe */
 static void
-gst_gl_window_win32_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_win32_show (GstGLWindow * window)
 {
   GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
+  gint width = window_win32->priv->preferred_width;
+  gint height = window_win32->priv->preferred_height;
 
   if (!window_win32->visible) {
     HWND parent_id = window_win32->parent_win_id;
@@ -277,123 +348,40 @@
       MoveWindow (window_win32->internal_win_id, rect.left, rect.top, width,
           height, FALSE);
     }
-    ShowWindowAsync (window_win32->internal_win_id, SW_SHOW);
 
+    ShowWindowAsync (window_win32->internal_win_id, SW_SHOW);
     window_win32->visible = TRUE;
   }
+}
+
+static void
+gst_gl_window_win32_set_preferred_size (GstGLWindow * window, gint width,
+    gint height)
+{
+  GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
+
+  window_win32->priv->preferred_width = width;
+  window_win32->priv->preferred_height = height;
+}
+
+/* Thread safe */
+static void
+gst_gl_window_win32_draw (GstGLWindow * window)
+{
+  GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
 
   RedrawWindow (window_win32->internal_win_id, NULL, NULL,
       RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE);
 }
 
-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)
-      break;
-    else if (bRet == -1) {
-      GST_WARNING ("Failed to get message 0x%x",
-          (unsigned int) GetLastError ());
-      break;
-    } else {
-      GST_TRACE ("handle message");
-      TranslateMessage (&msg);
-      DispatchMessage (&msg);
-    }
-  }
-
-  GST_INFO ("end message loop");
-}
-
-/* Thread safe */
-static void
-gst_gl_window_win32_quit (GstGLWindow * window)
-{
-  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 =
-        PostMessage (window_win32->internal_win_id, WM_GST_GL_WINDOW_QUIT,
-        (WPARAM) 0, (LPARAM) 0);
-    GST_DEBUG ("end loop requested");
-    g_return_if_fail (SUCCEEDED (res));
-  }
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-/* Thread safe */
-static void
-gst_gl_window_win32_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowWin32 *window_win32;
-  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) {
-    LRESULT res;
-
-    message->callback = callback;
-    message->data = data;
-    message->destroy = destroy;
-
-    res = PostMessage (window_win32->internal_win_id, WM_GST_GL_WINDOW_CUSTOM,
-        (WPARAM) message, (LPARAM) NULL);
-    g_return_if_fail (SUCCEEDED (res));
-  }
-}
-
 /* PRIVATE */
 
 LRESULT CALLBACK
 window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   GstGLWindowWin32 *window_win32;
+  LRESULT ret = 0;
+
   if (uMsg == WM_CREATE) {
     window_win32 =
         GST_GL_WINDOW_WIN32 (((LPCREATESTRUCT) lParam)->lpCreateParams);
@@ -407,7 +395,6 @@
     ReleaseDC (hWnd, window_win32->device);
 
     SetProp (hWnd, "gl_window", window_win32);
-    return 0;
   } else if (GetProp (hWnd, "gl_window")) {
     GstGLWindow *window;
     GstGLContext *context;
@@ -422,15 +409,16 @@
 
     switch (uMsg) {
       case WM_SIZE:
-      {
-        if (window->resize) {
-          window->resize (window->resize_data, LOWORD (lParam),
-              HIWORD (lParam));
-        }
+        gst_gl_window_resize (window, LOWORD (lParam), HIWORD (lParam));
         break;
-      }
       case WM_PAINT:
       {
+        if (window->queue_resize) {
+          guint width, height;
+
+          gst_gl_window_get_surface_dimensions (window, &width, &height);
+          gst_gl_window_resize (window, width, height);
+        }
         if (window->draw) {
           PAINTSTRUCT ps;
           BeginPaint (hWnd, &ps);
@@ -450,69 +438,40 @@
           window->close (window->close_data);
         break;
       }
-      case WM_GST_GL_WINDOW_QUIT:
-      {
-        HWND parent_id = 0;
-
-        GST_TRACE ("WM_GST_GL_WINDOW_QUIT");
-
-        parent_id = window_win32->parent_win_id;
-        if (parent_id) {
-          WNDPROC parent_proc = GetProp (parent_id, "gl_window_parent_proc");
-
-          g_assert (parent_proc);
-
-          SetWindowLongPtr (parent_id, GWLP_WNDPROC, (LONG_PTR) parent_proc);
-          SetParent (hWnd, NULL);
-
-          RemoveProp (parent_id, "gl_window_parent_proc");
-        }
-
-        window_win32->is_closed = TRUE;
-        RemoveProp (hWnd, "gl_window");
-
-        if (window_win32->internal_win_id) {
-          if (!DestroyWindow (window_win32->internal_win_id))
-            GST_WARNING ("failed to destroy window %" G_GUINTPTR_FORMAT
-                ", 0x%x", (guintptr) hWnd, (unsigned int) GetLastError ());
-        }
-
-        PostQuitMessage (0);
-        break;
-      }
       case WM_CAPTURECHANGED:
       {
         GST_DEBUG ("WM_CAPTURECHANGED");
+        if (window->queue_resize) {
+          guint width, height;
+
+          gst_gl_window_get_surface_dimensions (window, &width, &height);
+          gst_gl_window_resize (window, width, height);
+        }
         if (window->draw)
           window->draw (window->draw_data);
         break;
       }
-      case WM_GST_GL_WINDOW_CUSTOM:
+      case WM_ERASEBKGND:
       {
-        if (!window_win32->is_closed) {
-          GstGLMessage *message = (GstGLMessage *) wParam;
-          _run_message (message);
-        }
+        ret = TRUE;
         break;
       }
-      case WM_ERASEBKGND:
-        return TRUE;
       default:
       {
         /* transmit messages to the parrent (ex: mouse/keyboard input) */
         HWND parent_id = window_win32->parent_win_id;
         if (parent_id)
           PostMessage (parent_id, uMsg, wParam, lParam);
-        return DefWindowProc (hWnd, uMsg, wParam, lParam);
+        ret = DefWindowProc (hWnd, uMsg, wParam, lParam);
       }
     }
 
     gst_object_unref (context);
-
-    return 0;
   } else {
-    return DefWindowProc (hWnd, uMsg, wParam, lParam);
+    ret = DefWindowProc (hWnd, uMsg, wParam, lParam);
   }
+
+  return ret;
 }
 
 LRESULT FAR PASCAL
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.h b/gst-libs/gst/gl/win32/gstglwindow_win32.h
index c4416e1..080a4d4 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.h
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.h
@@ -50,6 +50,8 @@
   gboolean is_closed;
   gboolean visible;
 
+  GSource *msg_source;
+
   /*< private >*/
   GstGLWindowWin32Private *priv;
 
@@ -75,7 +77,7 @@
 
 GType gst_gl_window_win32_get_type     (void);
 
-GstGLWindowWin32 * gst_gl_window_win32_new          (void);
+GstGLWindowWin32 * gst_gl_window_win32_new          (GstGLDisplay * display);
 
 gboolean gst_gl_window_win32_create_window (GstGLWindowWin32 * window_win32, GError ** error);
 
diff --git a/gst-libs/gst/gl/win32/win32_message_source.c b/gst-libs/gst/gl/win32/win32_message_source.c
new file mode 100644
index 0000000..fd785f8
--- /dev/null
+++ b/gst-libs/gst/gl/win32/win32_message_source.c
@@ -0,0 +1,83 @@
+/*
+ * GStreamer
+ * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
+ * Copyright (C) 2015 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 <stdint.h>
+#include <stdlib.h>
+
+#include "win32_message_source.h"
+
+typedef struct _Win32MessageSource
+{
+  GSource source;
+  GPollFD pfd;
+  GstGLWindowWin32 *window;
+} Win32MessageSource;
+
+static gboolean
+win32_message_source_check (GSource * base)
+{
+  MSG msg;
+
+  return PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE);
+}
+
+static gboolean
+win32_message_source_dispatch (GSource * base, GSourceFunc callback,
+    gpointer user_data)
+{
+  Win32MessageSource *source = (Win32MessageSource *) base;
+  Win32MessageSourceFunc func = (Win32MessageSourceFunc) callback;
+  MSG msg;
+
+  if (!PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
+    return G_SOURCE_CONTINUE;
+
+  if (func)
+    func (source->window, &msg, user_data);
+
+  return G_SOURCE_CONTINUE;
+}
+
+static GSourceFuncs win32_message_source_funcs = {
+  NULL,
+  win32_message_source_check,
+  win32_message_source_dispatch,
+  NULL
+};
+
+GSource *
+win32_message_source_new (GstGLWindowWin32 * window_win32)
+{
+  Win32MessageSource *source;
+
+  source = (Win32MessageSource *)
+      g_source_new (&win32_message_source_funcs, sizeof (Win32MessageSource));
+  source->window = window_win32;
+  source->pfd.fd = G_WIN32_MSG_HANDLE;
+  source->pfd.events = G_IO_IN;
+  g_source_add_poll (&source->source, &source->pfd);
+
+  return &source->source;
+}
diff --git a/gst/real/gstreal.h b/gst-libs/gst/gl/win32/win32_message_source.h
similarity index 60%
rename from gst/real/gstreal.h
rename to gst-libs/gst/gl/win32/win32_message_source.h
index 3121099..eef3eac 100644
--- a/gst/real/gstreal.h
+++ b/gst-libs/gst/gl/win32/win32_message_source.h
@@ -1,6 +1,7 @@
-/* GStreamer
- *
- * Copyright (C) 2007 Hans de Goede <j.w.r.degoede@hhs.nl>
+/*
+ * GStreamer
+ * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
+ * Copyright (C) 2015 Collabora ltd.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -18,18 +19,16 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef __GST_REAL_H__
-#define __GST_REAL_H__
+#ifndef __WIN32_MESSAGE_SOURCE_H__
+#define __WIN32_MESSAGE_SOURCE_H__
 
-#ifdef HAVE_CPU_I386
-#define DEFAULT_REAL_CODECS_PATH \
-  "/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:" \
-  "/usr/local/lib/win32:/usr/local/lib/codecs"
-#endif
-#ifdef HAVE_CPU_X86_64
-#define DEFAULT_REAL_CODECS_PATH \
-  "/usr/lib64/win32:/usr/lib64/codecs:" \
-  "/usr/local/lib64/win32:/usr/local/lib64/codecs"
-#endif
+#include <glib-object.h>
+#include "gstglwindow_win32.h"
 
-#endif /* __GST_REAL_H__ */
+typedef void (*Win32MessageSourceFunc) (GstGLWindowWin32 *window_win32,
+    MSG *msg, gpointer user_data);
+
+GSource *
+win32_message_source_new (GstGLWindowWin32 *window_win32);
+
+#endif /* __WIN32_MESSAGE_SOURCE_H__ */
diff --git a/gst-libs/gst/gl/x11/Makefile.in b/gst-libs/gst/gl/x11/Makefile.in
index bafc411..406d0c1 100644
--- a/gst-libs/gst/gl/x11/Makefile.in
+++ b/gst-libs/gst/gl/x11/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,9 +93,6 @@
 @USE_GLX_TRUE@am__append_1 = gstglcontext_glx.c
 @USE_GLX_TRUE@am__append_2 = gstglcontext_glx.h
 subdir = gst-libs/gst/gl/x11
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(libgstgl_x11include_HEADERS) \
-	$(am__noinst_HEADERS_DIST)
 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 \
@@ -93,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +114,6 @@
 	$(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 \
@@ -123,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libgstgl_x11include_HEADERS) \
+	$(am__noinst_HEADERS_DIST) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -235,6 +244,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -252,8 +262,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -278,8 +290,6 @@
 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@
@@ -292,7 +302,6 @@
 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@
@@ -300,6 +309,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -326,11 +337,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -349,8 +363,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -409,10 +421,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -429,7 +445,6 @@
 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@
@@ -438,7 +453,6 @@
 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@
@@ -451,7 +465,6 @@
 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@
@@ -465,6 +478,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -476,6 +490,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -514,6 +530,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -549,10 +566,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -578,6 +599,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -585,7 +609,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -614,6 +645,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -624,6 +656,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -654,17 +687,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -681,6 +713,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -719,6 +752,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -768,7 +802,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/gl/x11/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/gl/x11/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1098,6 +1131,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-libgstgl_x11includeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.c b/gst-libs/gst/gl/x11/gstglcontext_glx.c
index 7487faf..bc83230 100644
--- a/gst-libs/gst/gl/x11/gstglcontext_glx.c
+++ b/gst-libs/gst/gl/x11/gstglcontext_glx.c
@@ -36,8 +36,9 @@
 
 #include <gst/gl/gl.h>
 #include "gstglcontext_glx.h"
+#include "../utils/opengl_versions.h"
 
-#define GST_CAT_DEFAULT gst_gl_window_debug
+#define GST_CAT_DEFAULT gst_gl_context_debug
 
 #define gst_gl_context_glx_parent_class parent_class
 G_DEFINE_TYPE (GstGLContextGLX, gst_gl_context_glx, GST_GL_TYPE_CONTEXT);
@@ -57,8 +58,6 @@
 GstGLAPI gst_gl_context_glx_get_gl_api (GstGLContext * context);
 static GstGLPlatform gst_gl_context_glx_get_gl_platform (GstGLContext *
     context);
-static gpointer gst_gl_context_glx_get_proc_address (GstGLContext * context,
-    const gchar * name);
 
 struct _GstGLContextGLXPrivate
 {
@@ -96,6 +95,8 @@
       GST_DEBUG_FUNCPTR (gst_gl_context_glx_get_gl_platform);
   context_class->get_proc_address =
       GST_DEBUG_FUNCPTR (gst_gl_context_glx_get_proc_address);
+  context_class->get_current_context =
+      GST_DEBUG_FUNCPTR (gst_gl_context_glx_get_current_context);
 }
 
 static void
@@ -105,11 +106,13 @@
 }
 
 GstGLContextGLX *
-gst_gl_context_glx_new (void)
+gst_gl_context_glx_new (GstGLDisplay * display)
 {
-  GstGLContextGLX *window = g_object_new (GST_GL_TYPE_CONTEXT_GLX, NULL);
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_X11) == 0)
+    /* we require an x11 display handle to create GLX contexts */
+    return NULL;
 
-  return window;
+  return g_object_new (GST_GL_TYPE_CONTEXT_GLX, NULL);
 }
 
 static inline void
@@ -135,6 +138,51 @@
   GST_DEBUG ("stencil: %d", val);
 }
 
+static GLXContext
+_create_context_with_flags (GstGLContextGLX * context_glx, Display * dpy,
+    GLXFBConfig fbconfig, GLXContext share_context, gint major, gint minor,
+    gint contextFlags, gint profileMask)
+{
+  GLXContext ret;
+#define N_ATTRIBS 20
+  gint attribs[N_ATTRIBS];
+  int x_error = 0;
+  gint n = 0;
+
+  if (major) {
+    attribs[n++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
+    attribs[n++] = major;
+  }
+  if (minor) {
+    attribs[n++] = GLX_CONTEXT_MINOR_VERSION_ARB;
+    attribs[n++] = minor;
+  }
+  if (contextFlags) {
+    attribs[n++] = GLX_CONTEXT_FLAGS_ARB;
+    attribs[n++] = contextFlags;
+  }
+#ifdef GLX_ARB_create_context_profile
+  if (profileMask) {
+    attribs[n++] = GLX_CONTEXT_PROFILE_MASK_ARB;
+    attribs[n++] = profileMask;
+  }
+#endif
+  attribs[n++] = None;
+
+  g_assert (n < N_ATTRIBS);
+#undef N_ATTRIBS
+
+  gst_gl_window_x11_trap_x_errors ();
+  ret = context_glx->priv->glXCreateContextAttribsARB (dpy, fbconfig,
+      share_context, True, attribs);
+  x_error = gst_gl_window_x11_untrap_x_errors ();
+
+  if (x_error)
+    ret = 0;
+
+  return ret;
+}
+
 static gboolean
 gst_gl_context_glx_create_context (GstGLContext * context,
     GstGLAPI gl_api, GstGLContext * other_context, GError ** error)
@@ -145,7 +193,6 @@
   GstGLDisplay *display;
   gboolean create_context;
   const char *glx_exts;
-  int x_error;
   Display *device;
   guintptr external_gl_context = 0;
 
@@ -173,46 +220,38 @@
       (gpointer) glXGetProcAddressARB ((const GLubyte *)
       "glXCreateContextAttribsARB");
 
-  if (create_context && context_glx->priv->glXCreateContextAttribsARB) {
-    int context_attribs_3[] = {
-      GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
-      GLX_CONTEXT_MINOR_VERSION_ARB, 0,
-      //GLX_CONTEXT_FLAGS_ARB        , GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
-      None
-    };
+  if (!context_glx->glx_context && gl_api & GST_GL_API_OPENGL3 && create_context
+      && context_glx->priv->glXCreateContextAttribsARB) {
+    gint i;
 
-    int context_attribs_pre_3[] = {
-      GLX_CONTEXT_MAJOR_VERSION_ARB, 1,
-      GLX_CONTEXT_MINOR_VERSION_ARB, 4,
-      None
-    };
+    for (i = 0; i < G_N_ELEMENTS (opengl_versions); i++) {
+      gint profileMask = 0;
+      gint contextFlags = 0;
 
-    gst_gl_window_x11_trap_x_errors ();
-    context_glx->glx_context =
-        context_glx->priv->glXCreateContextAttribsARB (device,
-        context_glx->priv->fbconfigs[0], (GLXContext) external_gl_context, True,
-        context_attribs_3);
+      if ((opengl_versions[i].major > 3
+              || (opengl_versions[i].major == 3
+                  && opengl_versions[i].minor >= 2))) {
+        profileMask |= GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+        contextFlags |= GLX_CONTEXT_DEBUG_BIT_ARB;
+      } else {
+        break;
+      }
 
-    x_error = gst_gl_window_x11_untrap_x_errors ();
-    context_glx->priv->context_api = GST_GL_API_OPENGL3 | GST_GL_API_OPENGL;
+      GST_DEBUG_OBJECT (context, "trying to create a GL %d.%d context",
+          opengl_versions[i].major, opengl_versions[i].minor);
 
-    if (!context_glx->glx_context || x_error != 0) {
-      GST_DEBUG ("Failed to create an Opengl 3 context. trying a legacy one");
+      context_glx->glx_context = _create_context_with_flags (context_glx,
+          device, context_glx->priv->fbconfigs[0],
+          (GLXContext) external_gl_context, opengl_versions[i].major,
+          opengl_versions[i].minor, contextFlags, profileMask);
 
-      gst_gl_window_x11_trap_x_errors ();
-      context_glx->glx_context =
-          context_glx->priv->glXCreateContextAttribsARB (device,
-          context_glx->priv->fbconfigs[0], (GLXContext) external_gl_context,
-          True, context_attribs_pre_3);
-
-      x_error = gst_gl_window_x11_untrap_x_errors ();
-
-      if (x_error != 0)
-        context_glx->glx_context = NULL;
-      context_glx->priv->context_api = GST_GL_API_OPENGL;
+      if (context_glx->glx_context) {
+        context_glx->priv->context_api = GST_GL_API_OPENGL3;
+        break;
+      }
     }
-
-  } else {
+  }
+  if (!context_glx->glx_context && gl_api & GST_GL_API_OPENGL) {
     context_glx->glx_context =
         glXCreateContext (device, window_x11->visual_info,
         (GLXContext) external_gl_context, TRUE);
@@ -416,14 +455,20 @@
   return GST_GL_PLATFORM_GLX;
 }
 
-static gpointer
-gst_gl_context_glx_get_proc_address (GstGLContext * context, const gchar * name)
+gpointer
+gst_gl_context_glx_get_proc_address (GstGLAPI gl_api, const gchar * name)
 {
   gpointer result;
 
-  if (!(result = gst_gl_context_default_get_proc_address (context, name))) {
+  if (!(result = gst_gl_context_default_get_proc_address (gl_api, name))) {
     result = glXGetProcAddressARB ((const GLubyte *) name);
   }
 
   return result;
 }
+
+guintptr
+gst_gl_context_glx_get_current_context (void)
+{
+  return (guintptr) glXGetCurrentContext ();
+}
diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.h b/gst-libs/gst/gl/x11/gstglcontext_glx.h
index eca8d7f..e015108 100644
--- a/gst-libs/gst/gl/x11/gstglcontext_glx.h
+++ b/gst-libs/gst/gl/x11/gstglcontext_glx.h
@@ -59,7 +59,9 @@
 
 GType gst_gl_context_glx_get_type     (void);
 
-GstGLContextGLX * gst_gl_context_glx_new (void);
+GstGLContextGLX *   gst_gl_context_glx_new                  (GstGLDisplay * display);
+guintptr            gst_gl_context_glx_get_current_context  (void);
+gpointer            gst_gl_context_glx_get_proc_address     (GstGLAPI gl_api, const gchar * name);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c
index d097012..29c2aea 100644
--- a/gst-libs/gst/gl/x11/gstglwindow_x11.c
+++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c
@@ -31,6 +31,8 @@
 #include "x11_event_source.h"
 #include "gstglwindow_x11.h"
 #include "gstgldisplay_x11.h"
+/* for XkbKeycodeToKeysym */
+#include <X11/XKBlib.h>
 
 #define GST_GL_WINDOW_X11_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Private))
@@ -56,6 +58,11 @@
 {
   gboolean activate;
   gboolean activate_result;
+
+  gint preferred_width;
+  gint preferred_height;
+
+  gboolean handle_events;
 };
 
 guintptr gst_gl_window_x11_get_display (GstGLWindow * window);
@@ -64,22 +71,21 @@
 void gst_gl_window_x11_set_window_handle (GstGLWindow * window,
     guintptr handle);
 guintptr gst_gl_window_x11_get_window_handle (GstGLWindow * window);
-void gst_gl_window_x11_draw_unlocked (GstGLWindow * window, guint width,
-    guint height);
-void gst_gl_window_x11_draw (GstGLWindow * window, guint width, guint height);
-void gst_gl_window_x11_run (GstGLWindow * window);
-void gst_gl_window_x11_quit (GstGLWindow * window);
-void gst_gl_window_x11_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy);
+static void gst_gl_window_x11_set_preferred_size (GstGLWindow * window,
+    gint width, gint height);
+void gst_gl_window_x11_show (GstGLWindow * window);
+void gst_gl_window_x11_draw_unlocked (GstGLWindow * window);
+void gst_gl_window_x11_draw (GstGLWindow * window);
 gboolean gst_gl_window_x11_create_context (GstGLWindow * window,
     GstGLAPI gl_api, guintptr external_gl_context, GError ** error);
 gboolean gst_gl_window_x11_open (GstGLWindow * window, GError ** error);
 void gst_gl_window_x11_close (GstGLWindow * window);
+void gst_gl_window_x11_handle_events (GstGLWindow * window,
+    gboolean handle_events);
 
 static void
 gst_gl_window_x11_finalize (GObject * object)
 {
-  g_return_if_fail (GST_GL_IS_WINDOW_X11 (object));
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
@@ -101,12 +107,13 @@
   window_class->draw_unlocked =
       GST_DEBUG_FUNCPTR (gst_gl_window_x11_draw_unlocked);
   window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_x11_draw);
-  window_class->run = GST_DEBUG_FUNCPTR (gst_gl_window_x11_run);
-  window_class->quit = GST_DEBUG_FUNCPTR (gst_gl_window_x11_quit);
-  window_class->send_message_async =
-      GST_DEBUG_FUNCPTR (gst_gl_window_x11_send_message_async);
   window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_x11_open);
   window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_x11_close);
+  window_class->handle_events =
+      GST_DEBUG_FUNCPTR (gst_gl_window_x11_handle_events);
+  window_class->set_preferred_size =
+      GST_DEBUG_FUNCPTR (gst_gl_window_x11_set_preferred_size);
+  window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_x11_show);
 }
 
 static void
@@ -119,17 +126,14 @@
 GstGLWindowX11 *
 gst_gl_window_x11_new (GstGLDisplay * display)
 {
-  GstGLWindowX11 *window = NULL;
-
-  if ((display->type & GST_GL_DISPLAY_TYPE_X11) == GST_GL_DISPLAY_TYPE_NONE) {
+  if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_X11)
+      == GST_GL_DISPLAY_TYPE_NONE) {
     GST_INFO ("Wrong display type %u for this window type %u", display->type,
         GST_GL_DISPLAY_TYPE_X11);
     return NULL;
   }
 
-  window = g_object_new (GST_GL_TYPE_WINDOW_X11, NULL);
-
-  return window;
+  return g_object_new (GST_GL_TYPE_WINDOW_X11, NULL);
 }
 
 gboolean
@@ -167,11 +171,14 @@
   window_x11->device_height =
       DisplayHeight (window_x11->device, window_x11->screen_num);
 
-  window_x11->x11_source = x11_event_source_new (window_x11);
-  window_x11->main_context = g_main_context_new ();
-  window_x11->loop = g_main_loop_new (window_x11->main_context, FALSE);
+  if (!GST_GL_WINDOW_CLASS (parent_class)->open (window, error))
+    return FALSE;
 
-  g_source_attach (window_x11->x11_source, window_x11->main_context);
+  if (!display_x11->foreign_display) {
+    window_x11->x11_source = x11_event_source_new (window_x11);
+    g_source_attach (window_x11->x11_source,
+        g_main_context_get_thread_default ());
+  }
 
   window_x11->allow_extra_expose_events = TRUE;
 
@@ -225,6 +232,9 @@
       window_x11->visual_info->depth, InputOutput,
       window_x11->visual_info->visual, mask, &win_attr);
 
+  gst_gl_window_x11_handle_events (GST_GL_WINDOW (window_x11),
+      window_x11->priv->handle_events);
+
   XSync (window_x11->device, FALSE);
 
   XSetWindowBackgroundPixmap (window_x11->device,
@@ -285,23 +295,36 @@
     GST_DEBUG ("display receiver closed");
   }
 
-  g_source_destroy (window_x11->x11_source);
-  g_source_unref (window_x11->x11_source);
-  window_x11->x11_source = NULL;
-  g_main_loop_unref (window_x11->loop);
-  window_x11->loop = NULL;
-  g_main_context_unref (window_x11->main_context);
-  window_x11->main_context = NULL;
+  if (window_x11->x11_source) {
+    g_source_destroy (window_x11->x11_source);
+    g_source_unref (window_x11->x11_source);
+    window_x11->x11_source = NULL;
+  }
 
   window_x11->running = FALSE;
+
+  GST_GL_WINDOW_CLASS (parent_class)->close (window);
 }
 
-static void
-set_window_handle_cb (gpointer data)
+/* called by the gl thread */
+void
+gst_gl_window_x11_set_window_handle (GstGLWindow * window, guintptr id)
 {
-  GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (data);
+  GstGLWindowX11 *window_x11;
   XWindowAttributes attr;
 
+  window_x11 = GST_GL_WINDOW_X11 (window);
+
+  window_x11->parent_win = (Window) id;
+
+  /* XXX: seems to be needed for the difference between gtk videooverlay and
+   * the embedding gl into gtk directly */
+  if (id && !window_x11->x11_source) {
+    window_x11->x11_source = x11_event_source_new (window_x11);
+    g_source_attach (window_x11->x11_source,
+        g_main_context_get_thread_default ());
+  }
+
   XGetWindowAttributes (window_x11->device, window_x11->parent_win, &attr);
 
   XResizeWindow (window_x11->device, window_x11->internal_win_id,
@@ -313,28 +336,6 @@
   XSync (window_x11->device, FALSE);
 }
 
-/* Not called by the gl thread */
-void
-gst_gl_window_x11_set_window_handle (GstGLWindow * window, guintptr id)
-{
-  GstGLWindowX11 *window_x11;
-
-  window_x11 = GST_GL_WINDOW_X11 (window);
-
-  window_x11->parent_win = (Window) id;
-
-  /* The loop may not exist yet because it's created in GstGLWindow::open
-   * which is only called when going from READY to PAUSED state.
-   * If no loop then the parent is directly set in XCreateWindow
-   */
-  if (window_x11->loop && g_main_loop_is_running (window_x11->loop)) {
-    GST_LOG ("set parent window id: %" G_GUINTPTR_FORMAT, id);
-
-    gst_gl_window_send_message (window, (GstGLWindowCB) set_window_handle_cb,
-        window_x11);
-  }
-}
-
 guintptr
 gst_gl_window_x11_get_window_handle (GstGLWindow * window)
 {
@@ -345,17 +346,62 @@
   return window_x11->internal_win_id;
 }
 
+static void
+gst_gl_window_x11_set_preferred_size (GstGLWindow * window, gint width,
+    gint height)
+{
+  GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
+
+  window_x11->priv->preferred_width = width;
+  window_x11->priv->preferred_height = height;
+}
+
+static void
+_show_window (GstGLWindow * window)
+{
+  GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
+  guint width = window_x11->priv->preferred_width;
+  guint height = window_x11->priv->preferred_height;
+  XWindowAttributes attr;
+
+  XGetWindowAttributes (window_x11->device, window_x11->internal_win_id, &attr);
+
+  if (!window_x11->visible) {
+
+    if (!window_x11->parent_win) {
+      attr.width = width;
+      attr.height = height;
+      XResizeWindow (window_x11->device, window_x11->internal_win_id,
+          attr.width, attr.height);
+      XSync (window_x11->device, FALSE);
+    }
+
+    XMapWindow (window_x11->device, window_x11->internal_win_id);
+    window_x11->visible = TRUE;
+  }
+}
+
+void
+gst_gl_window_x11_show (GstGLWindow * window)
+{
+  gst_gl_window_send_message (window, (GstGLWindowCB) _show_window, window);
+}
+
 /* Called in the gl thread */
 void
-gst_gl_window_x11_draw_unlocked (GstGLWindow * window, guint width,
-    guint height)
+gst_gl_window_x11_draw_unlocked (GstGLWindow * window)
 {
-  GstGLWindowX11 *window_x11;
+  GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
 
-  window_x11 = GST_GL_WINDOW_X11 (window);
-
-  if (g_main_loop_is_running (window_x11->loop)
+  if (gst_gl_window_is_running (GST_GL_WINDOW (window_x11))
       && window_x11->allow_extra_expose_events) {
+    if (window->queue_resize) {
+      guint width, height;
+
+      gst_gl_window_get_surface_dimensions (window, &width, &height);
+      gst_gl_window_resize (window, width, height);
+    }
+
     if (window->draw) {
       GstGLContext *context = gst_gl_window_get_context (window);
       GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
@@ -368,40 +414,17 @@
   }
 }
 
-struct draw
-{
-  GstGLWindowX11 *window;
-  guint width, height;
-};
-
 static void
 draw_cb (gpointer data)
 {
-  struct draw *draw_data = data;
-  GstGLWindowX11 *window_x11 = draw_data->window;
-  guint width = draw_data->width;
-  guint height = draw_data->height;
+  GstGLWindowX11 *window_x11 = data;
 
-  if (g_main_loop_is_running (window_x11->loop)) {
+  if (gst_gl_window_is_running (GST_GL_WINDOW (window_x11))) {
     XWindowAttributes attr;
 
     XGetWindowAttributes (window_x11->device, window_x11->internal_win_id,
         &attr);
 
-    if (!window_x11->visible) {
-
-      if (!window_x11->parent_win) {
-        attr.width = width;
-        attr.height = height;
-        XResizeWindow (window_x11->device, window_x11->internal_win_id,
-            attr.width, attr.height);
-        XSync (window_x11->device, FALSE);
-      }
-
-      XMapWindow (window_x11->device, window_x11->internal_win_id);
-      window_x11->visible = TRUE;
-    }
-
     if (window_x11->parent_win) {
       XWindowAttributes attr_parent;
       XGetWindowAttributes (window_x11->device, window_x11->parent_win,
@@ -420,32 +443,15 @@
       }
     }
 
-    gst_gl_window_x11_draw_unlocked (GST_GL_WINDOW (window_x11), width, height);
+    gst_gl_window_x11_draw_unlocked (GST_GL_WINDOW (window_x11));
   }
 }
 
 /* Not called by the gl thread */
 void
-gst_gl_window_x11_draw (GstGLWindow * window, guint width, guint height)
+gst_gl_window_x11_draw (GstGLWindow * window)
 {
-  struct draw draw_data;
-
-  draw_data.window = GST_GL_WINDOW_X11 (window);
-  draw_data.width = width;
-  draw_data.height = height;
-
-  /* Call from the GL thread */
-  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, &draw_data);
-}
-
-void
-gst_gl_window_x11_run (GstGLWindow * window)
-{
-  GstGLWindowX11 *window_x11;
-
-  window_x11 = GST_GL_WINDOW_X11 (window);
-
-  g_main_loop_run (window_x11->loop);
+  gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window);
 }
 
 static inline const gchar *
@@ -476,11 +482,44 @@
       return "SelectionRequest";
     case ClientMessage:
       return "ClientMessage";
+    case KeyPress:
+      return "KeyPress";
+    case KeyRelease:
+      return "KeyRelease";
+    case ButtonPress:
+      return "ButtonPress";
+    case ButtonRelease:
+      return "ButtonRelease";
+    case MotionNotify:
+      return "MotionNotify";
     default:
       return "unknown";
   }
 }
 
+void
+gst_gl_window_x11_handle_events (GstGLWindow * window, gboolean handle_events)
+{
+  GstGLWindowX11 *window_x11;
+
+  g_return_if_fail (window != NULL);
+
+  window_x11 = GST_GL_WINDOW_X11 (window);
+
+  window_x11->priv->handle_events = handle_events;
+
+  if (window_x11->internal_win_id) {
+    if (handle_events) {
+      XSelectInput (window_x11->device, window_x11->internal_win_id,
+          StructureNotifyMask | ExposureMask | VisibilityChangeMask |
+          PointerMotionMask | KeyPressMask | KeyReleaseMask);
+    } else {
+      XSelectInput (window_x11->device, window_x11->internal_win_id,
+          StructureNotifyMask | ExposureMask | VisibilityChangeMask);
+    }
+  }
+}
+
 gboolean
 gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
 {
@@ -488,10 +527,14 @@
   GstGLContextClass *context_class;
   GstGLWindow *window;
   gboolean ret = TRUE;
+  const char *key_str = NULL;
+  KeySym keysym;
+  struct mouse_event *mouse_data;
+  struct key_event *key_data;
 
   window = GST_GL_WINDOW (window_x11);
 
-  if (g_main_loop_is_running (window_x11->loop)
+  if (gst_gl_window_is_running (window)
       && XPending (window_x11->device)) {
     XEvent event;
 
@@ -526,9 +569,8 @@
       case CreateNotify:
       case ConfigureNotify:
       {
-        if (window->resize)
-          window->resize (window->resize_data, event.xconfigure.width,
-              event.xconfigure.height);
+        gst_gl_window_resize (window, event.xconfigure.width,
+            event.xconfigure.height);
         break;
       }
 
@@ -559,7 +601,50 @@
       case VisibilityNotify:
         /* actually nothing to do here */
         break;
+      case KeyPress:
+      case KeyRelease:
+        keysym = XkbKeycodeToKeysym (window_x11->device,
+            event.xkey.keycode, 0, 0);
+        key_str = XKeysymToString (keysym);
+        key_data = g_slice_new (struct key_event);
+        key_data->window = window;
+        key_data->key_str = XKeysymToString (keysym);
+        key_data->event_type =
+            event.type == KeyPress ? "key-press" : "key-release";
+        GST_DEBUG ("input event key %d pressed over window at %d,%d (%s)",
+            event.xkey.keycode, event.xkey.x, event.xkey.y, key_str);
+        g_main_context_invoke (window->navigation_context,
+            (GSourceFunc) gst_gl_window_key_event_cb, key_data);
+        break;
+      case ButtonPress:
+      case ButtonRelease:
+        GST_DEBUG ("input event mouse button %d pressed over window at %d,%d",
+            event.xbutton.button, event.xbutton.x, event.xbutton.y);
+        mouse_data = g_slice_new (struct mouse_event);
+        mouse_data->window = window;
+        mouse_data->event_type =
+            event.type ==
+            ButtonPress ? "mouse-button-press" : "mouse-button-release";
+        mouse_data->button = event.xbutton.button;
+        mouse_data->posx = (double) event.xbutton.x;
+        mouse_data->posy = (double) event.xbutton.y;
 
+        g_main_context_invoke (window->navigation_context,
+            (GSourceFunc) gst_gl_window_mouse_event_cb, mouse_data);
+        break;
+      case MotionNotify:
+        GST_DEBUG ("input event pointer moved over window at %d,%d",
+            event.xmotion.x, event.xmotion.y);
+        mouse_data = g_slice_new (struct mouse_event);
+        mouse_data->window = window;
+        mouse_data->event_type = "mouse-move";
+        mouse_data->button = 0;
+        mouse_data->posx = (double) event.xbutton.x;
+        mouse_data->posy = (double) event.xbutton.y;
+
+        g_main_context_invoke (window->navigation_context, (GSourceFunc)
+            gst_gl_window_mouse_event_cb, mouse_data);
+        break;
       default:
         GST_DEBUG ("unknown XEvent type: %u", event.type);
         break;
@@ -569,60 +654,6 @@
   return ret;
 }
 
-/* Not called by the gl thread */
-void
-gst_gl_window_x11_quit (GstGLWindow * window)
-{
-  GstGLWindowX11 *window_x11;
-
-  window_x11 = GST_GL_WINDOW_X11 (window);
-
-  GST_LOG ("sending quit");
-
-  g_main_loop_quit (window_x11->loop);
-
-  GST_LOG ("quit sent");
-}
-
-typedef struct _GstGLMessage
-{
-  GstGLWindowCB callback;
-  gpointer data;
-  GDestroyNotify destroy;
-} GstGLMessage;
-
-static gboolean
-_run_message (GstGLMessage * message)
-{
-  if (message->callback)
-    message->callback (message->data);
-
-  if (message->destroy)
-    message->destroy (message->data);
-
-  g_slice_free (GstGLMessage, message);
-
-  return FALSE;
-}
-
-void
-gst_gl_window_x11_send_message_async (GstGLWindow * window,
-    GstGLWindowCB callback, gpointer data, GDestroyNotify destroy)
-{
-  GstGLWindowX11 *window_x11;
-  GstGLMessage *message;
-
-  window_x11 = GST_GL_WINDOW_X11 (window);
-  message = g_slice_new (GstGLMessage);
-
-  message->callback = callback;
-  message->data = data;
-  message->destroy = destroy;
-
-  g_main_context_invoke (window_x11->main_context, (GSourceFunc) _run_message,
-      message);
-}
-
 static int
 error_handler (Display * xdpy, XErrorEvent * error)
 {
diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.h b/gst-libs/gst/gl/x11/gstglwindow_x11.h
index 02a3aaa..c16a637 100644
--- a/gst-libs/gst/gl/x11/gstglwindow_x11.h
+++ b/gst-libs/gst/gl/x11/gstglwindow_x11.h
@@ -72,8 +72,6 @@
   Window        internal_win_id;
 
   GSource *x11_source;
-  GMainContext *main_context;
-  GMainLoop *loop;
 
   /*< private >*/
   GstGLWindowX11Private *priv;
diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
index 6379a0b..09eb97c 100644
--- a/gst-libs/gst/insertbin/Makefile.am
+++ b/gst-libs/gst/insertbin/Makefile.am
@@ -29,7 +29,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
 
 GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)"  GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstInsertBin \
 		--nsversion=@GST_API_VERSION@ \
@@ -73,19 +73,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstinsertbin -:STATIC libgstinsertbin-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinsertbin_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstinsertbin_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinsertbin_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstinsertbin@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/insertbin \
-	 -:HEADERS $(libgstinsertbininclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/insertbin/Makefile.in b/gst-libs/gst/insertbin/Makefile.in
index ad6a6e3..95db2a8 100644
--- a/gst-libs/gst/insertbin/Makefile.in
+++ b/gst-libs/gst/insertbin/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,9 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/insertbin
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgstinsertbin_@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 \
@@ -92,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +113,6 @@
 	$(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 \
@@ -122,6 +129,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstinsertbin_@GST_API_VERSION@include_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -217,6 +227,7 @@
 DATA = $(gir_DATA) $(typelibs_DATA)
 HEADERS = $(libgstinsertbin_@GST_API_VERSION@include_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -234,8 +245,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -260,8 +273,6 @@
 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@
@@ -274,7 +285,6 @@
 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@
@@ -282,6 +292,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -308,11 +320,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -331,8 +346,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -391,10 +404,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -411,7 +428,6 @@
 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@
@@ -420,7 +436,6 @@
 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@
@@ -433,7 +448,6 @@
 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@
@@ -447,6 +461,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -458,6 +473,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -496,6 +513,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -531,10 +549,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -560,6 +582,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -567,7 +592,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -596,6 +628,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -606,6 +639,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -636,17 +670,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -663,6 +696,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -701,6 +735,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -765,7 +800,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/insertbin/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/insertbin/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1099,9 +1133,11 @@
 	uninstall-libgstinsertbin_@GST_API_VERSION@includeHEADERS \
 	uninstall-typelibsDATA
 
+.PRECIOUS: Makefile
+
 
 @HAVE_INTROSPECTION_TRUE@GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)"  GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstInsertBin \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1134,22 +1170,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstinsertbin -:STATIC libgstinsertbin-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinsertbin_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstinsertbin_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinsertbin_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstinsertbin@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/insertbin \
-	 -:HEADERS $(libgstinsertbininclude_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/insertbin/gstinsertbin.c b/gst-libs/gst/insertbin/gstinsertbin.c
index efa0e5b..57f030a 100644
--- a/gst-libs/gst/insertbin/gstinsertbin.c
+++ b/gst-libs/gst/insertbin/gstinsertbin.c
@@ -149,6 +149,7 @@
    * @callback: the callback to call when the element has been added or not, or
    *  %NULL
    * @user_data: The data to pass to the callback
+   * @user_data2: The user data of the signal (ignored)
    *
    * This action signal adds the filter like element before any other element
    * in the bin.
@@ -168,6 +169,7 @@
    * @callback: the callback to call when the element has been added or not, or
    *  %NULL
    * @user_data: The data to pass to the callback
+   * @user_data2: The user data of the signal (ignored)
    *
    * This action signal adds the filter like element after any other element
    * in the bin.
@@ -188,6 +190,7 @@
    * @callback: the callback to call when the element has been added or not, or
    *  %NULL
    * @user_data: The data to pass to the callback
+   * @user_data2: The user data of the signal (ignored)
    *
    * This action signal adds the filter like element before the @sibling
    * element in the bin.
@@ -209,6 +212,7 @@
    * @callback: the callback to call when the element has been added or not, or
    *  %NULL
    * @user_data: The data to pass to the callback
+   * @user_data2: The user data of the signal (ignored)
    *
    * This action signal adds the filter like element after the @sibling
    * element in the bin.
@@ -231,6 +235,7 @@
    * @callback: the callback to call when the element has been removed or not,
    * or %NULL
    * @user_data: The data to pass to the callback
+   * @user_data2: The user data of the signal (ignored)
    *
    * This action signal removed the filter like element from the bin.
    *
@@ -305,7 +310,7 @@
 static gboolean
 validate_element (GstInsertBin * self, GstElement * element)
 {
-  gboolean valid = TRUE;;
+  gboolean valid = TRUE;
 
   GST_OBJECT_LOCK (element);
   if (element->numsrcpads != 1 || element->numsinkpads != 1) {
diff --git a/gst-libs/gst/interfaces/Makefile.am b/gst-libs/gst/interfaces/Makefile.am
index 6401a83..e66ab82 100644
--- a/gst-libs/gst/interfaces/Makefile.am
+++ b/gst-libs/gst/interfaces/Makefile.am
@@ -43,19 +43,3 @@
 CLEANFILES = $(BUILT_SOURCES)
 
 include $(top_srcdir)/common/gst-glib-gen.mak
-
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstphotography -:STATIC libgstphotography-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstphotography_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstphotography_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstphotography_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/photography \
-	 -:HEADERS $(libgstphotographyinclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/interfaces/Makefile.in b/gst-libs/gst/interfaces/Makefile.in
index bfc9323..f353254 100644
--- a/gst-libs/gst/interfaces/Makefile.in
+++ b/gst-libs/gst/interfaces/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,9 +98,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(libgstphotographyinclude_HEADERS)
 subdir = gst-libs/gst/interfaces
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -99,6 +106,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -112,7 +120,6 @@
 	$(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 \
@@ -129,6 +136,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstphotographyinclude_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -247,6 +256,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gst-glib-gen.mak $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -264,8 +275,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -290,8 +303,6 @@
 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@
@@ -304,7 +315,6 @@
 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@
@@ -312,6 +322,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -338,11 +350,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -361,8 +376,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -421,10 +434,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -441,7 +458,6 @@
 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@
@@ -450,7 +466,6 @@
 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@
@@ -463,7 +478,6 @@
 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@
@@ -477,6 +491,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -488,6 +503,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -526,6 +543,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -561,10 +579,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -590,6 +612,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -597,7 +622,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -626,6 +658,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -636,6 +669,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -666,17 +700,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -693,6 +726,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -731,6 +765,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -805,7 +840,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/interfaces/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/interfaces/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -814,7 +848,7 @@
 	    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/gst-glib-gen.mak:
+$(top_srcdir)/common/gst-glib-gen.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1175,6 +1209,8 @@
 	uninstall-libgstphotographyincludeHEADERS \
 	uninstall-nodist_libgstphotographyincludeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # these are all the rules generating the relevant files
 $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
@@ -1212,22 +1248,6 @@
 .deps/%-enumtypes.Plo:
 	@touch $@
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstphotography -:STATIC libgstphotography-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstphotography_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstphotography_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstphotography_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstphotography_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/photography \
-	 -:HEADERS $(libgstphotographyinclude_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/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
index 0cee304..2511d49 100644
--- a/gst-libs/gst/mpegts/Makefile.am
+++ b/gst-libs/gst/mpegts/Makefile.am
@@ -63,7 +63,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
 
 GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)"  GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstMpegts \
 		--nsversion=@GST_API_VERSION@ \
@@ -109,20 +109,4 @@
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstmpegts -:STATIC libgstmpegts-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegts_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstmpegts_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegts_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstmpegts@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/mpegts \
-	 -:HEADERS $(libgstmpegtsinclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 include $(top_srcdir)/common/gst-glib-gen.mak
diff --git a/gst-libs/gst/mpegts/Makefile.in b/gst-libs/gst/mpegts/Makefile.in
index 0d9b027..39fc506 100644
--- a/gst-libs/gst/mpegts/Makefile.in
+++ b/gst-libs/gst/mpegts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -90,11 +100,6 @@
 host_triplet = @host@
 target_triplet = @target@
 @HAVE_INTROSPECTION_TRUE@am__append_1 = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgstmpegts_@GST_API_VERSION@include_HEADERS) \
-	$(noinst_HEADERS)
 subdir = gst-libs/gst/mpegts
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -103,6 +108,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -116,7 +122,6 @@
 	$(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 \
@@ -133,6 +138,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgstmpegts_@GST_API_VERSION@include_HEADERS) \
+	$(noinst_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -256,6 +264,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gst-glib-gen.mak $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -273,8 +283,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -299,8 +311,6 @@
 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@
@@ -313,7 +323,6 @@
 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@
@@ -321,6 +330,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -347,11 +358,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -370,8 +384,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -430,10 +442,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -450,7 +466,6 @@
 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@
@@ -459,7 +474,6 @@
 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@
@@ -472,7 +486,6 @@
 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@
@@ -486,6 +499,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -497,6 +511,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -535,6 +551,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -570,10 +587,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -599,6 +620,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -606,7 +630,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -635,6 +666,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -645,6 +677,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -675,17 +708,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -702,6 +734,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -740,6 +773,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -838,7 +872,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/mpegts/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/mpegts/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -847,7 +880,7 @@
 	    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/gst-glib-gen.mak:
+$(top_srcdir)/common/gst-glib-gen.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1289,9 +1322,11 @@
 	uninstall-nodist_libgstmpegts_@GST_API_VERSION@includeHEADERS \
 	uninstall-typelibsDATA
 
+.PRECIOUS: Makefile
+
 
 @HAVE_INTROSPECTION_TRUE@GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)"  GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstMpegts \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1325,22 +1360,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgstmpegts -:STATIC libgstmpegts-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegts_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgstmpegts_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegts_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstmpegts@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/mpegts \
-	 -:HEADERS $(libgstmpegtsinclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # these are all the rules generating the relevant files
 $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
 	$(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \
diff --git a/gst-libs/gst/mpegts/gst-atsc-section.c b/gst-libs/gst/mpegts/gst-atsc-section.c
index 459a323..7532548 100644
--- a/gst-libs/gst/mpegts/gst-atsc-section.c
+++ b/gst-libs/gst/mpegts/gst-atsc-section.c
@@ -193,7 +193,6 @@
       gst_mpegts_parse_descriptors (data, descriptors_loop_length);
   if (vct->descriptors == NULL)
     goto error;
-  data += descriptors_loop_length;
 
   return (gpointer) vct;
 
@@ -361,7 +360,6 @@
   }
   mgt->descriptors =
       gst_mpegts_parse_descriptors (data, descriptors_loop_length);
-  data += descriptors_loop_length;
 
   return (gpointer) mgt;
 
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index 29b2442..ea33a1d 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -178,7 +178,7 @@
   guint8 *data;
 
   g_return_val_if_fail (descriptor != NULL && stuffing_bytes != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_STUFFING, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_STUFFING, FALSE);
 
   data = (guint8 *) descriptor->data + 2;
 
@@ -872,7 +872,7 @@
   guint8 *data;
 
   g_return_val_if_fail (descriptor != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_TELETEXT, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_TELETEXT, FALSE);
 
   if (descriptor->length / 5 <= idx)
     return FALSE;
@@ -907,7 +907,7 @@
     descriptor)
 {
   g_return_val_if_fail (descriptor != NULL, 0);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_TELETEXT, 0, 0);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_TELETEXT, FALSE);
 
   return descriptor->length / 5;
 }
@@ -938,7 +938,7 @@
   guint8 *data;
 
   g_return_val_if_fail (descriptor != NULL && lang != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_SUBTITLING, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_SUBTITLING, FALSE);
 
   /* If we went too far, return FALSE */
   if (descriptor->length / 8 <= idx)
@@ -973,7 +973,7 @@
     descriptor)
 {
   g_return_val_if_fail (descriptor != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_SUBTITLING, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_SUBTITLING, FALSE);
 
   return descriptor->length / 8;
 }
@@ -1281,7 +1281,7 @@
   guint8 i;
 
   g_return_val_if_fail (descriptor != NULL && content != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_CONTENT, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_CONTENT, FALSE);
 
   data = (guint8 *) descriptor->data + 2;
   len = descriptor->length;
@@ -1330,7 +1330,8 @@
   guint i;
 
   g_return_val_if_fail (descriptor != NULL && rating != NULL, FALSE);
-  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_PARENTAL_RATING, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DVB_PARENTAL_RATING,
+      FALSE);
 
   data = (guint8 *) descriptor->data + 2;
 
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index ac7d9d4..e7f6e70 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -483,7 +483,7 @@
 
 /**
  * GstMpegtsExtendedEventDescriptor:
- * @desctiptor_number:
+ * @descriptor_number:
  * @last_descriptor_number:
  * @language_code: NULL terminated language code.
  * @items: (element-type GstMpegtsExtendedEventItem): the #GstMpegtsExtendedEventItem
diff --git a/gst-libs/gst/mpegts/gst-dvb-section.c b/gst-libs/gst/mpegts/gst-dvb-section.c
index 03615b4..46fc634 100644
--- a/gst-libs/gst/mpegts/gst-dvb-section.c
+++ b/gst-libs/gst/mpegts/gst-dvb-section.c
@@ -13,7 +13,7 @@
  *   Zaheer Abbas Merali <zaheerabbas at merali dot org>
  *   Edward Hervey <edward@collabora.com>
  *
- * This library is free softwagre; you can redistribute it and/or
+ * 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.
@@ -360,7 +360,7 @@
     g_ptr_array_add (bat->streams, stream);
 
     if (transport_stream_loop_length < 6) {
-      /* each entry must be at least 6 bytes (+ 4bytes CRC) */
+      /* each entry must be at least 6 bytes (+ 4 bytes CRC) */
       GST_WARNING ("PID %d invalid BAT entry size %d",
           section->pid, transport_stream_loop_length);
       goto error;
@@ -383,7 +383,7 @@
       GST_WARNING
           ("PID %d invalid BAT entry %d descriptors loop length %d (only have %"
           G_GSIZE_FORMAT ")", section->pid, section->subtable_extension,
-          descriptors_loop_length, end - 4 - data);
+          descriptors_loop_length, (gsize) (end - 4 - data));
       goto error;
     }
     stream->descriptors =
@@ -541,7 +541,7 @@
     g_ptr_array_add (nit->streams, stream);
 
     if (transport_stream_loop_length < 6) {
-      /* each entry must be at least 6 bytes (+ 4bytes CRC) */
+      /* each entry must be at least 6 bytes (+ 4 bytes CRC) */
       GST_WARNING ("PID %d invalid NIT entry size %d",
           section->pid, transport_stream_loop_length);
       goto error;
@@ -564,7 +564,7 @@
       GST_WARNING
           ("PID %d invalid NIT entry %d descriptors loop length %d (only have %"
           G_GSIZE_FORMAT ")", section->pid, section->subtable_extension,
-          descriptors_loop_length, end - 4 - data);
+          descriptors_loop_length, (gsize) (end - 4 - data));
       goto error;
     }
     stream->descriptors =
diff --git a/gst-libs/gst/mpegts/gstmpegts-private.h b/gst-libs/gst/mpegts/gstmpegts-private.h
index 5dcbe56..41f7509 100644
--- a/gst-libs/gst/mpegts/gstmpegts-private.h
+++ b/gst-libs/gst/mpegts/gstmpegts-private.h
@@ -5,7 +5,7 @@
  * Authors:
  *   Edward Hervey <edward@collabora.com>
  *
- * This library is free softwagre; you can redistribute it and/or
+ * 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.
diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
index 06c9f33..da8419c 100644
--- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
+++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
@@ -190,7 +190,7 @@
       if (table < 17)
         encoding = _ICONV_UNKNOWN + table;
       else
-        encoding = _ICONV_UNKNOWN;;
+        encoding = _ICONV_UNKNOWN;
       *start_text = 3;
       break;
     }
@@ -775,7 +775,7 @@
   }
 
   GST_DEBUG ("Saw %d descriptors, read %" G_GSIZE_FORMAT " bytes",
-      nb_desc, data - buffer);
+      nb_desc, (gsize) (data - buffer));
 
   if (data - buffer != buf_len) {
     GST_WARNING ("descriptors size %d expected %" G_GSIZE_FORMAT,
@@ -969,7 +969,7 @@
 
   g_return_val_if_fail (descriptor != NULL && desc != NULL, FALSE);
   /* This descriptor can be empty, no size check needed */
-  __common_desc_checks (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, FALSE);
 
   data = (guint8 *) descriptor->data + 2;
 
@@ -1011,7 +1011,7 @@
 
   g_return_val_if_fail (descriptor != NULL && lang != NULL, FALSE);
   /* This descriptor can be empty, no size check needed */
-  __common_desc_checks (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, FALSE);
 
   if (descriptor->length / 4 <= idx)
     return FALSE;
@@ -1040,7 +1040,7 @@
 {
   g_return_val_if_fail (descriptor != NULL, 0);
   /* This descriptor can be empty, no size check needed */
-  __common_desc_checks (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_ISO_639_LANGUAGE, FALSE);
 
   return descriptor->length / 4;
 }
@@ -1063,7 +1063,8 @@
 
   g_return_val_if_fail (descriptor != NULL && res != NULL, FALSE);
   /* This descriptor loop can be empty, no size check required */
-  __common_desc_checks (descriptor, GST_MTS_DESC_DTG_LOGICAL_CHANNEL, 0, FALSE);
+  __common_desc_check_base (descriptor, GST_MTS_DESC_DTG_LOGICAL_CHANNEL,
+      FALSE);
 
   data = (guint8 *) descriptor->data + 2;
 
diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c
index 527ff38..dc62ac3 100644
--- a/gst-libs/gst/mpegts/gstmpegtssection.c
+++ b/gst-libs/gst/mpegts/gstmpegtssection.c
@@ -13,7 +13,7 @@
  *   Zaheer Abbas Merali <zaheerabbas at merali dot org>
  *   Edward Hervey <edward@collabora.com>
  *
- * This library is free softwagre; you can redistribute it and/or
+ * 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.
@@ -49,7 +49,7 @@
  * @include: gst/mpegts/mpegts.h
  *
  * For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications
- * and other specifications mentionned in the documentation.
+ * and other specifications mentioned in the documentation.
  */
 
 /*
@@ -127,7 +127,7 @@
   0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
 };
 
-/* _calc_crc32 relicenced to LGPL from fluendo ts demuxer */
+/* _calc_crc32 relicensed to LGPL from fluendo ts demuxer */
 guint32
 _calc_crc32 (const guint8 * data, guint datalen)
 {
@@ -656,7 +656,7 @@
 
   GST_DEBUG ("Parsing %d Program Map Table", section->subtable_extension);
 
-  /* Assign program number from subtable extenstion,
+  /* Assign program number from subtable extension,
      and skip already parsed data */
   pmt->program_number = section->subtable_extension;
   data += 8;
@@ -929,7 +929,7 @@
  * gst_mpegts_section_get_cat:
  * @section: a #GstMpegtsSection of type %GST_MPEGTS_SECTION_CAT
  *
- * Returns the array of #GstMpegtsDescriptor contained in the Condtional
+ * Returns the array of #GstMpegtsDescriptor contained in the Conditional
  * Access Table.
  *
  * Returns: (transfer container) (element-type GstMpegtsDescriptor): The
@@ -1128,9 +1128,12 @@
       GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x7000);
   }
 
-  if (!section->short_section)
-    *data |= 0x80;
+  /* short sections do not contain any further fields */
+  if (section->short_section)
+    return;
 
+  /* Set section_syntax_indicator bit since we do not have a short section */
+  *data |= 0x80;
   data += 2;
 
   /* subtable_extension               - 16 bit uimsbf */
@@ -1232,7 +1235,7 @@
  * @section: (transfer none): the #GstMpegtsSection that holds the data
  * @output_size: (out): #gsize to hold the size of the data
  *
- * If the data in @section has aldready been packetized, the data pointer is returned
+ * If the data in @section has already been packetized, the data pointer is returned
  * immediately. Otherwise, the data field is allocated and populated.
  *
  * Returns: (transfer none): pointer to section data, or %NULL on fail
diff --git a/gst-libs/gst/mpegts/mpegts.h b/gst-libs/gst/mpegts/mpegts.h
index f87cff7..aaca081 100644
--- a/gst-libs/gst/mpegts/mpegts.h
+++ b/gst-libs/gst/mpegts/mpegts.h
@@ -5,7 +5,7 @@
  * Authors:
  *   Edward Hervey <edward@collabora.com>
  *
- * This library is free softwagre; you can redistribute it and/or
+ * 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.
diff --git a/gst-libs/gst/uridownloader/Makefile.am b/gst-libs/gst/uridownloader/Makefile.am
index a63f2ac..91b5187 100644
--- a/gst-libs/gst/uridownloader/Makefile.am
+++ b/gst-libs/gst/uridownloader/Makefile.am
@@ -22,19 +22,3 @@
 	$(GST_LIB_LDFLAGS) \
 	$(GST_ALL_LDFLAGS) \
 	$(GST_LT_LDFLAGS)
-
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgsturidownloader -:STATIC libgsturidownloader-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsturidownloader_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgsturidownloader_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgsturidownloader_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgsturidownloader@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/uridownloader \
-	 -:HEADERS $(libgsturidownloaderinclude_HEADERS) \
-         $(built_headers) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/uridownloader/Makefile.in b/gst-libs/gst/uridownloader/Makefile.in
index f5e788a..1bf18d8 100644
--- a/gst-libs/gst/uridownloader/Makefile.in
+++ b/gst-libs/gst/uridownloader/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,9 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/uridownloader
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp \
-	$(libgsturidownloader_@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 \
@@ -91,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +112,6 @@
 	$(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 \
@@ -121,6 +128,9 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am \
+	$(libgsturidownloader_@GST_API_VERSION@include_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -215,6 +225,7 @@
   esac
 HEADERS = $(libgsturidownloader_@GST_API_VERSION@include_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -232,8 +243,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -258,8 +271,6 @@
 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@
@@ -272,7 +283,6 @@
 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@
@@ -280,6 +290,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -306,11 +318,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -329,8 +344,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -389,10 +402,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -409,7 +426,6 @@
 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@
@@ -418,7 +434,6 @@
 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@
@@ -431,7 +446,6 @@
 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@
@@ -445,6 +459,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -456,6 +471,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -494,6 +511,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -529,10 +547,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -558,6 +580,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -565,7 +590,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -594,6 +626,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -604,6 +637,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -634,17 +668,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -661,6 +694,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -699,6 +733,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/uridownloader/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst-libs/gst/uridownloader/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1047,22 +1081,8 @@
 	uninstall-am uninstall-libLTLIBRARIES \
 	uninstall-libgsturidownloader_@GST_API_VERSION@includeHEADERS
 
+.PRECIOUS: Makefile
 
-Android.mk:  $(BUILT_SOURCES) Makefile.am
-	androgenizer -:PROJECT libgsturidownloader -:STATIC libgsturidownloader-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsturidownloader_@GST_API_VERSION@_la_SOURCES) \
-         $(built_sources) \
-	 -:CFLAGS $(DEFS) $(libgsturidownloader_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgsturidownloader_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgsturidownloader@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/uridownloader \
-	 -:HEADERS $(libgsturidownloaderinclude_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.
diff --git a/gst-libs/gst/uridownloader/gstfragment.c b/gst-libs/gst/uridownloader/gstfragment.c
index 2060ea2..6d41593 100644
--- a/gst-libs/gst/uridownloader/gstfragment.c
+++ b/gst-libs/gst/uridownloader/gstfragment.c
@@ -95,11 +95,11 @@
       break;
 
     case PROP_BUFFER:
-      g_value_set_boxed (value, gst_fragment_get_buffer (fragment));
+      g_value_take_boxed (value, gst_fragment_get_buffer (fragment));
       break;
 
     case PROP_CAPS:
-      g_value_set_boxed (value, gst_fragment_get_caps (fragment));
+      g_value_take_boxed (value, gst_fragment_get_caps (fragment));
       break;
 
     default:
@@ -167,6 +167,7 @@
   fragment->name = g_strdup ("");
   fragment->completed = FALSE;
   fragment->discontinuous = FALSE;
+  fragment->headers = NULL;
 }
 
 GstFragment *
@@ -183,6 +184,8 @@
   g_free (fragment->uri);
   g_free (fragment->redirect_uri);
   g_free (fragment->name);
+  if (fragment->headers)
+    gst_structure_free (fragment->headers);
   g_mutex_clear (&fragment->priv->lock);
 
   G_OBJECT_CLASS (gst_fragment_parent_class)->finalize (gobject);
diff --git a/gst-libs/gst/uridownloader/gstfragment.h b/gst-libs/gst/uridownloader/gstfragment.h
index bdf04f3..a8e0a54 100644
--- a/gst-libs/gst/uridownloader/gstfragment.h
+++ b/gst-libs/gst/uridownloader/gstfragment.h
@@ -44,6 +44,8 @@
   gchar * uri;                  /* URI of the fragment */
   gchar * redirect_uri;         /* Redirect target if any */
   gboolean redirect_permanent;  /* If the redirect is permanent */
+  gint64 range_start;
+  gint64 range_end;
 
   gchar * name;                 /* Name of the fragment */
   gboolean completed;           /* Whether the fragment is complete or not */
@@ -53,6 +55,7 @@
   guint64 stop_time;            /* Stop time of the fragment */
   gboolean index;               /* Index of the fragment */
   gboolean discontinuous;       /* Whether this fragment is discontinuous or not */
+  GstStructure *headers;        /* HTTP request/response headers */
 
   GstFragmentPrivate *priv;
 };
diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c
index 6f2c6b0..72e5e79 100644
--- a/gst-libs/gst/uridownloader/gsturidownloader.c
+++ b/gst-libs/gst/uridownloader/gsturidownloader.c
@@ -178,6 +178,20 @@
       gst_event_unref (event);
       break;
     }
+    case GST_EVENT_CUSTOM_DOWNSTREAM_STICKY:{
+      const GstStructure *str;
+      str = gst_event_get_structure (event);
+      if (gst_structure_has_name (str, "http-headers")) {
+        GST_OBJECT_LOCK (downloader);
+        if (downloader->priv->download != NULL) {
+          if (downloader->priv->download->headers)
+            gst_structure_free (downloader->priv->download->headers);
+          downloader->priv->download->headers = gst_structure_copy (str);
+        }
+        GST_OBJECT_UNLOCK (downloader);
+      }
+    }
+      /* falls through */
     default:
       ret = gst_pad_event_default (pad, parent, event);
       break;
@@ -261,6 +275,7 @@
   GST_OBJECT_LOCK (downloader);
   if (downloader->priv->download == NULL) {
     /* Download cancelled, quit */
+    gst_buffer_unref (buf);
     GST_OBJECT_UNLOCK (downloader);
     goto done;
   }
@@ -268,8 +283,10 @@
   GST_LOG_OBJECT (downloader, "The uri fetcher received a new buffer "
       "of size %" G_GSIZE_FORMAT, gst_buffer_get_size (buf));
   downloader->priv->got_buffer = TRUE;
-  if (!gst_fragment_add_buffer (downloader->priv->download, buf))
+  if (!gst_fragment_add_buffer (downloader->priv->download, buf)) {
     GST_WARNING_OBJECT (downloader, "Could not add buffer to fragment");
+    gst_buffer_unref (buf);
+  }
   GST_OBJECT_UNLOCK (downloader);
 
 done:
@@ -425,6 +442,23 @@
   return TRUE;
 }
 
+static gboolean
+gst_uri_downloader_set_method (GstUriDownloader * downloader,
+    const gchar * method)
+{
+  GObjectClass *gobject_class;
+
+  if (!downloader->priv->urisrc)
+    return FALSE;
+
+  gobject_class = G_OBJECT_GET_CLASS (downloader->priv->urisrc);
+  if (g_object_class_find_property (gobject_class, "method")) {
+    g_object_set (downloader->priv->urisrc, "method", method, NULL);
+    return TRUE;
+  }
+  return FALSE;
+}
+
 GstFragment *
 gst_uri_downloader_fetch_uri (GstUriDownloader * downloader,
     const gchar * uri, const gchar * referer, gboolean compress,
@@ -471,7 +505,11 @@
   }
 
   gst_bus_set_flushing (downloader->priv->bus, FALSE);
+  if (downloader->priv->download)
+    g_object_unref (downloader->priv->download);
   downloader->priv->download = gst_fragment_new ();
+  downloader->priv->download->range_start = range_start;
+  downloader->priv->download->range_end = range_end;
   GST_OBJECT_UNLOCK (downloader);
   ret = gst_element_set_state (downloader->priv->urisrc, GST_STATE_READY);
   GST_OBJECT_LOCK (downloader);
@@ -485,9 +523,16 @@
     goto quit;
   }
 
-  if (!gst_uri_downloader_set_range (downloader, range_start, range_end)) {
-    GST_WARNING_OBJECT (downloader, "Failed to set range");
-    goto quit;
+  if (range_start < 0 && range_end < 0) {
+    if (!gst_uri_downloader_set_method (downloader, "HEAD")) {
+      GST_WARNING_OBJECT (downloader, "Failed to set HTTP method");
+      goto quit;
+    }
+  } else {
+    if (!gst_uri_downloader_set_range (downloader, range_start, range_end)) {
+      GST_WARNING_OBJECT (downloader, "Failed to set range");
+      goto quit;
+    }
   }
 
   GST_OBJECT_UNLOCK (downloader);
@@ -526,9 +571,13 @@
   download = downloader->priv->download;
   downloader->priv->download = NULL;
   if (!downloader->priv->got_buffer) {
-    g_object_unref (download);
-    download = NULL;
-    GST_ERROR_OBJECT (downloader, "Didn't retrieve a buffer before EOS");
+    if (download->range_start < 0 && download->range_end < 0) {
+      /* HEAD request, so we don't expect a response */
+    } else {
+      g_object_unref (download);
+      download = NULL;
+      GST_ERROR_OBJECT (downloader, "Didn't retrieve a buffer before EOS");
+    }
   }
 
   if (download != NULL)
diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index 4f0f09f..5108281 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
@@ -1,13 +1,10 @@
 # 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
+	gstvideoaggregator.c
 
 nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
 
@@ -19,8 +16,11 @@
 	$(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_LIBADD = \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
+
 libgstbadvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
 
-noinst_HEADERS = gstcms.h videoconvert.h gstvideoaggregatorpad.h gstvideoaggregator.h
+noinst_HEADERS = gstvideoaggregatorpad.h gstvideoaggregator.h
diff --git a/gst-libs/gst/video/Makefile.in b/gst-libs/gst/video/Makefile.in
index 6e9c443..136465e 100644
--- a/gst-libs/gst/video/Makefile.in
+++ b/gst-libs/gst/video/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,31 +14,19 @@
 
 @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__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -102,8 +90,6 @@
 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-libs/gst/video
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -112,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -125,7 +112,6 @@
 	$(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 \
@@ -142,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -176,17 +164,13 @@
 am__installdirs = "$(DESTDIR)$(libdir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstbadvideo_@GST_API_VERSION@_la_DEPENDENCIES =  \
+libgstbadvideo_@GST_API_VERSION@_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) \
-	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(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-gstvideoaggregator.lo
+nodist_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS =
 libgstbadvideo_@GST_API_VERSION@_la_OBJECTS =  \
 	$(am_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS) \
 	$(nodist_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS)
@@ -261,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -278,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -304,8 +291,6 @@
 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@
@@ -318,7 +303,6 @@
 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@
@@ -326,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -352,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -375,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -435,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -455,7 +446,6 @@
 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@
@@ -464,7 +454,6 @@
 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@
@@ -477,7 +466,6 @@
 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@
@@ -491,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -502,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -540,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -575,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -604,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -611,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -640,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -650,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -680,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -707,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -745,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -760,20 +769,10 @@
 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
+	gstvideoaggregator.c
 
 nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
 libgstbadvideo_@GST_API_VERSION@_la_CFLAGS = \
@@ -784,17 +783,18 @@
 	$(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_LIBADD = \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
 
 libgstbadvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
-noinst_HEADERS = gstcms.h videoconvert.h gstvideoaggregatorpad.h gstvideoaggregator.h
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
+noinst_HEADERS = gstvideoaggregatorpad.h gstvideoaggregator.h
+all: 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)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -806,7 +806,6 @@
 	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*) \
@@ -815,7 +814,6 @@
 	    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
@@ -870,10 +868,7 @@
 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$$||'`;\
@@ -899,13 +894,6 @@
 @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
@@ -913,20 +901,6 @@
 @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
 
@@ -1015,19 +989,14 @@
 	    || 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
+check: check-am
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
 installdirs:
 	for dir in "$(DESTDIR)$(libdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -1058,10 +1027,9 @@
 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 \
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1130,59 +1098,24 @@
 
 uninstall-am: uninstall-libLTLIBRARIES
 
-.MAKE: all check install install-am install-strip
+.MAKE: 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-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 tags-am uninstall \
-	uninstall-am uninstall-libLTLIBRARIES
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES 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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-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.
diff --git a/gst-libs/gst/video/bad-video-orc-dist.c b/gst-libs/gst/video/bad-video-orc-dist.c
deleted file mode 100644
index 743f799..0000000
--- a/gst-libs/gst/video/bad-video-orc-dist.c
+++ /dev/null
@@ -1,8898 +0,0 @@
-
-/* 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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 */
-
-
-
-/* bad_video_convert_orc_memcpy_2d */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 31, 98, 97, 100, 95, 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_bad_video_convert_orc_memcpy_2d);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_memcpy_2d");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_I420_UYVY */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_I420_UYVY);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_I420_UYVY");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_I420_YUY2 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_I420_YUY2);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_I420_YUY2");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_I420_AYUV */
-#ifdef DISABLE_ORC
-void
-bad_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;
-  orc_int8 var39;
-  orc_union32 var40;
-  orc_int8 var41;
-  orc_int8 var42;
-  orc_union16 var43;
-  orc_union16 var44;
-  orc_union16 var45;
-
-  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 */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadupdb */
-    var41 = ptr6[i >> 1];
-    /* 1: loadupdb */
-    var42 = ptr7[i >> 1];
-    /* 2: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var41;
-      _dest.x2[1] = var42;
-      var43.i = _dest.i;
-    }
-    /* 4: loadb */
-    var37 = ptr4[i];
-    /* 5: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var36;
-      _dest.x2[1] = var37;
-      var44.i = _dest.i;
-    }
-    /* 6: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var44.i;
-      _dest.x2[1] = var43.i;
-      var38.i = _dest.i;
-    }
-    /* 7: storel */
-    ptr0[i] = var38;
-    /* 8: loadb */
-    var39 = ptr5[i];
-    /* 9: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var36;
-      _dest.x2[1] = var39;
-      var45.i = _dest.i;
-    }
-    /* 10: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var45.i;
-      _dest.x2[1] = var43.i;
-      var40.i = _dest.i;
-    }
-    /* 11: storel */
-    ptr1[i] = var40;
-  }
-
-}
-
-#else
-static void
-_backup_bad_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;
-  orc_int8 var39;
-  orc_union32 var40;
-  orc_int8 var41;
-  orc_int8 var42;
-  orc_union16 var43;
-  orc_union16 var44;
-  orc_union16 var45;
-
-  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 */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadupdb */
-    var41 = ptr6[i >> 1];
-    /* 1: loadupdb */
-    var42 = ptr7[i >> 1];
-    /* 2: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var41;
-      _dest.x2[1] = var42;
-      var43.i = _dest.i;
-    }
-    /* 4: loadb */
-    var37 = ptr4[i];
-    /* 5: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var36;
-      _dest.x2[1] = var37;
-      var44.i = _dest.i;
-    }
-    /* 6: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var44.i;
-      _dest.x2[1] = var43.i;
-      var38.i = _dest.i;
-    }
-    /* 7: storel */
-    ptr0[i] = var38;
-    /* 8: loadb */
-    var39 = ptr5[i];
-    /* 9: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var36;
-      _dest.x2[1] = var39;
-      var45.i = _dest.i;
-    }
-    /* 10: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var45.i;
-      _dest.x2[1] = var43.i;
-      var40.i = _dest.i;
-    }
-    /* 11: storel */
-    ptr1[i] = var40;
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_I420_AYUV);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_I420_AYUV");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_YUY2_I420 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_YUY2_I420);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_YUY2_I420");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_UYVY_YUY2 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_UYVY_YUY2);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_UYVY_YUY2");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_420_422 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_420_422);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_420_422");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_420_444 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_420_444);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_420_444");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_422_444 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_422_444);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_422_444");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_444_422 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_444_422);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_444_422");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_444_420 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_444_420);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_444_420");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_planar_chroma_422_420 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 43, 98, 97, 100, 95, 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_bad_video_convert_orc_planar_chroma_422_420);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_planar_chroma_422_420");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_YUY2_AYUV */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_YUY2_AYUV);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_YUY2_AYUV");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_UYVY_AYUV */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_UYVY_AYUV);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_UYVY_AYUV");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_YUY2_Y42B */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_YUY2_Y42B);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_YUY2_Y42B");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_UYVY_Y42B */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_UYVY_Y42B);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_UYVY_Y42B");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_YUY2_Y444 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_YUY2_Y444);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_YUY2_Y444");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_UYVY_Y444 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_UYVY_Y444);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_UYVY_Y444");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_UYVY_I420 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_UYVY_I420);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_UYVY_I420");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_I420 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_I420);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_I420");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_YUY2 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_YUY2);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_YUY2");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_UYVY */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_UYVY);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_UYVY");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_Y42B */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_Y42B);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_Y42B");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_Y444 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_Y444);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_Y444");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y42B_YUY2 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y42B_YUY2);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y42B_YUY2");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y42B_UYVY */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y42B_UYVY);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y42B_UYVY");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y42B_AYUV */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y42B_AYUV);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y42B_AYUV");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y444_YUY2 */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y444_YUY2);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y444_YUY2");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y444_UYVY */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y444_UYVY);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y444_UYVY");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_Y444_AYUV */
-#ifdef DISABLE_ORC
-void
-bad_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_bad_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
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_Y444_AYUV);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_Y444_AYUV");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_ARGB */
-#ifdef DISABLE_ORC
-void
-bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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;
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var58;
-        _dest.x2[1] = var73;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var74;
-        _dest.x2[1] = var75;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-#else
-static void
-_backup_bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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];
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var58;
-        _dest.x2[1] = var73;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var74;
-        _dest.x2[1] = var75;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_ARGB);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_ARGB");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_BGRA */
-#ifdef DISABLE_ORC
-void
-bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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;
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var75;
-        _dest.x2[1] = var74;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var73;
-        _dest.x2[1] = var58;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-#else
-static void
-_backup_bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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];
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var75;
-        _dest.x2[1] = var74;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var73;
-        _dest.x2[1] = var58;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_BGRA);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_BGRA");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_ABGR */
-#ifdef DISABLE_ORC
-void
-bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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;
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var58;
-        _dest.x2[1] = var75;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var74;
-        _dest.x2[1] = var73;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-#else
-static void
-_backup_bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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];
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var58;
-        _dest.x2[1] = var75;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var74;
-        _dest.x2[1] = var73;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_ABGR);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_ABGR");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_AYUV_RGBA */
-#ifdef DISABLE_ORC
-void
-bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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;
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var73;
-        _dest.x2[1] = var74;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var75;
-        _dest.x2[1] = var58;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-#else
-static void
-_backup_bad_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;
-  orc_union32 var53;
-  orc_union32 var54;
-  orc_union16 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 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_union16 var71;
-  orc_union16 var72;
-  orc_int8 var73;
-  orc_int8 var74;
-  orc_int8 var75;
-  orc_union16 var76;
-  orc_union16 var77;
-  orc_union32 var78;
-
-  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];
-
-    for (i = 0; i < n; i++) {
-      /* 0: loadl */
-      var46 = ptr4[i];
-      /* 2: subb */
-      var54.x4[0] = var46.x4[0] - var47.x4[0];
-      var54.x4[1] = var46.x4[1] - var47.x4[1];
-      var54.x4[2] = var46.x4[2] - var47.x4[2];
-      var54.x4[3] = var46.x4[3] - var47.x4[3];
-      /* 3: splitlw */
-      {
-        orc_union32 _src;
-        _src.i = var54.i;
-        var55.i = _src.x2[1];
-        var56.i = _src.x2[0];
-      }
-      /* 4: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var56.i;
-        var57 = _src.x2[1];
-        var58 = _src.x2[0];
-      }
-      /* 5: splitwb */
-      {
-        orc_union16 _src;
-        _src.i = var55.i;
-        var59 = _src.x2[1];
-        var60 = _src.x2[0];
-      }
-      /* 6: splatbw */
-      var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
-      /* 7: splatbw */
-      var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
-      /* 8: splatbw */
-      var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff);
-      /* 10: mulhsw */
-      var64.i = (var61.i * var48.i) >> 16;
-      /* 12: mulhsw */
-      var65.i = (var63.i * var49.i) >> 16;
-      /* 13: addssw */
-      var66.i = ORC_CLAMP_SW (var64.i + var65.i);
-      /* 15: mulhsw */
-      var67.i = (var62.i * var50.i) >> 16;
-      /* 16: addssw */
-      var68.i = ORC_CLAMP_SW (var64.i + var67.i);
-      /* 18: mulhsw */
-      var69.i = (var62.i * var51.i) >> 16;
-      /* 19: addssw */
-      var70.i = ORC_CLAMP_SW (var64.i + var69.i);
-      /* 21: mulhsw */
-      var71.i = (var63.i * var52.i) >> 16;
-      /* 22: addssw */
-      var72.i = ORC_CLAMP_SW (var70.i + var71.i);
-      /* 23: convssswb */
-      var73 = ORC_CLAMP_SB (var66.i);
-      /* 24: convssswb */
-      var74 = ORC_CLAMP_SB (var72.i);
-      /* 25: convssswb */
-      var75 = ORC_CLAMP_SB (var68.i);
-      /* 26: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var73;
-        _dest.x2[1] = var74;
-        var76.i = _dest.i;
-      }
-      /* 27: mergebw */
-      {
-        orc_union16 _dest;
-        _dest.x2[0] = var75;
-        _dest.x2[1] = var58;
-        var77.i = _dest.i;
-      }
-      /* 28: mergewl */
-      {
-        orc_union32 _dest;
-        _dest.x2[0] = var76.i;
-        _dest.x2[1] = var77.i;
-        var78.i = _dest.i;
-      }
-      /* 29: addb */
-      var53.x4[0] = var78.x4[0] + var47.x4[0];
-      var53.x4[1] = var78.x4[1] + var47.x4[1];
-      var53.x4[2] = var78.x4[2] + var47.x4[2];
-      var53.x4[3] = var78.x4[3] + var47.x4[3];
-      /* 30: storel */
-      ptr0[i] = var53;
-    }
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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_bad_video_convert_orc_convert_AYUV_RGBA);
-#else
-      p = orc_program_new ();
-      orc_program_set_2d (p);
-      orc_program_set_name (p, "bad_video_convert_orc_convert_AYUV_RGBA");
-      orc_program_set_backup_function (p,
-          _backup_bad_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
-
-
-/* bad_video_convert_orc_convert_I420_BGRA */
-#ifdef DISABLE_ORC
-void
-bad_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
-  orc_union16 var44;
-  orc_union16 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
-  volatile orc_int8 var49;
-#else
-  orc_int8 var49;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
-  volatile orc_union32 var50;
-#else
-  orc_union32 var50;
-#endif
-  orc_union32 var51;
-  orc_int8 var52;
-  orc_union16 var53;
-  orc_int8 var54;
-  orc_int8 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 var58;
-  orc_union16 var59;
-  orc_union16 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_int8 var69;
-  orc_int8 var70;
-  orc_int8 var71;
-  orc_union16 var72;
-  orc_union16 var73;
-  orc_union32 var74;
-
-  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 */
-  /* 10: loadpw */
-  var44.i = p1;
-  /* 12: loadpw */
-  var45.i = p2;
-  /* 15: loadpw */
-  var46.i = p3;
-  /* 18: loadpw */
-  var47.i = p4;
-  /* 21: loadpw */
-  var48.i = p5;
-  /* 28: loadpb */
-  var49 = (int) 0x0000007f;     /* 127 or 6.27463e-322f */
-  /* 31: loadpb */
-  var50.x4[0] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[1] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[2] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[3] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var42 = ptr4[i];
-    /* 2: subb */
-    var52 = var42 - var43;
-    /* 3: splatbw */
-    var53.i = ((var52 & 0xff) << 8) | (var52 & 0xff);
-    /* 4: loadupdb */
-    var54 = ptr5[i >> 1];
-    /* 5: subb */
-    var55 = var54 - var43;
-    /* 6: splatbw */
-    var56.i = ((var55 & 0xff) << 8) | (var55 & 0xff);
-    /* 7: loadupdb */
-    var57 = ptr6[i >> 1];
-    /* 8: subb */
-    var58 = var57 - var43;
-    /* 9: splatbw */
-    var59.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
-    /* 11: mulhsw */
-    var60.i = (var53.i * var44.i) >> 16;
-    /* 13: mulhsw */
-    var61.i = (var59.i * var45.i) >> 16;
-    /* 14: addssw */
-    var62.i = ORC_CLAMP_SW (var60.i + var61.i);
-    /* 16: mulhsw */
-    var63.i = (var56.i * var46.i) >> 16;
-    /* 17: addssw */
-    var64.i = ORC_CLAMP_SW (var60.i + var63.i);
-    /* 19: mulhsw */
-    var65.i = (var56.i * var47.i) >> 16;
-    /* 20: addssw */
-    var66.i = ORC_CLAMP_SW (var60.i + var65.i);
-    /* 22: mulhsw */
-    var67.i = (var59.i * var48.i) >> 16;
-    /* 23: addssw */
-    var68.i = ORC_CLAMP_SW (var66.i + var67.i);
-    /* 24: convssswb */
-    var69 = ORC_CLAMP_SB (var62.i);
-    /* 25: convssswb */
-    var70 = ORC_CLAMP_SB (var68.i);
-    /* 26: convssswb */
-    var71 = ORC_CLAMP_SB (var64.i);
-    /* 27: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var71;
-      _dest.x2[1] = var70;
-      var72.i = _dest.i;
-    }
-    /* 29: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var69;
-      _dest.x2[1] = var49;
-      var73.i = _dest.i;
-    }
-    /* 30: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var72.i;
-      _dest.x2[1] = var73.i;
-      var74.i = _dest.i;
-    }
-    /* 32: addb */
-    var51.x4[0] = var74.x4[0] + var50.x4[0];
-    var51.x4[1] = var74.x4[1] + var50.x4[1];
-    var51.x4[2] = var74.x4[2] + var50.x4[2];
-    var51.x4[3] = var74.x4[3] + var50.x4[3];
-    /* 33: storel */
-    ptr0[i] = var51;
-  }
-
-}
-
-#else
-static void
-_backup_bad_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
-  orc_union16 var44;
-  orc_union16 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
-  volatile orc_int8 var49;
-#else
-  orc_int8 var49;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
-  volatile orc_union32 var50;
-#else
-  orc_union32 var50;
-#endif
-  orc_union32 var51;
-  orc_int8 var52;
-  orc_union16 var53;
-  orc_int8 var54;
-  orc_int8 var55;
-  orc_union16 var56;
-  orc_int8 var57;
-  orc_int8 var58;
-  orc_union16 var59;
-  orc_union16 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_int8 var69;
-  orc_int8 var70;
-  orc_int8 var71;
-  orc_union16 var72;
-  orc_union16 var73;
-  orc_union32 var74;
-
-  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 */
-  /* 10: loadpw */
-  var44.i = ex->params[24];
-  /* 12: loadpw */
-  var45.i = ex->params[25];
-  /* 15: loadpw */
-  var46.i = ex->params[26];
-  /* 18: loadpw */
-  var47.i = ex->params[27];
-  /* 21: loadpw */
-  var48.i = ex->params[28];
-  /* 28: loadpb */
-  var49 = (int) 0x0000007f;     /* 127 or 6.27463e-322f */
-  /* 31: loadpb */
-  var50.x4[0] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[1] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[2] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-  var50.x4[3] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var42 = ptr4[i];
-    /* 2: subb */
-    var52 = var42 - var43;
-    /* 3: splatbw */
-    var53.i = ((var52 & 0xff) << 8) | (var52 & 0xff);
-    /* 4: loadupdb */
-    var54 = ptr5[i >> 1];
-    /* 5: subb */
-    var55 = var54 - var43;
-    /* 6: splatbw */
-    var56.i = ((var55 & 0xff) << 8) | (var55 & 0xff);
-    /* 7: loadupdb */
-    var57 = ptr6[i >> 1];
-    /* 8: subb */
-    var58 = var57 - var43;
-    /* 9: splatbw */
-    var59.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
-    /* 11: mulhsw */
-    var60.i = (var53.i * var44.i) >> 16;
-    /* 13: mulhsw */
-    var61.i = (var59.i * var45.i) >> 16;
-    /* 14: addssw */
-    var62.i = ORC_CLAMP_SW (var60.i + var61.i);
-    /* 16: mulhsw */
-    var63.i = (var56.i * var46.i) >> 16;
-    /* 17: addssw */
-    var64.i = ORC_CLAMP_SW (var60.i + var63.i);
-    /* 19: mulhsw */
-    var65.i = (var56.i * var47.i) >> 16;
-    /* 20: addssw */
-    var66.i = ORC_CLAMP_SW (var60.i + var65.i);
-    /* 22: mulhsw */
-    var67.i = (var59.i * var48.i) >> 16;
-    /* 23: addssw */
-    var68.i = ORC_CLAMP_SW (var66.i + var67.i);
-    /* 24: convssswb */
-    var69 = ORC_CLAMP_SB (var62.i);
-    /* 25: convssswb */
-    var70 = ORC_CLAMP_SB (var68.i);
-    /* 26: convssswb */
-    var71 = ORC_CLAMP_SB (var64.i);
-    /* 27: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var71;
-      _dest.x2[1] = var70;
-      var72.i = _dest.i;
-    }
-    /* 29: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var69;
-      _dest.x2[1] = var49;
-      var73.i = _dest.i;
-    }
-    /* 30: mergewl */
-    {
-      orc_union32 _dest;
-      _dest.x2[0] = var72.i;
-      _dest.x2[1] = var73.i;
-      var74.i = _dest.i;
-    }
-    /* 32: addb */
-    var51.x4[0] = var74.x4[0] + var50.x4[0];
-    var51.x4[1] = var74.x4[1] + var50.x4[1];
-    var51.x4[2] = var74.x4[2] + var50.x4[2];
-    var51.x4[3] = var74.x4[3] + var50.x4[3];
-    /* 33: storel */
-    ptr0[i] = var51;
-  }
-
-}
-
-void
-bad_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, 39, 98, 97, 100, 95, 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, 1, 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_bad_video_convert_orc_convert_I420_BGRA);
-#else
-      p = orc_program_new ();
-      orc_program_set_name (p, "bad_video_convert_orc_convert_I420_BGRA");
-      orc_program_set_backup_function (p,
-          _backup_bad_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, 1, 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
deleted file mode 100644
index 73dae9b..0000000
--- a/gst-libs/gst/video/bad-video-orc-dist.h
+++ /dev/null
@@ -1,124 +0,0 @@
-
-/* 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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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
deleted file mode 100644
index 9fc1efa..0000000
--- a/gst-libs/gst/video/bad-video-orc.orc
+++ /dev/null
@@ -1,729 +0,0 @@
-.function bad_video_convert_orc_memcpy_2d
-.flags 2d
-.dest 1 d1 guint8
-.source 1 s1 guint8
-
-copyb d1, s1
-
-.function bad_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 bad_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 bad_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 bad_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 bad_video_convert_orc_convert_UYVY_YUY2
-.flags 2d
-.dest 4 yuy2 guint8
-.source 4 uyvy guint8
-
-x2 swapw yuy2, uyvy
-
-
-.function bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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 bad_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
deleted file mode 100644
index 580b7c1..0000000
--- a/gst-libs/gst/video/gstcms.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/* 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
-bad_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
-bad_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
-bad_color_set (Color * c, double x, double y, double z)
-{
-  c->v[0] = x;
-  c->v[1] = y;
-  c->v[2] = z;
-}
-
-void
-bad_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
-bad_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
-bad_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
-bad_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
-bad_color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
-    double a3)
-{
-  ColorMatrix a;
-
-  bad_color_matrix_set_identity (&a);
-  a.m[0][3] = a1;
-  a.m[1][3] = a2;
-  a.m[2][3] = a3;
-  bad_color_matrix_multiply (m, &a, m);
-}
-
-void
-bad_color_matrix_scale_components (ColorMatrix * m, double a1, double a2,
-    double a3)
-{
-  ColorMatrix a;
-
-  bad_color_matrix_set_identity (&a);
-  a.m[0][0] = a1;
-  a.m[1][1] = a2;
-  a.m[2][2] = a3;
-  bad_color_matrix_multiply (m, &a, m);
-}
-
-void
-bad_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.},
-        }
-  };
-
-  bad_color_matrix_multiply (m, &k, m);
-}
-
-void
-bad_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;
-
-  bad_color_matrix_multiply (m, &k, m);
-}
-
-void
-bad_color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst)
-{
-  /*
-   * At this point, everything is in YCbCr
-   * All components are in the range [0,255]
-   */
-  bad_color_matrix_set_identity (dst);
-
-  /* offset required to get input video black to (0.,0.,0.) */
-  bad_color_matrix_offset_components (dst, -16, -128, -128);
-
-  /* scale required to get input video black to (0.,0.,0.) */
-  bad_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] */
-  bad_color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140);  /* SD */
-
-  /*
-   * We are now in RGB space
-   */
-
-#if 0
-  /* scale to output range. */
-  bad_color_matrix_scale_components (dst, 255.0, 255.0, 255.0);
-#endif
-}
-
-void
-bad_color_matrix_build_bt709_to_bt601 (ColorMatrix * dst)
-{
-  bad_color_matrix_set_identity (dst);
-
-  /* offset required to get input video black to (0.,0.,0.) */
-  bad_color_matrix_offset_components (dst, -16, -128, -128);
-
-  /* scale required to get input video black to (0.,0.,0.) */
-  bad_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] */
-  bad_color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722);  /* HD */
-
-  bad_color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140);  /* SD */
-
-  bad_color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
-
-  bad_color_matrix_offset_components (dst, 16, 128, 128);
-}
-
-void
-bad_color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst)
-{
-  bad_color_matrix_set_identity (dst);
-
-  bad_color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140);  /* SD */
-
-  bad_color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
-
-  bad_color_matrix_offset_components (dst, 16, 128, 128);
-
-  {
-    Color c;
-    int i;
-    for (i = 7; i >= 0; i--) {
-      bad_color_set (&c, (i & 2) ? 0.75 : 0.0, (i & 4) ? 0.75 : 0.0,
-          (i & 1) ? 0.75 : 0.0);
-      bad_color_matrix_apply (dst, &c, &c);
-      g_print ("  { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]),
-          rint (c.v[2]));
-    }
-    bad_color_set (&c, -0.075, -0.075, -0.075);
-    bad_color_matrix_apply (dst, &c, &c);
-    g_print ("  { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]),
-        rint (c.v[2]));
-    bad_color_set (&c, 0.075, 0.075, 0.075);
-    bad_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
-bad_color_matrix_invert (ColorMatrix * m)
-{
-  ColorMatrix tmp;
-  int i, j;
-  double det;
-
-  bad_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
-bad_color_matrix_copy (ColorMatrix * dest, ColorMatrix * src)
-{
-  memcpy (dest, src, sizeof (ColorMatrix));
-}
-
-void
-bad_color_matrix_transpose (ColorMatrix * m)
-{
-  int i, j;
-  ColorMatrix tmp;
-
-  bad_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
-bad_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;
-
-  bad_color_set (&r, rx, ry, 1.0);
-  bad_color_xyY_to_XYZ (&r);
-  bad_color_set (&g, gx, gy, 1.0);
-  bad_color_xyY_to_XYZ (&g);
-  bad_color_set (&b, bx, by, 1.0);
-  bad_color_xyY_to_XYZ (&b);
-  bad_color_set (&w, wx, wy, 1.0);
-  bad_color_xyY_to_XYZ (&w);
-
-  bad_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];
-
-  bad_color_matrix_dump (dst);
-  bad_color_matrix_copy (&m, dst);
-  bad_color_matrix_invert (&m);
-  bad_color_matrix_dump (&m);
-
-  bad_color_matrix_transpose (&m);
-  bad_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];
-
-  bad_color_matrix_transpose (dst);
-  bad_color_matrix_dump (dst);
-
-  bad_color_set (&scale, 1, 1, 1);
-  bad_color_matrix_apply (dst, &scale, &scale);
-  bad_color_XYZ_to_xyY (&scale);
-  g_print ("white %g %g %g\n", scale.v[0], scale.v[1], scale.v[2]);
-
-}
-
-void
-bad_color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst)
-{
-  /* SMPTE C primaries, SMPTE 170M-2004 */
-  bad_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 */
-  bad_color_matrix_build_XYZ (dst,
-      0.67, 0.33, 0.21, 0.71, 0.14, 0.08, 0.3127, 0.3290);
-#endif
-}
-
-void
-bad_color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst)
-{
-  /* Rec. ITU-R BT.709-5 */
-  bad_color_matrix_build_XYZ (dst,
-      0.640, 0.330, 0.300, 0.600, 0.150, 0.060, 0.3127, 0.3290);
-}
-
-void
-bad_color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst)
-{
-  /* Dell monitor */
-#if 1
-  bad_color_matrix_build_XYZ (dst,
-      0.662, 0.329, 0.205, 0.683, 0.146, 0.077, 0.3135, 0.3290);
-#endif
-#if 0
-  bad_color_matrix_build_XYZ (dst,
-      0.630, 0.340, 0.310, 0.595, 0.155, 0.070, 0.3127, 0.3290);
-#endif
-  bad_color_matrix_invert (dst);
-}
-
-void
-bad_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
-bad_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
-bad_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_bad_color_transform_table (void)
-{
-  static guint8 *bad_color_transform_table = NULL;
-
-#if 1
-  if (!bad_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;
-
-    bad_color_matrix_build_yuv_to_rgb_601 (&bt601_to_rgb);
-    bad_color_matrix_build_rgb_to_yuv_601 (&bt601_to_yuv);
-    bad_color_matrix_build_rgb_to_XYZ_601 (&bt601_rgb_to_XYZ);
-    bad_color_matrix_build_XYZ_to_rgb_dell (&dell_XYZ_to_rgb);
-
-    bad_color_transform_table = g_malloc (0x1000000 * 3);
-
-    table_y = COG_OFFSET (bad_color_transform_table, 0 * 0x1000000);
-    table_u = COG_OFFSET (bad_color_transform_table, 1 * 0x1000000);
-    table_v = COG_OFFSET (bad_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;
-          bad_color_matrix_apply (&bt601_to_rgb, &c, &c);
-          bad_color_gamut_clamp (&c, &c);
-          bad_color_transfer_function_apply (&c, &c);
-          bad_color_matrix_apply (&bt601_rgb_to_XYZ, &c, &c);
-          bad_color_matrix_apply (&dell_XYZ_to_rgb, &c, &c);
-          bad_color_transfer_function_unapply (&c, &c);
-          bad_color_gamut_clamp (&c, &c);
-          bad_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 (!bad_color_transform_table) {
-    ColorMatrix bt709_to_bt601;
-    guint8 *table_y;
-    guint8 *table_u;
-    guint8 *table_v;
-    int y, u, v;
-
-    bad_color_matrix_build_bt709_to_bt601 (&bt709_to_bt601);
-
-    bad_color_transform_table = g_malloc (0x1000000 * 3);
-
-    table_y = COG_OFFSET (bad_color_transform_table, 0 * 0x1000000);
-    table_u = COG_OFFSET (bad_color_transform_table, 1 * 0x1000000);
-    table_v = COG_OFFSET (bad_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;
-          bad_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 bad_color_transform_table;
-}
-#endif
diff --git a/gst-libs/gst/video/gstcms.h b/gst-libs/gst/video/gstcms.h
deleted file mode 100644
index 35b1b11..0000000
--- a/gst-libs/gst/video/gstcms.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* 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 bad_color_xyY_to_XYZ (Color * c);
-void bad_color_XYZ_to_xyY (Color * c);
-void bad_color_set (Color * c, double x, double y, double z);
-void bad_color_matrix_set_identity (ColorMatrix * m);
-void bad_color_matrix_dump (ColorMatrix * m);
-void bad_color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b);
-void bad_color_matrix_apply (ColorMatrix * m, Color * dest, Color * src);
-void bad_color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
-    double a3);
-void bad_color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3);
-void bad_color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb);
-void bad_color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb);
-void bad_color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst);
-void bad_color_matrix_build_bt709_to_bt601 (ColorMatrix * dst);
-void bad_color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst);
-void bad_color_matrix_invert (ColorMatrix * m);
-void bad_color_matrix_copy (ColorMatrix * dest, ColorMatrix * src);
-void bad_color_matrix_transpose (ColorMatrix * m);
-void bad_color_matrix_build_XYZ (ColorMatrix * dst,
-    double rx, double ry,
-    double gx, double gy, double bx, double by, double wx, double wy);
-void bad_color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst);
-void bad_color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst);
-void bad_color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst);
-void bad_color_transfer_function_apply (Color * dest, Color * src);
-void bad_color_transfer_function_unapply (Color * dest, Color * src);
-void bad_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
index 5d2e3f0..09347c3 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -28,7 +28,7 @@
  * 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.
  *
@@ -40,8 +40,6 @@
 
 #include <string.h>
 
-#include "videoconvert.h"
-
 #include "gstvideoaggregator.h"
 #include "gstvideoaggregatorpad.h"
 
@@ -56,19 +54,29 @@
  ****************************************/
 
 #define DEFAULT_PAD_ZORDER 0
+#define DEFAULT_PAD_IGNORE_EOS FALSE
 enum
 {
   PROP_PAD_0,
   PROP_PAD_ZORDER,
+  PROP_PAD_IGNORE_EOS,
 };
 
 
 struct _GstVideoAggregatorPadPrivate
 {
   /* Converter, if NULL no conversion is done */
-  VideoConvert *convert;
+  GstVideoConverter *convert;
+
+  /* caps used for conversion if needed */
+  GstVideoInfo conversion_info;
+  GstBuffer *converted_buffer;
+
+  GstClockTime start_time;
+  GstClockTime end_time;
 };
 
+
 G_DEFINE_TYPE (GstVideoAggregatorPad, gst_videoaggregator_pad,
     GST_TYPE_AGGREGATOR_PAD);
 
@@ -82,6 +90,9 @@
     case PROP_PAD_ZORDER:
       g_value_set_uint (value, pad->zorder);
       break;
+    case PROP_PAD_IGNORE_EOS:
+      g_value_set_boolean (value, pad->ignore_eos);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -111,6 +122,9 @@
           (GCompareFunc) pad_zorder_compare);
       GST_OBJECT_UNLOCK (vagg);
       break;
+    case PROP_PAD_IGNORE_EOS:
+      pad->ignore_eos = g_value_get_boolean (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -127,8 +141,77 @@
 
   gst_videoaggregator_reset_qos (vagg);
   gst_buffer_replace (&pad->buffer, NULL);
-  pad->start_time = -1;
-  pad->end_time = -1;
+  pad->priv->start_time = -1;
+  pad->priv->end_time = -1;
+
+  return TRUE;
+}
+
+static gboolean
+gst_video_aggregator_pad_set_info (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg G_GNUC_UNUSED,
+    GstVideoInfo * current_info, GstVideoInfo * wanted_info)
+{
+  gchar *colorimetry, *best_colorimetry;
+  const gchar *chroma, *best_chroma;
+
+  if (!current_info->finfo)
+    return TRUE;
+
+  if (GST_VIDEO_INFO_FORMAT (current_info) == GST_VIDEO_FORMAT_UNKNOWN)
+    return TRUE;
+
+  if (pad->priv->convert)
+    gst_video_converter_free (pad->priv->convert);
+
+  pad->priv->convert = NULL;
+
+  colorimetry = gst_video_colorimetry_to_string (&(current_info->colorimetry));
+  chroma = gst_video_chroma_to_string (current_info->chroma_site);
+
+  best_colorimetry =
+      gst_video_colorimetry_to_string (&(wanted_info->colorimetry));
+  best_chroma = gst_video_chroma_to_string (wanted_info->chroma_site);
+
+  if (GST_VIDEO_INFO_FORMAT (wanted_info) !=
+      GST_VIDEO_INFO_FORMAT (current_info)
+      || g_strcmp0 (colorimetry, best_colorimetry)
+      || g_strcmp0 (chroma, best_chroma)) {
+    GstVideoInfo tmp_info;
+
+    /* Initialize with the wanted video format and our original width and
+     * height as we don't want to rescale. Then copy over the wanted
+     * colorimetry, and chroma-site and our current pixel-aspect-ratio
+     * and other relevant fields.
+     */
+    gst_video_info_set_format (&tmp_info, GST_VIDEO_INFO_FORMAT (wanted_info),
+        current_info->width, current_info->height);
+    tmp_info.chroma_site = wanted_info->chroma_site;
+    tmp_info.colorimetry = wanted_info->colorimetry;
+    tmp_info.par_n = current_info->par_n;
+    tmp_info.par_d = current_info->par_d;
+    tmp_info.fps_n = current_info->fps_n;
+    tmp_info.fps_d = current_info->fps_d;
+    tmp_info.flags = current_info->flags;
+    tmp_info.interlace_mode = current_info->interlace_mode;
+
+    GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
+        GST_VIDEO_INFO_FORMAT (current_info),
+        GST_VIDEO_INFO_FORMAT (&tmp_info));
+    pad->priv->convert =
+        gst_video_converter_new (current_info, &tmp_info, NULL);
+    pad->priv->conversion_info = tmp_info;
+    if (!pad->priv->convert) {
+      g_free (colorimetry);
+      g_free (best_colorimetry);
+      GST_WARNING_OBJECT (pad, "No path found for conversion");
+      return FALSE;
+    }
+  } else {
+    GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
+  }
+  g_free (colorimetry);
+  g_free (best_colorimetry);
 
   return TRUE;
 }
@@ -139,12 +222,83 @@
   GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (o);
 
   if (vaggpad->priv->convert)
-    badvideoconvert_convert_free (vaggpad->priv->convert);
+    gst_video_converter_free (vaggpad->priv->convert);
   vaggpad->priv->convert = NULL;
 
   G_OBJECT_CLASS (gst_videoaggregator_pad_parent_class)->finalize (o);
 }
 
+static gboolean
+gst_video_aggregator_pad_prepare_frame (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg)
+{
+  guint outsize;
+  GstVideoFrame *converted_frame;
+  GstBuffer *converted_buf = NULL;
+  GstVideoFrame *frame;
+  static GstAllocationParams params = { 0, 15, 0, 0, };
+
+  if (!pad->buffer)
+    return TRUE;
+
+  frame = g_slice_new0 (GstVideoFrame);
+
+  if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
+          GST_MAP_READ)) {
+    GST_WARNING_OBJECT (vagg, "Could not map input buffer");
+    return FALSE;
+  }
+
+  if (pad->priv->convert) {
+    gint converted_size;
+
+    converted_frame = g_slice_new0 (GstVideoFrame);
+
+    /* We wait until here to set the conversion infos, in case vagg->info changed */
+    converted_size = pad->priv->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->priv->conversion_info),
+            converted_buf, GST_MAP_READWRITE)) {
+      GST_WARNING_OBJECT (vagg, "Could not map converted frame");
+
+      g_slice_free (GstVideoFrame, converted_frame);
+      gst_video_frame_unmap (frame);
+      g_slice_free (GstVideoFrame, frame);
+      return FALSE;
+    }
+
+    gst_video_converter_frame (pad->priv->convert, frame, converted_frame);
+    pad->priv->converted_buffer = converted_buf;
+    gst_video_frame_unmap (frame);
+    g_slice_free (GstVideoFrame, frame);
+  } else {
+    converted_frame = frame;
+  }
+
+  pad->aggregated_frame = converted_frame;
+
+  return TRUE;
+}
+
+static void
+gst_video_aggregator_pad_clean_frame (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg)
+{
+  if (pad->aggregated_frame) {
+    gst_video_frame_unmap (pad->aggregated_frame);
+    g_slice_free (GstVideoFrame, pad->aggregated_frame);
+    pad->aggregated_frame = NULL;
+  }
+
+  if (pad->priv->converted_buffer) {
+    gst_buffer_unref (pad->priv->converted_buffer);
+    pad->priv->converted_buffer = NULL;
+  }
+}
+
 static void
 gst_videoaggregator_pad_class_init (GstVideoAggregatorPadClass * klass)
 {
@@ -157,12 +311,21 @@
 
   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,
+          0, G_MAXUINT, DEFAULT_PAD_ZORDER,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_IGNORE_EOS,
+      g_param_spec_boolean ("ignore-eos", "Ignore EOS", "Aggregate the last "
+          "frame on pads that are EOS till they are released",
+          DEFAULT_PAD_IGNORE_EOS,
           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);
+  klass->set_info = GST_DEBUG_FUNCPTR (gst_video_aggregator_pad_set_info);
+  klass->prepare_frame =
+      GST_DEBUG_FUNCPTR (gst_video_aggregator_pad_prepare_frame);
+  klass->clean_frame = GST_DEBUG_FUNCPTR (gst_video_aggregator_pad_clean_frame);
 }
 
 static void
@@ -173,9 +336,9 @@
       GstVideoAggregatorPadPrivate);
 
   vaggpad->zorder = DEFAULT_PAD_ZORDER;
-  vaggpad->need_conversion_update = FALSE;
+  vaggpad->ignore_eos = DEFAULT_PAD_IGNORE_EOS;
   vaggpad->aggregated_frame = NULL;
-  vaggpad->converted_buffer = NULL;
+  vaggpad->priv->converted_buffer = NULL;
 
   vaggpad->priv->convert = NULL;
 }
@@ -247,31 +410,11 @@
   } 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;
@@ -283,16 +426,52 @@
 
   /* current caps */
   GstCaps *current_caps;
-  gboolean send_caps;
+
+  gboolean live;
 };
 
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVideoAggregator, gst_videoaggregator,
-    GST_TYPE_AGGREGATOR, G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
-        gst_videoaggregator_child_proxy_init));
+/* Can't use the G_DEFINE_TYPE macros because we need the
+ * videoaggregator class in the _init to be able to set
+ * the sink pad non-alpha caps. Using the G_DEFINE_TYPE there
+ * seems to be no way of getting the real class being initialized */
+static void gst_videoaggregator_init (GstVideoAggregator * self,
+    GstVideoAggregatorClass * klass);
+static void gst_videoaggregator_class_init (GstVideoAggregatorClass * klass);
+static gpointer gst_videoaggregator_parent_class = NULL;
+static gint GstVideoAggregator_private_offset;
+
+_G_DEFINE_TYPE_EXTENDED_CLASS_INIT (GstVideoAggregator, gst_videoaggregator);
+
+G_GNUC_UNUSED static inline gpointer
+gst_videoaggregator_get_instance_private (const GstVideoAggregator * self)
+{
+  return (G_STRUCT_MEMBER_P (self, GstVideoAggregator_private_offset));
+}
+
+GType
+gst_videoaggregator_get_type (void)
+{
+  static volatile gsize g_define_type_id_volatile = 0;
+  if (g_once_init_enter (&g_define_type_id_volatile)) {
+    GType g_define_type_id = g_type_register_static_simple (GST_TYPE_AGGREGATOR,
+        g_intern_static_string ("GstVideoAggregator"),
+        sizeof (GstVideoAggregatorClass),
+        (GClassInitFunc) gst_videoaggregator_class_intern_init,
+        sizeof (GstVideoAggregator),
+        (GInstanceInitFunc) gst_videoaggregator_init,
+        (GTypeFlags) G_TYPE_FLAG_ABSTRACT);
+    {
+      G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
+          gst_videoaggregator_child_proxy_init);
+    }
+    g_once_init_leave (&g_define_type_id_volatile, g_define_type_id);
+  }
+  return g_define_type_id_volatile;
+}
 
 static void
-_find_best_video_format (GstVideoAggregator * vagg, GstCaps * downstream_caps,
-    GstVideoInfo * best_info, GstVideoFormat * best_format,
+gst_videoaggreagator_find_best_format (GstVideoAggregator * vagg,
+    GstCaps * downstream_caps, GstVideoInfo * best_info,
     gboolean * at_least_one_alpha)
 {
   GList *tmp;
@@ -349,11 +528,9 @@
     /* 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;
     }
@@ -363,21 +540,25 @@
   g_hash_table_unref (formats_table);
 }
 
+/* WITH GST_VIDEO_AGGREGATOR_LOCK TAKEN
+ * NOTE: After calling that method you **have to** call
+ *       gst_videoaggregator_update_src_caps (without releasing
+ *       the GST_VIDEO_AGGREGATOR_LOCK in between)
+ */
 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);
 
+  GstVideoAggregatorClass *vagg_class = GST_VIDEO_AGGREGATOR_GET_CLASS (vagg);
+  GstVideoAggregatorPadClass *vaggpad_class = g_type_class_peek
+      (GST_AGGREGATOR_GET_CLASS (vagg)->sinkpads_type);
+
   best_format = GST_VIDEO_FORMAT_UNKNOWN;
   gst_video_info_init (&best_info);
 
@@ -392,10 +573,13 @@
   }
 
 
-  if (vagg_klass->disable_frame_conversion == FALSE)
-    _find_best_video_format (vagg, downstream_caps, &best_info, &best_format,
+  if (vagg_class->find_best_format) {
+    vagg_class->find_best_format (vagg, downstream_caps, &best_info,
         &at_least_one_alpha);
 
+    best_format = GST_VIDEO_INFO_FORMAT (&best_info);
+  }
+
   if (best_format == GST_VIDEO_FORMAT_UNKNOWN) {
     downstream_caps = gst_caps_fixate (downstream_caps);
     gst_video_info_from_caps (&best_info, downstream_caps);
@@ -412,62 +596,31 @@
     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);
+      "The output format will now be : %d with chroma : %s",
+      best_format, gst_video_chroma_to_string (best_info.chroma_site));
 
-  /* 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;
+  if (vaggpad_class->set_info) {
+    GST_OBJECT_LOCK (vagg);
+    /* Then browse the sinks once more, setting or unsetting conversion if needed */
+    for (tmp = GST_ELEMENT (vagg)->sinkpads; tmp; tmp = tmp->next) {
+      GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (tmp->data);
 
-    pad = tmp->data;
-
-    if (!pad->info.finfo)
-      continue;
-
-    if (GST_VIDEO_INFO_FORMAT (&pad->info) == GST_VIDEO_FORMAT_UNKNOWN)
-      continue;
-
-    if (pad->priv->convert)
-      badvideoconvert_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 = badvideoconvert_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");
+      if (!vaggpad_class->set_info (pad, vagg, &pad->info, &best_info)) {
         GST_OBJECT_UNLOCK (vagg);
+
         return FALSE;
       }
-    } else {
-      GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
     }
-    g_free (colorimetry);
+    GST_OBJECT_UNLOCK (vagg);
   }
-  GST_OBJECT_UNLOCK (vagg);
 
-  g_free (best_colorimetry);
   return TRUE;
 }
 
+/* WITH GST_VIDEO_AGGREGATOR_LOCK TAKEN */
 static gboolean
 gst_videoaggregator_src_setcaps (GstVideoAggregator * vagg, GstCaps * caps)
 {
@@ -484,31 +637,40 @@
 
   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;
+      /* The timestamp offset will be updated based on the
+       * segment position the next time we aggregate */
+      GST_DEBUG_OBJECT (vagg,
+          "Resetting frame counter because of framerate change");
     }
     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) {
+    GstClockTime latency;
+
     gst_caps_replace (&vagg->priv->current_caps, caps);
-    vagg->priv->send_caps = TRUE;
+    GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+
+    gst_aggregator_set_src_caps (agg, caps);
+    latency = gst_util_uint64_scale (GST_SECOND,
+        GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info));
+    gst_aggregator_set_latency (agg, latency, latency);
+
+    GST_VIDEO_AGGREGATOR_LOCK (vagg);
   }
 
 done:
   return ret;
 }
 
+/* WITH GST_VIDEO_AGGREGATOR_LOCK TAKEN */
 static gboolean
 gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
 {
@@ -521,8 +683,6 @@
   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;
@@ -566,72 +726,89 @@
   }
 
   if (best_width > 0 && best_height > 0 && best_fps > 0) {
-    GstCaps *caps, *peercaps;
+    GstCaps *caps, *peercaps, *info_caps;
     GstStructure *s;
     GstVideoInfo info;
+    int i;
 
-    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);
+    /* Initialize the video info with our target format and
+     * the best width and height and framerate. Then copy over
+     * all other fields as we negotiated them before
+     */
     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);
+    info.chroma_site = vagg->info.chroma_site;
+    info.par_n = vagg->info.par_n;
+    info.par_d = vagg->info.par_d;
+    info.colorimetry = vagg->info.colorimetry;
+    info.flags = vagg->info.flags;
+    info.interlace_mode = vagg->info.interlace_mode;
 
-    if (vagg_klass->update_info) {
-      if (!vagg_klass->update_info (vagg, &info)) {
+    info_caps = gst_video_info_to_caps (&info);
+
+    if (vagg_klass->update_caps) {
+      if (!(caps = vagg_klass->update_caps (vagg, info_caps))) {
+        gst_caps_unref (info_caps);
         ret = FALSE;
-        GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
         goto done;
       }
+      gst_caps_unref (info_caps);
+    } else {
+      caps = info_caps;
+    }
+
+    /* If the sub-class allows it, allow size/framerate changes */
+    if (!vagg_klass->preserve_update_caps_result) {
+      s = gst_caps_get_structure (caps, 0);
+      gst_structure_get (s, "width", G_TYPE_INT, &best_width, "height",
+          G_TYPE_INT, &best_height, NULL);
+
+      for (i = 0; i < gst_caps_get_size (caps); i++) {
+        s = gst_caps_get_structure (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);
+      }
     }
 
-    caps = gst_video_info_to_caps (&info);
-
-    peercaps = gst_pad_peer_query_caps (agg->srcpad, NULL);
+    peercaps = gst_pad_peer_query_caps (agg->srcpad, caps);
     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_DEBUG_OBJECT (vagg, "intersecting %" GST_PTR_FORMAT
+          " with peer caps %" GST_PTR_FORMAT " result %" GST_PTR_FORMAT, caps,
+          peercaps, tmp);
+
       gst_caps_unref (caps);
       gst_caps_unref (peercaps);
-      caps = tmp;
+      caps = tmp;               /* pass ownership */
       if (gst_caps_is_empty (caps)) {
         GST_DEBUG_OBJECT (vagg, "empty caps");
         ret = FALSE;
-        GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+        gst_caps_unref (caps);
         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_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_nearest_fraction (s, "pixel-aspect-ratio", 1,
+          1);
+
+      /* fixate the the rest of the fields */
+      caps = gst_caps_fixate (caps);
 
       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);
-
     if (gst_videoaggregator_src_setcaps (vagg, caps)) {
       if (vagg_klass->negotiated_caps)
         ret =
@@ -639,12 +816,15 @@
     }
     gst_caps_unref (caps);
   } else {
-    GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+    /* We couldn't decide the output video info because the sinkpads don't have
+     * all the caps yet, so we mark the pad as needing a reconfigure. This
+     * allows aggregate() to skip ahead a bit and try again later. */
+    GST_DEBUG_OBJECT (vagg, "Couldn't decide output video info");
+    gst_pad_mark_reconfigure (agg->srcpad);
+    ret = FALSE;
   }
 
 done:
-  GST_VIDEO_AGGREGATOR_SETCAPS_UNLOCK (vagg);
-
   return ret;
 }
 
@@ -669,9 +849,7 @@
 
   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) !=
+    if (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 %"
@@ -682,39 +860,89 @@
   }
 
   vaggpad->info = info;
+  gst_pad_mark_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg));
+  ret = TRUE;
 
-  ret = gst_videoaggregator_update_converters (vagg);
   GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
 
-  if (ret)
-    ret = gst_videoaggregator_update_src_caps (vagg);
-
 beach:
   return ret;
 }
 
+static gboolean
+gst_videoaggregator_caps_has_alpha (GstCaps * caps)
+{
+  guint size = gst_caps_get_size (caps);
+  guint i;
+
+  for (i = 0; i < size; i++) {
+    GstStructure *s = gst_caps_get_structure (caps, i);
+    const GValue *formats = gst_structure_get_value (s, "format");
+
+    if (formats) {
+      const GstVideoFormatInfo *info;
+
+      if (GST_VALUE_HOLDS_LIST (formats)) {
+        guint list_size = gst_value_list_get_size (formats);
+        guint index;
+
+        for (index = 0; index < list_size; index++) {
+          const GValue *list_item = gst_value_list_get_value (formats, index);
+          info =
+              gst_video_format_get_info (gst_video_format_from_string
+              (g_value_get_string (list_item)));
+          if (GST_VIDEO_FORMAT_INFO_HAS_ALPHA (info))
+            return TRUE;
+        }
+
+      } else if (G_VALUE_HOLDS_STRING (formats)) {
+        info =
+            gst_video_format_get_info (gst_video_format_from_string
+            (g_value_get_string (formats)));
+        if (GST_VIDEO_FORMAT_INFO_HAS_ALPHA (info))
+          return TRUE;
+
+      } else {
+        g_assert_not_reached ();
+        GST_WARNING ("Unexpected type for video 'format' field: %s",
+            G_VALUE_TYPE_NAME (formats));
+      }
+
+    } else {
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
 static GstCaps *
 gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
     GstCaps * filter)
 {
   GstCaps *srccaps;
-  GstCaps *template_caps;
-  GstCaps *filtered_caps;
+  GstCaps *template_caps, *sink_template_caps;
   GstCaps *returned_caps;
   GstStructure *s;
-  gboolean had_current_caps = TRUE;
   gint i, n;
   GstAggregator *agg = GST_AGGREGATOR (vagg);
+  GstPad *srcpad = GST_PAD (agg->srcpad);
+  gboolean has_alpha;
 
-  template_caps = gst_pad_get_pad_template_caps (GST_PAD (agg->srcpad));
+  template_caps = gst_pad_get_pad_template_caps (srcpad);
 
-  srccaps = gst_pad_get_current_caps (GST_PAD (agg->srcpad));
+  GST_DEBUG_OBJECT (pad, "Get caps with filter: %" GST_PTR_FORMAT, filter);
+
+  srccaps = gst_pad_get_current_caps (srcpad);
   if (srccaps == NULL) {
-    had_current_caps = FALSE;
-    srccaps = template_caps;
+    srccaps = gst_pad_peer_query_caps (srcpad, template_caps);
+    GST_DEBUG_OBJECT (pad, "No output caps, using possible formats: %"
+        GST_PTR_FORMAT, srccaps);
+  } else {
+    GST_DEBUG_OBJECT (pad, "Using output caps: %" GST_PTR_FORMAT, srccaps);
   }
 
   srccaps = gst_caps_make_writable (srccaps);
+  has_alpha = gst_videoaggregator_caps_has_alpha (srccaps);
 
   n = gst_caps_get_size (srccaps);
   for (i = 0; i < n; i++) {
@@ -722,24 +950,35 @@
     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);
+        "pixel-aspect-ratio", NULL);
   }
 
-  filtered_caps = srccaps;
-  if (filter)
-    filtered_caps = gst_caps_intersect (srccaps, filter);
-  returned_caps = gst_caps_intersect (filtered_caps, template_caps);
+  if (filter) {
+    returned_caps = gst_caps_intersect (srccaps, filter);
+    gst_caps_unref (srccaps);
+  } else {
+    returned_caps = srccaps;
+  }
 
-  gst_caps_unref (srccaps);
-  if (filter)
-    gst_caps_unref (filtered_caps);
-  if (had_current_caps)
-    gst_caps_unref (template_caps);
+  if (has_alpha) {
+    sink_template_caps = gst_pad_get_pad_template_caps (pad);
+  } else {
+    GstVideoAggregatorClass *klass = GST_VIDEO_AGGREGATOR_GET_CLASS (vagg);
+    sink_template_caps = gst_caps_ref (klass->sink_non_alpha_caps);
+  }
+
+  {
+    GstCaps *intersect = gst_caps_intersect (returned_caps, sink_template_caps);
+    gst_caps_unref (returned_caps);
+    returned_caps = intersect;
+  }
+
+  gst_caps_unref (template_caps);
+  gst_caps_unref (sink_template_caps);
+
+  GST_DEBUG_OBJECT (pad, "Returning caps: %" GST_PTR_FORMAT, returned_caps);
 
   return returned_caps;
 }
@@ -748,15 +987,22 @@
 gst_videoaggregator_update_qos (GstVideoAggregator * vagg, gdouble proportion,
     GstClockTimeDiff diff, GstClockTime timestamp)
 {
+  gboolean live;
+
   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));
 
+  live =
+      GST_CLOCK_TIME_IS_VALID (gst_aggregator_get_latency (GST_AGGREGATOR
+          (vagg)));
+
   GST_OBJECT_LOCK (vagg);
+
   vagg->priv->proportion = proportion;
   if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
-    if (G_UNLIKELY (diff > 0))
+    if (!live && 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),
@@ -795,8 +1041,8 @@
   gst_video_info_init (&vagg->info);
   vagg->priv->ts_offset = 0;
   vagg->priv->nframes = 0;
+  vagg->priv->live = FALSE;
 
-  gst_segment_init (&agg->segment, GST_FORMAT_TIME);
   agg->segment.position = -1;
 
   gst_videoaggregator_reset_qos (vagg);
@@ -806,9 +1052,8 @@
     GstVideoAggregatorPad *p = l->data;
 
     gst_buffer_replace (&p->buffer, NULL);
-    gst_buffer_replace (&p->queued, NULL);
-    p->start_time = -1;
-    p->end_time = -1;
+    p->priv->start_time = -1;
+    p->priv->end_time = -1;
 
     gst_video_info_init (&p->info);
   }
@@ -818,25 +1063,34 @@
 #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)
+    GstClockTime output_start_running_time,
+    GstClockTime output_end_running_time)
 {
   GstAggregator *agg = GST_AGGREGATOR (vagg);
   GList *l;
   gboolean eos = TRUE;
   gboolean need_more_data = FALSE;
 
+  /* get a set of buffers into pad->buffer that are within output_start_running_time
+   * and output_end_running_time taking into account finished and unresponsive pads */
+
   GST_OBJECT_LOCK (vagg);
   for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
     GstVideoAggregatorPad *pad = l->data;
-    GstSegment *segment;
+    GstSegment segment;
     GstAggregatorPad *bpad;
     GstBuffer *buf;
     GstVideoInfo *vinfo;
     gboolean is_eos;
 
     bpad = GST_AGGREGATOR_PAD (pad);
-    segment = &bpad->segment;
-    is_eos = bpad->eos;
+    GST_OBJECT_LOCK (bpad);
+    segment = bpad->segment;
+    GST_OBJECT_UNLOCK (bpad);
+    is_eos = gst_aggregator_pad_is_eos (bpad);
+
+    if (!is_eos)
+      eos = FALSE;
     buf = gst_aggregator_pad_get_buffer (bpad);
     if (buf) {
       GstClockTime start_time, end_time;
@@ -852,70 +1106,71 @@
       vinfo = &pad->info;
 
       /* FIXME: Make all this work with negative rates */
+      end_time = GST_BUFFER_DURATION (buf);
 
-      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 (end_time == -1) {
+        start_time = MAX (start_time, segment.start);
+        start_time =
+            gst_segment_to_running_time (&segment, GST_FORMAT_TIME, start_time);
 
-      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);
+        if (start_time >= output_end_running_time) {
+          if (pad->buffer) {
+            GST_DEBUG_OBJECT (pad, "buffer duration is -1, start_time >= "
+                "output_end_running_time. Keeping previous buffer");
+          } else {
+            GST_DEBUG_OBJECT (pad, "buffer duration is -1, start_time >= "
+                "output_end_running_time. No previous buffer, need more data");
+            need_more_data = TRUE;
+          }
           gst_buffer_unref (buf);
-          pad->queued_vinfo = pad->info;
-          GST_DEBUG ("end time is -1 and nothing queued");
+          continue;
+        } else if (start_time < output_start_running_time) {
+          GST_DEBUG_OBJECT (pad, "buffer duration is -1, start_time < "
+              "output_start_running_time.  Discarding old buffer");
+          gst_buffer_replace (&pad->buffer, buf);
+          pad->buffer_vinfo = *vinfo;
+          gst_buffer_unref (buf);
+          gst_aggregator_pad_drop_buffer (bpad);
           need_more_data = TRUE;
           continue;
         }
+        gst_buffer_unref (buf);
+        buf = gst_aggregator_pad_steal_buffer (bpad);
+        gst_buffer_replace (&pad->buffer, buf);
+        pad->buffer_vinfo = *vinfo;
+        /* FIXME: Set start_time and end_time to something here? */
+        gst_buffer_unref (buf);
+        GST_DEBUG_OBJECT (pad, "buffer duration is -1");
+        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) {
+      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_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);
-        }
+        gst_buffer_unref (buf);
+        gst_aggregator_pad_drop_buffer (bpad);
 
         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 = 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);
+          gst_segment_to_running_time (&segment, GST_FORMAT_TIME, start_time);
       end_time =
-          gst_segment_to_running_time (segment, GST_FORMAT_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 */
@@ -924,63 +1179,62 @@
         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);
-        }
+      GST_TRACE_OBJECT (pad, "dealing with buffer %p start %" GST_TIME_FORMAT
+          " end %" GST_TIME_FORMAT " out start %" GST_TIME_FORMAT
+          " out end %" GST_TIME_FORMAT, buf, GST_TIME_ARGS (start_time),
+          GST_TIME_ARGS (end_time), GST_TIME_ARGS (output_start_running_time),
+          GST_TIME_ARGS (output_end_running_time));
 
-        need_more_data = TRUE;
+      if (pad->priv->end_time != -1 && pad->priv->end_time > end_time) {
+        GST_DEBUG_OBJECT (pad, "Buffer from the past, dropping");
+        gst_buffer_unref (buf);
+        gst_aggregator_pad_drop_buffer (bpad);
         continue;
       }
 
-      if (end_time >= output_start_time && start_time < output_end_time) {
+      if (end_time >= output_start_running_time
+          && start_time < output_end_running_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;
+        pad->priv->start_time = start_time;
+        pad->priv->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);
-        }
+        gst_buffer_unref (buf);
+        gst_aggregator_pad_drop_buffer (bpad);
         eos = FALSE;
-      } else if (start_time >= output_end_time) {
+      } else if (start_time >= output_end_running_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 == 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);
-        }
+        gst_buffer_replace (&pad->buffer, buf);
+        pad->buffer_vinfo = *vinfo;
+        pad->priv->start_time = start_time;
+        pad->priv->end_time = end_time;
+        GST_DEBUG_OBJECT (pad,
+            "replacing old buffer with a newer buffer, start %" GST_TIME_FORMAT
+            " out end %" GST_TIME_FORMAT, GST_TIME_ARGS (start_time),
+            GST_TIME_ARGS (output_end_running_time));
+        gst_buffer_unref (buf);
+        gst_aggregator_pad_drop_buffer (bpad);
 
         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 && pad->ignore_eos) {
+        eos = FALSE;
+        GST_DEBUG_OBJECT (pad, "ignoring EOS and re-using previous buffer");
+        continue;
+      }
+
+      if (pad->priv->end_time != -1) {
+        if (pad->priv->end_time <= output_start_running_time) {
+          pad->priv->start_time = pad->priv->end_time = -1;
           if (is_eos) {
             GST_DEBUG ("I just need more data");
             need_more_data = TRUE;
@@ -988,6 +1242,8 @@
         } else if (is_eos) {
           eos = FALSE;
         }
+      } else if (is_eos) {
+        gst_buffer_replace (&pad->buffer, NULL);
       }
     }
   }
@@ -1002,95 +1258,47 @@
 }
 
 static gboolean
-prepare_frames (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
+sync_pad_values (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
 {
   GstAggregatorPad *bpad = GST_AGGREGATOR_PAD (pad);
+  GstClockTime timestamp;
+  gint64 stream_time;
 
-  static GstAllocationParams params = { 0, 15, 0, 0, };
+  if (pad->buffer == NULL)
+    return TRUE;
 
-  if (pad->buffer != NULL) {
-    guint outsize;
-    GstClockTime timestamp;
-    gint64 stream_time;
-    GstSegment *seg;
-    GstVideoFrame *converted_frame;
-    GstBuffer *converted_buf = NULL;
-    GstVideoFrame *frame = g_slice_new0 (GstVideoFrame);
+  timestamp = GST_BUFFER_TIMESTAMP (pad->buffer);
+  GST_OBJECT_LOCK (bpad);
+  stream_time = gst_segment_to_stream_time (&bpad->segment, GST_FORMAT_TIME,
+      timestamp);
+  GST_OBJECT_UNLOCK (bpad);
 
-    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;
-
-      converted_frame = g_slice_new0 (GstVideoFrame);
-
-      /* 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");
-
-        g_slice_free (GstVideoFrame, converted_frame);
-        gst_video_frame_unmap (frame);
-        g_slice_free (GstVideoFrame, frame);
-        return FALSE;
-      }
-
-      badvideoconvert_convert_convert (pad->priv->convert, converted_frame,
-          frame);
-      pad->converted_buffer = converted_buf;
-      gst_video_frame_unmap (frame);
-      g_slice_free (GstVideoFrame, frame);
-    } else {
-      converted_frame = frame;
-      converted_buf = pad->buffer;
-    }
-
-    pad->aggregated_frame = converted_frame;
-  }
+  /* sync object properties on stream time */
+  if (GST_CLOCK_TIME_IS_VALID (stream_time))
+    gst_object_sync_values (GST_OBJECT (pad), stream_time);
 
   return TRUE;
 }
 
 static gboolean
+prepare_frames (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
+{
+  GstVideoAggregatorPadClass *vaggpad_class =
+      GST_VIDEO_AGGREGATOR_PAD_GET_CLASS (pad);
+
+  if (pad->buffer == NULL || !vaggpad_class->prepare_frame)
+    return TRUE;
+
+  return vaggpad_class->prepare_frame (pad, vagg);
+}
+
+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;
-  }
+  GstVideoAggregatorPadClass *vaggpad_class =
+      GST_VIDEO_AGGREGATOR_PAD_GET_CLASS (pad);
 
-  if (pad->converted_buffer) {
-    gst_buffer_unref (pad->converted_buffer);
-    pad->converted_buffer = NULL;
-  }
+  vaggpad_class->clean_frame (pad, vagg);
 
   return TRUE;
 }
@@ -1103,6 +1311,8 @@
   GstFlowReturn ret = GST_FLOW_OK;
   GstElementClass *klass = GST_ELEMENT_GET_CLASS (vagg);
   GstVideoAggregatorClass *vagg_klass = (GstVideoAggregatorClass *) klass;
+  GstVideoAggregatorPadClass *vaggpad_class = g_type_class_peek
+      (GST_AGGREGATOR_CLASS (klass)->sinkpads_type);
 
   g_assert (vagg_klass->aggregate_frames != NULL);
   g_assert (vagg_klass->get_output_buffer != NULL);
@@ -1112,20 +1322,28 @@
         gst_flow_get_name (ret));
     return ret;
   }
+  if (*outbuf == NULL) {
+    /* sub-class doesn't want to generate output right now */
+    return GST_FLOW_OK;
+  }
 
   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);
-  }
+  /* Sync pad properties to the stream time */
+  gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (vagg),
+      (GstAggregatorPadForeachFunc) sync_pad_values, NULL);
+
+  /* Convert all the frames the subclass has before aggregating */
+  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);
+  if (vaggpad_class->clean_frame) {
+    gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (vagg),
+        (GstAggregatorPadForeachFunc) clean_pad, NULL);
+  }
 
   return ret;
 }
@@ -1173,79 +1391,172 @@
   return jitter;
 }
 
-static GstFlowReturn
-gst_videoaggregator_aggregate (GstAggregator * agg)
+static GstClockTime
+gst_videoaggregator_get_next_time (GstAggregator * agg)
 {
-  GstFlowReturn ret;
+  GstClockTime next_time;
+
+  GST_OBJECT_LOCK (agg);
+  if (agg->segment.position == -1 || agg->segment.position < agg->segment.start)
+    next_time = agg->segment.start;
+  else
+    next_time = agg->segment.position;
+
+  if (agg->segment.stop != -1 && next_time > agg->segment.stop)
+    next_time = agg->segment.stop;
+
+  next_time =
+      gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME, next_time);
+  GST_OBJECT_UNLOCK (agg);
+
+  return next_time;
+}
+
+static GstFlowReturn
+gst_videoaggregator_check_reconfigure (GstVideoAggregator * vagg,
+    gboolean timeout)
+{
+  GstAggregator *agg = (GstAggregator *) vagg;
+
+  if (GST_VIDEO_INFO_FORMAT (&vagg->info) == GST_VIDEO_FORMAT_UNKNOWN
+      || gst_pad_check_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg))) {
+    gboolean ret;
+
+    ret = gst_videoaggregator_update_converters (vagg);
+    if (ret)
+      ret = gst_videoaggregator_update_src_caps (vagg);
+
+    if (!ret) {
+      if (timeout && gst_pad_needs_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg))) {
+        guint64 frame_duration;
+        gint fps_d, fps_n;
+
+        GST_DEBUG_OBJECT (vagg,
+            "Got timeout before receiving any caps, don't output anything");
+
+        if (agg->segment.position == -1) {
+          if (agg->segment.rate > 0.0)
+            agg->segment.position = agg->segment.start;
+          else
+            agg->segment.position = agg->segment.stop;
+        }
+
+        /* Advance position */
+        fps_d = GST_VIDEO_INFO_FPS_D (&vagg->info) ?
+            GST_VIDEO_INFO_FPS_D (&vagg->info) : 1;
+        fps_n = GST_VIDEO_INFO_FPS_N (&vagg->info) ?
+            GST_VIDEO_INFO_FPS_N (&vagg->info) : 25;
+        /* Default to 25/1 if no "best fps" is known */
+        frame_duration = gst_util_uint64_scale (GST_SECOND, fps_d, fps_n);
+        if (agg->segment.rate > 0.0)
+          agg->segment.position += frame_duration;
+        else if (agg->segment.position > frame_duration)
+          agg->segment.position -= frame_duration;
+        else
+          agg->segment.position = 0;
+        vagg->priv->nframes++;
+        return GST_FLOW_NEEDS_DATA;
+      } else {
+        return GST_FLOW_NOT_NEGOTIATED;
+      }
+    }
+  }
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_videoaggregator_aggregate (GstAggregator * agg, gboolean timeout)
+{
   GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
   GstClockTime output_start_time, output_end_time;
+  GstClockTime output_start_running_time, output_end_running_time;
   GstBuffer *outbuf = NULL;
-  gint res;
+  GstFlowReturn flow_ret;
   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;
+  flow_ret = gst_videoaggregator_check_reconfigure (vagg, timeout);
+  if (flow_ret != GST_FLOW_OK) {
+    if (flow_ret == GST_FLOW_NEEDS_DATA)
+      flow_ret = GST_FLOW_OK;
+    goto unlock_and_return;
+  }
 
-  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;
+  output_start_time = agg->segment.position;
+  if (agg->segment.position == -1 || agg->segment.position < agg->segment.start)
+    output_start_time = agg->segment.start;
+
+  if (vagg->priv->nframes == 0) {
+    vagg->priv->ts_offset = output_start_time;
+    GST_DEBUG_OBJECT (vagg, "New ts offset %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (output_start_time));
+  }
+
+  if (GST_VIDEO_INFO_FPS_N (&vagg->info) == 0) {
+    output_end_time = -1;
+  } else {
+    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));
+  }
 
   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_start_running_time =
+      gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME,
+      output_start_time);
+  output_end_running_time =
+      gst_segment_to_running_time (&agg->segment, GST_FORMAT_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;
+  if (output_end_time == output_start_time) {
+    flow_ret = GST_FLOW_EOS;
+  } else {
+    flow_ret =
+        gst_videoaggregator_fill_queues (vagg, output_start_running_time,
+        output_end_running_time);
   }
 
+  if (flow_ret == GST_FLOW_NEEDS_DATA && !timeout) {
+    GST_DEBUG_OBJECT (vagg, "Need more data for decisions");
+    flow_ret = GST_FLOW_OK;
+    goto unlock_and_return;
+  } else if (flow_ret == GST_FLOW_EOS) {
+    GST_DEBUG_OBJECT (vagg, "All sinkpads are EOS -- forwarding");
+    goto unlock_and_return;
+  } else if (flow_ret == GST_FLOW_ERROR) {
+    GST_WARNING_OBJECT (vagg, "Error collecting buffers");
+    goto unlock_and_return;
+  }
+
+  GST_DEBUG_OBJECT (vagg,
+      "Producing buffer for %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT
+      ", running time start %" GST_TIME_FORMAT ", running time end %"
+      GST_TIME_FORMAT, GST_TIME_ARGS (output_start_time),
+      GST_TIME_ARGS (output_end_time),
+      GST_TIME_ARGS (output_start_running_time),
+      GST_TIME_ARGS (output_end_running_time));
+
   jitter = gst_videoaggregator_do_qos (vagg, output_start_time);
   if (jitter <= 0) {
-    ret = gst_videoaggregator_do_aggregate (vagg, output_start_time,
+    flow_ret = gst_videoaggregator_do_aggregate (vagg, output_start_time,
         output_end_time, &outbuf);
+    if (flow_ret != GST_FLOW_OK)
+      goto done;
     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_message_new_qos (GST_OBJECT_CAST (vagg), vagg->priv->live,
+        output_start_running_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);
@@ -1253,12 +1564,9 @@
         vagg->priv->qos_processed, vagg->priv->qos_dropped);
     gst_element_post_message (GST_ELEMENT_CAST (vagg), msg);
 
-    ret = GST_FLOW_OK;
+    flow_ret = GST_FLOW_OK;
   }
 
-  agg->segment.position = output_end_time;
-  vagg->priv->nframes++;
-
   GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
   if (outbuf) {
     GST_DEBUG_OBJECT (vagg,
@@ -1266,15 +1574,22 @@
         GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
         GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
 
-    ret = gst_aggregator_finish_buffer (agg, outbuf);
+    flow_ret = gst_aggregator_finish_buffer (agg, outbuf);
   }
-  goto done_unlocked;
 
-done:
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+  vagg->priv->nframes++;
+  agg->segment.position = output_end_time;
   GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
 
-done_unlocked:
-  return ret;
+  return flow_ret;
+
+done:
+  if (outbuf)
+    gst_buffer_unref (outbuf);
+unlock_and_return:
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+  return flow_ret;
 }
 
 /* FIXME, the duration query should reflect how long you will produce
@@ -1365,87 +1680,6 @@
 }
 
 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);
@@ -1474,17 +1708,18 @@
       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);
+
+      if (res) {
+        gst_query_parse_latency (query, &vagg->priv->live, NULL, NULL);
+      }
       break;
     default:
-      /* FIXME, needs a custom query handler because we have multiple
-       * sinkpads */
-      res = FALSE;
+      res =
+          GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->src_query
+          (agg, query);
       break;
   }
   return res;
@@ -1521,56 +1756,6 @@
 }
 
 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;
@@ -1578,20 +1763,20 @@
   GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
 
   GST_INFO_OBJECT (agg, "Flushing");
-  abs_rate = ABS (agg->segment.rate);
   GST_OBJECT_LOCK (vagg);
+  abs_rate = ABS (agg->segment.rate);
   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);
+        p->priv->start_time /= ABS (agg->segment.rate);
+        p->priv->end_time /= ABS (agg->segment.rate);
       }
       if (abs_rate != 1.0 && p->buffer) {
-        p->start_time *= abs_rate;
-        p->end_time *= abs_rate;
+        p->priv->start_time *= abs_rate;
+        p->priv->end_time *= abs_rate;
       }
     }
   }
@@ -1653,11 +1838,6 @@
 {
   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;
@@ -1668,9 +1848,6 @@
 {
   GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
 
-  if (!GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->stop (agg))
-    return FALSE;
-
   gst_videoaggregator_reset (vagg);
 
   return TRUE;
@@ -1695,8 +1872,8 @@
 
   GST_OBJECT_LOCK (vagg);
   vaggpad->zorder = GST_ELEMENT (vagg)->numsinkpads;
-  vaggpad->start_time = -1;
-  vaggpad->end_time = -1;
+  vaggpad->priv->start_time = -1;
+  vaggpad->priv->end_time = -1;
   element->sinkpads = g_list_sort (element->sinkpads,
       (GCompareFunc) pad_zorder_compare);
   GST_OBJECT_UNLOCK (vagg);
@@ -1712,16 +1889,21 @@
 {
   GstVideoAggregator *vagg = NULL;
   GstVideoAggregatorPad *vaggpad;
-  gboolean update_caps;
+  gboolean last_pad;
 
   vagg = GST_VIDEO_AGGREGATOR (element);
   vaggpad = GST_VIDEO_AGGREGATOR_PAD (pad);
 
   GST_VIDEO_AGGREGATOR_LOCK (vagg);
-  gst_videoaggregator_update_converters (vagg);
+
+  GST_OBJECT_LOCK (vagg);
+  last_pad = (GST_ELEMENT (vagg)->numsinkpads - 1 == 0);
+  GST_OBJECT_UNLOCK (vagg);
+
+  if (last_pad)
+    gst_videoaggregator_reset (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));
@@ -1729,9 +1911,9 @@
   GST_ELEMENT_CLASS (gst_videoaggregator_parent_class)->release_pad (GST_ELEMENT
       (vagg), pad);
 
-  if (update_caps)
-    gst_videoaggregator_update_src_caps (vagg);
+  gst_pad_mark_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg));
 
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
   return;
 }
 
@@ -1787,12 +1969,9 @@
     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);
+        "pixel-aspect-ratio", NULL);
   }
 
   modified_caps = gst_caps_intersect (accepted_caps, template_caps);
@@ -1853,7 +2032,6 @@
   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);
 }
@@ -1914,34 +2092,101 @@
   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;
+  agg_class->get_next_time = gst_videoaggregator_get_next_time;
 
+  klass->find_best_format = gst_videoaggreagator_find_best_format;
   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)
+static inline GstCaps *
+_get_non_alpha_caps_from_template (GstVideoAggregatorClass * klass)
 {
+  GstCaps *result;
+  GstCaps *templatecaps;
+  guint i, size;
+
+  templatecaps =
+      gst_pad_template_get_caps (gst_element_class_get_pad_template
+      (GST_ELEMENT_CLASS (klass), "sink_%u"));
+
+  size = gst_caps_get_size (templatecaps);
+  result = gst_caps_new_empty ();
+  for (i = 0; i < size; i++) {
+    GstStructure *s = gst_caps_get_structure (templatecaps, i);
+    const GValue *formats = gst_structure_get_value (s, "format");
+    GValue new_formats = { 0, };
+    gboolean has_format = FALSE;
+
+    /* FIXME what to do if formats are missing? */
+    if (formats) {
+      const GstVideoFormatInfo *info;
+
+      if (GST_VALUE_HOLDS_LIST (formats)) {
+        guint list_size = gst_value_list_get_size (formats);
+        guint index;
+
+        g_value_init (&new_formats, GST_TYPE_LIST);
+
+        for (index = 0; index < list_size; index++) {
+          const GValue *list_item = gst_value_list_get_value (formats, index);
+
+          info =
+              gst_video_format_get_info (gst_video_format_from_string
+              (g_value_get_string (list_item)));
+          if (!GST_VIDEO_FORMAT_INFO_HAS_ALPHA (info)) {
+            has_format = TRUE;
+            gst_value_list_append_value (&new_formats, list_item);
+          }
+        }
+
+      } else if (G_VALUE_HOLDS_STRING (formats)) {
+        info =
+            gst_video_format_get_info (gst_video_format_from_string
+            (g_value_get_string (formats)));
+        if (!GST_VIDEO_FORMAT_INFO_HAS_ALPHA (info)) {
+          has_format = TRUE;
+          gst_value_init_and_copy (&new_formats, formats);
+        }
+
+      } else {
+        g_assert_not_reached ();
+        GST_WARNING ("Unexpected type for video 'format' field: %s",
+            G_VALUE_TYPE_NAME (formats));
+      }
+
+      if (has_format) {
+        s = gst_structure_copy (s);
+        gst_structure_take_value (s, "format", &new_formats);
+        gst_caps_append_structure (result, s);
+      }
+
+    }
+  }
+
+  gst_caps_unref (templatecaps);
+
+  return result;
+}
+
+static GMutex sink_caps_mutex;
+
+static void
+gst_videoaggregator_init (GstVideoAggregator * vagg,
+    GstVideoAggregatorClass * klass)
+{
+
   vagg->priv =
       G_TYPE_INSTANCE_GET_PRIVATE (vagg, GST_TYPE_VIDEO_AGGREGATOR,
       GstVideoAggregatorPrivate);
@@ -1949,7 +2194,13 @@
   vagg->priv->current_caps = NULL;
 
   g_mutex_init (&vagg->priv->lock);
-  g_mutex_init (&vagg->priv->setcaps_lock);
+
   /* initialize variables */
+  g_mutex_lock (&sink_caps_mutex);
+  if (klass->sink_non_alpha_caps == NULL) {
+    klass->sink_non_alpha_caps = _get_non_alpha_caps_from_template (klass);
+  }
+  g_mutex_unlock (&sink_caps_mutex);
+
   gst_videoaggregator_reset (vagg);
 }
diff --git a/gst-libs/gst/video/gstvideoaggregator.h b/gst-libs/gst/video/gstvideoaggregator.h
index b9fd531..f95d0d2 100644
--- a/gst-libs/gst/video/gstvideoaggregator.h
+++ b/gst-libs/gst/video/gstvideoaggregator.h
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
- 
+
 #ifndef __GST_VIDEO_AGGREGATOR_H__
 #define __GST_VIDEO_AGGREGATOR_H__
 
@@ -30,8 +30,6 @@
 #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())
@@ -50,6 +48,8 @@
 typedef struct _GstVideoAggregatorClass GstVideoAggregatorClass;
 typedef struct _GstVideoAggregatorPrivate GstVideoAggregatorPrivate;
 
+#include "gstvideoaggregatorpad.h"
+
 /**
  * GstVideoAggregator:
  * @info: The #GstVideoInfo representing the currently set
@@ -65,17 +65,14 @@
 
   /* < private > */
   GstVideoAggregatorPrivate *priv;
-  gpointer          _gst_reserved[GST_PADDING];
+  gpointer          _gst_reserved[GST_PADDING_LARGE];
 };
 
 /**
  * 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.
+ * @update_caps:              Optional.
+ *                            Lets subclasses update the #GstCaps representing
+ *                            the src pad caps before usage.  Return %NULL to indicate failure.
  * @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
@@ -87,6 +84,11 @@
  *                            the #aggregate_frames vmethod.
  * @negotiated_caps:          Optional.
  *                            Notifies subclasses what caps format has been negotiated
+ * @find_best_format:         Optional.
+ *                            Lets subclasses decide of the best common format to use.
+ * @preserve_update_caps_result: Sub-classes should set this to true if the return result
+ *                               of the update_caps() method should not be further modified
+ *                               by GstVideoAggregator by removing fields.
  **/
 struct _GstVideoAggregatorClass
 {
@@ -94,18 +96,25 @@
   GstAggregatorClass parent_class;
 
   /*< public >*/
-  gboolean           disable_frame_conversion;
-
-  gboolean           (*update_info)               (GstVideoAggregator *  videoaggregator,
-                                                   GstVideoInfo       *  info);
+  GstCaps *          (*update_caps)               (GstVideoAggregator *  videoaggregator,
+                                                   GstCaps            *  caps);
   GstFlowReturn      (*aggregate_frames)          (GstVideoAggregator *  videoaggregator,
                                                    GstBuffer          *  outbuffer);
   GstFlowReturn      (*get_output_buffer)         (GstVideoAggregator *  videoaggregator,
                                                    GstBuffer          ** outbuffer);
   gboolean           (*negotiated_caps)           (GstVideoAggregator *  videoaggregator,
                                                    GstCaps            *  caps);
+  void               (*find_best_format)          (GstVideoAggregator *  vagg,
+                                                   GstCaps            *  downstream_caps,
+                                                   GstVideoInfo       *  best_info,
+                                                   gboolean           *  at_least_one_alpha);
+
+  gboolean           preserve_update_caps_result;
+
+  GstCaps           *sink_non_alpha_caps;
+
   /* < private > */
-  gpointer            _gst_reserved[GST_PADDING];
+  gpointer            _gst_reserved[GST_PADDING_LARGE];
 };
 
 GType gst_videoaggregator_get_type       (void);
diff --git a/gst-libs/gst/video/gstvideoaggregatorpad.h b/gst-libs/gst/video/gstvideoaggregatorpad.h
index 8f7f8ad..4302aa3 100644
--- a/gst-libs/gst/video/gstvideoaggregatorpad.h
+++ b/gst-libs/gst/video/gstvideoaggregatorpad.h
@@ -17,7 +17,7 @@
  * 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__
 
@@ -25,6 +25,7 @@
 #include <gst/video/video.h>
 
 #include <gst/base/gstaggregator.h>
+#include "gstvideoaggregator.h"
 
 G_BEGIN_DECLS
 
@@ -37,6 +38,8 @@
         (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))
+#define GST_VIDEO_AGGREGATOR_PAD_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_VIDEO_AGGREGATOR_PAD,GstVideoAggregatorPadClass))
 
 typedef struct _GstVideoAggregatorPad GstVideoAggregatorPad;
 typedef struct _GstVideoAggregatorPadClass GstVideoAggregatorPadClass;
@@ -44,46 +47,63 @@
 
 /**
  * GstVideoAggregatorPad:
- *
- * The opaque #GstVideoAggregatorPad structure.
+ * @info: The #GstVideoInfo currently set on the pad
+ * @buffer_vinfo: The #GstVideoInfo representing the type contained
+ *                in @buffer
+ * @aggregated_frame: The #GstVideoFrame ready to be used for aggregation
+ *                    inside the aggregate_frames vmethod.
+ * @zorder: The zorder of this pad
  */
 struct _GstVideoAggregatorPad
 {
   GstAggregatorPad parent;
 
-  /* < private > */
-
-  /* caps */
   GstVideoInfo info;
 
+  GstBuffer *buffer;
+  /* The caps on the pad may not match the buffer above because of two reasons:
+   * 1) When caps change, the info above will get updated, but the buffer might
+   *    not since it might be pending on the GstAggregatorPad
+   * 2) We might reject the new buffer in fill_queues() and reuse a previous
+   *    buffer which has older GstVideoInfo
+   * Hence, we need to maintain a GstVideoInfo for mapping buffers separately */
+  GstVideoInfo buffer_vinfo;
+
+  GstVideoFrame *aggregated_frame;
+
   /* 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;
+  gboolean ignore_eos;
 
   /* < private > */
   GstVideoAggregatorPadPrivate *priv;
   gpointer          _gst_reserved[GST_PADDING];
 };
 
+/**
+ * GstVideoAggregatorPadClass:
+ *
+ * @set_info: Lets subclass set a converter on the pad,
+ *                 right after a new format has been negotiated.
+ * @prepare_frame: Prepare the frame from the pad buffer (if any)
+ *                 and sets it to @aggregated_frame
+ * @clean_frame:   clean the frame previously prepared in prepare_frame
+ */
 struct _GstVideoAggregatorPadClass
 {
   GstAggregatorPadClass parent_class;
+  gboolean           (*set_info)              (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator,
+                                               GstVideoInfo          * current_info,
+                                               GstVideoInfo          * wanted_info);
 
-  gpointer          _gst_reserved[GST_PADDING];
+  gboolean           (*prepare_frame)         (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator);
+
+  void               (*clean_frame)           (GstVideoAggregatorPad * pad,
+                                               GstVideoAggregator    * videoaggregator);
+
+  gpointer          _gst_reserved[GST_PADDING_LARGE];
 };
 
 GType gst_videoaggregator_pad_get_type (void);
diff --git a/gst-libs/gst/video/videoconvert.c b/gst-libs/gst/video/videoconvert.c
deleted file mode 100644
index 57d865f..0000000
--- a/gst-libs/gst/video/videoconvert.c
+++ /dev/null
@@ -1,1502 +0,0 @@
-/* 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 *
-badvideoconvert_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:
-  {
-    badvideoconvert_convert_free (convert);
-    return NULL;
-  }
-}
-
-void
-badvideoconvert_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
-badvideoconvert_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
-badvideoconvert_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;
-  }
-
-  bad_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);
-
-  bad_color_matrix_offset_components (&dst, -offset[0], -offset[1], -offset[2]);
-
-  bad_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))
-    bad_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))
-    bad_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);
-
-  bad_color_matrix_scale_components (&dst, (float) scale[0], (float) scale[1],
-      (float) scale[2]);
-
-  bad_color_matrix_offset_components (&dst, offset[0], offset[1], offset[2]);
-
-  /* because we're doing fixed point matrix coefficients */
-  bad_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);
-
-    bad_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);
-
-    bad_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);
-
-    bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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);
-
-    bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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);
-
-    bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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 */
-  bad_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 */
-  bad_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 */
-  bad_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 */
-  bad_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;
-
-  bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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;
-
-  bad_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;
-
-  bad_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 */
-  bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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;
-
-  bad_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);
-
-  bad_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);
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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;
-
-  bad_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++) {
-    bad_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_bad_color_matrix;
-  gboolean keeps_interlaced;
-  gboolean needs_bad_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_bad_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_bad_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
deleted file mode 100644
index 48eda2a..0000000
--- a/gst-libs/gst/video/videoconvert.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* 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 *   badvideoconvert_convert_new            (GstVideoInfo *in_info,
-                                                      GstVideoInfo *out_info);
-void             badvideoconvert_convert_free           (VideoConvert * convert);
-
-void             badvideoconvert_convert_set_dither     (VideoConvert * convert, int type);
-
-void             badvideoconvert_convert_convert        (VideoConvert * convert,
-                                                      GstVideoFrame *dest, const GstVideoFrame *src);
-
-
-G_END_DECLS
-
-#endif /* __GST_COLORSPACE_H__ */
diff --git a/gst-libs/gst/wayland/Makefile.in b/gst-libs/gst/wayland/Makefile.in
index adee5e2..797c35f 100644
--- a/gst-libs/gst/wayland/Makefile.in
+++ b/gst-libs/gst/wayland/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst-libs/gst/wayland
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -766,7 +801,6 @@
 	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*) \
@@ -1074,6 +1108,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst-plugins-bad.doap b/gst-plugins-bad.doap
index a764e61..65acff6 100644
--- a/gst-plugins-bad.doap
+++ b/gst-plugins-bad.doap
@@ -21,7 +21,7 @@
  <category></category>
  <bug-database rdf:resource="http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&amp;component=gst-plugins-bad" />
  <screenshots></screenshots>
- <mailing-list rdf:resource="http://lists.sourceforge.net/lists/listinfo/gstreamer-devel/" />
+ <mailing-list rdf:resource="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" />
  <programming-language>C</programming-language>
  <license rdf:resource="http://usefulinc.com/doap/licenses/lgpl"/>
  <download-page rdf:resource="http://gstreamer.freedesktop.org/download/" />
@@ -35,51 +35,41 @@
 
  <release>
   <Version>
-   <revision>1.4.5</revision>
-   <branch>1.4</branch>
+   <revision>1.5.91</revision>
+   <branch>1.5</branch>
    <name></name>
-   <created>2014-12-18</created>
-   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.4.5.tar.xz" />
+   <created>2015-09-18</created>
+   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.5.91.tar.xz" />
   </Version>
  </release>
 
  <release>
   <Version>
-   <revision>1.4.4</revision>
-   <branch>1.4</branch>
+   <revision>1.5.90</revision>
+   <branch>1.5</branch>
    <name></name>
-   <created>2014-11-06</created>
-   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.4.4.tar.xz" />
+   <created>2015-08-19</created>
+   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.5.90.tar.xz" />
   </Version>
  </release>
 
  <release>
   <Version>
-   <revision>1.4.3</revision>
-   <branch>1.4</branch>
+   <revision>1.5.2</revision>
+   <branch>1.5</branch>
    <name></name>
-   <created>2014-09-24</created>
-   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.4.3.tar.xz" />
+   <created>2015-06-24</created>
+   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.5.2.tar.xz" />
   </Version>
  </release>
 
  <release>
   <Version>
-   <revision>1.4.2</revision>
-   <branch>1.4</branch>
+   <revision>1.5.1</revision>
+   <branch>1.5</branch>
    <name></name>
-   <created>2014-09-19</created>
-   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.4.2.tar.xz" />
-  </Version>
- </release>
-
- <release>
-  <Version>
-   <revision>1.4.1</revision>
-   <branch>1.4</branch>
-   <name></name>
-   <created>2014-08-27</created>
-   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.4.1.tar.xz" />
+   <created>2015-06-07</created>
+   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.5.1.tar.xz" />
   </Version>
  </release>
 
diff --git a/gst-plugins-bad.spec b/gst-plugins-bad.spec
index fd27f20..468c90f 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.4.5
+Version: 1.5.91
 Release: 1.gst
 # The freeze and nfs plugins are LGPLv2 (only)
 License: LGPLv2+ and LGPLv2
@@ -31,6 +31,7 @@
 %ifnarch s390 s390x
 BuildRequires: libdc1394-devel
 %endif
+BuildRequires: libde265-devel
 BuildRequires: libdvdnav-devel
 BuildRequires: libexif-devel
 BuildRequires: libiptcdata-devel
@@ -102,7 +103,7 @@
 tested well enough, or the code is not of good enough quality.
 
 This package (gstreamer-plugins-bad-extras) contains extra "bad" plugins for
-sources (mythtv), sinks (jack) and effects (pitch) which are not used
+sources, sinks (jack) and effects (pitch) which are not used
 very much and require additional libraries to be installed.
 
 
@@ -266,6 +267,7 @@
 # %{_libdir}/gstreamer-%{majorminor}/libgstgsm.so
 %{_libdir}/gstreamer-%{majorminor}/libgstkate.so
 %{_libdir}/gstreamer-%{majorminor}/libgstladspa.so
+%{_libdir}/gstreamer-%{majorminor}/libgstlibde265.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmodplug.so
 %{_libdir}/gstreamer-%{majorminor}/libgstofa.so
 %{_libdir}/gstreamer-%{majorminor}/libgstresindvd.so
@@ -301,7 +303,6 @@
 %defattr(-,root,root,-)
 # Plugins with external dependencies
 # %{_libdir}/gstreamer-%{majorminor}/libgstjack.so
-# %{_libdir}/gstreamer-%{majorminor}/libgstmythtvsrc.so
 # %{_libdir}/gstreamer-%{majorminor}/libgstsdl.so
 # %{_libdir}/gstreamer-%{majorminor}/libgstsoundtouch.so
 # %{_libdir}/gstreamer-%{majorminor}/libgsttimidity.so
diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in
index c011bec..907c632 100644
--- a/gst-plugins-bad.spec.in
+++ b/gst-plugins-bad.spec.in
@@ -31,6 +31,7 @@
 %ifnarch s390 s390x
 BuildRequires: libdc1394-devel
 %endif
+BuildRequires: libde265-devel
 BuildRequires: libdvdnav-devel
 BuildRequires: libexif-devel
 BuildRequires: libiptcdata-devel
@@ -102,7 +103,7 @@
 tested well enough, or the code is not of good enough quality.
 
 This package (gstreamer-plugins-bad-extras) contains extra "bad" plugins for
-sources (mythtv), sinks (jack) and effects (pitch) which are not used
+sources, sinks (jack) and effects (pitch) which are not used
 very much and require additional libraries to be installed.
 
 
@@ -266,6 +267,7 @@
 # %{_libdir}/gstreamer-%{majorminor}/libgstgsm.so
 %{_libdir}/gstreamer-%{majorminor}/libgstkate.so
 %{_libdir}/gstreamer-%{majorminor}/libgstladspa.so
+%{_libdir}/gstreamer-%{majorminor}/libgstlibde265.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmodplug.so
 %{_libdir}/gstreamer-%{majorminor}/libgstofa.so
 %{_libdir}/gstreamer-%{majorminor}/libgstresindvd.so
@@ -301,7 +303,6 @@
 %defattr(-,root,root,-)
 # Plugins with external dependencies
 # %{_libdir}/gstreamer-%{majorminor}/libgstjack.so
-# %{_libdir}/gstreamer-%{majorminor}/libgstmythtvsrc.so
 # %{_libdir}/gstreamer-%{majorminor}/libgstsdl.so
 # %{_libdir}/gstreamer-%{majorminor}/libgstsoundtouch.so
 # %{_libdir}/gstreamer-%{majorminor}/libgsttimidity.so
diff --git a/gst/Makefile.in b/gst/Makefile.in
index 9c5b671..75b9e4e 100644
--- a/gst/Makefile.in
+++ b/gst/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -19,7 +19,17 @@
 # descending into all subdirectories a second time, but only after the first
 # (parallel) run has finished, so it should go right through the second time.
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
 subdir = gst
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -93,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +115,6 @@
 	$(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 \
@@ -123,6 +131,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -181,6 +190,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/parallel-subdirs.mak
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,8 +234,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -249,8 +262,6 @@
 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@
@@ -263,7 +274,6 @@
 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@
@@ -271,6 +281,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -297,11 +309,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -320,8 +335,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -380,10 +393,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -400,7 +417,6 @@
 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@
@@ -409,7 +425,6 @@
 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@
@@ -422,7 +437,6 @@
 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@
@@ -436,6 +450,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -447,6 +462,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -485,6 +502,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -520,10 +538,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -549,6 +571,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -556,7 +581,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -585,6 +617,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -595,6 +628,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -625,17 +659,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -652,6 +685,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -690,6 +724,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -720,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -729,7 +763,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/parallel-subdirs.mak:
+$(top_srcdir)/common/parallel-subdirs.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1016,6 +1050,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 .PHONY: independent-subdirs $(SUBDIRS)
 
diff --git a/gst/accurip/Makefile.in b/gst/accurip/Makefile.in
index a35c907..de5a9a6 100644
--- a/gst/accurip/Makefile.in
+++ b/gst/accurip/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/accurip
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/accurip/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/accurip/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1063,6 +1097,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/adpcmdec/Makefile.am b/gst/adpcmdec/Makefile.am
index 62cb951..ffefcec 100644
--- a/gst/adpcmdec/Makefile.am
+++ b/gst/adpcmdec/Makefile.am
@@ -11,17 +11,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS)
 libgstadpcmdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstadpcmdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadpcmdec -:SHARED libgstadpcmdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadpcmdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadpcmdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadpcmdec_la_LDFLAGS) \
-	           $(libgstadpcmdec_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/adpcmdec/Makefile.in b/gst/adpcmdec/Makefile.in
index 0ffbfbe..7257c09 100644
--- a/gst/adpcmdec/Makefile.in
+++ b/gst/adpcmdec/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/adpcmdec
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/adpcmdec/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/adpcmdec/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1061,20 +1094,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadpcmdec -:SHARED libgstadpcmdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadpcmdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadpcmdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadpcmdec_la_LDFLAGS) \
-	           $(libgstadpcmdec_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/adpcmdec/adpcmdec.c b/gst/adpcmdec/adpcmdec.c
index 9e735f3..83289ba 100644
--- a/gst/adpcmdec/adpcmdec.c
+++ b/gst/adpcmdec/adpcmdec.c
@@ -456,6 +456,9 @@
 adpcmdec_init (ADPCMDec * dec)
 {
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
 }
 
 static void
diff --git a/gst/adpcmenc/Makefile.am b/gst/adpcmenc/Makefile.am
index faf3b4a..e53c645 100644
--- a/gst/adpcmenc/Makefile.am
+++ b/gst/adpcmenc/Makefile.am
@@ -10,17 +10,3 @@
 	$(GST_LIBS)
 libgstadpcmenc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstadpcmenc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadpcmenc -:SHARED libgstadpcmenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadpcmenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadpcmenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadpcmenc_la_LDFLAGS) \
-	           $(libgstadpcmenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/adpcmenc/Makefile.in b/gst/adpcmenc/Makefile.in
index 2161620..b10b368 100644
--- a/gst/adpcmenc/Makefile.in
+++ b/gst/adpcmenc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/adpcmenc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +785,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/adpcmenc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/adpcmenc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,20 +1093,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadpcmenc -:SHARED libgstadpcmenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadpcmenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadpcmenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadpcmenc_la_LDFLAGS) \
-	           $(libgstadpcmenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c
index 9e5085d..def90cf 100644
--- a/gst/adpcmenc/adpcmenc.c
+++ b/gst/adpcmenc/adpcmenc.c
@@ -57,7 +57,7 @@
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-adpcm, "
-        " layout=(string){dvi}, "
+        " layout=(string)dvi, "
         " block_align = (int) [64, 8192], "
         " rate = (int)[ 1, MAX ], " "channels = (int)[1,2];")
     );
@@ -84,9 +84,9 @@
 
 enum adpcm_properties
 {
-  ARG_0,
-  ARG_BLOCK_SIZE,
-  ARG_LAYOUT
+  PROP_0,
+  PROP_BLOCK_SIZE,
+  PROP_LAYOUT
 };
 
 enum adpcm_layout
@@ -100,7 +100,7 @@
   static GType adpcmenc_layout_type = 0;
 
   if (!adpcmenc_layout_type) {
-    static GEnumValue layout_types[] = {
+    static const GEnumValue layout_types[] = {
       {LAYOUT_ADPCM_DVI, "DVI/IMA APDCM", "dvi"},
       {0, NULL, NULL},
     };
@@ -200,10 +200,10 @@
   ADPCMEnc *enc = GST_ADPCM_ENC (object);
 
   switch (prop_id) {
-    case ARG_BLOCK_SIZE:
+    case PROP_BLOCK_SIZE:
       enc->blocksize = g_value_get_int (value);
       break;
-    case ARG_LAYOUT:
+    case PROP_LAYOUT:
       enc->layout = g_value_get_enum (value);
       break;
     default:
@@ -219,10 +219,10 @@
   ADPCMEnc *enc = GST_ADPCM_ENC (object);
 
   switch (prop_id) {
-    case ARG_BLOCK_SIZE:
+    case PROP_BLOCK_SIZE:
       g_value_set_int (value, enc->blocksize);
       break;
-    case ARG_LAYOUT:
+    case PROP_LAYOUT:
       g_value_set_enum (value, enc->layout);
       break;
     default:
@@ -421,6 +421,8 @@
 static void
 adpcmenc_init (ADPCMEnc * enc)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
+
   /* Set defaults. */
   enc->blocksize = DEFAULT_ADPCM_BLOCK_SIZE;
   enc->layout = DEFAULT_ADPCM_LAYOUT;
@@ -450,13 +452,13 @@
   base_class->set_format = GST_DEBUG_FUNCPTR (adpcmenc_set_format);
   base_class->handle_frame = GST_DEBUG_FUNCPTR (adpcmenc_handle_frame);
 
-  g_object_class_install_property (gobjectclass, ARG_LAYOUT,
+  g_object_class_install_property (gobjectclass, PROP_LAYOUT,
       g_param_spec_enum ("layout", "Layout",
           "Layout for output stream",
           GST_TYPE_ADPCMENC_LAYOUT, DEFAULT_ADPCM_LAYOUT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobjectclass, ARG_BLOCK_SIZE,
+  g_object_class_install_property (gobjectclass, PROP_BLOCK_SIZE,
       g_param_spec_int ("blockalign", "Block Align",
           "Block size for output stream",
           MIN_ADPCM_BLOCK_SIZE, MAX_ADPCM_BLOCK_SIZE,
diff --git a/gst/aiff/Makefile.am b/gst/aiff/Makefile.am
index c1d1e48..ebe4230 100644
--- a/gst/aiff/Makefile.am
+++ b/gst/aiff/Makefile.am
@@ -1,5 +1,7 @@
 plugin_LTLIBRARIES = libgstaiff.la
 
+noinst_HEADERS = aiffmux.h aiffparse.h
+
 libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c
 libgstaiff_la_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) \
@@ -12,19 +14,3 @@
 	$(LIBM)
 libgstaiff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaiff_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-noinst_HEADERS = aiffmux.h aiffparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaiff -:SHARED libgstaiff \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaiff_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaiff_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaiff_la_LDFLAGS) \
-	           $(libgstaiff_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/aiff/Makefile.in b/gst/aiff/Makefile.in
index 42a8a2e..c394730 100644
--- a/gst/aiff/Makefile.in
+++ b/gst/aiff/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/aiff
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -726,6 +761,7 @@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaiff.la
+noinst_HEADERS = aiffmux.h aiffparse.h
 libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c
 libgstaiff_la_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) \
@@ -740,7 +776,6 @@
 
 libgstaiff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaiff_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = aiffmux.h aiffparse.h
 all: all-am
 
 .SUFFIXES:
@@ -757,7 +792,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/aiff/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/aiff/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1082,20 +1116,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaiff -:SHARED libgstaiff \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaiff_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaiff_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaiff_la_LDFLAGS) \
-	           $(libgstaiff_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/aiff/aiffmux.c b/gst/aiff/aiffmux.c
index 5938884..5d5fded 100644
--- a/gst/aiff/aiffmux.c
+++ b/gst/aiff/aiffmux.c
@@ -132,12 +132,19 @@
 gst_aiff_mux_write_form_header (GstAiffMux * aiffmux, guint32 audio_data_size,
     GstByteWriter * writer)
 {
+  guint64 cur_size;
+
   /* ckID == 'FORM' */
   gst_byte_writer_put_uint32_le_unchecked (writer,
       GST_MAKE_FOURCC ('F', 'O', 'R', 'M'));
-  /* ckSize is currently bogus but we'll know what it is later */
-  gst_byte_writer_put_uint32_be_unchecked (writer,
-      audio_data_size + AIFF_HEADER_LEN - 8);
+
+  /* AIFF chunks must be even aligned */
+  cur_size = AIFF_HEADER_LEN - 8 + audio_data_size;
+  if ((cur_size & 1) && cur_size + 1 < G_MAXUINT32) {
+    cur_size += 1;
+  }
+
+  gst_byte_writer_put_uint32_be_unchecked (writer, cur_size);
   /* formType == 'AIFF' */
   gst_byte_writer_put_uint32_le_unchecked (writer,
       GST_MAKE_FOURCC ('A', 'I', 'F', 'F'));
@@ -242,7 +249,7 @@
 {
   GstFlowReturn ret;
   GstBuffer *outbuf;
-  GstByteWriter *writer;
+  GstByteWriter writer;
   GstSegment seg;
 
   /* seek to beginning of file */
@@ -258,13 +265,13 @@
   GST_DEBUG_OBJECT (aiffmux, "writing header with datasize=%u",
       audio_data_size);
 
-  writer = gst_byte_writer_new_with_size (AIFF_HEADER_LEN, TRUE);
+  gst_byte_writer_init_with_size (&writer, AIFF_HEADER_LEN, TRUE);
 
-  gst_aiff_mux_write_form_header (aiffmux, audio_data_size, writer);
-  gst_aiff_mux_write_comm_header (aiffmux, audio_data_size, writer);
-  gst_aiff_mux_write_ssnd_header (aiffmux, audio_data_size, writer);
+  gst_aiff_mux_write_form_header (aiffmux, audio_data_size, &writer);
+  gst_aiff_mux_write_comm_header (aiffmux, audio_data_size, &writer);
+  gst_aiff_mux_write_ssnd_header (aiffmux, audio_data_size, &writer);
 
-  outbuf = gst_byte_writer_free_and_get_buffer (writer);
+  outbuf = gst_byte_writer_reset_and_get_buffer (&writer);
 
   ret = gst_pad_push (aiffmux->srcpad, outbuf);
 
@@ -395,8 +402,25 @@
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_EOS:{
+      guint64 cur_size;
       GST_DEBUG_OBJECT (aiffmux, "got EOS");
 
+      cur_size = aiffmux->length + AIFF_HEADER_LEN - 8;
+
+      /* ID3 chunk must be even aligned */
+      if ((aiffmux->length & 1) && cur_size + 1 < G_MAXUINT32) {
+        GstFlowReturn ret;
+        guint8 *data = g_new0 (guint8, 1);
+        GstBuffer *buffer = gst_buffer_new_wrapped (data, 1);
+        GST_BUFFER_OFFSET (buffer) = AIFF_HEADER_LEN + aiffmux->length;
+        GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE;
+        ret = gst_pad_push (aiffmux->srcpad, buffer);
+        if (ret != GST_FLOW_OK) {
+          GST_WARNING_OBJECT (aiffmux, "failed to push padding byte: %s",
+              gst_flow_get_name (ret));
+        }
+      }
+
       /* write header with correct length values */
       gst_aiff_mux_push_header (aiffmux, aiffmux->length);
 
diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c
index 6d77e7c..78854ae 100644
--- a/gst/aiff/aiffparse.c
+++ b/gst/aiff/aiffparse.c
@@ -53,10 +53,6 @@
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include <string.h>
 #include <math.h>
 
@@ -1822,15 +1818,13 @@
         }
         if (stop > 0) {
           end_offset = stop;
-          segment.stop -= aiff->datastart;
-          segment.stop = MAX (stop, 0);
+          stop -= aiff->datastart;
+          stop = MAX (stop, 0);
         }
         if (aiff->state == AIFF_PARSE_DATA &&
             aiff->segment.format == GST_FORMAT_TIME) {
-          guint64 bps = aiff->bps;
-
           /* operating in format TIME, so we can convert */
-          if (bps) {
+          if (aiff->bps) {
             if (start >= 0)
               start =
                   gst_util_uint64_scale_ceil (start, GST_SECOND,
diff --git a/gst/asfmux/Makefile.am b/gst/asfmux/Makefile.am
index ded6048..27656f1 100644
--- a/gst/asfmux/Makefile.am
+++ b/gst/asfmux/Makefile.am
@@ -22,18 +22,3 @@
                  gstasfobjects.h \
                  gstasfparse.h \
                  gstrtpasfpay.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstasfmux -:SHARED libgstasfmux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstasfmux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstasfmux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstasfmux_la_LDFLAGS) \
-	           $(libgstasfmux_la_LIBADD) \
-						 $(libgstasfmux_la_LIBTOOLFLAGS) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/asfmux/Makefile.in b/gst/asfmux/Makefile.in
index 7134589..9f6ae69 100644
--- a/gst/asfmux/Makefile.in
+++ b/gst/asfmux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/asfmux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -232,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -249,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -275,8 +288,6 @@
 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@
@@ -289,7 +300,6 @@
 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@
@@ -297,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -323,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -346,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -406,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -426,7 +443,6 @@
 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@
@@ -435,7 +451,6 @@
 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@
@@ -448,7 +463,6 @@
 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@
@@ -462,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -473,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -511,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -546,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -575,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -582,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -611,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -621,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -651,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -678,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -716,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -770,7 +805,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/asfmux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/asfmux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1111,21 +1145,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstasfmux -:SHARED libgstasfmux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstasfmux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstasfmux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstasfmux_la_LDFLAGS) \
-	           $(libgstasfmux_la_LIBADD) \
-						 $(libgstasfmux_la_LIBTOOLFLAGS) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c
index 791193e..c77f8b6 100644
--- a/gst/asfmux/gstasfmux.c
+++ b/gst/asfmux/gstasfmux.c
@@ -61,7 +61,7 @@
  * Client (receiver)
  * |[
  * gst-launch udpsrc port=3333 ! "caps_from_rtpasfpay_at_sender" \
- * ! rtpasfdepay ! decodebin2 name=d ! queue \
+ * ! rtpasfdepay ! decodebin name=d ! queue \
  * ! videoconvert ! autovideosink \
  * d. ! queue ! audioconvert ! autoaudiosink
  * ]|
@@ -708,11 +708,7 @@
   else
     gst_asf_put_guid (*buf + 24, guids[ASF_VIDEO_MEDIA_INDEX]);
   /* error correction */
-  if (asfpad->is_audio) {
-    gst_asf_put_guid (*buf + 40, guids[ASF_NO_ERROR_CORRECTION_INDEX]);
-  } else {
-    gst_asf_put_guid (*buf + 40, guids[ASF_NO_ERROR_CORRECTION_INDEX]);
-  }
+  gst_asf_put_guid (*buf + 40, guids[ASF_NO_ERROR_CORRECTION_INDEX]);
   GST_WRITE_UINT64_LE (*buf + 56, 0);   /* time offset */
 
   GST_WRITE_UINT32_LE (*buf + 64, codec_data_length + media_specific_data_length);      /* type specific data length */
@@ -1269,6 +1265,31 @@
   if (padding < ASF_PADDING_OBJECT_SIZE)
     padding = 0;
 
+  /* if not streaming, check if downstream is seekable */
+  if (!asfmux->prop_streamable) {
+    gboolean seekable;
+    GstQuery *query;
+
+    query = gst_query_new_seeking (GST_FORMAT_BYTES);
+    if (gst_pad_peer_query (asfmux->srcpad, query)) {
+      gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
+      GST_INFO_OBJECT (asfmux, "downstream is %sseekable",
+          seekable ? "" : "not ");
+    } else {
+      /* assume seeking is not supported if query not handled downstream */
+      GST_WARNING_OBJECT (asfmux, "downstream did not handle seeking query");
+      seekable = FALSE;
+    }
+    if (!seekable) {
+      asfmux->prop_streamable = TRUE;
+      g_object_notify (G_OBJECT (asfmux), "streamable");
+      GST_WARNING_OBJECT (asfmux, "downstream is not seekable, but "
+          "streamable=false. Will ignore that and create streamable output "
+          "instead");
+    }
+    gst_query_unref (query);
+  }
+
   /* from this point we started writing the headers */
   GST_INFO_OBJECT (asfmux, "Writing headers");
   asfmux->state = GST_ASF_MUX_STATE_HEADERS;
@@ -1281,8 +1302,12 @@
   gst_pad_set_caps (asfmux->srcpad, caps);
   gst_caps_unref (caps);
 
-  /* let downstream know we think in BYTES and expect to do seeking later */
-  gst_segment_init (&segment, GST_FORMAT_BYTES);
+  /* send a BYTE format segment if we're going to seek to fix up the headers
+   * later, otherwise send a TIME segment */
+  if (asfmux->prop_streamable)
+    gst_segment_init (&segment, GST_FORMAT_TIME);
+  else
+    gst_segment_init (&segment, GST_FORMAT_BYTES);
   gst_pad_push_event (asfmux->srcpad, gst_event_new_segment (&segment));
 
   gst_asf_generate_file_id (&asfmux->file_id);
diff --git a/gst/asfmux/gstasfobjects.c b/gst/asfmux/gstasfobjects.c
index 0719f5c..c2b1129 100644
--- a/gst/asfmux/gstasfobjects.c
+++ b/gst/asfmux/gstasfobjects.c
@@ -564,7 +564,7 @@
   guint8 mo_number_len_type;
   guint8 mo_offset_type;
 */
-  GstByteReader *reader;
+  GstByteReader reader;
   gboolean ret = TRUE;
   guint8 first = 0;
   guint8 err_length = 0;        /* length of the error fields */
@@ -584,10 +584,10 @@
     return FALSE;
   }
 
-  reader = gst_byte_reader_new (data, size);
+  gst_byte_reader_init (&reader, data, size);
 
   GST_LOG ("Starting packet parsing, size: %" G_GSIZE_FORMAT, size);
-  if (!gst_byte_reader_get_uint8 (reader, &first))
+  if (!gst_byte_reader_get_uint8 (&reader, &first))
     goto error;
 
   if (first & 0x80) {           /* error correction present */
@@ -602,11 +602,11 @@
     err_cor_len = (first & 0x0F);
     err_length += err_cor_len;
     GST_DEBUG ("Error correction data length: %d", (gint) err_cor_len);
-    if (!gst_byte_reader_skip (reader, err_cor_len))
+    if (!gst_byte_reader_skip (&reader, err_cor_len))
       goto error;
 
     /* put payload parsing info first byte in aux var */
-    if (!gst_byte_reader_get_uint8 (reader, &aux))
+    if (!gst_byte_reader_get_uint8 (&reader, &aux))
       goto error;
   } else {
     aux = first;
@@ -626,7 +626,7 @@
     GST_DEBUG ("Packet contains multiple payloads");
   }
 
-  if (!gst_byte_reader_get_uint8 (reader, &aux))
+  if (!gst_byte_reader_get_uint8 (&reader, &aux))
     goto error;
 
 /*
@@ -637,13 +637,13 @@
 
   /* gets the fields lengths */
   GST_LOG ("Getting packet and padding length");
-  if (!gst_byte_reader_get_asf_var_size_field (reader,
+  if (!gst_byte_reader_get_asf_var_size_field (&reader,
           packet_len_type, &packet_len))
     goto error;
-  if (!gst_byte_reader_skip (reader,
+  if (!gst_byte_reader_skip (&reader,
           gst_asf_get_var_size_field_len (seq_len_type)))
     goto error;
-  if (!gst_byte_reader_get_asf_var_size_field (reader,
+  if (!gst_byte_reader_get_asf_var_size_field (&reader,
           padding_len_type, &padd_len))
     goto error;
 
@@ -674,9 +674,9 @@
   }
 
   GST_LOG ("Getting send time and duration");
-  if (!gst_byte_reader_get_uint32_le (reader, &send_time))
+  if (!gst_byte_reader_get_uint32_le (&reader, &send_time))
     goto error;
-  if (!gst_byte_reader_get_uint16_le (reader, &duration))
+  if (!gst_byte_reader_get_uint16_le (&reader, &duration))
     goto error;
 
   has_keyframe = FALSE;
@@ -685,9 +685,9 @@
     has_keyframe = GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
   } else {
     if (mult_payloads) {
-      ret = gst_asf_parse_mult_payload (reader, &has_keyframe);
+      ret = gst_asf_parse_mult_payload (&reader, &has_keyframe);
     } else {
-      ret = gst_asf_parse_single_payload (reader, &has_keyframe);
+      ret = gst_asf_parse_single_payload (&reader, &has_keyframe);
     }
   }
 
@@ -712,14 +712,12 @@
   packet->seq_field_type = seq_len_type;
   packet->err_cor_len = err_length;
 
-  gst_byte_reader_free (reader);
   return ret;
 
 error:
   ret = FALSE;
   GST_WARNING ("Error while parsing data packet");
 end:
-  gst_byte_reader_free (reader);
   return ret;
 }
 
@@ -789,7 +787,7 @@
   gboolean ret = TRUE;
   guint32 header_objects = 0;
   guint32 i;
-  GstByteReader *reader;
+  GstByteReader reader;
   guint64 object_size;
 
   object_size = gst_asf_match_and_peek_obj_size (data,
@@ -800,32 +798,33 @@
     return FALSE;
   }
 
-  reader = gst_byte_reader_new (data, size);
+  gst_byte_reader_init (&reader, data, size);
 
-  if (!gst_byte_reader_skip (reader, ASF_GUID_OBJSIZE_SIZE))
+  if (!gst_byte_reader_skip (&reader, ASF_GUID_OBJSIZE_SIZE))
     goto error;
-  if (!gst_byte_reader_get_uint32_le (reader, &header_objects))
+  if (!gst_byte_reader_get_uint32_le (&reader, &header_objects))
     goto error;
   GST_DEBUG ("ASF: Header has %" G_GUINT32_FORMAT " child"
       " objects", header_objects);
   /* skip reserved bytes */
-  if (!gst_byte_reader_skip (reader, 2))
+  if (!gst_byte_reader_skip (&reader, 2))
     goto error;
 
   /* iterate through childs of header object */
   for (i = 0; i < header_objects; i++) {
     const guint8 *guid = NULL;
     guint64 obj_size = 0;
-    if (!gst_byte_reader_get_data (reader, ASF_GUID_SIZE, &guid))
+
+    if (!gst_byte_reader_get_data (&reader, ASF_GUID_SIZE, &guid))
       goto error;
-    if (!gst_byte_reader_get_uint64_le (reader, &obj_size))
+    if (!gst_byte_reader_get_uint64_le (&reader, &obj_size))
       goto error;
 
     if (gst_asf_match_guid (guid, &guids[ASF_FILE_PROPERTIES_OBJECT_INDEX])) {
-      ret = gst_asf_parse_file_properties_obj (reader, file_info);
+      ret = gst_asf_parse_file_properties_obj (&reader, file_info);
     } else {
       /* we don't know/care about this object */
-      if (!gst_byte_reader_skip (reader, obj_size - ASF_GUID_OBJSIZE_SIZE))
+      if (!gst_byte_reader_skip (&reader, obj_size - ASF_GUID_OBJSIZE_SIZE))
         goto error;
     }
 
@@ -838,7 +837,6 @@
   ret = FALSE;
   GST_WARNING ("ASF: Error while parsing headers");
 end:
-  gst_byte_reader_free (reader);
   return ret;
 }
 
diff --git a/gst/asfmux/gstasfparse.c b/gst/asfmux/gstasfparse.c
index fe869e8..c288266 100644
--- a/gst/asfmux/gstasfparse.c
+++ b/gst/asfmux/gstasfparse.c
@@ -75,17 +75,17 @@
 gst_asf_parse_parse_data_object (GstAsfParse * asfparse, guint8 * data,
     gsize size)
 {
-  GstByteReader *reader;
+  GstByteReader reader;
   GstFlowReturn ret = GST_FLOW_OK;
   guint64 packet_count = 0;
 
   GST_DEBUG_OBJECT (asfparse, "Parsing data object");
 
-  reader = gst_byte_reader_new (data, size);
+  gst_byte_reader_init (&reader, data, size);
   /* skip to packet count */
-  if (!gst_byte_reader_skip (reader, 40))
+  if (!gst_byte_reader_skip (&reader, 40))
     goto error;
-  if (!gst_byte_reader_get_uint64_le (reader, &packet_count))
+  if (!gst_byte_reader_get_uint64_le (&reader, &packet_count))
     goto error;
 
   if (asfparse->asfinfo->packets_count != packet_count) {
@@ -97,13 +97,11 @@
         packet_count);
   }
 
-  gst_byte_reader_free (reader);
   return GST_FLOW_OK;
 
 error:
   ret = GST_FLOW_ERROR;
   GST_ERROR_OBJECT (asfparse, "Error while parsing data object headers");
-  gst_byte_reader_free (reader);
   return ret;
 }
 
diff --git a/gst/audiofxbad/Makefile.am b/gst/audiofxbad/Makefile.am
index 65aa6bb..b483deb 100644
--- a/gst/audiofxbad/Makefile.am
+++ b/gst/audiofxbad/Makefile.am
@@ -11,18 +11,3 @@
 	$(GST_BASE_LIBS)  $(GST_LIBS) $(LIBM)
 libgstaudiofxbad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudiofxbad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT audiofxbad -:SHARED audiofxbad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiofxbad_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofxbad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiofxbad_la_LDFLAGS) \
-	           $(libgstaudiofxbad_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
-
diff --git a/gst/audiofxbad/Makefile.in b/gst/audiofxbad/Makefile.in
index f18306d..50e5244 100644
--- a/gst/audiofxbad/Makefile.in
+++ b/gst/audiofxbad/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/audiofxbad
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +236,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +254,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +282,6 @@
 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@
@@ -284,7 +294,6 @@
 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@
@@ -292,6 +301,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +329,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +355,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +413,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +437,6 @@
 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@
@@ -430,7 +445,6 @@
 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@
@@ -443,7 +457,6 @@
 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@
@@ -457,6 +470,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +482,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +522,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +558,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +591,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +601,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +637,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +648,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +679,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +705,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +744,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/audiofxbad/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/audiofxbad/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1071,20 +1104,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT audiofxbad -:SHARED audiofxbad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiofxbad_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofxbad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiofxbad_la_LDFLAGS) \
-	           $(libgstaudiofxbad_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
 
 # 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.
diff --git a/gst/audiomixer/Makefile.am b/gst/audiomixer/Makefile.am
index 90328bc..a126f90 100644
--- a/gst/audiomixer/Makefile.am
+++ b/gst/audiomixer/Makefile.am
@@ -4,15 +4,19 @@
 include $(top_srcdir)/common/orc.mak
 
 
-libgstaudiomixer_la_SOURCES = gstaudiomixer.c
+libgstaudiomixer_la_SOURCES = gstaudiomixer.c gstaudioaggregator.c gstaudiointerleave.c
 nodist_libgstaudiomixer_la_SOURCES = $(ORC_NODIST_SOURCES)
-libgstaudiomixer_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
+libgstaudiomixer_la_CFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+  $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS) $(ORC_CFLAGS)
 libgstaudiomixer_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudiomixer_la_LIBADD =  \
-		$(GST_PLUGINS_BASE_LIBS) \
-	        -lgstaudio-@GST_API_VERSION@ \
+		$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+		$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
 		$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS)
 libgstaudiomixer_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
-noinst_HEADERS = gstaudiomixer.h
+noinst_HEADERS = gstaudiomixer.h gstaudioaggregator.h gstaudiointerleave.h
 
diff --git a/gst/audiomixer/Makefile.in b/gst/audiomixer/Makefile.in
index 056161d..5bbb59a 100644
--- a/gst/audiomixer/Makefile.in
+++ b/gst/audiomixer/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -102,8 +112,6 @@
 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/audiomixer
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -112,6 +120,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -125,7 +134,6 @@
 	$(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 \
@@ -142,6 +150,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -176,10 +186,12 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstaudiomixer_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstaudiomixer_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstaudiomixer_la_OBJECTS = libgstaudiomixer_la-gstaudiomixer.lo
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstaudiomixer_la_OBJECTS = libgstaudiomixer_la-gstaudiomixer.lo \
+	libgstaudiomixer_la-gstaudioaggregator.lo \
+	libgstaudiomixer_la-gstaudiointerleave.lo
 am__objects_1 = libgstaudiomixer_la-tmp-orc.lo
 nodist_libgstaudiomixer_la_OBJECTS = $(am__objects_1)
 libgstaudiomixer_la_OBJECTS = $(am_libgstaudiomixer_la_OBJECTS) \
@@ -254,6 +266,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -271,8 +285,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -297,8 +313,6 @@
 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@
@@ -311,7 +325,6 @@
 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@
@@ -319,6 +332,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -345,11 +360,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -368,8 +386,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -428,10 +444,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -448,7 +468,6 @@
 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@
@@ -457,7 +476,6 @@
 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@
@@ -470,7 +488,6 @@
 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@
@@ -484,6 +501,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -495,6 +513,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -533,6 +553,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -568,10 +589,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -597,6 +622,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -604,7 +632,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -633,6 +668,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -643,6 +679,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -673,17 +710,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -700,6 +736,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -738,6 +775,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -762,17 +800,22 @@
 cp_v_gen = $(cp_v_gen_$(V))
 cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
 cp_v_gen_0 = @echo "  CP     $@";
-libgstaudiomixer_la_SOURCES = gstaudiomixer.c
+libgstaudiomixer_la_SOURCES = gstaudiomixer.c gstaudioaggregator.c gstaudiointerleave.c
 nodist_libgstaudiomixer_la_SOURCES = $(ORC_NODIST_SOURCES)
-libgstaudiomixer_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
+libgstaudiomixer_la_CFLAGS = \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+  $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS) $(ORC_CFLAGS)
+
 libgstaudiomixer_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstaudiomixer_la_LIBADD = \
-		$(GST_PLUGINS_BASE_LIBS) \
-	        -lgstaudio-@GST_API_VERSION@ \
+		$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+		$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
 		$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS)
 
 libgstaudiomixer_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = gstaudiomixer.h
+noinst_HEADERS = gstaudiomixer.h gstaudioaggregator.h gstaudiointerleave.h
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -790,7 +833,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/audiomixer/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/audiomixer/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -799,7 +841,7 @@
 	    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_srcdir)/common/orc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -854,6 +896,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstaudiomixer_la-gstaudioaggregator.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstaudiomixer_la-gstaudiointerleave.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstaudiomixer_la-gstaudiomixer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstaudiomixer_la-tmp-orc.Plo@am__quote@
 
@@ -888,6 +932,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -c -o libgstaudiomixer_la-gstaudiomixer.lo `test -f 'gstaudiomixer.c' || echo '$(srcdir)/'`gstaudiomixer.c
 
+libgstaudiomixer_la-gstaudioaggregator.lo: gstaudioaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -MT libgstaudiomixer_la-gstaudioaggregator.lo -MD -MP -MF $(DEPDIR)/libgstaudiomixer_la-gstaudioaggregator.Tpo -c -o libgstaudiomixer_la-gstaudioaggregator.lo `test -f 'gstaudioaggregator.c' || echo '$(srcdir)/'`gstaudioaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstaudiomixer_la-gstaudioaggregator.Tpo $(DEPDIR)/libgstaudiomixer_la-gstaudioaggregator.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstaudioaggregator.c' object='libgstaudiomixer_la-gstaudioaggregator.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 $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -c -o libgstaudiomixer_la-gstaudioaggregator.lo `test -f 'gstaudioaggregator.c' || echo '$(srcdir)/'`gstaudioaggregator.c
+
+libgstaudiomixer_la-gstaudiointerleave.lo: gstaudiointerleave.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -MT libgstaudiomixer_la-gstaudiointerleave.lo -MD -MP -MF $(DEPDIR)/libgstaudiomixer_la-gstaudiointerleave.Tpo -c -o libgstaudiomixer_la-gstaudiointerleave.lo `test -f 'gstaudiointerleave.c' || echo '$(srcdir)/'`gstaudiointerleave.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstaudiomixer_la-gstaudiointerleave.Tpo $(DEPDIR)/libgstaudiomixer_la-gstaudiointerleave.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstaudiointerleave.c' object='libgstaudiomixer_la-gstaudiointerleave.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 $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -c -o libgstaudiomixer_la-gstaudiointerleave.lo `test -f 'gstaudiointerleave.c' || echo '$(srcdir)/'`gstaudiointerleave.c
+
 libgstaudiomixer_la-tmp-orc.lo: tmp-orc.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstaudiomixer_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstaudiomixer_la_CFLAGS) $(CFLAGS) -MT libgstaudiomixer_la-tmp-orc.lo -MD -MP -MF $(DEPDIR)/libgstaudiomixer_la-tmp-orc.Tpo -c -o libgstaudiomixer_la-tmp-orc.lo `test -f 'tmp-orc.c' || echo '$(srcdir)/'`tmp-orc.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstaudiomixer_la-tmp-orc.Tpo $(DEPDIR)/libgstaudiomixer_la-tmp-orc.Plo
@@ -1115,6 +1173,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 orc-update: tmp-orc.c $(ORC_SOURCE).h
 	$(top_srcdir)/common/gst-indent tmp-orc.c
diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst/audiomixer/gstaudioaggregator.c
new file mode 100644
index 0000000..156fa93
--- /dev/null
+++ b/gst/audiomixer/gstaudioaggregator.c
@@ -0,0 +1,1380 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *                    2001 Thomas <thomas@apestaart.org>
+ *               2005,2006 Wim Taymans <wim@fluendo.com>
+ *                    2013 Sebastian Dröge <sebastian@centricular.com>
+ *                    2014 Collabora
+ *                             Olivier Crete <olivier.crete@collabora.com>
+ *
+ * gstaudioaggregator.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: gstaudioaggregator
+ * @short_description: manages a set of pads with the purpose of
+ * aggregating their buffers for raw audio
+ * @see_also: #GstAggregator
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include "gstaudioaggregator.h"
+
+#include <string.h>
+
+GST_DEBUG_CATEGORY_STATIC (audio_aggregator_debug);
+#define GST_CAT_DEFAULT audio_aggregator_debug
+
+struct _GstAudioAggregatorPadPrivate
+{
+  /* All members are protected by the pad object lock */
+
+  GstBuffer *buffer;            /* current buffer we're mixing,
+                                   for comparison with collect.buffer
+                                   to see if we need to update our
+                                   cached values. */
+  guint position, size;
+
+  guint64 output_offset;        /* Sample offset in output segment relative to
+                                   segment.start that collect.pos refers to in the
+                                   current buffer. */
+
+  guint64 next_offset;          /* Next expected sample offset in the input segment
+                                   relative to segment.start */
+
+  /* Last time we noticed a discont */
+  GstClockTime discont_time;
+
+  /* A new unhandled segment event has been received */
+  gboolean new_segment;
+};
+
+
+/*****************************************
+ * GstAudioAggregatorPad implementation  *
+ *****************************************/
+G_DEFINE_TYPE (GstAudioAggregatorPad, gst_audio_aggregator_pad,
+    GST_TYPE_AGGREGATOR_PAD);
+
+static gboolean
+gst_audio_aggregator_pad_flush_pad (GstAggregatorPad * aggpad,
+    GstAggregator * aggregator);
+
+static void
+gst_audio_aggregator_pad_class_init (GstAudioAggregatorPadClass * klass)
+{
+  GstAggregatorPadClass *aggpadclass = (GstAggregatorPadClass *) klass;
+
+  g_type_class_add_private (klass, sizeof (GstAudioAggregatorPadPrivate));
+
+  aggpadclass->flush = GST_DEBUG_FUNCPTR (gst_audio_aggregator_pad_flush_pad);
+}
+
+static void
+gst_audio_aggregator_pad_init (GstAudioAggregatorPad * pad)
+{
+  pad->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (pad, GST_TYPE_AUDIO_AGGREGATOR_PAD,
+      GstAudioAggregatorPadPrivate);
+
+  gst_audio_info_init (&pad->info);
+
+  pad->priv->buffer = NULL;
+  pad->priv->position = 0;
+  pad->priv->size = 0;
+  pad->priv->output_offset = -1;
+  pad->priv->next_offset = -1;
+  pad->priv->discont_time = GST_CLOCK_TIME_NONE;
+}
+
+
+static gboolean
+gst_audio_aggregator_pad_flush_pad (GstAggregatorPad * aggpad,
+    GstAggregator * aggregator)
+{
+  GstAudioAggregatorPad *pad = GST_AUDIO_AGGREGATOR_PAD (aggpad);
+
+  GST_OBJECT_LOCK (aggpad);
+  pad->priv->position = pad->priv->size = 0;
+  pad->priv->output_offset = pad->priv->next_offset = -1;
+  pad->priv->discont_time = GST_CLOCK_TIME_NONE;
+  gst_buffer_replace (&pad->priv->buffer, NULL);
+  GST_OBJECT_UNLOCK (aggpad);
+
+  return TRUE;
+}
+
+
+
+/**************************************
+ * GstAudioAggregator implementation  *
+ **************************************/
+
+struct _GstAudioAggregatorPrivate
+{
+  GMutex mutex;
+
+  gboolean send_caps;           /* aagg lock */
+
+  /* All three properties are unprotected, can't be modified while streaming */
+  /* Size in frames that is output per buffer */
+  GstClockTime output_buffer_duration;
+  GstClockTime alignment_threshold;
+  GstClockTime discont_wait;
+
+  /* Protected by srcpad stream clock */
+  /* Buffer starting at offset containing block_size frames */
+  GstBuffer *current_buffer;
+
+  /* counters to keep track of timestamps */
+  /* Readable with object lock, writable with both aag lock and object lock */
+
+  gint64 offset;                /* Sample offset starting from 0 at segment.start */
+};
+
+#define GST_AUDIO_AGGREGATOR_LOCK(self)   g_mutex_lock (&(self)->priv->mutex);
+#define GST_AUDIO_AGGREGATOR_UNLOCK(self) g_mutex_unlock (&(self)->priv->mutex);
+
+static void gst_audio_aggregator_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_audio_aggregator_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_audio_aggregator_dispose (GObject * object);
+
+static gboolean gst_audio_aggregator_src_event (GstAggregator * agg,
+    GstEvent * event);
+static gboolean gst_audio_aggregator_sink_event (GstAggregator * agg,
+    GstAggregatorPad * aggpad, GstEvent * event);
+static gboolean gst_audio_aggregator_src_query (GstAggregator * agg,
+    GstQuery * query);
+static gboolean gst_audio_aggregator_start (GstAggregator * agg);
+static gboolean gst_audio_aggregator_stop (GstAggregator * agg);
+static GstFlowReturn gst_audio_aggregator_flush (GstAggregator * agg);
+
+static GstBuffer *gst_audio_aggregator_create_output_buffer (GstAudioAggregator
+    * aagg, guint num_frames);
+static GstFlowReturn gst_audio_aggregator_do_clip (GstAggregator * agg,
+    GstAggregatorPad * bpad, GstBuffer * buffer, GstBuffer ** outbuf);
+static GstFlowReturn gst_audio_aggregator_aggregate (GstAggregator * agg,
+    gboolean timeout);
+
+#define DEFAULT_OUTPUT_BUFFER_DURATION (10 * GST_MSECOND)
+#define DEFAULT_ALIGNMENT_THRESHOLD   (40 * GST_MSECOND)
+#define DEFAULT_DISCONT_WAIT (1 * GST_SECOND)
+
+enum
+{
+  PROP_0,
+  PROP_OUTPUT_BUFFER_DURATION,
+  PROP_ALIGNMENT_THRESHOLD,
+  PROP_DISCONT_WAIT,
+};
+
+G_DEFINE_ABSTRACT_TYPE (GstAudioAggregator, gst_audio_aggregator,
+    GST_TYPE_AGGREGATOR);
+
+static GstClockTime
+gst_audio_aggregator_get_next_time (GstAggregator * agg)
+{
+  GstClockTime next_time;
+
+  GST_OBJECT_LOCK (agg);
+  if (agg->segment.position == -1 || agg->segment.position < agg->segment.start)
+    next_time = agg->segment.start;
+  else
+    next_time = agg->segment.position;
+
+  if (agg->segment.stop != -1 && next_time > agg->segment.stop)
+    next_time = agg->segment.stop;
+
+  next_time =
+      gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME, next_time);
+  GST_OBJECT_UNLOCK (agg);
+
+  return next_time;
+}
+
+static void
+gst_audio_aggregator_class_init (GstAudioAggregatorClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstAggregatorClass *gstaggregator_class = (GstAggregatorClass *) klass;
+
+  g_type_class_add_private (klass, sizeof (GstAudioAggregatorPrivate));
+
+  gobject_class->set_property = gst_audio_aggregator_set_property;
+  gobject_class->get_property = gst_audio_aggregator_get_property;
+  gobject_class->dispose = gst_audio_aggregator_dispose;
+
+  gstaggregator_class->src_event =
+      GST_DEBUG_FUNCPTR (gst_audio_aggregator_src_event);
+  gstaggregator_class->sink_event =
+      GST_DEBUG_FUNCPTR (gst_audio_aggregator_sink_event);
+  gstaggregator_class->src_query =
+      GST_DEBUG_FUNCPTR (gst_audio_aggregator_src_query);
+  gstaggregator_class->start = gst_audio_aggregator_start;
+  gstaggregator_class->stop = gst_audio_aggregator_stop;
+  gstaggregator_class->flush = gst_audio_aggregator_flush;
+  gstaggregator_class->aggregate =
+      GST_DEBUG_FUNCPTR (gst_audio_aggregator_aggregate);
+  gstaggregator_class->clip = GST_DEBUG_FUNCPTR (gst_audio_aggregator_do_clip);
+  gstaggregator_class->get_next_time = gst_audio_aggregator_get_next_time;
+
+  klass->create_output_buffer = gst_audio_aggregator_create_output_buffer;
+
+  GST_DEBUG_CATEGORY_INIT (audio_aggregator_debug, "audioaggregator",
+      GST_DEBUG_FG_MAGENTA, "GstAudioAggregator");
+
+  g_object_class_install_property (gobject_class, PROP_OUTPUT_BUFFER_DURATION,
+      g_param_spec_uint64 ("output-buffer-duration", "Output Buffer Duration",
+          "Output block size in nanoseconds", 1,
+          G_MAXUINT64, DEFAULT_OUTPUT_BUFFER_DURATION,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_ALIGNMENT_THRESHOLD,
+      g_param_spec_uint64 ("alignment-threshold", "Alignment Threshold",
+          "Timestamp alignment threshold in nanoseconds", 0,
+          G_MAXUINT64 - 1, DEFAULT_ALIGNMENT_THRESHOLD,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_DISCONT_WAIT,
+      g_param_spec_uint64 ("discont-wait", "Discont Wait",
+          "Window of time in nanoseconds to wait before "
+          "creating a discontinuity", 0,
+          G_MAXUINT64 - 1, DEFAULT_DISCONT_WAIT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_audio_aggregator_init (GstAudioAggregator * aagg)
+{
+  aagg->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (aagg, GST_TYPE_AUDIO_AGGREGATOR,
+      GstAudioAggregatorPrivate);
+
+  g_mutex_init (&aagg->priv->mutex);
+
+  aagg->priv->output_buffer_duration = DEFAULT_OUTPUT_BUFFER_DURATION;
+  aagg->priv->alignment_threshold = DEFAULT_ALIGNMENT_THRESHOLD;
+  aagg->priv->discont_wait = DEFAULT_DISCONT_WAIT;
+
+  aagg->current_caps = NULL;
+  gst_audio_info_init (&aagg->info);
+
+  gst_aggregator_set_latency (GST_AGGREGATOR (aagg),
+      aagg->priv->output_buffer_duration, aagg->priv->output_buffer_duration);
+}
+
+static void
+gst_audio_aggregator_dispose (GObject * object)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (object);
+
+  gst_caps_replace (&aagg->current_caps, NULL);
+
+  g_mutex_clear (&aagg->priv->mutex);
+
+  G_OBJECT_CLASS (gst_audio_aggregator_parent_class)->dispose (object);
+}
+
+static void
+gst_audio_aggregator_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (object);
+
+  switch (prop_id) {
+    case PROP_OUTPUT_BUFFER_DURATION:
+      aagg->priv->output_buffer_duration = g_value_get_uint64 (value);
+      gst_aggregator_set_latency (GST_AGGREGATOR (aagg),
+          aagg->priv->output_buffer_duration,
+          aagg->priv->output_buffer_duration);
+      break;
+    case PROP_ALIGNMENT_THRESHOLD:
+      aagg->priv->alignment_threshold = g_value_get_uint64 (value);
+      break;
+    case PROP_DISCONT_WAIT:
+      aagg->priv->discont_wait = g_value_get_uint64 (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_audio_aggregator_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (object);
+
+  switch (prop_id) {
+    case PROP_OUTPUT_BUFFER_DURATION:
+      g_value_set_uint64 (value, aagg->priv->output_buffer_duration);
+      break;
+    case PROP_ALIGNMENT_THRESHOLD:
+      g_value_set_uint64 (value, aagg->priv->alignment_threshold);
+      break;
+    case PROP_DISCONT_WAIT:
+      g_value_set_uint64 (value, aagg->priv->discont_wait);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+
+/* event handling */
+
+static gboolean
+gst_audio_aggregator_src_event (GstAggregator * agg, GstEvent * event)
+{
+  gboolean result;
+
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (agg);
+  GST_DEBUG_OBJECT (agg->srcpad, "Got %s event on src pad",
+      GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_QOS:
+      /* QoS might be tricky */
+      gst_event_unref (event);
+      return FALSE;
+    case GST_EVENT_NAVIGATION:
+      /* navigation is rather pointless. */
+      gst_event_unref (event);
+      return FALSE;
+      break;
+    case GST_EVENT_SEEK:
+    {
+      GstSeekFlags flags;
+      gdouble rate;
+      GstSeekType start_type, stop_type;
+      gint64 start, stop;
+      GstFormat seek_format, dest_format;
+
+      /* parse the seek parameters */
+      gst_event_parse_seek (event, &rate, &seek_format, &flags, &start_type,
+          &start, &stop_type, &stop);
+
+      /* Check the seeking parametters before linking up */
+      if ((start_type != GST_SEEK_TYPE_NONE)
+          && (start_type != GST_SEEK_TYPE_SET)) {
+        result = FALSE;
+        GST_DEBUG_OBJECT (aagg,
+            "seeking failed, unhandled seek type for start: %d", start_type);
+        goto done;
+      }
+      if ((stop_type != GST_SEEK_TYPE_NONE) && (stop_type != GST_SEEK_TYPE_SET)) {
+        result = FALSE;
+        GST_DEBUG_OBJECT (aagg,
+            "seeking failed, unhandled seek type for end: %d", stop_type);
+        goto done;
+      }
+
+      GST_OBJECT_LOCK (agg);
+      dest_format = agg->segment.format;
+      GST_OBJECT_UNLOCK (agg);
+      if (seek_format != dest_format) {
+        result = FALSE;
+        GST_DEBUG_OBJECT (aagg,
+            "seeking failed, unhandled seek format: %s",
+            gst_format_get_name (seek_format));
+        goto done;
+      }
+    }
+      break;
+    default:
+      break;
+  }
+
+  return
+      GST_AGGREGATOR_CLASS (gst_audio_aggregator_parent_class)->src_event (agg,
+      event);
+
+done:
+  return result;
+}
+
+
+static gboolean
+gst_audio_aggregator_sink_event (GstAggregator * agg,
+    GstAggregatorPad * aggpad, GstEvent * event)
+{
+  gboolean res = TRUE;
+
+  GST_DEBUG_OBJECT (aggpad, "Got %s event on sink pad",
+      GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_SEGMENT:
+    {
+      const GstSegment *segment;
+      gst_event_parse_segment (event, &segment);
+
+      if (segment->format != GST_FORMAT_TIME) {
+        GST_ERROR_OBJECT (agg, "Segment of type %s are not supported,"
+            " only TIME segments are supported",
+            gst_format_get_name (segment->format));
+        gst_event_unref (event);
+        event = NULL;
+        res = FALSE;
+        break;
+      }
+
+      GST_OBJECT_LOCK (agg);
+      if (segment->rate != agg->segment.rate) {
+        GST_ERROR_OBJECT (aggpad,
+            "Got segment event with wrong rate %lf, expected %lf",
+            segment->rate, agg->segment.rate);
+        res = FALSE;
+        gst_event_unref (event);
+        event = NULL;
+      } else if (segment->rate < 0.0) {
+        GST_ERROR_OBJECT (aggpad, "Negative rates not supported yet");
+        res = FALSE;
+        gst_event_unref (event);
+        event = NULL;
+      } else {
+        GstAudioAggregatorPad *pad = GST_AUDIO_AGGREGATOR_PAD (aggpad);
+
+        GST_OBJECT_LOCK (pad);
+        pad->priv->new_segment = TRUE;
+        GST_OBJECT_UNLOCK (pad);
+      }
+      GST_OBJECT_UNLOCK (agg);
+
+      break;
+    }
+    default:
+      break;
+  }
+
+  if (event != NULL)
+    return
+        GST_AGGREGATOR_CLASS (gst_audio_aggregator_parent_class)->sink_event
+        (agg, aggpad, event);
+
+  return res;
+}
+
+/* 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 mixing 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 mixing so this really depends on where the
+ * streams where punched in and what their relative offsets are against
+ * eachother 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_audio_aggregator_query_duration (GstAudioAggregator * aagg,
+    GstQuery * query)
+{
+  gint64 max;
+  gboolean res;
+  GstFormat format;
+  GstIterator *it;
+  gboolean done;
+  GValue item = { 0, };
+
+  /* parse format */
+  gst_query_parse_duration (query, &format, NULL);
+
+  max = -1;
+  res = TRUE;
+  done = FALSE;
+
+  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (aagg));
+  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 = g_value_get_object (&item);
+        gint64 duration;
+
+        /* 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 (aagg, "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_audio_aggregator_src_query (GstAggregator * agg, GstQuery * query)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (agg);
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_DURATION:
+      res = gst_audio_aggregator_query_duration (aagg, query);
+      break;
+    case GST_QUERY_POSITION:
+    {
+      GstFormat format;
+
+      gst_query_parse_position (query, &format, NULL);
+
+      GST_OBJECT_LOCK (aagg);
+
+      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;
+        case GST_FORMAT_BYTES:
+          if (GST_AUDIO_INFO_BPF (&aagg->info)) {
+            gst_query_set_position (query, format, aagg->priv->offset *
+                GST_AUDIO_INFO_BPF (&aagg->info));
+            res = TRUE;
+          }
+          break;
+        case GST_FORMAT_DEFAULT:
+          gst_query_set_position (query, format, aagg->priv->offset);
+          res = TRUE;
+          break;
+        default:
+          break;
+      }
+
+      GST_OBJECT_UNLOCK (aagg);
+
+      break;
+    }
+    default:
+      res =
+          GST_AGGREGATOR_CLASS (gst_audio_aggregator_parent_class)->src_query
+          (agg, query);
+      break;
+  }
+
+  return res;
+}
+
+
+void
+gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * pad, GstCaps * caps)
+{
+#ifndef G_DISABLE_ASSERT
+  gboolean valid;
+
+  GST_OBJECT_LOCK (pad);
+  valid = gst_audio_info_from_caps (&pad->info, caps);
+  g_assert (valid);
+
+#else
+  GST_OBJECT_LOCK (pad);
+  (void) gst_audio_info_from_caps (&pad->info, caps);
+  GST_OBJECT_UNLOCK (pad);
+#endif
+}
+
+
+gboolean
+gst_audio_aggregator_set_src_caps (GstAudioAggregator * aagg, GstCaps * caps)
+{
+  GstAudioInfo info;
+
+  if (!gst_audio_info_from_caps (&info, caps)) {
+    GST_WARNING_OBJECT (aagg, "Rejecting invalid caps: %" GST_PTR_FORMAT, caps);
+    return FALSE;
+  }
+
+  GST_AUDIO_AGGREGATOR_LOCK (aagg);
+  GST_OBJECT_LOCK (aagg);
+
+  if (!gst_audio_info_is_equal (&info, &aagg->info)) {
+    GST_INFO_OBJECT (aagg, "setting caps to %" GST_PTR_FORMAT, caps);
+    gst_caps_replace (&aagg->current_caps, caps);
+
+    memcpy (&aagg->info, &info, sizeof (info));
+    aagg->priv->send_caps = TRUE;
+
+  }
+
+  GST_OBJECT_UNLOCK (aagg);
+  GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+
+  /* send caps event later, after stream-start event */
+
+  return TRUE;
+}
+
+
+/* Must hold object lock and aagg lock to call */
+
+static void
+gst_audio_aggregator_reset (GstAudioAggregator * aagg)
+{
+  GstAggregator *agg = GST_AGGREGATOR (aagg);
+
+  GST_AUDIO_AGGREGATOR_LOCK (aagg);
+  GST_OBJECT_LOCK (aagg);
+  agg->segment.position = -1;
+  aagg->priv->offset = 0;
+  gst_audio_info_init (&aagg->info);
+  gst_caps_replace (&aagg->current_caps, NULL);
+  gst_buffer_replace (&aagg->priv->current_buffer, NULL);
+  GST_OBJECT_UNLOCK (aagg);
+  GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+}
+
+static gboolean
+gst_audio_aggregator_start (GstAggregator * agg)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (agg);
+
+  gst_audio_aggregator_reset (aagg);
+
+  return TRUE;
+}
+
+static gboolean
+gst_audio_aggregator_stop (GstAggregator * agg)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (agg);
+
+  gst_audio_aggregator_reset (aagg);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_audio_aggregator_flush (GstAggregator * agg)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (agg);
+
+  GST_AUDIO_AGGREGATOR_LOCK (aagg);
+  GST_OBJECT_LOCK (aagg);
+  agg->segment.position = -1;
+  aagg->priv->offset = 0;
+  gst_buffer_replace (&aagg->priv->current_buffer, NULL);
+  GST_OBJECT_UNLOCK (aagg);
+  GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_audio_aggregator_do_clip (GstAggregator * agg,
+    GstAggregatorPad * bpad, GstBuffer * buffer, GstBuffer ** out)
+{
+  GstAudioAggregatorPad *pad = GST_AUDIO_AGGREGATOR_PAD (bpad);
+  gint rate, bpf;
+
+
+  rate = GST_AUDIO_INFO_RATE (&pad->info);
+  bpf = GST_AUDIO_INFO_BPF (&pad->info);
+
+  GST_OBJECT_LOCK (bpad);
+  *out = gst_audio_buffer_clip (buffer, &bpad->clip_segment, rate, bpf);
+  GST_OBJECT_UNLOCK (bpad);
+
+  return GST_FLOW_OK;
+}
+
+/* Called with the object lock for both the element and pad held,
+ * as well as the aagg lock
+ */
+static gboolean
+gst_audio_aggregator_fill_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * pad, GstBuffer * inbuf)
+{
+  GstClockTime start_time, end_time;
+  gboolean discont = FALSE;
+  guint64 start_offset, end_offset;
+  gint rate, bpf;
+
+  GstAggregator *agg = GST_AGGREGATOR (aagg);
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
+
+  g_assert (pad->priv->buffer == NULL);
+
+  rate = GST_AUDIO_INFO_RATE (&pad->info);
+  bpf = GST_AUDIO_INFO_BPF (&pad->info);
+
+  pad->priv->position = 0;
+  pad->priv->size = gst_buffer_get_size (inbuf) / bpf;
+
+  if (!GST_BUFFER_PTS_IS_VALID (inbuf)) {
+    if (pad->priv->output_offset == -1)
+      pad->priv->output_offset = aagg->priv->offset;
+    if (pad->priv->next_offset == -1)
+      pad->priv->next_offset = pad->priv->size;
+    else
+      pad->priv->next_offset += pad->priv->size;
+    goto done;
+  }
+
+  start_time = GST_BUFFER_PTS (inbuf);
+  end_time =
+      start_time + gst_util_uint64_scale_ceil (pad->priv->size, GST_SECOND,
+      rate);
+
+  /* Clipping should've ensured this */
+  g_assert (start_time >= aggpad->segment.start);
+
+  start_offset =
+      gst_util_uint64_scale (start_time - aggpad->segment.start, rate,
+      GST_SECOND);
+  end_offset = start_offset + pad->priv->size;
+
+  if (GST_BUFFER_IS_DISCONT (inbuf)
+      || GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_RESYNC)
+      || pad->priv->new_segment || pad->priv->next_offset == -1) {
+    discont = TRUE;
+    pad->priv->new_segment = FALSE;
+  } else {
+    guint64 diff, max_sample_diff;
+
+    /* Check discont, based on audiobasesink */
+    if (start_offset <= pad->priv->next_offset)
+      diff = pad->priv->next_offset - start_offset;
+    else
+      diff = start_offset - pad->priv->next_offset;
+
+    max_sample_diff =
+        gst_util_uint64_scale_int (aagg->priv->alignment_threshold, rate,
+        GST_SECOND);
+
+    /* Discont! */
+    if (G_UNLIKELY (diff >= max_sample_diff)) {
+      if (aagg->priv->discont_wait > 0) {
+        if (pad->priv->discont_time == GST_CLOCK_TIME_NONE) {
+          pad->priv->discont_time = start_time;
+        } else if (start_time - pad->priv->discont_time >=
+            aagg->priv->discont_wait) {
+          discont = TRUE;
+          pad->priv->discont_time = GST_CLOCK_TIME_NONE;
+        }
+      } else {
+        discont = TRUE;
+      }
+    } else if (G_UNLIKELY (pad->priv->discont_time != GST_CLOCK_TIME_NONE)) {
+      /* we have had a discont, but are now back on track! */
+      pad->priv->discont_time = GST_CLOCK_TIME_NONE;
+    }
+  }
+
+  if (discont) {
+    /* Have discont, need resync */
+    if (pad->priv->next_offset != -1)
+      GST_INFO_OBJECT (pad, "Have discont. Expected %"
+          G_GUINT64_FORMAT ", got %" G_GUINT64_FORMAT,
+          pad->priv->next_offset, start_offset);
+    pad->priv->output_offset = -1;
+    pad->priv->next_offset = end_offset;
+  } else {
+    pad->priv->next_offset += pad->priv->size;
+  }
+
+  if (pad->priv->output_offset == -1) {
+    GstClockTime start_running_time;
+    GstClockTime end_running_time;
+    guint64 start_output_offset;
+    guint64 end_output_offset;
+
+    start_running_time =
+        gst_segment_to_running_time (&aggpad->segment,
+        GST_FORMAT_TIME, start_time);
+    end_running_time =
+        gst_segment_to_running_time (&aggpad->segment,
+        GST_FORMAT_TIME, end_time);
+
+    /* Convert to position in the output segment */
+    start_output_offset =
+        gst_segment_to_position (&agg->segment, GST_FORMAT_TIME,
+        start_running_time);
+    if (start_output_offset != -1)
+      start_output_offset =
+          gst_util_uint64_scale (start_output_offset - agg->segment.start, rate,
+          GST_SECOND);
+
+    end_output_offset =
+        gst_segment_to_position (&agg->segment, GST_FORMAT_TIME,
+        end_running_time);
+    if (end_output_offset != -1)
+      end_output_offset =
+          gst_util_uint64_scale (end_output_offset - agg->segment.start, rate,
+          GST_SECOND);
+
+    if (start_output_offset == -1 && end_output_offset == -1) {
+      /* Outside output segment, drop */
+      gst_buffer_unref (inbuf);
+      pad->priv->buffer = NULL;
+      pad->priv->position = 0;
+      pad->priv->size = 0;
+      pad->priv->output_offset = -1;
+      GST_DEBUG_OBJECT (pad, "Buffer outside output segment");
+      return FALSE;
+    }
+
+    /* Calculate end_output_offset if it was outside the output segment */
+    if (end_output_offset == -1)
+      end_output_offset = start_output_offset + pad->priv->size;
+
+    if (end_output_offset < aagg->priv->offset) {
+      /* Before output segment, drop */
+      gst_buffer_unref (inbuf);
+      pad->priv->buffer = NULL;
+      pad->priv->position = 0;
+      pad->priv->size = 0;
+      pad->priv->output_offset = -1;
+      GST_DEBUG_OBJECT (pad,
+          "Buffer before segment or current position: %" G_GUINT64_FORMAT " < %"
+          G_GUINT64_FORMAT, end_output_offset, aagg->priv->offset);
+      return FALSE;
+    }
+
+    if (start_output_offset == -1 || start_output_offset < aagg->priv->offset) {
+      guint diff;
+
+      if (start_output_offset == -1 && end_output_offset < pad->priv->size) {
+        diff = pad->priv->size - end_output_offset + aagg->priv->offset;
+      } else if (start_output_offset == -1) {
+        start_output_offset = end_output_offset - pad->priv->size;
+
+        if (start_output_offset < aagg->priv->offset)
+          diff = aagg->priv->offset - start_output_offset;
+        else
+          diff = 0;
+      } else {
+        diff = aagg->priv->offset - start_output_offset;
+      }
+
+      pad->priv->position += diff;
+      if (pad->priv->position >= pad->priv->size) {
+        /* Empty buffer, drop */
+        gst_buffer_unref (inbuf);
+        pad->priv->buffer = NULL;
+        pad->priv->position = 0;
+        pad->priv->size = 0;
+        pad->priv->output_offset = -1;
+        GST_DEBUG_OBJECT (pad,
+            "Buffer before segment or current position: %" G_GUINT64_FORMAT
+            " < %" G_GUINT64_FORMAT, end_output_offset, aagg->priv->offset);
+        return FALSE;
+      }
+    }
+
+    if (start_output_offset == -1 || start_output_offset < aagg->priv->offset)
+      pad->priv->output_offset = aagg->priv->offset;
+    else
+      pad->priv->output_offset = start_output_offset;
+
+    GST_DEBUG_OBJECT (pad,
+        "Buffer resynced: Pad offset %" G_GUINT64_FORMAT
+        ", current audio aggregator offset %" G_GUINT64_FORMAT,
+        pad->priv->output_offset, aagg->priv->offset);
+  }
+
+done:
+
+  GST_LOG_OBJECT (pad,
+      "Queued new buffer at offset %" G_GUINT64_FORMAT,
+      pad->priv->output_offset);
+  pad->priv->buffer = inbuf;
+
+  return TRUE;
+}
+
+/* Called with pad object lock held */
+
+static gboolean
+gst_audio_aggregator_mix_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * pad, GstBuffer * inbuf, GstBuffer * outbuf)
+{
+  guint overlap;
+  guint out_start;
+  gboolean filled;
+  guint blocksize;
+
+  blocksize = gst_util_uint64_scale (aagg->priv->output_buffer_duration,
+      GST_AUDIO_INFO_RATE (&aagg->info), GST_SECOND);
+  blocksize = MAX (1, blocksize);
+
+  /* Overlap => mix */
+  if (aagg->priv->offset < pad->priv->output_offset)
+    out_start = pad->priv->output_offset - aagg->priv->offset;
+  else
+    out_start = 0;
+
+  overlap = pad->priv->size - pad->priv->position;
+  if (overlap > blocksize - out_start)
+    overlap = blocksize - out_start;
+
+  if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
+    /* skip gap buffer */
+    GST_LOG_OBJECT (pad, "skipping GAP buffer");
+    pad->priv->output_offset += pad->priv->size - pad->priv->position;
+    pad->priv->position = pad->priv->size;
+
+    gst_buffer_replace (&pad->priv->buffer, NULL);
+    return FALSE;
+  }
+
+  filled = GST_AUDIO_AGGREGATOR_GET_CLASS (aagg)->aggregate_one_buffer (aagg,
+      pad, inbuf, pad->priv->position, outbuf, out_start, overlap);
+
+  if (filled)
+    GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_GAP);
+
+  pad->priv->position += overlap;
+  pad->priv->output_offset += overlap;
+
+  if (pad->priv->position == pad->priv->size) {
+    /* Buffer done, drop it */
+    gst_buffer_replace (&pad->priv->buffer, NULL);
+    GST_DEBUG_OBJECT (pad, "Finished mixing buffer, waiting for next");
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+static GstBuffer *
+gst_audio_aggregator_create_output_buffer (GstAudioAggregator * aagg,
+    guint num_frames)
+{
+  GstBuffer *outbuf = gst_buffer_new_allocate (NULL, num_frames *
+      GST_AUDIO_INFO_BPF (&aagg->info), NULL);
+  GstMapInfo outmap;
+
+  gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE);
+  gst_audio_format_fill_silence (aagg->info.finfo, outmap.data, outmap.size);
+  gst_buffer_unmap (outbuf, &outmap);
+
+  return outbuf;
+}
+
+static gboolean
+sync_pad_values (GstAudioAggregator * aagg, GstAudioAggregatorPad * pad)
+{
+  GstAggregatorPad *bpad = GST_AGGREGATOR_PAD (pad);
+  GstClockTime timestamp, stream_time;
+
+  if (pad->priv->buffer == NULL)
+    return TRUE;
+
+  timestamp = GST_BUFFER_PTS (pad->priv->buffer);
+  GST_OBJECT_LOCK (bpad);
+  stream_time = gst_segment_to_stream_time (&bpad->segment, GST_FORMAT_TIME,
+      timestamp);
+  GST_OBJECT_UNLOCK (bpad);
+
+  /* sync object properties on stream time */
+  /* TODO: Ideally we would want to do that on every sample */
+  if (GST_CLOCK_TIME_IS_VALID (stream_time))
+    gst_object_sync_values (GST_OBJECT (pad), stream_time);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout)
+{
+  /* Get all pads that have data for us and store them in a
+   * new list.
+   *
+   * Calculate the current output offset/timestamp and
+   * offset_end/timestamp_end. Allocate a silence buffer
+   * for this and store it.
+   *
+   * For all pads:
+   * 1) Once per input buffer (cached)
+   *   1) Check discont (flag and timestamp with tolerance)
+   *   2) If discont or new, resync. That means:
+   *     1) Drop all start data of the buffer that comes before
+   *        the current position/offset.
+   *     2) Calculate the offset (output segment!) that the first
+   *        frame of the input buffer corresponds to. Base this on
+   *        the running time.
+   *
+   * 2) If the current pad's offset/offset_end overlaps with the output
+   *    offset/offset_end, mix it at the appropiate position in the output
+   *    buffer and advance the pad's position. Remember if this pad needs
+   *    a new buffer to advance behind the output offset_end.
+   *
+   * 3) If we had no pad with a buffer, go EOS.
+   *
+   * 4) If we had at least one pad that did not advance behind output
+   *    offset_end, let collected be called again for the current
+   *    output offset/offset_end.
+   */
+  GstElement *element;
+  GstAudioAggregator *aagg;
+  GList *iter;
+  GstFlowReturn ret;
+  GstBuffer *outbuf = NULL;
+  gint64 next_offset;
+  gint64 next_timestamp;
+  gint rate, bpf;
+  gboolean dropped = FALSE;
+  gboolean is_eos = TRUE;
+  gboolean is_done = TRUE;
+  guint blocksize;
+
+  element = GST_ELEMENT (agg);
+  aagg = GST_AUDIO_AGGREGATOR (agg);
+
+  /* Sync pad properties to the stream time */
+  gst_aggregator_iterate_sinkpads (agg,
+      (GstAggregatorPadForeachFunc) GST_DEBUG_FUNCPTR (sync_pad_values), NULL);
+
+  GST_AUDIO_AGGREGATOR_LOCK (aagg);
+  GST_OBJECT_LOCK (agg);
+
+  /* Update position from the segment start/stop if needed */
+  if (agg->segment.position == -1) {
+    if (agg->segment.rate > 0.0)
+      agg->segment.position = agg->segment.start;
+    else
+      agg->segment.position = agg->segment.stop;
+  }
+
+  if (G_UNLIKELY (aagg->info.finfo->format == GST_AUDIO_FORMAT_UNKNOWN)) {
+    if (timeout) {
+      GST_DEBUG_OBJECT (aagg,
+          "Got timeout before receiving any caps, don't output anything");
+
+      /* Advance position */
+      if (agg->segment.rate > 0.0)
+        agg->segment.position += aagg->priv->output_buffer_duration;
+      else if (agg->segment.position > aagg->priv->output_buffer_duration)
+        agg->segment.position -= aagg->priv->output_buffer_duration;
+      else
+        agg->segment.position = 0;
+
+      GST_OBJECT_UNLOCK (agg);
+      GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+      return GST_FLOW_OK;
+    } else {
+      GST_OBJECT_UNLOCK (agg);
+      goto not_negotiated;
+    }
+  }
+
+  if (aagg->priv->send_caps) {
+    GST_OBJECT_UNLOCK (agg);
+    gst_aggregator_set_src_caps (agg, aagg->current_caps);
+    GST_OBJECT_LOCK (agg);
+
+    aagg->priv->send_caps = FALSE;
+  }
+
+  rate = GST_AUDIO_INFO_RATE (&aagg->info);
+  bpf = GST_AUDIO_INFO_BPF (&aagg->info);
+
+  blocksize = gst_util_uint64_scale (aagg->priv->output_buffer_duration,
+      GST_AUDIO_INFO_RATE (&aagg->info), GST_SECOND);
+  blocksize = MAX (1, blocksize);
+
+  /* for the next timestamp, use the sample counter, which will
+   * never accumulate rounding errors */
+
+  /* FIXME: Reverse mixing does not work at all yet */
+  if (agg->segment.rate > 0.0) {
+    next_offset = aagg->priv->offset + blocksize;
+  } else {
+    next_offset = aagg->priv->offset - blocksize;
+  }
+
+  next_timestamp =
+      agg->segment.start + gst_util_uint64_scale (next_offset, GST_SECOND,
+      rate);
+
+  if (aagg->priv->current_buffer == NULL) {
+    GST_OBJECT_UNLOCK (agg);
+    aagg->priv->current_buffer =
+        GST_AUDIO_AGGREGATOR_GET_CLASS (aagg)->create_output_buffer (aagg,
+        blocksize);
+    /* Be careful, some things could have changed ? */
+    GST_OBJECT_LOCK (agg);
+    GST_BUFFER_FLAG_SET (aagg->priv->current_buffer, GST_BUFFER_FLAG_GAP);
+  }
+  outbuf = aagg->priv->current_buffer;
+
+  GST_LOG_OBJECT (agg,
+      "Starting to mix %u samples for offset %" G_GUINT64_FORMAT
+      " with timestamp %" GST_TIME_FORMAT, blocksize,
+      aagg->priv->offset, GST_TIME_ARGS (agg->segment.position));
+
+  for (iter = element->sinkpads; iter; iter = iter->next) {
+    GstBuffer *inbuf;
+    GstAudioAggregatorPad *pad = (GstAudioAggregatorPad *) iter->data;
+    GstAggregatorPad *aggpad = (GstAggregatorPad *) iter->data;
+    gboolean drop_buf = FALSE;
+    gboolean pad_eos = gst_aggregator_pad_is_eos (aggpad);
+
+    if (!pad_eos)
+      is_eos = FALSE;
+
+    inbuf = gst_aggregator_pad_get_buffer (aggpad);
+
+    GST_OBJECT_LOCK (pad);
+    if (!inbuf) {
+      if (timeout) {
+        if (pad->priv->output_offset < next_offset) {
+          gint64 diff = next_offset - pad->priv->output_offset;
+          GST_LOG_OBJECT (pad, "Timeout, missing %" G_GINT64_FORMAT " frames (%"
+              GST_TIME_FORMAT ")", diff,
+              GST_TIME_ARGS (gst_util_uint64_scale (diff, GST_SECOND,
+                      GST_AUDIO_INFO_RATE (&aagg->info))));
+        }
+      } else if (!pad_eos) {
+        is_done = FALSE;
+      }
+      GST_OBJECT_UNLOCK (pad);
+      continue;
+    }
+
+    g_assert (!pad->priv->buffer || pad->priv->buffer == inbuf);
+
+    /* New buffer? */
+    if (!pad->priv->buffer) {
+      /* Takes ownership of buffer */
+      if (!gst_audio_aggregator_fill_buffer (aagg, pad, inbuf)) {
+        dropped = TRUE;
+        GST_OBJECT_UNLOCK (pad);
+        gst_aggregator_pad_drop_buffer (aggpad);
+        continue;
+      }
+    } else {
+      gst_buffer_unref (inbuf);
+    }
+
+    if (!pad->priv->buffer && !dropped && pad_eos) {
+      GST_DEBUG_OBJECT (aggpad, "Pad is in EOS state");
+      GST_OBJECT_UNLOCK (pad);
+      continue;
+    }
+
+    g_assert (pad->priv->buffer);
+
+    /* This pad is lacking behind, we need to update the offset
+     * and maybe drop the current buffer */
+    if (pad->priv->output_offset < aagg->priv->offset) {
+      gint64 diff = aagg->priv->offset - pad->priv->output_offset;
+      gint64 odiff = diff;
+
+      if (pad->priv->position + diff > pad->priv->size)
+        diff = pad->priv->size - pad->priv->position;
+      pad->priv->position += diff;
+      pad->priv->output_offset += diff;
+
+      if (pad->priv->position == pad->priv->size) {
+        GST_LOG_OBJECT (pad, "Buffer was late by %" GST_TIME_FORMAT
+            ", dropping %" GST_PTR_FORMAT,
+            GST_TIME_ARGS (gst_util_uint64_scale (odiff, GST_SECOND,
+                    GST_AUDIO_INFO_RATE (&aagg->info))), pad->priv->buffer);
+        /* Buffer done, drop it */
+        gst_buffer_replace (&pad->priv->buffer, NULL);
+        dropped = TRUE;
+        GST_OBJECT_UNLOCK (pad);
+        gst_aggregator_pad_drop_buffer (aggpad);
+        continue;
+      }
+    }
+
+
+    if (pad->priv->output_offset >= aagg->priv->offset
+        && pad->priv->output_offset <
+        aagg->priv->offset + blocksize && pad->priv->buffer) {
+      GST_LOG_OBJECT (aggpad, "Mixing buffer for current offset");
+      drop_buf = !gst_audio_aggregator_mix_buffer (aagg, pad, pad->priv->buffer,
+          outbuf);
+      if (pad->priv->output_offset >= next_offset) {
+        GST_DEBUG_OBJECT (pad,
+            "Pad is after current offset: %" G_GUINT64_FORMAT " >= %"
+            G_GUINT64_FORMAT, pad->priv->output_offset, next_offset);
+      } else {
+        is_done = FALSE;
+      }
+    }
+
+    GST_OBJECT_UNLOCK (pad);
+    if (drop_buf)
+      gst_aggregator_pad_drop_buffer (aggpad);
+
+  }
+  GST_OBJECT_UNLOCK (agg);
+
+  if (dropped) {
+    /* We dropped a buffer, retry */
+    GST_INFO_OBJECT (aagg, "A pad dropped a buffer, wait for the next one");
+    GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+    return GST_FLOW_OK;
+  }
+
+  if (!is_done && !is_eos) {
+    /* Get more buffers */
+    GST_INFO_OBJECT (aagg,
+        "We're not done yet for the current offset," " waiting for more data");
+    GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+    return GST_FLOW_OK;
+  }
+
+  if (is_eos) {
+    gint64 max_offset = 0;
+
+    GST_DEBUG_OBJECT (aagg, "We're EOS");
+
+    GST_OBJECT_LOCK (agg);
+    for (iter = GST_ELEMENT (agg)->sinkpads; iter; iter = iter->next) {
+      GstAudioAggregatorPad *pad = GST_AUDIO_AGGREGATOR_PAD (iter->data);
+
+      max_offset = MAX ((gint64) max_offset, (gint64) pad->priv->output_offset);
+    }
+    GST_OBJECT_UNLOCK (agg);
+
+    /* This means EOS or nothing mixed in at all */
+    if (aagg->priv->offset == max_offset) {
+      gst_buffer_replace (&aagg->priv->current_buffer, NULL);
+      GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+      return GST_FLOW_EOS;
+    }
+
+    if (max_offset <= next_offset) {
+      GST_DEBUG_OBJECT (aagg,
+          "Last buffer is incomplete: %" G_GUINT64_FORMAT " <= %"
+          G_GUINT64_FORMAT, max_offset, next_offset);
+      next_offset = max_offset;
+      next_timestamp =
+          agg->segment.start + gst_util_uint64_scale (next_offset, GST_SECOND,
+          rate);
+
+      if (next_offset > aagg->priv->offset)
+        gst_buffer_resize (outbuf, 0, (next_offset - aagg->priv->offset) * bpf);
+    }
+  }
+
+  /* set timestamps on the output buffer */
+  GST_OBJECT_LOCK (agg);
+  if (agg->segment.rate > 0.0) {
+    GST_BUFFER_PTS (outbuf) = agg->segment.position;
+    GST_BUFFER_OFFSET (outbuf) = aagg->priv->offset;
+    GST_BUFFER_OFFSET_END (outbuf) = next_offset;
+    GST_BUFFER_DURATION (outbuf) = next_timestamp - agg->segment.position;
+  } else {
+    GST_BUFFER_PTS (outbuf) = next_timestamp;
+    GST_BUFFER_OFFSET (outbuf) = next_offset;
+    GST_BUFFER_OFFSET_END (outbuf) = aagg->priv->offset;
+    GST_BUFFER_DURATION (outbuf) = agg->segment.position - next_timestamp;
+  }
+
+  GST_OBJECT_UNLOCK (agg);
+
+  /* send it out */
+  GST_LOG_OBJECT (aagg,
+      "pushing outbuf %p, timestamp %" GST_TIME_FORMAT " offset %"
+      G_GINT64_FORMAT, outbuf, GST_TIME_ARGS (GST_BUFFER_PTS (outbuf)),
+      GST_BUFFER_OFFSET (outbuf));
+
+  GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+
+  ret = gst_aggregator_finish_buffer (agg, aagg->priv->current_buffer);
+  aagg->priv->current_buffer = NULL;
+
+  GST_LOG_OBJECT (aagg, "pushed outbuf, result = %s", gst_flow_get_name (ret));
+
+  GST_AUDIO_AGGREGATOR_LOCK (aagg);
+  GST_OBJECT_LOCK (agg);
+  aagg->priv->offset = next_offset;
+  agg->segment.position = next_timestamp;
+
+  /* If there was a timeout and there was a gap in data in out of the streams,
+   * then it's a very good time to for a resync with the timestamps.
+   */
+  if (timeout) {
+    for (iter = element->sinkpads; iter; iter = iter->next) {
+      GstAudioAggregatorPad *pad = GST_AUDIO_AGGREGATOR_PAD (iter->data);
+
+      GST_OBJECT_LOCK (pad);
+      if (pad->priv->output_offset < aagg->priv->offset)
+        pad->priv->output_offset = -1;
+      GST_OBJECT_UNLOCK (pad);
+    }
+  }
+  GST_OBJECT_UNLOCK (agg);
+  GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+
+  return ret;
+  /* ERRORS */
+not_negotiated:
+  {
+    GST_AUDIO_AGGREGATOR_UNLOCK (aagg);
+    GST_ELEMENT_ERROR (aagg, STREAM, FORMAT, (NULL),
+        ("Unknown data received, not negotiated"));
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+}
diff --git a/gst/audiomixer/gstaudioaggregator.h b/gst/audiomixer/gstaudioaggregator.h
new file mode 100644
index 0000000..304bad2
--- /dev/null
+++ b/gst/audiomixer/gstaudioaggregator.h
@@ -0,0 +1,171 @@
+/* GStreamer
+ * Copyright (C) 2014 Collabora
+ *   Author: Olivier Crete <olivier.crete@collabora.com>
+ *
+ * gstaudioaggregator.h:
+ *
+ * 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_AUDIO_AGGREGATOR_H__
+#define __GST_AUDIO_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>
+#include <gst/base/gstaggregator.h>
+#include <gst/audio/audio.h>
+
+G_BEGIN_DECLS
+
+/*******************************
+ * GstAudioAggregator Structs  *
+ *******************************/
+
+typedef struct _GstAudioAggregator GstAudioAggregator;
+typedef struct _GstAudioAggregatorPrivate GstAudioAggregatorPrivate;
+typedef struct _GstAudioAggregatorClass GstAudioAggregatorClass;
+
+
+/************************
+ * GstAudioAggregatorPad API *
+ ***********************/
+
+#define GST_TYPE_AUDIO_AGGREGATOR_PAD            (gst_audio_aggregator_pad_get_type())
+#define GST_AUDIO_AGGREGATOR_PAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_AGGREGATOR_PAD, GstAudioAggregatorPad))
+#define GST_AUDIO_AGGREGATOR_PAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_AGGREGATOR_PAD, GstAudioAggregatorPadClass))
+#define GST_AUDIO_AGGREGATOR_PAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_AGGREGATOR_PAD, GstAudioAggregatorPadClass))
+#define GST_IS_AUDIO_AGGREGATOR_PAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_AGGREGATOR_PAD))
+#define GST_IS_AUDIO_AGGREGATOR_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_AGGREGATOR_PAD))
+
+/****************************
+ * GstAudioAggregatorPad Structs *
+ ***************************/
+
+typedef struct _GstAudioAggregatorPad GstAudioAggregatorPad;
+typedef struct _GstAudioAggregatorPadClass GstAudioAggregatorPadClass;
+typedef struct _GstAudioAggregatorPadPrivate GstAudioAggregatorPadPrivate;
+
+/**
+ * GstAudioAggregatorPad:
+ * @parent: The parent #GstAggregatorPad
+ * @info: The audio info for this pad set from the incoming caps
+ *
+ * The implementation the GstPad to use with #GstAudioAggregator
+ */
+struct _GstAudioAggregatorPad
+{
+  GstAggregatorPad                  parent;
+
+  GstAudioInfo                      info;
+
+  /*< private >*/
+  GstAudioAggregatorPadPrivate   *  priv;
+
+  gpointer _gst_reserved[GST_PADDING];
+};
+
+/**
+ * GstAudioAggregatorPadClass:
+ *
+ */
+struct _GstAudioAggregatorPadClass
+{
+  GstAggregatorPadClass   parent_class;
+
+  /*< private >*/
+  gpointer      _gst_reserved[GST_PADDING];
+};
+
+GType gst_audio_aggregator_pad_get_type           (void);
+
+/**************************
+ * GstAudioAggregator API *
+ **************************/
+
+#define GST_TYPE_AUDIO_AGGREGATOR            (gst_audio_aggregator_get_type())
+#define GST_AUDIO_AGGREGATOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_AGGREGATOR,GstAudioAggregator))
+#define GST_AUDIO_AGGREGATOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_AGGREGATOR,GstAudioAggregatorClass))
+#define GST_AUDIO_AGGREGATOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_AGGREGATOR,GstAudioAggregatorClass))
+#define GST_IS_AUDIO_AGGREGATOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_AGGREGATOR))
+#define GST_IS_AUDIO_AGGREGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_AGGREGATOR))
+
+#define GST_FLOW_CUSTOM_SUCCESS        GST_FLOW_NOT_HANDLED
+
+/**
+ * GstAudioAggregator:
+ * @parent: The parent #GstAggregator
+ * @info: The information parsed from the current caps
+ * @current_caps: The caps set by the subclass
+ *
+ * GstAudioAggregator object
+ */
+struct _GstAudioAggregator
+{
+  GstAggregator            parent;
+
+  /* All member are read only for subclasses, must hold OBJECT lock  */
+  GstAudioInfo    info;
+
+  GstCaps *current_caps;
+
+  /*< private >*/
+  GstAudioAggregatorPrivate *priv;
+
+  gpointer                 _gst_reserved[GST_PADDING];
+};
+
+/**
+ * GstAudioAggregatorClass:
+ * @create_output_buffer: Create a new output buffer contains num_frames frames.
+ * @aggregate_one_buffer: Aggregates one input buffer to the output
+ *  buffer.  The in_offset and out_offset are in "frames", which is
+ *  the size of a sample times the number of channels. Returns TRUE if
+ *  any non-silence was added to the buffer
+ */
+struct _GstAudioAggregatorClass {
+  GstAggregatorClass   parent_class;
+
+  GstBuffer * (* create_output_buffer) (GstAudioAggregator * aagg,
+      guint num_frames);
+  gboolean (* aggregate_one_buffer) (GstAudioAggregator * aagg,
+      GstAudioAggregatorPad * pad, GstBuffer * inbuf, guint in_offset,
+      GstBuffer * outbuf, guint out_offset, guint num_frames);
+
+  /*< private >*/
+  gpointer          _gst_reserved[GST_PADDING];
+};
+
+/*************************
+ * GstAggregator methods *
+ ************************/
+
+GType gst_audio_aggregator_get_type(void);
+
+void
+gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * pad, GstCaps * caps);
+
+gboolean
+gst_audio_aggregator_set_src_caps (GstAudioAggregator * aagg, GstCaps * caps);
+
+
+G_END_DECLS
+
+#endif /* __GST_AUDIO_AGGREGATOR_H__ */
diff --git a/gst/audiomixer/gstaudiointerleave.c b/gst/audiomixer/gstaudiointerleave.c
new file mode 100644
index 0000000..39b86e8
--- /dev/null
+++ b/gst/audiomixer/gstaudiointerleave.c
@@ -0,0 +1,901 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *                    2000 Wim Taymans <wtay@chello.be>
+ *                    2005 Wim Taymans <wim@fluendo.com>
+ *                    2007 Andy Wingo <wingo at pobox.com>
+ *                    2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *                    2014 Collabora
+ *                        Olivier Crete <olivier.crete@collabora.com>
+ *
+ * gstaudiointerleave.c: audiointerleave element, N in, one out,
+ * samples are added
+ *
+ * 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-audiointerleave
+ *
+ *
+ */
+
+/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstaudiointerleave.h"
+#include <gst/audio/audio.h>
+
+#include <string.h>
+
+#define GST_CAT_DEFAULT gst_audio_interleave_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_PAD_0,
+  PROP_PAD_CHANNEL
+};
+
+G_DEFINE_TYPE (GstAudioInterleavePad, gst_audio_interleave_pad,
+    GST_TYPE_AUDIO_AGGREGATOR_PAD);
+
+static void
+gst_audio_interleave_pad_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAudioInterleavePad *pad = GST_AUDIO_INTERLEAVE_PAD (object);
+
+  switch (prop_id) {
+    case PROP_PAD_CHANNEL:
+      g_value_set_uint (value, pad->channel);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+
+static void
+gst_audio_interleave_pad_class_init (GstAudioInterleavePadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  gobject_class->get_property = gst_audio_interleave_pad_get_property;
+
+  g_object_class_install_property (gobject_class,
+      PROP_PAD_CHANNEL,
+      g_param_spec_uint ("channel",
+          "Channel number",
+          "Number of the channel of this pad in the output", 0, G_MAXUINT, 0,
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_audio_interleave_pad_init (GstAudioInterleavePad * pad)
+{
+}
+
+enum
+{
+  PROP_0,
+  PROP_CHANNEL_POSITIONS,
+  PROP_CHANNEL_POSITIONS_FROM_INPUT
+};
+
+/* elementfactory information */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS \
+  GST_AUDIO_CAPS_MAKE ("{ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }") \
+  ", layout = (string) { interleaved, non-interleaved }"
+#else
+#define CAPS \
+  GST_AUDIO_CAPS_MAKE ("{ S32BE, U32BE, S16BE, U16BE, S8, U8, F32BE, F64BE }") \
+  ", layout = (string) { interleaved, non-interleaved }"
+#endif
+
+static GstStaticPadTemplate gst_audio_interleave_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink_%u",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS ("audio/x-raw, "
+        "rate = (int) [ 1, MAX ], "
+        "channels = (int) 1, "
+        "format = (string) " GST_AUDIO_FORMATS_ALL ", "
+        "layout = (string) {non-interleaved, interleaved}")
+    );
+
+static GstStaticPadTemplate gst_audio_interleave_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/x-raw, "
+        "rate = (int) [ 1, MAX ], "
+        "channels = (int) [ 1, MAX ], "
+        "format = (string) " GST_AUDIO_FORMATS_ALL ", "
+        "layout = (string) interleaved")
+    );
+
+static void gst_audio_interleave_child_proxy_init (gpointer g_iface,
+    gpointer iface_data);
+
+#define gst_audio_interleave_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstAudioInterleave, gst_audio_interleave,
+    GST_TYPE_AUDIO_AGGREGATOR, G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
+        gst_audio_interleave_child_proxy_init));
+
+static void gst_audio_interleave_finalize (GObject * object);
+static void gst_audio_interleave_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_audio_interleave_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static gboolean gst_audio_interleave_setcaps (GstAudioInterleave * self,
+    GstPad * pad, GstCaps * caps);
+static GstPad *gst_audio_interleave_request_new_pad (GstElement * element,
+    GstPadTemplate * temp, const gchar * req_name, const GstCaps * caps);
+static void gst_audio_interleave_release_pad (GstElement * element,
+    GstPad * pad);
+
+static gboolean gst_audio_interleave_stop (GstAggregator * agg);
+
+static gboolean
+gst_audio_interleave_aggregate_one_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * aaggpad, GstBuffer * inbuf, guint in_offset,
+    GstBuffer * outbuf, guint out_offset, guint num_samples);
+
+
+static void
+__remove_channels (GstCaps * caps)
+{
+  GstStructure *s;
+  gint i, size;
+
+  size = gst_caps_get_size (caps);
+  for (i = 0; i < size; i++) {
+    s = gst_caps_get_structure (caps, i);
+    gst_structure_remove_field (s, "channel-mask");
+    gst_structure_remove_field (s, "channels");
+  }
+}
+
+static void
+__set_channels (GstCaps * caps, gint channels)
+{
+  GstStructure *s;
+  gint i, size;
+
+  size = gst_caps_get_size (caps);
+  for (i = 0; i < size; i++) {
+    s = gst_caps_get_structure (caps, i);
+    if (channels > 0)
+      gst_structure_set (s, "channels", G_TYPE_INT, channels, NULL);
+    else
+      gst_structure_set (s, "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+  }
+}
+
+/* we can only accept caps that we and downstream can handle.
+ * if we have filtercaps set, use those to constrain the target caps.
+ */
+static GstCaps *
+gst_audio_interleave_sink_getcaps (GstAggregator * agg, GstPad * pad,
+    GstCaps * filter)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (agg);
+  GstCaps *result = NULL, *peercaps, *sinkcaps;
+
+  GST_OBJECT_LOCK (self);
+  /* If we already have caps on one of the sink pads return them */
+  if (self->sinkcaps)
+    result = gst_caps_copy (self->sinkcaps);
+  GST_OBJECT_UNLOCK (self);
+
+  if (result == NULL) {
+    /* get the downstream possible caps */
+    peercaps = gst_pad_peer_query_caps (agg->srcpad, NULL);
+
+    /* get the allowed caps on this sinkpad */
+    sinkcaps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+    __remove_channels (sinkcaps);
+    if (peercaps) {
+      peercaps = gst_caps_make_writable (peercaps);
+      __remove_channels (peercaps);
+      /* if the peer has caps, intersect */
+      GST_DEBUG_OBJECT (pad, "intersecting peer and template caps");
+      result = gst_caps_intersect (peercaps, sinkcaps);
+      gst_caps_unref (peercaps);
+      gst_caps_unref (sinkcaps);
+    } else {
+      /* the peer has no caps (or there is no peer), just use the allowed caps
+       * of this sinkpad. */
+      GST_DEBUG_OBJECT (pad, "no peer caps, using sinkcaps");
+      result = sinkcaps;
+    }
+    __set_channels (result, 1);
+  }
+
+  if (filter != NULL) {
+    GstCaps *caps = result;
+
+    GST_LOG_OBJECT (pad, "intersecting filter caps %" GST_PTR_FORMAT " with "
+        "preliminary result %" GST_PTR_FORMAT, filter, caps);
+
+    result = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (caps);
+  }
+
+  GST_DEBUG_OBJECT (pad, "Returning caps %" GST_PTR_FORMAT, result);
+
+  return result;
+}
+
+static gboolean
+gst_audio_interleave_sink_query (GstAggregator * agg, GstAggregatorPad * aggpad,
+    GstQuery * query)
+{
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CAPS:
+    {
+      GstCaps *filter, *caps;
+
+      gst_query_parse_caps (query, &filter);
+      caps = gst_audio_interleave_sink_getcaps (agg, GST_PAD (aggpad), filter);
+      gst_query_set_caps_result (query, caps);
+      gst_caps_unref (caps);
+      res = TRUE;
+      break;
+    }
+    default:
+      res =
+          GST_AGGREGATOR_CLASS (parent_class)->sink_query (agg, aggpad, query);
+      break;
+  }
+
+  return res;
+}
+
+static gint
+compare_positions (gconstpointer a, gconstpointer b, gpointer user_data)
+{
+  const gint i = *(const gint *) a;
+  const gint j = *(const gint *) b;
+  const gint *pos = (const gint *) user_data;
+
+  if (pos[i] < pos[j])
+    return -1;
+  else if (pos[i] > pos[j])
+    return 1;
+  else
+    return 0;
+}
+
+static gboolean
+gst_audio_interleave_channel_positions_to_mask (GValueArray * positions,
+    gint default_ordering_map[64], guint64 * mask)
+{
+  gint i;
+  guint channels;
+  GstAudioChannelPosition *pos;
+  gboolean ret;
+
+  channels = positions->n_values;
+  pos = g_new (GstAudioChannelPosition, channels);
+
+  for (i = 0; i < channels; i++) {
+    GValue *val;
+
+    val = g_value_array_get_nth (positions, i);
+    pos[i] = g_value_get_enum (val);
+  }
+
+  /* sort the default ordering map according to the position order */
+  for (i = 0; i < channels; i++) {
+    default_ordering_map[i] = i;
+  }
+  g_qsort_with_data (default_ordering_map, channels,
+      sizeof (*default_ordering_map), compare_positions, pos);
+
+  ret = gst_audio_channel_positions_to_mask (pos, channels, FALSE, mask);
+  g_free (pos);
+
+  return ret;
+}
+
+
+/* Must be called with the object lock held */
+
+static guint64
+gst_audio_interleave_get_channel_mask (GstAudioInterleave * self)
+{
+  guint64 channel_mask = 0;
+
+  if (self->channel_positions != NULL &&
+      self->channels == self->channel_positions->n_values) {
+    if (!gst_audio_interleave_channel_positions_to_mask
+        (self->channel_positions, self->default_channels_ordering_map,
+            &channel_mask)) {
+      GST_WARNING_OBJECT (self, "Invalid channel positions, using NONE");
+      channel_mask = 0;
+    }
+  } else {
+    GST_WARNING_OBJECT (self, "Using NONE channel positions");
+  }
+
+  return channel_mask;
+}
+
+
+#define MAKE_FUNC(type) \
+static void interleave_##type (guint##type *out, guint##type *in, \
+    guint stride, guint nframes) \
+{ \
+  gint i; \
+  \
+  for (i = 0; i < nframes; i++) { \
+    *out = in[i]; \
+    out += stride; \
+  } \
+}
+
+MAKE_FUNC (8);
+MAKE_FUNC (16);
+MAKE_FUNC (32);
+MAKE_FUNC (64);
+
+static void
+interleave_24 (guint8 * out, guint8 * in, guint stride, guint nframes)
+{
+  gint i;
+
+  for (i = 0; i < nframes; i++) {
+    memcpy (out, in, 3);
+    out += stride * 3;
+    in += 3;
+  }
+}
+
+static void
+gst_audio_interleave_set_process_function (GstAudioInterleave * self,
+    GstAudioInfo * info)
+{
+  switch (GST_AUDIO_INFO_WIDTH (info)) {
+    case 8:
+      self->func = (GstInterleaveFunc) interleave_8;
+      break;
+    case 16:
+      self->func = (GstInterleaveFunc) interleave_16;
+      break;
+    case 24:
+      self->func = (GstInterleaveFunc) interleave_24;
+      break;
+    case 32:
+      self->func = (GstInterleaveFunc) interleave_32;
+      break;
+    case 64:
+      self->func = (GstInterleaveFunc) interleave_64;
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+}
+
+
+/* the first caps we receive on any of the sinkpads will define the caps for all
+ * the other sinkpads because we can only mix streams with the same caps.
+ */
+static gboolean
+gst_audio_interleave_setcaps (GstAudioInterleave * self, GstPad * pad,
+    GstCaps * caps)
+{
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (self);
+  GstAudioInfo info;
+  GValue *val;
+  guint channel;
+  gboolean new = FALSE;
+
+  if (!gst_audio_info_from_caps (&info, caps))
+    goto invalid_format;
+
+  GST_OBJECT_LOCK (self);
+  if (self->sinkcaps && !gst_caps_is_subset (caps, self->sinkcaps))
+    goto cannot_change_caps;
+
+  if (!self->sinkcaps) {
+    GstCaps *sinkcaps = gst_caps_copy (caps);
+    GstStructure *s = gst_caps_get_structure (sinkcaps, 0);
+
+    gst_structure_remove_field (s, "channel-mask");
+
+    GST_DEBUG_OBJECT (self, "setting sinkcaps %" GST_PTR_FORMAT, sinkcaps);
+
+    gst_caps_replace (&self->sinkcaps, sinkcaps);
+
+    gst_caps_unref (sinkcaps);
+    new = TRUE;
+    self->new_caps = TRUE;
+  }
+
+  if (self->channel_positions_from_input
+      && GST_AUDIO_INFO_CHANNELS (&info) == 1) {
+    channel = GST_AUDIO_INTERLEAVE_PAD (pad)->channel;
+    val = g_value_array_get_nth (self->input_channel_positions, channel);
+    g_value_set_enum (val, GST_AUDIO_INFO_POSITION (&info, 0));
+  }
+  GST_OBJECT_UNLOCK (self);
+
+  gst_audio_aggregator_set_sink_caps (aagg, GST_AUDIO_AGGREGATOR_PAD (pad),
+      caps);
+
+  if (!new)
+    return TRUE;
+
+  GST_INFO_OBJECT (pad, "handle caps change to %" GST_PTR_FORMAT, caps);
+
+  return TRUE;
+
+  /* ERRORS */
+invalid_format:
+  {
+    GST_WARNING_OBJECT (self, "invalid format set as caps: %" GST_PTR_FORMAT,
+        caps);
+    return FALSE;
+  }
+cannot_change_caps:
+  {
+    GST_OBJECT_UNLOCK (self);
+    GST_WARNING_OBJECT (self, "caps of %" GST_PTR_FORMAT " already set, can't "
+        "change", self->sinkcaps);
+    return FALSE;
+  }
+}
+
+static gboolean
+gst_audio_interleave_sink_event (GstAggregator * agg, GstAggregatorPad * aggpad,
+    GstEvent * event)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (agg);
+  gboolean res = TRUE;
+
+  GST_DEBUG_OBJECT (aggpad, "Got %s event on sink pad",
+      GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:
+    {
+      GstCaps *caps;
+
+      gst_event_parse_caps (event, &caps);
+      res = gst_audio_interleave_setcaps (self, GST_PAD_CAST (aggpad), caps);
+      gst_event_unref (event);
+      event = NULL;
+      break;
+    }
+    default:
+      break;
+  }
+
+  if (event != NULL)
+    return GST_AGGREGATOR_CLASS (parent_class)->sink_event (agg, aggpad, event);
+
+  return res;
+}
+
+static GstFlowReturn
+gst_audio_interleave_aggregate (GstAggregator * aggregator, gboolean timeout)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (aggregator);
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (aggregator);
+
+  GST_OBJECT_LOCK (aggregator);
+  if (self->new_caps) {
+    GstCaps *srccaps;
+    GstStructure *s;
+    gboolean ret;
+
+    if (self->sinkcaps == NULL || self->channels == 0) {
+      /* In this case, let the base class handle it */
+      goto not_negotiated;
+    }
+
+    srccaps = gst_caps_copy (self->sinkcaps);
+    s = gst_caps_get_structure (srccaps, 0);
+
+    gst_structure_set (s, "channels", G_TYPE_INT, self->channels, "layout",
+        G_TYPE_STRING, "interleaved", "channel-mask", GST_TYPE_BITMASK,
+        gst_audio_interleave_get_channel_mask (self), NULL);
+
+
+    GST_OBJECT_UNLOCK (aggregator);
+    ret = gst_audio_aggregator_set_src_caps (aagg, srccaps);
+    gst_caps_unref (srccaps);
+
+    if (!ret)
+      goto src_did_not_accept;
+
+    GST_OBJECT_LOCK (aggregator);
+
+    gst_audio_interleave_set_process_function (self, &aagg->info);
+
+    self->new_caps = FALSE;
+  }
+
+not_negotiated:
+  GST_OBJECT_UNLOCK (aggregator);
+
+  return GST_AGGREGATOR_CLASS (parent_class)->aggregate (aggregator, timeout);
+
+src_did_not_accept:
+  GST_WARNING_OBJECT (self, "src did not accept setcaps()");
+  return GST_FLOW_NOT_NEGOTIATED;;
+}
+
+static void
+gst_audio_interleave_class_init (GstAudioInterleaveClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *gstelement_class = (GstElementClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+  GstAudioAggregatorClass *aagg_class = (GstAudioAggregatorClass *) klass;
+
+  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "audiointerleave", 0,
+      "audio interleaving element");
+
+  gobject_class->set_property = gst_audio_interleave_set_property;
+  gobject_class->get_property = gst_audio_interleave_get_property;
+  gobject_class->finalize = gst_audio_interleave_finalize;
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_audio_interleave_src_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_audio_interleave_sink_template));
+  gst_element_class_set_static_metadata (gstelement_class, "AudioInterleave",
+      "Generic/Audio",
+      "Mixes multiple audio streams",
+      "Olivier Crete <olivier.crete@collabora.com>");
+
+  gstelement_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_audio_interleave_request_new_pad);
+  gstelement_class->release_pad =
+      GST_DEBUG_FUNCPTR (gst_audio_interleave_release_pad);
+
+
+  agg_class->sinkpads_type = GST_TYPE_AUDIO_INTERLEAVE_PAD;
+
+  agg_class->sink_query = GST_DEBUG_FUNCPTR (gst_audio_interleave_sink_query);
+  agg_class->sink_event = GST_DEBUG_FUNCPTR (gst_audio_interleave_sink_event);
+  agg_class->stop = gst_audio_interleave_stop;
+  agg_class->aggregate = gst_audio_interleave_aggregate;
+
+  aagg_class->aggregate_one_buffer = gst_audio_interleave_aggregate_one_buffer;
+
+
+  /**
+   * GstInterleave:channel-positions
+   * 
+   * Channel positions: This property controls the channel positions
+   * that are used on the src caps. The number of elements should be
+   * the same as the number of sink pads and the array should contain
+   * a valid list of channel positions. The n-th element of the array
+   * is the position of the n-th sink pad.
+   *
+   * These channel positions will only be used if they're valid and the
+   * number of elements is the same as the number of channels. If this
+   * is not given a NONE layout will be used.
+   *
+   */
+  g_object_class_install_property (gobject_class, PROP_CHANNEL_POSITIONS,
+      g_param_spec_value_array ("channel-positions", "Channel positions",
+          "Channel positions used on the output",
+          g_param_spec_enum ("channel-position", "Channel position",
+              "Channel position of the n-th input",
+              GST_TYPE_AUDIO_CHANNEL_POSITION,
+              GST_AUDIO_CHANNEL_POSITION_NONE,
+              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstInterleave:channel-positions-from-input
+   * 
+   * Channel positions from input: If this property is set to %TRUE the channel
+   * positions will be taken from the input caps if valid channel positions for
+   * the output can be constructed from them. If this is set to %TRUE setting the
+   * channel-positions property overwrites this property again.
+   *
+   */
+  g_object_class_install_property (gobject_class,
+      PROP_CHANNEL_POSITIONS_FROM_INPUT,
+      g_param_spec_boolean ("channel-positions-from-input",
+          "Channel positions from input",
+          "Take channel positions from the input", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_audio_interleave_init (GstAudioInterleave * self)
+{
+  self->input_channel_positions = g_value_array_new (0);
+  self->channel_positions_from_input = TRUE;
+  self->channel_positions = self->input_channel_positions;
+}
+
+static void
+gst_audio_interleave_finalize (GObject * object)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (object);
+
+  if (self->channel_positions
+      && self->channel_positions != self->input_channel_positions) {
+    g_value_array_free (self->channel_positions);
+    self->channel_positions = NULL;
+  }
+
+  if (self->input_channel_positions) {
+    g_value_array_free (self->input_channel_positions);
+    self->input_channel_positions = NULL;
+  }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_audio_interleave_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (object);
+
+  switch (prop_id) {
+    case PROP_CHANNEL_POSITIONS:
+      g_return_if_fail (
+          ((GValueArray *) g_value_get_boxed (value))->n_values > 0);
+
+      if (self->channel_positions &&
+          self->channel_positions != self->input_channel_positions)
+        g_value_array_free (self->channel_positions);
+
+      self->channel_positions = g_value_dup_boxed (value);
+      self->channel_positions_from_input = FALSE;
+      break;
+    case PROP_CHANNEL_POSITIONS_FROM_INPUT:
+      self->channel_positions_from_input = g_value_get_boolean (value);
+
+      if (self->channel_positions_from_input) {
+        if (self->channel_positions &&
+            self->channel_positions != self->input_channel_positions)
+          g_value_array_free (self->channel_positions);
+        self->channel_positions = self->input_channel_positions;
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_audio_interleave_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (object);
+
+  switch (prop_id) {
+    case PROP_CHANNEL_POSITIONS:
+      g_value_set_boxed (value, self->channel_positions);
+      break;
+    case PROP_CHANNEL_POSITIONS_FROM_INPUT:
+      g_value_set_boolean (value, self->channel_positions_from_input);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_audio_interleave_stop (GstAggregator * agg)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (agg);
+
+  if (!GST_AGGREGATOR_CLASS (parent_class)->stop (agg))
+    return FALSE;
+
+  self->new_caps = FALSE;
+  gst_caps_replace (&self->sinkcaps, NULL);
+
+  return TRUE;
+}
+
+static GstPad *
+gst_audio_interleave_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (element);
+  GstAudioInterleavePad *newpad;
+  gchar *pad_name;
+  gint channel, padnumber;
+  GValue val = { 0, };
+
+  /* FIXME: We ignore req_name, this is evil! */
+
+  padnumber = g_atomic_int_add (&self->padcounter, 1);
+  channel = g_atomic_int_add (&self->channels, 1);
+  if (!self->channel_positions_from_input)
+    channel = padnumber;
+
+  pad_name = g_strdup_printf ("sink_%u", padnumber);
+  newpad = (GstAudioInterleavePad *)
+      GST_ELEMENT_CLASS (parent_class)->request_new_pad (element,
+      templ, pad_name, caps);
+  g_free (pad_name);
+  if (newpad == NULL)
+    goto could_not_create;
+
+  newpad->channel = channel;
+  gst_pad_use_fixed_caps (GST_PAD (newpad));
+
+  gst_child_proxy_child_added (GST_CHILD_PROXY (element), G_OBJECT (newpad),
+      GST_OBJECT_NAME (newpad));
+
+
+  g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION);
+  g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_NONE);
+  self->input_channel_positions =
+      g_value_array_append (self->input_channel_positions, &val);
+  g_value_unset (&val);
+
+  /* Update the src caps if we already have them */
+  GST_OBJECT_LOCK (self);
+  self->new_caps = TRUE;
+  GST_OBJECT_UNLOCK (self);
+
+  return GST_PAD_CAST (newpad);
+
+could_not_create:
+  {
+    GST_DEBUG_OBJECT (element, "could not create/add  pad");
+    return NULL;
+  }
+}
+
+static void
+gst_audio_interleave_release_pad (GstElement * element, GstPad * pad)
+{
+  GstAudioInterleave *self;
+  gint position;
+  GList *l;
+
+  self = GST_AUDIO_INTERLEAVE (element);
+
+  /* Take lock to make sure we're not changing this when processing buffers */
+  GST_OBJECT_LOCK (self);
+
+  g_atomic_int_add (&self->channels, -1);
+
+  position = GST_AUDIO_INTERLEAVE_PAD (pad)->channel;
+  g_value_array_remove (self->input_channel_positions, position);
+
+  /* Update channel numbers */
+  /* Taken above, GST_OBJECT_LOCK (self); */
+  for (l = GST_ELEMENT_CAST (self)->sinkpads; l != NULL; l = l->next) {
+    GstAudioInterleavePad *ipad = GST_AUDIO_INTERLEAVE_PAD (l->data);
+
+    if (GST_AUDIO_INTERLEAVE_PAD (pad)->channel < ipad->channel)
+      ipad->channel--;
+  }
+
+  self->new_caps = TRUE;
+  GST_OBJECT_UNLOCK (self);
+
+
+  GST_DEBUG_OBJECT (self, "release pad %s:%s", GST_DEBUG_PAD_NAME (pad));
+
+  gst_child_proxy_child_removed (GST_CHILD_PROXY (self), G_OBJECT (pad),
+      GST_OBJECT_NAME (pad));
+
+  GST_ELEMENT_CLASS (parent_class)->release_pad (element, pad);
+}
+
+
+/* Called with object lock and pad object lock held */
+static gboolean
+gst_audio_interleave_aggregate_one_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * aaggpad, GstBuffer * inbuf, guint in_offset,
+    GstBuffer * outbuf, guint out_offset, guint num_frames)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (aagg);
+  GstAudioInterleavePad *pad = GST_AUDIO_INTERLEAVE_PAD (aaggpad);
+  GstMapInfo inmap;
+  GstMapInfo outmap;
+  gint out_width, in_bpf, out_bpf, out_channels;
+  guint8 *outdata;
+
+  out_width = GST_AUDIO_INFO_WIDTH (&aagg->info) / 8;
+  in_bpf = GST_AUDIO_INFO_BPF (&aaggpad->info);
+  out_bpf = GST_AUDIO_INFO_BPF (&aagg->info);
+  out_channels = GST_AUDIO_INFO_CHANNELS (&aagg->info);
+
+  gst_buffer_map (outbuf, &outmap, GST_MAP_READWRITE);
+  gst_buffer_map (inbuf, &inmap, GST_MAP_READ);
+  GST_LOG_OBJECT (pad, "interleaves %u frames on channel %d/%d at offset %u"
+      " from offset %u", num_frames, pad->channel, out_channels,
+      out_offset * out_bpf, in_offset * in_bpf);
+
+  outdata = outmap.data + (out_offset * out_bpf) +
+      (out_width * self->default_channels_ordering_map[pad->channel]);
+
+
+  self->func (outdata, inmap.data + (in_offset * in_bpf), out_channels,
+      num_frames);
+
+
+  gst_buffer_unmap (inbuf, &inmap);
+  gst_buffer_unmap (outbuf, &outmap);
+
+  return TRUE;
+}
+
+
+/* GstChildProxy implementation */
+static GObject *
+gst_audio_interleave_child_proxy_get_child_by_index (GstChildProxy *
+    child_proxy, guint index)
+{
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (child_proxy);
+  GObject *obj = NULL;
+
+  GST_OBJECT_LOCK (self);
+  obj = g_list_nth_data (GST_ELEMENT_CAST (self)->sinkpads, index);
+  if (obj)
+    gst_object_ref (obj);
+  GST_OBJECT_UNLOCK (self);
+
+  return obj;
+}
+
+static guint
+gst_audio_interleave_child_proxy_get_children_count (GstChildProxy *
+    child_proxy)
+{
+  guint count = 0;
+  GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (child_proxy);
+
+  GST_OBJECT_LOCK (self);
+  count = GST_ELEMENT_CAST (self)->numsinkpads;
+  GST_OBJECT_UNLOCK (self);
+  GST_INFO_OBJECT (self, "Children Count: %d", count);
+
+  return count;
+}
+
+static void
+gst_audio_interleave_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_audio_interleave_child_proxy_get_child_by_index;
+  iface->get_children_count =
+      gst_audio_interleave_child_proxy_get_children_count;
+}
diff --git a/gst/audiomixer/gstaudiointerleave.h b/gst/audiomixer/gstaudiointerleave.h
new file mode 100644
index 0000000..0473b45
--- /dev/null
+++ b/gst/audiomixer/gstaudiointerleave.h
@@ -0,0 +1,101 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *                    2000 Wim Taymans <wtay@chello.be>
+ * Copyright (C) 2013      Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * gstaudiointerleave.h: Header for audiointerleave element
+ *
+ * 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_AUDIO_INTERLEAVE_H__
+#define __GST_AUDIO_INTERLEAVE_H__
+
+#include <gst/gst.h>
+#include <gst/audio/audio.h>
+
+#include "gstaudioaggregator.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_AUDIO_INTERLEAVE            (gst_audio_interleave_get_type())
+#define GST_AUDIO_INTERLEAVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_INTERLEAVE,GstAudioInterleave))
+#define GST_IS_AUDIO_INTERLEAVE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_INTERLEAVE))
+#define GST_AUDIO_INTERLEAVE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_AUDIO_INTERLEAVE,GstAudioInterleaveClass))
+#define GST_IS_AUDIO_INTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_AUDIO_INTERLEAVE))
+#define GST_AUDIO_INTERLEAVE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_AUDIO_INTERLEAVE,GstAudioInterleaveClass))
+
+typedef struct _GstAudioInterleave             GstAudioInterleave;
+typedef struct _GstAudioInterleaveClass        GstAudioInterleaveClass;
+
+typedef struct _GstAudioInterleavePad GstAudioInterleavePad;
+typedef struct _GstAudioInterleavePadClass GstAudioInterleavePadClass;
+
+typedef void (*GstInterleaveFunc) (gpointer out, gpointer in, guint stride,
+    guint nframes);
+
+/**
+ * GstAudioInterleave:
+ *
+ * The GstAudioInterleave object structure.
+ */
+struct _GstAudioInterleave {
+  GstAudioAggregator parent;
+
+  gint padcounter;
+  guint channels;
+
+  gboolean new_caps;
+  GstCaps *sinkcaps;
+
+  GValueArray *channel_positions;
+  GValueArray *input_channel_positions;
+  gboolean channel_positions_from_input;
+
+  gint default_channels_ordering_map[64];
+
+  GstInterleaveFunc func;
+};
+
+struct _GstAudioInterleaveClass {
+  GstAudioAggregatorClass parent_class;
+};
+
+GType    gst_audio_interleave_get_type (void);
+
+#define GST_TYPE_AUDIO_INTERLEAVE_PAD            (gst_audio_interleave_pad_get_type())
+#define GST_AUDIO_INTERLEAVE_PAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_INTERLEAVE_PAD,GstAudioInterleavePad))
+#define GST_IS_AUDIO_INTERLEAVE_PAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_INTERLEAVE_PAD))
+#define GST_AUDIO_INTERLEAVE_PAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_AUDIO_INTERLEAVE_PAD,GstAudioInterleavePadClass))
+#define GST_IS_AUDIO_INTERLEAVE_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_AUDIO_INTERLEAVE_PAD))
+#define GST_AUDIO_INTERLEAVE_PAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_AUDIO_INTERLEAVE_PAD,GstAudioInterleavePadClass))
+
+struct _GstAudioInterleavePad {
+  GstAudioAggregatorPad parent;
+
+  guint channel;
+};
+
+struct _GstAudioInterleavePadClass {
+  GstAudioAggregatorPadClass parent_class;
+};
+
+GType gst_audio_interleave_pad_get_type (void);
+
+G_END_DECLS
+
+
+#endif /* __GST_AUDIO_INTERLEAVE_H__ */
diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c
index 4202f00..3966a8f 100644
--- a/gst/audiomixer/gstaudiomixer.c
+++ b/gst/audiomixer/gstaudiomixer.c
@@ -27,8 +27,19 @@
  * The audiomixer allows to mix several streams into one by adding the data.
  * Mixed data is clamped to the min/max values of the data format.
  *
- * The audiomixer currently mixes all data received on the sinkpads as soon as
- * possible without trying to synchronize the streams.
+ * Unlike the adder element audiomixer properly synchronises all input streams.
+ *
+ * The input pads are from a GstPad subclass and have additional
+ * properties to mute each pad individually and set the volume:
+ *
+ * <itemizedlist>
+ * <listitem>
+ * "mute": Whether to mute the pad or not (#gboolean)
+ * </listitem>
+ * <listitem>
+ * "volume": The volume of the pad, between 0.0 and 10.0 (#gdouble)
+ * </listitem>
+ * </itemizedlist>
  *
  * <refsect2>
  * <title>Example launch line</title>
@@ -48,27 +59,11 @@
 #include <string.h>             /* strcmp */
 #include "gstaudiomixerorc.h"
 
+#include "gstaudiointerleave.h"
+
 #define GST_CAT_DEFAULT gst_audiomixer_debug
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
 
-typedef struct _GstAudioMixerCollect GstAudioMixerCollect;
-struct _GstAudioMixerCollect
-{
-  GstCollectData collect;       /* we extend the CollectData */
-
-  GstBuffer *buffer;            /* current buffer we're mixing,
-                                   for comparison with collect.buffer
-                                   to see if we need to update our
-                                   cached values. */
-  guint position, size;
-
-  guint64 output_offset;        /* Offset in output segment that
-                                   collect.pos refers to in the
-                                   current buffer. */
-
-  guint64 next_offset;          /* Next expected offset in the input segment */
-};
-
 #define DEFAULT_PAD_VOLUME (1.0)
 #define DEFAULT_PAD_MUTE (FALSE)
 
@@ -92,7 +87,8 @@
   PROP_PAD_MUTE
 };
 
-G_DEFINE_TYPE (GstAudioMixerPad, gst_audiomixer_pad, GST_TYPE_PAD);
+G_DEFINE_TYPE (GstAudioMixerPad, gst_audiomixer_pad,
+    GST_TYPE_AUDIO_AGGREGATOR_PAD);
 
 static void
 gst_audiomixer_pad_get_property (GObject * object, guint prop_id,
@@ -164,17 +160,10 @@
   pad->mute = DEFAULT_PAD_MUTE;
 }
 
-#define DEFAULT_ALIGNMENT_THRESHOLD   (40 * GST_MSECOND)
-#define DEFAULT_DISCONT_WAIT (1 * GST_SECOND)
-#define DEFAULT_BLOCKSIZE (1024)
-
 enum
 {
   PROP_0,
-  PROP_FILTER_CAPS,
-  PROP_ALIGNMENT_THRESHOLD,
-  PROP_DISCONT_WAIT,
-  PROP_BLOCKSIZE
+  PROP_FILTER_CAPS
 };
 
 /* elementfactory information */
@@ -207,8 +196,8 @@
     gpointer iface_data);
 
 #define gst_audiomixer_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstAudioMixer, gst_audiomixer, GST_TYPE_ELEMENT,
-    G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
+G_DEFINE_TYPE_WITH_CODE (GstAudioMixer, gst_audiomixer,
+    GST_TYPE_AUDIO_AGGREGATOR, G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
         gst_audiomixer_child_proxy_init));
 
 static void gst_audiomixer_dispose (GObject * object);
@@ -219,40 +208,31 @@
 
 static gboolean gst_audiomixer_setcaps (GstAudioMixer * audiomixer,
     GstPad * pad, GstCaps * caps);
-static gboolean gst_audiomixer_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query);
-static gboolean gst_audiomixer_sink_query (GstCollectPads * pads,
-    GstCollectData * pad, GstQuery * query, gpointer user_data);
-static gboolean gst_audiomixer_src_event (GstPad * pad, GstObject * parent,
-    GstEvent * event);
-static gboolean gst_audiomixer_sink_event (GstCollectPads * pads,
-    GstCollectData * pad, GstEvent * event, gpointer user_data);
-
 static GstPad *gst_audiomixer_request_new_pad (GstElement * element,
-    GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
+    GstPadTemplate * temp, const gchar * req_name, const GstCaps * caps);
 static void gst_audiomixer_release_pad (GstElement * element, GstPad * pad);
 
-static GstStateChangeReturn gst_audiomixer_change_state (GstElement * element,
-    GstStateChange transition);
+static gboolean
+gst_audiomixer_aggregate_one_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * aaggpad, GstBuffer * inbuf, guint in_offset,
+    GstBuffer * outbuf, guint out_offset, guint num_samples);
 
-static GstFlowReturn gst_audiomixer_do_clip (GstCollectPads * pads,
-    GstCollectData * data, GstBuffer * buffer, GstBuffer ** out,
-    gpointer user_data);
-static GstFlowReturn gst_audiomixer_collected (GstCollectPads * pads,
-    gpointer user_data);
 
 /* we can only accept caps that we and downstream can handle.
  * if we have filtercaps set, use those to constrain the target caps.
  */
 static GstCaps *
-gst_audiomixer_sink_getcaps (GstPad * pad, GstCaps * filter)
+gst_audiomixer_sink_getcaps (GstAggregator * agg, GstPad * pad,
+    GstCaps * filter)
 {
+  GstAudioAggregator *aagg;
   GstAudioMixer *audiomixer;
   GstCaps *result, *peercaps, *current_caps, *filter_caps;
   GstStructure *s;
   gint i, n;
 
-  audiomixer = GST_AUDIO_MIXER (GST_PAD_PARENT (pad));
+  audiomixer = GST_AUDIO_MIXER (agg);
+  aagg = GST_AUDIO_AGGREGATOR (agg);
 
   GST_OBJECT_LOCK (audiomixer);
   /* take filter */
@@ -274,12 +254,11 @@
   }
 
   /* get the downstream possible caps */
-  peercaps = gst_pad_peer_query_caps (audiomixer->srcpad, filter_caps);
+  peercaps = gst_pad_peer_query_caps (agg->srcpad, filter_caps);
 
   /* get the allowed caps on this sinkpad */
   GST_OBJECT_LOCK (audiomixer);
-  current_caps =
-      audiomixer->current_caps ? gst_caps_ref (audiomixer->current_caps) : NULL;
+  current_caps = aagg->current_caps ? gst_caps_ref (aagg->current_caps) : NULL;
   if (current_caps == NULL) {
     current_caps = gst_pad_get_pad_template_caps (pad);
     if (!current_caps)
@@ -337,8 +316,8 @@
 }
 
 static gboolean
-gst_audiomixer_sink_query (GstCollectPads * pads, GstCollectData * pad,
-    GstQuery * query, gpointer user_data)
+gst_audiomixer_sink_query (GstAggregator * agg, GstAggregatorPad * aggpad,
+    GstQuery * query)
 {
   gboolean res = FALSE;
 
@@ -348,14 +327,15 @@
       GstCaps *filter, *caps;
 
       gst_query_parse_caps (query, &filter);
-      caps = gst_audiomixer_sink_getcaps (pad->pad, filter);
+      caps = gst_audiomixer_sink_getcaps (agg, GST_PAD (aggpad), filter);
       gst_query_set_caps_result (query, caps);
       gst_caps_unref (caps);
       res = TRUE;
       break;
     }
     default:
-      res = gst_collect_pads_query_default (pads, pad, query, FALSE);
+      res =
+          GST_AGGREGATOR_CLASS (parent_class)->sink_query (agg, aggpad, query);
       break;
   }
 
@@ -369,10 +349,13 @@
 gst_audiomixer_setcaps (GstAudioMixer * audiomixer, GstPad * pad,
     GstCaps * orig_caps)
 {
+  GstAggregator *agg = GST_AGGREGATOR (audiomixer);
+  GstAudioAggregator *aagg = GST_AUDIO_AGGREGATOR (audiomixer);
   GstCaps *caps;
   GstAudioInfo info;
   GstStructure *s;
-  gint channels;
+  gint channels = 0;
+  gboolean ret;
 
   caps = gst_caps_copy (orig_caps);
 
@@ -384,39 +367,65 @@
   if (!gst_audio_info_from_caps (&info, caps))
     goto invalid_format;
 
+  if (channels == 1) {
+    GstCaps *filter;
+    GstCaps *downstream_caps;
+
+    if (audiomixer->filter_caps)
+      filter = gst_caps_intersect_full (caps, audiomixer->filter_caps,
+          GST_CAPS_INTERSECT_FIRST);
+    else
+      filter = gst_caps_ref (caps);
+
+    downstream_caps = gst_pad_peer_query_caps (agg->srcpad, filter);
+    gst_caps_unref (filter);
+
+    if (downstream_caps) {
+      gst_caps_unref (caps);
+      caps = downstream_caps;
+
+      if (gst_caps_is_empty (caps)) {
+        gst_caps_unref (caps);
+        return FALSE;
+      }
+      caps = gst_caps_fixate (caps);
+    }
+  }
+
   GST_OBJECT_LOCK (audiomixer);
   /* don't allow reconfiguration for now; there's still a race between the
    * different upstream threads doing query_caps + accept_caps + sending
    * (possibly different) CAPS events, but there's not much we can do about
    * that, upstream needs to deal with it. */
-  if (audiomixer->current_caps != NULL) {
-    if (gst_audio_info_is_equal (&info, &audiomixer->info)) {
+  if (aagg->current_caps != NULL) {
+    if (gst_audio_info_is_equal (&info, &aagg->info)) {
       GST_OBJECT_UNLOCK (audiomixer);
       gst_caps_unref (caps);
+      gst_audio_aggregator_set_sink_caps (aagg, GST_AUDIO_AGGREGATOR_PAD (pad),
+          orig_caps);
       return TRUE;
     } else {
       GST_DEBUG_OBJECT (pad, "got input caps %" GST_PTR_FORMAT ", but "
-          "current caps are %" GST_PTR_FORMAT, caps, audiomixer->current_caps);
+          "current caps are %" GST_PTR_FORMAT, caps, aagg->current_caps);
       GST_OBJECT_UNLOCK (audiomixer);
       gst_pad_push_event (pad, gst_event_new_reconfigure ());
       gst_caps_unref (caps);
       return FALSE;
     }
   }
-
-  GST_INFO_OBJECT (pad, "setting caps to %" GST_PTR_FORMAT, caps);
-  gst_caps_replace (&audiomixer->current_caps, caps);
-
-  memcpy (&audiomixer->info, &info, sizeof (info));
-  audiomixer->send_caps = TRUE;
   GST_OBJECT_UNLOCK (audiomixer);
-  /* send caps event later, after stream-start event */
+
+  ret = gst_audio_aggregator_set_src_caps (aagg, caps);
+
+  if (ret)
+    gst_audio_aggregator_set_sink_caps (aagg, GST_AUDIO_AGGREGATOR_PAD (pad),
+        orig_caps);
 
   GST_INFO_OBJECT (pad, "handle caps change to %" GST_PTR_FORMAT, caps);
 
   gst_caps_unref (caps);
 
-  return TRUE;
+  return ret;
 
   /* ERRORS */
 invalid_format:
@@ -427,465 +436,14 @@
   }
 }
 
-/* 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 mixing 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 mixing so this really depends on where the
- * streams where punched in and what their relative offsets are against
- * eachother 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_audiomixer_query_duration (GstAudioMixer * audiomixer, GstQuery * query)
+gst_audiomixer_sink_event (GstAggregator * agg, GstAggregatorPad * aggpad,
+    GstEvent * event)
 {
-  gint64 max;
-  gboolean res;
-  GstFormat format;
-  GstIterator *it;
-  gboolean done;
-  GValue item = { 0, };
+  GstAudioMixer *audiomixer = GST_AUDIO_MIXER (agg);
+  gboolean res = TRUE;
 
-  /* parse format */
-  gst_query_parse_duration (query, &format, NULL);
-
-  max = -1;
-  res = TRUE;
-  done = FALSE;
-
-  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (audiomixer));
-  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 = g_value_get_object (&item);
-        gint64 duration;
-
-        /* 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 (audiomixer, "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_audiomixer_query_latency (GstAudioMixer * audiomixer, 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 (audiomixer));
-  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 = 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 (audiomixer, "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_audiomixer_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
-{
-  GstAudioMixer *audiomixer = GST_AUDIO_MIXER (parent);
-  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:
-          /* FIXME, bring to stream time, might be tricky */
-          gst_query_set_position (query, format, audiomixer->segment.position);
-          res = TRUE;
-          break;
-        case GST_FORMAT_DEFAULT:
-          gst_query_set_position (query, format, audiomixer->offset);
-          res = TRUE;
-          break;
-        default:
-          break;
-      }
-      break;
-    }
-    case GST_QUERY_DURATION:
-      res = gst_audiomixer_query_duration (audiomixer, query);
-      break;
-    case GST_QUERY_LATENCY:
-      res = gst_audiomixer_query_latency (audiomixer, query);
-      break;
-    default:
-      /* FIXME, needs a custom query handler because we have multiple
-       * sinkpads */
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-
-  return res;
-}
-
-/* event handling */
-
-typedef struct
-{
-  GstEvent *event;
-  gboolean flush;
-} EventData;
-
-/* FIXME: What is this supposed to solve? */
-static gboolean
-forward_event_func (const GValue * val, GValue * ret, EventData * data)
-{
-  GstPad *pad = g_value_get_object (val);
-  GstEvent *event = data->event;
-  GstPad *peer;
-
-  gst_event_ref (event);
-  GST_LOG_OBJECT (pad, "About to send event %s", GST_EVENT_TYPE_NAME (event));
-  peer = gst_pad_get_peer (pad);
-  /* collect pad might have been set flushing,
-   * so bypass core checking that and send directly to peer */
-  if (!peer || !gst_pad_send_event (peer, event)) {
-    if (!peer)
-      gst_event_unref (event);
-    GST_WARNING_OBJECT (pad, "Sending event  %p (%s) failed.",
-        event, GST_EVENT_TYPE_NAME (event));
-    /* quick hack to unflush the pads, ideally we need a way to just unflush
-     * this single collect pad */
-    if (data->flush)
-      gst_pad_send_event (pad, gst_event_new_flush_stop (TRUE));
-  } else {
-    g_value_set_boolean (ret, TRUE);
-    GST_LOG_OBJECT (pad, "Sent event  %p (%s).",
-        event, GST_EVENT_TYPE_NAME (event));
-  }
-  if (peer)
-    gst_object_unref (peer);
-
-  /* continue on other pads, even if one failed */
-  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
-forward_event (GstAudioMixer * audiomixer, GstEvent * event, gboolean flush)
-{
-  gboolean ret;
-  GstIterator *it;
-  GstIteratorResult ires;
-  GValue vret = { 0 };
-  EventData data;
-
-  GST_LOG_OBJECT (audiomixer, "Forwarding event %p (%s)", event,
-      GST_EVENT_TYPE_NAME (event));
-
-  data.event = event;
-  data.flush = flush;
-
-  g_value_init (&vret, G_TYPE_BOOLEAN);
-  g_value_set_boolean (&vret, FALSE);
-  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (audiomixer));
-  while (TRUE) {
-    ires =
-        gst_iterator_fold (it, (GstIteratorFoldFunction) forward_event_func,
-        &vret, &data);
-    switch (ires) {
-      case GST_ITERATOR_RESYNC:
-        GST_WARNING ("resync");
-        gst_iterator_resync (it);
-        g_value_set_boolean (&vret, TRUE);
-        break;
-      case GST_ITERATOR_OK:
-      case GST_ITERATOR_DONE:
-        ret = g_value_get_boolean (&vret);
-        goto done;
-      default:
-        ret = FALSE;
-        goto done;
-    }
-  }
-done:
-  gst_iterator_free (it);
-  GST_LOG_OBJECT (audiomixer, "Forwarded event %p (%s), ret=%d", event,
-      GST_EVENT_TYPE_NAME (event), ret);
-  gst_event_unref (event);
-
-  return ret;
-}
-
-static gboolean
-gst_audiomixer_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstAudioMixer *audiomixer;
-  gboolean result;
-
-  audiomixer = GST_AUDIO_MIXER (parent);
-
-  GST_DEBUG_OBJECT (pad, "Got %s event on src pad",
-      GST_EVENT_TYPE_NAME (event));
-
-  switch (GST_EVENT_TYPE (event)) {
-      /* TODO: Update from videomixer */
-    case GST_EVENT_SEEK:
-    {
-      GstSeekFlags flags;
-      gdouble rate;
-      GstSeekType start_type, stop_type;
-      gint64 start, stop;
-      GstFormat seek_format, dest_format;
-      gboolean flush;
-
-      /* parse the seek parameters */
-      gst_event_parse_seek (event, &rate, &seek_format, &flags, &start_type,
-          &start, &stop_type, &stop);
-
-      if ((start_type != GST_SEEK_TYPE_NONE)
-          && (start_type != GST_SEEK_TYPE_SET)) {
-        result = FALSE;
-        GST_DEBUG_OBJECT (audiomixer,
-            "seeking failed, unhandled seek type for start: %d", start_type);
-        goto done;
-      }
-      if ((stop_type != GST_SEEK_TYPE_NONE) && (stop_type != GST_SEEK_TYPE_SET)) {
-        result = FALSE;
-        GST_DEBUG_OBJECT (audiomixer,
-            "seeking failed, unhandled seek type for end: %d", stop_type);
-        goto done;
-      }
-
-      dest_format = audiomixer->segment.format;
-      if (seek_format != dest_format) {
-        result = FALSE;
-        GST_DEBUG_OBJECT (audiomixer,
-            "seeking failed, unhandled seek format: %d", seek_format);
-        goto done;
-      }
-
-      flush = (flags & GST_SEEK_FLAG_FLUSH) == GST_SEEK_FLAG_FLUSH;
-
-      /* check if we are flushing */
-      if (flush) {
-        /* flushing seek, start flush downstream, the flush will be done
-         * when all pads received a FLUSH_STOP.
-         * Make sure we accept nothing anymore and return WRONG_STATE.
-         * We send a flush-start before, to ensure no streaming is done
-         * as we need to take the stream lock.
-         */
-        gst_pad_push_event (audiomixer->srcpad, gst_event_new_flush_start ());
-        gst_collect_pads_set_flushing (audiomixer->collect, TRUE);
-
-        /* We can't send FLUSH_STOP here since upstream could start pushing data
-         * after we unlock audiomixer->collect.
-         * We set flush_stop_pending to TRUE instead and send FLUSH_STOP after
-         * forwarding the seek upstream or from gst_audiomixer_collected,
-         * whichever happens first.
-         */
-        GST_COLLECT_PADS_STREAM_LOCK (audiomixer->collect);
-        audiomixer->flush_stop_pending = TRUE;
-        GST_COLLECT_PADS_STREAM_UNLOCK (audiomixer->collect);
-        GST_DEBUG_OBJECT (audiomixer, "mark pending flush stop event");
-      }
-      GST_DEBUG_OBJECT (audiomixer, "handling seek event: %" GST_PTR_FORMAT,
-          event);
-
-      /* now wait for the collected to be finished and mark a new
-       * segment. After we have the lock, no collect function is running and no
-       * new collect function will be called for as long as we're flushing. */
-      GST_COLLECT_PADS_STREAM_LOCK (audiomixer->collect);
-      /* clip position and update our segment */
-      if (audiomixer->segment.stop != -1) {
-        audiomixer->segment.position = audiomixer->segment.stop;
-      }
-      gst_segment_do_seek (&audiomixer->segment, rate, seek_format, flags,
-          start_type, start, stop_type, stop, NULL);
-
-      if (flush) {
-        /* Yes, we need to call _set_flushing again *WHEN* the streaming threads
-         * have stopped so that the cookie gets properly updated. */
-        gst_collect_pads_set_flushing (audiomixer->collect, TRUE);
-      }
-      GST_COLLECT_PADS_STREAM_UNLOCK (audiomixer->collect);
-      GST_DEBUG_OBJECT (audiomixer, "forwarding seek event: %" GST_PTR_FORMAT,
-          event);
-      GST_DEBUG_OBJECT (audiomixer, "updated segment: %" GST_SEGMENT_FORMAT,
-          &audiomixer->segment);
-
-      /* we're forwarding seek to all upstream peers and wait for one to reply
-       * with a newsegment-event before we send a newsegment-event downstream */
-      g_atomic_int_set (&audiomixer->segment_pending, TRUE);
-      result = forward_event (audiomixer, event, flush);
-      /* FIXME: We should use the seek segment and forward that downstream next time
-       * not any upstream segment event */
-      if (!result) {
-        /* seek failed. maybe source is a live source. */
-        GST_DEBUG_OBJECT (audiomixer, "seeking failed");
-      }
-      if (g_atomic_int_compare_and_exchange (&audiomixer->flush_stop_pending,
-              TRUE, FALSE)) {
-        GST_DEBUG_OBJECT (audiomixer, "pending flush stop");
-        if (!gst_pad_push_event (audiomixer->srcpad,
-                gst_event_new_flush_stop (TRUE))) {
-          GST_WARNING_OBJECT (audiomixer, "Sending flush stop event failed");
-        }
-      }
-      break;
-    }
-    case GST_EVENT_QOS:
-      /* QoS might be tricky */
-      result = FALSE;
-      gst_event_unref (event);
-      break;
-    case GST_EVENT_NAVIGATION:
-      /* navigation is rather pointless. */
-      result = FALSE;
-      gst_event_unref (event);
-      break;
-    default:
-      /* just forward the rest for now */
-      GST_DEBUG_OBJECT (audiomixer, "forward unhandled event: %s",
-          GST_EVENT_TYPE_NAME (event));
-      result = forward_event (audiomixer, event, FALSE);
-      break;
-  }
-
-done:
-
-  return result;
-}
-
-static gboolean
-gst_audiomixer_sink_event (GstCollectPads * pads, GstCollectData * pad,
-    GstEvent * event, gpointer user_data)
-{
-  GstAudioMixer *audiomixer = GST_AUDIO_MIXER (user_data);
-  GstAudioMixerCollect *adata = (GstAudioMixerCollect *) pad;
-  gboolean res = TRUE, discard = FALSE;
-
-  GST_DEBUG_OBJECT (pad->pad, "Got %s event on sink pad",
+  GST_DEBUG_OBJECT (aggpad, "Got %s event on sink pad",
       GST_EVENT_TYPE_NAME (event));
 
   switch (GST_EVENT_TYPE (event)) {
@@ -894,83 +452,19 @@
       GstCaps *caps;
 
       gst_event_parse_caps (event, &caps);
-      res = gst_audiomixer_setcaps (audiomixer, pad->pad, caps);
+      res = gst_audiomixer_setcaps (audiomixer, GST_PAD_CAST (aggpad), caps);
       gst_event_unref (event);
       event = NULL;
       break;
     }
-      /* FIXME: Who cares about flushes from upstream? We should
-       * not forward them at all */
-    case GST_EVENT_FLUSH_START:
-      /* ensure that we will send a flush stop */
-      GST_COLLECT_PADS_STREAM_LOCK (audiomixer->collect);
-      audiomixer->flush_stop_pending = TRUE;
-      res = gst_collect_pads_event_default (pads, pad, event, discard);
-      event = NULL;
-      GST_COLLECT_PADS_STREAM_UNLOCK (audiomixer->collect);
-      break;
-    case GST_EVENT_FLUSH_STOP:
-      /* we received a flush-stop. We will only forward it when
-       * flush_stop_pending is set, and we will unset it then.
-       */
-      g_atomic_int_set (&audiomixer->segment_pending, TRUE);
-      GST_COLLECT_PADS_STREAM_LOCK (audiomixer->collect);
-      if (audiomixer->flush_stop_pending) {
-        GST_DEBUG_OBJECT (pad->pad, "forwarding flush stop");
-        res = gst_collect_pads_event_default (pads, pad, event, discard);
-        audiomixer->flush_stop_pending = FALSE;
-        event = NULL;
-        gst_buffer_replace (&audiomixer->current_buffer, NULL);
-        audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-      } else {
-        discard = TRUE;
-        GST_DEBUG_OBJECT (pad->pad, "eating flush stop");
-      }
-      GST_COLLECT_PADS_STREAM_UNLOCK (audiomixer->collect);
-      /* Clear pending tags */
-      if (audiomixer->pending_events) {
-        g_list_foreach (audiomixer->pending_events, (GFunc) gst_event_unref,
-            NULL);
-        g_list_free (audiomixer->pending_events);
-        audiomixer->pending_events = NULL;
-      }
-      adata->position = adata->size = 0;
-      adata->output_offset = adata->next_offset = -1;
-      gst_buffer_replace (&adata->buffer, NULL);
-      break;
-    case GST_EVENT_TAG:
-      /* collect tags here so we can push them out when we collect data */
-      audiomixer->pending_events =
-          g_list_append (audiomixer->pending_events, event);
-      event = NULL;
-      break;
-    case GST_EVENT_SEGMENT:{
-      const GstSegment *segment;
-      gst_event_parse_segment (event, &segment);
-      if (segment->rate != audiomixer->segment.rate) {
-        GST_ERROR_OBJECT (pad->pad,
-            "Got segment event with wrong rate %lf, expected %lf",
-            segment->rate, audiomixer->segment.rate);
-        res = FALSE;
-        gst_event_unref (event);
-        event = NULL;
-      } else if (segment->rate < 0.0) {
-        GST_ERROR_OBJECT (pad->pad, "Negative rates not supported yet");
-        res = FALSE;
-        gst_event_unref (event);
-        event = NULL;
-      }
-      discard = TRUE;
-      break;
-    }
     default:
       break;
   }
 
-  if (G_LIKELY (event))
-    return gst_collect_pads_event_default (pads, pad, event, discard);
-  else
-    return res;
+  if (event != NULL)
+    return GST_AGGREGATOR_CLASS (parent_class)->sink_event (agg, aggpad, event);
+
+  return res;
 }
 
 static void
@@ -978,6 +472,8 @@
 {
   GObjectClass *gobject_class = (GObjectClass *) klass;
   GstElementClass *gstelement_class = (GstElementClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+  GstAudioAggregatorClass *aagg_class = (GstAudioAggregatorClass *) klass;
 
   gobject_class->set_property = gst_audiomixer_set_property;
   gobject_class->get_property = gst_audiomixer_get_property;
@@ -989,25 +485,6 @@
           "Setting this property takes a reference to the supplied GstCaps "
           "object", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, PROP_ALIGNMENT_THRESHOLD,
-      g_param_spec_uint64 ("alignment-threshold", "Alignment Threshold",
-          "Timestamp alignment threshold in nanoseconds", 0,
-          G_MAXUINT64 - 1, DEFAULT_ALIGNMENT_THRESHOLD,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_DISCONT_WAIT,
-      g_param_spec_uint64 ("discont-wait", "Discont Wait",
-          "Window of time in nanoseconds to wait before "
-          "creating a discontinuity", 0,
-          G_MAXUINT64 - 1, DEFAULT_DISCONT_WAIT,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_BLOCKSIZE,
-      g_param_spec_uint ("blocksize", "Block Size",
-          "Output block size in number of samples", 0,
-          G_MAXUINT, DEFAULT_BLOCKSIZE,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&gst_audiomixer_src_template));
   gst_element_class_add_pad_template (gstelement_class,
@@ -1021,45 +498,19 @@
       GST_DEBUG_FUNCPTR (gst_audiomixer_request_new_pad);
   gstelement_class->release_pad =
       GST_DEBUG_FUNCPTR (gst_audiomixer_release_pad);
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_audiomixer_change_state);
+
+  agg_class->sinkpads_type = GST_TYPE_AUDIO_MIXER_PAD;
+
+  agg_class->sink_query = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_query);
+  agg_class->sink_event = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_event);
+
+  aagg_class->aggregate_one_buffer = gst_audiomixer_aggregate_one_buffer;
 }
 
 static void
 gst_audiomixer_init (GstAudioMixer * audiomixer)
 {
-  GstPadTemplate *template;
-
-  template = gst_static_pad_template_get (&gst_audiomixer_src_template);
-  audiomixer->srcpad = gst_pad_new_from_template (template, "src");
-  gst_object_unref (template);
-
-  gst_pad_set_query_function (audiomixer->srcpad,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_src_query));
-  gst_pad_set_event_function (audiomixer->srcpad,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_src_event));
-  GST_PAD_SET_PROXY_CAPS (audiomixer->srcpad);
-  gst_element_add_pad (GST_ELEMENT (audiomixer), audiomixer->srcpad);
-
-  audiomixer->current_caps = NULL;
-  gst_audio_info_init (&audiomixer->info);
-  audiomixer->padcount = 0;
-
   audiomixer->filter_caps = NULL;
-  audiomixer->alignment_threshold = DEFAULT_ALIGNMENT_THRESHOLD;
-  audiomixer->discont_wait = DEFAULT_DISCONT_WAIT;
-  audiomixer->blocksize = DEFAULT_BLOCKSIZE;
-
-  /* keep track of the sinkpads requested */
-  audiomixer->collect = gst_collect_pads_new ();
-  gst_collect_pads_set_function (audiomixer->collect,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_collected), audiomixer);
-  gst_collect_pads_set_clip_function (audiomixer->collect,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_do_clip), audiomixer);
-  gst_collect_pads_set_event_function (audiomixer->collect,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_sink_event), audiomixer);
-  gst_collect_pads_set_query_function (audiomixer->collect,
-      GST_DEBUG_FUNCPTR (gst_audiomixer_sink_query), audiomixer);
 }
 
 static void
@@ -1067,18 +518,7 @@
 {
   GstAudioMixer *audiomixer = GST_AUDIO_MIXER (object);
 
-  if (audiomixer->collect) {
-    gst_object_unref (audiomixer->collect);
-    audiomixer->collect = NULL;
-  }
   gst_caps_replace (&audiomixer->filter_caps, NULL);
-  gst_caps_replace (&audiomixer->current_caps, NULL);
-
-  if (audiomixer->pending_events) {
-    g_list_foreach (audiomixer->pending_events, (GFunc) gst_event_unref, NULL);
-    g_list_free (audiomixer->pending_events);
-    audiomixer->pending_events = NULL;
-  }
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
@@ -1111,15 +551,6 @@
       GST_DEBUG_OBJECT (audiomixer, "set new caps %" GST_PTR_FORMAT, new_caps);
       break;
     }
-    case PROP_ALIGNMENT_THRESHOLD:
-      audiomixer->alignment_threshold = g_value_get_uint64 (value);
-      break;
-    case PROP_DISCONT_WAIT:
-      audiomixer->discont_wait = g_value_get_uint64 (value);
-      break;
-    case PROP_BLOCKSIZE:
-      audiomixer->blocksize = g_value_get_uint (value);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1138,84 +569,33 @@
       gst_value_set_caps (value, audiomixer->filter_caps);
       GST_OBJECT_UNLOCK (audiomixer);
       break;
-    case PROP_ALIGNMENT_THRESHOLD:
-      g_value_set_uint64 (value, audiomixer->alignment_threshold);
-      break;
-    case PROP_DISCONT_WAIT:
-      g_value_set_uint64 (value, audiomixer->discont_wait);
-      break;
-    case PROP_BLOCKSIZE:
-      g_value_set_uint (value, audiomixer->blocksize);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
 }
 
-static void
-free_pad (GstCollectData * data)
-{
-  GstAudioMixerCollect *adata = (GstAudioMixerCollect *) data;
-
-  gst_buffer_replace (&adata->buffer, NULL);
-}
-
 static GstPad *
 gst_audiomixer_request_new_pad (GstElement * element, GstPadTemplate * templ,
-    const gchar * unused, const GstCaps * caps)
+    const gchar * req_name, const GstCaps * caps)
 {
-  gchar *name;
-  GstAudioMixer *audiomixer;
-  GstPad *newpad;
-  gint padcount;
-  GstCollectData *cdata;
-  GstAudioMixerCollect *adata;
+  GstAudioMixerPad *newpad;
 
-  if (templ->direction != GST_PAD_SINK)
-    goto not_sink;
+  newpad = (GstAudioMixerPad *)
+      GST_ELEMENT_CLASS (parent_class)->request_new_pad (element,
+      templ, req_name, caps);
 
-  audiomixer = GST_AUDIO_MIXER (element);
+  if (newpad == NULL)
+    goto could_not_create;
 
-  /* increment pad counter */
-  padcount = g_atomic_int_add (&audiomixer->padcount, 1);
-
-  name = g_strdup_printf ("sink_%u", padcount);
-  newpad = g_object_new (GST_TYPE_AUDIO_MIXER_PAD, "name", name, "direction",
-      templ->direction, "template", templ, NULL);
-  GST_DEBUG_OBJECT (audiomixer, "request new pad %s", name);
-  g_free (name);
-
-  cdata =
-      gst_collect_pads_add_pad (audiomixer->collect, newpad,
-      sizeof (GstAudioMixerCollect), free_pad, TRUE);
-  adata = (GstAudioMixerCollect *) cdata;
-  adata->buffer = NULL;
-  adata->position = 0;
-  adata->size = 0;
-  adata->output_offset = -1;
-  adata->next_offset = -1;
-
-  /* takes ownership of the pad */
-  if (!gst_element_add_pad (GST_ELEMENT (audiomixer), newpad))
-    goto could_not_add;
-
-  gst_child_proxy_child_added (GST_CHILD_PROXY (audiomixer), G_OBJECT (newpad),
+  gst_child_proxy_child_added (GST_CHILD_PROXY (element), G_OBJECT (newpad),
       GST_OBJECT_NAME (newpad));
 
-  return newpad;
+  return GST_PAD_CAST (newpad);
 
-  /* errors */
-not_sink:
+could_not_create:
   {
-    g_warning ("gstaudiomixer: request new pad that is not a SINK pad\n");
-    return NULL;
-  }
-could_not_add:
-  {
-    GST_DEBUG_OBJECT (audiomixer, "could not add pad");
-    gst_collect_pads_remove_pad (audiomixer->collect, newpad);
-    gst_object_unref (newpad);
+    GST_DEBUG_OBJECT (element, "could not create/add  pad");
     return NULL;
   }
 }
@@ -1231,324 +611,122 @@
 
   gst_child_proxy_child_removed (GST_CHILD_PROXY (audiomixer), G_OBJECT (pad),
       GST_OBJECT_NAME (pad));
-  if (audiomixer->collect)
-    gst_collect_pads_remove_pad (audiomixer->collect, pad);
-  gst_element_remove_pad (element, pad);
+
+  GST_ELEMENT_CLASS (parent_class)->release_pad (element, pad);
 }
 
-static GstFlowReturn
-gst_audiomixer_do_clip (GstCollectPads * pads, GstCollectData * data,
-    GstBuffer * buffer, GstBuffer ** out, gpointer user_data)
-{
-  GstAudioMixer *audiomixer = GST_AUDIO_MIXER (user_data);
-  gint rate, bpf;
 
-  rate = GST_AUDIO_INFO_RATE (&audiomixer->info);
-  bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
-
-  buffer = gst_audio_buffer_clip (buffer, &data->segment, rate, bpf);
-
-  *out = buffer;
-  return GST_FLOW_OK;
-}
-
+/* Called with object lock and pad object lock held */
 static gboolean
-gst_audio_mixer_fill_buffer (GstAudioMixer * audiomixer, GstCollectPads * pads,
-    GstCollectData * collect_data, GstAudioMixerCollect * adata,
-    GstBuffer * inbuf)
+gst_audiomixer_aggregate_one_buffer (GstAudioAggregator * aagg,
+    GstAudioAggregatorPad * aaggpad, GstBuffer * inbuf, guint in_offset,
+    GstBuffer * outbuf, guint out_offset, guint num_frames)
 {
-  GstClockTime start_time, end_time;
-  gboolean discont = FALSE;
-  guint64 start_offset, end_offset;
-  GstClockTime timestamp, stream_time;
-  gint rate, bpf;
-
-  g_assert (adata->buffer == NULL);
-
-  rate = GST_AUDIO_INFO_RATE (&audiomixer->info);
-  bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
-
-  timestamp = GST_BUFFER_TIMESTAMP (inbuf);
-  stream_time =
-      gst_segment_to_stream_time (&collect_data->segment, GST_FORMAT_TIME,
-      timestamp);
-
-  /* sync object properties on stream time */
-  /* TODO: Ideally we would want to do that on every sample */
-  if (GST_CLOCK_TIME_IS_VALID (stream_time))
-    gst_object_sync_values (GST_OBJECT (collect_data->pad), stream_time);
-
-  adata->position = 0;
-  adata->size = gst_buffer_get_size (inbuf);
-
-  start_time = GST_BUFFER_TIMESTAMP (inbuf);
-  end_time =
-      start_time + gst_util_uint64_scale_ceil (adata->size / bpf,
-      GST_SECOND, rate);
-
-  start_offset = gst_util_uint64_scale (start_time, rate, GST_SECOND);
-  end_offset = start_offset + adata->size / bpf;
-
-  if (GST_BUFFER_IS_DISCONT (inbuf)
-      || GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_RESYNC)
-      || adata->next_offset == -1) {
-    discont = TRUE;
-  } else {
-    guint64 diff, max_sample_diff;
-
-    /* Check discont, based on audiobasesink */
-    if (start_offset <= adata->next_offset)
-      diff = adata->next_offset - start_offset;
-    else
-      diff = start_offset - adata->next_offset;
-
-    max_sample_diff =
-        gst_util_uint64_scale_int (audiomixer->alignment_threshold, rate,
-        GST_SECOND);
-
-    /* Discont! */
-    if (G_UNLIKELY (diff >= max_sample_diff)) {
-      if (audiomixer->discont_wait > 0) {
-        if (audiomixer->discont_time == GST_CLOCK_TIME_NONE) {
-          audiomixer->discont_time = start_time;
-        } else if (start_time - audiomixer->discont_time >=
-            audiomixer->discont_wait) {
-          discont = TRUE;
-          audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-        }
-      } else {
-        discont = TRUE;
-      }
-    } else if (G_UNLIKELY (audiomixer->discont_time != GST_CLOCK_TIME_NONE)) {
-      /* we have had a discont, but are now back on track! */
-      audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-    }
-  }
-
-  if (discont) {
-    /* Have discont, need resync */
-    if (adata->next_offset != -1)
-      GST_INFO_OBJECT (collect_data->pad, "Have discont. Expected %"
-          G_GUINT64_FORMAT ", got %" G_GUINT64_FORMAT,
-          adata->next_offset, start_offset);
-    adata->output_offset = -1;
-  } else {
-    audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-  }
-
-  adata->next_offset = end_offset;
-
-  if (adata->output_offset == -1) {
-    GstClockTime start_running_time;
-    GstClockTime end_running_time;
-    guint64 start_running_time_offset;
-    guint64 end_running_time_offset;
-
-    start_running_time =
-        gst_segment_to_running_time (&collect_data->segment,
-        GST_FORMAT_TIME, start_time);
-    end_running_time =
-        gst_segment_to_running_time (&collect_data->segment,
-        GST_FORMAT_TIME, end_time);
-    start_running_time_offset =
-        gst_util_uint64_scale (start_running_time, rate, GST_SECOND);
-    end_running_time_offset =
-        gst_util_uint64_scale (end_running_time, rate, GST_SECOND);
-
-    if (end_running_time_offset < audiomixer->offset) {
-      /* Before output segment, drop */
-      gst_buffer_unref (inbuf);
-      adata->buffer = NULL;
-      gst_buffer_unref (gst_collect_pads_pop (pads, collect_data));
-      adata->position = 0;
-      adata->size = 0;
-      adata->output_offset = -1;
-      GST_DEBUG_OBJECT (collect_data->pad,
-          "Buffer before segment or current position: %" G_GUINT64_FORMAT " < %"
-          G_GUINT64_FORMAT, end_running_time_offset, audiomixer->offset);
-      return FALSE;
-    }
-
-    if (start_running_time_offset < audiomixer->offset) {
-      guint diff = (audiomixer->offset - start_running_time_offset) * bpf;
-      adata->position += diff;
-      adata->size -= diff;
-      /* FIXME: This could only happen due to rounding errors */
-      if (adata->size == 0) {
-        /* Empty buffer, drop */
-        gst_buffer_unref (inbuf);
-        adata->buffer = NULL;
-        gst_buffer_unref (gst_collect_pads_pop (pads, collect_data));
-        adata->position = 0;
-        adata->size = 0;
-        adata->output_offset = -1;
-        GST_DEBUG_OBJECT (collect_data->pad,
-            "Buffer before segment or current position: %" G_GUINT64_FORMAT
-            " < %" G_GUINT64_FORMAT, end_running_time_offset,
-            audiomixer->offset);
-        return FALSE;
-      }
-    }
-
-    adata->output_offset = MAX (start_running_time_offset, audiomixer->offset);
-    GST_DEBUG_OBJECT (collect_data->pad,
-        "Buffer resynced: Pad offset %" G_GUINT64_FORMAT
-        ", current mixer offset %" G_GUINT64_FORMAT, adata->output_offset,
-        audiomixer->offset);
-  }
-
-  GST_LOG_OBJECT (collect_data->pad,
-      "Queued new buffer at offset %" G_GUINT64_FORMAT, adata->output_offset);
-  adata->buffer = inbuf;
-
-  return TRUE;
-}
-
-static void
-gst_audio_mixer_mix_buffer (GstAudioMixer * audiomixer, GstCollectPads * pads,
-    GstCollectData * collect_data, GstAudioMixerCollect * adata,
-    GstMapInfo * outmap)
-{
-  GstAudioMixerPad *pad = GST_AUDIO_MIXER_PAD (adata->collect.pad);
-  guint overlap;
-  guint out_start;
-  GstBuffer *inbuf;
+  GstAudioMixerPad *pad = GST_AUDIO_MIXER_PAD (aaggpad);
   GstMapInfo inmap;
+  GstMapInfo outmap;
   gint bpf;
 
-  bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
-
-  /* Overlap => mix */
-  if (audiomixer->offset < adata->output_offset)
-    out_start = adata->output_offset - audiomixer->offset;
-  else
-    out_start = 0;
-
-  overlap = adata->size / bpf - adata->position / bpf;
-  if (overlap > audiomixer->blocksize - out_start)
-    overlap = audiomixer->blocksize - out_start;
-
-  inbuf = gst_collect_pads_peek (pads, collect_data);
-  g_assert (inbuf != NULL && inbuf == adata->buffer);
-
-  GST_OBJECT_LOCK (pad);
   if (pad->mute || pad->volume < G_MINDOUBLE) {
     GST_DEBUG_OBJECT (pad, "Skipping muted pad");
-    gst_buffer_unref (inbuf);
-    adata->position += overlap * bpf;
-    adata->output_offset += overlap;
-    if (adata->position >= adata->size) {
-      /* Buffer done, drop it */
-      gst_buffer_replace (&adata->buffer, NULL);
-      gst_buffer_unref (gst_collect_pads_pop (pads, collect_data));
-    }
-    GST_OBJECT_UNLOCK (pad);
-    return;
+    return FALSE;
   }
 
-  if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
-    /* skip gap buffer */
-    GST_LOG_OBJECT (pad, "skipping GAP buffer");
-    gst_buffer_unref (inbuf);
-    adata->output_offset += adata->size / bpf;
-    /* Buffer done, drop it */
-    gst_buffer_replace (&adata->buffer, NULL);
-    gst_buffer_unref (gst_collect_pads_pop (pads, collect_data));
-    GST_OBJECT_UNLOCK (pad);
-    return;
-  }
+  bpf = GST_AUDIO_INFO_BPF (&aagg->info);
 
+  gst_buffer_map (outbuf, &outmap, GST_MAP_READWRITE);
   gst_buffer_map (inbuf, &inmap, GST_MAP_READ);
   GST_LOG_OBJECT (pad, "mixing %u bytes at offset %u from offset %u",
-      overlap * bpf, out_start * bpf, adata->position);
+      num_frames * bpf, out_offset * bpf, in_offset * bpf);
+
   /* further buffers, need to add them */
   if (pad->volume == 1.0) {
-    switch (audiomixer->info.finfo->format) {
+    switch (aagg->info.finfo->format) {
       case GST_AUDIO_FORMAT_U8:
-        audiomixer_orc_add_u8 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_u8 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S8:
-        audiomixer_orc_add_s8 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_s8 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_U16:
-        audiomixer_orc_add_u16 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_u16 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S16:
-        audiomixer_orc_add_s16 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_s16 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_U32:
-        audiomixer_orc_add_u32 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_u32 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S32:
-        audiomixer_orc_add_s32 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_s32 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_F32:
-        audiomixer_orc_add_f32 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_f32 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_F64:
-        audiomixer_orc_add_f64 ((gpointer) (outmap->data + out_start * bpf),
-            (gpointer) (inmap.data + adata->position),
-            overlap * audiomixer->info.channels);
+        audiomixer_orc_add_f64 ((gpointer) (outmap.data + out_offset * bpf),
+            (gpointer) (inmap.data + in_offset * bpf),
+            num_frames * aagg->info.channels);
         break;
       default:
         g_assert_not_reached ();
         break;
     }
   } else {
-    switch (audiomixer->info.finfo->format) {
+    switch (aagg->info.finfo->format) {
       case GST_AUDIO_FORMAT_U8:
-        audiomixer_orc_add_volume_u8 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i8, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_u8 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i8, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S8:
-        audiomixer_orc_add_volume_s8 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i8, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_s8 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i8, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_U16:
-        audiomixer_orc_add_volume_u16 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i16, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_u16 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i16, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S16:
-        audiomixer_orc_add_volume_s16 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i16, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_s16 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i16, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_U32:
-        audiomixer_orc_add_volume_u32 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i32, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_u32 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i32, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_S32:
-        audiomixer_orc_add_volume_s32 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume_i32, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_s32 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume_i32, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_F32:
-        audiomixer_orc_add_volume_f32 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_f32 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume, num_frames * aagg->info.channels);
         break;
       case GST_AUDIO_FORMAT_F64:
-        audiomixer_orc_add_volume_f64 ((gpointer) (outmap->data +
-                out_start * bpf), (gpointer) (inmap.data + adata->position),
-            pad->volume, overlap * audiomixer->info.channels);
+        audiomixer_orc_add_volume_f64 ((gpointer) (outmap.data +
+                out_offset * bpf), (gpointer) (inmap.data + in_offset * bpf),
+            pad->volume, num_frames * aagg->info.channels);
         break;
       default:
         g_assert_not_reached ();
@@ -1556,392 +734,11 @@
     }
   }
   gst_buffer_unmap (inbuf, &inmap);
-  gst_buffer_unref (inbuf);
-
-  adata->position += overlap * bpf;
-  adata->output_offset += overlap;
-
-  if (adata->position == adata->size) {
-    /* Buffer done, drop it */
-    gst_buffer_replace (&adata->buffer, NULL);
-    gst_buffer_unref (gst_collect_pads_pop (pads, collect_data));
-    GST_DEBUG_OBJECT (pad, "Finished mixing buffer, waiting for next");
-  }
-
-  GST_OBJECT_UNLOCK (pad);
-}
-
-static GstFlowReturn
-gst_audiomixer_collected (GstCollectPads * pads, gpointer user_data)
-{
-  /* Get all pads that have data for us and store them in a
-   * new list.
-   *
-   * Calculate the current output offset/timestamp and
-   * offset_end/timestamp_end. Allocate a silence buffer
-   * for this and store it.
-   *
-   * For all pads:
-   * 1) Once per input buffer (cached)
-   *   1) Check discont (flag and timestamp with tolerance)
-   *   2) If discont or new, resync. That means:
-   *     1) Drop all start data of the buffer that comes before
-   *        the current position/offset.
-   *     2) Calculate the offset (output segment!) that the first
-   *        frame of the input buffer corresponds to. Base this on
-   *        the running time.
-   *
-   * 2) If the current pad's offset/offset_end overlaps with the output
-   *    offset/offset_end, mix it at the appropiate position in the output
-   *    buffer and advance the pad's position. Remember if this pad needs
-   *    a new buffer to advance behind the output offset_end.
-   *
-   * 3) If we had no pad with a buffer, go EOS.
-   *
-   * 4) If we had at least one pad that did not advance behind output
-   *    offset_end, let collected be called again for the current
-   *    output offset/offset_end.
-   */
-  GstAudioMixer *audiomixer;
-  GSList *collected;
-  GstFlowReturn ret;
-  GstBuffer *outbuf = NULL;
-  GstMapInfo outmap;
-  gint64 next_offset;
-  gint64 next_timestamp;
-  gint rate, bpf;
-  gboolean dropped = FALSE;
-  gboolean is_eos = TRUE;
-  gboolean is_done = TRUE;
-
-  audiomixer = GST_AUDIO_MIXER (user_data);
-
-  /* this is fatal */
-  if (G_UNLIKELY (audiomixer->info.finfo->format == GST_AUDIO_FORMAT_UNKNOWN))
-    goto not_negotiated;
-
-  if (audiomixer->flush_stop_pending == TRUE) {
-    GST_INFO_OBJECT (audiomixer->srcpad, "send pending flush stop event");
-    if (!gst_pad_push_event (audiomixer->srcpad,
-            gst_event_new_flush_stop (TRUE))) {
-      GST_WARNING_OBJECT (audiomixer->srcpad,
-          "Sending flush stop event failed");
-    }
-
-    audiomixer->flush_stop_pending = FALSE;
-    gst_buffer_replace (&audiomixer->current_buffer, NULL);
-    audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-  }
-
-  if (audiomixer->send_stream_start) {
-    gchar s_id[32];
-    GstEvent *event;
-
-    GST_INFO_OBJECT (audiomixer->srcpad, "send pending stream start event");
-    /* FIXME: create id based on input ids, we can't use 
-     * gst_pad_create_stream_id() though as that only handles 0..1 sink-pad
-     */
-    g_snprintf (s_id, sizeof (s_id), "audiomixer-%08x", g_random_int ());
-    event = gst_event_new_stream_start (s_id);
-    gst_event_set_group_id (event, gst_util_group_id_next ());
-
-    if (!gst_pad_push_event (audiomixer->srcpad, event)) {
-      GST_WARNING_OBJECT (audiomixer->srcpad,
-          "Sending stream start event failed");
-    }
-    audiomixer->send_stream_start = FALSE;
-  }
-
-  if (audiomixer->send_caps) {
-    GstEvent *caps_event;
-
-    caps_event = gst_event_new_caps (audiomixer->current_caps);
-    GST_INFO_OBJECT (audiomixer->srcpad,
-        "send pending caps event %" GST_PTR_FORMAT, caps_event);
-    if (!gst_pad_push_event (audiomixer->srcpad, caps_event)) {
-      GST_WARNING_OBJECT (audiomixer->srcpad, "Sending caps event failed");
-    }
-    audiomixer->send_caps = FALSE;
-  }
-
-  rate = GST_AUDIO_INFO_RATE (&audiomixer->info);
-  bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
-
-  if (g_atomic_int_compare_and_exchange (&audiomixer->segment_pending, TRUE,
-          FALSE)) {
-    GstEvent *event;
-
-    /* 
-     * When seeking we set the start and stop positions as given in the seek
-     * event. We also adjust offset & timestamp accordingly.
-     * This basically ignores all newsegments sent by upstream.
-     *
-     * FIXME: We require that all inputs have the same rate currently
-     * as we do no rate conversion!
-     */
-    event = gst_event_new_segment (&audiomixer->segment);
-    if (audiomixer->segment.rate > 0.0) {
-      audiomixer->segment.position = audiomixer->segment.start;
-    } else {
-      audiomixer->segment.position = audiomixer->segment.stop;
-    }
-    audiomixer->offset = gst_util_uint64_scale (audiomixer->segment.position,
-        rate, GST_SECOND);
-
-    GST_INFO_OBJECT (audiomixer->srcpad, "sending pending new segment event %"
-        GST_SEGMENT_FORMAT, &audiomixer->segment);
-    if (event) {
-      if (!gst_pad_push_event (audiomixer->srcpad, event)) {
-        GST_WARNING_OBJECT (audiomixer->srcpad,
-            "Sending new segment event failed");
-      }
-    } else {
-      GST_WARNING_OBJECT (audiomixer->srcpad, "Creating new segment event for "
-          "start:%" G_GINT64_FORMAT "  end:%" G_GINT64_FORMAT " failed",
-          audiomixer->segment.start, audiomixer->segment.stop);
-    }
-  }
-
-  if (G_UNLIKELY (audiomixer->pending_events)) {
-    GList *tmp = audiomixer->pending_events;
-
-    while (tmp) {
-      GstEvent *ev = (GstEvent *) tmp->data;
-
-      gst_pad_push_event (audiomixer->srcpad, ev);
-      tmp = g_list_next (tmp);
-    }
-    g_list_free (audiomixer->pending_events);
-    audiomixer->pending_events = NULL;
-  }
-
-  /* for the next timestamp, use the sample counter, which will
-   * never accumulate rounding errors */
-
-  /* FIXME: Reverse mixing does not work at all yet */
-  if (audiomixer->segment.rate > 0.0) {
-    next_offset = audiomixer->offset + audiomixer->blocksize;
-  } else {
-    next_offset = audiomixer->offset - audiomixer->blocksize;
-  }
-
-  next_timestamp = gst_util_uint64_scale (next_offset, GST_SECOND, rate);
-
-  if (audiomixer->current_buffer) {
-    outbuf = audiomixer->current_buffer;
-  } else {
-    outbuf = gst_buffer_new_and_alloc (audiomixer->blocksize * bpf);
-    gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE);
-    gst_audio_format_fill_silence (audiomixer->info.finfo, outmap.data,
-        outmap.size);
-    gst_buffer_unmap (outbuf, &outmap);
-    audiomixer->current_buffer = outbuf;
-  }
-
-  GST_LOG_OBJECT (audiomixer,
-      "Starting to mix %u samples for offset %" G_GUINT64_FORMAT
-      " with timestamp %" GST_TIME_FORMAT, audiomixer->blocksize,
-      audiomixer->offset, GST_TIME_ARGS (audiomixer->segment.position));
-
-  gst_buffer_map (outbuf, &outmap, GST_MAP_READWRITE);
-
-  for (collected = pads->data; collected; collected = collected->next) {
-    GstCollectData *collect_data;
-    GstAudioMixerCollect *adata;
-    GstBuffer *inbuf;
-
-    collect_data = (GstCollectData *) collected->data;
-    adata = (GstAudioMixerCollect *) collect_data;
-
-    inbuf = gst_collect_pads_peek (pads, collect_data);
-    if (!inbuf)
-      continue;
-
-    /* New buffer? */
-    if (!adata->buffer || adata->buffer != inbuf) {
-      /* Takes ownership of buffer */
-      if (!gst_audio_mixer_fill_buffer (audiomixer, pads, collect_data, adata,
-              inbuf)) {
-        dropped = TRUE;
-        continue;
-      }
-    } else {
-      gst_buffer_unref (inbuf);
-    }
-
-    if (!adata->buffer && !dropped
-        && GST_COLLECT_PADS_STATE_IS_SET (&adata->collect,
-            GST_COLLECT_PADS_STATE_EOS)) {
-      GST_DEBUG_OBJECT (collect_data->pad, "Pad is in EOS state");
-    } else {
-      is_eos = FALSE;
-    }
-
-    /* At this point adata->output_offset >= audiomixer->offset or we have no buffer anymore */
-    if (adata->output_offset >= audiomixer->offset
-        && adata->output_offset <
-        audiomixer->offset + audiomixer->blocksize && adata->buffer) {
-      GST_LOG_OBJECT (collect_data->pad, "Mixing buffer for current offset");
-      gst_audio_mixer_mix_buffer (audiomixer, pads, collect_data, adata,
-          &outmap);
-      if (adata->output_offset >= next_offset) {
-        GST_DEBUG_OBJECT (collect_data->pad,
-            "Pad is after current offset: %" G_GUINT64_FORMAT " >= %"
-            G_GUINT64_FORMAT, adata->output_offset, next_offset);
-      } else {
-        is_done = FALSE;
-      }
-    }
-  }
-
   gst_buffer_unmap (outbuf, &outmap);
 
-  if (dropped) {
-    /* We dropped a buffer, retry */
-    GST_DEBUG_OBJECT (audiomixer,
-        "A pad dropped a buffer, wait for the next one");
-    return GST_FLOW_OK;
-  }
-
-  if (!is_done && !is_eos) {
-    /* Get more buffers */
-    GST_DEBUG_OBJECT (audiomixer,
-        "We're not done yet for the current offset," " waiting for more data");
-    return GST_FLOW_OK;
-  }
-
-  if (is_eos) {
-    gint64 max_offset = 0;
-    gboolean empty_buffer = TRUE;
-
-    GST_DEBUG_OBJECT (audiomixer, "We're EOS");
-
-
-    for (collected = pads->data; collected; collected = collected->next) {
-      GstCollectData *collect_data;
-      GstAudioMixerCollect *adata;
-
-      collect_data = (GstCollectData *) collected->data;
-      adata = (GstAudioMixerCollect *) collect_data;
-
-      max_offset = MAX (max_offset, adata->output_offset);
-      if (adata->output_offset > audiomixer->offset)
-        empty_buffer = FALSE;
-    }
-
-    /* This means EOS or no pads at all */
-    if (empty_buffer) {
-      gst_buffer_replace (&audiomixer->current_buffer, NULL);
-      goto eos;
-    }
-
-    if (max_offset <= next_offset) {
-      GST_DEBUG_OBJECT (audiomixer,
-          "Last buffer is incomplete: %" G_GUINT64_FORMAT " <= %"
-          G_GUINT64_FORMAT, max_offset, next_offset);
-      next_offset = max_offset;
-      if (next_offset > audiomixer->offset)
-        gst_buffer_resize (outbuf, 0, (next_offset - audiomixer->offset) * bpf);
-
-      next_timestamp = gst_util_uint64_scale (next_offset, GST_SECOND, rate);
-    }
-  }
-
-  /* set timestamps on the output buffer */
-  if (audiomixer->segment.rate > 0.0) {
-    GST_BUFFER_TIMESTAMP (outbuf) = audiomixer->segment.position;
-    GST_BUFFER_OFFSET (outbuf) = audiomixer->offset;
-    GST_BUFFER_OFFSET_END (outbuf) = next_offset;
-    GST_BUFFER_DURATION (outbuf) =
-        next_timestamp - audiomixer->segment.position;
-  } else {
-    GST_BUFFER_TIMESTAMP (outbuf) = next_timestamp;
-    GST_BUFFER_OFFSET (outbuf) = next_offset;
-    GST_BUFFER_OFFSET_END (outbuf) = audiomixer->offset;
-    GST_BUFFER_DURATION (outbuf) =
-        audiomixer->segment.position - next_timestamp;
-  }
-
-  audiomixer->offset = next_offset;
-  audiomixer->segment.position = next_timestamp;
-
-  /* send it out */
-  GST_LOG_OBJECT (audiomixer,
-      "pushing outbuf %p, timestamp %" GST_TIME_FORMAT " offset %"
-      G_GINT64_FORMAT, outbuf, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
-      GST_BUFFER_OFFSET (outbuf));
-
-  ret = gst_pad_push (audiomixer->srcpad, outbuf);
-  audiomixer->current_buffer = NULL;
-
-  GST_LOG_OBJECT (audiomixer, "pushed outbuf, result = %s",
-      gst_flow_get_name (ret));
-
-  if (ret == GST_FLOW_OK && is_eos)
-    goto eos;
-
-  return ret;
-  /* ERRORS */
-not_negotiated:
-  {
-    GST_ELEMENT_ERROR (audiomixer, STREAM, FORMAT, (NULL),
-        ("Unknown data received, not negotiated"));
-    return GST_FLOW_NOT_NEGOTIATED;
-  }
-
-eos:
-  {
-    GST_DEBUG_OBJECT (audiomixer, "EOS");
-    gst_pad_push_event (audiomixer->srcpad, gst_event_new_eos ());
-    return GST_FLOW_EOS;
-  }
+  return TRUE;
 }
 
-static GstStateChangeReturn
-gst_audiomixer_change_state (GstElement * element, GstStateChange transition)
-{
-  GstAudioMixer *audiomixer;
-  GstStateChangeReturn ret;
-
-  audiomixer = GST_AUDIO_MIXER (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      audiomixer->offset = 0;
-      audiomixer->flush_stop_pending = FALSE;
-      audiomixer->segment_pending = TRUE;
-      audiomixer->send_stream_start = TRUE;
-      audiomixer->send_caps = TRUE;
-      gst_caps_replace (&audiomixer->current_caps, NULL);
-      gst_segment_init (&audiomixer->segment, GST_FORMAT_TIME);
-      gst_collect_pads_start (audiomixer->collect);
-      audiomixer->discont_time = GST_CLOCK_TIME_NONE;
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      /* need to unblock the collectpads before calling the
-       * parent change_state so that streaming can finish */
-      gst_collect_pads_stop (audiomixer->collect);
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_buffer_replace (&audiomixer->current_buffer, NULL);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
 
 /* GstChildProxy implementation */
 static GObject *
@@ -1994,6 +791,10 @@
           GST_TYPE_AUDIO_MIXER))
     return FALSE;
 
+  if (!gst_element_register (plugin, "audiointerleave", GST_RANK_NONE,
+          GST_TYPE_AUDIO_INTERLEAVE))
+    return FALSE;
+
   return TRUE;
 }
 
diff --git a/gst/audiomixer/gstaudiomixer.h b/gst/audiomixer/gstaudiomixer.h
index 40a25c9..add6e32 100644
--- a/gst/audiomixer/gstaudiomixer.h
+++ b/gst/audiomixer/gstaudiomixer.h
@@ -25,8 +25,8 @@
 #define __GST_AUDIO_MIXER_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads.h>
 #include <gst/audio/audio.h>
+#include "gstaudioaggregator.h"
 
 G_BEGIN_DECLS
 
@@ -49,50 +49,14 @@
  * The audiomixer object structure.
  */
 struct _GstAudioMixer {
-  GstElement      element;
-
-  GstPad         *srcpad;
-  GstCollectPads *collect;
-  /* pad counter, used for creating unique request pads */
-  gint            padcount;
-
-  /* the next are valid for both int and float */
-  GstAudioInfo    info;
-
-  /* counters to keep track of timestamps */
-  gint64          offset;
-  /* Buffer starting at offset containing block_size samples */
-  GstBuffer      *current_buffer;
-
-  /* sink event handling */
-  GstSegment      segment;
-  volatile gboolean segment_pending;
-  volatile gboolean flush_stop_pending;
-
-  /* current caps */
-  GstCaps *current_caps;
+  GstAudioAggregator element;
 
   /* target caps (set via property) */
   GstCaps *filter_caps;
-
-  GstClockTime alignment_threshold;
-  GstClockTime discont_wait;
-
-  /* Last time we noticed a discont */
-  GstClockTime discont_time;
-
-  /* Size in samples that is output per buffer */
-  guint blocksize;
-
-  /* Pending inline events */
-  GList *pending_events;
-  
-  gboolean send_stream_start;
-  gboolean send_caps;
 };
 
 struct _GstAudioMixerClass {
-  GstElementClass parent_class;
+  GstAudioAggregatorClass parent_class;
 };
 
 GType    gst_audiomixer_get_type (void);
@@ -105,7 +69,7 @@
 #define GST_AUDIO_MIXER_PAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_AUDIO_MIXER_PAD,GstAudioMixerPadClass))
 
 struct _GstAudioMixerPad {
-  GstPad parent;
+  GstAudioAggregatorPad parent;
 
   gdouble volume;
   gint volume_i32;
@@ -115,7 +79,7 @@
 };
 
 struct _GstAudioMixerPadClass {
-  GstPadClass parent_class;
+  GstAudioAggregatorPadClass parent_class;
 };
 
 GType gst_audiomixer_pad_get_type (void);
diff --git a/gst/audiovisualizers/Makefile.am b/gst/audiovisualizers/Makefile.am
index a26a1ed..a669900 100644
--- a/gst/audiovisualizers/Makefile.am
+++ b/gst/audiovisualizers/Makefile.am
@@ -19,18 +19,3 @@
 
 noinst_HEADERS = gstaudiovisualizer.h gstdrawhelpers.h \
 	gstspacescope.h gstspectrascope.h gstsynaescope.h gstwavescope.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT audiovisualizers -:SHARED audiovisualizers \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiovisualizers_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiovisualizers_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiovisualizers_la_LDFLAGS) \
-	           $(libgstaudiovisualizers_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
diff --git a/gst/audiovisualizers/Makefile.in b/gst/audiovisualizers/Makefile.in
index f134667..508f05a 100644
--- a/gst/audiovisualizers/Makefile.in
+++ b/gst/audiovisualizers/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/audiovisualizers
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -236,6 +246,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -253,8 +264,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -279,8 +292,6 @@
 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@
@@ -293,7 +304,6 @@
 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@
@@ -301,6 +311,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -327,11 +339,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -350,8 +365,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -410,10 +423,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -430,7 +447,6 @@
 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@
@@ -439,7 +455,6 @@
 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@
@@ -452,7 +467,6 @@
 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@
@@ -466,6 +480,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -477,6 +492,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -515,6 +532,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -550,10 +568,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -579,6 +601,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -586,7 +611,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -615,6 +647,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -625,6 +658,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -655,17 +689,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -682,6 +715,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -720,6 +754,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -771,7 +806,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/audiovisualizers/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/audiovisualizers/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1120,20 +1154,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT audiovisualizers -:SHARED audiovisualizers \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiovisualizers_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiovisualizers_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiovisualizers_la_LDFLAGS) \
-	           $(libgstaudiovisualizers_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/audiovisualizers/gstaudiovisualizer.c b/gst/audiovisualizers/gstaudiovisualizer.c
index fafece2..9c4a177 100644
--- a/gst/audiovisualizers/gstaudiovisualizer.c
+++ b/gst/audiovisualizers/gstaudiovisualizer.c
@@ -1,21 +1,23 @@
 /* GStreamer
  * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net>
+ * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * gstaudiovisualizer.h: base class for audio visualisation elements
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /**
  * SECTION:gstaudiovisualizer
@@ -63,7 +65,7 @@
     guint prop_id, const GValue * value, GParamSpec * pspec);
 static void gst_audio_visualizer_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
-static void gst_audio_visualizer_dispose (GObject * object);
+static void gst_audio_visualizer_finalize (GObject * object);
 
 static gboolean gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope);
 static gboolean gst_audio_visualizer_src_setcaps (GstAudioVisualizer *
@@ -81,8 +83,6 @@
 
 static gboolean gst_audio_visualizer_src_query (GstPad * pad,
     GstObject * parent, GstQuery * query);
-static gboolean gst_audio_visualizer_sink_query (GstPad * pad,
-    GstObject * parent, GstQuery * query);
 
 static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement *
     element, GstStateChange transition);
@@ -93,6 +93,49 @@
 static gboolean
 default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query);
 
+#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj)  \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate))
+
+struct _GstAudioVisualizerPrivate
+{
+  gboolean negotiated;
+
+  GstBufferPool *pool;
+  gboolean pool_active;
+  GstAllocator *allocator;
+  GstAllocationParams params;
+  GstQuery *query;
+
+  /* pads */
+  GstPad *srcpad, *sinkpad;
+
+  GstAudioVisualizerShader shader_type;
+  GstAudioVisualizerShaderFunc shader;
+  guint32 shade_amount;
+
+  GstAdapter *adapter;
+
+  GstBuffer *inbuf;
+  GstBuffer *tempbuf;
+  GstVideoFrame tempframe;
+
+  guint spf;                    /* samples per video frame */
+  guint64 frame_duration;
+
+  /* QoS stuff *//* with LOCK */
+  gdouble proportion;
+  GstClockTime earliest_time;
+
+  guint dropped;                /* frames dropped / not dropped */
+  guint processed;
+
+  /* configuration mutex */
+  GMutex config_lock;
+
+  GstSegment segment;
+};
+
+
 /* shading functions */
 
 #define GST_TYPE_AUDIO_VISUALIZER_SHADER (gst_audio_visualizer_shader_get_type())
@@ -160,9 +203,10 @@
     GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -188,9 +232,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -216,9 +261,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -244,9 +290,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -276,9 +323,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -308,9 +356,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -345,9 +394,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *d;
   gint ss, ds, width, height;
 
@@ -382,9 +432,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *s1, *d, *d1;
   gint ss, ds, width, height;
 
@@ -417,9 +468,10 @@
     const GstVideoFrame * sframe, GstVideoFrame * dframe)
 {
   guint i, j;
-  guint r = (scope->shade_amount >> 16) & 0xff;
-  guint g = (scope->shade_amount >> 8) & 0xff;
-  guint b = (scope->shade_amount >> 0) & 0xff;
+  guint32 shade_amount = scope->priv->shade_amount;
+  guint r = (shade_amount >> 16) & 0xff;
+  guint g = (shade_amount >> 8) & 0xff;
+  guint b = (shade_amount >> 0) & 0xff;
   guint8 *s, *s1, *d, *d1;
   gint ss, ds, width, height;
 
@@ -450,60 +502,50 @@
 static void
 gst_audio_visualizer_change_shader (GstAudioVisualizer * scope)
 {
-  switch (scope->shader_type) {
+  GstAudioVisualizerShaderFunc shader;
+
+  switch (scope->priv->shader_type) {
     case GST_AUDIO_VISUALIZER_SHADER_NONE:
-      scope->shader = NULL;
+      shader = NULL;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE:
-      scope->shader = shader_fade;
+      shader = shader_fade;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP:
-      scope->shader = shader_fade_and_move_up;
+      shader = shader_fade_and_move_up;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN:
-      scope->shader = shader_fade_and_move_down;
+      shader = shader_fade_and_move_down;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT:
-      scope->shader = shader_fade_and_move_left;
+      shader = shader_fade_and_move_left;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT:
-      scope->shader = shader_fade_and_move_right;
+      shader = shader_fade_and_move_right;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT:
-      scope->shader = shader_fade_and_move_horiz_out;
+      shader = shader_fade_and_move_horiz_out;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN:
-      scope->shader = shader_fade_and_move_horiz_in;
+      shader = shader_fade_and_move_horiz_in;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT:
-      scope->shader = shader_fade_and_move_vert_out;
+      shader = shader_fade_and_move_vert_out;
       break;
     case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN:
-      scope->shader = shader_fade_and_move_vert_in;
+      shader = shader_fade_and_move_vert_in;
       break;
     default:
       GST_ERROR ("invalid shader function");
-      scope->shader = NULL;
+      shader = NULL;
       break;
   }
+
+  scope->priv->shader = shader;
 }
 
 /* base class */
 
-#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj)  \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate))
-
-struct _GstAudioVisualizerPrivate
-{
-  gboolean negotiated;
-
-  GstBufferPool *pool;
-  gboolean pool_active;
-  GstAllocator *allocator;
-  GstAllocationParams params;
-  GstQuery *query;
-};
-
 GType
 gst_audio_visualizer_get_type (void)
 {
@@ -547,7 +589,7 @@
 
   gobject_class->set_property = gst_audio_visualizer_set_property;
   gobject_class->get_property = gst_audio_visualizer_get_property;
-  gobject_class->dispose = gst_audio_visualizer_dispose;
+  gobject_class->finalize = gst_audio_visualizer_finalize;
 
   element_class->change_state =
       GST_DEBUG_FUNCPTR (gst_audio_visualizer_change_state);
@@ -578,42 +620,40 @@
   pad_template =
       gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "sink");
   g_return_if_fail (pad_template != NULL);
-  scope->sinkpad = gst_pad_new_from_template (pad_template, "sink");
-  gst_pad_set_chain_function (scope->sinkpad,
+  scope->priv->sinkpad = gst_pad_new_from_template (pad_template, "sink");
+  gst_pad_set_chain_function (scope->priv->sinkpad,
       GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain));
-  gst_pad_set_event_function (scope->sinkpad,
+  gst_pad_set_event_function (scope->priv->sinkpad,
       GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event));
-  gst_pad_set_query_function (scope->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_query));
-  gst_element_add_pad (GST_ELEMENT (scope), scope->sinkpad);
+  gst_element_add_pad (GST_ELEMENT (scope), scope->priv->sinkpad);
 
   pad_template =
       gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src");
   g_return_if_fail (pad_template != NULL);
-  scope->srcpad = gst_pad_new_from_template (pad_template, "src");
-  gst_pad_set_event_function (scope->srcpad,
+  scope->priv->srcpad = gst_pad_new_from_template (pad_template, "src");
+  gst_pad_set_event_function (scope->priv->srcpad,
       GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_event));
-  gst_pad_set_query_function (scope->srcpad,
+  gst_pad_set_query_function (scope->priv->srcpad,
       GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_query));
-  gst_element_add_pad (GST_ELEMENT (scope), scope->srcpad);
+  gst_element_add_pad (GST_ELEMENT (scope), scope->priv->srcpad);
 
-  scope->adapter = gst_adapter_new ();
-  scope->inbuf = gst_buffer_new ();
+  scope->priv->adapter = gst_adapter_new ();
+  scope->priv->inbuf = gst_buffer_new ();
 
   /* properties */
-  scope->shader_type = DEFAULT_SHADER;
+  scope->priv->shader_type = DEFAULT_SHADER;
   gst_audio_visualizer_change_shader (scope);
-  scope->shade_amount = DEFAULT_SHADE_AMOUNT;
+  scope->priv->shade_amount = DEFAULT_SHADE_AMOUNT;
 
   /* reset the initial video state */
   gst_video_info_init (&scope->vinfo);
-  scope->frame_duration = GST_CLOCK_TIME_NONE;
+  scope->priv->frame_duration = GST_CLOCK_TIME_NONE;
 
   /* reset the initial state */
   gst_audio_info_init (&scope->ainfo);
   gst_video_info_init (&scope->vinfo);
 
-  g_mutex_init (&scope->config_lock);
+  g_mutex_init (&scope->priv->config_lock);
 }
 
 static void
@@ -624,11 +664,11 @@
 
   switch (prop_id) {
     case PROP_SHADER:
-      scope->shader_type = g_value_get_enum (value);
+      scope->priv->shader_type = g_value_get_enum (value);
       gst_audio_visualizer_change_shader (scope);
       break;
     case PROP_SHADE_AMOUNT:
-      scope->shade_amount = g_value_get_uint (value);
+      scope->priv->shade_amount = g_value_get_uint (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -644,10 +684,10 @@
 
   switch (prop_id) {
     case PROP_SHADER:
-      g_value_set_enum (value, scope->shader_type);
+      g_value_set_enum (value, scope->priv->shader_type);
       break;
     case PROP_SHADE_AMOUNT:
-      g_value_set_uint (value, scope->shade_amount);
+      g_value_set_uint (value, scope->priv->shade_amount);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -656,39 +696,43 @@
 }
 
 static void
-gst_audio_visualizer_dispose (GObject * object)
+gst_audio_visualizer_finalize (GObject * object)
 {
   GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object);
+  GstAudioVisualizerPrivate *priv = scope->priv;
 
-  if (scope->adapter) {
-    g_object_unref (scope->adapter);
-    scope->adapter = NULL;
+  if (priv->adapter) {
+    g_object_unref (priv->adapter);
+    priv->adapter = NULL;
   }
-  if (scope->inbuf) {
-    gst_buffer_unref (scope->inbuf);
-    scope->inbuf = NULL;
+  if (priv->inbuf) {
+    gst_buffer_unref (priv->inbuf);
+    priv->inbuf = NULL;
   }
-  if (scope->tempbuf) {
-    gst_video_frame_unmap (&scope->tempframe);
-    gst_buffer_unref (scope->tempbuf);
-    scope->tempbuf = NULL;
+  if (priv->tempbuf) {
+    gst_video_frame_unmap (&priv->tempframe);
+    gst_buffer_unref (priv->tempbuf);
+    priv->tempbuf = NULL;
   }
-  if (scope->config_lock.p) {
-    g_mutex_clear (&scope->config_lock);
-    scope->config_lock.p = NULL;
-  }
-  G_OBJECT_CLASS (parent_class)->dispose (object);
+
+  g_mutex_clear (&priv->config_lock);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 static void
 gst_audio_visualizer_reset (GstAudioVisualizer * scope)
 {
-  gst_adapter_clear (scope->adapter);
-  gst_segment_init (&scope->segment, GST_FORMAT_UNDEFINED);
+  GstAudioVisualizerPrivate *priv = scope->priv;
+
+  gst_adapter_clear (priv->adapter);
+  gst_segment_init (&priv->segment, GST_FORMAT_UNDEFINED);
 
   GST_OBJECT_LOCK (scope);
-  scope->proportion = 1.0;
-  scope->earliest_time = -1;
+  priv->proportion = 1.0;
+  priv->earliest_time = -1;
+  priv->dropped = 0;
+  priv->processed = 0;
   GST_OBJECT_UNLOCK (scope);
 }
 
@@ -729,6 +773,7 @@
 {
   GstVideoInfo info;
   GstAudioVisualizerClass *klass;
+  GstAudioVisualizerPrivate *priv;
   gboolean res;
 
   if (!gst_video_info_from_caps (&info, caps))
@@ -736,33 +781,35 @@
 
   klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope));
 
+  priv = scope->priv;
+
   scope->vinfo = info;
 
-  scope->frame_duration = gst_util_uint64_scale_int (GST_SECOND,
+  priv->frame_duration = gst_util_uint64_scale_int (GST_SECOND,
       GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info));
-  scope->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo),
+  priv->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo),
       GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info));
-  scope->req_spf = scope->spf;
+  scope->req_spf = priv->spf;
 
-  if (scope->tempbuf) {
-    gst_video_frame_unmap (&scope->tempframe);
-    gst_buffer_unref (scope->tempbuf);
+  if (priv->tempbuf) {
+    gst_video_frame_unmap (&priv->tempframe);
+    gst_buffer_unref (priv->tempbuf);
   }
-  scope->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size),
+  priv->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size),
       scope->vinfo.size);
-  gst_video_frame_map (&scope->tempframe, &scope->vinfo, scope->tempbuf,
+  gst_video_frame_map (&priv->tempframe, &scope->vinfo, priv->tempbuf,
       GST_MAP_READWRITE);
 
-  if (klass->setup)
-    res = klass->setup (scope);
+  if (klass->setup && !klass->setup (scope))
+    goto setup_failed;
 
   GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d",
       GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info),
       GST_VIDEO_INFO_FPS_N (&info), GST_VIDEO_INFO_FPS_D (&info));
-  GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u",
-      scope->spf, scope->req_spf);
+  GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u", priv->spf,
+      scope->req_spf);
 
-  gst_pad_set_caps (scope->srcpad, caps);
+  gst_pad_set_caps (priv->srcpad, caps);
 
   /* find a pool for the negotiated caps now */
   res = gst_audio_visualizer_do_bufferpool (scope, caps);
@@ -777,6 +824,12 @@
     GST_DEBUG_OBJECT (scope, "error parsing caps");
     return FALSE;
   }
+
+setup_failed:
+  {
+    GST_WARNING_OBJECT (scope, "failed to set up");
+    return FALSE;
+  }
 }
 
 static gboolean
@@ -787,12 +840,12 @@
   GstCaps *templ;
   gboolean ret;
 
-  templ = gst_pad_get_pad_template_caps (scope->srcpad);
+  templ = gst_pad_get_pad_template_caps (scope->priv->srcpad);
 
   GST_DEBUG_OBJECT (scope, "performing negotiation");
 
   /* see what the peer can do */
-  othercaps = gst_pad_peer_query_caps (scope->srcpad, NULL);
+  othercaps = gst_pad_peer_query_caps (scope->priv->srcpad, NULL);
   if (othercaps) {
     target = gst_caps_intersect (othercaps, templ);
     gst_caps_unref (othercaps);
@@ -885,7 +938,7 @@
   GST_DEBUG_OBJECT (scope, "doing allocation query");
   query = gst_query_new_allocation (outcaps, TRUE);
 
-  if (!gst_pad_peer_query (scope->srcpad, query)) {
+  if (!gst_pad_peer_query (scope->priv->srcpad, query)) {
     /* not a problem, we use the query defaults */
     GST_DEBUG_OBJECT (scope, "allocation query failed");
   }
@@ -1032,6 +1085,7 @@
 {
   GstFlowReturn ret = GST_FLOW_OK;
   GstAudioVisualizer *scope;
+  GstAudioVisualizerPrivate *priv;
   GstAudioVisualizerClass *klass;
   GstBuffer *inbuf;
   guint64 dist, ts;
@@ -1040,19 +1094,20 @@
   gint bps, channels, rate;
 
   scope = GST_AUDIO_VISUALIZER (parent);
+  priv = scope->priv;
   klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope));
 
   GST_LOG_OBJECT (scope, "chainfunc called");
 
   /* resync on DISCONT */
   if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) {
-    gst_adapter_clear (scope->adapter);
+    gst_adapter_clear (priv->adapter);
   }
 
   /* Make sure have an output format */
-  if (gst_pad_check_reconfigure (scope->srcpad)) {
+  if (gst_pad_check_reconfigure (priv->srcpad)) {
     if (!gst_audio_visualizer_src_negotiate (scope)) {
-      gst_pad_mark_reconfigure (scope->srcpad);
+      gst_pad_mark_reconfigure (priv->srcpad);
       goto not_negotiated;
     }
   }
@@ -1066,56 +1121,75 @@
     goto beach;
   }
 
-  gst_adapter_push (scope->adapter, buffer);
+  gst_adapter_push (priv->adapter, buffer);
 
-  g_mutex_lock (&scope->config_lock);
+  g_mutex_lock (&priv->config_lock);
 
   /* this is what we want */
   sbpf = scope->req_spf * channels * sizeof (gint16);
 
-  inbuf = scope->inbuf;
+  inbuf = priv->inbuf;
   /* FIXME: the timestamp in the adapter would be different */
   gst_buffer_copy_into (inbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1);
 
   /* this is what we have */
-  avail = gst_adapter_available (scope->adapter);
+  avail = gst_adapter_available (priv->adapter);
   GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf);
   while (avail >= sbpf) {
     GstBuffer *outbuf;
     GstVideoFrame outframe;
 
     /* get timestamp of the current adapter content */
-    ts = gst_adapter_prev_pts (scope->adapter, &dist);
+    ts = gst_adapter_prev_pts (priv->adapter, &dist);
     if (GST_CLOCK_TIME_IS_VALID (ts)) {
       /* convert bytes to time */
       dist /= bps;
       ts += gst_util_uint64_scale_int (dist, GST_SECOND, rate);
     }
 
+    /* check for QoS, don't compute buffers that are known to be late */
     if (GST_CLOCK_TIME_IS_VALID (ts)) {
+      GstClockTime earliest_time;
+      gdouble proportion;
       gint64 qostime;
-      gboolean need_skip;
 
       qostime =
-          gst_segment_to_running_time (&scope->segment, GST_FORMAT_TIME, ts) +
-          scope->frame_duration;
+          gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME,
+          ts) + priv->frame_duration;
 
       GST_OBJECT_LOCK (scope);
-      /* check for QoS, don't compute buffers that are known to be late */
-      need_skip = scope->earliest_time != -1 && qostime <= scope->earliest_time;
+      earliest_time = priv->earliest_time;
+      proportion = priv->proportion;
       GST_OBJECT_UNLOCK (scope);
 
-      if (need_skip) {
-        GST_WARNING_OBJECT (scope,
+      if (GST_CLOCK_TIME_IS_VALID (earliest_time) && qostime <= earliest_time) {
+        GstClockTime stream_time, jitter;
+        GstMessage *qos_msg;
+
+        GST_DEBUG_OBJECT (scope,
             "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (qostime), GST_TIME_ARGS (scope->earliest_time));
+            GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time));
+
+        ++priv->dropped;
+        stream_time = gst_segment_to_stream_time (&priv->segment,
+            GST_FORMAT_TIME, ts);
+        jitter = GST_CLOCK_DIFF (qostime, earliest_time);
+        qos_msg = gst_message_new_qos (GST_OBJECT (scope), FALSE, qostime,
+            stream_time, ts, GST_BUFFER_DURATION (buffer));
+        gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000);
+        gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS,
+            priv->processed, priv->dropped);
+        gst_element_post_message (GST_ELEMENT (scope), qos_msg);
+
         goto skip;
       }
     }
 
-    g_mutex_unlock (&scope->config_lock);
+    ++priv->processed;
+
+    g_mutex_unlock (&priv->config_lock);
     ret = default_prepare_output_buffer (scope, &outbuf);
-    g_mutex_lock (&scope->config_lock);
+    g_mutex_lock (&priv->config_lock);
     /* recheck as the value could have changed */
     sbpf = scope->req_spf * channels * sizeof (gint16);
 
@@ -1128,16 +1202,16 @@
       gst_object_sync_values (GST_OBJECT (scope), ts);
 
     GST_BUFFER_TIMESTAMP (outbuf) = ts;
-    GST_BUFFER_DURATION (outbuf) = scope->frame_duration;
+    GST_BUFFER_DURATION (outbuf) = priv->frame_duration;
 
     /* this can fail as the data size we need could have changed */
-    if (!(adata = (gpointer) gst_adapter_map (scope->adapter, sbpf)))
+    if (!(adata = (gpointer) gst_adapter_map (priv->adapter, sbpf)))
       break;
 
     gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE);
 
-    if (scope->shader) {
-      gst_video_frame_copy (&outframe, &scope->tempframe);
+    if (priv->shader) {
+      gst_video_frame_copy (&outframe, &priv->tempframe);
     } else {
       /* gst_video_frame_clear() or is output frame already cleared */
       gint i;
@@ -1155,21 +1229,22 @@
     if (klass->render) {
       if (!klass->render (scope, inbuf, &outframe)) {
         ret = GST_FLOW_ERROR;
+        gst_video_frame_unmap (&outframe);
+        goto beach;
       } else {
         /* run various post processing (shading and geometric transformation) */
         /* FIXME: SHADER assumes 32bpp */
-        if (scope->shader &&
-            GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) {
-          scope->shader (scope, &outframe, &scope->tempframe);
+        if (priv->shader && GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) {
+          priv->shader (scope, &outframe, &priv->tempframe);
         }
       }
     }
     gst_video_frame_unmap (&outframe);
 
-    g_mutex_unlock (&scope->config_lock);
-    ret = gst_pad_push (scope->srcpad, outbuf);
+    g_mutex_unlock (&priv->config_lock);
+    ret = gst_pad_push (priv->srcpad, outbuf);
     outbuf = NULL;
-    g_mutex_lock (&scope->config_lock);
+    g_mutex_lock (&priv->config_lock);
 
   skip:
     /* recheck as the value could have changed */
@@ -1177,21 +1252,21 @@
     GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf);
     /* we want to take less or more, depending on spf : req_spf */
     if (avail - sbpf >= sbpf) {
-      gst_adapter_flush (scope->adapter, sbpf);
-      gst_adapter_unmap (scope->adapter);
+      gst_adapter_flush (priv->adapter, sbpf);
+      gst_adapter_unmap (priv->adapter);
     } else if (avail >= sbpf) {
       /* just flush a bit and stop */
-      gst_adapter_flush (scope->adapter, (avail - sbpf));
-      gst_adapter_unmap (scope->adapter);
+      gst_adapter_flush (priv->adapter, (avail - sbpf));
+      gst_adapter_unmap (priv->adapter);
       break;
     }
-    avail = gst_adapter_available (scope->adapter);
+    avail = gst_adapter_available (priv->adapter);
 
     if (ret != GST_FLOW_OK)
       break;
   }
 
-  g_mutex_unlock (&scope->config_lock);
+  g_mutex_unlock (&priv->config_lock);
 
 beach:
   return ret;
@@ -1210,8 +1285,10 @@
 {
   gboolean res;
   GstAudioVisualizer *scope;
+  GstAudioVisualizerPrivate *priv;
 
   scope = GST_AUDIO_VISUALIZER (parent);
+  priv = scope->priv;
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_QOS:
@@ -1224,16 +1301,16 @@
 
       /* save stuff for the _chain() function */
       GST_OBJECT_LOCK (scope);
-      scope->proportion = proportion;
+      priv->proportion = proportion;
       if (diff >= 0)
         /* we're late, this is a good estimate for next displayable
          * frame (see part-qos.txt) */
-        scope->earliest_time = timestamp + 2 * diff + scope->frame_duration;
+        priv->earliest_time = timestamp + 2 * diff + priv->frame_duration;
       else
-        scope->earliest_time = timestamp + diff;
+        priv->earliest_time = timestamp + diff;
       GST_OBJECT_UNLOCK (scope);
 
-      res = gst_pad_push_event (scope->sinkpad, event);
+      res = gst_pad_push_event (priv->sinkpad, event);
       break;
     }
     case GST_EVENT_RECONFIGURE:
@@ -1242,7 +1319,7 @@
       res = TRUE;
       break;
     default:
-      res = gst_pad_push_event (scope->sinkpad, event);
+      res = gst_pad_event_default (pad, parent, event);
       break;
   }
 
@@ -1268,25 +1345,22 @@
       gst_event_unref (event);
       break;
     }
-    case GST_EVENT_FLUSH_START:
-      res = gst_pad_push_event (scope->srcpad, event);
-      break;
     case GST_EVENT_FLUSH_STOP:
       gst_audio_visualizer_reset (scope);
-      res = gst_pad_push_event (scope->srcpad, event);
+      res = gst_pad_push_event (scope->priv->srcpad, event);
       break;
     case GST_EVENT_SEGMENT:
     {
       /* the newsegment values are used to clip the input samples
        * and to convert the incomming timestamps to running time so
        * we can do QoS */
-      gst_event_copy_segment (event, &scope->segment);
+      gst_event_copy_segment (event, &scope->priv->segment);
 
-      res = gst_pad_push_event (scope->srcpad, event);
+      res = gst_pad_push_event (scope->priv->srcpad, event);
       break;
     }
     default:
-      res = gst_pad_push_event (scope->srcpad, event);
+      res = gst_pad_event_default (pad, parent, event);
       break;
   }
 
@@ -1316,7 +1390,7 @@
       if (rate == 0)
         break;
 
-      if ((res = gst_pad_peer_query (scope->sinkpad, query))) {
+      if ((res = gst_pad_peer_query (scope->priv->sinkpad, query))) {
         gst_query_parse_latency (query, &us_live, &min_latency, &max_latency);
 
         GST_DEBUG_OBJECT (scope, "Peer latency: min %"
@@ -1324,7 +1398,7 @@
             GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
 
         /* the max samples we must buffer buffer */
-        max_samples = MAX (scope->req_spf, scope->spf);
+        max_samples = MAX (scope->req_spf, scope->priv->spf);
         our_latency = gst_util_uint64_scale_int (max_samples, GST_SECOND, rate);
 
         GST_DEBUG_OBJECT (scope, "Our latency: %" GST_TIME_FORMAT,
@@ -1352,20 +1426,6 @@
   return res;
 }
 
-static gboolean
-gst_audio_visualizer_sink_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
-{
-  gboolean res = FALSE;
-
-  switch (GST_QUERY_TYPE (query)) {
-    default:
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-  return res;
-}
-
 static GstStateChangeReturn
 gst_audio_visualizer_change_state (GstElement * element,
     GstStateChange transition)
diff --git a/gst/audiovisualizers/gstaudiovisualizer.h b/gst/audiovisualizers/gstaudiovisualizer.h
index 7f8f8d8..381de81 100644
--- a/gst/audiovisualizers/gstaudiovisualizer.h
+++ b/gst/audiovisualizers/gstaudiovisualizer.h
@@ -1,21 +1,23 @@
 /* GStreamer
  * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net>
+ * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * gstaudiovisualizer.c: base class for audio visualisation elements
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_AUDIO_VISUALIZER_H__
@@ -29,12 +31,14 @@
 #include <gst/base/gstadapter.h>
 
 G_BEGIN_DECLS
+
 #define GST_TYPE_AUDIO_VISUALIZER            (gst_audio_visualizer_get_type())
 #define GST_AUDIO_VISUALIZER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizer))
 #define GST_AUDIO_VISUALIZER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass))
 #define GST_AUDIO_VISUALIZER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass))
-#define GST_IS_SYNAESTHESIA(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER))
-#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER))
+#define GST_IS_AUDIO_VISUALIZER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER))
+#define GST_IS_AUDIO_VISUALIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER))
+
 typedef struct _GstAudioVisualizer GstAudioVisualizer;
 typedef struct _GstAudioVisualizerClass GstAudioVisualizerClass;
 typedef struct _GstAudioVisualizerPrivate GstAudioVisualizerPrivate;
@@ -73,37 +77,14 @@
 {
   GstElement parent;
 
-  /* pads */
-  GstPad *srcpad, *sinkpad;
-
-  GstAdapter *adapter;
-  GstBuffer *inbuf;
-  GstBuffer *tempbuf;
-  GstVideoFrame tempframe;
-
-  GstAudioVisualizerShader shader_type;
-  GstAudioVisualizerShaderFunc shader;
-  guint32 shade_amount;
-
-  guint spf;                    /* samples per video frame */
   guint req_spf;                /* min samples per frame wanted by the subclass */
 
   /* video state */
   GstVideoInfo vinfo;
-  guint64 frame_duration;
 
   /* audio state */
   GstAudioInfo ainfo;
 
-  /* configuration mutex */
-  GMutex config_lock;
-
-  /* QoS stuff *//* with LOCK */
-  gdouble proportion;
-  GstClockTime earliest_time;
-
-  GstSegment segment;
-
   /* <private> */
   GstAudioVisualizerPrivate *priv;
 };
diff --git a/gst/audiovisualizers/gstdrawhelpers.h b/gst/audiovisualizers/gstdrawhelpers.h
index d5bd724..15220ac 100644
--- a/gst/audiovisualizers/gstdrawhelpers.h
+++ b/gst/audiovisualizers/gstdrawhelpers.h
@@ -3,19 +3,20 @@
  *
  * gstdrawhelpers.h: simple drawing helpers
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
  
 /* FIXME: add versions that don't ignore alpha */
diff --git a/gst/audiovisualizers/gstspacescope.c b/gst/audiovisualizers/gstspacescope.c
index 246b8f5..b0828a8 100644
--- a/gst/audiovisualizers/gstspacescope.c
+++ b/gst/audiovisualizers/gstspacescope.c
@@ -3,19 +3,20 @@
  *
  * gstspacescope.c: simple stereo visualizer
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /**
  * SECTION:element-spacescope
diff --git a/gst/audiovisualizers/gstspacescope.h b/gst/audiovisualizers/gstspacescope.h
index 7717c77..a305ab5 100644
--- a/gst/audiovisualizers/gstspacescope.h
+++ b/gst/audiovisualizers/gstspacescope.h
@@ -3,22 +3,22 @@
  *
  * gstspacescope.h: simple stereo visualizer
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
-
 #ifndef __GST_SPACE_SCOPE_H__
 #define __GST_SPACE_SCOPE_H__
 
@@ -59,4 +59,4 @@
 gboolean gst_space_scope_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
-#endif /* __GST_SPACE_SCOPE_H__ */
\ No newline at end of file
+#endif /* __GST_SPACE_SCOPE_H__ */
diff --git a/gst/audiovisualizers/gstspectrascope.c b/gst/audiovisualizers/gstspectrascope.c
index 1267854..ff43cfd 100644
--- a/gst/audiovisualizers/gstspectrascope.c
+++ b/gst/audiovisualizers/gstspectrascope.c
@@ -3,19 +3,21 @@
  *
  * gstspectrascope.c: frequency spectrum scope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+
  */
 /**
  * SECTION:element-spectrascope
diff --git a/gst/audiovisualizers/gstspectrascope.h b/gst/audiovisualizers/gstspectrascope.h
index 678e79a..0b21d08 100644
--- a/gst/audiovisualizers/gstspectrascope.h
+++ b/gst/audiovisualizers/gstspectrascope.h
@@ -3,22 +3,22 @@
  *
  * gstspectrascope.h: simple oscilloscope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
-
 #ifndef __GST_SPECTRA_SCOPE_H__
 #define __GST_SPECTRA_SCOPE_H__
 
@@ -51,4 +51,4 @@
 gboolean gst_spectra_scope_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
-#endif /* __GST_SPECTRA_SCOPE_H__ */
\ No newline at end of file
+#endif /* __GST_SPECTRA_SCOPE_H__ */
diff --git a/gst/audiovisualizers/gstsynaescope.c b/gst/audiovisualizers/gstsynaescope.c
index 909dddd..23d15f0 100644
--- a/gst/audiovisualizers/gstsynaescope.c
+++ b/gst/audiovisualizers/gstsynaescope.c
@@ -3,19 +3,20 @@
  *
  * gstsynaescope.c: frequency spectrum scope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /**
  * SECTION:element-synaescope
diff --git a/gst/audiovisualizers/gstsynaescope.h b/gst/audiovisualizers/gstsynaescope.h
index 827fd55..a3148ed 100644
--- a/gst/audiovisualizers/gstsynaescope.h
+++ b/gst/audiovisualizers/gstsynaescope.h
@@ -3,22 +3,22 @@
  *
  * gstsynaescope.h: simple oscilloscope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
-
 #ifndef __GST_SYNAE_SCOPE_H__
 #define __GST_SYNAE_SCOPE_H__
 
@@ -55,4 +55,4 @@
 gboolean gst_synae_scope_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
-#endif /* __GST_SYNAE_SCOPE_H__ */
\ No newline at end of file
+#endif /* __GST_SYNAE_SCOPE_H__ */
diff --git a/gst/audiovisualizers/gstwavescope.c b/gst/audiovisualizers/gstwavescope.c
index 6502b88..b87d05c 100644
--- a/gst/audiovisualizers/gstwavescope.c
+++ b/gst/audiovisualizers/gstwavescope.c
@@ -3,19 +3,20 @@
  *
  * gstwavescope.c: simple oscilloscope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /**
  * SECTION:element-wavescope
@@ -149,8 +150,6 @@
       gst_static_pad_template_get (&gst_wave_scope_src_template));
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&gst_wave_scope_sink_template));
-
-  scope_class->render = GST_DEBUG_FUNCPTR (gst_wave_scope_render);
 }
 
 static void
@@ -325,15 +324,15 @@
       filter ((gfloat) adata[s]);
 
       y = (guint) (oy + flt[0] * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_dot_c (vdata, x, y, w, 0x00FF0000);
 
       y = (guint) (oy + flt[3] * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_dot_c (vdata, x, y, w, 0x0000FF00);
 
       y = (guint) (oy + (flt[4] + flt[5]) * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_dot_c (vdata, x, y, w, 0x000000FF);
 
       s += channels;
@@ -367,30 +366,30 @@
     filter ((gfloat) adata[s]);
 
     y = (guint) (oy + flt[0] * dy);
-    y2 = CLAMP (y, 0, h1);
+    y2 = MIN (y, h1);
 
     y = (guint) (oy + flt[3] * dy);
-    y3 = CLAMP (y, 0, h1);
+    y3 = MIN (y, h1);
 
     y = (guint) (oy + (flt[4] + flt[5]) * dy);
-    y4 = CLAMP (y, 0, h1);
+    y4 = MIN (y, h1);
 
     for (i = 1; i < num_samples; i++) {
       x = (guint) ((gfloat) i * dx);
       filter ((gfloat) adata[s]);
 
       y = (guint) (oy + flt[0] * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_line_aa (vdata, x2, x, y2, y, w, 0x00FF0000);
       y2 = y;
 
       y = (guint) (oy + flt[3] * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_line_aa (vdata, x2, x, y3, y, w, 0x0000FF00);
       y3 = y;
 
       y = (guint) (oy + (flt[4] + flt[5]) * dy);
-      y = CLAMP (y, 0, h1);
+      y = MIN (y, h1);
       draw_line_aa (vdata, x2, x, y4, y, w, 0x000000FF);
       y4 = y;
 
diff --git a/gst/audiovisualizers/gstwavescope.h b/gst/audiovisualizers/gstwavescope.h
index e4652eb..087f179 100644
--- a/gst/audiovisualizers/gstwavescope.h
+++ b/gst/audiovisualizers/gstwavescope.h
@@ -3,22 +3,22 @@
  *
  * gstwavescope.h: simple oscilloscope
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
-
 #ifndef __GST_WAVE_SCOPE_H__
 #define __GST_WAVE_SCOPE_H__
 
@@ -56,4 +56,4 @@
 gboolean gst_wave_scope_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
-#endif /* __GST_WAVE_SCOPE_H__ */
\ No newline at end of file
+#endif /* __GST_WAVE_SCOPE_H__ */
diff --git a/gst/audiovisualizers/plugin.c b/gst/audiovisualizers/plugin.c
index a21d65a..b93f491 100644
--- a/gst/audiovisualizers/plugin.c
+++ b/gst/audiovisualizers/plugin.c
@@ -3,19 +3,20 @@
  *
  * plugin.c: scopes plugin
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -44,4 +45,4 @@
     GST_VERSION_MINOR,
     audiovisualizers,
     "Creates video visualizations of audio input",
-    plugin_init, VERSION, "GPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/gst/autoconvert/Makefile.am b/gst/autoconvert/Makefile.am
index 35f73eb..1e3c5fb 100644
--- a/gst/autoconvert/Makefile.am
+++ b/gst/autoconvert/Makefile.am
@@ -8,17 +8,3 @@
 libgstautoconvert_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstautoconvert.h gstautovideoconvert.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstautoconvert -:SHARED libgstautoconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstautoconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautoconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstautoconvert_la_LDFLAGS) \
-	           $(libgstautoconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/autoconvert/Makefile.in b/gst/autoconvert/Makefile.in
index 4a9e048..94918fe 100644
--- a/gst/autoconvert/Makefile.in
+++ b/gst/autoconvert/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/autoconvert
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/autoconvert/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/autoconvert/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1074,20 +1108,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstautoconvert -:SHARED libgstautoconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstautoconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautoconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstautoconvert_la_LDFLAGS) \
-	           $(libgstautoconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/bayer/Makefile.am b/gst/bayer/Makefile.am
index 3754dab..4814251 100644
--- a/gst/bayer/Makefile.am
+++ b/gst/bayer/Makefile.am
@@ -20,20 +20,3 @@
 libgstbayer_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstbayer_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 nodist_libgstbayer_la_SOURCES = $(ORC_NODIST_SOURCES)
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstbayer -:SHARED libgstbayer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstbayer_la_SOURCES) \
-               $(nodist_libgstbayer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstbayer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstbayer_la_LDFLAGS) \
-	           $(libgstbayer_la_LIBADD) \
-	           $(libgstbayer_la_LIBTOOLFLAGS) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/bayer/Makefile.in b/gst/bayer/Makefile.in
index 9c49e57..f55d0b5 100644
--- a/gst/bayer/Makefile.in
+++ b/gst/bayer/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -37,7 +37,17 @@
 #
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -101,8 +111,6 @@
 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
 subdir = gst/bayer
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -111,6 +119,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -124,7 +133,6 @@
 	$(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 \
@@ -141,6 +149,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -251,6 +260,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -268,8 +279,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -294,8 +307,6 @@
 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@
@@ -308,7 +319,6 @@
 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@
@@ -316,6 +326,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -344,11 +356,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -367,8 +382,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -427,10 +440,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -447,7 +464,6 @@
 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@
@@ -456,7 +472,6 @@
 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@
@@ -469,7 +484,6 @@
 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@
@@ -483,6 +497,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -494,6 +509,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -532,6 +549,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -567,10 +585,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -596,6 +618,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -603,7 +628,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -632,6 +664,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -642,6 +675,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -672,17 +706,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -699,6 +732,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -737,6 +771,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -795,7 +830,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/bayer/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/bayer/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -804,7 +838,7 @@
 	    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_srcdir)/common/orc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1136,6 +1170,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 orc-update: tmp-orc.c $(ORC_SOURCE).h
 	$(top_srcdir)/common/gst-indent tmp-orc.c
@@ -1173,22 +1209,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstbayer -:SHARED libgstbayer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstbayer_la_SOURCES) \
-               $(nodist_libgstbayer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstbayer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstbayer_la_LDFLAGS) \
-	           $(libgstbayer_la_LIBADD) \
-	           $(libgstbayer_la_LIBTOOLFLAGS) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/bayer/gstbayer2rgb.c b/gst/bayer/gstbayer2rgb.c
index f076231..e159ca2 100644
--- a/gst/bayer/gstbayer2rgb.c
+++ b/gst/bayer/gstbayer2rgb.c
@@ -286,7 +286,7 @@
   GstCaps *newcaps;
   GstStructure *newstruct;
 
-  GST_DEBUG_OBJECT (caps, "transforming caps (from)");
+  GST_DEBUG_OBJECT (base, "transforming caps from %" GST_PTR_FORMAT, caps);
 
   structure = gst_caps_get_structure (caps, 0);
 
@@ -305,7 +305,17 @@
   gst_structure_set_value (newstruct, "framerate",
       gst_structure_get_value (structure, "framerate"));
 
-  GST_DEBUG_OBJECT (newcaps, "transforming caps (into)");
+  if (filter != NULL) {
+    GstCaps *icaps;
+
+    GST_DEBUG_OBJECT (base, "                filter %" GST_PTR_FORMAT, filter);
+
+    icaps = gst_caps_intersect_full (filter, newcaps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (newcaps);
+    newcaps = icaps;
+  }
+
+  GST_DEBUG_OBJECT (base, "                  into %" GST_PTR_FORMAT, newcaps);
 
   return newcaps;
 }
@@ -452,14 +462,25 @@
   GstVideoFrame frame;
 
   GST_DEBUG ("transforming buffer");
-  gst_buffer_map (inbuf, &map, GST_MAP_READ);
-  gst_video_frame_map (&frame, &filter->info, outbuf, GST_MAP_WRITE);
+
+  if (!gst_buffer_map (inbuf, &map, GST_MAP_READ))
+    goto map_failed;
+
+  if (!gst_video_frame_map (&frame, &filter->info, outbuf, GST_MAP_WRITE)) {
+    gst_buffer_unmap (inbuf, &map);
+    goto map_failed;
+  }
 
   output = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
-  gst_bayer2rgb_process (filter, output, filter->width * 4,
+  gst_bayer2rgb_process (filter, output, frame.info.stride[0],
       map.data, filter->width);
+
   gst_video_frame_unmap (&frame);
   gst_buffer_unmap (inbuf, &map);
 
   return GST_FLOW_OK;
+
+map_failed:
+  GST_WARNING_OBJECT (base, "Could not map buffer, skipping");
+  return GST_FLOW_OK;
 }
diff --git a/gst/bayer/gstbayerorc-dist.c b/gst/bayer/gstbayerorc-dist.c
index af75511..1bc39a6 100644
--- a/gst/bayer/gstbayerorc-dist.c
+++ b/gst/bayer/gstbayerorc-dist.c
@@ -667,16 +667,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -690,6 +695,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -697,71 +705,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: loadw */
     var44 = ptr6[i];
     /* 15: mergebw */
     {
       orc_union16 _dest;
       _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var42.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var42.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -795,16 +803,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -818,6 +831,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -825,71 +841,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: loadw */
     var44 = ptr6[i];
     /* 15: mergebw */
     {
       orc_union16 _dest;
       _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var42.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var42.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -915,11 +931,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 98, 103, 95, 98, 103, 114, 97, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 5, 9, 21, 1, 39, 35, 4,
-        8, 79, 36, 7, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 33, 6, 35, 21, 1, 196, 32,
-        34, 16, 21, 1, 195, 0, 33, 32, 2, 0,
+        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 5,
+        9, 21, 1, 39, 35, 4, 8, 79, 36, 7, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 33,
+        6, 35, 21, 1, 196, 32, 34, 18, 21, 1, 195, 0, 33, 32, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_bgra);
@@ -936,6 +953,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x000000ff, "c1");
       orc_program_add_constant (p, 2, 0x0000ff00, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -958,7 +976,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_C1,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_C3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
           ORC_VAR_D1);
@@ -1021,16 +1039,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -1044,6 +1067,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1051,71 +1077,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var43.x2[0];
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var43.x2[1];
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 15: loadw */
+    var44 = ptr7[i];
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1149,16 +1175,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -1172,6 +1203,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1179,71 +1213,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var43.x2[0];
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var43.x2[1];
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 15: loadw */
+    var44 = ptr7[i];
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1269,11 +1303,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 103, 114, 95, 98, 103, 114, 97, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 4, 8, 21, 1, 39, 35, 5,
-        9, 79, 36, 6, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 33, 34, 35, 21, 1, 196, 32,
-        7, 17, 21, 1, 195, 0, 33, 32, 2, 0,
+        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 4,
+        8, 21, 1, 39, 35, 5, 9, 79, 36, 6, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 33,
+        34, 35, 21, 1, 196, 32, 7, 18, 21, 1, 195, 0, 33, 32, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_bgra);
@@ -1290,6 +1325,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x0000ff00, "c1");
       orc_program_add_constant (p, 2, 0x000000ff, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -1312,7 +1348,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_C2,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_C3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
           ORC_VAR_D1);
@@ -1374,17 +1410,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -1398,6 +1439,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1405,71 +1449,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr6[i];
-    /* 15: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[0];
-      _dest.x2[1] = var44.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[1];
-      _dest.x2[1] = var44.x2[1];
-      var53.x2[1] = _dest.i;
-    }
+    var53.i = var52.i | var51.i;
+    /* 15: loadw */
+    var45 = ptr6[i];
     /* 16: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var46.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var46.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var47.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var47.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1502,17 +1546,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -1526,6 +1575,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1533,71 +1585,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr6[i];
-    /* 15: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[0];
-      _dest.x2[1] = var44.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[1];
-      _dest.x2[1] = var44.x2[1];
-      var53.x2[1] = _dest.i;
-    }
+    var53.i = var52.i | var51.i;
+    /* 15: loadw */
+    var45 = ptr6[i];
     /* 16: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var46.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var46.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var47.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var47.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1623,11 +1675,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 98, 103, 95, 97, 98, 103, 114, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 5, 9, 21, 1, 39, 35, 4,
-        8, 79, 36, 7, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 16, 6, 21, 1, 196, 33,
-        35, 34, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 5,
+        9, 21, 1, 39, 35, 4, 8, 79, 36, 7, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        18, 6, 21, 1, 196, 33, 35, 34, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_abgr);
@@ -1644,6 +1697,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x000000ff, "c1");
       orc_program_add_constant (p, 2, 0x0000ff00, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -1664,7 +1718,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_S3,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C3, ORC_VAR_S3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_T3,
           ORC_VAR_D1);
@@ -1728,17 +1782,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -1752,6 +1811,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1759,71 +1821,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
+    var53.i = var52.i | var51.i;
+    /* 15: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var43.x2[0];
-      _dest.x2[1] = var46.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[1];
-      _dest.x2[1] = var46.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var44.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var47.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var44.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var47.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 16: loadw */
+    var45 = ptr7[i];
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1856,17 +1918,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -1880,6 +1947,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -1887,71 +1957,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
+    var53.i = var52.i | var51.i;
+    /* 15: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var43.x2[0];
-      _dest.x2[1] = var46.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[1];
-      _dest.x2[1] = var46.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var44.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var47.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var44.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var47.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 16: loadw */
+    var45 = ptr7[i];
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -1977,11 +2047,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 103, 114, 95, 97, 98, 103, 114, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 4, 8, 21, 1, 39, 35, 5,
-        9, 79, 36, 6, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 17, 34, 21, 1, 196, 33,
-        35, 7, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 4,
+        8, 21, 1, 39, 35, 5, 9, 79, 36, 6, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        18, 34, 21, 1, 196, 33, 35, 7, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_abgr);
@@ -1998,6 +2069,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x0000ff00, "c1");
       orc_program_add_constant (p, 2, 0x000000ff, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -2018,7 +2090,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_T3,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C3, ORC_VAR_T3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_S4,
           ORC_VAR_D1);
@@ -2083,16 +2155,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -2106,6 +2183,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2113,71 +2193,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var42.x2[0];
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var42.x2[1];
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 15: loadw */
+    var44 = ptr6[i];
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -2211,16 +2291,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -2234,6 +2319,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2241,71 +2329,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var42.x2[0];
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var42.x2[1];
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 15: loadw */
+    var44 = ptr6[i];
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -2331,11 +2419,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 98, 103, 95, 114, 103, 98, 97, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 5, 9, 21, 1, 39, 35, 4,
-        8, 79, 36, 7, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 34, 35, 21, 1, 196, 33,
-        6, 16, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 5,
+        9, 21, 1, 39, 35, 4, 8, 79, 36, 7, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        34, 35, 21, 1, 196, 33, 6, 18, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_rgba);
@@ -2352,6 +2441,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x000000ff, "c1");
       orc_program_add_constant (p, 2, 0x0000ff00, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -2374,7 +2464,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_C1,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_C3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
           ORC_VAR_D1);
@@ -2437,16 +2527,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -2460,6 +2555,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2467,71 +2565,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: loadw */
     var44 = ptr7[i];
     /* 15: mergebw */
     {
       orc_union16 _dest;
       _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var43.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var43.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -2565,16 +2663,21 @@
   orc_union16 var43;
 #endif
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var45;
+#else
+  orc_union16 var45;
+#endif
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -2588,6 +2691,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 16: loadpb */
+  var45.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var45.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2595,71 +2701,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
+    var53.i = var52.i | var51.i;
     /* 14: loadw */
     var44 = ptr7[i];
     /* 15: mergebw */
     {
       orc_union16 _dest;
       _dest.x2[0] = var44.x2[0];
-      _dest.x2[1] = var52.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var44.x2[1];
-      _dest.x2[1] = var52.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var46.x2[0];
-      _dest.x2[1] = var43.x2[0];
+      _dest.x2[1] = var53.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var46.x2[1];
-      _dest.x2[1] = var43.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var53.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[0];
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var47.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -2685,11 +2791,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 103, 114, 95, 114, 103, 98, 97, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 4, 8, 21, 1, 39, 35, 5,
-        9, 79, 36, 6, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 7, 35, 21, 1, 196, 33,
-        34, 17, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 4,
+        8, 21, 1, 39, 35, 5, 9, 79, 36, 6, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        7, 35, 21, 1, 196, 33, 34, 18, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_rgba);
@@ -2706,6 +2813,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x0000ff00, "c1");
       orc_program_add_constant (p, 2, 0x000000ff, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -2728,7 +2836,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_C2,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_C3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
           ORC_VAR_D1);
@@ -2790,17 +2898,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -2814,6 +2927,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2821,71 +2937,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
+    var53.i = var52.i | var51.i;
+    /* 15: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var42.x2[0];
-      _dest.x2[1] = var46.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[1];
-      _dest.x2[1] = var46.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var44.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var47.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var44.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var47.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 16: loadw */
+    var45 = ptr6[i];
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -2918,17 +3034,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -2942,6 +3063,9 @@
   var42.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
   /* 11: loadpw */
   var43.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -2949,71 +3073,71 @@
     /* 1: loadw */
     var38 = ptr9[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr4[i];
     /* 4: loadw */
     var40 = ptr8[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr7[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
+    var53.i = var52.i | var51.i;
+    /* 15: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var42.x2[0];
-      _dest.x2[1] = var46.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var42.x2[1];
-      _dest.x2[1] = var46.x2[1];
-      var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var44.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var47.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var44.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var47.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 16: loadw */
+    var45 = ptr6[i];
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var45.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var45.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -3039,11 +3163,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 98, 103, 95, 97, 114, 103, 98, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 5, 9, 21, 1, 39, 35, 4,
-        8, 79, 36, 7, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 16, 34, 21, 1, 196, 33,
-        35, 6, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 255, 0, 0, 0, 14, 2, 0, 255, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 5,
+        9, 21, 1, 39, 35, 4, 8, 79, 36, 7, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        18, 34, 21, 1, 196, 33, 35, 6, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_argb);
@@ -3060,6 +3185,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x000000ff, "c1");
       orc_program_add_constant (p, 2, 0x0000ff00, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -3080,7 +3206,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_T3,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C3, ORC_VAR_T3,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_S3,
           ORC_VAR_D1);
@@ -3144,17 +3270,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) d1;
   ptr4 = (orc_union16 *) s1;
@@ -3168,6 +3299,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -3175,71 +3309,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr7[i];
-    /* 15: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[0];
-      _dest.x2[1] = var44.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[1];
-      _dest.x2[1] = var44.x2[1];
-      var53.x2[1] = _dest.i;
-    }
+    var53.i = var52.i | var51.i;
+    /* 15: loadw */
+    var45 = ptr7[i];
     /* 16: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var46.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var46.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var47.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var47.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -3272,17 +3406,22 @@
 #else
   orc_union16 var43;
 #endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var44;
+#else
   orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
+#endif
+  orc_union16 var45;
+  orc_union64 var46;
   orc_union16 var47;
   orc_union16 var48;
   orc_union16 var49;
   orc_union16 var50;
   orc_union16 var51;
   orc_union16 var52;
-  orc_union32 var53;
+  orc_union16 var53;
   orc_union32 var54;
+  orc_union32 var55;
 
   ptr0 = (orc_union64 *) ex->arrays[0];
   ptr4 = (orc_union16 *) ex->arrays[4];
@@ -3296,6 +3435,9 @@
   var42.i = (int) 0x0000ff00;   /* 65280 or 3.22526e-319f */
   /* 11: loadpw */
   var43.i = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+  /* 14: loadpb */
+  var44.x2[0] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
+  var44.x2[1] = (int) 0x000000ff;       /* 255 or 1.25987e-321f */
 
   for (i = 0; i < n; i++) {
     /* 0: loadw */
@@ -3303,71 +3445,71 @@
     /* 1: loadw */
     var38 = ptr8[i];
     /* 2: avgub */
-    var46.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
-    var46.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
+    var47.x2[0] = ((orc_uint8) var37.x2[0] + (orc_uint8) var38.x2[0] + 1) >> 1;
+    var47.x2[1] = ((orc_uint8) var37.x2[1] + (orc_uint8) var38.x2[1] + 1) >> 1;
     /* 3: loadw */
     var39 = ptr5[i];
     /* 4: loadw */
     var40 = ptr9[i];
     /* 5: avgub */
-    var47.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
-    var47.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
+    var48.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1;
+    var48.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1;
     /* 6: loadw */
     var41 = ptr6[i];
     /* 7: copyw */
-    var48.i = var41.i;
+    var49.i = var41.i;
     /* 8: avgub */
-    var49.x2[0] = ((orc_uint8) var47.x2[0] + (orc_uint8) var48.x2[0] + 1) >> 1;
-    var49.x2[1] = ((orc_uint8) var47.x2[1] + (orc_uint8) var48.x2[1] + 1) >> 1;
+    var50.x2[0] = ((orc_uint8) var48.x2[0] + (orc_uint8) var49.x2[0] + 1) >> 1;
+    var50.x2[1] = ((orc_uint8) var48.x2[1] + (orc_uint8) var49.x2[1] + 1) >> 1;
     /* 10: andw */
-    var50.i = var49.i & var42.i;
+    var51.i = var50.i & var42.i;
     /* 12: andw */
-    var51.i = var48.i & var43.i;
+    var52.i = var49.i & var43.i;
     /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr7[i];
-    /* 15: mergebw */
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[0];
-      _dest.x2[1] = var44.x2[0];
-      var53.x2[0] = _dest.i;
-    }
-    {
-      orc_union16 _dest;
-      _dest.x2[0] = var43.x2[1];
-      _dest.x2[1] = var44.x2[1];
-      var53.x2[1] = _dest.i;
-    }
+    var53.i = var52.i | var51.i;
+    /* 15: loadw */
+    var45 = ptr7[i];
     /* 16: mergebw */
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[0];
-      _dest.x2[1] = var46.x2[0];
+      _dest.x2[0] = var44.x2[0];
+      _dest.x2[1] = var45.x2[0];
       var54.x2[0] = _dest.i;
     }
     {
       orc_union16 _dest;
-      _dest.x2[0] = var52.x2[1];
-      _dest.x2[1] = var46.x2[1];
+      _dest.x2[0] = var44.x2[1];
+      _dest.x2[1] = var45.x2[1];
       var54.x2[1] = _dest.i;
     }
-    /* 17: mergewl */
+    /* 17: mergebw */
     {
-      orc_union32 _dest;
+      orc_union16 _dest;
       _dest.x2[0] = var53.x2[0];
-      _dest.x2[1] = var54.x2[0];
-      var45.x2[0] = _dest.i;
+      _dest.x2[1] = var47.x2[0];
+      var55.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var53.x2[1];
+      _dest.x2[1] = var47.x2[1];
+      var55.x2[1] = _dest.i;
+    }
+    /* 18: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var54.x2[0];
+      _dest.x2[1] = var55.x2[0];
+      var46.x2[0] = _dest.i;
     }
     {
       orc_union32 _dest;
-      _dest.x2[0] = var53.x2[1];
-      _dest.x2[1] = var54.x2[1];
-      var45.x2[1] = _dest.i;
+      _dest.x2[0] = var54.x2[1];
+      _dest.x2[1] = var55.x2[1];
+      var46.x2[1] = _dest.i;
     }
-    /* 18: storeq */
-    ptr0[i] = var45;
+    /* 19: storeq */
+    ptr0[i] = var46;
   }
 
 }
@@ -3393,11 +3535,12 @@
         1, 9, 23, 98, 97, 121, 101, 114, 95, 111, 114, 99, 95, 109, 101, 114,
         103, 101, 95, 103, 114, 95, 97, 114, 103, 98, 11, 8, 8, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14,
-        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 20, 4, 20, 4, 20,
-        2, 20, 2, 20, 2, 21, 1, 39, 34, 4, 8, 21, 1, 39, 35, 5,
-        9, 79, 36, 6, 21, 1, 39, 35, 35, 36, 73, 35, 35, 16, 73, 36,
-        36, 17, 92, 35, 36, 35, 21, 1, 196, 32, 17, 7, 21, 1, 196, 33,
-        35, 34, 21, 1, 195, 0, 32, 33, 2, 0,
+        2, 0, 255, 0, 0, 14, 2, 255, 0, 0, 0, 14, 1, 255, 0, 0,
+        0, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 21, 1, 39, 34, 4,
+        8, 21, 1, 39, 35, 5, 9, 79, 36, 6, 21, 1, 39, 35, 35, 36,
+        73, 35, 35, 16, 73, 36, 36, 17, 92, 35, 36, 35, 21, 1, 196, 32,
+        18, 7, 21, 1, 196, 33, 35, 34, 21, 1, 195, 0, 32, 33, 2, 0,
+
       };
       p = orc_program_new_from_static_bytecode (bc);
       orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_argb);
@@ -3414,6 +3557,7 @@
       orc_program_add_source (p, 2, "s6");
       orc_program_add_constant (p, 2, 0x0000ff00, "c1");
       orc_program_add_constant (p, 2, 0x000000ff, "c2");
+      orc_program_add_constant (p, 1, 0x000000ff, "c3");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
       orc_program_add_temporary (p, 2, "t3");
@@ -3434,7 +3578,7 @@
           ORC_VAR_D1);
       orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4,
           ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_S4,
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C3, ORC_VAR_S4,
           ORC_VAR_D1);
       orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_T3,
           ORC_VAR_D1);
diff --git a/gst/bayer/gstrgb2bayer.c b/gst/bayer/gstrgb2bayer.c
index 5da9b47..495f151 100644
--- a/gst/bayer/gstrgb2bayer.c
+++ b/gst/bayer/gstrgb2bayer.c
@@ -243,15 +243,20 @@
   int width = rgb2bayer->width;
   GstVideoFrame frame;
 
-  gst_video_frame_map (&frame, &rgb2bayer->info, inbuf, GST_MAP_READ);
+  if (!gst_video_frame_map (&frame, &rgb2bayer->info, inbuf, GST_MAP_READ))
+    goto map_failed;
 
-  gst_buffer_map (outbuf, &map, GST_MAP_READ);
+  if (!gst_buffer_map (outbuf, &map, GST_MAP_READ)) {
+    gst_video_frame_unmap (&frame);
+    goto map_failed;
+  }
+
   dest = map.data;
   src = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
 
   for (j = 0; j < height; j++) {
     guint8 *dest_line = dest + width * j;
-    guint8 *src_line = src + width * 4 * j;
+    guint8 *src_line = src + frame.info.stride[0] * j;
 
     for (i = 0; i < width; i++) {
       int is_blue = ((j & 1) << 1) | (i & 1);
@@ -264,8 +269,13 @@
       }
     }
   }
+
   gst_buffer_unmap (outbuf, &map);
   gst_video_frame_unmap (&frame);
 
   return GST_FLOW_OK;
+
+map_failed:
+  GST_WARNING_OBJECT (trans, "Could not map buffer, skipping");
+  return GST_FLOW_OK;
 }
diff --git a/gst/camerabin2/Makefile.am b/gst/camerabin2/Makefile.am
index db7d8c0..9254f7c 100644
--- a/gst/camerabin2/Makefile.am
+++ b/gst/camerabin2/Makefile.am
@@ -1,6 +1,7 @@
 plugin_LTLIBRARIES = libgstcamerabin2.la
 
 libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \
+				gstdigitalzoom.c \
 				camerabingeneral.c \
 				gstwrappercamerabinsrc.c \
 				gstcamerabin2.c \
@@ -23,21 +24,6 @@
 
 noinst_HEADERS = gstviewfinderbin.h \
 		camerabingeneral.h \
+		gstdigitalzoom.h \
 		gstwrappercamerabinsrc.h \
 		gstcamerabin2.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcamerabin2 -:SHARED libgstcamerabin2 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcamerabin2_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcamerabin2_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcamerabin2_la_LDFLAGS) \
-	           $(libgstcamerabin2_la_LIBADD) \
-	           -ldl \
-	 -:LIBFILTER_STATIC gstphotography-@GST_API_VERSION@ \
-	          gstbasecamerabinsrc-@GST_API_VERSION@ \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/camerabin2/Makefile.in b/gst/camerabin2/Makefile.in
index 5d9e557..8250991 100644
--- a/gst/camerabin2/Makefile.in
+++ b/gst/camerabin2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/camerabin2
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -160,6 +170,7 @@
 	$(am__DEPENDENCIES_1)
 am_libgstcamerabin2_la_OBJECTS =  \
 	libgstcamerabin2_la-gstviewfinderbin.lo \
+	libgstcamerabin2_la-gstdigitalzoom.lo \
 	libgstcamerabin2_la-camerabingeneral.lo \
 	libgstcamerabin2_la-gstwrappercamerabinsrc.lo \
 	libgstcamerabin2_la-gstcamerabin2.lo \
@@ -234,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -251,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -277,8 +291,6 @@
 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@
@@ -291,7 +303,6 @@
 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@
@@ -299,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -325,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -348,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -408,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -428,7 +446,6 @@
 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@
@@ -437,7 +454,6 @@
 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@
@@ -450,7 +466,6 @@
 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@
@@ -464,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -475,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -513,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -548,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -577,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -584,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -613,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -623,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -653,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -680,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -718,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -733,6 +769,7 @@
 wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstcamerabin2.la
 libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \
+				gstdigitalzoom.c \
 				camerabingeneral.c \
 				gstwrappercamerabinsrc.c \
 				gstcamerabin2.c \
@@ -754,6 +791,7 @@
 libgstcamerabin2_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gstviewfinderbin.h \
 		camerabingeneral.h \
+		gstdigitalzoom.h \
 		gstwrappercamerabinsrc.h \
 		gstcamerabin2.h
 
@@ -773,7 +811,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/camerabin2/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/camerabin2/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -838,6 +875,7 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstcamerabin2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstdigitalzoom.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstplugin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstviewfinderbin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcamerabin2_la-gstwrappercamerabinsrc.Plo@am__quote@
@@ -873,6 +911,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 $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstviewfinderbin.lo `test -f 'gstviewfinderbin.c' || echo '$(srcdir)/'`gstviewfinderbin.c
 
+libgstcamerabin2_la-gstdigitalzoom.lo: gstdigitalzoom.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-gstdigitalzoom.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-gstdigitalzoom.Tpo -c -o libgstcamerabin2_la-gstdigitalzoom.lo `test -f 'gstdigitalzoom.c' || echo '$(srcdir)/'`gstdigitalzoom.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-gstdigitalzoom.Tpo $(DEPDIR)/libgstcamerabin2_la-gstdigitalzoom.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdigitalzoom.c' object='libgstcamerabin2_la-gstdigitalzoom.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 $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -c -o libgstcamerabin2_la-gstdigitalzoom.lo `test -f 'gstdigitalzoom.c' || echo '$(srcdir)/'`gstdigitalzoom.c
+
 libgstcamerabin2_la-camerabingeneral.lo: camerabingeneral.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcamerabin2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcamerabin2_la_CFLAGS) $(CFLAGS) -MT libgstcamerabin2_la-camerabingeneral.lo -MD -MP -MF $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Tpo -c -o libgstcamerabin2_la-camerabingeneral.lo `test -f 'camerabingeneral.c' || echo '$(srcdir)/'`camerabingeneral.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Tpo $(DEPDIR)/libgstcamerabin2_la-camerabingeneral.Plo
@@ -1114,22 +1159,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcamerabin2 -:SHARED libgstcamerabin2 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcamerabin2_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcamerabin2_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcamerabin2_la_LDFLAGS) \
-	           $(libgstcamerabin2_la_LIBADD) \
-	           -ldl \
-	 -:LIBFILTER_STATIC gstphotography-@GST_API_VERSION@ \
-	          gstbasecamerabinsrc-@GST_API_VERSION@ \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index c77585a..7458675 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -167,15 +167,9 @@
 #include <gst/pbutils/pbutils.h>
 #include <gst/glib-compat-private.h>
 
-#if GLIB_CHECK_VERSION(2,29,6)
-#define gst_camerabin2_atomic_int_add g_atomic_int_add
-#else
-#define gst_camerabin2_atomic_int_add g_atomic_int_exchange_and_add
-#endif
-
 #define GST_CAMERA_BIN2_PROCESSING_INC(c)                                \
 {                                                                       \
-  gint bef = gst_camerabin2_atomic_int_add (&c->processing_counter, 1); \
+  gint bef = g_atomic_int_add (&c->processing_counter, 1); \
   if (bef == 0)                                                         \
     g_object_notify (G_OBJECT (c), "idle");                             \
   GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d",       \
@@ -988,14 +982,7 @@
   if (camerabin->audio_src) {
     gst_element_set_state (camerabin->audio_capsfilter, GST_STATE_READY);
     gst_element_set_state (camerabin->audio_volume, GST_STATE_READY);
-
-    /* FIXME We need to set audiosrc to null to make it resync the ringbuffer
-     * while bug https://bugzilla.gnome.org/show_bug.cgi?id=648359 isn't
-     * fixed.
-     *
-     * Also, we don't reinit the audiosrc to keep audio devices from being open
-     * and running until we really need them */
-    gst_element_set_state (camerabin->audio_src, GST_STATE_NULL);
+    gst_element_set_state (camerabin->audio_src, GST_STATE_READY);
 
     if (camerabin->audio_filter) {
       gst_element_set_state (camerabin->audio_filter, GST_STATE_READY);
@@ -1101,17 +1088,24 @@
 
         g_mutex_lock (&camerabin->video_capture_mutex);
         GST_DEBUG_OBJECT (bin, "EOS from video branch");
-        g_assert (camerabin->video_state == GST_CAMERA_BIN_VIDEO_FINISHING);
-
-        if (!g_thread_try_new ("reset-element-thread",
-                gst_camera_bin_video_reset_elements, gst_object_ref (camerabin),
-                NULL)) {
-          GST_WARNING_OBJECT (camerabin,
-              "Failed to create thread to "
-              "reset video elements' state, video recordings may not work "
-              "anymore");
-          gst_object_unref (camerabin);
-          camerabin->video_state = GST_CAMERA_BIN_VIDEO_IDLE;
+        if (camerabin->video_state == GST_CAMERA_BIN_VIDEO_FINISHING) {
+          if (!g_thread_try_new ("reset-element-thread",
+                  gst_camera_bin_video_reset_elements,
+                  gst_object_ref (camerabin), NULL)) {
+            GST_WARNING_OBJECT (camerabin,
+                "Failed to create thread to "
+                "reset video elements' state, video recordings may not work "
+                "anymore");
+            gst_object_unref (camerabin);
+            camerabin->video_state = GST_CAMERA_BIN_VIDEO_IDLE;
+          }
+        } else if (camerabin->video_state == GST_CAMERA_BIN_VIDEO_IDLE) {
+          GST_DEBUG_OBJECT (camerabin, "Received EOS from video branch but "
+              "video recording is idle, ignoring");
+        } else {
+          GST_WARNING_OBJECT (camerabin, "Received EOS from video branch but "
+              "video is recording and stop-capture wasn't requested");
+          g_assert_not_reached ();
         }
 
         g_mutex_unlock (&camerabin->video_capture_mutex);
@@ -1331,10 +1325,18 @@
 gst_camera_bin_src_notify_max_zoom_cb (GObject * self, GParamSpec * pspec,
     gpointer user_data)
 {
+  GParamSpecFloat *zoom_pspec;
   GstCameraBin2 *camera = (GstCameraBin2 *) user_data;
 
   g_object_get (self, "max-zoom", &camera->max_zoom, NULL);
   GST_DEBUG_OBJECT (camera, "Max zoom updated to %f", camera->max_zoom);
+
+  /* update zoom pspec */
+  zoom_pspec =
+      G_PARAM_SPEC_FLOAT (g_object_class_find_property (G_OBJECT_GET_CLASS
+          (G_OBJECT (camera)), "zoom"));
+  zoom_pspec->maximum = camera->max_zoom;
+
   g_object_notify (G_OBJECT (camera), "max-zoom");
 }
 
@@ -1760,7 +1762,7 @@
         G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera);
 
     if (!gst_element_link_pads (camera->src, "vfsrc",
-	    camera->viewfinderbin_queue, "sink")) {
+            camera->viewfinderbin_queue, "sink")) {
       GST_ERROR_OBJECT (camera,
           "Failed to link camera source's vfsrc pad to viewfinder queue");
       goto fail;
@@ -2024,7 +2026,7 @@
     g_object_unref (camera->user_audio_src);
 
   if (src)
-    g_object_ref (src);
+    gst_object_ref (src);
   camera->user_audio_src = src;
 }
 
@@ -2038,7 +2040,7 @@
     g_object_unref (camera->user_src);
 
   if (src)
-    g_object_ref (src);
+    gst_object_ref (src);
   camera->user_src = src;
 }
 
diff --git a/gst/camerabin2/gstdigitalzoom.c b/gst/camerabin2/gstdigitalzoom.c
new file mode 100644
index 0000000..20c01be
--- /dev/null
+++ b/gst/camerabin2/gstdigitalzoom.c
@@ -0,0 +1,387 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Thiago Santos <thiagoss@osg.samsung.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-digitalzoom
+ *
+ * Does digital zooming by cropping and scaling an image.
+ *
+ * It is a bin that contains the internal pipeline:
+ * videocrop ! videoscale ! capsfilter
+ *
+ * It keeps monitoring the input caps and when it is set/updated
+ * the capsfilter gets set the same caps to guarantee that the same
+ * input resolution is provided as output.
+ *
+ * Exposes the 'zoom' property as a float to allow setting the amount
+ * of zoom desired. Zooming is done in the center.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gst/gst-i18n-plugin.h>
+#include "gstdigitalzoom.h"
+
+enum
+{
+  PROP_0,
+  PROP_ZOOM
+};
+
+GST_DEBUG_CATEGORY (digital_zoom_debug);
+#define GST_CAT_DEFAULT digital_zoom_debug
+
+#define gst_digital_zoom_parent_class parent_class
+G_DEFINE_TYPE (GstDigitalZoom, gst_digital_zoom, GST_TYPE_BIN);
+
+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",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static void
+gst_digital_zoom_update_crop (GstDigitalZoom * self, GstCaps * caps)
+{
+  gint w2_crop = 0, h2_crop = 0;
+  gint left = 0;
+  gint right = 0;
+  gint top = 0;
+  gint bottom = 0;
+  gint width, height;
+  gfloat zoom;
+  GstStructure *structure;
+
+  if (caps == NULL || gst_caps_is_any (caps)) {
+    g_object_set (self->capsfilter, "caps", NULL, NULL);
+    return;
+  }
+
+  structure = gst_caps_get_structure (caps, 0);
+  gst_structure_get (structure, "width", G_TYPE_INT, &width, "height",
+      G_TYPE_INT, &height, NULL);
+
+  zoom = self->zoom;
+
+  if (self->videocrop) {
+    /* Update capsfilters to apply the zoom */
+    GST_INFO_OBJECT (self, "zoom: %f, orig size: %dx%d", zoom, width, height);
+
+    if (zoom != 1.0) {
+      w2_crop = (width - (gint) (width * 1.0 / zoom)) / 2;
+      h2_crop = (height - (gint) (height * 1.0 / zoom)) / 2;
+
+      left += w2_crop;
+      right += w2_crop;
+      top += h2_crop;
+      bottom += h2_crop;
+
+      /* force number of pixels cropped from left to be even, to avoid slow code
+       * path on videoscale */
+      left &= 0xFFFE;
+    }
+
+    GST_INFO_OBJECT (self,
+        "sw cropping: left:%d, right:%d, top:%d, bottom:%d", left, right, top,
+        bottom);
+
+    g_object_set (self->videocrop, "left", left, "right", right, "top",
+        top, "bottom", bottom, NULL);
+  }
+}
+
+static void
+gst_digital_zoom_update_zoom (GstDigitalZoom * self)
+{
+  GstCaps *caps = NULL;
+
+  if (!self->elements_created)
+    return;
+
+  g_object_get (self->capsfilter, "caps", &caps, NULL);
+  if (caps) {
+    gst_digital_zoom_update_crop (self, caps);
+    gst_caps_unref (caps);
+  }
+}
+
+static void
+gst_digital_zoom_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (object);
+
+  switch (prop_id) {
+    case PROP_ZOOM:
+      self->zoom = g_value_get_float (value);
+      GST_DEBUG_OBJECT (self, "Setting zoom: %f", self->zoom);
+      gst_digital_zoom_update_zoom (self);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_digital_zoom_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (object);
+
+  switch (prop_id) {
+    case PROP_ZOOM:
+      g_value_set_float (value, self->zoom);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_digital_zoom_sink_query (GstPad * sink, GstObject * parent,
+    GstQuery * query)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (parent);
+  switch (GST_QUERY_TYPE (query)) {
+      /* for caps related queries we want to skip videocrop ! videoscale
+       * as the digital zoom preserves input dimensions */
+    case GST_QUERY_CAPS:
+    case GST_QUERY_ACCEPT_CAPS:
+      if (self->elements_created)
+        return gst_pad_peer_query (self->srcpad, query);
+      /* fall through */
+    default:
+      return gst_pad_query_default (sink, parent, query);
+  }
+}
+
+static gboolean
+gst_digital_zoom_src_query (GstPad * sink, GstObject * parent, GstQuery * query)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (parent);
+  switch (GST_QUERY_TYPE (query)) {
+      /* for caps related queries we want to skip videocrop ! videoscale
+       * as the digital zoom preserves input dimensions */
+    case GST_QUERY_CAPS:
+    case GST_QUERY_ACCEPT_CAPS:
+      if (self->elements_created)
+        return gst_pad_peer_query (self->sinkpad, query);
+      /* fall through */
+    default:
+      return gst_pad_query_default (sink, parent, query);
+  }
+}
+
+static gboolean
+gst_digital_zoom_sink_event (GstPad * sink, GstObject * parent,
+    GstEvent * event)
+{
+  gboolean ret;
+  gboolean is_caps;
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (parent);
+  GstCaps *old_caps = NULL;
+  GstCaps *caps = NULL;
+
+  is_caps = GST_EVENT_TYPE (event) == GST_EVENT_CAPS;
+
+  if (is_caps) {
+    gst_event_parse_caps (event, &caps);
+    g_object_get (self->capsfilter, "caps", &old_caps, NULL);
+    g_object_set (self->capsfilter, "caps", caps, NULL);
+    gst_digital_zoom_update_crop (self, caps);
+  }
+
+  ret = gst_pad_event_default (sink, parent, event);
+
+  if (is_caps) {
+    if (!ret) {
+      gst_digital_zoom_update_crop (self, old_caps);
+      g_object_set (self->capsfilter, "caps", old_caps, NULL);
+    }
+
+    if (old_caps)
+      gst_caps_unref (old_caps);
+  }
+
+  return ret;
+}
+
+static void
+gst_digital_zoom_dispose (GObject * object)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (object);
+
+  if (self->capsfilter_sinkpad) {
+    gst_object_unref (self->capsfilter_sinkpad);
+    self->capsfilter_sinkpad = NULL;
+  }
+
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gst_digital_zoom_init (GstDigitalZoom * self)
+{
+  GstPadTemplate *tmpl;
+
+  tmpl = gst_static_pad_template_get (&src_template);
+  self->srcpad = gst_ghost_pad_new_no_target_from_template ("src", tmpl);
+  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
+  gst_object_unref (tmpl);
+
+  tmpl = gst_static_pad_template_get (&sink_template);
+  self->sinkpad = gst_ghost_pad_new_no_target_from_template ("sink", tmpl);
+  gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
+  gst_object_unref (tmpl);
+
+  gst_pad_set_event_function (self->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_digital_zoom_sink_event));
+  gst_pad_set_query_function (self->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_digital_zoom_sink_query));
+
+  gst_pad_set_query_function (self->srcpad,
+      GST_DEBUG_FUNCPTR (gst_digital_zoom_src_query));
+
+  self->zoom = 1;
+}
+
+static GstElement *
+zoom_create_element (GstDigitalZoom * self, const gchar * element_name,
+    const gchar * name)
+{
+  GstElement *element;
+  element = gst_element_factory_make (element_name, name);
+  if (element == NULL) {
+    GST_ELEMENT_ERROR (self, CORE, MISSING_PLUGIN,
+        (_("Missing element '%s' - check your GStreamer installation."),
+            element_name), (NULL));
+  }
+  return element;
+}
+
+static gboolean
+gst_digital_zoom_create_elements (GstDigitalZoom * self)
+{
+  GstPad *pad;
+
+  if (self->elements_created)
+    return TRUE;
+
+  self->videocrop = zoom_create_element (self, "videocrop", "zoom-videocrop");
+  if (self->videocrop == NULL)
+    return FALSE;
+  if (!gst_bin_add (GST_BIN_CAST (self), self->videocrop))
+    return FALSE;
+
+  self->videoscale =
+      zoom_create_element (self, "videoscale", "zoom-videoscale");
+  if (self->videoscale == NULL)
+    return FALSE;
+  if (!gst_bin_add (GST_BIN_CAST (self), self->videoscale))
+    return FALSE;
+
+  self->capsfilter =
+      zoom_create_element (self, "capsfilter", "zoom-capsfilter");
+  if (self->capsfilter == NULL)
+    return FALSE;
+  if (!gst_bin_add (GST_BIN_CAST (self), self->capsfilter))
+    return FALSE;
+
+  if (!gst_element_link_pads_full (self->videocrop, "src", self->videoscale,
+          "sink", GST_PAD_LINK_CHECK_CAPS))
+    return FALSE;
+  if (!gst_element_link_pads_full (self->videoscale, "src", self->capsfilter,
+          "sink", GST_PAD_LINK_CHECK_CAPS))
+    return FALSE;
+
+  pad = gst_element_get_static_pad (self->videocrop, "sink");
+  gst_ghost_pad_set_target (GST_GHOST_PAD (self->sinkpad), pad);
+  gst_object_unref (pad);
+
+  pad = gst_element_get_static_pad (self->capsfilter, "src");
+  gst_ghost_pad_set_target (GST_GHOST_PAD (self->srcpad), pad);
+  gst_object_unref (pad);
+
+  self->capsfilter_sinkpad =
+      gst_element_get_static_pad (self->capsfilter, "sink");
+
+  self->elements_created = TRUE;
+  return TRUE;
+}
+
+static GstStateChangeReturn
+gst_digital_zoom_change_state (GstElement * element, GstStateChange trans)
+{
+  GstDigitalZoom *self = GST_DIGITAL_ZOOM_CAST (element);
+
+  switch (trans) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_digital_zoom_create_elements (self)) {
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return GST_ELEMENT_CLASS (parent_class)->change_state (element, trans);
+}
+
+static void
+gst_digital_zoom_class_init (GstDigitalZoomClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+
+  gobject_class = G_OBJECT_CLASS (klass);
+  gstelement_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->dispose = gst_digital_zoom_dispose;
+  gobject_class->set_property = gst_digital_zoom_set_property;
+  gobject_class->get_property = gst_digital_zoom_get_property;
+
+  /* g_object_class_install_property .... */
+  g_object_class_install_property (gobject_class, PROP_ZOOM,
+      g_param_spec_float ("zoom", "Zoom",
+          "Digital zoom level to be used", 1.0, G_MAXFLOAT, 1.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  gstelement_class->change_state = gst_digital_zoom_change_state;
+
+  GST_DEBUG_CATEGORY_INIT (digital_zoom_debug, "digitalzoom",
+      0, "digital zoom");
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&sink_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "Digital zoom bin", "Generic/Video",
+      "Digital zoom bin", "Thiago Santos <thiagoss@osg.samsung.com>");
+}
diff --git a/gst/camerabin2/gstdigitalzoom.h b/gst/camerabin2/gstdigitalzoom.h
new file mode 100644
index 0000000..de7a300
--- /dev/null
+++ b/gst/camerabin2/gstdigitalzoom.h
@@ -0,0 +1,79 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Thiago Santos <thiagoss@osg.samsung.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_DIGITAL_ZOOM_H__
+#define __GST_DIGITAL_ZOOM_H__
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DIGITAL_ZOOM \
+  (gst_digital_zoom_get_type())
+#define GST_DIGITAL_ZOOM(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIGITAL_ZOOM,GstDigitalZoom))
+#define GST_DIGITAL_ZOOM_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIGITAL_ZOOM,GstDigitalZoomClass))
+#define GST_IS_DIGITAL_ZOOM(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIGITAL_ZOOM))
+#define GST_IS_DIGITAL_ZOOM_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIGITAL_ZOOM))
+#define GST_DIGITAL_ZOOM_CAST(d) ((GstDigitalZoom *)(d))
+
+GType gst_digital_zoom_get_type (void);
+
+typedef struct _GstDigitalZoom GstDigitalZoom;
+typedef struct _GstDigitalZoomClass GstDigitalZoomClass;
+
+/**
+ * GstDigitalZoom:
+ *
+ */
+struct _GstDigitalZoom
+{
+  GstBin parent;
+
+  GstPad *srcpad;
+  GstPad *sinkpad;
+
+  gboolean elements_created;
+  GstElement *videocrop;
+  GstElement *videoscale;
+  GstElement *capsfilter;
+
+  GstPad *capsfilter_sinkpad;
+
+  gfloat zoom;
+};
+
+
+/**
+ * GstDigitalZoomClass:
+ *
+ */
+struct _GstDigitalZoomClass
+{
+  GstBinClass parent;
+};
+
+G_END_DECLS
+
+#endif /* __GST_DIGITAL_ZOOM_H__ */
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 3f3a3b9..7796107 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -31,13 +31,11 @@
 #  include <config.h>
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include <gst/interfaces/photography.h>
+#include <gst/gst-i18n-plugin.h>
 
 #include "gstwrappercamerabinsrc.h"
+#include "gstdigitalzoom.h"
 #include "camerabingeneral.h"
 
 enum
@@ -80,6 +78,18 @@
 {
   GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (object);
 
+  if (self->src_pad) {
+    gst_object_unref (self->src_pad);
+    self->src_pad = NULL;
+  }
+  if (self->video_tee_sink) {
+    gst_object_unref (self->video_tee_sink);
+    self->video_tee_sink = NULL;
+  }
+  if (self->video_tee_vf_pad) {
+    gst_object_unref (self->video_tee_vf_pad);
+    self->video_tee_vf_pad = NULL;
+  }
   if (self->app_vid_src) {
     gst_object_unref (self->app_vid_src);
     self->app_vid_src = NULL;
@@ -88,6 +98,10 @@
     gst_object_unref (self->app_vid_filter);
     self->app_vid_filter = NULL;
   }
+  if (self->srcfilter_pad) {
+    gst_object_unref (self->srcfilter_pad);
+    self->srcfilter_pad = NULL;
+  }
   gst_caps_replace (&self->image_capture_caps, NULL);
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
@@ -164,27 +178,72 @@
 }
 
 static void
-gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
-    GstCaps * caps)
+gst_wrapper_camera_bin_src_reset_src_zoom (GstWrapperCameraBinSrc * self)
 {
-  GST_DEBUG_OBJECT (self, "Resetting src caps to %" GST_PTR_FORMAT, caps);
-  if (self->src_vid_src) {
-    GstCaps *old_caps;
+  if (self->src_crop) {
+    g_object_set (self->src_crop, "top", 0, "left", 0, "bottom", 0, "right", 0,
+        NULL);
+  }
+}
 
-    g_object_get (G_OBJECT (self->src_filter), "caps", &old_caps, NULL);
-    if (gst_caps_is_equal (caps, old_caps)) {
-      GST_DEBUG_OBJECT (self, "old and new caps are same, do not reset it");
-      if (old_caps)
-        gst_caps_unref (old_caps);
+static void
+gst_wrapper_camera_bin_reset_video_src_caps (GstWrapperCameraBinSrc * self,
+    GstCaps * new_filter_caps)
+{
+  GST_DEBUG_OBJECT (self, "Resetting src caps to %" GST_PTR_FORMAT,
+      new_filter_caps);
+  if (self->src_vid_src) {
+    GstCaps *src_neg_caps;      /* negotiated caps on src_filter */
+    gboolean ret = FALSE;
+
+    /* After pipe was negotiated src_filter do not have any filter caps.
+     * In this situation we should compare negotiated caps on capsfilter pad
+     * with requested range of caps. If one of this caps intersect,
+     * then we can avoid reseting.
+     */
+    src_neg_caps = gst_pad_get_current_caps (self->srcfilter_pad);
+    if (src_neg_caps && new_filter_caps && gst_caps_is_fixed (new_filter_caps))
+      ret = gst_caps_can_intersect (src_neg_caps, new_filter_caps);
+    else if (new_filter_caps == NULL) {
+      /* If new_filter_caps = NULL, then some body wont to empty
+       * capsfilter (set to ANY). In this case we will need to reset pipe,
+       * but if capsfilter is actually empthy, then we can avoid
+       * one more reseting.
+       */
+      GstCaps *old_filter_caps; /* range of caps on capsfilter */
+
+      g_object_get (G_OBJECT (self->src_filter),
+          "caps", &old_filter_caps, NULL);
+      ret = gst_caps_is_any (old_filter_caps);
+      gst_caps_unref (old_filter_caps);
+    }
+    if (src_neg_caps)
+      gst_caps_unref (src_neg_caps);
+
+    if (ret) {
+      GST_DEBUG_OBJECT (self, "Negotiated caps on srcfilter intersect "
+          "with requested caps, do not reset it.");
       return;
     }
-    if (old_caps)
-      gst_caps_unref (old_caps);
 
-    set_capsfilter_caps (self, caps);
+    set_capsfilter_caps (self, new_filter_caps);
   }
 }
 
+static void
+gst_wrapper_camera_bin_src_set_output (GstWrapperCameraBinSrc * self,
+    GstPad * old_pad, GstPad * output_pad)
+{
+  GstQuery *drain = gst_query_new_drain ();
+  gst_pad_peer_query (self->src_pad, drain);
+  gst_query_unref (drain);
+
+  if (old_pad)
+    gst_ghost_pad_set_target (GST_GHOST_PAD (old_pad), NULL);
+  if (output_pad)
+    gst_ghost_pad_set_target (GST_GHOST_PAD (output_pad), self->src_pad);
+}
+
 /**
  * gst_wrapper_camera_bin_src_imgsrc_probe:
  *
@@ -221,7 +280,15 @@
     gst_sample_unref (sample);
 
     if (self->image_capture_count == 0) {
+      GstCaps *anycaps = gst_caps_new_any ();
+
+      /* Get back to viewfinder */
+      gst_wrapper_camera_bin_src_reset_src_zoom (self);
+      gst_wrapper_camera_bin_reset_video_src_caps (self, anycaps);
+      gst_wrapper_camera_bin_src_set_output (self, self->imgsrc, self->vfsrc);
       gst_base_camera_src_finish_capture (camerasrc);
+
+      gst_caps_unref (anycaps);
     }
   }
   g_mutex_unlock (&camerasrc->capturing_mutex);
@@ -231,7 +298,7 @@
 /**
  * gst_wrapper_camera_bin_src_vidsrc_probe:
  *
- * Buffer probe called before sending each buffer to image queue.
+ * Buffer probe called before sending each buffer to video queue.
  */
 static GstPadProbeReturn
 gst_wrapper_camera_bin_src_vidsrc_probe (GstPad * pad, GstPadProbeInfo * info,
@@ -295,6 +362,9 @@
       GST_WARNING_OBJECT (camerasrc, "No peer pad for vidsrc");
     }
     self->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE;
+
+    gst_pad_unlink (self->src_pad, self->video_tee_sink);
+    gst_wrapper_camera_bin_src_set_output (self, self->vfsrc, self->vfsrc);
     gst_base_camera_src_finish_capture (camerasrc);
   } else {
     ret = GST_PAD_PROBE_OK;
@@ -303,31 +373,6 @@
   return ret;
 }
 
-static GstPadProbeReturn
-gst_wrapper_camera_src_src_event_probe (GstPad * pad, GstPadProbeInfo * info,
-    gpointer udata)
-{
-  GstPadProbeReturn ret = GST_PAD_PROBE_OK;
-  GstWrapperCameraBinSrc *self = udata;
-  GstEvent *evt = GST_EVENT (info->data);
-
-  switch (GST_EVENT_TYPE (evt)) {
-    case GST_EVENT_EOS:
-      /* drop */
-      ret = GST_PAD_PROBE_DROP;
-      break;
-    case GST_EVENT_SEGMENT:
-      if (self->drop_newseg) {
-        ret = GST_PAD_PROBE_DROP;
-        self->drop_newseg = FALSE;
-      }
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
 static void
 gst_wrapper_camera_bin_src_caps_cb (GstPad * pad, GParamSpec * pspec,
     gpointer user_data)
@@ -355,20 +400,6 @@
   /* Update zoom */
   gst_base_camera_src_setup_zoom (bcamsrc);
 
-  /* Update post-zoom capsfilter */
-  if (self->src_zoom_filter) {
-    GstCaps *filtercaps;
-
-    g_object_get (G_OBJECT (self->src_zoom_filter), "caps", &filtercaps, NULL);
-
-    if (caps != filtercaps && (caps == NULL || filtercaps == NULL ||
-            !gst_caps_is_equal (filtercaps, caps)))
-      g_object_set (G_OBJECT (self->src_zoom_filter), "caps", caps, NULL);
-
-    if (filtercaps)
-      gst_caps_unref (filtercaps);
-  }
-
   if (caps)
     gst_caps_unref (caps);
 };
@@ -383,14 +414,12 @@
   g_object_notify (G_OBJECT (bcamsrc), "max-zoom");
 }
 
-
 static gboolean
 gst_wrapper_camera_bin_src_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event)
 {
   gboolean ret = TRUE;
   GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (parent);
-  GstPad *upstream_pad = NULL;
 
   GST_DEBUG_OBJECT (self, "Handling event %p %" GST_PTR_FORMAT, event, event);
 
@@ -409,24 +438,10 @@
       }
       break;
     default:
+      ret = gst_pad_event_default (pad, parent, event);
       break;
   }
 
-  if (pad == self->imgsrc) {
-    upstream_pad = self->outsel_imgpad;
-  } else if (pad == self->vidsrc) {
-    upstream_pad = self->outsel_vidpad;
-  }
-
-  if (upstream_pad) {
-    ret = gst_pad_send_event (upstream_pad, event);
-  } else {
-    GST_WARNING_OBJECT (self, "Event caught that doesn't have an upstream pad -"
-        "this shouldn't be possible!");
-    gst_event_unref (event);
-    ret = FALSE;
-  }
-
   return ret;
 }
 
@@ -472,22 +487,18 @@
               self->app_vid_src, "autovideosrc", DEFAULT_VIDEOSRC,
               "camerasrc-real-src"))) {
     self->src_vid_src = NULL;
-    return FALSE;
-  } else {
-    GstElement *videoconvert;
-    if (!gst_bin_add (cbin, self->src_vid_src)) {
-      return FALSE;
-    }
+    goto fail;
+  }
 
-    /* check if we already have the next element to link to */
-    videoconvert = gst_bin_get_by_name (cbin, "src-videoconvert");
-    if (videoconvert) {
-      if (!gst_element_link_pads (self->src_vid_src, "src", videoconvert,
-              "sink")) {
-        gst_object_unref (videoconvert);
-        return FALSE;
-      }
-      gst_object_unref (videoconvert);
+  if (!gst_bin_add (cbin, self->src_vid_src)) {
+    goto fail;
+  }
+
+  /* check if we already have the next element to link to */
+  if (self->src_crop) {
+    if (!gst_element_link_pads (self->src_vid_src, "src", self->src_crop,
+            "sink")) {
+      goto fail;
     }
   }
 
@@ -499,18 +510,12 @@
         (GCallback) gst_wrapper_camera_bin_src_max_zoom_cb, bcamsrc);
   }
 
-  /* add a buffer probe to the src elemento to drop EOS from READY->NULL */
-  {
-    GstPad *pad;
-    pad = gst_element_get_static_pad (self->src_vid_src, "src");
-
-    self->src_event_probe_id =
-        gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
-        gst_wrapper_camera_src_src_event_probe, gst_object_ref (self),
-        gst_object_unref);
-    gst_object_unref (pad);
-  }
   return TRUE;
+
+fail:
+  if (self->src_vid_src)
+    gst_element_set_state (self->src_vid_src, GST_STATE_NULL);
+  return FALSE;
 }
 
 /**
@@ -519,11 +524,7 @@
  *
  * This function creates and links the elements of the camerasrc bin
  * videosrc ! cspconv ! srcfilter ! cspconv ! capsfilter ! crop ! scale ! \
- * capsfilter ! tee name=t
- *    t. ! ... (viewfinder pad)
- *    t. ! output-selector name=outsel
- *        outsel. ! (image pad)
- *        outsel. ! (video pad)
+ * capsfilter
  *
  * Returns: TRUE, if elements were successfully created, FALSE otherwise
  */
@@ -532,14 +533,12 @@
 {
   GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc);
   GstBin *cbin = GST_BIN (bcamsrc);
-  GstElement *tee;
   GstElement *filter_csp;
   GstElement *src_csp;
   GstElement *capsfilter;
+  GstElement *video_recording_tee;
   gboolean ret = FALSE;
-  GstPad *vf_pad;
-  GstPad *tee_capture_pad;
-  GstPad *src_caps_src_pad;
+  GstPad *tee_pad;
 
   /* checks and adds a new video src if needed */
   if (!check_and_replace_src (self))
@@ -549,6 +548,11 @@
 
     GST_DEBUG_OBJECT (self, "constructing pipeline");
 
+    if (!(self->src_crop =
+            gst_camerabin_create_and_add_element (cbin, "videocrop",
+                "src-crop")))
+      goto done;
+
     if (!gst_camerabin_create_and_add_element (cbin, "videoconvert",
             "src-videoconvert"))
       goto done;
@@ -571,84 +575,45 @@
     /* attach to notify::caps on the first capsfilter and use a callback
      * to recalculate the zoom properties when these caps change and to
      * propagate the caps to the second capsfilter */
-    src_caps_src_pad = gst_element_get_static_pad (self->src_filter, "src");
-    g_signal_connect (src_caps_src_pad, "notify::caps",
+    self->srcfilter_pad = gst_element_get_static_pad (self->src_filter, "src");
+    g_signal_connect (self->srcfilter_pad, "notify::caps",
         G_CALLBACK (gst_wrapper_camera_bin_src_caps_cb), self);
-    gst_object_unref (src_caps_src_pad);
 
-    if (!(self->src_zoom_crop =
-            gst_camerabin_create_and_add_element (cbin, "videocrop",
-                "zoom-crop")))
+    if (!(self->digitalzoom = g_object_new (GST_TYPE_DIGITAL_ZOOM, NULL))) {
+      GST_ELEMENT_ERROR (self, CORE, MISSING_PLUGIN,
+          (_("Digitalzoom element couldn't be created")), (NULL));
+
       goto done;
-    if (!(self->src_zoom_scale =
-            gst_camerabin_create_and_add_element (cbin, "videoscale",
-                "zoom-scale")))
-      goto done;
-    if (!(self->src_zoom_filter =
-            gst_camerabin_create_and_add_element (cbin, "capsfilter",
-                "zoom-capsfilter")))
+    }
+    if (!gst_camerabin_add_element_full (GST_BIN_CAST (self), NULL,
+            self->digitalzoom, "sink"))
       goto done;
 
-    if (!(tee =
-            gst_camerabin_create_and_add_element (cbin, "tee",
-                "camerasrc-tee")))
-      goto done;
+    /* keep a 'tee' element that has 2 source pads, one is linked to the
+     * vidsrc pad and the other is linked as needed to the viewfinder
+     * when video recording is hapenning */
+    video_recording_tee = gst_element_factory_make ("tee", "video_rec_tee");
+    gst_bin_add (GST_BIN_CAST (self), video_recording_tee);     /* TODO check returns */
+    self->video_tee_vf_pad =
+        gst_element_get_request_pad (video_recording_tee, "src_%u");
+    self->video_tee_sink =
+        gst_element_get_static_pad (video_recording_tee, "sink");
+    tee_pad = gst_element_get_request_pad (video_recording_tee, "src_%u");
+    gst_ghost_pad_set_target (GST_GHOST_PAD (self->vidsrc), tee_pad);
+    gst_object_unref (tee_pad);
 
     /* viewfinder pad */
-    vf_pad = gst_element_get_request_pad (tee, "src_%u");
-    g_object_set (tee, "alloc-pad", vf_pad, NULL);
-    gst_ghost_pad_set_target (GST_GHOST_PAD (self->vfsrc), vf_pad);
-    gst_object_unref (vf_pad);
-
-    /* image/video pad from tee */
-    tee_capture_pad = gst_element_get_request_pad (tee, "src_%u");
-
-    self->output_selector =
-        gst_element_factory_make ("output-selector", "outsel");
-    g_object_set (self->output_selector, "pad-negotiation-mode", 2, NULL);
-    gst_bin_add (GST_BIN (self), self->output_selector);
-    {
-      GstPad *pad = gst_element_get_static_pad (self->output_selector, "sink");
-
-      /* check return TODO */
-      gst_pad_link (tee_capture_pad, pad);
-      gst_object_unref (pad);
-    }
-    gst_object_unref (tee_capture_pad);
-
-    /* Create the 2 output pads for video and image */
-    self->outsel_vidpad =
-        gst_element_get_request_pad (self->output_selector, "src_%u");
-    self->outsel_imgpad =
-        gst_element_get_request_pad (self->output_selector, "src_%u");
-
-    g_assert (self->outsel_vidpad != NULL);
-    g_assert (self->outsel_imgpad != NULL);
-
-    gst_pad_add_probe (self->outsel_imgpad, GST_PAD_PROBE_TYPE_BUFFER,
-        gst_wrapper_camera_bin_src_imgsrc_probe, gst_object_ref (self),
-        gst_object_unref);
-    gst_pad_add_probe (self->outsel_vidpad, GST_PAD_PROBE_TYPE_BUFFER,
-        gst_wrapper_camera_bin_src_vidsrc_probe, gst_object_ref (self),
-        gst_object_unref);
-    gst_ghost_pad_set_target (GST_GHOST_PAD (self->imgsrc),
-        self->outsel_imgpad);
-    gst_ghost_pad_set_target (GST_GHOST_PAD (self->vidsrc),
-        self->outsel_vidpad);
-
-    if (bcamsrc->mode == MODE_IMAGE) {
-      g_object_set (self->output_selector, "active-pad", self->outsel_imgpad,
-          NULL);
-    } else {
-      g_object_set (self->output_selector, "active-pad", self->outsel_vidpad,
-          NULL);
-    }
-
-
+    self->src_pad = gst_element_get_static_pad (self->digitalzoom, "src");
+    gst_ghost_pad_set_target (GST_GHOST_PAD (self->vfsrc), self->src_pad);
 
     gst_pad_set_active (self->vfsrc, TRUE);
     gst_pad_set_active (self->imgsrc, TRUE);    /* XXX ??? */
     gst_pad_set_active (self->vidsrc, TRUE);    /* XXX ??? */
+
+    gst_pad_add_probe (self->imgsrc, GST_PAD_PROBE_TYPE_BUFFER,
+        gst_wrapper_camera_bin_src_imgsrc_probe, self, NULL);
+    gst_pad_add_probe (self->video_tee_sink, GST_PAD_PROBE_TYPE_BUFFER,
+        gst_wrapper_camera_bin_src_vidsrc_probe, self, NULL);
   }
 
   /* Do this even if pipeline is constructed */
@@ -692,19 +657,6 @@
   return ret;
 }
 
-static gboolean
-copy_missing_fields (GQuark field_id, const GValue * value, gpointer user_data)
-{
-  GstStructure *st = (GstStructure *) user_data;
-  const GValue *val = gst_structure_id_get_value (st, field_id);
-
-  if (G_UNLIKELY (val == NULL)) {
-    gst_structure_id_set_value (st, field_id, value);
-  }
-
-  return TRUE;
-}
-
 /**
  * adapt_image_capture:
  * @self: camerasrc object
@@ -718,11 +670,9 @@
 static void
 adapt_image_capture (GstWrapperCameraBinSrc * self, GstCaps * in_caps)
 {
-  GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self);
-  GstStructure *in_st, *new_st, *req_st;
+  GstStructure *in_st, *req_st;
   gint in_width = 0, in_height = 0, req_width = 0, req_height = 0, crop = 0;
   gdouble ratio_w, ratio_h;
-  GstCaps *filter_caps = NULL;
 
   GST_LOG_OBJECT (self, "in caps: %" GST_PTR_FORMAT, in_caps);
   GST_LOG_OBJECT (self, "requested caps: %" GST_PTR_FORMAT,
@@ -739,63 +689,34 @@
   GST_INFO_OBJECT (self, "we requested %dx%d, and got %dx%d", req_width,
       req_height, in_width, in_height);
 
-  new_st = gst_structure_copy (req_st);
-  /* If new fields have been added, we need to copy them */
-  gst_structure_foreach (in_st, copy_missing_fields, new_st);
-
-  gst_structure_set (new_st, "width", G_TYPE_INT, in_width, "height",
-      G_TYPE_INT, in_height, NULL);
-
-  GST_LOG_OBJECT (self, "new image capture caps: %" GST_PTR_FORMAT, new_st);
-
   /* Crop if requested aspect ratio differs from incoming frame aspect ratio */
-  if (self->src_zoom_crop) {
+  if (self->src_crop) {
+    gint base_crop_top = 0, base_crop_bottom = 0;
+    gint base_crop_left = 0, base_crop_right = 0;
 
     ratio_w = (gdouble) in_width / req_width;
     ratio_h = (gdouble) in_height / req_height;
 
     if (ratio_w < ratio_h) {
       crop = in_height - (req_height * ratio_w);
-      self->base_crop_top = crop / 2;
-      self->base_crop_bottom = crop / 2;
+      base_crop_top = crop / 2;
+      base_crop_bottom = crop / 2;
     } else {
       crop = in_width - (req_width * ratio_h);
-      self->base_crop_left = crop / 2;
-      self->base_crop_right += crop / 2;
+      base_crop_left = crop / 2;
+      base_crop_right += crop / 2;
     }
 
     GST_INFO_OBJECT (self,
         "setting base crop: left:%d, right:%d, top:%d, bottom:%d",
-        self->base_crop_left, self->base_crop_right, self->base_crop_top,
-        self->base_crop_bottom);
-    g_object_set (G_OBJECT (self->src_zoom_crop),
-        "top", self->base_crop_top,
-        "bottom", self->base_crop_bottom,
-        "left", self->base_crop_left, "right", self->base_crop_right, NULL);
+        base_crop_left, base_crop_right, base_crop_top, base_crop_bottom);
+    g_object_set (G_OBJECT (self->src_crop),
+        "top", base_crop_top, "bottom", base_crop_bottom,
+        "left", base_crop_left, "right", base_crop_right, NULL);
   }
 
   /* Update capsfilters */
-  if (self->image_capture_caps) {
-    gst_caps_unref (self->image_capture_caps);
-  }
-  self->image_capture_caps = gst_caps_new_full (new_st, NULL);
   set_capsfilter_caps (self, self->image_capture_caps);
-
-  /* Adjust the capsfilter before crop and videoscale elements if necessary */
-  if (in_width == bcamsrc->width && in_height == bcamsrc->height) {
-    GST_DEBUG_OBJECT (self, "no adaptation with resolution needed");
-  } else {
-    GST_DEBUG_OBJECT (self,
-        "changing %" GST_PTR_FORMAT " from %dx%d to %dx%d", self->src_filter,
-        bcamsrc->width, bcamsrc->height, in_width, in_height);
-    /* Apply the width and height to filter caps */
-    g_object_get (G_OBJECT (self->src_filter), "caps", &filter_caps, NULL);
-    filter_caps = gst_caps_make_writable (filter_caps);
-    gst_caps_set_simple (filter_caps, "width", G_TYPE_INT, in_width, "height",
-        G_TYPE_INT, in_height, NULL);
-    g_object_set (G_OBJECT (self->src_filter), "caps", filter_caps, NULL);
-    gst_caps_unref (filter_caps);
-  }
 }
 
 /**
@@ -813,81 +734,101 @@
   GST_INFO_OBJECT (self, "image capture prepared");
 
   /* It is possible we are about to get something else that we requested */
-  if (!gst_caps_is_equal (self->image_capture_caps, caps)) {
+  if (!gst_caps_can_intersect (self->image_capture_caps, caps)) {
     adapt_image_capture (self, caps);
   } else {
     set_capsfilter_caps (self, self->image_capture_caps);
   }
 }
 
-/**
- *
- */
-static gboolean
-start_image_capture (GstWrapperCameraBinSrc * self)
+static GstPadProbeReturn
+start_image_capture (GstPad * pad, GstPadProbeInfo * info, gpointer udata)
 {
+  GstWrapperCameraBinSrc *self = udata;
   GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self);
   GstPhotography *photography =
       (GstPhotography *) gst_bin_get_by_interface (GST_BIN_CAST (bcamsrc),
       GST_TYPE_PHOTOGRAPHY);
-  gboolean ret = FALSE;
   GstCaps *caps;
-  GstPad *pad, *peer;
 
   GST_DEBUG_OBJECT (self, "Starting image capture");
 
-  /* FIXME - V4L2 source will not close the device until all buffers have came
-   * back. Flushing the pipeline, will ensure it's properly closed, and that
-   * setting it back to PLAYING will work. This is more a workaround then a
-   * solution to buffer reclaiming. */
-  pad = gst_element_get_static_pad (self->src_vid_src, "src");
-  peer = gst_pad_get_peer (pad);
-  gst_object_unref (pad);
-  gst_pad_send_event (peer, gst_event_new_flush_start ());
-  gst_element_set_state (self->src_vid_src, GST_STATE_READY);
-  gst_pad_send_event (peer, gst_event_new_flush_stop (TRUE));
-  gst_object_unref (peer);
+  /* unlink from the viewfinder, link to the imagesrc pad to wait for
+   * the buffer to pass */
+  gst_wrapper_camera_bin_src_set_output (self, self->vfsrc, self->imgsrc);
 
   if (self->image_renegotiate) {
+    self->image_renegotiate = FALSE;
+
     /* clean capsfilter caps so they don't interfere here */
     g_object_set (self->src_filter, "caps", NULL, NULL);
-    if (self->src_zoom_filter)
-      g_object_set (self->src_zoom_filter, "caps", NULL, NULL);
 
     caps = gst_pad_get_allowed_caps (self->imgsrc);
-
     gst_caps_replace (&self->image_capture_caps, caps);
     gst_caps_unref (caps);
 
-    /* FIXME - do we need to update basecamerasrc width/height somehow here?
-     * if not, i think we need to do something about _when_ they get updated
-     * to be sure that set_element_zoom doesn't use the wrong values */
-
     /* We caught this event in the src pad event handler and now we want to
      * actually push it upstream */
-    gst_pad_send_event (self->outsel_imgpad, gst_event_new_reconfigure ());
-
-    self->image_renegotiate = FALSE;
+    gst_pad_mark_reconfigure (pad);
   }
 
   if (photography) {
-    gst_element_set_state (self->src_vid_src, GST_STATE_PLAYING);
     GST_DEBUG_OBJECT (self, "prepare image capture caps %" GST_PTR_FORMAT,
         self->image_capture_caps);
-    ret = gst_photography_prepare_for_capture (photography,
-        (GstPhotographyCapturePrepared) img_capture_prepared,
-        self->image_capture_caps, self);
+    if (!gst_photography_prepare_for_capture (photography,
+            (GstPhotographyCapturePrepared) img_capture_prepared,
+            self->image_capture_caps, self)) {
+      GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
+          ("Failed to prepare image capture"),
+          ("Prepare capture call didn't succeed for the given caps"));
+      self->image_capture_count = 0;
+    }
     gst_object_unref (photography);
   } else {
-    g_mutex_unlock (&bcamsrc->capturing_mutex);
     gst_wrapper_camera_bin_reset_video_src_caps (self,
         self->image_capture_caps);
-    g_mutex_lock (&bcamsrc->capturing_mutex);
-    ret = TRUE;
-    gst_element_set_state (self->src_vid_src, GST_STATE_PLAYING);
   }
 
-  return ret;
+  self->image_capture_probe = 0;
+  return GST_PAD_PROBE_REMOVE;
+}
+
+static GstPadProbeReturn
+start_video_capture (GstPad * pad, GstPadProbeInfo * info, gpointer udata)
+{
+  GstWrapperCameraBinSrc *self = udata;
+  GstCaps *caps;
+
+  GST_DEBUG_OBJECT (self, "Starting video capture");
+
+  if (self->video_renegotiate) {
+    GstCaps *anycaps = gst_caps_new_any ();
+    gst_wrapper_camera_bin_reset_video_src_caps (self, anycaps);
+    gst_caps_unref (anycaps);
+
+    /* clean capsfilter caps so they don't interfere here */
+    g_object_set (self->src_filter, "caps", NULL, NULL);
+  }
+
+  /* unlink from the viewfinder, link to the imagesrc pad, wait for
+   * the buffer to pass */
+  gst_wrapper_camera_bin_src_set_output (self, self->vfsrc, NULL);
+  gst_pad_link (self->src_pad, self->video_tee_sink);
+  gst_ghost_pad_set_target (GST_GHOST_PAD (self->vfsrc),
+      self->video_tee_vf_pad);
+
+  if (self->video_renegotiate) {
+    GST_DEBUG_OBJECT (self, "Getting allowed videosrc caps");
+    caps = gst_pad_get_allowed_caps (self->vidsrc);
+    GST_DEBUG_OBJECT (self, "Video src caps %" GST_PTR_FORMAT, caps);
+
+    self->video_renegotiate = FALSE;
+    gst_wrapper_camera_bin_reset_video_src_caps (self, caps);
+    gst_caps_unref (caps);
+  }
+  self->video_capture_probe = 0;
+
+  return GST_PAD_PROBE_REMOVE;
 }
 
 static gboolean
@@ -899,16 +840,10 @@
       GST_TYPE_PHOTOGRAPHY);
   GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc);
 
-  if (self->output_selector) {
-    if (mode == MODE_IMAGE) {
-      self->image_renegotiate = TRUE;
-      g_object_set (self->output_selector, "active-pad", self->outsel_imgpad,
-          NULL);
-    } else {
-      self->video_renegotiate = TRUE;
-      g_object_set (self->output_selector, "active-pad", self->outsel_vidpad,
-          NULL);
-    }
+  if (mode == MODE_IMAGE) {
+    self->image_renegotiate = TRUE;
+  } else {
+    self->video_renegotiate = TRUE;
   }
   self->mode = mode;
 
@@ -940,54 +875,6 @@
   return ret;
 }
 
-static gboolean
-set_element_zoom (GstWrapperCameraBinSrc * self, gfloat zoom)
-{
-  gboolean ret = FALSE;
-  GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC (self);
-  gint w2_crop = 0, h2_crop = 0;
-  GstPad *pad_zoom_sink = NULL;
-  gint left = self->base_crop_left;
-  gint right = self->base_crop_right;
-  gint top = self->base_crop_top;
-  gint bottom = self->base_crop_bottom;
-
-  if (self->src_zoom_crop) {
-    /* Update capsfilters to apply the zoom */
-    GST_INFO_OBJECT (self, "zoom: %f, orig size: %dx%d", zoom,
-        bcamsrc->width, bcamsrc->height);
-
-    if (zoom != ZOOM_1X) {
-      w2_crop = (bcamsrc->width - (gint) (bcamsrc->width * ZOOM_1X / zoom)) / 2;
-      h2_crop =
-          (bcamsrc->height - (gint) (bcamsrc->height * ZOOM_1X / zoom)) / 2;
-
-      left += w2_crop;
-      right += w2_crop;
-      top += h2_crop;
-      bottom += h2_crop;
-
-      /* force number of pixels cropped from left to be even, to avoid slow code
-       * path on videoscale */
-      left &= 0xFFFE;
-    }
-
-    pad_zoom_sink = gst_element_get_static_pad (self->src_zoom_crop, "sink");
-
-    GST_INFO_OBJECT (self,
-        "sw cropping: left:%d, right:%d, top:%d, bottom:%d", left, right, top,
-        bottom);
-
-    GST_PAD_STREAM_LOCK (pad_zoom_sink);
-    g_object_set (self->src_zoom_crop, "left", left, "right", right, "top",
-        top, "bottom", bottom, NULL);
-    GST_PAD_STREAM_UNLOCK (pad_zoom_sink);
-    gst_object_unref (pad_zoom_sink);
-    ret = TRUE;
-  }
-  return ret;
-}
-
 static void
 gst_wrapper_camera_bin_src_set_zoom (GstBaseCameraSrc * bcamsrc, gfloat zoom)
 {
@@ -996,12 +883,11 @@
   GST_INFO_OBJECT (self, "setting zoom %f", zoom);
 
   if (set_videosrc_zoom (self, zoom)) {
-    set_element_zoom (self, ZOOM_1X);
+    g_object_set (self->digitalzoom, "zoom", (gfloat) 1.0, NULL);
     GST_INFO_OBJECT (self, "zoom set using videosrc");
-  } else if (set_element_zoom (self, zoom)) {
-    GST_INFO_OBJECT (self, "zoom set using gst elements");
   } else {
-    GST_INFO_OBJECT (self, "setting zoom failed");
+    GST_INFO_OBJECT (self, "zoom set using digitalzoom");
+    g_object_set (self->digitalzoom, "zoom", zoom, NULL);
   }
 }
 
@@ -1016,7 +902,7 @@
 static void
 update_aspect_filter (GstWrapperCameraBinSrc * self, GstCaps * new_caps)
 {
-  // XXX why not instead add a preserve-aspect-ratio property to videoscale?
+  /* XXX why not instead add a preserve-aspect-ratio property to videoscale? */
 #if 0
   if (camera->flags & GST_CAMERABIN_FLAG_VIEWFINDER_SCALE) {
     GstCaps *sink_caps, *ar_caps;
@@ -1112,8 +998,6 @@
 
   /* Update capsfilters */
   g_object_set (G_OBJECT (self->src_filter), "caps", new_caps, NULL);
-  if (self->src_zoom_filter)
-    g_object_set (G_OBJECT (self->src_zoom_filter), "caps", new_caps, NULL);
   update_aspect_filter (self, new_caps);
   GST_INFO_OBJECT (self, "updated");
 }
@@ -1122,44 +1006,31 @@
 gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc)
 {
   GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc);
+  GstPad *pad;
+  gboolean ret = TRUE;
+
+  pad = gst_element_get_static_pad (src->src_vid_src, "src");
 
   /* TODO should we access this directly? Maybe a macro is better? */
   if (src->mode == MODE_IMAGE) {
-    start_image_capture (src);
     src->image_capture_count = 1;
+
+    src->image_capture_probe =
+        gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_IDLE, start_image_capture,
+        src, NULL);
   } else if (src->mode == MODE_VIDEO) {
-    GstCaps *caps = NULL;
-
-    if (src->video_renegotiate) {
-      GstCaps *anycaps = gst_caps_new_any ();
-      g_mutex_unlock (&camerasrc->capturing_mutex);
-      gst_wrapper_camera_bin_reset_video_src_caps (src, anycaps);
-      g_mutex_lock (&camerasrc->capturing_mutex);
-
-      /* clean capsfilter caps so they don't interfere here */
-      g_object_set (src->src_filter, "caps", NULL, NULL);
-      if (src->src_zoom_filter)
-        g_object_set (src->src_zoom_filter, "caps", NULL, NULL);
-
-      GST_DEBUG_OBJECT (src, "Getting allowed videosrc caps");
-      caps = gst_pad_get_allowed_caps (src->vidsrc);
-      GST_DEBUG_OBJECT (src, "Video src caps %" GST_PTR_FORMAT, caps);
-
-      src->video_renegotiate = FALSE;
-      g_mutex_unlock (&camerasrc->capturing_mutex);
-      gst_wrapper_camera_bin_reset_video_src_caps (src, caps);
-      g_mutex_lock (&camerasrc->capturing_mutex);
-      gst_caps_unref (caps);
-      gst_caps_unref (anycaps);
-    }
     if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) {
       src->video_rec_status = GST_VIDEO_RECORDING_STATUS_STARTING;
+      src->video_capture_probe =
+          gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_IDLE, start_video_capture,
+          src, NULL);
     }
   } else {
     g_assert_not_reached ();
-    return FALSE;
+    ret = FALSE;
   }
-  return TRUE;
+  gst_object_unref (pad);
+  return ret;
 }
 
 static void
@@ -1178,7 +1049,7 @@
       src->video_rec_status = GST_VIDEO_RECORDING_STATUS_FINISHING;
     }
   } else {
-    src->image_capture_count = 0;
+    /* TODO check what happens when we try to stop a image capture */
   }
 }
 
@@ -1186,7 +1057,7 @@
 gst_wrapper_camera_bin_src_change_state (GstElement * element,
     GstStateChange trans)
 {
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  GstStateChangeReturn ret;
   GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (element);
 
   ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, trans);
@@ -1198,7 +1069,6 @@
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       self->video_renegotiate = TRUE;
       self->image_renegotiate = TRUE;
-      self->drop_newseg = FALSE;
       break;
     case GST_STATE_CHANGE_READY_TO_NULL:
       break;
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.h b/gst/camerabin2/gstwrappercamerabinsrc.h
index 1dee4ca..90ab0cc 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.h
+++ b/gst/camerabin2/gstwrappercamerabinsrc.h
@@ -29,6 +29,7 @@
 #include "camerabingeneral.h"
 
 G_BEGIN_DECLS
+
 #define GST_TYPE_WRAPPER_CAMERA_BIN_SRC \
   (gst_wrapper_camera_bin_src_get_type())
 #define GST_WRAPPER_CAMERA_BIN_SRC(obj) \
@@ -62,6 +63,7 @@
 
   GstCameraBinMode mode;
 
+  GstPad *srcfilter_pad;
   GstPad *vfsrc;
   GstPad *imgsrc;
   GstPad *vidsrc;
@@ -76,21 +78,21 @@
   GstElement *src_vid_src;
   GstElement *video_filter;
   GstElement *src_filter;
-  GstElement *src_zoom_crop;
-  GstElement *src_zoom_scale;
-  GstElement *src_zoom_filter;
-  GstElement *output_selector;
+  GstElement *digitalzoom;
+
+  /* Pad from our last element that is linked
+   * with the output pads */
+  GstPad *src_pad;
+
+  GstPad *video_tee_vf_pad;
+  GstPad *video_tee_sink;
 
   gboolean elements_created;
 
   gulong src_event_probe_id;
   gulong src_max_zoom_signal_id;
-
-  GstPad *outsel_imgpad;
-  GstPad *outsel_vidpad;
-
-  /* For changing caps without losing timestamps */
-  gboolean drop_newseg;
+  gulong image_capture_probe;
+  gulong video_capture_probe;
 
   /* Application configurable elements */
   GstElement *app_vid_src;
@@ -99,12 +101,9 @@
   /* Caps that videosrc supports */
   GstCaps *allowed_caps;
 
-  /* Optional base crop for frames. Used to crop frames e.g.
-     due to wrong aspect ratio, before the crop related to zooming. */
-  gint base_crop_top;
-  gint base_crop_bottom;
-  gint base_crop_left;
-  gint base_crop_right;
+  /* Optional crop for frames. Used to crop frames e.g.
+     due to wrong aspect ratio. Done before the crop related to zooming. */
+  GstElement *src_crop;
 
   /* Caps applied to capsfilters when in view finder mode */
   GstCaps *view_finder_caps;
@@ -127,4 +126,6 @@
 
 gboolean gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin);
 
+G_END_DECLS
+
 #endif /* __GST_WRAPPER_CAMERA_BIN_SRC_H__ */
diff --git a/gst/cdxaparse/Makefile.am b/gst/cdxaparse/Makefile.am
index 673e87a..0a69ec7 100644
--- a/gst/cdxaparse/Makefile.am
+++ b/gst/cdxaparse/Makefile.am
@@ -22,17 +22,3 @@
 
 libgstcdxaparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstcdxaparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcdxaparse -:SHARED libgstcdxaparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcdxaparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcdxaparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcdxaparse_la_LDFLAGS) \
-	           $(libgstcdxaparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/cdxaparse/Makefile.in b/gst/cdxaparse/Makefile.in
index a976d78..0227532 100644
--- a/gst/cdxaparse/Makefile.in
+++ b/gst/cdxaparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/cdxaparse
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -763,7 +798,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/cdxaparse/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/cdxaparse/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1080,20 +1114,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcdxaparse -:SHARED libgstcdxaparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcdxaparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcdxaparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcdxaparse_la_LDFLAGS) \
-	           $(libgstcdxaparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/coloreffects/Makefile.am b/gst/coloreffects/Makefile.am
index 1b75db7..eb8a758 100644
--- a/gst/coloreffects/Makefile.am
+++ b/gst/coloreffects/Makefile.am
@@ -16,17 +16,3 @@
 libgstcoloreffects_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstcoloreffects.h gstchromahold.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcoloreffects -:SHARED libgstcoloreffects \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcoloreffects_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcoloreffects_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcoloreffects_la_LDFLAGS) \
-	           $(libgstcoloreffects_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/coloreffects/Makefile.in b/gst/coloreffects/Makefile.in
index cf5efd4..b39d2e7 100644
--- a/gst/coloreffects/Makefile.in
+++ b/gst/coloreffects/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/coloreffects
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -761,7 +796,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/coloreffects/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/coloreffects/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1086,20 +1120,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcoloreffects -:SHARED libgstcoloreffects \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcoloreffects_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcoloreffects_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcoloreffects_la_LDFLAGS) \
-	           $(libgstcoloreffects_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/coloreffects/gstchromahold.c b/gst/coloreffects/gstchromahold.c
index e13984b..fa5709d 100644
--- a/gst/coloreffects/gstchromahold.c
+++ b/gst/coloreffects/gstchromahold.c
@@ -35,15 +35,10 @@
  * ]| This pipeline only keeps the red color.
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include "gstchromahold.h"
 
 #include <stdlib.h>
@@ -64,8 +59,7 @@
   PROP_TARGET_R,
   PROP_TARGET_G,
   PROP_TARGET_B,
-  PROP_TOLERANCE,
-  PROP_LAST
+  PROP_TOLERANCE
 };
 
 static GstStaticPadTemplate gst_chroma_hold_src_template =
diff --git a/gst/compositor/Makefile.in b/gst/compositor/Makefile.in
index c656b0d..a56ee31 100644
--- a/gst/compositor/Makefile.in
+++ b/gst/compositor/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -102,8 +112,6 @@
 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 \
@@ -112,6 +120,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -125,7 +134,6 @@
 	$(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 \
@@ -142,6 +150,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -257,6 +267,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -274,8 +286,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -300,8 +314,6 @@
 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@
@@ -314,7 +326,6 @@
 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@
@@ -322,6 +333,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -348,11 +361,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -371,8 +387,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -431,10 +445,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -451,7 +469,6 @@
 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@
@@ -460,7 +477,6 @@
 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@
@@ -473,7 +489,6 @@
 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@
@@ -487,6 +502,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -498,6 +514,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -536,6 +554,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -571,10 +590,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -600,6 +623,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -607,7 +633,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -636,6 +669,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -646,6 +680,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -676,17 +711,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -703,6 +737,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -741,6 +776,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -809,7 +845,6 @@
 	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*) \
@@ -818,7 +853,7 @@
 	    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_srcdir)/common/orc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1142,6 +1177,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 orc-update: tmp-orc.c $(ORC_SOURCE).h
 	$(top_srcdir)/common/gst-indent tmp-orc.c
diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c
index 7fe8e53..721c766 100644
--- a/gst/compositor/blend.c
+++ b/gst/compositor/blend.c
@@ -86,9 +86,11 @@
     src_height = dest_height - ypos; \
   } \
   \
-  dest = dest + 4 * xpos + (ypos * dest_stride); \
+  if (src_height > 0 && src_width > 0) { \
+    dest = dest + 4 * xpos + (ypos * dest_stride); \
   \
-  LOOP (dest, src, src_height, src_width, src_stride, dest_stride, s_alpha); \
+    LOOP (dest, src, src_height, src_width, src_stride, dest_stride, s_alpha); \
+  } \
 }
 
 #define BLEND_A32_LOOP(name, method)			\
@@ -268,23 +270,23 @@
     xpos = 0; \
   } \
   if (ypos < 0) { \
-    yoffset += -ypos; \
+    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) { \
+  if (xoffset >= src_width || yoffset >= src_height) { \
     return; \
   } \
   \
   /* adjust width/height if the src is bigger than dest */ \
-  if (xpos + src_width > dest_width) { \
+  if (xpos + b_src_width > dest_width) { \
     b_src_width = dest_width - xpos; \
   } \
-  if (ypos + src_height > dest_height) { \
+  if (ypos + b_src_height > dest_height) { \
     b_src_height = dest_height - ypos; \
   } \
-  if (b_src_width < 0 || b_src_height < 0) { \
+  if (b_src_width <= 0 || b_src_height <= 0) { \
     return; \
   } \
   \
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c
index 805b674..d015d85 100644
--- a/gst/compositor/compositor.c
+++ b/gst/compositor/compositor.c
@@ -31,7 +31,35 @@
  * Compositor will do colorspace conversion.
  * 
  * Individual parameters for each input stream can be configured on the
- * #GstCompositorPad.
+ * #GstCompositorPad:
+ *
+ * <itemizedlist>
+ * <listitem>
+ * "xpos": The x-coordinate position of the top-left corner of the picture
+ * (#gint)
+ * </listitem>
+ * <listitem>
+ * "ypos": The y-coordinate position of the top-left corner of the picture
+ * (#gint)
+ * </listitem>
+ * <listitem>
+ * "width": The width of the picture; the input will be scaled if necessary
+ * (#gint)
+ * </listitem>
+ * <listitem>
+ * "height": The height of the picture; the input will be scaled if necessary
+ * (#gint)
+ * </listitem>
+ * <listitem>
+ * "alpha": The transparency of the picture; between 0.0 and 1.0. The blending
+ * is a simple copy when fully-transparent (0.0) and fully-opaque (1.0).
+ * (#gdouble)
+ * </listitem>
+ * <listitem>
+ * "zorder": The z-order position of the picture in the composition
+ * (#guint)
+ * </listitem>
+ * </itemizedlist>
  *
  * <refsect2>
  * <title>Sample pipelines</title>
@@ -112,16 +140,18 @@
     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_WIDTH  0
+#define DEFAULT_PAD_HEIGHT 0
 #define DEFAULT_PAD_ALPHA  1.0
 enum
 {
   PROP_PAD_0,
-  PROP_PAD_ZORDER,
   PROP_PAD_XPOS,
   PROP_PAD_YPOS,
+  PROP_PAD_WIDTH,
+  PROP_PAD_HEIGHT,
   PROP_PAD_ALPHA
 };
 
@@ -135,15 +165,18 @@
   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_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;
@@ -166,6 +199,12 @@
     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;
@@ -176,12 +215,404 @@
 }
 
 static void
+_mixer_pad_get_output_size (GstCompositor * comp,
+    GstCompositorPad * comp_pad, gint * width, gint * height)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (comp);
+  GstVideoAggregatorPad *vagg_pad = GST_VIDEO_AGGREGATOR_PAD (comp_pad);
+  gint pad_width, pad_height;
+  guint dar_n, dar_d;
+
+  /* FIXME: Anything better we can do here? */
+  if (!vagg_pad->info.finfo
+      || vagg_pad->info.finfo->format == GST_VIDEO_FORMAT_UNKNOWN) {
+    GST_DEBUG_OBJECT (comp_pad, "Have no caps yet");
+    *width = 0;
+    *height = 0;
+    return;
+  }
+
+  pad_width =
+      comp_pad->width <=
+      0 ? GST_VIDEO_INFO_WIDTH (&vagg_pad->info) : comp_pad->width;
+  pad_height =
+      comp_pad->height <=
+      0 ? GST_VIDEO_INFO_HEIGHT (&vagg_pad->info) : comp_pad->height;
+
+  gst_video_calculate_display_ratio (&dar_n, &dar_d, pad_width, pad_height,
+      GST_VIDEO_INFO_PAR_N (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_D (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_N (&vagg->info), GST_VIDEO_INFO_PAR_D (&vagg->info)
+      );
+  GST_LOG_OBJECT (comp_pad, "scaling %ux%u by %u/%u (%u/%u / %u/%u)", pad_width,
+      pad_height, dar_n, dar_d, GST_VIDEO_INFO_PAR_N (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_D (&vagg_pad->info),
+      GST_VIDEO_INFO_PAR_N (&vagg->info), GST_VIDEO_INFO_PAR_D (&vagg->info));
+
+  if (pad_height % dar_n == 0) {
+    pad_width = gst_util_uint64_scale_int (pad_height, dar_n, dar_d);
+  } else if (pad_width % dar_d == 0) {
+    pad_height = gst_util_uint64_scale_int (pad_width, dar_d, dar_n);
+  } else {
+    pad_width = gst_util_uint64_scale_int (pad_height, dar_n, dar_d);
+  }
+
+  if (width)
+    *width = pad_width;
+  if (height)
+    *height = pad_height;
+}
+
+static gboolean
+gst_compositor_pad_set_info (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg G_GNUC_UNUSED,
+    GstVideoInfo * current_info, GstVideoInfo * wanted_info)
+{
+  GstCompositor *comp = GST_COMPOSITOR (vagg);
+  GstCompositorPad *cpad = GST_COMPOSITOR_PAD (pad);
+  gchar *colorimetry, *best_colorimetry;
+  const gchar *chroma, *best_chroma;
+  gint width, height;
+
+  if (!current_info->finfo)
+    return TRUE;
+
+  if (GST_VIDEO_INFO_FORMAT (current_info) == GST_VIDEO_FORMAT_UNKNOWN)
+    return TRUE;
+
+  if (cpad->convert)
+    gst_video_converter_free (cpad->convert);
+
+  cpad->convert = NULL;
+
+  colorimetry = gst_video_colorimetry_to_string (&(current_info->colorimetry));
+  chroma = gst_video_chroma_to_string (current_info->chroma_site);
+
+  best_colorimetry =
+      gst_video_colorimetry_to_string (&(wanted_info->colorimetry));
+  best_chroma = gst_video_chroma_to_string (wanted_info->chroma_site);
+
+  _mixer_pad_get_output_size (comp, cpad, &width, &height);
+
+  if (GST_VIDEO_INFO_FORMAT (wanted_info) !=
+      GST_VIDEO_INFO_FORMAT (current_info)
+      || g_strcmp0 (colorimetry, best_colorimetry)
+      || g_strcmp0 (chroma, best_chroma)
+      || width != current_info->width || height != current_info->height) {
+    GstVideoInfo tmp_info;
+
+    /* Initialize with the wanted video format and our original width and
+     * height as we don't want to rescale. Then copy over the wanted
+     * colorimetry, and chroma-site and our current pixel-aspect-ratio
+     * and other relevant fields.
+     */
+    gst_video_info_set_format (&tmp_info, GST_VIDEO_INFO_FORMAT (wanted_info),
+        width, height);
+    tmp_info.chroma_site = wanted_info->chroma_site;
+    tmp_info.colorimetry = wanted_info->colorimetry;
+    tmp_info.par_n = vagg->info.par_n;
+    tmp_info.par_d = vagg->info.par_d;
+    tmp_info.fps_n = current_info->fps_n;
+    tmp_info.fps_d = current_info->fps_d;
+    tmp_info.flags = current_info->flags;
+    tmp_info.interlace_mode = current_info->interlace_mode;
+
+    GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
+        GST_VIDEO_INFO_FORMAT (current_info),
+        GST_VIDEO_INFO_FORMAT (&tmp_info));
+
+    cpad->convert = gst_video_converter_new (current_info, &tmp_info, NULL);
+    cpad->conversion_info = tmp_info;
+    if (!cpad->convert) {
+      g_free (colorimetry);
+      g_free (best_colorimetry);
+      GST_WARNING_OBJECT (pad, "No path found for conversion");
+      return FALSE;
+    }
+  } else {
+    cpad->conversion_info = *current_info;
+    GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
+  }
+  g_free (colorimetry);
+  g_free (best_colorimetry);
+
+  return TRUE;
+}
+
+/* Test whether rectangle2 contains rectangle 1 (geometrically) */
+static gboolean
+is_rectangle_contained (GstVideoRectangle rect1, GstVideoRectangle rect2)
+{
+  if ((rect2.x <= rect1.x) && (rect2.y <= rect1.y) &&
+      ((rect2.x + rect2.w) >= (rect1.x + rect1.w)) &&
+      ((rect2.y + rect2.h) >= (rect1.y + rect1.h)))
+    return TRUE;
+  return FALSE;
+}
+
+static GstVideoRectangle
+clamp_rectangle (gint x, gint y, gint w, gint h, gint outer_width,
+    gint outer_height)
+{
+  gint x2 = x + w;
+  gint y2 = y + h;
+  GstVideoRectangle clamped;
+
+  /* Clamp the x/y coordinates of this frame to the output boundaries to cover
+   * the case where (say, with negative xpos/ypos or w/h greater than the output
+   * size) the non-obscured portion of the frame could be outside the bounds of
+   * the video itself and hence not visible at all */
+  clamped.x = CLAMP (x, 0, outer_width);
+  clamped.y = CLAMP (y, 0, outer_height);
+  clamped.w = CLAMP (x2, 0, outer_width) - clamped.x;
+  clamped.h = CLAMP (y2, 0, outer_height) - clamped.y;
+
+  return clamped;
+}
+
+static gboolean
+gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg)
+{
+  GstCompositor *comp = GST_COMPOSITOR (vagg);
+  GstCompositorPad *cpad = GST_COMPOSITOR_PAD (pad);
+  guint outsize;
+  GstVideoFrame *converted_frame;
+  GstBuffer *converted_buf = NULL;
+  GstVideoFrame *frame;
+  static GstAllocationParams params = { 0, 15, 0, 0, };
+  gint width, height;
+  gboolean frame_obscured = FALSE;
+  GList *l;
+  /* The rectangle representing this frame, clamped to the video's boundaries.
+   * Due to the clamping, this is different from the frame width/height above. */
+  GstVideoRectangle frame_rect;
+
+  if (!pad->buffer)
+    return TRUE;
+
+  /* There's three types of width/height here:
+   * 1. GST_VIDEO_FRAME_WIDTH/HEIGHT:
+   *     The frame width/height (same as pad->buffer_vinfo.height/width;
+   *     see gst_video_frame_map())
+   * 2. cpad->width/height:
+   *     The optional pad property for scaling the frame (if zero, the video is
+   *     left unscaled)
+   * 3. conversion_info.width/height:
+   *     Equal to cpad->width/height if it's set, otherwise it's the pad
+   *     width/height. See ->set_info()
+   * */
+
+  _mixer_pad_get_output_size (comp, cpad, &width, &height);
+
+  /* The only thing that can change here is the width
+   * and height, otherwise set_info would've been called */
+  if (GST_VIDEO_INFO_WIDTH (&cpad->conversion_info) != width ||
+      GST_VIDEO_INFO_HEIGHT (&cpad->conversion_info) != height) {
+    gchar *colorimetry, *wanted_colorimetry;
+    const gchar *chroma, *wanted_chroma;
+
+    /* We might end up with no converter afterwards if
+     * the only reason for conversion was a different
+     * width or height
+     */
+    if (cpad->convert)
+      gst_video_converter_free (cpad->convert);
+    cpad->convert = NULL;
+
+    colorimetry =
+        gst_video_colorimetry_to_string (&pad->buffer_vinfo.colorimetry);
+    chroma = gst_video_chroma_to_string (pad->buffer_vinfo.chroma_site);
+
+    wanted_colorimetry =
+        gst_video_colorimetry_to_string (&cpad->conversion_info.colorimetry);
+    wanted_chroma =
+        gst_video_chroma_to_string (cpad->conversion_info.chroma_site);
+
+    if (GST_VIDEO_INFO_FORMAT (&pad->buffer_vinfo) !=
+        GST_VIDEO_INFO_FORMAT (&cpad->conversion_info)
+        || g_strcmp0 (colorimetry, wanted_colorimetry)
+        || g_strcmp0 (chroma, wanted_chroma)
+        || width != GST_VIDEO_INFO_WIDTH (&pad->buffer_vinfo)
+        || height != GST_VIDEO_INFO_HEIGHT (&pad->buffer_vinfo)) {
+      GstVideoInfo tmp_info;
+
+      gst_video_info_set_format (&tmp_info, cpad->conversion_info.finfo->format,
+          width, height);
+      tmp_info.chroma_site = cpad->conversion_info.chroma_site;
+      tmp_info.colorimetry = cpad->conversion_info.colorimetry;
+      tmp_info.par_n = vagg->info.par_n;
+      tmp_info.par_d = vagg->info.par_d;
+      tmp_info.fps_n = cpad->conversion_info.fps_n;
+      tmp_info.fps_d = cpad->conversion_info.fps_d;
+      tmp_info.flags = cpad->conversion_info.flags;
+      tmp_info.interlace_mode = cpad->conversion_info.interlace_mode;
+
+      GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
+          GST_VIDEO_INFO_FORMAT (&pad->buffer_vinfo),
+          GST_VIDEO_INFO_FORMAT (&tmp_info));
+
+      cpad->convert =
+          gst_video_converter_new (&pad->buffer_vinfo, &tmp_info, NULL);
+      cpad->conversion_info = tmp_info;
+
+      if (!cpad->convert) {
+        GST_WARNING_OBJECT (pad, "No path found for conversion");
+        g_free (colorimetry);
+        g_free (wanted_colorimetry);
+        return FALSE;
+      }
+    } else {
+      GST_VIDEO_INFO_WIDTH (&cpad->conversion_info) = width;
+      GST_VIDEO_INFO_HEIGHT (&cpad->conversion_info) = height;
+    }
+
+    g_free (colorimetry);
+    g_free (wanted_colorimetry);
+  }
+
+  if (cpad->alpha == 0.0) {
+    GST_DEBUG_OBJECT (vagg, "Pad has alpha 0.0, not converting frame");
+    converted_frame = NULL;
+    goto done;
+  }
+
+  frame_rect = clamp_rectangle (cpad->xpos, cpad->ypos, width, height,
+      GST_VIDEO_INFO_WIDTH (&vagg->info), GST_VIDEO_INFO_HEIGHT (&vagg->info));
+
+  if (frame_rect.w == 0 || frame_rect.h == 0) {
+    GST_DEBUG_OBJECT (vagg, "Resulting frame is zero-width or zero-height "
+        "(w: %i, h: %i), skipping", frame_rect.w, frame_rect.h);
+    converted_frame = NULL;
+    goto done;
+  }
+
+  GST_OBJECT_LOCK (vagg);
+  /* Check if this frame is obscured by a higher-zorder frame
+   * TODO: Also skip a frame if it's obscured by a combination of
+   * higher-zorder frames */
+  for (l = g_list_find (GST_ELEMENT (vagg)->sinkpads, pad)->next; l;
+      l = l->next) {
+    GstVideoRectangle frame2_rect;
+    GstVideoAggregatorPad *pad2 = l->data;
+    GstCompositorPad *cpad2 = GST_COMPOSITOR_PAD (pad2);
+    gint pad2_width, pad2_height;
+
+    _mixer_pad_get_output_size (comp, cpad2, &pad2_width, &pad2_height);
+
+    /* We don't need to clamp the coords of the second rectangle */
+    frame2_rect.x = cpad2->xpos;
+    frame2_rect.y = cpad2->ypos;
+    /* This is effectively what set_info and the above conversion
+     * code do to calculate the desired width/height */
+    frame2_rect.w = pad2_width;
+    frame2_rect.h = pad2_height;
+
+    /* Check if there's a buffer to be aggregated, ensure it can't have an alpha
+     * channel, then check opacity and frame boundaries */
+    if (pad2->buffer && cpad2->alpha == 1.0 &&
+        !GST_VIDEO_INFO_HAS_ALPHA (&pad2->info) &&
+        is_rectangle_contained (frame_rect, frame2_rect)) {
+      frame_obscured = TRUE;
+      GST_DEBUG_OBJECT (pad, "%ix%i@(%i,%i) obscured by %s %ix%i@(%i,%i) "
+          "in output of size %ix%i; skipping frame", frame_rect.w, frame_rect.h,
+          frame_rect.x, frame_rect.y, GST_PAD_NAME (pad2), frame2_rect.w,
+          frame2_rect.h, frame2_rect.x, frame2_rect.y,
+          GST_VIDEO_INFO_WIDTH (&vagg->info),
+          GST_VIDEO_INFO_HEIGHT (&vagg->info));
+      break;
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  if (frame_obscured) {
+    converted_frame = NULL;
+    goto done;
+  }
+
+  frame = g_slice_new0 (GstVideoFrame);
+
+  if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
+          GST_MAP_READ)) {
+    GST_WARNING_OBJECT (vagg, "Could not map input buffer");
+    return FALSE;
+  }
+
+  if (cpad->convert) {
+    gint converted_size;
+
+    converted_frame = g_slice_new0 (GstVideoFrame);
+
+    /* We wait until here to set the conversion infos, in case vagg->info changed */
+    converted_size = GST_VIDEO_INFO_SIZE (&cpad->conversion_info);
+    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, &(cpad->conversion_info),
+            converted_buf, GST_MAP_READWRITE)) {
+      GST_WARNING_OBJECT (vagg, "Could not map converted frame");
+
+      g_slice_free (GstVideoFrame, converted_frame);
+      gst_video_frame_unmap (frame);
+      g_slice_free (GstVideoFrame, frame);
+      return FALSE;
+    }
+
+    gst_video_converter_frame (cpad->convert, frame, converted_frame);
+    cpad->converted_buffer = converted_buf;
+    gst_video_frame_unmap (frame);
+    g_slice_free (GstVideoFrame, frame);
+  } else {
+    converted_frame = frame;
+  }
+
+done:
+  pad->aggregated_frame = converted_frame;
+
+  return TRUE;
+}
+
+static void
+gst_compositor_pad_clean_frame (GstVideoAggregatorPad * pad,
+    GstVideoAggregator * vagg)
+{
+  GstCompositorPad *cpad = GST_COMPOSITOR_PAD (pad);
+
+  if (pad->aggregated_frame) {
+    gst_video_frame_unmap (pad->aggregated_frame);
+    g_slice_free (GstVideoFrame, pad->aggregated_frame);
+    pad->aggregated_frame = NULL;
+  }
+
+  if (cpad->converted_buffer) {
+    gst_buffer_unref (cpad->converted_buffer);
+    cpad->converted_buffer = NULL;
+  }
+}
+
+static void
+gst_compositor_pad_finalize (GObject * object)
+{
+  GstCompositorPad *pad = GST_COMPOSITOR_PAD (object);
+
+  if (pad->convert)
+    gst_video_converter_free (pad->convert);
+  pad->convert = NULL;
+
+  G_OBJECT_CLASS (gst_compositor_pad_parent_class)->finalize (object);
+}
+
+static void
 gst_compositor_pad_class_init (GstCompositorPadClass * klass)
 {
   GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstVideoAggregatorPadClass *vaggpadclass =
+      (GstVideoAggregatorPadClass *) klass;
 
   gobject_class->set_property = gst_compositor_pad_set_property;
   gobject_class->get_property = gst_compositor_pad_get_property;
+  gobject_class->finalize = gst_compositor_pad_finalize;
 
   g_object_class_install_property (gobject_class, PROP_PAD_XPOS,
       g_param_spec_int ("xpos", "X Position", "X Position of the picture",
@@ -191,10 +622,24 @@
       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));
+
+  vaggpadclass->set_info = GST_DEBUG_FUNCPTR (gst_compositor_pad_set_info);
+  vaggpadclass->prepare_frame =
+      GST_DEBUG_FUNCPTR (gst_compositor_pad_prepare_frame);
+  vaggpadclass->clean_frame =
+      GST_DEBUG_FUNCPTR (gst_compositor_pad_clean_frame);
 }
 
 static void
@@ -437,12 +882,18 @@
   return ret;
 }
 
-static gboolean
-_update_info (GstVideoAggregator * vagg, GstVideoInfo * info)
+static GstCaps *
+_update_caps (GstVideoAggregator * vagg, GstCaps * caps)
 {
   GList *l;
   gint best_width = -1, best_height = -1;
-  gboolean ret = FALSE;
+  GstVideoInfo info;
+  GstCaps *ret = NULL;
+
+  gst_video_info_from_caps (&info, caps);
+
+  /* FIXME: this doesn't work for non 1/1 output par's as we don't have that
+   * information available at this time */
 
   GST_OBJECT_LOCK (vagg);
   for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
@@ -451,8 +902,8 @@
     gint this_width, this_height;
     gint width, height;
 
-    width = GST_VIDEO_INFO_WIDTH (&vaggpad->info);
-    height = GST_VIDEO_INFO_HEIGHT (&vaggpad->info);
+    _mixer_pad_get_output_size (GST_COMPOSITOR (vagg), compositor_pad, &width,
+        &height);
 
     if (width == 0 || height == 0)
       continue;
@@ -468,9 +919,13 @@
   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);
+    info.width = best_width;
+    info.height = best_height;
+    if (set_functions (GST_COMPOSITOR (vagg), &info))
+      ret = gst_video_info_to_caps (&info);
+
+    gst_caps_set_simple (ret, "pixel-aspect-ratio", GST_TYPE_FRACTION_RANGE,
+        1, G_MAXINT, G_MAXINT, 1, NULL);
   }
 
   return ret;
@@ -485,13 +940,15 @@
   GstVideoFrame out_frame, *outframe;
 
   if (!gst_video_frame_map (&out_frame, &vagg->info, outbuf, GST_MAP_WRITE)) {
-
+    GST_WARNING_OBJECT (vagg, "Could not map output buffer");
     return GST_FLOW_ERROR;
   }
 
   outframe = &out_frame;
   /* default to blending */
   composite = self->blend;
+  /* TODO: If the frames to be composited completely obscure the background,
+   * don't bother drawing the background at all. */
   switch (self->background) {
     case COMPOSITOR_BACKGROUND_CHECKER:
       self->fill_checker (outframe);
@@ -545,6 +1002,48 @@
   return GST_FLOW_OK;
 }
 
+static gboolean
+_sink_query (GstAggregator * agg, GstAggregatorPad * bpad, GstQuery * query)
+{
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_ALLOCATION:{
+      GstCaps *caps;
+      GstVideoInfo info;
+      GstBufferPool *pool;
+      guint size;
+      GstStructure *structure;
+
+      gst_query_parse_allocation (query, &caps, NULL);
+
+      if (caps == NULL)
+        return FALSE;
+
+      if (!gst_video_info_from_caps (&info, caps))
+        return FALSE;
+
+      size = GST_VIDEO_INFO_SIZE (&info);
+
+      pool = gst_video_buffer_pool_new ();
+
+      structure = gst_buffer_pool_get_config (pool);
+      gst_buffer_pool_config_set_params (structure, caps, size, 0, 0);
+
+      if (!gst_buffer_pool_set_config (pool, structure)) {
+        gst_object_unref (pool);
+        return FALSE;
+      }
+
+      gst_query_add_allocation_pool (query, pool, size, 0, 0);
+      gst_object_unref (pool);
+      gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+
+      return TRUE;
+    }
+    default:
+      return GST_AGGREGATOR_CLASS (parent_class)->sink_query (agg, bpad, query);
+  }
+}
+
 /* GObject boilerplate */
 static void
 gst_compositor_class_init (GstCompositorClass * klass)
@@ -559,7 +1058,8 @@
   gobject_class->set_property = gst_compositor_set_property;
 
   agg_class->sinkpads_type = GST_TYPE_COMPOSITOR_PAD;
-  videoaggregator_class->update_info = _update_info;
+  agg_class->sink_query = _sink_query;
+  videoaggregator_class->update_caps = _update_caps;
   videoaggregator_class->aggregate_frames = gst_compositor_aggregate_frames;
 
   g_object_class_install_property (gobject_class, PROP_BACKGROUND,
diff --git a/gst/compositor/compositororc-dist.c b/gst/compositor/compositororc-dist.c
index daee2a7..4174482 100644
--- a/gst/compositor/compositororc-dist.c
+++ b/gst/compositor/compositororc-dist.c
@@ -619,11 +619,19 @@
       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;
+      /* 7: div255w */
+      var47.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[0] + 128)) +
+              (((orc_uint16) (var46.x4[0] + 128)) >> 8))) >> 8;
+      var47.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[1] + 128)) +
+              (((orc_uint16) (var46.x4[1] + 128)) >> 8))) >> 8;
+      var47.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[2] + 128)) +
+              (((orc_uint16) (var46.x4[2] + 128)) >> 8))) >> 8;
+      var47.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[3] + 128)) +
+              (((orc_uint16) (var46.x4[3] + 128)) >> 8))) >> 8;
       /* 8: convubw */
       var48.x4[0] = (orc_uint8) var41.x4[0];
       var48.x4[1] = (orc_uint8) var41.x4[1];
@@ -745,11 +753,19 @@
       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;
+      /* 7: div255w */
+      var47.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[0] + 128)) +
+              (((orc_uint16) (var46.x4[0] + 128)) >> 8))) >> 8;
+      var47.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[1] + 128)) +
+              (((orc_uint16) (var46.x4[1] + 128)) >> 8))) >> 8;
+      var47.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[2] + 128)) +
+              (((orc_uint16) (var46.x4[2] + 128)) >> 8))) >> 8;
+      var47.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var46.x4[3] + 128)) +
+              (((orc_uint16) (var46.x4[3] + 128)) >> 8))) >> 8;
       /* 8: convubw */
       var48.x4[0] = (orc_uint8) var41.x4[0];
       var48.x4[1] = (orc_uint8) var41.x4[1];
@@ -822,13 +838,13 @@
       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, 2, 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,
+        12, 4, 4, 14, 4, 255, 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, 80, 38, 38, 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);
@@ -840,7 +856,6 @@
       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, 2, 0x00000008, "c2");
       orc_program_add_parameter (p, 2, "p1");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 2, "t2");
@@ -862,7 +877,7 @@
           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_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_T6, ORC_VAR_T1, ORC_VAR_D1,
           ORC_VAR_D1);
@@ -980,11 +995,19 @@
       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;
+      /* 8: div255w */
+      var49.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[0] + 128)) +
+              (((orc_uint16) (var48.x4[0] + 128)) >> 8))) >> 8;
+      var49.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[1] + 128)) +
+              (((orc_uint16) (var48.x4[1] + 128)) >> 8))) >> 8;
+      var49.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[2] + 128)) +
+              (((orc_uint16) (var48.x4[2] + 128)) >> 8))) >> 8;
+      var49.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[3] + 128)) +
+              (((orc_uint16) (var48.x4[3] + 128)) >> 8))) >> 8;
       /* 9: convubw */
       var50.x4[0] = (orc_uint8) var42.x4[0];
       var50.x4[1] = (orc_uint8) var42.x4[1];
@@ -1109,11 +1132,19 @@
       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;
+      /* 8: div255w */
+      var49.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[0] + 128)) +
+              (((orc_uint16) (var48.x4[0] + 128)) >> 8))) >> 8;
+      var49.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[1] + 128)) +
+              (((orc_uint16) (var48.x4[1] + 128)) >> 8))) >> 8;
+      var49.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[2] + 128)) +
+              (((orc_uint16) (var48.x4[2] + 128)) >> 8))) >> 8;
+      var49.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var48.x4[3] + 128)) +
+              (((orc_uint16) (var48.x4[3] + 128)) >> 8))) >> 8;
       /* 9: convubw */
       var50.x4[0] = (orc_uint8) var42.x4[0];
       var50.x4[1] = (orc_uint8) var42.x4[1];
@@ -1186,14 +1217,14 @@
       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,
-        2, 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,
+        12, 4, 4, 14, 4, 0, 0, 0, 255, 14, 4, 24, 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, 80, 39,
+        39, 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);
@@ -1206,7 +1237,6 @@
       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, 2, 0x00000008, "c3");
       orc_program_add_parameter (p, 2, "p1");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
@@ -1231,7 +1261,7 @@
           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_program_append_2 (p, "div255w", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_D1,
           ORC_VAR_D1);
       orc_program_append_2 (p, "convubw", 2, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1,
           ORC_VAR_D1);
@@ -1368,11 +1398,19 @@
       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;
+      /* 7: div255w */
+      var50.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[0] + 128)) +
+              (((orc_uint16) (var49.x4[0] + 128)) >> 8))) >> 8;
+      var50.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[1] + 128)) +
+              (((orc_uint16) (var49.x4[1] + 128)) >> 8))) >> 8;
+      var50.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[2] + 128)) +
+              (((orc_uint16) (var49.x4[2] + 128)) >> 8))) >> 8;
+      var50.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[3] + 128)) +
+              (((orc_uint16) (var49.x4[3] + 128)) >> 8))) >> 8;
       /* 8: convubw */
       var51.x4[0] = (orc_uint8) var44.x4[0];
       var51.x4[1] = (orc_uint8) var44.x4[1];
@@ -1576,11 +1614,19 @@
       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;
+      /* 7: div255w */
+      var50.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[0] + 128)) +
+              (((orc_uint16) (var49.x4[0] + 128)) >> 8))) >> 8;
+      var50.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[1] + 128)) +
+              (((orc_uint16) (var49.x4[1] + 128)) >> 8))) >> 8;
+      var50.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[2] + 128)) +
+              (((orc_uint16) (var49.x4[2] + 128)) >> 8))) >> 8;
+      var50.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var49.x4[3] + 128)) +
+              (((orc_uint16) (var49.x4[3] + 128)) >> 8))) >> 8;
       /* 8: convubw */
       var51.x4[0] = (orc_uint8) var44.x4[0];
       var51.x4[1] = (orc_uint8) var44.x4[1];
@@ -1714,17 +1760,17 @@
         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, 2, 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,
+        0, 14, 4, 0, 255, 255, 255, 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, 80, 35, 35, 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);
@@ -1738,7 +1784,6 @@
       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, 2, 0x00000008, "c4");
       orc_program_add_parameter (p, 2, "p1");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 2, "t2");
@@ -1762,7 +1807,7 @@
           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_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, 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);
@@ -1929,11 +1974,19 @@
       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;
+      /* 8: div255w */
+      var52.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[0] + 128)) +
+              (((orc_uint16) (var51.x4[0] + 128)) >> 8))) >> 8;
+      var52.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[1] + 128)) +
+              (((orc_uint16) (var51.x4[1] + 128)) >> 8))) >> 8;
+      var52.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[2] + 128)) +
+              (((orc_uint16) (var51.x4[2] + 128)) >> 8))) >> 8;
+      var52.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[3] + 128)) +
+              (((orc_uint16) (var51.x4[3] + 128)) >> 8))) >> 8;
       /* 9: convubw */
       var53.x4[0] = (orc_uint8) var45.x4[0];
       var53.x4[1] = (orc_uint8) var45.x4[1];
@@ -2143,11 +2196,19 @@
       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;
+      /* 8: div255w */
+      var52.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[0] + 128)) +
+              (((orc_uint16) (var51.x4[0] + 128)) >> 8))) >> 8;
+      var52.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[1] + 128)) +
+              (((orc_uint16) (var51.x4[1] + 128)) >> 8))) >> 8;
+      var52.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[2] + 128)) +
+              (((orc_uint16) (var51.x4[2] + 128)) >> 8))) >> 8;
+      var52.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var51.x4[3] + 128)) +
+              (((orc_uint16) (var51.x4[3] + 128)) >> 8))) >> 8;
       /* 9: convubw */
       var53.x4[0] = (orc_uint8) var45.x4[0];
       var53.x4[1] = (orc_uint8) var45.x4[1];
@@ -2283,18 +2344,18 @@
         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, 2, 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,
+        255, 14, 4, 255, 255, 255, 0, 14, 4, 24, 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,
+        80, 36, 36, 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);
@@ -2309,7 +2370,6 @@
       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, 2, 0x00000008, "c5");
       orc_program_add_parameter (p, 2, "p1");
       orc_program_add_temporary (p, 4, "t1");
       orc_program_add_temporary (p, 4, "t2");
@@ -2336,7 +2396,7 @@
           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_program_append_2 (p, "div255w", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1,
           ORC_VAR_D1);
       orc_program_append_2 (p, "convubw", 2, ORC_VAR_T10, ORC_VAR_T1,
           ORC_VAR_D1, ORC_VAR_D1);
diff --git a/gst/compositor/compositororc.orc b/gst/compositor/compositororc.orc
index 5a348b2..234ec21 100644
--- a/gst/compositor/compositororc.orc
+++ b/gst/compositor/compositororc.orc
@@ -17,7 +17,7 @@
 .param 2 p1
 .temp 2 t1
 .temp 2 t2
-.const 1 c1 8 
+.const 1 c1 8
 
 convubw t1, d1
 convubw t2, s1
@@ -49,12 +49,13 @@
 splatbl a, tb
 x4 convubw a_wide, a
 x4 mullw a_wide, a_wide, alpha
-x4 shruw a_wide, a_wide, 8
+x4 div255w a_wide, a_wide
 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
@@ -83,13 +84,15 @@
 splatbl a, tb
 x4 convubw a_wide, a
 x4 mullw a_wide, a_wide, alpha
-x4 shruw a_wide, a_wide, 8
+x4 div255w a_wide, a_wide
+
 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
@@ -114,14 +117,14 @@
 .const 4 a_alpha 0x000000ff
 .const 4 a_alpha_inv 0xffffff00
 
-# calc source alpha as alpha_s = alpha_s * alpha / 256
+# calc source alpha as alpha_s = alpha_s * alpha / 255
 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 div255w alpha_s, alpha_s
 x4 convubw s_wide, t
 x4 mullw s_wide, s_wide, alpha_s
 
@@ -175,7 +178,7 @@
 .const 4 a_alpha 0xff000000
 .const 4 a_alpha_inv 0x00ffffff
 
-# calc source alpha as alpha_s = alpha_s * alpha / 256
+# calc source alpha as alpha_s = alpha_s * alpha / 255
 loadl t, s
 shrul t2, t, 24
 convlw tw, t2
@@ -183,7 +186,7 @@
 splatbl a, tb
 x4 convubw alpha_s, a
 x4 mullw alpha_s, alpha_s, alpha
-x4 shruw alpha_s, alpha_s, 8
+x4 div255w alpha_s, alpha_s
 x4 convubw s_wide, t
 x4 mullw s_wide, s_wide, alpha_s
 
diff --git a/gst/compositor/compositorpad.h b/gst/compositor/compositorpad.h
index 0ba580e..cb6f7c7 100644
--- a/gst/compositor/compositorpad.h
+++ b/gst/compositor/compositorpad.h
@@ -50,8 +50,12 @@
 
   /* properties */
   gint xpos, ypos;
-  guint zorder;
+  gint width, height;
   gdouble alpha;
+
+  GstVideoConverter *convert;
+  GstVideoInfo conversion_info;
+  GstBuffer *converted_buffer;
 };
 
 struct _GstCompositorPadClass
diff --git a/gst/dataurisrc/Makefile.am b/gst/dataurisrc/Makefile.am
index 37c8db3..37601ac 100644
--- a/gst/dataurisrc/Makefile.am
+++ b/gst/dataurisrc/Makefile.am
@@ -6,17 +6,3 @@
 libgstdataurisrc_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
 libgstdataurisrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdataurisrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdataurisrc -:SHARED libgstdataurisrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdataurisrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdataurisrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdataurisrc_la_LDFLAGS) \
-	           $(libgstdataurisrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/dataurisrc/Makefile.in b/gst/dataurisrc/Makefile.in
index 871e1a3..73c3942 100644
--- a/gst/dataurisrc/Makefile.in
+++ b/gst/dataurisrc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/dataurisrc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -744,7 +778,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/dataurisrc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/dataurisrc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1053,20 +1086,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdataurisrc -:SHARED libgstdataurisrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdataurisrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdataurisrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdataurisrc_la_LDFLAGS) \
-	           $(libgstdataurisrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/dccp/Makefile.in b/gst/dccp/Makefile.in
index 0b096ac..26f48eb 100644
--- a/gst/dccp/Makefile.in
+++ b/gst/dccp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/dccp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -234,6 +244,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -251,8 +262,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -277,8 +290,6 @@
 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@
@@ -291,7 +302,6 @@
 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@
@@ -299,6 +309,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -325,11 +337,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -348,8 +363,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -408,10 +421,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -428,7 +445,6 @@
 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@
@@ -437,7 +453,6 @@
 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@
@@ -450,7 +465,6 @@
 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@
@@ -464,6 +478,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -475,6 +490,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -513,6 +530,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -548,10 +566,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -577,6 +599,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -584,7 +609,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -613,6 +645,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -623,6 +656,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -653,17 +687,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -680,6 +713,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -718,6 +752,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -772,7 +807,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/dccp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/dccp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1121,6 +1155,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/debugutils/Makefile.am b/gst/debugutils/Makefile.am
index c7dd343..aff78a2 100644
--- a/gst/debugutils/Makefile.am
+++ b/gst/debugutils/Makefile.am
@@ -19,14 +19,10 @@
 	debugutilsbad.c \
         fpsdisplaysink.c \
         gstchecksumsink.c \
-	gstchecksumsink.h \
 	gstchopmydata.c \
-	gstchopmydata.h \
 	gstcompare.c \
-	gstcompare.h \
-	gstdebugspy.h \
 	gstwatchdog.c \
-	gstwatchdog.h
+	gsterrorignore.c
 
 nodist_libgstdebugutilsbad_la_SOURCES = $(BUILT_SOURCES)
 libgstdebugutilsbad_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
@@ -36,18 +32,10 @@
 libgstdebugutilsbad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdebugutilsbad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
-noinst_HEADERS = fpsdisplaysink.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdebugutils -:SHARED libgstdebugutils \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdebugutils_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebugutils_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdebugutils_la_LDFLAGS) \
-	           $(libgstdebugutils_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
+noinst_HEADERS = fpsdisplaysink.h \
+	gstchecksumsink.h \
+	gstchopmydata.h \
+	gstcompare.h \
+	gstdebugspy.h \
+	gstwatchdog.h \
+	gsterrorignore.h
diff --git a/gst/debugutils/Makefile.in b/gst/debugutils/Makefile.in
index 0ced776..414e4b7 100644
--- a/gst/debugutils/Makefile.in
+++ b/gst/debugutils/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,9 +98,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
 subdir = gst/debugutils
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -99,6 +106,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -112,7 +120,6 @@
 	$(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 \
@@ -129,6 +136,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -172,7 +181,8 @@
 	libgstdebugutilsbad_la-gstchecksumsink.lo \
 	libgstdebugutilsbad_la-gstchopmydata.lo \
 	libgstdebugutilsbad_la-gstcompare.lo \
-	libgstdebugutilsbad_la-gstwatchdog.lo
+	libgstdebugutilsbad_la-gstwatchdog.lo \
+	libgstdebugutilsbad_la-gsterrorignore.lo
 am__objects_1 = libgstdebugutilsbad_la-debugutils-marshal.lo
 am__objects_2 =
 am__objects_3 = $(am__objects_1) $(am__objects_2)
@@ -249,6 +259,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/gst-glib-gen.mak $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -266,8 +278,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -292,8 +306,6 @@
 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@
@@ -306,7 +318,6 @@
 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@
@@ -314,6 +325,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -340,11 +353,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -363,8 +379,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -423,10 +437,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -443,7 +461,6 @@
 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@
@@ -452,7 +469,6 @@
 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@
@@ -465,7 +481,6 @@
 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@
@@ -479,6 +494,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -490,6 +506,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -528,6 +546,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -563,10 +582,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -592,6 +615,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -599,7 +625,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -628,6 +661,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -638,6 +672,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -668,17 +703,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -695,6 +729,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -733,6 +768,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -760,14 +796,10 @@
 	debugutilsbad.c \
         fpsdisplaysink.c \
         gstchecksumsink.c \
-	gstchecksumsink.h \
 	gstchopmydata.c \
-	gstchopmydata.h \
 	gstcompare.c \
-	gstcompare.h \
-	gstdebugspy.h \
 	gstwatchdog.c \
-	gstwatchdog.h
+	gsterrorignore.c
 
 nodist_libgstdebugutilsbad_la_SOURCES = $(BUILT_SOURCES)
 libgstdebugutilsbad_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
@@ -777,7 +809,14 @@
 
 libgstdebugutilsbad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdebugutilsbad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = fpsdisplaysink.h
+noinst_HEADERS = fpsdisplaysink.h \
+	gstchecksumsink.h \
+	gstchopmydata.h \
+	gstcompare.h \
+	gstdebugspy.h \
+	gstwatchdog.h \
+	gsterrorignore.h
+
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -795,7 +834,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/debugutils/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/debugutils/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -804,7 +842,7 @@
 	    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/gst-glib-gen.mak:
+$(top_srcdir)/common/gst-glib-gen.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -866,6 +904,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdebugutilsbad_la-gstchopmydata.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdebugutilsbad_la-gstcompare.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdebugutilsbad_la-gstdebugspy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdebugutilsbad_la-gsterrorignore.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdebugutilsbad_la-gstwatchdog.Plo@am__quote@
 
 .c.o:
@@ -941,6 +980,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 $(libgstdebugutilsbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdebugutilsbad_la_CFLAGS) $(CFLAGS) -c -o libgstdebugutilsbad_la-gstwatchdog.lo `test -f 'gstwatchdog.c' || echo '$(srcdir)/'`gstwatchdog.c
 
+libgstdebugutilsbad_la-gsterrorignore.lo: gsterrorignore.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdebugutilsbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdebugutilsbad_la_CFLAGS) $(CFLAGS) -MT libgstdebugutilsbad_la-gsterrorignore.lo -MD -MP -MF $(DEPDIR)/libgstdebugutilsbad_la-gsterrorignore.Tpo -c -o libgstdebugutilsbad_la-gsterrorignore.lo `test -f 'gsterrorignore.c' || echo '$(srcdir)/'`gsterrorignore.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdebugutilsbad_la-gsterrorignore.Tpo $(DEPDIR)/libgstdebugutilsbad_la-gsterrorignore.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gsterrorignore.c' object='libgstdebugutilsbad_la-gsterrorignore.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 $(libgstdebugutilsbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdebugutilsbad_la_CFLAGS) $(CFLAGS) -c -o libgstdebugutilsbad_la-gsterrorignore.lo `test -f 'gsterrorignore.c' || echo '$(srcdir)/'`gsterrorignore.c
+
 libgstdebugutilsbad_la-debugutils-marshal.lo: debugutils-marshal.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdebugutilsbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdebugutilsbad_la_CFLAGS) $(CFLAGS) -MT libgstdebugutilsbad_la-debugutils-marshal.lo -MD -MP -MF $(DEPDIR)/libgstdebugutilsbad_la-debugutils-marshal.Tpo -c -o libgstdebugutilsbad_la-debugutils-marshal.lo `test -f 'debugutils-marshal.c' || echo '$(srcdir)/'`debugutils-marshal.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdebugutilsbad_la-debugutils-marshal.Tpo $(DEPDIR)/libgstdebugutilsbad_la-debugutils-marshal.Plo
@@ -1165,6 +1211,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # these are all the rules generating the relevant files
 $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
@@ -1202,20 +1250,6 @@
 .deps/%-enumtypes.Plo:
 	@touch $@
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdebugutils -:SHARED libgstdebugutils \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdebugutils_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebugutils_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdebugutils_la_LDFLAGS) \
-	           $(libgstdebugutils_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/debugutils/debugutilsbad.c b/gst/debugutils/debugutilsbad.c
index 5eef800..68edd78 100644
--- a/gst/debugutils/debugutilsbad.c
+++ b/gst/debugutils/debugutilsbad.c
@@ -23,32 +23,36 @@
 
 #include <gst/gst.h>
 
-GType gst_checksum_sink_get_type(void);
-GType fps_display_sink_get_type(void);
-GType gst_chop_my_data_get_type(void);
-GType gst_compare_get_type(void);
-GType gst_debug_spy_get_type(void);
-GType gst_watchdog_get_type(void);
+GType gst_checksum_sink_get_type (void);
+GType fps_display_sink_get_type (void);
+GType gst_chop_my_data_get_type (void);
+GType gst_compare_get_type (void);
+GType gst_debug_spy_get_type (void);
+GType gst_error_ignore_get_type (void);
+GType gst_watchdog_get_type (void);
 
-static gboolean plugin_init(GstPlugin * plugin)
+static gboolean
+plugin_init (GstPlugin * plugin)
 {
-  gst_element_register(plugin, "checksumsink", GST_RANK_NONE,
-      gst_checksum_sink_get_type());
-  gst_element_register(plugin, "fpsdisplaysink", GST_RANK_NONE,
-      fps_display_sink_get_type());
-  gst_element_register(plugin, "chopmydata", GST_RANK_NONE,
-      gst_chop_my_data_get_type());
-  gst_element_register(plugin, "compare", GST_RANK_NONE,
-      gst_compare_get_type());
-  gst_element_register(plugin, "debugspy", GST_RANK_NONE,
-      gst_debug_spy_get_type());
-  gst_element_register(plugin, "watchdog", GST_RANK_NONE,
-      gst_watchdog_get_type());
+  gst_element_register (plugin, "checksumsink", GST_RANK_NONE,
+      gst_checksum_sink_get_type ());
+  gst_element_register (plugin, "fpsdisplaysink", GST_RANK_NONE,
+      fps_display_sink_get_type ());
+  gst_element_register (plugin, "chopmydata", GST_RANK_NONE,
+      gst_chop_my_data_get_type ());
+  gst_element_register (plugin, "compare", GST_RANK_NONE,
+      gst_compare_get_type ());
+  gst_element_register (plugin, "debugspy", GST_RANK_NONE,
+      gst_debug_spy_get_type ());
+  gst_element_register (plugin, "watchdog", GST_RANK_NONE,
+      gst_watchdog_get_type ());
+  gst_element_register (plugin, "errorignore", GST_RANK_NONE,
+      gst_error_ignore_get_type ());
 
   return TRUE;
 }
 
-GST_PLUGIN_DEFINE(GST_VERSION_MAJOR,
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     debugutilsbad,
     "Collection of elements that may or may not be useful for debugging",
diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c
index 1970baf..dcef679 100644
--- a/gst/debugutils/fpsdisplaysink.c
+++ b/gst/debugutils/fpsdisplaysink.c
@@ -27,7 +27,7 @@
  * |[
  * gst-launch videotestsrc ! fpsdisplaysink
  * gst-launch videotestsrc ! fpsdisplaysink text-overlay=false
- * gst-launch filesrc location=video.avi ! decodebin2 name=d ! queue ! fpsdisplaysink d. ! queue ! fakesink sync=true
+ * gst-launch filesrc location=video.avi ! decodebin name=d ! queue ! fpsdisplaysink d. ! queue ! fakesink sync=true
  * gst-launch playbin uri=file:///path/to/video.avi video-sink="fpsdisplaysink" audio-sink=fakesink
  * ]|
  * </refsect2>
@@ -101,6 +101,8 @@
 static void fps_display_sink_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 static void fps_display_sink_dispose (GObject * object);
+static void fps_display_sink_handle_message (GstBin * bin,
+    GstMessage * message);
 
 static gboolean display_current_fps (gpointer data);
 
@@ -113,6 +115,7 @@
 {
   GObjectClass *gobject_klass = G_OBJECT_CLASS (klass);
   GstElementClass *gstelement_klass = GST_ELEMENT_CLASS (klass);
+  GstBinClass *bin_class = GST_BIN_CLASS (klass);
 
   parent_class = g_type_class_peek_parent (klass);
 
@@ -120,6 +123,8 @@
   gobject_klass->get_property = fps_display_sink_get_property;
   gobject_klass->dispose = fps_display_sink_dispose;
 
+  bin_class->handle_message = fps_display_sink_handle_message;
+
   g_object_class_install_property (gobject_klass, PROP_SYNC,
       g_param_spec_boolean ("sync",
           "Sync", "Sync on the clock (if the internally used sink doesn't "
@@ -220,49 +225,24 @@
   GstMiniObject *mini_obj = GST_PAD_PROBE_INFO_DATA (info);
   GstFPSDisplaySink *self = GST_FPS_DISPLAY_SINK (user_data);
 
-#if 0
   if (GST_IS_BUFFER (mini_obj)) {
-    GstBuffer *buf = GST_BUFFER_CAST (mini_obj);
+    GstClockTime ts;
 
-    if (GST_CLOCK_TIME_IS_VALID (self->next_ts)) {
-      if (GST_BUFFER_TIMESTAMP (buf) <= self->next_ts) {
-        self->frames_rendered++;
-      } else {
-        GST_WARNING_OBJECT (self, "dropping frame : ts %" GST_TIME_FORMAT
-            " < expected_ts %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
-            GST_TIME_ARGS (self->next_ts));
-        self->frames_dropped++;
-      }
-    } else {
-      self->frames_rendered++;
+    /* assume the frame is going to be rendered. If it isnt', we'll get a qos
+     * message and reset ->frames_rendered from there.
+     */
+    g_atomic_int_inc (&self->frames_rendered);
+
+    ts = gst_util_get_timestamp ();
+    if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (self->start_ts))) {
+      self->interval_ts = self->last_ts = self->start_ts = ts;
     }
-  } else
-#endif
-  if (GST_IS_EVENT (mini_obj)) {
-    GstEvent *ev = GST_EVENT_CAST (mini_obj);
-
-    if (GST_EVENT_TYPE (ev) == GST_EVENT_QOS) {
-      GstClockTimeDiff diff;
-      GstClockTime ts;
-
-      gst_event_parse_qos (ev, NULL, NULL, &diff, &ts);
-      if (diff <= 0.0) {
-        g_atomic_int_inc (&self->frames_rendered);
-      } else {
-        g_atomic_int_inc (&self->frames_dropped);
-      }
-
-      ts = gst_util_get_timestamp ();
-      if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (self->start_ts))) {
-        self->interval_ts = self->last_ts = self->start_ts = ts;
-      }
-      if (GST_CLOCK_DIFF (self->interval_ts, ts) > self->fps_update_interval) {
-        display_current_fps (self);
-        self->interval_ts = ts;
-      }
+    if (GST_CLOCK_DIFF (self->interval_ts, ts) > self->fps_update_interval) {
+      display_current_fps (self);
+      self->interval_ts = ts;
     }
   }
+
   return GST_PAD_PROBE_OK;
 }
 
@@ -435,11 +415,7 @@
     g_free (self->last_message);
     self->last_message = g_strdup (fps_message);
     GST_OBJECT_UNLOCK (self);
-#if !GLIB_CHECK_VERSION(2,26,0)
-    g_object_notify ((GObject *) self, "last-message");
-#else
     g_object_notify_by_pspec ((GObject *) self, pspec_last_message);
-#endif
   }
 
   self->last_frames_rendered = frames_rendered;
@@ -521,11 +497,7 @@
     g_free (self->last_message);
     self->last_message = str;
     GST_OBJECT_UNLOCK (self);
-#if !GLIB_CHECK_VERSION(2,26,0)
-    g_object_notify ((GObject *) self, "last-message");
-#else
     g_object_notify_by_pspec ((GObject *) self, pspec_last_message);
-#endif
   }
 
   GST_OBJECT_LOCK (self);
@@ -706,6 +678,28 @@
   return ret;
 }
 
+static void
+fps_display_sink_handle_message (GstBin * bin, GstMessage * message)
+{
+  GstFPSDisplaySink *self = (GstFPSDisplaySink *) bin;
+
+  if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_QOS) {
+    GstFormat format;
+    guint64 rendered, dropped;
+
+    gst_message_parse_qos_stats (message, &format, &rendered, &dropped);
+    if (format != GST_FORMAT_UNDEFINED) {
+      if (rendered != -1)
+        g_atomic_int_set (&self->frames_rendered, rendered);
+
+      if (dropped != -1)
+        g_atomic_int_set (&self->frames_dropped, dropped);
+    }
+  }
+
+  GST_BIN_CLASS (parent_class)->handle_message (bin, message);
+}
+
 GType
 fps_display_sink_get_type (void)
 {
diff --git a/gst/debugutils/gstchopmydata.c b/gst/debugutils/gstchopmydata.c
index 97372e3..e7800d5 100644
--- a/gst/debugutils/gstchopmydata.c
+++ b/gst/debugutils/gstchopmydata.c
@@ -284,6 +284,9 @@
     buffer =
         gst_adapter_take_buffer (chopmydata->adapter, chopmydata->next_size);
 
+    GST_BUFFER_PTS (buffer) = gst_adapter_prev_pts (chopmydata->adapter, NULL);
+    GST_BUFFER_DTS (buffer) = gst_adapter_prev_dts (chopmydata->adapter, NULL);
+
     chopmydata->next_size = 0;
 
     ret = gst_pad_push (chopmydata->srcpad, buffer);
diff --git a/gst/debugutils/gstcompare.c b/gst/debugutils/gstcompare.c
index 5de2f9d..3d52615 100644
--- a/gst/debugutils/gstcompare.c
+++ b/gst/debugutils/gstcompare.c
@@ -91,8 +91,7 @@
   PROP_OFFSET_TS,
   PROP_METHOD,
   PROP_THRESHOLD,
-  PROP_UPPER,
-  PROP_LAST
+  PROP_UPPER
 };
 
 #define DEFAULT_META             GST_BUFFER_COPY_ALL
diff --git a/gst/debugutils/gsterrorignore.c b/gst/debugutils/gsterrorignore.c
new file mode 100644
index 0000000..3c19ed5
--- /dev/null
+++ b/gst/debugutils/gsterrorignore.c
@@ -0,0 +1,271 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Vivia Nikolaidou <vivia@toolsonair.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-errorignore
+ *
+ * Passes through all packets, until it encounters GST_FLOW_ERROR or
+ * GST_FLOW_NOT_NEGOTIATED (configurable). At that point it will unref the
+ * buffers and return GST_FLOW_OK (configurable) - until the next 
+ * READY_TO_PAUSED, RECONFIGURE or FLUSH_STOP.
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 videotestsrc ! errorignore ! autovideosink
+ * ]|
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gsterrorignore.h"
+
+#define GST_CAT_DEFAULT gst_error_ignore_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_0,
+  PROP_IGNORE_ERROR,
+  PROP_IGNORE_NOTLINKED,
+  PROP_IGNORE_NOTNEGOTIATED,
+  PROP_CONVERT_TO
+};
+
+static void gst_error_ignore_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_error_ignore_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+#define parent_class gst_error_ignore_parent_class
+G_DEFINE_TYPE (GstErrorIgnore, gst_error_ignore, GST_TYPE_ELEMENT);
+
+static GstFlowReturn gst_error_ignore_sink_chain (GstPad * pad,
+    GstObject * parent, GstBuffer * inbuf);
+static gboolean gst_error_ignore_sink_event (GstPad * pad, GstObject * parent,
+    GstEvent * event);
+static GstStateChangeReturn gst_error_ignore_change_state (GstElement * element,
+    GstStateChange transition);
+
+static void
+gst_error_ignore_class_init (GstErrorIgnoreClass * klass)
+{
+  GstElementClass *gstelement_class;
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  GST_DEBUG_CATEGORY_INIT (gst_error_ignore_debug, "errorignore", 0,
+      "Convert some GstFlowReturn types into others");
+
+  gstelement_class = (GstElementClass *) klass;
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "Convert some GstFlowReturn types into others", "Generic",
+      "Pass through all packets but ignore some GstFlowReturn types",
+      "Vivia Nikolaidou <vivia@toolsonair.com>");
+
+  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));
+
+  gstelement_class->change_state = gst_error_ignore_change_state;
+
+  /* define virtual function pointers */
+  object_class->set_property = gst_error_ignore_set_property;
+  object_class->get_property = gst_error_ignore_get_property;
+
+  /* define properties */
+  g_object_class_install_property (object_class, PROP_IGNORE_ERROR,
+      g_param_spec_boolean ("ignore-error", "Ignore GST_FLOW_ERROR",
+          "Whether to ignore GST_FLOW_ERROR",
+          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (object_class, PROP_IGNORE_NOTLINKED,
+      g_param_spec_boolean ("ignore-notlinked", "Ignore GST_FLOW_NOT_LINKED",
+          "Whether to ignore GST_FLOW_NOT_LINKED",
+          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (object_class, PROP_IGNORE_NOTNEGOTIATED,
+      g_param_spec_boolean ("ignore-notnegotiated",
+          "Ignore GST_FLOW_NOT_NEGOTIATED",
+          "Whether to ignore GST_FLOW_NOT_NEGOTIATED",
+          TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (object_class, PROP_CONVERT_TO,
+      g_param_spec_enum ("convert-to", "GstFlowReturn to convert to",
+          "Which GstFlowReturn value we should convert to when ignoring",
+          GST_TYPE_FLOW_RETURN,
+          GST_FLOW_NOT_LINKED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_error_ignore_init (GstErrorIgnore * self)
+{
+  self->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
+  gst_pad_set_chain_function (self->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_error_ignore_sink_chain));
+  gst_pad_set_event_function (self->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_error_ignore_sink_event));
+  GST_PAD_SET_PROXY_ALLOCATION (self->sinkpad);
+  GST_PAD_SET_PROXY_CAPS (self->sinkpad);
+  GST_PAD_SET_PROXY_SCHEDULING (self->sinkpad);
+  gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
+
+  self->srcpad = gst_pad_new_from_static_template (&src_template, "src");
+  gst_pad_use_fixed_caps (self->srcpad);
+  GST_PAD_SET_PROXY_ALLOCATION (self->srcpad);
+  GST_PAD_SET_PROXY_CAPS (self->srcpad);
+  GST_PAD_SET_PROXY_SCHEDULING (self->srcpad);
+  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
+
+  self->keep_pushing = TRUE;
+  self->ignore_error = TRUE;
+  self->ignore_notlinked = FALSE;
+  self->ignore_notnegotiated = TRUE;
+  self->convert_to = GST_FLOW_NOT_LINKED;
+}
+
+static void
+gst_error_ignore_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstErrorIgnore *self = GST_ERROR_IGNORE (object);
+
+  switch (prop_id) {
+    case PROP_IGNORE_ERROR:
+      self->ignore_error = g_value_get_boolean (value);
+      break;
+    case PROP_IGNORE_NOTLINKED:
+      self->ignore_notlinked = g_value_get_boolean (value);
+      break;
+    case PROP_IGNORE_NOTNEGOTIATED:
+      self->ignore_notnegotiated = g_value_get_boolean (value);
+      break;
+    case PROP_CONVERT_TO:
+      self->convert_to = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_error_ignore_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstErrorIgnore *self = GST_ERROR_IGNORE (object);
+
+  switch (prop_id) {
+    case PROP_IGNORE_ERROR:
+      g_value_set_boolean (value, self->ignore_error);
+      break;
+    case PROP_IGNORE_NOTLINKED:
+      g_value_set_boolean (value, self->ignore_notlinked);
+      break;
+    case PROP_IGNORE_NOTNEGOTIATED:
+      g_value_set_boolean (value, self->ignore_notnegotiated);
+      break;
+    case PROP_CONVERT_TO:
+      g_value_set_enum (value, self->convert_to);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_error_ignore_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  GstErrorIgnore *self = GST_ERROR_IGNORE (parent);
+  gboolean ret;
+
+  GST_LOG_OBJECT (pad, "Got %s event", GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      self->keep_pushing = TRUE;
+      /* fall through */
+    default:
+      ret = gst_pad_event_default (pad, parent, event);
+      break;
+  }
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_error_ignore_sink_chain (GstPad * pad, GstObject * parent,
+    GstBuffer * inbuf)
+{
+  GstErrorIgnore *self = GST_ERROR_IGNORE (parent);
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  if (gst_pad_check_reconfigure (pad))
+    self->keep_pushing = TRUE;
+
+  if (self->keep_pushing) {
+    ret = gst_pad_push (self->srcpad, inbuf);
+    self->keep_pushing = (ret == GST_FLOW_OK);
+  } else {
+    gst_buffer_unref (inbuf);
+  }
+
+  if ((ret == GST_FLOW_ERROR && self->ignore_error) ||
+      (ret == GST_FLOW_NOT_LINKED && self->ignore_notlinked) ||
+      (ret == GST_FLOW_NOT_NEGOTIATED && self->ignore_notnegotiated))
+    return self->convert_to;
+  else
+    return ret;
+}
+
+static GstStateChangeReturn
+gst_error_ignore_change_state (GstElement * element, GstStateChange transition)
+{
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  GstErrorIgnore *self = GST_ERROR_IGNORE (element);
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      self->keep_pushing = TRUE;
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
diff --git a/gst/debugutils/gsterrorignore.h b/gst/debugutils/gsterrorignore.h
new file mode 100644
index 0000000..21d0864
--- /dev/null
+++ b/gst/debugutils/gsterrorignore.h
@@ -0,0 +1,60 @@
+/* 
+ * GStreamer
+ * Copyright (C) 2015 Vivia Nikolaidou <vivia@toolsonair.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_ERROR_IGNORE_H__
+#define __GST_ERROR_IGNORE_H__
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_ERROR_IGNORE            (gst_error_ignore_get_type())
+#define GST_ERROR_IGNORE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ERROR_IGNORE,GstErrorIgnore))
+#define GST_IS_ERROR_IGNORE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ERROR_IGNORE))
+#define GST_ERROR_IGNORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_ERROR_IGNORE,GstErrorIgnoreClass))
+#define GST_IS_ERROR_IGNORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_ERROR_IGNORE))
+#define GST_ERROR_IGNORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_ERROR_IGNORE,GstErrorIgnoreClass))
+
+typedef struct _GstErrorIgnore      GstErrorIgnore;
+typedef struct _GstErrorIgnoreClass GstErrorIgnoreClass;
+
+struct _GstErrorIgnore {
+  GstElement parent;
+
+  GstPad *srcpad, *sinkpad;
+
+  gboolean keep_pushing;
+  gboolean ignore_error;
+  gboolean ignore_notlinked;
+  gboolean ignore_notnegotiated;
+  GstFlowReturn convert_to;
+};
+
+struct _GstErrorIgnoreClass {
+  GstElementClass parent_class;
+};
+
+GType gst_error_ignore_get_type (void);
+
+gboolean gst_error_ignore_plugin_init (GstPlugin * plugin);
+
+G_END_DECLS
+
+#endif /* __GST_ERROR_IGNORE_H__ */
diff --git a/gst/debugutils/gstwatchdog.c b/gst/debugutils/gstwatchdog.c
index eb77765..3292b43 100644
--- a/gst/debugutils/gstwatchdog.c
+++ b/gst/debugutils/gstwatchdog.c
@@ -66,7 +66,8 @@
     GstEvent * event);
 static GstFlowReturn gst_watchdog_transform_ip (GstBaseTransform * trans,
     GstBuffer * buf);
-static void gst_watchdog_feed (GstWatchdog * watchdog);
+static void gst_watchdog_feed (GstWatchdog * watchdog, gpointer mini_object,
+    gboolean force);
 
 static GstStateChangeReturn
 gst_watchdog_change_state (GstElement * element, GstStateChange transition);
@@ -140,7 +141,7 @@
     case PROP_TIMEOUT:
       GST_OBJECT_LOCK (watchdog);
       watchdog->timeout = g_value_get_int (value);
-      gst_watchdog_feed (watchdog);
+      gst_watchdog_feed (watchdog, NULL, FALSE);
       GST_OBJECT_UNLOCK (watchdog);
       break;
     default:
@@ -206,19 +207,54 @@
   return FALSE;
 }
 
+/*  Call with OBJECT_LOCK taken */
 static void
-gst_watchdog_feed (GstWatchdog * watchdog)
+gst_watchdog_feed (GstWatchdog * watchdog, gpointer mini_object, gboolean force)
 {
   if (watchdog->source) {
+    if (watchdog->waiting_for_flush_start) {
+      if (mini_object && GST_IS_EVENT (mini_object) &&
+          GST_EVENT_TYPE (mini_object) == GST_EVENT_FLUSH_START) {
+        watchdog->waiting_for_flush_start = FALSE;
+        watchdog->waiting_for_flush_stop = TRUE;
+      }
+
+      force = TRUE;
+    } else if (watchdog->waiting_for_flush_stop) {
+      if (mini_object && GST_IS_EVENT (mini_object) &&
+          GST_EVENT_TYPE (mini_object) == GST_EVENT_FLUSH_STOP) {
+        watchdog->waiting_for_flush_stop = FALSE;
+        watchdog->waiting_for_a_buffer = TRUE;
+      }
+
+      force = TRUE;
+    } else if (watchdog->waiting_for_a_buffer) {
+      if (mini_object && GST_IS_BUFFER (mini_object)) {
+        watchdog->waiting_for_a_buffer = FALSE;
+        GST_DEBUG_OBJECT (watchdog, "Got a buffer \\o/");
+      } else {
+        GST_DEBUG_OBJECT (watchdog, "Waiting for a buffer and did not get it,"
+            " keep trying even in PAUSED state");
+        force = TRUE;
+      }
+    }
     g_source_destroy (watchdog->source);
     g_source_unref (watchdog->source);
     watchdog->source = NULL;
+
   }
 
-  if (watchdog->timeout != 0 && watchdog->main_context) {
+  if (watchdog->timeout == 0) {
+    GST_LOG_OBJECT (watchdog, "Timeout is 0 => nothing to do");
+  } else if (watchdog->main_context == NULL) {
+    GST_LOG_OBJECT (watchdog, "No maincontext => nothing to do");
+  } else if ((GST_STATE (watchdog) != GST_STATE_PLAYING) && force == FALSE) {
+    GST_LOG_OBJECT (watchdog,
+        "Not in playing and force is FALSE => Nothing to do");
+  } else {
     watchdog->source = g_timeout_source_new (watchdog->timeout);
-    g_source_set_callback (watchdog->source, gst_watchdog_trigger, gst_object_ref (watchdog),
-        gst_object_unref);
+    g_source_set_callback (watchdog->source, gst_watchdog_trigger,
+        gst_object_ref (watchdog), gst_object_unref);
     g_source_attach (watchdog->source, watchdog->main_context);
   }
 }
@@ -283,7 +319,7 @@
   GST_DEBUG_OBJECT (watchdog, "sink_event");
 
   GST_OBJECT_LOCK (watchdog);
-  gst_watchdog_feed (watchdog);
+  gst_watchdog_feed (watchdog, event, FALSE);
   GST_OBJECT_UNLOCK (watchdog);
 
   return
@@ -294,12 +330,25 @@
 static gboolean
 gst_watchdog_src_event (GstBaseTransform * trans, GstEvent * event)
 {
+  gboolean force = FALSE;
   GstWatchdog *watchdog = GST_WATCHDOG (trans);
 
   GST_DEBUG_OBJECT (watchdog, "src_event");
 
   GST_OBJECT_LOCK (watchdog);
-  gst_watchdog_feed (watchdog);
+  if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
+    GstSeekFlags flags;
+
+    gst_event_parse_seek (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL);
+
+    if (flags & GST_SEEK_FLAG_FLUSH) {
+      force = TRUE;
+      GST_DEBUG_OBJECT (watchdog, "Got a FLUSHING seek, we need a buffer now!");
+      watchdog->waiting_for_flush_start = TRUE;
+    }
+  }
+
+  gst_watchdog_feed (watchdog, event, force);
   GST_OBJECT_UNLOCK (watchdog);
 
   return GST_BASE_TRANSFORM_CLASS (gst_watchdog_parent_class)->src_event (trans,
@@ -314,7 +363,7 @@
   GST_DEBUG_OBJECT (watchdog, "transform_ip");
 
   GST_OBJECT_LOCK (watchdog);
-  gst_watchdog_feed (watchdog);
+  gst_watchdog_feed (watchdog, buf, FALSE);
   GST_OBJECT_UNLOCK (watchdog);
 
   return GST_FLOW_OK;
@@ -332,11 +381,10 @@
   GST_DEBUG_OBJECT (watchdog, "gst_watchdog_change_state");
 
   switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       /* Activate timer */
       GST_OBJECT_LOCK (watchdog);
-      gst_watchdog_feed (watchdog);
+      gst_watchdog_feed (watchdog, NULL, FALSE);
       GST_OBJECT_UNLOCK (watchdog);
       break;
     default:
@@ -348,6 +396,12 @@
       transition);
 
   switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      GST_OBJECT_LOCK (watchdog);
+      watchdog->waiting_for_a_buffer = TRUE;
+      gst_watchdog_feed (watchdog, NULL, TRUE);
+      GST_OBJECT_UNLOCK (watchdog);
+      break;
     case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
       /* Disable the timer */
       GST_OBJECT_LOCK (watchdog);
diff --git a/gst/debugutils/gstwatchdog.h b/gst/debugutils/gstwatchdog.h
index 40740ef..b296e0f 100644
--- a/gst/debugutils/gstwatchdog.h
+++ b/gst/debugutils/gstwatchdog.h
@@ -45,6 +45,10 @@
   GMainLoop *main_loop;
   GThread *thread;
   GSource *source;
+
+  gboolean waiting_for_a_buffer;
+  gboolean waiting_for_flush_start;
+  gboolean waiting_for_flush_stop;
 };
 
 struct _GstWatchdogClass
diff --git a/gst/dvbsuboverlay/Makefile.am b/gst/dvbsuboverlay/Makefile.am
index 5f5c806..7993253 100644
--- a/gst/dvbsuboverlay/Makefile.am
+++ b/gst/dvbsuboverlay/Makefile.am
@@ -8,17 +8,3 @@
 libgstdvbsuboverlay_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstdvbsuboverlay.h dvb-sub.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdvbsuboverlay -:SHARED libgstdvbsuboverlay \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdvbsuboverlay_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdvbsuboverlay_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdvbsuboverlay_la_LDFLAGS) \
-	           $(libgstdvbsuboverlay_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/dvbsuboverlay/Makefile.in b/gst/dvbsuboverlay/Makefile.in
index b6ee570..0435d88 100644
--- a/gst/dvbsuboverlay/Makefile.in
+++ b/gst/dvbsuboverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/dvbsuboverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) TODO
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp TODO
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -748,7 +783,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/dvbsuboverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/dvbsuboverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1065,20 +1099,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdvbsuboverlay -:SHARED libgstdvbsuboverlay \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdvbsuboverlay_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdvbsuboverlay_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdvbsuboverlay_la_LDFLAGS) \
-	           $(libgstdvbsuboverlay_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/dvbsuboverlay/dvb-sub.c b/gst/dvbsuboverlay/dvb-sub.c
index ae3ab60..65a43ab 100644
--- a/gst/dvbsuboverlay/dvb-sub.c
+++ b/gst/dvbsuboverlay/dvb-sub.c
@@ -1168,7 +1168,6 @@
     buf += 2;
     dvb_sub->display_def.window_height =
         GST_READ_UINT16_BE (buf) - dvb_sub->display_def.window_y + 1;
-    buf += 2;
   }
 
   return 0;
diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c
index 3965b65..882bfa7 100644
--- a/gst/dvbsuboverlay/gstdvbsuboverlay.c
+++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c
@@ -647,7 +647,7 @@
 {
   gboolean ret;
   GstCaps *caps;
-  GstStaticCaps static_caps = GST_STATIC_CAPS (DVBSUB_OVERLAY_CAPS);
+  static GstStaticCaps static_caps = GST_STATIC_CAPS (DVBSUB_OVERLAY_CAPS);
 
   caps = gst_static_caps_get (&static_caps);
   ret = gst_caps_is_subset (incaps, caps);
@@ -686,23 +686,28 @@
       || !gst_caps_features_contains (f,
           GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION)) {
     GstCaps *overlay_caps;
+    GstCaps *peercaps;
 
     /* In this case we added the meta, but we can work without it
      * so preserve the original caps so we can use it as a fallback */
     overlay_caps = gst_caps_copy (caps);
 
     f = gst_caps_get_features (overlay_caps, 0);
-    if (f == NULL) {
-      f = gst_caps_features_new
-          (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
-    } else {
-      gst_caps_features_add (f,
-          GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
-    }
+    gst_caps_features_add (f,
+        GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
 
-    ret = gst_pad_peer_query_accept_caps (overlay->srcpad, overlay_caps);
-    GST_DEBUG_OBJECT (overlay, "Downstream accepts the overlay meta: %d", ret);
-    if (ret) {
+    /* FIXME: We should probably check if downstream *prefers* the
+     * overlay meta, and only enforce usage of it if we can't handle
+     * the format ourselves and thus would have to drop the overlays.
+     * Otherwise we should prefer what downstream wants here.
+     */
+    peercaps = gst_pad_peer_query_caps (overlay->srcpad, NULL);
+    caps_has_meta = gst_caps_can_intersect (peercaps, overlay_caps);
+    gst_caps_unref (peercaps);
+
+    GST_DEBUG_OBJECT (overlay, "Downstream accepts the overlay meta: %d",
+        caps_has_meta);
+    if (caps_has_meta) {
       gst_caps_unref (caps);
       caps = overlay_caps;
 
@@ -720,7 +725,7 @@
     GstQuery *query;
 
     /* find supported meta */
-    query = gst_query_new_allocation (caps, TRUE);
+    query = gst_query_new_allocation (caps, FALSE);
 
     if (!gst_pad_peer_query (overlay->srcpad, query)) {
       /* no problem, we use the query defaults */
diff --git a/gst/dvdspu/Makefile.am b/gst/dvdspu/Makefile.am
index e28daeb..d7d48a5 100644
--- a/gst/dvdspu/Makefile.am
+++ b/gst/dvdspu/Makefile.am
@@ -12,17 +12,3 @@
 noinst_HEADERS = gstdvdspu.h gstspu-pgs.h gstspu-vobsub.h gstspu-common.h
 
 EXTRA_DIST = Notes.txt
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdvdspu -:SHARED libgstdvdspu \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdvdspu_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdvdspu_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdvdspu_la_LDFLAGS) \
-	           $(libgstdvdspu_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/dvdspu/Makefile.in b/gst/dvdspu/Makefile.in
index 340018b..2ba8f61 100644
--- a/gst/dvdspu/Makefile.in
+++ b/gst/dvdspu/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/dvdspu
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/dvdspu/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/dvdspu/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1095,20 +1129,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdvdspu -:SHARED libgstdvdspu \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdvdspu_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdvdspu_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdvdspu_la_LDFLAGS) \
-	           $(libgstdvdspu_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c
index 2c270fd..62ee544 100644
--- a/gst/dvdspu/gstdvdspu.c
+++ b/gst/dvdspu/gstdvdspu.c
@@ -32,10 +32,6 @@
 #  include <config.h>
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include <gst/gst-i18n-plugin.h>
 #include <gst/video/video.h>
 
@@ -287,7 +283,9 @@
   if (peer) {
     res = gst_pad_send_event (peer, event);
     gst_object_unref (peer);
-  }
+  } else
+    gst_event_unref (event);
+
   return res;
 }
 
@@ -459,8 +457,10 @@
 
       gst_event_copy_segment (event, &seg);
 
-      if (seg.format != GST_FORMAT_TIME)
+      if (seg.format != GST_FORMAT_TIME) {
+        gst_event_unref (event);
         return FALSE;
+      }
 
       /* Only print updates if they have an end time (don't print start_time
        * updates */
@@ -830,6 +830,9 @@
 
   if (dvdspu->spu_state.flags & SPU_STATE_STILL_FRAME) {
 
+    if (dvdspu->video_seg.format != GST_FORMAT_TIME)
+      return;                   /* No video segment or frames yet */
+
     vid_ts = gst_segment_to_running_time (&dvdspu->video_seg,
         GST_FORMAT_TIME, dvdspu->video_seg.position);
     sub_ts = gst_segment_to_running_time (&dvdspu->subp_seg,
@@ -1170,7 +1173,6 @@
        * video might still continue, though */
       gst_event_unref (event);
       goto done;
-      break;
     default:
       res = gst_pad_event_default (pad, parent, event);
       break;
diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c
index 785f79c..e485817 100644
--- a/gst/dvdspu/gstspu-pgs.c
+++ b/gst/dvdspu/gstspu-pgs.c
@@ -592,14 +592,14 @@
     payload += 3;
 
     PGS_DUMP ("%d bytes of RLE data, of %d bytes total.\n",
-        end - payload, obj->rle_data_size);
+        (int) (end - payload), obj->rle_data_size);
 
     obj->rle_data = g_realloc (obj->rle_data, obj->rle_data_size);
     obj->rle_data_used = end - payload;
     memcpy (obj->rle_data, payload, end - payload);
     payload = end;
   } else {
-    PGS_DUMP ("%d bytes of additional RLE data\n", end - payload);
+    PGS_DUMP ("%d bytes of additional RLE data\n", (int) (end - payload));
     /* Check that the data chunk is for this object version, and fits in the buffer */
     if (obj->rle_data_ver == obj_ver &&
         obj->rle_data_used + end - payload <= obj->rle_data_size) {
@@ -683,6 +683,7 @@
   guint8 *pos, *end;
   guint8 type;
   guint16 packet_len;
+  gint remaining;
 
   gst_buffer_map (buf, &map, GST_MAP_READ);
 
@@ -696,16 +697,15 @@
   }
 
   PGS_DUMP ("Begin dumping command buffer of size %u ts %" GST_TIME_FORMAT "\n",
-      end - pos, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
+      (guint) (end - pos), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
   do {
     type = *pos++;
     packet_len = GST_READ_UINT16_BE (pos);
     pos += 2;
 
     if (pos + packet_len > end) {
-      gst_buffer_unmap (buf, &map);
       PGS_DUMP ("Invalid packet length %u (only have %u bytes)\n", packet_len,
-          end - pos);
+          (guint) (end - pos));
       goto error;
     }
 
@@ -715,8 +715,11 @@
     pos += packet_len;
   } while (pos + 3 <= end);
 
-  PGS_DUMP ("End dumping command buffer with %u bytes remaining\n", end - pos);
-  return (pos - map.data);
+  PGS_DUMP ("End dumping command buffer with %u bytes remaining\n",
+      (guint) (end - pos));
+  remaining = (gint) (pos - map.data);
+  gst_buffer_unmap (buf, &map);
+  return remaining;
 
   /* ERRORS */
 error:
@@ -777,6 +780,7 @@
 gboolean
 gstspu_pgs_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event)
 {
+  gst_event_unref (event);
   return FALSE;
 }
 
diff --git a/gst/dvdspu/gstspu-vobsub-render.c b/gst/dvdspu/gstspu-vobsub-render.c
index b3b8288..d55b1bf 100644
--- a/gst/dvdspu/gstspu-vobsub-render.c
+++ b/gst/dvdspu/gstspu-vobsub-render.c
@@ -138,7 +138,7 @@
   if (G_UNLIKELY (*rle_offset >= state->vobsub.max_offset))
     return 0;                   /* Overran the buffer */
 
-  gst_buffer_extract (state->vobsub.pix_buf, (*rle_offset) / 2, &ret, 1);
+  ret = state->vobsub.pix_buf_map.data[(*rle_offset) / 2];
 
   /* If the offset is even, we shift the answer down 4 bits, otherwise not */
   if (*rle_offset & 0x01)
@@ -168,7 +168,7 @@
   return code;
 }
 
-static inline void
+static inline gboolean
 gstspu_vobsub_draw_rle_run (SpuState * state, gint16 x, gint16 end,
     SpuColour * colour)
 {
@@ -191,7 +191,10 @@
     }
     /* Update the compositing buffer so we know how much to blend later */
     *(state->vobsub.comp_last_x_ptr) = end - 1; /* end is the start of the *next* run */
+
+    return TRUE;
   }
+  return FALSE;
 }
 
 static inline gint16
@@ -204,16 +207,17 @@
     return MIN (end, x + (rle_code >> 2));
 }
 
-static void gstspu_vobsub_render_line_with_chgcol (SpuState * state,
+static gboolean gstspu_vobsub_render_line_with_chgcol (SpuState * state,
     guint8 * planes[3], guint16 * rle_offset);
 static gboolean gstspu_vobsub_update_chgcol (SpuState * state);
 
-static void
+static gboolean
 gstspu_vobsub_render_line (SpuState * state, guint8 * planes[3],
     guint16 * rle_offset)
 {
   gint16 x, next_x, end, rle_code, next_draw_x;
   SpuColour *colour;
+  gboolean visible = FALSE;
 
   /* Check for special case of chg_col info to use (either highlight or
    * ChgCol command */
@@ -222,8 +226,8 @@
       /* Check the top & bottom, because we might not be within the region yet */
       if (state->vobsub.cur_Y >= state->vobsub.cur_chg_col->top &&
           state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) {
-        gstspu_vobsub_render_line_with_chgcol (state, planes, rle_offset);
-        return;
+        return gstspu_vobsub_render_line_with_chgcol (state, planes,
+            rle_offset);
       }
     }
   }
@@ -250,9 +254,11 @@
     /* Now draw the run between [x,next_x) */
     if (state->vobsub.cur_Y >= state->vobsub.clip_rect.top &&
         state->vobsub.cur_Y <= state->vobsub.clip_rect.bottom)
-      gstspu_vobsub_draw_rle_run (state, x, next_draw_x, colour);
+      visible |= gstspu_vobsub_draw_rle_run (state, x, next_draw_x, colour);
     x = next_x;
   }
+
+  return visible;
 }
 
 static gboolean
@@ -282,7 +288,7 @@
   return FALSE;
 }
 
-static void
+static gboolean
 gstspu_vobsub_render_line_with_chgcol (SpuState * state, guint8 * planes[3],
     guint16 * rle_offset)
 {
@@ -294,6 +300,7 @@
   SpuVobsubPixCtrlI *next_pix_ctrl;
   SpuVobsubPixCtrlI *end_pix_ctrl;
   SpuVobsubPixCtrlI dummy_pix_ctrl;
+  gboolean visible = FALSE;
   gint16 cur_reg_end;
   gint i;
 
@@ -342,7 +349,7 @@
 
       if (G_LIKELY (x < run_end)) {
         colour = &cur_pix_ctrl->pal_cache[rle_code & 3];
-        gstspu_vobsub_draw_rle_run (state, x, run_draw_end, colour);
+        visible |= gstspu_vobsub_draw_rle_run (state, x, run_draw_end, colour);
         x = run_end;
       }
 
@@ -358,6 +365,8 @@
       }
     }
   }
+
+  return visible;
 }
 
 static void
@@ -422,6 +431,10 @@
   if (G_UNLIKELY (state->vobsub.pix_buf == NULL))
     return;
 
+  if (!gst_buffer_map (state->vobsub.pix_buf, &state->vobsub.pix_buf_map,
+          GST_MAP_READ))
+    return;
+
   /* Store the start of each plane */
   planes[0] = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
   planes[1] = GST_VIDEO_FRAME_COMP_DATA (frame, 1);
@@ -446,7 +459,7 @@
   /* When reading RLE data, we track the offset in nibbles... */
   state->vobsub.cur_offsets[0] = state->vobsub.pix_data[0] * 2;
   state->vobsub.cur_offsets[1] = state->vobsub.pix_data[1] * 2;
-  state->vobsub.max_offset = gst_buffer_get_size (state->vobsub.pix_buf) * 2;
+  state->vobsub.max_offset = state->vobsub.pix_buf_map.size * 2;
 
   /* Update all the palette caches */
   gstspu_vobsub_update_palettes (dvdspu, state);
@@ -544,7 +557,7 @@
 
   for (state->vobsub.cur_Y = y; state->vobsub.cur_Y <= last_y;
       state->vobsub.cur_Y++) {
-    gboolean clip;
+    gboolean clip, visible = FALSE;
 
     clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top
         || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom);
@@ -562,9 +575,11 @@
 
     /* Render odd line */
     state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x + 1;
-    gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[1]);
+    visible |=
+        gstspu_vobsub_render_line (state, planes,
+        &state->vobsub.cur_offsets[1]);
 
-    if (!clip) {
+    if (visible && !clip) {
       /* Blend the accumulated UV compositing buffers onto the output */
       gstspu_vobsub_blend_comp_buffers (state, planes);
     }
@@ -576,7 +591,7 @@
   }
 
   if (state->vobsub.cur_Y == state->vobsub.disp_rect.bottom) {
-    gboolean clip;
+    gboolean clip, visible = FALSE;
 
     clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top
         || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom);
@@ -588,8 +603,11 @@
        * after the above loop exited. */
       gstspu_vobsub_clear_comp_buffers (state);
       state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x;
-      gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[0]);
-      gstspu_vobsub_blend_comp_buffers (state, planes);
+      visible |=
+          gstspu_vobsub_render_line (state, planes,
+          &state->vobsub.cur_offsets[0]);
+      if (visible)
+        gstspu_vobsub_blend_comp_buffers (state, planes);
     }
   }
 
@@ -602,4 +620,6 @@
       && state->vobsub.hl_rect.top != -1) {
     gstspu_vobsub_draw_highlight (state, frame, &state->vobsub.hl_rect);
   }
+
+  gst_buffer_unmap (state->vobsub.pix_buf, &state->vobsub.pix_buf_map);
 }
diff --git a/gst/dvdspu/gstspu-vobsub.h b/gst/dvdspu/gstspu-vobsub.h
index d1f12c4..541631e 100644
--- a/gst/dvdspu/gstspu-vobsub.h
+++ b/gst/dvdspu/gstspu-vobsub.h
@@ -52,6 +52,7 @@
   /* Top + Bottom field offsets in the buffer. 0 = not set */
   guint16 pix_data[2]; 
   GstBuffer *pix_buf; /* Current SPU packet the pix_data references */
+  GstMapInfo pix_buf_map; /* Mapped buffer info */
   
   SpuRect disp_rect;
   SpuRect clip_rect;
diff --git a/gst/faceoverlay/Makefile.in b/gst/faceoverlay/Makefile.in
index c383333..0b726d2 100644
--- a/gst/faceoverlay/Makefile.in
+++ b/gst/faceoverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/faceoverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/faceoverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/faceoverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1063,6 +1097,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/festival/Makefile.am b/gst/festival/Makefile.am
index 16ed287..91ab9ae 100644
--- a/gst/festival/Makefile.am
+++ b/gst/festival/Makefile.am
@@ -10,18 +10,4 @@
 libgstfestival_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstfestival_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
-noinst_HEADERS = gstfestival.h 
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfestival -:SHARED libgstfestival \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfestival_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfestival_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfestival_la_LDFLAGS) \
-	           $(libgstfestival_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
+noinst_HEADERS = gstfestival.h
diff --git a/gst/festival/Makefile.in b/gst/festival/Makefile.in
index 49f6073..d52d9ea 100644
--- a/gst/festival/Makefile.in
+++ b/gst/festival/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/festival
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -734,7 +769,7 @@
 
 libgstfestival_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstfestival_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = gstfestival.h 
+noinst_HEADERS = gstfestival.h
 all: all-am
 
 .SUFFIXES:
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/festival/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/festival/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,20 +1094,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfestival -:SHARED libgstfestival \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfestival_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfestival_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfestival_la_LDFLAGS) \
-	           $(libgstfestival_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
 
 # 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.
diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c
index 7c4b88f..cb2d1cb 100644
--- a/gst/festival/gstfestival.c
+++ b/gst/festival/gstfestival.c
@@ -142,7 +142,7 @@
 
 enum
 {
-  ARG_0
+  PROP_0
       /* FILL ME */
 };
 
diff --git a/gst/fieldanalysis/Makefile.in b/gst/fieldanalysis/Makefile.in
index bc9e895..ebfce07 100644
--- a/gst/fieldanalysis/Makefile.in
+++ b/gst/fieldanalysis/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -102,8 +112,6 @@
 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/fieldanalysis
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -112,6 +120,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -125,7 +134,6 @@
 	$(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 \
@@ -142,6 +150,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -255,6 +265,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -272,8 +284,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -298,8 +312,6 @@
 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@
@@ -312,7 +324,6 @@
 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@
@@ -320,6 +331,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -346,11 +359,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -369,8 +385,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -429,10 +443,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -449,7 +467,6 @@
 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@
@@ -458,7 +475,6 @@
 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@
@@ -471,7 +487,6 @@
 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@
@@ -485,6 +500,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -496,6 +512,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -534,6 +552,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -569,10 +588,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -598,6 +621,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -605,7 +631,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -634,6 +667,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -644,6 +678,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -674,17 +709,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -701,6 +735,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -739,6 +774,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -797,7 +833,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/fieldanalysis/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/fieldanalysis/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -806,7 +841,7 @@
 	    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_srcdir)/common/orc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1122,6 +1157,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 orc-update: tmp-orc.c $(ORC_SOURCE).h
 	$(top_srcdir)/common/gst-indent tmp-orc.c
diff --git a/gst/fieldanalysis/gstfieldanalysis.c b/gst/fieldanalysis/gstfieldanalysis.c
index 8631d74..b7ffd87 100644
--- a/gst/fieldanalysis/gstfieldanalysis.c
+++ b/gst/fieldanalysis/gstfieldanalysis.c
@@ -259,7 +259,7 @@
           DEFAULT_SPATIAL_THRESH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gobject_class, PROP_BLOCK_WIDTH,
       g_param_spec_uint64 ("block-width", "Block width",
-          "Block width for windowed comb detection", 0, G_MAXUINT64,
+          "Block width for windowed comb detection", 1, G_MAXUINT64,
           DEFAULT_BLOCK_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gobject_class, PROP_BLOCK_HEIGHT,
       g_param_spec_uint64 ("block-height", "Block height",
diff --git a/gst/freeverb/GstFreeverb.prs b/gst/freeverb/GstFreeverb.prs
new file mode 100644
index 0000000..ebfdf00
--- /dev/null
+++ b/gst/freeverb/GstFreeverb.prs
@@ -0,0 +1,21 @@
+[_presets_]
+element-name=GstFreeverb
+version=1.5.0.1
+
+[cathedral]
+room-size=0.85
+damping=0
+width=1
+level=0.5
+
+[engine room]
+room-size=1
+damping=0.25
+width=1
+level=1
+
+[small room]
+room-size=0.8
+damping=0.25
+width=0.3
+level=0.3
diff --git a/gst/freeverb/Makefile.am b/gst/freeverb/Makefile.am
index f1a5637..11d0fb4 100644
--- a/gst/freeverb/Makefile.am
+++ b/gst/freeverb/Makefile.am
@@ -19,16 +19,7 @@
 # headers we need but don't want installed
 noinst_HEADERS = gstfreeverb.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfreeverb -:SHARED libgstfreeverb \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfreeverb_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfreeverb_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfreeverb_la_LDFLAGS) \
-	           $(libgstfreeverb_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
+presetdir = $(datadir)/gstreamer-$(GST_API_VERSION)/presets
+preset_DATA = GstFreeverb.prs
+
+EXTRA_DIST = $(preset_DATA)
diff --git a/gst/freeverb/Makefile.in b/gst/freeverb/Makefile.in
index 946087e..3a7ec23 100644
--- a/gst/freeverb/Makefile.in
+++ b/gst/freeverb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,8 +15,19 @@
 @SET_MAKE@
 
 
+
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/freeverb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +113,6 @@
 	$(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 \
@@ -120,6 +129,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -151,7 +162,7 @@
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(plugindir)"
+am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(presetdir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstfreeverb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@@ -208,6 +219,7 @@
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+DATA = $(preset_DATA)
 HEADERS = $(noinst_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
@@ -228,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +286,6 @@
 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@
@@ -285,7 +298,6 @@
 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@
@@ -293,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +441,6 @@
 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@
@@ -431,7 +449,6 @@
 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@
@@ -444,7 +461,6 @@
 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@
@@ -458,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,6 +784,9 @@
 
 # headers we need but don't want installed
 noinst_HEADERS = gstfreeverb.h
+presetdir = $(datadir)/gstreamer-$(GST_API_VERSION)/presets
+preset_DATA = GstFreeverb.prs
+EXTRA_DIST = $(preset_DATA)
 all: all-am
 
 .SUFFIXES:
@@ -763,7 +803,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/freeverb/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/freeverb/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -864,6 +903,27 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-presetDATA: $(preset_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(preset_DATA)'; test -n "$(presetdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(presetdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(presetdir)" || 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)$(presetdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(presetdir)" || exit $$?; \
+	done
+
+uninstall-presetDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(preset_DATA)'; test -n "$(presetdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(presetdir)'; $(am__uninstall_files_from_dir)
 
 ID: $(am__tagged_files)
 	$(am__define_uniq_tagged_files); mkid -fID $$unique
@@ -949,9 +1009,9 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(presetdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -1007,7 +1067,7 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am: install-pluginLTLIBRARIES install-presetDATA
 
 install-dvi: install-dvi-am
 
@@ -1053,7 +1113,7 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am: uninstall-pluginLTLIBRARIES uninstall-presetDATA
 
 .MAKE: install-am install-strip
 
@@ -1065,27 +1125,15 @@
 	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
+	install-pluginLTLIBRARIES install-presetDATA 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 uninstall-presetDATA
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfreeverb -:SHARED libgstfreeverb \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfreeverb_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfreeverb_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfreeverb_la_LDFLAGS) \
-	           $(libgstfreeverb_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/freeverb/gstfreeverb.c b/gst/freeverb/gstfreeverb.c
index 819d08c..4ee3779 100644
--- a/gst/freeverb/gstfreeverb.c
+++ b/gst/freeverb/gstfreeverb.c
@@ -120,7 +120,7 @@
 
 
 /* Table with processing functions: [channels][format] */
-static GstFreeverbProcessFunc process_functions[2][2] = {
+static const GstFreeverbProcessFunc process_functions[2][2] = {
   {
         (GstFreeverbProcessFunc) gst_freeverb_transform_m2s_int,
         (GstFreeverbProcessFunc) gst_freeverb_transform_m2s_float,
diff --git a/gst/frei0r/Makefile.am b/gst/frei0r/Makefile.am
index ba0e7f5..b9f1776 100644
--- a/gst/frei0r/Makefile.am
+++ b/gst/frei0r/Makefile.am
@@ -13,17 +13,3 @@
 libgstfrei0r_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstfrei0r.h gstfrei0rfilter.h gstfrei0rsrc.h gstfrei0rmixer.h frei0r.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfrei0r -:SHARED libgstfrei0r \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfrei0r_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfrei0r_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfrei0r_la_LDFLAGS) \
-	           $(libgstfrei0r_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/frei0r/Makefile.in b/gst/frei0r/Makefile.in
index b4ecb41..fc44521 100644
--- a/gst/frei0r/Makefile.in
+++ b/gst/frei0r/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/frei0r
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -758,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/frei0r/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/frei0r/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1091,20 +1125,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstfrei0r -:SHARED libgstfrei0r \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfrei0r_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstfrei0r_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfrei0r_la_LDFLAGS) \
-	           $(libgstfrei0r_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c
index 756172e..e55fb05 100644
--- a/gst/frei0r/gstfrei0r.c
+++ b/gst/frei0r/gstfrei0r.c
@@ -258,12 +258,8 @@
   f0r_instance_t *instance = ftable->construct (width, height);
   gint i;
 
-  for (i = 0; i < n_properties; i++) {
-    if (properties[i].info.type == F0R_PARAM_STRING)
-      ftable->set_param_value (instance, property_cache[i].data.s, i);
-    else
-      ftable->set_param_value (instance, &property_cache[i].data, i);
-  }
+  for (i = 0; i < n_properties; i++)
+    ftable->set_param_value (instance, &property_cache[i].data, i);
 
   return instance;
 }
diff --git a/gst/frei0r/gstfrei0rmixer.c b/gst/frei0r/gstfrei0rmixer.c
index a54d3cf..8d5f59b 100644
--- a/gst/frei0r/gstfrei0rmixer.c
+++ b/gst/frei0r/gstfrei0rmixer.c
@@ -340,15 +340,17 @@
         if (res) {
           gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur);
 
-          if (min_cur > min)
-            min = min_cur;
+          if (live_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;
+            if (max == GST_CLOCK_TIME_NONE)
+              max = max_cur;
+            else if (max_cur < max)
+              max = max_cur;
 
-          live = live || live_cur;
+            live = TRUE;
+          }
         }
 
         gst_query_unref (peerquery);
diff --git a/gst/gaudieffects/Makefile.am b/gst/gaudieffects/Makefile.am
index d25794c..87089cd 100644
--- a/gst/gaudieffects/Makefile.am
+++ b/gst/gaudieffects/Makefile.am
@@ -40,17 +40,3 @@
         gstsolarize.h
 
 EXTRA_SCRIPTS = blur-example.py  burn-example.py
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgaudieffects -:SHARED libgstgaudieffects \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgaudieffects_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgaudieffects_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgaudieffects_la_LDFLAGS) \
-	           $(libgstgaudieffects_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/gaudieffects/Makefile.in b/gst/gaudieffects/Makefile.in
index 7052cee..6a07be4 100644
--- a/gst/gaudieffects/Makefile.in
+++ b/gst/gaudieffects/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -102,8 +112,6 @@
 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/gaudieffects
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -112,6 +120,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -125,7 +134,6 @@
 	$(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 \
@@ -142,6 +150,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -261,6 +271,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/orc.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -278,8 +290,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -304,8 +318,6 @@
 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@
@@ -318,7 +330,6 @@
 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@
@@ -326,6 +337,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -352,11 +365,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -375,8 +391,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -435,10 +449,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -455,7 +473,6 @@
 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@
@@ -464,7 +481,6 @@
 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@
@@ -477,7 +493,6 @@
 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@
@@ -491,6 +506,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -502,6 +518,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -540,6 +558,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -575,10 +594,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -604,6 +627,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -611,7 +637,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -640,6 +673,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -650,6 +684,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -680,17 +715,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -707,6 +741,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -745,6 +780,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -824,7 +860,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/gaudieffects/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/gaudieffects/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -833,7 +868,7 @@
 	    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_srcdir)/common/orc.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1205,6 +1240,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 orc-update: tmp-orc.c $(ORC_SOURCE).h
 	$(top_srcdir)/common/gst-indent tmp-orc.c
@@ -1242,20 +1279,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgaudieffects -:SHARED libgstgaudieffects \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgaudieffects_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgaudieffects_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgaudieffects_la_LDFLAGS) \
-	           $(libgstgaudieffects_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/gaudieffects/gstburn.c b/gst/gaudieffects/gstburn.c
index eb4b0c5..c82c8af 100644
--- a/gst/gaudieffects/gstburn.c
+++ b/gst/gaudieffects/gstburn.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) >2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Burn - curve adjustment video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -91,7 +91,6 @@
 {
   PROP_0 = 0,
   PROP_ADJUSTMENT,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -153,10 +152,6 @@
           "Adjustment parameter", 0, 256, DEFAULT_ADJUSTMENT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame = GST_DEBUG_FUNCPTR (gst_burn_transform_frame);
 }
 
@@ -169,7 +164,6 @@
 gst_burn_init (GstBurn * filter)
 {
   filter->adjustment = DEFAULT_ADJUSTMENT;
-  filter->silent = FALSE;
 }
 
 static void
@@ -179,9 +173,6 @@
   GstBurn *filter = GST_BURN (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_ADJUSTMENT:
       filter->adjustment = g_value_get_uint (value);
       break;
@@ -199,9 +190,6 @@
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_ADJUSTMENT:
       g_value_set_uint (value, filter->adjustment);
       break;
@@ -226,7 +214,7 @@
     GstVideoFrame * in_frame, GstVideoFrame * out_frame)
 {
   GstBurn *filter = GST_BURN (vfilter);
-  gint video_size, adjustment, width, height;
+  gint video_size, adjustment;
   guint32 *src, *dest;
   GstClockTime timestamp;
   gint64 stream_time;
@@ -234,10 +222,8 @@
   src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
 
-  width = GST_VIDEO_FRAME_WIDTH (in_frame);
-  height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
-  video_size = width * height;
+  video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+      GST_VIDEO_FRAME_HEIGHT (in_frame);
 
   /* GstController: update the properties */
   timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
diff --git a/gst/gaudieffects/gstburn.h b/gst/gaudieffects/gstburn.h
index e263ae2..5f563f8 100644
--- a/gst/gaudieffects/gstburn.h
+++ b/gst/gaudieffects/gstburn.h
@@ -53,7 +53,6 @@
 
 G_BEGIN_DECLS
 
-/* #defines don't like whitespacey bits */
 #define GST_TYPE_BURN \
   (gst_burn_get_type())
 #define GST_BURN(obj) \
@@ -73,9 +72,7 @@
   GstVideoFilter videofilter;
 
   /* < private > */
-
   gint adjustment;
-  gboolean silent;
 };
 
 struct _GstBurnClass
diff --git a/gst/gaudieffects/gstchromium.c b/gst/gaudieffects/gstchromium.c
index d3c9780..8daca3a 100644
--- a/gst/gaudieffects/gstchromium.c
+++ b/gst/gaudieffects/gstchromium.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Chromium - burning chrome video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -90,7 +90,6 @@
   PROP_0 = 0,
   PROP_EDGE_A,
   PROP_EDGE_B,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -172,10 +171,6 @@
           "Second edge parameter", 0, 256, DEFAULT_EDGE_B,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_chromium_transform_frame);
 }
@@ -190,7 +185,6 @@
 {
   filter->edge_a = DEFAULT_EDGE_A;
   filter->edge_b = DEFAULT_EDGE_B;
-  filter->silent = FALSE;
 
   setup_cos_table ();
 }
@@ -202,9 +196,6 @@
   GstChromium *filter = GST_CHROMIUM (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_EDGE_A:
       filter->edge_a = g_value_get_uint (value);
       break;
@@ -225,9 +216,6 @@
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_EDGE_A:
       g_value_set_uint (value, filter->edge_a);
       break;
@@ -255,7 +243,7 @@
     GstVideoFrame * in_frame, GstVideoFrame * out_frame)
 {
   GstChromium *filter = GST_CHROMIUM (vfilter);
-  gint video_size, edge_a, edge_b, width, height;
+  gint video_size, edge_a, edge_b;
   guint32 *src, *dest;
   GstClockTime timestamp;
   gint64 stream_time;
@@ -263,9 +251,6 @@
   src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
 
-  width = GST_VIDEO_FRAME_WIDTH (in_frame);
-  height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
   /* GstController: update the properties */
   timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
   stream_time =
@@ -283,7 +268,8 @@
   edge_b = filter->edge_b;
   GST_OBJECT_UNLOCK (filter);
 
-  video_size = width * height;
+  video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+      GST_VIDEO_FRAME_HEIGHT (in_frame);
   transform (src, dest, video_size, edge_a, edge_b);
 
   return GST_FLOW_OK;
@@ -358,7 +344,6 @@
     green = CLAMP (green, 0, 255);
     blue = CLAMP (blue, 0, 255);
 
-
     *dest++ = (red << 16) | (green << 8) | blue;
   }
 }
diff --git a/gst/gaudieffects/gstchromium.h b/gst/gaudieffects/gstchromium.h
index 144e53f..4d54e2a 100644
--- a/gst/gaudieffects/gstchromium.h
+++ b/gst/gaudieffects/gstchromium.h
@@ -71,7 +71,6 @@
 
   /* < private > */
   gint edge_a, edge_b;
-  gboolean silent;
 };
 
 struct GstChromiumClass
diff --git a/gst/gaudieffects/gstdilate.c b/gst/gaudieffects/gstdilate.c
index 82a8881..98fa053 100644
--- a/gst/gaudieffects/gstdilate.c
+++ b/gst/gaudieffects/gstdilate.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Dilate - dilated eye video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -89,7 +89,6 @@
 {
   PROP_0,
   PROP_ERODE,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -154,10 +153,6 @@
       g_param_spec_boolean ("erode", "Erode", "Erode parameter", FALSE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_dilate_transform_frame);
 }
@@ -171,7 +166,6 @@
 gst_dilate_init (GstDilate * filter)
 {
   filter->erode = DEFAULT_ERODE;
-  filter->silent = FALSE;
 }
 
 static void
@@ -181,9 +175,6 @@
   GstDilate *filter = GST_DILATE (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_ERODE:
       filter->erode = g_value_get_boolean (value);
       break;
@@ -201,9 +192,6 @@
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_ERODE:
       g_value_set_boolean (value, filter->erode);
       break;
@@ -305,122 +293,63 @@
   guint32 *down;
   guint32 *right;
 
-  if (erode) {
+  while (src != src_end) {
+    guint32 *src_line_start = src;
+    guint32 *src_line_end = src + width;
 
-    while (src != src_end) {
-      guint32 *src_line_start = src;
-      guint32 *src_line_end = src + width;
-      while (src != src_line_end) {
-
-        up = src - width;
-        if (up < src) {
-          up = src;
-        }
-
-        left = src - 1;
-        if (left < src_line_start) {
-          left = src;
-        }
-
-        down = src + width;
-        if (down >= src_end) {
-          down = src;
-        }
-
-        right = src + 1;
-        if (right >= src_line_end) {
-          right = src;
-        }
-
-        *dest = *src;
-        out_luminance = get_luminance (*src);
-
-        down_luminance = get_luminance (*down);
-        if (down_luminance < out_luminance) {
-          *dest = *down;
-          out_luminance = down_luminance;
-        }
-
-        right_luminance = get_luminance (*right);
-        if (right_luminance < out_luminance) {
-          *dest = *right;
-          out_luminance = right_luminance;
-        }
-
-        up_luminance = get_luminance (*up);
-        if (up_luminance < out_luminance) {
-          *dest = *up;
-          out_luminance = up_luminance;
-        }
-
-        left_luminance = get_luminance (*left);
-        if (left_luminance < out_luminance) {
-          *dest = *left;
-          out_luminance = left_luminance;
-        }
-
-        src += 1;
-        dest += 1;
+    while (src != src_line_end) {
+      up = src - width;
+      if (up < src) {
+        up = src;
       }
-    }
 
-  } else {
-
-    while (src != src_end) {
-      guint32 *src_line_start = src;
-      guint32 *src_line_end = src + width;
-      while (src != src_line_end) {
-
-        up = src - width;
-        if (up < src) {
-          up = src;
-        }
-
-        left = src - 1;
-        if (left < src_line_start) {
-          left = src;
-        }
-
-        down = src + width;
-        if (down >= src_end) {
-          down = src;
-        }
-
-        right = src + 1;
-        if (right >= src_line_end) {
-          right = src;
-        }
-
-        *dest = *src;
-        out_luminance = get_luminance (*src);
-
-        down_luminance = get_luminance (*down);
-        if (down_luminance > out_luminance) {
-          *dest = *down;
-          out_luminance = down_luminance;
-        }
-
-        right_luminance = get_luminance (*right);
-        if (right_luminance > out_luminance) {
-          *dest = *right;
-          out_luminance = right_luminance;
-        }
-
-        up_luminance = get_luminance (*up);
-        if (up_luminance > out_luminance) {
-          *dest = *up;
-          out_luminance = up_luminance;
-        }
-
-        left_luminance = get_luminance (*left);
-        if (left_luminance > out_luminance) {
-          *dest = *left;
-          out_luminance = left_luminance;
-        }
-
-        src += 1;
-        dest += 1;
+      left = src - 1;
+      if (left < src_line_start) {
+        left = src;
       }
+
+      down = src + width;
+      if (down >= src_end) {
+        down = src;
+      }
+
+      right = src + 1;
+      if (right >= src_line_end) {
+        right = src;
+      }
+
+      *dest = *src;
+      out_luminance = get_luminance (*src);
+
+      down_luminance = get_luminance (*down);
+      if ((erode && down_luminance < out_luminance) ||
+          (!erode && down_luminance > out_luminance)) {
+        *dest = *down;
+        out_luminance = down_luminance;
+      }
+
+      right_luminance = get_luminance (*right);
+      if ((erode && right_luminance < out_luminance) ||
+          (!erode && right_luminance > out_luminance)) {
+        *dest = *right;
+        out_luminance = right_luminance;
+      }
+
+      up_luminance = get_luminance (*up);
+      if ((erode && up_luminance < out_luminance) ||
+          (!erode && up_luminance > out_luminance)) {
+        *dest = *up;
+        out_luminance = up_luminance;
+      }
+
+      left_luminance = get_luminance (*left);
+      if ((erode && left_luminance < out_luminance) ||
+          (!erode && left_luminance > out_luminance)) {
+        *dest = *left;
+      }
+
+      src += 1;
+      dest += 1;
     }
   }
 }
diff --git a/gst/gaudieffects/gstdilate.h b/gst/gaudieffects/gstdilate.h
index 4285363..afb0901 100644
--- a/gst/gaudieffects/gstdilate.h
+++ b/gst/gaudieffects/gstdilate.h
@@ -53,7 +53,6 @@
 
 G_BEGIN_DECLS
 
-/* #defines don't like whitespacey bits */
 #define GST_TYPE_DILATE \
   (gst_dilate_get_type())
 #define GST_DILATE(obj) \
@@ -73,7 +72,6 @@
   GstVideoFilter videofilter;
 
   /* < private > */
-  gboolean silent;
   gboolean erode;
 };
 
diff --git a/gst/gaudieffects/gstdodge.c b/gst/gaudieffects/gstdodge.c
index efe8be1..8cf8c6e 100644
--- a/gst/gaudieffects/gstdodge.c
+++ b/gst/gaudieffects/gstdodge.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Dodge - saturation video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -88,7 +88,6 @@
 enum
 {
   PROP_0,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -145,10 +144,6 @@
   gobject_class->get_property = gst_dodge_get_property;
   gobject_class->finalize = gst_dodge_finalize;
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_dodge_transform_frame);
 }
@@ -161,19 +156,13 @@
 static void
 gst_dodge_init (GstDodge * filter)
 {
-  filter->silent = FALSE;
 }
 
 static void
 gst_dodge_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstDodge *filter = GST_DODGE (object);
-
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -184,18 +173,11 @@
 gst_dodge_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
-  GstDodge *filter = GST_DODGE (object);
-
-  GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
-  GST_OBJECT_UNLOCK (filter);
 }
 
 static void
@@ -213,7 +195,7 @@
 {
   GstDodge *filter = GST_DODGE (vfilter);
   guint32 *src, *dest;
-  gint video_size, width, height;
+  gint video_size;
 
   GstClockTime timestamp;
   gint64 stream_time;
@@ -221,9 +203,7 @@
   src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
 
-  width = GST_VIDEO_FRAME_WIDTH (in_frame);
-  height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
+  /* GstController: update the properties */
   timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
   stream_time =
       gst_segment_to_stream_time (&GST_BASE_TRANSFORM (filter)->segment,
@@ -235,7 +215,8 @@
   if (GST_CLOCK_TIME_IS_VALID (stream_time))
     gst_object_sync_values (GST_OBJECT (filter), stream_time);
 
-  video_size = width * height;
+  video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+      GST_VIDEO_FRAME_HEIGHT (in_frame);
 
   transform (src, dest, video_size);
 
diff --git a/gst/gaudieffects/gstdodge.h b/gst/gaudieffects/gstdodge.h
index 4be4251..64bf4d0 100644
--- a/gst/gaudieffects/gstdodge.h
+++ b/gst/gaudieffects/gstdodge.h
@@ -53,7 +53,6 @@
 
 G_BEGIN_DECLS
 
-/* #defines don't like whitespacey bits */
 #define GST_TYPE_DODGE \
   (gst_dodge_get_type())
 #define GST_DODGE(obj) \
@@ -71,10 +70,6 @@
 struct _GstDodge
 {
   GstVideoFilter videofilter;
-
-  /* < private > */
-
-  gboolean silent;
 };
 
 struct _GstDodgeClass
diff --git a/gst/gaudieffects/gstexclusion.c b/gst/gaudieffects/gstexclusion.c
index 240bf41..860c5b4 100644
--- a/gst/gaudieffects/gstexclusion.c
+++ b/gst/gaudieffects/gstexclusion.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Exclusion - color exclusion video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -88,7 +88,6 @@
 {
   PROP_0 = 0,
   PROP_FACTOR,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -152,13 +151,9 @@
 
   g_object_class_install_property (gobject_class, PROP_FACTOR,
       g_param_spec_uint ("factor", "Factor",
-          "Exclusion factor parameter", 0, 175, DEFAULT_FACTOR,
+          "Exclusion factor parameter", 1, 175, DEFAULT_FACTOR,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_exclusion_transform_frame);
 }
@@ -172,7 +167,6 @@
 gst_exclusion_init (GstExclusion * filter)
 {
   filter->factor = DEFAULT_FACTOR;
-  filter->silent = FALSE;
 }
 
 static void
@@ -182,9 +176,6 @@
   GstExclusion *filter = GST_EXCLUSION (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_FACTOR:
       filter->factor = g_value_get_uint (value);
       break;
@@ -202,9 +193,6 @@
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_FACTOR:
       g_value_set_uint (value, filter->factor);
       break;
@@ -229,7 +217,7 @@
     GstVideoFrame * in_frame, GstVideoFrame * out_frame)
 {
   GstExclusion *filter = GST_EXCLUSION (vfilter);
-  gint video_size, factor, width, height;
+  gint video_size, factor;
   guint32 *src, *dest;
   GstClockTime timestamp;
   gint64 stream_time;
@@ -237,9 +225,6 @@
   src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
 
-  width = GST_VIDEO_FRAME_WIDTH (in_frame);
-  height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
   /* GstController: update the properties */
   timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
   stream_time =
@@ -256,7 +241,8 @@
   factor = filter->factor;
   GST_OBJECT_UNLOCK (filter);
 
-  video_size = width * height;
+  video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+      GST_VIDEO_FRAME_HEIGHT (in_frame);
   transform (src, dest, video_size, factor);
 
   return GST_FLOW_OK;
diff --git a/gst/gaudieffects/gstexclusion.h b/gst/gaudieffects/gstexclusion.h
index 84278ac..b910835 100644
--- a/gst/gaudieffects/gstexclusion.h
+++ b/gst/gaudieffects/gstexclusion.h
@@ -53,7 +53,6 @@
 
 G_BEGIN_DECLS
 
-/* #defines don't like whitespacey bits */
 #define GST_TYPE_EXCLUSION \
   (gst_exclusion_get_type())
 #define GST_EXCLUSION(obj) \
@@ -73,9 +72,7 @@
   GstVideoFilter videofilter;
 
   /* < private > */
-
   gint factor;
-  gboolean silent;
 };
 
 struct _GstExclusionClass
diff --git a/gst/gaudieffects/gstgaussblur.c b/gst/gaudieffects/gstgaussblur.c
index 2ba0ce8..bbf22b6 100644
--- a/gst/gaudieffects/gstgaussblur.c
+++ b/gst/gaudieffects/gstgaussblur.c
@@ -111,8 +111,7 @@
 enum
 {
   PROP_0,
-  PROP_SIGMA,
-  PROP_LAST
+  PROP_SIGMA
 };
 
 static gboolean make_gaussian_kernel (GstGaussianBlur * gb, float sigma);
@@ -249,7 +248,8 @@
   src = GST_VIDEO_FRAME_COMP_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_COMP_DATA (out_frame, 0);
   gst_video_frame_copy (out_frame, in_frame);
-  gaussian_smooth (filter, src, dest);
+  if (filter->sigma != 0.0)
+    gaussian_smooth (filter, src, dest);
 
   return GST_FLOW_OK;
 }
diff --git a/gst/gaudieffects/gstsolarize.c b/gst/gaudieffects/gstsolarize.c
index 14323cd..a45feb2 100644
--- a/gst/gaudieffects/gstsolarize.c
+++ b/gst/gaudieffects/gstsolarize.c
@@ -1,6 +1,6 @@
 /*
  * GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
  *
  * Solarize - curve adjustment video effect.
  * Based on Pete Warden's FreeFrame plugin with the same name.
@@ -88,7 +88,6 @@
   PROP_THRESHOLD,
   PROP_START,
   PROP_END,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -168,10 +167,6 @@
           "End parameter", 0, 256, DEFAULT_END,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_solarize_transform_frame);
 }
@@ -187,7 +182,6 @@
   filter->threshold = DEFAULT_THRESHOLD;
   filter->start = DEFAULT_START;
   filter->end = DEFAULT_END;
-  filter->silent = FALSE;
 }
 
 static void
@@ -197,9 +191,6 @@
   GstSolarize *filter = GST_SOLARIZE (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_THRESHOLD:
       filter->threshold = g_value_get_uint (value);
       break;
@@ -223,9 +214,6 @@
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_THRESHOLD:
       g_value_set_uint (value, filter->threshold);
       break;
@@ -256,7 +244,7 @@
     GstVideoFrame * in_frame, GstVideoFrame * out_frame)
 {
   GstSolarize *filter = GST_SOLARIZE (vfilter);
-  gint video_size, threshold, start, end, width, height;
+  gint video_size, threshold, start, end;
   guint32 *src, *dest;
   GstClockTime timestamp;
   gint64 stream_time;
@@ -264,9 +252,6 @@
   src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
   dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
 
-  width = GST_VIDEO_FRAME_WIDTH (in_frame);
-  height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
   /* GstController: update the properties */
   timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
   stream_time =
@@ -285,7 +270,9 @@
   end = filter->end;
   GST_OBJECT_UNLOCK (filter);
 
-  video_size = width * height;
+  video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+      GST_VIDEO_FRAME_HEIGHT (in_frame);
+
   transform (src, dest, video_size, threshold, start, end);
 
   return GST_FLOW_OK;
@@ -313,28 +300,19 @@
 {
   guint32 in;
   guint32 color[3];
+  gint period = 1, up_length = 1, down_length = 1;
   gint x, c;
-  gint floor = 0;
-  gint ceiling = 255;
+  gint param;
+  static const guint ceiling = 255;
 
-  gint period, up_length, down_length, height_scale, param;
+  if (end != start)
+    period = end - start;
 
-  period = end - start;
-  if (period == 0) {
-    period = 1;
-  }
+  if (threshold != start)
+    up_length = threshold - start;
 
-  up_length = threshold - start;
-  if (up_length == 0) {
-    up_length = 1;
-  }
-
-  down_length = end - threshold;
-  if (down_length == 0) {
-    down_length = 1;
-  }
-
-  height_scale = ceiling - floor;
+  if (threshold != end)
+    down_length = end - threshold;
 
   /* Loop through pixels. */
   for (x = 0; x < video_area; x++) {
@@ -344,7 +322,6 @@
     color[1] = (in >> 8) & 0xff;
     color[2] = (in) & 0xff;
 
-
     /* Loop through colors. */
     for (c = 0; c < 3; c++) {
       param = color[c];
@@ -353,20 +330,20 @@
       param %= period;
 
       if (param < up_length) {
-        color[c] = param * height_scale;
+        color[c] = param * ceiling;
         color[c] /= up_length;
-        color[c] += floor;
       } else {
         color[c] = down_length - (param - up_length);
-        color[c] *= height_scale;
+        color[c] *= ceiling;
         color[c] /= down_length;
-        color[c] += floor;
       }
     }
 
-    color[0] = CLAMP (color[0], 0, 255);
-    color[1] = CLAMP (color[1], 0, 255);
-    color[2] = CLAMP (color[2], 0, 255);
+    /* Clamp colors */
+    for (c = 0; c < 3; c++) {
+      if (G_UNLIKELY (color[c] > 255))
+        color[c] = 255;
+    }
 
     *dest++ = (color[0] << 16) | (color[1] << 8) | color[2];
   }
diff --git a/gst/gaudieffects/gstsolarize.h b/gst/gaudieffects/gstsolarize.h
index 5dbb76a..2390563 100644
--- a/gst/gaudieffects/gstsolarize.h
+++ b/gst/gaudieffects/gstsolarize.h
@@ -53,7 +53,6 @@
 
 G_BEGIN_DECLS
 
-/* #defines don't like whitespacey bits */
 #define GST_TYPE_SOLARIZE \
   (gst_solarize_get_type())
 #define GST_SOLARIZE(obj) \
@@ -73,9 +72,7 @@
   GstVideoFilter videofilter;
 
   /* < private > */
-
   gint threshold, start, end;
-  gboolean silent;
 };
 
 struct _GstSolarizeClass
diff --git a/gst/gdp/Makefile.am b/gst/gdp/Makefile.am
index 1e59eed..ef986f1 100644
--- a/gst/gdp/Makefile.am
+++ b/gst/gdp/Makefile.am
@@ -16,17 +16,3 @@
 	dp-private.h   \
 	gstgdppay.h    \
 	gstgdpdepay.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgdp -:SHARED libgstgdp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgdp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgdp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgdp_la_LDFLAGS) \
-	           $(libgstgdp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/gdp/Makefile.in b/gst/gdp/Makefile.in
index af837b9..a0492ba 100644
--- a/gst/gdp/Makefile.in
+++ b/gst/gdp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/gdp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -759,7 +794,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/gdp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/gdp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1092,20 +1126,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgdp -:SHARED libgstgdp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgdp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgdp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgdp_la_LDFLAGS) \
-	           $(libgstgdp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index 721cc60..fbb46a6 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -1,6 +1,7 @@
 /* GStreamer
  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
  * Copyright (C) 2004,2006 Thomas Vander Stichele <thomas at apestaart dot org>
+ * Copyright (C) 2014 Tim-Philipp Müller <tim centricular com>
  *
  * dataprotocol.c: Functions implementing the GStreamer Data Protocol
  *
@@ -56,10 +57,8 @@
  * the event as the payload.  In addition, GDP streams can now start with
  * events as well, as required by the new data stream model in GStreamer 0.10.
  *
- * Converting buffers, caps and events to GDP buffers is done using a
- * #GstDPPacketizer object and invoking its packetizer functions.
- * For backwards-compatibility reasons, the old 0.2 methods are still
- * available but deprecated.
+ * Converting buffers, caps and events to GDP buffers is done using the
+ * appropriate functions.
  *
  * For reference, this image shows the byte layout of the GDP header:
  *
@@ -82,6 +81,13 @@
 #define GST_CAT_DEFAULT data_protocol_debug
 #endif
 
+/* The version of the GDP protocol being used */
+typedef enum
+{
+  GST_DP_VERSION_0_2 = 1,
+  GST_DP_VERSION_1_0,
+} GstDPVersion;
+
 /* helper macros */
 
 /* write first 6 bytes of header */
@@ -125,30 +131,59 @@
 #define POLY       0x1021
 #define CRC_INIT   0xFFFF
 
-/*** HELPER FUNCTIONS ***/
+static guint16 gst_dp_crc (const guint8 * buffer, guint length);
+static guint16 gst_dp_crc_from_memory_maps (const GstMapInfo * maps,
+    guint n_maps);
 
-static gboolean
-gst_dp_header_from_buffer_any (const GstBuffer * buffer, GstDPHeaderFlag flags,
-    guint * length, guint8 ** header, GstDPVersion version)
+/* payloading functions */
+
+GstBuffer *
+gst_dp_payload_buffer (GstBuffer * buffer, GstDPHeaderFlag flags)
 {
+  GstBuffer *ret_buf;
+  GstMapInfo map;
+  GstMemory *mem;
   guint8 *h;
   guint16 flags_mask;
-  GstMapInfo map;
+  guint16 header_crc = 0, crc = 0;
+  gsize buffer_size;
 
-  g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
-  g_return_val_if_fail (length, FALSE);
-  g_return_val_if_fail (header, FALSE);
-
-  *length = GST_DP_HEADER_LENGTH;
-  h = g_malloc0 (GST_DP_HEADER_LENGTH);
+  mem = gst_allocator_alloc (NULL, GST_DP_HEADER_LENGTH, NULL);
+  gst_memory_map (mem, &map, GST_MAP_READWRITE);
+  h = memset (map.data, 0, map.size);
 
   /* version, flags, type */
-  GST_DP_INIT_HEADER (h, version, flags, GST_DP_PAYLOAD_BUFFER);
+  GST_DP_INIT_HEADER (h, GST_DP_VERSION_1_0, flags, GST_DP_PAYLOAD_BUFFER);
 
-  gst_buffer_map ((GstBuffer *) buffer, &map, GST_MAP_READ);
+  if ((flags & GST_DP_HEADER_FLAG_CRC_PAYLOAD)) {
+    GstMapInfo *maps;
+    guint n_maps, i;
+
+    buffer_size = 0;
+
+    n_maps = gst_buffer_n_memory (buffer);
+    if (n_maps > 0) {
+      maps = g_newa (GstMapInfo, n_maps);
+
+      for (i = 0; i < n_maps; ++i) {
+        GstMemory *mem;
+
+        mem = gst_buffer_peek_memory (buffer, i);
+        gst_memory_map (mem, &maps[i], GST_MAP_READ);
+        buffer_size += maps[i].size;
+      }
+
+      crc = gst_dp_crc_from_memory_maps (maps, n_maps);
+
+      for (i = 0; i < n_maps; ++i)
+        gst_memory_unmap (maps[i].memory, &maps[i]);
+    }
+  } else {
+    buffer_size = gst_buffer_get_size (buffer);
+  }
 
   /* buffer properties */
-  GST_WRITE_UINT32_BE (h + 6, map.size);
+  GST_WRITE_UINT32_BE (h + 6, buffer_size);
   GST_WRITE_UINT64_BE (h + 10, GST_BUFFER_TIMESTAMP (buffer));
   GST_WRITE_UINT64_BE (h + 18, GST_BUFFER_DURATION (buffer));
   GST_WRITE_UINT64_BE (h + 26, GST_BUFFER_OFFSET (buffer));
@@ -164,36 +199,53 @@
   /* from gstreamer 1.x, buffers also have the DTS */
   GST_WRITE_UINT64_BE (h + 44, GST_BUFFER_DTS (buffer));
 
-  GST_DP_SET_CRC (h, flags, map.data, map.size);
+  /* header CRC */
+  if ((flags & GST_DP_HEADER_FLAG_CRC_HEADER))
+    /* we don't crc the last four bytes since they are crc's */
+    header_crc = gst_dp_crc (h, 58);
+  else
+    header_crc = 0;
 
-  gst_buffer_unmap ((GstBuffer *) buffer, &map);
+  GST_WRITE_UINT16_BE (h + 58, header_crc);
 
-  GST_MEMDUMP ("created header from buffer", h, GST_DP_HEADER_LENGTH);
-  *header = h;
-  return TRUE;
+  /* payload CRC */
+  GST_WRITE_UINT16_BE (h + 60, crc);
+
+  GST_MEMDUMP ("payload header for buffer", h, GST_DP_HEADER_LENGTH);
+  gst_memory_unmap (mem, &map);
+
+  ret_buf = gst_buffer_new ();
+
+  /* header */
+  gst_buffer_append_memory (ret_buf, mem);
+
+  /* buffer data */
+  return gst_buffer_append (ret_buf, gst_buffer_ref (buffer));
 }
 
-static gboolean
-gst_dp_packet_from_caps_any (const GstCaps * caps, GstDPHeaderFlag flags,
-    guint * length, guint8 ** header, guint8 ** payload, GstDPVersion version)
+GstBuffer *
+gst_dp_payload_caps (const GstCaps * caps, GstDPHeaderFlag flags)
 {
+  GstBuffer *buf;
+  GstMapInfo map;
+  GstMemory *mem;
   guint8 *h;
   guchar *string;
   guint payload_length;
 
-  g_return_val_if_fail (GST_IS_CAPS (caps), FALSE);
-  g_return_val_if_fail (length, FALSE);
-  g_return_val_if_fail (header, FALSE);
-  g_return_val_if_fail (payload, FALSE);
+  g_assert (GST_IS_CAPS (caps));
 
-  *length = GST_DP_HEADER_LENGTH;
-  h = g_malloc0 (GST_DP_HEADER_LENGTH);
+  buf = gst_buffer_new ();
+
+  mem = gst_allocator_alloc (NULL, GST_DP_HEADER_LENGTH, NULL);
+  gst_memory_map (mem, &map, GST_MAP_READWRITE);
+  h = memset (map.data, 0, map.size);
 
   string = (guchar *) gst_caps_to_string (caps);
   payload_length = strlen ((gchar *) string) + 1;       /* include trailing 0 */
 
   /* version, flags, type */
-  GST_DP_INIT_HEADER (h, version, flags, GST_DP_PAYLOAD_CAPS);
+  GST_DP_INIT_HEADER (h, GST_DP_VERSION_1_0, flags, GST_DP_PAYLOAD_CAPS);
 
   /* buffer properties */
   GST_WRITE_UINT32_BE (h + 6, payload_length);
@@ -204,12 +256,75 @@
 
   GST_DP_SET_CRC (h, flags, string, payload_length);
 
-  GST_MEMDUMP ("created header from caps", h, GST_DP_HEADER_LENGTH);
-  *header = h;
-  *payload = string;
-  return TRUE;
+  GST_MEMDUMP ("payload header for caps", h, GST_DP_HEADER_LENGTH);
+  gst_memory_unmap (mem, &map);
+
+  /* header */
+  gst_buffer_append_memory (buf, mem);
+
+  /* caps string */
+  gst_buffer_append_memory (buf,
+      gst_memory_new_wrapped (0, string, payload_length, 0, payload_length,
+          string, g_free));
+
+  return buf;
 }
 
+GstBuffer *
+gst_dp_payload_event (const GstEvent * event, GstDPHeaderFlag flags)
+{
+  GstBuffer *buf;
+  GstMapInfo map;
+  GstMemory *mem;
+  guint8 *h;
+  guint32 pl_length;            /* length of payload */
+  guchar *string = NULL;
+  const GstStructure *structure;
+
+  g_assert (GST_IS_EVENT (event));
+
+  buf = gst_buffer_new ();
+
+  mem = gst_allocator_alloc (NULL, GST_DP_HEADER_LENGTH, NULL);
+  gst_memory_map (mem, &map, GST_MAP_READWRITE);
+  h = memset (map.data, 0, map.size);
+
+  structure = gst_event_get_structure ((GstEvent *) event);
+  if (structure) {
+    string = (guchar *) gst_structure_to_string (structure);
+    GST_LOG ("event %p has structure, string %s", event, string);
+    pl_length = strlen ((gchar *) string) + 1;  /* include trailing 0 */
+  } else {
+    GST_LOG ("event %p has no structure", event);
+    pl_length = 0;
+  }
+
+  /* version, flags, type */
+  GST_DP_INIT_HEADER (h, GST_DP_VERSION_1_0, flags,
+      GST_DP_PAYLOAD_EVENT_NONE + GST_EVENT_TYPE (event));
+
+  /* length */
+  GST_WRITE_UINT32_BE (h + 6, pl_length);
+  /* timestamp */
+  GST_WRITE_UINT64_BE (h + 10, GST_EVENT_TIMESTAMP (event));
+
+  GST_DP_SET_CRC (h, flags, string, pl_length);
+
+  GST_MEMDUMP ("payload header for event", h, GST_DP_HEADER_LENGTH);
+  gst_memory_unmap (mem, &map);
+
+  /* header */
+  gst_buffer_append_memory (buf, mem);
+
+  /* event string */
+  if (pl_length > 0) {
+    gst_buffer_append_memory (buf,
+        gst_memory_new_wrapped (0, string, pl_length, 0, pl_length,
+            string, g_free));
+  }
+
+  return buf;
+}
 
 /*** PUBLIC FUNCTIONS ***/
 
@@ -259,12 +374,15 @@
  *
  * Returns: a two-byte CRC checksum.
  */
-guint16
+static guint16
 gst_dp_crc (const guint8 * buffer, guint length)
 {
   guint16 crc_register = CRC_INIT;
 
-  g_return_val_if_fail (buffer != NULL || length == 0, 0);
+  if (length == 0)
+    return 0;
+
+  g_assert (buffer != NULL);
 
   /* calc CRC */
   for (; length--;) {
@@ -274,23 +392,37 @@
   return (0xffff ^ crc_register);
 }
 
-GType
-gst_dp_version_get_type (void)
+static guint16
+gst_dp_crc_from_memory_maps (const GstMapInfo * maps, guint n_maps)
 {
-  static gsize gst_dp_version_type = 0;
-  static const GEnumValue gst_dp_version[] = {
-    {GST_DP_VERSION_0_2, "GST_DP_VERSION_0_2", "0.2"},
-    {GST_DP_VERSION_1_0, "GST_DP_VERSION_1_0", "1.0"},
-    {0, NULL, NULL},
-  };
+  guint16 crc_register = CRC_INIT;
+  gsize total_length = 0;
 
-  if (g_once_init_enter (&gst_dp_version_type)) {
-    GType tmp = g_enum_register_static ("GstDPVersion", gst_dp_version);
-    g_once_init_leave (&gst_dp_version_type, tmp);
+  if (n_maps == 0)
+    return 0;
+
+  g_assert (maps != NULL);
+
+  /* calc CRC */
+  while (n_maps > 0) {
+    guint8 *buffer = maps->data;
+    gsize length = maps->size;
+
+    total_length += length;
+
+    while (length-- > 0) {
+      crc_register = (guint16) ((crc_register << 8) ^
+          gst_dp_crc_table[((crc_register >> 8) & 0x00ff) ^ *buffer++]);
+    }
+    --n_maps;
+    ++maps;
   }
 
-  return (GType) gst_dp_version_type;
-};
+  if (G_UNLIKELY (total_length == 0))
+    return 0;
+
+  return (0xffff ^ crc_register);
+}
 
 /**
  * gst_dp_init:
@@ -303,15 +435,6 @@
 void
 gst_dp_init (void)
 {
-  static gboolean _gst_dp_initialized = FALSE;
-
-  if (_gst_dp_initialized)
-    return;
-
-  _gst_dp_initialized = TRUE;
-
-  g_type_class_ref (gst_dp_version_get_type ());
-
   GST_DEBUG_CATEGORY_INIT (data_protocol_debug, "gdp", 0,
       "GStreamer Data Protocol");
 }
@@ -348,68 +471,6 @@
   return GST_DP_HEADER_PAYLOAD_TYPE (header);
 }
 
-/*** PACKETIZER FUNCTIONS ***/
-
-static gboolean
-gst_dp_header_from_buffer_1_0 (const GstBuffer * buffer, GstDPHeaderFlag flags,
-    guint * length, guint8 ** header)
-{
-  return gst_dp_header_from_buffer_any (buffer, flags, length, header,
-      GST_DP_VERSION_1_0);
-}
-
-static gboolean
-gst_dp_packet_from_caps_1_0 (const GstCaps * caps, GstDPHeaderFlag flags,
-    guint * length, guint8 ** header, guint8 ** payload)
-{
-  return gst_dp_packet_from_caps_any (caps, flags, length, header, payload,
-      GST_DP_VERSION_1_0);
-}
-
-static gboolean
-gst_dp_packet_from_event_1_0 (const GstEvent * event, GstDPHeaderFlag flags,
-    guint * length, guint8 ** header, guint8 ** payload)
-{
-  guint8 *h;
-  guint32 pl_length;            /* length of payload */
-  guchar *string = NULL;
-  const GstStructure *structure;
-
-  g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
-  g_return_val_if_fail (length, FALSE);
-  g_return_val_if_fail (header, FALSE);
-  g_return_val_if_fail (payload, FALSE);
-
-  *length = GST_DP_HEADER_LENGTH;
-  h = g_malloc0 (GST_DP_HEADER_LENGTH);
-
-  structure = gst_event_get_structure ((GstEvent *) event);
-  if (structure) {
-    string = (guchar *) gst_structure_to_string (structure);
-    GST_LOG ("event %p has structure, string %s", event, string);
-    pl_length = strlen ((gchar *) string) + 1;  /* include trailing 0 */
-  } else {
-    GST_LOG ("event %p has no structure", event);
-    pl_length = 0;
-  }
-
-  /* version, flags, type */
-  GST_DP_INIT_HEADER (h, GST_DP_VERSION_1_0, flags,
-      GST_DP_PAYLOAD_EVENT_NONE + GST_EVENT_TYPE (event));
-
-  /* length */
-  GST_WRITE_UINT32_BE (h + 6, pl_length);
-  /* timestamp */
-  GST_WRITE_UINT64_BE (h + 10, GST_EVENT_TIMESTAMP (event));
-
-  GST_DP_SET_CRC (h, flags, string, pl_length);
-
-  GST_MEMDUMP ("created header from event", h, GST_DP_HEADER_LENGTH);
-  *header = h;
-  *payload = string;
-  return TRUE;
-}
-
 /*** DEPACKETIZING FUNCTIONS ***/
 
 /**
@@ -710,46 +771,3 @@
 
   return TRUE;
 }
-
-/**
- * gst_dp_packetizer_new:
- * @version: the #GstDPVersion of the protocol to packetize for.
- *
- * Creates a new packetizer.
- *
- * Returns: a newly allocated #GstDPPacketizer
- */
-GstDPPacketizer *
-gst_dp_packetizer_new (GstDPVersion version)
-{
-  GstDPPacketizer *ret;
-
-  ret = g_malloc0 (sizeof (GstDPPacketizer));
-  ret->version = version;
-
-  switch (version) {
-    case GST_DP_VERSION_1_0:
-      ret->header_from_buffer = gst_dp_header_from_buffer_1_0;
-      ret->packet_from_caps = gst_dp_packet_from_caps_1_0;
-      ret->packet_from_event = gst_dp_packet_from_event_1_0;
-      break;
-    default:
-      g_free (ret);
-      ret = NULL;
-      break;
-  }
-
-  return ret;
-}
-
-/**
- * gst_dp_packetizer_free:
- * @packetizer: the #GstDPPacketizer to free.
- *
- * Free the given packetizer.
- */
-void
-gst_dp_packetizer_free (GstDPPacketizer * packetizer)
-{
-  g_free (packetizer);
-}
diff --git a/gst/gdp/dataprotocol.h b/gst/gdp/dataprotocol.h
index 3812ff0..ac1d010 100644
--- a/gst/gdp/dataprotocol.h
+++ b/gst/gdp/dataprotocol.h
@@ -30,34 +30,6 @@
 G_BEGIN_DECLS
 
 /**
- * GstDPVersion:
- * @GST_DP_VERSION_0_2: protocol version 0.2
- * @GST_DP_VERSION_1_0: protocol version 1.0
- *
- * The version of the GDP protocol being used.
- */
-typedef enum {
-  GST_DP_VERSION_0_2 = 1,
-  GST_DP_VERSION_1_0,
-} GstDPVersion;
-
-GType gst_dp_version_get_type (void);
-#define GST_TYPE_DP_VERSION (gst_dp_version_get_type ())
-
-/**
- * GST_DP_VERSION_MAJOR:
- *
- * The major version number of the GStreamer Data Protocol.
- */
-#define GST_DP_VERSION_MAJOR 0
-/**
- * GST_DP_VERSION_MINOR:
- *
- * The minor version number of the GStreamer Data Protocol.
- */
-#define GST_DP_VERSION_MINOR 2
-
-/**
  * GST_DP_HEADER_LENGTH:
  *
  * The header size in bytes.
@@ -97,53 +69,8 @@
   GST_DP_PAYLOAD_EVENT_NONE      = 64,
 } GstDPPayloadType;
 
-typedef gboolean (*GstDPHeaderFromBufferFunction) (const GstBuffer * buffer,
-                                                   GstDPHeaderFlag flags,
-                                                   guint * length,
-                                                   guint8 ** header);
-typedef gboolean (*GstDPPacketFromCapsFunction)   (const GstCaps * caps,
-                                                   GstDPHeaderFlag flags,
-                                                   guint * length,
-                                                   guint8 ** header,
-                                                   guint8 ** payload);
-typedef gboolean (*GstDPPacketFromEventFunction)  (const GstEvent * event,
-                                                   GstDPHeaderFlag flags,
-                                                   guint * length,
-                                                   guint8 ** header,
-                                                   guint8 ** payload);
-
-/**
- * GstDPPacketizer:
- * @version: the #GstDPVersion of the protocol to be used
- * @header_from_buffer: buffer serializer function
- * @packet_from_caps: caps serializer function
- * @packet_from_event: event serializer function
- *
- * Data protocol packetizer handle.
- */
-typedef struct {
-  GstDPVersion version;
-
-  GstDPHeaderFromBufferFunction header_from_buffer;
-  GstDPPacketFromCapsFunction packet_from_caps;
-  GstDPPacketFromEventFunction packet_from_event;
-
-  /*< private >*/
-  gpointer _gst_reserved[GST_PADDING];
-} GstDPPacketizer;
-
-
 void            gst_dp_init                     (void);
 
-/* packetizer */
-GstDPPacketizer *
-                gst_dp_packetizer_new           (GstDPVersion version);
-void            gst_dp_packetizer_free          (GstDPPacketizer *packetizer);
-
-/* crc checksum */
-guint16         gst_dp_crc                      (const guint8 * buffer,
-                                                 guint length);
-
 /* payload information from header */
 guint32         gst_dp_header_payload_length    (const guint8 * header);
 GstDPPayloadType
@@ -159,6 +86,16 @@
                                                 const guint8 * header,
                                                 const guint8 * payload);
 
+/* payloading GstBuffer/GstEvent/GstCaps */
+GstBuffer *     gst_dp_payload_buffer           (GstBuffer      * buffer,
+                                                 GstDPHeaderFlag  flags);
+
+GstBuffer *     gst_dp_payload_caps             (const GstCaps  * caps,
+                                                 GstDPHeaderFlag  flags);
+
+GstBuffer *     gst_dp_payload_event            (const GstEvent * event,
+                                                 GstDPHeaderFlag  flags);
+
 /* validation */
 gboolean        gst_dp_validate_header          (guint header_length,
                                                 const guint8 * header);
diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c
index d8bc818..33ac591 100644
--- a/gst/gdp/gstgdppay.c
+++ b/gst/gdp/gstgdppay.c
@@ -1,5 +1,6 @@
 /* GStreamer
  * Copyright (C) 2006 Thomas Vander Stichele <thomas at apestaart dot org>
+ * Copyright (C) 2014 Tim-Philipp Müller <tim centricular com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -57,14 +58,12 @@
 
 #define DEFAULT_CRC_HEADER TRUE
 #define DEFAULT_CRC_PAYLOAD FALSE
-#define DEFAULT_VERSION GST_DP_VERSION_1_0
 
 enum
 {
   PROP_0,
   PROP_CRC_HEADER,
-  PROP_CRC_PAYLOAD,
-  PROP_VERSION,
+  PROP_CRC_PAYLOAD
 };
 
 #define _do_init \
@@ -113,12 +112,6 @@
       g_param_spec_boolean ("crc-payload", "CRC Payload",
           "Calculate and store a CRC checksum on the payload",
           DEFAULT_CRC_PAYLOAD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, PROP_VERSION,
-      g_param_spec_enum ("version", "Version",
-          "Version of the GStreamer Data Protocol",
-          GST_TYPE_DP_VERSION, DEFAULT_VERSION,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   gst_element_class_set_static_metadata (gstelement_class,
       "GDP Payloader", "GDP/Payloader",
       "Payloads GStreamer Data Protocol buffers",
@@ -152,10 +145,7 @@
   gdppay->crc_header = DEFAULT_CRC_HEADER;
   gdppay->crc_payload = DEFAULT_CRC_PAYLOAD;
   gdppay->header_flag = gdppay->crc_header | gdppay->crc_payload;
-  gdppay->version = DEFAULT_VERSION;
   gdppay->offset = 0;
-
-  gdppay->packetizer = gst_dp_packetizer_new (gdppay->version);
 }
 
 static void
@@ -164,7 +154,6 @@
   GstGDPPay *this = GST_GDP_PAY (gobject);
 
   gst_gdp_pay_reset (this);
-  gst_dp_packetizer_free (this->packetizer);
 
   GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (gobject));
 }
@@ -188,23 +177,11 @@
     gst_caps_unref (this->caps);
     this->caps = NULL;
   }
-  if (this->caps_buf) {
-    gst_buffer_unref (this->caps_buf);
-    this->caps_buf = NULL;
-  }
-  if (this->tag_buf) {
-    gst_buffer_unref (this->tag_buf);
-    this->tag_buf = NULL;
-  }
-  if (this->new_segment_buf) {
-    gst_buffer_unref (this->new_segment_buf);
-    this->new_segment_buf = NULL;
-  }
-  if (this->streamstartid_buf) {
-    gst_buffer_unref (this->streamstartid_buf);
-    this->streamstartid_buf = NULL;
-  }
+  this->have_caps = FALSE;
+  this->have_segment = FALSE;
+  this->have_streamstartid = FALSE;
   this->sent_streamheader = FALSE;
+  this->reset_streamheader = FALSE;
   this->offset = 0;
 }
 
@@ -220,94 +197,62 @@
 static GstBuffer *
 gst_gdp_buffer_from_caps (GstGDPPay * this, GstCaps * caps)
 {
-  GstBuffer *headerbuf;
-  GstBuffer *payloadbuf;
-  guint8 *header, *payload;
-  guint len, plen;
-
-  if (!this->packetizer->packet_from_caps (caps, this->header_flag, &len,
-          &header, &payload))
-    goto packet_failed;
-
-  GST_LOG_OBJECT (this, "creating GDP header and payload buffer from caps");
-  headerbuf = gst_buffer_new_wrapped (header, len);
-
-  plen = gst_dp_header_payload_length (header);
-  payloadbuf = gst_buffer_new_wrapped (payload, plen);
-
-  return gst_buffer_append (headerbuf, payloadbuf);
-
-  /* ERRORS */
-packet_failed:
-  {
-    GST_WARNING_OBJECT (this, "could not create GDP header from caps");
-    return NULL;
-  }
+  return gst_dp_payload_caps (caps, this->header_flag);
 }
 
 static GstBuffer *
 gst_gdp_pay_buffer_from_buffer (GstGDPPay * this, GstBuffer * buffer)
 {
-  GstBuffer *headerbuf;
-  guint8 *header;
-  guint len;
-
-  if (!this->packetizer->header_from_buffer (buffer, this->header_flag, &len,
-          &header))
-    goto no_buffer;
-
-  GST_LOG_OBJECT (this, "creating GDP header and payload buffer from buffer");
-  headerbuf = gst_buffer_new_wrapped (header, len);
-
-  /* we do not want to lose the ref on the incoming buffer */
-  gst_buffer_ref (buffer);
-
-  return gst_buffer_append (headerbuf, buffer);
-
-  /* ERRORS */
-no_buffer:
-  {
-    GST_WARNING_OBJECT (this, "could not create GDP header from buffer");
-    return NULL;
-  }
+  return gst_dp_payload_buffer (buffer, this->header_flag);
 }
 
 static GstBuffer *
 gst_gdp_buffer_from_event (GstGDPPay * this, GstEvent * event)
 {
-  GstBuffer *headerbuf;
-  GstBuffer *payloadbuf;
-  guint8 *header, *payload;
-  guint len, plen;
-  gboolean ret;
-
-  ret =
-      this->packetizer->packet_from_event (event, this->header_flag, &len,
-      &header, &payload);
-  if (!ret)
-    goto no_event;
-
-  GST_LOG_OBJECT (this, "creating GDP header and payload buffer from event");
-  headerbuf = gst_buffer_new_wrapped (header, len);
-
-  payloadbuf = gst_buffer_new ();
-  plen = gst_dp_header_payload_length (header);
-  if (plen && payload != NULL) {
-    gst_buffer_append_memory (payloadbuf,
-        gst_memory_new_wrapped (0, payload, plen, 0, plen, payload, g_free));
-  }
-
-  return gst_buffer_append (headerbuf, payloadbuf);
-
-  /* ERRORS */
-no_event:
-  {
-    GST_WARNING_OBJECT (this, "could not create GDP header from event %s (%d)",
-        gst_event_type_get_name (event->type), event->type);
-    return NULL;
-  }
+  return gst_dp_payload_event (event, this->header_flag);
 }
 
+static void
+gdp_streamheader_array_append_take_buffer (GValue * array, GstBuffer * buf)
+{
+  GValue value = { 0, };
+
+  g_value_init (&value, GST_TYPE_BUFFER);
+  gst_value_take_buffer (&value, buf);
+  gst_value_array_append_and_take_value (array, &value);
+}
+
+typedef struct
+{
+  GstGDPPay *gdppay;
+  GValue *array;
+} GstGDPPayAndArray;
+
+static gboolean
+gdp_streamheader_array_store_events (GstPad * pad, GstEvent ** event,
+    gpointer udata)
+{
+  GstGDPPayAndArray *gdp_and_array = udata;
+  GstGDPPay *this = gdp_and_array->gdppay;
+  GValue *array = gdp_and_array->array;
+  GstBuffer *buf;
+
+  /* Need to handle caps differently to keep compatibility with 1.0 */
+  if (GST_EVENT_TYPE (*event) == GST_EVENT_CAPS) {
+    GstCaps *caps;
+
+    gst_event_parse_caps (*event, &caps);
+    buf = gst_gdp_buffer_from_caps (this, caps);
+  } else {
+    buf = gst_gdp_buffer_from_event (this, *event);
+  }
+
+  GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
+  gst_gdp_stamp_buffer (this, buf);
+  gdp_streamheader_array_append_take_buffer (array, buf);
+
+  return TRUE;
+}
 
 /* set our caps with streamheader, based on the latest newsegment and caps,
  * and (possibly) GDP-serialized buffers of the streamheaders on the src pad */
@@ -315,109 +260,53 @@
 gst_gdp_pay_reset_streamheader (GstGDPPay * this)
 {
   GstCaps *caps;
-  /* We use copies of these to avoid circular refcounts */
-  GstBuffer *new_segment_buf, *caps_buf, *tag_buf, *streamstartid_buf;
   GstStructure *structure;
   GstFlowReturn r = GST_FLOW_OK;
-  gboolean version_one_zero = TRUE;
+  GstGDPPayAndArray gdp_and_array;
 
   GValue array = { 0 };
-  GValue value = { 0 };
+
+  gdp_and_array.gdppay = this;
+  gdp_and_array.array = &array;
 
   GST_DEBUG_OBJECT (this, "start");
-  /* In version 0.2, we didn't need or send new segment or tags */
-  if (this->version == GST_DP_VERSION_0_2)
-    version_one_zero = FALSE;
 
-  if (version_one_zero) {
-    if (!this->new_segment_buf || !this->caps_buf || !this->streamstartid_buf) {
-      GST_DEBUG_OBJECT (this, "1.0, missing new_segment or caps or stream "
-          "start id, returning");
-      return GST_FLOW_OK;
-    }
-  } else {
-    if (!this->caps_buf) {
-      GST_DEBUG_OBJECT (this, "0.2, missing caps, returning");
-      return GST_FLOW_OK;
-    }
+  if (!this->have_segment || !this->have_caps || !this->have_streamstartid) {
+    GST_DEBUG_OBJECT (this, "1.0, missing new_segment or caps or stream "
+        "start id, returning");
+    return GST_FLOW_OK;
   }
 
   /* put copies of the buffers in a fixed list
    * Stamp the buffers with offset and offset_end as well.
    * We do this here so the offsets match the order the buffers go out in */
   g_value_init (&array, GST_TYPE_ARRAY);
-
-  if (version_one_zero) {
-    gst_gdp_stamp_buffer (this, this->streamstartid_buf);
-    GST_DEBUG_OBJECT (this, "appending copy of stream start id buffer %p",
-        this->streamstartid_buf);
-    streamstartid_buf = gst_buffer_copy (this->streamstartid_buf);
-    g_value_init (&value, GST_TYPE_BUFFER);
-    gst_value_set_buffer (&value, streamstartid_buf);
-    gst_value_array_append_value (&array, &value);
-    g_value_unset (&value);
-    gst_buffer_unref (streamstartid_buf);
-  }
-
-  gst_gdp_stamp_buffer (this, this->caps_buf);
-  GST_DEBUG_OBJECT (this, "appending copy of caps buffer %p", this->caps_buf);
-  caps_buf = gst_buffer_copy (this->caps_buf);
-  g_value_init (&value, GST_TYPE_BUFFER);
-  gst_value_set_buffer (&value, caps_buf);
-  gst_value_array_append_value (&array, &value);
-  g_value_unset (&value);
-  gst_buffer_unref (caps_buf);
-
-  if (version_one_zero) {
-    gst_gdp_stamp_buffer (this, this->new_segment_buf);
-    GST_DEBUG_OBJECT (this, "1.0, appending copy of new segment buffer %p",
-        this->new_segment_buf);
-    new_segment_buf = gst_buffer_copy (this->new_segment_buf);
-    g_value_init (&value, GST_TYPE_BUFFER);
-    gst_value_set_buffer (&value, new_segment_buf);
-    gst_value_array_append_value (&array, &value);
-    g_value_unset (&value);
-    gst_buffer_unref (new_segment_buf);
-
-    if (this->tag_buf) {
-      gst_gdp_stamp_buffer (this, this->tag_buf);
-      GST_DEBUG_OBJECT (this, "1.0, appending current tags buffer %p",
-          this->tag_buf);
-      tag_buf = this->tag_buf;
-      this->tag_buf = NULL;
-
-      g_value_init (&value, GST_TYPE_BUFFER);
-      gst_value_set_buffer (&value, tag_buf);
-      gst_value_array_append_value (&array, &value);
-      g_value_unset (&value);
-      gst_buffer_unref (tag_buf);
-    }
-  }
+  gst_pad_sticky_events_foreach (this->sinkpad,
+      gdp_streamheader_array_store_events, &gdp_and_array);
 
   /* we also need to add GDP serializations of the streamheaders of the
    * incoming caps */
   structure = gst_caps_get_structure (this->caps, 0);
   if (gst_structure_has_field (structure, "streamheader")) {
     const GValue *sh;
-
-    GArray *buffers;
-
     GstBuffer *buffer;
-
-    int i;
+    int i, num;
 
     sh = gst_structure_get_value (structure, "streamheader");
-    buffers = g_value_peek_pointer (sh);
+    num = gst_value_array_get_size (sh);
     GST_DEBUG_OBJECT (this,
-        "Need to serialize %d incoming streamheader buffers on ours",
-        buffers->len);
-    for (i = 0; i < buffers->len; ++i) {
-      GValue *bufval;
+        "Need to serialize %d incoming streamheader buffers on ours", num);
 
+    for (i = 0; i < num; ++i) {
+      const GValue *bufval;
       GstBuffer *outbuffer;
 
-      bufval = &g_array_index (buffers, GValue, i);
-      buffer = g_value_peek_pointer (bufval);
+      bufval = gst_value_array_get_value (sh, i);
+      buffer = gst_value_get_buffer (bufval);
+
+      /* Make copy before modifying buffer metadata */
+      buffer = gst_buffer_copy (buffer);
+
       /* this buffer is deserialized by gdpdepay as a regular buffer,
          it needs HEADER, because it's a streamheader - otherwise it
          is mixed with regular data buffers */
@@ -427,6 +316,9 @@
       GST_BUFFER_TIMESTAMP (buffer) = GST_CLOCK_TIME_NONE;
 
       outbuffer = gst_gdp_pay_buffer_from_buffer (this, buffer);
+
+      gst_buffer_unref (buffer);
+
       if (!outbuffer) {
         g_value_unset (&array);
         goto no_buffer;
@@ -440,12 +332,7 @@
       GST_BUFFER_OFFSET_END (outbuffer) = GST_BUFFER_OFFSET_NONE;
       GST_BUFFER_TIMESTAMP (outbuffer) = GST_CLOCK_TIME_NONE;
 
-      g_value_init (&value, GST_TYPE_BUFFER);
-      gst_value_set_buffer (&value, outbuffer);
-      gst_value_array_append_value (&array, &value);
-      g_value_unset (&value);
-
-      gst_buffer_unref (outbuffer);
+      gdp_streamheader_array_append_take_buffer (&array, outbuffer);
     }
   } else {
     GST_DEBUG_OBJECT (this, "no streamheader to serialize");
@@ -478,40 +365,6 @@
     }
   }
 
-  /* push out these streamheader buffers, then flush our internal queue */
-  GST_DEBUG_OBJECT (this, "Pushing GDP stream-start-id buffer %p",
-      this->streamstartid_buf);
-  r = gst_pad_push (this->srcpad, gst_buffer_ref (this->streamstartid_buf));
-  if (r != GST_FLOW_OK) {
-    GST_WARNING_OBJECT (this, "pushing GDP stream-start-id buffer returned %d",
-        r);
-    goto done;
-  }
-  GST_DEBUG_OBJECT (this, "Pushing GDP caps buffer %p", this->caps_buf);
-  r = gst_pad_push (this->srcpad, gst_buffer_ref (this->caps_buf));
-  if (r != GST_FLOW_OK) {
-    GST_WARNING_OBJECT (this, "pushing GDP caps buffer returned %d", r);
-    goto done;
-  }
-  GST_DEBUG_OBJECT (this, "Pushing GDP new_segment buffer %p with offset %"
-      G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT, this->new_segment_buf,
-      GST_BUFFER_OFFSET (this->new_segment_buf),
-      GST_BUFFER_OFFSET_END (this->new_segment_buf));
-  /* we stored these bufs with refcount 1, so make sure we keep a ref */
-  r = gst_pad_push (this->srcpad, gst_buffer_ref (this->new_segment_buf));
-  if (r != GST_FLOW_OK) {
-    GST_WARNING_OBJECT (this, "pushing GDP newsegment buffer returned %d", r);
-    goto done;
-  }
-  if (this->tag_buf) {
-    GST_DEBUG_OBJECT (this, "Pushing GDP tag buffer %p", this->tag_buf);
-    /* we stored these bufs with refcount 1, so make sure we keep a ref */
-    r = gst_pad_push (this->srcpad, gst_buffer_ref (this->tag_buf));
-    if (r != GST_FLOW_OK) {
-      GST_WARNING_OBJECT (this, "pushing GDP tag buffer returned %d", r);
-      goto done;
-    }
-  }
   this->sent_streamheader = TRUE;
   GST_DEBUG_OBJECT (this, "need to push %d queued buffers",
       g_list_length (this->queue));
@@ -524,7 +377,6 @@
     /* delete buffer from queue now */
     this->queue = g_list_delete_link (this->queue, this->queue);
 
-    /* set caps and push */
     r = gst_pad_push (this->srcpad, buffer);
     if (r != GST_FLOW_OK) {
       GST_WARNING_OBJECT (this, "pushing queued GDP buffer returned %d", r);
@@ -532,6 +384,8 @@
     }
   }
 
+  this->reset_streamheader = FALSE;
+
 done:
   gst_caps_unref (caps);
   GST_DEBUG_OBJECT (this, "stop");
@@ -551,7 +405,7 @@
 static GstFlowReturn
 gst_gdp_queue_buffer (GstGDPPay * this, GstBuffer * buffer)
 {
-  if (this->sent_streamheader) {
+  if (this->sent_streamheader && !this->reset_streamheader) {
     GST_LOG_OBJECT (this, "Pushing GDP buffer %p, caps %" GST_PTR_FORMAT,
         buffer, this->caps);
     return gst_pad_push (this->srcpad, buffer);
@@ -559,12 +413,10 @@
 
   /* store it on an internal queue. buffer remains reffed. */
   this->queue = g_list_append (this->queue, buffer);
-  GST_DEBUG_OBJECT (this, "streamheader not sent yet, "
+  GST_DEBUG_OBJECT (this, "streamheader not sent yet or needs update, "
       "queued buffer %p, now %d buffers queued",
       buffer, g_list_length (this->queue));
 
-  gst_gdp_pay_reset_streamheader (this);
-
   return GST_FLOW_OK;
 }
 
@@ -572,9 +424,6 @@
 gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
 {
   GstGDPPay *this;
-#if 0
-  GstCaps *caps;
-#endif
   GstBuffer *outbuffer;
   GstFlowReturn ret;
 
@@ -582,7 +431,7 @@
 
   /* we should have received a new_segment before, otherwise it's a bug.
    * fake one in that case */
-  if (!this->new_segment_buf) {
+  if (!this->have_segment) {
     GstEvent *event;
     GstSegment segment;
 
@@ -603,7 +452,7 @@
       GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
       GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf",
           outbuffer);
-      this->new_segment_buf = outbuffer;
+      this->have_segment = TRUE;
     }
   }
   /* make sure we've received caps before */
@@ -629,6 +478,9 @@
   GST_BUFFER_TIMESTAMP (outbuffer) = GST_BUFFER_TIMESTAMP (buffer);
   GST_BUFFER_DURATION (outbuffer) = GST_BUFFER_DURATION (buffer);
 
+  if (this->reset_streamheader)
+    gst_gdp_pay_reset_streamheader (this);
+
   ret = gst_gdp_queue_buffer (this, outbuffer);
 
 done:
@@ -646,16 +498,6 @@
     ret = GST_FLOW_NOT_NEGOTIATED;
     goto done;
   }
-#if 0
-no_caps_buffer:
-  {
-    GST_ELEMENT_ERROR (this, STREAM, ENCODE, (NULL),
-        ("Could not create GDP buffer from caps %" GST_PTR_FORMAT, caps));
-    gst_caps_unref (caps);
-    ret = GST_FLOW_ERROR;
-    goto done;
-  }
-#endif
 no_buffer:
   {
     GST_ELEMENT_ERROR (this, STREAM, ENCODE, (NULL),
@@ -689,28 +531,16 @@
    * and not send it on */
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_STREAM_START:
-      GST_DEBUG_OBJECT (this, "Storing stream start id in buffer %p",
-          outbuffer);
-
-      if (this->streamstartid_buf)
-        gst_buffer_unref (this->streamstartid_buf);
-      this->streamstartid_buf = outbuffer;
-
-      GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
-      gst_gdp_pay_reset_streamheader (this);
+      GST_DEBUG_OBJECT (this, "Received stream start id");
+      this->have_streamstartid = TRUE;
       break;
     case GST_EVENT_SEGMENT:
-      GST_DEBUG_OBJECT (this, "Storing in caps buffer %p as new_segment_buf",
-          outbuffer);
-
-      if (this->new_segment_buf)
-        gst_buffer_unref (this->new_segment_buf);
-      this->new_segment_buf = outbuffer;
-
-      GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
-      gst_gdp_pay_reset_streamheader (this);
+      GST_DEBUG_OBJECT (this, "Received segment %" GST_PTR_FORMAT, event);
+      this->have_segment = TRUE;
       break;
     case GST_EVENT_CAPS:{
+      GST_DEBUG_OBJECT (this, "Received caps %" GST_PTR_FORMAT, event);
+      this->have_caps = TRUE;
       gst_event_parse_caps (event, &caps);
       gst_buffer_replace (&outbuffer, NULL);
       if (this->caps == NULL || !gst_caps_is_equal (this->caps, caps)) {
@@ -721,34 +551,18 @@
           goto no_buffer_from_caps;
 
         GST_BUFFER_DURATION (outbuffer) = 0;
-        GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
-        if (this->caps_buf)
-          gst_buffer_unref (this->caps_buf);
-        this->caps_buf = outbuffer;
-        gst_gdp_pay_reset_streamheader (this);
       }
       break;
     }
-    case GST_EVENT_TAG:
-      GST_DEBUG_OBJECT (this, "Storing in caps buffer %p as tag_buf",
-          outbuffer);
-
-      if (this->tag_buf)
-        gst_buffer_unref (this->tag_buf);
-      this->tag_buf = outbuffer;
-
-      GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
-      gst_gdp_pay_reset_streamheader (this);
-      break;
     default:
-      GST_DEBUG_OBJECT (this, "queuing GDP buffer %p of event %p", outbuffer,
-          event);
-      flowret = gst_gdp_queue_buffer (this, outbuffer);
-      if (flowret != GST_FLOW_OK)
-        goto push_error;
       break;
   }
 
+  if (GST_EVENT_IS_STICKY (event)) {
+    GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
+    this->reset_streamheader = TRUE;
+  }
+
   /* if we have EOS, we should send on EOS ourselves */
   if (GST_EVENT_TYPE (event) == GST_EVENT_EOS
       || GST_EVENT_TYPE (event) == GST_EVENT_STREAM_START) {
@@ -757,6 +571,14 @@
     ret = gst_pad_push_event (this->srcpad, gst_event_ref (event));
   }
 
+  if (GST_EVENT_TYPE (event) != GST_EVENT_EOS) {
+    GST_DEBUG_OBJECT (this, "queuing GDP buffer %p of event %p", outbuffer,
+        event);
+    flowret = gst_gdp_queue_buffer (this, outbuffer);
+    if (flowret != GST_FLOW_OK)
+      goto push_error;
+  }
+
 done:
   gst_event_unref (event);
 
@@ -831,9 +653,6 @@
           g_value_get_boolean (value) ? GST_DP_HEADER_FLAG_CRC_PAYLOAD : 0;
       this->header_flag = this->crc_header | this->crc_payload;
       break;
-    case PROP_VERSION:
-      this->version = g_value_get_enum (value);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -856,9 +675,6 @@
     case PROP_CRC_PAYLOAD:
       g_value_set_boolean (value, this->crc_payload);
       break;
-    case PROP_VERSION:
-      g_value_set_enum (value, this->version);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
diff --git a/gst/gdp/gstgdppay.h b/gst/gdp/gstgdppay.h
index d4433ef..2e01eb1 100644
--- a/gst/gdp/gstgdppay.h
+++ b/gst/gdp/gstgdppay.h
@@ -52,10 +52,11 @@
 
   GstCaps *caps; /* incoming caps */
 
-  GstBuffer *streamstartid_buf;
-  GstBuffer *caps_buf;
-  GstBuffer *new_segment_buf;
-  GstBuffer *tag_buf;
+  gboolean  have_streamstartid;
+  gboolean  have_caps;
+  gboolean  have_segment;
+
+  gboolean reset_streamheader;
 
   gboolean sent_streamheader; /* TRUE after the first streamheaders are sent */
   GList *queue; /* list of queued buffers before streamheaders are sent */
@@ -64,8 +65,6 @@
   gboolean crc_header;
   gboolean crc_payload;
   GstDPHeaderFlag header_flag;
-  GstDPVersion version;
-  GstDPPacketizer *packetizer;
 };
 
 struct _GstGDPPayClass
diff --git a/gst/geometrictransform/Makefile.am b/gst/geometrictransform/Makefile.am
index df5f9e2..0bafe41 100644
--- a/gst/geometrictransform/Makefile.am
+++ b/gst/geometrictransform/Makefile.am
@@ -49,17 +49,3 @@
                  gstmirror.h \
                  gstfisheye.h \
                  gstperspective.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgeometrictransform -:SHARED libgstgeometrictransform \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgeometrictransform_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgeometrictransform_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgeometrictransform_la_LDFLAGS) \
-	           $(libgstgeometrictransform_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/geometrictransform/Makefile.in b/gst/geometrictransform/Makefile.in
index b20d30c..daa075f 100644
--- a/gst/geometrictransform/Makefile.in
+++ b/gst/geometrictransform/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/geometrictransform
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -250,6 +260,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -267,8 +278,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -293,8 +306,6 @@
 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@
@@ -307,7 +318,6 @@
 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@
@@ -315,6 +325,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -341,11 +353,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -364,8 +379,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -424,10 +437,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -444,7 +461,6 @@
 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@
@@ -453,7 +469,6 @@
 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@
@@ -466,7 +481,6 @@
 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@
@@ -480,6 +494,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -491,6 +506,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -529,6 +546,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -564,10 +582,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -593,6 +615,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -600,7 +625,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -629,6 +661,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -639,6 +672,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -669,17 +703,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -696,6 +729,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -734,6 +768,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -815,7 +850,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/geometrictransform/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/geometrictransform/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1276,20 +1310,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgeometrictransform -:SHARED libgstgeometrictransform \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgeometrictransform_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgeometrictransform_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgeometrictransform_la_LDFLAGS) \
-	           $(libgstgeometrictransform_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/hdvparse/Makefile.am b/gst/hdvparse/Makefile.am
index c3e05ea..ea9368a 100644
--- a/gst/hdvparse/Makefile.am
+++ b/gst/hdvparse/Makefile.am
@@ -10,17 +10,3 @@
 libgsthdvparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(LIBM)
 libgsthdvparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsthdvparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsthdvparse -:SHARED libgsthdvparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsthdvparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsthdvparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgsthdvparse_la_LDFLAGS) \
-	           $(libgsthdvparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/hdvparse/Makefile.in b/gst/hdvparse/Makefile.in
index af0ce2d..3231ccd 100644
--- a/gst/hdvparse/Makefile.in
+++ b/gst/hdvparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/hdvparse
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/hdvparse/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/hdvparse/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1060,20 +1094,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsthdvparse -:SHARED libgsthdvparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsthdvparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsthdvparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgsthdvparse_la_LDFLAGS) \
-	           $(libgsthdvparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/id3tag/Makefile.am b/gst/id3tag/Makefile.am
index ae7ab97..f497b4a 100644
--- a/gst/id3tag/Makefile.am
+++ b/gst/id3tag/Makefile.am
@@ -16,17 +16,3 @@
 libgstid3tag_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstid3mux.h id3tag.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstid3tag -:SHARED libgstid3tag \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstid3tag_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstid3tag_la_CFLAGS) \
-	 -:LDFLAGS $(libgstid3tag_la_LDFLAGS) \
-	           $(libgstid3tag_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/id3tag/Makefile.in b/gst/id3tag/Makefile.in
index 88171d2..a7a28f5 100644
--- a/gst/id3tag/Makefile.in
+++ b/gst/id3tag/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/id3tag
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -757,7 +792,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/id3tag/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/id3tag/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1074,20 +1108,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstid3tag -:SHARED libgstid3tag \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstid3tag_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstid3tag_la_CFLAGS) \
-	 -:LDFLAGS $(libgstid3tag_la_LDFLAGS) \
-	           $(libgstid3tag_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/id3tag/gstid3mux.c b/gst/id3tag/gstid3mux.c
index deb8213..89a8127 100644
--- a/gst/id3tag/gstid3mux.c
+++ b/gst/id3tag/gstid3mux.c
@@ -61,10 +61,10 @@
 
 enum
 {
-  ARG_0,
-  ARG_WRITE_V1,
-  ARG_WRITE_V2,
-  ARG_V2_MAJOR_VERSION
+  PROP_0,
+  PROP_WRITE_V1,
+  PROP_WRITE_V2,
+  PROP_V2_MAJOR_VERSION
 };
 
 #define DEFAULT_WRITE_V1 FALSE
@@ -102,17 +102,17 @@
   gobject_class->set_property = gst_id3_mux_set_property;
   gobject_class->get_property = gst_id3_mux_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_WRITE_V1,
+  g_object_class_install_property (gobject_class, PROP_WRITE_V1,
       g_param_spec_boolean ("write-v1", "Write id3v1 tag",
           "Write an id3v1 tag at the end of the file", DEFAULT_WRITE_V1,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_WRITE_V2,
+  g_object_class_install_property (gobject_class, PROP_WRITE_V2,
       g_param_spec_boolean ("write-v2", "Write id3v2 tag",
           "Write an id3v2 tag at the start of the file", DEFAULT_WRITE_V2,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_V2_MAJOR_VERSION,
+  g_object_class_install_property (gobject_class, PROP_V2_MAJOR_VERSION,
       g_param_spec_int ("v2-version", "Version (3 or 4) of id3v2 tag",
           "Set version (3 for id3v2.3, 4 for id3v2.4) of id3v2 tags",
           3, 4, DEFAULT_V2_MAJOR_VERSION,
@@ -152,13 +152,13 @@
   GstId3Mux *mux = GST_ID3_MUX (object);
 
   switch (prop_id) {
-    case ARG_WRITE_V1:
+    case PROP_WRITE_V1:
       mux->write_v1 = g_value_get_boolean (value);
       break;
-    case ARG_WRITE_V2:
+    case PROP_WRITE_V2:
       mux->write_v2 = g_value_get_boolean (value);
       break;
-    case ARG_V2_MAJOR_VERSION:
+    case PROP_V2_MAJOR_VERSION:
       mux->v2_major_version = g_value_get_int (value);
       break;
     default:
@@ -174,13 +174,13 @@
   GstId3Mux *mux = GST_ID3_MUX (object);
 
   switch (prop_id) {
-    case ARG_WRITE_V1:
+    case PROP_WRITE_V1:
       g_value_set_boolean (value, mux->write_v1);
       break;
-    case ARG_WRITE_V2:
+    case PROP_WRITE_V2:
       g_value_set_boolean (value, mux->write_v2);
       break;
-    case ARG_V2_MAJOR_VERSION:
+    case PROP_V2_MAJOR_VERSION:
       g_value_set_int (value, mux->v2_major_version);
       break;
     default:
diff --git a/gst/inter/Makefile.am b/gst/inter/Makefile.am
index 48480b5..773facf 100644
--- a/gst/inter/Makefile.am
+++ b/gst/inter/Makefile.am
@@ -48,17 +48,3 @@
 	$(GST_PLUGINS_BASE_LIBS) \
 	$(GST_LIBS) \
 	$(LIBM)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinter -:SHARED libgstinter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinter_la_LDFLAGS) \
-	           $(libgstinter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/inter/Makefile.in b/gst/inter/Makefile.in
index 5eeae43..3887bdc 100644
--- a/gst/inter/Makefile.in
+++ b/gst/inter/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = gstintertest$(EXEEXT)
 subdir = gst/inter
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -244,6 +254,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -261,8 +272,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -287,8 +300,6 @@
 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@
@@ -301,7 +312,6 @@
 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@
@@ -309,6 +319,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -335,11 +347,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -358,8 +373,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -418,10 +431,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -438,7 +455,6 @@
 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@
@@ -447,7 +463,6 @@
 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@
@@ -460,7 +475,6 @@
 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@
@@ -474,6 +488,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -485,6 +500,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -523,6 +540,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -558,10 +576,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -587,6 +609,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -594,7 +619,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -623,6 +655,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -633,6 +666,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -663,17 +697,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -690,6 +723,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -728,6 +762,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -804,7 +839,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/inter/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/inter/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1197,20 +1231,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinter -:SHARED libgstinter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinter_la_LDFLAGS) \
-	           $(libgstinter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c
index 1c6e56d..58e7832 100644
--- a/gst/inter/gstinteraudiosink.c
+++ b/gst/inter/gstinteraudiosink.c
@@ -51,8 +51,6 @@
 #define GST_CAT_DEFAULT gst_inter_audio_sink_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_audio_sink_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_audio_sink_get_property (GObject * object,
@@ -63,8 +61,14 @@
     GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
 static gboolean gst_inter_audio_sink_start (GstBaseSink * sink);
 static gboolean gst_inter_audio_sink_stop (GstBaseSink * sink);
+static gboolean gst_inter_audio_sink_set_caps (GstBaseSink * sink,
+    GstCaps * caps);
+static gboolean gst_inter_audio_sink_event (GstBaseSink * sink,
+    GstEvent * event);
 static GstFlowReturn gst_inter_audio_sink_render (GstBaseSink * sink,
     GstBuffer * buffer);
+static gboolean gst_inter_audio_sink_query (GstBaseSink * sink,
+    GstQuery * query);
 
 enum
 {
@@ -72,20 +76,18 @@
   PROP_CHANNEL
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_audio_sink_sink_template =
 GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
-        "rate = (int) 48000, channels = (int) 2")
+    GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL))
     );
 
-
 /* class initialization */
-
-
+#define parent_class gst_inter_audio_sink_parent_class
 G_DEFINE_TYPE (GstInterAudioSink, gst_inter_audio_sink, GST_TYPE_BASE_SINK);
 
 static void
@@ -113,18 +115,22 @@
       GST_DEBUG_FUNCPTR (gst_inter_audio_sink_get_times);
   base_sink_class->start = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_start);
   base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_stop);
+  base_sink_class->event = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_event);
+  base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_set_caps);
   base_sink_class->render = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_render);
+  base_sink_class->query = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_query);
 
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
 gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink)
 {
-  interaudiosink->channel = g_strdup ("default");
+  interaudiosink->channel = g_strdup (DEFAULT_CHANNEL);
+  interaudiosink->input_adapter = gst_adapter_new ();
 }
 
 void
@@ -167,11 +173,11 @@
 
   /* clean up object here */
   g_free (interaudiosink->channel);
+  gst_object_unref (interaudiosink->input_adapter);
 
   G_OBJECT_CLASS (gst_inter_audio_sink_parent_class)->finalize (object);
 }
 
-
 static void
 gst_inter_audio_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
     GstClockTime * start, GstClockTime * end)
@@ -183,15 +189,13 @@
     if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
       *end = *start + GST_BUFFER_DURATION (buffer);
     } else {
-      if (interaudiosink->fps_n > 0) {
+      if (interaudiosink->info.rate > 0) {
         *end = *start +
-            gst_util_uint64_scale_int (GST_SECOND, interaudiosink->fps_d,
-            interaudiosink->fps_n);
+            gst_util_uint64_scale_int (gst_buffer_get_size (buffer), GST_SECOND,
+            interaudiosink->info.rate * interaudiosink->info.bpf);
       }
     }
   }
-
-
 }
 
 static gboolean
@@ -199,9 +203,17 @@
 {
   GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
 
-  GST_DEBUG ("start");
+  GST_DEBUG_OBJECT (interaudiosink, "start");
 
   interaudiosink->surface = gst_inter_surface_get (interaudiosink->channel);
+  g_mutex_lock (&interaudiosink->surface->mutex);
+  memset (&interaudiosink->surface->audio_info, 0, sizeof (GstAudioInfo));
+
+  /* We want to write latency-time before syncing has happened */
+  /* FIXME: The other side can change this value when it starts */
+  gst_base_sink_set_render_delay (sink,
+      interaudiosink->surface->audio_latency_time);
+  g_mutex_unlock (&interaudiosink->surface->mutex);
 
   return TRUE;
 }
@@ -211,38 +223,182 @@
 {
   GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
 
-  GST_DEBUG ("stop");
+  GST_DEBUG_OBJECT (interaudiosink, "stop");
 
   g_mutex_lock (&interaudiosink->surface->mutex);
   gst_adapter_clear (interaudiosink->surface->audio_adapter);
+  memset (&interaudiosink->surface->audio_info, 0, sizeof (GstAudioInfo));
   g_mutex_unlock (&interaudiosink->surface->mutex);
 
   gst_inter_surface_unref (interaudiosink->surface);
   interaudiosink->surface = NULL;
 
+  gst_adapter_clear (interaudiosink->input_adapter);
+
   return TRUE;
 }
 
+static gboolean
+gst_inter_audio_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
+{
+  GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
+  GstAudioInfo info;
+
+  if (!gst_audio_info_from_caps (&info, caps)) {
+    GST_ERROR_OBJECT (sink, "Failed to parse caps %" GST_PTR_FORMAT, caps);
+    return FALSE;
+  }
+
+  g_mutex_lock (&interaudiosink->surface->mutex);
+  interaudiosink->surface->audio_info = info;
+  interaudiosink->info = info;
+  /* TODO: Ideally we would drain the source here */
+  gst_adapter_clear (interaudiosink->surface->audio_adapter);
+  g_mutex_unlock (&interaudiosink->surface->mutex);
+
+  return TRUE;
+}
+
+static gboolean
+gst_inter_audio_sink_event (GstBaseSink * sink, GstEvent * event)
+{
+  GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_EOS:{
+      GstBuffer *tmp;
+      guint n;
+
+      if ((n = gst_adapter_available (interaudiosink->input_adapter)) > 0) {
+        g_mutex_lock (&interaudiosink->surface->mutex);
+        tmp = gst_adapter_take_buffer (interaudiosink->input_adapter, n);
+        gst_adapter_push (interaudiosink->surface->audio_adapter, tmp);
+        g_mutex_unlock (&interaudiosink->surface->mutex);
+      }
+      break;
+    }
+    default:
+      break;
+  }
+
+  return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
+}
+
 static GstFlowReturn
 gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
 {
   GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
-  int n;
+  guint n, bpf;
+  guint64 period_time, buffer_time;
+  guint64 period_samples, buffer_samples;
 
-  GST_DEBUG ("render %" G_GSIZE_FORMAT, gst_buffer_get_size (buffer));
+  GST_DEBUG_OBJECT (interaudiosink, "render %" G_GSIZE_FORMAT,
+      gst_buffer_get_size (buffer));
+  bpf = interaudiosink->info.bpf;
 
   g_mutex_lock (&interaudiosink->surface->mutex);
-  n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4;
-#define SIZE 1600
-  if (n > (SIZE * 3)) {
-    int n_chunks = (n / (SIZE / 2)) - 4;
-    GST_WARNING ("flushing %d samples", n_chunks * 800);
-    gst_adapter_flush (interaudiosink->surface->audio_adapter,
-        n_chunks * (SIZE / 2) * 4);
+
+  buffer_time = interaudiosink->surface->audio_buffer_time;
+  period_time = interaudiosink->surface->audio_period_time;
+
+  if (buffer_time < period_time) {
+    GST_ERROR_OBJECT (interaudiosink,
+        "Buffer time smaller than period time (%" GST_TIME_FORMAT " < %"
+        GST_TIME_FORMAT ")", GST_TIME_ARGS (buffer_time),
+        GST_TIME_ARGS (period_time));
+    g_mutex_unlock (&interaudiosink->surface->mutex);
+    return GST_FLOW_ERROR;
   }
-  gst_adapter_push (interaudiosink->surface->audio_adapter,
-      gst_buffer_ref (buffer));
+
+  buffer_samples =
+      gst_util_uint64_scale (buffer_time, interaudiosink->info.rate,
+      GST_SECOND);
+  period_samples =
+      gst_util_uint64_scale (period_time, interaudiosink->info.rate,
+      GST_SECOND);
+
+  n = gst_adapter_available (interaudiosink->surface->audio_adapter) / bpf;
+  while (n > buffer_samples) {
+    GST_DEBUG_OBJECT (interaudiosink, "flushing %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (period_time));
+    gst_adapter_flush (interaudiosink->surface->audio_adapter,
+        period_samples * bpf);
+    n -= period_samples;
+  }
+
+  n = gst_adapter_available (interaudiosink->input_adapter);
+  if (period_samples * bpf > gst_buffer_get_size (buffer) + n) {
+    gst_adapter_push (interaudiosink->input_adapter, gst_buffer_ref (buffer));
+  } else {
+    GstBuffer *tmp;
+
+    if (n > 0) {
+      tmp = gst_adapter_take_buffer (interaudiosink->input_adapter, n);
+      gst_adapter_push (interaudiosink->surface->audio_adapter, tmp);
+    }
+    gst_adapter_push (interaudiosink->surface->audio_adapter,
+        gst_buffer_ref (buffer));
+  }
   g_mutex_unlock (&interaudiosink->surface->mutex);
 
   return GST_FLOW_OK;
 }
+
+static gboolean
+gst_inter_audio_sink_query (GstBaseSink * sink, GstQuery * query)
+{
+  GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
+  gboolean ret;
+
+  GST_DEBUG_OBJECT (sink, "query");
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_LATENCY:{
+      gboolean live, us_live;
+      GstClockTime min_l, max_l;
+
+      GST_DEBUG_OBJECT (sink, "latency query");
+
+      if ((ret =
+              gst_base_sink_query_latency (GST_BASE_SINK_CAST (sink), &live,
+                  &us_live, &min_l, &max_l))) {
+        GstClockTime base_latency, min_latency, max_latency;
+
+        /* we and upstream are both live, adjust the min_latency */
+        if (live && us_live) {
+          /* FIXME: The other side can change this value when it starts */
+          base_latency = interaudiosink->surface->audio_latency_time;
+
+          /* we cannot go lower than the buffer size and the min peer latency */
+          min_latency = base_latency + min_l;
+          /* the max latency is the max of the peer, we can delay an infinite
+           * amount of time. */
+          max_latency = (max_l == -1) ? -1 : (base_latency + max_l);
+
+          GST_DEBUG_OBJECT (sink,
+              "peer min %" GST_TIME_FORMAT ", our min latency: %"
+              GST_TIME_FORMAT, GST_TIME_ARGS (min_l),
+              GST_TIME_ARGS (min_latency));
+          GST_DEBUG_OBJECT (sink,
+              "peer max %" GST_TIME_FORMAT ", our max latency: %"
+              GST_TIME_FORMAT, GST_TIME_ARGS (max_l),
+              GST_TIME_ARGS (max_latency));
+        } else {
+          GST_DEBUG_OBJECT (sink,
+              "peer or we are not live, don't care about latency");
+          min_latency = min_l;
+          max_latency = max_l;
+        }
+        gst_query_set_latency (query, live, min_latency, max_latency);
+      }
+      break;
+    }
+    default:
+      ret =
+          GST_BASE_SINK_CLASS (gst_inter_audio_sink_parent_class)->query (sink,
+          query);
+      break;
+  }
+
+  return ret;
+}
diff --git a/gst/inter/gstinteraudiosink.h b/gst/inter/gstinteraudiosink.h
index a85d66a..8f8c9a2 100644
--- a/gst/inter/gstinteraudiosink.h
+++ b/gst/inter/gstinteraudiosink.h
@@ -41,8 +41,8 @@
   GstInterSurface *surface;
   char *channel;
 
-  int fps_n;
-  int fps_d;
+  GstAdapter *input_adapter;
+  GstAudioInfo info;
 };
 
 struct _GstInterAudioSinkClass
diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c
index cab0eb6..2eeff65 100644
--- a/gst/inter/gstinteraudiosrc.c
+++ b/gst/inter/gstinteraudiosrc.c
@@ -51,14 +51,14 @@
 #define GST_CAT_DEFAULT gst_inter_audio_src_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_audio_src_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_audio_src_get_property (GObject * object,
     guint property_id, GValue * value, GParamSpec * pspec);
 static void gst_inter_audio_src_finalize (GObject * object);
 
+static GstCaps *gst_inter_audio_src_get_caps (GstBaseSrc * src,
+    GstCaps * filter);
 static gboolean gst_inter_audio_src_set_caps (GstBaseSrc * src, GstCaps * caps);
 static gboolean gst_inter_audio_src_start (GstBaseSrc * src);
 static gboolean gst_inter_audio_src_stop (GstBaseSrc * src);
@@ -74,22 +74,26 @@
 enum
 {
   PROP_0,
-  PROP_CHANNEL
+  PROP_CHANNEL,
+  PROP_BUFFER_TIME,
+  PROP_LATENCY_TIME,
+  PROP_PERIOD_TIME
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_audio_src_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
-        "rate = (int) 48000, channels = (int) 2")
+    GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL)
+        ", layout = (string) interleaved")
     );
 
 
 /* class initialization */
-
+#define parent_class gst_inter_audio_src_parent_class
 G_DEFINE_TYPE (GstInterAudioSrc, gst_inter_audio_src, GST_TYPE_BASE_SRC);
 
 static void
@@ -114,6 +118,7 @@
   gobject_class->set_property = gst_inter_audio_src_set_property;
   gobject_class->get_property = gst_inter_audio_src_get_property;
   gobject_class->finalize = gst_inter_audio_src_finalize;
+  base_src_class->get_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_src_get_caps);
   base_src_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_src_set_caps);
   base_src_class->start = GST_DEBUG_FUNCPTR (gst_inter_audio_src_start);
   base_src_class->stop = GST_DEBUG_FUNCPTR (gst_inter_audio_src_stop);
@@ -125,7 +130,24 @@
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_BUFFER_TIME,
+      g_param_spec_uint64 ("buffer-time", "Buffer Time",
+          "Size of audio buffer", 1, G_MAXUINT64, DEFAULT_AUDIO_BUFFER_TIME,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_LATENCY_TIME,
+      g_param_spec_uint64 ("latency-time", "Latency Time",
+          "Latency as reported by the source",
+          1, G_MAXUINT64, DEFAULT_AUDIO_LATENCY_TIME,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_PERIOD_TIME,
+      g_param_spec_uint64 ("period-time", "Period Time",
+          "The minimum amount of data to read in each iteration",
+          1, G_MAXUINT64, DEFAULT_AUDIO_PERIOD_TIME,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -135,7 +157,10 @@
   gst_base_src_set_live (GST_BASE_SRC (interaudiosrc), TRUE);
   gst_base_src_set_blocksize (GST_BASE_SRC (interaudiosrc), -1);
 
-  interaudiosrc->channel = g_strdup ("default");
+  interaudiosrc->channel = g_strdup (DEFAULT_CHANNEL);
+  interaudiosrc->buffer_time = DEFAULT_AUDIO_BUFFER_TIME;
+  interaudiosrc->latency_time = DEFAULT_AUDIO_LATENCY_TIME;
+  interaudiosrc->period_time = DEFAULT_AUDIO_PERIOD_TIME;
 }
 
 void
@@ -149,6 +174,15 @@
       g_free (interaudiosrc->channel);
       interaudiosrc->channel = g_value_dup_string (value);
       break;
+    case PROP_BUFFER_TIME:
+      interaudiosrc->buffer_time = g_value_get_uint64 (value);
+      break;
+    case PROP_LATENCY_TIME:
+      interaudiosrc->latency_time = g_value_get_uint64 (value);
+      break;
+    case PROP_PERIOD_TIME:
+      interaudiosrc->period_time = g_value_get_uint64 (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -165,6 +199,15 @@
     case PROP_CHANNEL:
       g_value_set_string (value, interaudiosrc->channel);
       break;
+    case PROP_BUFFER_TIME:
+      g_value_set_uint64 (value, interaudiosrc->buffer_time);
+      break;
+    case PROP_LATENCY_TIME:
+      g_value_set_uint64 (value, interaudiosrc->latency_time);
+      break;
+    case PROP_PERIOD_TIME:
+      g_value_set_uint64 (value, interaudiosrc->period_time);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -182,39 +225,53 @@
   G_OBJECT_CLASS (gst_inter_audio_src_parent_class)->finalize (object);
 }
 
+static GstCaps *
+gst_inter_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter)
+{
+  GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
+  GstCaps *caps;
+
+  GST_DEBUG_OBJECT (interaudiosrc, "get_caps");
+
+  if (!interaudiosrc->surface)
+    return GST_BASE_SRC_CLASS (parent_class)->get_caps (src, filter);
+
+  g_mutex_lock (&interaudiosrc->surface->mutex);
+  if (interaudiosrc->surface->audio_info.finfo) {
+    caps = gst_audio_info_to_caps (&interaudiosrc->surface->audio_info);
+    if (filter) {
+      GstCaps *tmp;
+
+      tmp = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+      gst_caps_unref (caps);
+      caps = tmp;
+    }
+  } else {
+    caps = NULL;
+  }
+  g_mutex_unlock (&interaudiosrc->surface->mutex);
+
+  if (caps)
+    return caps;
+  else
+    return GST_BASE_SRC_CLASS (parent_class)->get_caps (src, filter);
+}
+
 static gboolean
 gst_inter_audio_src_set_caps (GstBaseSrc * src, GstCaps * caps)
 {
   GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
-  const GstStructure *structure;
-  GstAudioInfo info;
-  gboolean ret;
-  int sample_rate;
 
   GST_DEBUG_OBJECT (interaudiosrc, "set_caps");
 
-  structure = gst_caps_get_structure (caps, 0);
-
-  if (!gst_structure_get_int (structure, "rate", &sample_rate)) {
-    GST_ERROR_OBJECT (src, "Audio caps without rate");
+  if (!gst_audio_info_from_caps (&interaudiosrc->info, caps)) {
+    GST_ERROR_OBJECT (src, "Failed to parse caps %" GST_PTR_FORMAT, caps);
     return FALSE;
   }
 
-  interaudiosrc->sample_rate = sample_rate;
-
-  if (!gst_audio_info_from_caps (&info, caps)) {
-    GST_ERROR_OBJECT (src, "Can't parse audio caps");
-    return FALSE;
-  }
-
-  interaudiosrc->finfo = info.finfo;
-
-  ret = gst_pad_set_caps (src->srcpad, caps);
-
-  return ret;
+  return TRUE;
 }
 
-
 static gboolean
 gst_inter_audio_src_start (GstBaseSrc * src)
 {
@@ -223,6 +280,14 @@
   GST_DEBUG_OBJECT (interaudiosrc, "start");
 
   interaudiosrc->surface = gst_inter_surface_get (interaudiosrc->channel);
+  interaudiosrc->timestamp_offset = 0;
+  interaudiosrc->n_samples = 0;
+
+  g_mutex_lock (&interaudiosrc->surface->mutex);
+  interaudiosrc->surface->audio_buffer_time = interaudiosrc->buffer_time;
+  interaudiosrc->surface->audio_latency_time = interaudiosrc->latency_time;
+  interaudiosrc->surface->audio_period_time = interaudiosrc->period_time;
+  g_mutex_unlock (&interaudiosrc->surface->mutex);
 
   return TRUE;
 }
@@ -236,7 +301,6 @@
 
   gst_inter_surface_unref (interaudiosrc->surface);
   interaudiosrc->surface = NULL;
-  interaudiosrc->finfo = NULL;
 
   return TRUE;
 }
@@ -245,86 +309,117 @@
 gst_inter_audio_src_get_times (GstBaseSrc * src, GstBuffer * buffer,
     GstClockTime * start, GstClockTime * end)
 {
+  GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
+
   GST_DEBUG_OBJECT (src, "get_times");
 
   /* for live sources, sync on the timestamp of the buffer */
   if (gst_base_src_is_live (src)) {
-    GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buffer);
-
-    if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
-      /* get duration to calculate end time */
-      GstClockTime duration = GST_BUFFER_DURATION (buffer);
-
-      if (GST_CLOCK_TIME_IS_VALID (duration)) {
-        *end = timestamp + duration;
+    if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
+      *start = GST_BUFFER_TIMESTAMP (buffer);
+      if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
+        *end = *start + GST_BUFFER_DURATION (buffer);
+      } else {
+        if (interaudiosrc->info.rate > 0) {
+          *end = *start +
+              gst_util_uint64_scale_int (gst_buffer_get_size (buffer),
+              GST_SECOND, interaudiosrc->info.rate * interaudiosrc->info.bpf);
+        }
       }
-      *start = timestamp;
     }
-  } else {
-    *start = -1;
-    *end = -1;
   }
 }
 
-
-#define SIZE 1600
-
 static GstFlowReturn
 gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
     GstBuffer ** buf)
 {
   GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
+  GstCaps *caps;
   GstBuffer *buffer;
-  int n;
+  guint n, bpf;
+  guint64 period_time;
+  guint64 period_samples;
 
   GST_DEBUG_OBJECT (interaudiosrc, "create");
 
   buffer = NULL;
+  caps = NULL;
 
   g_mutex_lock (&interaudiosrc->surface->mutex);
-  n = gst_adapter_available (interaudiosrc->surface->audio_adapter) / 4;
-  if (n > SIZE * 3) {
-    GST_WARNING ("flushing %d samples", SIZE / 2);
-    gst_adapter_flush (interaudiosrc->surface->audio_adapter, (SIZE / 2) * 4);
-    n -= (SIZE / 2);
+  if (interaudiosrc->surface->audio_info.finfo) {
+    if (!gst_audio_info_is_equal (&interaudiosrc->surface->audio_info,
+            &interaudiosrc->info)) {
+      caps = gst_audio_info_to_caps (&interaudiosrc->surface->audio_info);
+      interaudiosrc->timestamp_offset +=
+          gst_util_uint64_scale (interaudiosrc->n_samples, GST_SECOND,
+          interaudiosrc->info.rate);
+      interaudiosrc->n_samples = 0;
+    }
   }
-  if (n > SIZE)
-    n = SIZE;
+
+  bpf = interaudiosrc->surface->audio_info.bpf;
+  period_time = interaudiosrc->surface->audio_period_time;
+  period_samples =
+      gst_util_uint64_scale (period_time, interaudiosrc->info.rate, GST_SECOND);
+
+  if (bpf > 0)
+    n = gst_adapter_available (interaudiosrc->surface->audio_adapter) / bpf;
+  else
+    n = 0;
+
+  if (n > period_samples)
+    n = period_samples;
   if (n > 0) {
     buffer = gst_adapter_take_buffer (interaudiosrc->surface->audio_adapter,
-        n * 4);
+        n * bpf);
   } else {
     buffer = gst_buffer_new ();
+    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_GAP);
   }
   g_mutex_unlock (&interaudiosrc->surface->mutex);
 
-  if (n < SIZE) {
+  if (caps) {
+    gboolean ret = gst_base_src_set_caps (src, caps);
+    gst_caps_unref (caps);
+    if (!ret) {
+      GST_ERROR_OBJECT (src, "Failed to set caps %" GST_PTR_FORMAT, caps);
+      if (buffer)
+        gst_buffer_unref (buffer);
+      return GST_FLOW_NOT_NEGOTIATED;
+    }
+  }
+
+  buffer = gst_buffer_make_writable (buffer);
+
+  bpf = interaudiosrc->info.bpf;
+  if (n < period_samples) {
     GstMapInfo map;
     GstMemory *mem;
 
-    GST_WARNING ("creating %d samples of silence", SIZE - n);
-    mem = gst_allocator_alloc (NULL, (SIZE - n) * 4, NULL);
+    GST_DEBUG_OBJECT (interaudiosrc,
+        "creating %" G_GUINT64_FORMAT " samples of silence",
+        period_samples - n);
+    mem = gst_allocator_alloc (NULL, (period_samples - n) * bpf, NULL);
     if (gst_memory_map (mem, &map, GST_MAP_WRITE)) {
-      gst_audio_format_fill_silence (interaudiosrc->finfo, map.data, map.size);
+      gst_audio_format_fill_silence (interaudiosrc->info.finfo, map.data,
+          map.size);
       gst_memory_unmap (mem, &map);
     }
-    buffer = gst_buffer_make_writable (buffer);
     gst_buffer_prepend_memory (buffer, mem);
   }
-  n = SIZE;
+  n = period_samples;
 
   GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples;
   GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n;
-  GST_BUFFER_TIMESTAMP (buffer) =
-      gst_util_uint64_scale_int (interaudiosrc->n_samples, GST_SECOND,
-      interaudiosrc->sample_rate);
+  GST_BUFFER_TIMESTAMP (buffer) = interaudiosrc->timestamp_offset +
+      gst_util_uint64_scale (interaudiosrc->n_samples, GST_SECOND,
+      interaudiosrc->info.rate);
   GST_DEBUG_OBJECT (interaudiosrc, "create ts %" GST_TIME_FORMAT,
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
-  GST_BUFFER_DURATION (buffer) =
-      gst_util_uint64_scale_int (interaudiosrc->n_samples + n, GST_SECOND,
-      interaudiosrc->sample_rate) - GST_BUFFER_TIMESTAMP (buffer);
-  GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples;
-  GST_BUFFER_OFFSET_END (buffer) = -1;
+  GST_BUFFER_DURATION (buffer) = interaudiosrc->timestamp_offset +
+      gst_util_uint64_scale (interaudiosrc->n_samples + n, GST_SECOND,
+      interaudiosrc->info.rate) - GST_BUFFER_TIMESTAMP (buffer);
   GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
   if (interaudiosrc->n_samples == 0) {
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
@@ -336,10 +431,10 @@
   return GST_FLOW_OK;
 }
 
-
 static gboolean
 gst_inter_audio_src_query (GstBaseSrc * src, GstQuery * query)
 {
+  GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
   gboolean ret;
 
   GST_DEBUG_OBJECT (src, "query");
@@ -348,11 +443,10 @@
     case GST_QUERY_LATENCY:{
       GstClockTime min_latency, max_latency;
 
-      min_latency = 30 * gst_util_uint64_scale_int (GST_SECOND, SIZE, 48000);
+      min_latency = interaudiosrc->latency_time;
+      max_latency = interaudiosrc->buffer_time;
 
-      max_latency = min_latency;
-
-      GST_ERROR_OBJECT (src,
+      GST_DEBUG_OBJECT (src,
           "report latency min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
           GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
 
@@ -379,11 +473,14 @@
   GST_DEBUG_OBJECT (src, "fixate");
 
   caps = gst_caps_make_writable (caps);
+  caps = gst_caps_truncate (caps);
 
   structure = gst_caps_get_structure (caps, 0);
 
+  gst_structure_fixate_field_string (structure, "format", GST_AUDIO_NE (S16));
   gst_structure_fixate_field_nearest_int (structure, "channels", 2);
   gst_structure_fixate_field_nearest_int (structure, "rate", 48000);
+  gst_structure_fixate_field_string (structure, "layout", "interleaved");
 
   return caps;
 }
diff --git a/gst/inter/gstinteraudiosrc.h b/gst/inter/gstinteraudiosrc.h
index 318bb39..131b2af 100644
--- a/gst/inter/gstinteraudiosrc.h
+++ b/gst/inter/gstinteraudiosrc.h
@@ -43,9 +43,9 @@
   char *channel;
 
   guint64 n_samples;
-  int sample_rate;
-
-  const GstAudioFormatInfo *finfo;
+  GstClockTime timestamp_offset;
+  GstAudioInfo info;
+  guint64 buffer_time, latency_time, period_time;
 };
 
 struct _GstInterAudioSrcClass
diff --git a/gst/inter/gstintersubsink.c b/gst/inter/gstintersubsink.c
index eaa12f7..b907c0a 100644
--- a/gst/inter/gstintersubsink.c
+++ b/gst/inter/gstintersubsink.c
@@ -47,8 +47,6 @@
 #define GST_CAT_DEFAULT gst_inter_sub_sink_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_sub_sink_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_sub_sink_get_property (GObject * object,
@@ -68,8 +66,9 @@
   PROP_CHANNEL
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_sub_sink_sink_template =
 GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
@@ -112,14 +111,13 @@
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
 gst_inter_sub_sink_init (GstInterSubSink * intersubsink)
 {
-  intersubsink->channel = g_strdup ("default");
+  intersubsink->channel = g_strdup (DEFAULT_CHANNEL);
 
   intersubsink->fps_n = 1;
   intersubsink->fps_d = 1;
@@ -169,7 +167,6 @@
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-
 static void
 gst_inter_sub_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
     GstClockTime * start, GstClockTime * end)
@@ -188,8 +185,6 @@
       }
     }
   }
-
-
 }
 
 static gboolean
diff --git a/gst/inter/gstintersubsrc.c b/gst/inter/gstintersubsrc.c
index 3b6cc60..24efc9f 100644
--- a/gst/inter/gstintersubsrc.c
+++ b/gst/inter/gstintersubsrc.c
@@ -48,8 +48,6 @@
 #define GST_CAT_DEFAULT gst_inter_sub_src_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_sub_src_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_sub_src_get_property (GObject * object,
@@ -71,8 +69,9 @@
   PROP_CHANNEL
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_sub_src_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
@@ -114,7 +113,7 @@
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -123,7 +122,7 @@
   gst_base_src_set_format (GST_BASE_SRC (intersubsrc), GST_FORMAT_TIME);
   gst_base_src_set_live (GST_BASE_SRC (intersubsrc), TRUE);
 
-  intersubsrc->channel = g_strdup ("default");
+  intersubsrc->channel = g_strdup (DEFAULT_CHANNEL);
 }
 
 void
@@ -220,7 +219,6 @@
   }
 }
 
-
 static GstFlowReturn
 gst_inter_sub_src_create (GstBaseSrc * src, guint64 offset, guint size,
     GstBuffer ** buf)
diff --git a/gst/inter/gstintersurface.c b/gst/inter/gstintersurface.c
index d5b0cbd..70dc0a7 100644
--- a/gst/inter/gstintersurface.c
+++ b/gst/inter/gstintersurface.c
@@ -28,7 +28,6 @@
 static GList *list;
 static GMutex mutex;
 
-
 GstInterSurface *
 gst_inter_surface_get (const char *name)
 {
@@ -36,19 +35,23 @@
   GstInterSurface *surface;
 
   g_mutex_lock (&mutex);
-
   for (g = list; g; g = g_list_next (g)) {
-    surface = (GstInterSurface *) g->data;
+    surface = g->data;
     if (strcmp (name, surface->name) == 0) {
+      surface->ref_count++;
       g_mutex_unlock (&mutex);
       return surface;
     }
   }
 
   surface = g_malloc0 (sizeof (GstInterSurface));
+  surface->ref_count = 1;
   surface->name = g_strdup (name);
   g_mutex_init (&surface->mutex);
   surface->audio_adapter = gst_adapter_new ();
+  surface->audio_buffer_time = DEFAULT_AUDIO_BUFFER_TIME;
+  surface->audio_latency_time = DEFAULT_AUDIO_LATENCY_TIME;
+  surface->audio_period_time = DEFAULT_AUDIO_PERIOD_TIME;
 
   list = g_list_append (list, surface);
   g_mutex_unlock (&mutex);
@@ -59,5 +62,27 @@
 void
 gst_inter_surface_unref (GstInterSurface * surface)
 {
+  /* Mutex needed here, otherwise refcount might become 0
+   * and someone else requests the same surface again before
+   * we remove it from the list */
+  g_mutex_lock (&mutex);
+  if ((--surface->ref_count) == 0) {
+    GList *g;
 
+    for (g = list; g; g = g_list_next (g)) {
+      GstInterSurface *tmp = g->data;
+      if (strcmp (tmp->name, surface->name) == 0) {
+        list = g_list_delete_link (list, g);
+        break;
+      }
+    }
+
+    g_mutex_clear (&surface->mutex);
+    gst_buffer_replace (&surface->video_buffer, NULL);
+    gst_buffer_replace (&surface->sub_buffer, NULL);
+    gst_object_unref (surface->audio_adapter);
+    g_free (surface->name);
+    g_free (surface);
+  }
+  g_mutex_unlock (&mutex);
 }
diff --git a/gst/inter/gstintersurface.h b/gst/inter/gstintersurface.h
index 160f27e..13842f0 100644
--- a/gst/inter/gstintersurface.h
+++ b/gst/inter/gstintersurface.h
@@ -21,6 +21,7 @@
 #define _GST_INTER_SURFACE_H_
 
 #include <gst/base/gstadapter.h>
+#include <gst/audio/audio.h>
 #include <gst/video/video.h>
 
 G_BEGIN_DECLS
@@ -30,26 +31,29 @@
 struct _GstInterSurface
 {
   GMutex mutex;
+  gint ref_count;
+
   char *name;
 
   /* video */
-  GstVideoFormat format;
-  int fps_n;
-  int fps_d;
-  int width;
-  int height;
-  int n_frames;
+  GstVideoInfo video_info;
   int video_buffer_count;
 
   /* audio */
-  int sample_rate;
-  int n_channels;
+  GstAudioInfo audio_info;
+  guint64 audio_buffer_time;
+  guint64 audio_latency_time;
+  guint64 audio_period_time;
 
   GstBuffer *video_buffer;
   GstBuffer *sub_buffer;
   GstAdapter *audio_adapter;
 };
 
+#define DEFAULT_AUDIO_BUFFER_TIME  (GST_SECOND)
+#define DEFAULT_AUDIO_LATENCY_TIME (100 * GST_MSECOND)
+#define DEFAULT_AUDIO_PERIOD_TIME  (25 * GST_MSECOND)
+
 
 GstInterSurface * gst_inter_surface_get (const char *name);
 void gst_inter_surface_unref (GstInterSurface *surface);
diff --git a/gst/inter/gstintertest.c b/gst/inter/gstintertest.c
index 00f0bc0..cff4f0d 100644
--- a/gst/inter/gstintertest.c
+++ b/gst/inter/gstintertest.c
@@ -80,11 +80,6 @@
   GstInterTest *intertest2;
   GMainLoop *main_loop;
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-  if (!g_thread_supported ())
-    g_thread_init (NULL);
-#endif
-
   context = g_option_context_new ("- Internal src/sink test");
   g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
   g_option_context_add_group (context, gst_init_get_option_group ());
@@ -135,6 +130,11 @@
     intertest->sink_element = NULL;
   }
 
+  if (intertest->bus) {
+    gst_object_unref (intertest->bus);
+    intertest->bus = NULL;
+  }
+
   if (intertest->pipeline) {
     gst_element_set_state (intertest->pipeline, GST_STATE_NULL);
     gst_object_unref (intertest->pipeline);
diff --git a/gst/inter/gstintervideosink.c b/gst/inter/gstintervideosink.c
index ca63bce..aebce28 100644
--- a/gst/inter/gstintervideosink.c
+++ b/gst/inter/gstintervideosink.c
@@ -40,17 +40,14 @@
 #include "config.h"
 #endif
 
-#include <gst/gst.h>
-#include <gst/base/gstbasesink.h>
-#include <gst/video/video.h>
 #include "gstintervideosink.h"
 
+#include <string.h>
+
 GST_DEBUG_CATEGORY_STATIC (gst_inter_video_sink_debug_category);
 #define GST_CAT_DEFAULT gst_inter_video_sink_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_video_sink_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_video_sink_get_property (GObject * object,
@@ -61,7 +58,9 @@
     GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
 static gboolean gst_inter_video_sink_start (GstBaseSink * sink);
 static gboolean gst_inter_video_sink_stop (GstBaseSink * sink);
-static GstFlowReturn gst_inter_video_sink_render (GstBaseSink * sink,
+static gboolean gst_inter_video_sink_set_caps (GstBaseSink * sink,
+    GstCaps * caps);
+static GstFlowReturn gst_inter_video_sink_show_frame (GstVideoSink * sink,
     GstBuffer * buffer);
 
 enum
@@ -70,19 +69,19 @@
   PROP_CHANNEL
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_video_sink_sink_template =
 GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))
     );
 
 
 /* class initialization */
-
-G_DEFINE_TYPE (GstInterVideoSink, gst_inter_video_sink, GST_TYPE_BASE_SINK);
+G_DEFINE_TYPE (GstInterVideoSink, gst_inter_video_sink, GST_TYPE_VIDEO_SINK);
 
 static void
 gst_inter_video_sink_class_init (GstInterVideoSinkClass * klass)
@@ -90,6 +89,7 @@
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
   GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
+  GstVideoSinkClass *video_sink_class = GST_VIDEO_SINK_CLASS (klass);
 
   GST_DEBUG_CATEGORY_INIT (gst_inter_video_sink_debug_category,
       "intervideosink", 0, "debug category for intervideosink element");
@@ -110,18 +110,20 @@
       GST_DEBUG_FUNCPTR (gst_inter_video_sink_get_times);
   base_sink_class->start = GST_DEBUG_FUNCPTR (gst_inter_video_sink_start);
   base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_inter_video_sink_stop);
-  base_sink_class->render = GST_DEBUG_FUNCPTR (gst_inter_video_sink_render);
+  base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_video_sink_set_caps);
+  video_sink_class->show_frame =
+      GST_DEBUG_FUNCPTR (gst_inter_video_sink_show_frame);
 
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
 gst_inter_video_sink_init (GstInterVideoSink * intervideosink)
 {
-  intervideosink->channel = g_strdup ("default");
+  intervideosink->channel = g_strdup (DEFAULT_CHANNEL);
 }
 
 void
@@ -180,15 +182,13 @@
     if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
       *end = *start + GST_BUFFER_DURATION (buffer);
     } else {
-      if (intervideosink->fps_n > 0) {
+      if (intervideosink->info.fps_n > 0) {
         *end = *start +
-            gst_util_uint64_scale_int (GST_SECOND, intervideosink->fps_d,
-            intervideosink->fps_n);
+            gst_util_uint64_scale_int (GST_SECOND, intervideosink->info.fps_d,
+            intervideosink->info.fps_n);
       }
     }
   }
-
-
 }
 
 static gboolean
@@ -197,6 +197,9 @@
   GstInterVideoSink *intervideosink = GST_INTER_VIDEO_SINK (sink);
 
   intervideosink->surface = gst_inter_surface_get (intervideosink->channel);
+  g_mutex_lock (&intervideosink->surface->mutex);
+  memset (&intervideosink->surface->video_info, 0, sizeof (GstVideoInfo));
+  g_mutex_unlock (&intervideosink->surface->mutex);
 
   return TRUE;
 }
@@ -211,6 +214,7 @@
     gst_buffer_unref (intervideosink->surface->video_buffer);
   }
   intervideosink->surface->video_buffer = NULL;
+  memset (&intervideosink->surface->video_info, 0, sizeof (GstVideoInfo));
   g_mutex_unlock (&intervideosink->surface->mutex);
 
   gst_inter_surface_unref (intervideosink->surface);
@@ -219,10 +223,32 @@
   return TRUE;
 }
 
-static GstFlowReturn
-gst_inter_video_sink_render (GstBaseSink * sink, GstBuffer * buffer)
+static gboolean
+gst_inter_video_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
 {
   GstInterVideoSink *intervideosink = GST_INTER_VIDEO_SINK (sink);
+  GstVideoInfo info;
+
+  if (!gst_video_info_from_caps (&info, caps)) {
+    GST_ERROR_OBJECT (sink, "Failed to parse caps %" GST_PTR_FORMAT, caps);
+    return FALSE;
+  }
+
+  g_mutex_lock (&intervideosink->surface->mutex);
+  intervideosink->surface->video_info = info;
+  intervideosink->info = info;
+  g_mutex_unlock (&intervideosink->surface->mutex);
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_inter_video_sink_show_frame (GstVideoSink * sink, GstBuffer * buffer)
+{
+  GstInterVideoSink *intervideosink = GST_INTER_VIDEO_SINK (sink);
+
+  GST_DEBUG_OBJECT (intervideosink, "render ts %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
 
   g_mutex_lock (&intervideosink->surface->mutex);
   if (intervideosink->surface->video_buffer) {
diff --git a/gst/inter/gstintervideosink.h b/gst/inter/gstintervideosink.h
index f7196c5..096cee2 100644
--- a/gst/inter/gstintervideosink.h
+++ b/gst/inter/gstintervideosink.h
@@ -20,7 +20,7 @@
 #ifndef _GST_INTER_VIDEO_SINK_H_
 #define _GST_INTER_VIDEO_SINK_H_
 
-#include <gst/base/gstbasesink.h>
+#include <gst/video/video.h>
 #include "gstintersurface.h"
 
 G_BEGIN_DECLS
@@ -36,18 +36,17 @@
 
 struct _GstInterVideoSink
 {
-  GstBaseSink base_intervideosink;
+  GstVideoSink videosink;
 
   GstInterSurface *surface;
   char *channel;
 
-  int fps_n;
-  int fps_d;
+  GstVideoInfo info;
 };
 
 struct _GstInterVideoSinkClass
 {
-  GstBaseSinkClass base_intervideosink_class;
+  GstVideoSinkClass videosinkclass;
 };
 
 GType gst_inter_video_sink_get_type (void);
diff --git a/gst/inter/gstintervideosrc.c b/gst/inter/gstintervideosrc.c
index b734801..6553ed1 100644
--- a/gst/inter/gstintervideosrc.c
+++ b/gst/inter/gstintervideosrc.c
@@ -48,15 +48,16 @@
 #define GST_CAT_DEFAULT gst_inter_video_src_debug_category
 
 /* prototypes */
-
-
 static void gst_inter_video_src_set_property (GObject * object,
     guint property_id, const GValue * value, GParamSpec * pspec);
 static void gst_inter_video_src_get_property (GObject * object,
     guint property_id, GValue * value, GParamSpec * pspec);
 static void gst_inter_video_src_finalize (GObject * object);
 
+static GstCaps *gst_inter_video_src_get_caps (GstBaseSrc * src,
+    GstCaps * filter);
 static gboolean gst_inter_video_src_set_caps (GstBaseSrc * src, GstCaps * caps);
+static GstCaps *gst_inter_video_src_fixate (GstBaseSrc * src, GstCaps * caps);
 static gboolean gst_inter_video_src_start (GstBaseSrc * src);
 static gboolean gst_inter_video_src_stop (GstBaseSrc * src);
 static void
@@ -65,26 +66,28 @@
 static GstFlowReturn
 gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size,
     GstBuffer ** buf);
-static GstCaps *gst_inter_video_src_fixate (GstBaseSrc * src, GstCaps * caps);
 
 enum
 {
   PROP_0,
-  PROP_CHANNEL
+  PROP_CHANNEL,
+  PROP_TIMEOUT
 };
 
-/* pad templates */
+#define DEFAULT_CHANNEL ("default")
+#define DEFAULT_TIMEOUT (GST_SECOND)
 
+/* pad templates */
 static GstStaticPadTemplate gst_inter_video_src_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))
     );
 
 
 /* class initialization */
-
+#define parent_class gst_inter_video_src_parent_class
 G_DEFINE_TYPE (GstInterVideoSrc, gst_inter_video_src, GST_TYPE_BASE_SRC);
 
 static void
@@ -109,18 +112,24 @@
   gobject_class->set_property = gst_inter_video_src_set_property;
   gobject_class->get_property = gst_inter_video_src_get_property;
   gobject_class->finalize = gst_inter_video_src_finalize;
+  base_src_class->get_caps = GST_DEBUG_FUNCPTR (gst_inter_video_src_get_caps);
   base_src_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_video_src_set_caps);
+  base_src_class->fixate = GST_DEBUG_FUNCPTR (gst_inter_video_src_fixate);
   base_src_class->start = GST_DEBUG_FUNCPTR (gst_inter_video_src_start);
   base_src_class->stop = GST_DEBUG_FUNCPTR (gst_inter_video_src_stop);
   base_src_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_video_src_get_times);
   base_src_class->create = GST_DEBUG_FUNCPTR (gst_inter_video_src_create);
-  base_src_class->fixate = GST_DEBUG_FUNCPTR (gst_inter_video_src_fixate);
 
   g_object_class_install_property (gobject_class, PROP_CHANNEL,
       g_param_spec_string ("channel", "Channel",
           "Channel name to match inter src and sink elements",
-          "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_TIMEOUT,
+      g_param_spec_uint64 ("timeout", "Timeout",
+          "Timeout after which to start outputting black frames",
+          0, G_MAXUINT64, DEFAULT_TIMEOUT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -129,7 +138,8 @@
   gst_base_src_set_format (GST_BASE_SRC (intervideosrc), GST_FORMAT_TIME);
   gst_base_src_set_live (GST_BASE_SRC (intervideosrc), TRUE);
 
-  intervideosrc->channel = g_strdup ("default");
+  intervideosrc->channel = g_strdup (DEFAULT_CHANNEL);
+  intervideosrc->timeout = DEFAULT_TIMEOUT;
 }
 
 void
@@ -143,6 +153,9 @@
       g_free (intervideosrc->channel);
       intervideosrc->channel = g_value_dup_string (value);
       break;
+    case PROP_TIMEOUT:
+      intervideosrc->timeout = g_value_get_uint64 (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -159,6 +172,9 @@
     case PROP_CHANNEL:
       g_value_set_string (value, intervideosrc->channel);
       break;
+    case PROP_TIMEOUT:
+      g_value_set_uint64 (value, intervideosrc->timeout);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -176,22 +192,80 @@
   G_OBJECT_CLASS (gst_inter_video_src_parent_class)->finalize (object);
 }
 
-
-
-static gboolean
-gst_inter_video_src_set_caps (GstBaseSrc * src, GstCaps * caps)
+static GstCaps *
+gst_inter_video_src_get_caps (GstBaseSrc * src, GstCaps * filter)
 {
   GstInterVideoSrc *intervideosrc = GST_INTER_VIDEO_SRC (src);
+  GstCaps *caps;
+
+  GST_DEBUG_OBJECT (intervideosrc, "get_caps");
+
+  if (!intervideosrc->surface)
+    return GST_BASE_SRC_CLASS (parent_class)->get_caps (src, filter);
+
+  g_mutex_lock (&intervideosrc->surface->mutex);
+  if (intervideosrc->surface->video_info.finfo) {
+    caps = gst_video_info_to_caps (&intervideosrc->surface->video_info);
+    gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION_RANGE, 1,
+        G_MAXINT, G_MAXINT, 1, NULL);
+
+    if (filter) {
+      GstCaps *tmp;
+
+      tmp = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+      gst_caps_unref (caps);
+      caps = tmp;
+    }
+  } else {
+    caps = NULL;
+  }
+  g_mutex_unlock (&intervideosrc->surface->mutex);
+
+  if (caps)
+    return caps;
+  else
+    return GST_BASE_SRC_CLASS (parent_class)->get_caps (src, filter);
+}
+
+static gboolean
+gst_inter_video_src_set_caps (GstBaseSrc * base, GstCaps * caps)
+{
+  GstInterVideoSrc *intervideosrc = GST_INTER_VIDEO_SRC (base);
+  GstVideoConverter *converter;
+  GstVideoFrame src_frame, dest_frame;
+  GstBuffer *src, *dest;
+  GstVideoInfo black_info;
 
   GST_DEBUG_OBJECT (intervideosrc, "set_caps");
 
-  if (!gst_video_info_from_caps (&intervideosrc->info, caps))
+  if (!gst_video_info_from_caps (&intervideosrc->info, caps)) {
+    GST_ERROR_OBJECT (intervideosrc, "Failed to parse caps %" GST_PTR_FORMAT,
+        caps);
     return FALSE;
+  }
 
-  return gst_pad_set_caps (src->srcpad, caps);
+  /* Create a black frame */
+  gst_buffer_replace (&intervideosrc->black_frame, NULL);
+  gst_video_info_set_format (&black_info, GST_VIDEO_FORMAT_ARGB,
+      intervideosrc->info.width, intervideosrc->info.height);
+  black_info.fps_n = intervideosrc->info.fps_n;
+  black_info.fps_d = intervideosrc->info.fps_d;
+  src = gst_buffer_new_and_alloc (black_info.size);
+  dest = gst_buffer_new_and_alloc (intervideosrc->info.size);
+  gst_buffer_memset (src, 0, 0, black_info.size);
+  gst_video_frame_map (&src_frame, &black_info, src, GST_MAP_READ);
+  gst_video_frame_map (&dest_frame, &intervideosrc->info, dest, GST_MAP_WRITE);
+  converter = gst_video_converter_new (&black_info, &intervideosrc->info, NULL);
+  gst_video_converter_frame (converter, &src_frame, &dest_frame);
+  gst_video_converter_free (converter);
+  gst_video_frame_unmap (&src_frame);
+  gst_video_frame_unmap (&dest_frame);
+  gst_buffer_unref (src);
+  intervideosrc->black_frame = dest;
+
+  return TRUE;
 }
 
-
 static gboolean
 gst_inter_video_src_start (GstBaseSrc * src)
 {
@@ -200,6 +274,8 @@
   GST_DEBUG_OBJECT (intervideosrc, "start");
 
   intervideosrc->surface = gst_inter_surface_get (intervideosrc->channel);
+  intervideosrc->timestamp_offset = 0;
+  intervideosrc->n_frames = 0;
 
   return TRUE;
 }
@@ -213,6 +289,7 @@
 
   gst_inter_surface_unref (intervideosrc->surface);
   intervideosrc->surface = NULL;
+  gst_buffer_replace (&intervideosrc->black_frame, NULL);
 
   return TRUE;
 }
@@ -242,57 +319,147 @@
   }
 }
 
-
 static GstFlowReturn
 gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size,
     GstBuffer ** buf)
 {
   GstInterVideoSrc *intervideosrc = GST_INTER_VIDEO_SRC (src);
+  GstCaps *caps;
   GstBuffer *buffer;
+  guint64 frames;
+  gboolean is_gap = FALSE;
 
   GST_DEBUG_OBJECT (intervideosrc, "create");
 
+  caps = NULL;
   buffer = NULL;
 
+  frames = gst_util_uint64_scale_ceil (intervideosrc->timeout,
+      GST_VIDEO_INFO_FPS_N (&intervideosrc->info),
+      GST_VIDEO_INFO_FPS_D (&intervideosrc->info) * GST_SECOND);
+
   g_mutex_lock (&intervideosrc->surface->mutex);
+  if (intervideosrc->surface->video_info.finfo) {
+    GstVideoInfo tmp_info = intervideosrc->surface->video_info;
+
+    /* We negotiate the framerate ourselves */
+    tmp_info.fps_n = intervideosrc->info.fps_n;
+    tmp_info.fps_d = intervideosrc->info.fps_d;
+    if (intervideosrc->info.flags & GST_VIDEO_FLAG_VARIABLE_FPS)
+      tmp_info.flags |= GST_VIDEO_FLAG_VARIABLE_FPS;
+    else
+      tmp_info.flags &= ~GST_VIDEO_FLAG_VARIABLE_FPS;
+
+    if (!gst_video_info_is_equal (&tmp_info, &intervideosrc->info)) {
+      caps = gst_video_info_to_caps (&tmp_info);
+      intervideosrc->timestamp_offset +=
+          gst_util_uint64_scale (GST_SECOND * intervideosrc->n_frames,
+          GST_VIDEO_INFO_FPS_D (&intervideosrc->info),
+          GST_VIDEO_INFO_FPS_N (&intervideosrc->info));
+      intervideosrc->n_frames = 0;
+    }
+  }
+
   if (intervideosrc->surface->video_buffer) {
+    /* We have a buffer to push */
     buffer = gst_buffer_ref (intervideosrc->surface->video_buffer);
-    intervideosrc->surface->video_buffer_count++;
-    if (intervideosrc->surface->video_buffer_count >= 30) {
+
+    /* Can only be true if timeout > 0 */
+    if (intervideosrc->surface->video_buffer_count == frames) {
       gst_buffer_unref (intervideosrc->surface->video_buffer);
       intervideosrc->surface->video_buffer = NULL;
     }
   }
+
+  if (intervideosrc->surface->video_buffer_count != 0 &&
+      intervideosrc->surface->video_buffer_count != (frames + 1)) {
+    /* This is a repeat of the stored buffer or of a black frame */
+    is_gap = TRUE;
+  }
+
+  intervideosrc->surface->video_buffer_count++;
   g_mutex_unlock (&intervideosrc->surface->mutex);
 
+  if (caps) {
+    gboolean ret;
+    GstStructure *s;
+    GstCaps *downstream_caps;
+    GstCaps *tmp, *negotiated_caps;
+    gint fps_n = 0, fps_d = 1;
+
+    /* Negotiate a framerate with downstream */
+    downstream_caps = gst_pad_get_allowed_caps (GST_BASE_SRC_PAD (src));
+
+    /* Remove all framerates */
+    tmp = gst_caps_copy (caps);
+    s = gst_caps_get_structure (tmp, 0);
+    gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d);
+    if (fps_n == 0)
+      gst_structure_get_fraction (s, "max-framerate", &fps_n, &fps_d);
+    gst_structure_remove_field (s, "framerate");
+    gst_structure_remove_field (s, "max-framerate");
+
+    negotiated_caps =
+        gst_caps_intersect_full (downstream_caps, tmp,
+        GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (tmp);
+    gst_caps_unref (downstream_caps);
+
+    if (gst_caps_is_empty (negotiated_caps)) {
+      GST_ERROR_OBJECT (src, "Failed to negotiate caps %" GST_PTR_FORMAT, caps);
+      if (buffer)
+        gst_buffer_unref (buffer);
+      gst_caps_unref (caps);
+      return GST_FLOW_NOT_NEGOTIATED;
+    }
+    gst_caps_unref (caps);
+    caps = NULL;
+
+    /* Prefer what the source produces, otherwise 30 fps */
+    if (fps_n == 0) {
+      fps_n = 30;
+      fps_d = 1;
+    }
+
+    negotiated_caps = gst_caps_truncate (negotiated_caps);
+    s = gst_caps_get_structure (negotiated_caps, 0);
+    if (!gst_structure_has_field (s, "framerate"))
+      gst_structure_set (s, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL);
+    else
+      gst_structure_fixate_field_nearest_fraction (s, "framerate", fps_n,
+          fps_d);
+
+    ret = gst_base_src_set_caps (src, negotiated_caps);
+    if (!ret) {
+      GST_ERROR_OBJECT (src, "Failed to set caps %" GST_PTR_FORMAT,
+          negotiated_caps);
+      if (buffer)
+        gst_buffer_unref (buffer);
+      gst_caps_unref (negotiated_caps);
+      return GST_FLOW_NOT_NEGOTIATED;
+    }
+    gst_caps_unref (negotiated_caps);
+  }
+
   if (buffer == NULL) {
-    GstMapInfo map;
-
-    buffer =
-        gst_buffer_new_and_alloc (GST_VIDEO_INFO_SIZE (&intervideosrc->info));
-
-    gst_buffer_map (buffer, &map, GST_MAP_WRITE);
-    memset (map.data, 16, GST_VIDEO_INFO_COMP_STRIDE (&intervideosrc->info, 0) *
-        GST_VIDEO_INFO_COMP_HEIGHT (&intervideosrc->info, 0));
-
-    memset (map.data + GST_VIDEO_INFO_COMP_OFFSET (&intervideosrc->info, 1),
-        128,
-        2 * GST_VIDEO_INFO_COMP_STRIDE (&intervideosrc->info, 1) *
-        GST_VIDEO_INFO_COMP_HEIGHT (&intervideosrc->info, 1));
-    gst_buffer_unmap (buffer, &map);
+    GST_DEBUG_OBJECT (intervideosrc, "Creating black frame");
+    buffer = gst_buffer_copy (intervideosrc->black_frame);
   }
 
   buffer = gst_buffer_make_writable (buffer);
 
-  GST_BUFFER_PTS (buffer) =
-      gst_util_uint64_scale_int (GST_SECOND * intervideosrc->n_frames,
+  if (is_gap)
+    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_GAP);
+
+  GST_BUFFER_PTS (buffer) = intervideosrc->timestamp_offset +
+      gst_util_uint64_scale (GST_SECOND * intervideosrc->n_frames,
       GST_VIDEO_INFO_FPS_D (&intervideosrc->info),
       GST_VIDEO_INFO_FPS_N (&intervideosrc->info));
   GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
   GST_DEBUG_OBJECT (intervideosrc, "create ts %" GST_TIME_FORMAT,
       GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
-  GST_BUFFER_DURATION (buffer) =
-      gst_util_uint64_scale_int (GST_SECOND * (intervideosrc->n_frames + 1),
+  GST_BUFFER_DURATION (buffer) = intervideosrc->timestamp_offset +
+      gst_util_uint64_scale (GST_SECOND * (intervideosrc->n_frames + 1),
       GST_VIDEO_INFO_FPS_D (&intervideosrc->info),
       GST_VIDEO_INFO_FPS_N (&intervideosrc->info)) - GST_BUFFER_PTS (buffer);
   GST_BUFFER_OFFSET (buffer) = intervideosrc->n_frames;
@@ -316,9 +483,10 @@
   GST_DEBUG_OBJECT (src, "fixate");
 
   caps = gst_caps_make_writable (caps);
-
+  caps = gst_caps_truncate (caps);
   structure = gst_caps_get_structure (caps, 0);
 
+  gst_structure_fixate_field_string (structure, "format", "I420");
   gst_structure_fixate_field_nearest_int (structure, "width", 320);
   gst_structure_fixate_field_nearest_int (structure, "height", 240);
   gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
diff --git a/gst/inter/gstintervideosrc.h b/gst/inter/gstintervideosrc.h
index a68af76..0de36f4 100644
--- a/gst/inter/gstintervideosrc.h
+++ b/gst/inter/gstintervideosrc.h
@@ -42,9 +42,12 @@
   GstInterSurface *surface;
 
   char *channel;
+  guint64 timeout;
 
   GstVideoInfo info;
+  GstBuffer *black_frame;
   int n_frames;
+  GstClockTime timestamp_offset;
 };
 
 struct _GstInterVideoSrcClass
diff --git a/gst/interlace/Makefile.am b/gst/interlace/Makefile.am
index e321213..01b64e3 100644
--- a/gst/interlace/Makefile.am
+++ b/gst/interlace/Makefile.am
@@ -14,17 +14,3 @@
 
 libgstinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstinterlace_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinterlace -:SHARED libgstinterlace \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinterlace_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterlace_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinterlace_la_LDFLAGS) \
-	           $(libgstinterlace_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/interlace/Makefile.in b/gst/interlace/Makefile.in
index 39862f6..ddaa47c 100644
--- a/gst/interlace/Makefile.in
+++ b/gst/interlace/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/interlace
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/interlace/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/interlace/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,20 +1095,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinterlace -:SHARED libgstinterlace \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinterlace_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterlace_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinterlace_la_LDFLAGS) \
-	           $(libgstinterlace_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/ivfparse/Makefile.am b/gst/ivfparse/Makefile.am
index d5167c5..951ac54 100644
--- a/gst/ivfparse/Makefile.am
+++ b/gst/ivfparse/Makefile.am
@@ -11,17 +11,3 @@
 libgstivfparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstivfparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivfparse -:SHARED libgstivfparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivfparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivfparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivfparse_la_LDFLAGS) \
-	           $(libgstivfparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/ivfparse/Makefile.in b/gst/ivfparse/Makefile.in
index e7b1c0e..4b31fb5 100644
--- a/gst/ivfparse/Makefile.in
+++ b/gst/ivfparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/ivfparse
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/ivfparse/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/ivfparse/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,20 +1096,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivfparse -:SHARED libgstivfparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivfparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivfparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivfparse_la_LDFLAGS) \
-	           $(libgstivfparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/ivtc/Makefile.am b/gst/ivtc/Makefile.am
index 5b1ce94..26f123a 100644
--- a/gst/ivtc/Makefile.am
+++ b/gst/ivtc/Makefile.am
@@ -9,20 +9,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS)
 libgstivtc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstivtc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-
-EXTRA_DIST =
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivtc -:SHARED libgstivtc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivtc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivtc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivtc_la_LDFLAGS) \
-	           $(libgstivtc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/ivtc/Makefile.in b/gst/ivtc/Makefile.in
index fe836d8..6518144 100644
--- a/gst/ivtc/Makefile.in
+++ b/gst/ivtc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/ivtc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -226,6 +235,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -243,8 +253,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -269,8 +281,6 @@
 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@
@@ -283,7 +293,6 @@
 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@
@@ -291,6 +300,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -317,11 +328,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -340,8 +354,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -400,10 +412,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -420,7 +436,6 @@
 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@
@@ -429,7 +444,6 @@
 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@
@@ -442,7 +456,6 @@
 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@
@@ -456,6 +469,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -467,6 +481,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -505,6 +521,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -540,10 +557,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -569,6 +590,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -576,7 +600,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -605,6 +636,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -615,6 +647,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -645,17 +678,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -672,6 +704,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -710,6 +743,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -736,7 +770,6 @@
 
 libgstivtc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstivtc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-EXTRA_DIST = 
 all: all-am
 
 .SUFFIXES:
@@ -753,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/ivtc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/ivtc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1070,20 +1102,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivtc -:SHARED libgstivtc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivtc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivtc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivtc_la_LDFLAGS) \
-	           $(libgstivtc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/jp2kdecimator/Makefile.am b/gst/jp2kdecimator/Makefile.am
index 780a983..1107eba 100644
--- a/gst/jp2kdecimator/Makefile.am
+++ b/gst/jp2kdecimator/Makefile.am
@@ -12,17 +12,3 @@
 libgstjp2kdecimator_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstjp2kdecimator.h jp2kcodestream.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstjp2kdecimator -:SHARED libgstjp2kdecimator \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstjp2kdecimator_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjp2kdecimator_la_CFLAGS) \
-	 -:LDFLAGS $(libgstjp2kdecimator_la_LDFLAGS) \
-	           $(libgstjp2kdecimator_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/jp2kdecimator/Makefile.in b/gst/jp2kdecimator/Makefile.in
index 83c7cc3..2d9b6f0 100644
--- a/gst/jp2kdecimator/Makefile.in
+++ b/gst/jp2kdecimator/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/jp2kdecimator
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +791,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/jp2kdecimator/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/jp2kdecimator/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,20 +1107,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstjp2kdecimator -:SHARED libgstjp2kdecimator \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstjp2kdecimator_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjp2kdecimator_la_CFLAGS) \
-	 -:LDFLAGS $(libgstjp2kdecimator_la_LDFLAGS) \
-	           $(libgstjp2kdecimator_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/jp2kdecimator/jp2kcodestream.c b/gst/jp2kdecimator/jp2kcodestream.c
index 943d837..af2c047 100644
--- a/gst/jp2kdecimator/jp2kcodestream.c
+++ b/gst/jp2kdecimator/jp2kcodestream.c
@@ -1152,22 +1152,18 @@
         GST_ERROR_OBJECT (self, "COC marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_POC:
         GST_ERROR_OBJECT (self, "POC marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_RGN:
         GST_ERROR_OBJECT (self, "RGN marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_PPT:
         GST_ERROR_OBJECT (self, "PPT marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_PLT:{
         PacketLengthTilePart *plt = g_slice_new (PacketLengthTilePart);
 
@@ -1521,32 +1517,26 @@
         GST_ERROR_OBJECT (self, "POC marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_COC:
         GST_ERROR_OBJECT (self, "COC marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_RGN:
         GST_ERROR_OBJECT (self, "RGN marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_TLM:
         GST_ERROR_OBJECT (self, "TLM marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_PLM:
         GST_ERROR_OBJECT (self, "PLM marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_PPM:
         GST_ERROR_OBJECT (self, "PPM marker not supported yet");
         ret = GST_FLOW_ERROR;
         goto done;
-        break;
       case MARKER_QCD:
         if (header->qcd.data != NULL) {
           GST_ERROR_OBJECT (self, "Multiple QCD markers");
diff --git a/gst/jpegformat/Makefile.am b/gst/jpegformat/Makefile.am
index dc480b7..66506cf 100644
--- a/gst/jpegformat/Makefile.am
+++ b/gst/jpegformat/Makefile.am
@@ -9,17 +9,3 @@
 libgstjpegformat_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstjpegformat.h gstjpegparse.h gstjifmux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstjpegformat -:SHARED libgstjpegformat \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstjpegformat_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjpegformat_la_CFLAGS) \
-	 -:LDFLAGS $(libgstjpegformat_la_LDFLAGS) \
-	           $(libgstjpegformat_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/jpegformat/Makefile.in b/gst/jpegformat/Makefile.in
index e90bba0..fca4439 100644
--- a/gst/jpegformat/Makefile.in
+++ b/gst/jpegformat/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/jpegformat
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/jpegformat/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/jpegformat/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1078,20 +1112,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstjpegformat -:SHARED libgstjpegformat \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstjpegformat_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstjpegformat_la_CFLAGS) \
-	 -:LDFLAGS $(libgstjpegformat_la_LDFLAGS) \
-	           $(libgstjpegformat_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/jpegformat/gstjifmux.c b/gst/jpegformat/gstjifmux.c
index 28638b7..719067a 100644
--- a/gst/jpegformat/gstjifmux.c
+++ b/gst/jpegformat/gstjifmux.c
@@ -312,7 +312,6 @@
         m = gst_jif_mux_new_marker (marker, 0, NULL, FALSE);
         self->priv->markers = g_list_prepend (self->priv->markers, m);
         goto done;
-        break;
       default:
         if (!gst_byte_reader_get_uint16_be (&reader, &size))
           goto error;
diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c
index a05f9b1..d55b84f 100644
--- a/gst/jpegformat/gstjpegparse.c
+++ b/gst/jpegformat/gstjpegparse.c
@@ -62,7 +62,6 @@
         "format = (string) { I420, Y41B, UYVY, YV12 }, "
         "width = (int) [ 0, MAX ],"
         "height = (int) [ 0, MAX ], "
-        "interlaced = (boolean) { true, false }, "
         "framerate = (fraction) [ 0/1, MAX ], " "parsed = (boolean) true")
     );
 
@@ -78,9 +77,6 @@
 
 struct _GstJpegParsePrivate
 {
-  GstPad *srcpad;
-
-  GstAdapter *adapter;
   guint last_offset;
   guint last_entropy_len;
   gboolean last_resync;
@@ -90,16 +86,9 @@
   gint caps_framerate_numerator;
   gint caps_framerate_denominator;
 
-  /* a new segment arrived */
-  gboolean new_segment;
-  GstSegment segment;
-
   /* the parsed frame size */
   guint16 width, height;
 
-  /* TRUE if the image is interlaced */
-  gboolean interlaced;
-
   /* format color space */
   const gchar *format;
 
@@ -120,34 +109,40 @@
   GstTagList *tags;
 };
 
-static void gst_jpeg_parse_dispose (GObject * object);
-
-static GstFlowReturn gst_jpeg_parse_chain (GstPad * pad, GstObject * parent,
-    GstBuffer * buffer);
-static gboolean gst_jpeg_parse_sink_setcaps (GstJpegParse * parse,
+static GstFlowReturn
+gst_jpeg_parse_handle_frame (GstBaseParse * bparse, GstBaseParseFrame * frame,
+    gint * skipsize);
+static gboolean gst_jpeg_parse_set_sink_caps (GstBaseParse * parse,
     GstCaps * caps);
-static gboolean gst_jpeg_parse_sink_event (GstPad * pad, GstObject * parent,
+static gboolean gst_jpeg_parse_sink_event (GstBaseParse * parse,
     GstEvent * event);
-static GstStateChangeReturn gst_jpeg_parse_change_state (GstElement * element,
-    GstStateChange transition);
+static gboolean gst_jpeg_parse_start (GstBaseParse * parse);
+static gboolean gst_jpeg_parse_stop (GstBaseParse * parse);
+static GstFlowReturn gst_jpeg_parse_pre_push_frame (GstBaseParse * bparse,
+    GstBaseParseFrame * frame);
 
 #define gst_jpeg_parse_parent_class parent_class
-G_DEFINE_TYPE (GstJpegParse, gst_jpeg_parse, GST_TYPE_ELEMENT);
+G_DEFINE_TYPE (GstJpegParse, gst_jpeg_parse, GST_TYPE_BASE_PARSE);
 
 static void
 gst_jpeg_parse_class_init (GstJpegParseClass * klass)
 {
+  GstBaseParseClass *gstbaseparse_class;
   GstElementClass *gstelement_class;
   GObjectClass *gobject_class;
 
+  gstbaseparse_class = (GstBaseParseClass *) klass;
   gstelement_class = (GstElementClass *) klass;
   gobject_class = (GObjectClass *) klass;
 
   g_type_class_add_private (gobject_class, sizeof (GstJpegParsePrivate));
-  gobject_class->dispose = gst_jpeg_parse_dispose;
 
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_jpeg_parse_change_state);
+  gstbaseparse_class->start = gst_jpeg_parse_start;
+  gstbaseparse_class->stop = gst_jpeg_parse_stop;
+  gstbaseparse_class->set_sink_caps = gst_jpeg_parse_set_sink_caps;
+  gstbaseparse_class->sink_event = gst_jpeg_parse_sink_event;
+  gstbaseparse_class->handle_frame = gst_jpeg_parse_handle_frame;
+  gstbaseparse_class->pre_push_frame = gst_jpeg_parse_pre_push_frame;
 
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&gst_jpeg_parse_src_pad_template));
@@ -166,48 +161,16 @@
 static void
 gst_jpeg_parse_init (GstJpegParse * parse)
 {
-  GstPad *sinkpad;
-
   parse->priv = G_TYPE_INSTANCE_GET_PRIVATE (parse, GST_TYPE_JPEG_PARSE,
       GstJpegParsePrivate);
 
-  /* create the sink and src pads */
-  sinkpad = gst_pad_new_from_static_template (&gst_jpeg_parse_sink_pad_template,
-      "sink");
-  gst_pad_set_chain_function (sinkpad,
-      GST_DEBUG_FUNCPTR (gst_jpeg_parse_chain));
-  gst_pad_set_event_function (sinkpad,
-      GST_DEBUG_FUNCPTR (gst_jpeg_parse_sink_event));
-  gst_element_add_pad (GST_ELEMENT (parse), sinkpad);
-
-  parse->priv->srcpad =
-      gst_pad_new_from_static_template (&gst_jpeg_parse_src_pad_template,
-      "src");
-  gst_pad_use_fixed_caps (parse->priv->srcpad);
-  gst_element_add_pad (GST_ELEMENT (parse), parse->priv->srcpad);
-
   parse->priv->next_ts = GST_CLOCK_TIME_NONE;
-  parse->priv->adapter = gst_adapter_new ();
 }
 
-static void
-gst_jpeg_parse_dispose (GObject * object)
-{
-  GstJpegParse *parse = GST_JPEG_PARSE (object);
-
-  if (parse->priv->adapter != NULL) {
-    gst_adapter_clear (parse->priv->adapter);
-    gst_object_unref (parse->priv->adapter);
-    parse->priv->adapter = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-
 static gboolean
-gst_jpeg_parse_sink_setcaps (GstJpegParse * parse, GstCaps * caps)
+gst_jpeg_parse_set_sink_caps (GstBaseParse * bparse, GstCaps * caps)
 {
+  GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse);
   GstStructure *s = gst_caps_get_structure (caps, 0);
   const GValue *framerate;
 
@@ -238,25 +201,23 @@
  * Returns: TRUE if the header was found, FALSE if more data is needed.
  */
 static gboolean
-gst_jpeg_parse_skip_to_jpeg_header (GstJpegParse * parse)
+gst_jpeg_parse_skip_to_jpeg_header (GstJpegParse * parse, GstMapInfo * mapinfo,
+    gint * skipsize)
 {
-  guint available, flush;
   gboolean ret = TRUE;
+  GstByteReader reader;
 
-  available = gst_adapter_available (parse->priv->adapter);
-  if (available < 4)
+  if (mapinfo->size < 4)
     return FALSE;
 
-  flush = gst_adapter_masked_scan_uint32 (parse->priv->adapter, 0xffffff00,
-      0xffd8ff00, 0, available);
-  if (flush == -1) {
-    flush = available - 3;      /* Last 3 bytes + 1 more may match header. */
+  gst_byte_reader_init (&reader, mapinfo->data, mapinfo->size);
+
+  *skipsize = gst_byte_reader_masked_scan_uint32 (&reader, 0xffffff00,
+      0xffd8ff00, 0, mapinfo->size);
+  if (*skipsize == -1) {
+    *skipsize = mapinfo->size - 3;      /* Last 3 bytes + 1 more may match header. */
     ret = FALSE;
   }
-  if (flush > 0) {
-    GST_LOG_OBJECT (parse, "Skipping %u bytes.", flush);
-    gst_adapter_flush (parse->priv->adapter, flush);
-  }
   return ret;
 }
 
@@ -272,17 +233,21 @@
  * otherwise 0 if more data needed,
  * if < 0 the absolute value needs to be flushed */
 static gint
-gst_jpeg_parse_get_image_length (GstJpegParse * parse)
+gst_jpeg_parse_get_image_length (GstJpegParse * parse, GstMapInfo * mapinfo)
 {
   guint size;
   gboolean resync;
-  GstAdapter *adapter = parse->priv->adapter;
   gint offset, noffset;
+  GstByteReader reader;
 
-  size = gst_adapter_available (adapter);
+  size = mapinfo->size;
+  gst_byte_reader_init (&reader, mapinfo->data, mapinfo->size);
 
+  /* TODO could be removed as previous functions already guarantee this to be
+   * true */
   /* we expect at least 4 bytes, first of which start marker */
-  if (gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0xffd80000, 0, 4))
+  if (gst_byte_reader_masked_scan_uint32 (&reader, 0xffff0000, 0xffd80000, 0,
+          4))
     return 0;
 
   GST_DEBUG ("Parsing jpeg image data (%u bytes)", size);
@@ -303,8 +268,8 @@
     guint32 value;
 
     noffset =
-        gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, 0x0000ff00,
-        offset, size - offset, &value);
+        gst_byte_reader_masked_scan_uint32_peek (&reader, 0x0000ff00,
+        0x0000ff00, offset, size - offset, &value);
     /* lost sync if 0xff marker not where expected */
     if ((resync = (noffset != offset))) {
       GST_DEBUG ("Lost sync at 0x%08x, resyncing", offset + 2);
@@ -315,8 +280,8 @@
     while ((noffset >= 0) && ((value & 0xff) == 0xff)) {
       noffset++;
       noffset =
-          gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, 0x0000ff00,
-          noffset, size - noffset, &value);
+          gst_byte_reader_masked_scan_uint32_peek (&reader, 0x0000ff00,
+          0x0000ff00, noffset, size - noffset, &value);
     }
     /* enough bytes left for marker? (we need 0xNN after the 0xff) */
     if (noffset < 0) {
@@ -349,8 +314,8 @@
       if (offset + 2 + 4 > size)
         goto need_more_data;
       else
-        gst_adapter_masked_scan_uint32_peek (adapter, 0x0, 0x0, offset + 2, 4,
-            &frame_len);
+        gst_byte_reader_masked_scan_uint32_peek (&reader, 0x0, 0x0, offset + 2,
+            4, &frame_len);
       frame_len = frame_len & 0xffff;
     }
     GST_DEBUG ("0x%08x: tag %02x, frame_len=%u", offset + 2, value, frame_len);
@@ -366,7 +331,7 @@
       GST_DEBUG ("0x%08x: finding entropy segment length", offset + 2);
       noffset = offset + 2 + frame_len + eseglen;
       while (1) {
-        noffset = gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00,
+        noffset = gst_byte_reader_masked_scan_uint32_peek (&reader, 0x0000ff00,
             0x0000ff00, noffset, size - noffset, &value);
         if (noffset < 0) {
           /* need more data */
@@ -388,7 +353,8 @@
       /* check if we will still be in sync if we interpret
        * this as a sync point and skip this frame */
       noffset = offset + frame_len + 2;
-      noffset = gst_adapter_masked_scan_uint32 (adapter, 0x0000ff00, 0x0000ff00,
+      noffset =
+          gst_byte_reader_masked_scan_uint32 (&reader, 0x0000ff00, 0x0000ff00,
           noffset, 4);
       if (noffset < 0) {
         /* ignore and continue resyncing until we hit the end
@@ -491,32 +457,6 @@
 }
 
 static inline gboolean
-gst_jpeg_parse_remove_marker (GstJpegParse * parse,
-    GstByteReader * reader, guint8 marker, GstBuffer * buffer)
-{
-  guint16 size = 0;
-  guint pos = gst_byte_reader_get_pos (reader);
-  GstMapInfo map;
-
-  if (!gst_byte_reader_peek_uint16_be (reader, &size))
-    return FALSE;
-  if (gst_byte_reader_get_remaining (reader) < size)
-    return FALSE;
-
-  GST_LOG_OBJECT (parse, "unhandled marker %x removing %u bytes", marker, size);
-
-  gst_buffer_map (buffer, &map, GST_MAP_READWRITE);
-  memmove (&map.data[pos], &map.data[pos + size], map.size - (pos + size));
-  gst_buffer_unmap (buffer, &map);
-
-
-  if (!gst_byte_reader_set_pos (reader, pos - size))
-    return FALSE;
-
-  return TRUE;
-}
-
-static inline gboolean
 gst_jpeg_parse_skip_marker (GstJpegParse * parse,
     GstByteReader * reader, guint8 marker)
 {
@@ -679,15 +619,13 @@
 }
 
 static gboolean
-gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
+gst_jpeg_parse_read_header (GstJpegParse * parse, GstMapInfo * map, gint len)
 {
   GstByteReader reader;
   guint8 marker = 0;
   gboolean foundSOF = FALSE;
-  GstMapInfo map;
 
-  gst_buffer_map (buffer, &map, GST_MAP_READ);
-  gst_byte_reader_init (&reader, map.data, map.size);
+  gst_byte_reader_init (&reader, map->data, len);
 
   if (!gst_byte_reader_peek_uint8 (&reader, &marker))
     goto error;
@@ -730,9 +668,6 @@
           goto error;
         break;
 
-      case SOF2:
-        parse->priv->interlaced = TRUE;
-        /* fall through */
       case SOF0:
         /* parse Start Of Frame */
         if (!gst_jpeg_parse_sof (parse, &reader))
@@ -742,11 +677,8 @@
         goto done;
 
       default:
-        if (marker == JPG || (marker >= JPG0 && marker <= JPG13)) {
-          /* we'd like to remove them from the buffer */
-          if (!gst_jpeg_parse_remove_marker (parse, &reader, marker, buffer))
-            goto error;
-        } else if (marker >= APP0 && marker <= APP15) {
+        if (marker == JPG || (marker >= JPG0 && marker <= JPG13) ||
+            (marker >= APP0 && marker <= APP15)) {
           if (!gst_jpeg_parse_skip_marker (parse, &reader, marker))
             goto error;
         } else
@@ -757,7 +689,6 @@
       goto error;
   }
 done:
-  gst_buffer_unmap (buffer, &map);
 
   return foundSOF;
 
@@ -767,7 +698,6 @@
     GST_WARNING_OBJECT (parse,
         "Error parsing image header (need more than %u bytes available)",
         gst_byte_reader_get_remaining (&reader));
-    gst_buffer_unmap (buffer, &map);
     return FALSE;
   }
 unhandled:
@@ -775,7 +705,6 @@
     GST_WARNING_OBJECT (parse, "unhandled marker %x, leaving", marker);
     /* Not SOF or SOI.  Must not be a JPEG file (or file pointer
      * is placed wrong).  In either case, it's an error. */
-    gst_buffer_unmap (buffer, &map);
     return FALSE;
   }
 }
@@ -795,7 +724,6 @@
   if (header_ok == TRUE) {
     gst_caps_set_simple (caps,
         "format", G_TYPE_STRING, parse->priv->format,
-        "interlaced", G_TYPE_BOOLEAN, parse->priv->interlaced,
         "width", G_TYPE_INT, parse->priv->width,
         "height", G_TYPE_INT, parse->priv->height, NULL);
   }
@@ -819,8 +747,8 @@
 
   GST_DEBUG_OBJECT (parse,
       "setting downstream caps on %s:%s to %" GST_PTR_FORMAT,
-      GST_DEBUG_PAD_NAME (parse->priv->srcpad), caps);
-  res = gst_pad_set_caps (parse->priv->srcpad, caps);
+      GST_DEBUG_PAD_NAME (GST_BASE_PARSE_SRC_PAD (parse)), caps);
+  res = gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (parse), caps);
   gst_caps_unref (caps);
 
   return res;
@@ -828,56 +756,10 @@
 }
 
 static GstFlowReturn
-gst_jpeg_parse_push_buffer (GstJpegParse * parse, guint len)
+gst_jpeg_parse_pre_push_frame (GstBaseParse * bparse, GstBaseParseFrame * frame)
 {
-  GstBuffer *outbuf;
-  GstFlowReturn ret = GST_FLOW_OK;
-  gboolean header_ok;
-
-  /* reset the offset (only when we flushed) */
-  parse->priv->last_offset = 0;
-  parse->priv->last_entropy_len = 0;
-
-  outbuf = gst_adapter_take_buffer (parse->priv->adapter, len);
-  if (outbuf == NULL) {
-    GST_ELEMENT_ERROR (parse, STREAM, DECODE,
-        ("Failed to take buffer of size %u", len),
-        ("Failed to take buffer of size %u", len));
-    return GST_FLOW_ERROR;
-  }
-
-  header_ok = gst_jpeg_parse_read_header (parse, outbuf);
-
-  if (parse->priv->new_segment == TRUE
-      || parse->priv->width != parse->priv->caps_width
-      || parse->priv->height != parse->priv->caps_height
-      || parse->priv->framerate_numerator !=
-      parse->priv->caps_framerate_numerator
-      || parse->priv->framerate_denominator !=
-      parse->priv->caps_framerate_denominator) {
-    if (!gst_jpeg_parse_set_new_caps (parse, header_ok)) {
-      GST_ELEMENT_ERROR (parse, CORE, NEGOTIATION,
-          ("Can't set caps to the src pad"), ("Can't set caps to the src pad"));
-      return GST_FLOW_ERROR;
-    }
-    gst_pad_push_event (parse->priv->srcpad,
-        gst_event_new_segment (&parse->priv->segment));
-
-    if (parse->priv->tags) {
-      GST_DEBUG_OBJECT (parse, "Pushing tags: %" GST_PTR_FORMAT,
-          parse->priv->tags);
-      gst_pad_push_event (parse->priv->srcpad,
-          gst_event_new_tag (parse->priv->tags));
-      parse->priv->tags = NULL;
-    }
-
-    parse->priv->new_segment = FALSE;
-    parse->priv->caps_width = parse->priv->width;
-    parse->priv->caps_height = parse->priv->height;
-    parse->priv->caps_framerate_numerator = parse->priv->framerate_numerator;
-    parse->priv->caps_framerate_denominator =
-        parse->priv->framerate_denominator;
-  }
+  GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse);
+  GstBuffer *outbuf = frame->buffer;
 
   GST_BUFFER_TIMESTAMP (outbuf) = parse->priv->next_ts;
 
@@ -891,98 +773,108 @@
 
   GST_BUFFER_DURATION (outbuf) = parse->priv->duration;
 
-  GST_LOG_OBJECT (parse, "pushing buffer (ts=%" GST_TIME_FORMAT ", len=%u)",
-      GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), len);
-
-  ret = gst_pad_push (parse->priv->srcpad, outbuf);
-
-  return ret;
+  return GST_FLOW_OK;
 }
 
 static GstFlowReturn
-gst_jpeg_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
+gst_jpeg_parse_handle_frame (GstBaseParse * bparse, GstBaseParseFrame * frame,
+    gint * skipsize)
 {
-  GstJpegParse *parse = GST_JPEG_PARSE (parent);
+  GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse);
   gint len;
   GstClockTime timestamp, duration;
-  GstFlowReturn ret = GST_FLOW_OK;
+  GstMapInfo mapinfo;
+  gboolean header_ok;
 
-  timestamp = GST_BUFFER_PTS (buf);
-  duration = GST_BUFFER_DURATION (buf);
+  timestamp = GST_BUFFER_PTS (frame->buffer);
+  duration = GST_BUFFER_DURATION (frame->buffer);
 
-  gst_adapter_push (parse->priv->adapter, buf);
-
-  while (ret == GST_FLOW_OK && gst_jpeg_parse_skip_to_jpeg_header (parse)) {
-    if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (parse->priv->next_ts)))
-      parse->priv->next_ts = timestamp;
-
-    if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (duration)))
-      parse->priv->duration = duration;
-
-    /* check if we already have a EOI */
-    len = gst_jpeg_parse_get_image_length (parse);
-    if (len == 0) {
-      return GST_FLOW_OK;
-    } else if (len < 0) {
-      gst_adapter_flush (parse->priv->adapter, -len);
-      continue;
-    }
-
-    GST_LOG_OBJECT (parse, "parsed image of size %d", len);
-
-    /* now we have enough in the adapter to process a full jpeg image */
-    ret = gst_jpeg_parse_push_buffer (parse, len);
+  if (!gst_buffer_map (frame->buffer, &mapinfo, GST_MAP_READ)) {
+    return GST_FLOW_ERROR;
   }
 
-  GST_DEBUG_OBJECT (parse, "No further start marker found.");
-  return ret;
+  if (!gst_jpeg_parse_skip_to_jpeg_header (parse, &mapinfo, skipsize)) {
+    gst_buffer_unmap (frame->buffer, &mapinfo);
+    return GST_FLOW_OK;
+  }
+
+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (parse->priv->next_ts)))
+    parse->priv->next_ts = timestamp;
+
+  if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (duration)))
+    parse->priv->duration = duration;
+
+  len = gst_jpeg_parse_get_image_length (parse, &mapinfo);
+  if (len == 0) {
+    gst_buffer_unmap (frame->buffer, &mapinfo);
+    return GST_FLOW_OK;
+  } else if (len < 0) {
+    *skipsize = -len;
+    gst_buffer_unmap (frame->buffer, &mapinfo);
+    return GST_FLOW_OK;
+  }
+
+  /* check if we already have a EOI */
+  GST_LOG_OBJECT (parse, "parsed image of size %d", len);
+
+  /* reset the offset (only when we flushed) */
+  parse->priv->last_offset = 0;
+  parse->priv->last_entropy_len = 0;
+
+  header_ok = gst_jpeg_parse_read_header (parse, &mapinfo, len);
+
+  gst_buffer_unmap (frame->buffer, &mapinfo);
+
+  if (parse->priv->width != parse->priv->caps_width
+      || parse->priv->height != parse->priv->caps_height
+      || parse->priv->framerate_numerator !=
+      parse->priv->caps_framerate_numerator
+      || parse->priv->framerate_denominator !=
+      parse->priv->caps_framerate_denominator) {
+    if (!gst_jpeg_parse_set_new_caps (parse, header_ok)) {
+      GST_ELEMENT_ERROR (parse, CORE, NEGOTIATION,
+          ("Can't set caps to the src pad"), ("Can't set caps to the src pad"));
+      return GST_FLOW_ERROR;
+    }
+
+    if (parse->priv->tags) {
+      GST_DEBUG_OBJECT (parse, "Pushing tags: %" GST_PTR_FORMAT,
+          parse->priv->tags);
+      gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (parse),
+          gst_event_new_tag (parse->priv->tags));
+      parse->priv->tags = NULL;
+    }
+
+    parse->priv->caps_width = parse->priv->width;
+    parse->priv->caps_height = parse->priv->height;
+    parse->priv->caps_framerate_numerator = parse->priv->framerate_numerator;
+    parse->priv->caps_framerate_denominator =
+        parse->priv->framerate_denominator;
+  }
+
+
+  return gst_base_parse_finish_frame (bparse, frame, len);
 }
 
 static gboolean
-gst_jpeg_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_jpeg_parse_sink_event (GstBaseParse * bparse, GstEvent * event)
 {
-  GstJpegParse *parse = GST_JPEG_PARSE (parent);
+  GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse);
   gboolean res = TRUE;
 
   GST_DEBUG_OBJECT (parse, "event : %s", GST_EVENT_TYPE_NAME (event));
 
   switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_CAPS:
-    {
-      GstCaps *caps;
-
-      gst_event_parse_caps (event, &caps);
-      res = gst_jpeg_parse_sink_setcaps (parse, caps);
-      gst_event_unref (event);
-      break;
-    }
     case GST_EVENT_FLUSH_STOP:
       parse->priv->next_ts = GST_CLOCK_TIME_NONE;
       parse->priv->duration = GST_CLOCK_TIME_NONE;
       parse->priv->last_offset = 0;
       parse->priv->last_entropy_len = 0;
       parse->priv->last_resync = FALSE;
-      gst_adapter_clear (parse->priv->adapter);
-      break;
-    case GST_EVENT_EOS:{
-      /* Push the remaining data, even though it's incomplete */
-      guint available = gst_adapter_available (parse->priv->adapter);
-      if (available > 0)
-        gst_jpeg_parse_push_buffer (parse, available);
-      res = gst_pad_push_event (parse->priv->srcpad, event);
-      break;
-    }
-    case GST_EVENT_SEGMENT:
-      /* Discard any data in the adapter.  There should have been an EOS before
-       * to flush it. */
-      gst_adapter_clear (parse->priv->adapter);
-      gst_event_copy_segment (event, &parse->priv->segment);
-      gst_event_unref (event);
-      parse->priv->new_segment = TRUE;
       break;
     case GST_EVENT_TAG:{
-      if (!parse->priv->new_segment)
-        res = gst_pad_event_default (pad, parent, event);
+      if (gst_pad_has_current_caps (GST_BASE_PARSE_SRC_PAD (parse)))
+        res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (bparse, event);
       else {
         GstTagList *taglist = NULL;
 
@@ -996,64 +888,53 @@
       break;
     }
     default:
-      res = gst_pad_event_default (pad, parent, event);
+      res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (bparse, event);
       break;
   }
 
   return res;
 }
 
-static GstStateChangeReturn
-gst_jpeg_parse_change_state (GstElement * element, GstStateChange transition)
+static gboolean
+gst_jpeg_parse_start (GstBaseParse * bparse)
 {
-  GstStateChangeReturn ret;
   GstJpegParse *parse;
 
-  parse = GST_JPEG_PARSE (element);
+  parse = GST_JPEG_PARSE_CAST (bparse);
 
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      parse->priv->has_fps = FALSE;
+  parse->priv->has_fps = FALSE;
 
-      parse->priv->interlaced = FALSE;
-      parse->priv->width = parse->priv->height = 0;
-      parse->priv->framerate_numerator = 0;
-      parse->priv->framerate_denominator = 1;
+  parse->priv->width = parse->priv->height = 0;
+  parse->priv->framerate_numerator = 0;
+  parse->priv->framerate_denominator = 1;
 
-      parse->priv->caps_framerate_numerator =
-          parse->priv->caps_framerate_denominator = 0;
-      parse->priv->caps_width = parse->priv->caps_height = -1;
+  parse->priv->caps_framerate_numerator =
+      parse->priv->caps_framerate_denominator = 0;
+  parse->priv->caps_width = parse->priv->caps_height = -1;
 
-      parse->priv->new_segment = FALSE;
-      gst_segment_init (&parse->priv->segment, GST_FORMAT_UNDEFINED);
+  parse->priv->next_ts = GST_CLOCK_TIME_NONE;
+  parse->priv->duration = GST_CLOCK_TIME_NONE;
 
-      parse->priv->next_ts = GST_CLOCK_TIME_NONE;
-      parse->priv->duration = GST_CLOCK_TIME_NONE;
+  parse->priv->last_offset = 0;
+  parse->priv->last_entropy_len = 0;
+  parse->priv->last_resync = FALSE;
 
-      parse->priv->last_offset = 0;
-      parse->priv->last_entropy_len = 0;
-      parse->priv->last_resync = FALSE;
+  parse->priv->tags = NULL;
 
-      parse->priv->tags = NULL;
-    default:
-      break;
+  return TRUE;
+}
+
+static gboolean
+gst_jpeg_parse_stop (GstBaseParse * bparse)
+{
+  GstJpegParse *parse;
+
+  parse = GST_JPEG_PARSE_CAST (bparse);
+
+  if (parse->priv->tags) {
+    gst_tag_list_unref (parse->priv->tags);
+    parse->priv->tags = NULL;
   }
 
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-  if (ret != GST_STATE_CHANGE_SUCCESS)
-    return ret;
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_adapter_clear (parse->priv->adapter);
-      if (parse->priv->tags) {
-        gst_tag_list_unref (parse->priv->tags);
-        parse->priv->tags = NULL;
-      }
-      break;
-    default:
-      break;
-  }
-
-  return ret;
+  return TRUE;
 }
diff --git a/gst/jpegformat/gstjpegparse.h b/gst/jpegformat/gstjpegparse.h
index 8f6e9a7..d766516 100644
--- a/gst/jpegformat/gstjpegparse.h
+++ b/gst/jpegformat/gstjpegparse.h
@@ -25,6 +25,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstadapter.h>
+#include <gst/base/gstbaseparse.h>
 
 #include "gstjpegformat.h"
 
@@ -40,18 +41,19 @@
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JPEG_PARSE))
 #define GST_IS_JPEG_PARSE_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEG_PARSE))
+#define GST_JPEG_PARSE_CAST(obj) ((GstJpegParse *)obj)
 
 typedef struct _GstJpegParse           GstJpegParse;
 typedef struct _GstJpegParsePrivate    GstJpegParsePrivate;
 typedef struct _GstJpegParseClass      GstJpegParseClass;
 
 struct _GstJpegParse {
-  GstElement element;
+  GstBaseParse parse;
   GstJpegParsePrivate *priv;
 };
 
 struct _GstJpegParseClass {
-  GstElementClass  parent_class;
+  GstBaseParseClass  parent_class;
 };
 
 GType gst_jpeg_parse_get_type (void);
diff --git a/gst/librfb/Makefile.am b/gst/librfb/Makefile.am
index 3a808a4..d542ffc 100644
--- a/gst/librfb/Makefile.am
+++ b/gst/librfb/Makefile.am
@@ -25,17 +25,3 @@
 	rfbutil.h \
 	gstrfbsrc.h \
 	d3des.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrfbsrc -:SHARED libgstrfbsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrfbsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrfbsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrfbsrc_la_LDFLAGS) \
-	           $(libgstrfbsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-$(GST_API_VERSION)' \
-	> $@
diff --git a/gst/librfb/Makefile.in b/gst/librfb/Makefile.in
index f210dd1..715dd09 100644
--- a/gst/librfb/Makefile.in
+++ b/gst/librfb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/librfb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +100,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +114,6 @@
 	$(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 \
@@ -122,6 +130,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -237,6 +247,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -254,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -280,8 +293,6 @@
 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@
@@ -294,7 +305,6 @@
 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@
@@ -302,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -328,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -351,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -411,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -431,7 +448,6 @@
 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@
@@ -440,7 +456,6 @@
 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@
@@ -453,7 +468,6 @@
 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@
@@ -467,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -478,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -516,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -551,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -580,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -587,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -616,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -626,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -656,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -683,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -721,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -775,7 +810,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/librfb/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/librfb/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1122,20 +1156,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrfbsrc -:SHARED libgstrfbsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrfbsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrfbsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrfbsrc_la_LDFLAGS) \
-	           $(libgstrfbsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-$(GST_API_VERSION)' \
-	> $@
 
 # 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.
diff --git a/gst/librfb/d3des.c b/gst/librfb/d3des.c
index 785a3a8..c05fea3 100644
--- a/gst/librfb/d3des.c
+++ b/gst/librfb/d3des.c
@@ -36,12 +36,12 @@
 static void desfunc (unsigned long *, unsigned long *);
 static void cookey (DESContext * ctx, unsigned long *);
 
-//static unsigned long KnL[32] = { 0L };
+//static const unsigned long KnL[32] = { 0L };
 
-//static unsigned long KnR[32] = { 0L };
-//static unsigned long Kn3[32] = { 0L };
+//static const unsigned long KnR[32] = { 0L };
+//static const unsigned long Kn3[32] = { 0L };
 /* 
- * static unsigned char Df_Key[24] = {
+ * static const unsigned char Df_Key[24] = {
  * 	0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
  * 	0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10,
  * 	0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 };
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c
index cec4077..7f9e591 100644
--- a/gst/librfb/gstrfbsrc.c
+++ b/gst/librfb/gstrfbsrc.c
@@ -36,19 +36,19 @@
 
 enum
 {
-  ARG_0,
-  ARG_HOST,
-  ARG_PORT,
-  ARG_VERSION,
-  ARG_PASSWORD,
-  ARG_OFFSET_X,
-  ARG_OFFSET_Y,
-  ARG_WIDTH,
-  ARG_HEIGHT,
-  ARG_INCREMENTAL,
-  ARG_USE_COPYRECT,
-  ARG_SHARED,
-  ARG_VIEWONLY
+  PROP_0,
+  PROP_HOST,
+  PROP_PORT,
+  PROP_VERSION,
+  PROP_PASSWORD,
+  PROP_OFFSET_X,
+  PROP_OFFSET_Y,
+  PROP_WIDTH,
+  PROP_HEIGHT,
+  PROP_INCREMENTAL,
+  PROP_USE_COPYRECT,
+  PROP_SHARED,
+  PROP_VIEWONLY
 };
 
 GST_DEBUG_CATEGORY_STATIC (rfbsrc_debug);
@@ -102,47 +102,47 @@
   gobject_class->set_property = gst_rfb_src_set_property;
   gobject_class->get_property = gst_rfb_src_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_HOST,
+  g_object_class_install_property (gobject_class, PROP_HOST,
       g_param_spec_string ("host", "Host to connect to", "Host to connect to",
           "127.0.0.1", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_PORT,
+  g_object_class_install_property (gobject_class, PROP_PORT,
       g_param_spec_int ("port", "Port", "Port",
           1, 65535, 5900, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_VERSION,
+  g_object_class_install_property (gobject_class, PROP_VERSION,
       g_param_spec_string ("version", "RFB protocol version",
           "RFB protocol version", "3.3",
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_PASSWORD,
+  g_object_class_install_property (gobject_class, PROP_PASSWORD,
       g_param_spec_string ("password", "Password for authentication",
           "Password for authentication", "",
           G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_OFFSET_X,
+  g_object_class_install_property (gobject_class, PROP_OFFSET_X,
       g_param_spec_int ("offset-x", "x offset for screen scrapping",
           "x offset for screen scrapping", 0, 65535, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_OFFSET_Y,
+  g_object_class_install_property (gobject_class, PROP_OFFSET_Y,
       g_param_spec_int ("offset-y", "y offset for screen scrapping",
           "y offset for screen scrapping", 0, 65535, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_WIDTH,
+  g_object_class_install_property (gobject_class, PROP_WIDTH,
       g_param_spec_int ("width", "width of screen", "width of screen", 0, 65535,
           0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_HEIGHT,
+  g_object_class_install_property (gobject_class, PROP_HEIGHT,
       g_param_spec_int ("height", "height of screen", "height of screen", 0,
           65535, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_INCREMENTAL,
+  g_object_class_install_property (gobject_class, PROP_INCREMENTAL,
       g_param_spec_boolean ("incremental", "Incremental updates",
           "Incremental updates", TRUE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_USE_COPYRECT,
+  g_object_class_install_property (gobject_class, PROP_USE_COPYRECT,
       g_param_spec_boolean ("use-copyrect", "Use copyrect encoding",
           "Use copyrect encoding", FALSE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_SHARED,
+  g_object_class_install_property (gobject_class, PROP_SHARED,
       g_param_spec_boolean ("shared", "Share desktop with other clients",
           "Share desktop with other clients", TRUE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_VIEWONLY,
+  g_object_class_install_property (gobject_class, PROP_VIEWONLY,
       g_param_spec_boolean ("view-only", "Only view the desktop",
           "only view the desktop", FALSE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -249,41 +249,41 @@
   GstRfbSrc *src = GST_RFB_SRC (object);
 
   switch (prop_id) {
-    case ARG_HOST:
+    case PROP_HOST:
       src->host = g_strdup (g_value_get_string (value));
       break;
-    case ARG_PORT:
+    case PROP_PORT:
       src->port = g_value_get_int (value);
       break;
-    case ARG_VERSION:
+    case PROP_VERSION:
       gst_rfb_property_set_version (src, g_strdup (g_value_get_string (value)));
       break;
-    case ARG_PASSWORD:
+    case PROP_PASSWORD:
       g_free (src->decoder->password);
       src->decoder->password = g_strdup (g_value_get_string (value));
       break;
-    case ARG_OFFSET_X:
+    case PROP_OFFSET_X:
       src->decoder->offset_x = g_value_get_int (value);
       break;
-    case ARG_OFFSET_Y:
+    case PROP_OFFSET_Y:
       src->decoder->offset_y = g_value_get_int (value);
       break;
-    case ARG_WIDTH:
+    case PROP_WIDTH:
       src->decoder->rect_width = g_value_get_int (value);
       break;
-    case ARG_HEIGHT:
+    case PROP_HEIGHT:
       src->decoder->rect_height = g_value_get_int (value);
       break;
-    case ARG_INCREMENTAL:
+    case PROP_INCREMENTAL:
       src->incremental_update = g_value_get_boolean (value);
       break;
-    case ARG_USE_COPYRECT:
+    case PROP_USE_COPYRECT:
       src->decoder->use_copyrect = g_value_get_boolean (value);
       break;
-    case ARG_SHARED:
+    case PROP_SHARED:
       src->decoder->shared_flag = g_value_get_boolean (value);
       break;
-    case ARG_VIEWONLY:
+    case PROP_VIEWONLY:
       src->view_only = g_value_get_boolean (value);
       break;
     default:
@@ -299,39 +299,39 @@
   gchar *version;
 
   switch (prop_id) {
-    case ARG_HOST:
+    case PROP_HOST:
       g_value_set_string (value, src->host);
       break;
-    case ARG_PORT:
+    case PROP_PORT:
       g_value_set_int (value, src->port);
       break;
-    case ARG_VERSION:
+    case PROP_VERSION:
       version = gst_rfb_property_get_version (src);
       g_value_set_string (value, version);
       g_free (version);
       break;
-    case ARG_OFFSET_X:
+    case PROP_OFFSET_X:
       g_value_set_int (value, src->decoder->offset_x);
       break;
-    case ARG_OFFSET_Y:
+    case PROP_OFFSET_Y:
       g_value_set_int (value, src->decoder->offset_y);
       break;
-    case ARG_WIDTH:
+    case PROP_WIDTH:
       g_value_set_int (value, src->decoder->rect_width);
       break;
-    case ARG_HEIGHT:
+    case PROP_HEIGHT:
       g_value_set_int (value, src->decoder->rect_height);
       break;
-    case ARG_INCREMENTAL:
+    case PROP_INCREMENTAL:
       g_value_set_boolean (value, src->incremental_update);
       break;
-    case ARG_USE_COPYRECT:
+    case PROP_USE_COPYRECT:
       g_value_set_boolean (value, src->decoder->use_copyrect);
       break;
-    case ARG_SHARED:
+    case PROP_SHARED:
       g_value_set_boolean (value, src->decoder->shared_flag);
       break;
-    case ARG_VIEWONLY:
+    case PROP_VIEWONLY:
       g_value_set_boolean (value, src->view_only);
       break;
     default:
diff --git a/gst/librfb/rfbdecoder.c b/gst/librfb/rfbdecoder.c
index de762ed..88f3b03 100644
--- a/gst/librfb/rfbdecoder.c
+++ b/gst/librfb/rfbdecoder.c
@@ -663,28 +663,38 @@
 
   if (decoder->offset_x > 0) {
     if (decoder->offset_x > decoder->width) {
-      GST_WARNING ("Trying to crop more than the width of the server");
+      GST_WARNING
+          ("Trying to crop more than the width of the server.  Setting offset-x to 0.");
+      decoder->offset_x = 0;
     } else {
       decoder->width -= decoder->offset_x;
     }
   }
   if (decoder->offset_y > 0) {
     if (decoder->offset_y > decoder->height) {
-      GST_WARNING ("Trying to crop more than the height of the server");
+      GST_WARNING
+          ("Trying to crop more than the height of the server. Setting offset-y to 0.");
+      decoder->offset_y = 0;
     } else {
       decoder->height -= decoder->offset_y;
     }
   }
   if (decoder->rect_width > 0) {
     if (decoder->rect_width > decoder->width) {
-      GST_WARNING ("Trying to crop more than the width of the server");
+      GST_WARNING
+          ("Trying to crop more than the width of the server. Setting width to %u.",
+          decoder->width);
+      decoder->rect_width = decoder->width;
     } else {
       decoder->width = decoder->rect_width;
     }
   }
   if (decoder->rect_height > 0) {
     if (decoder->rect_height > decoder->height) {
-      GST_WARNING ("Trying to crop more than the height of the server");
+      GST_WARNING
+          ("Trying to crop more than the height of the server. Setting height to %u.",
+          decoder->height);
+      decoder->rect_height = decoder->height;
     } else {
       decoder->height = decoder->rect_height;
     }
diff --git a/gst/liveadder/Makefile.am b/gst/liveadder/Makefile.am
index d9cc7cf..e6f5d44 100644
--- a/gst/liveadder/Makefile.am
+++ b/gst/liveadder/Makefile.am
@@ -9,17 +9,3 @@
 libgstliveadder_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = liveadder.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstliveadder -:SHARED libgstliveadder \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstliveadder_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstliveadder_la_CFLAGS) \
-	 -:LDFLAGS $(libgstliveadder_la_LDFLAGS) \
-	           $(libgstliveadder_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/liveadder/Makefile.in b/gst/liveadder/Makefile.in
index defce0a..b10e342 100644
--- a/gst/liveadder/Makefile.in
+++ b/gst/liveadder/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/liveadder
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -750,7 +785,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/liveadder/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/liveadder/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1059,20 +1093,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstliveadder -:SHARED libgstliveadder \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstliveadder_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstliveadder_la_CFLAGS) \
-	 -:LDFLAGS $(libgstliveadder_la_LDFLAGS) \
-	           $(libgstliveadder_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index 1c3b7a0..a660419 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -558,7 +558,8 @@
       reset_pad_private (pad);
       GST_OBJECT_UNLOCK (adder);
       ret = gst_pad_push_event (adder->srcpad, event);
-      ret = gst_live_adder_src_activate_mode (adder->srcpad, GST_OBJECT (adder),
+      ret &=
+          gst_live_adder_src_activate_mode (adder->srcpad, GST_OBJECT (adder),
           GST_PAD_MODE_PUSH, TRUE);
       break;
     case GST_EVENT_EOS:
@@ -604,19 +605,15 @@
 gst_live_adder_query_pos_dur (GstLiveAdder * adder, GstFormat format,
     gboolean position, gint64 * outvalue)
 {
+  GValue item = { 0 };
   gint64 max = G_MININT64;
   gboolean res = TRUE;
   GstIterator *it;
   gboolean done = FALSE;
 
-
   it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder));
   while (!done) {
-    GstIteratorResult ires;
-    GValue item = { 0 };
-
-    ires = gst_iterator_next (it, &item);
-    switch (ires) {
+    switch (gst_iterator_next (it, &item)) {
       case GST_ITERATOR_DONE:
         done = TRUE;
         break;
@@ -647,6 +644,7 @@
             max = value;
           }
         }
+        g_value_reset (&item);
         break;
       }
       case GST_ITERATOR_RESYNC:
@@ -659,6 +657,8 @@
         break;
     }
   }
+
+  g_value_unset (&item);
   gst_iterator_free (it);
 
   if (res)
@@ -728,57 +728,15 @@
     {
       /* We need to send the query upstream and add the returned latency to our
        * own */
-      GstClockTime min_latency = 0, max_latency = G_MAXUINT64;
-      GValue item = { 0 };
-      GstIterator *iter = NULL;
-      gboolean done = FALSE;
-
-      iter = gst_element_iterate_sink_pads (GST_ELEMENT (adder));
-
-      while (!done) {
-        switch (gst_iterator_next (iter, &item)) {
-          case GST_ITERATOR_OK:
-          {
-            GstPad *sinkpad = GST_PAD (g_value_get_object (&item));
-            GstClockTime pad_min_latency, pad_max_latency;
-            gboolean pad_us_live;
-
-            if (gst_pad_peer_query (sinkpad, query)) {
-              gst_query_parse_latency (query, &pad_us_live, &pad_min_latency,
-                  &pad_max_latency);
-
-              res = TRUE;
-
-              GST_DEBUG_OBJECT (adder, "Peer latency for pad %s: min %"
-                  GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
-                  GST_PAD_NAME (sinkpad),
-                  GST_TIME_ARGS (pad_min_latency),
-                  GST_TIME_ARGS (pad_max_latency));
-
-              min_latency = MAX (pad_min_latency, min_latency);
-              max_latency = MIN (pad_max_latency, max_latency);
-            }
-          }
-            break;
-          case GST_ITERATOR_RESYNC:
-            min_latency = 0;
-            max_latency = G_MAXUINT64;
-
-            gst_iterator_resync (iter);
-            break;
-          case GST_ITERATOR_ERROR:
-            GST_ERROR_OBJECT (adder, "Error looping sink pads");
-            done = TRUE;
-            break;
-          case GST_ITERATOR_DONE:
-            done = TRUE;
-            break;
-        }
-      }
-      gst_iterator_free (iter);
+      res = gst_pad_query_default (pad, parent, query);
 
       if (res) {
         GstClockTime my_latency = adder->latency_ms * GST_MSECOND;
+        GstClockTime min_latency, max_latency;
+        gboolean live;
+
+        gst_query_parse_latency (query, &live, &min_latency, &max_latency);
+
         GST_OBJECT_LOCK (adder);
         adder->peer_latency = min_latency;
         min_latency += my_latency;
@@ -865,24 +823,19 @@
 static gboolean
 forward_event (GstLiveAdder * adder, GstEvent * event)
 {
-  gboolean ret;
   GstIterator *it;
   GValue vret = { 0 };
 
   GST_LOG_OBJECT (adder, "Forwarding event %p (%s)", event,
       GST_EVENT_TYPE_NAME (event));
 
-  ret = TRUE;
-
   g_value_init (&vret, G_TYPE_BOOLEAN);
   g_value_set_boolean (&vret, TRUE);
   it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder));
   gst_iterator_fold (it, forward_event_func, &vret, event);
   gst_iterator_free (it);
 
-  ret = g_value_get_boolean (&vret);
-
-  return ret;
+  return g_value_get_boolean (&vret);
 }
 
 
@@ -923,8 +876,16 @@
   return (guint) ret;
 }
 
+static GstClockTime
+gst_live_adder_length_to_duration (GstLiveAdder * adder, guint size)
+{
+  return GST_FRAMES_TO_CLOCK_TIME ((size /
+          GST_AUDIO_INFO_BPF (&adder->info)),
+      GST_AUDIO_INFO_RATE (&adder->info));
+}
+
 static GstFlowReturn
-gst_live_live_adder_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+gst_live_adder_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
 {
   GstLiveAdder *adder = GST_LIVE_ADDER (parent);
   GstLiveAdderPadPrivate *padprivate = NULL;
@@ -932,6 +893,9 @@
   GList *item = NULL;
   GstClockTime skip = 0;
   gint64 drift = 0;             /* Positive if new buffer after old buffer */
+  gsize buffer_size = 0;
+  gsize subbuffer_size = 0;
+  gsize offset = 0;
 
   GST_OBJECT_LOCK (adder);
 
@@ -1084,9 +1048,19 @@
       GstClockTime subbuffer_duration = GST_BUFFER_TIMESTAMP (oldbuffer) -
           (GST_BUFFER_TIMESTAMP (buffer) + skip);
 
+      buffer_size = gst_buffer_get_size (buffer);
+      offset = gst_live_adder_length_from_duration (adder, skip);
+      subbuffer_size = gst_live_adder_length_from_duration (adder,
+          subbuffer_duration);
+
+      if (offset + subbuffer_size > buffer_size) {
+        subbuffer_size = buffer_size - offset;
+        subbuffer_duration = gst_live_adder_length_to_duration (adder,
+            subbuffer_size);
+      }
+
       subbuffer = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL,
-          gst_live_adder_length_from_duration (adder, skip),
-          gst_live_adder_length_from_duration (adder, subbuffer_duration));
+          offset, subbuffer_size);
 
       GST_BUFFER_TIMESTAMP (subbuffer) = GST_BUFFER_TIMESTAMP (buffer) + skip;
       GST_BUFFER_DURATION (subbuffer) = subbuffer_duration;
@@ -1137,10 +1111,22 @@
     if (skip) {
       GstClockTime subbuffer_duration = GST_BUFFER_DURATION (buffer) - skip;
       GstClockTime subbuffer_ts = GST_BUFFER_TIMESTAMP (buffer) + skip;
-      GstBuffer *new_buffer = gst_buffer_copy_region (buffer,
-          GST_BUFFER_COPY_ALL,
-          gst_live_adder_length_from_duration (adder, skip),
-          gst_live_adder_length_from_duration (adder, subbuffer_duration));
+      GstBuffer *new_buffer;
+
+      buffer_size = gst_buffer_get_size (buffer);
+      offset = gst_live_adder_length_from_duration (adder, skip);
+      subbuffer_size = gst_live_adder_length_from_duration (adder,
+          subbuffer_duration);
+
+      if (offset + subbuffer_size > buffer_size) {
+        subbuffer_size = buffer_size - offset;
+        subbuffer_duration = gst_live_adder_length_to_duration (adder,
+            subbuffer_size);
+      }
+
+      new_buffer = gst_buffer_copy_region (buffer,
+          GST_BUFFER_COPY_ALL, offset, subbuffer_size);
+
       gst_buffer_unref (buffer);
       buffer = new_buffer;
       GST_BUFFER_PTS (buffer) = subbuffer_ts;
@@ -1396,11 +1382,7 @@
   adder = GST_LIVE_ADDER (element);
 
   /* increment pad counter */
-#if GLIB_CHECK_VERSION(2,29,5)
   padcount = g_atomic_int_add (&adder->padcount, 1);
-#else
-  padcount = g_atomic_int_exchange_and_add (&adder->padcount, 1);
-#endif
 
   name = g_strdup_printf ("sink_%u", padcount);
   newpad = gst_pad_new_from_template (templ, name);
@@ -1420,7 +1402,7 @@
 
   gst_pad_set_element_private (newpad, padprivate);
 
-  gst_pad_set_chain_function (newpad, gst_live_live_adder_chain);
+  gst_pad_set_chain_function (newpad, gst_live_adder_chain);
 
 
   if (!gst_pad_set_active (newpad, TRUE))
diff --git a/gst/midi/Makefile.am b/gst/midi/Makefile.am
index 058a778..55f12df 100644
--- a/gst/midi/Makefile.am
+++ b/gst/midi/Makefile.am
@@ -14,17 +14,3 @@
 libgstmidi_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = midiparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmidi -:SHARED libgstmidi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmidi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmidi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmidi_la_LDFLAGS) \
-	           $(libgstmidi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
diff --git a/gst/midi/Makefile.in b/gst/midi/Makefile.in
index 7fe5eec..bcadd39 100644
--- a/gst/midi/Makefile.in
+++ b/gst/midi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/midi
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -757,7 +792,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/midi/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/midi/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1074,20 +1108,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmidi -:SHARED libgstmidi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmidi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmidi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmidi_la_LDFLAGS) \
-	           $(libgstmidi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-1.0' \
-	> $@
 
 # 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.
diff --git a/gst/midi/midiparse.c b/gst/midi/midiparse.c
index c42c1b5..2f817c7 100644
--- a/gst/midi/midiparse.c
+++ b/gst/midi/midiparse.c
@@ -21,7 +21,7 @@
 
 /**
  * SECTION:element-midiparse
- * @see_also: fluidsynth
+ * @see_also: fluiddec
  *
  * This element parses midi-files into midi events. You would need a midi
  * renderer such as fluidsynth to convert the events into raw samples.
@@ -29,7 +29,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch-1.0 filesrc location=song.mid ! midiparse ! fluidsynth ! pulsesink
+ * gst-launch-1.0 filesrc location=song.mid ! midiparse ! fluiddec ! pulsesink
  * ]| This example pipeline will parse the midi and render to raw audio which is
  * played via pulseaudio.
  * </refsect2>
diff --git a/gst/mpegdemux/Makefile.am b/gst/mpegdemux/Makefile.am
index 5c23016..df59955 100644
--- a/gst/mpegdemux/Makefile.am
+++ b/gst/mpegdemux/Makefile.am
@@ -19,17 +19,3 @@
 	gstmpegdefs.h   \
 	gstmpegdemux.h  \
 	gstpesfilter.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegpsdemux -:SHARED libgstmpegpsdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegpsdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegpsdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegpsdemux_la_LDFLAGS) \
-	           $(libgstmpegpsdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/mpegdemux/Makefile.in b/gst/mpegdemux/Makefile.in
index 24fc6b6..c122ac6 100644
--- a/gst/mpegdemux/Makefile.in
+++ b/gst/mpegdemux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mpegdemux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -764,7 +799,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mpegdemux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mpegdemux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1089,20 +1123,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegpsdemux -:SHARED libgstmpegpsdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegpsdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegpsdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegpsdemux_la_LDFLAGS) \
-	           $(libgstmpegpsdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 90c00cb..eb2848b 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -89,8 +89,7 @@
 
 enum
 {
-  ARG_0,
-  ARG_SYNC,
+  PROP_0,
   /* FILL ME */
 };
 
@@ -134,41 +133,41 @@
     GST_PAD_SOMETIMES,
     GST_STATIC_CAPS_ANY);
 
-static void gst_flups_demux_base_init (GstFluPSDemuxClass * klass);
-static void gst_flups_demux_class_init (GstFluPSDemuxClass * klass);
-static void gst_flups_demux_init (GstFluPSDemux * demux);
-static void gst_flups_demux_finalize (GstFluPSDemux * demux);
-static void gst_flups_demux_reset (GstFluPSDemux * demux);
+static void gst_ps_demux_base_init (GstPsDemuxClass * klass);
+static void gst_ps_demux_class_init (GstPsDemuxClass * klass);
+static void gst_ps_demux_init (GstPsDemux * demux);
+static void gst_ps_demux_finalize (GstPsDemux * demux);
+static void gst_ps_demux_reset (GstPsDemux * demux);
 
-static gboolean gst_flups_demux_sink_event (GstPad * pad, GstObject * parent,
+static gboolean gst_ps_demux_sink_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
-static GstFlowReturn gst_flups_demux_chain (GstPad * pad, GstObject * parent,
+static GstFlowReturn gst_ps_demux_chain (GstPad * pad, GstObject * parent,
     GstBuffer * buffer);
-static gboolean gst_flups_demux_sink_activate (GstPad * sinkpad,
+static gboolean gst_ps_demux_sink_activate (GstPad * sinkpad,
     GstObject * parent);
-static gboolean gst_flups_demux_sink_activate_mode (GstPad * pad,
+static gboolean gst_ps_demux_sink_activate_mode (GstPad * pad,
     GstObject * parent, GstPadMode mode, gboolean active);
-static void gst_flups_demux_loop (GstPad * pad);
+static void gst_ps_demux_loop (GstPad * pad);
 
-static gboolean gst_flups_demux_src_event (GstPad * pad, GstObject * parent,
+static gboolean gst_ps_demux_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
-static gboolean gst_flups_demux_src_query (GstPad * pad, GstObject * parent,
+static gboolean gst_ps_demux_src_query (GstPad * pad, GstObject * parent,
     GstQuery * query);
 
-static GstStateChangeReturn gst_flups_demux_change_state (GstElement * element,
+static GstStateChangeReturn gst_ps_demux_change_state (GstElement * element,
     GstStateChange transition);
 
-static inline gboolean gst_flups_demux_scan_forward_ts (GstFluPSDemux * demux,
+static inline gboolean gst_ps_demux_scan_forward_ts (GstPsDemux * demux,
     guint64 * pos, SCAN_MODE mode, guint64 * rts, gint limit);
-static inline gboolean gst_flups_demux_scan_backward_ts (GstFluPSDemux * demux,
+static inline gboolean gst_ps_demux_scan_backward_ts (GstPsDemux * demux,
     guint64 * pos, SCAN_MODE mode, guint64 * rts, gint limit);
 
-static inline void gst_flups_demux_send_gap_updates (GstFluPSDemux * demux,
+static inline void gst_ps_demux_send_gap_updates (GstPsDemux * demux,
     GstClockTime new_time);
-static inline void gst_flups_demux_clear_times (GstFluPSDemux * demux);
+static inline void gst_ps_demux_clear_times (GstPsDemux * demux);
 
-static void gst_flups_demux_reset_psm (GstFluPSDemux * demux);
-static void gst_flups_demux_flush (GstFluPSDemux * demux);
+static void gst_ps_demux_reset_psm (GstPsDemux * demux);
+static void gst_ps_demux_flush (GstPsDemux * demux);
 
 static GstElementClass *parent_class = NULL;
 
@@ -177,40 +176,40 @@
 static void gst_segment_set_duration (GstSegment * segment, GstFormat format,
     guint64 duration);
 
-/*static guint gst_flups_demux_signals[LAST_SIGNAL] = { 0 };*/
+/*static guint gst_ps_demux_signals[LAST_SIGNAL] = { 0 };*/
 
 GType
-gst_flups_demux_get_type (void)
+gst_ps_demux_get_type (void)
 {
-  static GType flups_demux_type = 0;
+  static GType ps_demux_type = 0;
 
-  if (!flups_demux_type) {
-    static const GTypeInfo flups_demux_info = {
-      sizeof (GstFluPSDemuxClass),
-      (GBaseInitFunc) gst_flups_demux_base_init,
+  if (!ps_demux_type) {
+    static const GTypeInfo ps_demux_info = {
+      sizeof (GstPsDemuxClass),
+      (GBaseInitFunc) gst_ps_demux_base_init,
       NULL,
-      (GClassInitFunc) gst_flups_demux_class_init,
+      (GClassInitFunc) gst_ps_demux_class_init,
       NULL,
       NULL,
-      sizeof (GstFluPSDemux),
+      sizeof (GstPsDemux),
       0,
-      (GInstanceInitFunc) gst_flups_demux_init,
+      (GInstanceInitFunc) gst_ps_demux_init,
       NULL
     };
 
-    flups_demux_type =
+    ps_demux_type =
         g_type_register_static (GST_TYPE_ELEMENT, "GstMpegPSDemux",
-        &flups_demux_info, 0);
+        &ps_demux_info, 0);
 
     GST_DEBUG_CATEGORY_INIT (gstflupsdemux_debug, "mpegpsdemux", 0,
         "MPEG program stream demultiplexer element");
   }
 
-  return flups_demux_type;
+  return ps_demux_type;
 }
 
 static void
-gst_flups_demux_base_init (GstFluPSDemuxClass * klass)
+gst_ps_demux_base_init (GstPsDemuxClass * klass)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
 
@@ -234,7 +233,7 @@
 }
 
 static void
-gst_flups_demux_class_init (GstFluPSDemuxClass * klass)
+gst_ps_demux_class_init (GstPsDemuxClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
@@ -244,45 +243,45 @@
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
 
-  gobject_class->finalize = (GObjectFinalizeFunc) gst_flups_demux_finalize;
+  gobject_class->finalize = (GObjectFinalizeFunc) gst_ps_demux_finalize;
 
-  gstelement_class->change_state = gst_flups_demux_change_state;
+  gstelement_class->change_state = gst_ps_demux_change_state;
 }
 
 static void
-gst_flups_demux_init (GstFluPSDemux * demux)
+gst_ps_demux_init (GstPsDemux * demux)
 {
-  GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux);
+  GstPsDemuxClass *klass = GST_PS_DEMUX_GET_CLASS (demux);
 
   demux->sinkpad = gst_pad_new_from_template (klass->sink_template, "sink");
   gst_pad_set_event_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_sink_event));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_sink_event));
   gst_pad_set_chain_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_chain));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_chain));
   gst_pad_set_activate_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_sink_activate));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_sink_activate));
   gst_pad_set_activatemode_function (demux->sinkpad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_sink_activate_mode));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_sink_activate_mode));
 
   gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
 
   demux->streams =
-      g_malloc0 (sizeof (GstFluPSStream *) * (GST_FLUPS_DEMUX_MAX_STREAMS));
+      g_malloc0 (sizeof (GstPsStream *) * (GST_PS_DEMUX_MAX_STREAMS));
   demux->streams_found =
-      g_malloc0 (sizeof (GstFluPSStream *) * (GST_FLUPS_DEMUX_MAX_STREAMS));
+      g_malloc0 (sizeof (GstPsStream *) * (GST_PS_DEMUX_MAX_STREAMS));
   demux->found_count = 0;
 
   demux->adapter = gst_adapter_new ();
   demux->rev_adapter = gst_adapter_new ();
   demux->flowcombiner = gst_flow_combiner_new ();
 
-  gst_flups_demux_reset (demux);
+  gst_ps_demux_reset (demux);
 }
 
 static void
-gst_flups_demux_finalize (GstFluPSDemux * demux)
+gst_ps_demux_finalize (GstPsDemux * demux)
 {
-  gst_flups_demux_reset (demux);
+  gst_ps_demux_reset (demux);
   g_free (demux->streams);
   g_free (demux->streams_found);
 
@@ -294,18 +293,20 @@
 }
 
 static void
-gst_flups_demux_reset (GstFluPSDemux * demux)
+gst_ps_demux_reset (GstPsDemux * demux)
 {
   /* Clean up the streams and pads we allocated */
   gint i;
 
-  for (i = 0; i < GST_FLUPS_DEMUX_MAX_STREAMS; i++) {
-    GstFluPSStream *stream = demux->streams[i];
+  for (i = 0; i < GST_PS_DEMUX_MAX_STREAMS; i++) {
+    GstPsStream *stream = demux->streams[i];
 
     if (stream != NULL) {
       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);
+      } else {
+        gst_object_unref (stream->pad);
       }
 
       if (stream->pending_tags)
@@ -315,7 +316,7 @@
     }
   }
   memset (demux->streams_found, 0,
-      sizeof (GstFluPSStream *) * (GST_FLUPS_DEMUX_MAX_STREAMS));
+      sizeof (GstPsStream *) * (GST_PS_DEMUX_MAX_STREAMS));
   demux->found_count = 0;
 
   gst_adapter_clear (demux->adapter);
@@ -335,21 +336,21 @@
   demux->next_dts = G_MAXUINT64;
   demux->need_no_more_pads = TRUE;
   demux->adjust_segment = TRUE;
-  gst_flups_demux_reset_psm (demux);
+  gst_ps_demux_reset_psm (demux);
   gst_segment_init (&demux->sink_segment, GST_FORMAT_UNDEFINED);
   gst_segment_init (&demux->src_segment, GST_FORMAT_TIME);
-  gst_flups_demux_flush (demux);
+  gst_ps_demux_flush (demux);
   demux->have_group_id = FALSE;
   demux->group_id = G_MAXUINT;
 }
 
-static GstFluPSStream *
-gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type)
+static GstPsStream *
+gst_ps_demux_create_stream (GstPsDemux * demux, gint id, gint stream_type)
 {
-  GstFluPSStream *stream;
+  GstPsStream *stream;
   GstPadTemplate *template;
   gchar *name;
-  GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux);
+  GstPsDemuxClass *klass = GST_PS_DEMUX_GET_CLASS (demux);
   GstCaps *caps;
   GstClockTime threshold = SEGMENT_THRESHOLD;
   GstEvent *event;
@@ -454,7 +455,7 @@
     return FALSE;
   }
 
-  stream = g_new0 (GstFluPSStream, 1);
+  stream = g_new0 (GstPsStream, 1);
   stream->id = id;
   stream->discont = TRUE;
   stream->need_segment = TRUE;
@@ -464,9 +465,9 @@
   stream->pad = gst_pad_new_from_template (template, name);
   stream->segment_thresh = threshold;
   gst_pad_set_event_function (stream->pad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_src_event));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_src_event));
   gst_pad_set_query_function (stream->pad,
-      GST_DEBUG_FUNCPTR (gst_flups_demux_src_query));
+      GST_DEBUG_FUNCPTR (gst_ps_demux_src_query));
   gst_pad_use_fixed_caps (stream->pad);
 
   /* needed for set_caps to work */
@@ -511,13 +512,13 @@
   return stream;
 }
 
-static GstFluPSStream *
-gst_flups_demux_get_stream (GstFluPSDemux * demux, gint id, gint type)
+static GstPsStream *
+gst_ps_demux_get_stream (GstPsDemux * demux, gint id, gint type)
 {
-  GstFluPSStream *stream = demux->streams[id];
+  GstPsStream *stream = demux->streams[id];
 
   if (stream == NULL) {
-    if (!(stream = gst_flups_demux_create_stream (demux, id, type)))
+    if (!(stream = gst_ps_demux_create_stream (demux, id, type)))
       goto unknown_stream;
 
     GST_DEBUG_OBJECT (demux, "adding pad for stream id 0x%02x type 0x%02x", id,
@@ -532,6 +533,7 @@
        * add a whole new set of pads, drop old and no-more-pads again */
       GST_DEBUG_OBJECT (demux,
           "but already signalled no-more-pads; not adding");
+      gst_object_ref_sink (stream->pad);
     }
 
     demux->streams[id] = stream;
@@ -547,8 +549,25 @@
   }
 }
 
+static GstPsStream *
+gst_ps_demux_get_stream_from_pad (GstPsDemux * demux, GstPad * srcpad)
+{
+  gint i, count;
+
+  count = demux->found_count;
+  for (i = 0; i < count; i++) {
+    GstPsStream *stream = demux->streams_found[i];
+
+    if (stream && stream->pad == srcpad)
+      return stream;
+  }
+
+  GST_DEBUG_OBJECT (srcpad, "no stream found for pad!");
+  return NULL;
+}
+
 static inline void
-gst_flups_demux_send_segment (GstFluPSDemux * demux, GstFluPSStream * stream,
+gst_ps_demux_send_segment (GstPsDemux * demux, GstPsStream * stream,
     GstClockTime pts)
 {
   /* discont */
@@ -604,7 +623,7 @@
 }
 
 static GstFlowReturn
-gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream,
+gst_ps_demux_send_data (GstPsDemux * demux, GstPsStream * stream,
     GstBuffer * buf)
 {
   GstFlowReturn result;
@@ -619,7 +638,7 @@
   if (G_UNLIKELY (demux->next_dts != G_MAXUINT64))
     dts = MPEGTIME_TO_GSTTIME (demux->next_dts);
 
-  gst_flups_demux_send_segment (demux, stream, pts);
+  gst_ps_demux_send_segment (demux, stream, pts);
 
   /* OK, sent new segment now prepare the buffer for sending */
   GST_BUFFER_PTS (buf) = pts;
@@ -645,7 +664,7 @@
       stream->last_ts = new_time;
     }
 
-    gst_flups_demux_send_gap_updates (demux, new_time);
+    gst_ps_demux_send_gap_updates (demux, new_time);
   }
 
   /* Set the buffer discont flag, and clear discont state on the stream */
@@ -681,14 +700,14 @@
 }
 
 static inline void
-gst_flups_demux_mark_discont (GstFluPSDemux * demux, gboolean discont,
+gst_ps_demux_mark_discont (GstPsDemux * demux, gboolean discont,
     gboolean need_segment)
 {
   gint i, count = demux->found_count;
 
   /* mark discont on all streams */
   for (i = 0; i < count; i++) {
-    GstFluPSStream *stream = demux->streams_found[i];
+    GstPsStream *stream = demux->streams_found[i];
 
     if (G_LIKELY (stream)) {
       stream->discont |= discont;
@@ -701,13 +720,13 @@
 }
 
 static gboolean
-gst_flups_demux_send_event (GstFluPSDemux * demux, GstEvent * event)
+gst_ps_demux_send_event (GstPsDemux * demux, GstEvent * event)
 {
   gint i, count = demux->found_count;
   gboolean ret = FALSE;
 
   for (i = 0; i < count; i++) {
-    GstFluPSStream *stream = demux->streams_found[i];
+    GstPsStream *stream = demux->streams_found[i];
 
     if (stream) {
       if (!gst_pad_push_event (stream->pad, gst_event_ref (event))) {
@@ -727,20 +746,20 @@
 }
 
 static gboolean
-gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event)
+gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
 {
   const GstStructure *structure = gst_event_get_structure (event);
   const char *type = gst_structure_get_string (structure, "event");
   gint i;
   gchar cur_stream_name[32];
-  GstFluPSStream *temp = NULL;
+  GstPsStream *temp = NULL;
   const gchar *lang_code;
 
   if (strcmp (type, "dvd-lang-codes") == 0) {
     GST_DEBUG_OBJECT (demux, "Handling language codes event");
 
     /* Create a video pad to ensure have it before emit no more pads */
-    (void) gst_flups_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2);
+    (void) gst_ps_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2);
 
     /* Read out the languages for audio streams and request each one that 
      * is present */
@@ -765,7 +784,7 @@
           GST_DEBUG_OBJECT (demux,
               "Audio stream %d format %d ID 0x%02x - AC3", i,
               stream_format, stream_id);
-          temp = gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_AC3);
+          temp = gst_ps_demux_get_stream (demux, stream_id, ST_PS_AUDIO_AC3);
           break;
         case 0x2:
         case 0x3:
@@ -775,7 +794,7 @@
           GST_DEBUG_OBJECT (demux,
               "Audio stream %d format %d ID 0x%02x - MPEG audio", i,
               stream_format, stream_id);
-          temp = gst_flups_demux_get_stream (demux, stream_id, ST_AUDIO_MPEG1);
+          temp = gst_ps_demux_get_stream (demux, stream_id, ST_AUDIO_MPEG1);
           break;
         case 0x4:
           /* LPCM */
@@ -783,8 +802,7 @@
           GST_DEBUG_OBJECT (demux,
               "Audio stream %d format %d ID 0x%02x - DVD LPCM", i,
               stream_format, stream_id);
-          temp =
-              gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_LPCM);
+          temp = gst_ps_demux_get_stream (demux, stream_id, ST_PS_AUDIO_LPCM);
           break;
         case 0x6:
           /* DTS */
@@ -792,7 +810,7 @@
           GST_DEBUG_OBJECT (demux,
               "Audio stream %d format %d ID 0x%02x - DTS", i,
               stream_format, stream_id);
-          temp = gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_DTS);
+          temp = gst_ps_demux_get_stream (demux, stream_id, ST_PS_AUDIO_DTS);
           break;
         case 0x7:
           /* FIXME: What range is SDDS? */
@@ -804,6 +822,9 @@
           continue;
       }
 
+      if (temp == NULL)
+        continue;
+
       g_snprintf (cur_stream_name, 32, "audio-%d-language", i);
       lang_code = gst_structure_get_string (structure, cur_stream_name);
       if (lang_code) {
@@ -835,8 +856,10 @@
           0x20 + stream_id);
 
       /* Retrieve the subpicture stream to force pad creation */
-      temp = gst_flups_demux_get_stream (demux, 0x20 + stream_id,
+      temp = gst_ps_demux_get_stream (demux, 0x20 + stream_id,
           ST_PS_DVD_SUBPICTURE);
+      if (temp == NULL)
+        continue;
 
       g_snprintf (cur_stream_name, 32, "subpicture-%d-language", i);
       lang_code = gst_structure_get_string (structure, cur_stream_name);
@@ -859,7 +882,7 @@
   } else {
     /* forward to all pads, e.g. dvd clut event */
     gst_event_ref (event);
-    gst_flups_demux_send_event (demux, event);
+    gst_ps_demux_send_event (demux, event);
   }
 
   gst_event_unref (event);
@@ -867,26 +890,27 @@
 }
 
 static void
-gst_flups_demux_flush (GstFluPSDemux * demux)
+gst_ps_demux_flush (GstPsDemux * demux)
 {
   GST_DEBUG_OBJECT (demux, "flushing demuxer");
   gst_adapter_clear (demux->adapter);
   gst_adapter_clear (demux->rev_adapter);
   gst_pes_filter_drain (&demux->filter);
-  gst_flups_demux_clear_times (demux);
+  gst_ps_demux_clear_times (demux);
   demux->adapter_offset = G_MAXUINT64;
   demux->current_scr = G_MAXUINT64;
   demux->bytes_since_scr = 0;
 }
 
 static inline void
-gst_flups_demux_clear_times (GstFluPSDemux * demux)
+gst_ps_demux_clear_times (GstPsDemux * demux)
 {
   gint i, count = demux->found_count;
 
+  gst_flow_combiner_reset (demux->flowcombiner);
   /* Clear the last ts for all streams */
   for (i = 0; i < count; i++) {
-    GstFluPSStream *stream = demux->streams_found[i];
+    GstPsStream *stream = demux->streams_found[i];
 
     if (G_LIKELY (stream)) {
       stream->last_ts = GST_CLOCK_TIME_NONE;
@@ -895,7 +919,7 @@
 }
 
 static inline void
-gst_flups_demux_send_gap_updates (GstFluPSDemux * demux, GstClockTime new_start)
+gst_ps_demux_send_gap_updates (GstPsDemux * demux, GstClockTime new_start)
 {
   GstClockTime base_time, stop;
   gint i, count = demux->found_count;
@@ -914,7 +938,7 @@
 
   /* FIXME: Handle reverse playback */
   for (i = 0; i < count; i++) {
-    GstFluPSStream *stream = demux->streams_found[i];
+    GstPsStream *stream = demux->streams_found[i];
 
     if (stream) {
       if (stream->last_ts == GST_CLOCK_TIME_NONE ||
@@ -923,7 +947,7 @@
 
       if (stream->last_ts + stream->segment_thresh < new_start) {
         /* should send segment info before gap event */
-        gst_flups_demux_send_segment (demux, stream, GST_CLOCK_TIME_NONE);
+        gst_ps_demux_send_segment (demux, stream, GST_CLOCK_TIME_NONE);
 
         GST_LOG_OBJECT (demux,
             "Sending gap update to pad %s time %" GST_TIME_FORMAT,
@@ -938,25 +962,25 @@
 }
 
 static inline gboolean
-have_open_streams (GstFluPSDemux * demux)
+have_open_streams (GstPsDemux * demux)
 {
   return (demux->streams_found[0] != NULL);
 }
 
 static gboolean
-gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_ps_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
   gboolean res = TRUE;
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_FLUSH_START:
-      gst_flups_demux_send_event (demux, event);
+      gst_ps_demux_send_event (demux, event);
       break;
     case GST_EVENT_FLUSH_STOP:
-      gst_flups_demux_send_event (demux, event);
+      gst_ps_demux_send_event (demux, event);
       gst_segment_init (&demux->sink_segment, GST_FORMAT_UNDEFINED);
-      gst_flups_demux_flush (demux);
+      gst_ps_demux_flush (demux);
       break;
     case GST_EVENT_SEGMENT:
     {
@@ -968,7 +992,7 @@
       GST_INFO_OBJECT (demux, "received segment %" GST_SEGMENT_FORMAT, segment);
 
       /* we need to emit a new segment */
-      gst_flups_demux_mark_discont (demux, TRUE, TRUE);
+      gst_ps_demux_mark_discont (demux, TRUE, TRUE);
 
       if (segment->format == GST_FORMAT_BYTES
           && demux->scr_rate_n != G_MAXUINT64
@@ -993,7 +1017,7 @@
     }
     case GST_EVENT_EOS:
       GST_INFO_OBJECT (demux, "Received EOS");
-      if (!gst_flups_demux_send_event (demux, event)
+      if (!gst_ps_demux_send_event (demux, event)
           && !have_open_streams (demux)) {
         GST_WARNING_OBJECT (demux, "EOS and no streams open");
         GST_ELEMENT_ERROR (demux, STREAM, FAILED,
@@ -1007,9 +1031,9 @@
 
       if (structure != NULL
           && gst_structure_has_name (structure, "application/x-gst-dvd")) {
-        res = gst_flups_demux_handle_dvd_event (demux, event);
+        res = gst_ps_demux_handle_dvd_event (demux, event);
       } else {
-        gst_flups_demux_send_event (demux, event);
+        gst_ps_demux_send_event (demux, event);
       }
       break;
     }
@@ -1017,7 +1041,7 @@
       gst_event_unref (event);
       break;
     default:
-      gst_flups_demux_send_event (demux, event);
+      gst_ps_demux_send_event (demux, event);
       break;
   }
 
@@ -1025,7 +1049,7 @@
 }
 
 static gboolean
-gst_flups_demux_handle_seek_push (GstFluPSDemux * demux, GstEvent * event)
+gst_ps_demux_handle_seek_push (GstPsDemux * demux, GstEvent * event)
 {
   gboolean res = FALSE;
   gdouble rate;
@@ -1095,14 +1119,13 @@
 
 /* Binary search for requested SCR */
 static inline guint64
-find_offset (GstFluPSDemux * demux, guint64 scr,
+find_offset (GstPsDemux * demux, guint64 scr,
     guint64 min_scr, guint64 min_scr_offset,
     guint64 max_scr, guint64 max_scr_offset, int recursion_count)
 {
   guint64 scr_rate_n = max_scr_offset - min_scr_offset;
   guint64 scr_rate_d = max_scr - min_scr;
   guint64 fscr = scr;
-  gboolean found;
   guint64 offset;
 
   if (recursion_count > MAX_RECURSION_COUNT) {
@@ -1113,11 +1136,8 @@
       MIN (gst_util_uint64_scale (scr - min_scr, scr_rate_n,
           scr_rate_d), demux->sink_segment.stop);
 
-  found = gst_flups_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
-
-  if (!found) {
-    found =
-        gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+  if (!gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0)) {
+    gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
   }
 
   if (fscr == scr || fscr == min_scr || fscr == max_scr) {
@@ -1134,9 +1154,9 @@
 }
 
 static inline gboolean
-gst_flups_demux_do_seek (GstFluPSDemux * demux, GstSegment * seeksegment)
+gst_ps_demux_do_seek (GstPsDemux * demux, GstSegment * seeksegment)
 {
-  gboolean found = FALSE;
+  gboolean found;
   guint64 fscr, offset;
   guint64 scr = GSTTIME_TO_MPEGTIME (seeksegment->position + demux->base_time);
 
@@ -1161,16 +1181,18 @@
     return FALSE;
   }
 
+  found = gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+  if (!found)
+    found = gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+
   while (found && fscr < scr) {
     offset++;
-    found =
-        gst_flups_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+    found = gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
   }
 
   while (found && fscr > scr && offset > 0) {
     offset--;
-    found =
-        gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+    found = gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
   }
 
   GST_INFO_OBJECT (demux, "doing seek at offset %" G_GUINT64_FORMAT
@@ -1183,7 +1205,7 @@
 }
 
 static gboolean
-gst_flups_demux_handle_seek_pull (GstFluPSDemux * demux, GstEvent * event)
+gst_ps_demux_handle_seek_pull (GstPsDemux * demux, GstEvent * event)
 {
   GstFormat format;
   GstSeekFlags flags;
@@ -1214,7 +1236,7 @@
     /* Flush start up and downstream to make sure data flow and loops are
        idle */
     demux->flushing = TRUE;
-    gst_flups_demux_send_event (demux, gst_event_new_flush_start ());
+    gst_ps_demux_send_event (demux, gst_event_new_flush_start ());
     gst_pad_push_event (demux->sinkpad, gst_event_new_flush_start ());
   } else {
     /* Pause the pulling task */
@@ -1246,7 +1268,7 @@
 
   if (flush || seeksegment.position != demux->src_segment.position) {
     /* Do the actual seeking */
-    if (!gst_flups_demux_do_seek (demux, &seeksegment)) {
+    if (!gst_ps_demux_do_seek (demux, &seeksegment)) {
       return FALSE;
     }
   }
@@ -1267,11 +1289,11 @@
 
   if (flush) {
     /* Stop flushing, the sinks are at time 0 now */
-    gst_flups_demux_send_event (demux, gst_event_new_flush_stop (TRUE));
+    gst_ps_demux_send_event (demux, gst_event_new_flush_stop (TRUE));
   }
 
   if (flush || seeksegment.position != demux->src_segment.position) {
-    gst_flups_demux_flush (demux);
+    gst_ps_demux_flush (demux);
   }
 
   /* Ok seek succeeded, take the newly configured segment */
@@ -1285,10 +1307,10 @@
   }
 
   /* Tell all the stream a new segment is needed */
-  gst_flups_demux_mark_discont (demux, TRUE, TRUE);
+  gst_ps_demux_mark_discont (demux, TRUE, TRUE);
 
   gst_pad_start_task (demux->sinkpad,
-      (GstTaskFunction) gst_flups_demux_loop, demux->sinkpad, NULL);
+      (GstTaskFunction) gst_ps_demux_loop, demux->sinkpad, NULL);
 
   GST_PAD_STREAM_UNLOCK (demux->sinkpad);
 
@@ -1318,19 +1340,30 @@
 }
 
 static gboolean
-gst_flups_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+gst_ps_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
   gboolean res = FALSE;
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:
       if (demux->random_access) {
-        res = gst_flups_demux_handle_seek_pull (demux, event);
+        res = gst_ps_demux_handle_seek_pull (demux, event);
       } else {
-        res = gst_flups_demux_handle_seek_push (demux, event);
+        res = gst_ps_demux_handle_seek_push (demux, event);
       }
       break;
+    case GST_EVENT_RECONFIGURE:{
+      GstPsStream *stream;
+
+      stream = gst_ps_demux_get_stream_from_pad (demux, pad);
+      if (stream != NULL)
+        stream->notlinked = FALSE;
+
+      gst_event_unref (event);
+      res = TRUE;
+      break;
+    }
     default:
       res = gst_pad_push_event (demux->sinkpad, event);
       break;
@@ -1340,10 +1373,10 @@
 }
 
 static gboolean
-gst_flups_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_ps_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
 {
   gboolean res = FALSE;
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
 
   GST_LOG_OBJECT (demux, "Have query of type %d on pad %" GST_PTR_FORMAT,
       GST_QUERY_TYPE (query), pad);
@@ -1523,7 +1556,7 @@
 }
 
 static void
-gst_flups_demux_reset_psm (GstFluPSDemux * demux)
+gst_ps_demux_reset_psm (GstPsDemux * demux)
 {
   gint i;
 
@@ -1532,7 +1565,7 @@
     demux->psm[i] = type;
 
   /* Initialize all fields to -1 first */
-  FILL_TYPE (0x00, GST_FLUPS_DEMUX_MAX_PSM - 1, -1);
+  FILL_TYPE (0x00, GST_PS_DEMUX_MAX_PSM - 1, -1);
 
   FILL_TYPE (0x20, 0x3f, ST_PS_DVD_SUBPICTURE);
 
@@ -1574,7 +1607,7 @@
 #define PACK_START_SIZE     21
 
 static GstFlowReturn
-gst_flups_demux_parse_pack_start (GstFluPSDemux * demux)
+gst_ps_demux_parse_pack_start (GstPsDemux * demux)
 {
   const guint8 *data;
   guint length;
@@ -1841,7 +1874,7 @@
  */
 
 static GstFlowReturn
-gst_flups_demux_parse_sys_head (GstFluPSDemux * demux)
+gst_ps_demux_parse_sys_head (GstPsDemux * demux)
 {
   guint16 length;
   const guint8 *data;
@@ -2027,7 +2060,7 @@
 }
 
 static GstFlowReturn
-gst_flups_demux_parse_psm (GstFluPSDemux * demux)
+gst_ps_demux_parse_psm (GstPsDemux * demux)
 {
   guint16 length = 0, info_length = 0, es_map_length = 0;
   guint8 psm_version = 0;
@@ -2142,13 +2175,13 @@
 }
 
 static void
-gst_flups_demux_resync_cb (GstPESFilter * filter, GstFluPSDemux * demux)
+gst_ps_demux_resync_cb (GstPESFilter * filter, GstPsDemux * demux)
 {
 }
 
 static GstFlowReturn
-gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first,
-    GstBuffer * buffer, GstFluPSDemux * demux)
+gst_ps_demux_data_cb (GstPESFilter * filter, gboolean first,
+    GstBuffer * buffer, GstPsDemux * demux)
 {
   GstBuffer *out_buf;
   GstFlowReturn ret = GST_FLOW_OK;
@@ -2216,20 +2249,20 @@
     }
     if (filter->pts != -1) {
       demux->next_pts = filter->pts + demux->scr_adjust;
-      GST_LOG_OBJECT (demux, "PTS = %" G_GUINT64_FORMAT
-          "(%" G_GUINT64_FORMAT ")", filter->pts, demux->next_pts);
+      GST_LOG_OBJECT (demux, "stream 0x%02x PTS = orig %" G_GUINT64_FORMAT
+          " (%" G_GUINT64_FORMAT ")", id, filter->pts, demux->next_pts);
     } else
       demux->next_pts = G_MAXUINT64;
 
     if (filter->dts != -1) {
       demux->next_dts = filter->dts + demux->scr_adjust;
+      GST_LOG_OBJECT (demux, "stream 0x%02x DTS = orig %" G_GUINT64_FORMAT
+          " (%" G_GUINT64_FORMAT ")", id, filter->dts, demux->next_dts);
     } else {
       demux->next_dts = demux->next_pts;
     }
-    GST_LOG_OBJECT (demux, "DTS = orig %" G_GUINT64_FORMAT
-        " (%" G_GUINT64_FORMAT ")", filter->dts, demux->next_dts);
 
-    demux->current_stream = gst_flups_demux_get_stream (demux, id, stream_type);
+    demux->current_stream = gst_ps_demux_get_stream (demux, id, stream_type);
   }
 
   if (G_UNLIKELY (demux->current_stream == NULL)) {
@@ -2258,7 +2291,7 @@
     out_buf =
         gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset, datalen);
 
-    ret = gst_flups_demux_send_data (demux, demux->current_stream, out_buf);
+    ret = gst_ps_demux_send_data (demux, demux->current_stream, out_buf);
     if (ret == GST_FLOW_NOT_LINKED) {
       demux->current_stream->notlinked = TRUE;
     }
@@ -2280,7 +2313,7 @@
 }
 
 static gboolean
-gst_flups_demux_resync (GstFluPSDemux * demux, gboolean save)
+gst_ps_demux_resync (GstPsDemux * demux, gboolean save)
 {
   const guint8 *data;
   gint avail;
@@ -2360,14 +2393,14 @@
 }
 
 static inline gboolean
-gst_flups_demux_is_pes_sync (guint32 sync)
+gst_ps_demux_is_pes_sync (guint32 sync)
 {
   return ((sync & 0xfc) == 0xbc) ||
       ((sync & 0xe0) == 0xc0) || ((sync & 0xf0) == 0xe0);
 }
 
 static inline gboolean
-gst_flups_demux_scan_ts (GstFluPSDemux * demux, const guint8 * data,
+gst_ps_demux_scan_ts (GstPsDemux * demux, const guint8 * data,
     SCAN_MODE mode, guint64 * rts)
 {
   gboolean ret = FALSE;
@@ -2446,11 +2479,12 @@
   if (mode == SCAN_SCR) {
     *rts = scr;
     ret = TRUE;
+    goto beach;
   }
 
   /* read the 4 bytes for the PES sync code */
   code = GST_READ_UINT32_BE (data);
-  if (!gst_flups_demux_is_pes_sync (code))
+  if (!gst_ps_demux_is_pes_sync (code))
     goto beach;
 
   switch (code) {
@@ -2549,7 +2583,7 @@
 }
 
 static inline gboolean
-gst_flups_demux_scan_forward_ts (GstFluPSDemux * demux, guint64 * pos,
+gst_ps_demux_scan_forward_ts (GstPsDemux * demux, guint64 * pos,
     SCAN_MODE mode, guint64 * rts, gint limit)
 {
   GstFlowReturn ret = GST_FLOW_OK;
@@ -2590,7 +2624,7 @@
 
     /* scan the block */
     for (cursor = 0; !found && cursor <= end_scan; cursor++) {
-      found = gst_flups_demux_scan_ts (demux, map.data + cursor, mode, &ts);
+      found = gst_ps_demux_scan_ts (demux, map.data + cursor, mode, &ts);
     }
 
     /* done with the buffer, unref it */
@@ -2609,7 +2643,7 @@
 }
 
 static inline gboolean
-gst_flups_demux_scan_backward_ts (GstFluPSDemux * demux, guint64 * pos,
+gst_ps_demux_scan_backward_ts (GstPsDemux * demux, guint64 * pos,
     SCAN_MODE mode, guint64 * rts, gint limit)
 {
   GstFlowReturn ret = GST_FLOW_OK;
@@ -2656,7 +2690,7 @@
 
     /* scan the block */
     for (cursor = (start_scan + 1); !found && cursor > 0; cursor--) {
-      found = gst_flups_demux_scan_ts (demux, data--, mode, &ts);
+      found = gst_ps_demux_scan_ts (demux, data--, mode, &ts);
     }
 
     /* done with the buffer, unref it */
@@ -2674,7 +2708,7 @@
 }
 
 static inline gboolean
-gst_flups_sink_get_duration (GstFluPSDemux * demux)
+gst_ps_sink_get_duration (GstPsDemux * demux)
 {
   gboolean res = FALSE;
   GstPad *peer;
@@ -2707,7 +2741,7 @@
   /* Scan for notorious SCR and PTS to calculate the duration */
   /* scan for first SCR in the stream */
   offset = demux->sink_segment.start;
-  gst_flups_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &demux->first_scr,
+  gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &demux->first_scr,
       DURATION_SCAN_LIMIT);
   GST_DEBUG_OBJECT (demux, "First SCR: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
       " in packet starting at %" G_GUINT64_FORMAT,
@@ -2716,8 +2750,7 @@
   demux->first_scr_offset = offset;
   /* scan for last SCR in the stream */
   offset = demux->sink_segment.stop;
-  gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_SCR,
-      &demux->last_scr, 0);
+  gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &demux->last_scr, 0);
   GST_DEBUG_OBJECT (demux, "Last SCR: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
       " in packet starting at %" G_GUINT64_FORMAT,
       demux->last_scr, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->last_scr)),
@@ -2725,7 +2758,7 @@
   demux->last_scr_offset = offset;
   /* scan for first PTS in the stream */
   offset = demux->sink_segment.start;
-  gst_flups_demux_scan_forward_ts (demux, &offset, SCAN_PTS, &demux->first_pts,
+  gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_PTS, &demux->first_pts,
       DURATION_SCAN_LIMIT);
   GST_DEBUG_OBJECT (demux, "First PTS: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
       " in packet starting at %" G_GUINT64_FORMAT,
@@ -2734,7 +2767,7 @@
   if (demux->first_pts != G_MAXUINT64) {
     /* scan for last PTS in the stream */
     offset = demux->sink_segment.stop;
-    gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_PTS,
+    gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_PTS,
         &demux->last_pts, DURATION_SCAN_LIMIT);
     GST_DEBUG_OBJECT (demux,
         "Last PTS: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
@@ -2748,7 +2781,7 @@
     offset = demux->first_scr_offset;
     for (i = 0; i < 10; i++) {
       offset++;
-      gst_flups_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &scr, 0);
+      gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &scr, 0);
       if (scr < demux->last_scr) {
         demux->first_scr = scr;
         demux->first_scr_offset = offset;
@@ -2791,10 +2824,10 @@
 }
 
 static inline GstFlowReturn
-gst_flups_demux_pull_block (GstPad * pad, GstFluPSDemux * demux,
+gst_ps_demux_pull_block (GstPad * pad, GstPsDemux * demux,
     guint64 offset, guint size)
 {
-  GstFlowReturn ret = GST_FLOW_OK;
+  GstFlowReturn ret;
   GstBuffer *buffer = NULL;
 
   ret = gst_pad_pull_range (pad, offset, size, &buffer);
@@ -2810,20 +2843,20 @@
     GST_LOG_OBJECT (demux, "setting discont flag on backward rate");
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
   }
-  ret = gst_flups_demux_chain (pad, GST_OBJECT (demux), buffer);
+  ret = gst_ps_demux_chain (pad, GST_OBJECT (demux), buffer);
 
 beach:
   return ret;
 }
 
 static void
-gst_flups_demux_loop (GstPad * pad)
+gst_ps_demux_loop (GstPad * pad)
 {
-  GstFluPSDemux *demux;
+  GstPsDemux *demux;
   GstFlowReturn ret = GST_FLOW_OK;
   guint64 offset = 0;
 
-  demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
+  demux = GST_PS_DEMUX (gst_pad_get_parent (pad));
 
   if (G_UNLIKELY (demux->flushing)) {
     ret = GST_FLOW_FLUSHING;
@@ -2831,7 +2864,7 @@
   }
 
   if (G_UNLIKELY (demux->sink_segment.format == GST_FORMAT_UNDEFINED))
-    gst_flups_sink_get_duration (demux);
+    gst_ps_sink_get_duration (demux);
 
   offset = demux->sink_segment.position;
   if (demux->sink_segment.rate >= 0) {
@@ -2840,7 +2873,7 @@
       size = MIN (size, demux->sink_segment.stop - offset);
     }
     /* pull in data */
-    ret = gst_flups_demux_pull_block (pad, demux, offset, size);
+    ret = gst_ps_demux_pull_block (pad, demux, offset, size);
 
     /* pause if something went wrong */
     if (G_UNLIKELY (ret != GST_FLOW_OK))
@@ -2868,7 +2901,7 @@
     guint64 size = MIN (offset, BLOCK_SZ);
 
     /* pull in data */
-    ret = gst_flups_demux_pull_block (pad, demux, offset - size, size);
+    ret = gst_ps_demux_pull_block (pad, demux, offset - size, size);
 
     /* pause if something went wrong */
     if (G_UNLIKELY (ret != GST_FLOW_OK))
@@ -2919,7 +2952,7 @@
           gst_element_post_message (GST_ELEMENT_CAST (demux),
               gst_message_new_segment_done (GST_OBJECT_CAST (demux),
                   GST_FORMAT_TIME, stop));
-          gst_flups_demux_send_event (demux,
+          gst_ps_demux_send_event (demux,
               gst_event_new_segment_done (GST_FORMAT_TIME, stop));
         } else {                /* Reverse playback */
           GST_LOG_OBJECT (demux, "Sending segment done, at beginning of "
@@ -2927,7 +2960,7 @@
           gst_element_post_message (GST_ELEMENT_CAST (demux),
               gst_message_new_segment_done (GST_OBJECT_CAST (demux),
                   GST_FORMAT_TIME, demux->src_segment.start));
-          gst_flups_demux_send_event (demux,
+          gst_ps_demux_send_event (demux,
               gst_event_new_segment_done (GST_FORMAT_TIME,
                   demux->src_segment.start));
         }
@@ -2935,7 +2968,7 @@
         /* normal playback, send EOS to all linked pads */
         gst_element_no_more_pads (GST_ELEMENT (demux));
         GST_LOG_OBJECT (demux, "Sending EOS, at end of stream");
-        if (!gst_flups_demux_send_event (demux, gst_event_new_eos ())
+        if (!gst_ps_demux_send_event (demux, gst_event_new_eos ())
             && !have_open_streams (demux)) {
           GST_WARNING_OBJECT (demux, "EOS and no streams open");
           GST_ELEMENT_ERROR (demux, STREAM, FAILED,
@@ -2946,7 +2979,7 @@
       GST_ELEMENT_ERROR (demux, STREAM, FAILED,
           ("Internal data stream error."),
           ("stream stopped, reason %s", reason));
-      gst_flups_demux_send_event (demux, gst_event_new_eos ());
+      gst_ps_demux_send_event (demux, gst_event_new_eos ());
     }
 
     gst_object_unref (demux);
@@ -2956,7 +2989,7 @@
 
 /* If we can pull that's prefered */
 static gboolean
-gst_flups_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
+gst_ps_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
 {
   gboolean res = FALSE;
   GstQuery *query = gst_query_new_scheduling ();
@@ -2979,10 +3012,10 @@
 
 /* This function gets called when we activate ourselves in push mode. */
 static gboolean
-gst_flups_demux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
+gst_ps_demux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
     gboolean active)
 {
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
 
   demux->random_access = FALSE;
 
@@ -2993,15 +3026,15 @@
  * We can perform  random access to the resource and we start a task
  * to start reading */
 static gboolean
-gst_flups_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
+gst_ps_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
     gboolean active)
 {
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
 
   if (active) {
     GST_DEBUG ("pull mode activated");
     demux->random_access = TRUE;
-    return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flups_demux_loop,
+    return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_ps_demux_loop,
         sinkpad, NULL);
   } else {
     demux->random_access = FALSE;
@@ -3010,13 +3043,13 @@
 }
 
 static gboolean
-gst_flups_demux_sink_activate_mode (GstPad * pad, GstObject * parent,
+gst_ps_demux_sink_activate_mode (GstPad * pad, GstObject * parent,
     GstPadMode mode, gboolean active)
 {
   if (mode == GST_PAD_MODE_PUSH) {
-    return gst_flups_demux_sink_activate_push (pad, parent, active);
+    return gst_ps_demux_sink_activate_push (pad, parent, active);
   } else if (mode == GST_PAD_MODE_PULL) {
-    return gst_flups_demux_sink_activate_pull (pad, parent, active);
+    return gst_ps_demux_sink_activate_pull (pad, parent, active);
   }
   return FALSE;
 }
@@ -3027,7 +3060,7 @@
 *  GST_FLOW_EOS: when all pads EOS or NOT_LINKED.
 */
 static GstFlowReturn
-gst_flups_demux_combine_flows (GstFluPSDemux * demux, GstFlowReturn ret)
+gst_ps_demux_combine_flows (GstPsDemux * demux, GstFlowReturn ret)
 {
   GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret));
 
@@ -3041,9 +3074,9 @@
 }
 
 static GstFlowReturn
-gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+gst_ps_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
 {
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
+  GstPsDemux *demux = GST_PS_DEMUX (parent);
   GstFlowReturn ret = GST_FLOW_OK;
   guint32 avail;
   gboolean save, discont;
@@ -3055,7 +3088,7 @@
         " offset %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buffer));
 
     gst_pes_filter_drain (&demux->filter);
-    gst_flups_demux_mark_discont (demux, TRUE, FALSE);
+    gst_ps_demux_mark_discont (demux, TRUE, FALSE);
 
     /* mark discont on all streams */
     if (demux->sink_segment.rate >= 0.0) {
@@ -3116,7 +3149,7 @@
   /* align adapter data to sync boundary, we keep the data up to the next sync
    * point. */
   save = TRUE;
-  while (gst_flups_demux_resync (demux, save)) {
+  while (gst_ps_demux_resync (demux, save)) {
     gboolean ps_sync = TRUE;
     if (G_UNLIKELY (demux->flushing)) {
       ret = GST_FLOW_FLUSHING;
@@ -3126,10 +3159,10 @@
     /* now switch on last synced byte */
     switch (demux->last_sync_code) {
       case ID_PS_PACK_START_CODE:
-        ret = gst_flups_demux_parse_pack_start (demux);
+        ret = gst_ps_demux_parse_pack_start (demux);
         break;
       case ID_PS_SYSTEM_HEADER_START_CODE:
-        ret = gst_flups_demux_parse_sys_head (demux);
+        ret = gst_ps_demux_parse_sys_head (demux);
         break;
       case ID_PS_END_CODE:
         /* Skip final 4 bytes */
@@ -3138,10 +3171,10 @@
         ret = GST_FLOW_OK;
         goto done;
       case ID_PS_PROGRAM_STREAM_MAP:
-        ret = gst_flups_demux_parse_psm (demux);
+        ret = gst_ps_demux_parse_psm (demux);
         break;
       default:
-        if (gst_flups_demux_is_pes_sync (demux->last_sync_code)) {
+        if (gst_ps_demux_is_pes_sync (demux->last_sync_code)) {
           ret = gst_pes_filter_process (&demux->filter);
         } else {
           GST_DEBUG_OBJECT (demux, "sync_code=%08x, non PES sync found"
@@ -3174,7 +3207,7 @@
         ret = GST_FLOW_OK;
         break;
       default:
-        ret = gst_flups_demux_combine_flows (demux, ret);
+        ret = gst_ps_demux_combine_flows (demux, ret);
         if (ret != GST_FLOW_OK)
           goto done;
         break;
@@ -3185,9 +3218,9 @@
 }
 
 static GstStateChangeReturn
-gst_flups_demux_change_state (GstElement * element, GstStateChange transition)
+gst_ps_demux_change_state (GstElement * element, GstStateChange transition)
 {
-  GstFluPSDemux *demux = GST_FLUPS_DEMUX (element);
+  GstPsDemux *demux = GST_PS_DEMUX (element);
   GstStateChangeReturn result;
 
   switch (transition) {
@@ -3195,8 +3228,8 @@
       gst_pes_filter_init (&demux->filter, demux->adapter,
           &demux->adapter_offset);
       gst_pes_filter_set_callbacks (&demux->filter,
-          (GstPESFilterData) gst_flups_demux_data_cb,
-          (GstPESFilterResync) gst_flups_demux_resync_cb, demux);
+          (GstPESFilterData) gst_ps_demux_data_cb,
+          (GstPESFilterResync) gst_ps_demux_resync_cb, demux);
       demux->filter.gather_pes = TRUE;
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
@@ -3209,7 +3242,7 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_flups_demux_reset (demux);
+      gst_ps_demux_reset (demux);
       break;
     case GST_STATE_CHANGE_READY_TO_NULL:
       gst_pes_filter_uninit (&demux->filter);
diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h
index dcc1505..9e4501d 100644
--- a/gst/mpegdemux/gstmpegdemux.h
+++ b/gst/mpegdemux/gstmpegdemux.h
@@ -42,8 +42,8 @@
  *                 Jan Schmidt <thaytan@noraisin.net>
  */
 
-#ifndef __GST_FLUPS_DEMUX_H__
-#define __GST_FLUPS_DEMUX_H__
+#ifndef __GST_PS_DEMUX_H__
+#define __GST_PS_DEMUX_H__
 
 #include <gst/gst.h>
 #include <gst/base/gstadapter.h>
@@ -53,39 +53,39 @@
 
 G_BEGIN_DECLS
 
-#define GST_TYPE_FLUPS_DEMUX		(gst_flups_demux_get_type())
-#define GST_FLUPS_DEMUX(obj)		(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLUPS_DEMUX,GstFluPSDemux))
-#define GST_FLUPS_DEMUX_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLUPS_DEMUX,GstFluPSDemuxClass))
-#define GST_FLUPS_DEMUX_GET_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS((klass),GST_TYPE_FLUPS_DEMUX,GstFluPSDemuxClass))
-#define GST_IS_FLUPS_DEMUX(obj)		(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLUPS_DEMUX))
-#define GST_IS_FLUPS_DEMUX_CLASS(obj)	(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLUPS_DEMUX))
+#define GST_TYPE_PS_DEMUX		(gst_ps_demux_get_type())
+#define GST_PS_DEMUX(obj)		(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PS_DEMUX,GstPsDemux))
+#define GST_PS_DEMUX_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PS_DEMUX,GstPsDemuxClass))
+#define GST_PS_DEMUX_GET_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS((klass),GST_TYPE_PS_DEMUX,GstPsDemuxClass))
+#define GST_IS_PS_DEMUX(obj)		(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PS_DEMUX))
+#define GST_IS_PS_DEMUX_CLASS(obj)	(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PS_DEMUX))
 
-typedef struct _GstFluPSStream GstFluPSStream;
-typedef struct _GstFluPSDemux GstFluPSDemux;
-typedef struct _GstFluPSDemuxClass GstFluPSDemuxClass;
+typedef struct _GstPsStream GstPsStream;
+typedef struct _GstPsDemux GstPsDemux;
+typedef struct _GstPsDemuxClass GstPsDemuxClass;
 
-#define GST_FLUPS_DEMUX_MAX_STREAMS	256
-#define GST_FLUPS_DEMUX_MAX_PSM		256
+#define GST_PS_DEMUX_MAX_STREAMS	256
+#define GST_PS_DEMUX_MAX_PSM		256
 
 #define MAX_DVD_AUDIO_STREAMS       8
 #define MAX_DVD_SUBPICTURE_STREAMS  32
 
 typedef enum
 {
-  GST_FLUPS_DEMUX_SYNC_AUTO = 0,
-  GST_FLUPS_DEMUX_SYNC_SCR = 1,
-  GST_FLUPS_DEMUX_SYNC_DTS = 2
-} GstFluPSDemuxSync;
+  GST_PS_DEMUX_SYNC_AUTO = 0,
+  GST_PS_DEMUX_SYNC_SCR = 1,
+  GST_PS_DEMUX_SYNC_DTS = 2
+} GstPsDemuxSync;
 
 typedef enum
 {
-  STATE_FLUPS_DEMUX_NEED_SYNC,
-  STATE_FLUPS_DEMUX_SYNCED,
-  STATE_FLUPS_DEMUX_NEED_MORE_DATA,
-} GstFluPSDemuxState;
+  STATE_PS_DEMUX_NEED_SYNC,
+  STATE_PS_DEMUX_SYNCED,
+  STATE_PS_DEMUX_NEED_MORE_DATA,
+} GstPsDemuxState;
 
 /* Information associated with a single FluPS stream. */
-struct _GstFluPSStream
+struct _GstPsStream
 {
   GstPad *pad;
 
@@ -102,7 +102,7 @@
   GstTagList *pending_tags;
 };
 
-struct _GstFluPSDemux
+struct _GstPsDemux
 {
   GstElement parent;
 
@@ -137,18 +137,18 @@
   guint64 first_pts;
   guint64 last_pts;
 
-  gint16 psm[GST_FLUPS_DEMUX_MAX_PSM];
+  gint16 psm[GST_PS_DEMUX_MAX_PSM];
 
   GstSegment sink_segment;
   GstSegment src_segment;
   gboolean adjust_segment;
 
   /* stream output */
-  GstFluPSStream *current_stream;
+  GstPsStream *current_stream;
   guint64 next_pts;
   guint64 next_dts;
-  GstFluPSStream **streams;
-  GstFluPSStream **streams_found;
+  GstPsStream **streams;
+  GstPsStream **streams_found;
   gint found_count;
   gboolean need_no_more_pads;
 
@@ -158,7 +158,7 @@
   gboolean is_mpeg2_pack;
 };
 
-struct _GstFluPSDemuxClass
+struct _GstPsDemuxClass
 {
   GstElementClass parent_class;
 
@@ -169,7 +169,7 @@
   GstPadTemplate *private_template;
 };
 
-GType gst_flups_demux_get_type (void);
+GType gst_ps_demux_get_type (void);
 
 G_END_DECLS
-#endif /* __GST_FLUPS_DEMUX_H__ */
+#endif /* __GST_PS_DEMUX_H__ */
diff --git a/gst/mpegdemux/plugin.c b/gst/mpegdemux/plugin.c
index 59e7c30..4d0bca2 100644
--- a/gst/mpegdemux/plugin.c
+++ b/gst/mpegdemux/plugin.c
@@ -56,7 +56,7 @@
       "MPEG-PS PES filter");
 
   if (!gst_element_register (plugin, "mpegpsdemux", GST_RANK_PRIMARY,
-          GST_TYPE_FLUPS_DEMUX))
+          GST_TYPE_PS_DEMUX))
     return FALSE;
 
   return TRUE;
diff --git a/gst/mpegpsmux/Makefile.am b/gst/mpegpsmux/Makefile.am
index 457465e..293fbec 100644
--- a/gst/mpegpsmux/Makefile.am
+++ b/gst/mpegpsmux/Makefile.am
@@ -21,17 +21,3 @@
 	mpegpsmux_h264.h \
 	bits.h \
 	crc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegpsmux -:SHARED libgstmpegpsmux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegpsmux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegpsmux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegpsmux_la_LDFLAGS) \
-	           $(libgstmpegpsmux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/mpegpsmux/Makefile.in b/gst/mpegpsmux/Makefile.in
index 60a0ffc..acf0e9d 100644
--- a/gst/mpegpsmux/Makefile.in
+++ b/gst/mpegpsmux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mpegpsmux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -765,7 +800,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mpegpsmux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mpegpsmux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1106,20 +1140,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegpsmux -:SHARED libgstmpegpsmux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegpsmux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegpsmux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegpsmux_la_LDFLAGS) \
-	           $(libgstmpegpsmux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/mpegpsmux/crc.h b/gst/mpegpsmux/crc.h
index 35fb3e2..532b797 100644
--- a/gst/mpegpsmux/crc.h
+++ b/gst/mpegpsmux/crc.h
@@ -40,7 +40,7 @@
  * SOFTWARE.
  */
 
-static guint32 crc_tab[256] = {
+static const guint32 crc_tab[256] = {
   0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
   0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
   0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
diff --git a/gst/mpegpsmux/psmuxstream.c b/gst/mpegpsmux/psmuxstream.c
index 43f7070..22026a1 100644
--- a/gst/mpegpsmux/psmuxstream.c
+++ b/gst/mpegpsmux/psmuxstream.c
@@ -190,8 +190,8 @@
       stream->max_buffer_size = 400 * 1024;
     else if (stream->is_audio_stream)
       stream->max_buffer_size = 4 * 1024;
-    else                        /* Unknown */
-      stream->max_buffer_size = 4 * 1024;
+    else
+      g_assert_not_reached ();
   }
 
   return stream;
diff --git a/gst/mpegtsdemux/Makefile.am b/gst/mpegtsdemux/Makefile.am
index 3bf5123..b4e053c 100644
--- a/gst/mpegtsdemux/Makefile.am
+++ b/gst/mpegtsdemux/Makefile.am
@@ -28,17 +28,3 @@
 	mpegtsparse.h \
 	tsdemux.h	\
 	pesparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegtsdemux -:SHARED libgstmpegtsdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegtsdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegtsdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegtsdemux_la_LDFLAGS) \
-	           $(libgstmpegtsdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/mpegtsdemux/Makefile.in b/gst/mpegtsdemux/Makefile.in
index d127817..f670dd8 100644
--- a/gst/mpegtsdemux/Makefile.in
+++ b/gst/mpegtsdemux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mpegtsdemux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) TODO
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -235,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp TODO
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -252,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -278,8 +291,6 @@
 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@
@@ -292,7 +303,6 @@
 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@
@@ -300,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -326,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -349,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -409,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -429,7 +446,6 @@
 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@
@@ -438,7 +454,6 @@
 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@
@@ -451,7 +466,6 @@
 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@
@@ -465,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -476,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -514,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -549,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -578,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -585,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -614,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -624,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -654,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -681,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -719,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -779,7 +814,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mpegtsdemux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mpegtsdemux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1128,20 +1162,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmpegtsdemux -:SHARED libgstmpegtsdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmpegtsdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmpegtsdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmpegtsdemux_la_LDFLAGS) \
-	           $(libgstmpegtsdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/mpegtsdemux/gstmpegdesc.h b/gst/mpegtsdemux/gstmpegdesc.h
index 282ce35..d1256a6 100644
--- a/gst/mpegtsdemux/gstmpegdesc.h
+++ b/gst/mpegtsdemux/gstmpegdesc.h
@@ -231,5 +231,6 @@
 #define DRF_ID_CUEI       0x43554549
 #define DRF_ID_ETV1       0x45545631
 #define DRF_ID_HEVC       0x48455643
+#define DRF_ID_KLVA       0x4b4c5641   /* defined in RP217 */
 
 #endif /* __GST_MPEG_DESC_H__ */
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index 1df1d76..d46a47e 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -41,9 +41,6 @@
 #include "mpegtsbase.h"
 #include "gstmpegdesc.h"
 
-/* latency in mseconds */
-#define TS_LATENCY 700
-
 #define RUNNING_STATUS_RUNNING 4
 
 GST_DEBUG_CATEGORY_STATIC (mpegts_base_debug);
@@ -200,9 +197,6 @@
   base->seen_pat = FALSE;
   base->seek_offset = -1;
 
-  base->upstream_live = FALSE;
-  base->queried_latency = FALSE;
-
   g_hash_table_foreach_remove (base->programs, (GHRFunc) remove_each_program,
       base);
 
@@ -862,6 +856,7 @@
   if (old_program->active) {
     old_program = mpegts_base_steal_program (base, program_number);
     program = mpegts_base_new_program (base, program_number, section->pid);
+    program->patcount = old_program->patcount;
     g_hash_table_insert (base->programs,
         GINT_TO_POINTER (program_number), program);
 
@@ -964,7 +959,7 @@
 
   /* Early exit if it's not from the present/following table_id */
   if (section->table_id != GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT
-      || section->table_id !=
+      && section->table_id !=
       GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT)
     return TRUE;
 
@@ -1044,6 +1039,7 @@
   gboolean res = TRUE;
   gboolean hard;
   MpegTSBase *base = GST_MPEGTS_BASE (parent);
+  gboolean is_sticky = GST_EVENT_IS_STICKY (event);
 
   GST_DEBUG_OBJECT (base, "Got event %s",
       gst_event_type_get_name (GST_EVENT_TYPE (event)));
@@ -1083,28 +1079,12 @@
   }
 
   /* Always return TRUE for sticky events */
-  if (GST_EVENT_IS_STICKY (event))
+  if (is_sticky)
     res = TRUE;
 
   return res;
 }
 
-static void
-query_upstream_latency (MpegTSBase * base)
-{
-  GstQuery *query;
-
-  query = gst_query_new_latency ();
-  if (gst_pad_peer_query (base->sinkpad, query)) {
-    gst_query_parse_latency (query, &base->upstream_live, NULL, NULL);
-    GST_DEBUG_OBJECT (base, "Upstream is %s",
-        base->upstream_live ? "LIVE" : "NOT LIVE");
-  } else
-    GST_WARNING_OBJECT (base, "Failed to query upstream latency");
-  gst_query_unref (query);
-  base->queried_latency = TRUE;
-}
-
 static GstFlowReturn
 mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 {
@@ -1120,10 +1100,6 @@
 
   packetizer = base->packetizer;
 
-  if (G_UNLIKELY (base->queried_latency == FALSE)) {
-    query_upstream_latency (base);
-  }
-
   if (klass->input_done)
     gst_buffer_ref (buf);
 
@@ -1134,7 +1110,14 @@
       return res;
 
     mpegts_base_flush (base, FALSE);
-    mpegts_packetizer_flush (base->packetizer, FALSE);
+    /* In the case of discontinuities in push-mode with TIME segment
+     * we want to drop all previous observations (hard:TRUE) from
+     * the packetizer */
+    if (base->mode == BASE_MODE_PUSHING
+        && base->segment.format == GST_FORMAT_TIME)
+      mpegts_packetizer_flush (base->packetizer, TRUE);
+    else
+      mpegts_packetizer_flush (base->packetizer, FALSE);
   }
 
   mpegts_packetizer_push (base->packetizer, buf);
@@ -1152,6 +1135,9 @@
       goto next;
     }
 
+    if (klass->inspect_packet)
+      klass->inspect_packet (base, &packet);
+
     /* If it's a known PES, push it */
     if (MPEGTS_BIT_IS_SET (base->is_pes, packet.pid)) {
       /* push the packet downstream */
@@ -1202,7 +1188,7 @@
   gboolean done = FALSE;
   MpegTSPacketizerPacketReturn pret;
   gint64 tmpval;
-  gint64 upstream_size, seek_pos;
+  gint64 upstream_size, seek_pos, reverse_limit;
   GstFormat format;
   guint initial_pcr_seen;
 
@@ -1210,7 +1196,7 @@
 
   /* Find initial sync point and at least 5 PCR values */
   for (i = 0; i < 20 && !done; i++) {
-    GST_DEBUG ("Grabbing %d => %d", i * 65536, 65536);
+    GST_DEBUG ("Grabbing %d => %d", i * 65536, (i + 1) * 65536);
 
     ret = gst_pad_pull_range (base->sinkpad, i * 65536, 65536, &buf);
     if (G_UNLIKELY (ret == GST_FLOW_EOS))
@@ -1249,21 +1235,26 @@
   GST_DEBUG ("Seen %d initial PCR", initial_pcr_seen);
 
   /* Now send data from the end */
-  mpegts_packetizer_clear (base->packetizer);
 
   /* Get the size of upstream */
   format = GST_FORMAT_BYTES;
   if (!gst_pad_peer_query_duration (base->sinkpad, format, &tmpval))
     goto beach;
   upstream_size = tmpval;
-  done = FALSE;
 
-  /* Find last PCR value */
-  for (seek_pos = MAX (0, upstream_size - 655360);
-      seek_pos < upstream_size && !done; seek_pos += 65536) {
-    GST_DEBUG ("Grabbing %" G_GUINT64_FORMAT " => %d", seek_pos, 65536);
+  /* The scanning takes place on the last 2048kB. Considering PCR should
+   * be present at least every 100ms, this should cope with streams
+   * up to 160Mbit/s */
+  reverse_limit = MAX (0, upstream_size - 2097152);
 
-    ret = gst_pad_pull_range (base->sinkpad, seek_pos, 65536, &buf);
+  /* Find last PCR value, searching backwards by chunks of 300 MPEG-ts packets */
+  for (seek_pos = MAX (0, upstream_size - 56400);
+      seek_pos >= reverse_limit; seek_pos -= 56400) {
+    mpegts_packetizer_clear (base->packetizer);
+    GST_DEBUG ("Grabbing %" G_GUINT64_FORMAT " => %" G_GUINT64_FORMAT, seek_pos,
+        seek_pos + 56400);
+
+    ret = gst_pad_pull_range (base->sinkpad, seek_pos, 56400, &buf);
     if (G_UNLIKELY (ret == GST_FLOW_EOS))
       break;
     if (G_UNLIKELY (ret != GST_FLOW_OK))
@@ -1274,17 +1265,15 @@
     buf = NULL;
 
     if (mpegts_packetizer_has_packets (base->packetizer)) {
-      while (1) {
-        /* Eat up all packets */
+      pret = PACKET_OK;
+      /* Eat up all packets, really try to get last PCR(s) */
+      while (pret != PACKET_NEED_MORE)
         pret = mpegts_packetizer_process_next_packet (base->packetizer);
-        if (pret == PACKET_NEED_MORE)
-          break;
-        if (pret != PACKET_BAD &&
-            base->packetizer->nb_seen_offsets > initial_pcr_seen) {
-          GST_DEBUG ("Got last PCR");
-          done = TRUE;
-          break;
-        }
+
+      if (base->packetizer->nb_seen_offsets > initial_pcr_seen) {
+        GST_DEBUG ("Got last PCR(s) (total seen:%d)",
+            base->packetizer->nb_seen_offsets);
+        break;
       }
     }
   }
@@ -1402,15 +1391,17 @@
         GST_WARNING ("seeking failed %s", gst_flow_get_name (ret));
       else {
         GstEvent *new_seek;
-        base->mode = BASE_MODE_SEEKING;
 
-        new_seek = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
-            GST_SEEK_TYPE_SET, base->seek_offset, GST_SEEK_TYPE_NONE, -1);
-        gst_event_set_seqnum (new_seek, GST_EVENT_SEQNUM (event));
-        if (!gst_pad_push_event (base->sinkpad, new_seek))
-          ret = GST_FLOW_ERROR;
-        else
-          base->last_seek_seqnum = GST_EVENT_SEQNUM (event);
+        if (GST_CLOCK_TIME_IS_VALID (base->seek_offset)) {
+          base->mode = BASE_MODE_SEEKING;
+          new_seek = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+              GST_SEEK_TYPE_SET, base->seek_offset, GST_SEEK_TYPE_NONE, -1);
+          gst_event_set_seqnum (new_seek, GST_EVENT_SEQNUM (event));
+          if (!gst_pad_push_event (base->sinkpad, new_seek))
+            ret = GST_FLOW_ERROR;
+          else
+            base->last_seek_seqnum = GST_EVENT_SEQNUM (event);
+        }
         base->mode = BASE_MODE_PUSHING;
       }
     }
diff --git a/gst/mpegtsdemux/mpegtsbase.h b/gst/mpegtsdemux/mpegtsbase.h
index 6b2d7d3..c427bd7 100644
--- a/gst/mpegtsdemux/mpegtsbase.h
+++ b/gst/mpegtsdemux/mpegtsbase.h
@@ -166,6 +166,7 @@
   /* Virtual methods */
   void (*reset) (MpegTSBase *base);
   GstFlowReturn (*push) (MpegTSBase *base, MpegTSPacketizerPacket *packet, GstMpegtsSection * section);
+  void (*inspect_packet) (MpegTSBase *base, MpegTSPacketizerPacket *packet);
   /* takes ownership of @event */
   gboolean (*push_event) (MpegTSBase *base, GstEvent * event);
 
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index 84cc72e..1cdb9e9 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -50,8 +50,8 @@
 
 static void mpegts_packetizer_dispose (GObject * object);
 static void mpegts_packetizer_finalize (GObject * object);
-static GstClockTime calculate_skew (MpegTSPCR * pcr, guint64 pcrtime,
-    GstClockTime time);
+static GstClockTime calculate_skew (MpegTSPacketizer2 * packetizer,
+    MpegTSPCR * pcr, guint64 pcrtime, GstClockTime time);
 static void _close_current_group (MpegTSPCR * pcrtable);
 static void record_pcr (MpegTSPacketizer2 * packetizer, MpegTSPCR * pcrtable,
     guint64 pcr, guint64 offset);
@@ -121,6 +121,19 @@
   packetizer->lastobsid = 0;
 }
 
+GstClockTime
+mpegts_packetizer_get_current_time (MpegTSPacketizer2 * packetizer,
+    guint16 pcr_pid)
+{
+  MpegTSPCR *pcrtable = get_pcr_table (packetizer, pcr_pid);
+
+  if (pcrtable == NULL)
+    return GST_CLOCK_TIME_NONE;
+
+  return mpegts_packetizer_pts_to_ts (packetizer, pcrtable->last_pcrtime,
+      pcr_pid);
+}
+
 static inline MpegTSPacketizerStreamSubtable *
 find_subtable (GSList * subtables, guint8 table_id, guint16 subtable_extension)
 {
@@ -135,7 +148,7 @@
       return sub;
   }
 
-  return FALSE;
+  return NULL;
 }
 
 static gboolean
@@ -259,6 +272,7 @@
   packetizer->nb_seen_offsets = 0;
   packetizer->refoffset = -1;
   packetizer->last_in_time = GST_CLOCK_TIME_NONE;
+  packetizer->pcr_discont_threshold = GST_SECOND;
 }
 
 static void
@@ -333,24 +347,25 @@
   if ((packet->scram_afc_cc & 0x30) == 0x20) {
     /* no payload, adaptation field of 183 bytes */
     if (length > 183) {
-      GST_WARNING ("PID %d afc == 0x%02x and length %d > 183",
+      GST_WARNING ("PID 0x%04x afc == 0x%02x and length %d > 183",
           packet->pid, packet->scram_afc_cc & 0x30, length);
       return FALSE;
     }
     if (length != 183) {
-      GST_WARNING ("PID %d afc == 0x%02x and length %d != 183",
+      GST_WARNING ("PID 0x%04x afc == 0x%02x and length %d != 183",
           packet->pid, packet->scram_afc_cc & 0x30, length);
       GST_MEMDUMP ("Unknown payload", packet->data + length,
           packet->data_end - packet->data - length);
     }
   } else if (length > 182) {
-    GST_WARNING ("PID %d afc == 0x%02x and length %d > 182",
+    GST_WARNING ("PID 0x%04x afc == 0x%02x and length %d > 182",
         packet->pid, packet->scram_afc_cc & 0x30, length);
     return FALSE;
   }
 
   if (packet->data + length > packet->data_end) {
-    GST_DEBUG ("PID %d afc length %d overflows the buffer current %d max %d",
+    GST_DEBUG
+        ("PID 0x%04x afc length %d overflows the buffer current %d max %d",
         packet->pid, length, (gint) (packet->data - packet->data_start),
         (gint) (packet->data_end - packet->data_start));
     return FALSE;
@@ -384,7 +399,8 @@
     if (packetizer->calculate_skew
         && GST_CLOCK_TIME_IS_VALID (packetizer->last_in_time)) {
       pcrtable = get_pcr_table (packetizer, packet->pid);
-      calculate_skew (pcrtable, packet->pcr, packetizer->last_in_time);
+      calculate_skew (packetizer, pcrtable, packet->pcr,
+          packetizer->last_in_time);
     }
     if (packetizer->calculate_offset) {
       if (!pcrtable)
@@ -623,7 +639,7 @@
 {
   MpegTSPacketizerStream *stream = packetizer->streams[pid];
   if (stream) {
-    GST_INFO ("Removing stream for PID %d", pid);
+    GST_INFO ("Removing stream for PID 0x%04x", pid);
     mpegts_packetizer_stream_free (stream);
     packetizer->streams[pid] = NULL;
   }
@@ -1038,7 +1054,7 @@
 
   /* We have more data to process ... */
   GST_DEBUG ("PID 0x%04x, More section present in packet (remaining bytes:%"
-      G_GSIZE_FORMAT ")", stream->pid, packet->data_end - data);
+      G_GSIZE_FORMAT ")", stream->pid, (gsize) (packet->data_end - data));
 
 section_start:
   GST_MEMDUMP ("section_start", data, packet->data_end - data);
@@ -1270,7 +1286,8 @@
  * Returns: @time adjusted with the clock skew.
  */
 static GstClockTime
-calculate_skew (MpegTSPCR * pcr, guint64 pcrtime, GstClockTime time)
+calculate_skew (MpegTSPacketizer2 * packetizer,
+    MpegTSPCR * pcr, guint64 pcrtime, GstClockTime time)
 {
   guint64 send_diff, recv_diff;
   gint64 delta;
@@ -1308,7 +1325,8 @@
       send_diff = gstpcrtime - pcr->base_pcrtime;
     } else if (GST_CLOCK_TIME_IS_VALID (time)
         && pcr->last_pcrtime - gstpcrtime > 15 * GST_SECOND) {
-      /* Assume a reset */
+      /* Time jumped backward by > 15 seconds, and we have a timestamp
+       * to use to close the discont. Assume a reset */
       GST_DEBUG ("PCR reset");
       /* Calculate PCR we would have expected for the given input time,
        * essentially applying the reverse correction process
@@ -1335,10 +1353,22 @@
           " corrected pcr time %" GST_TIME_FORMAT,
           GST_TIME_ARGS (pcr->pcroffset), GST_TIME_ARGS (gstpcrtime));
     } else {
-      GST_WARNING ("backward timestamps at server but no timestamps");
+      /* Small jumps backward, assume some arrival jitter and skip it */
       send_diff = 0;
-      /* at least try to get a new timestamp.. */
-      pcr->base_time = GST_CLOCK_TIME_NONE;
+
+      if (pcr->last_pcrtime - gstpcrtime < GST_SECOND) {
+        GST_WARNING
+            ("(small) backward timestamps at server or no buffer timestamps. Ignoring.");
+        /* This will trigger the no_skew logic before but leave other state
+         * intact */
+        time = GST_CLOCK_TIME_NONE;
+      } else {
+        /* A bigger backward step than packet out-of-order can account for. Reset base PCR time
+         * to be resynched the next time we see a PCR */
+        GST_WARNING
+            ("backward timestamps at server or no buffer timestamps. Resync base PCR");
+        pcr->base_pcrtime = GST_CLOCK_TIME_NONE;
+      }
     }
   } else
     send_diff = gstpcrtime - pcr->base_pcrtime;
@@ -1383,7 +1413,7 @@
   /* if the difference between the sender timeline and the receiver timeline
    * changed too quickly we have to resync because the server likely restarted
    * its timestamps. */
-  if (ABS (delta - pcr->skew) > GST_SECOND) {
+  if (ABS (delta - pcr->skew) > packetizer->pcr_discont_threshold) {
     GST_WARNING ("delta - skew: %" GST_TIME_FORMAT " too big, reset skew",
         GST_TIME_ARGS (delta - pcr->skew));
     mpegts_packetizer_resync (pcr, time, gstpcrtime, TRUE);
@@ -1582,8 +1612,8 @@
         GST_DEBUG ("Previous group bitrate (%" G_GUINT64_FORMAT " / %"
             GST_TIME_FORMAT ") : %" G_GUINT64_FORMAT,
             current->pending[current->last].offset,
-            GST_TIME_ARGS (PCRTIME_TO_GSTTIME (current->pending[current->
-                        last].pcr)), prevbr);
+            GST_TIME_ARGS (PCRTIME_TO_GSTTIME (current->pending[current->last].
+                    pcr)), prevbr);
       } else if (prev->values[prev->last_value].offset) {
         prevoffset = prev->values[prev->last_value].offset + prev->first_offset;
         prevpcr = prev->values[prev->last_value].pcr + prev->first_pcr;
@@ -1595,8 +1625,8 @@
         GST_DEBUG ("Previous group bitrate (%" G_GUINT64_FORMAT " / %"
             GST_TIME_FORMAT ") : %" G_GUINT64_FORMAT,
             prev->values[prev->last_value].offset,
-            GST_TIME_ARGS (PCRTIME_TO_GSTTIME (prev->values[prev->
-                        last_value].pcr)), prevbr);
+            GST_TIME_ARGS (PCRTIME_TO_GSTTIME (prev->values[prev->last_value].
+                    pcr)), prevbr);
       } else {
         GST_DEBUG ("Using overall bitrate");
         prevoffset = prev->values[prev->last_value].offset + prev->first_offset;
@@ -1874,6 +1904,7 @@
 
   packetizer->nb_seen_offsets += 1;
 
+  pcrtable->last_pcrtime = PCRTIME_TO_GSTTIME (pcr);
   /* FIXME : Invert logic later (probability is higher that we have a
    * current estimator) */
 
@@ -1904,9 +1935,8 @@
           group->first_offset,
           GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->pcr_offset)));
       GST_DEBUG ("Last PCR: +%" GST_TIME_FORMAT " offset: +%" G_GUINT64_FORMAT,
-          GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->values[group->
-                      last_value].pcr)),
-          group->values[group->last_value].offset);
+          GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->values[group->last_value].
+                  pcr)), group->values[group->last_value].offset);
       /* Check if before group */
       if (offset < group->first_offset) {
         GST_DEBUG ("offset is before that group");
@@ -2403,6 +2433,15 @@
 }
 
 void
+mpegts_packetizer_set_pcr_discont_threshold (MpegTSPacketizer2 * packetizer,
+    GstClockTime threshold)
+{
+  PACKETIZER_GROUP_LOCK (packetizer);
+  packetizer->pcr_discont_threshold = threshold;
+  PACKETIZER_GROUP_UNLOCK (packetizer);
+}
+
+void
 mpegts_packetizer_set_current_pcr_offset (MpegTSPacketizer2 * packetizer,
     GstClockTime offset, guint16 pcr_pid)
 {
diff --git a/gst/mpegtsdemux/mpegtspacketizer.h b/gst/mpegtsdemux/mpegtspacketizer.h
index f107b80..be8bf37 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.h
+++ b/gst/mpegtsdemux/mpegtspacketizer.h
@@ -282,6 +282,7 @@
   guint8 pcrtablelut[0x2000];
   MpegTSPCR *observations[MAX_PCR_OBS_CHANNELS];
   guint8 lastobsid;
+  GstClockTime pcr_discont_threshold;
 };
 
 struct _MpegTSPacketizer2Class {
@@ -365,12 +366,18 @@
 G_GNUC_INTERNAL GstClockTime
 mpegts_packetizer_pts_to_ts (MpegTSPacketizer2 * packetizer,
 			     GstClockTime pts, guint16 pcr_pid);
+G_GNUC_INTERNAL GstClockTime
+mpegts_packetizer_get_current_time (MpegTSPacketizer2 * packetizer,
+				    guint16 pcr_pid);
 G_GNUC_INTERNAL void
 mpegts_packetizer_set_current_pcr_offset (MpegTSPacketizer2 * packetizer,
 			  GstClockTime offset, guint16 pcr_pid);
 G_GNUC_INTERNAL void
 mpegts_packetizer_set_reference_offset (MpegTSPacketizer2 * packetizer,
 					guint64 refoffset);
+G_GNUC_INTERNAL void
+mpegts_packetizer_set_pcr_discont_threshold (MpegTSPacketizer2 * packetizer,
+					GstClockTime threshold);
 G_END_DECLS
 
 #endif /* GST_MPEGTS_PACKETIZER_H */
diff --git a/gst/mpegtsdemux/mpegtsparse.c b/gst/mpegtsdemux/mpegtsparse.c
index 87281b2..743da4f 100644
--- a/gst/mpegtsdemux/mpegtsparse.c
+++ b/gst/mpegtsdemux/mpegtsparse.c
@@ -34,8 +34,8 @@
 #include "mpegtsparse.h"
 #include "gstmpegdesc.h"
 
-/* latency in mseconds */
-#define TS_LATENCY 700
+/* latency in mseconds is maximum 100 ms between PCR */
+#define TS_LATENCY 100
 
 #define TABLE_ID_UNSET 0xFF
 #define RUNNING_STATUS_RUNNING 4
@@ -80,10 +80,18 @@
 
 enum
 {
-  ARG_0,
+  PROP_0,
+  PROP_SET_TIMESTAMPS,
+  PROP_SMOOTHING_LATENCY,
+  PROP_PCR_PID,
   /* FILL ME */
 };
 
+static void mpegts_parse_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void mpegts_parse_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
 static void
 mpegts_parse_program_started (MpegTSBase * base, MpegTSBaseProgram * program);
 static void
@@ -92,6 +100,8 @@
 static GstFlowReturn
 mpegts_parse_push (MpegTSBase * base, MpegTSPacketizerPacket * packet,
     GstMpegtsSection * section);
+static void mpegts_parse_inspect_packet (MpegTSBase * base,
+    MpegTSPacketizerPacket * packet);
 
 static MpegTSParsePad *mpegts_parse_create_tspad (MpegTSParse2 * parse,
     const gchar * name);
@@ -111,13 +121,34 @@
 static void mpegts_parse_reset (MpegTSBase * base);
 static GstFlowReturn mpegts_parse_input_done (MpegTSBase * base,
     GstBuffer * buffer);
+static GstFlowReturn
+drain_pending_buffers (MpegTSParse2 * parse, gboolean drain_all);
 
 static void
 mpegts_parse_class_init (MpegTSParse2Class * klass)
 {
+  GObjectClass *gobject_class = (GObjectClass *) (klass);
   GstElementClass *element_class;
   MpegTSBaseClass *ts_class;
 
+  gobject_class->set_property = mpegts_parse_set_property;
+  gobject_class->get_property = mpegts_parse_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_SET_TIMESTAMPS,
+      g_param_spec_boolean ("set-timestamps",
+          "Timestamp (or re-timestamp) the output stream",
+          "If set, timestamps will be set on the output buffers using "
+          "PCRs and smoothed over the smoothing-latency period", FALSE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_SMOOTHING_LATENCY,
+      g_param_spec_uint ("smoothing-latency", "Smoothing Latency",
+          "Additional latency in microseconds for smoothing jitter in input timestamps on live capture",
+          0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PCR_PID,
+      g_param_spec_int ("pcr-pid", "PID containing PCR",
+          "Set the PID to use for PCR values (-1 for auto)",
+          -1, G_MAXINT, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   element_class = GST_ELEMENT_CLASS (klass);
   element_class->pad_removed = mpegts_parse_pad_removed;
   element_class->request_new_pad = mpegts_parse_request_new_pad;
@@ -141,6 +172,7 @@
   ts_class->program_stopped = GST_DEBUG_FUNCPTR (mpegts_parse_program_stopped);
   ts_class->reset = GST_DEBUG_FUNCPTR (mpegts_parse_reset);
   ts_class->input_done = GST_DEBUG_FUNCPTR (mpegts_parse_input_done);
+  ts_class->inspect_packet = GST_DEBUG_FUNCPTR (mpegts_parse_inspect_packet);
 }
 
 static void
@@ -153,8 +185,12 @@
   base->push_data = FALSE;
   base->push_section = FALSE;
 
+  parse->user_pcr_pid = parse->pcr_pid = -1;
+
   parse->srcpad = gst_pad_new_from_static_template (&src_template, "src");
   parse->first = TRUE;
+  gst_pad_set_query_function (parse->srcpad,
+      GST_DEBUG_FUNCPTR (mpegts_parse_src_pad_query));
   gst_element_add_pad (GST_ELEMENT (parse), parse->srcpad);
 
   parse->have_group_id = FALSE;
@@ -164,6 +200,8 @@
 static void
 mpegts_parse_reset (MpegTSBase * base)
 {
+  MpegTSParse2 *parse = (MpegTSParse2 *) base;
+
   /* Set the various know PIDs we are interested in */
 
   /* CAT */
@@ -187,58 +225,124 @@
   /* SIT */
   MPEGTS_BIT_SET (base->known_psi, 0x1f);
 
-  GST_MPEGTS_PARSE (base)->first = TRUE;
-  GST_MPEGTS_PARSE (base)->have_group_id = FALSE;
-  GST_MPEGTS_PARSE (base)->group_id = G_MAXUINT;
+  parse->first = TRUE;
+  parse->have_group_id = FALSE;
+  parse->group_id = G_MAXUINT;
 
-  g_list_free_full (GST_MPEGTS_PARSE (base)->pending_buffers,
-      (GDestroyNotify) gst_buffer_unref);
-  GST_MPEGTS_PARSE (base)->pending_buffers = NULL;;
+  g_list_free_full (parse->pending_buffers, (GDestroyNotify) gst_buffer_unref);
+  parse->pending_buffers = NULL;
+
+  parse->current_pcr = GST_CLOCK_TIME_NONE;
+  parse->previous_pcr = GST_CLOCK_TIME_NONE;
+  parse->base_pcr = GST_CLOCK_TIME_NONE;
+  parse->bytes_since_pcr = 0;
+  parse->pcr_pid = parse->user_pcr_pid;
+  parse->ts_offset = 0;
 }
 
 static void
+mpegts_parse_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  MpegTSParse2 *parse = (MpegTSParse2 *) object;
+
+  switch (prop_id) {
+    case PROP_SET_TIMESTAMPS:
+      parse->set_timestamps = g_value_get_boolean (value);
+      break;
+    case PROP_SMOOTHING_LATENCY:
+      parse->smoothing_latency = GST_USECOND * g_value_get_uint (value);
+      mpegts_packetizer_set_pcr_discont_threshold (GST_MPEGTS_BASE
+          (parse)->packetizer, parse->smoothing_latency);
+      break;
+    case PROP_PCR_PID:
+      parse->pcr_pid = parse->user_pcr_pid = g_value_get_int (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+  }
+}
+
+static void
+mpegts_parse_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  MpegTSParse2 *parse = (MpegTSParse2 *) object;
+
+  switch (prop_id) {
+    case PROP_SET_TIMESTAMPS:
+      g_value_set_boolean (value, parse->set_timestamps);
+      break;
+    case PROP_SMOOTHING_LATENCY:
+      g_value_set_uint (value, parse->smoothing_latency / GST_USECOND);
+      break;
+    case PROP_PCR_PID:
+      g_value_set_int (value, parse->pcr_pid);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+  }
+}
+
+static gboolean
 prepare_src_pad (MpegTSBase * base, MpegTSParse2 * parse)
 {
-  if (base->packetizer->packet_size) {
-    GstEvent *event;
-    gchar *stream_id;
-    GstCaps *caps;
+  GstEvent *event;
+  gchar *stream_id;
+  GstCaps *caps;
 
-    stream_id =
-        gst_pad_create_stream_id (parse->srcpad, GST_ELEMENT_CAST (base),
-        "multi-program");
+  if (!parse->first)
+    return TRUE;
 
-    event =
-        gst_pad_get_sticky_event (parse->parent.sinkpad, GST_EVENT_STREAM_START,
-        0);
-    if (event) {
-      if (gst_event_parse_group_id (event, &parse->group_id))
-        parse->have_group_id = TRUE;
-      else
-        parse->have_group_id = FALSE;
-      gst_event_unref (event);
-    } else if (!parse->have_group_id) {
+  /* If there's no packet_size yet, we can't set caps yet */
+  if (G_UNLIKELY (base->packetizer->packet_size == 0))
+    return FALSE;
+
+  stream_id =
+      gst_pad_create_stream_id (parse->srcpad, GST_ELEMENT_CAST (base),
+      "multi-program");
+
+  event =
+      gst_pad_get_sticky_event (parse->parent.sinkpad, GST_EVENT_STREAM_START,
+      0);
+  if (event) {
+    if (gst_event_parse_group_id (event, &parse->group_id))
       parse->have_group_id = TRUE;
-      parse->group_id = gst_util_group_id_next ();
-    }
-    event = gst_event_new_stream_start (stream_id);
-    if (parse->have_group_id)
-      gst_event_set_group_id (event, parse->group_id);
-
-    gst_pad_push_event (parse->srcpad, event);
-    g_free (stream_id);
-
-    caps = gst_caps_new_simple ("video/mpegts",
-        "systemstream", G_TYPE_BOOLEAN, TRUE,
-        "packetsize", G_TYPE_INT, base->packetizer->packet_size, NULL);
-
-    gst_pad_set_caps (parse->srcpad, caps);
-    gst_caps_unref (caps);
-
-    gst_pad_push_event (parse->srcpad, gst_event_new_segment (&base->segment));
-
-    parse->first = FALSE;
+    else
+      parse->have_group_id = FALSE;
+    gst_event_unref (event);
+  } else if (!parse->have_group_id) {
+    parse->have_group_id = TRUE;
+    parse->group_id = gst_util_group_id_next ();
   }
+  event = gst_event_new_stream_start (stream_id);
+  if (parse->have_group_id)
+    gst_event_set_group_id (event, parse->group_id);
+
+  gst_pad_push_event (parse->srcpad, event);
+  g_free (stream_id);
+
+  caps = gst_caps_new_simple ("video/mpegts",
+      "systemstream", G_TYPE_BOOLEAN, TRUE,
+      "packetsize", G_TYPE_INT, base->packetizer->packet_size, NULL);
+
+  gst_pad_set_caps (parse->srcpad, caps);
+  gst_caps_unref (caps);
+
+  /* If setting output timestamps, ensure that the output segment is TIME */
+  if (parse->set_timestamps == FALSE || base->segment.format == GST_FORMAT_TIME)
+    gst_pad_push_event (parse->srcpad, gst_event_new_segment (&base->segment));
+  else {
+    GstSegment seg;
+    gst_segment_init (&seg, GST_FORMAT_TIME);
+    GST_DEBUG_OBJECT (parse,
+        "Generating time output segment %" GST_SEGMENT_FORMAT, &seg);
+    gst_pad_push_event (parse->srcpad, gst_event_new_segment (&seg));
+  }
+
+  parse->first = FALSE;
+
+  return TRUE;
 }
 
 static gboolean
@@ -255,6 +359,11 @@
     }
     prepare_src_pad (base, parse);
   }
+  if (G_UNLIKELY (GST_EVENT_TYPE (event) == GST_EVENT_EOS))
+    drain_pending_buffers (parse, TRUE);
+
+  if (G_UNLIKELY (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT))
+    parse->ts_offset = 0;
 
   for (tmp = parse->srcpads; tmp; tmp = tmp->next) {
     GstPad *pad = (GstPad *) tmp->data;
@@ -559,39 +668,214 @@
   return ret;
 }
 
+static void
+mpegts_parse_inspect_packet (MpegTSBase * base, MpegTSPacketizerPacket * packet)
+{
+  MpegTSParse2 *parse = GST_MPEGTS_PARSE (base);
+  GST_LOG ("pid 0x%04x pusi:%d, afc:%d, cont:%d, payload:%p PCR %"
+      G_GUINT64_FORMAT, packet->pid, packet->payload_unit_start_indicator,
+      packet->scram_afc_cc & 0x30,
+      FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc), packet->payload,
+      packet->pcr);
+
+  /* Store the PCR if desired */
+  if (parse->current_pcr == GST_CLOCK_TIME_NONE &&
+      packet->afc_flags & MPEGTS_AFC_PCR_FLAG) {
+    /* Take this as the pcr_pid if set to auto-select */
+    if (parse->pcr_pid == -1)
+      parse->pcr_pid = packet->pid;
+    /* Check the PCR-PID matches the program we want for multiple programs */
+    if (parse->pcr_pid == packet->pid) {
+      parse->current_pcr = PCRTIME_TO_GSTTIME (packet->pcr);
+      if (parse->base_pcr == GST_CLOCK_TIME_NONE) {
+        parse->base_pcr = parse->current_pcr;
+      }
+    }
+  }
+}
+
+static GstClockTime
+get_pending_timestamp_diff (MpegTSParse2 * parse)
+{
+  GList *l;
+  GstClockTime first_ts, last_ts;
+
+  if (parse->pending_buffers == NULL)
+    return GST_CLOCK_TIME_NONE;
+
+  l = g_list_last (parse->pending_buffers);
+  first_ts = GST_BUFFER_PTS (l->data);
+  if (first_ts == GST_CLOCK_TIME_NONE)
+    return GST_CLOCK_TIME_NONE;
+
+  l = g_list_first (parse->pending_buffers);
+  last_ts = GST_BUFFER_PTS (l->data);
+  if (last_ts == GST_CLOCK_TIME_NONE)
+    return GST_CLOCK_TIME_NONE;
+
+  return last_ts - first_ts;
+}
+
+static GstFlowReturn
+drain_pending_buffers (MpegTSParse2 * parse, gboolean drain_all)
+{
+  MpegTSBase *base = (MpegTSBase *) (parse);
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstClockTime start_ts;
+  GstClockTime pcr = GST_CLOCK_TIME_NONE;
+  GstClockTime pcr_diff = 0;
+  gsize pcr_bytes, bytes_since_pcr, pos;
+  GstBuffer *buffer;
+  GList *l, *end = NULL;
+
+  if (parse->pending_buffers == NULL)
+    return GST_FLOW_OK;         /* Nothing to push */
+
+  /*
+   * There are 4 cases:
+   *  1 We get a buffer with no PCR -> it's the head of the list
+   *      -> Do nothing, unless it's EOS
+   *  2 We get a buffer with a PCR, it's the first PCR we've seen, and belongs
+   *    to the buffer at the head of the list
+   *    -> Push any buffers in the list except the head,
+   *       using a smoothing of their timestamps to land at the PCR
+   *    -> store new PCR as the previous PCR, bytes_since_pcr = sizeof (buffer);
+   *  3 It's EOS (drain_all == TRUE, current_pcr == NONE)
+   *    -> Push any buffers in the list using a smoothing of their timestamps
+   *       starting at the previous PCR or first TS
+   *  4 We get a buffer with a PCR, and have a previous PCR
+   *    -> If distance > smoothing_latency,
+   *       output buffers except the last in the pending queue using
+   *       piecewise-linear timestamps
+   *    -> store new PCR as the previous PCR, bytes_since_pcr = sizeof (buffer);
+   */
+
+  /* Case 1 */
+  if (!GST_CLOCK_TIME_IS_VALID (parse->current_pcr) && !drain_all)
+    return GST_FLOW_OK;
+
+  if (GST_CLOCK_TIME_IS_VALID (parse->current_pcr)) {
+    pcr = mpegts_packetizer_pts_to_ts (base->packetizer,
+        parse->current_pcr, parse->pcr_pid);
+    parse->current_pcr = GST_CLOCK_TIME_NONE;
+  }
+
+  /* The bytes of the last buffer are after the PCR */
+  buffer = GST_BUFFER (g_list_nth_data (parse->pending_buffers, 0));
+  bytes_since_pcr = gst_buffer_get_size (buffer);
+
+  pcr_bytes = parse->bytes_since_pcr - bytes_since_pcr;
+
+  if (!drain_all)
+    end = g_list_first (parse->pending_buffers);
+
+  /* Case 2 */
+  if (!GST_CLOCK_TIME_IS_VALID (parse->previous_pcr)) {
+    pcr_diff = get_pending_timestamp_diff (parse);
+
+    /* Calculate the start_ts that ends at the end timestamp */
+    start_ts = GST_CLOCK_TIME_NONE;
+    if (end) {
+      start_ts = GST_BUFFER_PTS (GST_BUFFER (end->data));
+      if (start_ts > pcr_diff)
+        start_ts -= pcr_diff;
+    }
+  } else if (drain_all) {       /* Case 3 */
+    start_ts = parse->previous_pcr;
+    pcr_diff = get_pending_timestamp_diff (parse);
+  } else {                      /* Case 4 */
+    start_ts = parse->previous_pcr;
+    if (GST_CLOCK_TIME_IS_VALID (pcr) && pcr > start_ts)
+      pcr_diff = GST_CLOCK_DIFF (start_ts, pcr);
+
+    /* Make sure PCR observations are sufficiently far apart */
+    if (drain_all == FALSE && pcr_diff < parse->smoothing_latency)
+      return GST_FLOW_OK;
+  }
+
+  GST_INFO_OBJECT (parse, "Pushing buffers - startTS %" GST_TIME_FORMAT
+      " duration %" GST_TIME_FORMAT " %" G_GSIZE_FORMAT " bytes",
+      GST_TIME_ARGS (start_ts), GST_TIME_ARGS (pcr_diff), pcr_bytes);
+
+  /* Now, push buffers out pacing timestamps over pcr_diff time and pcr_bytes */
+  pos = 0;
+  l = g_list_last (parse->pending_buffers);
+  while (l != end) {
+    GList *p;
+    GstClockTime out_ts = start_ts;
+
+    buffer = gst_buffer_make_writable (GST_BUFFER (l->data));
+
+    if (out_ts != GST_CLOCK_TIME_NONE && pcr_diff != GST_CLOCK_TIME_NONE &&
+        pcr_bytes && pos)
+      out_ts += gst_util_uint64_scale (pcr_diff, pos, pcr_bytes);
+
+    pos += gst_buffer_get_size (buffer);
+
+    GST_DEBUG_OBJECT (parse,
+        "InputTS %" GST_TIME_FORMAT " out %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (GST_BUFFER_PTS (buffer)), GST_TIME_ARGS (out_ts));
+
+    GST_BUFFER_PTS (buffer) = out_ts + parse->ts_offset;
+    GST_BUFFER_DTS (buffer) = out_ts + parse->ts_offset;
+    if (ret == GST_FLOW_OK)
+      ret = gst_pad_push (parse->srcpad, buffer);
+    else
+      gst_buffer_unref (buffer);
+
+    /* Free this list node and move to the next */
+    p = g_list_previous (l);
+    parse->pending_buffers = g_list_remove_link (parse->pending_buffers, l);
+    g_list_free_1 (l);
+    l = p;
+  }
+
+  parse->pending_buffers = end;
+  parse->bytes_since_pcr = bytes_since_pcr;
+  parse->previous_pcr = pcr;
+  return ret;
+}
+
 static GstFlowReturn
 mpegts_parse_input_done (MpegTSBase * base, GstBuffer * buffer)
 {
   MpegTSParse2 *parse = GST_MPEGTS_PARSE (base);
   GstFlowReturn ret = GST_FLOW_OK;
 
-  if (G_UNLIKELY (parse->first))
-    prepare_src_pad (base, parse);
+  GST_LOG_OBJECT (parse, "Received buffer %" GST_PTR_FORMAT, buffer);
 
-  if (G_UNLIKELY (parse->first)) {
-    parse->pending_buffers = g_list_append (parse->pending_buffers, buffer);
-    return GST_FLOW_OK;
+  if (parse->current_pcr != GST_CLOCK_TIME_NONE) {
+    GST_DEBUG_OBJECT (parse,
+        "InputTS %" GST_TIME_FORMAT " PCR %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (GST_BUFFER_PTS (buffer)),
+        GST_TIME_ARGS (mpegts_packetizer_pts_to_ts (base->packetizer,
+                parse->current_pcr, parse->pcr_pid)));
   }
 
-  if (G_UNLIKELY (parse->pending_buffers)) {
-    GList *l;
+  if (parse->set_timestamps || parse->first) {
+    parse->pending_buffers = g_list_prepend (parse->pending_buffers, buffer);
+    parse->bytes_since_pcr += gst_buffer_get_size (buffer);
+    buffer = NULL;
+  }
 
-    for (l = parse->pending_buffers; l; l = l->next) {
-      if (ret == GST_FLOW_OK)
-        ret = gst_pad_push (parse->srcpad, l->data);
-      else
-        gst_buffer_unref (l->data);
-    }
-    g_list_free (parse->pending_buffers);
-    parse->pending_buffers = NULL;
+  if (!prepare_src_pad (base, parse))
+    return GST_FLOW_OK;
 
+  if (parse->pending_buffers != NULL) {
+    /* Don't keep pending_buffers if not setting output timestamps */
+    gboolean drain_all = (parse->set_timestamps == FALSE);
+    ret = drain_pending_buffers (parse, drain_all);
     if (ret != GST_FLOW_OK) {
-      gst_buffer_unref (buffer);
+      if (buffer)
+        gst_buffer_unref (buffer);
       return ret;
     }
   }
 
-  return gst_pad_push (parse->srcpad, buffer);
+  if (buffer != NULL)
+    ret = gst_pad_push (parse->srcpad, buffer);
+
+  return ret;
 }
 
 static MpegTSParsePad *
@@ -639,6 +923,10 @@
     tspad->program = NULL;
     parseprogram->tspad = NULL;
   }
+
+  parse->pcr_pid = -1;
+  parse->ts_offset += parse->current_pcr - parse->base_pcr;
+  parse->base_pcr = GST_CLOCK_TIME_NONE;
 }
 
 static gboolean
@@ -656,14 +944,17 @@
 
         gst_query_parse_latency (query, &is_live, &min_latency, &max_latency);
         if (is_live) {
-          min_latency += TS_LATENCY * GST_MSECOND;
+          GstClockTime extra_latency = TS_LATENCY * GST_MSECOND;
+          if (parse->set_timestamps) {
+            extra_latency = MAX (extra_latency, parse->smoothing_latency);
+          }
+          min_latency += extra_latency;
           if (max_latency != GST_CLOCK_TIME_NONE)
-            max_latency += TS_LATENCY * GST_MSECOND;
+            max_latency += extra_latency;
         }
 
         gst_query_set_latency (query, is_live, min_latency, max_latency);
       }
-
       break;
     }
     default:
diff --git a/gst/mpegtsdemux/mpegtsparse.h b/gst/mpegtsdemux/mpegtsparse.h
index 6848836..d3bc6a2 100644
--- a/gst/mpegtsdemux/mpegtsparse.h
+++ b/gst/mpegtsdemux/mpegtsparse.h
@@ -51,6 +51,13 @@
   gboolean have_group_id;
   guint group_id;
 
+  GstClockTime smoothing_latency;
+  GstClockTime base_pcr;
+  GstClockTime ts_offset;
+  GstClockTime current_pcr;
+  gint user_pcr_pid;
+  gint pcr_pid;
+
   /* Always present source pad */
   GstPad *srcpad;
 
@@ -58,7 +65,12 @@
 
   /* state */
   gboolean first;
+  gboolean set_timestamps;
+
+  /* Pending buffer state */
   GList *pending_buffers;
+  GstClockTime previous_pcr;
+  guint bytes_since_pcr;
 };
 
 struct _MpegTSParse2Class {
diff --git a/gst/mpegtsdemux/pesparse.c b/gst/mpegtsdemux/pesparse.c
index 08ec9a3..1d7a3b6 100644
--- a/gst/mpegtsdemux/pesparse.c
+++ b/gst/mpegtsdemux/pesparse.c
@@ -53,7 +53,7 @@
   guint32 val32;
   guint8 val8, flags;
 
-  g_return_val_if_fail (res != NULL, PES_PARSING_BAD);
+  g_assert (res != NULL);
 
   /* The smallest valid PES header is 6 bytes (prefix + stream_id + length) */
   if (G_UNLIKELY (length < 6))
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 9b2debb..8971bc8 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -64,18 +64,11 @@
  */
 #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	\
-  ", base:%"GST_TIME_FORMAT", position:%"GST_TIME_FORMAT		\
-  ", duration:%"GST_TIME_FORMAT"]"
-
-#define SEGMENT_ARGS(a) gst_format_get_name((a).format), (a).rate,	\
-    GST_TIME_ARGS((a).start), GST_TIME_ARGS((a).stop),			\
-    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
 
+/* latency in nsecs */
+#define TS_LATENCY (700 * GST_MSECOND)
+
 GST_DEBUG_CATEGORY_STATIC (ts_demux_debug);
 #define GST_CAT_DEFAULT ts_demux_debug
 
@@ -144,6 +137,9 @@
   /* Whether the pad was added or not */
   gboolean active;
 
+  /* Whether this is a sparse stream (subtitles or metadata) */
+  gboolean sparse;
+
   /* TRUE if we are waiting for a valid timestamp */
   gboolean pending_ts;
 
@@ -165,6 +161,13 @@
   GstClockTime pts;
   GstClockTime dts;
 
+  /* Reference PTS used to detect gaps */
+  GstClockTime gap_ref_pts;
+  /* Number of outputted buffers */
+  guint32 nb_out_buffers;
+  /* Reference number of buffers for gaps */
+  guint32 gap_ref_buffers;
+
   /* Current PTS/DTS for this stream (in 90kHz unit) */
   guint64 raw_pts, raw_dts;
 
@@ -175,7 +178,7 @@
   gboolean discont;
 
   /* The value to use when calculating the newsegment */
-  GstClockTime first_dts;
+  GstClockTime first_pts;
 
   GstTagList *taglist;
 
@@ -202,6 +205,7 @@
     "video/x-h264,stream-format=(string)byte-stream," \
       "alignment=(string)nal;" \
     "video/x-dirac;" \
+    "video/x-cavs;" \
     "video/x-wmv," \
       "wmvversion = (int) 3, " \
       "format = (string) WVC1" \
@@ -258,7 +262,7 @@
 
 enum
 {
-  ARG_0,
+  PROP_0,
   PROP_PROGRAM_NUMBER,
   PROP_EMIT_STATS,
   /* FILL ME */
@@ -288,13 +292,15 @@
     const GValue * value, GParamSpec * pspec);
 static void gst_ts_demux_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static void gst_ts_demux_flush_streams (GstTSDemux * tsdemux);
+static void gst_ts_demux_flush_streams (GstTSDemux * tsdemux, gboolean hard);
 static GstFlowReturn
 gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream);
 static void gst_ts_demux_stream_flush (TSDemuxStream * stream,
-    GstTSDemux * demux);
+    GstTSDemux * demux, gboolean hard);
 
 static gboolean push_event (MpegTSBase * base, GstEvent * event);
+static void gst_ts_demux_check_and_sync_streams (GstTSDemux * demux,
+    GstClockTime time);
 
 static void
 _extra_init (void)
@@ -379,8 +385,6 @@
 {
   GstTSDemux *demux = (GstTSDemux *) base;
 
-  demux->calculate_update_segment = FALSE;
-
   demux->rate = 1.0;
   gst_segment_init (&demux->segment, GST_FORMAT_UNDEFINED);
   if (demux->segment_event) {
@@ -388,11 +392,6 @@
     demux->segment_event = NULL;
   }
 
-  if (demux->update_segment) {
-    gst_event_unref (demux->update_segment);
-    demux->update_segment = NULL;
-  }
-
   if (demux->global_tags) {
     gst_tag_list_unref (demux->global_tags);
     demux->global_tags = NULL;
@@ -460,6 +459,25 @@
 }
 
 static gboolean
+gst_ts_demux_get_duration (GstTSDemux * demux, GstClockTime * dur)
+{
+  MpegTSBase *base = (MpegTSBase *) demux;
+  gboolean res = FALSE;
+  gint64 val;
+
+  /* Get total size in bytes */
+  if (gst_pad_peer_query_duration (base->sinkpad, GST_FORMAT_BYTES, &val)) {
+    /* Convert it to duration */
+    *dur =
+        mpegts_packetizer_offset_to_ts (base->packetizer, val,
+        demux->program->pcr_pid);
+    if (GST_CLOCK_TIME_IS_VALID (*dur))
+      res = TRUE;
+  }
+  return res;
+}
+
+static gboolean
 gst_ts_demux_srcpad_query (GstPad * pad, GstObject * parent, GstQuery * query)
 {
   gboolean res = TRUE;
@@ -477,20 +495,11 @@
       gst_query_parse_duration (query, &format, NULL);
       if (format == GST_FORMAT_TIME) {
         if (!gst_pad_peer_query (base->sinkpad, query)) {
-          gint64 val;
-
-          format = GST_FORMAT_BYTES;
-          if (!gst_pad_peer_query_duration (base->sinkpad, format, &val))
+          GstClockTime dur;
+          if (gst_ts_demux_get_duration (demux, &dur))
+            gst_query_set_duration (query, GST_FORMAT_TIME, dur);
+          else
             res = FALSE;
-          else {
-            GstClockTime dur =
-                mpegts_packetizer_offset_to_ts (base->packetizer, val,
-                demux->program->pcr_pid);
-            if (GST_CLOCK_TIME_IS_VALID (dur))
-              gst_query_set_duration (query, GST_FORMAT_TIME, dur);
-            else
-              res = FALSE;
-          }
         }
       } else {
         GST_DEBUG_OBJECT (demux, "only query duration on TIME is supported");
@@ -502,7 +511,7 @@
     {
       GST_DEBUG ("query latency");
       res = gst_pad_peer_query (base->sinkpad, query);
-      if (res && base->upstream_live) {
+      if (res) {
         GstClockTime min_lat, max_lat;
         gboolean live;
 
@@ -514,10 +523,9 @@
            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)
-          min_lat += 700 * GST_MSECOND;
-        if (max_lat != -1)
-          max_lat += 700 * GST_MSECOND;
+        min_lat += TS_LATENCY;
+        if (GST_CLOCK_TIME_IS_VALID (max_lat))
+          max_lat += TS_LATENCY;
         gst_query_set_latency (query, live, min_lat, max_lat);
       }
       break;
@@ -526,6 +534,7 @@
     {
       GST_DEBUG ("query seeking");
       gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
+      GST_DEBUG ("asked for format %s", gst_format_get_name (format));
       if (format == GST_FORMAT_TIME) {
         gboolean seekable = FALSE;
 
@@ -534,9 +543,13 @@
 
         /* If upstream is not seekable in TIME format we use
          * our own values here */
-        if (!seekable)
-          gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0,
-              demux->segment.duration);
+        if (!seekable) {
+          GstClockTime dur;
+          if (gst_ts_demux_get_duration (demux, &dur)) {
+            gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, dur);
+            GST_DEBUG ("Gave duration: %" GST_TIME_FORMAT, GST_TIME_ARGS (dur));
+          }
+        }
       } else {
         GST_DEBUG_OBJECT (demux, "only TIME is supported for query seeking");
         res = FALSE;
@@ -805,12 +818,28 @@
   /* configure the segment with the seek variables */
   GST_DEBUG_OBJECT (demux, "configuring seek");
 
-  start_offset =
-      mpegts_packetizer_ts_to_offset (base->packetizer, MAX (0,
-          start - SEEK_TIMESTAMP_OFFSET), demux->program->pcr_pid);
+  if (start_type != GST_SEEK_TYPE_NONE) {
+    start_offset =
+        mpegts_packetizer_ts_to_offset (base->packetizer, MAX (0,
+            start - SEEK_TIMESTAMP_OFFSET), demux->program->pcr_pid);
 
-  if (G_UNLIKELY (start_offset == -1)) {
-    GST_WARNING ("Couldn't convert start position to an offset");
+    if (G_UNLIKELY (start_offset == -1)) {
+      GST_WARNING ("Couldn't convert start position to an offset");
+      goto done;
+    }
+  } else {
+    for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
+      TSDemuxStream *stream = tmp->data;
+
+      stream->need_newsegment = TRUE;
+    }
+    gst_segment_init (&demux->segment, GST_FORMAT_UNDEFINED);
+    if (demux->segment_event) {
+      gst_event_unref (demux->segment_event);
+      demux->segment_event = NULL;
+    }
+    demux->rate = rate;
+    res = GST_FLOW_OK;
     goto done;
   }
 
@@ -820,14 +849,11 @@
   demux->rate = rate;
   res = GST_FLOW_OK;
 
-  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);
-  }
+  gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
+      start, stop_type, stop, NULL);
+  if (!(flags & GST_SEEK_FLAG_ACCURATE))
+    demux->reset_segment = TRUE;
+
   if (demux->segment_event) {
     gst_event_unref (demux->segment_event);
     demux->segment_event = NULL;
@@ -836,12 +862,13 @@
   for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
     TSDemuxStream *stream = tmp->data;
 
-
     if (flags & GST_SEEK_FLAG_ACCURATE)
       stream->needs_keyframe = TRUE;
 
     stream->seeked_pts = GST_CLOCK_TIME_NONE;
     stream->seeked_dts = GST_CLOCK_TIME_NONE;
+    stream->need_newsegment = TRUE;
+    stream->first_pts = GST_CLOCK_TIME_NONE;
   }
 
 done:
@@ -1015,6 +1042,9 @@
   GstPadTemplate *template = NULL;
   const GstMpegtsDescriptor *desc = NULL;
   GstPad *pad = NULL;
+  gboolean sparse = FALSE;
+  gboolean is_audio = FALSE, is_video = FALSE, is_subpicture = FALSE,
+      is_private = FALSE;
 
   gst_ts_demux_create_tags (stream);
 
@@ -1035,48 +1065,43 @@
             GST_MTS_DESC_AC3_AUDIO_STREAM);
         if (ac3_desc && DESC_AC_AUDIO_STREAM_bsid (ac3_desc->data) != 16) {
           GST_LOG ("ac3 audio");
-          template = gst_static_pad_template_get (&audio_template);
-          name = g_strdup_printf ("audio_%04x", bstream->pid);
+          is_audio = TRUE;
           caps = gst_caps_new_empty_simple ("audio/x-ac3");
         } else {
-          template = gst_static_pad_template_get (&audio_template);
-          name = g_strdup_printf ("audio_%04x", bstream->pid);
+          is_audio = TRUE;
           caps = gst_caps_new_empty_simple ("audio/x-eac3");
         }
         break;
       }
       case ST_BD_AUDIO_EAC3:
       case ST_BD_AUDIO_AC3_PLUS:
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-eac3");
         break;
       case ST_BD_AUDIO_AC3_TRUE_HD:
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-true-hd");
         stream->target_pes_substream = 0x72;
         break;
       case ST_BD_AUDIO_LPCM:
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-private-ts-lpcm");
         break;
       case ST_BD_PGS_SUBPICTURE:
-        template = gst_static_pad_template_get (&subpicture_template);
-        name = g_strdup_printf ("subpicture_%04x", bstream->pid);
+        is_subpicture = TRUE;
         caps = gst_caps_new_empty_simple ("subpicture/x-pgs");
+        sparse = TRUE;
         break;
       case ST_BD_AUDIO_DTS_HD:
       case ST_BD_AUDIO_DTS_HD_MASTER_AUDIO:
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-dts");
         stream->target_pes_substream = 0x71;
         break;
     }
   }
-  if (template && name && caps)
+
+  if (caps)
     goto done;
 
   /* Handle non-BluRay stream types */
@@ -1091,8 +1116,7 @@
        * * profile_and_level
        */
       GST_LOG ("mpeg video");
-      template = gst_static_pad_template_get (&video_template);
-      name = g_strdup_printf ("video_%04x", bstream->pid);
+      is_video = TRUE;
       caps = gst_caps_new_simple ("video/mpeg",
           "mpegversion", G_TYPE_INT,
           bstream->stream_type == GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1 ? 1 : 2,
@@ -1102,8 +1126,7 @@
     case GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1:
     case GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2:
       GST_LOG ("mpeg audio");
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps =
           gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 1,
           NULL);
@@ -1119,8 +1142,7 @@
       desc = mpegts_get_descriptor_from_stream (bstream, GST_MTS_DESC_DVB_AC3);
       if (desc) {
         GST_LOG ("ac3 audio");
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-ac3");
         break;
       }
@@ -1130,8 +1152,7 @@
           GST_MTS_DESC_DVB_ENHANCED_AC3);
       if (desc) {
         GST_LOG ("ac3 audio");
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-eac3");
         break;
       }
@@ -1140,9 +1161,9 @@
           GST_MTS_DESC_DVB_TELETEXT);
       if (desc) {
         GST_LOG ("teletext");
-        template = gst_static_pad_template_get (&private_template);
-        name = g_strdup_printf ("private_%04x", bstream->pid);
+        is_private = TRUE;
         caps = gst_caps_new_empty_simple ("application/x-teletext");
+        sparse = TRUE;
         break;
       }
       desc =
@@ -1150,9 +1171,9 @@
           GST_MTS_DESC_DVB_SUBTITLING);
       if (desc) {
         GST_LOG ("subtitling");
-        template = gst_static_pad_template_get (&private_template);
-        name = g_strdup_printf ("private_%04x", bstream->pid);
+        is_private = TRUE;
         caps = gst_caps_new_empty_simple ("subpicture/x-dvb");
+        sparse = TRUE;
         break;
       }
 
@@ -1161,30 +1182,32 @@
         case DRF_ID_DTS2:
         case DRF_ID_DTS3:
           /* SMPTE registered DTS */
-          template = gst_static_pad_template_get (&private_template);
-          name = g_strdup_printf ("private_%04x", bstream->pid);
+          is_private = TRUE;
           caps = gst_caps_new_empty_simple ("audio/x-dts");
           break;
         case DRF_ID_S302M:
-          template = gst_static_pad_template_get (&audio_template);
-          name = g_strdup_printf ("audio_%04x", bstream->pid);
+          is_audio = TRUE;
           caps = gst_caps_new_empty_simple ("audio/x-smpte-302m");
           break;
         case DRF_ID_HEVC:
-          template = gst_static_pad_template_get (&video_template);
-          name = g_strdup_printf ("video_%04x", bstream->pid);
+          is_video = TRUE;
           caps = gst_caps_new_simple ("video/x-h265",
               "stream-format", G_TYPE_STRING, "byte-stream",
               "alignment", G_TYPE_STRING, "nal", NULL);
           break;
+        case DRF_ID_KLVA:
+          sparse = TRUE;
+          is_private = TRUE;
+          caps = gst_caps_new_simple ("meta/x-klv",
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+          break;
       }
-      if (template)
+      if (caps)
         break;
 
       /* hack for itv hd (sid 10510, video pid 3401 */
       if (program->program_number == 10510 && bstream->pid == 3401) {
-        template = gst_static_pad_template_get (&video_template);
-        name = g_strdup_printf ("video_%04x", bstream->pid);
+        is_video = TRUE;
         caps = gst_caps_new_simple ("video/x-h264",
             "stream-format", G_TYPE_STRING, "byte-stream",
             "alignment", G_TYPE_STRING, "nal", NULL);
@@ -1205,36 +1228,31 @@
       /* caps = gst_caps_new_simple ("hdv/aux-a", NULL); */
       break;
     case GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS:
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps = gst_caps_new_simple ("audio/mpeg",
           "mpegversion", G_TYPE_INT, 2,
           "stream-format", G_TYPE_STRING, "adts", NULL);
       break;
     case GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM:
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps = gst_caps_new_simple ("audio/mpeg",
           "mpegversion", G_TYPE_INT, 4,
           "stream-format", G_TYPE_STRING, "loas", NULL);
       break;
     case GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4:
-      template = gst_static_pad_template_get (&video_template);
-      name = g_strdup_printf ("video_%04x", bstream->pid);
+      is_video = TRUE;
       caps = gst_caps_new_simple ("video/mpeg",
           "mpegversion", G_TYPE_INT, 4,
           "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
       break;
     case GST_MPEGTS_STREAM_TYPE_VIDEO_H264:
-      template = gst_static_pad_template_get (&video_template);
-      name = g_strdup_printf ("video_%04x", bstream->pid);
+      is_video = TRUE;
       caps = gst_caps_new_simple ("video/x-h264",
           "stream-format", G_TYPE_STRING, "byte-stream",
           "alignment", G_TYPE_STRING, "nal", NULL);
       break;
     case GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC:
-      template = gst_static_pad_template_get (&video_template);
-      name = g_strdup_printf ("video_%04x", bstream->pid);
+      is_video = TRUE;
       caps = gst_caps_new_simple ("video/x-h265",
           "stream-format", G_TYPE_STRING, "byte-stream",
           "alignment", G_TYPE_STRING, "nal", NULL);
@@ -1243,8 +1261,7 @@
       if (bstream->registration_id == 0x64726163) {
         GST_LOG ("dirac");
         /* dirac in hex */
-        template = gst_static_pad_template_get (&video_template);
-        name = g_strdup_printf ("video_%04x", bstream->pid);
+        is_video = TRUE;
         caps = gst_caps_new_empty_simple ("video/x-dirac");
       }
       break;
@@ -1262,8 +1279,7 @@
             "for VC1. Assuming plain VC1.");
       }
 
-      template = gst_static_pad_template_get (&video_template);
-      name = g_strdup_printf ("video_%04x", bstream->pid);
+      is_video = TRUE;
       caps = gst_caps_new_simple ("video/x-wmv",
           "wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WVC1", NULL);
 
@@ -1275,8 +1291,7 @@
           mpegts_get_descriptor_from_stream (bstream,
           GST_MTS_DESC_DVB_ENHANCED_AC3);
       if (desc) {
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-eac3");
         break;
       }
@@ -1288,8 +1303,7 @@
       if (bstream->registration_id == DRF_ID_AC3 ||
           program->registration_id == DRF_ID_GA94 ||
           mpegts_get_descriptor_from_stream (bstream, GST_MTS_DESC_DVB_AC3)) {
-        template = gst_static_pad_template_get (&audio_template);
-        name = g_strdup_printf ("audio_%04x", bstream->pid);
+        is_audio = TRUE;
         caps = gst_caps_new_empty_simple ("audio/x-ac3");
         break;
       }
@@ -1297,24 +1311,27 @@
       GST_WARNING ("AC3 stream type found but no guaranteed "
           "way found to differentiate between AC3 and EAC3. "
           "Assuming plain AC3.");
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps = gst_caps_new_empty_simple ("audio/x-ac3");
       break;
     case ST_PS_AUDIO_DTS:
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps = gst_caps_new_empty_simple ("audio/x-dts");
       break;
     case ST_PS_AUDIO_LPCM:
-      template = gst_static_pad_template_get (&audio_template);
-      name = g_strdup_printf ("audio_%04x", bstream->pid);
+      is_audio = TRUE;
       caps = gst_caps_new_empty_simple ("audio/x-lpcm");
       break;
     case ST_PS_DVD_SUBPICTURE:
-      template = gst_static_pad_template_get (&subpicture_template);
-      name = g_strdup_printf ("subpicture_%04x", bstream->pid);
+      is_subpicture = TRUE;
       caps = gst_caps_new_empty_simple ("subpicture/x-dvd");
+      sparse = TRUE;
+      break;
+    case 0x42:
+      /* hack for Chinese AVS video stream which use 0x42 as stream_id
+       * NOTE: this is unofficial and within the ISO reserved range. */
+      is_video = TRUE;
+      caps = gst_caps_new_empty_simple ("video/x-cavs");
       break;
     default:
       GST_WARNING ("Non-media stream (stream_type:0x%x). Not creating pad",
@@ -1323,6 +1340,24 @@
   }
 
 done:
+  if (caps) {
+    if (is_audio) {
+      template = gst_static_pad_template_get (&audio_template);
+      name = g_strdup_printf ("audio_%04x", bstream->pid);
+    } else if (is_video) {
+      template = gst_static_pad_template_get (&video_template);
+      name = g_strdup_printf ("video_%04x", bstream->pid);
+    } else if (is_private) {
+      template = gst_static_pad_template_get (&private_template);
+      name = g_strdup_printf ("private_%04x", bstream->pid);
+    } else if (is_subpicture) {
+      template = gst_static_pad_template_get (&subpicture_template);
+      name = g_strdup_printf ("subpicture_%04x", bstream->pid);
+    } else
+      g_assert_not_reached ();
+
+  }
+
   if (template && name && caps) {
     GstEvent *event;
     gchar *stream_id;
@@ -1350,6 +1385,9 @@
     event = gst_event_new_stream_start (stream_id);
     if (demux->have_group_id)
       gst_event_set_group_id (event, demux->group_id);
+    if (sparse)
+      gst_event_set_stream_flags (event, GST_STREAM_FLAG_SPARSE);
+    stream->sparse = sparse;
 
     gst_pad_push_event (pad, event);
     g_free (stream_id);
@@ -1398,14 +1436,18 @@
     stream->active = FALSE;
 
     stream->need_newsegment = TRUE;
+    demux->reset_segment = TRUE;
     stream->needs_keyframe = FALSE;
     stream->discont = TRUE;
     stream->pts = GST_CLOCK_TIME_NONE;
     stream->dts = GST_CLOCK_TIME_NONE;
+    stream->first_pts = GST_CLOCK_TIME_NONE;
     stream->raw_pts = -1;
     stream->raw_dts = -1;
     stream->pending_ts = TRUE;
-    stream->first_dts = GST_CLOCK_TIME_NONE;
+    stream->nb_out_buffers = 0;
+    stream->gap_ref_buffers = 0;
+    stream->gap_ref_pts = GST_CLOCK_TIME_NONE;
     stream->continuity_counter = CONTINUITY_UNSET;
   }
 }
@@ -1450,7 +1492,12 @@
     stream->pad = NULL;
   }
 
-  gst_ts_demux_stream_flush (stream, GST_TS_DEMUX_CAST (base));
+  gst_ts_demux_stream_flush (stream, GST_TS_DEMUX_CAST (base), TRUE);
+
+  if (stream->taglist != NULL) {
+    gst_tag_list_unref (stream->taglist);
+    stream->taglist = NULL;
+  }
 
   tsdemux_h264_parsing_info_clear (&stream->h264infos);
 }
@@ -1458,35 +1505,31 @@
 static void
 activate_pad_for_stream (GstTSDemux * tsdemux, TSDemuxStream * stream)
 {
-  GList *tmp;
-  gboolean alldone = TRUE;
-
   if (stream->pad) {
     GST_DEBUG_OBJECT (tsdemux, "Activating pad %s:%s for stream %p",
         GST_DEBUG_PAD_NAME (stream->pad), stream);
     gst_element_add_pad ((GstElement *) tsdemux, stream->pad);
     stream->active = TRUE;
     GST_DEBUG_OBJECT (stream->pad, "done adding pad");
-
-    /* Check if all pads were activated, and if so emit no-more-pads */
-    for (tmp = tsdemux->program->stream_list; tmp; tmp = tmp->next) {
-      stream = (TSDemuxStream *) tmp->data;
-      if (stream->pad && !stream->active)
-        alldone = FALSE;
+    /* force sending of pending sticky events which have been stored on the
+     * pad already and which otherwise would only be sent on the first buffer
+     * or serialized event (which means very late in case of subtitle streams),
+     * and playsink waits for stream-start or another serialized event */
+    if (stream->sparse) {
+      GST_DEBUG_OBJECT (stream->pad, "sparse stream, pushing GAP event");
+      gst_pad_push_event (stream->pad, gst_event_new_gap (0, 0));
     }
-    if (alldone) {
-      GST_DEBUG_OBJECT (tsdemux, "All pads were activated, emit no-more-pads");
-      gst_element_no_more_pads ((GstElement *) tsdemux);
-    }
-  } else
+  } else if (((MpegTSBaseStream *) stream)->stream_type != 0xff) {
     GST_WARNING_OBJECT (tsdemux,
-        "stream %p (pid 0x%04x, type:0x%03x) has no pad", stream,
+        "stream %p (pid 0x%04x, type:0x%02x) has no pad", stream,
         ((MpegTSBaseStream *) stream)->pid,
         ((MpegTSBaseStream *) stream)->stream_type);
+  }
 }
 
 static void
-gst_ts_demux_stream_flush (TSDemuxStream * stream, GstTSDemux * tsdemux)
+gst_ts_demux_stream_flush (TSDemuxStream * stream, GstTSDemux * tsdemux,
+    gboolean hard)
 {
   GST_DEBUG ("flushing stream %p", stream);
 
@@ -1497,25 +1540,31 @@
   stream->expected_size = 0;
   stream->allocated_size = 0;
   stream->current_size = 0;
-  stream->need_newsegment = TRUE;
   stream->discont = TRUE;
   stream->pts = GST_CLOCK_TIME_NONE;
   stream->dts = GST_CLOCK_TIME_NONE;
-  stream->first_dts = GST_CLOCK_TIME_NONE;
   stream->raw_pts = -1;
   stream->raw_dts = -1;
   stream->pending_ts = TRUE;
+  stream->nb_out_buffers = 0;
+  stream->gap_ref_buffers = 0;
+  stream->gap_ref_pts = GST_CLOCK_TIME_NONE;
   stream->continuity_counter = CONTINUITY_UNSET;
+  if (hard) {
+    stream->first_pts = GST_CLOCK_TIME_NONE;
+    stream->need_newsegment = TRUE;
+  }
 }
 
 static void
-gst_ts_demux_flush_streams (GstTSDemux * demux)
+gst_ts_demux_flush_streams (GstTSDemux * demux, gboolean hard)
 {
+  GList *walk;
   if (!demux->program)
     return;
 
-  g_list_foreach (demux->program->stream_list,
-      (GFunc) gst_ts_demux_stream_flush, demux);
+  for (walk = demux->program->stream_list; walk; walk = g_list_next (walk))
+    gst_ts_demux_stream_flush (walk->data, demux, hard);
 }
 
 static void
@@ -1529,16 +1578,25 @@
 
   if (demux->requested_program_number == program->program_number ||
       (demux->requested_program_number == -1 && demux->program_number == -1)) {
+    GList *tmp;
 
     GST_LOG ("program %d started", program->program_number);
     demux->program_number = program->program_number;
     demux->program = program;
 
     /* If this is not the initial program, we need to calculate
-     * an update newsegment */
-    demux->calculate_update_segment = !program->initial_program;
+     * a new segment */
+    if (demux->segment_event) {
+      gst_event_unref (demux->segment_event);
+      demux->segment_event = NULL;
+    }
 
-    /* FIXME : When do we emit no_more_pads ? */
+    /* Add all streams, then fire no-more-pads */
+    for (tmp = program->stream_list; tmp; tmp = tmp->next) {
+      TSDemuxStream *stream = (TSDemuxStream *) tmp->data;
+      activate_pad_for_stream (demux, stream);
+    }
+    gst_element_no_more_pads ((GstElement *) demux);
   }
 }
 
@@ -1716,30 +1774,30 @@
           GST_BUFFER_DTS (pend->buffer) =
               mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux),
               MPEGTIME_TO_GSTTIME (pend->dts), demux->program->pcr_pid);
-        /* 4.2.2 Set first_dts to TS of lowest DTS (for segment) */
-        if (stream->first_dts == GST_CLOCK_TIME_NONE) {
-          if (GST_BUFFER_DTS (pend->buffer) != GST_CLOCK_TIME_NONE)
-            stream->first_dts = GST_BUFFER_DTS (pend->buffer);
-          else if (GST_BUFFER_PTS (pend->buffer) != GST_CLOCK_TIME_NONE)
-            stream->first_dts = GST_BUFFER_PTS (pend->buffer);
+        /* 4.2.2 Set first_pts to TS of lowest PTS (for segment) */
+        if (stream->first_pts == GST_CLOCK_TIME_NONE) {
+          if (GST_BUFFER_PTS (pend->buffer) != GST_CLOCK_TIME_NONE)
+            stream->first_pts = GST_BUFFER_PTS (pend->buffer);
+          else if (GST_BUFFER_DTS (pend->buffer) != GST_CLOCK_TIME_NONE)
+            stream->first_pts = GST_BUFFER_DTS (pend->buffer);
         }
       }
     }
     /* Recalculate PTS/DTS (in running time) for current data */
     if (stream->state != PENDING_PACKET_EMPTY) {
-      if (stream->raw_dts != -1) {
-        stream->dts =
-            mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux),
-            MPEGTIME_TO_GSTTIME (stream->raw_dts), demux->program->pcr_pid);
-        if (stream->first_dts == GST_CLOCK_TIME_NONE)
-          stream->first_dts = stream->dts;
-      }
       if (stream->raw_pts != -1) {
         stream->pts =
             mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux),
             MPEGTIME_TO_GSTTIME (stream->raw_pts), demux->program->pcr_pid);
-        if (stream->first_dts == GST_CLOCK_TIME_NONE)
-          stream->first_dts = stream->pts;
+        if (stream->first_pts == GST_CLOCK_TIME_NONE)
+          stream->first_pts = stream->pts;
+      }
+      if (stream->raw_dts != -1) {
+        stream->dts =
+            mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux),
+            MPEGTIME_TO_GSTTIME (stream->raw_dts), demux->program->pcr_pid);
+        if (stream->first_pts == GST_CLOCK_TIME_NONE)
+          stream->first_pts = stream->dts;
       }
     }
   }
@@ -1778,11 +1836,11 @@
               || stream->dts != GST_CLOCK_TIME_NONE))) {
     GST_DEBUG ("Got pts/dts update, rechecking all streams");
     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;
-    else if (GST_CLOCK_TIME_IS_VALID (stream->pts))
-      stream->first_dts = stream->pts;
+  } else if (stream->first_pts == GST_CLOCK_TIME_NONE) {
+    if (GST_CLOCK_TIME_IS_VALID (stream->pts))
+      stream->first_pts = stream->pts;
+    else if (GST_CLOCK_TIME_IS_VALID (stream->dts))
+      stream->first_pts = stream->dts;
   }
 
   GST_DEBUG_OBJECT (demux,
@@ -1798,7 +1856,7 @@
       stream->expected_size -= header.header_size;
     } else {
       /* next packet will have to complete this one */
-      GST_ERROR ("invalid header and packet size combination");
+      GST_WARNING ("invalid header and packet size combination, empty packet");
       stream->expected_size = 0;
     }
   }
@@ -1915,23 +1973,18 @@
 
   GST_DEBUG ("Creating new newsegment for stream %p", stream);
 
-  /* 1) If we need to calculate an update newsegment, do it
-   * 2) If we need to calculate a new newsegment, do it
-   * 3) If an update_segment is valid, push it
-   * 4) If a newsegment is valid, push it */
-
   /* Speedup : if we don't need to calculate anything, go straight to pushing */
-  if (!demux->calculate_update_segment && demux->segment_event)
+  if (demux->segment_event)
     goto push_new_segment;
 
-  /* Calculate the 'new_start' value, used for both updates and newsegment */
+  /* Calculate the 'new_start' value, used for newsegment */
   for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
     TSDemuxStream *pstream = (TSDemuxStream *) tmp->data;
 
-    if (GST_CLOCK_TIME_IS_VALID (pstream->first_dts)) {
+    if (GST_CLOCK_TIME_IS_VALID (pstream->first_pts)) {
       if (!GST_CLOCK_TIME_IS_VALID (lowest_pts)
-          || pstream->first_dts < lowest_pts)
-        lowest_pts = pstream->first_dts;
+          || pstream->first_pts < lowest_pts)
+        lowest_pts = pstream->first_pts;
     }
   }
   if (GST_CLOCK_TIME_IS_VALID (lowest_pts))
@@ -1939,21 +1992,7 @@
   GST_DEBUG ("lowest_pts %" G_GUINT64_FORMAT " => clocktime %" GST_TIME_FORMAT,
       lowest_pts, GST_TIME_ARGS (firstts));
 
-  if (demux->calculate_update_segment) {
-    GST_DEBUG ("Calculating update segment");
-    /* If we have a valid segment, create an update of that */
-    if (demux->segment.format == GST_FORMAT_TIME) {
-      GstSegment update_segment;
-      GST_DEBUG ("Re-using segment " SEGMENT_FORMAT,
-          SEGMENT_ARGS (demux->segment));
-      gst_segment_copy_into (&demux->segment, &update_segment);
-      update_segment.stop = firstts;
-      demux->update_segment = gst_event_new_segment (&update_segment);
-    }
-    demux->calculate_update_segment = FALSE;
-  }
-
-  if (demux->segment.format != GST_FORMAT_TIME) {
+  if (demux->segment.format != GST_FORMAT_TIME || demux->reset_segment) {
     /* It will happen only if it's first program or after flushes. */
     GST_DEBUG ("Calculating actual segment");
     if (base->segment.format == GST_FORMAT_TIME) {
@@ -1961,19 +2000,25 @@
       demux->segment = base->segment;
     } else {
       /* Start from the first ts/pts */
+      GstClockTime base =
+          demux->segment.base + demux->segment.position - demux->segment.start;
       gst_segment_init (&demux->segment, GST_FORMAT_TIME);
       demux->segment.start = firstts;
       demux->segment.stop = GST_CLOCK_TIME_NONE;
       demux->segment.position = firstts;
       demux->segment.time = firstts;
       demux->segment.rate = demux->rate;
+      demux->segment.base = base;
     }
   } 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.rate > 0) {
+      demux->segment.start = firstts;
+
+      if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop))
+        demux->segment.stop += firstts - demux->segment.start;
+      demux->segment.position = firstts;
+    }
   }
 
   if (!demux->segment_event) {
@@ -1982,32 +2027,93 @@
   }
 
 push_new_segment:
-  if (demux->update_segment) {
-    GST_DEBUG_OBJECT (stream->pad, "Pushing update segment");
-    gst_event_ref (demux->update_segment);
-    gst_pad_push_event (stream->pad, demux->update_segment);
-  }
+  for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
+    stream = (TSDemuxStream *) tmp->data;
+    if (stream->pad == NULL)
+      continue;
 
-  if (demux->segment_event) {
-    GST_DEBUG_OBJECT (stream->pad, "Pushing newsegment event");
-    gst_event_ref (demux->segment_event);
-    gst_pad_push_event (stream->pad, demux->segment_event);
-  }
+    if (demux->segment_event) {
+      GST_DEBUG_OBJECT (stream->pad, "Pushing newsegment event");
+      gst_event_ref (demux->segment_event);
+      gst_pad_push_event (stream->pad, demux->segment_event);
+    }
 
-  if (demux->global_tags) {
-    gst_pad_push_event (stream->pad,
-        gst_event_new_tag (gst_tag_list_ref (demux->global_tags)));
-  }
+    if (demux->global_tags) {
+      gst_pad_push_event (stream->pad,
+          gst_event_new_tag (gst_tag_list_ref (demux->global_tags)));
+    }
 
-  /* Push pending tags */
-  if (stream->taglist) {
-    GST_DEBUG_OBJECT (stream->pad, "Sending tags %" GST_PTR_FORMAT,
-        stream->taglist);
-    gst_pad_push_event (stream->pad, gst_event_new_tag (stream->taglist));
-    stream->taglist = NULL;
-  }
+    /* Push pending tags */
+    if (stream->taglist) {
+      GST_DEBUG_OBJECT (stream->pad, "Sending tags %" GST_PTR_FORMAT,
+          stream->taglist);
+      gst_pad_push_event (stream->pad, gst_event_new_tag (stream->taglist));
+      stream->taglist = NULL;
+    }
 
-  stream->need_newsegment = FALSE;
+    stream->need_newsegment = FALSE;
+  }
+}
+
+static void
+gst_ts_demux_check_and_sync_streams (GstTSDemux * demux, GstClockTime time)
+{
+  GList *tmp;
+
+  GST_DEBUG_OBJECT (demux,
+      "Recheck streams and sync to at least: %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (time));
+
+  if (G_UNLIKELY (demux->program == NULL))
+    return;
+
+  /* Go over each stream and update it to at least 'time' time.
+   * For each stream, the pad stores the buffer counter the last time
+   * a gap check occurred (gap_ref_buffers) and a gap_ref_pts timestamp
+   * that is either the PTS from the stream or the PCR the pad was updated
+   * to.
+   *
+   * We can check nb_out_buffers to see if any buffers were pushed since then.
+   * This means we can detect buffers passing without PTSes fine and still generate
+   * gaps.
+   *
+   * If there haven't been any buffers pushed on this stream since the last
+   * gap check, push a gap event updating to the indicated input PCR time
+   * and update the pad's tracking.
+   *
+   * If there have been buffers pushed, update the reference buffer count
+   * and but don't push a gap event
+   */
+  for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
+    TSDemuxStream *ps = (TSDemuxStream *) tmp->data;
+    GST_DEBUG_OBJECT (ps->pad,
+        "0x%04x, PTS:%" GST_TIME_FORMAT " REFPTS:%" GST_TIME_FORMAT " Gap:%"
+        GST_TIME_FORMAT " nb_buffers: %d (ref:%d)",
+        ((MpegTSBaseStream *) ps)->pid, GST_TIME_ARGS (ps->pts),
+        GST_TIME_ARGS (ps->gap_ref_pts),
+        GST_TIME_ARGS (ps->pts - ps->gap_ref_pts), ps->nb_out_buffers,
+        ps->gap_ref_buffers);
+    if (ps->pad == NULL)
+      continue;
+
+    if (ps->nb_out_buffers == ps->gap_ref_buffers && ps->gap_ref_pts != ps->pts) {
+      /* Do initial setup of pad if needed - segment etc */
+      GST_DEBUG_OBJECT (ps->pad,
+          "Stream needs update. Pushing GAP event to TS %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (time));
+      if (G_UNLIKELY (ps->need_newsegment))
+        calculate_and_push_newsegment (demux, ps);
+
+      /* Now send gap event */
+      gst_pad_push_event (ps->pad, gst_event_new_gap (time, 0));
+    }
+
+    /* Update GAP tracking vars so we don't re-check this stream for a while */
+    ps->gap_ref_pts = time;
+    if (ps->pts != GST_CLOCK_TIME_NONE && ps->pts > time)
+      ps->gap_ref_pts = ps->pts;
+    ps->gap_ref_buffers = ps->nb_out_buffers;
+  }
 }
 
 static GstFlowReturn
@@ -2084,9 +2190,6 @@
     }
   }
 
-  if (G_UNLIKELY (!stream->active))
-    activate_pad_for_stream (demux, stream);
-
   if (G_UNLIKELY (stream->need_newsegment))
     calculate_and_push_newsegment (demux, stream);
 
@@ -2106,6 +2209,7 @@
       stream->discont = FALSE;
 
       res = gst_pad_push (stream->pad, pend->buffer);
+      stream->nb_out_buffers += 1;
       g_slice_free (PendingBuffer, pend);
     }
     g_list_free (stream->pending);
@@ -2142,11 +2246,37 @@
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
   stream->discont = FALSE;
 
+  if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buffer)))
+    demux->segment.position = GST_BUFFER_DTS (buffer);
+  else if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buffer)))
+    demux->segment.position = GST_BUFFER_PTS (buffer);
+
   res = gst_pad_push (stream->pad, buffer);
+  /* Record that a buffer was pushed */
+  stream->nb_out_buffers += 1;
   GST_DEBUG_OBJECT (stream->pad, "Returned %s", gst_flow_get_name (res));
   res = gst_flow_combiner_update_flow (demux->flowcombiner, res);
   GST_DEBUG_OBJECT (stream->pad, "combined %s", gst_flow_get_name (res));
 
+  /* GAP / sparse stream tracking */
+  if (G_UNLIKELY (stream->gap_ref_pts == GST_CLOCK_TIME_NONE))
+    stream->gap_ref_pts = stream->pts;
+  else {
+    /* Look if the stream PTS has advanced 2 seconds since the last
+     * gap check, and sync streams if it has. The first stream to
+     * hit this will trigger a gap check */
+    if (G_UNLIKELY (stream->pts != GST_CLOCK_TIME_NONE &&
+            stream->pts > stream->gap_ref_pts + 2 * GST_SECOND)) {
+      GstClockTime curpcr =
+          mpegts_packetizer_get_current_time (MPEG_TS_BASE_PACKETIZER (demux),
+          demux->program->pcr_pid);
+      if (curpcr == GST_CLOCK_TIME_NONE || curpcr < 800 * GST_MSECOND)
+        goto beach;
+      curpcr -= 800 * GST_MSECOND;
+      gst_ts_demux_check_and_sync_streams (demux, curpcr);
+    }
+  }
+
 beach:
   /* Reset everything */
   GST_LOG ("Resetting to EMPTY, returning %s", gst_flow_get_name (res));
@@ -2199,13 +2329,12 @@
 {
   GstTSDemux *demux = GST_TS_DEMUX_CAST (base);
 
-  gst_ts_demux_flush_streams (demux);
+  gst_ts_demux_flush_streams (demux, hard);
 
   if (demux->segment_event) {
     gst_event_unref (demux->segment_event);
     demux->segment_event = NULL;
   }
-  demux->calculate_update_segment = FALSE;
   if (demux->global_tags) {
     gst_tag_list_unref (demux->global_tags);
     demux->global_tags = NULL;
diff --git a/gst/mpegtsdemux/tsdemux.h b/gst/mpegtsdemux/tsdemux.h
index 16112fc..b689412 100644
--- a/gst/mpegtsdemux/tsdemux.h
+++ b/gst/mpegtsdemux/tsdemux.h
@@ -69,15 +69,11 @@
   /* segments to be sent */
   GstSegment segment;
   GstEvent *segment_event;
+  gboolean reset_segment;
 
   /* global taglist */
   GstTagList *global_tags;
 
-  /* Set when program change */
-  gboolean calculate_update_segment;
-  /* update segment is */
-  GstEvent *update_segment;
-
   /* Full stream duration */
   GstClockTime duration;
 
diff --git a/gst/mpegtsmux/Makefile.in b/gst/mpegtsmux/Makefile.in
index 1b37cb4..2910a54 100644
--- a/gst/mpegtsmux/Makefile.in
+++ b/gst/mpegtsmux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mpegtsmux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -248,6 +258,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -290,8 +301,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -316,8 +329,6 @@
 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@
@@ -330,7 +341,6 @@
 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@
@@ -338,6 +348,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -364,11 +376,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -387,8 +402,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -447,10 +460,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -467,7 +484,6 @@
 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@
@@ -476,7 +492,6 @@
 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@
@@ -489,7 +504,6 @@
 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@
@@ -503,6 +517,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -514,6 +529,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -552,6 +569,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -587,10 +605,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -616,6 +638,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -623,7 +648,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -652,6 +684,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -662,6 +695,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -692,17 +726,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -719,6 +752,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -757,6 +791,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -807,7 +842,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mpegtsmux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mpegtsmux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1206,6 +1240,8 @@
 	tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index af246a2..c3a0dbb 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -88,10 +88,6 @@
 #include <stdio.h>
 #include <string.h>
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include <gst/tag/tag.h>
 #include <gst/video/video.h>
 #include <gst/mpegts/mpegts.h>
@@ -106,13 +102,13 @@
 
 enum
 {
-  ARG_0,
-  ARG_PROG_MAP,
-  ARG_M2TS_MODE,
-  ARG_PAT_INTERVAL,
-  ARG_PMT_INTERVAL,
-  ARG_ALIGNMENT,
-  ARG_SI_INTERVAL
+  PROP_0,
+  PROP_PROG_MAP,
+  PROP_M2TS_MODE,
+  PROP_PAT_INTERVAL,
+  PROP_PMT_INTERVAL,
+  PROP_ALIGNMENT,
+  PROP_SI_INTERVAL
 };
 
 #define MPEGTSMUX_DEFAULT_ALIGNMENT    -1
@@ -134,7 +130,9 @@
         "mpegversion = (int) { 1, 2 };"
         "audio/mpeg, "
         "framed = (boolean) TRUE, "
-        "mpegversion = (int) 4, stream-format = (string) { raw, adts };"
+        "mpegversion = (int) 4, stream-format = (string) adts;"
+        "audio/mpeg, "
+        "mpegversion = (int) 4, stream-format = (string) raw;"
         "audio/x-lpcm, "
         "width = (int) { 16, 20, 24 }, "
         "rate = (int) { 48000, 96000 }, "
@@ -144,7 +142,7 @@
         "mute = (boolean) { FALSE, TRUE }; "
         "audio/x-ac3, framed = (boolean) TRUE;"
         "audio/x-dts, framed = (boolean) TRUE;"
-        "subpicture/x-dvb;" "application/x-teletext"));
+        "subpicture/x-dvb; application/x-teletext; meta/x-klv, parsed=true"));
 
 static GstStaticPadTemplate mpegtsmux_src_factory =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -171,7 +169,7 @@
 static gboolean new_packet_m2ts (MpegTsMux * mux, GstBuffer * buf,
     gint64 new_pcr);
 
-static void mpegtsdemux_prepare_srcpad (MpegTsMux * mux);
+static void mpegtsmux_prepare_srcpad (MpegTsMux * mux);
 GstFlowReturn mpegtsmux_clip_inc_running_time (GstCollectPads * pads,
     GstCollectData * cdata, GstBuffer * buf, GstBuffer ** outbuf,
     gpointer user_data);
@@ -186,7 +184,7 @@
 static GstStateChangeReturn mpegtsmux_change_state (GstElement * element,
     GstStateChange transition);
 static gboolean mpegtsmux_send_event (GstElement * element, GstEvent * event);
-static void mpegtsdemux_set_header_on_caps (MpegTsMux * mux);
+static void mpegtsmux_set_header_on_caps (MpegTsMux * mux);
 static gboolean mpegtsmux_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
 
@@ -258,37 +256,37 @@
   gstelement_class->get_index = GST_DEBUG_FUNCPTR (mpegtsmux_get_index);
 #endif
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PROG_MAP,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PROG_MAP,
       g_param_spec_boxed ("prog-map", "Program map",
           "A GstStructure specifies the mapping from elementary streams to programs",
           GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_M2TS_MODE,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_M2TS_MODE,
       g_param_spec_boolean ("m2ts-mode", "M2TS(192 bytes) Mode",
           "Set to TRUE to output Blu-Ray disc format with 192 byte packets. "
           "FALSE for standard TS format with 188 byte packets.",
           MPEGTSMUX_DEFAULT_M2TS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PAT_INTERVAL,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PAT_INTERVAL,
       g_param_spec_uint ("pat-interval", "PAT interval",
           "Set the interval (in ticks of the 90kHz clock) for writing out the PAT table",
           1, G_MAXUINT, TSMUX_DEFAULT_PAT_INTERVAL,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PMT_INTERVAL,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PMT_INTERVAL,
       g_param_spec_uint ("pmt-interval", "PMT interval",
           "Set the interval (in ticks of the 90kHz clock) for writing out the PMT table",
           1, G_MAXUINT, TSMUX_DEFAULT_PMT_INTERVAL,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ALIGNMENT,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ALIGNMENT,
       g_param_spec_int ("alignment", "packet alignment",
           "Number of packets per buffer (padded with dummy packets on EOS) "
-          "(-1 = auto, 0 = all available packets)",
+          "(-1 = auto, 0 = all available packets, 7 for UDP streaming)",
           -1, G_MAXINT, MPEGTSMUX_DEFAULT_ALIGNMENT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SI_INTERVAL,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SI_INTERVAL,
       g_param_spec_uint ("si-interval", "SI interval",
           "Set the interval (in ticks of the 90kHz clock) for writing out the Service"
           "Information tables", 1, G_MAXUINT, TSMUX_DEFAULT_SI_INTERVAL,
@@ -316,9 +314,6 @@
   gst_collect_pads_set_clip_function (mux->collect, (GstCollectPadsClipFunction)
       GST_DEBUG_FUNCPTR (mpegtsmux_clip_inc_running_time), mux);
 
-  mux->tsmux = tsmux_new ();
-  tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
-
   mux->adapter = gst_adapter_new ();
   mux->out_adapter = gst_adapter_new ();
 
@@ -337,8 +332,7 @@
 static void
 mpegtsmux_pad_reset (MpegTsPadData * pad_data)
 {
-  pad_data->pid = 0;
-  pad_data->min_dts = GST_CLOCK_TIME_NONE;
+  pad_data->dts = GST_CLOCK_STIME_NONE;
   pad_data->prog_id = -1;
 #if 0
   pad_data->prog_id = -1;
@@ -368,6 +362,7 @@
 static void
 mpegtsmux_reset (MpegTsMux * mux, gboolean alloc)
 {
+  GstBuffer *buf;
   GSList *walk;
 
   mux->first = TRUE;
@@ -378,7 +373,6 @@
   mux->is_delta = TRUE;
 
   mux->streamheader_sent = FALSE;
-  mux->force_key_unit_event = NULL;
   mux->pending_key_unit_ts = GST_CLOCK_TIME_NONE;
 #if 0
   mux->spn_count = 0;
@@ -398,21 +392,14 @@
     mux->tsmux = NULL;
   }
 
-  memset (mux->programs, 0, sizeof (mux->programs));
-
-  if (mux->streamheader) {
-    GstBuffer *buf;
-    GList *sh;
-
-    sh = mux->streamheader;
-    while (sh) {
-      buf = sh->data;
-      gst_buffer_unref (buf);
-      sh = g_list_next (sh);
-    }
-    g_list_free (mux->streamheader);
-    mux->streamheader = NULL;
+  if (mux->programs) {
+    g_hash_table_destroy (mux->programs);
   }
+  mux->programs = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+  while ((buf = g_queue_pop_head (&mux->streamheader)))
+    gst_buffer_unref (buf);
+
   gst_event_replace (&mux->force_key_unit_event, NULL);
   gst_buffer_replace (&mux->out_buffer, NULL);
 
@@ -453,6 +440,10 @@
     gst_structure_free (mux->prog_map);
     mux->prog_map = NULL;
   }
+  if (mux->programs) {
+    g_hash_table_destroy (mux->programs);
+    mux->programs = NULL;
+  }
   GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
 }
 
@@ -464,11 +455,11 @@
   GSList *walk;
 
   switch (prop_id) {
-    case ARG_M2TS_MODE:
+    case PROP_M2TS_MODE:
       /*set incase if the output stream need to be of 192 bytes */
       mux->m2ts_mode = g_value_get_boolean (value);
       break;
-    case ARG_PROG_MAP:
+    case PROP_PROG_MAP:
     {
       const GstStructure *s = gst_value_get_structure (value);
       if (mux->prog_map) {
@@ -480,12 +471,12 @@
         mux->prog_map = NULL;
       break;
     }
-    case ARG_PAT_INTERVAL:
+    case PROP_PAT_INTERVAL:
       mux->pat_interval = g_value_get_uint (value);
       if (mux->tsmux)
         tsmux_set_pat_interval (mux->tsmux, mux->pat_interval);
       break;
-    case ARG_PMT_INTERVAL:
+    case PROP_PMT_INTERVAL:
       walk = mux->collect->data;
       mux->pmt_interval = g_value_get_uint (value);
 
@@ -496,10 +487,10 @@
         walk = g_slist_next (walk);
       }
       break;
-    case ARG_ALIGNMENT:
+    case PROP_ALIGNMENT:
       mux->alignment = g_value_get_int (value);
       break;
-    case ARG_SI_INTERVAL:
+    case PROP_SI_INTERVAL:
       mux->si_interval = g_value_get_uint (value);
       tsmux_set_si_interval (mux->tsmux, mux->si_interval);
       break;
@@ -516,22 +507,22 @@
   MpegTsMux *mux = GST_MPEG_TSMUX (object);
 
   switch (prop_id) {
-    case ARG_M2TS_MODE:
+    case PROP_M2TS_MODE:
       g_value_set_boolean (value, mux->m2ts_mode);
       break;
-    case ARG_PROG_MAP:
+    case PROP_PROG_MAP:
       gst_value_set_structure (value, mux->prog_map);
       break;
-    case ARG_PAT_INTERVAL:
+    case PROP_PAT_INTERVAL:
       g_value_set_uint (value, mux->pat_interval);
       break;
-    case ARG_PMT_INTERVAL:
+    case PROP_PMT_INTERVAL:
       g_value_set_uint (value, mux->pmt_interval);
       break;
-    case ARG_ALIGNMENT:
+    case PROP_ALIGNMENT:
       g_value_set_int (value, mux->alignment);
       break;
-    case ARG_SI_INTERVAL:
+    case PROP_SI_INTERVAL:
       g_value_set_uint (value, mux->si_interval);
       break;
     default:
@@ -599,7 +590,6 @@
       GST_PTR_FORMAT, ts_data->pid, caps);
 
   s = gst_caps_get_structure (caps, 0);
-  g_return_val_if_fail (s != NULL, FALSE);
 
   mt = gst_structure_get_name (s);
   value = gst_structure_get_value (s, "codec_data");
@@ -677,6 +667,8 @@
     st = TSMUX_ST_PS_TELETEXT;
     /* needs a particularly sized layout */
     ts_data->prepare_func = mpegtsmux_prepare_teletext;
+  } else if (strcmp (mt, "meta/x-klv") == 0) {
+    st = TSMUX_ST_PS_KLV;
   }
 
   if (st != TSMUX_ST_RESERVED) {
@@ -759,10 +751,10 @@
               ("Reading program map failed. Assuming default"), (NULL));
           idx = DEFAULT_PROG_ID;
         }
-        if (idx < 0 || idx >= MAX_PROG_NUMBER) {
-          GST_DEBUG_OBJECT (mux, "Program number %d associate with pad %s out "
-              "of range (max = %d); DEFAULT_PROGRAM = %d is used instead",
-              idx, name, MAX_PROG_NUMBER, DEFAULT_PROG_ID);
+        if (idx < 0) {
+          GST_DEBUG_OBJECT (mux, "Program number %d associate with pad %s less "
+              "than zero; DEFAULT_PROGRAM = %d is used instead",
+              idx, name, DEFAULT_PROG_ID);
           idx = DEFAULT_PROG_ID;
         }
         ts_data->prog_id = idx;
@@ -771,13 +763,15 @@
       }
     }
 
-    ts_data->prog = mux->programs[ts_data->prog_id];
+    ts_data->prog =
+        g_hash_table_lookup (mux->programs, GINT_TO_POINTER (ts_data->prog_id));
     if (ts_data->prog == NULL) {
       ts_data->prog = tsmux_program_new (mux->tsmux, ts_data->prog_id);
       if (ts_data->prog == NULL)
         goto no_program;
       tsmux_set_pmt_interval (ts_data->prog, mux->pmt_interval);
-      mux->programs[ts_data->prog_id] = ts_data->prog;
+      g_hash_table_insert (mux->programs,
+          GINT_TO_POINTER (ts_data->prog_id), ts_data->prog);
     }
 
     if (ts_data->stream == NULL) {
@@ -880,6 +874,19 @@
       forward = gst_tag_list_get_scope (list) == GST_TAG_SCOPE_GLOBAL;
       break;
     }
+    case GST_EVENT_STREAM_START:{
+      GstStreamFlags flags;
+
+      gst_event_parse_stream_flags (event, &flags);
+
+      /* Don't wait for data on sparse inputs like metadata streams */
+      if ((flags & GST_STREAM_FLAG_SPARSE)) {
+        GST_COLLECT_PADS_STATE_UNSET (data, GST_COLLECT_PADS_STATE_LOCKED);
+        gst_collect_pads_set_waiting (pads, data, FALSE);
+        GST_COLLECT_PADS_STATE_SET (data, GST_COLLECT_PADS_STATE_LOCKED);
+      }
+      break;
+    }
     default:
       break;
   }
@@ -896,7 +903,7 @@
 static gboolean
 mpegtsmux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
-  MpegTsMux *mux = GST_MPEG_TSMUX (gst_pad_get_parent (pad));
+  MpegTsMux *mux = GST_MPEG_TSMUX (parent);
   gboolean res = TRUE, forward = TRUE;
 
   switch (GST_EVENT_TYPE (event)) {
@@ -907,7 +914,7 @@
       GstPad *sinkpad;
       GValue sinkpad_value = G_VALUE_INIT;
       GstClockTime running_time;
-      gboolean all_headers, done;
+      gboolean all_headers, done, res = FALSE;
       guint count;
 
       if (!gst_video_event_is_force_key_unit (event))
@@ -932,7 +939,8 @@
       iter = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mux));
       done = FALSE;
       while (!done) {
-        gboolean res = FALSE, tmp;
+        gboolean tmp;
+
         iter_ret = gst_iterator_next (iter, &sinkpad_value);
         sinkpad = g_value_get_object (&sinkpad_value);
 
@@ -968,7 +976,6 @@
   else
     gst_event_unref (event);
 
-  gst_object_unref (mux);
   return res;
 }
 
@@ -981,8 +988,7 @@
   guint count;
   GstEvent *event = NULL;
 
-  g_return_val_if_fail (pending_event != NULL, NULL);
-  g_return_val_if_fail (segment != NULL, NULL);
+  g_assert (segment != NULL);
 
   if (pending_event == NULL)
     goto out;
@@ -1008,8 +1014,13 @@
   stream_time = gst_segment_to_stream_time (segment,
       GST_FORMAT_TIME, timestamp);
 
-  gst_video_event_parse_upstream_force_key_unit (pending_event,
-      NULL, &all_headers, &count);
+  if (GST_EVENT_TYPE (pending_event) == GST_EVENT_CUSTOM_DOWNSTREAM) {
+    gst_video_event_parse_downstream_force_key_unit (pending_event,
+        NULL, NULL, NULL, &all_headers, &count);
+  } else {
+    gst_video_event_parse_upstream_force_key_unit (pending_event, NULL,
+        &all_headers, &count);
+  }
 
   event =
       gst_video_event_new_downstream_force_key_unit (timestamp, stream_time,
@@ -1031,7 +1042,7 @@
   *outbuf = buf;
 
   /* PTS */
-  time = GST_BUFFER_TIMESTAMP (buf);
+  time = GST_BUFFER_PTS (buf);
 
   /* invalid left alone and passed */
   if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (time))) {
@@ -1042,11 +1053,11 @@
       *outbuf = NULL;
       goto beach;
     } else {
-      GST_LOG_OBJECT (cdata->pad, "buffer pts %" GST_TIME_FORMAT " -> %"
+      GST_LOG_OBJECT (cdata->pad, "buffer pts %" GST_TIME_FORMAT " ->  %"
           GST_TIME_FORMAT " running time",
-          GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (time));
+          GST_TIME_ARGS (GST_BUFFER_PTS (buf)), GST_TIME_ARGS (time));
       buf = *outbuf = gst_buffer_make_writable (buf);
-      GST_BUFFER_TIMESTAMP (*outbuf) = time;
+      GST_BUFFER_PTS (*outbuf) = time;
     }
   }
 
@@ -1055,23 +1066,36 @@
 
   /* invalid left alone and passed */
   if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (time))) {
-    time = gst_segment_to_running_time (&cdata->segment, GST_FORMAT_TIME, time);
-    /* may have to decode out-of-segment, so pass INVALID */
-    if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (time))) {
-      GST_DEBUG_OBJECT (cdata->pad, "running dts outside segment");
-    } else {
-      GST_LOG_OBJECT (cdata->pad, "buffer dts %" GST_TIME_FORMAT " -> %"
-          GST_TIME_FORMAT " running time",
-          GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (time));
-      if (GST_CLOCK_TIME_IS_VALID (pad_data->min_dts) &&
-          time < pad_data->min_dts) {
-        /* Ignore DTS going backward */
-        GST_WARNING_OBJECT (cdata->pad, "ignoring DTS going backward");
-        time = pad_data->min_dts;
-      }
-      buf = *outbuf = gst_buffer_make_writable (buf);
-      GST_BUFFER_DTS (*outbuf) = time;
+    gint sign;
+    gint64 dts;
+
+    sign = gst_segment_to_running_time_full (&cdata->segment, GST_FORMAT_TIME,
+        time, &time);
+
+    if (sign > 0)
+      dts = (gint64) time;
+    else
+      dts = -((gint64) time);
+
+    GST_LOG_OBJECT (cdata->pad, "buffer dts %" GST_TIME_FORMAT " -> %"
+        GST_STIME_FORMAT " running time", GST_TIME_ARGS (GST_BUFFER_DTS (buf)),
+        GST_STIME_ARGS (dts));
+
+    if (GST_CLOCK_STIME_IS_VALID (pad_data->dts) && dts < pad_data->dts) {
+      /* Ignore DTS going backward */
+      GST_WARNING_OBJECT (cdata->pad, "ignoring DTS going backward");
+      dts = pad_data->dts;
     }
+
+    *outbuf = gst_buffer_make_writable (buf);
+    if (sign > 0)
+      GST_BUFFER_DTS (*outbuf) = time;
+    else
+      GST_BUFFER_DTS (*outbuf) = GST_CLOCK_TIME_NONE;
+
+    pad_data->dts = dts;
+  } else {
+    pad_data->dts = GST_CLOCK_STIME_NONE;
   }
 
   buf = *outbuf;
@@ -1094,9 +1118,9 @@
   GstFlowReturn ret = GST_FLOW_OK;
   MpegTsPadData *best = (MpegTsPadData *) data;
   TsMuxProgram *prog;
-  gint64 pts = -1;
-  guint64 dts = -1;
-  gboolean delta = TRUE;
+  gint64 pts = GST_CLOCK_STIME_NONE;
+  gint64 dts = GST_CLOCK_STIME_NONE;
+  gboolean delta = TRUE, header = FALSE;
   StreamData *stream_data;
 
   GST_DEBUG_OBJECT (mux, "Pads collected");
@@ -1106,13 +1130,14 @@
     if (G_UNLIKELY (ret != GST_FLOW_OK))
       return ret;
 
-    mpegtsdemux_prepare_srcpad (mux);
+    mpegtsmux_prepare_srcpad (mux);
 
     mux->first = FALSE;
   }
 
   if (G_UNLIKELY (best == NULL)) {
     /* EOS */
+    GST_INFO_OBJECT (mux, "EOS");
     /* drain some possibly cached data */
     new_packet_m2ts (mux, NULL, -1);
     mpegtsmux_push_packets (mux, TRUE);
@@ -1131,7 +1156,7 @@
     GstEvent *event;
 
     event = check_pending_key_unit_event (mux->force_key_unit_event,
-        &best->collect.segment, GST_BUFFER_TIMESTAMP (buf),
+        &best->collect.segment, GST_BUFFER_PTS (buf),
         GST_BUFFER_FLAGS (buf), mux->pending_key_unit_ts);
     if (event) {
       GstClockTime running_time;
@@ -1166,7 +1191,7 @@
     /* Take the first data stream for the PCR */
     GST_DEBUG_OBJECT (COLLECT_DATA_PAD (best),
         "Use stream (pid=%d) from pad as PCR for program (prog_id = %d)",
-        MPEG_TS_PAD_DATA (best)->pid, MPEG_TS_PAD_DATA (best)->prog_id);
+        best->pid, best->prog_id);
 
     /* Set the chosen PCR stream */
     tsmux_program_set_pcr_stream (prog, best->stream);
@@ -1177,24 +1202,26 @@
 
   if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buf))) {
     pts = GSTTIME_TO_MPEGTIME (GST_BUFFER_PTS (buf));
-    GST_DEBUG_OBJECT (mux, "Buffer has PTS %" GST_TIME_FORMAT " pts %"
+    GST_DEBUG_OBJECT (mux, "Buffer has PTS  %" GST_TIME_FORMAT " pts %"
         G_GINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_PTS (buf)), pts);
   }
 
-  if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buf))) {
-    dts = GSTTIME_TO_MPEGTIME (GST_BUFFER_DTS (buf));
-    GST_DEBUG_OBJECT (mux, "Buffer has DTS %" GST_TIME_FORMAT " dts %"
-        G_GINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_DTS (buf)), dts);
+  if (GST_CLOCK_STIME_IS_VALID (best->dts)) {
+    dts = GSTTIME_TO_MPEGTIME (best->dts);
+    GST_DEBUG_OBJECT (mux, "Buffer has DTS %s%" GST_TIME_FORMAT " dts %"
+        G_GINT64_FORMAT, best->dts >= 0 ? " " : "-",
+        GST_TIME_ARGS (ABS (best->dts)), dts);
   }
 
   /* should not have a DTS without PTS */
-  if (pts == -1 && dts != -1) {
+  if (!GST_CLOCK_STIME_IS_VALID (pts) && GST_CLOCK_STIME_IS_VALID (dts)) {
     GST_DEBUG_OBJECT (mux, "using DTS for unknown PTS");
     pts = dts;
   }
 
   if (best->stream->is_video_stream) {
     delta = GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+    header = GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_HEADER);
 #if 0
     GST_OBJECT_LOCK (mux);
     if (mux->element_index && !delta && best->element_index_writer_id != -1) {
@@ -1206,6 +1233,12 @@
     GST_OBJECT_UNLOCK (mux);
 #endif
   }
+
+  if (best->stream->is_meta && gst_buffer_get_size (buf) > (G_MAXUINT16 - 3)) {
+    GST_WARNING_OBJECT (mux, "KLV meta unit too big, splitting not supported");
+    return GST_FLOW_OK;
+  }
+
   GST_DEBUG_OBJECT (mux, "delta: %d", delta);
 
   stream_data = stream_data_new (buf);
@@ -1221,6 +1254,7 @@
   }
 
   mux->is_delta = delta;
+  mux->is_header = header;
   while (tsmux_stream_bytes_in_buffer (best->stream) > 0) {
     if (!tsmux_write_stream_packet (mux->tsmux, best->stream)) {
       /* Failed writing data for some reason. Set appropriate error */
@@ -1328,7 +1362,7 @@
     guint len)
 {
   /* Packets should be at least 188 bytes, but check anyway */
-  g_return_if_fail (len >= 2 || !data);
+  g_assert (len >= 2 || !data);
 
   if (!mux->streamheader_sent && data) {
     guint pid = ((data[1] & 0x1f) << 8) | data[2];
@@ -1342,14 +1376,21 @@
       } else {
         hbuf = gst_buffer_copy (buf);
       }
-      mux->streamheader = g_list_append (mux->streamheader, hbuf);
-    } else if (mux->streamheader) {
-      mpegtsdemux_set_header_on_caps (mux);
+      GST_LOG_OBJECT (mux,
+          "Collecting packet with pid 0x%04x into streamheaders", pid);
+
+      g_queue_push_tail (&mux->streamheader, hbuf);
+    } else if (!g_queue_is_empty (&mux->streamheader)) {
+      mpegtsmux_set_header_on_caps (mux);
       mux->streamheader_sent = TRUE;
     }
   }
 
   if (buf) {
+    if (mux->is_header) {
+      GST_LOG_OBJECT (mux, "marking as header buffer");
+      GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
+    }
     if (mux->is_delta) {
       GST_LOG_OBJECT (mux, "marking as delta unit");
       GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
@@ -1363,11 +1404,9 @@
 static GstFlowReturn
 mpegtsmux_push_packets (MpegTsMux * mux, gboolean force)
 {
+  GstBufferList *buffer_list;
   gint align = mux->alignment;
   gint av, packet_size;
-  GstBuffer *buf;
-  GstFlowReturn ret = GST_FLOW_OK;
-  GstClockTime ts;
 
   if (mux->m2ts_mode) {
     packet_size = M2TS_PACKET_LENGTH;
@@ -1382,25 +1421,31 @@
   av = gst_adapter_available (mux->out_adapter);
   GST_LOG_OBJECT (mux, "align %d, av %d", align, av);
 
-  if (!align)
-    align = av;
-  else
-    align *= packet_size;
+  if (av == 0)
+    return GST_FLOW_OK;
 
-  /* FIXME: what about DTS here? */
-  GST_LOG_OBJECT (mux, "aligning to %d bytes", align);
-  if (G_LIKELY ((align <= av) && av)) {
-    GST_LOG_OBJECT (mux, "pushing %d aligned bytes", av - (av % align));
-    ts = gst_adapter_prev_pts (mux->out_adapter, NULL);
-    buf = gst_adapter_take_buffer (mux->out_adapter, av - (av % align));
-    g_assert (buf);
-    GST_BUFFER_PTS (buf) = ts;
-
-    ret = gst_pad_push (mux->srcpad, buf);
-    av = av % align;
+  /* no alignment, just push all available data */
+  if (align == 0) {
+    buffer_list = gst_adapter_take_buffer_list (mux->out_adapter, av);
+    return gst_pad_push_list (mux->srcpad, buffer_list);
   }
 
-  if (av && force) {
+  align *= packet_size;
+
+  if (!force && align > av)
+    return GST_FLOW_OK;
+
+  buffer_list = gst_buffer_list_new_sized ((av / align) + 1);
+
+  GST_LOG_OBJECT (mux, "aligning to %d bytes", align);
+  while (align <= av) {
+    gst_buffer_list_add (buffer_list,
+        gst_adapter_take_buffer (mux->out_adapter, align));
+    av -= align;
+  }
+
+  if (av > 0 && force) {
+    GstBuffer *buf;
     guint8 *data;
     guint32 header;
     gint dummy;
@@ -1410,11 +1455,9 @@
     buf = gst_buffer_new_and_alloc (align);
     gst_buffer_map (buf, &map, GST_MAP_READ);
     data = map.data;
-    ts = gst_adapter_prev_pts (mux->out_adapter, NULL);
 
     gst_adapter_copy (mux->out_adapter, data, 0, av);
     gst_adapter_clear (mux->out_adapter);
-    GST_BUFFER_PTS (buf) = ts;
 
     data += av;
     header = GST_READ_UINT32_BE (data - packet_size);
@@ -1444,11 +1487,10 @@
     }
 
     gst_buffer_unmap (buf, &map);
-
-    ret = gst_pad_push (mux->srcpad, buf);
+    gst_buffer_list_add (buffer_list, buf);
   }
 
-  return ret;
+  return gst_pad_push_list (mux->srcpad, buffer_list);
 }
 
 static GstFlowReturn
@@ -1632,33 +1674,29 @@
 }
 
 static void
-mpegtsdemux_set_header_on_caps (MpegTsMux * mux)
+mpegtsmux_set_header_on_caps (MpegTsMux * mux)
 {
   GstBuffer *buf;
   GstStructure *structure;
   GValue array = { 0 };
   GValue value = { 0 };
   GstCaps *caps;
-  GList *sh;
 
   caps = gst_caps_make_writable (gst_pad_get_current_caps (mux->srcpad));
   structure = gst_caps_get_structure (caps, 0);
 
   g_value_init (&array, GST_TYPE_ARRAY);
 
-  sh = mux->streamheader;
-  while (sh) {
-    buf = sh->data;
+  GST_LOG_OBJECT (mux, "setting %u packets into streamheader",
+      g_queue_get_length (&mux->streamheader));
+
+  while ((buf = g_queue_pop_head (&mux->streamheader))) {
     g_value_init (&value, GST_TYPE_BUFFER);
     gst_value_take_buffer (&value, buf);
     gst_value_array_append_value (&array, &value);
     g_value_unset (&value);
-    sh = g_list_next (sh);
   }
 
-  g_list_free (mux->streamheader);
-  mux->streamheader = NULL;
-
   gst_structure_set_value (structure, "streamheader", &array);
   gst_pad_set_caps (mux->srcpad, caps);
   g_value_unset (&array);
@@ -1666,7 +1704,7 @@
 }
 
 static void
-mpegtsdemux_prepare_srcpad (MpegTsMux * mux)
+mpegtsmux_prepare_srcpad (MpegTsMux * mux)
 {
   GstSegment seg;
   /* we are not going to seek */
@@ -1740,8 +1778,6 @@
   GstMpegtsSection *section;
   MpegTsMux *mux = GST_MPEG_TSMUX (element);
 
-  g_return_val_if_fail (event != NULL, FALSE);
-
   section = gst_event_parse_mpegts_section (event);
   gst_event_unref (event);
 
diff --git a/gst/mpegtsmux/mpegtsmux.h b/gst/mpegtsmux/mpegtsmux.h
index f47707f..169892c 100644
--- a/gst/mpegtsmux/mpegtsmux.h
+++ b/gst/mpegtsmux/mpegtsmux.h
@@ -98,10 +98,9 @@
 #define CLOCK_FREQ (CLOCK_BASE * 10000)   /* 90 kHz PTS clock */
 #define CLOCK_FREQ_SCR (CLOCK_FREQ * 300) /* 27 MHz SCR clock */
 
-#define MPEGTIME_TO_GSTTIME(time) (gst_util_uint64_scale ((time), \
-                        GST_MSECOND/10, CLOCK_BASE))
-#define GSTTIME_TO_MPEGTIME(time) (gst_util_uint64_scale ((time), \
-                        CLOCK_BASE, GST_MSECOND/10))
+#define GSTTIME_TO_MPEGTIME(time) \
+    (((time) > 0 ? (gint64) 1 : (gint64) -1) * \
+    (gint64) gst_util_uint64_scale (ABS(time), CLOCK_BASE, GST_MSECOND/10))
 
 /* 27 MHz SCR conversions: */
 #define MPEG_SYS_TIME_TO_GSTTIME(time) (gst_util_uint64_scale ((time), \
@@ -112,7 +111,6 @@
 #define NORMAL_TS_PACKET_LENGTH 188
 #define M2TS_PACKET_LENGTH      192
 
-#define MAX_PROG_NUMBER	32
 #define DEFAULT_PROG_ID	0
 
 typedef struct MpegTsMux MpegTsMux;
@@ -132,7 +130,7 @@
   GstCollectPads *collect;
 
   TsMux *tsmux;
-  TsMuxProgram *programs[MAX_PROG_NUMBER];
+  GHashTable *programs;
 
   /* properties */
   gboolean m2ts_mode;
@@ -149,9 +147,10 @@
 
   /* write callback handling/state */
   GstFlowReturn last_flow_ret;
-  GList *streamheader;
+  GQueue streamheader;
   gboolean streamheader_sent;
   gboolean is_delta;
+  gboolean is_header;
   GstClockTime last_ts;
 
   /* m2ts specific */
@@ -176,8 +175,6 @@
   GstElementClass parent_class;
 };
 
-#define MPEG_TS_PAD_DATA(data)  ((MpegTsPadData *)(data))
-
 struct MpegTsPadData {
   /* parent */
   GstCollectData collect;
@@ -185,8 +182,8 @@
   gint pid;
   TsMuxStream *stream;
 
-  /* most recent valid TS for this stream */
-  GstClockTime min_dts;
+  /* most recent DTS */
+  gint64 dts;
 
 #if 0
   /* (optional) index writing */
@@ -204,9 +201,9 @@
   /* handler to free the private data */
   MpegTsPadDataFreePrepareDataFunction free_func;
 
-  /* program id == idx to which it is attached to (not program pid) */
+  /* program id to which it is attached to (not program pid) */
   gint prog_id;
-  /* program this stream belongs to == mux->programs[prog_id] */
+  /* program this stream belongs to */
   TsMuxProgram *prog;
 
   gchar *language;
diff --git a/gst/mpegtsmux/tsmux/Makefile.in b/gst/mpegtsmux/tsmux/Makefile.in
index 0afa4d5..10daa74 100644
--- a/gst/mpegtsmux/tsmux/Makefile.in
+++ b/gst/mpegtsmux/tsmux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mpegtsmux/tsmux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +209,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +227,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +255,6 @@
 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@
@@ -256,7 +267,6 @@
 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@
@@ -264,6 +274,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +302,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +328,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +386,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +410,6 @@
 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@
@@ -402,7 +418,6 @@
 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@
@@ -415,7 +430,6 @@
 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@
@@ -429,6 +443,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +455,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +495,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +531,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +564,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +574,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +610,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +621,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +652,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +678,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +717,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -720,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mpegtsmux/tsmux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mpegtsmux/tsmux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1009,6 +1043,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/mpegtsmux/tsmux/tsmux.c b/gst/mpegtsmux/tsmux/tsmux.c
index 7eb7b86..293aed9 100644
--- a/gst/mpegtsmux/tsmux/tsmux.c
+++ b/gst/mpegtsmux/tsmux/tsmux.c
@@ -143,11 +143,11 @@
   mux->next_stream_pid = TSMUX_START_ES_PID;
 
   mux->pat_changed = TRUE;
-  mux->last_pat_ts = -1;
+  mux->last_pat_ts = G_MININT64;
   mux->pat_interval = TSMUX_DEFAULT_PAT_INTERVAL;
 
   mux->si_changed = TRUE;
-  mux->last_si_ts = -1;
+  mux->last_si_ts = G_MININT64;
   mux->si_interval = TSMUX_DEFAULT_SI_INTERVAL;
 
   mux->si_sections = g_hash_table_new_full (g_direct_hash, g_direct_equal,
@@ -363,7 +363,7 @@
   program = g_slice_new0 (TsMuxProgram);
 
   program->pmt_changed = TRUE;
-  program->last_pmt_ts = -1;
+  program->last_pmt_ts = G_MININT64;
   program->pmt_interval = TSMUX_DEFAULT_PMT_INTERVAL;
 
   if (prog_id == 0) {
@@ -917,12 +917,11 @@
         len, section->pi.stream_avail - len);
 
     /* Push the packet without PCR */
-    if G_UNLIKELY
-      (!tsmux_packet_out (mux, packet_buffer, -1)) {
+    if (G_UNLIKELY (!tsmux_packet_out (mux, packet_buffer, -1))) {
       /* Buffer given away */
       packet_buffer = NULL;
       goto fail;
-      }
+    }
 
     packet_buffer = NULL;
     section->pi.stream_avail -= len;
@@ -983,13 +982,13 @@
     GList *cur;
 
     cur_pcr = 0;
-    if (cur_pts != -1) {
+    if (cur_pts != G_MININT64) {
       TS_DEBUG ("TS for PCR stream is %" G_GINT64_FORMAT, cur_pts);
     }
 
     /* FIXME: The current PCR needs more careful calculation than just
      * writing a fixed offset */
-    if (cur_pts != -1) {
+    if (cur_pts != G_MININT64) {
       /* CLOCK_BASE >= TSMUX_PCR_OFFSET */
       cur_pts += CLOCK_BASE;
       cur_pcr = (cur_pts - TSMUX_PCR_OFFSET) *
@@ -1010,7 +1009,7 @@
     }
 
     /* check if we need to rewrite pat */
-    if (mux->last_pat_ts == -1 || mux->pat_changed)
+    if (mux->last_pat_ts == G_MININT64 || mux->pat_changed)
       write_pat = TRUE;
     else if (cur_pts >= mux->last_pat_ts + mux->pat_interval)
       write_pat = TRUE;
@@ -1024,7 +1023,7 @@
     }
 
     /* check if we need to rewrite sit */
-    if (mux->last_si_ts == -1 || mux->si_changed)
+    if (mux->last_si_ts == G_MININT64 || mux->si_changed)
       write_si = TRUE;
     else if (cur_pts >= mux->last_si_ts + mux->si_interval)
       write_si = TRUE;
@@ -1042,7 +1041,7 @@
       TsMuxProgram *program = (TsMuxProgram *) cur->data;
       gboolean write_pmt;
 
-      if (program->last_pmt_ts == -1 || program->pmt_changed)
+      if (program->last_pmt_ts == G_MININT64 || program->pmt_changed)
         write_pmt = TRUE;
       else if (cur_pts >= program->last_pmt_ts + program->pmt_interval)
         write_pmt = TRUE;
@@ -1060,9 +1059,9 @@
   pi->packet_start_unit_indicator = tsmux_stream_at_pes_start (stream);
   if (pi->packet_start_unit_indicator) {
     tsmux_stream_initialize_pes_packet (stream);
-    if (stream->dts != -1)
+    if (stream->dts != G_MININT64)
       stream->dts += CLOCK_BASE;
-    if (stream->pts != -1)
+    if (stream->pts != G_MININT64)
       stream->pts += CLOCK_BASE;
   }
   pi->stream_avail = tsmux_stream_bytes_avail (stream);
diff --git a/gst/mpegtsmux/tsmux/tsmuxstream.c b/gst/mpegtsmux/tsmux/tsmuxstream.c
index 2cbbf76..1094c3e 100644
--- a/gst/mpegtsmux/tsmux/tsmuxstream.c
+++ b/gst/mpegtsmux/tsmux/tsmuxstream.c
@@ -180,6 +180,7 @@
     case TSMUX_ST_PS_TELETEXT:
       /* needs fixes PES header length */
       stream->pi.pes_header_length = 36;
+      /* fall through */
     case TSMUX_ST_PS_DVB_SUBPICTURE:
       /* private stream 1 */
       stream->id = 0xBD;
@@ -190,13 +191,22 @@
           TSMUX_PACKET_FLAG_PES_DATA_ALIGNMENT;
 
       break;
+    case TSMUX_ST_PS_KLV:
+      /* FIXME: assign sequential extended IDs? */
+      stream->id = 0xBD;
+      stream->stream_type = TSMUX_ST_PRIVATE_DATA;
+      stream->is_meta = TRUE;
+      stream->pi.flags |=
+          TSMUX_PACKET_FLAG_PES_FULL_HEADER |
+          TSMUX_PACKET_FLAG_PES_DATA_ALIGNMENT;
+      break;
     default:
       g_critical ("Stream type 0x%0x not yet implemented", stream_type);
       break;
   }
 
-  stream->last_pts = -1;
-  stream->last_dts = -1;
+  stream->last_pts = GST_CLOCK_STIME_NONE;
+  stream->last_dts = GST_CLOCK_STIME_NONE;
 
   stream->pcr_ref = 0;
   stream->last_pcr = -1;
@@ -278,10 +288,10 @@
   if (stream->cur_buffer_consumed == 0)
     return;
 
-  if (stream->cur_buffer->pts != -1) {
+  if (GST_CLOCK_STIME_IS_VALID (stream->cur_buffer->pts)) {
     stream->last_pts = stream->cur_buffer->pts;
     stream->last_dts = stream->cur_buffer->dts;
-  } else if (stream->cur_buffer->dts != -1)
+  } else if (GST_CLOCK_STIME_IS_VALID (stream->cur_buffer->dts))
     stream->last_dts = stream->cur_buffer->dts;
 
   if (stream->cur_buffer_consumed == stream->cur_buffer->size) {
@@ -406,10 +416,12 @@
   stream->pi.flags &= ~(TSMUX_PACKET_FLAG_PES_WRITE_PTS_DTS |
       TSMUX_PACKET_FLAG_PES_WRITE_PTS);
 
-  if (stream->pts != -1 && stream->dts != -1 && stream->pts != stream->dts)
+  if (GST_CLOCK_STIME_IS_VALID (stream->pts)
+      && GST_CLOCK_STIME_IS_VALID (stream->dts)
+      && stream->pts != stream->dts)
     stream->pi.flags |= TSMUX_PACKET_FLAG_PES_WRITE_PTS_DTS;
   else {
-    if (stream->pts != -1)
+    if (GST_CLOCK_STIME_IS_VALID (stream->pts))
       stream->pi.flags |= TSMUX_PACKET_FLAG_PES_WRITE_PTS;
   }
 
@@ -545,8 +557,8 @@
 {
   GList *cur;
 
-  *pts = -1;
-  *dts = -1;
+  *pts = GST_CLOCK_STIME_NONE;
+  *dts = GST_CLOCK_STIME_NONE;
 
   for (cur = stream->buffers; cur; cur = cur->next) {
     TsMuxStreamBuffer *curbuf = cur->data;
@@ -561,7 +573,8 @@
     }
 
     /* Have we found a buffer with pts/dts set? */
-    if (curbuf->pts != -1 || curbuf->dts != -1) {
+    if (GST_CLOCK_STIME_IS_VALID (curbuf->pts)
+        || GST_CLOCK_STIME_IS_VALID (curbuf->dts)) {
       *pts = curbuf->pts;
       *dts = curbuf->dts;
       return;
@@ -655,7 +668,7 @@
  *
  * Submit @len bytes of @data into @stream. @pts and @dts can be set to the
  * timestamp (against a 90Hz clock) of the first access unit in @data. A
- * timestamp of -1 for @pts or @dts means unknown.
+ * timestamp of GST_CLOCK_STIME_NNOE for @pts or @dts means unknown.
  *
  * @user_data will be passed to the release function as set with
  * tsmux_stream_set_buffer_release_func() when @data can be freed.
@@ -897,6 +910,11 @@
         g_ptr_array_add (pmt_stream->descriptors, descriptor);
         break;
       }
+      if (stream->is_meta) {
+        descriptor = gst_mpegts_descriptor_from_registration ("KLVA", NULL, 0);
+        GST_ERROR ("adding KLVA registration descriptor!");
+        g_ptr_array_add (pmt_stream->descriptors, descriptor);
+      }
     default:
       break;
   }
@@ -956,7 +974,7 @@
 guint64
 tsmux_stream_get_pts (TsMuxStream * stream)
 {
-  g_return_val_if_fail (stream != NULL, -1);
+  g_return_val_if_fail (stream != NULL, GST_CLOCK_STIME_NONE);
 
   return stream->last_pts;
 }
diff --git a/gst/mpegtsmux/tsmux/tsmuxstream.h b/gst/mpegtsmux/tsmux/tsmuxstream.h
index 5640df6..c355ae2 100644
--- a/gst/mpegtsmux/tsmux/tsmuxstream.h
+++ b/gst/mpegtsmux/tsmux/tsmuxstream.h
@@ -140,6 +140,7 @@
   TSMUX_ST_PS_AUDIO_LPCM              = 0x8b,
   TSMUX_ST_PS_DVB_SUBPICTURE          = 0x8c,
   TSMUX_ST_PS_TELETEXT                = 0x8d,
+  TSMUX_ST_PS_KLV                     = 0x8e,    /* only used internally */
   TSMUX_ST_PS_DVD_SUBPICTURE          = 0xff,
 
   /* Non-standard definitions */
@@ -206,6 +207,8 @@
 
   gboolean is_dvb_sub;
   gchar language[4];
+
+  gboolean is_meta;
 };
 
 /* stream management */
diff --git a/gst/mve/Makefile.am b/gst/mve/Makefile.am
index 20b5100..3ba6d2a 100644
--- a/gst/mve/Makefile.am
+++ b/gst/mve/Makefile.am
@@ -19,17 +19,3 @@
 noinst_HEADERS = gstmvedemux.h gstmvemux.h mve.h
 
 EXTRA_DIST = TODO
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmve -:SHARED libgstmve \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmve_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmve_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmve_la_LDFLAGS) \
-	           $(libgstmve_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/mve/Makefile.in b/gst/mve/Makefile.in
index 39f82cc..c297c9d 100644
--- a/gst/mve/Makefile.in
+++ b/gst/mve/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mve
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) TODO
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp TODO
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -762,7 +797,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mve/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mve/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1135,20 +1169,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmve -:SHARED libgstmve \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmve_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmve_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmve_la_LDFLAGS) \
-	           $(libgstmve_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/mve/gstmvemux.c b/gst/mve/gstmvemux.c
index c468d9b..043211c 100644
--- a/gst/mve/gstmvemux.c
+++ b/gst/mve/gstmvemux.c
@@ -42,11 +42,11 @@
 
 enum
 {
-  ARG_0,
-  ARG_AUDIO_COMPRESSION,
-  ARG_VIDEO_QUICK_ENCODING,
-  ARG_VIDEO_SCREEN_WIDTH,
-  ARG_VIDEO_SCREEN_HEIGHT
+  PROP_0,
+  PROP_AUDIO_COMPRESSION,
+  PROP_VIDEO_QUICK_ENCODING,
+  PROP_VIDEO_SCREEN_WIDTH,
+  PROP_VIDEO_SCREEN_HEIGHT
 };
 
 #define MVE_MUX_DEFAULT_COMPRESSION    FALSE
@@ -226,16 +226,16 @@
   mvemux = GST_MVE_MUX (object);
 
   switch (prop_id) {
-    case ARG_AUDIO_COMPRESSION:
+    case PROP_AUDIO_COMPRESSION:
       g_value_set_boolean (value, mvemux->compression);
       break;
-    case ARG_VIDEO_QUICK_ENCODING:
+    case PROP_VIDEO_QUICK_ENCODING:
       g_value_set_boolean (value, mvemux->quick_encoding);
       break;
-    case ARG_VIDEO_SCREEN_WIDTH:
+    case PROP_VIDEO_SCREEN_WIDTH:
       g_value_set_uint (value, mvemux->screen_width);
       break;
-    case ARG_VIDEO_SCREEN_HEIGHT:
+    case PROP_VIDEO_SCREEN_HEIGHT:
       g_value_set_uint (value, mvemux->screen_height);
       break;
     default:
@@ -254,16 +254,16 @@
   mvemux = GST_MVE_MUX (object);
 
   switch (prop_id) {
-    case ARG_AUDIO_COMPRESSION:
+    case PROP_AUDIO_COMPRESSION:
       mvemux->compression = g_value_get_boolean (value);
       break;
-    case ARG_VIDEO_QUICK_ENCODING:
+    case PROP_VIDEO_QUICK_ENCODING:
       mvemux->quick_encoding = g_value_get_boolean (value);
       break;
-    case ARG_VIDEO_SCREEN_WIDTH:
+    case PROP_VIDEO_SCREEN_WIDTH:
       mvemux->screen_width = g_value_get_uint (value);
       break;
-    case ARG_VIDEO_SCREEN_HEIGHT:
+    case PROP_VIDEO_SCREEN_HEIGHT:
       mvemux->screen_height = g_value_get_uint (value);
       break;
     default:
@@ -1402,23 +1402,23 @@
   gobject_class->get_property = gst_mve_mux_get_property;
   gobject_class->set_property = gst_mve_mux_set_property;
 
-  g_object_class_install_property (gobject_class, ARG_AUDIO_COMPRESSION,
+  g_object_class_install_property (gobject_class, PROP_AUDIO_COMPRESSION,
       g_param_spec_boolean ("compression", "Audio compression",
           "Whether to compress audio data", MVE_MUX_DEFAULT_COMPRESSION,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_VIDEO_QUICK_ENCODING,
+  g_object_class_install_property (gobject_class, PROP_VIDEO_QUICK_ENCODING,
       g_param_spec_boolean ("quick", "Quick encoding",
           "Whether to disable expensive encoding operations", TRUE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_VIDEO_SCREEN_WIDTH,
+  g_object_class_install_property (gobject_class, PROP_VIDEO_SCREEN_WIDTH,
       g_param_spec_uint ("screen-width", "Screen width",
           "Suggested screen width", 320, 1600,
           MVE_MUX_DEFAULT_SCREEN_WIDTH,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_VIDEO_SCREEN_HEIGHT,
+  g_object_class_install_property (gobject_class, PROP_VIDEO_SCREEN_HEIGHT,
       g_param_spec_uint ("screen-height", "Screen height",
           "Suggested screen height", 200, 1200,
           MVE_MUX_DEFAULT_SCREEN_HEIGHT,
diff --git a/gst/mxf/Makefile.am b/gst/mxf/Makefile.am
index ce19033..6ec4a78 100644
--- a/gst/mxf/Makefile.am
+++ b/gst/mxf/Makefile.am
@@ -43,17 +43,3 @@
 	mxfup.h \
 	mxfvc3.h \
 	mxfdms1.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmxf -:SHARED libgstmxf \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmxf_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmxf_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmxf_la_LDFLAGS) \
-	           $(libgstmxf_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/mxf/Makefile.in b/gst/mxf/Makefile.in
index c94e6ef..20830f8 100644
--- a/gst/mxf/Makefile.in
+++ b/gst/mxf/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/mxf
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -235,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -252,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -278,8 +291,6 @@
 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@
@@ -292,7 +303,6 @@
 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@
@@ -300,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -326,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -349,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -409,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -429,7 +446,6 @@
 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@
@@ -438,7 +454,6 @@
 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@
@@ -451,7 +466,6 @@
 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@
@@ -465,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -476,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -514,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -549,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -578,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -585,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -614,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -624,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -654,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -681,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -719,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -793,7 +828,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/mxf/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/mxf/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1230,20 +1264,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmxf -:SHARED libgstmxf \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmxf_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmxf_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmxf_la_LDFLAGS) \
-	           $(libgstmxf_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 1c093b4..e45e49c 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -31,7 +31,6 @@
  */
 
 /* TODO:
- *   - Seeking support: Use IndexTableSegments
  *   - Handle timecode tracks correctly (where is this documented?)
  *   - Handle drop-frame field of timecode tracks
  *   - Handle Generic container system items
@@ -52,10 +51,6 @@
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include "mxfdemux.h"
 #include "mxfessence.h"
 
@@ -76,6 +71,13 @@
 GST_DEBUG_CATEGORY_STATIC (mxfdemux_debug);
 #define GST_CAT_DEFAULT mxfdemux_debug
 
+static GstFlowReturn
+gst_mxf_demux_pull_klv_packet (GstMXFDemux * demux, guint64 offset, MXFUL * key,
+    GstBuffer ** outbuf, guint * read);
+static GstFlowReturn
+gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux,
+    const MXFUL * key, GstBuffer * buffer, guint64 offset);
+
 GType gst_mxf_demux_pad_get_type (void);
 G_DEFINE_TYPE (GstMXFDemuxPad, gst_mxf_demux_pad, GST_TYPE_PAD);
 
@@ -275,6 +277,8 @@
     demux->pending_index_table_segments = NULL;
   }
 
+  demux->index_table_segments_collected = FALSE;
+
   gst_mxf_demux_reset_mxf_state (demux);
   gst_mxf_demux_reset_metadata (demux);
 
@@ -1671,8 +1675,10 @@
   }
 
   if (etrack->offsets && etrack->offsets->len > etrack->position) {
-    keyframe = g_array_index (etrack->offsets, GstMXFDemuxIndex,
-        etrack->position).keyframe;
+    GstMXFDemuxIndex *index =
+        &g_array_index (etrack->offsets, GstMXFDemuxIndex, etrack->position);
+    if (index->offset != 0)
+      keyframe = index->keyframe;
   }
 
   /* Create subbuffer to be able to change metadata */
@@ -1722,6 +1728,8 @@
 
       index.offset = demux->offset - demux->run_in;
       index.keyframe = keyframe;
+      if (etrack->offsets->len < etrack->position)
+        g_array_set_size (etrack->offsets, etrack->position);
       g_array_insert_val (etrack->offsets, etrack->position, index);
     }
   }
@@ -1887,6 +1895,39 @@
   return ret;
 }
 
+static void
+read_partition_header (GstMXFDemux * demux, guint64 offset)
+{
+  GstBuffer *buf;
+  MXFUL key;
+  guint read;
+
+  if (gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buf, &read)
+      != GST_FLOW_OK)
+    return;
+  offset += read;
+
+  if (!mxf_is_partition_pack (&key)) {
+    gst_buffer_unref (buf);
+    return;
+  }
+
+  do {
+    gst_buffer_unref (buf);
+    if (gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buf, &read)
+        != GST_FLOW_OK)
+      return;
+    offset += read;
+  }
+  while (mxf_is_fill (&key));
+
+  if (mxf_is_index_table_segment (&key)) {
+    gst_mxf_demux_handle_index_table_segment (demux, &key, buf, offset);
+  }
+
+  gst_buffer_unref (buf);
+}
+
 static GstFlowReturn
 gst_mxf_demux_handle_random_index_pack (GstMXFDemux * demux, const MXFUL * key,
     GstBuffer * buffer)
@@ -1960,17 +2001,31 @@
   return GST_FLOW_OK;
 }
 
+static gint
+compare_index_table_segments (gconstpointer comparee, gconstpointer compared)
+{
+  MXFIndexTableSegment *comparee_segment, *compared_segment;
+
+  comparee_segment = (MXFIndexTableSegment *) comparee;
+  compared_segment = (MXFIndexTableSegment *) compared;
+
+  /* FIXME : is that the correct comparison ? */
+  return comparee_segment->index_start_position -
+      compared_segment->index_start_position;
+}
+
 static GstFlowReturn
 gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux,
-    const MXFUL * key, GstBuffer * buffer)
+    const MXFUL * key, GstBuffer * buffer, guint64 offset)
 {
   MXFIndexTableSegment *segment;
   GstMapInfo map;
   gboolean ret;
+  GList *l;
 
   GST_DEBUG_OBJECT (demux,
       "Handling index table segment of size %" G_GSIZE_FORMAT " at offset %"
-      G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
+      G_GUINT64_FORMAT, gst_buffer_get_size (buffer), offset);
 
   if (!demux->current_partition->primer.mappings) {
     GST_WARNING_OBJECT (demux, "Invalid primer pack");
@@ -1988,9 +2043,18 @@
     return GST_FLOW_ERROR;
   }
 
-  demux->pending_index_table_segments =
-      g_list_prepend (demux->pending_index_table_segments, segment);
+  segment->stream_offset = offset;
+  l = g_list_find_custom (demux->pending_index_table_segments, segment,
+      (GCompareFunc) compare_index_table_segments);
 
+  /* Prevent duplicates */
+  if (l == NULL) {
+    demux->pending_index_table_segments =
+        g_list_prepend (demux->pending_index_table_segments, segment);
+  } else {
+    mxf_index_table_segment_reset (segment);
+    g_free (segment);
+  }
 
   return GST_FLOW_OK;
 }
@@ -2096,7 +2160,6 @@
 gst_mxf_demux_pull_random_index_pack (GstMXFDemux * demux)
 {
   GstBuffer *buffer;
-  GstFlowReturn ret;
   gint64 filesize = -1;
   GstFormat fmt = GST_FORMAT_BYTES;
   guint32 pack_size;
@@ -2113,9 +2176,7 @@
   g_assert (filesize > 4);
 
   buffer = NULL;
-  if ((ret =
-          gst_mxf_demux_pull_range (demux, filesize - 4, 4,
-              &buffer)) != GST_FLOW_OK) {
+  if (gst_mxf_demux_pull_range (demux, filesize - 4, 4, &buffer) != GST_FLOW_OK) {
     GST_DEBUG_OBJECT (demux, "Failed pulling last 4 bytes");
     return;
   }
@@ -2135,9 +2196,8 @@
   }
 
   buffer = NULL;
-  if ((ret =
-          gst_mxf_demux_pull_range (demux, filesize - pack_size, 16,
-              &buffer)) != GST_FLOW_OK) {
+  if (gst_mxf_demux_pull_range (demux, filesize - pack_size, 16,
+          &buffer) != GST_FLOW_OK) {
     GST_DEBUG_OBJECT (demux, "Failed pulling random index pack key");
     return;
   }
@@ -2153,9 +2213,8 @@
   }
 
   demux->offset = filesize - pack_size;
-  if ((ret =
-          gst_mxf_demux_pull_klv_packet (demux, filesize - pack_size, &key,
-              &buffer, NULL)) != GST_FLOW_OK) {
+  if (gst_mxf_demux_pull_klv_packet (demux, filesize - pack_size, &key,
+          &buffer, NULL) != GST_FLOW_OK) {
     GST_DEBUG_OBJECT (demux, "Failed pulling random index pack");
     return;
   }
@@ -2172,7 +2231,7 @@
   MXFUL key;
   GstBuffer *buffer = NULL;
   guint read = 0;
-  GstFlowReturn ret = GST_FLOW_OK;
+  GstFlowReturn flow = GST_FLOW_OK;
   GstMXFDemuxPartition *old_partition = demux->current_partition;
 
   demux->current_partition = NULL;
@@ -2189,10 +2248,10 @@
   }
 
 next_try:
-  ret =
+  flow =
       gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buffer,
       &read);
-  if (G_UNLIKELY (ret != GST_FLOW_OK))
+  if (G_UNLIKELY (flow != GST_FLOW_OK))
     goto out;
 
   if (!mxf_is_partition_pack (&key))
@@ -2217,10 +2276,10 @@
   }
 
   while (TRUE) {
-    ret =
+    flow =
         gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buffer,
         &read);
-    if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+    if (G_UNLIKELY (flow != GST_FLOW_OK)) {
       demux->offset =
           demux->run_in +
           demux->current_partition->partition.this_partition -
@@ -2265,10 +2324,10 @@
   while (demux->offset <
       demux->run_in + demux->current_partition->primer.offset +
       demux->current_partition->partition.header_byte_count) {
-    ret =
+    flow =
         gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buffer,
         &read);
-    if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+    if (G_UNLIKELY (flow != GST_FLOW_OK)) {
       demux->offset =
           demux->run_in +
           demux->current_partition->partition.this_partition -
@@ -2277,12 +2336,12 @@
     }
 
     if (mxf_is_metadata (&key)) {
-      ret = gst_mxf_demux_handle_metadata (demux, &key, buffer);
+      flow = gst_mxf_demux_handle_metadata (demux, &key, buffer);
       demux->offset += read;
       gst_buffer_unref (buffer);
       buffer = NULL;
 
-      if (G_UNLIKELY (ret != GST_FLOW_OK)) {
+      if (G_UNLIKELY (flow != GST_FLOW_OK)) {
         gst_mxf_demux_reset_metadata (demux);
         demux->offset =
             demux->run_in +
@@ -2291,7 +2350,7 @@
         goto next_try;
       }
     } else if (mxf_is_descriptive_metadata (&key)) {
-      ret = gst_mxf_demux_handle_descriptive_metadata (demux, &key, buffer);
+      gst_mxf_demux_handle_descriptive_metadata (demux, &key, buffer);
       demux->offset += read;
       gst_buffer_unref (buffer);
       buffer = NULL;
@@ -2403,7 +2462,9 @@
   } else if (mxf_is_random_index_pack (key)) {
     ret = gst_mxf_demux_handle_random_index_pack (demux, key, buffer);
   } else if (mxf_is_index_table_segment (key)) {
-    ret = gst_mxf_demux_handle_index_table_segment (demux, key, buffer);
+    ret =
+        gst_mxf_demux_handle_index_table_segment (demux, key, buffer,
+        demux->offset);
   } else if (mxf_is_fill (key)) {
     GST_DEBUG_OBJECT (demux,
         "Skipping filler packet of size %" G_GSIZE_FORMAT " at offset %"
@@ -2463,6 +2524,31 @@
 }
 
 static guint64
+get_offset_from_index_table_segments (GstMXFDemux * demux, gint64 position,
+    gint64 * index_start_position)
+{
+  GList *l;
+  gint64 start, end;
+  gboolean return_offset = FALSE;
+
+  for (l = demux->pending_index_table_segments; l != NULL; l = l->next) {
+    MXFIndexTableSegment *segment = (MXFIndexTableSegment *) l->data;
+    start = segment->index_start_position;
+    end = start + segment->index_duration;
+
+    if (return_offset)
+      return segment->stream_offset;
+
+    if (start <= position && position < end) {
+      *index_start_position = segment->index_start_position;
+      return_offset = TRUE;
+    }
+  }
+
+  return 0;
+}
+
+static guint64
 gst_mxf_demux_find_essence_element (GstMXFDemux * demux,
     GstMXFDemuxEssenceTrack * etrack, gint64 * position, gboolean keyframe)
 {
@@ -2540,6 +2626,9 @@
       return new_offset;
     }
   } else if (demux->random_access) {
+    gint64 index_start_position = -1;
+    guint64 offset;
+
     demux->offset = demux->run_in;
     if (etrack->offsets && etrack->offsets->len) {
       for (i = etrack->offsets->len - 1; i >= 0; i--) {
@@ -2552,13 +2641,23 @@
         }
       }
     }
+
+    offset =
+        get_offset_from_index_table_segments (demux, *position,
+        &index_start_position);
+
+    demux->offset = offset;
+
     gst_mxf_demux_set_partition_for_offset (demux, demux->offset);
 
     for (i = 0; i < demux->essence_tracks->len; i++) {
       GstMXFDemuxEssenceTrack *t =
           &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
 
-      t->position = (demux->offset == demux->run_in) ? 0 : -1;
+      if (index_start_position != -1)
+        t->position = index_start_position;
+      else
+        t->position = (demux->offset == demux->run_in) ? 0 : -1;
     }
 
     /* Else peek at all essence elements and complete our
@@ -2770,7 +2869,7 @@
 gst_mxf_demux_loop (GstPad * pad)
 {
   GstMXFDemux *demux = NULL;
-  GstFlowReturn ret = GST_FLOW_OK;
+  GstFlowReturn flow = GST_FLOW_OK;
   GstMapInfo map;
   gboolean res;
 
@@ -2782,7 +2881,7 @@
     while (demux->offset < 64 * 1024) {
       GstBuffer *buffer = NULL;
 
-      if ((ret =
+      if ((flow =
               gst_mxf_demux_pull_range (demux, demux->offset, 16,
                   &buffer)) != GST_FLOW_OK)
         break;
@@ -2804,12 +2903,12 @@
       gst_buffer_unref (buffer);
     }
 
-    if (G_UNLIKELY (ret != GST_FLOW_OK))
+    if (G_UNLIKELY (flow != GST_FLOW_OK))
       goto pause;
 
     if (G_UNLIKELY (demux->run_in == -1)) {
       GST_ERROR_OBJECT (demux, "No valid header partition pack found");
-      ret = GST_FLOW_ERROR;
+      flow = GST_FLOW_ERROR;
       goto pause;
     }
 
@@ -2818,10 +2917,10 @@
   }
 
   /* Now actually do something */
-  ret = gst_mxf_demux_pull_and_handle_klv_packet (demux);
+  flow = gst_mxf_demux_pull_and_handle_klv_packet (demux);
 
   /* pause if something went wrong */
-  if (G_UNLIKELY (ret != GST_FLOW_OK))
+  if (G_UNLIKELY (flow != GST_FLOW_OK))
     goto pause;
 
   /* check EOS condition */
@@ -2841,7 +2940,7 @@
     }
 
     if (eos) {
-      ret = GST_FLOW_EOS;
+      flow = GST_FLOW_EOS;
       goto pause;
     }
   }
@@ -2852,12 +2951,12 @@
 
 pause:
   {
-    const gchar *reason = gst_flow_get_name (ret);
+    const gchar *reason = gst_flow_get_name (flow);
 
     GST_LOG_OBJECT (demux, "pausing task, reason %s", reason);
     gst_pad_pause_task (pad);
 
-    if (ret == GST_FLOW_EOS) {
+    if (flow == GST_FLOW_EOS) {
       /* perform EOS logic */
       if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) {
         gint64 stop;
@@ -2888,7 +2987,7 @@
           GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
         }
       }
-    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
+    } else if (flow == GST_FLOW_NOT_LINKED || flow < GST_FLOW_EOS) {
       GstEvent *e;
 
       GST_ELEMENT_ERROR (demux, STREAM, FAILED,
@@ -3298,6 +3397,40 @@
   }
 }
 
+static void
+collect_index_table_segments (GstMXFDemux * demux)
+{
+  guint i;
+  GList *l;
+
+  if (!demux->random_index_pack)
+    return;
+
+  for (i = 0; i < demux->random_index_pack->len; i++) {
+    GstMXFDemuxPartition *p = NULL;
+    MXFRandomIndexPackEntry *e =
+        &g_array_index (demux->random_index_pack, MXFRandomIndexPackEntry, i);
+
+    if (e->offset < demux->run_in) {
+      GST_ERROR_OBJECT (demux, "Invalid random index pack entry");
+      return;
+    }
+
+    for (l = demux->partitions; l; l = l->next) {
+      GstMXFDemuxPartition *tmp = l->data;
+
+      if (tmp->partition.this_partition + demux->run_in == e->offset) {
+        p = tmp;
+        break;
+      }
+    }
+
+    if (p) {
+      read_partition_header (demux, p->partition.this_partition);
+    }
+  }
+}
+
 static gboolean
 gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event)
 {
@@ -3328,6 +3461,11 @@
 
   keyunit_ts = start;
 
+  if (!demux->index_table_segments_collected) {
+    collect_index_table_segments (demux);
+    demux->index_table_segments_collected = TRUE;
+  }
+
   if (flush) {
     GstEvent *e;
 
@@ -3418,6 +3556,7 @@
       }
       p->discont = TRUE;
     }
+    gst_flow_combiner_reset (demux->flowcombiner);
     if (new_offset == -1) {
       GST_WARNING_OBJECT (demux, "No new offset found");
       ret = FALSE;
diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h
index 38c7725..3324093 100644
--- a/gst/mxf/mxfdemux.h
+++ b/gst/mxf/mxfdemux.h
@@ -155,6 +155,8 @@
   GArray *essence_tracks;
   GList *pending_index_table_segments;
 
+  gboolean index_table_segments_collected;
+
   GArray *random_index_pack;
 
   /* Metadata */
diff --git a/gst/mxf/mxfdv-dif.c b/gst/mxf/mxfdv-dif.c
index dda0cae..6f72c90 100644
--- a/gst/mxf/mxfdv-dif.c
+++ b/gst/mxf/mxfdv-dif.c
@@ -23,7 +23,7 @@
 
 /* TODO:
  *  - playbin hangs on a lot of MXF/DV-DIF files (bug #563827)
- *  - decodebin2 creates loops inside the linking graph (bug #563828)
+ *  - decodebin creates loops inside the linking graph (bug #563828)
  *  - track descriptor might be multiple descriptor, one for sound, one for video
  *  - there might be 2 tracks for one essence, i.e. one audio/one video track
  */
diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c
index edef298..e306a55 100644
--- a/gst/mxf/mxfmetadata.c
+++ b/gst/mxf/mxfmetadata.c
@@ -2239,6 +2239,7 @@
       if (d->linked_track_id == package->tracks[i]->track_id ||
           (d->linked_track_id == 0 && package->n_essence_tracks == 1 &&
               (package->tracks[i]->type & 0xf0) == 0x30)) {
+        g_free (package->tracks[i]->descriptor);
         package->tracks[i]->descriptor =
             g_new0 (MXFMetadataFileDescriptor *, 1);
         package->tracks[i]->descriptor[0] = d;
@@ -2264,6 +2265,7 @@
           n_descriptor++;
       }
 
+      g_free (package->tracks[i]->descriptor);
       package->tracks[i]->descriptor =
           g_new0 (MXFMetadataFileDescriptor *, n_descriptor);
       package->tracks[i]->n_descriptor = n_descriptor;
@@ -4080,7 +4082,7 @@
 
     t = g_slice_new0 (MXFLocalTag);
     memcpy (&t->ul, MXF_UL (LOCATORS), 16);
-    t->size = 8 + 16 * self->n_locators;;
+    t->size = 8 + 16 * self->n_locators;
     t->data = g_slice_alloc0 (t->size);
     t->g_slice = TRUE;
     GST_WRITE_UINT32_BE (t->data, self->n_locators);
diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c
index a08d05e..273d3b6 100644
--- a/gst/mxf/mxfmux.c
+++ b/gst/mxf/mxfmux.c
@@ -25,7 +25,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v filesrc location=/path/to/audio ! decodebin2 ! queue ! mxfmux name=m ! filesink location=file.mxf   filesrc location=/path/to/video ! decodebin2 ! queue ! m.
+ * gst-launch -v filesrc location=/path/to/audio ! decodebin ! queue ! mxfmux name=m ! filesink location=file.mxf   filesrc location=/path/to/video ! decodebin ! queue ! m.
  * ]| This pipeline muxes an audio and video file into a single MXF file.
  * </refsect2>
  */
diff --git a/gst/mxf/mxftypes.h b/gst/mxf/mxftypes.h
index 1f31b40..0c338e7 100644
--- a/gst/mxf/mxftypes.h
+++ b/gst/mxf/mxftypes.h
@@ -171,6 +171,7 @@
   MXFIndexEntry *index_entries;
 
   GHashTable *other_tags;
+  guint64 stream_offset;
 } MXFIndexTableSegment;
 
 #define GST_TAG_MXF_UMID "mxf-umid"
diff --git a/gst/nuvdemux/Makefile.am b/gst/nuvdemux/Makefile.am
index 981eb09..aecae51 100644
--- a/gst/nuvdemux/Makefile.am
+++ b/gst/nuvdemux/Makefile.am
@@ -8,17 +8,3 @@
 libgstnuvdemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstnuvdemux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstnuvdemux -:SHARED libgstnuvdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstnuvdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstnuvdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstnuvdemux_la_LDFLAGS) \
-	           $(libgstnuvdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/nuvdemux/Makefile.in b/gst/nuvdemux/Makefile.in
index e56b6c0..3491ec5 100644
--- a/gst/nuvdemux/Makefile.in
+++ b/gst/nuvdemux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/nuvdemux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -226,6 +236,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -243,8 +254,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -269,8 +282,6 @@
 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@
@@ -283,7 +294,6 @@
 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@
@@ -291,6 +301,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -317,11 +329,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -340,8 +355,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -400,10 +413,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -420,7 +437,6 @@
 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@
@@ -429,7 +445,6 @@
 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@
@@ -442,7 +457,6 @@
 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@
@@ -456,6 +470,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -467,6 +482,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -505,6 +522,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -540,10 +558,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -569,6 +591,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -576,7 +601,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -605,6 +637,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -615,6 +648,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -645,17 +679,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -672,6 +705,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -710,6 +744,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -746,7 +781,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/nuvdemux/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/nuvdemux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1055,20 +1089,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstnuvdemux -:SHARED libgstnuvdemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstnuvdemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstnuvdemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstnuvdemux_la_LDFLAGS) \
-	           $(libgstnuvdemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c
index 5bd29a5..ce4e98d 100644
--- a/gst/nuvdemux/gstnuvdemux.c
+++ b/gst/nuvdemux/gstnuvdemux.c
@@ -717,7 +717,6 @@
       break;
     case GST_NUV_DEMUX_INVALID_DATA:
       goto pause;
-      break;
     default:
       g_assert_not_reached ();
   }
diff --git a/gst/onvif/Makefile.am b/gst/onvif/Makefile.am
new file mode 100644
index 0000000..8dfbcf0
--- /dev/null
+++ b/gst/onvif/Makefile.am
@@ -0,0 +1,12 @@
+plugin_LTLIBRARIES = libgstrtponvif.la
+
+libgstrtponvif_la_SOURCES = \
+	gstrtponvif.c \
+	gstrtponviftimestamp.c gstrtponviftimestamp.h \
+	gstrtponvifparse.c gstrtponvifparse.h
+libgstrtponvif_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstrtponvif_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	$(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION)
+libgstrtponvif_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstrtponvif_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
diff --git a/gst/real/Makefile.in b/gst/onvif/Makefile.in
similarity index 83%
copy from gst/real/Makefile.in
copy to gst/onvif/Makefile.in
index 2282e4e..d7a6d64 100644
--- a/gst/real/Makefile.in
+++ b/gst/onvif/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +89,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = gst/real
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = gst/onvif
 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 \
@@ -90,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +111,6 @@
 	$(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 \
@@ -120,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,19 +162,20 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstreal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstreal_la_OBJECTS = libgstreal_la-gstrealvideodec.lo \
-	libgstreal_la-gstrealaudiodec.lo libgstreal_la-gstreal.lo
-libgstreal_la_OBJECTS = $(am_libgstreal_la_OBJECTS)
+libgstrtponvif_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstrtponvif_la_OBJECTS = libgstrtponvif_la-gstrtponvif.lo \
+	libgstrtponvif_la-gstrtponviftimestamp.lo \
+	libgstrtponvif_la-gstrtponvifparse.lo
+libgstrtponvif_la_OBJECTS = $(am_libgstrtponvif_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 = 
-libgstreal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstreal_la_CFLAGS) $(CFLAGS) \
-	$(libgstreal_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstrtponvif_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) \
+	$(libgstrtponvif_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
@@ -201,14 +210,13 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstreal_la_SOURCES)
-DIST_SOURCES = $(libgstreal_la_SOURCES)
+SOURCES = $(libgstrtponvif_la_SOURCES)
+DIST_SOURCES = $(libgstrtponvif_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
@@ -228,6 +236,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +254,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +282,6 @@
 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@
@@ -285,7 +294,6 @@
 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@
@@ -293,6 +301,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +329,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +355,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +413,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +437,6 @@
 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@
@@ -431,7 +445,6 @@
 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@
@@ -444,7 +457,6 @@
 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@
@@ -458,6 +470,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +482,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +522,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +558,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +591,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +601,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +637,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +648,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +679,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +705,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +744,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -725,28 +758,20 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstreal.la 
-libgstreal_la_SOURCES = \
-	gstrealvideodec.c \
-	gstrealaudiodec.c \
-	gstreal.c
+plugin_LTLIBRARIES = libgstrtponvif.la
+libgstrtponvif_la_SOURCES = \
+	gstrtponvif.c \
+	gstrtponviftimestamp.c gstrtponviftimestamp.h \
+	gstrtponvifparse.c gstrtponvifparse.h
 
-libgstreal_la_CFLAGS = \
-	$(GST_PLUGINS_BASE_CFLAGS) \
-	$(GST_BASE_CFLAGS) \
-	$(GST_CFLAGS)
+libgstrtponvif_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS)
 
-libgstreal_la_LIBADD = \
-	$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
-	$(GST_BASE_LIBS)
+libgstrtponvif_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	$(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION)
 
-libgstreal_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstreal_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = \
-	gstreal.h         \
-	gstrealvideodec.h \
-	gstrealaudiodec.h
-
+libgstrtponvif_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstrtponvif_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 all: all-am
 
 .SUFFIXES:
@@ -760,10 +785,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/real/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/onvif/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu gst/real/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu gst/onvif/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -817,8 +841,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstreal.la: $(libgstreal_la_OBJECTS) $(libgstreal_la_DEPENDENCIES) $(EXTRA_libgstreal_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstreal_la_LINK) -rpath $(plugindir) $(libgstreal_la_OBJECTS) $(libgstreal_la_LIBADD) $(LIBS)
+libgstrtponvif.la: $(libgstrtponvif_la_OBJECTS) $(libgstrtponvif_la_DEPENDENCIES) $(EXTRA_libgstrtponvif_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstrtponvif_la_LINK) -rpath $(plugindir) $(libgstrtponvif_la_OBJECTS) $(libgstrtponvif_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -826,9 +850,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstreal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstrealaudiodec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstrealvideodec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtponvif_la-gstrtponvif.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtponvif_la-gstrtponvifparse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtponvif_la-gstrtponviftimestamp.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -854,26 +878,26 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstreal_la-gstrealvideodec.lo: gstrealvideodec.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstrealvideodec.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstrealvideodec.Tpo -c -o libgstreal_la-gstrealvideodec.lo `test -f 'gstrealvideodec.c' || echo '$(srcdir)/'`gstrealvideodec.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstrealvideodec.Tpo $(DEPDIR)/libgstreal_la-gstrealvideodec.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrealvideodec.c' object='libgstreal_la-gstrealvideodec.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtponvif_la-gstrtponvif.lo: gstrtponvif.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -MT libgstrtponvif_la-gstrtponvif.lo -MD -MP -MF $(DEPDIR)/libgstrtponvif_la-gstrtponvif.Tpo -c -o libgstrtponvif_la-gstrtponvif.lo `test -f 'gstrtponvif.c' || echo '$(srcdir)/'`gstrtponvif.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtponvif_la-gstrtponvif.Tpo $(DEPDIR)/libgstrtponvif_la-gstrtponvif.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtponvif.c' object='libgstrtponvif_la-gstrtponvif.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstrealvideodec.lo `test -f 'gstrealvideodec.c' || echo '$(srcdir)/'`gstrealvideodec.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -c -o libgstrtponvif_la-gstrtponvif.lo `test -f 'gstrtponvif.c' || echo '$(srcdir)/'`gstrtponvif.c
 
-libgstreal_la-gstrealaudiodec.lo: gstrealaudiodec.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstrealaudiodec.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstrealaudiodec.Tpo -c -o libgstreal_la-gstrealaudiodec.lo `test -f 'gstrealaudiodec.c' || echo '$(srcdir)/'`gstrealaudiodec.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstrealaudiodec.Tpo $(DEPDIR)/libgstreal_la-gstrealaudiodec.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrealaudiodec.c' object='libgstreal_la-gstrealaudiodec.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtponvif_la-gstrtponviftimestamp.lo: gstrtponviftimestamp.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -MT libgstrtponvif_la-gstrtponviftimestamp.lo -MD -MP -MF $(DEPDIR)/libgstrtponvif_la-gstrtponviftimestamp.Tpo -c -o libgstrtponvif_la-gstrtponviftimestamp.lo `test -f 'gstrtponviftimestamp.c' || echo '$(srcdir)/'`gstrtponviftimestamp.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtponvif_la-gstrtponviftimestamp.Tpo $(DEPDIR)/libgstrtponvif_la-gstrtponviftimestamp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtponviftimestamp.c' object='libgstrtponvif_la-gstrtponviftimestamp.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstrealaudiodec.lo `test -f 'gstrealaudiodec.c' || echo '$(srcdir)/'`gstrealaudiodec.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -c -o libgstrtponvif_la-gstrtponviftimestamp.lo `test -f 'gstrtponviftimestamp.c' || echo '$(srcdir)/'`gstrtponviftimestamp.c
 
-libgstreal_la-gstreal.lo: gstreal.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstreal.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstreal.Tpo -c -o libgstreal_la-gstreal.lo `test -f 'gstreal.c' || echo '$(srcdir)/'`gstreal.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstreal.Tpo $(DEPDIR)/libgstreal_la-gstreal.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstreal.c' object='libgstreal_la-gstreal.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtponvif_la-gstrtponvifparse.lo: gstrtponvifparse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -MT libgstrtponvif_la-gstrtponvifparse.lo -MD -MP -MF $(DEPDIR)/libgstrtponvif_la-gstrtponvifparse.Tpo -c -o libgstrtponvif_la-gstrtponvifparse.lo `test -f 'gstrtponvifparse.c' || echo '$(srcdir)/'`gstrtponvifparse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtponvif_la-gstrtponvifparse.Tpo $(DEPDIR)/libgstrtponvif_la-gstrtponvifparse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtponvifparse.c' object='libgstrtponvif_la-gstrtponvifparse.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstreal.lo `test -f 'gstreal.c' || echo '$(srcdir)/'`gstreal.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtponvif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtponvif_la_CFLAGS) $(CFLAGS) -c -o libgstrtponvif_la-gstrtponvifparse.lo `test -f 'gstrtponvifparse.c' || echo '$(srcdir)/'`gstrtponvifparse.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -965,7 +989,7 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES)
 installdirs:
 	for dir in "$(DESTDIR)$(plugindir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -1088,6 +1112,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/onvif/gstrtponvif.c b/gst/onvif/gstrtponvif.c
new file mode 100644
index 0000000..c674232
--- /dev/null
+++ b/gst/onvif/gstrtponvif.c
@@ -0,0 +1,48 @@
+/*
+ * gstrtponvif.c
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstrtponviftimestamp.h"
+#include "gstrtponvifparse.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  if (!gst_element_register (plugin, "rtponviftimestamp", GST_RANK_NONE,
+          GST_TYPE_RTP_ONVIF_TIMESTAMP))
+    return FALSE;
+  if (!gst_element_register (plugin, "rtponvifparse", GST_RANK_NONE,
+          GST_TYPE_RTP_ONVIF_PARSE))
+    return FALSE;
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    rtponvif,
+    "ONVIF Streaming features",
+    plugin_init, VERSION, GST_LICENSE_UNKNOWN, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
diff --git a/gst/onvif/gstrtponvifparse.c b/gst/onvif/gstrtponvifparse.c
new file mode 100644
index 0000000..f48ac07
--- /dev/null
+++ b/gst/onvif/gstrtponvifparse.c
@@ -0,0 +1,150 @@
+/*
+ * gstrtponviftimestamp-parse.c
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <gst/rtp/gstrtpbuffer.h>
+
+#include "gstrtponvifparse.h"
+
+static GstFlowReturn gst_rtp_onvif_parse_chain (GstPad * pad,
+    GstObject * parent, GstBuffer * buf);
+
+static GstStaticPadTemplate sink_template_factory =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+static GstStaticPadTemplate src_template_factory =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+G_DEFINE_TYPE (GstRtpOnvifParse, gst_rtp_onvif_parse, GST_TYPE_ELEMENT);
+
+static void
+gst_rtp_onvif_parse_class_init (GstRtpOnvifParseClass * klass)
+{
+  GstElementClass *gstelement_class;
+
+  gstelement_class = GST_ELEMENT_CLASS (klass);
+
+  /* register pads */
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&sink_template_factory));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template_factory));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "ONVIF NTP timestamps RTP extension", "Effect/RTP",
+      "Add absolute timestamps and flags of recorded data in a playback "
+      "session", "Guillaume Desmottes <guillaume.desmottes@collabora.com>");
+}
+
+static void
+gst_rtp_onvif_parse_init (GstRtpOnvifParse * self)
+{
+  self->sinkpad =
+      gst_pad_new_from_static_template (&sink_template_factory, "sink");
+  gst_pad_set_chain_function (self->sinkpad, gst_rtp_onvif_parse_chain);
+  gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
+  GST_PAD_SET_PROXY_CAPS (self->sinkpad);
+
+  self->srcpad =
+      gst_pad_new_from_static_template (&src_template_factory, "src");
+  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
+}
+
+#define EXTENSION_ID 0xABAC
+#define EXTENSION_SIZE 3
+
+static gboolean
+handle_buffer (GstRtpOnvifParse * self, GstBuffer * buf)
+{
+  GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
+  guint8 *data;
+  guint16 bits;
+  guint wordlen;
+  guint8 flags;
+  /*
+     guint64 timestamp;
+     guint8 cseq;
+   */
+
+  if (!gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp)) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED,
+        ("Failed to map RTP buffer"), (NULL));
+    return FALSE;
+  }
+
+  /* Check if the ONVIF RTP extension is present in the packet */
+  if (!gst_rtp_buffer_get_extension_data (&rtp, &bits, (gpointer) & data,
+          &wordlen))
+    goto out;
+
+  if (bits != EXTENSION_ID || wordlen != EXTENSION_SIZE)
+    goto out;
+
+  /* timestamp = GST_READ_UINT64_BE (data);  TODO */
+  flags = GST_READ_UINT8 (data + 8);
+  /* cseq = GST_READ_UINT8 (data + 9);  TODO */
+
+  /* C */
+  if (flags & (1 << 7))
+    GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+  else
+    GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+
+  /* E */
+  /* if (flags & (1 << 6));  TODO */
+
+  /* D */
+  if (flags & (1 << 5))
+    GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
+  else
+    GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT);
+
+out:
+  gst_rtp_buffer_unmap (&rtp);
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_rtp_onvif_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
+{
+  GstRtpOnvifParse *self = GST_RTP_ONVIF_PARSE (parent);
+
+  if (!handle_buffer (self, buf)) {
+    gst_buffer_unref (buf);
+    return GST_FLOW_ERROR;
+  }
+
+  return gst_pad_push (self->srcpad, buf);
+}
diff --git a/gst/onvif/gstrtponvifparse.h b/gst/onvif/gstrtponvifparse.h
new file mode 100644
index 0000000..437b1ab
--- /dev/null
+++ b/gst/onvif/gstrtponvifparse.h
@@ -0,0 +1,62 @@
+/*
+ * gstrtponviftimestamp-parse.h
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GST_RTP_ONVIF_PARSE_H__
+#define __GST_RTP_ONVIF_PARSE_H__
+
+
+#include <gst/gst.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define GST_TYPE_RTP_ONVIF_PARSE \
+  (gst_rtp_onvif_parse_get_type())
+#define GST_RTP_ONVIF_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_ONVIF_PARSE,GstRtpOnvifParse))
+#define GST_RTP_ONVIF_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_ONVIF_PARSE,GstRtpOnvifParseClass))
+#define GST_IS_RTP_ONVIF_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_ONVIF_PARSE))
+#define GST_IS_RTP_ONVIF_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_ONVIF_PARSE))
+
+typedef struct _GstRtpOnvifParse GstRtpOnvifParse;
+typedef struct _GstRtpOnvifParseClass GstRtpOnvifParseClass;
+
+struct _GstRtpOnvifParse {
+  GstElement element;
+
+  /* pads */
+  GstPad *sinkpad,*srcpad;
+};
+
+struct _GstRtpOnvifParseClass {
+  GstElementClass parent_class;
+};
+
+GType gst_rtp_onvif_parse_get_type(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __GST_RTP_ONVIF_PARSE_H__ */
diff --git a/gst/onvif/gstrtponviftimestamp.c b/gst/onvif/gstrtponviftimestamp.c
new file mode 100644
index 0000000..818c8af
--- /dev/null
+++ b/gst/onvif/gstrtponviftimestamp.c
@@ -0,0 +1,500 @@
+/*
+ * gstrtponviftimestamp.h
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <gst/rtp/gstrtpbuffer.h>
+
+#include "gstrtponviftimestamp.h"
+
+#define DEFAULT_NTP_OFFSET GST_CLOCK_TIME_NONE
+#define DEFAULT_CSEQ 0
+#define DEFAULT_SET_E_BIT FALSE
+
+GST_DEBUG_CATEGORY_STATIC (rtponviftimestamp_debug);
+#define GST_CAT_DEFAULT (rtponviftimestamp_debug)
+
+static GstFlowReturn gst_rtp_onvif_timestamp_chain (GstPad * pad,
+    GstObject * parent, GstBuffer * buf);
+static GstFlowReturn gst_rtp_onvif_timestamp_chain_list (GstPad * pad,
+    GstObject * parent, GstBufferList * list);
+
+static GstStaticPadTemplate sink_template_factory =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+static GstStaticPadTemplate src_template_factory =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+enum
+{
+  PROP_0,
+  PROP_NTP_OFFSET,
+  PROP_CSEQ,
+  PROP_SET_E_BIT,
+};
+
+/*static guint gst_rtp_onvif_timestamp_signals[LAST_SIGNAL] = { 0 }; */
+
+G_DEFINE_TYPE (GstRtpOnvifTimestamp, gst_rtp_onvif_timestamp, GST_TYPE_ELEMENT);
+
+static void
+gst_rtp_onvif_timestamp_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (object);
+
+  switch (prop_id) {
+    case PROP_NTP_OFFSET:
+      g_value_set_uint64 (value, self->prop_ntp_offset);
+      break;
+    case PROP_CSEQ:
+      g_value_set_uint (value, self->prop_cseq);
+      break;
+    case PROP_SET_E_BIT:
+      g_value_set_boolean (value, self->prop_set_e_bit);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_rtp_onvif_timestamp_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (object);
+
+  switch (prop_id) {
+    case PROP_NTP_OFFSET:
+      self->prop_ntp_offset = g_value_get_uint64 (value);
+      break;
+    case PROP_CSEQ:
+      self->prop_cseq = g_value_get_uint (value);
+      break;
+    case PROP_SET_E_BIT:
+      self->prop_set_e_bit = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static GstStateChangeReturn
+gst_rtp_onvif_timestamp_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (gst_rtp_onvif_timestamp_parent_class)->change_state
+      (element, transition);
+
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      if (GST_CLOCK_TIME_IS_VALID (self->prop_ntp_offset))
+        self->ntp_offset = self->prop_ntp_offset;
+      else
+        self->ntp_offset = GST_CLOCK_TIME_NONE;
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+      if (!GST_CLOCK_TIME_IS_VALID (self->prop_ntp_offset) &&
+          GST_ELEMENT_CLOCK (element) == NULL) {
+        GST_ELEMENT_ERROR (element, CORE, CLOCK, ("Missing NTP offset"),
+            ("Set the \"ntp-offset\" property to,"
+                " can't guess it without a clock on the pipeline."));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_rtp_onvif_timestamp_finalize (GObject * object)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (object);
+
+  if (self->buffer)
+    gst_buffer_unref (self->buffer);
+  if (self->list)
+    gst_buffer_list_unref (self->list);
+
+  G_OBJECT_CLASS (gst_rtp_onvif_timestamp_parent_class)->finalize (object);
+}
+
+static void
+gst_rtp_onvif_timestamp_class_init (GstRtpOnvifTimestampClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+
+  gobject_class = G_OBJECT_CLASS (klass);
+  gstelement_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->get_property = gst_rtp_onvif_timestamp_get_property;
+  gobject_class->set_property = gst_rtp_onvif_timestamp_set_property;
+  gobject_class->finalize = gst_rtp_onvif_timestamp_finalize;
+
+  g_object_class_install_property (gobject_class, PROP_NTP_OFFSET,
+      g_param_spec_uint64 ("ntp-offset", "NTP offset",
+          "Offset between the pipeline running time and the absolute UTC time, "
+          "in nano-seconds since 1900 (-1 for automatic computation)",
+          0, G_MAXUINT64,
+          DEFAULT_NTP_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_CSEQ,
+      g_param_spec_uint ("cseq", "CSeq",
+          "The RTSP CSeq which initiated the playback",
+          0, G_MAXUINT32,
+          DEFAULT_CSEQ, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_SET_E_BIT,
+      g_param_spec_boolean ("set-e-bit", "Set 'E' bit",
+          "If the element should set the 'E' bit as defined in the ONVIF RTP "
+          "extension. This increases latency by one packet",
+          DEFAULT_SET_E_BIT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* register pads */
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&sink_template_factory));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template_factory));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "ONVIF NTP timestamps RTP extension", "Effect/RTP",
+      "Add absolute timestamps and flags of recorded data in a playback "
+      "session", "Guillaume Desmottes <guillaume.desmottes@collabora.com>");
+
+  gstelement_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_rtp_onvif_timestamp_change_state);
+
+  GST_DEBUG_CATEGORY_INIT (rtponviftimestamp_debug, "rtponviftimestamp",
+      0, "ONVIF NTP timestamps RTP extension");
+}
+
+static GstFlowReturn handle_and_push_buffer (GstRtpOnvifTimestamp * self,
+    GstBuffer * buf, gboolean end_contiguous);
+static GstFlowReturn handle_and_push_buffer_list (GstRtpOnvifTimestamp * self,
+    GstBufferList * list, gboolean end_contiguous);
+
+static gboolean
+gst_rtp_onvif_timestamp_sink_event (GstPad * pad, GstObject * parent,
+    GstEvent * event)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (parent);
+
+  GST_DEBUG_OBJECT (pad, "handling event %s", GST_EVENT_TYPE_NAME (event));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_SEGMENT:
+      gst_event_copy_segment (event, &self->segment);
+      break;
+    case GST_EVENT_FLUSH_STOP:
+      gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
+      break;
+    case GST_EVENT_EOS:
+      /* Push pending buffers, if any */
+      if (self->buffer) {
+        handle_and_push_buffer (self, self->buffer, TRUE);
+        self->buffer = NULL;
+      }
+      if (self->list) {
+        handle_and_push_buffer_list (self, self->list, TRUE);
+        self->list = NULL;
+      }
+      break;
+    default:
+      break;
+  }
+
+  return gst_pad_event_default (pad, parent, event);
+}
+
+static void
+gst_rtp_onvif_timestamp_init (GstRtpOnvifTimestamp * self)
+{
+  self->sinkpad =
+      gst_pad_new_from_static_template (&sink_template_factory, "sink");
+  gst_pad_set_chain_function (self->sinkpad, gst_rtp_onvif_timestamp_chain);
+  gst_pad_set_chain_list_function (self->sinkpad,
+      gst_rtp_onvif_timestamp_chain_list);
+  gst_pad_set_event_function (self->sinkpad,
+      gst_rtp_onvif_timestamp_sink_event);
+  gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
+  GST_PAD_SET_PROXY_CAPS (self->sinkpad);
+  GST_PAD_SET_PROXY_ALLOCATION (self->sinkpad);
+
+  self->srcpad =
+      gst_pad_new_from_static_template (&src_template_factory, "src");
+  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
+
+  self->prop_ntp_offset = DEFAULT_NTP_OFFSET;
+  self->prop_set_e_bit = DEFAULT_SET_E_BIT;
+
+  self->buffer = NULL;
+  self->list = NULL;
+
+  gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
+}
+
+#define EXTENSION_ID 0xABAC
+#define EXTENSION_SIZE 3
+
+static gboolean
+handle_buffer (GstRtpOnvifTimestamp * self, GstBuffer * buf,
+    gboolean end_contiguous)
+{
+  GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
+  guint8 *data;
+  guint16 bits;
+  guint wordlen;
+  guint64 time;
+  guint8 field = 0;
+
+  if (!GST_CLOCK_TIME_IS_VALID (self->ntp_offset)) {
+    GstClock *clock = gst_element_get_clock (GST_ELEMENT (self));
+
+    if (clock) {
+      GstClockTime clock_time = gst_clock_get_time (clock);
+      guint64 real_time = g_get_real_time ();
+      GstClockTime running_time = clock_time -
+          gst_element_get_base_time (GST_ELEMENT (self));
+
+      /* convert microseconds to nanoseconds */
+      real_time *= 1000;
+
+      /* add constant to convert from 1970 based time to 1900 based time */
+      real_time += (G_GUINT64_CONSTANT (2208988800) * GST_SECOND);
+
+      self->ntp_offset = real_time - running_time;
+
+      gst_object_unref (clock);
+    } else {
+      /* Received a buffer in PAUSED, so we can't guess the match
+       * between the running time and the NTP clock yet.
+       */
+      return TRUE;
+    }
+  }
+
+  if (self->segment.format != GST_FORMAT_TIME) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED,
+        ("did not receive a time segment yet"), (NULL));
+    return FALSE;
+  }
+
+  if (!gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp)) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED,
+        ("Failed to map RTP buffer"), (NULL));
+    return FALSE;
+  }
+
+  if (!gst_rtp_buffer_set_extension_data (&rtp, EXTENSION_ID, EXTENSION_SIZE)) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED, ("Failed to set extension data"),
+        (NULL));
+    gst_rtp_buffer_unmap (&rtp);
+    return FALSE;
+  }
+
+  if (!gst_rtp_buffer_get_extension_data (&rtp, &bits, (gpointer) & data,
+          &wordlen)) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED, ("Failed to get extension data"),
+        (NULL));
+    gst_rtp_buffer_unmap (&rtp);
+    return FALSE;
+  }
+
+  /* NTP timestamp */
+  if (GST_BUFFER_DTS_IS_VALID (buf)) {
+    time = gst_segment_to_running_time (&self->segment, GST_FORMAT_TIME,
+        GST_BUFFER_DTS (buf));
+  } else if (GST_BUFFER_PTS_IS_VALID (buf)) {
+    time = gst_segment_to_running_time (&self->segment, GST_FORMAT_TIME,
+        GST_BUFFER_PTS (buf));
+  } else {
+    GST_ERROR_OBJECT (self,
+        "Buffer doesn't contain any valid DTS or PTS timestamp");
+    goto done;
+  }
+
+  if (time == GST_CLOCK_TIME_NONE) {
+    GST_ERROR_OBJECT (self, "Failed to get running time");
+    goto done;
+  }
+
+  /* add the offset (in seconds) */
+  time += self->ntp_offset;
+
+  /* convert to NTP time. upper 32 bits should contain the seconds
+   * and the lower 32 bits, the fractions of a second. */
+  time = gst_util_uint64_scale (time, (G_GINT64_CONSTANT (1) << 32),
+      GST_SECOND);
+
+  GST_DEBUG_OBJECT (self, "timestamp: %" G_GUINT64_FORMAT, time);
+
+  GST_WRITE_UINT64_BE (data, time);
+
+  /* The next byte is composed of: C E D mbz (5 bits) */
+
+  /* Set C if the buffer does *not* have the DELTA_UNIT flag as it means
+   * that's a key frame (or 'clean point'). */
+  if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
+    GST_DEBUG_OBJECT (self, "set C flag");
+    field |= (1 << 7);
+  }
+
+  /* Set E if the next buffer has DISCONT */
+  if (end_contiguous) {
+    GST_DEBUG_OBJECT (self, "set E flag");
+    field |= (1 << 6);
+  }
+
+  /* Set D if the buffer has the DISCONT flag */
+  if (GST_BUFFER_IS_DISCONT (buf)) {
+    GST_DEBUG_OBJECT (self, "set D flag");
+    field |= (1 << 5);
+  }
+
+  GST_WRITE_UINT8 (data + 8, field);
+
+  /* CSeq (low-order byte) */
+  GST_WRITE_UINT8 (data + 9, (guchar) self->prop_cseq);
+
+  memset (data + 10, 0, 3);
+
+done:
+  gst_rtp_buffer_unmap (&rtp);
+  return TRUE;
+}
+
+/* @buf: (transfer all) */
+static GstFlowReturn
+handle_and_push_buffer (GstRtpOnvifTimestamp * self, GstBuffer * buf,
+    gboolean end_contiguous)
+{
+  if (!handle_buffer (self, buf, end_contiguous)) {
+    gst_buffer_unref (buf);
+    return GST_FLOW_ERROR;
+  }
+
+  return gst_pad_push (self->srcpad, buf);
+}
+
+static GstFlowReturn
+gst_rtp_onvif_timestamp_chain (GstPad * pad, GstObject * parent,
+    GstBuffer * buf)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (parent);
+  GstFlowReturn result = GST_FLOW_OK;
+
+  if (!self->prop_set_e_bit) {
+    /* Modify and push this buffer right away */
+    return handle_and_push_buffer (self, buf, FALSE);
+  }
+
+  /* We have to wait for the *next* buffer before pushing this one */
+
+  if (self->buffer) {
+    /* push the *previous* buffer received */
+    result = handle_and_push_buffer (self, self->buffer,
+        GST_BUFFER_IS_DISCONT (buf));
+  }
+
+  /* Transfer ownership */
+  self->buffer = buf;
+  return result;
+}
+
+/* @buf: (transfer all) */
+static GstFlowReturn
+handle_and_push_buffer_list (GstRtpOnvifTimestamp * self,
+    GstBufferList * list, gboolean end_contiguous)
+{
+  GstBuffer *buf;
+
+  /* Set the extension on the *first* buffer */
+  buf = gst_buffer_list_get (list, 0);
+  if (!handle_buffer (self, buf, end_contiguous)) {
+    gst_buffer_list_unref (list);
+    return GST_FLOW_ERROR;
+  }
+
+  return gst_pad_push_list (self->srcpad, list);
+}
+
+/* gst_pad_chain_list_default() refs the buffer when passing it to the chain
+ * function, making it not writable. We implement our own chain_list function
+ * to avoid having to copy each buffer. */
+static GstFlowReturn
+gst_rtp_onvif_timestamp_chain_list (GstPad * pad, GstObject * parent,
+    GstBufferList * list)
+{
+  GstRtpOnvifTimestamp *self = GST_RTP_ONVIF_TIMESTAMP (parent);
+  GstFlowReturn result = GST_FLOW_OK;
+  GstBuffer *buf;
+
+  if (!self->prop_set_e_bit) {
+    return handle_and_push_buffer_list (self, list, FALSE);
+  }
+
+  /* We have to wait for the *next* list before pushing this one */
+
+  if (self->list) {
+    /* push the *previous* list received */
+    buf = gst_buffer_list_get (list, 0);
+
+    result = handle_and_push_buffer_list (self, self->list,
+        GST_BUFFER_IS_DISCONT (buf));
+  }
+
+  /* Transfer ownership */
+  self->list = list;
+  return result;
+}
diff --git a/gst/onvif/gstrtponviftimestamp.h b/gst/onvif/gstrtponviftimestamp.h
new file mode 100644
index 0000000..40ad8d3
--- /dev/null
+++ b/gst/onvif/gstrtponviftimestamp.h
@@ -0,0 +1,74 @@
+/*
+ * gstrtponviftimestamp.h
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GST_RTP_ONVIF_TIMESTAMP_H__
+#define __GST_RTP_ONVIF_TIMESTAMP_H__
+
+
+#include <gst/gst.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define GST_TYPE_RTP_ONVIF_TIMESTAMP \
+  (gst_rtp_onvif_timestamp_get_type())
+#define GST_RTP_ONVIF_TIMESTAMP(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_ONVIF_TIMESTAMP,GstRtpOnvifTimestamp))
+#define GST_RTP_ONVIF_TIMESTAMP_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_ONVIF_TIMESTAMP,GstRtpOnvifTimestampClass))
+#define GST_IS_RTP_ONVIF_TIMESTAMP(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_ONVIF_TIMESTAMP))
+#define GST_IS_RTP_ONVIF_TIMESTAMP_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_ONVIF_TIMESTAMP))
+
+typedef struct _GstRtpOnvifTimestamp GstRtpOnvifTimestamp;
+typedef struct _GstRtpOnvifTimestampClass GstRtpOnvifTimestampClass;
+
+struct _GstRtpOnvifTimestamp {
+  GstElement element;
+
+  /* pads */
+  GstPad *sinkpad,*srcpad;
+
+  GstClockTime prop_ntp_offset;
+  guint prop_cseq;
+  gboolean prop_set_e_bit;
+
+  GstClockTime ntp_offset;
+
+  GstSegment segment;
+  gboolean received_segment;
+  /* Buffer waiting to be handled, only used if prop_set_e_bit is TRUE */
+  GstBuffer *buffer;
+  GstBufferList *list;
+};
+
+struct _GstRtpOnvifTimestampClass {
+  GstElementClass parent_class;
+};
+
+GType gst_rtp_onvif_timestamp_get_type(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __GST_RTP_ONVIF_TIMESTAMP_H__ */
diff --git a/gst/patchdetect/Makefile.am b/gst/patchdetect/Makefile.am
index 44ba88c..5ddef3f 100644
--- a/gst/patchdetect/Makefile.am
+++ b/gst/patchdetect/Makefile.am
@@ -17,17 +17,3 @@
 libgstpatchdetect_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstpatchdetect.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpatchdetect -:SHARED libgstpatchdetect \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpatchdetect_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpatchdetect_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpatchdetect_la_LDFLAGS) \
-	           $(libgstpatchdetect_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/patchdetect/Makefile.in b/gst/patchdetect/Makefile.in
index 6d0d941..a814512 100644
--- a/gst/patchdetect/Makefile.in
+++ b/gst/patchdetect/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/patchdetect
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -761,7 +796,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/patchdetect/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/patchdetect/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1070,20 +1104,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpatchdetect -:SHARED libgstpatchdetect \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpatchdetect_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpatchdetect_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpatchdetect_la_LDFLAGS) \
-	           $(libgstpatchdetect_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/patchdetect/gstpatchdetect.c b/gst/patchdetect/gstpatchdetect.c
index 783ae0b..06a6396 100644
--- a/gst/patchdetect/gstpatchdetect.c
+++ b/gst/patchdetect/gstpatchdetect.c
@@ -299,7 +299,7 @@
   gboolean valid;
 } Patch;
 
-static Color patch_colors[24] = {
+static const Color patch_colors[24] = {
   {115, 82, 68, 92, 119, 143},
   {194, 150, 130, 152, 115, 148},
   {98, 122, 157, 119, 146, 116},
diff --git a/gst/pcapparse/Makefile.am b/gst/pcapparse/Makefile.am
index 0a2a4f8..0e4c078 100644
--- a/gst/pcapparse/Makefile.am
+++ b/gst/pcapparse/Makefile.am
@@ -10,17 +10,3 @@
 libgstpcapparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(WINSOCK2_LIBS)
 libgstpcapparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstpcapparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpcapparse -:SHARED libgstpcapparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpcapparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpcapparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpcapparse_la_LDFLAGS) \
-	           $(libgstpcapparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/pcapparse/Makefile.in b/gst/pcapparse/Makefile.in
index 5b347fe..df144f9 100644
--- a/gst/pcapparse/Makefile.in
+++ b/gst/pcapparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/pcapparse
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/pcapparse/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/pcapparse/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1078,20 +1112,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpcapparse -:SHARED libgstpcapparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpcapparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpcapparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpcapparse_la_LDFLAGS) \
-	           $(libgstpcapparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/pcapparse/gstirtspparse.c b/gst/pcapparse/gstirtspparse.c
index 3c58bfd..8f5f6f6 100644
--- a/gst/pcapparse/gstirtspparse.c
+++ b/gst/pcapparse/gstirtspparse.c
@@ -163,7 +163,6 @@
   GstByteReader reader;
   gint off;
   GstMapInfo map;
-  gboolean ret = FALSE;
   guint framesize;
 
   gst_buffer_map (buf, &map, GST_MAP_READ);
@@ -191,7 +190,6 @@
 
   framesize = GST_READ_UINT16_BE (map.data + 2) + 4;
   GST_LOG_OBJECT (parse, "got frame size %d", framesize);
-  ret = TRUE;
 
   if (!gst_pad_has_current_caps (GST_BASE_PARSE_SRC_PAD (parse))) {
     GstCaps *caps;
@@ -201,10 +199,8 @@
     gst_caps_unref (caps);
   }
 
-exit:
-  gst_buffer_unmap (buf, &map);
-
-  if (ret && framesize <= map.size) {
+  if (framesize <= map.size) {
+    gst_buffer_unmap (buf, &map);
     /* HACK HACK skip header.
      * could also ask baseparse to skip this,
      * but that would give us a discontinuity for free
@@ -215,6 +211,8 @@
     return gst_base_parse_finish_frame (parse, frame, framesize);
   }
 
+exit:
+  gst_buffer_unmap (buf, &map);
   return GST_FLOW_OK;
 }
 
diff --git a/gst/pcapparse/gstpcapparse.c b/gst/pcapparse/gstpcapparse.c
index 069d759..485ec43 100644
--- a/gst/pcapparse/gstpcapparse.c
+++ b/gst/pcapparse/gstpcapparse.c
@@ -36,7 +36,6 @@
  */
 
 /* TODO:
- * - React on state-change and update state accordingly.
  * - Implement support for timestamping the buffers.
  */
 
@@ -64,8 +63,7 @@
   PROP_SRC_PORT,
   PROP_DST_PORT,
   PROP_CAPS,
-  PROP_TS_OFFSET,
-  PROP_LAST
+  PROP_TS_OFFSET
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_pcap_parse_debug);
@@ -86,6 +84,8 @@
     GValue * value, GParamSpec * pspec);
 static void gst_pcap_parse_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
+static GstStateChangeReturn
+gst_pcap_parse_change_state (GstElement * element, GstStateChange transition);
 
 static void gst_pcap_parse_reset (GstPcapParse * self);
 
@@ -94,6 +94,7 @@
 static gboolean gst_pcap_sink_event (GstPad * pad,
     GstObject * parent, GstEvent * event);
 
+
 #define parent_class gst_pcap_parse_parent_class
 G_DEFINE_TYPE (GstPcapParse, gst_pcap_parse, GST_TYPE_ELEMENT);
 
@@ -142,6 +143,8 @@
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&src_template));
 
+  element_class->change_state = gst_pcap_parse_change_state;
+
   gst_element_class_set_static_metadata (element_class, "PCapParse",
       "Raw/Parser",
       "Parses a raw pcap stream",
@@ -309,7 +312,6 @@
   self->initialized = FALSE;
   self->swap_endian = FALSE;
   self->cur_packet_size = -1;
-  self->buffer_offset = 0;
   self->cur_ts = GST_CLOCK_TIME_NONE;
   self->base_ts = GST_CLOCK_TIME_NONE;
   self->newsegment_sent = FALSE;
@@ -360,20 +362,28 @@
   guint16 len;
 
   switch (self->linktype) {
-    case DLT_ETHER:
+    case LINKTYPE_ETHER:
       if (buf_size < ETH_HEADER_LEN + IP_HEADER_MIN_LEN + UDP_HEADER_LEN)
         return FALSE;
 
       eth_type = GUINT16_FROM_BE (*((guint16 *) (buf + 12)));
       buf_ip = buf + ETH_HEADER_LEN;
       break;
-    case DLT_SLL:
+    case LINKTYPE_SLL:
       if (buf_size < SLL_HEADER_LEN + IP_HEADER_MIN_LEN + UDP_HEADER_LEN)
         return FALSE;
 
       eth_type = GUINT16_FROM_BE (*((guint16 *) (buf + 14)));
       buf_ip = buf + SLL_HEADER_LEN;
       break;
+    case LINKTYPE_RAW:
+      if (buf_size < IP_HEADER_MIN_LEN + UDP_HEADER_LEN)
+        return FALSE;
+
+      eth_type = 0x800;         /* This is fine since IPv4/IPv6 is parse elsewhere */
+      buf_ip = buf;
+      break;
+
     default:
       return FALSE;
   }
@@ -445,6 +455,7 @@
 {
   GstPcapParse *self = GST_PCAP_PARSE (parent);
   GstFlowReturn ret = GST_FLOW_OK;
+  GstBufferList *list = NULL;
 
   gst_adapter_push (self->adapter, buffer);
 
@@ -471,46 +482,36 @@
           if (gst_pcap_parse_scan_frame (self, data, self->cur_packet_size,
                   &payload_data, &payload_size)) {
             GstBuffer *out_buf;
-            GstMapInfo map;
+            guintptr offset = payload_data - data;
 
-            out_buf = gst_buffer_new_and_alloc (payload_size);
-            if (out_buf) {
+            gst_adapter_unmap (self->adapter);
+            gst_adapter_flush (self->adapter, offset);
+            /* we don't use _take_buffer_fast() on purpose here, we need a
+             * buffer with a single memory, since the RTP depayloaders expect
+             * the complete RTP header to be in the first memory if there are
+             * multiple ones and we can't guarantee that with _fast() */
+            out_buf = gst_adapter_take_buffer (self->adapter, payload_size);
+            gst_adapter_flush (self->adapter,
+                self->cur_packet_size - offset - payload_size);
 
-              if (GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
-                if (!GST_CLOCK_TIME_IS_VALID (self->base_ts))
-                  self->base_ts = self->cur_ts;
-                if (self->offset >= 0) {
-                  self->cur_ts -= self->base_ts;
-                  self->cur_ts += self->offset;
-                }
+            if (GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
+              if (!GST_CLOCK_TIME_IS_VALID (self->base_ts))
+                self->base_ts = self->cur_ts;
+              if (self->offset >= 0) {
+                self->cur_ts -= self->base_ts;
+                self->cur_ts += self->offset;
               }
-
-              gst_buffer_map (out_buf, &map, GST_MAP_WRITE);
-              memcpy (map.data, payload_data, payload_size);
-              gst_buffer_unmap (out_buf, &map);
-              GST_BUFFER_TIMESTAMP (out_buf) = self->cur_ts;
-
-              if (!self->newsegment_sent &&
-                  GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
-                GstSegment segment;
-
-                if (self->caps)
-                  gst_pad_set_caps (self->src_pad, self->caps);
-                gst_segment_init (&segment, GST_FORMAT_TIME);
-                segment.start = self->cur_ts;
-                gst_pad_push_event (self->src_pad,
-                    gst_event_new_segment (&segment));
-                self->newsegment_sent = TRUE;
-              }
-
-              ret = gst_pad_push (self->src_pad, out_buf);
-
-              self->buffer_offset += payload_size;
             }
-          }
+            GST_BUFFER_TIMESTAMP (out_buf) = self->cur_ts;
 
-          gst_adapter_unmap (self->adapter);
-          gst_adapter_flush (self->adapter, self->cur_packet_size);
+
+            if (list == NULL)
+              list = gst_buffer_list_new ();
+            gst_buffer_list_add (list, out_buf);
+          } else {
+            gst_adapter_unmap (self->adapter);
+            gst_adapter_flush (self->adapter, self->cur_packet_size);
+          }
         }
 
         self->cur_packet_size = -1;
@@ -569,10 +570,11 @@
         goto out;
       }
 
-      if (linktype != DLT_ETHER && linktype != DLT_SLL) {
+      if (linktype != LINKTYPE_ETHER && linktype != LINKTYPE_SLL &&
+          linktype != LINKTYPE_RAW) {
         GST_ELEMENT_ERROR (self, STREAM, WRONG_TYPE, (NULL),
-            ("Only dumps of type Ethernet or Linux Coooked (SLL) understood,"
-                " type %d unknown", linktype));
+            ("Only dumps of type Ethernet, raw IP or Linux Cooked (SLL) "
+                "understood; type %d unknown", linktype));
         ret = GST_FLOW_ERROR;
         goto out;
       }
@@ -585,9 +587,26 @@
     }
   }
 
+  if (list) {
+    if (!self->newsegment_sent && GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
+      GstSegment segment;
+
+      if (self->caps)
+        gst_pad_set_caps (self->src_pad, self->caps);
+      gst_segment_init (&segment, GST_FORMAT_TIME);
+      segment.start = self->base_ts;
+      gst_pad_push_event (self->src_pad, gst_event_new_segment (&segment));
+      self->newsegment_sent = TRUE;
+    }
+
+    ret = gst_pad_push_list (self->src_pad, list);
+    list = NULL;
+  }
+
 out:
-  if (ret != GST_FLOW_OK)
-    gst_pcap_parse_reset (self);
+
+  if (list)
+    gst_buffer_list_unref (list);
 
   return ret;
 }
@@ -603,6 +622,9 @@
       /* Drop it, we'll replace it with our own */
       gst_event_unref (event);
       break;
+    case GST_EVENT_FLUSH_STOP:
+      gst_pcap_parse_reset (self);
+      break;
     default:
       ret = gst_pad_push_event (self->src_pad, event);
       break;
@@ -610,3 +632,23 @@
 
   return ret;
 }
+
+static GstStateChangeReturn
+gst_pcap_parse_change_state (GstElement * element, GstStateChange transition)
+{
+  GstPcapParse *self = GST_PCAP_PARSE (element);
+  GstStateChangeReturn ret;
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_pcap_parse_reset (self);
+      break;
+    default:
+      break;
+  }
+
+
+  return ret;
+}
diff --git a/gst/pcapparse/gstpcapparse.h b/gst/pcapparse/gstpcapparse.h
index ef90ea2..02ed95f 100644
--- a/gst/pcapparse/gstpcapparse.h
+++ b/gst/pcapparse/gstpcapparse.h
@@ -47,8 +47,9 @@
 
 typedef enum
 {
-  DLT_ETHER  = 1,
-  DLT_SLL = 113
+  LINKTYPE_ETHER  = 1,
+  LINKTYPE_RAW = 101,
+  LINKTYPE_SLL = 113
 } GstPcapParseLinktype;
 
 /**
@@ -83,8 +84,6 @@
   GstPcapParseLinktype linktype;
 
   gboolean newsegment_sent;
-
-  gint64 buffer_offset;
 };
 
 struct _GstPcapParseClass
diff --git a/gst/pnm/Makefile.am b/gst/pnm/Makefile.am
index e6c397b..2f242f9 100644
--- a/gst/pnm/Makefile.am
+++ b/gst/pnm/Makefile.am
@@ -7,17 +7,3 @@
 libgstpnm_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstpnmdec.h gstpnmutils.h gstpnmenc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpnm -:SHARED libgstpnm \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpnm_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpnm_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpnm_la_LDFLAGS) \
-	           $(libgstpnm_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/pnm/Makefile.in b/gst/pnm/Makefile.in
index eb4014d..ae1d0e4 100644
--- a/gst/pnm/Makefile.in
+++ b/gst/pnm/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/pnm
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/pnm/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/pnm/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1082,20 +1116,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstpnm -:SHARED libgstpnm \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpnm_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpnm_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpnm_la_LDFLAGS) \
-	           $(libgstpnm_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c
index 9c1c2cf..6963e5e 100644
--- a/gst/pnm/gstpnmdec.c
+++ b/gst/pnm/gstpnmdec.c
@@ -108,6 +108,10 @@
   /* Initialize decoder */
   s->buf = NULL;
   gst_pnmdec_flush (s);
+
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (s), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (s));
 }
 
 static GstFlowReturn
@@ -193,7 +197,7 @@
   guint i_rowstride;
   guint o_rowstride;
   GstFlowReturn r = GST_FLOW_OK;
-  gint bytes, i;
+  gint bytes, i, total_bytes = 0;
 
   r = gst_video_decoder_allocate_output_frame (decoder, frame);
   if (r != GST_FLOW_OK) {
@@ -224,6 +228,7 @@
       omap.data[i * 8 + 6] = (imap.data[i] & 0x02) ? 0 : 255;
       omap.data[i * 8 + 7] = (imap.data[i] & 0x01) ? 0 : 255;
     }
+    total_bytes = bytes * 8;
   } else
     /* Need to convert from PNM rowstride to GStreamer rowstride */
   if (s->mngr.info.width % 4 != 0) {
@@ -238,8 +243,26 @@
     for (i = 0; i < s->mngr.info.height; i++)
       memcpy (omap.data + i * o_rowstride, imap.data + i * i_rowstride,
           i_rowstride);
+    total_bytes = o_rowstride * s->mngr.info.height;
   } else {
     memcpy (omap.data, imap.data, s->size);
+    total_bytes = s->size;
+  }
+
+  if (s->mngr.info.type != GST_PNM_TYPE_BITMAP) {
+    /* Convert the pixels from 0 - max range to 0 - 255 range */
+    if (s->mngr.info.max < 255) {
+      gint max = s->mngr.info.max;
+      for (i = 0; i < total_bytes; i++) {
+        if (omap.data[i] <= max) {
+          omap.data[i] = 255 * omap.data[i] / max;
+        } else {
+          /* This is an error case, wherein value in the data stream is
+             more than max. Clamp such values to 255 */
+          omap.data[i] = 255;
+        }
+      }
+    }
   }
 
   if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c
index dc09c6f..8a0461c 100644
--- a/gst/pnm/gstpnmenc.c
+++ b/gst/pnm/gstpnmenc.c
@@ -32,10 +32,6 @@
  * </refsect2>
  */
 
-/*
- * FIXME: Port to GstVideoEncoder
- */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -45,6 +41,8 @@
 
 #include <gst/gstutils.h>
 #include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
+#include <stdio.h>
 
 #include <string.h>
 
@@ -65,7 +63,13 @@
 GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
     GST_STATIC_CAPS (MIME_ALL));
 
-G_DEFINE_TYPE (GstPnmenc, gst_pnmenc, GST_TYPE_ELEMENT);
+G_DEFINE_TYPE (GstPnmenc, gst_pnmenc, GST_TYPE_VIDEO_ENCODER);
+#define parent_class gst_pnmenc_parent_class
+
+static GstFlowReturn
+gst_pnmenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame);
+
+static void gst_pnmenc_finalize (GObject * object);
 
 static void
 gst_pnmenc_set_property (GObject * object, guint prop_id, const GValue * value,
@@ -75,10 +79,11 @@
 
   switch (prop_id) {
     case GST_PNMENC_PROP_ASCII:
-      if (g_value_get_boolean (value))
+      if (g_value_get_boolean (value)) {
         s->info.encoding = GST_PNM_ENCODING_ASCII;
-      else
+      } else {
         s->info.encoding = GST_PNM_ENCODING_RAW;
+      }
       s->info.fields |= GST_PNM_INFO_FIELDS_ENCODING;
       break;
     default:
@@ -103,161 +108,183 @@
   }
 }
 
-static GstFlowReturn
-gst_pnmenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-{
-  GstPnmenc *s = GST_PNMENC (parent);
-  GstFlowReturn r;
-  gchar *header;
-  GstBuffer *out;
-
-  if (s->info.width == 0 || s->info.height == 0 || s->info.fields == 0)
-    goto not_negotiated;
-
-  /* Assumption: One buffer, one image. That is, always first write header. */
-  header = g_strdup_printf ("P%i\n%i %i\n%i\n",
-      s->info.type + 3 * (1 - s->info.encoding), s->info.width, s->info.height,
-      s->info.max);
-  out = gst_buffer_new_wrapped (header, strlen (header));
-  if ((r = gst_pad_push (s->src, out)) != GST_FLOW_OK)
-    goto out;
-
-  /* Need to convert from GStreamer rowstride to PNM rowstride */
-  if (s->info.width % 4 != 0) {
-    guint i_rowstride;
-    guint o_rowstride;
-    GstBuffer *obuf;
-    guint i;
-    GstMapInfo imap, omap;
-
-    if (s->info.type == GST_PNM_TYPE_PIXMAP) {
-      o_rowstride = 3 * s->info.width;
-      i_rowstride = GST_ROUND_UP_4 (o_rowstride);
-    } else {
-      o_rowstride = s->info.width;
-      i_rowstride = GST_ROUND_UP_4 (o_rowstride);
-    }
-
-    obuf = gst_buffer_new_and_alloc (o_rowstride * s->info.height);
-    gst_buffer_map (obuf, &omap, GST_MAP_WRITE);
-    gst_buffer_map (buf, &imap, GST_MAP_READ);
-    for (i = 0; i < s->info.height; i++)
-      memcpy (omap.data + o_rowstride * i, imap.data + i_rowstride * i,
-          o_rowstride);
-    gst_buffer_unmap (buf, &imap);
-    gst_buffer_unmap (obuf, &omap);
-    gst_buffer_unref (buf);
-    buf = obuf;
-  } else {
-    /* Pass through the data. */
-    buf = gst_buffer_make_writable (buf);
-  }
-
-  /* We might need to convert to ASCII... */
-  if (s->info.encoding == GST_PNM_ENCODING_ASCII) {
-    GstBuffer *obuf;
-    guint i, o;
-    GstMapInfo imap, omap;
-
-    gst_buffer_map (buf, &imap, GST_MAP_READ);
-    obuf = gst_buffer_new_and_alloc (imap.size * (4 + 1 / 20.));
-    gst_buffer_map (obuf, &omap, GST_MAP_WRITE);
-    for (i = o = 0; i < imap.size; i++) {
-      g_snprintf ((char *) omap.data + o, 4, "%3i", imap.data[i]);
-      o += 3;
-      omap.data[o++] = ' ';
-      if (!((i + 1) % 20))
-        omap.data[o++] = '\n';
-    }
-    gst_buffer_unmap (buf, &imap);
-    gst_buffer_unmap (obuf, &omap);
-    gst_buffer_unref (buf);
-    buf = obuf;
-  }
-
-  r = gst_pad_push (s->src, buf);
-
-out:
-
-  return r;
-
-not_negotiated:
-  {
-    gst_buffer_unref (buf);
-    return GST_FLOW_NOT_NEGOTIATED;
-  }
-}
-
-static gboolean
-gst_pnmenc_setcaps (GstPnmenc * s, GstCaps * caps)
-{
-  gboolean r;
-  GstCaps *srccaps;
-
-  s->info.max = 255;
-  s->info.fields = GST_PNM_INFO_FIELDS_MAX;
-
-  if (!gst_video_info_from_caps (&s->vinfo, caps))
-    return FALSE;
-
-  if (GST_VIDEO_INFO_IS_RGB (&s->vinfo)) {
-    s->info.type = GST_PNM_TYPE_PIXMAP;
-    srccaps = gst_caps_from_string (MIME_PM);
-  } else if (GST_VIDEO_INFO_IS_GRAY (&s->vinfo)) {
-    s->info.type = GST_PNM_TYPE_GRAYMAP;
-    srccaps = gst_caps_from_string (MIME_GM);
-  } else {
-    return FALSE;
-  }
-  r = gst_pad_set_caps (s->src, srccaps);
-  gst_caps_unref (srccaps);
-  s->info.fields |= GST_PNM_INFO_FIELDS_TYPE;
-
-  /* Remember width and height of the input data. */
-  s->info.width = GST_VIDEO_INFO_WIDTH (&s->vinfo);
-  s->info.height = GST_VIDEO_INFO_HEIGHT (&s->vinfo);
-  s->info.fields |= GST_PNM_INFO_FIELDS_WIDTH | GST_PNM_INFO_FIELDS_HEIGHT;
-
-  return r;
-}
-
-static gboolean
-gst_pnmenc_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstPnmenc *s = GST_PNMENC (parent);
-  gboolean r = FALSE;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_CAPS:
-    {
-      GstCaps *caps;
-
-      gst_event_parse_caps (event, &caps);
-      r = gst_pnmenc_setcaps (s, caps);
-      gst_event_unref (event);
-      break;
-    }
-    default:
-      r = gst_pad_event_default (pad, parent, event);
-      break;
-  }
-
-  return r;
-}
-
 static void
 gst_pnmenc_init (GstPnmenc * s)
 {
-  GstPad *pad;
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (s));
 
-  pad = gst_pad_new_from_static_template (&sink_pad_template, "sink");
-  gst_pad_set_chain_function (pad, gst_pnmenc_chain);
-  gst_pad_set_event_function (pad, gst_pnmenc_sink_event);
-  gst_pad_use_fixed_caps (pad);
-  gst_element_add_pad (GST_ELEMENT (s), pad);
+  /* Set default encoding as RAW as ASCII takes up 4 time more bytes */
+  s->info.encoding = GST_PNM_ENCODING_RAW;
+}
 
-  s->src = gst_pad_new_from_static_template (&src_pad_template, "src");
-  gst_element_add_pad (GST_ELEMENT (s), s->src);
+static void
+gst_pnmenc_finalize (GObject * object)
+{
+  GstPnmenc *pnmenc = GST_PNMENC (object);
+  if (pnmenc->input_state)
+    gst_video_codec_state_unref (pnmenc->input_state);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+gst_pnmenc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state)
+{
+  GstPnmenc *pnmenc;
+  gboolean ret = TRUE;
+  GstVideoInfo *info;
+  GstVideoCodecState *output_state;
+
+  pnmenc = GST_PNMENC (encoder);
+  info = &state->info;
+
+  switch (GST_VIDEO_INFO_FORMAT (info)) {
+    case GST_VIDEO_FORMAT_RGB:
+      pnmenc->info.type = GST_PNM_TYPE_PIXMAP;
+      break;
+    case GST_VIDEO_FORMAT_GRAY8:
+      pnmenc->info.type = GST_PNM_TYPE_GRAYMAP;
+      break;
+    default:
+      ret = FALSE;
+      goto done;
+  }
+
+  pnmenc->info.width = GST_VIDEO_INFO_WIDTH (info);
+  pnmenc->info.height = GST_VIDEO_INFO_HEIGHT (info);
+  /* Supported max value is only one, that is 255 */
+  pnmenc->info.max = 255;
+
+  if (pnmenc->input_state)
+    gst_video_codec_state_unref (pnmenc->input_state);
+  pnmenc->input_state = gst_video_codec_state_ref (state);
+
+  output_state =
+      gst_video_encoder_set_output_state (encoder,
+      gst_caps_new_empty_simple ("image/pnm"), state);
+  gst_video_codec_state_unref (output_state);
+
+done:
+  return ret;
+}
+
+static GstFlowReturn
+gst_pnmenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
+{
+  GstPnmenc *pnmenc;
+  guint size, pixels;
+  GstMapInfo omap, imap;
+  gchar *header;
+  GstVideoInfo *info;
+  GstFlowReturn ret = GST_FLOW_OK;
+  guint i_rowstride, o_rowstride;
+  guint bytes = 0, index, head_size;
+  guint i, j;
+
+  pnmenc = GST_PNMENC (encoder);
+  info = &pnmenc->input_state->info;
+
+  switch (GST_VIDEO_INFO_FORMAT (info)) {
+    case GST_VIDEO_FORMAT_RGB:
+      pixels = size = pnmenc->info.width * pnmenc->info.height * 3;
+      break;
+    case GST_VIDEO_FORMAT_GRAY8:
+      pixels = size = pnmenc->info.width * pnmenc->info.height * 1;
+      break;
+    default:
+      ret = FALSE;
+      goto done;
+  }
+
+  header = g_strdup_printf ("P%i\n%i %i\n%i\n",
+      pnmenc->info.type + 3 * (1 - pnmenc->info.encoding), pnmenc->info.width,
+      pnmenc->info.height, pnmenc->info.max);
+
+  if (pnmenc->info.encoding == GST_PNM_ENCODING_ASCII) {
+    /* Per component 4 bytes are used in case of ASCII encoding */
+    size = size * 4;
+    size += strlen (header);
+    frame->output_buffer =
+        gst_video_encoder_allocate_output_buffer (encoder, (size + size / 20));
+  } else {
+    size += strlen (header);
+    frame->output_buffer =
+        gst_video_encoder_allocate_output_buffer (encoder, size);
+  }
+
+  if (gst_buffer_map (frame->output_buffer, &omap, GST_MAP_WRITE) == FALSE) {
+    ret = GST_FLOW_ERROR;
+    goto done;
+  }
+  if (gst_buffer_map (frame->input_buffer, &imap, GST_MAP_READ) == FALSE) {
+    /* Unmap already mapped buffer */
+    gst_buffer_unmap (frame->output_buffer, &omap);
+    ret = GST_FLOW_ERROR;
+    goto done;
+  }
+  memcpy (omap.data, header, strlen (header));
+
+  head_size = strlen (header);
+  if (pnmenc->info.encoding == GST_PNM_ENCODING_ASCII) {
+    /* We need to convert to ASCII */
+    if (pnmenc->info.width % 4 != 0) {
+      /* Convert from gstreamer rowstride to PNM rowstride */
+      if (pnmenc->info.type == GST_PNM_TYPE_PIXMAP) {
+        o_rowstride = 3 * pnmenc->info.width;
+      } else {
+        o_rowstride = pnmenc->info.width;
+      }
+      i_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (pnmenc->input_state, 0);
+
+      for (i = 0; i < pnmenc->info.height; i++) {
+        index = i * i_rowstride;
+        for (j = 0; j < o_rowstride; j++, bytes++, index++) {
+          g_snprintf ((char *) omap.data + head_size, 4, "%3i",
+              imap.data[index]);
+          head_size += 3;
+          omap.data[head_size++] = ' ';
+          /* Add new line so that file will not end up with sinle big line */
+          if (!((bytes + 1) % 20))
+            omap.data[head_size++] = '\n';
+        }
+      }
+    } else {
+      for (i = 0; i < pixels; i++) {
+        g_snprintf ((char *) omap.data + head_size, 4, "%3i", imap.data[i]);
+        head_size += 3;
+        omap.data[head_size++] = ' ';
+        if (!((i + 1) % 20))
+          omap.data[head_size++] = '\n';
+      }
+    }
+  } else {
+    /* Need to convert from GStreamer rowstride to PNM rowstride */
+    if (pnmenc->info.width % 4 != 0) {
+      if (pnmenc->info.type == GST_PNM_TYPE_PIXMAP) {
+        o_rowstride = 3 * pnmenc->info.width;
+      } else {
+        o_rowstride = pnmenc->info.width;
+      }
+      i_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (pnmenc->input_state, 0);
+
+      for (i = 0; i < pnmenc->info.height; i++)
+        memcpy (omap.data + head_size + o_rowstride * i,
+            imap.data + i_rowstride * i, o_rowstride);
+    } else {
+      /* size contains complete image size inlcuding header size,
+         Exclude header size while copying data */
+      memcpy (omap.data + strlen (header), imap.data, (size - head_size));
+    }
+  }
+
+  gst_buffer_unmap (frame->output_buffer, &omap);
+  gst_buffer_unmap (frame->input_buffer, &imap);
+
+  if ((ret = gst_video_encoder_finish_frame (encoder, frame)) != GST_FLOW_OK)
+    goto done;
+
+done:
+  return ret;
 }
 
 static void
@@ -265,20 +292,28 @@
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstVideoEncoderClass *venc_class = (GstVideoEncoderClass *) klass;
 
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_pad_template));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_pad_template));
-  gst_element_class_set_static_metadata (element_class, "PNM image encoder",
-      "Codec/Encoder/Image",
-      "Encodes images into portable pixmap or graymap (PNM) format",
-      "Lutz Mueller <lutz@users.sourceforge.net>");
-
+  parent_class = g_type_class_peek_parent (klass);
   gobject_class->set_property = gst_pnmenc_set_property;
   gobject_class->get_property = gst_pnmenc_get_property;
 
   g_object_class_install_property (gobject_class, GST_PNMENC_PROP_ASCII,
       g_param_spec_boolean ("ascii", "ASCII Encoding", "The output will be "
           "ASCII encoded", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_pad_template));
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&src_pad_template));
+
+  gst_element_class_set_static_metadata (element_class, "PNM image encoder",
+      "Codec/Encoder/Image",
+      "Encodes images into portable pixmap or graymap (PNM) format",
+      "Lutz Mueller <lutz@users.sourceforge.net>");
+
+  venc_class->set_format = gst_pnmenc_set_format;
+  venc_class->handle_frame = gst_pnmenc_handle_frame;
+  gobject_class->finalize = gst_pnmenc_finalize;
 }
diff --git a/gst/pnm/gstpnmenc.h b/gst/pnm/gstpnmenc.h
index 625379b..cb7f45b 100644
--- a/gst/pnm/gstpnmenc.h
+++ b/gst/pnm/gstpnmenc.h
@@ -38,9 +38,8 @@
 
 struct _GstPnmenc
 {
-  GstElement element;
-
-  GstVideoInfo vinfo;
+  GstVideoEncoder parent;
+  GstVideoCodecState *input_state;
   GstPnmInfo info;
 
   GstPad *src;
@@ -48,7 +47,7 @@
 
 struct _GstPnmencClass
 {
-  GstElementClass parent_class;
+  GstVideoEncoderClass parent;
 };
 
 GType gst_pnmenc_get_type (void) G_GNUC_CONST;
diff --git a/gst/pnm/gstpnmutils.c b/gst/pnm/gstpnmutils.c
index e8a6ece..b7441cd 100644
--- a/gst/pnm/gstpnmutils.c
+++ b/gst/pnm/gstpnmutils.c
@@ -176,6 +176,11 @@
           case '\n':
           case '\t':
           case ' ':
+            /* Check for maximum and minimum supported bit depth and
+               return error if its out of range */
+            if ((mngr->info.max > 255) || (mngr->info.max < 1)) {
+              return GST_PNM_INFO_MNGR_RESULT_FAILED;
+            }
             mngr->info.fields |= GST_PNM_INFO_FIELDS_MAX;
             mngr->data_offset += i + 1;
             return GST_PNM_INFO_MNGR_RESULT_FINISHED;
diff --git a/gst/rawparse/Makefile.am b/gst/rawparse/Makefile.am
index 15d2804..03eeb48 100644
--- a/gst/rawparse/Makefile.am
+++ b/gst/rawparse/Makefile.am
@@ -22,17 +22,3 @@
 	gstaudioparse.h \
 	gstrawparse.h \
 	gstvideoparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrawparse -:SHARED libgstrawparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrawparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrawparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrawparse_la_LDFLAGS) \
-	           $(libgstrawparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/rawparse/Makefile.in b/gst/rawparse/Makefile.in
index 1b721a4..485f795 100644
--- a/gst/rawparse/Makefile.in
+++ b/gst/rawparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/rawparse
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -767,7 +802,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/rawparse/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/rawparse/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1100,20 +1134,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrawparse -:SHARED libgstrawparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrawparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrawparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrawparse_la_LDFLAGS) \
-	           $(libgstrawparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c
index e8c9fec..0308890 100644
--- a/gst/rawparse/gstrawparse.c
+++ b/gst/rawparse/gstrawparse.c
@@ -29,10 +29,6 @@
 
 #include <string.h>
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include <gst/gst.h>
 #include <gst/base/gstbasetransform.h>
 #include <gst/base/gstadapter.h>
@@ -814,14 +810,13 @@
 
     GST_DEBUG_OBJECT (rp, "converted start - stop to time");
 
-    format = GST_FORMAT_TIME;
-
     gst_event_unref (event);
   } else {
-    format = GST_FORMAT_TIME;
     flags = 0;
   }
 
+  format = GST_FORMAT_TIME;
+
   flush = ((flags & GST_SEEK_FLAG_FLUSH) != 0);
 
   /* start flushing up and downstream so that the loop function pauses and we
diff --git a/gst/real/Makefile.am b/gst/real/Makefile.am
deleted file mode 100644
index b44196a..0000000
--- a/gst/real/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-plugin_LTLIBRARIES = libgstreal.la 
-
-libgstreal_la_SOURCES =	\
-	gstrealvideodec.c \
-	gstrealaudiodec.c \
-	gstreal.c
-
-libgstreal_la_CFLAGS = \
-	$(GST_PLUGINS_BASE_CFLAGS) \
-	$(GST_BASE_CFLAGS) \
-	$(GST_CFLAGS)
-libgstreal_la_LIBADD = \
-	$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
-	$(GST_BASE_LIBS)
-libgstreal_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstreal_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-noinst_HEADERS = 	\
-	gstreal.h         \
-	gstrealvideodec.h \
-	gstrealaudiodec.h
diff --git a/gst/real/gstreal.c b/gst/real/gstreal.c
deleted file mode 100644
index 66a74d8..0000000
--- a/gst/real/gstreal.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Real wrapper plugin
- *
- * Copyright (C) Edward Hervey <bilboed@bilboed.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 "gstreal.h"
-#include "gstrealvideodec.h"
-#include "gstrealaudiodec.h"
-
-static gboolean
-plugin_init (GstPlugin * p)
-{
-  if (!gst_element_register (p, "realvideodec", GST_RANK_MARGINAL,
-          GST_TYPE_REAL_VIDEO_DEC))
-    return FALSE;
-  if (!gst_element_register (p, "realaudiodec", GST_RANK_MARGINAL,
-          GST_TYPE_REAL_AUDIO_DEC))
-    return FALSE;
-
-  gst_plugin_add_dependency_simple (p, NULL, DEFAULT_REAL_CODECS_PATH, NULL,
-      GST_PLUGIN_DEPENDENCY_FLAG_NONE);
-
-  return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, real,
-    "Decode REAL streams",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/gst/real/gstrealaudiodec.c b/gst/real/gstrealaudiodec.c
deleted file mode 100644
index 78f97c5..0000000
--- a/gst/real/gstrealaudiodec.c
+++ /dev/null
@@ -1,768 +0,0 @@
-/* RealAudio wrapper plugin
- *
- * Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
- * Copyright (C) 2006 Edward Hervey <bilboed@bilboed.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 "gstreal.h"
-#include "gstrealaudiodec.h"
-
-#include <string.h>
-
-GST_DEBUG_CATEGORY_STATIC (real_audio_dec_debug);
-#define GST_CAT_DEFAULT real_audio_dec_debug
-
-static GstStaticPadTemplate snk_t =
-    GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-pn-realaudio, "
-        "raversion = { 3, 4, 5, 6, 8 }; " "audio/x-sipro "));
-
-static GstStaticPadTemplate src_t =
-GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int, "
-        "width = (int) [ 1, MAX ], "
-        "depth = (int) [ 1, MAX ], "
-        "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]"));
-
-#define DEFAULT_RACOOK_NAMES "cook.so:cook.so.6.0"
-#define DEFAULT_RAATRK_NAMES "atrc.so:atrc.so.6.0"
-#define DEFAULT_RA14_4_NAMES "14_4.so.6.0"
-#define DEFAULT_RA28_8_NAMES "28_8.so.6.0"
-#define DEFAULT_RASIPR_NAMES "sipr.so:sipr.so.6.0"
-#define DEFAULT_PWD "Ardubancel Quazanga"
-
-enum
-{
-  PROP_0,
-  PROP_REAL_CODECS_PATH,
-  PROP_RACOOK_NAMES,
-  PROP_RAATRK_NAMES,
-  PROP_RA14_4_NAMES,
-  PROP_RA28_8_NAMES,
-  PROP_RASIPR_NAMES,
-  PROP_PASSWORD
-};
-
-typedef enum
-{
-  GST_REAL_AUDIO_DEC_VERSION_ATRK = 3,
-  GST_REAL_AUDIO_DEC_VERSION_14_4 = 4,
-  GST_REAL_AUDIO_DEC_VERSION_28_8 = 5,
-  GST_REAL_AUDIO_DEC_VERSION_SIPR = 6,
-  GST_REAL_AUDIO_DEC_VERSION_COOK = 8
-} GstRealAudioDecVersion;
-
-typedef struct
-{
-  /* Hooks */
-  GModule *module;
-
-  /* Used by the REAL library. */
-  gpointer context;
-
-    guint16 (*RADecode) (gpointer, guint8 *, guint32, guint8 *, guint32 *,
-      guint32);
-    guint16 (*RACloseCodec) (gpointer);
-    guint16 (*RAFreeDecoder) (gpointer);
-    guint16 (*RAInitDecoder) (gpointer, gpointer);
-    guint16 (*RAOpenCodec2) (gpointer, const gchar *);
-    guint16 (*RASetFlavor) (gpointer, guint16);
-  void (*SetDLLAccessPath) (gchar *);
-  void (*RASetPwd) (gpointer, const gchar *);
-} GstRADecLibrary;
-
-typedef struct
-{
-  guint32 samplerate;
-  guint16 width;
-  guint16 channels;
-  guint16 quality;
-  guint32 leaf_size;
-  guint32 packet_size;
-  guint32 datalen;
-  gpointer data;
-} RAInit;
-
-struct _GstRealAudioDec
-{
-  GstElement parent;
-
-  GstPad *src, *snk;
-
-  /* Caps */
-  guint width, height, leaf_size;
-
-  GstRADecLibrary lib;
-
-  /* Properties */
-  gboolean checked_modules;
-  gchar *real_codecs_path;
-  gchar *raatrk_names;
-  gboolean valid_atrk;
-  gchar *ra14_4_names;
-  gboolean valid_ra14_4;
-  gchar *ra28_8_names;
-  gboolean valid_ra28_8;
-  gchar *rasipr_names;
-  gboolean valid_sipr;
-  gchar *racook_names;
-  gboolean valid_cook;
-  gchar *pwd;
-};
-
-struct _GstRealAudioDecClass
-{
-  GstElementClass parent_class;
-};
-
-GST_BOILERPLATE (GstRealAudioDec, gst_real_audio_dec, GstElement,
-    GST_TYPE_ELEMENT);
-
-static GstFlowReturn
-gst_real_audio_dec_chain (GstPad * pad, GstBuffer * in)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
-  GstFlowReturn flow;
-  GstClockTime timestamp;
-  GstBuffer *out = NULL;
-  guint16 res = 0;
-  guint len;
-
-  if (G_UNLIKELY (dec->lib.RADecode == NULL || dec->lib.module == NULL))
-    goto not_negotiated;
-
-  timestamp = GST_BUFFER_TIMESTAMP (in);
-
-  flow = gst_pad_alloc_buffer (dec->src, GST_BUFFER_OFFSET_NONE,
-      dec->width * dec->leaf_size * dec->height * 16,
-      GST_PAD_CAPS (dec->src), &out);
-
-  if (flow != GST_FLOW_OK)
-    goto done;
-
-  res = dec->lib.RADecode (dec->lib.context, GST_BUFFER_DATA (in),
-      GST_BUFFER_SIZE (in), GST_BUFFER_DATA (out), &len, -1);
-
-  if (res != 0)
-    goto could_not_decode;
-
-  GST_BUFFER_SIZE (out) = len;
-  GST_BUFFER_TIMESTAMP (out) = timestamp;
-
-  flow = gst_pad_push (dec->src, out);
-
-done:
-  gst_buffer_unref (in);
-  return flow;
-
-  /* Errors */
-could_not_decode:
-  {
-    gst_buffer_unref (out);
-    GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
-        ("Could not decode buffer (%i).", res));
-    flow = GST_FLOW_ERROR;
-    goto done;
-  }
-not_negotiated:
-  {
-    GST_WARNING_OBJECT (dec, "decoder not open, probably no input caps set "
-        "yet, caps on input buffer: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (in));
-    flow = GST_FLOW_NOT_NEGOTIATED;
-    goto done;
-  }
-}
-
-static void
-close_library (GstRealAudioDec * dec, GstRADecLibrary * lib)
-{
-  if (lib->context) {
-    GST_LOG_OBJECT (dec, "closing library");
-    if (lib->RACloseCodec)
-      lib->RACloseCodec (lib->context);
-    /* lib->RAFreeDecoder (lib->context); */
-  }
-  if (lib->module) {
-    GST_LOG_OBJECT (dec, "closing library module");
-    g_module_close (lib->module);
-  }
-  memset (lib, 0, sizeof (GstRADecLibrary));
-}
-
-static gboolean
-open_library (GstRealAudioDec * dec, gint version, GstRADecLibrary * lib)
-{
-  const gchar *path, *names;
-  gchar **split_names, **split_path;
-  gint i, j;
-  gpointer ra_close_codec, ra_decode, ra_free_decoder;
-  gpointer ra_open_codec2, ra_init_decoder, ra_set_flavor;
-  gpointer set_dll_access_path = NULL, ra_set_pwd = NULL;
-  gchar *tmppath = NULL;
-  guint16 res = 0;
-
-  path = dec->real_codecs_path ? dec->real_codecs_path :
-      DEFAULT_REAL_CODECS_PATH;
-
-  switch (version) {
-    case GST_REAL_AUDIO_DEC_VERSION_COOK:
-      names = dec->racook_names ? dec->racook_names : DEFAULT_RACOOK_NAMES;
-      break;
-    case GST_REAL_AUDIO_DEC_VERSION_ATRK:
-      names = dec->raatrk_names ? dec->raatrk_names : DEFAULT_RAATRK_NAMES;
-      break;
-    case GST_REAL_AUDIO_DEC_VERSION_14_4:
-      names = dec->ra14_4_names ? dec->ra14_4_names : DEFAULT_RA14_4_NAMES;
-      break;
-    case GST_REAL_AUDIO_DEC_VERSION_28_8:
-      names = dec->ra28_8_names ? dec->ra28_8_names : DEFAULT_RA28_8_NAMES;
-      break;
-    case GST_REAL_AUDIO_DEC_VERSION_SIPR:
-      names = dec->rasipr_names ? dec->rasipr_names : DEFAULT_RASIPR_NAMES;
-      break;
-    default:
-      goto unknown_version;
-  }
-
-  GST_LOG_OBJECT (dec, "splitting paths %s, names %s", path, names);
-
-  split_path = g_strsplit (path, ":", 0);
-  split_names = g_strsplit (names, ":", 0);
-
-  for (i = 0; split_path[i]; i++) {
-    for (j = 0; split_names[j]; j++) {
-      gchar *codec = g_strconcat (split_path[i], "/", split_names[j], NULL);
-
-      GST_LOG_OBJECT (dec, "opening module %s", codec);
-
-      /* This is racy, but it doesn't matter here; would be nice if GModule
-       * gave us a GError instead of an error string, but it doesn't, so.. */
-      if (g_file_test (codec, G_FILE_TEST_EXISTS)) {
-        lib->module = g_module_open (codec, G_MODULE_BIND_LAZY);
-        if (lib->module == NULL) {
-          GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s",
-              codec, g_module_error ());
-        }
-      } else {
-        GST_DEBUG_OBJECT (dec, "%s does not exist", codec);
-      }
-      g_free (codec);
-      if (lib->module)
-        goto codec_search_done;
-    }
-  }
-
-codec_search_done:
-  /* we keep the path for a while to set the dll access path */
-  g_strfreev (split_names);
-
-  if (lib->module == NULL)
-    goto could_not_open;
-
-  GST_LOG_OBJECT (dec, "finding symbols");
-
-  if (!g_module_symbol (lib->module, "RACloseCodec", &ra_close_codec) ||
-      !g_module_symbol (lib->module, "RADecode", &ra_decode) ||
-      !g_module_symbol (lib->module, "RAFreeDecoder", &ra_free_decoder) ||
-      !g_module_symbol (lib->module, "RAOpenCodec2", &ra_open_codec2) ||
-      !g_module_symbol (lib->module, "RAInitDecoder", &ra_init_decoder) ||
-      !g_module_symbol (lib->module, "RASetFlavor", &ra_set_flavor)) {
-    goto could_not_load;
-  }
-
-  g_module_symbol (lib->module, "RASetPwd", &ra_set_pwd);
-  g_module_symbol (lib->module, "SetDLLAccessPath", &set_dll_access_path);
-
-  lib->RACloseCodec = (guint16 (*)(gpointer)) ra_close_codec;
-  lib->RADecode =
-      (guint16 (*)(gpointer, guint8 *, guint32, guint8 *, guint32 *, guint32))
-      ra_decode;
-  lib->RAFreeDecoder = (guint16 (*)(gpointer)) ra_free_decoder;
-  lib->RAOpenCodec2 = (guint16 (*)(gpointer, const gchar *)) ra_open_codec2;
-  lib->RAInitDecoder = (guint16 (*)(gpointer, gpointer)) ra_init_decoder;
-  lib->RASetFlavor = (guint16 (*)(gpointer, guint16)) ra_set_flavor;
-  lib->RASetPwd = (void (*)(gpointer, const gchar *)) ra_set_pwd;
-  lib->SetDLLAccessPath = (void (*)(gchar *)) set_dll_access_path;
-
-  if (lib->SetDLLAccessPath)
-    lib->SetDLLAccessPath (split_path[i]);
-
-  tmppath = g_strdup_printf ("%s/", split_path[i]);
-  if ((res = lib->RAOpenCodec2 (&lib->context, tmppath))) {
-    g_free (tmppath);
-    goto could_not_initialize;
-  }
-  g_free (tmppath);
-
-  /* now we are done with the split paths, so free them */
-  g_strfreev (split_path);
-
-  return TRUE;
-
-  /* ERRORS */
-unknown_version:
-  {
-    GST_DEBUG_OBJECT (dec, "Cannot handle version %i.", version);
-    return FALSE;
-  }
-could_not_open:
-  {
-    g_strfreev (split_path);
-    GST_DEBUG_OBJECT (dec, "Could not find library '%s' in '%s'", names, path);
-    return FALSE;
-  }
-could_not_load:
-  {
-    g_strfreev (split_path);
-    close_library (dec, lib);
-    GST_DEBUG_OBJECT (dec, "Could not load all symbols: %s", g_module_error ());
-    return FALSE;
-  }
-could_not_initialize:
-  {
-    close_library (dec, lib);
-    GST_WARNING_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
-    return FALSE;
-  }
-}
-
-static void
-gst_real_audio_dec_probe_modules (GstRealAudioDec * dec)
-{
-  GstRADecLibrary dummy = { NULL };
-
-  if ((dec->valid_atrk =
-          open_library (dec, GST_REAL_AUDIO_DEC_VERSION_ATRK, &dummy)))
-    close_library (dec, &dummy);
-  if ((dec->valid_ra14_4 =
-          open_library (dec, GST_REAL_AUDIO_DEC_VERSION_14_4, &dummy)))
-    close_library (dec, &dummy);
-  if ((dec->valid_ra28_8 =
-          open_library (dec, GST_REAL_AUDIO_DEC_VERSION_28_8, &dummy)))
-    close_library (dec, &dummy);
-#ifdef HAVE_CPU_X86_64
-  /* disabled because it does not seem to work on 64 bits */
-  dec->valid_sipr = FALSE;
-#else
-  if ((dec->valid_sipr =
-          open_library (dec, GST_REAL_AUDIO_DEC_VERSION_SIPR, &dummy)))
-    close_library (dec, &dummy);
-#endif
-  if ((dec->valid_cook =
-          open_library (dec, GST_REAL_AUDIO_DEC_VERSION_COOK, &dummy)))
-    close_library (dec, &dummy);
-}
-
-static GstCaps *
-gst_real_audio_dec_getcaps (GstPad * pad)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
-  GstCaps *res;
-
-  if (dec->checked_modules) {
-    GValue versions = { 0 };
-    GValue version = { 0 };
-
-    GST_LOG_OBJECT (dec, "constructing caps");
-
-    g_value_init (&versions, GST_TYPE_LIST);
-    g_value_init (&version, G_TYPE_INT);
-
-    if (dec->valid_atrk) {
-      g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_ATRK);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_ra14_4) {
-      g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_14_4);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_ra28_8) {
-      g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_28_8);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_sipr) {
-      g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_SIPR);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_cook) {
-      g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_COOK);
-      gst_value_list_append_value (&versions, &version);
-    }
-
-    if (gst_value_list_get_size (&versions) > 0) {
-      res = gst_caps_new_simple ("audio/x-pn-realaudio", NULL);
-      gst_structure_set_value (gst_caps_get_structure (res, 0),
-          "raversion", &versions);
-    } else {
-      res = gst_caps_new_empty ();
-    }
-
-    if (dec->valid_sipr) {
-      gst_caps_append (res, gst_caps_new_simple ("audio/x-sipro", NULL));
-    }
-    g_value_unset (&versions);
-    g_value_unset (&version);
-  } else {
-    GST_LOG_OBJECT (dec, "returning padtemplate caps");
-    res = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
-  }
-  GST_LOG_OBJECT (dec, "returning caps %" GST_PTR_FORMAT, res);
-
-  return res;
-}
-
-static gboolean
-gst_real_audio_dec_setcaps (GstPad * pad, GstCaps * caps)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
-  GstStructure *s = gst_caps_get_structure (caps, 0);
-  gint version, flavor, channels, rate, leaf_size, packet_size, width, height;
-  guint16 res = 0;
-  RAInit data;
-  gboolean bres;
-  const GValue *v;
-  GstBuffer *buf = NULL;
-  const gchar *name = gst_structure_get_name (s);
-
-  if (!strcmp (name, "audio/x-sipro")) {
-    version = GST_REAL_AUDIO_DEC_VERSION_SIPR;
-  } else {
-    if (!gst_structure_get_int (s, "raversion", &version))
-      goto missing_keys;
-  }
-
-  if (!gst_structure_get_int (s, "flavor", &flavor) ||
-      !gst_structure_get_int (s, "channels", &channels) ||
-      !gst_structure_get_int (s, "width", &width) ||
-      !gst_structure_get_int (s, "rate", &rate) ||
-      !gst_structure_get_int (s, "height", &height) ||
-      !gst_structure_get_int (s, "leaf_size", &leaf_size) ||
-      !gst_structure_get_int (s, "packet_size", &packet_size))
-    goto missing_keys;
-
-  if ((v = gst_structure_get_value (s, "codec_data")))
-    buf = g_value_peek_pointer (v);
-
-  GST_LOG_OBJECT (dec, "opening code for version %d", version);
-
-  /* first close existing decoder */
-  close_library (dec, &dec->lib);
-
-  if (!open_library (dec, version, &dec->lib))
-    goto could_not_open;
-
-  /* we have the module, no initialize with the caps data */
-  data.samplerate = rate;
-  data.width = width;
-  data.channels = channels;
-  data.quality = 100;
-  data.leaf_size = leaf_size;
-  data.packet_size = packet_size;
-  data.datalen = buf ? GST_BUFFER_SIZE (buf) : 0;
-  data.data = buf ? GST_BUFFER_DATA (buf) : NULL;
-
-  if ((res = dec->lib.RAInitDecoder (dec->lib.context, &data))) {
-    GST_WARNING_OBJECT (dec, "RAInitDecoder() failed");
-    goto could_not_initialize;
-  }
-
-  if (dec->lib.RASetPwd) {
-    dec->lib.RASetPwd (dec->lib.context, dec->pwd ? dec->pwd : DEFAULT_PWD);
-  }
-
-  if ((res = dec->lib.RASetFlavor (dec->lib.context, flavor))) {
-    GST_WARNING_OBJECT (dec, "RASetFlavor(%d) failed", flavor);
-    goto could_not_initialize;
-  }
-
-  caps = gst_caps_new_simple ("audio/x-raw-int",
-      "endianness", G_TYPE_INT, G_BYTE_ORDER,
-      "width", G_TYPE_INT, width,
-      "depth", G_TYPE_INT, width,
-      "rate", G_TYPE_INT, rate,
-      "channels", G_TYPE_INT, channels, "signed", G_TYPE_BOOLEAN, TRUE, NULL);
-  bres = gst_pad_set_caps (GST_PAD (dec->src), caps);
-  gst_caps_unref (caps);
-  if (!bres)
-    goto could_not_set_caps;
-
-  dec->width = width;
-  dec->height = height;
-  dec->leaf_size = leaf_size;
-
-  GST_LOG_OBJECT (dec, "opened module");
-
-  return TRUE;
-
-missing_keys:
-  {
-    GST_DEBUG_OBJECT (dec, "Could not find all necessary keys in structure.");
-    return FALSE;
-  }
-could_not_open:
-  {
-    GST_DEBUG_OBJECT (dec, "Could not find decoder");
-    return FALSE;
-  }
-could_not_initialize:
-  {
-    close_library (dec, &dec->lib);
-    GST_WARNING_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
-    return FALSE;
-  }
-could_not_set_caps:
-  {
-    /* should normally not fail */
-    close_library (dec, &dec->lib);
-    GST_DEBUG_OBJECT (dec, "Could not convince peer to accept caps.");
-    return FALSE;
-  }
-}
-
-static void
-gst_real_audio_dec_init (GstRealAudioDec * dec, GstRealAudioDecClass * klass)
-{
-  dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
-  gst_pad_set_setcaps_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_audio_dec_setcaps));
-  gst_pad_set_getcaps_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_audio_dec_getcaps));
-  gst_pad_set_chain_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_audio_dec_chain));
-  gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
-
-  dec->src = gst_pad_new_from_static_template (&src_t, "src");
-  gst_pad_use_fixed_caps (dec->src);
-  gst_element_add_pad (GST_ELEMENT (dec), dec->src);
-}
-
-static void
-gst_real_audio_dec_base_init (gpointer g_class)
-{
-  GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
-
-  gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t));
-  gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t));
-  gst_element_class_set_static_metadata (ec, "RealAudio decoder",
-      "Codec/Decoder/Audio", "Decoder for RealAudio streams",
-      "Lutz Mueller <lutz@topfrose.de>");
-}
-
-static GstStateChangeReturn
-gst_real_audio_dec_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret;
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      gst_real_audio_dec_probe_modules (dec);
-      dec->checked_modules = TRUE;
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      close_library (dec, &dec->lib);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      dec->checked_modules = FALSE;
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-static void
-gst_real_audio_dec_finalize (GObject * object)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
-
-  close_library (dec, &dec->lib);
-
-  if (dec->real_codecs_path) {
-    g_free (dec->real_codecs_path);
-    dec->real_codecs_path = NULL;
-  }
-  if (dec->racook_names) {
-    g_free (dec->racook_names);
-    dec->racook_names = NULL;
-  }
-  if (dec->raatrk_names) {
-    g_free (dec->raatrk_names);
-    dec->raatrk_names = NULL;
-  }
-  if (dec->ra14_4_names) {
-    g_free (dec->ra14_4_names);
-    dec->ra14_4_names = NULL;
-  }
-  if (dec->ra28_8_names) {
-    g_free (dec->ra28_8_names);
-    dec->ra28_8_names = NULL;
-  }
-  if (dec->rasipr_names) {
-    g_free (dec->rasipr_names);
-    dec->rasipr_names = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gst_real_audio_dec_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
-
-  switch (prop_id) {
-    case PROP_REAL_CODECS_PATH:
-      if (dec->real_codecs_path)
-        g_free (dec->real_codecs_path);
-      dec->real_codecs_path = g_value_dup_string (value);
-      break;
-    case PROP_RACOOK_NAMES:
-      if (dec->racook_names)
-        g_free (dec->racook_names);
-      dec->racook_names = g_value_dup_string (value);
-      break;
-    case PROP_RAATRK_NAMES:
-      if (dec->raatrk_names)
-        g_free (dec->raatrk_names);
-      dec->raatrk_names = g_value_dup_string (value);
-      break;
-    case PROP_RA14_4_NAMES:
-      if (dec->ra14_4_names)
-        g_free (dec->ra14_4_names);
-      dec->ra14_4_names = g_value_dup_string (value);
-      break;
-    case PROP_RA28_8_NAMES:
-      if (dec->ra28_8_names)
-        g_free (dec->ra28_8_names);
-      dec->ra28_8_names = g_value_dup_string (value);
-      break;
-    case PROP_RASIPR_NAMES:
-      if (dec->rasipr_names)
-        g_free (dec->rasipr_names);
-      dec->rasipr_names = g_value_dup_string (value);
-      break;
-    case PROP_PASSWORD:
-      if (dec->pwd)
-        g_free (dec->pwd);
-      dec->pwd = g_value_dup_string (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_real_audio_dec_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
-
-  switch (prop_id) {
-    case PROP_REAL_CODECS_PATH:
-      g_value_set_string (value, dec->real_codecs_path ? dec->real_codecs_path
-          : DEFAULT_REAL_CODECS_PATH);
-      break;
-    case PROP_RACOOK_NAMES:
-      g_value_set_string (value, dec->racook_names ? dec->racook_names :
-          DEFAULT_RACOOK_NAMES);
-      break;
-    case PROP_RAATRK_NAMES:
-      g_value_set_string (value, dec->raatrk_names ? dec->raatrk_names :
-          DEFAULT_RAATRK_NAMES);
-      break;
-    case PROP_RA14_4_NAMES:
-      g_value_set_string (value, dec->ra14_4_names ? dec->ra14_4_names :
-          DEFAULT_RA14_4_NAMES);
-      break;
-    case PROP_RA28_8_NAMES:
-      g_value_set_string (value, dec->ra28_8_names ? dec->ra28_8_names :
-          DEFAULT_RA28_8_NAMES);
-      break;
-    case PROP_RASIPR_NAMES:
-      g_value_set_string (value, dec->rasipr_names ? dec->rasipr_names :
-          DEFAULT_RASIPR_NAMES);
-      break;
-    case PROP_PASSWORD:
-      g_value_set_string (value, dec->pwd ? dec->pwd : DEFAULT_PWD);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_real_audio_dec_class_init (GstRealAudioDecClass * klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->set_property = gst_real_audio_dec_set_property;
-  object_class->get_property = gst_real_audio_dec_get_property;
-  object_class->finalize = gst_real_audio_dec_finalize;
-
-  element_class->change_state = gst_real_audio_dec_change_state;
-
-  g_object_class_install_property (object_class, PROP_REAL_CODECS_PATH,
-      g_param_spec_string ("real-codecs-path",
-          "Path where to search for RealPlayer codecs",
-          "Path where to search for RealPlayer codecs",
-          DEFAULT_REAL_CODECS_PATH,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RACOOK_NAMES,
-      g_param_spec_string ("racook-names", "Names of cook driver",
-          "Names of cook driver", DEFAULT_RACOOK_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RAATRK_NAMES,
-      g_param_spec_string ("raatrk-names", "Names of atrk driver",
-          "Names of atrk driver", DEFAULT_RAATRK_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RA14_4_NAMES,
-      g_param_spec_string ("ra14-4-names", "Names of 14_4 driver",
-          "Names of 14_4 driver", DEFAULT_RA14_4_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RA28_8_NAMES,
-      g_param_spec_string ("ra28-8-names", "Names of 28_8 driver",
-          "Names of 28_8 driver", DEFAULT_RA28_8_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RASIPR_NAMES,
-      g_param_spec_string ("rasipr-names", "Names of sipr driver",
-          "Names of sipr driver", DEFAULT_RASIPR_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_PASSWORD,
-      g_param_spec_string ("password", "Password", "Password",
-          DEFAULT_PWD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  GST_DEBUG_CATEGORY_INIT (real_audio_dec_debug, "realaudiodec", 0,
-      "RealAudio decoder");
-}
diff --git a/gst/real/gstrealaudiodec.h b/gst/real/gstrealaudiodec.h
deleted file mode 100644
index 0a55678..0000000
--- a/gst/real/gstrealaudiodec.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* GStreamer
- *
- * Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
- *
- * 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_REAL_AUDIO_DEC_H__
-#define __GST_REAL_AUDIO_DEC_H__
-
-#include <gst/gst.h>
-#include <gst/audio/audio.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_REAL_AUDIO_DEC (gst_real_audio_dec_get_type())
-#define GST_REAL_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_AUDIO_DEC,GstRealAudioDec))
-#define GST_REAL_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_AUDIO_DEC,GstRealAudioDecClass))
-
-typedef struct _GstRealAudioDec GstRealAudioDec;
-typedef struct _GstRealAudioDecClass GstRealAudioDecClass;
-
-GType gst_real_audio_dec_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_REAL_AUDIO_DEC_H__ */
diff --git a/gst/real/gstrealvideodec.c b/gst/real/gstrealvideodec.c
deleted file mode 100644
index 216cebf..0000000
--- a/gst/real/gstrealvideodec.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/* RealVideo wrapper plugin
- *
- * Copyright (C) 2005 Lutz Mueller <lutz@topfrose.de>
- * Copyright (C) 2006 Edward Hervey <bilboed@bilboed.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 "gstreal.h"
-#include "gstrealvideodec.h"
-
-#include <string.h>
-
-GST_DEBUG_CATEGORY_STATIC (realvideode_debug);
-#define GST_CAT_DEFAULT realvideode_debug
-
-static GstStaticPadTemplate snk_t =
-GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-pn-realvideo, " "rmversion = (int) [ 2, 4 ]"));
-static GstStaticPadTemplate src_t =
-GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-raw-yuv, "
-        "format = (fourcc) I420, "
-        "framerate = (fraction) [0/1, MAX], "
-        "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ] "));
-
-#define DEFAULT_RV20_NAMES "drv2.so:drv2.so.6.0"
-#define DEFAULT_RV30_NAMES "drvc.so:drv3.so.6.0"
-#define DEFAULT_RV40_NAMES "drvc.so:drv4.so.6.0"
-#define DEFAULT_MAX_ERRORS 25
-
-enum
-{
-  PROP_0,
-  PROP_REAL_CODECS_PATH,
-  PROP_RV20_NAMES,
-  PROP_RV30_NAMES,
-  PROP_RV40_NAMES,
-  PROP_MAX_ERRORS
-};
-
-GST_BOILERPLATE (GstRealVideoDec, gst_real_video_dec, GstElement,
-    GST_TYPE_ELEMENT);
-
-static gboolean open_library (GstRealVideoDec * dec,
-    GstRealVideoDecVersion version, GstRVDecLibrary * lib);
-static void close_library (GstRealVideoDec * dec, GstRVDecLibrary * lib);
-
-typedef struct
-{
-  guint32 datalen;
-  gint32 interpolate;
-  gint32 nfragments;
-  gpointer fragments;
-  guint32 flags;
-  guint32 timestamp;
-} RVInData;
-
-typedef struct
-{
-  guint32 frames;
-  guint32 notes;
-  guint32 timestamp;
-  guint32 width;
-  guint32 height;
-} RVOutData;
-
-static GstFlowReturn
-gst_real_video_dec_chain (GstPad * pad, GstBuffer * in)
-{
-  GstRealVideoDec *dec;
-  guint8 *data;
-  guint size;
-  GstFlowReturn ret;
-  RVInData tin;
-  RVOutData tout;
-  GstClockTime timestamp, duration;
-  GstBuffer *out;
-  guint32 result;
-  guint frag_count, frag_size;
-
-  dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
-
-  if (G_UNLIKELY (dec->lib.Transform == NULL || dec->lib.module == NULL))
-    goto not_negotiated;
-
-  data = GST_BUFFER_DATA (in);
-  size = GST_BUFFER_SIZE (in);
-  timestamp = GST_BUFFER_TIMESTAMP (in);
-  duration = GST_BUFFER_DURATION (in);
-
-  GST_DEBUG_OBJECT (dec, "got buffer of size %u, timestamp %" GST_TIME_FORMAT,
-      size, GST_TIME_ARGS (timestamp));
-
-  /* alloc output buffer */
-  ret = gst_pad_alloc_buffer (dec->src, GST_BUFFER_OFFSET_NONE,
-      dec->width * dec->height * 3 / 2, GST_PAD_CAPS (dec->src), &out);
-  if (ret != GST_FLOW_OK)
-    goto alloc_failed;
-
-  GST_BUFFER_TIMESTAMP (out) = timestamp;
-  GST_BUFFER_DURATION (out) = duration;
-
-  frag_count = *data++;
-  frag_size = (frag_count + 1) * 8;
-  size -= (frag_size + 1);
-
-  GST_DEBUG_OBJECT (dec, "frag_count %u, frag_size %u, data size %u",
-      frag_count, frag_size, size);
-
-  /* Decode.
-   *
-   * The Buffers contain
-   *
-   *  0                   1                   2                   3
-   *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   * |  nfragments   |   fragment1 ...                               |
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   * |  ....                                                         |
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   * |  ...          |   fragment2 ...                               |
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   *    ....                                                          
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   * |  ...          |   fragment data                               |
-   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   *
-   * nfragments: number of fragments 
-   * fragmentN: 8 bytes of fragment data (nfragements + 1) of them
-   * fragment data: the data of the fragments.
-   */
-  tin.datalen = size;
-  tin.interpolate = 0;
-  tin.nfragments = frag_count;
-  tin.fragments = data;
-  tin.flags = 0;
-  tin.timestamp = timestamp;
-
-  /* jump over the frag table to the fragments */
-  data += frag_size;
-
-  result = dec->lib.Transform (
-      (gchar *) data,
-      (gchar *) GST_BUFFER_DATA (out), &tin, &tout, dec->lib.context);
-  if (result)
-    goto could_not_transform;
-
-  /* When we decoded a frame, reset the error counter. We only fail after N
-   * consecutive decoding errors. */
-  dec->error_count = 0;
-
-  gst_buffer_unref (in);
-
-  /* Check for new dimensions */
-  if (tout.frames && ((dec->width != tout.width)
-          || (dec->height != tout.height))) {
-    GstCaps *caps = gst_caps_copy (GST_PAD_CAPS (dec->src));
-    GstStructure *s = gst_caps_get_structure (caps, 0);
-
-    GST_DEBUG_OBJECT (dec, "New dimensions: %"
-        G_GUINT32_FORMAT " x %" G_GUINT32_FORMAT, tout.width, tout.height);
-
-    gst_structure_set (s, "width", G_TYPE_INT, (gint) tout.width,
-        "height", G_TYPE_INT, (gint) tout.height, NULL);
-
-    gst_pad_set_caps (dec->src, caps);
-    gst_buffer_set_caps (out, caps);
-    gst_caps_unref (caps);
-
-    dec->width = tout.width;
-    dec->height = tout.height;
-    GST_BUFFER_SIZE (out) = dec->width * dec->height * 3 / 2;
-  }
-
-  GST_DEBUG_OBJECT (dec,
-      "Pushing out buffer with timestamp %" GST_TIME_FORMAT,
-      GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (out)));
-
-  if ((ret = gst_pad_push (dec->src, out)) != GST_FLOW_OK)
-    goto could_not_push;
-
-  return ret;
-
-  /* Errors */
-not_negotiated:
-  {
-    GST_WARNING_OBJECT (dec, "decoder not open, probably no input caps set "
-        "yet, caps on input buffer: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (in));
-    gst_buffer_unref (in);
-    return GST_FLOW_NOT_NEGOTIATED;
-  }
-alloc_failed:
-  {
-    GST_DEBUG_OBJECT (dec, "buffer alloc failed: %s", gst_flow_get_name (ret));
-    gst_buffer_unref (in);
-    return ret;
-  }
-could_not_transform:
-  {
-    gst_buffer_unref (out);
-    gst_buffer_unref (in);
-
-    dec->error_count++;
-
-    if (dec->max_errors && dec->error_count >= dec->max_errors) {
-      GST_ELEMENT_ERROR (dec, STREAM, DECODE,
-          ("Could not decode buffer: %" G_GUINT32_FORMAT, result), (NULL));
-      return GST_FLOW_ERROR;
-    } else {
-      GST_ELEMENT_WARNING (dec, STREAM, DECODE,
-          ("Could not decode buffer: %" G_GUINT32_FORMAT, result), (NULL));
-      return GST_FLOW_OK;
-    }
-  }
-could_not_push:
-  {
-    GST_DEBUG_OBJECT (dec, "Could not push buffer: %s",
-        gst_flow_get_name (ret));
-    return ret;
-  }
-}
-
-static GstCaps *
-gst_real_video_dec_getcaps (GstPad * pad)
-{
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
-  GstCaps *res;
-
-  if (dec->checked_modules) {
-    GValue versions = { 0 };
-    GValue version = { 0 };
-
-    GST_LOG_OBJECT (dec, "constructing caps");
-
-    g_value_init (&versions, GST_TYPE_LIST);
-    g_value_init (&version, G_TYPE_INT);
-
-    if (dec->valid_rv20) {
-      g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_2);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_rv30) {
-      g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_3);
-      gst_value_list_append_value (&versions, &version);
-    }
-    if (dec->valid_rv40) {
-      g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_4);
-      gst_value_list_append_value (&versions, &version);
-    }
-
-    if (gst_value_list_get_size (&versions) > 0) {
-      res = gst_caps_new_simple ("video/x-pn-realvideo", NULL);
-      gst_structure_set_value (gst_caps_get_structure (res, 0),
-          "rmversion", &versions);
-    } else {
-      res = gst_caps_new_empty ();
-    }
-    g_value_unset (&versions);
-    g_value_unset (&version);
-  } else {
-    GST_LOG_OBJECT (dec, "returning padtemplate caps");
-    res = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
-  }
-  GST_LOG_OBJECT (dec, "returning caps %" GST_PTR_FORMAT, res);
-
-  return res;
-}
-
-static gboolean
-gst_real_video_dec_setcaps (GstPad * pad, GstCaps * caps)
-{
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
-  GstStructure *s = gst_caps_get_structure (caps, 0);
-  gint version, res, width, height, format, subformat;
-  gint framerate_num, framerate_denom;
-  gchar data[36];
-  gboolean bres;
-  const GValue *v;
-
-  if (!gst_structure_get_int (s, "rmversion", &version) ||
-      !gst_structure_get_int (s, "width", (gint *) & width) ||
-      !gst_structure_get_int (s, "height", (gint *) & height) ||
-      !gst_structure_get_int (s, "format", &format) ||
-      !gst_structure_get_int (s, "subformat", &subformat) ||
-      !gst_structure_get_fraction (s, "framerate", &framerate_num,
-          &framerate_denom))
-    goto missing_keys;
-
-  GST_LOG_OBJECT (dec, "Setting version to %d", version);
-
-  close_library (dec, &dec->lib);
-
-  if (!open_library (dec, version, &dec->lib))
-    goto open_failed;
-
-  /* Initialize REAL driver. */
-  GST_WRITE_UINT16_LE (data + 0, 11);
-  GST_WRITE_UINT16_LE (data + 2, width);
-  GST_WRITE_UINT16_LE (data + 4, height);
-  GST_WRITE_UINT16_LE (data + 6, 0);
-  GST_WRITE_UINT32_LE (data + 8, 0);
-  GST_WRITE_UINT32_LE (data + 12, subformat);
-  GST_WRITE_UINT32_LE (data + 16, 1);
-  GST_WRITE_UINT32_LE (data + 20, format);
-
-  if ((res = dec->lib.Init (&data, &dec->lib.context)))
-    goto could_not_initialize;
-
-  if ((v = gst_structure_get_value (s, "codec_data"))) {
-    GstBuffer *buf;
-    guint32 *msgdata;
-    guint i;
-    guint8 *bufdata;
-    guint bufsize;
-    struct
-    {
-      guint32 type;
-      guint32 msg;
-      gpointer data;
-      guint32 extra[6];
-    } msg;
-
-    buf = g_value_peek_pointer (v);
-
-    bufdata = GST_BUFFER_DATA (buf);
-    bufsize = GST_BUFFER_SIZE (buf);
-
-    /* skip format and subformat */
-    bufdata += 8;
-    bufsize -= 8;
-
-    GST_LOG_OBJECT (dec, "Creating custom message of length %d", bufsize);
-
-    msgdata = g_new0 (guint32, bufsize + 2);
-    if (!msgdata)
-      goto could_not_allocate;
-
-    msg.type = 0x24;
-    msg.msg = 1 + ((subformat >> 16) & 7);
-    msg.data = msgdata;
-    for (i = 0; i < 6; i++)
-      msg.extra[i] = 0;
-    msgdata[0] = width;
-    msgdata[1] = height;
-    for (i = 0; i < bufsize; i++)
-      msgdata[i + 2] = 4 * (guint32) bufdata[i];
-
-    res = dec->lib.Message (&msg, dec->lib.context);
-
-    g_free (msgdata);
-    if (res)
-      goto could_not_send_message;
-  }
-
-  caps = gst_caps_new_simple ("video/x-raw-yuv",
-      "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),
-      "framerate", GST_TYPE_FRACTION, framerate_num, framerate_denom,
-      "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL);
-
-  /* set PAR if one was specified in the sink caps */
-  if ((v = gst_structure_get_value (s, "pixel-aspect-ratio"))) {
-    gst_structure_set_value (gst_caps_get_structure (caps, 0),
-        "pixel-aspect-ratio", v);
-  }
-
-  bres = gst_pad_set_caps (GST_PAD (dec->src), caps);
-  gst_caps_unref (caps);
-  if (!bres)
-    goto could_not_set_caps;
-
-  dec->version = version;
-  dec->width = width;
-  dec->height = height;
-  dec->format = format;
-  dec->subformat = subformat;
-  dec->framerate_num = framerate_num;
-  dec->framerate_denom = framerate_denom;
-
-  return TRUE;
-
-missing_keys:
-  {
-    GST_ERROR_OBJECT (dec, "Could not find all necessary keys in structure.");
-    return FALSE;
-  }
-open_failed:
-  {
-    GST_ERROR_OBJECT (dec, "failed to open library");
-    return FALSE;
-  }
-could_not_initialize:
-  {
-    GST_ERROR_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
-    close_library (dec, &dec->lib);
-    return FALSE;
-  }
-could_not_allocate:
-  {
-    GST_ERROR_OBJECT (dec, "Could not allocate memory.");
-    close_library (dec, &dec->lib);
-    return FALSE;
-  }
-could_not_send_message:
-  {
-    GST_ERROR_OBJECT (dec, "Failed to send custom message needed for "
-        "initialization (%i).", res);
-    close_library (dec, &dec->lib);
-    return FALSE;
-  }
-could_not_set_caps:
-  {
-    GST_ERROR_OBJECT (dec, "Could not convince peer to accept dimensions "
-        "%i x %i.", dec->width, dec->height);
-    close_library (dec, &dec->lib);
-    return FALSE;
-  }
-}
-
-/* Attempts to open the correct library for the configured version */
-
-static gboolean
-open_library (GstRealVideoDec * dec, GstRealVideoDecVersion version,
-    GstRVDecLibrary * lib)
-{
-  gpointer rv_custom_msg, rv_free, rv_init, rv_transform;
-  GModule *module = NULL;
-  const gchar *path, *names;
-  gchar **split_names, **split_path;
-  int i, j;
-
-  GST_DEBUG_OBJECT (dec,
-      "Attempting to open shared library for real video version %d", version);
-
-  path = dec->real_codecs_path ? dec->real_codecs_path :
-      DEFAULT_REAL_CODECS_PATH;
-
-  switch (version) {
-    case GST_REAL_VIDEO_DEC_VERSION_2:
-      names = dec->rv20_names ? dec->rv20_names : DEFAULT_RV20_NAMES;
-      break;
-    case GST_REAL_VIDEO_DEC_VERSION_3:
-      names = dec->rv30_names ? dec->rv30_names : DEFAULT_RV30_NAMES;
-      break;
-    case GST_REAL_VIDEO_DEC_VERSION_4:
-      names = dec->rv40_names ? dec->rv40_names : DEFAULT_RV40_NAMES;
-      break;
-    default:
-      goto unknown_version;
-  }
-
-  split_path = g_strsplit (path, ":", 0);
-  split_names = g_strsplit (names, ":", 0);
-
-  for (i = 0; split_path[i]; i++) {
-    for (j = 0; split_names[j]; j++) {
-      gchar *codec = g_strconcat (split_path[i], "/", split_names[j], NULL);
-
-      GST_DEBUG_OBJECT (dec, "trying %s", codec);
-      /* This is racy, but it doesn't matter here; would be nice if GModule
-       * gave us a GError instead of an error string, but it doesn't, so.. */
-      if (g_file_test (codec, G_FILE_TEST_EXISTS)) {
-        module = g_module_open (codec, G_MODULE_BIND_LAZY);
-        if (module == NULL) {
-          GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s",
-              codec, g_module_error ());
-        }
-      } else {
-        GST_LOG_OBJECT (dec, "%s does not exist", codec);
-      }
-      g_free (codec);
-      if (module)
-        goto codec_search_done;
-    }
-  }
-
-codec_search_done:
-  g_strfreev (split_path);
-  g_strfreev (split_names);
-
-  if (module == NULL)
-    return FALSE;
-
-  GST_DEBUG_OBJECT (dec, "module opened, finding symbols");
-
-  /* First try opening legacy symbols, if that fails try loading new symbols */
-  if (g_module_symbol (module, "RV20toYUV420Init", &rv_init) &&
-      g_module_symbol (module, "RV20toYUV420Free", &rv_free) &&
-      g_module_symbol (module, "RV20toYUV420Transform", &rv_transform) &&
-      g_module_symbol (module, "RV20toYUV420CustomMessage", &rv_custom_msg)) {
-    GST_LOG_OBJECT (dec, "Loaded legacy symbols");
-  } else if (g_module_symbol (module, "RV40toYUV420Init", &rv_init) &&
-      g_module_symbol (module, "RV40toYUV420Free", &rv_free) &&
-      g_module_symbol (module, "RV40toYUV420Transform", &rv_transform) &&
-      g_module_symbol (module, "RV40toYUV420CustomMessage", &rv_custom_msg)) {
-    GST_LOG_OBJECT (dec, "Loaded new symbols");
-  } else {
-    goto could_not_load;
-  }
-
-  lib->Init = (guint32 (*)(gpointer, gpointer)) rv_init;
-  lib->Free = (guint32 (*)(gpointer)) rv_free;
-  lib->Transform = (guint32 (*)(gchar *, gchar *, gpointer, gpointer, gpointer))
-      rv_transform;
-  lib->Message = (guint32 (*)(gpointer, gpointer)) rv_custom_msg;
-  lib->module = module;
-
-  dec->error_count = 0;
-
-  return TRUE;
-
-unknown_version:
-  {
-    GST_ERROR_OBJECT (dec, "Cannot handle version %i.", version);
-    return FALSE;
-  }
-could_not_load:
-  {
-    close_library (dec, lib);
-    GST_ERROR_OBJECT (dec, "Could not load all symbols: %s", g_module_error ());
-    return FALSE;
-  }
-}
-
-static void
-close_library (GstRealVideoDec * dec, GstRVDecLibrary * lib)
-{
-  if (lib->context) {
-    GST_LOG_OBJECT (dec, "closing library");
-    if (lib->Free)
-      lib->Free (lib->context);
-  }
-  if (lib->module) {
-    GST_LOG_OBJECT (dec, "closing library module");
-    g_module_close (lib->module);
-    lib->module = NULL;
-  }
-  memset (lib, 0, sizeof (*lib));
-}
-
-static void
-gst_real_video_dec_probe_modules (GstRealVideoDec * dec)
-{
-  GstRVDecLibrary dummy = { NULL };
-
-  if ((dec->valid_rv20 =
-          open_library (dec, GST_REAL_VIDEO_DEC_VERSION_2, &dummy)))
-    close_library (dec, &dummy);
-  if ((dec->valid_rv30 =
-          open_library (dec, GST_REAL_VIDEO_DEC_VERSION_3, &dummy)))
-    close_library (dec, &dummy);
-  if ((dec->valid_rv40 =
-          open_library (dec, GST_REAL_VIDEO_DEC_VERSION_4, &dummy)))
-    close_library (dec, &dummy);
-}
-
-static GstStateChangeReturn
-gst_real_video_dec_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret;
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      gst_real_video_dec_probe_modules (dec);
-      dec->checked_modules = TRUE;
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      close_library (dec, &dec->lib);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      dec->checked_modules = FALSE;
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-static void
-gst_real_video_dec_init (GstRealVideoDec * dec, GstRealVideoDecClass * klass)
-{
-  dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
-  gst_pad_set_getcaps_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_video_dec_getcaps));
-  gst_pad_set_setcaps_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_video_dec_setcaps));
-  gst_pad_set_chain_function (dec->snk,
-      GST_DEBUG_FUNCPTR (gst_real_video_dec_chain));
-  gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
-
-  dec->src = gst_pad_new_from_static_template (&src_t, "src");
-  gst_pad_use_fixed_caps (dec->src);
-  gst_element_add_pad (GST_ELEMENT (dec), dec->src);
-
-  dec->max_errors = DEFAULT_MAX_ERRORS;
-  dec->error_count = 0;
-}
-
-static void
-gst_real_video_dec_base_init (gpointer g_class)
-{
-  GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
-
-  gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t));
-  gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t));
-  gst_element_class_set_static_metadata (ec, "RealVideo decoder",
-      "Codec/Decoder/Video", "Decoder for RealVideo streams",
-      "Lutz Mueller <lutz@topfrose.de>");
-}
-
-static void
-gst_real_video_dec_finalize (GObject * object)
-{
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
-
-  close_library (dec, &dec->lib);
-
-  if (dec->real_codecs_path) {
-    g_free (dec->real_codecs_path);
-    dec->real_codecs_path = NULL;
-  }
-  if (dec->rv20_names) {
-    g_free (dec->rv20_names);
-    dec->rv20_names = NULL;
-  }
-  if (dec->rv30_names) {
-    g_free (dec->rv30_names);
-    dec->rv30_names = NULL;
-  }
-  if (dec->rv40_names) {
-    g_free (dec->rv40_names);
-    dec->rv40_names = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gst_real_video_dec_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
-
-  /* Changing the location of the .so supposes it's not being done
-   * in a state greater than READY !
-   */
-
-  switch (prop_id) {
-    case PROP_REAL_CODECS_PATH:
-      if (dec->real_codecs_path)
-        g_free (dec->real_codecs_path);
-      dec->real_codecs_path = g_value_dup_string (value);
-      break;
-    case PROP_RV20_NAMES:
-      if (dec->rv20_names)
-        g_free (dec->rv20_names);
-      dec->rv20_names = g_value_dup_string (value);
-      break;
-    case PROP_RV30_NAMES:
-      if (dec->rv30_names)
-        g_free (dec->rv30_names);
-      dec->rv30_names = g_value_dup_string (value);
-      break;
-    case PROP_RV40_NAMES:
-      if (dec->rv40_names)
-        g_free (dec->rv40_names);
-      dec->rv40_names = g_value_dup_string (value);
-      break;
-    case PROP_MAX_ERRORS:
-      dec->max_errors = g_value_get_int (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_real_video_dec_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
-
-  switch (prop_id) {
-    case PROP_REAL_CODECS_PATH:
-      g_value_set_string (value, dec->real_codecs_path ? dec->real_codecs_path
-          : DEFAULT_REAL_CODECS_PATH);
-      break;
-    case PROP_RV20_NAMES:
-      g_value_set_string (value, dec->rv20_names ? dec->rv20_names :
-          DEFAULT_RV20_NAMES);
-      break;
-    case PROP_RV30_NAMES:
-      g_value_set_string (value, dec->rv30_names ? dec->rv30_names :
-          DEFAULT_RV30_NAMES);
-      break;
-    case PROP_RV40_NAMES:
-      g_value_set_string (value, dec->rv40_names ? dec->rv40_names :
-          DEFAULT_RV40_NAMES);
-      break;
-    case PROP_MAX_ERRORS:
-      g_value_set_int (value, dec->max_errors);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_real_video_dec_class_init (GstRealVideoDecClass * klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  object_class->set_property = gst_real_video_dec_set_property;
-  object_class->get_property = gst_real_video_dec_get_property;
-  object_class->finalize = gst_real_video_dec_finalize;
-
-  element_class->change_state = gst_real_video_dec_change_state;
-
-  g_object_class_install_property (object_class, PROP_REAL_CODECS_PATH,
-      g_param_spec_string ("real-codecs-path",
-          "Path where to search for RealPlayer codecs",
-          "Path where to search for RealPlayer codecs",
-          DEFAULT_REAL_CODECS_PATH,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RV20_NAMES,
-      g_param_spec_string ("rv20-names", "Names of rv20 driver",
-          "Names of rv20 driver", DEFAULT_RV20_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RV30_NAMES,
-      g_param_spec_string ("rv30-names", "Names of rv30 driver",
-          "Names of rv30 driver", DEFAULT_RV30_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_RV40_NAMES,
-      g_param_spec_string ("rv40-names", "Names of rv40 driver",
-          "Names of rv40 driver", DEFAULT_RV40_NAMES,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_MAX_ERRORS,
-      g_param_spec_int ("max-errors", "Max errors",
-          "Maximum number of consecutive errors (0 = unlimited)",
-          0, G_MAXINT, DEFAULT_MAX_ERRORS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  GST_DEBUG_CATEGORY_INIT (realvideode_debug, "realvideodec", 0,
-      "RealVideo decoder");
-}
diff --git a/gst/real/gstrealvideodec.h b/gst/real/gstrealvideodec.h
deleted file mode 100644
index 2abb337..0000000
--- a/gst/real/gstrealvideodec.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* GStreamer
- *
- * Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
- * Copyright (C) 2006 Edward Hervey <bilboed@bilbod.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_REAL_VIDEO_DEC_H__
-#define __GST_REAL_VIDEO_DEC_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstadapter.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_REAL_VIDEO_DEC (gst_real_video_dec_get_type())
-#define GST_REAL_VIDEO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDec))
-#define GST_REAL_VIDEO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDecClass))
-
-typedef struct _GstRealVideoDec GstRealVideoDec;
-typedef struct _GstRealVideoDecClass GstRealVideoDecClass;
-typedef enum _GstRealVideoDecVersion GstRealVideoDecVersion;
-
-enum _GstRealVideoDecVersion
-{
-  GST_REAL_VIDEO_DEC_VERSION_2 = 2,
-  GST_REAL_VIDEO_DEC_VERSION_3 = 3,
-  GST_REAL_VIDEO_DEC_VERSION_4 = 4
-};
-
-typedef struct {
-  GModule *module;
-
-  gpointer context;
-
-  guint32 (*Init) (gpointer, gpointer);
-  guint32 (*Free) (gpointer);
-  guint32 (*Transform) (gchar *, gchar *, gpointer, gpointer, gpointer);
-  guint32 (*Message) (gpointer, gpointer);
-
-  /*
-  GstRealVideoDecMessageFunc custom_message;
-  GstRealVideoDecFreeFunc free;
-  GstRealVideoDecInitFunc init;
-  GstRealVideoDecTransformFunc transform;
-  */
-
-} GstRVDecLibrary;
-
-struct _GstRealVideoDec
-{
-  GstElement parent;
-
-  GstPad *src, *snk;
-
-  /* Caps */
-  GstRealVideoDecVersion version;
-  guint width, height;
-  gint format, subformat;
-  gint framerate_num, framerate_denom;
-
-  gint error_count;
-
-  /* Library functions */
-  GstRVDecLibrary lib;
-
-  /* Properties */
-  gchar *real_codecs_path;
-  gboolean checked_modules;
-  gchar *rv20_names;
-  gboolean valid_rv20;
-  gchar *rv30_names;
-  gboolean valid_rv30;
-  gchar *rv40_names;
-  gboolean valid_rv40;
-  gint max_errors;
-};
-
-struct _GstRealVideoDecClass
-{
-  GstElementClass parent_class;
-};
-
-GType gst_real_video_dec_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_REAL_VIDEO_DEC_H__ */
-
-
diff --git a/gst/removesilence/Makefile.in b/gst/removesilence/Makefile.in
index c133beb..f5156f9 100644
--- a/gst/removesilence/Makefile.in
+++ b/gst/removesilence/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/removesilence
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/removesilence/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/removesilence/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1069,6 +1103,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/removesilence/gstremovesilence.c b/gst/removesilence/gstremovesilence.c
index f1105fe..d63c60a 100644
--- a/gst/removesilence/gstremovesilence.c
+++ b/gst/removesilence/gstremovesilence.c
@@ -26,7 +26,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v -m filesrc location="audiofile" ! decodebin2 ! removesilence remove=true ! wavenc ! filesink location=without_audio.wav 
+ * gst-launch -v -m filesrc location="audiofile" ! decodebin ! removesilence remove=true ! wavenc ! filesink location=without_audio.wav
  * ]|
  * </refsect2>
  */
@@ -93,7 +93,6 @@
 static GstFlowReturn gst_remove_silence_transform_ip (GstBaseTransform * base,
     GstBuffer * buf);
 static void gst_remove_silence_finalize (GObject * obj);
-static void gst_remove_silence_reset (GstRemoveSilence * filter);
 
 /* GObject vmethod implementations */
 
@@ -153,18 +152,6 @@
     GST_DEBUG ("Error initializing VAD !!");
     return;
   }
-
-  gst_remove_silence_reset (filter);
-}
-
-static void
-gst_remove_silence_reset (GstRemoveSilence * filter)
-{
-  GST_DEBUG ("Reseting VAD");
-  if (filter->vad) {
-    vad_reset (filter->vad);
-  }
-  GST_DEBUG ("VAD Reseted");
 }
 
 static void
@@ -231,7 +218,6 @@
   gst_buffer_unmap (inbuf, &map);
 
   if (frame_type == VAD_SILENCE) {
-
     GST_DEBUG ("Silence detected");
 
     if (filter->remove) {
diff --git a/gst/rtp/Makefile.am b/gst/rtp/Makefile.am
new file mode 100644
index 0000000..8566ed0
--- /dev/null
+++ b/gst/rtp/Makefile.am
@@ -0,0 +1,25 @@
+plugin_LTLIBRARIES = libgstrtpbad.la
+
+libgstrtpbad_la_SOURCES = \
+	gstrtp.c \
+	gstrtph265depay.c \
+	gstrtph265pay.c
+
+libgstrtpbad_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
+	$(GST_CFLAGS)
+
+libgstrtpbad_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
+	-lgstaudio-@GST_API_VERSION@ \
+	-lgstvideo-@GST_API_VERSION@ \
+	-lgsttag-@GST_API_VERSION@ \
+	-lgstrtp-@GST_API_VERSION@ \
+	-lgstpbutils-@GST_API_VERSION@ \
+	$(GST_BASE_LIBS) $(GST_LIBS) \
+	$(LIBM)
+libgstrtpbad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstrtpbad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS =			\
+	gstrtph265depay.h \
+	gstrtph265pay.h
diff --git a/gst/real/Makefile.in b/gst/rtp/Makefile.in
similarity index 83%
rename from gst/real/Makefile.in
rename to gst/rtp/Makefile.in
index 2282e4e..63c5093 100644
--- a/gst/real/Makefile.in
+++ b/gst/rtp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = gst/real
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = gst/rtp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,19 +164,22 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstreal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstrtpbad_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
-am_libgstreal_la_OBJECTS = libgstreal_la-gstrealvideodec.lo \
-	libgstreal_la-gstrealaudiodec.lo libgstreal_la-gstreal.lo
-libgstreal_la_OBJECTS = $(am_libgstreal_la_OBJECTS)
+am_libgstrtpbad_la_OBJECTS = libgstrtpbad_la-gstrtp.lo \
+	libgstrtpbad_la-gstrtph265depay.lo \
+	libgstrtpbad_la-gstrtph265pay.lo
+libgstrtpbad_la_OBJECTS = $(am_libgstrtpbad_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 = 
-libgstreal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstreal_la_CFLAGS) $(CFLAGS) \
-	$(libgstreal_la_LDFLAGS) $(LDFLAGS) -o $@
+libgstrtpbad_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) \
+	$(libgstrtpbad_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
@@ -201,8 +214,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstreal_la_SOURCES)
-DIST_SOURCES = $(libgstreal_la_SOURCES)
+SOURCES = $(libgstrtpbad_la_SOURCES)
+DIST_SOURCES = $(libgstrtpbad_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -228,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +287,6 @@
 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@
@@ -285,7 +299,6 @@
 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@
@@ -293,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +442,6 @@
 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@
@@ -431,7 +450,6 @@
 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@
@@ -444,7 +462,6 @@
 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@
@@ -458,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -725,27 +763,30 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstreal.la 
-libgstreal_la_SOURCES = \
-	gstrealvideodec.c \
-	gstrealaudiodec.c \
-	gstreal.c
+plugin_LTLIBRARIES = libgstrtpbad.la
+libgstrtpbad_la_SOURCES = \
+	gstrtp.c \
+	gstrtph265depay.c \
+	gstrtph265pay.c
 
-libgstreal_la_CFLAGS = \
-	$(GST_PLUGINS_BASE_CFLAGS) \
-	$(GST_BASE_CFLAGS) \
+libgstrtpbad_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
 	$(GST_CFLAGS)
 
-libgstreal_la_LIBADD = \
-	$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
-	$(GST_BASE_LIBS)
+libgstrtpbad_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
+	-lgstaudio-@GST_API_VERSION@ \
+	-lgstvideo-@GST_API_VERSION@ \
+	-lgsttag-@GST_API_VERSION@ \
+	-lgstrtp-@GST_API_VERSION@ \
+	-lgstpbutils-@GST_API_VERSION@ \
+	$(GST_BASE_LIBS) $(GST_LIBS) \
+	$(LIBM)
 
-libgstreal_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstreal_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+libgstrtpbad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstrtpbad_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = \
-	gstreal.h         \
-	gstrealvideodec.h \
-	gstrealaudiodec.h
+	gstrtph265depay.h \
+	gstrtph265pay.h
 
 all: all-am
 
@@ -760,10 +801,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/real/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/rtp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu gst/real/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu gst/rtp/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -817,8 +857,8 @@
 	  rm -f $${locs}; \
 	}
 
-libgstreal.la: $(libgstreal_la_OBJECTS) $(libgstreal_la_DEPENDENCIES) $(EXTRA_libgstreal_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstreal_la_LINK) -rpath $(plugindir) $(libgstreal_la_OBJECTS) $(libgstreal_la_LIBADD) $(LIBS)
+libgstrtpbad.la: $(libgstrtpbad_la_OBJECTS) $(libgstrtpbad_la_DEPENDENCIES) $(EXTRA_libgstrtpbad_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstrtpbad_la_LINK) -rpath $(plugindir) $(libgstrtpbad_la_OBJECTS) $(libgstrtpbad_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -826,9 +866,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstreal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstrealaudiodec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreal_la-gstrealvideodec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtpbad_la-gstrtp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtpbad_la-gstrtph265depay.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstrtpbad_la-gstrtph265pay.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -854,26 +894,26 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstreal_la-gstrealvideodec.lo: gstrealvideodec.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstrealvideodec.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstrealvideodec.Tpo -c -o libgstreal_la-gstrealvideodec.lo `test -f 'gstrealvideodec.c' || echo '$(srcdir)/'`gstrealvideodec.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstrealvideodec.Tpo $(DEPDIR)/libgstreal_la-gstrealvideodec.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrealvideodec.c' object='libgstreal_la-gstrealvideodec.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtpbad_la-gstrtp.lo: gstrtp.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -MT libgstrtpbad_la-gstrtp.lo -MD -MP -MF $(DEPDIR)/libgstrtpbad_la-gstrtp.Tpo -c -o libgstrtpbad_la-gstrtp.lo `test -f 'gstrtp.c' || echo '$(srcdir)/'`gstrtp.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtpbad_la-gstrtp.Tpo $(DEPDIR)/libgstrtpbad_la-gstrtp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtp.c' object='libgstrtpbad_la-gstrtp.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstrealvideodec.lo `test -f 'gstrealvideodec.c' || echo '$(srcdir)/'`gstrealvideodec.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -c -o libgstrtpbad_la-gstrtp.lo `test -f 'gstrtp.c' || echo '$(srcdir)/'`gstrtp.c
 
-libgstreal_la-gstrealaudiodec.lo: gstrealaudiodec.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstrealaudiodec.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstrealaudiodec.Tpo -c -o libgstreal_la-gstrealaudiodec.lo `test -f 'gstrealaudiodec.c' || echo '$(srcdir)/'`gstrealaudiodec.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstrealaudiodec.Tpo $(DEPDIR)/libgstreal_la-gstrealaudiodec.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrealaudiodec.c' object='libgstreal_la-gstrealaudiodec.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtpbad_la-gstrtph265depay.lo: gstrtph265depay.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -MT libgstrtpbad_la-gstrtph265depay.lo -MD -MP -MF $(DEPDIR)/libgstrtpbad_la-gstrtph265depay.Tpo -c -o libgstrtpbad_la-gstrtph265depay.lo `test -f 'gstrtph265depay.c' || echo '$(srcdir)/'`gstrtph265depay.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtpbad_la-gstrtph265depay.Tpo $(DEPDIR)/libgstrtpbad_la-gstrtph265depay.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtph265depay.c' object='libgstrtpbad_la-gstrtph265depay.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstrealaudiodec.lo `test -f 'gstrealaudiodec.c' || echo '$(srcdir)/'`gstrealaudiodec.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -c -o libgstrtpbad_la-gstrtph265depay.lo `test -f 'gstrtph265depay.c' || echo '$(srcdir)/'`gstrtph265depay.c
 
-libgstreal_la-gstreal.lo: gstreal.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -MT libgstreal_la-gstreal.lo -MD -MP -MF $(DEPDIR)/libgstreal_la-gstreal.Tpo -c -o libgstreal_la-gstreal.lo `test -f 'gstreal.c' || echo '$(srcdir)/'`gstreal.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstreal_la-gstreal.Tpo $(DEPDIR)/libgstreal_la-gstreal.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstreal.c' object='libgstreal_la-gstreal.lo' libtool=yes @AMDEPBACKSLASH@
+libgstrtpbad_la-gstrtph265pay.lo: gstrtph265pay.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -MT libgstrtpbad_la-gstrtph265pay.lo -MD -MP -MF $(DEPDIR)/libgstrtpbad_la-gstrtph265pay.Tpo -c -o libgstrtpbad_la-gstrtph265pay.lo `test -f 'gstrtph265pay.c' || echo '$(srcdir)/'`gstrtph265pay.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstrtpbad_la-gstrtph265pay.Tpo $(DEPDIR)/libgstrtpbad_la-gstrtph265pay.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstrtph265pay.c' object='libgstrtpbad_la-gstrtph265pay.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 $(libgstreal_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstreal_la_CFLAGS) $(CFLAGS) -c -o libgstreal_la-gstreal.lo `test -f 'gstreal.c' || echo '$(srcdir)/'`gstreal.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstrtpbad_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstrtpbad_la_CFLAGS) $(CFLAGS) -c -o libgstrtpbad_la-gstrtph265pay.lo `test -f 'gstrtph265pay.c' || echo '$(srcdir)/'`gstrtph265pay.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1088,6 +1128,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/gst/rtp/gstrtp.c b/gst/rtp/gstrtp.c
new file mode 100644
index 0000000..fd07748
--- /dev/null
+++ b/gst/rtp/gstrtp.c
@@ -0,0 +1,47 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * 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/tag/tag.h>
+
+#include "gstrtph265depay.h"
+#include "gstrtph265pay.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  gst_tag_image_type_get_type ();
+
+  if (!gst_rtp_h265_depay_plugin_init (plugin))
+    return FALSE;
+
+  if (!gst_rtp_h265_pay_plugin_init (plugin))
+    return FALSE;
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    rtpbad,
+    "Real-time protocol plugins",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c
new file mode 100644
index 0000000..bfc2e13
--- /dev/null
+++ b/gst/rtp/gstrtph265depay.c
@@ -0,0 +1,1580 @@
+/* GStreamer
+ * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) <2014> Jurgen Slowack <jurgenslowack@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 <string.h>
+
+#include <gst/base/gstbitreader.h>
+#include <gst/rtp/gstrtpbuffer.h>
+#include <gst/video/video.h>
+#include "gstrtph265depay.h"
+
+GST_DEBUG_CATEGORY_STATIC (rtph265depay_debug);
+#define GST_CAT_DEFAULT (rtph265depay_debug)
+
+/* This is what we'll default to when downstream hasn't
+ * expressed a restriction or preference via caps */
+#define DEFAULT_BYTE_STREAM   TRUE
+#define DEFAULT_ACCESS_UNIT   FALSE
+
+/* 3 zero bytes syncword */
+static const guint8 sync_bytes[] = { 0, 0, 0, 1 };
+
+static GstStaticPadTemplate gst_rtp_h265_depay_src_template =
+    GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (
+        /* FIXME - hvc1 and hev1 formats are not supported yet */
+        /*"video/x-h265, "
+           "stream-format = (string) hvc1, alignment = (string) au; "
+           "video/x-h265, "
+           "stream-format = (string) hev1, alignment = (string) au; " */
+        "video/x-h265, "
+        "stream-format = (string) byte-stream, alignment = (string) { nal, au }")
+    );
+
+static GstStaticPadTemplate gst_rtp_h265_depay_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp, "
+        "media = (string) \"video\", "
+        "clock-rate = (int) 90000, " "encoding-name = (string) \"H265\"")
+        /** optional parameters **/
+    /* "profile-space = (int) [ 0, 3 ], " */
+    /* "profile-id = (int) [ 0, 31 ], " */
+    /* "tier-flag = (int) [ 0, 1 ], " */
+    /* "level-id = (int) [ 0, 255 ], " */
+    /* "interop-constraints = (string) ANY, " */
+    /* "profile-compatibility-indicator = (string) ANY, " */
+    /* "sprop-sub-layer-id = (int) [ 0, 6 ], " */
+    /* "recv-sub-layer-id = (int) [ 0, 6 ], " */
+    /* "max-recv-level-id = (int) [ 0, 255 ], " */
+    /* "tx-mode = (string) {MST , SST}, " */
+    /* "sprop-vps = (string) ANY, " */
+    /* "sprop-sps = (string) ANY, " */
+    /* "sprop-pps = (string) ANY, " */
+    /* "sprop-sei = (string) ANY, " */
+    /* "max-lsr = (int) ANY, " *//* MUST be in the range of MaxLumaSR to 16 * MaxLumaSR, inclusive */
+    /* "max-lps = (int) ANY, " *//* MUST be in the range of MaxLumaPS to 16 * MaxLumaPS, inclusive */
+    /* "max-cpb = (int) ANY, " *//* MUST be in the range of MaxCPB to 16 * MaxCPB, inclusive */
+    /* "max-dpb = (int) [1, 16], " */
+    /* "max-br = (int) ANY, " *//* MUST be in the range of MaxBR to 16 * MaxBR, inclusive, for the highest level */
+    /* "max-tr = (int) ANY, " *//* MUST be in the range of MaxTileRows to 16 * MaxTileRows, inclusive, for the highest level */
+    /* "max-tc = (int) ANY, " *//* MUST be in the range of MaxTileCols to 16 * MaxTileCols, inclusive, for the highest level */
+    /* "max-fps = (int) ANY, " */
+    /* "sprop-max-don-diff = (int) [0, 32767], " */
+    /* "sprop-depack-buf-nalus = (int) [0, 32767], " */
+    /* "sprop-depack-buf-nalus = (int) [0, 4294967295], " */
+    /* "depack-buf-cap = (int) [1, 4294967295], " */
+    /* "sprop-segmentation-id = (int) [0, 3], " */
+    /* "sprop-spatial-segmentation-idc = (string) ANY, " */
+    /* "dec-parallel-cap = (string) ANY, " */
+    );
+
+#define gst_rtp_h265_depay_parent_class parent_class
+G_DEFINE_TYPE (GstRtpH265Depay, gst_rtp_h265_depay,
+    GST_TYPE_RTP_BASE_DEPAYLOAD);
+
+static void gst_rtp_h265_depay_finalize (GObject * object);
+
+static GstStateChangeReturn gst_rtp_h265_depay_change_state (GstElement *
+    element, GstStateChange transition);
+
+static GstBuffer *gst_rtp_h265_depay_process (GstRTPBaseDepayload * depayload,
+    GstRTPBuffer * rtp);
+static gboolean gst_rtp_h265_depay_setcaps (GstRTPBaseDepayload * filter,
+    GstCaps * caps);
+static gboolean gst_rtp_h265_depay_handle_event (GstRTPBaseDepayload * depay,
+    GstEvent * event);
+
+static void
+gst_rtp_h265_depay_class_init (GstRtpH265DepayClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+  GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+  gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
+
+  gobject_class->finalize = gst_rtp_h265_depay_finalize;
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_rtp_h265_depay_src_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_rtp_h265_depay_sink_template));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "RTP H265 depayloader", "Codec/Depayloader/Network/RTP",
+      "Extracts H265 video from RTP packets (draft-ietf-payload-rtp-h265-03.txt)",
+      "Jurgen Slowack <jurgenslowack@gmail.com>");
+  gstelement_class->change_state = gst_rtp_h265_depay_change_state;
+
+  gstrtpbasedepayload_class->process_rtp_packet = gst_rtp_h265_depay_process;
+  gstrtpbasedepayload_class->set_caps = gst_rtp_h265_depay_setcaps;
+  gstrtpbasedepayload_class->handle_event = gst_rtp_h265_depay_handle_event;
+}
+
+static void
+gst_rtp_h265_depay_init (GstRtpH265Depay * rtph265depay)
+{
+  rtph265depay->adapter = gst_adapter_new ();
+  rtph265depay->picture_adapter = gst_adapter_new ();
+  rtph265depay->byte_stream = DEFAULT_BYTE_STREAM;
+  rtph265depay->stream_format = (gchar *) g_malloc (10);
+  rtph265depay->merge = DEFAULT_ACCESS_UNIT;
+  rtph265depay->vps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+  rtph265depay->sps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+  rtph265depay->pps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+}
+
+static void
+gst_rtp_h265_depay_reset (GstRtpH265Depay * rtph265depay)
+{
+  gst_adapter_clear (rtph265depay->adapter);
+  rtph265depay->wait_start = TRUE;
+  gst_adapter_clear (rtph265depay->picture_adapter);
+  rtph265depay->picture_start = FALSE;
+  rtph265depay->last_keyframe = FALSE;
+  rtph265depay->last_ts = 0;
+  rtph265depay->current_fu_type = 0;
+  rtph265depay->new_codec_data = FALSE;
+  g_ptr_array_set_size (rtph265depay->vps, 0);
+  g_ptr_array_set_size (rtph265depay->sps, 0);
+  g_ptr_array_set_size (rtph265depay->pps, 0);
+}
+
+static void
+gst_rtp_h265_depay_finalize (GObject * object)
+{
+  GstRtpH265Depay *rtph265depay;
+
+  rtph265depay = GST_RTP_H265_DEPAY (object);
+
+  if (rtph265depay->codec_data)
+    gst_buffer_unref (rtph265depay->codec_data);
+
+  g_free (rtph265depay->stream_format);
+
+  g_object_unref (rtph265depay->adapter);
+  g_object_unref (rtph265depay->picture_adapter);
+
+  g_ptr_array_free (rtph265depay->vps, TRUE);
+  g_ptr_array_free (rtph265depay->sps, TRUE);
+  g_ptr_array_free (rtph265depay->pps, TRUE);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_rtp_h265_depay_negotiate (GstRtpH265Depay * rtph265depay)
+{
+  GstCaps *caps;
+  gint byte_stream = -1;
+  gint merge = -1;
+
+  caps =
+      gst_pad_get_allowed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay));
+
+  GST_DEBUG_OBJECT (rtph265depay, "allowed caps: %" GST_PTR_FORMAT, caps);
+
+  if (caps) {
+    if (gst_caps_get_size (caps) > 0) {
+      GstStructure *s = gst_caps_get_structure (caps, 0);
+      const gchar *str = NULL;
+
+      if ((str = gst_structure_get_string (s, "stream-format"))) {
+
+        strcpy (rtph265depay->stream_format, str);
+
+        if (strcmp (str, "hev1") == 0) {
+          byte_stream = FALSE;
+        } else if (strcmp (str, "hvc1") == 0) {
+          byte_stream = FALSE;
+        } else if (strcmp (str, "byte-stream") == 0) {
+          byte_stream = TRUE;
+        } else {
+          GST_DEBUG_OBJECT (rtph265depay, "unknown stream-format: %s", str);
+        }
+      }
+
+      if ((str = gst_structure_get_string (s, "alignment"))) {
+        if (strcmp (str, "au") == 0) {
+          merge = TRUE;
+        } else if (strcmp (str, "nal") == 0) {
+          merge = FALSE;
+        } else {
+          GST_DEBUG_OBJECT (rtph265depay, "unknown alignment: %s", str);
+        }
+      }
+    }
+    gst_caps_unref (caps);
+  }
+
+  if (byte_stream != -1) {
+    GST_DEBUG_OBJECT (rtph265depay, "downstream requires byte-stream %d",
+        byte_stream);
+    rtph265depay->byte_stream = byte_stream;
+  } else {
+    GST_DEBUG_OBJECT (rtph265depay, "defaulting to byte-stream %d",
+        DEFAULT_BYTE_STREAM);
+    strcpy (rtph265depay->stream_format, "byte-stream");
+    rtph265depay->byte_stream = DEFAULT_BYTE_STREAM;
+  }
+  if (merge != -1) {
+    GST_DEBUG_OBJECT (rtph265depay, "downstream requires merge %d", merge);
+    rtph265depay->merge = merge;
+  } else {
+    GST_DEBUG_OBJECT (rtph265depay, "defaulting to merge %d",
+        DEFAULT_ACCESS_UNIT);
+    rtph265depay->merge = DEFAULT_ACCESS_UNIT;
+  }
+}
+
+/* Stolen from bad/gst/mpegtsdemux/payloader_parsers.c */
+/* variable length Exp-Golomb parsing according to H.265 spec section 9.2*/
+static gboolean
+read_golomb (GstBitReader * br, guint32 * value)
+{
+  guint8 b, leading_zeros = -1;
+  *value = 1;
+
+  for (b = 0; !b; leading_zeros++) {
+    if (!gst_bit_reader_get_bits_uint8 (br, &b, 1))
+      return FALSE;
+    *value *= 2;
+  }
+
+  *value = (*value >> 1) - 1;
+  if (leading_zeros > 0) {
+    guint32 tmp = 0;
+    if (!gst_bit_reader_get_bits_uint32 (br, &tmp, leading_zeros))
+      return FALSE;
+    *value += tmp;
+  }
+
+  return TRUE;
+}
+
+static gboolean
+parse_sps (GstMapInfo * map, guint32 * sps_id)
+{                               /* To parse seq_parameter_set_id */
+  GstBitReader br = GST_BIT_READER_INIT (map->data + 15,
+      map->size - 15);
+
+  if (map->size < 16)
+    return FALSE;
+
+  if (!read_golomb (&br, sps_id))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+parse_pps (GstMapInfo * map, guint32 * sps_id, guint32 * pps_id)
+{                               /* To parse picture_parameter_set_id */
+  GstBitReader br = GST_BIT_READER_INIT (map->data + 2,
+      map->size - 2);
+
+  if (map->size < 3)
+    return FALSE;
+
+  if (!read_golomb (&br, pps_id))
+    return FALSE;
+  if (!read_golomb (&br, sps_id))
+    return FALSE;
+
+  return TRUE;
+}
+
+
+static gboolean
+gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay)
+{
+  gboolean res;
+  GstCaps *srccaps;
+
+  if (!rtph265depay->byte_stream &&
+      (!rtph265depay->new_codec_data ||
+          rtph265depay->vps->len == 0 || rtph265depay->sps->len == 0
+          || rtph265depay->pps->len == 0))
+    return TRUE;
+
+  srccaps = gst_caps_new_simple ("video/x-h265",
+      "stream-format", G_TYPE_STRING,
+      rtph265depay->stream_format,
+      "alignment", G_TYPE_STRING, rtph265depay->merge ? "au" : "nal", NULL);
+
+  if (!rtph265depay->byte_stream) {
+
+    GstBuffer *codec_data;
+    gint i = 0;
+    gint len;
+    guint num_vps = rtph265depay->vps->len;
+    guint num_sps = rtph265depay->sps->len;
+    guint num_pps = rtph265depay->pps->len;
+    GstMapInfo map, nalmap;
+    guint8 *data;
+    gint nl;
+    guint8 num_arrays = 0;
+    guint new_size;
+    GstBitReader br;
+    guint32 tmp;
+    guint8 tmp8 = 0;
+    guint32 max_sub_layers_minus1, temporal_id_nesting_flag, chroma_format_idc,
+        bit_depth_luma_minus8, bit_depth_chroma_minus8,
+        min_spatial_segmentation_idc;
+
+    /* Fixme: Current implementation is not embedding SEI in codec_data */
+
+    if (num_sps == 0)
+      return FALSE;
+
+    /* start with 23 bytes header */
+    len = 23;
+
+    num_arrays = (num_vps > 0) + (num_sps > 0) + (num_pps > 0);
+    len += num_arrays;
+
+    /* add size of vps, sps & pps */
+    for (i = 0; i < num_vps; i++)
+      len += 2 + gst_buffer_get_size (g_ptr_array_index (rtph265depay->vps, i));
+    for (i = 0; i < num_sps; i++)
+      len += 2 + gst_buffer_get_size (g_ptr_array_index (rtph265depay->sps, i));
+    for (i = 0; i < num_pps; i++)
+      len += 2 + gst_buffer_get_size (g_ptr_array_index (rtph265depay->pps, i));
+
+    GST_DEBUG_OBJECT (rtph265depay,
+        "constructing codec_data: num_vps =%d num_sps=%d, num_pps=%d", num_vps,
+        num_sps, num_pps);
+
+    codec_data = gst_buffer_new_and_alloc (len);
+    g_debug ("alloc_len: %u", len);
+    gst_buffer_map (codec_data, &map, GST_MAP_READWRITE);
+    data = map.data;
+
+    memset (data, 0, map.size);
+
+    /* Parsing sps to get the info required further on */
+
+    gst_buffer_map (g_ptr_array_index (rtph265depay->sps, 0), &nalmap,
+        GST_MAP_READ);
+
+    max_sub_layers_minus1 = ((nalmap.data[2]) >> 1) & 0x07;
+    temporal_id_nesting_flag = nalmap.data[2] & 0x01;
+
+    gst_bit_reader_init (&br, nalmap.data + 15, nalmap.size - 15);
+
+    read_golomb (&br, &tmp);    /* sps_seq_parameter_set_id */
+    read_golomb (&br, &chroma_format_idc);      /* chroma_format_idc */
+
+    if (chroma_format_idc == 3)
+
+      gst_bit_reader_get_bits_uint8 (&br, &tmp8, 1);    /* separate_colour_plane_flag */
+
+    read_golomb (&br, &tmp);    /* pic_width_in_luma_samples */
+    read_golomb (&br, &tmp);    /* pic_height_in_luma_samples */
+
+    gst_bit_reader_get_bits_uint8 (&br, &tmp8, 1);      /* conformance_window_flag */
+    if (tmp8) {
+      read_golomb (&br, &tmp);  /* conf_win_left_offset */
+      read_golomb (&br, &tmp);  /* conf_win_right_offset */
+      read_golomb (&br, &tmp);  /* conf_win_top_offset */
+      read_golomb (&br, &tmp);  /* conf_win_bottom_offset */
+    }
+
+    read_golomb (&br, &bit_depth_luma_minus8);  /* bit_depth_luma_minus8 */
+    read_golomb (&br, &bit_depth_chroma_minus8);        /* bit_depth_chroma_minus8 */
+
+    GST_DEBUG_OBJECT (rtph265depay,
+        "Ignoring min_spatial_segmentation for now (assuming zero)");
+
+    min_spatial_segmentation_idc = 0;   /* NOTE - we ignore this for now, but in a perfect world, we should continue parsing to obtain the real value */
+
+    nl = nalmap.size;
+
+    gst_buffer_unmap (g_ptr_array_index (rtph265depay->sps, 0), &nalmap);
+
+    /* HEVCDecoderConfigurationVersion = 1 */
+    data[0] = 1;
+
+    /* Copy from profile_tier_level (Rec. ITU-T H.265 (04/2013) section 7.3.3
+     *
+     * profile_space | tier_flat | profile_idc |
+     * profile_compatibility_flags | constraint_indicator_flags |
+     * level_idc | progressive_source_flag | interlaced_source_flag
+     * non_packed_constraint_flag | frame_only_constraint_flag
+     * reserved_zero_44bits | level_idc */
+    gst_buffer_map (g_ptr_array_index (rtph265depay->sps, 0), &nalmap,
+        GST_MAP_READ);
+    for (i = 0; i < 12; i++)
+      data[i + 1] = nalmap.data[i];
+    gst_buffer_unmap (g_ptr_array_index (rtph265depay->sps, 0), &nalmap);
+
+    /* min_spatial_segmentation_idc */
+    GST_WRITE_UINT16_BE (data + 13, min_spatial_segmentation_idc);
+    data[13] |= 0xf0;
+    data[15] = 0xfc;            /* keeping parrallelismType as zero (unknown) */
+    data[16] = 0xfc | chroma_format_idc;
+    data[17] = 0xf8 | bit_depth_luma_minus8;
+    data[18] = 0xf8 | bit_depth_chroma_minus8;
+    data[19] = 0x00;            /* keep avgFrameRate as unspecified */
+    data[20] = 0x00;            /* keep avgFrameRate as unspecified */
+    /* constFrameRate(2 bits): 0, stream may or may not be of constant framerate
+     * numTemporalLayers (3 bits): number of temporal layers, value from SPS
+     * TemporalIdNested (1 bit): sps_temporal_id_nesting_flag from SPS
+     * lengthSizeMinusOne (2 bits): plus 1 indicates the length of the NALUnitLength */
+    data[21] =
+        0x00 | ((max_sub_layers_minus1 +
+            1) << 3) | (temporal_id_nesting_flag << 2) | (nl - 1);
+    GST_WRITE_UINT8 (data + 22, num_arrays);    /* numOfArrays */
+
+    data += 23;
+
+    /* copy all VPS */
+    if (num_vps > 0) {
+      /* array_completeness | reserved_zero bit | nal_unit_type */
+      data[0] = 0x00 | 0x20;
+      data++;
+
+      GST_WRITE_UINT16_BE (data, num_vps);
+      data += 2;
+
+      for (i = 0; i < num_vps; i++) {
+        gsize nal_size =
+            gst_buffer_get_size (g_ptr_array_index (rtph265depay->vps, i));
+        GST_WRITE_UINT16_BE (data, nal_size);
+        gst_buffer_extract (g_ptr_array_index (rtph265depay->vps, i), 0,
+            data + 2, nal_size);
+        data += 2 + nal_size;
+        GST_DEBUG_OBJECT (rtph265depay, "Copied VPS %d of length %u", i,
+            (guint) nal_size);
+      }
+    }
+
+    /* copy all SPS */
+    if (num_sps > 0) {
+      /* array_completeness | reserved_zero bit | nal_unit_type */
+      data[0] = 0x00 | 0x21;
+      data++;
+
+      GST_WRITE_UINT16_BE (data, num_sps);
+      data += 2;
+
+      for (i = 0; i < num_sps; i++) {
+        gsize nal_size =
+            gst_buffer_get_size (g_ptr_array_index (rtph265depay->sps, i));
+        GST_WRITE_UINT16_BE (data, nal_size);
+        gst_buffer_extract (g_ptr_array_index (rtph265depay->sps, i), 0,
+            data + 2, nal_size);
+        data += 2 + nal_size;
+        GST_DEBUG_OBJECT (rtph265depay, "Copied SPS %d of length %u", i,
+            (guint) nal_size);
+      }
+    }
+
+    /* copy all PPS */
+    if (num_pps > 0) {
+      /* array_completeness | reserved_zero bit | nal_unit_type */
+      data[0] = 0x00 | 0x22;
+      data++;
+
+      GST_WRITE_UINT16_BE (data, num_pps);
+      data += 2;
+
+      for (i = 0; i < num_pps; i++) {
+        gsize nal_size =
+            gst_buffer_get_size (g_ptr_array_index (rtph265depay->pps, i));
+        GST_WRITE_UINT16_BE (data, nal_size);
+        gst_buffer_extract (g_ptr_array_index (rtph265depay->pps, i), 0,
+            data + 2, nal_size);
+        data += 2 + nal_size;
+        GST_DEBUG_OBJECT (rtph265depay, "Copied PPS %d of length %u", i,
+            (guint) nal_size);
+      }
+    }
+
+    new_size = data - map.data;
+    gst_buffer_unmap (codec_data, &map);
+    gst_buffer_set_size (codec_data, new_size);
+
+    gst_caps_set_simple (srccaps,
+        "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
+    gst_buffer_unref (codec_data);
+  }
+
+  if (gst_pad_has_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay))) {
+    GstCaps *old_caps =
+        gst_pad_get_current_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay));
+
+    /* Only update the caps if they are not equal. For
+     * AVC we don't update caps if only the codec_data
+     * changes. This is the same behaviour as in h264parse
+     * and gstrtph264depay
+     */
+    if (rtph265depay->byte_stream) {
+      if (!gst_caps_is_equal (srccaps, old_caps))
+        res =
+            gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay),
+            srccaps);
+      else
+        res = TRUE;
+    } else {
+      GstCaps *tmp_caps = gst_caps_copy (srccaps);
+      GstStructure *old_s, *tmp_s;
+
+      old_s = gst_caps_get_structure (old_caps, 0);
+      tmp_s = gst_caps_get_structure (tmp_caps, 0);
+      if (gst_structure_has_field (old_s, "codec_data"))
+        gst_structure_set_value (tmp_s, "codec_data",
+            gst_structure_get_value (old_s, "codec_data"));
+
+      if (!gst_caps_is_equal (old_caps, tmp_caps))
+        res =
+            gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay),
+            srccaps);
+      else
+        res = TRUE;
+
+      gst_caps_unref (tmp_caps);
+    }
+  } else {
+    res =
+        gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph265depay),
+        srccaps);
+  }
+
+  gst_caps_unref (srccaps);
+
+  /* Insert SPS and PPS into the stream on next opportunity */
+  if (rtph265depay->sps->len > 0 || rtph265depay->pps->len > 0) {
+    gint i;
+    GstBuffer *codec_data;
+    GstMapInfo map;
+    guint8 *data;
+    guint len = 0;
+
+    for (i = 0; i < rtph265depay->sps->len; i++) {
+      len += 4 + gst_buffer_get_size (g_ptr_array_index (rtph265depay->sps, i));
+    }
+
+    for (i = 0; i < rtph265depay->pps->len; i++) {
+      len += 4 + gst_buffer_get_size (g_ptr_array_index (rtph265depay->pps, i));
+    }
+
+    codec_data = gst_buffer_new_and_alloc (len);
+    gst_buffer_map (codec_data, &map, GST_MAP_WRITE);
+    data = map.data;
+
+    for (i = 0; i < rtph265depay->sps->len; i++) {
+      GstBuffer *sps_buf = g_ptr_array_index (rtph265depay->sps, i);
+      guint sps_size = gst_buffer_get_size (sps_buf);
+
+      if (rtph265depay->byte_stream)
+        memcpy (data, sync_bytes, sizeof (sync_bytes));
+      else
+        GST_WRITE_UINT32_BE (data, sps_size);
+      gst_buffer_extract (sps_buf, 0, data + 4, -1);
+      data += 4 + sps_size;
+    }
+
+    for (i = 0; i < rtph265depay->pps->len; i++) {
+      GstBuffer *pps_buf = g_ptr_array_index (rtph265depay->pps, i);
+      guint pps_size = gst_buffer_get_size (pps_buf);
+
+      if (rtph265depay->byte_stream)
+        memcpy (data, sync_bytes, sizeof (sync_bytes));
+      else
+        GST_WRITE_UINT32_BE (data, pps_size);
+      gst_buffer_extract (pps_buf, 0, data + 4, -1);
+      data += 4 + pps_size;
+    }
+
+    gst_buffer_unmap (codec_data, &map);
+    if (rtph265depay->codec_data)
+      gst_buffer_unref (rtph265depay->codec_data);
+    rtph265depay->codec_data = codec_data;
+  }
+
+  if (res)
+    rtph265depay->new_codec_data = FALSE;
+
+  return res;
+}
+
+gboolean
+gst_rtp_h265_add_vps_sps_pps (GstElement * rtph265, GPtrArray * vps_array,
+    GPtrArray * sps_array, GPtrArray * pps_array, GstBuffer * nal)
+{
+  GstMapInfo map;
+  guchar type;
+  guint i;
+
+  gst_buffer_map (nal, &map, GST_MAP_READ);
+
+  type = (map.data[0] >> 1) & 0x3f;
+
+  if (type == GST_H265_VPS_NUT) {
+    guint32 vps_id = (map.data[2] >> 4) & 0x0f;
+
+    for (i = 0; i < vps_array->len; i++) {
+      GstBuffer *vps = g_ptr_array_index (vps_array, i);
+      GstMapInfo vpsmap;
+      guint32 tmp_vps_id;
+
+      gst_buffer_map (vps, &vpsmap, GST_MAP_READ);
+      tmp_vps_id = (vpsmap.data[2] >> 4) & 0x0f;
+
+      if (vps_id == tmp_vps_id) {
+        if (map.size == vpsmap.size &&
+            memcmp (map.data, vpsmap.data, vpsmap.size) == 0) {
+          GST_LOG_OBJECT (rtph265, "Unchanged VPS %u, not updating", vps_id);
+          gst_buffer_unmap (vps, &vpsmap);
+          goto drop;
+        } else {
+          gst_buffer_unmap (vps, &vpsmap);
+          g_ptr_array_remove_index_fast (vps_array, i);
+          g_ptr_array_add (vps_array, nal);
+          GST_LOG_OBJECT (rtph265, "Modified VPS %u, replacing", vps_id);
+          goto done;
+        }
+      }
+      gst_buffer_unmap (vps, &vpsmap);
+    }
+    GST_LOG_OBJECT (rtph265, "Adding new VPS %u", vps_id);
+    g_ptr_array_add (vps_array, nal);
+  } else if (type == GST_H265_SPS_NUT) {
+    guint32 sps_id;
+
+    if (!parse_sps (&map, &sps_id)) {
+      GST_WARNING_OBJECT (rtph265, "Invalid SPS,"
+          " can't parse seq_parameter_set_id");
+      goto drop;
+    }
+
+    for (i = 0; i < sps_array->len; i++) {
+      GstBuffer *sps = g_ptr_array_index (sps_array, i);
+      GstMapInfo spsmap;
+      guint32 tmp_sps_id;
+
+      gst_buffer_map (sps, &spsmap, GST_MAP_READ);
+      parse_sps (&spsmap, &tmp_sps_id);
+
+      if (sps_id == tmp_sps_id) {
+        if (map.size == spsmap.size &&
+            memcmp (map.data, spsmap.data, spsmap.size) == 0) {
+          GST_LOG_OBJECT (rtph265, "Unchanged SPS %u, not updating", sps_id);
+          gst_buffer_unmap (sps, &spsmap);
+          goto drop;
+        } else {
+          gst_buffer_unmap (sps, &spsmap);
+          g_ptr_array_remove_index_fast (sps_array, i);
+          g_ptr_array_add (sps_array, nal);
+          GST_LOG_OBJECT (rtph265, "Modified SPS %u, replacing", sps_id);
+          goto done;
+        }
+      }
+      gst_buffer_unmap (sps, &spsmap);
+    }
+    GST_LOG_OBJECT (rtph265, "Adding new SPS %u", sps_id);
+    g_ptr_array_add (sps_array, nal);
+  } else if (type == GST_H265_PPS_NUT) {
+    guint32 sps_id;
+    guint32 pps_id;
+
+    if (!parse_pps (&map, &sps_id, &pps_id)) {
+      GST_WARNING_OBJECT (rtph265, "Invalid PPS,"
+          " can't parse seq_parameter_set_id or pic_parameter_set_id");
+      goto drop;
+    }
+
+    for (i = 0; i < pps_array->len; i++) {
+      GstBuffer *pps = g_ptr_array_index (pps_array, i);
+      GstMapInfo ppsmap;
+      guint32 tmp_sps_id;
+      guint32 tmp_pps_id;
+
+
+      gst_buffer_map (pps, &ppsmap, GST_MAP_READ);
+      parse_pps (&ppsmap, &tmp_sps_id, &tmp_pps_id);
+
+      if (pps_id == tmp_pps_id) {
+        if (map.size == ppsmap.size &&
+            memcmp (map.data, ppsmap.data, ppsmap.size) == 0) {
+          GST_LOG_OBJECT (rtph265, "Unchanged PPS %u:%u, not updating", sps_id,
+              pps_id);
+          gst_buffer_unmap (pps, &ppsmap);
+          goto drop;
+        } else {
+          gst_buffer_unmap (pps, &ppsmap);
+          g_ptr_array_remove_index_fast (pps_array, i);
+          g_ptr_array_add (pps_array, nal);
+          GST_LOG_OBJECT (rtph265, "Modified PPS %u:%u, replacing",
+              sps_id, pps_id);
+          goto done;
+        }
+      }
+      gst_buffer_unmap (pps, &ppsmap);
+    }
+    GST_LOG_OBJECT (rtph265, "Adding new PPS %u:%i", sps_id, pps_id);
+    g_ptr_array_add (pps_array, nal);
+  } else {
+    goto drop;
+  }
+
+done:
+  gst_buffer_unmap (nal, &map);
+
+  return TRUE;
+
+drop:
+  gst_buffer_unmap (nal, &map);
+  gst_buffer_unref (nal);
+
+  return FALSE;
+}
+
+
+static void
+gst_rtp_h265_depay_add_vps_sps_pps (GstRtpH265Depay * rtph265depay,
+    GstBuffer * nal)
+{
+  if (gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (rtph265depay),
+          rtph265depay->vps, rtph265depay->sps, rtph265depay->pps, nal))
+    rtph265depay->new_codec_data = TRUE;
+}
+
+static gboolean
+gst_rtp_h265_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
+{
+  gint clock_rate;
+  GstStructure *structure = gst_caps_get_structure (caps, 0);
+  GstRtpH265Depay *rtph265depay;
+  const gchar *ps;
+  GstBuffer *codec_data;
+  GstMapInfo map;
+  guint8 *ptr;
+
+  rtph265depay = GST_RTP_H265_DEPAY (depayload);
+
+  if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
+    clock_rate = 90000;
+  depayload->clock_rate = clock_rate;
+
+  /* Base64 encoded, comma separated config NALs */
+  ps = gst_structure_get_string (structure, "sprop-parameter-sets");
+
+  /* negotiate with downstream w.r.t. output format and alignment */
+  gst_rtp_h265_depay_negotiate (rtph265depay);
+
+  if (rtph265depay->byte_stream && ps != NULL) {
+    /* for bytestream we only need the parameter sets but we don't error out
+     * when they are not there, we assume they are in the stream. */
+    gchar **params;
+    guint len, total;
+    gint i;
+
+    params = g_strsplit (ps, ",", 0);
+
+    /* count total number of bytes in base64. Also include the sync bytes in
+     * front of the params. */
+    len = 0;
+    for (i = 0; params[i]; i++) {
+      len += strlen (params[i]);
+      len += sizeof (sync_bytes);
+    }
+    /* we seriously overshoot the length, but it's fine. */
+    codec_data = gst_buffer_new_and_alloc (len);
+
+    gst_buffer_map (codec_data, &map, GST_MAP_WRITE);
+    ptr = map.data;
+    total = 0;
+    for (i = 0; params[i]; i++) {
+      guint save = 0;
+      gint state = 0;
+
+      GST_DEBUG_OBJECT (depayload, "decoding param %d (%s)", i, params[i]);
+      memcpy (ptr, sync_bytes, sizeof (sync_bytes));
+      ptr += sizeof (sync_bytes);
+      len =
+          g_base64_decode_step (params[i], strlen (params[i]), ptr, &state,
+          &save);
+      GST_DEBUG_OBJECT (depayload, "decoded %d bytes", len);
+      total += len + sizeof (sync_bytes);
+      ptr += len;
+    }
+    gst_buffer_unmap (codec_data, &map);
+    gst_buffer_resize (codec_data, 0, total);
+    g_strfreev (params);
+
+    /* keep the codec_data, we need to send it as the first buffer. We cannot
+     * push it in the adapter because the adapter might be flushed on discont.
+     */
+    if (rtph265depay->codec_data)
+      gst_buffer_unref (rtph265depay->codec_data);
+    rtph265depay->codec_data = codec_data;
+  } else if (!rtph265depay->byte_stream) {
+    gchar **params;
+    gint i;
+
+    if (ps == NULL)
+      goto incomplete_caps;
+
+    params = g_strsplit (ps, ",", 0);
+
+    GST_DEBUG_OBJECT (depayload, "we have %d params", g_strv_length (params));
+
+    /* start with 23 bytes header */
+    for (i = 0; params[i]; i++) {
+      GstBuffer *nal;
+      GstMapInfo nalmap;
+      gsize nal_len;
+      guint save = 0;
+      gint state = 0;
+
+      nal_len = strlen (params[i]);
+      nal = gst_buffer_new_and_alloc (nal_len);
+      gst_buffer_map (nal, &nalmap, GST_MAP_READWRITE);
+
+      nal_len =
+          g_base64_decode_step (params[i], nal_len, nalmap.data, &state, &save);
+
+      GST_DEBUG_OBJECT (depayload, "adding param %d as %s", i,
+          (((nalmap.data[0] >> 1) & 0x3f) ==
+              32) ? "VPS" : (((nalmap.data[0] >> 1) & 0x3f) ==
+              33) ? "SPS" : "PPS");
+
+      gst_buffer_unmap (nal, &nalmap);
+      gst_buffer_set_size (nal, nal_len);
+
+      gst_rtp_h265_depay_add_vps_sps_pps (rtph265depay, nal);
+    }
+    g_strfreev (params);
+
+    if (rtph265depay->sps->len == 0 || rtph265depay->pps->len == 0)
+      goto incomplete_caps;
+  }
+
+  return gst_rtp_h265_set_src_caps (rtph265depay);
+
+  /* ERRORS */
+incomplete_caps:
+  {
+    GST_DEBUG_OBJECT (depayload, "we have incomplete caps,"
+        " doing setcaps later");
+    return TRUE;
+  }
+}
+
+static GstBuffer *
+gst_rtp_h265_complete_au (GstRtpH265Depay * rtph265depay,
+    GstClockTime * out_timestamp, gboolean * out_keyframe)
+{
+  guint outsize;
+  GstBuffer *outbuf;
+
+  /* we had a picture in the adapter and we completed it */
+  GST_DEBUG_OBJECT (rtph265depay, "taking completed AU");
+  outsize = gst_adapter_available (rtph265depay->picture_adapter);
+  outbuf = gst_adapter_take_buffer (rtph265depay->picture_adapter, outsize);
+
+  *out_timestamp = rtph265depay->last_ts;
+  *out_keyframe = rtph265depay->last_keyframe;
+
+  rtph265depay->last_keyframe = FALSE;
+  rtph265depay->picture_start = FALSE;
+
+  return outbuf;
+}
+
+/* VPS/SPS/PPS/RADL/TSA/RASL/IDR/CRA is considered key, all others DELTA;
+ * so downstream waiting for keyframe can pick up at VPS/SPS/PPS/IDR */
+
+#define NAL_TYPE_IS_PARAMETER_SET(nt) (		((nt) == GST_H265_VPS_NUT)\
+										||  ((nt) == GST_H265_SPS_NUT)\
+										||  ((nt) == GST_H265_PPS_NUT)				)
+
+#define NAL_TYPE_IS_CODED_SLICE_SEGMENT(nt) (		((nt) == GST_H265_NAL_SLICE_TRAIL_N)\
+												|| 	((nt) == GST_H265_NAL_SLICE_TRAIL_R)\
+												||  ((nt) == GST_H265_NAL_SLICE_TSA_N)\
+												||  ((nt) == GST_H265_NAL_SLICE_TSA_R)\
+												||  ((nt) == GST_H265_NAL_SLICE_STSA_N)\
+												||  ((nt) == GST_H265_NAL_SLICE_STSA_R)\
+												||  ((nt) == GST_H265_NAL_SLICE_RASL_N)\
+												||  ((nt) == GST_H265_NAL_SLICE_RASL_R)\
+												||  ((nt) == GST_H265_NAL_SLICE_BLA_W_LP)\
+												||  ((nt) == GST_H265_NAL_SLICE_BLA_W_RADL)\
+												||  ((nt) == GST_H265_NAL_SLICE_BLA_N_LP)\
+												||  ((nt) == GST_H265_NAL_SLICE_IDR_W_RADL)\
+												||  ((nt) == GST_H265_NAL_SLICE_IDR_N_LP)\
+												||  ((nt) == GST_H265_NAL_SLICE_CRA_NUT)		)
+
+#define NAL_TYPE_IS_KEY(nt) (NAL_TYPE_IS_PARAMETER_SET(nt) || NAL_TYPE_IS_CODED_SLICE_SEGMENT(nt))
+
+static gboolean
+foreach_metadata_copy (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
+{
+  CopyMetaData *data = user_data;
+  GstElement *element = data->element;
+  GstBuffer *outbuf = data->outbuf;
+  const GstMetaInfo *info = (*meta)->info;
+  const gchar *const *tags = gst_meta_api_type_get_tags (info->api);
+
+  if (!tags || (g_strv_length ((gchar **) tags) == 1
+          && gst_meta_api_type_has_tag (info->api,
+              g_quark_from_string (GST_META_TAG_VIDEO_STR)))) {
+    GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
+    GST_DEBUG_OBJECT (element, "copy metadata %s", g_type_name (info->api));
+    /* simply copy then */
+    info->transform_func (outbuf, *meta, inbuf,
+        _gst_meta_transform_copy, &copy_data);
+  } else {
+    GST_DEBUG_OBJECT (element, "not copying metadata %s",
+        g_type_name (info->api));
+  }
+
+  return TRUE;
+}
+
+/* TODO: Should probably make copy_tag an array at some point */
+void
+gst_rtp_copy_meta (GstElement * element, GstBuffer * outbuf, GstBuffer * inbuf,
+    GQuark copy_tag)
+{
+  CopyMetaData data = { element, outbuf, copy_tag };
+
+  gst_buffer_foreach_meta (inbuf, foreach_metadata_copy, &data);
+}
+
+static gboolean
+foreach_metadata_drop (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
+{
+  GstRtpH265Depay *depay = user_data;
+  const GstMetaInfo *info = (*meta)->info;
+  const gchar *const *tags = gst_meta_api_type_get_tags (info->api);
+
+  if (!tags || (g_strv_length ((gchar **) tags) == 1
+          && gst_meta_api_type_has_tag (info->api,
+              g_quark_from_string (GST_META_TAG_VIDEO_STR)))) {
+    GST_DEBUG_OBJECT (depay, "keeping metadata %s", g_type_name (info->api));
+  } else {
+    GST_DEBUG_OBJECT (depay, "dropping metadata %s", g_type_name (info->api));
+    *meta = NULL;
+  }
+
+  return TRUE;
+}
+
+static GstBuffer *
+gst_rtp_h265_depay_handle_nal (GstRtpH265Depay * rtph265depay, GstBuffer * nal,
+    GstClockTime in_timestamp, gboolean marker)
+{
+  GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtph265depay);
+  gint nal_type;
+  GstMapInfo map;
+  GstBuffer *outbuf = NULL;
+  GstClockTime out_timestamp;
+  gboolean keyframe, out_keyframe;
+
+  gst_buffer_map (nal, &map, GST_MAP_READ);
+  if (G_UNLIKELY (map.size < 5))
+    goto short_nal;
+
+  nal_type = (map.data[4] >> 1) & 0x3f;
+  GST_DEBUG_OBJECT (rtph265depay, "handle NAL type %d (RTP marker bit %d)",
+      nal_type, marker);
+
+  keyframe = NAL_TYPE_IS_KEY (nal_type);
+
+  out_keyframe = keyframe;
+  out_timestamp = in_timestamp;
+
+  if (!rtph265depay->byte_stream) {
+    if (NAL_TYPE_IS_PARAMETER_SET (nal_type)) {
+      gst_rtp_h265_depay_add_vps_sps_pps (rtph265depay,
+          gst_buffer_copy_region (nal, GST_BUFFER_COPY_ALL,
+              4, gst_buffer_get_size (nal) - 4));
+      gst_buffer_unmap (nal, &map);
+      gst_buffer_unref (nal);
+      return NULL;
+    } else if (rtph265depay->sps->len == 0 || rtph265depay->pps->len == 0) {
+      /* Down push down any buffer in non-bytestream mode if the SPS/PPS haven't
+       * go through yet
+       */
+      gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depayload),
+          gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
+              gst_structure_new ("GstForceKeyUnit",
+                  "all-headers", G_TYPE_BOOLEAN, TRUE, NULL)));
+      gst_buffer_unmap (nal, &map);
+      gst_buffer_unref (nal);
+      return NULL;
+    }
+
+    if (rtph265depay->new_codec_data &&
+        rtph265depay->sps->len > 0 && rtph265depay->pps->len > 0)
+      gst_rtp_h265_set_src_caps (rtph265depay);
+  }
+
+  if (rtph265depay->merge) {
+    gboolean start = FALSE, complete = FALSE;
+
+    /* marker bit isn't mandatory so in the following code we try to detect
+     * an AU boundary (see H.265 spec section 7.4.2.4.4) */
+    if (!marker) {
+
+      if (NAL_TYPE_IS_CODED_SLICE_SEGMENT (nal_type)) {
+        /* A NAL unit (X) ends an access unit if the next-occurring VCL NAL unit (Y) has the high-order bit of the first byte after its NAL unit header equal to 1 */
+        start = TRUE;
+        if (((map.data[6] >> 7) & 0x01) == 1) {
+          complete = TRUE;
+        }
+        complete = TRUE;
+      } else if ((nal_type >= 32 && nal_type <= 35)
+          || nal_type == 39 || (nal_type >= 41 && nal_type <= 44)
+          || (nal_type >= 48 && nal_type <= 55)) {
+        /* VPS, SPS, PPS, SEI, ... terminate an access unit */
+        complete = TRUE;
+      }
+      GST_DEBUG_OBJECT (depayload, "start %d, complete %d", start, complete);
+
+      if (complete && rtph265depay->picture_start)
+        outbuf = gst_rtp_h265_complete_au (rtph265depay, &out_timestamp,
+            &out_keyframe);
+    }
+    /* add to adapter */
+    gst_buffer_unmap (nal, &map);
+
+    GST_DEBUG_OBJECT (depayload, "adding NAL to picture adapter");
+    gst_adapter_push (rtph265depay->picture_adapter, nal);
+    rtph265depay->last_ts = in_timestamp;
+    rtph265depay->last_keyframe |= keyframe;
+    rtph265depay->picture_start |= start;
+
+    if (marker)
+      outbuf = gst_rtp_h265_complete_au (rtph265depay, &out_timestamp,
+          &out_keyframe);
+  } else {
+    /* no merge, output is input nal */
+    GST_DEBUG_OBJECT (depayload, "using NAL as output");
+    outbuf = nal;
+    gst_buffer_unmap (nal, &map);
+  }
+
+  if (outbuf) {
+    /* prepend codec_data */
+    if (rtph265depay->codec_data) {
+      GST_DEBUG_OBJECT (depayload, "prepending codec_data");
+      gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265depay),
+          rtph265depay->codec_data, outbuf,
+          g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+      outbuf = gst_buffer_append (rtph265depay->codec_data, outbuf);
+      rtph265depay->codec_data = NULL;
+      out_keyframe = TRUE;
+    }
+    outbuf = gst_buffer_make_writable (outbuf);
+
+    gst_buffer_foreach_meta (outbuf, foreach_metadata_drop, depayload);
+
+    GST_BUFFER_PTS (outbuf) = out_timestamp;
+
+    if (out_keyframe)
+      GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
+    else
+      GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
+  }
+
+  return outbuf;
+
+  /* ERRORS */
+short_nal:
+  {
+    GST_WARNING_OBJECT (depayload, "dropping short NAL");
+    gst_buffer_unmap (nal, &map);
+    gst_buffer_unref (nal);
+    return NULL;
+  }
+}
+
+static GstBuffer *
+gst_rtp_h265_push_fragmentation_unit (GstRtpH265Depay * rtph265depay,
+    gboolean send)
+{
+  guint outsize;
+  GstMapInfo map;
+  GstBuffer *outbuf;
+
+  outsize = gst_adapter_available (rtph265depay->adapter);
+  outbuf = gst_adapter_take_buffer (rtph265depay->adapter, outsize);
+
+  gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+  GST_DEBUG_OBJECT (rtph265depay, "output %d bytes", outsize);
+
+  if (rtph265depay->byte_stream) {
+    memcpy (map.data, sync_bytes, sizeof (sync_bytes));
+  } else {
+    goto not_implemented;
+  }
+  gst_buffer_unmap (outbuf, &map);
+
+  rtph265depay->current_fu_type = 0;
+
+  outbuf = gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf,
+      rtph265depay->fu_timestamp, rtph265depay->fu_marker);
+
+  if (send && outbuf) {
+    gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtph265depay), outbuf);
+    outbuf = NULL;
+  }
+  return outbuf;
+
+not_implemented:
+  {
+    GST_ERROR_OBJECT (rtph265depay,
+        ("Only bytestream format is currently supported."));
+    gst_buffer_unmap (outbuf, &map);
+    return NULL;
+  }
+}
+
+static GstBuffer *
+gst_rtp_h265_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
+{
+  GstRtpH265Depay *rtph265depay;
+  GstBuffer *buf;
+  GstBuffer *outbuf = NULL;
+  guint8 nal_unit_type;
+
+  rtph265depay = GST_RTP_H265_DEPAY (depayload);
+
+  /* flush remaining data on discont */
+  if (GST_BUFFER_IS_DISCONT (rtp->buffer)) {
+    gst_adapter_clear (rtph265depay->adapter);
+    rtph265depay->wait_start = TRUE;
+    rtph265depay->current_fu_type = 0;
+  }
+
+  {
+    gint payload_len;
+    guint8 *payload;
+    guint header_len;
+    GstMapInfo map;
+    guint outsize, nalu_size;
+    GstClockTime timestamp;
+    gboolean marker;
+    guint8 nuh_layer_id, nuh_temporal_id_plus1;
+    guint8 S, E;
+    guint16 nal_header;
+#if 0
+    gboolean donl_present = FALSE;
+#endif
+
+    timestamp = GST_BUFFER_PTS (rtp->buffer);
+
+    payload_len = gst_rtp_buffer_get_payload_len (rtp);
+    payload = gst_rtp_buffer_get_payload (rtp);
+    buf = gst_rtp_buffer_get_payload_buffer (rtp);
+    marker = gst_rtp_buffer_get_marker (rtp);
+
+    GST_DEBUG_OBJECT (rtph265depay, "receiving %d bytes", payload_len);
+
+    if (payload_len == 0)
+      goto empty_packet;
+
+    /* +---------------+---------------+
+     * |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
+     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+     * |F|   Type    |  LayerId  | TID |
+     * +-------------+-----------------+
+     *
+     * F must be 0.
+     *
+     */
+    nal_unit_type = (payload[0] >> 1) & 0x3f;
+    nuh_layer_id = ((payload[0] & 0x01) << 5) | (payload[1] >> 3);      /* should be zero for now but this could change in future HEVC extensions */
+    nuh_temporal_id_plus1 = payload[1] & 0x03;
+
+    /* At least two byte header with type */
+    header_len = 2;
+
+    GST_DEBUG_OBJECT (rtph265depay,
+        "NAL header nal_unit_type %d, nuh_temporal_id_plus1 %d", nal_unit_type,
+        nuh_temporal_id_plus1);
+
+    GST_FIXME_OBJECT (rtph265depay, "Assuming DONL field is not present");
+
+    /* FIXME - assuming DONL field is not present for now */
+    /*donl_present = (tx-mode == "MST") || (sprop-max-don-diff > 0); */
+
+    /* If FU unit was being processed, but the current nal is of a different
+     * type.  Assume that the remote payloader is buggy (didn't set the end bit
+     * when the FU ended) and send out what we gathered thusfar */
+    if (G_UNLIKELY (rtph265depay->current_fu_type != 0 &&
+            nal_unit_type != rtph265depay->current_fu_type))
+      gst_rtp_h265_push_fragmentation_unit (rtph265depay, TRUE);
+
+    switch (nal_unit_type) {
+      case 48:
+      {
+        GST_DEBUG_OBJECT (rtph265depay, "Processing aggregation packet");
+
+        /* Aggregation packet (section 4.7) */
+
+        /*  An example of an AP packet containing two aggregation units
+           without the DONL and DOND fields
+
+           0                   1                   2                   3
+           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           |                          RTP Header                           |
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           |   PayloadHdr (Type=48)        |         NALU 1 Size           |
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           |          NALU 1 HDR           |                               |
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+         NALU 1 Data           |
+           |                   . . .                                       |
+           |                                                               |
+           +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           |  . . .        | NALU 2 Size                   | NALU 2 HDR    |
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           | NALU 2 HDR    |                                               |
+           +-+-+-+-+-+-+-+-+              NALU 2 Data                      |
+           |                   . . .                                       |
+           |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+           |                               :...OPTIONAL RTP padding        |
+           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         */
+
+        /* strip headers */
+        payload += header_len;
+        payload_len -= header_len;
+
+        rtph265depay->wait_start = FALSE;
+
+#if 0
+        if (donl_present)
+          goto not_implemented_donl_present;
+#endif
+
+        while (payload_len > 2) {
+
+          nalu_size = (payload[0] << 8) | payload[1];
+
+          /* dont include nalu_size */
+          if (nalu_size > (payload_len - 2))
+            nalu_size = payload_len - 2;
+
+          outsize = nalu_size + sizeof (sync_bytes);
+          outbuf = gst_buffer_new_and_alloc (outsize);
+
+          gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+          if (rtph265depay->byte_stream) {
+            memcpy (map.data, sync_bytes, sizeof (sync_bytes));
+          } else {
+            goto not_implemented;
+          }
+
+          /* strip NALU size */
+          payload += 2;
+          payload_len -= 2;
+
+          memcpy (map.data + sizeof (sync_bytes), payload, nalu_size);
+          gst_buffer_unmap (outbuf, &map);
+
+          gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265depay), outbuf, buf,
+              g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+
+          outbuf =
+              gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
+              marker);
+          if (outbuf)
+            gst_adapter_push (rtph265depay->adapter, outbuf);
+
+          payload += nalu_size;
+          payload_len -= nalu_size;
+        }
+
+        outsize = gst_adapter_available (rtph265depay->adapter);
+        if (outsize > 0) {
+          outbuf = gst_adapter_take_buffer (rtph265depay->adapter, outsize);
+          outbuf =
+              gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
+              marker);
+        }
+        break;
+      }
+      case 49:
+      {
+        GST_DEBUG_OBJECT (rtph265depay, "Processing Fragmentation Unit");
+
+        /* Fragmentation units (FUs)  Section 4.8 */
+
+        /*    The structure of a Fragmentation Unit (FU)
+         *
+         *    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         |    PayloadHdr (Type=49)       |   FU header   | DONL (cond)   |
+         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
+         | DONL (cond)   |                                               |
+         |-+-+-+-+-+-+-+-+                                               |
+         |                         FU payload                            |
+         |                                                               |
+         |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         |                               :...OPTIONAL RTP padding        |
+         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         *
+         *
+         */
+
+        /* strip headers */
+        payload += header_len;
+        payload_len -= header_len;
+
+        /* processing FU header */
+        S = (payload[0] & 0x80) == 0x80;
+        E = (payload[0] & 0x40) == 0x40;
+
+        GST_DEBUG_OBJECT (rtph265depay,
+            "FU header with S %d, E %d, nal_unit_type %d", S, E,
+            payload[0] & 0x3f);
+
+        if (rtph265depay->wait_start && !S)
+          goto waiting_start;
+
+#if 0
+        if (donl_present)
+          goto not_implemented_donl_present;
+#endif
+
+        if (S) {
+
+          GST_DEBUG_OBJECT (rtph265depay, "Start of Fragmentation Unit");
+
+          /* If a new FU unit started, while still processing an older one.
+           * Assume that the remote payloader is buggy (doesn't set the end
+           * bit) and send out what we've gathered thusfar */
+          if (G_UNLIKELY (rtph265depay->current_fu_type != 0))
+            gst_rtp_h265_push_fragmentation_unit (rtph265depay, TRUE);
+
+          rtph265depay->current_fu_type = nal_unit_type;
+          rtph265depay->fu_timestamp = timestamp;
+
+          rtph265depay->wait_start = FALSE;
+
+          /* reconstruct NAL header */
+          nal_header =
+              ((payload[0] & 0x3f) << 9) | (nuh_layer_id << 3) |
+              nuh_temporal_id_plus1;
+
+          /* go back one byte so we can copy the payload + two bytes more in the front which
+           * will be overwritten by the nal_header
+           */
+          payload -= 1;
+          payload_len += 1;
+
+          nalu_size = payload_len;
+          outsize = nalu_size + sizeof (sync_bytes);
+          outbuf = gst_buffer_new_and_alloc (outsize);
+
+          gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+          memcpy (map.data + sizeof (sync_bytes), payload, nalu_size);
+          map.data[sizeof (sync_bytes)] = nal_header >> 8;
+          map.data[sizeof (sync_bytes) + 1] = nal_header & 0xff;
+          gst_buffer_unmap (outbuf, &map);
+
+          gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265depay), outbuf, buf,
+              g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+
+          GST_DEBUG_OBJECT (rtph265depay, "queueing %d bytes", outsize);
+
+          /* and assemble in the adapter */
+          gst_adapter_push (rtph265depay->adapter, outbuf);
+        } else {
+
+          GST_DEBUG_OBJECT (rtph265depay,
+              "Following part of Fragmentation Unit");
+
+          /* strip off FU header byte */
+          payload += 1;
+          payload_len -= 1;
+
+          outsize = payload_len;
+          outbuf = gst_buffer_new_and_alloc (outsize);
+          gst_buffer_fill (outbuf, 0, payload, outsize);
+
+          gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265depay), outbuf, buf,
+              g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+
+          GST_DEBUG_OBJECT (rtph265depay, "queueing %d bytes", outsize);
+
+          /* and assemble in the adapter */
+          gst_adapter_push (rtph265depay->adapter, outbuf);
+        }
+
+        outbuf = NULL;
+        rtph265depay->fu_marker = marker;
+
+        /* if NAL unit ends, flush the adapter */
+        if (E) {
+          outbuf = gst_rtp_h265_push_fragmentation_unit (rtph265depay, FALSE);
+          GST_DEBUG_OBJECT (rtph265depay, "End of Fragmentation Unit");
+        }
+        break;
+      }
+      case 50:
+        goto not_implemented;   /* PACI packets  Section 4.9 */
+      default:
+      {
+        rtph265depay->wait_start = FALSE;
+
+        /* All other cases: Single NAL unit packet   Section 4.6 */
+        /* the entire payload is the output buffer */
+
+#if 0
+        if (donl_present)
+          goto not_implemented_donl_present;
+#endif
+
+        nalu_size = payload_len;
+        outsize = nalu_size + sizeof (sync_bytes);
+        outbuf = gst_buffer_new_and_alloc (outsize);
+
+        gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+        if (rtph265depay->byte_stream) {
+          memcpy (map.data, sync_bytes, sizeof (sync_bytes));
+        } else {
+          goto not_implemented;
+        }
+        memcpy (map.data + sizeof (sync_bytes), payload, nalu_size);
+        gst_buffer_unmap (outbuf, &map);
+
+        gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265depay), outbuf, buf,
+            g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+
+        outbuf = gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
+            marker);
+        break;
+      }
+    }
+  }
+
+  gst_buffer_unref (buf);
+
+  return outbuf;
+
+  /* ERRORS */
+empty_packet:
+  {
+    GST_DEBUG_OBJECT (rtph265depay, "empty packet");
+    gst_buffer_unref (buf);
+    return NULL;
+  }
+waiting_start:
+  {
+    GST_DEBUG_OBJECT (rtph265depay, "waiting for start");
+    gst_buffer_unref (buf);
+    return NULL;
+  }
+#if 0
+not_implemented_donl_present:
+  {
+    GST_ELEMENT_ERROR (rtph265depay, STREAM, FORMAT,
+        (NULL), ("DONL field present not supported yet"));
+    gst_buffer_unref (buf);
+    return NULL;
+  }
+#endif
+not_implemented:
+  {
+    GST_ELEMENT_ERROR (rtph265depay, STREAM, FORMAT,
+        (NULL), ("NAL unit type %d not supported yet", nal_unit_type));
+    gst_buffer_unref (buf);
+    return NULL;
+  }
+}
+
+static gboolean
+gst_rtp_h265_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event)
+{
+  GstRtpH265Depay *rtph265depay;
+
+  rtph265depay = GST_RTP_H265_DEPAY (depay);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      gst_rtp_h265_depay_reset (rtph265depay);
+      break;
+    default:
+      break;
+  }
+
+  return
+      GST_RTP_BASE_DEPAYLOAD_CLASS (parent_class)->handle_event (depay, event);
+}
+
+static GstStateChangeReturn
+gst_rtp_h265_depay_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstRtpH265Depay *rtph265depay;
+  GstStateChangeReturn ret;
+
+  rtph265depay = GST_RTP_H265_DEPAY (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      gst_rtp_h265_depay_reset (rtph265depay);
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      break;
+    default:
+      break;
+  }
+  return ret;
+}
+
+gboolean
+gst_rtp_h265_depay_plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (rtph265depay_debug, "rtph265depay", 0,
+      "H265 Video RTP Depayloader");
+
+  return gst_element_register (plugin, "rtph265depay",
+      GST_RANK_SECONDARY, GST_TYPE_RTP_H265_DEPAY);
+}
diff --git a/gst/rtp/gstrtph265depay.h b/gst/rtp/gstrtph265depay.h
new file mode 100644
index 0000000..9f50ac6
--- /dev/null
+++ b/gst/rtp/gstrtph265depay.h
@@ -0,0 +1,107 @@
+/* GStreamer
+ * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) <2014> Jurgen Slowack <jurgenslowack@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_RTP_H265_DEPAY_H__
+#define __GST_RTP_H265_DEPAY_H__
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+#include <gst/rtp/gstrtpbasedepayload.h>
+#include <gst/codecparsers/gsth265parser.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_RTP_H265_DEPAY \
+  (gst_rtp_h265_depay_get_type())
+#define GST_RTP_H265_DEPAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H265_DEPAY,GstRtpH265Depay))
+#define GST_RTP_H265_DEPAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H265_DEPAY,GstRtpH265DepayClass))
+#define GST_IS_RTP_H265_DEPAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H265_DEPAY))
+#define GST_IS_RTP_H265_DEPAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H265_DEPAY))
+typedef struct _GstRtpH265Depay GstRtpH265Depay;
+typedef struct _GstRtpH265DepayClass GstRtpH265DepayClass;
+
+#define GST_H265_VPS_NUT 32
+#define GST_H265_SPS_NUT 33
+#define GST_H265_PPS_NUT 34
+
+typedef enum
+{
+  GST_H265_STREAM_FORMAT_UNKNOWN,
+  GST_H265_STREAM_FORMAT_BYTESTREAM,
+  GST_H265_STREAM_FORMAT_HVC1,
+  GST_H265_STREAM_FORMAT_HEV1
+} GstH265StreamFormat;
+
+struct _GstRtpH265Depay
+{
+  GstRTPBaseDepayload depayload;
+
+  gchar *stream_format;
+  gboolean byte_stream;
+
+  GstBuffer *codec_data;
+  GstAdapter *adapter;
+  gboolean wait_start;
+
+  /* nal merging */
+  gboolean merge;
+  GstAdapter *picture_adapter;
+  gboolean picture_start;
+  GstClockTime last_ts;
+  gboolean last_keyframe;
+
+  /* Work around broken payloaders wrt. Fragmentation Units */
+  guint8 current_fu_type;
+  GstClockTime fu_timestamp;
+  gboolean fu_marker;
+
+  /* misc */
+  GPtrArray *vps;
+  GPtrArray *sps;
+  GPtrArray *pps;
+  gboolean new_codec_data;
+};
+
+struct _GstRtpH265DepayClass
+{
+  GstRTPBaseDepayloadClass parent_class;
+};
+
+typedef struct
+{
+  GstElement *element;
+  GstBuffer *outbuf;
+  GQuark copy_tag;
+} CopyMetaData;
+
+void gst_rtp_copy_meta (GstElement * element, GstBuffer *outbuf, GstBuffer *inbuf, GQuark copy_tag);
+
+GType gst_rtp_h265_depay_get_type (void);
+
+gboolean gst_rtp_h265_depay_plugin_init (GstPlugin * plugin);
+
+gboolean gst_rtp_h265_add_vps_sps_pps (GstElement * rtph265, GPtrArray * vps,
+    GPtrArray * sps, GPtrArray * pps, GstBuffer * nal);
+
+G_END_DECLS
+#endif /* __GST_RTP_H265_DEPAY_H__ */
diff --git a/gst/rtp/gstrtph265pay.c b/gst/rtp/gstrtph265pay.c
new file mode 100644
index 0000000..b17b091
--- /dev/null
+++ b/gst/rtp/gstrtph265pay.c
@@ -0,0 +1,1503 @@
+/* GStreamer
+ * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) <2014> Jurgen Slowack <jurgenslowack@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 <string.h>
+#include <stdlib.h>
+
+#include <gst/rtp/gstrtpbuffer.h>
+#include <gst/pbutils/pbutils.h>
+#include <gst/video/video.h>
+
+/* Included to not duplicate gst_rtp_h265_add_vps_sps_pps () */
+#include "gstrtph265depay.h"
+
+#include "gstrtph265pay.h"
+
+
+GST_DEBUG_CATEGORY_STATIC (rtph265pay_debug);
+#define GST_CAT_DEFAULT (rtph265pay_debug)
+
+/* references:
+ *
+ * Internet Draft RTP Payload Format for High Efficiency Video Coding
+ *
+ *                   draft-ietf-payload-rtp-h265-03.txt
+ *
+ * This draft will be replaced with an RFC, so some details may change.
+ *
+ */
+
+static GstStaticPadTemplate gst_rtp_h265_pay_sink_template =
+    GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (
+        /* Only bytestream format supported for now */
+        /* "video/x-h265, "
+           "stream-format = (string) hvc1, alignment = (string) au; "
+           "video/x-h265, "
+           "stream-format = (string) hev1, alignment = (string) au; " */
+        "video/x-h265, "
+        "stream-format = (string) byte-stream, alignment = (string) { nal, au }")
+    );
+
+static GstStaticPadTemplate gst_rtp_h265_pay_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp, "
+        "media = (string) \"video\", "
+        "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
+        "clock-rate = (int) 90000, " "encoding-name = (string) \"H265\"")
+                /** optional parameters **/
+    /* "profile-space = (int) [ 0, 3 ], " */
+    /* "profile-id = (int) [ 0, 31 ], " */
+    /* "tier-flag = (int) [ 0, 1 ], " */
+    /* "level-id = (int) [ 0, 255 ], " */
+    /* "interop-constraints = (string) ANY, " */
+    /* "profile-compatibility-indicator = (string) ANY, " */
+    /* "sprop-sub-layer-id = (int) [ 0, 6 ], " */
+    /* "recv-sub-layer-id = (int) [ 0, 6 ], " */
+    /* "max-recv-level-id = (int) [ 0, 255 ], " */
+    /* "tx-mode = (string) {MST , SST}, " */
+    /* "sprop-vps = (string) ANY, " */
+    /* "sprop-sps = (string) ANY, " */
+    /* "sprop-pps = (string) ANY, " */
+    /* "sprop-sei = (string) ANY, " */
+    /* "max-lsr = (int) ANY, " *//* MUST be in the range of MaxLumaSR to 16 * MaxLumaSR, inclusive */
+    /* "max-lps = (int) ANY, " *//* MUST be in the range of MaxLumaPS to 16 * MaxLumaPS, inclusive */
+    /* "max-cpb = (int) ANY, " *//* MUST be in the range of MaxCPB to 16 * MaxCPB, inclusive */
+    /* "max-dpb = (int) [1, 16], " */
+    /* "max-br = (int) ANY, " *//* MUST be in the range of MaxBR to 16 * MaxBR, inclusive, for the highest level */
+    /* "max-tr = (int) ANY, " *//* MUST be in the range of MaxTileRows to 16 * MaxTileRows, inclusive, for the highest level */
+    /* "max-tc = (int) ANY, " *//* MUST be in the range of MaxTileCols to 16 * MaxTileCols, inclusive, for the highest level */
+    /* "max-fps = (int) ANY, " */
+    /* "sprop-max-don-diff = (int) [0, 32767], " */
+    /* "sprop-depack-buf-nalus = (int) [0, 32767], " */
+    /* "sprop-depack-buf-nalus = (int) [0, 4294967295], " */
+    /* "depack-buf-cap = (int) [1, 4294967295], " */
+    /* "sprop-segmentation-id = (int) [0, 3], " */
+    /* "sprop-spatial-segmentation-idc = (string) ANY, " */
+    /* "dec-parallel-cap = (string) ANY, " */
+    );
+
+#define DEFAULT_SPROP_PARAMETER_SETS    NULL
+#define DEFAULT_CONFIG_INTERVAL		      0
+
+enum
+{
+  PROP_0,
+  PROP_SPROP_PARAMETER_SETS,
+  PROP_CONFIG_INTERVAL
+};
+
+#define IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06))
+
+static void gst_rtp_h265_pay_finalize (GObject * object);
+
+static void gst_rtp_h265_pay_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_rtp_h265_pay_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static GstCaps *gst_rtp_h265_pay_getcaps (GstRTPBasePayload * payload,
+    GstPad * pad, GstCaps * filter);
+static gboolean gst_rtp_h265_pay_setcaps (GstRTPBasePayload * basepayload,
+    GstCaps * caps);
+static GstFlowReturn gst_rtp_h265_pay_handle_buffer (GstRTPBasePayload * pad,
+    GstBuffer * buffer);
+static gboolean gst_rtp_h265_pay_sink_event (GstRTPBasePayload * payload,
+    GstEvent * event);
+static GstStateChangeReturn gst_rtp_h265_pay_change_state (GstElement *
+    element, GstStateChange transition);
+
+#define gst_rtp_h265_pay_parent_class parent_class
+G_DEFINE_TYPE (GstRtpH265Pay, gst_rtp_h265_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+
+static void
+gst_rtp_h265_pay_class_init (GstRtpH265PayClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+  GstRTPBasePayloadClass *gstrtpbasepayload_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+  gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
+
+  gobject_class->set_property = gst_rtp_h265_pay_set_property;
+  gobject_class->get_property = gst_rtp_h265_pay_get_property;
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass),
+      PROP_SPROP_PARAMETER_SETS, g_param_spec_string ("sprop-parameter-sets",
+          "sprop-parameter-sets",
+          "The base64 sprop-parameter-sets to set in out caps (set to NULL to "
+          "extract from stream)",
+          DEFAULT_SPROP_PARAMETER_SETS,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass),
+      PROP_CONFIG_INTERVAL,
+      g_param_spec_uint ("config-interval",
+          "VPS SPS PPS Send Interval",
+          "Send VPS, SPS and PPS Insertion Interval in seconds (sprop parameter sets "
+          "will be multiplexed in the data stream when detected.) (0 = disabled)",
+          0, 3600, DEFAULT_CONFIG_INTERVAL,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
+      );
+
+  gobject_class->finalize = gst_rtp_h265_pay_finalize;
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_rtp_h265_pay_src_template));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&gst_rtp_h265_pay_sink_template));
+
+  gst_element_class_set_static_metadata (gstelement_class, "RTP H265 payloader",
+      "Codec/Payloader/Network/RTP",
+      "Payload-encode H265 video into RTP packets (based on draft-ietf-payload-rtp-h265-03.txt)",
+      "Jurgen Slowack <jurgenslowack@gmail.com>");
+
+  gstelement_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_rtp_h265_pay_change_state);
+
+  gstrtpbasepayload_class->get_caps = gst_rtp_h265_pay_getcaps;
+  gstrtpbasepayload_class->set_caps = gst_rtp_h265_pay_setcaps;
+  gstrtpbasepayload_class->handle_buffer = gst_rtp_h265_pay_handle_buffer;
+  gstrtpbasepayload_class->sink_event = gst_rtp_h265_pay_sink_event;
+
+  GST_DEBUG_CATEGORY_INIT (rtph265pay_debug, "rtph265pay", 0,
+      "H265 RTP Payloader");
+}
+
+static void
+gst_rtp_h265_pay_init (GstRtpH265Pay * rtph265pay)
+{
+  rtph265pay->queue = g_array_new (FALSE, FALSE, sizeof (guint));
+  rtph265pay->profile = 0;
+  rtph265pay->sps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+  rtph265pay->pps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+  rtph265pay->vps = g_ptr_array_new_with_free_func (
+      (GDestroyNotify) gst_buffer_unref);
+  rtph265pay->last_vps_sps_pps = -1;
+  rtph265pay->vps_sps_pps_interval = DEFAULT_CONFIG_INTERVAL;
+
+  rtph265pay->adapter = gst_adapter_new ();
+}
+
+static void
+gst_rtp_h265_pay_clear_vps_sps_pps (GstRtpH265Pay * rtph265pay)
+{
+  g_ptr_array_set_size (rtph265pay->vps, 0);
+  g_ptr_array_set_size (rtph265pay->sps, 0);
+  g_ptr_array_set_size (rtph265pay->pps, 0);
+}
+
+static void
+gst_rtp_h265_pay_finalize (GObject * object)
+{
+  GstRtpH265Pay *rtph265pay;
+
+  rtph265pay = GST_RTP_H265_PAY (object);
+
+  g_array_free (rtph265pay->queue, TRUE);
+
+  g_ptr_array_free (rtph265pay->sps, TRUE);
+  g_ptr_array_free (rtph265pay->pps, TRUE);
+  g_ptr_array_free (rtph265pay->vps, TRUE);
+
+  g_free (rtph265pay->sprop_parameter_sets);
+
+  g_object_unref (rtph265pay->adapter);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static const gchar all_levels[][4] = {
+  "1",
+  "2",
+  "2.1",
+  "3",
+  "3.1",
+  "4",
+  "4.1",
+  "5",
+  "5.1",
+  "5.2",
+  "6",
+  "6.1",
+  "6.2"
+};
+
+static GstCaps *
+gst_rtp_h265_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
+    GstCaps * filter)
+{
+  GstCaps *template_caps;
+  GstCaps *allowed_caps;
+  GstCaps *caps;
+  GstCaps *icaps;
+  gboolean append_unrestricted;
+  guint i;
+
+  allowed_caps =
+      gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL);
+
+  if (allowed_caps == NULL)
+    return NULL;
+
+  template_caps =
+      gst_static_pad_template_get_caps (&gst_rtp_h265_pay_sink_template);
+
+  if (gst_caps_is_any (allowed_caps)) {
+    caps = gst_caps_ref (template_caps);
+    goto done;
+  }
+
+  if (gst_caps_is_empty (allowed_caps)) {
+    caps = gst_caps_ref (allowed_caps);
+    goto done;
+  }
+
+  caps = gst_caps_new_empty ();
+
+  append_unrestricted = FALSE;
+  for (i = 0; i < gst_caps_get_size (allowed_caps); i++) {
+    GstStructure *s = gst_caps_get_structure (allowed_caps, i);
+    GstStructure *new_s = gst_structure_new_empty ("video/x-h265");
+    const gchar *profile_level_id;
+
+    profile_level_id = gst_structure_get_string (s, "profile-level-id");
+
+    if (profile_level_id && strlen (profile_level_id) == 6) {   /* Code taken from gstrtph264pay.c, needs to be revised for H.265 */
+      const gchar *profile;
+      const gchar *level;
+      long int spsint;
+      guint8 sps[3];
+
+      spsint = strtol (profile_level_id, NULL, 16);
+      sps[0] = spsint >> 16;
+      sps[1] = spsint >> 8;
+      sps[2] = spsint;
+
+      profile = gst_codec_utils_h265_get_profile (sps, 3);
+      level = gst_codec_utils_h265_get_level (sps, 3);
+
+      if (profile && level) {
+        GST_LOG_OBJECT (payload, "In caps, have profile %s and level %s",
+            profile, level);
+
+        if (!strcmp (profile, "main"))
+          gst_structure_set (new_s, "profile", G_TYPE_STRING, profile, NULL);
+        else {
+          GValue val = { 0, };
+          GValue profiles = { 0, };
+
+          g_value_init (&profiles, GST_TYPE_LIST);
+          g_value_init (&val, G_TYPE_STRING);
+
+          g_value_set_static_string (&val, profile);
+          gst_value_list_append_value (&profiles, &val);
+
+          g_value_set_static_string (&val, "main");
+          gst_value_list_append_value (&profiles, &val);
+
+          gst_structure_take_value (new_s, "profile", &profiles);
+        }
+
+        if (!strcmp (level, "1"))
+          gst_structure_set (new_s, "level", G_TYPE_STRING, level, NULL);
+        else {
+          GValue levels = { 0, };
+          GValue val = { 0, };
+          int j;
+
+          g_value_init (&levels, GST_TYPE_LIST);
+          g_value_init (&val, G_TYPE_STRING);
+
+          for (j = 0; j < G_N_ELEMENTS (all_levels); j++) {
+            g_value_set_static_string (&val, all_levels[j]);
+            gst_value_list_prepend_value (&levels, &val);
+            if (!strcmp (level, all_levels[j]))
+              break;
+          }
+          gst_structure_take_value (new_s, "level", &levels);
+        }
+      } else {
+        /* Invalid profile-level-id means main */
+
+        gst_structure_set (new_s, "profile", G_TYPE_STRING, "main", NULL);
+      }
+    } else {
+      /* No profile-level-id means main or unrestricted */
+
+      gst_structure_set (new_s, "profile", G_TYPE_STRING, "main", NULL);
+      append_unrestricted = TRUE;
+    }
+
+    caps = gst_caps_merge_structure (caps, new_s);
+  }
+
+  if (append_unrestricted) {
+    caps =
+        gst_caps_merge_structure (caps, gst_structure_new ("video/x-h265", NULL,
+            NULL));
+  }
+
+  icaps = gst_caps_intersect (caps, template_caps);
+  gst_caps_unref (caps);
+  caps = icaps;
+
+done:
+
+  gst_caps_unref (template_caps);
+  gst_caps_unref (allowed_caps);
+
+  GST_LOG_OBJECT (payload, "returning caps %" GST_PTR_FORMAT, caps);
+  return caps;
+}
+
+/* take the currently configured VPS, SPS and PPS lists and set them on the caps as
+ * sprop-parameter-sets */
+static gboolean
+gst_rtp_h265_pay_set_vps_sps_pps (GstRTPBasePayload * basepayload)
+{
+  GstRtpH265Pay *payloader = GST_RTP_H265_PAY (basepayload);
+  gchar *profile;
+  gchar *set;
+  GString *sprops;
+  guint count;
+  gboolean res;
+  GstMapInfo map;
+  guint i;
+
+  sprops = g_string_new ("");
+  count = 0;
+
+  GST_DEBUG_OBJECT (payloader,
+      "Entering function gst_rtp_h265_pay_set_vps_sps_pps");
+
+  /* build the sprop-parameter-sets */
+  for (i = 0; i < payloader->vps->len; i++) {
+    GstBuffer *vps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (payloader->vps, i));
+
+    gst_buffer_map (vps_buf, &map, GST_MAP_READ);
+    set = g_base64_encode (map.data, map.size);
+    gst_buffer_unmap (vps_buf, &map);
+
+    g_string_append_printf (sprops, "%s%s", count ? "," : "", set);
+    g_free (set);
+    count++;
+  }
+  for (i = 0; i < payloader->sps->len; i++) {
+    GstBuffer *sps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (payloader->sps, i));
+
+    gst_buffer_map (sps_buf, &map, GST_MAP_READ);
+    set = g_base64_encode (map.data, map.size);
+    gst_buffer_unmap (sps_buf, &map);
+
+    g_string_append_printf (sprops, "%s%s", count ? "," : "", set);
+    g_free (set);
+    count++;
+  }
+  for (i = 0; i < payloader->pps->len; i++) {
+    GstBuffer *pps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (payloader->pps, i));
+
+    gst_buffer_map (pps_buf, &map, GST_MAP_READ);
+    set = g_base64_encode (map.data, map.size);
+    gst_buffer_unmap (pps_buf, &map);
+
+    g_string_append_printf (sprops, "%s%s", count ? "," : "", set);
+    g_free (set);
+    count++;
+  }
+
+  if (G_LIKELY (count)) {
+    /* profile is 24 bit. Force it to respect the limit */
+    profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff);
+    /* combine into output caps */
+    res = gst_rtp_base_payload_set_outcaps (basepayload,
+        "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL);
+    g_free (profile);
+  } else {
+    res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
+  }
+  g_string_free (sprops, TRUE);
+
+  return res;
+}
+
+
+static gboolean
+gst_rtp_h265_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
+{
+  GstRtpH265Pay *rtph265pay;
+  GstStructure *str;
+  const GValue *value;
+  GstMapInfo map;
+  guint8 *data;
+  gsize size;
+  GstBuffer *buffer;
+  const gchar *alignment, *stream_format;
+  guint8 num_arrays;
+
+  rtph265pay = GST_RTP_H265_PAY (basepayload);
+
+  str = gst_caps_get_structure (caps, 0);
+
+  /* we can only set the output caps when we found the sprops and profile
+   * NALs */
+  gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "H265", 90000);
+
+  rtph265pay->alignment = GST_H265_ALIGNMENT_UNKNOWN;
+  alignment = gst_structure_get_string (str, "alignment");
+  if (alignment) {
+    if (g_str_equal (alignment, "au"))
+      rtph265pay->alignment = GST_H265_ALIGNMENT_AU;
+    if (g_str_equal (alignment, "nal"))
+      rtph265pay->alignment = GST_H265_ALIGNMENT_NAL;
+  }
+
+  rtph265pay->stream_format = GST_H265_STREAM_FORMAT_UNKNOWN;
+  stream_format = gst_structure_get_string (str, "stream-format");
+  if (stream_format) {
+    if (g_str_equal (stream_format, "hvc1"))
+      rtph265pay->stream_format = GST_H265_STREAM_FORMAT_HVC1;
+    if (g_str_equal (stream_format, "hev1"))
+      rtph265pay->stream_format = GST_H265_STREAM_FORMAT_HEV1;
+    if (g_str_equal (stream_format, "byte-stream"))
+      rtph265pay->stream_format = GST_H265_STREAM_FORMAT_BYTESTREAM;
+  }
+
+  /* packetized HEVC video has a codec_data */
+  if ((value = gst_structure_get_value (str, "codec_data"))) {
+    guint num_vps, num_sps, num_pps;
+    gint i, j, nal_size;
+
+    GST_DEBUG_OBJECT (rtph265pay, "have packetized h265");
+
+    buffer = gst_value_get_buffer (value);
+
+    gst_buffer_map (buffer, &map, GST_MAP_READ);
+    data = map.data;
+    size = map.size;
+
+    /* parse the hevcC data */
+    if (size < 23)
+      goto hevcc_too_small;
+    /* HEVCDecoderConfigurationVersion (must be 1) */
+    if (data[0] != 1)
+      goto wrong_version;
+
+    /* profile_space | tier_flag | profile_idc */
+    rtph265pay->profile = data[1];
+    GST_DEBUG_OBJECT (rtph265pay, "profile %06x", rtph265pay->profile);
+
+    /* profile_compatibility_flags */
+    for (i = 2; i < 6; i++) {
+      for (j = 7; j >= 0; j--) {
+        GST_DEBUG_OBJECT (rtph265pay, "profile_compatibility_flag %06x",
+            (data[i] >> j) & 1);
+      }
+    }
+
+    GST_DEBUG_OBJECT (rtph265pay, "progressive_source_flag %06x",
+        (data[6] >> 7) & 1);
+    GST_DEBUG_OBJECT (rtph265pay, "interlaced_source_flag %06x",
+        (data[6] >> 6) & 1);
+    GST_DEBUG_OBJECT (rtph265pay, "non_packed_constraint_flag %06x",
+        (data[6] >> 5) & 1);
+    GST_DEBUG_OBJECT (rtph265pay, "frame_only_constraint_flag %06x",
+        (data[6] >> 4) & 1);
+
+    GST_DEBUG_OBJECT (rtph265pay, "level_idc %06x", data[12]);
+
+    GST_DEBUG_OBJECT (rtph265pay, "min_spatial_segmentation_idc %06x",
+        ((data[13] ^ 0xf0) << 8) + data[14]);
+    GST_DEBUG_OBJECT (rtph265pay, "parrallelismType %06x (ignored by paloader)",
+        data[15]);
+
+    GST_DEBUG_OBJECT (rtph265pay, "sps_chroma_format_idc %06x",
+        data[16] ^ 0xfc);
+    GST_DEBUG_OBJECT (rtph265pay, "bit_depth_luma_minus8 %06x",
+        data[17] ^ 0xf8);
+    GST_DEBUG_OBJECT (rtph265pay, "bit_depth_chroma_minus8 %06x",
+        data[18] ^ 0xf8);
+    GST_DEBUG_OBJECT (rtph265pay, "avgFrameRate %06x", data[19]);
+    GST_DEBUG_OBJECT (rtph265pay, "avgFrameRate %06x", data[20]);
+
+    /* constFrameRate(2 bits): 0, stream may or may not be of constant framerate
+     * numTemporalLayers (3 bits): number of temporal layers, value from SPS
+     * TemporalIdNested (1 bit): sps_temporal_id_nesting_flag from SPS
+     * lengthSizeMinusOne (2 bits): plus 1 indicates the length of the NALUnitLength */
+    GST_DEBUG_OBJECT (rtph265pay, "constFrameRate %06x",
+        (data[21] >> 6) & 0x03);
+    GST_DEBUG_OBJECT (rtph265pay, "numTemporalLayers %06x",
+        (data[21] >> 3) & 0x07);
+    GST_DEBUG_OBJECT (rtph265pay, "temporal_id_nesting_flag %06x",
+        (data[21] >> 2) & 0x01);
+
+    rtph265pay->nal_length_size = (data[21] & 0x3) + 1;
+    GST_DEBUG_OBJECT (rtph265pay, "nal length %u", rtph265pay->nal_length_size);
+
+    num_arrays = GST_READ_UINT8 (data + 22);
+
+    data += 23;
+    size -= 23;
+
+    if (num_arrays > 0) {
+      if (data[0] == (0x00 | 0x20)) {   /* VPS */
+
+        data++;
+        num_vps = data[0] << 8 | data[1];
+        data += 2;
+        size -= 2;
+
+        for (i = 0; i < num_vps; i++) {
+
+          GstBuffer *vps_buf;
+
+          if (size < 2)
+            goto hevcc_error;
+
+          nal_size = (data[0] << 8) | data[1];
+          data += 2;
+          size -= 2;
+
+          GST_LOG_OBJECT (rtph265pay, "VPS %d size %d", i, nal_size);
+
+          if (size < nal_size)
+            goto hevcc_error;
+
+          /* make a buffer out of it and add to VPS list */
+          vps_buf = gst_buffer_new_and_alloc (nal_size);
+          gst_buffer_fill (vps_buf, 0, data, nal_size);
+          gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (rtph265pay),
+              rtph265pay->vps, rtph265pay->sps, rtph265pay->pps, vps_buf);
+          data += nal_size;
+          size -= nal_size;
+        }
+      }
+
+      --num_arrays;
+    }
+
+    if (num_arrays > 0) {
+      if (data[0] == (0x00 | 0x21)) {   /* SPS */
+
+        data++;
+        num_sps = data[0] << 8 | data[1];
+        data += 2;
+        size -= 2;
+
+        for (i = 0; i < num_sps; i++) {
+
+          GstBuffer *sps_buf;
+
+          if (size < 2)
+            goto hevcc_error;
+
+          nal_size = (data[0] << 8) | data[1];
+          data += 2;
+          size -= 2;
+
+          GST_LOG_OBJECT (rtph265pay, "SPS %d size %d", i, nal_size);
+
+          if (size < nal_size)
+            goto hevcc_error;
+
+          /* make a buffer out of it and add to SPS list */
+          sps_buf = gst_buffer_new_and_alloc (nal_size);
+          gst_buffer_fill (sps_buf, 0, data, nal_size);
+          gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (rtph265pay),
+              rtph265pay->vps, rtph265pay->sps, rtph265pay->pps, sps_buf);
+          data += nal_size;
+          size -= nal_size;
+        }
+      }
+
+      --num_arrays;
+    }
+
+    if (num_arrays > 0) {
+      if (data[0] == (0x00 | 0x22)) {   /* PPS */
+
+        data++;
+        num_pps = data[0] << 8 | data[1];
+        data += 2;
+        size -= 2;
+
+        for (i = 0; i < num_pps; i++) {
+
+          GstBuffer *pps_buf;
+
+          if (size < 2)
+            goto hevcc_error;
+
+          nal_size = (data[0] << 8) | data[1];
+          data += 2;
+          size -= 2;
+
+          GST_LOG_OBJECT (rtph265pay, "PPS %d size %d", i, nal_size);
+
+          if (size < nal_size)
+            goto hevcc_error;
+
+          /* make a buffer out of it and add to PPS list */
+          pps_buf = gst_buffer_new_and_alloc (nal_size);
+          gst_buffer_fill (pps_buf, 0, data, nal_size);
+          gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (rtph265pay),
+              rtph265pay->vps, rtph265pay->sps, rtph265pay->pps, pps_buf);
+          data += nal_size;
+          size -= nal_size;
+        }
+      }
+
+      --num_arrays;
+    }
+
+    /* and update the caps with the collected data */
+    if (!gst_rtp_h265_pay_set_vps_sps_pps (basepayload))
+      goto set_vps_sps_pps_failed;
+
+    GST_DEBUG_OBJECT (rtph265pay, "Caps have been set");
+
+    gst_buffer_unmap (buffer, &map);
+  } else {
+    GST_DEBUG_OBJECT (rtph265pay, "have bytestream h265");
+  }
+
+  return TRUE;
+
+hevcc_too_small:
+  {
+    GST_ERROR_OBJECT (rtph265pay, "hevcC size %" G_GSIZE_FORMAT " < 7", size);
+    goto error;
+  }
+wrong_version:
+  {
+    GST_ERROR_OBJECT (rtph265pay, "wrong hevcC version");
+    goto error;
+  }
+hevcc_error:
+  {
+    GST_ERROR_OBJECT (rtph265pay, "hevcC too small ");
+    goto error;
+  }
+set_vps_sps_pps_failed:
+  {
+    GST_ERROR_OBJECT (rtph265pay, "failed to set vps/sps/pps");
+    goto error;
+  }
+error:
+  {
+    gst_buffer_unmap (buffer, &map);
+    return FALSE;
+  }
+}
+
+static void
+gst_rtp_h265_pay_parse_sprop_parameter_sets (GstRtpH265Pay * rtph265pay)
+{
+  const gchar *ps;
+  gchar **params;
+  guint len;
+  gint i;
+  GstBuffer *buf;
+
+  ps = rtph265pay->sprop_parameter_sets;
+  if (ps == NULL)
+    return;
+
+  gst_rtp_h265_pay_clear_vps_sps_pps (rtph265pay);
+
+  params = g_strsplit (ps, ",", 0);
+  len = g_strv_length (params);
+
+  GST_DEBUG_OBJECT (rtph265pay, "we have %d params", len);
+
+  for (i = 0; params[i]; i++) {
+    gsize nal_len;
+    GstMapInfo map;
+    guint8 *nalp;
+    guint save = 0;
+    gint state = 0;
+
+    nal_len = strlen (params[i]);
+    buf = gst_buffer_new_and_alloc (nal_len);
+
+    gst_buffer_map (buf, &map, GST_MAP_WRITE);
+    nalp = map.data;
+    nal_len = g_base64_decode_step (params[i], nal_len, nalp, &state, &save);
+    gst_buffer_unmap (buf, &map);
+    gst_buffer_resize (buf, 0, nal_len);
+
+    if (!nal_len) {
+      gst_buffer_unref (buf);
+      continue;
+    }
+
+    gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (rtph265pay), rtph265pay->vps,
+        rtph265pay->sps, rtph265pay->pps, buf);
+  }
+  g_strfreev (params);
+}
+
+static guint
+next_start_code (const guint8 * data, guint size)
+{
+  /* Boyer-Moore string matching algorithm, in a degenerative
+   * sense because our search 'alphabet' is binary - 0 & 1 only.
+   * This allow us to simplify the general BM algorithm to a very
+   * simple form. */
+  /* assume 1 is in the 3th byte */
+  guint offset = 2;
+
+  while (offset < size) {
+    if (1 == data[offset]) {
+      unsigned int shift = offset;
+
+      if (0 == data[--shift]) {
+        if (0 == data[--shift]) {
+          return shift;
+        }
+      }
+      /* The jump is always 3 because of the 1 previously matched.
+       * All the 0's must be after this '1' matched at offset */
+      offset += 3;
+    } else if (0 == data[offset]) {
+      /* maybe next byte is 1? */
+      offset++;
+    } else {
+      /* can jump 3 bytes forward */
+      offset += 3;
+    }
+    /* at each iteration, we rescan in a backward manner until
+     * we match 0.0.1 in reverse order. Since our search string
+     * has only 2 'alpabets' (i.e. 0 & 1), we know that any
+     * mismatch will force us to shift a fixed number of steps */
+  }
+  GST_DEBUG ("Cannot find next NAL start code. returning %u", size);
+
+  return size;
+}
+
+static gboolean
+gst_rtp_h265_pay_decode_nal (GstRtpH265Pay * payloader,
+    const guint8 * data, guint size, GstClockTime dts, GstClockTime pts)
+{
+  guint8 header, type;
+  gboolean updated;
+
+  /* default is no update */
+  updated = FALSE;
+
+  GST_DEBUG ("NAL payload len=%u", size);
+
+  header = data[0];
+  type = header & 0x3f;
+
+  /* We record the timestamp of the last SPS/PPS so
+   * that we can insert them at regular intervals and when needed. */
+  if (GST_H265_NAL_VPS == type || GST_H265_NAL_SPS == type
+      || GST_H265_NAL_PPS == type) {
+    GstBuffer *nal;
+
+    /* encode the entire NAL in base64 */
+    GST_DEBUG ("Found %s %x %x %x Len=%u",
+        type == GST_H265_NAL_VPS ? "VPS" : type ==
+        GST_H265_NAL_SPS ? "SPS" : "PPS", (header >> 7), (header >> 5) & 3,
+        type, size);
+
+    nal = gst_buffer_new_allocate (NULL, size, NULL);
+    gst_buffer_fill (nal, 0, data, size);
+
+    updated = gst_rtp_h265_add_vps_sps_pps (GST_ELEMENT (payloader),
+        payloader->vps, payloader->sps, payloader->pps, nal);
+
+    /* remember when we last saw VPS */
+    if (updated && pts != -1)
+      payloader->last_vps_sps_pps = pts;
+  } else {
+    GST_DEBUG ("NAL: %x %x %x Len = %u", (header >> 7),
+        (header >> 5) & 3, type, size);
+  }
+
+  return updated;
+}
+
+static GstFlowReturn
+gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload,
+    GstBuffer * paybuf, GstClockTime dts, GstClockTime pts, gboolean end_of_au);
+
+static GstFlowReturn
+gst_rtp_h265_pay_send_vps_sps_pps (GstRTPBasePayload * basepayload,
+    GstRtpH265Pay * rtph265pay, GstClockTime dts, GstClockTime pts)
+{
+  GstFlowReturn ret = GST_FLOW_OK;
+  gboolean sent_all_vps_sps_pps = TRUE;
+  guint i;
+
+  for (i = 0; i < rtph265pay->vps->len; i++) {
+    GstBuffer *vps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (rtph265pay->vps, i));
+
+    GST_DEBUG_OBJECT (rtph265pay, "inserting VPS in the stream");
+    /* resend VPS */
+    ret = gst_rtp_h265_pay_payload_nal (basepayload, gst_buffer_ref (vps_buf),
+        dts, pts, FALSE);
+    /* Not critical here; but throw a warning */
+    if (ret != GST_FLOW_OK) {
+      sent_all_vps_sps_pps = FALSE;
+      GST_WARNING_OBJECT (basepayload, "Problem pushing VPS");
+    }
+  }
+  for (i = 0; i < rtph265pay->sps->len; i++) {
+    GstBuffer *sps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (rtph265pay->sps, i));
+
+    GST_DEBUG_OBJECT (rtph265pay, "inserting SPS in the stream");
+    /* resend SPS */
+    ret = gst_rtp_h265_pay_payload_nal (basepayload, gst_buffer_ref (sps_buf),
+        dts, pts, FALSE);
+    /* Not critical here; but throw a warning */
+    if (ret != GST_FLOW_OK) {
+      sent_all_vps_sps_pps = FALSE;
+      GST_WARNING_OBJECT (basepayload, "Problem pushing SPS");
+    }
+  }
+  for (i = 0; i < rtph265pay->pps->len; i++) {
+    GstBuffer *pps_buf =
+        GST_BUFFER_CAST (g_ptr_array_index (rtph265pay->pps, i));
+
+    GST_DEBUG_OBJECT (rtph265pay, "inserting PPS in the stream");
+    /* resend PPS */
+    ret = gst_rtp_h265_pay_payload_nal (basepayload, gst_buffer_ref (pps_buf),
+        dts, pts, FALSE);
+    /* Not critical here; but throw a warning */
+    if (ret != GST_FLOW_OK) {
+      sent_all_vps_sps_pps = FALSE;
+      GST_WARNING ("Problem pushing PPS");
+    }
+  }
+
+  if (pts != -1 && sent_all_vps_sps_pps)
+    rtph265pay->last_vps_sps_pps = pts;
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload,
+    GstBuffer * paybuf, GstClockTime dts, GstClockTime pts, gboolean end_of_au)
+{
+  GstRtpH265Pay *rtph265pay;
+  GstFlowReturn ret;
+  guint8 nalHeader[2];
+  guint8 nalType;
+  guint packet_len, payload_len, mtu;
+  GstBuffer *outbuf;
+  guint8 *payload;
+  GstBufferList *list = NULL;
+  gboolean send_vps_sps_pps;
+  GstRTPBuffer rtp = { NULL };
+  guint size = gst_buffer_get_size (paybuf);
+
+  rtph265pay = GST_RTP_H265_PAY (basepayload);
+  mtu = GST_RTP_BASE_PAYLOAD_MTU (rtph265pay);
+
+  gst_buffer_extract (paybuf, 0, nalHeader, 2);
+  nalType = (nalHeader[0] >> 1) & 0x3f;
+
+  GST_DEBUG_OBJECT (rtph265pay, "Processing Buffer with NAL TYPE=%d", nalType);
+
+  /* should set src caps before pushing stuff,
+   * and if we did not see enough VPS/SPS/PPS, that may not be the case */
+  if (G_UNLIKELY (!gst_pad_has_current_caps (GST_RTP_BASE_PAYLOAD_SRCPAD
+              (basepayload))))
+    gst_rtp_h265_pay_set_vps_sps_pps (basepayload);
+
+  send_vps_sps_pps = FALSE;
+
+  /* check if we need to emit an VPS/SPS/PPS now */
+  if (((nalType == GST_H265_NAL_SLICE_TRAIL_N)
+          || (nalType == GST_H265_NAL_SLICE_TRAIL_R)
+          || (nalType == GST_H265_NAL_SLICE_TSA_N)
+          || (nalType == GST_H265_NAL_SLICE_TSA_R)
+          || (nalType == GST_H265_NAL_SLICE_STSA_N)
+          || (nalType == GST_H265_NAL_SLICE_STSA_R)
+          || (nalType == GST_H265_NAL_SLICE_RASL_N)
+          || (nalType == GST_H265_NAL_SLICE_RASL_R)
+          || (nalType == GST_H265_NAL_SLICE_BLA_W_LP)
+          || (nalType == GST_H265_NAL_SLICE_BLA_W_RADL)
+          || (nalType == GST_H265_NAL_SLICE_BLA_N_LP)
+          || (nalType == GST_H265_NAL_SLICE_IDR_W_RADL)
+          || (nalType == GST_H265_NAL_SLICE_IDR_N_LP)
+          || (nalType == GST_H265_NAL_SLICE_CRA_NUT))
+      && rtph265pay->vps_sps_pps_interval > 0) {
+
+    if (rtph265pay->last_vps_sps_pps != -1) {
+      guint64 diff;
+
+      GST_LOG_OBJECT (rtph265pay,
+          "now %" GST_TIME_FORMAT ", last VPS/SPS/PPS %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (pts), GST_TIME_ARGS (rtph265pay->last_vps_sps_pps));
+
+      /* calculate diff between last SPS/PPS in milliseconds */
+      if (pts > rtph265pay->last_vps_sps_pps)
+        diff = pts - rtph265pay->last_vps_sps_pps;
+      else
+        diff = 0;
+
+      GST_DEBUG_OBJECT (rtph265pay,
+          "interval since last VPS/SPS/PPS %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (diff));
+
+      /* bigger than interval, queue SPS/PPS */
+      if (GST_TIME_AS_SECONDS (diff) >= rtph265pay->vps_sps_pps_interval) {
+        GST_DEBUG_OBJECT (rtph265pay, "time to send VPS/SPS/PPS");
+        send_vps_sps_pps = TRUE;
+      }
+    } else {
+      /* no known previous SPS/PPS time, send now */
+      GST_DEBUG_OBJECT (rtph265pay, "no previous VPS/SPS/PPS time, send now");
+      send_vps_sps_pps = TRUE;
+    }
+  }
+
+  if (send_vps_sps_pps || rtph265pay->send_vps_sps_pps) {
+    /* we need to send SPS/PPS now first. FIXME, don't use the pts for
+     * checking when we need to send SPS/PPS but convert to running_time first. */
+    rtph265pay->send_vps_sps_pps = FALSE;
+    ret = gst_rtp_h265_pay_send_vps_sps_pps (basepayload, rtph265pay, dts, pts);
+    if (ret != GST_FLOW_OK) {
+      gst_buffer_unref (paybuf);
+      return ret;
+    }
+  }
+
+  packet_len = gst_rtp_buffer_calc_packet_len (size, 0, 0);
+
+  GST_FIXME_OBJECT (rtph265pay, "Set RTP marker bit appropriately");
+
+  if (packet_len < mtu) {
+    GST_DEBUG_OBJECT (rtph265pay,
+        "NAL Unit fit in one packet datasize=%d mtu=%d", size, mtu);
+    /* will fit in one packet */
+
+    /* use buffer lists
+     * create buffer without payload containing only the RTP header
+     * (memory block at index 0) */
+    outbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
+
+    gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);
+
+    /* FIXME : only set the marker bit on packets containing access units */
+    /* if (IS_ACCESS_UNIT (nalType) && end_of_au) {
+       gst_rtp_buffer_set_marker (&rtp, 1);
+       } */
+
+    /* timestamp the outbuffer */
+    GST_BUFFER_PTS (outbuf) = pts;
+    GST_BUFFER_DTS (outbuf) = dts;
+
+    /* insert payload memory block */
+    gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265pay), outbuf, paybuf,
+        g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+    outbuf = gst_buffer_append (outbuf, paybuf);
+
+    list = gst_buffer_list_new ();
+
+    /* add the buffer to the buffer list */
+    gst_buffer_list_add (list, outbuf);
+
+    gst_rtp_buffer_unmap (&rtp);
+
+    /* push the list to the next element in the pipe */
+    ret = gst_rtp_base_payload_push_list (basepayload, list);
+  } else {
+    /* fragmentation Units */
+    guint limitedSize;
+    int ii = 0, start = 1, end = 0, pos = 0;
+
+    GST_DEBUG_OBJECT (basepayload,
+        "NAL Unit DOES NOT fit in one packet datasize=%d mtu=%d", size, mtu);
+
+    pos += 2;
+    size -= 2;
+
+    GST_DEBUG_OBJECT (basepayload, "Using FU fragmentation for data size=%d",
+        size);
+
+    /* We keep 3 bytes for PayloadHdr and FU Header */
+    payload_len = gst_rtp_buffer_calc_payload_len (mtu - 3, 0, 0);
+
+    list = gst_buffer_list_new ();
+
+    while (end == 0) {
+      limitedSize = size < payload_len ? size : payload_len;
+      GST_DEBUG_OBJECT (basepayload,
+          "Inside  FU fragmentation limitedSize=%d iteration=%d", limitedSize,
+          ii);
+
+      /* use buffer lists
+       * create buffer without payload containing only the RTP header
+       * (memory block at index 0), and with space for PayloadHdr and FU header */
+      outbuf = gst_rtp_buffer_new_allocate (3, 0, 0);
+
+      gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);
+
+      GST_BUFFER_DTS (outbuf) = dts;
+      GST_BUFFER_PTS (outbuf) = pts;
+      payload = gst_rtp_buffer_get_payload (&rtp);
+
+      if (limitedSize == size) {
+        GST_DEBUG_OBJECT (basepayload, "end size=%d iteration=%d", size, ii);
+        end = 1;
+      }
+
+      /* PayloadHdr (type = 49) */
+      payload[0] = (nalHeader[0] & 0x81) | (49 << 1);
+      payload[1] = nalHeader[1];
+
+      /* FIXME - set RTP marker bit appropriately */
+      /* if (IS_ACCESS_UNIT (nalType)) {
+         gst_rtp_buffer_set_marker (&rtp, end && end_of_au);
+         } */
+
+      /* FU Header */
+      payload[2] = (start << 7) | (end << 6) | (nalType & 0x3f);
+
+      gst_rtp_buffer_unmap (&rtp);
+
+      /* insert payload memory block */
+      gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265pay), outbuf, paybuf,
+          g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
+      gst_buffer_copy_into (outbuf, paybuf, GST_BUFFER_COPY_MEMORY, pos,
+          limitedSize);
+      /* add the buffer to the buffer list */
+      gst_buffer_list_add (list, outbuf);
+
+      size -= limitedSize;
+      pos += limitedSize;
+      ii++;
+      start = 0;
+    }
+
+    ret = gst_rtp_base_payload_push_list (basepayload, list);
+    gst_buffer_unref (paybuf);
+  }
+  return ret;
+}
+
+static GstFlowReturn
+gst_rtp_h265_pay_handle_buffer (GstRTPBasePayload * basepayload,
+    GstBuffer * buffer)
+{
+  GstRtpH265Pay *rtph265pay;
+  GstFlowReturn ret;
+  gsize size;
+  guint nal_len, i;
+  GstMapInfo map;
+  const guint8 *data;
+  GstClockTime dts, pts;
+  GArray *nal_queue;
+  gboolean hevc;
+  GstBuffer *paybuf = NULL;
+  gsize skip;
+
+  rtph265pay = GST_RTP_H265_PAY (basepayload);
+
+  /* the input buffer contains one or more NAL units */
+
+  hevc = (rtph265pay->stream_format == GST_H265_STREAM_FORMAT_HEV1)
+      || (rtph265pay->stream_format == GST_H265_STREAM_FORMAT_HVC1);
+
+  if (hevc) {
+    /* In hevc mode, there is no adapter, so nothing to flush */
+    if (buffer == NULL)
+      return GST_FLOW_OK;
+    gst_buffer_map (buffer, &map, GST_MAP_READ);
+    data = map.data;
+    size = map.size;
+    pts = GST_BUFFER_PTS (buffer);
+    dts = GST_BUFFER_DTS (buffer);
+    GST_DEBUG_OBJECT (basepayload, "got %" G_GSIZE_FORMAT " bytes", size);
+  } else {
+    dts = gst_adapter_prev_dts (rtph265pay->adapter, NULL);
+    pts = gst_adapter_prev_pts (rtph265pay->adapter, NULL);
+    if (buffer) {
+      if (!GST_CLOCK_TIME_IS_VALID (dts))
+        dts = GST_BUFFER_DTS (buffer);
+      if (!GST_CLOCK_TIME_IS_VALID (pts))
+        pts = GST_BUFFER_PTS (buffer);
+
+      gst_adapter_push (rtph265pay->adapter, buffer);
+    }
+    size = gst_adapter_available (rtph265pay->adapter);
+    /* Nothing to do here if the adapter is empty, e.g. on EOS */
+    if (size == 0)
+      return GST_FLOW_OK;
+    data = gst_adapter_map (rtph265pay->adapter, size);
+    GST_DEBUG_OBJECT (basepayload,
+        "got %" G_GSIZE_FORMAT " bytes (%" G_GSIZE_FORMAT ")", size,
+        buffer ? gst_buffer_get_size (buffer) : 0);
+  }
+
+  ret = GST_FLOW_OK;
+
+  /* now loop over all NAL units and put them in a packet
+   * FIXME, we should really try to pack multiple NAL units into one RTP packet
+   * if we can, especially for the config packets that wont't cause decoder
+   * latency. */
+  if (hevc) {
+    guint nal_length_size;
+    gsize offset = 0;
+
+    nal_length_size = rtph265pay->nal_length_size;
+
+    while (size > nal_length_size) {
+      gint i;
+      gboolean end_of_au = FALSE;
+
+      nal_len = 0;
+      for (i = 0; i < nal_length_size; i++) {
+        nal_len = ((nal_len << 8) + data[i]);
+      }
+
+      /* skip the length bytes, make sure we don't run past the buffer size */
+      data += nal_length_size;
+      offset += nal_length_size;
+      size -= nal_length_size;
+
+      if (size >= nal_len) {
+        GST_DEBUG_OBJECT (basepayload, "got NAL of size %u", nal_len);
+      } else {
+        nal_len = size;
+        GST_DEBUG_OBJECT (basepayload, "got incomplete NAL of size %u",
+            nal_len);
+      }
+
+      /* If we're at the end of the buffer, then we're at the end of the
+       * access unit
+       */
+      if (rtph265pay->alignment == GST_H265_ALIGNMENT_AU
+          && size - nal_len <= nal_length_size) {
+        end_of_au = TRUE;
+      }
+
+      paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset,
+          nal_len);
+
+      ret =
+          gst_rtp_h265_pay_payload_nal (basepayload, paybuf, dts, pts,
+          end_of_au);
+      if (ret != GST_FLOW_OK)
+        break;
+
+      data += nal_len;
+      offset += nal_len;
+      size -= nal_len;
+    }
+  } else {
+    guint next;
+    gboolean update = FALSE;
+
+    /* get offset of first start code */
+    next = next_start_code (data, size);
+
+    /* skip to start code, if no start code is found, next will be size and we
+     * will not collect data. */
+    data += next;
+    size -= next;
+    nal_queue = rtph265pay->queue;
+    skip = next;
+
+    /* array must be empty when we get here */
+    g_assert (nal_queue->len == 0);
+
+    GST_DEBUG_OBJECT (basepayload,
+        "found first start at %u, bytes left %" G_GSIZE_FORMAT, next, size);
+
+    /* first pass to locate NALs and parse SPS/PPS */
+    while (size > 4) {
+      /* skip start code */
+      data += 3;
+      size -= 3;
+
+      /* use next_start_code() to scan buffer.
+       * next_start_code() returns the offset in data,
+       * starting from zero to the first byte of 0.0.0.1
+       * If no start code is found, it returns the value of the
+       * 'size' parameter.
+       * data is unchanged by the call to next_start_code()
+       */
+      next = next_start_code (data, size);
+
+      if (next == size && buffer != NULL) {
+        /* Didn't find the start of next NAL and it's not EOS,
+         * handle it next time */
+        break;
+      }
+
+      /* nal length is distance to next start code */
+      nal_len = next;
+
+      GST_DEBUG_OBJECT (basepayload, "found next start at %u of size %u", next,
+          nal_len);
+
+      if (rtph265pay->sprop_parameter_sets != NULL) {
+        /* explicitly set profile and sprop, use those */
+        if (rtph265pay->update_caps) {
+          if (!gst_rtp_base_payload_set_outcaps (basepayload,
+                  "sprop-parameter-sets", G_TYPE_STRING,
+                  rtph265pay->sprop_parameter_sets, NULL))
+            goto caps_rejected;
+
+          /* parse SPS and PPS from provided parameter set (for insertion) */
+          gst_rtp_h265_pay_parse_sprop_parameter_sets (rtph265pay);
+
+          rtph265pay->update_caps = FALSE;
+
+          GST_DEBUG ("outcaps update: sprop-parameter-sets=%s",
+              rtph265pay->sprop_parameter_sets);
+        }
+      } else {
+        /* We know our stream is a valid H265 NAL packet,
+         * go parse it for SPS/PPS to enrich the caps */
+        /* order: make sure to check nal */
+        update =
+            gst_rtp_h265_pay_decode_nal (rtph265pay, data, nal_len, dts, pts)
+            || update;
+      }
+      /* move to next NAL packet */
+      data += nal_len;
+      size -= nal_len;
+
+      g_array_append_val (nal_queue, nal_len);
+    }
+
+    /* if has new VPS, SPS & PPS, update the output caps */
+    if (G_UNLIKELY (update))
+      if (!gst_rtp_h265_pay_set_vps_sps_pps (basepayload))
+        goto caps_rejected;
+
+    /* second pass to payload and push */
+
+    if (nal_queue->len != 0)
+      gst_adapter_flush (rtph265pay->adapter, skip);
+
+    for (i = 0; i < nal_queue->len; i++) {
+      guint size;
+      gboolean end_of_au = FALSE;
+
+      nal_len = g_array_index (nal_queue, guint, i);
+      /* skip start code */
+      gst_adapter_flush (rtph265pay->adapter, 3);
+
+      /* Trim the end unless we're the last NAL in the stream.
+       * In case we're not at the end of the buffer we know the next block
+       * starts with 0x000001 so all the 0x00 bytes at the end of this one are
+       * trailing 0x0 that can be discarded */
+      size = nal_len;
+      data = gst_adapter_map (rtph265pay->adapter, size);
+      if (i + 1 != nal_queue->len || buffer != NULL)
+        for (; size > 1 && data[size - 1] == 0x0; size--)
+          /* skip */ ;
+
+
+      /* If it's the last nal unit we have in non-bytestream mode, we can
+       * assume it's the end of an access-unit
+       *
+       * FIXME: We need to wait until the next packet or EOS to
+       * actually payload the NAL so we can know if the current NAL is
+       * the last one of an access unit or not if we are in bytestream mode
+       */
+      if ((rtph265pay->alignment == GST_H265_ALIGNMENT_AU || buffer == NULL) &&
+          i == nal_queue->len - 1)
+        end_of_au = TRUE;
+      paybuf = gst_adapter_take_buffer (rtph265pay->adapter, size);
+      g_assert (paybuf);
+
+      /* put the data in one or more RTP packets */
+      ret =
+          gst_rtp_h265_pay_payload_nal (basepayload, paybuf, dts, pts,
+          end_of_au);
+      if (ret != GST_FLOW_OK) {
+        break;
+      }
+
+      /* move to next NAL packet */
+      /* Skips the trailing zeros */
+      gst_adapter_flush (rtph265pay->adapter, nal_len - size);
+    }
+    g_array_set_size (nal_queue, 0);
+  }
+
+done:
+  if (hevc) {
+    gst_buffer_unmap (buffer, &map);
+    gst_buffer_unref (buffer);
+  } else {
+    gst_adapter_unmap (rtph265pay->adapter);
+  }
+
+  return ret;
+
+caps_rejected:
+  {
+    GST_WARNING_OBJECT (basepayload, "Could not set outcaps");
+    g_array_set_size (nal_queue, 0);
+    ret = GST_FLOW_NOT_NEGOTIATED;
+    goto done;
+  }
+}
+
+static gboolean
+gst_rtp_h265_pay_sink_event (GstRTPBasePayload * payload, GstEvent * event)
+{
+  gboolean res;
+  const GstStructure *s;
+  GstRtpH265Pay *rtph265pay = GST_RTP_H265_PAY (payload);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      gst_adapter_clear (rtph265pay->adapter);
+      break;
+    case GST_EVENT_CUSTOM_DOWNSTREAM:
+      s = gst_event_get_structure (event);
+      if (gst_structure_has_name (s, "GstForceKeyUnit")) {
+        gboolean resend_codec_data;
+
+        if (gst_structure_get_boolean (s, "all-headers",
+                &resend_codec_data) && resend_codec_data)
+          rtph265pay->send_vps_sps_pps = TRUE;
+      }
+      break;
+    case GST_EVENT_EOS:
+    {
+      /* call handle_buffer with NULL to flush last NAL from adapter
+       * in byte-stream mode
+       */
+      gst_rtp_h265_pay_handle_buffer (payload, NULL);
+      break;
+    }
+    case GST_EVENT_STREAM_START:
+      GST_DEBUG_OBJECT (rtph265pay,
+          "New stream detected => Clear VPS, SPS and PPS");
+      gst_rtp_h265_pay_clear_vps_sps_pps (rtph265pay);
+      break;
+    default:
+      break;
+  }
+
+  res = GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->sink_event (payload, event);
+
+  return res;
+}
+
+static GstStateChangeReturn
+gst_rtp_h265_pay_change_state (GstElement * element, GstStateChange transition)
+{
+  GstStateChangeReturn ret;
+  GstRtpH265Pay *rtph265pay = GST_RTP_H265_PAY (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      rtph265pay->send_vps_sps_pps = FALSE;
+      gst_adapter_clear (rtph265pay->adapter);
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      rtph265pay->last_vps_sps_pps = -1;
+      gst_rtp_h265_pay_clear_vps_sps_pps (rtph265pay);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_rtp_h265_pay_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstRtpH265Pay *rtph265pay;
+
+  rtph265pay = GST_RTP_H265_PAY (object);
+
+  switch (prop_id) {
+    case PROP_SPROP_PARAMETER_SETS:
+      g_free (rtph265pay->sprop_parameter_sets);
+      rtph265pay->sprop_parameter_sets = g_value_dup_string (value);
+      rtph265pay->update_caps = TRUE;
+      break;
+    case PROP_CONFIG_INTERVAL:
+      rtph265pay->vps_sps_pps_interval = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_rtp_h265_pay_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstRtpH265Pay *rtph265pay;
+
+  rtph265pay = GST_RTP_H265_PAY (object);
+
+  switch (prop_id) {
+    case PROP_SPROP_PARAMETER_SETS:
+      g_value_set_string (value, rtph265pay->sprop_parameter_sets);
+      break;
+    case PROP_CONFIG_INTERVAL:
+      g_value_set_uint (value, rtph265pay->vps_sps_pps_interval);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+gboolean
+gst_rtp_h265_pay_plugin_init (GstPlugin * plugin)
+{
+  return gst_element_register (plugin, "rtph265pay",
+      GST_RANK_SECONDARY, GST_TYPE_RTP_H265_PAY);
+}
diff --git a/gst/rtp/gstrtph265pay.h b/gst/rtp/gstrtph265pay.h
new file mode 100644
index 0000000..8382c5e
--- /dev/null
+++ b/gst/rtp/gstrtph265pay.h
@@ -0,0 +1,82 @@
+/* GStreamer
+ * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) <2014> Jurgen Slowack <jurgenslowack@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_RTP_H265_PAY_H__
+#define __GST_RTP_H265_PAY_H__
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+#include <gst/rtp/gstrtpbasepayload.h>
+#include <gst/codecparsers/gsth265parser.h>
+
+G_BEGIN_DECLS
+#define GST_TYPE_RTP_H265_PAY \
+  (gst_rtp_h265_pay_get_type())
+#define GST_RTP_H265_PAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H265_PAY,GstRtpH265Pay))
+#define GST_RTP_H265_PAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H265_PAY,GstRtpH265PayClass))
+#define GST_IS_RTP_H265_PAY(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H265_PAY))
+#define GST_IS_RTP_H265_PAY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H265_PAY))
+typedef struct _GstRtpH265Pay GstRtpH265Pay;
+typedef struct _GstRtpH265PayClass GstRtpH265PayClass;
+
+typedef enum
+{
+  GST_H265_ALIGNMENT_UNKNOWN,
+  GST_H265_ALIGNMENT_NAL,
+  GST_H265_ALIGNMENT_AU
+} GstH265Alignment;
+
+struct _GstRtpH265Pay
+{
+  GstRTPBasePayload payload;
+
+  guint profile;
+  GPtrArray *sps, *pps, *vps;
+
+  GstH265StreamFormat stream_format;
+  GstH265Alignment alignment;
+  guint nal_length_size;
+  GArray *queue;
+
+  gchar *sprop_parameter_sets;
+  gboolean update_caps;
+
+  GstAdapter *adapter;
+
+  guint vps_sps_pps_interval;
+  gboolean send_vps_sps_pps;
+  GstClockTime last_vps_sps_pps;
+};
+
+struct _GstRtpH265PayClass
+{
+  GstRTPBasePayloadClass parent_class;
+};
+
+GType gst_rtp_h265_pay_get_type (void);
+
+gboolean gst_rtp_h265_pay_plugin_init (GstPlugin * plugin);
+
+G_END_DECLS
+#endif /* __GST_RTP_H265_PAY_H__ */
diff --git a/gst/sdi/Makefile.am b/gst/sdi/Makefile.am
index 47897cf..04744fa 100644
--- a/gst/sdi/Makefile.am
+++ b/gst/sdi/Makefile.am
@@ -11,17 +11,3 @@
 libgstsdi_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstsdidemux.h gstsdimux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsdi -:SHARED libgstsdi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdi_la_LDFLAGS) \
-	           $(libgstsdi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/sdi/Makefile.in b/gst/sdi/Makefile.in
index e61c539..9efbc41 100644
--- a/gst/sdi/Makefile.in
+++ b/gst/sdi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/sdi
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/sdi/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/sdi/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1078,20 +1112,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsdi -:SHARED libgstsdi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdi_la_LDFLAGS) \
-	           $(libgstsdi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/sdp/Makefile.am b/gst/sdp/Makefile.am
index 8c5e94c..395b857 100644
--- a/gst/sdp/Makefile.am
+++ b/gst/sdp/Makefile.am
@@ -10,17 +10,3 @@
 libgstsdpelem_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstsdpdemux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsdp -:SHARED libgstsdp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdp_la_LDFLAGS) \
-	           $(libgstsdp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/sdp/Makefile.in b/gst/sdp/Makefile.in
index 8b81d56..cfd519f 100644
--- a/gst/sdp/Makefile.in
+++ b/gst/sdp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/sdp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -752,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/sdp/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/sdp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1069,20 +1103,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsdp -:SHARED libgstsdp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdp_la_LDFLAGS) \
-	           $(libgstsdp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c
index 17e2e05..67e4afd 100644
--- a/gst/sdp/gstsdpdemux.c
+++ b/gst/sdp/gstsdpdemux.c
@@ -20,7 +20,7 @@
  * SECTION:element-sdpdemux
  *
  * sdpdemux currently understands SDP as the input format of the session description.
- * For each stream listed in the SDP a new stream_%u pad will be created
+ * For each stream listed in the SDP a new stream_\%u pad will be created
  * with caps derived from the SDP media description. This is a caps of mime type
  * "application/x-rtp" that can be connected to any available RTP depayloader
  * element. 
@@ -45,10 +45,6 @@
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
 #include "gstsdpdemux.h"
 
 #include <gst/rtp/gstrtppayloads.h>
@@ -88,8 +84,7 @@
   PROP_DEBUG,
   PROP_TIMEOUT,
   PROP_LATENCY,
-  PROP_REDIRECT,
-  PROP_LAST
+  PROP_REDIRECT
 };
 
 static void gst_sdp_demux_finalize (GObject * object);
@@ -529,7 +524,7 @@
 {
   gchar *p, *t;
 
-  t = p = (gchar *) rtpmap;
+  p = (gchar *) rtpmap;
 
   PARSE_INT (p, " ", *payload);
   if (*payload == -1)
@@ -673,8 +668,13 @@
       /* <param>[=<value>] are separated with ';' */
       pairs = g_strsplit (p, ";", 0);
       for (i = 0; pairs[i]; i++) {
-        gchar *valpos, *key;
-        const gchar *val;
+        gchar *valpos;
+        const gchar *key, *val;
+        gint j;
+        const gchar *reserved_keys[] =
+            { "media", "payload", "clock-rate", "encoding-name",
+          "encoding-params"
+        };
 
         /* the key may not have a '=', the value can have other '='s */
         valpos = strstr (pairs[i], "=");
@@ -689,6 +689,19 @@
         }
         /* strip the key of spaces, convert key to lowercase but not the value. */
         key = g_strstrip (pairs[i]);
+
+        /* skip keys from the fmtp, which we already use ourselves for the
+         * caps. Some software is adding random things like clock-rate into
+         * the fmtp, and we would otherwise here set a string-typed clock-rate
+         * in the caps... and thus fail to create valid RTP caps
+         */
+        for (j = 0; j < G_N_ELEMENTS (reserved_keys); j++) {
+          if (g_ascii_strcasecmp (reserved_keys[j], key) == 0) {
+            key = "";
+            break;
+          }
+        }
+
         if (strlen (key) > 1) {
           tmp = g_ascii_strdown (key, -1);
           gst_structure_set (s, tmp, G_TYPE_STRING, val, NULL);
@@ -1263,7 +1276,7 @@
 static gboolean
 gst_sdp_demux_start (GstSDPDemux * demux)
 {
-  guint8 *data;
+  guint8 *data = NULL;
   guint size;
   gint i, n_streams;
   GstSDPMessage sdp = { 0 };
@@ -1278,6 +1291,9 @@
   GST_DEBUG_OBJECT (demux, "parse SDP...");
 
   size = gst_adapter_available (demux->adapter);
+  if (size == 0)
+    goto no_data;
+
   data = gst_adapter_take (demux->adapter, size);
 
   gst_sdp_message_init (&sdp);
@@ -1421,6 +1437,12 @@
         ("Could not create RTP session manager."));
     goto done;
   }
+no_data:
+  {
+    GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
+        ("Empty SDP message."));
+    goto done;
+  }
 could_not_parse:
   {
     GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
diff --git a/gst/segmentclip/Makefile.am b/gst/segmentclip/Makefile.am
index 22d55a2..03eb2e2 100644
--- a/gst/segmentclip/Makefile.am
+++ b/gst/segmentclip/Makefile.am
@@ -8,17 +8,3 @@
 libgstsegmentclip_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstsegmentclip.h gstaudiosegmentclip.h gstvideosegmentclip.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsegmentclip -:SHARED libgstsegmentclip \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsegmentclip_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsegmentclip_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsegmentclip_la_LDFLAGS) \
-	           $(libgstsegmentclip_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/segmentclip/Makefile.in b/gst/segmentclip/Makefile.in
index 05e76e7..ca1a39b 100644
--- a/gst/segmentclip/Makefile.in
+++ b/gst/segmentclip/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/segmentclip
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -751,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/segmentclip/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/segmentclip/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1084,20 +1118,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsegmentclip -:SHARED libgstsegmentclip \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsegmentclip_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsegmentclip_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsegmentclip_la_LDFLAGS) \
-	           $(libgstsegmentclip_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/siren/Makefile.am b/gst/siren/Makefile.am
index dc27f77..d419b71 100644
--- a/gst/siren/Makefile.am
+++ b/gst/siren/Makefile.am
@@ -14,17 +14,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
 libgstsiren_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstsiren_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsiren -:SHARED libgstsiren \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsiren_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsiren_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsiren_la_LDFLAGS) \
-	           $(libgstsiren_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/siren/Makefile.in b/gst/siren/Makefile.in
index 78c2163..1b31ff0 100644
--- a/gst/siren/Makefile.in
+++ b/gst/siren/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/siren
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -230,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +285,6 @@
 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@
@@ -287,7 +297,6 @@
 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@
@@ -295,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +440,6 @@
 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@
@@ -433,7 +448,6 @@
 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@
@@ -446,7 +460,6 @@
 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@
@@ -460,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -759,7 +793,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/siren/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/siren/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1132,20 +1165,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsiren -:SHARED libgstsiren \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsiren_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsiren_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsiren_la_LDFLAGS) \
-	           $(libgstsiren_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/siren/common.c b/gst/siren/common.c
index 46a4877..ee77c70 100644
--- a/gst/siren/common.c
+++ b/gst/siren/common.c
@@ -269,7 +269,7 @@
 
       if (sample_rate == 24000)
         *sample_rate_code = 1;
-      else if (sample_rate == 24000)
+      else if (sample_rate == 32000)
         *sample_rate_code = 2;
       else if (sample_rate == 48000)
         *sample_rate_code = 3;
diff --git a/gst/siren/decoder.c b/gst/siren/decoder.c
index e90932a..8f87ca9 100644
--- a/gst/siren/decoder.c
+++ b/gst/siren/decoder.c
@@ -82,10 +82,10 @@
       scale_factor, number_of_regions, sample_rate_code, bits_per_frame;
   int decoded_sample_rate_code;
 
-  static int absolute_region_power_index[28] = { 0 };
-  static float decoder_standard_deviation[28] = { 0 };
-  static int power_categories[28] = { 0 };
-  static int category_balance[28] = { 0 };
+  int absolute_region_power_index[28] = { 0 };
+  float decoder_standard_deviation[28] = { 0 };
+  int power_categories[28] = { 0 };
+  int category_balance[28] = { 0 };
   int ChecksumTable[4] = { 0x7F80, 0x7878, 0x6666, 0x5555 };
   int i, j;
 
diff --git a/gst/siren/encoder.c b/gst/siren/encoder.c
index 658fe5d..8bb340f 100644
--- a/gst/siren/encoder.c
+++ b/gst/siren/encoder.c
@@ -82,13 +82,13 @@
       scale_factor, number_of_regions, sample_rate_code, bits_per_frame;
   int sample_rate = encoder->sample_rate;
 
-  static int absolute_region_power_index[28] = { 0 };
-  static int power_categories[28] = { 0 };
-  static int category_balance[28] = { 0 };
-  static int drp_num_bits[30] = { 0 };
-  static int drp_code_bits[30] = { 0 };
-  static int region_mlt_bit_counts[28] = { 0 };
-  static int region_mlt_bits[112] = { 0 };
+  int absolute_region_power_index[28] = { 0 };
+  int power_categories[28] = { 0 };
+  int category_balance[28] = { 0 };
+  int drp_num_bits[30] = { 0 };
+  int drp_code_bits[30] = { 0 };
+  int region_mlt_bit_counts[28] = { 0 };
+  int region_mlt_bits[112] = { 0 };
   int ChecksumTable[4] = { 0x7F80, 0x7878, 0x6666, 0x5555 };
   int i, j;
 
diff --git a/gst/siren/gstsirendec.c b/gst/siren/gstsirendec.c
index 0b26f5a..ab0635a 100644
--- a/gst/siren/gstsirendec.c
+++ b/gst/siren/gstsirendec.c
@@ -96,6 +96,9 @@
 gst_siren_dec_init (GstSirenDec * dec)
 {
   gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
+  gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
 }
 
 static gboolean
@@ -105,7 +108,7 @@
 
   GST_DEBUG_OBJECT (dec, "start");
 
-  sdec->decoder = Siren7_NewDecoder (16000);;
+  sdec->decoder = Siren7_NewDecoder (16000);
 
   /* no flushing please */
   gst_audio_decoder_set_drainable (dec, FALSE);
diff --git a/gst/siren/gstsirendec.h b/gst/siren/gstsirendec.h
index bcb55cd..27d7c86 100644
--- a/gst/siren/gstsirendec.h
+++ b/gst/siren/gstsirendec.h
@@ -29,7 +29,7 @@
 #include "siren7.h"
 
 G_BEGIN_DECLS
-/* #define's don't like whitespacey bits */
+
 #define GST_TYPE_SIREN_DEC \
   (gst_siren_dec_get_type())
 #define GST_SIREN_DEC(obj) \
@@ -42,9 +42,9 @@
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SIREN_DEC))
 #define GST_IS_SIREN_DEC_CLASS(obj) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SIREN_DEC))
+
 typedef struct _GstSirenDec GstSirenDec;
 typedef struct _GstSirenDecClass GstSirenDecClass;
-typedef struct _GstSirenDecPrivate GstSirenDecPrivate;
 
 struct _GstSirenDec
 {
@@ -64,4 +64,5 @@
 gboolean gst_siren_dec_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
+
 #endif /* __GST_SIREN_DEC_H__ */
diff --git a/gst/siren/gstsirenenc.c b/gst/siren/gstsirenenc.c
index 20e3c03..69b4d80 100644
--- a/gst/siren/gstsirenenc.c
+++ b/gst/siren/gstsirenenc.c
@@ -92,6 +92,7 @@
 static void
 gst_siren_enc_init (GstSirenEnc * enc)
 {
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
 }
 
 static gboolean
diff --git a/gst/siren/gstsirenenc.h b/gst/siren/gstsirenenc.h
index 9351bd2..acfb5e6 100644
--- a/gst/siren/gstsirenenc.h
+++ b/gst/siren/gstsirenenc.h
@@ -29,7 +29,7 @@
 #include "siren7.h"
 
 G_BEGIN_DECLS
-/* #define's don't like whitespacey bits */
+
 #define GST_TYPE_SIREN_ENC \
   (gst_siren_enc_get_type())
 #define GST_SIREN_ENC(obj) \
@@ -42,9 +42,9 @@
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SIREN_ENC))
 #define GST_IS_SIREN_ENC_CLASS(obj) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SIREN_ENC))
+
 typedef struct _GstSirenEnc GstSirenEnc;
 typedef struct _GstSirenEncClass GstSirenEncClass;
-typedef struct _GstSirenEncPrivate GstSirenEncPrivate;
 
 struct _GstSirenEnc
 {
diff --git a/gst/smooth/Makefile.am b/gst/smooth/Makefile.am
index 74f7231..7d8ca06 100644
--- a/gst/smooth/Makefile.am
+++ b/gst/smooth/Makefile.am
@@ -14,17 +14,3 @@
 libgstsmooth_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstsmooth.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmooth -:SHARED libgstsmooth \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmooth_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmooth_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmooth_la_LDFLAGS) \
-	           $(libgstsmooth_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/smooth/Makefile.in b/gst/smooth/Makefile.in
index ea2097d..5047915 100644
--- a/gst/smooth/Makefile.in
+++ b/gst/smooth/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/smooth
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +790,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/smooth/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/smooth/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1064,20 +1098,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmooth -:SHARED libgstsmooth \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmooth_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmooth_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmooth_la_LDFLAGS) \
-	           $(libgstsmooth_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/speed/Makefile.am b/gst/speed/Makefile.am
index 812a27f..1878e98 100644
--- a/gst/speed/Makefile.am
+++ b/gst/speed/Makefile.am
@@ -16,17 +16,3 @@
 #demo_mp3_SOURCES = demo-mp3.c
 #demo_mp3_CFLAGS  = $(GTK_CFLAGS) $(GST_CFLAGS) 
 #demo_mp3_LDFLAGS = $(GST_LIBS) $(GTK_LIBS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstspeed -:SHARED libgstspeed \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstspeed_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspeed_la_CFLAGS) \
-	 -:LDFLAGS $(libgstspeed_la_LDFLAGS) \
-	           $(libgstspeed_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/speed/Makefile.in b/gst/speed/Makefile.in
index 543c0d8..19a79b7 100644
--- a/gst/speed/Makefile.in
+++ b/gst/speed/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/speed
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/speed/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/speed/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 #if HAVE_GTK
 #noinst_PROGRAMS = demo-mp3
@@ -1065,20 +1101,6 @@
 #demo_mp3_CFLAGS  = $(GTK_CFLAGS) $(GST_CFLAGS) 
 #demo_mp3_LDFLAGS = $(GST_LIBS) $(GTK_LIBS)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstspeed -:SHARED libgstspeed \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstspeed_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspeed_la_CFLAGS) \
-	 -:LDFLAGS $(libgstspeed_la_LDFLAGS) \
-	           $(libgstspeed_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index 40d1612..9fcdad3 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -52,8 +52,8 @@
 
 enum
 {
-  ARG_0,
-  ARG_SPEED
+  PROP_0,
+  PROP_SPEED
 };
 
 /* assumption here: sizeof (gfloat) = 4 */
@@ -388,7 +388,7 @@
   gobject_class->get_property = speed_get_property;
   gstelement_class->change_state = speed_change_state;
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SPEED,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SPEED,
       g_param_spec_float ("speed", "speed", "speed",
           0.1, 40.0, 1.0,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
@@ -641,7 +641,7 @@
   GstSpeed *filter = GST_SPEED (object);
 
   switch (prop_id) {
-    case ARG_SPEED:
+    case PROP_SPEED:
       filter->speed = g_value_get_float (value);
       break;
     default:
@@ -658,7 +658,7 @@
   GstSpeed *filter = GST_SPEED (object);
 
   switch (prop_id) {
-    case ARG_SPEED:
+    case PROP_SPEED:
       g_value_set_float (value, filter->speed);
       break;
     default:
diff --git a/gst/stereo/Makefile.am b/gst/stereo/Makefile.am
index e27f6d4..f141b0f 100644
--- a/gst/stereo/Makefile.am
+++ b/gst/stereo/Makefile.am
@@ -8,19 +8,3 @@
 libgststereo_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gststereo.h
-
-EXTRA_DIST =
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgststereo -:SHARED libgststereo \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgststereo_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgststereo_la_CFLAGS) \
-	 -:LDFLAGS $(libgststereo_la_LDFLAGS) \
-	           $(libgststereo_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/stereo/Makefile.in b/gst/stereo/Makefile.in
index f0518fc..a8a88bd 100644
--- a/gst/stereo/Makefile.in
+++ b/gst/stereo/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/stereo
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -731,7 +766,6 @@
 libgststereo_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgststereo_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gststereo.h
-EXTRA_DIST = 
 all: all-am
 
 .SUFFIXES:
@@ -748,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/stereo/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/stereo/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1057,20 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgststereo -:SHARED libgststereo \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgststereo_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgststereo_la_CFLAGS) \
-	 -:LDFLAGS $(libgststereo_la_LDFLAGS) \
-	           $(libgststereo_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/stereo/gststereo.c b/gst/stereo/gststereo.c
index 4247e4d..ebadf9a 100644
--- a/gst/stereo/gststereo.c
+++ b/gst/stereo/gststereo.c
@@ -59,9 +59,9 @@
 
 enum
 {
-  ARG_0,
-  ARG_ACTIVE,
-  ARG_STEREO
+  PROP_0,
+  PROP_ACTIVE,
+  PROP_STEREO
 };
 
 static void gst_stereo_set_property (GObject * object, guint prop_id,
@@ -95,12 +95,12 @@
   gobject_class->set_property = gst_stereo_set_property;
   gobject_class->get_property = gst_stereo_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_ACTIVE,
+  g_object_class_install_property (gobject_class, PROP_ACTIVE,
       g_param_spec_boolean ("active", "active", "active",
           TRUE,
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_STEREO,
+  g_object_class_install_property (gobject_class, PROP_STEREO,
       g_param_spec_float ("stereo", "stereo", "stereo",
           0.0, 1.0, 0.1,
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
@@ -169,10 +169,10 @@
   GstStereo *stereo = GST_STEREO (object);
 
   switch (prop_id) {
-    case ARG_ACTIVE:
+    case PROP_ACTIVE:
       stereo->active = g_value_get_boolean (value);
       break;
-    case ARG_STEREO:
+    case PROP_STEREO:
       stereo->stereo = g_value_get_float (value) * 10.0;
       break;
     default:
@@ -188,10 +188,10 @@
   GstStereo *stereo = GST_STEREO (object);
 
   switch (prop_id) {
-    case ARG_ACTIVE:
+    case PROP_ACTIVE:
       g_value_set_boolean (value, stereo->active);
       break;
-    case ARG_STEREO:
+    case PROP_STEREO:
       g_value_set_float (value, stereo->stereo / 10.0);
       break;
     default:
diff --git a/gst/subenc/Makefile.am b/gst/subenc/Makefile.am
index 013b2ba..6ac45c5 100644
--- a/gst/subenc/Makefile.am
+++ b/gst/subenc/Makefile.am
@@ -12,17 +12,3 @@
 noinst_HEADERS = \
 	gstsrtenc.h \
 	gstwebvttenc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsubenc -:SHARED libgstsubenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsubenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsubenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsubenc_la_LDFLAGS) \
-	           $(libgstsubenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/subenc/Makefile.in b/gst/subenc/Makefile.in
index 76cac9c..64a7e6e 100644
--- a/gst/subenc/Makefile.in
+++ b/gst/subenc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/subenc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/subenc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/subenc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1079,20 +1113,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsubenc -:SHARED libgstsubenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsubenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsubenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsubenc_la_LDFLAGS) \
-	           $(libgstsubenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/subenc/gstsrtenc.c b/gst/subenc/gstsrtenc.c
index d9dcdd6..079fc44 100644
--- a/gst/subenc/gstsrtenc.c
+++ b/gst/subenc/gstsrtenc.c
@@ -30,9 +30,9 @@
 
 enum
 {
-  ARG_0,
-  ARG_TIMESTAMP,
-  ARG_DURATION
+  PROP_0,
+  PROP_TIMESTAMP,
+  PROP_DURATION
 };
 
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
@@ -190,10 +190,10 @@
   srtenc = GST_SRT_ENC (object);
 
   switch (prop_id) {
-    case ARG_TIMESTAMP:
+    case PROP_TIMESTAMP:
       g_value_set_int64 (value, srtenc->timestamp);
       break;
-    case ARG_DURATION:
+    case PROP_DURATION:
       g_value_set_int64 (value, srtenc->duration);
       break;
     default:
@@ -212,10 +212,10 @@
   srtenc = GST_SRT_ENC (object);
 
   switch (prop_id) {
-    case ARG_TIMESTAMP:
+    case PROP_TIMESTAMP:
       srtenc->timestamp = g_value_get_int64 (value);
       break;
-    case ARG_DURATION:
+    case PROP_DURATION:
       srtenc->duration = g_value_get_int64 (value);
       break;
     default:
@@ -235,12 +235,12 @@
 
   element_class->change_state = GST_DEBUG_FUNCPTR (gst_srt_enc_change_state);
 
-  g_object_class_install_property (gobject_class, ARG_TIMESTAMP,
+  g_object_class_install_property (gobject_class, PROP_TIMESTAMP,
       g_param_spec_int64 ("timestamp", "Offset for the starttime",
           "Offset for the starttime for the subtitles", G_MININT64, G_MAXINT64,
           0,
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_DURATION,
+  g_object_class_install_property (gobject_class, PROP_DURATION,
       g_param_spec_int64 ("duration", "Offset for the duration",
           "Offset for the duration of the subtitles", G_MININT64, G_MAXINT64,
           0,
diff --git a/gst/subenc/gstwebvttenc.c b/gst/subenc/gstwebvttenc.c
index a829580..67b6305 100644
--- a/gst/subenc/gstwebvttenc.c
+++ b/gst/subenc/gstwebvttenc.c
@@ -31,9 +31,9 @@
 
 enum
 {
-  ARG_0,
-  ARG_TIMESTAMP,
-  ARG_DURATION
+  PROP_0,
+  PROP_TIMESTAMP,
+  PROP_DURATION
 };
 
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
@@ -210,10 +210,10 @@
   webvttenc = GST_WEBVTT_ENC (object);
 
   switch (prop_id) {
-    case ARG_TIMESTAMP:
+    case PROP_TIMESTAMP:
       g_value_set_int64 (value, webvttenc->timestamp);
       break;
-    case ARG_DURATION:
+    case PROP_DURATION:
       g_value_set_int64 (value, webvttenc->duration);
       break;
     default:
@@ -232,10 +232,10 @@
   webvttenc = GST_WEBVTT_ENC (object);
 
   switch (prop_id) {
-    case ARG_TIMESTAMP:
+    case PROP_TIMESTAMP:
       webvttenc->timestamp = g_value_get_int64 (value);
       break;
-    case ARG_DURATION:
+    case PROP_DURATION:
       webvttenc->duration = g_value_get_int64 (value);
       break;
     default:
@@ -255,12 +255,12 @@
 
   element_class->change_state = GST_DEBUG_FUNCPTR (gst_webvtt_enc_change_state);
 
-  g_object_class_install_property (gobject_class, ARG_TIMESTAMP,
+  g_object_class_install_property (gobject_class, PROP_TIMESTAMP,
       g_param_spec_int64 ("timestamp", "Offset for the starttime",
           "Offset for the starttime for the subtitles", G_MININT64, G_MAXINT64,
           0,
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_DURATION,
+  g_object_class_install_property (gobject_class, PROP_DURATION,
       g_param_spec_int64 ("duration", "Offset for the duration",
           "Offset for the duration of the subtitles", G_MININT64, G_MAXINT64,
           0,
diff --git a/gst/tta/Makefile.am b/gst/tta/Makefile.am
index c20414a..3c8aa0f 100644
--- a/gst/tta/Makefile.am
+++ b/gst/tta/Makefile.am
@@ -11,17 +11,3 @@
 libgsttta_la_LIBADD = $(GST_LIBS) $(LIBM)
 libgsttta_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsttta_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttta -:SHARED libgsttta \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttta_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttta_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttta_la_LDFLAGS) \
-	           $(libgsttta_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/tta/Makefile.in b/gst/tta/Makefile.in
index 96c287d..578c0c5 100644
--- a/gst/tta/Makefile.in
+++ b/gst/tta/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/tta
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +788,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/tta/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/tta/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1078,20 +1112,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttta -:SHARED libgsttta \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttta_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttta_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttta_la_LDFLAGS) \
-	           $(libgsttta_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/tta/filters.h b/gst/tta/filters.h
index 2162b20..9df5e1d 100644
--- a/gst/tta/filters.h
+++ b/gst/tta/filters.h
@@ -32,7 +32,7 @@
 #define FILTERS_H
 
 ///////// Filter Settings //////////
-static long flt_set[3] = {10, 9, 10};
+static const long flt_set[3] = {10, 9, 10};
 
 static void
 memshl (register long *pA, register long *pB) {
diff --git a/gst/tta/gstttadec.c b/gst/tta/gstttadec.c
index d30a519..f4e29a2 100644
--- a/gst/tta/gstttadec.c
+++ b/gst/tta/gstttadec.c
@@ -70,7 +70,7 @@
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
diff --git a/gst/videofilters/Makefile.am b/gst/videofilters/Makefile.am
index 276f853..80393c4 100644
--- a/gst/videofilters/Makefile.am
+++ b/gst/videofilters/Makefile.am
@@ -27,17 +27,3 @@
 noinst_HEADERS = \
 	gstzebrastripe.h \
 	gstscenechange.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideofilters -:SHARED libgstvideofilters \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideofilters_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilters_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideofilters_la_LDFLAGS) \
-	           $(libgstvideofilters_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videofilters/Makefile.in b/gst/videofilters/Makefile.in
index dd10898..71f9de5 100644
--- a/gst/videofilters/Makefile.in
+++ b/gst/videofilters/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/videofilters
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -233,6 +243,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -250,8 +261,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -276,8 +289,6 @@
 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@
@@ -290,7 +301,6 @@
 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@
@@ -298,6 +308,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -324,11 +336,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -347,8 +362,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -407,10 +420,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -427,7 +444,6 @@
 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@
@@ -436,7 +452,6 @@
 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@
@@ -449,7 +464,6 @@
 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@
@@ -463,6 +477,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -474,6 +489,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -512,6 +529,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -547,10 +565,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -576,6 +598,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -583,7 +608,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -612,6 +644,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -622,6 +655,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -652,17 +686,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -679,6 +712,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -717,6 +751,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -777,7 +812,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videofilters/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/videofilters/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1110,20 +1144,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideofilters -:SHARED libgstvideofilters \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideofilters_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilters_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideofilters_la_LDFLAGS) \
-	           $(libgstvideofilters_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/videofilters/gstzebrastripe.c b/gst/videofilters/gstzebrastripe.c
index 2da9756..0b08100 100644
--- a/gst/videofilters/gstzebrastripe.c
+++ b/gst/videofilters/gstzebrastripe.c
@@ -79,7 +79,7 @@
 /* pad templates */
 
 #define VIDEO_CAPS GST_VIDEO_CAPS_MAKE( \
-    "{ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV }")
+    "{ I420, Y444, Y42B, Y41B, YUY2, UYVY, AYUV, NV12, NV21, YV12 }")
 
 
 /* class initialization */
@@ -200,105 +200,52 @@
 }
 
 static GstFlowReturn
-gst_zebra_stripe_transform_frame_ip_planarY (GstZebraStripe * zebrastripe,
+gst_zebra_stripe_transform_frame_ip (GstVideoFilter * filter,
     GstVideoFrame * frame)
 {
-  int width = frame->info.width;
-  int height = frame->info.height;
-  int i, j;
-  int threshold = zebrastripe->y_threshold;
-  int t = zebrastripe->t;
-
-  for (j = 0; j < height; j++) {
-    guint8 *data = (guint8 *) frame->data[0] + frame->info.stride[0] * j;
-    for (i = 0; i < width; i++) {
-      if (data[i] >= threshold) {
-        if ((i + j + t) & 0x4)
-          data[i] = 16;
-      }
-    }
-  }
-  return GST_FLOW_OK;
-}
-
-static GstFlowReturn
-gst_zebra_stripe_transform_frame_ip_YUY2 (GstZebraStripe * zebrastripe,
-    GstVideoFrame * frame)
-{
+  GstZebraStripe *zebrastripe = GST_ZEBRA_STRIPE (filter);
   int width = frame->info.width;
   int height = frame->info.height;
   int i, j;
   int threshold = zebrastripe->y_threshold;
   int t = zebrastripe->t;
   int offset = 0;
-
-  if (frame->info.finfo->format == GST_VIDEO_FORMAT_UYVY) {
-    offset = 1;
-  }
-
-  for (j = 0; j < height; j++) {
-    guint8 *data =
-        (guint8 *) frame->data[0] + frame->info.stride[0] * j + offset;
-    for (i = 0; i < width; i++) {
-      if (data[2 * i] >= threshold) {
-        if ((i + j + t) & 0x4)
-          data[2 * i] = 16;
-      }
-    }
-  }
-  return GST_FLOW_OK;
-}
-
-static GstFlowReturn
-gst_zebra_stripe_transform_frame_ip_AYUV (GstZebraStripe * zebrastripe,
-    GstVideoFrame * frame)
-{
-  int width = frame->info.width;
-  int height = frame->info.height;
-  int i, j;
-  int threshold = zebrastripe->y_threshold;
-  int t = zebrastripe->t;
-
-  for (j = 0; j < height; j++) {
-    guint8 *data = (guint8 *) frame->data[0] + frame->info.stride[0] * j;
-    for (i = 0; i < width; i++) {
-      if (data[4 * i + 1] >= threshold) {
-        if ((i + j + t) & 0x4)
-          data[4 * i + 1] = 16;
-      }
-    }
-  }
-
-  return GST_FLOW_OK;
-}
-
-static GstFlowReturn
-gst_zebra_stripe_transform_frame_ip (GstVideoFilter * filter,
-    GstVideoFrame * frame)
-{
-  GstZebraStripe *zebrastripe = GST_ZEBRA_STRIPE (filter);
+  int pixel_stride = 0, y_position = 0;
 
   GST_DEBUG_OBJECT (zebrastripe, "transform_frame_ip");
   zebrastripe->t++;
+  pixel_stride = GST_VIDEO_FORMAT_INFO_PSTRIDE (frame->info.finfo, 0);
 
   switch (frame->info.finfo->format) {
     case GST_VIDEO_FORMAT_I420:
     case GST_VIDEO_FORMAT_Y41B:
     case GST_VIDEO_FORMAT_Y444:
     case GST_VIDEO_FORMAT_Y42B:
-      gst_zebra_stripe_transform_frame_ip_planarY (zebrastripe, frame);
-      break;
     case GST_VIDEO_FORMAT_YUY2:
+    case GST_VIDEO_FORMAT_NV12:
+    case GST_VIDEO_FORMAT_NV21:
+    case GST_VIDEO_FORMAT_YV12:
+      break;
     case GST_VIDEO_FORMAT_UYVY:
-      gst_zebra_stripe_transform_frame_ip_YUY2 (zebrastripe, frame);
+      offset = 1;
       break;
     case GST_VIDEO_FORMAT_AYUV:
-      gst_zebra_stripe_transform_frame_ip_AYUV (zebrastripe, frame);
+      y_position = 1;
       break;
     default:
       g_assert_not_reached ();
   }
 
+  for (j = 0; j < height; j++) {
+    guint8 *data =
+        (guint8 *) frame->data[0] + frame->info.stride[0] * j + offset;
+    for (i = 0; i < width; i++) {
+      if (data[pixel_stride * i + y_position] >= threshold) {
+        if ((i + j + t) & 0x4)
+          data[pixel_stride * i + y_position] = 16;
+      }
+    }
+  }
 
   return GST_FLOW_OK;
 }
diff --git a/gst/videomeasure/Makefile.am b/gst/videomeasure/Makefile.am
index d3c2f78..139dee9 100644
--- a/gst/videomeasure/Makefile.am
+++ b/gst/videomeasure/Makefile.am
@@ -16,17 +16,3 @@
     -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
 libgstvideomeasure_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideomeasure_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideomeasure -:SHARED libgstvideomeasure \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideomeasure_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomeasure_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideomeasure_la_LDFLAGS) \
-	           $(libgstvideomeasure_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
\ No newline at end of file
diff --git a/gst/videomeasure/Makefile.in b/gst/videomeasure/Makefile.in
index 5b59ed3..131813d 100644
--- a/gst/videomeasure/Makefile.in
+++ b/gst/videomeasure/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/videomeasure
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -762,7 +797,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videomeasure/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/videomeasure/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1087,20 +1121,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideomeasure -:SHARED libgstvideomeasure \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideomeasure_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomeasure_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideomeasure_la_LDFLAGS) \
-	           $(libgstvideomeasure_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/videomeasure/gstvideomeasure_ssim.c b/gst/videomeasure/gstvideomeasure_ssim.c
index 3c7c502..e85d68f 100644
--- a/gst/videomeasure/gstvideomeasure_ssim.c
+++ b/gst/videomeasure/gstvideomeasure_ssim.c
@@ -39,8 +39,8 @@
  * <title>Example launch line</title>
  * |[
  * gst-launch ssim name=ssim ssim.src0 ! videoconvert ! glimagesink filesrc
- * location=orig.avi ! decodebin2 ! ssim.original filesrc location=compr.avi !
- * decodebin2 ! ssim.modified0
+ * location=orig.avi ! decodebin ! ssim.original filesrc location=compr.avi !
+ * decodebin ! ssim.modified0
  * ]| This pipeline produces a video stream that consists of SSIM frames.
  * </refsect2>
  */
@@ -664,15 +664,17 @@
         if (res) {
           gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur);
 
-          if (min_cur > min)
-            min = min_cur;
+          if (live_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;
+            if (max == GST_CLOCK_TIME_NONE)
+              max = max_cur;
+            else if (max_cur < max)
+              max = max_cur;
 
-          live = live || live_cur;
+            live = TRUE;
+          }
         }
 
         gst_query_unref (peerquery);
@@ -1473,7 +1475,7 @@
       collect_data = (GstCollectData *) collected->data;
 
       if (collect_data->pad == ssim->orig) {
-        orgbuf = gst_collect_pads_pop (pads, collect_data);;
+        orgbuf = gst_collect_pads_pop (pads, collect_data);
 
         GST_DEBUG_OBJECT (ssim, "Original stream - flags(0x%x), timestamp(%"
             GST_TIME_FORMAT "), duration(%" GST_TIME_FORMAT ")",
diff --git a/gst/videoparsers/Makefile.am b/gst/videoparsers/Makefile.am
index ccb7d5b..f1b0a11 100644
--- a/gst/videoparsers/Makefile.am
+++ b/gst/videoparsers/Makefile.am
@@ -32,19 +32,3 @@
 	gstpngparse.h \
 	gstvc1parse.h \
 	gsth265parse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoparsersbad -:SHARED libgstvideoparsersbad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoparsersbad_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoparsersbad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoparsersbad_la_LDFLAGS) \
-	           $(libgstvideoparsersbad_la_LIBADD) \
-	           -ldl \
-	 -:LIBFILTER_STATIC gstbaseparse-@GST_API_VERSION@ \
-	                    gstcodecparsers-@GST_API_VERSION@ \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videoparsers/Makefile.in b/gst/videoparsers/Makefile.in
index 755d7e4..050d458 100644
--- a/gst/videoparsers/Makefile.in
+++ b/gst/videoparsers/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/videoparsers
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -240,6 +250,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -257,8 +268,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -283,8 +296,6 @@
 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@
@@ -297,7 +308,6 @@
 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@
@@ -305,6 +315,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -331,11 +343,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -354,8 +369,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -414,10 +427,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -434,7 +451,6 @@
 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@
@@ -443,7 +459,6 @@
 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@
@@ -456,7 +471,6 @@
 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@
@@ -470,6 +484,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -481,6 +496,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -519,6 +536,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -554,10 +572,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -583,6 +605,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -590,7 +615,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -619,6 +651,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -629,6 +662,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -659,17 +693,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -686,6 +719,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -724,6 +758,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -788,7 +823,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videoparsers/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/videoparsers/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1177,22 +1211,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoparsersbad -:SHARED libgstvideoparsersbad \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoparsersbad_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoparsersbad_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoparsersbad_la_LDFLAGS) \
-	           $(libgstvideoparsersbad_la_LIBADD) \
-	           -ldl \
-	 -:LIBFILTER_STATIC gstbaseparse-@GST_API_VERSION@ \
-	                    gstcodecparsers-@GST_API_VERSION@ \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/videoparsers/gstdiracparse.c b/gst/videoparsers/gstdiracparse.c
index 9307f10..ea3cd9d 100644
--- a/gst/videoparsers/gstdiracparse.c
+++ b/gst/videoparsers/gstdiracparse.c
@@ -138,6 +138,7 @@
   gst_base_parse_set_min_frame_size (GST_BASE_PARSE (diracparse), 13);
   gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (diracparse), FALSE);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (diracparse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (diracparse));
 }
 
 void
@@ -403,8 +404,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (diracparse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     diracparse->sent_codec_tag = TRUE;
diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c
index 5493211..eb6290b 100644
--- a/gst/videoparsers/gsth263parse.c
+++ b/gst/videoparsers/gsth263parse.c
@@ -97,6 +97,7 @@
 gst_h263_parse_init (GstH263Parse * h263parse)
 {
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h263parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h263parse));
 }
 
 static gboolean
@@ -169,10 +170,15 @@
   if (gst_byte_reader_peek_uint24_be (&br, &psc) == FALSE)
     goto out;
 
-  /* Scan for the picture start code (22 bits - 0x0020) */
+  /* Scan for the picture start code (22 bits - 0x0020)
+   * startcode  : 0000 0000 0000 0000 1000 00xx
+   * mask (bin) : 1111 1111 1111 1111 1111 1100
+   * mask (hex) :    f    f    f    f    f    c
+   * match      :    0    0    0    0    8    0
+   */
   while ((gst_byte_reader_get_remaining (&br) >= 3)) {
     if (gst_byte_reader_peek_uint24_be (&br, &psc) &&
-        ((psc & 0xffffc0) == 0x000080)) {
+        ((psc & 0xfffffc) == 0x000080)) {
       psc_pos = gst_byte_reader_get_pos (&br);
       break;
     } else if (gst_byte_reader_skip (&br, 1) == FALSE)
@@ -272,6 +278,8 @@
 
   gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (GST_BASE_PARSE (h263parse)), caps);
   gst_caps_unref (caps);
+  if (sink_caps)
+    gst_caps_unref (sink_caps);
 }
 
 static GstFlowReturn
@@ -439,8 +447,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h263parse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     h263parse->sent_codec_tag = TRUE;
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 506cd61..915c2d7 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -41,8 +41,7 @@
 enum
 {
   PROP_0,
-  PROP_CONFIG_INTERVAL,
-  PROP_LAST
+  PROP_CONFIG_INTERVAL
 };
 
 enum
@@ -113,6 +112,8 @@
 static gboolean gst_h264_parse_event (GstBaseParse * parse, GstEvent * event);
 static gboolean gst_h264_parse_src_event (GstBaseParse * parse,
     GstEvent * event);
+static void gst_h264_parse_update_src_caps (GstH264Parse * h264parse,
+    GstCaps * caps);
 
 static void
 gst_h264_parse_class_init (GstH264ParseClass * klass)
@@ -163,6 +164,7 @@
   h264parse->frame_out = gst_adapter_new ();
   gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h264parse), FALSE);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h264parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h264parse));
 }
 
 
@@ -189,13 +191,16 @@
   h264parse->idr_pos = -1;
   h264parse->sei_pos = -1;
   h264parse->keyframe = FALSE;
+  h264parse->header = FALSE;
   h264parse->frame_start = FALSE;
   gst_adapter_clear (h264parse->frame_out);
 }
 
 static void
-gst_h264_parse_reset (GstH264Parse * h264parse)
+gst_h264_parse_reset_stream_info (GstH264Parse * h264parse)
 {
+  gint i;
+
   h264parse->width = 0;
   h264parse->height = 0;
   h264parse->fps_num = 0;
@@ -204,19 +209,36 @@
   h264parse->upstream_par_d = -1;
   h264parse->parsed_par_n = 0;
   h264parse->parsed_par_d = 0;
-  gst_buffer_replace (&h264parse->codec_data, NULL);
-  gst_buffer_replace (&h264parse->codec_data_in, NULL);
-  h264parse->nal_length_size = 4;
-  h264parse->packetized = FALSE;
-  h264parse->transform = FALSE;
+  h264parse->have_pps = FALSE;
+  h264parse->have_sps = FALSE;
+
+  h264parse->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
+  h264parse->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+  h264parse->first_in_bundle = TRUE;
 
   h264parse->align = GST_H264_PARSE_ALIGN_NONE;
   h264parse->format = GST_H264_PARSE_FORMAT_NONE;
 
-  h264parse->last_report = GST_CLOCK_TIME_NONE;
+  h264parse->transform = FALSE;
+  h264parse->nal_length_size = 4;
+  h264parse->packetized = FALSE;
   h264parse->push_codec = FALSE;
-  h264parse->have_pps = FALSE;
-  h264parse->have_sps = FALSE;
+
+  gst_buffer_replace (&h264parse->codec_data, NULL);
+  gst_buffer_replace (&h264parse->codec_data_in, NULL);
+
+  gst_h264_parse_reset_frame (h264parse);
+
+  for (i = 0; i < GST_H264_MAX_SPS_COUNT; i++)
+    gst_buffer_replace (&h264parse->sps_nals[i], NULL);
+  for (i = 0; i < GST_H264_MAX_PPS_COUNT; i++)
+    gst_buffer_replace (&h264parse->pps_nals[i], NULL);
+}
+
+static void
+gst_h264_parse_reset (GstH264Parse * h264parse)
+{
+  h264parse->last_report = GST_CLOCK_TIME_NONE;
 
   h264parse->dts = GST_CLOCK_TIME_NONE;
   h264parse->ts_trn_nb = GST_CLOCK_TIME_NONE;
@@ -229,7 +251,7 @@
 
   h264parse->discont = FALSE;
 
-  gst_h264_parse_reset_frame (h264parse);
+  gst_h264_parse_reset_stream_info (h264parse);
 }
 
 static gboolean
@@ -256,17 +278,11 @@
 static gboolean
 gst_h264_parse_stop (GstBaseParse * parse)
 {
-  guint i;
   GstH264Parse *h264parse = GST_H264_PARSE (parse);
 
   GST_DEBUG_OBJECT (parse, "stop");
   gst_h264_parse_reset (h264parse);
 
-  for (i = 0; i < GST_H264_MAX_SPS_COUNT; i++)
-    gst_buffer_replace (&h264parse->sps_nals[i], NULL);
-  for (i = 0; i < GST_H264_MAX_PPS_COUNT; i++)
-    gst_buffer_replace (&h264parse->pps_nals[i], NULL);
-
   gst_h264_nal_parser_free (h264parse->nalparser);
 
   return TRUE;
@@ -343,15 +359,15 @@
     GstCaps * in_caps)
 {
   GstCaps *caps;
-  guint format = GST_H264_PARSE_FORMAT_NONE;
-  guint align = GST_H264_PARSE_ALIGN_NONE;
+  guint format = h264parse->format;
+  guint align = h264parse->align;
 
   g_return_if_fail ((in_caps == NULL) || gst_caps_is_fixed (in_caps));
 
   caps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
   GST_DEBUG_OBJECT (h264parse, "allowed caps: %" GST_PTR_FORMAT, caps);
 
-  /* concentrate on leading structure, since decodebin2 parser
+  /* concentrate on leading structure, since decodebin parser
    * capsfilter always includes parser template caps */
   if (caps) {
     caps = gst_caps_truncate (caps);
@@ -359,16 +375,20 @@
         caps);
   }
 
+  h264parse->can_passthrough = FALSE;
+
   if (in_caps && caps) {
     if (gst_caps_can_intersect (in_caps, caps)) {
       GST_DEBUG_OBJECT (h264parse, "downstream accepts upstream caps");
       gst_h264_parse_format_from_caps (in_caps, &format, &align);
       gst_caps_unref (caps);
       caps = NULL;
+      h264parse->can_passthrough = TRUE;
     }
   }
 
-  if (caps) {
+  /* FIXME We could fail the negotiation immediatly if caps are empty */
+  if (caps && !gst_caps_is_empty (caps)) {
     /* fixate to avoid ambiguity with lists when parsing */
     caps = gst_caps_fixate (caps);
     gst_h264_parse_format_from_caps (caps, &format, &align);
@@ -428,7 +448,7 @@
   GstBuffer *buf, **store;
   guint size = nalu->size, store_size;
 
-  if (naltype == GST_H264_NAL_SPS) {
+  if (naltype == GST_H264_NAL_SPS || naltype == GST_H264_NAL_SUBSET_SPS) {
     store_size = GST_H264_MAX_SPS_COUNT;
     store = h264parse->sps_nals;
     GST_DEBUG_OBJECT (h264parse, "storing sps %u", id);
@@ -447,6 +467,10 @@
   buf = gst_buffer_new_allocate (NULL, size, NULL);
   gst_buffer_fill (buf, 0, nalu->data + nalu->offset, size);
 
+  /* Indicate that buffer contain a header needed for decoding */
+  if (naltype == GST_H264_NAL_SPS || naltype == GST_H264_NAL_PPS)
+    GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
+
   if (store[id])
     gst_buffer_unref (store[id]);
 
@@ -467,13 +491,21 @@
   "AU delimiter",
   "Sequence End",
   "Stream End",
-  "Filler Data"
+  "Filler Data",
+  "SPS extension",
+  "Prefix",
+  "SPS Subset",
+  "Depth Parameter Set",
+  "Reserved", "Reserved",
+  "Slice Aux Unpartitioned",
+  "Slice Extension",
+  "Slice Depth/3D-AVC Extension"
 };
 
 static const gchar *
 _nal_name (GstH264NalUnitType nal_type)
 {
-  if (nal_type <= GST_H264_NAL_FILLER_DATA)
+  if (nal_type <= GST_H264_NAL_SLICE_DEPTH)
     return nal_names[nal_type];
   return "Invalid";
 }
@@ -490,7 +522,7 @@
 
   pres = gst_h264_parser_parse_sei (nalparser, nalu, &messages);
   if (pres != GST_H264_PARSER_OK)
-    GST_WARNING_OBJECT (h264parse, "failed to parse one ore more SEI message");
+    GST_WARNING_OBJECT (h264parse, "failed to parse one or more SEI message");
 
   /* Even if pres != GST_H264_PARSER_OK, some message could have been parsed and
    * stored in messages.
@@ -528,6 +560,134 @@
             sei.payload.recovery_point.broken_link_flag,
             sei.payload.recovery_point.changing_slice_group_idc);
         break;
+
+        /* Additional messages that are not innerly useful to the
+         * element but for debugging purposes */
+      case GST_H264_SEI_STEREO_VIDEO_INFO:{
+        GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
+        GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+
+        GST_LOG_OBJECT (h264parse, "Stereo video information %u %u %u %u %u %u",
+            sei.payload.stereo_video_info.field_views_flag,
+            sei.payload.stereo_video_info.top_field_is_left_view_flag,
+            sei.payload.stereo_video_info.current_frame_is_left_view_flag,
+            sei.payload.stereo_video_info.next_frame_is_second_view_flag,
+            sei.payload.stereo_video_info.left_view_self_contained_flag,
+            sei.payload.stereo_video_info.right_view_self_contained_flag);
+
+        if (sei.payload.stereo_video_info.field_views_flag) {
+          mview_mode = GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED;
+          if (!sei.payload.stereo_video_info.top_field_is_left_view_flag)
+            mview_mode |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST;
+        } else {
+          mview_mode = GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME;
+          if (sei.payload.stereo_video_info.next_frame_is_second_view_flag) {
+            /* Mark current frame as first in bundle */
+            h264parse->first_in_bundle = TRUE;
+            if (!sei.payload.stereo_video_info.current_frame_is_left_view_flag)
+              mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST;
+          }
+        }
+        if (mview_mode != h264parse->multiview_mode ||
+            mview_flags != h264parse->multiview_flags) {
+          h264parse->multiview_mode = mview_mode;
+          h264parse->multiview_flags = mview_flags;
+          /* output caps need to be changed */
+          gst_h264_parse_update_src_caps (h264parse, NULL);
+        }
+        break;
+      }
+      case GST_H264_SEI_FRAME_PACKING:{
+        GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
+        GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
+
+        GST_LOG_OBJECT (h264parse,
+            "frame packing arrangement message: id %u cancelled %u "
+            "type %u quincunx %u content_interpretation %d flip %u "
+            "right_first %u field_views %u is_frame0 %u",
+            sei.payload.frame_packing.frame_packing_id,
+            sei.payload.frame_packing.frame_packing_cancel_flag,
+            sei.payload.frame_packing.frame_packing_type,
+            sei.payload.frame_packing.quincunx_sampling_flag,
+            sei.payload.frame_packing.content_interpretation_type,
+            sei.payload.frame_packing.spatial_flipping_flag,
+            sei.payload.frame_packing.frame0_flipped_flag,
+            sei.payload.frame_packing.field_views_flag,
+            sei.payload.frame_packing.current_frame_is_frame0_flag);
+
+        /* Only IDs from 0->255 and 512->2^31-1 are valid. Ignore others */
+        if ((sei.payload.frame_packing.frame_packing_id >= 256 &&
+                sei.payload.frame_packing.frame_packing_id < 512) ||
+            (sei.payload.frame_packing.frame_packing_id >= (1U << 31)))
+          break;                /* ignore */
+
+        if (!sei.payload.frame_packing.frame_packing_cancel_flag) {
+          /* Cancel flag sets things back to no-info */
+
+          if (sei.payload.frame_packing.content_interpretation_type == 2)
+            mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST;
+
+          switch (sei.payload.frame_packing.frame_packing_type) {
+            case 0:
+              mview_mode = GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD;
+              break;
+            case 1:
+              mview_mode = GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED;
+              break;
+            case 2:
+              mview_mode = GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED;
+              break;
+            case 3:
+              if (sei.payload.frame_packing.quincunx_sampling_flag)
+                mview_mode = GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX;
+              else
+                mview_mode = GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE;
+              if (sei.payload.frame_packing.spatial_flipping_flag) {
+                /* One of the views is flopped. */
+                if (sei.payload.frame_packing.frame0_flipped_flag !=
+                    ! !(mview_flags &
+                        GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST))
+                  /* the left view is flopped */
+                  mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED;
+                else
+                  mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED;
+              }
+              break;
+            case 4:
+              mview_mode = GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM;
+              if (sei.payload.frame_packing.spatial_flipping_flag) {
+                /* One of the views is flipped, */
+                if (sei.payload.frame_packing.frame0_flipped_flag !=
+                    ! !(mview_flags &
+                        GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST))
+                  /* the left view is flipped */
+                  mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED;
+                else
+                  mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED;
+              }
+              break;
+            case 5:
+              if (sei.payload.frame_packing.content_interpretation_type == 0)
+                mview_mode = GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME;
+              else
+                mview_mode = GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME;
+              break;
+            default:
+              GST_DEBUG_OBJECT (h264parse, "Invalid frame packing type %u",
+                  sei.payload.frame_packing.frame_packing_type);
+              break;
+          }
+        }
+
+        if (mview_mode != h264parse->multiview_mode ||
+            mview_flags != h264parse->multiview_flags) {
+          h264parse->multiview_mode = mview_mode;
+          h264parse->multiview_flags = mview_flags;
+          /* output caps need to be changed */
+          gst_h264_parse_update_src_caps (h264parse, NULL);
+        }
+        break;
+      }
     }
   }
   g_array_free (messages, TRUE);
@@ -556,11 +716,18 @@
       nal_type, _nal_name (nal_type), nalu->size);
 
   switch (nal_type) {
+    case GST_H264_NAL_SUBSET_SPS:
+      if (!GST_H264_PARSE_STATE_VALID (h264parse, GST_H264_PARSE_STATE_GOT_SPS))
+        return FALSE;
+      pres = gst_h264_parser_parse_subset_sps (nalparser, nalu, &sps, TRUE);
+      goto process_sps;
+
     case GST_H264_NAL_SPS:
       /* reset state, everything else is obsolete */
       h264parse->state = 0;
-
       pres = gst_h264_parser_parse_sps (nalparser, nalu, &sps, TRUE);
+
+    process_sps:
       /* arranged for a fallback sps.id, so use that one and only warn */
       if (pres != GST_H264_PARSER_OK) {
         GST_WARNING_OBJECT (h264parse, "failed to parse SPS:");
@@ -580,7 +747,9 @@
       }
 
       gst_h264_parser_store_nal (h264parse, sps.id, nal_type, nalu);
+      gst_h264_sps_clear (&sps);
       h264parse->state |= GST_H264_PARSE_STATE_GOT_SPS;
+      h264parse->header |= TRUE;
       break;
     case GST_H264_NAL_PPS:
       /* expected state: got-sps */
@@ -614,12 +783,14 @@
       gst_h264_parser_store_nal (h264parse, pps.id, nal_type, nalu);
       gst_h264_pps_clear (&pps);
       h264parse->state |= GST_H264_PARSE_STATE_GOT_PPS;
+      h264parse->header |= TRUE;
       break;
     case GST_H264_NAL_SEI:
       /* expected state: got-sps */
       if (!GST_H264_PARSE_STATE_VALID (h264parse, GST_H264_PARSE_STATE_GOT_SPS))
         return FALSE;
 
+      h264parse->header |= TRUE;
       gst_h264_parse_process_sei (h264parse, nalu);
       /* mark SEI pos */
       if (h264parse->sei_pos == -1) {
@@ -637,6 +808,7 @@
     case GST_H264_NAL_SLICE_DPB:
     case GST_H264_NAL_SLICE_DPC:
     case GST_H264_NAL_SLICE_IDR:
+    case GST_H264_NAL_SLICE_EXT:
       /* expected state: got-sps|got-pps (valid picture headers) */
       h264parse->state &= GST_H264_PARSE_STATE_VALID_PICTURE_HEADERS;
       if (!GST_H264_PARSE_STATE_VALID (h264parse,
@@ -644,13 +816,15 @@
         return FALSE;
 
       /* don't need to parse the whole slice (header) here */
-      if (*(nalu->data + nalu->offset + 1) & 0x80) {
+      if (*(nalu->data + nalu->offset + nalu->header_bytes) & 0x80) {
         /* means first_mb_in_slice == 0 */
         /* real frame data */
         GST_DEBUG_OBJECT (h264parse, "first_mb_in_slice = 0");
         h264parse->frame_start = TRUE;
       }
       GST_DEBUG_OBJECT (h264parse, "frame start: %i", h264parse->frame_start);
+      if (nal_type == GST_H264_NAL_SLICE_EXT && !GST_H264_IS_MVC_NALU (nalu))
+        break;
       {
         GstH264SliceHdr slice;
 
@@ -690,6 +864,12 @@
             h264parse->idr_pos);
       }
       break;
+    case GST_H264_NAL_AU_DELIMITER:
+      /* Just accumulate AU Delimiter, whether it's before SPS or not */
+      pres = gst_h264_parser_parse_nal (nalparser, nalu);
+      if (pres != GST_H264_PARSER_OK)
+        return FALSE;
+      break;
     default:
       /* drop anything before the initial SPS */
       if (!GST_H264_PARSE_STATE_VALID (h264parse, GST_H264_PARSE_STATE_GOT_SPS))
@@ -747,8 +927,9 @@
    * and also works with broken frame_num in NAL
    * (where spec-wise would fail) */
   nal_type = nnalu.type;
-  complete = h264parse->picture_start && (nal_type >= GST_H264_NAL_SEI &&
-      nal_type <= GST_H264_NAL_AU_DELIMITER);
+  complete = h264parse->picture_start && ((nal_type >= GST_H264_NAL_SEI &&
+          nal_type <= GST_H264_NAL_AU_DELIMITER) ||
+      (nal_type >= 14 && nal_type <= 18));
 
   GST_LOG_OBJECT (h264parse, "next nal type: %d %s", nal_type,
       _nal_name (nal_type));
@@ -756,7 +937,7 @@
       || nal_type == GST_H264_NAL_SLICE_DPA
       || nal_type == GST_H264_NAL_SLICE_IDR) &&
       /* first_mb_in_slice == 0 considered start of frame */
-      (nnalu.data[nnalu.offset + 1] & 0x80);
+      (nnalu.data[nnalu.offset + nnalu.header_bytes] & 0x80);
 
   GST_LOG_OBJECT (h264parse, "au complete: %d", complete);
 
@@ -847,7 +1028,6 @@
     if (h264parse->split_packetized) {
       GST_ELEMENT_ERROR (h264parse, STREAM, FAILED, (NULL),
           ("invalid AVC input data"));
-      gst_buffer_unref (buffer);
 
       return GST_FLOW_ERROR;
     } else {
@@ -1180,6 +1360,298 @@
   }
 }
 
+static GstCaps *
+get_compatible_profile_caps (GstH264SPS * sps)
+{
+  GstCaps *caps = NULL;
+  const gchar **profiles = NULL;
+  gint i;
+  GValue compat_profiles = G_VALUE_INIT;
+  g_value_init (&compat_profiles, GST_TYPE_LIST);
+
+  switch (sps->profile_idc) {
+    case GST_H264_PROFILE_EXTENDED:
+      if (sps->constraint_set0_flag) {  /* A.2.1 */
+        if (sps->constraint_set1_flag) {
+          static const gchar *profile_array[] =
+              { "constrained-baseline", "baseline", "main", "high",
+            "high-10", "high-4:2:2", "high-4:4:4", NULL
+          };
+          profiles = profile_array;
+        } else {
+          static const gchar *profile_array[] = { "baseline", NULL };
+          profiles = profile_array;
+        }
+      } else if (sps->constraint_set1_flag) {   /* A.2.2 */
+        static const gchar *profile_array[] =
+            { "main", "high", "high-10", "high-4:2:2", "high-4:4:4", NULL };
+        profiles = profile_array;
+      }
+      break;
+    case GST_H264_PROFILE_BASELINE:
+      if (sps->constraint_set1_flag) {  /* A.2.1 */
+        static const gchar *profile_array[] =
+            { "constrained-baseline", "main", "high", "high-10", "high-4:2:2",
+          "high-4:4:4", NULL
+        };
+        profiles = profile_array;
+      } else {
+        static const gchar *profile_array[] = { "extended", NULL };
+        profiles = profile_array;
+      }
+      break;
+    case GST_H264_PROFILE_MAIN:
+    {
+      static const gchar *profile_array[] =
+          { "high", "high-10", "high-4:2:2", "high-4:4:4", NULL };
+      profiles = profile_array;
+    }
+      break;
+    case GST_H264_PROFILE_HIGH:
+      if (sps->constraint_set1_flag) {
+        static const gchar *profile_array[] =
+            { "main", "high-10", "high-4:2:2", "high-4:4:4", NULL };
+        profiles = profile_array;
+      } else {
+        static const gchar *profile_array[] =
+            { "high-10", "high-4:2:2", "high-4:4:4", NULL };
+        profiles = profile_array;
+      }
+      break;
+    case GST_H264_PROFILE_HIGH10:
+      if (sps->constraint_set1_flag) {
+        static const gchar *profile_array[] =
+            { "main", "high", "high-4:2:2", "high-4:4:4", NULL };
+        profiles = profile_array;
+      } else {
+        if (sps->constraint_set3_flag) {        /* A.2.8 */
+          static const gchar *profile_array[] =
+              { "high-10", "high-4:2:2", "high-4:4:4", "high-4:2:2-intra",
+            "high-4:4:4-intra", NULL
+          };
+          profiles = profile_array;
+        } else {
+          static const gchar *profile_array[] =
+              { "high-4:2:2", "high-4:4:4", NULL };
+          profiles = profile_array;
+        }
+      }
+      break;
+    case GST_H264_PROFILE_HIGH_422:
+      if (sps->constraint_set1_flag) {
+        static const gchar *profile_array[] =
+            { "main", "high", "high-10", "high-4:4:4", NULL };
+        profiles = profile_array;
+      } else {
+        if (sps->constraint_set3_flag) {        /* A.2.9 */
+          static const gchar *profile_array[] =
+              { "high-4:2:2", "high-4:4:4", "high-4:4:4-intra", NULL };
+          profiles = profile_array;
+        } else {
+          static const gchar *profile_array[] = { "high-4:4:4", NULL };
+          profiles = profile_array;
+        }
+      }
+      break;
+    case GST_H264_PROFILE_HIGH_444:
+      if (sps->constraint_set1_flag) {
+        static const gchar *profile_array[] =
+            { "main", "high", "high-10", "high-4:2:2", NULL };
+        profiles = profile_array;
+      } else if (sps->constraint_set3_flag) {   /* A.2.10 */
+        static const gchar *profile_array[] = { "high-4:4:4", NULL };
+        profiles = profile_array;
+      }
+      break;
+    case GST_H264_PROFILE_MULTIVIEW_HIGH:
+      if (sps->extension_type == GST_H264_NAL_EXTENSION_MVC
+          && sps->extension.mvc.num_views_minus1 == 1) {
+        static const gchar *profile_array[] =
+            { "stereo-high", "multiview-high", NULL };
+        profiles = profile_array;
+      } else {
+        static const gchar *profile_array[] = { "multiview-high", NULL };
+        profiles = profile_array;
+      }
+      break;
+    default:
+      break;
+  }
+
+  if (profiles) {
+    GValue value = G_VALUE_INIT;
+    caps = gst_caps_new_empty_simple ("video/x-h264");
+    for (i = 0; profiles[i]; i++) {
+      g_value_init (&value, G_TYPE_STRING);
+      g_value_set_string (&value, profiles[i]);
+      gst_value_list_append_value (&compat_profiles, &value);
+      g_value_unset (&value);
+    }
+    gst_caps_set_value (caps, "profile", &compat_profiles);
+    g_value_unset (&compat_profiles);
+  }
+
+  return caps;
+}
+
+/* if downstream didn't support the exact profile indicated in sps header,
+ * check for the compatible profiles also */
+static void
+ensure_caps_profile (GstH264Parse * h264parse, GstCaps * caps, GstH264SPS * sps)
+{
+  GstCaps *filter_caps, *peer_caps, *compat_caps;
+
+  filter_caps = gst_caps_new_empty_simple ("video/x-h264");
+  peer_caps =
+      gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (h264parse), filter_caps);
+
+  if (peer_caps && !gst_caps_can_intersect (caps, peer_caps)) {
+    GstStructure *structure;
+
+    compat_caps = get_compatible_profile_caps (sps);
+    if (compat_caps != NULL) {
+      GstCaps *res_caps = NULL;
+
+      res_caps = gst_caps_intersect (peer_caps, compat_caps);
+
+      if (res_caps && !gst_caps_is_empty (res_caps)) {
+        const gchar *profile_str = NULL;
+
+        res_caps = gst_caps_fixate (res_caps);
+        structure = gst_caps_get_structure (res_caps, 0);
+        profile_str = gst_structure_get_string (structure, "profile");
+        if (profile_str) {
+          gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_str,
+              NULL);
+          GST_DEBUG_OBJECT (h264parse,
+              "Setting compatible profile %s to the caps", profile_str);
+        }
+      }
+      if (res_caps)
+        gst_caps_unref (res_caps);
+      gst_caps_unref (compat_caps);
+    }
+  }
+  if (peer_caps)
+    gst_caps_unref (peer_caps);
+  gst_caps_unref (filter_caps);
+}
+
+static const gchar *
+digit_to_string (guint digit)
+{
+  static const char itoa[][2] = {
+    "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
+  };
+
+  if (G_LIKELY (digit < 10))
+    return itoa[digit];
+  else
+    return NULL;
+}
+
+static const gchar *
+get_profile_string (GstH264SPS * sps)
+{
+  const gchar *profile = NULL;
+
+  switch (sps->profile_idc) {
+    case 66:
+      if (sps->constraint_set1_flag)
+        profile = "constrained-baseline";
+      else
+        profile = "baseline";
+      break;
+    case 77:
+      profile = "main";
+      break;
+    case 88:
+      profile = "extended";
+      break;
+    case 100:
+      profile = "high";
+      break;
+    case 110:
+      if (sps->constraint_set3_flag)
+        profile = "high-10-intra";
+      else
+        profile = "high-10";
+      break;
+    case 122:
+      if (sps->constraint_set3_flag)
+        profile = "high-4:2:2-intra";
+      else
+        profile = "high-4:2:2";
+      break;
+    case 244:
+      if (sps->constraint_set3_flag)
+        profile = "high-4:4:4-intra";
+      else
+        profile = "high-4:4:4";
+      break;
+    case 44:
+      profile = "cavlc-4:4:4-intra";
+      break;
+    case 118:
+      profile = "multiview-high";
+      break;
+    case 128:
+      profile = "stereo-high";
+      break;
+    case 83:
+      if (sps->constraint_set5_flag)
+        profile = "scalable-constrained-baseline";
+      else
+        profile = "scalable-baseline";
+      break;
+    case 86:
+      profile = "scalable-high";
+      break;
+    default:
+      return NULL;
+  }
+
+  return profile;
+}
+
+static const gchar *
+get_level_string (GstH264SPS * sps)
+{
+  if ((sps->level_idc == 11 && sps->constraint_set3_flag)
+      || sps->level_idc == 9)
+    return "1b";
+  else if (sps->level_idc % 10 == 0)
+    return digit_to_string (sps->level_idc / 10);
+  else {
+    switch (sps->level_idc) {
+      case 11:
+        return "1.1";
+      case 12:
+        return "1.2";
+      case 13:
+        return "1.3";
+      case 21:
+        return "2.1";
+      case 22:
+        return "2.2";
+      case 31:
+        return "3.1";
+      case 32:
+        return "3.2";
+      case 41:
+        return "4.1";
+      case 42:
+        return "4.2";
+      case 51:
+        return "5.1";
+      case 52:
+        return "5.2";
+      default:
+        return NULL;
+    }
+  }
+}
+
 static void
 gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
 {
@@ -1238,6 +1710,7 @@
   } else {
     gint crop_width, crop_height;
     gint fps_num, fps_den;
+    gint par_n, par_d;
 
     if (sps->frame_cropping_flag) {
       crop_width = sps->crop_rect_width;
@@ -1282,6 +1755,10 @@
       gint width, height;
       GstClockTime latency;
 
+      const gchar *caps_mview_mode = NULL;
+      GstVideoMultiviewMode mview_mode = h264parse->multiview_mode;
+      GstVideoMultiviewFlags mview_flags = h264parse->multiview_flags;
+
       fps_num = h264parse->fps_num;
       fps_den = h264parse->fps_den;
 
@@ -1298,6 +1775,39 @@
       else
         height = h264parse->height;
 
+      if (s == NULL ||
+          !gst_structure_get_fraction (s, "pixel-aspect-ratio", &par_n,
+              &par_d)) {
+        gst_h264_parse_get_par (h264parse, &par_n, &par_d);
+        if (par_n != 0 && par_d != 0) {
+          GST_INFO_OBJECT (h264parse, "PAR %d/%d", par_n, par_d);
+          gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
+              par_n, par_d, NULL);
+        } else {
+          /* Assume par_n/par_d of 1/1 for calcs below, but don't set into caps */
+          par_n = par_d = 1;
+        }
+      }
+
+      /* Pass through or set output stereo/multiview config */
+      if (s && gst_structure_has_field (s, "multiview-mode")) {
+        caps_mview_mode = gst_structure_get_string (s, "multiview-mode");
+        mview_mode =
+            gst_video_multiview_mode_from_caps_string (caps_mview_mode);
+        gst_structure_get_flagset (s, "multiview-flags", &mview_flags, NULL);
+      } else if (mview_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+        if (gst_video_multiview_guess_half_aspect (mview_mode,
+                width, height, par_n, par_d)) {
+          mview_flags |= GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT;
+        }
+
+        caps_mview_mode = gst_video_multiview_mode_to_caps_string (mview_mode);
+        gst_caps_set_simple (caps, "multiview-mode", G_TYPE_STRING,
+            caps_mview_mode, "multiview-flags",
+            GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, mview_flags,
+            GST_FLAG_SET_MASK_EXACT, NULL);
+      }
+
       gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
           "height", G_TYPE_INT, height, NULL);
 
@@ -1321,33 +1831,26 @@
   }
 
   if (caps) {
-    gint par_n, par_d;
-
     gst_caps_set_simple (caps, "parsed", G_TYPE_BOOLEAN, TRUE,
         "stream-format", G_TYPE_STRING,
         gst_h264_parse_get_string (h264parse, TRUE, h264parse->format),
         "alignment", G_TYPE_STRING,
         gst_h264_parse_get_string (h264parse, FALSE, h264parse->align), NULL);
 
-    gst_h264_parse_get_par (h264parse, &par_n, &par_d);
-    if (par_n != 0 && par_d != 0 &&
-        (!s || !gst_structure_has_field (s, "pixel-aspect-ratio"))) {
-      GST_INFO_OBJECT (h264parse, "PAR %d/%d", par_n, par_d);
-      gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
-          par_n, par_d, NULL);
-    }
-
     /* set profile and level in caps */
     if (sps) {
-      GstMapInfo map;
-      GstBuffer *sps_buf = h264parse->sps_nals[sps->id];
+      const gchar *profile, *level;
 
-      if (sps_buf) {
-        gst_buffer_map (sps_buf, &map, GST_MAP_READ);
-        gst_codec_utils_h264_caps_set_level_and_profile (caps,
-            map.data + 1, map.size - 1);
-        gst_buffer_unmap (sps_buf, &map);
-      }
+      profile = get_profile_string (sps);
+      if (profile != NULL)
+        gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile, NULL);
+
+      level = get_level_string (sps);
+      if (level != NULL)
+        gst_caps_set_simple (caps, "level", G_TYPE_STRING, level, NULL);
+
+      /* relax the profile constraint to find a suitable decoder */
+      ensure_caps_profile (h264parse, caps, sps);
     }
 
     src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
@@ -1546,6 +2049,11 @@
   else
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
 
+  if (h264parse->header)
+    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
+  else
+    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_HEADER);
+
   if (h264parse->discont) {
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
     h264parse->discont = FALSE;
@@ -1706,8 +2214,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h264parse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     h264parse->sent_codec_tag = TRUE;
@@ -1725,10 +2233,12 @@
   if (h264parse->interval > 0 || h264parse->push_codec) {
     GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buffer);
     guint64 diff;
+    gboolean initial_frame = FALSE;
 
     /* init */
     if (!GST_CLOCK_TIME_IS_VALID (h264parse->last_report)) {
       h264parse->last_report = timestamp;
+      initial_frame = TRUE;
     }
 
     if (h264parse->idr_pos >= 0) {
@@ -1748,7 +2258,7 @@
           GST_TIME_ARGS (diff));
 
       if (GST_TIME_AS_SECONDS (diff) >= h264parse->interval ||
-          h264parse->push_codec) {
+          initial_frame || h264parse->push_codec) {
         GstBuffer *codec_nal;
         gint i;
         GstClockTime new_ts;
@@ -1846,6 +2356,18 @@
     }
   }
 
+  /* If SPS/PPS and a keyframe have been parsed, and we're not converting,
+   * we might switch to passthrough mode now on the basis that we've seen
+   * the SEI packets and know optional caps params (such as multiview).
+   * This is an efficiency optimisation that relies on stream properties
+   * remaining uniform in practice. */
+  if (h264parse->can_passthrough) {
+    if (h264parse->keyframe && h264parse->have_sps && h264parse->have_pps) {
+      GST_LOG_OBJECT (parse, "Switching to passthrough mode");
+      gst_base_parse_set_passthrough (parse, TRUE);
+    }
+  }
+
   gst_h264_parse_reset_frame (h264parse);
 
   return GST_FLOW_OK;
@@ -1856,18 +2378,26 @@
 {
   GstH264Parse *h264parse;
   GstStructure *str;
-  const GValue *value;
+  const GValue *codec_data_value;
   GstBuffer *codec_data = NULL;
   gsize size;
   guint format, align, off;
   GstH264NalUnit nalu;
   GstH264ParserResult parseres;
+  GstCaps *old_caps;
 
   h264parse = GST_H264_PARSE (parse);
 
   /* reset */
   h264parse->push_codec = FALSE;
 
+  old_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SINK_PAD (parse));
+  if (old_caps) {
+    if (!gst_caps_is_equal (old_caps, caps))
+      gst_h264_parse_reset_stream_info (h264parse);
+    gst_caps_unref (old_caps);
+  }
+
   str = gst_caps_get_structure (caps, 0);
 
   /* accept upstream info if provided */
@@ -1881,9 +2411,43 @@
   /* get upstream format and align from caps */
   gst_h264_parse_format_from_caps (caps, &format, &align);
 
-  /* packetized video has a codec_data */
-  if (format != GST_H264_PARSE_FORMAT_BYTE &&
-      (value = gst_structure_get_value (str, "codec_data"))) {
+  codec_data_value = gst_structure_get_value (str, "codec_data");
+
+  /* fix up caps without stream-format for max. backwards compatibility */
+  if (format == GST_H264_PARSE_FORMAT_NONE) {
+    /* codec_data implies avc */
+    if (codec_data_value != NULL) {
+      GST_ERROR ("video/x-h264 caps with codec_data but no stream-format=avc");
+      format = GST_H264_PARSE_FORMAT_AVC;
+    } else {
+      /* otherwise assume bytestream input */
+      GST_ERROR ("video/x-h264 caps without codec_data or stream-format");
+      format = GST_H264_PARSE_FORMAT_BYTE;
+    }
+  }
+
+  /* avc caps sanity checks */
+  if (format == GST_H264_PARSE_FORMAT_AVC) {
+    /* AVC requires codec_data, AVC3 might have one and/or SPS/PPS inline */
+    if (codec_data_value == NULL)
+      goto avc_caps_codec_data_missing;
+
+    /* AVC implies alignment=au, everything else is not allowed */
+    if (align == GST_H264_PARSE_ALIGN_NONE)
+      align = GST_H264_PARSE_ALIGN_AU;
+    else if (align != GST_H264_PARSE_ALIGN_AU)
+      goto avc_caps_wrong_alignment;
+  }
+
+  /* bytestream caps sanity checks */
+  if (format == GST_H264_PARSE_FORMAT_BYTE) {
+    /* should have SPS/PSS in-band (and/or oob in streamheader field) */
+    if (codec_data_value != NULL)
+      goto bytestream_caps_with_codec_data;
+  }
+
+  /* packetized video has codec_data (required for AVC, optional for AVC3) */
+  if (codec_data_value != NULL) {
     GstMapInfo map;
     guint8 *data;
     guint num_sps, num_pps;
@@ -1896,9 +2460,13 @@
     /* make note for optional split processing */
     h264parse->packetized = TRUE;
 
-    codec_data = gst_value_get_buffer (value);
+    /* codec_data field should hold a buffer */
+    if (!GST_VALUE_HOLDS_BUFFER (codec_data_value))
+      goto avc_caps_codec_data_wrong_type;
+
+    codec_data = gst_value_get_buffer (codec_data_value);
     if (!codec_data)
-      goto wrong_type;
+      goto avc_caps_codec_data_missing;
     gst_buffer_map (codec_data, &map, GST_MAP_READ);
     data = map.data;
     size = map.size;
@@ -1960,24 +2528,14 @@
     gst_buffer_unmap (codec_data, &map);
 
     gst_buffer_replace (&h264parse->codec_data_in, codec_data);
-
-    /* if upstream sets codec_data without setting stream-format and alignment, we
-     * assume stream-format=avc,alignment=au */
-    if (format == GST_H264_PARSE_FORMAT_NONE)
-      format = GST_H264_PARSE_FORMAT_AVC;
-    if (align == GST_H264_PARSE_ALIGN_NONE)
-      align = GST_H264_PARSE_ALIGN_AU;
-  } else {
+  } else if (format == GST_H264_PARSE_FORMAT_BYTE) {
     GST_DEBUG_OBJECT (h264parse, "have bytestream h264");
     /* nothing to pre-process */
     h264parse->packetized = FALSE;
     /* we have 4 sync bytes */
     h264parse->nal_length_size = 4;
-
-    if (format == GST_H264_PARSE_FORMAT_NONE) {
-      format = GST_H264_PARSE_FORMAT_BYTE;
-      align = GST_H264_PARSE_ALIGN_AU;
-    }
+  } else {
+    /* probably AVC3 without codec_data field, anything to do here? */
   }
 
   {
@@ -1996,13 +2554,8 @@
   }
 
   if (format == h264parse->format && align == h264parse->align) {
-    /* do not set CAPS and passthrough mode if SPS/PPS have not been parsed */
-    if (h264parse->have_sps && h264parse->have_pps) {
-      gst_base_parse_set_passthrough (parse, TRUE);
-
-      /* we did parse codec-data and might supplement src caps */
-      gst_h264_parse_update_src_caps (h264parse, caps);
-    }
+    /* we did parse codec-data and might supplement src caps */
+    gst_h264_parse_update_src_caps (h264parse, caps);
   } else if (format == GST_H264_PARSE_FORMAT_AVC
       || format == GST_H264_PARSE_FORMAT_AVC3) {
     /* if input != output, and input is avc, must split before anything else */
@@ -2019,6 +2572,27 @@
   return TRUE;
 
   /* ERRORS */
+avc_caps_codec_data_wrong_type:
+  {
+    GST_WARNING_OBJECT (parse, "H.264 AVC caps, codec_data field not a buffer");
+    goto refuse_caps;
+  }
+avc_caps_codec_data_missing:
+  {
+    GST_WARNING_OBJECT (parse, "H.264 AVC caps, but no codec_data");
+    goto refuse_caps;
+  }
+avc_caps_wrong_alignment:
+  {
+    GST_WARNING_OBJECT (parse, "H.264 AVC caps with NAL alignment, must be AU");
+    goto refuse_caps;
+  }
+bytestream_caps_with_codec_data:
+  {
+    GST_WARNING_OBJECT (parse, "H.264 bytestream caps with codec_data is not "
+        "expected, send SPS/PPS in-band with data or in streamheader field");
+    goto refuse_caps;
+  }
 avcc_too_small:
   {
     GST_DEBUG_OBJECT (h264parse, "avcC size %" G_GSIZE_FORMAT " < 8", size);
@@ -2029,11 +2603,6 @@
     GST_DEBUG_OBJECT (h264parse, "wrong avcC version");
     goto refuse_caps;
   }
-wrong_type:
-  {
-    GST_DEBUG_OBJECT (h264parse, "wrong codec-data type");
-    goto refuse_caps;
-  }
 refuse_caps:
   {
     GST_WARNING_OBJECT (h264parse, "refused caps %" GST_PTR_FORMAT, caps);
@@ -2147,6 +2716,8 @@
               || segment->applied_rate != 1.0))
         h264parse->do_ts = FALSE;
 
+      h264parse->last_report = GST_CLOCK_TIME_NONE;
+
       res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event);
       break;
     }
diff --git a/gst/videoparsers/gsth264parse.h b/gst/videoparsers/gsth264parse.h
index c9d188b..58d818c 100644
--- a/gst/videoparsers/gsth264parse.h
+++ b/gst/videoparsers/gsth264parse.h
@@ -28,6 +28,7 @@
 #include <gst/gst.h>
 #include <gst/base/gstbaseparse.h>
 #include <gst/codecparsers/gsth264parser.h>
+#include <gst/video/video.h>
 
 G_BEGIN_DECLS
 
@@ -73,6 +74,8 @@
   guint align;
   guint format;
   gint current_off;
+  /* True if input format and alignment match negotiated output */
+  gboolean can_passthrough;
 
   GstClockTime last_report;
   gboolean push_codec;
@@ -109,6 +112,7 @@
   gboolean update_caps;
   GstAdapter *frame_out;
   gboolean keyframe;
+  gboolean header;
   gboolean frame_start;
   /* AU state */
   gboolean picture_start;
@@ -118,6 +122,11 @@
 
   GstClockTime pending_key_unit_ts;
   GstEvent *force_key_unit_event;
+
+  /* Stereo / multiview info */
+  GstVideoMultiviewMode multiview_mode;
+  GstVideoMultiviewFlags multiview_flags;
+  gboolean first_in_bundle;
 };
 
 struct _GstH264ParseClass
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index 9a98dcc..d649681 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -37,8 +37,7 @@
 enum
 {
   PROP_0,
-  PROP_CONFIG_INTERVAL,
-  PROP_LAST
+  PROP_CONFIG_INTERVAL
 };
 
 enum
@@ -142,6 +141,7 @@
   h265parse->frame_out = gst_adapter_new ();
   gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h265parse), FALSE);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h265parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h265parse));
 }
 
 
@@ -168,6 +168,7 @@
   h265parse->idr_pos = -1;
   h265parse->sei_pos = -1;
   h265parse->keyframe = FALSE;
+  h265parse->header = FALSE;
   gst_adapter_clear (h265parse->frame_out);
 }
 
@@ -229,7 +230,7 @@
   GST_DEBUG_OBJECT (parse, "stop");
   gst_h265_parse_reset (h265parse);
 
-  for (i = 0; i < GST_H265_MAX_SPS_COUNT; i++)
+  for (i = 0; i < GST_H265_MAX_VPS_COUNT; i++)
     gst_buffer_replace (&h265parse->vps_nals[i], NULL);
   for (i = 0; i < GST_H265_MAX_SPS_COUNT; i++)
     gst_buffer_replace (&h265parse->sps_nals[i], NULL);
@@ -320,7 +321,7 @@
   caps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (h265parse));
   GST_DEBUG_OBJECT (h265parse, "allowed caps: %" GST_PTR_FORMAT, caps);
 
-  /* concentrate on leading structure, since decodebin2 parser
+  /* concentrate on leading structure, since decodebin parser
    * capsfilter always includes parser template caps */
   if (caps) {
     caps = gst_caps_truncate (caps);
@@ -337,7 +338,8 @@
     }
   }
 
-  if (caps) {
+  /* FIXME We could fail the negotiation immediatly if caps are empty */
+  if (caps && !gst_caps_is_empty (caps)) {
     /* fixate to avoid ambiguity with lists when parsing */
     caps = gst_caps_fixate (caps);
     gst_h265_parse_format_from_caps (caps, &format, &align);
@@ -419,6 +421,10 @@
   buf = gst_buffer_new_allocate (NULL, size, NULL);
   gst_buffer_fill (buf, 0, nalu->data + nalu->offset, size);
 
+  /* Indicate that buffer contain a header needed for decoding */
+  if (naltype >= GST_H265_NAL_VPS && naltype <= GST_H265_NAL_PPS)
+    GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
+
   if (store[id])
     gst_buffer_unref (store[id]);
 
@@ -492,7 +498,7 @@
   GstH265ParserResult pres = GST_H265_PARSER_ERROR;
 
   /* nothing to do for broken input */
-  if (G_UNLIKELY (nalu->size < 3)) {
+  if (G_UNLIKELY (nalu->size < 2)) {
     GST_DEBUG_OBJECT (h265parse, "not processing nal size %u", nalu->size);
     return;
   }
@@ -524,6 +530,7 @@
       }
 
       gst_h265_parser_store_nal (h265parse, vps.id, nal_type, nalu);
+      h265parse->header |= TRUE;
       break;
     case GST_H265_NAL_SPS:
       pres = gst_h265_parser_parse_sps (nalparser, nalu, &sps, TRUE);
@@ -546,6 +553,7 @@
       }
 
       gst_h265_parser_store_nal (h265parse, sps.id, nal_type, nalu);
+      h265parse->header |= TRUE;
       break;
     case GST_H265_NAL_PPS:
       pres = gst_h265_parser_parse_pps (nalparser, nalu, &pps);
@@ -571,6 +579,7 @@
       }
 
       gst_h265_parser_store_nal (h265parse, pps.id, nal_type, nalu);
+      h265parse->header |= TRUE;
       break;
     case GST_H265_NAL_PREFIX_SEI:
     case GST_H265_NAL_SUFFIX_SEI:
@@ -686,7 +695,7 @@
   /* coded slice NAL starts a picture,
    * i.e. other types become aggregated in front of it */
   h265parse->picture_start |= ((nal_type >= GST_H265_NAL_SLICE_TRAIL_N
-          && nal_type <= GST_H265_NAL_SLICE_TRAIL_R)
+          && nal_type <= GST_H265_NAL_SLICE_RASL_R)
       || (nal_type >= GST_H265_NAL_SLICE_BLA_W_LP
           && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX));
 
@@ -704,7 +713,7 @@
   /* Any VCL Nal unit with first_slice_segment_in_pic_flag == 1 considered start of frame */
   complete |= h265parse->picture_start
       && (((nal_type >= GST_H265_NAL_SLICE_TRAIL_N
-              && nal_type <= GST_H265_NAL_SLICE_TRAIL_R)
+              && nal_type <= GST_H265_NAL_SLICE_RASL_R)
           || (nal_type >= GST_H265_NAL_SLICE_BLA_W_LP
               && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX))
       && (nnalu.data[nnalu.offset + 2] & 0x80));
@@ -866,7 +875,6 @@
       case GST_H265_PARSER_NO_NAL:
         *skipsize = size - 3;
         goto skip;
-        break;
       default:
         g_assert_not_reached ();
         break;
@@ -930,7 +938,6 @@
           nalu.offset = nalu.sc_offset;
           goto end;
         }
-        break;
       default:
         g_assert_not_reached ();
         break;
@@ -1193,6 +1200,184 @@
   }
 }
 
+static const gchar *
+digit_to_string (guint digit)
+{
+  static const char itoa[][2] = {
+    "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
+  };
+
+  if (G_LIKELY (digit < 10))
+    return itoa[digit];
+  else
+    return NULL;
+}
+
+static const gchar *
+get_profile_string (guint8 profile_idc)
+{
+  const gchar *profile = NULL;
+
+  if (profile_idc == 1)
+    profile = "main";
+  else if (profile_idc == 2)
+    profile = "main-10";
+  else if (profile_idc == 3)
+    profile = "main-still-picture";
+
+  return profile;
+}
+
+static const gchar *
+get_tier_string (guint8 tier_flag)
+{
+  const gchar *tier = NULL;
+
+  if (tier_flag)
+    tier = "high";
+  else
+    tier = "main";
+
+  return tier;
+}
+
+static const gchar *
+get_level_string (guint8 level_idc)
+{
+  if (level_idc % 30 == 0)
+    return digit_to_string (level_idc / 30);
+  else {
+    switch (level_idc) {
+      case 63:
+        return "2.1";
+        break;
+      case 93:
+        return "3.1";
+        break;
+      case 123:
+        return "4.1";
+        break;
+      case 153:
+        return "5.1";
+        break;
+      case 156:
+        return "5.2";
+        break;
+      case 183:
+        return "6.1";
+        break;
+      case 186:
+        return "6.2";
+        break;
+      default:
+        return NULL;
+    }
+  }
+}
+
+static GstCaps *
+get_compatible_profile_caps (GstH265SPS * sps)
+{
+  GstCaps *caps = NULL;
+  const gchar **profiles = NULL;
+  gint i;
+  GValue compat_profiles = G_VALUE_INIT;
+  g_value_init (&compat_profiles, GST_TYPE_LIST);
+
+  switch (sps->profile_tier_level.profile_idc) {
+    case GST_H265_PROFILE_MAIN_10:
+      if (sps->profile_tier_level.profile_compatibility_flag[1]) {
+        if (sps->profile_tier_level.profile_compatibility_flag[3]) {
+          static const gchar *profile_array[] =
+              { "main", "main-still-picture", NULL };
+          profiles = profile_array;
+        } else {
+          static const gchar *profile_array[] = { "main", NULL };
+          profiles = profile_array;
+        }
+      }
+      break;
+    case GST_H265_PROFILE_MAIN:
+      if (sps->profile_tier_level.profile_compatibility_flag[3]) {
+        static const gchar *profile_array[] =
+            { "main-still-picture", "main-10", NULL
+        };
+        profiles = profile_array;
+      } else {
+        static const gchar *profile_array[] = { "main-10", NULL };
+        profiles = profile_array;
+      }
+      break;
+    case GST_H265_PROFILE_MAIN_STILL_PICTURE:
+    {
+      static const gchar *profile_array[] = { "main", "main-10", NULL
+      };
+      profiles = profile_array;
+    }
+      break;
+    default:
+      break;
+  }
+
+  if (profiles) {
+    GValue value = G_VALUE_INIT;
+    caps = gst_caps_new_empty_simple ("video/x-h265");
+    for (i = 0; profiles[i]; i++) {
+      g_value_init (&value, G_TYPE_STRING);
+      g_value_set_string (&value, profiles[i]);
+      gst_value_list_append_value (&compat_profiles, &value);
+      g_value_unset (&value);
+    }
+    gst_caps_set_value (caps, "profile", &compat_profiles);
+    g_value_unset (&compat_profiles);
+  }
+
+  return caps;
+}
+
+/* if downstream didn't support the exact profile indicated in sps header,
+ * check for the compatible profiles also */
+static void
+ensure_caps_profile (GstH265Parse * h265parse, GstCaps * caps, GstH265SPS * sps)
+{
+  GstCaps *filter_caps, *peer_caps, *compat_caps;
+
+  filter_caps = gst_caps_new_empty_simple ("video/x-h265");
+  peer_caps =
+      gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (h265parse), filter_caps);
+
+  if (peer_caps && !gst_caps_can_intersect (caps, peer_caps)) {
+    GstStructure *structure;
+
+    compat_caps = get_compatible_profile_caps (sps);
+    if (compat_caps != NULL) {
+      GstCaps *res_caps = NULL;
+
+      res_caps = gst_caps_intersect (peer_caps, compat_caps);
+
+      if (res_caps && !gst_caps_is_empty (res_caps)) {
+        const gchar *profile_str = NULL;
+
+        res_caps = gst_caps_fixate (res_caps);
+        structure = gst_caps_get_structure (res_caps, 0);
+        profile_str = gst_structure_get_string (structure, "profile");
+        if (profile_str) {
+          gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_str,
+              NULL);
+          GST_DEBUG_OBJECT (h265parse,
+              "Setting compatible profile %s to the caps", profile_str);
+        }
+      }
+      if (res_caps)
+        gst_caps_unref (res_caps);
+      gst_caps_unref (compat_caps);
+    }
+  }
+  if (peer_caps)
+    gst_caps_unref (peer_caps);
+  gst_caps_unref (filter_caps);
+}
+
 static void
 gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
 {
@@ -1249,9 +1434,24 @@
   if (G_UNLIKELY (!sps)) {
     caps = gst_caps_copy (sink_caps);
   } else {
-    h265parse->width = sps->width;
-    h265parse->height = sps->height;
-    modified = TRUE;
+    gint crop_width, crop_height;
+
+    if (sps->conformance_window_flag) {
+      crop_width = sps->crop_rect_width;
+      crop_height = sps->crop_rect_height;
+    } else {
+      crop_width = sps->width;
+      crop_height = sps->height;
+    }
+
+    if (G_UNLIKELY (h265parse->width != crop_width ||
+            h265parse->height != crop_height)) {
+      GST_INFO_OBJECT (h265parse, "resolution changed %dx%d",
+          crop_width, crop_height);
+      h265parse->width = crop_width;
+      h265parse->height = crop_height;
+      modified = TRUE;
+    }
 
     /* 0/1 is set as the default in the codec parser */
     if (sps->vui_params.timing_info_present_flag &&
@@ -1337,15 +1537,22 @@
 
     /* set profile and level in caps */
     if (sps) {
-      GstMapInfo map;
-      GstBuffer *sps_buf = h265parse->sps_nals[sps->id];
+      const gchar *profile, *tier, *level;
 
-      if (sps_buf) {
-        gst_buffer_map (sps_buf, &map, GST_MAP_READ);
-        gst_codec_utils_h265_caps_set_level_tier_and_profile (caps,
-            map.data + 1, map.size - 1);
-        gst_buffer_unmap (sps_buf, &map);
-      }
+      profile = get_profile_string (sps->profile_tier_level.profile_idc);
+      if (profile != NULL)
+        gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile, NULL);
+
+      tier = get_tier_string (sps->profile_tier_level.tier_flag);
+      if (tier != NULL)
+        gst_caps_set_simple (caps, "tier", G_TYPE_STRING, tier, NULL);
+
+      level = get_level_string (sps->profile_tier_level.level_idc);
+      if (level != NULL)
+        gst_caps_set_simple (caps, "level", G_TYPE_STRING, level, NULL);
+
+      /* relax the profile constraint to find a suitable decoder */
+      ensure_caps_profile (h265parse, caps, sps);
     }
 
     src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h265parse));
@@ -1409,6 +1616,11 @@
   else
     GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
 
+  if (h265parse->header)
+    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
+  else
+    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_HEADER);
+
   /* replace with transformed HEVC output if applicable */
   av = gst_adapter_available (h265parse->frame_out);
   if (av) {
@@ -1561,8 +1773,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h265parse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     h265parse->sent_codec_tag = TRUE;
@@ -1841,8 +2053,8 @@
   }
 
   if (format == h265parse->format && align == h265parse->align) {
-    /* do not set CAPS and passthrough mode if VPS/SPS/PPS have not been parsed */
-    if (h265parse->have_vps && h265parse->have_sps && h265parse->have_pps) {
+    /* do not set CAPS and passthrough mode if SPS/PPS have not been parsed */
+    if (h265parse->have_sps && h265parse->have_pps) {
       gst_base_parse_set_passthrough (parse, TRUE);
 
       /* we did parse codec-data and might supplement src caps */
diff --git a/gst/videoparsers/gsth265parse.h b/gst/videoparsers/gsth265parse.h
index 7e07a60..91e84ab 100644
--- a/gst/videoparsers/gsth265parse.h
+++ b/gst/videoparsers/gsth265parse.h
@@ -83,6 +83,7 @@
   gboolean update_caps;
   GstAdapter *frame_out;
   gboolean keyframe;
+  gboolean header;
   /* AU state */
   gboolean picture_start;
 
diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c
index 1afaa17..53db2d5 100644
--- a/gst/videoparsers/gstmpeg4videoparse.c
+++ b/gst/videoparsers/gstmpeg4videoparse.c
@@ -66,8 +66,7 @@
 {
   PROP_0,
   PROP_DROP,
-  PROP_CONFIG_INTERVAL,
-  PROP_LAST
+  PROP_CONFIG_INTERVAL
 };
 
 #define gst_mpeg4vparse_parent_class parent_class
@@ -188,6 +187,7 @@
 
   gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (parse));
 }
 
 static void
@@ -509,7 +509,6 @@
         mp4vparse->last_sc = size - 3;
       }
       goto out;
-      break;
     default:
       /* decide whether this startcode ends a frame */
       ret = gst_mpeg4vparse_process_sc (mp4vparse, &packet, size);
@@ -731,8 +730,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mp4vparse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     mp4vparse->sent_codec_tag = TRUE;
diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c
index dadab94..54ee13b 100644
--- a/gst/videoparsers/gstmpegvideoparse.c
+++ b/gst/videoparsers/gstmpegvideoparse.c
@@ -59,8 +59,7 @@
 {
   PROP_0,
   PROP_DROP,
-  PROP_GOP_SPLIT,
-  PROP_LAST
+  PROP_GOP_SPLIT
 };
 
 #define parent_class gst_mpegv_parse_parent_class
@@ -178,6 +177,7 @@
 
   gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (parse));
 }
 
 static void
@@ -575,8 +575,8 @@
 }
 
 /* FIXME move into baseparse, or anything equivalent;
- * see https://bugzilla.gnome.org/show_bug.cgi?id=650093 */
-#define GST_BASE_PARSE_FRAME_FLAG_PARSING   0x10000
+ * see https://bugzilla.gnome.org/show_bug.cgi?id=650093
+ * #define GST_BASE_PARSE_FRAME_FLAG_PARSING   0x100000 */
 
 static inline void
 update_frame_parsing_status (GstMpegvParse * mpvparse,
@@ -619,7 +619,7 @@
 
   /* if already found a previous start code, e.g. start of frame, go for next */
   if (mpvparse->last_sc >= 0) {
-    off = packet.offset = mpvparse->last_sc;
+    packet.offset = mpvparse->last_sc;
     packet.size = 0;
     goto next;
   }
@@ -954,8 +954,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (parse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     mpvparse->send_codec_tag = FALSE;
   }
diff --git a/gst/videoparsers/gstpngparse.c b/gst/videoparsers/gstpngparse.c
index efd62a6..e08fe71 100644
--- a/gst/videoparsers/gstpngparse.c
+++ b/gst/videoparsers/gstpngparse.c
@@ -49,6 +49,7 @@
 G_DEFINE_TYPE (GstPngParse, gst_png_parse, GST_TYPE_BASE_PARSE);
 
 static gboolean gst_png_parse_start (GstBaseParse * parse);
+static gboolean gst_png_parse_event (GstBaseParse * parse, GstEvent * event);
 static GstFlowReturn gst_png_parse_handle_frame (GstBaseParse * parse,
     GstBaseParseFrame * frame, gint * skipsize);
 static GstFlowReturn gst_png_parse_pre_push_frame (GstBaseParse * parse,
@@ -72,6 +73,7 @@
 
   /* Override BaseParse vfuncs */
   parse_class->start = GST_DEBUG_FUNCPTR (gst_png_parse_start);
+  parse_class->sink_event = GST_DEBUG_FUNCPTR (gst_png_parse_event);
   parse_class->handle_frame = GST_DEBUG_FUNCPTR (gst_png_parse_handle_frame);
   parse_class->pre_push_frame =
       GST_DEBUG_FUNCPTR (gst_png_parse_pre_push_frame);
@@ -80,6 +82,8 @@
 static void
 gst_png_parse_init (GstPngParse * pngparse)
 {
+  GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (pngparse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (pngparse));
 }
 
 static gboolean
@@ -100,6 +104,24 @@
   return TRUE;
 }
 
+static gboolean
+gst_png_parse_event (GstBaseParse * parse, GstEvent * event)
+{
+  gboolean res;
+
+  res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      /* the start code and at least 2 empty frames (IHDR and IEND) */
+      gst_base_parse_set_min_frame_size (parse, 8 + 12 + 12);
+      break;
+    default:
+      break;
+  }
+
+  return res;
+}
 
 static GstFlowReturn
 gst_png_parse_handle_frame (GstBaseParse * parse,
@@ -155,18 +177,27 @@
     if (!gst_byte_reader_get_uint32_le (&reader, &code))
       goto beach;
 
+    GST_TRACE_OBJECT (parse, "%" GST_FOURCC_FORMAT " chunk, %u bytes",
+        GST_FOURCC_ARGS (code), length);
+
     if (code == GST_MAKE_FOURCC ('I', 'H', 'D', 'R')) {
       if (!gst_byte_reader_get_uint32_be (&reader, &width))
         goto beach;
       if (!gst_byte_reader_get_uint32_be (&reader, &height))
         goto beach;
       length -= 8;
+    } else if (code == GST_MAKE_FOURCC ('I', 'D', 'A', 'T')) {
+      gst_base_parse_set_min_frame_size (parse,
+          gst_byte_reader_get_pos (&reader) + 4 + length + 12);
     }
 
     if (!gst_byte_reader_skip (&reader, length + 4))
       goto beach;
 
     if (code == GST_MAKE_FOURCC ('I', 'E', 'N', 'D')) {
+      /* the start code and at least 2 empty frames (IHDR and IEND) */
+      gst_base_parse_set_min_frame_size (parse, 8 + 12 + 12);
+
       if (pngparse->width != width || pngparse->height != height) {
         GstCaps *caps, *sink_caps;
 
@@ -192,6 +223,8 @@
           } else {
             GST_WARNING_OBJECT (pngparse, "No framerate set");
           }
+
+          gst_caps_unref (sink_caps);
         }
 
         if (!gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (parse), caps))
@@ -234,8 +267,8 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (pngparse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     pngparse->sent_codec_tag = TRUE;
diff --git a/gst/videoparsers/gstvc1parse.c b/gst/videoparsers/gstvc1parse.c
index 02e2d0f..63de4e9 100644
--- a/gst/videoparsers/gstvc1parse.c
+++ b/gst/videoparsers/gstvc1parse.c
@@ -252,6 +252,7 @@
 
   gst_vc1_parse_reset (vc1parse);
   GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (vc1parse));
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (vc1parse));
 }
 
 static void
@@ -287,6 +288,9 @@
   gst_buffer_replace (&vc1parse->seq_layer_buffer, NULL);
   gst_buffer_replace (&vc1parse->seq_hdr_buffer, NULL);
   gst_buffer_replace (&vc1parse->entrypoint_buffer, NULL);
+
+  vc1parse->seq_layer_sent = FALSE;
+  vc1parse->frame_layer_first_frame_sent = FALSE;
 }
 
 static gboolean
@@ -314,6 +318,160 @@
 }
 
 static gboolean
+gst_vc1_parse_is_format_allowed (GstVC1Parse * vc1parse)
+{
+  if (vc1parse->profile == GST_VC1_PROFILE_ADVANCED &&
+      vc1parse->output_stream_format ==
+      VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME) {
+    GST_ERROR_OBJECT (vc1parse,
+        "sequence-layer-raw-frame is not allowed in advanced profile");
+    return FALSE;
+  } else if (vc1parse->profile == GST_VC1_PROFILE_SIMPLE &&
+      (vc1parse->output_stream_format == VC1_STREAM_FORMAT_BDU ||
+          vc1parse->output_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
+          vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU ||
+          vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME)) {
+    GST_ERROR_OBJECT (vc1parse,
+        "output stream-format not allowed in simple profile");
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (vc1parse, "check output header-format");
+  switch (vc1parse->output_header_format) {
+    case VC1_HEADER_FORMAT_ASF:
+    case VC1_HEADER_FORMAT_SEQUENCE_LAYER:
+      /* Doesn't make sense to have sequence-layer-* stream-format */
+      if (vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU ||
+          vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME ||
+          vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME ||
+          vc1parse->output_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER)
+        return FALSE;
+      break;
+    case VC1_HEADER_FORMAT_NONE:
+      /* In simple/main profile, there is no sequence header BDU */
+      if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED &&
+          (vc1parse->output_stream_format == VC1_STREAM_FORMAT_BDU ||
+              vc1parse->output_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
+              vc1parse->output_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER))
+        return FALSE;
+
+      /* ASF stream-format doesn't carry sequence header */
+      if (vc1parse->output_stream_format == VC1_STREAM_FORMAT_ASF)
+        return FALSE;
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+
+  if (vc1parse->output_stream_format == vc1parse->input_stream_format)
+    return TRUE;
+
+  GST_DEBUG_OBJECT (vc1parse, "check stream-format conversion");
+  switch (vc1parse->output_stream_format) {
+    case VC1_STREAM_FORMAT_BDU:
+      if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER)
+        goto conversion_not_supported;
+      break;
+
+    case VC1_STREAM_FORMAT_BDU_FRAME:
+      if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_ASF ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER)
+        goto conversion_not_supported;
+
+      if (vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME)
+        return FALSE;
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+      if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER)
+        goto conversion_not_supported;
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+      if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_ASF ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER)
+        goto conversion_not_supported;
+
+      if (vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME)
+        return FALSE;
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+      if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME ||
+          vc1parse->input_stream_format ==
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER ||
+          vc1parse->input_stream_format == VC1_STREAM_FORMAT_FRAME_LAYER)
+        goto conversion_not_supported;
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+      if (vc1parse->input_stream_format != VC1_STREAM_FORMAT_FRAME_LAYER &&
+          vc1parse->input_stream_format != VC1_STREAM_FORMAT_ASF)
+        goto conversion_not_supported;
+      break;
+
+    case VC1_STREAM_FORMAT_ASF:
+      goto conversion_not_supported;
+      break;
+
+    case VC1_STREAM_FORMAT_FRAME_LAYER:
+      if (vc1parse->input_stream_format !=
+          VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER &&
+          vc1parse->input_stream_format != VC1_STREAM_FORMAT_ASF)
+        goto conversion_not_supported;
+      break;
+
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+
+  return TRUE;
+
+conversion_not_supported:
+  GST_ERROR_OBJECT (vc1parse, "stream conversion not implemented yet");
+  return FALSE;
+}
+
+static gboolean
 gst_vc1_parse_renegotiate (GstVC1Parse * vc1parse)
 {
   GstCaps *in_caps;
@@ -390,6 +548,10 @@
 
   if (allowed_caps)
     gst_caps_unref (allowed_caps);
+
+  if (!gst_vc1_parse_is_format_allowed (vc1parse))
+    return FALSE;
+
   vc1parse->renegotiate = FALSE;
   vc1parse->update_caps = TRUE;
 
@@ -606,6 +768,99 @@
   }
 }
 
+static GstBuffer *
+gst_vc1_parse_make_sequence_layer (GstVC1Parse * vc1parse)
+{
+  GstBuffer *seq_layer_buffer;
+  guint8 *data;
+  guint32 structC = 0;
+  GstMapInfo minfo;
+
+  seq_layer_buffer = gst_buffer_new_and_alloc (36);
+  gst_buffer_map (seq_layer_buffer, &minfo, GST_MAP_WRITE);
+
+  data = minfo.data;
+  /* According to SMPTE 421M Annex L, the sequence layer shall be
+   * represented as a sequence of 32 bit unsigned integers and each
+   * integers should be serialized in little-endian byte-order except for
+   * STRUCT_C which should be serialized in big-endian byte-order. */
+
+  /* Unknown number of frames and start code */
+  data[0] = 0xff;
+  data[1] = 0xff;
+  data[2] = 0xff;
+  data[3] = 0xc5;
+
+  /* 0x00000004 */
+  GST_WRITE_UINT32_LE (data + 4, 4);
+
+  /* structC */
+  structC |= (vc1parse->profile << 30);
+  if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED) {
+    /* Build simple/main structC from sequence header */
+    structC |= (vc1parse->seq_hdr.struct_c.wmvp << 28);
+    structC |= (vc1parse->seq_hdr.struct_c.frmrtq_postproc << 25);
+    structC |= (vc1parse->seq_hdr.struct_c.bitrtq_postproc << 20);
+    structC |= (vc1parse->seq_hdr.struct_c.loop_filter << 19);
+    /* Reserved3 shall be set to zero */
+    structC |= (vc1parse->seq_hdr.struct_c.multires << 17);
+    /* Reserved4 shall be set to one */
+    structC |= (1 << 16);
+    structC |= (vc1parse->seq_hdr.struct_c.fastuvmc << 15);
+    structC |= (vc1parse->seq_hdr.struct_c.extended_mv << 14);
+    structC |= (vc1parse->seq_hdr.struct_c.dquant << 12);
+    structC |= (vc1parse->seq_hdr.struct_c.vstransform << 11);
+    /* Reserved5 shall be set to zero */
+    structC |= (vc1parse->seq_hdr.struct_c.overlap << 9);
+    structC |= (vc1parse->seq_hdr.struct_c.syncmarker << 8);
+    structC |= (vc1parse->seq_hdr.struct_c.rangered << 7);
+    structC |= (vc1parse->seq_hdr.struct_c.maxbframes << 4);
+    structC |= (vc1parse->seq_hdr.struct_c.quantizer << 2);
+    structC |= (vc1parse->seq_hdr.struct_c.finterpflag << 1);
+    /* Reserved6 shall be set to one */
+    structC |= 1;
+  }
+  GST_WRITE_UINT32_BE (data + 8, structC);
+
+  /* structA */
+  if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED) {
+    GST_WRITE_UINT32_LE (data + 12, vc1parse->height);
+    GST_WRITE_UINT32_LE (data + 16, vc1parse->width);
+  } else {
+    GST_WRITE_UINT32_LE (data + 12, 0);
+    GST_WRITE_UINT32_LE (data + 16, 0);
+  }
+
+  /* 0x0000000c */
+  GST_WRITE_UINT32_LE (data + 20, 0x0000000c);
+
+  /* structB */
+  /* Unknown HRD_BUFFER */
+  GST_WRITE_UINT24_LE (data + 24, 0);
+  if ((gint) vc1parse->level != -1)
+    data[27] = (vc1parse->level << 5);
+  else
+    data[27] = (0x4 << 5);      /* Use HIGH level */
+  /* Unknown HRD_RATE */
+  GST_WRITE_UINT32_LE (data + 28, 0);
+  /* Framerate */
+  if (vc1parse->fps_d == 0) {
+    /* If not known, it seems we need to put in the maximum framerate
+       possible for the profile/level used (this is for RTP
+       (https://tools.ietf.org/html/draft-ietf-avt-rtp-vc1-06#section-6.1),
+       so likely elsewhere too */
+    GST_WRITE_UINT32_LE (data + 32, gst_vc1_parse_get_max_framerate (vc1parse));
+  } else {
+    GST_WRITE_UINT32_LE (data + 32,
+        ((guint32) (((gdouble) vc1parse->fps_n) /
+                ((gdouble) vc1parse->fps_d) + 0.5)));
+  }
+
+  gst_buffer_unmap (seq_layer_buffer, &minfo);
+
+  return seq_layer_buffer;
+}
+
 static gboolean
 gst_vc1_parse_update_caps (GstVC1Parse * vc1parse)
 {
@@ -795,90 +1050,9 @@
         gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER,
             vc1parse->seq_layer_buffer, NULL);
       } else {
-        GstBuffer *codec_data = gst_buffer_new_and_alloc (36);
-        guint8 *data;
-        guint32 structC = 0;
-        GstMapInfo minfo;
+        GstBuffer *codec_data;
 
-        gst_buffer_map (codec_data, &minfo, GST_MAP_WRITE);
-
-        data = minfo.data;
-        /* According to SMPTE 421M Annex L, the sequence layer shall be
-         * represented as a sequence of 32 bit unsigned integers and each
-         * integers should be serialized in little-endian byte-order except for
-         * STRUCT_C which should be serialized in big-endian byte-order. */
-
-        /* Unknown number of frames and start code */
-        data[0] = 0xff;
-        data[1] = 0xff;
-        data[2] = 0xff;
-        data[3] = 0xc5;
-
-        /* 0x00000004 */
-        GST_WRITE_UINT32_LE (data + 4, 4);
-
-        /* structC */
-        structC |= (vc1parse->profile << 30);
-        if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED) {
-          structC |= (vc1parse->seq_layer.struct_c.wmvp << 28);
-          structC |= (vc1parse->seq_layer.struct_c.frmrtq_postproc << 25);
-          structC |= (vc1parse->seq_layer.struct_c.bitrtq_postproc << 20);
-          structC |= (vc1parse->seq_layer.struct_c.loop_filter << 19);
-          /* Reserved3 shall be set to zero */
-          structC |= (vc1parse->seq_layer.struct_c.multires << 17);
-          /* Reserved4 shall be set to one */
-          structC |= (1 << 16);
-          structC |= (vc1parse->seq_layer.struct_c.fastuvmc << 15);
-          structC |= (vc1parse->seq_layer.struct_c.extended_mv << 14);
-          structC |= (vc1parse->seq_layer.struct_c.dquant << 12);
-          structC |= (vc1parse->seq_layer.struct_c.vstransform << 11);
-          /* Reserved5 shall be set to zero */
-          structC |= (vc1parse->seq_layer.struct_c.overlap << 9);
-          structC |= (vc1parse->seq_layer.struct_c.syncmarker << 8);
-          structC |= (vc1parse->seq_layer.struct_c.rangered << 7);
-          structC |= (vc1parse->seq_layer.struct_c.maxbframes << 4);
-          structC |= (vc1parse->seq_layer.struct_c.quantizer << 2);
-          structC |= (vc1parse->seq_layer.struct_c.finterpflag << 1);
-          /* Reserved6 shall be set to one */
-          structC |= 1;
-        }
-        GST_WRITE_UINT32_BE (data + 8, structC);
-
-        /* structA */
-        if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED) {
-          GST_WRITE_UINT32_LE (data + 12, vc1parse->height);
-          GST_WRITE_UINT32_LE (data + 16, vc1parse->width);
-        } else {
-          GST_WRITE_UINT32_LE (data + 12, 0);
-          GST_WRITE_UINT32_LE (data + 16, 0);
-        }
-
-        /* 0x0000000c */
-        GST_WRITE_UINT32_LE (data + 20, 0x0000000c);
-
-        /* structB */
-        /* Unknown HRD_BUFFER */
-        GST_WRITE_UINT24_LE (data + 24, 0);
-        if ((gint) vc1parse->level != -1)
-          data[27] = (vc1parse->level << 5);
-        else
-          data[27] = (0x4 << 5);        /* Use HIGH level */
-        /* Unknown HRD_RATE */
-        GST_WRITE_UINT32_LE (data + 28, 0);
-        /* Framerate */
-        if (vc1parse->fps_d == 0) {
-          /* If not known, it seems we need to put in the maximum framerate
-             possible for the profile/level used (this is for RTP
-             (https://tools.ietf.org/html/draft-ietf-avt-rtp-vc1-06#section-6.1),
-             so likely elsewhere too */
-          GST_WRITE_UINT32_LE (data + 32,
-              gst_vc1_parse_get_max_framerate (vc1parse));
-        } else {
-          GST_WRITE_UINT32_LE (data + 32,
-              ((guint32) (((gdouble) vc1parse->fps_n) /
-                      ((gdouble) vc1parse->fps_d) + 0.5)));
-        }
-        gst_buffer_unmap (codec_data, &minfo);
+        codec_data = gst_vc1_parse_make_sequence_layer (vc1parse);
 
         gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data,
             NULL);
@@ -1136,8 +1310,6 @@
       /* frame-layer */
       gst_base_parse_set_min_frame_size (GST_BASE_PARSE (vc1parse), 8);
     }
-
-    ret = GST_FLOW_OK;
   } else if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU ||
       vc1parse->input_stream_format == VC1_STREAM_FORMAT_BDU_FRAME ||
       (vc1parse->seq_layer_buffer
@@ -1173,8 +1345,6 @@
       ret = GST_FLOW_ERROR;
       goto done;
     }
-
-    ret = GST_FLOW_OK;
   } else if (vc1parse->input_stream_format == VC1_STREAM_FORMAT_ASF ||
       (vc1parse->seq_layer_buffer
           && vc1parse->input_stream_format ==
@@ -1245,7 +1415,6 @@
       else
         GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
     }
-    ret = GST_FLOW_OK;
   } else {
     GstVC1ParserResult pres;
     GstVC1FrameLayer flayer;
@@ -1320,8 +1489,6 @@
         goto done;
       }
     }
-
-    ret = GST_FLOW_OK;
   }
 
   /* Need sequence header or sequence layer here, above code
@@ -1343,7 +1510,6 @@
         || vc1parse->input_stream_format ==
         VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME) {
       frame->flags |= GST_BASE_PARSE_FRAME_FLAG_QUEUE;
-      ret = GST_FLOW_OK;
     } else {
       GST_ERROR_OBJECT (vc1parse, "Need entrypoint for the advanced profile");
       ret = GST_FLOW_ERROR;
@@ -1370,9 +1536,165 @@
 }
 
 static GstFlowReturn
+gst_vc1_parse_push_sequence_layer (GstVC1Parse * vc1parse)
+{
+  GstBuffer *seq_layer;
+
+  if ((seq_layer = vc1parse->seq_layer_buffer))
+    gst_buffer_ref (seq_layer);
+  else
+    seq_layer = gst_vc1_parse_make_sequence_layer (vc1parse);
+
+  return gst_pad_push (GST_BASE_PARSE_SRC_PAD (vc1parse), seq_layer);
+}
+
+static GstFlowReturn
+gst_vc1_parse_convert_asf_to_bdu (GstVC1Parse * vc1parse,
+    GstBaseParseFrame * frame)
+{
+  GstByteWriter bw;
+  GstBuffer *buffer;
+  GstBuffer *tmp;
+  GstMemory *mem;
+  guint8 sc_data[4];
+  guint32 startcode;
+  gboolean ok;
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  buffer = frame->buffer;
+
+  /* Simple profile doesn't have start codes so bdu format is not possible */
+  if (vc1parse->profile == GST_VC1_PROFILE_SIMPLE) {
+    GST_ERROR_OBJECT (vc1parse, "can't convert to bdu in simple profile");
+    ret = GST_FLOW_NOT_NEGOTIATED;
+    goto done;
+  }
+
+  /* ASF frame could have a start code at the beginning or not. So we first
+   * check for a start code if we have at least 4 bytes in the buffer. */
+  if (gst_buffer_extract (buffer, 0, sc_data, 4) == 4) {
+    startcode = GST_READ_UINT32_BE (sc_data);
+    if (((startcode & 0xffffff00) == 0x00000100)) {
+      /* Start code found */
+      goto done;
+    }
+  }
+
+  /* Yes, a frame could be smaller than 4 bytes and valid, for instance
+   * black video. */
+
+  /* We will prepend 4 bytes to buffer */
+  gst_byte_writer_init_with_size (&bw, 4, TRUE);
+
+  /* Set start code and suffixe, we assume raw asf data is a frame */
+  ok = gst_byte_writer_put_uint24_be (&bw, 0x000001);
+  ok &= gst_byte_writer_put_uint8 (&bw, 0x0D);
+  tmp = gst_byte_writer_reset_and_get_buffer (&bw);
+
+  /* Prepend startcode buffer to frame buffer */
+  mem = gst_buffer_get_all_memory (tmp);
+  gst_buffer_prepend_memory (buffer, mem);
+  gst_buffer_unref (tmp);
+
+  if (G_UNLIKELY (!ok)) {
+    GST_ERROR_OBJECT (vc1parse, "convert asf to bdu failed");
+    ret = GST_FLOW_ERROR;
+  }
+
+done:
+  return ret;
+}
+
+static GstFlowReturn
+gst_vc1_parse_convert_to_frame_layer (GstVC1Parse * vc1parse,
+    GstBaseParseFrame * frame)
+{
+  GstByteWriter bw;
+  GstBuffer *buffer;
+  GstBuffer *frame_layer;
+  gsize frame_layer_size;
+  GstMemory *mem;
+  gboolean ok;
+  gboolean keyframe;
+  guint8 sc_data[4];
+  guint32 startcode;
+
+  buffer = frame->buffer;
+  keyframe = !(GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT));
+
+  /* We need 8 bytes for frame-layer header */
+  frame_layer_size = 8;
+  if (vc1parse->profile == GST_VC1_PROFILE_ADVANCED) {
+    if (!vc1parse->frame_layer_first_frame_sent) {
+      /* First frame should contain sequence-header, entry-point and frame */
+      frame_layer_size += 4 + gst_buffer_get_size (vc1parse->seq_hdr_buffer)
+          + 4 + gst_buffer_get_size (vc1parse->entrypoint_buffer) + 4;
+    } else if (keyframe) {
+      /* Keyframe should contain entry point */
+      frame_layer_size += 4 +
+          gst_buffer_get_size (vc1parse->entrypoint_buffer) + 4;
+    }
+  }
+
+  gst_byte_writer_init_with_size (&bw, frame_layer_size, TRUE);
+
+  /* frame-layer header shall be serialized in little-endian byte order */
+  ok = gst_byte_writer_put_uint24_le (&bw, gst_buffer_get_size (buffer));
+
+  if (keyframe)
+    ok &= gst_byte_writer_put_uint8 (&bw, 0x80);        /* keyframe */
+  else
+    ok &= gst_byte_writer_put_uint8 (&bw, 0x00);
+
+  ok &= gst_byte_writer_put_uint32_le (&bw, GST_BUFFER_PTS (buffer));
+
+  if (vc1parse->profile != GST_VC1_PROFILE_ADVANCED)
+    goto headers_done;
+
+  if (!vc1parse->frame_layer_first_frame_sent) {
+    /* Write sequence-header start code, sequence-header entrypoint startcode
+     * and entrypoint */
+    ok &= gst_byte_writer_put_uint32_be (&bw, 0x0000010f);
+    ok &= gst_byte_writer_put_buffer (&bw, vc1parse->seq_hdr_buffer, 0, -1);
+    ok &= gst_byte_writer_put_uint32_be (&bw, 0x0000010e);
+    ok &= gst_byte_writer_put_buffer (&bw, vc1parse->entrypoint_buffer, 0, -1);
+  } else if (keyframe) {
+    /* Write entrypoint startcode and entrypoint */
+    ok &= gst_byte_writer_put_uint32_be (&bw, 0x0000010e);
+    ok &= gst_byte_writer_put_buffer (&bw, vc1parse->entrypoint_buffer, 0, -1);
+  }
+
+  /* frame can begin with startcode, in this case, don't prepend it */
+  if (gst_buffer_extract (buffer, 0, sc_data, 4) == 4) {
+    startcode = GST_READ_UINT32_BE (sc_data);
+    if (((startcode & 0xffffff00) == 0x00000100)) {
+      /* Start code found */
+      goto headers_done;
+    }
+  }
+
+  ok &= gst_byte_writer_put_uint32_be (&bw, 0x0000010d);
+
+headers_done:
+  frame_layer = gst_byte_writer_reset_and_get_buffer (&bw);
+  mem = gst_buffer_get_all_memory (frame_layer);
+  gst_buffer_prepend_memory (buffer, mem);
+  gst_buffer_unref (frame_layer);
+
+  if (G_UNLIKELY (!ok)) {
+    GST_ERROR_OBJECT (vc1parse, "failed to convert to frame layer");
+    return GST_FLOW_ERROR;
+  }
+
+  vc1parse->frame_layer_first_frame_sent = TRUE;
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
 gst_vc1_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
 {
   GstVC1Parse *vc1parse = GST_VC1_PARSE (parse);
+  GstFlowReturn ret = GST_FLOW_OK;
 
   if (!vc1parse->sent_codec_tag) {
     GstTagList *taglist;
@@ -1386,20 +1708,296 @@
         GST_TAG_VIDEO_CODEC, caps);
     gst_caps_unref (caps);
 
-    gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (vc1parse),
-        gst_event_new_tag (taglist));
+    gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
+    gst_tag_list_unref (taglist);
 
     /* also signals the end of first-frame processing */
     vc1parse->sent_codec_tag = TRUE;
   }
 
-  if (vc1parse->input_header_format != vc1parse->output_header_format ||
-      vc1parse->input_stream_format != vc1parse->output_stream_format) {
-    GST_WARNING_OBJECT (vc1parse, "stream conversion not implemented yet");
-    return GST_FLOW_ERROR;
+  /* Nothing to do here */
+  if (vc1parse->input_stream_format == vc1parse->output_stream_format)
+    return GST_FLOW_OK;
+
+  switch (vc1parse->output_stream_format) {
+    case VC1_STREAM_FORMAT_BDU:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+          /* We just need to drop sequence-layer buffer */
+          if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NO_FRAME) {
+            ret = GST_BASE_PARSE_FLOW_DROPPED;
+          }
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_ASF:
+          ret = gst_vc1_parse_convert_asf_to_bdu (vc1parse, frame);
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_BDU_FRAME:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+          /* We just need to drop sequence-layer buffer */
+          if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NO_FRAME) {
+            ret = GST_BASE_PARSE_FLOW_DROPPED;
+          }
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+        case VC1_STREAM_FORMAT_ASF:
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+          /* We just need to send the sequence-layer first */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          break;
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_ASF:
+          /* We just need to send the sequence-layer first */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          /* FIXME: We may only authorize this when header-format is set to
+           * none and we should add the entrypoint for advanced profile. */
+          ret = gst_vc1_parse_convert_asf_to_bdu (vc1parse, frame);
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+          /* We just need to send the sequence-layer first */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+        case VC1_STREAM_FORMAT_ASF:
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+      if (vc1parse->profile != GST_VC1_PROFILE_SIMPLE &&
+          vc1parse->profile != GST_VC1_PROFILE_MAIN) {
+        GST_ERROR_OBJECT (vc1parse,
+            "sequence-layer-raw-frame is only for simple/main profile");
+        goto conversion_not_supported;
+      }
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          goto conversion_not_supported;
+        case VC1_STREAM_FORMAT_ASF:
+          /* ASF contains raw frame for simple/main profile, so we just
+           * have to send sequence-layer before frames */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_ASF:
+          /* Make sure we push the sequence layer */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          ret = gst_vc1_parse_convert_to_frame_layer (vc1parse, frame);
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          /* We just need to send the sequence-layer first */
+          if (!vc1parse->seq_layer_sent) {
+            ret = gst_vc1_parse_push_sequence_layer (vc1parse);
+            if (ret != GST_FLOW_OK) {
+              GST_ERROR_OBJECT (vc1parse, "push sequence layer failed");
+              break;
+            }
+            vc1parse->seq_layer_sent = TRUE;
+          }
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    case VC1_STREAM_FORMAT_ASF:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_ASF:
+          g_assert_not_reached ();
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+          goto conversion_not_supported;
+          break;
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+
+    case VC1_STREAM_FORMAT_FRAME_LAYER:
+      switch (vc1parse->input_stream_format) {
+        case VC1_STREAM_FORMAT_BDU:
+        case VC1_STREAM_FORMAT_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_BDU_FRAME:
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_RAW_FRAME:
+          goto conversion_not_supported;
+          break;
+        case VC1_STREAM_FORMAT_SEQUENCE_LAYER_FRAME_LAYER:
+          /* We just need to drop sequence-layer buffer */
+          if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NO_FRAME) {
+            ret = GST_BASE_PARSE_FLOW_DROPPED;
+          }
+          break;
+        case VC1_STREAM_FORMAT_ASF:
+          ret = gst_vc1_parse_convert_to_frame_layer (vc1parse, frame);
+          break;
+        case VC1_STREAM_FORMAT_FRAME_LAYER:
+        default:
+          g_assert_not_reached ();
+          break;
+      }
+      break;
+
+    default:
+      g_assert_not_reached ();
+      break;
   }
 
-  return GST_FLOW_OK;
+  return ret;
+
+conversion_not_supported:
+  GST_WARNING_OBJECT (vc1parse, "stream conversion not implemented yet");
+  return GST_FLOW_NOT_NEGOTIATED;
 }
 
 /* SMPTE 421M Table 7 */
diff --git a/gst/videoparsers/gstvc1parse.h b/gst/videoparsers/gstvc1parse.h
index 28c3c4f..037e5aa 100644
--- a/gst/videoparsers/gstvc1parse.h
+++ b/gst/videoparsers/gstvc1parse.h
@@ -61,8 +61,8 @@
 } GstVC1ParseFormat;
 
 /* FIXME move into baseparse, or anything equivalent;
- * see https://bugzilla.gnome.org/show_bug.cgi?id=650093 */
-#define GST_BASE_PARSE_FRAME_FLAG_PARSING   0x10000
+ * see https://bugzilla.gnome.org/show_bug.cgi?id=650093
+ * #define GST_BASE_PARSE_FRAME_FLAG_PARSING   0x100000 */
 
 typedef struct _GstVC1Parse GstVC1Parse;
 typedef struct _GstVC1ParseClass GstVC1ParseClass;
@@ -107,6 +107,14 @@
    * valid if the GstBaseParseFrame has the
    * GST_BASE_PARSE_FRAME_FLAG_PARSING flag */
   GstVC1StartCode startcode;
+
+  /* TRUE if we have already sent the sequence-layer,
+   * use for stream-format conversion */
+  gboolean seq_layer_sent;
+
+  /* TRUE if we have already sent the frame-layer first frame,
+   * use for stream-format conversion */
+  gboolean frame_layer_first_frame_sent;
 };
 
 struct _GstVC1ParseClass
diff --git a/gst/videoparsers/h263parse.c b/gst/videoparsers/h263parse.c
index d794f7a..98a30e7 100644
--- a/gst/videoparsers/h263parse.c
+++ b/gst/videoparsers/h263parse.c
@@ -271,29 +271,46 @@
     }
 
     if (ufep == 1) {
-      guint32 cpfmt = 0;
+      if (params->format == 6) {
+        /* A fixed length codeword of 23 bits that is present only if the use of
+         * a custom picture format is signalled in PLUSPTYPE and UFEP is 001 */
+        guint32 cpfmt = 0;
 
-      /* 5.1.5 CPFMT : Custom Picture Format (23 bits) */
-      if (!gst_bit_reader_get_bits_uint32 (&br, &cpfmt, 23))
-        goto more;
-      if (!(cpfmt & 0x200)) {
-        GST_WARNING ("Corrupted CPFMT (0x%x)", cpfmt);
-        goto beach;
-      }
-      temp8 = cpfmt >> 19;
-      params->width = (((cpfmt >> 10) & 0x1f) + 1) * 4;
-      params->height = ((cpfmt & 0x1f) + 1) * 4;
-
-      if (temp8 == 0xf) {
-        guint32 epar = 0;
-        /* 5.1.6 EPAR : Extended Pixel Aspect Ratio (16bits) */
-        if (!gst_bit_reader_get_bits_uint32 (&br, &epar, 16))
+        /* 5.1.5 CPFMT : Custom Picture Format (23 bits) */
+        if (!gst_bit_reader_get_bits_uint32 (&br, &cpfmt, 23))
           goto more;
-        params->parnum = epar >> 8;
-        params->pardenom = epar & 0xf;
+        if (!(cpfmt & 0x200)) {
+          GST_WARNING ("Corrupted CPFMT (0x%x)", cpfmt);
+          goto beach;
+        }
+        temp8 = cpfmt >> 19;
+        /* Bits 5-13: Picture Width Indication: Range [0, ... , 511];
+         * Number of pixels per line = (PWI + 1) * 4 */
+        params->width = (((cpfmt >> 10) & 0x1ff) + 1) * 4;
+        /* Bits 15-23  Picture Height Indication: Range [1, ... , 288];
+         * Number of lines = PHI * 4 */
+        params->height = (cpfmt & 0x1ff) * 4;
+
+        if (temp8 == 0xf) {
+          guint32 epar = 0;
+          /* 5.1.6 EPAR : Extended Pixel Aspect Ratio (16bits) */
+          if (!gst_bit_reader_get_bits_uint32 (&br, &epar, 16))
+            goto more;
+          params->parnum = epar >> 8;
+          params->pardenom = epar & 0xf;
+        } else {
+          params->parnum = partable[temp8][0];
+          params->pardenom = partable[temp8][1];
+        }
       } else {
-        params->parnum = partable[temp8][0];
-        params->pardenom = partable[temp8][1];
+        /* Fill in width/height based on format */
+        params->width = sizetable[params->format][0];
+        params->height = sizetable[params->format][1];
+        GST_DEBUG (" Picture width x height: %d x %d",
+            params->width, params->height);
+        /* Fill in default Pixel aspect ratios */
+        params->parnum = 12;
+        params->pardenom = 11;
       }
 
       if (params->custompcfpresent) {
diff --git a/gst/videosignal/Makefile.am b/gst/videosignal/Makefile.am
index 8a17d9f..cd5bb9e 100644
--- a/gst/videosignal/Makefile.am
+++ b/gst/videosignal/Makefile.am
@@ -12,17 +12,3 @@
 libgstvideosignal_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS)
 libgstvideosignal_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideosignal_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideosignal -:SHARED libgstvideosignal \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideosignal_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideosignal_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideosignal_la_LDFLAGS) \
-	           $(libgstvideosignal_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-$(GST_API_VERSION)' \
-	> $@
diff --git a/gst/videosignal/Makefile.in b/gst/videosignal/Makefile.in
index 13797ee..b43b2c8 100644
--- a/gst/videosignal/Makefile.in
+++ b/gst/videosignal/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/videosignal
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +284,6 @@
 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@
@@ -286,7 +296,6 @@
 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@
@@ -294,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +439,6 @@
 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@
@@ -432,7 +447,6 @@
 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@
@@ -445,7 +459,6 @@
 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@
@@ -459,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/videosignal/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/videosignal/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1088,20 +1121,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideosignal -:SHARED libgstvideosignal \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideosignal_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideosignal_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideosignal_la_LDFLAGS) \
-	           $(libgstvideosignal_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-$(GST_API_VERSION)' \
-	> $@
 
 # 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.
diff --git a/gst/videosignal/gstsimplevideomark.c b/gst/videosignal/gstsimplevideomark.c
index 85e719d..9d57b52 100644
--- a/gst/videosignal/gstsimplevideomark.c
+++ b/gst/videosignal/gstsimplevideomark.c
@@ -331,14 +331,26 @@
   }
 }
 
+static gint
+calculate_pw (gint pw, gint x, gint width)
+{
+  if (x < 0)
+    pw += x;
+  else if ((x + pw) > width)
+    pw = width - x;
+
+  return pw;
+}
+
 static GstFlowReturn
 gst_video_mark_yuv (GstSimpleVideoMark * simplevideomark, GstVideoFrame * frame)
 {
   gint i, pw, ph, row_stride, pixel_stride;
-  gint width, height, req_width, req_height;
+  gint width, height, offset_calc, x, y;
   guint8 *d;
   guint64 pattern_shift;
   guint8 color;
+  gint total_pattern;
 
   width = frame->info.width;
   height = frame->info.height;
@@ -348,25 +360,42 @@
   row_stride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0);
   pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (frame, 0);
 
-  req_width =
-      (simplevideomark->pattern_count +
-      simplevideomark->pattern_data_count) * pw + simplevideomark->left_offset;
-  req_height = simplevideomark->bottom_offset + ph;
-  if (req_width > width || req_height > height) {
-    GST_ELEMENT_ERROR (simplevideomark, STREAM, WRONG_TYPE, (NULL),
-        ("simplevideomark pattern doesn't fit video, need at least %ix%i (stream has %ix%i)",
-            req_width, req_height, width, height));
-    return GST_FLOW_ERROR;
+  d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
+  offset_calc =
+      row_stride * (height - ph - simplevideomark->bottom_offset) +
+      pixel_stride * simplevideomark->left_offset;
+  x = simplevideomark->left_offset;
+  y = height - ph - simplevideomark->bottom_offset;
+
+  total_pattern =
+      simplevideomark->pattern_count + simplevideomark->pattern_data_count;
+  /* If x and y offset values are outside the video, no need to draw */
+  if ((x + (pw * total_pattern)) < 0 || x > width || (y + height) < 0
+      || y > height) {
+    GST_ERROR_OBJECT (simplevideomark,
+        "simplevideomark pattern is outside the video. Not drawing.");
+    return GST_FLOW_OK;
   }
 
+  /* Offset calculation less than 0, then reset to 0 */
+  if (offset_calc < 0)
+    offset_calc = 0;
+  /* Y position of mark is negative or pattern exceeds the video height,
+     then recalculate pattern height for partial display */
+  if (y < 0)
+    ph += y;
+  else if ((y + ph) > height)
+    ph = height - y;
+  /* If pattern height is less than 0, need not draw anything */
+  if (ph < 0)
+    return GST_FLOW_OK;
+
+  /* move to start of bottom left */
+  d += offset_calc;
+
   /* draw the bottom left pixels */
   for (i = 0; i < simplevideomark->pattern_count; i++) {
-    d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
-    /* move to start of bottom left */
-    d += row_stride * (height - ph - simplevideomark->bottom_offset) +
-        pixel_stride * simplevideomark->left_offset;
-    /* move to i-th pattern */
-    d += pixel_stride * pw * i;
+    gint draw_pw;
 
     if (i & 1)
       /* odd pixels must be white */
@@ -374,9 +403,23 @@
     else
       color = 0;
 
+    /* X position of mark is negative or pattern exceeds the video width,
+       then recalculate pattern width for partial display */
+    draw_pw = calculate_pw (pw, x, width);
+    /* If pattern width is less than 0, continue with the next pattern */
+    if (draw_pw < 0)
+      continue;
+
     /* draw box of width * height */
-    gst_video_mark_draw_box (simplevideomark, d, pw, ph, row_stride,
+    gst_video_mark_draw_box (simplevideomark, d, draw_pw, ph, row_stride,
         pixel_stride, color);
+
+    /* move to i-th pattern */
+    d += pixel_stride * draw_pw;
+    x += draw_pw;
+
+    if ((x + (pw * (total_pattern - i - 1))) < 0 || x >= width)
+      return GST_FLOW_OK;
   }
 
   pattern_shift =
@@ -384,24 +427,31 @@
 
   /* get the data of the pattern */
   for (i = 0; i < simplevideomark->pattern_data_count; i++) {
-    d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
-    /* move to start of bottom left, adjust for offsets */
-    d += row_stride * (height - ph - simplevideomark->bottom_offset) +
-        pixel_stride * simplevideomark->left_offset;
-    /* move after the fixed pattern */
-    d += pixel_stride * simplevideomark->pattern_count * pw;
-    /* move to i-th pattern data */
-    d += pixel_stride * pw * i;
-
+    gint draw_pw;
     if (simplevideomark->pattern_data & pattern_shift)
       color = 255;
     else
       color = 0;
 
-    gst_video_mark_draw_box (simplevideomark, d, pw, ph, row_stride,
+    /* X position of mark is negative or pattern exceeds the video width,
+       then recalculate pattern width for partial display */
+    draw_pw = calculate_pw (pw, x, width);
+    /* If pattern width is less than 0, continue with the next pattern */
+    if (draw_pw < 0)
+      continue;
+
+    gst_video_mark_draw_box (simplevideomark, d, draw_pw, ph, row_stride,
         pixel_stride, color);
 
     pattern_shift >>= 1;
+
+    /* move to i-th pattern data */
+    d += pixel_stride * draw_pw;
+    x += draw_pw;
+
+    if ((x + (pw * (simplevideomark->pattern_data_count - i - 1))) < 0
+        || x >= width)
+      return GST_FLOW_OK;
   }
 
   return GST_FLOW_OK;
diff --git a/gst/videosignal/gstsimplevideomarkdetect.c b/gst/videosignal/gstsimplevideomarkdetect.c
index fca367e..d5f093f 100644
--- a/gst/videosignal/gstsimplevideomarkdetect.c
+++ b/gst/videosignal/gstsimplevideomarkdetect.c
@@ -436,15 +436,27 @@
   return sum / (255.0 * width * height);
 }
 
+static gint
+calculate_pw (gint pw, gint x, gint width)
+{
+  if (x < 0)
+    pw += x;
+  else if ((x + pw) > width)
+    pw = width - x;
+
+  return pw;
+}
+
 static void
 gst_video_detect_yuv (GstSimpleVideoMarkDetect * simplevideomarkdetect,
     GstVideoFrame * frame)
 {
   gdouble brightness;
   gint i, pw, ph, row_stride, pixel_stride;
-  gint width, height, req_width, req_height;
+  gint width, height, offset_calc, x, y;
   guint8 *d;
   guint64 pattern_data;
+  gint total_pattern;
 
   width = frame->info.width;
   height = frame->info.height;
@@ -454,24 +466,44 @@
   row_stride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0);
   pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (frame, 0);
 
-  req_width =
-      (simplevideomarkdetect->pattern_count +
-      simplevideomarkdetect->pattern_data_count) * pw +
-      simplevideomarkdetect->left_offset;
-  req_height = simplevideomarkdetect->bottom_offset + ph;
-  if (req_width > width || req_height > height) {
-    goto no_pattern;
+  d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
+  /* move to start of bottom left, adjust for offsets */
+  offset_calc =
+      row_stride * (height - ph - simplevideomarkdetect->bottom_offset) +
+      pixel_stride * simplevideomarkdetect->left_offset;
+  x = simplevideomarkdetect->left_offset;
+  y = height - ph - simplevideomarkdetect->bottom_offset;
+
+  total_pattern =
+      simplevideomarkdetect->pattern_count +
+      simplevideomarkdetect->pattern_data_count;
+  /* If x and y offset values are outside the video, no need to analyze */
+  if ((x + (pw * total_pattern)) < 0 || x > width || (y + height) < 0
+      || y > height) {
+    GST_ERROR_OBJECT (simplevideomarkdetect,
+        "simplevideomarkdetect pattern is outside the video. Not Analyzing.");
+    return;
   }
 
-  /* analyse the bottom left pixels */
-  for (i = 0; i < simplevideomarkdetect->pattern_count; i++) {
-    d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
-    /* move to start of bottom left, adjust for offsets */
-    d += row_stride * (height - ph - simplevideomarkdetect->bottom_offset) +
-        pixel_stride * simplevideomarkdetect->left_offset;
-    /* move to i-th pattern */
-    d += pixel_stride * pw * i;
+  /* Offset calculation less than 0, then reset to 0 */
+  if (offset_calc < 0)
+    offset_calc = 0;
+  /* Y position of mark is negative or pattern exceeds the video height,
+     then recalculate pattern height for partial display */
+  if (y < 0)
+    ph += y;
+  else if ((y + ph) > height)
+    ph = height - y;
+  /* If pattern height is less than 0, need not analyze anything */
+  if (ph < 0)
+    return;
 
+  /* move to start of bottom left */
+  d += offset_calc;
+
+  /* analyze the bottom left pixels */
+  for (i = 0; i < simplevideomarkdetect->pattern_count; i++) {
+    gint draw_pw;
     /* calc brightness of width * height box */
     brightness =
         gst_video_detect_calc_brightness (simplevideomarkdetect, d, pw, ph,
@@ -494,6 +526,20 @@
               simplevideomarkdetect->pattern_sensitivity))
         goto no_pattern;
     }
+
+    /* X position of mark is negative or pattern exceeds the video width,
+       then recalculate pattern width for partial display */
+    draw_pw = calculate_pw (pw, x, width);
+    /* If pattern width is less than 0, continue with the next pattern */
+    if (draw_pw < 0)
+      continue;
+
+    /* move to i-th pattern */
+    d += pixel_stride * draw_pw;
+    x += draw_pw;
+
+    if ((x + (pw * (total_pattern - i - 1))) < 0 || x >= width)
+      break;
   }
   GST_DEBUG_OBJECT (simplevideomarkdetect, "found pattern");
 
@@ -501,15 +547,7 @@
 
   /* get the data of the pattern */
   for (i = 0; i < simplevideomarkdetect->pattern_data_count; i++) {
-    d = GST_VIDEO_FRAME_COMP_DATA (frame, 0);
-    /* move to start of bottom left, adjust for offsets */
-    d += row_stride * (height - ph - simplevideomarkdetect->bottom_offset) +
-        pixel_stride * simplevideomarkdetect->left_offset;
-    /* move after the fixed pattern */
-    d += pixel_stride * (simplevideomarkdetect->pattern_count * pw);
-    /* move to i-th pattern data */
-    d += pixel_stride * pw * i;
-
+    gint draw_pw;
     /* calc brightness of width * height box */
     brightness =
         gst_video_detect_calc_brightness (simplevideomarkdetect, d, pw, ph,
@@ -518,6 +556,21 @@
     pattern_data <<= 1;
     if (brightness > simplevideomarkdetect->pattern_center)
       pattern_data |= 1;
+
+    /* X position of mark is negative or pattern exceeds the video width,
+       then recalculate pattern width for partial display */
+    draw_pw = calculate_pw (pw, x, width);
+    /* If pattern width is less than 0, continue with the next pattern */
+    if (draw_pw < 0)
+      continue;
+
+    /* move to i-th pattern data */
+    d += pixel_stride * draw_pw;
+    x += draw_pw;
+
+    if ((x + (pw * (simplevideomarkdetect->pattern_data_count - i - 1))) < 0
+        || x >= width)
+      break;
   }
 
   GST_DEBUG_OBJECT (simplevideomarkdetect, "have data %" G_GUINT64_FORMAT,
diff --git a/gst/vmnc/Makefile.am b/gst/vmnc/Makefile.am
index 5419dee..29ac9b3 100644
--- a/gst/vmnc/Makefile.am
+++ b/gst/vmnc/Makefile.am
@@ -8,17 +8,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS)
 libgstvmnc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvmnc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvmnc -:SHARED libgstvmnc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvmnc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvmnc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvmnc_la_LDFLAGS) \
-	           $(libgstvmnc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/vmnc/Makefile.in b/gst/vmnc/Makefile.in
index b0585e9..4d2fb38 100644
--- a/gst/vmnc/Makefile.in
+++ b/gst/vmnc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/vmnc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/vmnc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/vmnc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1058,20 +1092,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvmnc -:SHARED libgstvmnc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvmnc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvmnc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvmnc_la_LDFLAGS) \
-	           $(libgstvmnc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c
index 6d33bdd..34e63c7 100644
--- a/gst/vmnc/vmncdec.c
+++ b/gst/vmnc/vmncdec.c
@@ -51,7 +51,7 @@
 
 enum
 {
-  ARG_0,
+  PROP_0,
 };
 
 enum
@@ -105,6 +105,9 @@
 static void
 gst_vmnc_dec_init (GstVMncDec * dec)
 {
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
 }
 
 static gboolean
@@ -848,9 +851,10 @@
   /* We require a format descriptor in-stream, so we ignore the info from the
    * container here. We just use the framerate */
 
-  /* Declare it packetized if a valid framerate was parsed, not ideal */
-  gst_video_decoder_set_packetized (decoder,
-      state->info.fps_n && state->info.fps_d);
+  if (decoder->input_segment.format == GST_FORMAT_TIME)
+    gst_video_decoder_set_packetized (decoder, TRUE);
+  else
+    gst_video_decoder_set_packetized (decoder, FALSE);
 
   if (dec->input_state)
     gst_video_codec_state_unref (dec->input_state);
diff --git a/gst/y4m/Makefile.am b/gst/y4m/Makefile.am
index 3913fc5..b91c84a 100644
--- a/gst/y4m/Makefile.am
+++ b/gst/y4m/Makefile.am
@@ -10,17 +10,3 @@
 libgsty4mdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gsty4mdec.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsty4m -:SHARED libgsty4m \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsty4m_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4m_la_CFLAGS) \
-	 -:LDFLAGS $(libgsty4m_la_LDFLAGS) \
-	           $(libgsty4m_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/y4m/Makefile.in b/gst/y4m/Makefile.in
index 26ef6e0..436e6bd 100644
--- a/gst/y4m/Makefile.in
+++ b/gst/y4m/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/y4m
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -750,7 +785,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/y4m/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/y4m/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1059,20 +1093,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsty4m -:SHARED libgsty4m \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsty4m_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4m_la_CFLAGS) \
-	 -:LDFLAGS $(libgsty4m_la_LDFLAGS) \
-	           $(libgsty4m_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gst/y4m/gsty4mdec.c b/gst/y4m/gsty4mdec.c
index 803ff27..6bf27a8 100644
--- a/gst/y4m/gsty4mdec.c
+++ b/gst/y4m/gsty4mdec.c
@@ -701,10 +701,10 @@
       gst_video_frame_map (&oframe, &y4mdec->out_info, outbuf, GST_MAP_WRITE);
 
       for (i = 0; i < 3; i++) {
-        w = GST_VIDEO_FRAME_COMP_WIDTH (&iframe, i);;
-        h = GST_VIDEO_FRAME_COMP_HEIGHT (&iframe, i);;
-        istride = GST_VIDEO_FRAME_COMP_STRIDE (&iframe, i);;
-        ostride = GST_VIDEO_FRAME_COMP_STRIDE (&oframe, i);;
+        w = GST_VIDEO_FRAME_COMP_WIDTH (&iframe, i);
+        h = GST_VIDEO_FRAME_COMP_HEIGHT (&iframe, i);
+        istride = GST_VIDEO_FRAME_COMP_STRIDE (&iframe, i);
+        ostride = GST_VIDEO_FRAME_COMP_STRIDE (&oframe, i);
         src = GST_VIDEO_FRAME_COMP_DATA (&iframe, i);
         dest = GST_VIDEO_FRAME_COMP_DATA (&oframe, i);
 
diff --git a/gst/yadif/Makefile.am b/gst/yadif/Makefile.am
index 31417b9..0887bf7 100644
--- a/gst/yadif/Makefile.am
+++ b/gst/yadif/Makefile.am
@@ -10,17 +10,3 @@
 
 
 EXTRA_DIST = yadif_template.c
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstyadif -:SHARED libgstyadif \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstyadif_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstyadif_la_CFLAGS) \
-	 -:LDFLAGS $(libgstyadif_la_LDFLAGS) \
-	           $(libgstyadif_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/yadif/Makefile.in b/gst/yadif/Makefile.in
index 9c47a4f..c2a3f72 100644
--- a/gst/yadif/Makefile.in
+++ b/gst/yadif/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = gst/yadif
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -226,6 +235,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -243,8 +253,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -269,8 +281,6 @@
 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@
@@ -283,7 +293,6 @@
 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@
@@ -291,6 +300,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -317,11 +328,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -340,8 +354,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -400,10 +412,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -420,7 +436,6 @@
 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@
@@ -429,7 +444,6 @@
 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@
@@ -442,7 +456,6 @@
 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@
@@ -456,6 +469,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -467,6 +481,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -505,6 +521,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -540,10 +557,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -569,6 +590,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -576,7 +600,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -605,6 +636,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -615,6 +647,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -645,17 +678,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -672,6 +704,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -710,6 +743,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -750,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/yadif/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu gst/yadif/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1075,20 +1108,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstyadif -:SHARED libgstyadif \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstyadif_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstyadif_la_CFLAGS) \
-	 -:LDFLAGS $(libgstyadif_la_LDFLAGS) \
-	           $(libgstyadif_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/install-sh b/install-sh
index 377bb86..59990a1 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2014-09-12.12; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='	'
 nl='
 '
-IFS=" ""	$nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-	# Protect names problematic for 'test' and other utilities.
-	case $dst_arg in
-	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
-	esac
-	shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
-	break;;
+    --) shift
+        break;;
 
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@
 
     *[0-7])
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 +274,15 @@
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -314,74 +293,81 @@
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
 
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
 
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
 
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
+            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+            # create the $tmpdir first (and fail if unsuccessful) to make sure
+            # that nobody tries to guess the $tmpdir name.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +377,51 @@
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-	/*) prefix='/';;
-	[-=\(\)!]*) prefix='./';;
-	*)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-	test X"$d" = X && continue
+        test X"$d" = X && continue
 
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -472,15 +456,12 @@
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +474,24 @@
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
 
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
diff --git a/m4/Makefile.in b/m4/Makefile.in
index ddb3e38..03cddfa 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = m4
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -158,8 +169,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -184,8 +197,6 @@
 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@
@@ -198,7 +209,6 @@
 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@
@@ -206,6 +216,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -232,11 +244,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -255,8 +270,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -315,10 +328,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -335,7 +352,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -357,7 +372,6 @@
 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@
@@ -371,6 +385,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -382,6 +397,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -420,6 +437,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -455,10 +473,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -484,6 +506,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -491,7 +516,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -520,6 +552,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -530,6 +563,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -560,17 +594,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -587,6 +620,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -625,6 +659,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -684,7 +719,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu m4/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -859,6 +893,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/missing b/missing
index db98974..f62bbae 100755
--- a/missing
+++ b/missing
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in
index 761d410..2181c10 100644
--- a/pkgconfig/Makefile.in
+++ b/pkgconfig/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,23 +92,6 @@
 @HAVE_GST_GL_TRUE@am__append_1 = gstreamer-gl-@GST_API_VERSION@.pc
 @HAVE_GST_GL_TRUE@am__append_2 = gstreamer-gl-@GST_API_VERSION@-uninstalled.pc
 subdir = pkgconfig
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(srcdir)/gstreamer-plugins-bad.pc.in \
-	$(srcdir)/gstreamer-plugins-bad-uninstalled.pc.in \
-	$(srcdir)/gstreamer-codecparsers.pc.in \
-	$(srcdir)/gstreamer-codecparsers-uninstalled.pc.in \
-	$(srcdir)/gstreamer-insertbin.pc.in \
-	$(srcdir)/gstreamer-insertbin-uninstalled.pc.in \
-	$(srcdir)/gstreamer-gl.pc.in \
-	$(srcdir)/gstreamer-gl-uninstalled.pc.in \
-	$(srcdir)/gstreamer-mpegts.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 \
@@ -106,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -119,7 +113,6 @@
 	$(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 \
@@ -136,6 +129,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = gstreamer-plugins-bad.pc \
@@ -197,6 +191,23 @@
 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
 DATA = $(pkgconfig_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(srcdir)/gstreamer-bad-base-uninstalled.pc.in \
+	$(srcdir)/gstreamer-bad-base.pc.in \
+	$(srcdir)/gstreamer-bad-video-uninstalled.pc.in \
+	$(srcdir)/gstreamer-bad-video.pc.in \
+	$(srcdir)/gstreamer-codecparsers-uninstalled.pc.in \
+	$(srcdir)/gstreamer-codecparsers.pc.in \
+	$(srcdir)/gstreamer-gl-uninstalled.pc.in \
+	$(srcdir)/gstreamer-gl.pc.in \
+	$(srcdir)/gstreamer-insertbin-uninstalled.pc.in \
+	$(srcdir)/gstreamer-insertbin.pc.in \
+	$(srcdir)/gstreamer-mpegts-uninstalled.pc.in \
+	$(srcdir)/gstreamer-mpegts.pc.in \
+	$(srcdir)/gstreamer-plugins-bad-uninstalled.pc.in \
+	$(srcdir)/gstreamer-plugins-bad.pc.in \
+	$(srcdir)/gstreamer-wayland-uninstalled.pc.in \
+	$(srcdir)/gstreamer-wayland.pc.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -214,8 +225,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -240,8 +253,6 @@
 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@
@@ -254,7 +265,6 @@
 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@
@@ -262,6 +272,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -288,11 +300,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -311,8 +326,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -371,10 +384,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -391,7 +408,6 @@
 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@
@@ -400,7 +416,6 @@
 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@
@@ -413,7 +428,6 @@
 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@
@@ -427,6 +441,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -438,6 +453,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -476,6 +493,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -511,10 +529,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -540,6 +562,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -547,7 +572,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -576,6 +608,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -586,6 +619,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -616,17 +650,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -643,6 +676,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -681,6 +715,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -736,7 +771,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pkgconfig/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu pkgconfig/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -970,6 +1004,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
 	uninstall-am uninstall-pkgconfigDATA
 
+.PRECIOUS: Makefile
+
 
 all-local: $(pcverfiles) $(pcverfiles_uninstalled)
 
diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
index f6ebf36..1b98762 100644
--- a/pkgconfig/gstreamer-gl.pc.in
+++ b/pkgconfig/gstreamer-gl.pc.in
@@ -9,5 +9,5 @@
 Requires: gstreamer-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@
 Version: @VERSION@
 Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
-Cflags: -I${includedir} @GL_CFLAGS@
+Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0e42f00..ad42318 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
 ext/dash/gstdashdemux.c
 ext/gl/gstgltestsrc.c
 ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in
+ext/opencv/gsttemplatematch.c
 ext/resindvd/resindvdsrc.c
 ext/smoothstreaming/gstmssdemux.c
 ext/sndfile/gstsfdec.c
@@ -10,8 +11,11 @@
 gst/asfmux/gstasfmux.c
 gst/camerabin2/camerabingeneral.c
 gst/camerabin2/gstcamerabin2.c
+gst/camerabin2/gstdigitalzoom.c
 gst/camerabin2/gstviewfinderbin.c
+gst/camerabin2/gstwrappercamerabinsrc.c
 gst/dvdspu/gstdvdspu.c
+gst-libs/gst/adaptivedemux/gstadaptivedemux.c
 gst/mpegtsdemux/mpegtsbase.c
 gst/nuvdemux/gstnuvdemux.c
 gst/videomeasure/gstvideomeasure_collector.c
diff --git a/po/af.gmo b/po/af.gmo
index 297c02d..0225051 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index 340ce65..9c495ab 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -16,9 +16,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr ""
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -28,7 +25,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -111,6 +108,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "Kon nie skryf na lêer \"%s\" nie."
@@ -134,15 +134,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Kon nie lêer \"%s\" oopmaak om te lees nie."
@@ -174,9 +165,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr ""
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 #, fuzzy
 msgid "No file name specified for writing."
 msgstr "Geen lêernaam gespesifiseer."
diff --git a/po/az.gmo b/po/az.gmo
index afb9ca4..142c5ae 100644
--- a/po/az.gmo
+++ b/po/az.gmo
Binary files differ
diff --git a/po/az.po b/po/az.po
index 761d334..f95f04d 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: KBabel 1.0.2\n"
 
-msgid "Internal data stream error."
-msgstr ""
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "\"%s\" faylına yazıla bilmədi."
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "\"%s\" faylı oxuma üçün açıla bilmədi."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr ""
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 #, fuzzy
 msgid "No file name specified for writing."
 msgstr "Fayl adı verilməyib."
diff --git a/po/bg.gmo b/po/bg.gmo
index 2080176..dc878f8 100644
--- a/po/bg.gmo
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
index e06f7f2..8b3f756 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -18,9 +18,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-msgid "Internal data stream error."
-msgstr "Вътрешна грешка в потока на данни."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -30,7 +27,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -113,6 +110,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Информацията за заглавните части на DVD-то не може да бъде прочетена."
 
@@ -136,15 +136,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Файлът „%s“ не може да се отвори за четене."
@@ -176,9 +167,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Вътрешна грешка в потока на данни."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Не е указано име на файл за запис."
 
diff --git a/po/ca.gmo b/po/ca.gmo
index 76617c9..34e69a5 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 43c851e..93792d9 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -19,9 +19,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-msgid "Internal data stream error."
-msgstr "S'ha produït un error intern de flux de dades."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -114,6 +111,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "No s'ha pogut llegir la informació del títol del DVD."
 
@@ -137,15 +137,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "No s'ha pogut obrir el fitxer «%s» per a la lectura."
@@ -177,9 +168,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "S'ha produït un error intern de flux de dades."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "No s'ha especificat cap nom de fitxer per a l'escriptura."
 
diff --git a/po/cs.gmo b/po/cs.gmo
index 4776bb1..b94aa28 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index 4a01edd..935392e 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -5,14 +5,14 @@
 #
 # Miloslav Trmac <mitr@volny.cz>, 2004.
 # Petr Kovar <pknbe@volny.cz>, 2007, 2008, 2009.
-# Marek Černocký <marek@manet.cz>, 2013.
+# Marek Černocký <marek@manet.cz>, 2013, 2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2013-09-18 10:05+0200\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-17 14:19+0200\n"
 "Last-Translator: Marek Černocký <marek@manet.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
 "Language: cs\n"
@@ -20,89 +20,100 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Gtranslator 2.91.6\n"
-
-msgid "Internal data stream error."
-msgstr "Chyba proudu vnitřních dat."
+"X-Generator: Gtranslator 2.91.7\n"
 
 msgid "format wasn't negotiated before get function"
-msgstr ""
+msgstr "formát nebyl vyjednán před získáním funkce"
 
 msgid "default GStreamer sound events audiosink"
-msgstr ""
+msgstr "výchozí zvukový cíl GStreamer pro zvukové události"
 
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
+"GStreamer umí přehrávat zvuk pomocí mnoha výstupních prvků. Možné volby jsou "
+"osssink, pulsesink a alsasink. Zvukovým cílem může být namísto jednoho "
+"elementu i částečná roura."
 
 msgid "description for default GStreamer sound events audiosink"
-msgstr ""
+msgstr "popis výchozího zvukového cíle pro zvukové události GStreamer"
 
 msgid "Describes the selected audiosink element."
-msgstr ""
+msgstr "Popisuje vybraný element sloužící jako cíl pro zvuk."
 
 msgid "default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "výchozí zvukový cíl GStreamer pro hlasové konference a videokonference"
 
 msgid ""
 "description for default GStreamer audiosink for Audio/Video Conferencing"
 msgstr ""
+"popis výchozího zvukového cíle GStreamer pro hlasové konference a "
+"videokonference"
 
 msgid "default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "výchozí zvukový cíl GStreamer pro hudbu a filmy"
 
 msgid "description for default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "popis výchozího zvukového cíle GStreamer pro hudbu a filmy"
 
 msgid "default GStreamer videosink"
-msgstr ""
+msgstr "výchozí cíl videa GStreamer"
 
 msgid ""
 "GStreamer can play video using any number of output elements. Some possible "
 "choices are xvimagesink, ximagesink, sdlvideosink and aasink. The videosink "
 "can be a partial pipeline instead of just one element."
 msgstr ""
+"GStreamer umí přehrávat video pomocí mnoha výstupních prvků. Možné volby "
+"jsou xvimagesink, ximagesink, sdlvideosink a aasink. Cílem videa může být "
+"namísto právě jednoho elementu i částečná roura."
 
 msgid "description for default GStreamer videosink"
-msgstr ""
+msgstr "popis výchozího cíle videa GStreamer"
 
 msgid "Describes the selected videosink element."
-msgstr ""
+msgstr "Popisuje vybraný element sloužící jako cíl pro video."
 
 msgid "default GStreamer audiosrc"
-msgstr ""
+msgstr "výchozí zdroj zvuku GStreamer"
 
 msgid ""
 "GStreamer can record audio using any number of input elements. Some possible "
 "choices are osssrc, pulsesrc and alsasrc. The audio source can be a partial "
 "pipeline instead of just one element."
 msgstr ""
+"GStreamer umí nahrávat zvuk pomocí mnoha vstupních prvků. Možné volby jsou "
+"osssrc, pulsesrc a alsasrc. Zvukovým zdrojem může být namísto právě jednoho "
+"elementu i částečná roura."
 
 msgid "description for default GStreamer audiosrc"
-msgstr ""
+msgstr "popis pro výchozí zdroj zvuku GStreamer"
 
 msgid "Describes the selected audiosrc element."
-msgstr ""
+msgstr "Popisuje vybraný element sloužící jako zdroj zvuku."
 
 msgid "default GStreamer videosrc"
-msgstr ""
+msgstr "výchozí zdroj videa GStreamer"
 
 msgid ""
 "GStreamer can record video from any number of input elements. Some possible "
 "choices are v4lsrc, v4l2src and videotestsrc. The video source can be a "
 "partial pipeline instead of just one element."
 msgstr ""
+"GStreamer umí nahrávat video pomocí mnoha vstupních prvků. Možné volby jsou "
+"v4lsrc, v4l2src a videotestsrc. Zdrojem videa může být namísto právě jednoho "
+"elementu i částečná roura."
 
 msgid "description for default GStreamer videosrc"
-msgstr ""
+msgstr "popis pro výchozí zdroj videa GStreamer"
 
 msgid "Describes the selected videosrc element."
-msgstr ""
+msgstr "Popisuje vybraný element sloužící jako zdroj videa."
 
 msgid "default GStreamer visualization"
-msgstr ""
+msgstr "výchozí vizualizace GStreamer"
 
 msgid ""
 "GStreamer can put visualization plugins in a pipeline to transform audio "
@@ -110,12 +121,19 @@
 "synaesthesia. The visualization plugin can be a partial pipeline instead of "
 "just one element."
 msgstr ""
+"GStreamer umí do roury vložit vizualizační zásuvný modul, aby prováděl změny "
+"zvukových proudů ve snímcích videa. Možné volby jsou goom, goom2k1 a "
+"synaesthesia. Vizualizačním zásuvným modulem může být namísto právě jednoho "
+"elementu i částečná roura."
 
 msgid "description for default GStreamer visualization"
-msgstr ""
+msgstr "popis pro výchozí vizualizaci GStreamer"
 
 msgid "Describes the selected visualization element."
-msgstr ""
+msgstr "Popisuje vybraný vizualizační element."
+
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV selhalo při načítání obrazu šablony"
 
 msgid "Could not read title information for DVD."
 msgstr "Nezdařilo se přečtení informací o titulu DVD."
@@ -140,18 +158,8 @@
 msgid "This file contains no playable streams."
 msgstr "Tento soubor neobsahuje žádný proud, který by šel přehrát."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Nelze získat adresu URI prohlášení."
-
-msgid "Failed to get fragment URL."
-msgstr "Selhalo získání adresy URL fragmentu."
-
-msgid "Couldn't download fragments"
-msgstr "Nelze stáhnout fragmenty"
-
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Nezdařilo se otevření souboru „%s“ ke čtení."
+msgstr "Nezdařilo se otevření proudu zvukového souboru ke čtení."
 
 msgid "Could not establish connection to sndio"
 msgstr "Nelze ustanovit spojení se sndio"
@@ -182,9 +190,22 @@
 "Umístění souboru je nastavené prázdné, nastavte jej prosím na platný název "
 "souboru"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Nelze vytvořit prvek digitalzoom"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Formát podřízeného obrázku nebyl nastaven před datovým tokem"
 
+msgid "Failed to get fragment URL."
+msgstr "Selhalo získání adresy URL fragmentu."
+
+msgid "Internal data stream error."
+msgstr "Chyba proudu vnitřních dat."
+
+msgid "Couldn't download fragments"
+msgstr "Nelze stáhnout fragmenty"
+
 msgid "No file name specified for writing."
 msgstr "K zápisu nebyl zadán žádný název souboru."
 
@@ -209,9 +230,10 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Ze zařízení rozhraní „%s“ se nezdařilo získat nastavení."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Ze zařízení rozhraní „%s“ se nezdařilo získat nastavení."
+msgstr ""
+"Ze zařízení rozhraní „%s“ se nezdařilo vytvořit seznam doručovacích systémů."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
@@ -230,6 +252,3 @@
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Nelze najít podrobnosti ke kanálu DVB %s"
-
-#~ msgid "Could not write to file \"%s\"."
-#~ msgstr "Nezdařil se zápis do souboru „%s“."
diff --git a/po/da.gmo b/po/da.gmo
index f0f60be..3c1ffac 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index df9ce77..c190421 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
 "PO-Revision-Date: 2014-08-29 11:28+0200\n"
 "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -17,19 +17,17 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Intern datastrømfejl."
-
 msgid "format wasn't negotiated before get function"
 msgstr "format blev ikke forhandlet før hent funktion"
 
 msgid "default GStreamer sound events audiosink"
 msgstr "standardlydkanal for GStreamers lydhændelser"
 
+#, fuzzy
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "GStreamer kan afspille lyd via et antal udgangselementer. Nogle mulige valg "
 "er osssink, pulsesink og alsasink. Lydudgangen kan være en delvis datakanal "
@@ -128,6 +126,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Beskriver det valgte visualiseringselement."
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Kunne ikke læse titelinformation for dvd."
 
@@ -151,15 +152,6 @@
 msgid "This file contains no playable streams."
 msgstr "Denne fil indeholder ingen spilbare strømme."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Kunne ikke indhente Manifestens adresse"
-
-msgid "Failed to get fragment URL."
-msgstr "Kunne ikke indhente fragmentadresse."
-
-msgid "Couldn't download fragments"
-msgstr "Kunne ikke hente fragmenter"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Kunne ikke åbne sndfile-strøm for læsning."
 
@@ -190,9 +182,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr "Filplacering er sat til NULL, sæt den venligst til et gyldigt filnavn"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Format for underbillede blev ikke konfigureret før datastrøm"
 
+msgid "Failed to get fragment URL."
+msgstr "Kunne ikke indhente fragmentadresse."
+
+msgid "Internal data stream error."
+msgstr "Intern datastrømfejl."
+
+msgid "Couldn't download fragments"
+msgstr "Kunne ikke hente fragmenter"
+
 msgid "No file name specified for writing."
 msgstr "Intet filnavn er angivet til skrivning."
 
@@ -239,5 +243,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Kunne ikke finde detaljer for DVB-kanalen %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Kunne ikke indhente Manifestens adresse"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Kunne ikke skrive til fil »%s«."
diff --git a/po/de.gmo b/po/de.gmo
index 82f18ec..9a87420 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 56a995d..27919f6 100644
--- a/po/de.po
+++ b/po/de.po
@@ -6,10 +6,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-08-31 19:37+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-11 20:57+0100\n"
 "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
 "Language: de\n"
@@ -17,10 +17,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.5.4\n"
-
-msgid "Internal data stream error."
-msgstr "Interner Datenstromfehler."
+"X-Generator: Poedit 1.7.5\n"
 
 msgid "format wasn't negotiated before get function"
 msgstr "das Format wurde vor der get-Funktion nicht ausgehandelt"
@@ -31,12 +28,12 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "GStreamer kann Ton mit einer beliebigen Anzahl an Ausgabeelementen "
 "wiedergeben. Einige Wahlmöglichkeiten sind »osssink«, »pulsesink« und "
-"»alsasink«. Das Audioziel kann eine anteilige Weiterleitung anstelle eines "
-"einzigen Elements sein."
+"»alsasink«. Das Audioziel kann eine teilweise Weiterleitung anstelle nur "
+"eines einzigen Elements sein."
 
 msgid "description for default GStreamer sound events audiosink"
 msgstr "Beschreibung des voreingestellten GStreamer Tonereignis-Audioziel"
@@ -137,6 +134,10 @@
 msgid "Describes the selected visualization element."
 msgstr "Beschreibt das gewählte Visualisierungselement."
 
+# OpenCV ist eine freie Programmbibliothek mit Algorithmen für die Bildverarbeitung und maschinelles Sehen.
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV konnte nicht die Bildvorlage laden"
+
 msgid "Could not read title information for DVD."
 msgstr "Die Titelinformationen der DVD konnten nicht gelesen werden."
 
@@ -161,15 +162,6 @@
 msgid "This file contains no playable streams."
 msgstr "Diese Datei enthält keine abspielbaren Ströme."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Adresse der Frachtliste konnte nicht ermittelt werden"
-
-msgid "Failed to get fragment URL."
-msgstr "Ermitteln der Fragment-Adresse schlug fehl."
-
-msgid "Couldn't download fragments"
-msgstr "Fragmente konnten nicht heruntergeladen werden"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "sndfile-Datenstrom konnte nicht zum Lesen geöffnet werden."
 
@@ -203,9 +195,22 @@
 "Dateiort ist als NULL festgelegt. Bitte legen Sie einen gültigen Dateinamen "
 "fest"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Element für Digitalzoom konnte nicht angelegt werden"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Format des Unterbilds wurde nicht vor dem Datenfluss konfiguriert"
 
+msgid "Failed to get fragment URL."
+msgstr "Ermitteln der Fragment-Adresse schlug fehl."
+
+msgid "Internal data stream error."
+msgstr "Interner Datenstromfehler."
+
+msgid "Couldn't download fragments"
+msgstr "Fragmente konnten nicht heruntergeladen werden"
+
 msgid "No file name specified for writing."
 msgstr "Kein Dateiname zum Schreiben angegeben."
 
@@ -255,6 +260,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Details zu DVB-Kanal %s konnten nicht gefunden werden"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Adresse der Frachtliste konnte nicht ermittelt werden"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Es konnte nicht in Datei »%s« geschrieben werden."
 
diff --git a/po/el.gmo b/po/el.gmo
index e36ed7b..ac44947 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index ed58b3f..366fe2f 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -19,9 +19,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n>1;\n"
 
-msgid "Internal data stream error."
-msgstr "Εσωτερικό σφάλμα ροής δεδομένων."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -114,6 +111,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Αδυναμία ανάγνωσης πληροφοριών τίτλου του DVD."
 
@@ -138,15 +138,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Αδυναμία ανοίγματος αρχείου \"%s\" για ανάγνωση."
@@ -178,9 +169,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Εσωτερικό σφάλμα ροής δεδομένων."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Δεν έχει καθορισθεί όνομα αρχείου για εγγραφή."
 
diff --git a/po/en_GB.gmo b/po/en_GB.gmo
index 813d824..0c6420e 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 f1f12fa..6298ce5 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -15,9 +15,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr ""
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -27,7 +24,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -110,6 +107,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "Could not write to file \"%s\"."
@@ -133,15 +133,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Could not open file \"%s\" for reading."
@@ -173,9 +164,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr ""
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 #, fuzzy
 msgid "No file name specified for writing."
 msgstr "No filename specified."
diff --git a/po/eo.gmo b/po/eo.gmo
index 947292a..20a689c 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index 3fd7c8e..a4b8238 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
 
-msgid "Internal data stream error."
-msgstr "Interna datum-flu-eraro."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Ne eblis legi la titol-informojn de la DVD."
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Ne eblis malfermi la dosieron \"%s\" por legi."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Interna datum-flu-eraro."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Neniu dosiernomo estas specifite por skribi."
 
diff --git a/po/es.gmo b/po/es.gmo
index 36bd52f..3f25a31 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index ac826a0..732cde8 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n!=1);\n"
 
-msgid "Internal data stream error."
-msgstr "Error en el flujo de datos interno."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "No se pudo leer la información del título para el DVD."
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "No se pudo abrir el archivo «%s» para leer."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Error en el flujo de datos interno."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "No se especificó un nombre de archivo para su escritura."
 
diff --git a/po/eu.gmo b/po/eu.gmo
index 8b59794..ac4c91e 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index b61e77b..1515804 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -19,9 +19,6 @@
 "X-Generator: KBabel 1.11.4\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-msgid "Internal data stream error."
-msgstr "Datu-korrontearen barne-errorea."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -114,6 +111,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Ezin izan da DVDaren tituluaren informazioa irakurri."
 
@@ -136,15 +136,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Ezin izan da \"%s\" fitxategia ireki irakurtzeko."
@@ -176,9 +167,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Datu-korrontearen barne-errorea."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Ez da fitxategi-izenik zehaztu idazteko."
 
diff --git a/po/fi.gmo b/po/fi.gmo
index 85c8de4..93f2003 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index 23e6980..69ddd43 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -22,9 +22,6 @@
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: KBabel 1.11.2\n"
 
-msgid "Internal data stream error."
-msgstr "Sisäisen tietovirran virhe."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -34,7 +31,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -117,6 +114,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "DVD:n otsikkotietoja ei voitu lukea."
 
@@ -139,15 +139,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Tiedostoa \"%s\" ei voi avata luettavaksi."
@@ -179,9 +170,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Sisäisen tietovirran virhe."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Kirjoitettavaa tiedostonimeä ei annettu."
 
diff --git a/po/fr.gmo b/po/fr.gmo
index 8c602ff..59d97fb 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 73ef922..a0d70c6 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3,37 +3,35 @@
 # This file is distributed under the same license as the gst-plugins-bad package.
 #
 # Claude Paroz <claude@2xlibre.net>, 2008-2011.
+# Stéphane Aulery <lkppo@free.fr>, 2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
+"Project-Id-Version: gst-plugins-bad 1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2011-04-28 09:13+0200\n"
-"Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-04-26 19:24+0200\n"
+"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Erreur interne de flux de données."
-
 msgid "format wasn't negotiated before get function"
-msgstr ""
+msgstr "Format non négocié avant l'appel de la fonction get"
 
 msgid "default GStreamer sound events audiosink"
-msgstr ""
+msgstr "sons par défaut audiosink des événements GStreamer"
 
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
-msgstr ""
+msgstr "description des sons par défaut audiosink des événements GStreamer"
 
 msgid "Describes the selected audiosink element."
 msgstr ""
@@ -52,7 +50,7 @@
 msgstr ""
 
 msgid "default GStreamer videosink"
-msgstr ""
+msgstr "videosink GStreamer par défaut"
 
 msgid ""
 "GStreamer can play video using any number of output elements. Some possible "
@@ -67,7 +65,7 @@
 msgstr ""
 
 msgid "default GStreamer audiosrc"
-msgstr ""
+msgstr "audiosrc GStreamer par défaut"
 
 msgid ""
 "GStreamer can record audio using any number of input elements. Some possible "
@@ -82,7 +80,7 @@
 msgstr ""
 
 msgid "default GStreamer videosrc"
-msgstr ""
+msgstr "videosrc GStreamer par défaut"
 
 msgid ""
 "GStreamer can record video from any number of input elements. Some possible "
@@ -97,7 +95,7 @@
 msgstr ""
 
 msgid "default GStreamer visualization"
-msgstr ""
+msgstr "aperçu GStreamer par défaut"
 
 msgid ""
 "GStreamer can put visualization plugins in a pipeline to transform audio "
@@ -107,11 +105,14 @@
 msgstr ""
 
 msgid "description for default GStreamer visualization"
-msgstr ""
+msgstr "description de l’aperçu GStreamer par défaut"
 
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Impossible de lire les informations de titre du DVD."
 
@@ -127,7 +128,7 @@
 "decryption library is not installed."
 msgstr ""
 "Impossible de lire le DVD. Il se peut que le DVD soit chiffré et qu'aucune "
-"biblithèque de déchiffrement ne soit disponible."
+"bibliothèque de déchiffrement DVD ne soit disponible."
 
 msgid "Could not read DVD."
 msgstr "Impossible de lire le DVD."
@@ -135,32 +136,20 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Impossible d'ouvrir le fichier « %s » en lecture."
+msgstr "Impossible d'ouvrir le fichier snd en lecture."
 
 msgid "Could not establish connection to sndio"
-msgstr ""
+msgstr "Impossible de se connecter à sndio"
 
 msgid "Failed to query sndio capabilities"
-msgstr ""
+msgstr "Impossible d’interroger les capacités sndio"
 
-#, fuzzy
 msgid "Could not configure sndio"
-msgstr "Impossible d'ouvrir le fichier « %s » en lecture."
+msgstr "Impossible de configurer sndio"
 
-#, fuzzy
 msgid "Could not start sndio"
-msgstr "Impossible de lire le DVD."
+msgstr "Impossible de démarrer sndio"
 
 msgid "Internal data flow error."
 msgstr "Erreur interne de flux de données."
@@ -175,9 +164,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Erreur interne de flux de données."
+
+msgid "Couldn't download fragments"
+msgstr "Impossible de télécharger les fragments"
+
 msgid "No file name specified for writing."
 msgstr "Aucun nom de fichier indiqué pour l'écriture."
 
diff --git a/po/gl.gmo b/po/gl.gmo
index 1174940..4c17679 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index 9efb514..53b8121 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -19,9 +19,6 @@
 "Plural-Forms: nplurals=2; plural=(n!=1);\n"
 "X-Poedit-Language: galego\n"
 
-msgid "Internal data stream error."
-msgstr "Produciuse un erro interno no fluxo de datos."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -114,6 +111,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Non foi posíbel ler a información do título do DVD"
 
@@ -137,15 +137,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Non foi posíbel abrir o ficheiro «%s» para ler."
@@ -177,9 +168,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Produciuse un erro interno no fluxo de datos."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Non se especificou ningún nome de ficheiro para a súa escritura."
 
diff --git a/po/gst-plugins-bad-1.0.pot b/po/gst-plugins-bad-1.0.pot
index b25cc12..108952c 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.4.5\n"
+"Project-Id-Version: gst-plugins-bad 1.5.91\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -16,13 +16,7 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ext/dash/gstdashdemux.c:1513 ext/smoothstreaming/gstmssdemux.c:1532
-#: gst/mpegtsdemux/mpegtsbase.c:1353 gst/mpegtsdemux/mpegtsbase.c:1357
-#: gst/nuvdemux/gstnuvdemux.c:737
-msgid "Internal data stream error."
-msgstr ""
-
-#: ext/gl/gstgltestsrc.c:550
+#: ext/gl/gstgltestsrc.c:673
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -36,7 +30,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 #: ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml.in:13
@@ -143,6 +137,10 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+#: ext/opencv/gsttemplatematch.c:442
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #: ext/resindvd/resindvdsrc.c:362
 msgid "Could not read title information for DVD."
 msgstr ""
@@ -166,22 +164,11 @@
 msgid "Could not read DVD."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:802 ext/smoothstreaming/gstmssdemux.c:995
+#: ext/smoothstreaming/gstmssdemux.c:380
+#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:525
 msgid "This file contains no playable streams."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:961
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-#: ext/smoothstreaming/gstmssdemux.c:1437
-msgid "Failed to get fragment URL."
-msgstr ""
-
-#: ext/smoothstreaming/gstmssdemux.c:1578
-msgid "Couldn't download fragments"
-msgstr ""
-
 #: ext/sndfile/gstsfdec.c:769
 msgid "Could not open sndfile stream for reading."
 msgstr ""
@@ -202,28 +189,47 @@
 msgid "Could not start sndio"
 msgstr ""
 
-#: gst/aiff/aiffparse.c:1462
+#: gst/aiff/aiffparse.c:1458
 msgid "Internal data flow error."
 msgstr ""
 
-#: gst/asfmux/gstasfmux.c:1807
+#: gst/asfmux/gstasfmux.c:1832
 msgid "Generated file has a larger preroll time than its streams duration"
 msgstr ""
 
-#: gst/camerabin2/camerabingeneral.c:166 gst/camerabin2/gstcamerabin2.c:1874
-#: gst/camerabin2/gstviewfinderbin.c:271
+#: gst/camerabin2/camerabingeneral.c:166 gst/camerabin2/gstcamerabin2.c:1876
+#: gst/camerabin2/gstdigitalzoom.c:282 gst/camerabin2/gstviewfinderbin.c:271
 #, c-format
 msgid "Missing element '%s' - check your GStreamer installation."
 msgstr ""
 
-#: gst/camerabin2/gstcamerabin2.c:370
+#: gst/camerabin2/gstcamerabin2.c:364
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
-#: gst/dvdspu/gstdvdspu.c:1037
+#: gst/camerabin2/gstwrappercamerabinsrc.c:584
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
+#: gst/dvdspu/gstdvdspu.c:1040
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:2081
+msgid "Failed to get fragment URL."
+msgstr ""
+
+#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:2282
+#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:2446
+#: gst/mpegtsdemux/mpegtsbase.c:1342 gst/mpegtsdemux/mpegtsbase.c:1346
+#: gst/nuvdemux/gstnuvdemux.c:736
+msgid "Internal data stream error."
+msgstr ""
+
+#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:2383
+msgid "Couldn't download fragments"
+msgstr ""
+
 #: gst/videomeasure/gstvideomeasure_collector.c:294
 msgid "No file name specified for writing."
 msgstr ""
@@ -238,45 +244,45 @@
 msgid "Could not open file \"%s\" for writing."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1118 sys/dvb/gstdvbsrc.c:1304
+#: sys/dvb/gstdvbsrc.c:1565 sys/dvb/gstdvbsrc.c:1754
 #, c-format
 msgid "Device \"%s\" does not exist."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1122
+#: sys/dvb/gstdvbsrc.c:1569
 #, c-format
 msgid "Could not open frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1135
+#: sys/dvb/gstdvbsrc.c:1583
 #, c-format
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1151
+#: sys/dvb/gstdvbsrc.c:1600
 #, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1308
+#: sys/dvb/gstdvbsrc.c:1758
 #, c-format
 msgid "Could not open file \"%s\" for reading."
 msgstr ""
 
-#: sys/dvb/parsechannels.c:159
+#: sys/dvb/parsechannels.c:168
 msgid "Couldn't find DVB channel configuration file"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:162
+#: sys/dvb/parsechannels.c:171
 #, c-format
 msgid "Couldn't load DVB channel configuration file: %s"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:171
+#: sys/dvb/parsechannels.c:180
 msgid "DVB channel configuration file doesn't contain any channels"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:447
+#: sys/dvb/parsechannels.c:456
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
 msgstr ""
diff --git a/po/hr.gmo b/po/hr.gmo
index 0cf77af..b2d59e6 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 2448344..5dc6688 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "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 "Internal data stream error."
-msgstr "Greška unutarnjeg niza podataka."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Ne mogu čitati informacije o naslovu DVD-a."
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Ne mogu otvoriti datoteku „%s” za čitanje."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Greška unutarnjeg niza podataka."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Nije navedena datoteka za pisanje."
 
diff --git a/po/hu.gmo b/po/hu.gmo
index 27ce66c..9763cd0 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 2894435..1470d83 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -3,25 +3,22 @@
 # Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 #
 # Gabor Kelemen <kelemeng@gnome.hu>, 2007, 2008, 2009, 2012.
-# Balázs Úr <urbalazs@gmail.com>, 2014.
+# Balázs Úr <urbalazs@gmail.com>, 2014, 2015.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-08-31 11:18+0200\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-14 08:15+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.5\n"
+"X-Generator: Lokalize 1.2\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
-msgid "Internal data stream error."
-msgstr "Belső adatfolyamhiba."
-
 msgid "format wasn't negotiated before get function"
 msgstr "a formátum nem lett egyeztetve a függvény lekérése előtt"
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "A GStreamer képes hangot lejátszani bármilyen számú kimeneti elem "
 "használatával. Néhány lehetséges választás a következő lehet: osssink, "
@@ -136,6 +133,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Leírja a kiválasztott képi megjelenítés elemet."
 
+msgid "OpenCV failed to load template image"
+msgstr "Az OpenCV-nek nem sikerült betöltenie a sablonképet"
+
 msgid "Could not read title information for DVD."
 msgstr "Nem lehet címinformációkat olvasni a DVD-ről."
 
@@ -159,15 +159,6 @@
 msgid "This file contains no playable streams."
 msgstr "Ez a fájl nem tartalmaz lejátszható folyamokat."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Nem kérhető le a Manifest URL-e"
-
-msgid "Failed to get fragment URL."
-msgstr "Nem sikerült lekérni a töredék URL-t."
-
-msgid "Couldn't download fragments"
-msgstr "Nem sikerült letölteni a töredékeket"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "A hangfájl folyam nem nyitható meg olvasásra."
 
@@ -200,9 +191,22 @@
 "A fájl helye NULL értékre lett állítva, kérjük állítsa be egy érvényes "
 "fájlnévre"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "A digitális nagyítás elemet nem sikerült létrehozni"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "A részkép formátuma nem lett beállítva az adatfolyam előtt"
 
+msgid "Failed to get fragment URL."
+msgstr "Nem sikerült lekérni a töredék URL-t."
+
+msgid "Internal data stream error."
+msgstr "Belső adatfolyamhiba."
+
+msgid "Couldn't download fragments"
+msgstr "Nem sikerült letölteni a töredékeket"
+
 msgid "No file name specified for writing."
 msgstr "Nincs megadva fájlnév az íráshoz."
 
@@ -250,6 +254,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Nem találhatók a(z) %s DVB-csatorna részletei"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Nem kérhető le a Manifest URL-e"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Nem lehet írni a fájlba („%s”)."
 
diff --git a/po/id.gmo b/po/id.gmo
index 2a4a19c..9ef23cf 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index 4b50479..a193740 100644
--- a/po/id.po
+++ b/po/id.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Poedit 1.5.7\n"
 
-msgid "Internal data stream error."
-msgstr "Galat arus data internal."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Tak dapat membaca informasi judul untuk DVD."
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr "Berkas ini tidak memuat stream yang dapat dimainkan."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Tak bisa memperoleh URI Manifes"
-
-msgid "Failed to get fragment URL."
-msgstr "Gagal mendapat URL fragmen."
-
-msgid "Couldn't download fragments"
-msgstr "Tak bisa mengunduh fragmen."
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Tak dapat membuka stream sndfile untuk dibaca."
 
@@ -174,9 +165,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr "Lokasi berkas diisi NULL, harap isi dengan nama berkas yang valid"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Format subgambar tak ditata sebelum aliran data"
 
+msgid "Failed to get fragment URL."
+msgstr "Gagal mendapat URL fragmen."
+
+msgid "Internal data stream error."
+msgstr "Galat arus data internal."
+
+msgid "Couldn't download fragments"
+msgstr "Tak bisa mengunduh fragmen."
+
 msgid "No file name specified for writing."
 msgstr "Tak ada nama berkas yang ditentukan untuk ditulis."
 
@@ -225,5 +228,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Tak bisa temukan rincian untuk kanal DVB %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Tak bisa memperoleh URI Manifes"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Tak dapat menulis ke berkas \"%s\"."
diff --git a/po/it.gmo b/po/it.gmo
index 83de353..dc87fbd 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 1fd105c..8661304 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -16,9 +16,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Errore interno nello stream di dati."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -28,7 +25,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -111,6 +108,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Impossibile leggere le informazioni del titolo per il DVD."
 
@@ -133,15 +133,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Impossibile aprire il file «%s» in lettura."
@@ -173,9 +164,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Errore interno nello stream di dati."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Nessun nome di file specificato per la scrittura."
 
diff --git a/po/ja.gmo b/po/ja.gmo
index 829325b..c80a0ea 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 13de1ea..2b343b8 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "X-Generator: Lokalize 0.3\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-msgid "Internal data stream error."
-msgstr "内部データストリームエラー。"
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "DVDのタイトル情報を読み込むことができませんでした。"
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "読み込み用にファイル \"%s\" を開くことができません。"
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "内部データストリームエラー。"
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "書き込み用にファイル名が指定されていません。"
 
diff --git a/po/ky.gmo b/po/ky.gmo
index ef4db3e..6ef21c4 100644
--- a/po/ky.gmo
+++ b/po/ky.gmo
Binary files differ
diff --git a/po/ky.po b/po/ky.po
index fa406f7..cafd539 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "X-Poedit-Language: Kyrgyz\n"
 "X-Poedit-Country: KYRGYZSTAN\n"
 
-msgid "Internal data stream error."
-msgstr ""
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr ""
 
@@ -133,15 +133,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "\"%s\"  файлы окууга ачылган жок."
@@ -172,9 +163,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr ""
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr ""
 
diff --git a/po/lt.gmo b/po/lt.gmo
index fe560b7..11f32bc 100644
--- a/po/lt.gmo
+++ b/po/lt.gmo
Binary files differ
diff --git a/po/lt.po b/po/lt.po
index bd0efb9..76166e9 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -18,9 +18,6 @@
 "Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
 "%100<10 || n%100>=20) ? 1 : 2);\n"
 
-msgid "Internal data stream error."
-msgstr "Vidinė duomenų srauto klaida."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -30,7 +27,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -113,6 +110,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "Nepavyko rašyti į failą „%s“."
@@ -136,15 +136,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Nepavyko atverti failo „%s“ skaitymui."
@@ -177,9 +168,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Vidinė duomenų srauto klaida."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Nenurodytas failo rašymui pavadinimas."
 
diff --git a/po/lv.gmo b/po/lv.gmo
index acae771..3b669cb 100644
--- a/po/lv.gmo
+++ b/po/lv.gmo
Binary files differ
diff --git a/po/lv.po b/po/lv.po
index 77a2079..e8b2bfe 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -22,9 +22,6 @@
 "2);\n"
 "X-Generator: Lokalize 1.5\n"
 
-msgid "Internal data stream error."
-msgstr "Iekšējās datu plūsmas kļūda."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -34,7 +31,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -117,6 +114,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Nevarēja nolasīt virsrakstu informāciju no DVD."
 
@@ -140,15 +140,6 @@
 msgid "This file contains no playable streams."
 msgstr "Šī datne nesatur atskaņojamas straumes."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Nevarēja saņemt manifesta URI"
-
-msgid "Failed to get fragment URL."
-msgstr "Neizdevās saņemt fragmenta URL."
-
-msgid "Couldn't download fragments"
-msgstr "Nevarēja lejupielādēt fragmentus"
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Nevarēja atvērt datni “%s” lasīšanai."
@@ -180,9 +171,21 @@
 msgstr ""
 "Datnes vieta ir iestatīta uz NULL, lūdzu, iestatiet derīgu datnes nosaukumu"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Apakšattēla formāts netika konfigurēts pirms datu plūsmas"
 
+msgid "Failed to get fragment URL."
+msgstr "Neizdevās saņemt fragmenta URL."
+
+msgid "Internal data stream error."
+msgstr "Iekšējās datu plūsmas kļūda."
+
+msgid "Couldn't download fragments"
+msgstr "Nevarēja lejupielādēt fragmentus"
+
 msgid "No file name specified for writing."
 msgstr "Ierakstīšanai nav norādīts neviens datnes nosaukums."
 
@@ -230,6 +233,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Nevarēja atrast sīkāku informāciju par DVB kanālu %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Nevarēja saņemt manifesta URI"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Nevarēja ierakstīt datnē “%s”."
 
diff --git a/po/mt.gmo b/po/mt.gmo
index fe61bb8..41bd1e7 100644
--- a/po/mt.gmo
+++ b/po/mt.gmo
Binary files differ
diff --git a/po/mt.po b/po/mt.po
index e549123..c861863 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -18,9 +18,6 @@
 "X-Poedit-SourceCharset: utf-8\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-msgid "Internal data stream error."
-msgstr "Internal data stream error."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -30,7 +27,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -113,6 +110,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Ma stajtx naqra informazzjoni fuq it-titlu tad-DVD."
 
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Ma nistax naqra mill-fajl \"%s\"."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Internal data stream error."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "L-ebda isem speċifikat biex nikteb."
 
diff --git a/po/nb.gmo b/po/nb.gmo
index 398015c..99c40c5 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index 330f226..5f0c967 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -2,103 +2,112 @@
 # This file is put in the public domain.
 #
 # Kjartan Maraas <kmaraas@gnome.org>, 2004-2007.
-# Johnny A. Solbu <johnny@solbu.net>, 2012-2014
+# Johnny A. Solbu <johnny@solbu.net>, 2012-2015
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.0\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-07-22 12:38+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-07-11 01:15+0100\n"
 "Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
 "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
 "Language: nb_NO\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.4\n"
-
-msgid "Internal data stream error."
-msgstr "Intern feil i datastrøm."
+"X-Generator: Poedit 1.5.7\n"
 
 msgid "format wasn't negotiated before get function"
 msgstr "formatet ble ikke forhandlet før get-funksjon"
 
 msgid "default GStreamer sound events audiosink"
-msgstr ""
+msgstr "standard GStreamer lydhendelser-audiosink"
 
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
+"GStreamer kan spille av lyd ved hjelp av en rekke utgangselementer. Noen "
+"mulige valg er osssink, pulsesink og alsasink. Audiosinken kan være en "
+"delvis kommandokø i stedet for bare ett element."
 
 msgid "description for default GStreamer sound events audiosink"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer lydhendelser-audiosink"
 
 msgid "Describes the selected audiosink element."
-msgstr ""
+msgstr "beskriver standard audiosinkelement."
 
 msgid "default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "Standard GStreamer-audiosink for Lyd/Video-konferanser"
 
 msgid ""
 "description for default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-audiosink for musikk og filmer"
 
 msgid "default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "standard GStreamer-audiosink for musikk og filmer"
 
 msgid "description for default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-audiosink for musikk og filmer"
 
 msgid "default GStreamer videosink"
-msgstr ""
+msgstr "standard GStreamer-videosink"
 
 msgid ""
 "GStreamer can play video using any number of output elements. Some possible "
 "choices are xvimagesink, ximagesink, sdlvideosink and aasink. The videosink "
 "can be a partial pipeline instead of just one element."
 msgstr ""
+"GStreamer kan spille video ved hjelp av en rekke utgangselementer. Noen "
+"mulige valg er xvimagesink, ximagesink, sdlvideosink og aasink. Videosinken "
+"kan være en delvis kommandokø i stedet for bare ett element."
 
 msgid "description for default GStreamer videosink"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-videosink"
 
 msgid "Describes the selected videosink element."
-msgstr ""
+msgstr "Beskriver det valgte videosink-element."
 
 msgid "default GStreamer audiosrc"
-msgstr ""
+msgstr "standard GStreamer-audiosrc"
 
 msgid ""
 "GStreamer can record audio using any number of input elements. Some possible "
 "choices are osssrc, pulsesrc and alsasrc. The audio source can be a partial "
 "pipeline instead of just one element."
 msgstr ""
+"GStreamer kan ta opp lyd ved hjelp av en rekke dataobjekter. Noen mulige "
+"valg er osssrc, pulsesrc og alsasrc. Lydkilden kan være en delvis kommandokø "
+"i stedet for bare ett element."
 
 msgid "description for default GStreamer audiosrc"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-audiosrc"
 
 msgid "Describes the selected audiosrc element."
-msgstr ""
+msgstr "Beskriver det valgte audiosrc-elementet"
 
 msgid "default GStreamer videosrc"
-msgstr ""
+msgstr "standard GStreamer-videosrc"
 
 msgid ""
 "GStreamer can record video from any number of input elements. Some possible "
 "choices are v4lsrc, v4l2src and videotestsrc. The video source can be a "
 "partial pipeline instead of just one element."
 msgstr ""
+"GStreamer kan ta opp video fra en rekke dataobjekter. Noen mulige valg er "
+"v4lsrc, v4l2src og videotestsrc. Videokilden kan være en delvis kommandokø i "
+"stedet for bare ett element."
 
 msgid "description for default GStreamer videosrc"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-videosrc"
 
 msgid "Describes the selected videosrc element."
-msgstr ""
+msgstr "Beskriver det valgte videosrc-elementet"
 
 msgid "default GStreamer visualization"
-msgstr ""
+msgstr "standard GStreamer-visualisering"
 
 msgid ""
 "GStreamer can put visualization plugins in a pipeline to transform audio "
@@ -106,12 +115,19 @@
 "synaesthesia. The visualization plugin can be a partial pipeline instead of "
 "just one element."
 msgstr ""
+"GStreamer kan sette visualiseringsplugins i en rørledning til å forvandle "
+"lydstrømmer i videobilder. Noen mulige valg er goom, goom2k1 og "
+"synaesthesia. Visualiseringsplugin kan være en delvis kommandokø i stedet "
+"for bare ett element."
 
 msgid "description for default GStreamer visualization"
-msgstr ""
+msgstr "beskrivelse for standard GStreamer-visualisering"
 
 msgid "Describes the selected visualization element."
-msgstr ""
+msgstr "Beskriver valgt visualiseringselement."
+
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV kunne ikke laste mal-bilde"
 
 msgid "Could not read title information for DVD."
 msgstr "Kunne ikke lese tittelinformasjonen til DVD-en."
@@ -136,15 +152,6 @@
 msgid "This file contains no playable streams."
 msgstr "Denne filen inneholder ingen spillbare strømmer."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Kunne ikke hente Manifest-nettadressen."
-
-msgid "Failed to get fragment URL."
-msgstr "Klarte ikke å hente fragment-nettadresse."
-
-msgid "Couldn't download fragments"
-msgstr "Kunne ikke laste ned fragmenter"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Kunne ikke åpne sndfile for lesing."
 
@@ -174,9 +181,22 @@
 msgstr ""
 "Filplassering er satt til NULL, vennligst sett den til et gyldig filnavn"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Digitalzoom element kunne ikke opprettes"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Underbildeformat er ikke konfigurert før dataflyt"
 
+msgid "Failed to get fragment URL."
+msgstr "Klarte ikke å hente fragment-nettadresse."
+
+msgid "Internal data stream error."
+msgstr "Intern feil i datastrøm."
+
+msgid "Couldn't download fragments"
+msgstr "Kunne ikke laste ned fragmenter"
+
 msgid "No file name specified for writing."
 msgstr "Ingen filnavn oppgitt for skriving."
 
@@ -222,5 +242,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Kunne ikke finne detaljer for DVB-kanal %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Kunne ikke hente Manifest-nettadressen."
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Kunne ikke skrive til fil «%s»."
diff --git a/po/nl.gmo b/po/nl.gmo
index 75588dc..f4f367b 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index 35e3227..18374e0 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.4.0\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
 "PO-Revision-Date: 2014-07-22 10:49+0200\n"
 "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -19,9 +19,6 @@
 "X-Generator: Lokalize 1.5\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-msgid "Internal data stream error."
-msgstr "Interne fout in gegevensstroom."
-
 msgid "format wasn't negotiated before get function"
 msgstr "formaat is niet onderhandeld vóór get-functie"
 
@@ -31,7 +28,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -114,6 +111,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Kan de titelinformatie voor de DVD niet lezen."
 
@@ -137,15 +137,6 @@
 msgid "This file contains no playable streams."
 msgstr "Dit bestand bevat geen af te spelen streams."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "De URI van het manifest verkrijgen lukt niet"
-
-msgid "Failed to get fragment URL."
-msgstr "Verkrijgen van de URL van het fragment is mislukt."
-
-msgid "Couldn't download fragments"
-msgstr "Kan fragmenten niet downloaden"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Kan sndfile-stream niet openen om te lezen."
 
@@ -177,10 +168,22 @@
 msgstr ""
 "Locatie van bestand is op NUL gezet, stel het in op een geldige bestandsnaam"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 "Het format van de subafbeelding was niet ingesteld voor de gegevensstroom"
 
+msgid "Failed to get fragment URL."
+msgstr "Verkrijgen van de URL van het fragment is mislukt."
+
+msgid "Internal data stream error."
+msgstr "Interne fout in gegevensstroom."
+
+msgid "Couldn't download fragments"
+msgstr "Kan fragmenten niet downloaden"
+
 msgid "No file name specified for writing."
 msgstr "Geen bestandsnaam gespecificeerd voor de uitvoer."
 
@@ -228,6 +231,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Kon de details voor het DVB-kanaal %s niet vinden"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "De URI van het manifest verkrijgen lukt niet"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Kan niet in bestand \"%s\" schrijven."
 
diff --git a/po/or.gmo b/po/or.gmo
index e5a200e..c08ea7a 100644
--- a/po/or.gmo
+++ b/po/or.gmo
Binary files differ
diff --git a/po/or.po b/po/or.po
index 4337e84..7cdc025 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr ""
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "\"%s\" ଫାଇଲ ଲେଖିହେଲା ନାହିଁ."
@@ -135,15 +135,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "\"%s\" ଫାଇଲ ପଢ଼ିବା ପାଇଁ ଖୋଲିହେଲା ନାହିଁ."
@@ -175,9 +166,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr ""
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 #, fuzzy
 msgid "No file name specified for writing."
 msgstr "କୌଣସି ଫାଇଲନାମ ଉଲ୍ଲେଖିତ ହୋଇ ନାହିଁ."
diff --git a/po/pl.gmo b/po/pl.gmo
index ed4de04..0dadca8 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 07d2f33..27a648f 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-2014.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2007-2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-08-29 15:47+0200\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-10 22:06+0200\n"
 "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
 "Language: pl\n"
@@ -15,9 +15,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Błąd wewnętrzny strumienia danych."
-
 msgid "format wasn't negotiated before get function"
 msgstr "format nie został wynegocjowany przed funkcją pobrania"
 
@@ -27,7 +24,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "GStreamer może odtwarzać dźwięk przy użyciu dowolnej liczby elementów "
 "wyjściowych. Niektóre z możliwości to osssink, pulsesink oraz alsasink. "
@@ -132,6 +129,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Opisuje wybrany element wizualizujący."
 
+msgid "OpenCV failed to load template image"
+msgstr "Odczyt obrazu wzorca przez OpenCV nie powiódł się"
+
 msgid "Could not read title information for DVD."
 msgstr "Nie udało się odczytać informacji o tytułach dla DVD."
 
@@ -155,15 +155,6 @@
 msgid "This file contains no playable streams."
 msgstr "Ten plik nie zawiera strumieni do odtworzenia."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Nie udało się uzyskać URI Manifestu"
-
-msgid "Failed to get fragment URL."
-msgstr "Nie udało się uzyskać URL-a fragmentu."
-
-msgid "Couldn't download fragments"
-msgstr "Nie udało się pobrać fragmentów"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Nie udało się otworzyć strumienia sndfile do odczytu."
 
@@ -194,9 +185,22 @@
 msgstr ""
 "Położenie pliku ustawiono na NULL, proszę ustawić na poprawną nazwę pliku"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Nie udało się utworzyć elementu Digitalzoom"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Format podobrazu nie został skonfigurowany przed przepływem danych"
 
+msgid "Failed to get fragment URL."
+msgstr "Nie udało się uzyskać URL-a fragmentu."
+
+msgid "Internal data stream error."
+msgstr "Błąd wewnętrzny strumienia danych."
+
+msgid "Couldn't download fragments"
+msgstr "Nie udało się pobrać fragmentów"
+
 msgid "No file name specified for writing."
 msgstr "Nie określono nazwy pliku do zapisu."
 
@@ -244,6 +248,3 @@
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Nie udało się odnaleźć szczegółów dla kanału DVB %s"
-
-#~ msgid "Could not write to file \"%s\"."
-#~ msgstr "Nie udało się zapisać danych do pliku \"%s\"."
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 679ce27..0d16df4 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 72f3d78..f296851 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,15 +1,15 @@
 # Brazilian Portuguese translation of gst-plugins-bad.
 # This file is distributed under the same license as the gst-plugins-bad package.
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
 # Raphael Higino <In memorian>, 2007.
-# Fabrício Godoy <skarllot@gmail.com>, 2008-2013.
+# Fabrício Godoy <skarllot@gmail.com>, 2008-2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.2.1\n"
+"Project-Id-Version: gst-plugins-bad-1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2013-12-17 01:09-0200\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-02-01 18:24-0200\n"
 "Last-Translator: Fabrício Godoy <skarllot@gmail.com>\n"
 "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
 "net>\n"
@@ -19,87 +19,105 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
-msgid "Internal data stream error."
-msgstr "Erro interno de fluxo de dados."
-
 msgid "format wasn't negotiated before get function"
-msgstr ""
+msgstr "O formato não foi negociado antes da chamada da função"
 
 msgid "default GStreamer sound events audiosink"
-msgstr ""
+msgstr "audiosink do GStreamer pré-definido para eventos de som"
 
+#, fuzzy
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
+"O GStreamer pode reproduzir áudio utilizando qualquer quantidade de "
+"elementos de saída. Algumas das opções possíveis são osssink, pulsesink e "
+"alsasink. O audiosink pode ser uma fila de processamento parcial em vez de "
+"apenas um elemento."
 
 msgid "description for default GStreamer sound events audiosink"
 msgstr ""
+"descrição para o audiosink do GStreamer pré-definido para eventos de som"
 
 msgid "Describes the selected audiosink element."
-msgstr ""
+msgstr "Descreve o elemento audiosink selecionado."
 
 msgid "default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "audiosink do GStreamer pré-definido para Conferência de Áudio e Vídeo"
 
 msgid ""
 "description for default GStreamer audiosink for Audio/Video Conferencing"
 msgstr ""
+"descrição do audiosink do GStreamer pré-definido para Conferência de Áudio e "
+"Vídeo"
 
 msgid "default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "audiosink do GStreamer pré-definido para Músicas e Filmes"
 
 msgid "description for default GStreamer audiosink for Music and Movies"
 msgstr ""
+"descrição para o audiosink do GStreamer pré-definido para Músicas e Filmes"
 
 msgid "default GStreamer videosink"
-msgstr ""
+msgstr "videosink do GStreamer pré-definido"
 
 msgid ""
 "GStreamer can play video using any number of output elements. Some possible "
 "choices are xvimagesink, ximagesink, sdlvideosink and aasink. The videosink "
 "can be a partial pipeline instead of just one element."
 msgstr ""
+"O GStreamer pode reproduzir vídeo utilizando qualquer quantidade de "
+"elementos de saída. Algumas das opções possíveis são xvimagesink, "
+"ximagesink, sdlvideosink e aasink. O videosink pode ser uma fila de "
+"processamento parcial em vez de apenas um elemento."
 
 msgid "description for default GStreamer videosink"
-msgstr ""
+msgstr "descrição para o videosink do GStreamer pré-definido"
 
 msgid "Describes the selected videosink element."
-msgstr ""
+msgstr "Descreve o elemento videosink selecionado."
 
 msgid "default GStreamer audiosrc"
-msgstr ""
+msgstr "audiosrc do GStreamer pré-definido"
 
 msgid ""
 "GStreamer can record audio using any number of input elements. Some possible "
 "choices are osssrc, pulsesrc and alsasrc. The audio source can be a partial "
 "pipeline instead of just one element."
 msgstr ""
+"O GStreamer pode gravar áudio utilizando qualquer quantidade de elementos de "
+"entrada. Algumas das opções possíveis são osssrc, pulsesrc e alsasrc. A "
+"fonte de áudio pode ser uma fila de processamento parcial em vez de apenas "
+"um elemento."
 
 msgid "description for default GStreamer audiosrc"
-msgstr ""
+msgstr "descrição para o audiosrc do GStreamer pré-definido"
 
 msgid "Describes the selected audiosrc element."
-msgstr ""
+msgstr "Descreve o elemento audiosrc selecionado."
 
 msgid "default GStreamer videosrc"
-msgstr ""
+msgstr "videosrc do GStreamer pré-definido"
 
 msgid ""
 "GStreamer can record video from any number of input elements. Some possible "
 "choices are v4lsrc, v4l2src and videotestsrc. The video source can be a "
 "partial pipeline instead of just one element."
 msgstr ""
+"O GStreamer pode gravar vídeo de qualquer quantidade de elementos de "
+"entrada. Algumas das opções possíveis são v4lsrc, v4l2src e videotestsrc. A "
+"fonte de vídeo pode ser uma fila de processamento parcial em vez de apenas "
+"um elemento."
 
 msgid "description for default GStreamer videosrc"
-msgstr ""
+msgstr "descrição para o videosrc do GStreamer pré-definido"
 
 msgid "Describes the selected videosrc element."
-msgstr ""
+msgstr "Descreve o elemento videosrc selecionado."
 
 msgid "default GStreamer visualization"
-msgstr ""
+msgstr "visualização do GStreamer pré-definida"
 
 msgid ""
 "GStreamer can put visualization plugins in a pipeline to transform audio "
@@ -107,11 +125,18 @@
 "synaesthesia. The visualization plugin can be a partial pipeline instead of "
 "just one element."
 msgstr ""
+"O GStreamer pode colocar plugins de visualização numa fila de processamento "
+"para transformar fluxos de áudio em quadros de vídeo. Algumas das opções "
+"possíveis são goom, goom2k1 e synaesthesia. O plugin de visualização pode "
+"ser uma fila de processamento parcial em vez de apenas um elemento."
 
 msgid "description for default GStreamer visualization"
-msgstr ""
+msgstr "descrição da visualização do GStreamer pré-definida"
 
 msgid "Describes the selected visualization element."
+msgstr "Descreve o elemento de visualização selecionado."
+
+msgid "OpenCV failed to load template image"
 msgstr ""
 
 msgid "Could not read title information for DVD."
@@ -137,18 +162,8 @@
 msgid "This file contains no playable streams."
 msgstr "Este arquivo não contém fluxos reproduzíveis."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Não foi possível obter a URI do manifesto"
-
-msgid "Failed to get fragment URL."
-msgstr "Falha ao obter um fragmento de URL."
-
-msgid "Couldn't download fragments"
-msgstr "Não foi possível baixar os fragmentos"
-
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Não foi possível abrir o arquivo \"%s\" para leitura."
+msgstr "Não foi possível abrir o fluxo sndfile para leitura."
 
 msgid "Could not establish connection to sndio"
 msgstr "Não foi possível estabelecer a conexão para sndio"
@@ -178,9 +193,21 @@
 msgstr ""
 "A localização do arquivo está NULA, favor definir um nome de arquivo válido"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "O formato de subimagem não foi configurado antes do fluxo de dados"
 
+msgid "Failed to get fragment URL."
+msgstr "Falha ao obter um fragmento de URL."
+
+msgid "Internal data stream error."
+msgstr "Erro interno de fluxo de dados."
+
+msgid "Couldn't download fragments"
+msgstr "Não foi possível baixar os fragmentos"
+
 msgid "No file name specified for writing."
 msgstr "Nenhum nome de arquivo especificado para gravação."
 
@@ -207,10 +234,11 @@
 msgstr ""
 "Não foi possível obter as configurações do dispositivo de interface \"%s\"."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
 msgstr ""
-"Não foi possível obter as configurações do dispositivo de interface \"%s\"."
+"Não foi possível listar os sistemas de entrega do dispositivo de interface "
+"\"%s\"."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
@@ -230,5 +258,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Não foi possível encontrar detalhes para o canal DVB %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Não foi possível obter a URI do manifesto"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Não foi possível gravar no arquivo \"%s\"."
diff --git a/po/ro.gmo b/po/ro.gmo
index 79c0acf..d8cd707 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 0e773de..44a23ff 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -17,9 +17,6 @@
 "20)) ? 1 : 2);;\n"
 "X-Generator: Virtaal 0.6.1\n"
 
-msgid "Internal data stream error."
-msgstr "Eroare internă a fluxului de date."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -29,7 +26,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -112,6 +109,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Nu s-au putut citi informațiile despre titlu pentru DVD."
 
@@ -134,15 +134,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Nu s-a putut deschide fișierul „%s” pentru citire."
@@ -174,9 +165,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Eroare internă a fluxului de date."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Niciun nume de fișier specificat pentru scriere."
 
diff --git a/po/ru.gmo b/po/ru.gmo
index 023e08c..8f5827e 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index b809866..aaf1fc8 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -3,13 +3,13 @@
 #
 # Артём Попов <artfwo@gmail.com>, 2009.
 # Pavel Maryanov <acid_jack@ukr.net>, 2009.
-# Yuri Kozlov <yuray@komyakino.ru>, 2011, 2013, 2014.
+# Yuri Kozlov <yuray@komyakino.ru>, 2011, 2013, 2014, 2015.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-09-06 10:56+0400\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-13 12:00+0300\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@mx.ru>\n"
 "Language: ru\n"
@@ -20,9 +20,6 @@
 "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 "Internal data stream error."
-msgstr "Внутренняя ошибка потока данных."
-
 msgid "format wasn't negotiated before get function"
 msgstr "перед функцией получения не был согласован формат"
 
@@ -32,11 +29,11 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
-"GStreamer может воспроизводить аудио через любой выходной элемент. Некоторые "
-"варианты: osssink, pulsesink и alsasink. Аudiosink может быть конвейером, а "
-"не одиночным элементом."
+"GStreamer может воспроизводить аудио через любое количество выходных "
+"элементов. Некоторые варианты: osssink, pulsesink и alsasink. Audiosink "
+"может быть конвейером, а не одиночным элементом."
 
 msgid "description for default GStreamer sound events audiosink"
 msgstr "описание GStreamer audiosink по умолчанию для звуковых событий"
@@ -130,6 +127,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Описывает выбранный элемент visualization."
 
+msgid "OpenCV failed to load template image"
+msgstr "Ошибка OpenCV при загрузке шаблона изображения"
+
 msgid "Could not read title information for DVD."
 msgstr "Не удалось прочитать информацию о структуре DVD."
 
@@ -153,15 +153,6 @@
 msgid "This file contains no playable streams."
 msgstr "Файл не содержит воспроизводимых потоков."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Не удалось получить URI манифеста"
-
-msgid "Failed to get fragment URL."
-msgstr "Ошибка при получении URL фрагмента."
-
-msgid "Couldn't download fragments"
-msgstr "Не удалось скачать фрагменты"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Не удалось открыть поток sndfile для чтения."
 
@@ -192,9 +183,22 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr "Расположение файла равно NULL, укажите правильное имя файла"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Невозможно создать элемент Digitalzoom"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Не настроен формат субграфики (subpicture) до потока данных"
 
+msgid "Failed to get fragment URL."
+msgstr "Ошибка при получении URL фрагмента."
+
+msgid "Internal data stream error."
+msgstr "Внутренняя ошибка потока данных."
+
+msgid "Couldn't download fragments"
+msgstr "Не удалось скачать фрагменты"
+
 msgid "No file name specified for writing."
 msgstr "Не указано имя файла для записи."
 
@@ -242,6 +246,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Не удалось найти настройки DVB-канала %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Не удалось получить URI манифеста"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Не удалось осуществить запись в файл «%s»."
 
diff --git a/po/sk.gmo b/po/sk.gmo
index 427e06a..ed7d7c4 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index d58f972..cd1401f 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -21,9 +21,6 @@
 "X-Poedit-Language: Slovak\n"
 "X-Poedit-Country: SLOVAKIA\n"
 
-msgid "Internal data stream error."
-msgstr "Vnútorná chyba prúdu údajov."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -33,7 +30,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -116,6 +113,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Nepodarilo sa prečítať titulok DVD."
 
@@ -139,15 +139,6 @@
 msgid "This file contains no playable streams."
 msgstr "Tento súbor neobsahuje prehrateľné prúdy údajov."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Nepodarilo sa získať URI Manifestu"
-
-msgid "Failed to get fragment URL."
-msgstr "Nepodarilo sa získať URL fragmentu."
-
-msgid "Couldn't download fragments"
-msgstr "Nepodarilo sa získať fragmenty"
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Nepodarilo sa otvoriť súbor \"%s\" na čítanie."
@@ -180,9 +171,21 @@
 "Umiestnenie súboru je nastavené na NULOVÉ, prosím nastavte platný názov "
 "súboru"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Formát podobrázku nebol nastavený pred prúdom údajov."
 
+msgid "Failed to get fragment URL."
+msgstr "Nepodarilo sa získať URL fragmentu."
+
+msgid "Internal data stream error."
+msgstr "Vnútorná chyba prúdu údajov."
+
+msgid "Couldn't download fragments"
+msgstr "Nepodarilo sa získať fragmenty"
+
 msgid "No file name specified for writing."
 msgstr "Nebolo zadané žiadne meno súboru pre zápis."
 
@@ -230,6 +233,9 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Nepodarilo sa nájsť podrobnosti o DVB kanáli %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Nepodarilo sa získať URI Manifestu"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Nepodarilo sa zapísať do súboru \"%s\"."
 
diff --git a/po/sl.gmo b/po/sl.gmo
index 43cb2a5..7b2607a 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 4c4ecba..14c0fcd 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -22,9 +22,6 @@
 "X-Poedit-Country: SLOVENIA\n"
 "X-Poedit-SourceCharset: utf-8\n"
 
-msgid "Internal data stream error."
-msgstr "Notranja napaka pretoka podatkov."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -34,7 +31,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -117,6 +114,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Podatkov naslova DVD-ja ni mogoče prebrati."
 
@@ -140,15 +140,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "Datoteke \"%s\" ni mogoče odpreti za branje."
@@ -180,9 +171,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Notranja napaka pretoka podatkov."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Ni navedenega imena datoteke za pisanje."
 
diff --git a/po/sq.gmo b/po/sq.gmo
index a86ed7f..ac4f014 100644
--- a/po/sq.gmo
+++ b/po/sq.gmo
Binary files differ
diff --git a/po/sq.po b/po/sq.po
index 4950569..bc1cd75 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-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+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"
@@ -15,9 +15,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Gabim i brendshëm tek stream i të dhënave."
-
 msgid "format wasn't negotiated before get function"
 msgstr ""
 
@@ -27,7 +24,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -110,6 +107,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 #, fuzzy
 msgid "Could not read title information for DVD."
 msgstr "I pamundur shkrimi tek file \"%s\"."
@@ -133,15 +133,6 @@
 msgid "This file contains no playable streams."
 msgstr ""
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
 #, fuzzy
 msgid "Could not open sndfile stream for reading."
 msgstr "E pamundur hapja e file \"%s\" për lexim."
@@ -174,9 +165,21 @@
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr ""
 
+msgid "Failed to get fragment URL."
+msgstr ""
+
+msgid "Internal data stream error."
+msgstr "Gabim i brendshëm tek stream i të dhënave."
+
+msgid "Couldn't download fragments"
+msgstr ""
+
 msgid "No file name specified for writing."
 msgstr "Asnjë emër file specifikuar për shkrim."
 
diff --git a/po/sr.gmo b/po/sr.gmo
index 76843b7..f9b1f7c 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index 8f29685..80afd72 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
 "PO-Revision-Date: 2014-09-13 10:39+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
@@ -18,19 +18,17 @@
 "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 "Internal data stream error."
-msgstr "Унутрашња грешка тока података."
-
 msgid "format wasn't negotiated before get function"
 msgstr "запис није договорен пре функције добављања (get)"
 
 msgid "default GStreamer sound events audiosink"
 msgstr "основни аудио усклађивач звучних догађаја Гстримера"
 
+#, fuzzy
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "Гстример може да пушта аудио користећи било који број излазних елемената. "
 "Неки могући избори су „osssink“, „pulsesink“ и „alsasink“. Аудио усклађивач "
@@ -130,6 +128,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Описује изабрани елемент приказивања."
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Не могу да прочитам информације о наслову ДВД-а."
 
@@ -153,15 +154,6 @@
 msgid "This file contains no playable streams."
 msgstr "Ова датотека не садржи токове за пуштање."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Не могу да добавим путању Манифеста"
-
-msgid "Failed to get fragment URL."
-msgstr "Нисам успео да добијем адресу одломка."
-
-msgid "Couldn't download fragments"
-msgstr "Не могу да преузмем одломке"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Не могу да отворим ток датотеке звука за читање."
 
@@ -191,9 +183,21 @@
 msgstr ""
 "Место датотеке је подешено на НИШТА, подесите га на исправан назив датотеке"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Запис подслике није подешен пре протока података"
 
+msgid "Failed to get fragment URL."
+msgstr "Нисам успео да добијем адресу одломка."
+
+msgid "Internal data stream error."
+msgstr "Унутрашња грешка тока података."
+
+msgid "Couldn't download fragments"
+msgstr "Не могу да преузмем одломке"
+
 msgid "No file name specified for writing."
 msgstr "Није наведен назив датотеке за упис."
 
@@ -241,5 +245,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Не могу да пронађем податке за ДВБ канал „%s“"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Не могу да добавим путању Манифеста"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Не могу да пишем у датотеку „%s“."
diff --git a/po/sv.gmo b/po/sv.gmo
index 68bbf00..7621a54 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 8e75e17..5bf5f8d 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
 "PO-Revision-Date: 2014-09-19 02:43+0200\n"
 "Last-Translator: Sebastian Rasmussen <sebras@gmail.com>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -17,19 +17,17 @@
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "Internal data stream error."
-msgstr "Internt fel i dataström."
-
 msgid "format wasn't negotiated before get function"
 msgstr "formatet förhandlades inte fram innan hämtfunktionen"
 
 msgid "default GStreamer sound events audiosink"
 msgstr "standard GStreamer-ljudutgång för ljudhändelser"
 
+#, fuzzy
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "GStreamer kan spela upp ljud via ett antal utgångselement. Några möjliga val "
 "är osssink, pulsesink och alsasink. Ljudutgången kan vara en delrörledning "
@@ -129,6 +127,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Beskriver det valda visualiseringselementet."
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "Kunde inte läsa titelinformation för dvd."
 
@@ -152,15 +153,6 @@
 msgid "This file contains no playable streams."
 msgstr "Den här filen innehåller inga spelbara strömmar."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Kunde ej hämta manifestets URI"
-
-msgid "Failed to get fragment URL."
-msgstr "Misslyckades att hämta fragment-URL"
-
-msgid "Couldn't download fragments"
-msgstr "Kunde ej ladda ner fragment"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Kunde inte öppna sndfile-ström för läsning."
 
@@ -190,9 +182,21 @@
 msgstr ""
 "Filposition är satt till NULL, vänligen sätt den till ett giltigt filnamn"
 
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Delbildsformat var inte konfigurerat före dataflöde"
 
+msgid "Failed to get fragment URL."
+msgstr "Misslyckades att hämta fragment-URL"
+
+msgid "Internal data stream error."
+msgstr "Internt fel i dataström."
+
+msgid "Couldn't download fragments"
+msgstr "Kunde ej ladda ner fragment"
+
 msgid "No file name specified for writing."
 msgstr "Inget filnamn angavs för skrivning."
 
@@ -238,5 +242,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Kunde ej hitta detaljer för DVB-kanal %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Kunde ej hämta manifestets URI"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Kunde inte skriva till filen \"%s\"."
diff --git a/po/tr.gmo b/po/tr.gmo
index 68a3562..8b60474 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index 8cf60de..b39d26d 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,26 +1,25 @@
 # translation of gst-plugins-bad-0.10.21.2.po to Turkish
 # This file is put in the public domain.
+# This file is distributed under the same license as the gst-plugins-bad package.
 #
-# Server Acim <serveracim@gmail.com>, 2009.
+# Server Acim <serveracim@gmail.com>, 2009, 2015.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-0.10.21.2\n"
+"Project-Id-Version: gst-plugins-bad-1.4.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2011-04-26 19:21+0200\n"
-"Last-Translator: Server Acim <serveracim@gmail.com>\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-01-10 21:07+0100\n"
+"Last-Translator: Volkan Gezer <volkangezer@gmail.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-msgid "Internal data stream error."
-msgstr "İç veri akım hatası."
+"X-Generator: Lokalize 1.5\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
 msgid "format wasn't negotiated before get function"
-msgstr ""
+msgstr "get fonksiyonundan önce biçim görüşülemedi"
 
 msgid "default GStreamer sound events audiosink"
 msgstr ""
@@ -28,7 +27,7 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 
 msgid "description for default GStreamer sound events audiosink"
@@ -111,6 +110,9 @@
 msgid "Describes the selected visualization element."
 msgstr ""
 
+msgid "OpenCV failed to load template image"
+msgstr ""
+
 msgid "Could not read title information for DVD."
 msgstr "DVD'deki başlık bilgisi okunamıyor."
 
@@ -132,57 +134,60 @@
 msgstr "DVD okunamıyor."
 
 msgid "This file contains no playable streams."
-msgstr ""
+msgstr "Dosya çalınabilir akışlar içermiyor."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Dosyayı \"%s\" okumak için açamıyor."
+msgstr "Sndfile akışı okumak için açamıyor."
 
 msgid "Could not establish connection to sndio"
-msgstr ""
+msgstr "Sndio ile bağlantı kurulamadı"
 
 msgid "Failed to query sndio capabilities"
-msgstr ""
+msgstr "Sndio yetenekleri sorgulanamadı"
 
-#, fuzzy
 msgid "Could not configure sndio"
-msgstr "Dosyayı \"%s\" okumak için açamıyor."
+msgstr "Sndio yapılandırılamadı"
 
-#, fuzzy
 msgid "Could not start sndio"
-msgstr "DVD okunamıyor."
+msgstr "Sndio başlatılamadı"
 
 msgid "Internal data flow error."
 msgstr "İç veri akış hatası."
 
 msgid "Generated file has a larger preroll time than its streams duration"
 msgstr ""
+"Oluşturlmuş dosya, akışlarının süresinden daha büyük preroll zamanına sahip"
 
 #, c-format
 msgid "Missing element '%s' - check your GStreamer installation."
-msgstr ""
+msgstr "Eksik öge '%s' - GStreamer kurulumunuzu kontrol ediniz."
 
 msgid "File location is set to NULL, please set it to a valid filename"
 msgstr ""
+"Dosya konumunuz BOŞ bir değere ayarlı, lütfen geçerli bir dosya adı için "
+"ayarlayın"
+
+msgid "Digitalzoom element couldn't be created"
+msgstr ""
 
 msgid "Subpicture format was not configured before data flow"
-msgstr ""
+msgstr "Alt resim biçimi, veri  akışından önce yapılandırılmış"
+
+msgid "Failed to get fragment URL."
+msgstr "Parça adresi alınamadı."
+
+msgid "Internal data stream error."
+msgstr "İç veri akım hatası."
+
+msgid "Couldn't download fragments"
+msgstr "Parçalar indirilemedi"
 
 msgid "No file name specified for writing."
 msgstr "Yazmak için dosya adı belirtilmedi."
 
 #, c-format
 msgid "Given file name \"%s\" can't be converted to local file name encoding."
-msgstr ""
+msgstr "Verilen dosya adı \"%s\" yerel dosya adı kodlamasına dönüştürülemiyor."
 
 #, c-format
 msgid "Could not open file \"%s\" for writing."
@@ -200,28 +205,30 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Aygıt ayarları bulunamadı \"%s\"."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Aygıt ayarları bulunamadı \"%s\"."
+msgstr "\"%s\" ön yüz aygıtından iletim sistemleri numaralandırılanamıyor"
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
 msgstr "Dosyayı \"%s\" okumak için açamıyor."
 
-#, fuzzy
 msgid "Couldn't find DVB channel configuration file"
-msgstr "Sanal karıştırıcı kanal yapılandırması"
+msgstr "DVB kanal yapılandırma dosyası bulunamadı"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Couldn't load DVB channel configuration file: %s"
-msgstr "Sanal karıştırıcı kanal yapılandırması"
+msgstr "DVB kanal yapılandırma dosyası yüklenemedi: %s"
 
 msgid "DVB channel configuration file doesn't contain any channels"
-msgstr ""
+msgstr "DVB kanal yapılandırma dosyası herhangi bir kanal içermiyor"
 
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
-msgstr ""
+msgstr "DVB kanalı %s için ayrıntılar bulunamadı"
+
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Manifest URI alınamadı"
 
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Dosya yazılamıyor \"%s\"."
diff --git a/po/uk.gmo b/po/uk.gmo
index fd15541..8f99072 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index 61f1469..c4e2528 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, 2014.
+# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2013, 2014, 2015.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-08-29 08:35+0300\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-10 22:48+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
 "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
 "Language: uk\n"
@@ -20,9 +20,6 @@
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "X-Generator: Lokalize 1.5\n"
 
-msgid "Internal data stream error."
-msgstr "Помилка внутрішнього потоку даних."
-
 msgid "format wasn't negotiated before get function"
 msgstr "формат не було узгоджено до виклику функції get"
 
@@ -32,12 +29,12 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
 "У GStreamer передбачено можливість відтворення звукових даних за допомогою "
 "довільної кількості елементів виведення. Серед можливих варіантів osssink, "
-"pulsesink та alsasink. Звуковий приймач може бути окремим каналом з "
-"декількох обробників, а не одним елементом."
+"pulsesink та alsasink. Звуковий приймач може бути окремим каналом, а не "
+"одним елементом."
 
 msgid "description for default GStreamer sound events audiosink"
 msgstr "опис типового приймача звукових подій GStreamer"
@@ -136,6 +133,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Описує вибраний елемент візуалізації."
 
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV не вдалося завантажити зображення шаблону"
+
 msgid "Could not read title information for DVD."
 msgstr "Не вдалося прочитати дані щодо записів на DVD."
 
@@ -159,15 +159,6 @@
 msgid "This file contains no playable streams."
 msgstr "Файл не містить потоків, які можна відтворити."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Не вдалося отримати адреси Manifest"
-
-msgid "Failed to get fragment URL."
-msgstr "Не вдалося отримати адреси фрагмента."
-
-msgid "Couldn't download fragments"
-msgstr "Не вдалося отримати фрагменти"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Не вдалося відкрити потік sndfile для читання."
 
@@ -201,9 +192,22 @@
 "Значенням розташування файла є NULL. Будь ласка, встановіть чинне значення "
 "назви файла."
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Не вдалося створити елемент цифрового масштабування"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Формат підзображення не було налаштовано до створення потоку даних"
 
+msgid "Failed to get fragment URL."
+msgstr "Не вдалося отримати адреси фрагмента."
+
+msgid "Internal data stream error."
+msgstr "Помилка внутрішнього потоку даних."
+
+msgid "Couldn't download fragments"
+msgstr "Не вдалося отримати фрагменти"
+
 msgid "No file name specified for writing."
 msgstr "Не вказано назви файла для запису."
 
@@ -253,5 +257,8 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Не вдалося знайти параметрів каналу DVB %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Не вдалося отримати адреси Manifest"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Спроба запису до файла «%s» завершилася невдало"
diff --git a/po/vi.gmo b/po/vi.gmo
index ae81764..afed0c0 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index 03fbb0f..8edc84a 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -1,15 +1,15 @@
 # Vietnamese translation for GST Plugins Bad.
-# Copyright © 2014 Free Software Foundation, Inc.
+# Copyright © 2015 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gst-plugins-bad package.
 # Clytie Siddall <clytie@riverland.net.au>, 2007-2010.
-# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014, 2015.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.4.1\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2014-08-29 15:09+0700\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-06-11 08:37+0700\n"
 "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
 "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
 "Language: vi\n"
@@ -18,13 +18,7 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Language-Team-Website: <http://translationproject.org/team/vi.html>\n"
-"X-Generator: LocFactoryEditor 1.8\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-Language: Vietnamese\n"
-"X-Poedit-Country: VIET NAM\n"
-
-msgid "Internal data stream error."
-msgstr "Lỗi luồng dữ liệu nội bộ."
+"X-Generator: Gtranslator 2.91.7\n"
 
 msgid "format wasn't negotiated before get function"
 msgstr "định dạng không được dàn xếp trước hàm"
@@ -35,9 +29,9 @@
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
-"GStreamer có thể chạy nhạc với bất kỳ số lượng phần tử đầu ra nào. Một số có "
+"GStreamer có thể phát nhạc với bất kỳ số lượng phần tử đầu ra nào. Một số có "
 "thể chọn lựa là osssink, pulsesink và alsasink. “audiosink” có thể là đường "
 "ống đặc biệt thay vì chỉ một phần tử."
 
@@ -134,6 +128,9 @@
 msgid "Describes the selected visualization element."
 msgstr "Mô tả về phần tử hiện hình đã chọn."
 
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV gặp lỗi khi tải ảnh tạm thời"
+
 msgid "Could not read title information for DVD."
 msgstr "Không thể đọc thông tin tựa đề của đĩa DVD."
 
@@ -157,15 +154,6 @@
 msgid "This file contains no playable streams."
 msgstr "Tập tin này không chứa luồng dữ liệu có thể phát."
 
-msgid "Couldn't get the Manifest's URI"
-msgstr "Không thể lấy URI của Manifest"
-
-msgid "Failed to get fragment URL."
-msgstr "Gặp lỗi khi lấy URL phân mảnh."
-
-msgid "Couldn't download fragments"
-msgstr "Không thể tải về các phân mảnh"
-
 msgid "Could not open sndfile stream for reading."
 msgstr "Không thể mở luồng dữ liệu tập tin snd để đọc."
 
@@ -196,9 +184,22 @@
 msgstr ""
 "Vị trí tập tin được đặt thành “NULL”. xin hãy đặt một tên tập tin hợp lệ"
 
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "Không thể tạo phần tử thu phóng số"
+
 msgid "Subpicture format was not configured before data flow"
 msgstr "Định dạng ảnh phụ chưa được cấu hình trước khi dữ liệu truyền đến"
 
+msgid "Failed to get fragment URL."
+msgstr "Gặp lỗi khi lấy URL phân mảnh."
+
+msgid "Internal data stream error."
+msgstr "Lỗi luồng dữ liệu nội bộ."
+
+msgid "Couldn't download fragments"
+msgstr "Không thể tải về các phân mảnh"
+
 msgid "No file name specified for writing."
 msgstr "Chưa chỉ định tên tập tin để ghi vào."
 
@@ -247,17 +248,20 @@
 msgid "Couldn't find details for DVB channel %s"
 msgstr "Không thể tìm thấy chi tiết cho kênh DVB %s"
 
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "Không thể lấy URI của Manifest"
+
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "Không thể ghi vào tập tin “%s”."
 
 #~ msgid "Could not open audio device for mixer control handling."
-#~ msgstr "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hoà tiếng."
+#~ msgstr "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hòa tiếng."
 
 #~ msgid ""
 #~ "Could not open audio device for mixer control handling. This version of "
 #~ "the Open Sound System is not supported by this element."
 #~ msgstr ""
-#~ "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hoà tiếng. Phiên "
+#~ "Không thể mở thiết bị âm thanh để quản lý điều khiển máy hòa tiếng. Phiên "
 #~ "bản Hệ thống Âm thanh Mở này không được yếu tố này hỗ trợ."
 
 #~ msgid "Volume"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 2837e46..e4cb575 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 1d8fffb..9a2abd3 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -3,102 +3,109 @@
 # This file is distributed under the same license as the gst-plugins-bad package.
 # Wenzheng Hu <db_lobster@163.com>, 2007.
 # LI Daobing <lidaobing@gmail.com>, 2008.
-# Ji ZhengYu <zhengyuji@gmail.com>, 2008, 2009
-#
+# Ji ZhengYu <zhengyuji@gmail.com>, 2008, 2009.
+# zwpwjwtz <zwpwjwtz@126.com>, 2015.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 0.10.16.2\n"
+"Project-Id-Version: gst-plugins-bad 1.5.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-12-18 12:07+0100\n"
-"PO-Revision-Date: 2009-11-20 18:12中国标准时间\n"
-"Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
+"POT-Creation-Date: 2015-09-18 19:27+0200\n"
+"PO-Revision-Date: 2015-09-05 21:03+0800\n"
+"Last-Translator: zwpwjwtz <zwpwjwtz@126.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-
-msgid "Internal data stream error."
-msgstr "内部数据流错误。"
+"X-Generator: Poedit 1.8.4\n"
 
 msgid "format wasn't negotiated before get function"
-msgstr ""
+msgstr "在调用get函数之前未确定合适的格式"
 
 msgid "default GStreamer sound events audiosink"
-msgstr ""
+msgstr "默认GStreamer声音事件的音频汇"
 
 msgid ""
 "GStreamer can play audio using any number of output elements. Some possible "
 "choices are osssink, pulsesink and alsasink. The audiosink can be a partial "
-"pipeline instea of just one element."
+"pipeline instead of just one element."
 msgstr ""
+"GStreamer可以使用任意数量的输出组件播放音频。可能的选择有osssink、pulsesink和"
+"alsasink。音频汇可以是管道的一部分,而不仅仅为一个组件。"
 
 msgid "description for default GStreamer sound events audiosink"
-msgstr ""
+msgstr "有关默认GStreamer声音事件的音频汇的说明"
 
 msgid "Describes the selected audiosink element."
-msgstr ""
+msgstr "描述选定的音频汇组件"
 
 msgid "default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "用于音/视频会议的默认Gstreamer音频汇"
 
 msgid ""
 "description for default GStreamer audiosink for Audio/Video Conferencing"
-msgstr ""
+msgstr "有关用于音/视频会议的默认Gstreamer音频汇的描述"
 
 msgid "default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "用于音乐和电影的默认Gstreamer音频汇"
 
 msgid "description for default GStreamer audiosink for Music and Movies"
-msgstr ""
+msgstr "有关音乐和电影的默认Gstreamer音频汇的描述"
 
 msgid "default GStreamer videosink"
-msgstr ""
+msgstr "默认GStreamer的视频汇"
 
 msgid ""
 "GStreamer can play video using any number of output elements. Some possible "
 "choices are xvimagesink, ximagesink, sdlvideosink and aasink. The videosink "
 "can be a partial pipeline instead of just one element."
 msgstr ""
+"GStreamer可以使用任意数量的输出组件播放视频。可能的选择有xvimagesink、"
+"ximagesink、sdlvideosink和aasink。视频汇可以是管道的一部分,而不仅仅为一个组"
+"件。"
 
 msgid "description for default GStreamer videosink"
-msgstr ""
+msgstr "有关默认GStreamer视频汇的描述"
 
 msgid "Describes the selected videosink element."
-msgstr ""
+msgstr "描述选定的视频汇组件"
 
 msgid "default GStreamer audiosrc"
-msgstr ""
+msgstr "默认GStreamer音频源"
 
 msgid ""
 "GStreamer can record audio using any number of input elements. Some possible "
 "choices are osssrc, pulsesrc and alsasrc. The audio source can be a partial "
 "pipeline instead of just one element."
 msgstr ""
+"GStreamer可以使用任意数量的输入组件来记录音频。可能的选择有osssrc、pulsesrc和"
+"alsasrc。音频源可以是管道的一部分,而不仅仅为一个组件。"
 
 msgid "description for default GStreamer audiosrc"
-msgstr ""
+msgstr "有关默认GStreamer音频源的描述"
 
 msgid "Describes the selected audiosrc element."
-msgstr ""
+msgstr "描述选定的音频源组件"
 
 msgid "default GStreamer videosrc"
-msgstr ""
+msgstr "默认GStreamer视频源"
 
 msgid ""
 "GStreamer can record video from any number of input elements. Some possible "
 "choices are v4lsrc, v4l2src and videotestsrc. The video source can be a "
 "partial pipeline instead of just one element."
 msgstr ""
+"GStreamer可以使用任意数量的输出组件播放视频。可能的选择有v4lsrc、v4l2src和"
+"videotestsrc。视频源可以是管道的一部分,而不仅仅为一个组件。"
 
 msgid "description for default GStreamer videosrc"
-msgstr ""
+msgstr "有关默认GStreamer视频源的描述"
 
 msgid "Describes the selected videosrc element."
-msgstr ""
+msgstr "描述选定的视频源组件"
 
 msgid "default GStreamer visualization"
-msgstr ""
+msgstr "默认Gstreamer可视化组件"
 
 msgid ""
 "GStreamer can put visualization plugins in a pipeline to transform audio "
@@ -106,84 +113,90 @@
 "synaesthesia. The visualization plugin can be a partial pipeline instead of "
 "just one element."
 msgstr ""
+"GStreamer可以将可视化插件加载于管道中,并在视频帧中传递音频流。可能的选择有"
+"goom、goom2k1和synaesthesia。可视化插件可以是管道的一部分,而不仅仅为一个组"
+"件。"
 
 msgid "description for default GStreamer visualization"
-msgstr ""
+msgstr "有关默认Gstreamer可视化组件的描述"
 
 msgid "Describes the selected visualization element."
-msgstr ""
+msgstr "描述选定的可视化组件"
+
+msgid "OpenCV failed to load template image"
+msgstr "OpenCV加载模版图片失败"
 
 msgid "Could not read title information for DVD."
-msgstr "无法读取 DVD 的标题信息。"
+msgstr "无法读取DVD的标题信息。"
 
 #, c-format
 msgid "Failed to open DVD device '%s'."
-msgstr "无法打开 DVD 设备“%s”。"
+msgstr "无法打开DVD设备“%s”。"
 
 msgid "Failed to set PGC based seeking."
-msgstr "无法设置基于 PGC 的检索。"
+msgstr "无法设置基于PGC的检索。"
 
 msgid ""
 "Could not read DVD. This may be because the DVD is encrypted and a DVD "
 "decryption library is not installed."
-msgstr ""
+msgstr "无法读取DVD。这可能是由于DVD已加密,且没有安装解密所需的库。"
 
-#, fuzzy
 msgid "Could not read DVD."
-msgstr "无法读取 DVD 的标题信息。"
+msgstr "无法读取DVD。"
 
 msgid "This file contains no playable streams."
-msgstr ""
+msgstr "该文件含有无法播放的流。"
 
-msgid "Couldn't get the Manifest's URI"
-msgstr ""
-
-msgid "Failed to get fragment URL."
-msgstr ""
-
-msgid "Couldn't download fragments"
-msgstr ""
-
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "无法以读方式打开文件“%s”。"
+msgstr "无法打开并读取sndfile流。"
 
 msgid "Could not establish connection to sndio"
-msgstr ""
+msgstr "无法建立到snido的连接。"
 
 msgid "Failed to query sndio capabilities"
-msgstr ""
+msgstr "无法获得有关snido的信息"
 
-#, fuzzy
 msgid "Could not configure sndio"
-msgstr "无法以读方式打开文件“%s”。"
+msgstr "无法配置sndio"
 
-#, fuzzy
 msgid "Could not start sndio"
-msgstr "无法读取 DVD 的标题信息。"
+msgstr "无法启动sndio。"
 
 msgid "Internal data flow error."
 msgstr "内部数据流错误。"
 
 msgid "Generated file has a larger preroll time than its streams duration"
-msgstr ""
+msgstr "生成文件的预告片段超过其自身流长度。"
 
 #, c-format
 msgid "Missing element '%s' - check your GStreamer installation."
-msgstr ""
+msgstr "缺少“%s”组件 - 请检查你的GStreamer安装。"
 
 msgid "File location is set to NULL, please set it to a valid filename"
-msgstr ""
+msgstr "文件位置为NULL,请将其设置为有效的文件名"
+
+#, fuzzy
+msgid "Digitalzoom element couldn't be created"
+msgstr "无法创建Digitalzoom组件"
 
 msgid "Subpicture format was not configured before data flow"
-msgstr ""
+msgstr "子画面格式未在数据流前配置"
+
+msgid "Failed to get fragment URL."
+msgstr "无法获取片段URL。"
+
+msgid "Internal data stream error."
+msgstr "内部数据流错误。"
+
+msgid "Couldn't download fragments"
+msgstr "无法下载片段。"
 
 msgid "No file name specified for writing."
 msgstr "未指定写入文件名。"
 
 #, c-format
 msgid "Given file name \"%s\" can't be converted to local file name encoding."
-msgstr ""
+msgstr "给定的文件名“%s”无法被转换为本地文件名编码。"
 
 #, c-format
 msgid "Could not open file \"%s\" for writing."
@@ -201,37 +214,395 @@
 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."
 msgstr "无法以读方式打开文件“%s”。"
 
-#, fuzzy
 msgid "Couldn't find DVB channel configuration file"
-msgstr "模拟混音器设置"
+msgstr "无法找到DVB通道配置文件"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Couldn't load DVB channel configuration file: %s"
-msgstr "模拟混音器设置"
+msgstr "无法加载DVB通道配置文件:%s"
 
 msgid "DVB channel configuration file doesn't contain any channels"
-msgstr ""
+msgstr "DVB通道配置文件不包含任何通道"
 
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
-msgstr ""
+msgstr "无法获取DVB通道 %s 的详细信息"
+
+#~ msgid "Internal clock error."
+#~ msgstr "内部时钟错误。"
 
 #~ msgid "Could not write to file \"%s\"."
 #~ msgstr "无法写入文件“%s”。"
 
+#~ msgid "Could not open audio device for mixer control handling."
+#~ msgstr "无法打开音频文件进行混音控制操作。"
+
+#~ msgid ""
+#~ "Could not open audio device for mixer control handling. This version of "
+#~ "the Open Sound System is not supported by this element."
+#~ msgstr ""
+#~ "无法打开音频设备进行音量控制操作。此部件不支持开放声音系统(OSS)的版本。"
+
+#~ msgid "Volume"
+#~ msgstr "音量"
+
+#~ msgid "Master"
+#~ msgstr "主声道"
+
+#~ msgid "Front"
+#~ msgstr "前置声道"
+
+#~ msgid "Rear"
+#~ msgstr "后置声道"
+
+#~ msgid "Headphones"
+#~ msgstr "头戴式耳机"
+
+#~ msgid "Center"
+#~ msgstr "中置"
+
+#~ msgid "LFE"
+#~ msgstr "低音炮"
+
+#~ msgid "Surround"
+#~ msgstr "立体声环绕"
+
+#~ msgid "Side"
+#~ msgstr "左右声道"
+
+#~ msgid "Built-in Speaker"
+#~ msgstr "内建扬声器"
+
+#~ msgid "AUX 1 Out"
+#~ msgstr "AUX 1 输出"
+
+#~ msgid "AUX 2 Out"
+#~ msgstr "AUX 2 输出"
+
+#~ msgid "AUX Out"
+#~ msgstr "AUX 输出"
+
+#~ msgid "Bass"
+#~ msgstr "Bass"
+
+#~ msgid "Treble"
+#~ msgstr "Treble"
+
+#~ msgid "3D Depth"
+#~ msgstr "3D Depth"
+
+#~ msgid "3D Center"
+#~ msgstr "3D Center"
+
+#~ msgid "3D Enhance"
+#~ msgstr "3D Enhance"
+
+#~ msgid "Telephone"
+#~ msgstr "话筒"
+
+#~ msgid "Microphone"
+#~ msgstr "麦克风"
+
+#~ msgid "Line Out"
+#~ msgstr "线路输出"
+
+#~ msgid "Line In"
+#~ msgstr "线路输入"
+
+#~ msgid "Internal CD"
+#~ msgstr "内部 CD 音频"
+
+#~ msgid "Video In"
+#~ msgstr "视频输入"
+
+#~ msgid "AUX 1 In"
+#~ msgstr "AUX 1 输入"
+
+#~ msgid "AUX 2 In"
+#~ msgstr "AUX 2 输入"
+
+#~ msgid "AUX In"
+#~ msgstr "AUX 输入"
+
+#~ msgid "PCM"
+#~ msgstr "PCM"
+
+#~ msgid "Record Gain"
+#~ msgstr "录音增益"
+
+#~ msgid "Output Gain"
+#~ msgstr "输出增益"
+
+#~ msgid "Microphone Boost"
+#~ msgstr "麦克风增益"
+
+#~ msgid "Loopback"
+#~ msgstr "Loopback"
+
+#, fuzzy
+#~ msgid "Diagnostic"
+#~ msgstr "采样分析"
+
+#~ msgid "Bass Boost"
+#~ msgstr "Bass 增益"
+
+#~ msgid "Playback Ports"
+#~ msgstr "回放端口"
+
+#~ msgid "Input"
+#~ msgstr "输入"
+
+#~ msgid "Record Source"
+#~ msgstr "录音来源"
+
+#~ msgid "Monitor Source"
+#~ msgstr "监视器来源"
+
+#~ msgid "Keyboard Beep"
+#~ msgstr "按键声音"
+
+#~ msgid "Monitor"
+#~ msgstr "监视器"
+
+#~ msgid "Simulate Stereo"
+#~ msgstr "模拟立体声"
+
+#~ msgid "Stereo"
+#~ msgstr "立体声"
+
+#~ msgid "Surround Sound"
+#~ msgstr "立体声环绕"
+
+#~ msgid "Microphone Gain"
+#~ msgstr "麦克风增益"
+
+#~ msgid "Speaker Source"
+#~ msgstr "扬声器音源"
+
+#~ msgid "Microphone Source"
+#~ msgstr "麦克风音源"
+
+#~ msgid "Jack"
+#~ msgstr "Jack"
+
+#~ msgid "Center / LFE"
+#~ msgstr "中置/低音炮"
+
+#~ msgid "Stereo Mix"
+#~ msgstr "立体声"
+
+#~ msgid "Mono Mix"
+#~ msgstr "单声道"
+
+#~ msgid "Input Mix"
+#~ msgstr "混音输入"
+
+#~ msgid "SPDIF In"
+#~ msgstr "SPDIF 输入"
+
+#~ msgid "SPDIF Out"
+#~ msgstr "SPDIF 输出"
+
+#~ msgid "Microphone 1"
+#~ msgstr "麦克风 1"
+
+#~ msgid "Microphone 2"
+#~ msgstr "麦克风 2"
+
+#~ msgid "Digital Out"
+#~ msgstr "数字输出"
+
+#~ msgid "Digital In"
+#~ msgstr "数字输入"
+
+#~ msgid "HDMI"
+#~ msgstr "HDMI(高清)"
+
+#~ msgid "Modem"
+#~ msgstr "Modem"
+
+#~ msgid "Handset"
+#~ msgstr "手持设备"
+
+#~ msgid "Other"
+#~ msgstr "其它设备"
+
+#~ msgid "None"
+#~ msgstr "无"
+
+#~ msgid "On"
+#~ msgstr "开"
+
+#~ msgid "Off"
+#~ msgstr "关"
+
+#~ msgid "Mute"
+#~ msgstr "静音"
+
+#~ msgid "Fast"
+#~ msgstr "快"
+
+#~ msgid "Very Low"
+#~ msgstr "很慢"
+
+#~ msgid "Low"
+#~ msgstr "慢"
+
+#~ msgid "Medium"
+#~ msgstr "中等"
+
+#~ msgid "High"
+#~ msgstr "高"
+
+#~ msgid "Very High"
+#~ msgstr "很高"
+
+#~ msgid "Production"
+#~ msgstr "生产商"
+
+#~ msgid "Front Panel Microphone"
+#~ msgstr "麦克风面板"
+
+#~ msgid "Front Panel Line In"
+#~ msgstr "线路输入面板"
+
+#~ msgid "Front Panel Headphones"
+#~ msgstr "头戴式耳机面板"
+
+#~ msgid "Front Panel Line Out"
+#~ msgstr "线路输出面板"
+
+#, fuzzy
+#~ msgid "Green Connector"
+#~ msgstr "线路输出"
+
+#, fuzzy
+#~ msgid "Pink Connector"
+#~ msgstr "话筒输出"
+
+#, fuzzy
+#~ msgid "Blue Connector"
+#~ msgstr "立体声输入"
+
+#, fuzzy
+#~ msgid "White Connector"
+#~ msgstr "左/单声道"
+
+#, fuzzy
+#~ msgid "Black Connector"
+#~ msgstr "后置声道输出"
+
+#, fuzzy
+#~ msgid "Gray Connector"
+#~ msgstr "中置声道输出"
+
+#, fuzzy
+#~ msgid "Orange Connector"
+#~ msgstr "低音炮输出"
+
+#, fuzzy
+#~ msgid "Red Connector"
+#~ msgstr "右声道"
+
+#, fuzzy
+#~ msgid "Yellow Connector"
+#~ msgstr "Midi 输出/游戏摇杆"
+
+#, fuzzy
+#~ msgid "Green Front Panel Connector"
+#~ msgstr "线路输出面板"
+
+#, fuzzy
+#~ msgid "Pink Front Panel Connector"
+#~ msgstr "话筒输出面板"
+
+#, fuzzy
+#~ msgid "Blue Front Panel Connector"
+#~ msgstr "立体声输入面板"
+
+#, fuzzy
+#~ msgid "White Front Panel Connector"
+#~ msgstr "左/单声道面板"
+
+#, fuzzy
+#~ msgid "Black Front Panel Connector"
+#~ msgstr "后置声道输出面板"
+
+#, fuzzy
+#~ msgid "Gray Front Panel Connector"
+#~ msgstr "中置声道输出面板"
+
+#, fuzzy
+#~ msgid "Orange Front Panel Connector"
+#~ msgstr "低音炮输出面板"
+
+#, fuzzy
+#~ msgid "Red Front Panel Connector"
+#~ msgstr "右声道面板"
+
+#, fuzzy
+#~ msgid "Yellow Front Panel Connector"
+#~ msgstr "Midi 输出/游戏摇杆面板"
+
+#~ msgid "Spread Output"
+#~ msgstr "Spread 输出"
+
+#~ msgid "Downmix"
+#~ msgstr "Downmix"
+
+#~ msgid "Virtual Mixer Input"
+#~ msgstr "模拟混音输入"
+
+#, fuzzy
+#~ msgid "Virtual Mixer Output"
+#~ msgstr "模拟混音输出"
+
+#~ msgid "Virtual Mixer Channels"
+#~ msgstr "模拟混音输入"
+
+#~ msgid "%s Function"
+#~ msgstr "%s 功能"
+
 #~ msgid "%s %d"
 #~ msgstr "%s %d"
 
-#~ msgid "Internal clock error."
-#~ msgstr "内部时钟错误。"
+#~ msgid ""
+#~ "Could not open audio device for playback. Device is being used by another "
+#~ "application."
+#~ msgstr "无法打开音频设备播放音频。设备正由另一程序使用。"
+
+#~ msgid ""
+#~ "Could not open audio device for playback. You don't have permission to "
+#~ "open the device."
+#~ msgstr "无法打开音频设备播放音频。您无权打开此设备"
+
+#~ msgid "Could not open audio device for playback."
+#~ msgstr "无法打开音频设备播放音频。"
+
+#~ msgid ""
+#~ "Could not open audio device for playback. This version of the Open Sound "
+#~ "System is not supported by this element."
+#~ msgstr "无法打开音频设备播放音频。此组件不支持开放声音系统(OSS)版本。"
+
+#~ msgid "Playback is not supported by this audio device."
+#~ msgstr "此音频设备不支持音频播放。"
+
+#~ msgid "Audio playback error."
+#~ msgstr "音频播放错误。"
+
+#~ msgid "Recording is not supported by this audio device."
+#~ msgstr "此音频设备不支持录音。"
+
+#~ msgid "Error recording from audio device."
+#~ msgstr "从音频设备录音时发生错误。"
 
 #~ msgid "Failed to configure TwoLAME encoder. Check your encoding parameters."
 #~ msgstr "无法配置 TwoLAME 编码器。请检查您的编码参数。"
@@ -308,3 +679,6 @@
 #, fuzzy
 #~ msgid "Yellow front panel connector function"
 #~ msgstr "MIDI 输出音效面板"
+
+#~ msgid "Couldn't get the Manifest's URI"
+#~ msgstr "无法获取manifest的URI"
diff --git a/sys/Makefile.am b/sys/Makefile.am
index 28528be..1051ce5 100644
--- a/sys/Makefile.am
+++ b/sys/Makefile.am
@@ -52,12 +52,6 @@
 DECKLINK_DIR=
 endif
 
-if USE_DIRECTDRAW
-DIRECTDRAW_DIR=directdraw
-else
-DIRECTDRAW_DIR=
-endif
-
 if USE_WINKS
 WINKS_DIR=winks
 else
@@ -94,12 +88,6 @@
 LINSYS_DIR=
 endif
 
-if USE_OSX_VIDEO
-OSX_VIDEO_DIR=osxvideo
-else
-OSX_VIDEO_DIR=
-endif
-
 if USE_PVR
 PVR_DIR=pvr2d
 else
@@ -124,12 +112,6 @@
 # QCAM_DIR=
 # endif
 
-if USE_QUICKTIME
-QT_DIR=qtwrapper
-else
-QT_DIR=
-endif
-
 if USE_WININET
 WININET_DIR=wininet
 else
@@ -160,9 +142,9 @@
 UVCH264_DIR=
 endif
 
-SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTDRAW_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(OSX_VIDEO_DIR) $(PVR_DIR) $(QT_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR)
+SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR)
 
-DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia applemedia-nonpublic avc bluez d3dvideosink decklink directdraw directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \
-		opensles osxvideo pvr2d qtwrapper shm uvch264 vcd vdpau wasapi wininet winks winscreencap
+DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia applemedia-nonpublic avc bluez d3dvideosink decklink directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \
+		opensles pvr2d shm uvch264 vcd vdpau wasapi wininet winks winscreencap
 
 include $(top_srcdir)/common/parallel-subdirs.mak
diff --git a/sys/Makefile.in b/sys/Makefile.in
index b29bc98..a6c47e3 100644
--- a/sys/Makefile.in
+++ b/sys/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -19,7 +19,17 @@
 # descending into all subdirectories a second time, but only after the first
 # (parallel) run has finished, so it should go right through the second time.
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +93,6 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
 subdir = sys
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -93,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +115,6 @@
 	$(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 \
@@ -123,6 +131,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -181,6 +190,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/parallel-subdirs.mak
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,8 +234,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -249,8 +262,6 @@
 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@
@@ -263,7 +274,6 @@
 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@
@@ -271,6 +281,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -297,11 +309,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -320,8 +335,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -380,10 +393,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -400,7 +417,6 @@
 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@
@@ -409,7 +425,6 @@
 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@
@@ -422,7 +437,6 @@
 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@
@@ -436,6 +450,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -447,6 +462,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -485,6 +502,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -520,10 +538,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -549,6 +571,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -556,7 +581,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -585,6 +617,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -595,6 +628,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -625,17 +659,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -652,6 +685,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -690,6 +724,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -725,8 +760,6 @@
 @USE_DIRECT3D_TRUE@D3DVIDEOSINK_DIR = d3dvideosink
 @USE_DECKLINK_FALSE@DECKLINK_DIR = 
 @USE_DECKLINK_TRUE@DECKLINK_DIR = decklink
-@USE_DIRECTDRAW_FALSE@DIRECTDRAW_DIR = 
-@USE_DIRECTDRAW_TRUE@DIRECTDRAW_DIR = directdraw
 @USE_WINKS_FALSE@WINKS_DIR = 
 @USE_WINKS_TRUE@WINKS_DIR = winks
 @USE_DIRECTSOUND_FALSE@DIRECTSOUND_DIR = 
@@ -743,23 +776,19 @@
 # DXR3_DIR=
 # endif
 @USE_LINSYS_TRUE@LINSYS_DIR = linsys
-@USE_OSX_VIDEO_FALSE@OSX_VIDEO_DIR = 
-@USE_OSX_VIDEO_TRUE@OSX_VIDEO_DIR = osxvideo
 @USE_PVR_FALSE@PVR_DIR = 
 @USE_PVR_TRUE@PVR_DIR = pvr2d
 @USE_SHM_FALSE@SHM_DIR = 
 @USE_SHM_TRUE@SHM_DIR = shm
 @USE_OPENSLES_FALSE@OPENSLES_DIR = 
 @USE_OPENSLES_TRUE@OPENSLES_DIR = opensles
-@USE_QUICKTIME_FALSE@QT_DIR = 
+@USE_WININET_FALSE@WININET_DIR = 
 
 # if USE_QCAM
 # QCAM_DIR=qcam
 # else
 # QCAM_DIR=
 # endif
-@USE_QUICKTIME_TRUE@QT_DIR = qtwrapper
-@USE_WININET_FALSE@WININET_DIR = 
 @USE_WININET_TRUE@WININET_DIR = wininet
 @USE_VCD_FALSE@VCD_DIR = 
 @USE_VCD_TRUE@VCD_DIR = vcd
@@ -769,9 +798,9 @@
 @USE_WINSCREENCAP_TRUE@WINSCREENCAP_DIR = winscreencap
 @USE_UVCH264_FALSE@UVCH264_DIR = 
 @USE_UVCH264_TRUE@UVCH264_DIR = uvch264
-SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTDRAW_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(OSX_VIDEO_DIR) $(PVR_DIR) $(QT_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR)
-DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia applemedia-nonpublic avc bluez d3dvideosink decklink directdraw directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \
-		opensles osxvideo pvr2d qtwrapper shm uvch264 vcd vdpau wasapi wininet winks winscreencap
+SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR)
+DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia applemedia-nonpublic avc bluez d3dvideosink decklink directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \
+		opensles pvr2d shm uvch264 vcd vdpau wasapi wininet winks winscreencap
 
 all: all-recursive
 
@@ -788,7 +817,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -797,7 +825,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/parallel-subdirs.mak:
+$(top_srcdir)/common/parallel-subdirs.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1084,6 +1112,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 .PHONY: independent-subdirs $(SUBDIRS)
 
diff --git a/sys/acmenc/Makefile.in b/sys/acmenc/Makefile.in
index d48f0df..87b60d6 100644
--- a/sys/acmenc/Makefile.in
+++ b/sys/acmenc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/acmenc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/acmenc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/acmenc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,6 +1095,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/acmenc/acmenc.c b/sys/acmenc/acmenc.c
index 22ed967..99a0804 100644
--- a/sys/acmenc/acmenc.c
+++ b/sys/acmenc/acmenc.c
@@ -568,7 +568,7 @@
 
   /* register type */
   if (!gst_element_register (plugin, type_name, GST_RANK_NONE, type)) {
-    g_warning ("Failed to register %s", type_name);;
+    g_warning ("Failed to register %s", type_name);
     g_type_set_qdata (type, ACMENC_PARAMS_QDATA, NULL);
     g_free (name);
     g_free (type_name);
diff --git a/sys/acmmp3dec/Makefile.in b/sys/acmmp3dec/Makefile.in
index 2d21ec4..32dda57 100644
--- a/sys/acmmp3dec/Makefile.in
+++ b/sys/acmmp3dec/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/acmmp3dec
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -102,7 +111,6 @@
 	$(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 \
@@ -119,6 +127,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -225,6 +234,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -242,8 +252,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -268,8 +280,6 @@
 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@
@@ -282,7 +292,6 @@
 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@
@@ -290,6 +299,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -316,11 +327,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -339,8 +353,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -399,10 +411,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -419,7 +435,6 @@
 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@
@@ -428,7 +443,6 @@
 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@
@@ -441,7 +455,6 @@
 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@
@@ -455,6 +468,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -466,6 +480,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -504,6 +520,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -539,10 +556,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -568,6 +589,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -575,7 +599,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -604,6 +635,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -614,6 +646,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -644,17 +677,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -671,6 +703,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -709,6 +742,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +787,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/acmmp3dec/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/acmmp3dec/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1062,6 +1095,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/androidmedia/Makefile.am b/sys/androidmedia/Makefile.am
index 3f17588..5fcfb8f 100644
--- a/sys/androidmedia/Makefile.am
+++ b/sys/androidmedia/Makefile.am
@@ -4,14 +4,16 @@
 	gstamc.c \
 	gstamcaudiodec.c \
 	gstamcvideodec.c \
-	gstamcvideoenc.c
+	gstamcvideoenc.c \
+	gstjniutils.c
 
 noinst_HEADERS = \
 	gstamc.h \
 	gstamc-constants.h \
 	gstamcaudiodec.h \
 	gstamcvideodec.h \
-	gstamcvideoenc.h
+	gstamcvideoenc.h \
+	gstjniutils.h
 
 libgstandroidmedia_la_CFLAGS = \
 	$(GST_PLUGINS_BASE_CFLAGS) \
@@ -28,18 +30,3 @@
 	$(ORC_LIBS)
 libgstandroidmedia_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstandroidmedia_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstandroidmedia -:SHARED libgstandroidmedia \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstandroidmedia_la_SOURCES) \
-	           $(nodist_libgstandroidmedia_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstandroidmedia_la_CFLAGS) \
-	 -:LDFLAGS $(libgstandroidmedia_la_LDFLAGS) \
-	           $(libgstandroidmedia_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-@GST_API_VERSION@' \
-	> $@
diff --git a/sys/androidmedia/Makefile.in b/sys/androidmedia/Makefile.in
index 47e9a30..7957832 100644
--- a/sys/androidmedia/Makefile.in
+++ b/sys/androidmedia/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/androidmedia
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -160,7 +170,8 @@
 am_libgstandroidmedia_la_OBJECTS = libgstandroidmedia_la-gstamc.lo \
 	libgstandroidmedia_la-gstamcaudiodec.lo \
 	libgstandroidmedia_la-gstamcvideodec.lo \
-	libgstandroidmedia_la-gstamcvideoenc.lo
+	libgstandroidmedia_la-gstamcvideoenc.lo \
+	libgstandroidmedia_la-gstjniutils.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@)
@@ -231,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +288,6 @@
 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@
@@ -288,7 +300,6 @@
 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@
@@ -296,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +443,6 @@
 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@
@@ -434,7 +451,6 @@
 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@
@@ -447,7 +463,6 @@
 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@
@@ -461,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -733,14 +769,16 @@
 	gstamc.c \
 	gstamcaudiodec.c \
 	gstamcvideodec.c \
-	gstamcvideoenc.c
+	gstamcvideoenc.c \
+	gstjniutils.c
 
 noinst_HEADERS = \
 	gstamc.h \
 	gstamc-constants.h \
 	gstamcaudiodec.h \
 	gstamcvideodec.h \
-	gstamcvideoenc.h
+	gstamcvideoenc.h \
+	gstjniutils.h
 
 libgstandroidmedia_la_CFLAGS = \
 	$(GST_PLUGINS_BASE_CFLAGS) \
@@ -775,7 +813,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/androidmedia/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/androidmedia/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -842,6 +879,7 @@
 @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@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstandroidmedia_la-gstjniutils.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -895,6 +933,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-gstamcvideoenc.lo `test -f 'gstamcvideoenc.c' || echo '$(srcdir)/'`gstamcvideoenc.c
 
+libgstandroidmedia_la-gstjniutils.lo: gstjniutils.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-gstjniutils.lo -MD -MP -MF $(DEPDIR)/libgstandroidmedia_la-gstjniutils.Tpo -c -o libgstandroidmedia_la-gstjniutils.lo `test -f 'gstjniutils.c' || echo '$(srcdir)/'`gstjniutils.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstandroidmedia_la-gstjniutils.Tpo $(DEPDIR)/libgstandroidmedia_la-gstjniutils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstjniutils.c' object='libgstandroidmedia_la-gstjniutils.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-gstjniutils.lo `test -f 'gstjniutils.c' || echo '$(srcdir)/'`gstjniutils.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1108,21 +1153,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstandroidmedia -:SHARED libgstandroidmedia \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstandroidmedia_la_SOURCES) \
-	           $(nodist_libgstandroidmedia_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstandroidmedia_la_CFLAGS) \
-	 -:LDFLAGS $(libgstandroidmedia_la_LDFLAGS) \
-	           $(libgstandroidmedia_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-@GST_API_VERSION@' \
-	> $@
 
 # 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.
diff --git a/sys/androidmedia/gstamc-constants.h b/sys/androidmedia/gstamc-constants.h
index 6117032..cc43f61 100644
--- a/sys/androidmedia/gstamc-constants.h
+++ b/sys/androidmedia/gstamc-constants.h
@@ -94,18 +94,61 @@
   COLOR_Format24BitABGR6666 = 43,
   COLOR_FormatAndroidOpaque = 0x7F000789,
   COLOR_TI_FormatYUV420PackedSemiPlanar = 0x7f000100,
+  COLOR_INTEL_FormatYUV420PackedSemiPlanar = 0x7fa00e00,
+  COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled = 0x7fa00f00,
   COLOR_QCOM_FormatYUV420SemiPlanar = 0x7fa30c00,
   COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7fa30c03,
   /* NV12 but with stride and plane heights aligned to 32 */
   COLOR_QCOM_FormatYVU420SemiPlanar32m = 0x7fa30c04,
+  /* NV12 but with stride and plane heights aligned to 32, Stores two images,
+   * one after the other in top-bottom layout */
+  COLOR_QCOM_FormatYVU420SemiPlanar32mMultiView = 0x7fa30c05,
   /* From hardware/ti/omap4xxx/domx/omx_core/inc/OMX_TI_IVCommon.h */
   COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced = 0x7f000001,
+  COLOR_FormatYUV420Flexible = 0x7f420888,
   /* This format is Exynos specific from the OMX vendor-specific
    * numeric range, but is defined in the Android OMX headers, so
    * we shouldn't find incompatible usage and crash horribly... right?
    * FIXME: Not actually implemented in the video decoder, it will just error out
    * The format seems to be equiv to V4L2_PIX_FMT_NV12MT_16X16 */
-  COLOR_OMX_SEC_FormatNV12Tiled = 0x7fc00002
+  COLOR_OMX_SEC_FormatNV12Tiled = 0x7fc00002,
+  /* YV12: http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12 */
+  COLOR_FormatYV12 = 0x32315659,
+};
+
+enum
+{
+  HEVCProfileMain    = 0x01,
+  HEVCProfileMain10  = 0x02
+};
+
+enum
+{
+  HEVCMainTierLevel1  = 0x1,
+  HEVCHighTierLevel1  = 0x2,
+  HEVCMainTierLevel2  = 0x4,
+  HEVCHighTierLevel2  = 0x8,
+  HEVCMainTierLevel21 = 0x10,
+  HEVCHighTierLevel21 = 0x20,
+  HEVCMainTierLevel3  = 0x40,
+  HEVCHighTierLevel3  = 0x80,
+  HEVCMainTierLevel31 = 0x100,
+  HEVCHighTierLevel31 = 0x200,
+  HEVCMainTierLevel4  = 0x400,
+  HEVCHighTierLevel4  = 0x800,
+  HEVCMainTierLevel41 = 0x1000,
+  HEVCHighTierLevel41 = 0x2000,
+  HEVCMainTierLevel5  = 0x4000,
+  HEVCHighTierLevel5  = 0x8000,
+  HEVCMainTierLevel51 = 0x10000,
+  HEVCHighTierLevel51 = 0x20000,
+  HEVCMainTierLevel52 = 0x40000,
+  HEVCHighTierLevel52 = 0x80000,
+  HEVCMainTierLevel6  = 0x100000,
+  HEVCHighTierLevel6  = 0x200000,
+  HEVCMainTierLevel61 = 0x400000,
+  HEVCHighTierLevel61 = 0x800000,
+  HEVCMainTierLevel62 = 0x1000000
 };
 
 enum
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c
index 36e4372..88dc968 100644
--- a/sys/androidmedia/gstamc.c
+++ b/sys/androidmedia/gstamc.c
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012, Collabora Ltd.
  *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * Copyright (C) 2015, Sebastian Dröge <sebastian@centricular.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,215 +35,12 @@
 #include "gstamcvideodec.h"
 #include "gstamcvideoenc.h"
 #include "gstamcaudiodec.h"
+#include "gstjniutils.h"
 
-#include <gmodule.h>
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/audio/audio.h>
 #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);
 #define GST_CAT_DEFAULT gst_amc_debug
@@ -256,13 +54,6 @@
 static gboolean ignore_unknown_color_formats = FALSE;
 #endif
 
-static GModule *java_module;
-static jint (*get_created_java_vms) (JavaVM ** vmBuf, jsize bufLen,
-    jsize * nVMs);
-static jint (*create_java_vm) (JavaVM ** p_vm, JNIEnv ** p_env, void *vm_args);
-static JavaVM *java_vm;
-static gboolean started_java_vm = FALSE;
-
 static gboolean accepted_color_formats (GstAmcCodecType * type,
     gboolean is_encoder);
 
@@ -281,7 +72,9 @@
   jmethodID dequeue_output_buffer;
   jmethodID flush;
   jmethodID get_input_buffers;
+  jmethodID get_input_buffer;
   jmethodID get_output_buffers;
+  jmethodID get_output_buffer;
   jmethodID get_output_format;
   jmethodID queue_input_buffer;
   jmethodID release;
@@ -315,232 +108,10 @@
   jmethodID set_byte_buffer;
 } media_format;
 
-static pthread_key_t current_jni_env;
-
-static JNIEnv *
-gst_amc_attach_current_thread (void)
-{
-  JNIEnv *env;
-  JavaVMAttachArgs args;
-
-  GST_DEBUG ("Attaching thread %p", g_thread_self ());
-  args.version = JNI_VERSION_1_6;
-  args.name = NULL;
-  args.group = NULL;
-
-  if ((*java_vm)->AttachCurrentThread (java_vm, &env, &args) < 0) {
-    GST_ERROR ("Failed to attach current thread");
-    return NULL;
-  }
-
-  return env;
-}
-
-static void
-gst_amc_detach_current_thread (void *env)
-{
-  GST_DEBUG ("Detaching thread %p", g_thread_self ());
-  (*java_vm)->DetachCurrentThread (java_vm);
-}
-
-static JNIEnv *
-gst_amc_get_jni_env (void)
-{
-  JNIEnv *env;
-
-  if ((env = pthread_getspecific (current_jni_env)) == NULL) {
-    env = gst_amc_attach_current_thread ();
-    pthread_setspecific (current_jni_env, env);
-  }
-
-  return env;
-}
-
-static gboolean
-check_nativehelper (void)
-{
-  GModule *module;
-  void **jni_invocation = NULL;
-  gboolean ret = FALSE;
-
-  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;
-
-  if (!g_module_symbol (java_module, "JNI_CreateJavaVM",
-          (gpointer *) & create_java_vm))
-    goto symbol_error;
-
-  if (!g_module_symbol (java_module, "JNI_GetCreatedJavaVMs",
-          (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;
-
-  if (n_vms > 0) {
-    GST_DEBUG ("Successfully got existing Java VM %p", java_vm);
-  } else {
-    JNIEnv *env;
-    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";
-    options[3].optionString = "-Xdebug";
-
-    vm_args.version = JNI_VERSION_1_4;
-    vm_args.options = options;
-    vm_args.nOptions = 4;
-    vm_args.ignoreUnrecognized = JNI_TRUE;
-    if (create_java_vm (&java_vm, &env, &vm_args) < 0)
-      goto create_failed;
-    GST_DEBUG ("Successfully created Java VM %p", java_vm);
-
-    started_java_vm = TRUE;
-  }
-
-  return java_vm != NULL;
-
-get_created_failed:
-  {
-    GST_ERROR ("Failed to get already created VMs");
-    g_module_close (java_module);
-    java_module = NULL;
-    return FALSE;
-  }
-create_failed:
-  {
-    GST_ERROR ("Failed to create a Java VM");
-    g_module_close (java_module);
-    java_module = NULL;
-    return FALSE;
-  }
-}
-
-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);
-}
+static GstAmcBuffer *gst_amc_codec_get_input_buffers (GstAmcCodec * codec,
+    gsize * n_buffers, GError ** err);
+static GstAmcBuffer *gst_amc_codec_get_output_buffers (GstAmcCodec * codec,
+    gsize * n_buffers, GError ** err);
 
 GstAmcCodec *
 gst_amc_codec_new (const gchar * name, GError ** err)
@@ -552,38 +123,31 @@
 
   g_return_val_if_fail (name != NULL, NULL);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  name_str = (*env)->NewStringUTF (env, name);
-  if (name_str == NULL) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create Java String");
+  name_str = gst_amc_jni_string_from_gchar (env, err, FALSE, name);
+  if (!name_str) {
     goto error;
   }
 
   codec = g_slice_new0 (GstAmcCodec);
 
-  object =
-      (*env)->CallStaticObjectMethod (env, media_codec.klass,
-      media_codec.create_by_codec_name, name_str);
-  if ((*env)->ExceptionCheck (env) || !object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create codec '%s'", name);
+  if (!gst_amc_jni_call_static_object_method (env, err, media_codec.klass,
+          media_codec.create_by_codec_name, &object, name_str))
     goto error;
-  }
 
-  codec->object = (*env)->NewGlobalRef (env, object);
+  codec->object = gst_amc_jni_object_make_global (env, object);
+  object = NULL;
+
   if (!codec->object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create global codec reference");
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_SETTINGS, "Failed to create global codec reference");
     goto error;
   }
 
 done:
-  if (object)
-    (*env)->DeleteLocalRef (env, object);
   if (name_str)
-    (*env)->DeleteLocalRef (env, name_str);
+    gst_amc_jni_object_local_unref (env, name_str);
   name_str = NULL;
 
   return codec;
@@ -602,8 +166,21 @@
 
   g_return_if_fail (codec != NULL);
 
-  env = gst_amc_get_jni_env ();
-  (*env)->DeleteGlobalRef (env, codec->object);
+  env = gst_amc_jni_get_env ();
+
+  if (codec->input_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->input_buffers,
+        codec->n_input_buffers);
+  codec->input_buffers = NULL;
+  codec->n_input_buffers = 0;
+
+  if (codec->output_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->output_buffers,
+        codec->n_output_buffers);
+  codec->output_buffers = NULL;
+  codec->n_output_buffers = 0;
+
+  gst_amc_jni_object_unref (env, codec->object);
   g_slice_free (GstAmcCodec, codec);
 }
 
@@ -612,25 +189,13 @@
     GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
   g_return_val_if_fail (format != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
-
-  (*env)->CallVoidMethod (env, codec->object, media_codec.configure,
-      format->object, NULL, NULL, flags);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
-        "Failed to configure codec");
-    ret = FALSE;
-    goto done;
-  }
-
-done:
-
-  return ret;
+  env = gst_amc_jni_get_env ();
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.configure, format->object, NULL, NULL, flags);
 }
 
 GstAmcFormat *
@@ -642,29 +207,22 @@
 
   g_return_val_if_fail (codec != NULL, NULL);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  object =
-      (*env)->CallObjectMethod (env, codec->object,
-      media_codec.get_output_format);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
-        "Failed to get output format");
+  if (!gst_amc_jni_call_object_method (env, err, codec->object,
+          media_codec.get_output_format, &object))
     goto done;
-  }
 
   ret = g_slice_new0 (GstAmcFormat);
 
-  ret->object = (*env)->NewGlobalRef (env, object);
+  ret->object = gst_amc_jni_object_make_global (env, object);
   if (!ret->object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
-        "Failed to create global format reference");
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_SETTINGS, "Failed to create global format reference");
     g_slice_free (GstAmcFormat, ret);
     ret = NULL;
   }
 
-  (*env)->DeleteLocalRef (env, object);
-
 done:
 
   return ret;
@@ -674,22 +232,28 @@
 gst_amc_codec_start (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
+  gboolean ret;
 
   g_return_val_if_fail (codec != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
+  ret = gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.start);
+  if (!ret)
+    return ret;
 
-  (*env)->CallVoidMethod (env, codec->object, media_codec.start);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to start codec");
-    ret = FALSE;
-    goto done;
+  if (!media_codec.get_input_buffer) {
+    if (codec->input_buffers)
+      gst_amc_jni_free_buffer_array (env, codec->input_buffers,
+          codec->n_input_buffers);
+    codec->input_buffers =
+        gst_amc_codec_get_input_buffers (codec, &codec->n_input_buffers, err);
+    if (!codec->input_buffers) {
+      gst_amc_codec_stop (codec, NULL);
+      return FALSE;
+    }
   }
 
-done:
-
   return ret;
 }
 
@@ -697,238 +261,214 @@
 gst_amc_codec_stop (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  (*env)->CallVoidMethod (env, codec->object, media_codec.stop);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to stop codec");
-    ret = FALSE;
-    goto done;
-  }
+  if (codec->input_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->input_buffers,
+        codec->n_input_buffers);
+  codec->input_buffers = NULL;
+  codec->n_input_buffers = 0;
 
-done:
+  if (codec->output_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->output_buffers,
+        codec->n_output_buffers);
+  codec->output_buffers = NULL;
+  codec->n_output_buffers = 0;
 
-  return ret;
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.stop);
 }
 
 gboolean
 gst_amc_codec_flush (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
-
-  (*env)->CallVoidMethod (env, codec->object, media_codec.flush);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to flush codec");
-    ret = FALSE;
-    goto done;
-  }
-
-done:
-
-  return ret;
+  env = gst_amc_jni_get_env ();
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.flush);
 }
 
 gboolean
 gst_amc_codec_release (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  (*env)->CallVoidMethod (env, codec->object, media_codec.release);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to release codec");
-    ret = FALSE;
-    goto done;
-  }
+  if (codec->input_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->input_buffers,
+        codec->n_input_buffers);
+  codec->input_buffers = NULL;
+  codec->n_input_buffers = 0;
 
-done:
+  if (codec->output_buffers)
+    gst_amc_jni_free_buffer_array (env, codec->output_buffers,
+        codec->n_output_buffers);
+  codec->output_buffers = NULL;
+  codec->n_output_buffers = 0;
 
-  return ret;
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.release);
 }
 
-void
-gst_amc_codec_free_buffers (GstAmcBuffer * buffers, gsize n_buffers)
-{
-  JNIEnv *env;
-  jsize i;
-
-  g_return_if_fail (buffers != NULL);
-
-  env = gst_amc_get_jni_env ();
-
-  for (i = 0; i < n_buffers; i++) {
-    if (buffers[i].object)
-      (*env)->DeleteGlobalRef (env, buffers[i].object);
-  }
-  g_free (buffers);
-}
-
-GstAmcBuffer *
+static GstAmcBuffer *
 gst_amc_codec_get_output_buffers (GstAmcCodec * codec, gsize * n_buffers,
     GError ** err)
 {
   JNIEnv *env;
   jobject output_buffers = NULL;
-  jsize n_output_buffers;
   GstAmcBuffer *ret = NULL;
-  jsize i;
 
   g_return_val_if_fail (codec != NULL, NULL);
   g_return_val_if_fail (n_buffers != NULL, NULL);
 
   *n_buffers = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  output_buffers =
-      (*env)->CallObjectMethod (env, codec->object,
-      media_codec.get_output_buffers);
-  if ((*env)->ExceptionCheck (env) || !output_buffers) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get output buffers");
+  if (!gst_amc_jni_call_object_method (env, err, codec->object,
+          media_codec.get_output_buffers, &output_buffers))
     goto done;
-  }
 
-  n_output_buffers = (*env)->GetArrayLength (env, output_buffers);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get output buffers array length");
-    goto done;
-  }
-
-  *n_buffers = n_output_buffers;
-  ret = g_new0 (GstAmcBuffer, n_output_buffers);
-
-  for (i = 0; i < n_output_buffers; i++) {
-    jobject buffer = NULL;
-
-    buffer = (*env)->GetObjectArrayElement (env, output_buffers, i);
-    if ((*env)->ExceptionCheck (env) || !buffer) {
-      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) {
-      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) {
-      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);
-  }
+  gst_amc_jni_get_buffer_array (env, err, output_buffers, &ret, n_buffers);
 
 done:
   if (output_buffers)
-    (*env)->DeleteLocalRef (env, output_buffers);
-  output_buffers = NULL;
+    gst_amc_jni_object_local_unref (env, output_buffers);
 
   return ret;
-error:
-  if (ret)
-    gst_amc_codec_free_buffers (ret, n_output_buffers);
-  ret = NULL;
-  *n_buffers = 0;
-  goto done;
 }
 
 GstAmcBuffer *
+gst_amc_codec_get_output_buffer (GstAmcCodec * codec, gint index, GError ** err)
+{
+  JNIEnv *env;
+  jobject buffer = NULL;
+  GstAmcBuffer *ret = NULL;
+
+  g_return_val_if_fail (codec != NULL, NULL);
+  g_return_val_if_fail (index >= 0, NULL);
+
+  env = gst_amc_jni_get_env ();
+
+  if (!media_codec.get_output_buffer) {
+    g_return_val_if_fail (index < codec->n_output_buffers && index >= 0, NULL);
+    return gst_amc_buffer_copy (&codec->output_buffers[index]);
+  }
+
+  if (!gst_amc_jni_call_object_method (env, err, codec->object,
+          media_codec.get_output_buffer, &buffer, index))
+    goto done;
+
+  ret = g_new0 (GstAmcBuffer, 1);
+  ret->object = gst_amc_jni_object_make_global (env, buffer);
+  if (!ret->object) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to create global buffer reference");
+    goto error;
+  }
+
+  ret->data = (*env)->GetDirectBufferAddress (env, ret->object);
+  if (!ret->data) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get buffer address");
+    goto error;
+  }
+  ret->size = (*env)->GetDirectBufferCapacity (env, ret->object);
+
+done:
+
+  return ret;
+
+error:
+  if (ret->object)
+    gst_amc_jni_object_unref (env, ret->object);
+  g_free (ret);
+
+  return NULL;
+}
+
+static GstAmcBuffer *
 gst_amc_codec_get_input_buffers (GstAmcCodec * codec, gsize * n_buffers,
     GError ** err)
 {
   JNIEnv *env;
   jobject input_buffers = NULL;
-  jsize n_input_buffers;
   GstAmcBuffer *ret = NULL;
-  jsize i;
 
   g_return_val_if_fail (codec != NULL, NULL);
   g_return_val_if_fail (n_buffers != NULL, NULL);
 
   *n_buffers = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  input_buffers =
-      (*env)->CallObjectMethod (env, codec->object,
-      media_codec.get_input_buffers);
-  if ((*env)->ExceptionCheck (env) || !input_buffers) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get input buffers");
+  if (!gst_amc_jni_call_object_method (env, err, codec->object,
+          media_codec.get_input_buffers, &input_buffers))
     goto done;
-  }
 
-  n_input_buffers = (*env)->GetArrayLength (env, input_buffers);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get input buffers array length");
-    goto done;
-  }
-
-  *n_buffers = n_input_buffers;
-  ret = g_new0 (GstAmcBuffer, n_input_buffers);
-
-  for (i = 0; i < n_input_buffers; i++) {
-    jobject buffer = NULL;
-
-    buffer = (*env)->GetObjectArrayElement (env, input_buffers, i);
-    if ((*env)->ExceptionCheck (env) || !buffer) {
-      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) {
-      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) {
-      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);
-  }
+  gst_amc_jni_get_buffer_array (env, err, input_buffers, &ret, n_buffers);
 
 done:
   if (input_buffers)
-    (*env)->DeleteLocalRef (env, input_buffers);
-  input_buffers = NULL;
+    gst_amc_jni_object_local_unref (env, input_buffers);
 
   return ret;
+}
+
+GstAmcBuffer *
+gst_amc_codec_get_input_buffer (GstAmcCodec * codec, gint index, GError ** err)
+{
+  JNIEnv *env;
+  jobject buffer = NULL;
+  GstAmcBuffer *ret = NULL;
+
+  g_return_val_if_fail (codec != NULL, NULL);
+  g_return_val_if_fail (index >= 0, NULL);
+
+  env = gst_amc_jni_get_env ();
+
+  if (!media_codec.get_input_buffer) {
+    g_return_val_if_fail (index < codec->n_input_buffers && index >= 0, NULL);
+    return gst_amc_buffer_copy (&codec->input_buffers[index]);
+  }
+
+  if (!gst_amc_jni_call_object_method (env, err, codec->object,
+          media_codec.get_input_buffer, &buffer, index))
+    goto done;
+
+  ret = g_new0 (GstAmcBuffer, 1);
+  ret->object = gst_amc_jni_object_make_global (env, buffer);
+  if (!ret->object) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to create global buffer reference");
+    goto error;
+  }
+
+  ret->data = (*env)->GetDirectBufferAddress (env, ret->object);
+  if (!ret->data) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get buffer address");
+    goto error;
+  }
+  ret->size = (*env)->GetDirectBufferCapacity (env, ret->object);
+
+done:
+
+  return ret;
+
 error:
-  if (ret)
-    gst_amc_codec_free_buffers (ret, n_input_buffers);
-  ret = NULL;
-  *n_buffers = 0;
-  goto done;
+  if (ret->object)
+    gst_amc_jni_object_unref (env, ret->object);
+  g_free (ret);
+
+  return NULL;
 }
 
 gint
@@ -940,19 +480,10 @@
 
   g_return_val_if_fail (codec != NULL, G_MININT);
 
-  env = gst_amc_get_jni_env ();
-
-  ret =
-      (*env)->CallIntMethod (env, codec->object,
-      media_codec.dequeue_input_buffer, timeoutUs);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to dequeue input buffer");
-    ret = G_MININT;
-    goto done;
-  }
-
-done:
+  env = gst_amc_jni_get_env ();
+  if (!gst_amc_jni_call_int_method (env, err, codec->object,
+          media_codec.dequeue_input_buffer, &ret, timeoutUs))
+    return G_MININT;
 
   return ret;
 }
@@ -963,39 +494,22 @@
 {
   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)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get buffer info flags");
+  if (!gst_amc_jni_get_int_field (env, err, buffer_info,
+          media_codec_buffer_info.flags, &info->flags))
     return FALSE;
-  }
 
-  info->offset =
-      (*env)->GetIntField (env, buffer_info, media_codec_buffer_info.offset);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get buffer info offset");
+  if (!gst_amc_jni_get_int_field (env, err, buffer_info,
+          media_codec_buffer_info.offset, &info->offset))
     return FALSE;
-  }
 
-  info->presentation_time_us =
-      (*env)->GetLongField (env, buffer_info,
-      media_codec_buffer_info.presentation_time_us);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get buffer info pts");
+  if (!gst_amc_jni_get_long_field (env, err, buffer_info,
+          media_codec_buffer_info.presentation_time_us,
+          &info->presentation_time_us))
     return FALSE;
-  }
 
-  info->size =
-      (*env)->GetIntField (env, buffer_info, media_codec_buffer_info.size);
-  if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get buffer info size");
+  if (!gst_amc_jni_get_int_field (env, err, buffer_info,
+          media_codec_buffer_info.size, &info->size))
     return FALSE;
-  }
 
   return TRUE;
 }
@@ -1010,35 +524,51 @@
 
   g_return_val_if_fail (codec != NULL, G_MININT);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
   info_o =
-      (*env)->NewObject (env, media_codec_buffer_info.klass,
+      gst_amc_jni_new_object (env, err, FALSE, media_codec_buffer_info.klass,
       media_codec_buffer_info.constructor);
-  if (!info_o) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create buffer info instance");
+  if (!info_o)
     goto done;
-  }
 
-  ret =
-      (*env)->CallIntMethod (env, codec->object,
-      media_codec.dequeue_output_buffer, info_o, timeoutUs);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to dequeue output buffer");
+  if (!gst_amc_jni_call_int_method (env, err, codec->object,
+          media_codec.dequeue_output_buffer, &ret, info_o, timeoutUs)) {
     ret = G_MININT;
     goto done;
   }
 
-  if (!gst_amc_codec_fill_buffer_info (env, info_o, info, err)) {
+  if (ret == INFO_OUTPUT_BUFFERS_CHANGED || ret == INFO_OUTPUT_FORMAT_CHANGED
+      || (ret >= 0 && !codec->output_buffers
+          && !media_codec.get_output_buffer)) {
+    if (!media_codec.get_output_buffer) {
+      if (codec->output_buffers)
+        gst_amc_jni_free_buffer_array (env, codec->output_buffers,
+            codec->n_output_buffers);
+      codec->output_buffers =
+          gst_amc_codec_get_output_buffers (codec,
+          &codec->n_output_buffers, err);
+      if (!codec->output_buffers) {
+        ret = G_MININT;
+        goto done;
+      }
+    }
+    if (ret == INFO_OUTPUT_BUFFERS_CHANGED) {
+      gst_amc_jni_object_local_unref (env, info_o);
+      return gst_amc_codec_dequeue_output_buffer (codec, info, timeoutUs, err);
+    }
+  } else if (ret < 0) {
+    goto done;
+  }
+
+  if (ret >= 0 && !gst_amc_codec_fill_buffer_info (env, info_o, info, err)) {
     ret = G_MININT;
     goto done;
   }
 
 done:
   if (info_o)
-    (*env)->DeleteLocalRef (env, info_o);
+    gst_amc_jni_object_local_unref (env, info_o);
   info_o = NULL;
 
   return ret;
@@ -1049,25 +579,14 @@
     const GstAmcBufferInfo * info, GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
   g_return_val_if_fail (info != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
-
-  (*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_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to queue input buffer");
-    ret = FALSE;
-    goto done;
-  }
-
-done:
-
-  return ret;
+  env = gst_amc_jni_get_env ();
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.queue_input_buffer, index, info->offset, info->size,
+      info->presentation_time_us, info->flags);
 }
 
 gboolean
@@ -1075,24 +594,12 @@
     GError ** err)
 {
   JNIEnv *env;
-  gboolean ret = TRUE;
 
   g_return_val_if_fail (codec != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
-
-  (*env)->CallVoidMethod (env, codec->object, media_codec.release_output_buffer,
-      index, JNI_FALSE);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to release output buffer");
-    ret = FALSE;
-    goto done;
-  }
-
-done:
-
-  return ret;
+  env = gst_amc_jni_get_env ();
+  return gst_amc_jni_call_void_method (env, err, codec->object,
+      media_codec.release_output_buffer, index, JNI_FALSE);
 }
 
 GstAmcFormat *
@@ -1102,42 +609,25 @@
   JNIEnv *env;
   GstAmcFormat *format = NULL;
   jstring mime_str;
-  jobject object = NULL;
 
   g_return_val_if_fail (mime != NULL, NULL);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  mime_str = (*env)->NewStringUTF (env, mime);
-  if (mime_str == NULL) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create Java string");
+  mime_str = gst_amc_jni_string_from_gchar (env, err, FALSE, mime);
+  if (!mime_str)
     goto error;
-  }
 
   format = g_slice_new0 (GstAmcFormat);
-
-  object =
-      (*env)->CallStaticObjectMethod (env, media_format.klass,
+  format->object =
+      gst_amc_jni_new_object_from_static (env, err, TRUE, media_format.klass,
       media_format.create_audio_format, mime_str, sample_rate, channels);
-  if ((*env)->ExceptionCheck (env) || !object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create format instance '%s'", mime);
+  if (!format->object)
     goto error;
-  }
-
-  format->object = (*env)->NewGlobalRef (env, object);
-  if (!format->object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create global format reference");
-    goto error;
-  }
 
 done:
-  if (object)
-    (*env)->DeleteLocalRef (env, object);
   if (mime_str)
-    (*env)->DeleteLocalRef (env, mime_str);
+    gst_amc_jni_object_local_unref (env, mime_str);
   mime_str = NULL;
 
   return format;
@@ -1156,42 +646,25 @@
   JNIEnv *env;
   GstAmcFormat *format = NULL;
   jstring mime_str;
-  jobject object = NULL;
 
   g_return_val_if_fail (mime != NULL, NULL);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  mime_str = (*env)->NewStringUTF (env, mime);
-  if (mime_str == NULL) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create Java string");
+  mime_str = gst_amc_jni_string_from_gchar (env, err, FALSE, mime);
+  if (!mime_str)
     goto error;
-  }
 
   format = g_slice_new0 (GstAmcFormat);
-
-  object =
-      (*env)->CallStaticObjectMethod (env, media_format.klass,
+  format->object =
+      gst_amc_jni_new_object_from_static (env, err, TRUE, media_format.klass,
       media_format.create_video_format, mime_str, width, height);
-  if ((*env)->ExceptionCheck (env) || !object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create format instance '%s'", mime);
+  if (!format->object)
     goto error;
-  }
-
-  format->object = (*env)->NewGlobalRef (env, object);
-  if (!format->object) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
-        "Failed to create global format reference");
-    goto error;
-  }
 
 done:
-  if (object)
-    (*env)->DeleteLocalRef (env, object);
   if (mime_str)
-    (*env)->DeleteLocalRef (env, mime_str);
+    gst_amc_jni_object_local_unref (env, mime_str);
   mime_str = NULL;
 
   return format;
@@ -1210,8 +683,8 @@
 
   g_return_if_fail (format != NULL);
 
-  env = gst_amc_get_jni_env ();
-  (*env)->DeleteGlobalRef (env, format->object);
+  env = gst_amc_jni_get_env ();
+  gst_amc_jni_object_unref (env, format->object);
   g_slice_free (GstAmcFormat, format);
 }
 
@@ -1220,35 +693,18 @@
 {
   JNIEnv *env;
   jstring v_str = NULL;
-  const gchar *v = NULL;
   gchar *ret = NULL;
 
   g_return_val_if_fail (format != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  v_str =
-      (*env)->CallObjectMethod (env, format->object, media_format.to_string);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to convert format to string");
+  if (!gst_amc_jni_call_object_method (env, err, format->object,
+          media_format.to_string, &v_str))
     goto done;
-  }
-
-  v = (*env)->GetStringUTFChars (env, v_str, NULL);
-  if (!v) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to get UTF8 string");
-    goto done;
-  }
-
-  ret = g_strdup (v);
+  ret = gst_amc_jni_string_to_gchar (env, v_str, TRUE);
 
 done:
-  if (v)
-    (*env)->ReleaseStringUTFChars (env, v_str, v);
-  if (v_str)
-    (*env)->DeleteLocalRef (env, v_str);
 
   return ret;
 }
@@ -1264,27 +720,19 @@
   g_return_val_if_fail (format != NULL, FALSE);
   g_return_val_if_fail (key != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  ret =
-      (*env)->CallBooleanMethod (env, format->object, media_format.contains_key,
-      key_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to check if format contains key '%s'", key);
+  if (!gst_amc_jni_call_boolean_method (env, err, format->object,
+          media_format.contains_key, &ret, key_str))
     goto done;
-  }
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
 
   return ret;
 }
@@ -1302,62 +750,52 @@
   g_return_val_if_fail (value != NULL, FALSE);
 
   *value = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  *value =
-      (*env)->CallFloatMethod (env, format->object, media_format.get_float,
-      key_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get float key '%s'", key);
+  if (!gst_amc_jni_call_float_method (env, err, format->object,
+          media_format.get_float, value, key_str))
     goto done;
-  }
   ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
 
   return ret;
 }
 
-void
+gboolean
 gst_amc_format_set_float (GstAmcFormat * format, const gchar * key,
     gfloat value, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
+  gboolean ret = FALSE;
 
-  g_return_if_fail (format != NULL);
-  g_return_if_fail (key != NULL);
+  g_return_val_if_fail (format != NULL, FALSE);
+  g_return_val_if_fail (key != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  (*env)->CallVoidMethod (env, format->object, media_format.set_float, key_str,
-      value);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed set float key '%s'", key);
+  if (!gst_amc_jni_call_void_method (env, err, format->object,
+          media_format.set_float, key_str, value))
     goto done;
-  }
+
+  ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
+
+  return ret;
 }
 
 gboolean
@@ -1373,63 +811,53 @@
   g_return_val_if_fail (value != NULL, FALSE);
 
   *value = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  *value =
-      (*env)->CallIntMethod (env, format->object, media_format.get_integer,
-      key_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get integer key '%s'", key);
+  if (!gst_amc_jni_call_int_method (env, err, format->object,
+          media_format.get_integer, value, key_str))
     goto done;
-  }
   ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
 
   return ret;
 
 }
 
-void
+gboolean
 gst_amc_format_set_int (GstAmcFormat * format, const gchar * key, gint value,
     GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
+  gboolean ret = FALSE;
 
-  g_return_if_fail (format != NULL);
-  g_return_if_fail (key != NULL);
+  g_return_val_if_fail (format != NULL, FALSE);
+  g_return_val_if_fail (key != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  (*env)->CallVoidMethod (env, format->object, media_format.set_integer,
-      key_str, value);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed set integer key '%s'", key);
+  if (!gst_amc_jni_call_void_method (env, err, format->object,
+          media_format.set_integer, key_str, value))
     goto done;
-  }
+
+  ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
+
+  return ret;
 }
 
 gboolean
@@ -1440,94 +868,69 @@
   gboolean ret = FALSE;
   jstring key_str = NULL;
   jstring v_str = NULL;
-  const gchar *v = NULL;
 
   g_return_val_if_fail (format != NULL, FALSE);
   g_return_val_if_fail (key != NULL, FALSE);
   g_return_val_if_fail (value != NULL, FALSE);
 
   *value = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  v_str =
-      (*env)->CallObjectMethod (env, format->object, media_format.get_string,
-      key_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get string key '%s'", key);
+  if (!gst_amc_jni_call_object_method (env, err, format->object,
+          media_format.get_string, &v_str, key_str))
     goto done;
-  }
 
-  v = (*env)->GetStringUTFChars (env, v_str, NULL);
-  if (!v) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get string UTF8 characters");
-    goto done;
-  }
-
-  *value = g_strdup (v);
+  *value = gst_amc_jni_string_to_gchar (env, v_str, TRUE);
 
   ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
-  if (v)
-    (*env)->ReleaseStringUTFChars (env, v_str, v);
-  if (v_str)
-    (*env)->DeleteLocalRef (env, v_str);
+    gst_amc_jni_object_local_unref (env, key_str);
 
   return ret;
 }
 
-void
+gboolean
 gst_amc_format_set_string (GstAmcFormat * format, const gchar * key,
     const gchar * value, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
   jstring v_str = NULL;
+  gboolean ret = FALSE;
 
-  g_return_if_fail (format != NULL);
-  g_return_if_fail (key != NULL);
-  g_return_if_fail (value != NULL);
+  g_return_val_if_fail (format != NULL, FALSE);
+  g_return_val_if_fail (key != NULL, FALSE);
+  g_return_val_if_fail (value != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  v_str = (*env)->NewStringUTF (env, value);
-  if (!v_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  v_str = gst_amc_jni_string_from_gchar (env, err, FALSE, value);
+  if (!v_str)
     goto done;
-  }
 
-  (*env)->CallVoidMethod (env, format->object, media_format.set_string, key_str,
-      v_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed set string key '%s'", key);
+  if (!gst_amc_jni_call_void_method (env, err, format->object,
+          media_format.set_string, key_str, v_str))
     goto done;
-  }
+
+  ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
   if (v_str)
-    (*env)->DeleteLocalRef (env, v_str);
+    gst_amc_jni_object_local_unref (env, v_str);
+
+  return ret;
 }
 
 gboolean
@@ -1538,6 +941,8 @@
   gboolean ret = FALSE;
   jstring key_str = NULL;
   jobject v = NULL;
+  GstAmcBuffer buf = { 0, };
+  gint position = 0, limit = 0;
 
   g_return_val_if_fail (format != NULL, FALSE);
   g_return_val_if_fail (key != NULL, FALSE);
@@ -1546,85 +951,90 @@
 
   *data = NULL;
   *size = 0;
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
-  v = (*env)->CallObjectMethod (env, format->object,
-      media_format.get_byte_buffer, key_str);
-  if ((*env)->ExceptionCheck (env)) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get buffer key '%s'", key);
+  if (!gst_amc_jni_call_object_method (env, err, format->object,
+          media_format.get_byte_buffer, &v, key_str))
     goto done;
-  }
 
   *data = (*env)->GetDirectBufferAddress (env, v);
-  if (!data) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed get buffer address");
+  if (*data == NULL) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed get buffer address");
     goto done;
   }
   *size = (*env)->GetDirectBufferCapacity (env, v);
-  *data = g_memdup (*data, *size);
+
+  buf.object = v;
+  buf.data = *data;
+  buf.size = *size;
+  gst_amc_buffer_get_position_and_limit (&buf, NULL, &position, &limit);
+  *size = limit;
+
+  *data = g_memdup (*data + position, limit);
 
   ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
   if (v)
-    (*env)->DeleteLocalRef (env, v);
+    gst_amc_jni_object_local_unref (env, v);
 
   return ret;
 }
 
-void
+gboolean
 gst_amc_format_set_buffer (GstAmcFormat * format, const gchar * key,
     guint8 * data, gsize size, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
   jobject v = NULL;
+  gboolean ret = FALSE;
+  GstAmcBuffer buf = { 0, };
 
-  g_return_if_fail (format != NULL);
-  g_return_if_fail (key != NULL);
-  g_return_if_fail (data != NULL);
+  g_return_val_if_fail (format != NULL, FALSE);
+  g_return_val_if_fail (key != NULL, FALSE);
+  g_return_val_if_fail (data != NULL, FALSE);
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
-  key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed to create Java string");
+  key_str = gst_amc_jni_string_from_gchar (env, err, FALSE, key);
+  if (!key_str)
     goto done;
-  }
 
   /* FIXME: The memory must remain valid until the codec is stopped */
   v = (*env)->NewDirectByteBuffer (env, data, size);
   if (!v) {
-    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed create Java byte buffer");
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "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_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
-        "Failed set buffer key '%s'", key);
+  buf.object = v;
+  buf.data = data;
+  buf.size = size;
+
+  gst_amc_buffer_set_position_and_limit (&buf, NULL, 0, size);
+
+  if (!gst_amc_jni_call_void_method (env, err, format->object,
+          media_format.set_byte_buffer, key_str, v))
     goto done;
-  }
+
+  ret = TRUE;
 
 done:
   if (key_str)
-    (*env)->DeleteLocalRef (env, key_str);
+    gst_amc_jni_object_local_unref (env, key_str);
   if (v)
-    (*env)->DeleteLocalRef (env, v);
+    gst_amc_jni_object_local_unref (env, v);
+
+  return ret;
 }
 
 static gboolean
@@ -1636,7 +1046,7 @@
 
   GST_DEBUG ("Retrieving Java classes");
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
   tmp = (*env)->FindClass (env, "java/lang/String");
   if (!tmp) {
@@ -1753,6 +1163,20 @@
     goto done;
   }
 
+  /* Android >= 21 */
+  media_codec.get_output_buffer =
+      (*env)->GetMethodID (env, media_codec.klass, "getOutputBuffer",
+      "(I)Ljava/nio/ByteBuffer;");
+  if ((*env)->ExceptionCheck (env))
+    (*env)->ExceptionClear (env);
+
+  /* Android >= 21 */
+  media_codec.get_input_buffer =
+      (*env)->GetMethodID (env, media_codec.klass, "getInputBuffer",
+      "(I)Ljava/nio/ByteBuffer;");
+  if ((*env)->ExceptionCheck (env))
+    (*env)->ExceptionClear (env);
+
   tmp = (*env)->FindClass (env, "android/media/MediaCodec$BufferInfo");
   if (!tmp) {
     ret = FALSE;
@@ -1968,7 +1392,7 @@
     return TRUE;
   }
 
-  env = gst_amc_get_jni_env ();
+  env = gst_amc_jni_get_env ();
 
   codec_list_class = (*env)->FindClass (env, "android/media/MediaCodecList");
   if (!codec_list_class) {
@@ -2006,7 +1430,7 @@
     goto done;
   }
 
-  GST_LOG ("Found %d available codecs", codec_count);
+  GST_INFO ("Found %d available codecs", codec_count);
 
   for (i = 0; i < codec_count; i++) {
     GstAmcCodecInfo *gst_codec_info;
@@ -2108,7 +1532,8 @@
      * VM via the non-public AndroidRuntime class. Can we somehow
      * initialize all this?
      */
-    if (started_java_vm && !g_str_has_prefix (name_str, "OMX.google.")) {
+    if (gst_amc_jni_is_vm_started () &&
+        !g_str_has_prefix (name_str, "OMX.google.")) {
       GST_INFO ("Skipping non-Google codec '%s' in standalone mode", name_str);
       valid_codec = FALSE;
       goto next_codec;
@@ -2180,9 +1605,9 @@
       const gchar *supported_type_str = NULL;
       jobject capabilities = NULL;
       jclass capabilities_class = NULL;
-      jfieldID color_formats_id, profile_levels_id;
-      jobject color_formats = NULL;
+      jfieldID profile_levels_id, color_formats_id;
       jobject profile_levels = NULL;
+      jobject color_formats = NULL;
       jint *color_formats_elems = NULL;
       jsize n_elems, k;
 
@@ -2243,42 +1668,42 @@
         goto next_supported_type;
       }
 
-      color_formats =
-          (*env)->GetObjectField (env, capabilities, color_formats_id);
-      if ((*env)->ExceptionCheck (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)) {
-        GST_ERROR ("Failed to get color formats array length");
-        (*env)->ExceptionDescribe (env);
-        (*env)->ExceptionClear (env);
-        valid_codec = FALSE;
-        goto next_supported_type;
-      }
-      gst_codec_type->n_color_formats = n_elems;
-      gst_codec_type->color_formats = g_new0 (gint, n_elems);
-      color_formats_elems =
-          (*env)->GetIntArrayElements (env, color_formats, NULL);
-      if ((*env)->ExceptionCheck (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++) {
-        GST_INFO ("Color format %d: 0x%x", k, color_formats_elems[k]);
-        gst_codec_type->color_formats[k] = color_formats_elems[k];
-      }
-
       if (g_str_has_prefix (gst_codec_type->mime, "video/")) {
+        color_formats =
+            (*env)->GetObjectField (env, capabilities, color_formats_id);
+        if ((*env)->ExceptionCheck (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)) {
+          GST_ERROR ("Failed to get color formats array length");
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
+          valid_codec = FALSE;
+          goto next_supported_type;
+        }
+        gst_codec_type->n_color_formats = n_elems;
+        gst_codec_type->color_formats = g_new0 (gint, n_elems);
+        color_formats_elems =
+            (*env)->GetIntArrayElements (env, color_formats, NULL);
+        if ((*env)->ExceptionCheck (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++) {
+          GST_INFO ("Color format %d: 0x%x", k, color_formats_elems[k]);
+          gst_codec_type->color_formats[k] = color_formats_elems[k];
+        }
+
         if (!n_elems) {
           GST_ERROR ("No supported color formats for video codec");
           valid_codec = FALSE;
@@ -2555,14 +1980,18 @@
 } color_format_mapping_table[] = {
   {
   COLOR_FormatYUV420Planar, GST_VIDEO_FORMAT_I420}, {
+  COLOR_FormatYUV420Flexible, GST_VIDEO_FORMAT_I420}, {
   COLOR_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
   COLOR_TI_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
   COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced, GST_VIDEO_FORMAT_NV12}, {
+  COLOR_INTEL_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
+  COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled, GST_VIDEO_FORMAT_NV12}, {
   COLOR_QCOM_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
   COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, 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}
+  COLOR_FormatYCbYCr, GST_VIDEO_FORMAT_YUY2}, {
+  COLOR_FormatYV12, GST_VIDEO_FORMAT_YV12}
 };
 
 static gboolean
@@ -2737,7 +2166,7 @@
   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);
+      slice_height = GST_ROUND_UP_16 (height);
   }
 
   if (width == 0 || height == 0) {
@@ -2746,7 +2175,9 @@
   }
 
   switch (color_format) {
-    case COLOR_FormatYUV420Planar:{
+    case COLOR_FormatYUV420Planar:
+    case COLOR_FormatYUV420Flexible:{
+    case COLOR_FormatYV12:
       if (stride == 0 || slice_height == 0) {
         GST_ERROR ("Stride or slice height is 0");
         return FALSE;
@@ -2757,6 +2188,20 @@
               1) / 2);
       break;
     }
+    case COLOR_INTEL_FormatYUV420PackedSemiPlanar:
+    case COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled:
+      if (stride == 0) {
+        GST_ERROR ("Stride is 0");
+        return FALSE;
+      }
+      if (slice_height <= 0)
+        slice_height = height;
+
+      frame_size =
+          stride * (slice_height - crop_top / 2) +
+          (GST_ROUND_UP_2 (stride) * ((slice_height + 1) / 2));
+      break;
+
     case COLOR_TI_FormatYUV420PackedSemiPlanar:
     case COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced:{
       if (stride == 0 || slice_height == 0) {
@@ -3094,6 +2539,109 @@
 {
   gint id;
   const gchar *str;
+} hevc_profile_mapping_table[] = {
+  {
+  HEVCProfileMain, "main"}, {
+  HEVCProfileMain10, "main-10"}
+};
+
+const gchar *
+gst_amc_hevc_profile_to_string (gint profile)
+{
+  gint i;
+
+  for (i = 0; i < G_N_ELEMENTS (hevc_profile_mapping_table); i++) {
+    if (hevc_profile_mapping_table[i].id == profile) {
+      return hevc_profile_mapping_table[i].str;
+    }
+  }
+
+  return NULL;
+}
+
+gint
+gst_amc_hevc_profile_from_string (const gchar * profile)
+{
+  gint i;
+
+  g_return_val_if_fail (profile != NULL, -1);
+
+  for (i = 0; i < G_N_ELEMENTS (hevc_profile_mapping_table); i++) {
+    if (strcmp (hevc_profile_mapping_table[i].str, profile) == 0)
+      return hevc_profile_mapping_table[i].id;
+  }
+
+  return -1;
+}
+
+static const struct
+{
+  gint id;
+  const gchar *tier_str;
+  const gchar *level_str;
+} hevc_tier_level_mapping_table[] = {
+  {
+  HEVCMainTierLevel1, "main", "1"}, {
+  HEVCMainTierLevel2, "main", "2"}, {
+  HEVCMainTierLevel21, "main", "2.1"}, {
+  HEVCMainTierLevel3, "main", "3"}, {
+  HEVCMainTierLevel31, "main", "3.1"}, {
+  HEVCMainTierLevel4, "main", "4"}, {
+  HEVCMainTierLevel41, "main", "4.1"}, {
+  HEVCMainTierLevel5, "main", "5"}, {
+  HEVCMainTierLevel51, "main", "5.1"}, {
+  HEVCMainTierLevel52, "main", "5.2"}, {
+  HEVCMainTierLevel6, "main", "6"}, {
+  HEVCMainTierLevel61, "main", "6.1"}, {
+  HEVCMainTierLevel62, "main", "6.2"}, {
+  HEVCHighTierLevel1, "high", "1"}, {
+  HEVCHighTierLevel2, "high", "2"}, {
+  HEVCHighTierLevel21, "high", "2.1"}, {
+  HEVCHighTierLevel3, "high", "3"}, {
+  HEVCHighTierLevel31, "high", "3.1"}, {
+  HEVCHighTierLevel4, "high", "4"}, {
+  HEVCHighTierLevel41, "high", "4.1"}, {
+  HEVCHighTierLevel5, "high", "5"}, {
+  HEVCHighTierLevel51, "high", "5.1"}, {
+  HEVCHighTierLevel52, "high", "5.2"}, {
+  HEVCHighTierLevel6, "high", "6"}, {
+  HEVCHighTierLevel61, "high", "6.1"}
+};
+
+const gchar *
+gst_amc_hevc_tier_level_to_string (gint tier_level, const gchar ** tier)
+{
+  gint i;
+
+  for (i = 0; i < G_N_ELEMENTS (hevc_tier_level_mapping_table); i++) {
+    if (hevc_tier_level_mapping_table[i].id == tier_level)
+      *tier = hevc_tier_level_mapping_table[i].tier_str;
+    return hevc_tier_level_mapping_table[i].level_str;
+  }
+
+  return NULL;
+}
+
+gint
+gst_amc_hevc_tier_level_from_string (const gchar * tier, const gchar * level)
+{
+  gint i;
+
+  g_return_val_if_fail (level != NULL, -1);
+
+  for (i = 0; i < G_N_ELEMENTS (hevc_tier_level_mapping_table); i++) {
+    if (strcmp (hevc_tier_level_mapping_table[i].tier_str, tier) == 0 &&
+        strcmp (hevc_tier_level_mapping_table[i].level_str, level) == 0)
+      return hevc_tier_level_mapping_table[i].id;
+  }
+
+  return -1;
+}
+
+static const struct
+{
+  gint id;
+  const gchar *str;
   const gchar *alt_str;
 } avc_profile_mapping_table[] = {
   {
@@ -3312,7 +2860,7 @@
 }
 
 gint
-gst_amc_avc_mpeg4_profile_from_string (const gchar * profile)
+gst_amc_mpeg4_profile_from_string (const gchar * profile)
 {
   gint i;
 
@@ -3685,12 +3233,38 @@
 
       /* Give the Google software codec a secondary rank,
        * everything else is likely a hardware codec, except
-       * OMX.SEC.*.sw.dec (as seen in Galaxy S4) */
+       * OMX.SEC.*.sw.dec (as seen in Galaxy S4).
+       *
+       * Also on some devices there are codecs that don't start
+       * with OMX., while there are also some that do. And on
+       * some of these devices the ones that don't start with
+       * OMX. just crash during initialization while the others
+       * work. To make things even more complicated other devices
+       * have codecs with the same name that work and no alternatives.
+       * So just give a lower rank to these non-OMX codecs and hope
+       * that there's an alternative with a higher rank.
+       */
       if (g_str_has_prefix (codec_info->name, "OMX.google") ||
-          g_str_has_suffix (codec_info->name, ".sw.dec"))
-        rank = GST_RANK_SECONDARY;
-      else
-        rank = GST_RANK_PRIMARY;
+          g_str_has_suffix (codec_info->name, ".sw.dec")) {
+        /* For video we prefer hardware codecs, for audio we prefer software
+         * codecs. Hardware codecs don't make much sense for audio */
+        rank = is_video ? GST_RANK_SECONDARY : GST_RANK_PRIMARY;
+      } else if (g_str_has_prefix (codec_info->name, "OMX.Exynos.")
+          && !is_video) {
+        /* OMX.Exynos. audio codecs are existing on some devices like the
+         * Galaxy S5 mini, and cause random crashes (of the device,
+         * not the app!) and generally misbehave. That specific device
+         * has other codecs that work with a different name, but let's
+         * just give them marginal rank in case there are devices that
+         * have no other codecs and these are actually the only working
+         * ones
+         */
+        rank = GST_RANK_MARGINAL;
+      } else if (g_str_has_prefix (codec_info->name, "OMX.")) {
+        rank = is_video ? GST_RANK_PRIMARY : GST_RANK_SECONDARY;
+      } else {
+        rank = GST_RANK_MARGINAL;
+      }
 
       ret |= gst_element_register (plugin, element_name, rank, subtype);
       g_free (element_name);
@@ -3709,9 +3283,7 @@
 
   GST_DEBUG_CATEGORY_INIT (gst_amc_debug, "amc", 0, "android-media-codec");
 
-  pthread_key_create (&current_jni_env, gst_amc_detach_current_thread);
-
-  if (!initialize_java_vm ())
+  if (!gst_amc_jni_initialize ())
     return FALSE;
 
   gst_plugin_add_dependency_simple (plugin, NULL, "/etc", "media_codecs.xml",
@@ -4113,6 +3685,74 @@
           } else {
             gst_structure_free (tmp);
           }
+        } else if (strcmp (type->mime, "video/hevc") == 0) {
+          gint j;
+          gboolean have_profile_level = FALSE;
+
+          tmp = gst_structure_new ("video/x-h265",
+              "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;
+
+              profile =
+                  gst_amc_hevc_profile_to_string (type->profile_levels[j].
+                  profile);
+
+              if (!profile) {
+                GST_ERROR ("Unable to map H265 profile 0x%08x",
+                    type->profile_levels[j].profile);
+                continue;
+              }
+
+              tmp2 = gst_structure_copy (tmp);
+              gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
+
+              /* FIXME: Implement tier/level support here */
+#if 0
+              if (codec_info->is_encoder) {
+                const gchar *level, *tier;
+                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_hevc_tier_level_to_string (k, &tier);
+                  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);
+              }
+#endif
+
+              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/x-vnd.on2.vp8") == 0) {
           tmp = gst_structure_new ("video/x-vp8",
               "width", GST_TYPE_INT_RANGE, 16, 4096,
diff --git a/sys/androidmedia/gstamc.h b/sys/androidmedia/gstamc.h
index 7fcae1e..a3fb9bc 100644
--- a/sys/androidmedia/gstamc.h
+++ b/sys/androidmedia/gstamc.h
@@ -26,6 +26,8 @@
 #include <gst/audio/audio.h>
 #include <jni.h>
 
+#include "gstjniutils.h"
+
 G_BEGIN_DECLS
 
 typedef struct _GstAmcCodecInfo GstAmcCodecInfo;
@@ -33,7 +35,6 @@
 typedef struct _GstAmcCodec GstAmcCodec;
 typedef struct _GstAmcBufferInfo GstAmcBufferInfo;
 typedef struct _GstAmcFormat GstAmcFormat;
-typedef struct _GstAmcBuffer GstAmcBuffer;
 typedef struct _GstAmcColorFormatInfo GstAmcColorFormatInfo;
 
 struct _GstAmcCodecType {
@@ -56,12 +57,6 @@
   gint n_supported_types;
 };
 
-struct _GstAmcBuffer {
-  jobject object; /* global reference */
-  guint8 *data;
-  gsize size;
-};
-
 struct _GstAmcFormat {
   /* < private > */
   jobject object; /* global reference */
@@ -70,6 +65,9 @@
 struct _GstAmcCodec {
   /* < private > */
   jobject object; /* global reference */
+
+  GstAmcBuffer *input_buffers, *output_buffers;
+  gsize n_input_buffers, n_output_buffers;
 };
 
 struct _GstAmcBufferInfo {
@@ -92,9 +90,8 @@
 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, 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);
+GstAmcBuffer * gst_amc_codec_get_output_buffer (GstAmcCodec * codec, gint index, GError **err);
+GstAmcBuffer * gst_amc_codec_get_input_buffer (GstAmcCodec * codec, gint index, GError **err);
 
 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);
@@ -112,13 +109,13 @@
 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, GError **err);
-void gst_amc_format_set_float (GstAmcFormat *format, const gchar *key, gfloat value, GError **err);
+gboolean 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_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_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);
+gboolean gst_amc_format_set_buffer (GstAmcFormat *format, const gchar *key, guint8 *data, gsize size, GError **err);
 
 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);
@@ -150,12 +147,16 @@
 gint gst_amc_avc_profile_from_string (const gchar *profile);
 const gchar * gst_amc_avc_level_to_string (gint level);
 gint gst_amc_avc_level_from_string (const gchar *level);
+const gchar * gst_amc_hevc_profile_to_string (gint profile);
+gint gst_amc_hevc_profile_from_string (const gchar *profile);
+const gchar * gst_amc_hevc_tier_level_to_string (gint tier_level, const gchar ** tier);
+gint gst_amc_hevc_tier_level_from_string (const gchar * tier, const gchar *level);
 gint gst_amc_h263_profile_to_gst_id (gint profile);
 gint gst_amc_h263_profile_from_gst_id (gint profile);
 gint gst_amc_h263_level_to_gst_id (gint level);
 gint gst_amc_h263_level_from_gst_id (gint level);
 const gchar * gst_amc_mpeg4_profile_to_string (gint profile);
-gint gst_amc_avc_mpeg4_profile_from_string (const gchar *profile);
+gint gst_amc_mpeg4_profile_from_string (const gchar *profile);
 const gchar * gst_amc_mpeg4_level_to_string (gint level);
 gint gst_amc_mpeg4_level_from_string (const gchar *level);
 const gchar * gst_amc_aac_profile_to_string (gint profile);
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c
index 5ee745f..bc81907 100644
--- a/sys/androidmedia/gstamcaudiodec.c
+++ b/sys/androidmedia/gstamcaudiodec.c
@@ -7,6 +7,8 @@
  * Copyright (C) 2012, Collabora Ltd.
  *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
  *
+ * Copyright (C) 2015, Sebastian Dröge <sebastian@centricular.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
@@ -43,6 +45,16 @@
 GST_DEBUG_CATEGORY_STATIC (gst_amc_audio_dec_debug_category);
 #define GST_CAT_DEFAULT gst_amc_audio_dec_debug_category
 
+#define GST_AUDIO_DECODER_ERROR_FROM_ERROR(el, err) G_STMT_START { \
+  gchar *__dbg = g_strdup (err->message);                               \
+  GstAudioDecoder *__dec = GST_AUDIO_DECODER (el);                      \
+  GST_WARNING_OBJECT (el, "error: %s", __dbg);                          \
+  _gst_audio_decoder_error (__dec, 1,                                   \
+    err->domain, err->code,                                             \
+    NULL, __dbg, __FILE__, GST_FUNCTION, __LINE__);                     \
+  g_clear_error (&err); \
+} G_STMT_END
+
 /* prototypes */
 static void gst_amc_audio_dec_finalize (GObject * object);
 
@@ -218,6 +230,7 @@
 
   g_mutex_init (&self->drain_lock);
   g_cond_init (&self->drain_cond);
+  self->output_adapter = gst_adapter_new ();
 }
 
 static gboolean
@@ -273,6 +286,10 @@
 {
   GstAmcAudioDec *self = GST_AMC_AUDIO_DEC (object);
 
+  if (self->output_adapter)
+    gst_object_unref (self->output_adapter);
+  self->output_adapter = NULL;
+
   g_mutex_clear (&self->drain_lock);
   g_cond_clear (&self->drain_cond);
 
@@ -393,6 +410,7 @@
 {
   GstFlowReturn flow_ret = GST_FLOW_OK;
   gboolean is_eos;
+  GstAmcBuffer *buf;
   GstAmcBufferInfo buffer_info;
   gint idx;
   GError *err = NULL;
@@ -420,18 +438,10 @@
     }
 
     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;
+      case INFO_OUTPUT_BUFFERS_CHANGED:
+        /* Handled internally */
+        g_assert_not_reached ();
         break;
-      }
       case INFO_OUTPUT_FORMAT_CHANGED:{
         GstAmcFormat *format;
         gchar *format_string;
@@ -456,26 +466,17 @@
         }
         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;
-
         goto retry;
-        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 output buffer");
         goto dequeue_error;
-        break;
+
       default:
         g_assert_not_reached ();
         break;
@@ -485,25 +486,24 @@
   }
 
   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);
+      "Got output buffer at index %d: offset %d size %d time %" G_GINT64_FORMAT
+      " flags 0x%08x", idx, buffer_info.offset, buffer_info.size,
+      buffer_info.presentation_time_us, buffer_info.flags);
 
   is_eos = ! !(buffer_info.flags & BUFFER_FLAG_END_OF_STREAM);
 
+  buf = gst_amc_codec_get_output_buffer (self->codec, idx, &err);
+  if (!buf)
+    goto failed_to_get_output_buffer;
+
   if (buffer_info.size > 0) {
-    GstAmcAudioDecClass *klass = GST_AMC_AUDIO_DEC_GET_CLASS (self);
     GstBuffer *outbuf;
-    GstAmcBuffer *buf;
     GstMapInfo minfo;
-    gint nframes;
 
     /* 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
      */
-    if (idx >= self->n_output_buffers)
-      goto invalid_buffer_index;
 
     if (buffer_info.size % self->info.bpf != 0)
       goto invalid_buffer_size;
@@ -515,7 +515,6 @@
       goto failed_allocate;
 
     gst_buffer_map (outbuf, &minfo, GST_MAP_WRITE);
-    buf = &self->output_buffers[idx];
     if (self->needs_reorder) {
       gint i, n_samples, c, n_channels;
       gint *reorder_map = self->reorder_map;
@@ -536,21 +535,44 @@
     }
     gst_buffer_unmap (outbuf, &minfo);
 
-    nframes = 1;
     if (self->spf != -1) {
-      nframes = buffer_info.size / self->info.bpf;
-      if (nframes % self->spf != 0)
-        GST_WARNING_OBJECT (self, "Output buffer does not contain an integer "
-            "number of input frames (frames: %d, spf: %d)", nframes, self->spf);
-      nframes = (nframes + self->spf - 1) / self->spf;
+      gst_adapter_push (self->output_adapter, outbuf);
+    } else {
+      flow_ret =
+          gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf, 1);
     }
-
-    flow_ret =
-        gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf,
-        nframes);
   }
 
-done:
+  gst_amc_buffer_free (buf);
+  buf = NULL;
+
+  if (self->spf != -1) {
+    GstBuffer *outbuf;
+    guint avail = gst_adapter_available (self->output_adapter);
+    guint nframes;
+
+    /* On EOS we take the complete adapter content, no matter
+     * if it is a multiple of the codec frame size or not.
+     * Otherwise we take a multiple of codec frames and push
+     * them downstream
+     */
+    avail /= self->info.bpf;
+    if (!is_eos) {
+      nframes = avail / self->spf;
+      avail = nframes * self->spf;
+    } else {
+      nframes = (avail + self->spf - 1) / self->spf;
+    }
+    avail *= self->info.bpf;
+
+    if (avail > 0) {
+      outbuf = gst_adapter_take_buffer (self->output_adapter, avail);
+      flow_ret =
+          gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf,
+          nframes);
+    }
+  }
+
   if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
     if (self->flushing) {
       g_clear_error (&err);
@@ -592,16 +614,10 @@
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
-    return;
-  }
-
-get_output_buffers_error:
-  {
-    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;
-    GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -616,15 +632,23 @@
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 failed_release:
   {
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    GST_AUDIO_DECODER_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;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 flushing:
@@ -655,17 +679,24 @@
       gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     }
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
-invalid_buffer_index:
+failed_to_get_output_buffer:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Invalid input buffer index %d of %d", idx, self->n_input_buffers));
+    GST_AUDIO_DECODER_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;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 invalid_buffer_size:
@@ -680,6 +711,10 @@
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -695,6 +730,10 @@
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 }
@@ -706,7 +745,7 @@
 
   self = GST_AMC_AUDIO_DEC (decoder);
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   self->downstream_flow_ret = GST_FLOW_OK;
   self->started = FALSE;
   self->flushing = TRUE;
@@ -731,23 +770,20 @@
     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_AUDIO_DECODER_SRC_PAD (decoder));
 
   memset (self->positions, 0, sizeof (self->positions));
 
+  gst_adapter_flush (self->output_adapter,
+      gst_adapter_available (self->output_adapter));
+
   g_list_foreach (self->codec_datas, (GFunc) g_free, NULL);
   g_list_free (self->codec_datas);
   self->codec_datas = NULL;
 
   self->downstream_flow_ret = GST_FLOW_FLUSHING;
-  self->eos = FALSE;
+  self->drained = TRUE;
   g_mutex_lock (&self->drain_lock);
   self->draining = FALSE;
   g_cond_broadcast (&self->drain_cond);
@@ -905,17 +941,6 @@
     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,
-      &err);
-  if (!self->input_buffers) {
-    GST_ERROR_OBJECT (self, "Failed to get input buffers");
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
-    return FALSE;
-  }
-
   self->spf = -1;
   /* TODO: Implement for other codecs too */
   if (gst_structure_has_name (s, "audio/mpeg")) {
@@ -974,11 +999,13 @@
   gst_amc_codec_flush (self->codec, &err);
   if (err)
     GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  gst_adapter_flush (self->output_adapter,
+      gst_adapter_available (self->output_adapter));
   self->flushing = FALSE;
 
   /* Start the srcpad loop again */
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   self->downstream_flow_ret = GST_FLOW_OK;
   gst_pad_start_task (GST_AUDIO_DECODER_SRC_PAD (self),
       (GstTaskFunction) gst_amc_audio_dec_loop, decoder, NULL);
@@ -1017,13 +1044,6 @@
     return GST_FLOW_NOT_NEGOTIATED;
   }
 
-  if (self->eos) {
-    GST_WARNING_OBJECT (self, "Got frame after EOS");
-    if (inbuf)
-      gst_buffer_unref (inbuf);
-    return GST_FLOW_EOS;
-  }
-
   if (self->flushing)
     goto flushing;
 
@@ -1070,9 +1090,6 @@
       continue;
     }
 
-    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);
@@ -1092,14 +1109,21 @@
 
     /* Copy the buffer content in chunks of size as requested
      * by the port */
-    buf = &self->input_buffers[idx];
+    buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+    if (!buf)
+      goto failed_to_get_input_buffer;
 
     memset (&buffer_info, 0, sizeof (buffer_info));
     buffer_info.offset = 0;
     buffer_info.size = MIN (minfo.size - offset, buf->size);
+    gst_amc_buffer_set_position_and_limit (buf, NULL, buffer_info.offset,
+        buffer_info.size);
 
     orc_memcpy (buf->data, minfo.data + offset, buffer_info.size);
 
+    gst_amc_buffer_free (buf);
+    buf = NULL;
+
     /* Interpolate timestamps if we're passing the buffer
      * in multiple chunks */
     if (offset != 0 && duration != GST_CLOCK_TIME_NONE) {
@@ -1132,6 +1156,7 @@
       }
       goto queue_error;
     }
+    self->drained = FALSE;
   }
   gst_buffer_unmap (inbuf, &minfo);
   gst_buffer_unref (inbuf);
@@ -1148,10 +1173,9 @@
       gst_buffer_unref (inbuf);
     return self->downstream_flow_ret;
   }
-invalid_buffer_index:
+failed_to_get_input_buffer:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Invalid input buffer index %d of %d", idx, self->n_input_buffers));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (inbuf, &minfo);
     if (inbuf)
@@ -1169,7 +1193,7 @@
   }
 queue_error:
   {
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    GST_AUDIO_DECODER_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (inbuf, &minfo);
     if (inbuf)
@@ -1200,9 +1224,9 @@
     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");
+  /* Don't send drain buffer twice, this doesn't work */
+  if (self->drained) {
+    GST_DEBUG_OBJECT (self, "Codec is drained already");
     return GST_FLOW_OK;
   }
 
@@ -1217,41 +1241,53 @@
   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) {
+  if (idx >= 0) {
+    GstAmcBuffer *buf;
     GstAmcBufferInfo buffer_info;
 
-    GST_AUDIO_DECODER_STREAM_UNLOCK (self);
-    g_mutex_lock (&self->drain_lock);
-    self->draining = TRUE;
+    buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+    if (buf) {
+      GST_AUDIO_DECODER_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;
+      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;
+      gst_amc_buffer_set_position_and_limit (buf, NULL, 0, 0);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
+
+      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_ELEMENT_WARNING_FROM_ERROR (self, err);
-        ret = GST_FLOW_ERROR;
+        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_AUDIO_DECODER_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;
+      self->drained = TRUE;
+      self->draining = FALSE;
+      g_mutex_unlock (&self->drain_lock);
+      GST_AUDIO_DECODER_STREAM_LOCK (self);
+    } else {
+      GST_ERROR_OBJECT (self, "Failed to get buffer for EOS: %d", idx);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      ret = GST_FLOW_ERROR;
+    }
   } else {
     GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
     if (err)
@@ -1259,5 +1295,8 @@
     ret = GST_FLOW_ERROR;
   }
 
+  gst_adapter_flush (self->output_adapter,
+      gst_adapter_available (self->output_adapter));
+
   return ret;
 }
diff --git a/sys/androidmedia/gstamcaudiodec.h b/sys/androidmedia/gstamcaudiodec.h
index dc435fe..04e9734 100644
--- a/sys/androidmedia/gstamcaudiodec.h
+++ b/sys/androidmedia/gstamcaudiodec.h
@@ -51,14 +51,15 @@
 
   /* < private > */
   GstAmcCodec *codec;
-  GstAmcBuffer *input_buffers, *output_buffers;
-  gsize n_input_buffers, n_output_buffers;
 
   GstCaps *input_caps;
   GList *codec_datas;
   gboolean input_caps_changed;
   gint spf;
 
+  /* For collecting complete frames for the output */
+  GstAdapter *output_adapter;
+
   /* Output format of the codec */
   GstAudioInfo info;
   /* AMC positions, might need reordering */
@@ -78,9 +79,8 @@
   GCond drain_cond;
   /* TRUE if EOS buffers shouldn't be forwarded */
   gboolean draining;
-
-  /* TRUE if upstream is EOS */
-  gboolean eos;
+  /* TRUE if the component is drained currently */
+  gboolean drained;
 
   GstFlowReturn downstream_flow_ret;
 };
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index dc9a5cd..eb30e7a 100644
--- a/sys/androidmedia/gstamcvideodec.c
+++ b/sys/androidmedia/gstamcvideodec.c
@@ -9,6 +9,8 @@
  *
  * Copyright (C) 2012, Rafaël Carré <funman@videolanorg>
  *
+ * Copyright (C) 2015, Sebastian Dröge <sebastian@centricular.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
@@ -46,6 +48,16 @@
 GST_DEBUG_CATEGORY_STATIC (gst_amc_video_dec_debug_category);
 #define GST_CAT_DEFAULT gst_amc_video_dec_debug_category
 
+#define GST_VIDEO_DECODER_ERROR_FROM_ERROR(el, err) G_STMT_START { \
+  gchar *__dbg = g_strdup (err->message);                               \
+  GstVideoDecoder *__dec = GST_VIDEO_DECODER (el);                      \
+  GST_WARNING_OBJECT (el, "error: %s", __dbg);                          \
+  _gst_video_decoder_error (__dec, 1,                                   \
+    err->domain, err->code,                                             \
+    NULL, __dbg, __FILE__, GST_FUNCTION, __LINE__);                     \
+  g_clear_error (&err); \
+} G_STMT_END
+
 typedef struct _BufferIdentification BufferIdentification;
 struct _BufferIdentification
 {
@@ -88,8 +100,7 @@
 static gboolean gst_amc_video_dec_decide_allocation (GstVideoDecoder * bdec,
     GstQuery * query);
 
-static GstFlowReturn gst_amc_video_dec_drain (GstAmcVideoDec * self,
-    gboolean at_eos);
+static GstFlowReturn gst_amc_video_dec_drain (GstAmcVideoDec * self);
 
 enum
 {
@@ -161,6 +172,8 @@
     return "video/3gpp";
   } else if (strcmp (name, "video/x-h264") == 0) {
     return "video/avc";
+  } else if (strcmp (name, "video/x-h265") == 0) {
+    return "video/hevc";
   } else if (strcmp (name, "video/x-vp8") == 0) {
     return "video/x-vnd.on2.vp8";
   } else if (strcmp (name, "video/x-divx") == 0) {
@@ -548,27 +561,18 @@
 }
 
 static gboolean
-gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
+gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, GstAmcBuffer * buf,
     const GstAmcBufferInfo * buffer_info, GstBuffer * outbuf)
 {
-  GstAmcBuffer *buf;
   GstVideoCodecState *state =
       gst_video_decoder_get_output_state (GST_VIDEO_DECODER (self));
   GstVideoInfo *info = &state->info;
   gboolean ret = FALSE;
 
-  if (idx >= self->n_output_buffers) {
-    GST_ERROR_OBJECT (self, "Invalid output buffer index %d of %d",
-        idx, self->n_output_buffers);
-    goto done;
-  }
-  buf = &self->output_buffers[idx];
-
   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);
   return ret;
 }
@@ -580,6 +584,7 @@
   GstFlowReturn flow_ret = GST_FLOW_OK;
   GstClockTimeDiff deadline;
   gboolean is_eos;
+  GstAmcBuffer *buf;
   GstAmcBufferInfo buffer_info;
   gint idx;
   GError *err = NULL;
@@ -607,18 +612,10 @@
     }
 
     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;
+      case INFO_OUTPUT_BUFFERS_CHANGED:
+        /* Handled internally */
+        g_assert_not_reached ();
         break;
-      }
       case INFO_OUTPUT_FORMAT_CHANGED:{
         GstAmcFormat *format;
         gchar *format_string;
@@ -643,26 +640,14 @@
         }
         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;
-
         goto retry;
-        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 output buffer");
         goto dequeue_error;
-        break;
       default:
         g_assert_not_reached ();
         break;
@@ -672,9 +657,9 @@
   }
 
   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);
+      "Got output buffer at index %d: offset %d size %d time %" G_GINT64_FORMAT
+      " flags 0x%08x", idx, buffer_info.offset, buffer_info.size,
+      buffer_info.presentation_time_us, buffer_info.flags);
 
   frame =
       _find_nearest_frame (self,
@@ -682,6 +667,10 @@
 
   is_eos = ! !(buffer_info.flags & BUFFER_FLAG_END_OF_STREAM);
 
+  buf = gst_amc_codec_get_output_buffer (self->codec, idx, &err);
+  if (!buf)
+    goto failed_to_get_output_buffer;
+
   if (frame
       && (deadline =
           gst_video_decoder_get_max_decode_time (GST_VIDEO_DECODER (self),
@@ -702,7 +691,7 @@
     outbuf =
         gst_video_decoder_allocate_output_buffer (GST_VIDEO_DECODER (self));
 
-    if (!gst_amc_video_dec_fill_buffer (self, idx, &buffer_info, outbuf)) {
+    if (!gst_amc_video_dec_fill_buffer (self, buf, &buffer_info, outbuf)) {
       gst_buffer_unref (outbuf);
       if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err))
         GST_ERROR_OBJECT (self, "Failed to release output buffer index %d",
@@ -710,6 +699,8 @@
       if (err && !self->flushing)
         GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       g_clear_error (&err);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
       goto invalid_buffer;
     }
 
@@ -727,10 +718,12 @@
       if (err && !self->flushing)
         GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       g_clear_error (&err);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
       goto flow_error;
     }
 
-    if (!gst_amc_video_dec_fill_buffer (self, idx, &buffer_info,
+    if (!gst_amc_video_dec_fill_buffer (self, buf, &buffer_info,
             frame->output_buffer)) {
       gst_buffer_replace (&frame->output_buffer, NULL);
       gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
@@ -740,6 +733,8 @@
       if (err && !self->flushing)
         GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       g_clear_error (&err);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
       goto invalid_buffer;
     }
 
@@ -748,6 +743,9 @@
     flow_ret = gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
   }
 
+  gst_amc_buffer_free (buf);
+  buf = NULL;
+
   if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
     if (self->flushing) {
       g_clear_error (&err);
@@ -789,16 +787,10 @@
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
-    return;
-  }
-
-get_output_buffers_error:
-  {
-    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;
-    GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -813,15 +805,23 @@
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 failed_release:
   {
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    GST_VIDEO_DECODER_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;
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 flushing:
@@ -852,6 +852,24 @@
       gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     }
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
+    return;
+  }
+
+failed_to_get_output_buffer:
+  {
+    GST_VIDEO_DECODER_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;
+    GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -863,6 +881,10 @@
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_NOT_NEGOTIATED;
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 }
@@ -874,7 +896,7 @@
 
   self = GST_AMC_VIDEO_DEC (decoder);
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   self->downstream_flow_ret = GST_FLOW_OK;
   self->started = FALSE;
   self->flushing = TRUE;
@@ -899,17 +921,11 @@
     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_DECODER_SRC_PAD (decoder));
 
   self->downstream_flow_ret = GST_FLOW_FLUSHING;
-  self->eos = FALSE;
+  self->drained = TRUE;
   g_mutex_lock (&self->drain_lock);
   self->draining = FALSE;
   g_cond_broadcast (&self->drain_cond);
@@ -983,7 +999,7 @@
   }
 
   if (needs_disable && is_format_change) {
-    gst_amc_video_dec_drain (self, FALSE);
+    gst_amc_video_dec_drain (self);
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
     gst_amc_video_dec_stop (GST_VIDEO_DECODER (self));
     GST_VIDEO_DECODER_STREAM_LOCK (self);
@@ -1050,17 +1066,6 @@
     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,
-      &err);
-  if (!self->input_buffers) {
-    GST_ERROR_OBJECT (self, "Failed to get input buffers");
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
-    return FALSE;
-  }
-
   self->started = TRUE;
   self->input_state = gst_video_codec_state_ref (state);
   self->input_state_changed = TRUE;
@@ -1104,7 +1109,7 @@
 
   /* Start the srcpad loop again */
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   self->downstream_flow_ret = GST_FLOW_OK;
   gst_pad_start_task (GST_VIDEO_DECODER_SRC_PAD (self),
       (GstTaskFunction) gst_amc_video_dec_loop, decoder, NULL);
@@ -1139,12 +1144,6 @@
     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;
 
@@ -1188,9 +1187,6 @@
       continue;
     }
 
-    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);
@@ -1210,14 +1206,21 @@
 
     /* Copy the buffer content in chunks of size as requested
      * by the port */
-    buf = &self->input_buffers[idx];
+    buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+    if (!buf)
+      goto failed_to_get_input_buffer;
 
     memset (&buffer_info, 0, sizeof (buffer_info));
     buffer_info.offset = 0;
     buffer_info.size = MIN (minfo.size - offset, buf->size);
+    gst_amc_buffer_set_position_and_limit (buf, NULL, buffer_info.offset,
+        buffer_info.size);
 
     orc_memcpy (buf->data, minfo.data + offset, buffer_info.size);
 
+    gst_amc_buffer_free (buf);
+    buf = NULL;
+
     /* Interpolate timestamps if we're passing the buffer
      * in multiple chunks */
     if (offset != 0 && duration != GST_CLOCK_TIME_NONE) {
@@ -1254,6 +1257,7 @@
       }
       goto queue_error;
     }
+    self->drained = FALSE;
   }
 
   gst_buffer_unmap (frame->input_buffer, &minfo);
@@ -1270,10 +1274,9 @@
     gst_video_codec_frame_unref (frame);
     return self->downstream_flow_ret;
   }
-invalid_buffer_index:
+failed_to_get_input_buffer:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Invalid input buffer index %d of %d", idx, self->n_input_buffers));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (frame->input_buffer, &minfo);
     gst_video_codec_frame_unref (frame);
@@ -1289,7 +1292,7 @@
   }
 queue_error:
   {
-    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    GST_VIDEO_DECODER_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (frame->input_buffer, &minfo);
     gst_video_codec_frame_unref (frame);
@@ -1312,11 +1315,11 @@
 
   self = GST_AMC_VIDEO_DEC (decoder);
 
-  return gst_amc_video_dec_drain (self, TRUE);
+  return gst_amc_video_dec_drain (self);
 }
 
 static GstFlowReturn
-gst_amc_video_dec_drain (GstAmcVideoDec * self, gboolean at_eos)
+gst_amc_video_dec_drain (GstAmcVideoDec * self)
 {
   GstFlowReturn ret;
   gint idx;
@@ -1328,13 +1331,11 @@
     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");
+  /* Don't send drain buffer twice, this doesn't work */
+  if (self->drained) {
+    GST_DEBUG_OBJECT (self, "Codec is drained already");
     return GST_FLOW_OK;
   }
-  if (at_eos)
-    self->eos = TRUE;
 
   /* Make sure to release the base class stream lock, otherwise
    * _loop() can't call _finish_frame() and we might block forever
@@ -1347,41 +1348,53 @@
   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) {
+  if (idx >= 0) {
+    GstAmcBuffer *buf;
     GstAmcBufferInfo buffer_info;
 
-    GST_VIDEO_DECODER_STREAM_UNLOCK (self);
-    g_mutex_lock (&self->drain_lock);
-    self->draining = TRUE;
+    buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+    if (buf) {
+      GST_VIDEO_DECODER_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;
+      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;
+      gst_amc_buffer_set_position_and_limit (buf, NULL, 0, 0);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
+
+      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_ELEMENT_WARNING_FROM_ERROR (self, err);
-        ret = GST_FLOW_ERROR;
+        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_DECODER_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;
+      self->drained = TRUE;
+      self->draining = FALSE;
+      g_mutex_unlock (&self->drain_lock);
+      GST_VIDEO_DECODER_STREAM_LOCK (self);
+    } else {
+      GST_ERROR_OBJECT (self, "Failed to get buffer for EOS: %d", idx);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      ret = GST_FLOW_ERROR;
+    }
   } else {
     GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
     if (err)
diff --git a/sys/androidmedia/gstamcvideodec.h b/sys/androidmedia/gstamcvideodec.h
index e5efcae..c6c2b4f 100644
--- a/sys/androidmedia/gstamcvideodec.h
+++ b/sys/androidmedia/gstamcvideodec.h
@@ -51,8 +51,6 @@
 
   /* < private > */
   GstAmcCodec *codec;
-  GstAmcBuffer *input_buffers, *output_buffers;
-  gsize n_input_buffers, n_output_buffers;
 
   GstVideoCodecState *input_state;
   gboolean input_state_changed;
@@ -75,9 +73,8 @@
   GCond drain_cond;
   /* TRUE if EOS buffers shouldn't be forwarded */
   gboolean draining;
-
-  /* TRUE if upstream is EOS */
-  gboolean eos;
+  /* TRUE if the component is drained currently */
+  gboolean drained;
 
   GstFlowReturn downstream_flow_ret;
 };
diff --git a/sys/androidmedia/gstamcvideoenc.c b/sys/androidmedia/gstamcvideoenc.c
index 3a0a7a1..4a42a30 100644
--- a/sys/androidmedia/gstamcvideoenc.c
+++ b/sys/androidmedia/gstamcvideoenc.c
@@ -10,6 +10,8 @@
  * Copyright (C) 2013, Lemote Ltd.
  *   Author: Chen Jie <chenj@lemote.com>
  *
+ * Copyright (C) 2015, Sebastian Dröge <sebastian@centricular.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
@@ -183,7 +185,7 @@
 
       if (profile_string) {
         amc_profile.key = "profile";    /* named profile ? */
-        amc_profile.id = gst_amc_avc_mpeg4_profile_from_string (profile_string);
+        amc_profile.id = gst_amc_mpeg4_profile_from_string (profile_string);
       }
 
       if (level_string) {
@@ -259,9 +261,8 @@
     /* 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);
+  gst_amc_format_set_int (format, "i-frame-interval", encoder->i_frame_int,
+      &err);
   if (err)
     GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
 
@@ -982,15 +983,6 @@
 
       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;
 
@@ -998,18 +990,10 @@
     }
 
     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;
+      case INFO_OUTPUT_BUFFERS_CHANGED:
+        /* Handled internally */
+        g_assert_not_reached ();
         break;
-      }
       case INFO_TRY_AGAIN_LATER:
         GST_DEBUG_OBJECT (self, "Dequeueing output buffer timed out");
         goto retry;
@@ -1038,17 +1022,16 @@
 
   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];
+  buf = gst_amc_codec_get_output_buffer (self->codec, idx, &err);
+  if (!buf)
+    goto failed_to_get_output_buffer;
 
   flow_ret =
       gst_amc_video_enc_handle_output_frame (self, buf, &buffer_info, frame);
 
+  gst_amc_buffer_free (buf);
+  buf = NULL;
+
   if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
     if (self->flushing) {
       g_clear_error (&err);
@@ -1090,16 +1073,10 @@
     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);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
@@ -1114,6 +1091,10 @@
     gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 failed_release:
@@ -1123,6 +1104,10 @@
     gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
     GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 flushing:
@@ -1150,17 +1135,24 @@
       gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
     }
     GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 
-invalid_buffer:
+failed_to_get_output_buffer:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, SETTINGS, (NULL),
-        ("Invalid sized input buffer"));
+    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_NOT_NEGOTIATED;
     GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = FALSE;
+    g_cond_broadcast (&self->drain_cond);
+    g_mutex_unlock (&self->drain_lock);
     return;
   }
 }
@@ -1172,7 +1164,7 @@
 
   self = GST_AMC_VIDEO_ENC (encoder);
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   self->downstream_flow_ret = GST_FLOW_OK;
   self->started = FALSE;
   self->flushing = TRUE;
@@ -1197,17 +1189,11 @@
     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;
+  self->drained = TRUE;
   g_mutex_lock (&self->drain_lock);
   self->draining = FALSE;
   g_cond_broadcast (&self->drain_cond);
@@ -1317,17 +1303,6 @@
     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;
 
@@ -1384,7 +1359,7 @@
 
   /* Start the srcpad loop again */
   self->last_upstream_ts = 0;
-  self->eos = FALSE;
+  self->drained = TRUE;
   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);
@@ -1416,12 +1391,6 @@
     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;
 
@@ -1463,9 +1432,6 @@
     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);
@@ -1485,11 +1451,15 @@
 
   /* Copy the buffer content in chunks of size as requested
    * by the port */
-  buf = &self->input_buffers[idx];
+  buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+  if (!buf)
+    goto failed_to_get_input_buffer;
 
   memset (&buffer_info, 0, sizeof (buffer_info));
   buffer_info.offset = 0;
   buffer_info.size = MIN (self->color_format_info.frame_size, buf->size);
+  gst_amc_buffer_set_position_and_limit (buf, NULL, buffer_info.offset,
+      buffer_info.size);
 
   if (!gst_amc_video_enc_fill_buffer (self, frame->input_buffer, buf,
           &buffer_info)) {
@@ -1498,9 +1468,14 @@
     if (err && !self->flushing)
       GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     g_clear_error (&err);
+    gst_amc_buffer_free (buf);
+    buf = NULL;
     goto buffer_fill_error;
   }
 
+  gst_amc_buffer_free (buf);
+  buf = NULL;
+
   if (timestamp != GST_CLOCK_TIME_NONE) {
     buffer_info.presentation_time_us =
         gst_util_uint64_scale (timestamp + timestamp_offset, 1, GST_USECOND);
@@ -1527,6 +1502,8 @@
     goto queue_error;
   }
 
+  self->drained = FALSE;
+
   gst_video_codec_frame_unref (frame);
 
   return self->downstream_flow_ret;
@@ -1539,10 +1516,9 @@
     gst_video_codec_frame_unref (frame);
     return self->downstream_flow_ret;
   }
-invalid_buffer_index:
+failed_to_get_input_buffer:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Invalid input buffer index %d of %d", idx, self->n_input_buffers));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_video_codec_frame_unref (frame);
     return GST_FLOW_ERROR;
   }
@@ -1578,57 +1554,10 @@
 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;
+  return gst_amc_video_enc_drain (self);
 }
 
 static GstFlowReturn
@@ -1644,9 +1573,9 @@
     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");
+  /* Don't send drain buffer twice, this doesn't work */
+  if (self->drained) {
+    GST_DEBUG_OBJECT (self, "Codec is drained already");
     return GST_FLOW_OK;
   }
 
@@ -1661,41 +1590,53 @@
   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) {
+  if (idx >= 0) {
+    GstAmcBuffer *buf;
     GstAmcBufferInfo buffer_info;
 
-    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
-    g_mutex_lock (&self->drain_lock);
-    self->draining = TRUE;
+    buf = gst_amc_codec_get_input_buffer (self->codec, idx, &err);
+    if (buf) {
+      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;
+      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;
+      gst_amc_buffer_set_position_and_limit (buf, NULL, 0, 0);
+      gst_amc_buffer_free (buf);
+      buf = NULL;
+
+      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_ELEMENT_WARNING_FROM_ERROR (self, err);
-        ret = GST_FLOW_ERROR;
+        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;
+      self->drained = TRUE;
+      self->draining = FALSE;
+      g_mutex_unlock (&self->drain_lock);
+      GST_VIDEO_ENCODER_STREAM_LOCK (self);
+    } else {
+      GST_ERROR_OBJECT (self, "Failed to get buffer for EOS: %d", idx);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      ret = GST_FLOW_ERROR;
+    }
   } else {
     GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
     if (err)
diff --git a/sys/androidmedia/gstamcvideoenc.h b/sys/androidmedia/gstamcvideoenc.h
index 8373ce3..f169248 100644
--- a/sys/androidmedia/gstamcvideoenc.h
+++ b/sys/androidmedia/gstamcvideoenc.h
@@ -53,8 +53,6 @@
 
   /* < private > */
   GstAmcCodec *codec;
-  GstAmcBuffer *input_buffers, *output_buffers;
-  gsize n_input_buffers, n_output_buffers;
   GstAmcFormat *amc_format;
 
   GstVideoCodecState *input_state;
@@ -78,9 +76,8 @@
   GCond drain_cond;
   /* TRUE if EOS buffers shouldn't be forwarded */
   gboolean draining;
-
-  /* TRUE if upstream is EOS */
-  gboolean eos;
+  /* TRUE if the component is drained */
+  gboolean drained;
 
   GstFlowReturn downstream_flow_ret;
 };
diff --git a/sys/androidmedia/gstjniutils.c b/sys/androidmedia/gstjniutils.c
new file mode 100644
index 0000000..f936027
--- /dev/null
+++ b/sys/androidmedia/gstjniutils.c
@@ -0,0 +1,1100 @@
+/*
+ * Copyright (C) 2012, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * Copyright (C) 2013, Fluendo S.A.
+ *   Author: Andoni Morales <amorales@fluendo.com>
+ * Copyright (C) 2014, Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2014, Collabora Ltd.
+ *   Author: Matthieu Bouron <matthieu.bouron@collabora.com>
+ * Copyright (C) 2015, Sebastian Dröge <sebastian@centricular.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 <pthread.h>
+#include <gmodule.h>
+
+#include "gstjniutils.h"
+
+static GModule *java_module;
+static jint (*get_created_java_vms) (JavaVM ** vmBuf, jsize bufLen,
+    jsize * nVMs);
+static jint (*create_java_vm) (JavaVM ** p_vm, JNIEnv ** p_env, void *vm_args);
+static JavaVM *java_vm;
+static gboolean started_java_vm = FALSE;
+static pthread_key_t current_jni_env;
+
+static struct
+{
+  jclass klass;
+  jmethodID get_limit, get_position;
+  jmethodID set_limit, set_position;
+  jmethodID clear;
+} java_nio_buffer;
+
+jclass
+gst_amc_jni_get_class (JNIEnv * env, GError ** err, const gchar * name)
+{
+  jclass tmp, ret = NULL;
+
+  GST_DEBUG ("Retrieving Java class %s", name);
+
+  tmp = (*env)->FindClass (env, name);
+  if ((*env)->ExceptionCheck (env) || !tmp) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to find class %s", name);
+    goto done;
+  }
+
+  ret = (*env)->NewGlobalRef (env, tmp);
+  if (!ret) {
+    GST_ERROR ("Failed to get %s class global reference", name);
+  }
+
+done:
+  if (tmp)
+    (*env)->DeleteLocalRef (env, tmp);
+  tmp = NULL;
+
+  return ret;
+}
+
+jmethodID
+gst_amc_jni_get_method_id (JNIEnv * env, GError ** err, jclass klass,
+    const gchar * name, const gchar * signature)
+{
+  jmethodID ret;
+
+  ret = (*env)->GetMethodID (env, klass, name, signature);
+  if ((*env)->ExceptionCheck (env) || !ret) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get method ID %s (%s)", name,
+        signature);
+  }
+  return ret;
+}
+
+jmethodID
+gst_amc_jni_get_static_method_id (JNIEnv * env, GError ** err, jclass klass,
+    const gchar * name, const gchar * signature)
+{
+  jmethodID ret;
+
+  ret = (*env)->GetStaticMethodID (env, klass, name, signature);
+  if ((*env)->ExceptionCheck (env) || !ret) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get static method ID %s (%s)",
+        name, signature);
+  }
+  return ret;
+}
+
+jfieldID
+gst_amc_jni_get_field_id (JNIEnv * env, GError ** err, jclass klass,
+    const gchar * name, const gchar * type)
+{
+  jfieldID ret;
+
+  ret = (*env)->GetFieldID (env, klass, name, type);
+  if ((*env)->ExceptionCheck (env) || !ret) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get field ID %s (%s)", name, type);
+  }
+  return ret;
+}
+
+jfieldID
+gst_amc_jni_get_static_field_id (JNIEnv * env, GError ** err, jclass klass,
+    const gchar * name, const gchar * type)
+{
+  jfieldID ret;
+
+  ret = (*env)->GetStaticFieldID (env, klass, name, type);
+  if ((*env)->ExceptionCheck (env) || !ret) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to get static field ID %s (%s)", name,
+        type);
+  }
+  return ret;
+}
+
+jobject
+gst_amc_jni_new_object (JNIEnv * env, GError ** err, gboolean global,
+    jclass klass, jmethodID constructor, ...)
+{
+  jobject tmp;
+  va_list args;
+
+  va_start (args, constructor);
+  tmp = (*env)->NewObjectV (env, klass, constructor, args);
+  va_end (args);
+
+  if ((*env)->ExceptionCheck (env) || !tmp) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to create object");
+    return NULL;
+  }
+
+  if (global)
+    return gst_amc_jni_object_make_global (env, tmp);
+  else
+    return tmp;
+}
+
+jobject
+gst_amc_jni_new_object_from_static (JNIEnv * env, GError ** err,
+    gboolean global, jclass klass, jmethodID method, ...)
+{
+  jobject tmp;
+  va_list args;
+
+  va_start (args, method);
+  tmp = (*env)->CallStaticObjectMethodV (env, klass, method, args);
+  va_end (args);
+
+  if ((*env)->ExceptionCheck (env) || !tmp) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to create object");
+    return NULL;
+  }
+
+  if (global)
+    return gst_amc_jni_object_make_global (env, tmp);
+  else
+    return tmp;
+}
+
+jobject
+gst_amc_jni_object_make_global (JNIEnv * env, jobject object)
+{
+  jobject ret;
+
+  ret = (*env)->NewGlobalRef (env, object);
+  if (!ret) {
+    GST_ERROR ("Failed to create global reference");
+  }
+  gst_amc_jni_object_local_unref (env, object);
+
+  return ret;
+}
+
+jobject
+gst_amc_jni_object_ref (JNIEnv * env, jobject object)
+{
+  jobject ret;
+
+  ret = (*env)->NewGlobalRef (env, object);
+  if (!ret) {
+    GST_ERROR ("Failed to create global reference");
+  }
+  return ret;
+}
+
+void
+gst_amc_jni_object_unref (JNIEnv * env, jobject object)
+{
+  (*env)->DeleteGlobalRef (env, object);
+}
+
+void
+gst_amc_jni_object_local_unref (JNIEnv * env, jobject object)
+{
+  (*env)->DeleteLocalRef (env, object);
+}
+
+jstring
+gst_amc_jni_string_from_gchar (JNIEnv * env, GError ** err,
+    gboolean global, const gchar * string)
+{
+  jstring tmp;
+
+  tmp = (*env)->NewStringUTF (env, string);
+  if ((*env)->ExceptionCheck (env)) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to call Java method");
+    tmp = NULL;
+  }
+
+  if (global)
+    return gst_amc_jni_object_make_global (env, tmp);
+  else
+    return tmp;
+}
+
+gchar *
+gst_amc_jni_string_to_gchar (JNIEnv * env, jstring string, gboolean release)
+{
+  const gchar *s = NULL;
+  gchar *ret = NULL;
+
+  s = (*env)->GetStringUTFChars (env, string, NULL);
+  if (!s) {
+    GST_ERROR ("Failed to convert string to UTF8");
+    goto done;
+  }
+
+  ret = g_strdup (s);
+  (*env)->ReleaseStringUTFChars (env, string, s);
+
+done:
+  if (release) {
+    (*env)->DeleteLocalRef (env, string);
+  }
+  return ret;
+}
+
+/* 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);
+}
+
+static JNIEnv *
+gst_amc_jni_attach_current_thread (void)
+{
+  JNIEnv *env;
+  JavaVMAttachArgs args;
+  gint ret;
+
+  GST_DEBUG ("Attaching thread %p", g_thread_self ());
+  args.version = JNI_VERSION_1_6;
+  args.name = NULL;
+  args.group = NULL;
+
+  if ((ret = (*java_vm)->AttachCurrentThread (java_vm, &env, &args)) != JNI_OK) {
+    GST_ERROR ("Failed to attach current thread: %d", ret);
+    return NULL;
+  }
+
+  return env;
+}
+
+static void
+gst_amc_jni_detach_current_thread (void *env)
+{
+  gint ret;
+
+  GST_DEBUG ("Detaching thread %p", g_thread_self ());
+  if ((ret = (*java_vm)->DetachCurrentThread (java_vm)) != JNI_OK) {
+    GST_DEBUG ("Failed to detach current thread: %d", ret);
+  }
+}
+
+static gboolean
+check_nativehelper (void)
+{
+  GModule *module;
+  void **jni_invocation = NULL;
+  gboolean ret = FALSE;
+
+  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;
+
+  if (!g_module_symbol (java_module, "JNI_CreateJavaVM",
+          (gpointer *) & create_java_vm)) {
+    GST_ERROR ("Could not find 'JNI_CreateJavaVM' in '%s': %s",
+        GST_STR_NULL (name), g_module_error ());
+    create_java_vm = NULL;
+  }
+
+  if (!g_module_symbol (java_module, "JNI_GetCreatedJavaVMs",
+          (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_classes (void)
+{
+  JNIEnv *env;
+  GError *err = NULL;
+
+  env = gst_amc_jni_get_env ();
+
+  java_nio_buffer.klass = gst_amc_jni_get_class (env, &err, "java/nio/Buffer");
+  if (!java_nio_buffer.klass) {
+    GST_ERROR ("Failed to get java.nio.Buffer class: %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  java_nio_buffer.get_limit =
+      gst_amc_jni_get_method_id (env, &err, java_nio_buffer.klass, "limit",
+      "()I");
+  if (!java_nio_buffer.get_limit) {
+    GST_ERROR ("Failed to get java.nio.Buffer limit(): %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  java_nio_buffer.get_position =
+      gst_amc_jni_get_method_id (env, &err, java_nio_buffer.klass, "position",
+      "()I");
+  if (!java_nio_buffer.get_position) {
+    GST_ERROR ("Failed to get java.nio.Buffer position(): %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  java_nio_buffer.set_limit =
+      gst_amc_jni_get_method_id (env, &err, java_nio_buffer.klass, "limit",
+      "(I)Ljava/nio/Buffer;");
+  if (!java_nio_buffer.set_limit) {
+    GST_ERROR ("Failed to get java.nio.Buffer limit(): %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  java_nio_buffer.set_position =
+      gst_amc_jni_get_method_id (env, &err, java_nio_buffer.klass, "position",
+      "(I)Ljava/nio/Buffer;");
+  if (!java_nio_buffer.set_position) {
+    GST_ERROR ("Failed to get java.nio.Buffer position(): %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  java_nio_buffer.clear =
+      gst_amc_jni_get_method_id (env, &err, java_nio_buffer.klass, "clear",
+      "()Ljava/nio/Buffer;");
+  if (!java_nio_buffer.clear) {
+    GST_ERROR ("Failed to get java.nio.Buffer clear(): %s", err->message);
+    g_clear_error (&err);
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+static gboolean
+gst_amc_jni_initialize_java_vm (void)
+{
+  jsize n_vms;
+  gint ret;
+
+  if (java_vm) {
+    GST_DEBUG ("Java VM already provided by the application");
+    return initialize_classes ();
+  }
+
+  /* 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 ((ret = get_created_java_vms (&java_vm, 1, &n_vms)) != JNI_OK)
+    goto get_created_failed;
+
+  if (n_vms > 0) {
+    GST_DEBUG ("Successfully got existing Java VM %p", java_vm);
+  } else if (create_java_vm) {
+    JNIEnv *env;
+    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";
+    options[3].optionString = "-Xdebug";
+
+    vm_args.version = JNI_VERSION_1_4;
+    vm_args.options = options;
+    vm_args.nOptions = 4;
+    vm_args.ignoreUnrecognized = JNI_TRUE;
+    if ((ret = create_java_vm (&java_vm, &env, &vm_args)) != JNI_OK)
+      goto create_failed;
+    GST_DEBUG ("Successfully created Java VM %p", java_vm);
+
+    started_java_vm = TRUE;
+  } else {
+    GST_ERROR ("JNI_CreateJavaVM not available");
+    java_vm = NULL;
+  }
+
+  if (java_vm == NULL)
+    return FALSE;
+
+  return initialize_classes ();
+
+get_created_failed:
+  {
+    GST_ERROR ("Failed to get already created VMs: %d", ret);
+    g_module_close (java_module);
+    java_module = NULL;
+    return FALSE;
+  }
+create_failed:
+  {
+    GST_ERROR ("Failed to create a Java VM: %d", ret);
+    g_module_close (java_module);
+    java_module = NULL;
+    return FALSE;
+  }
+}
+
+static void
+gst_amc_jni_set_error_string (JNIEnv * env, GError ** err, GQuark domain,
+    gint code, 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)
+     void gst_amc_jni_set_error (JNIEnv * env, GError ** err, GQuark domain,
+    gint code, 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_jni_set_error_string (env, err, domain, code, message);
+
+  g_free (message);
+}
+
+static gpointer
+gst_amc_jni_initialize_internal (gpointer data)
+{
+  pthread_key_create (&current_jni_env, gst_amc_jni_detach_current_thread);
+  return gst_amc_jni_initialize_java_vm ()? GINT_TO_POINTER (1) : NULL;
+}
+
+/* Allow the application to set the Java VM */
+void
+gst_amc_jni_set_java_vm (JavaVM * vm)
+{
+  GST_DEBUG ("Application provides Java VM %p", vm);
+  java_vm = vm;
+}
+
+gboolean
+gst_amc_jni_initialize (void)
+{
+  GOnce once = G_ONCE_INIT;
+
+  g_once (&once, gst_amc_jni_initialize_internal, NULL);
+  return once.retval != NULL;
+}
+
+JNIEnv *
+gst_amc_jni_get_env (void)
+{
+  JNIEnv *env;
+
+  if ((env = pthread_getspecific (current_jni_env)) == NULL) {
+    env = gst_amc_jni_attach_current_thread ();
+    pthread_setspecific (current_jni_env, env);
+  }
+
+  return env;
+}
+
+gboolean
+gst_amc_jni_is_vm_started (void)
+{
+  return started_java_vm;
+}
+
+#define CALL_STATIC_TYPE_METHOD(_type, _name,  _jname)                                                     \
+gboolean gst_amc_jni_call_static_##_name##_method (JNIEnv *env, GError ** err, jclass klass, jmethodID methodID, _type * value, ...)   \
+  {                                                                                                          \
+    gboolean ret = TRUE;                                                                                     \
+    va_list args;                                                                                            \
+    va_start(args, value);                                                                                \
+    *value = (*env)->CallStatic##_jname##MethodV(env, klass, methodID, args);                                \
+    if ((*env)->ExceptionCheck (env)) {                                                                      \
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED,                               \
+          "Failed to call static Java method");                                                         \
+      ret = FALSE;                                                                                           \
+    }                                                                                                        \
+    va_end(args);                                                                                            \
+    return ret;                                                                                              \
+  }
+
+CALL_STATIC_TYPE_METHOD (gboolean, boolean, Boolean);
+CALL_STATIC_TYPE_METHOD (gint8, byte, Byte);
+CALL_STATIC_TYPE_METHOD (gshort, short, Short);
+CALL_STATIC_TYPE_METHOD (gint, int, Int);
+CALL_STATIC_TYPE_METHOD (gchar, char, Char);
+CALL_STATIC_TYPE_METHOD (gint64, long, Long);
+CALL_STATIC_TYPE_METHOD (gfloat, float, Float);
+CALL_STATIC_TYPE_METHOD (gdouble, double, Double);
+CALL_STATIC_TYPE_METHOD (jobject, object, Object);
+
+gboolean
+gst_amc_jni_call_static_void_method (JNIEnv * env, GError ** err, jclass klass,
+    jmethodID methodID, ...)
+{
+  gboolean ret = TRUE;
+  va_list args;
+  va_start (args, methodID);
+
+  (*env)->CallStaticVoidMethodV (env, klass, methodID, args);
+  if ((*env)->ExceptionCheck (env)) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to call static Java method");
+    ret = FALSE;
+  }
+  va_end (args);
+  return ret;
+}
+
+#define CALL_TYPE_METHOD(_type, _name,  _jname)                                                              \
+gboolean gst_amc_jni_call_##_name##_method (JNIEnv *env, GError ** err, jobject obj, jmethodID methodID, _type *value, ...)   \
+  {                                                                                                          \
+    gboolean ret = TRUE;                                                                                     \
+    va_list args;                                                                                            \
+    va_start(args, value);                                                                                \
+    *value = (*env)->Call##_jname##MethodV(env, obj, methodID, args);                                        \
+    if ((*env)->ExceptionCheck (env)) {                                                                      \
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED,                               \
+          "Failed to call Java method");                                                                \
+      ret = FALSE;                                                                                           \
+    }                                                                                                        \
+    va_end(args);                                                                                            \
+    return ret;                                                                                              \
+  }
+
+CALL_TYPE_METHOD (gboolean, boolean, Boolean);
+CALL_TYPE_METHOD (gint8, byte, Byte);
+CALL_TYPE_METHOD (gshort, short, Short);
+CALL_TYPE_METHOD (gint, int, Int);
+CALL_TYPE_METHOD (gchar, char, Char);
+CALL_TYPE_METHOD (gint64, long, Long);
+CALL_TYPE_METHOD (gfloat, float, Float);
+CALL_TYPE_METHOD (gdouble, double, Double);
+CALL_TYPE_METHOD (jobject, object, Object);
+
+gboolean
+gst_amc_jni_call_void_method (JNIEnv * env, GError ** err, jobject obj,
+    jmethodID methodID, ...)
+{
+  gboolean ret = TRUE;
+  va_list args;
+  va_start (args, methodID);
+
+  (*env)->CallVoidMethodV (env, obj, methodID, args);
+  if ((*env)->ExceptionCheck (env)) {
+    gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+        GST_LIBRARY_ERROR_FAILED, "Failed to call Java method");
+    ret = FALSE;
+  }
+  va_end (args);
+  return ret;
+}
+
+#define GET_TYPE_FIELD(_type, _name, _jname)                                               \
+gboolean gst_amc_jni_get_##_name##_field (JNIEnv *env, GError ** err, jobject obj, jfieldID fieldID, _type *value)   \
+  {                                                                                                 \
+    gboolean ret = TRUE;                                                                            \
+                                                                                                    \
+    *value = (*env)->Get##_jname##Field(env, obj, fieldID);                                         \
+    if ((*env)->ExceptionCheck (env)) {                                                             \
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED,                      \
+          "Failed to get Java field");                                                         \
+      ret = FALSE;                                                                                  \
+    }                                                                                               \
+    return ret;                                                                                     \
+  }
+
+GET_TYPE_FIELD (gboolean, boolean, Boolean);
+GET_TYPE_FIELD (gint8, byte, Byte);
+GET_TYPE_FIELD (gshort, short, Short);
+GET_TYPE_FIELD (gint, int, Int);
+GET_TYPE_FIELD (gchar, char, Char);
+GET_TYPE_FIELD (gint64, long, Long);
+GET_TYPE_FIELD (gfloat, float, Float);
+GET_TYPE_FIELD (gdouble, double, Double);
+GET_TYPE_FIELD (jobject, object, Object);
+
+#define GET_STATIC_TYPE_FIELD(_type, _name, _jname)                                               \
+gboolean gst_amc_jni_get_static_##_name##_field (JNIEnv *env, GError ** err, jclass klass, jfieldID fieldID, _type *value)   \
+  {                                                                                                 \
+    gboolean ret = TRUE;                                                                            \
+                                                                                                    \
+    *value = (*env)->GetStatic##_jname##Field(env, klass, fieldID);                                 \
+    if ((*env)->ExceptionCheck (env)) {                                                             \
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED,                      \
+          "Failed to get static Java field");                                                  \
+      ret = FALSE;                                                                                  \
+    }                                                                                               \
+    return ret;                                                                                     \
+  }
+
+GET_STATIC_TYPE_FIELD (gboolean, boolean, Boolean);
+GET_STATIC_TYPE_FIELD (gint8, byte, Byte);
+GET_STATIC_TYPE_FIELD (gshort, short, Short);
+GET_STATIC_TYPE_FIELD (gint, int, Int);
+GET_STATIC_TYPE_FIELD (gchar, char, Char);
+GET_STATIC_TYPE_FIELD (gint64, long, Long);
+GET_STATIC_TYPE_FIELD (gfloat, float, Float);
+GET_STATIC_TYPE_FIELD (gdouble, double, Double);
+GET_STATIC_TYPE_FIELD (jobject, object, Object);
+
+gboolean
+gst_amc_jni_get_buffer_array (JNIEnv * env, GError ** err, jobject array,
+    GstAmcBuffer ** buffers, gsize * n_buffers)
+{
+  jsize i;
+
+  *n_buffers = (*env)->GetArrayLength (env, array);
+  *buffers = g_new0 (GstAmcBuffer, *n_buffers);
+
+  for (i = 0; i < *n_buffers; i++) {
+    jobject buffer = NULL;
+
+    buffer = (*env)->GetObjectArrayElement (env, array, i);
+    if ((*env)->ExceptionCheck (env) || !buffer) {
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+          GST_LIBRARY_ERROR_FAILED, "Failed to get buffer %d", i);
+      goto error;
+    }
+
+    (*buffers)[i].object = gst_amc_jni_object_make_global (env, buffer);
+    if (!(*buffers)[i].object) {
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+          GST_LIBRARY_ERROR_FAILED,
+          "Failed to create global buffer reference %d", i);
+      goto error;
+    }
+
+    (*buffers)[i].data =
+        (*env)->GetDirectBufferAddress (env, (*buffers)[i].object);
+    if (!(*buffers)[i].data) {
+      gst_amc_jni_set_error (env, err, GST_LIBRARY_ERROR,
+          GST_LIBRARY_ERROR_FAILED, "Failed to get buffer address %d", i);
+      goto error;
+    }
+    (*buffers)[i].size =
+        (*env)->GetDirectBufferCapacity (env, (*buffers)[i].object);
+  }
+
+  return TRUE;
+
+error:
+  if (*buffers)
+    gst_amc_jni_free_buffer_array (env, *buffers, *n_buffers);
+  *buffers = NULL;
+  *n_buffers = 0;
+  return FALSE;
+}
+
+void
+gst_amc_jni_free_buffer_array (JNIEnv * env, GstAmcBuffer * buffers,
+    gsize n_buffers)
+{
+  jsize i;
+
+  g_return_if_fail (buffers != NULL);
+
+  for (i = 0; i < n_buffers; i++) {
+    if (buffers[i].object)
+      gst_amc_jni_object_unref (env, buffers[i].object);
+  }
+  g_free (buffers);
+}
+
+void
+gst_amc_buffer_free (GstAmcBuffer * buffer)
+{
+  JNIEnv *env;
+
+  g_return_if_fail (buffer != NULL);
+
+  env = gst_amc_jni_get_env ();
+
+  if (buffer->object)
+    gst_amc_jni_object_unref (env, buffer->object);
+  g_free (buffer);
+}
+
+GstAmcBuffer *
+gst_amc_buffer_copy (GstAmcBuffer * buffer)
+{
+  JNIEnv *env;
+  GstAmcBuffer *ret;
+
+  g_return_val_if_fail (buffer != NULL, NULL);
+
+  env = gst_amc_jni_get_env ();
+
+  ret = g_new0 (GstAmcBuffer, 1);
+
+  ret->object = gst_amc_jni_object_ref (env, buffer->object);
+  ret->data = buffer->data;
+  ret->size = buffer->size;
+
+  return ret;
+}
+
+gboolean
+gst_amc_buffer_get_position_and_limit (GstAmcBuffer * buffer, GError ** err,
+    gint * position, gint * limit)
+{
+  JNIEnv *env;
+
+  g_return_val_if_fail (buffer != NULL, FALSE);
+  g_return_val_if_fail (buffer->object != NULL, FALSE);
+
+  env = gst_amc_jni_get_env ();
+
+  if (!gst_amc_jni_call_int_method (env, err, buffer->object,
+          java_nio_buffer.get_position, position))
+    return FALSE;
+
+  if (!gst_amc_jni_call_int_method (env, err, buffer->object,
+          java_nio_buffer.get_limit, limit))
+    return FALSE;
+
+  return TRUE;
+}
+
+gboolean
+gst_amc_buffer_set_position_and_limit (GstAmcBuffer * buffer, GError ** err,
+    gint position, gint limit)
+{
+  JNIEnv *env;
+  jobject tmp;
+
+  g_return_val_if_fail (buffer != NULL, FALSE);
+  g_return_val_if_fail (buffer->object != NULL, FALSE);
+
+  env = gst_amc_jni_get_env ();
+
+  if (!gst_amc_jni_call_object_method (env, err, buffer->object,
+          java_nio_buffer.set_limit, &tmp, limit))
+    return FALSE;
+
+  gst_amc_jni_object_local_unref (env, tmp);
+
+  if (!gst_amc_jni_call_object_method (env, err, buffer->object,
+          java_nio_buffer.set_position, &tmp, position))
+    return FALSE;
+
+  gst_amc_jni_object_local_unref (env, tmp);
+
+  return TRUE;
+}
+
+gboolean
+gst_amc_buffer_clear (GstAmcBuffer * buffer, GError ** err)
+{
+  JNIEnv *env;
+  jobject tmp;
+
+  g_return_val_if_fail (buffer != NULL, FALSE);
+  g_return_val_if_fail (buffer->object != NULL, FALSE);
+
+  env = gst_amc_jni_get_env ();
+
+  if (!gst_amc_jni_call_object_method (env, err, buffer->object,
+          java_nio_buffer.clear, &tmp))
+    return FALSE;
+
+  gst_amc_jni_object_local_unref (env, tmp);
+
+  return TRUE;
+}
diff --git a/sys/androidmedia/gstjniutils.h b/sys/androidmedia/gstjniutils.h
new file mode 100644
index 0000000..a6bc68a
--- /dev/null
+++ b/sys/androidmedia/gstjniutils.h
@@ -0,0 +1,189 @@
+/*
+ * Copyright (C) 2012, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * Copyright (C) 2013, Fluendo S.A.
+ *   Author: Andoni Morales <amorales@fluendo.com>
+ * Copyright (C) 2014, Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2014, Collabora Ltd.
+ *   Author: Matthieu Bouron <matthieu.bouron@collabora.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_JNI_UTILS_H__
+#define __GST_AMC_JNI_UTILS_H__
+
+#include <jni.h>
+#include <glib.h>
+#include <gst/gst.h>
+
+jclass    gst_amc_jni_get_class              (JNIEnv * env,
+                                             GError ** err,
+                                             const gchar * name);
+
+jmethodID gst_amc_jni_get_method_id          (JNIEnv * env,
+                                             GError ** err,
+                                             jclass klass,
+                                             const gchar * name,
+                                             const gchar * signature);
+
+jmethodID gst_amc_jni_get_static_method_id   (JNIEnv * env,
+                                             GError ** err,
+                                             jclass klass,
+                                             const gchar * name,
+                                             const gchar * signature);
+
+jfieldID gst_amc_jni_get_field_id            (JNIEnv * env,
+                                             GError ** err,
+                                             jclass klass,
+                                             const gchar * name,
+                                             const gchar * type);
+
+jfieldID gst_amc_jni_get_static_field_id     (JNIEnv * env,
+                                             GError ** err,
+                                             jclass klass,
+                                             const gchar * name,
+                                             const gchar * type);
+
+jobject gst_amc_jni_new_object               (JNIEnv * env,
+                                             GError ** err,
+                                             gboolean global,
+                                             jclass klass,
+                                             jmethodID constructor,
+                                             ...);
+
+jobject gst_amc_jni_new_object_from_static   (JNIEnv * env,
+                                             GError ** err,
+                                             gboolean global,
+                                             jclass klass,
+                                             jmethodID constructor,
+                                             ...);
+
+jobject gst_amc_jni_object_make_global       (JNIEnv * env,
+                                             jobject object);
+
+jobject gst_amc_jni_object_ref               (JNIEnv * env,
+                                             jobject object);
+
+void gst_amc_jni_object_unref                (JNIEnv * env,
+                                             jobject object);
+
+void gst_amc_jni_object_local_unref          (JNIEnv * env,
+                                             jobject object);
+
+gchar *gst_amc_jni_string_to_gchar           (JNIEnv * env,
+                                             jstring string,
+                                             gboolean release);
+
+jstring gst_amc_jni_string_from_gchar        (JNIEnv * env,
+                                             GError ** error,
+                                             gboolean global,
+                                             const gchar * string);
+
+G_GNUC_PRINTF (5, 6)
+void gst_amc_jni_set_error                   (JNIEnv * env,
+                                              GError ** error,
+                                              GQuark domain,
+                                              gint code,
+                                              const gchar * format, ...);
+
+void gst_amc_jni_set_java_vm                 (JavaVM *java_vm);
+
+gboolean gst_amc_jni_initialize              (void);
+
+gboolean gst_amc_jni_is_vm_started           (void);
+
+JNIEnv *gst_amc_jni_get_env                  (void);
+
+#define DEF_CALL_STATIC_TYPE_METHOD(_type, _name,  _jname, _retval) \
+gboolean gst_amc_jni_call_static_##_name##_method (JNIEnv *env, GError ** err, jclass klass, jmethodID methodID, _type * value, ...)
+
+DEF_CALL_STATIC_TYPE_METHOD (gboolean, boolean, Boolean, FALSE);
+DEF_CALL_STATIC_TYPE_METHOD (gint8, byte, Byte, G_MININT8);
+DEF_CALL_STATIC_TYPE_METHOD (gshort, short, Short, G_MINSHORT);
+DEF_CALL_STATIC_TYPE_METHOD (gint, int, Int, G_MININT);
+DEF_CALL_STATIC_TYPE_METHOD (gchar, char, Char, 0);
+DEF_CALL_STATIC_TYPE_METHOD (gint64, long, Long, G_MINLONG);
+DEF_CALL_STATIC_TYPE_METHOD (gfloat, float, Float, G_MINFLOAT);
+DEF_CALL_STATIC_TYPE_METHOD (gdouble, double, Double, G_MINDOUBLE);
+DEF_CALL_STATIC_TYPE_METHOD (jobject, object, Object, NULL);
+
+gboolean gst_amc_jni_call_static_void_method        (JNIEnv * env,
+                                                    GError ** error,
+                                                    jclass klass,
+                                                    jmethodID method, ...);
+
+#define DEF_CALL_TYPE_METHOD(_type, _name,  _jname, _retval) \
+gboolean gst_amc_jni_call_##_name##_method (JNIEnv *env, GError ** err, jobject obj, jmethodID methodID, _type * value, ...)
+
+DEF_CALL_TYPE_METHOD (gboolean, boolean, Boolean, FALSE);
+DEF_CALL_TYPE_METHOD (gint8, byte, Byte, G_MININT8);
+DEF_CALL_TYPE_METHOD (gshort, short, Short, G_MINSHORT);
+DEF_CALL_TYPE_METHOD (gint, int, Int, G_MININT);
+DEF_CALL_TYPE_METHOD (gchar, char, Char, 0);
+DEF_CALL_TYPE_METHOD (gint64, long, Long, G_MINLONG);
+DEF_CALL_TYPE_METHOD (gfloat, float, Float, G_MINFLOAT);
+DEF_CALL_TYPE_METHOD (gdouble, double, Double, G_MINDOUBLE);
+DEF_CALL_TYPE_METHOD (jobject, object, Object, NULL);
+
+gboolean gst_amc_jni_call_void_method        (JNIEnv * env,
+                                             GError ** error,
+                                             jobject obj,
+                                             jmethodID method, ...);
+
+#define DEF_GET_TYPE_FIELD(_type, _name, _jname) \
+gboolean gst_amc_jni_get_##_name##_field (JNIEnv *env, GError ** err, jobject obj, jfieldID fieldID, _type * value)
+
+DEF_GET_TYPE_FIELD (gboolean, boolean, Boolean);
+DEF_GET_TYPE_FIELD (gint8, byte, Byte);
+DEF_GET_TYPE_FIELD (gshort, short, Short);
+DEF_GET_TYPE_FIELD (gint, int, Int);
+DEF_GET_TYPE_FIELD (gchar, char, Char);
+DEF_GET_TYPE_FIELD (gint64, long, Long);
+DEF_GET_TYPE_FIELD (gfloat, float, Float);
+DEF_GET_TYPE_FIELD (gdouble, double, Double);
+DEF_GET_TYPE_FIELD (jobject, object, Object);
+
+#define DEF_GET_STATIC_TYPE_FIELD(_type, _name, _jname) \
+gboolean gst_amc_jni_get_static_##_name##_field (JNIEnv *env, GError ** err, jclass klass, jfieldID fieldID, _type * value)
+
+DEF_GET_STATIC_TYPE_FIELD (gboolean, boolean, Boolean);
+DEF_GET_STATIC_TYPE_FIELD (gint8, byte, Byte);
+DEF_GET_STATIC_TYPE_FIELD (gshort, short, Short);
+DEF_GET_STATIC_TYPE_FIELD (gint, int, Int);
+DEF_GET_STATIC_TYPE_FIELD (gchar, char, Char);
+DEF_GET_STATIC_TYPE_FIELD (gint64, long, Long);
+DEF_GET_STATIC_TYPE_FIELD (gfloat, float, Float);
+DEF_GET_STATIC_TYPE_FIELD (gdouble, double, Double);
+DEF_GET_STATIC_TYPE_FIELD (jobject, object, Object);
+
+typedef struct _GstAmcBuffer GstAmcBuffer;
+
+struct _GstAmcBuffer {
+  jobject object; /* global reference */
+  guint8 *data;
+  gsize size;
+};
+
+gboolean gst_amc_buffer_get_position_and_limit (GstAmcBuffer * buffer, GError ** err, gint * position, gint * limit);
+gboolean gst_amc_buffer_set_position_and_limit (GstAmcBuffer * buffer, GError ** err, gint position, gint limit);
+gboolean gst_amc_buffer_clear (GstAmcBuffer * buffer, GError ** err);
+GstAmcBuffer * gst_amc_buffer_copy (GstAmcBuffer * buffer);
+void     gst_amc_buffer_free (GstAmcBuffer * buffer);
+
+gboolean gst_amc_jni_get_buffer_array (JNIEnv * env, GError ** err, jobject array, GstAmcBuffer ** buffers, gsize * n_buffers);
+void gst_amc_jni_free_buffer_array (JNIEnv * env, GstAmcBuffer * buffers, gsize n_buffers);
+
+#endif
diff --git a/sys/applemedia-nonpublic/Makefile.in b/sys/applemedia-nonpublic/Makefile.in
index d4aca37..02f2d21 100644
--- a/sys/applemedia-nonpublic/Makefile.in
+++ b/sys/applemedia-nonpublic/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -90,8 +100,6 @@
 @HAVE_IOS_FALSE@	mioapi.c
 
 subdir = sys/applemedia-nonpublic
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -99,6 +107,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -112,7 +121,6 @@
 	$(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 \
@@ -129,6 +137,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -269,6 +279,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -286,8 +297,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -312,8 +325,6 @@
 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@
@@ -326,7 +337,6 @@
 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@
@@ -334,6 +344,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -360,11 +372,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -383,8 +398,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -443,10 +456,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -463,7 +480,6 @@
 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@
@@ -472,7 +488,6 @@
 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@
@@ -485,7 +500,6 @@
 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@
@@ -499,6 +513,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -510,6 +525,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -548,6 +565,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -583,10 +601,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -612,6 +634,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -619,7 +644,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -648,6 +680,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -658,6 +691,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -688,17 +722,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -715,6 +748,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -753,6 +787,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -836,7 +871,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/applemedia-nonpublic/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/applemedia-nonpublic/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1233,6 +1267,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am
index e05c092..795832c 100644
--- a/sys/applemedia/Makefile.am
+++ b/sys/applemedia/Makefile.am
@@ -5,6 +5,7 @@
 	vtutil.c				\
 	corevideobuffer.c			\
 	coremediabuffer.c			\
+	corevideotexturecache.m 		\
 	atdec.c
 
 libgstapplemedia_la_CPPFLAGS =			\
@@ -15,11 +16,15 @@
 	-Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type
 
 libgstapplemedia_la_CFLAGS =			\
+	-I$(top_srcdir)/gst-libs                \
+	-I$(top_builddir)/gst-libs              \
 	$(GST_CFLAGS)				\
 	$(GST_BASE_CFLAGS)			\
 	$(GST_PLUGINS_BASE_CFLAGS)
 
 libgstapplemedia_la_OBJCFLAGS =			\
+	-I$(top_srcdir)/gst-libs                \
+	-I$(top_builddir)/gst-libs              \
 	$(GST_OBJCFLAGS)			\
 	$(GST_BASE_CFLAGS)			\
 	$(GST_PLUGINS_BASE_CFLAGS)
@@ -28,12 +33,13 @@
 libgstapplemedia_la_OBJCFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
 endif
 
-libgstapplemedia_la_LIBADD =			\
-	$(GST_BASE_LIBS)			\
-	$(GST_PLUGINS_BASE_LIBS)		\
-	-lgstvideo-$(GST_API_VERSION) 		\
-	-lgstaudio-$(GST_API_VERSION)		\
-	-lgstpbutils-$(GST_API_VERSION) 	\
+libgstapplemedia_la_LIBADD =						\
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la 	\
+	$(GST_BASE_LIBS)						\
+	$(GST_PLUGINS_BASE_LIBS)					\
+	-lgstvideo-$(GST_API_VERSION) 					\
+	-lgstaudio-$(GST_API_VERSION)					\
+	-lgstpbutils-$(GST_API_VERSION) 				\
 	$(GMODULE_NO_EXPORT_LIBS)
 
 libgstapplemedia_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --tag=CC
@@ -83,7 +89,8 @@
 
 libgstapplemedia_la_SOURCES +=			\
 	avfvideosrc.m				\
-	avfassetsrc.m
+	avfassetsrc.m				\
+	avsamplevideosink.m
 
 libgstapplemedia_la_LDFLAGS +=			\
 	-Wl,-framework -Wl,AVFoundation
diff --git a/sys/applemedia/Makefile.in b/sys/applemedia/Makefile.in
index 85b238d..27b9283 100644
--- a/sys/applemedia/Makefile.in
+++ b/sys/applemedia/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -97,7 +107,8 @@
 
 @HAVE_AVFOUNDATION_TRUE@am__append_6 = \
 @HAVE_AVFOUNDATION_TRUE@	avfvideosrc.m				\
-@HAVE_AVFOUNDATION_TRUE@	avfassetsrc.m
+@HAVE_AVFOUNDATION_TRUE@	avfassetsrc.m				\
+@HAVE_AVFOUNDATION_TRUE@	avsamplevideosink.m
 
 @HAVE_AVFOUNDATION_TRUE@am__append_7 = \
 @HAVE_AVFOUNDATION_TRUE@	-Wl,-framework -Wl,AVFoundation
@@ -108,8 +119,6 @@
 
 @HAVE_VIDEOTOOLBOX_TRUE@am__append_9 = -Wl,-weak_framework -Wl,VideoToolbox
 subdir = sys/applemedia
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -117,6 +126,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -130,7 +140,6 @@
 	$(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 \
@@ -147,6 +156,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -181,22 +192,26 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstapplemedia_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+libgstapplemedia_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am__libgstapplemedia_la_SOURCES_DIST = plugin.m vtutil.c \
-	corevideobuffer.c coremediabuffer.c atdec.c iosassetsrc.m \
-	qtkitvideosrc.m avfvideosrc.m avfassetsrc.m vtenc.c vtdec.c
+	corevideobuffer.c coremediabuffer.c corevideotexturecache.m \
+	atdec.c iosassetsrc.m qtkitvideosrc.m avfvideosrc.m \
+	avfassetsrc.m avsamplevideosink.m vtenc.c vtdec.c
 @HAVE_IOS_TRUE@am__objects_1 = libgstapplemedia_la-iosassetsrc.lo
 @HAVE_IOS_FALSE@am__objects_2 = libgstapplemedia_la-qtkitvideosrc.lo
 @HAVE_AVFOUNDATION_TRUE@am__objects_3 =  \
 @HAVE_AVFOUNDATION_TRUE@	libgstapplemedia_la-avfvideosrc.lo \
-@HAVE_AVFOUNDATION_TRUE@	libgstapplemedia_la-avfassetsrc.lo
+@HAVE_AVFOUNDATION_TRUE@	libgstapplemedia_la-avfassetsrc.lo \
+@HAVE_AVFOUNDATION_TRUE@	libgstapplemedia_la-avsamplevideosink.lo
 @HAVE_VIDEOTOOLBOX_TRUE@am__objects_4 = libgstapplemedia_la-vtenc.lo \
 @HAVE_VIDEOTOOLBOX_TRUE@	libgstapplemedia_la-vtdec.lo
 am_libgstapplemedia_la_OBJECTS = libgstapplemedia_la-plugin.lo \
 	libgstapplemedia_la-vtutil.lo \
 	libgstapplemedia_la-corevideobuffer.lo \
 	libgstapplemedia_la-coremediabuffer.lo \
+	libgstapplemedia_la-corevideotexturecache.lo \
 	libgstapplemedia_la-atdec.lo $(am__objects_1) $(am__objects_2) \
 	$(am__objects_3) $(am__objects_4)
 libgstapplemedia_la_OBJECTS = $(am_libgstapplemedia_la_OBJECTS)
@@ -287,6 +302,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -304,8 +320,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -330,8 +348,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -352,6 +367,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -378,11 +395,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -401,8 +421,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -461,10 +479,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -481,7 +503,6 @@
 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@
@@ -490,7 +511,6 @@
 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@
@@ -503,7 +523,6 @@
 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@
@@ -517,6 +536,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -528,6 +548,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -566,6 +588,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -601,10 +624,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -630,6 +657,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -637,7 +667,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -666,6 +703,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -676,6 +714,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -706,17 +745,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -733,6 +771,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -771,6 +810,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -786,8 +826,9 @@
 wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstapplemedia.la
 libgstapplemedia_la_SOURCES = plugin.m vtutil.c corevideobuffer.c \
-	coremediabuffer.c atdec.c $(am__append_2) $(am__append_4) \
-	$(am__append_6) $(am__append_8)
+	coremediabuffer.c corevideotexturecache.m atdec.c \
+	$(am__append_2) $(am__append_4) $(am__append_6) \
+	$(am__append_8)
 libgstapplemedia_la_CPPFLAGS = \
 	-Dgst_core_media_buffer_new=gst_core_media_buffer_priv_new		\
 	-Dgst_core_media_buffer_get_type=gst_core_media_buffer_priv_get_type	\
@@ -796,18 +837,22 @@
 	-Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type
 
 libgstapplemedia_la_CFLAGS = \
+	-I$(top_srcdir)/gst-libs                \
+	-I$(top_builddir)/gst-libs              \
 	$(GST_CFLAGS)				\
 	$(GST_BASE_CFLAGS)			\
 	$(GST_PLUGINS_BASE_CFLAGS)
 
-libgstapplemedia_la_OBJCFLAGS = $(GST_OBJCFLAGS) $(GST_BASE_CFLAGS) \
+libgstapplemedia_la_OBJCFLAGS = -I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs $(GST_OBJCFLAGS) $(GST_BASE_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) $(am__append_1)
 libgstapplemedia_la_LIBADD = \
-	$(GST_BASE_LIBS)			\
-	$(GST_PLUGINS_BASE_LIBS)		\
-	-lgstvideo-$(GST_API_VERSION) 		\
-	-lgstaudio-$(GST_API_VERSION)		\
-	-lgstpbutils-$(GST_API_VERSION) 	\
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la 	\
+	$(GST_BASE_LIBS)						\
+	$(GST_PLUGINS_BASE_LIBS)					\
+	-lgstvideo-$(GST_API_VERSION) 					\
+	-lgstaudio-$(GST_API_VERSION)					\
+	-lgstpbutils-$(GST_API_VERSION) 				\
 	$(GMODULE_NO_EXPORT_LIBS)
 
 libgstapplemedia_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --tag=CC
@@ -844,7 +889,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/applemedia/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/applemedia/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -910,8 +954,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-atdec.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-avfassetsrc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-avfvideosrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-avsamplevideosink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-coremediabuffer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-corevideobuffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-corevideotexturecache.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-iosassetsrc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-plugin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstapplemedia_la-qtkitvideosrc.Plo@am__quote@
@@ -1016,6 +1062,13 @@
 @AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstapplemedia_la-plugin.lo `test -f 'plugin.m' || echo '$(srcdir)/'`plugin.m
 
+libgstapplemedia_la-corevideotexturecache.lo: corevideotexturecache.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstapplemedia_la-corevideotexturecache.lo -MD -MP -MF $(DEPDIR)/libgstapplemedia_la-corevideotexturecache.Tpo -c -o libgstapplemedia_la-corevideotexturecache.lo `test -f 'corevideotexturecache.m' || echo '$(srcdir)/'`corevideotexturecache.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstapplemedia_la-corevideotexturecache.Tpo $(DEPDIR)/libgstapplemedia_la-corevideotexturecache.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='corevideotexturecache.m' object='libgstapplemedia_la-corevideotexturecache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstapplemedia_la-corevideotexturecache.lo `test -f 'corevideotexturecache.m' || echo '$(srcdir)/'`corevideotexturecache.m
+
 libgstapplemedia_la-iosassetsrc.lo: iosassetsrc.m
 @am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstapplemedia_la-iosassetsrc.lo -MD -MP -MF $(DEPDIR)/libgstapplemedia_la-iosassetsrc.Tpo -c -o libgstapplemedia_la-iosassetsrc.lo `test -f 'iosassetsrc.m' || echo '$(srcdir)/'`iosassetsrc.m
 @am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstapplemedia_la-iosassetsrc.Tpo $(DEPDIR)/libgstapplemedia_la-iosassetsrc.Plo
@@ -1044,6 +1097,13 @@
 @AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstapplemedia_la-avfassetsrc.lo `test -f 'avfassetsrc.m' || echo '$(srcdir)/'`avfassetsrc.m
 
+libgstapplemedia_la-avsamplevideosink.lo: avsamplevideosink.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -MT libgstapplemedia_la-avsamplevideosink.lo -MD -MP -MF $(DEPDIR)/libgstapplemedia_la-avsamplevideosink.Tpo -c -o libgstapplemedia_la-avsamplevideosink.lo `test -f 'avsamplevideosink.m' || echo '$(srcdir)/'`avsamplevideosink.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstapplemedia_la-avsamplevideosink.Tpo $(DEPDIR)/libgstapplemedia_la-avsamplevideosink.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='avsamplevideosink.m' object='libgstapplemedia_la-avsamplevideosink.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(libgstapplemedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstapplemedia_la_CPPFLAGS) $(CPPFLAGS) $(libgstapplemedia_la_OBJCFLAGS) $(OBJCFLAGS) -c -o libgstapplemedia_la-avsamplevideosink.lo `test -f 'avsamplevideosink.m' || echo '$(srcdir)/'`avsamplevideosink.m
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1257,6 +1317,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/applemedia/avfassetsrc.m b/sys/applemedia/avfassetsrc.m
index ac77900..0aaf3ad 100644
--- a/sys/applemedia/avfassetsrc.m
+++ b/sys/applemedia/avfassetsrc.m
@@ -1083,7 +1083,11 @@
     return NULL;
   }
 
-  buf = gst_core_media_buffer_new (cmbuf, FALSE);
+  buf = gst_core_media_buffer_new (cmbuf, FALSE, TRUE);
+  CFRelease (cmbuf);
+  if (buf == NULL)
+    return NULL;
+  /* cmbuf is now retained by buf (in meta) */
   dur = CMSampleBufferGetDuration (cmbuf);
   ts = CMSampleBufferGetPresentationTimeStamp (cmbuf);
   if (dur.value != 0) {
diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m
index b943c97..a033ac0 100644
--- a/sys/applemedia/avfvideosrc.m
+++ b/sys/applemedia/avfvideosrc.m
@@ -24,8 +24,13 @@
 #include "avfvideosrc.h"
 
 #import <AVFoundation/AVFoundation.h>
+#if !HAVE_IOS
+#import <AppKit/AppKit.h>
+#endif
 #include <gst/video/video.h>
+#include <gst/gl/gstglcontext.h>
 #include "coremediabuffer.h"
+#include "corevideotexturecache.h"
 
 #define DEFAULT_DEVICE_INDEX  -1
 #define DEFAULT_DO_STATS      FALSE
@@ -52,6 +57,10 @@
         "framerate = " GST_VIDEO_FPS_RANGE ", "
         "width = " GST_VIDEO_SIZE_RANGE ", "
         "height = " GST_VIDEO_SIZE_RANGE "; "
+
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
+            "RGBA") "; "
 ));
 
 typedef enum _QueueState {
@@ -69,14 +78,13 @@
 
   gint deviceIndex;
   BOOL doStats;
-#if !HAVE_IOS
-  CGDirectDisplayID displayId;
-#endif
 
   AVCaptureSession *session;
   AVCaptureInput *input;
   AVCaptureVideoDataOutput *output;
   AVCaptureDevice *device;
+  AVCaptureConnection *connection;
+  CMClockRef inputClock;
 
   dispatch_queue_t mainQueue;
   dispatch_queue_t workerQueue;
@@ -85,12 +93,11 @@
   BOOL stopRequest;
 
   GstCaps *caps;
+  GstVideoFormat internalFormat;
   GstVideoFormat format;
   gint width, height;
   GstClockTime latency;
   guint64 offset;
-  GstClockTime startAVFTimestamp;
-  GstClockTime startTimestamp;
 
   GstClockTime lastSampling;
   guint count;
@@ -100,6 +107,7 @@
   BOOL captureScreenMouseClicks;
 
   BOOL useVideoMeta;
+  GstCoreVideoTextureCache *textureCache;
 }
 
 - (id)init;
@@ -118,6 +126,9 @@
 - (BOOL)openDevice;
 - (void)closeDevice;
 - (GstVideoFormat)getGstVideoFormat:(NSNumber *)pixel_format;
+#if !HAVE_IOS
+- (CGDirectDisplayID)getDisplayIdFromDeviceIndex;
+#endif
 - (BOOL)getDeviceCaps:(GstCaps *)result;
 - (BOOL)setDeviceCaps:(GstVideoInfo *)info;
 - (BOOL)getSessionPresetCaps:(GstCaps *)result;
@@ -131,7 +142,6 @@
 - (BOOL)query:(GstQuery *)query;
 - (GstStateChangeReturn)changeState:(GstStateChange)transition;
 - (GstFlowReturn)create:(GstBuffer **)buf;
-- (void)timestampBuffer:(GstBuffer *)buf sampleBuffer:(CMSampleBufferRef)sampleBuffer;
 - (void)updateStatistics;
 - (void)captureOutput:(AVCaptureOutput *)captureOutput
 didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
@@ -161,9 +171,7 @@
     captureScreenCursor = NO;
     captureScreenMouseClicks = NO;
     useVideoMeta = NO;
-#if !HAVE_IOS
-    displayId = kCGDirectMainDisplay;
-#endif
+    textureCache = NULL;
 
     mainQueue =
         dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc.main", NULL);
@@ -192,7 +200,7 @@
   NSString *mediaType = AVMediaTypeVideo;
   NSError *err;
 
-  if (deviceIndex == -1) {
+  if (deviceIndex == DEFAULT_DEVICE_INDEX) {
     device = [AVCaptureDevice defaultDeviceWithMediaType:mediaType];
     if (device == nil) {
       GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
@@ -233,8 +241,14 @@
 #if HAVE_IOS
   return NO;
 #else
+  CGDirectDisplayID displayId;
+
   GST_DEBUG_OBJECT (element, "Opening screen input");
 
+  displayId = [self getDisplayIdFromDeviceIndex];
+  if (displayId == 0)
+    return NO;
+
   AVCaptureScreenInput *screenInput =
       [[AVCaptureScreenInput alloc] initWithDisplayID:displayId];
 
@@ -284,6 +298,10 @@
     [session addInput:input];
     [session addOutput:output];
 
+    /* retained by session */
+    connection = [[output connections] firstObject];
+    inputClock = ((AVCaptureInputPort *)connection.inputPorts[0]).clock;
+
     *successPtr = YES;
   });
 
@@ -299,6 +317,9 @@
   dispatch_sync (mainQueue, ^{
     g_assert (![session isRunning]);
 
+    connection = nil;
+    inputClock = nil;
+
     [session removeInput:input];
     [session removeOutput:output];
 
@@ -318,6 +339,7 @@
 
     if (caps)
       gst_caps_unref (caps);
+    caps = NULL;
   });
 }
 
@@ -329,6 +351,14 @@
         "framerate", GST_TYPE_FRACTION, (fps_n), (fps_d),             \
         NULL))
 
+#define GST_AVF_FPS_RANGE_CAPS_NEW(format, w, h, min_fps_n, min_fps_d, max_fps_n, max_fps_d) \
+    (gst_caps_new_simple ("video/x-raw",                              \
+        "width", G_TYPE_INT, w,                                       \
+        "height", G_TYPE_INT, h,                                      \
+        "format", G_TYPE_STRING, gst_video_format_to_string (format), \
+        "framerate", GST_TYPE_FRACTION_RANGE, (min_fps_n), (min_fps_d), (max_fps_n), (max_fps_d), \
+        NULL))
+
 - (GstVideoFormat)getGstVideoFormat:(NSNumber *)pixel_format
 {
   GstVideoFormat gst_format = GST_VIDEO_FORMAT_UNKNOWN;
@@ -343,6 +373,9 @@
   case kCVPixelFormatType_32BGRA: /* BGRA */
     gst_format = GST_VIDEO_FORMAT_BGRA;
     break;
+  case kCVPixelFormatType_32RGBA: /* RGBA */
+    gst_format = GST_VIDEO_FORMAT_RGBA;
+    break;
   case kCVPixelFormatType_422YpCbCr8_yuvs: /* yuvs */
     gst_format = GST_VIDEO_FORMAT_YUY2;
     break;
@@ -355,6 +388,26 @@
   return gst_format;
 }
 
+#if !HAVE_IOS
+- (CGDirectDisplayID)getDisplayIdFromDeviceIndex
+{
+  NSDictionary *description;
+  NSNumber *displayId;
+  NSArray *screens = [NSScreen screens];
+
+  if (deviceIndex == DEFAULT_DEVICE_INDEX)
+    return kCGDirectMainDisplay;
+  if (deviceIndex >= [screens count]) {
+    GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
+                        ("Invalid screen capture device index"), (NULL));
+    return 0;
+  }
+  description = [[screens objectAtIndex:deviceIndex] deviceDescription];
+  displayId = [description objectForKey:@"NSScreenNumber"];
+  return [displayId unsignedIntegerValue];
+}
+#endif
+
 - (BOOL)getDeviceCaps:(GstCaps *)result
 {
   NSArray *formats = [device valueForKey:@"formats"];
@@ -373,16 +426,33 @@
     formatDescription = (CMFormatDescriptionRef) [f performSelector:@selector(formatDescription)];
     dimensions = CMVideoFormatDescriptionGetDimensions(formatDescription);
     for (NSObject *rate in [f valueForKey:@"videoSupportedFrameRateRanges"]) {
-      int fps_n, fps_d;
-      gdouble max_fps;
+      int min_fps_n, min_fps_d, max_fps_n, max_fps_d;
+      gdouble min_fps, max_fps;
+
+      [[rate valueForKey:@"minFrameRate"] getValue:&min_fps];
+      gst_util_double_to_fraction (min_fps, &min_fps_n, &min_fps_d);
 
       [[rate valueForKey:@"maxFrameRate"] getValue:&max_fps];
-      gst_util_double_to_fraction (max_fps, &fps_n, &fps_d);
+      gst_util_double_to_fraction (max_fps, &max_fps_n, &max_fps_d);
 
       for (NSNumber *pixel_format in pixel_formats) {
         GstVideoFormat gst_format = [self getGstVideoFormat:pixel_format];
-        if (gst_format != GST_VIDEO_FORMAT_UNKNOWN)
-          gst_caps_append (result, GST_AVF_CAPS_NEW (gst_format, dimensions.width, dimensions.height, fps_n, fps_d));
+        if (gst_format != GST_VIDEO_FORMAT_UNKNOWN) {
+          if (min_fps != max_fps)
+            gst_caps_append (result, GST_AVF_FPS_RANGE_CAPS_NEW (gst_format, dimensions.width, dimensions.height, min_fps_n, min_fps_d, max_fps_n, max_fps_d));
+          else
+            gst_caps_append (result, GST_AVF_CAPS_NEW (gst_format, dimensions.width, dimensions.height, max_fps_n, max_fps_d));
+        }
+
+        if (gst_format == GST_VIDEO_FORMAT_BGRA) {
+          GstCaps *rgba_caps;
+          if (min_fps != max_fps)
+            rgba_caps = GST_AVF_FPS_RANGE_CAPS_NEW (GST_VIDEO_FORMAT_RGBA, dimensions.width, dimensions.height, min_fps_n, min_fps_d, max_fps_n, max_fps_d);
+          else
+            rgba_caps = GST_AVF_CAPS_NEW (GST_VIDEO_FORMAT_RGBA, dimensions.width, dimensions.height, max_fps_n, max_fps_d);
+          gst_caps_set_features (rgba_caps, 0, gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL));
+          gst_caps_append (result, rgba_caps);
+        }
       }
     }
   }
@@ -410,10 +480,12 @@
         found_format = TRUE;
         [device setValue:f forKey:@"activeFormat"];
         for (NSObject *rate in [f valueForKey:@"videoSupportedFrameRateRanges"]) {
-          gdouble max_frame_rate;
+          gdouble min_frame_rate, max_frame_rate;
 
+          [[rate valueForKey:@"minFrameRate"] getValue:&min_frame_rate];
           [[rate valueForKey:@"maxFrameRate"] getValue:&max_frame_rate];
-          if (abs (framerate - max_frame_rate) < 0.00001) {
+          if ((framerate >= min_frame_rate - 0.00001) &&
+              (framerate <= max_frame_rate + 0.00001)) {
             NSValue *min_frame_duration, *max_frame_duration;
 
             found_framerate = TRUE;
@@ -422,7 +494,8 @@
             [device setValue:min_frame_duration forKey:@"activeVideoMinFrameDuration"];
             @try {
               /* Only available on OSX >= 10.8 and iOS >= 7.0 */
-              [device setValue:max_frame_duration forKey:@"activeVideoMaxFrameDuration"];
+              // Restrict activeVideoMaxFrameDuration to the minimum value so we get a better capture frame rate
+              [device setValue:min_frame_duration forKey:@"activeVideoMaxFrameDuration"];
             } @catch (NSException *exception) {
               if (![[exception name] isEqualToString:NSUndefinedKeyException]) {
                 GST_WARNING ("An unexcepted error occured: %s",
@@ -528,7 +601,7 @@
 
   if (captureScreen) {
 #if !HAVE_IOS
-    CGRect rect = CGDisplayBounds (displayId);
+    CGRect rect = CGDisplayBounds ([self getDisplayIdFromDeviceIndex]);
     for (NSNumber *pixel_format in pixel_formats) {
       GstVideoFormat gst_format = [self getGstVideoFormat:pixel_format];
       if (gst_format != GST_VIDEO_FORMAT_UNKNOWN)
@@ -573,6 +646,7 @@
   width = info.width;
   height = info.height;
   format = info.finfo->format;
+  internalFormat = GST_VIDEO_FORMAT_UNKNOWN;
   latency = gst_util_uint64_scale (GST_SECOND, info.fps_d, info.fps_n);
 
   dispatch_sync (mainQueue, ^{
@@ -612,18 +686,28 @@
       }
     }
 
+    internalFormat = format;
     switch (format) {
       case GST_VIDEO_FORMAT_NV12:
         newformat = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
         break;
       case GST_VIDEO_FORMAT_UYVY:
-         newformat = kCVPixelFormatType_422YpCbCr8;
+        newformat = kCVPixelFormatType_422YpCbCr8;
         break;
       case GST_VIDEO_FORMAT_YUY2:
-         newformat = kCVPixelFormatType_422YpCbCr8_yuvs;
+        newformat = kCVPixelFormatType_422YpCbCr8_yuvs;
+        break;
+      case GST_VIDEO_FORMAT_RGBA:
+#if !HAVE_IOS
+        newformat = kCVPixelFormatType_422YpCbCr8;
+        internalFormat = GST_VIDEO_FORMAT_UYVY;
+#else
+        newformat = kCVPixelFormatType_32BGRA;
+        internalFormat = GST_VIDEO_FORMAT_BGRA;
+#endif
         break;
       case GST_VIDEO_FORMAT_BGRA:
-         newformat = kCVPixelFormatType_32BGRA;
+        newformat = kCVPixelFormatType_32BGRA;
         break;
       default:
         *successPtr = NO;
@@ -632,15 +716,17 @@
         return;
     }
 
-    GST_DEBUG_OBJECT(element,
-       "Width: %d Height: %d Format: %" GST_FOURCC_FORMAT,
-       width, height,
-       GST_FOURCC_ARGS (gst_video_format_to_fourcc (format)));
+    GST_INFO_OBJECT(element,
+        "width: %d height: %d format: %s internalFormat: %s", width, height,
+        gst_video_format_to_string (format),
+        gst_video_format_to_string (internalFormat));
 
     output.videoSettings = [NSDictionary
         dictionaryWithObject:[NSNumber numberWithInt:newformat]
         forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey];
 
+    if (caps)
+      gst_caps_unref (caps);
     caps = gst_caps_copy (new_caps);
     [session startRunning];
 
@@ -660,8 +746,6 @@
 
   offset = 0;
   latency = GST_CLOCK_TIME_NONE;
-  startAVFTimestamp = GST_CLOCK_TIME_NONE;
-  startTimestamp = GST_CLOCK_TIME_NONE;
 
   lastSampling = GST_CLOCK_TIME_NONE;
   count = 0;
@@ -680,6 +764,10 @@
   [bufQueue release];
   bufQueue = nil;
 
+  if (textureCache)
+      gst_core_video_texture_cache_free (textureCache);
+  textureCache = NULL;
+
   return YES;
 }
 
@@ -688,7 +776,7 @@
   BOOL result = NO;
 
   if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) {
-    if (device != nil) {
+    if (device != nil && caps != NULL) {
       GstClockTime min_latency, max_latency;
 
       min_latency = max_latency = latency;
@@ -711,6 +799,35 @@
   useVideoMeta = gst_query_find_allocation_meta (query,
       GST_VIDEO_META_API_TYPE, NULL);
 
+  /* determine whether we can pass GL textures to downstream element */
+  GstCapsFeatures *features = gst_caps_get_features (caps, 0);
+  if (gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY)) {
+    GstGLContext *glContext = NULL;
+
+    /* get GL context from downstream element */
+    GstQuery *query = gst_query_new_context ("gst.gl.local_context");
+    if (gst_pad_peer_query (GST_BASE_SRC_PAD (element), query)) {
+      GstContext *context;
+      gst_query_parse_context (query, &context);
+      if (context) {
+        const GstStructure *s = gst_context_get_structure (context);
+        gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &glContext,
+            NULL);
+      }
+    }
+    gst_query_unref (query);
+
+    if (glContext) {
+      GST_INFO_OBJECT (element, "pushing textures. Internal format %s, context %p",
+          gst_video_format_to_string (internalFormat), glContext);
+      textureCache = gst_core_video_texture_cache_new (glContext);
+      gst_core_video_texture_cache_set_format (textureCache, internalFormat, caps);
+      gst_object_unref (glContext);
+    } else {
+      GST_WARNING_OBJECT (element, "got memory:GLMemory caps but not GL context from downstream element");
+    }
+  } 
+
   return YES;
 }
 
@@ -727,7 +844,7 @@
 {
   [bufQueueLock lock];
   stopRequest = NO;
-  [bufQueueLock unlock];
+  [bufQueueLock unlockWithCondition:([bufQueue count] == 0) ? NO_BUFFERS : HAS_BUFFER_OR_STOP_REQUEST];
 
   return YES;
 }
@@ -751,8 +868,10 @@
 
 - (void)captureOutput:(AVCaptureOutput *)captureOutput
 didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
-       fromConnection:(AVCaptureConnection *)connection
+       fromConnection:(AVCaptureConnection *)aConnection
 {
+  GstClockTime timestamp, duration;
+
   [bufQueueLock lock];
 
   if (stopRequest) {
@@ -760,10 +879,19 @@
     return;
   }
 
+  [self getSampleBuffer:sampleBuffer timestamp:&timestamp duration:&duration];
+
+  if (timestamp == GST_CLOCK_TIME_NONE) {
+    [bufQueueLock unlockWithCondition:([bufQueue count] == 0) ? NO_BUFFERS : HAS_BUFFER_OR_STOP_REQUEST];
+    return;
+  }
+
   if ([bufQueue count] == BUFFER_QUEUE_SIZE)
     [bufQueue removeLastObject];
 
-  [bufQueue insertObject:(id)sampleBuffer
+  [bufQueue insertObject:@{@"sbuf": (id)sampleBuffer,
+                           @"timestamp": @(timestamp),
+                           @"duration": @(duration)}
                  atIndex:0];
 
   [bufQueueLock unlockWithCondition:HAS_BUFFER_OR_STOP_REQUEST];
@@ -775,6 +903,7 @@
   CVImageBufferRef image_buf;
   CVPixelBufferRef pixel_buf;
   size_t cur_width, cur_height;
+  GstClockTime timestamp, duration;
 
   [bufQueueLock lockWhenCondition:HAS_BUFFER_OR_STOP_REQUEST];
   if (stopRequest) {
@@ -782,7 +911,10 @@
     return GST_FLOW_FLUSHING;
   }
 
-  sbuf = (CMSampleBufferRef) [bufQueue lastObject];
+  NSDictionary *dic = (NSDictionary *) [bufQueue lastObject];
+  sbuf = (CMSampleBufferRef) dic[@"sbuf"];
+  timestamp = (GstClockTime) [dic[@"timestamp"] longLongValue];
+  duration = (GstClockTime) [dic[@"duration"] longLongValue];
   CFRetain (sbuf);
   [bufQueue removeLastObject];
   [bufQueueLock unlockWithCondition:
@@ -809,10 +941,33 @@
     }
   }
 
-  *buf = gst_core_media_buffer_new (sbuf, useVideoMeta);
+  *buf = gst_core_media_buffer_new (sbuf, useVideoMeta, textureCache == NULL);
+  if (*buf == NULL) {
+    CFRelease (sbuf);
+    return GST_FLOW_ERROR;
+  }
+
+  if (format == GST_VIDEO_FORMAT_RGBA) {
+    /* So now buf contains BGRA data (!) . Since downstream is actually going to
+     * use the GL upload meta to get RGBA textures (??), we need to override the
+     * VideoMeta format (!!!). Yes this is confusing, see setCaps:  */
+    GstVideoMeta *video_meta = gst_buffer_get_video_meta (*buf);
+    if (video_meta) {
+      video_meta->format = format;
+    }
+  }
   CFRelease (sbuf);
 
-  [self timestampBuffer:*buf sampleBuffer:sbuf];
+  if (textureCache != NULL) {
+    *buf = gst_core_video_texture_cache_get_gl_buffer (textureCache, *buf);
+    if (*buf == NULL)
+      return GST_FLOW_ERROR;
+  }
+
+  GST_BUFFER_OFFSET (*buf) = offset++;
+  GST_BUFFER_OFFSET_END (*buf) = GST_BUFFER_OFFSET (*buf) + 1;
+  GST_BUFFER_TIMESTAMP (*buf) = timestamp;
+  GST_BUFFER_DURATION (*buf) = duration;
 
   if (doStats)
     [self updateStatistics];
@@ -820,43 +975,60 @@
   return GST_FLOW_OK;
 }
 
-- (void)timestampBuffer:(GstBuffer *)buf
-           sampleBuffer:(CMSampleBufferRef)sbuf
+- (void)getSampleBuffer:(CMSampleBufferRef)sbuf
+              timestamp:(GstClockTime *)outTimestamp
+               duration:(GstClockTime *)outDuration
 {
   CMSampleTimingInfo time_info;
-  GstClockTime timestamp, duration;
+  GstClockTime timestamp, avf_timestamp, duration, input_clock_now, input_clock_diff, running_time;
   CMItemCount num_timings;
+  GstClock *clock;
+  CMTime now;
 
   timestamp = GST_CLOCK_TIME_NONE;
   duration = GST_CLOCK_TIME_NONE;
   if (CMSampleBufferGetOutputSampleTimingInfoArray(sbuf, 1, &time_info, &num_timings) == noErr) {
-    timestamp = gst_util_uint64_scale (GST_SECOND,
+    avf_timestamp = gst_util_uint64_scale (GST_SECOND,
             time_info.presentationTimeStamp.value, time_info.presentationTimeStamp.timescale);
-    duration = gst_util_uint64_scale (GST_SECOND,
-            time_info.duration.value, time_info.duration.timescale);
 
-    if (offset == 0) {
-      GstClock *clock;
+    if (CMTIME_IS_VALID (time_info.duration) && time_info.duration.timescale != 0)
+      duration = gst_util_uint64_scale (GST_SECOND,
+          time_info.duration.value, time_info.duration.timescale);
 
-      GST_OBJECT_LOCK (element);
-      clock = GST_ELEMENT_CLOCK (element);
-      if (clock != NULL) {
-        startTimestamp = gst_clock_get_time (clock) - element->base_time;
-      }
-      GST_OBJECT_UNLOCK (element);
+    now = CMClockGetTime(inputClock);
+    input_clock_now = gst_util_uint64_scale (GST_SECOND,
+        now.value, now.timescale);
+    input_clock_diff = input_clock_now - avf_timestamp;
 
-      startAVFTimestamp = timestamp;
+    GST_OBJECT_LOCK (element);
+    clock = GST_ELEMENT_CLOCK (element);
+    if (clock) {
+      running_time = gst_clock_get_time (clock) - element->base_time;
+      /* We use presentationTimeStamp to determine how much time it took
+       * between capturing and receiving the frame in our delegate
+       * (e.g. how long it spent in AVF queues), then we subtract that time
+       * from our running time to get the actual timestamp.
+       */
+      if (running_time >= input_clock_diff)
+        timestamp = running_time - input_clock_diff;
+      else
+        timestamp = running_time;
+
+      GST_DEBUG_OBJECT (element, "AVF clock: %"GST_TIME_FORMAT ", AVF PTS: %"GST_TIME_FORMAT
+          ", AVF clock diff: %"GST_TIME_FORMAT
+          ", running time: %"GST_TIME_FORMAT ", out PTS: %"GST_TIME_FORMAT,
+          GST_TIME_ARGS (input_clock_now), GST_TIME_ARGS (avf_timestamp),
+          GST_TIME_ARGS (input_clock_diff),
+          GST_TIME_ARGS (running_time), GST_TIME_ARGS (timestamp));
+    } else {
+      /* no clock, can't set timestamps */
+      timestamp = GST_CLOCK_TIME_NONE;
     }
-
-    if (GST_CLOCK_TIME_IS_VALID (startAVFTimestamp) &&
-        GST_CLOCK_TIME_IS_VALID (startTimestamp))
-      timestamp = startTimestamp + (timestamp - startAVFTimestamp);
+    GST_OBJECT_UNLOCK (element);
   }
 
-  GST_BUFFER_OFFSET (buf) = offset++;
-  GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
-  GST_BUFFER_TIMESTAMP (buf) = timestamp;
-  GST_BUFFER_DURATION (buf) = duration;
+  *outTimestamp = timestamp;
+  *outDuration = duration;
 }
 
 - (void)updateStatistics
diff --git a/sys/applemedia/avsamplevideosink.m b/sys/applemedia/avsamplevideosink.m
new file mode 100644
index 0000000..610b40a
--- /dev/null
+++ b/sys/applemedia/avsamplevideosink.m
@@ -0,0 +1,842 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.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-avsamplebufferlayersink
+ *
+ * avsamplebufferlayersink renders video frames to a CALayer that can placed
+ * inside a Core Animation render tree.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "avsamplevideosink.h"
+
+GST_DEBUG_CATEGORY (gst_debug_av_sink);
+#define GST_CAT_DEFAULT gst_debug_av_sink
+
+static void gst_av_sample_video_sink_finalize (GObject * object);
+static void gst_av_sample_video_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * param_spec);
+static void gst_av_sample_video_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * param_spec);
+
+static gboolean gst_av_sample_video_sink_start (GstBaseSink * bsink);
+static gboolean gst_av_sample_video_sink_stop (GstBaseSink * bsink);
+
+static void gst_av_sample_video_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end);
+static gboolean gst_av_sample_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
+static GstCaps * gst_av_sample_video_sink_get_caps (GstBaseSink * bsink, GstCaps * filter);
+static GstFlowReturn gst_av_sample_video_sink_prepare (GstBaseSink * bsink,
+    GstBuffer * buf);
+static GstFlowReturn gst_av_sample_video_sink_show_frame (GstVideoSink * bsink,
+    GstBuffer * buf);
+static gboolean gst_av_sample_video_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+
+static GstStaticPadTemplate gst_av_sample_video_sink_template =
+    GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGB, BGR, ARGB, BGRA, ABGR, RGBA, YUY2, UYVY, NV12, I420 }"))
+    );
+
+enum
+{
+  PROR_0,
+  PROP_FORCE_ASPECT_RATIO,
+  PROP_LAYER,
+};
+
+#define gst_av_sample_video_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstAVSampleVideoSink, gst_av_sample_video_sink,
+    GST_TYPE_VIDEO_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_av_sink, "avsamplevideosink", 0,
+        "AV Sample Video Sink"));
+
+static void
+gst_av_sample_video_sink_class_init (GstAVSampleVideoSinkClass * klass)
+{
+  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_av_sample_video_sink_set_property;
+  gobject_class->get_property = gst_av_sample_video_sink_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
+      g_param_spec_boolean ("force-aspect-ratio",
+          "Force aspect ratio",
+          "When enabled, scaling will respect original aspect ratio", TRUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_LAYER,
+      g_param_spec_pointer ("layer", "CALayer",
+          "The CoreAnimation layer that can be placed in the render tree",
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_set_metadata (element_class, "AV Sample video sink",
+      "Sink/Video", "A videosink based on AVSampleBuffer's",
+      "Matthew Waters <matthew@centricular.com>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_av_sample_video_sink_template));
+
+  gobject_class->finalize = gst_av_sample_video_sink_finalize;
+
+  gstbasesink_class->get_caps = gst_av_sample_video_sink_get_caps;
+  gstbasesink_class->set_caps = gst_av_sample_video_sink_set_caps;
+  gstbasesink_class->get_times = gst_av_sample_video_sink_get_times;
+  gstbasesink_class->prepare = gst_av_sample_video_sink_prepare;
+  gstbasesink_class->propose_allocation = gst_av_sample_video_sink_propose_allocation;
+  gstbasesink_class->stop = gst_av_sample_video_sink_stop;
+  gstbasesink_class->start = gst_av_sample_video_sink_start;
+
+  gstvideosink_class->show_frame =
+      GST_DEBUG_FUNCPTR (gst_av_sample_video_sink_show_frame);
+}
+
+static void
+gst_av_sample_video_sink_init (GstAVSampleVideoSink * av_sink)
+{
+  av_sink->keep_aspect_ratio = TRUE;
+
+  g_mutex_init (&av_sink->render_lock);
+}
+
+static void
+gst_av_sample_video_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAVSampleVideoSink *av_sink;
+
+  g_return_if_fail (GST_IS_AV_SAMPLE_VIDEO_SINK (object));
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+    {
+      av_sink->keep_aspect_ratio = g_value_get_boolean (value);
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_av_sample_video_sink_finalize (GObject * object)
+{
+  GstAVSampleVideoSink *av_sink = GST_AV_SAMPLE_VIDEO_SINK (object);
+  __block AVSampleBufferDisplayLayer *layer = av_sink->layer;
+
+  if (layer) {
+    dispatch_async (dispatch_get_main_queue (), ^{
+      [layer release];
+    });
+  }
+
+  g_mutex_clear (&av_sink->render_lock);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_av_sample_video_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAVSampleVideoSink *av_sink;
+
+  g_return_if_fail (GST_IS_AV_SAMPLE_VIDEO_SINK (object));
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (object);
+
+  switch (prop_id) {
+    case PROP_FORCE_ASPECT_RATIO:
+      g_value_set_boolean (value, av_sink->keep_aspect_ratio);
+      break;
+    case PROP_LAYER:
+      g_value_set_pointer (value, av_sink->layer);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_av_sample_video_sink_start (GstBaseSink * bsink)
+{
+  GstAVSampleVideoSink *av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+
+  if ([NSThread isMainThread]) {
+    av_sink->layer = [[AVSampleBufferDisplayLayer alloc] init];
+    if (av_sink->keep_aspect_ratio)
+      av_sink->layer.videoGravity = AVLayerVideoGravityResizeAspect;
+    else
+      av_sink->layer.videoGravity = AVLayerVideoGravityResize;
+    g_object_notify (G_OBJECT (av_sink), "layer");
+  } else {
+    dispatch_sync (dispatch_get_main_queue (), ^{
+      av_sink->layer = [[AVSampleBufferDisplayLayer alloc] init];
+      if (av_sink->keep_aspect_ratio)
+        av_sink->layer.videoGravity = AVLayerVideoGravityResizeAspect;
+      else
+        av_sink->layer.videoGravity = AVLayerVideoGravityResize;
+      g_object_notify (G_OBJECT (av_sink), "layer");
+    });
+  }
+
+  return TRUE;
+}
+
+/* with render lock */
+static void
+_stop_requesting_data (GstAVSampleVideoSink * av_sink)
+{
+  if (av_sink->layer) {
+    if (av_sink->layer_requesting_data)
+      [av_sink->layer stopRequestingMediaData];
+    av_sink->layer_requesting_data = FALSE;
+  }
+}
+
+static gboolean
+gst_av_sample_video_sink_stop (GstBaseSink * bsink)
+{
+  GstAVSampleVideoSink *av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+
+  if (av_sink->pool) {
+    gst_object_unref (av_sink->pool);
+    av_sink->pool = NULL;
+  }
+
+  if (av_sink->layer) {
+    g_mutex_lock (&av_sink->render_lock);
+    _stop_requesting_data (av_sink);
+    g_mutex_unlock (&av_sink->render_lock);
+    [av_sink->layer flushAndRemoveImage];
+  }
+
+  return TRUE;
+}
+
+static void
+gst_av_sample_video_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
+    GstClockTime * start, GstClockTime * end)
+{
+  GstAVSampleVideoSink *av_sink;
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+
+  if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+    *start = GST_BUFFER_TIMESTAMP (buf);
+    if (GST_BUFFER_DURATION_IS_VALID (buf))
+      *end = *start + GST_BUFFER_DURATION (buf);
+    else {
+      if (GST_VIDEO_INFO_FPS_N (&av_sink->info) > 0) {
+        *end = *start +
+            gst_util_uint64_scale_int (GST_SECOND,
+            GST_VIDEO_INFO_FPS_D (&av_sink->info),
+            GST_VIDEO_INFO_FPS_N (&av_sink->info));
+      }
+    }
+  }
+}
+
+static unsigned int
+_cv_pixel_format_type_from_video_format (GstVideoFormat format)
+{
+  switch (format) {
+    case GST_VIDEO_FORMAT_BGRA:
+      return kCVPixelFormatType_32BGRA;
+    case GST_VIDEO_FORMAT_ARGB:
+      return kCVPixelFormatType_32ARGB;
+    case GST_VIDEO_FORMAT_ABGR:
+      return kCVPixelFormatType_32ABGR;
+    case GST_VIDEO_FORMAT_RGBA:
+      return kCVPixelFormatType_32RGBA;
+    case GST_VIDEO_FORMAT_RGB:
+      return kCVPixelFormatType_24RGB;
+    case GST_VIDEO_FORMAT_BGR:
+      return kCVPixelFormatType_24BGR;
+#if 0
+    /* FIXME doesn't seem to work */
+    case GST_VIDEO_FORMAT_NV12:
+      return kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
+#endif
+    case GST_VIDEO_FORMAT_I420:
+      return kCVPixelFormatType_420YpCbCr8Planar;
+    case GST_VIDEO_FORMAT_YUY2:
+      return kCVPixelFormatType_422YpCbCr8_yuvs;
+    case GST_VIDEO_FORMAT_UYVY:
+      return kCVPixelFormatType_422YpCbCr8;
+    default:
+      return 0;
+  }
+}
+
+static GstVideoFormat
+_pixel_format_description_to_video_format (CFDictionaryRef attrs)
+{
+  CFNumberRef id_ref;
+  unsigned int id;
+
+  id_ref = (CFNumberRef) CFDictionaryGetValue (attrs, kCVPixelFormatConstant);
+  CFNumberGetValue (id_ref, kCFNumberIntType, &id);
+
+  GST_TRACE ("pixel format description id %u", id);
+
+  CFRelease (id_ref);
+
+  switch (id) {
+    case kCVPixelFormatType_32BGRA:
+      return GST_VIDEO_FORMAT_BGRA;
+    case kCVPixelFormatType_32ARGB:
+      return GST_VIDEO_FORMAT_ARGB;
+    case kCVPixelFormatType_32ABGR:
+      return GST_VIDEO_FORMAT_ABGR;
+    case kCVPixelFormatType_32RGBA:
+      return GST_VIDEO_FORMAT_RGBA;
+    case kCVPixelFormatType_24RGB:
+      return GST_VIDEO_FORMAT_RGB;
+    case kCVPixelFormatType_24BGR:
+      return GST_VIDEO_FORMAT_BGR;
+#if 0
+    case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange:
+      return GST_VIDEO_FORMAT_NV12;
+#endif
+    case kCVPixelFormatType_420YpCbCr8Planar:
+      return GST_VIDEO_FORMAT_I420;
+    case kCVPixelFormatType_422YpCbCr8_yuvs:
+      return GST_VIDEO_FORMAT_YUY2;
+    case kCVPixelFormatType_422YpCbCr8:
+      return GST_VIDEO_FORMAT_UYVY;
+    default:
+      return GST_VIDEO_FORMAT_UNKNOWN;
+  }
+}
+
+static GstCaps *
+gst_av_sample_video_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
+{
+  GstAVSampleVideoSink *av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+  CFArrayRef formats;
+  GstCaps *ret, *tmp;
+  int i, n;
+
+  formats =
+      CVPixelFormatDescriptionArrayCreateWithAllPixelFormatTypes
+      (kCFAllocatorDefault);
+
+  ret = gst_caps_new_empty ();
+
+  n = CFArrayGetCount (formats);
+  for (i = 0; i < n; i++) {
+    CFDictionaryRef attrs;
+    CFNumberRef fourcc;
+    unsigned int pixel_format;
+    GstVideoFormat v_format;
+    const char *format_str;
+    char *caps_str;
+
+    fourcc = (CFNumberRef)CFArrayGetValueAtIndex(formats, i);
+    CFNumberGetValue (fourcc, kCFNumberIntType, &pixel_format);
+    attrs = CVPixelFormatDescriptionCreateWithPixelFormatType (kCFAllocatorDefault,
+        pixel_format);
+
+    CFRelease (fourcc);
+
+    v_format = _pixel_format_description_to_video_format (attrs);
+    if (v_format != GST_VIDEO_FORMAT_UNKNOWN) {
+      format_str = gst_video_format_to_string (v_format);
+
+      caps_str = g_strdup_printf ("video/x-raw, format=%s", format_str);
+
+      ret = gst_caps_merge (ret, gst_caps_from_string (caps_str));
+
+      g_free (caps_str);
+    }
+
+    CFRelease (attrs);
+  }
+
+  ret = gst_caps_simplify (ret);
+
+  gst_caps_set_simple (ret, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height",
+      GST_TYPE_INT_RANGE, 0, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE, 0,
+      1, G_MAXINT, 1, NULL);
+  GST_DEBUG_OBJECT (av_sink, "returning caps %" GST_PTR_FORMAT, ret);
+
+  if (filter) {
+    tmp = gst_caps_intersect_full (ret, filter, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (ret);
+    ret = tmp;
+  }
+
+  CFRelease (formats);
+
+  return ret;
+}
+
+static gboolean
+gst_av_sample_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstAVSampleVideoSink *av_sink;
+  gint width;
+  gint height;
+  gboolean ok;
+  gint par_n, par_d;
+  gint display_par_n, display_par_d;
+  guint display_ratio_num, display_ratio_den;
+  GstVideoInfo vinfo;
+  GstStructure *structure;
+  GstBufferPool *newpool, *oldpool;
+
+  GST_DEBUG_OBJECT (bsink, "set caps with %" GST_PTR_FORMAT, caps);
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+
+  ok = gst_video_info_from_caps (&vinfo, caps);
+  if (!ok)
+    return FALSE;
+
+  width = GST_VIDEO_INFO_WIDTH (&vinfo);
+  height = GST_VIDEO_INFO_HEIGHT (&vinfo);
+
+  par_n = GST_VIDEO_INFO_PAR_N (&vinfo);
+  par_d = GST_VIDEO_INFO_PAR_D (&vinfo);
+
+  if (!par_n)
+    par_n = 1;
+
+  display_par_n = 1;
+  display_par_d = 1;
+
+  ok = gst_video_calculate_display_ratio (&display_ratio_num,
+      &display_ratio_den, width, height, par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (!ok)
+    return FALSE;
+
+  GST_TRACE_OBJECT (bsink, "PAR: %u/%u DAR:%u/%u", par_n, par_d, display_par_n,
+      display_par_d);
+
+  if (height % display_ratio_den == 0) {
+    GST_DEBUG_OBJECT (bsink, "keeping video height");
+    GST_VIDEO_SINK_WIDTH (av_sink) = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    GST_VIDEO_SINK_HEIGHT (av_sink) = height;
+  } else if (width % display_ratio_num == 0) {
+    GST_DEBUG_OBJECT (bsink, "keeping video width");
+    GST_VIDEO_SINK_WIDTH (av_sink) = width;
+    GST_VIDEO_SINK_HEIGHT (av_sink) = (guint)
+        gst_util_uint64_scale_int (width, display_ratio_den, display_ratio_num);
+  } else {
+    GST_DEBUG_OBJECT (bsink, "approximating while keeping video height");
+    GST_VIDEO_SINK_WIDTH (av_sink) = (guint)
+        gst_util_uint64_scale_int (height, display_ratio_num,
+        display_ratio_den);
+    GST_VIDEO_SINK_HEIGHT (av_sink) = height;
+  }
+  GST_DEBUG_OBJECT (bsink, "scaling to %dx%d", GST_VIDEO_SINK_WIDTH (av_sink),
+      GST_VIDEO_SINK_HEIGHT (av_sink));
+
+  av_sink->info = vinfo;
+
+  newpool = gst_video_buffer_pool_new ();
+  structure = gst_buffer_pool_get_config (newpool);
+  gst_buffer_pool_config_set_params (structure, caps, vinfo.size, 2, 0);
+  gst_buffer_pool_set_config (newpool, structure);
+
+  oldpool = av_sink->pool;
+  /* we don't activate the pool yet, this will be done by downstream after it
+   * has configured the pool. If downstream does not want our pool we will
+   * activate it when we render into it */
+  av_sink->pool = newpool;
+
+  /* unref the old sink */
+  if (oldpool) {
+    /* we don't deactivate, some elements might still be using it, it will
+     * be deactivated when the last ref is gone */
+    gst_object_unref (oldpool);
+  }
+
+  return TRUE;
+}
+
+static void
+_unmap_planar_frame (GstVideoFrame * v_frame, const void * data, gsize dataSize,
+    gsize numberOfPlanes, const void *planeAddressed[])
+{
+  GST_TRACE ("freeing video frame %p", v_frame);
+
+  gst_video_frame_unmap (v_frame);
+  g_free (v_frame);
+}
+
+static void
+_unmap_frame (GstVideoFrame * v_frame, const void * data)
+{
+  GST_TRACE ("freeing video frame %p", v_frame);
+
+  gst_video_frame_unmap (v_frame);
+  g_free (v_frame);
+}
+
+/* with render lock */
+static gboolean
+_enqueue_sample (GstAVSampleVideoSink * av_sink, GstBuffer *buf)
+{
+  CVPixelBufferRef pbuf;
+  CMVideoFormatDescriptionRef v_format_desc;
+  GstVideoFrame *v_frame;
+  CMSampleTimingInfo sample_time;
+  __block CMSampleBufferRef sample_buf;
+  CFArrayRef sample_attachments;
+  gsize l, r, t, b;
+  gint i;
+
+  GST_TRACE_OBJECT (av_sink, "redisplay of size:%ux%u, window size:%ux%u",
+      GST_VIDEO_INFO_WIDTH (&av_sink->info),
+      GST_VIDEO_INFO_HEIGHT (&av_sink->info),
+      GST_VIDEO_SINK_WIDTH (av_sink),
+      GST_VIDEO_SINK_HEIGHT (av_sink));
+
+  v_frame = g_new0 (GstVideoFrame, 1);
+
+  if (!gst_video_frame_map (v_frame, &av_sink->info, buf, GST_MAP_READ)) {
+    GST_ERROR_OBJECT (av_sink, "Failed to map input video frame");
+    g_free (v_frame);
+    return FALSE;
+  }
+
+  if (GST_VIDEO_INFO_N_PLANES (&v_frame->info) == 1) {
+    /* single plane */
+    if (kCVReturnSuccess != CVPixelBufferCreateWithBytes (NULL,
+        GST_VIDEO_INFO_WIDTH (&v_frame->info),
+        GST_VIDEO_INFO_HEIGHT (&v_frame->info),
+        _cv_pixel_format_type_from_video_format (GST_VIDEO_INFO_FORMAT (&v_frame->info)),
+        v_frame->data[0], v_frame->info.stride[0],
+        (CVPixelBufferReleaseBytesCallback) _unmap_frame, v_frame, NULL,
+        &pbuf)) {
+      GST_ERROR_OBJECT (av_sink, "Error creating Core Video pixel buffer");
+      gst_video_frame_unmap (v_frame);
+      g_free (v_frame);
+      return FALSE;
+    }
+  } else {
+    /* multi-planar */
+    gsize widths[GST_VIDEO_MAX_PLANES] = { 0, };
+    gsize heights[GST_VIDEO_MAX_PLANES] = { 0, };
+    gsize strides[GST_VIDEO_MAX_PLANES] = { 0, };
+    gint i;
+
+    for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&v_frame->info); i++) {
+      widths[i] = GST_VIDEO_INFO_COMP_WIDTH (&v_frame->info, i);
+      heights[i] = GST_VIDEO_INFO_COMP_HEIGHT (&v_frame->info, i);
+      strides[i] = GST_VIDEO_INFO_COMP_STRIDE (&v_frame->info, i);
+    }
+
+    if (kCVReturnSuccess != CVPixelBufferCreateWithPlanarBytes (NULL,
+        GST_VIDEO_INFO_WIDTH (&v_frame->info),
+        GST_VIDEO_INFO_HEIGHT (&v_frame->info),
+        _cv_pixel_format_type_from_video_format (GST_VIDEO_INFO_FORMAT (&v_frame->info)),
+         /* have to put something for these two parameters otherwise
+          * the callback is not called resulting in a big leak */
+        v_frame, v_frame->info.size,
+        GST_VIDEO_INFO_N_PLANES (&v_frame->info), v_frame->data,
+        widths, heights, strides,
+        (CVPixelBufferReleasePlanarBytesCallback) _unmap_planar_frame,
+        v_frame, NULL, &pbuf)) {
+      GST_ERROR_OBJECT (av_sink, "Error creating Core Video pixel buffer");
+      gst_video_frame_unmap (v_frame);
+      g_free (v_frame);
+      return FALSE;
+    }
+  }
+
+  CVPixelBufferLockBaseAddress (pbuf, kCVPixelBufferLock_ReadOnly);
+
+  CVPixelBufferGetExtendedPixels (pbuf, &l, &r, &t, &b);
+
+  GST_TRACE_OBJECT (av_sink, "CVPixelBuffer n_planes %u width %u height %u"
+      " data size %" G_GSIZE_FORMAT " extra pixels l %u r %u t %u b %u",
+      (guint) CVPixelBufferGetPlaneCount (pbuf),
+      (guint) CVPixelBufferGetWidth (pbuf),
+      (guint) CVPixelBufferGetHeight (pbuf),
+      CVPixelBufferGetDataSize (pbuf),
+      (guint) l, (guint) r, (guint) t, (guint) b);
+
+  GST_TRACE_OBJECT (av_sink, "GstVideoFrame n_planes %u width %u height %u"
+      " data size %"G_GSIZE_FORMAT " extra pixels l %u r %u t %u b %u",
+      GST_VIDEO_INFO_N_PLANES (&v_frame->info),
+      GST_VIDEO_INFO_WIDTH (&v_frame->info),
+      GST_VIDEO_INFO_HEIGHT (&v_frame->info),
+      v_frame->info.size, 0, 0, 0, 0);
+
+  if (GST_VIDEO_INFO_N_PLANES (&v_frame->info) > 1) {
+    for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&v_frame->info); i++) {
+      GST_TRACE_OBJECT (av_sink, "plane %i CVPixelBuffer width %u height %u "
+          "stride %u data %p", i,
+          (guint) CVPixelBufferGetWidthOfPlane (pbuf, i),
+          (guint) CVPixelBufferGetHeightOfPlane (pbuf, i),
+          (guint) CVPixelBufferGetBytesPerRowOfPlane (pbuf, i),
+          CVPixelBufferGetBaseAddressOfPlane (pbuf, i));
+      GST_TRACE_OBJECT (av_sink, "plane %i GstVideoFrame width %u height %u "
+          "stride %u data %p", i,
+          GST_VIDEO_INFO_COMP_WIDTH (&v_frame->info, i),
+          GST_VIDEO_INFO_COMP_HEIGHT (&v_frame->info, i),
+          GST_VIDEO_INFO_COMP_STRIDE (&v_frame->info, i),
+          CVPixelBufferGetBaseAddressOfPlane (pbuf, i));
+    }
+  } else {
+    GST_TRACE_OBJECT (av_sink, "CVPixelBuffer attrs stride %u data %p",
+      (guint) CVPixelBufferGetBytesPerRow (pbuf),
+      CVPixelBufferGetBaseAddress (pbuf));
+    GST_TRACE_OBJECT (av_sink, "GstVideoFrame attrs stride %u data %p",
+        v_frame->info.stride[0], v_frame->data[0]);
+  }
+
+  CVPixelBufferUnlockBaseAddress (pbuf, kCVPixelBufferLock_ReadOnly);
+
+  if (0 != CMVideoFormatDescriptionCreateForImageBuffer (kCFAllocatorDefault,
+        pbuf, &v_format_desc)) {
+    GST_ERROR_OBJECT (av_sink, "Failed to retrieve video format from "
+        "pixel buffer");
+    CFRelease (pbuf);
+    return FALSE;
+  }
+
+  sample_time.duration = CMTimeMake (GST_BUFFER_DURATION (buf), GST_SECOND);
+  sample_time.presentationTimeStamp = CMTimeMake (GST_BUFFER_PTS (buf), GST_SECOND);
+  sample_time.decodeTimeStamp = kCMTimeInvalid;
+
+  if (0 != CMSampleBufferCreateForImageBuffer (kCFAllocatorDefault, pbuf, TRUE,
+        NULL, NULL, v_format_desc, &sample_time, &sample_buf)) {
+    GST_ERROR_OBJECT (av_sink, "Failed to create CMSampleBuffer from "
+        "CVImageBuffer");
+    CFRelease (v_format_desc);
+    CFRelease (pbuf);
+    return FALSE;
+  }
+  CFRelease (v_format_desc);
+
+  sample_attachments = CMSampleBufferGetSampleAttachmentsArray (sample_buf, TRUE);
+  for (i = 0; i < CFArrayGetCount (sample_attachments); i++) {
+    CFMutableDictionaryRef attachments =
+       (CFMutableDictionaryRef) CFArrayGetValueAtIndex (sample_attachments, i);
+    /* Until we slave the CoreMedia clock, just display everything ASAP */
+    CFDictionarySetValue (attachments, kCMSampleAttachmentKey_DisplayImmediately,
+        kCFBooleanTrue);
+  }
+
+  if (av_sink->keep_aspect_ratio)
+    av_sink->layer.videoGravity = AVLayerVideoGravityResizeAspect;
+  else
+    av_sink->layer.videoGravity = AVLayerVideoGravityResize;
+  [av_sink->layer enqueueSampleBuffer:sample_buf];
+
+  CFRelease (pbuf);
+  CFRelease (sample_buf);
+
+  return TRUE;
+}
+
+static void
+_request_data (GstAVSampleVideoSink * av_sink)
+{
+  av_sink->layer_requesting_data = TRUE;
+
+  [av_sink->layer requestMediaDataWhenReadyOnQueue:
+        dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
+        usingBlock:^{
+    while (TRUE) {
+      /* don't needlessly fill up avsamplebufferdisplaylayer's queue.
+       * This also allows us to skip displaying late frames */
+      if (!av_sink->layer.readyForMoreMediaData)
+        break;
+
+      g_mutex_lock (&av_sink->render_lock);
+
+      if (!av_sink->buffer || av_sink->render_flow_return != GST_FLOW_OK) {
+        _stop_requesting_data (av_sink);
+        g_mutex_unlock (&av_sink->render_lock);
+        break;
+      }
+
+      if (!_enqueue_sample (av_sink, av_sink->buffer)) {
+        gst_buffer_unref (av_sink->buffer);
+        av_sink->buffer = NULL;
+        av_sink->render_flow_return = GST_FLOW_ERROR;
+        g_mutex_unlock (&av_sink->render_lock);
+        break;
+      }
+
+      gst_buffer_unref (av_sink->buffer);
+      av_sink->buffer = NULL;
+      av_sink->render_flow_return = GST_FLOW_OK;
+      g_mutex_unlock (&av_sink->render_lock);
+    }
+  }];
+}
+
+static GstFlowReturn
+gst_av_sample_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buf)
+{
+  GstAVSampleVideoSink *av_sink;
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+
+  GST_LOG_OBJECT (bsink, "preparing buffer:%p", buf);
+
+  if (GST_VIDEO_SINK_WIDTH (av_sink) < 1 ||
+      GST_VIDEO_SINK_HEIGHT (av_sink) < 1) {
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_av_sample_video_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
+{
+  GstAVSampleVideoSink *av_sink;
+  GstFlowReturn ret;
+
+  GST_TRACE_OBJECT (vsink, "rendering buffer:%p", buf);
+
+  av_sink = GST_AV_SAMPLE_VIDEO_SINK (vsink);
+
+  g_mutex_lock (&av_sink->render_lock);
+  if (av_sink->buffer)
+    gst_buffer_unref (av_sink->buffer);
+  av_sink->buffer = gst_buffer_ref (buf);
+  ret = av_sink->render_flow_return;
+
+  if (!av_sink->layer_requesting_data)
+    _request_data (av_sink);
+  g_mutex_unlock (&av_sink->render_lock);
+
+#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1010
+  if ([av_sink->layer status] == AVQueuedSampleBufferRenderingStatusFailed) {
+    GST_ERROR_OBJECT (av_sink, "failed to enqueue buffer on layer, %s",
+        [[[av_sink->layer error] description] UTF8String]);
+    return GST_FLOW_ERROR;
+  }
+#endif
+
+  return ret;
+}
+
+static gboolean
+gst_av_sample_video_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
+{
+  GstAVSampleVideoSink *av_sink = GST_AV_SAMPLE_VIDEO_SINK (bsink);
+  GstBufferPool *pool;
+  GstStructure *config;
+  GstCaps *caps;
+  guint size;
+  gboolean need_pool;
+
+  gst_query_parse_allocation (query, &caps, &need_pool);
+
+  if (caps == NULL)
+    goto no_caps;
+
+  if ((pool = av_sink->pool))
+    gst_object_ref (pool);
+
+  if (pool != NULL) {
+    GstCaps *pcaps;
+
+    /* we had a pool, check caps */
+    GST_DEBUG_OBJECT (av_sink, "check existing pool caps");
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_get_params (config, &pcaps, &size, NULL, NULL);
+
+    if (!gst_caps_is_equal (caps, pcaps)) {
+      GST_DEBUG_OBJECT (av_sink, "pool has different caps");
+      /* different caps, we can't use this pool */
+      gst_object_unref (pool);
+      pool = NULL;
+    }
+    gst_structure_free (config);
+  }
+
+  if (pool == NULL && need_pool) {
+    GstVideoInfo info;
+
+    if (!gst_video_info_from_caps (&info, caps))
+      goto invalid_caps;
+
+    GST_DEBUG_OBJECT (av_sink, "create new pool");
+    pool = gst_video_buffer_pool_new ();
+
+    /* the normal size of a frame */
+    size = info.size;
+
+    config = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
+    if (!gst_buffer_pool_set_config (pool, config))
+      goto config_failed;
+  }
+  /* we need at least 2 buffer because we hold on to the last one */
+  if (pool) {
+    gst_query_add_allocation_pool (query, pool, size, 2, 0);
+    gst_object_unref (pool);
+  }
+
+  /* we also support various metadata */
+  gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0);
+
+  return TRUE;
+
+  /* ERRORS */
+no_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "no caps specified");
+    return FALSE;
+  }
+invalid_caps:
+  {
+    GST_DEBUG_OBJECT (bsink, "invalid caps specified");
+    return FALSE;
+  }
+config_failed:
+  {
+    GST_DEBUG_OBJECT (bsink, "failed setting config");
+    return FALSE;
+  }
+}
diff --git a/sys/applemedia/coremediabuffer.c b/sys/applemedia/coremediabuffer.c
index 74b814b..681fe14 100644
--- a/sys/applemedia/coremediabuffer.c
+++ b/sys/applemedia/coremediabuffer.c
@@ -76,6 +76,8 @@
       return GST_VIDEO_FORMAT_UYVY;
     case kCVPixelFormatType_32BGRA:
       return GST_VIDEO_FORMAT_BGRA;
+    case kCVPixelFormatType_32RGBA:
+      return GST_VIDEO_FORMAT_RGBA;
     default:
       GST_WARNING ("Unknown OSType format: %d", (gint) format);
       return GST_VIDEO_FORMAT_UNKNOWN;
@@ -84,7 +86,7 @@
 
 static gboolean
 gst_core_media_buffer_wrap_pixel_buffer (GstBuffer * buf, GstVideoInfo * info,
-    CVPixelBufferRef pixel_buf, gboolean * has_padding)
+    CVPixelBufferRef pixel_buf, gboolean * has_padding, gboolean map)
 {
   guint n_planes;
   gsize offset[GST_VIDEO_MAX_PLANES] = { 0 };
@@ -92,7 +94,7 @@
   GstVideoMeta *video_meta;
   UInt32 size;
 
-  if (CVPixelBufferLockBaseAddress (pixel_buf, 0) != kCVReturnSuccess) {
+  if (map && CVPixelBufferLockBaseAddress (pixel_buf, 0) != kCVReturnSuccess) {
     GST_ERROR ("Could not lock pixel buffer base address");
     return FALSE;
   }
@@ -114,10 +116,12 @@
       offset[i] = plane_offset;
       plane_offset += size;
 
-      gst_buffer_append_memory (buf,
-          gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
-              CVPixelBufferGetBaseAddressOfPlane (pixel_buf, i), size, 0, size,
-              NULL, NULL));
+      if (map) {
+        gst_buffer_append_memory (buf,
+            gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
+                CVPixelBufferGetBaseAddressOfPlane (pixel_buf, i), size, 0,
+                size, NULL, NULL));
+      }
     }
   } else {
 
@@ -126,10 +130,12 @@
     offset[0] = 0;
     size = stride[0] * CVPixelBufferGetHeight (pixel_buf);
 
-    gst_buffer_append_memory (buf,
-        gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
-            CVPixelBufferGetBaseAddress (pixel_buf), size, 0, size, NULL,
-            NULL));
+    if (map) {
+      gst_buffer_append_memory (buf,
+          gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
+              CVPixelBufferGetBaseAddress (pixel_buf), size, 0, size, NULL,
+              NULL));
+    }
   }
 
   video_meta =
@@ -146,18 +152,24 @@
 {
   OSStatus status;
   gchar *data = NULL;
-  UInt32 size;
+  size_t offset = 0, length_at_offset, total_length;
 
-  status = CMBlockBufferGetDataPointer (block_buf, 0, 0, 0, &data);
-  if (status != noErr) {
-    return FALSE;
-  }
+  /* CMBlockBuffer can contain multiple non-continuous memory blocks */
+  do {
+    status =
+        CMBlockBufferGetDataPointer (block_buf, offset, &length_at_offset,
+        &total_length, &data);
+    if (status != kCMBlockBufferNoErr) {
+      return FALSE;
+    }
 
-  size = CMBlockBufferGetDataLength (block_buf);
+    /* retaining the CMBlockBuffer so it won't go away for the lifetime of the GstMemory */
+    gst_buffer_append_memory (buf,
+        gst_memory_new_wrapped (0, data, length_at_offset, 0, length_at_offset,
+            (gpointer) CFRetain (block_buf), (GDestroyNotify) CFRelease));
 
-  gst_buffer_append_memory (buf,
-      gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
-          size, 0, size, NULL, NULL));
+    offset += length_at_offset;
+  } while (offset < total_length);
 
   return TRUE;
 }
@@ -235,7 +247,7 @@
 
 GstBuffer *
 gst_core_media_buffer_new (CMSampleBufferRef sample_buf,
-    gboolean use_video_meta)
+    gboolean use_video_meta, gboolean map)
 {
   CVImageBufferRef image_buf;
   CMBlockBufferRef block_buf;
@@ -269,13 +281,13 @@
     }
 
     if (!gst_core_media_buffer_wrap_pixel_buffer (buf, &info, meta->pixel_buf,
-            &has_padding)) {
+            &has_padding, map)) {
       goto error;
     }
 
     /* If the video meta API is not supported, remove padding by
      * copying the core media buffer to a system memory buffer */
-    if (has_padding && !use_video_meta) {
+    if (map && has_padding && !use_video_meta) {
       GstBuffer *copy_buf;
       copy_buf = gst_core_media_buffer_new_from_buffer (buf, &info);
       if (!copy_buf) {
@@ -287,11 +299,9 @@
     }
 
   } else if (block_buf != NULL) {
-
-    if (!gst_core_media_buffer_wrap_block_buffer (buf, block_buf)) {
+    if (map && !gst_core_media_buffer_wrap_block_buffer (buf, block_buf)) {
       goto error;
     }
-
   } else {
     goto error;
   }
diff --git a/sys/applemedia/coremediabuffer.h b/sys/applemedia/coremediabuffer.h
index bc18acf..2b3b74d 100644
--- a/sys/applemedia/coremediabuffer.h
+++ b/sys/applemedia/coremediabuffer.h
@@ -43,7 +43,8 @@
 
 
 GstBuffer * gst_core_media_buffer_new      (CMSampleBufferRef sample_buf,
-                                            gboolean use_video_meta);
+                                            gboolean use_video_meta,
+                                            gboolean map);
 CVPixelBufferRef gst_core_media_buffer_get_pixel_buffer
                                            (GstBuffer * buf);
 GType gst_core_media_meta_api_get_type (void);
diff --git a/sys/applemedia/corevideobuffer.c b/sys/applemedia/corevideobuffer.c
index b1da334..269e19d 100644
--- a/sys/applemedia/corevideobuffer.c
+++ b/sys/applemedia/corevideobuffer.c
@@ -59,7 +59,8 @@
 }
 
 GstBuffer *
-gst_core_video_buffer_new (CVBufferRef cvbuf, GstVideoInfo * vinfo)
+gst_core_video_buffer_new (CVBufferRef cvbuf, GstVideoInfo * vinfo,
+    gboolean map)
 {
   CVPixelBufferRef pixbuf = NULL;
   GstBuffer *buf;
@@ -74,7 +75,7 @@
 
   pixbuf = (CVPixelBufferRef) cvbuf;
 
-  if (CVPixelBufferLockBaseAddress (pixbuf, 0) != kCVReturnSuccess) {
+  if (map && CVPixelBufferLockBaseAddress (pixbuf, 0) != kCVReturnSuccess) {
     goto error;
   }
 
@@ -101,10 +102,12 @@
       offset[i] = off;
       off += size;
 
-      gst_buffer_append_memory (buf,
-          gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
-              CVPixelBufferGetBaseAddressOfPlane (pixbuf, i), size, 0, size,
-              NULL, NULL));
+      if (map) {
+        gst_buffer_append_memory (buf,
+            gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
+                CVPixelBufferGetBaseAddressOfPlane (pixbuf, i), size, 0, size,
+                NULL, NULL));
+      }
     }
   } else {
     int size;
@@ -114,9 +117,11 @@
     offset[0] = 0;
     size = stride[0] * CVPixelBufferGetHeight (pixbuf);
 
-    gst_buffer_append_memory (buf,
-        gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
-            CVPixelBufferGetBaseAddress (pixbuf), size, 0, size, NULL, NULL));
+    if (map) {
+      gst_buffer_append_memory (buf,
+          gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE,
+              CVPixelBufferGetBaseAddress (pixbuf), size, 0, size, NULL, NULL));
+    }
   }
 
   if (vinfo) {
diff --git a/sys/applemedia/corevideobuffer.h b/sys/applemedia/corevideobuffer.h
index 53b16a9..8f58a6e 100644
--- a/sys/applemedia/corevideobuffer.h
+++ b/sys/applemedia/corevideobuffer.h
@@ -41,7 +41,8 @@
 } GstCoreVideoMeta;
 
 GstBuffer * gst_core_video_buffer_new      (CVBufferRef cvbuf,
-                                            GstVideoInfo *info);
+                                            GstVideoInfo *info,
+                                            gboolean map);
 GType gst_core_video_meta_api_get_type (void);
 
 G_END_DECLS
diff --git a/sys/applemedia/corevideotexturecache.m b/sys/applemedia/corevideotexturecache.m
new file mode 100644
index 0000000..d5b9aeb
--- /dev/null
+++ b/sys/applemedia/corevideotexturecache.m
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2010 Ole André Vadla Ravnås <oleavr@soundrop.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
+
+#if !HAVE_IOS
+#import <AppKit/AppKit.h>
+#include <gst/gl/cocoa/gstglcontext_cocoa.h>
+#endif
+#include "corevideotexturecache.h"
+#include "coremediabuffer.h"
+#include "corevideobuffer.h"
+#include "vtutil.h"
+
+typedef struct _ContextThreadData
+{
+  GstCoreVideoTextureCache *cache;
+  GstBuffer *input_buffer;
+  GstBuffer *output_buffer;
+} ContextThreadData;
+
+GstCoreVideoTextureCache *
+gst_core_video_texture_cache_new (GstGLContext * ctx)
+{
+  g_return_val_if_fail (ctx != NULL, NULL);
+
+  GstCoreVideoTextureCache *cache = g_new0 (GstCoreVideoTextureCache, 1);
+  cache->ctx = gst_object_ref (ctx);
+  gst_video_info_init (&cache->input_info);
+  cache->convert = gst_gl_color_convert_new (cache->ctx);
+
+#if !HAVE_IOS
+  CGLPixelFormatObj pixelFormat =
+      gst_gl_context_cocoa_get_pixel_format (GST_GL_CONTEXT_COCOA (ctx));
+  CGLContextObj platform_ctx =
+      (CGLContextObj) gst_gl_context_get_gl_context (ctx);
+  CVOpenGLTextureCacheCreate (kCFAllocatorDefault, NULL, platform_ctx,
+      pixelFormat, NULL, &cache->cache);
+#else
+  CFMutableDictionaryRef cache_attrs =
+      CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
+      &kCFTypeDictionaryValueCallBacks);
+  gst_vtutil_dict_set_i32 (cache_attrs,
+      kCVOpenGLESTextureCacheMaximumTextureAgeKey, 0);
+  CVOpenGLESTextureCacheCreate (kCFAllocatorDefault, (CFDictionaryRef) cache_attrs,
+      (CVEAGLContext) gst_gl_context_get_gl_context (ctx), NULL, &cache->cache);
+#endif
+
+  return cache;
+}
+
+void
+gst_core_video_texture_cache_free (GstCoreVideoTextureCache * cache)
+{
+  g_return_if_fail (cache != NULL);
+
+#if !HAVE_IOS
+  CVOpenGLTextureCacheRelease (cache->cache);
+#else
+  CFRelease (cache->cache); /* iOS has no "CVOpenGLESTextureCacheRelease" */
+#endif
+  gst_object_unref (cache->convert);
+  gst_object_unref (cache->ctx);
+  g_free (cache);
+}
+
+void
+gst_core_video_texture_cache_set_format (GstCoreVideoTextureCache * cache,
+    GstVideoFormat in_format, GstCaps * out_caps)
+{
+  GstCaps *in_caps;
+  GstCapsFeatures *features;
+
+  g_return_if_fail (gst_caps_is_fixed (out_caps));
+
+  out_caps = gst_caps_copy (out_caps);
+  features = gst_caps_get_features (out_caps, 0);
+  gst_caps_features_add (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  gst_video_info_from_caps (&cache->output_info, out_caps); 
+  
+  in_caps = gst_caps_copy (out_caps);
+  gst_caps_set_simple (in_caps, "format",
+          G_TYPE_STRING, gst_video_format_to_string (in_format), NULL);
+  features = gst_caps_get_features (in_caps, 0);
+  gst_caps_features_add (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
+  gst_video_info_from_caps (&cache->input_info, in_caps);
+
+  gst_gl_color_convert_set_caps (cache->convert, in_caps, out_caps);
+
+  gst_caps_unref (out_caps);
+  gst_caps_unref (in_caps);
+}
+
+static CVPixelBufferRef
+cv_pixel_buffer_from_gst_buffer (GstBuffer * buffer)
+{
+  GstCoreMediaMeta *cm_meta =
+      (GstCoreMediaMeta *) gst_buffer_get_meta (buffer,
+      gst_core_media_meta_api_get_type ());
+  GstCoreVideoMeta *cv_meta =
+      (GstCoreVideoMeta *) gst_buffer_get_meta (buffer,
+      gst_core_video_meta_api_get_type ());
+
+  g_return_val_if_fail (cm_meta || cv_meta, NULL);
+
+  return cm_meta ? cm_meta->pixel_buf : cv_meta->pixbuf;
+}
+
+static gboolean
+gl_mem_from_buffer (GstCoreVideoTextureCache * cache,
+        GstBuffer * buffer, GstMemory **mem1, GstMemory **mem2)
+{
+  gboolean ret = TRUE;
+#if !HAVE_IOS
+  CVOpenGLTextureRef texture = NULL;
+#else
+  CVOpenGLESTextureRef texture = NULL;
+#endif
+  CVPixelBufferRef pixel_buf = cv_pixel_buffer_from_gst_buffer (buffer);
+
+  *mem1 = NULL;
+  *mem2 = NULL;
+
+#if !HAVE_IOS
+  CVOpenGLTextureCacheFlush (cache->cache, 0);
+#else
+  CVOpenGLESTextureCacheFlush (cache->cache, 0);
+#endif
+
+  switch (GST_VIDEO_INFO_FORMAT (&cache->input_info)) {
+#if !HAVE_IOS
+      case GST_VIDEO_FORMAT_UYVY:
+        /* both avfvideosrc and vtdec on OSX when doing GLMemory negotiate UYVY
+         * under the hood, which means a single output texture. */
+        if (CVOpenGLTextureCacheCreateTextureFromImage (kCFAllocatorDefault,
+              cache->cache, pixel_buf, NULL, &texture) != kCVReturnSuccess)
+          goto error;
+
+        *mem1 = (GstMemory *) gst_gl_memory_wrapped_texture (cache->ctx,
+            CVOpenGLTextureGetName (texture), CVOpenGLTextureGetTarget (texture),
+            &cache->input_info, 0, NULL, texture, (GDestroyNotify) CFRelease);
+        break;
+#else
+      case GST_VIDEO_FORMAT_BGRA:
+        /* avfvideosrc does BGRA on iOS when doing GLMemory */
+        if (CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault,
+              cache->cache, pixel_buf, NULL, GL_TEXTURE_2D, GL_RGBA,
+              GST_VIDEO_INFO_WIDTH (&cache->input_info),
+              GST_VIDEO_INFO_HEIGHT (&cache->input_info),
+              GL_RGBA, GL_UNSIGNED_BYTE, 0, &texture) != kCVReturnSuccess)
+          goto error;
+
+        *mem1 = (GstMemory *) gst_gl_memory_wrapped_texture (cache->ctx,
+            CVOpenGLESTextureGetName (texture), CVOpenGLESTextureGetTarget (texture),
+            &cache->input_info, 0, NULL, texture, (GDestroyNotify) CFRelease);
+        break;
+      case GST_VIDEO_FORMAT_NV12: {
+        GstVideoGLTextureType textype;
+        GLenum texfmt;
+
+        textype = gst_gl_texture_type_from_format (cache->ctx, GST_VIDEO_FORMAT_NV12, 0);
+        texfmt = gst_gl_format_from_gl_texture_type (textype);
+
+        /* vtdec does NV12 on iOS when doing GLMemory */
+        if (CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault,
+              cache->cache, pixel_buf, NULL, GL_TEXTURE_2D, texfmt,
+              GST_VIDEO_INFO_WIDTH (&cache->input_info),
+              GST_VIDEO_INFO_HEIGHT (&cache->input_info),
+              texfmt, GL_UNSIGNED_BYTE, 0, &texture) != kCVReturnSuccess)
+          goto error;
+
+        *mem1 = (GstMemory *) gst_gl_memory_wrapped_texture (cache->ctx,
+            CVOpenGLESTextureGetName (texture), CVOpenGLESTextureGetTarget (texture),
+            &cache->input_info, 0, NULL, texture, (GDestroyNotify) CFRelease);
+
+        textype = gst_gl_texture_type_from_format (cache->ctx, GST_VIDEO_FORMAT_NV12, 1);
+        texfmt = gst_gl_format_from_gl_texture_type (textype);
+
+        if (CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault,
+              cache->cache, pixel_buf, NULL, GL_TEXTURE_2D, texfmt,
+              GST_VIDEO_INFO_WIDTH (&cache->input_info) / 2,
+              GST_VIDEO_INFO_HEIGHT (&cache->input_info) / 2,
+              texfmt, GL_UNSIGNED_BYTE, 1, &texture) != kCVReturnSuccess)
+          goto error;
+
+        *mem2 = (GstMemory *) gst_gl_memory_wrapped_texture (cache->ctx,
+            CVOpenGLESTextureGetName (texture), CVOpenGLESTextureGetTarget (texture),
+            &cache->input_info, 0, NULL, texture, (GDestroyNotify) CFRelease);
+        break;
+      }
+#endif
+      default:
+        g_warn_if_reached ();
+        ret = FALSE;
+    }
+
+  return ret;
+
+error:
+  ret = FALSE;
+
+  if (*mem1)
+      gst_memory_unref (*mem1);
+  if (*mem2)
+      gst_memory_unref (*mem2);
+
+  return ret;
+}
+
+static void
+_do_get_gl_buffer (GstGLContext * context, ContextThreadData * data)
+{
+  GstMemory *mem1 = NULL, *mem2 = NULL;
+  GstCoreVideoTextureCache *cache = data->cache;
+  GstBuffer *buffer = data->input_buffer;
+
+  if (!gl_mem_from_buffer (cache, buffer, &mem1, &mem2)) {
+    gst_buffer_unref (buffer);
+    data->output_buffer = NULL;
+    return;
+  }
+
+  gst_buffer_append_memory (buffer, mem1);
+  if (mem2)
+    gst_buffer_append_memory (buffer, mem2);
+
+  data->output_buffer = gst_gl_color_convert_perform (cache->convert, buffer);
+  gst_buffer_unref (buffer);
+}
+
+GstBuffer *
+gst_core_video_texture_cache_get_gl_buffer (GstCoreVideoTextureCache * cache,
+        GstBuffer * cv_buffer)
+{
+  ContextThreadData data = {cache, cv_buffer, NULL};
+  gst_gl_context_thread_add (cache->ctx,
+      (GstGLContextThreadFunc) _do_get_gl_buffer, &data);
+  return data.output_buffer;
+}
diff --git a/sys/applemedia/iosassetsrc.m b/sys/applemedia/iosassetsrc.m
index 53422ba..9cf7498 100644
--- a/sys/applemedia/iosassetsrc.m
+++ b/sys/applemedia/iosassetsrc.m
@@ -29,7 +29,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch iosassetsrc uri=assets-library://asset/asset.M4V?id=11&ext=M4V ! decodebin2 ! autoaudiosink
+ * gst-launch iosassetsrc uri=assets-library://asset/asset.M4V?id=11&ext=M4V ! decodebin ! autoaudiosink
  * ]| Plays asset with id a song.ogg from local dir.
  * </refsect2>
  */
diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m
index 44ff3e4..c17c38b 100644
--- a/sys/applemedia/plugin.m
+++ b/sys/applemedia/plugin.m
@@ -30,6 +30,7 @@
 #ifdef HAVE_AVFOUNDATION
 #include "avfvideosrc.h"
 #include "avfassetsrc.h"
+#include "avsamplevideosink.h"
 #endif
 #ifdef HAVE_VIDEOTOOLBOX
 #include "vtdec.h"
@@ -77,18 +78,21 @@
       GST_TYPE_AVF_VIDEO_SRC);
   res &= gst_element_register (plugin, "avfassetsrc", AV_RANK,
       GST_TYPE_AVF_ASSET_SRC);
+  res &= gst_element_register (plugin, "avsamplebufferlayersink",
+      GST_RANK_NONE, GST_TYPE_AV_SAMPLE_VIDEO_SINK);
 #endif
 
   res &= gst_element_register (plugin, "atdec", GST_RANK_MARGINAL, GST_TYPE_ATDEC);
 
 #ifdef HAVE_VIDEOTOOLBOX
   /* Check if the framework actually exists at runtime */
-  if (VTCompressionSessionCreate != NULL) {
-    res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC);
+  if (&VTCompressionSessionCreate != NULL) {
+    gst_vtdec_register_elements (plugin);
     gst_vtenc_register_elements (plugin);
   }
 #endif
 
+
   return res;
 }
 
diff --git a/sys/applemedia/qtkitvideosrc.m b/sys/applemedia/qtkitvideosrc.m
index e6b427f..2c15bb5 100644
--- a/sys/applemedia/qtkitvideosrc.m
+++ b/sys/applemedia/qtkitvideosrc.m
@@ -434,7 +434,7 @@
   [queueLock unlockWithCondition:
       ([queue count] == 0) ? NO_FRAMES : HAS_FRAME_OR_STOP_REQUEST];
 
-  *buf = gst_core_video_buffer_new ((CVBufferRef)frame, NULL);
+  *buf = gst_core_video_buffer_new ((CVBufferRef)frame, NULL, TRUE);
   CVBufferRelease (frame);
 
   [self timestampBuffer:*buf];
diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c
index 82757b0..5c5a994 100644
--- a/sys/applemedia/vtdec.c
+++ b/sys/applemedia/vtdec.c
@@ -35,13 +35,15 @@
 #include "config.h"
 #endif
 
+#include <string.h>
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/video/gstvideodecoder.h>
+#include <gst/gl/gstglcontext.h>
 #include "vtdec.h"
 #include "vtutil.h"
 #include "corevideobuffer.h"
-#include <string.h>
+#include "coremediabuffer.h"
 
 GST_DEBUG_CATEGORY_STATIC (gst_vtdec_debug_category);
 #define GST_CAT_DEFAULT gst_vtdec_debug_category
@@ -50,6 +52,8 @@
 
 static gboolean gst_vtdec_start (GstVideoDecoder * decoder);
 static gboolean gst_vtdec_stop (GstVideoDecoder * decoder);
+static gboolean gst_vtdec_decide_allocation (GstVideoDecoder * decoder,
+    GstQuery * query);
 static gboolean gst_vtdec_set_format (GstVideoDecoder * decoder,
     GstVideoCodecState * state);
 static gboolean gst_vtdec_flush (GstVideoDecoder * decoder);
@@ -57,7 +61,8 @@
 static GstFlowReturn gst_vtdec_handle_frame (GstVideoDecoder * decoder,
     GstVideoCodecFrame * frame);
 
-static gboolean gst_vtdec_create_session (GstVtdec * vtdec);
+static gboolean gst_vtdec_create_session (GstVtdec * vtdec,
+    GstVideoFormat format);
 static void gst_vtdec_invalidate_session (GstVtdec * vtdec);
 static CMSampleBufferRef cm_sample_buffer_from_gst_buffer (GstVtdec * vtdec,
     GstBuffer * buf);
@@ -82,33 +87,39 @@
     GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-h264, stream-format=avc, alignment=au;"
+    GST_STATIC_CAPS ("video/x-h264, stream-format=avc, alignment=au,"
+        " width=(int)[1, MAX], height=(int)[1, MAX];"
         "video/mpeg, mpegversion=2;" "image/jpeg")
     );
 
-#ifdef HAVE_IOS
-#define GST_VTDEC_VIDEO_FORMAT_STR "NV12"
-#define GST_VTDEC_VIDEO_FORMAT GST_VIDEO_FORMAT_NV12
-#define GST_VTDEC_CV_VIDEO_FORMAT kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
-#else
-#define GST_VTDEC_VIDEO_FORMAT_STR "UYVY"
-#define GST_VTDEC_VIDEO_FORMAT GST_VIDEO_FORMAT_UYVY
-#define GST_VTDEC_CV_VIDEO_FORMAT kCVPixelFormatType_422YpCbCr8
-#endif
-
 /* define EnableHardwareAcceleratedVideoDecoder in < 10.9 */
 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 1090
 const CFStringRef
     kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder =
 CFSTR ("EnableHardwareAcceleratedVideoDecoder");
+const CFStringRef
+    kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder =
+CFSTR ("RequireHardwareAcceleratedVideoDecoder");
 #endif
 
-#define VIDEO_SRC_CAPS \
-    GST_VIDEO_CAPS_MAKE("{" GST_VTDEC_VIDEO_FORMAT_STR "}")
+#ifdef HAVE_IOS
+#define GST_VTDEC_VIDEO_FORMAT_STR "NV12"
+#else
+#define GST_VTDEC_VIDEO_FORMAT_STR "UYVY"
+#endif
 
-G_DEFINE_TYPE_WITH_CODE (GstVtdec, gst_vtdec, GST_TYPE_VIDEO_DECODER,
-    GST_DEBUG_CATEGORY_INIT (gst_vtdec_debug_category, "vtdec", 0,
-        "debug category for vtdec element"));
+#ifdef HAVE_IOS
+#define VIDEO_SRC_CAPS \
+    GST_VIDEO_CAPS_MAKE_WITH_FEATURES \
+    (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, \
+        "RGBA") ";" \
+    GST_VIDEO_CAPS_MAKE(GST_VTDEC_VIDEO_FORMAT_STR) ";"
+#else
+#define VIDEO_SRC_CAPS \
+    GST_VIDEO_CAPS_MAKE(GST_VTDEC_VIDEO_FORMAT_STR) ";"
+#endif
+
+G_DEFINE_TYPE (GstVtdec, gst_vtdec, GST_TYPE_VIDEO_DECODER);
 
 static void
 gst_vtdec_class_init (GstVtdecClass * klass)
@@ -134,6 +145,8 @@
   gobject_class->finalize = gst_vtdec_finalize;
   video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_vtdec_start);
   video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vtdec_stop);
+  video_decoder_class->decide_allocation =
+      GST_DEBUG_FUNCPTR (gst_vtdec_decide_allocation);
   video_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_vtdec_set_format);
   video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vtdec_flush);
   video_decoder_class->finish = GST_DEBUG_FUNCPTR (gst_vtdec_finish);
@@ -156,6 +169,7 @@
 
   g_async_queue_unref (vtdec->reorder_queue);
 
+
   G_OBJECT_CLASS (gst_vtdec_parent_class)->finalize (object);
 }
 
@@ -177,12 +191,124 @@
   if (vtdec->session)
     gst_vtdec_invalidate_session (vtdec);
 
+  if (vtdec->texture_cache)
+    gst_core_video_texture_cache_free (vtdec->texture_cache);
+  vtdec->texture_cache = NULL;
+
   GST_DEBUG_OBJECT (vtdec, "stop");
 
   return TRUE;
 }
 
 static gboolean
+gst_vtdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
+{
+  gboolean ret;
+  GstCaps *caps;
+  GstCapsFeatures *features;
+  GstVtdec *vtdec = GST_VTDEC (decoder);
+
+  ret =
+      GST_VIDEO_DECODER_CLASS (gst_vtdec_parent_class)->decide_allocation
+      (decoder, query);
+  if (!ret)
+    goto out;
+
+  gst_query_parse_allocation (query, &caps, NULL);
+  if (caps) {
+    GstGLContext *gl_context = NULL;
+    features = gst_caps_get_features (caps, 0);
+
+    if (gst_caps_features_contains (features,
+            GST_CAPS_FEATURE_MEMORY_GL_MEMORY)) {
+      GstContext *context = NULL;
+      GstQuery *query = gst_query_new_context ("gst.gl.local_context");
+      if (gst_pad_peer_query (GST_VIDEO_DECODER_SRC_PAD (decoder), query)) {
+
+        gst_query_parse_context (query, &context);
+        if (context) {
+          const GstStructure *s = gst_context_get_structure (context);
+          gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &gl_context,
+              NULL);
+        }
+      }
+      gst_query_unref (query);
+
+      if (context) {
+        GstVideoFormat internal_format;
+        GstVideoCodecState *output_state =
+            gst_video_decoder_get_output_state (decoder);
+
+        GST_INFO_OBJECT (decoder, "pushing textures. GL context %p", context);
+        if (vtdec->texture_cache)
+          gst_core_video_texture_cache_free (vtdec->texture_cache);
+
+#ifdef HAVE_IOS
+        internal_format = GST_VIDEO_FORMAT_NV12;
+#else
+        internal_format = GST_VIDEO_FORMAT_UYVY;
+#endif
+        vtdec->texture_cache = gst_core_video_texture_cache_new (gl_context);
+        gst_core_video_texture_cache_set_format (vtdec->texture_cache,
+            internal_format, output_state->caps);
+        gst_video_codec_state_unref (output_state);
+        gst_object_unref (gl_context);
+      } else {
+        GST_WARNING_OBJECT (decoder,
+            "got memory:GLMemory caps but not GL context from downstream element");
+      }
+    }
+  }
+
+out:
+  return ret;
+}
+
+static gboolean
+gst_vtdec_negotiate_output_format (GstVtdec * vtdec,
+    GstVideoCodecState * input_state)
+{
+  GstCaps *caps = NULL, *peercaps = NULL, *templcaps;
+  GstVideoFormat output_format;
+  GstVideoCodecState *output_state = NULL;
+  GstCapsFeatures *features;
+  GstStructure *structure;
+  const gchar *s;
+
+  peercaps = gst_pad_peer_query_caps (GST_VIDEO_DECODER_SRC_PAD (vtdec), NULL);
+
+  /* Check if output supports GL caps by preference */
+  templcaps = gst_pad_get_pad_template_caps (GST_VIDEO_DECODER_SRC_PAD (vtdec));
+  caps =
+      gst_caps_intersect_full (templcaps, peercaps, GST_CAPS_INTERSECT_FIRST);
+
+  gst_caps_unref (peercaps);
+  gst_caps_unref (templcaps);
+
+  caps = gst_caps_truncate (caps);
+  structure = gst_caps_get_structure (caps, 0);
+  s = gst_structure_get_string (structure, "format");
+  output_format = gst_video_format_from_string (s);
+  features = gst_caps_features_copy (gst_caps_get_features (caps, 0));
+
+  gst_caps_unref (caps);
+
+  if (!gst_vtdec_create_session (vtdec, output_format)) {
+    gst_caps_features_free (features);
+    return FALSE;
+  }
+
+  output_state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (vtdec),
+      output_format, vtdec->video_info.width, vtdec->video_info.height,
+      input_state);
+
+  output_state->caps = gst_video_info_to_caps (&output_state->info);
+  gst_caps_set_features (output_state->caps, 0, features);
+
+  return TRUE;
+}
+
+static gboolean
 gst_vtdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
 {
   GstStructure *structure;
@@ -229,13 +355,9 @@
     CFRelease (vtdec->format_description);
   vtdec->format_description = format_description;
 
-  if (!gst_vtdec_create_session (vtdec))
+  if (!gst_vtdec_negotiate_output_format (vtdec, state))
     return FALSE;
 
-  gst_video_decoder_set_output_state (decoder,
-      GST_VTDEC_VIDEO_FORMAT, vtdec->video_info.width, vtdec->video_info.height,
-      state);
-
   return TRUE;
 }
 
@@ -312,12 +434,32 @@
 }
 
 static gboolean
-gst_vtdec_create_session (GstVtdec * vtdec)
+gst_vtdec_create_session (GstVtdec * vtdec, GstVideoFormat format)
 {
   CFMutableDictionaryRef output_image_buffer_attrs;
   VTDecompressionOutputCallbackRecord callback;
   CFMutableDictionaryRef videoDecoderSpecification;
   OSStatus status;
+  guint32 cv_format;
+
+  switch (format) {
+    case GST_VIDEO_FORMAT_NV12:
+      cv_format = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
+      break;
+    case GST_VIDEO_FORMAT_UYVY:
+      cv_format = kCVPixelFormatType_422YpCbCr8;
+      break;
+    case GST_VIDEO_FORMAT_RGBA:
+#ifdef HAVE_IOS
+      cv_format = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
+#else
+      cv_format = kCVPixelFormatType_422YpCbCr8;
+#endif
+      break;
+    default:
+      g_warn_if_reached ();
+      break;
+  }
 
   videoDecoderSpecification =
       CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
@@ -327,13 +469,17 @@
 #ifndef HAVE_IOS
   gst_vtutil_dict_set_boolean (videoDecoderSpecification,
       kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder, TRUE);
+  if (vtdec->require_hardware)
+    gst_vtutil_dict_set_boolean (videoDecoderSpecification,
+        kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder,
+        TRUE);
 #endif
 
   output_image_buffer_attrs =
       CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
       &kCFTypeDictionaryValueCallBacks);
   gst_vtutil_dict_set_i32 (output_image_buffer_attrs,
-      kCVPixelBufferPixelFormatTypeKey, GST_VTDEC_CV_VIDEO_FORMAT);
+      kCVPixelBufferPixelFormatTypeKey, cv_format);
   gst_vtutil_dict_set_i32 (output_image_buffer_attrs, kCVPixelBufferWidthKey,
       vtdec->video_info.width);
   gst_vtutil_dict_set_i32 (output_image_buffer_attrs, kCVPixelBufferHeightKey,
@@ -430,31 +576,92 @@
     return NULL;
 }
 
+/* Custom FreeBlock function for CMBlockBuffer */
+static void
+cm_block_buffer_freeblock (void *refCon, void *doomedMemoryBlock,
+    size_t sizeInBytes)
+{
+  GstMapInfo *info = (GstMapInfo *) refCon;
+
+  gst_memory_unmap (info->memory, info);
+  gst_memory_unref (info->memory);
+  g_slice_free (GstMapInfo, info);
+}
+
+static CMBlockBufferRef
+cm_block_buffer_from_gst_buffer (GstBuffer * buf, GstMapFlags flags)
+{
+  OSStatus status;
+  CMBlockBufferRef bbuf;
+  CMBlockBufferCustomBlockSource blockSource;
+  guint memcount, i;
+
+  /* Initialize custom block source structure */
+  blockSource.version = kCMBlockBufferCustomBlockSourceVersion;
+  blockSource.AllocateBlock = NULL;
+  blockSource.FreeBlock = cm_block_buffer_freeblock;
+
+  /* Determine number of memory blocks */
+  memcount = gst_buffer_n_memory (buf);
+  status = CMBlockBufferCreateEmpty (NULL, memcount, 0, &bbuf);
+  if (status != kCMBlockBufferNoErr) {
+    GST_ERROR ("CMBlockBufferCreateEmpty returned %d", (int) status);
+    return NULL;
+  }
+
+  /* Go over all GstMemory objects and add them to the CMBlockBuffer */
+  for (i = 0; i < memcount; ++i) {
+    GstMemory *mem;
+    GstMapInfo *info;
+
+    mem = gst_buffer_get_memory (buf, i);
+
+    info = g_slice_new (GstMapInfo);
+    if (!gst_memory_map (mem, info, flags)) {
+      GST_ERROR ("failed mapping memory");
+      g_slice_free (GstMapInfo, info);
+      gst_memory_unref (mem);
+      CFRelease (bbuf);
+      return NULL;
+    }
+
+    blockSource.refCon = info;
+    status =
+        CMBlockBufferAppendMemoryBlock (bbuf, info->data, info->size, NULL,
+        &blockSource, 0, info->size, 0);
+    if (status != kCMBlockBufferNoErr) {
+      GST_ERROR ("CMBlockBufferAppendMemoryBlock returned %d", (int) status);
+      gst_memory_unmap (mem, info);
+      g_slice_free (GstMapInfo, info);
+      gst_memory_unref (mem);
+      CFRelease (bbuf);
+      return NULL;
+    }
+  }
+
+  return bbuf;
+}
+
 static CMSampleBufferRef
 cm_sample_buffer_from_gst_buffer (GstVtdec * vtdec, GstBuffer * buf)
 {
   OSStatus status;
   CMBlockBufferRef bbuf = NULL;
   CMSampleBufferRef sbuf = NULL;
-  GstMapInfo map;
   CMSampleTimingInfo sample_timing;
   CMSampleTimingInfo time_array[1];
 
   g_return_val_if_fail (vtdec->format_description, NULL);
 
-  gst_buffer_map (buf, &map, GST_MAP_READ);
+  /* create a block buffer */
+  bbuf = cm_block_buffer_from_gst_buffer (buf, GST_MAP_READ);
+  if (bbuf == NULL) {
+    GST_ELEMENT_ERROR (vtdec, RESOURCE, FAILED, (NULL),
+        ("failed creating CMBlockBuffer"));
+    return NULL;
+  }
 
-  /* create a block buffer,  the CoreMedia equivalent of GstMemory */
-  status = CMBlockBufferCreateWithMemoryBlock (NULL,
-      map.data, (gint64) map.size, kCFAllocatorNull, NULL, 0, (gint64) map.size,
-      FALSE, &bbuf);
-
-  gst_buffer_unmap (buf, &map);
-
-  if (status != noErr)
-    goto block_error;
-
-  /* create a sample buffer, the CoreMedia equivalent of GstBuffer */
+  /* create a sample buffer */
   if (GST_BUFFER_DURATION_IS_VALID (buf))
     sample_timing.duration = CMTimeMake (GST_BUFFER_DURATION (buf), GST_SECOND);
   else
@@ -477,25 +684,14 @@
   status =
       CMSampleBufferCreate (NULL, bbuf, TRUE, 0, 0, vtdec->format_description,
       1, 1, time_array, 0, NULL, &sbuf);
-  if (status != noErr)
-    goto sample_error;
+  CFRelease (bbuf);
+  if (status != noErr) {
+    GST_ELEMENT_ERROR (vtdec, RESOURCE, FAILED, (NULL),
+        ("CMSampleBufferCreate returned %d", (int) status));
+    return NULL;
+  }
 
-out:
   return sbuf;
-
-block_error:
-  GST_ELEMENT_ERROR (vtdec, RESOURCE, FAILED, (NULL),
-      ("CMBlockBufferCreateWithMemoryBlock returned %d", (int) status));
-  goto out;
-
-sample_error:
-  GST_ELEMENT_ERROR (vtdec, RESOURCE, FAILED, (NULL),
-      ("CMSampleBufferCreate returned %d", (int) status));
-
-  if (bbuf)
-    CFRelease (bbuf);
-
-  goto out;
 }
 
 static gint
@@ -555,15 +751,14 @@
      * segment.format being undefined */
     goto release;
   }
-  buf = gst_core_video_buffer_new (image_buffer, &state->info);
+  buf =
+      gst_core_video_buffer_new (image_buffer, &state->info,
+      vtdec->texture_cache == NULL);
   gst_video_codec_state_unref (state);
-  frame->output_buffer = buf;
 
-  gst_buffer_copy_into (buf, frame->input_buffer,
-      GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_FLAGS, 0, -1);
   GST_BUFFER_PTS (buf) = pts.value;
   GST_BUFFER_DURATION (buf) = duration.value;
-
+  frame->output_buffer = buf;
   g_async_queue_push_sorted (vtdec->reorder_queue, frame,
       sort_frames_by_pts, NULL);
 
@@ -590,6 +785,14 @@
   GstFlowReturn ret = GST_FLOW_OK;
   GstVideoDecoder *decoder = GST_VIDEO_DECODER (vtdec);
 
+  /* FIXME: Instead of this, implement GstVideoDecoder::negotiate() and
+   * just call gst_video_decoder_negotiate()
+   */
+  /* negotiate now so that we know whether we need to use the GL upload meta or
+   * not */
+  if (gst_pad_check_reconfigure (decoder->srcpad))
+    gst_video_decoder_negotiate (decoder);
+
   if (drain)
     VTDecompressionSessionWaitForAsynchronousFrames (vtdec->session);
 
@@ -599,6 +802,14 @@
   while ((g_async_queue_length (vtdec->reorder_queue) >=
           vtdec->reorder_queue_length) || drain || flush) {
     frame = (GstVideoCodecFrame *) g_async_queue_try_pop (vtdec->reorder_queue);
+    if (frame && vtdec->texture_cache != NULL) {
+      frame->output_buffer =
+          gst_core_video_texture_cache_get_gl_buffer (vtdec->texture_cache,
+          frame->output_buffer);
+      if (!frame->output_buffer)
+        GST_ERROR_OBJECT (vtdec, "couldn't get textures from buffer");
+    }
+
     /* we need to check this in case reorder_queue_length=0 (jpeg for
      * example) or we're draining/flushing
      */
@@ -777,3 +988,51 @@
       vtdec->reorder_queue_length, GST_TIME_ARGS (latency));
   gst_video_decoder_set_latency (GST_VIDEO_DECODER (vtdec), latency, latency);
 }
+
+#ifndef HAVE_IOS
+#define GST_TYPE_VTDEC_HW   (gst_vtdec_hw_get_type())
+#define GST_VTDEC_HW(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VTDEC_HW,GstVtdecHw))
+#define GST_VTDEC_HW_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VTDEC_HW,GstVtdecHwClass))
+#define GST_IS_VTDEC_HW(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VTDEC_HW))
+#define GST_IS_VTDEC_HW_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VTDEC_HW))
+
+typedef GstVtdec GstVtdecHw;
+typedef GstVtdecClass GstVtdecHwClass;
+
+GType gst_vtdec_hw_get_type (void);
+
+G_DEFINE_TYPE (GstVtdecHw, gst_vtdec_hw, GST_TYPE_VTDEC);
+
+static void
+gst_vtdec_hw_class_init (GstVtdecHwClass * klass)
+{
+  gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass),
+      "Apple VideoToolbox decoder (hardware only)",
+      "Codec/Decoder/Video",
+      "Apple VideoToolbox Decoder",
+      "Ole André Vadla Ravnås <oleavr@soundrop.com>; "
+      "Alessandro Decina <alessandro.d@gmail.com>");
+}
+
+static void
+gst_vtdec_hw_init (GstVtdecHw * vtdec)
+{
+  GST_VTDEC (vtdec)->require_hardware = TRUE;
+}
+
+#endif
+
+void
+gst_vtdec_register_elements (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (gst_vtdec_debug_category, "vtdec", 0,
+      "debug category for vtdec element");
+
+#ifdef HAVE_IOS
+  gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC);
+#else
+  gst_element_register (plugin, "vtdec_hw", GST_RANK_PRIMARY + 1,
+      GST_TYPE_VTDEC_HW);
+  gst_element_register (plugin, "vtdec", GST_RANK_SECONDARY, GST_TYPE_VTDEC);
+#endif
+}
diff --git a/sys/applemedia/vtdec.h b/sys/applemedia/vtdec.h
index bc029bc..4b9c788 100644
--- a/sys/applemedia/vtdec.h
+++ b/sys/applemedia/vtdec.h
@@ -25,6 +25,7 @@
 #include <gst/video/gstvideodecoder.h>
 #include <CoreMedia/CoreMedia.h>
 #include <VideoToolbox/VideoToolbox.h>
+#include "corevideotexturecache.h"
 
 G_BEGIN_DECLS
 
@@ -45,6 +46,9 @@
   VTDecompressionSessionRef session;
   GAsyncQueue *reorder_queue;
   gint reorder_queue_length;
+  GstCoreVideoTextureCache *texture_cache;
+
+  gboolean require_hardware;
 };
 
 struct _GstVtdecClass
@@ -54,6 +58,8 @@
 
 GType gst_vtdec_get_type (void);
 
+void gst_vtdec_register_elements (GstPlugin * plugin);
+
 G_END_DECLS
 
 #endif
diff --git a/sys/applemedia/vtenc.c b/sys/applemedia/vtenc.c
index 8230883..e65e2f6 100644
--- a/sys/applemedia/vtenc.c
+++ b/sys/applemedia/vtenc.c
@@ -83,6 +83,7 @@
     GValue * value, GParamSpec * pspec);
 static void gst_vtenc_set_property (GObject * obj, guint prop_id,
     const GValue * value, GParamSpec * pspec);
+static void gst_vtenc_finalize (GObject * obj);
 
 static gboolean gst_vtenc_start (GstVideoEncoder * enc);
 static gboolean gst_vtenc_stop (GstVideoEncoder * enc);
@@ -173,7 +174,8 @@
       min_fps_n, min_fps_d, max_fps_n, max_fps_d, NULL);
   if (codec_details->format_id == kCMVideoCodecType_H264) {
     gst_structure_set (gst_caps_get_structure (src_caps, 0),
-        "stream-format", G_TYPE_STRING, "avc", NULL);
+        "stream-format", G_TYPE_STRING, "avc",
+        "alignment", G_TYPE_STRING, "au", NULL);
   }
   src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
       src_caps);
@@ -193,6 +195,7 @@
 
   gobject_class->get_property = gst_vtenc_get_property;
   gobject_class->set_property = gst_vtenc_set_property;
+  gobject_class->finalize = gst_vtenc_finalize;
 
   gstvideoencoder_class->start = gst_vtenc_start;
   gstvideoencoder_class->stop = gst_vtenc_stop;
@@ -243,6 +246,8 @@
 gst_vtenc_init (GstVTEnc * self)
 {
   GstVTEncClass *klass = (GstVTEncClass *) G_OBJECT_GET_CLASS (self);
+  CFStringRef keyframe_props_keys[] = { kVTEncodeFrameOptionKey_ForceKeyFrame };
+  CFBooleanRef keyframe_props_values[] = { kCFBooleanTrue };
 
   self->details = GST_VTENC_CLASS_GET_CODEC_DETAILS (klass);
 
@@ -252,6 +257,21 @@
   self->latency_frames = -1;
   self->session = NULL;
   self->profile_level = NULL;
+
+  self->keyframe_props =
+      CFDictionaryCreate (NULL, (const void **) keyframe_props_keys,
+      (const void **) keyframe_props_values, G_N_ELEMENTS (keyframe_props_keys),
+      &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+}
+
+static void
+gst_vtenc_finalize (GObject * obj)
+{
+  GstVTEnc *self = GST_VTENC_CAST (obj);
+
+  CFRelease (self->keyframe_props);
+
+  G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
 
 static guint
@@ -486,11 +506,6 @@
   if (self->profile_level)
     CFRelease (self->profile_level);
 
-  if (self->options != NULL) {
-    CFRelease (self->options);
-    self->options = NULL;
-  }
-
   if (self->input_state)
     gst_video_codec_state_unref (self->input_state);
   self->input_state = NULL;
@@ -621,11 +636,6 @@
   self->session = session;
   GST_OBJECT_UNLOCK (self);
 
-  if (self->options != NULL)
-    CFRelease (self->options);
-  self->options = CFDictionaryCreateMutable (NULL, 0,
-      &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-
   return TRUE;
 }
 
@@ -731,20 +741,25 @@
 gst_vtenc_finish (GstVideoEncoder * enc)
 {
   GstVTEnc *self = GST_VTENC_CAST (enc);
+  GstVideoCodecFrame *outframe;
   GstFlowReturn ret = GST_FLOW_OK;
   OSStatus vt_status;
 
+  /* We need to unlock the stream lock here because
+   * it can wait for gst_vtenc_enqueue_buffer() to
+   * handle a buffer... which will take the stream
+   * lock from another thread and then deadlock */
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
   vt_status =
       VTCompressionSessionCompleteFrames (self->session,
       kCMTimePositiveInfinity);
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
   if (vt_status != noErr) {
     GST_WARNING_OBJECT (self, "VTCompressionSessionCompleteFrames returned %d",
         (int) vt_status);
   }
 
-  while (g_async_queue_length (self->cur_outframes) > 0) {
-    GstVideoCodecFrame *outframe = g_async_queue_try_pop (self->cur_outframes);
-
+  while ((outframe = g_async_queue_try_pop (self->cur_outframes))) {
     ret =
         gst_video_encoder_finish_frame (GST_VIDEO_ENCODER_CAST (self),
         outframe);
@@ -1008,6 +1023,11 @@
 
   status = VTSessionCopyProperty (self->session,
       kVTCompressionPropertyKey_NumberOfPendingFrames, NULL, &value);
+  if (status != noErr || !value) {
+    GST_INFO_OBJECT (self, "failed to get NumberOfPendingFrames: %d", status);
+    return;
+  }
+
   CFNumberGetValue (value, kCFNumberSInt32Type, &frames);
   if (self->latency_frames == -1 || self->latency_frames != frames) {
     self->latency_frames = frames;
@@ -1029,21 +1049,15 @@
   CMTime ts, duration;
   GstCoreMediaMeta *meta;
   CVPixelBufferRef pbuf = NULL;
+  GstVideoCodecFrame *outframe;
   OSStatus vt_status;
   GstFlowReturn ret = GST_FLOW_OK;
-  guint i;
-  gboolean forced_keyframe = FALSE;
+  gboolean renegotiated;
+  CFDictionaryRef frame_props = NULL;
 
   if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) {
-    if (self->options != NULL) {
-      GST_INFO_OBJECT (self, "received force-keyframe-event, will force intra");
-      CFDictionaryAddValue (self->options,
-          kVTEncodeFrameOptionKey_ForceKeyFrame, kCFBooleanTrue);
-      forced_keyframe = TRUE;
-    } else {
-      GST_INFO_OBJECT (self,
-          "received force-keyframe-event but encode not yet started, ignoring");
-    }
+    GST_INFO_OBJECT (self, "received force-keyframe-event, will force intra");
+    frame_props = self->keyframe_props;
   }
 
   ts = CMTimeMake (frame->pts, GST_SECOND);
@@ -1092,7 +1106,8 @@
       goto cv_error;
     }
 
-    outbuf = gst_core_video_buffer_new ((CVBufferRef) pbuf, &self->video_info);
+    outbuf =
+        gst_core_video_buffer_new ((CVBufferRef) pbuf, &self->video_info, TRUE);
     if (!gst_video_frame_map (&outframe, &self->video_info, outbuf,
             GST_MAP_WRITE)) {
       gst_video_frame_unmap (&inframe);
@@ -1149,6 +1164,7 @@
           pixel_format_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
           break;
         default:
+          gst_vtenc_frame_free (vframe);
           goto cv_error;
       }
 
@@ -1177,45 +1193,48 @@
    * lock from another thread and then deadlock */
   GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
   vt_status = VTCompressionSessionEncodeFrame (self->session,
-      pbuf, ts, duration, self->options,
+      pbuf, ts, duration, frame_props,
       GINT_TO_POINTER (frame->system_frame_number), NULL);
   GST_VIDEO_ENCODER_STREAM_LOCK (self);
 
-  /* Only force one keyframe */
-  if (forced_keyframe) {
-    CFDictionaryRemoveValue (self->options,
-        kVTEncodeFrameOptionKey_ForceKeyFrame);
-  }
-
   if (vt_status != noErr) {
     GST_WARNING_OBJECT (self, "VTCompressionSessionEncodeFrame returned %d",
         (int) vt_status);
   }
 
+  /* VTCompressionSessionEncodeFrame retained pbuf
+   * and we want to free input_buffer ASAP */
+  gst_buffer_replace (&frame->input_buffer, NULL);
+
   gst_video_codec_frame_unref (frame);
 
   CVPixelBufferRelease (pbuf);
 
-  i = 0;
-  while (g_async_queue_length (self->cur_outframes) > 0) {
-    GstVideoCodecFrame *outframe = g_async_queue_try_pop (self->cur_outframes);
-
-    /* Try to renegotiate once */
-    if (i == 0) {
-      meta = gst_buffer_get_core_media_meta (outframe->output_buffer);
-      if (!gst_vtenc_negotiate_downstream (self, meta->sample_buf)) {
-        ret = GST_FLOW_NOT_NEGOTIATED;
-        gst_video_codec_frame_unref (outframe);
-        break;
+  renegotiated = FALSE;
+  while ((outframe = g_async_queue_try_pop (self->cur_outframes))) {
+    if (outframe->output_buffer) {
+      if (!renegotiated) {
+        meta = gst_buffer_get_core_media_meta (outframe->output_buffer);
+        /* Try to renegotiate once */
+        if (meta) {
+          if (gst_vtenc_negotiate_downstream (self, meta->sample_buf)) {
+            renegotiated = TRUE;
+          } else {
+            ret = GST_FLOW_NOT_NEGOTIATED;
+            gst_video_codec_frame_unref (outframe);
+            /* the rest of the frames will be pop'd and unref'd later */
+            break;
+          }
+        }
       }
 
       gst_vtenc_update_latency (self);
     }
 
+    /* releases frame, even if it has no output buffer (i.e. failed to encode) */
     ret =
         gst_video_encoder_finish_frame (GST_VIDEO_ENCODER_CAST (self),
         outframe);
-    i++;
   }
 
   return ret;
@@ -1237,9 +1256,24 @@
   gboolean is_keyframe;
   GstVideoCodecFrame *frame;
 
+  frame =
+      gst_video_encoder_get_frame (GST_VIDEO_ENCODER_CAST (self),
+      GPOINTER_TO_INT (sourceFrameRefCon));
+
   if (status != noErr) {
-    GST_ELEMENT_ERROR (self, LIBRARY, ENCODE, (NULL), ("Failed to encode: %d",
-            (int) status));
+    if (frame) {
+      GST_ELEMENT_ERROR (self, LIBRARY, ENCODE, (NULL),
+          ("Failed to encode frame %d: %d", frame->system_frame_number,
+              (int) status));
+    } else {
+      GST_ELEMENT_ERROR (self, LIBRARY, ENCODE, (NULL),
+          ("Failed to encode (frame unknown): %d", (int) status));
+    }
+    goto beach;
+  }
+
+  if (!frame) {
+    GST_WARNING_OBJECT (self, "No corresponding frame found!");
     goto beach;
   }
 
@@ -1249,10 +1283,6 @@
 
   is_keyframe = gst_vtenc_buffer_is_keyframe (self, sampleBuffer);
 
-  frame =
-      gst_video_encoder_get_frame (GST_VIDEO_ENCODER_CAST (self),
-      GPOINTER_TO_INT (sourceFrameRefCon));
-
   if (is_keyframe) {
     GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
     gst_vtenc_clear_cached_caps_downstream (self);
@@ -1260,12 +1290,12 @@
 
   /* We are dealing with block buffers here, so we don't need
    * to enable the use of the video meta API on the core media buffer */
-  frame->output_buffer = gst_core_media_buffer_new (sampleBuffer, FALSE);
-
-  g_async_queue_push (self->cur_outframes, frame);
+  frame->output_buffer = gst_core_media_buffer_new (sampleBuffer, FALSE, TRUE);
 
 beach:
-  return;
+  /* needed anyway so the frame will be released */
+  if (frame)
+    g_async_queue_push (self->cur_outframes, frame);
 }
 
 static gboolean
@@ -1349,7 +1379,7 @@
   g_type_set_qdata (type, GST_VTENC_CODEC_DETAILS_QDATA,
       (gpointer) codec_details);
 
-  result = gst_element_register (plugin, type_name, GST_RANK_NONE, type);
+  result = gst_element_register (plugin, type_name, GST_RANK_PRIMARY, type);
   if (!result) {
     GST_ERROR_OBJECT (plugin, "failed to register element %s", type_name);
   }
diff --git a/sys/applemedia/vtenc.h b/sys/applemedia/vtenc.h
index 38eab1e..3bbe3c6 100644
--- a/sys/applemedia/vtenc.h
+++ b/sys/applemedia/vtenc.h
@@ -76,7 +76,7 @@
   GstVideoCodecState *input_state;
   GstVideoInfo video_info;
   VTCompressionSessionRef session;
-  CFMutableDictionaryRef options;
+  CFDictionaryRef keyframe_props;
 
   GAsyncQueue * cur_outframes;
 };
diff --git a/sys/avc/Makefile.in b/sys/avc/Makefile.in
index d3ed387..2efb74a 100644
--- a/sys/avc/Makefile.in
+++ b/sys/avc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/avc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -228,6 +238,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -245,8 +256,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -271,8 +284,6 @@
 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@
@@ -285,7 +296,6 @@
 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@
@@ -293,6 +303,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -319,11 +331,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -342,8 +357,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -402,10 +415,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -422,7 +439,6 @@
 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@
@@ -431,7 +447,6 @@
 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@
@@ -444,7 +459,6 @@
 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@
@@ -458,6 +472,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -469,6 +484,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -507,6 +524,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -542,10 +560,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -571,6 +593,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -578,7 +603,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -607,6 +639,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -617,6 +650,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -647,17 +681,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -674,6 +707,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -712,6 +746,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -763,7 +798,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/avc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/avc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1080,6 +1114,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/bluez/Makefile.am b/sys/bluez/Makefile.am
index cc90176..c6b13db 100644
--- a/sys/bluez/Makefile.am
+++ b/sys/bluez/Makefile.am
@@ -7,18 +7,23 @@
 	gstavdtpsrc.c \
 	gstavdtputil.c
 
+nodist_libgstbluez_la_SOURCES = \
+	$(BUILT_SOURCES)
+
 libgstbluez_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GST_BASE_CFLAGS) \
 	$(GST_CFLAGS) \
-	$(DBUS_CFLAGS)
+	$(GIO_CFLAGS) \
+	$(GIO_UNIX_CFLAGS)
 libgstbluez_la_LIBADD = \
 	$(GST_PLUGINS_BASE_LIBS) \
 	-lgstaudio-$(GST_API_VERSION) \
 	-lgstrtp-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) \
 	$(GST_LIBS) \
-	$(DBUS_LIBS)
+	$(GIO_LIBS) \
+	$(GIO_UNIX_LIBS)
 libgstbluez_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstbluez_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
@@ -28,3 +33,19 @@
 	gstavdtpsink.h \
 	gstavdtpsrc.h \
 	gstavdtputil.h
+
+BUILT_SOURCES = \
+	bluez.h \
+	bluez.c
+
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = org.bluez.xml
+
+bluez.h: bluez.c
+bluez.c: org.bluez.xml
+	$(AM_V_GEN) $(GDBUS_CODEGEN) \
+        --c-namespace=Bluez \
+        --generate-c-code=bluez \
+        --interface-prefix=org.bluez \
+        $<
diff --git a/sys/bluez/Makefile.in b/sys/bluez/Makefile.in
index f173045..b74a384 100644
--- a/sys/bluez/Makefile.in
+++ b/sys/bluez/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/bluez
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -156,11 +166,14 @@
 am__DEPENDENCIES_1 =
 libgstbluez_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_libgstbluez_la_OBJECTS = libgstbluez_la-bluez-plugin.lo \
 	libgstbluez_la-gsta2dpsink.lo libgstbluez_la-gstavdtpsink.lo \
 	libgstbluez_la-gstavdtpsrc.lo libgstbluez_la-gstavdtputil.lo
-libgstbluez_la_OBJECTS = $(am_libgstbluez_la_OBJECTS)
+am__objects_1 = libgstbluez_la-bluez.lo
+nodist_libgstbluez_la_OBJECTS = $(am__objects_1)
+libgstbluez_la_OBJECTS = $(am_libgstbluez_la_OBJECTS) \
+	$(nodist_libgstbluez_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -203,7 +216,7 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstbluez_la_SOURCES)
+SOURCES = $(libgstbluez_la_SOURCES) $(nodist_libgstbluez_la_SOURCES)
 DIST_SOURCES = $(libgstbluez_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
@@ -230,6 +243,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +261,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +289,6 @@
 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@
@@ -287,7 +301,6 @@
 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@
@@ -295,6 +308,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +336,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +362,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +420,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +444,6 @@
 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@
@@ -433,7 +452,6 @@
 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@
@@ -446,7 +464,6 @@
 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@
@@ -460,6 +477,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +489,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +529,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +565,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +598,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +608,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +644,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +655,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +686,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +712,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +751,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -735,11 +773,15 @@
 	gstavdtpsrc.c \
 	gstavdtputil.c
 
+nodist_libgstbluez_la_SOURCES = \
+	$(BUILT_SOURCES)
+
 libgstbluez_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GST_BASE_CFLAGS) \
 	$(GST_CFLAGS) \
-	$(DBUS_CFLAGS)
+	$(GIO_CFLAGS) \
+	$(GIO_UNIX_CFLAGS)
 
 libgstbluez_la_LIBADD = \
 	$(GST_PLUGINS_BASE_LIBS) \
@@ -747,7 +789,8 @@
 	-lgstrtp-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) \
 	$(GST_LIBS) \
-	$(DBUS_LIBS)
+	$(GIO_LIBS) \
+	$(GIO_UNIX_LIBS)
 
 libgstbluez_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstbluez_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
@@ -758,7 +801,14 @@
 	gstavdtpsrc.h \
 	gstavdtputil.h
 
-all: all-am
+BUILT_SOURCES = \
+	bluez.h \
+	bluez.c
+
+CLEANFILES = $(BUILT_SOURCES)
+EXTRA_DIST = org.bluez.xml
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -774,7 +824,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/bluez/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/bluez/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -838,6 +887,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbluez_la-bluez-plugin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbluez_la-bluez.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbluez_la-gsta2dpsink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbluez_la-gstavdtpsink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbluez_la-gstavdtpsrc.Plo@am__quote@
@@ -902,6 +952,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 $(libgstbluez_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbluez_la_CFLAGS) $(CFLAGS) -c -o libgstbluez_la-gstavdtputil.lo `test -f 'gstavdtputil.c' || echo '$(srcdir)/'`gstavdtputil.c
 
+libgstbluez_la-bluez.lo: bluez.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstbluez_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbluez_la_CFLAGS) $(CFLAGS) -MT libgstbluez_la-bluez.lo -MD -MP -MF $(DEPDIR)/libgstbluez_la-bluez.Tpo -c -o libgstbluez_la-bluez.lo `test -f 'bluez.c' || echo '$(srcdir)/'`bluez.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbluez_la-bluez.Tpo $(DEPDIR)/libgstbluez_la-bluez.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='bluez.c' object='libgstbluez_la-bluez.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 $(libgstbluez_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbluez_la_CFLAGS) $(CFLAGS) -c -o libgstbluez_la-bluez.lo `test -f 'bluez.c' || echo '$(srcdir)/'`bluez.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -991,13 +1048,15 @@
 	  fi; \
 	done
 check-am: all-am
-check: check-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: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -1019,6 +1078,7 @@
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1027,6 +1087,7 @@
 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-pluginLTLIBRARIES \
@@ -1098,7 +1159,7 @@
 
 uninstall-am: uninstall-pluginLTLIBRARIES
 
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
@@ -1115,6 +1176,16 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
+
+bluez.h: bluez.c
+bluez.c: org.bluez.xml
+	$(AM_V_GEN) $(GDBUS_CODEGEN) \
+        --c-namespace=Bluez \
+        --generate-c-code=bluez \
+        --interface-prefix=org.bluez \
+        $<
 
 # 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.
diff --git a/sys/bluez/gstavdtpsink.c b/sys/bluez/gstavdtpsink.c
index b549caa..70dc742 100644
--- a/sys/bluez/gstavdtpsink.c
+++ b/sys/bluez/gstavdtpsink.c
@@ -34,8 +34,6 @@
 #include <fcntl.h>
 #include <netinet/in.h>
 
-#include <dbus/dbus.h>
-
 #include "a2dp-codecs.h"
 
 #include "gstavdtpsink.h"
@@ -263,7 +261,7 @@
   if (self->conn.transport == NULL)
     return FALSE;
 
-  if (!gst_avdtp_connection_acquire (&self->conn)) {
+  if (!gst_avdtp_connection_acquire (&self->conn, FALSE)) {
     GST_ERROR_OBJECT (self, "Failed to acquire connection");
     return FALSE;
   }
diff --git a/sys/bluez/gstavdtpsrc.c b/sys/bluez/gstavdtpsrc.c
index 311c407..fee5505 100644
--- a/sys/bluez/gstavdtpsrc.c
+++ b/sys/bluez/gstavdtpsrc.c
@@ -39,7 +39,7 @@
 enum
 {
   PROP_0,
-  PROP_TRANSPORT
+  PROP_TRANSPORT,
 };
 
 #define parent_class gst_avdtp_src_parent_class
@@ -199,7 +199,7 @@
       value = gst_structure_get_value (structure, "mpegversion");
       if (!value || !G_VALUE_HOLDS_INT (value)) {
         GST_ERROR_OBJECT (avdtpsrc, "Failed to get mpegversion");
-        goto fail;
+        return NULL;
       }
       gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT,
           g_value_get_int (value), NULL);
@@ -207,7 +207,7 @@
       value = gst_structure_get_value (structure, "channels");
       if (!value || !G_VALUE_HOLDS_INT (value)) {
         GST_ERROR_OBJECT (avdtpsrc, "Failed to get channels");
-        goto fail;
+        return NULL;
       }
       gst_caps_set_simple (caps, "channels", G_TYPE_INT,
           g_value_get_int (value), NULL);
@@ -215,7 +215,7 @@
       value = gst_structure_get_value (structure, "base-profile");
       if (!value || !G_VALUE_HOLDS_STRING (value)) {
         GST_ERROR_OBJECT (avdtpsrc, "Failed to get base-profile");
-        goto fail;
+        return NULL;
       }
       gst_caps_set_simple (caps, "base-profile", G_TYPE_STRING,
           g_value_get_string (value), NULL);
@@ -228,7 +228,7 @@
     value = gst_structure_get_value (structure, "rate");
     if (!value || !G_VALUE_HOLDS_INT (value)) {
       GST_ERROR_OBJECT (avdtpsrc, "Failed to get sample rate");
-      goto fail;
+      return NULL;
     }
     rate = g_value_get_int (value);
 
@@ -245,12 +245,6 @@
   }
 
   return ret;
-
-fail:
-  if (ret)
-    gst_caps_unref (ret);
-
-  return NULL;
 }
 
 static gboolean
@@ -262,7 +256,7 @@
    * connection to figure out what format the device is going to send us.
    */
 
-  if (!gst_avdtp_connection_acquire (&avdtpsrc->conn)) {
+  if (!gst_avdtp_connection_acquire (&avdtpsrc->conn, FALSE)) {
     GST_ERROR_OBJECT (avdtpsrc, "Failed to acquire connection");
     return FALSE;
   }
diff --git a/sys/bluez/gstavdtputil.c b/sys/bluez/gstavdtputil.c
index caf7275..a435c6a 100644
--- a/sys/bluez/gstavdtputil.c
+++ b/sys/bluez/gstavdtputil.c
@@ -36,87 +36,135 @@
 #include <bluetooth/bluetooth.h>
 #include "a2dp-codecs.h"
 
+#include <gio/gunixfdlist.h>
 #include <gst/gst.h>
 #include "gstavdtputil.h"
+#include "bluez.h"
 
 #define TEMPLATE_MAX_BITPOOL 64
 
 GST_DEBUG_CATEGORY_EXTERN (avdtp_debug);
 #define GST_CAT_DEFAULT avdtp_debug
 
-gboolean
-gst_avdtp_connection_acquire (GstAvdtpConnection * conn)
+static void gst_avdtp_connection_transport_release (GstAvdtpConnection * conn);
+
+static gboolean
+on_state_change (BluezMediaTransport1 * proxy, GParamSpec * pspec,
+    GstAvdtpConnection * conn)
 {
-  DBusMessage *msg, *reply;
-  DBusError err;
-  const char *access_type = "rw";
+  const gchar *newstate;
+  gboolean is_idle;
+
+  newstate = bluez_media_transport1_get_state (proxy);
+  is_idle = g_str_equal (newstate, "idle");
+
+  if (!conn->data.is_acquired && !is_idle) {
+    GST_DEBUG ("Re-acquiring connection");
+    gst_avdtp_connection_acquire (conn, TRUE);
+
+  } else if (is_idle) {
+    /* We don't know if we need to release the transport -- that may have been
+     * done for us by bluez already! Or not ... so release it just in case, but
+     * mark its stale beforehand to suppress any errors. */
+    GST_DEBUG ("Marking connection stale");
+    conn->data.is_acquired = FALSE;
+    gst_avdtp_connection_transport_release (conn);
+
+  } else
+    GST_DEBUG ("State is %s, acquired is %s", newstate,
+        conn->data.is_acquired ? "true" : "false");
+
+  return TRUE;
+}
+
+gboolean
+gst_avdtp_connection_acquire (GstAvdtpConnection * conn, gboolean use_try)
+{
+  GVariant *handle = NULL;
+  GUnixFDList *fd_list = NULL;
+  GError *err = NULL;
   int fd;
   uint16_t imtu, omtu;
 
-  dbus_error_init (&err);
-
   if (conn->transport == NULL) {
     GST_ERROR ("No transport specified");
     return FALSE;
   }
 
-  if (conn->data.conn == NULL)
-    conn->data.conn = dbus_bus_get (DBUS_BUS_SYSTEM, &err);
+  if (conn->data.conn == NULL) {
+    conn->data.conn =
+        bluez_media_transport1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+        G_DBUS_PROXY_FLAGS_NONE, "org.bluez", conn->transport, NULL, &err);
 
-  msg = dbus_message_new_method_call ("org.bluez", conn->transport,
-      "org.bluez.MediaTransport", "Acquire");
+    if (conn->data.conn == NULL) {
+      GST_ERROR ("Failed to create proxy for media transport: %s",
+          err && err->message ? err->message : "Unknown error");
+      g_clear_error (&err);
+      return FALSE;
+    }
 
-  dbus_message_append_args (msg, DBUS_TYPE_STRING, &access_type,
-      DBUS_TYPE_INVALID);
+    g_signal_connect (conn->data.conn, "notify::state",
+        G_CALLBACK (on_state_change), conn);
+  }
 
-  reply = dbus_connection_send_with_reply_and_block (conn->data.conn,
-      msg, -1, &err);
+  if (conn->data.is_acquired) {
+    GST_INFO ("Transport is already acquired");
+    return TRUE;
+  }
 
-  dbus_message_unref (msg);
+  if (use_try) {
+    if (!bluez_media_transport1_call_try_acquire_sync (conn->data.conn,
+            NULL, &handle, &imtu, &omtu, &fd_list, NULL, &err))
+      goto fail;
+  } else {
+    if (!bluez_media_transport1_call_acquire_sync (conn->data.conn,
+            NULL, &handle, &imtu, &omtu, &fd_list, NULL, &err))
+      goto fail;
+  }
 
-  if (dbus_error_is_set (&err))
+  fd = g_unix_fd_list_get (fd_list, g_variant_get_handle (handle), &err);
+  if (fd < 0)
     goto fail;
 
-  if (dbus_message_get_args (reply, &err, DBUS_TYPE_UNIX_FD, &fd,
-          DBUS_TYPE_UINT16, &imtu,
-          DBUS_TYPE_UINT16, &omtu, DBUS_TYPE_INVALID) == FALSE)
-    goto fail;
-
-  dbus_message_unref (reply);
-
+  g_variant_unref (handle);
+  g_object_unref (fd_list);
   conn->stream = g_io_channel_unix_new (fd);
   g_io_channel_set_encoding (conn->stream, NULL, NULL);
   g_io_channel_set_close_on_unref (conn->stream, TRUE);
   conn->data.link_mtu = omtu;
+  conn->data.is_acquired = TRUE;
 
   return TRUE;
 
 fail:
-  GST_ERROR ("Failed to acquire transport stream: %s", err.message);
+  GST_ERROR ("Failed to %s transport stream: %s", use_try ? "try_acquire" :
+      "acquire", err && err->message ? err->message : "unknown error");
 
-  dbus_error_free (&err);
+  g_clear_error (&err);
+  if (handle)
+    g_variant_unref (handle);
 
-  if (reply)
-    dbus_message_unref (reply);
-
+  conn->data.is_acquired = FALSE;
   return FALSE;
 }
 
 static void
 gst_avdtp_connection_transport_release (GstAvdtpConnection * conn)
 {
-  DBusMessage *msg;
-  const char *access_type = "rw";
+  GError *err = NULL;
 
-  msg = dbus_message_new_method_call ("org.bluez", conn->transport,
-      "org.bluez.MediaTransport", "Release");
+  if (!bluez_media_transport1_call_release_sync (conn->data.conn, NULL, &err)) {
+    /* We don't care about errors if the transport was already marked stale */
+    if (!conn->data.is_acquired) {
+      g_clear_error (&err);
+      return;
+    }
 
-  dbus_message_append_args (msg, DBUS_TYPE_STRING, &access_type,
-      DBUS_TYPE_INVALID);
-
-  dbus_connection_send (conn->data.conn, msg, NULL);
-
-  dbus_message_unref (msg);
+    GST_ERROR ("Failed to release transport stream: %s", err->message ?
+        err->message : "unknown error");
+    g_clear_error (&err);
+  }
+  conn->data.is_acquired = FALSE;
 }
 
 void
@@ -142,9 +190,7 @@
     if (conn->transport)
       gst_avdtp_connection_transport_release (conn);
 
-    dbus_connection_unref (conn->data.conn);
-
-    conn->data.conn = NULL;
+    g_clear_object (&conn->data.conn);
   }
 }
 
@@ -183,134 +229,22 @@
   conn->transport = g_strdup (transport);
 }
 
-static gboolean
-gst_avdtp_connection_parse_property (GstAvdtpConnection * conn,
-    DBusMessageIter * i)
-{
-  const char *key;
-  DBusMessageIter variant_i;
-
-  if (dbus_message_iter_get_arg_type (i) != DBUS_TYPE_STRING) {
-    GST_ERROR ("Property name not a string.");
-    return FALSE;
-  }
-
-  dbus_message_iter_get_basic (i, &key);
-
-  if (!dbus_message_iter_next (i)) {
-    GST_ERROR ("Property value missing");
-    return FALSE;
-  }
-
-  if (dbus_message_iter_get_arg_type (i) != DBUS_TYPE_VARIANT) {
-    GST_ERROR ("Property value not a variant.");
-    return FALSE;
-  }
-
-  dbus_message_iter_recurse (i, &variant_i);
-
-  switch (dbus_message_iter_get_arg_type (&variant_i)) {
-    case DBUS_TYPE_BYTE:{
-      uint8_t value;
-      dbus_message_iter_get_basic (&variant_i, &value);
-
-      if (g_str_equal (key, "Codec") == TRUE)
-        conn->data.codec = value;
-
-      break;
-    }
-    case DBUS_TYPE_STRING:{
-      const char *value;
-      dbus_message_iter_get_basic (&variant_i, &value);
-
-      if (g_str_equal (key, "UUID") == TRUE) {
-        g_free (conn->data.uuid);
-        conn->data.uuid = g_strdup (value);
-      }
-
-      break;
-    }
-    case DBUS_TYPE_ARRAY:{
-      DBusMessageIter array_i;
-      char *value;
-      int size;
-
-      dbus_message_iter_recurse (&variant_i, &array_i);
-      dbus_message_iter_get_fixed_array (&array_i, &value, &size);
-
-      if (g_str_equal (key, "Configuration")) {
-        g_free (conn->data.config);
-        conn->data.config = g_new0 (guint8, size);
-        conn->data.config_size = size;
-        memcpy (conn->data.config, value, size);
-      }
-
-      break;
-    }
-  }
-
-  return TRUE;
-}
-
 gboolean
 gst_avdtp_connection_get_properties (GstAvdtpConnection * conn)
 {
-  DBusMessage *msg, *reply;
-  DBusMessageIter arg_i, ele_i;
-  DBusError err;
+  GVariant *var;
 
-  dbus_error_init (&err);
+  conn->data.codec = bluez_media_transport1_get_codec (conn->data.conn);
 
-  msg = dbus_message_new_method_call ("org.bluez", conn->transport,
-      "org.bluez.MediaTransport", "GetProperties");
+  conn->data.uuid = bluez_media_transport1_dup_uuid (conn->data.conn);
 
-  if (!msg) {
-    GST_ERROR ("D-Bus Memory allocation failed");
-    return FALSE;
-  }
-
-  reply = dbus_connection_send_with_reply_and_block (conn->data.conn,
-      msg, -1, &err);
-
-  dbus_message_unref (msg);
-
-  if (dbus_error_is_set (&err)) {
-    GST_ERROR ("GetProperties failed: %s", err.message);
-    dbus_error_free (&err);
-    return FALSE;
-  }
-
-  if (!dbus_message_iter_init (reply, &arg_i)) {
-    GST_ERROR ("GetProperties reply has no arguments.");
-    goto fail;
-  }
-
-  if (dbus_message_iter_get_arg_type (&arg_i) != DBUS_TYPE_ARRAY) {
-    GST_ERROR ("GetProperties argument is not an array.");
-    goto fail;
-  }
-
-  dbus_message_iter_recurse (&arg_i, &ele_i);
-  while (dbus_message_iter_get_arg_type (&ele_i) != DBUS_TYPE_INVALID) {
-
-    if (dbus_message_iter_get_arg_type (&ele_i) == DBUS_TYPE_DICT_ENTRY) {
-      DBusMessageIter dict_i;
-
-      dbus_message_iter_recurse (&ele_i, &dict_i);
-
-      gst_avdtp_connection_parse_property (conn, &dict_i);
-    }
-
-    if (!dbus_message_iter_next (&ele_i))
-      break;
-  }
+  var = bluez_media_transport1_dup_configuration (conn->data.conn);
+  conn->data.config_size = g_variant_get_size (var);
+  conn->data.config = g_new0 (guint8, conn->data.config_size);
+  g_variant_store (var, conn->data.config);
+  g_variant_unref (var);
 
   return TRUE;
-
-fail:
-  dbus_message_unref (reply);
-  return FALSE;
-
 }
 
 static GstStructure *
@@ -794,7 +728,6 @@
 gst_avdtp_connection_conf_recv_stream_fd (GstAvdtpConnection * conn)
 {
   struct bluetooth_data *data = &conn->data;
-  GError *gerr = NULL;
   GIOStatus status;
   GIOFlags flags;
   int fd;
@@ -810,7 +743,7 @@
   /* set stream socket to nonblock */
   flags = g_io_channel_get_flags (conn->stream);
   flags |= G_IO_FLAG_NONBLOCK;
-  status = g_io_channel_set_flags (conn->stream, flags, &gerr);
+  status = g_io_channel_set_flags (conn->stream, flags, NULL);
   if (status != G_IO_STATUS_NORMAL)
     GST_WARNING ("Error while setting server socket to nonblock");
 
@@ -827,7 +760,7 @@
   /* set stream socket to block */
   flags = g_io_channel_get_flags (conn->stream);
   flags &= ~G_IO_FLAG_NONBLOCK;
-  status = g_io_channel_set_flags (conn->stream, flags, &gerr);
+  status = g_io_channel_set_flags (conn->stream, flags, NULL);
   if (status != G_IO_STATUS_NORMAL)
     GST_WARNING ("Error while setting server socket to block");
 
diff --git a/sys/bluez/gstavdtputil.h b/sys/bluez/gstavdtputil.h
index b551781..1319441 100644
--- a/sys/bluez/gstavdtputil.h
+++ b/sys/bluez/gstavdtputil.h
@@ -27,20 +27,23 @@
 
 #include <glib.h>
 
-#include <dbus/dbus.h>
+#include "bluez.h"
 
 G_BEGIN_DECLS
+
 #define DEFAULT_CODEC_BUFFER_SIZE 2048
 #define TEMPLATE_MAX_BITPOOL_STR "64"
-    struct bluetooth_data
+
+struct bluetooth_data
 {
   guint link_mtu;
 
-  DBusConnection *conn;
+  BluezMediaTransport1 *conn;
   guint8 codec;                 /* Bluetooth transport configuration */
   gchar *uuid;
   guint8 *config;
   gint config_size;
+  gboolean is_acquired;
 
   gchar buffer[DEFAULT_CODEC_BUFFER_SIZE];      /* Codec transfer buffer */
 };
@@ -56,7 +59,8 @@
   struct bluetooth_data data;
 };
 
-gboolean gst_avdtp_connection_acquire (GstAvdtpConnection * conn);
+gboolean gst_avdtp_connection_acquire (GstAvdtpConnection * conn,
+    gboolean use_try);
 void gst_avdtp_connection_release (GstAvdtpConnection * conn);
 void gst_avdtp_connection_reset (GstAvdtpConnection * conn);
 gboolean gst_avdtp_connection_get_properties (GstAvdtpConnection * conn);
diff --git a/sys/bluez/org.bluez.xml b/sys/bluez/org.bluez.xml
new file mode 100644
index 0000000..ff52ee3
--- /dev/null
+++ b/sys/bluez/org.bluez.xml
@@ -0,0 +1,29 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<node>
+<interface name="org.bluez.MediaTransport1">
+    <method name="Acquire">
+        <annotation name="org.gtk.GDBus.C.UnixFD" value="true" />
+        <arg name="fd" type="h" direction="out"/>
+        <arg name="mtu_r" type="q" direction="out"/>
+        <arg name="mtu_w" type="q" direction="out"/>
+    </method>
+    <method name="TryAcquire">
+        <annotation name="org.gtk.GDBus.C.UnixFD" value="true" />
+        <arg name="fd" type="h" direction="out"/>
+        <arg name="mtu_r" type="q" direction="out"/>
+        <arg name="mtu_w" type="q" direction="out"/>
+    </method>
+    <method name="Release"></method>
+    <property name="Device" type="o" access="read"></property>
+    <property name="UUID" type="s" access="read"></property>
+    <property name="Codec" type="y" access="read"></property>
+    <property name="Configuration" type="ay" access="read">
+        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true" />
+    </property>
+    <property name="State" type="s" access="read"></property>
+    <property name="Delay" type="q" access="read"></property>
+    <property name="Volume" type="q" access="readwrite"></property>
+</interface>
+</node>
diff --git a/sys/d3dvideosink/Makefile.in b/sys/d3dvideosink/Makefile.in
index ca7fa27..3f2b5df 100644
--- a/sys/d3dvideosink/Makefile.in
+++ b/sys/d3dvideosink/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/d3dvideosink
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -754,7 +789,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/d3dvideosink/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/d3dvideosink/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1071,6 +1105,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/d3dvideosink/d3dhelpers.c b/sys/d3dvideosink/d3dhelpers.c
index 312b913..4030cd6 100644
--- a/sys/d3dvideosink/d3dhelpers.c
+++ b/sys/d3dvideosink/d3dhelpers.c
@@ -28,6 +28,14 @@
 
 #include <stdio.h>
 
+typedef enum
+{
+  WINDOW_VISIBILITY_FULL = 1,
+  WINDOW_VISIBILITY_PARTIAL = 2,
+  WINDOW_VISIBILITY_HIDDEN = 3,
+  WINDOW_VISIBILITY_ERROR = 4
+} WindowHandleVisibility;
+
 /** FWD DECLS **/
 
 static gboolean d3d_hidden_window_thread (GstD3DVideoSinkClass * klass);
@@ -1062,7 +1070,12 @@
   LOCK_SINK (sink);
 
   if (sink->d3d.window_handle == NULL) {
-    GST_DEBUG_OBJECT (sink, "No window handle has been set..");
+    GST_DEBUG_OBJECT (sink, "No window handle has been set.");
+    goto end;
+  }
+
+  if (sink->d3d.device_lost) {
+    GST_DEBUG_OBJECT (sink, "Device is lost, waiting for reset.");
     goto end;
   }
 
@@ -1308,6 +1321,10 @@
   GST_DEBUG ("Direct3D stretch rect texture filter: %d", d3d_filtertype);
 
   sink->d3d.filtertype = d3d_filtertype;
+
+  if (sink->d3d.swapchain != NULL)
+    IDirect3DSwapChain9_Release (sink->d3d.swapchain);
+
   sink->d3d.swapchain = d3d_swapchain;
 
   ret = TRUE;
@@ -1342,6 +1359,10 @@
     goto end;
   }
 
+  gst_buffer_replace (&sink->fallback_buffer, NULL);
+  if (sink->fallback_pool)
+    gst_buffer_pool_set_active (sink->fallback_pool, FALSE);
+
   if (sink->d3d.swapchain) {
     ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
     sink->d3d.swapchain = NULL;
@@ -1810,6 +1831,12 @@
 GstFlowReturn
 d3d_render_buffer (GstD3DVideoSink * sink, GstBuffer * buf)
 {
+  WindowHandleVisibility handle_visibility = WINDOW_VISIBILITY_ERROR;
+  int clip_ret;
+  HDC handle_hdc;
+  RECT handle_rectangle;
+  RECT clip_rectangle;
+
   GstFlowReturn ret = GST_FLOW_OK;
   GstMemory *mem;
   LPDIRECT3DSURFACE9 surface = NULL;
@@ -1832,6 +1859,36 @@
     goto end;
   }
 
+  /* check for window handle visibility, if hidden skip frame rendering  */
+
+  handle_hdc = GetDC (sink->d3d.window_handle);
+  GetClientRect (sink->d3d.window_handle, &handle_rectangle);
+  clip_ret = GetClipBox (handle_hdc, &clip_rectangle);
+  ReleaseDC (sink->d3d.window_handle, handle_hdc);
+
+  switch (clip_ret) {
+    case NULLREGION:
+      handle_visibility = WINDOW_VISIBILITY_HIDDEN;
+      break;
+    case SIMPLEREGION:
+      if (EqualRect (&clip_rectangle, &handle_rectangle))
+        handle_visibility = WINDOW_VISIBILITY_FULL;
+      else
+        handle_visibility = WINDOW_VISIBILITY_PARTIAL;
+      break;
+    case COMPLEXREGION:
+      handle_visibility = WINDOW_VISIBILITY_PARTIAL;
+      break;
+    default:
+      handle_visibility = WINDOW_VISIBILITY_ERROR;
+      break;
+  }
+
+  if (handle_visibility == WINDOW_VISIBILITY_HIDDEN) {
+    GST_DEBUG_OBJECT (sink, "Hidden hwnd, skipping frame rendering...");
+    goto end;
+  }
+
   GST_INFO_OBJECT (sink, "%s %" GST_TIME_FORMAT,
       (sink->d3d.window_handle != NULL) ? "Render" : "No Win",
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c
index 5568075..a06d494 100644
--- a/sys/d3dvideosink/d3dvideosink.c
+++ b/sys/d3dvideosink/d3dvideosink.c
@@ -398,8 +398,10 @@
 
   if (oldpool)
     gst_object_unref (oldpool);
-  if (oldfbpool)
+  if (oldfbpool) {
+    gst_buffer_pool_set_active (oldfbpool, FALSE);
     gst_object_unref (oldfbpool);
+  }
 
   return TRUE;
   /* ERRORS */
diff --git a/sys/decklink/Makefile.am b/sys/decklink/Makefile.am
index 89af7c2..d3ec19d 100644
--- a/sys/decklink/Makefile.am
+++ b/sys/decklink/Makefile.am
@@ -8,6 +8,7 @@
 	$(DECKLINK_CXXFLAGS)
 libgstdecklink_la_LIBADD = \
 	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstaudio-@GST_API_VERSION@ \
 	-lgstvideo-@GST_API_VERSION@ \
 	$(GST_BASE_LIBS) \
 	$(GST_LIBS) \
@@ -23,39 +24,46 @@
 libgstdecklink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 libgstdecklink_la_SOURCES = \
-	gstdecklinksink.cpp \
-	gstdecklinksrc.cpp \
 	gstdecklink.cpp \
-	capture.cpp
+	gstdecklinkaudiosink.cpp \
+	gstdecklinkvideosink.cpp \
+	gstdecklinkaudiosrc.cpp \
+	gstdecklinkvideosrc.cpp
 
 if DECKLINK_OSX
 libgstdecklink_la_SOURCES += \
-	osx/DeckLinkAPIDispatch-osx.cpp
+	osx/DeckLinkAPIDispatch.cpp
 else
 libgstdecklink_la_SOURCES += \
 	linux/DeckLinkAPIDispatch.cpp
 endif
 
-
 noinst_HEADERS = \
 	gstdecklink.h \
-	gstdecklinksrc.h \
-	gstdecklinksink.h \
-	capture.h \
+	gstdecklinkaudiosink.h \
+	gstdecklinkvideosink.h \
+	gstdecklinkaudiosrc.h \
+	gstdecklinkvideosrc.h \
+	linux/DeckLinkAPIConfiguration.h \
+	linux/DeckLinkAPIDeckControl.h \
+	linux/DeckLinkAPIDiscovery.h \
 	linux/DeckLinkAPI.h \
+	linux/DeckLinkAPIModes.h \
+	linux/DeckLinkAPITypes.h \
 	linux/LinuxCOM.h \
-	osx/DeckLinkAPI.h \
 	osx/DeckLinkAPIConfiguration.h \
 	osx/DeckLinkAPIDeckControl.h \
 	osx/DeckLinkAPIDiscovery.h \
+	osx/DeckLinkAPI.h \
 	osx/DeckLinkAPIModes.h \
 	osx/DeckLinkAPIStreaming.h \
 	osx/DeckLinkAPITypes.h \
-	osx/DeckLinkAPIVersion.h
+	osx/DeckLinkAPIVersion.h \
+	win/DeckLinkAPI.h
 
 EXTRA_DIST = \
-	win/DeckLinkAPI.h \
-	win/DeckLinkAPIDispatch.cpp \
-	win/DeckLinkAPI_i.c
+	linux/DeckLinkAPIDispatch.cpp \
+	osx/DeckLinkAPIDispatch.cpp \
+	win/DeckLinkAPIDispatch.cpp
 
 
diff --git a/sys/decklink/Makefile.in b/sys/decklink/Makefile.in
index e848621..ffea946 100644
--- a/sys/decklink/Makefile.in
+++ b/sys/decklink/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -84,14 +94,12 @@
 @DECKLINK_OSX_TRUE@	-Wl,-framework,CoreFoundation
 
 @DECKLINK_OSX_TRUE@am__append_2 = \
-@DECKLINK_OSX_TRUE@	osx/DeckLinkAPIDispatch-osx.cpp
+@DECKLINK_OSX_TRUE@	osx/DeckLinkAPIDispatch.cpp
 
 @DECKLINK_OSX_FALSE@am__append_3 = \
 @DECKLINK_OSX_FALSE@	linux/DeckLinkAPIDispatch.cpp
 
 subdir = sys/decklink
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -99,6 +107,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -112,7 +121,6 @@
 	$(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 \
@@ -129,6 +137,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -166,16 +176,19 @@
 libgstdecklink_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am__libgstdecklink_la_SOURCES_DIST = gstdecklinksink.cpp \
-	gstdecklinksrc.cpp gstdecklink.cpp capture.cpp \
-	osx/DeckLinkAPIDispatch-osx.cpp linux/DeckLinkAPIDispatch.cpp
+am__libgstdecklink_la_SOURCES_DIST = gstdecklink.cpp \
+	gstdecklinkaudiosink.cpp gstdecklinkvideosink.cpp \
+	gstdecklinkaudiosrc.cpp gstdecklinkvideosrc.cpp \
+	osx/DeckLinkAPIDispatch.cpp linux/DeckLinkAPIDispatch.cpp
 am__dirstamp = $(am__leading_dot)dirstamp
-@DECKLINK_OSX_TRUE@am__objects_1 = osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo
+@DECKLINK_OSX_TRUE@am__objects_1 = osx/libgstdecklink_la-DeckLinkAPIDispatch.lo
 @DECKLINK_OSX_FALSE@am__objects_2 = linux/libgstdecklink_la-DeckLinkAPIDispatch.lo
-am_libgstdecklink_la_OBJECTS = libgstdecklink_la-gstdecklinksink.lo \
-	libgstdecklink_la-gstdecklinksrc.lo \
-	libgstdecklink_la-gstdecklink.lo libgstdecklink_la-capture.lo \
-	$(am__objects_1) $(am__objects_2)
+am_libgstdecklink_la_OBJECTS = libgstdecklink_la-gstdecklink.lo \
+	libgstdecklink_la-gstdecklinkaudiosink.lo \
+	libgstdecklink_la-gstdecklinkvideosink.lo \
+	libgstdecklink_la-gstdecklinkaudiosrc.lo \
+	libgstdecklink_la-gstdecklinkvideosrc.lo $(am__objects_1) \
+	$(am__objects_2)
 libgstdecklink_la_OBJECTS = $(am_libgstdecklink_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -246,6 +259,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -263,8 +277,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -289,8 +305,6 @@
 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@
@@ -303,7 +317,6 @@
 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@
@@ -311,6 +324,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -337,11 +352,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -360,8 +378,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -420,10 +436,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -440,7 +460,6 @@
 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@
@@ -449,7 +468,6 @@
 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@
@@ -462,7 +480,6 @@
 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@
@@ -476,6 +493,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -487,6 +505,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -525,6 +545,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -560,10 +581,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -589,6 +614,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -596,7 +624,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -625,6 +660,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -635,6 +671,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -665,17 +702,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -692,6 +728,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -730,6 +767,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,6 +791,7 @@
 
 libgstdecklink_la_LIBADD = \
 	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstaudio-@GST_API_VERSION@ \
 	-lgstvideo-@GST_API_VERSION@ \
 	$(GST_BASE_LIBS) \
 	$(GST_LIBS) \
@@ -761,28 +800,36 @@
 
 libgstdecklink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(am__append_1)
 libgstdecklink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstdecklink_la_SOURCES = gstdecklinksink.cpp gstdecklinksrc.cpp \
-	gstdecklink.cpp capture.cpp $(am__append_2) $(am__append_3)
+libgstdecklink_la_SOURCES = gstdecklink.cpp gstdecklinkaudiosink.cpp \
+	gstdecklinkvideosink.cpp gstdecklinkaudiosrc.cpp \
+	gstdecklinkvideosrc.cpp $(am__append_2) $(am__append_3)
 noinst_HEADERS = \
 	gstdecklink.h \
-	gstdecklinksrc.h \
-	gstdecklinksink.h \
-	capture.h \
+	gstdecklinkaudiosink.h \
+	gstdecklinkvideosink.h \
+	gstdecklinkaudiosrc.h \
+	gstdecklinkvideosrc.h \
+	linux/DeckLinkAPIConfiguration.h \
+	linux/DeckLinkAPIDeckControl.h \
+	linux/DeckLinkAPIDiscovery.h \
 	linux/DeckLinkAPI.h \
+	linux/DeckLinkAPIModes.h \
+	linux/DeckLinkAPITypes.h \
 	linux/LinuxCOM.h \
-	osx/DeckLinkAPI.h \
 	osx/DeckLinkAPIConfiguration.h \
 	osx/DeckLinkAPIDeckControl.h \
 	osx/DeckLinkAPIDiscovery.h \
+	osx/DeckLinkAPI.h \
 	osx/DeckLinkAPIModes.h \
 	osx/DeckLinkAPIStreaming.h \
 	osx/DeckLinkAPITypes.h \
-	osx/DeckLinkAPIVersion.h
+	osx/DeckLinkAPIVersion.h \
+	win/DeckLinkAPI.h
 
 EXTRA_DIST = \
-	win/DeckLinkAPI.h \
-	win/DeckLinkAPIDispatch.cpp \
-	win/DeckLinkAPI_i.c
+	linux/DeckLinkAPIDispatch.cpp \
+	osx/DeckLinkAPIDispatch.cpp \
+	win/DeckLinkAPIDispatch.cpp
 
 all: all-am
 
@@ -800,7 +847,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/decklink/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/decklink/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -859,7 +905,7 @@
 osx/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) osx/$(DEPDIR)
 	@: > osx/$(DEPDIR)/$(am__dirstamp)
-osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo: osx/$(am__dirstamp) \
+osx/libgstdecklink_la-DeckLinkAPIDispatch.lo: osx/$(am__dirstamp) \
 	osx/$(DEPDIR)/$(am__dirstamp)
 linux/$(am__dirstamp):
 	@$(MKDIR_P) linux
@@ -883,12 +929,13 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-capture.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinksink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinksrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinkvideosink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdecklink_la-gstdecklinkvideosrc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch-osx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Plo@am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -914,20 +961,6 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
-libgstdecklink_la-gstdecklinksink.lo: gstdecklinksink.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinksink.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinksink.Tpo -c -o libgstdecklink_la-gstdecklinksink.lo `test -f 'gstdecklinksink.cpp' || echo '$(srcdir)/'`gstdecklinksink.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinksink.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinksink.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinksink.cpp' object='libgstdecklink_la-gstdecklinksink.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinksink.lo `test -f 'gstdecklinksink.cpp' || echo '$(srcdir)/'`gstdecklinksink.cpp
-
-libgstdecklink_la-gstdecklinksrc.lo: gstdecklinksrc.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinksrc.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinksrc.Tpo -c -o libgstdecklink_la-gstdecklinksrc.lo `test -f 'gstdecklinksrc.cpp' || echo '$(srcdir)/'`gstdecklinksrc.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinksrc.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinksrc.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinksrc.cpp' object='libgstdecklink_la-gstdecklinksrc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinksrc.lo `test -f 'gstdecklinksrc.cpp' || echo '$(srcdir)/'`gstdecklinksrc.cpp
-
 libgstdecklink_la-gstdecklink.lo: gstdecklink.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklink.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklink.Tpo -c -o libgstdecklink_la-gstdecklink.lo `test -f 'gstdecklink.cpp' || echo '$(srcdir)/'`gstdecklink.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklink.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklink.Plo
@@ -935,19 +968,40 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklink.lo `test -f 'gstdecklink.cpp' || echo '$(srcdir)/'`gstdecklink.cpp
 
-libgstdecklink_la-capture.lo: capture.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-capture.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-capture.Tpo -c -o libgstdecklink_la-capture.lo `test -f 'capture.cpp' || echo '$(srcdir)/'`capture.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-capture.Tpo $(DEPDIR)/libgstdecklink_la-capture.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='capture.cpp' object='libgstdecklink_la-capture.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdecklink_la-gstdecklinkaudiosink.lo: gstdecklinkaudiosink.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinkaudiosink.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosink.Tpo -c -o libgstdecklink_la-gstdecklinkaudiosink.lo `test -f 'gstdecklinkaudiosink.cpp' || echo '$(srcdir)/'`gstdecklinkaudiosink.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosink.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosink.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinkaudiosink.cpp' object='libgstdecklink_la-gstdecklinkaudiosink.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-capture.lo `test -f 'capture.cpp' || echo '$(srcdir)/'`capture.cpp
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinkaudiosink.lo `test -f 'gstdecklinkaudiosink.cpp' || echo '$(srcdir)/'`gstdecklinkaudiosink.cpp
 
-osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo: osx/DeckLinkAPIDispatch-osx.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo -MD -MP -MF osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch-osx.Tpo -c -o osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo `test -f 'osx/DeckLinkAPIDispatch-osx.cpp' || echo '$(srcdir)/'`osx/DeckLinkAPIDispatch-osx.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch-osx.Tpo osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch-osx.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='osx/DeckLinkAPIDispatch-osx.cpp' object='osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo' libtool=yes @AMDEPBACKSLASH@
+libgstdecklink_la-gstdecklinkvideosink.lo: gstdecklinkvideosink.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinkvideosink.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosink.Tpo -c -o libgstdecklink_la-gstdecklinkvideosink.lo `test -f 'gstdecklinkvideosink.cpp' || echo '$(srcdir)/'`gstdecklinkvideosink.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosink.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosink.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinkvideosink.cpp' object='libgstdecklink_la-gstdecklinkvideosink.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osx/libgstdecklink_la-DeckLinkAPIDispatch-osx.lo `test -f 'osx/DeckLinkAPIDispatch-osx.cpp' || echo '$(srcdir)/'`osx/DeckLinkAPIDispatch-osx.cpp
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinkvideosink.lo `test -f 'gstdecklinkvideosink.cpp' || echo '$(srcdir)/'`gstdecklinkvideosink.cpp
+
+libgstdecklink_la-gstdecklinkaudiosrc.lo: gstdecklinkaudiosrc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinkaudiosrc.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosrc.Tpo -c -o libgstdecklink_la-gstdecklinkaudiosrc.lo `test -f 'gstdecklinkaudiosrc.cpp' || echo '$(srcdir)/'`gstdecklinkaudiosrc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosrc.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinkaudiosrc.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinkaudiosrc.cpp' object='libgstdecklink_la-gstdecklinkaudiosrc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinkaudiosrc.lo `test -f 'gstdecklinkaudiosrc.cpp' || echo '$(srcdir)/'`gstdecklinkaudiosrc.cpp
+
+libgstdecklink_la-gstdecklinkvideosrc.lo: gstdecklinkvideosrc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgstdecklink_la-gstdecklinkvideosrc.lo -MD -MP -MF $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosrc.Tpo -c -o libgstdecklink_la-gstdecklinkvideosrc.lo `test -f 'gstdecklinkvideosrc.cpp' || echo '$(srcdir)/'`gstdecklinkvideosrc.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosrc.Tpo $(DEPDIR)/libgstdecklink_la-gstdecklinkvideosrc.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='gstdecklinkvideosrc.cpp' object='libgstdecklink_la-gstdecklinkvideosrc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgstdecklink_la-gstdecklinkvideosrc.lo `test -f 'gstdecklinkvideosrc.cpp' || echo '$(srcdir)/'`gstdecklinkvideosrc.cpp
+
+osx/libgstdecklink_la-DeckLinkAPIDispatch.lo: osx/DeckLinkAPIDispatch.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osx/libgstdecklink_la-DeckLinkAPIDispatch.lo -MD -MP -MF osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Tpo -c -o osx/libgstdecklink_la-DeckLinkAPIDispatch.lo `test -f 'osx/DeckLinkAPIDispatch.cpp' || echo '$(srcdir)/'`osx/DeckLinkAPIDispatch.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Tpo osx/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='osx/DeckLinkAPIDispatch.cpp' object='osx/libgstdecklink_la-DeckLinkAPIDispatch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osx/libgstdecklink_la-DeckLinkAPIDispatch.lo `test -f 'osx/DeckLinkAPIDispatch.cpp' || echo '$(srcdir)/'`osx/DeckLinkAPIDispatch.cpp
 
 linux/libgstdecklink_la-DeckLinkAPIDispatch.lo: linux/DeckLinkAPIDispatch.cpp
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(libgstdecklink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgstdecklink_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT linux/libgstdecklink_la-DeckLinkAPIDispatch.lo -MD -MP -MF linux/$(DEPDIR)/libgstdecklink_la-DeckLinkAPIDispatch.Tpo -c -o linux/libgstdecklink_la-DeckLinkAPIDispatch.lo `test -f 'linux/DeckLinkAPIDispatch.cpp' || echo '$(srcdir)/'`linux/DeckLinkAPIDispatch.cpp
@@ -1175,6 +1229,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/decklink/capture.cpp b/sys/decklink/capture.cpp
deleted file mode 100644
index 85bedf6..0000000
--- a/sys/decklink/capture.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -LICENSE-START-
-** Copyright (c) 2009 Blackmagic Design
-**
-** Permission is hereby granted, free of charge, to any person or organization
-** obtaining a copy of the software and accompanying documentation covered by
-** this license (the "Software") to use, reproduce, display, distribute,
-** execute, and transmit the Software, and to prepare derivative works of the
-** Software, and to permit third-parties to whom the Software is furnished to
-** do so, all subject to the following:
-** 
-** The copyright notices in the Software and this entire statement, including
-** the above license grant, this restriction and the following disclaimer,
-** must be included in all copies of the Software, in whole or in part, and
-** all derivative works of the Software, unless such copies or derivative
-** works are solely in the form of machine-executable object code generated by
-** a source language processor.
-** 
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-** DEALINGS IN THE SOFTWARE.
-** -LICENSE-END-
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "gstdecklinksrc.h"
-
-#include "capture.h"
-
-#define GST_CAT_DEFAULT gst_decklink_src_debug_category
-
-static BMDTimecodeFormat g_timecodeFormat = (BMDTimecodeFormat) 0;
-
-DeckLinkCaptureDelegate::DeckLinkCaptureDelegate ():priv (NULL), m_refCount (0)
-{
-  g_mutex_init (&m_mutex);
-}
-
-DeckLinkCaptureDelegate::~DeckLinkCaptureDelegate ()
-{
-  g_mutex_clear (&m_mutex);
-}
-
-ULONG DeckLinkCaptureDelegate::AddRef (void)
-{
-  g_mutex_lock (&m_mutex);
-  m_refCount++;
-  g_mutex_unlock (&m_mutex);
-
-  return (ULONG) m_refCount;
-}
-
-ULONG DeckLinkCaptureDelegate::Release (void)
-{
-  g_mutex_lock (&m_mutex);
-  m_refCount--;
-  g_mutex_unlock (&m_mutex);
-
-  if (m_refCount == 0) {
-    delete
-        this;
-    return 0;
-  }
-
-  return (ULONG) m_refCount;
-}
-
-HRESULT
-    DeckLinkCaptureDelegate::VideoInputFrameArrived (IDeckLinkVideoInputFrame *
-    videoFrame, IDeckLinkAudioInputPacket * audioFrame)
-{
-  GstDecklinkSrc *decklinksrc;
-  const char *timecodeString = NULL;
-
-  g_return_val_if_fail (priv != NULL, S_OK);
-  g_return_val_if_fail (GST_IS_DECKLINK_SRC (priv), S_OK);
-
-  decklinksrc = GST_DECKLINK_SRC (priv);
-
-  if (videoFrame == NULL) {
-    GST_WARNING_OBJECT (decklinksrc, "video frame is NULL");
-    return S_OK;
-  }
-
-  if (audioFrame == NULL) {
-    GST_WARNING_OBJECT (decklinksrc, "audio frame is NULL");
-    return S_OK;
-  }
-
-  if (videoFrame->GetFlags () & bmdFrameHasNoInputSource) {
-    GST_DEBUG_OBJECT (decklinksrc, "Frame received - No input signal detected");
-    return S_OK;
-  }
-
-  /* FIXME: g_timecodeFormat is inited to 0 and never changed? dead code? */
-  if (g_timecodeFormat != 0) {
-    IDeckLinkTimecode *timecode;
-    if (videoFrame->GetTimecode (g_timecodeFormat, &timecode) == S_OK) {
-      timecode->GetString (&timecodeString);
-      CONVERT_COM_STRING (timecodeString);
-    }
-  }
-
-  GST_DEBUG_OBJECT (decklinksrc, "Frame received [%s] - %s - Size: %li bytes",
-      timecodeString != NULL ? timecodeString : "No timecode",
-      "Valid Frame", videoFrame->GetRowBytes () * videoFrame->GetHeight ());
-
-  if (timecodeString)
-    FREE_COM_STRING (timecodeString);
-
-  g_mutex_lock (&decklinksrc->mutex);
-  if (decklinksrc->video_frame != NULL) {
-    decklinksrc->dropped_frames++;
-    decklinksrc->video_frame->Release();
-    if (decklinksrc->audio_frame) {
-      decklinksrc->audio_frame->Release();
-    }
-  }
-  videoFrame->AddRef ();
-  decklinksrc->video_frame = videoFrame;
-  if (audioFrame) {
-    audioFrame->AddRef ();
-    decklinksrc->audio_frame = audioFrame;
-  }
-
-  /* increment regardless whether frame was dropped or not */
-  decklinksrc->frame_num++;
-
-  g_cond_signal (&decklinksrc->cond);
-  g_mutex_unlock (&decklinksrc->mutex);
-
-  return S_OK;
-}
-
-HRESULT
-DeckLinkCaptureDelegate::VideoInputFormatChanged (
-    BMDVideoInputFormatChangedEvents events, IDeckLinkDisplayMode * mode,
-    BMDDetectedVideoInputFormatFlags)
-{
-  GstDecklinkSrc *decklinksrc;
-
-  g_return_val_if_fail (priv != NULL, S_OK);
-  g_return_val_if_fail (GST_IS_DECKLINK_SRC (priv), S_OK);
-
-  decklinksrc = GST_DECKLINK_SRC (priv);
-
-  GST_ERROR_OBJECT (decklinksrc, "unimplemented: video input format changed");
-
-  return S_OK;
-}
diff --git a/sys/decklink/capture.h b/sys/decklink/capture.h
deleted file mode 100644
index 029500f..0000000
--- a/sys/decklink/capture.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __CAPTURE_H__
-#define __CAPTURE_H__
-
-#include "gstdecklink.h"
-
-class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
-{
-  public:
-    DeckLinkCaptureDelegate();
-    ~DeckLinkCaptureDelegate();
-
-    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; }
-    virtual ULONG STDMETHODCALLTYPE AddRef(void);
-    virtual ULONG STDMETHODCALLTYPE  Release(void);
-    virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
-    virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*);
-
-    void *priv;
-
-  private:
-    ULONG m_refCount;
-    GMutex m_mutex;
-};
-
-#endif
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
index 7807752..f3ddeb9 100644
--- a/sys/decklink/gstdecklink.cpp
+++ b/sys/decklink/gstdecklink.cpp
@@ -1,5 +1,7 @@
 /* GStreamer
  * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2015 Florian Langlois <florian.langlois@fr.thalesgroup.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -23,14 +25,21 @@
 
 #include <gst/gst.h>
 #include "gstdecklink.h"
-#include "gstdecklinksrc.h"
-#include "gstdecklinksink.h"
+#include "gstdecklinkaudiosink.h"
+#include "gstdecklinkvideosink.h"
+#include "gstdecklinkaudiosrc.h"
+#include "gstdecklinkvideosrc.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_decklink_debug);
+#define GST_CAT_DEFAULT gst_decklink_debug
 
 GType
 gst_decklink_mode_get_type (void)
 {
   static gsize id = 0;
   static const GEnumValue modes[] = {
+    {GST_DECKLINK_MODE_AUTO, "auto", "Automatic detection"},
+
     {GST_DECKLINK_MODE_NTSC, "ntsc", "NTSC SD 60i"},
     {GST_DECKLINK_MODE_NTSC2398, "ntsc2398", "NTSC SD 60i (24 fps)"},
     {GST_DECKLINK_MODE_PAL, "pal", "PAL SD 50i"},
@@ -55,6 +64,19 @@
     {GST_DECKLINK_MODE_720p5994, "720p5994", "HD720 59.94p"},
     {GST_DECKLINK_MODE_720p60, "720p60", "HD720 60p"},
 
+    {GST_DECKLINK_MODE_1556p2398, "1556p2398", "2k 23.98p"},
+    {GST_DECKLINK_MODE_1556p24, "1556p24", "2k 24p"},
+    {GST_DECKLINK_MODE_1556p25, "1556p25", "2k 25p"},
+
+    {GST_DECKLINK_MODE_2160p2398, "2160p2398", "4k 23.98p"},
+    {GST_DECKLINK_MODE_2160p24, "2160p24", "4k 24p"},
+    {GST_DECKLINK_MODE_2160p25, "2160p25", "4k 25p"},
+    {GST_DECKLINK_MODE_2160p2997, "2160p2997", "4k 29.97p"},
+    {GST_DECKLINK_MODE_2160p30, "2160p30", "4k 30p"},
+    {GST_DECKLINK_MODE_2160p50, "2160p50", "4k 50p"},
+    {GST_DECKLINK_MODE_2160p5994, "2160p5994", "4k 59.94p"},
+    {GST_DECKLINK_MODE_2160p60, "2160p60", "4k 60p"},
+
     {0, NULL, NULL}
   };
 
@@ -71,6 +93,7 @@
 {
   static gsize id = 0;
   static const GEnumValue connections[] = {
+    {GST_DECKLINK_CONNECTION_AUTO, "auto", "Auto"},
     {GST_DECKLINK_CONNECTION_SDI, "sdi", "SDI"},
     {GST_DECKLINK_CONNECTION_HDMI, "hdmi", "HDMI"},
     {GST_DECKLINK_CONNECTION_OPTICAL_SDI, "optical-sdi", "Optical SDI"},
@@ -98,6 +121,10 @@
         "SDI/HDMI embedded audio"},
     {GST_DECKLINK_AUDIO_CONNECTION_AES_EBU, "aes", "AES/EBU input"},
     {GST_DECKLINK_AUDIO_CONNECTION_ANALOG, "analog", "Analog input"},
+    {GST_DECKLINK_AUDIO_CONNECTION_ANALOG_XLR, "analog-xlr",
+        "Analog input (XLR)"},
+    {GST_DECKLINK_AUDIO_CONNECTION_ANALOG_RCA, "analog-rca",
+        "Analog input (RCA)"},
     {0, NULL, NULL}
   };
 
@@ -110,11 +137,14 @@
   return (GType) id;
 }
 
-#define NTSC 10, 11, false, false
-#define PAL 12, 11, true, false
-#define HD 1, 1, false, true
+#define NTSC 10, 11, false, "bt601"
+#define PAL 12, 11, true, "bt601"
+#define HD 1, 1, false, "bt709"
+#define UHD 1, 1, false, "bt2020"
 
 static const GstDecklinkMode modes[] = {
+  {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},     // default is ntsc
+
   {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},
   {bmdModeNTSC2398, 720, 486, 24000, 1001, true, NTSC},
   {bmdModePAL, 720, 576, 25, 1, true, PAL},
@@ -127,9 +157,9 @@
   {bmdModeHD1080p2997, 1920, 1080, 30000, 1001, false, HD},
   {bmdModeHD1080p30, 1920, 1080, 30, 1, false, HD},
 
-  {bmdModeHD1080i50, 1920, 1080, 50, 1, true, HD},
-  {bmdModeHD1080i5994, 1920, 1080, 60000, 1001, true, HD},
-  {bmdModeHD1080i6000, 1920, 1080, 60, 1, true, HD},
+  {bmdModeHD1080i50, 1920, 1080, 25, 1, true, HD},
+  {bmdModeHD1080i5994, 1920, 1080, 30000, 1001, true, HD},
+  {bmdModeHD1080i6000, 1920, 1080, 30, 1, true, HD},
 
   {bmdModeHD1080p50, 1920, 1080, 50, 1, false, HD},
   {bmdModeHD1080p5994, 1920, 1080, 60000, 1001, false, HD},
@@ -137,16 +167,154 @@
 
   {bmdModeHD720p50, 1280, 720, 50, 1, false, HD},
   {bmdModeHD720p5994, 1280, 720, 60000, 1001, false, HD},
-  {bmdModeHD720p60, 1280, 720, 60, 1, false, HD}
+  {bmdModeHD720p60, 1280, 720, 60, 1, false, HD},
 
+  {bmdMode2k2398, 2048, 1556, 24000, 1001, false, HD},
+  {bmdMode2k24, 2048, 1556, 24, 1, false, HD},
+  {bmdMode2k25, 2048, 1556, 25, 1, false, HD},
+
+  {bmdMode4K2160p2398, 3840, 2160, 24000, 1001, false, UHD},
+  {bmdMode4K2160p24, 3840, 2160, 24, 1, false, UHD},
+  {bmdMode4K2160p25, 3840, 2160, 25, 1, false, UHD},
+  {bmdMode4K2160p2997, 3840, 2160, 30000, 1001, false, UHD},
+  {bmdMode4K2160p30, 3840, 2160, 30, 1, false, UHD},
+  {bmdMode4K2160p50, 3840, 2160, 50, 1, false, UHD},
+  {bmdMode4K2160p5994, 3840, 2160, 60000, 1001, false, UHD},
+  {bmdMode4K2160p60, 3840, 2160, 60, 1, false, UHD}
 };
 
 const GstDecklinkMode *
 gst_decklink_get_mode (GstDecklinkModeEnum e)
 {
+  if (e < GST_DECKLINK_MODE_AUTO || e > GST_DECKLINK_MODE_2160p60)
+    return NULL;
   return &modes[e];
 }
 
+const GstDecklinkModeEnum
+gst_decklink_get_mode_enum_from_bmd (BMDDisplayMode mode)
+{
+  GstDecklinkModeEnum displayMode = GST_DECKLINK_MODE_NTSC;
+  switch (mode) {
+    case bmdModeNTSC:
+      displayMode = GST_DECKLINK_MODE_NTSC;
+      break;
+    case bmdModeNTSC2398:
+      displayMode = GST_DECKLINK_MODE_NTSC2398;
+      break;
+    case bmdModePAL:
+      displayMode = GST_DECKLINK_MODE_PAL;
+      break;
+    case bmdModeNTSCp:
+      displayMode = GST_DECKLINK_MODE_NTSC_P;
+      break;
+    case bmdModePALp:
+      displayMode = GST_DECKLINK_MODE_PAL_P;
+      break;
+    case bmdModeHD1080p2398:
+      displayMode = GST_DECKLINK_MODE_1080p2398;
+      break;
+    case bmdModeHD1080p24:
+      displayMode = GST_DECKLINK_MODE_1080p24;
+      break;
+    case bmdModeHD1080p25:
+      displayMode = GST_DECKLINK_MODE_1080p25;
+      break;
+    case bmdModeHD1080p2997:
+      displayMode = GST_DECKLINK_MODE_1080p2997;
+      break;
+    case bmdModeHD1080p30:
+      displayMode = GST_DECKLINK_MODE_1080p30;
+      break;
+    case bmdModeHD1080i50:
+      displayMode = GST_DECKLINK_MODE_1080i50;
+      break;
+    case bmdModeHD1080i5994:
+      displayMode = GST_DECKLINK_MODE_1080i5994;
+      break;
+    case bmdModeHD1080i6000:
+      displayMode = GST_DECKLINK_MODE_1080i60;
+      break;
+    case bmdModeHD1080p50:
+      displayMode = GST_DECKLINK_MODE_1080p50;
+      break;
+    case bmdModeHD1080p5994:
+      displayMode = GST_DECKLINK_MODE_1080p5994;
+      break;
+    case bmdModeHD1080p6000:
+      displayMode = GST_DECKLINK_MODE_1080p60;
+      break;
+    case bmdModeHD720p50:
+      displayMode = GST_DECKLINK_MODE_720p50;
+      break;
+    case bmdModeHD720p5994:
+      displayMode = GST_DECKLINK_MODE_720p5994;
+      break;
+    case bmdModeHD720p60:
+      displayMode = GST_DECKLINK_MODE_720p60;
+      break;
+    case bmdMode2k2398:
+      displayMode = GST_DECKLINK_MODE_1556p2398;
+      break;
+    case bmdMode2k24:
+      displayMode = GST_DECKLINK_MODE_1556p24;
+      break;
+    case bmdMode2k25:
+      displayMode = GST_DECKLINK_MODE_1556p25;
+      break;
+    case bmdMode4K2160p2398:
+      displayMode = GST_DECKLINK_MODE_2160p2398;
+      break;
+    case bmdMode4K2160p24:
+      displayMode = GST_DECKLINK_MODE_2160p24;
+      break;
+    case bmdMode4K2160p25:
+      displayMode = GST_DECKLINK_MODE_2160p25;
+      break;
+    case bmdMode4K2160p2997:
+      displayMode = GST_DECKLINK_MODE_2160p2997;
+      break;
+    case bmdMode4K2160p30:
+      displayMode = GST_DECKLINK_MODE_2160p30;
+      break;
+    case bmdMode4K2160p50:
+      displayMode = GST_DECKLINK_MODE_2160p50;
+      break;
+    case bmdMode4K2160p5994:
+      displayMode = GST_DECKLINK_MODE_2160p5994;
+      break;
+    case bmdMode4K2160p60:
+      displayMode = GST_DECKLINK_MODE_2160p60;
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+  return displayMode;
+}
+
+static const BMDVideoConnection connections[] = {
+  0,                            /* auto */
+  bmdVideoConnectionSDI,
+  bmdVideoConnectionHDMI,
+  bmdVideoConnectionOpticalSDI,
+  bmdVideoConnectionComponent,
+  bmdVideoConnectionComposite,
+  bmdVideoConnectionSVideo
+};
+
+const BMDVideoConnection
+gst_decklink_get_connection (GstDecklinkConnectionEnum e)
+{
+  g_return_val_if_fail (e != GST_DECKLINK_CONNECTION_AUTO,
+      bmdVideoConnectionSDI);
+
+  if (e <= GST_DECKLINK_CONNECTION_AUTO || e > GST_DECKLINK_CONNECTION_SVIDEO)
+    e = GST_DECKLINK_CONNECTION_SDI;
+
+  return connections[e];
+}
+
 static GstStructure *
 gst_decklink_mode_get_structure (GstDecklinkModeEnum e)
 {
@@ -157,10 +325,10 @@
       "width", G_TYPE_INT, mode->width,
       "height", G_TYPE_INT, mode->height,
       "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d,
-      "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
-      "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
-      "colorimetry", G_TYPE_STRING, mode->is_hdtv ? "bt709" : "bt601",
-      "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
+      "interlace-mode", G_TYPE_STRING,
+      mode->interlaced ? "interleaved" : "progressive", "pixel-aspect-ratio",
+      GST_TYPE_FRACTION, mode->par_n, mode->par_d, "colorimetry", G_TYPE_STRING,
+      mode->colorimetry, "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
 }
 
 GstCaps *
@@ -182,7 +350,7 @@
   GstStructure *s;
 
   caps = gst_caps_new_empty ();
-  for (i = 0; i < (int) G_N_ELEMENTS (modes); i++) {
+  for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
     s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i);
     gst_caps_append_structure (caps, s);
   }
@@ -190,58 +358,304 @@
   return caps;
 }
 
-typedef struct _Device Device;
-struct _Device {
-  IDeckLink *decklink;
-  IDeckLinkInput *input;
-  IDeckLinkOutput *output;
-  IDeckLinkConfiguration *config;
+#define GST_TYPE_DECKLINK_CLOCK \
+  (gst_decklink_clock_get_type())
+#define GST_DECKLINK_CLOCK(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECKLINK_CLOCK,GstDecklinkClock))
+#define GST_DECKLINK_CLOCK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECKLINK_CLOCK,GstDecklinkClockClass))
+#define GST_IS_Decklink_CLOCK(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECKLINK_CLOCK))
+#define GST_IS_Decklink_CLOCK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECKLINK_CLOCK))
+#define GST_DECKLINK_CLOCK_CAST(obj) \
+  ((GstDecklinkClock*)(obj))
+
+typedef struct _GstDecklinkClock GstDecklinkClock;
+typedef struct _GstDecklinkClockClass GstDecklinkClockClass;
+
+struct _GstDecklinkClock
+{
+  GstSystemClock clock;
+
+  GstDecklinkInput *input;
+  GstDecklinkOutput *output;
 };
 
+struct _GstDecklinkClockClass
+{
+  GstSystemClockClass parent_class;
+};
+
+GType gst_decklink_clock_get_type (void);
+static GstClock *gst_decklink_clock_new (const gchar * name);
+
+typedef struct _Device Device;
+struct _Device
+{
+  GstDecklinkOutput output;
+  GstDecklinkInput input;
+};
+
+class GStreamerDecklinkInputCallback:public IDeckLinkInputCallback
+{
+private:
+  GstDecklinkInput * m_input;
+  GMutex m_mutex;
+  gint m_refcount;
+public:
+    GStreamerDecklinkInputCallback (GstDecklinkInput * input)
+  : IDeckLinkInputCallback (), m_refcount (1)
+  {
+    m_input = input;
+    g_mutex_init (&m_mutex);
+  }
+
+  virtual ~ GStreamerDecklinkInputCallback ()
+  {
+    g_mutex_clear (&m_mutex);
+  }
+
+  virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID, LPVOID *)
+  {
+    return E_NOINTERFACE;
+  }
+
+  virtual ULONG STDMETHODCALLTYPE AddRef (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount++;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+    return ret;
+  }
+
+  virtual ULONG STDMETHODCALLTYPE Release (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount--;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+
+    if (ret == 0) {
+      delete this;
+    }
+
+    return ret;
+  }
+
+  virtual HRESULT STDMETHODCALLTYPE
+      VideoInputFormatChanged (BMDVideoInputFormatChangedEvents,
+      IDeckLinkDisplayMode * mode, BMDDetectedVideoInputFormatFlags)
+  {
+    GST_INFO ("Video input format changed");
+
+    g_mutex_lock (&m_input->lock);
+    m_input->input->PauseStreams ();
+    m_input->input->EnableVideoInput (mode->GetDisplayMode (),
+        bmdFormat8BitYUV, bmdVideoInputEnableFormatDetection);
+    m_input->input->FlushStreams ();
+    m_input->input->StartStreams ();
+    m_input->mode =
+        gst_decklink_get_mode (gst_decklink_get_mode_enum_from_bmd
+        (mode->GetDisplayMode ()));
+    g_mutex_unlock (&m_input->lock);
+
+    return S_OK;
+  }
+
+  virtual HRESULT STDMETHODCALLTYPE
+      VideoInputFrameArrived (IDeckLinkVideoInputFrame * video_frame,
+      IDeckLinkAudioInputPacket * audio_packet)
+  {
+    GstElement *videosrc = NULL, *audiosrc = NULL;
+    void (*got_video_frame) (GstElement * videosrc,
+        IDeckLinkVideoInputFrame * frame, GstDecklinkModeEnum mode,
+        GstClockTime capture_time, GstClockTime capture_duration) = NULL;
+    void (*got_audio_packet) (GstElement * videosrc,
+        IDeckLinkAudioInputPacket * packet, GstClockTime capture_time) = NULL;
+    GstDecklinkModeEnum mode;
+    BMDTimeValue capture_time, capture_duration;
+    HRESULT res;
+
+    res =
+        video_frame->GetHardwareReferenceTimestamp (GST_SECOND, &capture_time,
+        &capture_duration);
+    if (res != S_OK) {
+      GST_ERROR ("Failed to get capture time: 0x%08x", res);
+      capture_time = GST_CLOCK_TIME_NONE;
+      capture_duration = GST_CLOCK_TIME_NONE;
+    }
+
+    g_mutex_lock (&m_input->lock);
+
+    if (capture_time > (BMDTimeValue) m_input->clock_start_time)
+      capture_time -= m_input->clock_start_time;
+    else
+      capture_time = 0;
+
+    if (capture_time > (BMDTimeValue) m_input->clock_offset)
+      capture_time -= m_input->clock_offset;
+    else
+      capture_time = 0;
+
+    if (m_input->videosrc) {
+      videosrc = GST_ELEMENT_CAST (gst_object_ref (m_input->videosrc));
+      got_video_frame = m_input->got_video_frame;
+    }
+    mode = gst_decklink_get_mode_enum_from_bmd (m_input->mode->mode);
+
+    if (m_input->audiosrc) {
+      audiosrc = GST_ELEMENT_CAST (gst_object_ref (m_input->audiosrc));
+      got_audio_packet = m_input->got_audio_packet;
+    }
+    g_mutex_unlock (&m_input->lock);
+
+    if (got_video_frame && videosrc) {
+      got_video_frame (videosrc, video_frame, mode, capture_time,
+          capture_duration);
+    }
+
+    if (got_audio_packet && audiosrc) {
+      m_input->got_audio_packet (audiosrc, audio_packet, capture_time);
+    }
+
+    gst_object_replace ((GstObject **) & videosrc, NULL);
+    gst_object_replace ((GstObject **) & audiosrc, NULL);
+
+    return S_OK;
+  }
+};
+
+#ifdef _MSC_VER
+/* FIXME: We currently never deinit this */
+
+static GMutex com_init_lock;
+static GMutex com_deinit_lock;
+static GCond com_init_cond;
+static GCond com_deinit_cond;
+static GCond com_deinited_cond;
+static gboolean com_initialized = FALSE;
+
+/* COM initialization/uninitialization thread */
+static gpointer
+gst_decklink_com_thread (gpointer data)
+{
+  HRESULT res;
+
+  g_mutex_lock (&com_init_lock);
+
+  /* Initialize COM with a MTA for this process. This thread will
+   * be the first one to enter the apartement and the last one to leave
+   * it, unitializing COM properly */
+
+  res = CoInitializeEx (0, COINIT_MULTITHREADED);
+  if (res == S_FALSE)
+    GST_WARNING ("COM has been already initialized in the same process");
+  else if (res == RPC_E_CHANGED_MODE)
+    GST_WARNING ("The concurrency model of COM has changed.");
+  else
+    GST_INFO ("COM intialized succesfully");
+
+  com_initialized = TRUE;
+
+  /* Signal other threads waiting on this condition that COM was initialized */
+  g_cond_signal (&com_init_cond);
+
+  g_mutex_unlock (&com_init_lock);
+
+  /* Wait until the unitialize condition is met to leave the COM apartement */
+  g_mutex_lock (&com_deinit_lock);
+  g_cond_wait (&com_deinit_cond, &com_deinit_lock);
+
+  CoUninitialize ();
+  GST_INFO ("COM unintialized succesfully");
+  com_initialized = FALSE;
+  g_cond_signal (&com_deinited_cond);
+  g_mutex_unlock (&com_deinit_lock);
+
+  return NULL;
+}
+#endif /* _MSC_VER */
+
+static GOnce devices_once = G_ONCE_INIT;
 static int n_devices;
 static Device devices[10];
 
-static void
-init_devices (void)
+static gpointer
+init_devices (gpointer data)
 {
   IDeckLinkIterator *iterator;
   IDeckLink *decklink = NULL;
   HRESULT ret;
   int i;
-  static gboolean inited = FALSE;
 
-  if (inited) return;
-  inited = TRUE;
+#ifdef _MSC_VER
+  // Start COM thread for Windows
+
+  g_mutex_lock (&com_init_lock);
+
+  /* create the COM initialization thread */
+  g_thread_create ((GThreadFunc) gst_decklink_com_thread, NULL, FALSE, NULL);
+
+  /* wait until the COM thread signals that COM has been initialized */
+  g_cond_wait (&com_init_cond, &com_init_lock);
+  g_mutex_unlock (&com_init_lock);
+#endif /* _MSC_VER */
 
   iterator = CreateDeckLinkIteratorInstance ();
   if (iterator == NULL) {
     GST_ERROR ("no driver");
-    return;
+    return NULL;
   }
 
   i = 0;
   ret = iterator->Next (&decklink);
   while (ret == S_OK) {
-    devices[i].decklink = decklink;
-
     ret = decklink->QueryInterface (IID_IDeckLinkInput,
-        (void **) &devices[i].input);
+        (void **) &devices[i].input.input);
     if (ret != S_OK) {
       GST_WARNING ("selected device does not have input interface");
+    } else {
+      devices[i].input.device = decklink;
+      devices[i].input.clock = gst_decklink_clock_new ("GstDecklinkInputClock");
+      GST_DECKLINK_CLOCK_CAST (devices[i].input.clock)->input =
+          &devices[i].input;
+      devices[i].input.
+          input->SetCallback (new GStreamerDecklinkInputCallback (&devices[i].
+              input));
     }
 
     ret = decklink->QueryInterface (IID_IDeckLinkOutput,
-        (void **) &devices[i].output);
+        (void **) &devices[i].output.output);
     if (ret != S_OK) {
       GST_WARNING ("selected device does not have output interface");
+    } else {
+      devices[i].output.device = decklink;
+      devices[i].output.clock =
+          gst_decklink_clock_new ("GstDecklinkOutputClock");
+      GST_DECKLINK_CLOCK_CAST (devices[i].output.clock)->output =
+          &devices[i].output;
     }
 
     ret = decklink->QueryInterface (IID_IDeckLinkConfiguration,
-        (void **) &devices[i].config);
+        (void **) &devices[i].input.config);
     if (ret != S_OK) {
       GST_WARNING ("selected device does not have config interface");
     }
 
+    ret = decklink->QueryInterface (IID_IDeckLinkAttributes,
+        (void **) &devices[i].input.attributes);
+    if (ret != S_OK) {
+      GST_WARNING ("selected device does not have attributes interface");
+    }
+
     ret = iterator->Next (&decklink);
     i++;
 
@@ -253,47 +667,291 @@
 
   n_devices = i;
 
-  iterator->Release();
+  iterator->Release ();
+
+  return NULL;
 }
 
-IDeckLink *
-gst_decklink_get_nth_device (int n)
+GstDecklinkOutput *
+gst_decklink_acquire_nth_output (gint n, GstElement * sink, gboolean is_audio)
 {
-  init_devices ();
-  return devices[n].decklink;
+  GstDecklinkOutput *output;
+
+  g_once (&devices_once, init_devices, NULL);
+
+  if (n >= n_devices)
+    return NULL;
+
+  output = &devices[n].output;
+  if (!output->output) {
+    GST_ERROR ("Device %d has no output", n);
+    return NULL;
+  }
+
+  g_mutex_lock (&output->lock);
+  if (is_audio && !output->audiosink) {
+    output->audiosink = GST_ELEMENT_CAST (gst_object_ref (sink));
+    g_mutex_unlock (&output->lock);
+    return output;
+  } else if (!output->videosink) {
+    output->videosink = GST_ELEMENT_CAST (gst_object_ref (sink));
+    g_mutex_unlock (&output->lock);
+    return output;
+  }
+  g_mutex_unlock (&output->lock);
+
+  GST_ERROR ("Output device %d (audio: %d) in use already", n, is_audio);
+  return NULL;
 }
 
-IDeckLinkInput *
-gst_decklink_get_nth_input (int n)
+void
+gst_decklink_release_nth_output (gint n, GstElement * sink, gboolean is_audio)
 {
-  init_devices ();
-  return devices[n].input;
+  GstDecklinkOutput *output;
+
+  if (n >= n_devices)
+    return;
+
+  output = &devices[n].output;
+  g_assert (output->output);
+
+  g_mutex_lock (&output->lock);
+  if (is_audio) {
+    g_assert (output->audiosink == sink);
+    gst_object_unref (sink);
+    output->audiosink = NULL;
+  } else {
+    g_assert (output->videosink == sink);
+    gst_object_unref (sink);
+    output->videosink = NULL;
+  }
+  g_mutex_unlock (&output->lock);
 }
 
-IDeckLinkOutput *
-gst_decklink_get_nth_output (int n)
+void
+gst_decklink_output_set_audio_clock (GstDecklinkOutput * output,
+    GstClock * clock)
 {
-  init_devices ();
-  return devices[n].output;
+  g_mutex_lock (&output->lock);
+  if (output->audio_clock)
+    gst_object_unref (output->audio_clock);
+  output->audio_clock = clock;
+  if (clock)
+    gst_object_ref (clock);
+  g_mutex_unlock (&output->lock);
 }
 
-IDeckLinkConfiguration *
-gst_decklink_get_nth_config (int n)
+
+GstClock *
+gst_decklink_output_get_audio_clock (GstDecklinkOutput * output)
 {
-  init_devices ();
-  return devices[n].config;
+  GstClock *ret = NULL;
+
+  g_mutex_lock (&output->lock);
+  if (output->audio_clock)
+    ret = GST_CLOCK_CAST (gst_object_ref (output->audio_clock));
+  g_mutex_unlock (&output->lock);
+
+  return ret;
+}
+
+GstDecklinkInput *
+gst_decklink_acquire_nth_input (gint n, GstElement * src, gboolean is_audio)
+{
+  GstDecklinkInput *input;
+
+  g_once (&devices_once, init_devices, NULL);
+
+  if (n >= n_devices)
+    return NULL;
+
+  input = &devices[n].input;
+  if (!input->input) {
+    GST_ERROR ("Device %d has no input", n);
+    return NULL;
+  }
+
+  g_mutex_lock (&input->lock);
+  if (is_audio && !input->audiosrc) {
+    input->audiosrc = GST_ELEMENT_CAST (gst_object_ref (src));
+    g_mutex_unlock (&input->lock);
+    return input;
+  } else if (!input->videosrc) {
+    input->videosrc = GST_ELEMENT_CAST (gst_object_ref (src));
+    g_mutex_unlock (&input->lock);
+    return input;
+  }
+  g_mutex_unlock (&input->lock);
+
+  GST_ERROR ("Input device %d (audio: %d) in use already", n, is_audio);
+  return NULL;
+}
+
+void
+gst_decklink_release_nth_input (gint n, GstElement * src, gboolean is_audio)
+{
+  GstDecklinkInput *input;
+
+  if (n >= n_devices)
+    return;
+
+  input = &devices[n].input;
+  g_assert (input->input);
+
+  g_mutex_lock (&input->lock);
+  if (is_audio) {
+    g_assert (input->audiosrc == src);
+    gst_object_unref (src);
+    input->audiosrc = NULL;
+  } else {
+    g_assert (input->videosrc == src);
+    gst_object_unref (src);
+    input->videosrc = NULL;
+  }
+  g_mutex_unlock (&input->lock);
+}
+
+G_DEFINE_TYPE (GstDecklinkClock, gst_decklink_clock, GST_TYPE_SYSTEM_CLOCK);
+
+static GstClockTime gst_decklink_clock_get_internal_time (GstClock * clock);
+
+static void
+gst_decklink_clock_class_init (GstDecklinkClockClass * klass)
+{
+  GstClockClass *clock_class = (GstClockClass *) klass;
+
+  clock_class->get_internal_time = gst_decklink_clock_get_internal_time;
+}
+
+static void
+gst_decklink_clock_init (GstDecklinkClock * clock)
+{
+  GST_OBJECT_FLAG_SET (clock, GST_CLOCK_FLAG_CAN_SET_MASTER);
+}
+
+static GstClock *
+gst_decklink_clock_new (const gchar * name)
+{
+  GstDecklinkClock *self =
+      GST_DECKLINK_CLOCK (g_object_new (GST_TYPE_DECKLINK_CLOCK, "name", name,
+          "clock-type", GST_CLOCK_TYPE_OTHER, NULL));
+
+  return GST_CLOCK_CAST (self);
+}
+
+static GstClockTime
+gst_decklink_clock_get_internal_time (GstClock * clock)
+{
+  GstDecklinkClock *self = GST_DECKLINK_CLOCK (clock);
+  GstClockTime result, start_time, last_time;
+  GstClockTimeDiff offset;
+  BMDTimeValue time;
+  HRESULT ret;
+
+  if (self->input != NULL) {
+    g_mutex_lock (&self->input->lock);
+    start_time = self->input->clock_start_time;
+    offset = self->input->clock_offset;
+    last_time = self->input->clock_last_time;
+    time = -1;
+    if (!self->input->started) {
+      result = last_time;
+      ret = -1;
+    } else {
+      ret =
+          self->input->input->GetHardwareReferenceClock (GST_SECOND, &time,
+          NULL, NULL);
+      if (ret == S_OK && time >= 0) {
+        result = time;
+        if (start_time == GST_CLOCK_TIME_NONE)
+          start_time = self->input->clock_start_time = result;
+
+        if (result > start_time)
+          result -= start_time;
+        else
+          result = 0;
+
+        if (self->input->clock_restart) {
+          self->input->clock_offset = result - last_time;
+          offset = self->input->clock_offset;
+          self->input->clock_restart = FALSE;
+        }
+        result = MAX (last_time, result);
+        result -= offset;
+        result = MAX (last_time, result);
+      } else {
+        result = last_time;
+      }
+
+      self->input->clock_last_time = result;
+    }
+    g_mutex_unlock (&self->input->lock);
+  } else if (self->output != NULL) {
+    g_mutex_lock (&self->output->lock);
+    start_time = self->output->clock_start_time;
+    offset = self->output->clock_offset;
+    last_time = self->output->clock_last_time;
+    time = -1;
+    if (!self->output->started) {
+      result = last_time;
+      ret = -1;
+    } else {
+      ret =
+          self->output->output->GetHardwareReferenceClock (GST_SECOND, &time,
+          NULL, NULL);
+      if (ret == S_OK && time >= 0) {
+        result = time;
+
+        if (start_time == GST_CLOCK_TIME_NONE)
+          start_time = self->output->clock_start_time = result;
+
+        if (result > start_time)
+          result -= start_time;
+        else
+          result = 0;
+
+        if (self->output->clock_restart) {
+          self->output->clock_offset = result - last_time;
+          offset = self->output->clock_offset;
+          self->output->clock_restart = FALSE;
+        }
+        result = MAX (last_time, result);
+        result -= offset;
+        result = MAX (last_time, result);
+      } else {
+        result = last_time;
+      }
+
+      self->output->clock_last_time = result;
+    }
+    g_mutex_unlock (&self->output->lock);
+  } else {
+    g_assert_not_reached ();
+  }
+  GST_LOG_OBJECT (clock,
+      "result %" GST_TIME_FORMAT " time %" GST_TIME_FORMAT " last time %"
+      GST_TIME_FORMAT " offset %" GST_TIME_FORMAT " start time %"
+      GST_TIME_FORMAT " (ret: 0x%08x)", GST_TIME_ARGS (result),
+      GST_TIME_ARGS (time), GST_TIME_ARGS (last_time), GST_TIME_ARGS (offset),
+      GST_TIME_ARGS (start_time), ret);
+
+  return result;
 }
 
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
+  GST_DEBUG_CATEGORY_INIT (gst_decklink_debug, "decklink", 0,
+      "debug category for decklink plugin");
 
-  gst_element_register (plugin, "decklinksrc", GST_RANK_NONE,
-      gst_decklink_src_get_type ());
-
-  gst_element_register (plugin, "decklinksink", GST_RANK_NONE,
-      gst_decklink_sink_get_type ());
-
+  gst_element_register (plugin, "decklinkaudiosink", GST_RANK_NONE,
+      GST_TYPE_DECKLINK_AUDIO_SINK);
+  gst_element_register (plugin, "decklinkvideosink", GST_RANK_NONE,
+      GST_TYPE_DECKLINK_VIDEO_SINK);
+  gst_element_register (plugin, "decklinkaudiosrc", GST_RANK_NONE,
+      GST_TYPE_DECKLINK_AUDIO_SRC);
+  gst_element_register (plugin, "decklinkvideosrc", GST_RANK_NONE,
+      GST_TYPE_DECKLINK_VIDEO_SRC);
   return TRUE;
 }
 
diff --git a/sys/decklink/gstdecklink.h b/sys/decklink/gstdecklink.h
index a204c78..b601e7c 100644
--- a/sys/decklink/gstdecklink.h
+++ b/sys/decklink/gstdecklink.h
@@ -1,5 +1,7 @@
 /* GStreamer
  * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2015 Florian Langlois <florian.langlois@fr.thalesgroup.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -42,6 +44,8 @@
 #endif /* _MSC_VER */
 
 typedef enum {
+  GST_DECKLINK_MODE_AUTO,
+
   GST_DECKLINK_MODE_NTSC,
   GST_DECKLINK_MODE_NTSC2398,
   GST_DECKLINK_MODE_PAL,
@@ -64,12 +68,26 @@
 
   GST_DECKLINK_MODE_720p50,
   GST_DECKLINK_MODE_720p5994,
-  GST_DECKLINK_MODE_720p60
+  GST_DECKLINK_MODE_720p60,
+
+  GST_DECKLINK_MODE_1556p2398,
+  GST_DECKLINK_MODE_1556p24,
+  GST_DECKLINK_MODE_1556p25,
+
+  GST_DECKLINK_MODE_2160p2398,
+  GST_DECKLINK_MODE_2160p24,
+  GST_DECKLINK_MODE_2160p25,
+  GST_DECKLINK_MODE_2160p2997,
+  GST_DECKLINK_MODE_2160p30,
+  GST_DECKLINK_MODE_2160p50,
+  GST_DECKLINK_MODE_2160p5994,
+  GST_DECKLINK_MODE_2160p60
 } GstDecklinkModeEnum;
 #define GST_TYPE_DECKLINK_MODE (gst_decklink_mode_get_type ())
 GType gst_decklink_mode_get_type (void);
 
 typedef enum {
+  GST_DECKLINK_CONNECTION_AUTO,
   GST_DECKLINK_CONNECTION_SDI,
   GST_DECKLINK_CONNECTION_HDMI,
   GST_DECKLINK_CONNECTION_OPTICAL_SDI,
@@ -84,7 +102,9 @@
   GST_DECKLINK_AUDIO_CONNECTION_AUTO,
   GST_DECKLINK_AUDIO_CONNECTION_EMBEDDED,
   GST_DECKLINK_AUDIO_CONNECTION_AES_EBU,
-  GST_DECKLINK_AUDIO_CONNECTION_ANALOG
+  GST_DECKLINK_AUDIO_CONNECTION_ANALOG,
+  GST_DECKLINK_AUDIO_CONNECTION_ANALOG_XLR,
+  GST_DECKLINK_AUDIO_CONNECTION_ANALOG_RCA
 } GstDecklinkAudioConnectionEnum;
 #define GST_TYPE_DECKLINK_AUDIO_CONNECTION (gst_decklink_audio_connection_get_type ())
 GType gst_decklink_audio_connection_get_type (void);
@@ -100,16 +120,76 @@
   int par_n;
   int par_d;
   gboolean tff;
-  gboolean is_hdtv;
+  const gchar *colorimetry;
 };
 
 const GstDecklinkMode * gst_decklink_get_mode (GstDecklinkModeEnum e);
+const GstDecklinkModeEnum gst_decklink_get_mode_enum_from_bmd (BMDDisplayMode mode);
+const BMDVideoConnection gst_decklink_get_connection (GstDecklinkConnectionEnum e);
 GstCaps * gst_decklink_mode_get_caps (GstDecklinkModeEnum e);
 GstCaps * gst_decklink_mode_get_template_caps (void);
 
-IDeckLink * gst_decklink_get_nth_device (int n);
-IDeckLinkInput * gst_decklink_get_nth_input (int n);
-IDeckLinkOutput * gst_decklink_get_nth_output (int n);
-IDeckLinkConfiguration * gst_decklink_get_nth_config (int n);
+typedef struct _GstDecklinkOutput GstDecklinkOutput;
+struct _GstDecklinkOutput {
+  IDeckLink *device;
+  IDeckLinkOutput *output;
+  GstClock *clock;
+  GstClockTime clock_start_time, clock_last_time;
+  GstClockTimeDiff clock_offset;
+  gboolean started, clock_restart;
+
+  /* Everything below protected by mutex */
+  GMutex lock;
+
+  /* Set by the video source */
+  /* Configured mode or NULL */
+  const GstDecklinkMode *mode;
+
+  /* Set by the audio sink */
+  GstClock *audio_clock;
+
+  GstElement *audiosink;
+  gboolean audio_enabled;
+  GstElement *videosink;
+  gboolean video_enabled;
+  void (*start_scheduled_playback) (GstElement *videosink);
+};
+
+typedef struct _GstDecklinkInput GstDecklinkInput;
+struct _GstDecklinkInput {
+  IDeckLink *device;
+  IDeckLinkInput *input;
+  IDeckLinkConfiguration *config;
+  IDeckLinkAttributes *attributes;
+  GstClock *clock;
+  GstClockTime clock_start_time, clock_offset, clock_last_time;
+  gboolean started, clock_restart;
+
+  /* Everything below protected by mutex */
+  GMutex lock;
+
+  /* Set by the video source */
+  void (*got_video_frame) (GstElement *videosrc, IDeckLinkVideoInputFrame * frame, GstDecklinkModeEnum mode, GstClockTime capture_time, GstClockTime capture_duration);
+  /* Configured mode or NULL */
+  const GstDecklinkMode *mode;
+
+  /* Set by the audio source */
+  void (*got_audio_packet) (GstElement *videosrc, IDeckLinkAudioInputPacket * packet, GstClockTime capture_time);
+
+  GstElement *audiosrc;
+  gboolean audio_enabled;
+  GstElement *videosrc;
+  gboolean video_enabled;
+  void (*start_streams) (GstElement *videosrc);
+};
+
+GstDecklinkOutput * gst_decklink_acquire_nth_output (gint n, GstElement * sink, gboolean is_audio);
+void                gst_decklink_release_nth_output (gint n, GstElement * sink, gboolean is_audio);
+
+void                gst_decklink_output_set_audio_clock (GstDecklinkOutput * output, GstClock * clock);
+GstClock *          gst_decklink_output_get_audio_clock (GstDecklinkOutput * output);
+
+GstDecklinkInput *  gst_decklink_acquire_nth_input (gint n, GstElement * src, gboolean is_audio);
+void                gst_decklink_release_nth_input (gint n, GstElement * src, gboolean is_audio);
 
 #endif
diff --git a/sys/decklink/gstdecklinkaudiosink.cpp b/sys/decklink/gstdecklinkaudiosink.cpp
new file mode 100644
index 0000000..1db9339
--- /dev/null
+++ b/sys/decklink/gstdecklinkaudiosink.cpp
@@ -0,0 +1,670 @@
+/* GStreamer
+ * Copyright (C) 2011 David Schleef <ds@entropywave.com>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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 Street, Suite 500,
+ * Boston, MA 02110-1335, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdecklinkaudiosink.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_decklink_audio_sink_debug);
+#define GST_CAT_DEFAULT gst_decklink_audio_sink_debug
+
+// Ringbuffer implementation
+
+#define GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER \
+  (gst_decklink_audio_sink_ringbuffer_get_type())
+#define GST_DECKLINK_AUDIO_SINK_RING_BUFFER(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER,GstDecklinkAudioSinkRingBuffer))
+#define GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST(obj) \
+  ((GstDecklinkAudioSinkRingBuffer*) obj)
+#define GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER,GstDecklinkAudioSinkRingBufferClass))
+#define GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER,GstDecklinkAudioSinkRingBufferClass))
+#define GST_IS_DECKLINK_AUDIO_SINK_RING_BUFFER(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER))
+#define GST_IS_DECKLINK_AUDIO_SINK_RING_BUFFER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER))
+
+typedef struct _GstDecklinkAudioSinkRingBuffer GstDecklinkAudioSinkRingBuffer;
+typedef struct _GstDecklinkAudioSinkRingBufferClass
+    GstDecklinkAudioSinkRingBufferClass;
+
+struct _GstDecklinkAudioSinkRingBuffer
+{
+  GstAudioRingBuffer object;
+
+  GstDecklinkOutput *output;
+  GstDecklinkAudioSink *sink;
+
+  GMutex clock_id_lock;
+  GstClockID clock_id;
+};
+
+struct _GstDecklinkAudioSinkRingBufferClass
+{
+  GstAudioRingBufferClass parent_class;
+};
+
+GType gst_decklink_audio_sink_ringbuffer_get_type (void);
+
+static void gst_decklink_audio_sink_ringbuffer_finalize (GObject * object);
+
+static void gst_decklink_audio_sink_ringbuffer_clear_all (GstAudioRingBuffer *
+    rb);
+static guint gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb);
+static gboolean gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer *
+    rb);
+static gboolean gst_decklink_audio_sink_ringbuffer_pause (GstAudioRingBuffer *
+    rb);
+static gboolean gst_decklink_audio_sink_ringbuffer_stop (GstAudioRingBuffer *
+    rb);
+static gboolean gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer *
+    rb, GstAudioRingBufferSpec * spec);
+static gboolean gst_decklink_audio_sink_ringbuffer_release (GstAudioRingBuffer *
+    rb);
+static gboolean
+gst_decklink_audio_sink_ringbuffer_open_device (GstAudioRingBuffer * rb);
+static gboolean
+gst_decklink_audio_sink_ringbuffer_close_device (GstAudioRingBuffer * rb);
+
+#define ringbuffer_parent_class gst_decklink_audio_sink_ringbuffer_parent_class
+G_DEFINE_TYPE (GstDecklinkAudioSinkRingBuffer,
+    gst_decklink_audio_sink_ringbuffer, GST_TYPE_AUDIO_RING_BUFFER);
+
+static void
+    gst_decklink_audio_sink_ringbuffer_class_init
+    (GstDecklinkAudioSinkRingBufferClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstAudioRingBufferClass *gstringbuffer_class =
+      GST_AUDIO_RING_BUFFER_CLASS (klass);
+
+  gobject_class->finalize = gst_decklink_audio_sink_ringbuffer_finalize;
+
+  gstringbuffer_class->open_device =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_open_device);
+  gstringbuffer_class->close_device =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_close_device);
+  gstringbuffer_class->acquire =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_acquire);
+  gstringbuffer_class->release =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_release);
+  gstringbuffer_class->start =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_start);
+  gstringbuffer_class->pause =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_pause);
+  gstringbuffer_class->resume =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_start);
+  gstringbuffer_class->stop =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_stop);
+  gstringbuffer_class->delay =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_delay);
+  gstringbuffer_class->clear_all =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_ringbuffer_clear_all);
+}
+
+static void
+gst_decklink_audio_sink_ringbuffer_init (GstDecklinkAudioSinkRingBuffer * self)
+{
+  g_mutex_init (&self->clock_id_lock);
+}
+
+static void
+gst_decklink_audio_sink_ringbuffer_finalize (GObject * object)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (object);
+
+  gst_object_unref (self->sink);
+  self->sink = NULL;
+  g_mutex_clear (&self->clock_id_lock);
+
+  G_OBJECT_CLASS (ringbuffer_parent_class)->finalize (object);
+}
+
+class GStreamerAudioOutputCallback:public IDeckLinkAudioOutputCallback
+{
+public:
+  GStreamerAudioOutputCallback (GstDecklinkAudioSinkRingBuffer * ringbuffer)
+  :IDeckLinkAudioOutputCallback (), m_refcount (1)
+  {
+    m_ringbuffer =
+        GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (gst_object_ref (ringbuffer));
+    g_mutex_init (&m_mutex);
+  }
+
+  virtual HRESULT QueryInterface (REFIID, LPVOID *)
+  {
+    return E_NOINTERFACE;
+  }
+
+  virtual ULONG AddRef (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount++;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+    return ret;
+  }
+
+  virtual ULONG Release (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount--;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+    if (ret == 0) {
+      delete this;
+    }
+
+    return ret;
+  }
+
+  virtual ~ GStreamerAudioOutputCallback () {
+    gst_object_unref (m_ringbuffer);
+    g_mutex_clear (&m_mutex);
+  }
+
+  virtual HRESULT RenderAudioSamples (bool preroll)
+  {
+    guint8 *ptr;
+    gint seg;
+    gint len;
+    gint bpf;
+    guint written, written_sum;
+    HRESULT res;
+    const GstAudioRingBufferSpec *spec =
+        &GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer)->spec;
+    guint delay, max_delay;
+
+    GST_LOG_OBJECT (m_ringbuffer->sink, "Writing audio samples (preroll: %d)",
+        preroll);
+
+    delay =
+        gst_audio_ring_buffer_delay (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer));
+    max_delay = MAX ((spec->segtotal * spec->segsize) / 2, spec->segsize);
+    max_delay /= GST_AUDIO_INFO_BPF (&spec->info);
+    if (delay > max_delay) {
+      GstClock *clock =
+          gst_element_get_clock (GST_ELEMENT_CAST (m_ringbuffer->sink));
+      GstClockTime wait_time;
+      GstClockID clock_id;
+      GstClockReturn clock_ret;
+
+      GST_DEBUG_OBJECT (m_ringbuffer->sink, "Delay %u > max delay %u", delay,
+          max_delay);
+
+      wait_time =
+          gst_util_uint64_scale (delay - max_delay, GST_SECOND,
+          GST_AUDIO_INFO_RATE (&spec->info));
+      GST_DEBUG_OBJECT (m_ringbuffer->sink, "Waiting for %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (wait_time));
+      wait_time += gst_clock_get_time (clock);
+
+      g_mutex_lock (&m_ringbuffer->clock_id_lock);
+      if (!GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer)->acquired) {
+        GST_DEBUG_OBJECT (m_ringbuffer->sink,
+            "Ringbuffer not acquired anymore");
+        g_mutex_unlock (&m_ringbuffer->clock_id_lock);
+        gst_object_unref (clock);
+        return S_OK;
+      }
+      clock_id = gst_clock_new_single_shot_id (clock, wait_time);
+      m_ringbuffer->clock_id = clock_id;
+      g_mutex_unlock (&m_ringbuffer->clock_id_lock);
+      gst_object_unref (clock);
+
+      clock_ret = gst_clock_id_wait (clock_id, NULL);
+
+      g_mutex_lock (&m_ringbuffer->clock_id_lock);
+      gst_clock_id_unref (clock_id);
+      m_ringbuffer->clock_id = NULL;
+      g_mutex_unlock (&m_ringbuffer->clock_id_lock);
+
+      if (clock_ret == GST_CLOCK_UNSCHEDULED) {
+        GST_DEBUG_OBJECT (m_ringbuffer->sink, "Flushing");
+        return S_OK;
+      }
+    }
+
+    if (!gst_audio_ring_buffer_prepare_read (GST_AUDIO_RING_BUFFER_CAST
+            (m_ringbuffer), &seg, &ptr, &len)) {
+      GST_WARNING_OBJECT (m_ringbuffer->sink, "No segment available");
+      return E_FAIL;
+    }
+
+    bpf =
+        GST_AUDIO_INFO_BPF (&GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer)->
+        spec.info);
+    len /= bpf;
+    GST_LOG_OBJECT (m_ringbuffer->sink,
+        "Write audio samples: %p size %d segment: %d", ptr, len, seg);
+
+    written_sum = 0;
+    do {
+      res =
+          m_ringbuffer->output->output->ScheduleAudioSamples (ptr, len,
+          0, 0, &written);
+      len -= written;
+      ptr += written * bpf;
+      written_sum += written;
+    } while (len > 0 && res == S_OK);
+
+    GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08x", written_sum,
+        res);
+
+    gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
+        seg);
+    gst_audio_ring_buffer_advance (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
+        1);
+
+    return res;
+  }
+
+private:
+  GstDecklinkAudioSinkRingBuffer * m_ringbuffer;
+  GMutex m_mutex;
+  gint m_refcount;
+};
+
+static void
+gst_decklink_audio_sink_ringbuffer_clear_all (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+
+  GST_DEBUG_OBJECT (self->sink, "Flushing");
+
+  if (self->output)
+    self->output->output->FlushBufferedAudioSamples ();
+}
+
+static guint
+gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+  guint ret = 0;
+
+  if (self->output) {
+    if (self->output->output->GetBufferedAudioSampleFrameCount (&ret) != S_OK)
+      ret = 0;
+  }
+
+  GST_DEBUG_OBJECT (self->sink, "Delay: %u", ret);
+
+  return ret;
+}
+
+#if 0
+static gboolean
+in_same_pipeline (GstElement * a, GstElement * b)
+{
+  GstObject *root = NULL, *tmp;
+  gboolean ret = FALSE;
+
+  tmp = gst_object_get_parent (GST_OBJECT_CAST (a));
+  while (tmp != NULL) {
+    if (root)
+      gst_object_unref (root);
+    root = tmp;
+    tmp = gst_object_get_parent (root);
+  }
+
+  ret = root && gst_object_has_ancestor (GST_OBJECT_CAST (b), root);
+
+  if (root)
+    gst_object_unref (root);
+
+  return ret;
+}
+#endif
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+  GstElement *videosink = NULL;
+  gboolean ret = TRUE;
+
+  // Check if there is a video sink for this output too and if it
+  // is actually in the same pipeline
+  g_mutex_lock (&self->output->lock);
+  if (self->output->videosink)
+    videosink = GST_ELEMENT_CAST (gst_object_ref (self->output->videosink));
+  g_mutex_unlock (&self->output->lock);
+
+  if (!videosink) {
+    GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
+        (NULL), ("Audio sink needs a video sink for its operation"));
+    ret = FALSE;
+  }
+  // FIXME: This causes deadlocks sometimes  
+#if 0
+  else if (!in_same_pipeline (GST_ELEMENT_CAST (self->sink), videosink)) {
+    GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
+        (NULL), ("Audio sink and video sink need to be in the same pipeline"));
+    ret = FALSE;
+  }
+#endif
+
+  if (videosink)
+    gst_object_unref (videosink);
+  return ret;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_pause (GstAudioRingBuffer * rb)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_stop (GstAudioRingBuffer * rb)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb,
+    GstAudioRingBufferSpec * spec)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+  HRESULT ret;
+  BMDAudioSampleType sample_depth;
+
+  GST_DEBUG_OBJECT (self->sink, "Acquire");
+
+  if (spec->info.finfo->format == GST_AUDIO_FORMAT_S16LE) {
+    sample_depth = bmdAudioSampleType16bitInteger;
+  } else {
+    sample_depth = bmdAudioSampleType32bitInteger;
+  }
+
+  ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz,
+      sample_depth, 2, bmdAudioOutputStreamContinuous);
+  if (ret != S_OK) {
+    GST_WARNING_OBJECT (self->sink, "Failed to enable audio output 0x%08x",
+        ret);
+    return FALSE;
+  }
+
+  ret =
+      self->output->
+      output->SetAudioCallback (new GStreamerAudioOutputCallback (self));
+  if (ret != S_OK) {
+    GST_WARNING_OBJECT (self->sink,
+        "Failed to set audio output callback 0x%08x", ret);
+    return FALSE;
+  }
+
+  spec->segsize =
+      (spec->latency_time * GST_AUDIO_INFO_RATE (&spec->info) /
+      G_USEC_PER_SEC) * GST_AUDIO_INFO_BPF (&spec->info);
+  spec->segtotal = spec->buffer_time / spec->latency_time;
+  // set latency to one more segment as we need some headroom
+  spec->seglatency = spec->segtotal + 1;
+
+  rb->size = spec->segtotal * spec->segsize;
+  rb->memory = (guint8 *) g_malloc0 (rb->size);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_release (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+
+  GST_DEBUG_OBJECT (self->sink, "Release");
+
+  if (self->output) {
+    g_mutex_lock (&self->clock_id_lock);
+    if (self->clock_id)
+      gst_clock_id_unschedule (self->clock_id);
+    g_mutex_unlock (&self->clock_id_lock);
+
+    g_mutex_lock (&self->output->lock);
+    self->output->audio_enabled = FALSE;
+    if (self->output->start_scheduled_playback && self->output->videosink)
+      self->output->start_scheduled_playback (self->output->videosink);
+    g_mutex_unlock (&self->output->lock);
+
+    self->output->output->DisableAudioOutput ();
+  }
+  // free the buffer
+  g_free (rb->memory);
+  rb->memory = NULL;
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_open_device (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+
+  GST_DEBUG_OBJECT (self->sink, "Open device");
+
+  self->output =
+      gst_decklink_acquire_nth_output (self->sink->device_number,
+      GST_ELEMENT_CAST (self), TRUE);
+  if (!self->output) {
+    GST_ERROR_OBJECT (self, "Failed to acquire output");
+    return FALSE;
+  }
+
+  gst_decklink_output_set_audio_clock (self->output,
+      GST_AUDIO_BASE_SINK_CAST (self->sink)->provided_clock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_sink_ringbuffer_close_device (GstAudioRingBuffer * rb)
+{
+  GstDecklinkAudioSinkRingBuffer *self =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (rb);
+
+  GST_DEBUG_OBJECT (self->sink, "Close device");
+
+  if (self->output) {
+    gst_decklink_output_set_audio_clock (self->output, NULL);
+    gst_decklink_release_nth_output (self->sink->device_number,
+        GST_ELEMENT_CAST (self), TRUE);
+    self->output = NULL;
+  }
+
+  return TRUE;
+}
+
+enum
+{
+  PROP_0,
+  PROP_DEVICE_NUMBER
+};
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS
+    ("audio/x-raw, format={S16LE,S32LE}, channels=2, rate=48000, "
+        "layout=interleaved")
+    );
+
+static void gst_decklink_audio_sink_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_decklink_audio_sink_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec);
+static void gst_decklink_audio_sink_finalize (GObject * object);
+
+static GstStateChangeReturn gst_decklink_audio_sink_change_state (GstElement *
+    element, GstStateChange transition);
+
+static GstAudioRingBuffer
+    * gst_decklink_audio_sink_create_ringbuffer (GstAudioBaseSink * absink);
+
+#define parent_class gst_decklink_audio_sink_parent_class
+G_DEFINE_TYPE (GstDecklinkAudioSink, gst_decklink_audio_sink,
+    GST_TYPE_AUDIO_BASE_SINK);
+
+static void
+gst_decklink_audio_sink_class_init (GstDecklinkAudioSinkClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstAudioBaseSinkClass *audiobasesink_class =
+      GST_AUDIO_BASE_SINK_CLASS (klass);
+
+  gobject_class->set_property = gst_decklink_audio_sink_set_property;
+  gobject_class->get_property = gst_decklink_audio_sink_get_property;
+  gobject_class->finalize = gst_decklink_audio_sink_finalize;
+
+  element_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_change_state);
+
+  audiobasesink_class->create_ringbuffer =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_sink_create_ringbuffer);
+
+  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
+      g_param_spec_int ("device-number", "Device number",
+          "Output device instance to use", 0, G_MAXINT, 0,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+
+  gst_element_class_set_static_metadata (element_class, "Decklink Audio Sink",
+      "Audio/Sink", "Decklink Sink", "David Schleef <ds@entropywave.com>, "
+      "Sebastian Dröge <sebastian@centricular.com>");
+
+  GST_DEBUG_CATEGORY_INIT (gst_decklink_audio_sink_debug, "decklinkaudiosink",
+      0, "debug category for decklinkaudiosink element");
+}
+
+static void
+gst_decklink_audio_sink_init (GstDecklinkAudioSink * self)
+{
+  self->device_number = 0;
+
+  // 25.000ms latency time seems to be needed at least,
+  // everything below can cause drop-outs
+  // TODO: This is probably related to the video mode that
+  // is selected, but not directly it seems. Choosing the
+  // duration of a frame does not work.
+  GST_AUDIO_BASE_SINK_CAST (self)->latency_time = 25000;
+}
+
+void
+gst_decklink_audio_sink_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkAudioSink *self = GST_DECKLINK_AUDIO_SINK_CAST (object);
+
+  switch (property_id) {
+    case PROP_DEVICE_NUMBER:
+      self->device_number = g_value_get_int (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_audio_sink_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkAudioSink *self = GST_DECKLINK_AUDIO_SINK_CAST (object);
+
+  switch (property_id) {
+    case PROP_DEVICE_NUMBER:
+      g_value_set_int (value, self->device_number);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_audio_sink_finalize (GObject * object)
+{
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static GstStateChangeReturn
+gst_decklink_audio_sink_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstDecklinkAudioSink *self = GST_DECKLINK_AUDIO_SINK_CAST (element);
+  GstDecklinkAudioSinkRingBuffer *buf =
+      GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (GST_AUDIO_BASE_SINK_CAST
+      (self)->ringbuffer);
+  GstStateChangeReturn 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_PAUSED_TO_PLAYING:
+      g_mutex_lock (&buf->output->lock);
+      buf->output->audio_enabled = TRUE;
+      if (buf->output->start_scheduled_playback && buf->output->videosink)
+        buf->output->start_scheduled_playback (buf->output->videosink);
+      g_mutex_unlock (&buf->output->lock);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static GstAudioRingBuffer *
+gst_decklink_audio_sink_create_ringbuffer (GstAudioBaseSink * absink)
+{
+  GstAudioRingBuffer *ret;
+
+  GST_DEBUG_OBJECT (absink, "Creating ringbuffer");
+
+  ret =
+      GST_AUDIO_RING_BUFFER_CAST (g_object_new
+      (GST_TYPE_DECKLINK_AUDIO_SINK_RING_BUFFER, NULL));
+
+  GST_DECKLINK_AUDIO_SINK_RING_BUFFER_CAST (ret)->sink =
+      (GstDecklinkAudioSink *) gst_object_ref (absink);
+
+  return ret;
+}
diff --git a/sys/decklink/gstdecklinkaudiosink.h b/sys/decklink/gstdecklinkaudiosink.h
new file mode 100644
index 0000000..82d20c3
--- /dev/null
+++ b/sys/decklink/gstdecklinkaudiosink.h
@@ -0,0 +1,64 @@
+/* GStreamer
+ *
+ * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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_DECKLINK_AUDIO_SINK_H__
+#define __GST_DECKLINK_AUDIO_SINK_H__
+
+#include <gst/gst.h>
+#include <gst/audio/audio.h>
+#include "gstdecklink.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DECKLINK_AUDIO_SINK \
+  (gst_decklink_audio_sink_get_type())
+#define GST_DECKLINK_AUDIO_SINK(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DECKLINK_AUDIO_SINK, GstDecklinkAudioSink))
+#define GST_DECKLINK_AUDIO_SINK_CAST(obj) \
+  ((GstDecklinkAudioSink*)obj)
+#define GST_DECKLINK_AUDIO_SINK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DECKLINK_AUDIO_SINK, GstDecklinkAudioSinkClass))
+#define GST_IS_DECKLINK_AUDIO_SINK(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DECKLINK_AUDIO_SINK))
+#define GST_IS_DECKLINK_AUDIO_SINK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DECKLINK_AUDIO_SINK))
+
+typedef struct _GstDecklinkAudioSink GstDecklinkAudioSink;
+typedef struct _GstDecklinkAudioSinkClass GstDecklinkAudioSinkClass;
+
+struct _GstDecklinkAudioSink
+{
+  GstAudioBaseSink parent;
+
+  GstDecklinkModeEnum mode;
+  gint device_number;
+};
+
+struct _GstDecklinkAudioSinkClass
+{
+  GstAudioBaseSinkClass parent_class;
+};
+
+GType gst_decklink_audio_sink_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_DECKLINK_AUDIO_SINK_H__ */
diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
new file mode 100644
index 0000000..70cfa74
--- /dev/null
+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
@@ -0,0 +1,785 @@
+/* GStreamer
+ * Copyright (C) 2011 David Schleef <ds@entropywave.com>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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 Street, Suite 500,
+ * Boston, MA 02110-1335, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdecklinkaudiosrc.h"
+#include "gstdecklinkvideosrc.h"
+#include <string.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_decklink_audio_src_debug);
+#define GST_CAT_DEFAULT gst_decklink_audio_src_debug
+
+#define DEFAULT_CONNECTION            (GST_DECKLINK_AUDIO_CONNECTION_AUTO)
+#define DEFAULT_BUFFER_SIZE           (5)
+
+#define DEFAULT_ALIGNMENT_THRESHOLD   (40 * GST_MSECOND)
+#define DEFAULT_DISCONT_WAIT          (1 * GST_SECOND)
+
+enum
+{
+  PROP_0,
+  PROP_CONNECTION,
+  PROP_DEVICE_NUMBER,
+  PROP_ALIGNMENT_THRESHOLD,
+  PROP_DISCONT_WAIT,
+  PROP_BUFFER_SIZE
+};
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS
+    ("audio/x-raw, format={S16LE,S32LE}, channels=2, rate=48000, "
+        "layout=interleaved")
+    );
+
+typedef struct
+{
+  IDeckLinkAudioInputPacket *packet;
+  GstClockTime capture_time;
+} CapturePacket;
+
+static void
+capture_packet_free (void *data)
+{
+  CapturePacket *packet = (CapturePacket *) data;
+
+  packet->packet->Release ();
+  g_free (packet);
+}
+
+typedef struct
+{
+  IDeckLinkAudioInputPacket *packet;
+  IDeckLinkInput *input;
+} AudioPacket;
+
+static void
+audio_packet_free (void *data)
+{
+  AudioPacket *packet = (AudioPacket *) data;
+
+  packet->packet->Release ();
+  packet->input->Release ();
+  g_free (packet);
+}
+
+static void gst_decklink_audio_src_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_decklink_audio_src_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec);
+static void gst_decklink_audio_src_finalize (GObject * object);
+
+static GstStateChangeReturn
+gst_decklink_audio_src_change_state (GstElement * element,
+    GstStateChange transition);
+
+static gboolean gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc,
+    GstCaps * caps);
+static GstCaps *gst_decklink_audio_src_get_caps (GstBaseSrc * bsrc,
+    GstCaps * filter);
+static gboolean gst_decklink_audio_src_unlock (GstBaseSrc * bsrc);
+static gboolean gst_decklink_audio_src_unlock_stop (GstBaseSrc * bsrc);
+static gboolean gst_decklink_audio_src_query (GstBaseSrc * bsrc,
+    GstQuery * query);
+
+static GstFlowReturn gst_decklink_audio_src_create (GstPushSrc * psrc,
+    GstBuffer ** buffer);
+
+static gboolean gst_decklink_audio_src_open (GstDecklinkAudioSrc * self);
+static gboolean gst_decklink_audio_src_close (GstDecklinkAudioSrc * self);
+
+#define parent_class gst_decklink_audio_src_parent_class
+G_DEFINE_TYPE (GstDecklinkAudioSrc, gst_decklink_audio_src, GST_TYPE_PUSH_SRC);
+
+static void
+gst_decklink_audio_src_class_init (GstDecklinkAudioSrcClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstBaseSrcClass *basesrc_class = GST_BASE_SRC_CLASS (klass);
+  GstPushSrcClass *pushsrc_class = GST_PUSH_SRC_CLASS (klass);
+
+  gobject_class->set_property = gst_decklink_audio_src_set_property;
+  gobject_class->get_property = gst_decklink_audio_src_get_property;
+  gobject_class->finalize = gst_decklink_audio_src_finalize;
+
+  element_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_src_change_state);
+
+  basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_get_caps);
+  basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_set_caps);
+  basesrc_class->query = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_query);
+  basesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_unlock);
+  basesrc_class->unlock_stop =
+      GST_DEBUG_FUNCPTR (gst_decklink_audio_src_unlock_stop);
+
+  pushsrc_class->create = GST_DEBUG_FUNCPTR (gst_decklink_audio_src_create);
+
+  g_object_class_install_property (gobject_class, PROP_CONNECTION,
+      g_param_spec_enum ("connection", "Connection",
+          "Audio input connection to use",
+          GST_TYPE_DECKLINK_AUDIO_CONNECTION, DEFAULT_CONNECTION,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
+      g_param_spec_int ("device-number", "Device number",
+          "Output device instance to use", 0, G_MAXINT, 0,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_ALIGNMENT_THRESHOLD,
+      g_param_spec_uint64 ("alignment-threshold", "Alignment Threshold",
+          "Timestamp alignment threshold in nanoseconds", 0,
+          G_MAXUINT64 - 1, DEFAULT_ALIGNMENT_THRESHOLD,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_DISCONT_WAIT,
+      g_param_spec_uint64 ("discont-wait", "Discont Wait",
+          "Window of time in nanoseconds to wait before "
+          "creating a discontinuity", 0,
+          G_MAXUINT64 - 1, DEFAULT_DISCONT_WAIT,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
+      g_param_spec_uint ("buffer-size", "Buffer Size",
+          "Size of internal buffer in number of video frames", 1,
+          G_MAXINT, DEFAULT_BUFFER_SIZE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&sink_template));
+
+  gst_element_class_set_static_metadata (element_class, "Decklink Audio Source",
+      "Audio/Src", "Decklink Source", "David Schleef <ds@entropywave.com>, "
+      "Sebastian Dröge <sebastian@centricular.com>");
+
+  GST_DEBUG_CATEGORY_INIT (gst_decklink_audio_src_debug, "decklinkaudiosrc",
+      0, "debug category for decklinkaudiosrc element");
+}
+
+static void
+gst_decklink_audio_src_init (GstDecklinkAudioSrc * self)
+{
+  self->device_number = 0;
+  self->alignment_threshold = DEFAULT_ALIGNMENT_THRESHOLD;
+  self->discont_wait = DEFAULT_DISCONT_WAIT;
+  self->buffer_size = DEFAULT_BUFFER_SIZE;
+
+  gst_base_src_set_live (GST_BASE_SRC (self), TRUE);
+  gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
+
+  g_mutex_init (&self->lock);
+  g_cond_init (&self->cond);
+
+  g_queue_init (&self->current_packets);
+}
+
+void
+gst_decklink_audio_src_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (object);
+
+  switch (property_id) {
+    case PROP_CONNECTION:
+      self->connection =
+          (GstDecklinkAudioConnectionEnum) g_value_get_enum (value);
+      break;
+    case PROP_DEVICE_NUMBER:
+      self->device_number = g_value_get_int (value);
+      break;
+    case PROP_ALIGNMENT_THRESHOLD:
+      self->alignment_threshold = g_value_get_uint64 (value);
+      break;
+    case PROP_DISCONT_WAIT:
+      self->discont_wait = g_value_get_uint64 (value);
+      break;
+    case PROP_BUFFER_SIZE:
+      self->buffer_size = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_audio_src_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (object);
+
+  switch (property_id) {
+    case PROP_CONNECTION:
+      g_value_set_enum (value, self->connection);
+      break;
+    case PROP_DEVICE_NUMBER:
+      g_value_set_int (value, self->device_number);
+      break;
+    case PROP_ALIGNMENT_THRESHOLD:
+      g_value_set_uint64 (value, self->alignment_threshold);
+      break;
+    case PROP_DISCONT_WAIT:
+      g_value_set_uint64 (value, self->discont_wait);
+      break;
+    case PROP_BUFFER_SIZE:
+      g_value_set_uint (value, self->buffer_size);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_audio_src_finalize (GObject * object)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (object);
+
+  g_mutex_clear (&self->lock);
+  g_cond_clear (&self->cond);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (bsrc);
+  BMDAudioSampleType sample_depth;
+  GstCaps *current_caps;
+  HRESULT ret;
+  BMDAudioConnection conn = (BMDAudioConnection) - 1;
+
+  GST_DEBUG_OBJECT (self, "Setting caps %" GST_PTR_FORMAT, caps);
+
+  if ((current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc)))) {
+    GST_DEBUG_OBJECT (self, "Pad already has caps %" GST_PTR_FORMAT, caps);
+
+    if (!gst_caps_is_equal (caps, current_caps)) {
+      GST_ERROR_OBJECT (self, "New caps are not equal to old caps");
+      gst_caps_unref (current_caps);
+      return FALSE;
+    } else {
+      gst_caps_unref (current_caps);
+      return TRUE;
+    }
+  }
+
+  if (!gst_audio_info_from_caps (&self->info, caps))
+    return FALSE;
+
+  if (self->info.finfo->format == GST_AUDIO_FORMAT_S16LE) {
+    sample_depth = bmdAudioSampleType16bitInteger;
+  } else {
+    sample_depth = bmdAudioSampleType32bitInteger;
+  }
+
+  switch (self->connection) {
+    case GST_DECKLINK_AUDIO_CONNECTION_AUTO:{
+      GstElement *videosrc = NULL;
+      GstDecklinkConnectionEnum vconn;
+
+      // Try to get the connection from the videosrc and try
+      // to select a sensible audio connection based on that
+      g_mutex_lock (&self->input->lock);
+      if (self->input->videosrc)
+        videosrc = GST_ELEMENT_CAST (gst_object_ref (self->input->videosrc));
+      g_mutex_unlock (&self->input->lock);
+
+      if (videosrc) {
+        g_object_get (videosrc, "connection", &vconn, NULL);
+        gst_object_unref (videosrc);
+
+        switch (vconn) {
+          case GST_DECKLINK_CONNECTION_SDI:
+            conn = bmdAudioConnectionEmbedded;
+            break;
+          case GST_DECKLINK_CONNECTION_HDMI:
+            conn = bmdAudioConnectionEmbedded;
+            break;
+          case GST_DECKLINK_CONNECTION_OPTICAL_SDI:
+            conn = bmdAudioConnectionEmbedded;
+            break;
+          case GST_DECKLINK_CONNECTION_COMPONENT:
+            conn = bmdAudioConnectionAnalog;
+            break;
+          case GST_DECKLINK_CONNECTION_COMPOSITE:
+            conn = bmdAudioConnectionAnalog;
+            break;
+          case GST_DECKLINK_CONNECTION_SVIDEO:
+            conn = bmdAudioConnectionAnalog;
+            break;
+          default:
+            // Use default
+            break;
+        }
+      }
+
+      break;
+    }
+    case GST_DECKLINK_AUDIO_CONNECTION_EMBEDDED:
+      conn = bmdAudioConnectionEmbedded;
+      break;
+    case GST_DECKLINK_AUDIO_CONNECTION_AES_EBU:
+      conn = bmdAudioConnectionAESEBU;
+      break;
+    case GST_DECKLINK_AUDIO_CONNECTION_ANALOG:
+      conn = bmdAudioConnectionAnalog;
+      break;
+    case GST_DECKLINK_AUDIO_CONNECTION_ANALOG_XLR:
+      conn = bmdAudioConnectionAnalogXLR;
+      break;
+    case GST_DECKLINK_AUDIO_CONNECTION_ANALOG_RCA:
+      conn = bmdAudioConnectionAnalogRCA;
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+
+  if (conn != (BMDAudioConnection) - 1) {
+    ret =
+        self->input->config->SetInt (bmdDeckLinkConfigAudioInputConnection,
+        conn);
+    if (ret != S_OK) {
+      GST_ERROR ("set configuration (audio input connection)");
+      return FALSE;
+    }
+  }
+
+  ret = self->input->input->EnableAudioInput (bmdAudioSampleRate48kHz,
+      sample_depth, 2);
+  if (ret != S_OK) {
+    GST_WARNING_OBJECT (self, "Failed to enable audio input");
+    return FALSE;
+  }
+
+  g_mutex_lock (&self->input->lock);
+  self->input->audio_enabled = TRUE;
+  if (self->input->start_streams && self->input->videosrc)
+    self->input->start_streams (self->input->videosrc);
+  g_mutex_unlock (&self->input->lock);
+
+  return TRUE;
+}
+
+static GstCaps *
+gst_decklink_audio_src_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
+{
+  GstCaps *caps;
+
+  // We don't support renegotiation
+  caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc));
+
+  if (!caps)
+    caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (bsrc));
+
+  if (filter) {
+    GstCaps *tmp =
+        gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (caps);
+    caps = tmp;
+  }
+
+  return caps;
+}
+
+static void
+gst_decklink_audio_src_got_packet (GstElement * element,
+    IDeckLinkAudioInputPacket * packet, GstClockTime capture_time)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (element);
+  GstDecklinkVideoSrc *videosrc = NULL;
+
+  GST_LOG_OBJECT (self, "Got audio packet at %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (capture_time));
+
+  g_mutex_lock (&self->input->lock);
+  if (self->input->videosrc)
+    videosrc =
+        GST_DECKLINK_VIDEO_SRC_CAST (gst_object_ref (self->input->videosrc));
+  g_mutex_unlock (&self->input->lock);
+
+  if (videosrc) {
+    gst_decklink_video_src_convert_to_external_clock (videosrc, &capture_time,
+        NULL);
+    gst_object_unref (videosrc);
+    GST_LOG_OBJECT (self, "Actual timestamp %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (capture_time));
+  }
+
+  g_mutex_lock (&self->lock);
+  if (!self->flushing) {
+    CapturePacket *p;
+
+    while (g_queue_get_length (&self->current_packets) >= self->buffer_size) {
+      p = (CapturePacket *) g_queue_pop_head (&self->current_packets);
+      GST_WARNING_OBJECT (self, "Dropping old packet at %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (p->capture_time));
+      capture_packet_free (p);
+    }
+
+    p = (CapturePacket *) g_malloc0 (sizeof (CapturePacket));
+    p->packet = packet;
+    p->capture_time = capture_time;
+    packet->AddRef ();
+    g_queue_push_tail (&self->current_packets, p);
+    g_cond_signal (&self->cond);
+  }
+  g_mutex_unlock (&self->lock);
+}
+
+static GstFlowReturn
+gst_decklink_audio_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (bsrc);
+  GstFlowReturn flow_ret = GST_FLOW_OK;
+  const guint8 *data;
+  glong sample_count;
+  gsize data_size;
+  CapturePacket *p;
+  AudioPacket *ap;
+  GstClockTime timestamp, duration;
+  GstClockTime start_time, end_time;
+  guint64 start_offset, end_offset;
+  gboolean discont = FALSE;
+
+  g_mutex_lock (&self->lock);
+  while (g_queue_is_empty (&self->current_packets) && !self->flushing) {
+    g_cond_wait (&self->cond, &self->lock);
+  }
+
+  p = (CapturePacket *) g_queue_pop_head (&self->current_packets);
+  g_mutex_unlock (&self->lock);
+
+  if (self->flushing) {
+    if (p)
+      capture_packet_free (p);
+    GST_DEBUG_OBJECT (self, "Flushing");
+    return GST_FLOW_FLUSHING;
+  }
+
+  p->packet->GetBytes ((gpointer *) & data);
+  sample_count = p->packet->GetSampleFrameCount ();
+  data_size = self->info.bpf * sample_count;
+
+  ap = (AudioPacket *) g_malloc0 (sizeof (AudioPacket));
+
+  *buffer =
+      gst_buffer_new_wrapped_full ((GstMemoryFlags) GST_MEMORY_FLAG_READONLY,
+      (gpointer) data, data_size, 0, data_size, ap,
+      (GDestroyNotify) audio_packet_free);
+
+  ap->packet = p->packet;
+  p->packet->AddRef ();
+  ap->input = self->input->input;
+  ap->input->AddRef ();
+
+  timestamp = p->capture_time;
+
+  // Jitter and discontinuity handling, based on audiobasesrc
+  start_time = timestamp;
+
+  // Convert to the sample numbers
+  start_offset =
+      gst_util_uint64_scale (start_time, self->info.rate, GST_SECOND);
+
+  end_offset = start_offset + sample_count;
+  end_time = gst_util_uint64_scale_int (end_offset, GST_SECOND,
+      self->info.rate);
+
+  duration = end_time - start_time;
+
+  if (self->next_offset == (guint64) - 1) {
+    discont = TRUE;
+  } else {
+    guint64 diff, max_sample_diff;
+
+    // Check discont
+    if (start_offset <= self->next_offset)
+      diff = self->next_offset - start_offset;
+    else
+      diff = start_offset - self->next_offset;
+
+    max_sample_diff =
+        gst_util_uint64_scale_int (self->alignment_threshold, self->info.rate,
+        GST_SECOND);
+
+    // Discont!
+    if (G_UNLIKELY (diff >= max_sample_diff)) {
+      if (self->discont_wait > 0) {
+        if (self->discont_time == GST_CLOCK_TIME_NONE) {
+          self->discont_time = start_time;
+        } else if (start_time - self->discont_time >= self->discont_wait) {
+          discont = TRUE;
+          self->discont_time = GST_CLOCK_TIME_NONE;
+        }
+      } else {
+        discont = TRUE;
+      }
+    } else if (G_UNLIKELY (self->discont_time != GST_CLOCK_TIME_NONE)) {
+      // we have had a discont, but are now back on track!
+      self->discont_time = GST_CLOCK_TIME_NONE;
+    }
+  }
+
+  if (discont) {
+    // Have discont, need resync and use the capture timestamps
+    if (self->next_offset != (guint64) - 1)
+      GST_INFO_OBJECT (self, "Have discont. Expected %"
+          G_GUINT64_FORMAT ", got %" G_GUINT64_FORMAT,
+          self->next_offset, start_offset);
+    GST_BUFFER_FLAG_SET (*buffer, GST_BUFFER_FLAG_DISCONT);
+    self->next_offset = end_offset;
+  } else {
+    // No discont, just keep counting
+    self->discont_time = GST_CLOCK_TIME_NONE;
+    timestamp =
+        gst_util_uint64_scale (self->next_offset, GST_SECOND, self->info.rate);
+    self->next_offset += sample_count;
+    duration =
+        gst_util_uint64_scale (self->next_offset, GST_SECOND,
+        self->info.rate) - timestamp;
+  }
+
+  GST_BUFFER_TIMESTAMP (*buffer) = timestamp;
+  GST_BUFFER_DURATION (*buffer) = duration;
+
+  GST_DEBUG_OBJECT (self,
+      "Outputting buffer %p with timestamp %" GST_TIME_FORMAT " and duration %"
+      GST_TIME_FORMAT, *buffer, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (*buffer)),
+      GST_TIME_ARGS (GST_BUFFER_DURATION (*buffer)));
+
+  capture_packet_free (p);
+
+  return flow_ret;
+}
+
+static gboolean
+gst_decklink_audio_src_query (GstBaseSrc * bsrc, GstQuery * query)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (bsrc);
+  gboolean ret = TRUE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_LATENCY:{
+      if (self->input) {
+        g_mutex_lock (&self->input->lock);
+        if (self->input->mode) {
+          GstClockTime min, max;
+
+          min =
+              gst_util_uint64_scale_ceil (GST_SECOND, self->input->mode->fps_d,
+              self->input->mode->fps_n);
+          max = self->buffer_size * min;
+
+          gst_query_set_latency (query, TRUE, min, max);
+          ret = TRUE;
+        } else {
+          ret = FALSE;
+        }
+        g_mutex_unlock (&self->input->lock);
+      } else {
+        ret = FALSE;
+      }
+
+      break;
+    }
+    default:
+      ret = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
+      break;
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_decklink_audio_src_unlock (GstBaseSrc * bsrc)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (bsrc);
+
+  g_mutex_lock (&self->lock);
+  self->flushing = TRUE;
+  g_cond_signal (&self->cond);
+  g_mutex_unlock (&self->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_src_unlock_stop (GstBaseSrc * bsrc)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (bsrc);
+
+  g_mutex_lock (&self->lock);
+  self->flushing = FALSE;
+  g_queue_foreach (&self->current_packets, (GFunc) capture_packet_free, NULL);
+  g_queue_clear (&self->current_packets);
+  g_mutex_unlock (&self->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_src_open (GstDecklinkAudioSrc * self)
+{
+  GST_DEBUG_OBJECT (self, "Starting");
+
+  self->input =
+      gst_decklink_acquire_nth_input (self->device_number,
+      GST_ELEMENT_CAST (self), TRUE);
+  if (!self->input) {
+    GST_ERROR_OBJECT (self, "Failed to acquire input");
+    return FALSE;
+  }
+
+  g_mutex_lock (&self->input->lock);
+  self->input->got_audio_packet = gst_decklink_audio_src_got_packet;
+  g_mutex_unlock (&self->input->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_audio_src_close (GstDecklinkAudioSrc * self)
+{
+
+  GST_DEBUG_OBJECT (self, "Stopping");
+
+  if (self->input) {
+    g_mutex_lock (&self->input->lock);
+    self->input->got_audio_packet = NULL;
+    self->input->audio_enabled = FALSE;
+    if (self->input->start_streams && self->input->videosrc)
+      self->input->start_streams (self->input->videosrc);
+    g_mutex_unlock (&self->input->lock);
+
+    self->input->input->DisableAudioInput ();
+    gst_decklink_release_nth_input (self->device_number,
+        GST_ELEMENT_CAST (self), TRUE);
+    self->input = NULL;
+  }
+
+  return TRUE;
+}
+
+#if 0
+static gboolean
+in_same_pipeline (GstElement * a, GstElement * b)
+{
+  GstObject *root = NULL, *tmp;
+  gboolean ret = FALSE;
+
+  tmp = gst_object_get_parent (GST_OBJECT_CAST (a));
+  while (tmp != NULL) {
+    if (root)
+      gst_object_unref (root);
+    root = tmp;
+    tmp = gst_object_get_parent (root);
+  }
+
+  ret = root && gst_object_has_ancestor (GST_OBJECT_CAST (b), root);
+
+  if (root)
+    gst_object_unref (root);
+
+  return ret;
+}
+#endif
+
+static GstStateChangeReturn
+gst_decklink_audio_src_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstDecklinkAudioSrc *self = GST_DECKLINK_AUDIO_SRC_CAST (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_decklink_audio_src_open (self)) {
+        ret = GST_STATE_CHANGE_FAILURE;
+        goto out;
+      }
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:{
+      GstElement *videosrc = NULL;
+
+      // Check if there is a video src for this input too and if it
+      // is actually in the same pipeline
+      g_mutex_lock (&self->input->lock);
+      if (self->input->videosrc)
+        videosrc = GST_ELEMENT_CAST (gst_object_ref (self->input->videosrc));
+      g_mutex_unlock (&self->input->lock);
+
+      if (!videosrc) {
+        GST_ELEMENT_ERROR (self, STREAM, FAILED,
+            (NULL), ("Audio src needs a video src for its operation"));
+        ret = GST_STATE_CHANGE_FAILURE;
+        goto out;
+      }
+      // FIXME: This causes deadlocks sometimes
+#if 0
+      else if (!in_same_pipeline (GST_ELEMENT_CAST (self), videosrc)) {
+        GST_ELEMENT_ERROR (self, STREAM, FAILED,
+            (NULL),
+            ("Audio src and video src need to be in the same pipeline"));
+        ret = GST_STATE_CHANGE_FAILURE;
+        gst_object_unref (videosrc);
+        goto out;
+      }
+#endif
+
+      if (videosrc)
+        gst_object_unref (videosrc);
+
+      self->flushing = FALSE;
+      self->next_offset = -1;
+      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:
+      g_queue_foreach (&self->current_packets, (GFunc) capture_packet_free,
+          NULL);
+      g_queue_clear (&self->current_packets);
+      break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      gst_decklink_audio_src_close (self);
+      break;
+    default:
+      break;
+  }
+out:
+
+  return ret;
+}
diff --git a/sys/decklink/gstdecklinkaudiosrc.h b/sys/decklink/gstdecklinkaudiosrc.h
new file mode 100644
index 0000000..9d0af77
--- /dev/null
+++ b/sys/decklink/gstdecklinkaudiosrc.h
@@ -0,0 +1,87 @@
+/* GStreamer
+ *
+ * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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_DECKLINK_AUDIO_SRC_H__
+#define __GST_DECKLINK_AUDIO_SRC_H__
+
+#include <gst/gst.h>
+#include <gst/base/base.h>
+#include <gst/audio/audio.h>
+#include "gstdecklink.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DECKLINK_AUDIO_SRC \
+  (gst_decklink_audio_src_get_type())
+#define GST_DECKLINK_AUDIO_SRC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DECKLINK_AUDIO_SRC, GstDecklinkAudioSrc))
+#define GST_DECKLINK_AUDIO_SRC_CAST(obj) \
+  ((GstDecklinkAudioSrc*)obj)
+#define GST_DECKLINK_AUDIO_SRC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DECKLINK_AUDIO_SRC, GstDecklinkAudioSrcClass))
+#define GST_IS_DECKLINK_AUDIO_SRC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DECKLINK_AUDIO_SRC))
+#define GST_IS_DECKLINK_AUDIO_SRC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DECKLINK_AUDIO_SRC))
+
+typedef struct _GstDecklinkAudioSrc GstDecklinkAudioSrc;
+typedef struct _GstDecklinkAudioSrcClass GstDecklinkAudioSrcClass;
+
+struct _GstDecklinkAudioSrc
+{
+  GstPushSrc parent;
+
+  GstDecklinkModeEnum mode;
+  GstDecklinkAudioConnectionEnum connection;
+  gint device_number;
+
+  GstAudioInfo info;
+
+  GstDecklinkInput *input;
+
+  GCond cond;
+  GMutex lock;
+  gboolean flushing;
+  GQueue current_packets;
+
+  /* properties for handling jittery timestamps */
+  GstClockTime alignment_threshold;
+  GstClockTime discont_wait;
+
+  /* counter to keep track of timestamps */
+  guint64 next_offset;
+
+  /* Last time we noticed a discont */
+  GstClockTime discont_time;
+
+  guint buffer_size;
+};
+
+struct _GstDecklinkAudioSrcClass
+{
+  GstPushSrcClass parent_class;
+};
+
+GType gst_decklink_audio_src_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_DECKLINK_AUDIO_SRC_H__ */
diff --git a/sys/decklink/gstdecklinksink.cpp b/sys/decklink/gstdecklinksink.cpp
deleted file mode 100644
index df77d02..0000000
--- a/sys/decklink/gstdecklinksink.cpp
+++ /dev/null
@@ -1,755 +0,0 @@
-/* GStreamer
- * Copyright (C) 2011 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 Street, Suite 500,
- * Boston, MA 02110-1335, USA.
- */
-/**
- * SECTION:element-gstdecklinksink
- *
- * The decklinksink element is a sink element for BlackMagic DeckLink
- * cards.
- *
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch-1.0 -v videotestsrc ! decklinksink
- * ]|
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gst/gst.h>
-#include <gst/video/video.h>
-#include "gstdecklink.h"
-#include "gstdecklinksink.h"
-#include <string.h>
-
-/* FIXME:
- *  - handle ALLOCATION query
- *  - provide buffer pool with suitable strides/alignment for video
- *  - handle video meta
- */
-
-GST_DEBUG_CATEGORY_STATIC (gst_decklink_sink_debug_category);
-#define GST_CAT_DEFAULT gst_decklink_sink_debug_category
-
-static void gst_decklink_sink_set_property (GObject * object,
-    guint property_id, const GValue * value, GParamSpec * pspec);
-static void gst_decklink_sink_get_property (GObject * object,
-    guint property_id, GValue * value, GParamSpec * pspec);
-static void gst_decklink_sink_finalize (GObject * object);
-
-static GstStateChangeReturn
-gst_decklink_sink_change_state (GstElement * element,
-    GstStateChange transition);
-
-static GstFlowReturn gst_decklink_sink_videosink_chain (GstPad * pad,
-    GstObject * parent, GstBuffer * buffer);
-static gboolean gst_decklink_sink_videosink_event (GstPad * pad,
-    GstObject * parent, GstEvent * event);
-static gboolean gst_decklink_sink_videosink_query (GstPad * pad,
-    GstObject * parent, GstQuery * query);
-
-static GstFlowReturn gst_decklink_sink_audiosink_chain (GstPad * pad,
-    GstObject * parent, GstBuffer * buffer);
-static gboolean gst_decklink_sink_audiosink_event (GstPad * pad,
-    GstObject * parent, GstEvent * event);
-static gboolean gst_decklink_sink_audiosink_query (GstPad * pad,
-    GstObject * parent, GstQuery * query);
-
-#ifdef _MSC_VER
-/* COM initialization/uninitialization thread */
-static void gst_decklink_sink_com_thread (GstDecklinkSink * sink);
-#endif /* _MSC_VER */
-
-enum
-{
-  PROP_0,
-  PROP_MODE,
-  PROP_DEVICE_NUMBER
-};
-
-/* pad templates */
-
-/* the video sink pad template is created on the fly */
-
-static GstStaticPadTemplate gst_decklink_sink_audiosink_template =
-GST_STATIC_PAD_TEMPLATE ("audiosink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw, format=S16LE, channels=2, rate=48000, "
-        "layout=interleaved")
-    );
-
-#define parent_class gst_decklink_sink_parent_class
-G_DEFINE_TYPE (GstDecklinkSink, gst_decklink_sink, GST_TYPE_ELEMENT);
-
-static void
-gst_decklink_sink_class_init (GstDecklinkSinkClass * klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_decklink_sink_set_property;
-  gobject_class->get_property = gst_decklink_sink_get_property;
-  gobject_class->finalize = gst_decklink_sink_finalize;
-
-  element_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_change_state);
-
-  g_object_class_install_property (gobject_class, PROP_MODE,
-      g_param_spec_enum ("mode", "Playback Mode",
-          "Video Mode to use for playback",
-          GST_TYPE_DECKLINK_MODE, GST_DECKLINK_MODE_NTSC,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
-      g_param_spec_int ("device-number", "Device number",
-          "Output device instance to use", 0, G_MAXINT, 0,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("videosink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          gst_decklink_mode_get_template_caps ()));
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_decklink_sink_audiosink_template));
-
-  gst_element_class_set_static_metadata (element_class, "Decklink Sink",
-      "Video/Sink", "Decklink Sink", "David Schleef <ds@entropywave.com>");
-
-  GST_DEBUG_CATEGORY_INIT (gst_decklink_sink_debug_category, "decklinksink", 0,
-      "debug category for decklinksink element");
-}
-
-static void
-gst_decklink_sink_init (GstDecklinkSink * decklinksink)
-{
-  GstDecklinkSinkClass *decklinksink_class;
-
-  decklinksink_class = GST_DECKLINK_SINK_GET_CLASS (decklinksink);
-
-  decklinksink->videosinkpad =
-      gst_pad_new_from_template (gst_element_class_get_pad_template
-      (GST_ELEMENT_CLASS (decklinksink_class), "videosink"), "videosink");
-  gst_pad_set_chain_function (decklinksink->videosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_videosink_chain));
-  gst_pad_set_event_function (decklinksink->videosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_videosink_event));
-  gst_pad_set_query_function (decklinksink->videosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_videosink_query));
-  gst_element_add_pad (GST_ELEMENT (decklinksink), decklinksink->videosinkpad);
-
-  decklinksink->audiosinkpad =
-      gst_pad_new_from_static_template (&gst_decklink_sink_audiosink_template,
-      "audiosink");
-  gst_pad_set_chain_function (decklinksink->audiosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_audiosink_chain));
-  gst_pad_set_event_function (decklinksink->audiosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_audiosink_event));
-  gst_pad_set_query_function (decklinksink->audiosinkpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_sink_audiosink_query));
-  gst_element_add_pad (GST_ELEMENT (decklinksink), decklinksink->audiosinkpad);
-
-  GST_OBJECT_FLAG_SET (decklinksink, GST_ELEMENT_FLAG_SINK);
-
-  g_cond_init (&decklinksink->cond);
-  g_mutex_init (&decklinksink->mutex);
-  g_mutex_init (&decklinksink->audio_mutex);
-  g_cond_init (&decklinksink->audio_cond);
-
-  decklinksink->mode = GST_DECKLINK_MODE_NTSC;
-  decklinksink->device_number = 0;
-
-  decklinksink->callback = new Output;
-  decklinksink->callback->decklinksink = decklinksink;
-
-#ifdef _MSC_VER
-  g_mutex_init (&decklinksink->com_init_lock);
-  g_mutex_init (&decklinksink->com_deinit_lock);
-  g_cond_init (&decklinksink->com_initialized);
-  g_cond_init (&decklinksink->com_uninitialize);
-  g_cond_init (&decklinksink->com_uninitialized);
-
-  g_mutex_lock (&decklinksink->com_init_lock);
-
-  /* create the COM initialization thread */
-  g_thread_create ((GThreadFunc) gst_decklink_sink_com_thread,
-      decklinksink, FALSE, NULL);
-
-  /* wait until the COM thread signals that COM has been initialized */
-  g_cond_wait (&decklinksink->com_initialized, &decklinksink->com_init_lock);
-  g_mutex_unlock (&decklinksink->com_init_lock);
-#endif /* _MSC_VER */
-}
-
-void
-gst_decklink_sink_set_property (GObject * object, guint property_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstDecklinkSink *decklinksink;
-
-  g_return_if_fail (GST_IS_DECKLINK_SINK (object));
-  decklinksink = GST_DECKLINK_SINK (object);
-
-  switch (property_id) {
-    case PROP_MODE:
-      decklinksink->mode = (GstDecklinkModeEnum) g_value_get_enum (value);
-      break;
-    case PROP_DEVICE_NUMBER:
-      decklinksink->device_number = g_value_get_int (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-  }
-}
-
-void
-gst_decklink_sink_get_property (GObject * object, guint property_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstDecklinkSink *decklinksink;
-
-  g_return_if_fail (GST_IS_DECKLINK_SINK (object));
-  decklinksink = GST_DECKLINK_SINK (object);
-
-  switch (property_id) {
-    case PROP_MODE:
-      g_value_set_enum (value, decklinksink->mode);
-      break;
-    case PROP_DEVICE_NUMBER:
-      g_value_set_int (value, decklinksink->device_number);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-  }
-}
-
-#ifdef _MSC_VER
-static void
-gst_decklink_sink_com_thread (GstDecklinkSink * sink)
-{
-  HRESULT res;
-
-  g_mutex_lock (sink->com_init_lock);
-
-  /* Initialize COM with a MTA for this process. This thread will
-   * be the first one to enter the apartement and the last one to leave
-   * it, unitializing COM properly */
-
-  res = CoInitializeEx (0, COINIT_MULTITHREADED);
-  if (res == S_FALSE)
-    GST_WARNING_OBJECT (sink,
-        "COM has been already initialized in the same process");
-  else if (res == RPC_E_CHANGED_MODE)
-    GST_WARNING_OBJECT (sink, "The concurrency model of COM has changed.");
-  else
-    GST_INFO_OBJECT (sink, "COM intialized succesfully");
-
-  sink->comInitialized = TRUE;
-
-  /* Signal other threads waiting on this condition that COM was initialized */
-  g_cond_signal (sink->com_initialized);
-
-  g_mutex_unlock (sink->com_init_lock);
-
-  /* Wait until the unitialize condition is met to leave the COM apartement */
-  g_mutex_lock (sink->com_deinit_lock);
-  g_cond_wait (sink->com_uninitialize, sink->com_deinit_lock);
-
-  CoUninitialize ();
-  GST_INFO_OBJECT (sink, "COM unintialized succesfully");
-  sink->comInitialized = FALSE;
-  g_cond_signal (sink->com_uninitialized);
-  g_mutex_unlock (sink->com_deinit_lock);
-}
-#endif /* _MSC_VER */
-
-void
-gst_decklink_sink_finalize (GObject * object)
-{
-  GstDecklinkSink *decklinksink;
-
-  decklinksink = GST_DECKLINK_SINK (object);
-
-  g_cond_clear (&decklinksink->cond);
-  g_mutex_clear (&decklinksink->mutex);
-  g_cond_clear (&decklinksink->audio_cond);
-  g_mutex_clear (&decklinksink->audio_mutex);
-
-  delete decklinksink->callback;
-
-#ifdef _MSC_VER
-  /* signal the COM thread that it should uninitialize COM */
-  if (decklinksink->comInitialized) {
-    g_mutex_lock (&decklinksink->com_deinit_lock);
-    g_cond_signal (&decklinksink->com_uninitialize);
-    g_cond_wait (&decklinksink->com_uninitialized,
-        &decklinksink->com_deinit_lock);
-    g_mutex_unlock (&decklinksink->com_deinit_lock);
-  }
-
-  g_mutex_clear (&decklinksink->com_init_lock);
-  g_mutex_clear (&decklinksink->com_deinit_lock);
-  g_cond_clear (&decklinksink->com_initialized);
-  g_cond_clear (&decklinksink->com_uninitialize);
-  g_cond_clear (&decklinksink->com_uninitialized);
-#endif /* _MSC_VER */
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/* FIXME: post error messages for the misc. failures */
-static gboolean
-gst_decklink_sink_start (GstDecklinkSink * decklinksink)
-{
-  HRESULT ret;
-  const GstDecklinkMode *mode;
-  BMDAudioSampleType sample_depth;
-
-  decklinksink->decklink =
-      gst_decklink_get_nth_device (decklinksink->device_number);
-  if (!decklinksink->decklink) {
-    GST_WARNING ("failed to get device %d", decklinksink->device_number);
-    return FALSE;
-  }
-
-  decklinksink->output =
-      gst_decklink_get_nth_output (decklinksink->device_number);
-  if (!decklinksink->output) {
-    GST_WARNING ("no output for device %d", decklinksink->device_number);
-    return FALSE;
-  }
-
-  decklinksink->output->SetAudioCallback (decklinksink->callback);
-
-  mode = gst_decklink_get_mode (decklinksink->mode);
-
-  ret = decklinksink->output->EnableVideoOutput (mode->mode,
-      bmdVideoOutputFlagDefault);
-  if (ret != S_OK) {
-    GST_WARNING ("failed to enable video output");
-    return FALSE;
-  }
-  //decklinksink->video_enabled = TRUE;
-
-  decklinksink->output->SetScheduledFrameCompletionCallback (decklinksink->
-      callback);
-
-  sample_depth = bmdAudioSampleType16bitInteger;
-  ret = decklinksink->output->EnableAudioOutput (bmdAudioSampleRate48kHz,
-      sample_depth, 2, bmdAudioOutputStreamContinuous);
-  if (ret != S_OK) {
-    GST_WARNING ("failed to enable audio output");
-    return FALSE;
-  }
-  decklinksink->audio_adapter = gst_adapter_new ();
-
-  decklinksink->num_frames = 0;
-
-  return TRUE;
-}
-
-static gboolean
-gst_decklink_sink_force_stop (GstDecklinkSink * decklinksink)
-{
-  g_mutex_lock (&decklinksink->mutex);
-  decklinksink->stop = TRUE;
-  g_cond_signal (&decklinksink->cond);
-  g_mutex_unlock (&decklinksink->mutex);
-
-  g_mutex_lock (&decklinksink->audio_mutex);
-  g_cond_signal (&decklinksink->audio_cond);
-  g_mutex_unlock (&decklinksink->audio_mutex);
-
-  return TRUE;
-}
-
-static gboolean
-gst_decklink_sink_stop (GstDecklinkSink * decklinksink)
-{
-  decklinksink->output->StopScheduledPlayback (0, NULL, 0);
-  decklinksink->output->DisableAudioOutput ();
-  decklinksink->output->DisableVideoOutput ();
-
-  return TRUE;
-}
-
-static GstStateChangeReturn
-gst_decklink_sink_change_state (GstElement * element, GstStateChange transition)
-{
-  GstDecklinkSink *decklinksink;
-  GstStateChangeReturn ret;
-
-  decklinksink = GST_DECKLINK_SINK (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_decklink_sink_start (decklinksink)) {
-        ret = GST_STATE_CHANGE_FAILURE;
-        goto out;
-      }
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-      gst_decklink_sink_force_stop (decklinksink);
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_decklink_sink_stop (decklinksink);
-      break;
-    default:
-      break;
-  }
-
-out:
-  return ret;
-}
-
-static GstFlowReturn
-gst_decklink_sink_videosink_chain (GstPad * pad, GstObject * parent,
-    GstBuffer * buffer)
-{
-  GstDecklinkSink *decklinksink;
-  IDeckLinkMutableVideoFrame *frame;
-  void *data;
-  GstFlowReturn flow_ret;
-  const GstDecklinkMode *mode;
-  HRESULT ret;
-
-  decklinksink = GST_DECKLINK_SINK (parent);
-
-#if 0
-  if (!decklinksink->video_enabled) {
-    HRESULT ret;
-    ret = decklinksink->output->EnableVideoOutput (decklinksink->display_mode,
-        bmdVideoOutputFlagDefault);
-    if (ret != S_OK) {
-      GST_WARNING ("failed to enable video output");
-      //return FALSE;
-    }
-    decklinksink->video_enabled = TRUE;
-  }
-#endif
-
-  mode = gst_decklink_get_mode (decklinksink->mode);
-
-  ret = decklinksink->output->CreateVideoFrame (mode->width,
-      mode->height, mode->width * 2, decklinksink->pixel_format,
-      bmdFrameFlagDefault, &frame);
-  if (ret != S_OK) {
-    GST_ELEMENT_ERROR (decklinksink, STREAM, FAILED,
-        (NULL), ("Failed to create video frame: 0x%08x", ret));
-    return GST_FLOW_ERROR;
-  }
-
-  frame->GetBytes (&data);
-  gst_buffer_extract (buffer, 0, data, gst_buffer_get_size (buffer));
-  gst_buffer_unref (buffer);
-
-  g_mutex_lock (&decklinksink->mutex);
-  while (decklinksink->queued_frames > 2 && !decklinksink->stop) {
-    g_cond_wait (&decklinksink->cond, &decklinksink->mutex);
-  }
-  if (!decklinksink->stop) {
-    decklinksink->queued_frames++;
-  }
-  g_mutex_unlock (&decklinksink->mutex);
-
-  if (!decklinksink->stop) {
-    ret = decklinksink->output->ScheduleVideoFrame (frame,
-        decklinksink->num_frames * mode->fps_d, mode->fps_d, mode->fps_n);
-    if (ret != S_OK) {
-      GST_ELEMENT_ERROR (decklinksink, STREAM, FAILED,
-          (NULL), ("Failed to schedule frame: 0x%08x", ret));
-      flow_ret = GST_FLOW_ERROR;
-      goto out;
-    }
-
-    decklinksink->num_frames++;
-
-    if (!decklinksink->sched_started) {
-      ret = decklinksink->output->StartScheduledPlayback (0, mode->fps_d, 1.0);
-      if (ret != S_OK) {
-        GST_ELEMENT_ERROR (decklinksink, STREAM, FAILED,
-            (NULL), ("Failed to start scheduled playback: 0x%08x", ret));
-        flow_ret = GST_FLOW_ERROR;
-        goto out;
-      }
-      decklinksink->sched_started = TRUE;
-    }
-
-    flow_ret = GST_FLOW_OK;
-  } else {
-    flow_ret = GST_FLOW_FLUSHING;
-  }
-
-out:
-  frame->Release ();
-
-  return flow_ret;
-}
-
-static gboolean
-gst_decklink_sink_videosink_event (GstPad * pad, GstObject * parent,
-    GstEvent * event)
-{
-  gboolean res;
-  GstDecklinkSink *decklinksink;
-
-  decklinksink = GST_DECKLINK_SINK (parent);
-
-  GST_DEBUG_OBJECT (pad, "event: %" GST_PTR_FORMAT, event);
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_CAPS:{
-      decklinksink->pixel_format = bmdFormat8BitYUV;
-      res = TRUE;
-      /* FIXME: this makes no sense, template caps don't contain v210 */
-#if 0
-      GstCaps *caps;
-
-      gst_event_parse_caps (event, &caps);
-      ret = gst_video_format_parse_caps (caps, &format, &width, &height);
-      if (ret) {
-        if (format == GST_VIDEO_FORMAT_v210) {
-          decklinksink->pixel_format = bmdFormat10BitYUV;
-        } else {
-          decklinksink->pixel_format = bmdFormat8BitYUV;
-        }
-      }
-#endif
-      break;
-    }
-    case GST_EVENT_EOS:
-      /* FIXME: EOS aggregation with audio pad looks wrong */
-      decklinksink->video_eos = TRUE;
-      decklinksink->video_seqnum = gst_event_get_seqnum (event);
-      {
-        GstMessage *message;
-
-        message = gst_message_new_eos (GST_OBJECT_CAST (decklinksink));
-        gst_message_set_seqnum (message, decklinksink->video_seqnum);
-        gst_element_post_message (GST_ELEMENT_CAST (decklinksink), message);
-      }
-      res = gst_pad_event_default (pad, parent, event);
-      break;
-    default:
-      res = gst_pad_event_default (pad, parent, event);
-      break;
-  }
-
-  return res;
-}
-
-static gboolean
-gst_decklink_sink_videosink_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
-{
-  gboolean res;
-  GstDecklinkSink *decklinksink;
-
-  decklinksink = GST_DECKLINK_SINK (parent);
-
-  GST_DEBUG_OBJECT (decklinksink, "query");
-
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_CAPS:{
-      GstCaps *mode_caps, *filter, *caps;
-
-      /* FIXME: do we change mode if incoming caps change? If yes, we
-       * should probably return the template caps instead */
-      mode_caps = gst_decklink_mode_get_caps (decklinksink->mode);
-      gst_query_parse_caps (query, &filter);
-      if (filter) {
-        caps =
-            gst_caps_intersect_full (filter, mode_caps,
-            GST_CAPS_INTERSECT_FIRST);
-        gst_caps_unref (mode_caps);
-      } else {
-        caps = mode_caps;
-      }
-      gst_query_set_caps_result (query, caps);
-      gst_caps_unref (caps);
-      res = TRUE;
-      break;
-    }
-    default:
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-
-  return res;
-}
-
-static GstFlowReturn
-gst_decklink_sink_audiosink_chain (GstPad * pad, GstObject * parent,
-    GstBuffer * buffer)
-{
-  GstDecklinkSink *decklinksink;
-  GstFlowReturn ret;
-
-  decklinksink = GST_DECKLINK_SINK (parent);
-
-  if (decklinksink->stop)
-    return GST_FLOW_FLUSHING;
-
-  g_mutex_lock (&decklinksink->audio_mutex);
-  while (!decklinksink->stop &&
-      gst_adapter_available (decklinksink->audio_adapter) > 1600 * 4 * 2) {
-    g_cond_wait (&decklinksink->audio_cond, &decklinksink->audio_mutex);
-  }
-  gst_adapter_push (decklinksink->audio_adapter, buffer);
-  g_mutex_unlock (&decklinksink->audio_mutex);
-
-  ret = GST_FLOW_OK;
-  return ret;
-}
-
-static gboolean
-gst_decklink_sink_audiosink_event (GstPad * pad, GstObject * parent,
-    GstEvent * event)
-{
-  gboolean res;
-  GstDecklinkSink *decklinksink;
-
-  decklinksink = GST_DECKLINK_SINK (parent);
-
-  GST_DEBUG_OBJECT (pad, "event: %" GST_PTR_FORMAT, event);
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      /* FIXME: EOS aggregation with video pad looks wrong */
-      decklinksink->audio_eos = TRUE;
-      decklinksink->audio_seqnum = gst_event_get_seqnum (event);
-      res = gst_pad_event_default (pad, parent, event);
-      break;
-    default:
-      res = gst_pad_event_default (pad, parent, event);
-      break;
-  }
-
-  return res;
-}
-
-static gboolean
-gst_decklink_sink_audiosink_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
-{
-  gboolean res;
-
-  GST_DEBUG_OBJECT (pad, "query: %" GST_PTR_FORMAT, query);
-
-  switch (GST_QUERY_TYPE (query)) {
-    default:
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-
-  return res;
-}
-
-HRESULT
-    Output::ScheduledFrameCompleted (IDeckLinkVideoFrame * completedFrame,
-    BMDOutputFrameCompletionResult result)
-{
-  GST_DEBUG ("ScheduledFrameCompleted");
-
-  g_mutex_lock (&decklinksink->mutex);
-  g_cond_signal (&decklinksink->cond);
-  decklinksink->queued_frames--;
-  g_mutex_unlock (&decklinksink->mutex);
-
-  return S_OK;
-}
-
-HRESULT
-Output::ScheduledPlaybackHasStopped ()
-{
-  GST_DEBUG ("ScheduledPlaybackHasStopped");
-  return S_OK;
-}
-
-HRESULT
-Output::RenderAudioSamples (bool preroll)
-{
-  uint32_t samplesWritten;
-  HRESULT ret;
-
-  // guint64 samplesToWrite;
-
-  if (decklinksink->stop) {
-    GST_DEBUG ("decklinksink->stop set TRUE!");
-    decklinksink->output->BeginAudioPreroll ();
-    // running = true;
-  } else {
-    gconstpointer data;
-    int n;
-
-    g_mutex_lock (&decklinksink->audio_mutex);
-
-    n = gst_adapter_available (decklinksink->audio_adapter);
-    if (n > 0) {
-      data = gst_adapter_map (decklinksink->audio_adapter, n);
-
-      ret = decklinksink->output->ScheduleAudioSamples ((void *) data, n / 4,
-          0, 0, &samplesWritten);
-
-      gst_adapter_unmap (decklinksink->audio_adapter);
-      gst_adapter_flush (decklinksink->audio_adapter, samplesWritten * 4);
-      if (ret != S_OK) {
-        GST_ELEMENT_ERROR (decklinksink, STREAM, FAILED,
-            (NULL), ("Failed to schedule audio samples: 0x%08x", ret));
-      } else {
-        GST_DEBUG ("wrote %d samples, %d available", samplesWritten, n / 4);
-      }
-
-      g_cond_signal (&decklinksink->audio_cond);
-    } else {
-      if (decklinksink->audio_eos) {
-        GstMessage *message;
-
-        message = gst_message_new_eos (GST_OBJECT_CAST (decklinksink));
-        gst_message_set_seqnum (message, decklinksink->audio_seqnum);
-        gst_element_post_message (GST_ELEMENT_CAST (decklinksink), message);
-      }
-    }
-    g_mutex_unlock (&decklinksink->audio_mutex);
-
-  }
-
-  GST_DEBUG ("RenderAudioSamples");
-
-  return S_OK;
-}
diff --git a/sys/decklink/gstdecklinksink.h b/sys/decklink/gstdecklinksink.h
deleted file mode 100644
index 47ca22f..0000000
--- a/sys/decklink/gstdecklinksink.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* GStreamer
- * Copyright (C) 2011 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 _GST_DECKLINK_SINK_H_
-#define _GST_DECKLINK_SINK_H_
-
-#include <gst/gst.h>
-#include <gst/base/gstadapter.h>
-#include "gstdecklink.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_DECKLINK_SINK   (gst_decklink_sink_get_type())
-#define GST_DECKLINK_SINK(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECKLINK_SINK,GstDecklinkSink))
-#define GST_DECKLINK_SINK_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECKLINK_SINK,GstDecklinkSinkClass))
-#define GST_DECKLINK_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DECKLINK_SINK, GstDecklinkSinkClass))
-#define GST_IS_DECKLINK_SINK(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECKLINK_SINK))
-#define GST_IS_DECKLINK_SINK_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECKLINK_SINK))
-
-typedef struct _GstDecklinkSink GstDecklinkSink;
-typedef struct _GstDecklinkSinkClass GstDecklinkSinkClass;
-
-class Output : public IDeckLinkVideoOutputCallback,
-public IDeckLinkAudioOutputCallback
-{
-  public:
-    GstDecklinkSink *decklinksink;
-
-    virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid, LPVOID *ppv)        {return E_NOINTERFACE;}
-    virtual ULONG STDMETHODCALLTYPE AddRef () {return 1;}
-    virtual ULONG STDMETHODCALLTYPE Release () {return 1;}
-    virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted (IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult result);
-    virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped ();
-    virtual HRESULT STDMETHODCALLTYPE RenderAudioSamples (bool preroll);
-};
-
-struct _GstDecklinkSink
-{
-  GstElement base_decklinksink;
-  GstAdapter *audio_adapter;
-
-  GstPad *videosinkpad;
-  GstPad *audiosinkpad;
-
-  GMutex mutex;
-  GCond  cond;
-  GMutex audio_mutex;
-  GCond  audio_cond;
-  int queued_frames;
-  gboolean stop;
-  gboolean video_eos;
-  gboolean audio_eos;
-  int video_seqnum;
-  int audio_seqnum;
-
-  IDeckLink *decklink;
-  IDeckLinkOutput *output;
-  Output *callback;
-  BMDDisplayMode display_mode;
-  BMDPixelFormat pixel_format;
-  gboolean video_enabled;
-  gboolean sched_started;
-
-  int num_frames;
-
-  /* properties */
-  GstDecklinkModeEnum mode;
-  int device_number;
-
-#ifdef _MSC_VER
-  gboolean comInitialized;
-  GMutex   com_init_lock;
-  GMutex   com_deinit_lock;
-  GCond    com_initialized;
-  GCond    com_uninitialize;
-  GCond    com_uninitialized;
-#endif /* _MSC_VER */
-};
-
-struct _GstDecklinkSinkClass
-{
-  GstElementClass base_decklinksink_class;
-};
-
-GType gst_decklink_sink_get_type (void);
-
-G_END_DECLS
-
-#endif
diff --git a/sys/decklink/gstdecklinksrc.cpp b/sys/decklink/gstdecklinksrc.cpp
deleted file mode 100644
index 1dc554d..0000000
--- a/sys/decklink/gstdecklinksrc.cpp
+++ /dev/null
@@ -1,969 +0,0 @@
-/* GStreamer
- * Copyright (C) 2011 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 Street, Suite 500,
- * Boston, MA 02110-1335, USA.
- */
-/**
- * SECTION:element-gstdecklinksrc
- *
- * The decklinksrc element is a source element for Blackmagic
- * Decklink cards.
- *
- * <refsect2>
- * <title>Example launch line</title>
- * |[
- * gst-launch-1.0 -v decklinksrc ! videoconvert ! xvimagesink
- * ]|
- * 
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gst/gst.h>
-#include "gstdecklink.h"
-#include "gstdecklinksrc.h"
-#include "capture.h"
-#include <string.h>
-
-
-GST_DEBUG_CATEGORY (gst_decklink_src_debug_category);
-#define GST_CAT_DEFAULT gst_decklink_src_debug_category
-
-typedef struct _VideoFrame VideoFrame;
-struct _VideoFrame
-{
-  IDeckLinkVideoInputFrame *frame;
-  IDeckLinkInput *input;
-};
-
-static void gst_decklink_src_set_property (GObject * object,
-    guint property_id, const GValue * value, GParamSpec * pspec);
-static void gst_decklink_src_get_property (GObject * object,
-    guint property_id, GValue * value, GParamSpec * pspec);
-static void gst_decklink_src_finalize (GObject * object);
-
-static GstStateChangeReturn
-gst_decklink_src_change_state (GstElement * element, GstStateChange transition);
-static gboolean gst_decklink_src_send_event (GstElement * element,
-    GstEvent * event);
-
-static gboolean gst_decklink_src_audio_src_query (GstPad * pad,
-    GstObject * parent, GstQuery * query);
-static gboolean gst_decklink_src_video_src_query (GstPad * pad,
-    GstObject * parent, GstQuery * query);
-
-static void gst_decklink_src_task (void *priv);
-
-#ifdef _MSC_VER
-/* COM initialization/uninitialization thread */
-static void gst_decklink_src_com_thread (GstDecklinkSrc * src);
-#endif /* _MSC_VER */
-
-enum
-{
-  PROP_0,
-  PROP_MODE,
-  PROP_CONNECTION,
-  PROP_AUDIO_INPUT,
-  PROP_DEVICE_NUMBER
-};
-
-static GstStaticPadTemplate gst_decklink_src_audio_src_template =
-GST_STATIC_PAD_TEMPLATE ("audiosrc",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw, format=S16LE, channels=2, rate=48000, "
-        "layout=interleaved")
-    );
-
-/* the video source pad template is created on the fly */
-
-#define parent_class gst_decklink_src_parent_class
-G_DEFINE_TYPE (GstDecklinkSrc, gst_decklink_src, GST_TYPE_ELEMENT);
-
-static void
-gst_decklink_src_class_init (GstDecklinkSrcClass * klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gobject_class->set_property = gst_decklink_src_set_property;
-  gobject_class->get_property = gst_decklink_src_get_property;
-  gobject_class->finalize = gst_decklink_src_finalize;
-
-  element_class->send_event = GST_DEBUG_FUNCPTR (gst_decklink_src_send_event);
-  element_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_decklink_src_change_state);
-
-  g_object_class_install_property (gobject_class, PROP_MODE,
-      g_param_spec_enum ("mode", "Mode", "Video mode to use for capture",
-          GST_TYPE_DECKLINK_MODE, GST_DECKLINK_MODE_NTSC,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  g_object_class_install_property (gobject_class, PROP_CONNECTION,
-      g_param_spec_enum ("connection", "Connection",
-          "Video input connection to use",
-          GST_TYPE_DECKLINK_CONNECTION, GST_DECKLINK_CONNECTION_SDI,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  g_object_class_install_property (gobject_class, PROP_AUDIO_INPUT,
-      g_param_spec_enum ("audio-input", "Audio Input",
-          "Audio input connection",
-          GST_TYPE_DECKLINK_AUDIO_CONNECTION,
-          GST_DECKLINK_AUDIO_CONNECTION_AUTO,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
-      g_param_spec_int ("device-number", "Device number",
-          "Capture device instance to use", 0, G_MAXINT, 0,
-          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
-              G_PARAM_CONSTRUCT)));
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_decklink_src_audio_src_template));
-
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("videosrc", GST_PAD_SRC, GST_PAD_ALWAYS,
-          gst_decklink_mode_get_template_caps ()));
-
-  gst_element_class_set_static_metadata (element_class, "Decklink source",
-      "Source/Video", "DeckLink Source", "David Schleef <ds@entropywave.com>");
-}
-
-static void
-gst_decklink_src_init (GstDecklinkSrc * decklinksrc)
-{
-  GstDecklinkSrcClass *decklinksrc_class;
-
-  decklinksrc_class = GST_DECKLINK_SRC_GET_CLASS (decklinksrc);
-
-  g_rec_mutex_init (&decklinksrc->task_mutex);
-  decklinksrc->task = gst_task_new (gst_decklink_src_task, decklinksrc, NULL);
-  gst_task_set_lock (decklinksrc->task, &decklinksrc->task_mutex);
-
-  decklinksrc->audiosrcpad =
-      gst_pad_new_from_static_template (&gst_decklink_src_audio_src_template,
-      "audiosrc");
-  gst_pad_set_query_function (decklinksrc->audiosrcpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_src_audio_src_query));
-  gst_element_add_pad (GST_ELEMENT (decklinksrc), decklinksrc->audiosrcpad);
-
-
-
-  decklinksrc->videosrcpad =
-      gst_pad_new_from_template (gst_element_class_get_pad_template
-      (GST_ELEMENT_CLASS (decklinksrc_class), "videosrc"), "videosrc");
-  gst_pad_set_query_function (decklinksrc->videosrcpad,
-      GST_DEBUG_FUNCPTR (gst_decklink_src_video_src_query));
-  gst_element_add_pad (GST_ELEMENT (decklinksrc), decklinksrc->videosrcpad);
-
-  GST_OBJECT_FLAG_SET (decklinksrc, GST_ELEMENT_FLAG_SOURCE);
-
-  g_cond_init (&decklinksrc->cond);
-  g_mutex_init (&decklinksrc->mutex);
-
-  /* FIXME: turn this into a property? */
-  decklinksrc->copy_data = TRUE;
-  decklinksrc->mode = GST_DECKLINK_MODE_NTSC;
-  decklinksrc->connection = GST_DECKLINK_CONNECTION_SDI;
-  decklinksrc->audio_connection = GST_DECKLINK_AUDIO_CONNECTION_AUTO;
-  decklinksrc->device_number = 0;
-
-  decklinksrc->stop = FALSE;
-  decklinksrc->dropped_frames = 0;
-  decklinksrc->dropped_frames_old = 0;
-  decklinksrc->frame_num = -1;  /* -1 so will be 0 after incrementing */
-
-#ifdef _MSC_VER
-  g_mutex_init (&decklinksrc->com_init_lock);
-  g_mutex_init (&decklinksrc->com_deinit_lock);
-  g_cond_init (&decklinksrc->com_initialized);
-  g_cond_init (&decklinksrc->com_uninitialize);
-  g_cond_init (&decklinksrc->com_uninitialized);
-
-  g_mutex_lock (&decklinksrc->com_init_lock);
-
-  /* create the COM initialization thread */
-  g_thread_create ((GThreadFunc) gst_decklink_src_com_thread,
-      decklinksrc, FALSE, NULL);
-
-  /* wait until the COM thread signals that COM has been initialized */
-  g_cond_wait (&decklinksrc->com_initialized, &decklinksrc->com_init_lock);
-  g_mutex_unlock (&decklinksrc->com_init_lock);
-#endif /* _MSC_VER */
-
-  GST_DEBUG_CATEGORY_INIT (gst_decklink_src_debug_category, "decklinksrc", 0,
-      "debug category for decklinksrc element");
-}
-
-void
-gst_decklink_src_set_property (GObject * object, guint property_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstDecklinkSrc *decklinksrc;
-
-  decklinksrc = GST_DECKLINK_SRC (object);
-
-  switch (property_id) {
-    case PROP_MODE:
-      decklinksrc->mode = (GstDecklinkModeEnum) g_value_get_enum (value);
-      break;
-    case PROP_CONNECTION:
-      decklinksrc->connection =
-          (GstDecklinkConnectionEnum) g_value_get_enum (value);
-      break;
-    case PROP_AUDIO_INPUT:
-      decklinksrc->audio_connection =
-          (GstDecklinkAudioConnectionEnum) g_value_get_enum (value);
-      break;
-    case PROP_DEVICE_NUMBER:
-      decklinksrc->device_number = g_value_get_int (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-  }
-}
-
-void
-gst_decklink_src_get_property (GObject * object, guint property_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstDecklinkSrc *decklinksrc;
-
-  decklinksrc = GST_DECKLINK_SRC (object);
-
-  switch (property_id) {
-    case PROP_MODE:
-      g_value_set_enum (value, decklinksrc->mode);
-      break;
-    case PROP_CONNECTION:
-      g_value_set_enum (value, decklinksrc->connection);
-      break;
-    case PROP_AUDIO_INPUT:
-      g_value_set_enum (value, decklinksrc->audio_connection);
-      break;
-    case PROP_DEVICE_NUMBER:
-      g_value_set_int (value, decklinksrc->device_number);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-  }
-}
-
-#ifdef _MSC_VER
-static void
-gst_decklink_src_com_thread (GstDecklinkSrc * src)
-{
-  HRESULT res;
-
-  g_mutex_lock (src->com_init_lock);
-
-  /* Initialize COM with a MTA for this process. This thread will
-   * be the first one to enter the apartement and the last one to leave
-   * it, unitializing COM properly */
-
-  res = CoInitializeEx (0, COINIT_MULTITHREADED);
-  if (res == S_FALSE)
-    GST_WARNING_OBJECT (src,
-        "COM has been already initialized in the same process");
-  else if (res == RPC_E_CHANGED_MODE)
-    GST_WARNING_OBJECT (src, "The concurrency model of COM has changed.");
-  else
-    GST_INFO_OBJECT (src, "COM intialized succesfully");
-
-  src->comInitialized = TRUE;
-
-  /* Signal other threads waiting on this condition that COM was initialized */
-  g_cond_signal (src->com_initialized);
-
-  g_mutex_unlock (src->com_init_lock);
-
-  /* Wait until the unitialize condition is met to leave the COM apartement */
-  g_mutex_lock (src->com_deinit_lock);
-  g_cond_wait (src->com_uninitialize, src->com_deinit_lock);
-
-  CoUninitialize ();
-  GST_INFO_OBJECT (src, "COM unintialized succesfully");
-  src->comInitialized = FALSE;
-  g_cond_signal (src->com_uninitialized);
-  g_mutex_unlock (src->com_deinit_lock);
-}
-#endif /* _MSC_VER */
-
-void
-gst_decklink_src_finalize (GObject * object)
-{
-  GstDecklinkSrc *decklinksrc;
-
-  g_return_if_fail (GST_IS_DECKLINK_SRC (object));
-  decklinksrc = GST_DECKLINK_SRC (object);
-
-  /* clean up object here */
-
-  g_cond_clear (&decklinksrc->cond);
-  g_mutex_clear (&decklinksrc->mutex);
-  gst_task_set_lock (decklinksrc->task, NULL);
-  g_object_unref (decklinksrc->task);
-
-#ifdef _MSC_VER
-  /* signal the COM thread that it should uninitialize COM */
-  if (decklinksrc->comInitialized) {
-    g_mutex_lock (&decklinksrc->com_deinit_lock);
-    g_cond_signal (&decklinksrc->com_uninitialize);
-    g_cond_wait (&decklinksrc->com_uninitialized, &decklinksrc->com_deinit_lock);
-    g_mutex_unlock (&decklinksrc->com_deinit_lock);
-  }
-
-  g_mutex_clear (&decklinksrc->com_init_lock);
-  g_mutex_clear (&decklinksrc->com_deinit_lock);
-  g_cond_clear (&decklinksrc->com_initialized);
-  g_cond_clear (&decklinksrc->com_uninitialize);
-  g_cond_clear (&decklinksrc->com_uninitialized);
-#endif /* _MSC_VER */
-
-  g_rec_mutex_clear (&decklinksrc->task_mutex);
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/* events sent to this element directly, mainly from the application */
-static gboolean
-gst_decklink_src_send_event (GstElement * element, GstEvent * event)
-{
-  GstDecklinkSrc *src;
-  gboolean result = FALSE;
-
-  src = GST_DECKLINK_SRC (element);
-
-  GST_DEBUG_OBJECT (src, "handling event %p %" GST_PTR_FORMAT, event, event);
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      g_atomic_int_set (&src->pending_eos, TRUE);
-      GST_INFO_OBJECT (src, "EOS pending");
-      g_cond_signal (&src->cond);
-      result = TRUE;
-      break;
-      break;
-    case GST_EVENT_TAG:
-    case GST_EVENT_CUSTOM_DOWNSTREAM:
-    case GST_EVENT_CUSTOM_BOTH:
-      /* Insert TAG, CUSTOM_DOWNSTREAM, CUSTOM_BOTH in the dataflow */
-      GST_OBJECT_LOCK (src);
-      src->pending_events = g_list_append (src->pending_events, event);
-      g_atomic_int_set (&src->have_events, TRUE);
-      GST_OBJECT_UNLOCK (src);
-      event = NULL;
-      result = TRUE;
-      break;
-    case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:
-    case GST_EVENT_CUSTOM_BOTH_OOB:
-      /* insert a random custom event into the pipeline */
-      GST_DEBUG_OBJECT (src, "pushing custom OOB event downstream");
-      result = gst_pad_push_event (src->videosrcpad, gst_event_ref (event));
-      result |= gst_pad_push_event (src->audiosrcpad, event);
-      /* we gave away the ref to the event in the push */
-      event = NULL;
-      break;
-    case GST_EVENT_CUSTOM_UPSTREAM:
-      /* drop */
-    case GST_EVENT_SEGMENT:
-      /* sending random SEGMENT downstream can break sync - drop */
-    default:
-      GST_LOG_OBJECT (src, "dropping %s event", GST_EVENT_TYPE_NAME (event));
-      break;
-  }
-
-  /* if we still have a ref to the event, unref it now */
-  if (event)
-    gst_event_unref (event);
-
-  return result;
-}
-
-/* FIXME: post error messages for the misc. failures */
-static gboolean
-gst_decklink_src_start (GstElement * element)
-{
-  GstDecklinkSrc *decklinksrc = GST_DECKLINK_SRC (element);
-  DeckLinkCaptureDelegate *delegate;
-  BMDAudioSampleType sample_depth;
-  int channels;
-  HRESULT ret;
-  const GstDecklinkMode *mode;
-  IDeckLinkConfiguration *config;
-  BMDVideoConnection conn;
-  BMDAudioConnection aconn;
-
-  GST_DEBUG_OBJECT (decklinksrc, "start");
-
-  decklinksrc->decklink = gst_decklink_get_nth_device (decklinksrc->device_number);
-  if (decklinksrc->decklink == NULL) {
-    return FALSE;
-  }
-
-  decklinksrc->input = gst_decklink_get_nth_input (decklinksrc->device_number);
-  if (decklinksrc->input == NULL) {
-    GST_ERROR ("no input source for device %i", decklinksrc->device_number);
-    return FALSE;
-  }
-
-  delegate = new DeckLinkCaptureDelegate ();
-  delegate->priv = decklinksrc;
-  ret = decklinksrc->input->SetCallback (delegate);
-  if (ret != S_OK) {
-    GST_ERROR ("set callback failed (input source)");
-    return FALSE;
-  }
-
-  decklinksrc->config = gst_decklink_get_nth_config (decklinksrc->device_number);
-  config = decklinksrc->config;
-  if (decklinksrc->config == NULL) {
-    GST_ERROR ("no config for device %i", decklinksrc->device_number);
-    return FALSE;
-  }
-
-  switch (decklinksrc->connection) {
-    default:
-    case GST_DECKLINK_CONNECTION_SDI:
-      conn = bmdVideoConnectionSDI;
-      aconn = bmdAudioConnectionEmbedded;
-      break;
-    case GST_DECKLINK_CONNECTION_HDMI:
-      conn = bmdVideoConnectionHDMI;
-      aconn = bmdAudioConnectionEmbedded;
-      break;
-    case GST_DECKLINK_CONNECTION_OPTICAL_SDI:
-      conn = bmdVideoConnectionOpticalSDI;
-      aconn = bmdAudioConnectionEmbedded;
-      break;
-    case GST_DECKLINK_CONNECTION_COMPONENT:
-      conn = bmdVideoConnectionComponent;
-      aconn = bmdAudioConnectionAnalog;
-      break;
-    case GST_DECKLINK_CONNECTION_COMPOSITE:
-      conn = bmdVideoConnectionComposite;
-      aconn = bmdAudioConnectionAnalog;
-      break;
-    case GST_DECKLINK_CONNECTION_SVIDEO:
-      conn = bmdVideoConnectionSVideo;
-      aconn = bmdAudioConnectionAnalog;
-      break;
-  }
-
-  ret = config->SetInt (bmdDeckLinkConfigVideoInputConnection, conn);
-  if (ret != S_OK) {
-    GST_ERROR ("set configuration (input source)");
-    return FALSE;
-  }
-
-  if (decklinksrc->connection == GST_DECKLINK_CONNECTION_COMPOSITE) {
-    ret = config->SetInt (bmdDeckLinkConfigAnalogVideoInputFlags,
-        bmdAnalogVideoFlagCompositeSetup75);
-    if (ret != S_OK) {
-      GST_ERROR ("set configuration (composite setup)");
-      return FALSE;
-    }
-  }
-
-  switch (decklinksrc->audio_connection) {
-    default:
-    case GST_DECKLINK_AUDIO_CONNECTION_AUTO:
-      /* set above */
-      break;
-    case GST_DECKLINK_AUDIO_CONNECTION_EMBEDDED:
-      aconn = bmdAudioConnectionEmbedded;
-      break;
-    case GST_DECKLINK_AUDIO_CONNECTION_AES_EBU:
-      aconn = bmdAudioConnectionAESEBU;
-      break;
-    case GST_DECKLINK_AUDIO_CONNECTION_ANALOG:
-      aconn = bmdAudioConnectionAnalog;
-      break;
-  }
-  ret = config->SetInt (bmdDeckLinkConfigAudioInputConnection, aconn);
-  if (ret != S_OK) {
-    GST_ERROR ("set configuration (audio input connection)");
-    return FALSE;
-  }
-
-  mode = gst_decklink_get_mode (decklinksrc->mode);
-
-  ret = decklinksrc->input->EnableVideoInput (mode->mode, bmdFormat8BitYUV, 0);
-  if (ret != S_OK) {
-    GST_ERROR ("enable video input failed");
-    return FALSE;
-  }
-
-  sample_depth = bmdAudioSampleType16bitInteger;
-  channels = 2;
-  ret = decklinksrc->input->EnableAudioInput (bmdAudioSampleRate48kHz,
-      sample_depth, channels);
-  if (ret != S_OK) {
-    GST_ERROR ("enable video input failed");
-    return FALSE;
-  }
-
-  ret = decklinksrc->input->StartStreams ();
-  if (ret != S_OK) {
-    GST_ERROR ("start streams failed");
-    return FALSE;
-  }
-
-  g_rec_mutex_lock (&decklinksrc->task_mutex);
-  gst_task_start (decklinksrc->task);
-  g_rec_mutex_unlock (&decklinksrc->task_mutex);
-
-  return TRUE;
-}
-
-static gboolean
-gst_decklink_src_stop (GstElement * element)
-{
-  GstDecklinkSrc *decklinksrc = GST_DECKLINK_SRC (element);
-
-  gst_task_stop (decklinksrc->task);
-
-  g_mutex_lock (&decklinksrc->mutex);
-  decklinksrc->stop = TRUE;
-  g_cond_signal (&decklinksrc->cond);
-  g_mutex_unlock (&decklinksrc->mutex);
-
-  gst_task_join (decklinksrc->task);
-
-  decklinksrc->input->StopStreams ();
-  decklinksrc->input->DisableVideoInput ();
-  decklinksrc->input->DisableAudioInput ();
-
-  g_list_free_full (decklinksrc->pending_events,
-      (GDestroyNotify) gst_mini_object_unref);
-  decklinksrc->pending_events = NULL;
-  decklinksrc->have_events = FALSE;
-  decklinksrc->pending_eos = FALSE;
-
-  return TRUE;
-}
-
-static GstStateChangeReturn
-gst_decklink_src_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn ret;
-  gboolean no_preroll = FALSE;
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_decklink_src_start (element)) {
-        ret = GST_STATE_CHANGE_FAILURE;
-        goto out;
-      }
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      no_preroll = TRUE;
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-      no_preroll = TRUE;
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_decklink_src_stop (element);
-      break;
-    default:
-      break;
-  }
-
-  if (no_preroll && ret == GST_STATE_CHANGE_SUCCESS)
-    ret = GST_STATE_CHANGE_NO_PREROLL;
-
-out:
-  return ret;
-}
-
-static gboolean
-gst_decklink_src_audio_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
-{
-  gboolean res;
-
-  GST_DEBUG_OBJECT (pad, "query: %" GST_PTR_FORMAT, query);
-
-  switch (GST_QUERY_TYPE (query)) {
-    /* FIXME: report live-ness and latency for audio too */
-    case GST_QUERY_LATENCY:
-      GST_FIXME_OBJECT (parent, "should report live-ness and audio latency");
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-    default:
-      res = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-
-  return res;
-}
-
-static gboolean
-gst_decklink_src_video_src_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
-{
-  GstDecklinkSrc *decklinksrc;
-  gboolean ret = FALSE;
-
-  decklinksrc = GST_DECKLINK_SRC (parent);
-
-  GST_DEBUG_OBJECT (pad, "query: %" GST_PTR_FORMAT, query);
-
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_LATENCY:{
-      GstClockTime min_latency, max_latency;
-      const GstDecklinkMode *mode;
-
-      /* device must be open */
-      if (decklinksrc->decklink == NULL) {
-        GST_WARNING_OBJECT (decklinksrc,
-            "Can't give latency since device isn't open !");
-        goto done;
-      }
-
-      mode = gst_decklink_get_mode (decklinksrc->mode);
-
-      /* min latency is the time to capture one frame */
-      min_latency =
-          gst_util_uint64_scale_int (GST_SECOND, mode->fps_d, mode->fps_n);
-
-      /* max latency is total duration of the frame buffer */
-      max_latency = 2 * min_latency;
-
-      GST_DEBUG_OBJECT (decklinksrc,
-          "report latency min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
-          GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
-
-      /* we are always live, the min latency is 1 frame and the max latency is
-       * the complete buffer of frames. */
-      gst_query_set_latency (query, TRUE, min_latency, max_latency);
-
-      ret = TRUE;
-      break;
-    }
-    default:
-      ret = gst_pad_query_default (pad, parent, query);
-      break;
-  }
-
-done:
-  return ret;
-}
-
-static void
-video_frame_free (void *data)
-{
-  VideoFrame *video_frame = (VideoFrame *) data;
-
-  video_frame->frame->Release ();
-  video_frame->input->Release ();
-  g_free (video_frame);
-}
-
-static void
-gst_decklink_src_send_initial_events (GstDecklinkSrc * src)
-{
-  GstSegment segment;
-  GstEvent *event;
-  guint group_id;
-  guint32 audio_id, video_id;
-  gchar stream_id[9];
-
-  /* stream-start */
-  audio_id = g_random_int ();
-  video_id = g_random_int ();
-  while (video_id == audio_id)
-    video_id = g_random_int ();
-
-  group_id = gst_util_group_id_next ();
-  g_snprintf (stream_id, sizeof (stream_id), "%08x", audio_id);
-  event = gst_event_new_stream_start (stream_id);
-  gst_event_set_group_id (event, group_id);
-  gst_pad_push_event (src->audiosrcpad, event);
-
-  g_snprintf (stream_id, sizeof (stream_id), "%08x", video_id);
-  event = gst_event_new_stream_start (stream_id);
-  gst_event_set_group_id (event, group_id);
-  gst_pad_push_event (src->videosrcpad, event);
-
-  /* caps */
-  gst_pad_push_event (src->audiosrcpad,
-      gst_event_new_caps (gst_caps_new_simple ("audio/x-raw",
-          "format", G_TYPE_STRING, "S16LE", "channels", G_TYPE_INT, 2,
-          "rate", G_TYPE_INT, 48000, "layout", G_TYPE_STRING, "interleaved",
-          NULL)));
-
-  gst_pad_push_event (src->videosrcpad,
-      gst_event_new_caps (gst_decklink_mode_get_caps (src->mode)));
-
-  /* segment */
-  gst_segment_init (&segment, GST_FORMAT_TIME);
-  event = gst_event_new_segment (&segment);
-  gst_pad_push_event (src->videosrcpad, gst_event_ref (event));
-  gst_pad_push_event (src->audiosrcpad, event);
-}
-
-static void
-gst_decklink_src_task (void *priv)
-{
-  GstDecklinkSrc *decklinksrc = GST_DECKLINK_SRC (priv);
-  GstBuffer *buffer;
-  GstBuffer *audio_buffer;
-  IDeckLinkVideoInputFrame *video_frame;
-  IDeckLinkAudioInputPacket *audio_frame;
-  void *data;
-  gsize data_size;
-  int n_samples;
-  GstFlowReturn video_flow, audio_flow, flow;
-  const GstDecklinkMode *mode;
-  gboolean discont = FALSE;
-
-  GST_DEBUG_OBJECT (decklinksrc, "task");
-
-  g_mutex_lock (&decklinksrc->mutex);
-  while (decklinksrc->video_frame == NULL && !decklinksrc->stop &&
-      !decklinksrc->pending_eos) {
-    g_cond_wait (&decklinksrc->cond, &decklinksrc->mutex);
-  }
-  video_frame = decklinksrc->video_frame;
-  audio_frame = decklinksrc->audio_frame;
-  decklinksrc->video_frame = NULL;
-  decklinksrc->audio_frame = NULL;
-  g_mutex_unlock (&decklinksrc->mutex);
-
-  if (decklinksrc->stop) {
-    if (video_frame)
-      video_frame->Release ();
-    if (audio_frame)
-      audio_frame->Release ();
-    GST_DEBUG ("stopping task");
-    return;
-  }
-
-  if (g_atomic_int_compare_and_exchange (&decklinksrc->pending_eos, TRUE,
-      FALSE)) {
-    GST_INFO_OBJECT (decklinksrc, "EOS pending");
-    flow = GST_FLOW_EOS;
-    goto pause;
-  }
-
-  /* warning on dropped frames */
-  /* FIXME: post QoS message */
-  if (decklinksrc->dropped_frames - decklinksrc->dropped_frames_old > 0) {
-    GST_ELEMENT_WARNING (decklinksrc, RESOURCE, READ,
-        ("Dropped %d frame(s), for a total of %d frame(s)",
-            decklinksrc->dropped_frames - decklinksrc->dropped_frames_old,
-            decklinksrc->dropped_frames), (NULL));
-    decklinksrc->dropped_frames_old = decklinksrc->dropped_frames;
-    /* FIXME: discont = TRUE; ? */
-  }
-
-  if (!decklinksrc->started) {
-    gst_decklink_src_send_initial_events (decklinksrc);
-    decklinksrc->started = TRUE;
-  }
-
-  if (g_atomic_int_get (&decklinksrc->have_events)) {
-    GList *l;
-
-    GST_OBJECT_LOCK (decklinksrc);
-    for (l = decklinksrc->pending_events; l != NULL; l = l->next) {
-      GstEvent *event = GST_EVENT (l->data);
-
-      GST_DEBUG_OBJECT (decklinksrc, "pushing %s event",
-          GST_EVENT_TYPE_NAME (event));
-      gst_pad_push_event (decklinksrc->videosrcpad, gst_event_ref (event));
-      gst_pad_push_event (decklinksrc->audiosrcpad, event);
-      l->data = NULL;
-    }
-    g_list_free (decklinksrc->pending_events);
-    decklinksrc->pending_events = NULL;
-    g_atomic_int_set (&decklinksrc->have_events, FALSE);
-    GST_OBJECT_UNLOCK (decklinksrc);
-  }
-
-  mode = gst_decklink_get_mode (decklinksrc->mode);
-
-  video_frame->GetBytes (&data);
-
-  data_size = mode->width * mode->height * 2;
-
-  if (decklinksrc->copy_data) {
-    buffer = gst_buffer_new_and_alloc (data_size);
-
-    gst_buffer_fill (buffer, 0, data, data_size);
-
-    video_frame->Release ();
-  } else {
-    VideoFrame *vf;
-
-    vf = (VideoFrame *) g_malloc0 (sizeof (VideoFrame));
-
-    buffer = gst_buffer_new_wrapped_full ((GstMemoryFlags) 0, data, data_size,
-        0, data_size, vf, (GDestroyNotify) video_frame_free);
-
-    vf->frame = video_frame;
-    vf->input = decklinksrc->input;
-    vf->input->AddRef ();
-  }
-
-  GST_BUFFER_TIMESTAMP (buffer) =
-      gst_util_uint64_scale_int (decklinksrc->frame_num * GST_SECOND,
-      mode->fps_d, mode->fps_n);
-  GST_BUFFER_DURATION (buffer) =
-      gst_util_uint64_scale_int ((decklinksrc->frame_num + 1) * GST_SECOND,
-      mode->fps_d, mode->fps_n) - GST_BUFFER_TIMESTAMP (buffer);
-  GST_BUFFER_OFFSET (buffer) = decklinksrc->frame_num;
-  GST_BUFFER_OFFSET_END (buffer) = decklinksrc->frame_num; /* FIXME: +1? */
-
-  /* FIXME: set video meta */
-
-  if (decklinksrc->frame_num == 0)
-    discont = TRUE;
-
-  if (discont)
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-  else
-    GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
-
-  video_flow = gst_pad_push (decklinksrc->videosrcpad, buffer);
-
-  if (gst_pad_is_linked (decklinksrc->audiosrcpad)) {
-    n_samples = audio_frame->GetSampleFrameCount ();
-    audio_frame->GetBytes (&data);
-    audio_buffer = gst_buffer_new_and_alloc (n_samples * 2 * 2);
-    gst_buffer_fill (audio_buffer, 0, data, n_samples * 2 * 2);
-
-    GST_BUFFER_TIMESTAMP (audio_buffer) =
-        gst_util_uint64_scale_int (decklinksrc->num_audio_samples * GST_SECOND,
-        1, 48000);
-    /* FIXME: should be next_timestamp - timestamp for perfect stream */
-    GST_BUFFER_DURATION (audio_buffer) =
-        gst_util_uint64_scale_int (n_samples * GST_SECOND, 1, 48000);
-    GST_BUFFER_OFFSET (audio_buffer) = decklinksrc->num_audio_samples;
-    GST_BUFFER_OFFSET_END (audio_buffer) =
-        GST_BUFFER_OFFSET (audio_buffer) + n_samples;
-
-    decklinksrc->num_audio_samples += n_samples;
-
-    if (discont)
-      GST_BUFFER_FLAG_SET (audio_buffer, GST_BUFFER_FLAG_DISCONT);
-    else
-      GST_BUFFER_FLAG_UNSET (audio_buffer, GST_BUFFER_FLAG_DISCONT);
-
-    audio_flow = gst_pad_push (decklinksrc->audiosrcpad, audio_buffer);
-  } else {
-    audio_flow = GST_FLOW_NOT_LINKED;
-  }
-
-  if (audio_flow == GST_FLOW_NOT_LINKED)
-    flow = video_flow;
-  else if (video_flow == GST_FLOW_NOT_LINKED)
-    flow = audio_flow;
-  else if (video_flow == GST_FLOW_FLUSHING || audio_flow == GST_FLOW_FLUSHING)
-    flow = GST_FLOW_FLUSHING;
-  else if (video_flow < GST_FLOW_EOS)
-    flow = video_flow;
-  else if (audio_flow < GST_FLOW_EOS)
-    flow = audio_flow;
-  else if (video_flow == GST_FLOW_EOS || audio_flow == GST_FLOW_EOS)
-    flow = GST_FLOW_EOS;
-  else
-    flow = video_flow;
-
-  if (flow != GST_FLOW_OK)
-    goto pause;
-
-done:
-
-  if (audio_frame)
-    audio_frame->Release ();
-
-  return;
-
-pause:
-  {
-    const gchar *reason = gst_flow_get_name (flow);
-    GstEvent *event = NULL;
-
-    GST_DEBUG_OBJECT (decklinksrc, "pausing task, reason %s", reason);
-    gst_task_pause (decklinksrc->task);
-    if (flow == GST_FLOW_EOS) {
-      /* perform EOS logic (very crude, we don't even keep a GstSegment) */
-      event = gst_event_new_eos ();
-    } else if (flow == GST_FLOW_NOT_LINKED || flow < GST_FLOW_EOS) {
-      event = gst_event_new_eos ();
-      /* for fatal errors we post an error message, post the error
-       * first so the app knows about the error first.
-       * Also don't do this for FLUSHING because it happens
-       * due to flushing and posting an error message because of
-       * that is the wrong thing to do, e.g. when we're doing
-       * a flushing seek. */
-      GST_ELEMENT_ERROR (decklinksrc, STREAM, FAILED,
-          ("Internal data flow error."),
-          ("streaming task paused, reason %s (%d)", reason, flow));
-    }
-    if (event != NULL) {
-      GST_INFO_OBJECT (decklinksrc->videosrcpad, "pushing EOS event");
-      gst_pad_push_event (decklinksrc->videosrcpad, gst_event_ref (event));
-      GST_INFO_OBJECT (decklinksrc->audiosrcpad, "pushing EOS event");
-      gst_pad_push_event (decklinksrc->audiosrcpad, event);
-    }
-    goto done;
-  }
-}
-
-#if 0
-/* former device probe code, redux */
-static void
-gst_decklinksrc_list_devices (void)
-{
-  IDeckLinkIterator *iterator;
-  IDeckLink *decklink;
-  int n_devices;
-
-  n_devices = 0;
-  iterator = CreateDeckLinkIteratorInstance ();
-  if (iterator) {
-    while (iterator->Next (&decklink) == S_OK) {
-      n_devices++;
-    }
-  }
-  iterator->Release();
-
-  g_print ("%d devices\n", n_devices);
-}
-#endif
diff --git a/sys/decklink/gstdecklinksrc.h b/sys/decklink/gstdecklinksrc.h
deleted file mode 100644
index f071b66..0000000
--- a/sys/decklink/gstdecklinksrc.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* GStreamer
- * Copyright (C) 2011 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 _GST_DECKLINK_SRC_H_
-#define _GST_DECKLINK_SRC_H_
-
-#include <gst/gst.h>
-#include "gstdecklink.h"
-
-G_BEGIN_DECLS
-
-GST_DEBUG_CATEGORY_EXTERN (gst_decklink_src_debug_category);
-
-#define GST_TYPE_DECKLINK_SRC   (gst_decklink_src_get_type())
-#define GST_DECKLINK_SRC(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECKLINK_SRC,GstDecklinkSrc))
-#define GST_DECKLINK_SRC_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECKLINK_SRC,GstDecklinkSrcClass))
-#define GST_DECKLINK_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DECKLINK_SRC, GstDecklinkSrcClass))
-#define GST_IS_DECKLINK_SRC(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECKLINK_SRC))
-#define GST_IS_DECKLINK_SRC_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECKLINK_SRC))
-
-typedef struct _GstDecklinkSrc GstDecklinkSrc;
-typedef struct _GstDecklinkSrcClass GstDecklinkSrcClass;
-
-struct _GstDecklinkSrc
-{
-  GstElement base_decklinksrc;
-
-  GstPad *audiosrcpad;
-  GstPad *videosrcpad;
-
-  gboolean  pending_eos;    /* ATOMIC */
-
-  gboolean  have_events;    /* ATOMIC */
-  GList    *pending_events; /* OBJECT_LOCK */
-
-  IDeckLink *decklink;
-  IDeckLinkInput *input;
-  IDeckLinkConfiguration *config;
-
-  GMutex mutex;
-  GCond cond;
-  int dropped_frames;
-  int dropped_frames_old;
-  gboolean stop;
-  IDeckLinkVideoInputFrame *video_frame;
-  IDeckLinkAudioInputPacket * audio_frame;
-
-  GstTask *task;
-  GRecMutex task_mutex;
-
-  guint64 num_audio_samples;
-
-  guint64 frame_num;
-  int fps_n;
-  int fps_d;
-  int width;
-  int height;
-  gboolean interlaced;
-  BMDDisplayMode bmd_mode;
-
-  /* so we send a stream-start, caps, and newsegment events before buffers */
-  gboolean started;
-
-  /* properties */
-  gboolean copy_data;
-  GstDecklinkModeEnum mode;
-  GstDecklinkConnectionEnum connection;
-  GstDecklinkAudioConnectionEnum audio_connection;
-  int device_number;
-
-#ifdef _MSC_VER
-  gboolean comInitialized;
-  GMutex   *com_init_lock;
-  GMutex   *com_deinit_lock;
-  GCond    *com_initialized;
-  GCond    *com_uninitialize;
-  GCond    *com_uninitialized;
-#endif /* _MSC_VER */
-};
-
-struct _GstDecklinkSrcClass
-{
-  GstElementClass base_decklinksrc_class;
-};
-
-GType gst_decklink_src_get_type (void);
-
-G_END_DECLS
-
-#endif
diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
new file mode 100644
index 0000000..520c50a
--- /dev/null
+++ b/sys/decklink/gstdecklinkvideosink.cpp
@@ -0,0 +1,853 @@
+/* GStreamer
+ * Copyright (C) 2011 David Schleef <ds@entropywave.com>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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 Street, Suite 500,
+ * Boston, MA 02110-1335, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdecklinkvideosink.h"
+#include <string.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_decklink_video_sink_debug);
+#define GST_CAT_DEFAULT gst_decklink_video_sink_debug
+
+class GStreamerVideoOutputCallback:public IDeckLinkVideoOutputCallback
+{
+public:
+  GStreamerVideoOutputCallback (GstDecklinkVideoSink * sink)
+  :IDeckLinkVideoOutputCallback (), m_refcount (1)
+  {
+    m_sink = GST_DECKLINK_VIDEO_SINK_CAST (gst_object_ref (sink));
+    g_mutex_init (&m_mutex);
+  }
+
+  virtual HRESULT QueryInterface (REFIID, LPVOID *)
+  {
+    return E_NOINTERFACE;
+  }
+
+  virtual ULONG AddRef (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount++;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+    return ret;
+  }
+
+  virtual ULONG Release (void)
+  {
+    ULONG ret;
+
+    g_mutex_lock (&m_mutex);
+    m_refcount--;
+    ret = m_refcount;
+    g_mutex_unlock (&m_mutex);
+
+    if (ret == 0) {
+      delete this;
+    }
+
+    return ret;
+  }
+
+  virtual HRESULT ScheduledFrameCompleted (IDeckLinkVideoFrame * completedFrame,
+      BMDOutputFrameCompletionResult result)
+  {
+    switch (result) {
+      case bmdOutputFrameCompleted:
+        GST_LOG_OBJECT (m_sink, "Completed frame %p", completedFrame);
+        break;
+      case bmdOutputFrameDisplayedLate:
+        GST_INFO_OBJECT (m_sink, "Late Frame %p", completedFrame);
+        break;
+      case bmdOutputFrameDropped:
+        GST_INFO_OBJECT (m_sink, "Dropped Frame %p", completedFrame);
+        break;
+      case bmdOutputFrameFlushed:
+        GST_DEBUG_OBJECT (m_sink, "Flushed Frame %p", completedFrame);
+        break;
+      default:
+        GST_INFO_OBJECT (m_sink, "Unknown Frame %p: %d", completedFrame,
+            (gint) result);
+        break;
+    }
+
+    return S_OK;
+  }
+
+  virtual HRESULT ScheduledPlaybackHasStopped (void)
+  {
+    GST_LOG_OBJECT (m_sink, "Scheduled playback stopped");
+
+    return S_OK;
+  }
+
+  virtual ~ GStreamerVideoOutputCallback () {
+    gst_object_unref (m_sink);
+    g_mutex_clear (&m_mutex);
+  }
+
+private:
+  GstDecklinkVideoSink * m_sink;
+  GMutex m_mutex;
+  gint m_refcount;
+};
+
+enum
+{
+  PROP_0,
+  PROP_MODE,
+  PROP_DEVICE_NUMBER
+};
+
+static void gst_decklink_video_sink_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_decklink_video_sink_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec);
+static void gst_decklink_video_sink_finalize (GObject * object);
+
+static GstStateChangeReturn
+gst_decklink_video_sink_change_state (GstElement * element,
+    GstStateChange transition);
+static GstClock *gst_decklink_video_sink_provide_clock (GstElement * element);
+
+static GstCaps *gst_decklink_video_sink_get_caps (GstBaseSink * bsink,
+    GstCaps * filter);
+static gboolean gst_decklink_video_sink_set_caps (GstBaseSink * bsink,
+    GstCaps * caps);
+static GstFlowReturn gst_decklink_video_sink_prepare (GstBaseSink * bsink,
+    GstBuffer * buffer);
+static GstFlowReturn gst_decklink_video_sink_render (GstBaseSink * bsink,
+    GstBuffer * buffer);
+static gboolean gst_decklink_video_sink_open (GstBaseSink * bsink);
+static gboolean gst_decklink_video_sink_close (GstBaseSink * bsink);
+static gboolean gst_decklink_video_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query);
+
+static void
+gst_decklink_video_sink_start_scheduled_playback (GstElement * element);
+
+#define parent_class gst_decklink_video_sink_parent_class
+G_DEFINE_TYPE (GstDecklinkVideoSink, gst_decklink_video_sink,
+    GST_TYPE_BASE_SINK);
+
+static gboolean
+reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+    gpointer user_data)
+{
+  gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
+      G_MAXINT, 1, NULL);
+
+  return TRUE;
+}
+
+static void
+gst_decklink_video_sink_class_init (GstDecklinkVideoSinkClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstBaseSinkClass *basesink_class = GST_BASE_SINK_CLASS (klass);
+  GstCaps *templ_caps;
+
+  gobject_class->set_property = gst_decklink_video_sink_set_property;
+  gobject_class->get_property = gst_decklink_video_sink_get_property;
+  gobject_class->finalize = gst_decklink_video_sink_finalize;
+
+  element_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_sink_change_state);
+  element_class->provide_clock =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_sink_provide_clock);
+
+  basesink_class->get_caps =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_sink_get_caps);
+  basesink_class->set_caps =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_sink_set_caps);
+  basesink_class->prepare = GST_DEBUG_FUNCPTR (gst_decklink_video_sink_prepare);
+  basesink_class->render = GST_DEBUG_FUNCPTR (gst_decklink_video_sink_render);
+  // FIXME: These are misnamed in basesink!
+  basesink_class->start = GST_DEBUG_FUNCPTR (gst_decklink_video_sink_open);
+  basesink_class->stop = GST_DEBUG_FUNCPTR (gst_decklink_video_sink_close);
+  basesink_class->propose_allocation =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_sink_propose_allocation);
+
+  g_object_class_install_property (gobject_class, PROP_MODE,
+      g_param_spec_enum ("mode", "Playback Mode",
+          "Video Mode to use for playback",
+          GST_TYPE_DECKLINK_MODE, GST_DECKLINK_MODE_NTSC,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
+      g_param_spec_int ("device-number", "Device number",
+          "Output device instance to use", 0, G_MAXINT, 0,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  templ_caps = gst_decklink_mode_get_template_caps ();
+  templ_caps = gst_caps_make_writable (templ_caps);
+  /* For output we support any framerate and only really care about timestamps */
+  gst_caps_map_in_place (templ_caps, reset_framerate, NULL);
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, templ_caps));
+  gst_caps_unref (templ_caps);
+
+  gst_element_class_set_static_metadata (element_class, "Decklink Video Sink",
+      "Video/Sink", "Decklink Sink", "David Schleef <ds@entropywave.com>, "
+      "Sebastian Dröge <sebastian@centricular.com>");
+
+  GST_DEBUG_CATEGORY_INIT (gst_decklink_video_sink_debug, "decklinkvideosink",
+      0, "debug category for decklinkvideosink element");
+}
+
+static void
+gst_decklink_video_sink_init (GstDecklinkVideoSink * self)
+{
+  self->mode = GST_DECKLINK_MODE_NTSC;
+  self->device_number = 0;
+
+  gst_base_sink_set_max_lateness (GST_BASE_SINK_CAST (self), 20 * GST_MSECOND);
+  gst_base_sink_set_qos_enabled (GST_BASE_SINK_CAST (self), TRUE);
+}
+
+void
+gst_decklink_video_sink_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (object);
+
+  switch (property_id) {
+    case PROP_MODE:
+      self->mode = (GstDecklinkModeEnum) g_value_get_enum (value);
+      break;
+    case PROP_DEVICE_NUMBER:
+      self->device_number = g_value_get_int (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_video_sink_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (object);
+
+  switch (property_id) {
+    case PROP_MODE:
+      g_value_set_enum (value, self->mode);
+      break;
+    case PROP_DEVICE_NUMBER:
+      g_value_set_int (value, self->device_number);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_video_sink_finalize (GObject * object)
+{
+  //GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (object);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+gst_decklink_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (bsink);
+  const GstDecklinkMode *mode;
+  HRESULT ret;
+
+  GST_DEBUG_OBJECT (self, "Setting caps %" GST_PTR_FORMAT, caps);
+
+  if (!gst_video_info_from_caps (&self->info, caps))
+    return FALSE;
+
+  self->output->output->SetScheduledFrameCompletionCallback (new
+      GStreamerVideoOutputCallback (self));
+
+  mode = gst_decklink_get_mode (self->mode);
+  g_assert (mode != NULL);
+
+  ret = self->output->output->EnableVideoOutput (mode->mode,
+      bmdVideoOutputFlagDefault);
+  if (ret != S_OK) {
+    GST_WARNING_OBJECT (self, "Failed to enable video output");
+    return FALSE;
+  }
+
+  g_mutex_lock (&self->output->lock);
+  self->output->mode = mode;
+  self->output->video_enabled = TRUE;
+  if (self->output->start_scheduled_playback)
+    self->output->start_scheduled_playback (self->output->videosink);
+  g_mutex_unlock (&self->output->lock);
+
+  return TRUE;
+}
+
+static GstCaps *
+gst_decklink_video_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (bsink);
+  GstCaps *mode_caps, *caps;
+
+  mode_caps = gst_decklink_mode_get_caps (self->mode);
+  mode_caps = gst_caps_make_writable (mode_caps);
+  /* For output we support any framerate and only really care about timestamps */
+  gst_caps_map_in_place (mode_caps, reset_framerate, NULL);
+
+  if (filter) {
+    caps =
+        gst_caps_intersect_full (filter, mode_caps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (mode_caps);
+  } else {
+    caps = mode_caps;
+  }
+
+  return caps;
+}
+
+static GstFlowReturn
+gst_decklink_video_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
+{
+  return GST_FLOW_OK;
+}
+
+static void
+convert_to_internal_clock (GstDecklinkVideoSink * self,
+    GstClockTime * timestamp, GstClockTime * duration)
+{
+  GstClock *clock, *audio_clock;
+
+  g_assert (timestamp != NULL);
+
+  clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
+  audio_clock = gst_decklink_output_get_audio_clock (self->output);
+  if (clock && clock != self->output->clock && clock != audio_clock) {
+    GstClockTime internal, external, rate_n, rate_d;
+    gst_clock_get_calibration (self->output->clock, &internal, &external,
+        &rate_n, &rate_d);
+
+    if (self->internal_base_time != GST_CLOCK_TIME_NONE) {
+      GstClockTime external_timestamp = *timestamp;
+      GstClockTime base_time;
+
+      // Convert to the running time corresponding to both clock times
+      if (internal < self->internal_base_time)
+        internal = 0;
+      else
+        internal -= self->internal_base_time;
+
+      if (external < self->external_base_time)
+        external = 0;
+      else
+        external -= self->external_base_time;
+
+      // Convert timestamp to the "running time" since we started scheduled
+      // playback, that is the difference between the pipeline's base time
+      // and our own base time.
+      base_time = gst_element_get_base_time (GST_ELEMENT_CAST (self));
+      if (base_time > self->external_base_time)
+        base_time = 0;
+      else
+        base_time = self->external_base_time - base_time;
+
+      if (external_timestamp < base_time)
+        external_timestamp = 0;
+      else
+        external_timestamp = external_timestamp - base_time;
+
+      // Get the difference in the external time, note
+      // that the running time is external time.
+      // Then scale this difference and offset it to
+      // our internal time. Now we have the running time
+      // according to our internal clock.
+      //
+      // For the duration we just scale
+      if (external > external_timestamp) {
+        guint64 diff = external - external_timestamp;
+        diff = gst_util_uint64_scale (diff, rate_d, rate_n);
+        *timestamp = internal - diff;
+      } else {
+        guint64 diff = external_timestamp - external;
+        diff = gst_util_uint64_scale (diff, rate_d, rate_n);
+        *timestamp = internal + diff;
+      }
+
+      GST_LOG_OBJECT (self,
+          "Converted %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT " (internal: %"
+          GST_TIME_FORMAT " external %" GST_TIME_FORMAT " rate: %lf)",
+          GST_TIME_ARGS (external_timestamp), GST_TIME_ARGS (*timestamp),
+          GST_TIME_ARGS (internal), GST_TIME_ARGS (external),
+          ((gdouble) rate_n) / ((gdouble) rate_d));
+
+      if (duration) {
+        GstClockTime external_duration = *duration;
+
+        *duration = gst_util_uint64_scale (external_duration, rate_d, rate_n);
+
+        GST_LOG_OBJECT (self,
+            "Converted duration %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT
+            " (internal: %" GST_TIME_FORMAT " external %" GST_TIME_FORMAT
+            " rate: %lf)", GST_TIME_ARGS (external_duration),
+            GST_TIME_ARGS (*duration), GST_TIME_ARGS (internal),
+            GST_TIME_ARGS (external), ((gdouble) rate_n) / ((gdouble) rate_d));
+      }
+    } else {
+      GST_LOG_OBJECT (self, "No clock conversion needed, not started yet");
+    }
+  } else {
+    GST_LOG_OBJECT (self, "No clock conversion needed, same clocks");
+  }
+}
+
+static GstFlowReturn
+gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (bsink);
+  GstVideoFrame vframe;
+  IDeckLinkMutableVideoFrame *frame;
+  guint8 *outdata, *indata;
+  GstFlowReturn flow_ret;
+  HRESULT ret;
+  GstClockTime timestamp, duration;
+  GstClockTime running_time, running_time_duration;
+  GstClockTime latency, render_delay;
+  GstClockTimeDiff ts_offset;
+  gint i;
+
+  GST_DEBUG_OBJECT (self, "Preparing buffer %p", buffer);
+
+  // FIXME: Handle no timestamps
+  if (!GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
+    return GST_FLOW_ERROR;
+  }
+
+  timestamp = GST_BUFFER_TIMESTAMP (buffer);
+  duration = GST_BUFFER_DURATION (buffer);
+  if (duration == GST_CLOCK_TIME_NONE) {
+    duration =
+        gst_util_uint64_scale_int (GST_SECOND, self->info.fps_d,
+        self->info.fps_n);
+  }
+  running_time =
+      gst_segment_to_running_time (&GST_BASE_SINK_CAST (self)->segment,
+      GST_FORMAT_TIME, timestamp);
+  running_time_duration =
+      gst_segment_to_running_time (&GST_BASE_SINK_CAST (self)->segment,
+      GST_FORMAT_TIME, timestamp + duration) - running_time;
+
+  /* See gst_base_sink_adjust_time() */
+  latency = gst_base_sink_get_latency (bsink);
+  render_delay = gst_base_sink_get_render_delay (bsink);
+  ts_offset = gst_base_sink_get_ts_offset (bsink);
+
+  running_time += latency;
+
+  if (ts_offset < 0) {
+    ts_offset = -ts_offset;
+    if ((GstClockTime) ts_offset < running_time)
+      running_time -= ts_offset;
+    else
+      running_time = 0;
+  } else {
+    running_time += ts_offset;
+  }
+
+  if (running_time > render_delay)
+    running_time -= render_delay;
+  else
+    running_time = 0;
+
+  ret = self->output->output->CreateVideoFrame (self->info.width,
+      self->info.height, self->info.stride[0], bmdFormat8BitYUV,
+      bmdFrameFlagDefault, &frame);
+  if (ret != S_OK) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED,
+        (NULL), ("Failed to create video frame: 0x%08x", ret));
+    return GST_FLOW_ERROR;
+  }
+
+  if (!gst_video_frame_map (&vframe, &self->info, buffer, GST_MAP_READ)) {
+    GST_ERROR_OBJECT (self, "Failed to map video frame");
+    flow_ret = GST_FLOW_ERROR;
+    goto out;
+  }
+
+  frame->GetBytes ((void **) &outdata);
+  indata = (guint8 *) GST_VIDEO_FRAME_PLANE_DATA (&vframe, 0);
+  for (i = 0; i < self->info.height; i++) {
+    memcpy (outdata, indata, GST_VIDEO_FRAME_WIDTH (&vframe) * 2);
+    indata += GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0);
+    outdata += frame->GetRowBytes ();
+  }
+  gst_video_frame_unmap (&vframe);
+
+  convert_to_internal_clock (self, &running_time, &running_time_duration);
+
+  GST_LOG_OBJECT (self, "Scheduling video frame %p at %" GST_TIME_FORMAT
+      " with duration %" GST_TIME_FORMAT, frame, GST_TIME_ARGS (running_time),
+      GST_TIME_ARGS (running_time_duration));
+
+  ret = self->output->output->ScheduleVideoFrame (frame,
+      running_time, running_time_duration, GST_SECOND);
+  if (ret != S_OK) {
+    GST_ELEMENT_ERROR (self, STREAM, FAILED,
+        (NULL), ("Failed to schedule frame: 0x%08x", ret));
+    flow_ret = GST_FLOW_ERROR;
+    goto out;
+  }
+
+  flow_ret = GST_FLOW_OK;
+
+out:
+
+  frame->Release ();
+
+  return flow_ret;
+}
+
+static gboolean
+gst_decklink_video_sink_open (GstBaseSink * bsink)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (bsink);
+  const GstDecklinkMode *mode;
+
+  GST_DEBUG_OBJECT (self, "Starting");
+
+  self->output =
+      gst_decklink_acquire_nth_output (self->device_number,
+      GST_ELEMENT_CAST (self), FALSE);
+  if (!self->output) {
+    GST_ERROR_OBJECT (self, "Failed to acquire output");
+    return FALSE;
+  }
+
+  mode = gst_decklink_get_mode (self->mode);
+  g_assert (mode != NULL);
+
+  g_mutex_lock (&self->output->lock);
+  self->output->mode = mode;
+  self->output->start_scheduled_playback =
+      gst_decklink_video_sink_start_scheduled_playback;
+  self->output->clock_start_time = GST_CLOCK_TIME_NONE;
+  self->output->clock_last_time = 0;
+  self->output->clock_offset = 0;
+  g_mutex_unlock (&self->output->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_video_sink_close (GstBaseSink * bsink)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (bsink);
+
+  GST_DEBUG_OBJECT (self, "Stopping");
+
+  if (self->output) {
+    g_mutex_lock (&self->output->lock);
+    self->output->mode = NULL;
+    self->output->video_enabled = FALSE;
+    if (self->output->start_scheduled_playback)
+      self->output->start_scheduled_playback (self->output->videosink);
+    g_mutex_unlock (&self->output->lock);
+
+    self->output->output->DisableVideoOutput ();
+    self->output->output->SetScheduledFrameCompletionCallback (NULL);
+    gst_decklink_release_nth_output (self->device_number,
+        GST_ELEMENT_CAST (self), FALSE);
+    self->output = NULL;
+  }
+
+  return TRUE;
+}
+
+static void
+gst_decklink_video_sink_start_scheduled_playback (GstElement * element)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (element);
+  GstClockTime start_time;
+  HRESULT res;
+  bool active;
+
+  if (self->output->video_enabled && (!self->output->audiosink
+          || self->output->audio_enabled)
+      && (GST_STATE (self) == GST_STATE_PLAYING
+          || GST_STATE_PENDING (self) == GST_STATE_PLAYING)) {
+    // Need to unlock to get the clock time
+    g_mutex_unlock (&self->output->lock);
+
+    // FIXME: start time is the same for the complete pipeline,
+    // but what we need here is the start time of this element!
+    start_time = gst_element_get_base_time (element);
+    if (start_time != GST_CLOCK_TIME_NONE)
+      start_time = gst_clock_get_time (GST_ELEMENT_CLOCK (self)) - start_time;
+
+    // FIXME: This will probably not work
+    if (start_time == GST_CLOCK_TIME_NONE)
+      start_time = 0;
+
+    // Current times of internal and external clock when we go to
+    // playing. We need this to convert the pipeline running time
+    // to the running time of the hardware
+    //
+    // We can't use the normal base time for the external clock
+    // because we might go to PLAYING later than the pipeline
+    self->internal_base_time =
+        gst_clock_get_internal_time (self->output->clock);
+    self->external_base_time =
+        gst_clock_get_internal_time (GST_ELEMENT_CLOCK (self));
+
+    convert_to_internal_clock (self, &start_time, NULL);
+
+    g_mutex_lock (&self->output->lock);
+    // Check if someone else started in the meantime
+    if (self->output->started)
+      return;
+
+    active = false;
+    self->output->output->IsScheduledPlaybackRunning (&active);
+    if (active) {
+      GST_DEBUG_OBJECT (self, "Stopping scheduled playback");
+
+      self->output->started = FALSE;
+
+      res = self->output->output->StopScheduledPlayback (0, 0, 0);
+      if (res != S_OK) {
+        GST_ELEMENT_ERROR (self, STREAM, FAILED,
+            (NULL), ("Failed to stop scheduled playback: 0x%08x", res));
+        return;
+      }
+    }
+
+    GST_DEBUG_OBJECT (self,
+        "Starting scheduled playback at %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (start_time));
+
+    res =
+        self->output->output->StartScheduledPlayback (start_time,
+        GST_SECOND, 1.0);
+    if (res != S_OK) {
+      GST_ELEMENT_ERROR (self, STREAM, FAILED,
+          (NULL), ("Failed to start scheduled playback: 0x%08x", res));
+      return;
+    }
+
+    self->output->started = TRUE;
+    self->output->clock_restart = TRUE;
+
+    // Need to unlock to get the clock time
+    g_mutex_unlock (&self->output->lock);
+
+    // Sample the clocks again to get the most accurate values
+    // after we started scheduled playback
+    self->internal_base_time =
+        gst_clock_get_internal_time (self->output->clock);
+    self->external_base_time =
+        gst_clock_get_internal_time (GST_ELEMENT_CLOCK (self));
+    g_mutex_lock (&self->output->lock);
+  } else {
+    GST_DEBUG_OBJECT (self, "Not starting scheduled playback yet");
+  }
+}
+
+static GstStateChangeReturn
+gst_decklink_video_sink_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      g_mutex_lock (&self->output->lock);
+      self->output->clock_start_time = GST_CLOCK_TIME_NONE;
+      self->output->clock_last_time = 0;
+      self->output->clock_offset = 0;
+      g_mutex_unlock (&self->output->lock);
+      gst_element_post_message (element,
+          gst_message_new_clock_provide (GST_OBJECT_CAST (element),
+              self->output->clock, TRUE));
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
+      GstClock *clock, *audio_clock;
+
+      clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
+      audio_clock = gst_decklink_output_get_audio_clock (self->output);
+      if (clock && clock != self->output->clock && clock != audio_clock) {
+        gst_clock_set_master (self->output->clock, clock);
+      }
+      if (clock)
+        gst_object_unref (clock);
+      if (audio_clock)
+        gst_object_unref (audio_clock);
+
+      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_element_post_message (element,
+          gst_message_new_clock_lost (GST_OBJECT_CAST (element),
+              self->output->clock));
+      gst_clock_set_master (self->output->clock, NULL);
+      // Reset calibration to make the clock reusable next time we use it
+      gst_clock_set_calibration (self->output->clock, 0, 0, 1, 1);
+      g_mutex_lock (&self->output->lock);
+      self->output->clock_start_time = GST_CLOCK_TIME_NONE;
+      self->output->clock_last_time = 0;
+      self->output->clock_offset = 0;
+      g_mutex_unlock (&self->output->lock);
+      break;
+    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:{
+      GstClockTime start_time;
+      HRESULT res;
+
+      // FIXME: start time is the same for the complete pipeline,
+      // but what we need here is the start time of this element!
+      start_time = gst_element_get_base_time (element);
+      if (start_time != GST_CLOCK_TIME_NONE)
+        start_time = gst_clock_get_time (GST_ELEMENT_CLOCK (self)) - start_time;
+
+      // FIXME: This will probably not work
+      if (start_time == GST_CLOCK_TIME_NONE)
+        start_time = 0;
+
+      convert_to_internal_clock (self, &start_time, NULL);
+
+      // The start time is now the running time when we stopped
+      // playback
+
+      GST_DEBUG_OBJECT (self,
+          "Stopping scheduled playback at %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (start_time));
+
+      g_mutex_lock (&self->output->lock);
+      self->output->started = FALSE;
+      g_mutex_unlock (&self->output->lock);
+      res =
+          self->output->output->StopScheduledPlayback (start_time, 0,
+          GST_SECOND);
+      if (res != S_OK) {
+        GST_ELEMENT_ERROR (self, STREAM, FAILED,
+            (NULL), ("Failed to stop scheduled playback: 0x%08x", res));
+        ret = GST_STATE_CHANGE_FAILURE;
+      }
+      self->internal_base_time = GST_CLOCK_TIME_NONE;
+      self->external_base_time = GST_CLOCK_TIME_NONE;
+      break;
+    }
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
+      g_mutex_lock (&self->output->lock);
+      if (self->output->start_scheduled_playback)
+        self->output->start_scheduled_playback (self->output->videosink);
+      g_mutex_unlock (&self->output->lock);
+      break;
+    }
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static GstClock *
+gst_decklink_video_sink_provide_clock (GstElement * element)
+{
+  GstDecklinkVideoSink *self = GST_DECKLINK_VIDEO_SINK_CAST (element);
+
+  if (!self->output)
+    return NULL;
+
+  return GST_CLOCK_CAST (gst_object_ref (self->output->clock));
+}
+
+static gboolean
+gst_decklink_video_sink_propose_allocation (GstBaseSink * bsink,
+    GstQuery * query)
+{
+  GstCaps *caps;
+  GstVideoInfo info;
+  GstBufferPool *pool;
+  guint size;
+
+  gst_query_parse_allocation (query, &caps, NULL);
+
+  if (caps == NULL)
+    return FALSE;
+
+  if (!gst_video_info_from_caps (&info, caps))
+    return FALSE;
+
+  size = GST_VIDEO_INFO_SIZE (&info);
+
+  if (gst_query_get_n_allocation_pools (query) == 0) {
+    GstStructure *structure;
+    GstAllocator *allocator = NULL;
+    GstAllocationParams params = { (GstMemoryFlags) 0, 15, 0, 0 };
+
+    if (gst_query_get_n_allocation_params (query) > 0)
+      gst_query_parse_nth_allocation_param (query, 0, &allocator, &params);
+    else
+      gst_query_add_allocation_param (query, allocator, &params);
+
+    pool = gst_video_buffer_pool_new ();
+
+    structure = gst_buffer_pool_get_config (pool);
+    gst_buffer_pool_config_set_params (structure, caps, size, 0, 0);
+    gst_buffer_pool_config_set_allocator (structure, allocator, &params);
+
+    if (allocator)
+      gst_object_unref (allocator);
+
+    if (!gst_buffer_pool_set_config (pool, structure))
+      goto config_failed;
+
+    gst_query_add_allocation_pool (query, pool, size, 0, 0);
+    gst_object_unref (pool);
+    gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+  }
+
+  return TRUE;
+  // ERRORS
+config_failed:
+  {
+    GST_ERROR_OBJECT (bsink, "failed to set config");
+    gst_object_unref (pool);
+    return FALSE;
+  }
+}
diff --git a/sys/decklink/gstdecklinkvideosink.h b/sys/decklink/gstdecklinkvideosink.h
new file mode 100644
index 0000000..16b2fbb
--- /dev/null
+++ b/sys/decklink/gstdecklinkvideosink.h
@@ -0,0 +1,72 @@
+/* GStreamer
+ *
+ * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.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_DECKLINK_VIDEO_SINK_H__
+#define __GST_DECKLINK_VIDEO_SINK_H__
+
+#include <gst/gst.h>
+#include <gst/base/base.h>
+#include <gst/video/video.h>
+#include "gstdecklink.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DECKLINK_VIDEO_SINK \
+  (gst_decklink_video_sink_get_type())
+#define GST_DECKLINK_VIDEO_SINK(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DECKLINK_VIDEO_SINK, GstDecklinkVideoSink))
+#define GST_DECKLINK_VIDEO_SINK_CAST(obj) \
+  ((GstDecklinkVideoSink*)obj)
+#define GST_DECKLINK_VIDEO_SINK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DECKLINK_VIDEO_SINK, GstDecklinkVideoSinkClass))
+#define GST_IS_DECKLINK_VIDEO_SINK(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DECKLINK_VIDEO_SINK))
+#define GST_IS_DECKLINK_VIDEO_SINK_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DECKLINK_VIDEO_SINK))
+
+typedef struct _GstDecklinkVideoSink GstDecklinkVideoSink;
+typedef struct _GstDecklinkVideoSinkClass GstDecklinkVideoSinkClass;
+
+struct _GstDecklinkVideoSink
+{
+  GstBaseSink parent;
+
+  GstDecklinkModeEnum mode;
+  gint device_number;
+
+  GstVideoInfo info;
+
+  GstClockTime internal_base_time;
+  GstClockTime external_base_time;
+
+  GstDecklinkOutput *output;
+};
+
+struct _GstDecklinkVideoSinkClass
+{
+  GstBaseSinkClass parent_class;
+};
+
+GType gst_decklink_video_sink_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_DECKLINK_VIDEO_SINK_H__ */
diff --git a/sys/decklink/gstdecklinkvideosrc.cpp b/sys/decklink/gstdecklinkvideosrc.cpp
new file mode 100644
index 0000000..4e8bcee
--- /dev/null
+++ b/sys/decklink/gstdecklinkvideosrc.cpp
@@ -0,0 +1,827 @@
+/* GStreamer
+ * Copyright (C) 2011 David Schleef <ds@entropywave.com>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2015 Florian Langlois <florian.langlois@fr.thalesgroup.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 Street, Suite 500,
+ * Boston, MA 02110-1335, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstdecklinkvideosrc.h"
+#include <string.h>
+
+GST_DEBUG_CATEGORY_STATIC (gst_decklink_video_src_debug);
+#define GST_CAT_DEFAULT gst_decklink_video_src_debug
+
+#define DEFAULT_MODE (GST_DECKLINK_MODE_AUTO)
+#define DEFAULT_CONNECTION (GST_DECKLINK_CONNECTION_AUTO)
+#define DEFAULT_BUFFER_SIZE (5)
+
+enum
+{
+  PROP_0,
+  PROP_MODE,
+  PROP_CONNECTION,
+  PROP_DEVICE_NUMBER,
+  PROP_BUFFER_SIZE
+};
+
+typedef struct
+{
+  IDeckLinkVideoInputFrame *frame;
+  GstClockTime capture_time, capture_duration;
+  GstDecklinkModeEnum mode;
+} CaptureFrame;
+
+static void
+capture_frame_free (void *data)
+{
+  CaptureFrame *frame = (CaptureFrame *) data;
+
+  frame->frame->Release ();
+  g_free (frame);
+}
+
+typedef struct
+{
+  IDeckLinkVideoInputFrame *frame;
+  IDeckLinkInput *input;
+} VideoFrame;
+
+static void
+video_frame_free (void *data)
+{
+  VideoFrame *frame = (VideoFrame *) data;
+
+  frame->frame->Release ();
+  frame->input->Release ();
+  g_free (frame);
+}
+
+static void gst_decklink_video_src_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec);
+static void gst_decklink_video_src_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec);
+static void gst_decklink_video_src_finalize (GObject * object);
+
+static GstStateChangeReturn
+gst_decklink_video_src_change_state (GstElement * element,
+    GstStateChange transition);
+static GstClock *gst_decklink_video_src_provide_clock (GstElement * element);
+
+static gboolean gst_decklink_video_src_set_caps (GstBaseSrc * bsrc,
+    GstCaps * caps);
+static GstCaps *gst_decklink_video_src_get_caps (GstBaseSrc * bsrc,
+    GstCaps * filter);
+static gboolean gst_decklink_video_src_query (GstBaseSrc * bsrc,
+    GstQuery * query);
+static gboolean gst_decklink_video_src_unlock (GstBaseSrc * bsrc);
+static gboolean gst_decklink_video_src_unlock_stop (GstBaseSrc * bsrc);
+
+static GstFlowReturn gst_decklink_video_src_create (GstPushSrc * psrc,
+    GstBuffer ** buffer);
+
+static gboolean gst_decklink_video_src_open (GstDecklinkVideoSrc * self);
+static gboolean gst_decklink_video_src_close (GstDecklinkVideoSrc * self);
+
+static void gst_decklink_video_src_start_streams (GstElement * element);
+
+#define parent_class gst_decklink_video_src_parent_class
+G_DEFINE_TYPE (GstDecklinkVideoSrc, gst_decklink_video_src, GST_TYPE_PUSH_SRC);
+
+static void
+gst_decklink_video_src_class_init (GstDecklinkVideoSrcClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstBaseSrcClass *basesrc_class = GST_BASE_SRC_CLASS (klass);
+  GstPushSrcClass *pushsrc_class = GST_PUSH_SRC_CLASS (klass);
+  GstCaps *templ_caps;
+
+  gobject_class->set_property = gst_decklink_video_src_set_property;
+  gobject_class->get_property = gst_decklink_video_src_get_property;
+  gobject_class->finalize = gst_decklink_video_src_finalize;
+
+  element_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_src_change_state);
+  element_class->provide_clock =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_src_provide_clock);
+
+  basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_decklink_video_src_get_caps);
+  basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_decklink_video_src_set_caps);
+  basesrc_class->query = GST_DEBUG_FUNCPTR (gst_decklink_video_src_query);
+  basesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_decklink_video_src_unlock);
+  basesrc_class->unlock_stop =
+      GST_DEBUG_FUNCPTR (gst_decklink_video_src_unlock_stop);
+
+  pushsrc_class->create = GST_DEBUG_FUNCPTR (gst_decklink_video_src_create);
+
+  g_object_class_install_property (gobject_class, PROP_MODE,
+      g_param_spec_enum ("mode", "Playback Mode",
+          "Video Mode to use for playback",
+          GST_TYPE_DECKLINK_MODE, DEFAULT_MODE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_CONNECTION,
+      g_param_spec_enum ("connection", "Connection",
+          "Video input connection to use",
+          GST_TYPE_DECKLINK_CONNECTION, DEFAULT_CONNECTION,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_DEVICE_NUMBER,
+      g_param_spec_int ("device-number", "Device number",
+          "Output device instance to use", 0, G_MAXINT, 0,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+              G_PARAM_CONSTRUCT)));
+
+  g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
+      g_param_spec_uint ("buffer-size", "Buffer Size",
+          "Size of internal buffer in number of video frames", 1,
+          G_MAXINT, DEFAULT_BUFFER_SIZE,
+          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+  templ_caps = gst_decklink_mode_get_template_caps ();
+  gst_element_class_add_pad_template (element_class,
+      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, templ_caps));
+  gst_caps_unref (templ_caps);
+
+  gst_element_class_set_static_metadata (element_class, "Decklink Video Source",
+      "Video/Src", "Decklink Source", "David Schleef <ds@entropywave.com>, "
+      "Sebastian Dröge <sebastian@centricular.com>");
+
+  GST_DEBUG_CATEGORY_INIT (gst_decklink_video_src_debug, "decklinkvideosrc",
+      0, "debug category for decklinkvideosrc element");
+}
+
+static void
+gst_decklink_video_src_init (GstDecklinkVideoSrc * self)
+{
+  self->mode = DEFAULT_MODE;
+  self->caps_mode = GST_DECKLINK_MODE_AUTO;
+  self->connection = DEFAULT_CONNECTION;
+  self->device_number = 0;
+  self->buffer_size = DEFAULT_BUFFER_SIZE;
+
+  gst_base_src_set_live (GST_BASE_SRC (self), TRUE);
+  gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
+
+  g_mutex_init (&self->lock);
+  g_cond_init (&self->cond);
+
+  g_queue_init (&self->current_frames);
+}
+
+void
+gst_decklink_video_src_set_property (GObject * object, guint property_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (object);
+
+  switch (property_id) {
+    case PROP_MODE:
+      self->mode = (GstDecklinkModeEnum) g_value_get_enum (value);
+      break;
+    case PROP_CONNECTION:
+      self->connection = (GstDecklinkConnectionEnum) g_value_get_enum (value);
+      break;
+    case PROP_DEVICE_NUMBER:
+      self->device_number = g_value_get_int (value);
+      break;
+    case PROP_BUFFER_SIZE:
+      self->buffer_size = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_video_src_get_property (GObject * object, guint property_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (object);
+
+  switch (property_id) {
+    case PROP_MODE:
+      g_value_set_enum (value, self->mode);
+      break;
+    case PROP_CONNECTION:
+      g_value_set_enum (value, self->connection);
+      break;
+    case PROP_DEVICE_NUMBER:
+      g_value_set_int (value, self->device_number);
+      break;
+    case PROP_BUFFER_SIZE:
+      g_value_set_uint (value, self->buffer_size);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+  }
+}
+
+void
+gst_decklink_video_src_finalize (GObject * object)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (object);
+
+  g_mutex_clear (&self->lock);
+  g_cond_clear (&self->cond);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static gboolean
+gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+  GstCaps *current_caps;
+  const GstDecklinkMode *mode;
+  BMDVideoInputFlags flags;
+  HRESULT ret;
+
+  GST_DEBUG_OBJECT (self, "Setting caps %" GST_PTR_FORMAT, caps);
+
+  if ((current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc)))) {
+    GST_DEBUG_OBJECT (self, "Pad already has caps %" GST_PTR_FORMAT, caps);
+
+    if (!gst_caps_is_equal (caps, current_caps)) {
+      GST_DEBUG_OBJECT (self, "New caps, reconfiguring");
+      gst_caps_unref (current_caps);
+      if (self->mode == GST_DECKLINK_MODE_AUTO) {
+        return TRUE;
+      } else {
+        return FALSE;
+      }
+    } else {
+      gst_caps_unref (current_caps);
+      return TRUE;
+    }
+  }
+
+  if (!gst_video_info_from_caps (&self->info, caps))
+    return FALSE;
+
+  if (self->input->config && self->connection != GST_DECKLINK_CONNECTION_AUTO) {
+    ret = self->input->config->SetInt (bmdDeckLinkConfigVideoInputConnection,
+        gst_decklink_get_connection (self->connection));
+    if (ret != S_OK) {
+      GST_ERROR_OBJECT (self, "Failed to set configuration (input source)");
+      return FALSE;
+    }
+
+    if (self->connection == GST_DECKLINK_CONNECTION_COMPOSITE) {
+      ret = self->input->config->SetInt (bmdDeckLinkConfigAnalogVideoInputFlags,
+          bmdAnalogVideoFlagCompositeSetup75);
+      if (ret != S_OK) {
+        GST_ERROR_OBJECT (self,
+            "Failed to set configuration (composite setup)");
+        return FALSE;
+      }
+    }
+  }
+
+  flags = bmdVideoInputFlagDefault;
+  if (self->mode == GST_DECKLINK_MODE_AUTO) {
+    bool autoDetection = false;
+
+    if (self->input->attributes) {
+      ret =
+          self->input->
+          attributes->GetFlag (BMDDeckLinkSupportsInputFormatDetection,
+          &autoDetection);
+      if (ret != S_OK) {
+        GST_ERROR_OBJECT (self, "Failed to get attribute (autodetection)");
+        return FALSE;
+      }
+      if (autoDetection)
+        flags |= bmdVideoInputEnableFormatDetection;
+    }
+    if (!autoDetection) {
+      GST_ERROR_OBJECT (self, "Failed to activate auto-detection");
+      return FALSE;
+    }
+  }
+
+  mode = gst_decklink_get_mode (self->mode);
+  g_assert (mode != NULL);
+
+  ret = self->input->input->EnableVideoInput (mode->mode,
+      bmdFormat8BitYUV, flags);
+  if (ret != S_OK) {
+    GST_WARNING_OBJECT (self, "Failed to enable video input");
+    return FALSE;
+  }
+
+  g_mutex_lock (&self->input->lock);
+  self->input->mode = mode;
+  self->input->video_enabled = TRUE;
+  if (self->input->start_streams)
+    self->input->start_streams (self->input->videosrc);
+  g_mutex_unlock (&self->input->lock);
+
+  return TRUE;
+}
+
+static GstCaps *
+gst_decklink_video_src_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+  GstCaps *mode_caps, *caps;
+
+  g_mutex_lock (&self->lock);
+  if (self->caps_mode != GST_DECKLINK_MODE_AUTO)
+    mode_caps = gst_decklink_mode_get_caps (self->caps_mode);
+  else
+    mode_caps = gst_decklink_mode_get_caps (self->mode);
+  g_mutex_unlock (&self->lock);
+
+  if (filter) {
+    caps =
+        gst_caps_intersect_full (filter, mode_caps, GST_CAPS_INTERSECT_FIRST);
+    gst_caps_unref (mode_caps);
+  } else {
+    caps = mode_caps;
+  }
+
+  return caps;
+}
+
+void
+gst_decklink_video_src_convert_to_external_clock (GstDecklinkVideoSrc * self,
+    GstClockTime * timestamp, GstClockTime * duration)
+{
+  GstClock *clock;
+
+  g_assert (timestamp != NULL);
+
+  if (*timestamp == GST_CLOCK_TIME_NONE)
+    return;
+
+  clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
+  if (clock && clock != self->input->clock) {
+    GstClockTime internal, external, rate_n, rate_d;
+    GstClockTimeDiff external_start_time_diff;
+
+    gst_clock_get_calibration (self->input->clock, &internal, &external,
+        &rate_n, &rate_d);
+
+    if (rate_n != rate_d && self->internal_base_time != GST_CLOCK_TIME_NONE) {
+      GstClockTime internal_timestamp = *timestamp;
+
+      // Convert to the running time corresponding to both clock times
+      internal -= self->internal_base_time;
+      external -= self->external_base_time;
+
+      // Get the difference in the internal time, note
+      // that the capture time is internal time.
+      // Then scale this difference and offset it to
+      // our external time. Now we have the running time
+      // according to our external clock.
+      //
+      // For the duration we just scale
+      if (internal > internal_timestamp) {
+        guint64 diff = internal - internal_timestamp;
+        diff = gst_util_uint64_scale (diff, rate_n, rate_d);
+        *timestamp = external - diff;
+      } else {
+        guint64 diff = internal_timestamp - internal;
+        diff = gst_util_uint64_scale (diff, rate_n, rate_d);
+        *timestamp = external + diff;
+      }
+
+      GST_LOG_OBJECT (self,
+          "Converted %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT " (external: %"
+          GST_TIME_FORMAT " internal %" GST_TIME_FORMAT " rate: %lf)",
+          GST_TIME_ARGS (internal_timestamp), GST_TIME_ARGS (*timestamp),
+          GST_TIME_ARGS (external), GST_TIME_ARGS (internal),
+          ((gdouble) rate_n) / ((gdouble) rate_d));
+
+      if (duration) {
+        GstClockTime internal_duration = *duration;
+
+        *duration = gst_util_uint64_scale (internal_duration, rate_d, rate_n);
+
+        GST_LOG_OBJECT (self,
+            "Converted duration %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT
+            " (external: %" GST_TIME_FORMAT " internal %" GST_TIME_FORMAT
+            " rate: %lf)", GST_TIME_ARGS (internal_duration),
+            GST_TIME_ARGS (*duration), GST_TIME_ARGS (external),
+            GST_TIME_ARGS (internal), ((gdouble) rate_n) / ((gdouble) rate_d));
+      }
+    } else {
+      GST_LOG_OBJECT (self, "No clock conversion needed, relative rate is 1.0");
+    }
+
+    // Add the diff between the external time when we
+    // went to playing and the external time when the
+    // pipeline went to playing. Otherwise we will
+    // always start outputting from 0 instead of the
+    // current running time.
+    external_start_time_diff =
+        gst_element_get_base_time (GST_ELEMENT_CAST (self));
+    external_start_time_diff =
+        self->external_base_time - external_start_time_diff;
+    *timestamp += external_start_time_diff;
+  } else {
+    GST_LOG_OBJECT (self, "No clock conversion needed, same clocks");
+  }
+}
+
+static void
+gst_decklink_video_src_got_frame (GstElement * element,
+    IDeckLinkVideoInputFrame * frame, GstDecklinkModeEnum mode,
+    GstClockTime capture_time, GstClockTime capture_duration)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (element);
+
+  GST_LOG_OBJECT (self, "Got video frame at %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (capture_time));
+
+  gst_decklink_video_src_convert_to_external_clock (self, &capture_time,
+      &capture_duration);
+
+  GST_LOG_OBJECT (self, "Actual timestamp %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (capture_time));
+
+  g_mutex_lock (&self->lock);
+  if (!self->flushing) {
+    CaptureFrame *f;
+
+    while (g_queue_get_length (&self->current_frames) >= self->buffer_size) {
+      f = (CaptureFrame *) g_queue_pop_head (&self->current_frames);
+      GST_WARNING_OBJECT (self, "Dropping old frame at %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (f->capture_time));
+      capture_frame_free (f);
+    }
+
+    f = (CaptureFrame *) g_malloc0 (sizeof (CaptureFrame));
+    f->frame = frame;
+    f->capture_time = capture_time;
+    f->capture_duration = capture_duration;
+    f->mode = mode;
+    frame->AddRef ();
+    g_queue_push_tail (&self->current_frames, f);
+    g_cond_signal (&self->cond);
+  }
+  g_mutex_unlock (&self->lock);
+}
+
+static GstFlowReturn
+gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+  GstFlowReturn flow_ret = GST_FLOW_OK;
+  const guint8 *data;
+  gsize data_size;
+  VideoFrame *vf;
+  CaptureFrame *f;
+  GstCaps *caps;
+
+  g_mutex_lock (&self->lock);
+  while (g_queue_is_empty (&self->current_frames) && !self->flushing) {
+    g_cond_wait (&self->cond, &self->lock);
+  }
+
+  f = (CaptureFrame *) g_queue_pop_head (&self->current_frames);
+  g_mutex_unlock (&self->lock);
+
+  if (self->flushing) {
+    if (f)
+      capture_frame_free (f);
+    GST_DEBUG_OBJECT (self, "Flushing");
+    return GST_FLOW_FLUSHING;
+  }
+
+  g_mutex_lock (&self->lock);
+  if (self->mode == GST_DECKLINK_MODE_AUTO && self->caps_mode != f->mode) {
+    GST_DEBUG_OBJECT (self, "Mode changed from %d to %d", self->caps_mode,
+        f->mode);
+    self->caps_mode = f->mode;
+    g_mutex_unlock (&self->lock);
+    caps = gst_decklink_mode_get_caps (f->mode);
+    gst_video_info_from_caps (&self->info, caps);
+    gst_base_src_set_caps (GST_BASE_SRC_CAST (bsrc), caps);
+    gst_element_post_message (GST_ELEMENT_CAST (self),
+        gst_message_new_latency (GST_OBJECT_CAST (self)));
+    gst_caps_unref (caps);
+  } else {
+    g_mutex_unlock (&self->lock);
+  }
+
+  f->frame->GetBytes ((gpointer *) & data);
+  data_size = self->info.size;
+
+  vf = (VideoFrame *) g_malloc0 (sizeof (VideoFrame));
+
+  *buffer =
+      gst_buffer_new_wrapped_full ((GstMemoryFlags) GST_MEMORY_FLAG_READONLY,
+      (gpointer) data, data_size, 0, data_size, vf,
+      (GDestroyNotify) video_frame_free);
+
+  vf->frame = f->frame;
+  f->frame->AddRef ();
+  vf->input = self->input->input;
+  vf->input->AddRef ();
+
+  GST_BUFFER_TIMESTAMP (*buffer) = f->capture_time;
+  GST_BUFFER_DURATION (*buffer) = f->capture_duration;
+
+  GST_DEBUG_OBJECT (self,
+      "Outputting buffer %p with timestamp %" GST_TIME_FORMAT " and duration %"
+      GST_TIME_FORMAT, *buffer, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (*buffer)),
+      GST_TIME_ARGS (GST_BUFFER_DURATION (*buffer)));
+
+  capture_frame_free (f);
+
+  return flow_ret;
+}
+
+static gboolean
+gst_decklink_video_src_query (GstBaseSrc * bsrc, GstQuery * query)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+  gboolean ret = TRUE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_LATENCY:{
+      if (self->input) {
+        GstClockTime min, max;
+        const GstDecklinkMode *mode;
+
+        g_mutex_lock (&self->lock);
+        if (self->caps_mode != GST_DECKLINK_MODE_AUTO)
+          mode = gst_decklink_get_mode (self->caps_mode);
+        else
+          mode = gst_decklink_get_mode (self->mode);
+        g_mutex_unlock (&self->lock);
+
+        min = gst_util_uint64_scale_ceil (GST_SECOND, mode->fps_d, mode->fps_n);
+        max = self->buffer_size * min;
+
+        gst_query_set_latency (query, TRUE, min, max);
+        ret = TRUE;
+      } else {
+        ret = FALSE;
+      }
+
+      break;
+    }
+    default:
+      ret = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
+      break;
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_decklink_video_src_unlock (GstBaseSrc * bsrc)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+
+  g_mutex_lock (&self->lock);
+  self->flushing = TRUE;
+  g_cond_signal (&self->cond);
+  g_mutex_unlock (&self->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_video_src_unlock_stop (GstBaseSrc * bsrc)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (bsrc);
+
+  g_mutex_lock (&self->lock);
+  self->flushing = FALSE;
+  g_queue_foreach (&self->current_frames, (GFunc) capture_frame_free, NULL);
+  g_queue_clear (&self->current_frames);
+  g_mutex_unlock (&self->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_video_src_open (GstDecklinkVideoSrc * self)
+{
+  const GstDecklinkMode *mode;
+
+  GST_DEBUG_OBJECT (self, "Starting");
+
+  self->input =
+      gst_decklink_acquire_nth_input (self->device_number,
+      GST_ELEMENT_CAST (self), FALSE);
+  if (!self->input) {
+    GST_ERROR_OBJECT (self, "Failed to acquire input");
+    return FALSE;
+  }
+
+  mode = gst_decklink_get_mode (self->mode);
+  g_assert (mode != NULL);
+  g_mutex_lock (&self->input->lock);
+  self->input->mode = mode;
+  self->input->got_video_frame = gst_decklink_video_src_got_frame;
+  self->input->start_streams = gst_decklink_video_src_start_streams;
+  self->input->clock_start_time = GST_CLOCK_TIME_NONE;
+  self->input->clock_last_time = 0;
+  self->input->clock_offset = 0;
+  g_mutex_unlock (&self->input->lock);
+
+  return TRUE;
+}
+
+static gboolean
+gst_decklink_video_src_close (GstDecklinkVideoSrc * self)
+{
+
+  GST_DEBUG_OBJECT (self, "Stopping");
+
+  if (self->input) {
+    g_mutex_lock (&self->input->lock);
+    self->input->got_video_frame = NULL;
+    self->input->mode = NULL;
+    self->input->video_enabled = FALSE;
+    if (self->input->start_streams)
+      self->input->start_streams (self->input->videosrc);
+    g_mutex_unlock (&self->input->lock);
+
+    self->input->input->DisableVideoInput ();
+    gst_decklink_release_nth_input (self->device_number,
+        GST_ELEMENT_CAST (self), FALSE);
+    self->input = NULL;
+  }
+
+  return TRUE;
+}
+
+static void
+gst_decklink_video_src_start_streams (GstElement * element)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (element);
+  HRESULT res;
+
+  if (self->input->video_enabled && (!self->input->audiosrc
+          || self->input->audio_enabled)
+      && (GST_STATE (self) == GST_STATE_PLAYING
+          || GST_STATE_PENDING (self) == GST_STATE_PLAYING)) {
+    GST_DEBUG_OBJECT (self, "Starting streams");
+
+    res = self->input->input->StartStreams ();
+    if (res != S_OK) {
+      GST_ELEMENT_ERROR (self, STREAM, FAILED,
+          (NULL), ("Failed to start streams: 0x%08x", res));
+      return;
+    }
+
+    self->input->started = TRUE;
+    self->input->clock_restart = TRUE;
+
+    // Need to unlock to get the clock time
+    g_mutex_unlock (&self->input->lock);
+
+    // Current times of internal and external clock when we go to
+    // playing. We need this to convert the pipeline running time
+    // to the running time of the hardware
+    //
+    // We can't use the normal base time for the external clock
+    // because we might go to PLAYING later than the pipeline
+    self->internal_base_time = gst_clock_get_internal_time (self->input->clock);
+    self->external_base_time =
+        gst_clock_get_internal_time (GST_ELEMENT_CLOCK (self));
+
+    g_mutex_lock (&self->input->lock);
+  } else {
+    GST_DEBUG_OBJECT (self, "Not starting streams yet");
+  }
+}
+
+static GstStateChangeReturn
+gst_decklink_video_src_change_state (GstElement * element,
+    GstStateChange transition)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (element);
+  GstStateChangeReturn ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_decklink_video_src_open (self)) {
+        ret = GST_STATE_CHANGE_FAILURE;
+        goto out;
+      }
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      g_mutex_lock (&self->input->lock);
+      self->input->clock_start_time = GST_CLOCK_TIME_NONE;
+      self->input->clock_last_time = 0;
+      self->input->clock_offset = 0;
+      g_mutex_unlock (&self->input->lock);
+      gst_element_post_message (element,
+          gst_message_new_clock_provide (GST_OBJECT_CAST (element),
+              self->input->clock, TRUE));
+      self->flushing = FALSE;
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
+      GstClock *clock;
+
+      clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
+      if (clock && clock != self->input->clock) {
+        gst_clock_set_master (self->input->clock, clock);
+      }
+      if (clock)
+        gst_object_unref (clock);
+
+      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_element_post_message (element,
+          gst_message_new_clock_lost (GST_OBJECT_CAST (element),
+              self->input->clock));
+      gst_clock_set_master (self->input->clock, NULL);
+      // Reset calibration to make the clock reusable next time we use it
+      gst_clock_set_calibration (self->input->clock, 0, 0, 1, 1);
+      g_mutex_lock (&self->input->lock);
+      self->input->clock_start_time = GST_CLOCK_TIME_NONE;
+      self->input->clock_last_time = 0;
+      self->input->clock_offset = 0;
+      g_mutex_unlock (&self->input->lock);
+
+      g_queue_foreach (&self->current_frames, (GFunc) capture_frame_free, NULL);
+      g_queue_clear (&self->current_frames);
+      self->caps_mode = GST_DECKLINK_MODE_AUTO;
+      break;
+    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:{
+      HRESULT res;
+
+      GST_DEBUG_OBJECT (self, "Stopping streams");
+      g_mutex_lock (&self->input->lock);
+      self->input->started = FALSE;
+      g_mutex_unlock (&self->input->lock);
+
+      res = self->input->input->StopStreams ();
+      if (res != S_OK) {
+        GST_ELEMENT_ERROR (self, STREAM, FAILED,
+            (NULL), ("Failed to stop streams: 0x%08x", res));
+        ret = GST_STATE_CHANGE_FAILURE;
+      }
+      self->internal_base_time = GST_CLOCK_TIME_NONE;
+      self->external_base_time = GST_CLOCK_TIME_NONE;
+      break;
+    }
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
+      g_mutex_lock (&self->input->lock);
+      if (self->input->start_streams)
+        self->input->start_streams (self->input->videosrc);
+      g_mutex_unlock (&self->input->lock);
+
+      break;
+    }
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      gst_decklink_video_src_close (self);
+      break;
+    default:
+      break;
+  }
+out:
+
+  return ret;
+}
+
+static GstClock *
+gst_decklink_video_src_provide_clock (GstElement * element)
+{
+  GstDecklinkVideoSrc *self = GST_DECKLINK_VIDEO_SRC_CAST (element);
+
+  if (!self->input)
+    return NULL;
+
+  return GST_CLOCK_CAST (gst_object_ref (self->input->clock));
+}
diff --git a/sys/decklink/gstdecklinkvideosrc.h b/sys/decklink/gstdecklinkvideosrc.h
new file mode 100644
index 0000000..6cb5bb9
--- /dev/null
+++ b/sys/decklink/gstdecklinkvideosrc.h
@@ -0,0 +1,84 @@
+/* GStreamer
+ *
+ * Copyright (C) 2011 David Schleef <ds@schleef.org>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
+ * Copyright (C) 2015 Florian Langlois <florian.langlois@fr.thalesgroup.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_DECKLINK_VIDEO_SRC_H__
+#define __GST_DECKLINK_VIDEO_SRC_H__
+
+#include <gst/gst.h>
+#include <gst/base/base.h>
+#include <gst/video/video.h>
+#include "gstdecklink.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DECKLINK_VIDEO_SRC \
+  (gst_decklink_video_src_get_type())
+#define GST_DECKLINK_VIDEO_SRC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DECKLINK_VIDEO_SRC, GstDecklinkVideoSrc))
+#define GST_DECKLINK_VIDEO_SRC_CAST(obj) \
+  ((GstDecklinkVideoSrc*)obj)
+#define GST_DECKLINK_VIDEO_SRC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DECKLINK_VIDEO_SRC, GstDecklinkVideoSrcClass))
+#define GST_IS_DECKLINK_VIDEO_SRC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DECKLINK_VIDEO_SRC))
+#define GST_IS_DECKLINK_VIDEO_SRC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DECKLINK_VIDEO_SRC))
+
+typedef struct _GstDecklinkVideoSrc GstDecklinkVideoSrc;
+typedef struct _GstDecklinkVideoSrcClass GstDecklinkVideoSrcClass;
+
+struct _GstDecklinkVideoSrc
+{
+  GstPushSrc parent;
+
+  GstDecklinkModeEnum mode;
+  GstDecklinkModeEnum caps_mode;
+  GstDecklinkConnectionEnum connection;
+  gint device_number;
+
+  GstVideoInfo info;
+
+  GstDecklinkInput *input;
+
+  GCond cond;
+  GMutex lock;
+  gboolean flushing;
+  GQueue current_frames;
+
+  guint buffer_size;
+
+  GstClockTime internal_base_time;
+  GstClockTime external_base_time;
+};
+
+struct _GstDecklinkVideoSrcClass
+{
+  GstPushSrcClass parent_class;
+};
+
+GType gst_decklink_video_src_get_type (void);
+void gst_decklink_video_src_convert_to_external_clock (GstDecklinkVideoSrc * self,
+    GstClockTime * timestamp, GstClockTime * duration);
+
+G_END_DECLS
+
+#endif /* __GST_DECKLINK_VIDEO_SRC_H__ */
diff --git a/sys/decklink/linux/DeckLinkAPI.h b/sys/decklink/linux/DeckLinkAPI.h
index e9c1066..c46ed77 100644
--- a/sys/decklink/linux/DeckLinkAPI.h
+++ b/sys/decklink/linux/DeckLinkAPI.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -25,454 +25,252 @@
 ** -LICENSE-END-
 */
 
-/* DeckLinkAPI.h */
-		
-#ifndef __DeckLink_API_h__
-#define __DeckLink_API_h__
-		
+#ifndef BMD_DECKLINKAPI_H
+#define BMD_DECKLINKAPI_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+/* DeckLink API */
+
 #include <stdint.h>
 #include "LinuxCOM.h"
 
+#include "DeckLinkAPITypes.h"
+#include "DeckLinkAPIModes.h"
+#include "DeckLinkAPIDiscovery.h"
+#include "DeckLinkAPIConfiguration.h"
+#include "DeckLinkAPIDeckControl.h"
+
 #define BLACKMAGIC_DECKLINK_API_MAGIC	1
 
 // Type Declarations
 
-typedef int64_t BMDTimeValue;
-typedef int64_t BMDTimeScale;
-typedef uint32_t BMDTimecodeBCD;
-typedef uint32_t BMDTimecodeUserBits;
-
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkVideoOutputCallback                 /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ (REFIID){0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE}
-#define IID_IDeckLinkInputCallback                       /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ (REFIID){0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A}
-#define IID_IDeckLinkMemoryAllocator                     /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ (REFIID){0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8}
-#define IID_IDeckLinkAudioOutputCallback                 /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ (REFIID){0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6}
-#define IID_IDeckLinkIterator                            /* 74E936FC-CC28-4A67-81A0-1E94E52D4E69 */ (REFIID){0x74,0xE9,0x36,0xFC,0xCC,0x28,0x4A,0x67,0x81,0xA0,0x1E,0x94,0xE5,0x2D,0x4E,0x69}
-#define IID_IDeckLinkAPIInformation                      /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ (REFIID){0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4}
-#define IID_IDeckLinkDisplayModeIterator                 /* 9C88499F-F601-4021-B80B-032E4EB41C35 */ (REFIID){0x9C,0x88,0x49,0x9F,0xF6,0x01,0x40,0x21,0xB8,0x0B,0x03,0x2E,0x4E,0xB4,0x1C,0x35}
-#define IID_IDeckLinkDisplayMode                         /* 3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78 */ (REFIID){0x3E,0xB2,0xC1,0xAB,0x0A,0x3D,0x45,0x23,0xA3,0xAD,0xF4,0x0D,0x7F,0xB1,0x4E,0x78}
-#define IID_IDeckLink                                    /* 62BFF75D-6569-4E55-8D4D-66AA03829ABC */ (REFIID){0x62,0xBF,0xF7,0x5D,0x65,0x69,0x4E,0x55,0x8D,0x4D,0x66,0xAA,0x03,0x82,0x9A,0xBC}
-#define IID_IDeckLinkOutput                              /* A3EF0963-0862-44ED-92A9-EE89ABF431C7 */ (REFIID){0xA3,0xEF,0x09,0x63,0x08,0x62,0x44,0xED,0x92,0xA9,0xEE,0x89,0xAB,0xF4,0x31,0xC7}
-#define IID_IDeckLinkInput                               /* 6D40EF78-28B9-4E21-990D-95BB7750A04F */ (REFIID){0x6D,0x40,0xEF,0x78,0x28,0xB9,0x4E,0x21,0x99,0x0D,0x95,0xBB,0x77,0x50,0xA0,0x4F}
-#define IID_IDeckLinkTimecode                            /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ (REFIID){0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40}
-#define IID_IDeckLinkVideoFrame                          /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ (REFIID){0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17}
-#define IID_IDeckLinkMutableVideoFrame                   /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ (REFIID){0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90}
-#define IID_IDeckLinkVideoFrame3DExtensions              /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ (REFIID){0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7}
-#define IID_IDeckLinkVideoInputFrame                     /* 05CFE374-537C-4094-9A57-680525118F44 */ (REFIID){0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44}
-#define IID_IDeckLinkVideoFrameAncillary                 /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ (REFIID){0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04}
-#define IID_IDeckLinkAudioInputPacket                    /* E43D5870-2894-11DE-8C30-0800200C9A66 */ (REFIID){0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66}
-#define IID_IDeckLinkScreenPreviewCallback               /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ (REFIID){0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38}
-#define IID_IDeckLinkGLScreenPreviewHelper               /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ (REFIID){0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F}
-#define IID_IDeckLinkConfiguration                       /* C679A35B-610C-4D09-B748-1D0478100FC0 */ (REFIID){0xC6,0x79,0xA3,0x5B,0x61,0x0C,0x4D,0x09,0xB7,0x48,0x1D,0x04,0x78,0x10,0x0F,0xC0}
-#define IID_IDeckLinkAttributes                          /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ (REFIID){0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4}
-#define IID_IDeckLinkKeyer                               /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ (REFIID){0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3}
-#define IID_IDeckLinkVideoConversion                     /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ (REFIID){0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A}
-#define IID_IDeckLinkDeckControlStatusCallback           /* E5F693C1-4283-4716-B18F-C1431521955B */ (REFIID){0xE5,0xF6,0x93,0xC1,0x42,0x83,0x47,0x16,0xB1,0x8F,0xC1,0x43,0x15,0x21,0x95,0x5B}
-#define IID_IDeckLinkDeckControl                         /* 522A9E39-0F3C-4742-94EE-D80DE335DA1D */ (REFIID){0x52,0x2A,0x9E,0x39,0x0F,0x3C,0x47,0x42,0x94,0xEE,0xD8,0x0D,0xE3,0x35,0xDA,0x1D}
-
-
-/* Enum BMDDisplayMode - Video display modes */
-
-typedef uint32_t BMDDisplayMode;
-enum _BMDDisplayMode {
-
-    /* SD Modes */
-
-    bmdModeNTSC                                        = /* 'ntsc' */ 0x6E747363,
-    bmdModeNTSC2398                                    = /* 'nt23' */ 0x6E743233,	// 3:2 pulldown
-    bmdModePAL                                         = /* 'pal ' */ 0x70616C20,
-    bmdModeNTSCp                                       = /* 'ntsp' */ 0x6E747370,
-    bmdModePALp                                        = /* 'palp' */ 0x70616C70,
-
-    /* HD 1080 Modes */
-
-    bmdModeHD1080p2398                                 = /* '23ps' */ 0x32337073,
-    bmdModeHD1080p24                                   = /* '24ps' */ 0x32347073,
-    bmdModeHD1080p25                                   = /* 'Hp25' */ 0x48703235,
-    bmdModeHD1080p2997                                 = /* 'Hp29' */ 0x48703239,
-    bmdModeHD1080p30                                   = /* 'Hp30' */ 0x48703330,
-    bmdModeHD1080i50                                   = /* 'Hi50' */ 0x48693530,
-    bmdModeHD1080i5994                                 = /* 'Hi59' */ 0x48693539,
-    bmdModeHD1080i6000                                 = /* 'Hi60' */ 0x48693630,	// N.B. This _really_ is 60.00 Hz.
-    bmdModeHD1080p50                                   = /* 'Hp50' */ 0x48703530,
-    bmdModeHD1080p5994                                 = /* 'Hp59' */ 0x48703539,
-    bmdModeHD1080p6000                                 = /* 'Hp60' */ 0x48703630,	// N.B. This _really_ is 60.00 Hz.
-
-    /* HD 720 Modes */
-
-    bmdModeHD720p50                                    = /* 'hp50' */ 0x68703530,
-    bmdModeHD720p5994                                  = /* 'hp59' */ 0x68703539,
-    bmdModeHD720p60                                    = /* 'hp60' */ 0x68703630,
-
-    /* 2k Modes */
-
-    bmdMode2k2398                                      = /* '2k23' */ 0x326B3233,
-    bmdMode2k24                                        = /* '2k24' */ 0x326B3234,
-    bmdMode2k25                                        = /* '2k25' */ 0x326B3235
-};
-
-
-/* Enum BMDFieldDominance - Video field dominance */
-
-typedef uint32_t BMDFieldDominance;
-enum _BMDFieldDominance {
-    bmdUnknownFieldDominance                           = 0,
-    bmdLowerFieldFirst                                 = /* 'lowr' */ 0x6C6F7772,
-    bmdUpperFieldFirst                                 = /* 'uppr' */ 0x75707072,
-    bmdProgressiveFrame                                = /* 'prog' */ 0x70726F67,
-    bmdProgressiveSegmentedFrame                       = /* 'psf ' */ 0x70736620
-};
-
-
-/* Enum BMDPixelFormat - Video pixel formats supported for output/input */
-
-typedef uint32_t BMDPixelFormat;
-enum _BMDPixelFormat {
-    bmdFormat8BitYUV                                   = /* '2vuy' */ 0x32767579,
-    bmdFormat10BitYUV                                  = /* 'v210' */ 0x76323130,
-    bmdFormat8BitARGB                                  = 32,
-    bmdFormat8BitBGRA                                  = /* 'BGRA' */ 0x42475241,
-    bmdFormat10BitRGB                                  = /* 'r210' */ 0x72323130	// Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
-};
-
-
-/* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */
-
-typedef uint32_t BMDDisplayModeFlags;
-enum _BMDDisplayModeFlags {
-    bmdDisplayModeSupports3D                           = 1 << 0,
-    bmdDisplayModeColorspaceRec601                     = 1 << 1,
-    bmdDisplayModeColorspaceRec709                     = 1 << 2
-};
-
+BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback                 = /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ {0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE};
+BMD_CONST REFIID IID_IDeckLinkInputCallback                       = /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ {0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A};
+BMD_CONST REFIID IID_IDeckLinkMemoryAllocator                     = /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ {0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8};
+BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback                 = /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ {0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6};
+BMD_CONST REFIID IID_IDeckLinkIterator                            = /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ {0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA};
+BMD_CONST REFIID IID_IDeckLinkAPIInformation                      = /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ {0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4};
+BMD_CONST REFIID IID_IDeckLinkOutput                              = /* CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564 */ {0xCC,0x5C,0x8A,0x6E,0x3F,0x2F,0x4B,0x3A,0x87,0xEA,0xFD,0x78,0xAF,0x30,0x05,0x64};
+BMD_CONST REFIID IID_IDeckLinkInput                               = /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95};
+BMD_CONST REFIID IID_IDeckLinkVideoFrame                          = /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ {0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17};
+BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame                   = /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ {0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90};
+BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions              = /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ {0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7};
+BMD_CONST REFIID IID_IDeckLinkVideoInputFrame                     = /* 05CFE374-537C-4094-9A57-680525118F44 */ {0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44};
+BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary                 = /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ {0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04};
+BMD_CONST REFIID IID_IDeckLinkAudioInputPacket                    = /* E43D5870-2894-11DE-8C30-0800200C9A66 */ {0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66};
+BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback               = /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ {0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38};
+BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper               = /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ {0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F};
+BMD_CONST REFIID IID_IDeckLinkNotificationCallback                = /* B002A1EC-070D-4288-8289-BD5D36E5FF0D */ {0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D};
+BMD_CONST REFIID IID_IDeckLinkNotification                        = /* 0A1FB207-E215-441B-9B19-6FA1575946C5 */ {0x0A,0x1F,0xB2,0x07,0xE2,0x15,0x44,0x1B,0x9B,0x19,0x6F,0xA1,0x57,0x59,0x46,0xC5};
+BMD_CONST REFIID IID_IDeckLinkAttributes                          = /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ {0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4};
+BMD_CONST REFIID IID_IDeckLinkKeyer                               = /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ {0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3};
+BMD_CONST REFIID IID_IDeckLinkVideoConversion                     = /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ {0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A};
+BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback          = /* 4997053B-0ADF-4CC8-AC70-7A50C4BE728F */ {0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F};
+BMD_CONST REFIID IID_IDeckLinkDiscovery                           = /* CDBF631C-BC76-45FA-B44D-C55059BC6101 */ {0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01};
 
 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
 
 typedef uint32_t BMDVideoOutputFlags;
 enum _BMDVideoOutputFlags {
-    bmdVideoOutputFlagDefault                          = 0,
-    bmdVideoOutputVANC                                 = 1 << 0,
-    bmdVideoOutputVITC                                 = 1 << 1,
-    bmdVideoOutputRP188                                = 1 << 2,
-    bmdVideoOutputDualStream3D                         = 1 << 4
+    bmdVideoOutputFlagDefault                                    = 0,
+    bmdVideoOutputVANC                                           = 1 << 0,
+    bmdVideoOutputVITC                                           = 1 << 1,
+    bmdVideoOutputRP188                                          = 1 << 2,
+    bmdVideoOutputDualStream3D                                   = 1 << 4
 };
 
-
 /* Enum BMDFrameFlags - Frame flags */
 
 typedef uint32_t BMDFrameFlags;
 enum _BMDFrameFlags {
-    bmdFrameFlagDefault                                = 0,
-    bmdFrameFlagFlipVertical                           = 1 << 0,
+    bmdFrameFlagDefault                                          = 0,
+    bmdFrameFlagFlipVertical                                     = 1 << 0,
 
     /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
 
-    bmdFrameHasNoInputSource                           = 1 << 31
+    bmdFrameHasNoInputSource                                     = 1 << 31
 };
 
-
 /* Enum BMDVideoInputFlags - Flags applicable to video input */
 
 typedef uint32_t BMDVideoInputFlags;
 enum _BMDVideoInputFlags {
-    bmdVideoInputFlagDefault                           = 0,
-    bmdVideoInputEnableFormatDetection                 = 1 << 0,
-    bmdVideoInputDualStream3D                          = 1 << 1
+    bmdVideoInputFlagDefault                                     = 0,
+    bmdVideoInputEnableFormatDetection                           = 1 << 0,
+    bmdVideoInputDualStream3D                                    = 1 << 1
 };
 
-
 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
 
 typedef uint32_t BMDVideoInputFormatChangedEvents;
 enum _BMDVideoInputFormatChangedEvents {
-    bmdVideoInputDisplayModeChanged                    = 1 << 0,
-    bmdVideoInputFieldDominanceChanged                 = 1 << 1,
-    bmdVideoInputColorspaceChanged                     = 1 << 2
+    bmdVideoInputDisplayModeChanged                              = 1 << 0,
+    bmdVideoInputFieldDominanceChanged                           = 1 << 1,
+    bmdVideoInputColorspaceChanged                               = 1 << 2
 };
 
-
 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
 
 typedef uint32_t BMDDetectedVideoInputFormatFlags;
 enum _BMDDetectedVideoInputFormatFlags {
-    bmdDetectedVideoInputYCbCr422                      = 1 << 0,
-    bmdDetectedVideoInputRGB444                        = 1 << 1
+    bmdDetectedVideoInputYCbCr422                                = 1 << 0,
+    bmdDetectedVideoInputRGB444                                  = 1 << 1,
+    bmdDetectedVideoInputDualStream3D                            = 1 << 2
 };
 
+/* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
+
+typedef uint32_t BMDDeckLinkCapturePassthroughMode;
+enum _BMDDeckLinkCapturePassthroughMode {
+    bmdDeckLinkCapturePassthroughModeDirect                      = /* 'pdir' */ 0x70646972,
+    bmdDeckLinkCapturePassthroughModeCleanSwitch                 = /* 'pcln' */ 0x70636C6E
+};
 
 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
 
 typedef uint32_t BMDOutputFrameCompletionResult;
 enum _BMDOutputFrameCompletionResult {
-    bmdOutputFrameCompleted,                          
-    bmdOutputFrameDisplayedLate,                      
-    bmdOutputFrameDropped,                            
-    bmdOutputFrameFlushed                             
+    bmdOutputFrameCompleted,                                    
+    bmdOutputFrameDisplayedLate,                                
+    bmdOutputFrameDropped,                                      
+    bmdOutputFrameFlushed                                       
 };
 
-
 /* Enum BMDReferenceStatus - GenLock input status */
 
 typedef uint32_t BMDReferenceStatus;
 enum _BMDReferenceStatus {
-    bmdReferenceNotSupportedByHardware                 = 1 << 0,
-    bmdReferenceLocked                                 = 1 << 1
+    bmdReferenceNotSupportedByHardware                           = 1 << 0,
+    bmdReferenceLocked                                           = 1 << 1
 };
 
-
 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
 
 typedef uint32_t BMDAudioSampleRate;
 enum _BMDAudioSampleRate {
-    bmdAudioSampleRate48kHz                            = 48000
+    bmdAudioSampleRate48kHz                                      = 48000
 };
 
-
 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
 
 typedef uint32_t BMDAudioSampleType;
 enum _BMDAudioSampleType {
-    bmdAudioSampleType16bitInteger                     = 16,
-    bmdAudioSampleType32bitInteger                     = 32
+    bmdAudioSampleType16bitInteger                               = 16,
+    bmdAudioSampleType32bitInteger                               = 32
 };
 
-
 /* Enum BMDAudioOutputStreamType - Audio output stream type */
 
 typedef uint32_t BMDAudioOutputStreamType;
 enum _BMDAudioOutputStreamType {
-    bmdAudioOutputStreamContinuous,                   
-    bmdAudioOutputStreamContinuousDontResample,       
-    bmdAudioOutputStreamTimestamped                   
+    bmdAudioOutputStreamContinuous,                             
+    bmdAudioOutputStreamContinuousDontResample,                 
+    bmdAudioOutputStreamTimestamped                             
 };
 
-
 /* Enum BMDDisplayModeSupport - Output mode supported flags */
 
 typedef uint32_t BMDDisplayModeSupport;
 enum _BMDDisplayModeSupport {
-    bmdDisplayModeNotSupported                         = 0,
-    bmdDisplayModeSupported,                          
-    bmdDisplayModeSupportedWithConversion             
+    bmdDisplayModeNotSupported                                   = 0,
+    bmdDisplayModeSupported,                                    
+    bmdDisplayModeSupportedWithConversion                       
 };
 
-
 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
 
 typedef uint32_t BMDTimecodeFormat;
 enum _BMDTimecodeFormat {
-    bmdTimecodeRP188                                   = /* 'rp18' */ 0x72703138,
-    bmdTimecodeRP188Field2                             = /* 'rp12' */ 0x72703132,
-    bmdTimecodeVITC                                    = /* 'vitc' */ 0x76697463,
-    bmdTimecodeVITCField2                              = /* 'vit2' */ 0x76697432,
-    bmdTimecodeSerial                                  = /* 'seri' */ 0x73657269
+    bmdTimecodeRP188VITC1                                        = /* 'rpv1' */ 0x72707631,	// RP188 timecode where DBB1 equals VITC1 (line 9)
+    bmdTimecodeRP188VITC2                                        = /* 'rp12' */ 0x72703132,	// RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
+    bmdTimecodeRP188LTC                                          = /* 'rplt' */ 0x72706C74,	// RP188 timecode where DBB1 equals LTC (line 10)
+    bmdTimecodeRP188Any                                          = /* 'rp18' */ 0x72703138,	// For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
+    bmdTimecodeVITC                                              = /* 'vitc' */ 0x76697463,
+    bmdTimecodeVITCField2                                        = /* 'vit2' */ 0x76697432,
+    bmdTimecodeSerial                                            = /* 'seri' */ 0x73657269
 };
 
-
-/* Enum BMDTimecodeFlags - Timecode flags */
-
-typedef uint32_t BMDTimecodeFlags;
-enum _BMDTimecodeFlags {
-    bmdTimecodeFlagDefault                             = 0,
-    bmdTimecodeIsDropFrame                             = 1 << 0
-};
-
-
-/* Enum BMDVideoConnection - Video connection types */
-
-typedef uint32_t BMDVideoConnection;
-enum _BMDVideoConnection {
-    bmdVideoConnectionSDI                              = 1 << 0,
-    bmdVideoConnectionHDMI                             = 1 << 1,
-    bmdVideoConnectionOpticalSDI                       = 1 << 2,
-    bmdVideoConnectionComponent                        = 1 << 3,
-    bmdVideoConnectionComposite                        = 1 << 4,
-    bmdVideoConnectionSVideo                           = 1 << 5
-};
-
-
 /* Enum BMDAnalogVideoFlags - Analog video display flags */
 
 typedef uint32_t BMDAnalogVideoFlags;
 enum _BMDAnalogVideoFlags {
-    bmdAnalogVideoFlagCompositeSetup75                 = 1 << 0,
-    bmdAnalogVideoFlagComponentBetacamLevels           = 1 << 1
+    bmdAnalogVideoFlagCompositeSetup75                           = 1 << 0,
+    bmdAnalogVideoFlagComponentBetacamLevels                     = 1 << 1
 };
 
-
-/* Enum BMDAudioConnection - Audio connection types */
-
-typedef uint32_t BMDAudioConnection;
-enum _BMDAudioConnection {
-    bmdAudioConnectionEmbedded                         = /* 'embd' */ 0x656D6264,
-    bmdAudioConnectionAESEBU                           = /* 'aes ' */ 0x61657320,
-    bmdAudioConnectionAnalog                           = /* 'anlg' */ 0x616E6C67
-};
-
-
 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
 
 typedef uint32_t BMDAudioOutputAnalogAESSwitch;
 enum _BMDAudioOutputAnalogAESSwitch {
-    bmdAudioOutputSwitchAESEBU                         = /* 'aes ' */ 0x61657320,
-    bmdAudioOutputSwitchAnalog                         = /* 'anlg' */ 0x616E6C67
+    bmdAudioOutputSwitchAESEBU                                   = /* 'aes ' */ 0x61657320,
+    bmdAudioOutputSwitchAnalog                                   = /* 'anlg' */ 0x616E6C67
 };
 
-
 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
 
 typedef uint32_t BMDVideoOutputConversionMode;
 enum _BMDVideoOutputConversionMode {
-    bmdNoVideoOutputConversion                         = /* 'none' */ 0x6E6F6E65,
-    bmdVideoOutputLetterboxDownconversion              = /* 'ltbx' */ 0x6C746278,
-    bmdVideoOutputAnamorphicDownconversion             = /* 'amph' */ 0x616D7068,
-    bmdVideoOutputHD720toHD1080Conversion              = /* '720c' */ 0x37323063,
-    bmdVideoOutputHardwareLetterboxDownconversion      = /* 'HWlb' */ 0x48576C62,
-    bmdVideoOutputHardwareAnamorphicDownconversion     = /* 'HWam' */ 0x4857616D,
-    bmdVideoOutputHardwareCenterCutDownconversion      = /* 'HWcc' */ 0x48576363,
-    bmdVideoOutputHardware720p1080pCrossconversion     = /* 'xcap' */ 0x78636170,
-    bmdVideoOutputHardwareAnamorphic720pUpconversion   = /* 'ua7p' */ 0x75613770,
-    bmdVideoOutputHardwareAnamorphic1080iUpconversion  = /* 'ua1i' */ 0x75613169,
-    bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
-    bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
-    bmdVideoOutputHardwarePillarbox720pUpconversion    = /* 'up7p' */ 0x75703770,
-    bmdVideoOutputHardwarePillarbox1080iUpconversion   = /* 'up1i' */ 0x75703169
+    bmdNoVideoOutputConversion                                   = /* 'none' */ 0x6E6F6E65,
+    bmdVideoOutputLetterboxDownconversion                        = /* 'ltbx' */ 0x6C746278,
+    bmdVideoOutputAnamorphicDownconversion                       = /* 'amph' */ 0x616D7068,
+    bmdVideoOutputHD720toHD1080Conversion                        = /* '720c' */ 0x37323063,
+    bmdVideoOutputHardwareLetterboxDownconversion                = /* 'HWlb' */ 0x48576C62,
+    bmdVideoOutputHardwareAnamorphicDownconversion               = /* 'HWam' */ 0x4857616D,
+    bmdVideoOutputHardwareCenterCutDownconversion                = /* 'HWcc' */ 0x48576363,
+    bmdVideoOutputHardware720p1080pCrossconversion               = /* 'xcap' */ 0x78636170,
+    bmdVideoOutputHardwareAnamorphic720pUpconversion             = /* 'ua7p' */ 0x75613770,
+    bmdVideoOutputHardwareAnamorphic1080iUpconversion            = /* 'ua1i' */ 0x75613169,
+    bmdVideoOutputHardwareAnamorphic149To720pUpconversion        = /* 'u47p' */ 0x75343770,
+    bmdVideoOutputHardwareAnamorphic149To1080iUpconversion       = /* 'u41i' */ 0x75343169,
+    bmdVideoOutputHardwarePillarbox720pUpconversion              = /* 'up7p' */ 0x75703770,
+    bmdVideoOutputHardwarePillarbox1080iUpconversion             = /* 'up1i' */ 0x75703169
 };
 
-
 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
 
 typedef uint32_t BMDVideoInputConversionMode;
 enum _BMDVideoInputConversionMode {
-    bmdNoVideoInputConversion                          = /* 'none' */ 0x6E6F6E65,
-    bmdVideoInputLetterboxDownconversionFromHD1080     = /* '10lb' */ 0x31306C62,
-    bmdVideoInputAnamorphicDownconversionFromHD1080    = /* '10am' */ 0x3130616D,
-    bmdVideoInputLetterboxDownconversionFromHD720      = /* '72lb' */ 0x37326C62,
-    bmdVideoInputAnamorphicDownconversionFromHD720     = /* '72am' */ 0x3732616D,
-    bmdVideoInputLetterboxUpconversion                 = /* 'lbup' */ 0x6C627570,
-    bmdVideoInputAnamorphicUpconversion                = /* 'amup' */ 0x616D7570
+    bmdNoVideoInputConversion                                    = /* 'none' */ 0x6E6F6E65,
+    bmdVideoInputLetterboxDownconversionFromHD1080               = /* '10lb' */ 0x31306C62,
+    bmdVideoInputAnamorphicDownconversionFromHD1080              = /* '10am' */ 0x3130616D,
+    bmdVideoInputLetterboxDownconversionFromHD720                = /* '72lb' */ 0x37326C62,
+    bmdVideoInputAnamorphicDownconversionFromHD720               = /* '72am' */ 0x3732616D,
+    bmdVideoInputLetterboxUpconversion                           = /* 'lbup' */ 0x6C627570,
+    bmdVideoInputAnamorphicUpconversion                          = /* 'amup' */ 0x616D7570
 };
 
-
 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
 
 typedef uint32_t BMDVideo3DPackingFormat;
 enum _BMDVideo3DPackingFormat {
-    bmdVideo3DPackingSidebySideHalf                    = /* 'sbsh' */ 0x73627368,
-    bmdVideo3DPackingLinebyLine                        = /* 'lbyl' */ 0x6C62796C,
-    bmdVideo3DPackingTopAndBottom                      = /* 'tabo' */ 0x7461626F,
-    bmdVideo3DPackingFramePacking                      = /* 'frpk' */ 0x6672706B,
-    bmdVideo3DPackingLeftOnly                          = /* 'left' */ 0x6C656674,
-    bmdVideo3DPackingRightOnly                         = /* 'righ' */ 0x72696768
+    bmdVideo3DPackingSidebySideHalf                              = /* 'sbsh' */ 0x73627368,
+    bmdVideo3DPackingLinebyLine                                  = /* 'lbyl' */ 0x6C62796C,
+    bmdVideo3DPackingTopAndBottom                                = /* 'tabo' */ 0x7461626F,
+    bmdVideo3DPackingFramePacking                                = /* 'frpk' */ 0x6672706B,
+    bmdVideo3DPackingLeftOnly                                    = /* 'left' */ 0x6C656674,
+    bmdVideo3DPackingRightOnly                                   = /* 'righ' */ 0x72696768
 };
 
-
 /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
 
 typedef uint32_t BMDIdleVideoOutputOperation;
 enum _BMDIdleVideoOutputOperation {
-    bmdIdleVideoOutputBlack                            = /* 'blac' */ 0x626C6163,
-    bmdIdleVideoOutputLastFrame                        = /* 'lafa' */ 0x6C616661
+    bmdIdleVideoOutputBlack                                      = /* 'blac' */ 0x626C6163,
+    bmdIdleVideoOutputLastFrame                                  = /* 'lafa' */ 0x6C616661,
+    bmdIdleVideoOutputDesktop                                    = /* 'desk' */ 0x6465736B
 };
 
-
-/* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
-
-typedef uint32_t BMDDeckLinkConfigurationID;
-enum _BMDDeckLinkConfigurationID {
-
-    /* Serial port Flags */
-
-    bmdDeckLinkConfigSwapSerialRxTx                    = /* 'ssrt' */ 0x73737274,
-
-    /* Video Input/Output Flags */
-
-    bmdDeckLinkConfigUse1080pNotPsF                    = /* 'fpro' */ 0x6670726F,
-
-    /* Video Input/Output Integers */
-
-    bmdDeckLinkConfigHDMI3DPackingFormat               = /* '3dpf' */ 0x33647066,
-    bmdDeckLinkConfigBypass                            = /* 'byps' */ 0x62797073,
-
-    /* Audio Input/Output Flags */
-
-    bmdDeckLinkConfigAnalogAudioConsumerLevels         = /* 'aacl' */ 0x6161636C,
-
-    /* Video output flags */
-
-    bmdDeckLinkConfigFieldFlickerRemoval               = /* 'fdfr' */ 0x66646672,
-    bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion  = /* 'to59' */ 0x746F3539,
-    bmdDeckLinkConfig444SDIVideoOutput                 = /* '444o' */ 0x3434346F,
-    bmdDeckLinkConfig3GBpsVideoOutput                  = /* '3gbs' */ 0x33676273,
-    bmdDeckLinkConfigBlackVideoOutputDuringCapture     = /* 'bvoc' */ 0x62766F63,
-    bmdDeckLinkConfigLowLatencyVideoOutput             = /* 'llvo' */ 0x6C6C766F,
-
-    /* Video Output Integers */
-
-    bmdDeckLinkConfigVideoOutputConnection             = /* 'vocn' */ 0x766F636E,
-    bmdDeckLinkConfigVideoOutputConversionMode         = /* 'vocm' */ 0x766F636D,
-    bmdDeckLinkConfigAnalogVideoOutputFlags            = /* 'avof' */ 0x61766F66,
-    bmdDeckLinkConfigReferenceInputTimingOffset        = /* 'glot' */ 0x676C6F74,
-    bmdDeckLinkConfigVideoOutputIdleOperation          = /* 'voio' */ 0x766F696F,
-
-    /* Video Output Floats */
-
-    bmdDeckLinkConfigVideoOutputComponentLumaGain      = /* 'oclg' */ 0x6F636C67,
-    bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = /* 'occb' */ 0x6F636362,
-    bmdDeckLinkConfigVideoOutputComponentChromaRedGain = /* 'occr' */ 0x6F636372,
-    bmdDeckLinkConfigVideoOutputCompositeLumaGain      = /* 'oilg' */ 0x6F696C67,
-    bmdDeckLinkConfigVideoOutputCompositeChromaGain    = /* 'oicg' */ 0x6F696367,
-    bmdDeckLinkConfigVideoOutputSVideoLumaGain         = /* 'oslg' */ 0x6F736C67,
-    bmdDeckLinkConfigVideoOutputSVideoChromaGain       = /* 'oscg' */ 0x6F736367,
-
-    /* Video Input Integers */
-
-    bmdDeckLinkConfigVideoInputConnection              = /* 'vicn' */ 0x7669636E,
-    bmdDeckLinkConfigAnalogVideoInputFlags             = /* 'avif' */ 0x61766966,
-    bmdDeckLinkConfigVideoInputConversionMode          = /* 'vicm' */ 0x7669636D,
-    bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = /* 'pdif' */ 0x70646966,
-    bmdDeckLinkConfigVANCSourceLine1Mapping            = /* 'vsl1' */ 0x76736C31,
-    bmdDeckLinkConfigVANCSourceLine2Mapping            = /* 'vsl2' */ 0x76736C32,
-    bmdDeckLinkConfigVANCSourceLine3Mapping            = /* 'vsl3' */ 0x76736C33,
-
-    /* Video Input Floats */
-
-    bmdDeckLinkConfigVideoInputComponentLumaGain       = /* 'iclg' */ 0x69636C67,
-    bmdDeckLinkConfigVideoInputComponentChromaBlueGain = /* 'iccb' */ 0x69636362,
-    bmdDeckLinkConfigVideoInputComponentChromaRedGain  = /* 'iccr' */ 0x69636372,
-    bmdDeckLinkConfigVideoInputCompositeLumaGain       = /* 'iilg' */ 0x69696C67,
-    bmdDeckLinkConfigVideoInputCompositeChromaGain     = /* 'iicg' */ 0x69696367,
-    bmdDeckLinkConfigVideoInputSVideoLumaGain          = /* 'islg' */ 0x69736C67,
-    bmdDeckLinkConfigVideoInputSVideoChromaGain        = /* 'iscg' */ 0x69736367,
-
-    /* Audio Input Integers */
-
-    bmdDeckLinkConfigAudioInputConnection              = /* 'aicn' */ 0x6169636E,
-
-    /* Audio Input Floats */
-
-    bmdDeckLinkConfigAnalogAudioInputScaleChannel1     = /* 'ais1' */ 0x61697331,
-    bmdDeckLinkConfigAnalogAudioInputScaleChannel2     = /* 'ais2' */ 0x61697332,
-    bmdDeckLinkConfigAnalogAudioInputScaleChannel3     = /* 'ais3' */ 0x61697333,
-    bmdDeckLinkConfigAnalogAudioInputScaleChannel4     = /* 'ais4' */ 0x61697334,
-    bmdDeckLinkConfigDigitalAudioInputScale            = /* 'dais' */ 0x64616973,
-
-    /* Audio Output Integers */
-
-    bmdDeckLinkConfigAudioOutputAESAnalogSwitch        = /* 'aoaa' */ 0x616F6161,
-
-    /* Audio Output Floats */
-
-    bmdDeckLinkConfigAnalogAudioOutputScaleChannel1    = /* 'aos1' */ 0x616F7331,
-    bmdDeckLinkConfigAnalogAudioOutputScaleChannel2    = /* 'aos2' */ 0x616F7332,
-    bmdDeckLinkConfigAnalogAudioOutputScaleChannel3    = /* 'aos3' */ 0x616F7333,
-    bmdDeckLinkConfigAnalogAudioOutputScaleChannel4    = /* 'aos4' */ 0x616F7334,
-    bmdDeckLinkConfigDigitalAudioOutputScale           = /* 'daos' */ 0x64616F73
-};
-
-
 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
 
 typedef uint32_t BMDDeckLinkAttributeID;
@@ -480,157 +278,89 @@
 
     /* Flags */
 
-    BMDDeckLinkSupportsInternalKeying                  = /* 'keyi' */ 0x6B657969,
-    BMDDeckLinkSupportsExternalKeying                  = /* 'keye' */ 0x6B657965,
-    BMDDeckLinkSupportsHDKeying                        = /* 'keyh' */ 0x6B657968,
-    BMDDeckLinkSupportsInputFormatDetection            = /* 'infd' */ 0x696E6664,
-    BMDDeckLinkHasReferenceInput                       = /* 'hrin' */ 0x6872696E,
-    BMDDeckLinkHasSerialPort                           = /* 'hspt' */ 0x68737074,
-    BMDDeckLinkHasAnalogVideoOutputGain                = /* 'avog' */ 0x61766F67,
-    BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain     = /* 'ovog' */ 0x6F766F67,
-    BMDDeckLinkHasVideoInputAntiAliasingFilter         = /* 'aafl' */ 0x6161666C,
-    BMDDeckLinkHasBypass                               = /* 'byps' */ 0x62797073,
+    BMDDeckLinkSupportsInternalKeying                            = /* 'keyi' */ 0x6B657969,
+    BMDDeckLinkSupportsExternalKeying                            = /* 'keye' */ 0x6B657965,
+    BMDDeckLinkSupportsHDKeying                                  = /* 'keyh' */ 0x6B657968,
+    BMDDeckLinkSupportsInputFormatDetection                      = /* 'infd' */ 0x696E6664,
+    BMDDeckLinkHasReferenceInput                                 = /* 'hrin' */ 0x6872696E,
+    BMDDeckLinkHasSerialPort                                     = /* 'hspt' */ 0x68737074,
+    BMDDeckLinkHasAnalogVideoOutputGain                          = /* 'avog' */ 0x61766F67,
+    BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain               = /* 'ovog' */ 0x6F766F67,
+    BMDDeckLinkHasVideoInputAntiAliasingFilter                   = /* 'aafl' */ 0x6161666C,
+    BMDDeckLinkHasBypass                                         = /* 'byps' */ 0x62797073,
+    BMDDeckLinkSupportsDesktopDisplay                            = /* 'extd' */ 0x65787464,
+    BMDDeckLinkSupportsClockTimingAdjustment                     = /* 'ctad' */ 0x63746164,
+    BMDDeckLinkSupportsFullDuplex                                = /* 'fdup' */ 0x66647570,
+    BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset       = /* 'frin' */ 0x6672696E,
 
     /* Integers */
 
-    BMDDeckLinkMaximumAudioChannels                    = /* 'mach' */ 0x6D616368,
-    BMDDeckLinkNumberOfSubDevices                      = /* 'nsbd' */ 0x6E736264,
-    BMDDeckLinkSubDeviceIndex                          = /* 'subi' */ 0x73756269,
-    BMDDeckLinkVideoOutputConnections                  = /* 'vocn' */ 0x766F636E,
-    BMDDeckLinkVideoInputConnections                   = /* 'vicn' */ 0x7669636E,
+    BMDDeckLinkMaximumAudioChannels                              = /* 'mach' */ 0x6D616368,
+    BMDDeckLinkMaximumAnalogAudioChannels                        = /* 'aach' */ 0x61616368,
+    BMDDeckLinkNumberOfSubDevices                                = /* 'nsbd' */ 0x6E736264,
+    BMDDeckLinkSubDeviceIndex                                    = /* 'subi' */ 0x73756269,
+    BMDDeckLinkPersistentID                                      = /* 'peid' */ 0x70656964,
+    BMDDeckLinkTopologicalID                                     = /* 'toid' */ 0x746F6964,
+    BMDDeckLinkVideoOutputConnections                            = /* 'vocn' */ 0x766F636E,
+    BMDDeckLinkVideoInputConnections                             = /* 'vicn' */ 0x7669636E,
+    BMDDeckLinkAudioOutputConnections                            = /* 'aocn' */ 0x616F636E,
+    BMDDeckLinkAudioInputConnections                             = /* 'aicn' */ 0x6169636E,
+    BMDDeckLinkDeviceBusyState                                   = /* 'dbst' */ 0x64627374,
+    BMDDeckLinkVideoIOSupport                                    = /* 'vios' */ 0x76696F73,	// Returns a BMDVideoIOSupport bit field
 
     /* Floats */
 
-    BMDDeckLinkVideoInputGainMinimum                   = /* 'vigm' */ 0x7669676D,
-    BMDDeckLinkVideoInputGainMaximum                   = /* 'vigx' */ 0x76696778,
-    BMDDeckLinkVideoOutputGainMinimum                  = /* 'vogm' */ 0x766F676D,
-    BMDDeckLinkVideoOutputGainMaximum                  = /* 'vogx' */ 0x766F6778,
+    BMDDeckLinkVideoInputGainMinimum                             = /* 'vigm' */ 0x7669676D,
+    BMDDeckLinkVideoInputGainMaximum                             = /* 'vigx' */ 0x76696778,
+    BMDDeckLinkVideoOutputGainMinimum                            = /* 'vogm' */ 0x766F676D,
+    BMDDeckLinkVideoOutputGainMaximum                            = /* 'vogx' */ 0x766F6778,
 
     /* Strings */
 
-    BMDDeckLinkSerialPortDeviceName                    = /* 'slpn' */ 0x736C706E
+    BMDDeckLinkSerialPortDeviceName                              = /* 'slpn' */ 0x736C706E
 };
 
-
 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
 
 typedef uint32_t BMDDeckLinkAPIInformationID;
 enum _BMDDeckLinkAPIInformationID {
-    BMDDeckLinkAPIVersion                              = /* 'vers' */ 0x76657273
+    BMDDeckLinkAPIVersion                                        = /* 'vers' */ 0x76657273
 };
 
+/* Enum BMDDeviceBusyState - Current device busy state */
 
-/* Enum BMDDeckControlMode - DeckControl mode */
-
-typedef uint32_t BMDDeckControlMode;
-enum _BMDDeckControlMode {
-    bmdDeckControlNotOpened                            = /* 'ntop' */ 0x6E746F70,
-    bmdDeckControlVTRControlMode                       = /* 'vtrc' */ 0x76747263,
-    bmdDeckControlExportMode                           = /* 'expm' */ 0x6578706D,
-    bmdDeckControlCaptureMode                          = /* 'capm' */ 0x6361706D
+typedef uint32_t BMDDeviceBusyState;
+enum _BMDDeviceBusyState {
+    bmdDeviceCaptureBusy                                         = 1 << 0,
+    bmdDevicePlaybackBusy                                        = 1 << 1,
+    bmdDeviceSerialPortBusy                                      = 1 << 2
 };
 
+/* Enum BMDVideoIOSupport - Device video input/output support */
 
-/* Enum BMDDeckControlEvent - DeckControl event */
-
-typedef uint32_t BMDDeckControlEvent;
-enum _BMDDeckControlEvent {
-    bmdDeckControlAbortedEvent                         = /* 'abte' */ 0x61627465,	// This event is triggered when a capture or edit-to-tape operation is aborted.
-
-    /* Export-To-Tape events */
-
-    bmdDeckControlPrepareForExportEvent                = /* 'pfee' */ 0x70666565,	// This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point.
-    bmdDeckControlExportCompleteEvent                  = /* 'exce' */ 0x65786365,	// This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback.
-
-    /* Capture events */
-
-    bmdDeckControlPrepareForCaptureEvent               = /* 'pfce' */ 0x70666365,	// This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid.
-    bmdDeckControlCaptureCompleteEvent                 = /* 'ccev' */ 0x63636576	// This event is triggered a few frames after reaching the out-point.
+typedef uint32_t BMDVideoIOSupport;
+enum _BMDVideoIOSupport {
+    bmdDeviceSupportsCapture                                     = 1 << 0,
+    bmdDeviceSupportsPlayback                                    = 1 << 1
 };
 
-
-/* Enum BMDDeckControlVTRControlState - VTR Control state */
-
-typedef uint32_t BMDDeckControlVTRControlState;
-enum _BMDDeckControlVTRControlState {
-    bmdDeckControlNotInVTRControlMode                  = /* 'nvcm' */ 0x6E76636D,
-    bmdDeckControlVTRControlPlaying                    = /* 'vtrp' */ 0x76747270,
-    bmdDeckControlVTRControlRecording                  = /* 'vtrr' */ 0x76747272,
-    bmdDeckControlVTRControlStill                      = /* 'vtra' */ 0x76747261,
-    bmdDeckControlVTRControlSeeking                    = /* 'vtrs' */ 0x76747273,
-    bmdDeckControlVTRControlStopped                    = /* 'vtro' */ 0x7674726F
-};
-
-
-/* Enum BMDDeckControlStatusFlags - Deck Control status flags */
-
-typedef uint32_t BMDDeckControlStatusFlags;
-enum _BMDDeckControlStatusFlags {
-    bmdDeckControlStatusDeckConnected                  = 1 << 0,
-    bmdDeckControlStatusRemoteMode                     = 1 << 1,
-    bmdDeckControlStatusRecordInhibited                = 1 << 2,
-    bmdDeckControlStatusCassetteOut                    = 1 << 3
-};
-
-
-/* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */
-
-typedef uint32_t BMDDeckControlExportModeOpsFlags;
-enum _BMDDeckControlExportModeOpsFlags {
-    bmdDeckControlExportModeInsertVideo                = 1 << 0,
-    bmdDeckControlExportModeInsertAudio1               = 1 << 1,
-    bmdDeckControlExportModeInsertAudio2               = 1 << 2,
-    bmdDeckControlExportModeInsertAudio3               = 1 << 3,
-    bmdDeckControlExportModeInsertAudio4               = 1 << 4,
-    bmdDeckControlExportModeInsertAudio5               = 1 << 5,
-    bmdDeckControlExportModeInsertAudio6               = 1 << 6,
-    bmdDeckControlExportModeInsertAudio7               = 1 << 7,
-    bmdDeckControlExportModeInsertAudio8               = 1 << 8,
-    bmdDeckControlExportModeInsertAudio9               = 1 << 9,
-    bmdDeckControlExportModeInsertAudio10              = 1 << 10,
-    bmdDeckControlExportModeInsertAudio11              = 1 << 11,
-    bmdDeckControlExportModeInsertAudio12              = 1 << 12,
-    bmdDeckControlExportModeInsertTimeCode             = 1 << 13,
-    bmdDeckControlExportModeInsertAssemble             = 1 << 14,
-    bmdDeckControlExportModeInsertPreview              = 1 << 15,
-    bmdDeckControlUseManualExport                      = 1 << 16
-};
-
-
-/* Enum BMDDeckControlError - Deck Control error */
-
-typedef uint32_t BMDDeckControlError;
-enum _BMDDeckControlError {
-    bmdDeckControlNoError                              = /* 'noer' */ 0x6E6F6572,
-    bmdDeckControlModeError                            = /* 'moer' */ 0x6D6F6572,
-    bmdDeckControlMissedInPointError                   = /* 'mier' */ 0x6D696572,
-    bmdDeckControlDeckTimeoutError                     = /* 'dter' */ 0x64746572,
-    bmdDeckControlCommandFailedError                   = /* 'cfer' */ 0x63666572,
-    bmdDeckControlDeviceAlreadyOpenedError             = /* 'dalo' */ 0x64616C6F,
-    bmdDeckControlFailedToOpenDeviceError              = /* 'fder' */ 0x66646572,
-    bmdDeckControlInLocalModeError                     = /* 'lmer' */ 0x6C6D6572,
-    bmdDeckControlEndOfTapeError                       = /* 'eter' */ 0x65746572,
-    bmdDeckControlUserAbortError                       = /* 'uaer' */ 0x75616572,
-    bmdDeckControlNoTapeInDeckError                    = /* 'nter' */ 0x6E746572,
-    bmdDeckControlNoVideoFromCardError                 = /* 'nvfc' */ 0x6E766663,
-    bmdDeckControlNoCommunicationError                 = /* 'ncom' */ 0x6E636F6D,
-    bmdDeckControlBufferTooSmallError                  = /* 'btsm' */ 0x6274736D,
-    bmdDeckControlBadChecksumError                     = /* 'chks' */ 0x63686B73,
-    bmdDeckControlUnknownError                         = /* 'uner' */ 0x756E6572
-};
-
-
 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
 
 typedef uint32_t BMD3DPreviewFormat;
 enum _BMD3DPreviewFormat {
-    bmd3DPreviewFormatDefault                          = /* 'defa' */ 0x64656661,
-    bmd3DPreviewFormatLeftOnly                         = /* 'left' */ 0x6C656674,
-    bmd3DPreviewFormatRightOnly                        = /* 'righ' */ 0x72696768,
-    bmd3DPreviewFormatSideBySide                       = /* 'side' */ 0x73696465,
-    bmd3DPreviewFormatTopBottom                        = /* 'topb' */ 0x746F7062
+    bmd3DPreviewFormatDefault                                    = /* 'defa' */ 0x64656661,
+    bmd3DPreviewFormatLeftOnly                                   = /* 'left' */ 0x6C656674,
+    bmd3DPreviewFormatRightOnly                                  = /* 'righ' */ 0x72696768,
+    bmd3DPreviewFormatSideBySide                                 = /* 'side' */ 0x73696465,
+    bmd3DPreviewFormatTopBottom                                  = /* 'topb' */ 0x746F7062
 };
 
+/* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
+
+typedef uint32_t BMDNotifications;
+enum _BMDNotifications {
+    bmdPreferencesChanged                                        = /* 'pref' */ 0x70726566
+};
 
 #if defined(__cplusplus)
 
@@ -642,12 +372,8 @@
 class IDeckLinkAudioOutputCallback;
 class IDeckLinkIterator;
 class IDeckLinkAPIInformation;
-class IDeckLinkDisplayModeIterator;
-class IDeckLinkDisplayMode;
-class IDeckLink;
 class IDeckLinkOutput;
 class IDeckLinkInput;
-class IDeckLinkTimecode;
 class IDeckLinkVideoFrame;
 class IDeckLinkMutableVideoFrame;
 class IDeckLinkVideoFrame3DExtensions;
@@ -656,13 +382,13 @@
 class IDeckLinkAudioInputPacket;
 class IDeckLinkScreenPreviewCallback;
 class IDeckLinkGLScreenPreviewHelper;
-class IDeckLinkConfiguration;
+class IDeckLinkNotificationCallback;
+class IDeckLinkNotification;
 class IDeckLinkAttributes;
 class IDeckLinkKeyer;
 class IDeckLinkVideoConversion;
-class IDeckLinkDeckControlStatusCallback;
-class IDeckLinkDeckControl;
-
+class IDeckLinkDeviceNotificationCallback;
+class IDeckLinkDiscovery;
 
 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
 
@@ -673,10 +399,9 @@
     virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoOutputCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
 
 class IDeckLinkInputCallback : public IUnknown
@@ -686,10 +411,9 @@
     virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
 
 protected:
-    virtual ~IDeckLinkInputCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
 
 class IDeckLinkMemoryAllocator : public IUnknown
@@ -702,7 +426,6 @@
     virtual HRESULT Decommit (void) = 0;
 };
 
-
 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
 
 class IDeckLinkAudioOutputCallback : public IUnknown
@@ -711,7 +434,6 @@
     virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
 };
 
-
 /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
 
 class IDeckLinkIterator : public IUnknown
@@ -720,7 +442,6 @@
     virtual HRESULT Next (/* out */ IDeckLink **deckLinkInstance) = 0;
 };
 
-
 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
 
 class IDeckLinkAPIInformation : public IUnknown
@@ -732,49 +453,9 @@
     virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ const char **value) = 0;
 
 protected:
-    virtual ~IDeckLinkAPIInformation () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
 };
 
-
-/* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */
-
-class IDeckLinkDisplayModeIterator : public IUnknown
-{
-public:
-    virtual HRESULT Next (/* out */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
-
-protected:
-    virtual ~IDeckLinkDisplayModeIterator () {}; // call Release method to drop reference count
-};
-
-
-/* Interface IDeckLinkDisplayMode - represents a display mode */
-
-class IDeckLinkDisplayMode : public IUnknown
-{
-public:
-    virtual HRESULT GetName (/* out */ const char **name) = 0;
-    virtual BMDDisplayMode GetDisplayMode (void) = 0;
-    virtual long GetWidth (void) = 0;
-    virtual long GetHeight (void) = 0;
-    virtual HRESULT GetFrameRate (/* out */ BMDTimeValue *frameDuration, /* out */ BMDTimeScale *timeScale) = 0;
-    virtual BMDFieldDominance GetFieldDominance (void) = 0;
-    virtual BMDDisplayModeFlags GetFlags (void) = 0;
-
-protected:
-    virtual ~IDeckLinkDisplayMode () {}; // call Release method to drop reference count
-};
-
-
-/* Interface IDeckLink - represents a DeckLink device */
-
-class IDeckLink : public IUnknown
-{
-public:
-    virtual HRESULT GetModelName (/* out */ const char **modelName) = 0;
-};
-
-
 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
 
 class IDeckLinkOutput : public IUnknown
@@ -826,12 +507,12 @@
     /* Hardware Timing */
 
     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
+    virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *frameCompletionTimestamp) = 0;
 
 protected:
-    virtual ~IDeckLinkOutput () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
 
 class IDeckLinkInput : public IUnknown
@@ -847,6 +528,7 @@
     virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
     virtual HRESULT DisableVideoInput (void) = 0;
     virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
+    virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
 
     /* Audio Input */
 
@@ -867,26 +549,9 @@
     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkInput () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkInput () {} // call Release method to drop reference count
 };
 
-
-/* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
-
-class IDeckLinkTimecode : public IUnknown
-{
-public:
-    virtual BMDTimecodeBCD GetBCD (void) = 0;
-    virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
-    virtual HRESULT GetString (/* out */ const char **timecode) = 0;
-    virtual BMDTimecodeFlags GetFlags (void) = 0;
-    virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
-
-protected:
-    virtual ~IDeckLinkTimecode () {}; // call Release method to drop reference count
-};
-
-
 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
 
 class IDeckLinkVideoFrame : public IUnknown
@@ -903,10 +568,9 @@
     virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
 
 class IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
@@ -920,10 +584,9 @@
     virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
 
 protected:
-    virtual ~IDeckLinkMutableVideoFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
 
 class IDeckLinkVideoFrame3DExtensions : public IUnknown
@@ -933,10 +596,9 @@
     virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrame3DExtensions () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
 
 class IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
@@ -946,10 +608,9 @@
     virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoInputFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
 
 class IDeckLinkVideoFrameAncillary : public IUnknown
@@ -961,10 +622,9 @@
     virtual BMDDisplayMode GetDisplayMode (void) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrameAncillary () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
 
 class IDeckLinkAudioInputPacket : public IUnknown
@@ -975,10 +635,9 @@
     virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
 
 protected:
-    virtual ~IDeckLinkAudioInputPacket () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
 
 class IDeckLinkScreenPreviewCallback : public IUnknown
@@ -987,10 +646,9 @@
     virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkScreenPreviewCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
 
 class IDeckLinkGLScreenPreviewHelper : public IUnknown
@@ -1005,29 +663,25 @@
     virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
 
 protected:
-    virtual ~IDeckLinkGLScreenPreviewHelper () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
 };
 
+/* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
 
-/* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
-
-class IDeckLinkConfiguration : public IUnknown
+class IDeckLinkNotificationCallback : public IUnknown
 {
 public:
-    virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
-    virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
-    virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
-    virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
-    virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
-    virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
-    virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0;
-    virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0;
-    virtual HRESULT WriteConfigurationToPreferences (void) = 0;
-
-protected:
-    virtual ~IDeckLinkConfiguration () {}; // call Release method to drop reference count
+    virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
 };
 
+/* Interface IDeckLinkNotification - DeckLink Notification interface */
+
+class IDeckLinkNotification : public IUnknown
+{
+public:
+    virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
+    virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
+};
 
 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
 
@@ -1040,10 +694,9 @@
     virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ const char **value) = 0;
 
 protected:
-    virtual ~IDeckLinkAttributes () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAttributes () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
 
 class IDeckLinkKeyer : public IUnknown
@@ -1056,10 +709,9 @@
     virtual HRESULT Disable (void) = 0;
 
 protected:
-    virtual ~IDeckLinkKeyer () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
 };
 
-
 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
 
 class IDeckLinkVideoConversion : public IUnknown
@@ -1068,80 +720,45 @@
     virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoConversion () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
 };
 
+/* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
 
-/* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */
-
-class IDeckLinkDeckControlStatusCallback : public IUnknown
+class IDeckLinkDeviceNotificationCallback : public IUnknown
 {
 public:
-    virtual HRESULT TimecodeUpdate (/* in */ BMDTimecodeBCD currentTimecode) = 0;
-    virtual HRESULT VTRControlStateChanged (/* in */ BMDDeckControlVTRControlState newState, /* in */ BMDDeckControlError error) = 0;
-    virtual HRESULT DeckControlEventReceived (/* in */ BMDDeckControlEvent event, /* in */ BMDDeckControlError error) = 0;
-    virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
+    virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
+    virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
 
 protected:
-    virtual ~IDeckLinkDeckControlStatusCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
 };
 
+/* Interface IDeckLinkDiscovery - DeckLink device discovery */
 
-/* Interface IDeckLinkDeckControl - Deck Control main interface */
-
-class IDeckLinkDeckControl : public IUnknown
+class IDeckLinkDiscovery : public IUnknown
 {
 public:
-    virtual HRESULT Open (/* in */ BMDTimeScale timeScale, /* in */ BMDTimeValue timeValue, /* in */ bool timecodeIsDropFrame, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Close (/* in */ bool standbyOn) = 0;
-    virtual HRESULT GetCurrentState (/* out */ BMDDeckControlMode *mode, /* out */ BMDDeckControlVTRControlState *vtrControlState, /* out */ BMDDeckControlStatusFlags *flags) = 0;
-    virtual HRESULT SetStandby (/* in */ bool standbyOn) = 0;
-    virtual HRESULT SendCommand (/* in */ uint8_t *inBuffer, /* in */ uint32_t inBufferSize, /* out */ uint8_t *outBuffer, /* out */ uint32_t *outDataSize, /* in */ uint32_t outBufferSize, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Play (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Stop (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT TogglePlayStop (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Eject (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT GoToTimecode (/* in */ BMDTimecodeBCD timecode, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT FastForward (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Rewind (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT StepForward (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT StepBack (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Jog (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Shuttle (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT GetTimecodeString (/* out */ const char **currentTimeCode, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT GetTimecode (/* out */ IDeckLinkTimecode **currentTimecode, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT GetTimecodeBCD (/* out */ BMDTimecodeBCD *currentTimecode, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT SetPreroll (/* in */ uint32_t prerollSeconds) = 0;
-    virtual HRESULT GetPreroll (/* out */ uint32_t *prerollSeconds) = 0;
-    virtual HRESULT SetExportOffset (/* in */ int32_t exportOffsetFields) = 0;
-    virtual HRESULT GetExportOffset (/* out */ int32_t *exportOffsetFields) = 0;
-    virtual HRESULT GetManualExportOffset (/* out */ int32_t *deckManualExportOffsetFields) = 0;
-    virtual HRESULT SetCaptureOffset (/* in */ int32_t captureOffsetFields) = 0;
-    virtual HRESULT GetCaptureOffset (/* out */ int32_t *captureOffsetFields) = 0;
-    virtual HRESULT StartExport (/* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* in */ BMDDeckControlExportModeOpsFlags exportModeOps, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT StartCapture (/* in */ bool useVITC, /* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT GetDeviceID (/* out */ uint16_t *deviceId, /* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT Abort (void) = 0;
-    virtual HRESULT CrashRecordStart (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT CrashRecordStop (/* out */ BMDDeckControlError *error) = 0;
-    virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback *callback) = 0;
+    virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
+    virtual HRESULT UninstallDeviceNotifications (void) = 0;
 
 protected:
-    virtual ~IDeckLinkDeckControl () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
 };
 
-
 /* Functions */
 
 extern "C" {
 
     IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
+    IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void);
     IDeckLinkAPIInformation* CreateDeckLinkAPIInformationInstance (void);
     IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
     IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
 
-};
+}
 
 
 #endif      // defined(__cplusplus)
-#endif      // __DeckLink_API_h__
+#endif /* defined(BMD_DECKLINKAPI_H) */
diff --git a/sys/decklink/linux/DeckLinkAPIConfiguration.h b/sys/decklink/linux/DeckLinkAPIConfiguration.h
new file mode 100644
index 0000000..def498c
--- /dev/null
+++ b/sys/decklink/linux/DeckLinkAPIConfiguration.h
@@ -0,0 +1,181 @@
+/* -LICENSE-START-
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+** 
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+** 
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+** -LICENSE-END-
+*/
+
+#ifndef BMD_DECKLINKAPICONFIGURATION_H
+#define BMD_DECKLINKAPICONFIGURATION_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+// Type Declarations
+
+
+// Interface ID Declarations
+
+BMD_CONST REFIID IID_IDeckLinkConfiguration                       = /* 1E69FCF6-4203-4936-8076-2A9F4CFD50CB */ {0x1E,0x69,0xFC,0xF6,0x42,0x03,0x49,0x36,0x80,0x76,0x2A,0x9F,0x4C,0xFD,0x50,0xCB};
+
+/* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
+
+typedef uint32_t BMDDeckLinkConfigurationID;
+enum _BMDDeckLinkConfigurationID {
+
+    /* Serial port Flags */
+
+    bmdDeckLinkConfigSwapSerialRxTx                              = /* 'ssrt' */ 0x73737274,
+
+    /* Video Input/Output Flags */
+
+    bmdDeckLinkConfigUse1080pNotPsF                              = /* 'fpro' */ 0x6670726F,
+
+    /* Video Input/Output Integers */
+
+    bmdDeckLinkConfigHDMI3DPackingFormat                         = /* '3dpf' */ 0x33647066,
+    bmdDeckLinkConfigBypass                                      = /* 'byps' */ 0x62797073,
+    bmdDeckLinkConfigClockTimingAdjustment                       = /* 'ctad' */ 0x63746164,
+
+    /* Audio Input/Output Flags */
+
+    bmdDeckLinkConfigAnalogAudioConsumerLevels                   = /* 'aacl' */ 0x6161636C,
+
+    /* Video output flags */
+
+    bmdDeckLinkConfigFieldFlickerRemoval                         = /* 'fdfr' */ 0x66646672,
+    bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion            = /* 'to59' */ 0x746F3539,
+    bmdDeckLinkConfig444SDIVideoOutput                           = /* '444o' */ 0x3434346F,
+    bmdDeckLinkConfigSingleLinkVideoOutput                       = /* 'sglo' */ 0x73676C6F,
+    bmdDeckLinkConfigBlackVideoOutputDuringCapture               = /* 'bvoc' */ 0x62766F63,
+    bmdDeckLinkConfigLowLatencyVideoOutput                       = /* 'llvo' */ 0x6C6C766F,
+
+    /* Video Output Integers */
+
+    bmdDeckLinkConfigVideoOutputConnection                       = /* 'vocn' */ 0x766F636E,
+    bmdDeckLinkConfigVideoOutputConversionMode                   = /* 'vocm' */ 0x766F636D,
+    bmdDeckLinkConfigAnalogVideoOutputFlags                      = /* 'avof' */ 0x61766F66,
+    bmdDeckLinkConfigReferenceInputTimingOffset                  = /* 'glot' */ 0x676C6F74,
+    bmdDeckLinkConfigVideoOutputIdleOperation                    = /* 'voio' */ 0x766F696F,
+    bmdDeckLinkConfigDefaultVideoOutputMode                      = /* 'dvom' */ 0x64766F6D,
+    bmdDeckLinkConfigDefaultVideoOutputModeFlags                 = /* 'dvof' */ 0x64766F66,
+
+    /* Video Output Floats */
+
+    bmdDeckLinkConfigVideoOutputComponentLumaGain                = /* 'oclg' */ 0x6F636C67,
+    bmdDeckLinkConfigVideoOutputComponentChromaBlueGain          = /* 'occb' */ 0x6F636362,
+    bmdDeckLinkConfigVideoOutputComponentChromaRedGain           = /* 'occr' */ 0x6F636372,
+    bmdDeckLinkConfigVideoOutputCompositeLumaGain                = /* 'oilg' */ 0x6F696C67,
+    bmdDeckLinkConfigVideoOutputCompositeChromaGain              = /* 'oicg' */ 0x6F696367,
+    bmdDeckLinkConfigVideoOutputSVideoLumaGain                   = /* 'oslg' */ 0x6F736C67,
+    bmdDeckLinkConfigVideoOutputSVideoChromaGain                 = /* 'oscg' */ 0x6F736367,
+
+    /* Video Input Flags */
+
+    bmdDeckLinkConfigVideoInputScanning                          = /* 'visc' */ 0x76697363,	// Applicable to H264 Pro Recorder only
+    bmdDeckLinkConfigUseDedicatedLTCInput                        = /* 'dltc' */ 0x646C7463,	// Use timecode from LTC input instead of SDI stream
+
+    /* Video Input Integers */
+
+    bmdDeckLinkConfigVideoInputConnection                        = /* 'vicn' */ 0x7669636E,
+    bmdDeckLinkConfigAnalogVideoInputFlags                       = /* 'avif' */ 0x61766966,
+    bmdDeckLinkConfigVideoInputConversionMode                    = /* 'vicm' */ 0x7669636D,
+    bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame      = /* 'pdif' */ 0x70646966,
+    bmdDeckLinkConfigVANCSourceLine1Mapping                      = /* 'vsl1' */ 0x76736C31,
+    bmdDeckLinkConfigVANCSourceLine2Mapping                      = /* 'vsl2' */ 0x76736C32,
+    bmdDeckLinkConfigVANCSourceLine3Mapping                      = /* 'vsl3' */ 0x76736C33,
+    bmdDeckLinkConfigCapturePassThroughMode                      = /* 'cptm' */ 0x6370746D,
+
+    /* Video Input Floats */
+
+    bmdDeckLinkConfigVideoInputComponentLumaGain                 = /* 'iclg' */ 0x69636C67,
+    bmdDeckLinkConfigVideoInputComponentChromaBlueGain           = /* 'iccb' */ 0x69636362,
+    bmdDeckLinkConfigVideoInputComponentChromaRedGain            = /* 'iccr' */ 0x69636372,
+    bmdDeckLinkConfigVideoInputCompositeLumaGain                 = /* 'iilg' */ 0x69696C67,
+    bmdDeckLinkConfigVideoInputCompositeChromaGain               = /* 'iicg' */ 0x69696367,
+    bmdDeckLinkConfigVideoInputSVideoLumaGain                    = /* 'islg' */ 0x69736C67,
+    bmdDeckLinkConfigVideoInputSVideoChromaGain                  = /* 'iscg' */ 0x69736367,
+
+    /* Audio Input Integers */
+
+    bmdDeckLinkConfigAudioInputConnection                        = /* 'aicn' */ 0x6169636E,
+
+    /* Audio Input Floats */
+
+    bmdDeckLinkConfigAnalogAudioInputScaleChannel1               = /* 'ais1' */ 0x61697331,
+    bmdDeckLinkConfigAnalogAudioInputScaleChannel2               = /* 'ais2' */ 0x61697332,
+    bmdDeckLinkConfigAnalogAudioInputScaleChannel3               = /* 'ais3' */ 0x61697333,
+    bmdDeckLinkConfigAnalogAudioInputScaleChannel4               = /* 'ais4' */ 0x61697334,
+    bmdDeckLinkConfigDigitalAudioInputScale                      = /* 'dais' */ 0x64616973,
+
+    /* Audio Output Integers */
+
+    bmdDeckLinkConfigAudioOutputAESAnalogSwitch                  = /* 'aoaa' */ 0x616F6161,
+
+    /* Audio Output Floats */
+
+    bmdDeckLinkConfigAnalogAudioOutputScaleChannel1              = /* 'aos1' */ 0x616F7331,
+    bmdDeckLinkConfigAnalogAudioOutputScaleChannel2              = /* 'aos2' */ 0x616F7332,
+    bmdDeckLinkConfigAnalogAudioOutputScaleChannel3              = /* 'aos3' */ 0x616F7333,
+    bmdDeckLinkConfigAnalogAudioOutputScaleChannel4              = /* 'aos4' */ 0x616F7334,
+    bmdDeckLinkConfigDigitalAudioOutputScale                     = /* 'daos' */ 0x64616F73
+};
+
+// Forward Declarations
+
+class IDeckLinkConfiguration;
+
+/* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
+
+class IDeckLinkConfiguration : public IUnknown
+{
+public:
+    virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
+    virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
+    virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
+    virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
+    virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
+    virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
+    virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0;
+    virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0;
+    virtual HRESULT WriteConfigurationToPreferences (void) = 0;
+
+protected:
+    virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count
+};
+
+/* Functions */
+
+extern "C" {
+
+
+}
+
+
+#endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */
diff --git a/sys/decklink/linux/DeckLinkAPIDeckControl.h b/sys/decklink/linux/DeckLinkAPIDeckControl.h
new file mode 100644
index 0000000..b83d013
--- /dev/null
+++ b/sys/decklink/linux/DeckLinkAPIDeckControl.h
@@ -0,0 +1,215 @@
+/* -LICENSE-START-
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+** 
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+** 
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+** -LICENSE-END-
+*/
+
+#ifndef BMD_DECKLINKAPIDECKCONTROL_H
+#define BMD_DECKLINKAPIDECKCONTROL_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+// Type Declarations
+
+
+// Interface ID Declarations
+
+BMD_CONST REFIID IID_IDeckLinkDeckControlStatusCallback           = /* 53436FFB-B434-4906-BADC-AE3060FFE8EF */ {0x53,0x43,0x6F,0xFB,0xB4,0x34,0x49,0x06,0xBA,0xDC,0xAE,0x30,0x60,0xFF,0xE8,0xEF};
+BMD_CONST REFIID IID_IDeckLinkDeckControl                         = /* 8E1C3ACE-19C7-4E00-8B92-D80431D958BE */ {0x8E,0x1C,0x3A,0xCE,0x19,0xC7,0x4E,0x00,0x8B,0x92,0xD8,0x04,0x31,0xD9,0x58,0xBE};
+
+/* Enum BMDDeckControlMode - DeckControl mode */
+
+typedef uint32_t BMDDeckControlMode;
+enum _BMDDeckControlMode {
+    bmdDeckControlNotOpened                                      = /* 'ntop' */ 0x6E746F70,
+    bmdDeckControlVTRControlMode                                 = /* 'vtrc' */ 0x76747263,
+    bmdDeckControlExportMode                                     = /* 'expm' */ 0x6578706D,
+    bmdDeckControlCaptureMode                                    = /* 'capm' */ 0x6361706D
+};
+
+/* Enum BMDDeckControlEvent - DeckControl event */
+
+typedef uint32_t BMDDeckControlEvent;
+enum _BMDDeckControlEvent {
+    bmdDeckControlAbortedEvent                                   = /* 'abte' */ 0x61627465,	// This event is triggered when a capture or edit-to-tape operation is aborted.
+
+    /* Export-To-Tape events */
+
+    bmdDeckControlPrepareForExportEvent                          = /* 'pfee' */ 0x70666565,	// This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point.
+    bmdDeckControlExportCompleteEvent                            = /* 'exce' */ 0x65786365,	// This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback.
+
+    /* Capture events */
+
+    bmdDeckControlPrepareForCaptureEvent                         = /* 'pfce' */ 0x70666365,	// This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid.
+    bmdDeckControlCaptureCompleteEvent                           = /* 'ccev' */ 0x63636576	// This event is triggered a few frames after reaching the out-point.
+};
+
+/* Enum BMDDeckControlVTRControlState - VTR Control state */
+
+typedef uint32_t BMDDeckControlVTRControlState;
+enum _BMDDeckControlVTRControlState {
+    bmdDeckControlNotInVTRControlMode                            = /* 'nvcm' */ 0x6E76636D,
+    bmdDeckControlVTRControlPlaying                              = /* 'vtrp' */ 0x76747270,
+    bmdDeckControlVTRControlRecording                            = /* 'vtrr' */ 0x76747272,
+    bmdDeckControlVTRControlStill                                = /* 'vtra' */ 0x76747261,
+    bmdDeckControlVTRControlShuttleForward                       = /* 'vtsf' */ 0x76747366,
+    bmdDeckControlVTRControlShuttleReverse                       = /* 'vtsr' */ 0x76747372,
+    bmdDeckControlVTRControlJogForward                           = /* 'vtjf' */ 0x76746A66,
+    bmdDeckControlVTRControlJogReverse                           = /* 'vtjr' */ 0x76746A72,
+    bmdDeckControlVTRControlStopped                              = /* 'vtro' */ 0x7674726F
+};
+
+/* Enum BMDDeckControlStatusFlags - Deck Control status flags */
+
+typedef uint32_t BMDDeckControlStatusFlags;
+enum _BMDDeckControlStatusFlags {
+    bmdDeckControlStatusDeckConnected                            = 1 << 0,
+    bmdDeckControlStatusRemoteMode                               = 1 << 1,
+    bmdDeckControlStatusRecordInhibited                          = 1 << 2,
+    bmdDeckControlStatusCassetteOut                              = 1 << 3
+};
+
+/* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */
+
+typedef uint32_t BMDDeckControlExportModeOpsFlags;
+enum _BMDDeckControlExportModeOpsFlags {
+    bmdDeckControlExportModeInsertVideo                          = 1 << 0,
+    bmdDeckControlExportModeInsertAudio1                         = 1 << 1,
+    bmdDeckControlExportModeInsertAudio2                         = 1 << 2,
+    bmdDeckControlExportModeInsertAudio3                         = 1 << 3,
+    bmdDeckControlExportModeInsertAudio4                         = 1 << 4,
+    bmdDeckControlExportModeInsertAudio5                         = 1 << 5,
+    bmdDeckControlExportModeInsertAudio6                         = 1 << 6,
+    bmdDeckControlExportModeInsertAudio7                         = 1 << 7,
+    bmdDeckControlExportModeInsertAudio8                         = 1 << 8,
+    bmdDeckControlExportModeInsertAudio9                         = 1 << 9,
+    bmdDeckControlExportModeInsertAudio10                        = 1 << 10,
+    bmdDeckControlExportModeInsertAudio11                        = 1 << 11,
+    bmdDeckControlExportModeInsertAudio12                        = 1 << 12,
+    bmdDeckControlExportModeInsertTimeCode                       = 1 << 13,
+    bmdDeckControlExportModeInsertAssemble                       = 1 << 14,
+    bmdDeckControlExportModeInsertPreview                        = 1 << 15,
+    bmdDeckControlUseManualExport                                = 1 << 16
+};
+
+/* Enum BMDDeckControlError - Deck Control error */
+
+typedef uint32_t BMDDeckControlError;
+enum _BMDDeckControlError {
+    bmdDeckControlNoError                                        = /* 'noer' */ 0x6E6F6572,
+    bmdDeckControlModeError                                      = /* 'moer' */ 0x6D6F6572,
+    bmdDeckControlMissedInPointError                             = /* 'mier' */ 0x6D696572,
+    bmdDeckControlDeckTimeoutError                               = /* 'dter' */ 0x64746572,
+    bmdDeckControlCommandFailedError                             = /* 'cfer' */ 0x63666572,
+    bmdDeckControlDeviceAlreadyOpenedError                       = /* 'dalo' */ 0x64616C6F,
+    bmdDeckControlFailedToOpenDeviceError                        = /* 'fder' */ 0x66646572,
+    bmdDeckControlInLocalModeError                               = /* 'lmer' */ 0x6C6D6572,
+    bmdDeckControlEndOfTapeError                                 = /* 'eter' */ 0x65746572,
+    bmdDeckControlUserAbortError                                 = /* 'uaer' */ 0x75616572,
+    bmdDeckControlNoTapeInDeckError                              = /* 'nter' */ 0x6E746572,
+    bmdDeckControlNoVideoFromCardError                           = /* 'nvfc' */ 0x6E766663,
+    bmdDeckControlNoCommunicationError                           = /* 'ncom' */ 0x6E636F6D,
+    bmdDeckControlBufferTooSmallError                            = /* 'btsm' */ 0x6274736D,
+    bmdDeckControlBadChecksumError                               = /* 'chks' */ 0x63686B73,
+    bmdDeckControlUnknownError                                   = /* 'uner' */ 0x756E6572
+};
+
+// Forward Declarations
+
+class IDeckLinkDeckControlStatusCallback;
+class IDeckLinkDeckControl;
+
+/* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */
+
+class IDeckLinkDeckControlStatusCallback : public IUnknown
+{
+public:
+    virtual HRESULT TimecodeUpdate (/* in */ BMDTimecodeBCD currentTimecode) = 0;
+    virtual HRESULT VTRControlStateChanged (/* in */ BMDDeckControlVTRControlState newState, /* in */ BMDDeckControlError error) = 0;
+    virtual HRESULT DeckControlEventReceived (/* in */ BMDDeckControlEvent event, /* in */ BMDDeckControlError error) = 0;
+    virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
+
+protected:
+    virtual ~IDeckLinkDeckControlStatusCallback () {} // call Release method to drop reference count
+};
+
+/* Interface IDeckLinkDeckControl - Deck Control main interface */
+
+class IDeckLinkDeckControl : public IUnknown
+{
+public:
+    virtual HRESULT Open (/* in */ BMDTimeScale timeScale, /* in */ BMDTimeValue timeValue, /* in */ bool timecodeIsDropFrame, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Close (/* in */ bool standbyOn) = 0;
+    virtual HRESULT GetCurrentState (/* out */ BMDDeckControlMode *mode, /* out */ BMDDeckControlVTRControlState *vtrControlState, /* out */ BMDDeckControlStatusFlags *flags) = 0;
+    virtual HRESULT SetStandby (/* in */ bool standbyOn) = 0;
+    virtual HRESULT SendCommand (/* in */ uint8_t *inBuffer, /* in */ uint32_t inBufferSize, /* out */ uint8_t *outBuffer, /* out */ uint32_t *outDataSize, /* in */ uint32_t outBufferSize, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Play (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Stop (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT TogglePlayStop (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Eject (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT GoToTimecode (/* in */ BMDTimecodeBCD timecode, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT FastForward (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Rewind (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT StepForward (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT StepBack (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Jog (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Shuttle (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT GetTimecodeString (/* out */ const char **currentTimeCode, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT GetTimecode (/* out */ IDeckLinkTimecode **currentTimecode, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT GetTimecodeBCD (/* out */ BMDTimecodeBCD *currentTimecode, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT SetPreroll (/* in */ uint32_t prerollSeconds) = 0;
+    virtual HRESULT GetPreroll (/* out */ uint32_t *prerollSeconds) = 0;
+    virtual HRESULT SetExportOffset (/* in */ int32_t exportOffsetFields) = 0;
+    virtual HRESULT GetExportOffset (/* out */ int32_t *exportOffsetFields) = 0;
+    virtual HRESULT GetManualExportOffset (/* out */ int32_t *deckManualExportOffsetFields) = 0;
+    virtual HRESULT SetCaptureOffset (/* in */ int32_t captureOffsetFields) = 0;
+    virtual HRESULT GetCaptureOffset (/* out */ int32_t *captureOffsetFields) = 0;
+    virtual HRESULT StartExport (/* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* in */ BMDDeckControlExportModeOpsFlags exportModeOps, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT StartCapture (/* in */ bool useVITC, /* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT GetDeviceID (/* out */ uint16_t *deviceId, /* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT Abort (void) = 0;
+    virtual HRESULT CrashRecordStart (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT CrashRecordStop (/* out */ BMDDeckControlError *error) = 0;
+    virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback *callback) = 0;
+
+protected:
+    virtual ~IDeckLinkDeckControl () {} // call Release method to drop reference count
+};
+
+/* Functions */
+
+extern "C" {
+
+
+}
+
+
+#endif /* defined(BMD_DECKLINKAPIDECKCONTROL_H) */
diff --git a/sys/decklink/linux/DeckLinkAPIDiscovery.h b/sys/decklink/linux/DeckLinkAPIDiscovery.h
new file mode 100644
index 0000000..424d9d5
--- /dev/null
+++ b/sys/decklink/linux/DeckLinkAPIDiscovery.h
@@ -0,0 +1,71 @@
+/* -LICENSE-START-
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+** 
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+** 
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+** -LICENSE-END-
+*/
+
+#ifndef BMD_DECKLINKAPIDISCOVERY_H
+#define BMD_DECKLINKAPIDISCOVERY_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+// Type Declarations
+
+
+// Interface ID Declarations
+
+BMD_CONST REFIID IID_IDeckLink                                    = /* C418FBDD-0587-48ED-8FE5-640F0A14AF91 */ {0xC4,0x18,0xFB,0xDD,0x05,0x87,0x48,0xED,0x8F,0xE5,0x64,0x0F,0x0A,0x14,0xAF,0x91};
+
+// Forward Declarations
+
+class IDeckLink;
+
+/* Interface IDeckLink - represents a DeckLink device */
+
+class IDeckLink : public IUnknown
+{
+public:
+    virtual HRESULT GetModelName (/* out */ const char **modelName) = 0;
+    virtual HRESULT GetDisplayName (/* out */ const char **displayName) = 0;
+
+protected:
+    virtual ~IDeckLink () {} // call Release method to drop reference count
+};
+
+/* Functions */
+
+extern "C" {
+
+
+}
+
+
+#endif /* defined(BMD_DECKLINKAPIDISCOVERY_H) */
diff --git a/sys/decklink/linux/DeckLinkAPIDispatch.cpp b/sys/decklink/linux/DeckLinkAPIDispatch.cpp
index 957f9a4..d285337 100644
--- a/sys/decklink/linux/DeckLinkAPIDispatch.cpp
+++ b/sys/decklink/linux/DeckLinkAPIDispatch.cpp
@@ -34,116 +34,115 @@
 #define kDeckLinkAPI_Name "libDeckLinkAPI.so"
 #define KDeckLinkPreviewAPI_Name "libDeckLinkPreviewAPI.so"
 
-typedef IDeckLinkIterator *(*CreateIteratorFunc) (void);
-typedef IDeckLinkAPIInformation *(*CreateAPIInformationFunc) (void);
-typedef IDeckLinkGLScreenPreviewHelper
-    *(*CreateOpenGLScreenPreviewHelperFunc) (void);
-typedef IDeckLinkVideoConversion *(*CreateVideoConversionInstanceFunc) (void);
+typedef IDeckLinkIterator* (*CreateIteratorFunc)(void);
+typedef IDeckLinkAPIInformation* (*CreateAPIInformationFunc)(void);
+typedef IDeckLinkGLScreenPreviewHelper* (*CreateOpenGLScreenPreviewHelperFunc)(void);
+typedef IDeckLinkVideoConversion* (*CreateVideoConversionInstanceFunc)(void);
+typedef IDeckLinkDiscovery* (*CreateDeckLinkDiscoveryInstanceFunc)(void);
 
-static pthread_once_t gDeckLinkOnceControl = PTHREAD_ONCE_INIT;
-static pthread_once_t gPreviewOnceControl = PTHREAD_ONCE_INIT;
+static pthread_once_t					gDeckLinkOnceControl = PTHREAD_ONCE_INIT;
+static pthread_once_t					gPreviewOnceControl = PTHREAD_ONCE_INIT;
 
-static bool gLoadedDeckLinkAPI = false;
+static bool								gLoadedDeckLinkAPI = false;
 
-static CreateIteratorFunc gCreateIteratorFunc = NULL;
-static CreateAPIInformationFunc gCreateAPIInformationFunc = NULL;
-static CreateOpenGLScreenPreviewHelperFunc gCreateOpenGLPreviewFunc = NULL;
-static CreateVideoConversionInstanceFunc gCreateVideoConversionFunc = NULL;
+static CreateIteratorFunc					gCreateIteratorFunc = NULL;
+static CreateAPIInformationFunc				gCreateAPIInformationFunc = NULL;
+static CreateOpenGLScreenPreviewHelperFunc	gCreateOpenGLPreviewFunc = NULL;
+static CreateVideoConversionInstanceFunc	gCreateVideoConversionFunc	= NULL;
+static CreateDeckLinkDiscoveryInstanceFunc	gCreateDeckLinkDiscoveryFunc = NULL;
 
-void InitDeckLinkAPI (void);
-void
-InitDeckLinkAPI (void)
+static void	InitDeckLinkAPI (void)
 {
-  void *libraryHandle;
-
-  libraryHandle = dlopen (kDeckLinkAPI_Name, RTLD_NOW | RTLD_GLOBAL);
-  if (!libraryHandle) {
-    fprintf (stderr, "%s\n", dlerror ());
-    return;
-  }
-
-  gLoadedDeckLinkAPI = true;
-
-  gCreateIteratorFunc =
-      (CreateIteratorFunc) dlsym (libraryHandle,
-      "CreateDeckLinkIteratorInstance_0001");
-  if (!gCreateIteratorFunc)
-    fprintf (stderr, "%s\n", dlerror ());
-  gCreateAPIInformationFunc =
-      (CreateAPIInformationFunc) dlsym (libraryHandle,
-      "CreateDeckLinkAPIInformationInstance_0001");
-  if (!gCreateAPIInformationFunc)
-    fprintf (stderr, "%s\n", dlerror ());
-  gCreateVideoConversionFunc =
-      (CreateVideoConversionInstanceFunc) dlsym (libraryHandle,
-      "CreateVideoConversionInstance_0001");
-  if (!gCreateVideoConversionFunc)
-    fprintf (stderr, "%s\n", dlerror ());
+	void *libraryHandle;
+	
+	libraryHandle = dlopen(kDeckLinkAPI_Name, RTLD_NOW|RTLD_GLOBAL);
+	if (!libraryHandle)
+	{
+		fprintf(stderr, "%s\n", dlerror());
+		return;
+	}
+	
+	gLoadedDeckLinkAPI = true;
+	
+	gCreateIteratorFunc = (CreateIteratorFunc)dlsym(libraryHandle, "CreateDeckLinkIteratorInstance_0002");
+	if (!gCreateIteratorFunc)
+		fprintf(stderr, "%s\n", dlerror());
+	gCreateAPIInformationFunc = (CreateAPIInformationFunc)dlsym(libraryHandle, "CreateDeckLinkAPIInformationInstance_0001");
+	if (!gCreateAPIInformationFunc)
+		fprintf(stderr, "%s\n", dlerror());
+	gCreateVideoConversionFunc = (CreateVideoConversionInstanceFunc)dlsym(libraryHandle, "CreateVideoConversionInstance_0001");
+	if (!gCreateVideoConversionFunc)
+		fprintf(stderr, "%s\n", dlerror());
+	gCreateDeckLinkDiscoveryFunc = (CreateDeckLinkDiscoveryInstanceFunc)dlsym(libraryHandle, "CreateDeckLinkDiscoveryInstance_0001");
+	if (!gCreateDeckLinkDiscoveryFunc)
+		fprintf(stderr, "%s\n", dlerror());
 }
 
-void InitDeckLinkPreviewAPI (void);
-void
-InitDeckLinkPreviewAPI (void)
+static void	InitDeckLinkPreviewAPI (void)
 {
-  void *libraryHandle;
-
-  libraryHandle = dlopen (KDeckLinkPreviewAPI_Name, RTLD_NOW | RTLD_GLOBAL);
-  if (!libraryHandle) {
-    fprintf (stderr, "%s\n", dlerror ());
-    return;
-  }
-  gCreateOpenGLPreviewFunc =
-      (CreateOpenGLScreenPreviewHelperFunc) dlsym (libraryHandle,
-      "CreateOpenGLScreenPreviewHelper_0001");
-  if (!gCreateOpenGLPreviewFunc)
-    fprintf (stderr, "%s\n", dlerror ());
+	void *libraryHandle;
+	
+	libraryHandle = dlopen(KDeckLinkPreviewAPI_Name, RTLD_NOW|RTLD_GLOBAL);
+	if (!libraryHandle)
+	{
+		fprintf(stderr, "%s\n", dlerror());
+		return;
+	}
+	gCreateOpenGLPreviewFunc = (CreateOpenGLScreenPreviewHelperFunc)dlsym(libraryHandle, "CreateOpenGLScreenPreviewHelper_0001");
+	if (!gCreateOpenGLPreviewFunc)
+		fprintf(stderr, "%s\n", dlerror());
 }
 
-bool IsDeckLinkAPIPresent (void);
-bool
-IsDeckLinkAPIPresent (void)
+#if 0
+bool		IsDeckLinkAPIPresent (void)
 {
-  // If the DeckLink API dynamic library was successfully loaded, return this knowledge to the caller
-  return gLoadedDeckLinkAPI;
+	// If the DeckLink API dynamic library was successfully loaded, return this knowledge to the caller
+	return gLoadedDeckLinkAPI;
+}
+#endif
+
+IDeckLinkIterator*		CreateDeckLinkIteratorInstance (void)
+{
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	
+	if (gCreateIteratorFunc == NULL)
+		return NULL;
+	return gCreateIteratorFunc();
 }
 
-IDeckLinkIterator *
-CreateDeckLinkIteratorInstance (void)
+IDeckLinkAPIInformation*	CreateDeckLinkAPIInformationInstance (void)
 {
-  pthread_once (&gDeckLinkOnceControl, InitDeckLinkAPI);
-
-  if (gCreateIteratorFunc == NULL)
-    return NULL;
-  return gCreateIteratorFunc ();
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	
+	if (gCreateAPIInformationFunc == NULL)
+		return NULL;
+	return gCreateAPIInformationFunc();
 }
 
-IDeckLinkAPIInformation *
-CreateDeckLinkAPIInformationInstance (void)
+IDeckLinkGLScreenPreviewHelper*		CreateOpenGLScreenPreviewHelper (void)
 {
-  pthread_once (&gDeckLinkOnceControl, InitDeckLinkAPI);
-
-  if (gCreateAPIInformationFunc == NULL)
-    return NULL;
-  return gCreateAPIInformationFunc ();
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	pthread_once(&gPreviewOnceControl, InitDeckLinkPreviewAPI);
+	
+	if (gCreateOpenGLPreviewFunc == NULL)
+		return NULL;
+	return gCreateOpenGLPreviewFunc();
 }
 
-IDeckLinkGLScreenPreviewHelper *
-CreateOpenGLScreenPreviewHelper (void)
+IDeckLinkVideoConversion* CreateVideoConversionInstance (void)
 {
-  pthread_once (&gDeckLinkOnceControl, InitDeckLinkAPI);
-  pthread_once (&gPreviewOnceControl, InitDeckLinkPreviewAPI);
-
-  if (gCreateOpenGLPreviewFunc == NULL)
-    return NULL;
-  return gCreateOpenGLPreviewFunc ();
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	
+	if (gCreateVideoConversionFunc == NULL)
+		return NULL;
+	return gCreateVideoConversionFunc();
 }
 
-IDeckLinkVideoConversion *
-CreateVideoConversionInstance (void)
+IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void)
 {
-  pthread_once (&gDeckLinkOnceControl, InitDeckLinkAPI);
-
-  if (gCreateVideoConversionFunc == NULL)
-    return NULL;
-  return gCreateVideoConversionFunc ();
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	
+	if (gCreateDeckLinkDiscoveryFunc == NULL)
+		return NULL;
+	return gCreateDeckLinkDiscoveryFunc();
 }
diff --git a/sys/decklink/linux/DeckLinkAPIModes.h b/sys/decklink/linux/DeckLinkAPIModes.h
new file mode 100644
index 0000000..394d68c
--- /dev/null
+++ b/sys/decklink/linux/DeckLinkAPIModes.h
@@ -0,0 +1,191 @@
+/* -LICENSE-START-
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+** 
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+** 
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+** -LICENSE-END-
+*/
+
+#ifndef BMD_DECKLINKAPIMODES_H
+#define BMD_DECKLINKAPIMODES_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+// Type Declarations
+
+
+// Interface ID Declarations
+
+BMD_CONST REFIID IID_IDeckLinkDisplayModeIterator                 = /* 9C88499F-F601-4021-B80B-032E4EB41C35 */ {0x9C,0x88,0x49,0x9F,0xF6,0x01,0x40,0x21,0xB8,0x0B,0x03,0x2E,0x4E,0xB4,0x1C,0x35};
+BMD_CONST REFIID IID_IDeckLinkDisplayMode                         = /* 3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78 */ {0x3E,0xB2,0xC1,0xAB,0x0A,0x3D,0x45,0x23,0xA3,0xAD,0xF4,0x0D,0x7F,0xB1,0x4E,0x78};
+
+/* Enum BMDDisplayMode - Video display modes */
+
+typedef uint32_t BMDDisplayMode;
+enum _BMDDisplayMode {
+
+    /* SD Modes */
+
+    bmdModeNTSC                                                  = /* 'ntsc' */ 0x6E747363,
+    bmdModeNTSC2398                                              = /* 'nt23' */ 0x6E743233,	// 3:2 pulldown
+    bmdModePAL                                                   = /* 'pal ' */ 0x70616C20,
+    bmdModeNTSCp                                                 = /* 'ntsp' */ 0x6E747370,
+    bmdModePALp                                                  = /* 'palp' */ 0x70616C70,
+
+    /* HD 1080 Modes */
+
+    bmdModeHD1080p2398                                           = /* '23ps' */ 0x32337073,
+    bmdModeHD1080p24                                             = /* '24ps' */ 0x32347073,
+    bmdModeHD1080p25                                             = /* 'Hp25' */ 0x48703235,
+    bmdModeHD1080p2997                                           = /* 'Hp29' */ 0x48703239,
+    bmdModeHD1080p30                                             = /* 'Hp30' */ 0x48703330,
+    bmdModeHD1080i50                                             = /* 'Hi50' */ 0x48693530,
+    bmdModeHD1080i5994                                           = /* 'Hi59' */ 0x48693539,
+    bmdModeHD1080i6000                                           = /* 'Hi60' */ 0x48693630,	// N.B. This _really_ is 60.00 Hz.
+    bmdModeHD1080p50                                             = /* 'Hp50' */ 0x48703530,
+    bmdModeHD1080p5994                                           = /* 'Hp59' */ 0x48703539,
+    bmdModeHD1080p6000                                           = /* 'Hp60' */ 0x48703630,	// N.B. This _really_ is 60.00 Hz.
+
+    /* HD 720 Modes */
+
+    bmdModeHD720p50                                              = /* 'hp50' */ 0x68703530,
+    bmdModeHD720p5994                                            = /* 'hp59' */ 0x68703539,
+    bmdModeHD720p60                                              = /* 'hp60' */ 0x68703630,
+
+    /* 2k Modes */
+
+    bmdMode2k2398                                                = /* '2k23' */ 0x326B3233,
+    bmdMode2k24                                                  = /* '2k24' */ 0x326B3234,
+    bmdMode2k25                                                  = /* '2k25' */ 0x326B3235,
+
+    /* DCI Modes (output only) */
+
+    bmdMode2kDCI2398                                             = /* '2d23' */ 0x32643233,
+    bmdMode2kDCI24                                               = /* '2d24' */ 0x32643234,
+    bmdMode2kDCI25                                               = /* '2d25' */ 0x32643235,
+
+    /* 4k Modes */
+
+    bmdMode4K2160p2398                                           = /* '4k23' */ 0x346B3233,
+    bmdMode4K2160p24                                             = /* '4k24' */ 0x346B3234,
+    bmdMode4K2160p25                                             = /* '4k25' */ 0x346B3235,
+    bmdMode4K2160p2997                                           = /* '4k29' */ 0x346B3239,
+    bmdMode4K2160p30                                             = /* '4k30' */ 0x346B3330,
+    bmdMode4K2160p50                                             = /* '4k50' */ 0x346B3530,
+    bmdMode4K2160p5994                                           = /* '4k59' */ 0x346B3539,
+    bmdMode4K2160p60                                             = /* '4k60' */ 0x346B3630,
+
+    /* DCI Modes (output only) */
+
+    bmdMode4kDCI2398                                             = /* '4d23' */ 0x34643233,
+    bmdMode4kDCI24                                               = /* '4d24' */ 0x34643234,
+    bmdMode4kDCI25                                               = /* '4d25' */ 0x34643235,
+
+    /* Special Modes */
+
+    bmdModeUnknown                                               = /* 'iunk' */ 0x69756E6B
+};
+
+/* Enum BMDFieldDominance - Video field dominance */
+
+typedef uint32_t BMDFieldDominance;
+enum _BMDFieldDominance {
+    bmdUnknownFieldDominance                                     = 0,
+    bmdLowerFieldFirst                                           = /* 'lowr' */ 0x6C6F7772,
+    bmdUpperFieldFirst                                           = /* 'uppr' */ 0x75707072,
+    bmdProgressiveFrame                                          = /* 'prog' */ 0x70726F67,
+    bmdProgressiveSegmentedFrame                                 = /* 'psf ' */ 0x70736620
+};
+
+/* Enum BMDPixelFormat - Video pixel formats supported for output/input */
+
+typedef uint32_t BMDPixelFormat;
+enum _BMDPixelFormat {
+    bmdFormat8BitYUV                                             = /* '2vuy' */ 0x32767579,
+    bmdFormat10BitYUV                                            = /* 'v210' */ 0x76323130,
+    bmdFormat8BitARGB                                            = 32,
+    bmdFormat8BitBGRA                                            = /* 'BGRA' */ 0x42475241,
+    bmdFormat10BitRGB                                            = /* 'r210' */ 0x72323130,	// Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
+    bmdFormat12BitRGB                                            = /* 'R12B' */ 0x52313242,	// Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component
+    bmdFormat12BitRGBLE                                          = /* 'R12L' */ 0x5231324C,	// Little-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component
+    bmdFormat10BitRGBXLE                                         = /* 'R10l' */ 0x5231306C,	// Little-endian 10-bit RGB with SMPTE video levels (64-940)
+    bmdFormat10BitRGBX                                           = /* 'R10b' */ 0x52313062	// Big-endian 10-bit RGB with SMPTE video levels (64-940)
+};
+
+/* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */
+
+typedef uint32_t BMDDisplayModeFlags;
+enum _BMDDisplayModeFlags {
+    bmdDisplayModeSupports3D                                     = 1 << 0,
+    bmdDisplayModeColorspaceRec601                               = 1 << 1,
+    bmdDisplayModeColorspaceRec709                               = 1 << 2
+};
+
+// Forward Declarations
+
+class IDeckLinkDisplayModeIterator;
+class IDeckLinkDisplayMode;
+
+/* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */
+
+class IDeckLinkDisplayModeIterator : public IUnknown
+{
+public:
+    virtual HRESULT Next (/* out */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
+
+protected:
+    virtual ~IDeckLinkDisplayModeIterator () {} // call Release method to drop reference count
+};
+
+/* Interface IDeckLinkDisplayMode - represents a display mode */
+
+class IDeckLinkDisplayMode : public IUnknown
+{
+public:
+    virtual HRESULT GetName (/* out */ const char **name) = 0;
+    virtual BMDDisplayMode GetDisplayMode (void) = 0;
+    virtual long GetWidth (void) = 0;
+    virtual long GetHeight (void) = 0;
+    virtual HRESULT GetFrameRate (/* out */ BMDTimeValue *frameDuration, /* out */ BMDTimeScale *timeScale) = 0;
+    virtual BMDFieldDominance GetFieldDominance (void) = 0;
+    virtual BMDDisplayModeFlags GetFlags (void) = 0;
+
+protected:
+    virtual ~IDeckLinkDisplayMode () {} // call Release method to drop reference count
+};
+
+/* Functions */
+
+extern "C" {
+
+
+}
+
+
+#endif /* defined(BMD_DECKLINKAPIMODES_H) */
diff --git a/sys/decklink/linux/DeckLinkAPITypes.h b/sys/decklink/linux/DeckLinkAPITypes.h
new file mode 100644
index 0000000..55e015f
--- /dev/null
+++ b/sys/decklink/linux/DeckLinkAPITypes.h
@@ -0,0 +1,110 @@
+/* -LICENSE-START-
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+** 
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+** 
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+** -LICENSE-END-
+*/
+
+#ifndef BMD_DECKLINKAPITYPES_H
+#define BMD_DECKLINKAPITYPES_H
+
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
+// Type Declarations
+
+typedef int64_t BMDTimeValue;
+typedef int64_t BMDTimeScale;
+typedef uint32_t BMDTimecodeBCD;
+typedef uint32_t BMDTimecodeUserBits;
+
+// Interface ID Declarations
+
+BMD_CONST REFIID IID_IDeckLinkTimecode                            = /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ {0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40};
+
+/* Enum BMDTimecodeFlags - Timecode flags */
+
+typedef uint32_t BMDTimecodeFlags;
+enum _BMDTimecodeFlags {
+    bmdTimecodeFlagDefault                                       = 0,
+    bmdTimecodeIsDropFrame                                       = 1 << 0,
+    bmdTimecodeFieldMark                                         = 1 << 1
+};
+
+/* Enum BMDVideoConnection - Video connection types */
+
+typedef uint32_t BMDVideoConnection;
+enum _BMDVideoConnection {
+    bmdVideoConnectionSDI                                        = 1 << 0,
+    bmdVideoConnectionHDMI                                       = 1 << 1,
+    bmdVideoConnectionOpticalSDI                                 = 1 << 2,
+    bmdVideoConnectionComponent                                  = 1 << 3,
+    bmdVideoConnectionComposite                                  = 1 << 4,
+    bmdVideoConnectionSVideo                                     = 1 << 5
+};
+
+/* Enum BMDAudioConnection - Audio connection types */
+
+typedef uint32_t BMDAudioConnection;
+enum _BMDAudioConnection {
+    bmdAudioConnectionEmbedded                                   = 1 << 0,
+    bmdAudioConnectionAESEBU                                     = 1 << 1,
+    bmdAudioConnectionAnalog                                     = 1 << 2,
+    bmdAudioConnectionAnalogXLR                                  = 1 << 3,
+    bmdAudioConnectionAnalogRCA                                  = 1 << 4
+};
+
+// Forward Declarations
+
+class IDeckLinkTimecode;
+
+/* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
+
+class IDeckLinkTimecode : public IUnknown
+{
+public:
+    virtual BMDTimecodeBCD GetBCD (void) = 0;
+    virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
+    virtual HRESULT GetString (/* out */ const char **timecode) = 0;
+    virtual BMDTimecodeFlags GetFlags (void) = 0;
+    virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
+
+protected:
+    virtual ~IDeckLinkTimecode () {} // call Release method to drop reference count
+};
+
+/* Functions */
+
+extern "C" {
+
+
+}
+
+
+#endif /* defined(BMD_DECKLINKAPITYPES_H) */
diff --git a/sys/decklink/osx/DeckLinkAPI.h b/sys/decklink/osx/DeckLinkAPI.h
index b629369..8c334c0 100644
--- a/sys/decklink/osx/DeckLinkAPI.h
+++ b/sys/decklink/osx/DeckLinkAPI.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,6 +28,15 @@
 #ifndef BMD_DECKLINKAPI_H
 #define BMD_DECKLINKAPI_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 /* DeckLink API */
 
 #include <CoreFoundation/CoreFoundation.h>
@@ -49,26 +58,30 @@
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkVideoOutputCallback                 /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ (REFIID){0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE}
-#define IID_IDeckLinkInputCallback                       /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ (REFIID){0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A}
-#define IID_IDeckLinkMemoryAllocator                     /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ (REFIID){0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8}
-#define IID_IDeckLinkAudioOutputCallback                 /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ (REFIID){0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6}
-#define IID_IDeckLinkIterator                            /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ (REFIID){0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA}
-#define IID_IDeckLinkAPIInformation                      /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ (REFIID){0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4}
-#define IID_IDeckLinkOutput                              /* A3EF0963-0862-44ED-92A9-EE89ABF431C7 */ (REFIID){0xA3,0xEF,0x09,0x63,0x08,0x62,0x44,0xED,0x92,0xA9,0xEE,0x89,0xAB,0xF4,0x31,0xC7}
-#define IID_IDeckLinkInput                               /* 6D40EF78-28B9-4E21-990D-95BB7750A04F */ (REFIID){0x6D,0x40,0xEF,0x78,0x28,0xB9,0x4E,0x21,0x99,0x0D,0x95,0xBB,0x77,0x50,0xA0,0x4F}
-#define IID_IDeckLinkVideoFrame                          /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ (REFIID){0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17}
-#define IID_IDeckLinkMutableVideoFrame                   /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ (REFIID){0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90}
-#define IID_IDeckLinkVideoFrame3DExtensions              /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ (REFIID){0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7}
-#define IID_IDeckLinkVideoInputFrame                     /* 05CFE374-537C-4094-9A57-680525118F44 */ (REFIID){0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44}
-#define IID_IDeckLinkVideoFrameAncillary                 /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ (REFIID){0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04}
-#define IID_IDeckLinkAudioInputPacket                    /* E43D5870-2894-11DE-8C30-0800200C9A66 */ (REFIID){0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66}
-#define IID_IDeckLinkScreenPreviewCallback               /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ (REFIID){0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38}
-#define IID_IDeckLinkCocoaScreenPreviewCallback          /* D174152F-8F96-4C07-83A5-DD5F5AF0A2AA */ (REFIID){0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA}
-#define IID_IDeckLinkGLScreenPreviewHelper               /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ (REFIID){0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F}
-#define IID_IDeckLinkAttributes                          /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ (REFIID){0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4}
-#define IID_IDeckLinkKeyer                               /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ (REFIID){0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3}
-#define IID_IDeckLinkVideoConversion                     /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ (REFIID){0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A}
+BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback                 = /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ {0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE};
+BMD_CONST REFIID IID_IDeckLinkInputCallback                       = /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ {0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A};
+BMD_CONST REFIID IID_IDeckLinkMemoryAllocator                     = /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ {0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8};
+BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback                 = /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ {0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6};
+BMD_CONST REFIID IID_IDeckLinkIterator                            = /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ {0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA};
+BMD_CONST REFIID IID_IDeckLinkAPIInformation                      = /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ {0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4};
+BMD_CONST REFIID IID_IDeckLinkOutput                              = /* CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564 */ {0xCC,0x5C,0x8A,0x6E,0x3F,0x2F,0x4B,0x3A,0x87,0xEA,0xFD,0x78,0xAF,0x30,0x05,0x64};
+BMD_CONST REFIID IID_IDeckLinkInput                               = /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95};
+BMD_CONST REFIID IID_IDeckLinkVideoFrame                          = /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ {0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17};
+BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame                   = /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ {0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90};
+BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions              = /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ {0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7};
+BMD_CONST REFIID IID_IDeckLinkVideoInputFrame                     = /* 05CFE374-537C-4094-9A57-680525118F44 */ {0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44};
+BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary                 = /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ {0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04};
+BMD_CONST REFIID IID_IDeckLinkAudioInputPacket                    = /* E43D5870-2894-11DE-8C30-0800200C9A66 */ {0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66};
+BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback               = /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ {0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38};
+BMD_CONST REFIID IID_IDeckLinkCocoaScreenPreviewCallback          = /* D174152F-8F96-4C07-83A5-DD5F5AF0A2AA */ {0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA};
+BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper               = /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ {0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F};
+BMD_CONST REFIID IID_IDeckLinkNotificationCallback                = /* B002A1EC-070D-4288-8289-BD5D36E5FF0D */ {0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D};
+BMD_CONST REFIID IID_IDeckLinkNotification                        = /* 0A1FB207-E215-441B-9B19-6FA1575946C5 */ {0x0A,0x1F,0xB2,0x07,0xE2,0x15,0x44,0x1B,0x9B,0x19,0x6F,0xA1,0x57,0x59,0x46,0xC5};
+BMD_CONST REFIID IID_IDeckLinkAttributes                          = /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ {0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4};
+BMD_CONST REFIID IID_IDeckLinkKeyer                               = /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ {0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3};
+BMD_CONST REFIID IID_IDeckLinkVideoConversion                     = /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ {0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A};
+BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback          = /* 4997053B-0ADF-4CC8-AC70-7A50C4BE728F */ {0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F};
+BMD_CONST REFIID IID_IDeckLinkDiscovery                           = /* CDBF631C-BC76-45FA-B44D-C55059BC6101 */ {0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01};
 
 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
 
@@ -116,7 +129,16 @@
 typedef uint32_t BMDDetectedVideoInputFormatFlags;
 enum _BMDDetectedVideoInputFormatFlags {
     bmdDetectedVideoInputYCbCr422                                = 1 << 0,
-    bmdDetectedVideoInputRGB444                                  = 1 << 1
+    bmdDetectedVideoInputRGB444                                  = 1 << 1,
+    bmdDetectedVideoInputDualStream3D                            = 1 << 2
+};
+
+/* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
+
+typedef uint32_t BMDDeckLinkCapturePassthroughMode;
+enum _BMDDeckLinkCapturePassthroughMode {
+    bmdDeckLinkCapturePassthroughModeDirect                      = 'pdir',
+    bmdDeckLinkCapturePassthroughModeCleanSwitch                 = 'pcln'
 };
 
 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
@@ -175,7 +197,7 @@
 typedef uint32_t BMDTimecodeFormat;
 enum _BMDTimecodeFormat {
     bmdTimecodeRP188VITC1                                        = 'rpv1',	// RP188 timecode where DBB1 equals VITC1 (line 9)
-    bmdTimecodeRP188VITC2                                        = 'rp12',	// RP188 timecode where DBB1 equals VITC2 (line 571)
+    bmdTimecodeRP188VITC2                                        = 'rp12',	// RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
     bmdTimecodeRP188LTC                                          = 'rplt',	// RP188 timecode where DBB1 equals LTC (line 10)
     bmdTimecodeRP188Any                                          = 'rp18',	// For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
     bmdTimecodeVITC                                              = 'vitc',
@@ -191,15 +213,6 @@
     bmdAnalogVideoFlagComponentBetacamLevels                     = 1 << 1
 };
 
-/* Enum BMDAudioConnection - Audio connection types */
-
-typedef uint32_t BMDAudioConnection;
-enum _BMDAudioConnection {
-    bmdAudioConnectionEmbedded                                   = 'embd',
-    bmdAudioConnectionAESEBU                                     = 'aes ',
-    bmdAudioConnectionAnalog                                     = 'anlg'
-};
-
 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
 
 typedef uint32_t BMDAudioOutputAnalogAESSwitch;
@@ -280,15 +293,24 @@
     BMDDeckLinkHasVideoInputAntiAliasingFilter                   = 'aafl',
     BMDDeckLinkHasBypass                                         = 'byps',
     BMDDeckLinkSupportsDesktopDisplay                            = 'extd',
+    BMDDeckLinkSupportsClockTimingAdjustment                     = 'ctad',
+    BMDDeckLinkSupportsFullDuplex                                = 'fdup',
+    BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset       = 'frin',
 
     /* Integers */
 
     BMDDeckLinkMaximumAudioChannels                              = 'mach',
+    BMDDeckLinkMaximumAnalogAudioChannels                        = 'aach',
     BMDDeckLinkNumberOfSubDevices                                = 'nsbd',
     BMDDeckLinkSubDeviceIndex                                    = 'subi',
+    BMDDeckLinkPersistentID                                      = 'peid',
+    BMDDeckLinkTopologicalID                                     = 'toid',
     BMDDeckLinkVideoOutputConnections                            = 'vocn',
     BMDDeckLinkVideoInputConnections                             = 'vicn',
+    BMDDeckLinkAudioOutputConnections                            = 'aocn',
+    BMDDeckLinkAudioInputConnections                             = 'aicn',
     BMDDeckLinkDeviceBusyState                                   = 'dbst',
+    BMDDeckLinkVideoIOSupport                                    = 'vios',	// Returns a BMDVideoIOSupport bit field
 
     /* Floats */
 
@@ -318,6 +340,14 @@
     bmdDeviceSerialPortBusy                                      = 1 << 2
 };
 
+/* Enum BMDVideoIOSupport - Device video input/output support */
+
+typedef uint32_t BMDVideoIOSupport;
+enum _BMDVideoIOSupport {
+    bmdDeviceSupportsCapture                                     = 1 << 0,
+    bmdDeviceSupportsPlayback                                    = 1 << 1
+};
+
 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
 
 typedef uint32_t BMD3DPreviewFormat;
@@ -329,6 +359,13 @@
     bmd3DPreviewFormatTopBottom                                  = 'topb'
 };
 
+/* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
+
+typedef uint32_t BMDNotifications;
+enum _BMDNotifications {
+    bmdPreferencesChanged                                        = 'pref'
+};
+
 #if defined(__cplusplus)
 
 // Forward Declarations
@@ -350,9 +387,13 @@
 class IDeckLinkScreenPreviewCallback;
 class IDeckLinkCocoaScreenPreviewCallback;
 class IDeckLinkGLScreenPreviewHelper;
+class IDeckLinkNotificationCallback;
+class IDeckLinkNotification;
 class IDeckLinkAttributes;
 class IDeckLinkKeyer;
 class IDeckLinkVideoConversion;
+class IDeckLinkDeviceNotificationCallback;
+class IDeckLinkDiscovery;
 
 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
 
@@ -363,7 +404,7 @@
     virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoOutputCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
@@ -375,7 +416,7 @@
     virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
 
 protected:
-    virtual ~IDeckLinkInputCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
@@ -417,7 +458,7 @@
     virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ CFStringRef *value) = 0;
 
 protected:
-    virtual ~IDeckLinkAPIInformation () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
@@ -471,9 +512,10 @@
     /* Hardware Timing */
 
     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
+    virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *frameCompletionTimestamp) = 0;
 
 protected:
-    virtual ~IDeckLinkOutput () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
@@ -491,6 +533,7 @@
     virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
     virtual HRESULT DisableVideoInput (void) = 0;
     virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
+    virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
 
     /* Audio Input */
 
@@ -511,7 +554,7 @@
     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkInput () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkInput () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
@@ -530,7 +573,7 @@
     virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
@@ -546,7 +589,7 @@
     virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
 
 protected:
-    virtual ~IDeckLinkMutableVideoFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
@@ -558,7 +601,7 @@
     virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrame3DExtensions () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
@@ -570,7 +613,7 @@
     virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoInputFrame () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
@@ -584,7 +627,7 @@
     virtual BMDDisplayMode GetDisplayMode (void) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoFrameAncillary () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
@@ -597,7 +640,7 @@
     virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
 
 protected:
-    virtual ~IDeckLinkAudioInputPacket () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
@@ -608,7 +651,7 @@
     virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkScreenPreviewCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkCocoaScreenPreviewCallback - Screen preview callback for Cocoa-based applications */
@@ -618,7 +661,7 @@
 public:
 
 protected:
-    virtual ~IDeckLinkCocoaScreenPreviewCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkCocoaScreenPreviewCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
@@ -635,7 +678,24 @@
     virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
 
 protected:
-    virtual ~IDeckLinkGLScreenPreviewHelper () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
+};
+
+/* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
+
+class IDeckLinkNotificationCallback : public IUnknown
+{
+public:
+    virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
+};
+
+/* Interface IDeckLinkNotification - DeckLink Notification interface */
+
+class IDeckLinkNotification : public IUnknown
+{
+public:
+    virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
+    virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
 };
 
 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
@@ -649,7 +709,7 @@
     virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ CFStringRef *value) = 0;
 
 protected:
-    virtual ~IDeckLinkAttributes () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkAttributes () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
@@ -664,7 +724,7 @@
     virtual HRESULT Disable (void) = 0;
 
 protected:
-    virtual ~IDeckLinkKeyer () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
@@ -675,7 +735,31 @@
     virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
 
 protected:
-    virtual ~IDeckLinkVideoConversion () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
+};
+
+/* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
+
+class IDeckLinkDeviceNotificationCallback : public IUnknown
+{
+public:
+    virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
+    virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
+
+protected:
+    virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
+};
+
+/* Interface IDeckLinkDiscovery - DeckLink device discovery */
+
+class IDeckLinkDiscovery : public IUnknown
+{
+public:
+    virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
+    virtual HRESULT UninstallDeviceNotifications (void) = 0;
+
+protected:
+    virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -683,12 +767,13 @@
 extern "C" {
 
     IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
+    IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void);
     IDeckLinkAPIInformation* CreateDeckLinkAPIInformationInstance (void);
     IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
     IDeckLinkCocoaScreenPreviewCallback* CreateCocoaScreenPreview (void* /* (NSView*) */ parentView);
     IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
 
-};
+}
 
 
 #endif      // defined(__cplusplus)
diff --git a/sys/decklink/osx/DeckLinkAPIConfiguration.h b/sys/decklink/osx/DeckLinkAPIConfiguration.h
index f026e73..693fa38 100644
--- a/sys/decklink/osx/DeckLinkAPIConfiguration.h
+++ b/sys/decklink/osx/DeckLinkAPIConfiguration.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,12 +28,21 @@
 #ifndef BMD_DECKLINKAPICONFIGURATION_H
 #define BMD_DECKLINKAPICONFIGURATION_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkConfiguration                       /* C679A35B-610C-4D09-B748-1D0478100FC0 */ (REFIID){0xC6,0x79,0xA3,0x5B,0x61,0x0C,0x4D,0x09,0xB7,0x48,0x1D,0x04,0x78,0x10,0x0F,0xC0}
+BMD_CONST REFIID IID_IDeckLinkConfiguration                       = /* 1E69FCF6-4203-4936-8076-2A9F4CFD50CB */ {0x1E,0x69,0xFC,0xF6,0x42,0x03,0x49,0x36,0x80,0x76,0x2A,0x9F,0x4C,0xFD,0x50,0xCB};
 
 /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
 
@@ -52,6 +61,7 @@
 
     bmdDeckLinkConfigHDMI3DPackingFormat                         = '3dpf',
     bmdDeckLinkConfigBypass                                      = 'byps',
+    bmdDeckLinkConfigClockTimingAdjustment                       = 'ctad',
 
     /* Audio Input/Output Flags */
 
@@ -62,7 +72,7 @@
     bmdDeckLinkConfigFieldFlickerRemoval                         = 'fdfr',
     bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion            = 'to59',
     bmdDeckLinkConfig444SDIVideoOutput                           = '444o',
-    bmdDeckLinkConfig3GBpsVideoOutput                            = '3gbs',
+    bmdDeckLinkConfigSingleLinkVideoOutput                       = 'sglo',
     bmdDeckLinkConfigBlackVideoOutputDuringCapture               = 'bvoc',
     bmdDeckLinkConfigLowLatencyVideoOutput                       = 'llvo',
 
@@ -73,6 +83,8 @@
     bmdDeckLinkConfigAnalogVideoOutputFlags                      = 'avof',
     bmdDeckLinkConfigReferenceInputTimingOffset                  = 'glot',
     bmdDeckLinkConfigVideoOutputIdleOperation                    = 'voio',
+    bmdDeckLinkConfigDefaultVideoOutputMode                      = 'dvom',
+    bmdDeckLinkConfigDefaultVideoOutputModeFlags                 = 'dvof',
 
     /* Video Output Floats */
 
@@ -87,6 +99,7 @@
     /* Video Input Flags */
 
     bmdDeckLinkConfigVideoInputScanning                          = 'visc',	// Applicable to H264 Pro Recorder only
+    bmdDeckLinkConfigUseDedicatedLTCInput                        = 'dltc',	// Use timecode from LTC input instead of SDI stream
 
     /* Video Input Integers */
 
@@ -97,6 +110,7 @@
     bmdDeckLinkConfigVANCSourceLine1Mapping                      = 'vsl1',
     bmdDeckLinkConfigVANCSourceLine2Mapping                      = 'vsl2',
     bmdDeckLinkConfigVANCSourceLine3Mapping                      = 'vsl3',
+    bmdDeckLinkConfigCapturePassThroughMode                      = 'cptm',
 
     /* Video Input Floats */
 
@@ -153,7 +167,7 @@
     virtual HRESULT WriteConfigurationToPreferences (void) = 0;
 
 protected:
-    virtual ~IDeckLinkConfiguration () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -161,7 +175,7 @@
 extern "C" {
 
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */
diff --git a/sys/decklink/osx/DeckLinkAPIDeckControl.h b/sys/decklink/osx/DeckLinkAPIDeckControl.h
index ea32657..4075f32 100644
--- a/sys/decklink/osx/DeckLinkAPIDeckControl.h
+++ b/sys/decklink/osx/DeckLinkAPIDeckControl.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,13 +28,22 @@
 #ifndef BMD_DECKLINKAPIDECKCONTROL_H
 #define BMD_DECKLINKAPIDECKCONTROL_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkDeckControlStatusCallback           /* 53436FFB-B434-4906-BADC-AE3060FFE8EF */ (REFIID){0x53,0x43,0x6F,0xFB,0xB4,0x34,0x49,0x06,0xBA,0xDC,0xAE,0x30,0x60,0xFF,0xE8,0xEF}
-#define IID_IDeckLinkDeckControl                         /* 8E1C3ACE-19C7-4E00-8B92-D80431D958BE */ (REFIID){0x8E,0x1C,0x3A,0xCE,0x19,0xC7,0x4E,0x00,0x8B,0x92,0xD8,0x04,0x31,0xD9,0x58,0xBE}
+BMD_CONST REFIID IID_IDeckLinkDeckControlStatusCallback           = /* 53436FFB-B434-4906-BADC-AE3060FFE8EF */ {0x53,0x43,0x6F,0xFB,0xB4,0x34,0x49,0x06,0xBA,0xDC,0xAE,0x30,0x60,0xFF,0xE8,0xEF};
+BMD_CONST REFIID IID_IDeckLinkDeckControl                         = /* 8E1C3ACE-19C7-4E00-8B92-D80431D958BE */ {0x8E,0x1C,0x3A,0xCE,0x19,0xC7,0x4E,0x00,0x8B,0x92,0xD8,0x04,0x31,0xD9,0x58,0xBE};
 
 /* Enum BMDDeckControlMode - DeckControl mode */
 
@@ -149,7 +158,7 @@
     virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
 
 protected:
-    virtual ~IDeckLinkDeckControlStatusCallback () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDeckControlStatusCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkDeckControl - Deck Control main interface */
@@ -192,7 +201,7 @@
     virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback *callback) = 0;
 
 protected:
-    virtual ~IDeckLinkDeckControl () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDeckControl () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -200,7 +209,7 @@
 extern "C" {
 
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPIDECKCONTROL_H) */
diff --git a/sys/decklink/osx/DeckLinkAPIDiscovery.h b/sys/decklink/osx/DeckLinkAPIDiscovery.h
index 99fc0fe..adbde29 100644
--- a/sys/decklink/osx/DeckLinkAPIDiscovery.h
+++ b/sys/decklink/osx/DeckLinkAPIDiscovery.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,12 +28,21 @@
 #ifndef BMD_DECKLINKAPIDISCOVERY_H
 #define BMD_DECKLINKAPIDISCOVERY_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 
 // Interface ID Declarations
 
-#define IID_IDeckLink                                    /* C418FBDD-0587-48ED-8FE5-640F0A14AF91 */ (REFIID){0xC4,0x18,0xFB,0xDD,0x05,0x87,0x48,0xED,0x8F,0xE5,0x64,0x0F,0x0A,0x14,0xAF,0x91}
+BMD_CONST REFIID IID_IDeckLink                                    = /* C418FBDD-0587-48ED-8FE5-640F0A14AF91 */ {0xC4,0x18,0xFB,0xDD,0x05,0x87,0x48,0xED,0x8F,0xE5,0x64,0x0F,0x0A,0x14,0xAF,0x91};
 
 // Forward Declarations
 
@@ -48,7 +57,7 @@
     virtual HRESULT GetDisplayName (/* out */ CFStringRef *displayName) = 0;
 
 protected:
-    virtual ~IDeckLink () {}; // call Release method to drop reference count
+    virtual ~IDeckLink () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -56,7 +65,7 @@
 extern "C" {
 
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPIDISCOVERY_H) */
diff --git a/sys/decklink/osx/DeckLinkAPIDispatch-osx.cpp b/sys/decklink/osx/DeckLinkAPIDispatch.cpp
similarity index 90%
rename from sys/decklink/osx/DeckLinkAPIDispatch-osx.cpp
rename to sys/decklink/osx/DeckLinkAPIDispatch.cpp
index 18b0122..cb646de 100644
--- a/sys/decklink/osx/DeckLinkAPIDispatch-osx.cpp
+++ b/sys/decklink/osx/DeckLinkAPIDispatch.cpp
@@ -33,13 +33,15 @@
 	#error The DeckLink API version of DeckLinkAPIDispatch.cpp is not the same version as DeckLinkAPI.h
 #endif
 
-#define kDeckLinkAPI_BundlePath "/Library/Application Support/Blackmagic Design/Blackmagic DeckLink/DeckLinkAPI.bundle"
+#define kDeckLinkAPI_BundlePath "/Library/Frameworks/DeckLinkAPI.framework"
+
 
 typedef IDeckLinkIterator* (*CreateIteratorFunc)(void);
 typedef IDeckLinkAPIInformation* (*CreateAPIInformationFunc)(void);
 typedef IDeckLinkGLScreenPreviewHelper* (*CreateOpenGLScreenPreviewHelperFunc)(void);
 typedef IDeckLinkCocoaScreenPreviewCallback* (*CreateCocoaScreenPreviewFunc)(void*);
 typedef IDeckLinkVideoConversion* (*CreateVideoConversionInstanceFunc)(void);
+typedef IDeckLinkDiscovery* (*CreateDeckLinkDiscoveryInstanceFunc)(void);
 
 static pthread_once_t						gDeckLinkOnceControl		= PTHREAD_ONCE_INIT;
 static CFBundleRef							gDeckLinkAPIBundleRef		= NULL;
@@ -48,6 +50,7 @@
 static CreateOpenGLScreenPreviewHelperFunc	gCreateOpenGLPreviewFunc	= NULL;
 static CreateCocoaScreenPreviewFunc			gCreateCocoaPreviewFunc		= NULL;
 static CreateVideoConversionInstanceFunc	gCreateVideoConversionFunc	= NULL;
+static CreateDeckLinkDiscoveryInstanceFunc  gCreateDeckLinkDiscoveryFunc= NULL;
 
 
 void	InitDeckLinkAPI (void)
@@ -65,6 +68,7 @@
 			gCreateOpenGLPreviewFunc = (CreateOpenGLScreenPreviewHelperFunc)CFBundleGetFunctionPointerForName(gDeckLinkAPIBundleRef, CFSTR("CreateOpenGLScreenPreviewHelper_0001"));
 			gCreateCocoaPreviewFunc = (CreateCocoaScreenPreviewFunc)CFBundleGetFunctionPointerForName(gDeckLinkAPIBundleRef, CFSTR("CreateCocoaScreenPreview_0001"));
 			gCreateVideoConversionFunc = (CreateVideoConversionInstanceFunc)CFBundleGetFunctionPointerForName(gDeckLinkAPIBundleRef, CFSTR("CreateVideoConversionInstance_0001"));
+            gCreateDeckLinkDiscoveryFunc = (CreateDeckLinkDiscoveryInstanceFunc)CFBundleGetFunctionPointerForName(gDeckLinkAPIBundleRef, CFSTR("CreateDeckLinkDiscoveryInstance_0001"));
 		}
 		CFRelease(bundleURL);
 	}
@@ -129,6 +133,17 @@
 	return gCreateVideoConversionFunc();
 }
 
+IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void)
+{
+	pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI);
+	
+	if (gCreateDeckLinkDiscoveryFunc == NULL)
+		return NULL;
+	
+	return gCreateDeckLinkDiscoveryFunc();
+}
+
+
 #define kBMDStreamingAPI_BundlePath "/Library/Application Support/Blackmagic Design/Streaming/BMDStreamingAPI.bundle"
 
 typedef IBMDStreamingDiscovery* (*CreateDiscoveryFunc)(void);
diff --git a/sys/decklink/osx/DeckLinkAPIModes.h b/sys/decklink/osx/DeckLinkAPIModes.h
index 8b07592..478a2fd 100644
--- a/sys/decklink/osx/DeckLinkAPIModes.h
+++ b/sys/decklink/osx/DeckLinkAPIModes.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,13 +28,22 @@
 #ifndef BMD_DECKLINKAPIMODES_H
 #define BMD_DECKLINKAPIMODES_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkDisplayModeIterator                 /* 9C88499F-F601-4021-B80B-032E4EB41C35 */ (REFIID){0x9C,0x88,0x49,0x9F,0xF6,0x01,0x40,0x21,0xB8,0x0B,0x03,0x2E,0x4E,0xB4,0x1C,0x35}
-#define IID_IDeckLinkDisplayMode                         /* 3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78 */ (REFIID){0x3E,0xB2,0xC1,0xAB,0x0A,0x3D,0x45,0x23,0xA3,0xAD,0xF4,0x0D,0x7F,0xB1,0x4E,0x78}
+BMD_CONST REFIID IID_IDeckLinkDisplayModeIterator                 = /* 9C88499F-F601-4021-B80B-032E4EB41C35 */ {0x9C,0x88,0x49,0x9F,0xF6,0x01,0x40,0x21,0xB8,0x0B,0x03,0x2E,0x4E,0xB4,0x1C,0x35};
+BMD_CONST REFIID IID_IDeckLinkDisplayMode                         = /* 3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78 */ {0x3E,0xB2,0xC1,0xAB,0x0A,0x3D,0x45,0x23,0xA3,0xAD,0xF4,0x0D,0x7F,0xB1,0x4E,0x78};
 
 /* Enum BMDDisplayMode - Video display modes */
 
@@ -75,6 +84,29 @@
     bmdMode2k24                                                  = '2k24',
     bmdMode2k25                                                  = '2k25',
 
+    /* DCI Modes (output only) */
+
+    bmdMode2kDCI2398                                             = '2d23',
+    bmdMode2kDCI24                                               = '2d24',
+    bmdMode2kDCI25                                               = '2d25',
+
+    /* 4k Modes */
+
+    bmdMode4K2160p2398                                           = '4k23',
+    bmdMode4K2160p24                                             = '4k24',
+    bmdMode4K2160p25                                             = '4k25',
+    bmdMode4K2160p2997                                           = '4k29',
+    bmdMode4K2160p30                                             = '4k30',
+    bmdMode4K2160p50                                             = '4k50',
+    bmdMode4K2160p5994                                           = '4k59',
+    bmdMode4K2160p60                                             = '4k60',
+
+    /* DCI Modes (output only) */
+
+    bmdMode4kDCI2398                                             = '4d23',
+    bmdMode4kDCI24                                               = '4d24',
+    bmdMode4kDCI25                                               = '4d25',
+
     /* Special Modes */
 
     bmdModeUnknown                                               = 'iunk'
@@ -99,7 +131,11 @@
     bmdFormat10BitYUV                                            = 'v210',
     bmdFormat8BitARGB                                            = 32,
     bmdFormat8BitBGRA                                            = 'BGRA',
-    bmdFormat10BitRGB                                            = 'r210'	// Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
+    bmdFormat10BitRGB                                            = 'r210',	// Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
+    bmdFormat12BitRGB                                            = 'R12B',	// Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component
+    bmdFormat12BitRGBLE                                          = 'R12L',	// Little-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component
+    bmdFormat10BitRGBXLE                                         = 'R10l',	// Little-endian 10-bit RGB with SMPTE video levels (64-940)
+    bmdFormat10BitRGBX                                           = 'R10b'	// Big-endian 10-bit RGB with SMPTE video levels (64-940)
 };
 
 /* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */
@@ -124,7 +160,7 @@
     virtual HRESULT Next (/* out */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
 
 protected:
-    virtual ~IDeckLinkDisplayModeIterator () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDisplayModeIterator () {} // call Release method to drop reference count
 };
 
 /* Interface IDeckLinkDisplayMode - represents a display mode */
@@ -141,7 +177,7 @@
     virtual BMDDisplayModeFlags GetFlags (void) = 0;
 
 protected:
-    virtual ~IDeckLinkDisplayMode () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkDisplayMode () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -149,7 +185,7 @@
 extern "C" {
 
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPIMODES_H) */
diff --git a/sys/decklink/osx/DeckLinkAPIStreaming.h b/sys/decklink/osx/DeckLinkAPIStreaming.h
index ecffb8d..725c187 100644
--- a/sys/decklink/osx/DeckLinkAPIStreaming.h
+++ b/sys/decklink/osx/DeckLinkAPIStreaming.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,22 +28,31 @@
 #ifndef BMD_DECKLINKAPISTREAMING_H
 #define BMD_DECKLINKAPISTREAMING_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 
 // Interface ID Declarations
 
-#define IID_IBMDStreamingDeviceNotificationCallback      /* F9531D64-3305-4B29-A387-7F74BB0D0E84 */ (REFIID){0xF9,0x53,0x1D,0x64,0x33,0x05,0x4B,0x29,0xA3,0x87,0x7F,0x74,0xBB,0x0D,0x0E,0x84}
-#define IID_IBMDStreamingH264InputCallback               /* 823C475F-55AE-46F9-890C-537CC5CEDCCA */ (REFIID){0x82,0x3C,0x47,0x5F,0x55,0xAE,0x46,0xF9,0x89,0x0C,0x53,0x7C,0xC5,0xCE,0xDC,0xCA}
-#define IID_IBMDStreamingDiscovery                       /* 2C837444-F989-4D87-901A-47C8A36D096D */ (REFIID){0x2C,0x83,0x74,0x44,0xF9,0x89,0x4D,0x87,0x90,0x1A,0x47,0xC8,0xA3,0x6D,0x09,0x6D}
-#define IID_IBMDStreamingVideoEncodingMode               /* 1AB8035B-CD13-458D-B6DF-5E8F7C2141D9 */ (REFIID){0x1A,0xB8,0x03,0x5B,0xCD,0x13,0x45,0x8D,0xB6,0xDF,0x5E,0x8F,0x7C,0x21,0x41,0xD9}
-#define IID_IBMDStreamingMutableVideoEncodingMode        /* 19BF7D90-1E0A-400D-B2C6-FFC4E78AD49D */ (REFIID){0x19,0xBF,0x7D,0x90,0x1E,0x0A,0x40,0x0D,0xB2,0xC6,0xFF,0xC4,0xE7,0x8A,0xD4,0x9D}
-#define IID_IBMDStreamingVideoEncodingModePresetIterator /* 7AC731A3-C950-4AD0-804A-8377AA51C6C4 */ (REFIID){0x7A,0xC7,0x31,0xA3,0xC9,0x50,0x4A,0xD0,0x80,0x4A,0x83,0x77,0xAA,0x51,0xC6,0xC4}
-#define IID_IBMDStreamingDeviceInput                     /* 24B6B6EC-1727-44BB-9818-34FF086ACF98 */ (REFIID){0x24,0xB6,0xB6,0xEC,0x17,0x27,0x44,0xBB,0x98,0x18,0x34,0xFF,0x08,0x6A,0xCF,0x98}
-#define IID_IBMDStreamingH264NALPacket                   /* E260E955-14BE-4395-9775-9F02CC0A9D89 */ (REFIID){0xE2,0x60,0xE9,0x55,0x14,0xBE,0x43,0x95,0x97,0x75,0x9F,0x02,0xCC,0x0A,0x9D,0x89}
-#define IID_IBMDStreamingAudioPacket                     /* D9EB5902-1AD2-43F4-9E2C-3CFA50B5EE19 */ (REFIID){0xD9,0xEB,0x59,0x02,0x1A,0xD2,0x43,0xF4,0x9E,0x2C,0x3C,0xFA,0x50,0xB5,0xEE,0x19}
-#define IID_IBMDStreamingMPEG2TSPacket                   /* 91810D1C-4FB3-4AAA-AE56-FA301D3DFA4C */ (REFIID){0x91,0x81,0x0D,0x1C,0x4F,0xB3,0x4A,0xAA,0xAE,0x56,0xFA,0x30,0x1D,0x3D,0xFA,0x4C}
-#define IID_IBMDStreamingH264NALParser                   /* 5867F18C-5BFA-4CCC-B2A7-9DFD140417D2 */ (REFIID){0x58,0x67,0xF1,0x8C,0x5B,0xFA,0x4C,0xCC,0xB2,0xA7,0x9D,0xFD,0x14,0x04,0x17,0xD2}
+BMD_CONST REFIID IID_IBMDStreamingDeviceNotificationCallback      = /* F9531D64-3305-4B29-A387-7F74BB0D0E84 */ {0xF9,0x53,0x1D,0x64,0x33,0x05,0x4B,0x29,0xA3,0x87,0x7F,0x74,0xBB,0x0D,0x0E,0x84};
+BMD_CONST REFIID IID_IBMDStreamingH264InputCallback               = /* 823C475F-55AE-46F9-890C-537CC5CEDCCA */ {0x82,0x3C,0x47,0x5F,0x55,0xAE,0x46,0xF9,0x89,0x0C,0x53,0x7C,0xC5,0xCE,0xDC,0xCA};
+BMD_CONST REFIID IID_IBMDStreamingDiscovery                       = /* 2C837444-F989-4D87-901A-47C8A36D096D */ {0x2C,0x83,0x74,0x44,0xF9,0x89,0x4D,0x87,0x90,0x1A,0x47,0xC8,0xA3,0x6D,0x09,0x6D};
+BMD_CONST REFIID IID_IBMDStreamingVideoEncodingMode               = /* 1AB8035B-CD13-458D-B6DF-5E8F7C2141D9 */ {0x1A,0xB8,0x03,0x5B,0xCD,0x13,0x45,0x8D,0xB6,0xDF,0x5E,0x8F,0x7C,0x21,0x41,0xD9};
+BMD_CONST REFIID IID_IBMDStreamingMutableVideoEncodingMode        = /* 19BF7D90-1E0A-400D-B2C6-FFC4E78AD49D */ {0x19,0xBF,0x7D,0x90,0x1E,0x0A,0x40,0x0D,0xB2,0xC6,0xFF,0xC4,0xE7,0x8A,0xD4,0x9D};
+BMD_CONST REFIID IID_IBMDStreamingVideoEncodingModePresetIterator = /* 7AC731A3-C950-4AD0-804A-8377AA51C6C4 */ {0x7A,0xC7,0x31,0xA3,0xC9,0x50,0x4A,0xD0,0x80,0x4A,0x83,0x77,0xAA,0x51,0xC6,0xC4};
+BMD_CONST REFIID IID_IBMDStreamingDeviceInput                     = /* 24B6B6EC-1727-44BB-9818-34FF086ACF98 */ {0x24,0xB6,0xB6,0xEC,0x17,0x27,0x44,0xBB,0x98,0x18,0x34,0xFF,0x08,0x6A,0xCF,0x98};
+BMD_CONST REFIID IID_IBMDStreamingH264NALPacket                   = /* E260E955-14BE-4395-9775-9F02CC0A9D89 */ {0xE2,0x60,0xE9,0x55,0x14,0xBE,0x43,0x95,0x97,0x75,0x9F,0x02,0xCC,0x0A,0x9D,0x89};
+BMD_CONST REFIID IID_IBMDStreamingAudioPacket                     = /* D9EB5902-1AD2-43F4-9E2C-3CFA50B5EE19 */ {0xD9,0xEB,0x59,0x02,0x1A,0xD2,0x43,0xF4,0x9E,0x2C,0x3C,0xFA,0x50,0xB5,0xEE,0x19};
+BMD_CONST REFIID IID_IBMDStreamingMPEG2TSPacket                   = /* 91810D1C-4FB3-4AAA-AE56-FA301D3DFA4C */ {0x91,0x81,0x0D,0x1C,0x4F,0xB3,0x4A,0xAA,0xAE,0x56,0xFA,0x30,0x1D,0x3D,0xFA,0x4C};
+BMD_CONST REFIID IID_IBMDStreamingH264NALParser                   = /* 5867F18C-5BFA-4CCC-B2A7-9DFD140417D2 */ {0x58,0x67,0xF1,0x8C,0x5B,0xFA,0x4C,0xCC,0xB2,0xA7,0x9D,0xFD,0x14,0x04,0x17,0xD2};
 
 /* Enum BMDStreamingDeviceMode - Device modes */
 
@@ -187,7 +196,7 @@
     virtual HRESULT StreamingDeviceModeChanged (/* in */ IDeckLink* device, /* in */ BMDStreamingDeviceMode mode) = 0;
 
 protected:
-    virtual ~IBMDStreamingDeviceNotificationCallback () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingDeviceNotificationCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingH264InputCallback - H264 input callbacks. */
@@ -203,7 +212,7 @@
     virtual HRESULT H264VideoInputModeChanged (void) = 0;
 
 protected:
-    virtual ~IBMDStreamingH264InputCallback () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingH264InputCallback () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingDiscovery - Installs device notifications */
@@ -215,7 +224,7 @@
     virtual HRESULT UninstallDeviceNotifications (void) = 0;
 
 protected:
-    virtual ~IBMDStreamingDiscovery () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingDiscovery () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingVideoEncodingMode - Represents an encoded video mode. */
@@ -238,7 +247,7 @@
     virtual HRESULT CreateMutableVideoEncodingMode (/* out */ IBMDStreamingMutableVideoEncodingMode** newEncodingMode) = 0; // Creates a mutable copy of the encoding mode
 
 protected:
-    virtual ~IBMDStreamingVideoEncodingMode () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingVideoEncodingMode () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingMutableVideoEncodingMode - Represents a mutable encoded video mode. */
@@ -254,7 +263,7 @@
     virtual HRESULT SetString (/* in */ BMDStreamingEncodingModePropertyID cfgID, /* in */ CFStringRef value) = 0;
 
 protected:
-    virtual ~IBMDStreamingMutableVideoEncodingMode () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingMutableVideoEncodingMode () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingVideoEncodingModePresetIterator - Enumerates encoding mode presets */
@@ -265,7 +274,7 @@
     virtual HRESULT Next (/* out */ IBMDStreamingVideoEncodingMode** videoEncodingMode) = 0;
 
 protected:
-    virtual ~IBMDStreamingVideoEncodingModePresetIterator () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingVideoEncodingModePresetIterator () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingDeviceInput - Created by QueryInterface from IDeckLink */
@@ -295,7 +304,7 @@
     virtual HRESULT SetCallback (/* in */ IUnknown* theCallback) = 0;
 
 protected:
-    virtual ~IBMDStreamingDeviceInput () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingDeviceInput () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingH264NALPacket - Represent an H.264 NAL packet */
@@ -307,10 +316,10 @@
     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
     virtual HRESULT GetBytesWithSizePrefix (/* out */ void** buffer) = 0; // Contains a 32-bit unsigned big endian size prefix
     virtual HRESULT GetDisplayTime (/* in */ uint64_t requestedTimeScale, /* out */ uint64_t* displayTime) = 0;
-    virtual HRESULT GetPacketIndex (/* out */ uint32_t* packetIndex) = 0;
+    virtual HRESULT GetPacketIndex (/* out */ uint32_t* packetIndex) = 0; // Deprecated
 
 protected:
-    virtual ~IBMDStreamingH264NALPacket () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingH264NALPacket () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingAudioPacket - Represents a chunk of audio data */
@@ -322,10 +331,10 @@
     virtual long GetPayloadSize (void) = 0;
     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
     virtual HRESULT GetPlayTime (/* in */ uint64_t requestedTimeScale, /* out */ uint64_t* playTime) = 0;
-    virtual HRESULT GetPacketIndex (/* out */ uint32_t* packetIndex) = 0;
+    virtual HRESULT GetPacketIndex (/* out */ uint32_t* packetIndex) = 0; // Deprecated
 
 protected:
-    virtual ~IBMDStreamingAudioPacket () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingAudioPacket () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingMPEG2TSPacket - Represent an MPEG2 Transport Stream packet */
@@ -337,7 +346,7 @@
     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
 
 protected:
-    virtual ~IBMDStreamingMPEG2TSPacket () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingMPEG2TSPacket () {} // call Release method to drop reference count
 };
 
 /* Interface IBMDStreamingH264NALParser - For basic NAL parsing */
@@ -350,7 +359,7 @@
     virtual HRESULT GetProfileAndLevelFromSPS (/* in */ IBMDStreamingH264NALPacket* nal, /* out */ uint32_t* profileIdc, /* out */ uint32_t* profileCompatability, /* out */ uint32_t* levelIdc) = 0;
 
 protected:
-    virtual ~IBMDStreamingH264NALParser () {}; // call Release method to drop reference count
+    virtual ~IBMDStreamingH264NALParser () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -360,7 +369,7 @@
     IBMDStreamingDiscovery* CreateBMDStreamingDiscoveryInstance (void);
     IBMDStreamingH264NALParser* CreateBMDStreamingH264NALParser (void);
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPISTREAMING_H) */
diff --git a/sys/decklink/osx/DeckLinkAPITypes.h b/sys/decklink/osx/DeckLinkAPITypes.h
index ed54d8e..396680c 100644
--- a/sys/decklink/osx/DeckLinkAPITypes.h
+++ b/sys/decklink/osx/DeckLinkAPITypes.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
-** Copyright (c) 2011 Blackmagic Design
+** Copyright (c) 2014 Blackmagic Design
 **
 ** Permission is hereby granted, free of charge, to any person or organization
 ** obtaining a copy of the software and accompanying documentation covered by
@@ -28,6 +28,15 @@
 #ifndef BMD_DECKLINKAPITYPES_H
 #define BMD_DECKLINKAPITYPES_H
 
+
+#ifndef BMD_CONST
+    #if defined(_MSC_VER)
+        #define BMD_CONST __declspec(selectany) static const
+    #else
+        #define BMD_CONST static const
+    #endif
+#endif
+
 // Type Declarations
 
 typedef int64_t BMDTimeValue;
@@ -37,14 +46,15 @@
 
 // Interface ID Declarations
 
-#define IID_IDeckLinkTimecode                            /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ (REFIID){0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40}
+BMD_CONST REFIID IID_IDeckLinkTimecode                            = /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ {0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40};
 
 /* Enum BMDTimecodeFlags - Timecode flags */
 
 typedef uint32_t BMDTimecodeFlags;
 enum _BMDTimecodeFlags {
     bmdTimecodeFlagDefault                                       = 0,
-    bmdTimecodeIsDropFrame                                       = 1 << 0
+    bmdTimecodeIsDropFrame                                       = 1 << 0,
+    bmdTimecodeFieldMark                                         = 1 << 1
 };
 
 /* Enum BMDVideoConnection - Video connection types */
@@ -59,6 +69,17 @@
     bmdVideoConnectionSVideo                                     = 1 << 5
 };
 
+/* Enum BMDAudioConnection - Audio connection types */
+
+typedef uint32_t BMDAudioConnection;
+enum _BMDAudioConnection {
+    bmdAudioConnectionEmbedded                                   = 1 << 0,
+    bmdAudioConnectionAESEBU                                     = 1 << 1,
+    bmdAudioConnectionAnalog                                     = 1 << 2,
+    bmdAudioConnectionAnalogXLR                                  = 1 << 3,
+    bmdAudioConnectionAnalogRCA                                  = 1 << 4
+};
+
 // Forward Declarations
 
 class IDeckLinkTimecode;
@@ -75,7 +96,7 @@
     virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
 
 protected:
-    virtual ~IDeckLinkTimecode () {}; // call Release method to drop reference count
+    virtual ~IDeckLinkTimecode () {} // call Release method to drop reference count
 };
 
 /* Functions */
@@ -83,7 +104,7 @@
 extern "C" {
 
 
-};
+}
 
 
 #endif /* defined(BMD_DECKLINKAPITYPES_H) */
diff --git a/sys/decklink/osx/DeckLinkAPIVersion.h b/sys/decklink/osx/DeckLinkAPIVersion.h
index 2681ed0..4e41492 100644
--- a/sys/decklink/osx/DeckLinkAPIVersion.h
+++ b/sys/decklink/osx/DeckLinkAPIVersion.h
@@ -1,5 +1,5 @@
 /* -LICENSE-START-
- * ** Copyright (c) 2011 Blackmagic Design
+ * ** Copyright (c) 2014 Blackmagic Design
  * **
  * ** Permission is hereby granted, free of charge, to any person or organization
  * ** obtaining a copy of the software and accompanying documentation covered by
@@ -27,11 +27,11 @@
 
 /* DeckLinkAPIVersion.h */
 
-#ifndef __DeckLink_API_Verison_h__
+#ifndef __DeckLink_API_Version_h__
 #define __DeckLink_API_Version_h__
 
-#define BLACKMAGIC_DECKLINK_API_VERSION					0x09000000
-#define BLACKMAGIC_DECKLINK_API_VERSION_STRING			"9.0"
+#define BLACKMAGIC_DECKLINK_API_VERSION					0x0a030100
+#define BLACKMAGIC_DECKLINK_API_VERSION_STRING			"10.3.1"
 
 #endif	// __DeckLink_API_Version_h__
 
diff --git a/sys/decklink/win/DeckLinkAPI.h b/sys/decklink/win/DeckLinkAPI.h
index 0341ce8..90d1a28 100644
--- a/sys/decklink/win/DeckLinkAPI.h
+++ b/sys/decklink/win/DeckLinkAPI.h
@@ -1,9217 +1,13312 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0500 */
-/* at Fri Jun 17 10:43:51 2011
- */
-/* Compiler settings for .\win\DeckLinkAPI.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 475
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-
-#ifndef __DeckLinkAPI_h__
-#define __DeckLinkAPI_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IDeckLinkVideoOutputCallback_FWD_DEFINED__
-#define __IDeckLinkVideoOutputCallback_FWD_DEFINED__
-typedef interface IDeckLinkVideoOutputCallback IDeckLinkVideoOutputCallback;
-#endif 	/* __IDeckLinkVideoOutputCallback_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_FWD_DEFINED__
-#define __IDeckLinkInputCallback_FWD_DEFINED__
-typedef interface IDeckLinkInputCallback IDeckLinkInputCallback;
-#endif 	/* __IDeckLinkInputCallback_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkMemoryAllocator_FWD_DEFINED__
-#define __IDeckLinkMemoryAllocator_FWD_DEFINED__
-typedef interface IDeckLinkMemoryAllocator IDeckLinkMemoryAllocator;
-#endif 	/* __IDeckLinkMemoryAllocator_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioOutputCallback_FWD_DEFINED__
-#define __IDeckLinkAudioOutputCallback_FWD_DEFINED__
-typedef interface IDeckLinkAudioOutputCallback IDeckLinkAudioOutputCallback;
-#endif 	/* __IDeckLinkAudioOutputCallback_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkIterator_FWD_DEFINED__
-#define __IDeckLinkIterator_FWD_DEFINED__
-typedef interface IDeckLinkIterator IDeckLinkIterator;
-#endif 	/* __IDeckLinkIterator_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkAPIInformation_FWD_DEFINED__
-#define __IDeckLinkAPIInformation_FWD_DEFINED__
-typedef interface IDeckLinkAPIInformation IDeckLinkAPIInformation;
-#endif 	/* __IDeckLinkAPIInformation_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_FWD_DEFINED__
-#define __IDeckLinkDisplayModeIterator_FWD_DEFINED__
-typedef interface IDeckLinkDisplayModeIterator IDeckLinkDisplayModeIterator;
-#endif 	/* __IDeckLinkDisplayModeIterator_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_FWD_DEFINED__
-#define __IDeckLinkDisplayMode_FWD_DEFINED__
-typedef interface IDeckLinkDisplayMode IDeckLinkDisplayMode;
-#endif 	/* __IDeckLinkDisplayMode_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLink_FWD_DEFINED__
-#define __IDeckLink_FWD_DEFINED__
-typedef interface IDeckLink IDeckLink;
-#endif 	/* __IDeckLink_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_FWD_DEFINED__
-#define __IDeckLinkOutput_FWD_DEFINED__
-typedef interface IDeckLinkOutput IDeckLinkOutput;
-#endif 	/* __IDeckLinkOutput_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_FWD_DEFINED__
-#define __IDeckLinkInput_FWD_DEFINED__
-typedef interface IDeckLinkInput IDeckLinkInput;
-#endif 	/* __IDeckLinkInput_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkTimecode_FWD_DEFINED__
-#define __IDeckLinkTimecode_FWD_DEFINED__
-typedef interface IDeckLinkTimecode IDeckLinkTimecode;
-#endif 	/* __IDeckLinkTimecode_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_FWD_DEFINED__
-#define __IDeckLinkVideoFrame_FWD_DEFINED__
-typedef interface IDeckLinkVideoFrame IDeckLinkVideoFrame;
-#endif 	/* __IDeckLinkVideoFrame_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkMutableVideoFrame_FWD_DEFINED__
-#define __IDeckLinkMutableVideoFrame_FWD_DEFINED__
-typedef interface IDeckLinkMutableVideoFrame IDeckLinkMutableVideoFrame;
-#endif 	/* __IDeckLinkMutableVideoFrame_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__
-#define __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__
-typedef interface IDeckLinkVideoFrame3DExtensions IDeckLinkVideoFrame3DExtensions;
-#endif 	/* __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_FWD_DEFINED__
-#define __IDeckLinkVideoInputFrame_FWD_DEFINED__
-typedef interface IDeckLinkVideoInputFrame IDeckLinkVideoInputFrame;
-#endif 	/* __IDeckLinkVideoInputFrame_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrameAncillary_FWD_DEFINED__
-#define __IDeckLinkVideoFrameAncillary_FWD_DEFINED__
-typedef interface IDeckLinkVideoFrameAncillary IDeckLinkVideoFrameAncillary;
-#endif 	/* __IDeckLinkVideoFrameAncillary_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioInputPacket_FWD_DEFINED__
-#define __IDeckLinkAudioInputPacket_FWD_DEFINED__
-typedef interface IDeckLinkAudioInputPacket IDeckLinkAudioInputPacket;
-#endif 	/* __IDeckLinkAudioInputPacket_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkScreenPreviewCallback_FWD_DEFINED__
-#define __IDeckLinkScreenPreviewCallback_FWD_DEFINED__
-typedef interface IDeckLinkScreenPreviewCallback IDeckLinkScreenPreviewCallback;
-#endif 	/* __IDeckLinkScreenPreviewCallback_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__
-#define __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__
-typedef interface IDeckLinkGLScreenPreviewHelper IDeckLinkGLScreenPreviewHelper;
-#endif 	/* __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkConfiguration_FWD_DEFINED__
-#define __IDeckLinkConfiguration_FWD_DEFINED__
-typedef interface IDeckLinkConfiguration IDeckLinkConfiguration;
-#endif 	/* __IDeckLinkConfiguration_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkAttributes_FWD_DEFINED__
-#define __IDeckLinkAttributes_FWD_DEFINED__
-typedef interface IDeckLinkAttributes IDeckLinkAttributes;
-#endif 	/* __IDeckLinkAttributes_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkKeyer_FWD_DEFINED__
-#define __IDeckLinkKeyer_FWD_DEFINED__
-typedef interface IDeckLinkKeyer IDeckLinkKeyer;
-#endif 	/* __IDeckLinkKeyer_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoConversion_FWD_DEFINED__
-#define __IDeckLinkVideoConversion_FWD_DEFINED__
-typedef interface IDeckLinkVideoConversion IDeckLinkVideoConversion;
-#endif 	/* __IDeckLinkVideoConversion_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__
-#define __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__
-typedef interface IDeckLinkDeckControlStatusCallback IDeckLinkDeckControlStatusCallback;
-#endif 	/* __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDeckControl_FWD_DEFINED__
-#define __IDeckLinkDeckControl_FWD_DEFINED__
-typedef interface IDeckLinkDeckControl IDeckLinkDeckControl;
-#endif 	/* __IDeckLinkDeckControl_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkIterator_FWD_DEFINED__
-#define __CDeckLinkIterator_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkIterator CDeckLinkIterator;
-#else
-typedef struct CDeckLinkIterator CDeckLinkIterator;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkIterator_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkAPIInformation_FWD_DEFINED__
-#define __CDeckLinkAPIInformation_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkAPIInformation CDeckLinkAPIInformation;
-#else
-typedef struct CDeckLinkAPIInformation CDeckLinkAPIInformation;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkAPIInformation_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__
-#define __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkGLScreenPreviewHelper CDeckLinkGLScreenPreviewHelper;
-#else
-typedef struct CDeckLinkGLScreenPreviewHelper CDeckLinkGLScreenPreviewHelper;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkVideoConversion_FWD_DEFINED__
-#define __CDeckLinkVideoConversion_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkVideoConversion CDeckLinkVideoConversion;
-#else
-typedef struct CDeckLinkVideoConversion CDeckLinkVideoConversion;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkVideoConversion_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDeckControl_v7_9_FWD_DEFINED__
-#define __IDeckLinkDeckControl_v7_9_FWD_DEFINED__
-typedef interface IDeckLinkDeckControl_v7_9 IDeckLinkDeckControl_v7_9;
-#endif 	/* __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__
-#define __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkDisplayModeIterator_v7_6 IDeckLinkDisplayModeIterator_v7_6;
-#endif 	/* __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__
-#define __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkDisplayMode_v7_6 IDeckLinkDisplayMode_v7_6;
-#endif 	/* __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_6_FWD_DEFINED__
-#define __IDeckLinkOutput_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkOutput_v7_6 IDeckLinkOutput_v7_6;
-#endif 	/* __IDeckLinkOutput_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_6_FWD_DEFINED__
-#define __IDeckLinkInput_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkInput_v7_6 IDeckLinkInput_v7_6;
-#endif 	/* __IDeckLinkInput_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkTimecode_v7_6_FWD_DEFINED__
-#define __IDeckLinkTimecode_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkTimecode_v7_6 IDeckLinkTimecode_v7_6;
-#endif 	/* __IDeckLinkTimecode_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__
-#define __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkVideoFrame_v7_6 IDeckLinkVideoFrame_v7_6;
-#endif 	/* __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__
-#define __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkMutableVideoFrame_v7_6 IDeckLinkMutableVideoFrame_v7_6;
-#endif 	/* __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkVideoInputFrame_v7_6 IDeckLinkVideoInputFrame_v7_6;
-#endif 	/* __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__
-#define __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkScreenPreviewCallback_v7_6 IDeckLinkScreenPreviewCallback_v7_6;
-#endif 	/* __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__
-#define __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkGLScreenPreviewHelper_v7_6 IDeckLinkGLScreenPreviewHelper_v7_6;
-#endif 	/* __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__
-#define __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkVideoConversion_v7_6 IDeckLinkVideoConversion_v7_6;
-#endif 	/* __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkConfiguration_v7_6_FWD_DEFINED__
-#define __IDeckLinkConfiguration_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkConfiguration_v7_6 IDeckLinkConfiguration_v7_6;
-#endif 	/* __IDeckLinkConfiguration_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__
-#define __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkVideoOutputCallback_v7_6 IDeckLinkVideoOutputCallback_v7_6;
-#endif 	/* __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_v7_6_FWD_DEFINED__
-#define __IDeckLinkInputCallback_v7_6_FWD_DEFINED__
-typedef interface IDeckLinkInputCallback_v7_6 IDeckLinkInputCallback_v7_6;
-#endif 	/* __IDeckLinkInputCallback_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__
-#define __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkGLScreenPreviewHelper_v7_6 CDeckLinkGLScreenPreviewHelper_v7_6;
-#else
-typedef struct CDeckLinkGLScreenPreviewHelper_v7_6 CDeckLinkGLScreenPreviewHelper_v7_6;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__
-#define __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CDeckLinkVideoConversion_v7_6 CDeckLinkVideoConversion_v7_6;
-#else
-typedef struct CDeckLinkVideoConversion_v7_6 CDeckLinkVideoConversion_v7_6;
-#endif /* __cplusplus */
-
-#endif 	/* __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_v7_3_FWD_DEFINED__
-#define __IDeckLinkInputCallback_v7_3_FWD_DEFINED__
-typedef interface IDeckLinkInputCallback_v7_3 IDeckLinkInputCallback_v7_3;
-#endif 	/* __IDeckLinkInputCallback_v7_3_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_3_FWD_DEFINED__
-#define __IDeckLinkOutput_v7_3_FWD_DEFINED__
-typedef interface IDeckLinkOutput_v7_3 IDeckLinkOutput_v7_3;
-#endif 	/* __IDeckLinkOutput_v7_3_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_3_FWD_DEFINED__
-#define __IDeckLinkInput_v7_3_FWD_DEFINED__
-typedef interface IDeckLinkInput_v7_3 IDeckLinkInput_v7_3;
-#endif 	/* __IDeckLinkInput_v7_3_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__
-typedef interface IDeckLinkVideoInputFrame_v7_3 IDeckLinkVideoInputFrame_v7_3;
-#endif 	/* __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__
-#define __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkDisplayModeIterator_v7_1 IDeckLinkDisplayModeIterator_v7_1;
-#endif 	/* __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__
-#define __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkDisplayMode_v7_1 IDeckLinkDisplayMode_v7_1;
-#endif 	/* __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__
-#define __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkVideoFrame_v7_1 IDeckLinkVideoFrame_v7_1;
-#endif 	/* __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkVideoInputFrame_v7_1 IDeckLinkVideoInputFrame_v7_1;
-#endif 	/* __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__
-#define __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkAudioInputPacket_v7_1 IDeckLinkAudioInputPacket_v7_1;
-#endif 	/* __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__
-#define __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkVideoOutputCallback_v7_1 IDeckLinkVideoOutputCallback_v7_1;
-#endif 	/* __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_v7_1_FWD_DEFINED__
-#define __IDeckLinkInputCallback_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkInputCallback_v7_1 IDeckLinkInputCallback_v7_1;
-#endif 	/* __IDeckLinkInputCallback_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_1_FWD_DEFINED__
-#define __IDeckLinkOutput_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkOutput_v7_1 IDeckLinkOutput_v7_1;
-#endif 	/* __IDeckLinkOutput_v7_1_FWD_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_1_FWD_DEFINED__
-#define __IDeckLinkInput_v7_1_FWD_DEFINED__
-typedef interface IDeckLinkInput_v7_1 IDeckLinkInput_v7_1;
-#endif 	/* __IDeckLinkInput_v7_1_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "unknwn.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-
-#ifndef __DeckLinkAPI_LIBRARY_DEFINED__
-#define __DeckLinkAPI_LIBRARY_DEFINED__
-
-/* library DeckLinkAPI */
-/* [helpstring][version][uuid] */ 
-
-typedef LONGLONG BMDTimeValue;
-
-typedef LONGLONG BMDTimeScale;
-
-typedef unsigned long BMDTimecodeBCD;
-
-typedef unsigned long BMDTimecodeUserBits;
-
-typedef unsigned long BMDDisplayModeFlags;
-typedef unsigned long BMDFrameFlags;
-typedef unsigned long BMDVideoInputFlags;
-typedef unsigned long BMDVideoInputFormatChangedEvents;
-typedef unsigned long BMDDetectedVideoInputFormatFlags;
-typedef unsigned long BMDTimecodeFlags;
-typedef unsigned long BMDAnalogVideoFlags;
-typedef unsigned long BMDDeckControlStatusFlags;
-typedef unsigned long BMDDeckControlExportModeOpsFlags;
-#if 0
-typedef enum _BMDDisplayModeFlags BMDDisplayModeFlags;
-
-typedef enum _BMDFrameFlags BMDFrameFlags;
-
-typedef enum _BMDVideoInputFlags BMDVideoInputFlags;
-
-typedef enum _BMDVideoInputFormatChangedEvents BMDVideoInputFormatChangedEvents;
-
-typedef enum _BMDDetectedVideoInputFormatFlags BMDDetectedVideoInputFormatFlags;
-
-typedef enum _BMDTimecodeFlags BMDTimecodeFlags;
-
-typedef enum _BMDAnalogVideoFlags BMDAnalogVideoFlags;
-
-typedef enum _BMDDeckControlStatusFlags BMDDeckControlStatusFlags;
-
-typedef enum _BMDDeckControlExportModeOpsFlags BMDDeckControlExportModeOpsFlags;
-
-#endif
-typedef /* [v1_enum] */ 
-enum _BMDDisplayMode
-    {	bmdModeNTSC	= 0x6e747363,
-	bmdModeNTSC2398	= 0x6e743233,
-	bmdModePAL	= 0x70616c20,
-	bmdModeNTSCp	= 0x6e747370,
-	bmdModePALp	= 0x70616c70,
-	bmdModeHD1080p2398	= 0x32337073,
-	bmdModeHD1080p24	= 0x32347073,
-	bmdModeHD1080p25	= 0x48703235,
-	bmdModeHD1080p2997	= 0x48703239,
-	bmdModeHD1080p30	= 0x48703330,
-	bmdModeHD1080i50	= 0x48693530,
-	bmdModeHD1080i5994	= 0x48693539,
-	bmdModeHD1080i6000	= 0x48693630,
-	bmdModeHD1080p50	= 0x48703530,
-	bmdModeHD1080p5994	= 0x48703539,
-	bmdModeHD1080p6000	= 0x48703630,
-	bmdModeHD720p50	= 0x68703530,
-	bmdModeHD720p5994	= 0x68703539,
-	bmdModeHD720p60	= 0x68703630,
-	bmdMode2k2398	= 0x326b3233,
-	bmdMode2k24	= 0x326b3234,
-	bmdMode2k25	= 0x326b3235
-    } 	BMDDisplayMode;
-
-typedef /* [v1_enum] */ 
-enum _BMDFieldDominance
-    {	bmdUnknownFieldDominance	= 0,
-	bmdLowerFieldFirst	= 0x6c6f7772,
-	bmdUpperFieldFirst	= 0x75707072,
-	bmdProgressiveFrame	= 0x70726f67,
-	bmdProgressiveSegmentedFrame	= 0x70736620
-    } 	BMDFieldDominance;
-
-typedef /* [v1_enum] */ 
-enum _BMDPixelFormat
-    {	bmdFormat8BitYUV	= 0x32767579,
-	bmdFormat10BitYUV	= 0x76323130,
-	bmdFormat8BitARGB	= 32,
-	bmdFormat8BitBGRA	= 0x42475241,
-	bmdFormat10BitRGB	= 0x72323130
-    } 	BMDPixelFormat;
-
-/* [v1_enum] */ 
-enum _BMDDisplayModeFlags
-    {	bmdDisplayModeSupports3D	= ( 1 << 0 ) ,
-	bmdDisplayModeColorspaceRec601	= ( 1 << 1 ) ,
-	bmdDisplayModeColorspaceRec709	= ( 1 << 2 ) 
-    } ;
-typedef /* [v1_enum] */ 
-enum _BMDVideoOutputFlags
-    {	bmdVideoOutputFlagDefault	= 0,
-	bmdVideoOutputVANC	= ( 1 << 0 ) ,
-	bmdVideoOutputVITC	= ( 1 << 1 ) ,
-	bmdVideoOutputRP188	= ( 1 << 2 ) ,
-	bmdVideoOutputDualStream3D	= ( 1 << 4 ) 
-    } 	BMDVideoOutputFlags;
-
-/* [v1_enum] */ 
-enum _BMDFrameFlags
-    {	bmdFrameFlagDefault	= 0,
-	bmdFrameFlagFlipVertical	= ( 1 << 0 ) ,
-	bmdFrameHasNoInputSource	= ( 1 << 31 ) 
-    } ;
-/* [v1_enum] */ 
-enum _BMDVideoInputFlags
-    {	bmdVideoInputFlagDefault	= 0,
-	bmdVideoInputEnableFormatDetection	= ( 1 << 0 ) ,
-	bmdVideoInputDualStream3D	= ( 1 << 1 ) 
-    } ;
-/* [v1_enum] */ 
-enum _BMDVideoInputFormatChangedEvents
-    {	bmdVideoInputDisplayModeChanged	= ( 1 << 0 ) ,
-	bmdVideoInputFieldDominanceChanged	= ( 1 << 1 ) ,
-	bmdVideoInputColorspaceChanged	= ( 1 << 2 ) 
-    } ;
-/* [v1_enum] */ 
-enum _BMDDetectedVideoInputFormatFlags
-    {	bmdDetectedVideoInputYCbCr422	= ( 1 << 0 ) ,
-	bmdDetectedVideoInputRGB444	= ( 1 << 1 ) 
-    } ;
-typedef /* [v1_enum] */ 
-enum _BMDOutputFrameCompletionResult
-    {	bmdOutputFrameCompleted	= 0,
-	bmdOutputFrameDisplayedLate	= ( bmdOutputFrameCompleted + 1 ) ,
-	bmdOutputFrameDropped	= ( bmdOutputFrameDisplayedLate + 1 ) ,
-	bmdOutputFrameFlushed	= ( bmdOutputFrameDropped + 1 ) 
-    } 	BMDOutputFrameCompletionResult;
-
-typedef /* [v1_enum] */ 
-enum _BMDReferenceStatus
-    {	bmdReferenceNotSupportedByHardware	= ( 1 << 0 ) ,
-	bmdReferenceLocked	= ( 1 << 1 ) 
-    } 	BMDReferenceStatus;
-
-typedef /* [v1_enum] */ 
-enum _BMDAudioSampleRate
-    {	bmdAudioSampleRate48kHz	= 48000
-    } 	BMDAudioSampleRate;
-
-typedef /* [v1_enum] */ 
-enum _BMDAudioSampleType
-    {	bmdAudioSampleType16bitInteger	= 16,
-	bmdAudioSampleType32bitInteger	= 32
-    } 	BMDAudioSampleType;
-
-typedef /* [v1_enum] */ 
-enum _BMDAudioOutputStreamType
-    {	bmdAudioOutputStreamContinuous	= 0,
-	bmdAudioOutputStreamContinuousDontResample	= ( bmdAudioOutputStreamContinuous + 1 ) ,
-	bmdAudioOutputStreamTimestamped	= ( bmdAudioOutputStreamContinuousDontResample + 1 ) 
-    } 	BMDAudioOutputStreamType;
-
-typedef /* [v1_enum] */ 
-enum _BMDDisplayModeSupport
-    {	bmdDisplayModeNotSupported	= 0,
-	bmdDisplayModeSupported	= ( bmdDisplayModeNotSupported + 1 ) ,
-	bmdDisplayModeSupportedWithConversion	= ( bmdDisplayModeSupported + 1 ) 
-    } 	BMDDisplayModeSupport;
-
-typedef /* [v1_enum] */ 
-enum _BMDTimecodeFormat
-    {	bmdTimecodeRP188	= 0x72703138,
-	bmdTimecodeRP188Field2	= 0x72703132,
-	bmdTimecodeVITC	= 0x76697463,
-	bmdTimecodeVITCField2	= 0x76697432,
-	bmdTimecodeSerial	= 0x73657269
-    } 	BMDTimecodeFormat;
-
-/* [v1_enum] */ 
-enum _BMDTimecodeFlags
-    {	bmdTimecodeFlagDefault	= 0,
-	bmdTimecodeIsDropFrame	= ( 1 << 0 ) 
-    } ;
-typedef /* [v1_enum] */ 
-enum _BMDVideoConnection
-    {	bmdVideoConnectionSDI	= ( 1 << 0 ) ,
-	bmdVideoConnectionHDMI	= ( 1 << 1 ) ,
-	bmdVideoConnectionOpticalSDI	= ( 1 << 2 ) ,
-	bmdVideoConnectionComponent	= ( 1 << 3 ) ,
-	bmdVideoConnectionComposite	= ( 1 << 4 ) ,
-	bmdVideoConnectionSVideo	= ( 1 << 5 ) 
-    } 	BMDVideoConnection;
-
-/* [v1_enum] */ 
-enum _BMDAnalogVideoFlags
-    {	bmdAnalogVideoFlagCompositeSetup75	= ( 1 << 0 ) ,
-	bmdAnalogVideoFlagComponentBetacamLevels	= ( 1 << 1 ) 
-    } ;
-typedef /* [v1_enum] */ 
-enum _BMDAudioConnection
-    {	bmdAudioConnectionEmbedded	= 0x656d6264,
-	bmdAudioConnectionAESEBU	= 0x61657320,
-	bmdAudioConnectionAnalog	= 0x616e6c67
-    } 	BMDAudioConnection;
-
-typedef /* [v1_enum] */ 
-enum _BMDAudioOutputAnalogAESSwitch
-    {	bmdAudioOutputSwitchAESEBU	= 0x61657320,
-	bmdAudioOutputSwitchAnalog	= 0x616e6c67
-    } 	BMDAudioOutputAnalogAESSwitch;
-
-typedef /* [v1_enum] */ 
-enum _BMDVideoOutputConversionMode
-    {	bmdNoVideoOutputConversion	= 0x6e6f6e65,
-	bmdVideoOutputLetterboxDownconversion	= 0x6c746278,
-	bmdVideoOutputAnamorphicDownconversion	= 0x616d7068,
-	bmdVideoOutputHD720toHD1080Conversion	= 0x37323063,
-	bmdVideoOutputHardwareLetterboxDownconversion	= 0x48576c62,
-	bmdVideoOutputHardwareAnamorphicDownconversion	= 0x4857616d,
-	bmdVideoOutputHardwareCenterCutDownconversion	= 0x48576363,
-	bmdVideoOutputHardware720p1080pCrossconversion	= 0x78636170,
-	bmdVideoOutputHardwareAnamorphic720pUpconversion	= 0x75613770,
-	bmdVideoOutputHardwareAnamorphic1080iUpconversion	= 0x75613169,
-	bmdVideoOutputHardwareAnamorphic149To720pUpconversion	= 0x75343770,
-	bmdVideoOutputHardwareAnamorphic149To1080iUpconversion	= 0x75343169,
-	bmdVideoOutputHardwarePillarbox720pUpconversion	= 0x75703770,
-	bmdVideoOutputHardwarePillarbox1080iUpconversion	= 0x75703169
-    } 	BMDVideoOutputConversionMode;
-
-typedef /* [v1_enum] */ 
-enum _BMDVideoInputConversionMode
-    {	bmdNoVideoInputConversion	= 0x6e6f6e65,
-	bmdVideoInputLetterboxDownconversionFromHD1080	= 0x31306c62,
-	bmdVideoInputAnamorphicDownconversionFromHD1080	= 0x3130616d,
-	bmdVideoInputLetterboxDownconversionFromHD720	= 0x37326c62,
-	bmdVideoInputAnamorphicDownconversionFromHD720	= 0x3732616d,
-	bmdVideoInputLetterboxUpconversion	= 0x6c627570,
-	bmdVideoInputAnamorphicUpconversion	= 0x616d7570
-    } 	BMDVideoInputConversionMode;
-
-typedef /* [v1_enum] */ 
-enum _BMDVideo3DPackingFormat
-    {	bmdVideo3DPackingSidebySideHalf	= 0x73627368,
-	bmdVideo3DPackingLinebyLine	= 0x6c62796c,
-	bmdVideo3DPackingTopAndBottom	= 0x7461626f,
-	bmdVideo3DPackingFramePacking	= 0x6672706b,
-	bmdVideo3DPackingLeftOnly	= 0x6c656674,
-	bmdVideo3DPackingRightOnly	= 0x72696768
-    } 	BMDVideo3DPackingFormat;
-
-typedef /* [v1_enum] */ 
-enum _BMDIdleVideoOutputOperation
-    {	bmdIdleVideoOutputBlack	= 0x626c6163,
-	bmdIdleVideoOutputLastFrame	= 0x6c616661
-    } 	BMDIdleVideoOutputOperation;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckLinkConfigurationID
-    {	bmdDeckLinkConfigSwapSerialRxTx	= 0x73737274,
-	bmdDeckLinkConfigUse1080pNotPsF	= 0x6670726f,
-	bmdDeckLinkConfigHDMI3DPackingFormat	= 0x33647066,
-	bmdDeckLinkConfigBypass	= 0x62797073,
-	bmdDeckLinkConfigAnalogAudioConsumerLevels	= 0x6161636c,
-	bmdDeckLinkConfigFieldFlickerRemoval	= 0x66646672,
-	bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion	= 0x746f3539,
-	bmdDeckLinkConfig444SDIVideoOutput	= 0x3434346f,
-	bmdDeckLinkConfig3GBpsVideoOutput	= 0x33676273,
-	bmdDeckLinkConfigBlackVideoOutputDuringCapture	= 0x62766f63,
-	bmdDeckLinkConfigLowLatencyVideoOutput	= 0x6c6c766f,
-	bmdDeckLinkConfigVideoOutputConnection	= 0x766f636e,
-	bmdDeckLinkConfigVideoOutputConversionMode	= 0x766f636d,
-	bmdDeckLinkConfigAnalogVideoOutputFlags	= 0x61766f66,
-	bmdDeckLinkConfigReferenceInputTimingOffset	= 0x676c6f74,
-	bmdDeckLinkConfigVideoOutputIdleOperation	= 0x766f696f,
-	bmdDeckLinkConfigVideoOutputComponentLumaGain	= 0x6f636c67,
-	bmdDeckLinkConfigVideoOutputComponentChromaBlueGain	= 0x6f636362,
-	bmdDeckLinkConfigVideoOutputComponentChromaRedGain	= 0x6f636372,
-	bmdDeckLinkConfigVideoOutputCompositeLumaGain	= 0x6f696c67,
-	bmdDeckLinkConfigVideoOutputCompositeChromaGain	= 0x6f696367,
-	bmdDeckLinkConfigVideoOutputSVideoLumaGain	= 0x6f736c67,
-	bmdDeckLinkConfigVideoOutputSVideoChromaGain	= 0x6f736367,
-	bmdDeckLinkConfigVideoInputConnection	= 0x7669636e,
-	bmdDeckLinkConfigAnalogVideoInputFlags	= 0x61766966,
-	bmdDeckLinkConfigVideoInputConversionMode	= 0x7669636d,
-	bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame	= 0x70646966,
-	bmdDeckLinkConfigVANCSourceLine1Mapping	= 0x76736c31,
-	bmdDeckLinkConfigVANCSourceLine2Mapping	= 0x76736c32,
-	bmdDeckLinkConfigVANCSourceLine3Mapping	= 0x76736c33,
-	bmdDeckLinkConfigVideoInputComponentLumaGain	= 0x69636c67,
-	bmdDeckLinkConfigVideoInputComponentChromaBlueGain	= 0x69636362,
-	bmdDeckLinkConfigVideoInputComponentChromaRedGain	= 0x69636372,
-	bmdDeckLinkConfigVideoInputCompositeLumaGain	= 0x69696c67,
-	bmdDeckLinkConfigVideoInputCompositeChromaGain	= 0x69696367,
-	bmdDeckLinkConfigVideoInputSVideoLumaGain	= 0x69736c67,
-	bmdDeckLinkConfigVideoInputSVideoChromaGain	= 0x69736367,
-	bmdDeckLinkConfigAudioInputConnection	= 0x6169636e,
-	bmdDeckLinkConfigAnalogAudioInputScaleChannel1	= 0x61697331,
-	bmdDeckLinkConfigAnalogAudioInputScaleChannel2	= 0x61697332,
-	bmdDeckLinkConfigAnalogAudioInputScaleChannel3	= 0x61697333,
-	bmdDeckLinkConfigAnalogAudioInputScaleChannel4	= 0x61697334,
-	bmdDeckLinkConfigDigitalAudioInputScale	= 0x64616973,
-	bmdDeckLinkConfigAudioOutputAESAnalogSwitch	= 0x616f6161,
-	bmdDeckLinkConfigAnalogAudioOutputScaleChannel1	= 0x616f7331,
-	bmdDeckLinkConfigAnalogAudioOutputScaleChannel2	= 0x616f7332,
-	bmdDeckLinkConfigAnalogAudioOutputScaleChannel3	= 0x616f7333,
-	bmdDeckLinkConfigAnalogAudioOutputScaleChannel4	= 0x616f7334,
-	bmdDeckLinkConfigDigitalAudioOutputScale	= 0x64616f73
-    } 	BMDDeckLinkConfigurationID;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckLinkAttributeID
-    {	BMDDeckLinkSupportsInternalKeying	= 0x6b657969,
-	BMDDeckLinkSupportsExternalKeying	= 0x6b657965,
-	BMDDeckLinkSupportsHDKeying	= 0x6b657968,
-	BMDDeckLinkSupportsInputFormatDetection	= 0x696e6664,
-	BMDDeckLinkHasReferenceInput	= 0x6872696e,
-	BMDDeckLinkHasSerialPort	= 0x68737074,
-	BMDDeckLinkHasAnalogVideoOutputGain	= 0x61766f67,
-	BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain	= 0x6f766f67,
-	BMDDeckLinkHasVideoInputAntiAliasingFilter	= 0x6161666c,
-	BMDDeckLinkHasBypass	= 0x62797073,
-	BMDDeckLinkMaximumAudioChannels	= 0x6d616368,
-	BMDDeckLinkNumberOfSubDevices	= 0x6e736264,
-	BMDDeckLinkSubDeviceIndex	= 0x73756269,
-	BMDDeckLinkVideoOutputConnections	= 0x766f636e,
-	BMDDeckLinkVideoInputConnections	= 0x7669636e,
-	BMDDeckLinkVideoInputGainMinimum	= 0x7669676d,
-	BMDDeckLinkVideoInputGainMaximum	= 0x76696778,
-	BMDDeckLinkVideoOutputGainMinimum	= 0x766f676d,
-	BMDDeckLinkVideoOutputGainMaximum	= 0x766f6778,
-	BMDDeckLinkSerialPortDeviceName	= 0x736c706e
-    } 	BMDDeckLinkAttributeID;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckLinkAPIInformationID
-    {	BMDDeckLinkAPIVersion	= 0x76657273
-    } 	BMDDeckLinkAPIInformationID;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckControlMode
-    {	bmdDeckControlNotOpened	= 0x6e746f70,
-	bmdDeckControlVTRControlMode	= 0x76747263,
-	bmdDeckControlExportMode	= 0x6578706d,
-	bmdDeckControlCaptureMode	= 0x6361706d
-    } 	BMDDeckControlMode;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckControlEvent
-    {	bmdDeckControlAbortedEvent	= 0x61627465,
-	bmdDeckControlPrepareForExportEvent	= 0x70666565,
-	bmdDeckControlExportCompleteEvent	= 0x65786365,
-	bmdDeckControlPrepareForCaptureEvent	= 0x70666365,
-	bmdDeckControlCaptureCompleteEvent	= 0x63636576
-    } 	BMDDeckControlEvent;
-
-typedef /* [v1_enum] */ 
-enum _BMDDeckControlVTRControlState
-    {	bmdDeckControlNotInVTRControlMode	= 0x6e76636d,
-	bmdDeckControlVTRControlPlaying	= 0x76747270,
-	bmdDeckControlVTRControlRecording	= 0x76747272,
-	bmdDeckControlVTRControlStill	= 0x76747261,
-	bmdDeckControlVTRControlSeeking	= 0x76747273,
-	bmdDeckControlVTRControlStopped	= 0x7674726f
-    } 	BMDDeckControlVTRControlState;
-
-/* [v1_enum] */ 
-enum _BMDDeckControlStatusFlags
-    {	bmdDeckControlStatusDeckConnected	= ( 1 << 0 ) ,
-	bmdDeckControlStatusRemoteMode	= ( 1 << 1 ) ,
-	bmdDeckControlStatusRecordInhibited	= ( 1 << 2 ) ,
-	bmdDeckControlStatusCassetteOut	= ( 1 << 3 ) 
-    } ;
-/* [v1_enum] */ 
-enum _BMDDeckControlExportModeOpsFlags
-    {	bmdDeckControlExportModeInsertVideo	= ( 1 << 0 ) ,
-	bmdDeckControlExportModeInsertAudio1	= ( 1 << 1 ) ,
-	bmdDeckControlExportModeInsertAudio2	= ( 1 << 2 ) ,
-	bmdDeckControlExportModeInsertAudio3	= ( 1 << 3 ) ,
-	bmdDeckControlExportModeInsertAudio4	= ( 1 << 4 ) ,
-	bmdDeckControlExportModeInsertAudio5	= ( 1 << 5 ) ,
-	bmdDeckControlExportModeInsertAudio6	= ( 1 << 6 ) ,
-	bmdDeckControlExportModeInsertAudio7	= ( 1 << 7 ) ,
-	bmdDeckControlExportModeInsertAudio8	= ( 1 << 8 ) ,
-	bmdDeckControlExportModeInsertAudio9	= ( 1 << 9 ) ,
-	bmdDeckControlExportModeInsertAudio10	= ( 1 << 10 ) ,
-	bmdDeckControlExportModeInsertAudio11	= ( 1 << 11 ) ,
-	bmdDeckControlExportModeInsertAudio12	= ( 1 << 12 ) ,
-	bmdDeckControlExportModeInsertTimeCode	= ( 1 << 13 ) ,
-	bmdDeckControlExportModeInsertAssemble	= ( 1 << 14 ) ,
-	bmdDeckControlExportModeInsertPreview	= ( 1 << 15 ) ,
-	bmdDeckControlUseManualExport	= ( 1 << 16 ) 
-    } ;
-typedef /* [v1_enum] */ 
-enum _BMDDeckControlError
-    {	bmdDeckControlNoError	= 0x6e6f6572,
-	bmdDeckControlModeError	= 0x6d6f6572,
-	bmdDeckControlMissedInPointError	= 0x6d696572,
-	bmdDeckControlDeckTimeoutError	= 0x64746572,
-	bmdDeckControlCommandFailedError	= 0x63666572,
-	bmdDeckControlDeviceAlreadyOpenedError	= 0x64616c6f,
-	bmdDeckControlFailedToOpenDeviceError	= 0x66646572,
-	bmdDeckControlInLocalModeError	= 0x6c6d6572,
-	bmdDeckControlEndOfTapeError	= 0x65746572,
-	bmdDeckControlUserAbortError	= 0x75616572,
-	bmdDeckControlNoTapeInDeckError	= 0x6e746572,
-	bmdDeckControlNoVideoFromCardError	= 0x6e766663,
-	bmdDeckControlNoCommunicationError	= 0x6e636f6d,
-	bmdDeckControlBufferTooSmallError	= 0x6274736d,
-	bmdDeckControlBadChecksumError	= 0x63686b73,
-	bmdDeckControlUnknownError	= 0x756e6572
-    } 	BMDDeckControlError;
-
-typedef /* [v1_enum] */ 
-enum _BMD3DPreviewFormat
-    {	bmd3DPreviewFormatDefault	= 0x64656661,
-	bmd3DPreviewFormatLeftOnly	= 0x6c656674,
-	bmd3DPreviewFormatRightOnly	= 0x72696768,
-	bmd3DPreviewFormatSideBySide	= 0x73696465,
-	bmd3DPreviewFormatTopBottom	= 0x746f7062
-    } 	BMD3DPreviewFormat;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-typedef /* [v1_enum] */ 
-enum _BMDVideoConnection_v7_6
-    {	bmdVideoConnectionSDI_v7_6	= 0x73646920,
-	bmdVideoConnectionHDMI_v7_6	= 0x68646d69,
-	bmdVideoConnectionOpticalSDI_v7_6	= 0x6f707469,
-	bmdVideoConnectionComponent_v7_6	= 0x63706e74,
-	bmdVideoConnectionComposite_v7_6	= 0x636d7374,
-	bmdVideoConnectionSVideo_v7_6	= 0x73766964
-    } 	BMDVideoConnection_v7_6;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-EXTERN_C const IID LIBID_DeckLinkAPI;
-
-#ifndef __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__
-#define __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoOutputCallback */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoOutputCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("20AA5225-1958-47CB-820B-80A8D521A6EE")
-    IDeckLinkVideoOutputCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 
-            /* [in] */ IDeckLinkVideoFrame *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoOutputCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoOutputCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoOutputCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoOutputCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 
-            IDeckLinkVideoOutputCallback * This,
-            /* [in] */ IDeckLinkVideoFrame *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( 
-            IDeckLinkVideoOutputCallback * This);
-        
-        END_INTERFACE
-    } IDeckLinkVideoOutputCallbackVtbl;
-
-    interface IDeckLinkVideoOutputCallback
-    {
-        CONST_VTBL struct IDeckLinkVideoOutputCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoOutputCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoOutputCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoOutputCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoOutputCallback_ScheduledFrameCompleted(This,completedFrame,result)	\
-    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 
-
-#define IDeckLinkVideoOutputCallback_ScheduledPlaybackHasStopped(This)	\
-    ( (This)->lpVtbl -> ScheduledPlaybackHasStopped(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_INTERFACE_DEFINED__
-#define __IDeckLinkInputCallback_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInputCallback */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInputCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("DD04E5EC-7415-42AB-AE4A-E80C4DFC044A")
-    IDeckLinkInputCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 
-            /* [in] */ IDeckLinkVideoInputFrame *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInputCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInputCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInputCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInputCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 
-            IDeckLinkInputCallback * This,
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 
-            IDeckLinkInputCallback * This,
-            /* [in] */ IDeckLinkVideoInputFrame *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);
-        
-        END_INTERFACE
-    } IDeckLinkInputCallbackVtbl;
-
-    interface IDeckLinkInputCallback
-    {
-        CONST_VTBL struct IDeckLinkInputCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInputCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInputCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInputCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInputCallback_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\
-    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 
-
-#define IDeckLinkInputCallback_VideoInputFrameArrived(This,videoFrame,audioPacket)	\
-    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInputCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__
-#define __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__
-
-/* interface IDeckLinkMemoryAllocator */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkMemoryAllocator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("B36EB6E7-9D29-4AA8-92EF-843B87A289E8")
-    IDeckLinkMemoryAllocator : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE AllocateBuffer( 
-            /* [in] */ unsigned long bufferSize,
-            /* [out] */ void **allocatedBuffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
-            /* [in] */ void *buffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Decommit( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkMemoryAllocatorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkMemoryAllocator * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkMemoryAllocator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkMemoryAllocator * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *AllocateBuffer )( 
-            IDeckLinkMemoryAllocator * This,
-            /* [in] */ unsigned long bufferSize,
-            /* [out] */ void **allocatedBuffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
-            IDeckLinkMemoryAllocator * This,
-            /* [in] */ void *buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *Commit )( 
-            IDeckLinkMemoryAllocator * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Decommit )( 
-            IDeckLinkMemoryAllocator * This);
-        
-        END_INTERFACE
-    } IDeckLinkMemoryAllocatorVtbl;
-
-    interface IDeckLinkMemoryAllocator
-    {
-        CONST_VTBL struct IDeckLinkMemoryAllocatorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkMemoryAllocator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkMemoryAllocator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkMemoryAllocator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkMemoryAllocator_AllocateBuffer(This,bufferSize,allocatedBuffer)	\
-    ( (This)->lpVtbl -> AllocateBuffer(This,bufferSize,allocatedBuffer) ) 
-
-#define IDeckLinkMemoryAllocator_ReleaseBuffer(This,buffer)	\
-    ( (This)->lpVtbl -> ReleaseBuffer(This,buffer) ) 
-
-#define IDeckLinkMemoryAllocator_Commit(This)	\
-    ( (This)->lpVtbl -> Commit(This) ) 
-
-#define IDeckLinkMemoryAllocator_Decommit(This)	\
-    ( (This)->lpVtbl -> Decommit(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__
-#define __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__
-
-/* interface IDeckLinkAudioOutputCallback */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkAudioOutputCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("403C681B-7F46-4A12-B993-2BB127084EE6")
-    IDeckLinkAudioOutputCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE RenderAudioSamples( 
-            /* [in] */ BOOL preroll) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkAudioOutputCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkAudioOutputCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkAudioOutputCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkAudioOutputCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *RenderAudioSamples )( 
-            IDeckLinkAudioOutputCallback * This,
-            /* [in] */ BOOL preroll);
-        
-        END_INTERFACE
-    } IDeckLinkAudioOutputCallbackVtbl;
-
-    interface IDeckLinkAudioOutputCallback
-    {
-        CONST_VTBL struct IDeckLinkAudioOutputCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkAudioOutputCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkAudioOutputCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkAudioOutputCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkAudioOutputCallback_RenderAudioSamples(This,preroll)	\
-    ( (This)->lpVtbl -> RenderAudioSamples(This,preroll) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkIterator_INTERFACE_DEFINED__
-#define __IDeckLinkIterator_INTERFACE_DEFINED__
-
-/* interface IDeckLinkIterator */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkIterator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("74E936FC-CC28-4A67-81A0-1E94E52D4E69")
-    IDeckLinkIterator : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Next( 
-            /* [out] */ IDeckLink **deckLinkInstance) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkIteratorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkIterator * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkIterator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkIterator * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Next )( 
-            IDeckLinkIterator * This,
-            /* [out] */ IDeckLink **deckLinkInstance);
-        
-        END_INTERFACE
-    } IDeckLinkIteratorVtbl;
-
-    interface IDeckLinkIterator
-    {
-        CONST_VTBL struct IDeckLinkIteratorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkIterator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkIterator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkIterator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkIterator_Next(This,deckLinkInstance)	\
-    ( (This)->lpVtbl -> Next(This,deckLinkInstance) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkIterator_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkAPIInformation_INTERFACE_DEFINED__
-#define __IDeckLinkAPIInformation_INTERFACE_DEFINED__
-
-/* interface IDeckLinkAPIInformation */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkAPIInformation;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("7BEA3C68-730D-4322-AF34-8A7152B532A4")
-    IDeckLinkAPIInformation : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetFlag( 
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ BOOL *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetInt( 
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ LONGLONG *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFloat( 
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ double *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetString( 
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ BSTR *value) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkAPIInformationVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkAPIInformation * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkAPIInformation * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkAPIInformation * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 
-            IDeckLinkAPIInformation * This,
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ BOOL *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetInt )( 
-            IDeckLinkAPIInformation * This,
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ LONGLONG *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 
-            IDeckLinkAPIInformation * This,
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ double *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetString )( 
-            IDeckLinkAPIInformation * This,
-            /* [in] */ BMDDeckLinkAPIInformationID cfgID,
-            /* [out] */ BSTR *value);
-        
-        END_INTERFACE
-    } IDeckLinkAPIInformationVtbl;
-
-    interface IDeckLinkAPIInformation
-    {
-        CONST_VTBL struct IDeckLinkAPIInformationVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkAPIInformation_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkAPIInformation_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkAPIInformation_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkAPIInformation_GetFlag(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 
-
-#define IDeckLinkAPIInformation_GetInt(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 
-
-#define IDeckLinkAPIInformation_GetFloat(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 
-
-#define IDeckLinkAPIInformation_GetString(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkAPIInformation_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayModeIterator */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayModeIterator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("9C88499F-F601-4021-B80B-032E4EB41C35")
-    IDeckLinkDisplayModeIterator : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Next( 
-            /* [out] */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayModeIteratorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayModeIterator * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayModeIterator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayModeIterator * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Next )( 
-            IDeckLinkDisplayModeIterator * This,
-            /* [out] */ IDeckLinkDisplayMode **deckLinkDisplayMode);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayModeIteratorVtbl;
-
-    interface IDeckLinkDisplayModeIterator
-    {
-        CONST_VTBL struct IDeckLinkDisplayModeIteratorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayModeIterator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayModeIterator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayModeIterator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayModeIterator_Next(This,deckLinkDisplayMode)	\
-    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayMode_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayMode */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayMode;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78")
-    IDeckLinkDisplayMode : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetName( 
-            /* [out] */ BSTR *name) = 0;
-        
-        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale) = 0;
-        
-        virtual BMDFieldDominance STDMETHODCALLTYPE GetFieldDominance( void) = 0;
-        
-        virtual BMDDisplayModeFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayModeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayMode * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayMode * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayMode * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetName )( 
-            IDeckLinkDisplayMode * This,
-            /* [out] */ BSTR *name);
-        
-        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 
-            IDeckLinkDisplayMode * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkDisplayMode * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkDisplayMode * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 
-            IDeckLinkDisplayMode * This,
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale);
-        
-        BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( 
-            IDeckLinkDisplayMode * This);
-        
-        BMDDisplayModeFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkDisplayMode * This);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayModeVtbl;
-
-    interface IDeckLinkDisplayMode
-    {
-        CONST_VTBL struct IDeckLinkDisplayModeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayMode_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayMode_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayMode_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayMode_GetName(This,name)	\
-    ( (This)->lpVtbl -> GetName(This,name) ) 
-
-#define IDeckLinkDisplayMode_GetDisplayMode(This)	\
-    ( (This)->lpVtbl -> GetDisplayMode(This) ) 
-
-#define IDeckLinkDisplayMode_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkDisplayMode_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkDisplayMode_GetFrameRate(This,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 
-
-#define IDeckLinkDisplayMode_GetFieldDominance(This)	\
-    ( (This)->lpVtbl -> GetFieldDominance(This) ) 
-
-#define IDeckLinkDisplayMode_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayMode_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLink_INTERFACE_DEFINED__
-#define __IDeckLink_INTERFACE_DEFINED__
-
-/* interface IDeckLink */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLink;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("62BFF75D-6569-4E55-8D4D-66AA03829ABC")
-    IDeckLink : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetModelName( 
-            /* [out] */ BSTR *modelName) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLink * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLink * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLink * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetModelName )( 
-            IDeckLink * This,
-            /* [out] */ BSTR *modelName);
-        
-        END_INTERFACE
-    } IDeckLinkVtbl;
-
-    interface IDeckLink
-    {
-        CONST_VTBL struct IDeckLinkVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLink_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLink_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLink_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLink_GetModelName(This,modelName)	\
-    ( (This)->lpVtbl -> GetModelName(This,modelName) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLink_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_INTERFACE_DEFINED__
-#define __IDeckLinkOutput_INTERFACE_DEFINED__
-
-/* interface IDeckLinkOutput */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkOutput;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A3EF0963-0862-44ED-92A9-EE89ABF431C7")
-    IDeckLinkOutput : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoOutputFlags flags,
-            /* [out] */ BMDDisplayModeSupport *result,
-            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDVideoOutputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 
-            /* [in] */ long width,
-            /* [in] */ long height,
-            /* [in] */ long rowBytes,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame **outFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 
-            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 
-            /* [in] */ IDeckLinkVideoFrame *theFrame,
-            /* [in] */ BMDTimeValue displayTime,
-            /* [in] */ BMDTimeValue displayDuration,
-            /* [in] */ BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 
-            /* [in] */ IDeckLinkVideoOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 
-            /* [out] */ unsigned long *bufferedFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 
-            /* [in] */ BMDAudioSampleRate sampleRate,
-            /* [in] */ BMDAudioSampleType sampleType,
-            /* [in] */ unsigned long channelCount,
-            /* [in] */ BMDAudioOutputStreamType streamType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 
-            /* [in] */ void *buffer,
-            /* [in] */ unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 
-            /* [in] */ void *buffer,
-            /* [in] */ unsigned long sampleFrameCount,
-            /* [in] */ BMDTimeValue streamTime,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 
-            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 
-            /* [in] */ BMDTimeValue playbackStartTime,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ double playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 
-            /* [in] */ BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            /* [in] */ BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 
-            /* [out] */ BOOL *active) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetScheduledStreamTime( 
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *streamTime,
-            /* [out] */ double *playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetReferenceStatus( 
-            /* [out] */ BMDReferenceStatus *referenceStatus) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkOutputVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkOutput * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkOutput * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoOutputFlags flags,
-            /* [out] */ BMDDisplayModeSupport *result,
-            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkOutput * This,
-            /* [out] */ IDeckLinkDisplayModeIterator **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDVideoOutputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 
-            IDeckLinkOutput * This,
-            /* [in] */ long width,
-            /* [in] */ long height,
-            /* [in] */ long rowBytes,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame **outFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkVideoFrame *theFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkVideoFrame *theFrame,
-            /* [in] */ BMDTimeValue displayTime,
-            /* [in] */ BMDTimeValue displayDuration,
-            /* [in] */ BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkVideoOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 
-            IDeckLinkOutput * This,
-            /* [out] */ unsigned long *bufferedFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDAudioSampleRate sampleRate,
-            /* [in] */ BMDAudioSampleType sampleType,
-            /* [in] */ unsigned long channelCount,
-            /* [in] */ BMDAudioOutputStreamType streamType);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 
-            IDeckLinkOutput * This,
-            /* [in] */ void *buffer,
-            /* [in] */ unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 
-            IDeckLinkOutput * This,
-            /* [in] */ void *buffer,
-            /* [in] */ unsigned long sampleFrameCount,
-            /* [in] */ BMDTimeValue streamTime,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 
-            IDeckLinkOutput * This,
-            /* [out] */ unsigned long *bufferedSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 
-            IDeckLinkOutput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 
-            IDeckLinkOutput * This,
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDTimeValue playbackStartTime,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ double playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            /* [in] */ BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 
-            IDeckLinkOutput * This,
-            /* [out] */ BOOL *active);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *streamTime,
-            /* [out] */ double *playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetReferenceStatus )( 
-            IDeckLinkOutput * This,
-            /* [out] */ BMDReferenceStatus *referenceStatus);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkOutput * This,
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame);
-        
-        END_INTERFACE
-    } IDeckLinkOutputVtbl;
-
-    interface IDeckLinkOutput
-    {
-        CONST_VTBL struct IDeckLinkOutputVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkOutput_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkOutput_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkOutput_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkOutput_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 
-
-#define IDeckLinkOutput_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkOutput_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkOutput_EnableVideoOutput(This,displayMode,flags)	\
-    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 
-
-#define IDeckLinkOutput_DisableVideoOutput(This)	\
-    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 
-
-#define IDeckLinkOutput_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\
-    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 
-
-#define IDeckLinkOutput_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\
-    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 
-
-#define IDeckLinkOutput_CreateAncillaryData(This,pixelFormat,outBuffer)	\
-    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 
-
-#define IDeckLinkOutput_DisplayVideoFrameSync(This,theFrame)	\
-    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 
-
-#define IDeckLinkOutput_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\
-    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 
-
-#define IDeckLinkOutput_SetScheduledFrameCompletionCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 
-
-#define IDeckLinkOutput_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\
-    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 
-
-#define IDeckLinkOutput_DisableAudioOutput(This)	\
-    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 
-
-#define IDeckLinkOutput_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_BeginAudioPreroll(This)	\
-    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_EndAudioPreroll(This)	\
-    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 
-
-#define IDeckLinkOutput_FlushBufferedAudioSamples(This)	\
-    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 
-
-#define IDeckLinkOutput_SetAudioCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\
-    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 
-
-#define IDeckLinkOutput_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\
-    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 
-
-#define IDeckLinkOutput_IsScheduledPlaybackRunning(This,active)	\
-    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 
-
-#define IDeckLinkOutput_GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed)	\
-    ( (This)->lpVtbl -> GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed) ) 
-
-#define IDeckLinkOutput_GetReferenceStatus(This,referenceStatus)	\
-    ( (This)->lpVtbl -> GetReferenceStatus(This,referenceStatus) ) 
-
-#define IDeckLinkOutput_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkOutput_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_INTERFACE_DEFINED__
-#define __IDeckLinkInput_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInput */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInput;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("6D40EF78-28B9-4E21-990D-95BB7750A04F")
-    IDeckLinkInput : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoInputFlags flags,
-            /* [out] */ BMDDisplayModeSupport *result,
-            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoInputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 
-            /* [out] */ unsigned long *availableFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 
-            /* [in] */ BMDAudioSampleRate sampleRate,
-            /* [in] */ BMDAudioSampleType sampleType,
-            /* [in] */ unsigned long channelCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 
-            /* [out] */ unsigned long *availableSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkInputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInputVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInput * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInput * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkInput * This,
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoInputFlags flags,
-            /* [out] */ BMDDisplayModeSupport *result,
-            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkInput * This,
-            /* [out] */ IDeckLinkDisplayModeIterator **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkInput * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 
-            IDeckLinkInput * This,
-            /* [in] */ BMDDisplayMode displayMode,
-            /* [in] */ BMDPixelFormat pixelFormat,
-            /* [in] */ BMDVideoInputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 
-            IDeckLinkInput * This,
-            /* [out] */ unsigned long *availableFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 
-            IDeckLinkInput * This,
-            /* [in] */ BMDAudioSampleRate sampleRate,
-            /* [in] */ BMDAudioSampleType sampleType,
-            /* [in] */ unsigned long channelCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 
-            IDeckLinkInput * This,
-            /* [out] */ unsigned long *availableSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 
-            IDeckLinkInput * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkInput * This,
-            /* [in] */ IDeckLinkInputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkInput * This,
-            /* [in] */ BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame);
-        
-        END_INTERFACE
-    } IDeckLinkInputVtbl;
-
-    interface IDeckLinkInput
-    {
-        CONST_VTBL struct IDeckLinkInputVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInput_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInput_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInput_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInput_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 
-
-#define IDeckLinkInput_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkInput_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkInput_EnableVideoInput(This,displayMode,pixelFormat,flags)	\
-    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 
-
-#define IDeckLinkInput_DisableVideoInput(This)	\
-    ( (This)->lpVtbl -> DisableVideoInput(This) ) 
-
-#define IDeckLinkInput_GetAvailableVideoFrameCount(This,availableFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 
-
-#define IDeckLinkInput_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\
-    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 
-
-#define IDeckLinkInput_DisableAudioInput(This)	\
-    ( (This)->lpVtbl -> DisableAudioInput(This) ) 
-
-#define IDeckLinkInput_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 
-
-#define IDeckLinkInput_StartStreams(This)	\
-    ( (This)->lpVtbl -> StartStreams(This) ) 
-
-#define IDeckLinkInput_StopStreams(This)	\
-    ( (This)->lpVtbl -> StopStreams(This) ) 
-
-#define IDeckLinkInput_PauseStreams(This)	\
-    ( (This)->lpVtbl -> PauseStreams(This) ) 
-
-#define IDeckLinkInput_FlushStreams(This)	\
-    ( (This)->lpVtbl -> FlushStreams(This) ) 
-
-#define IDeckLinkInput_SetCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 
-
-#define IDeckLinkInput_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInput_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkTimecode_INTERFACE_DEFINED__
-#define __IDeckLinkTimecode_INTERFACE_DEFINED__
-
-/* interface IDeckLinkTimecode */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkTimecode;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("BC6CFBD3-8317-4325-AC1C-1216391E9340")
-    IDeckLinkTimecode : public IUnknown
-    {
-    public:
-        virtual BMDTimecodeBCD STDMETHODCALLTYPE GetBCD( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetComponents( 
-            /* [out] */ unsigned char *hours,
-            /* [out] */ unsigned char *minutes,
-            /* [out] */ unsigned char *seconds,
-            /* [out] */ unsigned char *frames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetString( 
-            /* [out] */ BSTR *timecode) = 0;
-        
-        virtual BMDTimecodeFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecodeUserBits( 
-            /* [out] */ BMDTimecodeUserBits *userBits) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkTimecodeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkTimecode * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkTimecode * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkTimecode * This);
-        
-        BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( 
-            IDeckLinkTimecode * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetComponents )( 
-            IDeckLinkTimecode * This,
-            /* [out] */ unsigned char *hours,
-            /* [out] */ unsigned char *minutes,
-            /* [out] */ unsigned char *seconds,
-            /* [out] */ unsigned char *frames);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetString )( 
-            IDeckLinkTimecode * This,
-            /* [out] */ BSTR *timecode);
-        
-        BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkTimecode * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecodeUserBits )( 
-            IDeckLinkTimecode * This,
-            /* [out] */ BMDTimecodeUserBits *userBits);
-        
-        END_INTERFACE
-    } IDeckLinkTimecodeVtbl;
-
-    interface IDeckLinkTimecode
-    {
-        CONST_VTBL struct IDeckLinkTimecodeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkTimecode_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkTimecode_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkTimecode_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkTimecode_GetBCD(This)	\
-    ( (This)->lpVtbl -> GetBCD(This) ) 
-
-#define IDeckLinkTimecode_GetComponents(This,hours,minutes,seconds,frames)	\
-    ( (This)->lpVtbl -> GetComponents(This,hours,minutes,seconds,frames) ) 
-
-#define IDeckLinkTimecode_GetString(This,timecode)	\
-    ( (This)->lpVtbl -> GetString(This,timecode) ) 
-
-#define IDeckLinkTimecode_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkTimecode_GetTimecodeUserBits(This,userBits)	\
-    ( (This)->lpVtbl -> GetTimecodeUserBits(This,userBits) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkTimecode_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_INTERFACE_DEFINED__
-#define __IDeckLinkVideoFrame_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoFrame */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoFrame;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3F716FE0-F023-4111-BE5D-EF4414C05B17")
-    IDeckLinkVideoFrame : public IUnknown
-    {
-    public:
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;
-        
-        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;
-        
-        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBytes( 
-            /* [out] */ void **buffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 
-            /* [in] */ BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode **timecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAncillaryData( 
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoFrameVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoFrame * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoFrame * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoFrame * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoFrame * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoFrame * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoFrame * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkVideoFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkVideoFrame * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        END_INTERFACE
-    } IDeckLinkVideoFrameVtbl;
-
-    interface IDeckLinkVideoFrame
-    {
-        CONST_VTBL struct IDeckLinkVideoFrameVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoFrame_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoFrame_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoFrame_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoFrame_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoFrame_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoFrame_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoFrame_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoFrame_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoFrame_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkVideoFrame_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkVideoFrame_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoFrame_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__
-#define __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__
-
-/* interface IDeckLinkMutableVideoFrame */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkMutableVideoFrame;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("69E2639F-40DA-4E19-B6F2-20ACE815C390")
-    IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetFlags( 
-            /* [in] */ BMDFrameFlags newFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetTimecode( 
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ IDeckLinkTimecode *timecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetTimecodeFromComponents( 
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ unsigned char hours,
-            /* [in] */ unsigned char minutes,
-            /* [in] */ unsigned char seconds,
-            /* [in] */ unsigned char frames,
-            /* [in] */ BMDTimecodeFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAncillaryData( 
-            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetTimecodeUserBits( 
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ BMDTimecodeUserBits userBits) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkMutableVideoFrameVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkMutableVideoFrame * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ BMDFrameFlags newFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetTimecode )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ IDeckLinkTimecode *timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ unsigned char hours,
-            /* [in] */ unsigned char minutes,
-            /* [in] */ unsigned char seconds,
-            /* [in] */ unsigned char frames,
-            /* [in] */ BMDTimecodeFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetTimecodeUserBits )( 
-            IDeckLinkMutableVideoFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [in] */ BMDTimecodeUserBits userBits);
-        
-        END_INTERFACE
-    } IDeckLinkMutableVideoFrameVtbl;
-
-    interface IDeckLinkMutableVideoFrame
-    {
-        CONST_VTBL struct IDeckLinkMutableVideoFrameVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkMutableVideoFrame_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkMutableVideoFrame_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkMutableVideoFrame_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkMutableVideoFrame_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkMutableVideoFrame_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkMutableVideoFrame_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkMutableVideoFrame_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkMutableVideoFrame_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkMutableVideoFrame_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkMutableVideoFrame_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkMutableVideoFrame_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-
-#define IDeckLinkMutableVideoFrame_SetFlags(This,newFlags)	\
-    ( (This)->lpVtbl -> SetFlags(This,newFlags) ) 
-
-#define IDeckLinkMutableVideoFrame_SetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> SetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkMutableVideoFrame_SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags)	\
-    ( (This)->lpVtbl -> SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags) ) 
-
-#define IDeckLinkMutableVideoFrame_SetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> SetAncillaryData(This,ancillary) ) 
-
-#define IDeckLinkMutableVideoFrame_SetTimecodeUserBits(This,format,userBits)	\
-    ( (This)->lpVtbl -> SetTimecodeUserBits(This,format,userBits) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__
-#define __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoFrame3DExtensions */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoFrame3DExtensions;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7")
-    IDeckLinkVideoFrame3DExtensions : public IUnknown
-    {
-    public:
-        virtual BMDVideo3DPackingFormat STDMETHODCALLTYPE Get3DPackingFormat( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFrameForRightEye( 
-            /* [out] */ IDeckLinkVideoFrame **rightEyeFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoFrame3DExtensionsVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoFrame3DExtensions * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoFrame3DExtensions * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoFrame3DExtensions * This);
-        
-        BMDVideo3DPackingFormat ( STDMETHODCALLTYPE *Get3DPackingFormat )( 
-            IDeckLinkVideoFrame3DExtensions * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrameForRightEye )( 
-            IDeckLinkVideoFrame3DExtensions * This,
-            /* [out] */ IDeckLinkVideoFrame **rightEyeFrame);
-        
-        END_INTERFACE
-    } IDeckLinkVideoFrame3DExtensionsVtbl;
-
-    interface IDeckLinkVideoFrame3DExtensions
-    {
-        CONST_VTBL struct IDeckLinkVideoFrame3DExtensionsVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoFrame3DExtensions_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoFrame3DExtensions_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoFrame3DExtensions_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoFrame3DExtensions_Get3DPackingFormat(This)	\
-    ( (This)->lpVtbl -> Get3DPackingFormat(This) ) 
-
-#define IDeckLinkVideoFrame3DExtensions_GetFrameForRightEye(This,rightEyeFrame)	\
-    ( (This)->lpVtbl -> GetFrameForRightEye(This,rightEyeFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__
-#define __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoInputFrame */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoInputFrame;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("05CFE374-537C-4094-9A57-680525118F44")
-    IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [in] */ BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceTimestamp( 
-            /* [in] */ BMDTimeScale timeScale,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoInputFrameVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoInputFrame * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [in] */ BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [in] */ BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( 
-            IDeckLinkVideoInputFrame * This,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration);
-        
-        END_INTERFACE
-    } IDeckLinkVideoInputFrameVtbl;
-
-    interface IDeckLinkVideoInputFrame
-    {
-        CONST_VTBL struct IDeckLinkVideoInputFrameVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoInputFrame_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoInputFrame_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoInputFrame_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoInputFrame_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoInputFrame_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoInputFrame_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoInputFrame_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoInputFrame_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoInputFrame_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkVideoInputFrame_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkVideoInputFrame_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-
-#define IDeckLinkVideoInputFrame_GetStreamTime(This,frameTime,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 
-
-#define IDeckLinkVideoInputFrame_GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__
-#define __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoFrameAncillary */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoFrameAncillary;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("732E723C-D1A4-4E29-9E8E-4A88797A0004")
-    IDeckLinkVideoFrameAncillary : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetBufferForVerticalBlankingLine( 
-            /* [in] */ unsigned long lineNumber,
-            /* [out] */ void **buffer) = 0;
-        
-        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;
-        
-        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoFrameAncillaryVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoFrameAncillary * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoFrameAncillary * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoFrameAncillary * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferForVerticalBlankingLine )( 
-            IDeckLinkVideoFrameAncillary * This,
-            /* [in] */ unsigned long lineNumber,
-            /* [out] */ void **buffer);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoFrameAncillary * This);
-        
-        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 
-            IDeckLinkVideoFrameAncillary * This);
-        
-        END_INTERFACE
-    } IDeckLinkVideoFrameAncillaryVtbl;
-
-    interface IDeckLinkVideoFrameAncillary
-    {
-        CONST_VTBL struct IDeckLinkVideoFrameAncillaryVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoFrameAncillary_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoFrameAncillary_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoFrameAncillary_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoFrameAncillary_GetBufferForVerticalBlankingLine(This,lineNumber,buffer)	\
-    ( (This)->lpVtbl -> GetBufferForVerticalBlankingLine(This,lineNumber,buffer) ) 
-
-#define IDeckLinkVideoFrameAncillary_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoFrameAncillary_GetDisplayMode(This)	\
-    ( (This)->lpVtbl -> GetDisplayMode(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__
-#define __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__
-
-/* interface IDeckLinkAudioInputPacket */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkAudioInputPacket;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("E43D5870-2894-11DE-8C30-0800200C9A66")
-    IDeckLinkAudioInputPacket : public IUnknown
-    {
-    public:
-        virtual long STDMETHODCALLTYPE GetSampleFrameCount( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBytes( 
-            /* [out] */ void **buffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPacketTime( 
-            /* [out] */ BMDTimeValue *packetTime,
-            /* [in] */ BMDTimeScale timeScale) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkAudioInputPacketVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkAudioInputPacket * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkAudioInputPacket * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkAudioInputPacket * This);
-        
-        long ( STDMETHODCALLTYPE *GetSampleFrameCount )( 
-            IDeckLinkAudioInputPacket * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkAudioInputPacket * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPacketTime )( 
-            IDeckLinkAudioInputPacket * This,
-            /* [out] */ BMDTimeValue *packetTime,
-            /* [in] */ BMDTimeScale timeScale);
-        
-        END_INTERFACE
-    } IDeckLinkAudioInputPacketVtbl;
-
-    interface IDeckLinkAudioInputPacket
-    {
-        CONST_VTBL struct IDeckLinkAudioInputPacketVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkAudioInputPacket_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkAudioInputPacket_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkAudioInputPacket_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkAudioInputPacket_GetSampleFrameCount(This)	\
-    ( (This)->lpVtbl -> GetSampleFrameCount(This) ) 
-
-#define IDeckLinkAudioInputPacket_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkAudioInputPacket_GetPacketTime(This,packetTime,timeScale)	\
-    ( (This)->lpVtbl -> GetPacketTime(This,packetTime,timeScale) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__
-#define __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__
-
-/* interface IDeckLinkScreenPreviewCallback */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438")
-    IDeckLinkScreenPreviewCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DrawFrame( 
-            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkScreenPreviewCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkScreenPreviewCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkScreenPreviewCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkScreenPreviewCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DrawFrame )( 
-            IDeckLinkScreenPreviewCallback * This,
-            /* [in] */ IDeckLinkVideoFrame *theFrame);
-        
-        END_INTERFACE
-    } IDeckLinkScreenPreviewCallbackVtbl;
-
-    interface IDeckLinkScreenPreviewCallback
-    {
-        CONST_VTBL struct IDeckLinkScreenPreviewCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkScreenPreviewCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkScreenPreviewCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkScreenPreviewCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkScreenPreviewCallback_DrawFrame(This,theFrame)	\
-    ( (This)->lpVtbl -> DrawFrame(This,theFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__
-#define __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__
-
-/* interface IDeckLinkGLScreenPreviewHelper */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("504E2209-CAC7-4C1A-9FB4-C5BB6274D22F")
-    IDeckLinkGLScreenPreviewHelper : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE InitializeGL( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PaintGL( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetFrame( 
-            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Set3DPreviewFormat( 
-            /* [in] */ BMD3DPreviewFormat previewFormat) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkGLScreenPreviewHelperVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkGLScreenPreviewHelper * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkGLScreenPreviewHelper * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkGLScreenPreviewHelper * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *InitializeGL )( 
-            IDeckLinkGLScreenPreviewHelper * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PaintGL )( 
-            IDeckLinkGLScreenPreviewHelper * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFrame )( 
-            IDeckLinkGLScreenPreviewHelper * This,
-            /* [in] */ IDeckLinkVideoFrame *theFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *Set3DPreviewFormat )( 
-            IDeckLinkGLScreenPreviewHelper * This,
-            /* [in] */ BMD3DPreviewFormat previewFormat);
-        
-        END_INTERFACE
-    } IDeckLinkGLScreenPreviewHelperVtbl;
-
-    interface IDeckLinkGLScreenPreviewHelper
-    {
-        CONST_VTBL struct IDeckLinkGLScreenPreviewHelperVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkGLScreenPreviewHelper_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkGLScreenPreviewHelper_InitializeGL(This)	\
-    ( (This)->lpVtbl -> InitializeGL(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_PaintGL(This)	\
-    ( (This)->lpVtbl -> PaintGL(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_SetFrame(This,theFrame)	\
-    ( (This)->lpVtbl -> SetFrame(This,theFrame) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_Set3DPreviewFormat(This,previewFormat)	\
-    ( (This)->lpVtbl -> Set3DPreviewFormat(This,previewFormat) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkConfiguration_INTERFACE_DEFINED__
-#define __IDeckLinkConfiguration_INTERFACE_DEFINED__
-
-/* interface IDeckLinkConfiguration */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkConfiguration;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C679A35B-610C-4D09-B748-1D0478100FC0")
-    IDeckLinkConfiguration : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetFlag( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ BOOL value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFlag( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ BOOL *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetInt( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ LONGLONG value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetInt( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ LONGLONG *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetFloat( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ double value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFloat( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ double *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetString( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ BSTR value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetString( 
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ BSTR *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteConfigurationToPreferences( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkConfigurationVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkConfiguration * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkConfiguration * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFlag )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ BOOL value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ BOOL *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetInt )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ LONGLONG value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetInt )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ LONGLONG *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFloat )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ double value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ double *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetString )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [in] */ BSTR value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetString )( 
-            IDeckLinkConfiguration * This,
-            /* [in] */ BMDDeckLinkConfigurationID cfgID,
-            /* [out] */ BSTR *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( 
-            IDeckLinkConfiguration * This);
-        
-        END_INTERFACE
-    } IDeckLinkConfigurationVtbl;
-
-    interface IDeckLinkConfiguration
-    {
-        CONST_VTBL struct IDeckLinkConfigurationVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkConfiguration_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkConfiguration_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkConfiguration_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkConfiguration_SetFlag(This,cfgID,value)	\
-    ( (This)->lpVtbl -> SetFlag(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_GetFlag(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_SetInt(This,cfgID,value)	\
-    ( (This)->lpVtbl -> SetInt(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_GetInt(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_SetFloat(This,cfgID,value)	\
-    ( (This)->lpVtbl -> SetFloat(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_GetFloat(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_SetString(This,cfgID,value)	\
-    ( (This)->lpVtbl -> SetString(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_GetString(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 
-
-#define IDeckLinkConfiguration_WriteConfigurationToPreferences(This)	\
-    ( (This)->lpVtbl -> WriteConfigurationToPreferences(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkConfiguration_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkAttributes_INTERFACE_DEFINED__
-#define __IDeckLinkAttributes_INTERFACE_DEFINED__
-
-/* interface IDeckLinkAttributes */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkAttributes;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("ABC11843-D966-44CB-96E2-A1CB5D3135C4")
-    IDeckLinkAttributes : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetFlag( 
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ BOOL *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetInt( 
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ LONGLONG *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFloat( 
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ double *value) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetString( 
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ BSTR *value) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkAttributesVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkAttributes * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkAttributes * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkAttributes * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 
-            IDeckLinkAttributes * This,
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ BOOL *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetInt )( 
-            IDeckLinkAttributes * This,
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ LONGLONG *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 
-            IDeckLinkAttributes * This,
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ double *value);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetString )( 
-            IDeckLinkAttributes * This,
-            /* [in] */ BMDDeckLinkAttributeID cfgID,
-            /* [out] */ BSTR *value);
-        
-        END_INTERFACE
-    } IDeckLinkAttributesVtbl;
-
-    interface IDeckLinkAttributes
-    {
-        CONST_VTBL struct IDeckLinkAttributesVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkAttributes_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkAttributes_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkAttributes_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkAttributes_GetFlag(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 
-
-#define IDeckLinkAttributes_GetInt(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 
-
-#define IDeckLinkAttributes_GetFloat(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 
-
-#define IDeckLinkAttributes_GetString(This,cfgID,value)	\
-    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkAttributes_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkKeyer_INTERFACE_DEFINED__
-#define __IDeckLinkKeyer_INTERFACE_DEFINED__
-
-/* interface IDeckLinkKeyer */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkKeyer;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3")
-    IDeckLinkKeyer : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Enable( 
-            /* [in] */ BOOL isExternal) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetLevel( 
-            /* [in] */ unsigned char level) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RampUp( 
-            /* [in] */ unsigned long numberOfFrames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RampDown( 
-            /* [in] */ unsigned long numberOfFrames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Disable( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkKeyerVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkKeyer * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkKeyer * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkKeyer * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Enable )( 
-            IDeckLinkKeyer * This,
-            /* [in] */ BOOL isExternal);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IDeckLinkKeyer * This,
-            /* [in] */ unsigned char level);
-        
-        HRESULT ( STDMETHODCALLTYPE *RampUp )( 
-            IDeckLinkKeyer * This,
-            /* [in] */ unsigned long numberOfFrames);
-        
-        HRESULT ( STDMETHODCALLTYPE *RampDown )( 
-            IDeckLinkKeyer * This,
-            /* [in] */ unsigned long numberOfFrames);
-        
-        HRESULT ( STDMETHODCALLTYPE *Disable )( 
-            IDeckLinkKeyer * This);
-        
-        END_INTERFACE
-    } IDeckLinkKeyerVtbl;
-
-    interface IDeckLinkKeyer
-    {
-        CONST_VTBL struct IDeckLinkKeyerVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkKeyer_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkKeyer_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkKeyer_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkKeyer_Enable(This,isExternal)	\
-    ( (This)->lpVtbl -> Enable(This,isExternal) ) 
-
-#define IDeckLinkKeyer_SetLevel(This,level)	\
-    ( (This)->lpVtbl -> SetLevel(This,level) ) 
-
-#define IDeckLinkKeyer_RampUp(This,numberOfFrames)	\
-    ( (This)->lpVtbl -> RampUp(This,numberOfFrames) ) 
-
-#define IDeckLinkKeyer_RampDown(This,numberOfFrames)	\
-    ( (This)->lpVtbl -> RampDown(This,numberOfFrames) ) 
-
-#define IDeckLinkKeyer_Disable(This)	\
-    ( (This)->lpVtbl -> Disable(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkKeyer_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoConversion_INTERFACE_DEFINED__
-#define __IDeckLinkVideoConversion_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoConversion */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoConversion;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3BBCB8A2-DA2C-42D9-B5D8-88083644E99A")
-    IDeckLinkVideoConversion : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ConvertFrame( 
-            /* [in] */ IDeckLinkVideoFrame *srcFrame,
-            /* [in] */ IDeckLinkVideoFrame *dstFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoConversionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoConversion * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoConversion * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoConversion * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( 
-            IDeckLinkVideoConversion * This,
-            /* [in] */ IDeckLinkVideoFrame *srcFrame,
-            /* [in] */ IDeckLinkVideoFrame *dstFrame);
-        
-        END_INTERFACE
-    } IDeckLinkVideoConversionVtbl;
-
-    interface IDeckLinkVideoConversion
-    {
-        CONST_VTBL struct IDeckLinkVideoConversionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoConversion_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoConversion_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoConversion_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoConversion_ConvertFrame(This,srcFrame,dstFrame)	\
-    ( (This)->lpVtbl -> ConvertFrame(This,srcFrame,dstFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoConversion_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__
-#define __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDeckControlStatusCallback */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDeckControlStatusCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("E5F693C1-4283-4716-B18F-C1431521955B")
-    IDeckLinkDeckControlStatusCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE TimecodeUpdate( 
-            /* [in] */ BMDTimecodeBCD currentTimecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE VTRControlStateChanged( 
-            /* [in] */ BMDDeckControlVTRControlState newState,
-            /* [in] */ BMDDeckControlError error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DeckControlEventReceived( 
-            /* [in] */ BMDDeckControlEvent event,
-            /* [in] */ BMDDeckControlError error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DeckControlStatusChanged( 
-            /* [in] */ BMDDeckControlStatusFlags flags,
-            /* [in] */ unsigned long mask) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDeckControlStatusCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDeckControlStatusCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDeckControlStatusCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDeckControlStatusCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *TimecodeUpdate )( 
-            IDeckLinkDeckControlStatusCallback * This,
-            /* [in] */ BMDTimecodeBCD currentTimecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *VTRControlStateChanged )( 
-            IDeckLinkDeckControlStatusCallback * This,
-            /* [in] */ BMDDeckControlVTRControlState newState,
-            /* [in] */ BMDDeckControlError error);
-        
-        HRESULT ( STDMETHODCALLTYPE *DeckControlEventReceived )( 
-            IDeckLinkDeckControlStatusCallback * This,
-            /* [in] */ BMDDeckControlEvent event,
-            /* [in] */ BMDDeckControlError error);
-        
-        HRESULT ( STDMETHODCALLTYPE *DeckControlStatusChanged )( 
-            IDeckLinkDeckControlStatusCallback * This,
-            /* [in] */ BMDDeckControlStatusFlags flags,
-            /* [in] */ unsigned long mask);
-        
-        END_INTERFACE
-    } IDeckLinkDeckControlStatusCallbackVtbl;
-
-    interface IDeckLinkDeckControlStatusCallback
-    {
-        CONST_VTBL struct IDeckLinkDeckControlStatusCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDeckControlStatusCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDeckControlStatusCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDeckControlStatusCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDeckControlStatusCallback_TimecodeUpdate(This,currentTimecode)	\
-    ( (This)->lpVtbl -> TimecodeUpdate(This,currentTimecode) ) 
-
-#define IDeckLinkDeckControlStatusCallback_VTRControlStateChanged(This,newState,error)	\
-    ( (This)->lpVtbl -> VTRControlStateChanged(This,newState,error) ) 
-
-#define IDeckLinkDeckControlStatusCallback_DeckControlEventReceived(This,event,error)	\
-    ( (This)->lpVtbl -> DeckControlEventReceived(This,event,error) ) 
-
-#define IDeckLinkDeckControlStatusCallback_DeckControlStatusChanged(This,flags,mask)	\
-    ( (This)->lpVtbl -> DeckControlStatusChanged(This,flags,mask) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDeckControl_INTERFACE_DEFINED__
-#define __IDeckLinkDeckControl_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDeckControl */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDeckControl;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("522A9E39-0F3C-4742-94EE-D80DE335DA1D")
-    IDeckLinkDeckControl : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Open( 
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ BMDTimeValue timeValue,
-            /* [in] */ BOOL timecodeIsDropFrame,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Close( 
-            /* [in] */ BOOL standbyOn) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCurrentState( 
-            /* [out] */ BMDDeckControlMode *mode,
-            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,
-            /* [out] */ BMDDeckControlStatusFlags *flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetStandby( 
-            /* [in] */ BOOL standbyOn) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SendCommand( 
-            /* [in] */ unsigned char *inBuffer,
-            /* [in] */ unsigned long inBufferSize,
-            /* [out] */ unsigned char *outBuffer,
-            /* [out] */ unsigned long *outDataSize,
-            /* [in] */ unsigned long outBufferSize,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Play( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Stop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Eject( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GoToTimecode( 
-            /* [in] */ BMDTimecodeBCD timecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FastForward( 
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Rewind( 
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StepForward( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StepBack( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Jog( 
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Shuttle( 
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( 
-            /* [out] */ BSTR *currentTimeCode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 
-            /* [out] */ IDeckLinkTimecode **currentTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( 
-            /* [out] */ BMDTimecodeBCD *currentTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetPreroll( 
-            /* [in] */ unsigned long prerollSeconds) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPreroll( 
-            /* [out] */ unsigned long *prerollSeconds) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetExportOffset( 
-            /* [in] */ long exportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetExportOffset( 
-            /* [out] */ long *exportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( 
-            /* [out] */ long *deckManualExportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( 
-            /* [in] */ long captureOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( 
-            /* [out] */ long *captureOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartExport( 
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartCapture( 
-            /* [in] */ BOOL useVITC,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDeviceID( 
-            /* [out] */ unsigned short *deviceId,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDeckControlVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDeckControl * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDeckControl * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Open )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ BMDTimeValue timeValue,
-            /* [in] */ BOOL timecodeIsDropFrame,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Close )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BOOL standbyOn);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlMode *mode,
-            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,
-            /* [out] */ BMDDeckControlStatusFlags *flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetStandby )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BOOL standbyOn);
-        
-        HRESULT ( STDMETHODCALLTYPE *SendCommand )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ unsigned char *inBuffer,
-            /* [in] */ unsigned long inBufferSize,
-            /* [out] */ unsigned char *outBuffer,
-            /* [out] */ unsigned long *outDataSize,
-            /* [in] */ unsigned long outBufferSize,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Play )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Stop )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Eject )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BMDTimecodeBCD timecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *FastForward )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Rewind )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StepForward )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StepBack )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Jog )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Shuttle )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BSTR *currentTimeCode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ IDeckLinkTimecode **currentTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDTimecodeBCD *currentTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetPreroll )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ unsigned long prerollSeconds);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPreroll )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ unsigned long *prerollSeconds);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ long exportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ long *exportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ long *deckManualExportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ long captureOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ long *captureOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartExport )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ BOOL useVITC,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ unsigned short *deviceId,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Abort )( 
-            IDeckLinkDeckControl * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( 
-            IDeckLinkDeckControl * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkDeckControl * This,
-            /* [in] */ IDeckLinkDeckControlStatusCallback *callback);
-        
-        END_INTERFACE
-    } IDeckLinkDeckControlVtbl;
-
-    interface IDeckLinkDeckControl
-    {
-        CONST_VTBL struct IDeckLinkDeckControlVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDeckControl_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDeckControl_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDeckControl_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDeckControl_Open(This,timeScale,timeValue,timecodeIsDropFrame,error)	\
-    ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) 
-
-#define IDeckLinkDeckControl_Close(This,standbyOn)	\
-    ( (This)->lpVtbl -> Close(This,standbyOn) ) 
-
-#define IDeckLinkDeckControl_GetCurrentState(This,mode,vtrControlState,flags)	\
-    ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) 
-
-#define IDeckLinkDeckControl_SetStandby(This,standbyOn)	\
-    ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) 
-
-#define IDeckLinkDeckControl_SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error)	\
-    ( (This)->lpVtbl -> SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) ) 
-
-#define IDeckLinkDeckControl_Play(This,error)	\
-    ( (This)->lpVtbl -> Play(This,error) ) 
-
-#define IDeckLinkDeckControl_Stop(This,error)	\
-    ( (This)->lpVtbl -> Stop(This,error) ) 
-
-#define IDeckLinkDeckControl_TogglePlayStop(This,error)	\
-    ( (This)->lpVtbl -> TogglePlayStop(This,error) ) 
-
-#define IDeckLinkDeckControl_Eject(This,error)	\
-    ( (This)->lpVtbl -> Eject(This,error) ) 
-
-#define IDeckLinkDeckControl_GoToTimecode(This,timecode,error)	\
-    ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) 
-
-#define IDeckLinkDeckControl_FastForward(This,viewTape,error)	\
-    ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) 
-
-#define IDeckLinkDeckControl_Rewind(This,viewTape,error)	\
-    ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) 
-
-#define IDeckLinkDeckControl_StepForward(This,error)	\
-    ( (This)->lpVtbl -> StepForward(This,error) ) 
-
-#define IDeckLinkDeckControl_StepBack(This,error)	\
-    ( (This)->lpVtbl -> StepBack(This,error) ) 
-
-#define IDeckLinkDeckControl_Jog(This,rate,error)	\
-    ( (This)->lpVtbl -> Jog(This,rate,error) ) 
-
-#define IDeckLinkDeckControl_Shuttle(This,rate,error)	\
-    ( (This)->lpVtbl -> Shuttle(This,rate,error) ) 
-
-#define IDeckLinkDeckControl_GetTimecodeString(This,currentTimeCode,error)	\
-    ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) 
-
-#define IDeckLinkDeckControl_GetTimecode(This,currentTimecode,error)	\
-    ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) 
-
-#define IDeckLinkDeckControl_GetTimecodeBCD(This,currentTimecode,error)	\
-    ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) 
-
-#define IDeckLinkDeckControl_SetPreroll(This,prerollSeconds)	\
-    ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) 
-
-#define IDeckLinkDeckControl_GetPreroll(This,prerollSeconds)	\
-    ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) 
-
-#define IDeckLinkDeckControl_SetExportOffset(This,exportOffsetFields)	\
-    ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_GetExportOffset(This,exportOffsetFields)	\
-    ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_GetManualExportOffset(This,deckManualExportOffsetFields)	\
-    ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_SetCaptureOffset(This,captureOffsetFields)	\
-    ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) 
-
-#define IDeckLinkDeckControl_GetCaptureOffset(This,captureOffsetFields)	\
-    ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) 
-
-#define IDeckLinkDeckControl_StartExport(This,inTimecode,outTimecode,exportModeOps,error)	\
-    ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) 
-
-#define IDeckLinkDeckControl_StartCapture(This,useVITC,inTimecode,outTimecode,error)	\
-    ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) 
-
-#define IDeckLinkDeckControl_GetDeviceID(This,deviceId,error)	\
-    ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) 
-
-#define IDeckLinkDeckControl_Abort(This)	\
-    ( (This)->lpVtbl -> Abort(This) ) 
-
-#define IDeckLinkDeckControl_CrashRecordStart(This,error)	\
-    ( (This)->lpVtbl -> CrashRecordStart(This,error) ) 
-
-#define IDeckLinkDeckControl_CrashRecordStop(This,error)	\
-    ( (This)->lpVtbl -> CrashRecordStop(This,error) ) 
-
-#define IDeckLinkDeckControl_SetCallback(This,callback)	\
-    ( (This)->lpVtbl -> SetCallback(This,callback) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDeckControl_INTERFACE_DEFINED__ */
-
-
-EXTERN_C const CLSID CLSID_CDeckLinkIterator;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("D9EDA3B3-2887-41FA-B724-017CF1EB1D37")
-CDeckLinkIterator;
-#endif
-
-EXTERN_C const CLSID CLSID_CDeckLinkAPIInformation;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("263CA19F-ED09-482E-9F9D-84005783A237")
-CDeckLinkAPIInformation;
-#endif
-
-EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("F63E77C7-B655-4A4A-9AD0-3CA85D394343")
-CDeckLinkGLScreenPreviewHelper;
-#endif
-
-EXTERN_C const CLSID CLSID_CDeckLinkVideoConversion;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("7DBBBB11-5B7B-467D-AEA4-CEA468FD368C")
-CDeckLinkVideoConversion;
-#endif
-
-#ifndef __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__
-#define __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDeckControl_v7_9 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7")
-    IDeckLinkDeckControl_v7_9 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Open( 
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ BMDTimeValue timeValue,
-            /* [in] */ BOOL timecodeIsDropFrame,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Close( 
-            /* [in] */ BOOL standbyOn) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCurrentState( 
-            /* [out] */ BMDDeckControlMode *mode,
-            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,
-            /* [out] */ BMDDeckControlStatusFlags *flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetStandby( 
-            /* [in] */ BOOL standbyOn) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Play( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Stop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Eject( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GoToTimecode( 
-            /* [in] */ BMDTimecodeBCD timecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FastForward( 
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Rewind( 
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StepForward( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StepBack( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Jog( 
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Shuttle( 
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( 
-            /* [out] */ BSTR *currentTimeCode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 
-            /* [out] */ IDeckLinkTimecode **currentTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( 
-            /* [out] */ BMDTimecodeBCD *currentTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetPreroll( 
-            /* [in] */ unsigned long prerollSeconds) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPreroll( 
-            /* [out] */ unsigned long *prerollSeconds) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetExportOffset( 
-            /* [in] */ long exportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetExportOffset( 
-            /* [out] */ long *exportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( 
-            /* [out] */ long *deckManualExportOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( 
-            /* [in] */ long captureOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( 
-            /* [out] */ long *captureOffsetFields) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartExport( 
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartCapture( 
-            /* [in] */ BOOL useVITC,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDeviceID( 
-            /* [out] */ unsigned short *deviceId,
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( 
-            /* [out] */ BMDDeckControlError *error) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDeckControl_v7_9Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDeckControl_v7_9 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDeckControl_v7_9 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Open )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BMDTimeScale timeScale,
-            /* [in] */ BMDTimeValue timeValue,
-            /* [in] */ BOOL timecodeIsDropFrame,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Close )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BOOL standbyOn);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlMode *mode,
-            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,
-            /* [out] */ BMDDeckControlStatusFlags *flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetStandby )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BOOL standbyOn);
-        
-        HRESULT ( STDMETHODCALLTYPE *Play )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Stop )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Eject )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BMDTimecodeBCD timecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *FastForward )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Rewind )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BOOL viewTape,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StepForward )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StepBack )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Jog )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Shuttle )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ double rate,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BSTR *currentTimeCode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ IDeckLinkTimecode **currentTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDTimecodeBCD *currentTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetPreroll )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ unsigned long prerollSeconds);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPreroll )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ unsigned long *prerollSeconds);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ long exportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ long *exportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ long *deckManualExportOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ long captureOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ long *captureOffsetFields);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartExport )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ BOOL useVITC,
-            /* [in] */ BMDTimecodeBCD inTimecode,
-            /* [in] */ BMDTimecodeBCD outTimecode,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ unsigned short *deviceId,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *Abort )( 
-            IDeckLinkDeckControl_v7_9 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [out] */ BMDDeckControlError *error);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkDeckControl_v7_9 * This,
-            /* [in] */ IDeckLinkDeckControlStatusCallback *callback);
-        
-        END_INTERFACE
-    } IDeckLinkDeckControl_v7_9Vtbl;
-
-    interface IDeckLinkDeckControl_v7_9
-    {
-        CONST_VTBL struct IDeckLinkDeckControl_v7_9Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDeckControl_v7_9_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDeckControl_v7_9_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDeckControl_v7_9_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDeckControl_v7_9_Open(This,timeScale,timeValue,timecodeIsDropFrame,error)	\
-    ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Close(This,standbyOn)	\
-    ( (This)->lpVtbl -> Close(This,standbyOn) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetCurrentState(This,mode,vtrControlState,flags)	\
-    ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) 
-
-#define IDeckLinkDeckControl_v7_9_SetStandby(This,standbyOn)	\
-    ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) 
-
-#define IDeckLinkDeckControl_v7_9_Play(This,error)	\
-    ( (This)->lpVtbl -> Play(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Stop(This,error)	\
-    ( (This)->lpVtbl -> Stop(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_TogglePlayStop(This,error)	\
-    ( (This)->lpVtbl -> TogglePlayStop(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Eject(This,error)	\
-    ( (This)->lpVtbl -> Eject(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_GoToTimecode(This,timecode,error)	\
-    ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_FastForward(This,viewTape,error)	\
-    ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Rewind(This,viewTape,error)	\
-    ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_StepForward(This,error)	\
-    ( (This)->lpVtbl -> StepForward(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_StepBack(This,error)	\
-    ( (This)->lpVtbl -> StepBack(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Jog(This,rate,error)	\
-    ( (This)->lpVtbl -> Jog(This,rate,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Shuttle(This,rate,error)	\
-    ( (This)->lpVtbl -> Shuttle(This,rate,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetTimecodeString(This,currentTimeCode,error)	\
-    ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetTimecode(This,currentTimecode,error)	\
-    ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetTimecodeBCD(This,currentTimecode,error)	\
-    ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_SetPreroll(This,prerollSeconds)	\
-    ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetPreroll(This,prerollSeconds)	\
-    ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) 
-
-#define IDeckLinkDeckControl_v7_9_SetExportOffset(This,exportOffsetFields)	\
-    ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetExportOffset(This,exportOffsetFields)	\
-    ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetManualExportOffset(This,deckManualExportOffsetFields)	\
-    ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) 
-
-#define IDeckLinkDeckControl_v7_9_SetCaptureOffset(This,captureOffsetFields)	\
-    ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetCaptureOffset(This,captureOffsetFields)	\
-    ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) 
-
-#define IDeckLinkDeckControl_v7_9_StartExport(This,inTimecode,outTimecode,exportModeOps,error)	\
-    ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_StartCapture(This,useVITC,inTimecode,outTimecode,error)	\
-    ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_GetDeviceID(This,deviceId,error)	\
-    ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_Abort(This)	\
-    ( (This)->lpVtbl -> Abort(This) ) 
-
-#define IDeckLinkDeckControl_v7_9_CrashRecordStart(This,error)	\
-    ( (This)->lpVtbl -> CrashRecordStart(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_CrashRecordStop(This,error)	\
-    ( (This)->lpVtbl -> CrashRecordStop(This,error) ) 
-
-#define IDeckLinkDeckControl_v7_9_SetCallback(This,callback)	\
-    ( (This)->lpVtbl -> SetCallback(This,callback) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayModeIterator_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("455D741F-1779-4800-86F5-0B5D13D79751")
-    IDeckLinkDisplayModeIterator_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Next( 
-            /* [out] */ IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayModeIterator_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayModeIterator_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayModeIterator_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayModeIterator_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Next )( 
-            IDeckLinkDisplayModeIterator_v7_6 * This,
-            /* [out] */ IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayModeIterator_v7_6Vtbl;
-
-    interface IDeckLinkDisplayModeIterator_v7_6
-    {
-        CONST_VTBL struct IDeckLinkDisplayModeIterator_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayModeIterator_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayModeIterator_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayModeIterator_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayModeIterator_v7_6_Next(This,deckLinkDisplayMode)	\
-    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayMode_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("87451E84-2B7E-439E-A629-4393EA4A8550")
-    IDeckLinkDisplayMode_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetName( 
-            /* [out] */ BSTR *name) = 0;
-        
-        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale) = 0;
-        
-        virtual BMDFieldDominance STDMETHODCALLTYPE GetFieldDominance( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayMode_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayMode_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetName )( 
-            IDeckLinkDisplayMode_v7_6 * This,
-            /* [out] */ BSTR *name);
-        
-        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 
-            IDeckLinkDisplayMode_v7_6 * This,
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale);
-        
-        BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( 
-            IDeckLinkDisplayMode_v7_6 * This);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayMode_v7_6Vtbl;
-
-    interface IDeckLinkDisplayMode_v7_6
-    {
-        CONST_VTBL struct IDeckLinkDisplayMode_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayMode_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayMode_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayMode_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayMode_v7_6_GetName(This,name)	\
-    ( (This)->lpVtbl -> GetName(This,name) ) 
-
-#define IDeckLinkDisplayMode_v7_6_GetDisplayMode(This)	\
-    ( (This)->lpVtbl -> GetDisplayMode(This) ) 
-
-#define IDeckLinkDisplayMode_v7_6_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkDisplayMode_v7_6_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkDisplayMode_v7_6_GetFrameRate(This,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 
-
-#define IDeckLinkDisplayMode_v7_6_GetFieldDominance(This)	\
-    ( (This)->lpVtbl -> GetFieldDominance(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkOutput_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkOutput_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("29228142-EB8C-4141-A621-F74026450955")
-    IDeckLinkOutput_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 
-            BMDDisplayMode displayMode,
-            BMDVideoOutputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 
-            BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 
-            /* [in] */ IDeckLinkVideoOutputCallback_v7_6 *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 
-            /* [out] */ unsigned long *bufferedFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount,
-            BMDAudioOutputStreamType streamType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 
-            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 
-            BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 
-            /* [out] */ BOOL *active) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetScheduledStreamTime( 
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *streamTime,
-            /* [out] */ double *playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkOutput_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDDisplayMode displayMode,
-            BMDVideoOutputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 
-            IDeckLinkOutput_v7_6 * This,
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkVideoOutputCallback_v7_6 *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [out] */ unsigned long *bufferedFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount,
-            BMDAudioOutputStreamType streamType);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [out] */ unsigned long *bufferedSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 
-            IDeckLinkOutput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 
-            IDeckLinkOutput_v7_6 * This,
-            /* [out] */ BOOL *active);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *streamTime,
-            /* [out] */ double *playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkOutput_v7_6 * This,
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame);
-        
-        END_INTERFACE
-    } IDeckLinkOutput_v7_6Vtbl;
-
-    interface IDeckLinkOutput_v7_6
-    {
-        CONST_VTBL struct IDeckLinkOutput_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkOutput_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkOutput_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkOutput_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkOutput_v7_6_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkOutput_v7_6_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkOutput_v7_6_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkOutput_v7_6_EnableVideoOutput(This,displayMode,flags)	\
-    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 
-
-#define IDeckLinkOutput_v7_6_DisableVideoOutput(This)	\
-    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 
-
-#define IDeckLinkOutput_v7_6_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\
-    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 
-
-#define IDeckLinkOutput_v7_6_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\
-    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 
-
-#define IDeckLinkOutput_v7_6_CreateAncillaryData(This,pixelFormat,outBuffer)	\
-    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 
-
-#define IDeckLinkOutput_v7_6_DisplayVideoFrameSync(This,theFrame)	\
-    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 
-
-#define IDeckLinkOutput_v7_6_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\
-    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 
-
-#define IDeckLinkOutput_v7_6_SetScheduledFrameCompletionCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_6_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 
-
-#define IDeckLinkOutput_v7_6_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\
-    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 
-
-#define IDeckLinkOutput_v7_6_DisableAudioOutput(This)	\
-    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 
-
-#define IDeckLinkOutput_v7_6_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_6_BeginAudioPreroll(This)	\
-    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_6_EndAudioPreroll(This)	\
-    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_6_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_6_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 
-
-#define IDeckLinkOutput_v7_6_FlushBufferedAudioSamples(This)	\
-    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 
-
-#define IDeckLinkOutput_v7_6_SetAudioCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_6_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\
-    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 
-
-#define IDeckLinkOutput_v7_6_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\
-    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 
-
-#define IDeckLinkOutput_v7_6_IsScheduledPlaybackRunning(This,active)	\
-    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 
-
-#define IDeckLinkOutput_v7_6_GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed)	\
-    ( (This)->lpVtbl -> GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed) ) 
-
-#define IDeckLinkOutput_v7_6_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkInput_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInput_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInput_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("300C135A-9F43-48E2-9906-6D7911D93CF1")
-    IDeckLinkInput_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 
-            /* [out] */ unsigned long *availableFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 
-            /* [out] */ unsigned long *availableSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkInputCallback_v7_6 *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInput_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkInput_v7_6 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 
-            IDeckLinkInput_v7_6 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [out] */ unsigned long *availableFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 
-            IDeckLinkInput_v7_6 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [out] */ unsigned long *availableSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 
-            IDeckLinkInput_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkInput_v7_6 * This,
-            /* [in] */ IDeckLinkInputCallback_v7_6 *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkInput_v7_6 * This,
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *hardwareTime,
-            /* [out] */ BMDTimeValue *timeInFrame,
-            /* [out] */ BMDTimeValue *ticksPerFrame);
-        
-        END_INTERFACE
-    } IDeckLinkInput_v7_6Vtbl;
-
-    interface IDeckLinkInput_v7_6
-    {
-        CONST_VTBL struct IDeckLinkInput_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInput_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInput_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInput_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInput_v7_6_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkInput_v7_6_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkInput_v7_6_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkInput_v7_6_EnableVideoInput(This,displayMode,pixelFormat,flags)	\
-    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 
-
-#define IDeckLinkInput_v7_6_DisableVideoInput(This)	\
-    ( (This)->lpVtbl -> DisableVideoInput(This) ) 
-
-#define IDeckLinkInput_v7_6_GetAvailableVideoFrameCount(This,availableFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 
-
-#define IDeckLinkInput_v7_6_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\
-    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 
-
-#define IDeckLinkInput_v7_6_DisableAudioInput(This)	\
-    ( (This)->lpVtbl -> DisableAudioInput(This) ) 
-
-#define IDeckLinkInput_v7_6_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 
-
-#define IDeckLinkInput_v7_6_StartStreams(This)	\
-    ( (This)->lpVtbl -> StartStreams(This) ) 
-
-#define IDeckLinkInput_v7_6_StopStreams(This)	\
-    ( (This)->lpVtbl -> StopStreams(This) ) 
-
-#define IDeckLinkInput_v7_6_PauseStreams(This)	\
-    ( (This)->lpVtbl -> PauseStreams(This) ) 
-
-#define IDeckLinkInput_v7_6_FlushStreams(This)	\
-    ( (This)->lpVtbl -> FlushStreams(This) ) 
-
-#define IDeckLinkInput_v7_6_SetCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 
-
-#define IDeckLinkInput_v7_6_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInput_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkTimecode_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkTimecode_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("EFB9BCA6-A521-44F7-BD69-2332F24D9EE6")
-    IDeckLinkTimecode_v7_6 : public IUnknown
-    {
-    public:
-        virtual BMDTimecodeBCD STDMETHODCALLTYPE GetBCD( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetComponents( 
-            /* [out] */ unsigned char *hours,
-            /* [out] */ unsigned char *minutes,
-            /* [out] */ unsigned char *seconds,
-            /* [out] */ unsigned char *frames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetString( 
-            /* [out] */ BSTR *timecode) = 0;
-        
-        virtual BMDTimecodeFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkTimecode_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkTimecode_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkTimecode_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkTimecode_v7_6 * This);
-        
-        BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( 
-            IDeckLinkTimecode_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetComponents )( 
-            IDeckLinkTimecode_v7_6 * This,
-            /* [out] */ unsigned char *hours,
-            /* [out] */ unsigned char *minutes,
-            /* [out] */ unsigned char *seconds,
-            /* [out] */ unsigned char *frames);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetString )( 
-            IDeckLinkTimecode_v7_6 * This,
-            /* [out] */ BSTR *timecode);
-        
-        BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkTimecode_v7_6 * This);
-        
-        END_INTERFACE
-    } IDeckLinkTimecode_v7_6Vtbl;
-
-    interface IDeckLinkTimecode_v7_6
-    {
-        CONST_VTBL struct IDeckLinkTimecode_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkTimecode_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkTimecode_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkTimecode_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkTimecode_v7_6_GetBCD(This)	\
-    ( (This)->lpVtbl -> GetBCD(This) ) 
-
-#define IDeckLinkTimecode_v7_6_GetComponents(This,hours,minutes,seconds,frames)	\
-    ( (This)->lpVtbl -> GetComponents(This,hours,minutes,seconds,frames) ) 
-
-#define IDeckLinkTimecode_v7_6_GetString(This,timecode)	\
-    ( (This)->lpVtbl -> GetString(This,timecode) ) 
-
-#define IDeckLinkTimecode_v7_6_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoFrame_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A8D8238E-6B18-4196-99E1-5AF717B83D32")
-    IDeckLinkVideoFrame_v7_6 : public IUnknown
-    {
-    public:
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;
-        
-        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;
-        
-        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBytes( 
-            /* [out] */ void **buffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 
-            BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode_v7_6 **timecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAncillaryData( 
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoFrame_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoFrame_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoFrame_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoFrame_v7_6 * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkVideoFrame_v7_6 * This,
-            BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkVideoFrame_v7_6 * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        END_INTERFACE
-    } IDeckLinkVideoFrame_v7_6Vtbl;
-
-    interface IDeckLinkVideoFrame_v7_6
-    {
-        CONST_VTBL struct IDeckLinkVideoFrame_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoFrame_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoFrame_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoFrame_v7_6_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkVideoFrame_v7_6_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkMutableVideoFrame_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkMutableVideoFrame_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("46FCEE00-B4E6-43D0-91C0-023A7FCEB34F")
-    IDeckLinkMutableVideoFrame_v7_6 : public IDeckLinkVideoFrame_v7_6
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetFlags( 
-            BMDFrameFlags newFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetTimecode( 
-            BMDTimecodeFormat format,
-            /* [in] */ IDeckLinkTimecode_v7_6 *timecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetTimecodeFromComponents( 
-            BMDTimecodeFormat format,
-            unsigned char hours,
-            unsigned char minutes,
-            unsigned char seconds,
-            unsigned char frames,
-            BMDTimecodeFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAncillaryData( 
-            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkMutableVideoFrame_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            BMDFrameFlags newFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetTimecode )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            BMDTimecodeFormat format,
-            /* [in] */ IDeckLinkTimecode_v7_6 *timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            BMDTimecodeFormat format,
-            unsigned char hours,
-            unsigned char minutes,
-            unsigned char seconds,
-            unsigned char frames,
-            BMDTimecodeFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( 
-            IDeckLinkMutableVideoFrame_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary);
-        
-        END_INTERFACE
-    } IDeckLinkMutableVideoFrame_v7_6Vtbl;
-
-    interface IDeckLinkMutableVideoFrame_v7_6
-    {
-        CONST_VTBL struct IDeckLinkMutableVideoFrame_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkMutableVideoFrame_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-
-#define IDeckLinkMutableVideoFrame_v7_6_SetFlags(This,newFlags)	\
-    ( (This)->lpVtbl -> SetFlags(This,newFlags) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_SetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> SetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags)	\
-    ( (This)->lpVtbl -> SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags) ) 
-
-#define IDeckLinkMutableVideoFrame_v7_6_SetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> SetAncillaryData(This,ancillary) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoInputFrame_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("9A74FA41-AE9F-47AC-8CF4-01F42DD59965")
-    IDeckLinkVideoInputFrame_v7_6 : public IDeckLinkVideoFrame_v7_6
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceTimestamp( 
-            BMDTimeScale timeScale,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoInputFrame_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoInputFrame_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( 
-            IDeckLinkVideoInputFrame_v7_6 * This,
-            BMDTimeScale timeScale,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration);
-        
-        END_INTERFACE
-    } IDeckLinkVideoInputFrame_v7_6Vtbl;
-
-    interface IDeckLinkVideoInputFrame_v7_6
-    {
-        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoInputFrame_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_6_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_6_GetStreamTime(This,frameTime,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 
-
-#define IDeckLinkVideoInputFrame_v7_6_GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkScreenPreviewCallback_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("373F499D-4B4D-4518-AD22-6354E5A5825E")
-    IDeckLinkScreenPreviewCallback_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DrawFrame( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkScreenPreviewCallback_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkScreenPreviewCallback_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkScreenPreviewCallback_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkScreenPreviewCallback_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DrawFrame )( 
-            IDeckLinkScreenPreviewCallback_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);
-        
-        END_INTERFACE
-    } IDeckLinkScreenPreviewCallback_v7_6Vtbl;
-
-    interface IDeckLinkScreenPreviewCallback_v7_6
-    {
-        CONST_VTBL struct IDeckLinkScreenPreviewCallback_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkScreenPreviewCallback_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkScreenPreviewCallback_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkScreenPreviewCallback_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkScreenPreviewCallback_v7_6_DrawFrame(This,theFrame)	\
-    ( (This)->lpVtbl -> DrawFrame(This,theFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkGLScreenPreviewHelper_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("BA575CD9-A15E-497B-B2C2-F9AFE7BE4EBA")
-    IDeckLinkGLScreenPreviewHelper_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE InitializeGL( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PaintGL( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetFrame( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkGLScreenPreviewHelper_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *InitializeGL )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PaintGL )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFrame )( 
-            IDeckLinkGLScreenPreviewHelper_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);
-        
-        END_INTERFACE
-    } IDeckLinkGLScreenPreviewHelper_v7_6Vtbl;
-
-    interface IDeckLinkGLScreenPreviewHelper_v7_6
-    {
-        CONST_VTBL struct IDeckLinkGLScreenPreviewHelper_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_InitializeGL(This)	\
-    ( (This)->lpVtbl -> InitializeGL(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_PaintGL(This)	\
-    ( (This)->lpVtbl -> PaintGL(This) ) 
-
-#define IDeckLinkGLScreenPreviewHelper_v7_6_SetFrame(This,theFrame)	\
-    ( (This)->lpVtbl -> SetFrame(This,theFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoConversion_v7_6 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoConversion_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3EB504C9-F97D-40FE-A158-D407D48CB53B")
-    IDeckLinkVideoConversion_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ConvertFrame( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *srcFrame,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *dstFrame) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoConversion_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoConversion_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoConversion_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoConversion_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( 
-            IDeckLinkVideoConversion_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *srcFrame,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *dstFrame);
-        
-        END_INTERFACE
-    } IDeckLinkVideoConversion_v7_6Vtbl;
-
-    interface IDeckLinkVideoConversion_v7_6
-    {
-        CONST_VTBL struct IDeckLinkVideoConversion_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoConversion_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoConversion_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoConversion_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoConversion_v7_6_ConvertFrame(This,srcFrame,dstFrame)	\
-    ( (This)->lpVtbl -> ConvertFrame(This,srcFrame,dstFrame) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkConfiguration_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkConfiguration_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("B8EAD569-B764-47F0-A73F-AE40DF6CBF10")
-    IDeckLinkConfiguration_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetConfigurationValidator( 
-            /* [out] */ IDeckLinkConfiguration_v7_6 **configObject) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteConfigurationToPreferences( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFormat( 
-            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsVideoOutputActive( 
-            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection,
-            /* [out] */ BOOL *active) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAnalogVideoOutputFlags( 
-            /* [in] */ BMDAnalogVideoFlags analogVideoFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAnalogVideoOutputFlags( 
-            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableFieldFlickerRemovalWhenPaused( 
-            /* [in] */ BOOL enable) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsEnabledFieldFlickerRemovalWhenPaused( 
-            /* [out] */ BOOL *enabled) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Set444And3GBpsVideoOutput( 
-            /* [in] */ BOOL enable444VideoOutput,
-            /* [in] */ BOOL enable3GbsOutput) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Get444And3GBpsVideoOutput( 
-            /* [out] */ BOOL *is444VideoOutputEnabled,
-            /* [out] */ BOOL *threeGbsOutputEnabled) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputConversionMode( 
-            /* [in] */ BMDVideoOutputConversionMode conversionMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetVideoOutputConversionMode( 
-            /* [out] */ BMDVideoOutputConversionMode *conversionMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Set_HD1080p24_to_HD1080i5994_Conversion( 
-            /* [in] */ BOOL enable) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Get_HD1080p24_to_HD1080i5994_Conversion( 
-            /* [out] */ BOOL *enabled) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoInputFormat( 
-            /* [in] */ BMDVideoConnection_v7_6 videoInputFormat) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetVideoInputFormat( 
-            /* [out] */ BMDVideoConnection_v7_6 *videoInputFormat) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAnalogVideoInputFlags( 
-            /* [in] */ BMDAnalogVideoFlags analogVideoFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAnalogVideoInputFlags( 
-            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoInputConversionMode( 
-            /* [in] */ BMDVideoInputConversionMode conversionMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetVideoInputConversionMode( 
-            /* [out] */ BMDVideoInputConversionMode *conversionMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetBlackVideoOutputDuringCapture( 
-            /* [in] */ BOOL blackOutInCapture) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBlackVideoOutputDuringCapture( 
-            /* [out] */ BOOL *blackOutInCapture) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Set32PulldownSequenceInitialTimecodeFrame( 
-            /* [in] */ unsigned long aFrameTimecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Get32PulldownSequenceInitialTimecodeFrame( 
-            /* [out] */ unsigned long *aFrameTimecode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVancSourceLineMapping( 
-            /* [in] */ unsigned long activeLine1VANCsource,
-            /* [in] */ unsigned long activeLine2VANCsource,
-            /* [in] */ unsigned long activeLine3VANCsource) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetVancSourceLineMapping( 
-            /* [out] */ unsigned long *activeLine1VANCsource,
-            /* [out] */ unsigned long *activeLine2VANCsource,
-            /* [out] */ unsigned long *activeLine3VANCsource) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAudioInputFormat( 
-            /* [in] */ BMDAudioConnection audioInputFormat) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAudioInputFormat( 
-            /* [out] */ BMDAudioConnection *audioInputFormat) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkConfiguration_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkConfiguration_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkConfiguration_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConfigurationValidator )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ IDeckLinkConfiguration_v7_6 **configObject);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( 
-            IDeckLinkConfiguration_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFormat )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsVideoOutputActive )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection,
-            /* [out] */ BOOL *active);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoOutputFlags )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDAnalogVideoFlags analogVideoFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoOutputFlags )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableFieldFlickerRemovalWhenPaused )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BOOL enable);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsEnabledFieldFlickerRemovalWhenPaused )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BOOL *enabled);
-        
-        HRESULT ( STDMETHODCALLTYPE *Set444And3GBpsVideoOutput )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BOOL enable444VideoOutput,
-            /* [in] */ BOOL enable3GbsOutput);
-        
-        HRESULT ( STDMETHODCALLTYPE *Get444And3GBpsVideoOutput )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BOOL *is444VideoOutputEnabled,
-            /* [out] */ BOOL *threeGbsOutputEnabled);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputConversionMode )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDVideoOutputConversionMode conversionMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetVideoOutputConversionMode )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDVideoOutputConversionMode *conversionMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *Set_HD1080p24_to_HD1080i5994_Conversion )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BOOL enable);
-        
-        HRESULT ( STDMETHODCALLTYPE *Get_HD1080p24_to_HD1080i5994_Conversion )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BOOL *enabled);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoInputFormat )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDVideoConnection_v7_6 videoInputFormat);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetVideoInputFormat )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDVideoConnection_v7_6 *videoInputFormat);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoInputFlags )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDAnalogVideoFlags analogVideoFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoInputFlags )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoInputConversionMode )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDVideoInputConversionMode conversionMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetVideoInputConversionMode )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDVideoInputConversionMode *conversionMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetBlackVideoOutputDuringCapture )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BOOL blackOutInCapture);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBlackVideoOutputDuringCapture )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BOOL *blackOutInCapture);
-        
-        HRESULT ( STDMETHODCALLTYPE *Set32PulldownSequenceInitialTimecodeFrame )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ unsigned long aFrameTimecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *Get32PulldownSequenceInitialTimecodeFrame )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ unsigned long *aFrameTimecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVancSourceLineMapping )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ unsigned long activeLine1VANCsource,
-            /* [in] */ unsigned long activeLine2VANCsource,
-            /* [in] */ unsigned long activeLine3VANCsource);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetVancSourceLineMapping )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ unsigned long *activeLine1VANCsource,
-            /* [out] */ unsigned long *activeLine2VANCsource,
-            /* [out] */ unsigned long *activeLine3VANCsource);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAudioInputFormat )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [in] */ BMDAudioConnection audioInputFormat);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAudioInputFormat )( 
-            IDeckLinkConfiguration_v7_6 * This,
-            /* [out] */ BMDAudioConnection *audioInputFormat);
-        
-        END_INTERFACE
-    } IDeckLinkConfiguration_v7_6Vtbl;
-
-    interface IDeckLinkConfiguration_v7_6
-    {
-        CONST_VTBL struct IDeckLinkConfiguration_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkConfiguration_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkConfiguration_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkConfiguration_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkConfiguration_v7_6_GetConfigurationValidator(This,configObject)	\
-    ( (This)->lpVtbl -> GetConfigurationValidator(This,configObject) ) 
-
-#define IDeckLinkConfiguration_v7_6_WriteConfigurationToPreferences(This)	\
-    ( (This)->lpVtbl -> WriteConfigurationToPreferences(This) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetVideoOutputFormat(This,videoOutputConnection)	\
-    ( (This)->lpVtbl -> SetVideoOutputFormat(This,videoOutputConnection) ) 
-
-#define IDeckLinkConfiguration_v7_6_IsVideoOutputActive(This,videoOutputConnection,active)	\
-    ( (This)->lpVtbl -> IsVideoOutputActive(This,videoOutputConnection,active) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetAnalogVideoOutputFlags(This,analogVideoFlags)	\
-    ( (This)->lpVtbl -> SetAnalogVideoOutputFlags(This,analogVideoFlags) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetAnalogVideoOutputFlags(This,analogVideoFlags)	\
-    ( (This)->lpVtbl -> GetAnalogVideoOutputFlags(This,analogVideoFlags) ) 
-
-#define IDeckLinkConfiguration_v7_6_EnableFieldFlickerRemovalWhenPaused(This,enable)	\
-    ( (This)->lpVtbl -> EnableFieldFlickerRemovalWhenPaused(This,enable) ) 
-
-#define IDeckLinkConfiguration_v7_6_IsEnabledFieldFlickerRemovalWhenPaused(This,enabled)	\
-    ( (This)->lpVtbl -> IsEnabledFieldFlickerRemovalWhenPaused(This,enabled) ) 
-
-#define IDeckLinkConfiguration_v7_6_Set444And3GBpsVideoOutput(This,enable444VideoOutput,enable3GbsOutput)	\
-    ( (This)->lpVtbl -> Set444And3GBpsVideoOutput(This,enable444VideoOutput,enable3GbsOutput) ) 
-
-#define IDeckLinkConfiguration_v7_6_Get444And3GBpsVideoOutput(This,is444VideoOutputEnabled,threeGbsOutputEnabled)	\
-    ( (This)->lpVtbl -> Get444And3GBpsVideoOutput(This,is444VideoOutputEnabled,threeGbsOutputEnabled) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetVideoOutputConversionMode(This,conversionMode)	\
-    ( (This)->lpVtbl -> SetVideoOutputConversionMode(This,conversionMode) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetVideoOutputConversionMode(This,conversionMode)	\
-    ( (This)->lpVtbl -> GetVideoOutputConversionMode(This,conversionMode) ) 
-
-#define IDeckLinkConfiguration_v7_6_Set_HD1080p24_to_HD1080i5994_Conversion(This,enable)	\
-    ( (This)->lpVtbl -> Set_HD1080p24_to_HD1080i5994_Conversion(This,enable) ) 
-
-#define IDeckLinkConfiguration_v7_6_Get_HD1080p24_to_HD1080i5994_Conversion(This,enabled)	\
-    ( (This)->lpVtbl -> Get_HD1080p24_to_HD1080i5994_Conversion(This,enabled) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetVideoInputFormat(This,videoInputFormat)	\
-    ( (This)->lpVtbl -> SetVideoInputFormat(This,videoInputFormat) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetVideoInputFormat(This,videoInputFormat)	\
-    ( (This)->lpVtbl -> GetVideoInputFormat(This,videoInputFormat) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetAnalogVideoInputFlags(This,analogVideoFlags)	\
-    ( (This)->lpVtbl -> SetAnalogVideoInputFlags(This,analogVideoFlags) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetAnalogVideoInputFlags(This,analogVideoFlags)	\
-    ( (This)->lpVtbl -> GetAnalogVideoInputFlags(This,analogVideoFlags) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetVideoInputConversionMode(This,conversionMode)	\
-    ( (This)->lpVtbl -> SetVideoInputConversionMode(This,conversionMode) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetVideoInputConversionMode(This,conversionMode)	\
-    ( (This)->lpVtbl -> GetVideoInputConversionMode(This,conversionMode) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetBlackVideoOutputDuringCapture(This,blackOutInCapture)	\
-    ( (This)->lpVtbl -> SetBlackVideoOutputDuringCapture(This,blackOutInCapture) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetBlackVideoOutputDuringCapture(This,blackOutInCapture)	\
-    ( (This)->lpVtbl -> GetBlackVideoOutputDuringCapture(This,blackOutInCapture) ) 
-
-#define IDeckLinkConfiguration_v7_6_Set32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode)	\
-    ( (This)->lpVtbl -> Set32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode) ) 
-
-#define IDeckLinkConfiguration_v7_6_Get32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode)	\
-    ( (This)->lpVtbl -> Get32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource)	\
-    ( (This)->lpVtbl -> SetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource)	\
-    ( (This)->lpVtbl -> GetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource) ) 
-
-#define IDeckLinkConfiguration_v7_6_SetAudioInputFormat(This,audioInputFormat)	\
-    ( (This)->lpVtbl -> SetAudioInputFormat(This,audioInputFormat) ) 
-
-#define IDeckLinkConfiguration_v7_6_GetAudioInputFormat(This,audioInputFormat)	\
-    ( (This)->lpVtbl -> GetAudioInputFormat(This,audioInputFormat) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoOutputCallback_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("E763A626-4A3C-49D1-BF13-E7AD3692AE52")
-    IDeckLinkVideoOutputCallback_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoOutputCallback_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoOutputCallback_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoOutputCallback_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoOutputCallback_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 
-            IDeckLinkVideoOutputCallback_v7_6 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( 
-            IDeckLinkVideoOutputCallback_v7_6 * This);
-        
-        END_INTERFACE
-    } IDeckLinkVideoOutputCallback_v7_6Vtbl;
-
-    interface IDeckLinkVideoOutputCallback_v7_6
-    {
-        CONST_VTBL struct IDeckLinkVideoOutputCallback_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoOutputCallback_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoOutputCallback_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoOutputCallback_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoOutputCallback_v7_6_ScheduledFrameCompleted(This,completedFrame,result)	\
-    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 
-
-#define IDeckLinkVideoOutputCallback_v7_6_ScheduledPlaybackHasStopped(This)	\
-    ( (This)->lpVtbl -> ScheduledPlaybackHasStopped(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__
-#define __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInputCallback_v7_6 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInputCallback_v7_6;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("31D28EE7-88B6-4CB1-897A-CDBF79A26414")
-    IDeckLinkInputCallback_v7_6 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 
-            /* [in] */ IDeckLinkVideoInputFrame_v7_6 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInputCallback_v7_6Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInputCallback_v7_6 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInputCallback_v7_6 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInputCallback_v7_6 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 
-            IDeckLinkInputCallback_v7_6 * This,
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 
-            IDeckLinkInputCallback_v7_6 * This,
-            /* [in] */ IDeckLinkVideoInputFrame_v7_6 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);
-        
-        END_INTERFACE
-    } IDeckLinkInputCallback_v7_6Vtbl;
-
-    interface IDeckLinkInputCallback_v7_6
-    {
-        CONST_VTBL struct IDeckLinkInputCallback_v7_6Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInputCallback_v7_6_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInputCallback_v7_6_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInputCallback_v7_6_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInputCallback_v7_6_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\
-    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 
-
-#define IDeckLinkInputCallback_v7_6_VideoInputFrameArrived(This,videoFrame,audioPacket)	\
-    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__ */
-
-
-EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper_v7_6;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("D398CEE7-4434-4CA3-9BA6-5AE34556B905")
-CDeckLinkGLScreenPreviewHelper_v7_6;
-#endif
-
-EXTERN_C const CLSID CLSID_CDeckLinkVideoConversion_v7_6;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("FFA84F77-73BE-4FB7-B03E-B5E44B9F759B")
-CDeckLinkVideoConversion_v7_6;
-#endif
-
-#ifndef __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__
-#define __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInputCallback_v7_3 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInputCallback_v7_3;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("FD6F311D-4D00-444B-9ED4-1F25B5730AD0")
-    IDeckLinkInputCallback_v7_3 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 
-            /* [in] */ IDeckLinkVideoInputFrame_v7_3 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInputCallback_v7_3Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInputCallback_v7_3 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInputCallback_v7_3 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInputCallback_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 
-            IDeckLinkInputCallback_v7_3 * This,
-            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,
-            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,
-            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 
-            IDeckLinkInputCallback_v7_3 * This,
-            /* [in] */ IDeckLinkVideoInputFrame_v7_3 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);
-        
-        END_INTERFACE
-    } IDeckLinkInputCallback_v7_3Vtbl;
-
-    interface IDeckLinkInputCallback_v7_3
-    {
-        CONST_VTBL struct IDeckLinkInputCallback_v7_3Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInputCallback_v7_3_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInputCallback_v7_3_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInputCallback_v7_3_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInputCallback_v7_3_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\
-    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 
-
-#define IDeckLinkInputCallback_v7_3_VideoInputFrameArrived(This,videoFrame,audioPacket)	\
-    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__
-#define __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__
-
-/* interface IDeckLinkOutput_v7_3 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkOutput_v7_3;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("271C65E3-C323-4344-A30F-D908BCB20AA3")
-    IDeckLinkOutput_v7_3 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 
-            BMDDisplayMode displayMode,
-            BMDVideoOutputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 
-            BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 
-            /* [in] */ IDeckLinkVideoOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 
-            /* [out] */ unsigned long *bufferedFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount,
-            BMDAudioOutputStreamType streamType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 
-            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 
-            BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 
-            /* [out] */ BOOL *active) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *elapsedTimeSinceSchedulerBegan) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkOutput_v7_3Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDDisplayMode displayMode,
-            BMDVideoOutputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 
-            IDeckLinkOutput_v7_3 * This,
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkVideoOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [out] */ unsigned long *bufferedFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount,
-            BMDAudioOutputStreamType streamType);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [out] */ unsigned long *bufferedSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 
-            IDeckLinkOutput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDTimeValue stopPlaybackAtTime,
-            /* [out] */ BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 
-            IDeckLinkOutput_v7_3 * This,
-            /* [out] */ BOOL *active);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkOutput_v7_3 * This,
-            BMDTimeScale desiredTimeScale,
-            /* [out] */ BMDTimeValue *elapsedTimeSinceSchedulerBegan);
-        
-        END_INTERFACE
-    } IDeckLinkOutput_v7_3Vtbl;
-
-    interface IDeckLinkOutput_v7_3
-    {
-        CONST_VTBL struct IDeckLinkOutput_v7_3Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkOutput_v7_3_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkOutput_v7_3_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkOutput_v7_3_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkOutput_v7_3_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkOutput_v7_3_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkOutput_v7_3_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkOutput_v7_3_EnableVideoOutput(This,displayMode,flags)	\
-    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 
-
-#define IDeckLinkOutput_v7_3_DisableVideoOutput(This)	\
-    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 
-
-#define IDeckLinkOutput_v7_3_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\
-    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 
-
-#define IDeckLinkOutput_v7_3_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\
-    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 
-
-#define IDeckLinkOutput_v7_3_CreateAncillaryData(This,pixelFormat,outBuffer)	\
-    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 
-
-#define IDeckLinkOutput_v7_3_DisplayVideoFrameSync(This,theFrame)	\
-    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 
-
-#define IDeckLinkOutput_v7_3_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\
-    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 
-
-#define IDeckLinkOutput_v7_3_SetScheduledFrameCompletionCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_3_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 
-
-#define IDeckLinkOutput_v7_3_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\
-    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 
-
-#define IDeckLinkOutput_v7_3_DisableAudioOutput(This)	\
-    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 
-
-#define IDeckLinkOutput_v7_3_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_3_BeginAudioPreroll(This)	\
-    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_3_EndAudioPreroll(This)	\
-    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_3_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_3_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 
-
-#define IDeckLinkOutput_v7_3_FlushBufferedAudioSamples(This)	\
-    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 
-
-#define IDeckLinkOutput_v7_3_SetAudioCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_3_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\
-    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 
-
-#define IDeckLinkOutput_v7_3_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\
-    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 
-
-#define IDeckLinkOutput_v7_3_IsScheduledPlaybackRunning(This,active)	\
-    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 
-
-#define IDeckLinkOutput_v7_3_GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_3_INTERFACE_DEFINED__
-#define __IDeckLinkInput_v7_3_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInput_v7_3 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInput_v7_3;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("4973F012-9925-458C-871C-18774CDBBECB")
-    IDeckLinkInput_v7_3 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 
-            /* [out] */ unsigned long *availableFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 
-            /* [out] */ unsigned long *availableSampleFrameCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkInputCallback_v7_3 *theCallback) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInput_v7_3Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkInput_v7_3 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 
-            IDeckLinkInput_v7_3 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [out] */ unsigned long *availableFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 
-            IDeckLinkInput_v7_3 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [out] */ unsigned long *availableSampleFrameCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 
-            IDeckLinkInput_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkInput_v7_3 * This,
-            /* [in] */ IDeckLinkInputCallback_v7_3 *theCallback);
-        
-        END_INTERFACE
-    } IDeckLinkInput_v7_3Vtbl;
-
-    interface IDeckLinkInput_v7_3
-    {
-        CONST_VTBL struct IDeckLinkInput_v7_3Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInput_v7_3_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInput_v7_3_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInput_v7_3_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInput_v7_3_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkInput_v7_3_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkInput_v7_3_SetScreenPreviewCallback(This,previewCallback)	\
-    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 
-
-#define IDeckLinkInput_v7_3_EnableVideoInput(This,displayMode,pixelFormat,flags)	\
-    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 
-
-#define IDeckLinkInput_v7_3_DisableVideoInput(This)	\
-    ( (This)->lpVtbl -> DisableVideoInput(This) ) 
-
-#define IDeckLinkInput_v7_3_GetAvailableVideoFrameCount(This,availableFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 
-
-#define IDeckLinkInput_v7_3_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\
-    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 
-
-#define IDeckLinkInput_v7_3_DisableAudioInput(This)	\
-    ( (This)->lpVtbl -> DisableAudioInput(This) ) 
-
-#define IDeckLinkInput_v7_3_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\
-    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 
-
-#define IDeckLinkInput_v7_3_StartStreams(This)	\
-    ( (This)->lpVtbl -> StartStreams(This) ) 
-
-#define IDeckLinkInput_v7_3_StopStreams(This)	\
-    ( (This)->lpVtbl -> StopStreams(This) ) 
-
-#define IDeckLinkInput_v7_3_PauseStreams(This)	\
-    ( (This)->lpVtbl -> PauseStreams(This) ) 
-
-#define IDeckLinkInput_v7_3_FlushStreams(This)	\
-    ( (This)->lpVtbl -> FlushStreams(This) ) 
-
-#define IDeckLinkInput_v7_3_SetCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInput_v7_3_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoInputFrame_v7_3 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_3;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("CF317790-2894-11DE-8C30-0800200C9A66")
-    IDeckLinkVideoInputFrame_v7_3 : public IDeckLinkVideoFrame_v7_6
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoInputFrame_v7_3Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoInputFrame_v7_3 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoInputFrame_v7_3 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoInputFrame_v7_3 * This,
-            /* [out] */ void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 
-            IDeckLinkVideoInputFrame_v7_3 * This,
-            BMDTimecodeFormat format,
-            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 
-            IDeckLinkVideoInputFrame_v7_3 * This,
-            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 
-            IDeckLinkVideoInputFrame_v7_3 * This,
-            /* [out] */ BMDTimeValue *frameTime,
-            /* [out] */ BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale);
-        
-        END_INTERFACE
-    } IDeckLinkVideoInputFrame_v7_3Vtbl;
-
-    interface IDeckLinkVideoInputFrame_v7_3
-    {
-        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_3Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoInputFrame_v7_3_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_3_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetTimecode(This,format,timecode)	\
-    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 
-
-#define IDeckLinkVideoInputFrame_v7_3_GetAncillaryData(This,ancillary)	\
-    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_3_GetStreamTime(This,frameTime,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayModeIterator_v7_1 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("B28131B6-59AC-4857-B5AC-CD75D5883E2F")
-    IDeckLinkDisplayModeIterator_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Next( 
-            /* [out] */ IDeckLinkDisplayMode_v7_1 **deckLinkDisplayMode) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayModeIterator_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayModeIterator_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayModeIterator_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayModeIterator_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Next )( 
-            IDeckLinkDisplayModeIterator_v7_1 * This,
-            /* [out] */ IDeckLinkDisplayMode_v7_1 **deckLinkDisplayMode);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayModeIterator_v7_1Vtbl;
-
-    interface IDeckLinkDisplayModeIterator_v7_1
-    {
-        CONST_VTBL struct IDeckLinkDisplayModeIterator_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayModeIterator_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayModeIterator_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayModeIterator_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayModeIterator_v7_1_Next(This,deckLinkDisplayMode)	\
-    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkDisplayMode_v7_1 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("AF0CD6D5-8376-435E-8433-54F9DD530AC3")
-    IDeckLinkDisplayMode_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetName( 
-            /* [out] */ BSTR *name) = 0;
-        
-        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkDisplayMode_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkDisplayMode_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkDisplayMode_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkDisplayMode_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetName )( 
-            IDeckLinkDisplayMode_v7_1 * This,
-            /* [out] */ BSTR *name);
-        
-        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 
-            IDeckLinkDisplayMode_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkDisplayMode_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkDisplayMode_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 
-            IDeckLinkDisplayMode_v7_1 * This,
-            /* [out] */ BMDTimeValue *frameDuration,
-            /* [out] */ BMDTimeScale *timeScale);
-        
-        END_INTERFACE
-    } IDeckLinkDisplayMode_v7_1Vtbl;
-
-    interface IDeckLinkDisplayMode_v7_1
-    {
-        CONST_VTBL struct IDeckLinkDisplayMode_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkDisplayMode_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkDisplayMode_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkDisplayMode_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkDisplayMode_v7_1_GetName(This,name)	\
-    ( (This)->lpVtbl -> GetName(This,name) ) 
-
-#define IDeckLinkDisplayMode_v7_1_GetDisplayMode(This)	\
-    ( (This)->lpVtbl -> GetDisplayMode(This) ) 
-
-#define IDeckLinkDisplayMode_v7_1_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkDisplayMode_v7_1_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkDisplayMode_v7_1_GetFrameRate(This,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoFrame_v7_1 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("333F3A10-8C2D-43CF-B79D-46560FEEA1CE")
-    IDeckLinkVideoFrame_v7_1 : public IUnknown
-    {
-    public:
-        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;
-        
-        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;
-        
-        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;
-        
-        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBytes( 
-            void **buffer) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoFrame_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoFrame_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoFrame_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoFrame_v7_1 * This,
-            void **buffer);
-        
-        END_INTERFACE
-    } IDeckLinkVideoFrame_v7_1Vtbl;
-
-    interface IDeckLinkVideoFrame_v7_1
-    {
-        CONST_VTBL struct IDeckLinkVideoFrame_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoFrame_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoFrame_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoFrame_v7_1_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoFrame_v7_1_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoInputFrame_v7_1 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C8B41D95-8848-40EE-9B37-6E3417FB114B")
-    IDeckLinkVideoInputFrame_v7_1 : public IDeckLinkVideoFrame_v7_1
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetFrameTime( 
-            BMDTimeValue *frameTime,
-            BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoInputFrame_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoInputFrame_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetWidth )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetHeight )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetRowBytes )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 
-            IDeckLinkVideoInputFrame_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkVideoInputFrame_v7_1 * This,
-            void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrameTime )( 
-            IDeckLinkVideoInputFrame_v7_1 * This,
-            BMDTimeValue *frameTime,
-            BMDTimeValue *frameDuration,
-            BMDTimeScale timeScale);
-        
-        END_INTERFACE
-    } IDeckLinkVideoInputFrame_v7_1Vtbl;
-
-    interface IDeckLinkVideoInputFrame_v7_1
-    {
-        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoInputFrame_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_1_GetWidth(This)	\
-    ( (This)->lpVtbl -> GetWidth(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_GetHeight(This)	\
-    ( (This)->lpVtbl -> GetHeight(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_GetRowBytes(This)	\
-    ( (This)->lpVtbl -> GetRowBytes(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_GetPixelFormat(This)	\
-    ( (This)->lpVtbl -> GetPixelFormat(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_GetFlags(This)	\
-    ( (This)->lpVtbl -> GetFlags(This) ) 
-
-#define IDeckLinkVideoInputFrame_v7_1_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-
-#define IDeckLinkVideoInputFrame_v7_1_GetFrameTime(This,frameTime,frameDuration,timeScale)	\
-    ( (This)->lpVtbl -> GetFrameTime(This,frameTime,frameDuration,timeScale) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkAudioInputPacket_v7_1 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkAudioInputPacket_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C86DE4F6-A29F-42E3-AB3A-1363E29F0788")
-    IDeckLinkAudioInputPacket_v7_1 : public IUnknown
-    {
-    public:
-        virtual long STDMETHODCALLTYPE GetSampleCount( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBytes( 
-            void **buffer) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAudioPacketTime( 
-            BMDTimeValue *packetTime,
-            BMDTimeScale timeScale) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkAudioInputPacket_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkAudioInputPacket_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkAudioInputPacket_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkAudioInputPacket_v7_1 * This);
-        
-        long ( STDMETHODCALLTYPE *GetSampleCount )( 
-            IDeckLinkAudioInputPacket_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 
-            IDeckLinkAudioInputPacket_v7_1 * This,
-            void **buffer);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAudioPacketTime )( 
-            IDeckLinkAudioInputPacket_v7_1 * This,
-            BMDTimeValue *packetTime,
-            BMDTimeScale timeScale);
-        
-        END_INTERFACE
-    } IDeckLinkAudioInputPacket_v7_1Vtbl;
-
-    interface IDeckLinkAudioInputPacket_v7_1
-    {
-        CONST_VTBL struct IDeckLinkAudioInputPacket_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkAudioInputPacket_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkAudioInputPacket_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkAudioInputPacket_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkAudioInputPacket_v7_1_GetSampleCount(This)	\
-    ( (This)->lpVtbl -> GetSampleCount(This) ) 
-
-#define IDeckLinkAudioInputPacket_v7_1_GetBytes(This,buffer)	\
-    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 
-
-#define IDeckLinkAudioInputPacket_v7_1_GetAudioPacketTime(This,packetTime,timeScale)	\
-    ( (This)->lpVtbl -> GetAudioPacketTime(This,packetTime,timeScale) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkVideoOutputCallback_v7_1 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("EBD01AFA-E4B0-49C6-A01D-EDB9D1B55FD9")
-    IDeckLinkVideoOutputCallback_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 
-            /* [in] */ IDeckLinkVideoFrame_v7_1 *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkVideoOutputCallback_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkVideoOutputCallback_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkVideoOutputCallback_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkVideoOutputCallback_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 
-            IDeckLinkVideoOutputCallback_v7_1 * This,
-            /* [in] */ IDeckLinkVideoFrame_v7_1 *completedFrame,
-            /* [in] */ BMDOutputFrameCompletionResult result);
-        
-        END_INTERFACE
-    } IDeckLinkVideoOutputCallback_v7_1Vtbl;
-
-    interface IDeckLinkVideoOutputCallback_v7_1
-    {
-        CONST_VTBL struct IDeckLinkVideoOutputCallback_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkVideoOutputCallback_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkVideoOutputCallback_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkVideoOutputCallback_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkVideoOutputCallback_v7_1_ScheduledFrameCompleted(This,completedFrame,result)	\
-    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInputCallback_v7_1 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInputCallback_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("7F94F328-5ED4-4E9F-9729-76A86BDC99CC")
-    IDeckLinkInputCallback_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 
-            /* [in] */ IDeckLinkVideoInputFrame_v7_1 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket_v7_1 *audioPacket) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInputCallback_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInputCallback_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInputCallback_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInputCallback_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 
-            IDeckLinkInputCallback_v7_1 * This,
-            /* [in] */ IDeckLinkVideoInputFrame_v7_1 *videoFrame,
-            /* [in] */ IDeckLinkAudioInputPacket_v7_1 *audioPacket);
-        
-        END_INTERFACE
-    } IDeckLinkInputCallback_v7_1Vtbl;
-
-    interface IDeckLinkInputCallback_v7_1
-    {
-        CONST_VTBL struct IDeckLinkInputCallback_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInputCallback_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInputCallback_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInputCallback_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInputCallback_v7_1_VideoInputFrameArrived(This,videoFrame,audioPacket)	\
-    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkOutput_v7_1 */
-/* [helpstring][local][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkOutput_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("AE5B3E9B-4E1E-4535-B6E8-480FF52F6CE5")
-    IDeckLinkOutput_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 
-            BMDDisplayMode displayMode) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            IDeckLinkVideoFrame_v7_1 **outFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrameFromBuffer( 
-            void *buffer,
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            IDeckLinkVideoFrame_v7_1 **outFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 
-            IDeckLinkVideoFrame_v7_1 *theFrame) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 
-            IDeckLinkVideoFrame_v7_1 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 
-            /* [in] */ IDeckLinkVideoOutputCallback_v7_1 *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 
-            void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 
-            void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 
-            /* [out] */ unsigned long *bufferedSampleCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 
-            BMDTimeValue stopPlaybackAtTime,
-            BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 
-            BMDTimeScale desiredTimeScale,
-            BMDTimeValue *elapsedTimeSinceSchedulerBegan) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkOutput_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDDisplayMode displayMode);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 
-            IDeckLinkOutput_v7_1 * This,
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            IDeckLinkVideoFrame_v7_1 **outFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrameFromBuffer )( 
-            IDeckLinkOutput_v7_1 * This,
-            void *buffer,
-            long width,
-            long height,
-            long rowBytes,
-            BMDPixelFormat pixelFormat,
-            BMDFrameFlags flags,
-            IDeckLinkVideoFrame_v7_1 **outFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 
-            IDeckLinkOutput_v7_1 * This,
-            IDeckLinkVideoFrame_v7_1 *theFrame);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 
-            IDeckLinkOutput_v7_1 * This,
-            IDeckLinkVideoFrame_v7_1 *theFrame,
-            BMDTimeValue displayTime,
-            BMDTimeValue displayDuration,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [in] */ IDeckLinkVideoOutputCallback_v7_1 *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 
-            IDeckLinkOutput_v7_1 * This,
-            void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 
-            IDeckLinkOutput_v7_1 * This,
-            void *buffer,
-            unsigned long sampleFrameCount,
-            BMDTimeValue streamTime,
-            BMDTimeScale timeScale,
-            /* [out] */ unsigned long *sampleFramesWritten);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [out] */ unsigned long *bufferedSampleCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 
-            IDeckLinkOutput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 
-            IDeckLinkOutput_v7_1 * This,
-            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDTimeValue playbackStartTime,
-            BMDTimeScale timeScale,
-            double playbackSpeed);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDTimeValue stopPlaybackAtTime,
-            BMDTimeValue *actualStopTime,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 
-            IDeckLinkOutput_v7_1 * This,
-            BMDTimeScale desiredTimeScale,
-            BMDTimeValue *elapsedTimeSinceSchedulerBegan);
-        
-        END_INTERFACE
-    } IDeckLinkOutput_v7_1Vtbl;
-
-    interface IDeckLinkOutput_v7_1
-    {
-        CONST_VTBL struct IDeckLinkOutput_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkOutput_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkOutput_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkOutput_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkOutput_v7_1_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkOutput_v7_1_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkOutput_v7_1_EnableVideoOutput(This,displayMode)	\
-    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode) ) 
-
-#define IDeckLinkOutput_v7_1_DisableVideoOutput(This)	\
-    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 
-
-#define IDeckLinkOutput_v7_1_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\
-    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 
-
-#define IDeckLinkOutput_v7_1_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\
-    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 
-
-#define IDeckLinkOutput_v7_1_CreateVideoFrameFromBuffer(This,buffer,width,height,rowBytes,pixelFormat,flags,outFrame)	\
-    ( (This)->lpVtbl -> CreateVideoFrameFromBuffer(This,buffer,width,height,rowBytes,pixelFormat,flags,outFrame) ) 
-
-#define IDeckLinkOutput_v7_1_DisplayVideoFrameSync(This,theFrame)	\
-    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 
-
-#define IDeckLinkOutput_v7_1_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\
-    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 
-
-#define IDeckLinkOutput_v7_1_SetScheduledFrameCompletionCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_1_EnableAudioOutput(This,sampleRate,sampleType,channelCount)	\
-    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount) ) 
-
-#define IDeckLinkOutput_v7_1_DisableAudioOutput(This)	\
-    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 
-
-#define IDeckLinkOutput_v7_1_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_1_BeginAudioPreroll(This)	\
-    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_1_EndAudioPreroll(This)	\
-    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 
-
-#define IDeckLinkOutput_v7_1_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\
-    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 
-
-#define IDeckLinkOutput_v7_1_GetBufferedAudioSampleFrameCount(This,bufferedSampleCount)	\
-    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleCount) ) 
-
-#define IDeckLinkOutput_v7_1_FlushBufferedAudioSamples(This)	\
-    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 
-
-#define IDeckLinkOutput_v7_1_SetAudioCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 
-
-#define IDeckLinkOutput_v7_1_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\
-    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 
-
-#define IDeckLinkOutput_v7_1_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\
-    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 
-
-#define IDeckLinkOutput_v7_1_GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan)	\
-    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeckLinkInput_v7_1_INTERFACE_DEFINED__
-#define __IDeckLinkInput_v7_1_INTERFACE_DEFINED__
-
-/* interface IDeckLinkInput_v7_1 */
-/* [helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IDeckLinkInput_v7_1;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("2B54EDEF-5B32-429F-BA11-BB990596EACD")
-    IDeckLinkInput_v7_1 : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ReadAudioSamples( 
-            void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesRead,
-            /* [out] */ BMDTimeValue *audioPacketTime,
-            BMDTimeScale timeScale) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 
-            /* [out] */ unsigned long *bufferedSampleCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetCallback( 
-            /* [in] */ IDeckLinkInputCallback_v7_1 *theCallback) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeckLinkInput_v7_1Vtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeckLinkInput_v7_1 * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 
-            IDeckLinkInput_v7_1 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            /* [out] */ BMDDisplayModeSupport *result);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 
-            IDeckLinkInput_v7_1 * This,
-            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 
-            IDeckLinkInput_v7_1 * This,
-            BMDDisplayMode displayMode,
-            BMDPixelFormat pixelFormat,
-            BMDVideoInputFlags flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 
-            IDeckLinkInput_v7_1 * This,
-            BMDAudioSampleRate sampleRate,
-            BMDAudioSampleType sampleType,
-            unsigned long channelCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *ReadAudioSamples )( 
-            IDeckLinkInput_v7_1 * This,
-            void *buffer,
-            unsigned long sampleFrameCount,
-            /* [out] */ unsigned long *sampleFramesRead,
-            /* [out] */ BMDTimeValue *audioPacketTime,
-            BMDTimeScale timeScale);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 
-            IDeckLinkInput_v7_1 * This,
-            /* [out] */ unsigned long *bufferedSampleCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 
-            IDeckLinkInput_v7_1 * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 
-            IDeckLinkInput_v7_1 * This,
-            /* [in] */ IDeckLinkInputCallback_v7_1 *theCallback);
-        
-        END_INTERFACE
-    } IDeckLinkInput_v7_1Vtbl;
-
-    interface IDeckLinkInput_v7_1
-    {
-        CONST_VTBL struct IDeckLinkInput_v7_1Vtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeckLinkInput_v7_1_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeckLinkInput_v7_1_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeckLinkInput_v7_1_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeckLinkInput_v7_1_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\
-    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 
-
-#define IDeckLinkInput_v7_1_GetDisplayModeIterator(This,iterator)	\
-    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 
-
-#define IDeckLinkInput_v7_1_EnableVideoInput(This,displayMode,pixelFormat,flags)	\
-    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 
-
-#define IDeckLinkInput_v7_1_DisableVideoInput(This)	\
-    ( (This)->lpVtbl -> DisableVideoInput(This) ) 
-
-#define IDeckLinkInput_v7_1_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\
-    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 
-
-#define IDeckLinkInput_v7_1_DisableAudioInput(This)	\
-    ( (This)->lpVtbl -> DisableAudioInput(This) ) 
-
-#define IDeckLinkInput_v7_1_ReadAudioSamples(This,buffer,sampleFrameCount,sampleFramesRead,audioPacketTime,timeScale)	\
-    ( (This)->lpVtbl -> ReadAudioSamples(This,buffer,sampleFrameCount,sampleFramesRead,audioPacketTime,timeScale) ) 
-
-#define IDeckLinkInput_v7_1_GetBufferedAudioSampleFrameCount(This,bufferedSampleCount)	\
-    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleCount) ) 
-
-#define IDeckLinkInput_v7_1_StartStreams(This)	\
-    ( (This)->lpVtbl -> StartStreams(This) ) 
-
-#define IDeckLinkInput_v7_1_StopStreams(This)	\
-    ( (This)->lpVtbl -> StopStreams(This) ) 
-
-#define IDeckLinkInput_v7_1_PauseStreams(This)	\
-    ( (This)->lpVtbl -> PauseStreams(This) ) 
-
-#define IDeckLinkInput_v7_1_SetCallback(This,theCallback)	\
-    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeckLinkInput_v7_1_INTERFACE_DEFINED__ */
-
-#endif /* __DeckLinkAPI_LIBRARY_DEFINED__ */
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
+

+

+/* this ALWAYS GENERATED file contains the definitions for the interfaces */

+

+

+ /* File created by MIDL compiler version 8.00.0595 */

+/* at Wed Dec 03 06:04:46 2014

+ */

+/* Compiler settings for DeckLinkAPI.idl:

+    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0595 

+    protocol : dce , ms_ext, c_ext, robust

+    error checks: allocation ref bounds_check enum stub_data 

+    VC __declspec() decoration level: 

+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)

+         DECLSPEC_UUID(), MIDL_INTERFACE()

+*/

+/* @@MIDL_FILE_HEADING(  ) */

+

+#pragma warning( disable: 4049 )  /* more than 64k source lines */

+

+

+/* verify that the <rpcndr.h> version is high enough to compile this file*/

+#ifndef __REQUIRED_RPCNDR_H_VERSION__

+#define __REQUIRED_RPCNDR_H_VERSION__ 475

+#endif

+

+#include "rpc.h"

+#include "rpcndr.h"

+

+#ifndef __RPCNDR_H_VERSION__

+#error this stub requires an updated version of <rpcndr.h>

+#endif // __RPCNDR_H_VERSION__

+

+

+#ifndef __DecklinkAPI_h__

+#define __DecklinkAPI_h__

+

+#if defined(_MSC_VER) && (_MSC_VER >= 1020)

+#pragma once

+#endif

+

+/* Forward Declarations */ 

+

+#ifndef __IDeckLinkTimecode_FWD_DEFINED__

+#define __IDeckLinkTimecode_FWD_DEFINED__

+typedef interface IDeckLinkTimecode IDeckLinkTimecode;

+

+#endif 	/* __IDeckLinkTimecode_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_FWD_DEFINED__

+#define __IDeckLinkDisplayModeIterator_FWD_DEFINED__

+typedef interface IDeckLinkDisplayModeIterator IDeckLinkDisplayModeIterator;

+

+#endif 	/* __IDeckLinkDisplayModeIterator_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_FWD_DEFINED__

+#define __IDeckLinkDisplayMode_FWD_DEFINED__

+typedef interface IDeckLinkDisplayMode IDeckLinkDisplayMode;

+

+#endif 	/* __IDeckLinkDisplayMode_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLink_FWD_DEFINED__

+#define __IDeckLink_FWD_DEFINED__

+typedef interface IDeckLink IDeckLink;

+

+#endif 	/* __IDeckLink_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkConfiguration_FWD_DEFINED__

+#define __IDeckLinkConfiguration_FWD_DEFINED__

+typedef interface IDeckLinkConfiguration IDeckLinkConfiguration;

+

+#endif 	/* __IDeckLinkConfiguration_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__

+#define __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__

+typedef interface IDeckLinkDeckControlStatusCallback IDeckLinkDeckControlStatusCallback;

+

+#endif 	/* __IDeckLinkDeckControlStatusCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControl_FWD_DEFINED__

+#define __IDeckLinkDeckControl_FWD_DEFINED__

+typedef interface IDeckLinkDeckControl IDeckLinkDeckControl;

+

+#endif 	/* __IDeckLinkDeckControl_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDeviceNotificationCallback_FWD_DEFINED__

+#define __IBMDStreamingDeviceNotificationCallback_FWD_DEFINED__

+typedef interface IBMDStreamingDeviceNotificationCallback IBMDStreamingDeviceNotificationCallback;

+

+#endif 	/* __IBMDStreamingDeviceNotificationCallback_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264InputCallback_FWD_DEFINED__

+#define __IBMDStreamingH264InputCallback_FWD_DEFINED__

+typedef interface IBMDStreamingH264InputCallback IBMDStreamingH264InputCallback;

+

+#endif 	/* __IBMDStreamingH264InputCallback_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDiscovery_FWD_DEFINED__

+#define __IBMDStreamingDiscovery_FWD_DEFINED__

+typedef interface IBMDStreamingDiscovery IBMDStreamingDiscovery;

+

+#endif 	/* __IBMDStreamingDiscovery_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingVideoEncodingMode_FWD_DEFINED__

+#define __IBMDStreamingVideoEncodingMode_FWD_DEFINED__

+typedef interface IBMDStreamingVideoEncodingMode IBMDStreamingVideoEncodingMode;

+

+#endif 	/* __IBMDStreamingVideoEncodingMode_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingMutableVideoEncodingMode_FWD_DEFINED__

+#define __IBMDStreamingMutableVideoEncodingMode_FWD_DEFINED__

+typedef interface IBMDStreamingMutableVideoEncodingMode IBMDStreamingMutableVideoEncodingMode;

+

+#endif 	/* __IBMDStreamingMutableVideoEncodingMode_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingVideoEncodingModePresetIterator_FWD_DEFINED__

+#define __IBMDStreamingVideoEncodingModePresetIterator_FWD_DEFINED__

+typedef interface IBMDStreamingVideoEncodingModePresetIterator IBMDStreamingVideoEncodingModePresetIterator;

+

+#endif 	/* __IBMDStreamingVideoEncodingModePresetIterator_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDeviceInput_FWD_DEFINED__

+#define __IBMDStreamingDeviceInput_FWD_DEFINED__

+typedef interface IBMDStreamingDeviceInput IBMDStreamingDeviceInput;

+

+#endif 	/* __IBMDStreamingDeviceInput_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264NALPacket_FWD_DEFINED__

+#define __IBMDStreamingH264NALPacket_FWD_DEFINED__

+typedef interface IBMDStreamingH264NALPacket IBMDStreamingH264NALPacket;

+

+#endif 	/* __IBMDStreamingH264NALPacket_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingAudioPacket_FWD_DEFINED__

+#define __IBMDStreamingAudioPacket_FWD_DEFINED__

+typedef interface IBMDStreamingAudioPacket IBMDStreamingAudioPacket;

+

+#endif 	/* __IBMDStreamingAudioPacket_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingMPEG2TSPacket_FWD_DEFINED__

+#define __IBMDStreamingMPEG2TSPacket_FWD_DEFINED__

+typedef interface IBMDStreamingMPEG2TSPacket IBMDStreamingMPEG2TSPacket;

+

+#endif 	/* __IBMDStreamingMPEG2TSPacket_FWD_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264NALParser_FWD_DEFINED__

+#define __IBMDStreamingH264NALParser_FWD_DEFINED__

+typedef interface IBMDStreamingH264NALParser IBMDStreamingH264NALParser;

+

+#endif 	/* __IBMDStreamingH264NALParser_FWD_DEFINED__ */

+

+

+#ifndef __CBMDStreamingDiscovery_FWD_DEFINED__

+#define __CBMDStreamingDiscovery_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CBMDStreamingDiscovery CBMDStreamingDiscovery;

+#else

+typedef struct CBMDStreamingDiscovery CBMDStreamingDiscovery;

+#endif /* __cplusplus */

+

+#endif 	/* __CBMDStreamingDiscovery_FWD_DEFINED__ */

+

+

+#ifndef __CBMDStreamingH264NALParser_FWD_DEFINED__

+#define __CBMDStreamingH264NALParser_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CBMDStreamingH264NALParser CBMDStreamingH264NALParser;

+#else

+typedef struct CBMDStreamingH264NALParser CBMDStreamingH264NALParser;

+#endif /* __cplusplus */

+

+#endif 	/* __CBMDStreamingH264NALParser_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoOutputCallback_FWD_DEFINED__

+#define __IDeckLinkVideoOutputCallback_FWD_DEFINED__

+typedef interface IDeckLinkVideoOutputCallback IDeckLinkVideoOutputCallback;

+

+#endif 	/* __IDeckLinkVideoOutputCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_FWD_DEFINED__

+#define __IDeckLinkInputCallback_FWD_DEFINED__

+typedef interface IDeckLinkInputCallback IDeckLinkInputCallback;

+

+#endif 	/* __IDeckLinkInputCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkMemoryAllocator_FWD_DEFINED__

+#define __IDeckLinkMemoryAllocator_FWD_DEFINED__

+typedef interface IDeckLinkMemoryAllocator IDeckLinkMemoryAllocator;

+

+#endif 	/* __IDeckLinkMemoryAllocator_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioOutputCallback_FWD_DEFINED__

+#define __IDeckLinkAudioOutputCallback_FWD_DEFINED__

+typedef interface IDeckLinkAudioOutputCallback IDeckLinkAudioOutputCallback;

+

+#endif 	/* __IDeckLinkAudioOutputCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkIterator_FWD_DEFINED__

+#define __IDeckLinkIterator_FWD_DEFINED__

+typedef interface IDeckLinkIterator IDeckLinkIterator;

+

+#endif 	/* __IDeckLinkIterator_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkAPIInformation_FWD_DEFINED__

+#define __IDeckLinkAPIInformation_FWD_DEFINED__

+typedef interface IDeckLinkAPIInformation IDeckLinkAPIInformation;

+

+#endif 	/* __IDeckLinkAPIInformation_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_FWD_DEFINED__

+#define __IDeckLinkOutput_FWD_DEFINED__

+typedef interface IDeckLinkOutput IDeckLinkOutput;

+

+#endif 	/* __IDeckLinkOutput_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_FWD_DEFINED__

+#define __IDeckLinkInput_FWD_DEFINED__

+typedef interface IDeckLinkInput IDeckLinkInput;

+

+#endif 	/* __IDeckLinkInput_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_FWD_DEFINED__

+#define __IDeckLinkVideoFrame_FWD_DEFINED__

+typedef interface IDeckLinkVideoFrame IDeckLinkVideoFrame;

+

+#endif 	/* __IDeckLinkVideoFrame_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkMutableVideoFrame_FWD_DEFINED__

+#define __IDeckLinkMutableVideoFrame_FWD_DEFINED__

+typedef interface IDeckLinkMutableVideoFrame IDeckLinkMutableVideoFrame;

+

+#endif 	/* __IDeckLinkMutableVideoFrame_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__

+#define __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__

+typedef interface IDeckLinkVideoFrame3DExtensions IDeckLinkVideoFrame3DExtensions;

+

+#endif 	/* __IDeckLinkVideoFrame3DExtensions_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_FWD_DEFINED__

+#define __IDeckLinkVideoInputFrame_FWD_DEFINED__

+typedef interface IDeckLinkVideoInputFrame IDeckLinkVideoInputFrame;

+

+#endif 	/* __IDeckLinkVideoInputFrame_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrameAncillary_FWD_DEFINED__

+#define __IDeckLinkVideoFrameAncillary_FWD_DEFINED__

+typedef interface IDeckLinkVideoFrameAncillary IDeckLinkVideoFrameAncillary;

+

+#endif 	/* __IDeckLinkVideoFrameAncillary_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioInputPacket_FWD_DEFINED__

+#define __IDeckLinkAudioInputPacket_FWD_DEFINED__

+typedef interface IDeckLinkAudioInputPacket IDeckLinkAudioInputPacket;

+

+#endif 	/* __IDeckLinkAudioInputPacket_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkScreenPreviewCallback_FWD_DEFINED__

+#define __IDeckLinkScreenPreviewCallback_FWD_DEFINED__

+typedef interface IDeckLinkScreenPreviewCallback IDeckLinkScreenPreviewCallback;

+

+#endif 	/* __IDeckLinkScreenPreviewCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__

+#define __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__

+typedef interface IDeckLinkGLScreenPreviewHelper IDeckLinkGLScreenPreviewHelper;

+

+#endif 	/* __IDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__

+#define __IDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__

+typedef interface IDeckLinkDX9ScreenPreviewHelper IDeckLinkDX9ScreenPreviewHelper;

+

+#endif 	/* __IDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkNotificationCallback_FWD_DEFINED__

+#define __IDeckLinkNotificationCallback_FWD_DEFINED__

+typedef interface IDeckLinkNotificationCallback IDeckLinkNotificationCallback;

+

+#endif 	/* __IDeckLinkNotificationCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkNotification_FWD_DEFINED__

+#define __IDeckLinkNotification_FWD_DEFINED__

+typedef interface IDeckLinkNotification IDeckLinkNotification;

+

+#endif 	/* __IDeckLinkNotification_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkAttributes_FWD_DEFINED__

+#define __IDeckLinkAttributes_FWD_DEFINED__

+typedef interface IDeckLinkAttributes IDeckLinkAttributes;

+

+#endif 	/* __IDeckLinkAttributes_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkKeyer_FWD_DEFINED__

+#define __IDeckLinkKeyer_FWD_DEFINED__

+typedef interface IDeckLinkKeyer IDeckLinkKeyer;

+

+#endif 	/* __IDeckLinkKeyer_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoConversion_FWD_DEFINED__

+#define __IDeckLinkVideoConversion_FWD_DEFINED__

+typedef interface IDeckLinkVideoConversion IDeckLinkVideoConversion;

+

+#endif 	/* __IDeckLinkVideoConversion_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeviceNotificationCallback_FWD_DEFINED__

+#define __IDeckLinkDeviceNotificationCallback_FWD_DEFINED__

+typedef interface IDeckLinkDeviceNotificationCallback IDeckLinkDeviceNotificationCallback;

+

+#endif 	/* __IDeckLinkDeviceNotificationCallback_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDiscovery_FWD_DEFINED__

+#define __IDeckLinkDiscovery_FWD_DEFINED__

+typedef interface IDeckLinkDiscovery IDeckLinkDiscovery;

+

+#endif 	/* __IDeckLinkDiscovery_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkIterator_FWD_DEFINED__

+#define __CDeckLinkIterator_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkIterator CDeckLinkIterator;

+#else

+typedef struct CDeckLinkIterator CDeckLinkIterator;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkIterator_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkAPIInformation_FWD_DEFINED__

+#define __CDeckLinkAPIInformation_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkAPIInformation CDeckLinkAPIInformation;

+#else

+typedef struct CDeckLinkAPIInformation CDeckLinkAPIInformation;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkAPIInformation_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__

+#define __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkGLScreenPreviewHelper CDeckLinkGLScreenPreviewHelper;

+#else

+typedef struct CDeckLinkGLScreenPreviewHelper CDeckLinkGLScreenPreviewHelper;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkGLScreenPreviewHelper_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__

+#define __CDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkDX9ScreenPreviewHelper CDeckLinkDX9ScreenPreviewHelper;

+#else

+typedef struct CDeckLinkDX9ScreenPreviewHelper CDeckLinkDX9ScreenPreviewHelper;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkDX9ScreenPreviewHelper_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkVideoConversion_FWD_DEFINED__

+#define __CDeckLinkVideoConversion_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkVideoConversion CDeckLinkVideoConversion;

+#else

+typedef struct CDeckLinkVideoConversion CDeckLinkVideoConversion;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkVideoConversion_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkDiscovery_FWD_DEFINED__

+#define __CDeckLinkDiscovery_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkDiscovery CDeckLinkDiscovery;

+#else

+typedef struct CDeckLinkDiscovery CDeckLinkDiscovery;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkDiscovery_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkConfiguration_v10_2_FWD_DEFINED__

+#define __IDeckLinkConfiguration_v10_2_FWD_DEFINED__

+typedef interface IDeckLinkConfiguration_v10_2 IDeckLinkConfiguration_v10_2;

+

+#endif 	/* __IDeckLinkConfiguration_v10_2_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v9_9_FWD_DEFINED__

+#define __IDeckLinkOutput_v9_9_FWD_DEFINED__

+typedef interface IDeckLinkOutput_v9_9 IDeckLinkOutput_v9_9;

+

+#endif 	/* __IDeckLinkOutput_v9_9_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v9_2_FWD_DEFINED__

+#define __IDeckLinkInput_v9_2_FWD_DEFINED__

+typedef interface IDeckLinkInput_v9_2 IDeckLinkInput_v9_2;

+

+#endif 	/* __IDeckLinkInput_v9_2_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControlStatusCallback_v8_1_FWD_DEFINED__

+#define __IDeckLinkDeckControlStatusCallback_v8_1_FWD_DEFINED__

+typedef interface IDeckLinkDeckControlStatusCallback_v8_1 IDeckLinkDeckControlStatusCallback_v8_1;

+

+#endif 	/* __IDeckLinkDeckControlStatusCallback_v8_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControl_v8_1_FWD_DEFINED__

+#define __IDeckLinkDeckControl_v8_1_FWD_DEFINED__

+typedef interface IDeckLinkDeckControl_v8_1 IDeckLinkDeckControl_v8_1;

+

+#endif 	/* __IDeckLinkDeckControl_v8_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLink_v8_0_FWD_DEFINED__

+#define __IDeckLink_v8_0_FWD_DEFINED__

+typedef interface IDeckLink_v8_0 IDeckLink_v8_0;

+

+#endif 	/* __IDeckLink_v8_0_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkIterator_v8_0_FWD_DEFINED__

+#define __IDeckLinkIterator_v8_0_FWD_DEFINED__

+typedef interface IDeckLinkIterator_v8_0 IDeckLinkIterator_v8_0;

+

+#endif 	/* __IDeckLinkIterator_v8_0_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkIterator_v8_0_FWD_DEFINED__

+#define __CDeckLinkIterator_v8_0_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkIterator_v8_0 CDeckLinkIterator_v8_0;

+#else

+typedef struct CDeckLinkIterator_v8_0 CDeckLinkIterator_v8_0;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkIterator_v8_0_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControl_v7_9_FWD_DEFINED__

+#define __IDeckLinkDeckControl_v7_9_FWD_DEFINED__

+typedef interface IDeckLinkDeckControl_v7_9 IDeckLinkDeckControl_v7_9;

+

+#endif 	/* __IDeckLinkDeckControl_v7_9_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__

+#define __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkDisplayModeIterator_v7_6 IDeckLinkDisplayModeIterator_v7_6;

+

+#endif 	/* __IDeckLinkDisplayModeIterator_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__

+#define __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkDisplayMode_v7_6 IDeckLinkDisplayMode_v7_6;

+

+#endif 	/* __IDeckLinkDisplayMode_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_6_FWD_DEFINED__

+#define __IDeckLinkOutput_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkOutput_v7_6 IDeckLinkOutput_v7_6;

+

+#endif 	/* __IDeckLinkOutput_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_6_FWD_DEFINED__

+#define __IDeckLinkInput_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkInput_v7_6 IDeckLinkInput_v7_6;

+

+#endif 	/* __IDeckLinkInput_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkTimecode_v7_6_FWD_DEFINED__

+#define __IDeckLinkTimecode_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkTimecode_v7_6 IDeckLinkTimecode_v7_6;

+

+#endif 	/* __IDeckLinkTimecode_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__

+#define __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkVideoFrame_v7_6 IDeckLinkVideoFrame_v7_6;

+

+#endif 	/* __IDeckLinkVideoFrame_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__

+#define __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkMutableVideoFrame_v7_6 IDeckLinkMutableVideoFrame_v7_6;

+

+#endif 	/* __IDeckLinkMutableVideoFrame_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkVideoInputFrame_v7_6 IDeckLinkVideoInputFrame_v7_6;

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__

+#define __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkScreenPreviewCallback_v7_6 IDeckLinkScreenPreviewCallback_v7_6;

+

+#endif 	/* __IDeckLinkScreenPreviewCallback_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__

+#define __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkGLScreenPreviewHelper_v7_6 IDeckLinkGLScreenPreviewHelper_v7_6;

+

+#endif 	/* __IDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__

+#define __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkVideoConversion_v7_6 IDeckLinkVideoConversion_v7_6;

+

+#endif 	/* __IDeckLinkVideoConversion_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkConfiguration_v7_6_FWD_DEFINED__

+#define __IDeckLinkConfiguration_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkConfiguration_v7_6 IDeckLinkConfiguration_v7_6;

+

+#endif 	/* __IDeckLinkConfiguration_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__

+#define __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkVideoOutputCallback_v7_6 IDeckLinkVideoOutputCallback_v7_6;

+

+#endif 	/* __IDeckLinkVideoOutputCallback_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_v7_6_FWD_DEFINED__

+#define __IDeckLinkInputCallback_v7_6_FWD_DEFINED__

+typedef interface IDeckLinkInputCallback_v7_6 IDeckLinkInputCallback_v7_6;

+

+#endif 	/* __IDeckLinkInputCallback_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__

+#define __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkGLScreenPreviewHelper_v7_6 CDeckLinkGLScreenPreviewHelper_v7_6;

+#else

+typedef struct CDeckLinkGLScreenPreviewHelper_v7_6 CDeckLinkGLScreenPreviewHelper_v7_6;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkGLScreenPreviewHelper_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__

+#define __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__

+

+#ifdef __cplusplus

+typedef class CDeckLinkVideoConversion_v7_6 CDeckLinkVideoConversion_v7_6;

+#else

+typedef struct CDeckLinkVideoConversion_v7_6 CDeckLinkVideoConversion_v7_6;

+#endif /* __cplusplus */

+

+#endif 	/* __CDeckLinkVideoConversion_v7_6_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_v7_3_FWD_DEFINED__

+#define __IDeckLinkInputCallback_v7_3_FWD_DEFINED__

+typedef interface IDeckLinkInputCallback_v7_3 IDeckLinkInputCallback_v7_3;

+

+#endif 	/* __IDeckLinkInputCallback_v7_3_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_3_FWD_DEFINED__

+#define __IDeckLinkOutput_v7_3_FWD_DEFINED__

+typedef interface IDeckLinkOutput_v7_3 IDeckLinkOutput_v7_3;

+

+#endif 	/* __IDeckLinkOutput_v7_3_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_3_FWD_DEFINED__

+#define __IDeckLinkInput_v7_3_FWD_DEFINED__

+typedef interface IDeckLinkInput_v7_3 IDeckLinkInput_v7_3;

+

+#endif 	/* __IDeckLinkInput_v7_3_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__

+typedef interface IDeckLinkVideoInputFrame_v7_3 IDeckLinkVideoInputFrame_v7_3;

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_3_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__

+#define __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkDisplayModeIterator_v7_1 IDeckLinkDisplayModeIterator_v7_1;

+

+#endif 	/* __IDeckLinkDisplayModeIterator_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__

+#define __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkDisplayMode_v7_1 IDeckLinkDisplayMode_v7_1;

+

+#endif 	/* __IDeckLinkDisplayMode_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__

+#define __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkVideoFrame_v7_1 IDeckLinkVideoFrame_v7_1;

+

+#endif 	/* __IDeckLinkVideoFrame_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkVideoInputFrame_v7_1 IDeckLinkVideoInputFrame_v7_1;

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__

+#define __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkAudioInputPacket_v7_1 IDeckLinkAudioInputPacket_v7_1;

+

+#endif 	/* __IDeckLinkAudioInputPacket_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__

+#define __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkVideoOutputCallback_v7_1 IDeckLinkVideoOutputCallback_v7_1;

+

+#endif 	/* __IDeckLinkVideoOutputCallback_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_v7_1_FWD_DEFINED__

+#define __IDeckLinkInputCallback_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkInputCallback_v7_1 IDeckLinkInputCallback_v7_1;

+

+#endif 	/* __IDeckLinkInputCallback_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_1_FWD_DEFINED__

+#define __IDeckLinkOutput_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkOutput_v7_1 IDeckLinkOutput_v7_1;

+

+#endif 	/* __IDeckLinkOutput_v7_1_FWD_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_1_FWD_DEFINED__

+#define __IDeckLinkInput_v7_1_FWD_DEFINED__

+typedef interface IDeckLinkInput_v7_1 IDeckLinkInput_v7_1;

+

+#endif 	/* __IDeckLinkInput_v7_1_FWD_DEFINED__ */

+

+

+/* header files for imported files */

+#include "unknwn.h"

+

+#ifdef __cplusplus

+extern "C"{

+#endif 

+

+

+

+#ifndef __DeckLinkAPI_LIBRARY_DEFINED__

+#define __DeckLinkAPI_LIBRARY_DEFINED__

+

+/* library DeckLinkAPI */

+/* [helpstring][version][uuid] */ 

+

+typedef LONGLONG BMDTimeValue;

+

+typedef LONGLONG BMDTimeScale;

+

+typedef unsigned long BMDTimecodeBCD;

+

+typedef unsigned long BMDTimecodeUserBits;

+

+typedef unsigned long BMDTimecodeFlags;

+#if 0

+typedef enum _BMDTimecodeFlags BMDTimecodeFlags;

+

+#endif

+/* [v1_enum] */ 

+enum _BMDTimecodeFlags

+    {

+        bmdTimecodeFlagDefault	= 0,

+        bmdTimecodeIsDropFrame	= ( 1 << 0 ) ,

+        bmdTimecodeFieldMark	= ( 1 << 1 ) 

+    } ;

+typedef /* [v1_enum] */ 

+enum _BMDVideoConnection

+    {

+        bmdVideoConnectionSDI	= ( 1 << 0 ) ,

+        bmdVideoConnectionHDMI	= ( 1 << 1 ) ,

+        bmdVideoConnectionOpticalSDI	= ( 1 << 2 ) ,

+        bmdVideoConnectionComponent	= ( 1 << 3 ) ,

+        bmdVideoConnectionComposite	= ( 1 << 4 ) ,

+        bmdVideoConnectionSVideo	= ( 1 << 5 ) 

+    } 	BMDVideoConnection;

+

+typedef /* [v1_enum] */ 

+enum _BMDAudioConnection

+    {

+        bmdAudioConnectionEmbedded	= ( 1 << 0 ) ,

+        bmdAudioConnectionAESEBU	= ( 1 << 1 ) ,

+        bmdAudioConnectionAnalog	= ( 1 << 2 ) ,

+        bmdAudioConnectionAnalogXLR	= ( 1 << 3 ) ,

+        bmdAudioConnectionAnalogRCA	= ( 1 << 4 ) 

+    } 	BMDAudioConnection;

+

+

+typedef unsigned long BMDDisplayModeFlags;

+#if 0

+typedef enum _BMDDisplayModeFlags BMDDisplayModeFlags;

+

+#endif

+typedef /* [v1_enum] */ 

+enum _BMDDisplayMode

+    {

+        bmdModeNTSC	= 0x6e747363,

+        bmdModeNTSC2398	= 0x6e743233,

+        bmdModePAL	= 0x70616c20,

+        bmdModeNTSCp	= 0x6e747370,

+        bmdModePALp	= 0x70616c70,

+        bmdModeHD1080p2398	= 0x32337073,

+        bmdModeHD1080p24	= 0x32347073,

+        bmdModeHD1080p25	= 0x48703235,

+        bmdModeHD1080p2997	= 0x48703239,

+        bmdModeHD1080p30	= 0x48703330,

+        bmdModeHD1080i50	= 0x48693530,

+        bmdModeHD1080i5994	= 0x48693539,

+        bmdModeHD1080i6000	= 0x48693630,

+        bmdModeHD1080p50	= 0x48703530,

+        bmdModeHD1080p5994	= 0x48703539,

+        bmdModeHD1080p6000	= 0x48703630,

+        bmdModeHD720p50	= 0x68703530,

+        bmdModeHD720p5994	= 0x68703539,

+        bmdModeHD720p60	= 0x68703630,

+        bmdMode2k2398	= 0x326b3233,

+        bmdMode2k24	= 0x326b3234,

+        bmdMode2k25	= 0x326b3235,

+        bmdMode2kDCI2398	= 0x32643233,

+        bmdMode2kDCI24	= 0x32643234,

+        bmdMode2kDCI25	= 0x32643235,

+        bmdMode4K2160p2398	= 0x346b3233,

+        bmdMode4K2160p24	= 0x346b3234,

+        bmdMode4K2160p25	= 0x346b3235,

+        bmdMode4K2160p2997	= 0x346b3239,

+        bmdMode4K2160p30	= 0x346b3330,

+        bmdMode4K2160p50	= 0x346b3530,

+        bmdMode4K2160p5994	= 0x346b3539,

+        bmdMode4K2160p60	= 0x346b3630,

+        bmdMode4kDCI2398	= 0x34643233,

+        bmdMode4kDCI24	= 0x34643234,

+        bmdMode4kDCI25	= 0x34643235,

+        bmdModeUnknown	= 0x69756e6b

+    } 	BMDDisplayMode;

+

+typedef /* [v1_enum] */ 

+enum _BMDFieldDominance

+    {

+        bmdUnknownFieldDominance	= 0,

+        bmdLowerFieldFirst	= 0x6c6f7772,

+        bmdUpperFieldFirst	= 0x75707072,

+        bmdProgressiveFrame	= 0x70726f67,

+        bmdProgressiveSegmentedFrame	= 0x70736620

+    } 	BMDFieldDominance;

+

+typedef /* [v1_enum] */ 

+enum _BMDPixelFormat

+    {

+        bmdFormat8BitYUV	= 0x32767579,

+        bmdFormat10BitYUV	= 0x76323130,

+        bmdFormat8BitARGB	= 32,

+        bmdFormat8BitBGRA	= 0x42475241,

+        bmdFormat10BitRGB	= 0x72323130,

+        bmdFormat12BitRGB	= 0x52313242,

+        bmdFormat12BitRGBLE	= 0x5231324c,

+        bmdFormat10BitRGBXLE	= 0x5231306c,

+        bmdFormat10BitRGBX	= 0x52313062

+    } 	BMDPixelFormat;

+

+/* [v1_enum] */ 

+enum _BMDDisplayModeFlags

+    {

+        bmdDisplayModeSupports3D	= ( 1 << 0 ) ,

+        bmdDisplayModeColorspaceRec601	= ( 1 << 1 ) ,

+        bmdDisplayModeColorspaceRec709	= ( 1 << 2 ) 

+    } ;

+

+

+#if 0

+#endif

+

+#if 0

+#endif

+typedef /* [v1_enum] */ 

+enum _BMDDeckLinkConfigurationID

+    {

+        bmdDeckLinkConfigSwapSerialRxTx	= 0x73737274,

+        bmdDeckLinkConfigUse1080pNotPsF	= 0x6670726f,

+        bmdDeckLinkConfigHDMI3DPackingFormat	= 0x33647066,

+        bmdDeckLinkConfigBypass	= 0x62797073,

+        bmdDeckLinkConfigClockTimingAdjustment	= 0x63746164,

+        bmdDeckLinkConfigAnalogAudioConsumerLevels	= 0x6161636c,

+        bmdDeckLinkConfigFieldFlickerRemoval	= 0x66646672,

+        bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion	= 0x746f3539,

+        bmdDeckLinkConfig444SDIVideoOutput	= 0x3434346f,

+        bmdDeckLinkConfigSingleLinkVideoOutput	= 0x73676c6f,

+        bmdDeckLinkConfigBlackVideoOutputDuringCapture	= 0x62766f63,

+        bmdDeckLinkConfigLowLatencyVideoOutput	= 0x6c6c766f,

+        bmdDeckLinkConfigVideoOutputConnection	= 0x766f636e,

+        bmdDeckLinkConfigVideoOutputConversionMode	= 0x766f636d,

+        bmdDeckLinkConfigAnalogVideoOutputFlags	= 0x61766f66,

+        bmdDeckLinkConfigReferenceInputTimingOffset	= 0x676c6f74,

+        bmdDeckLinkConfigVideoOutputIdleOperation	= 0x766f696f,

+        bmdDeckLinkConfigDefaultVideoOutputMode	= 0x64766f6d,

+        bmdDeckLinkConfigDefaultVideoOutputModeFlags	= 0x64766f66,

+        bmdDeckLinkConfigVideoOutputComponentLumaGain	= 0x6f636c67,

+        bmdDeckLinkConfigVideoOutputComponentChromaBlueGain	= 0x6f636362,

+        bmdDeckLinkConfigVideoOutputComponentChromaRedGain	= 0x6f636372,

+        bmdDeckLinkConfigVideoOutputCompositeLumaGain	= 0x6f696c67,

+        bmdDeckLinkConfigVideoOutputCompositeChromaGain	= 0x6f696367,

+        bmdDeckLinkConfigVideoOutputSVideoLumaGain	= 0x6f736c67,

+        bmdDeckLinkConfigVideoOutputSVideoChromaGain	= 0x6f736367,

+        bmdDeckLinkConfigVideoInputScanning	= 0x76697363,

+        bmdDeckLinkConfigUseDedicatedLTCInput	= 0x646c7463,

+        bmdDeckLinkConfigVideoInputConnection	= 0x7669636e,

+        bmdDeckLinkConfigAnalogVideoInputFlags	= 0x61766966,

+        bmdDeckLinkConfigVideoInputConversionMode	= 0x7669636d,

+        bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame	= 0x70646966,

+        bmdDeckLinkConfigVANCSourceLine1Mapping	= 0x76736c31,

+        bmdDeckLinkConfigVANCSourceLine2Mapping	= 0x76736c32,

+        bmdDeckLinkConfigVANCSourceLine3Mapping	= 0x76736c33,

+        bmdDeckLinkConfigCapturePassThroughMode	= 0x6370746d,

+        bmdDeckLinkConfigVideoInputComponentLumaGain	= 0x69636c67,

+        bmdDeckLinkConfigVideoInputComponentChromaBlueGain	= 0x69636362,

+        bmdDeckLinkConfigVideoInputComponentChromaRedGain	= 0x69636372,

+        bmdDeckLinkConfigVideoInputCompositeLumaGain	= 0x69696c67,

+        bmdDeckLinkConfigVideoInputCompositeChromaGain	= 0x69696367,

+        bmdDeckLinkConfigVideoInputSVideoLumaGain	= 0x69736c67,

+        bmdDeckLinkConfigVideoInputSVideoChromaGain	= 0x69736367,

+        bmdDeckLinkConfigAudioInputConnection	= 0x6169636e,

+        bmdDeckLinkConfigAnalogAudioInputScaleChannel1	= 0x61697331,

+        bmdDeckLinkConfigAnalogAudioInputScaleChannel2	= 0x61697332,

+        bmdDeckLinkConfigAnalogAudioInputScaleChannel3	= 0x61697333,

+        bmdDeckLinkConfigAnalogAudioInputScaleChannel4	= 0x61697334,

+        bmdDeckLinkConfigDigitalAudioInputScale	= 0x64616973,

+        bmdDeckLinkConfigAudioOutputAESAnalogSwitch	= 0x616f6161,

+        bmdDeckLinkConfigAnalogAudioOutputScaleChannel1	= 0x616f7331,

+        bmdDeckLinkConfigAnalogAudioOutputScaleChannel2	= 0x616f7332,

+        bmdDeckLinkConfigAnalogAudioOutputScaleChannel3	= 0x616f7333,

+        bmdDeckLinkConfigAnalogAudioOutputScaleChannel4	= 0x616f7334,

+        bmdDeckLinkConfigDigitalAudioOutputScale	= 0x64616f73

+    } 	BMDDeckLinkConfigurationID;

+

+

+typedef unsigned long BMDDeckControlStatusFlags;

+typedef unsigned long BMDDeckControlExportModeOpsFlags;

+#if 0

+typedef enum _BMDDeckControlStatusFlags BMDDeckControlStatusFlags;

+

+typedef enum _BMDDeckControlExportModeOpsFlags BMDDeckControlExportModeOpsFlags;

+

+#endif

+typedef /* [v1_enum] */ 

+enum _BMDDeckControlMode

+    {

+        bmdDeckControlNotOpened	= 0x6e746f70,

+        bmdDeckControlVTRControlMode	= 0x76747263,

+        bmdDeckControlExportMode	= 0x6578706d,

+        bmdDeckControlCaptureMode	= 0x6361706d

+    } 	BMDDeckControlMode;

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckControlEvent

+    {

+        bmdDeckControlAbortedEvent	= 0x61627465,

+        bmdDeckControlPrepareForExportEvent	= 0x70666565,

+        bmdDeckControlExportCompleteEvent	= 0x65786365,

+        bmdDeckControlPrepareForCaptureEvent	= 0x70666365,

+        bmdDeckControlCaptureCompleteEvent	= 0x63636576

+    } 	BMDDeckControlEvent;

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckControlVTRControlState

+    {

+        bmdDeckControlNotInVTRControlMode	= 0x6e76636d,

+        bmdDeckControlVTRControlPlaying	= 0x76747270,

+        bmdDeckControlVTRControlRecording	= 0x76747272,

+        bmdDeckControlVTRControlStill	= 0x76747261,

+        bmdDeckControlVTRControlShuttleForward	= 0x76747366,

+        bmdDeckControlVTRControlShuttleReverse	= 0x76747372,

+        bmdDeckControlVTRControlJogForward	= 0x76746a66,

+        bmdDeckControlVTRControlJogReverse	= 0x76746a72,

+        bmdDeckControlVTRControlStopped	= 0x7674726f

+    } 	BMDDeckControlVTRControlState;

+

+/* [v1_enum] */ 

+enum _BMDDeckControlStatusFlags

+    {

+        bmdDeckControlStatusDeckConnected	= ( 1 << 0 ) ,

+        bmdDeckControlStatusRemoteMode	= ( 1 << 1 ) ,

+        bmdDeckControlStatusRecordInhibited	= ( 1 << 2 ) ,

+        bmdDeckControlStatusCassetteOut	= ( 1 << 3 ) 

+    } ;

+/* [v1_enum] */ 

+enum _BMDDeckControlExportModeOpsFlags

+    {

+        bmdDeckControlExportModeInsertVideo	= ( 1 << 0 ) ,

+        bmdDeckControlExportModeInsertAudio1	= ( 1 << 1 ) ,

+        bmdDeckControlExportModeInsertAudio2	= ( 1 << 2 ) ,

+        bmdDeckControlExportModeInsertAudio3	= ( 1 << 3 ) ,

+        bmdDeckControlExportModeInsertAudio4	= ( 1 << 4 ) ,

+        bmdDeckControlExportModeInsertAudio5	= ( 1 << 5 ) ,

+        bmdDeckControlExportModeInsertAudio6	= ( 1 << 6 ) ,

+        bmdDeckControlExportModeInsertAudio7	= ( 1 << 7 ) ,

+        bmdDeckControlExportModeInsertAudio8	= ( 1 << 8 ) ,

+        bmdDeckControlExportModeInsertAudio9	= ( 1 << 9 ) ,

+        bmdDeckControlExportModeInsertAudio10	= ( 1 << 10 ) ,

+        bmdDeckControlExportModeInsertAudio11	= ( 1 << 11 ) ,

+        bmdDeckControlExportModeInsertAudio12	= ( 1 << 12 ) ,

+        bmdDeckControlExportModeInsertTimeCode	= ( 1 << 13 ) ,

+        bmdDeckControlExportModeInsertAssemble	= ( 1 << 14 ) ,

+        bmdDeckControlExportModeInsertPreview	= ( 1 << 15 ) ,

+        bmdDeckControlUseManualExport	= ( 1 << 16 ) 

+    } ;

+typedef /* [v1_enum] */ 

+enum _BMDDeckControlError

+    {

+        bmdDeckControlNoError	= 0x6e6f6572,

+        bmdDeckControlModeError	= 0x6d6f6572,

+        bmdDeckControlMissedInPointError	= 0x6d696572,

+        bmdDeckControlDeckTimeoutError	= 0x64746572,

+        bmdDeckControlCommandFailedError	= 0x63666572,

+        bmdDeckControlDeviceAlreadyOpenedError	= 0x64616c6f,

+        bmdDeckControlFailedToOpenDeviceError	= 0x66646572,

+        bmdDeckControlInLocalModeError	= 0x6c6d6572,

+        bmdDeckControlEndOfTapeError	= 0x65746572,

+        bmdDeckControlUserAbortError	= 0x75616572,

+        bmdDeckControlNoTapeInDeckError	= 0x6e746572,

+        bmdDeckControlNoVideoFromCardError	= 0x6e766663,

+        bmdDeckControlNoCommunicationError	= 0x6e636f6d,

+        bmdDeckControlBufferTooSmallError	= 0x6274736d,

+        bmdDeckControlBadChecksumError	= 0x63686b73,

+        bmdDeckControlUnknownError	= 0x756e6572

+    } 	BMDDeckControlError;

+

+

+

+#if 0

+#endif

+typedef /* [v1_enum] */ 

+enum _BMDStreamingDeviceMode

+    {

+        bmdStreamingDeviceIdle	= 0x69646c65,

+        bmdStreamingDeviceEncoding	= 0x656e636f,

+        bmdStreamingDeviceStopping	= 0x73746f70,

+        bmdStreamingDeviceUnknown	= 0x6d756e6b

+    } 	BMDStreamingDeviceMode;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingEncodingFrameRate

+    {

+        bmdStreamingEncodedFrameRate50i	= 0x65353069,

+        bmdStreamingEncodedFrameRate5994i	= 0x65353969,

+        bmdStreamingEncodedFrameRate60i	= 0x65363069,

+        bmdStreamingEncodedFrameRate2398p	= 0x65323370,

+        bmdStreamingEncodedFrameRate24p	= 0x65323470,

+        bmdStreamingEncodedFrameRate25p	= 0x65323570,

+        bmdStreamingEncodedFrameRate2997p	= 0x65323970,

+        bmdStreamingEncodedFrameRate30p	= 0x65333070,

+        bmdStreamingEncodedFrameRate50p	= 0x65353070,

+        bmdStreamingEncodedFrameRate5994p	= 0x65353970,

+        bmdStreamingEncodedFrameRate60p	= 0x65363070

+    } 	BMDStreamingEncodingFrameRate;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingEncodingSupport

+    {

+        bmdStreamingEncodingModeNotSupported	= 0,

+        bmdStreamingEncodingModeSupported	= ( bmdStreamingEncodingModeNotSupported + 1 ) ,

+        bmdStreamingEncodingModeSupportedWithChanges	= ( bmdStreamingEncodingModeSupported + 1 ) 

+    } 	BMDStreamingEncodingSupport;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingVideoCodec

+    {

+        bmdStreamingVideoCodecH264	= 0x48323634

+    } 	BMDStreamingVideoCodec;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingH264Profile

+    {

+        bmdStreamingH264ProfileHigh	= 0x68696768,

+        bmdStreamingH264ProfileMain	= 0x6d61696e,

+        bmdStreamingH264ProfileBaseline	= 0x62617365

+    } 	BMDStreamingH264Profile;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingH264Level

+    {

+        bmdStreamingH264Level12	= 0x6c763132,

+        bmdStreamingH264Level13	= 0x6c763133,

+        bmdStreamingH264Level2	= 0x6c763220,

+        bmdStreamingH264Level21	= 0x6c763231,

+        bmdStreamingH264Level22	= 0x6c763232,

+        bmdStreamingH264Level3	= 0x6c763320,

+        bmdStreamingH264Level31	= 0x6c763331,

+        bmdStreamingH264Level32	= 0x6c763332,

+        bmdStreamingH264Level4	= 0x6c763420,

+        bmdStreamingH264Level41	= 0x6c763431,

+        bmdStreamingH264Level42	= 0x6c763432

+    } 	BMDStreamingH264Level;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingH264EntropyCoding

+    {

+        bmdStreamingH264EntropyCodingCAVLC	= 0x45564c43,

+        bmdStreamingH264EntropyCodingCABAC	= 0x45424143

+    } 	BMDStreamingH264EntropyCoding;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingAudioCodec

+    {

+        bmdStreamingAudioCodecAAC	= 0x41414320

+    } 	BMDStreamingAudioCodec;

+

+typedef /* [v1_enum] */ 

+enum _BMDStreamingEncodingModePropertyID

+    {

+        bmdStreamingEncodingPropertyVideoFrameRate	= 0x76667274,

+        bmdStreamingEncodingPropertyVideoBitRateKbps	= 0x76627274,

+        bmdStreamingEncodingPropertyH264Profile	= 0x68707266,

+        bmdStreamingEncodingPropertyH264Level	= 0x686c766c,

+        bmdStreamingEncodingPropertyH264EntropyCoding	= 0x68656e74,

+        bmdStreamingEncodingPropertyH264HasBFrames	= 0x68426672,

+        bmdStreamingEncodingPropertyAudioCodec	= 0x61636463,

+        bmdStreamingEncodingPropertyAudioSampleRate	= 0x61737274,

+        bmdStreamingEncodingPropertyAudioChannelCount	= 0x61636863,

+        bmdStreamingEncodingPropertyAudioBitRateKbps	= 0x61627274

+    } 	BMDStreamingEncodingModePropertyID;

+

+

+

+

+

+

+

+

+

+

+

+

+typedef unsigned long BMDFrameFlags;

+typedef unsigned long BMDVideoInputFlags;

+typedef unsigned long BMDVideoInputFormatChangedEvents;

+typedef unsigned long BMDDetectedVideoInputFormatFlags;

+typedef unsigned long BMDDeckLinkCapturePassthroughMode;

+typedef unsigned long BMDAnalogVideoFlags;

+typedef unsigned long BMDDeviceBusyState;

+#if 0

+typedef enum _BMDFrameFlags BMDFrameFlags;

+

+typedef enum _BMDVideoInputFlags BMDVideoInputFlags;

+

+typedef enum _BMDVideoInputFormatChangedEvents BMDVideoInputFormatChangedEvents;

+

+typedef enum _BMDDetectedVideoInputFormatFlags BMDDetectedVideoInputFormatFlags;

+

+typedef enum _BMDDeckLinkCapturePassthroughMode BMDDeckLinkCapturePassthroughMode;

+

+typedef enum _BMDAnalogVideoFlags BMDAnalogVideoFlags;

+

+typedef enum _BMDDeviceBusyState BMDDeviceBusyState;

+

+#endif

+typedef /* [v1_enum] */ 

+enum _BMDVideoOutputFlags

+    {

+        bmdVideoOutputFlagDefault	= 0,

+        bmdVideoOutputVANC	= ( 1 << 0 ) ,

+        bmdVideoOutputVITC	= ( 1 << 1 ) ,

+        bmdVideoOutputRP188	= ( 1 << 2 ) ,

+        bmdVideoOutputDualStream3D	= ( 1 << 4 ) 

+    } 	BMDVideoOutputFlags;

+

+/* [v1_enum] */ 

+enum _BMDFrameFlags

+    {

+        bmdFrameFlagDefault	= 0,

+        bmdFrameFlagFlipVertical	= ( 1 << 0 ) ,

+        bmdFrameHasNoInputSource	= ( 1 << 31 ) 

+    } ;

+/* [v1_enum] */ 

+enum _BMDVideoInputFlags

+    {

+        bmdVideoInputFlagDefault	= 0,

+        bmdVideoInputEnableFormatDetection	= ( 1 << 0 ) ,

+        bmdVideoInputDualStream3D	= ( 1 << 1 ) 

+    } ;

+/* [v1_enum] */ 

+enum _BMDVideoInputFormatChangedEvents

+    {

+        bmdVideoInputDisplayModeChanged	= ( 1 << 0 ) ,

+        bmdVideoInputFieldDominanceChanged	= ( 1 << 1 ) ,

+        bmdVideoInputColorspaceChanged	= ( 1 << 2 ) 

+    } ;

+/* [v1_enum] */ 

+enum _BMDDetectedVideoInputFormatFlags

+    {

+        bmdDetectedVideoInputYCbCr422	= ( 1 << 0 ) ,

+        bmdDetectedVideoInputRGB444	= ( 1 << 1 ) ,

+        bmdDetectedVideoInputDualStream3D	= ( 1 << 2 ) 

+    } ;

+/* [v1_enum] */ 

+enum _BMDDeckLinkCapturePassthroughMode

+    {

+        bmdDeckLinkCapturePassthroughModeDirect	= 0x70646972,

+        bmdDeckLinkCapturePassthroughModeCleanSwitch	= 0x70636c6e

+    } ;

+typedef /* [v1_enum] */ 

+enum _BMDOutputFrameCompletionResult

+    {

+        bmdOutputFrameCompleted	= 0,

+        bmdOutputFrameDisplayedLate	= ( bmdOutputFrameCompleted + 1 ) ,

+        bmdOutputFrameDropped	= ( bmdOutputFrameDisplayedLate + 1 ) ,

+        bmdOutputFrameFlushed	= ( bmdOutputFrameDropped + 1 ) 

+    } 	BMDOutputFrameCompletionResult;

+

+typedef /* [v1_enum] */ 

+enum _BMDReferenceStatus

+    {

+        bmdReferenceNotSupportedByHardware	= ( 1 << 0 ) ,

+        bmdReferenceLocked	= ( 1 << 1 ) 

+    } 	BMDReferenceStatus;

+

+typedef /* [v1_enum] */ 

+enum _BMDAudioSampleRate

+    {

+        bmdAudioSampleRate48kHz	= 48000

+    } 	BMDAudioSampleRate;

+

+typedef /* [v1_enum] */ 

+enum _BMDAudioSampleType

+    {

+        bmdAudioSampleType16bitInteger	= 16,

+        bmdAudioSampleType32bitInteger	= 32

+    } 	BMDAudioSampleType;

+

+typedef /* [v1_enum] */ 

+enum _BMDAudioOutputStreamType

+    {

+        bmdAudioOutputStreamContinuous	= 0,

+        bmdAudioOutputStreamContinuousDontResample	= ( bmdAudioOutputStreamContinuous + 1 ) ,

+        bmdAudioOutputStreamTimestamped	= ( bmdAudioOutputStreamContinuousDontResample + 1 ) 

+    } 	BMDAudioOutputStreamType;

+

+typedef /* [v1_enum] */ 

+enum _BMDDisplayModeSupport

+    {

+        bmdDisplayModeNotSupported	= 0,

+        bmdDisplayModeSupported	= ( bmdDisplayModeNotSupported + 1 ) ,

+        bmdDisplayModeSupportedWithConversion	= ( bmdDisplayModeSupported + 1 ) 

+    } 	BMDDisplayModeSupport;

+

+typedef /* [v1_enum] */ 

+enum _BMDTimecodeFormat

+    {

+        bmdTimecodeRP188VITC1	= 0x72707631,

+        bmdTimecodeRP188VITC2	= 0x72703132,

+        bmdTimecodeRP188LTC	= 0x72706c74,

+        bmdTimecodeRP188Any	= 0x72703138,

+        bmdTimecodeVITC	= 0x76697463,

+        bmdTimecodeVITCField2	= 0x76697432,

+        bmdTimecodeSerial	= 0x73657269

+    } 	BMDTimecodeFormat;

+

+/* [v1_enum] */ 

+enum _BMDAnalogVideoFlags

+    {

+        bmdAnalogVideoFlagCompositeSetup75	= ( 1 << 0 ) ,

+        bmdAnalogVideoFlagComponentBetacamLevels	= ( 1 << 1 ) 

+    } ;

+typedef /* [v1_enum] */ 

+enum _BMDAudioOutputAnalogAESSwitch

+    {

+        bmdAudioOutputSwitchAESEBU	= 0x61657320,

+        bmdAudioOutputSwitchAnalog	= 0x616e6c67

+    } 	BMDAudioOutputAnalogAESSwitch;

+

+typedef /* [v1_enum] */ 

+enum _BMDVideoOutputConversionMode

+    {

+        bmdNoVideoOutputConversion	= 0x6e6f6e65,

+        bmdVideoOutputLetterboxDownconversion	= 0x6c746278,

+        bmdVideoOutputAnamorphicDownconversion	= 0x616d7068,

+        bmdVideoOutputHD720toHD1080Conversion	= 0x37323063,

+        bmdVideoOutputHardwareLetterboxDownconversion	= 0x48576c62,

+        bmdVideoOutputHardwareAnamorphicDownconversion	= 0x4857616d,

+        bmdVideoOutputHardwareCenterCutDownconversion	= 0x48576363,

+        bmdVideoOutputHardware720p1080pCrossconversion	= 0x78636170,

+        bmdVideoOutputHardwareAnamorphic720pUpconversion	= 0x75613770,

+        bmdVideoOutputHardwareAnamorphic1080iUpconversion	= 0x75613169,

+        bmdVideoOutputHardwareAnamorphic149To720pUpconversion	= 0x75343770,

+        bmdVideoOutputHardwareAnamorphic149To1080iUpconversion	= 0x75343169,

+        bmdVideoOutputHardwarePillarbox720pUpconversion	= 0x75703770,

+        bmdVideoOutputHardwarePillarbox1080iUpconversion	= 0x75703169

+    } 	BMDVideoOutputConversionMode;

+

+typedef /* [v1_enum] */ 

+enum _BMDVideoInputConversionMode

+    {

+        bmdNoVideoInputConversion	= 0x6e6f6e65,

+        bmdVideoInputLetterboxDownconversionFromHD1080	= 0x31306c62,

+        bmdVideoInputAnamorphicDownconversionFromHD1080	= 0x3130616d,

+        bmdVideoInputLetterboxDownconversionFromHD720	= 0x37326c62,

+        bmdVideoInputAnamorphicDownconversionFromHD720	= 0x3732616d,

+        bmdVideoInputLetterboxUpconversion	= 0x6c627570,

+        bmdVideoInputAnamorphicUpconversion	= 0x616d7570

+    } 	BMDVideoInputConversionMode;

+

+typedef /* [v1_enum] */ 

+enum _BMDVideo3DPackingFormat

+    {

+        bmdVideo3DPackingSidebySideHalf	= 0x73627368,

+        bmdVideo3DPackingLinebyLine	= 0x6c62796c,

+        bmdVideo3DPackingTopAndBottom	= 0x7461626f,

+        bmdVideo3DPackingFramePacking	= 0x6672706b,

+        bmdVideo3DPackingLeftOnly	= 0x6c656674,

+        bmdVideo3DPackingRightOnly	= 0x72696768

+    } 	BMDVideo3DPackingFormat;

+

+typedef /* [v1_enum] */ 

+enum _BMDIdleVideoOutputOperation

+    {

+        bmdIdleVideoOutputBlack	= 0x626c6163,

+        bmdIdleVideoOutputLastFrame	= 0x6c616661,

+        bmdIdleVideoOutputDesktop	= 0x6465736b

+    } 	BMDIdleVideoOutputOperation;

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckLinkAttributeID

+    {

+        BMDDeckLinkSupportsInternalKeying	= 0x6b657969,

+        BMDDeckLinkSupportsExternalKeying	= 0x6b657965,

+        BMDDeckLinkSupportsHDKeying	= 0x6b657968,

+        BMDDeckLinkSupportsInputFormatDetection	= 0x696e6664,

+        BMDDeckLinkHasReferenceInput	= 0x6872696e,

+        BMDDeckLinkHasSerialPort	= 0x68737074,

+        BMDDeckLinkHasAnalogVideoOutputGain	= 0x61766f67,

+        BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain	= 0x6f766f67,

+        BMDDeckLinkHasVideoInputAntiAliasingFilter	= 0x6161666c,

+        BMDDeckLinkHasBypass	= 0x62797073,

+        BMDDeckLinkSupportsDesktopDisplay	= 0x65787464,

+        BMDDeckLinkSupportsClockTimingAdjustment	= 0x63746164,

+        BMDDeckLinkSupportsFullDuplex	= 0x66647570,

+        BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset	= 0x6672696e,

+        BMDDeckLinkMaximumAudioChannels	= 0x6d616368,

+        BMDDeckLinkMaximumAnalogAudioChannels	= 0x61616368,

+        BMDDeckLinkNumberOfSubDevices	= 0x6e736264,

+        BMDDeckLinkSubDeviceIndex	= 0x73756269,

+        BMDDeckLinkPersistentID	= 0x70656964,

+        BMDDeckLinkTopologicalID	= 0x746f6964,

+        BMDDeckLinkVideoOutputConnections	= 0x766f636e,

+        BMDDeckLinkVideoInputConnections	= 0x7669636e,

+        BMDDeckLinkAudioOutputConnections	= 0x616f636e,

+        BMDDeckLinkAudioInputConnections	= 0x6169636e,

+        BMDDeckLinkDeviceBusyState	= 0x64627374,

+        BMDDeckLinkVideoIOSupport	= 0x76696f73,

+        BMDDeckLinkVideoInputGainMinimum	= 0x7669676d,

+        BMDDeckLinkVideoInputGainMaximum	= 0x76696778,

+        BMDDeckLinkVideoOutputGainMinimum	= 0x766f676d,

+        BMDDeckLinkVideoOutputGainMaximum	= 0x766f6778,

+        BMDDeckLinkSerialPortDeviceName	= 0x736c706e

+    } 	BMDDeckLinkAttributeID;

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckLinkAPIInformationID

+    {

+        BMDDeckLinkAPIVersion	= 0x76657273

+    } 	BMDDeckLinkAPIInformationID;

+

+/* [v1_enum] */ 

+enum _BMDDeviceBusyState

+    {

+        bmdDeviceCaptureBusy	= ( 1 << 0 ) ,

+        bmdDevicePlaybackBusy	= ( 1 << 1 ) ,

+        bmdDeviceSerialPortBusy	= ( 1 << 2 ) 

+    } ;

+typedef /* [v1_enum] */ 

+enum _BMDVideoIOSupport

+    {

+        bmdDeviceSupportsCapture	= ( 1 << 0 ) ,

+        bmdDeviceSupportsPlayback	= ( 1 << 1 ) 

+    } 	BMDVideoIOSupport;

+

+typedef /* [v1_enum] */ 

+enum _BMD3DPreviewFormat

+    {

+        bmd3DPreviewFormatDefault	= 0x64656661,

+        bmd3DPreviewFormatLeftOnly	= 0x6c656674,

+        bmd3DPreviewFormatRightOnly	= 0x72696768,

+        bmd3DPreviewFormatSideBySide	= 0x73696465,

+        bmd3DPreviewFormatTopBottom	= 0x746f7062

+    } 	BMD3DPreviewFormat;

+

+typedef /* [v1_enum] */ 

+enum _BMDNotifications

+    {

+        bmdPreferencesChanged	= 0x70726566

+    } 	BMDNotifications;

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckLinkConfigurationID_v10_2

+    {

+        bmdDeckLinkConfig3GBpsVideoOutput_v10_2	= 0x33676273

+    } 	BMDDeckLinkConfigurationID_v10_2;

+

+typedef /* [v1_enum] */ 

+enum _BMDAudioConnection_v10_2

+    {

+        bmdAudioConnectionEmbedded_v10_2	= 0x656d6264,

+        bmdAudioConnectionAESEBU_v10_2	= 0x61657320,

+        bmdAudioConnectionAnalog_v10_2	= 0x616e6c67,

+        bmdAudioConnectionAnalogXLR_v10_2	= 0x61786c72,

+        bmdAudioConnectionAnalogRCA_v10_2	= 0x61726361

+    } 	BMDAudioConnection_v10_2;

+

+

+typedef /* [v1_enum] */ 

+enum _BMDDeckControlVTRControlState_v8_1

+    {

+        bmdDeckControlNotInVTRControlMode_v8_1	= 0x6e76636d,

+        bmdDeckControlVTRControlPlaying_v8_1	= 0x76747270,

+        bmdDeckControlVTRControlRecording_v8_1	= 0x76747272,

+        bmdDeckControlVTRControlStill_v8_1	= 0x76747261,

+        bmdDeckControlVTRControlSeeking_v8_1	= 0x76747273,

+        bmdDeckControlVTRControlStopped_v8_1	= 0x7674726f

+    } 	BMDDeckControlVTRControlState_v8_1;

+

+

+

+typedef /* [v1_enum] */ 

+enum _BMDVideoConnection_v7_6

+    {

+        bmdVideoConnectionSDI_v7_6	= 0x73646920,

+        bmdVideoConnectionHDMI_v7_6	= 0x68646d69,

+        bmdVideoConnectionOpticalSDI_v7_6	= 0x6f707469,

+        bmdVideoConnectionComponent_v7_6	= 0x63706e74,

+        bmdVideoConnectionComposite_v7_6	= 0x636d7374,

+        bmdVideoConnectionSVideo_v7_6	= 0x73766964

+    } 	BMDVideoConnection_v7_6;

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+EXTERN_C const IID LIBID_DeckLinkAPI;

+

+#ifndef __IDeckLinkTimecode_INTERFACE_DEFINED__

+#define __IDeckLinkTimecode_INTERFACE_DEFINED__

+

+/* interface IDeckLinkTimecode */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkTimecode;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("BC6CFBD3-8317-4325-AC1C-1216391E9340")

+    IDeckLinkTimecode : public IUnknown

+    {

+    public:

+        virtual BMDTimecodeBCD STDMETHODCALLTYPE GetBCD( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetComponents( 

+            /* [out] */ unsigned char *hours,

+            /* [out] */ unsigned char *minutes,

+            /* [out] */ unsigned char *seconds,

+            /* [out] */ unsigned char *frames) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [out] */ BSTR *timecode) = 0;

+        

+        virtual BMDTimecodeFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeUserBits( 

+            /* [out] */ BMDTimecodeUserBits *userBits) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkTimecodeVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkTimecode * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkTimecode * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkTimecode * This);

+        

+        BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( 

+            IDeckLinkTimecode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetComponents )( 

+            IDeckLinkTimecode * This,

+            /* [out] */ unsigned char *hours,

+            /* [out] */ unsigned char *minutes,

+            /* [out] */ unsigned char *seconds,

+            /* [out] */ unsigned char *frames);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkTimecode * This,

+            /* [out] */ BSTR *timecode);

+        

+        BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkTimecode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeUserBits )( 

+            IDeckLinkTimecode * This,

+            /* [out] */ BMDTimecodeUserBits *userBits);

+        

+        END_INTERFACE

+    } IDeckLinkTimecodeVtbl;

+

+    interface IDeckLinkTimecode

+    {

+        CONST_VTBL struct IDeckLinkTimecodeVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkTimecode_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkTimecode_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkTimecode_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkTimecode_GetBCD(This)	\

+    ( (This)->lpVtbl -> GetBCD(This) ) 

+

+#define IDeckLinkTimecode_GetComponents(This,hours,minutes,seconds,frames)	\

+    ( (This)->lpVtbl -> GetComponents(This,hours,minutes,seconds,frames) ) 

+

+#define IDeckLinkTimecode_GetString(This,timecode)	\

+    ( (This)->lpVtbl -> GetString(This,timecode) ) 

+

+#define IDeckLinkTimecode_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkTimecode_GetTimecodeUserBits(This,userBits)	\

+    ( (This)->lpVtbl -> GetTimecodeUserBits(This,userBits) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkTimecode_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayModeIterator */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayModeIterator;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("9C88499F-F601-4021-B80B-032E4EB41C35")

+    IDeckLinkDisplayModeIterator : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayModeIteratorVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayModeIterator * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayModeIterator * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayModeIterator * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IDeckLinkDisplayModeIterator * This,

+            /* [out] */ IDeckLinkDisplayMode **deckLinkDisplayMode);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayModeIteratorVtbl;

+

+    interface IDeckLinkDisplayModeIterator

+    {

+        CONST_VTBL struct IDeckLinkDisplayModeIteratorVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayModeIterator_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayModeIterator_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayModeIterator_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayModeIterator_Next(This,deckLinkDisplayMode)	\

+    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayModeIterator_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayMode_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayMode */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayMode;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78")

+    IDeckLinkDisplayMode : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetName( 

+            /* [out] */ BSTR *name) = 0;

+        

+        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale) = 0;

+        

+        virtual BMDFieldDominance STDMETHODCALLTYPE GetFieldDominance( void) = 0;

+        

+        virtual BMDDisplayModeFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayModeVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayMode * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayMode * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetName )( 

+            IDeckLinkDisplayMode * This,

+            /* [out] */ BSTR *name);

+        

+        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 

+            IDeckLinkDisplayMode * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkDisplayMode * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkDisplayMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 

+            IDeckLinkDisplayMode * This,

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale);

+        

+        BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( 

+            IDeckLinkDisplayMode * This);

+        

+        BMDDisplayModeFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkDisplayMode * This);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayModeVtbl;

+

+    interface IDeckLinkDisplayMode

+    {

+        CONST_VTBL struct IDeckLinkDisplayModeVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayMode_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayMode_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayMode_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayMode_GetName(This,name)	\

+    ( (This)->lpVtbl -> GetName(This,name) ) 

+

+#define IDeckLinkDisplayMode_GetDisplayMode(This)	\

+    ( (This)->lpVtbl -> GetDisplayMode(This) ) 

+

+#define IDeckLinkDisplayMode_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkDisplayMode_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkDisplayMode_GetFrameRate(This,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 

+

+#define IDeckLinkDisplayMode_GetFieldDominance(This)	\

+    ( (This)->lpVtbl -> GetFieldDominance(This) ) 

+

+#define IDeckLinkDisplayMode_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayMode_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLink_INTERFACE_DEFINED__

+#define __IDeckLink_INTERFACE_DEFINED__

+

+/* interface IDeckLink */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLink;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("C418FBDD-0587-48ED-8FE5-640F0A14AF91")

+    IDeckLink : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetModelName( 

+            /* [out] */ BSTR *modelName) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayName( 

+            /* [out] */ BSTR *displayName) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLink * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLink * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLink * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetModelName )( 

+            IDeckLink * This,

+            /* [out] */ BSTR *modelName);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 

+            IDeckLink * This,

+            /* [out] */ BSTR *displayName);

+        

+        END_INTERFACE

+    } IDeckLinkVtbl;

+

+    interface IDeckLink

+    {

+        CONST_VTBL struct IDeckLinkVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLink_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLink_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLink_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLink_GetModelName(This,modelName)	\

+    ( (This)->lpVtbl -> GetModelName(This,modelName) ) 

+

+#define IDeckLink_GetDisplayName(This,displayName)	\

+    ( (This)->lpVtbl -> GetDisplayName(This,displayName) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLink_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkConfiguration_INTERFACE_DEFINED__

+#define __IDeckLinkConfiguration_INTERFACE_DEFINED__

+

+/* interface IDeckLinkConfiguration */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkConfiguration;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("1E69FCF6-4203-4936-8076-2A9F4CFD50CB")

+    IDeckLinkConfiguration : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE SetFlag( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BOOL value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFlag( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BOOL *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetInt( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ LONGLONG value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetInt( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ LONGLONG *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFloat( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ double value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFloat( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ double *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetString( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BSTR value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BSTR *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteConfigurationToPreferences( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkConfigurationVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkConfiguration * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkConfiguration * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFlag )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BOOL value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetInt )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ LONGLONG value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFloat )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ double value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetString )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BSTR value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkConfiguration * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BSTR *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( 

+            IDeckLinkConfiguration * This);

+        

+        END_INTERFACE

+    } IDeckLinkConfigurationVtbl;

+

+    interface IDeckLinkConfiguration

+    {

+        CONST_VTBL struct IDeckLinkConfigurationVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkConfiguration_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkConfiguration_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkConfiguration_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkConfiguration_SetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_SetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetInt(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_SetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_SetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetString(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_WriteConfigurationToPreferences(This)	\

+    ( (This)->lpVtbl -> WriteConfigurationToPreferences(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkConfiguration_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__

+#define __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeckControlStatusCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeckControlStatusCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("53436FFB-B434-4906-BADC-AE3060FFE8EF")

+    IDeckLinkDeckControlStatusCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE TimecodeUpdate( 

+            /* [in] */ BMDTimecodeBCD currentTimecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE VTRControlStateChanged( 

+            /* [in] */ BMDDeckControlVTRControlState newState,

+            /* [in] */ BMDDeckControlError error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DeckControlEventReceived( 

+            /* [in] */ BMDDeckControlEvent event,

+            /* [in] */ BMDDeckControlError error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DeckControlStatusChanged( 

+            /* [in] */ BMDDeckControlStatusFlags flags,

+            /* [in] */ unsigned long mask) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeckControlStatusCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeckControlStatusCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeckControlStatusCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeckControlStatusCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *TimecodeUpdate )( 

+            IDeckLinkDeckControlStatusCallback * This,

+            /* [in] */ BMDTimecodeBCD currentTimecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *VTRControlStateChanged )( 

+            IDeckLinkDeckControlStatusCallback * This,

+            /* [in] */ BMDDeckControlVTRControlState newState,

+            /* [in] */ BMDDeckControlError error);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckControlEventReceived )( 

+            IDeckLinkDeckControlStatusCallback * This,

+            /* [in] */ BMDDeckControlEvent event,

+            /* [in] */ BMDDeckControlError error);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckControlStatusChanged )( 

+            IDeckLinkDeckControlStatusCallback * This,

+            /* [in] */ BMDDeckControlStatusFlags flags,

+            /* [in] */ unsigned long mask);

+        

+        END_INTERFACE

+    } IDeckLinkDeckControlStatusCallbackVtbl;

+

+    interface IDeckLinkDeckControlStatusCallback

+    {

+        CONST_VTBL struct IDeckLinkDeckControlStatusCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeckControlStatusCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeckControlStatusCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeckControlStatusCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeckControlStatusCallback_TimecodeUpdate(This,currentTimecode)	\

+    ( (This)->lpVtbl -> TimecodeUpdate(This,currentTimecode) ) 

+

+#define IDeckLinkDeckControlStatusCallback_VTRControlStateChanged(This,newState,error)	\

+    ( (This)->lpVtbl -> VTRControlStateChanged(This,newState,error) ) 

+

+#define IDeckLinkDeckControlStatusCallback_DeckControlEventReceived(This,event,error)	\

+    ( (This)->lpVtbl -> DeckControlEventReceived(This,event,error) ) 

+

+#define IDeckLinkDeckControlStatusCallback_DeckControlStatusChanged(This,flags,mask)	\

+    ( (This)->lpVtbl -> DeckControlStatusChanged(This,flags,mask) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeckControlStatusCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControl_INTERFACE_DEFINED__

+#define __IDeckLinkDeckControl_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeckControl */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeckControl;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("8E1C3ACE-19C7-4E00-8B92-D80431D958BE")

+    IDeckLinkDeckControl : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Open( 

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Close( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCurrentState( 

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetStandby( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SendCommand( 

+            /* [in] */ unsigned char *inBuffer,

+            /* [in] */ unsigned long inBufferSize,

+            /* [out] */ unsigned char *outBuffer,

+            /* [out] */ unsigned long *outDataSize,

+            /* [in] */ unsigned long outBufferSize,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Play( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Stop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Eject( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GoToTimecode( 

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FastForward( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Rewind( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepForward( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepBack( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Jog( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Shuttle( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( 

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( 

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetPreroll( 

+            /* [in] */ unsigned long prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPreroll( 

+            /* [out] */ unsigned long *prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetExportOffset( 

+            /* [in] */ long exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetExportOffset( 

+            /* [out] */ long *exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( 

+            /* [out] */ long *deckManualExportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( 

+            /* [in] */ long captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( 

+            /* [out] */ long *captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartExport( 

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartCapture( 

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDeviceID( 

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeckControlVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeckControl * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeckControl * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Open )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Close )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetStandby )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *SendCommand )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ unsigned char *inBuffer,

+            /* [in] */ unsigned long inBufferSize,

+            /* [out] */ unsigned char *outBuffer,

+            /* [out] */ unsigned long *outDataSize,

+            /* [in] */ unsigned long outBufferSize,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Play )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Stop )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Eject )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *FastForward )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Rewind )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepForward )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepBack )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Jog )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Shuttle )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetPreroll )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ unsigned long prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPreroll )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ unsigned long *prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ long exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ long *exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ long *deckManualExportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ long captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ long *captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartExport )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Abort )( 

+            IDeckLinkDeckControl * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( 

+            IDeckLinkDeckControl * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkDeckControl * This,

+            /* [in] */ IDeckLinkDeckControlStatusCallback *callback);

+        

+        END_INTERFACE

+    } IDeckLinkDeckControlVtbl;

+

+    interface IDeckLinkDeckControl

+    {

+        CONST_VTBL struct IDeckLinkDeckControlVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeckControl_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeckControl_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeckControl_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeckControl_Open(This,timeScale,timeValue,timecodeIsDropFrame,error)	\

+    ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) 

+

+#define IDeckLinkDeckControl_Close(This,standbyOn)	\

+    ( (This)->lpVtbl -> Close(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_GetCurrentState(This,mode,vtrControlState,flags)	\

+    ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) 

+

+#define IDeckLinkDeckControl_SetStandby(This,standbyOn)	\

+    ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error)	\

+    ( (This)->lpVtbl -> SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) ) 

+

+#define IDeckLinkDeckControl_Play(This,error)	\

+    ( (This)->lpVtbl -> Play(This,error) ) 

+

+#define IDeckLinkDeckControl_Stop(This,error)	\

+    ( (This)->lpVtbl -> Stop(This,error) ) 

+

+#define IDeckLinkDeckControl_TogglePlayStop(This,error)	\

+    ( (This)->lpVtbl -> TogglePlayStop(This,error) ) 

+

+#define IDeckLinkDeckControl_Eject(This,error)	\

+    ( (This)->lpVtbl -> Eject(This,error) ) 

+

+#define IDeckLinkDeckControl_GoToTimecode(This,timecode,error)	\

+    ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) 

+

+#define IDeckLinkDeckControl_FastForward(This,viewTape,error)	\

+    ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_Rewind(This,viewTape,error)	\

+    ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_StepForward(This,error)	\

+    ( (This)->lpVtbl -> StepForward(This,error) ) 

+

+#define IDeckLinkDeckControl_StepBack(This,error)	\

+    ( (This)->lpVtbl -> StepBack(This,error) ) 

+

+#define IDeckLinkDeckControl_Jog(This,rate,error)	\

+    ( (This)->lpVtbl -> Jog(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_Shuttle(This,rate,error)	\

+    ( (This)->lpVtbl -> Shuttle(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_GetTimecodeString(This,currentTimeCode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) 

+

+#define IDeckLinkDeckControl_GetTimecode(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_GetTimecodeBCD(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_SetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_GetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_SetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_GetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_GetManualExportOffset(This,deckManualExportOffsetFields)	\

+    ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_SetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_GetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_StartExport(This,inTimecode,outTimecode,exportModeOps,error)	\

+    ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) 

+

+#define IDeckLinkDeckControl_StartCapture(This,useVITC,inTimecode,outTimecode,error)	\

+    ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) 

+

+#define IDeckLinkDeckControl_GetDeviceID(This,deviceId,error)	\

+    ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) 

+

+#define IDeckLinkDeckControl_Abort(This)	\

+    ( (This)->lpVtbl -> Abort(This) ) 

+

+#define IDeckLinkDeckControl_CrashRecordStart(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStart(This,error) ) 

+

+#define IDeckLinkDeckControl_CrashRecordStop(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStop(This,error) ) 

+

+#define IDeckLinkDeckControl_SetCallback(This,callback)	\

+    ( (This)->lpVtbl -> SetCallback(This,callback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeckControl_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDeviceNotificationCallback_INTERFACE_DEFINED__

+#define __IBMDStreamingDeviceNotificationCallback_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingDeviceNotificationCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingDeviceNotificationCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("F9531D64-3305-4B29-A387-7F74BB0D0E84")

+    IBMDStreamingDeviceNotificationCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE StreamingDeviceArrived( 

+            /* [in] */ IDeckLink *device) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StreamingDeviceRemoved( 

+            /* [in] */ IDeckLink *device) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StreamingDeviceModeChanged( 

+            /* [in] */ IDeckLink *device,

+            /* [in] */ BMDStreamingDeviceMode mode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingDeviceNotificationCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingDeviceNotificationCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingDeviceNotificationCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingDeviceNotificationCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StreamingDeviceArrived )( 

+            IBMDStreamingDeviceNotificationCallback * This,

+            /* [in] */ IDeckLink *device);

+        

+        HRESULT ( STDMETHODCALLTYPE *StreamingDeviceRemoved )( 

+            IBMDStreamingDeviceNotificationCallback * This,

+            /* [in] */ IDeckLink *device);

+        

+        HRESULT ( STDMETHODCALLTYPE *StreamingDeviceModeChanged )( 

+            IBMDStreamingDeviceNotificationCallback * This,

+            /* [in] */ IDeckLink *device,

+            /* [in] */ BMDStreamingDeviceMode mode);

+        

+        END_INTERFACE

+    } IBMDStreamingDeviceNotificationCallbackVtbl;

+

+    interface IBMDStreamingDeviceNotificationCallback

+    {

+        CONST_VTBL struct IBMDStreamingDeviceNotificationCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingDeviceNotificationCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingDeviceNotificationCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingDeviceNotificationCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingDeviceNotificationCallback_StreamingDeviceArrived(This,device)	\

+    ( (This)->lpVtbl -> StreamingDeviceArrived(This,device) ) 

+

+#define IBMDStreamingDeviceNotificationCallback_StreamingDeviceRemoved(This,device)	\

+    ( (This)->lpVtbl -> StreamingDeviceRemoved(This,device) ) 

+

+#define IBMDStreamingDeviceNotificationCallback_StreamingDeviceModeChanged(This,device,mode)	\

+    ( (This)->lpVtbl -> StreamingDeviceModeChanged(This,device,mode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingDeviceNotificationCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264InputCallback_INTERFACE_DEFINED__

+#define __IBMDStreamingH264InputCallback_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingH264InputCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingH264InputCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("823C475F-55AE-46F9-890C-537CC5CEDCCA")

+    IBMDStreamingH264InputCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE H264NALPacketArrived( 

+            /* [in] */ IBMDStreamingH264NALPacket *nalPacket) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE H264AudioPacketArrived( 

+            /* [in] */ IBMDStreamingAudioPacket *audioPacket) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE MPEG2TSPacketArrived( 

+            /* [in] */ IBMDStreamingMPEG2TSPacket *tsPacket) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE H264VideoInputConnectorScanningChanged( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE H264VideoInputConnectorChanged( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE H264VideoInputModeChanged( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingH264InputCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingH264InputCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingH264InputCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingH264InputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *H264NALPacketArrived )( 

+            IBMDStreamingH264InputCallback * This,

+            /* [in] */ IBMDStreamingH264NALPacket *nalPacket);

+        

+        HRESULT ( STDMETHODCALLTYPE *H264AudioPacketArrived )( 

+            IBMDStreamingH264InputCallback * This,

+            /* [in] */ IBMDStreamingAudioPacket *audioPacket);

+        

+        HRESULT ( STDMETHODCALLTYPE *MPEG2TSPacketArrived )( 

+            IBMDStreamingH264InputCallback * This,

+            /* [in] */ IBMDStreamingMPEG2TSPacket *tsPacket);

+        

+        HRESULT ( STDMETHODCALLTYPE *H264VideoInputConnectorScanningChanged )( 

+            IBMDStreamingH264InputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *H264VideoInputConnectorChanged )( 

+            IBMDStreamingH264InputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *H264VideoInputModeChanged )( 

+            IBMDStreamingH264InputCallback * This);

+        

+        END_INTERFACE

+    } IBMDStreamingH264InputCallbackVtbl;

+

+    interface IBMDStreamingH264InputCallback

+    {

+        CONST_VTBL struct IBMDStreamingH264InputCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingH264InputCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingH264InputCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingH264InputCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingH264InputCallback_H264NALPacketArrived(This,nalPacket)	\

+    ( (This)->lpVtbl -> H264NALPacketArrived(This,nalPacket) ) 

+

+#define IBMDStreamingH264InputCallback_H264AudioPacketArrived(This,audioPacket)	\

+    ( (This)->lpVtbl -> H264AudioPacketArrived(This,audioPacket) ) 

+

+#define IBMDStreamingH264InputCallback_MPEG2TSPacketArrived(This,tsPacket)	\

+    ( (This)->lpVtbl -> MPEG2TSPacketArrived(This,tsPacket) ) 

+

+#define IBMDStreamingH264InputCallback_H264VideoInputConnectorScanningChanged(This)	\

+    ( (This)->lpVtbl -> H264VideoInputConnectorScanningChanged(This) ) 

+

+#define IBMDStreamingH264InputCallback_H264VideoInputConnectorChanged(This)	\

+    ( (This)->lpVtbl -> H264VideoInputConnectorChanged(This) ) 

+

+#define IBMDStreamingH264InputCallback_H264VideoInputModeChanged(This)	\

+    ( (This)->lpVtbl -> H264VideoInputModeChanged(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingH264InputCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDiscovery_INTERFACE_DEFINED__

+#define __IBMDStreamingDiscovery_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingDiscovery */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingDiscovery;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("2C837444-F989-4D87-901A-47C8A36D096D")

+    IBMDStreamingDiscovery : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE InstallDeviceNotifications( 

+            /* [in] */ IBMDStreamingDeviceNotificationCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE UninstallDeviceNotifications( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingDiscoveryVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingDiscovery * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingDiscovery * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingDiscovery * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *InstallDeviceNotifications )( 

+            IBMDStreamingDiscovery * This,

+            /* [in] */ IBMDStreamingDeviceNotificationCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *UninstallDeviceNotifications )( 

+            IBMDStreamingDiscovery * This);

+        

+        END_INTERFACE

+    } IBMDStreamingDiscoveryVtbl;

+

+    interface IBMDStreamingDiscovery

+    {

+        CONST_VTBL struct IBMDStreamingDiscoveryVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingDiscovery_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingDiscovery_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingDiscovery_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingDiscovery_InstallDeviceNotifications(This,theCallback)	\

+    ( (This)->lpVtbl -> InstallDeviceNotifications(This,theCallback) ) 

+

+#define IBMDStreamingDiscovery_UninstallDeviceNotifications(This)	\

+    ( (This)->lpVtbl -> UninstallDeviceNotifications(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingDiscovery_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingVideoEncodingMode_INTERFACE_DEFINED__

+#define __IBMDStreamingVideoEncodingMode_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingVideoEncodingMode */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingVideoEncodingMode;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("1AB8035B-CD13-458D-B6DF-5E8F7C2141D9")

+    IBMDStreamingVideoEncodingMode : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetName( 

+            /* [out] */ BSTR *name) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetPresetID( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetSourcePositionX( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetSourcePositionY( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetSourceWidth( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetSourceHeight( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetDestWidth( void) = 0;

+        

+        virtual unsigned int STDMETHODCALLTYPE GetDestHeight( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFlag( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BOOL *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetInt( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ LONGLONG *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFloat( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ double *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BSTR *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateMutableVideoEncodingMode( 

+            /* [out] */ IBMDStreamingMutableVideoEncodingMode **newEncodingMode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingVideoEncodingModeVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetName )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [out] */ BSTR *name);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetPresetID )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourcePositionX )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourcePositionY )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourceWidth )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourceHeight )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetDestWidth )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetDestHeight )( 

+            IBMDStreamingVideoEncodingMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BSTR *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateMutableVideoEncodingMode )( 

+            IBMDStreamingVideoEncodingMode * This,

+            /* [out] */ IBMDStreamingMutableVideoEncodingMode **newEncodingMode);

+        

+        END_INTERFACE

+    } IBMDStreamingVideoEncodingModeVtbl;

+

+    interface IBMDStreamingVideoEncodingMode

+    {

+        CONST_VTBL struct IBMDStreamingVideoEncodingModeVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingVideoEncodingMode_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingVideoEncodingMode_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingVideoEncodingMode_GetName(This,name)	\

+    ( (This)->lpVtbl -> GetName(This,name) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetPresetID(This)	\

+    ( (This)->lpVtbl -> GetPresetID(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetSourcePositionX(This)	\

+    ( (This)->lpVtbl -> GetSourcePositionX(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetSourcePositionY(This)	\

+    ( (This)->lpVtbl -> GetSourcePositionY(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetSourceWidth(This)	\

+    ( (This)->lpVtbl -> GetSourceWidth(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetSourceHeight(This)	\

+    ( (This)->lpVtbl -> GetSourceHeight(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetDestWidth(This)	\

+    ( (This)->lpVtbl -> GetDestWidth(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetDestHeight(This)	\

+    ( (This)->lpVtbl -> GetDestHeight(This) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IBMDStreamingVideoEncodingMode_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#define IBMDStreamingVideoEncodingMode_CreateMutableVideoEncodingMode(This,newEncodingMode)	\

+    ( (This)->lpVtbl -> CreateMutableVideoEncodingMode(This,newEncodingMode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingVideoEncodingMode_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingMutableVideoEncodingMode_INTERFACE_DEFINED__

+#define __IBMDStreamingMutableVideoEncodingMode_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingMutableVideoEncodingMode */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingMutableVideoEncodingMode;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("19BF7D90-1E0A-400D-B2C6-FFC4E78AD49D")

+    IBMDStreamingMutableVideoEncodingMode : public IBMDStreamingVideoEncodingMode

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE SetSourceRect( 

+            /* [in] */ unsigned long posX,

+            /* [in] */ unsigned long posY,

+            /* [in] */ unsigned long width,

+            /* [in] */ unsigned long height) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetDestSize( 

+            /* [in] */ unsigned long width,

+            /* [in] */ unsigned long height) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFlag( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ BOOL value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetInt( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ LONGLONG value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFloat( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ double value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetString( 

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ BSTR value) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingMutableVideoEncodingModeVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetName )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [out] */ BSTR *name);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetPresetID )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourcePositionX )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourcePositionY )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourceWidth )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetSourceHeight )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetDestWidth )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        unsigned int ( STDMETHODCALLTYPE *GetDestHeight )( 

+            IBMDStreamingMutableVideoEncodingMode * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [out] */ BSTR *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateMutableVideoEncodingMode )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [out] */ IBMDStreamingMutableVideoEncodingMode **newEncodingMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetSourceRect )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ unsigned long posX,

+            /* [in] */ unsigned long posY,

+            /* [in] */ unsigned long width,

+            /* [in] */ unsigned long height);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetDestSize )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ unsigned long width,

+            /* [in] */ unsigned long height);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFlag )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ BOOL value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetInt )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ LONGLONG value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFloat )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ double value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetString )( 

+            IBMDStreamingMutableVideoEncodingMode * This,

+            /* [in] */ BMDStreamingEncodingModePropertyID cfgID,

+            /* [in] */ BSTR value);

+        

+        END_INTERFACE

+    } IBMDStreamingMutableVideoEncodingModeVtbl;

+

+    interface IBMDStreamingMutableVideoEncodingMode

+    {

+        CONST_VTBL struct IBMDStreamingMutableVideoEncodingModeVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingMutableVideoEncodingMode_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingMutableVideoEncodingMode_GetName(This,name)	\

+    ( (This)->lpVtbl -> GetName(This,name) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetPresetID(This)	\

+    ( (This)->lpVtbl -> GetPresetID(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetSourcePositionX(This)	\

+    ( (This)->lpVtbl -> GetSourcePositionX(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetSourcePositionY(This)	\

+    ( (This)->lpVtbl -> GetSourcePositionY(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetSourceWidth(This)	\

+    ( (This)->lpVtbl -> GetSourceWidth(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetSourceHeight(This)	\

+    ( (This)->lpVtbl -> GetSourceHeight(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetDestWidth(This)	\

+    ( (This)->lpVtbl -> GetDestWidth(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetDestHeight(This)	\

+    ( (This)->lpVtbl -> GetDestHeight(This) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_CreateMutableVideoEncodingMode(This,newEncodingMode)	\

+    ( (This)->lpVtbl -> CreateMutableVideoEncodingMode(This,newEncodingMode) ) 

+

+

+#define IBMDStreamingMutableVideoEncodingMode_SetSourceRect(This,posX,posY,width,height)	\

+    ( (This)->lpVtbl -> SetSourceRect(This,posX,posY,width,height) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_SetDestSize(This,width,height)	\

+    ( (This)->lpVtbl -> SetDestSize(This,width,height) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_SetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFlag(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_SetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetInt(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_SetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFloat(This,cfgID,value) ) 

+

+#define IBMDStreamingMutableVideoEncodingMode_SetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetString(This,cfgID,value) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingMutableVideoEncodingMode_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingVideoEncodingModePresetIterator_INTERFACE_DEFINED__

+#define __IBMDStreamingVideoEncodingModePresetIterator_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingVideoEncodingModePresetIterator */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingVideoEncodingModePresetIterator;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("7AC731A3-C950-4AD0-804A-8377AA51C6C4")

+    IBMDStreamingVideoEncodingModePresetIterator : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IBMDStreamingVideoEncodingMode **videoEncodingMode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingVideoEncodingModePresetIteratorVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingVideoEncodingModePresetIterator * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingVideoEncodingModePresetIterator * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingVideoEncodingModePresetIterator * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IBMDStreamingVideoEncodingModePresetIterator * This,

+            /* [out] */ IBMDStreamingVideoEncodingMode **videoEncodingMode);

+        

+        END_INTERFACE

+    } IBMDStreamingVideoEncodingModePresetIteratorVtbl;

+

+    interface IBMDStreamingVideoEncodingModePresetIterator

+    {

+        CONST_VTBL struct IBMDStreamingVideoEncodingModePresetIteratorVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingVideoEncodingModePresetIterator_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingVideoEncodingModePresetIterator_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingVideoEncodingModePresetIterator_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingVideoEncodingModePresetIterator_Next(This,videoEncodingMode)	\

+    ( (This)->lpVtbl -> Next(This,videoEncodingMode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingVideoEncodingModePresetIterator_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingDeviceInput_INTERFACE_DEFINED__

+#define __IBMDStreamingDeviceInput_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingDeviceInput */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingDeviceInput;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("24B6B6EC-1727-44BB-9818-34FF086ACF98")

+    IBMDStreamingDeviceInput : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoInputMode( 

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [out] */ BOOL *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoInputModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoInputMode( 

+            /* [in] */ BMDDisplayMode inputMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCurrentDetectedVideoInputMode( 

+            /* [out] */ BMDDisplayMode *detectedMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoEncodingMode( 

+            /* [out] */ IBMDStreamingVideoEncodingMode **encodingMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoEncodingModePresetIterator( 

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [out] */ IBMDStreamingVideoEncodingModePresetIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoEncodingMode( 

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [in] */ IBMDStreamingVideoEncodingMode *encodingMode,

+            /* [out] */ BMDStreamingEncodingSupport *result,

+            /* [out] */ IBMDStreamingVideoEncodingMode **changedEncodingMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoEncodingMode( 

+            /* [in] */ IBMDStreamingVideoEncodingMode *encodingMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartCapture( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopCapture( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IUnknown *theCallback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingDeviceInputVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingDeviceInput * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingDeviceInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoInputMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [out] */ BOOL *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoInputModeIterator )( 

+            IBMDStreamingDeviceInput * This,

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoInputMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ BMDDisplayMode inputMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCurrentDetectedVideoInputMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [out] */ BMDDisplayMode *detectedMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoEncodingMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [out] */ IBMDStreamingVideoEncodingMode **encodingMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoEncodingModePresetIterator )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [out] */ IBMDStreamingVideoEncodingModePresetIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoEncodingMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ BMDDisplayMode inputMode,

+            /* [in] */ IBMDStreamingVideoEncodingMode *encodingMode,

+            /* [out] */ BMDStreamingEncodingSupport *result,

+            /* [out] */ IBMDStreamingVideoEncodingMode **changedEncodingMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoEncodingMode )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ IBMDStreamingVideoEncodingMode *encodingMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 

+            IBMDStreamingDeviceInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopCapture )( 

+            IBMDStreamingDeviceInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IBMDStreamingDeviceInput * This,

+            /* [in] */ IUnknown *theCallback);

+        

+        END_INTERFACE

+    } IBMDStreamingDeviceInputVtbl;

+

+    interface IBMDStreamingDeviceInput

+    {

+        CONST_VTBL struct IBMDStreamingDeviceInputVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingDeviceInput_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingDeviceInput_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingDeviceInput_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingDeviceInput_DoesSupportVideoInputMode(This,inputMode,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoInputMode(This,inputMode,result) ) 

+

+#define IBMDStreamingDeviceInput_GetVideoInputModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetVideoInputModeIterator(This,iterator) ) 

+

+#define IBMDStreamingDeviceInput_SetVideoInputMode(This,inputMode)	\

+    ( (This)->lpVtbl -> SetVideoInputMode(This,inputMode) ) 

+

+#define IBMDStreamingDeviceInput_GetCurrentDetectedVideoInputMode(This,detectedMode)	\

+    ( (This)->lpVtbl -> GetCurrentDetectedVideoInputMode(This,detectedMode) ) 

+

+#define IBMDStreamingDeviceInput_GetVideoEncodingMode(This,encodingMode)	\

+    ( (This)->lpVtbl -> GetVideoEncodingMode(This,encodingMode) ) 

+

+#define IBMDStreamingDeviceInput_GetVideoEncodingModePresetIterator(This,inputMode,iterator)	\

+    ( (This)->lpVtbl -> GetVideoEncodingModePresetIterator(This,inputMode,iterator) ) 

+

+#define IBMDStreamingDeviceInput_DoesSupportVideoEncodingMode(This,inputMode,encodingMode,result,changedEncodingMode)	\

+    ( (This)->lpVtbl -> DoesSupportVideoEncodingMode(This,inputMode,encodingMode,result,changedEncodingMode) ) 

+

+#define IBMDStreamingDeviceInput_SetVideoEncodingMode(This,encodingMode)	\

+    ( (This)->lpVtbl -> SetVideoEncodingMode(This,encodingMode) ) 

+

+#define IBMDStreamingDeviceInput_StartCapture(This)	\

+    ( (This)->lpVtbl -> StartCapture(This) ) 

+

+#define IBMDStreamingDeviceInput_StopCapture(This)	\

+    ( (This)->lpVtbl -> StopCapture(This) ) 

+

+#define IBMDStreamingDeviceInput_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingDeviceInput_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264NALPacket_INTERFACE_DEFINED__

+#define __IBMDStreamingH264NALPacket_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingH264NALPacket */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingH264NALPacket;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("E260E955-14BE-4395-9775-9F02CC0A9D89")

+    IBMDStreamingH264NALPacket : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetPayloadSize( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytesWithSizePrefix( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayTime( 

+            /* [in] */ ULONGLONG requestedTimeScale,

+            /* [out] */ ULONGLONG *displayTime) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPacketIndex( 

+            /* [out] */ unsigned long *packetIndex) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingH264NALPacketVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingH264NALPacket * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingH264NALPacket * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingH264NALPacket * This);

+        

+        long ( STDMETHODCALLTYPE *GetPayloadSize )( 

+            IBMDStreamingH264NALPacket * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IBMDStreamingH264NALPacket * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytesWithSizePrefix )( 

+            IBMDStreamingH264NALPacket * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayTime )( 

+            IBMDStreamingH264NALPacket * This,

+            /* [in] */ ULONGLONG requestedTimeScale,

+            /* [out] */ ULONGLONG *displayTime);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPacketIndex )( 

+            IBMDStreamingH264NALPacket * This,

+            /* [out] */ unsigned long *packetIndex);

+        

+        END_INTERFACE

+    } IBMDStreamingH264NALPacketVtbl;

+

+    interface IBMDStreamingH264NALPacket

+    {

+        CONST_VTBL struct IBMDStreamingH264NALPacketVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingH264NALPacket_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingH264NALPacket_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingH264NALPacket_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingH264NALPacket_GetPayloadSize(This)	\

+    ( (This)->lpVtbl -> GetPayloadSize(This) ) 

+

+#define IBMDStreamingH264NALPacket_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IBMDStreamingH264NALPacket_GetBytesWithSizePrefix(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytesWithSizePrefix(This,buffer) ) 

+

+#define IBMDStreamingH264NALPacket_GetDisplayTime(This,requestedTimeScale,displayTime)	\

+    ( (This)->lpVtbl -> GetDisplayTime(This,requestedTimeScale,displayTime) ) 

+

+#define IBMDStreamingH264NALPacket_GetPacketIndex(This,packetIndex)	\

+    ( (This)->lpVtbl -> GetPacketIndex(This,packetIndex) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingH264NALPacket_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingAudioPacket_INTERFACE_DEFINED__

+#define __IBMDStreamingAudioPacket_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingAudioPacket */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingAudioPacket;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("D9EB5902-1AD2-43F4-9E2C-3CFA50B5EE19")

+    IBMDStreamingAudioPacket : public IUnknown

+    {

+    public:

+        virtual BMDStreamingAudioCodec STDMETHODCALLTYPE GetCodec( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetPayloadSize( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPlayTime( 

+            /* [in] */ ULONGLONG requestedTimeScale,

+            /* [out] */ ULONGLONG *playTime) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPacketIndex( 

+            /* [out] */ unsigned long *packetIndex) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingAudioPacketVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingAudioPacket * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingAudioPacket * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingAudioPacket * This);

+        

+        BMDStreamingAudioCodec ( STDMETHODCALLTYPE *GetCodec )( 

+            IBMDStreamingAudioPacket * This);

+        

+        long ( STDMETHODCALLTYPE *GetPayloadSize )( 

+            IBMDStreamingAudioPacket * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IBMDStreamingAudioPacket * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPlayTime )( 

+            IBMDStreamingAudioPacket * This,

+            /* [in] */ ULONGLONG requestedTimeScale,

+            /* [out] */ ULONGLONG *playTime);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPacketIndex )( 

+            IBMDStreamingAudioPacket * This,

+            /* [out] */ unsigned long *packetIndex);

+        

+        END_INTERFACE

+    } IBMDStreamingAudioPacketVtbl;

+

+    interface IBMDStreamingAudioPacket

+    {

+        CONST_VTBL struct IBMDStreamingAudioPacketVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingAudioPacket_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingAudioPacket_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingAudioPacket_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingAudioPacket_GetCodec(This)	\

+    ( (This)->lpVtbl -> GetCodec(This) ) 

+

+#define IBMDStreamingAudioPacket_GetPayloadSize(This)	\

+    ( (This)->lpVtbl -> GetPayloadSize(This) ) 

+

+#define IBMDStreamingAudioPacket_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IBMDStreamingAudioPacket_GetPlayTime(This,requestedTimeScale,playTime)	\

+    ( (This)->lpVtbl -> GetPlayTime(This,requestedTimeScale,playTime) ) 

+

+#define IBMDStreamingAudioPacket_GetPacketIndex(This,packetIndex)	\

+    ( (This)->lpVtbl -> GetPacketIndex(This,packetIndex) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingAudioPacket_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingMPEG2TSPacket_INTERFACE_DEFINED__

+#define __IBMDStreamingMPEG2TSPacket_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingMPEG2TSPacket */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingMPEG2TSPacket;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("91810D1C-4FB3-4AAA-AE56-FA301D3DFA4C")

+    IBMDStreamingMPEG2TSPacket : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetPayloadSize( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingMPEG2TSPacketVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingMPEG2TSPacket * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingMPEG2TSPacket * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingMPEG2TSPacket * This);

+        

+        long ( STDMETHODCALLTYPE *GetPayloadSize )( 

+            IBMDStreamingMPEG2TSPacket * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IBMDStreamingMPEG2TSPacket * This,

+            /* [out] */ void **buffer);

+        

+        END_INTERFACE

+    } IBMDStreamingMPEG2TSPacketVtbl;

+

+    interface IBMDStreamingMPEG2TSPacket

+    {

+        CONST_VTBL struct IBMDStreamingMPEG2TSPacketVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingMPEG2TSPacket_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingMPEG2TSPacket_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingMPEG2TSPacket_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingMPEG2TSPacket_GetPayloadSize(This)	\

+    ( (This)->lpVtbl -> GetPayloadSize(This) ) 

+

+#define IBMDStreamingMPEG2TSPacket_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingMPEG2TSPacket_INTERFACE_DEFINED__ */

+

+

+#ifndef __IBMDStreamingH264NALParser_INTERFACE_DEFINED__

+#define __IBMDStreamingH264NALParser_INTERFACE_DEFINED__

+

+/* interface IBMDStreamingH264NALParser */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IBMDStreamingH264NALParser;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("5867F18C-5BFA-4CCC-B2A7-9DFD140417D2")

+    IBMDStreamingH264NALParser : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE IsNALSequenceParameterSet( 

+            /* [in] */ IBMDStreamingH264NALPacket *nal) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsNALPictureParameterSet( 

+            /* [in] */ IBMDStreamingH264NALPacket *nal) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetProfileAndLevelFromSPS( 

+            /* [in] */ IBMDStreamingH264NALPacket *nal,

+            /* [out] */ unsigned long *profileIdc,

+            /* [out] */ unsigned long *profileCompatability,

+            /* [out] */ unsigned long *levelIdc) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IBMDStreamingH264NALParserVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IBMDStreamingH264NALParser * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IBMDStreamingH264NALParser * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IBMDStreamingH264NALParser * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsNALSequenceParameterSet )( 

+            IBMDStreamingH264NALParser * This,

+            /* [in] */ IBMDStreamingH264NALPacket *nal);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsNALPictureParameterSet )( 

+            IBMDStreamingH264NALParser * This,

+            /* [in] */ IBMDStreamingH264NALPacket *nal);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetProfileAndLevelFromSPS )( 

+            IBMDStreamingH264NALParser * This,

+            /* [in] */ IBMDStreamingH264NALPacket *nal,

+            /* [out] */ unsigned long *profileIdc,

+            /* [out] */ unsigned long *profileCompatability,

+            /* [out] */ unsigned long *levelIdc);

+        

+        END_INTERFACE

+    } IBMDStreamingH264NALParserVtbl;

+

+    interface IBMDStreamingH264NALParser

+    {

+        CONST_VTBL struct IBMDStreamingH264NALParserVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IBMDStreamingH264NALParser_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IBMDStreamingH264NALParser_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IBMDStreamingH264NALParser_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IBMDStreamingH264NALParser_IsNALSequenceParameterSet(This,nal)	\

+    ( (This)->lpVtbl -> IsNALSequenceParameterSet(This,nal) ) 

+

+#define IBMDStreamingH264NALParser_IsNALPictureParameterSet(This,nal)	\

+    ( (This)->lpVtbl -> IsNALPictureParameterSet(This,nal) ) 

+

+#define IBMDStreamingH264NALParser_GetProfileAndLevelFromSPS(This,nal,profileIdc,profileCompatability,levelIdc)	\

+    ( (This)->lpVtbl -> GetProfileAndLevelFromSPS(This,nal,profileIdc,profileCompatability,levelIdc) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IBMDStreamingH264NALParser_INTERFACE_DEFINED__ */

+

+

+EXTERN_C const CLSID CLSID_CBMDStreamingDiscovery;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("0CAA31F6-8A26-40B0-86A4-BF58DCCA710C")

+CBMDStreamingDiscovery;

+#endif

+

+EXTERN_C const CLSID CLSID_CBMDStreamingH264NALParser;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("7753EFBD-951C-407C-97A5-23C737B73B52")

+CBMDStreamingH264NALParser;

+#endif

+

+#ifndef __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__

+#define __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoOutputCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoOutputCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("20AA5225-1958-47CB-820B-80A8D521A6EE")

+    IDeckLinkVideoOutputCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 

+            /* [in] */ IDeckLinkVideoFrame *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoOutputCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoOutputCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoOutputCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoOutputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 

+            IDeckLinkVideoOutputCallback * This,

+            /* [in] */ IDeckLinkVideoFrame *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( 

+            IDeckLinkVideoOutputCallback * This);

+        

+        END_INTERFACE

+    } IDeckLinkVideoOutputCallbackVtbl;

+

+    interface IDeckLinkVideoOutputCallback

+    {

+        CONST_VTBL struct IDeckLinkVideoOutputCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoOutputCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoOutputCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoOutputCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoOutputCallback_ScheduledFrameCompleted(This,completedFrame,result)	\

+    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 

+

+#define IDeckLinkVideoOutputCallback_ScheduledPlaybackHasStopped(This)	\

+    ( (This)->lpVtbl -> ScheduledPlaybackHasStopped(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoOutputCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_INTERFACE_DEFINED__

+#define __IDeckLinkInputCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInputCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInputCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("DD04E5EC-7415-42AB-AE4A-E80C4DFC044A")

+    IDeckLinkInputCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 

+            /* [in] */ IDeckLinkVideoInputFrame *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInputCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInputCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInputCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 

+            IDeckLinkInputCallback * This,

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 

+            IDeckLinkInputCallback * This,

+            /* [in] */ IDeckLinkVideoInputFrame *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);

+        

+        END_INTERFACE

+    } IDeckLinkInputCallbackVtbl;

+

+    interface IDeckLinkInputCallback

+    {

+        CONST_VTBL struct IDeckLinkInputCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInputCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInputCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInputCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInputCallback_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\

+    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 

+

+#define IDeckLinkInputCallback_VideoInputFrameArrived(This,videoFrame,audioPacket)	\

+    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInputCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__

+#define __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__

+

+/* interface IDeckLinkMemoryAllocator */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkMemoryAllocator;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("B36EB6E7-9D29-4AA8-92EF-843B87A289E8")

+    IDeckLinkMemoryAllocator : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE AllocateBuffer( 

+            /* [in] */ unsigned long bufferSize,

+            /* [out] */ void **allocatedBuffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 

+            /* [in] */ void *buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Decommit( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkMemoryAllocatorVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkMemoryAllocator * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkMemoryAllocator * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkMemoryAllocator * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *AllocateBuffer )( 

+            IDeckLinkMemoryAllocator * This,

+            /* [in] */ unsigned long bufferSize,

+            /* [out] */ void **allocatedBuffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 

+            IDeckLinkMemoryAllocator * This,

+            /* [in] */ void *buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *Commit )( 

+            IDeckLinkMemoryAllocator * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Decommit )( 

+            IDeckLinkMemoryAllocator * This);

+        

+        END_INTERFACE

+    } IDeckLinkMemoryAllocatorVtbl;

+

+    interface IDeckLinkMemoryAllocator

+    {

+        CONST_VTBL struct IDeckLinkMemoryAllocatorVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkMemoryAllocator_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkMemoryAllocator_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkMemoryAllocator_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkMemoryAllocator_AllocateBuffer(This,bufferSize,allocatedBuffer)	\

+    ( (This)->lpVtbl -> AllocateBuffer(This,bufferSize,allocatedBuffer) ) 

+

+#define IDeckLinkMemoryAllocator_ReleaseBuffer(This,buffer)	\

+    ( (This)->lpVtbl -> ReleaseBuffer(This,buffer) ) 

+

+#define IDeckLinkMemoryAllocator_Commit(This)	\

+    ( (This)->lpVtbl -> Commit(This) ) 

+

+#define IDeckLinkMemoryAllocator_Decommit(This)	\

+    ( (This)->lpVtbl -> Decommit(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkMemoryAllocator_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__

+#define __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkAudioOutputCallback */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkAudioOutputCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("403C681B-7F46-4A12-B993-2BB127084EE6")

+    IDeckLinkAudioOutputCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE RenderAudioSamples( 

+            /* [in] */ BOOL preroll) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkAudioOutputCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkAudioOutputCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkAudioOutputCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkAudioOutputCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *RenderAudioSamples )( 

+            IDeckLinkAudioOutputCallback * This,

+            /* [in] */ BOOL preroll);

+        

+        END_INTERFACE

+    } IDeckLinkAudioOutputCallbackVtbl;

+

+    interface IDeckLinkAudioOutputCallback

+    {

+        CONST_VTBL struct IDeckLinkAudioOutputCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkAudioOutputCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkAudioOutputCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkAudioOutputCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkAudioOutputCallback_RenderAudioSamples(This,preroll)	\

+    ( (This)->lpVtbl -> RenderAudioSamples(This,preroll) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkAudioOutputCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkIterator_INTERFACE_DEFINED__

+#define __IDeckLinkIterator_INTERFACE_DEFINED__

+

+/* interface IDeckLinkIterator */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkIterator;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("50FB36CD-3063-4B73-BDBB-958087F2D8BA")

+    IDeckLinkIterator : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IDeckLink **deckLinkInstance) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkIteratorVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkIterator * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkIterator * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkIterator * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IDeckLinkIterator * This,

+            /* [out] */ IDeckLink **deckLinkInstance);

+        

+        END_INTERFACE

+    } IDeckLinkIteratorVtbl;

+

+    interface IDeckLinkIterator

+    {

+        CONST_VTBL struct IDeckLinkIteratorVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkIterator_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkIterator_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkIterator_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkIterator_Next(This,deckLinkInstance)	\

+    ( (This)->lpVtbl -> Next(This,deckLinkInstance) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkIterator_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkAPIInformation_INTERFACE_DEFINED__

+#define __IDeckLinkAPIInformation_INTERFACE_DEFINED__

+

+/* interface IDeckLinkAPIInformation */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkAPIInformation;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("7BEA3C68-730D-4322-AF34-8A7152B532A4")

+    IDeckLinkAPIInformation : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetFlag( 

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ BOOL *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetInt( 

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ LONGLONG *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFloat( 

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ double *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ BSTR *value) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkAPIInformationVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkAPIInformation * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkAPIInformation * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkAPIInformation * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IDeckLinkAPIInformation * This,

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IDeckLinkAPIInformation * This,

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IDeckLinkAPIInformation * This,

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkAPIInformation * This,

+            /* [in] */ BMDDeckLinkAPIInformationID cfgID,

+            /* [out] */ BSTR *value);

+        

+        END_INTERFACE

+    } IDeckLinkAPIInformationVtbl;

+

+    interface IDeckLinkAPIInformation

+    {

+        CONST_VTBL struct IDeckLinkAPIInformationVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkAPIInformation_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkAPIInformation_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkAPIInformation_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkAPIInformation_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkAPIInformation_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IDeckLinkAPIInformation_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkAPIInformation_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkAPIInformation_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_INTERFACE_DEFINED__

+#define __IDeckLinkOutput_INTERFACE_DEFINED__

+

+/* interface IDeckLinkOutput */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkOutput;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564")

+    IDeckLinkOutput : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoOutputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDVideoOutputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 

+            /* [in] */ long width,

+            /* [in] */ long height,

+            /* [in] */ long rowBytes,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeValue displayTime,

+            /* [in] */ BMDTimeValue displayDuration,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 

+            /* [out] */ unsigned long *bufferedFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount,

+            /* [in] */ BMDAudioOutputStreamType streamType) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [in] */ BMDTimeValue streamTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 

+            /* [in] */ BMDTimeValue playbackStartTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ double playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 

+            /* [in] */ BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 

+            /* [out] */ BOOL *active) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetScheduledStreamTime( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetReferenceStatus( 

+            /* [out] */ BMDReferenceStatus *referenceStatus) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFrameCompletionReferenceTimestamp( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *frameCompletionTimestamp) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkOutputVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkOutput * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkOutput * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoOutputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkOutput * This,

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDVideoOutputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 

+            IDeckLinkOutput * This,

+            /* [in] */ long width,

+            /* [in] */ long height,

+            /* [in] */ long rowBytes,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeValue displayTime,

+            /* [in] */ BMDTimeValue displayDuration,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 

+            IDeckLinkOutput * This,

+            /* [out] */ unsigned long *bufferedFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount,

+            /* [in] */ BMDAudioOutputStreamType streamType);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 

+            IDeckLinkOutput * This,

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 

+            IDeckLinkOutput * This,

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [in] */ BMDTimeValue streamTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkOutput * This,

+            /* [out] */ unsigned long *bufferedSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 

+            IDeckLinkOutput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDTimeValue playbackStartTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ double playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 

+            IDeckLinkOutput * This,

+            /* [out] */ BOOL *active);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetReferenceStatus )( 

+            IDeckLinkOutput * This,

+            /* [out] */ BMDReferenceStatus *referenceStatus);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkOutput * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameCompletionReferenceTimestamp )( 

+            IDeckLinkOutput * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *frameCompletionTimestamp);

+        

+        END_INTERFACE

+    } IDeckLinkOutputVtbl;

+

+    interface IDeckLinkOutput

+    {

+        CONST_VTBL struct IDeckLinkOutputVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkOutput_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkOutput_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkOutput_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkOutput_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 

+

+#define IDeckLinkOutput_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkOutput_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkOutput_EnableVideoOutput(This,displayMode,flags)	\

+    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 

+

+#define IDeckLinkOutput_DisableVideoOutput(This)	\

+    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 

+

+#define IDeckLinkOutput_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkOutput_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_CreateAncillaryData(This,pixelFormat,outBuffer)	\

+    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 

+

+#define IDeckLinkOutput_DisplayVideoFrameSync(This,theFrame)	\

+    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 

+

+#define IDeckLinkOutput_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\

+    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 

+

+#define IDeckLinkOutput_SetScheduledFrameCompletionCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 

+

+#define IDeckLinkOutput_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\

+    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 

+

+#define IDeckLinkOutput_DisableAudioOutput(This)	\

+    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 

+

+#define IDeckLinkOutput_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_BeginAudioPreroll(This)	\

+    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_EndAudioPreroll(This)	\

+    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 

+

+#define IDeckLinkOutput_FlushBufferedAudioSamples(This)	\

+    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 

+

+#define IDeckLinkOutput_SetAudioCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\

+    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 

+

+#define IDeckLinkOutput_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\

+    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 

+

+#define IDeckLinkOutput_IsScheduledPlaybackRunning(This,active)	\

+    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 

+

+#define IDeckLinkOutput_GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed)	\

+    ( (This)->lpVtbl -> GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed) ) 

+

+#define IDeckLinkOutput_GetReferenceStatus(This,referenceStatus)	\

+    ( (This)->lpVtbl -> GetReferenceStatus(This,referenceStatus) ) 

+

+#define IDeckLinkOutput_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#define IDeckLinkOutput_GetFrameCompletionReferenceTimestamp(This,theFrame,desiredTimeScale,frameCompletionTimestamp)	\

+    ( (This)->lpVtbl -> GetFrameCompletionReferenceTimestamp(This,theFrame,desiredTimeScale,frameCompletionTimestamp) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkOutput_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_INTERFACE_DEFINED__

+#define __IDeckLinkInput_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInput */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInput;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("AF22762B-DFAC-4846-AA79-FA8883560995")

+    IDeckLinkInput : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 

+            /* [out] */ unsigned long *availableFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoInputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 

+            /* [out] */ unsigned long *availableSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkInputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInputVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInput * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInput * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkInput * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkInput * This,

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkInput * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 

+            IDeckLinkInput * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 

+            IDeckLinkInput * This,

+            /* [out] */ unsigned long *availableFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoInputFrameMemoryAllocator )( 

+            IDeckLinkInput * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 

+            IDeckLinkInput * This,

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 

+            IDeckLinkInput * This,

+            /* [out] */ unsigned long *availableSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 

+            IDeckLinkInput * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkInput * This,

+            /* [in] */ IDeckLinkInputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkInput * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        END_INTERFACE

+    } IDeckLinkInputVtbl;

+

+    interface IDeckLinkInput

+    {

+        CONST_VTBL struct IDeckLinkInputVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInput_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInput_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInput_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInput_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 

+

+#define IDeckLinkInput_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkInput_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkInput_EnableVideoInput(This,displayMode,pixelFormat,flags)	\

+    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 

+

+#define IDeckLinkInput_DisableVideoInput(This)	\

+    ( (This)->lpVtbl -> DisableVideoInput(This) ) 

+

+#define IDeckLinkInput_GetAvailableVideoFrameCount(This,availableFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 

+

+#define IDeckLinkInput_SetVideoInputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoInputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkInput_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkInput_DisableAudioInput(This)	\

+    ( (This)->lpVtbl -> DisableAudioInput(This) ) 

+

+#define IDeckLinkInput_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 

+

+#define IDeckLinkInput_StartStreams(This)	\

+    ( (This)->lpVtbl -> StartStreams(This) ) 

+

+#define IDeckLinkInput_StopStreams(This)	\

+    ( (This)->lpVtbl -> StopStreams(This) ) 

+

+#define IDeckLinkInput_PauseStreams(This)	\

+    ( (This)->lpVtbl -> PauseStreams(This) ) 

+

+#define IDeckLinkInput_FlushStreams(This)	\

+    ( (This)->lpVtbl -> FlushStreams(This) ) 

+

+#define IDeckLinkInput_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#define IDeckLinkInput_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInput_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_INTERFACE_DEFINED__

+#define __IDeckLinkVideoFrame_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoFrame */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoFrame;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("3F716FE0-F023-4111-BE5D-EF4414C05B17")

+    IDeckLinkVideoFrame : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;

+        

+        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;

+        

+        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 

+            /* [in] */ BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode **timecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAncillaryData( 

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoFrameVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoFrame * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoFrame * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoFrame * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoFrame * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoFrame * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoFrame * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkVideoFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkVideoFrame * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        END_INTERFACE

+    } IDeckLinkVideoFrameVtbl;

+

+    interface IDeckLinkVideoFrame

+    {

+        CONST_VTBL struct IDeckLinkVideoFrameVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoFrame_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoFrame_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoFrame_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoFrame_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoFrame_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoFrame_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoFrame_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoFrame_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoFrame_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkVideoFrame_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkVideoFrame_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoFrame_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__

+#define __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__

+

+/* interface IDeckLinkMutableVideoFrame */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkMutableVideoFrame;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("69E2639F-40DA-4E19-B6F2-20ACE815C390")

+    IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE SetFlags( 

+            /* [in] */ BMDFrameFlags newFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetTimecode( 

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ IDeckLinkTimecode *timecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetTimecodeFromComponents( 

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ unsigned char hours,

+            /* [in] */ unsigned char minutes,

+            /* [in] */ unsigned char seconds,

+            /* [in] */ unsigned char frames,

+            /* [in] */ BMDTimecodeFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAncillaryData( 

+            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetTimecodeUserBits( 

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ BMDTimecodeUserBits userBits) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkMutableVideoFrameVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkMutableVideoFrame * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ BMDFrameFlags newFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetTimecode )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ IDeckLinkTimecode *timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ unsigned char hours,

+            /* [in] */ unsigned char minutes,

+            /* [in] */ unsigned char seconds,

+            /* [in] */ unsigned char frames,

+            /* [in] */ BMDTimecodeFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetTimecodeUserBits )( 

+            IDeckLinkMutableVideoFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [in] */ BMDTimecodeUserBits userBits);

+        

+        END_INTERFACE

+    } IDeckLinkMutableVideoFrameVtbl;

+

+    interface IDeckLinkMutableVideoFrame

+    {

+        CONST_VTBL struct IDeckLinkMutableVideoFrameVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkMutableVideoFrame_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkMutableVideoFrame_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkMutableVideoFrame_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkMutableVideoFrame_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkMutableVideoFrame_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkMutableVideoFrame_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkMutableVideoFrame_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkMutableVideoFrame_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkMutableVideoFrame_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkMutableVideoFrame_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkMutableVideoFrame_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+

+#define IDeckLinkMutableVideoFrame_SetFlags(This,newFlags)	\

+    ( (This)->lpVtbl -> SetFlags(This,newFlags) ) 

+

+#define IDeckLinkMutableVideoFrame_SetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> SetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkMutableVideoFrame_SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags)	\

+    ( (This)->lpVtbl -> SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags) ) 

+

+#define IDeckLinkMutableVideoFrame_SetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> SetAncillaryData(This,ancillary) ) 

+

+#define IDeckLinkMutableVideoFrame_SetTimecodeUserBits(This,format,userBits)	\

+    ( (This)->lpVtbl -> SetTimecodeUserBits(This,format,userBits) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkMutableVideoFrame_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__

+#define __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoFrame3DExtensions */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoFrame3DExtensions;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7")

+    IDeckLinkVideoFrame3DExtensions : public IUnknown

+    {

+    public:

+        virtual BMDVideo3DPackingFormat STDMETHODCALLTYPE Get3DPackingFormat( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFrameForRightEye( 

+            /* [out] */ IDeckLinkVideoFrame **rightEyeFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoFrame3DExtensionsVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoFrame3DExtensions * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoFrame3DExtensions * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoFrame3DExtensions * This);

+        

+        BMDVideo3DPackingFormat ( STDMETHODCALLTYPE *Get3DPackingFormat )( 

+            IDeckLinkVideoFrame3DExtensions * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameForRightEye )( 

+            IDeckLinkVideoFrame3DExtensions * This,

+            /* [out] */ IDeckLinkVideoFrame **rightEyeFrame);

+        

+        END_INTERFACE

+    } IDeckLinkVideoFrame3DExtensionsVtbl;

+

+    interface IDeckLinkVideoFrame3DExtensions

+    {

+        CONST_VTBL struct IDeckLinkVideoFrame3DExtensionsVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoFrame3DExtensions_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoFrame3DExtensions_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoFrame3DExtensions_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoFrame3DExtensions_Get3DPackingFormat(This)	\

+    ( (This)->lpVtbl -> Get3DPackingFormat(This) ) 

+

+#define IDeckLinkVideoFrame3DExtensions_GetFrameForRightEye(This,rightEyeFrame)	\

+    ( (This)->lpVtbl -> GetFrameForRightEye(This,rightEyeFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoFrame3DExtensions_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__

+#define __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoInputFrame */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoInputFrame;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("05CFE374-537C-4094-9A57-680525118F44")

+    IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceTimestamp( 

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoInputFrameVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoInputFrame * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [in] */ BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( 

+            IDeckLinkVideoInputFrame * This,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration);

+        

+        END_INTERFACE

+    } IDeckLinkVideoInputFrameVtbl;

+

+    interface IDeckLinkVideoInputFrame

+    {

+        CONST_VTBL struct IDeckLinkVideoInputFrameVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoInputFrame_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoInputFrame_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoInputFrame_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoInputFrame_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoInputFrame_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoInputFrame_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoInputFrame_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoInputFrame_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoInputFrame_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkVideoInputFrame_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkVideoInputFrame_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+

+#define IDeckLinkVideoInputFrame_GetStreamTime(This,frameTime,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 

+

+#define IDeckLinkVideoInputFrame_GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoInputFrame_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__

+#define __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoFrameAncillary */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoFrameAncillary;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("732E723C-D1A4-4E29-9E8E-4A88797A0004")

+    IDeckLinkVideoFrameAncillary : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetBufferForVerticalBlankingLine( 

+            /* [in] */ unsigned long lineNumber,

+            /* [out] */ void **buffer) = 0;

+        

+        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;

+        

+        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoFrameAncillaryVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoFrameAncillary * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoFrameAncillary * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoFrameAncillary * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferForVerticalBlankingLine )( 

+            IDeckLinkVideoFrameAncillary * This,

+            /* [in] */ unsigned long lineNumber,

+            /* [out] */ void **buffer);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoFrameAncillary * This);

+        

+        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 

+            IDeckLinkVideoFrameAncillary * This);

+        

+        END_INTERFACE

+    } IDeckLinkVideoFrameAncillaryVtbl;

+

+    interface IDeckLinkVideoFrameAncillary

+    {

+        CONST_VTBL struct IDeckLinkVideoFrameAncillaryVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoFrameAncillary_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoFrameAncillary_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoFrameAncillary_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoFrameAncillary_GetBufferForVerticalBlankingLine(This,lineNumber,buffer)	\

+    ( (This)->lpVtbl -> GetBufferForVerticalBlankingLine(This,lineNumber,buffer) ) 

+

+#define IDeckLinkVideoFrameAncillary_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoFrameAncillary_GetDisplayMode(This)	\

+    ( (This)->lpVtbl -> GetDisplayMode(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoFrameAncillary_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__

+#define __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__

+

+/* interface IDeckLinkAudioInputPacket */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkAudioInputPacket;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("E43D5870-2894-11DE-8C30-0800200C9A66")

+    IDeckLinkAudioInputPacket : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetSampleFrameCount( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPacketTime( 

+            /* [out] */ BMDTimeValue *packetTime,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkAudioInputPacketVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkAudioInputPacket * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkAudioInputPacket * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkAudioInputPacket * This);

+        

+        long ( STDMETHODCALLTYPE *GetSampleFrameCount )( 

+            IDeckLinkAudioInputPacket * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkAudioInputPacket * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPacketTime )( 

+            IDeckLinkAudioInputPacket * This,

+            /* [out] */ BMDTimeValue *packetTime,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        END_INTERFACE

+    } IDeckLinkAudioInputPacketVtbl;

+

+    interface IDeckLinkAudioInputPacket

+    {

+        CONST_VTBL struct IDeckLinkAudioInputPacketVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkAudioInputPacket_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkAudioInputPacket_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkAudioInputPacket_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkAudioInputPacket_GetSampleFrameCount(This)	\

+    ( (This)->lpVtbl -> GetSampleFrameCount(This) ) 

+

+#define IDeckLinkAudioInputPacket_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkAudioInputPacket_GetPacketTime(This,packetTime,timeScale)	\

+    ( (This)->lpVtbl -> GetPacketTime(This,packetTime,timeScale) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkAudioInputPacket_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__

+#define __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkScreenPreviewCallback */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438")

+    IDeckLinkScreenPreviewCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DrawFrame( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkScreenPreviewCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkScreenPreviewCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkScreenPreviewCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkScreenPreviewCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DrawFrame )( 

+            IDeckLinkScreenPreviewCallback * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame);

+        

+        END_INTERFACE

+    } IDeckLinkScreenPreviewCallbackVtbl;

+

+    interface IDeckLinkScreenPreviewCallback

+    {

+        CONST_VTBL struct IDeckLinkScreenPreviewCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkScreenPreviewCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkScreenPreviewCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkScreenPreviewCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkScreenPreviewCallback_DrawFrame(This,theFrame)	\

+    ( (This)->lpVtbl -> DrawFrame(This,theFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkScreenPreviewCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__

+#define __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__

+

+/* interface IDeckLinkGLScreenPreviewHelper */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("504E2209-CAC7-4C1A-9FB4-C5BB6274D22F")

+    IDeckLinkGLScreenPreviewHelper : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE InitializeGL( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PaintGL( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFrame( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Set3DPreviewFormat( 

+            /* [in] */ BMD3DPreviewFormat previewFormat) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkGLScreenPreviewHelperVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkGLScreenPreviewHelper * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkGLScreenPreviewHelper * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkGLScreenPreviewHelper * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *InitializeGL )( 

+            IDeckLinkGLScreenPreviewHelper * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PaintGL )( 

+            IDeckLinkGLScreenPreviewHelper * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFrame )( 

+            IDeckLinkGLScreenPreviewHelper * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *Set3DPreviewFormat )( 

+            IDeckLinkGLScreenPreviewHelper * This,

+            /* [in] */ BMD3DPreviewFormat previewFormat);

+        

+        END_INTERFACE

+    } IDeckLinkGLScreenPreviewHelperVtbl;

+

+    interface IDeckLinkGLScreenPreviewHelper

+    {

+        CONST_VTBL struct IDeckLinkGLScreenPreviewHelperVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkGLScreenPreviewHelper_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkGLScreenPreviewHelper_InitializeGL(This)	\

+    ( (This)->lpVtbl -> InitializeGL(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_PaintGL(This)	\

+    ( (This)->lpVtbl -> PaintGL(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_SetFrame(This,theFrame)	\

+    ( (This)->lpVtbl -> SetFrame(This,theFrame) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_Set3DPreviewFormat(This,previewFormat)	\

+    ( (This)->lpVtbl -> Set3DPreviewFormat(This,previewFormat) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkGLScreenPreviewHelper_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDX9ScreenPreviewHelper_INTERFACE_DEFINED__

+#define __IDeckLinkDX9ScreenPreviewHelper_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDX9ScreenPreviewHelper */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDX9ScreenPreviewHelper;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("2094B522-D1A1-40C0-9AC7-1C012218EF02")

+    IDeckLinkDX9ScreenPreviewHelper : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Initialize( 

+            /* [in] */ void *device) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Render( 

+            /* [in] */ RECT *rc) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFrame( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Set3DPreviewFormat( 

+            /* [in] */ BMD3DPreviewFormat previewFormat) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDX9ScreenPreviewHelperVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDX9ScreenPreviewHelper * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDX9ScreenPreviewHelper * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDX9ScreenPreviewHelper * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Initialize )( 

+            IDeckLinkDX9ScreenPreviewHelper * This,

+            /* [in] */ void *device);

+        

+        HRESULT ( STDMETHODCALLTYPE *Render )( 

+            IDeckLinkDX9ScreenPreviewHelper * This,

+            /* [in] */ RECT *rc);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFrame )( 

+            IDeckLinkDX9ScreenPreviewHelper * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *Set3DPreviewFormat )( 

+            IDeckLinkDX9ScreenPreviewHelper * This,

+            /* [in] */ BMD3DPreviewFormat previewFormat);

+        

+        END_INTERFACE

+    } IDeckLinkDX9ScreenPreviewHelperVtbl;

+

+    interface IDeckLinkDX9ScreenPreviewHelper

+    {

+        CONST_VTBL struct IDeckLinkDX9ScreenPreviewHelperVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDX9ScreenPreviewHelper_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDX9ScreenPreviewHelper_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDX9ScreenPreviewHelper_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDX9ScreenPreviewHelper_Initialize(This,device)	\

+    ( (This)->lpVtbl -> Initialize(This,device) ) 

+

+#define IDeckLinkDX9ScreenPreviewHelper_Render(This,rc)	\

+    ( (This)->lpVtbl -> Render(This,rc) ) 

+

+#define IDeckLinkDX9ScreenPreviewHelper_SetFrame(This,theFrame)	\

+    ( (This)->lpVtbl -> SetFrame(This,theFrame) ) 

+

+#define IDeckLinkDX9ScreenPreviewHelper_Set3DPreviewFormat(This,previewFormat)	\

+    ( (This)->lpVtbl -> Set3DPreviewFormat(This,previewFormat) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDX9ScreenPreviewHelper_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkNotificationCallback_INTERFACE_DEFINED__

+#define __IDeckLinkNotificationCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkNotificationCallback */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkNotificationCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("b002a1ec-070d-4288-8289-bd5d36e5ff0d")

+    IDeckLinkNotificationCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Notify( 

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ ULONGLONG param1,

+            /* [in] */ ULONGLONG param2) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkNotificationCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkNotificationCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkNotificationCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkNotificationCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Notify )( 

+            IDeckLinkNotificationCallback * This,

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ ULONGLONG param1,

+            /* [in] */ ULONGLONG param2);

+        

+        END_INTERFACE

+    } IDeckLinkNotificationCallbackVtbl;

+

+    interface IDeckLinkNotificationCallback

+    {

+        CONST_VTBL struct IDeckLinkNotificationCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkNotificationCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkNotificationCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkNotificationCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkNotificationCallback_Notify(This,topic,param1,param2)	\

+    ( (This)->lpVtbl -> Notify(This,topic,param1,param2) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkNotificationCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkNotification_INTERFACE_DEFINED__

+#define __IDeckLinkNotification_INTERFACE_DEFINED__

+

+/* interface IDeckLinkNotification */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkNotification;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("0a1fb207-e215-441b-9b19-6fa1575946c5")

+    IDeckLinkNotification : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Subscribe( 

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ IDeckLinkNotificationCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Unsubscribe( 

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ IDeckLinkNotificationCallback *theCallback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkNotificationVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkNotification * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkNotification * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkNotification * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Subscribe )( 

+            IDeckLinkNotification * This,

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ IDeckLinkNotificationCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *Unsubscribe )( 

+            IDeckLinkNotification * This,

+            /* [in] */ BMDNotifications topic,

+            /* [in] */ IDeckLinkNotificationCallback *theCallback);

+        

+        END_INTERFACE

+    } IDeckLinkNotificationVtbl;

+

+    interface IDeckLinkNotification

+    {

+        CONST_VTBL struct IDeckLinkNotificationVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkNotification_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkNotification_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkNotification_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkNotification_Subscribe(This,topic,theCallback)	\

+    ( (This)->lpVtbl -> Subscribe(This,topic,theCallback) ) 

+

+#define IDeckLinkNotification_Unsubscribe(This,topic,theCallback)	\

+    ( (This)->lpVtbl -> Unsubscribe(This,topic,theCallback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkNotification_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkAttributes_INTERFACE_DEFINED__

+#define __IDeckLinkAttributes_INTERFACE_DEFINED__

+

+/* interface IDeckLinkAttributes */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkAttributes;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("ABC11843-D966-44CB-96E2-A1CB5D3135C4")

+    IDeckLinkAttributes : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetFlag( 

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ BOOL *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetInt( 

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ LONGLONG *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFloat( 

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ double *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ BSTR *value) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkAttributesVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkAttributes * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkAttributes * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkAttributes * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IDeckLinkAttributes * This,

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IDeckLinkAttributes * This,

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IDeckLinkAttributes * This,

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkAttributes * This,

+            /* [in] */ BMDDeckLinkAttributeID cfgID,

+            /* [out] */ BSTR *value);

+        

+        END_INTERFACE

+    } IDeckLinkAttributesVtbl;

+

+    interface IDeckLinkAttributes

+    {

+        CONST_VTBL struct IDeckLinkAttributesVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkAttributes_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkAttributes_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkAttributes_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkAttributes_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkAttributes_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IDeckLinkAttributes_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkAttributes_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkAttributes_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkKeyer_INTERFACE_DEFINED__

+#define __IDeckLinkKeyer_INTERFACE_DEFINED__

+

+/* interface IDeckLinkKeyer */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkKeyer;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3")

+    IDeckLinkKeyer : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Enable( 

+            /* [in] */ BOOL isExternal) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetLevel( 

+            /* [in] */ unsigned char level) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE RampUp( 

+            /* [in] */ unsigned long numberOfFrames) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE RampDown( 

+            /* [in] */ unsigned long numberOfFrames) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Disable( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkKeyerVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkKeyer * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkKeyer * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkKeyer * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Enable )( 

+            IDeckLinkKeyer * This,

+            /* [in] */ BOOL isExternal);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetLevel )( 

+            IDeckLinkKeyer * This,

+            /* [in] */ unsigned char level);

+        

+        HRESULT ( STDMETHODCALLTYPE *RampUp )( 

+            IDeckLinkKeyer * This,

+            /* [in] */ unsigned long numberOfFrames);

+        

+        HRESULT ( STDMETHODCALLTYPE *RampDown )( 

+            IDeckLinkKeyer * This,

+            /* [in] */ unsigned long numberOfFrames);

+        

+        HRESULT ( STDMETHODCALLTYPE *Disable )( 

+            IDeckLinkKeyer * This);

+        

+        END_INTERFACE

+    } IDeckLinkKeyerVtbl;

+

+    interface IDeckLinkKeyer

+    {

+        CONST_VTBL struct IDeckLinkKeyerVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkKeyer_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkKeyer_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkKeyer_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkKeyer_Enable(This,isExternal)	\

+    ( (This)->lpVtbl -> Enable(This,isExternal) ) 

+

+#define IDeckLinkKeyer_SetLevel(This,level)	\

+    ( (This)->lpVtbl -> SetLevel(This,level) ) 

+

+#define IDeckLinkKeyer_RampUp(This,numberOfFrames)	\

+    ( (This)->lpVtbl -> RampUp(This,numberOfFrames) ) 

+

+#define IDeckLinkKeyer_RampDown(This,numberOfFrames)	\

+    ( (This)->lpVtbl -> RampDown(This,numberOfFrames) ) 

+

+#define IDeckLinkKeyer_Disable(This)	\

+    ( (This)->lpVtbl -> Disable(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkKeyer_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoConversion_INTERFACE_DEFINED__

+#define __IDeckLinkVideoConversion_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoConversion */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoConversion;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("3BBCB8A2-DA2C-42D9-B5D8-88083644E99A")

+    IDeckLinkVideoConversion : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE ConvertFrame( 

+            /* [in] */ IDeckLinkVideoFrame *srcFrame,

+            /* [in] */ IDeckLinkVideoFrame *dstFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoConversionVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoConversion * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoConversion * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoConversion * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( 

+            IDeckLinkVideoConversion * This,

+            /* [in] */ IDeckLinkVideoFrame *srcFrame,

+            /* [in] */ IDeckLinkVideoFrame *dstFrame);

+        

+        END_INTERFACE

+    } IDeckLinkVideoConversionVtbl;

+

+    interface IDeckLinkVideoConversion

+    {

+        CONST_VTBL struct IDeckLinkVideoConversionVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoConversion_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoConversion_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoConversion_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoConversion_ConvertFrame(This,srcFrame,dstFrame)	\

+    ( (This)->lpVtbl -> ConvertFrame(This,srcFrame,dstFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoConversion_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeviceNotificationCallback_INTERFACE_DEFINED__

+#define __IDeckLinkDeviceNotificationCallback_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeviceNotificationCallback */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeviceNotificationCallback;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("4997053B-0ADF-4CC8-AC70-7A50C4BE728F")

+    IDeckLinkDeviceNotificationCallback : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DeckLinkDeviceArrived( 

+            /* [in] */ IDeckLink *deckLinkDevice) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DeckLinkDeviceRemoved( 

+            /* [in] */ IDeckLink *deckLinkDevice) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeviceNotificationCallbackVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeviceNotificationCallback * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeviceNotificationCallback * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeviceNotificationCallback * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckLinkDeviceArrived )( 

+            IDeckLinkDeviceNotificationCallback * This,

+            /* [in] */ IDeckLink *deckLinkDevice);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckLinkDeviceRemoved )( 

+            IDeckLinkDeviceNotificationCallback * This,

+            /* [in] */ IDeckLink *deckLinkDevice);

+        

+        END_INTERFACE

+    } IDeckLinkDeviceNotificationCallbackVtbl;

+

+    interface IDeckLinkDeviceNotificationCallback

+    {

+        CONST_VTBL struct IDeckLinkDeviceNotificationCallbackVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeviceNotificationCallback_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeviceNotificationCallback_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeviceNotificationCallback_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeviceNotificationCallback_DeckLinkDeviceArrived(This,deckLinkDevice)	\

+    ( (This)->lpVtbl -> DeckLinkDeviceArrived(This,deckLinkDevice) ) 

+

+#define IDeckLinkDeviceNotificationCallback_DeckLinkDeviceRemoved(This,deckLinkDevice)	\

+    ( (This)->lpVtbl -> DeckLinkDeviceRemoved(This,deckLinkDevice) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeviceNotificationCallback_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDiscovery_INTERFACE_DEFINED__

+#define __IDeckLinkDiscovery_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDiscovery */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDiscovery;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("CDBF631C-BC76-45FA-B44D-C55059BC6101")

+    IDeckLinkDiscovery : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE InstallDeviceNotifications( 

+            /* [in] */ IDeckLinkDeviceNotificationCallback *deviceNotificationCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE UninstallDeviceNotifications( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDiscoveryVtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDiscovery * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDiscovery * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDiscovery * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *InstallDeviceNotifications )( 

+            IDeckLinkDiscovery * This,

+            /* [in] */ IDeckLinkDeviceNotificationCallback *deviceNotificationCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *UninstallDeviceNotifications )( 

+            IDeckLinkDiscovery * This);

+        

+        END_INTERFACE

+    } IDeckLinkDiscoveryVtbl;

+

+    interface IDeckLinkDiscovery

+    {

+        CONST_VTBL struct IDeckLinkDiscoveryVtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDiscovery_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDiscovery_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDiscovery_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDiscovery_InstallDeviceNotifications(This,deviceNotificationCallback)	\

+    ( (This)->lpVtbl -> InstallDeviceNotifications(This,deviceNotificationCallback) ) 

+

+#define IDeckLinkDiscovery_UninstallDeviceNotifications(This)	\

+    ( (This)->lpVtbl -> UninstallDeviceNotifications(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDiscovery_INTERFACE_DEFINED__ */

+

+

+EXTERN_C const CLSID CLSID_CDeckLinkIterator;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("1F2E109A-8F4F-49E4-9203-135595CB6FA5")

+CDeckLinkIterator;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkAPIInformation;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("263CA19F-ED09-482E-9F9D-84005783A237")

+CDeckLinkAPIInformation;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("F63E77C7-B655-4A4A-9AD0-3CA85D394343")

+CDeckLinkGLScreenPreviewHelper;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkDX9ScreenPreviewHelper;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("CC010023-E01D-4525-9D59-80C8AB3DC7A0")

+CDeckLinkDX9ScreenPreviewHelper;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkVideoConversion;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("7DBBBB11-5B7B-467D-AEA4-CEA468FD368C")

+CDeckLinkVideoConversion;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkDiscovery;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("1073A05C-D885-47E9-B3C6-129B3F9F648B")

+CDeckLinkDiscovery;

+#endif

+

+#ifndef __IDeckLinkConfiguration_v10_2_INTERFACE_DEFINED__

+#define __IDeckLinkConfiguration_v10_2_INTERFACE_DEFINED__

+

+/* interface IDeckLinkConfiguration_v10_2 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkConfiguration_v10_2;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("C679A35B-610C-4D09-B748-1D0478100FC0")

+    IDeckLinkConfiguration_v10_2 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE SetFlag( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BOOL value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFlag( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BOOL *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetInt( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ LONGLONG value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetInt( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ LONGLONG *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFloat( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ double value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFloat( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ double *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetString( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BSTR value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BSTR *value) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteConfigurationToPreferences( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkConfiguration_v10_2Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkConfiguration_v10_2 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkConfiguration_v10_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFlag )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BOOL value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFlag )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BOOL *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetInt )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ LONGLONG value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetInt )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ LONGLONG *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFloat )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ double value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFloat )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ double *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetString )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [in] */ BSTR value);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkConfiguration_v10_2 * This,

+            /* [in] */ BMDDeckLinkConfigurationID cfgID,

+            /* [out] */ BSTR *value);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( 

+            IDeckLinkConfiguration_v10_2 * This);

+        

+        END_INTERFACE

+    } IDeckLinkConfiguration_v10_2Vtbl;

+

+    interface IDeckLinkConfiguration_v10_2

+    {

+        CONST_VTBL struct IDeckLinkConfiguration_v10_2Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkConfiguration_v10_2_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkConfiguration_v10_2_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkConfiguration_v10_2_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkConfiguration_v10_2_SetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_GetFlag(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFlag(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_SetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetInt(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_GetInt(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetInt(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_SetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_GetFloat(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetFloat(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_SetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> SetString(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_GetString(This,cfgID,value)	\

+    ( (This)->lpVtbl -> GetString(This,cfgID,value) ) 

+

+#define IDeckLinkConfiguration_v10_2_WriteConfigurationToPreferences(This)	\

+    ( (This)->lpVtbl -> WriteConfigurationToPreferences(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkConfiguration_v10_2_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v9_9_INTERFACE_DEFINED__

+#define __IDeckLinkOutput_v9_9_INTERFACE_DEFINED__

+

+/* interface IDeckLinkOutput_v9_9 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkOutput_v9_9;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("A3EF0963-0862-44ED-92A9-EE89ABF431C7")

+    IDeckLinkOutput_v9_9 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoOutputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDVideoOutputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 

+            /* [in] */ long width,

+            /* [in] */ long height,

+            /* [in] */ long rowBytes,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeValue displayTime,

+            /* [in] */ BMDTimeValue displayDuration,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 

+            /* [out] */ unsigned long *bufferedFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount,

+            /* [in] */ BMDAudioOutputStreamType streamType) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [in] */ BMDTimeValue streamTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 

+            /* [in] */ BMDTimeValue playbackStartTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ double playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 

+            /* [in] */ BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            /* [in] */ BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 

+            /* [out] */ BOOL *active) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetScheduledStreamTime( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetReferenceStatus( 

+            /* [out] */ BMDReferenceStatus *referenceStatus) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkOutput_v9_9Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoOutputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDVideoOutputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ long width,

+            /* [in] */ long height,

+            /* [in] */ long rowBytes,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkVideoFrame *theFrame,

+            /* [in] */ BMDTimeValue displayTime,

+            /* [in] */ BMDTimeValue displayDuration,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [out] */ unsigned long *bufferedFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount,

+            /* [in] */ BMDAudioOutputStreamType streamType);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ void *buffer,

+            /* [in] */ unsigned long sampleFrameCount,

+            /* [in] */ BMDTimeValue streamTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [out] */ unsigned long *bufferedSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 

+            IDeckLinkOutput_v9_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDTimeValue playbackStartTime,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ double playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            /* [in] */ BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [out] */ BOOL *active);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetReferenceStatus )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [out] */ BMDReferenceStatus *referenceStatus);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkOutput_v9_9 * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        END_INTERFACE

+    } IDeckLinkOutput_v9_9Vtbl;

+

+    interface IDeckLinkOutput_v9_9

+    {

+        CONST_VTBL struct IDeckLinkOutput_v9_9Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkOutput_v9_9_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkOutput_v9_9_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkOutput_v9_9_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkOutput_v9_9_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 

+

+#define IDeckLinkOutput_v9_9_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkOutput_v9_9_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkOutput_v9_9_EnableVideoOutput(This,displayMode,flags)	\

+    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 

+

+#define IDeckLinkOutput_v9_9_DisableVideoOutput(This)	\

+    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 

+

+#define IDeckLinkOutput_v9_9_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkOutput_v9_9_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_v9_9_CreateAncillaryData(This,pixelFormat,outBuffer)	\

+    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 

+

+#define IDeckLinkOutput_v9_9_DisplayVideoFrameSync(This,theFrame)	\

+    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 

+

+#define IDeckLinkOutput_v9_9_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\

+    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 

+

+#define IDeckLinkOutput_v9_9_SetScheduledFrameCompletionCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v9_9_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 

+

+#define IDeckLinkOutput_v9_9_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\

+    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 

+

+#define IDeckLinkOutput_v9_9_DisableAudioOutput(This)	\

+    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 

+

+#define IDeckLinkOutput_v9_9_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v9_9_BeginAudioPreroll(This)	\

+    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v9_9_EndAudioPreroll(This)	\

+    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v9_9_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v9_9_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 

+

+#define IDeckLinkOutput_v9_9_FlushBufferedAudioSamples(This)	\

+    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 

+

+#define IDeckLinkOutput_v9_9_SetAudioCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v9_9_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\

+    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v9_9_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\

+    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 

+

+#define IDeckLinkOutput_v9_9_IsScheduledPlaybackRunning(This,active)	\

+    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 

+

+#define IDeckLinkOutput_v9_9_GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed)	\

+    ( (This)->lpVtbl -> GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v9_9_GetReferenceStatus(This,referenceStatus)	\

+    ( (This)->lpVtbl -> GetReferenceStatus(This,referenceStatus) ) 

+

+#define IDeckLinkOutput_v9_9_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkOutput_v9_9_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v9_2_INTERFACE_DEFINED__

+#define __IDeckLinkInput_v9_2_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInput_v9_2 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInput_v9_2;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("6D40EF78-28B9-4E21-990D-95BB7750A04F")

+    IDeckLinkInput_v9_2 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 

+            /* [out] */ unsigned long *availableFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 

+            /* [out] */ unsigned long *availableSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkInputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInput_v9_2Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags,

+            /* [out] */ BMDDisplayModeSupport *result,

+            /* [out] */ IDeckLinkDisplayMode **resultDisplayMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ BMDDisplayMode displayMode,

+            /* [in] */ BMDPixelFormat pixelFormat,

+            /* [in] */ BMDVideoInputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [out] */ unsigned long *availableFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ BMDAudioSampleRate sampleRate,

+            /* [in] */ BMDAudioSampleType sampleType,

+            /* [in] */ unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [out] */ unsigned long *availableSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 

+            IDeckLinkInput_v9_2 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ IDeckLinkInputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkInput_v9_2 * This,

+            /* [in] */ BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        END_INTERFACE

+    } IDeckLinkInput_v9_2Vtbl;

+

+    interface IDeckLinkInput_v9_2

+    {

+        CONST_VTBL struct IDeckLinkInput_v9_2Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInput_v9_2_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInput_v9_2_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInput_v9_2_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInput_v9_2_DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,flags,result,resultDisplayMode) ) 

+

+#define IDeckLinkInput_v9_2_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkInput_v9_2_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkInput_v9_2_EnableVideoInput(This,displayMode,pixelFormat,flags)	\

+    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 

+

+#define IDeckLinkInput_v9_2_DisableVideoInput(This)	\

+    ( (This)->lpVtbl -> DisableVideoInput(This) ) 

+

+#define IDeckLinkInput_v9_2_GetAvailableVideoFrameCount(This,availableFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 

+

+#define IDeckLinkInput_v9_2_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkInput_v9_2_DisableAudioInput(This)	\

+    ( (This)->lpVtbl -> DisableAudioInput(This) ) 

+

+#define IDeckLinkInput_v9_2_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 

+

+#define IDeckLinkInput_v9_2_StartStreams(This)	\

+    ( (This)->lpVtbl -> StartStreams(This) ) 

+

+#define IDeckLinkInput_v9_2_StopStreams(This)	\

+    ( (This)->lpVtbl -> StopStreams(This) ) 

+

+#define IDeckLinkInput_v9_2_PauseStreams(This)	\

+    ( (This)->lpVtbl -> PauseStreams(This) ) 

+

+#define IDeckLinkInput_v9_2_FlushStreams(This)	\

+    ( (This)->lpVtbl -> FlushStreams(This) ) 

+

+#define IDeckLinkInput_v9_2_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#define IDeckLinkInput_v9_2_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInput_v9_2_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControlStatusCallback_v8_1_INTERFACE_DEFINED__

+#define __IDeckLinkDeckControlStatusCallback_v8_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeckControlStatusCallback_v8_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeckControlStatusCallback_v8_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("E5F693C1-4283-4716-B18F-C1431521955B")

+    IDeckLinkDeckControlStatusCallback_v8_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE TimecodeUpdate( 

+            /* [in] */ BMDTimecodeBCD currentTimecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE VTRControlStateChanged( 

+            /* [in] */ BMDDeckControlVTRControlState_v8_1 newState,

+            /* [in] */ BMDDeckControlError error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DeckControlEventReceived( 

+            /* [in] */ BMDDeckControlEvent event,

+            /* [in] */ BMDDeckControlError error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DeckControlStatusChanged( 

+            /* [in] */ BMDDeckControlStatusFlags flags,

+            /* [in] */ unsigned long mask) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeckControlStatusCallback_v8_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *TimecodeUpdate )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This,

+            /* [in] */ BMDTimecodeBCD currentTimecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *VTRControlStateChanged )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This,

+            /* [in] */ BMDDeckControlVTRControlState_v8_1 newState,

+            /* [in] */ BMDDeckControlError error);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckControlEventReceived )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This,

+            /* [in] */ BMDDeckControlEvent event,

+            /* [in] */ BMDDeckControlError error);

+        

+        HRESULT ( STDMETHODCALLTYPE *DeckControlStatusChanged )( 

+            IDeckLinkDeckControlStatusCallback_v8_1 * This,

+            /* [in] */ BMDDeckControlStatusFlags flags,

+            /* [in] */ unsigned long mask);

+        

+        END_INTERFACE

+    } IDeckLinkDeckControlStatusCallback_v8_1Vtbl;

+

+    interface IDeckLinkDeckControlStatusCallback_v8_1

+    {

+        CONST_VTBL struct IDeckLinkDeckControlStatusCallback_v8_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_TimecodeUpdate(This,currentTimecode)	\

+    ( (This)->lpVtbl -> TimecodeUpdate(This,currentTimecode) ) 

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_VTRControlStateChanged(This,newState,error)	\

+    ( (This)->lpVtbl -> VTRControlStateChanged(This,newState,error) ) 

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_DeckControlEventReceived(This,event,error)	\

+    ( (This)->lpVtbl -> DeckControlEventReceived(This,event,error) ) 

+

+#define IDeckLinkDeckControlStatusCallback_v8_1_DeckControlStatusChanged(This,flags,mask)	\

+    ( (This)->lpVtbl -> DeckControlStatusChanged(This,flags,mask) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeckControlStatusCallback_v8_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDeckControl_v8_1_INTERFACE_DEFINED__

+#define __IDeckLinkDeckControl_v8_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeckControl_v8_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("522A9E39-0F3C-4742-94EE-D80DE335DA1D")

+    IDeckLinkDeckControl_v8_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Open( 

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Close( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCurrentState( 

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState_v8_1 *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetStandby( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SendCommand( 

+            /* [in] */ unsigned char *inBuffer,

+            /* [in] */ unsigned long inBufferSize,

+            /* [out] */ unsigned char *outBuffer,

+            /* [out] */ unsigned long *outDataSize,

+            /* [in] */ unsigned long outBufferSize,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Play( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Stop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Eject( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GoToTimecode( 

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FastForward( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Rewind( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepForward( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepBack( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Jog( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Shuttle( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( 

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( 

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetPreroll( 

+            /* [in] */ unsigned long prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPreroll( 

+            /* [out] */ unsigned long *prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetExportOffset( 

+            /* [in] */ long exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetExportOffset( 

+            /* [out] */ long *exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( 

+            /* [out] */ long *deckManualExportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( 

+            /* [in] */ long captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( 

+            /* [out] */ long *captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartExport( 

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartCapture( 

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDeviceID( 

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkDeckControlStatusCallback_v8_1 *callback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeckControl_v8_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeckControl_v8_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeckControl_v8_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Open )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Close )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState_v8_1 *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetStandby )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *SendCommand )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ unsigned char *inBuffer,

+            /* [in] */ unsigned long inBufferSize,

+            /* [out] */ unsigned char *outBuffer,

+            /* [out] */ unsigned long *outDataSize,

+            /* [in] */ unsigned long outBufferSize,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Play )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Stop )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Eject )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *FastForward )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Rewind )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepForward )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepBack )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Jog )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Shuttle )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetPreroll )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ unsigned long prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPreroll )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ unsigned long *prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ long exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ long *exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ long *deckManualExportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ long captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ long *captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartExport )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Abort )( 

+            IDeckLinkDeckControl_v8_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkDeckControl_v8_1 * This,

+            /* [in] */ IDeckLinkDeckControlStatusCallback_v8_1 *callback);

+        

+        END_INTERFACE

+    } IDeckLinkDeckControl_v8_1Vtbl;

+

+    interface IDeckLinkDeckControl_v8_1

+    {

+        CONST_VTBL struct IDeckLinkDeckControl_v8_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeckControl_v8_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeckControl_v8_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeckControl_v8_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeckControl_v8_1_Open(This,timeScale,timeValue,timecodeIsDropFrame,error)	\

+    ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Close(This,standbyOn)	\

+    ( (This)->lpVtbl -> Close(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetCurrentState(This,mode,vtrControlState,flags)	\

+    ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) 

+

+#define IDeckLinkDeckControl_v8_1_SetStandby(This,standbyOn)	\

+    ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_v8_1_SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error)	\

+    ( (This)->lpVtbl -> SendCommand(This,inBuffer,inBufferSize,outBuffer,outDataSize,outBufferSize,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Play(This,error)	\

+    ( (This)->lpVtbl -> Play(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Stop(This,error)	\

+    ( (This)->lpVtbl -> Stop(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_TogglePlayStop(This,error)	\

+    ( (This)->lpVtbl -> TogglePlayStop(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Eject(This,error)	\

+    ( (This)->lpVtbl -> Eject(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_GoToTimecode(This,timecode,error)	\

+    ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_FastForward(This,viewTape,error)	\

+    ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Rewind(This,viewTape,error)	\

+    ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_StepForward(This,error)	\

+    ( (This)->lpVtbl -> StepForward(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_StepBack(This,error)	\

+    ( (This)->lpVtbl -> StepBack(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Jog(This,rate,error)	\

+    ( (This)->lpVtbl -> Jog(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Shuttle(This,rate,error)	\

+    ( (This)->lpVtbl -> Shuttle(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetTimecodeString(This,currentTimeCode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetTimecode(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetTimecodeBCD(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_SetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_v8_1_SetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetManualExportOffset(This,deckManualExportOffsetFields)	\

+    ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v8_1_SetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v8_1_StartExport(This,inTimecode,outTimecode,exportModeOps,error)	\

+    ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_StartCapture(This,useVITC,inTimecode,outTimecode,error)	\

+    ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_GetDeviceID(This,deviceId,error)	\

+    ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_Abort(This)	\

+    ( (This)->lpVtbl -> Abort(This) ) 

+

+#define IDeckLinkDeckControl_v8_1_CrashRecordStart(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStart(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_CrashRecordStop(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStop(This,error) ) 

+

+#define IDeckLinkDeckControl_v8_1_SetCallback(This,callback)	\

+    ( (This)->lpVtbl -> SetCallback(This,callback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeckControl_v8_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLink_v8_0_INTERFACE_DEFINED__

+#define __IDeckLink_v8_0_INTERFACE_DEFINED__

+

+/* interface IDeckLink_v8_0 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLink_v8_0;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("62BFF75D-6569-4E55-8D4D-66AA03829ABC")

+    IDeckLink_v8_0 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetModelName( 

+            /* [out] */ BSTR *modelName) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLink_v8_0Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLink_v8_0 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLink_v8_0 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLink_v8_0 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetModelName )( 

+            IDeckLink_v8_0 * This,

+            /* [out] */ BSTR *modelName);

+        

+        END_INTERFACE

+    } IDeckLink_v8_0Vtbl;

+

+    interface IDeckLink_v8_0

+    {

+        CONST_VTBL struct IDeckLink_v8_0Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLink_v8_0_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLink_v8_0_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLink_v8_0_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLink_v8_0_GetModelName(This,modelName)	\

+    ( (This)->lpVtbl -> GetModelName(This,modelName) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLink_v8_0_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkIterator_v8_0_INTERFACE_DEFINED__

+#define __IDeckLinkIterator_v8_0_INTERFACE_DEFINED__

+

+/* interface IDeckLinkIterator_v8_0 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkIterator_v8_0;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("74E936FC-CC28-4A67-81A0-1E94E52D4E69")

+    IDeckLinkIterator_v8_0 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IDeckLink_v8_0 **deckLinkInstance) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkIterator_v8_0Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkIterator_v8_0 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkIterator_v8_0 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkIterator_v8_0 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IDeckLinkIterator_v8_0 * This,

+            /* [out] */ IDeckLink_v8_0 **deckLinkInstance);

+        

+        END_INTERFACE

+    } IDeckLinkIterator_v8_0Vtbl;

+

+    interface IDeckLinkIterator_v8_0

+    {

+        CONST_VTBL struct IDeckLinkIterator_v8_0Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkIterator_v8_0_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkIterator_v8_0_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkIterator_v8_0_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkIterator_v8_0_Next(This,deckLinkInstance)	\

+    ( (This)->lpVtbl -> Next(This,deckLinkInstance) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkIterator_v8_0_INTERFACE_DEFINED__ */

+

+

+EXTERN_C const CLSID CLSID_CDeckLinkIterator_v8_0;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("D9EDA3B3-2887-41FA-B724-017CF1EB1D37")

+CDeckLinkIterator_v8_0;

+#endif

+

+#ifndef __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__

+#define __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDeckControl_v7_9 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("A4D81043-0619-42B7-8ED6-602D29041DF7")

+    IDeckLinkDeckControl_v7_9 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Open( 

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Close( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCurrentState( 

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetStandby( 

+            /* [in] */ BOOL standbyOn) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Play( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Stop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE TogglePlayStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Eject( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GoToTimecode( 

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FastForward( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Rewind( 

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepForward( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StepBack( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Jog( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Shuttle( 

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeString( 

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecodeBCD( 

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetPreroll( 

+            /* [in] */ unsigned long prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetPreroll( 

+            /* [out] */ unsigned long *prerollSeconds) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetExportOffset( 

+            /* [in] */ long exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetExportOffset( 

+            /* [out] */ long *exportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetManualExportOffset( 

+            /* [out] */ long *deckManualExportOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCaptureOffset( 

+            /* [in] */ long captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetCaptureOffset( 

+            /* [out] */ long *captureOffsetFields) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartExport( 

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartCapture( 

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDeviceID( 

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStart( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CrashRecordStop( 

+            /* [out] */ BMDDeckControlError *error) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkDeckControlStatusCallback *callback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDeckControl_v7_9Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDeckControl_v7_9 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDeckControl_v7_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Open )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BMDTimeScale timeScale,

+            /* [in] */ BMDTimeValue timeValue,

+            /* [in] */ BOOL timecodeIsDropFrame,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Close )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlMode *mode,

+            /* [out] */ BMDDeckControlVTRControlState *vtrControlState,

+            /* [out] */ BMDDeckControlStatusFlags *flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetStandby )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BOOL standbyOn);

+        

+        HRESULT ( STDMETHODCALLTYPE *Play )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Stop )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Eject )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BMDTimecodeBCD timecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *FastForward )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Rewind )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BOOL viewTape,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepForward )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StepBack )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Jog )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Shuttle )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ double rate,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BSTR *currentTimeCode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ IDeckLinkTimecode **currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDTimecodeBCD *currentTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetPreroll )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ unsigned long prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetPreroll )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ unsigned long *prerollSeconds);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ long exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ long *exportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ long *deckManualExportOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ long captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ long *captureOffsetFields);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartExport )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartCapture )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ BOOL useVITC,

+            /* [in] */ BMDTimecodeBCD inTimecode,

+            /* [in] */ BMDTimecodeBCD outTimecode,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ unsigned short *deviceId,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *Abort )( 

+            IDeckLinkDeckControl_v7_9 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [out] */ BMDDeckControlError *error);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkDeckControl_v7_9 * This,

+            /* [in] */ IDeckLinkDeckControlStatusCallback *callback);

+        

+        END_INTERFACE

+    } IDeckLinkDeckControl_v7_9Vtbl;

+

+    interface IDeckLinkDeckControl_v7_9

+    {

+        CONST_VTBL struct IDeckLinkDeckControl_v7_9Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDeckControl_v7_9_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDeckControl_v7_9_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDeckControl_v7_9_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDeckControl_v7_9_Open(This,timeScale,timeValue,timecodeIsDropFrame,error)	\

+    ( (This)->lpVtbl -> Open(This,timeScale,timeValue,timecodeIsDropFrame,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Close(This,standbyOn)	\

+    ( (This)->lpVtbl -> Close(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetCurrentState(This,mode,vtrControlState,flags)	\

+    ( (This)->lpVtbl -> GetCurrentState(This,mode,vtrControlState,flags) ) 

+

+#define IDeckLinkDeckControl_v7_9_SetStandby(This,standbyOn)	\

+    ( (This)->lpVtbl -> SetStandby(This,standbyOn) ) 

+

+#define IDeckLinkDeckControl_v7_9_Play(This,error)	\

+    ( (This)->lpVtbl -> Play(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Stop(This,error)	\

+    ( (This)->lpVtbl -> Stop(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_TogglePlayStop(This,error)	\

+    ( (This)->lpVtbl -> TogglePlayStop(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Eject(This,error)	\

+    ( (This)->lpVtbl -> Eject(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_GoToTimecode(This,timecode,error)	\

+    ( (This)->lpVtbl -> GoToTimecode(This,timecode,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_FastForward(This,viewTape,error)	\

+    ( (This)->lpVtbl -> FastForward(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Rewind(This,viewTape,error)	\

+    ( (This)->lpVtbl -> Rewind(This,viewTape,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_StepForward(This,error)	\

+    ( (This)->lpVtbl -> StepForward(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_StepBack(This,error)	\

+    ( (This)->lpVtbl -> StepBack(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Jog(This,rate,error)	\

+    ( (This)->lpVtbl -> Jog(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Shuttle(This,rate,error)	\

+    ( (This)->lpVtbl -> Shuttle(This,rate,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetTimecodeString(This,currentTimeCode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeString(This,currentTimeCode,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetTimecode(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecode(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetTimecodeBCD(This,currentTimecode,error)	\

+    ( (This)->lpVtbl -> GetTimecodeBCD(This,currentTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_SetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> SetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetPreroll(This,prerollSeconds)	\

+    ( (This)->lpVtbl -> GetPreroll(This,prerollSeconds) ) 

+

+#define IDeckLinkDeckControl_v7_9_SetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> SetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetExportOffset(This,exportOffsetFields)	\

+    ( (This)->lpVtbl -> GetExportOffset(This,exportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetManualExportOffset(This,deckManualExportOffsetFields)	\

+    ( (This)->lpVtbl -> GetManualExportOffset(This,deckManualExportOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v7_9_SetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> SetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetCaptureOffset(This,captureOffsetFields)	\

+    ( (This)->lpVtbl -> GetCaptureOffset(This,captureOffsetFields) ) 

+

+#define IDeckLinkDeckControl_v7_9_StartExport(This,inTimecode,outTimecode,exportModeOps,error)	\

+    ( (This)->lpVtbl -> StartExport(This,inTimecode,outTimecode,exportModeOps,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_StartCapture(This,useVITC,inTimecode,outTimecode,error)	\

+    ( (This)->lpVtbl -> StartCapture(This,useVITC,inTimecode,outTimecode,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_GetDeviceID(This,deviceId,error)	\

+    ( (This)->lpVtbl -> GetDeviceID(This,deviceId,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_Abort(This)	\

+    ( (This)->lpVtbl -> Abort(This) ) 

+

+#define IDeckLinkDeckControl_v7_9_CrashRecordStart(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStart(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_CrashRecordStop(This,error)	\

+    ( (This)->lpVtbl -> CrashRecordStop(This,error) ) 

+

+#define IDeckLinkDeckControl_v7_9_SetCallback(This,callback)	\

+    ( (This)->lpVtbl -> SetCallback(This,callback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDeckControl_v7_9_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayModeIterator_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("455D741F-1779-4800-86F5-0B5D13D79751")

+    IDeckLinkDisplayModeIterator_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayModeIterator_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayModeIterator_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayModeIterator_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayModeIterator_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IDeckLinkDisplayModeIterator_v7_6 * This,

+            /* [out] */ IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayModeIterator_v7_6Vtbl;

+

+    interface IDeckLinkDisplayModeIterator_v7_6

+    {

+        CONST_VTBL struct IDeckLinkDisplayModeIterator_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayModeIterator_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayModeIterator_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayModeIterator_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayModeIterator_v7_6_Next(This,deckLinkDisplayMode)	\

+    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayModeIterator_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayMode_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("87451E84-2B7E-439E-A629-4393EA4A8550")

+    IDeckLinkDisplayMode_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetName( 

+            /* [out] */ BSTR *name) = 0;

+        

+        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale) = 0;

+        

+        virtual BMDFieldDominance STDMETHODCALLTYPE GetFieldDominance( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayMode_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayMode_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetName )( 

+            IDeckLinkDisplayMode_v7_6 * This,

+            /* [out] */ BSTR *name);

+        

+        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 

+            IDeckLinkDisplayMode_v7_6 * This,

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale);

+        

+        BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( 

+            IDeckLinkDisplayMode_v7_6 * This);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayMode_v7_6Vtbl;

+

+    interface IDeckLinkDisplayMode_v7_6

+    {

+        CONST_VTBL struct IDeckLinkDisplayMode_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayMode_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayMode_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayMode_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayMode_v7_6_GetName(This,name)	\

+    ( (This)->lpVtbl -> GetName(This,name) ) 

+

+#define IDeckLinkDisplayMode_v7_6_GetDisplayMode(This)	\

+    ( (This)->lpVtbl -> GetDisplayMode(This) ) 

+

+#define IDeckLinkDisplayMode_v7_6_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkDisplayMode_v7_6_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkDisplayMode_v7_6_GetFrameRate(This,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 

+

+#define IDeckLinkDisplayMode_v7_6_GetFieldDominance(This)	\

+    ( (This)->lpVtbl -> GetFieldDominance(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayMode_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkOutput_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkOutput_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("29228142-EB8C-4141-A621-F74026450955")

+    IDeckLinkOutput_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 

+            BMDDisplayMode displayMode,

+            BMDVideoOutputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 

+            BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 

+            /* [in] */ IDeckLinkVideoOutputCallback_v7_6 *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 

+            /* [out] */ unsigned long *bufferedFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount,

+            BMDAudioOutputStreamType streamType) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 

+            BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 

+            /* [out] */ BOOL *active) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetScheduledStreamTime( 

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkOutput_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDDisplayMode displayMode,

+            BMDVideoOutputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 

+            IDeckLinkOutput_v7_6 * This,

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkVideoOutputCallback_v7_6 *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [out] */ unsigned long *bufferedFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount,

+            BMDAudioOutputStreamType streamType);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [out] */ unsigned long *bufferedSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 

+            IDeckLinkOutput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 

+            IDeckLinkOutput_v7_6 * This,

+            /* [out] */ BOOL *active);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *streamTime,

+            /* [out] */ double *playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkOutput_v7_6 * This,

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        END_INTERFACE

+    } IDeckLinkOutput_v7_6Vtbl;

+

+    interface IDeckLinkOutput_v7_6

+    {

+        CONST_VTBL struct IDeckLinkOutput_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkOutput_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkOutput_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkOutput_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkOutput_v7_6_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkOutput_v7_6_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkOutput_v7_6_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkOutput_v7_6_EnableVideoOutput(This,displayMode,flags)	\

+    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 

+

+#define IDeckLinkOutput_v7_6_DisableVideoOutput(This)	\

+    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 

+

+#define IDeckLinkOutput_v7_6_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkOutput_v7_6_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_v7_6_CreateAncillaryData(This,pixelFormat,outBuffer)	\

+    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 

+

+#define IDeckLinkOutput_v7_6_DisplayVideoFrameSync(This,theFrame)	\

+    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 

+

+#define IDeckLinkOutput_v7_6_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\

+    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 

+

+#define IDeckLinkOutput_v7_6_SetScheduledFrameCompletionCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_6_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 

+

+#define IDeckLinkOutput_v7_6_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\

+    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 

+

+#define IDeckLinkOutput_v7_6_DisableAudioOutput(This)	\

+    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 

+

+#define IDeckLinkOutput_v7_6_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_6_BeginAudioPreroll(This)	\

+    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_6_EndAudioPreroll(This)	\

+    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_6_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_6_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 

+

+#define IDeckLinkOutput_v7_6_FlushBufferedAudioSamples(This)	\

+    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 

+

+#define IDeckLinkOutput_v7_6_SetAudioCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_6_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\

+    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v7_6_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\

+    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 

+

+#define IDeckLinkOutput_v7_6_IsScheduledPlaybackRunning(This,active)	\

+    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 

+

+#define IDeckLinkOutput_v7_6_GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed)	\

+    ( (This)->lpVtbl -> GetScheduledStreamTime(This,desiredTimeScale,streamTime,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v7_6_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkOutput_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkInput_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInput_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInput_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("300C135A-9F43-48E2-9906-6D7911D93CF1")

+    IDeckLinkInput_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 

+            /* [out] */ unsigned long *availableFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 

+            /* [out] */ unsigned long *availableSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkInputCallback_v7_6 *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInput_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkInput_v7_6 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 

+            IDeckLinkInput_v7_6 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [out] */ unsigned long *availableFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 

+            IDeckLinkInput_v7_6 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [out] */ unsigned long *availableSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 

+            IDeckLinkInput_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkInput_v7_6 * This,

+            /* [in] */ IDeckLinkInputCallback_v7_6 *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkInput_v7_6 * This,

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *hardwareTime,

+            /* [out] */ BMDTimeValue *timeInFrame,

+            /* [out] */ BMDTimeValue *ticksPerFrame);

+        

+        END_INTERFACE

+    } IDeckLinkInput_v7_6Vtbl;

+

+    interface IDeckLinkInput_v7_6

+    {

+        CONST_VTBL struct IDeckLinkInput_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInput_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInput_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInput_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInput_v7_6_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkInput_v7_6_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkInput_v7_6_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkInput_v7_6_EnableVideoInput(This,displayMode,pixelFormat,flags)	\

+    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 

+

+#define IDeckLinkInput_v7_6_DisableVideoInput(This)	\

+    ( (This)->lpVtbl -> DisableVideoInput(This) ) 

+

+#define IDeckLinkInput_v7_6_GetAvailableVideoFrameCount(This,availableFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 

+

+#define IDeckLinkInput_v7_6_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkInput_v7_6_DisableAudioInput(This)	\

+    ( (This)->lpVtbl -> DisableAudioInput(This) ) 

+

+#define IDeckLinkInput_v7_6_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 

+

+#define IDeckLinkInput_v7_6_StartStreams(This)	\

+    ( (This)->lpVtbl -> StartStreams(This) ) 

+

+#define IDeckLinkInput_v7_6_StopStreams(This)	\

+    ( (This)->lpVtbl -> StopStreams(This) ) 

+

+#define IDeckLinkInput_v7_6_PauseStreams(This)	\

+    ( (This)->lpVtbl -> PauseStreams(This) ) 

+

+#define IDeckLinkInput_v7_6_FlushStreams(This)	\

+    ( (This)->lpVtbl -> FlushStreams(This) ) 

+

+#define IDeckLinkInput_v7_6_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#define IDeckLinkInput_v7_6_GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,hardwareTime,timeInFrame,ticksPerFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInput_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkTimecode_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkTimecode_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("EFB9BCA6-A521-44F7-BD69-2332F24D9EE6")

+    IDeckLinkTimecode_v7_6 : public IUnknown

+    {

+    public:

+        virtual BMDTimecodeBCD STDMETHODCALLTYPE GetBCD( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetComponents( 

+            /* [out] */ unsigned char *hours,

+            /* [out] */ unsigned char *minutes,

+            /* [out] */ unsigned char *seconds,

+            /* [out] */ unsigned char *frames) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetString( 

+            /* [out] */ BSTR *timecode) = 0;

+        

+        virtual BMDTimecodeFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkTimecode_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkTimecode_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkTimecode_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkTimecode_v7_6 * This);

+        

+        BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( 

+            IDeckLinkTimecode_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetComponents )( 

+            IDeckLinkTimecode_v7_6 * This,

+            /* [out] */ unsigned char *hours,

+            /* [out] */ unsigned char *minutes,

+            /* [out] */ unsigned char *seconds,

+            /* [out] */ unsigned char *frames);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetString )( 

+            IDeckLinkTimecode_v7_6 * This,

+            /* [out] */ BSTR *timecode);

+        

+        BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkTimecode_v7_6 * This);

+        

+        END_INTERFACE

+    } IDeckLinkTimecode_v7_6Vtbl;

+

+    interface IDeckLinkTimecode_v7_6

+    {

+        CONST_VTBL struct IDeckLinkTimecode_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkTimecode_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkTimecode_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkTimecode_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkTimecode_v7_6_GetBCD(This)	\

+    ( (This)->lpVtbl -> GetBCD(This) ) 

+

+#define IDeckLinkTimecode_v7_6_GetComponents(This,hours,minutes,seconds,frames)	\

+    ( (This)->lpVtbl -> GetComponents(This,hours,minutes,seconds,frames) ) 

+

+#define IDeckLinkTimecode_v7_6_GetString(This,timecode)	\

+    ( (This)->lpVtbl -> GetString(This,timecode) ) 

+

+#define IDeckLinkTimecode_v7_6_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkTimecode_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoFrame_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("A8D8238E-6B18-4196-99E1-5AF717B83D32")

+    IDeckLinkVideoFrame_v7_6 : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;

+        

+        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;

+        

+        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            /* [out] */ void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetTimecode( 

+            BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode_v7_6 **timecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAncillaryData( 

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoFrame_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoFrame_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoFrame_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoFrame_v7_6 * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkVideoFrame_v7_6 * This,

+            BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkVideoFrame_v7_6 * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        END_INTERFACE

+    } IDeckLinkVideoFrame_v7_6Vtbl;

+

+    interface IDeckLinkVideoFrame_v7_6

+    {

+        CONST_VTBL struct IDeckLinkVideoFrame_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoFrame_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoFrame_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoFrame_v7_6_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkVideoFrame_v7_6_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoFrame_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkMutableVideoFrame_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkMutableVideoFrame_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("46FCEE00-B4E6-43D0-91C0-023A7FCEB34F")

+    IDeckLinkMutableVideoFrame_v7_6 : public IDeckLinkVideoFrame_v7_6

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE SetFlags( 

+            BMDFrameFlags newFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetTimecode( 

+            BMDTimecodeFormat format,

+            /* [in] */ IDeckLinkTimecode_v7_6 *timecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetTimecodeFromComponents( 

+            BMDTimecodeFormat format,

+            unsigned char hours,

+            unsigned char minutes,

+            unsigned char seconds,

+            unsigned char frames,

+            BMDTimecodeFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAncillaryData( 

+            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkMutableVideoFrame_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            BMDFrameFlags newFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetTimecode )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            BMDTimecodeFormat format,

+            /* [in] */ IDeckLinkTimecode_v7_6 *timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            BMDTimecodeFormat format,

+            unsigned char hours,

+            unsigned char minutes,

+            unsigned char seconds,

+            unsigned char frames,

+            BMDTimecodeFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( 

+            IDeckLinkMutableVideoFrame_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrameAncillary *ancillary);

+        

+        END_INTERFACE

+    } IDeckLinkMutableVideoFrame_v7_6Vtbl;

+

+    interface IDeckLinkMutableVideoFrame_v7_6

+    {

+        CONST_VTBL struct IDeckLinkMutableVideoFrame_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkMutableVideoFrame_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+

+#define IDeckLinkMutableVideoFrame_v7_6_SetFlags(This,newFlags)	\

+    ( (This)->lpVtbl -> SetFlags(This,newFlags) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_SetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> SetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags)	\

+    ( (This)->lpVtbl -> SetTimecodeFromComponents(This,format,hours,minutes,seconds,frames,flags) ) 

+

+#define IDeckLinkMutableVideoFrame_v7_6_SetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> SetAncillaryData(This,ancillary) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkMutableVideoFrame_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoInputFrame_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("9A74FA41-AE9F-47AC-8CF4-01F42DD59965")

+    IDeckLinkVideoInputFrame_v7_6 : public IDeckLinkVideoFrame_v7_6

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceTimestamp( 

+            BMDTimeScale timeScale,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoInputFrame_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoInputFrame_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( 

+            IDeckLinkVideoInputFrame_v7_6 * This,

+            BMDTimeScale timeScale,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration);

+        

+        END_INTERFACE

+    } IDeckLinkVideoInputFrame_v7_6Vtbl;

+

+    interface IDeckLinkVideoInputFrame_v7_6

+    {

+        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoInputFrame_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_6_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_6_GetStreamTime(This,frameTime,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 

+

+#define IDeckLinkVideoInputFrame_v7_6_GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceTimestamp(This,timeScale,frameTime,frameDuration) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkScreenPreviewCallback_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("373F499D-4B4D-4518-AD22-6354E5A5825E")

+    IDeckLinkScreenPreviewCallback_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DrawFrame( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkScreenPreviewCallback_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkScreenPreviewCallback_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkScreenPreviewCallback_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkScreenPreviewCallback_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DrawFrame )( 

+            IDeckLinkScreenPreviewCallback_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);

+        

+        END_INTERFACE

+    } IDeckLinkScreenPreviewCallback_v7_6Vtbl;

+

+    interface IDeckLinkScreenPreviewCallback_v7_6

+    {

+        CONST_VTBL struct IDeckLinkScreenPreviewCallback_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkScreenPreviewCallback_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkScreenPreviewCallback_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkScreenPreviewCallback_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkScreenPreviewCallback_v7_6_DrawFrame(This,theFrame)	\

+    ( (This)->lpVtbl -> DrawFrame(This,theFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkScreenPreviewCallback_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkGLScreenPreviewHelper_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("BA575CD9-A15E-497B-B2C2-F9AFE7BE4EBA")

+    IDeckLinkGLScreenPreviewHelper_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE InitializeGL( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PaintGL( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetFrame( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkGLScreenPreviewHelper_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *InitializeGL )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PaintGL )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetFrame )( 

+            IDeckLinkGLScreenPreviewHelper_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);

+        

+        END_INTERFACE

+    } IDeckLinkGLScreenPreviewHelper_v7_6Vtbl;

+

+    interface IDeckLinkGLScreenPreviewHelper_v7_6

+    {

+        CONST_VTBL struct IDeckLinkGLScreenPreviewHelper_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_InitializeGL(This)	\

+    ( (This)->lpVtbl -> InitializeGL(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_PaintGL(This)	\

+    ( (This)->lpVtbl -> PaintGL(This) ) 

+

+#define IDeckLinkGLScreenPreviewHelper_v7_6_SetFrame(This,theFrame)	\

+    ( (This)->lpVtbl -> SetFrame(This,theFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkGLScreenPreviewHelper_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoConversion_v7_6 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoConversion_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("3EB504C9-F97D-40FE-A158-D407D48CB53B")

+    IDeckLinkVideoConversion_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE ConvertFrame( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *srcFrame,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *dstFrame) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoConversion_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoConversion_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoConversion_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoConversion_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( 

+            IDeckLinkVideoConversion_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *srcFrame,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *dstFrame);

+        

+        END_INTERFACE

+    } IDeckLinkVideoConversion_v7_6Vtbl;

+

+    interface IDeckLinkVideoConversion_v7_6

+    {

+        CONST_VTBL struct IDeckLinkVideoConversion_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoConversion_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoConversion_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoConversion_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoConversion_v7_6_ConvertFrame(This,srcFrame,dstFrame)	\

+    ( (This)->lpVtbl -> ConvertFrame(This,srcFrame,dstFrame) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoConversion_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkConfiguration_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkConfiguration_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("B8EAD569-B764-47F0-A73F-AE40DF6CBF10")

+    IDeckLinkConfiguration_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetConfigurationValidator( 

+            /* [out] */ IDeckLinkConfiguration_v7_6 **configObject) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteConfigurationToPreferences( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFormat( 

+            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsVideoOutputActive( 

+            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection,

+            /* [out] */ BOOL *active) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAnalogVideoOutputFlags( 

+            /* [in] */ BMDAnalogVideoFlags analogVideoFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAnalogVideoOutputFlags( 

+            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableFieldFlickerRemovalWhenPaused( 

+            /* [in] */ BOOL enable) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsEnabledFieldFlickerRemovalWhenPaused( 

+            /* [out] */ BOOL *enabled) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Set444And3GBpsVideoOutput( 

+            /* [in] */ BOOL enable444VideoOutput,

+            /* [in] */ BOOL enable3GbsOutput) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Get444And3GBpsVideoOutput( 

+            /* [out] */ BOOL *is444VideoOutputEnabled,

+            /* [out] */ BOOL *threeGbsOutputEnabled) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputConversionMode( 

+            /* [in] */ BMDVideoOutputConversionMode conversionMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoOutputConversionMode( 

+            /* [out] */ BMDVideoOutputConversionMode *conversionMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Set_HD1080p24_to_HD1080i5994_Conversion( 

+            /* [in] */ BOOL enable) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Get_HD1080p24_to_HD1080i5994_Conversion( 

+            /* [out] */ BOOL *enabled) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoInputFormat( 

+            /* [in] */ BMDVideoConnection_v7_6 videoInputFormat) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoInputFormat( 

+            /* [out] */ BMDVideoConnection_v7_6 *videoInputFormat) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAnalogVideoInputFlags( 

+            /* [in] */ BMDAnalogVideoFlags analogVideoFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAnalogVideoInputFlags( 

+            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoInputConversionMode( 

+            /* [in] */ BMDVideoInputConversionMode conversionMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVideoInputConversionMode( 

+            /* [out] */ BMDVideoInputConversionMode *conversionMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetBlackVideoOutputDuringCapture( 

+            /* [in] */ BOOL blackOutInCapture) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBlackVideoOutputDuringCapture( 

+            /* [out] */ BOOL *blackOutInCapture) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Set32PulldownSequenceInitialTimecodeFrame( 

+            /* [in] */ unsigned long aFrameTimecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE Get32PulldownSequenceInitialTimecodeFrame( 

+            /* [out] */ unsigned long *aFrameTimecode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVancSourceLineMapping( 

+            /* [in] */ unsigned long activeLine1VANCsource,

+            /* [in] */ unsigned long activeLine2VANCsource,

+            /* [in] */ unsigned long activeLine3VANCsource) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetVancSourceLineMapping( 

+            /* [out] */ unsigned long *activeLine1VANCsource,

+            /* [out] */ unsigned long *activeLine2VANCsource,

+            /* [out] */ unsigned long *activeLine3VANCsource) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioInputFormat( 

+            /* [in] */ BMDAudioConnection_v10_2 audioInputFormat) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAudioInputFormat( 

+            /* [out] */ BMDAudioConnection_v10_2 *audioInputFormat) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkConfiguration_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkConfiguration_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkConfiguration_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetConfigurationValidator )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ IDeckLinkConfiguration_v7_6 **configObject);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( 

+            IDeckLinkConfiguration_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFormat )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsVideoOutputActive )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection,

+            /* [out] */ BOOL *active);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoOutputFlags )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDAnalogVideoFlags analogVideoFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoOutputFlags )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableFieldFlickerRemovalWhenPaused )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BOOL enable);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsEnabledFieldFlickerRemovalWhenPaused )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BOOL *enabled);

+        

+        HRESULT ( STDMETHODCALLTYPE *Set444And3GBpsVideoOutput )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BOOL enable444VideoOutput,

+            /* [in] */ BOOL enable3GbsOutput);

+        

+        HRESULT ( STDMETHODCALLTYPE *Get444And3GBpsVideoOutput )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BOOL *is444VideoOutputEnabled,

+            /* [out] */ BOOL *threeGbsOutputEnabled);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputConversionMode )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDVideoOutputConversionMode conversionMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoOutputConversionMode )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDVideoOutputConversionMode *conversionMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *Set_HD1080p24_to_HD1080i5994_Conversion )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BOOL enable);

+        

+        HRESULT ( STDMETHODCALLTYPE *Get_HD1080p24_to_HD1080i5994_Conversion )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BOOL *enabled);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoInputFormat )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDVideoConnection_v7_6 videoInputFormat);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoInputFormat )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDVideoConnection_v7_6 *videoInputFormat);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoInputFlags )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDAnalogVideoFlags analogVideoFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoInputFlags )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDAnalogVideoFlags *analogVideoFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoInputConversionMode )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDVideoInputConversionMode conversionMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVideoInputConversionMode )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDVideoInputConversionMode *conversionMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetBlackVideoOutputDuringCapture )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BOOL blackOutInCapture);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBlackVideoOutputDuringCapture )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BOOL *blackOutInCapture);

+        

+        HRESULT ( STDMETHODCALLTYPE *Set32PulldownSequenceInitialTimecodeFrame )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ unsigned long aFrameTimecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *Get32PulldownSequenceInitialTimecodeFrame )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ unsigned long *aFrameTimecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVancSourceLineMapping )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ unsigned long activeLine1VANCsource,

+            /* [in] */ unsigned long activeLine2VANCsource,

+            /* [in] */ unsigned long activeLine3VANCsource);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetVancSourceLineMapping )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ unsigned long *activeLine1VANCsource,

+            /* [out] */ unsigned long *activeLine2VANCsource,

+            /* [out] */ unsigned long *activeLine3VANCsource);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioInputFormat )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [in] */ BMDAudioConnection_v10_2 audioInputFormat);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAudioInputFormat )( 

+            IDeckLinkConfiguration_v7_6 * This,

+            /* [out] */ BMDAudioConnection_v10_2 *audioInputFormat);

+        

+        END_INTERFACE

+    } IDeckLinkConfiguration_v7_6Vtbl;

+

+    interface IDeckLinkConfiguration_v7_6

+    {

+        CONST_VTBL struct IDeckLinkConfiguration_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkConfiguration_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkConfiguration_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkConfiguration_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkConfiguration_v7_6_GetConfigurationValidator(This,configObject)	\

+    ( (This)->lpVtbl -> GetConfigurationValidator(This,configObject) ) 

+

+#define IDeckLinkConfiguration_v7_6_WriteConfigurationToPreferences(This)	\

+    ( (This)->lpVtbl -> WriteConfigurationToPreferences(This) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetVideoOutputFormat(This,videoOutputConnection)	\

+    ( (This)->lpVtbl -> SetVideoOutputFormat(This,videoOutputConnection) ) 

+

+#define IDeckLinkConfiguration_v7_6_IsVideoOutputActive(This,videoOutputConnection,active)	\

+    ( (This)->lpVtbl -> IsVideoOutputActive(This,videoOutputConnection,active) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetAnalogVideoOutputFlags(This,analogVideoFlags)	\

+    ( (This)->lpVtbl -> SetAnalogVideoOutputFlags(This,analogVideoFlags) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetAnalogVideoOutputFlags(This,analogVideoFlags)	\

+    ( (This)->lpVtbl -> GetAnalogVideoOutputFlags(This,analogVideoFlags) ) 

+

+#define IDeckLinkConfiguration_v7_6_EnableFieldFlickerRemovalWhenPaused(This,enable)	\

+    ( (This)->lpVtbl -> EnableFieldFlickerRemovalWhenPaused(This,enable) ) 

+

+#define IDeckLinkConfiguration_v7_6_IsEnabledFieldFlickerRemovalWhenPaused(This,enabled)	\

+    ( (This)->lpVtbl -> IsEnabledFieldFlickerRemovalWhenPaused(This,enabled) ) 

+

+#define IDeckLinkConfiguration_v7_6_Set444And3GBpsVideoOutput(This,enable444VideoOutput,enable3GbsOutput)	\

+    ( (This)->lpVtbl -> Set444And3GBpsVideoOutput(This,enable444VideoOutput,enable3GbsOutput) ) 

+

+#define IDeckLinkConfiguration_v7_6_Get444And3GBpsVideoOutput(This,is444VideoOutputEnabled,threeGbsOutputEnabled)	\

+    ( (This)->lpVtbl -> Get444And3GBpsVideoOutput(This,is444VideoOutputEnabled,threeGbsOutputEnabled) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetVideoOutputConversionMode(This,conversionMode)	\

+    ( (This)->lpVtbl -> SetVideoOutputConversionMode(This,conversionMode) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetVideoOutputConversionMode(This,conversionMode)	\

+    ( (This)->lpVtbl -> GetVideoOutputConversionMode(This,conversionMode) ) 

+

+#define IDeckLinkConfiguration_v7_6_Set_HD1080p24_to_HD1080i5994_Conversion(This,enable)	\

+    ( (This)->lpVtbl -> Set_HD1080p24_to_HD1080i5994_Conversion(This,enable) ) 

+

+#define IDeckLinkConfiguration_v7_6_Get_HD1080p24_to_HD1080i5994_Conversion(This,enabled)	\

+    ( (This)->lpVtbl -> Get_HD1080p24_to_HD1080i5994_Conversion(This,enabled) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetVideoInputFormat(This,videoInputFormat)	\

+    ( (This)->lpVtbl -> SetVideoInputFormat(This,videoInputFormat) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetVideoInputFormat(This,videoInputFormat)	\

+    ( (This)->lpVtbl -> GetVideoInputFormat(This,videoInputFormat) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetAnalogVideoInputFlags(This,analogVideoFlags)	\

+    ( (This)->lpVtbl -> SetAnalogVideoInputFlags(This,analogVideoFlags) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetAnalogVideoInputFlags(This,analogVideoFlags)	\

+    ( (This)->lpVtbl -> GetAnalogVideoInputFlags(This,analogVideoFlags) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetVideoInputConversionMode(This,conversionMode)	\

+    ( (This)->lpVtbl -> SetVideoInputConversionMode(This,conversionMode) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetVideoInputConversionMode(This,conversionMode)	\

+    ( (This)->lpVtbl -> GetVideoInputConversionMode(This,conversionMode) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetBlackVideoOutputDuringCapture(This,blackOutInCapture)	\

+    ( (This)->lpVtbl -> SetBlackVideoOutputDuringCapture(This,blackOutInCapture) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetBlackVideoOutputDuringCapture(This,blackOutInCapture)	\

+    ( (This)->lpVtbl -> GetBlackVideoOutputDuringCapture(This,blackOutInCapture) ) 

+

+#define IDeckLinkConfiguration_v7_6_Set32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode)	\

+    ( (This)->lpVtbl -> Set32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode) ) 

+

+#define IDeckLinkConfiguration_v7_6_Get32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode)	\

+    ( (This)->lpVtbl -> Get32PulldownSequenceInitialTimecodeFrame(This,aFrameTimecode) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource)	\

+    ( (This)->lpVtbl -> SetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource)	\

+    ( (This)->lpVtbl -> GetVancSourceLineMapping(This,activeLine1VANCsource,activeLine2VANCsource,activeLine3VANCsource) ) 

+

+#define IDeckLinkConfiguration_v7_6_SetAudioInputFormat(This,audioInputFormat)	\

+    ( (This)->lpVtbl -> SetAudioInputFormat(This,audioInputFormat) ) 

+

+#define IDeckLinkConfiguration_v7_6_GetAudioInputFormat(This,audioInputFormat)	\

+    ( (This)->lpVtbl -> GetAudioInputFormat(This,audioInputFormat) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkConfiguration_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoOutputCallback_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("E763A626-4A3C-49D1-BF13-E7AD3692AE52")

+    IDeckLinkVideoOutputCallback_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped( void) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoOutputCallback_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoOutputCallback_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoOutputCallback_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoOutputCallback_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 

+            IDeckLinkVideoOutputCallback_v7_6 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( 

+            IDeckLinkVideoOutputCallback_v7_6 * This);

+        

+        END_INTERFACE

+    } IDeckLinkVideoOutputCallback_v7_6Vtbl;

+

+    interface IDeckLinkVideoOutputCallback_v7_6

+    {

+        CONST_VTBL struct IDeckLinkVideoOutputCallback_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoOutputCallback_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoOutputCallback_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoOutputCallback_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoOutputCallback_v7_6_ScheduledFrameCompleted(This,completedFrame,result)	\

+    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 

+

+#define IDeckLinkVideoOutputCallback_v7_6_ScheduledPlaybackHasStopped(This)	\

+    ( (This)->lpVtbl -> ScheduledPlaybackHasStopped(This) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoOutputCallback_v7_6_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__

+#define __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInputCallback_v7_6 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInputCallback_v7_6;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("31D28EE7-88B6-4CB1-897A-CDBF79A26414")

+    IDeckLinkInputCallback_v7_6 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 

+            /* [in] */ IDeckLinkVideoInputFrame_v7_6 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInputCallback_v7_6Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInputCallback_v7_6 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInputCallback_v7_6 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInputCallback_v7_6 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 

+            IDeckLinkInputCallback_v7_6 * This,

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 

+            IDeckLinkInputCallback_v7_6 * This,

+            /* [in] */ IDeckLinkVideoInputFrame_v7_6 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);

+        

+        END_INTERFACE

+    } IDeckLinkInputCallback_v7_6Vtbl;

+

+    interface IDeckLinkInputCallback_v7_6

+    {

+        CONST_VTBL struct IDeckLinkInputCallback_v7_6Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInputCallback_v7_6_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInputCallback_v7_6_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInputCallback_v7_6_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInputCallback_v7_6_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\

+    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 

+

+#define IDeckLinkInputCallback_v7_6_VideoInputFrameArrived(This,videoFrame,audioPacket)	\

+    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInputCallback_v7_6_INTERFACE_DEFINED__ */

+

+

+EXTERN_C const CLSID CLSID_CDeckLinkGLScreenPreviewHelper_v7_6;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("D398CEE7-4434-4CA3-9BA6-5AE34556B905")

+CDeckLinkGLScreenPreviewHelper_v7_6;

+#endif

+

+EXTERN_C const CLSID CLSID_CDeckLinkVideoConversion_v7_6;

+

+#ifdef __cplusplus

+

+class DECLSPEC_UUID("FFA84F77-73BE-4FB7-B03E-B5E44B9F759B")

+CDeckLinkVideoConversion_v7_6;

+#endif

+

+#ifndef __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__

+#define __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInputCallback_v7_3 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInputCallback_v7_3;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("FD6F311D-4D00-444B-9ED4-1F25B5730AD0")

+    IDeckLinkInputCallback_v7_3 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged( 

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 

+            /* [in] */ IDeckLinkVideoInputFrame_v7_3 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInputCallback_v7_3Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInputCallback_v7_3 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInputCallback_v7_3 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInputCallback_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( 

+            IDeckLinkInputCallback_v7_3 * This,

+            /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents,

+            /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode,

+            /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 

+            IDeckLinkInputCallback_v7_3 * This,

+            /* [in] */ IDeckLinkVideoInputFrame_v7_3 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket *audioPacket);

+        

+        END_INTERFACE

+    } IDeckLinkInputCallback_v7_3Vtbl;

+

+    interface IDeckLinkInputCallback_v7_3

+    {

+        CONST_VTBL struct IDeckLinkInputCallback_v7_3Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInputCallback_v7_3_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInputCallback_v7_3_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInputCallback_v7_3_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInputCallback_v7_3_VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags)	\

+    ( (This)->lpVtbl -> VideoInputFormatChanged(This,notificationEvents,newDisplayMode,detectedSignalFlags) ) 

+

+#define IDeckLinkInputCallback_v7_3_VideoInputFrameArrived(This,videoFrame,audioPacket)	\

+    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInputCallback_v7_3_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__

+#define __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__

+

+/* interface IDeckLinkOutput_v7_3 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkOutput_v7_3;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("271C65E3-C323-4344-A30F-D908BCB20AA3")

+    IDeckLinkOutput_v7_3 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 

+            BMDDisplayMode displayMode,

+            BMDVideoOutputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateAncillaryData( 

+            BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedVideoFrameCount( 

+            /* [out] */ unsigned long *bufferedFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount,

+            BMDAudioOutputStreamType streamType) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 

+            BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE IsScheduledPlaybackRunning( 

+            /* [out] */ BOOL *active) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *elapsedTimeSinceSchedulerBegan) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkOutput_v7_3Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDDisplayMode displayMode,

+            BMDVideoOutputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 

+            IDeckLinkOutput_v7_3 * This,

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkVideoOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [out] */ unsigned long *bufferedFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount,

+            BMDAudioOutputStreamType streamType);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [out] */ unsigned long *bufferedSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 

+            IDeckLinkOutput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDTimeValue stopPlaybackAtTime,

+            /* [out] */ BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( 

+            IDeckLinkOutput_v7_3 * This,

+            /* [out] */ BOOL *active);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkOutput_v7_3 * This,

+            BMDTimeScale desiredTimeScale,

+            /* [out] */ BMDTimeValue *elapsedTimeSinceSchedulerBegan);

+        

+        END_INTERFACE

+    } IDeckLinkOutput_v7_3Vtbl;

+

+    interface IDeckLinkOutput_v7_3

+    {

+        CONST_VTBL struct IDeckLinkOutput_v7_3Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkOutput_v7_3_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkOutput_v7_3_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkOutput_v7_3_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkOutput_v7_3_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkOutput_v7_3_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkOutput_v7_3_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkOutput_v7_3_EnableVideoOutput(This,displayMode,flags)	\

+    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode,flags) ) 

+

+#define IDeckLinkOutput_v7_3_DisableVideoOutput(This)	\

+    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 

+

+#define IDeckLinkOutput_v7_3_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkOutput_v7_3_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_v7_3_CreateAncillaryData(This,pixelFormat,outBuffer)	\

+    ( (This)->lpVtbl -> CreateAncillaryData(This,pixelFormat,outBuffer) ) 

+

+#define IDeckLinkOutput_v7_3_DisplayVideoFrameSync(This,theFrame)	\

+    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 

+

+#define IDeckLinkOutput_v7_3_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\

+    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 

+

+#define IDeckLinkOutput_v7_3_SetScheduledFrameCompletionCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_3_GetBufferedVideoFrameCount(This,bufferedFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedVideoFrameCount(This,bufferedFrameCount) ) 

+

+#define IDeckLinkOutput_v7_3_EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType)	\

+    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount,streamType) ) 

+

+#define IDeckLinkOutput_v7_3_DisableAudioOutput(This)	\

+    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 

+

+#define IDeckLinkOutput_v7_3_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_3_BeginAudioPreroll(This)	\

+    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_3_EndAudioPreroll(This)	\

+    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_3_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_3_GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleFrameCount) ) 

+

+#define IDeckLinkOutput_v7_3_FlushBufferedAudioSamples(This)	\

+    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 

+

+#define IDeckLinkOutput_v7_3_SetAudioCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_3_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\

+    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v7_3_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\

+    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 

+

+#define IDeckLinkOutput_v7_3_IsScheduledPlaybackRunning(This,active)	\

+    ( (This)->lpVtbl -> IsScheduledPlaybackRunning(This,active) ) 

+

+#define IDeckLinkOutput_v7_3_GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkOutput_v7_3_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_3_INTERFACE_DEFINED__

+#define __IDeckLinkInput_v7_3_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInput_v7_3 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInput_v7_3;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("4973F012-9925-458C-871C-18774CDBBECB")

+    IDeckLinkInput_v7_3 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScreenPreviewCallback( 

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableVideoFrameCount( 

+            /* [out] */ unsigned long *availableFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAvailableAudioSampleFrameCount( 

+            /* [out] */ unsigned long *availableSampleFrameCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkInputCallback_v7_3 *theCallback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInput_v7_3Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkInput_v7_3 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 

+            IDeckLinkInput_v7_3 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [out] */ unsigned long *availableFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 

+            IDeckLinkInput_v7_3 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [out] */ unsigned long *availableSampleFrameCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushStreams )( 

+            IDeckLinkInput_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkInput_v7_3 * This,

+            /* [in] */ IDeckLinkInputCallback_v7_3 *theCallback);

+        

+        END_INTERFACE

+    } IDeckLinkInput_v7_3Vtbl;

+

+    interface IDeckLinkInput_v7_3

+    {

+        CONST_VTBL struct IDeckLinkInput_v7_3Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInput_v7_3_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInput_v7_3_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInput_v7_3_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInput_v7_3_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkInput_v7_3_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkInput_v7_3_SetScreenPreviewCallback(This,previewCallback)	\

+    ( (This)->lpVtbl -> SetScreenPreviewCallback(This,previewCallback) ) 

+

+#define IDeckLinkInput_v7_3_EnableVideoInput(This,displayMode,pixelFormat,flags)	\

+    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 

+

+#define IDeckLinkInput_v7_3_DisableVideoInput(This)	\

+    ( (This)->lpVtbl -> DisableVideoInput(This) ) 

+

+#define IDeckLinkInput_v7_3_GetAvailableVideoFrameCount(This,availableFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableVideoFrameCount(This,availableFrameCount) ) 

+

+#define IDeckLinkInput_v7_3_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkInput_v7_3_DisableAudioInput(This)	\

+    ( (This)->lpVtbl -> DisableAudioInput(This) ) 

+

+#define IDeckLinkInput_v7_3_GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount)	\

+    ( (This)->lpVtbl -> GetAvailableAudioSampleFrameCount(This,availableSampleFrameCount) ) 

+

+#define IDeckLinkInput_v7_3_StartStreams(This)	\

+    ( (This)->lpVtbl -> StartStreams(This) ) 

+

+#define IDeckLinkInput_v7_3_StopStreams(This)	\

+    ( (This)->lpVtbl -> StopStreams(This) ) 

+

+#define IDeckLinkInput_v7_3_PauseStreams(This)	\

+    ( (This)->lpVtbl -> PauseStreams(This) ) 

+

+#define IDeckLinkInput_v7_3_FlushStreams(This)	\

+    ( (This)->lpVtbl -> FlushStreams(This) ) 

+

+#define IDeckLinkInput_v7_3_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInput_v7_3_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoInputFrame_v7_3 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_3;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("CF317790-2894-11DE-8C30-0800200C9A66")

+    IDeckLinkVideoInputFrame_v7_3 : public IDeckLinkVideoFrame_v7_6

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetStreamTime( 

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoInputFrame_v7_3Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoInputFrame_v7_3 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoInputFrame_v7_3 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoInputFrame_v7_3 * This,

+            /* [out] */ void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetTimecode )( 

+            IDeckLinkVideoInputFrame_v7_3 * This,

+            BMDTimecodeFormat format,

+            /* [out] */ IDeckLinkTimecode_v7_6 **timecode);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( 

+            IDeckLinkVideoInputFrame_v7_3 * This,

+            /* [out] */ IDeckLinkVideoFrameAncillary **ancillary);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( 

+            IDeckLinkVideoInputFrame_v7_3 * This,

+            /* [out] */ BMDTimeValue *frameTime,

+            /* [out] */ BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale);

+        

+        END_INTERFACE

+    } IDeckLinkVideoInputFrame_v7_3Vtbl;

+

+    interface IDeckLinkVideoInputFrame_v7_3

+    {

+        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_3Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoInputFrame_v7_3_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_3_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetTimecode(This,format,timecode)	\

+    ( (This)->lpVtbl -> GetTimecode(This,format,timecode) ) 

+

+#define IDeckLinkVideoInputFrame_v7_3_GetAncillaryData(This,ancillary)	\

+    ( (This)->lpVtbl -> GetAncillaryData(This,ancillary) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_3_GetStreamTime(This,frameTime,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetStreamTime(This,frameTime,frameDuration,timeScale) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_3_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayModeIterator_v7_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("B28131B6-59AC-4857-B5AC-CD75D5883E2F")

+    IDeckLinkDisplayModeIterator_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE Next( 

+            /* [out] */ IDeckLinkDisplayMode_v7_1 **deckLinkDisplayMode) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayModeIterator_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayModeIterator_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayModeIterator_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayModeIterator_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *Next )( 

+            IDeckLinkDisplayModeIterator_v7_1 * This,

+            /* [out] */ IDeckLinkDisplayMode_v7_1 **deckLinkDisplayMode);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayModeIterator_v7_1Vtbl;

+

+    interface IDeckLinkDisplayModeIterator_v7_1

+    {

+        CONST_VTBL struct IDeckLinkDisplayModeIterator_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayModeIterator_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayModeIterator_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayModeIterator_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayModeIterator_v7_1_Next(This,deckLinkDisplayMode)	\

+    ( (This)->lpVtbl -> Next(This,deckLinkDisplayMode) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayModeIterator_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkDisplayMode_v7_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("AF0CD6D5-8376-435E-8433-54F9DD530AC3")

+    IDeckLinkDisplayMode_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetName( 

+            /* [out] */ BSTR *name) = 0;

+        

+        virtual BMDDisplayMode STDMETHODCALLTYPE GetDisplayMode( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetFrameRate( 

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkDisplayMode_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkDisplayMode_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkDisplayMode_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkDisplayMode_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetName )( 

+            IDeckLinkDisplayMode_v7_1 * This,

+            /* [out] */ BSTR *name);

+        

+        BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( 

+            IDeckLinkDisplayMode_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkDisplayMode_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkDisplayMode_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( 

+            IDeckLinkDisplayMode_v7_1 * This,

+            /* [out] */ BMDTimeValue *frameDuration,

+            /* [out] */ BMDTimeScale *timeScale);

+        

+        END_INTERFACE

+    } IDeckLinkDisplayMode_v7_1Vtbl;

+

+    interface IDeckLinkDisplayMode_v7_1

+    {

+        CONST_VTBL struct IDeckLinkDisplayMode_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkDisplayMode_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkDisplayMode_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkDisplayMode_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkDisplayMode_v7_1_GetName(This,name)	\

+    ( (This)->lpVtbl -> GetName(This,name) ) 

+

+#define IDeckLinkDisplayMode_v7_1_GetDisplayMode(This)	\

+    ( (This)->lpVtbl -> GetDisplayMode(This) ) 

+

+#define IDeckLinkDisplayMode_v7_1_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkDisplayMode_v7_1_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkDisplayMode_v7_1_GetFrameRate(This,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetFrameRate(This,frameDuration,timeScale) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkDisplayMode_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoFrame_v7_1 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("333F3A10-8C2D-43CF-B79D-46560FEEA1CE")

+    IDeckLinkVideoFrame_v7_1 : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetWidth( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetHeight( void) = 0;

+        

+        virtual long STDMETHODCALLTYPE GetRowBytes( void) = 0;

+        

+        virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat( void) = 0;

+        

+        virtual BMDFrameFlags STDMETHODCALLTYPE GetFlags( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            void **buffer) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoFrame_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoFrame_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoFrame_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoFrame_v7_1 * This,

+            void **buffer);

+        

+        END_INTERFACE

+    } IDeckLinkVideoFrame_v7_1Vtbl;

+

+    interface IDeckLinkVideoFrame_v7_1

+    {

+        CONST_VTBL struct IDeckLinkVideoFrame_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoFrame_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoFrame_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoFrame_v7_1_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoFrame_v7_1_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoFrame_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoInputFrame_v7_1 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("C8B41D95-8848-40EE-9B37-6E3417FB114B")

+    IDeckLinkVideoInputFrame_v7_1 : public IDeckLinkVideoFrame_v7_1

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE GetFrameTime( 

+            BMDTimeValue *frameTime,

+            BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoInputFrame_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoInputFrame_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetWidth )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetHeight )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetRowBytes )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( 

+            IDeckLinkVideoInputFrame_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkVideoInputFrame_v7_1 * This,

+            void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetFrameTime )( 

+            IDeckLinkVideoInputFrame_v7_1 * This,

+            BMDTimeValue *frameTime,

+            BMDTimeValue *frameDuration,

+            BMDTimeScale timeScale);

+        

+        END_INTERFACE

+    } IDeckLinkVideoInputFrame_v7_1Vtbl;

+

+    interface IDeckLinkVideoInputFrame_v7_1

+    {

+        CONST_VTBL struct IDeckLinkVideoInputFrame_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoInputFrame_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_1_GetWidth(This)	\

+    ( (This)->lpVtbl -> GetWidth(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_GetHeight(This)	\

+    ( (This)->lpVtbl -> GetHeight(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_GetRowBytes(This)	\

+    ( (This)->lpVtbl -> GetRowBytes(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_GetPixelFormat(This)	\

+    ( (This)->lpVtbl -> GetPixelFormat(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_GetFlags(This)	\

+    ( (This)->lpVtbl -> GetFlags(This) ) 

+

+#define IDeckLinkVideoInputFrame_v7_1_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+

+#define IDeckLinkVideoInputFrame_v7_1_GetFrameTime(This,frameTime,frameDuration,timeScale)	\

+    ( (This)->lpVtbl -> GetFrameTime(This,frameTime,frameDuration,timeScale) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoInputFrame_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkAudioInputPacket_v7_1 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkAudioInputPacket_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("C86DE4F6-A29F-42E3-AB3A-1363E29F0788")

+    IDeckLinkAudioInputPacket_v7_1 : public IUnknown

+    {

+    public:

+        virtual long STDMETHODCALLTYPE GetSampleCount( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBytes( 

+            void **buffer) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetAudioPacketTime( 

+            BMDTimeValue *packetTime,

+            BMDTimeScale timeScale) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkAudioInputPacket_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkAudioInputPacket_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkAudioInputPacket_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkAudioInputPacket_v7_1 * This);

+        

+        long ( STDMETHODCALLTYPE *GetSampleCount )( 

+            IDeckLinkAudioInputPacket_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBytes )( 

+            IDeckLinkAudioInputPacket_v7_1 * This,

+            void **buffer);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetAudioPacketTime )( 

+            IDeckLinkAudioInputPacket_v7_1 * This,

+            BMDTimeValue *packetTime,

+            BMDTimeScale timeScale);

+        

+        END_INTERFACE

+    } IDeckLinkAudioInputPacket_v7_1Vtbl;

+

+    interface IDeckLinkAudioInputPacket_v7_1

+    {

+        CONST_VTBL struct IDeckLinkAudioInputPacket_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkAudioInputPacket_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkAudioInputPacket_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkAudioInputPacket_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkAudioInputPacket_v7_1_GetSampleCount(This)	\

+    ( (This)->lpVtbl -> GetSampleCount(This) ) 

+

+#define IDeckLinkAudioInputPacket_v7_1_GetBytes(This,buffer)	\

+    ( (This)->lpVtbl -> GetBytes(This,buffer) ) 

+

+#define IDeckLinkAudioInputPacket_v7_1_GetAudioPacketTime(This,packetTime,timeScale)	\

+    ( (This)->lpVtbl -> GetAudioPacketTime(This,packetTime,timeScale) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkAudioInputPacket_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkVideoOutputCallback_v7_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("EBD01AFA-E4B0-49C6-A01D-EDB9D1B55FD9")

+    IDeckLinkVideoOutputCallback_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( 

+            /* [in] */ IDeckLinkVideoFrame_v7_1 *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkVideoOutputCallback_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkVideoOutputCallback_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkVideoOutputCallback_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkVideoOutputCallback_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( 

+            IDeckLinkVideoOutputCallback_v7_1 * This,

+            /* [in] */ IDeckLinkVideoFrame_v7_1 *completedFrame,

+            /* [in] */ BMDOutputFrameCompletionResult result);

+        

+        END_INTERFACE

+    } IDeckLinkVideoOutputCallback_v7_1Vtbl;

+

+    interface IDeckLinkVideoOutputCallback_v7_1

+    {

+        CONST_VTBL struct IDeckLinkVideoOutputCallback_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkVideoOutputCallback_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkVideoOutputCallback_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkVideoOutputCallback_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkVideoOutputCallback_v7_1_ScheduledFrameCompleted(This,completedFrame,result)	\

+    ( (This)->lpVtbl -> ScheduledFrameCompleted(This,completedFrame,result) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkVideoOutputCallback_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInputCallback_v7_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInputCallback_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("7F94F328-5ED4-4E9F-9729-76A86BDC99CC")

+    IDeckLinkInputCallback_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived( 

+            /* [in] */ IDeckLinkVideoInputFrame_v7_1 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket_v7_1 *audioPacket) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInputCallback_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInputCallback_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInputCallback_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInputCallback_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( 

+            IDeckLinkInputCallback_v7_1 * This,

+            /* [in] */ IDeckLinkVideoInputFrame_v7_1 *videoFrame,

+            /* [in] */ IDeckLinkAudioInputPacket_v7_1 *audioPacket);

+        

+        END_INTERFACE

+    } IDeckLinkInputCallback_v7_1Vtbl;

+

+    interface IDeckLinkInputCallback_v7_1

+    {

+        CONST_VTBL struct IDeckLinkInputCallback_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInputCallback_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInputCallback_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInputCallback_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInputCallback_v7_1_VideoInputFrameArrived(This,videoFrame,audioPacket)	\

+    ( (This)->lpVtbl -> VideoInputFrameArrived(This,videoFrame,audioPacket) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInputCallback_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkOutput_v7_1 */

+/* [helpstring][local][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkOutput_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("AE5B3E9B-4E1E-4535-B6E8-480FF52F6CE5")

+    IDeckLinkOutput_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoOutput( 

+            BMDDisplayMode displayMode) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetVideoOutputFrameMemoryAllocator( 

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrame( 

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            IDeckLinkVideoFrame_v7_1 **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE CreateVideoFrameFromBuffer( 

+            void *buffer,

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            IDeckLinkVideoFrame_v7_1 **outFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisplayVideoFrameSync( 

+            IDeckLinkVideoFrame_v7_1 *theFrame) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleVideoFrame( 

+            IDeckLinkVideoFrame_v7_1 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetScheduledFrameCompletionCallback( 

+            /* [in] */ IDeckLinkVideoOutputCallback_v7_1 *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioOutput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioOutput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE WriteAudioSamplesSync( 

+            void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE BeginAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EndAudioPreroll( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ScheduleAudioSamples( 

+            void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE FlushBufferedAudioSamples( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetAudioCallback( 

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartScheduledPlayback( 

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopScheduledPlayback( 

+            BMDTimeValue stopPlaybackAtTime,

+            BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetHardwareReferenceClock( 

+            BMDTimeScale desiredTimeScale,

+            BMDTimeValue *elapsedTimeSinceSchedulerBegan) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkOutput_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDDisplayMode displayMode);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [in] */ IDeckLinkMemoryAllocator *theAllocator);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( 

+            IDeckLinkOutput_v7_1 * This,

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            IDeckLinkVideoFrame_v7_1 **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *CreateVideoFrameFromBuffer )( 

+            IDeckLinkOutput_v7_1 * This,

+            void *buffer,

+            long width,

+            long height,

+            long rowBytes,

+            BMDPixelFormat pixelFormat,

+            BMDFrameFlags flags,

+            IDeckLinkVideoFrame_v7_1 **outFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( 

+            IDeckLinkOutput_v7_1 * This,

+            IDeckLinkVideoFrame_v7_1 *theFrame);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( 

+            IDeckLinkOutput_v7_1 * This,

+            IDeckLinkVideoFrame_v7_1 *theFrame,

+            BMDTimeValue displayTime,

+            BMDTimeValue displayDuration,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [in] */ IDeckLinkVideoOutputCallback_v7_1 *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( 

+            IDeckLinkOutput_v7_1 * This,

+            void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( 

+            IDeckLinkOutput_v7_1 * This,

+            void *buffer,

+            unsigned long sampleFrameCount,

+            BMDTimeValue streamTime,

+            BMDTimeScale timeScale,

+            /* [out] */ unsigned long *sampleFramesWritten);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [out] */ unsigned long *bufferedSampleCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( 

+            IDeckLinkOutput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( 

+            IDeckLinkOutput_v7_1 * This,

+            /* [in] */ IDeckLinkAudioOutputCallback *theCallback);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDTimeValue playbackStartTime,

+            BMDTimeScale timeScale,

+            double playbackSpeed);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDTimeValue stopPlaybackAtTime,

+            BMDTimeValue *actualStopTime,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( 

+            IDeckLinkOutput_v7_1 * This,

+            BMDTimeScale desiredTimeScale,

+            BMDTimeValue *elapsedTimeSinceSchedulerBegan);

+        

+        END_INTERFACE

+    } IDeckLinkOutput_v7_1Vtbl;

+

+    interface IDeckLinkOutput_v7_1

+    {

+        CONST_VTBL struct IDeckLinkOutput_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkOutput_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkOutput_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkOutput_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkOutput_v7_1_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkOutput_v7_1_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkOutput_v7_1_EnableVideoOutput(This,displayMode)	\

+    ( (This)->lpVtbl -> EnableVideoOutput(This,displayMode) ) 

+

+#define IDeckLinkOutput_v7_1_DisableVideoOutput(This)	\

+    ( (This)->lpVtbl -> DisableVideoOutput(This) ) 

+

+#define IDeckLinkOutput_v7_1_SetVideoOutputFrameMemoryAllocator(This,theAllocator)	\

+    ( (This)->lpVtbl -> SetVideoOutputFrameMemoryAllocator(This,theAllocator) ) 

+

+#define IDeckLinkOutput_v7_1_CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrame(This,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_v7_1_CreateVideoFrameFromBuffer(This,buffer,width,height,rowBytes,pixelFormat,flags,outFrame)	\

+    ( (This)->lpVtbl -> CreateVideoFrameFromBuffer(This,buffer,width,height,rowBytes,pixelFormat,flags,outFrame) ) 

+

+#define IDeckLinkOutput_v7_1_DisplayVideoFrameSync(This,theFrame)	\

+    ( (This)->lpVtbl -> DisplayVideoFrameSync(This,theFrame) ) 

+

+#define IDeckLinkOutput_v7_1_ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale)	\

+    ( (This)->lpVtbl -> ScheduleVideoFrame(This,theFrame,displayTime,displayDuration,timeScale) ) 

+

+#define IDeckLinkOutput_v7_1_SetScheduledFrameCompletionCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetScheduledFrameCompletionCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_1_EnableAudioOutput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioOutput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkOutput_v7_1_DisableAudioOutput(This)	\

+    ( (This)->lpVtbl -> DisableAudioOutput(This) ) 

+

+#define IDeckLinkOutput_v7_1_WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> WriteAudioSamplesSync(This,buffer,sampleFrameCount,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_1_BeginAudioPreroll(This)	\

+    ( (This)->lpVtbl -> BeginAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_1_EndAudioPreroll(This)	\

+    ( (This)->lpVtbl -> EndAudioPreroll(This) ) 

+

+#define IDeckLinkOutput_v7_1_ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten)	\

+    ( (This)->lpVtbl -> ScheduleAudioSamples(This,buffer,sampleFrameCount,streamTime,timeScale,sampleFramesWritten) ) 

+

+#define IDeckLinkOutput_v7_1_GetBufferedAudioSampleFrameCount(This,bufferedSampleCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleCount) ) 

+

+#define IDeckLinkOutput_v7_1_FlushBufferedAudioSamples(This)	\

+    ( (This)->lpVtbl -> FlushBufferedAudioSamples(This) ) 

+

+#define IDeckLinkOutput_v7_1_SetAudioCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetAudioCallback(This,theCallback) ) 

+

+#define IDeckLinkOutput_v7_1_StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed)	\

+    ( (This)->lpVtbl -> StartScheduledPlayback(This,playbackStartTime,timeScale,playbackSpeed) ) 

+

+#define IDeckLinkOutput_v7_1_StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale)	\

+    ( (This)->lpVtbl -> StopScheduledPlayback(This,stopPlaybackAtTime,actualStopTime,timeScale) ) 

+

+#define IDeckLinkOutput_v7_1_GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan)	\

+    ( (This)->lpVtbl -> GetHardwareReferenceClock(This,desiredTimeScale,elapsedTimeSinceSchedulerBegan) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkOutput_v7_1_INTERFACE_DEFINED__ */

+

+

+#ifndef __IDeckLinkInput_v7_1_INTERFACE_DEFINED__

+#define __IDeckLinkInput_v7_1_INTERFACE_DEFINED__

+

+/* interface IDeckLinkInput_v7_1 */

+/* [helpstring][uuid][object] */ 

+

+

+EXTERN_C const IID IID_IDeckLinkInput_v7_1;

+

+#if defined(__cplusplus) && !defined(CINTERFACE)

+    

+    MIDL_INTERFACE("2B54EDEF-5B32-429F-BA11-BB990596EACD")

+    IDeckLinkInput_v7_1 : public IUnknown

+    {

+    public:

+        virtual HRESULT STDMETHODCALLTYPE DoesSupportVideoMode( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetDisplayModeIterator( 

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableVideoInput( 

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableVideoInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE EnableAudioInput( 

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE DisableAudioInput( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE ReadAudioSamples( 

+            void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesRead,

+            /* [out] */ BMDTimeValue *audioPacketTime,

+            BMDTimeScale timeScale) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE GetBufferedAudioSampleFrameCount( 

+            /* [out] */ unsigned long *bufferedSampleCount) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StartStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE StopStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE PauseStreams( void) = 0;

+        

+        virtual HRESULT STDMETHODCALLTYPE SetCallback( 

+            /* [in] */ IDeckLinkInputCallback_v7_1 *theCallback) = 0;

+        

+    };

+    

+    

+#else 	/* C style interface */

+

+    typedef struct IDeckLinkInput_v7_1Vtbl

+    {

+        BEGIN_INTERFACE

+        

+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 

+            IDeckLinkInput_v7_1 * This,

+            /* [in] */ REFIID riid,

+            /* [annotation][iid_is][out] */ 

+            _COM_Outptr_  void **ppvObject);

+        

+        ULONG ( STDMETHODCALLTYPE *AddRef )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        ULONG ( STDMETHODCALLTYPE *Release )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( 

+            IDeckLinkInput_v7_1 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            /* [out] */ BMDDisplayModeSupport *result);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( 

+            IDeckLinkInput_v7_1 * This,

+            /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( 

+            IDeckLinkInput_v7_1 * This,

+            BMDDisplayMode displayMode,

+            BMDPixelFormat pixelFormat,

+            BMDVideoInputFlags flags);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( 

+            IDeckLinkInput_v7_1 * This,

+            BMDAudioSampleRate sampleRate,

+            BMDAudioSampleType sampleType,

+            unsigned long channelCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *ReadAudioSamples )( 

+            IDeckLinkInput_v7_1 * This,

+            void *buffer,

+            unsigned long sampleFrameCount,

+            /* [out] */ unsigned long *sampleFramesRead,

+            /* [out] */ BMDTimeValue *audioPacketTime,

+            BMDTimeScale timeScale);

+        

+        HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( 

+            IDeckLinkInput_v7_1 * This,

+            /* [out] */ unsigned long *bufferedSampleCount);

+        

+        HRESULT ( STDMETHODCALLTYPE *StartStreams )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *StopStreams )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *PauseStreams )( 

+            IDeckLinkInput_v7_1 * This);

+        

+        HRESULT ( STDMETHODCALLTYPE *SetCallback )( 

+            IDeckLinkInput_v7_1 * This,

+            /* [in] */ IDeckLinkInputCallback_v7_1 *theCallback);

+        

+        END_INTERFACE

+    } IDeckLinkInput_v7_1Vtbl;

+

+    interface IDeckLinkInput_v7_1

+    {

+        CONST_VTBL struct IDeckLinkInput_v7_1Vtbl *lpVtbl;

+    };

+

+    

+

+#ifdef COBJMACROS

+

+

+#define IDeckLinkInput_v7_1_QueryInterface(This,riid,ppvObject)	\

+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 

+

+#define IDeckLinkInput_v7_1_AddRef(This)	\

+    ( (This)->lpVtbl -> AddRef(This) ) 

+

+#define IDeckLinkInput_v7_1_Release(This)	\

+    ( (This)->lpVtbl -> Release(This) ) 

+

+

+#define IDeckLinkInput_v7_1_DoesSupportVideoMode(This,displayMode,pixelFormat,result)	\

+    ( (This)->lpVtbl -> DoesSupportVideoMode(This,displayMode,pixelFormat,result) ) 

+

+#define IDeckLinkInput_v7_1_GetDisplayModeIterator(This,iterator)	\

+    ( (This)->lpVtbl -> GetDisplayModeIterator(This,iterator) ) 

+

+#define IDeckLinkInput_v7_1_EnableVideoInput(This,displayMode,pixelFormat,flags)	\

+    ( (This)->lpVtbl -> EnableVideoInput(This,displayMode,pixelFormat,flags) ) 

+

+#define IDeckLinkInput_v7_1_DisableVideoInput(This)	\

+    ( (This)->lpVtbl -> DisableVideoInput(This) ) 

+

+#define IDeckLinkInput_v7_1_EnableAudioInput(This,sampleRate,sampleType,channelCount)	\

+    ( (This)->lpVtbl -> EnableAudioInput(This,sampleRate,sampleType,channelCount) ) 

+

+#define IDeckLinkInput_v7_1_DisableAudioInput(This)	\

+    ( (This)->lpVtbl -> DisableAudioInput(This) ) 

+

+#define IDeckLinkInput_v7_1_ReadAudioSamples(This,buffer,sampleFrameCount,sampleFramesRead,audioPacketTime,timeScale)	\

+    ( (This)->lpVtbl -> ReadAudioSamples(This,buffer,sampleFrameCount,sampleFramesRead,audioPacketTime,timeScale) ) 

+

+#define IDeckLinkInput_v7_1_GetBufferedAudioSampleFrameCount(This,bufferedSampleCount)	\

+    ( (This)->lpVtbl -> GetBufferedAudioSampleFrameCount(This,bufferedSampleCount) ) 

+

+#define IDeckLinkInput_v7_1_StartStreams(This)	\

+    ( (This)->lpVtbl -> StartStreams(This) ) 

+

+#define IDeckLinkInput_v7_1_StopStreams(This)	\

+    ( (This)->lpVtbl -> StopStreams(This) ) 

+

+#define IDeckLinkInput_v7_1_PauseStreams(This)	\

+    ( (This)->lpVtbl -> PauseStreams(This) ) 

+

+#define IDeckLinkInput_v7_1_SetCallback(This,theCallback)	\

+    ( (This)->lpVtbl -> SetCallback(This,theCallback) ) 

+

+#endif /* COBJMACROS */

+

+

+#endif 	/* C style interface */

+

+

+

+

+#endif 	/* __IDeckLinkInput_v7_1_INTERFACE_DEFINED__ */

+

+#endif /* __DeckLinkAPI_LIBRARY_DEFINED__ */

+

+/* Additional Prototypes for ALL interfaces */

+

+/* end of Additional Prototypes */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif

+

+

diff --git a/sys/decklink/win/DeckLinkAPI_i.c b/sys/decklink/win/DeckLinkAPI_i.c
deleted file mode 100644
index ca14206..0000000
--- a/sys/decklink/win/DeckLinkAPI_i.c
+++ /dev/null
@@ -1,319 +0,0 @@
-
-
-/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
-
-/* link this file in with the server and any clients */
-
-
- /* File created by MIDL compiler version 7.00.0500 */
-/* at Fri Jun 17 10:43:51 2011
- */
-/* Compiler settings for .\win\DeckLinkAPI.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )        /* more than 64k source lines */
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-#include <rpc.h>
-#include <rpcndr.h>
-
-#ifdef _MIDL_USE_GUIDDEF_
-
-#ifndef INITGUID
-#define INITGUID
-#include <guiddef.h>
-#undef INITGUID
-#else
-#include <guiddef.h>
-#endif
-
-#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
-        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
-
-#else                           // !_MIDL_USE_GUIDDEF_
-
-#ifndef __IID_DEFINED__
-#define __IID_DEFINED__
-
-  typedef struct _IID
-  {
-    unsigned long x;
-    unsigned short s1;
-    unsigned short s2;
-    unsigned char c[8];
-  } IID;
-
-#endif                          // __IID_DEFINED__
-
-#ifndef CLSID_DEFINED
-#define CLSID_DEFINED
-  typedef IID CLSID;
-#endif                          // CLSID_DEFINED
-
-#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
-        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-
-#endif                          /* !_MIDL_USE_GUIDDEF_ */
-
-    MIDL_DEFINE_GUID (IID, LIBID_DeckLinkAPI, 0xD864517A, 0xEDD5, 0x466D, 0x86,
-      0x7D, 0xC8, 0x19, 0xF1, 0xC0, 0x52, 0xBB);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoOutputCallback, 0x20AA5225, 0x1958,
-      0x47CB, 0x82, 0x0B, 0x80, 0xA8, 0xD5, 0x21, 0xA6, 0xEE);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInputCallback, 0xDD04E5EC, 0x7415,
-      0x42AB, 0xAE, 0x4A, 0xE8, 0x0C, 0x4D, 0xFC, 0x04, 0x4A);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkMemoryAllocator, 0xB36EB6E7, 0x9D29,
-      0x4AA8, 0x92, 0xEF, 0x84, 0x3B, 0x87, 0xA2, 0x89, 0xE8);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkAudioOutputCallback, 0x403C681B, 0x7F46,
-      0x4A12, 0xB9, 0x93, 0x2B, 0xB1, 0x27, 0x08, 0x4E, 0xE6);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkIterator, 0x74E936FC, 0xCC28, 0x4A67,
-      0x81, 0xA0, 0x1E, 0x94, 0xE5, 0x2D, 0x4E, 0x69);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkAPIInformation, 0x7BEA3C68, 0x730D,
-      0x4322, 0xAF, 0x34, 0x8A, 0x71, 0x52, 0xB5, 0x32, 0xA4);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayModeIterator, 0x9C88499F, 0xF601,
-      0x4021, 0xB8, 0x0B, 0x03, 0x2E, 0x4E, 0xB4, 0x1C, 0x35);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayMode, 0x3EB2C1AB, 0x0A3D, 0x4523,
-      0xA3, 0xAD, 0xF4, 0x0D, 0x7F, 0xB1, 0x4E, 0x78);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLink, 0x62BFF75D, 0x6569, 0x4E55, 0x8D,
-      0x4D, 0x66, 0xAA, 0x03, 0x82, 0x9A, 0xBC);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkOutput, 0xA3EF0963, 0x0862, 0x44ED,
-      0x92, 0xA9, 0xEE, 0x89, 0xAB, 0xF4, 0x31, 0xC7);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInput, 0x6D40EF78, 0x28B9, 0x4E21, 0x99,
-      0x0D, 0x95, 0xBB, 0x77, 0x50, 0xA0, 0x4F);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkTimecode, 0xBC6CFBD3, 0x8317, 0x4325,
-      0xAC, 0x1C, 0x12, 0x16, 0x39, 0x1E, 0x93, 0x40);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoFrame, 0x3F716FE0, 0xF023, 0x4111,
-      0xBE, 0x5D, 0xEF, 0x44, 0x14, 0xC0, 0x5B, 0x17);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkMutableVideoFrame, 0x69E2639F, 0x40DA,
-      0x4E19, 0xB6, 0xF2, 0x20, 0xAC, 0xE8, 0x15, 0xC3, 0x90);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoFrame3DExtensions, 0xDA0F7E4A,
-      0xEDC7, 0x48A8, 0x9C, 0xDD, 0x2D, 0xB5, 0x1C, 0x72, 0x9C, 0xD7);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoInputFrame, 0x05CFE374, 0x537C,
-      0x4094, 0x9A, 0x57, 0x68, 0x05, 0x25, 0x11, 0x8F, 0x44);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoFrameAncillary, 0x732E723C, 0xD1A4,
-      0x4E29, 0x9E, 0x8E, 0x4A, 0x88, 0x79, 0x7A, 0x00, 0x04);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkAudioInputPacket, 0xE43D5870, 0x2894,
-      0x11DE, 0x8C, 0x30, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkScreenPreviewCallback, 0xB1D3F49A,
-      0x85FE, 0x4C5D, 0x95, 0xC8, 0x0B, 0x5D, 0x5D, 0xCC, 0xD4, 0x38);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkGLScreenPreviewHelper, 0x504E2209,
-      0xCAC7, 0x4C1A, 0x9F, 0xB4, 0xC5, 0xBB, 0x62, 0x74, 0xD2, 0x2F);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkConfiguration, 0xC679A35B, 0x610C,
-      0x4D09, 0xB7, 0x48, 0x1D, 0x04, 0x78, 0x10, 0x0F, 0xC0);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkAttributes, 0xABC11843, 0xD966, 0x44CB,
-      0x96, 0xE2, 0xA1, 0xCB, 0x5D, 0x31, 0x35, 0xC4);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkKeyer, 0x89AFCAF5, 0x65F8, 0x421E, 0x98,
-      0xF7, 0x96, 0xFE, 0x5F, 0x5B, 0xFB, 0xA3);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoConversion, 0x3BBCB8A2, 0xDA2C,
-      0x42D9, 0xB5, 0xD8, 0x88, 0x08, 0x36, 0x44, 0xE9, 0x9A);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDeckControlStatusCallback, 0xE5F693C1,
-      0x4283, 0x4716, 0xB1, 0x8F, 0xC1, 0x43, 0x15, 0x21, 0x95, 0x5B);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDeckControl, 0x522A9E39, 0x0F3C, 0x4742,
-      0x94, 0xEE, 0xD8, 0x0D, 0xE3, 0x35, 0xDA, 0x1D);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkIterator, 0xD9EDA3B3, 0x2887,
-      0x41FA, 0xB7, 0x24, 0x01, 0x7C, 0xF1, 0xEB, 0x1D, 0x37);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkAPIInformation, 0x263CA19F, 0xED09,
-      0x482E, 0x9F, 0x9D, 0x84, 0x00, 0x57, 0x83, 0xA2, 0x37);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkGLScreenPreviewHelper, 0xF63E77C7,
-      0xB655, 0x4A4A, 0x9A, 0xD0, 0x3C, 0xA8, 0x5D, 0x39, 0x43, 0x43);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkVideoConversion, 0x7DBBBB11, 0x5B7B,
-      0x467D, 0xAE, 0xA4, 0xCE, 0xA4, 0x68, 0xFD, 0x36, 0x8C);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDeckControl_v7_9, 0xA4D81043, 0x0619,
-      0x42B7, 0x8E, 0xD6, 0x60, 0x2D, 0x29, 0x04, 0x1D, 0xF7);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayModeIterator_v7_6, 0x455D741F,
-      0x1779, 0x4800, 0x86, 0xF5, 0x0B, 0x5D, 0x13, 0xD7, 0x97, 0x51);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayMode_v7_6, 0x87451E84, 0x2B7E,
-      0x439E, 0xA6, 0x29, 0x43, 0x93, 0xEA, 0x4A, 0x85, 0x50);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkOutput_v7_6, 0x29228142, 0xEB8C, 0x4141,
-      0xA6, 0x21, 0xF7, 0x40, 0x26, 0x45, 0x09, 0x55);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInput_v7_6, 0x300C135A, 0x9F43, 0x48E2,
-      0x99, 0x06, 0x6D, 0x79, 0x11, 0xD9, 0x3C, 0xF1);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkTimecode_v7_6, 0xEFB9BCA6, 0xA521,
-      0x44F7, 0xBD, 0x69, 0x23, 0x32, 0xF2, 0x4D, 0x9E, 0xE6);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoFrame_v7_6, 0xA8D8238E, 0x6B18,
-      0x4196, 0x99, 0xE1, 0x5A, 0xF7, 0x17, 0xB8, 0x3D, 0x32);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkMutableVideoFrame_v7_6, 0x46FCEE00,
-      0xB4E6, 0x43D0, 0x91, 0xC0, 0x02, 0x3A, 0x7F, 0xCE, 0xB3, 0x4F);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoInputFrame_v7_6, 0x9A74FA41,
-      0xAE9F, 0x47AC, 0x8C, 0xF4, 0x01, 0xF4, 0x2D, 0xD5, 0x99, 0x65);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkScreenPreviewCallback_v7_6, 0x373F499D,
-      0x4B4D, 0x4518, 0xAD, 0x22, 0x63, 0x54, 0xE5, 0xA5, 0x82, 0x5E);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkGLScreenPreviewHelper_v7_6, 0xBA575CD9,
-      0xA15E, 0x497B, 0xB2, 0xC2, 0xF9, 0xAF, 0xE7, 0xBE, 0x4E, 0xBA);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoConversion_v7_6, 0x3EB504C9,
-      0xF97D, 0x40FE, 0xA1, 0x58, 0xD4, 0x07, 0xD4, 0x8C, 0xB5, 0x3B);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkConfiguration_v7_6, 0xB8EAD569, 0xB764,
-      0x47F0, 0xA7, 0x3F, 0xAE, 0x40, 0xDF, 0x6C, 0xBF, 0x10);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoOutputCallback_v7_6, 0xE763A626,
-      0x4A3C, 0x49D1, 0xBF, 0x13, 0xE7, 0xAD, 0x36, 0x92, 0xAE, 0x52);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInputCallback_v7_6, 0x31D28EE7, 0x88B6,
-      0x4CB1, 0x89, 0x7A, 0xCD, 0xBF, 0x79, 0xA2, 0x64, 0x14);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkGLScreenPreviewHelper_v7_6,
-      0xD398CEE7, 0x4434, 0x4CA3, 0x9B, 0xA6, 0x5A, 0xE3, 0x45, 0x56, 0xB9,
-      0x05);
-
-
-    MIDL_DEFINE_GUID (CLSID, CLSID_CDeckLinkVideoConversion_v7_6, 0xFFA84F77,
-      0x73BE, 0x4FB7, 0xB0, 0x3E, 0xB5, 0xE4, 0x4B, 0x9F, 0x75, 0x9B);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInputCallback_v7_3, 0xFD6F311D, 0x4D00,
-      0x444B, 0x9E, 0xD4, 0x1F, 0x25, 0xB5, 0x73, 0x0A, 0xD0);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkOutput_v7_3, 0x271C65E3, 0xC323, 0x4344,
-      0xA3, 0x0F, 0xD9, 0x08, 0xBC, 0xB2, 0x0A, 0xA3);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInput_v7_3, 0x4973F012, 0x9925, 0x458C,
-      0x87, 0x1C, 0x18, 0x77, 0x4C, 0xDB, 0xBE, 0xCB);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoInputFrame_v7_3, 0xCF317790,
-      0x2894, 0x11DE, 0x8C, 0x30, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayModeIterator_v7_1, 0xB28131B6,
-      0x59AC, 0x4857, 0xB5, 0xAC, 0xCD, 0x75, 0xD5, 0x88, 0x3E, 0x2F);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkDisplayMode_v7_1, 0xAF0CD6D5, 0x8376,
-      0x435E, 0x84, 0x33, 0x54, 0xF9, 0xDD, 0x53, 0x0A, 0xC3);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoFrame_v7_1, 0x333F3A10, 0x8C2D,
-      0x43CF, 0xB7, 0x9D, 0x46, 0x56, 0x0F, 0xEE, 0xA1, 0xCE);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoInputFrame_v7_1, 0xC8B41D95,
-      0x8848, 0x40EE, 0x9B, 0x37, 0x6E, 0x34, 0x17, 0xFB, 0x11, 0x4B);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkAudioInputPacket_v7_1, 0xC86DE4F6,
-      0xA29F, 0x42E3, 0xAB, 0x3A, 0x13, 0x63, 0xE2, 0x9F, 0x07, 0x88);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkVideoOutputCallback_v7_1, 0xEBD01AFA,
-      0xE4B0, 0x49C6, 0xA0, 0x1D, 0xED, 0xB9, 0xD1, 0xB5, 0x5F, 0xD9);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInputCallback_v7_1, 0x7F94F328, 0x5ED4,
-      0x4E9F, 0x97, 0x29, 0x76, 0xA8, 0x6B, 0xDC, 0x99, 0xCC);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkOutput_v7_1, 0xAE5B3E9B, 0x4E1E, 0x4535,
-      0xB6, 0xE8, 0x48, 0x0F, 0xF5, 0x2F, 0x6C, 0xE5);
-
-
-    MIDL_DEFINE_GUID (IID, IID_IDeckLinkInput_v7_1, 0x2B54EDEF, 0x5B32, 0x429F,
-      0xBA, 0x11, 0xBB, 0x99, 0x05, 0x96, 0xEA, 0xCD);
-
-#undef MIDL_DEFINE_GUID
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/sys/directdraw/Makefile.am b/sys/directdraw/Makefile.am
deleted file mode 100644
index f6bbb16..0000000
--- a/sys/directdraw/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-plugin_LTLIBRARIES = libgstdirectdrawsink.la
-
-libgstdirectdrawsink_la_SOURCES =  gstdirectdrawsink.c gstdirectdrawplugin.c
-libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
-	$(GST_PLUGINS_BASE_CFLAGS) $(DIRECTX_CFLAGS)
-libgstdirectdrawsink_la_LIBADD = \
-	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-	-lgstinterfaces-$(GST_API_VERSION) \
-	 $(DIRECTX_LDFLAGS) $(DIRECTDRAW_LIBS)
-libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstdirectdrawsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-noinst_HEADERS= gstdirectdrawsink.h
diff --git a/sys/directdraw/Makefile.in b/sys/directdraw/Makefile.in
deleted file mode 100644
index c1dccae..0000000
--- a/sys/directdraw/Makefile.in
+++ /dev/null
@@ -1,1080 +0,0 @@
-# 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 = sys/directdraw
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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)$(plugindir)"
-LTLIBRARIES = $(plugin_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libgstdirectdrawsink_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstdirectdrawsink_la_OBJECTS =  \
-	libgstdirectdrawsink_la-gstdirectdrawsink.lo \
-	libgstdirectdrawsink_la-gstdirectdrawplugin.lo
-libgstdirectdrawsink_la_OBJECTS =  \
-	$(am_libgstdirectdrawsink_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 = 
-libgstdirectdrawsink_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstdirectdrawsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(libgstdirectdrawsink_la_CFLAGS) \
-	$(CFLAGS) $(libgstdirectdrawsink_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 = $(libgstdirectdrawsink_la_SOURCES)
-DIST_SOURCES = $(libgstdirectdrawsink_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@
-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 = libgstdirectdrawsink.la
-libgstdirectdrawsink_la_SOURCES = gstdirectdrawsink.c gstdirectdrawplugin.c
-libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
-	$(GST_PLUGINS_BASE_CFLAGS) $(DIRECTX_CFLAGS)
-
-libgstdirectdrawsink_la_LIBADD = \
-	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-	-lgstinterfaces-$(GST_API_VERSION) \
-	 $(DIRECTX_LDFLAGS) $(DIRECTDRAW_LIBS)
-
-libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstdirectdrawsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = gstdirectdrawsink.h
-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 sys/directdraw/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sys/directdraw/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-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}; \
-	}
-
-libgstdirectdrawsink.la: $(libgstdirectdrawsink_la_OBJECTS) $(libgstdirectdrawsink_la_DEPENDENCIES) $(EXTRA_libgstdirectdrawsink_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstdirectdrawsink_la_LINK) -rpath $(plugindir) $(libgstdirectdrawsink_la_OBJECTS) $(libgstdirectdrawsink_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawplugin.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawsink.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 $@ $<
-
-libgstdirectdrawsink_la-gstdirectdrawsink.lo: gstdirectdrawsink.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdirectdrawsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdirectdrawsink_la_CFLAGS) $(CFLAGS) -MT libgstdirectdrawsink_la-gstdirectdrawsink.lo -MD -MP -MF $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawsink.Tpo -c -o libgstdirectdrawsink_la-gstdirectdrawsink.lo `test -f 'gstdirectdrawsink.c' || echo '$(srcdir)/'`gstdirectdrawsink.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawsink.Tpo $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawsink.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdirectdrawsink.c' object='libgstdirectdrawsink_la-gstdirectdrawsink.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 $(libgstdirectdrawsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdirectdrawsink_la_CFLAGS) $(CFLAGS) -c -o libgstdirectdrawsink_la-gstdirectdrawsink.lo `test -f 'gstdirectdrawsink.c' || echo '$(srcdir)/'`gstdirectdrawsink.c
-
-libgstdirectdrawsink_la-gstdirectdrawplugin.lo: gstdirectdrawplugin.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstdirectdrawsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdirectdrawsink_la_CFLAGS) $(CFLAGS) -MT libgstdirectdrawsink_la-gstdirectdrawplugin.lo -MD -MP -MF $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawplugin.Tpo -c -o libgstdirectdrawsink_la-gstdirectdrawplugin.lo `test -f 'gstdirectdrawplugin.c' || echo '$(srcdir)/'`gstdirectdrawplugin.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawplugin.Tpo $(DEPDIR)/libgstdirectdrawsink_la-gstdirectdrawplugin.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstdirectdrawplugin.c' object='libgstdirectdrawsink_la-gstdirectdrawplugin.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 $(libgstdirectdrawsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstdirectdrawsink_la_CFLAGS) $(CFLAGS) -c -o libgstdirectdrawsink_la-gstdirectdrawplugin.lo `test -f 'gstdirectdrawplugin.c' || echo '$(srcdir)/'`gstdirectdrawplugin.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
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; 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:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-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: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-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
-
-
-# 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/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c
deleted file mode 100644
index 38267c6..0000000
--- a/sys/directdraw/gstdirectdrawplugin.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* GStreamer
-* Copyright (C) 2005 Sebastien Moutte <sebastien@moutte.net>
-* Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com>
-*
-* gstdirectdrawplugin.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.
-*
-* The development of this code was made possible due to the involvement
-* of Pioneers of the Inevitable, the creators of the Songbird Music player
-*
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstdirectdrawsink.h"
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  if (!gst_element_register (plugin, "directdrawsink", GST_RANK_SECONDARY,
-          GST_TYPE_DIRECTDRAW_SINK))
-    return FALSE;
-
-  return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    directdraw,
-    "Direct Draw plugin library",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c
deleted file mode 100644
index 99140f2..0000000
--- a/sys/directdraw/gstdirectdrawsink.c
+++ /dev/null
@@ -1,2208 +0,0 @@
-/* GStreamer
- * Copyright (C) 2005 Sebastien Moutte <sebastien@moutte.net>
- * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.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.
- *
- * The development of this code was made possible due to the involvement
- * of Pioneers of the Inevitable, the creators of the Songbird Music player
- *
- */
-
-/**
- * SECTION:element-directdrawsink
- *
- * DirectdrawSink renders video RGB frames to any win32 window. This element
- * can receive a window ID from the application through the #XOverlay interface
- * and will then render video frames in this window.
- * If no Window ID was provided by the application, the element will create its
- * own internal window and render into it.
- *
- * <refsect2>
- * <title>Example pipelines</title>
- * |[
- * gst-launch -v videotestsrc ! directdrawsink
- * ]| a simple pipeline to test the sink
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gstdirectdrawsink.h"
-#include <gst/video/video.h>
-
-GST_DEBUG_CATEGORY_STATIC (directdrawsink_debug);
-#define GST_CAT_DEFAULT directdrawsink_debug
-
-static void gst_directdraw_sink_init_interfaces (GType type);
-
-GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdraw_sink, GstVideoSink,
-    GST_TYPE_VIDEO_SINK, gst_directdraw_sink_init_interfaces);
-
-static void gst_directdraw_sink_finalize (GObject * object);
-static void gst_directdraw_sink_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec);
-static void gst_directdraw_sink_get_property (GObject * object,
-    guint prop_id, GValue * value, GParamSpec * pspec);
-static GstCaps *gst_directdraw_sink_get_caps (GstBaseSink * bsink);
-static gboolean gst_directdraw_sink_set_caps (GstBaseSink * bsink,
-    GstCaps * caps);
-static GstStateChangeReturn gst_directdraw_sink_change_state (GstElement *
-    element, GstStateChange transition);
-static GstFlowReturn gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink,
-    guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf);
-static void gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
-    GstClockTime * start, GstClockTime * end);
-static GstFlowReturn gst_directdraw_sink_show_frame (GstBaseSink * bsink,
-    GstBuffer * buf);
-
-/* utils */
-static gboolean gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink);
-static gboolean gst_directdraw_sink_create_default_window (GstDirectDrawSink *
-    ddrawsink);
-static gboolean gst_directdraw_sink_check_primary_surface (GstDirectDrawSink *
-    ddrawsink);
-static gboolean gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink *
-    ddrawsink);
-static GstCaps *gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink *
-    ddrawsink);
-static GstCaps
-    * gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc);
-static void gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink);
-static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink *
-    ddrawsink);
-static int gst_directdraw_sink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat);
-static gboolean gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink *
-    ddrawsink, GstCaps * caps, DDPIXELFORMAT * pPixelFormat);
-static void gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink,
-    RECT src, RECT dst, RECT * result);
-static const char *DDErrorString (HRESULT hr);
-static long FAR PASCAL WndProc (HWND hWnd, UINT message, WPARAM wParam,
-    LPARAM lParam);
-
-/* surfaces management functions */
-static void gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink,
-    GstDDrawSurface * surface);
-static GstDDrawSurface *gst_directdraw_sink_surface_create (GstDirectDrawSink *
-    ddrawsink, GstCaps * caps, size_t size);
-static gboolean gst_directdraw_sink_surface_check (GstDirectDrawSink *
-    ddrawsink, GstDDrawSurface * surface);
-
-static GstStaticPadTemplate directdrawsink_sink_factory =
-GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-raw-rgb, "
-        "framerate = (fraction) [ 0, MAX ], "
-        "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")
-    );
-
-enum
-{
-  PROP_0,
-  PROP_KEEP_ASPECT_RATIO
-};
-
-/* XOverlay interface implementation */
-static gboolean
-gst_directdraw_sink_interface_supported (GstImplementsInterface * iface,
-    GType type)
-{
-  if (type == GST_TYPE_X_OVERLAY)
-    return TRUE;
-  else if (type == GST_TYPE_NAVIGATION)
-    return TRUE;
-  return FALSE;
-}
-
-static void
-gst_directdraw_sink_interface_init (GstImplementsInterfaceClass * klass)
-{
-  klass->supported = gst_directdraw_sink_interface_supported;
-}
-
-static void
-gst_directdraw_sink_set_window_handle (GstXOverlay * overlay,
-    guintptr window_handle)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay);
-
-  GST_OBJECT_LOCK (ddrawsink);
-  /* check if we are already using this window id */
-  if (ddrawsink->video_window == (HWND) window_handle) {
-    GST_OBJECT_UNLOCK (ddrawsink);
-    return;
-  }
-
-  if (window_handle) {
-    HRESULT hres;
-    RECT rect;
-
-    /* If we had an internal window, close it first */
-    if (ddrawsink->video_window && ddrawsink->our_video_window) {
-      /* Trick to let the event thread know that it has to die silently */
-      ddrawsink->our_video_window = FALSE;
-      /* Post quit message and wait for our event window thread */
-      PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0);
-    }
-
-    ddrawsink->video_window = (HWND) window_handle;
-    ddrawsink->our_video_window = FALSE;
-
-    /* Hook WndProc and user_data */
-    ddrawsink->previous_user_data = (LONG_PTR) SetWindowLongPtr (
-        (HWND) window_handle, GWLP_USERDATA, (LONG_PTR) ddrawsink);
-    ddrawsink->previous_wndproc = (WNDPROC) SetWindowLongPtr (
-        (HWND) window_handle, GWLP_WNDPROC, (LONG_PTR) WndProc);
-    if (!ddrawsink->previous_wndproc)
-      GST_DEBUG_OBJECT (ddrawsink, "Failed to hook previous WndProc");
-
-    /* Get initial window size. If it changes, we will track it from the
-     * WndProc. */
-    GetClientRect ((HWND) window_handle, &rect);
-    ddrawsink->out_width = rect.right - rect.left;
-    ddrawsink->out_height = rect.bottom - rect.top;
-
-    if (ddrawsink->setup) {
-      /* update the clipper object with the new window */
-      hres = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0,
-          ddrawsink->video_window);
-    }
-  }
-  /* FIXME: Handle the case where window_handle is 0 and we want the sink to
-   * create a new window when playback was already started (after set_caps) */
-  GST_OBJECT_UNLOCK (ddrawsink);
-}
-
-static void
-gst_directdraw_sink_expose (GstXOverlay * overlay)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay);
-
-  gst_directdraw_sink_show_frame (GST_BASE_SINK (ddrawsink), NULL);
-}
-
-static void
-gst_directdraw_sink_xoverlay_interface_init (GstXOverlayClass * iface)
-{
-  iface->set_window_handle = gst_directdraw_sink_set_window_handle;
-  iface->expose = gst_directdraw_sink_expose;
-}
-
-static void
-gst_directdraw_sink_navigation_send_event (GstNavigation * navigation,
-    GstStructure * structure)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (navigation);
-  GstEvent *event;
-  GstVideoRectangle src = { 0, };
-  GstVideoRectangle dst = { 0, };
-  GstVideoRectangle result;
-  RECT rect;
-  gdouble x, y, old_x, old_y, xscale = 1.0, yscale = 1.0;
-  GstPad *pad = NULL;
-
-  src.w = GST_VIDEO_SINK_WIDTH (ddrawsink);
-  src.h = GST_VIDEO_SINK_HEIGHT (ddrawsink);
-  GetClientRect ((HWND) ddrawsink->video_window, &rect);
-  ddrawsink->out_width = rect.right - rect.left;
-  ddrawsink->out_height = rect.bottom - rect.top;
-  dst.w = ddrawsink->out_width;
-  dst.h = ddrawsink->out_height;
-
-  event = gst_event_new_navigation (structure);
-
-  if (ddrawsink->keep_aspect_ratio) {
-    gst_video_sink_center_rect (src, dst, &result, TRUE);
-  } else {
-    result.x = 0;
-    result.y = 0;
-    result.w = dst.w;
-    result.h = dst.h;
-  }
-
-  /* We calculate scaling using the original video frames geometry to include
-     pixel aspect ratio scaling. */
-  xscale = (gdouble) ddrawsink->video_width / result.w;
-  yscale = (gdouble) ddrawsink->video_height / result.h;
-
-  /* Converting pointer coordinates to the non scaled geometry */
-  if (gst_structure_get_double (structure, "pointer_x", &old_x)) {
-    x = old_x;
-    x = MIN (x, result.x + result.w);
-    x = MAX (x - result.x, 0);
-    gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE,
-        (gdouble) x * xscale, NULL);
-    GST_DEBUG_OBJECT (ddrawsink,
-        "translated navigation event x coordinate from %f to %f", old_x, x);
-  }
-  if (gst_structure_get_double (structure, "pointer_y", &old_y)) {
-    y = old_y;
-    y = MIN (y, result.y + result.h);
-    y = MAX (y - result.y, 0);
-    gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE,
-        (gdouble) y * yscale, NULL);
-    GST_DEBUG_OBJECT (ddrawsink,
-        "translated navigation event x coordinate from %f to %f", old_y, y);
-  }
-
-  pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (ddrawsink));
-
-  if (GST_IS_PAD (pad) && GST_IS_EVENT (event)) {
-    gst_pad_send_event (pad, event);
-
-    gst_object_unref (pad);
-  }
-}
-
-static void
-gst_directdraw_sink_navigation_interface_init (GstNavigationInterface * iface)
-{
-  iface->send_event = gst_directdraw_sink_navigation_send_event;
-}
-
-static void
-gst_directdraw_sink_init_interfaces (GType type)
-{
-  static const GInterfaceInfo iface_info = {
-    (GInterfaceInitFunc) gst_directdraw_sink_interface_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo xoverlay_info = {
-    (GInterfaceInitFunc) gst_directdraw_sink_xoverlay_interface_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo navigation_info = {
-    (GInterfaceInitFunc) gst_directdraw_sink_navigation_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
-      &iface_info);
-  g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info);
-  g_type_add_interface_static (type, GST_TYPE_NAVIGATION, &navigation_info);
-}
-
-/* Subclass of GstBuffer which manages buffer_pool surfaces lifetime    */
-static void gst_ddrawsurface_finalize (GstMiniObject * mini_object);
-static GstBufferClass *ddrawsurface_parent_class = NULL;
-
-static void
-gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class)
-{
-  surface->surface = NULL;
-  surface->width = 0;
-  surface->height = 0;
-  surface->ddrawsink = NULL;
-  surface->locked = FALSE;
-  surface->system_memory = FALSE;
-  memset (&surface->dd_pixel_format, 0, sizeof (DDPIXELFORMAT));
-}
-
-static void
-gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data)
-{
-  GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
-
-  ddrawsurface_parent_class = g_type_class_peek_parent (g_class);
-
-  mini_object_class->finalize = GST_DEBUG_FUNCPTR (gst_ddrawsurface_finalize);
-}
-
-static GType
-gst_ddrawsurface_get_type (void)
-{
-  static GType _gst_ddrawsurface_type;
-
-  if (G_UNLIKELY (_gst_ddrawsurface_type == 0)) {
-    static const GTypeInfo ddrawsurface_info = {
-      sizeof (GstBufferClass),
-      NULL,
-      NULL,
-      gst_ddrawsurface_class_init,
-      NULL,
-      NULL,
-      sizeof (GstDDrawSurface),
-      0,
-      (GInstanceInitFunc) gst_ddrawsurface_init,
-      NULL
-    };
-    _gst_ddrawsurface_type = g_type_register_static (GST_TYPE_BUFFER,
-        "GstDDrawSurface", &ddrawsurface_info, 0);
-  }
-  return _gst_ddrawsurface_type;
-}
-
-static void
-gst_ddrawsurface_finalize (GstMiniObject * mini_object)
-{
-  GstDirectDrawSink *ddrawsink = NULL;
-  GstDDrawSurface *surface;
-
-  surface = (GstDDrawSurface *) mini_object;
-
-  ddrawsink = surface->ddrawsink;
-  if (!ddrawsink)
-    goto no_sink;
-
-  /* If our geometry changed we can't reuse that image. */
-  if ((surface->width != ddrawsink->video_width) ||
-      (surface->height != ddrawsink->video_height) ||
-      (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format,
-              sizeof (DDPIXELFORMAT)) != 0 ||
-          !gst_directdraw_sink_surface_check (ddrawsink, surface))
-      ) {
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "destroy image as its size changed %dx%d vs current %dx%d",
-        surface->width, surface->height, ddrawsink->video_width,
-        ddrawsink->video_height);
-    gst_directdraw_sink_surface_destroy (ddrawsink, surface);
-    GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object);
-  } else {
-    /* In that case we can reuse the image and add it to our image pool. */
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "recycling image in pool");
-
-    /* need to increment the refcount again to recycle */
-    gst_buffer_ref (GST_BUFFER (surface));
-
-    g_mutex_lock (ddrawsink->pool_lock);
-    ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface);
-    g_mutex_unlock (ddrawsink->pool_lock);
-  }
-
-  return;
-
-no_sink:
-  GST_CAT_WARNING (directdrawsink_debug, "no sink found");
-  GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object);
-  return;
-}
-
-/************************************************************************/
-/* Directdraw sink functions                                            */
-/************************************************************************/
-static void
-gst_directdraw_sink_base_init (gpointer g_class)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-
-  gst_element_class_set_static_metadata (element_class,
-      "Direct Draw Video Sink", "Sink/Video",
-      "Output to a video card via Direct Draw",
-      "Sebastien Moutte <sebastien@moutte.net>");
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&directdrawsink_sink_factory));
-}
-
-static void
-gst_directdraw_sink_class_init (GstDirectDrawSinkClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *gstelement_class;
-  GstBaseSinkClass *gstbasesink_class;
-
-  gobject_class = (GObjectClass *) klass;
-  gstbasesink_class = (GstBaseSinkClass *) klass;
-  gstelement_class = (GstElementClass *) klass;
-
-  GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0,
-      "Directdraw sink");
-
-  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directdraw_sink_finalize);
-  gobject_class->get_property =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_property);
-  gobject_class->set_property =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_set_property);
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_change_state);
-  gstbasesink_class->get_caps =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_caps);
-  gstbasesink_class->set_caps =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_set_caps);
-  gstbasesink_class->preroll =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_show_frame);
-  gstbasesink_class->render =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_show_frame);
-  gstbasesink_class->get_times =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_times);
-  gstbasesink_class->buffer_alloc =
-      GST_DEBUG_FUNCPTR (gst_directdraw_sink_buffer_alloc);
-
-  /* install properties */
-  /* setup aspect ratio mode */
-  g_object_class_install_property (G_OBJECT_CLASS (klass),
-      PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio",
-          "Force aspect ratio",
-          "When enabled, scaling will respect original aspect ratio", TRUE,
-          G_PARAM_READWRITE));
-}
-
-static void
-gst_directdraw_sink_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object);
-
-  switch (prop_id) {
-    case PROP_KEEP_ASPECT_RATIO:
-      ddrawsink->keep_aspect_ratio = g_value_get_boolean (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_directdraw_sink_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object);
-
-  switch (prop_id) {
-    case PROP_KEEP_ASPECT_RATIO:
-      g_value_set_boolean (value, ddrawsink->keep_aspect_ratio);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_directdraw_sink_finalize (GObject * object)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object);
-
-  if (ddrawsink->pool_lock) {
-    g_mutex_free (ddrawsink->pool_lock);
-    ddrawsink->pool_lock = NULL;
-  }
-  if (ddrawsink->caps) {
-    gst_caps_unref (ddrawsink->caps);
-    ddrawsink->caps = NULL;
-  }
-  if (ddrawsink->setup) {
-    gst_directdraw_sink_cleanup (ddrawsink);
-  }
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gst_directdraw_sink_init (GstDirectDrawSink * ddrawsink,
-    GstDirectDrawSinkClass * g_class)
-{
-  /*init members variables */
-  ddrawsink->ddraw_object = NULL;
-  ddrawsink->primary_surface = NULL;
-  ddrawsink->offscreen_surface = NULL;
-  ddrawsink->clipper = NULL;
-  ddrawsink->video_window = NULL;
-  ddrawsink->our_video_window = TRUE;
-  ddrawsink->previous_wndproc = NULL;
-  ddrawsink->previous_user_data = (LONG_PTR) NULL;
-  ddrawsink->last_buffer = NULL;
-  ddrawsink->caps = NULL;
-  ddrawsink->window_thread = NULL;
-  ddrawsink->setup = FALSE;
-  ddrawsink->buffer_pool = NULL;
-  ddrawsink->keep_aspect_ratio = FALSE;
-  ddrawsink->pool_lock = g_mutex_new ();
-  ddrawsink->can_blit_between_colorspace = TRUE;
-  ddrawsink->must_recreate_offscreen = FALSE;
-  memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT));
-
-  /*video default values */
-  ddrawsink->video_height = 0;
-  ddrawsink->video_width = 0;
-  ddrawsink->fps_n = 0;
-  ddrawsink->fps_d = 0;
-}
-
-static GstCaps *
-gst_directdraw_sink_get_caps (GstBaseSink * bsink)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink);
-  GstCaps *caps = NULL;
-
-  if (!ddrawsink->setup) {
-    caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD
-            (ddrawsink)));
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "getcaps called and we are not setup yet, " "returning template %"
-        GST_PTR_FORMAT, caps);
-  } else {
-    caps = gst_caps_ref (ddrawsink->caps);
-  }
-
-  return caps;
-}
-
-static gboolean
-gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink);
-  GstStructure *structure = NULL;
-  gboolean ret;
-  const GValue *fps;
-  gint par_n, par_d;
-
-  structure = gst_caps_get_structure (caps, 0);
-  if (!structure)
-    return FALSE;
-
-  if (!gst_video_parse_caps_pixel_aspect_ratio (caps, &par_n, &par_d)) {
-    par_n = 1;
-    par_d = 1;
-  }
-
-  ret = gst_structure_get_int (structure, "width", &ddrawsink->video_width);
-  ret &= gst_structure_get_int (structure, "height", &ddrawsink->video_height);
-  fps = gst_structure_get_value (structure, "framerate");
-  ret &= (fps != NULL);
-  ret &=
-      gst_ddrawvideosink_get_format_from_caps (ddrawsink, caps,
-      &ddrawsink->dd_pixel_format);
-  if (!ret) {
-    GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION,
-        ("Failed to get caps properties from caps"), (NULL));
-    return FALSE;
-  }
-  GST_VIDEO_SINK_WIDTH (ddrawsink) = ddrawsink->video_width * par_n / par_d;
-  GST_VIDEO_SINK_HEIGHT (ddrawsink) = ddrawsink->video_height;
-
-  ddrawsink->fps_n = gst_value_get_fraction_numerator (fps);
-  ddrawsink->fps_d = gst_value_get_fraction_denominator (fps);
-
-  /* Notify application to set window id now */
-  if (!ddrawsink->video_window) {
-    gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ddrawsink));
-  }
-
-  /* If we still don't have a window at that stage we create our own */
-  if (!ddrawsink->video_window) {
-    gst_directdraw_sink_create_default_window (ddrawsink);
-  }
-
-  /* if we are rendering to our own window, resize it to video size */
-  if (ddrawsink->video_window && ddrawsink->our_video_window) {
-    SetWindowPos (ddrawsink->video_window, NULL,
-        0, 0,
-        GST_VIDEO_SINK_WIDTH (ddrawsink) +
-        (GetSystemMetrics (SM_CXSIZEFRAME) * 2),
-        GST_VIDEO_SINK_HEIGHT (ddrawsink) + GetSystemMetrics (SM_CYCAPTION) +
-        (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE);
-  }
-
-  /* release the surface, we have to recreate it! */
-  if (ddrawsink->offscreen_surface) {
-    IDirectDrawSurface7_Release (ddrawsink->offscreen_surface);
-    ddrawsink->offscreen_surface = NULL;
-  }
-
-  /* create an offscreen surface with the caps */
-  ret = gst_directdraw_sink_check_offscreen_surface (ddrawsink);
-  if (!ret) {
-    GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION,
-        ("Can't create a directdraw offscreen surface with the input caps"),
-        (NULL));
-  }
-
-  return ret;
-}
-
-static GstStateChangeReturn
-gst_directdraw_sink_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (element);
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_directdraw_sink_setup_ddraw (ddrawsink)) {
-        ret = GST_STATE_CHANGE_FAILURE;
-        goto beach;
-      }
-
-      if (!(ddrawsink->caps = gst_directdraw_sink_get_ddrawcaps (ddrawsink))) {
-        ret = GST_STATE_CHANGE_FAILURE;
-        goto beach;
-      }
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      ddrawsink->fps_n = 0;
-      ddrawsink->fps_d = 1;
-      ddrawsink->video_width = 0;
-      ddrawsink->video_height = 0;
-      if (ddrawsink->buffer_pool)
-        gst_directdraw_sink_bufferpool_clear (ddrawsink);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      if (ddrawsink->setup)
-        gst_directdraw_sink_cleanup (ddrawsink);
-      break;
-    default:
-      break;
-  }
-
-beach:
-  return ret;
-}
-
-static GstFlowReturn
-gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset,
-    guint size, GstCaps * caps, GstBuffer ** buf)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink);
-  GstStructure *structure;
-  gint width, height;
-  GstDDrawSurface *surface = NULL;
-  GstFlowReturn ret = GST_FLOW_OK;
-  GstCaps *buffer_caps = caps;
-  gboolean buffercaps_unref = FALSE;
-
-  GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-      "a buffer of %u bytes was requested", size);
-
-  structure = gst_caps_get_structure (caps, 0);
-  if (!gst_structure_get_int (structure, "width", &width) ||
-      !gst_structure_get_int (structure, "height", &height)) {
-    GST_WARNING_OBJECT (ddrawsink, "invalid caps for buffer allocation %"
-        GST_PTR_FORMAT, caps);
-    return GST_FLOW_UNEXPECTED;
-  }
-
-  g_mutex_lock (ddrawsink->pool_lock);
-
-  /* Inspect our buffer pool */
-  while (ddrawsink->buffer_pool) {
-    surface = (GstDDrawSurface *) ddrawsink->buffer_pool->data;
-    if (surface) {
-      /* Removing from the pool */
-      ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool,
-          ddrawsink->buffer_pool);
-
-      /* If the surface is invalid for our need, destroy */
-      if ((surface->width != width) ||
-          (surface->height != height) ||
-          (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format,
-                  sizeof (DDPIXELFORMAT)) ||
-              !gst_directdraw_sink_surface_check (ddrawsink, surface))
-          ) {
-        gst_directdraw_sink_surface_destroy (ddrawsink, surface);
-        gst_buffer_unref (GST_BUFFER_CAST (surface));
-        surface = NULL;
-      } else {
-        /* We found a suitable surface */
-        break;
-      }
-    }
-  }
-
-  if (!ddrawsink->can_blit_between_colorspace) {
-    /* Hardware doesn't support blit from one colorspace to another.
-     * Check if the colorspace of the current display mode has changed since
-     * the last negociation. If it's the case, we will have to renegociate
-     */
-    guint depth;
-    HRESULT hres;
-    DDSURFACEDESC2 surface_desc;
-    DDSURFACEDESC2 *sd;
-
-    if (!gst_structure_get_int (structure, "depth", (gint *) & depth)) {
-      GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink,
-          "Can't get depth from buffer_alloc caps");
-      return GST_FLOW_ERROR;
-    }
-    surface_desc.dwSize = sizeof (surface_desc);
-    sd = &surface_desc;
-    hres =
-        IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object,
-        (DDSURFACEDESC *) sd);
-    if (hres != DD_OK) {
-      GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink,
-          "Can't get current display mode (error=%ld)", (glong) hres);
-      return GST_FLOW_ERROR;
-    }
-
-    if (depth != gst_directdraw_sink_get_depth (&surface_desc.ddpfPixelFormat)) {
-      GstCaps *copy_caps = NULL;
-      GstStructure *copy_structure = NULL;
-      GstCaps *display_caps = NULL;
-      GstStructure *display_structure = NULL;
-
-      /* make a copy of the original caps */
-      copy_caps = gst_caps_copy (caps);
-      copy_structure = gst_caps_get_structure (copy_caps, 0);
-
-      display_caps =
-          gst_directdraw_sink_create_caps_from_surfacedesc (&surface_desc);
-      if (display_caps) {
-        display_structure = gst_caps_get_structure (display_caps, 0);
-        if (display_structure) {
-          gint bpp, endianness, red_mask, green_mask, blue_mask;
-
-          /* get new display mode properties */
-          gst_structure_get_int (display_structure, "depth", (gint *) & depth);
-          gst_structure_get_int (display_structure, "bpp", &bpp);
-          gst_structure_get_int (display_structure, "endianness", &endianness);
-          gst_structure_get_int (display_structure, "red_mask", &red_mask);
-          gst_structure_get_int (display_structure, "green_mask", &green_mask);
-          gst_structure_get_int (display_structure, "blue_mask", &blue_mask);
-
-          /* apply the new display mode changes to the previous caps */
-          gst_structure_set (copy_structure,
-              "bpp", G_TYPE_INT, bpp,
-              "depth", G_TYPE_INT, depth,
-              "endianness", G_TYPE_INT, endianness,
-              "red_mask", G_TYPE_INT, red_mask,
-              "green_mask", G_TYPE_INT, green_mask,
-              "blue_mask", G_TYPE_INT, blue_mask, NULL);
-
-          if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ddrawsink),
-                  copy_caps)) {
-            buffer_caps = copy_caps;
-            buffercaps_unref = TRUE;
-            /* update buffer size needed to store video frames according to new caps */
-            size = width * height * (bpp / 8);
-
-            /* update our member pixel format */
-            gst_ddrawvideosink_get_format_from_caps (ddrawsink, buffer_caps,
-                &ddrawsink->dd_pixel_format);
-            ddrawsink->must_recreate_offscreen = TRUE;
-
-            GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink,
-                " desired caps %s \n\n new caps %s", gst_caps_to_string (caps),
-                gst_caps_to_string (buffer_caps));
-          } else {
-            GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink,
-                "peer refused caps re-negociation "
-                "and we can't render with the current caps.");
-            ret = GST_FLOW_ERROR;
-          }
-        }
-        gst_caps_unref (display_caps);
-      }
-
-      if (!buffercaps_unref)
-        gst_caps_unref (copy_caps);
-    }
-  }
-
-  /* We haven't found anything, creating a new one */
-  if (!surface) {
-    surface = gst_directdraw_sink_surface_create (ddrawsink, buffer_caps, size);
-  }
-
-  /* Now we should have a surface, set appropriate caps on it */
-  if (surface) {
-    GST_BUFFER_FLAGS (GST_BUFFER (surface)) = 0;
-    gst_buffer_set_caps (GST_BUFFER (surface), buffer_caps);
-  }
-
-  g_mutex_unlock (ddrawsink->pool_lock);
-
-  *buf = GST_BUFFER (surface);
-
-  if (buffercaps_unref)
-    gst_caps_unref (buffer_caps);
-
-  return ret;
-}
-
-static void
-gst_directdraw_sink_draw_borders (GstDirectDrawSink * ddrawsink, RECT dst_rect)
-{
-  RECT win_rect, fill_rect;
-  POINT win_point;
-  HDC hdc;
-
-  g_return_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink));
-
-  /* Get the target window rect */
-  win_point.x = 0;
-  win_point.y = 0;
-  ClientToScreen (ddrawsink->video_window, &win_point);
-  GetClientRect (ddrawsink->video_window, &win_rect);
-  OffsetRect (&win_rect, win_point.x, win_point.y);
-
-  /* We acquire a drawing context */
-  if ((hdc = GetDC (ddrawsink->video_window))) {
-    HBRUSH brush = CreateSolidBrush (RGB (0, 0, 0));
-
-    /* arrange for logical coordinates that match screen coordinates */
-    SetWindowOrgEx (hdc, win_point.x, win_point.y, NULL);
-    /* Left border */
-    if (dst_rect.left > win_rect.left) {
-      fill_rect.left = win_rect.left;
-      fill_rect.top = win_rect.top;
-      fill_rect.bottom = win_rect.bottom;
-      fill_rect.right = dst_rect.left;
-      FillRect (hdc, &fill_rect, brush);
-    }
-    /* Right border */
-    if (dst_rect.right < win_rect.right) {
-      fill_rect.top = win_rect.top;
-      fill_rect.left = dst_rect.right;
-      fill_rect.bottom = win_rect.bottom;
-      fill_rect.right = win_rect.right;
-      FillRect (hdc, &fill_rect, brush);
-    }
-    /* Top border */
-    if (dst_rect.top > win_rect.top) {
-      fill_rect.top = win_rect.top;
-      fill_rect.left = win_rect.left;
-      fill_rect.right = win_rect.right;
-      fill_rect.bottom = dst_rect.top;
-      FillRect (hdc, &fill_rect, brush);
-    }
-    /* Bottom border */
-    if (dst_rect.bottom < win_rect.bottom) {
-      fill_rect.top = dst_rect.bottom;
-      fill_rect.left = win_rect.left;
-      fill_rect.right = win_rect.right;
-      fill_rect.bottom = win_rect.bottom;
-      FillRect (hdc, &fill_rect, brush);
-    }
-    DeleteObject (brush);
-    ReleaseDC (ddrawsink->video_window, hdc);
-  }
-}
-
-static GstFlowReturn
-gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
-{
-  GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink);
-  HRESULT hRes;
-  RECT destsurf_rect, src_rect;
-  POINT dest_surf_point;
-
-  if (buf) {
-    /* save a reference to the input buffer */
-    gst_buffer_ref (buf);
-    if (ddrawsink->last_buffer != NULL)
-      gst_buffer_unref (ddrawsink->last_buffer);
-    ddrawsink->last_buffer = buf;
-  } else {
-    /* use last buffer */
-    buf = ddrawsink->last_buffer;
-  }
-
-  if (buf == NULL) {
-    GST_ERROR_OBJECT (ddrawsink, "No buffer to render.");
-    return GST_FLOW_ERROR;
-  } else if (!ddrawsink->video_window) {
-    GST_WARNING_OBJECT (ddrawsink, "No video window to render to.");
-    return GST_FLOW_ERROR;
-  }
-
-  /* get the video window position */
-  GST_OBJECT_LOCK (ddrawsink);
-  if (G_UNLIKELY (!ddrawsink->video_window)) {
-    GST_OBJECT_UNLOCK (ddrawsink);
-    GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-        "gst_directdraw_sink_show_frame our video window disappeared");
-    GST_ELEMENT_ERROR (ddrawsink, RESOURCE, NOT_FOUND,
-        ("Output window was closed"), (NULL));
-    return GST_FLOW_ERROR;
-  }
-  dest_surf_point.x = 0;
-  dest_surf_point.y = 0;
-  ClientToScreen (ddrawsink->video_window, &dest_surf_point);
-  GetClientRect (ddrawsink->video_window, &destsurf_rect);
-  OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y);
-
-  /* Check to see if we have an area to draw to.
-   * When the window is minimized, it will trigger the
-   * "IDirectDrawSurface7_Blt (object's offscreen surface)" warning,
-   * with a msg that the rectangle is invalid */
-  if (destsurf_rect.right <= destsurf_rect.left ||
-      destsurf_rect.bottom <= destsurf_rect.top) {
-    GST_OBJECT_UNLOCK (ddrawsink);
-    GST_DEBUG_OBJECT (ddrawsink, "invalid rendering window rectangle "
-        "(%ld, %ld), (%ld, %ld)", destsurf_rect.left, destsurf_rect.top,
-        destsurf_rect.right, destsurf_rect.bottom);
-    goto beach;
-  }
-
-  if (ddrawsink->keep_aspect_ratio) {
-    /* center image to dest image keeping aspect ratio */
-    src_rect.top = 0;
-    src_rect.left = 0;
-    src_rect.bottom = GST_VIDEO_SINK_HEIGHT (ddrawsink);
-    src_rect.right = GST_VIDEO_SINK_WIDTH (ddrawsink);
-    gst_directdraw_sink_center_rect (ddrawsink, src_rect, destsurf_rect,
-        &destsurf_rect);
-    gst_directdraw_sink_draw_borders (ddrawsink, destsurf_rect);
-  }
-  GST_OBJECT_UNLOCK (ddrawsink);
-
-  if (ddrawsink->must_recreate_offscreen && ddrawsink->offscreen_surface) {
-    IDirectDrawSurface7_Release (ddrawsink->offscreen_surface);
-    ddrawsink->offscreen_surface = NULL;
-  }
-
-  /* check for surfaces lost */
-  if (!gst_directdraw_sink_check_primary_surface (ddrawsink) ||
-      !gst_directdraw_sink_check_offscreen_surface (ddrawsink)) {
-    return GST_FLOW_ERROR;
-  }
-
-  if (!GST_IS_DDRAWSURFACE (buf) ||
-      ((GST_IS_DDRAWSURFACE (buf)) && (GST_BUFFER (buf)->malloc_data))) {
-    /* We are receiving a system memory buffer so we will copy 
-       to the memory of our offscreen surface and next blit this surface 
-       on the primary surface */
-    LPBYTE data = NULL;
-    guint src_pitch, line;
-    DDSURFACEDESC2 surf_desc;
-    DDSURFACEDESC2 *sd;
-
-    ZeroMemory (&surf_desc, sizeof (surf_desc));
-    surf_desc.dwSize = sizeof (surf_desc);
-    sd = &surf_desc;
-
-    /* Lock the surface */
-    hRes =
-        IDirectDrawSurface7_Lock (ddrawsink->offscreen_surface, NULL,
-        (DDSURFACEDESC *) sd, DDLOCK_WAIT, NULL);
-    if (hRes != DD_OK) {
-      GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-          "gst_directdraw_sink_show_frame failed locking surface %s",
-          DDErrorString (hRes));
-
-      if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == DD_OK)
-        return GST_FLOW_OK;
-      else
-        return GST_FLOW_ERROR;
-    }
-
-    /* Write each line respecting the destination surface pitch */
-    data = surf_desc.lpSurface;
-    if (ddrawsink->video_height) {
-      src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height;
-      for (line = 0; line < surf_desc.dwHeight; line++) {
-        memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch);
-        data += surf_desc.lPitch;
-      }
-    }
-
-    /* Unlock the surface */
-    hRes = IDirectDrawSurface7_Unlock (ddrawsink->offscreen_surface, NULL);
-    if (hRes != DD_OK) {
-      GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-          "gst_directdraw_sink_show_frame failed unlocking surface %s",
-          DDErrorString (hRes));
-      return GST_FLOW_ERROR;
-    }
-
-    /* blit to primary surface ( Blt will scale the video the dest rect surface
-     * if needed */
-    hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect,
-        ddrawsink->offscreen_surface, NULL, DDBLT_WAIT, NULL);
-    if (hRes != DD_OK)          /* FIXME: Is it really safe to continue past here ? */
-      GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-          "IDirectDrawSurface7_Blt (object's offscreen surface) " "returned %s",
-          DDErrorString (hRes));
-
-  } else {
-    /* We are receiving a directdraw surface (previously returned by our buffer
-     * pool so we will simply blit it on the primary surface */
-    GstDDrawSurface *surface = NULL;
-
-    surface = GST_DDRAWSURFACE (buf);
-
-    /* Unlocking surface before blit */
-    IDirectDrawSurface7_Unlock (surface->surface, NULL);
-    surface->locked = FALSE;
-
-    /* blit to our primary surface */
-    hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect,
-        surface->surface, NULL, DDBLT_WAIT, NULL);
-    if (hRes != DD_OK)          /* FIXME: Is it really safe to continue past here ? */
-      GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-          "IDirectDrawSurface7_Blt (offscreen surface from buffer_alloc) "
-          "returned %s", DDErrorString (hRes));
-  }
-
-beach:
-  return GST_FLOW_OK;
-}
-
-static void
-gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
-    GstClockTime * start, GstClockTime * end)
-{
-  GstDirectDrawSink *ddrawsink;
-
-  ddrawsink = GST_DIRECTDRAW_SINK (bsink);
-
-  if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
-    *start = GST_BUFFER_TIMESTAMP (buf);
-    if (GST_BUFFER_DURATION_IS_VALID (buf)) {
-      *end = *start + GST_BUFFER_DURATION (buf);
-    } else {
-      if (ddrawsink->fps_n > 0) {
-        *end = *start + (GST_SECOND * ddrawsink->fps_d) / ddrawsink->fps_n;
-      }
-    }
-  }
-}
-
-/* Utility functions */
-
-/* this function fill a DDPIXELFORMAT using Gstreamer caps */
-static gboolean
-gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink,
-    GstCaps * caps, DDPIXELFORMAT * pPixelFormat)
-{
-  GstStructure *structure = NULL;
-  gboolean ret = TRUE;
-
-  /* check params */
-  g_return_val_if_fail (pPixelFormat, FALSE);
-  g_return_val_if_fail (caps, FALSE);
-
-  /* init structure */
-  memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT));
-  pPixelFormat->dwSize = sizeof (DDPIXELFORMAT);
-
-  if (!(structure = gst_caps_get_structure (caps, 0))) {
-    GST_CAT_ERROR_OBJECT (directdrawsink_debug, ddrawsink,
-        "can't get structure pointer from caps");
-    return FALSE;
-  }
-
-  if (gst_structure_has_name (structure, "video/x-raw-rgb")) {
-    gint depth, bitcount, bitmask, endianness;
-
-    pPixelFormat->dwFlags = DDPF_RGB;
-    ret &= gst_structure_get_int (structure, "bpp", &bitcount);
-    pPixelFormat->dwRGBBitCount = bitcount;
-    ret &= gst_structure_get_int (structure, "depth", &depth);
-    ret &= gst_structure_get_int (structure, "red_mask", &bitmask);
-    pPixelFormat->dwRBitMask = bitmask;
-    ret &= gst_structure_get_int (structure, "green_mask", &bitmask);
-    pPixelFormat->dwGBitMask = bitmask;
-    ret &= gst_structure_get_int (structure, "blue_mask", &bitmask);
-    pPixelFormat->dwBBitMask = bitmask;
-
-    gst_structure_get_int (structure, "endianness", &endianness);
-    if (endianness == G_BIG_ENDIAN) {
-      endianness = G_LITTLE_ENDIAN;
-      pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask);
-      pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask);
-      pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask);
-    }
-  } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) {
-    guint32 fourcc;
-
-    pPixelFormat->dwFlags = DDPF_FOURCC;
-    ret &= gst_structure_get_fourcc (structure, "format", &fourcc);
-    pPixelFormat->dwFourCC = fourcc;
-  } else {
-    GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-        "unknown caps name received %" GST_PTR_FORMAT, caps);
-    ret = FALSE;
-  }
-
-  return ret;
-}
-
-/* This function centers the RECT of source surface to
-a dest surface and set the result RECT into result */
-static void
-gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, RECT src,
-    RECT dst, RECT * result)
-{
-  gdouble src_ratio, dst_ratio;
-  long src_width = src.right;
-  long src_height = src.bottom;
-  long dst_width = dst.right - dst.left;
-  long dst_heigth = dst.bottom - dst.top;
-  long result_width = 0, result_height = 0;
-
-  g_return_if_fail (result != NULL);
-
-  src_ratio = (gdouble) src_width / src_height;
-  dst_ratio = (gdouble) dst_width / dst_heigth;
-
-  if (src_ratio > dst_ratio) {
-    /* new height */
-    result_height = (long) (dst_width / src_ratio);
-
-    result->left = dst.left;
-    result->right = dst.right;
-    result->top = dst.top + (dst_heigth - result_height) / 2;
-    result->bottom = result->top + result_height;
-
-  } else if (src_ratio < dst_ratio) {
-    /* new width */
-    result_width = (long) (dst_heigth * src_ratio);
-
-    result->top = dst.top;
-    result->bottom = dst.bottom;
-    result->left = dst.left + (dst_width - result_width) / 2;
-    result->right = result->left + result_width;
-
-  } else {
-    /* same ratio */
-    memcpy (result, &dst, sizeof (RECT));
-  }
-
-  GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-      "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld",
-      src_width, src_height, dst_width, dst_heigth,
-      result->right - result->left, result->bottom - result->top, result->left,
-      result->right);
-}
-
-/**
- * Get DirectDraw error message.
- * @hr: HRESULT code
- * Returns: Text representation of the error.
- */
-static const char *
-DDErrorString (HRESULT hr)
-{
-  switch (hr) {
-    case DDERR_ALREADYINITIALIZED:
-      return "DDERR_ALREADYINITIALIZED";
-    case DDERR_CANNOTATTACHSURFACE:
-      return "DDERR_CANNOTATTACHSURFACE";
-    case DDERR_CANNOTDETACHSURFACE:
-      return "DDERR_CANNOTDETACHSURFACE";
-    case DDERR_CURRENTLYNOTAVAIL:
-      return "DDERR_CURRENTLYNOTAVAIL";
-    case DDERR_EXCEPTION:
-      return "DDERR_EXCEPTION";
-    case DDERR_GENERIC:
-      return "DDERR_GENERIC";
-    case DDERR_HEIGHTALIGN:
-      return "DDERR_HEIGHTALIGN";
-    case DDERR_INCOMPATIBLEPRIMARY:
-      return "DDERR_INCOMPATIBLEPRIMARY";
-    case DDERR_INVALIDCAPS:
-      return "DDERR_INVALIDCAPS";
-    case DDERR_INVALIDCLIPLIST:
-      return "DDERR_INVALIDCLIPLIST";
-    case DDERR_INVALIDMODE:
-      return "DDERR_INVALIDMODE";
-    case DDERR_INVALIDOBJECT:
-      return "DDERR_INVALIDOBJECT";
-    case DDERR_INVALIDPARAMS:
-      return "DDERR_INVALIDPARAMS";
-    case DDERR_INVALIDPIXELFORMAT:
-      return "DDERR_INVALIDPIXELFORMAT";
-    case DDERR_INVALIDRECT:
-      return "DDERR_INVALIDRECT";
-    case DDERR_LOCKEDSURFACES:
-      return "DDERR_LOCKEDSURFACES";
-    case DDERR_NO3D:
-      return "DDERR_NO3D";
-    case DDERR_NOALPHAHW:
-      return "DDERR_NOALPHAHW";
-    case DDERR_NOCLIPLIST:
-      return "DDERR_NOCLIPLIST";
-    case DDERR_NOCOLORCONVHW:
-      return "DDERR_NOCOLORCONVHW";
-    case DDERR_NOCOOPERATIVELEVELSET:
-      return "DDERR_NOCOOPERATIVELEVELSET";
-    case DDERR_NOCOLORKEY:
-      return "DDERR_NOCOLORKEY";
-    case DDERR_NOCOLORKEYHW:
-      return "DDERR_NOCOLORKEYHW";
-    case DDERR_NODIRECTDRAWSUPPORT:
-      return "DDERR_NODIRECTDRAWSUPPORT";
-    case DDERR_NOEXCLUSIVEMODE:
-      return "DDERR_NOEXCLUSIVEMODE";
-    case DDERR_NOFLIPHW:
-      return "DDERR_NOFLIPHW";
-    case DDERR_NOGDI:
-      return "DDERR_NOGDI";
-    case DDERR_NOMIRRORHW:
-      return "DDERR_NOMIRRORHW";
-    case DDERR_NOTFOUND:
-      return "DDERR_NOTFOUND";
-    case DDERR_NOOVERLAYHW:
-      return "DDERR_NOOVERLAYHW";
-    case DDERR_NORASTEROPHW:
-      return "DDERR_NORASTEROPHW";
-    case DDERR_NOROTATIONHW:
-      return "DDERR_NOROTATIONHW";
-    case DDERR_NOSTRETCHHW:
-      return "DDERR_NOSTRETCHHW";
-    case DDERR_NOT4BITCOLOR:
-      return "DDERR_NOT4BITCOLOR";
-    case DDERR_NOT4BITCOLORINDEX:
-      return "DDERR_NOT4BITCOLORINDEX";
-    case DDERR_NOT8BITCOLOR:
-      return "DDERR_NOT8BITCOLOR";
-    case DDERR_NOTEXTUREHW:
-      return "DDERR_NOTEXTUREHW";
-    case DDERR_NOVSYNCHW:
-      return "DDERR_NOVSYNCHW";
-    case DDERR_NOZBUFFERHW:
-      return "DDERR_NOZBUFFERHW";
-    case DDERR_NOZOVERLAYHW:
-      return "DDERR_NOZOVERLAYHW";
-    case DDERR_OUTOFCAPS:
-      return "DDERR_OUTOFCAPS";
-    case DDERR_OUTOFMEMORY:
-      return "DDERR_OUTOFMEMORY";
-    case DDERR_OUTOFVIDEOMEMORY:
-      return "DDERR_OUTOFVIDEOMEMORY";
-    case DDERR_OVERLAYCANTCLIP:
-      return "DDERR_OVERLAYCANTCLIP";
-    case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:
-      return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE";
-    case DDERR_PALETTEBUSY:
-      return "DDERR_PALETTEBUSY";
-    case DDERR_COLORKEYNOTSET:
-      return "DDERR_COLORKEYNOTSET";
-    case DDERR_SURFACEALREADYATTACHED:
-      return "DDERR_SURFACEALREADYATTACHED";
-    case DDERR_SURFACEALREADYDEPENDENT:
-      return "DDERR_SURFACEALREADYDEPENDENT";
-    case DDERR_SURFACEBUSY:
-      return "DDERR_SURFACEBUSY";
-    case DDERR_CANTLOCKSURFACE:
-      return "DDERR_CANTLOCKSURFACE";
-    case DDERR_SURFACEISOBSCURED:
-      return "DDERR_SURFACEISOBSCURED";
-    case DDERR_SURFACELOST:
-      return "DDERR_SURFACELOST";
-    case DDERR_SURFACENOTATTACHED:
-      return "DDERR_SURFACENOTATTACHED";
-    case DDERR_TOOBIGHEIGHT:
-      return "DDERR_TOOBIGHEIGHT";
-    case DDERR_TOOBIGSIZE:
-      return "DDERR_TOOBIGSIZE";
-    case DDERR_TOOBIGWIDTH:
-      return "DDERR_TOOBIGWIDTH";
-    case DDERR_UNSUPPORTED:
-      return "DDERR_UNSUPPORTED";
-    case DDERR_UNSUPPORTEDFORMAT:
-      return "DDERR_UNSUPPORTEDFORMAT";
-    case DDERR_UNSUPPORTEDMASK:
-      return "DDERR_UNSUPPORTEDMASK";
-    case DDERR_VERTICALBLANKINPROGRESS:
-      return "DDERR_VERTICALBLANKINPROGRESS";
-    case DDERR_WASSTILLDRAWING:
-      return "DDERR_WASSTILLDRAWING";
-    case DDERR_XALIGN:
-      return "DDERR_XALIGN";
-    case DDERR_INVALIDDIRECTDRAWGUID:
-      return "DDERR_INVALIDDIRECTDRAWGUID";
-    case DDERR_DIRECTDRAWALREADYCREATED:
-      return "DDERR_DIRECTDRAWALREADYCREATED";
-    case DDERR_NODIRECTDRAWHW:
-      return "DDERR_NODIRECTDRAWHW";
-    case DDERR_PRIMARYSURFACEALREADYEXISTS:
-      return "DDERR_PRIMARYSURFACEALREADYEXISTS";
-    case DDERR_NOEMULATION:
-      return "DDERR_NOEMULATION";
-    case DDERR_REGIONTOOSMALL:
-      return "DDERR_REGIONTOOSMALL";
-    case DDERR_CLIPPERISUSINGHWND:
-      return "DDERR_CLIPPERISUSINGHWND";
-    case DDERR_NOCLIPPERATTACHED:
-      return "DDERR_NOCLIPPERATTACHED";
-    case DDERR_NOHWND:
-      return "DDERR_NOHWND";
-    case DDERR_HWNDSUBCLASSED:
-      return "DDERR_HWNDSUBCLASSED";
-    case DDERR_HWNDALREADYSET:
-      return "DDERR_HWNDALREADYSET";
-    case DDERR_NOPALETTEATTACHED:
-      return "DDERR_NOPALETTEATTACHED";
-    case DDERR_NOPALETTEHW:
-      return "DDERR_NOPALETTEHW";
-    case DDERR_BLTFASTCANTCLIP:
-      return "DDERR_BLTFASTCANTCLIP";
-    case DDERR_NOBLTHW:
-      return "DDERR_NOBLTHW";
-    case DDERR_NODDROPSHW:
-      return "DDERR_NODDROPSHW";
-    case DDERR_OVERLAYNOTVISIBLE:
-      return "DDERR_OVERLAYNOTVISIBLE";
-    case DDERR_NOOVERLAYDEST:
-      return "DDERR_NOOVERLAYDEST";
-    case DDERR_INVALIDPOSITION:
-      return "DDERR_INVALIDPOSITION";
-    case DDERR_NOTAOVERLAYSURFACE:
-      return "DDERR_NOTAOVERLAYSURFACE";
-    case DDERR_EXCLUSIVEMODEALREADYSET:
-      return "DDERR_EXCLUSIVEMODEALREADYSET";
-    case DDERR_NOTFLIPPABLE:
-      return "DDERR_NOTFLIPPABLE";
-    case DDERR_CANTDUPLICATE:
-      return "DDERR_CANTDUPLICATE";
-    case DDERR_NOTLOCKED:
-      return "DDERR_NOTLOCKED";
-    case DDERR_CANTCREATEDC:
-      return "DDERR_CANTCREATEDC";
-    case DDERR_NODC:
-      return "DDERR_NODC";
-    case DDERR_WRONGMODE:
-      return "DDERR_WRONGMODE";
-    case DDERR_IMPLICITLYCREATED:
-      return "DDERR_IMPLICITLYCREATED";
-    case DDERR_NOTPALETTIZED:
-      return "DDERR_NOTPALETTIZED";
-    case DDERR_UNSUPPORTEDMODE:
-      return "DDERR_UNSUPPORTEDMODE";
-    case DDERR_NOMIPMAPHW:
-      return "DDERR_NOMIPMAPHW";
-    case DDERR_INVALIDSURFACETYPE:
-      return "DDERR_INVALIDSURFACETYPE";
-    case DDERR_DCALREADYCREATED:
-      return "DDERR_DCALREADYCREATED";
-    case DDERR_CANTPAGELOCK:
-      return "DDERR_CANTPAGELOCK";
-    case DDERR_CANTPAGEUNLOCK:
-      return "DDERR_CANTPAGEUNLOCK";
-    case DDERR_NOTPAGELOCKED:
-      return "DDERR_NOTPAGELOCKED";
-    case DDERR_NOTINITIALIZED:
-      return "DDERR_NOTINITIALIZED";
-  }
-  return "Unknown Error";
-}
-
-static gboolean
-gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink)
-{
-  gboolean bRet = TRUE;
-  HRESULT hRes;
-  /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first
-   * parameter to force Directdraw to use the hardware emulation layer */
-  hRes = DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0,
-      (void **) &ddrawsink->ddraw_object, &IID_IDirectDraw7, NULL);
-  if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) {
-    GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE,
-        ("Failed to create the DirectDraw object error=%s",
-            DDErrorString (hRes)), (NULL));
-    return FALSE;
-  }
-
-  /* set cooperative level */
-  hRes = IDirectDraw7_SetCooperativeLevel (ddrawsink->ddraw_object,
-      NULL, DDSCL_NORMAL);
-  if (hRes != DD_OK) {
-    GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE,
-        ("Failed to set the set the cooperative level error=%s",
-            DDErrorString (hRes)), (NULL));
-    return FALSE;
-  }
-
-  /* setup the clipper object */
-  hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0,
-      &ddrawsink->clipper, NULL);
-
-  if (hRes == DD_OK && ddrawsink->video_window)
-    IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window);
-
-  /* create our primary surface */
-  if (!gst_directdraw_sink_check_primary_surface (ddrawsink))
-    return FALSE;
-
-  /* directdraw objects are setup */
-  ddrawsink->setup = TRUE;
-
-  return bRet;
-}
-
-static LRESULT FAR PASCAL
-WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-  GstDirectDrawSink *ddrawsink;
-  LRESULT ret;
-
-  ddrawsink = (GstDirectDrawSink *) GetWindowLongPtr (hWnd, GWLP_USERDATA);
-
-  switch (message) {
-    case WM_CREATE:{
-      LPCREATESTRUCT crs = (LPCREATESTRUCT) lParam;
-      /* Nail pointer to the video sink down to this window */
-      SetWindowLongPtr (hWnd, GWLP_USERDATA, (LONG_PTR) crs->lpCreateParams);
-      break;
-    }
-    case WM_SIZE:
-    case WM_CHAR:
-    case WM_KEYDOWN:
-    case WM_KEYUP:
-    case WM_LBUTTONDOWN:
-    case WM_RBUTTONDOWN:
-    case WM_MBUTTONDOWN:
-    case WM_LBUTTONUP:
-    case WM_RBUTTONUP:
-    case WM_MBUTTONUP:
-    case WM_MOUSEMOVE:{
-      GstDirectDrawSink *ddrawsink;
-      ddrawsink = (GstDirectDrawSink *) GetWindowLongPtr (hWnd, GWLP_USERDATA);
-
-      if (G_UNLIKELY (!ddrawsink))
-        break;
-
-      switch (message) {
-        case WM_SIZE:{
-          GST_OBJECT_LOCK (ddrawsink);
-          ddrawsink->out_width = LOWORD (lParam);
-          ddrawsink->out_height = HIWORD (lParam);
-          GST_OBJECT_UNLOCK (ddrawsink);
-          GST_DEBUG_OBJECT (ddrawsink, "Window size is %dx%d", LOWORD (wParam),
-              HIWORD (wParam));
-          break;
-        }
-        case WM_CHAR:
-        case WM_KEYDOWN:
-        case WM_KEYUP:{
-          gunichar2 wcrep[128];
-          if (GetKeyNameTextW (lParam, wcrep, 128)) {
-            gchar *utfrep = g_utf16_to_utf8 (wcrep, 128, NULL, NULL, NULL);
-            if (utfrep) {
-              if (message == WM_CHAR || message == WM_KEYDOWN)
-                gst_navigation_send_key_event (GST_NAVIGATION (ddrawsink),
-                    "key-press", utfrep);
-              if (message == WM_CHAR || message == WM_KEYUP)
-                gst_navigation_send_key_event (GST_NAVIGATION (ddrawsink),
-                    "key-release", utfrep);
-              g_free (utfrep);
-            }
-          }
-          break;
-        }
-        case WM_LBUTTONDOWN:
-        case WM_LBUTTONUP:
-        case WM_RBUTTONDOWN:
-        case WM_RBUTTONUP:
-        case WM_MBUTTONDOWN:
-        case WM_MBUTTONUP:
-        case WM_MOUSEMOVE:{
-          gint x, y, button;
-          const gchar *action;
-
-          switch (message) {
-            case WM_MOUSEMOVE:
-              button = 0;
-              action = "mouse-move";
-              break;
-            case WM_LBUTTONDOWN:
-              button = 1;
-              action = "mouse-button-press";
-              break;
-            case WM_LBUTTONUP:
-              button = 1;
-              action = "mouse-button-release";
-              break;
-            case WM_RBUTTONDOWN:
-              button = 2;
-              action = "mouse-button-press";
-              break;
-            case WM_RBUTTONUP:
-              button = 2;
-              action = "mouse-button-release";
-              break;
-            case WM_MBUTTONDOWN:
-              button = 3;
-              action = "mouse-button-press";
-              break;
-            case WM_MBUTTONUP:
-              button = 3;
-              action = "mouse-button-release";
-              break;
-            default:
-              button = 4;
-              action = NULL;
-          }
-
-          x = LOWORD (lParam);
-          y = HIWORD (lParam);
-
-          if (button == 0) {
-            GST_DEBUG_OBJECT (ddrawsink, "Mouse moved to %dx%d", x, y);
-          } else
-            GST_DEBUG_OBJECT (ddrawsink, "Mouse button %d pressed at %dx%d",
-                button, x, y);
-
-          if (button < 4)
-            gst_navigation_send_mouse_event (GST_NAVIGATION (ddrawsink),
-                action, button, x, y);
-
-          break;
-        }
-      }
-      break;
-    }
-    case WM_ERASEBKGND:
-      return TRUE;
-    case WM_CLOSE:
-      DestroyWindow (hWnd);
-    case WM_DESTROY:
-      PostQuitMessage (0);
-      return 0;
-  }
-  if (ddrawsink && ddrawsink->previous_wndproc) {
-    /* If there was a previous custom WndProc, call it */
-
-    /* Temporarily restore the previous user_data */
-    if (ddrawsink->previous_user_data)
-      SetWindowLongPtr (hWnd, GWLP_USERDATA, ddrawsink->previous_user_data);
-
-    /* Call previous WndProc */
-    ret =
-        CallWindowProc (ddrawsink->previous_wndproc, hWnd, message, wParam,
-        lParam);
-
-    /* Point the user_data back to our ddraw_sink */
-    SetWindowLongPtr (hWnd, GWLP_USERDATA, (LONG_PTR) ddrawsink);
-  } else {
-    /* if there was no previous custom WndProc, call Window's default one */
-    ret = DefWindowProc (hWnd, message, wParam, lParam);
-  }
-
-  return ret;
-}
-
-static gpointer
-gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink)
-{
-  WNDCLASS WndClass;
-  MSG msg;
-
-  memset (&WndClass, 0, sizeof (WNDCLASS));
-  WndClass.style = CS_HREDRAW | CS_VREDRAW;
-  WndClass.hInstance = GetModuleHandle (NULL);
-  WndClass.lpszClassName = "GStreamer-DirectDraw";
-  WndClass.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH);
-  WndClass.cbClsExtra = 0;
-  WndClass.cbWndExtra = 0;
-  WndClass.lpfnWndProc = WndProc;
-  WndClass.hCursor = LoadCursor (NULL, IDC_ARROW);
-  RegisterClass (&WndClass);
-
-  ddrawsink->video_window = CreateWindowEx (0, "GStreamer-DirectDraw",
-      "GStreamer-DirectDraw sink default window",
-      WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0, 0, 640, 480, NULL, NULL,
-      WndClass.hInstance, (LPVOID) ddrawsink);
-  if (ddrawsink->video_window == NULL)
-    return NULL;
-
-  /* Set the clipper on that window */
-  IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window);
-
-  /* signal application we created a window */
-  gst_x_overlay_got_window_handle (GST_X_OVERLAY (ddrawsink),
-      (guintptr) ddrawsink->video_window);
-
-  ReleaseSemaphore (ddrawsink->window_created_signal, 1, NULL);
-
-  /* start message loop processing our default window messages */
-  while (GetMessage (&msg, NULL, 0, 0) != FALSE) {
-    TranslateMessage (&msg);
-    DispatchMessage (&msg);
-  }
-
-  GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink,
-      "our window received WM_QUIT or error.");
-  /* The window could have changed, if it is not ours anymore we don't
-   * overwrite the current video window with NULL */
-  if (ddrawsink->our_video_window) {
-    GST_OBJECT_LOCK (ddrawsink);
-    ddrawsink->video_window = NULL;
-    GST_OBJECT_UNLOCK (ddrawsink);
-  }
-
-  return NULL;
-}
-
-static gboolean
-gst_directdraw_sink_create_default_window (GstDirectDrawSink * ddrawsink)
-{
-  ddrawsink->window_created_signal = CreateSemaphore (NULL, 0, 1, NULL);
-  if (ddrawsink->window_created_signal == NULL)
-    return FALSE;
-
-  ddrawsink->window_thread = g_thread_create (
-      (GThreadFunc) gst_directdraw_sink_window_thread, ddrawsink, TRUE, NULL);
-
-  if (ddrawsink->window_thread == NULL)
-    goto failed;
-
-  /* wait maximum 10 seconds for windows creating */
-  if (WaitForSingleObject (ddrawsink->window_created_signal,
-          10000) != WAIT_OBJECT_0)
-    goto failed;
-
-  CloseHandle (ddrawsink->window_created_signal);
-  return TRUE;
-
-failed:
-  CloseHandle (ddrawsink->window_created_signal);
-  GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE,
-      ("Error creating our default window"), (NULL));
-
-  return FALSE;
-}
-
-static gboolean
-gst_directdraw_sink_check_primary_surface (GstDirectDrawSink * ddrawsink)
-{
-  HRESULT hres;
-  DDSURFACEDESC2 dd_surface_desc;
-  DDSURFACEDESC2 *sd;
-
-  /* if our primary surface already exist, check if it's not lost */
-  if (ddrawsink->primary_surface) {
-    if (IDirectDrawSurface7_IsLost (ddrawsink->primary_surface) == DD_OK) {
-      /* no problem with our primary surface */
-      return TRUE;
-    } else {
-      /* our primary surface was lost, try to restore it */
-      if (IDirectDrawSurface7_Restore (ddrawsink->primary_surface) == DD_OK) {
-        /* restore is done */
-        GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink,
-            "Our primary surface" " was restored after lost");
-        return TRUE;
-      } else {
-        /* failed to restore our primary surface, 
-         * probably because the display mode was changed. 
-         * Release this surface and recreate a new one.
-         */
-        GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink,
-            "Our primary surface"
-            " was lost and display mode has changed. Destroy and recreate our surface.");
-        IDirectDrawSurface7_Release (ddrawsink->primary_surface);
-        ddrawsink->primary_surface = NULL;
-
-        /* also release offscreen surface */
-        IDirectDrawSurface7_Release (ddrawsink->offscreen_surface);
-        ddrawsink->offscreen_surface = NULL;
-      }
-    }
-  }
-
-  /* create our primary surface */
-  memset (&dd_surface_desc, 0, sizeof (dd_surface_desc));
-  dd_surface_desc.dwSize = sizeof (dd_surface_desc);
-  dd_surface_desc.dwFlags = DDSD_CAPS;
-  dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
-  sd = &dd_surface_desc;
-  hres =
-      IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, (DDSURFACEDESC *) sd,
-      &ddrawsink->primary_surface, NULL);
-  if (hres != DD_OK) {
-    GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE,
-        ("Failed to create our primary surface error=%s", DDErrorString (hres)),
-        (NULL));
-    return FALSE;
-  }
-
-  /* attach our clipper object to the new primary surface */
-  if (ddrawsink->clipper) {
-    hres = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface,
-        ddrawsink->clipper);
-  }
-
-  return TRUE;
-}
-
-static gboolean
-gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * ddrawsink)
-{
-  DDSURFACEDESC2 dd_surface_desc;
-  DDSURFACEDESC2 *sd;
-  HRESULT hres;
-
-  /* if our offscreen surface already exist, check if it's not lost */
-  if (ddrawsink->offscreen_surface) {
-    if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == DD_OK) {
-      /* no problem with our offscreen surface */
-      return TRUE;
-    } else {
-      /* our offscreen surface was lost, try to restore it */
-      if (IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface) == DD_OK) {
-        /* restore is done */
-        GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink,
-            "Our offscreen surface" " was restored after lost");
-        return TRUE;
-      } else {
-        /* failed to restore our offscreen surface, 
-         * probably because the display mode was changed. 
-         * Release this surface and recreate a new one.
-         */
-        GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink,
-            "Our offscreen surface"
-            " was lost and display mode has changed. Destroy and recreate our surface.");
-        IDirectDrawSurface7_Release (ddrawsink->offscreen_surface);
-        ddrawsink->offscreen_surface = NULL;
-      }
-    }
-  }
-
-  memset (&dd_surface_desc, 0, sizeof (dd_surface_desc));
-  dd_surface_desc.dwSize = sizeof (dd_surface_desc);
-  dd_surface_desc.dwFlags =
-      DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
-  dd_surface_desc.dwHeight = ddrawsink->video_height;
-  dd_surface_desc.dwWidth = ddrawsink->video_width;
-  memcpy (&(dd_surface_desc.ddpfPixelFormat), &ddrawsink->dd_pixel_format,
-      sizeof (DDPIXELFORMAT));
-
-  dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
-  sd = &dd_surface_desc;
-  hres =
-      IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, (DDSURFACEDESC *) sd,
-      &ddrawsink->offscreen_surface, NULL);
-  if (hres != DD_OK) {
-    GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-        "create_ddraw_surface:CreateSurface (offscreen surface for buffer_pool) failed %s",
-        DDErrorString (hres));
-    return FALSE;
-  }
-
-  ddrawsink->must_recreate_offscreen = FALSE;
-
-  return TRUE;
-}
-
-static int
-gst_directdraw_sink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat)
-{
-  gint order = 0, binary;
-
-  binary =
-      lpddpfPixelFormat->
-      dwRBitMask | lpddpfPixelFormat->dwGBitMask | lpddpfPixelFormat->
-      dwBBitMask | lpddpfPixelFormat->dwRGBAlphaBitMask;
-  while (binary != 0) {
-    if ((binary % 2) == 1)
-      order++;
-    binary = binary >> 1;
-  }
-  return order;
-}
-
-static HRESULT WINAPI
-EnumModesCallback2 (LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext)
-{
-  GstDirectDrawSink *ddrawsink = (GstDirectDrawSink *) lpContext;
-  GstCaps *format_caps = NULL;
-  LPDDSURFACEDESC2 sd;
-
-  if (!ddrawsink || !lpDDSurfaceDesc)
-    return DDENUMRET_CANCEL;
-
-  sd = (LPDDSURFACEDESC2) lpDDSurfaceDesc;
-  if ((sd->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) {
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "Display mode found with DDSD_PIXELFORMAT not set");
-    return DDENUMRET_OK;
-  }
-
-  if ((sd->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB)
-    return DDENUMRET_OK;
-
-  format_caps = gst_directdraw_sink_create_caps_from_surfacedesc (sd);
-
-  if (format_caps) {
-    gst_caps_append (ddrawsink->caps, format_caps);
-  }
-
-  return DDENUMRET_OK;
-}
-
-static GstCaps *
-gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc)
-{
-  GstCaps *caps = NULL;
-  gint endianness = G_LITTLE_ENDIAN;
-  gint depth;
-
-  if ((desc->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB)
-    return NULL;
-
-  depth = gst_directdraw_sink_get_depth (&desc->ddpfPixelFormat);
-
-  if (desc->ddpfPixelFormat.dwRGBBitCount == 24 ||
-      desc->ddpfPixelFormat.dwRGBBitCount == 32) {
-    /* ffmpegcolorspace handles 24/32 bpp RGB as big-endian. */
-    endianness = G_BIG_ENDIAN;
-    desc->ddpfPixelFormat.dwRBitMask =
-        GUINT32_TO_BE (desc->ddpfPixelFormat.dwRBitMask);
-    desc->ddpfPixelFormat.dwGBitMask =
-        GUINT32_TO_BE (desc->ddpfPixelFormat.dwGBitMask);
-    desc->ddpfPixelFormat.dwBBitMask =
-        GUINT32_TO_BE (desc->ddpfPixelFormat.dwBBitMask);
-    if (desc->ddpfPixelFormat.dwRGBBitCount == 24) {
-      desc->ddpfPixelFormat.dwRBitMask >>= 8;
-      desc->ddpfPixelFormat.dwGBitMask >>= 8;
-      desc->ddpfPixelFormat.dwBBitMask >>= 8;
-    }
-  }
-
-  caps = gst_caps_new_simple ("video/x-raw-rgb",
-      "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,
-      "bpp", G_TYPE_INT, desc->ddpfPixelFormat.dwRGBBitCount,
-      "depth", G_TYPE_INT, depth,
-      "endianness", G_TYPE_INT, endianness,
-      "red_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwRBitMask,
-      "green_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwGBitMask,
-      "blue_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwBBitMask, NULL);
-
-  return caps;
-}
-
-static GstCaps *
-gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink)
-{
-  HRESULT hRes = S_OK;
-  DDCAPS ddcaps_hardware;
-  DDCAPS ddcaps_emulation;
-  GstCaps *format_caps = NULL;
-
-  ddrawsink->caps = gst_caps_new_empty ();
-  if (!ddrawsink->caps)
-    return FALSE;
-
-  /* get hardware caps */
-  ddcaps_hardware.dwSize = sizeof (DDCAPS);
-  ddcaps_emulation.dwSize = sizeof (DDCAPS);
-  IDirectDraw7_GetCaps (ddrawsink->ddraw_object, &ddcaps_hardware,
-      &ddcaps_emulation);
-
-  /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw 
-   * emulation layer can do it */
-  if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) {
-    DDSURFACEDESC2 surface_desc;
-    DDSURFACEDESC2 *sd;
-
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "hardware doesn't support blit from one colorspace to another one. "
-        "so we will create a caps with only the current display mode");
-
-    /* save blit caps */
-    ddrawsink->can_blit_between_colorspace = FALSE;
-
-    surface_desc.dwSize = sizeof (surface_desc);
-    sd = &surface_desc;
-    hRes =
-        IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object,
-        (DDSURFACEDESC *) sd);
-    if (hRes != DD_OK) {
-      GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION,
-          ("Error getting the current display mode error=%s",
-              DDErrorString (hRes)), (NULL));
-      return NULL;
-    }
-
-    format_caps =
-        gst_directdraw_sink_create_caps_from_surfacedesc (&surface_desc);
-    if (format_caps) {
-      gst_caps_append (ddrawsink->caps, format_caps);
-    }
-
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s",
-        gst_caps_to_string (ddrawsink->caps));
-    return ddrawsink->caps;
-  }
-
-  GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-      "the hardware can blit from one colorspace to another, "
-      "then enumerate the colorspace supported by the hardware");
-
-  /* save blit caps */
-  ddrawsink->can_blit_between_colorspace = TRUE;
-
-  /* enumerate display modes exposed by directdraw object 
-     to know supported RGB modes */
-  hRes =
-      IDirectDraw7_EnumDisplayModes (ddrawsink->ddraw_object,
-      DDEDM_REFRESHRATES, NULL, ddrawsink, EnumModesCallback2);
-  if (hRes != DD_OK) {
-    GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION,
-        ("Error enumerating display modes error=%s", DDErrorString (hRes)),
-        (NULL));
-
-    return NULL;
-  }
-
-  if (gst_caps_is_empty (ddrawsink->caps)) {
-    gst_caps_unref (ddrawsink->caps);
-    ddrawsink->caps = NULL;
-    GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION,
-        ("No supported caps found."), (NULL));
-    return NULL;
-  }
-
-  /*GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s",
-   * gst_caps_to_string (ddrawsink->caps)); */
-
-  return ddrawsink->caps;
-}
-
-/* Creates miniobject and our internal surface */
-static GstDDrawSurface *
-gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink,
-    GstCaps * caps, size_t size)
-{
-  GstDDrawSurface *surface = NULL;
-  GstStructure *structure = NULL;
-  gint pitch;
-
-#if 0
-  HRESULT hRes;
-#endif
-  DDSURFACEDESC2 surf_desc, surf_lock_desc;
-
-  g_return_val_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink), NULL);
-
-  /*init structures */
-  memset (&surf_desc, 0, sizeof (surf_desc));
-  memset (&surf_lock_desc, 0, sizeof (surf_desc));
-  surf_desc.dwSize = sizeof (surf_desc);
-  surf_lock_desc.dwSize = sizeof (surf_lock_desc);
-
-  /*create miniobject and initialize it */
-  surface = (GstDDrawSurface *) gst_mini_object_new (GST_TYPE_DDRAWSURFACE);
-  surface->locked = FALSE;
-
-  structure = gst_caps_get_structure (caps, 0);
-  if (!gst_structure_get_int (structure, "width", &surface->width) ||
-      !gst_structure_get_int (structure, "height", &surface->height)) {
-    GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-        "failed getting geometry from caps %" GST_PTR_FORMAT, caps);
-  }
-
-  pitch = GST_ROUND_UP_8 (size / surface->height);
-  if (!gst_ddrawvideosink_get_format_from_caps (ddrawsink, caps,
-          &surface->dd_pixel_format)) {
-    GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink,
-        "failed getting pixel format from caps %" GST_PTR_FORMAT, caps);
-  }
-
-  /* disable return of directdraw surface to buffer alloc because actually I
-   * have no solution to handle display mode changes. The problem is that when
-   * the display mode is changed surface's memory is freed then the upstream
-   * filter would crash trying to write to this memory. Directdraw has a system
-   * lock (DDLOCK_NOSYSLOCK to disable it) to prevent display mode changes 
-   * when a surface memory is locked but we need to disable this lock to return
-   * multiple buffers (surfaces) and do not lock directdraw API calls.
-   */
-#if 0
-/*  if (ddrawsink->ddraw_object) {*/
-  /* Creating an internal surface which will be used as GstBuffer, we used
-     the detected pixel format and video dimensions */
-
-  surf_desc.ddsCaps.dwCaps =
-      DDSCAPS_OFFSCREENPLAIN /* | DDSCAPS_SYSTEMMEMORY */ ;
-  surf_desc.dwFlags =
-      DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH;
-  surf_desc.dwHeight = surface->height;
-  surf_desc.dwWidth = surface->width;
-  memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format,
-      sizeof (DDPIXELFORMAT));
-
-  hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &surf_desc,
-      &surface->surface, NULL);
-  if (hRes != DD_OK) {
-    goto surface_pitch_bad;
-  }
-
-  /* Locking the surface to acquire the memory pointer.
-     Use DDLOCK_NOSYSLOCK to disable syslock which can cause a deadlock 
-     if directdraw api is used while a buffer is lock */
-lock:
-  hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc,
-      DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL);
-  if (hRes == DDERR_SURFACELOST) {
-    IDirectDrawSurface7_Restore (surface->surface);
-    goto lock;
-  }
-  surface->locked = TRUE;
-
-  if (surf_lock_desc.lPitch != pitch) {
-    GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-        "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating a system memory buffer.",
-        surf_lock_desc.lPitch, pitch);
-
-    /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */
-    hRes = IDirectDrawSurface_Unlock (surface->surface, NULL);
-    goto surface_pitch_bad;
-  }
-  GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface;
-  GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height;
-  GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-      "allocating a surface of %d bytes (stride=%ld)\n", size,
-      surf_lock_desc.lPitch);
-
-surface_pitch_bad:
-#else
-  GST_BUFFER (surface)->malloc_data = g_malloc (size);
-  GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data;
-  GST_BUFFER_SIZE (surface) = size;
-  surface->surface = NULL;
-  GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink,
-      "allocating a system memory buffer of %" G_GSIZE_FORMAT " bytes", size);
-
-#endif
-
-  /* Keep a ref to our sink */
-  surface->ddrawsink = gst_object_ref (ddrawsink);
-
-  return surface;
-}
-
-/* We are called from the finalize method of miniobject, the object will be
- * destroyed so we just have to clean our internal stuff */
-static void
-gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink,
-    GstDDrawSurface * surface)
-{
-  g_return_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink));
-
-  /* Release our internal surface */
-  if (surface->surface) {
-    if (surface->locked) {
-      IDirectDrawSurface7_Unlock (surface->surface, NULL);
-      surface->locked = FALSE;
-    }
-    IDirectDrawSurface7_Release (surface->surface);
-    surface->surface = NULL;
-  }
-
-  if (GST_BUFFER (surface)->malloc_data) {
-    g_free (GST_BUFFER (surface)->malloc_data);
-    GST_BUFFER (surface)->malloc_data = NULL;
-  }
-
-  if (!surface->ddrawsink) {
-    goto no_sink;
-  }
-
-  /* Release the ref to our sink */
-  surface->ddrawsink = NULL;
-  gst_object_unref (ddrawsink);
-
-  return;
-
-no_sink:
-  GST_WARNING ("no sink found in surface");
-  return;
-}
-
-static gboolean
-gst_directdraw_sink_surface_check (GstDirectDrawSink * ddrawsink,
-    GstDDrawSurface * surface)
-{
-  if (!surface->surface)
-    return TRUE;                /* system memory buffer */
-
-  if (IDirectDrawSurface7_IsLost (surface->surface) == DD_OK) {
-    /* no problem with this surface */
-    return TRUE;
-  } else {
-    /* this surface was lost, try to restore it */
-    if (IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface) == DD_OK) {
-      /* restore is done */
-      GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, "A surface from our"
-          " bufferpool was restored after lost");
-      return TRUE;
-    }
-  }
-
-  return FALSE;
-}
-
-static void
-gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink)
-{
-  g_mutex_lock (ddrawsink->pool_lock);
-  while (ddrawsink->buffer_pool) {
-    GstDDrawSurface *surface = ddrawsink->buffer_pool->data;
-
-    ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool,
-        ddrawsink->buffer_pool);
-    gst_directdraw_sink_surface_destroy (ddrawsink, surface);
-    gst_buffer_unref (GST_BUFFER_CAST (surface));
-  }
-  g_mutex_unlock (ddrawsink->pool_lock);
-}
-
-static void
-gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink)
-{
-  /* Post quit message and wait for our event window thread */
-  if (ddrawsink->video_window && ddrawsink->our_video_window)
-    PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0);
-
-  if (ddrawsink->window_thread) {
-    g_thread_join (ddrawsink->window_thread);
-    ddrawsink->window_thread = NULL;
-  }
-
-  if (ddrawsink->buffer_pool) {
-    gst_directdraw_sink_bufferpool_clear (ddrawsink);
-    ddrawsink->buffer_pool = NULL;
-  }
-
-  if (ddrawsink->offscreen_surface) {
-    IDirectDrawSurface7_Release (ddrawsink->offscreen_surface);
-    ddrawsink->offscreen_surface = NULL;
-  }
-
-  if (ddrawsink->clipper) {
-    IDirectDrawClipper_Release (ddrawsink->clipper);
-    ddrawsink->clipper = NULL;
-  }
-
-  if (ddrawsink->primary_surface) {
-    IDirectDrawSurface7_Release (ddrawsink->primary_surface);
-    ddrawsink->primary_surface = NULL;
-  }
-
-  if (ddrawsink->ddraw_object) {
-    IDirectDraw7_Release (ddrawsink->ddraw_object);
-    ddrawsink->ddraw_object = NULL;
-  }
-
-  if (ddrawsink->last_buffer) {
-    gst_buffer_unref (ddrawsink->last_buffer);
-    ddrawsink->last_buffer = NULL;
-  }
-
-  ddrawsink->setup = FALSE;
-}
diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h
deleted file mode 100644
index dbd419b..0000000
--- a/sys/directdraw/gstdirectdrawsink.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* GStreamer
- * Copyright (C) 2005 Sebastien Moutte <sebastien@moutte.net>
- * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.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.
- *
- * The development of this code was made possible due to the involvement
- * of Pioneers of the Inevitable, the creators of the Songbird Music player
- *
- */
-
-#ifndef __GST_DIRECTDRAWSINK_H__
-#define __GST_DIRECTDRAWSINK_H__
-
-#define DIRECTDRAW_VERSION 0x0700
-
-#include <gst/gst.h>
-#include <gst/video/gstvideosink.h>
-#include <gst/interfaces/xoverlay.h>
-#include <gst/interfaces/navigation.h>
-
-#include <windows.h>
-#include <ddraw.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_DIRECTDRAW_SINK            (gst_directdraw_sink_get_type())
-#define GST_DIRECTDRAW_SINK(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink))
-#define GST_DIRECTDRAW_SINK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass))
-#define GST_IS_DIRECTDRAW_SINK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK))
-#define GST_IS_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECTDRAW_SINK))
-typedef struct _GstDirectDrawSink GstDirectDrawSink;
-typedef struct _GstDirectDrawSinkClass GstDirectDrawSinkClass;
-
-#define GST_TYPE_DDRAWSURFACE (gst_ddrawsurface_get_type())
-#define GST_IS_DDRAWSURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DDRAWSURFACE))
-#define GST_DDRAWSURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DDRAWSURFACE, GstDDrawSurface))
-
-typedef struct _GstDDrawSurface GstDDrawSurface;
-
-struct _GstDDrawSurface
-{
-  /* Extension of GstBuffer to store directdraw surfaces */
-  GstBuffer buffer;
-
-  /* directdraw surface */
-  LPDIRECTDRAWSURFACE surface;
-
-  /* surface dimensions */
-  gint width;
-  gint height;
-
-  /*TRUE when surface is locked*/
-  gboolean locked;
-
-  /*TRUE when surface is using a system memory buffer 
-  (i'm using system memory when directdraw optimized pitch is not the same as the GStreamer one)*/
-  gboolean system_memory;
-
-  /* pixel format of the encapsulated surface */
-  DDPIXELFORMAT dd_pixel_format;
-
-  /* pointer to parent */
-  GstDirectDrawSink *ddrawsink;
-};
-
-struct _GstDirectDrawSink
-{
-  GstVideoSink videosink;
-
-  /* directdraw offscreen surfaces pool */
-  GSList *buffer_pool;
-  GMutex *pool_lock;
-
-  /* directdraw objects */
-  LPDIRECTDRAW ddraw_object;
-  LPDIRECTDRAWSURFACE primary_surface;
-  LPDIRECTDRAWSURFACE offscreen_surface;
-  LPDIRECTDRAWCLIPPER clipper; 
-
-  /* last buffer displayed (used for XOverlay interface expose method) */
-  GstBuffer * last_buffer;
-
-  /* directdraw caps */
-  GstCaps *caps;
-
-  /* video window management */
-  HWND video_window;
-  gboolean our_video_window;
-  HANDLE window_created_signal;
-  WNDPROC previous_wndproc;
-  LONG_PTR previous_user_data;
-  
-  /* video properties */
-  gint video_width, video_height;
-  gint out_width, out_height;
-  gint fps_n;
-  gint fps_d;
-
-  /* properties */
-  gboolean keep_aspect_ratio;
-
-  /*pixel format */
-  DDPIXELFORMAT dd_pixel_format;
-
-  /* thread processing our default window messages */
-  GThread *window_thread;
-
-  /* TRUE when directdraw object is set up */
-  gboolean setup;
-
-  /* TRUE if the hardware supports blitting from one colorspace to another */
-  gboolean can_blit_between_colorspace;
-
-  /* This flag is used to force re-creation of our offscreen surface.
-   * It's needed when hardware doesn't support fourcc blit and the bit depth
-   * of the current display mode changes.
-   */
-  gboolean must_recreate_offscreen;
-};
-
-struct _GstDirectDrawSinkClass
-{
-  GstVideoSinkClass parent_class;
-};
-
-GType gst_directdraw_sink_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_DIRECTDRAWSINK_H__ */
diff --git a/sys/directsound/Makefile.am b/sys/directsound/Makefile.am
index 18b0980..cfc769f 100644
--- a/sys/directsound/Makefile.am
+++ b/sys/directsound/Makefile.am
@@ -5,7 +5,7 @@
 	$(GST_PLUGINS_BASE_CFLAGS) $(DIRECTX_CFLAGS)
 libgstdirectsoundsrc_la_LIBADD = \
 	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
-	$(DIRECTX_LDFLAGS) -ldsound
+	$(DIRECTX_LDFLAGS) $(DIRECTSOUND_LIBS)
 libgstdirectsoundsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdirectsoundsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
diff --git a/sys/directsound/Makefile.in b/sys/directsound/Makefile.in
index aa0e823..61471cf 100644
--- a/sys/directsound/Makefile.in
+++ b/sys/directsound/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/directsound
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -155,7 +165,8 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstdirectsoundsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am_libgstdirectsoundsrc_la_OBJECTS =  \
 	libgstdirectsoundsrc_la-gstdirectsoundsrc.lo \
 	libgstdirectsoundsrc_la-gstdirectsoundplugin.lo
@@ -230,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +287,6 @@
 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@
@@ -287,7 +299,6 @@
 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@
@@ -295,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +442,6 @@
 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@
@@ -433,7 +450,6 @@
 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@
@@ -446,7 +462,6 @@
 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@
@@ -460,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -734,7 +770,7 @@
 
 libgstdirectsoundsrc_la_LIBADD = \
 	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
-	$(DIRECTX_LDFLAGS) -ldsound
+	$(DIRECTX_LDFLAGS) $(DIRECTSOUND_LIBS)
 
 libgstdirectsoundsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdirectsoundsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
@@ -755,7 +791,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/directsound/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/directsound/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1072,6 +1107,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/directsound/gstdirectsoundsrc.c b/sys/directsound/gstdirectsoundsrc.c
index 420a70d..18f49f8 100644
--- a/sys/directsound/gstdirectsoundsrc.c
+++ b/sys/directsound/gstdirectsoundsrc.c
@@ -73,18 +73,22 @@
 
 #include <windows.h>
 #include <dsound.h>
+#include <mmsystem.h>
 
 GST_DEBUG_CATEGORY_STATIC (directsoundsrc_debug);
 #define GST_CAT_DEFAULT directsoundsrc_debug
 
 /* defaults here */
 #define DEFAULT_DEVICE 0
+#define DEFAULT_MUTE FALSE
 
 /* properties */
 enum
 {
   PROP_0,
-  PROP_DEVICE_NAME
+  PROP_DEVICE_NAME,
+  PROP_VOLUME,
+  PROP_MUTE
 };
 
 static HRESULT (WINAPI * pDSoundCaptureCreate) (LPGUID,
@@ -114,6 +118,18 @@
 
 static guint gst_directsound_src_delay (GstAudioSrc * asrc);
 
+static gboolean gst_directsound_src_mixer_find (GstDirectSoundSrc * dsoundsrc,
+    MIXERCAPS * mixer_caps);
+static void gst_directsound_src_mixer_init (GstDirectSoundSrc * dsoundsrc);
+
+static gdouble gst_directsound_src_get_volume (GstDirectSoundSrc * dsoundsrc);
+static void gst_directsound_src_set_volume (GstDirectSoundSrc * dsoundsrc,
+    gdouble volume);
+
+static gboolean gst_directsound_src_get_mute (GstDirectSoundSrc * dsoundsrc);
+static void gst_directsound_src_set_mute (GstDirectSoundSrc * dsoundsrc,
+    gboolean mute);
+
 static GstStaticPadTemplate directsound_src_src_factory =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
@@ -124,7 +140,9 @@
         "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]"));
 
 #define gst_directsound_src_parent_class parent_class
-G_DEFINE_TYPE (GstDirectSoundSrc, gst_directsound_src, GST_TYPE_AUDIO_SRC);
+G_DEFINE_TYPE_WITH_CODE (GstDirectSoundSrc, gst_directsound_src,
+    GST_TYPE_AUDIO_SRC, G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL)
+    );
 
 static void
 gst_directsound_src_dispose (GObject * object)
@@ -193,6 +211,18 @@
       (gobject_class, PROP_DEVICE_NAME,
       g_param_spec_string ("device-name", "Device name",
           "Human-readable name of the sound device", NULL, G_PARAM_READWRITE));
+
+  g_object_class_install_property
+      (gobject_class, PROP_VOLUME,
+      g_param_spec_double ("volume", "Volume",
+          "Volume of this stream", 0.0, 1.0, 1.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property
+      (gobject_class, PROP_MUTE,
+      g_param_spec_boolean ("mute", "Mute",
+          "Mute state of this stream", DEFAULT_MUTE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static GstCaps *
@@ -223,6 +253,12 @@
       }
 
       break;
+    case PROP_VOLUME:
+      gst_directsound_src_set_volume (src, g_value_get_double (value));
+      break;
+    case PROP_MUTE:
+      gst_directsound_src_set_mute (src, g_value_get_boolean (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -241,6 +277,12 @@
     case PROP_DEVICE_NAME:
       g_value_set_string (value, src->device_name);
       break;
+    case PROP_VOLUME:
+      g_value_set_double (value, gst_directsound_src_get_volume (src));
+      break;
+    case PROP_MUTE:
+      g_value_set_boolean (value, gst_directsound_src_get_mute (src));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -260,6 +302,11 @@
   g_mutex_init (&src->dsound_lock);
   src->device_guid = NULL;
   src->device_name = NULL;
+  src->mixer = NULL;
+  src->control_id_mute = -1;
+  src->control_id_volume = -1;
+  src->volume = 100;
+  src->mute = FALSE;
 }
 
 
@@ -326,6 +373,7 @@
     goto capture_object;
   }
 
+  gst_directsound_src_mixer_init (dsoundsrc);
   return TRUE;
 
 capture_function:
@@ -374,6 +422,9 @@
   /* Close library */
   FreeLibrary (dsoundsrc->DSoundDLL);
 
+  if (dsoundsrc->mixer)
+    mixerClose (dsoundsrc->mixer);
+
   return TRUE;
 }
 
@@ -661,3 +712,215 @@
 
   GST_DSOUND_UNLOCK (dsoundsrc);
 }
+
+/* If the PROP_DEVICE_NAME is set, find the mixer related to device;
+ * otherwise we get the default input mixer. */
+static gboolean
+gst_directsound_src_mixer_find (GstDirectSoundSrc * dsoundsrc,
+    MIXERCAPS * mixer_caps)
+{
+  MMRESULT mmres;
+  guint i, num_mixers;
+
+  num_mixers = mixerGetNumDevs ();
+  for (i = 0; i < num_mixers; i++) {
+    mmres = mixerOpen (&dsoundsrc->mixer, i, 0L, 0L,
+        MIXER_OBJECTF_MIXER | MIXER_OBJECTF_WAVEIN);
+
+    if (mmres != MMSYSERR_NOERROR)
+      continue;
+
+    mmres = mixerGetDevCaps (GPOINTER_TO_UINT (dsoundsrc->mixer),
+        mixer_caps, sizeof (MIXERCAPS));
+
+    if (mmres != MMSYSERR_NOERROR) {
+      mixerClose (dsoundsrc->mixer);
+      continue;
+    }
+
+    /* Get default mixer */
+    if (dsoundsrc->device_name == NULL) {
+      GST_DEBUG ("Got default input mixer: %s", mixer_caps->szPname);
+      return TRUE;
+    }
+
+    if (g_strstr_len (dsoundsrc->device_name, -1, mixer_caps->szPname) != NULL) {
+      GST_DEBUG ("Got requested input mixer: %s", mixer_caps->szPname);
+      return TRUE;
+    }
+
+    /* Wrong mixer */
+    mixerClose (dsoundsrc->mixer);
+  }
+
+  GST_DEBUG ("Can't find input mixer");
+  return FALSE;
+}
+
+static void
+gst_directsound_src_mixer_init (GstDirectSoundSrc * dsoundsrc)
+{
+  gint i, k;
+  gboolean found_mic;
+  MMRESULT mmres;
+  MIXERCAPS mixer_caps;
+  MIXERLINE mixer_line;
+  MIXERLINECONTROLS ml_ctrl;
+  PMIXERCONTROL pamixer_ctrls;
+
+  if (!gst_directsound_src_mixer_find (dsoundsrc, &mixer_caps))
+    goto mixer_init_fail;
+
+  /* Find the MIXERLINE related to MICROPHONE */
+  found_mic = FALSE;
+  for (i = 0; i < mixer_caps.cDestinations && !found_mic; i++) {
+    gint j, num_connections;
+
+    mixer_line.cbStruct = sizeof (mixer_line);
+    mixer_line.dwDestination = i;
+    mmres = mixerGetLineInfo ((HMIXEROBJ) dsoundsrc->mixer,
+        &mixer_line, MIXER_GETLINEINFOF_DESTINATION);
+
+    if (mmres != MMSYSERR_NOERROR)
+      goto mixer_init_fail;
+
+    num_connections = mixer_line.cConnections;
+    for (j = 0; j < num_connections && !found_mic; j++) {
+      mixer_line.cbStruct = sizeof (mixer_line);
+      mixer_line.dwDestination = i;
+      mixer_line.dwSource = j;
+      mmres = mixerGetLineInfo ((HMIXEROBJ) dsoundsrc->mixer,
+          &mixer_line, MIXER_GETLINEINFOF_SOURCE);
+
+      if (mmres != MMSYSERR_NOERROR)
+        goto mixer_init_fail;
+
+      if (mixer_line.dwComponentType == MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE
+          || mixer_line.dwComponentType == MIXERLINE_COMPONENTTYPE_SRC_LINE)
+        found_mic = TRUE;
+    }
+  }
+
+  if (found_mic == FALSE) {
+    GST_DEBUG ("Can't find mixer line related to input");
+    goto mixer_init_fail;
+  }
+
+  /* Get control associated with microphone audio line */
+  pamixer_ctrls = g_malloc (sizeof (MIXERCONTROL) * mixer_line.cControls);
+  ml_ctrl.cbStruct = sizeof (ml_ctrl);
+  ml_ctrl.dwLineID = mixer_line.dwLineID;
+  ml_ctrl.cControls = mixer_line.cControls;
+  ml_ctrl.cbmxctrl = sizeof (MIXERCONTROL);
+  ml_ctrl.pamxctrl = pamixer_ctrls;
+  mmres = mixerGetLineControls ((HMIXEROBJ) dsoundsrc->mixer,
+      &ml_ctrl, MIXER_GETLINECONTROLSF_ALL);
+
+  /* Find control associated with volume and mute */
+  for (k = 0; k < mixer_line.cControls; k++) {
+    if (strstr (pamixer_ctrls[k].szName, "Volume") != NULL) {
+      dsoundsrc->control_id_volume = pamixer_ctrls[k].dwControlID;
+      dsoundsrc->dw_vol_max = pamixer_ctrls[k].Bounds.dwMaximum;
+      dsoundsrc->dw_vol_min = pamixer_ctrls[k].Bounds.dwMinimum;
+    } else if (strstr (pamixer_ctrls[k].szName, "Mute") != NULL) {
+      dsoundsrc->control_id_mute = pamixer_ctrls[k].dwControlID;
+    } else {
+      GST_DEBUG ("Control not handled: %s", pamixer_ctrls[k].szName);
+    }
+  }
+  g_free (pamixer_ctrls);
+
+  if (dsoundsrc->control_id_volume < 0 && dsoundsrc->control_id_mute < 0)
+    goto mixer_init_fail;
+
+  /* Save cChannels information to properly changes in volume */
+  dsoundsrc->mixerline_cchannels = mixer_line.cChannels;
+  return;
+
+mixer_init_fail:
+  GST_WARNING ("Failed to get Volume and Mute controls");
+  if (dsoundsrc->mixer != NULL) {
+    mixerClose (dsoundsrc->mixer);
+    dsoundsrc->mixer = NULL;
+  }
+}
+
+static gdouble
+gst_directsound_src_get_volume (GstDirectSoundSrc * dsoundsrc)
+{
+  return (gdouble) dsoundsrc->volume / 100;
+}
+
+static gboolean
+gst_directsound_src_get_mute (GstDirectSoundSrc * dsoundsrc)
+{
+  return dsoundsrc->mute;
+}
+
+static void
+gst_directsound_src_set_volume (GstDirectSoundSrc * dsoundsrc, gdouble volume)
+{
+  MMRESULT mmres;
+  MIXERCONTROLDETAILS details;
+  MIXERCONTROLDETAILS_UNSIGNED details_unsigned;
+  glong dwvolume;
+
+  if (dsoundsrc->mixer == NULL || dsoundsrc->control_id_volume < 0) {
+    GST_WARNING ("mixer not initialized");
+    return;
+  }
+
+  dwvolume = volume * dsoundsrc->dw_vol_max;
+  dwvolume = CLAMP (dwvolume, dsoundsrc->dw_vol_min, dsoundsrc->dw_vol_max);
+
+  GST_DEBUG ("max volume %ld | min volume %ld",
+      dsoundsrc->dw_vol_max, dsoundsrc->dw_vol_min);
+  GST_DEBUG ("set volume to %f (%ld)", volume, dwvolume);
+
+  details.cbStruct = sizeof (details);
+  details.dwControlID = dsoundsrc->control_id_volume;
+  details.cChannels = dsoundsrc->mixerline_cchannels;
+  details.cMultipleItems = 0;
+
+  details_unsigned.dwValue = dwvolume;
+  details.cbDetails = sizeof (MIXERCONTROLDETAILS_UNSIGNED);
+  details.paDetails = &details_unsigned;
+
+  mmres = mixerSetControlDetails ((HMIXEROBJ) dsoundsrc->mixer,
+      &details, MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE);
+
+  if (mmres != MMSYSERR_NOERROR)
+    GST_WARNING ("Failed to set volume");
+  else
+    dsoundsrc->volume = volume * 100;
+}
+
+static void
+gst_directsound_src_set_mute (GstDirectSoundSrc * dsoundsrc, gboolean mute)
+{
+  MMRESULT mmres;
+  MIXERCONTROLDETAILS details;
+  MIXERCONTROLDETAILS_BOOLEAN details_boolean;
+
+  if (dsoundsrc->mixer == NULL || dsoundsrc->control_id_mute < 0) {
+    GST_WARNING ("mixer not initialized");
+    return;
+  }
+
+  details.cbStruct = sizeof (details);
+  details.dwControlID = dsoundsrc->control_id_mute;
+  details.cChannels = dsoundsrc->mixerline_cchannels;
+  details.cMultipleItems = 0;
+
+  details_boolean.fValue = mute;
+  details.cbDetails = sizeof (MIXERCONTROLDETAILS_BOOLEAN);
+  details.paDetails = &details_boolean;
+
+  mmres = mixerSetControlDetails ((HMIXEROBJ) dsoundsrc->mixer,
+      &details, MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE);
+
+  if (mmres != MMSYSERR_NOERROR)
+    GST_WARNING ("Failed to set mute");
+  else
+    dsoundsrc->mute = mute;
+}
diff --git a/sys/directsound/gstdirectsoundsrc.h b/sys/directsound/gstdirectsoundsrc.h
index 4c65372..a2ac6ff 100644
--- a/sys/directsound/gstdirectsoundsrc.h
+++ b/sys/directsound/gstdirectsoundsrc.h
@@ -52,6 +52,7 @@
 #include <gst/audio/gstaudiosrc.h>

 #include <windows.h>

 #include <dsound.h>

+#include <mmsystem.h>
 

 /* add here some headers if needed */

 

@@ -91,6 +92,15 @@
   guint buffer_time;

   guint latency_time;

 

+  HMIXER mixer;
+  DWORD mixerline_cchannels;
+  gint control_id_volume;
+  gint control_id_mute;
+  glong dw_vol_max;
+  glong dw_vol_min;
+
+  glong volume;
+  gboolean mute;
 

   GUID *device_guid;

   char *device_name;

diff --git a/sys/dshowdecwrapper/Makefile.in b/sys/dshowdecwrapper/Makefile.in
index 36c9b9a..aa84f24 100644
--- a/sys/dshowdecwrapper/Makefile.in
+++ b/sys/dshowdecwrapper/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/dshowdecwrapper
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -233,6 +243,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -250,8 +261,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -276,8 +289,6 @@
 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@
@@ -290,7 +301,6 @@
 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@
@@ -298,6 +308,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -324,11 +336,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -347,8 +362,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -407,10 +420,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -427,7 +444,6 @@
 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@
@@ -436,7 +452,6 @@
 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@
@@ -449,7 +464,6 @@
 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@
@@ -463,6 +477,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -474,6 +489,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -512,6 +529,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -547,10 +565,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -576,6 +598,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -583,7 +608,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -612,6 +644,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -622,6 +655,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -652,17 +686,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -679,6 +712,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -717,6 +751,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -760,7 +795,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/dshowdecwrapper/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/dshowdecwrapper/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1101,6 +1135,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/dshowdecwrapper/gstdshowaudiodec.cpp b/sys/dshowdecwrapper/gstdshowaudiodec.cpp
index f42b03a..caebec5 100644
--- a/sys/dshowdecwrapper/gstdshowaudiodec.cpp
+++ b/sys/dshowdecwrapper/gstdshowaudiodec.cpp
@@ -51,12 +51,13 @@
 #include <mmreg.h>
 #include <dmoreg.h>
 #include <wmcodecdsp.h>
+#include <gst/audio/audio.h>
 
 GST_DEBUG_CATEGORY_STATIC (dshowaudiodec_debug);
 #define GST_CAT_DEFAULT dshowaudiodec_debug
 
-GST_BOILERPLATE (GstDshowAudioDec, gst_dshowaudiodec, GstElement,
-    GST_TYPE_ELEMENT);
+#define gst_dshowaudiodec_parent_class parent_class
+G_DEFINE_TYPE(GstDshowAudioDec, gst_dshowaudiodec, GST_TYPE_ELEMENT)
 
 static void gst_dshowaudiodec_finalize (GObject * object);
 static GstStateChangeReturn gst_dshowaudiodec_change_state
@@ -64,8 +65,8 @@
 
 /* sink pad overwrites */
 static gboolean gst_dshowaudiodec_sink_setcaps (GstPad * pad, GstCaps * caps);
-static GstFlowReturn gst_dshowaudiodec_chain (GstPad * pad, GstBuffer * buffer);
-static gboolean gst_dshowaudiodec_sink_event (GstPad * pad, GstEvent * event);
+static GstFlowReturn gst_dshowaudiodec_chain (GstPad * pad, GstObject *parent, GstBuffer * buffer);
+static gboolean gst_dshowaudiodec_sink_event (GstPad * pad, GstObject *parent, GstEvent * event);
 
 /* utils */
 static gboolean gst_dshowaudiodec_create_graph_and_filters (GstDshowAudioDec *
@@ -158,7 +159,7 @@
   GstBuffer *out_buf = NULL;
   gboolean in_seg = FALSE;
   GstClockTime buf_start, buf_stop;
-  gint64 clip_start = 0, clip_stop = 0;
+  guint64 clip_start = 0, clip_stop = 0;
   guint start_offset = 0, stop_offset;
   GstClockTime duration;
 
@@ -199,20 +200,21 @@
      * GstBuffer for output, and clip if required */
 
     /* allocate a new buffer for raw audio */
-    mDec->last_ret = gst_pad_alloc_buffer (mDec->srcpad, 
-        GST_BUFFER_OFFSET_NONE,
-        size,
-        GST_PAD_CAPS (mDec->srcpad), &out_buf);
+    out_buf = gst_buffer_new_and_alloc(size);
     if (!out_buf) {
       GST_WARNING_OBJECT (mDec, "cannot allocate a new GstBuffer");
       goto done;
     }
-
+    
     /* set buffer properties */
     GST_BUFFER_TIMESTAMP (out_buf) = buf_start;
     GST_BUFFER_DURATION (out_buf) = duration;
-    memcpy (GST_BUFFER_DATA (out_buf), pBuffer,
-        MIN ((unsigned int)size, GST_BUFFER_SIZE (out_buf)));
+
+    if (gst_buffer_fill(out_buf, 0, pBuffer, size) != size) {
+      gst_buffer_unref (out_buf);
+      GST_WARNING_OBJECT (mDec, "unable to fill output buffer");
+      goto done;
+    }
 
     /* we have to remove some heading samples */
     if ((GstClockTime) clip_start > buf_start) {
@@ -231,11 +233,11 @@
 
     /* truncating */
     if ((start_offset != 0) || (stop_offset != (size_t) size)) {
-      GstBuffer *subbuf = gst_buffer_create_sub (out_buf, start_offset,
-          stop_offset - start_offset);
+      
+      GstBuffer *subbuf = gst_buffer_copy_region (out_buf, GST_BUFFER_COPY_ALL, 
+        start_offset, stop_offset - start_offset);
 
       if (subbuf) {
-        gst_buffer_set_caps (subbuf, GST_PAD_CAPS (mDec->srcpad));
         gst_buffer_unref (out_buf);
         out_buf = subbuf;
       }
@@ -305,6 +307,21 @@
   return S_FALSE;
 }
 
+int AudioFakeSink::GetBufferSize()
+{
+  IMemAllocator *allocator = NULL;
+  if (m_pInputPin) {
+    allocator = m_pInputPin->Allocator();
+    if(allocator) {
+      ALLOCATOR_PROPERTIES props;
+      allocator->GetProperties(&props);
+      return props.cbBuffer;
+    }
+  }
+
+  return 0;
+}
+
 static void
 gst_dshowaudiodec_base_init (gpointer klass)
 {
@@ -312,36 +329,34 @@
   GstPadTemplate *src, *sink;
   GstCaps *srccaps, *sinkcaps;
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  GstElementDetails details;
   const AudioCodecEntry *tmp;
   gpointer qdata;
+  gchar *longname, *description;
 
   qdata = g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass), DSHOW_CODEC_QDATA);
 
   /* element details */
   tmp = audiodec_class->entry = (AudioCodecEntry *) qdata;
 
-  details.longname = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+  longname = g_strdup_printf ("DirectShow %s Decoder Wrapper",
       tmp->element_longname);
-  details.klass = g_strdup ("Codec/Decoder/Audio");
-  details.description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+  description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
       tmp->element_longname);
-  details.author = "Sebastien Moutte <sebastien@moutte.net>";
-  gst_element_class_set_details (element_class, &details);
-  g_free (details.longname);
-  g_free (details.klass);
-  g_free (details.description);
+
+  gst_element_class_set_metadata(element_class, longname, "Codec/Decoder/Audio", description, 
+    "Sebastien Moutte <sebastien@moutte.net>");
+  
+  g_free (longname);
+  g_free (description);
 
   sinkcaps = gst_caps_from_string (tmp->sinkcaps);
 
   srccaps = gst_caps_from_string (
-      "audio/x-raw-int,"
-      "width = (int)[1, 32],"
-      "depth = (int)[1, 32],"
+      "audio/x-raw,"
+      "format = (string)" GST_AUDIO_FORMATS_ALL ","
       "rate = (int)[1, MAX],"
       "channels = (int)[1, MAX],"
-      "signed = (boolean)true,"
-      "endianness = (int)" G_STRINGIFY(G_LITTLE_ENDIAN));
+      "layout = (string)interleaved");
 
   sink = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sinkcaps);
   src = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
@@ -370,7 +385,7 @@
 {
   HRESULT res;
 
-  g_mutex_lock (adec->com_init_lock);
+  g_mutex_lock (&adec->com_init_lock);
 
   /* Initialize COM with a MTA for this process. This thread will
    * be the first one to enter the apartement and the last one to leave
@@ -387,24 +402,23 @@
   adec->comInitialized = TRUE;
 
   /* Signal other threads waiting on this condition that COM was initialized */
-  g_cond_signal (adec->com_initialized);
+  g_cond_signal (&adec->com_initialized);
 
-  g_mutex_unlock (adec->com_init_lock);
+  g_mutex_unlock (&adec->com_init_lock);
 
   /* Wait until the unitialize condition is met to leave the COM apartement */
-  g_mutex_lock (adec->com_deinit_lock);
-  g_cond_wait (adec->com_uninitialize, adec->com_deinit_lock);
+  g_mutex_lock (&adec->com_deinit_lock);
+  g_cond_wait (&adec->com_uninitialize, &adec->com_deinit_lock);
 
   CoUninitialize ();
   GST_INFO_OBJECT (adec, "COM unintialized succesfully");
   adec->comInitialized = FALSE;
-  g_cond_signal (adec->com_uninitialized);
-  g_mutex_unlock (adec->com_deinit_lock);
+  g_cond_signal (&adec->com_uninitialized);
+  g_mutex_unlock (&adec->com_deinit_lock);
 }
 
 static void
-gst_dshowaudiodec_init (GstDshowAudioDec * adec,
-    GstDshowAudioDecClass * adec_class)
+gst_dshowaudiodec_init (GstDshowAudioDec * adec)
 {
   GstElementClass *element_class = GST_ELEMENT_GET_CLASS (adec);
 
@@ -413,7 +427,6 @@
       gst_pad_new_from_template (gst_element_class_get_pad_template
       (element_class, "sink"), "sink");
 
-  gst_pad_set_setcaps_function (adec->sinkpad, gst_dshowaudiodec_sink_setcaps);
   gst_pad_set_event_function (adec->sinkpad, gst_dshowaudiodec_sink_event);
   gst_pad_set_chain_function (adec->sinkpad, gst_dshowaudiodec_chain);
   gst_element_add_pad (GST_ELEMENT (adec), adec->sinkpad);
@@ -443,21 +456,21 @@
 
   adec->last_ret = GST_FLOW_OK;
 
-  adec->com_init_lock = g_mutex_new();
-  adec->com_deinit_lock = g_mutex_new();
-  adec->com_initialized = g_cond_new();
-  adec->com_uninitialize = g_cond_new();
-  adec->com_uninitialized = g_cond_new();
+  g_mutex_init(&adec->com_init_lock);
+  g_mutex_init(&adec->com_deinit_lock);
+  g_cond_init(&adec->com_initialized);
+  g_cond_init(&adec->com_uninitialize);
+  g_cond_init(&adec->com_uninitialized);
 
-  g_mutex_lock (adec->com_init_lock);
+  g_mutex_lock (&adec->com_init_lock);
 
   /* create the COM initialization thread */
-  g_thread_create ((GThreadFunc)gst_dshowaudiodec_com_thread,
-      adec, FALSE, NULL);
+  g_thread_new ("COM init thread", (GThreadFunc)gst_dshowaudiodec_com_thread, 
+    adec);
 
   /* wait until the COM thread signals that COM has been initialized */
-  g_cond_wait (adec->com_initialized, adec->com_init_lock);
-  g_mutex_unlock (adec->com_init_lock);
+  g_cond_wait (&adec->com_initialized, &adec->com_init_lock);
+  g_mutex_unlock (&adec->com_init_lock);
 }
 
 static void
@@ -477,17 +490,17 @@
 
   /* signal the COM thread that it sould uninitialize COM */
   if (adec->comInitialized) {
-    g_mutex_lock (adec->com_deinit_lock);
-    g_cond_signal (adec->com_uninitialize);
-    g_cond_wait (adec->com_uninitialized, adec->com_deinit_lock);
-    g_mutex_unlock (adec->com_deinit_lock);
+    g_mutex_lock (&adec->com_deinit_lock);
+    g_cond_signal (&adec->com_uninitialize);
+    g_cond_wait (&adec->com_uninitialized, &adec->com_deinit_lock);
+    g_mutex_unlock (&adec->com_deinit_lock);
   }
 
-  g_mutex_free (adec->com_init_lock);
-  g_mutex_free (adec->com_deinit_lock);
-  g_cond_free (adec->com_initialized);
-  g_cond_free (adec->com_uninitialize);
-  g_cond_free (adec->com_uninitialized);
+  g_mutex_clear (&adec->com_init_lock);
+  g_mutex_clear (&adec->com_deinit_lock);
+  g_cond_clear (&adec->com_initialized);
+  g_cond_clear (&adec->com_uninitialize);
+  g_cond_clear (&adec->com_uninitialized);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -529,7 +542,7 @@
       break;
   }
 
-  return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  return GST_ELEMENT_CLASS(parent_class)->change_state (element, transition);
 }
 
 static gboolean
@@ -571,9 +584,10 @@
 }
 
 static GstFlowReturn
-gst_dshowaudiodec_chain (GstPad * pad, GstBuffer * buffer)
+gst_dshowaudiodec_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer)
 {
   GstDshowAudioDec *adec = (GstDshowAudioDec *) gst_pad_get_parent (pad);
+  GstMapInfo map;
   bool discont = FALSE;
 
   if (!adec->setup) {
@@ -583,7 +597,7 @@
     goto beach;
   }
 
-  if (GST_FLOW_IS_FATAL (adec->last_ret)) {
+  if (adec->last_ret != GST_FLOW_OK) {
     GST_DEBUG_OBJECT (adec, "last decoding iteration generated a fatal error "
         "%s", gst_flow_get_name (adec->last_ret));
     goto beach;
@@ -591,7 +605,7 @@
 
   GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec, "chain (size %d)=> pts %"
       GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,
-      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
+      gst_buffer_get_size(buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer) +
           GST_BUFFER_DURATION (buffer)));
 
@@ -605,10 +619,12 @@
   }
 
   /* push the buffer to the directshow decoder */
+  gst_buffer_map(buffer, &map, GST_MAP_READ);
   adec->fakesrc->GetOutputPin()->PushBuffer (
-      GST_BUFFER_DATA (buffer), GST_BUFFER_TIMESTAMP (buffer),
+      map.data, GST_BUFFER_TIMESTAMP (buffer),
       GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer),
-      GST_BUFFER_SIZE (buffer), (bool)discont);
+      map.size, (bool)discont);
+  gst_buffer_unmap(buffer, &map);
 
 beach:
   gst_buffer_unref (buffer);
@@ -617,51 +633,45 @@
 }
 
 static gboolean
-gst_dshowaudiodec_sink_event (GstPad * pad, GstEvent * event)
+gst_dshowaudiodec_sink_event (GstPad * pad, GstObject *parent, GstEvent * event)
 {
   gboolean ret = TRUE;
-  GstDshowAudioDec *adec = (GstDshowAudioDec *) gst_pad_get_parent (pad);
+  GstDshowAudioDec *adec = (GstDshowAudioDec *) parent;
 
   switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_FLUSH_STOP:{
-      gst_dshowaudiodec_flush (adec);
-      ret = gst_pad_event_default (pad, event);
+    case GST_EVENT_CAPS:{
+      GstCaps *caps;
+      gst_event_parse_caps(event, &caps);
+      ret = gst_dshowaudiodec_sink_setcaps(pad, caps);
       break;
     }
-    case GST_EVENT_NEWSEGMENT:
-    {
-      GstFormat format;
-      gdouble rate;
-      gint64 start, stop, time;
-      gboolean update;
 
-      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
-          &stop, &time);
+    case GST_EVENT_FLUSH_STOP:{
+      gst_dshowaudiodec_flush (adec);
+      ret = gst_pad_event_default (pad, parent, event);
+      break;
+    }
+
+    case GST_EVENT_SEGMENT:{
+      const GstSegment *segment;
+      gst_event_parse_segment (event, &segment);
 
       GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec,
           "received new segment from %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT,
-          GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
-
-      if (update) {
-        GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec,
-            "closing current segment flushing..");
-        gst_dshowaudiodec_flush (adec);
-      }
+          GST_TIME_ARGS (segment->start), GST_TIME_ARGS (segment->stop));
 
       /* save the new segment in our local current segment */
-      gst_segment_set_newsegment (adec->segment, update, rate, format, start,
-          stop, time);
+      gst_segment_copy_into(segment, adec->segment);
 
-      ret = gst_pad_event_default (pad, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
     }
+
     default:
-      ret = gst_pad_event_default (pad, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
   }
 
-  gst_object_unref (adec);
-
   return ret;
 }
 
@@ -757,7 +767,7 @@
   else 
   {
     size = sizeof (WAVEFORMATEX) +
-        (adec->codec_data ? GST_BUFFER_SIZE (adec->codec_data) : 0);
+        (adec->codec_data ? gst_buffer_get_size(adec->codec_data) : 0);
 
     if (adec->layer == 3) {
       MPEGLAYER3WAVEFORMAT *mp3format;
@@ -783,11 +793,12 @@
     }
     else {
       format = (WAVEFORMATEX *)g_malloc0 (size);
+
       if (adec->codec_data) {     /* Codec data is appended after our header */
-        memcpy (((guchar *) format) + sizeof (WAVEFORMATEX),
-            GST_BUFFER_DATA (adec->codec_data),
-            GST_BUFFER_SIZE (adec->codec_data));
-        format->cbSize = GST_BUFFER_SIZE (adec->codec_data);
+        gsize codec_size = gst_buffer_get_size(adec->codec_data);
+        gst_buffer_extract(adec->codec_data, 0, ((guchar *) format) + sizeof (WAVEFORMATEX), 
+          codec_size);
+        format->cbSize = codec_size;
       }
     }
 
@@ -855,14 +866,15 @@
   GstDshowAudioDecClass *klass =
       (GstDshowAudioDecClass *) G_OBJECT_GET_CLASS (adec);
   HRESULT hres;
-  GstCaps *outcaps;
+  GstCaps *outcaps = NULL;
   AM_MEDIA_TYPE *output_mediatype = NULL;
   AM_MEDIA_TYPE *input_mediatype = NULL;
-  CComPtr<IPin> output_pin;
-  CComPtr<IPin> input_pin;
+  IPinPtr output_pin = NULL;
+  IPinPtr input_pin = NULL;
   const AudioCodecEntry *codec_entry = klass->entry;
-  CComQIPtr<IBaseFilter> srcfilter;
-  CComQIPtr<IBaseFilter> sinkfilter;
+  IBaseFilterPtr srcfilter;
+  IBaseFilterPtr sinkfilter;
+  GstAudioInfo audio_info;
 
   input_mediatype = dshowaudiodec_set_input_format (adec, caps);
 
@@ -901,22 +913,18 @@
 
   adec->fakesink->SetMediaType(output_mediatype);
 
-  outcaps = gst_caps_new_simple ("audio/x-raw-int",
-      "width", G_TYPE_INT, adec->depth,
-      "depth", G_TYPE_INT, adec->depth,
-      "rate", G_TYPE_INT, adec->rate,
-      "channels", G_TYPE_INT, adec->channels, 
-      "signed", G_TYPE_BOOLEAN, TRUE,
-      "endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
-      NULL);
+  gst_audio_info_init(&audio_info);
+  gst_audio_info_set_format(&audio_info, 
+    gst_audio_format_build_integer(TRUE, G_BYTE_ORDER, adec->depth, adec->depth),
+    adec->rate, adec->channels, NULL);
+
+  outcaps = gst_audio_info_to_caps(&audio_info);
 
   if (!gst_pad_set_caps (adec->srcpad, outcaps)) {
-    gst_caps_unref (outcaps);
     GST_ELEMENT_ERROR (adec, CORE, NEGOTIATION,
         ("Failed to negotiate output"), (NULL));
     goto end;
   }
-  gst_caps_unref (outcaps);
 
   /* connect the decoder to our fake sink */
   output_pin = gst_dshow_get_pin_from_filter (adec->decfilter, PINDIR_OUTPUT);
@@ -951,6 +959,8 @@
   ret = TRUE;
   adec->setup = TRUE;
 end:
+  if (outcaps)
+    gst_caps_unref(outcaps);
   if (input_mediatype)
     dshowadec_free_mediatype (input_mediatype);
   if (output_mediatype)
@@ -962,8 +972,8 @@
 static gboolean
 gst_dshowaudiodec_get_filter_settings (GstDshowAudioDec * adec)
 {
-  CComPtr<IPin> output_pin;
-  CComPtr<IEnumMediaTypes> enum_mediatypes;
+  IPinPtr output_pin;
+  IEnumMediaTypesPtr enum_mediatypes;
   HRESULT hres;
   ULONG fetched;
   BOOL ret = FALSE;
@@ -1008,13 +1018,13 @@
   HRESULT hres;
   GstDshowAudioDecClass *klass =
       (GstDshowAudioDecClass *) G_OBJECT_GET_CLASS (adec);
-  CComQIPtr<IBaseFilter> srcfilter;
-  CComQIPtr<IBaseFilter> sinkfilter;
+  IBaseFilterPtr srcfilter;
+  IBaseFilterPtr sinkfilter;
   GUID insubtype = GUID_MEDIASUBTYPE_FROM_FOURCC (klass->entry->format);
   GUID outsubtype = GUID_MEDIASUBTYPE_FROM_FOURCC (WAVE_FORMAT_PCM);
 
   /* create the filter graph manager object */
-  hres = adec->filtergraph.CoCreateInstance (
+  hres = adec->filtergraph.CreateInstance (
       CLSID_FilterGraph, NULL, CLSCTX_INPROC);
   if (FAILED (hres)) {
     GST_ELEMENT_ERROR (adec, STREAM, FAILED,
@@ -1102,7 +1112,7 @@
 
   if (adec->fakesrc) {
     if (adec->filtergraph) {
-      CComQIPtr<IBaseFilter> filter = adec->fakesrc;
+      IBaseFilterPtr filter = adec->fakesrc;
       adec->filtergraph->RemoveFilter(filter);
     }
     adec->fakesrc->Release();
@@ -1115,7 +1125,7 @@
   }
   if (adec->fakesink) {
     if (adec->filtergraph) {
-      CComQIPtr<IBaseFilter> filter = adec->fakesink;
+      IBaseFilterPtr filter = adec->fakesink;
       adec->filtergraph->RemoveFilter(filter);
     }
 
@@ -1153,7 +1163,7 @@
   hr = CoInitialize(0);
   for (i = 0; i < sizeof (audio_dec_codecs) / sizeof (AudioCodecEntry); i++) {
     GType type;
-    CComPtr<IBaseFilter> filter;
+    IBaseFilterPtr filter;
     GUID insubtype = GUID_MEDIASUBTYPE_FROM_FOURCC (audio_dec_codecs[i].format);
     GUID outsubtype = GUID_MEDIASUBTYPE_FROM_FOURCC (WAVE_FORMAT_PCM);
 
diff --git a/sys/dshowdecwrapper/gstdshowaudiodec.h b/sys/dshowdecwrapper/gstdshowaudiodec.h
index 7f4e074..7ab2830 100644
--- a/sys/dshowdecwrapper/gstdshowaudiodec.h
+++ b/sys/dshowdecwrapper/gstdshowaudiodec.h
@@ -47,8 +47,6 @@
 #ifndef __GST_DSHOWAUDIODEC_H__
 #define __GST_DSHOWAUDIODEC_H__
 
-#include <atlbase.h>
-
 #include <gst/gst.h>
 #include "gstdshowutil.h"
 #include "gstdshowfakesrc.h"
@@ -88,11 +86,11 @@
   FakeSrc *fakesrc;
   AudioFakeSink *fakesink;
 
-  CComPtr<IBaseFilter> decfilter;
+  IBaseFilterPtr decfilter;
   
   /* graph manager interfaces */  
-  CComPtr<IMediaFilter> mediafilter;
-  CComPtr<IFilterGraph> filtergraph;
+  IMediaFilterPtr mediafilter;
+  IFilterGraphPtr filtergraph;
 
   /* true when dshow graph is setup */
   gboolean setup;
@@ -113,11 +111,11 @@
   GstClockTime timestamp;
 
   gboolean comInitialized;
-  GMutex   *com_init_lock;
-  GMutex   *com_deinit_lock;
-  GCond    *com_initialized;
-  GCond    *com_uninitialize;
-  GCond    *com_uninitialized;
+  GMutex   com_init_lock;
+  GMutex   com_deinit_lock;
+  GCond    com_initialized;
+  GCond    com_uninitialize;
+  GCond    com_uninitialized;
 };
 
 struct _GstDshowAudioDecClass
@@ -149,6 +147,7 @@
     m_MediaType.Set (*pmt);
     return S_OK;
   }
+  int GetBufferSize();
 
 protected:
   HRESULT m_hres;
diff --git a/sys/dshowdecwrapper/gstdshowutil.cpp b/sys/dshowdecwrapper/gstdshowutil.cpp
index b60f803..b2cce8e 100644
--- a/sys/dshowdecwrapper/gstdshowutil.cpp
+++ b/sys/dshowdecwrapper/gstdshowutil.cpp
@@ -19,18 +19,19 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <atlbase.h>
 #include <dmodshow.h>
 #include <dmoreg.h>
 
 #include "gstdshowutil.h"
 #include "gstdshowfakesrc.h"
 
+_COM_SMARTPTR_TYPEDEF(IDMOWrapperFilter, __uuidof(IDMOWrapperFilter));
+
 IPin * 
 gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir)
 {
-  CComPtr<IEnumPins> enumpins;
-  CComPtr<IPin> pin;
+  IEnumPinsPtr enumpins;
+  IPinPtr pin;
   HRESULT hres; 
 
   hres = filter->EnumPins (&enumpins);
@@ -59,9 +60,9 @@
   HRESULT hres;
   GUID inTypes[2];
   GUID outTypes[2];
-  CComPtr<IFilterMapper2> mapper;
-  CComPtr<IEnumMoniker> enum_moniker;
-  CComPtr<IMoniker> moniker;
+  IFilterMapper2Ptr mapper;
+  IEnumMonikerPtr enum_moniker;
+  IMonikerPtr moniker;
   ULONG fetched;
   IBaseFilter *filter;
 
@@ -73,7 +74,7 @@
       /* If the filter is a DMO, we need to do this a bit differently */
       if (preferred_filters->dmo_category) 
       {
-        CComPtr<IDMOWrapperFilter> wrapper;
+        IDMOWrapperFilterPtr wrapper;
 
         hres = CoCreateInstance (CLSID_DMOWrapperFilter, NULL, 
           CLSCTX_INPROC,
diff --git a/sys/dshowdecwrapper/gstdshowutil.h b/sys/dshowdecwrapper/gstdshowutil.h
index 8e40d9a..80cce56 100644
--- a/sys/dshowdecwrapper/gstdshowutil.h
+++ b/sys/dshowdecwrapper/gstdshowutil.h
@@ -24,6 +24,8 @@
 #define _GST_DSHOW_UTIL_H_
 
 #include <windows.h>
+#include <tchar.h>
+#include <comdef.h>
 #include <objbase.h>
 #include <dshow.h>
 #include <Rpc.h>
@@ -32,6 +34,16 @@
 
 #include <glib.h>
 
+_COM_SMARTPTR_TYPEDEF(IBaseFilter, __uuidof(IBaseFilter));
+_COM_SMARTPTR_TYPEDEF(IFilterGraph, __uuidof(IFilterGraph));
+_COM_SMARTPTR_TYPEDEF(IFilterMapper2, __uuidof(IFilterMapper2));
+_COM_SMARTPTR_TYPEDEF(IEnumMediaTypes, __uuidof(IEnumMediaTypes));
+_COM_SMARTPTR_TYPEDEF(IEnumMoniker, __uuidof(IEnumMoniker));
+_COM_SMARTPTR_TYPEDEF(IEnumPins, __uuidof(IEnumPins));
+_COM_SMARTPTR_TYPEDEF(IMediaFilter, __uuidof(IMediaFilter));
+_COM_SMARTPTR_TYPEDEF(IMoniker, __uuidof(IMoniker));
+_COM_SMARTPTR_TYPEDEF(IPin, __uuidof(IPin));
+
 typedef struct {
   const GUID *filter_guid;  /* The filter GUID, or DMO GUID */
   const GUID *dmo_category; /* If non-NULL, the filter is a DMO of this
diff --git a/sys/dshowdecwrapper/gstdshowvideodec.cpp b/sys/dshowdecwrapper/gstdshowvideodec.cpp
index 6253971..eac0f72 100644
--- a/sys/dshowdecwrapper/gstdshowvideodec.cpp
+++ b/sys/dshowdecwrapper/gstdshowvideodec.cpp
@@ -47,17 +47,17 @@
 #include "config.h"
 #endif
 
-#include <atlbase.h>
 #include <dmoreg.h>
 #include <wmcodecdsp.h>
 
 #include "gstdshowvideodec.h"
+#include <gst/video/video.h>
 
 GST_DEBUG_CATEGORY_STATIC (dshowvideodec_debug);
 #define GST_CAT_DEFAULT dshowvideodec_debug
 
-GST_BOILERPLATE (GstDshowVideoDec, gst_dshowvideodec, GstElement,
-    GST_TYPE_ELEMENT);
+#define gst_dshowvideodec_parent_class parent_class
+G_DEFINE_TYPE(GstDshowVideoDec, gst_dshowvideodec, GST_TYPE_ELEMENT)
 
 static void gst_dshowvideodec_finalize (GObject * object);
 static GstStateChangeReturn gst_dshowvideodec_change_state
@@ -65,8 +65,8 @@
 
 /* sink pad overwrites */
 static gboolean gst_dshowvideodec_sink_setcaps (GstPad * pad, GstCaps * caps);
-static gboolean gst_dshowvideodec_sink_event (GstPad * pad, GstEvent * event);
-static GstFlowReturn gst_dshowvideodec_chain (GstPad * pad, GstBuffer * buffer);
+static gboolean gst_dshowvideodec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event);
+static GstFlowReturn gst_dshowvideodec_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer);
 
 /* src pad overwrites */
 static GstCaps *gst_dshowvideodec_src_getcaps (GstPad * pad);
@@ -139,7 +139,6 @@
   {&CLSID_MPEG_VIDEO_DECODER}, {0}
 };
 
-
 /* video codecs array */
 static const VideoCodecEntry video_dec_codecs[] = {
   {"dshowvdec_wmv1", "Windows Media Video 7",
@@ -147,7 +146,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVV1,
    "video/x-wmv, wmvversion = (int) 1",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
   {"dshowvdec_wmv2", "Windows Media Video 8",
@@ -155,7 +154,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVV2,
    "video/x-wmv, wmvversion = (int) 2",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
   {"dshowvdec_wmv3", "Windows Media Video 9",
@@ -163,7 +162,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVV3,
    "video/x-wmv, wmvversion = (int) 3, " "format = (string) WMV3",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
   {"dshowvdec_wmvp", "Windows Media Video 9 Image",
@@ -171,7 +170,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVP,
    "video/x-wmv, wmvversion = (int) 3, " "format = (string) { WMVP, MSS1 }",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
   {"dshowvdec_wmva", "Windows Media Video 9 Advanced",
@@ -179,7 +178,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVA,
    "video/x-wmv, wmvversion = (int) 3, " "format = (string) WMVA",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
    {"dshowvdec_wvc1", "Windows Media VC1 video",
@@ -187,7 +186,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WVC1,
    "video/x-wmv, wmvversion = (int) 3, " "format = (string) WVC1",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_wmv_filters},
 
   {"dshowvdec_cinepak", "Cinepack",
@@ -195,7 +194,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_CVID,
    "video/x-cinepak",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_RGB32,
-   "video/x-raw-rgb, bpp=(int)32, depth=(int)24, "
+   "video/x-raw, format=(string)RGB, bpp=(int)32, depth=(int)24, "
        "endianness=(int)4321, red_mask=(int)65280, "
        "green_mask=(int)16711680, blue_mask=(int)-16777216",
    preferred_cinepack_filters},
@@ -205,7 +204,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_MP4S,
    "video/x-msmpeg, msmpegversion=(int)41",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mp4s_filters},
 
   {"dshowvdec_msmpeg42", "Microsoft ISO MPEG-4 version 2",
@@ -213,7 +212,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_MP42,
    "video/x-msmpeg, msmpegversion=(int)42",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mpeg4_filters},
 
   {"dshowvdec_msmpeg43", "Microsoft ISO MPEG-4 version 3",
@@ -221,7 +220,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_MP43,
    "video/x-msmpeg, msmpegversion=(int)43",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mp43_filters},
 
   {"dshowvdec_msmpeg4", "Microsoft ISO MPEG-4 version 1.1",
@@ -229,7 +228,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_M4S2,
    "video/x-msmpeg, msmpegversion=(int)4",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mp4s_filters},
 
   {"dshowvdec_mpeg1",
@@ -239,7 +238,7 @@
    "video/mpeg, mpegversion= (int) 1, "
        "parsed= (boolean) true, " "systemstream= (boolean) false",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mpeg1_filters},
    
   {"dshowvdec_mpeg4", "MPEG-4 Video",
@@ -247,7 +246,7 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_MPG4,
    "video/mpeg, msmpegversion=(int)4",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2",
+   GST_VIDEO_CAPS_MAKE("YUY2"),
    preferred_mpeg4_filters},
 
   /* The rest of these have no preferred filter; windows doesn't come
@@ -257,38 +256,39 @@
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_XVID,
    "video/x-xvid",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2"},
+   GST_VIDEO_CAPS_MAKE("YUY2")},
 
   {"dshowvdec_divx5", "DIVX 5.0 Video",
    GST_MAKE_FOURCC ('D', 'X', '5', '0'),
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_DX50,
    "video/x-divx, divxversion=(int)5",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2"},
+   GST_VIDEO_CAPS_MAKE("YUY2")},
 
   {"dshowvdec_divx4", "DIVX 4.0 Video",
    GST_MAKE_FOURCC ('D', 'I', 'V', 'X'),
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_DIVX,
    "video/x-divx, divxversion=(int)4",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2"},
+   GST_VIDEO_CAPS_MAKE("YUY2")},
 
   {"dshowvdec_divx3", "DIVX 3.0 Video",
    GST_MAKE_FOURCC ('D', 'I', 'V', '3'),
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_MP43,
    "video/x-divx, divxversion=(int)3",
    GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
-   "video/x-raw-yuv, format=(fourcc)YUY2"}
+   GST_VIDEO_CAPS_MAKE("YUY2")}
 };
 
 HRESULT VideoFakeSink::DoRenderSample(IMediaSample *pMediaSample)
 {
   gboolean in_seg = FALSE;
-  gint64 clip_start = 0, clip_stop = 0;
+  guint64 clip_start = 0, clip_stop = 0;
   GstDshowVideoDecClass *klass =
       (GstDshowVideoDecClass *) G_OBJECT_GET_CLASS (mDec);
   GstBuffer *buf = NULL;
   GstClockTime start, stop;
+  GstMapInfo map;
 
   if(pMediaSample)
   {
@@ -315,10 +315,7 @@
 
     /* buffer is in our segment, allocate a new out buffer and clip its
      * timestamps */
-    mDec->last_ret = gst_pad_alloc_buffer (mDec->srcpad, 
-        GST_BUFFER_OFFSET_NONE,
-        size, 
-        GST_PAD_CAPS (mDec->srcpad), &buf);
+    gst_buffer_pool_acquire_buffer(mDec->buffer_pool, &buf, NULL);
     if (!buf) {
       GST_WARNING_OBJECT (mDec,
           "cannot allocate a new GstBuffer");
@@ -329,6 +326,7 @@
     GST_BUFFER_TIMESTAMP (buf) = clip_start;
     GST_BUFFER_DURATION (buf) = clip_stop - clip_start;
 
+    gst_buffer_map(buf, &map, GST_MAP_WRITE);
     if (strstr (klass->entry->srccaps, "rgb")) {
       /* FOR RGB directshow decoder will return bottom-up BITMAP 
        * There is probably a way to get top-bottom video frames from
@@ -338,12 +336,13 @@
       guint stride = mDec->width * 4;
 
       for (; line < mDec->height; line++) {
-        memcpy (GST_BUFFER_DATA (buf) + (line * stride),
+        memcpy (map.data + (line * stride),
             pBuffer + (size - ((line + 1) * (stride))), stride);
       }
     } else {
-      memcpy (GST_BUFFER_DATA (buf), pBuffer, MIN ((unsigned int)size, GST_BUFFER_SIZE (buf)));
+      memcpy (map.data, pBuffer, MIN ((unsigned int)size, map.size));
     }
+    gst_buffer_unmap(buf, &map);
 
     GST_LOG_OBJECT (mDec,
         "push_buffer (size %d)=> pts %" GST_TIME_FORMAT " stop %" GST_TIME_FORMAT
@@ -377,25 +376,25 @@
   GstPadTemplate *src, *sink;
   GstCaps *srccaps, *sinkcaps;
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  GstElementDetails details;
   const VideoCodecEntry *tmp;
   gpointer qdata;
+  gchar *longname, *description;
 
   qdata = g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass), DSHOW_CODEC_QDATA);
 
   /* element details */
   tmp = videodec_class->entry = (VideoCodecEntry *) qdata;
 
-  details.longname = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+  longname = g_strdup_printf ("DirectShow %s Decoder Wrapper",
       tmp->element_longname);
-  details.klass = g_strdup ("Codec/Decoder/Video");
-  details.description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+  description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
       tmp->element_longname);
-  details.author = "Sebastien Moutte <sebastien@moutte.net>";
-  gst_element_class_set_details (element_class, &details);
-  g_free (details.longname);
-  g_free (details.klass);
-  g_free (details.description);
+
+  gst_element_class_set_metadata(element_class, longname, "Codec/Decoder/Video", description, 
+    "Sebastien Moutte <sebastien@moutte.net>");
+
+  g_free (longname);
+  g_free (description);
 
   sinkcaps = gst_caps_from_string (tmp->sinkcaps);
   gst_caps_set_simple (sinkcaps,
@@ -431,7 +430,7 @@
 {
   HRESULT res;
 
-  g_mutex_lock (vdec->com_init_lock);
+  g_mutex_lock (&vdec->com_init_lock);
 
   /* Initialize COM with a MTA for this process. This thread will
    * be the first one to enter the apartement and the last one to leave
@@ -448,24 +447,23 @@
   vdec->comInitialized = TRUE;
 
   /* Signal other threads waiting on this condition that COM was initialized */
-  g_cond_signal (vdec->com_initialized);
+  g_cond_signal (&vdec->com_initialized);
 
-  g_mutex_unlock (vdec->com_init_lock);
+  g_mutex_unlock (&vdec->com_init_lock);
 
   /* Wait until the unitialize condition is met to leave the COM apartement */
-  g_mutex_lock (vdec->com_deinit_lock);
-  g_cond_wait (vdec->com_uninitialize, vdec->com_deinit_lock);
+  g_mutex_lock (&vdec->com_deinit_lock);
+  g_cond_wait (&vdec->com_uninitialize, &vdec->com_deinit_lock);
 
   CoUninitialize ();
   GST_INFO_OBJECT (vdec, "COM unintialized succesfully");
   vdec->comInitialized = FALSE;
-  g_cond_signal (vdec->com_uninitialized);
-  g_mutex_unlock (vdec->com_deinit_lock);
+  g_cond_signal (&vdec->com_uninitialized);
+  g_mutex_unlock (&vdec->com_deinit_lock);
 }
 
 static void
-gst_dshowvideodec_init (GstDshowVideoDec * vdec,
-    GstDshowVideoDecClass * vdec_class)
+gst_dshowvideodec_init (GstDshowVideoDec * vdec)
 {
   GstElementClass *element_class = GST_ELEMENT_GET_CLASS (vdec);
 
@@ -474,7 +472,6 @@
       gst_pad_new_from_template (gst_element_class_get_pad_template
       (element_class, "sink"), "sink");
 
-  gst_pad_set_setcaps_function (vdec->sinkpad, gst_dshowvideodec_sink_setcaps);
   gst_pad_set_event_function (vdec->sinkpad, gst_dshowvideodec_sink_event);
   gst_pad_set_chain_function (vdec->sinkpad, gst_dshowvideodec_chain);
   gst_element_add_pad (GST_ELEMENT (vdec), vdec->sinkpad);
@@ -499,22 +496,23 @@
   vdec->segment = gst_segment_new ();
 
   vdec->setup = FALSE;
+  vdec->buffer_pool = NULL;
 
-  vdec->com_init_lock = g_mutex_new();
-  vdec->com_deinit_lock = g_mutex_new();
-  vdec->com_initialized = g_cond_new();
-  vdec->com_uninitialize = g_cond_new();
-  vdec->com_uninitialized = g_cond_new();
+  g_mutex_init (&vdec->com_init_lock);
+  g_mutex_init (&vdec->com_deinit_lock);
+  g_cond_init (&vdec->com_initialized);
+  g_cond_init (&vdec->com_uninitialize);
+  g_cond_init (&vdec->com_uninitialized);
 
-  g_mutex_lock (vdec->com_init_lock);
+  g_mutex_lock (&vdec->com_init_lock);
 
   /* create the COM initialization thread */
-  g_thread_create ((GThreadFunc)gst_dshowvideodec_com_thread,
-      vdec, FALSE, NULL);
+  g_thread_new ("COM Init Thread", (GThreadFunc)gst_dshowvideodec_com_thread,
+    vdec);
 
   /* wait until the COM thread signals that COM has been initialized */
-  g_cond_wait (vdec->com_initialized, vdec->com_init_lock);
-  g_mutex_unlock (vdec->com_init_lock);
+  g_cond_wait (&vdec->com_initialized, &vdec->com_init_lock);
+  g_mutex_unlock (&vdec->com_init_lock);
 }
 
 static void
@@ -527,19 +525,24 @@
     vdec->segment = NULL;
   }
 
-  /* signal the COM thread that it sould uninitialize COM */
-  if (vdec->comInitialized) {
-    g_mutex_lock (vdec->com_deinit_lock);
-    g_cond_signal (vdec->com_uninitialize);
-    g_cond_wait (vdec->com_uninitialized, vdec->com_deinit_lock);
-    g_mutex_unlock (vdec->com_deinit_lock);
+  if(vdec->buffer_pool) {
+    gst_object_unref(vdec->buffer_pool);
+    vdec->buffer_pool = NULL;
   }
 
-  g_mutex_free (vdec->com_init_lock);
-  g_mutex_free (vdec->com_deinit_lock);
-  g_cond_free (vdec->com_initialized);
-  g_cond_free (vdec->com_uninitialize);
-  g_cond_free (vdec->com_uninitialized);
+  /* signal the COM thread that it sould uninitialize COM */
+  if (vdec->comInitialized) {
+    g_mutex_lock (&vdec->com_deinit_lock);
+    g_cond_signal (&vdec->com_uninitialize);
+    g_cond_wait (&vdec->com_uninitialized, &vdec->com_deinit_lock);
+    g_mutex_unlock (&vdec->com_deinit_lock);
+  }
+
+  g_mutex_clear (&vdec->com_init_lock);
+  g_mutex_clear (&vdec->com_deinit_lock);
+  g_cond_clear (&vdec->com_initialized);
+  g_cond_clear (&vdec->com_uninitialize);
+  g_cond_clear (&vdec->com_uninitialized);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -583,16 +586,22 @@
   GstDshowVideoDecClass *klass =
       (GstDshowVideoDecClass *) G_OBJECT_GET_CLASS (vdec);
   GstBuffer *extradata = NULL;
+  gsize extra_size;
   const GValue *v = NULL;
   guint size = 0;
-  GstCaps *caps_out;
+  GstCaps *caps_out = NULL;
   AM_MEDIA_TYPE output_mediatype, input_mediatype;
   VIDEOINFOHEADER *input_vheader = NULL, *output_vheader = NULL;
-  CComPtr<IPin> output_pin;
-  CComPtr<IPin> input_pin;
+  IPinPtr output_pin;
+  IPinPtr input_pin;
   IBaseFilter *srcfilter = NULL;
   IBaseFilter *sinkfilter = NULL;
   const GValue *fps, *par;
+  GstQuery *query = NULL;
+  GstBufferPool *pool = NULL;
+  GstStructure *pool_config = NULL;
+  guint pool_size, pool_min, pool_max;
+  GstVideoInfo video_info;
 
   /* read data */
   if (!gst_structure_get_int (s, "width", &vdec->width) ||
@@ -622,8 +631,10 @@
     vdec->par_n = vdec->par_d = 1;
   }
 
-  if ((v = gst_structure_get_value (s, "codec_data")))
+  if ((v = gst_structure_get_value (s, "codec_data"))) {
     extradata = gst_value_get_buffer (v);
+    extra_size = gst_buffer_get_size(extradata);
+  }
 
   /* define the input type format */
   memset (&input_mediatype, 0, sizeof (AM_MEDIA_TYPE));
@@ -634,33 +645,31 @@
 
   if (strstr (klass->entry->sinkcaps, "video/mpeg, mpegversion= (int) 1")) {
     size =
-        sizeof (MPEG1VIDEOINFO) + (extradata ? GST_BUFFER_SIZE (extradata) -
-        1 : 0);
+        sizeof (MPEG1VIDEOINFO) + (extradata ? extra_size - 1 : 0);
     input_vheader = (VIDEOINFOHEADER *)g_malloc0 (size);
 
     input_vheader->bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
     if (extradata) {
       MPEG1VIDEOINFO *mpeg_info = (MPEG1VIDEOINFO *) input_vheader;
 
-      memcpy (mpeg_info->bSequenceHeader,
-          GST_BUFFER_DATA (extradata), GST_BUFFER_SIZE (extradata));
-      mpeg_info->cbSequenceHeader = GST_BUFFER_SIZE (extradata);
+      gst_buffer_extract(extradata, 0, mpeg_info->bSequenceHeader, extra_size);
+      mpeg_info->cbSequenceHeader = extra_size;
     }
     input_mediatype.formattype = FORMAT_MPEGVideo;
   } else {
     size =
-        sizeof (VIDEOINFOHEADER) +
-        (extradata ? GST_BUFFER_SIZE (extradata) : 0);
+        sizeof (VIDEOINFOHEADER) + (extradata ? extra_size : 0);
     input_vheader = (VIDEOINFOHEADER *)g_malloc0 (size);
-
     input_vheader->bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
+
     if (extradata) {            /* Codec data is appended after our header */
-      memcpy (((guchar *) input_vheader) + sizeof (VIDEOINFOHEADER),
-          GST_BUFFER_DATA (extradata), GST_BUFFER_SIZE (extradata));
-      input_vheader->bmiHeader.biSize += GST_BUFFER_SIZE (extradata);
+      gst_buffer_extract(extradata, 0,
+        ((guchar *) input_vheader) + sizeof (VIDEOINFOHEADER), extra_size);
+      input_vheader->bmiHeader.biSize += extra_size;
     }
     input_mediatype.formattype = FORMAT_VideoInfo;
   }
+
   input_vheader->rcSource.top = input_vheader->rcSource.left = 0;
   input_vheader->rcSource.right = vdec->width;
   input_vheader->rcSource.bottom = vdec->height;
@@ -777,12 +786,52 @@
       "pixel-aspect-ratio", GST_TYPE_FRACTION, vdec->par_n, vdec->par_d, NULL);
 
   if (!gst_pad_set_caps (vdec->srcpad, caps_out)) {
-    gst_caps_unref (caps_out);
     GST_ELEMENT_ERROR (vdec, CORE, NEGOTIATION,
         ("Failed to negotiate output"), (NULL));
     goto end;
   }
-  gst_caps_unref (caps_out);
+
+  /* request or create a buffer pool */
+  if (vdec->buffer_pool) {
+    gst_object_unref (vdec->buffer_pool);
+  }
+
+  query = gst_query_new_allocation(caps_out, TRUE);
+  gst_pad_peer_query(vdec->srcpad, query);
+
+  if (gst_query_get_n_allocation_pools (query) > 0) {
+    gst_query_parse_nth_allocation_pool (query, 0, &pool, &pool_size, &pool_min,
+      &pool_max);
+  }
+  else {
+    pool = NULL;
+    pool_size = output_mediatype.lSampleSize;
+    pool_min = 1;
+    pool_max = 0;
+  }
+
+  if (pool == NULL) {
+    pool = gst_video_buffer_pool_new ();
+  }
+
+  if (!pool) {
+    GST_ELEMENT_ERROR (vdec, CORE, NEGOTIATION,
+        ("Could not create buffer bool"), (NULL));
+    goto end;
+  }
+
+  pool_config = gst_buffer_pool_get_config (pool);
+  gst_buffer_pool_config_set_params (pool_config, caps_out, pool_size,
+    pool_min, pool_max);
+  gst_buffer_pool_set_config (pool, pool_config);
+
+  if (!gst_buffer_pool_set_active (pool, TRUE)) {
+    GST_ELEMENT_ERROR (vdec, CORE, NEGOTIATION,
+      ("Failed set buffer pool active"), (NULL));
+    goto end;
+  }
+
+  vdec->buffer_pool = pool;
 
   hres = vdec->mediafilter->Run (-1);
   if (hres != S_OK) {
@@ -793,6 +842,8 @@
 
   ret = TRUE;
 end:
+  if (caps_out)
+    gst_caps_unref (caps_out);
   gst_object_unref (vdec);
   if (input_vheader)
     g_free (input_vheader);
@@ -800,50 +851,47 @@
     srcfilter->Release();
   if (sinkfilter)
     sinkfilter->Release();
+  if (query)
+    gst_query_unref(query);
   return ret;
 }
 
 static gboolean
-gst_dshowvideodec_sink_event (GstPad * pad, GstEvent * event)
+gst_dshowvideodec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
   gboolean ret = TRUE;
   GstDshowVideoDec *vdec = (GstDshowVideoDec *) gst_pad_get_parent (pad);
 
   switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:
+      GstCaps *caps;
+      gst_event_parse_caps(event, &caps);
+      ret = gst_dshowvideodec_sink_setcaps(pad, caps);
+      break;
+
     case GST_EVENT_FLUSH_STOP:
       gst_dshowvideodec_flush (vdec);
-      ret = gst_pad_event_default (pad, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
-    case GST_EVENT_NEWSEGMENT:
+    case GST_EVENT_SEGMENT:
     {
-      GstFormat format;
-      gdouble rate;
-      gint64 start, stop, time;
-      gboolean update;
+      const GstSegment *segment;
 
-      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
-          &stop, &time);
+      gst_event_parse_segment (event, &segment);
 
       /* save the new segment in our local current segment */
-      gst_segment_set_newsegment (vdec->segment, update, rate, format, start,
-          stop, time);
+      gst_segment_copy_into(segment, vdec->segment);
 
       GST_CAT_DEBUG_OBJECT (dshowvideodec_debug, vdec,
           "new segment received => start=%" GST_TIME_FORMAT " stop=%"
           GST_TIME_FORMAT, GST_TIME_ARGS (vdec->segment->start),
           GST_TIME_ARGS (vdec->segment->stop));
 
-      if (update) {
-        GST_CAT_DEBUG_OBJECT (dshowvideodec_debug, vdec,
-            "closing current segment flushing..");
-        gst_dshowvideodec_flush (vdec);
-      }
-
-      ret = gst_pad_event_default (pad, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
     }
     default:
-      ret = gst_pad_event_default (pad, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
   }
 
@@ -853,11 +901,12 @@
 }
 
 static GstFlowReturn
-gst_dshowvideodec_chain (GstPad * pad, GstBuffer * buffer)
+gst_dshowvideodec_chain (GstPad * pad, GstObject *parent, GstBuffer * buffer)
 {
   GstDshowVideoDec *vdec = (GstDshowVideoDec *) gst_pad_get_parent (pad);
   bool discont = FALSE;
   GstClockTime stop;
+  GstMapInfo map;
 
   if (!vdec->setup) {
     /* we are not setup */
@@ -866,7 +915,7 @@
     goto beach;
   }
 
-  if (GST_FLOW_IS_FATAL (vdec->last_ret)) {
+  if (vdec->last_ret != GST_FLOW_OK) {
     GST_DEBUG_OBJECT (vdec, "last decoding iteration generated a fatal error "
         "%s", gst_flow_get_name (vdec->last_ret));
     goto beach;
@@ -882,7 +931,7 @@
 
   GST_CAT_LOG_OBJECT (dshowvideodec_debug, vdec,
       "chain (size %d)=> pts %" GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,
-      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
+      gst_buffer_get_size (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
       GST_TIME_ARGS (stop));
 
   /* if the incoming buffer has discont flag set => flush decoder data */
@@ -894,10 +943,12 @@
     discont = TRUE;
   }
 
+  gst_buffer_map(buffer, &map, GST_MAP_READ);
   /* push the buffer to the directshow decoder */
   vdec->fakesrc->GetOutputPin()->PushBuffer(
-      GST_BUFFER_DATA (buffer), GST_BUFFER_TIMESTAMP (buffer), stop,
-      GST_BUFFER_SIZE (buffer), discont);
+      map.data, GST_BUFFER_TIMESTAMP (buffer), stop,
+      map.size, discont);
+  gst_buffer_unmap(buffer, &map);
 
 beach:
   gst_buffer_unref (buffer);
@@ -916,8 +967,8 @@
     vdec->srccaps = gst_caps_new_empty ();
 
   if (vdec->decfilter) {
-    CComPtr<IPin> output_pin;
-    CComPtr<IEnumMediaTypes> enum_mediatypes;
+    IPinPtr output_pin;
+    IEnumMediaTypesPtr enum_mediatypes;
     HRESULT hres;
     ULONG fetched;
 
@@ -1006,8 +1057,8 @@
 gst_dshowvideodec_get_filter_output_format (GstDshowVideoDec * vdec,
     const GUID subtype, VIDEOINFOHEADER ** format, guint * size)
 {
-  CComPtr<IPin> output_pin;
-  CComPtr<IEnumMediaTypes> enum_mediatypes;
+  IPinPtr output_pin;
+  IEnumMediaTypesPtr enum_mediatypes;
   HRESULT hres;
   ULONG fetched;
   BOOL ret = FALSE;
@@ -1252,7 +1303,7 @@
 
   for (i = 0; i < sizeof (video_dec_codecs) / sizeof (VideoCodecEntry); i++) {
     GType type;
-    CComPtr<IBaseFilter> filter;
+    IBaseFilterPtr filter;
     guint rank = GST_RANK_MARGINAL;
 
     filter = gst_dshow_find_filter (
diff --git a/sys/dshowdecwrapper/gstdshowvideodec.h b/sys/dshowdecwrapper/gstdshowvideodec.h
index e1fb28c..885861f 100644
--- a/sys/dshowdecwrapper/gstdshowvideodec.h
+++ b/sys/dshowdecwrapper/gstdshowvideodec.h
@@ -113,11 +113,13 @@
   gboolean setup;
 
   gboolean comInitialized;
-  GMutex   *com_init_lock;
-  GMutex   *com_deinit_lock;
-  GCond    *com_initialized;
-  GCond    *com_uninitialize;
-  GCond    *com_uninitialized;
+  GMutex   com_init_lock;
+  GMutex   com_deinit_lock;
+  GCond    com_initialized;
+  GCond    com_uninitialize;
+  GCond    com_uninitialized;
+
+  GstBufferPool *buffer_pool;
 };
 
 struct _GstDshowVideoDecClass
diff --git a/sys/dshowsrcwrapper/Makefile.in b/sys/dshowsrcwrapper/Makefile.in
index 15ba97e..cababd9 100644
--- a/sys/dshowsrcwrapper/Makefile.in
+++ b/sys/dshowsrcwrapper/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 # This plugin isn't buildable with autotools at this point in time, so just
 # ensure everything's listed in EXTRA_DIST
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,7 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/dshowsrcwrapper
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -90,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +113,6 @@
 	$(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 \
@@ -120,6 +129,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -144,6 +154,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -161,8 +172,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -187,8 +200,6 @@
 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@
@@ -201,7 +212,6 @@
 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@
@@ -209,6 +219,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -235,11 +247,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -258,8 +273,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -318,10 +331,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -338,7 +355,6 @@
 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@
@@ -347,7 +363,6 @@
 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@
@@ -360,7 +375,6 @@
 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@
@@ -374,6 +388,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -385,6 +400,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -423,6 +440,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -458,10 +476,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -487,6 +509,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -494,7 +519,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -523,6 +555,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -533,6 +566,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -563,17 +597,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -590,6 +623,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -628,6 +662,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -667,7 +702,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/dshowsrcwrapper/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/dshowsrcwrapper/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -842,6 +876,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/dshowsrcwrapper/gstdshow.cpp b/sys/dshowsrcwrapper/gstdshow.cpp
index 4f59105..29266ba 100644
--- a/sys/dshowsrcwrapper/gstdshow.cpp
+++ b/sys/dshowsrcwrapper/gstdshow.cpp
@@ -19,6 +19,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+#include <gst/video/video-format.h>
+
 #include "gstdshow.h"
 #include "gstdshowfakesink.h"
 
@@ -411,6 +413,22 @@
   return GST_VIDEO_FORMAT_UNKNOWN;
 }
 
+gboolean
+gst_dshow_is_pin_connected (IPin * pin)
+{
+  IPin *tmp_pin = NULL;
+  gboolean res;
+  HRESULT hres;
+
+  g_assert (pin);
+  hres = pin->ConnectedTo (&tmp_pin);
+  res = (hres != VFW_E_NOT_CONNECTED);
+  if (tmp_pin)
+    tmp_pin->Release ();
+
+  return res;
+}
+
 GstCaps *
 gst_dshow_new_video_caps (GstVideoFormat video_format, const gchar * name,
     GstCapturePinMediaType * pin_mediatype)
@@ -424,16 +442,16 @@
   /* raw video format */
   switch (video_format) {
     case GST_VIDEO_FORMAT_BGR:
-      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_BGR);
+      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("BGR"));
       break;
     case GST_VIDEO_FORMAT_I420:
-      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("I420"));
+      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("I420"));
 	  break;
     case GST_VIDEO_FORMAT_YUY2:
-      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("YUY2"));
+      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("YUY2"));
       break;
     case GST_VIDEO_FORMAT_UYVY:
-      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("UYVY"));
+      video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("UYVY"));
       break;
     default:
       break;
@@ -444,12 +462,16 @@
     if (g_ascii_strncasecmp (name, "video/x-dv, systemstream=FALSE", 31) == 0) {
       video_caps = gst_caps_new_simple ("video/x-dv",
           "systemstream", G_TYPE_BOOLEAN, FALSE,
-          "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('d', 'v', 's', 'd'),
+          "format", G_TYPE_STRING, "dvsd",
           NULL);
     } else if (g_ascii_strncasecmp (name, "video/x-dv, systemstream=TRUE", 31) == 0) {
       video_caps = gst_caps_new_simple ("video/x-dv",
           "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
       return video_caps;
+    } else if (g_ascii_strncasecmp (name, "image/jpeg", 10) == 0) {
+      video_caps = gst_caps_new_simple ("image/jpeg", NULL);
+    } else if (g_ascii_strncasecmp (name, "video/x-h264", 12) == 0) {
+      video_caps = gst_caps_new_simple ("video/x-h264", NULL);
     }
   }
 
diff --git a/sys/dshowsrcwrapper/gstdshow.h b/sys/dshowsrcwrapper/gstdshow.h
index 92220b6..4c75f35 100644
--- a/sys/dshowsrcwrapper/gstdshow.h
+++ b/sys/dshowsrcwrapper/gstdshow.h
@@ -92,6 +92,9 @@
 /* translate GUID format to gsteamer video format */
 GstVideoFormat gst_dshow_guid_to_gst_video_format (AM_MEDIA_TYPE *mediatype);
 
+/* check if IPin is connected */
+gboolean gst_dshow_is_pin_connected (IPin *pin);
+
 /* transform a dshow video caps to a gstreamer video caps */
 GstCaps *gst_dshow_new_video_caps (GstVideoFormat video_format,
     const gchar * name, GstCapturePinMediaType * pin_mediatype);
diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp
index 1a816aa..c4d33e5 100644
--- a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp
+++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp
@@ -31,23 +31,18 @@
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-int, "
-        "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, "
-        "signed = (boolean) { TRUE, FALSE }, "
-        "width = (int) 16, "
-        "depth = (int) 16, "
-        "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; "
-        "audio/x-raw-int, "
-        "signed = (boolean) { TRUE, FALSE }, "
-        "width = (int) 8, "
-        "depth = (int) 8, "
-        "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]")
+    GST_STATIC_CAPS ("audio/x-raw, "
+        "format = (string){ "
+	GST_AUDIO_NE (S16) ", "
+	GST_AUDIO_NE (U16) ", "
+	GST_AUDIO_NE (S8)  ", "
+	GST_AUDIO_NE (U8)
+        " }, "
+        "rate = " GST_AUDIO_RATE_RANGE ", "
+        "channels = (int) [ 1, 2 ]")
     );
 
-static void gst_dshowaudiosrc_init_interfaces (GType type);
-
-GST_BOILERPLATE_FULL (GstDshowAudioSrc, gst_dshowaudiosrc, GstAudioSrc,
-    GST_TYPE_AUDIO_SRC, gst_dshowaudiosrc_init_interfaces);
+G_DEFINE_TYPE(GstDshowAudioSrc, gst_dshowaudiosrc, GST_TYPE_AUDIO_SRC);
 
 enum
 {
@@ -56,32 +51,23 @@
   PROP_DEVICE_NAME
 };
 
-static void gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface *
-    iface);
-static const GList *gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe *
-    probe);
-static GValueArray *gst_dshowaudiosrc_probe_get_values (GstPropertyProbe *
-    probe, guint prop_id, const GParamSpec * pspec);
-static GValueArray *gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc *
-    src);
-
 
 static void gst_dshowaudiosrc_dispose (GObject * gobject);
 static void gst_dshowaudiosrc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 static void gst_dshowaudiosrc_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static GstCaps *gst_dshowaudiosrc_get_caps (GstBaseSrc * src);
+static GstCaps *gst_dshowaudiosrc_get_caps (GstBaseSrc * src, GstCaps * filter);
 static GstStateChangeReturn gst_dshowaudiosrc_change_state (GstElement *
     element, GstStateChange transition);
 
 static gboolean gst_dshowaudiosrc_open (GstAudioSrc * asrc);
 static gboolean gst_dshowaudiosrc_prepare (GstAudioSrc * asrc,
-    GstRingBufferSpec * spec);
+    GstAudioRingBufferSpec * spec);
 static gboolean gst_dshowaudiosrc_unprepare (GstAudioSrc * asrc);
 static gboolean gst_dshowaudiosrc_close (GstAudioSrc * asrc);
 static guint gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data,
-    guint length);
+    guint length, GstClockTime *timestamp);
 static guint gst_dshowaudiosrc_delay (GstAudioSrc * asrc);
 static void gst_dshowaudiosrc_reset (GstAudioSrc * asrc);
 
@@ -92,42 +78,6 @@
     gpointer src_object, GstClockTime duration);
 
 static void
-gst_dshowaudiosrc_init_interfaces (GType type)
-{
-  static const GInterfaceInfo dshowaudiosrc_info = {
-    (GInterfaceInitFunc) gst_dshowaudiosrc_probe_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type,
-      GST_TYPE_PROPERTY_PROBE, &dshowaudiosrc_info);
-}
-
-static void
-gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface * iface)
-{
-  iface->get_properties = gst_dshowaudiosrc_probe_get_properties;
-/*  iface->needs_probe    = gst_dshowaudiosrc_probe_needs_probe;
-  iface->probe_property = gst_dshowaudiosrc_probe_probe_property;*/
-  iface->get_values = gst_dshowaudiosrc_probe_get_values;
-}
-
-static void
-gst_dshowaudiosrc_base_init (gpointer klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_template));
-
-  gst_element_class_set_static_metadata (element_class,
-      "Directshow audio capture source", "Source/Audio",
-      "Receive data from a directshow audio capture graph",
-      "Sebastien Moutte <sebastien@moutte.net>");
-}
-
-static void
 gst_dshowaudiosrc_class_init (GstDshowAudioSrcClass * klass)
 {
   GObjectClass *gobject_class;
@@ -146,11 +96,11 @@
   gobject_class->get_property =
       GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_property);
 
+  gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_caps);
+
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_change_state);
 
-  gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_caps);
-
   gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_open);
   gstaudiosrc_class->prepare = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_prepare);
   gstaudiosrc_class->unprepare =
@@ -172,12 +122,20 @@
           "Human-readable name of the sound device", NULL,
           static_cast < GParamFlags > (G_PARAM_READWRITE)));
 
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "Directshow audio capture source", "Source/Audio",
+      "Receive data from a directshow audio capture graph",
+      "Sebastien Moutte <sebastien@moutte.net>");
+
   GST_DEBUG_CATEGORY_INIT (dshowaudiosrc_debug, "dshowaudiosrc", 0,
       "Directshow audio source");
 }
 
 static void
-gst_dshowaudiosrc_init (GstDshowAudioSrc * src, GstDshowAudioSrcClass * klass)
+gst_dshowaudiosrc_init (GstDshowAudioSrc * src)
 {
   src->device = NULL;
   src->device_name = NULL;
@@ -189,7 +147,7 @@
   src->pins_mediatypes = NULL;
 
   src->gbarray = g_byte_array_new ();
-  src->gbarray_lock = g_mutex_new ();
+  g_mutex_init(&src->gbarray_lock);
 
   src->is_running = FALSE;
 
@@ -226,10 +184,7 @@
     src->gbarray = NULL;
   }
 
-  if (src->gbarray_lock) {
-    g_mutex_free (src->gbarray_lock);
-    src->gbarray_lock = NULL;
-  }
+  g_mutex_clear(&src->gbarray_lock);
 
   /* clean dshow */
   if (src->audio_cap_filter)
@@ -237,113 +192,10 @@
 
   CoUninitialize ();
 
-  G_OBJECT_CLASS (parent_class)->dispose (gobject);
+  G_OBJECT_CLASS (gst_dshowaudiosrc_parent_class)->dispose (gobject);
 }
 
 
-static const GList *
-gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe * probe)
-{
-  GObjectClass *klass = G_OBJECT_GET_CLASS (probe);
-  static GList *props = NULL;
-
-  if (!props) {
-    GParamSpec *pspec;
-
-    pspec = g_object_class_find_property (klass, "device-name");
-    props = g_list_append (props, pspec);
-  }
-
-  return props;
-}
-
-static GValueArray *
-gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc * src)
-{
-  GValueArray *array = g_value_array_new (0);
-  ICreateDevEnum *devices_enum = NULL;
-  IEnumMoniker *moniker_enum = NULL;
-  IMoniker *moniker = NULL;
-  HRESULT hres = S_FALSE;
-  ULONG fetched;
-
-  hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER,
-      IID_ICreateDevEnum, (LPVOID *) & devices_enum);
-  if (hres != S_OK) {
-    GST_ERROR
-        ("Can't create an instance of the system device enumerator (error=0x%x)",
-        hres);
-    array = NULL;
-    goto clean;
-  }
-
-  hres = devices_enum->CreateClassEnumerator (CLSID_AudioInputDeviceCategory,
-      &moniker_enum, 0);
-  if (hres != S_OK || !moniker_enum) {
-    GST_ERROR ("Can't get enumeration of audio devices (error=0x%x)", hres);
-    array = NULL;
-    goto clean;
-  }
-
-  moniker_enum->Reset ();
-
-  while (hres = moniker_enum->Next (1, &moniker, &fetched), hres == S_OK) {
-    IPropertyBag *property_bag = NULL;
-
-    hres = moniker->BindToStorage (NULL, NULL, IID_IPropertyBag,
-        (LPVOID *) & property_bag);
-    if (SUCCEEDED (hres) && property_bag) {
-      VARIANT varFriendlyName;
-
-      VariantInit (&varFriendlyName);
-      hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL);
-      if (hres == S_OK && varFriendlyName.bstrVal) {
-        gchar *friendly_name =
-            g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal,
-            wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL);
-
-        GValue value = { 0 };
-        g_value_init (&value, G_TYPE_STRING);
-        g_value_set_string (&value, friendly_name);
-        g_value_array_append (array, &value);
-        g_value_unset (&value);
-        g_free (friendly_name);
-        SysFreeString (varFriendlyName.bstrVal);
-      }
-      property_bag->Release ();
-    }
-    moniker->Release ();
-  }
-
-clean:
-  if (moniker_enum)
-    moniker_enum->Release ();
-
-  if (devices_enum)
-    devices_enum->Release ();
-
-  return array;
-}
-
-static GValueArray *
-gst_dshowaudiosrc_probe_get_values (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec)
-{
-  GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (probe);
-  GValueArray *array = NULL;
-
-  switch (prop_id) {
-    case PROP_DEVICE_NAME:
-      array = gst_dshowaudiosrc_get_device_name_values (src);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec);
-      break;
-  }
-
-  return array;
-}
-
 static void
 gst_dshowaudiosrc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
@@ -387,7 +239,7 @@
 }
 
 static GstCaps *
-gst_dshowaudiosrc_get_caps (GstBaseSrc * basesrc)
+gst_dshowaudiosrc_get_caps (GstBaseSrc * basesrc, GstCaps * filter)
 {
   HRESULT hres = S_OK;
   IBindCtx *lpbc = NULL;
@@ -474,7 +326,15 @@
   }
 
   if (src->caps) {
-    return gst_caps_ref (src->caps);
+    GstCaps *caps;
+
+    if (filter) {
+      caps = gst_caps_intersect_full (filter, src->caps, GST_CAPS_INTERSECT_FIRST);
+    } else {
+      caps = gst_caps_ref (src->caps);
+    }
+
+    return caps;
   }
 
   return NULL;
@@ -492,14 +352,14 @@
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      if (src->media_filter)
+      if (src->media_filter) {
+        src->is_running = TRUE;
         hres = src->media_filter->Run (0);
+      }
       if (hres != S_OK) {
         GST_ERROR ("Can't RUN the directshow capture graph (error=0x%x)", hres);
         src->is_running = FALSE;
         return GST_STATE_CHANGE_FAILURE;
-      } else {
-        src->is_running = TRUE;
       }
       break;
     case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
@@ -521,7 +381,7 @@
       break;
   }
 
-  return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  return GST_ELEMENT_CLASS(gst_dshowaudiosrc_parent_class)->change_state(element, transition);
 }
 
 static gboolean
@@ -587,11 +447,32 @@
 }
 
 static gboolean
-gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec)
+gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
 {
   HRESULT hres;
   IPin *input_pin = NULL;
   GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc);
+  GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (asrc));
+
+  if (current_caps) {
+    if (gst_caps_is_equal (spec->caps, current_caps)) {
+      gst_caps_unref (current_caps);
+      return TRUE;
+    }
+    gst_caps_unref (current_caps);
+  }
+  /* In 1.0, prepare() seems to be called in the PLAYING state. Most
+     of the time you can't do much on a running graph. */
+
+  gboolean was_running = src->is_running;
+  if (was_running) {
+    HRESULT hres = src->media_filter->Stop ();
+    if (hres != S_OK) {
+      GST_ERROR("Can't STOP the directshow capture graph for preparing (error=0x%x)", hres);
+      return FALSE;
+    }
+    src->is_running = FALSE;
+  }
 
   /* search the negociated caps in our caps list to get its index and the corresponding mediatype */
   if (gst_caps_is_subset (spec->caps, src->caps)) {
@@ -626,7 +507,7 @@
           goto error;
         }
 
-        spec->segsize = (gint) (spec->bytes_per_sample * spec->rate * spec->latency_time /
+        spec->segsize = (gint) (spec->info.bpf * spec->info.rate * spec->latency_time /
             GST_MSECOND);
         spec->segtotal = (gint) ((gfloat) spec->buffer_time /
             (gfloat) spec->latency_time + 0.5);
@@ -634,10 +515,22 @@
             spec->segsize))
         {
           GST_WARNING ("Could not change capture latency");
-          spec->segsize = spec->rate * spec->channels;
+          spec->segsize = spec->info.rate * spec->info.channels;
           spec->segtotal = 2;
         };
         GST_INFO ("Configuring with segsize:%d segtotal:%d", spec->segsize, spec->segtotal);
+
+        if (gst_dshow_is_pin_connected (pin_mediatype->capture_pin)) {
+          GST_DEBUG_OBJECT (src,
+              "capture_pin already connected, disconnecting");
+          src->filter_graph->Disconnect (pin_mediatype->capture_pin);
+        }
+
+        if (gst_dshow_is_pin_connected (input_pin)) {
+          GST_DEBUG_OBJECT (src, "input_pin already connected, disconnecting");
+          src->filter_graph->Disconnect (input_pin);
+        }
+
         hres = src->filter_graph->ConnectDirect (pin_mediatype->capture_pin,
             input_pin, NULL);
         input_pin->Release ();
@@ -653,9 +546,20 @@
     }
   }
 
+  if (was_running) {
+    HRESULT hres = src->media_filter->Run (0);
+    if (hres != S_OK) {
+      GST_ERROR("Can't RUN the directshow capture graph after prepare (error=0x%x)", hres);
+      return FALSE;
+    }
+
+    src->is_running = TRUE;
+  }
+
   return TRUE;
 
 error:
+  /* Don't restart the graph, we're out anyway. */
   return FALSE;
 }
 
@@ -711,7 +615,7 @@
 }
 
 static guint
-gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, guint length)
+gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, guint length, GstClockTime *timestamp)
 {
   GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc);
   guint ret = 0;
@@ -722,15 +626,15 @@
   if (src->gbarray) {
   test:
     if (src->gbarray->len >= length) {
-      g_mutex_lock (src->gbarray_lock);
+      g_mutex_lock (&src->gbarray_lock);
       memcpy (data, src->gbarray->data + (src->gbarray->len - length), length);
       g_byte_array_remove_range (src->gbarray, src->gbarray->len - length,
           length);
       ret = length;
-      g_mutex_unlock (src->gbarray_lock);
+      g_mutex_unlock (&src->gbarray_lock);
     } else {
       if (src->is_running) {
-        Sleep (GST_BASE_AUDIO_SRC(src)->ringbuffer->spec.latency_time /
+        Sleep (GST_AUDIO_BASE_SRC(src)->ringbuffer->spec.latency_time /
             GST_MSECOND / 10);
         goto test;
       }
@@ -747,11 +651,11 @@
   guint ret = 0;
 
   if (src->gbarray) {
-    g_mutex_lock (src->gbarray_lock);
+    g_mutex_lock (&src->gbarray_lock);
     if (src->gbarray->len) {
       ret = src->gbarray->len / 4;
     }
-    g_mutex_unlock (src->gbarray_lock);
+    g_mutex_unlock (&src->gbarray_lock);
   }
 
   return ret;
@@ -762,11 +666,11 @@
 {
   GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc);
 
-  g_mutex_lock (src->gbarray_lock);
+  g_mutex_lock (&src->gbarray_lock);
   GST_DEBUG ("byte array size= %d", src->gbarray->len);
   if (src->gbarray->len > 0)
     g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len);
-  g_mutex_unlock (src->gbarray_lock);
+  g_mutex_unlock (&src->gbarray_lock);
 }
 
 static GstCaps *
@@ -804,15 +708,29 @@
 
       if (gst_dshow_check_mediatype (pin_mediatype->mediatype, MEDIASUBTYPE_PCM,
               FORMAT_WaveFormatEx)) {
+	GstAudioFormat format = GST_AUDIO_FORMAT_UNKNOWN;
         WAVEFORMATEX *wavformat =
             (WAVEFORMATEX *) pin_mediatype->mediatype->pbFormat;
-        mediacaps =
-            gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT,
-            wavformat->wBitsPerSample, "depth", G_TYPE_INT,
-            wavformat->wBitsPerSample, "endianness", G_TYPE_INT, G_BYTE_ORDER,
-            "signed", G_TYPE_BOOLEAN, TRUE, "channels", G_TYPE_INT,
-            wavformat->nChannels, "rate", G_TYPE_INT, wavformat->nSamplesPerSec,
-            NULL);
+
+	switch (wavformat->wFormatTag) {
+            case WAVE_FORMAT_PCM:
+	      format = gst_audio_format_build_integer (TRUE, G_BYTE_ORDER, wavformat->wBitsPerSample, wavformat->wBitsPerSample);
+	      break;
+            default:
+	      break;
+	}
+
+	if (format != GST_AUDIO_FORMAT_UNKNOWN) {
+	  GstAudioInfo info;
+
+	  gst_audio_info_init(&info);
+	  gst_audio_info_set_format(&info,
+				    format,
+				    wavformat->nSamplesPerSec,
+				    wavformat->nChannels,
+				    NULL);
+	  mediacaps = gst_audio_info_to_caps(&info);
+	}
 
         if (mediacaps) {
           src->pins_mediatypes =
@@ -847,9 +765,9 @@
     return FALSE;
   }
 
-  g_mutex_lock (src->gbarray_lock);
+  g_mutex_lock (&src->gbarray_lock);
   g_byte_array_prepend (src->gbarray, buffer, size);
-  g_mutex_unlock (src->gbarray_lock);
+  g_mutex_unlock (&src->gbarray_lock);
 
   return TRUE;
 }
diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.h b/sys/dshowsrcwrapper/gstdshowaudiosrc.h
index 9052663..dcd4342 100644
--- a/sys/dshowsrcwrapper/gstdshowaudiosrc.h
+++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.h
@@ -25,7 +25,6 @@
 
 #include <gst/gst.h>
 #include <gst/audio/gstaudiosrc.h>
-#include <gst/interfaces/propertyprobe.h>
 
 #include "gstdshow.h"
 #include "gstdshowfakesink.h"
@@ -67,7 +66,7 @@
 
   /* bytes array */
   GByteArray *gbarray;
-  GMutex *gbarray_lock;
+  GMutex gbarray_lock;
 
   gboolean is_running;
 };
diff --git a/sys/dshowsrcwrapper/gstdshowfakesink.cpp b/sys/dshowsrcwrapper/gstdshowfakesink.cpp
index 2ef298c..c524c7c 100644
--- a/sys/dshowsrcwrapper/gstdshowfakesink.cpp
+++ b/sys/dshowsrcwrapper/gstdshowfakesink.cpp
@@ -25,7 +25,7 @@
 m_hres (S_OK),
 m_callback (NULL),
 m_data (NULL),
-CBaseRenderer (CLSID_DshowFakeSink, _T("DshowFakeSink"), NULL, &m_hres)
+CBaseRenderer (CLSID_DshowFakeSink, TEXT("DshowFakeSink"), NULL, &m_hres)
 {
 }
 
diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp
index 52d8f2f..846c050 100644
--- a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp
+++ b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp
@@ -34,22 +34,35 @@
 static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_BGR ";"
-        GST_VIDEO_CAPS_YUV ("{ I420 }") ";"
-        GST_VIDEO_CAPS_YUV ("{ YUY2 }") ";"
-        GST_VIDEO_CAPS_YUV ("{ UYVY }") ";"
-        "video/x-dv,"
-        "systemstream = (boolean) FALSE,"
-        "width = (int) [ 1, MAX ],"
-        "height = (int) [ 1, MAX ],"
-        "framerate = (fraction) [ 0, MAX ],"
-        "format = (fourcc) dvsd;" "video/x-dv," "systemstream = (boolean) TRUE")
+    GST_STATIC_CAPS ("video/x-raw, format=(string) { "
+        GST_VIDEO_NE(BGR)  ", "
+        GST_VIDEO_NE(I420) ", "
+        GST_VIDEO_NE(YUY2) ", "
+        GST_VIDEO_NE(UYVY) " }, "
+        "width = " GST_VIDEO_SIZE_RANGE ", "
+        "height = " GST_VIDEO_SIZE_RANGE ", "
+        "framerate = " GST_VIDEO_FPS_RANGE "; "
+
+        "video/x-dv, "
+        "format= (string) DVSD, "
+        "width = " GST_VIDEO_SIZE_RANGE ", "
+        "height = " GST_VIDEO_SIZE_RANGE ", "
+        "framerate = " GST_VIDEO_FPS_RANGE ", "
+        "systemstream = (boolean) { TRUE, FALSE }; "
+
+        "image/jpeg, "
+        "width = " GST_VIDEO_SIZE_RANGE ", "
+        "height = " GST_VIDEO_SIZE_RANGE ", "
+        "framerate = " GST_VIDEO_FPS_RANGE "; "
+
+        "video/x-h264, "
+        "width = " GST_VIDEO_SIZE_RANGE ", "
+        "height = " GST_VIDEO_SIZE_RANGE ", "
+        "framerate = " GST_VIDEO_FPS_RANGE
+        )
     );
 
-static void gst_dshowvideosrc_init_interfaces (GType type);
-
-GST_BOILERPLATE_FULL (GstDshowVideoSrc, gst_dshowvideosrc, GstPushSrc,
-    GST_TYPE_PUSH_SRC, gst_dshowvideosrc_init_interfaces);
+G_DEFINE_TYPE (GstDshowVideoSrc, gst_dshowvideosrc, GST_TYPE_PUSH_SRC)
 
 enum
 {
@@ -58,26 +71,12 @@
   PROP_DEVICE_NAME
 };
 
-static void gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface *
-    iface);
-static const GList *gst_dshowvideosrc_probe_get_properties (GstPropertyProbe *
-    probe);
-static GValueArray *gst_dshowvideosrc_probe_get_values (GstPropertyProbe *
-    probe, guint prop_id, const GParamSpec * pspec);
-static GValueArray *gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc *
-    src);
-static gboolean gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec);
-static void gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec);
-
 
 static void gst_dshowvideosrc_dispose (GObject * gobject);
 static void gst_dshowvideosrc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 static void gst_dshowvideosrc_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * src);
 static GstStateChangeReturn gst_dshowvideosrc_change_state (GstElement *
     element, GstStateChange transition);
 
@@ -87,8 +86,8 @@
 static gboolean gst_dshowvideosrc_unlock (GstBaseSrc * bsrc);
 static gboolean gst_dshowvideosrc_unlock_stop (GstBaseSrc * bsrc);
 static gboolean gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps);
-static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * bsrc);
-static void gst_dshowvideosrc_src_fixate (GstBaseSrc * bsrc, GstCaps * caps);
+static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * bsrc, GstCaps * filter);
+static GstCaps *gst_dshowvideosrc_src_fixate (GstBaseSrc * bsrc, GstCaps * caps);
 static GstFlowReturn gst_dshowvideosrc_create (GstPushSrc * psrc,
     GstBuffer ** buf);
 
@@ -101,42 +100,6 @@
     gpointer src_object, GstClockTime duration);
 
 static void
-gst_dshowvideosrc_init_interfaces (GType type)
-{
-  static const GInterfaceInfo dshowvideosrc_info = {
-    (GInterfaceInitFunc) gst_dshowvideosrc_probe_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type,
-      GST_TYPE_PROPERTY_PROBE, &dshowvideosrc_info);
-}
-
-static void
-gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface * iface)
-{
-  iface->get_properties = gst_dshowvideosrc_probe_get_properties;
-  iface->needs_probe = gst_dshowvideosrc_probe_needs_probe;
-  iface->probe_property = gst_dshowvideosrc_probe_probe_property;
-  iface->get_values = gst_dshowvideosrc_probe_get_values;
-}
-
-static void
-gst_dshowvideosrc_base_init (gpointer klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_template));
-
-  gst_element_class_set_static_metadata (element_class,
-      "DirectShow video capture source", "Source/Video",
-      "Receive data from a directshow video capture graph",
-      "Sebastien Moutte <sebastien@moutte.net>");
-}
-
-static void
 gst_dshowvideosrc_class_init (GstDshowVideoSrcClass * klass)
 {
   GObjectClass *gobject_class;
@@ -158,8 +121,8 @@
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_dshowvideosrc_change_state);
 
-  gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_caps);
   gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_set_caps);
+  gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_caps);
   gstbasesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_src_fixate);
   gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_start);
   gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_stop);
@@ -181,13 +144,21 @@
           "Human-readable name of the sound device", NULL,
           static_cast < GParamFlags > (G_PARAM_READWRITE)));
 
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template));
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "DirectShow video capture source", "Source/Video",
+      "Receive data from a directshow video capture graph",
+      "Sebastien Moutte <sebastien@moutte.net>");
+
   GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0,
       "Directshow video source");
 
 }
 
 static void
-gst_dshowvideosrc_init (GstDshowVideoSrc * src, GstDshowVideoSrcClass * klass)
+gst_dshowvideosrc_init (GstDshowVideoSrc * src)
 {
   src->device = NULL;
   src->device_name = NULL;
@@ -198,6 +169,7 @@
   src->caps = NULL;
   src->pins_mediatypes = NULL;
   src->is_rgb = FALSE;
+  src->is_running = FALSE;
 
   /*added for analog input*/
   src->graph_builder = NULL;
@@ -205,8 +177,8 @@
   src->pVC = NULL;
   src->pVSC = NULL;
 
-  src->buffer_cond = g_cond_new ();
-  src->buffer_mutex = g_mutex_new ();
+  g_cond_init(&src->buffer_cond);
+  g_mutex_init(&src->buffer_mutex);
   src->buffer = NULL;
   src->stop_requested = FALSE;
 
@@ -215,7 +187,7 @@
   gst_base_src_set_live (GST_BASE_SRC (src), TRUE);
 }
 
-static void
+static GstCaps *
 gst_dshowvideosrc_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
 {
   /* If there is no desired video size, set default video size to device preffered video size */
@@ -247,6 +219,10 @@
           pin_mediatype->defaultFPS, 1);
     }
   }
+
+  caps = GST_BASE_SRC_CLASS (gst_dshowvideosrc_parent_class)->fixate(bsrc, caps);
+
+  return caps;
 }
 
 static void
@@ -280,156 +256,12 @@
     src->video_cap_filter = NULL;
   }
 
-  if (src->buffer_mutex) {
-    g_mutex_free (src->buffer_mutex);
-    src->buffer_mutex = NULL;
-  }
-
-  if (src->buffer_cond) {
-    g_cond_free (src->buffer_cond);
-    src->buffer_cond = NULL;
-  }
-
-  if (src->buffer) {
-    gst_buffer_unref (src->buffer);
-    src->buffer = NULL;
-  }
+  g_cond_clear(&src->buffer_cond);
+  g_mutex_clear(&src->buffer_mutex);
 
   CoUninitialize ();
 
-  G_OBJECT_CLASS (parent_class)->dispose (gobject);
-}
-
-static gboolean
-gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec)
-{
-  static gboolean init = FALSE;
-  gboolean ret = FALSE;
-
-  if (!init) {
-    ret = TRUE;
-    init = TRUE;
-  }
-
-  return ret;
-}
-
-static void
-gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec)
-{
-  GObjectClass *klass = G_OBJECT_GET_CLASS (probe);
-
-  switch (prop_id) {
-    case PROP_DEVICE_NAME:
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec);
-      break;
-  }
-}
-
-static const GList *
-gst_dshowvideosrc_probe_get_properties (GstPropertyProbe * probe)
-{
-  GObjectClass *klass = G_OBJECT_GET_CLASS (probe);
-  static GList *props = NULL;
-
-  if (!props) {
-    GParamSpec *pspec;
-
-    pspec = g_object_class_find_property (klass, "device-name");
-    props = g_list_append (props, pspec);
-  }
-
-  return props;
-}
-
-static GValueArray *
-gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc * src)
-{
-  GValueArray *array = g_value_array_new (0);
-  ICreateDevEnum *devices_enum = NULL;
-  IEnumMoniker *moniker_enum = NULL;
-  IMoniker *moniker = NULL;
-  HRESULT hres = S_FALSE;
-  ULONG fetched;
-
-  hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER,
-      IID_ICreateDevEnum, (LPVOID *) & devices_enum);
-  if (hres != S_OK) {
-    GST_ERROR ("Can't create system device enumerator (error=0x%x)", hres);
-    array = NULL;
-    goto clean;
-  }
-
-  hres = devices_enum->CreateClassEnumerator (CLSID_VideoInputDeviceCategory,
-      &moniker_enum, 0);
-  if (hres != S_OK || !moniker_enum) {
-    GST_ERROR ("Can't get enumeration of video devices (error=0x%x)", hres);
-    array = NULL;
-    goto clean;
-  }
-
-  moniker_enum->Reset ();
-
-  while (hres = moniker_enum->Next (1, &moniker, &fetched), hres == S_OK) {
-    IPropertyBag *property_bag = NULL;
-
-    hres =
-        moniker->BindToStorage (NULL, NULL, IID_IPropertyBag,
-        (LPVOID *) & property_bag);
-    if (SUCCEEDED (hres) && property_bag) {
-      VARIANT varFriendlyName;
-
-      VariantInit (&varFriendlyName);
-      hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL);
-      if (hres == S_OK && varFriendlyName.bstrVal) {
-        gchar *friendly_name =
-            g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal,
-            wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL);
-
-        GValue value = { 0 };
-        g_value_init (&value, G_TYPE_STRING);
-        g_value_set_string (&value, friendly_name);
-        g_value_array_append (array, &value);
-        g_value_unset (&value);
-        g_free (friendly_name);
-        SysFreeString (varFriendlyName.bstrVal);
-      }
-      property_bag->Release ();
-    }
-    moniker->Release ();
-  }
-
-clean:
-  if (moniker_enum)
-    moniker_enum->Release ();
-
-  if (devices_enum)
-    devices_enum->Release ();
-
-  return array;
-}
-
-static GValueArray *
-gst_dshowvideosrc_probe_get_values (GstPropertyProbe * probe,
-    guint prop_id, const GParamSpec * pspec)
-{
-  GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (probe);
-  GValueArray *array = NULL;
-
-  switch (prop_id) {
-    case PROP_DEVICE_NAME:
-      array = gst_dshowvideosrc_get_device_name_values (src);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec);
-      break;
-  }
-
-  return array;
+  G_OBJECT_CLASS (gst_dshowvideosrc_parent_class)->dispose (gobject);
 }
 
 static void
@@ -475,7 +307,7 @@
 }
 
 static GstCaps *
-gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc)
+gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc, GstCaps * filter)
 {
   HRESULT hres = S_OK;
   IBindCtx *lpbc = NULL;
@@ -569,7 +401,15 @@
   }
 
   if (src->caps) {
-    return gst_caps_ref (src->caps);
+    GstCaps *caps;
+
+    if (filter) {
+      caps = gst_caps_intersect_full (filter, src->caps, GST_CAPS_INTERSECT_FIRST);
+    } else {
+      caps = gst_caps_ref (src->caps);
+    }
+
+    return caps;
   }
 
   return NULL;
@@ -587,10 +427,15 @@
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      if (src->media_filter)
+      if (src->media_filter) {
+	/* Setting this to TRUE because set_caps may be invoked before
+	   Run() returns. */
+	src->is_running = TRUE;
         hres = src->media_filter->Run (0);
+      }
       if (hres != S_OK) {
         GST_ERROR ("Can't RUN the directshow capture graph (error=0x%x)", hres);
+	src->is_running = FALSE;
         return GST_STATE_CHANGE_FAILURE;
       }
       break;
@@ -601,6 +446,7 @@
         GST_ERROR ("Can't STOP the directshow capture graph (error=%d)", hres);
         return GST_STATE_CHANGE_FAILURE;
       }
+      src->is_running = FALSE;
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       break;
@@ -608,7 +454,7 @@
       break;
   }
 
-  return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  return GST_ELEMENT_CLASS(gst_dshowvideosrc_parent_class)->change_state(element, transition);
 }
 
 static gboolean
@@ -690,7 +536,7 @@
 											&MEDIATYPE_Video, src->video_cap_filter,
 											IID_IAMStreamConfig, (LPVOID *)&src->pVSC);
 	  if (hres != S_OK) {
-		  // this means we can't set frame rate (non-DV only)
+                  /* this means we can't set frame rate (non-DV only) */
 		  GST_ERROR ("Error %x: Cannot find VCapture:IAMStreamConfig",	hres);
 			goto error;
 	  }
@@ -741,6 +587,26 @@
   IPin *input_pin = NULL;
   GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc);
   GstStructure *s = gst_caps_get_structure (caps, 0);
+  GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc));
+
+  if (current_caps) {
+    if (gst_caps_is_equal (caps, current_caps)) {
+      gst_caps_unref (current_caps);
+      return TRUE;
+    }
+    gst_caps_unref (current_caps);
+  }
+
+  /* Same remark as in gstdshowaudiosrc. */
+  gboolean was_running = src->is_running;
+  if (was_running) {
+    HRESULT hres = src->media_filter->Stop ();
+    if (hres != S_OK) {
+      GST_ERROR ("Can't STOP the directshow capture graph (error=0x%x)", hres);
+      return FALSE;
+    }
+    src->is_running = FALSE;
+  }
 
   /* search the negociated caps in our caps list to get its index and the corresponding mediatype */
   if (gst_caps_is_subset (caps, src->caps)) {
@@ -808,6 +674,16 @@
           goto error;
         }
 
+        if (gst_dshow_is_pin_connected (pin_mediatype->capture_pin)) {
+          GST_DEBUG_OBJECT (src,
+              "capture_pin already connected, disconnecting");
+          src->filter_graph->Disconnect (pin_mediatype->capture_pin);
+        }
+
+        if (gst_dshow_is_pin_connected (input_pin)) {
+          GST_DEBUG_OBJECT (src, "input_pin already connected, disconnecting");
+          src->filter_graph->Disconnect (input_pin);
+        }
 
         hres = src->filter_graph->ConnectDirect (pin_mediatype->capture_pin,
             input_pin, pin_mediatype->mediatype);
@@ -824,20 +700,30 @@
         gst_structure_get_int (s, "width", &src->width);
         gst_structure_get_int (s, "height", &src->height);
 
-        src->is_rgb = FALSE;
-        caps_string = gst_caps_to_string (caps);
-        if (caps_string) {
-          if (strstr (caps_string, "video/x-raw-rgb")) {
-            src->is_rgb = TRUE;
-          } else {
-            src->is_rgb = FALSE;
-          }
-          g_free (caps_string);
-        }
+	GstVideoInfo info;
+	gst_video_info_from_caps(&info, caps);
+	switch (GST_VIDEO_INFO_FORMAT(&info)) {
+          case GST_VIDEO_FORMAT_RGB:
+          case GST_VIDEO_FORMAT_BGR:
+	    src->is_rgb = TRUE;
+	    break;
+	default:
+	  src->is_rgb = FALSE;
+	  break;
+	}
       }
     }
   }
 
+  if (was_running) {
+    HRESULT hres = src->media_filter->Run (0);
+    if (hres != S_OK) {
+      GST_ERROR ("Can't RUN the directshow capture graph (error=0x%x)", hres);
+      return FALSE;
+    }
+    src->is_running = TRUE;
+  }
+
   return TRUE;
 
 error:
@@ -924,10 +810,10 @@
 {
   GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc);
 
-  g_mutex_lock (src->buffer_mutex);
+  g_mutex_lock (&src->buffer_mutex);
   src->stop_requested = TRUE;
-  g_cond_signal (src->buffer_cond);
-  g_mutex_unlock (src->buffer_mutex);
+  g_cond_signal (&src->buffer_cond);
+  g_mutex_unlock (&src->buffer_mutex);
 
   return TRUE;
 }
@@ -947,12 +833,12 @@
 {
   GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (psrc);
 
-  g_mutex_lock (src->buffer_mutex);
+  g_mutex_lock (&src->buffer_mutex);
   while (src->buffer == NULL && !src->stop_requested)
-    g_cond_wait (src->buffer_cond, src->buffer_mutex);
+    g_cond_wait (&src->buffer_cond, &src->buffer_mutex);
   *buf = src->buffer;
   src->buffer = NULL;
-  g_mutex_unlock (src->buffer_mutex);
+  g_mutex_unlock (&src->buffer_mutex);
 
   if (src->stop_requested) {
     if (*buf != NULL) {
@@ -976,7 +862,6 @@
   HRESULT hres = S_OK;
   int icount = 0;
   int isize = 0;
-  VIDEO_STREAM_CONFIG_CAPS vscc;
   int i = 0;
   IAMStreamConfig *streamcaps = NULL;
 
@@ -988,7 +873,7 @@
 
   streamcaps->GetNumberOfCapabilities (&icount, &isize);
 
-  if (isize != sizeof (vscc)) {
+  if (isize != sizeof (VIDEO_STREAM_CONFIG_CAPS)) {
     streamcaps->Release ();
     return NULL;
   }
@@ -1024,6 +909,18 @@
 
         pin_mediatype->granularityWidth = 0;
         pin_mediatype->granularityHeight = 0;
+
+      } else if (gst_dshow_check_mediatype (pin_mediatype->mediatype,
+              MEDIASUBTYPE_MJPG, FORMAT_VideoInfo)) {
+        mediacaps =
+            gst_dshow_new_video_caps (GST_VIDEO_FORMAT_ENCODED,
+            "image/jpeg", pin_mediatype);
+
+      } else if (gst_dshow_check_mediatype (pin_mediatype->mediatype,
+              MEDIASUBTYPE_H264, FORMAT_VideoInfo)) {
+        mediacaps =
+            gst_dshow_new_video_caps (GST_VIDEO_FORMAT_ENCODED,
+            "video/x-h264", pin_mediatype);
       }
 
       if (mediacaps) {
@@ -1068,10 +965,18 @@
     GstCaps *mediacaps = NULL;
     GstVideoFormat video_format = gst_dshow_guid_to_gst_video_format (pin_mediatype->mediatype);
 
-    if (video_format != GST_VIDEO_FORMAT_UNKNOWN)
-      mediacaps = gst_video_format_new_caps (video_format, 
-          pin_mediatype->defaultWidth, pin_mediatype->defaultHeight,
-          pin_mediatype->defaultFPS, 1, 1, 1);
+	if (video_format != GST_VIDEO_FORMAT_UNKNOWN) {
+		GstVideoInfo info;
+
+		gst_video_info_init(&info);
+		gst_video_info_set_format(&info, video_format, pin_mediatype->defaultWidth, pin_mediatype->defaultHeight);
+		info.fps_n = pin_mediatype->defaultFPS;
+		info.fps_d = 1;
+		info.par_n = 1;
+		info.par_d = 1;
+		info.interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE; /* XXX is this correct ? */
+		mediacaps = gst_video_info_to_caps(&info);
+	}
 
     if (mediacaps) {
       src->pins_mediatypes =
@@ -1102,6 +1007,7 @@
   IPin *pPin = NULL;
   HRESULT hres = S_FALSE;
   AM_MEDIA_TYPE *pMediaType = NULL;
+  GstMapInfo info;
 
   if (!buffer || size == 0 || !src) {
     return FALSE;
@@ -1110,7 +1016,7 @@
   /* create a new buffer assign to it the clock time as timestamp */
   buf = gst_buffer_new_and_alloc (size);
 
-  GST_BUFFER_SIZE (buf) = size;
+  gst_buffer_set_size(buf, size);
 
   GstClock *clock = gst_element_get_clock (GST_ELEMENT (src));
   GST_BUFFER_TIMESTAMP (buf) =
@@ -1119,6 +1025,12 @@
 
   GST_BUFFER_DURATION (buf) = duration;
 
+  if (!gst_buffer_map(buf, &info, GST_MAP_WRITE)) {
+	  gst_buffer_unref(buf);
+	  GST_ERROR("Failed to map buffer");
+	  return FALSE;
+  }
+
   if (src->is_rgb) {
     /* FOR RGB directshow decoder will return bottom-up BITMAP
      * There is probably a way to get top-bottom video frames from
@@ -1128,26 +1040,25 @@
     gint stride = size / src->height;
 
     for (; line < src->height; line++) {
-      memcpy (GST_BUFFER_DATA (buf) + (line * stride),
+      memcpy (info.data + (line * stride),
           buffer + (size - ((line + 1) * (stride))), stride);
     }
   } else {
-    memcpy (GST_BUFFER_DATA (buf), buffer, size);
+    memcpy (info.data, buffer, size);
   }
 
+  gst_buffer_unmap(buf, &info);
+
   GST_DEBUG ("push_buffer => pts %" GST_TIME_FORMAT "duration %"
       GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
       GST_TIME_ARGS (duration));
 
-  /* the negotiate() method already set caps on the source pad */
-  gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (src)));
-
-  g_mutex_lock (src->buffer_mutex);
+  g_mutex_lock (&src->buffer_mutex);
   if (src->buffer != NULL)
     gst_buffer_unref (src->buffer);
   src->buffer = buf;
-  g_cond_signal (src->buffer_cond);
-  g_mutex_unlock (src->buffer_mutex);
+  g_cond_signal (&src->buffer_cond);
+  g_mutex_unlock (&src->buffer_mutex);
 
   return TRUE;
 }
diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.h b/sys/dshowsrcwrapper/gstdshowvideosrc.h
index 9c07528..684ffd6 100644
--- a/sys/dshowsrcwrapper/gstdshowvideosrc.h
+++ b/sys/dshowsrcwrapper/gstdshowvideosrc.h
@@ -25,7 +25,6 @@
 #include <glib.h>
 #include <gst/gst.h>
 #include <gst/base/gstpushsrc.h>
-#include <gst/interfaces/propertyprobe.h>
 
 #include "gstdshow.h"
 #include "gstdshowfakesink.h"
@@ -80,12 +79,13 @@
   IAMStreamConfig *pVSC;      // for video cap
 
   /* the last buffer from DirectShow */
-  GCond *buffer_cond;
-  GMutex *buffer_mutex;
+  GCond buffer_cond;
+  GMutex buffer_mutex;
   GstBuffer *buffer;
   gboolean stop_requested;
 
   gboolean is_rgb;
+  gboolean is_running;
   gint width;
   gint height;
 };
diff --git a/sys/dshowvideosink/Makefile.in b/sys/dshowvideosink/Makefile.in
index b45019c..eee20d6 100644
--- a/sys/dshowvideosink/Makefile.in
+++ b/sys/dshowvideosink/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 # This plugin isn't buildable with autotools at this point in time, so just
 # ensure everything's listed in EXTRA_DIST
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,7 +92,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/dshowvideosink
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 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 \
@@ -90,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +113,6 @@
 	$(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 \
@@ -120,6 +129,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -144,6 +154,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -161,8 +172,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -187,8 +200,6 @@
 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@
@@ -201,7 +212,6 @@
 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@
@@ -209,6 +219,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -235,11 +247,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -258,8 +273,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -318,10 +331,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -338,7 +355,6 @@
 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@
@@ -347,7 +363,6 @@
 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@
@@ -360,7 +375,6 @@
 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@
@@ -374,6 +388,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -385,6 +400,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -423,6 +440,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -458,10 +476,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -487,6 +509,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -494,7 +519,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -523,6 +555,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -533,6 +566,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -563,17 +597,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -590,6 +623,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -628,6 +662,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -662,7 +697,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/dshowvideosink/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/dshowvideosink/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -837,6 +871,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/dshowvideosink/dshowvideofakesrc.cpp b/sys/dshowvideosink/dshowvideofakesrc.cpp
index 5e76e64..f622155 100644
--- a/sys/dshowvideosink/dshowvideofakesrc.cpp
+++ b/sys/dshowvideosink/dshowvideofakesrc.cpp
@@ -250,12 +250,16 @@
 GstFlowReturn VideoFakeSrcPin::PushBuffer(GstBuffer *buffer)
 {
   IMediaSample *pSample = NULL;
-  byte *data = GST_BUFFER_DATA (buffer);
+  byte *data;
+  GstMapInfo map;
   int attempts = 0;
   HRESULT hres;
   BYTE *sample_buffer;
   AM_MEDIA_TYPE *mediatype;
 
+  /* FIXME: check return value. */
+  gst_buffer_map (buffer, &map, GST_MAP_READ);
+  data = map.data;
   StartUsingOutputPin();
 
   while (attempts < MAX_ATTEMPTS)
@@ -287,6 +291,7 @@
      */
     CopyToDestinationBuffer (data, sample_buffer);
   }
+  gst_buffer_unmap (buffer, &map);
 
   pSample->SetDiscontinuity(FALSE); /* Decoded frame; unimportant */
   pSample->SetSyncPoint(TRUE); /* Decoded frame; always a valid syncpoint */
diff --git a/sys/dshowvideosink/dshowvideosink.cpp b/sys/dshowvideosink/dshowvideosink.cpp
index bf5641c..ac0536c 100644
--- a/sys/dshowvideosink/dshowvideosink.cpp
+++ b/sys/dshowvideosink/dshowvideosink.cpp
@@ -25,8 +25,9 @@
 #include "dshowvideosink.h"
 #include "dshowvideofakesrc.h"
 
-#include <gst/interfaces/xoverlay.h>
-#include <gst/interfaces/navigation.h>
+#include <gst/video/video.h>
+#include <gst/video/videooverlay.h>
+#include <gst/video/navigation.h>
 
 #include "windows.h"
 
@@ -48,17 +49,24 @@
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (
-        "video/x-raw-yuv,"
+        "video/x-raw,"
         "width = (int) [ 1, MAX ],"
         "height = (int) [ 1, MAX ],"
         "framerate = (fraction) [ 0, MAX ]," 
-        "format = {(fourcc)YUY2, (fourcc)UYVY, (fourcc) YUVY, (fourcc)YV12 }")
+        "format = {(string)YUY2, (string)UYVY, (string)YV12 }")
     );
 
 static void gst_dshowvideosink_init_interfaces (GType type);
 
-GST_BOILERPLATE_FULL (GstDshowVideoSink, gst_dshowvideosink, GstVideoSink,
-    GST_TYPE_VIDEO_SINK, gst_dshowvideosink_init_interfaces);
+static void gst_dshowvideosink_videooverlay_init (GstVideoOverlayInterface *iface);
+static void
+gst_dshowvideosink_navigation_interface_init (GstNavigationInterface * iface);
+
+#define gst_dshowvideosink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstDshowVideoSink, gst_dshowvideosink,
+                         GST_TYPE_VIDEO_SINK,
+                         G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY, gst_dshowvideosink_videooverlay_init);
+                         G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_dshowvideosink_navigation_interface_init))
 
 enum
 {
@@ -84,7 +92,7 @@
 static gboolean gst_dshowvideosink_unlock (GstBaseSink * bsink);
 static gboolean gst_dshowvideosink_unlock_stop (GstBaseSink * bsink);
 static gboolean gst_dshowvideosink_set_caps (GstBaseSink * bsink, GstCaps * caps);
-static GstCaps *gst_dshowvideosink_get_caps (GstBaseSink * bsink);
+static GstCaps *gst_dshowvideosink_get_caps (GstBaseSink * bsink, GstCaps * filter);
 static GstFlowReturn gst_dshowvideosink_show_frame (GstVideoSink *sink, GstBuffer *buffer);
 static void gst_dshowvideosink_set_window_for_renderer (GstDshowVideoSink *sink);
 
@@ -95,22 +103,9 @@
  * different stride to GStreamer's implicit values. 
  */
 
-static gboolean
-gst_dshowvideosink_interface_supported (GstImplementsInterface * iface,
-    GType type)
-{
-  g_assert (type == GST_TYPE_X_OVERLAY || type == GST_TYPE_NAVIGATION);
-  return TRUE;
-}
-
 static void
-gst_dshowvideosink_interface_init (GstImplementsInterfaceClass * klass)
-{
-  klass->supported = gst_dshowvideosink_interface_supported;
-}
+gst_dshowvideosink_set_window_handle (GstVideoOverlay * overlay, guintptr window_id)
 
-static void
-gst_dshowvideosink_set_window_handle (GstXOverlay * overlay, guintptr window_id)
 {
   GstDshowVideoSink *sink = GST_DSHOWVIDEOSINK (overlay);
   HWND previous_window = sink->window_id;
@@ -146,7 +141,7 @@
 }
 
 static void
-gst_dshowvideosink_expose (GstXOverlay * overlay)
+gst_dshowvideosink_expose (GstVideoOverlay * overlay)
 {
   GstDshowVideoSink *sink = GST_DSHOWVIDEOSINK (overlay);
 
@@ -156,7 +151,7 @@
 }
 
 static void
-gst_dshowvideosink_xoverlay_interface_init (GstXOverlayClass * iface)
+gst_dshowvideosink_videooverlay_init (GstVideoOverlayInterface * iface)
 {
   iface->set_window_handle = gst_dshowvideosink_set_window_handle;
   iface->expose = gst_dshowvideosink_expose;
@@ -172,6 +167,8 @@
 
   event = gst_event_new_navigation (structure);
 
+  /* FXIME: handle aspect ratio. */
+
   pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink));
 
   if (GST_IS_PAD (pad) && GST_IS_EVENT (event)) {
@@ -184,53 +181,14 @@
 static void
 gst_dshowvideosink_navigation_interface_init (GstNavigationInterface * iface)
 {
+  /* FIXME: navigation interface partially implemented.
+   * Need to call gst_navigation_send_mouse_event and
+   * gst_navigation_send_key_event like in directdrawsink.
+   */
   iface->send_event = gst_dshowvideosink_navigation_send_event;
 }
 
 static void
-gst_dshowvideosink_init_interfaces (GType type)
-{
-  static const GInterfaceInfo iface_info = {
-    (GInterfaceInitFunc) gst_dshowvideosink_interface_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo xoverlay_info = {
-    (GInterfaceInitFunc) gst_dshowvideosink_xoverlay_interface_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo navigation_info = {
-    (GInterfaceInitFunc) gst_dshowvideosink_navigation_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
-      &iface_info);
-  g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info);
-  g_type_add_interface_static (type, GST_TYPE_NAVIGATION, &navigation_info);
-
-  GST_DEBUG_CATEGORY_INIT (dshowvideosink_debug, "dshowvideosink", 0, \
-      "DirectShow video sink");
-}
-static void
-gst_dshowvideosink_base_init (gpointer klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_template));
-
-  gst_element_class_set_static_metadata (element_class, "DirectShow video sink",
-      "Sink/Video", "Display data using a DirectShow video renderer",
-      "Pioneers of the Inevitable <songbird@songbirdnest.com>, " \
-      "FLUENDO S.A. <support@fluendo.com>");
-}
-
-static void
 gst_dshowvideosink_class_init (GstDshowVideoSinkClass * klass)
 {
   GObjectClass *o_class;
@@ -247,6 +205,14 @@
   o_class->set_property = gst_dshowvideosink_set_property;
   o_class->get_property = gst_dshowvideosink_get_property;
 
+  gst_element_class_set_static_metadata (e_class, "DirectShow video sink",
+      "Sink/Video", "Display data using a DirectShow video renderer",
+      "Pioneers of the Inevitable <songbird@songbirdnest.com>, " \
+      "FLUENDO S.A. <support@fluendo.com>");
+
+  gst_element_class_add_pad_template (e_class,
+      gst_static_pad_template_get (&sink_template));
+
   e_class->change_state = GST_DEBUG_FUNCPTR (gst_dshowvideosink_change_state);
 
   bs_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosink_get_caps);
@@ -297,26 +263,25 @@
 }
 
 static void
-gst_dshowvideosink_init (GstDshowVideoSink * sink, GstDshowVideoSinkClass * klass)
+gst_dshowvideosink_init (GstDshowVideoSink * sink)
 {
   gst_dshowvideosink_clear (sink);
 
-  sink->graph_lock = g_mutex_new();
-  sink->com_init_lock = g_mutex_new();
-  sink->com_deinit_lock = g_mutex_new();
-  sink->com_initialized = g_cond_new();
-  sink->com_uninitialize = g_cond_new();
-  sink->com_uninitialized = g_cond_new();
+  g_mutex_init (&sink->graph_lock);
+  g_mutex_init (&sink->com_init_lock);
+  g_mutex_init (&sink->com_deinit_lock);
+  g_cond_init (&sink->com_initialized);
+  g_cond_init (&sink->com_uninitialize);
+  g_cond_init (&sink->com_uninitialized);
 
-  g_mutex_lock (sink->com_init_lock);
+  g_mutex_lock (&sink->com_init_lock);
 
   /* create the COM initialization thread */
-  g_thread_create ((GThreadFunc)gst_dshowvideosink_com_thread,
-      sink, FALSE, NULL);
+  g_thread_new ("gstdshowvideosinkcomthread", (GThreadFunc)gst_dshowvideosink_com_thread, sink);
 
   /* wait until the COM thread signals that COM has been initialized */
-  g_cond_wait (sink->com_initialized, sink->com_init_lock);
-  g_mutex_unlock (sink->com_init_lock);
+  g_cond_wait (&sink->com_initialized, &sink->com_init_lock);
+  g_mutex_unlock (&sink->com_init_lock);
 }
 
 static void
@@ -329,19 +294,19 @@
 
   /* signal the COM thread that it sould uninitialize COM */
   if (sink->comInitialized) {
-    g_mutex_lock (sink->com_deinit_lock);
-    g_cond_signal (sink->com_uninitialize);
-    g_cond_wait (sink->com_uninitialized, sink->com_deinit_lock);
-    g_mutex_unlock (sink->com_deinit_lock);
+    g_mutex_lock (&sink->com_deinit_lock);
+    g_cond_signal (&sink->com_uninitialize);
+    g_cond_wait (&sink->com_uninitialized, &sink->com_deinit_lock);
+    g_mutex_unlock (&sink->com_deinit_lock);
   }
 
-  g_mutex_free (sink->com_init_lock);
-  g_mutex_free (sink->com_deinit_lock);
-  g_cond_free (sink->com_initialized);
-  g_cond_free (sink->com_uninitialize);
-  g_cond_free (sink->com_uninitialized);
+  g_mutex_clear (&sink->com_init_lock);
+  g_mutex_clear (&sink->com_deinit_lock);
+  g_cond_clear (&sink->com_initialized);
+  g_cond_clear (&sink->com_uninitialize);
+  g_cond_clear (&sink->com_uninitialized);
 
-  g_mutex_free (sink->graph_lock);
+  g_mutex_clear (&sink->graph_lock);
 
   G_OBJECT_CLASS (parent_class)->finalize (gobject);
 }
@@ -400,7 +365,7 @@
 {
   HRESULT res;
 
-  g_mutex_lock (sink->com_init_lock);
+  g_mutex_lock (&sink->com_init_lock);
 
   /* Initialize COM with a MTA for this process. This thread will
    * be the first one to enter the apartement and the last one to leave
@@ -417,27 +382,28 @@
   sink->comInitialized = TRUE;
 
   /* Signal other threads waiting on this condition that COM was initialized */
-  g_cond_signal (sink->com_initialized);
+  g_cond_signal (&sink->com_initialized);
 
-  g_mutex_unlock (sink->com_init_lock);
+  g_mutex_unlock (&sink->com_init_lock);
 
   /* Wait until the unitialize condition is met to leave the COM apartement */
-  g_mutex_lock (sink->com_deinit_lock);
-  g_cond_wait (sink->com_uninitialize, sink->com_deinit_lock);
+  g_mutex_lock (&sink->com_deinit_lock);
+  g_cond_wait (&sink->com_uninitialize, &sink->com_deinit_lock);
 
   CoUninitialize ();
   GST_INFO_OBJECT (sink, "COM unintialized succesfully");
   sink->comInitialized = FALSE;
-  g_cond_signal (sink->com_uninitialized);
-  g_mutex_unlock (sink->com_deinit_lock);
+  g_cond_signal (&sink->com_uninitialized);
+  g_mutex_unlock (&sink->com_deinit_lock);
 }
 
 static GstCaps *
-gst_dshowvideosink_get_caps (GstBaseSink * basesink)
+gst_dshowvideosink_get_caps (GstBaseSink * basesink, GstCaps * filter)
 {
   GstDshowVideoSink *sink = GST_DSHOWVIDEOSINK (basesink);
+  GstCaps *ret = NULL;
 
-  return NULL;
+  return ret;
 }
 
 static void dump_available_media_types (IPin *pin)
@@ -717,7 +683,7 @@
   sink->window_id = video_window;
 
   /* signal application we created a window */
-  gst_x_overlay_got_window_handle (GST_X_OVERLAY (sink),
+  gst_video_overlay_got_window_handle (GST_VIDEO_OVERLAY (sink),
       (gulong)video_window);
 
   /* Set the renderer's clipping window */
@@ -759,8 +725,9 @@
   if (sink->window_created_signal == NULL)
     goto failed;
 
-  sink->window_thread = g_thread_create (
-      (GThreadFunc) gst_dshowvideosink_window_thread, sink, TRUE, NULL);
+  sink -> window_thread = g_thread_new ("windowthread",
+                                        (GThreadFunc) gst_dshowvideosink_window_thread,
+                                        sink);
 
   /* wait maximum 10 seconds for window to be created */
   if (WaitForSingleObject (sink->window_created_signal,
@@ -813,7 +780,7 @@
 
   /* Give the app a last chance to supply a window id */
   if (!sink->window_id) {
-    gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (sink));
+    gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (sink));
   }
 
   /* If the app supplied one, use it. Otherwise, go ahead
@@ -1732,17 +1699,14 @@
 
   /* TODO: Add  RGB types. */
   if (IsEqualGUID (mediatype->subtype, MEDIASUBTYPE_YUY2))
-    caps = gst_caps_new_simple ("video/x-raw-yuv", 
-            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'), NULL);
+    caps = gst_caps_new_simple ("video/x-raw",
+            "format", GST_TYPE_VIDEO_FORMAT, GST_VIDEO_FORMAT_YUY2, NULL);
   else if (IsEqualGUID (mediatype->subtype, MEDIASUBTYPE_UYVY))
-    caps = gst_caps_new_simple ("video/x-raw-yuv", 
-            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'), NULL);
-  else if (IsEqualGUID (mediatype->subtype, MEDIASUBTYPE_YUYV))
-    caps = gst_caps_new_simple ("video/x-raw-yuv", 
-            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V'), NULL);
+    caps = gst_caps_new_simple ("video/x-raw",
+            "format", GST_TYPE_VIDEO_FORMAT, GST_VIDEO_FORMAT_UYVY, NULL);
   else if (IsEqualGUID (mediatype->subtype, MEDIASUBTYPE_YV12))
-    caps = gst_caps_new_simple ("video/x-raw-yuv", 
-            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'V', '1', '2'), NULL);
+    caps = gst_caps_new_simple ("video/x-raw",
+            "format", GST_TYPE_VIDEO_FORMAT, GST_VIDEO_FORMAT_YV12, NULL);
 
   if (!caps) {
     GST_DEBUG ("No subtype known; cannot continue");
@@ -1811,55 +1775,47 @@
 gst_caps_to_directshow_media_type (GstDshowVideoSink * sink, GstCaps *caps,
     AM_MEDIA_TYPE *mediatype)
 {
-  GstStructure *s = gst_caps_get_structure (caps, 0);
-  const gchar *name = gst_structure_get_name (s);
+  GstVideoInfo info;
+  int width, height;
+  int bpp;
 
-  gchar *capsstring = gst_caps_to_string (caps);
-  GST_DEBUG_OBJECT (sink, "Converting caps \"%s\" to AM_MEDIA_TYPE", capsstring);
-  g_free (capsstring);
-
+  gst_video_info_init (&info);
+  if (!gst_video_info_from_caps (&info, caps))
+  {
+    GST_WARNING_OBJECT (sink, "Couldn't parse caps");
+      return FALSE;
+  }
   memset (mediatype, 0, sizeof (AM_MEDIA_TYPE));
 
-  if (!strcmp (name, "video/x-raw-yuv")) {
+  if (GST_VIDEO_FORMAT_INFO_IS_YUV (info.finfo))
+  {
     guint32 fourcc;
-    int width, height;
-    int bpp;
-
-    if (!gst_structure_get_fourcc (s, "format", &fourcc)) {
-      GST_WARNING_OBJECT (sink, "Failed to convert caps, no fourcc");
-      return FALSE;
-    }
-
-    if (!gst_structure_get_int (s, "width", &width)) {
-      GST_WARNING_OBJECT (sink, "Failed to convert caps, no width");
-      return FALSE;
-    }
-    if (!gst_structure_get_int (s, "height", &height)) {
-      GST_WARNING_OBJECT (sink, "Failed to convert caps, no height");
-      return FALSE;
-    }
-
+    GST_VIDEO_SINK_WIDTH (sink) = info.width;
+    GST_VIDEO_SINK_HEIGHT (sink) = info.height;
+    width = info.width;
+    height = info.height;
     mediatype->majortype = MEDIATYPE_Video;
-    switch (fourcc) {
-      case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
-        mediatype->subtype = MEDIASUBTYPE_YUY2;
-        bpp = 16;
-        break;
-      case GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V'):
-        mediatype->subtype = MEDIASUBTYPE_YUYV;
-        bpp = 16;
-        break;
-      case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
-        mediatype->subtype = MEDIASUBTYPE_UYVY;
-        bpp = 16;
-        break;
-      case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
-        mediatype->subtype = MEDIASUBTYPE_YV12;
-        bpp = 12;
-        break;
-      default:
-        GST_WARNING_OBJECT (sink, "Failed to convert caps, not a known fourcc");
-        return FALSE;
+
+    switch (GST_VIDEO_INFO_FORMAT (&info))
+    {
+        case GST_VIDEO_FORMAT_YUY2:
+          mediatype->subtype = MEDIASUBTYPE_YUY2;
+          fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
+          bpp = 16;
+          break;
+        case GST_VIDEO_FORMAT_UYVY:
+          mediatype->subtype = MEDIASUBTYPE_UYVY;
+          fourcc = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
+          bpp = 16;
+          break;
+        case GST_VIDEO_FORMAT_YV12:
+          mediatype->subtype = MEDIASUBTYPE_YV12;
+          fourcc = GST_MAKE_FOURCC ('Y', 'V', '1', '2');
+          bpp = 12;
+          break;
+        default:
+          GST_WARNING_OBJECT (sink, "Couldn't parse caps");
+          return FALSE;
     }
 
     mediatype->bFixedSizeSamples = TRUE; /* Always true for raw video */
@@ -1886,8 +1842,9 @@
 
       vi->rcTarget.top = 0;
       vi->rcTarget.left = 0;
-      if (sink->keep_aspect_ratio &&
-          gst_structure_get_fraction (s, "pixel-aspect-ratio", &par_n, &par_d)) {
+      if (sink->keep_aspect_ratio) {
+        par_n = GST_VIDEO_INFO_PAR_N (&info);
+        par_d = GST_VIDEO_INFO_PAR_D (&info);
         /* To handle non-square pixels, we set the target rectangle to a 
          * different size than the source rectangle.
          * There might be a better way, but this seems to work. */
diff --git a/sys/dshowvideosink/dshowvideosink.h b/sys/dshowvideosink/dshowvideosink.h
index 325e1b2..9a7bda0 100644
--- a/sys/dshowvideosink/dshowvideosink.h
+++ b/sys/dshowvideosink/dshowvideosink.h
@@ -21,6 +21,7 @@
 #define __DSHOWVIDEOSINK_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 #include <gst/video/gstvideosink.h>
 
 #include "dshowvideofakesrc.h"
@@ -43,8 +44,8 @@
 typedef struct _GstDshowVideoSink GstDshowVideoSink;
 typedef struct _GstDshowVideoSinkClass GstDshowVideoSinkClass;
 
-#define GST_DSHOWVIDEOSINK_GRAPH_LOCK(sink)	g_mutex_lock (GST_DSHOWVIDEOSINK (sink)->graph_lock)
-#define GST_DSHOWVIDEOSINK_GRAPH_UNLOCK(clock) g_mutex_unlock (GST_DSHOWVIDEOSINK (sink)->graph_lock)
+#define GST_DSHOWVIDEOSINK_GRAPH_LOCK(sink)	g_mutex_lock (&GST_DSHOWVIDEOSINK (sink)->graph_lock)
+#define GST_DSHOWVIDEOSINK_GRAPH_UNLOCK(clock) g_mutex_unlock (&GST_DSHOWVIDEOSINK (sink)->graph_lock)
 
 /* Renderer-specific support classes */
 class RendererSupport
@@ -106,14 +107,14 @@
   WNDPROC prevWndProc;
 
   /* Lock for transitions */
-  GMutex *graph_lock;
+  GMutex graph_lock;
 
   gboolean comInitialized;
-  GMutex   *com_init_lock;
-  GMutex   *com_deinit_lock;
-  GCond    *com_initialized;
-  GCond    *com_uninitialize;
-  GCond    *com_uninitialized;
+  GMutex   com_init_lock;
+  GMutex   com_deinit_lock;
+  GCond    com_initialized;
+  GCond    com_uninitialize;
+  GCond    com_uninitialized;
 };
 
 struct _GstDshowVideoSinkClass
diff --git a/sys/dvb/Makefile.in b/sys/dvb/Makefile.in
index 48ee30c..284297f 100644
--- a/sys/dvb/Makefile.in
+++ b/sys/dvb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/dvb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS) AUTHORS README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -236,6 +246,8 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp AUTHORS \
+	README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -253,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -279,8 +293,6 @@
 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@
@@ -293,7 +305,6 @@
 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@
@@ -301,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -327,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -350,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -410,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -430,7 +448,6 @@
 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@
@@ -439,7 +456,6 @@
 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@
@@ -452,7 +468,6 @@
 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@
@@ -466,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -477,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -515,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -550,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -579,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -586,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -615,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -625,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -655,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -682,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -720,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -788,7 +824,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/dvb/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/dvb/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1201,6 +1236,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/dvb/camapplication.c b/sys/dvb/camapplication.c
index 3fe0b91..c4e6d43 100644
--- a/sys/dvb/camapplication.c
+++ b/sys/dvb/camapplication.c
@@ -47,7 +47,7 @@
   const gchar *description;
 } CamTagMessage;
 
-static CamTagMessage debugmessage[] = {
+static const CamTagMessage debugmessage[] = {
   {TAG_PROFILE_ENQUIRY, "PROFILE_ENQUIRY"},
   {TAG_PROFILE_REPLY, "PROFILE_REPLY"},
   {TAG_PROFILE_CHANGE, "PROFILE_CHANGE"},
diff --git a/sys/dvb/camtransport.c b/sys/dvb/camtransport.c
index 9bde7dd..c166b3d 100644
--- a/sys/dvb/camtransport.c
+++ b/sys/dvb/camtransport.c
@@ -63,7 +63,7 @@
   const gchar *description;
 } CamTagMessage;
 
-static CamTagMessage debugmessage[] = {
+static const CamTagMessage debugmessage[] = {
   {TAG_SB, "SB"},
   {TAG_RCV, "RCV"},
   {TAG_CREATE_T_C, "CREATE_T_C"},
diff --git a/sys/dvb/dvbbasebin.c b/sys/dvb/dvbbasebin.c
index 9deb9e9..2e6dcfd 100644
--- a/sys/dvb/dvbbasebin.c
+++ b/sys/dvb/dvbbasebin.c
@@ -1,9 +1,11 @@
 /*
  * dvbbasebin.c - 
  * Copyright (C) 2007 Alessandro Decina
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
  * 
  * Authors:
  *   Alessandro Decina <alessandro@nnva.org>
+ *   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
@@ -52,6 +54,7 @@
   SIGNAL_TUNING_START,
   SIGNAL_TUNING_DONE,
   SIGNAL_TUNING_FAIL,
+  SIGNAL_TUNE,
   LAST_SIGNAL
 };
 
@@ -79,8 +82,29 @@
   PROP_PILOT,
   PROP_ROLLOFF,
   PROP_STREAM_ID,
-  PROP_BANDWIDTH_HZ
-      /* FILL ME */
+  PROP_BANDWIDTH_HZ,
+  PROP_ISDBT_LAYER_ENABLED,
+  PROP_ISDBT_PARTIAL_RECEPTION,
+  PROP_ISDBT_SOUND_BROADCASTING,
+  PROP_ISDBT_SB_SUBCHANNEL_ID,
+  PROP_ISDBT_SB_SEGMENT_IDX,
+  PROP_ISDBT_SB_SEGMENT_COUNT,
+  PROP_ISDBT_LAYERA_FEC,
+  PROP_ISDBT_LAYERA_MODULATION,
+  PROP_ISDBT_LAYERA_SEGMENT_COUNT,
+  PROP_ISDBT_LAYERA_TIME_INTERLEAVING,
+  PROP_ISDBT_LAYERB_FEC,
+  PROP_ISDBT_LAYERB_MODULATION,
+  PROP_ISDBT_LAYERB_SEGMENT_COUNT,
+  PROP_ISDBT_LAYERB_TIME_INTERLEAVING,
+  PROP_ISDBT_LAYERC_FEC,
+  PROP_ISDBT_LAYERC_MODULATION,
+  PROP_ISDBT_LAYERC_SEGMENT_COUNT,
+  PROP_ISDBT_LAYERC_TIME_INTERLEAVING,
+  PROP_LNB_SLOF,
+  PROP_LNB_LOF1,
+  PROP_LNB_LOF2,
+  PROP_INTERLEAVING
 };
 
 typedef struct
@@ -138,6 +162,8 @@
 static void tuning_done_signal_cb (GObject * object, DvbBaseBin * dvbbasebin);
 static void tuning_fail_signal_cb (GObject * object, DvbBaseBin * dvbbasebin);
 
+static void dvb_base_bin_do_tune (DvbBaseBin * dvbbasebin);
+
 #define dvb_base_bin_parent_class parent_class
 G_DEFINE_TYPE_EXTENDED (DvbBaseBin, dvb_base_bin, GST_TYPE_BIN,
     0,
@@ -230,6 +256,11 @@
   g_signal_emit (dvbbasebin, dvb_base_bin_signals[SIGNAL_TUNING_FAIL], 0);
 }
 
+static void
+dvb_base_bin_do_tune (DvbBaseBin * dvbbasebin)
+{
+  g_signal_emit_by_name (dvbbasebin->dvbsrc, "tune", NULL);
+}
 
 static void
 dvb_base_bin_class_init (DvbBaseBinClass * klass)
@@ -237,6 +268,7 @@
   GObjectClass *gobject_class;
   GstElementClass *element_class;
   GstBinClass *bin_class;
+  DvbBaseBinClass *dvbbasebin_class;
   GstElementFactory *dvbsrc_factory;
   GObjectClass *dvbsrc_class;
   typedef struct
@@ -252,7 +284,9 @@
     {PROP_FREQUENCY, "frequency"},
     {PROP_POLARITY, "polarity"},
     {PROP_SYMBOL_RATE, "symbol-rate"},
+#ifndef GST_REMOVE_DEPRECATED
     {PROP_BANDWIDTH, "bandwidth"},
+#endif
     {PROP_CODE_RATE_HP, "code-rate-hp"},
     {PROP_CODE_RATE_LP, "code-rate-lp"},
     {PROP_GUARD, "guard"},
@@ -267,6 +301,28 @@
     {PROP_ROLLOFF, "rolloff"},
     {PROP_STREAM_ID, "stream-id"},
     {PROP_BANDWIDTH_HZ, "bandwidth-hz"},
+    {PROP_ISDBT_LAYER_ENABLED, "isdbt-layer-enabled"},
+    {PROP_ISDBT_PARTIAL_RECEPTION, "isdbt-partial-reception"},
+    {PROP_ISDBT_SOUND_BROADCASTING, "isdbt-sound-broadcasting"},
+    {PROP_ISDBT_SB_SUBCHANNEL_ID, "isdbt-sb-subchannel-id"},
+    {PROP_ISDBT_SB_SEGMENT_IDX, "isdbt-sb-segment-idx"},
+    {PROP_ISDBT_SB_SEGMENT_COUNT, "isdbt-sb-segment-count"},
+    {PROP_ISDBT_LAYERA_FEC, "isdbt-layera-fec"},
+    {PROP_ISDBT_LAYERA_MODULATION, "isdbt-layera-modulation"},
+    {PROP_ISDBT_LAYERA_SEGMENT_COUNT, "isdbt-layera-segment-count"},
+    {PROP_ISDBT_LAYERA_TIME_INTERLEAVING, "isdbt-layera-time-interleaving"},
+    {PROP_ISDBT_LAYERB_FEC, "isdbt-layerb-fec"},
+    {PROP_ISDBT_LAYERB_MODULATION, "isdbt-layerb-modulation"},
+    {PROP_ISDBT_LAYERB_SEGMENT_COUNT, "isdbt-layerb-segment-count"},
+    {PROP_ISDBT_LAYERB_TIME_INTERLEAVING, "isdbt-layerb-time-interleaving"},
+    {PROP_ISDBT_LAYERC_FEC, "isdbt-layerc-fec"},
+    {PROP_ISDBT_LAYERC_MODULATION, "isdbt-layerc-modulation"},
+    {PROP_ISDBT_LAYERC_SEGMENT_COUNT, "isdbt-layerc-segment-count"},
+    {PROP_ISDBT_LAYERC_TIME_INTERLEAVING, "isdbt-layerc-time-interleaving"},
+    {PROP_LNB_SLOF, "lnb-slof"},
+    {PROP_LNB_LOF1, "lnb-lof1"},
+    {PROP_LNB_LOF2, "lnb-lof2"},
+    {PROP_INTERLEAVING, "interleaving"},
     {0, NULL}
   };
 
@@ -287,7 +343,8 @@
   gst_element_class_set_static_metadata (element_class, "DVB bin",
       "Source/Bin/Video",
       "Access descramble and split DVB streams",
-      "Alessandro Decina <alessandro@nnva.org>");
+      "Alessandro Decina <alessandro@nnva.org>\n"
+      "Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>");
 
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->set_property = dvb_base_bin_set_property;
@@ -295,6 +352,9 @@
   gobject_class->dispose = dvb_base_bin_dispose;
   gobject_class->finalize = dvb_base_bin_finalize;
 
+  dvbbasebin_class = (DvbBaseBinClass *) klass;
+  dvbbasebin_class->do_tune = dvb_base_bin_do_tune;
+
   /* install dvbsrc properties */
   dvbsrc_factory = gst_element_factory_find ("dvbsrc");
   dvbsrc_class =
@@ -390,6 +450,18 @@
       g_signal_new ("tuning-fail", G_TYPE_FROM_CLASS (klass),
       G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
 
+  /**
+   * DvbBaseBin::tune:
+   * @dvbbasesink: the element on which the signal is emitted
+   *
+   * Signal emited from the application to the element, instructing it
+   * to tune.
+   */
+  dvb_base_bin_signals[SIGNAL_TUNE] =
+      g_signal_new ("tune", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+      G_STRUCT_OFFSET (DvbBaseBinClass, do_tune),
+      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 }
 
 static void
@@ -403,7 +475,7 @@
   dvbbasebin->trycam = TRUE;
 }
 
-static gint16 initial_pids[] = { 0, 1, 0x10, 0x11, 0x12, 0x14, -1 };
+static const gint16 initial_pids[] = { 0, 1, 0x10, 0x11, 0x12, 0x14, -1 };
 
 static void
 dvb_base_bin_init (DvbBaseBin * dvbbasebin)
@@ -561,6 +633,28 @@
     case PROP_ROLLOFF:
     case PROP_STREAM_ID:
     case PROP_BANDWIDTH_HZ:
+    case PROP_ISDBT_LAYER_ENABLED:
+    case PROP_ISDBT_PARTIAL_RECEPTION:
+    case PROP_ISDBT_SOUND_BROADCASTING:
+    case PROP_ISDBT_SB_SUBCHANNEL_ID:
+    case PROP_ISDBT_SB_SEGMENT_IDX:
+    case PROP_ISDBT_SB_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERA_FEC:
+    case PROP_ISDBT_LAYERA_MODULATION:
+    case PROP_ISDBT_LAYERA_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERA_TIME_INTERLEAVING:
+    case PROP_ISDBT_LAYERB_FEC:
+    case PROP_ISDBT_LAYERB_MODULATION:
+    case PROP_ISDBT_LAYERB_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERB_TIME_INTERLEAVING:
+    case PROP_ISDBT_LAYERC_FEC:
+    case PROP_ISDBT_LAYERC_MODULATION:
+    case PROP_ISDBT_LAYERC_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERC_TIME_INTERLEAVING:
+    case PROP_LNB_SLOF:
+    case PROP_LNB_LOF1:
+    case PROP_LNB_LOF2:
+    case PROP_INTERLEAVING:
       /* FIXME: check if we can tune (state < PLAYING || program-numbers == "") */
       g_object_set_property (G_OBJECT (dvbbasebin->dvbsrc), pspec->name, value);
       break;
@@ -600,6 +694,28 @@
     case PROP_ROLLOFF:
     case PROP_STREAM_ID:
     case PROP_BANDWIDTH_HZ:
+    case PROP_ISDBT_LAYER_ENABLED:
+    case PROP_ISDBT_PARTIAL_RECEPTION:
+    case PROP_ISDBT_SOUND_BROADCASTING:
+    case PROP_ISDBT_SB_SUBCHANNEL_ID:
+    case PROP_ISDBT_SB_SEGMENT_IDX:
+    case PROP_ISDBT_SB_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERA_FEC:
+    case PROP_ISDBT_LAYERA_MODULATION:
+    case PROP_ISDBT_LAYERA_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERA_TIME_INTERLEAVING:
+    case PROP_ISDBT_LAYERB_FEC:
+    case PROP_ISDBT_LAYERB_MODULATION:
+    case PROP_ISDBT_LAYERB_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERB_TIME_INTERLEAVING:
+    case PROP_ISDBT_LAYERC_FEC:
+    case PROP_ISDBT_LAYERC_MODULATION:
+    case PROP_ISDBT_LAYERC_SEGMENT_COUNT:
+    case PROP_ISDBT_LAYERC_TIME_INTERLEAVING:
+    case PROP_LNB_SLOF:
+    case PROP_LNB_LOF1:
+    case PROP_LNB_LOF2:
+    case PROP_INTERLEAVING:
       g_object_get_property (G_OBJECT (dvbbasebin->dvbsrc), pspec->name, value);
       break;
     case PROP_PROGRAM_NUMBERS:
diff --git a/sys/dvb/dvbbasebin.h b/sys/dvb/dvbbasebin.h
index 27a91b5..8454c92 100644
--- a/sys/dvb/dvbbasebin.h
+++ b/sys/dvb/dvbbasebin.h
@@ -71,6 +71,7 @@
   GstBinClass parent_class;
 
   /* signals */
+  void (*do_tune) (DvbBaseBin * dvbbasebin);
 };
 
 GType dvb_base_bin_get_type(void);
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index 721517b..adbc973 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -22,30 +22,34 @@
 /**
  * SECTION:element-dvbsrc
  *
- * dvbsrc can be used to capture video from DVB cards, DVB-T, DVB-S or DVB-T.
- * 
+ * dvbsrc can be used to capture media from DVB cards. Supported DTV
+ * broadcasting standards include DVB-T/C/S, ATSC ,ISDB-T and DTMB.
+ *
  * <refsect2>
  * <title>Example launch line</title>
  * |[
  * gst-launch dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4  hierarchy=0 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
- * ]| Captures a full transport stream from dvb card 0 that is a DVB-T card at tuned frequency 514000000 with other parameters as seen in the pipeline and renders the first tv program on the transport stream.
+ * ]| Captures a full transport stream from DVB card 0 that is a DVB-T card at tuned frequency 514000000 Hz with other parameters as seen in the pipeline and renders the first TV program on the transport stream.
  * |[
  * gst-launch dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4  hierarchy=0 pids=100:256:257 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
- * ]| Captures and renders a transport stream from dvb card 0 that is a DVB-T card for a program at tuned frequency 514000000 with PMT pid 100 and elementary stream pids of 256, 257 with other parameters as seen in the pipeline.
+ * ]| Captures and renders a transport stream from DVB card 0 that is a DVB-T card for a program at tuned frequency 514000000 Hz with PMT PID 100 and elementary stream PIDs of 256, 257 with other parameters as seen in the pipeline.
  * |[
  * gst-launch dvbsrc polarity="h" frequency=11302000 symbol-rate=27500 diseqc-source=0 pids=50:102:103 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
- * ]| Captures and renders a transport stream from dvb card 0 that is a DVB-S card for a program at tuned frequency 11302000 Hz, symbol rate of 27500 kHz with PMT pid of 50 and elementary stream pids of 102 and 103.
+ * ]| Captures and renders a transport stream from DVB card 0 that is a DVB-S card for a program at tuned frequency 11302000 kHz, symbol rate of 27500 kBd (kilo bauds) with PMT PID of 50 and elementary stream PIDs of 102 and 103.
+ * |[
+ gst-launch dvbsrc frequency=515142857 guard=16 trans-mode="8k" isdbt-layer-enabled=7 isdbt-partial-reception=1 isdbt-layera-fec="2/3" isdbt-layera-modulation="QPSK" isdbt-layera-segment-count=1 isdbt-layera-time-interleaving=4 isdbt-layerb-fec="3/4" isdbt-layerb-modulation="qam-64" isdbt-layerb-segment-count=12 isdbt-layerb-time-interleaving=2 isdbt-layerc-fec="1/2" isdbt-layerc-modulation="qam-64" isdbt-layerc-segment-count=0 isdbt-layerc-time-interleaving=0 delsys="isdb-t" ! tsdemux ! "video/x-h264" ! h264parse ! queue ! avdec_h264 ! videoconvert ! queue ! autovideosink
+ * ]| Captures and renders the video track of TV Paraíba HD (Globo affiliate) in Campina Grande, Brazil. This is an ISDB-T (Brazilian ISDB-Tb variant) broadcast.
  * </refsect2>
  */
 
-/* 
+/*
  * History of DVB_API_VERSION 5 minor changes
  *
  * API Addition/changes in reverse order (most recent first)
  *
  * Minor 10 (statistics properties)
  *   DTV_STAT_*
- *   FE_SCALE_* 
+ *   FE_SCALE_*
  *
  * Minor 9
  *   DTV_LNA
@@ -72,32 +76,12 @@
  *
  * Somewhere in between 5 and 6:
  *   SYS_DVBC_ANNEX_A / _C (Safety #define for _AC => A)
- * 
+ *
  * Minor 5 (Note : minimum version we support according to configure.ac)
  *   DTV_ENUM_DELSYS
- *
- * Minor 4
- *   SYS_TURBO
- *
- * Minor 3 (DVB-T2)
- *   TRANSMISSION_MODE_1K / _16K / _32K
- *   BANDWIDTH_5_MHZ / _10_MHZ / _1_712_MHZ
- *   GUARD_INTERVAL_1_128 / _19_128 / _19_256
- *   DTV_DVBT2_PLP_ID (/!\ renamed in minor 8 !)
- *   SYS_DVBT2
- *
- * Minor 2
- *   FE_CAN_TURBO_FEC
- *   DTV_ISDBS_TS_ID (/!\ renamed in minor 8 !)
- *
- * Minor 1 (ISDB-T and ISDB-Tsb)
- *   TRANSMISSION_MODE_4K
- *   DTV_ISDBT_* (for those not defined in later version)
- *
- * Minor 0 : initial version
  */
 
-/* We know we have at least DVB_API_VERSION >= 5 */
+/* We know we have at least DVB_API_VERSION >= 5 (minor 5) */
 #define HAVE_V5_MINOR(minor) ((DVB_API_VERSION > 5) || \
 			      (DVB_API_VERSION_MINOR >= (minor)))
 
@@ -143,11 +127,13 @@
 GST_DEBUG_CATEGORY_STATIC (gstdvbsrc_debug);
 #define GST_CAT_DEFAULT (gstdvbsrc_debug)
 
-#define SLOF (11700*1000UL)
-#define LOF1 (9750*1000UL)
-#define LOF2 (10600*1000UL)
-
-#define NUM_DTV_PROPS 16
+/**
+ * Can't be greater than DTV_IOCTL_MAX_MSGS but we are
+ * not using more than 25 for the largest use case (ISDB-T).
+ *
+ * Bump as needed.
+ */
+#define NUM_DTV_PROPS 25
 
 /* Signals */
 enum
@@ -155,6 +141,7 @@
   SIGNAL_TUNING_START,
   SIGNAL_TUNING_DONE,
   SIGNAL_TUNING_FAIL,
+  SIGNAL_TUNE,
   LAST_SIGNAL
 };
 
@@ -186,7 +173,29 @@
   ARG_DVBSRC_PILOT,
   ARG_DVBSRC_ROLLOFF,
   ARG_DVBSRC_STREAM_ID,
-  ARG_DVBSRC_BANDWIDTH_HZ
+  ARG_DVBSRC_BANDWIDTH_HZ,
+  ARG_DVBSRC_ISDBT_LAYER_ENABLED,
+  ARG_DVBSRC_ISDBT_PARTIAL_RECEPTION,
+  ARG_DVBSRC_ISDBT_SOUND_BROADCASTING,
+  ARG_DVBSRC_ISDBT_SB_SUBCHANNEL_ID,
+  ARG_DVBSRC_ISDBT_SB_SEGMENT_IDX,
+  ARG_DVBSRC_ISDBT_SB_SEGMENT_COUNT,
+  ARG_DVBSRC_ISDBT_LAYERA_FEC,
+  ARG_DVBSRC_ISDBT_LAYERA_MODULATION,
+  ARG_DVBSRC_ISDBT_LAYERA_SEGMENT_COUNT,
+  ARG_DVBSRC_ISDBT_LAYERA_TIME_INTERLEAVING,
+  ARG_DVBSRC_ISDBT_LAYERB_FEC,
+  ARG_DVBSRC_ISDBT_LAYERB_MODULATION,
+  ARG_DVBSRC_ISDBT_LAYERB_SEGMENT_COUNT,
+  ARG_DVBSRC_ISDBT_LAYERB_TIME_INTERLEAVING,
+  ARG_DVBSRC_ISDBT_LAYERC_FEC,
+  ARG_DVBSRC_ISDBT_LAYERC_MODULATION,
+  ARG_DVBSRC_ISDBT_LAYERC_SEGMENT_COUNT,
+  ARG_DVBSRC_ISDBT_LAYERC_TIME_INTERLEAVING,
+  ARG_DVBSRC_LNB_SLOF,
+  ARG_DVBSRC_LNB_LOF1,
+  ARG_DVBSRC_LNB_LOF2,
+  ARG_DVBSRC_INTERLEAVING
 };
 
 #define DEFAULT_ADAPTER 0
@@ -214,6 +223,32 @@
 #define DEFAULT_PILOT PILOT_AUTO
 #define DEFAULT_ROLLOFF ROLLOFF_AUTO
 #define DEFAULT_STREAM_ID NO_STREAM_ID_FILTER
+#define DEFAULT_ISDBT_LAYER_ENABLED 7
+#define DEFAULT_ISDBT_PARTIAL_RECEPTION 1
+#define DEFAULT_ISDBT_SOUND_BROADCASTING 0
+#define DEFAULT_ISDBT_SB_SUBCHANNEL_ID -1
+#define DEFAULT_ISDBT_SB_SEGMENT_IDX 0
+#define DEFAULT_ISDBT_SB_SEGMENT_COUNT 1
+#define DEFAULT_ISDBT_LAYERA_FEC FEC_AUTO
+#define DEFAULT_ISDBT_LAYERA_MODULATION QAM_AUTO
+#define DEFAULT_ISDBT_LAYERA_SEGMENT_COUNT -1
+#define DEFAULT_ISDBT_LAYERA_TIME_INTERLEAVING -1
+#define DEFAULT_ISDBT_LAYERB_FEC FEC_AUTO
+#define DEFAULT_ISDBT_LAYERB_MODULATION QAM_AUTO
+#define DEFAULT_ISDBT_LAYERB_SEGMENT_COUNT -1
+#define DEFAULT_ISDBT_LAYERB_TIME_INTERLEAVING -1
+#define DEFAULT_ISDBT_LAYERC_FEC FEC_AUTO
+#define DEFAULT_ISDBT_LAYERC_MODULATION QAM_AUTO
+#define DEFAULT_ISDBT_LAYERC_SEGMENT_COUNT -1
+#define DEFAULT_ISDBT_LAYERC_TIME_INTERLEAVING -1
+#define DEFAULT_LNB_SLOF (11700*1000UL)
+#define DEFAULT_LNB_LOF1 (9750*1000UL)
+#define DEFAULT_LNB_LOF2 (10600*1000UL)
+#if HAVE_V5_MINOR(7)
+#define DEFAULT_INTERLEAVING INTERLEAVING_AUTO
+#else
+#define DEFAULT_INTERLEAVING 0
+#endif
 
 static void gst_dvbsrc_output_frontend_stats (GstDvbSrc * src);
 
@@ -222,7 +257,7 @@
 gst_dvbsrc_code_rate_get_type (void)
 {
   static GType dvbsrc_code_rate_type = 0;
-  static GEnumValue code_rate_types[] = {
+  static const GEnumValue code_rate_types[] = {
     {FEC_NONE, "NONE", "none"},
     {FEC_1_2, "1/2", "1/2"},
     {FEC_2_3, "2/3", "2/3"},
@@ -233,6 +268,9 @@
     {FEC_7_8, "7/8", "7/8"},
     {FEC_8_9, "8/9", "8/9"},
     {FEC_AUTO, "AUTO", "auto"},
+    {FEC_3_5, "3/5", "3/5"},
+    {FEC_9_10, "9/10", "9/10"},
+    {FEC_2_5, "2/5", "2/5"},
     {0, NULL, NULL},
   };
 
@@ -248,7 +286,7 @@
 gst_dvbsrc_modulation_get_type (void)
 {
   static GType dvbsrc_modulation_type = 0;
-  static GEnumValue modulation_types[] = {
+  static const GEnumValue modulation_types[] = {
     {QPSK, "QPSK", "qpsk"},
     {QAM_16, "QAM 16", "qam-16"},
     {QAM_32, "QAM 32", "qam-32"},
@@ -259,6 +297,10 @@
     {VSB_8, "8VSB", "8vsb"},
     {VSB_16, "16VSB", "16vsb"},
     {PSK_8, "8PSK", "8psk"},
+    {APSK_16, "16APSK", "16apsk"},
+    {APSK_32, "32APSK", "32apsk"},
+    {DQPSK, "DQPSK", "dqpsk"},
+    {QAM_4_NR, "QAM 4 NR", "qam-4-nr"},
     {0, NULL, NULL},
   };
 
@@ -274,10 +316,18 @@
 gst_dvbsrc_transmission_mode_get_type (void)
 {
   static GType dvbsrc_transmission_mode_type = 0;
-  static GEnumValue transmission_mode_types[] = {
+  static const GEnumValue transmission_mode_types[] = {
     {TRANSMISSION_MODE_2K, "2K", "2k"},
     {TRANSMISSION_MODE_8K, "8K", "8k"},
     {TRANSMISSION_MODE_AUTO, "AUTO", "auto"},
+    {TRANSMISSION_MODE_4K, "4K", "4k"},
+    {TRANSMISSION_MODE_1K, "1K", "1k"},
+    {TRANSMISSION_MODE_16K, "16K", "16k"},
+    {TRANSMISSION_MODE_32K, "32K", "32k"},
+#if HAVE_V5_MINOR(7)
+    {TRANSMISSION_MODE_C1, "C1", "c1"},
+    {TRANSMISSION_MODE_C3780, "C3780", "c3780"},
+#endif
     {0, NULL, NULL},
   };
 
@@ -294,11 +344,14 @@
 gst_dvbsrc_bandwidth_get_type (void)
 {
   static GType dvbsrc_bandwidth_type = 0;
-  static GEnumValue bandwidth_types[] = {
+  static const GEnumValue bandwidth_types[] = {
     {BANDWIDTH_8_MHZ, "8", "8"},
     {BANDWIDTH_7_MHZ, "7", "7"},
     {BANDWIDTH_6_MHZ, "6", "6"},
     {BANDWIDTH_AUTO, "AUTO", "AUTO"},
+    {BANDWIDTH_5_MHZ, "5", "5"},
+    {BANDWIDTH_10_MHZ, "10", "10"},
+    {BANDWIDTH_1_712_MHZ, "1.712", "1.712"},
     {0, NULL, NULL},
   };
 
@@ -314,12 +367,20 @@
 gst_dvbsrc_guard_get_type (void)
 {
   static GType dvbsrc_guard_type = 0;
-  static GEnumValue guard_types[] = {
+  static const GEnumValue guard_types[] = {
     {GUARD_INTERVAL_1_32, "32", "32"},
     {GUARD_INTERVAL_1_16, "16", "16"},
     {GUARD_INTERVAL_1_8, "8", "8"},
     {GUARD_INTERVAL_1_4, "4", "4"},
     {GUARD_INTERVAL_AUTO, "AUTO", "auto"},
+    {GUARD_INTERVAL_1_128, "128", "128"},
+    {GUARD_INTERVAL_19_128, "19/128", "19/128"},
+    {GUARD_INTERVAL_19_256, "19/256", "19/256"},
+#if HAVE_V5_MINOR(7)
+    {GUARD_INTERVAL_PN420, "PN420", "pn420"},
+    {GUARD_INTERVAL_PN595, "PN595", "pn595"},
+    {GUARD_INTERVAL_PN945, "PN945", "pn945"},
+#endif
     {0, NULL, NULL},
   };
 
@@ -334,7 +395,7 @@
 gst_dvbsrc_hierarchy_get_type (void)
 {
   static GType dvbsrc_hierarchy_type = 0;
-  static GEnumValue hierarchy_types[] = {
+  static const GEnumValue hierarchy_types[] = {
     {HIERARCHY_NONE, "NONE", "none"},
     {HIERARCHY_1, "1", "1"},
     {HIERARCHY_2, "2", "2"},
@@ -355,7 +416,7 @@
 gst_dvbsrc_inversion_get_type (void)
 {
   static GType dvbsrc_inversion_type = 0;
-  static GEnumValue inversion_types[] = {
+  static const GEnumValue inversion_types[] = {
     {INVERSION_OFF, "OFF", "off"},
     {INVERSION_ON, "ON", "on"},
     {INVERSION_AUTO, "AUTO", "auto"},
@@ -374,7 +435,7 @@
 gst_dvbsrc_delsys_get_type (void)
 {
   static GType dvbsrc_delsys_type = 0;
-  static GEnumValue delsys_types[] = {
+  static const GEnumValue delsys_types[] = {
     {SYS_UNDEFINED, "UNDEFINED", "undefined"},
     {SYS_DVBC_ANNEX_A, "DVB-C-A", "dvb-c-a"},
     {SYS_DVBC_ANNEX_B, "DVB-C-B", "dvb-c-b"},
@@ -413,7 +474,7 @@
 gst_dvbsrc_pilot_get_type (void)
 {
   static GType dvbsrc_pilot_type = 0;
-  static GEnumValue pilot_types[] = {
+  static const GEnumValue pilot_types[] = {
     {PILOT_ON, "ON", "on"},
     {PILOT_OFF, "OFF", "off"},
     {PILOT_AUTO, "AUTO", "auto"},
@@ -431,7 +492,7 @@
 gst_dvbsrc_rolloff_get_type (void)
 {
   static GType dvbsrc_rolloff_type = 0;
-  static GEnumValue rolloff_types[] = {
+  static const GEnumValue rolloff_types[] = {
     {ROLLOFF_35, "35", "35"},
     {ROLLOFF_20, "20", "20"},
     {ROLLOFF_25, "25", "25"},
@@ -446,6 +507,28 @@
   return dvbsrc_rolloff_type;
 }
 
+#define GST_TYPE_INTERLEAVING (gst_dvbsrc_interleaving_get_type ())
+static GType
+gst_dvbsrc_interleaving_get_type (void)
+{
+  static GType dvbsrc_interleaving_type = 0;
+  static const GEnumValue interleaving_types[] = {
+#if HAVE_V5_MINOR(7)
+    {INTERLEAVING_NONE, "NONE", "none"},
+    {INTERLEAVING_AUTO, "AUTO", "auto"},
+    {INTERLEAVING_240, "240", "240"},
+    {INTERLEAVING_720, "720", "720"},
+#endif
+    {0, NULL, NULL},
+  };
+
+  if (!dvbsrc_interleaving_type) {
+    dvbsrc_interleaving_type =
+        g_enum_register_static ("GstDvbSrcInterleaving", interleaving_types);
+  }
+  return dvbsrc_interleaving_type;
+}
+
 static void gst_dvbsrc_finalize (GObject * object);
 static void gst_dvbsrc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
@@ -465,6 +548,7 @@
 static gboolean gst_dvbsrc_is_seekable (GstBaseSrc * bsrc);
 static gboolean gst_dvbsrc_get_size (GstBaseSrc * src, guint64 * size);
 
+static void gst_dvbsrc_do_tune (GstDvbSrc * src);
 static gboolean gst_dvbsrc_tune (GstDvbSrc * object);
 static gboolean gst_dvbsrc_set_fe_params (GstDvbSrc * object,
     struct dtv_properties *props);
@@ -472,8 +556,21 @@
 
 static void gst_dvbsrc_set_pes_filters (GstDvbSrc * object);
 static void gst_dvbsrc_unset_pes_filters (GstDvbSrc * object);
-static inline int gst_dvbsrc_retry_ioctl (int fd, unsigned long req,
-    void *data);
+static gboolean gst_dvbsrc_is_valid_modulation (guint delsys, guint mod);
+
+/**
+ * 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.
+ */
+#define LOOP_WHILE_EINTR(v,func) do { (v) = (func); } \
+		while ((v) == -1 && errno == EINTR);
 
 static GstStaticPadTemplate ts_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
@@ -504,11 +601,13 @@
   GstElementClass *gstelement_class;
   GstBaseSrcClass *gstbasesrc_class;
   GstPushSrcClass *gstpushsrc_class;
+  GstDvbSrcClass *gstdvbsrc_class;
 
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
   gstbasesrc_class = (GstBaseSrcClass *) klass;
   gstpushsrc_class = (GstPushSrcClass *) klass;
+  gstdvbsrc_class = (GstDvbSrcClass *) klass;
 
   gobject_class->set_property = gst_dvbsrc_set_property;
   gobject_class->get_property = gst_dvbsrc_get_property;
@@ -522,8 +621,9 @@
   gst_element_class_set_static_metadata (gstelement_class, "DVB Source",
       "Source/Video",
       "Digital Video Broadcast Source",
-      "P2P-VCR, C-Lab, University of Paderborn,"
-      "Zaheer Abbas Merali <zaheerabbas at merali dot org>");
+      "P2P-VCR, C-Lab, University of Paderborn, "
+      "Zaheer Abbas Merali <zaheerabbas at merali dot org>\n"
+      "Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>");
 
   gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_dvbsrc_start);
   gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_dvbsrc_stop);
@@ -534,6 +634,8 @@
 
   gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_dvbsrc_create);
 
+  gstdvbsrc_class->do_tune = GST_DEBUG_FUNCPTR (gst_dvbsrc_do_tune);
+
   g_object_class_install_property (gobject_class, ARG_DVBSRC_ADAPTER,
       g_param_spec_int ("adapter", "The adapter device number",
           "The DVB adapter device number (eg. 0 for adapter0)",
@@ -545,24 +647,29 @@
           0, 16, DEFAULT_FRONTEND, G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_FREQUENCY,
-      g_param_spec_uint ("frequency", "frequency", "Frequency",
-          0, G_MAXUINT, DEFAULT_FREQUENCY, G_PARAM_READWRITE));
+      g_param_spec_uint ("frequency", "Center frequency",
+          "Center frequency to tune into. Measured in kHz for the satellite "
+          "distribution standars and Hz for all the rest",
+          0, G_MAXUINT, DEFAULT_FREQUENCY,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_POLARITY,
       g_param_spec_string ("polarity", "polarity",
           "(DVB-S/S2) Polarity [vhHV] (eg. V for Vertical)",
-          DEFAULT_POLARITY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+          DEFAULT_POLARITY,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_PIDS,
       g_param_spec_string ("pids", "pids",
           "Colon seperated list of pids (eg. 110:120)",
-          DEFAULT_PIDS, G_PARAM_WRITABLE));
+          DEFAULT_PIDS, GST_PARAM_MUTABLE_PLAYING | G_PARAM_WRITABLE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_SYM_RATE,
       g_param_spec_uint ("symbol-rate",
           "symbol rate",
-          "(DVB-S/S2, DVB-C) Symbol rate in bauds",
-          0, G_MAXUINT, DEFAULT_SYMBOL_RATE, G_PARAM_READWRITE));
+          "(DVB-S/S2, DVB-C) Symbol rate in kBd (kilo bauds)",
+          0, G_MAXUINT, DEFAULT_SYMBOL_RATE,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_TUNE,
       g_param_spec_pointer ("tune",
@@ -573,44 +680,51 @@
           "diseqc source",
           "(DVB-S/S2) Selected DiSEqC source. Only needed if you have a "
           "DiSEqC switch. Otherwise leave at -1 (disabled)", -1, 7,
-          DEFAULT_DISEQC_SRC, G_PARAM_READWRITE));
+          DEFAULT_DISEQC_SRC, GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   /* DVB-T, additional properties */
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_BANDWIDTH_HZ,
       g_param_spec_uint ("bandwidth-hz", "bandwidth-hz",
           "(DVB-T) Bandwidth in Hz", 0, G_MAXUINT, DEFAULT_BANDWIDTH_HZ,
-          G_PARAM_READWRITE));
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
+#ifndef GST_REMOVE_DEPRECATED
   g_object_class_install_property (gobject_class, ARG_DVBSRC_BANDWIDTH,
       g_param_spec_enum ("bandwidth", "bandwidth",
           "(DVB-T) Bandwidth. Deprecated", GST_TYPE_DVBSRC_BANDWIDTH,
-          DEFAULT_BANDWIDTH, G_PARAM_READWRITE));
+          DEFAULT_BANDWIDTH,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE | G_PARAM_DEPRECATED));
+#endif
 
   /* FIXME: DVB-C, DVB-S, DVB-S2 named it as innerFEC */
   g_object_class_install_property (gobject_class, ARG_DVBSRC_CODE_RATE_HP,
       g_param_spec_enum ("code-rate-hp",
           "code-rate-hp",
           "(DVB-T, DVB-S/S2 and DVB-C) High priority code rate",
-          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_HP, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_HP,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_CODE_RATE_LP,
       g_param_spec_enum ("code-rate-lp",
           "code-rate-lp",
           "(DVB-T) Low priority code rate",
-          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_LP, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_CODE_RATE_LP,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   /* FIXME: should the property be called 'guard-interval' then? */
   g_object_class_install_property (gobject_class, ARG_DVBSRC_GUARD,
       g_param_spec_enum ("guard",
           "guard",
           "(DVB-T) Guard Interval",
-          GST_TYPE_DVBSRC_GUARD, DEFAULT_GUARD, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_GUARD, DEFAULT_GUARD,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_MODULATION,
       g_param_spec_enum ("modulation", "modulation",
-          "(DVB-T and DVB-C) Modulation type",
-          GST_TYPE_DVBSRC_MODULATION, DEFAULT_MODULATION, G_PARAM_READWRITE));
+          "(DVB-T/T2/C/S2, TURBO and ATSC) Modulation type",
+          GST_TYPE_DVBSRC_MODULATION, DEFAULT_MODULATION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   /* FIXME: property should be named 'transmission-mode' */
   g_object_class_install_property (gobject_class,
@@ -618,24 +732,27 @@
       g_param_spec_enum ("trans-mode", "trans-mode",
           "(DVB-T) Transmission mode",
           GST_TYPE_DVBSRC_TRANSMISSION_MODE, DEFAULT_TRANSMISSION_MODE,
-          G_PARAM_READWRITE));
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_HIERARCHY_INF,
       g_param_spec_enum ("hierarchy", "hierarchy",
           "(DVB-T) Hierarchy information",
-          GST_TYPE_DVBSRC_HIERARCHY, DEFAULT_HIERARCHY, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_HIERARCHY, DEFAULT_HIERARCHY,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_INVERSION,
       g_param_spec_enum ("inversion", "inversion",
           "(DVB-T and DVB-C) Inversion information",
-          GST_TYPE_DVBSRC_INVERSION, DEFAULT_INVERSION, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_INVERSION, DEFAULT_INVERSION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
       ARG_DVBSRC_STATS_REPORTING_INTERVAL,
       g_param_spec_uint ("stats-reporting-interval",
           "stats-reporting-interval",
           "The number of reads before reporting frontend stats",
-          0, G_MAXUINT, DEFAULT_STATS_REPORTING_INTERVAL, G_PARAM_READWRITE));
+          0, G_MAXUINT, DEFAULT_STATS_REPORTING_INTERVAL,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_TIMEOUT,
       g_param_spec_uint64 ("timeout", "Timeout",
@@ -645,7 +762,8 @@
   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));
+          0, G_MAXUINT64, DEFAULT_TUNING_TIMEOUT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
       ARG_DVBSRC_DVB_BUFFER_SIZE,
@@ -660,16 +778,186 @@
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_PILOT,
       g_param_spec_enum ("pilot", "pilot", "Pilot (DVB-S2)",
-          GST_TYPE_DVBSRC_PILOT, DEFAULT_PILOT, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_PILOT, DEFAULT_PILOT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_ROLLOFF,
       g_param_spec_enum ("rolloff", "rolloff", "Rolloff (DVB-S2)",
-          GST_TYPE_DVBSRC_ROLLOFF, DEFAULT_ROLLOFF, G_PARAM_READWRITE));
+          GST_TYPE_DVBSRC_ROLLOFF, DEFAULT_ROLLOFF,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class, ARG_DVBSRC_STREAM_ID,
       g_param_spec_int ("stream-id", "stream-id",
           "(DVB-T2 and DVB-S2 max 255, ISDB max 65535) Stream ID "
-          "(-1 = disabled)", -1, 65535, DEFAULT_STREAM_ID, G_PARAM_READWRITE));
+          "(-1 = disabled)", -1, 65535, DEFAULT_STREAM_ID,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  /* Additional ISDB-T properties */
+
+  /* Valid values are 0x1 0x2 0x4 |-ables */
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYER_ENABLED,
+      g_param_spec_uint ("isdbt-layer-enabled",
+          "ISB-T layer enabled",
+          "(ISDB-T) Layer Enabled (7 = All layers)", 1, 7,
+          DEFAULT_ISDBT_LAYER_ENABLED,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_PARTIAL_RECEPTION,
+      g_param_spec_int ("isdbt-partial-reception",
+          "ISB-T partial reception",
+          "(ISDB-T) Partial Reception (-1 = AUTO)", -1, 1,
+          DEFAULT_ISDBT_PARTIAL_RECEPTION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_SOUND_BROADCASTING,
+      g_param_spec_int ("isdbt-sound-broadcasting",
+          "ISB-T sound broadcasting",
+          "(ISDB-T) Sound Broadcasting", 0, 1,
+          DEFAULT_ISDBT_SOUND_BROADCASTING,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_SB_SUBCHANNEL_ID,
+      g_param_spec_int ("isdbt-sb-subchannel-id",
+          "ISB-T SB subchannel ID",
+          "(ISDB-T) SB Subchannel ID (-1 = AUTO)", -1, 41,
+          DEFAULT_ISDBT_SB_SEGMENT_IDX,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_SB_SEGMENT_IDX,
+      g_param_spec_int ("isdbt-sb-segment-idx",
+          "ISB-T SB segment IDX",
+          "(ISDB-T) SB segment IDX", 0, 12,
+          DEFAULT_ISDBT_SB_SEGMENT_IDX,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_SB_SEGMENT_COUNT,
+      g_param_spec_uint ("isdbt-sb-segment-count",
+          "ISB-T SB segment count",
+          "(ISDB-T) SB segment count", 1, 13,
+          DEFAULT_ISDBT_SB_SEGMENT_COUNT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_ISDBT_LAYERA_FEC,
+      g_param_spec_enum ("isdbt-layera-fec",
+          "ISDB-T layer A FEC", "(ISDB-T) layer A Forward Error Correction",
+          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_ISDBT_LAYERA_FEC,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_ISDBT_LAYERB_FEC,
+      g_param_spec_enum ("isdbt-layerb-fec",
+          "ISDB-T layer B FEC", "(ISDB-T) layer B Forward Error Correction",
+          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_ISDBT_LAYERB_FEC,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_ISDBT_LAYERC_FEC,
+      g_param_spec_enum ("isdbt-layerc-fec",
+          "ISDB-T layer A FEC", "(ISDB-T) layer C Forward Error Correction",
+          GST_TYPE_DVBSRC_CODE_RATE, DEFAULT_ISDBT_LAYERC_FEC,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERA_MODULATION,
+      g_param_spec_enum ("isdbt-layera-modulation", "ISDBT layer A modulation",
+          "(ISDB-T) Layer A modulation type",
+          GST_TYPE_DVBSRC_MODULATION, DEFAULT_ISDBT_LAYERA_MODULATION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERB_MODULATION,
+      g_param_spec_enum ("isdbt-layerb-modulation", "ISDBT layer B modulation",
+          "(ISDB-T) Layer B modulation type",
+          GST_TYPE_DVBSRC_MODULATION, DEFAULT_ISDBT_LAYERB_MODULATION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERC_MODULATION,
+      g_param_spec_enum ("isdbt-layerc-modulation", "ISDBT layer C modulation",
+          "(ISDB-T) Layer C modulation type",
+          GST_TYPE_DVBSRC_MODULATION, DEFAULT_ISDBT_LAYERC_MODULATION,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERA_SEGMENT_COUNT,
+      g_param_spec_int ("isdbt-layera-segment-count",
+          "ISB-T layer A segment count",
+          "(ISDB-T) Layer A segment count (-1 = AUTO)", -1, 13,
+          DEFAULT_ISDBT_LAYERA_SEGMENT_COUNT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERB_SEGMENT_COUNT,
+      g_param_spec_int ("isdbt-layerb-segment-count",
+          "ISB-T layer B segment count",
+          "(ISDB-T) Layer B segment count (-1 = AUTO)", -1, 13,
+          DEFAULT_ISDBT_LAYERB_SEGMENT_COUNT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERC_SEGMENT_COUNT,
+      g_param_spec_int ("isdbt-layerc-segment-count",
+          "ISB-T layer C segment count",
+          "(ISDB-T) Layer C segment count (-1 = AUTO)", -1, 13,
+          DEFAULT_ISDBT_LAYERC_SEGMENT_COUNT,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERA_TIME_INTERLEAVING,
+      g_param_spec_int ("isdbt-layera-time-interleaving",
+          "ISB-T layer A time interleaving ",
+          "(ISDB-T) Layer A time interleaving (-1 = AUTO)", -1, 8,
+          DEFAULT_ISDBT_LAYERA_TIME_INTERLEAVING,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERB_TIME_INTERLEAVING,
+      g_param_spec_int ("isdbt-layerb-time-interleaving",
+          "ISB-T layer B time interleaving ",
+          "(ISDB-T) Layer B time interleaving (-1 = AUTO)", -1, 8,
+          DEFAULT_ISDBT_LAYERB_TIME_INTERLEAVING,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_ISDBT_LAYERC_TIME_INTERLEAVING,
+      g_param_spec_int ("isdbt-layerc-time-interleaving",
+          "ISB-T layer C time interleaving ",
+          "(ISDB-T) Layer C time interleaving (-1 = AUTO)", -1, 8,
+          DEFAULT_ISDBT_LAYERC_TIME_INTERLEAVING,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  /* LNB properties (Satellite distribution standards) */
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_LNB_SLOF,
+      g_param_spec_uint ("lnb-slof", "Tuning Timeout",
+          "LNB's Upper bound for low band reception (kHz)",
+          0, G_MAXUINT, DEFAULT_LNB_SLOF,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_LNB_LOF1,
+      g_param_spec_uint ("lnb-lof1", "Low band local oscillator frequency",
+          "LNB's Local oscillator frequency used for low band reception (kHz)",
+          0, G_MAXUINT, DEFAULT_LNB_LOF1,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_LNB_LOF2,
+      g_param_spec_uint ("lnb-lof2", "High band local oscillator frequency",
+          "LNB's Local oscillator frequency used for high band reception (kHz)",
+          0, G_MAXUINT, DEFAULT_LNB_LOF2,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
+
+  /* Additional DTMB properties */
+
+  g_object_class_install_property (gobject_class,
+      ARG_DVBSRC_INTERLEAVING,
+      g_param_spec_enum ("interleaving", "DTMB Interleaving",
+          "(DTMB) Interleaving type",
+          GST_TYPE_INTERLEAVING, DEFAULT_INTERLEAVING,
+          GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE));
 
   /**
    * GstDvbSrc::tuning-start:
@@ -701,6 +989,19 @@
       g_signal_new ("tuning-fail", G_TYPE_FROM_CLASS (klass),
       G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
 
+  /**
+   * GstDvbSrc::tune:
+   * @gstdvbsrc: the element on which the signal is emitted
+   *
+   * Signal emited from the application to the element, instructing it
+   * to tune.
+   */
+  gst_dvbsrc_signals[SIGNAL_TUNING_FAIL] =
+      g_signal_new ("tune", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+      G_STRUCT_OFFSET (GstDvbSrcClass, do_tune),
+      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+
 }
 
 /* initialize the new element
@@ -754,34 +1055,39 @@
   object->rolloff = DEFAULT_ROLLOFF;
   object->stream_id = DEFAULT_STREAM_ID;
 
+  object->isdbt_layer_enabled = DEFAULT_ISDBT_LAYER_ENABLED;
+  object->isdbt_partial_reception = DEFAULT_ISDBT_PARTIAL_RECEPTION;
+  object->isdbt_sound_broadcasting = DEFAULT_ISDBT_SOUND_BROADCASTING;
+  object->isdbt_sb_subchannel_id = DEFAULT_ISDBT_SB_SUBCHANNEL_ID;
+  object->isdbt_sb_segment_idx = DEFAULT_ISDBT_SB_SEGMENT_IDX;
+  object->isdbt_sb_segment_count = DEFAULT_ISDBT_SB_SEGMENT_COUNT;
+  object->isdbt_layera_fec = DEFAULT_ISDBT_LAYERA_FEC;
+  object->isdbt_layera_modulation = DEFAULT_ISDBT_LAYERA_MODULATION;
+  object->isdbt_layera_segment_count = DEFAULT_ISDBT_LAYERA_SEGMENT_COUNT;
+  object->isdbt_layera_time_interleaving =
+      DEFAULT_ISDBT_LAYERA_TIME_INTERLEAVING;
+  object->isdbt_layerb_fec = DEFAULT_ISDBT_LAYERB_FEC;
+  object->isdbt_layerb_modulation = DEFAULT_ISDBT_LAYERB_MODULATION;
+  object->isdbt_layerb_segment_count = DEFAULT_ISDBT_LAYERB_SEGMENT_COUNT;
+  object->isdbt_layerb_time_interleaving =
+      DEFAULT_ISDBT_LAYERB_TIME_INTERLEAVING;
+  object->isdbt_layerc_fec = DEFAULT_ISDBT_LAYERC_FEC;
+  object->isdbt_layerc_modulation = DEFAULT_ISDBT_LAYERC_MODULATION;
+  object->isdbt_layerc_segment_count = DEFAULT_ISDBT_LAYERC_SEGMENT_COUNT;
+  object->isdbt_layerc_time_interleaving =
+      DEFAULT_ISDBT_LAYERC_TIME_INTERLEAVING;
+
+  object->lnb_slof = DEFAULT_LNB_SLOF;
+  object->lnb_lof1 = DEFAULT_LNB_LOF1;
+  object->lnb_lof2 = DEFAULT_LNB_LOF2;
+
+  object->interleaving = DEFAULT_INTERLEAVING;
+
   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
 gst_dvbsrc_set_pids (GstDvbSrc * dvbsrc, const gchar * pid_string)
 {
@@ -900,8 +1206,17 @@
         case BANDWIDTH_6_MHZ:
           object->bandwidth = 6000000;
           break;
+        case BANDWIDTH_5_MHZ:
+          object->bandwidth = 5000000;
+          break;
+        case BANDWIDTH_10_MHZ:
+          object->bandwidth = 10000000;
+          break;
+        case BANDWIDTH_1_712_MHZ:
+          object->bandwidth = 1712000;
+          break;
         default:
-          /* we don't know which bandwidth are set */
+          /* we don't know which bandwidth is set */
           object->bandwidth = 0;
           break;
       }
@@ -927,18 +1242,10 @@
     case ARG_DVBSRC_INVERSION:
       object->inversion = g_value_get_enum (value);
       break;
-    case ARG_DVBSRC_TUNE:{
+    case ARG_DVBSRC_TUNE:
       GST_INFO_OBJECT (object, "Set Property: ARG_DVBSRC_TUNE");
-
-      /* if we are in paused/playing state tune now, otherwise in ready
-       * to paused state change */
-      if (GST_STATE (object) > GST_STATE_READY) {
-        g_mutex_lock (&object->tune_mutex);
-        gst_dvbsrc_tune (object);
-        g_mutex_unlock (&object->tune_mutex);
-      }
+      gst_dvbsrc_do_tune (object);
       break;
-    }
     case ARG_DVBSRC_STATS_REPORTING_INTERVAL:
       object->stats_interval = g_value_get_uint (value);
       object->stats_counter = 0;
@@ -964,6 +1271,72 @@
     case ARG_DVBSRC_STREAM_ID:
       object->stream_id = g_value_get_int (value);
       break;
+    case ARG_DVBSRC_ISDBT_LAYER_ENABLED:
+      object->isdbt_layer_enabled = g_value_get_uint (value);
+      break;
+    case ARG_DVBSRC_ISDBT_PARTIAL_RECEPTION:
+      object->isdbt_partial_reception = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_SOUND_BROADCASTING:
+      object->isdbt_sound_broadcasting = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SUBCHANNEL_ID:
+      object->isdbt_sb_subchannel_id = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SEGMENT_IDX:
+      object->isdbt_sb_segment_idx = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SEGMENT_COUNT:
+      object->isdbt_sb_segment_count = g_value_get_uint (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_FEC:
+      object->isdbt_layera_fec = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_MODULATION:
+      object->isdbt_layera_modulation = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_SEGMENT_COUNT:
+      object->isdbt_layera_segment_count = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_TIME_INTERLEAVING:
+      object->isdbt_layera_time_interleaving = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_FEC:
+      object->isdbt_layerb_fec = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_MODULATION:
+      object->isdbt_layerb_modulation = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_SEGMENT_COUNT:
+      object->isdbt_layerb_segment_count = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_TIME_INTERLEAVING:
+      object->isdbt_layerb_time_interleaving = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_FEC:
+      object->isdbt_layerc_fec = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_MODULATION:
+      object->isdbt_layerc_modulation = g_value_get_enum (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_SEGMENT_COUNT:
+      object->isdbt_layerc_segment_count = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_TIME_INTERLEAVING:
+      object->isdbt_layerc_time_interleaving = g_value_get_int (value);
+      break;
+    case ARG_DVBSRC_LNB_SLOF:
+      object->lnb_slof = g_value_get_uint (value);
+      break;
+    case ARG_DVBSRC_LNB_LOF1:
+      object->lnb_lof1 = g_value_get_uint (value);
+      break;
+    case ARG_DVBSRC_LNB_LOF2:
+      object->lnb_lof2 = g_value_get_uint (value);
+      break;
+    case ARG_DVBSRC_INTERLEAVING:
+      object->interleaving = g_value_get_enum (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
   }
@@ -1005,14 +1378,20 @@
       break;
     case ARG_DVBSRC_BANDWIDTH:{
       int tmp;
-      if (object->bandwidth == 0)
+      if (!object->bandwidth)
         tmp = BANDWIDTH_AUTO;
+      else if (object->bandwidth <= 1712000)
+        tmp = BANDWIDTH_1_712_MHZ;
+      else if (object->bandwidth <= 5000000)
+        tmp = BANDWIDTH_5_MHZ;
       else if (object->bandwidth <= 6000000)
         tmp = BANDWIDTH_6_MHZ;
       else if (object->bandwidth <= 7000000)
         tmp = BANDWIDTH_7_MHZ;
       else if (object->bandwidth <= 8000000)
         tmp = BANDWIDTH_8_MHZ;
+      else if (object->bandwidth <= 10000000)
+        tmp = BANDWIDTH_10_MHZ;
       else
         tmp = BANDWIDTH_AUTO;
 
@@ -1064,6 +1443,72 @@
     case ARG_DVBSRC_STREAM_ID:
       g_value_set_int (value, object->stream_id);
       break;
+    case ARG_DVBSRC_ISDBT_LAYER_ENABLED:
+      g_value_set_uint (value, object->isdbt_layer_enabled);
+      break;
+    case ARG_DVBSRC_ISDBT_PARTIAL_RECEPTION:
+      g_value_set_int (value, object->isdbt_partial_reception);
+      break;
+    case ARG_DVBSRC_ISDBT_SOUND_BROADCASTING:
+      g_value_set_int (value, object->isdbt_sound_broadcasting);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SUBCHANNEL_ID:
+      g_value_set_int (value, object->isdbt_sb_subchannel_id);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SEGMENT_IDX:
+      g_value_set_int (value, object->isdbt_sb_segment_idx);
+      break;
+    case ARG_DVBSRC_ISDBT_SB_SEGMENT_COUNT:
+      g_value_set_uint (value, object->isdbt_sb_segment_count);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_FEC:
+      g_value_set_enum (value, object->isdbt_layera_fec);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_MODULATION:
+      g_value_set_enum (value, object->isdbt_layera_modulation);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_SEGMENT_COUNT:
+      g_value_set_int (value, object->isdbt_layera_segment_count);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERA_TIME_INTERLEAVING:
+      g_value_set_int (value, object->isdbt_layera_time_interleaving);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_FEC:
+      g_value_set_enum (value, object->isdbt_layerb_fec);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_MODULATION:
+      g_value_set_enum (value, object->isdbt_layerb_modulation);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_SEGMENT_COUNT:
+      g_value_set_int (value, object->isdbt_layerb_segment_count);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERB_TIME_INTERLEAVING:
+      g_value_set_int (value, object->isdbt_layerb_time_interleaving);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_FEC:
+      g_value_set_enum (value, object->isdbt_layerc_fec);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_MODULATION:
+      g_value_set_enum (value, object->isdbt_layerc_modulation);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_SEGMENT_COUNT:
+      g_value_set_int (value, object->isdbt_layerc_segment_count);
+      break;
+    case ARG_DVBSRC_ISDBT_LAYERC_TIME_INTERLEAVING:
+      g_value_set_int (value, object->isdbt_layerc_time_interleaving);
+      break;
+    case ARG_DVBSRC_LNB_SLOF:
+      g_value_set_uint (value, object->lnb_slof);
+      break;
+    case ARG_DVBSRC_LNB_LOF1:
+      g_value_set_uint (value, object->lnb_lof1);
+      break;
+    case ARG_DVBSRC_LNB_LOF2:
+      g_value_set_uint (value, object->lnb_lof2);
+      break;
+    case ARG_DVBSRC_INTERLEAVING:
+      g_value_set_enum (value, object->interleaving);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
   }
@@ -1091,7 +1536,7 @@
     if (prop->u.buffer.data[i] == delsys)
       return TRUE;
   }
-  GST_LOG ("Adapter does not suport delsys: %d", delsys);
+  GST_LOG ("Adapter does not support delsys: %d", delsys);
   return FALSE;
 }
 
@@ -1104,14 +1549,16 @@
   gchar *frontend_dev;
   GstStructure *adapter_structure;
   char *adapter_name = NULL;
+  gint err;
 
   frontend_dev = g_strdup_printf ("/dev/dvb/adapter%d/frontend%d",
       object->adapter_number, object->frontend_number);
   GST_INFO_OBJECT (object, "Using frontend device: %s", frontend_dev);
 
   /* open frontend */
-  if ((object->fd_frontend =
-          open (frontend_dev, writable ? O_RDWR : O_RDONLY)) < 0) {
+  LOOP_WHILE_EINTR (object->fd_frontend,
+      open (frontend_dev, writable ? O_RDWR : O_RDONLY));
+  if (object->fd_frontend < 0) {
     switch (errno) {
       case ENOENT:
         GST_ELEMENT_ERROR (object, RESOURCE, NOT_FOUND,
@@ -1130,7 +1577,8 @@
 
   GST_DEBUG_OBJECT (object, "Device opened, querying information");
 
-  if (ioctl (object->fd_frontend, FE_GET_INFO, &fe_info) < 0) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_GET_INFO, &fe_info));
+  if (err) {
     GST_ELEMENT_ERROR (object, RESOURCE, SETTINGS,
         (_("Could not get settings from frontend device \"%s\"."),
             frontend_dev), GST_ERROR_SYSTEM);
@@ -1146,7 +1594,8 @@
   props.num = 1;
   props.props = dvb_prop;
 
-  if (ioctl (object->fd_frontend, FE_GET_PROPERTY, &props) < 0) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_GET_PROPERTY, &props));
+  if (err) {
     GST_ELEMENT_ERROR (object, RESOURCE, SETTINGS,
         (_("Cannot enumerate delivery systems from frontend device \"%s\"."),
             frontend_dev), GST_ERROR_SYSTEM);
@@ -1291,6 +1740,7 @@
 gst_dvbsrc_open_dvr (GstDvbSrc * object)
 {
   gchar *dvr_dev;
+  gint err;
 
   dvr_dev = g_strdup_printf ("/dev/dvb/adapter%d/dvr%d",
       object->adapter_number, object->frontend_number);
@@ -1316,7 +1766,9 @@
 
   GST_INFO_OBJECT (object, "Setting DVB kernel buffer size to %d ",
       object->dvb_buffer_size);
-  if (ioctl (object->fd_dvr, DMX_SET_BUFFER_SIZE, object->dvb_buffer_size) < 0) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_dvr, DMX_SET_BUFFER_SIZE,
+          object->dvb_buffer_size));
+  if (err) {
     GST_INFO_OBJECT (object, "ioctl DMX_SET_BUFFER_SIZE failed (%d)", errno);
     return FALSE;
   }
@@ -1390,7 +1842,7 @@
         continue;
       else
         goto select_error;
-    } else if (G_UNLIKELY (ret_val == 0)) {
+    } else if (G_UNLIKELY (!ret_val)) {
       /* timeout, post element message */
       gst_element_post_message (GST_ELEMENT_CAST (object),
           gst_message_new_element (GST_OBJECT (object),
@@ -1455,7 +1907,7 @@
     GST_DEBUG_OBJECT (object, "Reading from DVR device");
     retval = gst_dvbsrc_read_device (object, buffer_size, buf);
 
-    if (object->stats_interval != 0 &&
+    if (object->stats_interval &&
         ++object->stats_counter == object->stats_interval) {
       gst_dvbsrc_output_frontend_stats (object);
       object->stats_counter = 0;
@@ -1568,36 +2020,80 @@
 }
 
 static gboolean
+gst_dvbsrc_is_valid_modulation (guint delsys, guint mod)
+{
+  /* FIXME: check valid modulations for other broadcast standards */
+  switch (delsys) {
+    case SYS_ISDBT:
+      if (mod == QAM_AUTO || mod == QPSK || mod == QAM_16 ||
+          mod == QAM_64 || mod == DQPSK)
+        return TRUE;
+      break;
+    default:
+      GST_FIXME ("No delsys/modulation sanity checks implemented for this "
+          "delivery system");
+      return TRUE;
+  }
+  return FALSE;
+}
+
+static gboolean
 gst_dvbsrc_get_size (GstBaseSrc * src, guint64 * size)
 {
   return FALSE;
 }
 
 static void
+gst_dvbsrc_do_tune (GstDvbSrc * src)
+{
+  /* if we are in paused/playing state tune now, otherwise in ready
+   * to paused state change */
+  if (GST_STATE (src) > GST_STATE_READY)
+    gst_dvbsrc_tune (src);
+}
+
+static void
 gst_dvbsrc_output_frontend_stats (GstDvbSrc * src)
 {
   fe_status_t status;
   uint16_t snr, _signal;
-  uint32_t ber, uncorrected_blocks;
+  uint32_t ber, bad_blks;
   GstMessage *message;
   GstStructure *structure;
   int fe_fd = src->fd_frontend;
+  gint err;
 
-  if (ioctl (fe_fd, FE_READ_STATUS, &status) ||
-      ioctl (fe_fd, FE_READ_SIGNAL_STRENGTH, &_signal) ||
-      ioctl (fe_fd, FE_READ_SNR, &snr) ||
-      ioctl (fe_fd, FE_READ_BER, &ber) ||
-      ioctl (fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks)) {
-    GST_WARNING_OBJECT (src, "Failed to get statistics from the device");
-    return;
-  }
+  LOOP_WHILE_EINTR (err, ioctl (fe_fd, FE_READ_STATUS, &status));
+  if (err)
+    goto error_out;
+
+  LOOP_WHILE_EINTR (err, ioctl (fe_fd, FE_READ_SIGNAL_STRENGTH, &_signal));
+  if (err)
+    goto error_out;
+
+  LOOP_WHILE_EINTR (err, ioctl (fe_fd, FE_READ_SNR, &snr));
+  if (err)
+    goto error_out;
+
+  LOOP_WHILE_EINTR (err, ioctl (fe_fd, FE_READ_BER, &ber));
+  if (err)
+    goto error_out;
+
+  LOOP_WHILE_EINTR (err, ioctl (fe_fd, FE_READ_UNCORRECTED_BLOCKS, &bad_blks));
+  if (err)
+    goto error_out;
 
   structure = gst_structure_new ("dvb-frontend-stats", "status", G_TYPE_INT,
       status, "signal", G_TYPE_INT, _signal, "snr", G_TYPE_INT, snr,
-      "ber", G_TYPE_INT, ber, "unc", G_TYPE_INT, uncorrected_blocks,
+      "ber", G_TYPE_INT, ber, "unc", G_TYPE_INT, bad_blks,
       "lock", G_TYPE_BOOLEAN, status & FE_HAS_LOCK, NULL);
   message = gst_message_new_element (GST_OBJECT (src), structure);
   gst_element_post_message (GST_ELEMENT (src), message);
+  return;
+
+error_out:
+  GST_WARNING_OBJECT (src, "Failed to get statistics from the device: %s",
+      g_strerror (errno));
 }
 
 struct diseqc_cmd
@@ -1610,12 +2106,16 @@
 diseqc_send_msg (int fd, fe_sec_voltage_t v, struct diseqc_cmd *cmd,
     fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
 {
-  if (ioctl (fd, FE_SET_TONE, SEC_TONE_OFF) == -1) {
+  gint err;
+
+  LOOP_WHILE_EINTR (err, ioctl (fd, FE_SET_TONE, SEC_TONE_OFF));
+  if (err) {
     GST_ERROR ("Setting tone to off failed");
     return;
   }
 
-  if (ioctl (fd, FE_SET_VOLTAGE, v) == -1) {
+  LOOP_WHILE_EINTR (err, ioctl (fd, FE_SET_VOLTAGE, v));
+  if (err) {
     GST_ERROR ("Setting voltage failed");
     return;
   }
@@ -1624,7 +2124,9 @@
   GST_LOG ("diseqc: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x", cmd->cmd.msg[0],
       cmd->cmd.msg[1], cmd->cmd.msg[2], cmd->cmd.msg[3], cmd->cmd.msg[4],
       cmd->cmd.msg[5]);
-  if (ioctl (fd, FE_DISEQC_SEND_MASTER_CMD, &cmd->cmd) == -1) {
+
+  LOOP_WHILE_EINTR (err, ioctl (fd, FE_DISEQC_SEND_MASTER_CMD, &cmd->cmd));
+  if (err) {
     GST_ERROR ("Sending DiSEqC command failed");
     return;
   }
@@ -1632,14 +2134,16 @@
   g_usleep (cmd->wait * 1000);
   g_usleep (15 * 1000);
 
-  if (ioctl (fd, FE_DISEQC_SEND_BURST, b) == -1) {
+  LOOP_WHILE_EINTR (err, ioctl (fd, FE_DISEQC_SEND_BURST, b));
+  if (err) {
     GST_ERROR ("Sending burst failed");
     return;
   }
 
   g_usleep (15 * 1000);
 
-  if (ioctl (fd, FE_SET_TONE, t) == -1) {
+  LOOP_WHILE_EINTR (err, ioctl (fd, FE_SET_TONE, t));
+  if (err) {
     GST_ERROR ("Setting tone failed");
     return;
   }
@@ -1690,6 +2194,7 @@
   struct dtv_property dvb_prop[NUM_DTV_PROPS];
   GstClockTimeDiff elapsed_time, timeout_step = 500 * GST_MSECOND;
   GstClockTime start;
+  gint err;
 
   GST_DEBUG_OBJECT (object, "Starting the frontend tuning process");
 
@@ -1704,7 +2209,8 @@
   props.num = 1;
   props.props = dvb_prop;
 
-  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_GET_PROPERTY, &props)) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_GET_PROPERTY, &props));
+  if (err) {
     GST_WARNING_OBJECT (object, "Error enumerating delsys: %s",
         g_strerror (errno));
 
@@ -1722,6 +2228,8 @@
 
   gst_dvbsrc_unset_pes_filters (object);
 
+  g_mutex_lock (&object->tune_mutex);
+
   gst_poll_fd_init (&fe_fd);
   fe_fd.fd = object->fd_frontend;
   poll_set = gst_poll_new (TRUE);
@@ -1736,7 +2244,8 @@
   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)) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_SET_PROPERTY, &props));
+  if (err) {
     GST_WARNING_OBJECT (object, "Error resetting tuner: %s",
         g_strerror (errno));
   }
@@ -1748,7 +2257,9 @@
   }
 
   GST_DEBUG_OBJECT (object, "Setting %d properties", props.num);
-  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_SET_PROPERTY, &props)) {
+
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_SET_PROPERTY, &props));
+  if (err) {
     GST_WARNING_OBJECT (object, "Error tuning channel: %s (%d)",
         g_strerror (errno), errno);
     goto fail;
@@ -1756,7 +2267,8 @@
 
   g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_START], 0);
 
-  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_READ_STATUS, &status)) {
+  LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_READ_STATUS, &status));
+  if (err) {
     GST_WARNING_OBJECT (object, "Failed querying frontend for tuning status:"
         " %s (%d)", g_strerror (errno), errno);
     goto fail_with_signal;
@@ -1769,7 +2281,9 @@
   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)) {
+    LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_READ_STATUS,
+            &status));
+    if (err) {
       GST_WARNING_OBJECT (object, "Failed querying frontend for tuning status"
           " %s (%d)", g_strerror (errno), errno);
       goto fail_with_signal;
@@ -1795,6 +2309,7 @@
   GST_DEBUG_OBJECT (object, "Successfully set frontend tuning params");
 
   gst_poll_free (poll_set);
+  g_mutex_unlock (&object->tune_mutex);
   return TRUE;
 
 fail_with_signal:
@@ -1802,6 +2317,7 @@
 fail:
   GST_WARNING_OBJECT (object, "Could not tune to desired frequency");
   gst_poll_free (poll_set);
+  g_mutex_unlock (&object->tune_mutex);
   return FALSE;
 }
 
@@ -1813,25 +2329,28 @@
   unsigned int sym_rate = object->sym_rate * 1000;
   int inversion = object->inversion;
   int n;
+  gint err;
 
   /* first 3 entries are reserved */
   n = 3;
 
+  /**
+   * We are not dropping out but issuing a warning in case of wrong
+   * parameter combinations as failover behavior should be mandated
+   * by the driver. Worst case scenario it will just fail at tuning.
+   */
+
   switch (object->delsys) {
     case SYS_DVBS:
     case SYS_DVBS2:
     case SYS_TURBO:
       if (freq > 2200000) {
-        /* FIXME: Make SLOF/LOF1/LOF2 seteable props with a sane default.
-         * These values shouldn't be fixed because not all universal LNBs
-         * share the same parameters.
-         *
-         * this must be an absolute frequency */
-        if (freq < SLOF) {
-          freq -= LOF1;
+        /* this must be an absolute frequency */
+        if (freq < object->lnb_slof) {
+          freq -= object->lnb_lof1;
           object->tone = SEC_TONE_OFF;
         } else {
-          freq -= LOF2;
+          freq -= object->lnb_lof2;
           object->tone = SEC_TONE_ON;
         }
       }
@@ -1855,12 +2374,14 @@
 
         /* 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) {
+        LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_SET_TONE,
+                object->tone));
+        if (err) {
           GST_WARNING_OBJECT (object, "Couldn't set tone: %s",
               g_strerror (errno));
         }
       } else {
-        GST_DEBUG_OBJECT (object, "Sending DISEqC");
+        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
@@ -1878,6 +2399,31 @@
       break;
     case SYS_DVBT:
     case SYS_DVBT2:
+      if (object->delsys == SYS_DVBT) {
+        if (object->transmission_mode != TRANSMISSION_MODE_AUTO &&
+            object->transmission_mode != TRANSMISSION_MODE_2K &&
+            object->transmission_mode != TRANSMISSION_MODE_8K) {
+          GST_WARNING_OBJECT (object, "Wrong DVB-T parameter combination: "
+              "transmission mode should be either AUTO, 2K or 8K");
+        }
+        if (object->bandwidth != 6000000 && object->bandwidth != 7000000 &&
+            object->bandwidth != 8000000) {
+          GST_WARNING_OBJECT (object, "Wrong DVB-T parameter value: bandwidth "
+              "is %d but only 6, 7 and 8 MHz are allowed", object->bandwidth);
+        }
+      } else if (object->delsys == SYS_DVBT2) {
+        if (object->transmission_mode != TRANSMISSION_MODE_AUTO &&
+            object->transmission_mode != TRANSMISSION_MODE_1K &&
+            object->transmission_mode != TRANSMISSION_MODE_2K &&
+            object->transmission_mode != TRANSMISSION_MODE_4K &&
+            object->transmission_mode != TRANSMISSION_MODE_8K &&
+            object->transmission_mode != TRANSMISSION_MODE_16K &&
+            object->transmission_mode != TRANSMISSION_MODE_32K) {
+          GST_WARNING_OBJECT (object, "Wrong DVB-T2 parameter combination: "
+              "transmission mode should be either AUTO, 1K, 2K, 4K, 8K, 16K "
+              "or 32K");
+        }
+      }
       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);
@@ -1911,11 +2457,102 @@
 
       set_prop (props->props, &n, DTV_MODULATION, object->modulation);
       break;
+    case SYS_ISDBT:
+
+      if (object->isdbt_partial_reception == 1 &&
+          object->isdbt_layera_segment_count != 1) {
+        GST_WARNING_OBJECT (object, "Wrong ISDB-T parameter combination: "
+            "partial reception is set but layer A segment count is not 1");
+      }
+
+      if (!object->isdbt_sound_broadcasting) {
+        GST_INFO_OBJECT (object, "ISDB-T sound broadcasting is not set. "
+            "Driver will likely ignore values set for isdbt-sb-subchannel-id, "
+            "isdbt-sb-segment-idx and isdbt-sb-segment-count");
+      }
+
+      if (object->isdbt_layerc_modulation == DQPSK &&
+          object->isdbt_layerb_modulation != DQPSK) {
+        GST_WARNING_OBJECT (object, "Wrong ISDB-T parameter combination: "
+            "layer C modulation is DQPSK but layer B modulation is different");
+      }
+
+      if (object->bandwidth != 6000000) {
+        GST_WARNING_OBJECT (object, "Wrong ISDB-T parameter value: bandwidth "
+            "is %d but only 6 MHz is allowed", object->bandwidth);
+      }
+
+      GST_INFO_OBJECT (object, "Tuning ISDB-T to %d", freq);
+      set_prop (props->props, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
+      set_prop (props->props, &n, DTV_GUARD_INTERVAL, object->guard_interval);
+      set_prop (props->props, &n, DTV_TRANSMISSION_MODE,
+          object->transmission_mode);
+      set_prop (props->props, &n, DTV_ISDBT_LAYER_ENABLED,
+          object->isdbt_layer_enabled);
+      set_prop (props->props, &n, DTV_ISDBT_PARTIAL_RECEPTION,
+          object->isdbt_partial_reception);
+      set_prop (props->props, &n, DTV_ISDBT_SOUND_BROADCASTING,
+          object->isdbt_sound_broadcasting);
+      set_prop (props->props, &n, DTV_ISDBT_SB_SUBCHANNEL_ID,
+          object->isdbt_sb_subchannel_id);
+      set_prop (props->props, &n, DTV_ISDBT_SB_SEGMENT_IDX,
+          object->isdbt_sb_segment_idx);
+      set_prop (props->props, &n, DTV_ISDBT_SB_SEGMENT_COUNT,
+          object->isdbt_sb_segment_count);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERA_FEC,
+          object->isdbt_layera_fec);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERA_MODULATION,
+          object->isdbt_layera_modulation);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERA_SEGMENT_COUNT,
+          object->isdbt_layera_segment_count);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERA_TIME_INTERLEAVING,
+          object->isdbt_layera_time_interleaving);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERB_FEC,
+          object->isdbt_layerb_fec);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERB_MODULATION,
+          object->isdbt_layerb_modulation);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERB_SEGMENT_COUNT,
+          object->isdbt_layerb_segment_count);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERB_TIME_INTERLEAVING,
+          object->isdbt_layerb_time_interleaving);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERC_FEC,
+          object->isdbt_layerc_fec);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERC_MODULATION,
+          object->isdbt_layerc_modulation);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERC_SEGMENT_COUNT,
+          object->isdbt_layerc_segment_count);
+      set_prop (props->props, &n, DTV_ISDBT_LAYERC_TIME_INTERLEAVING,
+          object->isdbt_layerc_time_interleaving);
+      break;
+#if HAVE_V5_MINOR(7)
+    case SYS_DTMB:
+      set_prop (props->props, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
+      set_prop (props->props, &n, DTV_MODULATION, object->modulation);
+      set_prop (props->props, &n, DTV_INVERSION, object->inversion);
+      set_prop (props->props, &n, DTV_INNER_FEC, object->code_rate_hp);
+      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_INTERLEAVING, object->interleaving);
+      /* FIXME: Make the LNA on/off switch a property and proxy on dvbbasebin */
+      /* FIXME: According to v4l advice (see libdvbv5 implementation) this
+       * property should be set separately as not all drivers will ignore it
+       * if unsupported. An alternative would be to get the dvb API contract
+       * revised on this regard */
+      set_prop (props->props, &n, DTV_LNA, LNA_AUTO);
+      GST_INFO_OBJECT (object, "Tuning DTMB to %d Hz", freq);
+      break;
+#endif
     default:
       GST_ERROR_OBJECT (object, "Unknown frontend type %u", object->delsys);
       return FALSE;
   }
 
+  if (!gst_dvbsrc_is_valid_modulation (object->delsys, object->modulation)) {
+    GST_WARNING_OBJECT (object,
+        "Attempting an invalid modulation/delsys combination");
+  }
+
   set_prop (props->props, &n, DTV_TUNE, 0);
   props->num = n;
   /* set first three entries */
@@ -1969,6 +2606,7 @@
   int *fd;
   int pid, i;
   struct dmx_pes_filter_params pes_filter;
+  gint err;
   gchar *demux_dev = g_strdup_printf ("/dev/dvb/adapter%d/demux%d",
       object->adapter_number, object->frontend_number);
 
@@ -1999,7 +2637,8 @@
     GST_INFO_OBJECT (object, "Setting pes-filter, pid = %d, type = %d",
         pes_filter.pid, pes_filter.pes_type);
 
-    if (ioctl (*fd, DMX_SET_PES_FILTER, &pes_filter) < 0)
+    LOOP_WHILE_EINTR (err, ioctl (*fd, DMX_SET_PES_FILTER, &pes_filter));
+    if (err)
       GST_WARNING_OBJECT (object, "Error setting PES filter on %s: %s",
           demux_dev, g_strerror (errno));
   }
diff --git a/sys/dvb/gstdvbsrc.h b/sys/dvb/gstdvbsrc.h
index b9d07d7..27a27b7 100644
--- a/sys/dvb/gstdvbsrc.h
+++ b/sys/dvb/gstdvbsrc.h
@@ -60,7 +60,6 @@
 struct _GstDvbSrc
 {
   GstPushSrc element;
-  GstPad *srcpad;
 
   GMutex tune_mutex;
   gboolean need_tune;
@@ -104,6 +103,33 @@
   gboolean need_unlock;
 
   guint dvb_buffer_size;
+
+  unsigned int isdbt_layer_enabled;
+  int isdbt_partial_reception;
+  int isdbt_sound_broadcasting;
+  int isdbt_sb_subchannel_id;
+  int isdbt_sb_segment_idx;
+  unsigned int isdbt_sb_segment_count;
+  int isdbt_layera_fec;
+  int isdbt_layera_modulation;
+  int isdbt_layera_segment_count;
+  int isdbt_layera_time_interleaving;
+  int isdbt_layerb_fec;
+  int isdbt_layerb_modulation;
+  int isdbt_layerb_segment_count;
+  int isdbt_layerb_time_interleaving;
+  int isdbt_layerc_fec;
+  int isdbt_layerc_modulation;
+  int isdbt_layerc_segment_count;
+  int isdbt_layerc_time_interleaving;
+
+  /* LNB properties */
+  unsigned int lnb_slof;
+  unsigned int lnb_lof1;
+  unsigned int lnb_lof2;
+
+  /* Only used for DTMB if available */
+  int interleaving;
 };
 
 struct _GstDvbSrcClass
@@ -112,6 +138,8 @@
 
   void (*adapter_type) (GstElement * element, gint type);
   void (*signal_quality) (GstElement * element, gint strength, gint snr);
+
+  void (*do_tune) (GstDvbSrc * self);
 };
 
 
diff --git a/sys/dvb/parsechannels.c b/sys/dvb/parsechannels.c
index 0b1d506..9c46ddb 100644
--- a/sys/dvb/parsechannels.c
+++ b/sys/dvb/parsechannels.c
@@ -96,8 +96,17 @@
           g_hash_table_insert (params, g_strdup (satellite[j - 2]),
               g_strdup (fields[j]));
         }
-        g_hash_table_insert (params, g_strdup ("frequency"),
-            g_strdup_printf ("%d", atoi (fields[1]) * 1000));
+        /**
+         * Some ZAP format variations store freqs in MHz
+         * but we internally use kHz for DVB-S/S2.
+         */
+        if (strlen (fields[1]) < 6) {
+          g_hash_table_insert (params, g_strdup ("frequency"),
+              g_strdup_printf ("%d", atoi (fields[1]) * 1000));
+        } else {
+          g_hash_table_insert (params, g_strdup ("frequency"),
+              g_strdup_printf ("%d", atoi (fields[1])));
+        }
         parsed = TRUE;
       } else if (numfields == 13) {
         /* terrestrial */
diff --git a/sys/fbdev/Makefile.in b/sys/fbdev/Makefile.in
index dcb0153..1e807b7 100644
--- a/sys/fbdev/Makefile.in
+++ b/sys/fbdev/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/fbdev
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +790,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/fbdev/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/fbdev/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1064,6 +1098,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/linsys/Makefile.in b/sys/linsys/Makefile.in
index 43f0c15..72ba03a 100644
--- a/sys/linsys/Makefile.in
+++ b/sys/linsys/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/linsys
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -767,7 +802,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/linsys/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/linsys/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1092,6 +1126,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/linsys/gstlinsyssdisink.c b/sys/linsys/gstlinsyssdisink.c
index 93c557a..b093bb5 100644
--- a/sys/linsys/gstlinsyssdisink.c
+++ b/sys/linsys/gstlinsyssdisink.c
@@ -318,7 +318,7 @@
 static int
 get_av (int f, int v, int h)
 {
-  static int table[] = {
+  static const int table[] = {
     0x80, 0x9d, 0xab, 0xb6, 0xc7, 0xda, 0xec, 0xf1
   };
 
diff --git a/sys/opensles/Makefile.am b/sys/opensles/Makefile.am
index c0ef4ec..6236833 100644
--- a/sys/opensles/Makefile.am
+++ b/sys/opensles/Makefile.am
@@ -1,7 +1,8 @@
 
 plugin_LTLIBRARIES = libgstopensles.la
 
-libgstopensles_la_SOURCES = openslesringbuffer.c \
+libgstopensles_la_SOURCES = openslescommon.c     \
+                            openslesringbuffer.c \
                             openslessink.c       \
                             openslessrc.c        \
                             opensles.c
@@ -16,7 +17,8 @@
 libgstopensles_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lOpenSLES
 libgstopensles_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
-noinst_HEADERS = openslesringbuffer.h \
+noinst_HEADERS = openslescommon.h     \
+                 openslesringbuffer.h \
                  openslessink.h       \
                  openslessrc.h
 
diff --git a/sys/opensles/Makefile.in b/sys/opensles/Makefile.in
index 304addd..92497d6 100644
--- a/sys/opensles/Makefile.in
+++ b/sys/opensles/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/opensles
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -156,7 +166,7 @@
 am__DEPENDENCIES_1 =
 libgstopensles_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_libgstopensles_la_OBJECTS =  \
+am_libgstopensles_la_OBJECTS = libgstopensles_la-openslescommon.lo \
 	libgstopensles_la-openslesringbuffer.lo \
 	libgstopensles_la-openslessink.lo \
 	libgstopensles_la-openslessrc.lo libgstopensles_la-opensles.lo
@@ -230,6 +240,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -247,8 +258,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -273,8 +286,6 @@
 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@
@@ -287,7 +298,6 @@
 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@
@@ -295,6 +305,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -321,11 +333,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -344,8 +359,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -404,10 +417,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -424,7 +441,6 @@
 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@
@@ -433,7 +449,6 @@
 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@
@@ -446,7 +461,6 @@
 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@
@@ -460,6 +474,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -471,6 +486,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -509,6 +526,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -544,10 +562,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -573,6 +595,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -580,7 +605,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -609,6 +641,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -619,6 +652,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -649,17 +683,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -676,6 +709,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -714,6 +748,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -728,7 +763,8 @@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopensles.la
-libgstopensles_la_SOURCES = openslesringbuffer.c \
+libgstopensles_la_SOURCES = openslescommon.c     \
+                            openslesringbuffer.c \
                             openslessink.c       \
                             openslessrc.c        \
                             opensles.c
@@ -744,7 +780,8 @@
 
 libgstopensles_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lOpenSLES
 libgstopensles_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = openslesringbuffer.h \
+noinst_HEADERS = openslescommon.h     \
+                 openslesringbuffer.h \
                  openslessink.h       \
                  openslessrc.h
 
@@ -764,7 +801,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/opensles/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/opensles/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -828,6 +864,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopensles_la-opensles.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopensles_la-openslescommon.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopensles_la-openslesringbuffer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopensles_la-openslessink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopensles_la-openslessrc.Plo@am__quote@
@@ -856,6 +893,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
+libgstopensles_la-openslescommon.lo: openslescommon.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopensles_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopensles_la_CFLAGS) $(CFLAGS) -MT libgstopensles_la-openslescommon.lo -MD -MP -MF $(DEPDIR)/libgstopensles_la-openslescommon.Tpo -c -o libgstopensles_la-openslescommon.lo `test -f 'openslescommon.c' || echo '$(srcdir)/'`openslescommon.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopensles_la-openslescommon.Tpo $(DEPDIR)/libgstopensles_la-openslescommon.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openslescommon.c' object='libgstopensles_la-openslescommon.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 $(libgstopensles_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopensles_la_CFLAGS) $(CFLAGS) -c -o libgstopensles_la-openslescommon.lo `test -f 'openslescommon.c' || echo '$(srcdir)/'`openslescommon.c
+
 libgstopensles_la-openslesringbuffer.lo: openslesringbuffer.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopensles_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopensles_la_CFLAGS) $(CFLAGS) -MT libgstopensles_la-openslesringbuffer.lo -MD -MP -MF $(DEPDIR)/libgstopensles_la-openslesringbuffer.Tpo -c -o libgstopensles_la-openslesringbuffer.lo `test -f 'openslesringbuffer.c' || echo '$(srcdir)/'`openslesringbuffer.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopensles_la-openslesringbuffer.Tpo $(DEPDIR)/libgstopensles_la-openslesringbuffer.Plo
@@ -1097,6 +1141,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/opensles/openslescommon.c b/sys/opensles/openslescommon.c
new file mode 100644
index 0000000..7dc4bb8
--- /dev/null
+++ b/sys/opensles/openslescommon.c
@@ -0,0 +1,143 @@
+/* GStreamer
+ * Copyright (C) 2015 Centricular Ltd.,
+ *                    Arun Raghavan <mail@arunraghavan.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "openslescommon.h"
+
+#ifndef SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION
+/* This was added in Android API level 14 */
+#define SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION ((SLuint32) 0x00000004)
+#endif
+
+GType
+gst_opensles_recording_preset_get_type (void)
+{
+  static const GEnumValue values[] = {
+    {GST_OPENSLES_RECORDING_PRESET_NONE,
+        "GST_OPENSLES_RECORDING_PRESET_NONE", "none"},
+    {GST_OPENSLES_RECORDING_PRESET_GENERIC,
+        "GST_OPENSLES_RECORDING_PRESET_GENERIC", "generic"},
+    {GST_OPENSLES_RECORDING_PRESET_CAMCORDER,
+        "GST_OPENSLES_RECORDING_PRESET_CAMCORDER", "camcorder"},
+    {GST_OPENSLES_RECORDING_PRESET_VOICE_RECOGNITION,
+        "GST_OPENSLES_RECORDING_PRESET_VOICE_RECOGNITION", "voice-recognition"},
+    {GST_OPENSLES_RECORDING_PRESET_VOICE_COMMUNICATION,
+          "GST_OPENSLES_RECORDING_PRESET_VOICE_COMMUNICATION",
+        "voice-communication"},
+    {0, NULL, NULL}
+  };
+  static volatile GType id = 0;
+
+  if (g_once_init_enter ((gsize *) & id)) {
+    GType _id;
+
+    _id = g_enum_register_static ("GstOpenSLESRecordingPreset", values);
+
+    g_once_init_leave ((gsize *) & id, _id);
+  }
+
+  return id;
+}
+
+SLint32
+gst_to_opensles_recording_preset (GstOpenSLESRecordingPreset preset)
+{
+  switch (preset) {
+    case GST_OPENSLES_RECORDING_PRESET_NONE:
+      return SL_ANDROID_RECORDING_PRESET_NONE;
+
+    case GST_OPENSLES_RECORDING_PRESET_GENERIC:
+      return SL_ANDROID_RECORDING_PRESET_GENERIC;
+
+    case GST_OPENSLES_RECORDING_PRESET_CAMCORDER:
+      return SL_ANDROID_RECORDING_PRESET_CAMCORDER;
+
+    case GST_OPENSLES_RECORDING_PRESET_VOICE_RECOGNITION:
+      return SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION;
+
+    case GST_OPENSLES_RECORDING_PRESET_VOICE_COMMUNICATION:
+      return SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION;
+
+    default:
+      GST_ERROR ("Unsupported preset: %d", (int) preset);
+      return SL_ANDROID_RECORDING_PRESET_NONE;
+  }
+}
+
+GType
+gst_opensles_stream_type_get_type (void)
+{
+  static const GEnumValue values[] = {
+    {GST_OPENSLES_STREAM_TYPE_VOICE,
+        "GST_OPENSLES_STREAM_TYPE_VOICE", "voice"},
+    {GST_OPENSLES_STREAM_TYPE_SYSTEM,
+        "GST_OPENSLES_STREAM_TYPE_SYSTEM", "system"},
+    {GST_OPENSLES_STREAM_TYPE_RING,
+        "GST_OPENSLES_STREAM_TYPE_RING", "ring"},
+    {GST_OPENSLES_STREAM_TYPE_MEDIA,
+        "GST_OPENSLES_STREAM_TYPE_MEDIA", "media"},
+    {GST_OPENSLES_STREAM_TYPE_ALARM,
+        "GST_OPENSLES_STREAM_TYPE_ALARM", "alarm"},
+    {GST_OPENSLES_STREAM_TYPE_NOTIFICATION,
+        "GST_OPENSLES_STREAM_TYPE_NOTIFICATION", "notification"},
+    {GST_OPENSLES_STREAM_TYPE_NONE,
+        "GST_OPENSLES_STREAM_TYPE_NONE", "none"},
+    {0, NULL, NULL}
+  };
+  static volatile GType id = 0;
+
+  if (g_once_init_enter ((gsize *) & id)) {
+    GType _id;
+
+    _id = g_enum_register_static ("GstOpenSLESStreamType", values);
+
+    g_once_init_leave ((gsize *) & id, _id);
+  }
+
+  return id;
+}
+
+
+SLint32
+gst_to_opensles_stream_type (GstOpenSLESStreamType stream_type)
+{
+  switch (stream_type) {
+    case GST_OPENSLES_STREAM_TYPE_VOICE:
+      return SL_ANDROID_STREAM_VOICE;
+
+    case GST_OPENSLES_STREAM_TYPE_SYSTEM:
+      return SL_ANDROID_STREAM_SYSTEM;
+
+    case GST_OPENSLES_STREAM_TYPE_RING:
+      return SL_ANDROID_STREAM_RING;
+
+    case GST_OPENSLES_STREAM_TYPE_MEDIA:
+      return SL_ANDROID_STREAM_MEDIA;
+
+    case GST_OPENSLES_STREAM_TYPE_ALARM:
+      return SL_ANDROID_STREAM_ALARM;
+
+    case GST_OPENSLES_STREAM_TYPE_NOTIFICATION:
+      return SL_ANDROID_STREAM_NOTIFICATION;
+
+    default:
+      GST_ERROR ("Unsupported stream type: %d", (int) stream_type);
+      return SL_ANDROID_STREAM_MEDIA;
+  }
+}
diff --git a/sys/opensles/openslescommon.h b/sys/opensles/openslescommon.h
new file mode 100644
index 0000000..2b619eb
--- /dev/null
+++ b/sys/opensles/openslescommon.h
@@ -0,0 +1,67 @@
+/* GStreamer
+ * Copyright (C) 2015 Centricular Ltd.
+ * Author: Arun Raghavan <arun@centricular.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 __OPENSLESCOMMON_H__
+#define __OPENSLESCOMMON_H__
+
+#include <gst/gst.h>
+
+#include <SLES/OpenSLES.h>
+#include <SLES/OpenSLES_Android.h>
+/* This is needed explicitly for API level < 14 */
+#include <SLES/OpenSLES_AndroidConfiguration.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+  GST_OPENSLES_RECORDING_PRESET_NONE,
+  GST_OPENSLES_RECORDING_PRESET_GENERIC,
+  GST_OPENSLES_RECORDING_PRESET_CAMCORDER,
+  GST_OPENSLES_RECORDING_PRESET_VOICE_RECOGNITION,
+  GST_OPENSLES_RECORDING_PRESET_VOICE_COMMUNICATION,
+} GstOpenSLESRecordingPreset;
+
+#define GST_TYPE_OPENSLES_RECORDING_PRESET \
+  (gst_opensles_recording_preset_get_type())
+
+GType gst_opensles_recording_preset_get_type (void);
+
+SLint32 gst_to_opensles_recording_preset (GstOpenSLESRecordingPreset preset);
+
+typedef enum {
+  GST_OPENSLES_STREAM_TYPE_VOICE,
+  GST_OPENSLES_STREAM_TYPE_SYSTEM,
+  GST_OPENSLES_STREAM_TYPE_RING,
+  GST_OPENSLES_STREAM_TYPE_MEDIA,
+  GST_OPENSLES_STREAM_TYPE_ALARM,
+  GST_OPENSLES_STREAM_TYPE_NOTIFICATION,
+  GST_OPENSLES_STREAM_TYPE_NONE = -1, /* If we don't want to set a type */
+} GstOpenSLESStreamType;
+
+#define GST_TYPE_OPENSLES_STREAM_TYPE \
+  (gst_opensles_stream_type_get_type())
+
+GType gst_opensles_stream_type_get_type (void);
+
+SLint32 gst_to_opensles_stream_type (GstOpenSLESStreamType stream_type);
+
+G_END_DECLS
+
+#endif /* __OPENSLESCOMMON_H__ */
diff --git a/sys/opensles/openslesringbuffer.c b/sys/opensles/openslesringbuffer.c
index 56fdccf..085baa5 100644
--- a/sys/opensles/openslesringbuffer.c
+++ b/sys/opensles/openslesringbuffer.c
@@ -114,6 +114,7 @@
   GstOpenSLESRingBuffer *thiz = GST_OPENSLES_RING_BUFFER_CAST (rb);
   SLresult result;
   SLDataFormat_PCM format;
+  SLAndroidConfigurationItf config;
 
   /* Configure audio source */
   SLDataLocator_IODevice loc_dev = {
@@ -129,21 +130,44 @@
   SLDataSink audioSink = { &loc_bq, &format };
 
   /* Required optional interfaces */
-  const SLInterfaceID id[1] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE };
-  const SLboolean req[1] = { SL_BOOLEAN_TRUE };
+  const SLInterfaceID ids[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
+    SL_IID_ANDROIDCONFIGURATION
+  };
+  const SLboolean req[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_FALSE };
 
   /* Define the audio format in OpenSL ES terminology */
   _opensles_format (spec, &format);
 
   /* Create the audio recorder object (requires the RECORD_AUDIO permission) */
   result = (*thiz->engineEngine)->CreateAudioRecorder (thiz->engineEngine,
-      &thiz->recorderObject, &audioSrc, &audioSink, 1, id, req);
+      &thiz->recorderObject, &audioSrc, &audioSink, 2, ids, req);
   if (result != SL_RESULT_SUCCESS) {
     GST_ERROR_OBJECT (thiz, "engine.CreateAudioRecorder failed(0x%08x)",
         (guint32) result);
     goto failed;
   }
 
+  /* Set the recording preset if we have one */
+  if (thiz->preset != GST_OPENSLES_RECORDING_PRESET_NONE) {
+    SLint32 preset = gst_to_opensles_recording_preset (thiz->preset);
+
+    result = (*thiz->recorderObject)->GetInterface (thiz->recorderObject,
+        SL_IID_ANDROIDCONFIGURATION, &config);
+
+    if (result == SL_RESULT_SUCCESS) {
+      result = (*config)->SetConfiguration (config,
+          SL_ANDROID_KEY_RECORDING_PRESET, &preset, sizeof (preset));
+
+      if (result != SL_RESULT_SUCCESS) {
+        GST_WARNING_OBJECT (thiz, "Failed to set playback stream type (0x%08x)",
+            (guint32) result);
+      }
+    } else {
+      GST_WARNING_OBJECT (thiz,
+          "Could not get configuration interface 0x%08x", (guint32) result);
+    }
+  }
+
   /* Realize the audio recorder object */
   result =
       (*thiz->recorderObject)->Realize (thiz->recorderObject, SL_BOOLEAN_FALSE);
@@ -354,11 +378,18 @@
   GstOpenSLESRingBuffer *thiz = GST_OPENSLES_RING_BUFFER_CAST (rb);
   SLresult result;
   SLDataFormat_PCM format;
+  SLAndroidConfigurationItf config;
 
-  /* Configure audio source */
+  /* Configure audio source
+   * 4 buffers is the "typical" size as optimized inside Android's
+   * OpenSL ES, see frameworks/wilhelm/src/itfstruct.h BUFFER_HEADER_TYPICAL
+   *
+   * Also only use half of our segment size to make sure that there's always
+   * some more queued up in our ringbuffer and we don't start to read silence.
+   */
   SLDataLocator_AndroidSimpleBufferQueue loc_bufq = {
-    SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE,
-    MIN (32, (spec->segtotal >> 1))
+    SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, MIN (4, MAX (spec->segtotal >> 1,
+            1))
   };
   SLDataSource audioSrc = { &loc_bufq, &format };
 
@@ -369,21 +400,46 @@
   SLDataSink audioSink = { &loc_outmix, NULL };
 
   /* Define the required interfaces */
-  const SLInterfaceID ids[2] = { SL_IID_BUFFERQUEUE, SL_IID_VOLUME };
-  const SLboolean req[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
+  const SLInterfaceID ids[3] = { SL_IID_BUFFERQUEUE, SL_IID_VOLUME,
+    SL_IID_ANDROIDCONFIGURATION
+  };
+  const SLboolean req[3] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE,
+    SL_BOOLEAN_FALSE
+  };
 
   /* Define the format in OpenSL ES terminology */
   _opensles_format (spec, &format);
 
   /* Create the player object */
   result = (*thiz->engineEngine)->CreateAudioPlayer (thiz->engineEngine,
-      &thiz->playerObject, &audioSrc, &audioSink, 2, ids, req);
+      &thiz->playerObject, &audioSrc, &audioSink, 3, ids, req);
   if (result != SL_RESULT_SUCCESS) {
     GST_ERROR_OBJECT (thiz, "engine.CreateAudioPlayer failed(0x%08x)",
         (guint32) result);
     goto failed;
   }
 
+  /* Set the stream type if we have one */
+  if (thiz->stream_type != GST_OPENSLES_STREAM_TYPE_NONE) {
+    SLint32 stream_type = gst_to_opensles_stream_type (thiz->stream_type);
+
+    result = (*thiz->playerObject)->GetInterface (thiz->playerObject,
+        SL_IID_ANDROIDCONFIGURATION, &config);
+
+    if (result == SL_RESULT_SUCCESS) {
+      result = (*config)->SetConfiguration (config,
+          SL_ANDROID_KEY_STREAM_TYPE, &stream_type, sizeof (stream_type));
+
+      if (result != SL_RESULT_SUCCESS) {
+        GST_WARNING_OBJECT (thiz, "Failed to set playback stream type (0x%08x)",
+            (guint32) result);
+      }
+    } else {
+      GST_WARNING_OBJECT (thiz,
+          "Could not get configuration interface 0x%08x", (guint32) result);
+    }
+  }
+
   /* Realize the player object */
   result =
       (*thiz->playerObject)->Realize (thiz->playerObject, SL_BOOLEAN_FALSE);
@@ -518,7 +574,6 @@
 {
   GstOpenSLESRingBuffer *thiz = GST_OPENSLES_RING_BUFFER_CAST (rb);
   SLresult result;
-  gint i;
 
   /* Register callback on the buffer queue */
   if (!thiz->is_queue_callback_registered) {
@@ -532,11 +587,9 @@
     thiz->is_queue_callback_registered = TRUE;
   }
 
-  /* Fill the queue by enqueing buffers */
+  /* Fill the queue by enqueing a buffer */
   if (!g_atomic_int_get (&thiz->is_prerolled)) {
-    for (i = 0; i < thiz->data_segtotal; i++) {
-      _opensles_player_cb (NULL, rb);
-    }
+    _opensles_player_cb (NULL, rb);
     g_atomic_int_set (&thiz->is_prerolled, 1);
   }
 
diff --git a/sys/opensles/openslesringbuffer.h b/sys/opensles/openslesringbuffer.h
index d821e06..2b90d36 100644
--- a/sys/opensles/openslesringbuffer.h
+++ b/sys/opensles/openslesringbuffer.h
@@ -22,6 +22,7 @@
 
 #include <gst/gst.h>
 #include <gst/audio/audio.h>
+#include "openslescommon.h"
 
 #include <SLES/OpenSLES.h>
 #include <SLES/OpenSLES_Android.h>
@@ -80,10 +81,12 @@
   gfloat volume;
   gboolean mute;
   gint is_prerolled; /* ATOMIC */
+  GstOpenSLESStreamType stream_type;
 
   /* recorder interfaces */
   SLObjectItf recorderObject;
   SLRecordItf recorderRecord;
+  GstOpenSLESRecordingPreset preset;
 
   /* buffer queue */
   SLAndroidSimpleBufferQueueItf bufferQueue;
diff --git a/sys/opensles/openslessink.c b/sys/opensles/openslessink.c
index f511de4..ce93d25 100644
--- a/sys/opensles/openslessink.c
+++ b/sys/opensles/openslessink.c
@@ -47,12 +47,15 @@
   PROP_0,
   PROP_VOLUME,
   PROP_MUTE,
+  PROP_STREAM_TYPE,
   PROP_LAST
 };
 
 #define DEFAULT_VOLUME 1.0
 #define DEFAULT_MUTE   FALSE
 
+#define DEFAULT_STREAM_TYPE GST_OPENSLES_STREAM_TYPE_NONE
+
 
 /* According to Android's NDK doc the following are the supported rates */
 #define RATES "8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100"
@@ -65,12 +68,13 @@
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) { " GST_AUDIO_NE (S16) ", " GST_AUDIO_NE (U8) "}, "
-        "rate = (int) { " RATES "}, " "channels = (int) [1, 2]")
+        "rate = (int) { " RATES "}, " "channels = (int) [1, 2], "
+        "layout = (string) interleaved")
     );
 
 #define _do_init \
-  GST_DEBUG_CATEGORY_INIT (opensles_sink_debug, "opensles_sink", 0, \
-      "OpenSL ES Sink");
+  GST_DEBUG_CATEGORY_INIT (opensles_sink_debug, "openslessink", 0, \
+      "OpenSLES Sink");
 #define parent_class gst_opensles_sink_parent_class
 G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSink, gst_opensles_sink,
     GST_TYPE_AUDIO_BASE_SINK, _do_init);
@@ -84,6 +88,9 @@
   rb = gst_opensles_ringbuffer_new (RB_MODE_SINK_PCM);
   gst_opensles_ringbuffer_set_volume (rb, sink->volume);
   gst_opensles_ringbuffer_set_mute (rb, sink->mute);
+
+  GST_OPENSLES_RING_BUFFER (rb)->stream_type = sink->stream_type;
+
   return rb;
 }
 
@@ -207,6 +214,9 @@
         gst_opensles_ringbuffer_set_mute (rb, sink->mute);
       }
       break;
+    case PROP_STREAM_TYPE:
+      sink->stream_type = g_value_get_enum (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -225,6 +235,9 @@
     case PROP_MUTE:
       g_value_set_boolean (value, sink->mute);
       break;
+    case PROP_STREAM_TYPE:
+      g_value_set_enum (value, sink->stream_type);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -253,6 +266,12 @@
       g_param_spec_boolean ("mute", "Mute", "Mute state of this stream",
           DEFAULT_MUTE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_STREAM_TYPE,
+      g_param_spec_enum ("stream-type", "Stream type",
+          "Stream type that this stream should be tagged with",
+          GST_TYPE_OPENSLES_STREAM_TYPE, DEFAULT_STREAM_TYPE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&sink_factory));
 
@@ -268,6 +287,7 @@
 static void
 gst_opensles_sink_init (GstOpenSLESSink * sink)
 {
+  sink->stream_type = DEFAULT_STREAM_TYPE;
   sink->volume = DEFAULT_VOLUME;
   sink->mute = DEFAULT_MUTE;
 
@@ -276,6 +296,6 @@
   gst_audio_base_sink_set_provide_clock (GST_AUDIO_BASE_SINK (sink), TRUE);
   /* Override some default values to fit on the AudioFlinger behaviour of
    * processing 20ms buffers as minimum buffer size. */
-  GST_AUDIO_BASE_SINK (sink)->buffer_time = 400000;
+  GST_AUDIO_BASE_SINK (sink)->buffer_time = 200000;
   GST_AUDIO_BASE_SINK (sink)->latency_time = 20000;
 }
diff --git a/sys/opensles/openslessink.h b/sys/opensles/openslessink.h
index 84abf9f..69e6f2d 100644
--- a/sys/opensles/openslessink.h
+++ b/sys/opensles/openslessink.h
@@ -40,6 +40,8 @@
 {
   GstAudioBaseSink sink;
 
+  GstOpenSLESStreamType stream_type;
+
   gfloat volume;
   gboolean mute;
 };
diff --git a/sys/opensles/openslessrc.c b/sys/opensles/openslessrc.c
index 5247854..d0dfa32 100644
--- a/sys/opensles/openslessrc.c
+++ b/sys/opensles/openslessrc.c
@@ -47,24 +47,67 @@
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_NE (S16) ", "
-        "rate = (int) { 16000 }, "
-        "channels = (int) 1")
+        "rate = (int) 16000, "
+        "channels = (int) 1, "
+        "layout = (string) interleaved")
     );
 /* *INDENT-ON* */
 
 #define _do_init \
-  GST_DEBUG_CATEGORY_INIT (opensles_src_debug, "opensles_src", 0, \
-      "OpenSL ES Src");
+  GST_DEBUG_CATEGORY_INIT (opensles_src_debug, "openslessrc", 0, \
+      "OpenSLES Source");
 #define parent_class gst_opensles_src_parent_class
 G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSrc, gst_opensles_src,
     GST_TYPE_AUDIO_BASE_SRC, _do_init);
 
+enum
+{
+  PROP_0,
+  PROP_PRESET,
+};
+
+#define DEFAULT_PRESET GST_OPENSLES_RECORDING_PRESET_NONE
+
+
+static void
+gst_opensles_src_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstOpenSLESSrc *src = GST_OPENSLES_SRC (object);
+
+  switch (prop_id) {
+    case PROP_PRESET:
+      src->preset = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_opensles_src_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstOpenSLESSrc *src = GST_OPENSLES_SRC (object);
+
+  switch (prop_id) {
+    case PROP_PRESET:
+      g_value_set_enum (value, src->preset);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
 static GstAudioRingBuffer *
 gst_opensles_src_create_ringbuffer (GstAudioBaseSrc * base)
 {
   GstAudioRingBuffer *rb;
 
   rb = gst_opensles_ringbuffer_new (RB_MODE_SRC);
+  GST_OPENSLES_RING_BUFFER (rb)->preset = GST_OPENSLES_SRC (base)->preset;
 
   return rb;
 }
@@ -72,12 +115,22 @@
 static void
 gst_opensles_src_class_init (GstOpenSLESSrcClass * klass)
 {
+  GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
   GstAudioBaseSrcClass *gstaudiobasesrc_class;
 
+  gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
   gstaudiobasesrc_class = (GstAudioBaseSrcClass *) klass;
 
+  gobject_class->set_property = gst_opensles_src_set_property;
+  gobject_class->get_property = gst_opensles_src_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_PRESET,
+      g_param_spec_enum ("preset", "Preset", "Recording preset to use",
+          GST_TYPE_OPENSLES_RECORDING_PRESET, DEFAULT_PRESET,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&src_factory));
 
@@ -95,6 +148,8 @@
 {
   /* Override some default values to fit on the AudioFlinger behaviour of
    * processing 20ms buffers as minimum buffer size. */
-  GST_AUDIO_BASE_SRC (src)->buffer_time = 400000;
+  GST_AUDIO_BASE_SRC (src)->buffer_time = 200000;
   GST_AUDIO_BASE_SRC (src)->latency_time = 20000;
+
+  src->preset = DEFAULT_PRESET;
 }
diff --git a/sys/opensles/openslessrc.h b/sys/opensles/openslessrc.h
index 5311ea8..805bcaa 100644
--- a/sys/opensles/openslessrc.h
+++ b/sys/opensles/openslessrc.h
@@ -39,6 +39,7 @@
 struct _GstOpenSLESSrc
 {
   GstAudioBaseSrc src;
+  GstOpenSLESRecordingPreset preset;
 };
 
 struct _GstOpenSLESSrcClass
diff --git a/sys/osxvideo/Makefile.am b/sys/osxvideo/Makefile.am
deleted file mode 100644
index 8080eba..0000000
--- a/sys/osxvideo/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-
-plugin_LTLIBRARIES = libgstosxvideosrc.la
-
-libgstosxvideosrc_la_SOURCES = osxvideoplugin.c osxvideosrc.c
-libgstosxvideosrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
-	$(GST_PLUGINS_BASE_CFLAGS) -Wno-deprecated-declarations
-libgstosxvideosrc_la_LIBADD =  \
-	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-	-lgstinterfaces-$(GST_API_VERSION)
-
-libgstosxvideosrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-libgstosxvideosrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) \
-	-Wl,-framework -Wl,Cocoa -Wl,-framework -Wl,QuickTime
-
-noinst_HEADERS = osxvideosrc.h
diff --git a/sys/osxvideo/Makefile.in b/sys/osxvideo/Makefile.in
deleted file mode 100644
index a756e27..0000000
--- a/sys/osxvideo/Makefile.in
+++ /dev/null
@@ -1,1079 +0,0 @@
-# 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 = sys/osxvideo
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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)$(plugindir)"
-LTLIBRARIES = $(plugin_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libgstosxvideosrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstosxvideosrc_la_OBJECTS =  \
-	libgstosxvideosrc_la-osxvideoplugin.lo \
-	libgstosxvideosrc_la-osxvideosrc.lo
-libgstosxvideosrc_la_OBJECTS = $(am_libgstosxvideosrc_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 = 
-libgstosxvideosrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstosxvideosrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(libgstosxvideosrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstosxvideosrc_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 = $(libgstosxvideosrc_la_SOURCES)
-DIST_SOURCES = $(libgstosxvideosrc_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@
-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 = libgstosxvideosrc.la
-libgstosxvideosrc_la_SOURCES = osxvideoplugin.c osxvideosrc.c
-libgstosxvideosrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
-	$(GST_PLUGINS_BASE_CFLAGS) -Wno-deprecated-declarations
-
-libgstosxvideosrc_la_LIBADD = \
-	$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-	-lgstinterfaces-$(GST_API_VERSION)
-
-libgstosxvideosrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstosxvideosrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) \
-	-Wl,-framework -Wl,Cocoa -Wl,-framework -Wl,QuickTime
-
-noinst_HEADERS = osxvideosrc.h
-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 sys/osxvideo/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu sys/osxvideo/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-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}; \
-	}
-
-libgstosxvideosrc.la: $(libgstosxvideosrc_la_OBJECTS) $(libgstosxvideosrc_la_DEPENDENCIES) $(EXTRA_libgstosxvideosrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstosxvideosrc_la_LINK) -rpath $(plugindir) $(libgstosxvideosrc_la_OBJECTS) $(libgstosxvideosrc_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxvideosrc_la-osxvideoplugin.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxvideosrc_la-osxvideosrc.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 $@ $<
-
-libgstosxvideosrc_la-osxvideoplugin.lo: osxvideoplugin.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxvideosrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxvideosrc_la_CFLAGS) $(CFLAGS) -MT libgstosxvideosrc_la-osxvideoplugin.lo -MD -MP -MF $(DEPDIR)/libgstosxvideosrc_la-osxvideoplugin.Tpo -c -o libgstosxvideosrc_la-osxvideoplugin.lo `test -f 'osxvideoplugin.c' || echo '$(srcdir)/'`osxvideoplugin.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxvideosrc_la-osxvideoplugin.Tpo $(DEPDIR)/libgstosxvideosrc_la-osxvideoplugin.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='osxvideoplugin.c' object='libgstosxvideosrc_la-osxvideoplugin.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 $(libgstosxvideosrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxvideosrc_la_CFLAGS) $(CFLAGS) -c -o libgstosxvideosrc_la-osxvideoplugin.lo `test -f 'osxvideoplugin.c' || echo '$(srcdir)/'`osxvideoplugin.c
-
-libgstosxvideosrc_la-osxvideosrc.lo: osxvideosrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxvideosrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxvideosrc_la_CFLAGS) $(CFLAGS) -MT libgstosxvideosrc_la-osxvideosrc.lo -MD -MP -MF $(DEPDIR)/libgstosxvideosrc_la-osxvideosrc.Tpo -c -o libgstosxvideosrc_la-osxvideosrc.lo `test -f 'osxvideosrc.c' || echo '$(srcdir)/'`osxvideosrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxvideosrc_la-osxvideosrc.Tpo $(DEPDIR)/libgstosxvideosrc_la-osxvideosrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='osxvideosrc.c' object='libgstosxvideosrc_la-osxvideosrc.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 $(libgstosxvideosrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxvideosrc_la_CFLAGS) $(CFLAGS) -c -o libgstosxvideosrc_la-osxvideosrc.lo `test -f 'osxvideosrc.c' || echo '$(srcdir)/'`osxvideosrc.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
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; 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:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-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: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-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
-
-
-# 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/sys/osxvideo/osxvideoplugin.c b/sys/osxvideo/osxvideoplugin.c
deleted file mode 100644
index abb2c97..0000000
--- a/sys/osxvideo/osxvideoplugin.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* GStreamer
- * OSX video src
- * Copyright (C) 2004-6 Zaheer Abbas Merali <zaheerabbas at merali dot org>
- * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.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.
- *
- * The development of this code was made possible due to the involvement of
- * Pioneers of the Inevitable, the creators of the Songbird Music player.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-/* Object header */
-#include "osxvideosrc.h"
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  if (!gst_element_register (plugin, "osxvideosrc",
-          GST_RANK_PRIMARY, GST_TYPE_OSX_VIDEO_SRC))
-    return FALSE;
-
-  GST_DEBUG_CATEGORY_INIT (gst_debug_osx_video_src, "osxvideosrc", 0,
-      "osxvideosrc element");
-
-  return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    osxvideosrc,
-    "OSX native video input plugin",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/sys/osxvideo/osxvideosrc.c b/sys/osxvideo/osxvideosrc.c
deleted file mode 100644
index dd1c546..0000000
--- a/sys/osxvideo/osxvideosrc.c
+++ /dev/null
@@ -1,1393 +0,0 @@
-/*
- * GStreamer
- * Copyright 2007 Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
- * Copyright 2007 Ali Sabil <ali.sabil@tandberg.com>
- * Copyright 2008 Barracuda Networks <justin@affinix.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-osxvideosrc
- *
- * <refsect2>
- * osxvideosrc can be used to capture video from capture devices on OS X.
- * <title>Example launch line</title>
- * <para>
- * <programlisting>
- * gst-launch osxvideosrc ! osxvideosink
- * </programlisting>
- * This pipeline shows the video captured from the default capture device.
- * </para>
- * </refsect2>
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <string.h>
-
-// for usleep
-#include <unistd.h>
-
-#include <gst/interfaces/propertyprobe.h>
-#include "osxvideosrc.h"
-
-/* for now, framerate is hard-coded */
-#define FRAMERATE 30
-
-// TODO: for completeness, write an _unlock function
-
-/*
-QuickTime notes:
-
-EnterMovies
-  initialize QT subsystem
-  there is no deinit
-
-OpenDefaultComponent of type SeqGrabComponentType
-  this gets a handle to a sequence grabber
-
-CloseComponent
-  release the sequence grabber
-
-SGInitialize
-  initialize the SG
-  there is no deinit, simply close the component
-
-SGSetDataRef of seqGrabDontMakeMovie
-  this is to disable file creation.  we only want frames
-
-SGNewChannel of VideoMediaType
-  make a video capture channel
-
-QTNewGWorld
-  specify format (e.g. k32ARGBPixelFormat)
-  specify size
-
-LockPixels
-  this makes it so the base address of the image doesn't "move".
-  you can UnlockPixels also, if you care to.
-
-CocoaSequenceGrabber locks (GetPortPixMap(gWorld)) for the entire session.
-it also locks/unlocks the pixmaphandle
-  [ PixMapHandle pixMapHandle = GetGWorldPixMap(gworld); ]
-during the moment where it extracts the frame from the gworld
-
-SGSetGWorld
-  assign the gworld to the component
-  pass GetMainDevice() as the last arg, which is just a formality?
-
-SGSetChannelBounds
-  use this to set our desired capture size.  the camera might not actually
-    capture at this size, but it will pick something close.
-
-SGSetChannelUsage of seqGrabRecord
-  enable recording
-
-SGSetDataProc
-  set callback handler
-
-SGPrepare
-  prepares for recording.  this initializes the camera (the light should
-  come on) so that when you call SGStartRecord you hit the ground running.
-  maybe we should call SGPrepare when READY->PAUSED happens?
-
-SGRelease
-  unprepare the recording
-
-SGStartRecord
-  kick off the recording
-
-SGStop
-  stop recording
-
-SGGetChannelSampleDescription
-  obtain the size the camera is actually capturing at
-
-DecompressSequenceBegin
-  i'm pretty sure you have to use this to receive the raw frames.
-  you can also use it to scale the image.  to scale, create a matrix
-    from the source and desired sizes and pass the matrix to this function.
-  *** deprecated: use DecompressSequenceBeginS instead
-
-CDSequenceEnd
-  stop a decompress sequence
-
-DecompressSequenceFrameS
-  use this to obtain a raw frame.  the result ends up in the gworld
-  *** deprecated: use DecompressSequenceFrameWhen instead
-
-SGGetChannelDeviceList of sgDeviceListIncludeInputs
-  obtain the list of devices for the video channel
-
-SGSetChannelDevice
-  set the master device (DV, USB, etc) on the channel, by string name
-
-SGSetChannelDeviceInput
-  set the sub device on the channel (iSight), by integer id
-  device ids should be a concatenation of the above two values.
-
-*/
-
-GST_DEBUG_CATEGORY (gst_debug_osx_video_src);
-#define GST_CAT_DEFAULT gst_debug_osx_video_src
-
-/* Filter signals and args */
-enum
-{
-  /* FILL ME */
-  LAST_SIGNAL
-};
-
-enum
-{
-  ARG_0,
-  ARG_DEVICE,
-  ARG_DEVICE_NAME
-};
-
-static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-raw-yuv, "
-        "format = (fourcc) UYVY, "
-        "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ], "
-        //"framerate = (fraction) 0/1")
-        "framerate = (fraction) 30/1")
-    );
-
-     static void
-     gst_osx_video_src_init_interfaces (GType type);
-     static void
-     gst_osx_video_src_type_add_device_property_probe_interface (GType type);
-
-GST_BOILERPLATE_FULL (GstOSXVideoSrc, gst_osx_video_src, GstPushSrc,
-    GST_TYPE_PUSH_SRC, gst_osx_video_src_init_interfaces);
-
-     static void gst_osx_video_src_dispose (GObject * object);
-     static void gst_osx_video_src_finalize (GstOSXVideoSrc * osx_video_src);
-     static void gst_osx_video_src_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec);
-     static void gst_osx_video_src_get_property (GObject * object,
-    guint prop_id, GValue * value, GParamSpec * pspec);
-
-     static GstStateChangeReturn gst_osx_video_src_change_state (GstElement *
-    element, GstStateChange transition);
-
-     static GstCaps *gst_osx_video_src_get_caps (GstBaseSrc * src);
-     static gboolean gst_osx_video_src_set_caps (GstBaseSrc * src,
-    GstCaps * caps);
-     static gboolean gst_osx_video_src_start (GstBaseSrc * src);
-     static gboolean gst_osx_video_src_stop (GstBaseSrc * src);
-     static gboolean gst_osx_video_src_query (GstBaseSrc * bsrc,
-    GstQuery * query);
-     static GstFlowReturn gst_osx_video_src_create (GstPushSrc * src,
-    GstBuffer ** buf);
-     static void gst_osx_video_src_fixate (GstBaseSrc * bsrc, GstCaps * caps);
-
-     static gboolean prepare_capture (GstOSXVideoSrc * self);
-
-/* \ = \\, : = \c */
-     static GString *escape_string (const GString * in)
-{
-  GString *out;
-  int n;
-
-  out = g_string_sized_new (64);
-  for (n = 0; n < (int) in->len; ++n) {
-    if (in->str[n] == '\\')
-      g_string_append (out, "\\\\");
-    else if (in->str[n] == ':')
-      g_string_append (out, "\\:");
-    else
-      g_string_append_c (out, in->str[n]);
-  }
-
-  return out;
-}
-
-/* \\ = \, \c = : */
-static GString *
-unescape_string (const GString * in)
-{
-  GString *out;
-  int n;
-
-  out = g_string_sized_new (64);
-  for (n = 0; n < (int) in->len; ++n) {
-    if (in->str[n] == '\\') {
-      if (n + 1 < (int) in->len) {
-        ++n;
-        if (in->str[n] == '\\')
-          g_string_append_c (out, '\\');
-        else if (in->str[n] == 'c')
-          g_string_append_c (out, ':');
-        else {
-          /* unknown code, we will eat the escape sequence */
-        }
-      } else {
-        /* string ends with backslash, we will eat it */
-      }
-    } else
-      g_string_append_c (out, in->str[n]);
-  }
-
-  return out;
-}
-
-static gchar *
-create_device_id (const gchar * sgname, int inputIndex)
-{
-  GString *out;
-  GString *name;
-  GString *nameenc;
-  gchar *ret;
-
-  name = g_string_new (sgname);
-  nameenc = escape_string (name);
-  g_string_free (name, TRUE);
-
-  if (inputIndex >= 0) {
-    out = g_string_new ("");
-    g_string_printf (out, "%s:%d", nameenc->str, inputIndex);
-  } else {
-    /* unspecified index */
-    out = g_string_new (nameenc->str);
-  }
-
-  g_string_free (nameenc, TRUE);
-  ret = g_string_free (out, FALSE);
-  return ret;
-}
-
-static gboolean
-parse_device_id (const gchar * id, gchar ** sgname, int *inputIndex)
-{
-  gchar **parts;
-  int numparts;
-  GString *p1;
-  GString *out1;
-  int out2 = 0;
-
-  parts = g_strsplit (id, ":", -1);
-  numparts = 0;
-  while (parts[numparts])
-    ++numparts;
-
-  /* must be exactly 1 or 2 parts */
-  if (numparts < 1 || numparts > 2) {
-    g_strfreev (parts);
-    return FALSE;
-  }
-
-  p1 = g_string_new (parts[0]);
-  out1 = unescape_string (p1);
-  g_string_free (p1, TRUE);
-
-  if (numparts >= 2) {
-    errno = 0;
-    out2 = strtol (parts[1], NULL, 10);
-    if (out2 == 0 && (errno == ERANGE || errno == EINVAL)) {
-      g_string_free (out1, TRUE);
-      g_strfreev (parts);
-      return FALSE;
-    }
-  }
-
-  g_strfreev (parts);
-
-  *sgname = g_string_free (out1, FALSE);
-  *inputIndex = out2;
-  return TRUE;
-}
-
-typedef struct
-{
-  gchar *id;
-  gchar *name;
-} video_device;
-
-static video_device *
-video_device_alloc (void)
-{
-  video_device *dev;
-  dev = g_malloc (sizeof (video_device));
-  dev->id = NULL;
-  dev->name = NULL;
-  return dev;
-}
-
-static void
-video_device_free (video_device * dev)
-{
-  if (!dev)
-    return;
-
-  if (dev->id)
-    g_free (dev->id);
-  if (dev->name)
-    g_free (dev->name);
-
-  g_free (dev);
-}
-
-static void
-video_device_free_func (gpointer data, gpointer user_data)
-{
-  video_device_free ((video_device *) data);
-}
-
-/* return a list of available devices.  the default device (if any) will be
- * the first in the list.
- */
-static GList *
-device_list (GstOSXVideoSrc * src)
-{
-  SeqGrabComponent component = NULL;
-  SGChannel channel;
-  SGDeviceList deviceList;
-  SGDeviceName *deviceEntry;
-  SGDeviceInputList inputList;
-  SGDeviceInputName *inputEntry;
-  ComponentResult err;
-  int n, i;
-  GList *list;
-  video_device *dev, *default_dev;
-  gchar sgname[256];
-  gchar friendly_name[256];
-
-  list = NULL;
-  default_dev = NULL;
-
-  if (src->video_chan) {
-    /* if we already have a video channel allocated, use that */
-    GST_DEBUG_OBJECT (src, "reusing existing channel for device_list");
-    channel = src->video_chan;
-  } else {
-    /* otherwise, allocate a temporary one */
-    component = OpenDefaultComponent (SeqGrabComponentType, 0);
-    if (!component) {
-      err = paramErr;
-      GST_ERROR_OBJECT (src, "OpenDefaultComponent failed. paramErr=%d",
-          (int) err);
-      goto end;
-    }
-
-    err = SGInitialize (component);
-    if (err != noErr) {
-      GST_ERROR_OBJECT (src, "SGInitialize returned %d", (int) err);
-      goto end;
-    }
-
-    err = SGSetDataRef (component, 0, 0, seqGrabDontMakeMovie);
-    if (err != noErr) {
-      GST_ERROR_OBJECT (src, "SGSetDataRef returned %d", (int) err);
-      goto end;
-    }
-
-    err = SGNewChannel (component, VideoMediaType, &channel);
-    if (err != noErr) {
-      GST_ERROR_OBJECT (src, "SGNewChannel returned %d", (int) err);
-      goto end;
-    }
-  }
-
-  err =
-      SGGetChannelDeviceList (channel, sgDeviceListIncludeInputs, &deviceList);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (src, "SGGetChannelDeviceList returned %d", (int) err);
-    goto end;
-  }
-
-  for (n = 0; n < (*deviceList)->count; ++n) {
-    deviceEntry = &(*deviceList)->entry[n];
-
-    if (deviceEntry->flags & sgDeviceNameFlagDeviceUnavailable)
-      continue;
-
-    p2cstrcpy (sgname, deviceEntry->name);
-    inputList = deviceEntry->inputs;
-
-    if (inputList && (*inputList)->count >= 1) {
-      for (i = 0; i < (*inputList)->count; ++i) {
-        inputEntry = &(*inputList)->entry[i];
-
-        p2cstrcpy (friendly_name, inputEntry->name);
-
-        dev = video_device_alloc ();
-        dev->id = create_device_id (sgname, i);
-        if (!dev->id) {
-          video_device_free (dev);
-          i = -1;
-          break;
-        }
-
-        dev->name = g_strdup (friendly_name);
-        list = g_list_append (list, dev);
-
-        /* if this is the default device, note it */
-        if (n == (*deviceList)->selectedIndex
-            && i == (*inputList)->selectedIndex) {
-          default_dev = dev;
-        }
-      }
-
-      /* error */
-      if (i == -1)
-        break;
-    } else {
-      /* ### can a device have no defined inputs? */
-      dev = video_device_alloc ();
-      dev->id = create_device_id (sgname, -1);
-      if (!dev->id) {
-        video_device_free (dev);
-        break;
-      }
-
-      dev->name = g_strdup (sgname);
-      list = g_list_append (list, dev);
-
-      /* if this is the default device, note it */
-      if (n == (*deviceList)->selectedIndex) {
-        default_dev = dev;
-      }
-    }
-  }
-
-  /* move default device to the front */
-  if (default_dev) {
-    list = g_list_remove (list, default_dev);
-    list = g_list_prepend (list, default_dev);
-  }
-
-end:
-  if (!src->video_chan && component) {
-    err = CloseComponent (component);
-    if (err != noErr)
-      GST_WARNING_OBJECT (src, "CloseComponent returned %d", (int) err);
-  }
-
-  return list;
-}
-
-static gboolean
-device_set_default (GstOSXVideoSrc * src)
-{
-  GList *list;
-  video_device *dev;
-  gboolean ret;
-
-  /* obtain the device list */
-  list = device_list (src);
-  if (!list)
-    return FALSE;
-
-  ret = FALSE;
-
-  /* the first item is the default */
-  if (g_list_length (list) >= 1) {
-    dev = (video_device *) list->data;
-
-    /* take the strings, no need to copy */
-    src->device_id = dev->id;
-    src->device_name = dev->name;
-    dev->id = NULL;
-    dev->name = NULL;
-
-    /* null out the item */
-    video_device_free (dev);
-    list->data = NULL;
-
-    ret = TRUE;
-  }
-
-  /* clean up */
-  g_list_foreach (list, video_device_free_func, NULL);
-  g_list_free (list);
-
-  return ret;
-}
-
-static gboolean
-device_get_name (GstOSXVideoSrc * src)
-{
-  GList *l, *list;
-  video_device *dev;
-  gboolean ret;
-
-  /* if there is no device set, then attempt to set up with the default,
-   * which will also grab the name in the process.
-   */
-  if (!src->device_id)
-    return device_set_default (src);
-
-  /* if we already have a name, free it */
-  if (src->device_name) {
-    g_free (src->device_name);
-    src->device_name = NULL;
-  }
-
-  /* obtain the device list */
-  list = device_list (src);
-  if (!list)
-    return FALSE;
-
-  ret = FALSE;
-
-  /* look up the id */
-  for (l = list; l != NULL; l = l->next) {
-    dev = (video_device *) l->data;
-    if (g_str_equal (dev->id, src->device_id)) {
-      /* take the string, no need to copy */
-      src->device_name = dev->name;
-      dev->name = NULL;
-      ret = TRUE;
-      break;
-    }
-  }
-
-  g_list_foreach (list, video_device_free_func, NULL);
-  g_list_free (list);
-
-  return ret;
-}
-
-static gboolean
-device_select (GstOSXVideoSrc * src)
-{
-  Str63 pstr;
-  ComponentResult err;
-  gchar *sgname;
-  int inputIndex;
-
-  /* if there's no device id set, attempt to select default device */
-  if (!src->device_id && !device_set_default (src))
-    return FALSE;
-
-  if (!parse_device_id (src->device_id, &sgname, &inputIndex)) {
-    GST_ERROR_OBJECT (src, "unable to parse device id: [%s]", src->device_id);
-    return FALSE;
-  }
-
-  c2pstrcpy (pstr, sgname);
-  g_free (sgname);
-
-  err = SGSetChannelDevice (src->video_chan, (StringPtr) & pstr);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (src, "SGSetChannelDevice returned %d", (int) err);
-    return FALSE;
-  }
-
-  err = SGSetChannelDeviceInput (src->video_chan, inputIndex);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (src, "SGSetChannelDeviceInput returned %d", (int) err);
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-static gboolean
-gst_osx_video_src_iface_supported (GstImplementsInterface * iface,
-    GType iface_type)
-{
-  return FALSE;
-}
-
-static void
-gst_osx_video_src_interface_init (GstImplementsInterfaceClass * klass)
-{
-  /* default virtual functions */
-  klass->supported = gst_osx_video_src_iface_supported;
-}
-
-static void
-gst_osx_video_src_init_interfaces (GType type)
-{
-  static const GInterfaceInfo implements_iface_info = {
-    (GInterfaceInitFunc) gst_osx_video_src_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
-      &implements_iface_info);
-
-  gst_osx_video_src_type_add_device_property_probe_interface (type);
-}
-
-static void
-gst_osx_video_src_base_init (gpointer gclass)
-{
-
-  GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
-
-  GST_DEBUG ("%s", G_STRFUNC);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_template));
-
-  gst_element_class_set_static_metadata (element_class, "Video Source (OSX)",
-      "Source/Video",
-      "Reads raw frames from a capture device on OS X",
-      "Ole Andre Vadla Ravnaas <ole.andre.ravnas@tandberg.com>, "
-      "Ali Sabil <ali.sabil@tandberg.com>");
-}
-
-static void
-gst_osx_video_src_class_init (GstOSXVideoSrcClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *element_class;
-  GstBaseSrcClass *basesrc_class;
-  GstPushSrcClass *pushsrc_class;
-  OSErr err;
-
-  GST_DEBUG ("%s", G_STRFUNC);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  element_class = GST_ELEMENT_CLASS (klass);
-  basesrc_class = GST_BASE_SRC_CLASS (klass);
-  pushsrc_class = GST_PUSH_SRC_CLASS (klass);
-
-  gobject_class->dispose = gst_osx_video_src_dispose;
-  gobject_class->finalize = (GObjectFinalizeFunc) gst_osx_video_src_finalize;
-  gobject_class->set_property =
-      GST_DEBUG_FUNCPTR (gst_osx_video_src_set_property);
-  gobject_class->get_property =
-      GST_DEBUG_FUNCPTR (gst_osx_video_src_get_property);
-
-  element_class->change_state = gst_osx_video_src_change_state;
-
-  basesrc_class->get_caps = gst_osx_video_src_get_caps;
-  basesrc_class->set_caps = gst_osx_video_src_set_caps;
-  basesrc_class->start = gst_osx_video_src_start;
-  basesrc_class->stop = gst_osx_video_src_stop;
-  basesrc_class->query = gst_osx_video_src_query;
-  basesrc_class->fixate = gst_osx_video_src_fixate;
-
-  pushsrc_class->create = gst_osx_video_src_create;
-
-  g_object_class_install_property (gobject_class, ARG_DEVICE,
-      g_param_spec_string ("device", "Device",
-          "Sequence Grabber input device in format 'sgname:input#'",
-          NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, ARG_DEVICE_NAME,
-      g_param_spec_string ("device-name", "Device name",
-          "Human-readable name of the video device",
-          NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
-  err = EnterMovies ();
-  if (err == noErr) {
-    klass->movies_enabled = TRUE;
-  } else {
-    klass->movies_enabled = FALSE;
-    GST_ERROR ("EnterMovies returned %d", err);
-  }
-}
-
-static void
-gst_osx_video_src_init (GstOSXVideoSrc * self, GstOSXVideoSrcClass * klass)
-{
-  GST_DEBUG_OBJECT (self, "%s", G_STRFUNC);
-
-  gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
-  gst_base_src_set_live (GST_BASE_SRC (self), TRUE);
-}
-
-static void
-gst_osx_video_src_dispose (GObject * object)
-{
-  GstOSXVideoSrc *self = GST_OSX_VIDEO_SRC (object);
-  GST_DEBUG_OBJECT (object, "%s", G_STRFUNC);
-
-  if (self->device_id) {
-    g_free (self->device_id);
-    self->device_id = NULL;
-  }
-
-  if (self->device_name) {
-    g_free (self->device_name);
-    self->device_name = NULL;
-  }
-
-  if (self->buffer != NULL) {
-    gst_buffer_unref (self->buffer);
-    self->buffer = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-gst_osx_video_src_finalize (GstOSXVideoSrc * self)
-{
-  GST_DEBUG_OBJECT (self, "%s", G_STRFUNC);
-
-  G_OBJECT_CLASS (parent_class)->finalize (G_OBJECT (self));
-}
-
-static void
-gst_osx_video_src_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstOSXVideoSrc *src = GST_OSX_VIDEO_SRC (object);
-
-  switch (prop_id) {
-    case ARG_DEVICE:
-      if (src->device_id) {
-        g_free (src->device_id);
-        src->device_id = NULL;
-      }
-      if (src->device_name) {
-        g_free (src->device_name);
-        src->device_name = NULL;
-      }
-      src->device_id = g_strdup (g_value_get_string (value));
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_osx_video_src_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstOSXVideoSrc *src = GST_OSX_VIDEO_SRC (object);
-
-  switch (prop_id) {
-    case ARG_DEVICE:
-      if (!src->device_id)
-        device_set_default (src);
-      g_value_set_string (value, src->device_id);
-      break;
-    case ARG_DEVICE_NAME:
-      if (!src->device_name)
-        device_get_name (src);
-      g_value_set_string (value, src->device_name);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static GstCaps *
-gst_osx_video_src_get_caps (GstBaseSrc * src)
-{
-  GstElementClass *gstelement_class;
-  GstOSXVideoSrc *self;
-  GstPadTemplate *pad_template;
-  GstCaps *caps;
-  GstStructure *structure;
-  gint width, height;
-
-  gstelement_class = GST_ELEMENT_GET_CLASS (src);
-  self = GST_OSX_VIDEO_SRC (src);
-
-  /* if we don't have the resolution set up, return template caps */
-  if (!self->world)
-    return NULL;
-
-  pad_template = gst_element_class_get_pad_template (gstelement_class, "src");
-  /* i don't think this can actually fail... */
-  if (!pad_template)
-    return NULL;
-
-  width = self->rect.right;
-  height = self->rect.bottom;
-
-  caps = gst_caps_copy (gst_pad_template_get_caps (pad_template));
-
-  structure = gst_caps_get_structure (caps, 0);
-  gst_structure_set (structure, "width", G_TYPE_INT, width, NULL);
-  gst_structure_set (structure, "height", G_TYPE_INT, height, NULL);
-
-  return caps;
-}
-
-static gboolean
-gst_osx_video_src_set_caps (GstBaseSrc * src, GstCaps * caps)
-{
-  GstOSXVideoSrc *self = GST_OSX_VIDEO_SRC (src);
-  GstStructure *structure = gst_caps_get_structure (caps, 0);
-  gint width, height, framerate_num, framerate_denom;
-  float fps;
-  ComponentResult err;
-
-  GST_DEBUG_OBJECT (src, "%s", G_STRFUNC);
-
-  if (!self->seq_grab)
-    return FALSE;
-
-  gst_structure_get_int (structure, "width", &width);
-  gst_structure_get_int (structure, "height", &height);
-  gst_structure_get_fraction (structure, "framerate", &framerate_num,
-      &framerate_denom);
-  fps = (float) framerate_num / framerate_denom;
-
-  GST_DEBUG_OBJECT (src, "changing caps to %dx%d@%f", width, height, fps);
-
-  SetRect (&self->rect, 0, 0, width, height);
-
-  err = QTNewGWorld (&self->world, k422YpCbCr8PixelFormat, &self->rect, 0,
-      NULL, 0);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "QTNewGWorld returned %d", (int) err);
-    goto fail;
-  }
-
-  if (!LockPixels (GetPortPixMap (self->world))) {
-    GST_ERROR_OBJECT (self, "LockPixels failed");
-    goto fail;
-  }
-
-  err = SGSetGWorld (self->seq_grab, self->world, NULL);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGSetGWorld returned %d", (int) err);
-    goto fail;
-  }
-
-  err = SGSetChannelBounds (self->video_chan, &self->rect);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGSetChannelBounds returned %d", (int) err);
-    goto fail;
-  }
-  // ###: if we ever support choosing framerates, do something with this
-  /*err = SGSetFrameRate (self->video_chan, FloatToFixed(fps));
-     if (err != noErr) {
-     GST_ERROR_OBJECT (self, "SGSetFrameRate returned %d", (int) err);
-     goto fail;
-     } */
-
-  return TRUE;
-
-fail:
-  if (self->world) {
-    SGSetGWorld (self->seq_grab, NULL, NULL);
-    DisposeGWorld (self->world);
-    self->world = NULL;
-  }
-
-  return FALSE;
-}
-
-static void
-gst_osx_video_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
-{
-  GstStructure *structure;
-  int i;
-
-  /* this function is for choosing defaults as a last resort */
-  for (i = 0; i < (int) gst_caps_get_size (caps); ++i) {
-    structure = gst_caps_get_structure (caps, i);
-    gst_structure_fixate_field_nearest_int (structure, "width", 640);
-    gst_structure_fixate_field_nearest_int (structure, "height", 480);
-
-    // ###: if we ever support choosing framerates, do something with this
-    //gst_structure_fixate_field_nearest_fraction (structure, "framerate", 15, 2);
-  }
-}
-
-static gboolean
-gst_osx_video_src_start (GstBaseSrc * src)
-{
-  GstOSXVideoSrc *self;
-  GObjectClass *gobject_class;
-  GstOSXVideoSrcClass *klass;
-  ComponentResult err;
-
-  self = GST_OSX_VIDEO_SRC (src);
-  gobject_class = G_OBJECT_GET_CLASS (src);
-  klass = GST_OSX_VIDEO_SRC_CLASS (gobject_class);
-
-  GST_DEBUG_OBJECT (src, "entering");
-
-  if (!klass->movies_enabled)
-    return FALSE;
-
-  self->seq_num = 0;
-
-  self->seq_grab = OpenDefaultComponent (SeqGrabComponentType, 0);
-  if (self->seq_grab == NULL) {
-    err = paramErr;
-    GST_ERROR_OBJECT (self, "OpenDefaultComponent failed. paramErr=%d",
-        (int) err);
-    goto fail;
-  }
-
-  err = SGInitialize (self->seq_grab);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGInitialize returned %d", (int) err);
-    goto fail;
-  }
-
-  err = SGSetDataRef (self->seq_grab, 0, 0, seqGrabDontMakeMovie);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGSetDataRef returned %d", (int) err);
-    goto fail;
-  }
-
-  err = SGNewChannel (self->seq_grab, VideoMediaType, &self->video_chan);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGNewChannel returned %d", (int) err);
-    goto fail;
-  }
-
-  if (!device_select (self))
-    goto fail;
-
-  GST_DEBUG_OBJECT (self, "started");
-  return TRUE;
-
-fail:
-  self->video_chan = NULL;
-
-  if (self->seq_grab) {
-    err = CloseComponent (self->seq_grab);
-    if (err != noErr)
-      GST_WARNING_OBJECT (self, "CloseComponent returned %d", (int) err);
-    self->seq_grab = NULL;
-  }
-
-  return FALSE;
-}
-
-static gboolean
-gst_osx_video_src_stop (GstBaseSrc * src)
-{
-  GstOSXVideoSrc *self;
-  ComponentResult err;
-
-  self = GST_OSX_VIDEO_SRC (src);
-
-  GST_DEBUG_OBJECT (src, "stopping");
-
-  self->video_chan = NULL;
-
-  err = CloseComponent (self->seq_grab);
-  if (err != noErr)
-    GST_WARNING_OBJECT (self, "CloseComponent returned %d", (int) err);
-  self->seq_grab = NULL;
-
-  DisposeGWorld (self->world);
-  self->world = NULL;
-
-  if (self->buffer != NULL) {
-    gst_buffer_unref (self->buffer);
-    self->buffer = NULL;
-  }
-
-  return TRUE;
-}
-
-static gboolean
-gst_osx_video_src_query (GstBaseSrc * bsrc, GstQuery * query)
-{
-  GstOSXVideoSrc *self;
-  gboolean res = FALSE;
-
-  self = GST_OSX_VIDEO_SRC (bsrc);
-
-  switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_LATENCY:
-    {
-      GstClockTime min_latency, max_latency;
-      gint fps_n, fps_d;
-
-      fps_n = FRAMERATE;
-      fps_d = 1;
-
-      /* min latency is the time to capture one frame */
-      min_latency = gst_util_uint64_scale_int (GST_SECOND, fps_d, fps_n);
-
-      /* max latency is total duration of the frame buffer */
-      // FIXME: we don't know what this is, so we'll just say 2 frames
-      max_latency = 2 * min_latency;
-
-      GST_DEBUG_OBJECT (bsrc,
-          "report latency min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
-          GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
-
-      /* we are always live, the min latency is 1 frame and the max latency is
-       * the complete buffer of frames. */
-      gst_query_set_latency (query, TRUE, min_latency, max_latency);
-
-      res = TRUE;
-      break;
-    }
-    default:
-      res = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
-      break;
-  }
-
-  return res;
-}
-
-static GstStateChangeReturn
-gst_osx_video_src_change_state (GstElement * element, GstStateChange transition)
-{
-  GstStateChangeReturn result;
-  GstOSXVideoSrc *self;
-  ComponentResult err;
-
-  result = GST_STATE_CHANGE_SUCCESS;
-  self = GST_OSX_VIDEO_SRC (element);
-
-  // ###: prepare_capture in READY->PAUSED?
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-    {
-      ImageDescriptionHandle imageDesc;
-      Rect sourceRect;
-      MatrixRecord scaleMatrix;
-
-      if (!prepare_capture (self))
-        return GST_STATE_CHANGE_FAILURE;
-
-      // ###: should we start recording /after/ making the decompressionsequence?
-      //   CocoaSequenceGrabber does it beforehand, so we do too, but it feels
-      //   wrong.
-      err = SGStartRecord (self->seq_grab);
-      if (err != noErr) {
-        /* since we prepare here, we should also unprepare */
-        SGRelease (self->seq_grab);
-
-        GST_ERROR_OBJECT (self, "SGStartRecord returned %d", (int) err);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-
-      imageDesc = (ImageDescriptionHandle) NewHandle (0);
-
-      err = SGGetChannelSampleDescription (self->video_chan,
-          (Handle) imageDesc);
-      if (err != noErr) {
-        SGStop (self->seq_grab);
-        SGRelease (self->seq_grab);
-        DisposeHandle ((Handle) imageDesc);
-        GST_ERROR_OBJECT (self, "SGGetChannelSampleDescription returned %d",
-            (int) err);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-
-      GST_DEBUG_OBJECT (self, "actual capture resolution is %dx%d",
-          (int) (**imageDesc).width, (int) (**imageDesc).height);
-
-      SetRect (&sourceRect, 0, 0, (**imageDesc).width, (**imageDesc).height);
-      RectMatrix (&scaleMatrix, &sourceRect, &self->rect);
-
-      err = DecompressSequenceBegin (&self->dec_seq, imageDesc, self->world,
-          NULL, NULL, &scaleMatrix, srcCopy, NULL, 0, codecNormalQuality,
-          bestSpeedCodec);
-      if (err != noErr) {
-        SGStop (self->seq_grab);
-        SGRelease (self->seq_grab);
-        DisposeHandle ((Handle) imageDesc);
-        GST_ERROR_OBJECT (self, "DecompressSequenceBegin returned %d",
-            (int) err);
-        return GST_STATE_CHANGE_FAILURE;
-      }
-
-      DisposeHandle ((Handle) imageDesc);
-      break;
-    }
-    default:
-      break;
-  }
-
-  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-  if (result == GST_STATE_CHANGE_FAILURE)
-    return result;
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      SGStop (self->seq_grab);
-
-      err = CDSequenceEnd (self->dec_seq);
-      if (err != noErr)
-        GST_WARNING_OBJECT (self, "CDSequenceEnd returned %d", (int) err);
-      self->dec_seq = 0;
-
-      SGRelease (self->seq_grab);
-      break;
-    default:
-      break;
-  }
-
-  return result;
-}
-
-static GstFlowReturn
-gst_osx_video_src_create (GstPushSrc * src, GstBuffer ** buf)
-{
-  GstOSXVideoSrc *self = GST_OSX_VIDEO_SRC (src);
-  ComponentResult err;
-  GstCaps *caps;
-  //GstClock * clock;
-
-  // ###: we need to sleep between calls to SGIdle.  originally, the sleeping
-  //   was done using gst_clock_id_wait(), but it turns out that approach
-  //   doesn't work well.  it has two issues:
-  //   1) every so often, gst_clock_id_wait() will block for a much longer
-  //      period of time than requested (upwards of a minute) causing video
-  //      to freeze until it finally returns.  this seems to happen once
-  //      every few minutes, which probably means something like 1 in every
-  //      several hundred calls gst_clock_id_wait() does the wrong thing.
-  //   2) even when the gst_clock approach is working properly, it uses
-  //      quite a bit of cpu in comparison to a simple usleep().  on one
-  //      test machine, using gst_clock_id_wait() caused osxvideosrc to use
-  //      nearly 100% cpu, while using usleep() brough the usage to less
-  //      than 10%.
-  //
-  // so, for now, we comment out the gst_clock stuff and use usleep.
-
-  //clock = gst_system_clock_obtain ();
-  do {
-    err = SGIdle (self->seq_grab);
-    if (err != noErr) {
-      GST_ERROR_OBJECT (self, "SGIdle returned %d", (int) err);
-      gst_object_unref (clock);
-      return GST_FLOW_UNEXPECTED;
-    }
-
-    if (self->buffer == NULL) {
-      /*GstClockID clock_id;
-
-         clock_id = gst_clock_new_single_shot_id (clock,
-         (GstClockTime) (gst_clock_get_time(clock) +
-         (GST_SECOND / ((float)FRAMERATE * 2))));
-         gst_clock_id_wait (clock_id, NULL);
-         gst_clock_id_unref (clock_id); */
-
-      usleep (1000000 / (FRAMERATE * 2));
-    }
-  } while (self->buffer == NULL);
-  //gst_object_unref (clock);
-
-  *buf = self->buffer;
-  self->buffer = NULL;
-
-  caps = gst_pad_get_caps (GST_BASE_SRC_PAD (src));
-  gst_buffer_set_caps (*buf, caps);
-  gst_caps_unref (caps);
-
-  return GST_FLOW_OK;
-}
-
-static OSErr
-data_proc (SGChannel c, Ptr p, long len, long *offset, long chRefCon,
-    TimeValue time, short writeType, long refCon)
-{
-  GstOSXVideoSrc *self;
-  gint fps_n, fps_d;
-  GstClockTime duration, timestamp, latency;
-  CodecFlags flags;
-  ComponentResult err;
-  PixMapHandle hPixMap;
-  Rect portRect;
-  int pix_rowBytes;
-  void *pix_ptr;
-  int pix_height;
-  int pix_size;
-
-  self = GST_OSX_VIDEO_SRC (refCon);
-
-  if (self->buffer != NULL) {
-    gst_buffer_unref (self->buffer);
-    self->buffer = NULL;
-  }
-
-  err = DecompressSequenceFrameS (self->dec_seq, p, len, 0, &flags, NULL);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "DecompressSequenceFrameS returned %d", (int) err);
-    return err;
-  }
-
-  hPixMap = GetGWorldPixMap (self->world);
-  LockPixels (hPixMap);
-  GetPortBounds (self->world, &portRect);
-  pix_rowBytes = (int) GetPixRowBytes (hPixMap);
-  pix_ptr = GetPixBaseAddr (hPixMap);
-  pix_height = (portRect.bottom - portRect.top);
-  pix_size = pix_rowBytes * pix_height;
-
-  GST_DEBUG_OBJECT (self, "num=%5d, height=%d, rowBytes=%d, size=%d",
-      self->seq_num, pix_height, pix_rowBytes, pix_size);
-
-  fps_n = FRAMERATE;
-  fps_d = 1;
-
-  duration = gst_util_uint64_scale_int (GST_SECOND, fps_d, fps_n);
-  latency = duration;
-
-  timestamp = gst_clock_get_time (GST_ELEMENT_CAST (self)->clock);
-  timestamp -= gst_element_get_base_time (GST_ELEMENT_CAST (self));
-  if (timestamp > latency)
-    timestamp -= latency;
-  else
-    timestamp = 0;
-
-  self->buffer = gst_buffer_new_and_alloc (pix_size);
-  GST_BUFFER_OFFSET (self->buffer) = self->seq_num;
-  GST_BUFFER_TIMESTAMP (self->buffer) = timestamp;
-  memcpy (GST_BUFFER_DATA (self->buffer), pix_ptr, pix_size);
-
-  self->seq_num++;
-
-  UnlockPixels (hPixMap);
-
-  return noErr;
-}
-
-static gboolean
-prepare_capture (GstOSXVideoSrc * self)
-{
-  ComponentResult err;
-
-  err = SGSetChannelUsage (self->video_chan, seqGrabRecord);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGSetChannelUsage returned %d", (int) err);
-    return FALSE;
-  }
-
-  err = SGSetDataProc (self->seq_grab, NewSGDataUPP (data_proc), (long) self);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGSetDataProc returned %d", (int) err);
-    return FALSE;
-  }
-
-  err = SGPrepare (self->seq_grab, false, true);
-  if (err != noErr) {
-    GST_ERROR_OBJECT (self, "SGPrepare returnd %d", (int) err);
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-static const GList *
-probe_get_properties (GstPropertyProbe * probe)
-{
-  GObjectClass *klass = G_OBJECT_GET_CLASS (probe);
-  static GList *list = NULL;
-
-  // ###: from gstalsadeviceprobe.c
-  /* well, not perfect, but better than no locking at all.
-   * In the worst case we leak a list node, so who cares? */
-  GST_CLASS_LOCK (GST_OBJECT_CLASS (klass));
-
-  if (!list) {
-    GParamSpec *pspec;
-
-    pspec = g_object_class_find_property (klass, "device");
-    list = g_list_append (NULL, pspec);
-  }
-
-  GST_CLASS_UNLOCK (GST_OBJECT_CLASS (klass));
-
-  return list;
-}
-
-static void
-probe_probe_property (GstPropertyProbe * probe, guint prop_id,
-    const GParamSpec * pspec)
-{
-  /* we do nothing in here.  the actual "probe" occurs in get_values(),
-   * which is a common practice when not caching responses.
-   */
-
-  if (!g_str_equal (pspec->name, "device")) {
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec);
-  }
-}
-
-static gboolean
-probe_needs_probe (GstPropertyProbe * probe, guint prop_id,
-    const GParamSpec * pspec)
-{
-  /* don't cache probed data */
-  return TRUE;
-}
-
-static GValueArray *
-probe_get_values (GstPropertyProbe * probe, guint prop_id,
-    const GParamSpec * pspec)
-{
-  GstOSXVideoSrc *src;
-  GValueArray *array;
-  GValue value = { 0, };
-  GList *l, *list;
-  video_device *dev;
-
-  if (!g_str_equal (pspec->name, "device")) {
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec);
-    return NULL;
-  }
-
-  src = GST_OSX_VIDEO_SRC (probe);
-
-  list = device_list (src);
-
-  if (list == NULL) {
-    GST_LOG_OBJECT (probe, "No devices found");
-    return NULL;
-  }
-
-  array = g_value_array_new (g_list_length (list));
-  g_value_init (&value, G_TYPE_STRING);
-  for (l = list; l != NULL; l = l->next) {
-    dev = (video_device *) l->data;
-    GST_LOG_OBJECT (probe, "Found device: %s", dev->id);
-    g_value_take_string (&value, dev->id);
-    dev->id = NULL;
-    video_device_free (dev);
-    l->data = NULL;
-    g_value_array_append (array, &value);
-  }
-  g_value_unset (&value);
-  g_list_free (list);
-
-  return array;
-}
-
-static void
-gst_osx_video_src_property_probe_interface_init (GstPropertyProbeInterface *
-    iface)
-{
-  iface->get_properties = probe_get_properties;
-  iface->probe_property = probe_probe_property;
-  iface->needs_probe = probe_needs_probe;
-  iface->get_values = probe_get_values;
-}
-
-void
-gst_osx_video_src_type_add_device_property_probe_interface (GType type)
-{
-  static const GInterfaceInfo probe_iface_info = {
-    (GInterfaceInitFunc) gst_osx_video_src_property_probe_interface_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_PROPERTY_PROBE,
-      &probe_iface_info);
-}
diff --git a/sys/osxvideo/osxvideosrc.h b/sys/osxvideo/osxvideosrc.h
deleted file mode 100644
index b10a5a4..0000000
--- a/sys/osxvideo/osxvideosrc.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * GStreamer
- * Copyright 2007 Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
- * Copyright 2007 Ali Sabil <ali.sabil@tandberg.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_OSX_VIDEO_SRC_H__
-#define __GST_OSX_VIDEO_SRC_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstpushsrc.h>
-#include <Quicktime/Quicktime.h>
-
-GST_DEBUG_CATEGORY_EXTERN (gst_debug_osx_video_src);
-
-G_BEGIN_DECLS
-
-/* #defines don't like whitespacey bits */
-#define GST_TYPE_OSX_VIDEO_SRC \
-  (gst_osx_video_src_get_type())
-#define GST_OSX_VIDEO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_VIDEO_SRC,GstOSXVideoSrc))
-#define GST_OSX_VIDEO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_VIDEO_SRC,GstOSXVideoSrcClass))
-#define GST_IS_OSX_VIDEO_SRC(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_VIDEO_SRC))
-#define GST_IS_OSX_VIDEO_SRC_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSX_VIDEO_SRC))
-
-typedef struct _GstOSXVideoSrc GstOSXVideoSrc;
-typedef struct _GstOSXVideoSrcClass GstOSXVideoSrcClass;
-
-struct _GstOSXVideoSrc
-{
-  GstPushSrc pushsrc;
-
-  gchar * device_id;
-  gchar * device_name;
-  SeqGrabComponent seq_grab;
-  SGChannel video_chan;
-  GWorldPtr world;
-  Rect rect;
-  ImageSequence dec_seq;
-
-  GstBuffer * buffer;
-  guint seq_num;
-};
-
-struct _GstOSXVideoSrcClass
-{
-  GstPushSrcClass parent_class;
-  gboolean movies_enabled;
-};
-
-GType gst_osx_video_src_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_OSX_VIDEO_SRC_H__ */
diff --git a/sys/pvr2d/Makefile.in b/sys/pvr2d/Makefile.in
index bbb3065..a32cf64 100644
--- a/sys/pvr2d/Makefile.in
+++ b/sys/pvr2d/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/pvr2d
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -764,7 +799,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/pvr2d/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/pvr2d/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1089,6 +1123,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/qtwrapper/Makefile.am b/sys/qtwrapper/Makefile.am
deleted file mode 100644
index 29b894f..0000000
--- a/sys/qtwrapper/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-plugin_LTLIBRARIES = libgstqtwrapper.la
-
-# sources used to compile this plug-in
-libgstqtwrapper_la_SOURCES = \
-	qtwrapper.c		\
-	qtutils.c		\
-	codecmapping.c		\
-	audiodecoders.c		\
-	videodecoders.c		\
-	imagedescription.c
-
-# flags used to compile this plugin
-# add other _CFLAGS and _LIBS as needed
-libgstqtwrapper_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
-libgstqtwrapper_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
-libgstqtwrapper_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework,CoreAudio,-framework,AudioToolbox,-framework,Carbon,-framework,QuickTime,-framework,QuartzCore
-libgstqtwrapper_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-# headers we need but don't want installed
-noinst_HEADERS = 		\
-	codecmapping.h		\
-	qtwrapper.h		\
-	qtutils.h		\
-	imagedescription.h
diff --git a/sys/qtwrapper/audiodecoders.c b/sys/qtwrapper/audiodecoders.c
deleted file mode 100644
index 0a6ddbc..0000000
--- a/sys/qtwrapper/audiodecoders.c
+++ /dev/null
@@ -1,1101 +0,0 @@
-/*
- * GStreamer QuickTime audio decoder codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007, 2008> Pioneers of the Inevitable 
- *                              <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 <string.h>
-
-#include <gst/gst.h>
-#include "qtwrapper.h"
-#include "codecmapping.h"
-#include "qtutils.h"
-
-#ifdef G_OS_WIN32
-#include <QuickTimeComponents.h>
-#else
-#include <QuickTime/QuickTimeComponents.h>
-#endif
-
-#define QTWRAPPER_ADEC_PARAMS_QDATA g_quark_from_static_string("qtwrapper-adec-params")
-
-#define NO_MORE_INPUT_DATA 42
-
-static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-raw-float, "
-        "endianness = (int) {" G_STRINGIFY (G_BYTE_ORDER) " }, "
-        "signed = (boolean) { TRUE }, "
-        "width = (int) 32, "
-        "depth = (int) 32, " "rate = (int) [1, MAX], "
-        "channels = (int) [1, MAX]")
-    );
-
-typedef struct _QTWrapperAudioDecoder QTWrapperAudioDecoder;
-typedef struct _QTWrapperAudioDecoderClass QTWrapperAudioDecoderClass;
-
-struct _QTWrapperAudioDecoder
-{
-  GstElement parent;
-
-  GstPad *sinkpad;
-  GstPad *srcpad;
-
-  /* FIXME : all following should be protected by a mutex */
-  ComponentInstance adec;       /* The Audio Decoder component */
-  AudioStreamBasicDescription indesc, outdesc;
-
-  guint samplerate;
-  guint channels;
-
-  AudioBufferList *bufferlist;
-  AudioStreamPacketDescription aspd[1];
-
-  /* first time received after NEWSEGMENT */
-  GstClockTime initial_time;
-  /* offset in samples from the initial time */
-  guint64 cur_offset;
-  /* TRUE just after receiving a NEWSEGMENT */
-  gboolean gotnewsegment;
-
-  /* Data for StdAudio callbacks */
-  GstBuffer *input_buffer;
-};
-
-struct _QTWrapperAudioDecoderClass
-{
-  GstElementClass parent_class;
-
-  /* fourcc of the format */
-  guint32 componentSubType;
-
-  GstPadTemplate *sinktempl;
-};
-
-typedef struct _QTWrapperAudioDecoderParams QTWrapperAudioDecoderParams;
-
-struct _QTWrapperAudioDecoderParams
-{
-  Component component;
-  GstCaps *sinkcaps;
-};
-
-static gboolean qtwrapper_audio_decoder_sink_setcaps (GstPad * pad,
-    GstCaps * caps);
-static GstFlowReturn qtwrapper_audio_decoder_chain (GstPad * pad,
-    GstBuffer * buf);
-static gboolean qtwrapper_audio_decoder_sink_event (GstPad * pad,
-    GstEvent * event);
-
-static void
-qtwrapper_audio_decoder_init (QTWrapperAudioDecoder * qtwrapper)
-{
-  QTWrapperAudioDecoderClass *oclass;
-
-  oclass = (QTWrapperAudioDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-
-  /* Sink pad */
-  qtwrapper->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
-  gst_pad_set_setcaps_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_audio_decoder_sink_setcaps));
-  gst_pad_set_chain_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_audio_decoder_chain));
-  gst_pad_set_event_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_audio_decoder_sink_event));
-  gst_element_add_pad (GST_ELEMENT (qtwrapper), qtwrapper->sinkpad);
-
-  /* Source pad */
-  qtwrapper->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
-  gst_element_add_pad (GST_ELEMENT (qtwrapper), qtwrapper->srcpad);
-}
-
-static void
-clear_AudioStreamBasicDescription (AudioStreamBasicDescription * desc)
-{
-  desc->mSampleRate = 0;
-  desc->mFormatID = 0;
-  desc->mFormatFlags = 0;
-  desc->mBytesPerPacket = 0;
-  desc->mFramesPerPacket = 0;
-  desc->mBytesPerFrame = 0;
-  desc->mChannelsPerFrame = 0;
-  desc->mBitsPerChannel = 0;
-  desc->mReserved = 0;
-}
-
-static void
-fill_indesc_mp3 (QTWrapperAudioDecoder * qtwrapper, guint32 fourcc, gint rate,
-    gint channels)
-{
-  GST_INFO_OBJECT (qtwrapper, "Filling input description for MP3 data");
-  clear_AudioStreamBasicDescription (&qtwrapper->indesc);
-  /* only the samplerate is needed apparently */
-  qtwrapper->indesc.mSampleRate = (double) rate;
-  qtwrapper->indesc.mFormatID = kAudioFormatMPEGLayer3;
-  qtwrapper->indesc.mChannelsPerFrame = channels;
-}
-
-static void
-fill_indesc_aac (QTWrapperAudioDecoder * qtwrapper, guint32 fourcc, gint rate,
-    gint channels)
-{
-  clear_AudioStreamBasicDescription (&qtwrapper->indesc);
-  qtwrapper->indesc.mSampleRate = (double) rate;
-  qtwrapper->indesc.mFormatID = kAudioFormatMPEG4AAC;
-  /* aac always has 1024 frames per packet */
-  qtwrapper->indesc.mFramesPerPacket = 1024;
-  qtwrapper->indesc.mChannelsPerFrame = channels;
-}
-
-static void
-fill_indesc_samr (QTWrapperAudioDecoder * qtwrapper, guint32 fourcc,
-    gint channels)
-{
-  clear_AudioStreamBasicDescription (&qtwrapper->indesc);
-  qtwrapper->indesc.mSampleRate = 8000;
-  qtwrapper->indesc.mFormatID = fourcc;
-  qtwrapper->indesc.mChannelsPerFrame = 1;
-  qtwrapper->indesc.mFramesPerPacket = 160;
-}
-
-static void
-fill_indesc_generic (QTWrapperAudioDecoder * qtwrapper, guint32 fourcc,
-    gint rate, gint channels)
-{
-  clear_AudioStreamBasicDescription (&qtwrapper->indesc);
-  qtwrapper->indesc.mSampleRate = rate;
-  qtwrapper->indesc.mFormatID = fourcc;
-  qtwrapper->indesc.mChannelsPerFrame = channels;
-}
-
-static void
-fill_indesc_alac (QTWrapperAudioDecoder * qtwrapper, guint32 fourcc,
-    gint rate, gint channels)
-{
-  clear_AudioStreamBasicDescription (&qtwrapper->indesc);
-  qtwrapper->indesc.mSampleRate = rate;
-  qtwrapper->indesc.mFormatID = fourcc;
-  qtwrapper->indesc.mChannelsPerFrame = channels;
-
-  // This has to be set, but the particular value doesn't seem to matter much
-  qtwrapper->indesc.mFramesPerPacket = 4096;
-}
-
-static gpointer
-make_alac_magic_cookie (GstBuffer * codec_data, gsize * len)
-{
-  guint8 *res;
-
-  if (GST_BUFFER_SIZE (codec_data) < 4)
-    return NULL;
-
-  *len = 20 + GST_BUFFER_SIZE (codec_data);
-  res = g_malloc0 (*len);
-
-  /* 12 first bytes are 'frma' (format) atom with 'alac' value */
-  GST_WRITE_UINT32_BE (res, 0xc);       /* Atom length: 12 bytes */
-  GST_WRITE_UINT32_LE (res + 4, QT_MAKE_FOURCC_BE ('f', 'r', 'm', 'a'));
-  GST_WRITE_UINT32_LE (res + 8, QT_MAKE_FOURCC_BE ('a', 'l', 'a', 'c'));
-
-  /* Write the codec_data, but with the first four bytes reversed (different
-     endianness). This is the 'alac' atom. */
-  GST_WRITE_UINT32_BE (res + 12,
-      GST_READ_UINT32_LE (GST_BUFFER_DATA (codec_data)));
-  memcpy (res + 16, GST_BUFFER_DATA (codec_data) + 4,
-      GST_BUFFER_SIZE (codec_data) - 4);
-
-  /* Terminator atom */
-  GST_WRITE_UINT32_BE (res + 12 + GST_BUFFER_SIZE (codec_data), 8);
-  GST_WRITE_UINT32_BE (res + 12 + GST_BUFFER_SIZE (codec_data) + 4, 0);
-
-  return res;
-}
-
-static gpointer
-make_samr_magic_cookie (GstBuffer * codec_data, gsize * len)
-{
-  guint8 *res;
-
-  *len = 48;
-  res = g_malloc0 (0x30);
-
-  /* 12 first bytes are 'frma' (format) atom with 'samr' value */
-  GST_WRITE_UINT32_BE (res, 0xc);
-  GST_WRITE_UINT32_LE (res + 4, QT_MAKE_FOURCC_BE ('f', 'r', 'm', 'a'));
-  GST_WRITE_UINT32_LE (res + 8, QT_MAKE_FOURCC_BE ('s', 'a', 'm', 'r'));
-
-  /* 10 bytes for 'enda' atom with 0 */
-  GST_WRITE_UINT32_BE (res + 12, 10);
-  GST_WRITE_UINT32_LE (res + 16, QT_MAKE_FOURCC_BE ('e', 'n', 'd', 'a'));
-
-  /* 17(+1) bytes for the codec_data contents */
-  GST_WRITE_UINT32_BE (res + 22, 18);
-  memcpy (res + 26, GST_BUFFER_DATA (codec_data) + 4, 17);
-
-  /* yes... we need to replace 'damr' by 'samr'. Blame Apple ! */
-  GST_WRITE_UINT8 (res + 26, 's');
-
-  /* Terminator atom */
-  GST_WRITE_UINT32_BE (res + 40, 8);
-
-#if DEBUG_DUMP
-  gst_util_dump_mem (res, 48);
-#endif
-
-  return res;
-}
-
-static int
-write_len (guint8 * buf, int val)
-{
-  /* This is some sort of variable-length coding, but the quicktime
-   * file(s) I have here all just use a 4-byte version, so we'll do that.
-   * Return the number of bytes written;
-   */
-  buf[0] = ((val >> 21) & 0x7f) | 0x80;
-  buf[1] = ((val >> 14) & 0x7f) | 0x80;
-  buf[2] = ((val >> 7) & 0x7f) | 0x80;
-  buf[3] = ((val >> 0) & 0x7f);
-
-  return 4;
-}
-
-static void
-aac_parse_codec_data (GstBuffer * codec_data, gint * channels)
-{
-  guint8 *data = GST_BUFFER_DATA (codec_data);
-  guint codec_channels;
-
-  if (GST_BUFFER_SIZE (codec_data) < 2) {
-    GST_WARNING ("Cannot parse codec_data for channel count");
-    return;
-  }
-
-  codec_channels = (data[1] & 0x7f) >> 3;
-
-  if (*channels != codec_channels) {
-    GST_INFO ("Overwriting channels %d with %d", *channels, codec_channels);
-    *channels = (gint) codec_channels;
-  } else {
-    GST_INFO ("Retaining channel count %d", codec_channels);
-  }
-}
-
-/* The AAC decoder requires the entire mpeg4 audio elementary stream 
- * descriptor, which is the body (except the 4-byte version field) of
- * the quicktime 'esds' atom. However, qtdemux only passes through the 
- * (two byte, normally) payload, so we need to reconstruct the ESD */
-
-/* TODO: Get the AAC spec, and verify this implementation */
-static gpointer
-make_aac_magic_cookie (GstBuffer * codec_data, gsize * len)
-{
-  guint8 *cookie;
-  int offset = 0;
-  int decoder_specific_len = GST_BUFFER_SIZE (codec_data);
-  int config_len = 13 + 5 + decoder_specific_len;
-  int es_len = 3 + 5 + config_len + 5 + 1;
-  int total_len = es_len + 5;
-
-  cookie = g_malloc0 (total_len);
-  *len = total_len;
-
-  /* Structured something like this:
-   * [ES Descriptor
-   *  [Config Descriptor
-   *   [Specific Descriptor]]
-   *  [Unknown]]
-   */
-
-  QT_WRITE_UINT8 (cookie + offset, 0x03);
-  offset += 1;                  /* ES Descriptor tag */
-  offset += write_len (cookie + offset, es_len);
-  QT_WRITE_UINT16 (cookie + offset, 0);
-  offset += 2;                  /* Track ID */
-  QT_WRITE_UINT8 (cookie + offset, 0);
-  offset += 1;                  /* Flags */
-
-  QT_WRITE_UINT8 (cookie + offset, 0x04);
-  offset += 1;                  /* Config Descriptor tag */
-  offset += write_len (cookie + offset, config_len);
-
-  /* TODO: Fix these up */
-  QT_WRITE_UINT8 (cookie + offset, 0x40);
-  offset += 1;                  /* object_type_id */
-  QT_WRITE_UINT8 (cookie + offset, 0x15);
-  offset += 1;                  /* stream_type */
-  QT_WRITE_UINT24 (cookie + offset, 0x1800);
-  offset += 3;                  /* buffer_size_db */
-  QT_WRITE_UINT32 (cookie + offset, 128000);
-  offset += 4;                  /* max_bitrate */
-  QT_WRITE_UINT32 (cookie + offset, 128000);
-  offset += 4;                  /* avg_bitrate */
-
-  QT_WRITE_UINT8 (cookie + offset, 0x05);
-  offset += 1;                  /* Specific Descriptor tag */
-  offset += write_len (cookie + offset, decoder_specific_len);
-  memcpy (cookie + offset, GST_BUFFER_DATA (codec_data), decoder_specific_len);
-  offset += decoder_specific_len;
-
-  /* TODO: What is this? 'SL descriptor' apparently, but what does that mean? */
-  QT_WRITE_UINT8 (cookie + offset, 0x06);
-  offset += 1;                  /* SL Descriptor tag */
-  offset += write_len (cookie + offset, 1);
-  QT_WRITE_UINT8 (cookie + offset, 2);
-  offset += 1;
-
-  return cookie;
-}
-
-static void
-close_decoder (QTWrapperAudioDecoder * qtwrapper)
-{
-  if (qtwrapper->adec) {
-    CloseComponent (qtwrapper->adec);
-    qtwrapper->adec = NULL;
-  }
-
-  if (qtwrapper->bufferlist) {
-    DestroyAudioBufferList (qtwrapper->bufferlist);
-    qtwrapper->bufferlist = NULL;
-  }
-}
-
-static gboolean
-open_decoder (QTWrapperAudioDecoder * qtwrapper, GstCaps * caps,
-    GstCaps ** othercaps)
-{
-  gboolean ret = FALSE;
-  QTWrapperAudioDecoderClass *oclass;
-
-  /* TODO: these will be used as the output rate/channels for formats that
-   * don't supply these in the caps. This isn't very nice!
-   */
-  gint channels = 2;
-  gint rate = 44100;
-
-  OSStatus status;
-  GstStructure *s;
-  gchar *tmp;
-  const GValue *value;
-  GstBuffer *codec_data = NULL;
-  gboolean have_esds = FALSE;
-
-  /* Clean up any existing decoder */
-  close_decoder (qtwrapper);
-
-  tmp = gst_caps_to_string (caps);
-  GST_LOG_OBJECT (qtwrapper, "caps: %s", tmp);
-  g_free (tmp);
-
-  /* extract rate/channels information from the caps */
-  s = gst_caps_get_structure (caps, 0);
-  gst_structure_get_int (s, "rate", &rate);
-  gst_structure_get_int (s, "channels", &channels);
-
-  /* get codec_data */
-  if ((value = gst_structure_get_value (s, "codec_data"))) {
-    codec_data = GST_BUFFER_CAST (gst_value_get_mini_object (value));
-  }
-
-  oclass = (QTWrapperAudioDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-
-  if (codec_data
-      && oclass->componentSubType == QT_MAKE_FOURCC_LE ('m', 'p', '4', 'a')) {
-    /* QuickTime/iTunes creates AAC files with the wrong channel count in the header,
-       so parse that out of the codec data if we can.
-     */
-    aac_parse_codec_data (codec_data, &channels);
-  }
-
-  /* If the quicktime demuxer gives us a full esds atom, use that instead of 
-   * the codec_data */
-  if ((value = gst_structure_get_value (s, "quicktime_esds"))) {
-    have_esds = TRUE;
-    codec_data = GST_BUFFER_CAST (gst_value_get_mini_object (value));
-  }
-#if DEBUG_DUMP
-  if (codec_data)
-    gst_util_dump_mem (GST_BUFFER_DATA (codec_data),
-        GST_BUFFER_SIZE (codec_data));
-#endif
-
-
-  GST_INFO_OBJECT (qtwrapper, "rate:%d, channels:%d", rate, channels);
-
-  GST_INFO_OBJECT (qtwrapper, "componentSubType is %" GST_FOURCC_FORMAT,
-      QT_FOURCC_ARGS (oclass->componentSubType));
-
-  /* Setup the input format description, some format require special handling */
-  switch (oclass->componentSubType) {
-    case QT_MAKE_FOURCC_LE ('.', 'm', 'p', '3'):
-      fill_indesc_mp3 (qtwrapper, oclass->componentSubType, rate, channels);
-      break;
-    case QT_MAKE_FOURCC_LE ('m', 'p', '4', 'a'):
-      fill_indesc_aac (qtwrapper, oclass->componentSubType, rate, channels);
-      break;
-    case QT_MAKE_FOURCC_LE ('s', 'a', 'm', 'r'):
-      fill_indesc_samr (qtwrapper, oclass->componentSubType, channels);
-      rate = 8000;
-      break;
-    case QT_MAKE_FOURCC_LE ('a', 'l', 'a', 'c'):
-      fill_indesc_alac (qtwrapper, oclass->componentSubType, rate, channels);
-      break;
-    default:
-      fill_indesc_generic (qtwrapper, oclass->componentSubType, rate, channels);
-      break;
-  }
-
-#if DEBUG_DUMP
-  gst_util_dump_mem ((gpointer) & qtwrapper->indesc,
-      sizeof (AudioStreamBasicDescription));
-#endif
-
-  qtwrapper->samplerate = rate;
-  qtwrapper->channels = channels;
-
-  /* Create an instance of SCAudio */
-  status = OpenADefaultComponent (StandardCompressionType,
-      StandardCompressionSubTypeAudio, &qtwrapper->adec);
-  if (status) {
-    GST_WARNING_OBJECT (qtwrapper,
-        "Error instantiating SCAudio component: %ld", status);
-    qtwrapper->adec = NULL;
-    goto beach;
-  }
-
-  /* This is necessary to make setting the InputBasicDescription succeed;
-     without it SCAudio only accepts PCM as input. Presumably a bug in
-     QuickTime. Thanks to Arek for figuring this one out!
-   */
-  {
-    QTAtomContainer audiosettings = NULL;
-
-    SCGetSettingsAsAtomContainer (qtwrapper->adec, &audiosettings);
-    SCSetSettingsFromAtomContainer (qtwrapper->adec, audiosettings);
-
-    /* TODO: Figure out if disposing of the QTAtomContainer is needed here */
-  }
-
-  /* Set the input description info on the SCAudio instance */
-  status = QTSetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-      kQTSCAudioPropertyID_InputBasicDescription,
-      sizeof (qtwrapper->indesc), &qtwrapper->indesc);
-  if (status) {
-    GST_WARNING_OBJECT (qtwrapper,
-        "Error setting input description on SCAudio: %ld", status);
-
-    GST_ELEMENT_ERROR (qtwrapper, STREAM, NOT_IMPLEMENTED,
-        ("A QuickTime error occurred trying to decode this stream"),
-        ("QuickTime returned error status %lx", status));
-    goto beach;
-  }
-
-  /* TODO: we can select a channel layout here, figure out if we want to */
-
-  /* if we have codec_data, give it to the converter ! */
-  if (codec_data) {
-    gsize len = 0;
-    gpointer magiccookie;
-
-    switch (oclass->componentSubType) {
-        /* Some decoders want the 'magic cookie' in a different format from how
-         * gstreamer represents it. So, convert...
-         */
-      case QT_MAKE_FOURCC_LE ('s', 'a', 'm', 'r'):
-        magiccookie = make_samr_magic_cookie (codec_data, &len);
-        break;
-      case QT_MAKE_FOURCC_LE ('a', 'l', 'a', 'c'):
-        magiccookie = make_alac_magic_cookie (codec_data, &len);
-        break;
-      case QT_MAKE_FOURCC_LE ('m', 'p', '4', 'a'):
-        if (!have_esds) {
-          magiccookie = make_aac_magic_cookie (codec_data, &len);
-          break;
-        }
-        /* Else: fallthrough */
-      default:
-        len = GST_BUFFER_SIZE (codec_data);
-        magiccookie = GST_BUFFER_DATA (codec_data);
-        break;
-    }
-
-    if (magiccookie) {
-      GST_LOG_OBJECT (qtwrapper, "Setting magic cookie %p of size %"
-          G_GSIZE_FORMAT, magiccookie, len);
-
-#if DEBUG_DUMP
-      gst_util_dump_mem (magiccookie, len);
-#endif
-
-      status =
-          QTSetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-          kQTSCAudioPropertyID_InputMagicCookie, len, magiccookie);
-      if (status) {
-        GST_WARNING_OBJECT (qtwrapper, "Error setting extra codec data: %ld",
-            status);
-        goto beach;
-      }
-
-      g_free (magiccookie);
-    }
-  }
-
-  /* Set output to be interleaved raw PCM */
-  {
-    OSType outputFormat = kAudioFormatLinearPCM;
-    SCAudioFormatFlagsRestrictions restrictions = { 0 };
-
-    /* Set the mask in order to set this flag to zero */
-    restrictions.formatFlagsMask =
-        kAudioFormatFlagIsFloat | kAudioFormatFlagIsBigEndian;
-    restrictions.formatFlagsValues = kAudioFormatFlagIsFloat;
-
-    status = QTSetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-        kQTSCAudioPropertyID_ClientRestrictedLPCMFlags,
-        sizeof (restrictions), &restrictions);
-    if (status) {
-      GST_WARNING_OBJECT (qtwrapper, "Error setting PCM to interleaved: %ld",
-          status);
-      goto beach;
-    }
-
-    status = QTSetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-        kQTSCAudioPropertyID_ClientRestrictedCompressionFormatList,
-        sizeof (outputFormat), &outputFormat);
-    if (status) {
-      GST_WARNING_OBJECT (qtwrapper, "Error setting output to PCM: %ld",
-          status);
-      goto beach;
-    }
-  }
-
-  qtwrapper->outdesc.mSampleRate = 0;   /* Use recommended; we read this out later */
-  qtwrapper->outdesc.mFormatID = kAudioFormatLinearPCM;
-  qtwrapper->outdesc.mFormatFlags = kAudioFormatFlagIsFloat;
-  qtwrapper->outdesc.mBytesPerPacket = 0;
-  qtwrapper->outdesc.mFramesPerPacket = 0;
-  qtwrapper->outdesc.mBytesPerFrame = 4 * channels;
-  qtwrapper->outdesc.mChannelsPerFrame = channels;
-  qtwrapper->outdesc.mBitsPerChannel = 32;
-  qtwrapper->outdesc.mReserved = 0;
-
-  status = QTSetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-      kQTSCAudioPropertyID_BasicDescription,
-      sizeof (qtwrapper->outdesc), &qtwrapper->outdesc);
-  if (status) {
-    GST_WARNING_OBJECT (qtwrapper, "Error setting output description: %ld",
-        status);
-    goto beach;
-  }
-
-  status = QTGetComponentProperty (qtwrapper->adec, kQTPropertyClass_SCAudio,
-      kQTSCAudioPropertyID_BasicDescription,
-      sizeof (qtwrapper->outdesc), &qtwrapper->outdesc, NULL);
-
-  if (status) {
-    GST_WARNING_OBJECT (qtwrapper,
-        "Failed to get output audio description: %ld", status);
-    ret = FALSE;
-    goto beach;
-  }
-
-  if (qtwrapper->outdesc.mFormatID != kAudioFormatLinearPCM     /*||
-                                                                   (qtwrapper->outdesc.mFormatFlags & kAudioFormatFlagIsFloat) !=
-                                                                   kAudioFormatFlagIsFloat */ ) {
-    GST_WARNING_OBJECT (qtwrapper, "Output is not floating point PCM");
-    ret = FALSE;
-    goto beach;
-  }
-
-  qtwrapper->samplerate = (int) qtwrapper->outdesc.mSampleRate;
-  qtwrapper->channels = qtwrapper->outdesc.mChannelsPerFrame;
-  GST_DEBUG_OBJECT (qtwrapper, "Output is %d Hz, %d channels",
-      qtwrapper->samplerate, qtwrapper->channels);
-
-  /* Create output bufferlist, big enough for 200ms of audio */
-  GST_DEBUG_OBJECT (qtwrapper, "Allocating bufferlist for %d channels",
-      channels);
-  qtwrapper->bufferlist =
-      AllocateAudioBufferList (channels,
-      qtwrapper->samplerate / 5 * qtwrapper->channels * 4);
-
-  /* Create output caps matching the format the component is giving us */
-  *othercaps = gst_caps_new_simple ("audio/x-raw-float",
-      "endianness", G_TYPE_INT, G_BYTE_ORDER,
-      "signed", G_TYPE_BOOLEAN, TRUE,
-      "width", G_TYPE_INT, 32,
-      "depth", G_TYPE_INT, 32,
-      "rate", G_TYPE_INT, qtwrapper->samplerate, "channels", G_TYPE_INT,
-      qtwrapper->channels, NULL);
-
-  ret = TRUE;
-
-beach:
-  return ret;
-}
-
-static gboolean
-qtwrapper_audio_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
-{
-  QTWrapperAudioDecoder *qtwrapper;
-  gboolean ret = FALSE;
-  GstCaps *othercaps = NULL;
-
-  qtwrapper = (QTWrapperAudioDecoder *) gst_pad_get_parent (pad);
-
-  GST_LOG_OBJECT (qtwrapper, "caps:%" GST_PTR_FORMAT, caps);
-
-  /* 1. open decoder */
-  if (!(open_decoder (qtwrapper, caps, &othercaps)))
-    goto beach;
-
-  /* 2. set caps downstream */
-  ret = gst_pad_set_caps (qtwrapper->srcpad, othercaps);
-
-beach:
-  if (othercaps)
-    gst_caps_unref (othercaps);
-  gst_object_unref (qtwrapper);
-  return ret;
-}
-
-static OSStatus
-process_buffer_cb (ComponentInstance inAudioConverter,
-    UInt32 * ioNumberDataPackets,
-    AudioBufferList * ioData,
-    AudioStreamPacketDescription ** outDataPacketDescription,
-    QTWrapperAudioDecoder * qtwrapper)
-{
-  GST_LOG_OBJECT (qtwrapper,
-      "ioNumberDataPackets:%lu, iodata:%p, outDataPacketDescription:%p",
-      *ioNumberDataPackets, ioData, outDataPacketDescription);
-  if (outDataPacketDescription)
-    GST_LOG ("*outDataPacketDescription:%p", *outDataPacketDescription);
-
-  GST_LOG ("mNumberBuffers : %u", (guint32) ioData->mNumberBuffers);
-  GST_LOG ("mData:%p , mDataByteSize:%u",
-      ioData->mBuffers[0].mData, (guint32) ioData->mBuffers[0].mDataByteSize);
-
-  ioData->mBuffers[0].mData = NULL;
-  ioData->mBuffers[0].mDataByteSize = 0;
-
-  *ioNumberDataPackets = 1;
-
-  if (qtwrapper->input_buffer && GST_BUFFER_SIZE (qtwrapper->input_buffer)) {
-    ioData->mBuffers[0].mData = GST_BUFFER_DATA (qtwrapper->input_buffer);
-    ioData->mBuffers[0].mDataByteSize =
-        GST_BUFFER_SIZE (qtwrapper->input_buffer);
-
-    /* if we have a valid outDataPacketDescription, we need to fill it */
-    if (outDataPacketDescription) {
-      qtwrapper->aspd[0].mStartOffset = 0;
-      qtwrapper->aspd[0].mVariableFramesInPacket = 0;
-      qtwrapper->aspd[0].mDataByteSize =
-          GST_BUFFER_SIZE (qtwrapper->input_buffer);
-      *outDataPacketDescription = qtwrapper->aspd;
-    }
-
-    GST_LOG_OBJECT (qtwrapper, "returning %d bytes at %p",
-        GST_BUFFER_SIZE (qtwrapper->input_buffer), ioData->mBuffers[0].mData);
-
-    qtwrapper->input_buffer = 0;
-    return noErr;
-  }
-
-  GST_LOG_OBJECT (qtwrapper,
-      "No remaining input data, returning NO_MORE_INPUT_DATA");
-
-  return NO_MORE_INPUT_DATA;
-}
-
-static GstFlowReturn
-qtwrapper_audio_decoder_chain (GstPad * pad, GstBuffer * buf)
-{
-  GstFlowReturn ret = GST_FLOW_OK;
-  QTWrapperAudioDecoder *qtwrapper;
-  GstBuffer *outbuf;
-  OSStatus status;
-  guint32 outsamples;
-  guint32 savedbytes;
-  guint32 realbytes;
-
-  qtwrapper = (QTWrapperAudioDecoder *) gst_pad_get_parent (pad);
-
-  if (!qtwrapper->adec) {
-    GST_WARNING_OBJECT (qtwrapper, "QTWrapper not initialised");
-    goto beach;
-  }
-
-  GST_LOG_OBJECT (qtwrapper,
-      "buffer:%p , timestamp:%" GST_TIME_FORMAT " ,size:%d", buf,
-      GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_BUFFER_SIZE (buf));
-
-#if DEBUG_DUMP
-  gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
-#endif
-
-  if (qtwrapper->gotnewsegment) {
-
-    GST_DEBUG_OBJECT (qtwrapper, "SCAudioReset()");
-
-    SCAudioReset (qtwrapper->adec);
-
-    /* some formats can give us a better initial time using the buffer
-     * timestamp. */
-    if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
-      qtwrapper->initial_time = GST_BUFFER_TIMESTAMP (buf);
-
-    qtwrapper->gotnewsegment = FALSE;
-  }
-
-  outsamples = qtwrapper->bufferlist->mBuffers[0].mDataByteSize / 8;
-  savedbytes = qtwrapper->bufferlist->mBuffers[0].mDataByteSize;
-
-  qtwrapper->input_buffer = buf;
-
-  do {
-    GST_LOG_OBJECT (qtwrapper,
-        "Calling SCAudioFillBuffer(outsamples:%d , outdata:%p)", outsamples,
-        qtwrapper->bufferlist->mBuffers[0].mData);
-
-    /* Ask SCAudio to give us data ! */
-    status = SCAudioFillBuffer (qtwrapper->adec,
-        (SCAudioInputDataProc) process_buffer_cb,
-        qtwrapper, (UInt32 *) & outsamples, qtwrapper->bufferlist, NULL);
-
-    if ((status != noErr) && (status != NO_MORE_INPUT_DATA)) {
-      if (status < 0)
-        GST_WARNING_OBJECT (qtwrapper,
-            "Error in SCAudioFillBuffer() : %d", (gint32) status);
-      else
-        GST_WARNING_OBJECT (qtwrapper,
-            "Error in SCAudioFillBuffer() : %" GST_FOURCC_FORMAT,
-            QT_FOURCC_ARGS (status));
-      ret = GST_FLOW_ERROR;
-      goto beach;
-    }
-
-    realbytes = qtwrapper->bufferlist->mBuffers[0].mDataByteSize;
-
-    GST_LOG_OBJECT (qtwrapper, "We now have %d samples [%d bytes]",
-        outsamples, realbytes);
-
-    qtwrapper->bufferlist->mBuffers[0].mDataByteSize = savedbytes;
-
-    if (!outsamples)
-      goto beach;
-
-    /* 4. Create buffer and copy data in it */
-    ret = gst_pad_alloc_buffer (qtwrapper->srcpad, qtwrapper->cur_offset,
-        realbytes, GST_PAD_CAPS (qtwrapper->srcpad), &outbuf);
-    if (ret != GST_FLOW_OK)
-      goto beach;
-
-    /* copy data from bufferlist to output buffer */
-    memmove (GST_BUFFER_DATA (outbuf),
-        qtwrapper->bufferlist->mBuffers[0].mData, realbytes);
-
-    /* 5. calculate timestamp and duration */
-    GST_BUFFER_TIMESTAMP (outbuf) =
-        qtwrapper->initial_time + gst_util_uint64_scale_int (GST_SECOND,
-        (gint) qtwrapper->cur_offset, qtwrapper->samplerate);
-    GST_BUFFER_SIZE (outbuf) = realbytes;
-    GST_BUFFER_DURATION (outbuf) =
-        gst_util_uint64_scale_int (GST_SECOND,
-        realbytes / (qtwrapper->channels * 4), qtwrapper->samplerate);
-
-    GST_LOG_OBJECT (qtwrapper,
-        "timestamp:%" GST_TIME_FORMAT ", duration:%" GST_TIME_FORMAT
-        "offset:%lld, offset_end:%lld",
-        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
-        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
-        GST_BUFFER_OFFSET (outbuf), GST_BUFFER_OFFSET_END (outbuf));
-
-    qtwrapper->cur_offset += outsamples;
-
-    /* 6. push buffer downstream */
-
-    ret = gst_pad_push (qtwrapper->srcpad, outbuf);
-    if (ret != GST_FLOW_OK)
-      goto beach;
-
-    GST_DEBUG_OBJECT (qtwrapper,
-        "Read %d bytes, could have read up to %d bytes", realbytes, savedbytes);
-  } while (status != NO_MORE_INPUT_DATA);
-
-beach:
-  gst_buffer_unref (buf);
-  gst_object_unref (qtwrapper);
-  return ret;
-}
-
-static gboolean
-qtwrapper_audio_decoder_sink_event (GstPad * pad, GstEvent * event)
-{
-  QTWrapperAudioDecoder *qtwrapper;
-  gboolean ret = FALSE;
-
-  qtwrapper = (QTWrapperAudioDecoder *) gst_pad_get_parent (pad);
-
-  GST_LOG_OBJECT (qtwrapper, "event:%s", GST_EVENT_TYPE_NAME (event));
-
-  switch (GST_EVENT_TYPE (event)) {
-      /* TODO: Flush events should reset the decoder component */
-    case GST_EVENT_NEWSEGMENT:{
-      gint64 start, stop, position;
-      gboolean update;
-      gdouble rate;
-      GstFormat format;
-
-      GST_LOG ("We've got a newsegment");
-      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
-          &stop, &position);
-
-      /* if the format isn't time, we need to create a new time newsegment */
-      /* FIXME : This is really bad, we should convert the values properly to time */
-      if (format != GST_FORMAT_TIME) {
-        GstEvent *newevent;
-
-        GST_WARNING_OBJECT (qtwrapper,
-            "Original event wasn't in GST_FORMAT_TIME, creating new fake one.");
-
-        start = 0;
-
-        newevent =
-            gst_event_new_new_segment (update, rate, GST_FORMAT_TIME, start,
-            GST_CLOCK_TIME_NONE, start);
-        gst_event_unref (event);
-        event = newevent;
-      }
-
-      qtwrapper->initial_time = start;
-      qtwrapper->cur_offset = 0;
-
-      GST_LOG ("initial_time is now %" GST_TIME_FORMAT, GST_TIME_ARGS (start));
-
-      if (qtwrapper->adec)
-        qtwrapper->gotnewsegment = TRUE;
-
-      break;
-    }
-    default:
-      break;
-  }
-
-  ret = gst_pad_push_event (qtwrapper->srcpad, event);
-
-  gst_object_unref (qtwrapper);
-  return TRUE;
-}
-
-static void
-qtwrapper_audio_decoder_base_init (QTWrapperAudioDecoderClass * klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  gchar *name = NULL;
-  gchar *info = NULL;
-  char *longname, *description;
-  ComponentDescription desc;
-  QTWrapperAudioDecoderParams *params;
-
-  params = (QTWrapperAudioDecoderParams *)
-      g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
-      QTWRAPPER_ADEC_PARAMS_QDATA);
-  g_assert (params);
-
-  get_name_info_from_component (params->component, &desc, &name, &info);
-
-  /* Fill in details */
-  longname =
-      g_strdup_printf ("QTWrapper SCAudio Audio Decoder : %s",
-      GST_STR_NULL (name));
-  description =
-      g_strdup_printf ("QTWrapper SCAudio wrapper for decoder: %s",
-      GST_STR_NULL (info));
-  gst_element_class_set_metadata (element_class,
-      longname, "Codec/Decoder/Audio", description,
-      "Fluendo <gstreamer@fluendo.com>, "
-      "Pioneers of the Inevitable <songbird@songbirdnest.com>");
-
-  g_free (longname);
-  g_free (description);
-  g_free (name);
-  g_free (info);
-
-  /* Add pad templates */
-  klass->sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK,
-      GST_PAD_ALWAYS, params->sinkcaps);
-  gst_element_class_add_pad_template (element_class, klass->sinktempl);
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_templ));
-
-  /* Store class-global values */
-  klass->componentSubType = desc.componentSubType;
-}
-
-static void
-qtwrapper_audio_decoder_dispose (GObject * object)
-{
-  QTWrapperAudioDecoder *qtwrapper = (QTWrapperAudioDecoder *) object;
-  QTWrapperAudioDecoderClass *oclass =
-      (QTWrapperAudioDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-  GObjectClass *parent_class = g_type_class_peek_parent (oclass);
-
-  close_decoder (qtwrapper);
-
-  G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-qtwrapper_audio_decoder_class_init (QTWrapperAudioDecoderClass * klass)
-{
-  GObjectClass *object_class;
-
-  object_class = (GObjectClass *) klass;
-
-  object_class->dispose = qtwrapper_audio_decoder_dispose;
-}
-
-gboolean
-qtwrapper_audio_decoders_register (GstPlugin * plugin)
-{
-  gboolean res = TRUE;
-  Component componentID = NULL;
-
-  ComponentDescription desc = {
-    kSoundDecompressor, 0, 0, 0, 0
-  };
-
-  GTypeInfo typeinfo = {
-    sizeof (QTWrapperAudioDecoderClass),
-    (GBaseInitFunc) qtwrapper_audio_decoder_base_init,
-    NULL,
-    (GClassInitFunc) qtwrapper_audio_decoder_class_init,
-    NULL,
-    NULL,
-    sizeof (QTWrapperAudioDecoder),
-    0,
-    (GInstanceInitFunc) qtwrapper_audio_decoder_init,
-  };
-
-  /* Find all SoundDecompressors ! */
-  GST_DEBUG ("There are %ld decompressors available", CountComponents (&desc));
-
-  /* loop over SoundDecompressors */
-  do {
-    componentID = FindNextComponent (componentID, &desc);
-
-    GST_LOG ("componentID : %p", componentID);
-
-    if (componentID) {
-      ComponentDescription thisdesc;
-      gchar *name = NULL, *info = NULL;
-      GstCaps *caps = NULL;
-      gchar *type_name = NULL;
-      GType type;
-      QTWrapperAudioDecoderParams *params = NULL;
-
-      if (!(get_name_info_from_component (componentID, &thisdesc, &name,
-                  &info)))
-        goto next;
-
-      GST_LOG (" name:%s", GST_STR_NULL (name));
-      GST_LOG (" info:%s", GST_STR_NULL (info));
-
-      GST_LOG (" type:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentType));
-      GST_LOG (" subtype:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentSubType));
-      GST_LOG (" manufacturer:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentManufacturer));
-
-      if (!(caps =
-              fourcc_to_caps (QT_READ_UINT32 (&thisdesc.componentSubType))))
-        goto next;
-
-      type_name = g_strdup_printf ("qtwrapperaudiodec_%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentSubType));
-      g_strdelimit (type_name, " .", '_');
-
-      if (g_type_from_name (type_name)) {
-        GST_WARNING ("We already have a registered plugin for %s", type_name);
-        goto next;
-      }
-
-      params = g_new0 (QTWrapperAudioDecoderParams, 1);
-      params->component = componentID;
-      params->sinkcaps = gst_caps_ref (caps);
-
-      type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
-      /* Store params in type qdata */
-      g_type_set_qdata (type, QTWRAPPER_ADEC_PARAMS_QDATA, (gpointer) params);
-
-      /* register type */
-      if (!gst_element_register (plugin, type_name, GST_RANK_MARGINAL, type)) {
-        g_warning ("Failed to register %s", type_name);;
-        g_type_set_qdata (type, QTWRAPPER_ADEC_PARAMS_QDATA, NULL);
-        g_free (params);
-        res = FALSE;
-        goto next;
-      }
-
-    next:
-      if (name)
-        g_free (name);
-      if (info)
-        g_free (info);
-      if (type_name)
-        g_free (type_name);
-      if (caps)
-        gst_caps_unref (caps);
-    }
-
-  } while (componentID && res);
-
-  return res;
-}
diff --git a/sys/qtwrapper/codecmapping.c b/sys/qtwrapper/codecmapping.c
deleted file mode 100644
index a0a0796..0000000
--- a/sys/qtwrapper/codecmapping.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * GStreamer QuickTime codec mapping
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "qtwrapper.h"
-#include "codecmapping.h"
-#include "qtutils.h"
-
-static GstCaps *
-audio_caps_from_string (const gchar * str)
-{
-  GstCaps *res;
-
-  res = gst_caps_from_string (str);
-  gst_caps_set_simple (res,
-      "rate", GST_TYPE_INT_RANGE, 8000, 96000,
-      "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
-
-  return res;
-}
-
-GstCaps *
-fourcc_to_caps (guint32 fourcc)
-{
-  GstCaps *caps = NULL;
-
-  GST_DEBUG ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
-
-  switch (fourcc) {
-      /* VIDEO */
-    case QT_MAKE_FOURCC_LE ('S', 'V', 'Q', '1'):
-      caps = gst_caps_new_simple ("video/x-svq",
-          "svqversion", G_TYPE_INT, 1, NULL);
-      break;
-    case QT_MAKE_FOURCC_LE ('S', 'V', 'Q', '3'):
-      caps = gst_caps_new_simple ("video/x-svq",
-          "svqversion", G_TYPE_INT, 3, NULL);
-      break;
-    case QT_MAKE_FOURCC_LE ('a', 'v', 'c', '1'):
-      caps = gst_caps_from_string ("video/x-h264");
-      break;
-    case QT_MAKE_FOURCC_LE ('m', 'p', '4', 'v'):
-      caps =
-          gst_caps_from_string
-          ("video/mpeg,mpegversion=4,systemstream=(boolean)false");
-      break;
-    case QT_MAKE_FOURCC_LE ('m', 'p', 'e', 'g'):
-      caps = gst_caps_from_string ("video/mpeg, "
-          "systemstream = (boolean) false, " "mpegversion = (int) 1");
-      break;
-    case QT_MAKE_FOURCC_LE ('h', '2', '6', '3'):
-    case QT_MAKE_FOURCC_LE ('H', '2', '6', '3'):
-    case QT_MAKE_FOURCC_LE ('s', '2', '6', '3'):
-    case QT_MAKE_FOURCC_LE ('U', '2', '6', '3'):
-      caps = gst_caps_from_string ("video/x-h263");
-      break;
-    case QT_MAKE_FOURCC_LE ('c', 'v', 'i', 'd'):
-      caps = gst_caps_from_string ("video/x-cinepak");
-      break;
-    case QT_MAKE_FOURCC_LE ('d', 'v', 'c', 'p'):
-    case QT_MAKE_FOURCC_LE ('d', 'v', 'c', ' '):
-    case QT_MAKE_FOURCC_LE ('d', 'v', 's', 'd'):
-    case QT_MAKE_FOURCC_LE ('D', 'V', 'S', 'D'):
-    case QT_MAKE_FOURCC_LE ('d', 'v', 'c', 's'):
-    case QT_MAKE_FOURCC_LE ('D', 'V', 'C', 'S'):
-    case QT_MAKE_FOURCC_LE ('d', 'v', '2', '5'):
-    case QT_MAKE_FOURCC_LE ('d', 'v', 'p', 'p'):
-      caps = gst_caps_from_string ("video/x-dv, systemstream=(boolean)false");
-      break;
-
-      /* AUDIO */
-    case QT_MAKE_FOURCC_LE ('.', 'm', 'p', '3'):
-      caps =
-          audio_caps_from_string
-          ("audio/mpeg,mpegversion=1,layer=3,parsed=(boolean)true");
-      break;
-    case QT_MAKE_FOURCC_LE ('Q', 'D', 'M', '2'):
-      caps = audio_caps_from_string ("audio/x-qdm2");
-      break;
-    case QT_MAKE_FOURCC_LE ('a', 'g', 's', 'm'):
-      caps = audio_caps_from_string ("audio/x-gsm");
-      break;
-    case QT_MAKE_FOURCC_LE ('a', 'l', 'a', 'c'):
-      caps = audio_caps_from_string ("audio/x-alac");
-      break;
-    case QT_MAKE_FOURCC_LE ('a', 'l', 'a', 'w'):
-      caps = audio_caps_from_string ("audio/x-alaw");
-      break;
-    case QT_MAKE_FOURCC_LE ('m', 'p', '4', 'a'):
-    case QT_MAKE_FOURCC_LE ('a', 'a', 'c', ' '):
-      caps = audio_caps_from_string ("audio/mpeg,mpegversion=4");
-      break;
-    case QT_MAKE_FOURCC_LE ('s', 'a', 'm', 'r'):
-      caps = audio_caps_from_string ("audio/AMR");
-      break;
-    case QT_MAKE_FOURCC_LE ('u', 'l', 'a', 'w'):
-      caps = audio_caps_from_string ("audio/x-mulaw");
-      break;
-    case QT_MAKE_FOURCC_LE ('A', 'V', 'd', 'n'):
-      caps = audio_caps_from_string ("video/x-dnxhd");
-      break;
-    case QT_MAKE_FOURCC_LE ('i', 'c', 'o', 'd'):
-      caps = audio_caps_from_string ("video/x-apple-intermediate-codec");
-      break;
-      /* TO FILL !! */
-    case QT_MAKE_FOURCC_LE ('M', 'A', 'C', '3'):
-    case QT_MAKE_FOURCC_LE ('M', 'A', 'C', '6'):
-    case QT_MAKE_FOURCC_LE ('Q', 'D', 'M', 'C'):
-    case QT_MAKE_FOURCC_LE ('Q', 'c', 'l', 'p'):
-    case QT_MAKE_FOURCC_LE ('Q', 'c', 'l', 'q'):
-    case QT_MAKE_FOURCC_LE ('d', 'v', 'c', 'a'):
-    default:
-      break;
-  }
-
-  return caps;
-}
diff --git a/sys/qtwrapper/codecmapping.h b/sys/qtwrapper/codecmapping.h
deleted file mode 100644
index 106ffe7..0000000
--- a/sys/qtwrapper/codecmapping.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * GStreamer QuickTime codec mapping
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <gst/gst.h>
-#include "qtwrapper.h"
-
-#ifdef G_OS_WIN32
-#include <ImageCodec.h>
-#else
-#include <QuickTime/ImageCodec.h>
-#endif
-
-
-/*
- * fourcc_to_caps:
- *
- * Return the caps for a given fourcc.
- */
-
-GstCaps *fourcc_to_caps (guint32 fourcc);
diff --git a/sys/qtwrapper/imagedescription.c b/sys/qtwrapper/imagedescription.c
deleted file mode 100644
index e14d60b..0000000
--- a/sys/qtwrapper/imagedescription.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * GStreamer QuickTime video decoder codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <string.h>
-
-#include "imagedescription.h"
-
-static ImageDescription *
-image_description_for_avc1 (GstBuffer * buf)
-{
-  ImageDescription *desc = NULL;
-  guint8 *pos;
-
-  desc = g_malloc0 (sizeof (ImageDescription) + GST_BUFFER_SIZE (buf) + 8);
-  pos = (guint8 *) desc + sizeof (ImageDescription);
-
-  desc->idSize = sizeof (ImageDescription) + GST_BUFFER_SIZE (buf) + 8;
-  /* write size in Big-Endian */
-  GST_WRITE_UINT32_BE (pos, GST_BUFFER_SIZE (buf) + 8);
-  GST_WRITE_UINT32_LE (pos + 4, QT_MAKE_FOURCC_BE ('a', 'v', 'c', 'C'));
-  memmove (pos + 8, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
-
-  return desc;
-}
-
-/* image_description_for_mp4v
- *
- * mpeg4 video has an 'esds' atom as extension for the ImageDescription.
- * It is meant to contain the ES Description.
- * We here create a fake one.
- */
-
-static ImageDescription *
-image_description_for_mp4v (GstBuffer * buf)
-{
-  ImageDescription *desc = NULL;
-  guint32 offset = sizeof (ImageDescription);
-  guint8 *location;
-
-  GST_LOG ("buf %p , size:%d", buf, GST_BUFFER_SIZE (buf));
-
-  /* this image description contains:
-   *  ImageDescription  sizeof(ImageDescription)
-   *  esds atom         34 bytes
-   *  buffer            GST_BUFFER_SIZE (buf)
-   *  ending            3 bytes
-   */
-
-  desc = g_malloc0 (offset + 37 + GST_BUFFER_SIZE (buf));
-  desc->idSize = offset + 37 + GST_BUFFER_SIZE (buf);
-
-  location = (guint8 *) desc + offset;
-
-  /* Fill in ESDS */
-  /*  size */
-  GST_WRITE_UINT32_BE (location, 37 + GST_BUFFER_SIZE (buf));
-  /*  atom */
-  GST_WRITE_UINT32_LE (location + 4, GST_MAKE_FOURCC ('e', 's', 'd', 's'));
-  /*  version + flags */
-  QT_WRITE_UINT32 (location + 8, 0);
-  /*  tag */
-  QT_WRITE_UINT8 (location + 12, 0x3);
-  /*  size (buffsize + 23) */
-  QT_WRITE_UINT8 (location + 13, GST_BUFFER_SIZE (buf) + 23);
-  /*  ESID */
-  QT_WRITE_UINT16 (location + 14, 0);
-  /*  priority */
-  QT_WRITE_UINT8 (location + 16, 0);
-  /*  tag */
-  QT_WRITE_UINT8 (location + 17, 0x4);
-  /*  size (buffsize + 8) */
-  QT_WRITE_UINT8 (location + 18, GST_BUFFER_SIZE (buf) + 15);
-  /*  object type */
-  QT_WRITE_UINT8 (location + 19, 0x20);
-  /*  stream type */
-  QT_WRITE_UINT8 (location + 20, 0x11);
-  /*  buffersize db */
-  QT_WRITE_UINT24 (location + 21, 13640);
-  /*  max bitrate */
-  QT_WRITE_UINT32 (location + 24, 1849648);
-  /*  avg bitrate */
-  QT_WRITE_UINT32 (location + 28, 918191);
-  /*  tag */
-  QT_WRITE_UINT8 (location + 32, 0x05);
-  /*  size */
-  QT_WRITE_UINT8 (location + 33, GST_BUFFER_SIZE (buf));
-  /*  codec data */
-  memmove (location + 34, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
-  /*  end */
-  QT_WRITE_UINT8 (location + 34 + GST_BUFFER_SIZE (buf), 0x06);
-  QT_WRITE_UINT8 (location + 34 + GST_BUFFER_SIZE (buf) + 1, 0x01);
-  QT_WRITE_UINT8 (location + 34 + GST_BUFFER_SIZE (buf) + 2, 0x02);
-
-  return desc;
-}
-
-static ImageDescription *
-image_description_from_stsd_buffer (GstBuffer * buf)
-{
-  ImageDescription *desc = NULL;
-  guint8 *content;
-  guint size;
-  gint imds;
-
-  GST_LOG ("buffer %p, size:%u", buf, GST_BUFFER_SIZE (buf));
-
-  /* The buffer contains a full atom, we only need the contents */
-  /* This buffer has data in big-endian, we need to read it as such.
-   * except for the fourcc which are ALWAYS big-endian. */
-  content = GST_BUFFER_DATA (buf) + 16;
-  size = GST_BUFFER_SIZE (buf) - 16;
-
-#if DEBUG_DUMP
-  GST_LOG ("incoming data in big-endian");
-  gst_util_dump_mem (content, size);
-#endif
-
-  desc = g_malloc0 (size);
-  desc->idSize = size;
-  desc->cType = GST_READ_UINT32_BE (content + 4);
-  desc->version = QT_UINT16 (content + 16);
-  desc->revisionLevel = QT_UINT16 (content + 18);
-  desc->vendor = GST_READ_UINT32_BE (content + 20);
-  desc->temporalQuality = QT_UINT32 (content + 24);
-  desc->spatialQuality = QT_UINT32 (content + 24);
-  desc->dataSize = QT_UINT32 (content + 44);
-  desc->frameCount = QT_UINT16 (content + 48);
-  desc->depth = QT_UINT16 (content + 82);
-  desc->clutID = QT_UINT16 (content + 84);
-
-  imds = 86;                    /* sizeof (ImageDescription); */
-
-  if (desc->idSize > imds) {
-    GST_LOG ("Copying %d bytes from %p to %p",
-        size - imds, content + imds, desc + imds);
-    memcpy ((guint8 *) desc + imds, (guint8 *) content + imds, size - imds);
-  }
-#if DEBUG_DUMP
-  GST_LOG ("outgoing data in machine-endian");
-  dump_image_description (desc);
-#endif
-
-  return desc;
-}
-
-ImageDescription *
-image_description_from_codec_data (GstBuffer * buf, guint32 codectype)
-{
-  ImageDescription *desc = NULL;
-
-  GST_LOG ("codectype:%" GST_FOURCC_FORMAT " buf:%p",
-      GST_FOURCC_ARGS (codectype), buf);
-
-  if ((GST_BUFFER_SIZE (buf) == GST_READ_UINT32_BE (GST_BUFFER_DATA (buf))) &&
-      (QT_MAKE_FOURCC_LE ('s', 't', 's',
-              'd') == GST_READ_UINT32_BE (GST_BUFFER_DATA (buf) + 4))) {
-    /* We have the full stsd (ImageDescription) in our codec_data */
-    desc = image_description_from_stsd_buffer (buf);
-  } else {
-    switch (codectype) {
-      case QT_MAKE_FOURCC_LE ('m', 'p', '4', 'v'):
-        desc = image_description_for_mp4v (buf);
-        break;
-      case QT_MAKE_FOURCC_LE ('a', 'v', 'c', '1'):
-        desc = image_description_for_avc1 (buf);
-        break;
-      default:
-        GST_WARNING ("Format not handled !");
-    }
-  }
-  return desc;
-}
diff --git a/sys/qtwrapper/imagedescription.h b/sys/qtwrapper/imagedescription.h
deleted file mode 100644
index cd5481a..0000000
--- a/sys/qtwrapper/imagedescription.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * GStreamer QuickTime video decoder codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 "qtwrapper.h"
-#include "qtutils.h"
-
-ImageDescription *image_description_from_codec_data (GstBuffer * buf,
-    guint32 codec);
diff --git a/sys/qtwrapper/qtutils.c b/sys/qtwrapper/qtutils.c
deleted file mode 100644
index 506d761..0000000
--- a/sys/qtwrapper/qtutils.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- * GStreamer QuickTime codec mapping
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 <string.h>
-#include <glib.h>
-
-#include "qtutils.h"
-
-gboolean
-get_name_info_from_component (Component componentID,
-    ComponentDescription * desc, gchar ** name, gchar ** info)
-{
-  Handle nameHandle = NewHandle (200);
-  Handle infoHandle = NewHandle (200);
-  gchar *tmpname;
-  gchar *tmpinfo;
-  OSErr result;
-  gboolean ret = TRUE;
-
-  result = GetComponentInfo (componentID, desc, nameHandle, infoHandle, NULL);
-  if (result != noErr) {
-    ret = FALSE;
-    goto done;
-  }
-#if DEBUG_DUMP
-  GST_LOG ("ComponentDescription dump");
-  gst_util_dump_mem ((const guchar *) desc, sizeof (ComponentDescription));
-  gst_util_dump_mem ((gpointer) * nameHandle, 200);
-  gst_util_dump_mem ((gpointer) * infoHandle, 200);
-  GST_LOG ("0x%x 0x%x", **((guint8 **) nameHandle), **((guint8 **) infoHandle));
-#endif
-
-  if (*nameHandle && name) {
-    gsize read, written;
-
-    tmpname = g_strndup ((*(char **) nameHandle) + 1,
-        **((guint8 **) nameHandle));
-    *name = g_convert_with_fallback (tmpname, -1, "ASCII", "MAC",
-        (gchar *) " ", &read, &written, NULL);
-    if (!*name)
-      GST_WARNING ("read:%" G_GSIZE_FORMAT ", written:%" G_GSIZE_FORMAT, read,
-          written);
-    g_free (tmpname);
-  }
-
-  if (*infoHandle && info) {
-    tmpinfo =
-        g_strndup ((*(char **) infoHandle) + 1, **((guint8 **) infoHandle));
-    *info =
-        g_convert_with_fallback (tmpinfo, -1, "ASCII", "MAC", (gchar *) " ",
-        NULL, NULL, NULL);
-    g_free (tmpinfo);
-  }
-
-done:
-  DisposeHandle (nameHandle);
-  DisposeHandle (infoHandle);
-
-  return ret;
-}
-
-/*
-struct CodecDecompressParams {
-   ImageSequence              sequenceID;
-   ImageDescriptionHandle     imageDescription;
-   Ptr                        data;
-   long                       bufferSize;
-   long                       frameNumber;
-   long                       startLine;
-   long                       stopLine;
-   long                       conditionFlags;
-   CodecFlags                 callerFlags;
-   CodecCapabilities *        capabilities;
-   ICMProgressProcRecord      progressProcRecord;
-   ICMCompletionProcRecord    completionProcRecord;
-   ICMDataProcRecord          dataProcRecord;
-   CGrafPtr                   port;
-   PixMap                     dstPixMap;
-   BitMapPtr                  maskBits;
-   PixMapPtr                  mattePixMap;
-   Rect                       srcRect;
-   MatrixRecord *             matrix;
-   CodecQ                     accuracy;
-   short                      transferMode;
-   ICMFrameTimePtr            frameTime;
-   long                       reserved[1];
-   SInt8                      matrixFlags;
-   SInt8                      matrixType;
-   Rect                       dstRect;
-   UInt16                     majorSourceChangeSeed;
-   UInt16                     minorSourceChangeSeed;
-   CDSequenceDataSourcePtr    sourceData;
-   RgnHandle                  maskRegion;
-   OSType **                  wantedDestinationPixelTypes;
-   long                       screenFloodMethod;
-   long                       screenFloodValue;
-   short                      preferredOffscreenPixelSize;
-   ICMFrameTimeInfoPtr        syncFrameTime;
-   Boolean                    needUpdateOnTimeChange;
-   Boolean                    enableBlackLining;
-   Boolean                    needUpdateOnSourceChange;
-   Boolean                    pad;
-   long                       unused;
-   CGrafPtr                   finalDestinationPort;
-   long                       requestedBufferWidth;
-   long                       requestedBufferHeight;
-   Rect                       displayableAreaOfRequestedBuffer;
-   Boolean                    requestedSingleField;
-   Boolean                    needUpdateOnNextIdle;
-   Boolean                    pad2[2];
-   fixed                      bufferGammaLevel;
-   UInt32                     taskWeight;
-   OSType                     taskName;
-};
- */
-
-/* struct ImageDescription {  */
-/*     long idSize;            /\* total size of this structure *\/  */
-/*  4  CodecType cType;        /\* compressor creator type *\/  */
-/*  8  long resvd1;            /\* reserved--must be set to 0 *\/  */
-/* 12  short resvd2;           /\* reserved--must be set to 0 *\/  */
-/* 14  short dataRefIndex;     /\* reserved--must be set to 0 *\/  */
-/* 16  short version;          /\* version of compressed data *\/  */
-/* 18  short revisionLevel;    /\* compressor that created data *\/  */
-/* 20  long vendor;            /\* compressor developer that created data *\/  */
-/* 24  CodecQ temporalQuality;       */
-/*                             /\* degree of temporal compression *\/  */
-/* 28  CodecQ spatialQuality;        */
-/*                             /\* degree of spatial compression *\/  */
-/* 32  short width;            /\* width of source image in pixels *\/  */
-/* 34  short height;           /\* height of source image in pixels *\/  */
-/* 36  Fixed hRes;             /\* horizontal resolution of source image *\/  */
-/* 40  Fixed vRes;             /\* vertical resolution of source image *\/  */
-/* 44  long dataSize;          /\* size in bytes of compressed data *\/  */
-/* 48  short frameCount;       /\* number of frames in image data *\/  */
-/* 50  Str31 name;             /\* name of compression algorithm *\/  */
-/* 82  short depth;            /\* pixel depth of source image *\/  */
-/* 84  short clutID;           /\* ID number of the color table for image *\/  */
-/* }; */
-
-
-gboolean
-get_output_info_from_component (Component componentID)
-{
-  gboolean ret = FALSE;
-  ComponentInstance instance;
-  ImageSubCodecDecompressCapabilities caps;
-  CodecInfo info;
-
-  GST_LOG ("Creating an instance");
-
-  /* 1. Create an instance */
-  if (!(instance = OpenComponent (componentID))) {
-    GST_WARNING ("Couldn't open component");
-    return FALSE;
-  }
-
-  /* 2. initialize */
-  memset (&caps, 0, sizeof (ImageSubCodecDecompressCapabilities));
-  if (ImageCodecInitialize (instance, &caps) != noErr) {
-    GST_WARNING ("ImageCodecInitialize() failed");
-    goto beach;
-  }
-#if DEBUG_DUMP
-  GST_LOG ("ImageSubCodecDecompressCapabilities");
-  gst_util_dump_mem ((const guchar *) &caps,
-      sizeof (ImageSubCodecDecompressCapabilities));
-#endif
-
-  GST_LOG ("recordSize:%ld", caps.recordSize);
-  GST_LOG ("decompressRecordSize:%ld", caps.decompressRecordSize);
-  GST_LOG ("canAsync:%d", caps.canAsync);
-
-  /* 3. Get codec info */
-  memset (&info, 0, sizeof (CodecInfo));
-  if (ImageCodecGetCodecInfo (instance, &info) != noErr) {
-    GST_WARNING ("ImageCodecInfo() failed");
-    goto beach;
-  };
-
-#if DEBUG_DUMP
-  GST_LOG ("CodecInfo");
-  gst_util_dump_mem ((const guchar *) &info, sizeof (CodecInfo));
-#endif
-
-  GST_LOG ("version:%d", info.version);
-  GST_LOG ("revisionLevel:%d", info.revisionLevel);
-  GST_LOG ("vendor:%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (info.vendor));
-
-  /* Compression flags */
-  /* Contains flags (see below) that specify the decompression capabilities of
-   * the component. Typically, these flags are of interest only to developers of
-   * image decompressors. */
-  GST_LOG ("decompressFlags:%lx", info.decompressFlags);
-  if (info.decompressFlags & codecInfoDoes1)
-    GST_LOG ("Depth 1 OK");
-  if (info.decompressFlags & codecInfoDoes2)
-    GST_LOG ("Depth 2 OK");
-  if (info.decompressFlags & codecInfoDoes4)
-    GST_LOG ("Depth 4 OK");
-  if (info.decompressFlags & codecInfoDoes8)
-    GST_LOG ("Depth 8 OK");
-  if (info.decompressFlags & codecInfoDoes16)
-    GST_LOG ("Depth 16 OK");
-  if (info.decompressFlags & codecInfoDoes32)
-    GST_LOG ("Depth 32 OK");
-  GST_LOG ("compressFlags:%lx", info.compressFlags);
-
-  /* Format FLAGS */
-  /* Contains flags (see below) that describe the possible format for compressed
-   * data produced by this component and the format of compressed files that the
-   * component can handle during decompression. Typically, these flags are of
-   * interest only to developers of compressor components.
-   */
-  GST_LOG ("formatFlags:%lx", info.formatFlags);
-  if (info.formatFlags & codecInfoDepth1)
-    GST_LOG ("Depth 1 OK");
-  if (info.formatFlags & codecInfoDepth2)
-    GST_LOG ("Depth 2 OK");
-  if (info.formatFlags & codecInfoDepth4)
-    GST_LOG ("Depth 4 OK");
-  if (info.formatFlags & codecInfoDepth8)
-    GST_LOG ("Depth 8 OK");
-  if (info.formatFlags & codecInfoDepth16)
-    GST_LOG ("Depth 16 OK");
-  if (info.formatFlags & codecInfoDepth24)
-    GST_LOG ("Depth 24 OK");
-  if (info.formatFlags & codecInfoDepth32)
-    GST_LOG ("Depth 32 OK");
-  if (info.formatFlags & codecInfoDepth33)
-    GST_LOG ("Depth 33 OK");
-  if (info.formatFlags & codecInfoDepth34)
-    GST_LOG ("Depth 34 OK");
-  if (info.formatFlags & codecInfoDepth36)
-    GST_LOG ("Depth 36 OK");
-  if (info.formatFlags & codecInfoDepth40)
-    GST_LOG ("Depth 40 OK");
-  if (info.formatFlags & codecInfoStoresClut)
-    GST_LOG ("StoresClut OK");
-  if (info.formatFlags & codecInfoDoesLossless)
-    GST_LOG ("Lossless OK");
-  if (info.formatFlags & codecInfoSequenceSensitive)
-    GST_LOG ("SequenceSentitive OK");
-
-
-  GST_LOG ("compressionAccuracy:%u", info.compressionAccuracy);
-  GST_LOG ("decompressionAccuracy:%u", info.decompressionAccuracy);
-  GST_LOG ("compressionSpeed:%d", info.compressionSpeed);
-  GST_LOG ("decompressionSpeed:%d", info.decompressionSpeed);
-  GST_LOG ("compressionLevel:%u", info.compressionLevel);
-  GST_LOG ("minimumHeight:%d", info.minimumHeight);
-  GST_LOG ("minimumWidth:%d", info.minimumWidth);
-
-/*   /\* . Call ImageCodecPreDecompress *\/ */
-/*   memset(&params, 0, sizeof(CodecDecompressParams)); */
-/*   GST_LOG ("calling imagecodecpredecompress"); */
-/*   if (ImageCodecPreDecompress (instance, &params) != noErr) { */
-/*     GST_WARNING ("Error in ImageCodecPreDecompress"); */
-/*     goto beach; */
-/*   } */
-
-/*   GST_INFO ("sequenceID : %d", params.sequenceID); */
-
-  ret = TRUE;
-
-beach:
-  /* Free instance */
-  CloseComponent (instance);
-  return TRUE;
-}
-
-void
-dump_avcc_atom (guint8 * atom)
-{
-  /* first 8 bytes : length + atom */
-  GST_LOG ("version:0x%x", QT_UINT8 (atom + 8));
-  GST_LOG ("Profile:%d", QT_UINT8 (atom + 9));
-  GST_LOG ("Compatible profiles : 0x%x", QT_UINT8 (atom + 10));
-  GST_LOG ("Level:%d", QT_UINT8 (atom + 11));
-}
-
-void
-dump_image_description (ImageDescription * desc)
-{
-  GST_LOG ("Description %p , size:%" G_GSIZE_FORMAT, desc, desc->idSize);
-
-#if DEBUG_DUMP
-  gst_util_dump_mem ((const guchar *) desc, desc->idSize);
-#endif
-
-  GST_LOG ("cType : %" GST_FOURCC_FORMAT, QT_FOURCC_ARGS (desc->cType));
-  GST_LOG ("version:%d", desc->version);
-  GST_LOG ("revisionLevel:%d", desc->revisionLevel);
-  GST_LOG ("vendor:%" GST_FOURCC_FORMAT, QT_FOURCC_ARGS (desc->vendor));
-  GST_LOG ("temporalQuality:%lu", desc->temporalQuality);
-  GST_LOG ("spatialQuality:%lu", desc->spatialQuality);
-  GST_LOG ("width:%u", desc->width);
-  GST_LOG ("height:%u", desc->height);
-  GST_LOG ("hres:%f", desc->hRes / 65536.0);
-  GST_LOG ("vres:%f", desc->vRes / 65536.0);
-  GST_LOG ("dataSize:%" G_GSIZE_FORMAT, desc->dataSize);
-  GST_LOG ("frameCount:%d", desc->frameCount);
-  GST_LOG ("name:%.*s", desc->name[0], desc->name + 1);
-  GST_LOG ("depth:%d", desc->depth);
-  GST_LOG ("clutID:%d", desc->clutID);
-
-  if (desc->idSize > sizeof (ImageDescription)) {
-    guint8 *extradata = (guint8 *) desc + sizeof (ImageDescription);
-    guint32 type = QT_READ_UINT32 (extradata + 4);
-
-    GST_LOG ("Extra Data size:%lu",
-        (gulong) desc->idSize - (gulong) sizeof (ImageDescription));
-#if DEBUG_DUMP
-    gst_util_dump_mem ((gpointer) (gulong) desc +
-        (gulong) sizeof (ImageDescription),
-        (gulong) desc->idSize - (gulong) sizeof (ImageDescription));
-#endif
-    GST_LOG ("Extra Data Type : %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (type));
-    if (type == QT_MAKE_FOURCC ('a', 'v', 'c', 'C'))
-      dump_avcc_atom (extradata);
-  }
-}
-
-void
-dump_codec_decompress_params (CodecDecompressParams * params)
-{
-  GST_LOG ("params %p", params);
-
-#if DEBUG_DUMP
-  gst_util_dump_mem ((const guchar *) params, sizeof (CodecDecompressParams));
-#endif
-
-  GST_LOG ("SequenceID:%ld", params->sequenceID);
-  GST_LOG ("imageDescription:%p", params->imageDescription);
-  GST_LOG ("data:%p", params->data);
-  GST_LOG ("bufferSize:%ld", params->bufferSize);
-  GST_LOG ("frameNumber:%ld", params->frameNumber);
-  GST_LOG ("startLine:%ld  , StopLine:%ld", params->startLine,
-      params->stopLine);
-  GST_LOG ("conditionFlags:0x%lx", params->conditionFlags);
-  GST_LOG ("callerFlags:0x%x", params->callerFlags);
-  GST_LOG ("capabilities:%p", params->capabilities);
-  GST_LOG ("port:%p", params->port);
-  GST_LOG ("dstPixMap");
-#if DEBUG_DUMP
-  gst_util_dump_mem ((const guchar *) &params->dstPixMap, sizeof (PixMap));
-#endif
-
-  GST_LOG ("maskBits:%p", params->maskBits);
-  GST_LOG ("mattePixMap:%p", params->mattePixMap);
-  GST_LOG ("srcRect %d/%d/%d/%d",
-      params->srcRect.top, params->srcRect.bottom,
-      params->srcRect.left, params->srcRect.right);
-
-  GST_LOG ("matrix:%p", params->matrix);
-  GST_LOG ("accuracy:%ld", params->accuracy);
-  GST_LOG ("transferMode:%d", params->transferMode);
-  GST_LOG ("frameTime:%p", params->frameTime);
-  GST_LOG ("matrixFlags:%x", params->matrixFlags);
-
-  GST_LOG ("dstRect %d/%d/%d/%d",
-      params->dstRect.top, params->dstRect.bottom,
-      params->dstRect.left, params->dstRect.right);
-
-  GST_LOG ("sourceData:%p", params->sourceData);
-
-  if (params->wantedDestinationPixelTypes) {
-    OSType *tmp;
-
-    for (tmp = *params->wantedDestinationPixelTypes; *tmp; tmp++)
-      GST_LOG ("Destination pixel %" GST_FOURCC_FORMAT, QT_FOURCC_ARGS (*tmp));
-  }
-}
-
-void
-addSInt32ToDictionary (CFMutableDictionaryRef dictionary, CFStringRef key,
-    SInt32 numberSInt32)
-{
-  CFNumberRef number =
-      CFNumberCreate (NULL, kCFNumberSInt32Type, &numberSInt32);
-  if (!number)
-    return;
-  CFDictionaryAddValue (dictionary, key, number);
-  CFRelease (number);
-}
-
-void
-dump_cvpixel_buffer (CVPixelBufferRef pixbuf)
-{
-  gsize left, right, top, bottom;
-
-  GST_LOG ("buffer %p", pixbuf);
-  if (CVPixelBufferLockBaseAddress (pixbuf, 0)) {
-    GST_WARNING ("Couldn't lock base adress on pixel buffer !");
-    return;
-  }
-  GST_LOG ("Width:%" G_GSIZE_FORMAT " , Height:%" G_GSIZE_FORMAT,
-      CVPixelBufferGetWidth (pixbuf), CVPixelBufferGetHeight (pixbuf));
-  GST_LOG ("Format:%" GST_FOURCC_FORMAT,
-      GST_FOURCC_ARGS (CVPixelBufferGetPixelFormatType (pixbuf)));
-  GST_LOG ("base address:%p", CVPixelBufferGetBaseAddress (pixbuf));
-  GST_LOG ("Bytes per row:%" G_GSIZE_FORMAT,
-      CVPixelBufferGetBytesPerRow (pixbuf));
-  GST_LOG ("Data Size:%" G_GSIZE_FORMAT, CVPixelBufferGetDataSize (pixbuf));
-  GST_LOG ("Plane count:%" G_GSIZE_FORMAT, CVPixelBufferGetPlaneCount (pixbuf));
-  CVPixelBufferGetExtendedPixels (pixbuf, &left, &right, &top, &bottom);
-  GST_LOG ("Extended pixels. left/right/top/bottom : %" G_GSIZE_FORMAT
-      "/%" G_GSIZE_FORMAT "/%" G_GSIZE_FORMAT "/%" G_GSIZE_FORMAT,
-      left, right, top, bottom);
-  CVPixelBufferUnlockBaseAddress (pixbuf, 0);
-}
-
-
-// Convenience function to dispose of our audio buffers
-void
-DestroyAudioBufferList (AudioBufferList * list)
-{
-  UInt32 i;
-
-  if (list) {
-    for (i = 0; i < list->mNumberBuffers; i++) {
-      if (list->mBuffers[i].mData)
-        free (list->mBuffers[i].mData);
-    }
-    free (list);
-  }
-}
-
-// Convenience function to allocate our audio buffers
-AudioBufferList *
-AllocateAudioBufferList (UInt32 numChannels, UInt32 size)
-{
-  AudioBufferList *list;
-
-  list = (AudioBufferList *) calloc (1, sizeof (AudioBufferList));
-  if (list == NULL)
-    return NULL;
-
-  list->mNumberBuffers = 1;
-  list->mBuffers[0].mNumberChannels = numChannels;
-  list->mBuffers[0].mDataByteSize = size;
-  list->mBuffers[0].mData = malloc (size);
-  if (list->mBuffers[0].mData == NULL) {
-    DestroyAudioBufferList (list);
-    return NULL;
-  }
-  return list;
-}
diff --git a/sys/qtwrapper/qtutils.h b/sys/qtwrapper/qtutils.h
deleted file mode 100644
index 287c31f..0000000
--- a/sys/qtwrapper/qtutils.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * GStreamer QuickTime codec mapping
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 G_OS_WIN32
-#include <ImageCodec.h>
-#else
-#include <QuickTime/ImageCodec.h>
-#endif
-#include <gst/gst.h>
-#include "qtwrapper.h"
-
-#ifndef __QTUTILS_H__
-#define __QTUTILS_H__
-
-#define QT_UINT32(a)  (GST_READ_UINT32_BE(a))
-#define QT_UINT24(a)  (GST_READ_UINT32_BE(a) >> 8)
-#define QT_UINT16(a)  (GST_READ_UINT16_BE(a))
-#define QT_UINT8(a)   (GST_READ_UINT8(a))
-#define QT_FP32(a)    ((GST_READ_UINT32_BE(a))/65536.0)
-#define QT_FP16(a)    ((GST_READ_UINT16_BE(a))/256.0)
-#define QT_FOURCC(a)  (GST_READ_UINT32_LE(a))
-#define QT_UINT64(a)  ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
-#define QT_FOURCC_ARGS(fourcc)			\
-  ((gchar) (((fourcc)>>24)&0xff)),		\
-    ((gchar) (((fourcc)>>16)&0xff)),		\
-    ((gchar) (((fourcc)>>8 )&0xff)),		\
-    ((gchar) ((fourcc)     &0xff))
-
-#define QT_WRITE_UINT8(data, num)      GST_WRITE_UINT8(data, num)
-
-#define QT_MAKE_FOURCC_BE(a,b,c,d)      (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
-#define QT_MAKE_FOURCC_LE(a,b,c,d)	QT_MAKE_FOURCC_BE(d,c,b,a)
-
-#define _QT_PUT(__data, __idx, __size, __shift, __num) \
-    (((guint8 *) (__data))[__idx] = (((guint##__size) __num) >> __shift) & 0xff)
-
-/* endianness-dependent macros */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
-#define QT_MAKE_FOURCC(a,b,c,d)		QT_MAKE_FOURCC_LE(a,b,c,d)
-#define QT_WRITE_UINT16(data, num)	GST_WRITE_UINT16_LE(data, num)
-#define QT_WRITE_UINT24(data, num)	do {				\
-					  _QT_PUT (data, 0, 32,  0, num); \
-					  _QT_PUT (data, 1, 32,  8, num); \
-					  _QT_PUT (data, 2, 32, 16, num); \
-					} while (0)
-#define QT_WRITE_UINT32(data, num)	GST_WRITE_UINT32_LE(data, num)
-#define QT_READ_UINT16(data)		GST_READ_UINT16_LE(data)
-#define QT_READ_UINT32(data)		GST_READ_UINT32_LE(data)
-#else
-#define QT_MAKE_FOURCC(a,b,c,d)         QT_MAKE_FOURCC_BE(a,b,c,d)
-#define QT_WRITE_UINT16(data, num)     GST_WRITE_UINT16_BE(data, num)
-#define QT_WRITE_UINT24(data, num)	do {				\
-					  _QT_PUT (data, 0, 32, 16, num); \
-					  _QT_PUT (data, 1, 32,  8, num); \
-					  _QT_PUT (data, 2, 32,  0, num); \
-					} while (0)
-#define QT_WRITE_UINT32(data, num)     GST_WRITE_UINT32_BE(data, num)
-#define QT_READ_UINT16(data)		GST_READ_UINT16_BE(data)
-#define QT_READ_UINT32(data)		GST_READ_UINT32_BE(data)
-#endif
-
-
-/*
- * get_name_info_from_component:
- *
- * Fills name and info with the name and description from a Component
- */
-
-gboolean
-get_name_info_from_component (Component component, ComponentDescription * desc,
-    gchar ** name, gchar ** info);
-
-
-
-gboolean get_output_info_from_component (Component component);
-
-
-
-void dump_image_description (ImageDescription * desc);
-void dump_codec_decompress_params (CodecDecompressParams * params);
-
-guint32 destination_pixel_types_to_fourcc (OSType ** types);
-void
-addSInt32ToDictionary (CFMutableDictionaryRef dictionary, CFStringRef key,
-    SInt32 numberSInt32);
-
-void dump_cvpixel_buffer (CVPixelBufferRef pixbuf);
-
-void dump_avcc_atom (guint8 * atom);
-
-AudioBufferList *AllocateAudioBufferList(UInt32 numChannels, UInt32 size);
-
-void DestroyAudioBufferList(AudioBufferList* list);
-
-#endif /* __QTUTILS_H__ */
diff --git a/sys/qtwrapper/qtwrapper.c b/sys/qtwrapper/qtwrapper.c
deleted file mode 100644
index b87573f..0000000
--- a/sys/qtwrapper/qtwrapper.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * GStreamer QuickTime codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 "qtwrapper.h"
-#include <stdio.h>
-
-GST_DEBUG_CATEGORY (qtwrapper_debug);
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  gboolean res;
-  OSErr status;
-
-  GST_DEBUG_CATEGORY_INIT (qtwrapper_debug, "qtwrapper",
-      0, "QuickTime codecs wrappers");
-
-  /* Initialize quicktime environment */
-#ifdef G_OS_WIN32
-  /* Only required on win32 */
-  InitializeQTML (0);
-#endif
-
-  status = EnterMovies ();
-  if (status) {
-    GST_ERROR ("Error initializing QuickTime environment: %d", status);
-    return FALSE;
-  }
-
-  GST_INFO ("Registering video decoders");
-  res = qtwrapper_video_decoders_register (plugin);
-  GST_INFO ("Registering audio decoders");
-  res &= qtwrapper_audio_decoders_register (plugin);
-
-  return res;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    qtwrapper,
-    "QuickTime codecs wrapper",
-    plugin_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/")
diff --git a/sys/qtwrapper/qtwrapper.h b/sys/qtwrapper/qtwrapper.h
deleted file mode 100644
index 9e7d411..0000000
--- a/sys/qtwrapper/qtwrapper.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * GStreamer QuickTime codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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_QTWRAPPER_H__
-#define __GST_QTWRAPPER_H__
-
-#include <gst/gst.h>
-#ifdef G_OS_WIN32
-#include <Movies.h>
-#include <QTML.h>
-#else
-#include <QuickTime/Movies.h>
-#endif
-
-/* Set following to 1 if you want to have extra debug in form of
- * memory dumps */
-#define DEBUG_DUMP 0
-
-GST_DEBUG_CATEGORY_EXTERN (qtwrapper_debug);
-#define GST_CAT_DEFAULT qtwrapper_debug
-
-G_BEGIN_DECLS
-
-extern gboolean qtwrapper_video_decoders_register (GstPlugin *);
-extern gboolean qtwrapper_audio_decoders_register (GstPlugin *);
-
-G_END_DECLS
-#endif /* __GST_QTWRAPPER_H__ */
diff --git a/sys/qtwrapper/videodecoders.c b/sys/qtwrapper/videodecoders.c
deleted file mode 100644
index 8c507e7..0000000
--- a/sys/qtwrapper/videodecoders.c
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- * GStreamer QuickTime video decoder codecs wrapper
- * Copyright <2006, 2007> Fluendo <gstreamer@fluendo.com>
- * Copyright <2006, 2007> Pioneers of the Inevitable <songbird@songbirdnest.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Alternatively, the contents of this file may be used under the
- * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
- * which case the following provisions apply instead of the ones
- * mentioned above:
- *
- * 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 <string.h>
-
-#include "qtwrapper.h"
-#include "codecmapping.h"
-#include "qtutils.h"
-#include "imagedescription.h"
-
-#define QTWRAPPER_VDEC_PARAMS_QDATA g_quark_from_static_string("qtwrapper-vdec-params")
-
-static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-raw-yuv"));
-
-typedef struct _QTWrapperVideoDecoder QTWrapperVideoDecoder;
-typedef struct _QTWrapperVideoDecoderClass QTWrapperVideoDecoderClass;
-
-#define MAC_LOCK(qtwrapper) g_mutex_lock (qtwrapper->lock)
-#define MAC_UNLOCK(qtwrapper) g_mutex_unlock (qtwrapper->lock)
-
-struct _QTWrapperVideoDecoder
-{
-  GstElement parent;
-
-  GstPad *sinkpad;
-  GstPad *srcpad;
-
-  GMutex *lock;
-  ComponentInstance instance;
-  CodecInfo codecinfo;
-  ImageDescriptionHandle idesc;
-  CodecDecompressParams *dparams;
-  CodecCapabilities codeccaps;
-  guint64 frameNumber;
-  ICMDecompressionSessionRef decsession;
-  GstFlowReturn lastret;
-  guint64 outsize;
-  guint width, height;
-  GstClockTime last_ts;
-  GstClockTime last_duration;
-  GstBuffer *prevbuf;
-  gboolean flushing;
-  gboolean framebuffering;
-
-  /* width/height of output buffer */
-  Rect rect;
-};
-
-struct _QTWrapperVideoDecoderClass
-{
-  GstElementClass parent_class;
-
-  Component component;
-  guint32 componentType;
-  guint32 componentSubType;
-
-  GstPadTemplate *sinktempl;
-};
-
-typedef struct _QTWrapperVideoDecoderParams QTWrapperVideoDecoderParams;
-
-struct _QTWrapperVideoDecoderParams
-{
-  Component component;
-  GstCaps *sinkcaps;
-};
-
-static GstElementClass *parent_class = NULL;
-
-static gboolean
-qtwrapper_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps);
-static GstFlowReturn qtwrapper_video_decoder_chain (GstPad * pad,
-    GstBuffer * buf);
-static gboolean qtwrapper_video_decoder_sink_event (GstPad * pad,
-    GstEvent * event);
-
-static void qtwrapper_video_decoder_finalize (GObject * object);
-static void decompressCb (void *decompressionTrackingRefCon,
-    OSStatus result,
-    ICMDecompressionTrackingFlags decompressionTrackingFlags,
-    CVPixelBufferRef pixelBuffer,
-    TimeValue64 displayTime,
-    TimeValue64 displayDuration,
-    ICMValidTimeFlags validTimeFlags, void *reserved, void *sourceFrameRefCon);
-
-/*
- * Class setup
- */
-
-static void
-qtwrapper_video_decoder_base_init (QTWrapperVideoDecoderClass * klass)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-  gchar *name = NULL;
-  gchar *info = NULL;
-  char *longname, *description;
-  ComponentDescription desc;
-  QTWrapperVideoDecoderParams *params;
-
-  params = (QTWrapperVideoDecoderParams *)
-      g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
-      QTWRAPPER_VDEC_PARAMS_QDATA);
-  g_assert (params);
-
-  get_name_info_from_component (params->component, &desc, &name, &info);
-
-  /* Fill in details */
-  longname =
-      g_strdup_printf ("QTWrapper Video Decoder : %s", GST_STR_NULL (name));
-  description =
-      g_strdup_printf ("QTWrapper SCAudio wrapper for decoder: %s",
-      GST_STR_NULL (info));
-  gst_element_class_set_metadata (element_class, longname,
-      "Codec/Decoder/Video", description,
-      "Fluendo <gstreamer@fluendo.com>, "
-      "Pioneers of the Inevitable <songbird@songbirdnest.com>");
-  g_free (longname);
-  g_free (description);
-  g_free (name);
-  g_free (info);
-
-  klass->sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK,
-      GST_PAD_ALWAYS, params->sinkcaps);
-
-  gst_element_class_add_pad_template (element_class, klass->sinktempl);
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_templ));
-
-  /* Store class-global values */
-  klass->component = params->component;
-  klass->componentType = desc.componentType;
-  klass->componentSubType = desc.componentSubType;
-}
-
-static void
-qtwrapper_video_decoder_class_init (QTWrapperVideoDecoderClass * klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-  parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class->finalize =
-      GST_DEBUG_FUNCPTR (qtwrapper_video_decoder_finalize);
-}
-
-static void
-qtwrapper_video_decoder_init (QTWrapperVideoDecoder * qtwrapper)
-{
-  QTWrapperVideoDecoderClass *oclass;
-  ImageSubCodecDecompressCapabilities capabs;
-
-  GST_LOG ("...");
-  oclass = (QTWrapperVideoDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-
-  /* 1. Create a ocmponent instance */
-  if (!(qtwrapper->instance = OpenComponent (oclass->component))) {
-    GST_ERROR_OBJECT (qtwrapper, "Couldn't create a component instance !");
-    return;
-  }
-
-  /* 2. Initialize decoder */
-  memset (&capabs, 0, sizeof (ImageSubCodecDecompressCapabilities));
-  if (ImageCodecInitialize (qtwrapper->instance, &capabs) != noErr) {
-    GST_ERROR_OBJECT (qtwrapper, "Couldn't initialize the QT component !");
-    return;
-  }
-
-  /* 3. Get codec info */
-  memset (&qtwrapper->codecinfo, 0, sizeof (CodecInfo));
-  if (ImageCodecGetCodecInfo (qtwrapper->instance,
-          &qtwrapper->codecinfo) != noErr) {
-    GST_ERROR_OBJECT (qtwrapper, "Couldn't get Codec Information !");
-    return;
-  }
-
-  /* sink pad */
-  qtwrapper->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
-  gst_pad_set_setcaps_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_video_decoder_sink_setcaps));
-  gst_pad_set_chain_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_video_decoder_chain));
-  gst_pad_set_event_function (qtwrapper->sinkpad,
-      GST_DEBUG_FUNCPTR (qtwrapper_video_decoder_sink_event));
-  gst_element_add_pad (GST_ELEMENT (qtwrapper), qtwrapper->sinkpad);
-
-  /* src pad */
-  qtwrapper->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
-  gst_element_add_pad (GST_ELEMENT (qtwrapper), qtwrapper->srcpad);
-
-  qtwrapper->lock = g_mutex_new ();
-}
-
-static void
-qtwrapper_video_decoder_finalize (GObject * object)
-{
-  QTWrapperVideoDecoder *qtwrapper;
-
-  qtwrapper = (QTWrapperVideoDecoder *) object;
-
-  if (qtwrapper->lock)
-    g_mutex_free (qtwrapper->lock);
-
-  if (G_OBJECT_CLASS (parent_class)->finalize)
-    G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/* fill_image_description
- * Fills an ImageDescription with codec-specific values
- *
- * Doesn't fill in the idSize, width and height.
- */
-
-static void
-fill_image_description (QTWrapperVideoDecoder * qtwrapper,
-    ImageDescription * desc)
-{
-  QTWrapperVideoDecoderClass *oclass;
-
-  oclass = (QTWrapperVideoDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-
-  desc->cType = oclass->componentSubType;
-  desc->version = qtwrapper->codecinfo.version;
-  desc->revisionLevel = qtwrapper->codecinfo.revisionLevel;
-  desc->vendor = qtwrapper->codecinfo.vendor;
-  desc->temporalQuality = codecMaxQuality;
-  desc->spatialQuality = codecNormalQuality;
-  desc->hRes = Long2Fix (72);
-  desc->vRes = Long2Fix (72);
-  desc->frameCount = 1;
-  /* The following is a pure empiric calculation ... so there's are chances it
-   * might not work. To be fixed when we can figure out what the exact value should
-   * be. */
-  desc->depth = 24;
-  /* no color table */
-  desc->clutID = -1;
-}
-
-
-/* new_image_description
- *
- * Create an ImageDescription for the given 'codec_data' buffer.
- */
-
-static ImageDescription *
-new_image_description (QTWrapperVideoDecoder * qtwrapper, GstBuffer * buf,
-    guint width, guint height)
-{
-  QTWrapperVideoDecoderClass *oclass;
-  ImageDescription *desc = NULL;
-
-  oclass = (QTWrapperVideoDecoderClass *) (G_OBJECT_GET_CLASS (qtwrapper));
-
-  if (buf) {
-    GST_LOG ("buf %p , size:%d", buf, GST_BUFFER_SIZE (buf));
-#if DEBUG_DUMP
-    gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
-#endif
-  }
-
-  if (!buf) {
-    /* standard case, no codec data */
-    desc = g_new0 (ImageDescription, 1);
-    desc->idSize = sizeof (ImageDescription);
-    fill_image_description (qtwrapper, desc);
-  } else {
-    if ((desc =
-            image_description_from_codec_data (buf, oclass->componentSubType)))
-      fill_image_description (qtwrapper, desc);
-    else
-      goto beach;
-  }
-
-  /* Fix up values */
-  desc->width = width;
-  desc->height = height;
-  desc->hRes = Long2Fix (72);
-  desc->vRes = Long2Fix (72);
-
-  /* if we have h264, we need frame buffering */
-  if ((oclass->componentSubType == QT_MAKE_FOURCC_LE ('a', 'v', 'c', '1')))
-    qtwrapper->framebuffering = TRUE;
-  else
-    qtwrapper->framebuffering = FALSE;
-
-beach:
-  return desc;
-}
-
-/* close_decoder
- *
- * Close and free decoder
- */
-#if 0
-static void
-close_decoder (QTWrapperVideoDecoder * qtwrapper)
-{
-  if (qtwrapper->idesc) {
-    DisposeHandle ((Handle) qtwrapper->idesc);
-    qtwrapper->idesc = NULL;
-  }
-
-  if (qtwrapper->prevbuf) {
-    gst_buffer_unref (qtwrapper->prevbuf);
-    qtwrapper->prevbuf = NULL;
-  }
-
-  if (qtwrapper->dparams) {
-    g_free (qtwrapper->dparams);
-    qtwrapper->dparams = NULL;
-  }
-
-}
-#endif
-/* open_decoder
- *
- * Attempt to initialize the ImageDecompressorComponent with the given
- * caps.
- *
- * Returns TRUE and fills *outcaps if the decoder was properly initialized
- * Returns FALSE if something went wrong.
- */
-
-static gboolean
-open_decoder (QTWrapperVideoDecoder * qtwrapper, GstCaps * caps,
-    GstCaps ** outcaps)
-{
-  ImageDescription *desc;
-  gint width, height;
-  GstStructure *s;
-  const GValue *par = NULL;
-  const GValue *rate = NULL;
-  const GValue *cdata = NULL;
-  OSStatus status;
-  gboolean res = FALSE;
-  guint32 outformat;
-
-  ICMDecompressionSessionOptionsRef sessionoptions = NULL;
-  ICMDecompressionTrackingCallbackRecord cbrecord;
-  CFMutableDictionaryRef pixelBufferAttributes = NULL;
-
-
-  s = gst_caps_get_structure (caps, 0);
-
-  /* 1. Extract information from incoming caps */
-  if ((!gst_structure_get_int (s, "width", &width)) ||
-      (!gst_structure_get_int (s, "height", &height)) ||
-      (!(rate = gst_structure_get_value (s, "framerate"))))
-    goto beach;
-  par = gst_structure_get_value (s, "pixel-aspect-ratio");
-  cdata = gst_structure_get_value (s, "codec_data");
-
-  /* 2. Create ImageDescription */
-  if (cdata) {
-    GstBuffer *cdatabuf;
-
-    cdatabuf = gst_value_get_buffer (cdata);
-    desc = new_image_description (qtwrapper, cdatabuf, width, height);
-  } else {
-    desc = new_image_description (qtwrapper, NULL, width, height);
-  }
-
-#if DEBUG_DUMP
-  dump_image_description (desc);
-#endif
-
-  /* 3.a. Create a handle to receive the ImageDescription */
-  GST_LOG_OBJECT (qtwrapper,
-      "Creating a new ImageDescriptionHandle of %" G_GSIZE_FORMAT " bytes",
-      desc->idSize);
-  qtwrapper->idesc = (ImageDescriptionHandle) NewHandleClear (desc->idSize);
-  if (G_UNLIKELY (qtwrapper->idesc == NULL)) {
-    GST_WARNING_OBJECT (qtwrapper,
-        "Failed to create an ImageDescriptionHandle of size %" G_GSIZE_FORMAT,
-        desc->idSize);
-    g_free (desc);
-    goto beach;
-  }
-
-  /* 3.b. Copy the ImageDescription to the handle */
-  GST_LOG_OBJECT (qtwrapper,
-      "Copying %" G_GSIZE_FORMAT
-      " bytes from desc [%p] to *qtwrapper->video [%p]", desc->idSize, desc,
-      *qtwrapper->idesc);
-  memcpy (*qtwrapper->idesc, desc, desc->idSize);
-  g_free (desc);
-
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-  outformat = kYUVSPixelFormat;
-#else
-  outformat = k2vuyPixelFormat;
-#endif
-
-  /* 4. Put output pixel info in dictionnnary */
-  pixelBufferAttributes =
-      CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
-      &kCFTypeDictionaryValueCallBacks);
-
-  addSInt32ToDictionary (pixelBufferAttributes, kCVPixelBufferWidthKey, width);
-  addSInt32ToDictionary (pixelBufferAttributes, kCVPixelBufferHeightKey,
-      height);
-  addSInt32ToDictionary (pixelBufferAttributes,
-      kCVPixelBufferPixelFormatTypeKey, outformat);
-
-  /* 5. fill in callback structure */
-
-  cbrecord.decompressionTrackingCallback = decompressCb;
-  cbrecord.decompressionTrackingRefCon = qtwrapper;
-
-  /* 6. create decompressionsession */
-  status = ICMDecompressionSessionCreate (NULL,
-      qtwrapper->idesc,
-      sessionoptions, pixelBufferAttributes, &cbrecord, &qtwrapper->decsession);
-
-  qtwrapper->outsize = width * height * 2;
-  qtwrapper->width = width;
-  qtwrapper->height = height;
-
-  if (status) {
-    GST_DEBUG_OBJECT (qtwrapper,
-        "Error when Calling ICMDecompressionSessionCreate : %ld", status);
-    goto beach;
-  }
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-  outformat = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
-#else
-  outformat = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
-#endif
-
-  /* 9. Create output caps */
-  *outcaps = gst_caps_new_simple ("video/x-raw-yuv",
-      "format", GST_TYPE_FOURCC, outformat,
-      "width", G_TYPE_INT, width,
-      "height", G_TYPE_INT, height,
-      "framerate", GST_TYPE_FRACTION,
-      gst_value_get_fraction_numerator (rate),
-      gst_value_get_fraction_denominator (rate), NULL);
-  if (par)
-    gst_structure_set_value (gst_caps_get_structure (*outcaps, 0),
-        "pixel-aspect-ratio", par);
-  res = TRUE;
-
-beach:
-  return res;
-}
-
-static gboolean
-qtwrapper_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
-{
-  QTWrapperVideoDecoder *qtwrapper;
-  gboolean ret = FALSE;
-  GstCaps *othercaps = NULL;
-
-  qtwrapper = (QTWrapperVideoDecoder *) gst_pad_get_parent (pad);
-
-  GST_LOG_OBJECT (qtwrapper, "caps:%" GST_PTR_FORMAT, caps);
-
-  /* Setup the decoder with the given input caps */
-  if (!(open_decoder (qtwrapper, caps, &othercaps))) {
-    goto beach;
-  }
-
-  ret = gst_pad_set_caps (qtwrapper->srcpad, othercaps);
-  if (!ret)
-    goto beach;
-
-beach:
-  if (othercaps)
-    gst_caps_unref (othercaps);
-  gst_object_unref (qtwrapper);
-  return ret;
-}
-
-static void
-decompressCb (void *decompressionTrackingRefCon,
-    OSStatus result,
-    ICMDecompressionTrackingFlags decompressionTrackingFlags,
-    CVPixelBufferRef pixelBuffer,
-    TimeValue64 displayTime,
-    TimeValue64 displayDuration,
-    ICMValidTimeFlags validTimeFlags, void *reserved, void *sourceFrameRefCon)
-{
-  QTWrapperVideoDecoder *qtwrapper;
-  GstBuffer *origbuf = (GstBuffer *) sourceFrameRefCon;
-
-  qtwrapper = (QTWrapperVideoDecoder *) decompressionTrackingRefCon;
-
-  GST_LOG_OBJECT (qtwrapper,
-      "result:%d, flags:0x%x, pixelBuffer:%p, displayTime:%lld, displayDuration:%lld",
-      (guint32) result, (guint32) decompressionTrackingFlags, pixelBuffer,
-      displayTime, displayDuration);
-
-  GST_LOG_OBJECT (qtwrapper,
-      "validTimeFlags:0x%x, reserved:%p, sourceFrameRefCon:%p",
-      (guint32) validTimeFlags, reserved, sourceFrameRefCon);
-
-  if (decompressionTrackingFlags & kICMDecompressionTracking_ReleaseSourceData) {
-    GST_LOG ("removing previous buffer : %p", origbuf);
-    gst_buffer_unref (origbuf);
-  }
-
-  if (decompressionTrackingFlags & kICMDecompressionTracking_EmittingFrame)
-    GST_LOG ("EMITTING FRAME");
-  if (decompressionTrackingFlags & kICMDecompressionTracking_FrameDecoded)
-    GST_LOG ("FRAME DECODED");
-  if (decompressionTrackingFlags & kICMDecompressionTracking_FrameDropped)
-    GST_LOG ("FRAME DROPPED");
-  if (decompressionTrackingFlags &
-      kICMDecompressionTracking_FrameNeedsRequeueing)
-    GST_LOG ("FRAME NEEDS REQUEUING");
-
-  if ((decompressionTrackingFlags & kICMDecompressionTracking_EmittingFrame)
-      && pixelBuffer) {
-    guint8 *addr;
-    GstBuffer *outbuf;
-    size_t size;
-    GstClockTime outtime;
-
-    size = CVPixelBufferGetDataSize (pixelBuffer);
-    outtime = gst_util_uint64_scale (displayTime, GST_SECOND, 600);
-
-    GST_LOG ("Got a buffer ready outtime : %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (outtime));
-
-    if (qtwrapper->flushing) {
-      CVPixelBufferRelease (pixelBuffer);
-      goto beach;
-    }
-
-    dump_cvpixel_buffer (pixelBuffer);
-
-    CVPixelBufferRetain (pixelBuffer);
-    if (CVPixelBufferLockBaseAddress (pixelBuffer, 0))
-      GST_WARNING ("Couldn't lock base adress on pixel buffer !");
-    addr = CVPixelBufferGetBaseAddress (pixelBuffer);
-
-    /* allocate buffer */
-    qtwrapper->lastret =
-        gst_pad_alloc_buffer (qtwrapper->srcpad, GST_BUFFER_OFFSET_NONE,
-        (gint) qtwrapper->outsize, GST_PAD_CAPS (qtwrapper->srcpad), &outbuf);
-    if (G_UNLIKELY (qtwrapper->lastret != GST_FLOW_OK)) {
-      GST_LOG ("gst_pad_alloc_buffer() returned %s",
-          gst_flow_get_name (qtwrapper->lastret));
-      goto beach;
-    }
-
-    /* copy data */
-    GST_LOG ("copying data in buffer from %p to %p",
-        addr, GST_BUFFER_DATA (outbuf));
-    if (G_UNLIKELY ((qtwrapper->width * 2) !=
-            CVPixelBufferGetBytesPerRow (pixelBuffer))) {
-      guint i;
-      gulong realpixels;
-      size_t stride;
-
-      stride = CVPixelBufferGetBytesPerRow (pixelBuffer);
-      realpixels = qtwrapper->width * 2;
-
-      /* special copy for stride handling */
-      for (i = 0; i < qtwrapper->height; i++)
-        memmove (GST_BUFFER_DATA (outbuf) + realpixels * i,
-            addr + stride * i, realpixels);
-
-    } else
-      memmove (GST_BUFFER_DATA (outbuf), addr, (int) qtwrapper->outsize);
-
-    /* Release CVPixelBuffer */
-    CVPixelBufferUnlockBaseAddress (pixelBuffer, 0);
-    CVPixelBufferRelease (pixelBuffer);
-
-    /* Set proper timestamp ! */
-    gst_buffer_set_caps (outbuf, GST_PAD_CAPS (qtwrapper->srcpad));
-    GST_BUFFER_TIMESTAMP (outbuf) = qtwrapper->last_ts;
-    GST_BUFFER_DURATION (outbuf) = qtwrapper->last_duration;
-    GST_BUFFER_SIZE (outbuf) = (int) qtwrapper->outsize;
-
-    /* See if we push buffer downstream */
-    if (G_LIKELY (!qtwrapper->framebuffering)) {
-      GST_LOG ("No buffering needed, pushing buffer downstream");
-      MAC_UNLOCK (qtwrapper);
-      qtwrapper->lastret = gst_pad_push (qtwrapper->srcpad, outbuf);
-      MAC_LOCK (qtwrapper);
-    } else {
-      /* Check if we push the current buffer or the stored buffer */
-      if (!qtwrapper->prevbuf) {
-        GST_LOG ("Storing buffer");
-        qtwrapper->prevbuf = outbuf;
-        qtwrapper->lastret = GST_FLOW_OK;
-      } else if (GST_BUFFER_TIMESTAMP (qtwrapper->prevbuf) >
-          GST_BUFFER_TIMESTAMP (outbuf)) {
-        GST_LOG ("Newly decoded buffer is earliest, pushing that one !");
-        MAC_UNLOCK (qtwrapper);
-        qtwrapper->lastret = gst_pad_push (qtwrapper->srcpad, outbuf);
-        MAC_LOCK (qtwrapper);
-      } else {
-        GstBuffer *tmp;
-
-        tmp = qtwrapper->prevbuf;
-        qtwrapper->prevbuf = outbuf;
-        GST_LOG ("Stored buffer is earliest, pushing that one !");
-        MAC_UNLOCK (qtwrapper);
-        qtwrapper->lastret = gst_pad_push (qtwrapper->srcpad, tmp);
-        MAC_LOCK (qtwrapper);
-      }
-    }
-  } else {
-    qtwrapper->lastret = GST_FLOW_OK;
-  }
-
-beach:
-  return;
-}
-
-/* _chain
- *
- * Here we feed the data to the decoder and ask to decode frames.
- *
- * Known issues/questions are:
- *  * How can we be guaranteed that one frame in automatically gives one output
- *    frame ?
- *  * PTS/DTS timestamp issues. With mpeg-derivate formats, the incoming order is
- *    different from the output order.
- */
-
-static GstFlowReturn
-qtwrapper_video_decoder_chain (GstPad * pad, GstBuffer * buf)
-{
-  QTWrapperVideoDecoder *qtwrapper;
-  GstFlowReturn ret = GST_FLOW_OK;
-  ICMFrameTimeRecord frameTime = { {0} };
-  OSStatus status;
-  guint64 intime;
-
-  qtwrapper = (QTWrapperVideoDecoder *) gst_pad_get_parent (pad);
-
-  intime = gst_util_uint64_scale (GST_BUFFER_TIMESTAMP (buf), 600, GST_SECOND);
-
-  GST_DEBUG_OBJECT (qtwrapper,
-      "buffer:%p timestamp:%" GST_TIME_FORMAT " intime:%llu Size:%d", buf,
-      GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), intime,
-      GST_BUFFER_SIZE (buf));
-
-  frameTime.recordSize = sizeof (ICMFrameTimeRecord);
-/*   *(TimeValue64 *)&frameTime.value = intime; */
-  frameTime.value.lo = (guint32) (intime & 0xffffffff);
-  frameTime.value.hi = (guint32) (intime >> 32);
-  frameTime.base = 0;
-  frameTime.scale = 600;
-  frameTime.rate = fixed1;
-  frameTime.duration = 1;
-  frameTime.flags = icmFrameTimeDecodeImmediately;
-/*   frameTime.flags = icmFrameTimeIsNonScheduledDisplayTime; */
-  frameTime.frameNumber = (long) (++qtwrapper->frameNumber);
-
-  MAC_LOCK (qtwrapper);
-
-  qtwrapper->last_ts = GST_BUFFER_TIMESTAMP (buf);
-  qtwrapper->last_duration = GST_BUFFER_DURATION (buf);
-
-  status = ICMDecompressionSessionDecodeFrame (qtwrapper->decsession,
-      GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), NULL, &frameTime, buf);
-  MAC_UNLOCK (qtwrapper);
-
-  if (status) {
-    GST_WARNING_OBJECT (qtwrapper, "Error when Calling DecodeFrame() : %ld",
-        status);
-    ret = GST_FLOW_ERROR;
-    goto beach;
-  }
-
-beach:
-  gst_object_unref (qtwrapper);
-  return qtwrapper->lastret;
-}
-
-static gboolean
-qtwrapper_video_decoder_sink_event (GstPad * pad, GstEvent * event)
-{
-  gboolean res;
-  QTWrapperVideoDecoder *qtwrapper;
-
-  qtwrapper = (QTWrapperVideoDecoder *) gst_pad_get_parent (pad);
-
-  GST_LOG_OBJECT (pad, "event : %s", GST_EVENT_TYPE_NAME (event));
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_FLUSH_START:
-      MAC_LOCK (qtwrapper);
-      qtwrapper->flushing = TRUE;
-      if (qtwrapper->prevbuf) {
-        GST_LOG ("About to unref buffer %p", qtwrapper->prevbuf);
-        gst_buffer_unref (qtwrapper->prevbuf);
-        qtwrapper->prevbuf = NULL;
-      }
-      ICMDecompressionSessionFlush (qtwrapper->decsession);
-      MAC_UNLOCK (qtwrapper);
-      break;
-    case GST_EVENT_FLUSH_STOP:
-      MAC_LOCK (qtwrapper);
-      qtwrapper->flushing = FALSE;
-      qtwrapper->prevbuf = NULL;
-      MAC_UNLOCK (qtwrapper);
-      break;
-    default:
-      break;
-  }
-
-  res = gst_pad_push_event (qtwrapper->srcpad, event);
-
-  gst_object_unref (qtwrapper);
-  return res;
-}
-
-/* _register
- *
- * Scan through all available Image Decompressor components to find the ones we
- * can handle and wrap in this plugin.
- */
-
-gboolean
-qtwrapper_video_decoders_register (GstPlugin * plugin)
-{
-  gboolean res = TRUE;
-  Component componentID = NULL;
-  ComponentDescription desc = {
-    'imdc', 0, 0, 0, 0
-  };
-  GTypeInfo typeinfo = {
-    sizeof (QTWrapperVideoDecoderClass),
-    (GBaseInitFunc) qtwrapper_video_decoder_base_init,
-    NULL,
-    (GClassInitFunc) qtwrapper_video_decoder_class_init,
-    NULL,
-    NULL,
-    sizeof (QTWrapperVideoDecoder),
-    0,
-    (GInstanceInitFunc) qtwrapper_video_decoder_init,
-  };
-
-  /* Find all ImageDecoders ! */
-  GST_DEBUG ("There are %ld decompressors available", CountComponents (&desc));
-
-  /* loop over ImageDecoders */
-  do {
-    componentID = FindNextComponent (componentID, &desc);
-
-    GST_LOG ("componentID : %p", componentID);
-
-    if (componentID) {
-      ComponentDescription thisdesc;
-      gchar *name = NULL, *info = NULL;
-      GstCaps *caps = NULL;
-      gchar *type_name = NULL;
-      GType type;
-      QTWrapperVideoDecoderParams *params = NULL;
-
-      if (!(get_name_info_from_component (componentID, &thisdesc, &name,
-                  &info)))
-        goto next;
-
-      if (!get_output_info_from_component (componentID)) {
-        GST_WARNING ("Couldn't get output info from component");
-        goto next;
-      }
-
-      GST_LOG (" name:%s", GST_STR_NULL (name));
-      GST_LOG (" info:%s", GST_STR_NULL (info));
-
-      GST_LOG (" type:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentType));
-      GST_LOG (" subtype:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentSubType));
-      GST_LOG (" manufacturer:%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentManufacturer));
-
-      if (!(caps = fourcc_to_caps (thisdesc.componentSubType))) {
-        GST_LOG
-            ("We can't find caps for this component, switching to the next one !");
-        goto next;
-      }
-
-      type_name = g_strdup_printf ("qtwrappervideodec_%" GST_FOURCC_FORMAT,
-          QT_FOURCC_ARGS (thisdesc.componentSubType));
-      g_strdelimit (type_name, " ", '_');
-
-      if (g_type_from_name (type_name)) {
-        GST_WARNING ("We already have a registered plugin for %s", type_name);
-        goto next;
-      }
-
-      params = g_new0 (QTWrapperVideoDecoderParams, 1);
-      params->component = componentID;
-      params->sinkcaps = gst_caps_ref (caps);
-
-      GST_INFO ("Registering g_type for type_name: %s", type_name);
-      type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
-      /* Store params in type qdata */
-      g_type_set_qdata (type, QTWRAPPER_VDEC_PARAMS_QDATA, (gpointer) params);
-
-      /* register type */
-      if (!gst_element_register (plugin, type_name, GST_RANK_MARGINAL, type)) {
-        g_warning ("Failed to register %s", type_name);;
-        g_type_set_qdata (type, QTWRAPPER_VDEC_PARAMS_QDATA, NULL);
-        g_free (params);
-        res = FALSE;
-        goto next;
-      } else {
-        GST_LOG ("Reigstered video plugin %s", type_name);
-      }
-
-    next:
-      if (name)
-        g_free (name);
-      if (info)
-        g_free (info);
-      if (type_name)
-        g_free (type_name);
-      if (caps)
-        gst_caps_unref (caps);
-    }
-
-  } while (componentID && res);
-
-  return res;
-}
diff --git a/sys/shm/Makefile.in b/sys/shm/Makefile.in
index e7627e9..e5788f1 100644
--- a/sys/shm/Makefile.in
+++ b/sys/shm/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/shm
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -229,6 +239,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -246,8 +257,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -272,8 +285,6 @@
 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@
@@ -286,7 +297,6 @@
 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@
@@ -294,6 +304,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -320,11 +332,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -343,8 +358,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -403,10 +416,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -423,7 +440,6 @@
 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@
@@ -432,7 +448,6 @@
 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@
@@ -445,7 +460,6 @@
 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@
@@ -459,6 +473,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -470,6 +485,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -508,6 +525,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -543,10 +561,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -572,6 +594,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -579,7 +604,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -608,6 +640,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -618,6 +651,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -648,17 +682,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -675,6 +708,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -713,6 +747,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -749,7 +784,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/shm/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/shm/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1090,6 +1124,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/shm/gstshmsrc.c b/sys/shm/gstshmsrc.c
index 8af1f34..1e69af7 100644
--- a/sys/shm/gstshmsrc.c
+++ b/sys/shm/gstshmsrc.c
@@ -54,7 +54,8 @@
 {
   PROP_0,
   PROP_SOCKET_PATH,
-  PROP_IS_LIVE
+  PROP_IS_LIVE,
+  PROP_SHM_AREA_NAME
 };
 
 struct GstShmBuffer
@@ -123,14 +124,20 @@
   g_object_class_install_property (gobject_class, PROP_SOCKET_PATH,
       g_param_spec_string ("socket-path",
           "Path to the control socket",
-          "The path to the control socket used to control the shared memory"
-          " transport", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          "The path to the control socket used to control the shared memory",
+          NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_IS_LIVE,
       g_param_spec_boolean ("is-live", "Is this a live source",
           "True if the element cannot produce data in PAUSED", FALSE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_SHM_AREA_NAME,
+      g_param_spec_string ("shm-area-name",
+          "Name of the shared memory area",
+          "The name of the shared memory area used to get buffers",
+          NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&srctemplate));
 
@@ -205,6 +212,12 @@
     case PROP_IS_LIVE:
       g_value_set_boolean (value, gst_base_src_is_live (GST_BASE_SRC (object)));
       break;
+    case PROP_SHM_AREA_NAME:
+      GST_OBJECT_LOCK (object);
+      if (self->pipe)
+        g_value_set_string (value, sp_get_shm_area_name (self->pipe->pipe));
+      GST_OBJECT_UNLOCK (object);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c
index 6bd9efc..de89026 100644
--- a/sys/shm/shmpipe.c
+++ b/sys/shm/shmpipe.c
@@ -90,6 +90,7 @@
   int id;
 
   int use_count;
+  int is_writer;
 
   int shm_fd;
 
@@ -286,6 +287,8 @@
 
   area->shm_area_len = size;
 
+  area->is_writer = (path == NULL);
+
 
   if (path)
     flags = O_RDONLY;
@@ -320,6 +323,7 @@
 
     prot = PROT_READ | PROT_WRITE;
   } else {
+    area->shm_area_name = strdup (path);
     prot = PROT_READ;
   }
 
@@ -353,7 +357,8 @@
     close (area->shm_fd);
 
   if (area->shm_area_name) {
-    shm_unlink (area->shm_area_name);
+    if (area->is_writer)
+      shm_unlink (area->shm_area_name);
     free (area->shm_area_name);
   }
 
@@ -664,13 +669,15 @@
       assert (cb.payload.new_shm_area.path_size > 0);
       assert (cb.payload.new_shm_area.size > 0);
 
-      area_name = malloc (cb.payload.new_shm_area.path_size);
+      area_name = malloc (cb.payload.new_shm_area.path_size + 1);
       retval = recv (self->main_socket, area_name,
           cb.payload.new_shm_area.path_size, 0);
       if (retval != cb.payload.new_shm_area.path_size) {
         free (area_name);
         return -3;
       }
+      /* Ensure area_name is NULL terminated */
+      area_name[retval] = 0;
 
       newarea = sp_open_shm (area_name, cb.area_id, 0,
           cb.payload.new_shm_area.size);
@@ -935,6 +942,15 @@
   return self->main_socket;
 }
 
+const gchar *
+sp_get_shm_area_name (ShmPipe * self)
+{
+  if (self->shm_area)
+    return self->shm_area->shm_area_name;
+
+  return NULL;
+}
+
 int
 sp_writer_get_client_fd (ShmClient * client)
 {
diff --git a/sys/shm/shmpipe.h b/sys/shm/shmpipe.h
index 6d75629..1f746ac 100644
--- a/sys/shm/shmpipe.h
+++ b/sys/shm/shmpipe.h
@@ -91,6 +91,7 @@
 int sp_writer_resize (ShmPipe * self, size_t size);
 
 int sp_get_fd (ShmPipe * self);
+const char *sp_get_shm_area_name (ShmPipe *self);
 int sp_writer_get_client_fd (ShmClient * client);
 
 ShmBlock *sp_writer_alloc_block (ShmPipe * self, size_t size);
diff --git a/sys/uvch264/Makefile.am b/sys/uvch264/Makefile.am
index aec1455..6af2474 100644
--- a/sys/uvch264/Makefile.am
+++ b/sys/uvch264/Makefile.am
@@ -8,7 +8,6 @@
 libgstuvch264_la_CFLAGS =   $(GST_PLUGINS_BAD_CFLAGS) \
 			    $(GST_PLUGINS_BASE_CFLAGS) \
 	  		    $(GST_BASE_CFLAGS) \
-			    $(GST_VIDEO_CFLAGS) \
 			    $(GST_CFLAGS) \
 			    $(G_UDEV_CFLAGS) \
 			    $(LIBUSB_CFLAGS) \
@@ -18,9 +17,8 @@
 libgstuvch264_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 libgstuvch264_la_LIBADD =   $(GST_PLUGINS_BASE_LIBS) \
+			    -lgstvideo-$(GST_API_VERSION) \
 			    $(GST_BASE_LIBS) \
-			    $(GST_PLUGINS_BASE_LIBS) \
-			    $(GST_VIDEO_LIBS) \
 			    $(GST_LIBS) \
 			    $(G_UDEV_LIBS) \
 			    $(LIBUSB_LIBS) \
diff --git a/sys/uvch264/Makefile.in b/sys/uvch264/Makefile.in
index 32190bc..b8b1750 100644
--- a/sys/uvch264/Makefile.in
+++ b/sys/uvch264/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/uvch264
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -157,7 +167,6 @@
 libgstuvch264_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la
 am_libgstuvch264_la_OBJECTS = libgstuvch264_la-gstuvch264.lo \
 	libgstuvch264_la-gstuvch264_mjpgdemux.lo \
@@ -233,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -250,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -276,8 +288,6 @@
 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@
@@ -290,7 +300,6 @@
 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@
@@ -298,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -324,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -347,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -407,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -427,7 +443,6 @@
 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@
@@ -436,7 +451,6 @@
 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@
@@ -449,7 +463,6 @@
 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@
@@ -463,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -474,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -512,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -547,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -576,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -583,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -612,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -622,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -652,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -679,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -717,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -739,7 +773,6 @@
 libgstuvch264_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
 			    $(GST_PLUGINS_BASE_CFLAGS) \
 	  		    $(GST_BASE_CFLAGS) \
-			    $(GST_VIDEO_CFLAGS) \
 			    $(GST_CFLAGS) \
 			    $(G_UDEV_CFLAGS) \
 			    $(LIBUSB_CFLAGS) \
@@ -748,9 +781,8 @@
 libgstuvch264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstuvch264_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 libgstuvch264_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+			    -lgstvideo-$(GST_API_VERSION) \
 			    $(GST_BASE_LIBS) \
-			    $(GST_PLUGINS_BASE_LIBS) \
-			    $(GST_VIDEO_LIBS) \
 			    $(GST_LIBS) \
 			    $(G_UDEV_LIBS) \
 			    $(LIBUSB_LIBS) \
@@ -776,7 +808,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/uvch264/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/uvch264/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1109,6 +1140,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/uvch264/gstuvch264_mjpgdemux.c b/sys/uvch264/gstuvch264_mjpgdemux.c
old mode 100755
new mode 100644
diff --git a/sys/uvch264/gstuvch264_src.c b/sys/uvch264/gstuvch264_src.c
index af9da69..94c09fa 100644
--- a/sys/uvch264/gstuvch264_src.c
+++ b/sys/uvch264/gstuvch264_src.c
@@ -170,7 +170,7 @@
   "height = " GST_VIDEO_SIZE_RANGE ", "                                 \
   "framerate = " GST_VIDEO_FPS_RANGE ", "                               \
   "stream-format = (string) { byte-stream, avc }, "                     \
-  "alignment = (string) { au }, "                                       \
+  "alignment = (string) au, "                                           \
   "profile = (string) { high, main, baseline, constrained-baseline }"
 
 static GstStaticPadTemplate vfsrc_template =
@@ -1351,23 +1351,26 @@
   gboolean ret = FALSE;
 
   if (g_strcmp0 (property, "enable-sei") == 0) {
-    ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
-        offsetof (uvcx_video_config_probe_commit_t, bTimestamp), 1,
-        &min, &def, &max);
-    *changeable = (min != max);
-    *default_value = (def != 0);
+    if ((ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
+                offsetof (uvcx_video_config_probe_commit_t, bTimestamp), 1,
+                &min, &def, &max))) {
+      *changeable = (min != max);
+      *default_value = (def != 0);
+    }
   } else if (g_strcmp0 (property, "preview-flipped") == 0) {
-    ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
-        offsetof (uvcx_video_config_probe_commit_t, bPreviewFlipped), 1,
-        &min, &def, &max);
-    *changeable = (min != max);
-    *default_value = (def != 0);
+    if ((ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
+                offsetof (uvcx_video_config_probe_commit_t, bPreviewFlipped), 1,
+                &min, &def, &max))) {
+      *changeable = (min != max);
+      *default_value = (def != 0);
+    }
   } else if (g_strcmp0 (property, "fixed-framerate") == 0) {
-    ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
-        offsetof (uvcx_video_config_probe_commit_t, bRateControlMode), 1,
-        &min, &def, &max);
-    *changeable = ((max & UVC_H264_RATECONTROL_FIXED_FRM_FLG) != 0);
-    *default_value = ((def & UVC_H264_RATECONTROL_FIXED_FRM_FLG) != 0);
+    if ((ret = probe_setting (self, UVCX_VIDEO_CONFIG_PROBE,
+                offsetof (uvcx_video_config_probe_commit_t, bRateControlMode),
+                1, &min, &def, &max))) {
+      *changeable = ((max & UVC_H264_RATECONTROL_FIXED_FRM_FLG) != 0);
+      *default_value = ((def & UVC_H264_RATECONTROL_FIXED_FRM_FLG) != 0);
+    }
   }
 
   return ret;
@@ -3061,13 +3064,18 @@
 static gboolean
 gst_uvc_h264_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
 {
-  gboolean ret = FALSE;
+  gboolean ret;
 
   switch (GST_QUERY_TYPE (query)) {
-    case GST_QUERY_CAPS:
-      gst_query_set_caps_result (query,
-          gst_uvc_h264_src_getcaps (pad, parent, query));
+    case GST_QUERY_CAPS:{
+      GstCaps *caps;
+
+      caps = gst_uvc_h264_src_getcaps (pad, parent, query);
+      gst_query_set_caps_result (query, caps);
+      gst_caps_unref (caps);
       ret = TRUE;
+      break;
+    }
     default:
       ret = gst_pad_query_default (pad, parent, query);
       break;
diff --git a/sys/uvch264/gstuvch264_src.h b/sys/uvch264/gstuvch264_src.h
index f972d6d..f220ed0 100644
--- a/sys/uvch264/gstuvch264_src.h
+++ b/sys/uvch264/gstuvch264_src.h
@@ -35,6 +35,7 @@
 #include "uvc_h264.h"
 
 G_BEGIN_DECLS
+
 #define GST_TYPE_UVC_H264_SRC                   \
   (gst_uvc_h264_src_get_type())
 #define GST_UVC_H264_SRC(obj)                                           \
@@ -158,5 +159,6 @@
   GstBaseCameraSrcClass parent;
 };
 
+G_END_DECLS
 
 #endif /* __GST_UVC_H264_SRC_H__ */
diff --git a/sys/vcd/Makefile.in b/sys/vcd/Makefile.in
index 7746963..ebd5bf0 100644
--- a/sys/vcd/Makefile.in
+++ b/sys/vcd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/vcd
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/vcd/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/vcd/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c
index 4f5fe46..7372ac5 100644
--- a/sys/vcd/vcdsrc.c
+++ b/sys/vcd/vcdsrc.c
@@ -62,22 +62,9 @@
 #define GST_CAT_DEFAULT gst_vcdsrc_debug
 
 static void gst_vcdsrc_uri_handler_init (gpointer g_iface, gpointer iface_data);
-
-static void
-gst_vcdsrc_setup_interfaces (GType type)
-{
-  static const GInterfaceInfo urihandler_info = {
-    gst_vcdsrc_uri_handler_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info);
-}
-
-
-GST_BOILERPLATE_FULL (GstVCDSrc, gst_vcdsrc, GstPushSrc, GST_TYPE_PUSH_SRC,
-    gst_vcdsrc_setup_interfaces);
+#define gst_vcdsrc_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstVCDSrc, gst_vcdsrc, GST_TYPE_PUSH_SRC,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_vcdsrc_uri_handler_init));
 
 static void gst_vcdsrc_finalize (GObject * object);
 
@@ -90,29 +77,19 @@
 static gboolean gst_vcdsrc_stop (GstBaseSrc * src);
 static GstFlowReturn gst_vcdsrc_create (GstPushSrc * src, GstBuffer ** out);
 
-static void
-gst_vcdsrc_base_init (gpointer g_class)
-{
-  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-
-  gst_element_class_set_static_metadata (element_class, "VCD Source",
-      "Source/File",
-      "Asynchronous read from VCD disk", "Erik Walthinsen <omega@cse.ogi.edu>");
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&srctemplate));
-}
 
 static void
 gst_vcdsrc_class_init (GstVCDSrcClass * klass)
 {
   GObjectClass *gobject_class;
+  GstElementClass *element_class;
   GstBaseSrcClass *basesrc_class;
   GstPushSrcClass *pushsrc_class;
 
   gobject_class = (GObjectClass *) klass;
   basesrc_class = (GstBaseSrcClass *) klass;
   pushsrc_class = (GstPushSrcClass *) klass;
+  element_class = (GstElementClass *) klass;
 
   gobject_class->set_property = gst_vcdsrc_set_property;
   gobject_class->get_property = gst_vcdsrc_get_property;
@@ -136,10 +113,17 @@
 
   GST_DEBUG_CATEGORY_INIT (gst_vcdsrc_debug, "vcdsrc", 0,
       "VideoCD Source element");
+
+  gst_element_class_set_static_metadata (element_class, "VCD Source",
+      "Source/File",
+      "Asynchronous read from VCD disk", "Erik Walthinsen <omega@cse.ogi.edu>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&srctemplate));
 }
 
 static void
-gst_vcdsrc_init (GstVCDSrc * vcdsrc, GstVCDSrcClass * klass)
+gst_vcdsrc_init (GstVCDSrc * vcdsrc)
 {
   vcdsrc->device = g_strdup (DEFAULT_DEVICE);
   vcdsrc->track = 1;
@@ -317,6 +301,7 @@
 {
   GstVCDSrc *vcdsrc;
   GstBuffer *outbuf;
+  GstMapInfo map_info;
   gulong offset;
   struct cdrom_msf *msf;
   gint error_count = 0;
@@ -328,8 +313,15 @@
     goto eos;
 
   /* create the buffer */
-  outbuf = gst_buffer_new_and_alloc (vcdsrc->bytes_per_read);
-  msf = (struct cdrom_msf *) GST_BUFFER_DATA (outbuf);
+  outbuf = gst_buffer_new_allocate (NULL, vcdsrc->bytes_per_read, NULL);
+  if (!outbuf)
+    goto error_unmapped;
+
+  if (!gst_buffer_map (outbuf, &map_info, GST_MAP_READWRITE))
+    goto error_unmapped;
+
+  msf = (struct cdrom_msf *) map_info.data;
+
 
 read:
   /* read it in from the device */
@@ -351,21 +343,26 @@
         ("Read from cdrom at %d:%d:%d failed: %s",
             msf->cdmsf_min0, msf->cdmsf_sec0, msf->cdmsf_frame0,
             strerror (errno)));
-    return GST_FLOW_ERROR;
+    goto error_mapped;
   }
 
-  GST_BUFFER_SIZE (outbuf) = vcdsrc->bytes_per_read;
+  gst_buffer_unmap (outbuf, &map_info);
   vcdsrc->curoffset += 1;
 
   *buf = outbuf;
-
   return GST_FLOW_OK;
 
   /* ERRORS */
+error_mapped:
+  gst_buffer_unmap (outbuf, &map_info);
+error_unmapped:
+  if (outbuf)
+    gst_buffer_unref (outbuf);
+  return GST_FLOW_ERROR;
 eos:
   {
     GST_DEBUG_OBJECT (vcdsrc, "got eos");
-    return GST_FLOW_UNEXPECTED;
+    return GST_FLOW_EOS;
   }
 }
 
@@ -463,21 +460,21 @@
  * URI interface.
  */
 
-static guint
-gst_vcdsrc_uri_get_type (void)
+static GstURIType
+gst_vcdsrc_uri_get_type (GType type)
 {
   return GST_URI_SRC;
 }
 
-static gchar **
-gst_vcdsrc_uri_get_protocols (void)
+static const gchar *const *
+gst_vcdsrc_uri_get_protocols (GType type)
 {
-  static gchar *protocols[] = { (char *) "vcd", NULL };
+  static const gchar *protocols[] = { "vcd", NULL };
 
   return protocols;
 }
 
-static const gchar *
+static gchar *
 gst_vcdsrc_uri_get_uri (GstURIHandler * handler)
 {
   GstVCDSrc *src = GST_VCDSRC (handler);
@@ -491,7 +488,8 @@
 }
 
 static gboolean
-gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
+gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri,
+    GError ** error)
 {
   GstVCDSrc *src = GST_VCDSRC (handler);
   gchar *location = NULL;
@@ -548,17 +546,23 @@
   /* ERRORS */
 wrong_protocol:
   {
-    GST_ERROR_OBJECT (src, "wrong protocol, uri = %s", uri);
+    GST_ERROR_OBJECT (src, "Wrong protocol, uri = %s", uri);
+    g_set_error (error, GST_URI_ERROR, GST_URI_ERROR_UNSUPPORTED_PROTOCOL,
+        "Wrong protocol, uri = %s", uri);
     return FALSE;
   }
 no_location:
   {
-    GST_ERROR_OBJECT (src, "no location specified");
+    GST_ERROR_OBJECT (src, "No location specified");
+    g_set_error_literal (error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI,
+        "No location specified");
     return FALSE;
   }
 invalid_location:
   {
-    GST_ERROR_OBJECT (src, "Invalid location %s in URI '%s'", location, uri);
+    GST_ERROR_OBJECT (src, "Invalid location '%s' in URI '%s'", location, uri);
+    g_set_error (error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI,
+        "Invalid location '%s' in URI '%s'", location, uri);
     g_free (location);
     return FALSE;
   }
diff --git a/sys/vdpau/Makefile.in b/sys/vdpau/Makefile.in
index 62cd2f9..aab2029 100644
--- a/sys/vdpau/Makefile.in
+++ b/sys/vdpau/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/vdpau
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -235,6 +245,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -252,8 +263,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -278,8 +291,6 @@
 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@
@@ -292,7 +303,6 @@
 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@
@@ -300,6 +310,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -326,11 +338,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -349,8 +364,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -409,10 +422,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -429,7 +446,6 @@
 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@
@@ -438,7 +454,6 @@
 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@
@@ -451,7 +466,6 @@
 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@
@@ -465,6 +479,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -476,6 +491,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -514,6 +531,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -549,10 +567,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -578,6 +600,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -585,7 +610,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -614,6 +646,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -624,6 +657,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -654,17 +688,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -681,6 +714,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -719,6 +753,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -783,7 +818,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/vdpau/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/vdpau/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1153,6 +1187,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
  # \
  # 	h264/gsth264dpb.c \
  # 	h264/gstvdph264dec.c
diff --git a/sys/vdpau/gstvdpvideobufferpool.c b/sys/vdpau/gstvdpvideobufferpool.c
index afdce16..c89ca36 100644
--- a/sys/vdpau/gstvdpvideobufferpool.c
+++ b/sys/vdpau/gstvdpvideobufferpool.c
@@ -111,7 +111,7 @@
         ("Failed to create output image buffer of %dx%d pixels",
             info.width, info.height),
         ("Invalid input caps %" GST_PTR_FORMAT, caps));
-    return FALSE;;
+    return FALSE;
   }
 }
 
diff --git a/sys/wasapi/Makefile.am b/sys/wasapi/Makefile.am
index 740c43c..38fcd44 100644
--- a/sys/wasapi/Makefile.am
+++ b/sys/wasapi/Makefile.am
@@ -5,9 +5,9 @@
 	gstwasapisink.c \
 	gstwasapiutil.c 
 
-libgstwasapi_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) -DCOBJMACROS=1
-libgstwasapi_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-	-lgstaudio-$(GST_API_VERSION) \
+libgstwasapi_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -DCOBJMACROS=1
+libgstwasapi_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
+        $(GST_BASE_LIBS) $(GST_LIBS) \
 	$(WASAPI_LIBS)
 libgstwasapi_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
 libgstwasapi_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
diff --git a/sys/wasapi/Makefile.in b/sys/wasapi/Makefile.in
index e57776e..298edd9 100644
--- a/sys/wasapi/Makefile.in
+++ b/sys/wasapi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/wasapi
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -734,9 +769,9 @@
 	gstwasapisink.c \
 	gstwasapiutil.c 
 
-libgstwasapi_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) -DCOBJMACROS=1
-libgstwasapi_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-	-lgstaudio-$(GST_API_VERSION) \
+libgstwasapi_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -DCOBJMACROS=1
+libgstwasapi_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
+        $(GST_BASE_LIBS) $(GST_LIBS) \
 	$(WASAPI_LIBS)
 
 libgstwasapi_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
@@ -761,7 +796,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/wasapi/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/wasapi/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1094,6 +1128,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/wininet/Makefile.in b/sys/wininet/Makefile.in
index 0ce66ba..667af54 100644
--- a/sys/wininet/Makefile.in
+++ b/sys/wininet/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/wininet
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -227,6 +237,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +255,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +283,6 @@
 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@
@@ -284,7 +295,6 @@
 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@
@@ -292,6 +302,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +330,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +356,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +414,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +438,6 @@
 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@
@@ -430,7 +446,6 @@
 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@
@@ -443,7 +458,6 @@
 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@
@@ -457,6 +471,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +483,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +523,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +559,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +592,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +602,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +638,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +649,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +680,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +706,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +745,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -747,7 +782,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/wininet/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/wininet/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1056,6 +1090,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/winks/Makefile.am b/sys/winks/Makefile.am
index 4233b64..10626b1 100644
--- a/sys/winks/Makefile.am
+++ b/sys/winks/Makefile.am
@@ -3,6 +3,7 @@
 libgstwinks_la_SOURCES = gstksclock.c \
 	gstksvideodevice.c \
 	gstksvideosrc.c \
+	ksdeviceprovider.c ksdeviceprovider.h \
 	kshelpers.c kshelpers.h \
 	ksvideohelpers.c 
 libgstwinks_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/winks/Makefile.in b/sys/winks/Makefile.in
index f684593..94c4d12 100644
--- a/sys/winks/Makefile.in
+++ b/sys/winks/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/winks
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -159,7 +169,8 @@
 	$(am__DEPENDENCIES_1)
 am_libgstwinks_la_OBJECTS = libgstwinks_la-gstksclock.lo \
 	libgstwinks_la-gstksvideodevice.lo \
-	libgstwinks_la-gstksvideosrc.lo libgstwinks_la-kshelpers.lo \
+	libgstwinks_la-gstksvideosrc.lo \
+	libgstwinks_la-ksdeviceprovider.lo libgstwinks_la-kshelpers.lo \
 	libgstwinks_la-ksvideohelpers.lo
 libgstwinks_la_OBJECTS = $(am_libgstwinks_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -231,6 +242,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +260,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +288,6 @@
 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@
@@ -288,7 +300,6 @@
 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@
@@ -296,6 +307,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +335,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +361,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +419,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +443,6 @@
 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@
@@ -434,7 +451,6 @@
 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@
@@ -447,7 +463,6 @@
 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@
@@ -461,6 +476,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +488,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +528,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +564,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +597,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +607,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +643,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +654,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +685,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +711,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +750,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -732,6 +768,7 @@
 libgstwinks_la_SOURCES = gstksclock.c \
 	gstksvideodevice.c \
 	gstksvideosrc.c \
+	ksdeviceprovider.c ksdeviceprovider.h \
 	kshelpers.c kshelpers.h \
 	ksvideohelpers.c 
 
@@ -761,7 +798,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/winks/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/winks/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -827,6 +863,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-gstksclock.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-gstksvideodevice.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-gstksvideosrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-ksdeviceprovider.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-kshelpers.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwinks_la-ksvideohelpers.Plo@am__quote@
 
@@ -875,6 +912,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 $(libgstwinks_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwinks_la_CFLAGS) $(CFLAGS) -c -o libgstwinks_la-gstksvideosrc.lo `test -f 'gstksvideosrc.c' || echo '$(srcdir)/'`gstksvideosrc.c
 
+libgstwinks_la-ksdeviceprovider.lo: ksdeviceprovider.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwinks_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwinks_la_CFLAGS) $(CFLAGS) -MT libgstwinks_la-ksdeviceprovider.lo -MD -MP -MF $(DEPDIR)/libgstwinks_la-ksdeviceprovider.Tpo -c -o libgstwinks_la-ksdeviceprovider.lo `test -f 'ksdeviceprovider.c' || echo '$(srcdir)/'`ksdeviceprovider.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwinks_la-ksdeviceprovider.Tpo $(DEPDIR)/libgstwinks_la-ksdeviceprovider.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ksdeviceprovider.c' object='libgstwinks_la-ksdeviceprovider.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 $(libgstwinks_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwinks_la_CFLAGS) $(CFLAGS) -c -o libgstwinks_la-ksdeviceprovider.lo `test -f 'ksdeviceprovider.c' || echo '$(srcdir)/'`ksdeviceprovider.c
+
 libgstwinks_la-kshelpers.lo: kshelpers.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwinks_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwinks_la_CFLAGS) $(CFLAGS) -MT libgstwinks_la-kshelpers.lo -MD -MP -MF $(DEPDIR)/libgstwinks_la-kshelpers.Tpo -c -o libgstwinks_la-kshelpers.lo `test -f 'kshelpers.c' || echo '$(srcdir)/'`kshelpers.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwinks_la-kshelpers.Tpo $(DEPDIR)/libgstwinks_la-kshelpers.Plo
@@ -1102,6 +1146,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/winks/gstksclock.c b/sys/winks/gstksclock.c
index e67e02f..8d46905 100644
--- a/sys/winks/gstksclock.c
+++ b/sys/winks/gstksclock.c
@@ -133,7 +133,7 @@
 
   priv->state = KSSTATE_STOP;
 
-  devices = ks_enumerate_devices (&KSCATEGORY_CLOCK);
+  devices = ks_enumerate_devices (&KSCATEGORY_CLOCK, &KSCATEGORY_CAPTURE);
   if (devices == NULL)
     goto error;
 
diff --git a/sys/winks/gstksvideodevice.c b/sys/winks/gstksvideodevice.c
index 994f2f4..d00b6a7 100644
--- a/sys/winks/gstksvideodevice.c
+++ b/sys/winks/gstksvideodevice.c
@@ -83,6 +83,7 @@
   guint fps_n;
   guint fps_d;
   guint8 *rgb_swap_buf;
+  gboolean is_muxed;
 
   HANDLE pin_handle;
 
@@ -627,8 +628,7 @@
     if (ks_object_get_property (pin_handle, KSPROPSETID_Stream,
             KSPROPERTY_STREAM_MASTERCLOCK, (gpointer *) & cur_clock_handle,
             &cur_clock_handle_size, NULL)) {
-      GST_DEBUG ("current master clock handle: 0x%08x",
-          (guint) * cur_clock_handle);
+      GST_DEBUG ("current master clock handle: %p", *cur_clock_handle);
       CloseHandle (*cur_clock_handle);
       g_free (cur_clock_handle);
     } else {
@@ -753,14 +753,17 @@
   if (!gst_structure_get_int (s, "width", &width) ||
       !gst_structure_get_int (s, "height", &height) ||
       !gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d)) {
-    GST_ERROR ("Failed to get width/height/fps");
-    goto error;
+    gst_structure_get_boolean (s, "systemstream", &priv->is_muxed);
+    if (!priv->is_muxed) {
+      GST_ERROR ("Failed to get width/height/fps");
+      goto error;
+    }
+  } else {
+    if (!ks_video_fixate_media_type (media_type->range,
+            media_type->format, width, height, fps_n, fps_d))
+      goto error;
   }
 
-  if (!ks_video_fixate_media_type (media_type->range,
-          media_type->format, width, height, fps_n, fps_d))
-    goto error;
-
   if (priv->cur_media_type != NULL) {
     if (media_type->format_size == priv->cur_media_type->format_size &&
         memcmp (media_type->format, priv->cur_media_type->format,
@@ -912,10 +915,12 @@
   gboolean buffer_found = FALSE;
   guint i;
 
-  buffer_found = gst_buffer_is_writable (req->buf);
+  buffer_found = gst_buffer_is_writable (req->buf)
+      && gst_buffer_is_all_memory_writable (req->buf);
 
   for (i = 0; !buffer_found && i < G_N_ELEMENTS (priv->spare_buffers); i++) {
-    if (gst_buffer_is_writable (priv->spare_buffers[i])) {
+    if (gst_buffer_is_writable (priv->spare_buffers[i])
+        && gst_buffer_is_all_memory_writable (priv->spare_buffers[i])) {
       GstBuffer *hold;
 
       hold = req->buf;
@@ -963,8 +968,13 @@
   params = &req->params;
   memset (params, 0, sizeof (KSSTREAM_READ_PARAMS));
 
-  gst_buffer_map (req->buf, &info, GST_MAP_READ);
-  params->header.Size = sizeof (KSSTREAM_HEADER) + sizeof (KS_FRAME_INFO);
+  if (!gst_buffer_map (req->buf, &info, GST_MAP_WRITE))
+    goto map_failed;
+
+  params->header.Size = sizeof (KSSTREAM_HEADER);
+  if (!priv->is_muxed) {
+    params->header.Size += sizeof (KS_FRAME_INFO);
+  }
   params->header.PresentationTime.Numerator = 1;
   params->header.PresentationTime.Denominator = 1;
   params->header.FrameExtent = gst_ks_video_device_get_frame_size (self);
@@ -994,6 +1004,10 @@
         error_code, error_str);
     return FALSE;
   }
+map_failed:
+  {
+    return FALSE;
+  }
 }
 
 GstFlowReturn
@@ -1161,20 +1175,23 @@
   }
 }
 
-void
-gst_ks_video_device_postprocess_frame (GstKsVideoDevice * self,
-    guint8 * buf, guint buf_size)
+gboolean
+gst_ks_video_device_postprocess_frame (GstKsVideoDevice * self, GstBuffer * buf)
 {
   GstKsVideoDevicePrivate *priv = GST_KS_VIDEO_DEVICE_GET_PRIVATE (self);
 
   /* If it's RGB we need to flip the image */
   if (priv->rgb_swap_buf != NULL) {
+    GstMapInfo info;
     gint stride, line;
     guint8 *dst, *src;
 
-    stride = buf_size / priv->height;
-    dst = buf;
-    src = buf + buf_size - stride;
+    if (!gst_buffer_map (buf, &info, GST_MAP_READWRITE))
+      return FALSE;
+
+    stride = info.size / priv->height;
+    dst = info.data;
+    src = info.data + info.size - stride;
 
     for (line = 0; line < priv->height / 2; line++) {
       memcpy (priv->rgb_swap_buf, dst, stride);
@@ -1185,7 +1202,11 @@
       dst += stride;
       src -= stride;
     }
+
+    gst_buffer_unmap (buf, &info);
   }
+
+  return TRUE;
 }
 
 void
@@ -1203,3 +1224,11 @@
 
   ResetEvent (priv->cancel_event);
 }
+
+gboolean
+gst_ks_video_device_stream_is_muxed (GstKsVideoDevice * self)
+{
+  GstKsVideoDevicePrivate *priv = GST_KS_VIDEO_DEVICE_GET_PRIVATE (self);
+
+  return priv->is_muxed;
+}
diff --git a/sys/winks/gstksvideodevice.h b/sys/winks/gstksvideodevice.h
index d148f92..649faaa 100644
--- a/sys/winks/gstksvideodevice.h
+++ b/sys/winks/gstksvideodevice.h
@@ -77,10 +77,12 @@
 gboolean gst_ks_video_device_get_latency (GstKsVideoDevice * self, GstClockTime * min_latency, GstClockTime * max_latency);
 
 GstFlowReturn gst_ks_video_device_read_frame (GstKsVideoDevice * self, GstBuffer ** buf, GstClockTime * presentation_time, gulong * error_code, gchar ** error_str);
-void gst_ks_video_device_postprocess_frame (GstKsVideoDevice * self, guint8 * buf, guint buf_size);
+gboolean gst_ks_video_device_postprocess_frame (GstKsVideoDevice * self, GstBuffer *buf);
 void gst_ks_video_device_cancel (GstKsVideoDevice * self);
 void gst_ks_video_device_cancel_stop (GstKsVideoDevice * self);
 
+gboolean gst_ks_video_device_stream_is_muxed (GstKsVideoDevice * self);
+
 G_END_DECLS
 
 #endif /* __GST_KS_VIDEO_DEVICE_H__ */
diff --git a/sys/winks/gstksvideosrc.c b/sys/winks/gstksvideosrc.c
index 2694ac7..07cdf8b 100644
--- a/sys/winks/gstksvideosrc.c
+++ b/sys/winks/gstksvideosrc.c
@@ -45,6 +45,7 @@
 #include "gstksvideodevice.h"
 #include "kshelpers.h"
 #include "ksvideohelpers.h"
+#include "ksdeviceprovider.h"
 
 #define DEFAULT_DEVICE_PATH     NULL
 #define DEFAULT_DEVICE_NAME     NULL
@@ -222,9 +223,6 @@
       g_param_spec_boolean ("enable-quirks", "Enable quirks",
           "Enable driver-specific quirks", DEFAULT_ENABLE_QUIRKS,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-  GST_DEBUG_CATEGORY_INIT (gst_ks_debug, "ksvideosrc",
-      0, "Kernel streaming video source");
 }
 
 static void
@@ -394,7 +392,7 @@
   GList *devices, *cur;
   GArray *array = g_array_new (TRUE, TRUE, sizeof (GValue));
 
-  devices = ks_enumerate_devices (&KSCATEGORY_VIDEO);
+  devices = ks_enumerate_devices (&KSCATEGORY_VIDEO, &KSCATEGORY_CAPTURE);
   if (devices == NULL)
     return array;
 
@@ -425,7 +423,7 @@
 
   g_assert (priv->device == NULL);
 
-  devices = ks_enumerate_devices (&KSCATEGORY_VIDEO);
+  devices = ks_enumerate_devices (&KSCATEGORY_VIDEO, &KSCATEGORY_CAPTURE);
   if (devices == NULL)
     goto error_no_devices;
 
@@ -438,10 +436,14 @@
         entry->index, entry->name, entry->path);
   }
 
-  for (cur = devices; cur != NULL && device == NULL; cur = cur->next) {
+  for (cur = devices; cur != NULL; cur = cur->next) {
     KsDeviceEntry *entry = cur->data;
     gboolean match;
 
+    if (device != NULL) {
+      ks_device_entry_free (entry);
+      continue;
+    }
     if (priv->device_path != NULL) {
       match = g_ascii_strcasecmp (entry->path, priv->device_path) == 0;
     } else if (priv->device_name != NULL) {
@@ -813,6 +815,13 @@
   GstClock *clock;
   GstClockTime timestamp;
 
+  /* Don't timestamp muxed streams */
+  if (gst_ks_video_device_stream_is_muxed (priv->device)) {
+    duration = timestamp = GST_CLOCK_TIME_NONE;
+    priv->offset++;
+    goto timestamp;
+  }
+
   duration = gst_ks_video_device_get_duration (priv->device);
 
   GST_OBJECT_LOCK (self);
@@ -898,9 +907,11 @@
     priv->prev_ts = timestamp;
   }
 
+timestamp:
   GST_BUFFER_OFFSET (buf) = priv->offset;
   GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
-  GST_BUFFER_TIMESTAMP (buf) = timestamp;
+  GST_BUFFER_PTS (buf) = timestamp;
+  GST_BUFFER_DTS (buf) = GST_CLOCK_TIME_NONE;
   GST_BUFFER_DURATION (buf) = duration;
 
   return TRUE;
@@ -950,7 +961,6 @@
   GstClockTime presentation_time;
   gulong error_code;
   gchar *error_str;
-  GstMapInfo info;
 
   g_assert (priv->device != NULL);
 
@@ -987,9 +997,11 @@
   if (G_UNLIKELY (priv->do_stats))
     gst_ks_video_src_update_statistics (self);
 
-  gst_buffer_map (*buf, &info, GST_MAP_WRITE);
-  gst_ks_video_device_postprocess_frame (priv->device, info.data, info.size);
-  gst_buffer_unmap (*buf, &info);
+  if (!gst_ks_video_device_postprocess_frame (priv->device, *buf)) {
+    GST_ELEMENT_ERROR (self, RESOURCE, FAILED, ("Postprocessing failed"),
+        ("Postprocessing failed"));
+    return GST_FLOW_ERROR;
+  }
 
   return GST_FLOW_OK;
 
@@ -1067,8 +1079,18 @@
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  return gst_element_register (plugin, "ksvideosrc",
-      GST_RANK_NONE, GST_TYPE_KS_VIDEO_SRC);
+  GST_DEBUG_CATEGORY_INIT (gst_ks_debug, "ksvideosrc",
+      0, "Kernel streaming video source");
+
+  if (!gst_element_register (plugin, "ksvideosrc",
+          GST_RANK_NONE, GST_TYPE_KS_VIDEO_SRC))
+    return FALSE;
+
+  if (!gst_device_provider_register (plugin, "ksdeviceprovider",
+          GST_RANK_PRIMARY, GST_TYPE_KS_DEVICE_PROVIDER))
+    return FALSE;
+
+  return TRUE;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
diff --git a/sys/winks/ksdeviceprovider.c b/sys/winks/ksdeviceprovider.c
new file mode 100644
index 0000000..54429eb
--- /dev/null
+++ b/sys/winks/ksdeviceprovider.c
@@ -0,0 +1,795 @@
+/* GStreamer
+ * Copyright (C) 2015 Руслан Ижбулатов <lrn1986@gmail.com>
+ *
+ * ksdeviceprovider.c: Kernel Streaming device probing and monitoring
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstksvideosrc.h"
+#include "ksdeviceprovider.h"
+
+#include <string.h>
+
+#include <dbt.h>                /* for DBT_* consts and [_]DEV_* structs */
+#include <devguid.h>            /* for GUID_DEVCLASS_WCEUSBS */
+#include <setupapi.h>           /* for DIGCF_ALLCLASSES */
+
+#include <gst/gst.h>
+
+#include "kshelpers.h"
+#include "ksvideohelpers.h"
+
+
+GST_DEBUG_CATEGORY_EXTERN (gst_ks_debug);
+#define GST_CAT_DEFAULT gst_ks_debug
+
+
+static GstDevice *gst_ks_device_new (guint id,
+    const gchar * device_name, GstCaps * caps, const gchar * device_path,
+    GstKsDeviceType type);
+
+G_DEFINE_TYPE (GstKsDeviceProvider, gst_ks_device_provider,
+    GST_TYPE_DEVICE_PROVIDER);
+
+static GList *gst_ks_device_provider_probe (GstDeviceProvider * provider);
+static gboolean gst_ks_device_provider_start (GstDeviceProvider * provider);
+static void gst_ks_device_provider_stop (GstDeviceProvider * provider);
+
+static void
+gst_ks_device_provider_class_init (GstKsDeviceProviderClass * klass)
+{
+  GstDeviceProviderClass *dm_class = GST_DEVICE_PROVIDER_CLASS (klass);
+
+  dm_class->probe = gst_ks_device_provider_probe;
+  dm_class->start = gst_ks_device_provider_start;
+  dm_class->stop = gst_ks_device_provider_stop;
+
+  gst_device_provider_class_set_static_metadata (dm_class,
+      "KernelStreaming Device Provider", "Sink/Source/Audio/Video",
+      "List and provide KernelStreaming source and sink devices",
+      "Руслан Ижбулатов <lrn1986@gmail.com>");
+}
+
+static void
+gst_ks_device_provider_init (GstKsDeviceProvider * self)
+{
+}
+
+static GstDevice *
+new_video_source (const KsDeviceEntry * info)
+{
+  GstCaps *caps;
+  HANDLE filter_handle;
+  GList *media_types;
+  GList *cur;
+
+  g_assert (info->path != NULL);
+
+  caps = gst_caps_new_empty ();
+
+  filter_handle = CreateFile (info->path,
+      GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
+      FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
+  if (!ks_is_valid_handle (filter_handle))
+    goto error;
+
+  media_types = ks_video_probe_filter_for_caps (filter_handle);
+
+  for (cur = media_types; cur != NULL; cur = cur->next) {
+    KsVideoMediaType *media_type = cur->data;
+
+    gst_caps_append (caps, gst_caps_copy (media_type->translated_caps));
+
+    ks_video_media_type_free (media_type);
+  }
+
+  CloseHandle (filter_handle);
+  g_list_free (media_types);
+
+  return gst_ks_device_new (info->index, info->name,
+      caps, info->path, GST_KS_DEVICE_TYPE_VIDEO_SOURCE);
+error:
+  gst_caps_unref (caps);
+  return NULL;
+}
+
+static GList *
+gst_ks_device_provider_probe (GstDeviceProvider * provider)
+{
+  /*GstKsDeviceProvider *self = GST_KS_DEVICE_PROVIDER (provider); */
+  GList *devices, *cur;
+  GList *result;
+
+  result = NULL;
+
+  devices = ks_enumerate_devices (&KSCATEGORY_VIDEO, &KSCATEGORY_CAPTURE);
+  if (devices == NULL)
+    return result;
+
+  devices = ks_video_device_list_sort_cameras_first (devices);
+
+  for (cur = devices; cur != NULL; cur = cur->next) {
+    GstDevice *source;
+    KsDeviceEntry *entry = cur->data;
+
+    source = new_video_source (entry);
+    if (source)
+      result = g_list_prepend (result, gst_object_ref_sink (source));
+
+    ks_device_entry_free (entry);
+  }
+
+  result = g_list_reverse (result);
+
+  g_list_free (devices);
+
+  return result;
+}
+
+static const gchar *
+get_dev_type (DEV_BROADCAST_HDR * dev_msg_header)
+{
+  switch (dev_msg_header->dbch_devicetype) {
+    case DBT_DEVTYP_DEVICEINTERFACE:
+      return "Device interface class";
+    case DBT_DEVTYP_HANDLE:
+      return "Filesystem handle";
+    case DBT_DEVTYP_OEM:
+      return "OEM or IHV device type";
+    case DBT_DEVTYP_PORT:
+      return "Port device";
+    case DBT_DEVTYP_VOLUME:
+      return "Logical volume";
+    default:
+      return "Unknown device type";
+  }
+}
+
+#define KS_MSG_WINDOW_CLASS "gst_winks_device_msg_window"
+#define WM_QUITTHREAD (WM_USER + 0)
+
+static void unreg_msg_window_class (ATOM class_id, const char *class_name,
+    HINSTANCE inst);
+
+static HDEVNOTIFY
+register_device_interface (GstKsDeviceProvider * self,
+    GUID interface_class_guid, HWND window_handle)
+{
+  DEV_BROADCAST_DEVICEINTERFACE notification_filter;
+  HDEVNOTIFY notification_handle;
+  DWORD error;
+
+  memset (&notification_filter, 0, sizeof (notification_filter));
+  notification_filter.dbcc_size = sizeof (notification_filter);
+  notification_filter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
+  notification_filter.dbcc_classguid = interface_class_guid;
+
+  notification_handle = RegisterDeviceNotificationW (window_handle,
+      &notification_filter,
+      DEVICE_NOTIFY_WINDOW_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
+  error = GetLastError ();
+
+  if (notification_handle == NULL)
+    GST_ERROR_OBJECT (self,
+        "Could not register for a device notification: %lu", error);
+
+  return notification_handle;
+}
+
+static INT_PTR WINAPI
+msg_window_message_proc (HWND window_handle, UINT message,
+    WPARAM wparam, LPARAM lparam)
+{
+  LRESULT result;
+  LONG_PTR user_data;
+  GstKsDeviceProvider *self;
+  PDEV_BROADCAST_DEVICEINTERFACE bcdi;
+  DEV_BROADCAST_HDR *dev_msg_header;
+  struct _DEV_BROADCAST_USERDEFINED *user_dev_msg_header;
+  CREATESTRUCT *create_data;
+  DWORD error;
+  HINSTANCE inst;
+  GstKsDevice *dev;
+  GstDevice *source;
+  GList *item;
+  GstDeviceProvider *provider;
+  GList *devices;
+  gchar *guid_str;
+
+  result = TRUE;
+
+  switch (message) {
+    case WM_CREATE:
+      create_data = (CREATESTRUCT *) lparam;
+
+      if (create_data->lpCreateParams == NULL) {
+        /* DO SOMETHING!! */
+      }
+
+      self = GST_KS_DEVICE_PROVIDER (create_data->lpCreateParams);
+
+      SetLastError (0);
+      SetWindowLongPtr (window_handle, GWLP_USERDATA, (LONG_PTR) self);
+      error = GetLastError ();
+      if (error != NO_ERROR) {
+        GST_ERROR_OBJECT (self,
+            "Could not attach user data to the message window: %lu", error);
+        DestroyWindow (window_handle);
+        inst = (HINSTANCE) GetModuleHandle (NULL);
+        GST_OBJECT_LOCK (self);
+        unreg_msg_window_class (self->message_window_class, KS_MSG_WINDOW_CLASS,
+            inst);
+        self->message_window_class = 0;
+        GST_OBJECT_UNLOCK (self);
+      }
+      result = FALSE;
+      break;
+    case WM_DEVICECHANGE:
+      GST_DEBUG ("WM_DEVICECHANGE for %x %x", (unsigned int) wparam,
+          (unsigned int) lparam);
+
+      user_data = GetWindowLongPtr (window_handle, GWLP_USERDATA);
+      if (user_data == 0)
+        break;
+
+      self = GST_KS_DEVICE_PROVIDER (user_data);
+      provider = GST_DEVICE_PROVIDER (self);
+
+      dev_msg_header = (DEV_BROADCAST_HDR *) lparam;
+
+      switch (wparam) {
+        case DBT_CONFIGCHANGECANCELED:
+          GST_DEBUG_OBJECT (self, "DBT_CONFIGCHANGECANCELED for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_CONFIGCHANGED:
+          GST_DEBUG_OBJECT (self, "DBT_CONFIGCHANGED for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_CUSTOMEVENT:
+          GST_DEBUG_OBJECT (self, "DBT_CUSTOMEVENT for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_DEVICEARRIVAL:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICEARRIVAL for %s",
+              get_dev_type (dev_msg_header));
+
+          if (dev_msg_header->dbch_devicetype != DBT_DEVTYP_DEVICEINTERFACE)
+            break;
+
+          bcdi = (PDEV_BROADCAST_DEVICEINTERFACE) lparam;
+          guid_str = ks_guid_to_string (&bcdi->dbcc_classguid);
+          GST_INFO_OBJECT (self, "New device, class interface GUID %s, path %s",
+              guid_str, bcdi->dbcc_name);
+          g_free (guid_str);
+          break;
+        case DBT_DEVICEQUERYREMOVE:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICEQUERYREMOVE for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_DEVICEQUERYREMOVEFAILED:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICEQUERYREMOVEFAILED for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_DEVICEREMOVECOMPLETE:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICEREMOVECOMPLETE for %s",
+              get_dev_type (dev_msg_header));
+
+          if (dev_msg_header->dbch_devicetype != DBT_DEVTYP_DEVICEINTERFACE)
+            break;
+
+          bcdi = (PDEV_BROADCAST_DEVICEINTERFACE) lparam;
+
+          guid_str = ks_guid_to_string (&bcdi->dbcc_classguid);
+          GST_INFO_OBJECT (self,
+              "Removed device, class interface GUID %s, path %s", guid_str,
+              bcdi->dbcc_name);
+          g_free (guid_str);
+          break;
+        case DBT_DEVICEREMOVEPENDING:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICEREMOVEPENDING for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_DEVICETYPESPECIFIC:
+          GST_DEBUG_OBJECT (self, "DBT_DEVICETYPESPECIFIC for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_DEVNODES_CHANGED:
+          GST_DEBUG_OBJECT (self, "DBT_DEVNODES_CHANGED for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_QUERYCHANGECONFIG:
+          GST_DEBUG_OBJECT (self, "DBT_QUERYCHANGECONFIG for %s",
+              get_dev_type (dev_msg_header));
+          break;
+        case DBT_USERDEFINED:
+          user_dev_msg_header = (struct _DEV_BROADCAST_USERDEFINED *) lparam;
+          dev_msg_header =
+              (DEV_BROADCAST_HDR *) & user_dev_msg_header->dbud_dbh;
+          GST_DEBUG_OBJECT (self, "DBT_USERDEFINED for %s: %s",
+              get_dev_type (dev_msg_header), user_dev_msg_header->dbud_szName);
+          break;
+        default:
+          break;
+      }
+
+      switch (wparam) {
+        case DBT_DEVICEARRIVAL:
+          if (dev_msg_header->dbch_devicetype != DBT_DEVTYP_DEVICEINTERFACE)
+            break;
+
+          bcdi = (PDEV_BROADCAST_DEVICEINTERFACE) lparam;
+
+          if (!IsEqualGUID (&bcdi->dbcc_classguid, &KSCATEGORY_CAPTURE) &&
+              !IsEqualGUID (&bcdi->dbcc_classguid, &KSCATEGORY_RENDER))
+            break;
+
+          devices =
+              ks_enumerate_devices (&bcdi->dbcc_classguid,
+              &bcdi->dbcc_classguid);
+          if (devices == NULL)
+            break;
+
+          source = NULL;
+          for (item = devices; item != NULL; item = item->next) {
+            KsDeviceEntry *entry = item->data;
+            GST_DEBUG_OBJECT (self, "Listed device %s = %s", entry->name,
+                entry->path);
+
+            if ((source == NULL) &&
+                (strcasecmp (entry->path, bcdi->dbcc_name) == 0))
+              source = new_video_source (entry);
+
+            ks_device_entry_free (entry);
+          }
+
+          if (source)
+            gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), source);
+
+          g_list_free (devices);
+          break;
+        case DBT_DEVICEREMOVECOMPLETE:
+          if (dev_msg_header->dbch_devicetype != DBT_DEVTYP_DEVICEINTERFACE)
+            break;
+
+          bcdi = (PDEV_BROADCAST_DEVICEINTERFACE) lparam;
+          dev = NULL;
+
+          GST_OBJECT_LOCK (self);
+          for (item = provider->devices; item; item = item->next) {
+            dev = item->data;
+
+            if (strcasecmp (dev->path, bcdi->dbcc_name) == 0) {
+              guid_str = gst_device_get_display_name (GST_DEVICE (dev));
+              GST_INFO_OBJECT (self, "Device matches to %s", guid_str);
+              g_free (guid_str);
+              gst_object_ref (dev);
+              break;
+            }
+            dev = NULL;
+          }
+          GST_OBJECT_UNLOCK (self);
+
+          if (dev) {
+            gst_device_provider_device_remove (GST_DEVICE_PROVIDER (self),
+                GST_DEVICE (dev));
+            gst_object_unref (dev);
+          }
+          break;
+        default:
+          break;
+      }
+      result = FALSE;
+      break;
+    case WM_DESTROY:
+      PostQuitMessage (0);
+      result = FALSE;
+      break;
+    case WM_QUITTHREAD:
+      DestroyWindow (window_handle);
+      result = FALSE;
+      break;
+    default:
+      result = DefWindowProc (window_handle, message, wparam, lparam);
+      break;
+  }
+
+  return result;
+}
+
+static ATOM
+reg_msg_window_class (const char *class_name, HINSTANCE inst)
+{
+  WNDCLASSEXA classex;
+
+  memset (&classex, 0, sizeof (classex));
+  classex.cbSize = sizeof (classex);
+  classex.hInstance = inst;
+  classex.lpfnWndProc = (WNDPROC) msg_window_message_proc;
+  classex.lpszClassName = class_name;
+
+  return RegisterClassExA (&classex);
+}
+
+static void
+unreg_msg_window_class (ATOM class_id, const char *class_name, HINSTANCE inst)
+{
+  if (class_id != 0)
+    UnregisterClassA ((LPCSTR) MAKELPARAM (class_id, 0), inst);
+  else
+    UnregisterClassA (class_name, inst);
+}
+
+static gpointer
+ks_provider_msg_window_thread (gpointer dat)
+{
+  GstKsDeviceProvider *self;
+  MSG msg;
+  ATOM wnd_class;
+  BOOL message_status;
+  HINSTANCE inst;
+  HANDLE msg_window = NULL;
+  DWORD error;
+  HDEVNOTIFY devnotify = NULL;
+
+  g_return_val_if_fail (dat != NULL, NULL);
+
+  self = GST_KS_DEVICE_PROVIDER (dat);
+
+  GST_DEBUG_OBJECT (self, "Entering message window thread: %p",
+      g_thread_self ());
+
+  GST_OBJECT_LOCK (self);
+  wnd_class = self->message_window_class;
+  GST_OBJECT_UNLOCK (self);
+
+  inst = (HINSTANCE) GetModuleHandle (NULL);
+
+  msg_window = CreateWindowExA (0,
+      wnd_class != 0 ? (LPCSTR) MAKELPARAM (wnd_class, 0) : KS_MSG_WINDOW_CLASS,
+      "", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, inst, self);
+  error = GetLastError ();
+
+  if (msg_window == NULL) {
+    GST_ERROR_OBJECT (self, "Could not create a message window: %lu", error);
+    GST_OBJECT_LOCK (self);
+    unreg_msg_window_class (wnd_class, KS_MSG_WINDOW_CLASS, inst);
+    self->message_window_class = 0;
+    SetEvent (self->wakeup_event);
+    GST_OBJECT_UNLOCK (self);
+    return NULL;
+  }
+
+  GST_OBJECT_LOCK (self);
+  self->message_window = msg_window;
+
+  devnotify =
+      register_device_interface (self, GUID_DEVCLASS_WCEUSBS, msg_window);
+  if (devnotify == NULL) {
+    DestroyWindow (msg_window);
+    unreg_msg_window_class (wnd_class, KS_MSG_WINDOW_CLASS, inst);
+    self->message_window_class = 0;
+    self->message_window = NULL;
+    SetEvent (self->wakeup_event);
+    GST_OBJECT_UNLOCK (self);
+    return NULL;
+  }
+
+  self->device_notify_handle = devnotify;
+  SetEvent (self->wakeup_event);
+  GST_OBJECT_UNLOCK (self);
+
+  while ((message_status = GetMessage (&msg, NULL, 0, 0)) != 0) {
+    if (message_status < 0 || msg.message == WM_QUIT)
+      break;
+    TranslateMessage (&msg);
+    DispatchMessage (&msg);
+  }
+
+  GST_DEBUG_OBJECT (self, "Exiting internal window thread: %p",
+      g_thread_self ());
+
+  return NULL;
+}
+
+static gboolean
+gst_ks_device_provider_start (GstDeviceProvider * provider)
+{
+  ATOM wnd_class = 0;
+  HINSTANCE inst;
+  HANDLE wakeup_event;
+  HWND message_window;
+  DWORD error;
+  GList *devs;
+  GList *dev;
+  GstKsDeviceProvider *self = GST_KS_DEVICE_PROVIDER (provider);
+
+  GST_OBJECT_LOCK (self);
+  g_assert (self->message_window == NULL);
+  GST_OBJECT_UNLOCK (self);
+
+  /* We get notifications on *change*, so before we get to that,
+   * we need to obtain a complete list of devices, which we will
+   * watch for changes.
+   */
+  devs = gst_ks_device_provider_probe (provider);
+  for (dev = devs; dev; dev = dev->next) {
+    if (dev->data)
+      gst_device_provider_device_add (provider, (GstDevice *) dev->data);
+  }
+  g_list_free (devs);
+
+  inst = (HINSTANCE) GetModuleHandle (NULL);
+
+  wakeup_event = CreateEvent (NULL, TRUE, FALSE, NULL);
+  error = GetLastError ();
+  if (wakeup_event == NULL) {
+    GST_OBJECT_LOCK (self);
+    GST_ERROR_OBJECT (self, "Could not create a wakeup event: %lu", error);
+    GST_OBJECT_UNLOCK (self);
+    return FALSE;
+  }
+
+  wnd_class = reg_msg_window_class (KS_MSG_WINDOW_CLASS, inst);
+  error = GetLastError ();
+
+  if ((wnd_class == 0) && (error != ERROR_CLASS_ALREADY_EXISTS)) {
+    GST_ERROR_OBJECT (self,
+        "Could not register message window class: %lu", error);
+    CloseHandle (wakeup_event);
+    return FALSE;
+  }
+
+  GST_OBJECT_LOCK (self);
+  self->message_window_class = wnd_class;
+  self->wakeup_event = wakeup_event;
+
+  self->message_thread =
+      g_thread_new ("ks-device-provider-message-window-thread",
+      (GThreadFunc) ks_provider_msg_window_thread, self);
+  if (self->message_thread == NULL) {
+    GST_ERROR_OBJECT (self, "Could not create message window thread");
+    unreg_msg_window_class (wnd_class, KS_MSG_WINDOW_CLASS, inst);
+    self->message_window_class = 0;
+    CloseHandle (self->wakeup_event);
+    GST_OBJECT_UNLOCK (self);
+    return FALSE;
+  }
+  GST_OBJECT_UNLOCK (self);
+
+  if (WaitForSingleObject (wakeup_event, INFINITE) != WAIT_OBJECT_0) {
+    GST_ERROR_OBJECT (self,
+        "Failed to wait for the message thread to initialize");
+  }
+
+  GST_OBJECT_LOCK (self);
+  CloseHandle (self->wakeup_event);
+  self->wakeup_event = NULL;
+  message_window = self->message_window;
+  GST_OBJECT_UNLOCK (self);
+
+  if (message_window == NULL)
+    return FALSE;
+
+  return TRUE;
+}
+
+static void
+gst_ks_device_provider_stop (GstDeviceProvider * provider)
+{
+  HINSTANCE inst;
+  GThread *message_thread;
+  GstKsDeviceProvider *self = GST_KS_DEVICE_PROVIDER (provider);
+
+  GST_OBJECT_LOCK (self);
+
+  g_assert (self->message_window != NULL);
+
+  UnregisterDeviceNotification (self->device_notify_handle);
+  self->device_notify_handle = NULL;
+  PostMessage (self->message_window, WM_QUITTHREAD, 0, 0);
+  message_thread = self->message_thread;
+  GST_OBJECT_UNLOCK (self);
+
+  g_thread_join (message_thread);
+
+  GST_OBJECT_LOCK (self);
+  self->message_window = NULL;
+  self->message_thread = NULL;
+
+  inst = (HINSTANCE) GetModuleHandle (NULL);
+
+  unreg_msg_window_class (self->message_window_class, KS_MSG_WINDOW_CLASS,
+      inst);
+
+  self->message_window_class = 0;
+  GST_OBJECT_UNLOCK (self);
+}
+
+enum
+{
+  PROP_PATH = 1
+};
+
+G_DEFINE_TYPE (GstKsDevice, gst_ks_device, GST_TYPE_DEVICE);
+
+static void gst_ks_device_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static void gst_ks_device_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_ks_device_finalize (GObject * object);
+static GstElement *gst_ks_device_create_element (GstDevice * device,
+    const gchar * name);
+static gboolean gst_ks_device_reconfigure_element (GstDevice * device,
+    GstElement * element);
+
+static void
+gst_ks_device_class_init (GstKsDeviceClass * klass)
+{
+  GstDeviceClass *dev_class = GST_DEVICE_CLASS (klass);
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  dev_class->create_element = gst_ks_device_create_element;
+  dev_class->reconfigure_element = gst_ks_device_reconfigure_element;
+
+  object_class->get_property = gst_ks_device_get_property;
+  object_class->set_property = gst_ks_device_set_property;
+  object_class->finalize = gst_ks_device_finalize;
+
+  g_object_class_install_property (object_class, PROP_PATH,
+      g_param_spec_string ("path", "System device path",
+          "The system path to the device", "",
+          G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+static void
+gst_ks_device_init (GstKsDevice * device)
+{
+}
+
+static void
+gst_ks_device_finalize (GObject * object)
+{
+  GstKsDevice *device = GST_KS_DEVICE (object);
+
+  g_free (device->path);
+
+  G_OBJECT_CLASS (gst_ks_device_parent_class)->finalize (object);
+}
+
+static GstElement *
+gst_ks_device_create_element (GstDevice * device, const gchar * name)
+{
+  GstKsDevice *ks_dev = GST_KS_DEVICE (device);
+  GstElement *elem;
+
+  elem = gst_element_factory_make (ks_dev->element, name);
+  g_object_set (elem, "device-path", ks_dev->path, NULL);
+
+  return elem;
+}
+
+static gboolean
+gst_ks_device_reconfigure_element (GstDevice * device, GstElement * element)
+{
+  GstKsDevice *ks_dev = GST_KS_DEVICE (device);
+
+  if (!strcmp (ks_dev->element, "ksvideosrc")) {
+    if (!GST_IS_KS_VIDEO_SRC (element))
+      return FALSE;
+/*
+  } else if (!strcmp (ks_dev->element, "ksaudiosrc")) {
+    if (!GST_IS_KS_AUDIO_SRC (element))
+      return FALSE;
+  } else if (!strcmp (ks_dev->element, "ksaudiosink")) {
+    if (!GST_IS_KS_AUDIO_SINK (element))
+      return FALSE;
+*/
+  } else {
+    g_assert_not_reached ();
+  }
+
+  g_object_set (element, "path", ks_dev->path, NULL);
+
+  return TRUE;
+}
+
+static GstDevice *
+gst_ks_device_new (guint device_index, const gchar * device_name,
+    GstCaps * caps, const gchar * device_path, GstKsDeviceType type)
+{
+  GstKsDevice *gstdev;
+  const gchar *element = NULL;
+  const gchar *klass = NULL;
+
+  g_return_val_if_fail (device_name, NULL);
+  g_return_val_if_fail (device_path, NULL);
+  g_return_val_if_fail (caps, NULL);
+
+
+  switch (type) {
+    case GST_KS_DEVICE_TYPE_VIDEO_SOURCE:
+      element = "ksvideosrc";
+      klass = "Video/Source";
+      break;
+    case GST_KS_DEVICE_TYPE_AUDIO_SOURCE:
+      element = "ksaudiosrc";
+      klass = "Audio/Source";
+      break;
+    case GST_KS_DEVICE_TYPE_AUDIO_SINK:
+      element = "ksaudiosink";
+      klass = "Audio/Sink";
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+
+
+  gstdev = g_object_new (GST_TYPE_KS_DEVICE,
+      "display-name", device_name, "caps", caps, "device-class", klass,
+      "path", device_path, NULL);
+
+  gstdev->type = type;
+  gstdev->device_index = device_index;
+  gstdev->path = g_strdup (device_path);
+  gstdev->element = element;
+
+  return GST_DEVICE (gstdev);
+}
+
+
+static void
+gst_ks_device_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstKsDevice *device;
+
+  device = GST_KS_DEVICE_CAST (object);
+
+  switch (prop_id) {
+    case PROP_PATH:
+      g_value_set_string (value, device->path);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+
+static void
+gst_ks_device_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstKsDevice *device;
+
+  device = GST_KS_DEVICE_CAST (object);
+
+  switch (prop_id) {
+    case PROP_PATH:
+      device->path = g_value_dup_string (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
diff --git a/sys/winks/ksdeviceprovider.h b/sys/winks/ksdeviceprovider.h
new file mode 100644
index 0000000..24d14a0
--- /dev/null
+++ b/sys/winks/ksdeviceprovider.h
@@ -0,0 +1,101 @@
+/* GStreamer
+ * Copyright (C) 2015 Руслан Ижбулатов <lrn1986@gmail.com>
+ *
+ * ksdeviceprovider.h: Kernel Streaming device probing and monitoring
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __GST_KS_DEVICE_PROVIDER_H__
+#define __GST_KS_DEVICE_PROVIDER_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <windows.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GstKsDeviceProvider GstKsDeviceProvider;
+typedef struct _GstKsDeviceProviderPrivate GstKsDeviceProviderPrivate;
+typedef struct _GstKsDeviceProviderClass GstKsDeviceProviderClass;
+
+#define GST_TYPE_KS_DEVICE_PROVIDER                 (gst_ks_device_provider_get_type())
+#define GST_IS_KS_DEVICE_PROVIDER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_KS_DEVICE_PROVIDER))
+#define GST_IS_KS_DEVICE_PROVIDER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_KS_DEVICE_PROVIDER))
+#define GST_KS_DEVICE_PROVIDER_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_KS_DEVICE_PROVIDER, GstKsDeviceProviderClass))
+#define GST_KS_DEVICE_PROVIDER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_KS_DEVICE_PROVIDER, GstKsDeviceProvider))
+#define GST_KS_DEVICE_PROVIDER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstKsDeviceProviderClass))
+#define GST_KS_DEVICE_PROVIDER_CAST(obj)            ((GstKsDeviceProvider *)(obj))
+
+struct _GstKsDeviceProvider {
+  GstDeviceProvider parent;
+
+  HANDLE            message_window;
+  ATOM              message_window_class;
+  HDEVNOTIFY        device_notify_handle;
+  HANDLE            wakeup_event;
+  GThread          *message_thread;
+};
+
+typedef enum {
+  GST_KS_DEVICE_TYPE_INVALID = 0,
+  GST_KS_DEVICE_TYPE_VIDEO_SOURCE,
+  GST_KS_DEVICE_TYPE_VIDEO_SINK,
+  GST_KS_DEVICE_TYPE_AUDIO_SOURCE,
+  GST_KS_DEVICE_TYPE_AUDIO_SINK
+} GstKsDeviceType;
+
+struct _GstKsDeviceProviderClass {
+  GstDeviceProviderClass    parent_class;
+};
+
+GType gst_ks_device_provider_get_type (void);
+
+
+typedef struct _GstKsDevice GstKsDevice;
+typedef struct _GstKsDevicePrivate GstKsDevicePrivate;
+typedef struct _GstKsDeviceClass GstKsDeviceClass;
+
+#define GST_TYPE_KS_DEVICE                 (gst_ks_device_get_type())
+#define GST_IS_KS_DEVICE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_KS_DEVICE))
+#define GST_IS_KS_DEVICE_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_KS_DEVICE))
+#define GST_KS_DEVICE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_KS_DEVICE, GstKsDeviceClass))
+#define GST_KS_DEVICE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_KS_DEVICE, GstKsDevice))
+#define GST_KS_DEVICE_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstKsDeviceClass))
+#define GST_KS_DEVICE_CAST(obj)            ((GstKsDevice *)(obj))
+
+struct _GstKsDevice {
+  GstDevice         parent;
+
+  GstKsDeviceType   type;
+  guint             device_index;
+  gchar            *path;
+  const gchar      *element;
+};
+
+struct _GstKsDeviceClass {
+  GstDeviceClass    parent_class;
+};
+
+GType gst_ks_device_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_KS_DEVICE_PROVIDER_H__ */
diff --git a/sys/winks/kshelpers.c b/sys/winks/kshelpers.c
index 57b30b7..bbb9b06 100644
--- a/sys/winks/kshelpers.c
+++ b/sys/winks/kshelpers.c
@@ -28,7 +28,7 @@
 
 #ifndef STATIC_KSPROPSETID_Wave_Queued
 #define STATIC_KSPROPSETID_Wave_Queued \
-    0x16a15b10L,0x16f0,0x11d0,0xa1,0x95,0x00,0x20,0xaf,0xd1,0x56,0xe4
+    0x16a15b10L, 0x16f0, 0x11d0, { 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 }
 DEFINE_GUIDSTRUCT ("16a15b10-16f0-11d0-a195-0020afd156e4",
     KSPROPSETID_Wave_Queued);
 #endif
@@ -40,13 +40,13 @@
 }
 
 GList *
-ks_enumerate_devices (const GUID * category)
+ks_enumerate_devices (const GUID * devtype, const GUID * direction_category)
 {
   GList *result = NULL;
   HDEVINFO devinfo;
   gint i;
 
-  devinfo = SetupDiGetClassDevsW (category, NULL, NULL,
+  devinfo = SetupDiGetClassDevsW (devtype, NULL, NULL,
       DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
   if (!ks_is_valid_handle (devinfo))
     return NULL;                /* no devices */
@@ -54,6 +54,7 @@
   for (i = 0;; i++) {
     BOOL success;
     SP_DEVICE_INTERFACE_DATA if_data = { 0, };
+    SP_DEVICE_INTERFACE_DATA if_alias_data = { 0, };
     SP_DEVICE_INTERFACE_DETAIL_DATA_W *if_detail_data;
     DWORD if_detail_data_size;
     SP_DEVINFO_DATA devinfo_data = { 0, };
@@ -61,11 +62,17 @@
 
     if_data.cbSize = sizeof (SP_DEVICE_INTERFACE_DATA);
 
-    success = SetupDiEnumDeviceInterfaces (devinfo, NULL, category, i,
-        &if_data);
+    success = SetupDiEnumDeviceInterfaces (devinfo, NULL, devtype, i, &if_data);
     if (!success)               /* all devices enumerated? */
       break;
 
+    if_alias_data.cbSize = sizeof (SP_DEVICE_INTERFACE_DATA);
+    success =
+        SetupDiGetDeviceInterfaceAlias (devinfo, &if_data, direction_category,
+        &if_alias_data);
+    if (!success)
+      continue;
+
     if_detail_data_size = (MAX_PATH - 1) * sizeof (gunichar2);
     if_detail_data = g_malloc0 (if_detail_data_size);
     if_detail_data->cbSize = sizeof (SP_DEVICE_INTERFACE_DETAIL_DATA_W);
@@ -403,28 +410,28 @@
 
 #ifndef STATIC_KSPROPSETID_GM
 #define STATIC_KSPROPSETID_GM \
-    0xAF627536, 0xE719, 0x11D2, 0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D
+    0xAF627536, 0xE719, 0x11D2, { 0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D }
 #endif
 #ifndef STATIC_KSPROPSETID_Jack
 #define STATIC_KSPROPSETID_Jack \
-    0x4509F757, 0x2D46, 0x4637, 0x8E, 0x62, 0xCE, 0x7D, 0xB9, 0x44, 0xF5, 0x7B
+    0x4509F757, 0x2D46, 0x4637, { 0x8E, 0x62, 0xCE, 0x7D, 0xB9, 0x44, 0xF5, 0x7B }
 #endif
 
 #ifndef STATIC_PROPSETID_VIDCAP_SELECTOR
 #define STATIC_PROPSETID_VIDCAP_SELECTOR \
-    0x1ABDAECA, 0x68B6, 0x4F83, 0x93, 0x71, 0xB4, 0x13, 0x90, 0x7C, 0x7B, 0x9F
+    0x1ABDAECA, 0x68B6, 0x4F83, { 0x93, 0x71, 0xB4, 0x13, 0x90, 0x7C, 0x7B, 0x9F }
 #endif
 #ifndef STATIC_PROPSETID_EXT_DEVICE
 #define STATIC_PROPSETID_EXT_DEVICE \
-    0xB5730A90, 0x1A2C, 0x11cf, 0x8c, 0x23, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14
+    0xB5730A90, 0x1A2C, 0x11cf, { 0x8c, 0x23, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14 }
 #endif
 #ifndef STATIC_PROPSETID_EXT_TRANSPORT
 #define STATIC_PROPSETID_EXT_TRANSPORT \
-    0xA03CD5F0, 0x3045, 0x11cf, 0x8c, 0x44, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14
+    0xA03CD5F0, 0x3045, 0x11cf, { 0x8c, 0x44, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14 }
 #endif
 #ifndef STATIC_PROPSETID_TIMECODE_READER
 #define STATIC_PROPSETID_TIMECODE_READER \
-    0x9B496CE1, 0x811B, 0x11cf, 0x8C, 0x77, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14
+    0x9B496CE1, 0x811B, 0x11cf, { 0x8C, 0x77, 0x00, 0xAA, 0x00, 0x6B, 0x68, 0x14 }
 #endif
 
 static const KsPropertySetMapping known_property_sets[] = {
diff --git a/sys/winks/kshelpers.h b/sys/winks/kshelpers.h
index 6e5871c..5181bfc 100644
--- a/sys/winks/kshelpers.h
+++ b/sys/winks/kshelpers.h
@@ -37,7 +37,7 @@
 
 gboolean ks_is_valid_handle (HANDLE h);
 
-GList * ks_enumerate_devices (const GUID * category);
+GList * ks_enumerate_devices (const GUID * devtype, const GUID * direction_category);
 void ks_device_entry_free (KsDeviceEntry * entry);
 void ks_device_list_free (GList * devices);
 
diff --git a/sys/winks/ksvideohelpers.c b/sys/winks/ksvideohelpers.c
index afa5e41..9d70461 100644
--- a/sys/winks/ksvideohelpers.c
+++ b/sys/winks/ksvideohelpers.c
@@ -180,11 +180,12 @@
   }
 
   if (!structure) {
-    GST_DEBUG ("Unknown DirectShow Video GUID %08x-%04x-%04x-%04x-%08x%04x",
-        (guint) subtype_guid.Data1, (guint) subtype_guid.Data2,
-        (guint) subtype_guid.Data3,
-        (guint) subtype_guid.Data4, (guint) & subtype_guid.Data4[2],
-        (guint) & subtype_guid.Data4[6]);
+    GST_DEBUG ("Unknown DirectShow Video GUID "
+        "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+        (guint) subtype_guid.Data1, subtype_guid.Data2, subtype_guid.Data3,
+        subtype_guid.Data4[0], subtype_guid.Data4[1], subtype_guid.Data4[2],
+        subtype_guid.Data4[3], subtype_guid.Data4[4], subtype_guid.Data4[5],
+        subtype_guid.Data4[6], subtype_guid.Data4[7]);
   }
 
   return structure;
@@ -445,7 +446,8 @@
         guint i;
 
         for (i = 0; i < items->Count; i++) {
-          if (IsEqualGUID (&range->MajorFormat, &KSDATAFORMAT_TYPE_VIDEO)) {
+          if (IsEqualGUID (&range->MajorFormat, &MEDIATYPE_Video)
+              || IsEqualGUID (&range->MajorFormat, &MEDIATYPE_Interleaved)) {
             KsVideoMediaType *entry;
             gpointer src_vscc, src_format;
             GstStructure *media_structure;
@@ -484,16 +486,22 @@
               entry->sample_size =
                   vr->VideoInfoHeader.hdr.bmiHeader.biSizeImage;
             } else if (IsEqualGUID (&range->Specifier, &FORMAT_MPEG2Video)) {
-              /* Untested and probably wrong... */
               KS_DATARANGE_MPEG2_VIDEO *vr =
                   (KS_DATARANGE_MPEG2_VIDEO *) entry->range;
-
               src_vscc = &vr->ConfigCaps;
               src_format = &vr->VideoInfoHeader;
 
               entry->format_size = sizeof (vr->VideoInfoHeader);
               entry->sample_size =
                   vr->VideoInfoHeader.hdr.bmiHeader.biSizeImage;
+            } else if (IsEqualGUID (&range->Specifier, &FORMAT_DvInfo)) {
+              KS_DATARANGE_DVVIDEO *vr = (KS_DATARANGE_DVVIDEO *) entry->range;
+
+              src_vscc = NULL;
+              src_format = &vr->DVVideoInfo;
+
+              entry->format_size = sizeof (vr->DVVideoInfo);
+              entry->sample_size = vr->DataRange.SampleSize;
             } else {
               gchar *guid_str;
 
@@ -509,19 +517,26 @@
             if (entry != NULL) {
               g_assert (entry->sample_size != 0);
 
-              memcpy ((gpointer) & entry->vscc, src_vscc, sizeof (entry->vscc));
+              if (src_vscc != NULL) {
+                memcpy ((gpointer) & entry->vscc, src_vscc,
+                    sizeof (entry->vscc));
+              }
 
               entry->format = g_malloc (entry->format_size);
               memcpy (entry->format, src_format, entry->format_size);
 
               media_structure =
                   ks_video_format_to_structure (range->SubFormat,
-                  range->MajorFormat);
+                  range->Specifier);
 
               if (media_structure == NULL) {
                 g_warning ("ks_video_format_to_structure returned NULL");
                 ks_video_media_type_free (entry);
                 entry = NULL;
+              } else if (src_vscc == NULL) {
+                entry->translated_caps = gst_caps_new_empty ();
+                gst_caps_append_structure (entry->translated_caps,
+                    media_structure);
               } else if (ks_video_append_video_stream_cfg_fields
                   (media_structure, &entry->vscc)) {
                 entry->translated_caps = gst_caps_new_empty ();
diff --git a/sys/winks/ksvideohelpers.h b/sys/winks/ksvideohelpers.h
index f4fb1b6..3aa0c38 100644
--- a/sys/winks/ksvideohelpers.h
+++ b/sys/winks/ksvideohelpers.h
@@ -51,6 +51,22 @@
   GstCaps * translated_caps;
 };
 
+typedef struct DVINFO {
+  DWORD dwDVAAuxSrc;
+  DWORD dwDVAAuxCtl;
+  DWORD dwDVAAuxSrc1;
+  DWORD dwDVAAuxCtl1;
+  DWORD dwDVVAuxSrc;
+  DWORD dwDVVAuxCtl;
+  DWORD dwDVReserved[2];
+} DVINFO;
+
+typedef struct KS_DATARANGE_DVVIDEO {
+  KSDATARANGE DataRange;
+  DVINFO DVVideoInfo;
+} KS_DATARANGE_DVVIDEO,*PKS_DATARANGE_DVVIDEO;
+
+
 GList * ks_video_device_list_sort_cameras_first (GList * devices);
 
 KsVideoMediaType * ks_video_media_type_dup (KsVideoMediaType * media_type);
diff --git a/sys/winscreencap/Makefile.in b/sys/winscreencap/Makefile.in
index f5ba03c..608396c 100644
--- a/sys/winscreencap/Makefile.in
+++ b/sys/winscreencap/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = sys/winscreencap
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -231,6 +241,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -248,8 +259,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -274,8 +287,6 @@
 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@
@@ -288,7 +299,6 @@
 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@
@@ -296,6 +306,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -322,11 +334,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -345,8 +360,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -405,10 +418,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -425,7 +442,6 @@
 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@
@@ -434,7 +450,6 @@
 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@
@@ -447,7 +462,6 @@
 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@
@@ -461,6 +475,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -472,6 +487,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -510,6 +527,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -545,10 +563,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -574,6 +596,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -581,7 +606,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -610,6 +642,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -620,6 +653,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -650,17 +684,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -677,6 +710,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -715,6 +749,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -755,7 +790,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/winscreencap/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu sys/winscreencap/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1080,6 +1114,8 @@
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pluginLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/sys/winscreencap/gstdx9screencapsrc.c b/sys/winscreencap/gstdx9screencapsrc.c
index ade21c7..9a856e0 100644
--- a/sys/winscreencap/gstdx9screencapsrc.c
+++ b/sys/winscreencap/gstdx9screencapsrc.c
@@ -76,15 +76,16 @@
 static void gst_dx9screencapsrc_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
 
-static GstCaps * gst_dx9screencapsrc_fixate (GstBaseSrc * bsrc, GstCaps * caps);
+static GstCaps *gst_dx9screencapsrc_fixate (GstBaseSrc * bsrc, GstCaps * caps);
 static gboolean gst_dx9screencapsrc_set_caps (GstBaseSrc * bsrc,
     GstCaps * caps);
-static GstCaps *gst_dx9screencapsrc_get_caps (GstBaseSrc * bsrc, GstCaps * filter);
+static GstCaps *gst_dx9screencapsrc_get_caps (GstBaseSrc * bsrc,
+    GstCaps * filter);
 static gboolean gst_dx9screencapsrc_start (GstBaseSrc * bsrc);
 static gboolean gst_dx9screencapsrc_stop (GstBaseSrc * bsrc);
 
-static void gst_dx9screencapsrc_get_times (GstBaseSrc * basesrc,
-    GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
+static gboolean gst_dx9screencapsrc_unlock (GstBaseSrc * bsrc);
+
 static GstFlowReturn gst_dx9screencapsrc_create (GstPushSrc * src,
     GstBuffer ** buf);
 
@@ -106,11 +107,11 @@
   go_class->set_property = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_set_property);
   go_class->get_property = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_get_property);
 
-  bs_class->get_times = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_get_times);
   bs_class->get_caps = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_get_caps);
   bs_class->set_caps = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_set_caps);
   bs_class->start = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_start);
   bs_class->stop = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_stop);
+  bs_class->unlock = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_unlock);
   bs_class->fixate = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_fixate);
 
   ps_class->create = GST_DEBUG_FUNCPTR (gst_dx9screencapsrc_create);
@@ -153,7 +154,6 @@
 gst_dx9screencapsrc_init (GstDX9ScreenCapSrc * src)
 {
   /* Set src element inital values... */
-  src->frames = 0;
   src->surface = NULL;
   src->d3d9_device = NULL;
   src->capture_x = 0;
@@ -309,7 +309,7 @@
 {
   GstDX9ScreenCapSrc *src = GST_DX9SCREENCAPSRC (bsrc);
   RECT rect_dst;
-  GstCaps * caps;
+  GstCaps *caps;
 
   if (src->monitor >= IDirect3D9_GetAdapterCount (g_d3d9) ||
       FAILED (IDirect3D9_GetAdapterDisplayMode (g_d3d9, src->monitor,
@@ -352,7 +352,8 @@
       "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, NULL);
 
   if (filter) {
-    GstCaps * tmp = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+    GstCaps *tmp =
+        gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (caps);
     caps = tmp;
   }
@@ -367,6 +368,8 @@
   D3DPRESENT_PARAMETERS d3dpp;
   HRESULT res;
 
+  src->frame_number = -1;
+
   ZeroMemory (&d3dpp, sizeof (D3DPRESENT_PARAMETERS));
   d3dpp.Windowed = TRUE;
   d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
@@ -380,8 +383,6 @@
   d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
   d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
 
-  src->frames = 0;
-
   res = IDirect3D9_CreateDevice (g_d3d9, src->monitor, D3DDEVTYPE_HAL,
       GetDesktopWindow (), D3DCREATE_SOFTWARE_VERTEXPROCESSING,
       &d3dpp, &src->d3d9_device);
@@ -407,21 +408,19 @@
   return TRUE;
 }
 
-static void
-gst_dx9screencapsrc_get_times (GstBaseSrc * basesrc,
-    GstBuffer * buffer, GstClockTime * start, GstClockTime * end)
+static gboolean
+gst_dx9screencapsrc_unlock (GstBaseSrc * bsrc)
 {
-  GstClockTime timestamp;
+  GstDX9ScreenCapSrc *src = GST_DX9SCREENCAPSRC (bsrc);
 
-  timestamp = GST_BUFFER_TIMESTAMP (buffer);
-
-  if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
-    GstClockTime duration = GST_BUFFER_DURATION (buffer);
-
-    if (GST_CLOCK_TIME_IS_VALID (duration))
-      *end = timestamp + duration;
-    *start = timestamp;
+  GST_OBJECT_LOCK (src);
+  if (src->clock_id) {
+    GST_DEBUG_OBJECT (src, "Waking up waiting clock");
+    gst_clock_id_unschedule (src->clock_id);
   }
+  GST_OBJECT_UNLOCK (src);
+
+  return TRUE;
 }
 
 static GstFlowReturn
@@ -432,12 +431,12 @@
   gint new_buf_size, i;
   gint width, height, stride;
   GstClock *clock;
-  GstClockTime time = GST_CLOCK_TIME_NONE;
-  GstClockTime buf_time;
+  GstClockTime buf_time, buf_dur;
   D3DLOCKED_RECT locked_rect;
   LPBYTE p_dst, p_src;
   HRESULT hres;
   GstMapInfo map;
+  guint64 frame_number;
 
   if (G_UNLIKELY (!src->d3d9_device)) {
     GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL),
@@ -447,30 +446,82 @@
 
   clock = gst_element_get_clock (GST_ELEMENT (src));
   if (clock != NULL) {
+    GstClockTime time, base_time;
+
     /* Calculate sync time. */
-    GstClockTime base_time;
-    GstClockTime frame_time =
-        gst_util_uint64_scale_int (src->frames * GST_SECOND,
-        src->rate_denominator, src->rate_numerator);
 
     time = gst_clock_get_time (clock);
     base_time = gst_element_get_base_time (GST_ELEMENT (src));
-    buf_time = MAX (time - base_time, frame_time);
+    buf_time = time - base_time;
+
+    if (src->rate_numerator) {
+      frame_number = gst_util_uint64_scale (buf_time,
+          src->rate_numerator, GST_SECOND * src->rate_denominator);
+    } else {
+      frame_number = -1;
+    }
   } else {
     buf_time = GST_CLOCK_TIME_NONE;
+    frame_number = -1;
   }
 
+  if (frame_number != -1 && frame_number == src->frame_number) {
+    GstClockID id;
+    GstClockReturn ret;
+
+    /* Need to wait for the next frame */
+    frame_number += 1;
+
+    /* Figure out what the next frame time is */
+    buf_time = gst_util_uint64_scale (frame_number,
+        src->rate_denominator * GST_SECOND, src->rate_numerator);
+
+    id = gst_clock_new_single_shot_id (clock,
+        buf_time + gst_element_get_base_time (GST_ELEMENT (src)));
+    GST_OBJECT_LOCK (src);
+    src->clock_id = id;
+    GST_OBJECT_UNLOCK (src);
+
+    GST_DEBUG_OBJECT (src, "Waiting for next frame time %" G_GUINT64_FORMAT,
+        buf_time);
+    ret = gst_clock_id_wait (id, NULL);
+    GST_OBJECT_LOCK (src);
+
+    gst_clock_id_unref (id);
+    src->clock_id = NULL;
+    if (ret == GST_CLOCK_UNSCHEDULED) {
+      /* Got woken up by the unlock function */
+      GST_OBJECT_UNLOCK (src);
+      return GST_FLOW_FLUSHING;
+    }
+    GST_OBJECT_UNLOCK (src);
+
+    /* Duration is a complete 1/fps frame duration */
+    buf_dur =
+        gst_util_uint64_scale_int (GST_SECOND, src->rate_denominator,
+        src->rate_numerator);
+  } else if (frame_number != -1) {
+    GstClockTime next_buf_time;
+
+    GST_DEBUG_OBJECT (src, "No need to wait for next frame time %"
+        G_GUINT64_FORMAT " next frame = %" G_GINT64_FORMAT " prev = %"
+        G_GINT64_FORMAT, buf_time, frame_number, src->frame_number);
+    next_buf_time = gst_util_uint64_scale (frame_number + 1,
+        src->rate_denominator * GST_SECOND, src->rate_numerator);
+    /* Frame duration is from now until the next expected capture time */
+    buf_dur = next_buf_time - buf_time;
+  } else {
+    buf_dur = GST_CLOCK_TIME_NONE;
+  }
+  src->frame_number = frame_number;
+
   height = (src->src_rect.bottom - src->src_rect.top);
   width = (src->src_rect.right - src->src_rect.left);
   new_buf_size = width * 4 * height;
-  if (G_UNLIKELY (src->rate_numerator == 0 && src->frames == 1)) {
-    GST_DEBUG_OBJECT (src, "eos: 0 framerate, frame %d", (gint) src->frames);
-    return GST_FLOW_EOS;
-  }
 
   GST_LOG_OBJECT (src,
-      "creating buffer of %d bytes with %dx%d image for frame %d",
-      new_buf_size, width, height, (gint) src->frames);
+      "creating buffer of %d bytes with %dx%d image",
+      new_buf_size, width, height);
 
   /* Do screen capture and put it into buffer...
    * Aquire front buffer, and lock it
@@ -506,22 +557,7 @@
   IDirect3DSurface9_UnlockRect (src->surface);
 
   GST_BUFFER_TIMESTAMP (new_buf) = buf_time;
-  if (src->rate_numerator) {
-    GST_BUFFER_DURATION (new_buf) =
-        gst_util_uint64_scale_int (GST_SECOND,
-        src->rate_denominator, src->rate_numerator);
-
-    if (clock) {
-      GST_BUFFER_DURATION (new_buf) = MAX (GST_BUFFER_DURATION (new_buf),
-          gst_clock_get_time (clock) - time);
-    }
-  } else {
-    GST_BUFFER_DURATION (new_buf) = GST_CLOCK_TIME_NONE;
-  }
-
-  GST_BUFFER_OFFSET (new_buf) = src->frames;
-  src->frames++;
-  GST_BUFFER_OFFSET_END (new_buf) = src->frames;
+  GST_BUFFER_DURATION (new_buf) = buf_dur;
 
   if (clock != NULL)
     gst_object_unref (clock);
@@ -529,4 +565,3 @@
   *buf = new_buf;
   return GST_FLOW_OK;
 }
-
diff --git a/sys/winscreencap/gstdx9screencapsrc.h b/sys/winscreencap/gstdx9screencapsrc.h
index 915d008..07622a9 100644
--- a/sys/winscreencap/gstdx9screencapsrc.h
+++ b/sys/winscreencap/gstdx9screencapsrc.h
@@ -63,7 +63,8 @@
   /* Runtime variables */
   RECT screen_rect;
   RECT src_rect;
-  gint64 frames;
+  guint64 frame_number;
+  GstClockID clock_id;
 
   D3DDISPLAYMODE disp_mode;
   IDirect3DSurface9 *surface;
diff --git a/sys/winscreencap/gstgdiscreencapsrc.c b/sys/winscreencap/gstgdiscreencapsrc.c
index 6eea0fb..92d9ec2 100644
--- a/sys/winscreencap/gstgdiscreencapsrc.c
+++ b/sys/winscreencap/gstgdiscreencapsrc.c
@@ -76,15 +76,15 @@
 static void gst_gdiscreencapsrc_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
-static GstCaps * gst_gdiscreencapsrc_fixate (GstBaseSrc * bsrc, GstCaps * caps);
+static GstCaps *gst_gdiscreencapsrc_fixate (GstBaseSrc * bsrc, GstCaps * caps);
 static gboolean gst_gdiscreencapsrc_set_caps (GstBaseSrc * bsrc,
     GstCaps * caps);
-static GstCaps *gst_gdiscreencapsrc_get_caps (GstBaseSrc * bsrc, GstCaps * filter);
+static GstCaps *gst_gdiscreencapsrc_get_caps (GstBaseSrc * bsrc,
+    GstCaps * filter);
 static gboolean gst_gdiscreencapsrc_start (GstBaseSrc * bsrc);
 static gboolean gst_gdiscreencapsrc_stop (GstBaseSrc * bsrc);
+static gboolean gst_gdiscreencapsrc_unlock (GstBaseSrc * bsrc);
 
-static void gst_gdiscreencapsrc_get_times (GstBaseSrc * basesrc,
-    GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
 static GstFlowReturn gst_gdiscreencapsrc_create (GstPushSrc * src,
     GstBuffer ** buf);
 
@@ -109,11 +109,11 @@
   go_class->set_property = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_set_property);
   go_class->get_property = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_get_property);
 
-  bs_class->get_times = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_get_times);
   bs_class->get_caps = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_get_caps);
   bs_class->set_caps = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_set_caps);
   bs_class->start = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_start);
   bs_class->stop = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_stop);
+  bs_class->unlock = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_unlock);
   bs_class->fixate = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_fixate);
 
   ps_class->create = GST_DEBUG_FUNCPTR (gst_gdiscreencapsrc_create);
@@ -160,8 +160,6 @@
 gst_gdiscreencapsrc_init (GstGDIScreenCapSrc * src)
 {
   /* Set src element inital values... */
-
-  src->frames = 0;
   src->dibMem = NULL;
   src->hBitmap = (HBITMAP) INVALID_HANDLE_VALUE;
   src->memDC = (HDC) INVALID_HANDLE_VALUE;
@@ -372,9 +370,10 @@
       "height", G_TYPE_INT, rect_dst.bottom - rect_dst.top,
       "framerate", GST_TYPE_FRACTION_RANGE, 1, G_MAXINT, G_MAXINT, 1,
       "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, NULL);
-  
+
   if (filter) {
-    GstCaps * tmp = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+    GstCaps *tmp =
+        gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (caps);
     caps = tmp;
   }
@@ -387,7 +386,7 @@
 {
   GstGDIScreenCapSrc *src = GST_GDISCREENCAPSRC (bsrc);
 
-  src->frames = 0;
+  src->frame_number = -1;
 
   return TRUE;
 }
@@ -397,26 +396,22 @@
 {
   GstGDIScreenCapSrc *src = GST_GDISCREENCAPSRC (bsrc);
 
-  src->frames = 0;
-
   return TRUE;
 }
 
-static void
-gst_gdiscreencapsrc_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
-    GstClockTime * start, GstClockTime * end)
+static gboolean
+gst_gdiscreencapsrc_unlock (GstBaseSrc * bsrc)
 {
-  GstClockTime timestamp;
+  GstGDIScreenCapSrc *src = GST_GDISCREENCAPSRC (bsrc);
 
-  timestamp = GST_BUFFER_TIMESTAMP (buffer);
-
-  if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
-    GstClockTime duration = GST_BUFFER_DURATION (buffer);
-
-    if (GST_CLOCK_TIME_IS_VALID (duration))
-      *end = timestamp + duration;
-    *start = timestamp;
+  GST_OBJECT_LOCK (src);
+  if (src->clock_id) {
+    GST_DEBUG_OBJECT (src, "Waking up waiting clock");
+    gst_clock_id_unschedule (src->clock_id);
   }
+  GST_OBJECT_UNLOCK (src);
+
+  return TRUE;
 }
 
 static GstFlowReturn
@@ -426,64 +421,105 @@
   GstBuffer *new_buf;
   gint new_buf_size;
   GstClock *clock;
-  GstClockTime time = GST_CLOCK_TIME_NONE;
-  GstClockTime base_time;
+  GstClockTime buf_time, buf_dur;
+  guint64 frame_number;
 
   if (G_UNLIKELY (!src->info.bmiHeader.biWidth ||
           !src->info.bmiHeader.biHeight)) {
     GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL),
         ("format wasn't negotiated before create function"));
     return GST_FLOW_NOT_NEGOTIATED;
-  } else if (G_UNLIKELY (src->rate_numerator == 0 && src->frames == 1)) {
-    GST_DEBUG_OBJECT (src, "eos: 0 framerate, frame %d", (gint) src->frames);
-    return GST_FLOW_EOS;
   }
 
   new_buf_size = GST_ROUND_UP_4 (src->info.bmiHeader.biWidth * 3) *
       (-src->info.bmiHeader.biHeight);
 
   GST_LOG_OBJECT (src,
-      "creating buffer of %d bytes with %dx%d image for frame %d",
+      "creating buffer of %d bytes with %dx%d image",
       new_buf_size, (gint) src->info.bmiHeader.biWidth,
-      (gint) (-src->info.bmiHeader.biHeight), (gint) src->frames);
+      (gint) (-src->info.bmiHeader.biHeight));
 
   new_buf = gst_buffer_new_and_alloc (new_buf_size);
+
   clock = gst_element_get_clock (GST_ELEMENT (src));
-  if (clock) {
+  if (clock != NULL) {
+    GstClockTime time, base_time;
+
     /* Calculate sync time. */
-    GstClockTime frame_time =
-        gst_util_uint64_scale_int (src->frames * GST_SECOND,
-        src->rate_denominator, src->rate_numerator);
 
     time = gst_clock_get_time (clock);
     base_time = gst_element_get_base_time (GST_ELEMENT (src));
-    GST_BUFFER_TIMESTAMP (new_buf) = MAX (time - base_time, frame_time);
+    buf_time = time - base_time;
+
+    if (src->rate_numerator) {
+      frame_number = gst_util_uint64_scale (buf_time,
+          src->rate_numerator, GST_SECOND * src->rate_denominator);
+    } else {
+      frame_number = -1;
+    }
   } else {
-    GST_BUFFER_TIMESTAMP (new_buf) = GST_CLOCK_TIME_NONE;
+    buf_time = GST_CLOCK_TIME_NONE;
+    frame_number = -1;
   }
 
+  if (frame_number != -1 && frame_number == src->frame_number) {
+    GstClockID id;
+    GstClockReturn ret;
+
+    /* Need to wait for the next frame */
+    frame_number += 1;
+
+    /* Figure out what the next frame time is */
+    buf_time = gst_util_uint64_scale (frame_number,
+        src->rate_denominator * GST_SECOND, src->rate_numerator);
+
+    id = gst_clock_new_single_shot_id (clock,
+        buf_time + gst_element_get_base_time (GST_ELEMENT (src)));
+    GST_OBJECT_LOCK (src);
+    src->clock_id = id;
+    GST_OBJECT_UNLOCK (src);
+
+    GST_DEBUG_OBJECT (src, "Waiting for next frame time %" G_GUINT64_FORMAT,
+        buf_time);
+    ret = gst_clock_id_wait (id, NULL);
+    GST_OBJECT_LOCK (src);
+
+    gst_clock_id_unref (id);
+    src->clock_id = NULL;
+    if (ret == GST_CLOCK_UNSCHEDULED) {
+      /* Got woken up by the unlock function */
+      GST_OBJECT_UNLOCK (src);
+      return GST_FLOW_FLUSHING;
+    }
+    GST_OBJECT_UNLOCK (src);
+
+    /* Duration is a complete 1/fps frame duration */
+    buf_dur =
+        gst_util_uint64_scale_int (GST_SECOND, src->rate_denominator,
+        src->rate_numerator);
+  } else if (frame_number != -1) {
+    GstClockTime next_buf_time;
+
+    GST_DEBUG_OBJECT (src, "No need to wait for next frame time %"
+        G_GUINT64_FORMAT " next frame = %" G_GINT64_FORMAT " prev = %"
+        G_GINT64_FORMAT, buf_time, frame_number, src->frame_number);
+    next_buf_time = gst_util_uint64_scale (frame_number + 1,
+        src->rate_denominator * GST_SECOND, src->rate_numerator);
+    /* Frame duration is from now until the next expected capture time */
+    buf_dur = next_buf_time - buf_time;
+  } else {
+    buf_dur = GST_CLOCK_TIME_NONE;
+  }
+  src->frame_number = frame_number;
+
+  GST_BUFFER_TIMESTAMP (new_buf) = buf_time;
+  GST_BUFFER_DURATION (new_buf) = buf_dur;
+
   /* Do screen capture and put it into buffer... */
   gst_gdiscreencapsrc_screen_capture (src, new_buf);
 
-  if (src->rate_numerator) {
-    GST_BUFFER_DURATION (new_buf) =
-        gst_util_uint64_scale_int (GST_SECOND,
-        src->rate_denominator, src->rate_numerator);
-    if (clock) {
-      GST_BUFFER_DURATION (new_buf) =
-          MAX (GST_BUFFER_DURATION (new_buf),
-          gst_clock_get_time (clock) - time);
-    }
-  } else {
-    /* NONE means forever */
-    GST_BUFFER_DURATION (new_buf) = GST_CLOCK_TIME_NONE;
-  }
   gst_object_unref (clock);
 
-  GST_BUFFER_OFFSET (new_buf) = src->frames;
-  src->frames++;
-  GST_BUFFER_OFFSET_END (new_buf) = src->frames;
-
   *buf = new_buf;
   return GST_FLOW_OK;
 }
diff --git a/sys/winscreencap/gstgdiscreencapsrc.h b/sys/winscreencap/gstgdiscreencapsrc.h
index 492785b..085e532 100644
--- a/sys/winscreencap/gstgdiscreencapsrc.h
+++ b/sys/winscreencap/gstgdiscreencapsrc.h
@@ -62,7 +62,9 @@
   /* Runtime variables */
   RECT screen_rect;
   RECT src_rect;
-  gint64 frames;
+  guint64 frame_number;
+  GstClockID clock_id;
+
   BITMAPINFO info;
   BYTE *dibMem;
   HBITMAP hBitmap;
diff --git a/test-driver b/test-driver
index d306056..8e575b0 100755
--- a/test-driver
+++ b/test-driver
@@ -3,7 +3,7 @@
 
 scriptversion=2013-07-13.22; # UTC
 
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -106,11 +106,14 @@
 # Test script is run here.
 "$@" >$log_file 2>&1
 estatus=$?
+
 if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
 fi
 
-case $estatus:$expect_failure in
+case $tweaked_estatus:$expect_failure in
   0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
   0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
   77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
@@ -119,6 +122,12 @@
   *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
 esac
 
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c3e2b3f..1cb9648 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -175,6 +185,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -217,8 +228,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -243,8 +256,6 @@
 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@
@@ -257,7 +268,6 @@
 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@
@@ -265,6 +275,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -291,11 +303,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -314,8 +329,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -374,10 +387,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -394,7 +411,6 @@
 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@
@@ -403,7 +419,6 @@
 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@
@@ -416,7 +431,6 @@
 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@
@@ -430,6 +444,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -441,6 +456,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -479,6 +496,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -514,10 +532,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -543,6 +565,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -550,7 +575,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -579,6 +611,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -589,6 +622,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -619,17 +653,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -646,6 +679,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -684,6 +718,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -718,7 +753,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1013,6 +1047,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 90677f7..1e5c23a 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -9,14 +9,14 @@
 	GST_REGISTRY_1_0=$(CHECK_REGISTRY)
 
 # GST_PLUGINS_XYZ_DIR is only set in an uninstalled setup
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	$(REGISTRY_ENVIRONMENT)                                 \
 	GST_PLUGIN_SYSTEM_PATH_1_0=				\
 	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_LIBAV_DIR):$(GST_PLUGINS_UGLY_DIR):$(GST_PLUGINS_GOOD_DIR):$(GST_PLUGINS_BASE_DIR):$(GST_PLUGINS_DIR) \
 	GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good:gst-plugins-ugly:gst-libav:gst-plugins-bad@$(top_builddir)" \
 	GST_STATE_IGNORE_ELEMENTS="apexsink avdtpsrc camerabin dc1394src \
 	    dccpclientsrc dccpclientsink dccpserversrc dccpserversink decklinksrc \
-	    decklinksink dvbsrc dvbbasebin dfbvideosink festival fluidsynth gsettingsvideosrc \
+	    decklinksink dtlssrtpdec dtlssrtpenc dvbsrc dvbbasebin dfbvideosink festival fluidsynth gsettingsvideosrc \
 	    gsettingsvideosink gsettingsaudiosrc gsettingsaudiosink linsyssdisrc linsyssdisink nassink \
 	    rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \
 	    vdpaumpegdec vdpaumpeg4dec vdpauh264dec vdpauvideopostprocess vdpausink neonhttpsrc"
@@ -40,6 +40,12 @@
 check_assrender =
 endif
 
+if USE_DASH
+check_dash = elements/dash_mpd
+else
+check_dash =
+endif
+
 if USE_FAAC
 check_faac = elements/faac
 else
@@ -106,6 +112,12 @@
 check_schro=
 endif
 
+if USE_X265
+check_x265enc=elements/x265enc
+else
+check_x265enc=
+endif
+
 if USE_TIMIDITY
 check_timidity=elements/timidity
 else
@@ -136,6 +148,12 @@
 check_zbar =
 endif
 
+if USE_OPENCV
+check_opencv = elements/templatematch
+else
+check_opencv =
+endif
+
 if USE_OPUS
 check_opus = elements/opus
 else
@@ -148,6 +166,12 @@
 check_curl_sftp =
 endif
 
+if USE_HLS
+check_hlsdemux = elements/hlsdemux_m3u8
+else
+check_hlsdemux =
+endif
+
 if USE_CURL
 check_curl = elements/curlhttpsink \
 	elements/curlfilesink \
@@ -179,7 +203,9 @@
 if USE_GL
 check_gl=libs/gstglcontext \
     libs/gstglmemory \
-    libs/gstglupload
+    libs/gstglupload \
+    libs/gstglcolorconvert \
+    elements/glimagesink
 else
 check_gl=
 endif
@@ -187,8 +213,7 @@
 VALGRIND_TO_FIX = \
 	elements/mpeg2enc \
 	elements/mplex    \
-	elements/zbar     \
-	pipeline/colorspace
+	elements/zbar
 
 # valgrind testing
 VALGRIND_TESTS_DISABLE = \
@@ -196,15 +221,14 @@
 
 # these tests don't even pass
 # neon: too flaky (almost always fails 'the first time')
-# colorspace: bad memory accesses in orc code for odd width buffers - https://bugzilla.gnome.org/show_bug.cgi?id=663248
 noinst_PROGRAMS = \
-	pipelines/colorspace \
 	pipelines/streamheader \
 	$(check_neon)
 
 check_PROGRAMS = \
 	generic/states \
 	$(check_assrender) \
+	$(check_dash) \
 	$(check_faac)  \
 	$(check_faad)  \
 	$(check_voaacenc) \
@@ -214,12 +238,14 @@
 	$(check_ofa)        \
 	$(check_timidity)  \
 	$(check_kate)  \
+	$(check_opencv) \
 	$(check_opus)  \
 	$(check_curl) \
 	$(check_shm) \
 	elements/aiffparse \
 	elements/autoconvert \
 	elements/autovideoconvert \
+	elements/audiointerleave \
 	elements/audiomixer \
 	elements/asfmux \
 	elements/baseaudiovisualizer \
@@ -227,7 +253,7 @@
 	elements/dataurisrc \
 	elements/gdppay \
 	elements/gdpdepay \
- 	elements/compositor \
+	elements/compositor \
 	$(check_jifmux) \
 	elements/jpegparse \
 	elements/h263parse \
@@ -238,6 +264,8 @@
 	$(check_mpg123) \
 	elements/mxfdemux \
 	elements/mxfmux \
+	elements/pcapparse \
+	elements/rtponvif \
 	elements/id3mux \
 	pipelines/mxf \
 	$(check_mimic) \
@@ -249,11 +277,13 @@
 	$(check_uvch264) \
 	libs/vc1parser \
 	$(check_schro) \
+	$(check_x265enc) \
 	elements/viewfinderbin \
 	$(check_zbar) \
 	$(check_orc) \
 	libs/insertbin \
 	$(check_gl) \
+	$(check_hlsdemux) \
 	$(EXPERIMENTAL_CHECKS)
 
 noinst_HEADERS = elements/mxfdemux.h
@@ -261,12 +291,19 @@
 TESTS = $(check_PROGRAMS)
 
 AM_CFLAGS = $(GST_CFLAGS) $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) \
-		-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
-		-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
+	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 LDADD = $(GST_CHECK_LIBS)
 
-elements_audiomixer_LDADD = $(GST_BASE_LIBS) -lgstbase-@GST_API_VERSION@ $(LDADD)
-elements_audiomixer_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+generic_states_CFLAGS = $(AM_CFLAGS) $(GMODULE_NO_EXPORT_CFLAGS)
+generic_states_LDADD = $(LDADD) $(GMODULE_NO_EXPORT_LIBS)
+
+elements_audiomixer_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) -lgstbase-@GST_API_VERSION@ $(LDADD)
+elements_audiomixer_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(AM_CFLAGS)
+
+elements_audiointerleave_LDADD = $(GST_BASE_LIBS) -lgstbase-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ $(LDADD)
+elements_audiointerleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
 
 # parser unit test convenience lib
 noinst_LTLIBRARIES = libparser.la
@@ -283,6 +320,8 @@
 
 elements_h264parse_LDADD = libparser.la $(LDADD)
 
+elements_pcapparse_LDADD = libparser.la $(LDADD)
+
 libs_mpegvideoparser_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
 	-DGST_USE_UNSTABLE_API \
@@ -402,6 +441,10 @@
 elements_uvch264demux_CFLAGS = -DUVCH264DEMUX_DATADIR="$(srcdir)/elements/uvch264demux_data" \
 				$(AM_CFLAGS)
 
+elements_dash_mpd_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS)
+elements_dash_mpd_LDADD = $(LDADD) $(LIBXML2_LIBS)
+elements_dash_mpd_SOURCES = elements/dash_mpd.c
+
 pipelines_streamheader_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
 pipelines_streamheader_LDADD = $(GIO_LIBS) $(LDADD)
 
@@ -411,11 +454,14 @@
 libs_insertbin_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
 
+elements_rtponvif_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_rtponvif_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION) $(LDADD)
 
 EXTRA_DIST = gst-plugins-bad.supp $(uvch264_dist_data)
 
 orc_bayer_CFLAGS = $(ORC_CFLAGS)
 orc_bayer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_bayer_SOURCES = orc/bayer.c
 
 orc/bayer.c: $(top_srcdir)/gst/bayer/gstbayerorc.orc
 	$(MKDIR_P) orc
@@ -423,6 +469,7 @@
 
 orc_audiomixer_CFLAGS = $(ORC_CFLAGS)
 orc_audiomixer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_audiomixer_SOURCES = orc/audiomixer.c
 
 orc/audiomixer.c: $(top_srcdir)/gst/audiomixer/gstaudiomixerorc.orc
 	$(MKDIR_P) orc
@@ -457,6 +504,26 @@
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
 
+libs_gstglcolorconvert_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+libs_gstglcolorconvert_LDADD = \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
+
+elements_glimagesink_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+elements_glimagesink_LDADD = \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(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) \
@@ -467,8 +534,16 @@
 	-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)
+elements_compositor_LDADD = \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(LDADD)
+elements_compositor_CFLAGS = \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_hlsdemux_m3u8_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) -I$(top_srcdir)/ext/hls
+elements_hlsdemux_m3u8_LDADD = $(GST_BASE_LIBS) $(LDADD)
+elements_hlsdemux_m3u8_SOURCES = elements/hlsdemux_m3u8.c
 
 orc_compositor_CFLAGS = $(ORC_CFLAGS)
 orc_compositor_LDADD = $(ORC_LIBS) -lorc-test-0.4
diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in
index 9b01a10..dd0bae1 100644
--- a/tests/check/Makefile.in
+++ b/tests/check/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,35 +91,34 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/check.mak $(srcdir)/Makefile.in \
-	$(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS) \
-	$(top_srcdir)/test-driver
-noinst_PROGRAMS = pipelines/colorspace$(EXEEXT) \
-	pipelines/streamheader$(EXEEXT) $(am__EXEEXT_23)
+noinst_PROGRAMS = pipelines/streamheader$(EXEEXT) $(am__EXEEXT_27)
 check_PROGRAMS = generic/states$(EXEEXT) $(am__EXEEXT_1) \
 	$(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \
 	$(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \
 	$(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \
-	$(am__EXEEXT_11) $(am__EXEEXT_13) $(am__EXEEXT_14) \
-	elements/aiffparse$(EXEEXT) elements/autoconvert$(EXEEXT) \
+	$(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) \
+	$(am__EXEEXT_15) $(am__EXEEXT_16) elements/aiffparse$(EXEEXT) \
+	elements/autoconvert$(EXEEXT) \
 	elements/autovideoconvert$(EXEEXT) \
-	elements/audiomixer$(EXEEXT) elements/asfmux$(EXEEXT) \
-	elements/baseaudiovisualizer$(EXEEXT) \
+	elements/audiointerleave$(EXEEXT) elements/audiomixer$(EXEEXT) \
+	elements/asfmux$(EXEEXT) elements/baseaudiovisualizer$(EXEEXT) \
 	elements/camerabin$(EXEEXT) elements/dataurisrc$(EXEEXT) \
 	elements/gdppay$(EXEEXT) elements/gdpdepay$(EXEEXT) \
-	elements/compositor$(EXEEXT) $(am__EXEEXT_15) \
+	elements/compositor$(EXEEXT) $(am__EXEEXT_17) \
 	elements/jpegparse$(EXEEXT) elements/h263parse$(EXEEXT) \
 	elements/h264parse$(EXEEXT) elements/mpegtsmux$(EXEEXT) \
 	elements/mpegvideoparse$(EXEEXT) \
-	elements/mpeg4videoparse$(EXEEXT) $(am__EXEEXT_16) \
+	elements/mpeg4videoparse$(EXEEXT) $(am__EXEEXT_18) \
 	elements/mxfdemux$(EXEEXT) elements/mxfmux$(EXEEXT) \
+	elements/pcapparse$(EXEEXT) elements/rtponvif$(EXEEXT) \
 	elements/id3mux$(EXEEXT) pipelines/mxf$(EXEEXT) \
-	$(am__EXEEXT_17) libs/mpegvideoparser$(EXEEXT) \
+	$(am__EXEEXT_19) libs/mpegvideoparser$(EXEEXT) \
 	libs/mpegts$(EXEEXT) libs/h264parser$(EXEEXT) \
 	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)
+	$(am__EXEEXT_20) libs/vc1parser$(EXEEXT) $(am__EXEEXT_21) \
+	$(am__EXEEXT_22) elements/viewfinderbin$(EXEEXT) \
+	$(am__EXEEXT_23) $(am__EXEEXT_24) libs/insertbin$(EXEEXT) \
+	$(am__EXEEXT_25) $(am__EXEEXT_26)
 subdir = tests/check
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -118,6 +127,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -131,7 +141,6 @@
 	$(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 \
@@ -148,6 +157,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -165,34 +176,40 @@
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libparser_la_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 @USE_ASSRENDER_TRUE@am__EXEEXT_1 = elements/assrender$(EXEEXT)
-@USE_FAAC_TRUE@am__EXEEXT_2 = elements/faac$(EXEEXT)
-@USE_FAAD_TRUE@am__EXEEXT_3 = elements/faad$(EXEEXT)
-@USE_VOAACENC_TRUE@am__EXEEXT_4 = elements/voaacenc$(EXEEXT)
-@USE_VOAMRWBENC_TRUE@am__EXEEXT_5 = elements/voamrwbenc$(EXEEXT)
-@USE_MPEG2ENC_TRUE@am__EXEEXT_6 = elements/mpeg2enc$(EXEEXT)
-@USE_MPLEX_TRUE@am__EXEEXT_7 = elements/mplex$(EXEEXT)
-@USE_OFA_TRUE@am__EXEEXT_8 = elements/ofa$(EXEEXT)
-@USE_TIMIDITY_TRUE@am__EXEEXT_9 = elements/timidity$(EXEEXT)
-@USE_KATE_TRUE@am__EXEEXT_10 = elements/kate$(EXEEXT)
-@USE_OPUS_TRUE@am__EXEEXT_11 = elements/opus$(EXEEXT)
-@USE_SSH2_TRUE@am__EXEEXT_12 = elements/curlsftpsink$(EXEEXT)
-@USE_CURL_TRUE@am__EXEEXT_13 = elements/curlhttpsink$(EXEEXT) \
+@USE_DASH_TRUE@am__EXEEXT_2 = elements/dash_mpd$(EXEEXT)
+@USE_FAAC_TRUE@am__EXEEXT_3 = elements/faac$(EXEEXT)
+@USE_FAAD_TRUE@am__EXEEXT_4 = elements/faad$(EXEEXT)
+@USE_VOAACENC_TRUE@am__EXEEXT_5 = elements/voaacenc$(EXEEXT)
+@USE_VOAMRWBENC_TRUE@am__EXEEXT_6 = elements/voamrwbenc$(EXEEXT)
+@USE_MPEG2ENC_TRUE@am__EXEEXT_7 = elements/mpeg2enc$(EXEEXT)
+@USE_MPLEX_TRUE@am__EXEEXT_8 = elements/mplex$(EXEEXT)
+@USE_OFA_TRUE@am__EXEEXT_9 = elements/ofa$(EXEEXT)
+@USE_TIMIDITY_TRUE@am__EXEEXT_10 = elements/timidity$(EXEEXT)
+@USE_KATE_TRUE@am__EXEEXT_11 = elements/kate$(EXEEXT)
+@USE_OPENCV_TRUE@am__EXEEXT_12 = elements/templatematch$(EXEEXT)
+@USE_OPUS_TRUE@am__EXEEXT_13 = elements/opus$(EXEEXT)
+@USE_SSH2_TRUE@am__EXEEXT_14 = elements/curlsftpsink$(EXEEXT)
+@USE_CURL_TRUE@am__EXEEXT_15 = elements/curlhttpsink$(EXEEXT) \
 @USE_CURL_TRUE@	elements/curlfilesink$(EXEEXT) \
-@USE_CURL_TRUE@	elements/curlftpsink$(EXEEXT) $(am__EXEEXT_12) \
+@USE_CURL_TRUE@	elements/curlftpsink$(EXEEXT) $(am__EXEEXT_14) \
 @USE_CURL_TRUE@	elements/curlsmtpsink$(EXEEXT)
-@USE_SHM_TRUE@am__EXEEXT_14 = elements/shm$(EXEEXT)
-@USE_EXIF_TRUE@am__EXEEXT_15 = elements/jifmux$(EXEEXT)
-@USE_MPG123_TRUE@am__EXEEXT_16 = elements/mpg123audiodec$(EXEEXT)
-@USE_MIMIC_TRUE@am__EXEEXT_17 = pipelines/mimic$(EXEEXT)
-@USE_UVCH264_TRUE@am__EXEEXT_18 = elements/uvch264demux$(EXEEXT)
-@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) \
+@USE_SHM_TRUE@am__EXEEXT_16 = elements/shm$(EXEEXT)
+@USE_EXIF_TRUE@am__EXEEXT_17 = elements/jifmux$(EXEEXT)
+@USE_MPG123_TRUE@am__EXEEXT_18 = elements/mpg123audiodec$(EXEEXT)
+@USE_MIMIC_TRUE@am__EXEEXT_19 = pipelines/mimic$(EXEEXT)
+@USE_UVCH264_TRUE@am__EXEEXT_20 = elements/uvch264demux$(EXEEXT)
+@USE_SCHRO_TRUE@am__EXEEXT_21 = elements/schroenc$(EXEEXT)
+@USE_X265_TRUE@am__EXEEXT_22 = elements/x265enc$(EXEEXT)
+@USE_ZBAR_TRUE@am__EXEEXT_23 = elements/zbar$(EXEEXT)
+@HAVE_ORC_TRUE@am__EXEEXT_24 = orc/bayer$(EXEEXT) \
 @HAVE_ORC_TRUE@	orc/audiomixer$(EXEEXT) orc/compositor$(EXEEXT)
-@USE_GL_TRUE@am__EXEEXT_22 = libs/gstglcontext$(EXEEXT) \
+@USE_GL_TRUE@am__EXEEXT_25 = libs/gstglcontext$(EXEEXT) \
 @USE_GL_TRUE@	libs/gstglmemory$(EXEEXT) \
-@USE_GL_TRUE@	libs/gstglupload$(EXEEXT)
-@USE_NEON_TRUE@am__EXEEXT_23 = elements/neonhttpsrc$(EXEEXT)
+@USE_GL_TRUE@	libs/gstglupload$(EXEEXT) \
+@USE_GL_TRUE@	libs/gstglcolorconvert$(EXEEXT) \
+@USE_GL_TRUE@	elements/glimagesink$(EXEEXT)
+@USE_HLS_TRUE@am__EXEEXT_26 = elements/hlsdemux_m3u8$(EXEEXT)
+@USE_NEON_TRUE@am__EXEEXT_27 = elements/neonhttpsrc$(EXEEXT)
 PROGRAMS = $(noinst_PROGRAMS)
 elements_aiffparse_SOURCES = elements/aiffparse.c
 elements_aiffparse_OBJECTS = elements/aiffparse.$(OBJEXT)
@@ -213,11 +230,20 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(elements_assrender_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
+elements_audiointerleave_SOURCES = elements/audiointerleave.c
+elements_audiointerleave_OBJECTS =  \
+	elements/elements_audiointerleave-audiointerleave.$(OBJEXT)
+elements_audiointerleave_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+elements_audiointerleave_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_audiointerleave_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 elements_audiomixer_SOURCES = elements/audiomixer.c
 elements_audiomixer_OBJECTS =  \
 	elements/elements_audiomixer-audiomixer.$(OBJEXT)
 elements_audiomixer_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_2)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 elements_audiomixer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(elements_audiomixer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -255,8 +281,8 @@
 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_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 elements_compositor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(elements_compositor_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -281,6 +307,15 @@
 elements_curlsmtpsink_OBJECTS = elements/curlsmtpsink.$(OBJEXT)
 elements_curlsmtpsink_LDADD = $(LDADD)
 elements_curlsmtpsink_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_elements_dash_mpd_OBJECTS =  \
+	elements/elements_dash_mpd-dash_mpd.$(OBJEXT)
+elements_dash_mpd_OBJECTS = $(am_elements_dash_mpd_OBJECTS)
+elements_dash_mpd_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1)
+elements_dash_mpd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_dash_mpd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 elements_dataurisrc_SOURCES = elements/dataurisrc.c
 elements_dataurisrc_OBJECTS = elements/dataurisrc.$(OBJEXT)
 elements_dataurisrc_LDADD = $(LDADD)
@@ -318,12 +353,32 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(elements_gdppay_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
+elements_glimagesink_SOURCES = elements/glimagesink.c
+elements_glimagesink_OBJECTS =  \
+	elements/elements_glimagesink-glimagesink.$(OBJEXT)
+elements_glimagesink_DEPENDENCIES =  \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+elements_glimagesink_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_glimagesink_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 elements_h263parse_SOURCES = elements/h263parse.c
 elements_h263parse_OBJECTS = elements/h263parse.$(OBJEXT)
 elements_h263parse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
 elements_h264parse_SOURCES = elements/h264parse.c
 elements_h264parse_OBJECTS = elements/h264parse.$(OBJEXT)
 elements_h264parse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+am_elements_hlsdemux_m3u8_OBJECTS =  \
+	elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.$(OBJEXT)
+elements_hlsdemux_m3u8_OBJECTS = $(am_elements_hlsdemux_m3u8_OBJECTS)
+elements_hlsdemux_m3u8_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+elements_hlsdemux_m3u8_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_hlsdemux_m3u8_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 elements_id3mux_SOURCES = elements/id3mux.c
 elements_id3mux_OBJECTS = elements/id3mux.$(OBJEXT)
 elements_id3mux_LDADD = $(LDADD)
@@ -404,6 +459,19 @@
 elements_opus_OBJECTS = elements/opus.$(OBJEXT)
 elements_opus_LDADD = $(LDADD)
 elements_opus_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_pcapparse_SOURCES = elements/pcapparse.c
+elements_pcapparse_OBJECTS = elements/pcapparse.$(OBJEXT)
+elements_pcapparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+elements_rtponvif_SOURCES = elements/rtponvif.c
+elements_rtponvif_OBJECTS =  \
+	elements/elements_rtponvif-rtponvif.$(OBJEXT)
+elements_rtponvif_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+elements_rtponvif_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_rtponvif_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 elements_schroenc_SOURCES = elements/schroenc.c
 elements_schroenc_OBJECTS = elements/schroenc.$(OBJEXT)
 elements_schroenc_LDADD = $(LDADD)
@@ -412,6 +480,10 @@
 elements_shm_OBJECTS = elements/shm.$(OBJEXT)
 elements_shm_LDADD = $(LDADD)
 elements_shm_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_templatematch_SOURCES = elements/templatematch.c
+elements_templatematch_OBJECTS = elements/templatematch.$(OBJEXT)
+elements_templatematch_LDADD = $(LDADD)
+elements_templatematch_DEPENDENCIES = $(am__DEPENDENCIES_1)
 elements_timidity_SOURCES = elements/timidity.c
 elements_timidity_OBJECTS =  \
 	elements/elements_timidity-timidity.$(OBJEXT)
@@ -448,14 +520,22 @@
 elements_voamrwbenc_OBJECTS = elements/voamrwbenc.$(OBJEXT)
 elements_voamrwbenc_LDADD = $(LDADD)
 elements_voamrwbenc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_x265enc_SOURCES = elements/x265enc.c
+elements_x265enc_OBJECTS = elements/x265enc.$(OBJEXT)
+elements_x265enc_LDADD = $(LDADD)
+elements_x265enc_DEPENDENCIES = $(am__DEPENDENCIES_1)
 elements_zbar_SOURCES = elements/zbar.c
 elements_zbar_OBJECTS = elements/zbar.$(OBJEXT)
 elements_zbar_LDADD = $(LDADD)
 elements_zbar_DEPENDENCIES = $(am__DEPENDENCIES_1)
 generic_states_SOURCES = generic/states.c
-generic_states_OBJECTS = generic/states.$(OBJEXT)
-generic_states_LDADD = $(LDADD)
-generic_states_DEPENDENCIES = $(am__DEPENDENCIES_1)
+generic_states_OBJECTS = generic/generic_states-states.$(OBJEXT)
+generic_states_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1)
+generic_states_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(generic_states_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
 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 \
@@ -465,6 +545,17 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(libs_aggregator_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
+libs_gstglcolorconvert_SOURCES = libs/gstglcolorconvert.c
+libs_gstglcolorconvert_OBJECTS =  \
+	libs/libs_gstglcolorconvert-gstglcolorconvert.$(OBJEXT)
+libs_gstglcolorconvert_DEPENDENCIES =  \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+libs_gstglcolorconvert_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libs_gstglcolorconvert_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 libs_gstglcontext_SOURCES = libs/gstglcontext.c
 libs_gstglcontext_OBJECTS =  \
 	libs/libs_gstglcontext-gstglcontext.$(OBJEXT)
@@ -552,15 +643,16 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(libs_vp8parser_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
 	$@
-orc_audiomixer_SOURCES = orc/audiomixer.c
-orc_audiomixer_OBJECTS = orc/orc_audiomixer-audiomixer.$(OBJEXT)
+nodist_orc_audiomixer_OBJECTS =  \
+	orc/orc_audiomixer-audiomixer.$(OBJEXT)
+orc_audiomixer_OBJECTS = $(nodist_orc_audiomixer_OBJECTS)
 orc_audiomixer_DEPENDENCIES = $(am__DEPENDENCIES_1)
 orc_audiomixer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(orc_audiomixer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
 	$@
-orc_bayer_SOURCES = orc/bayer.c
-orc_bayer_OBJECTS = orc/orc_bayer-bayer.$(OBJEXT)
+nodist_orc_bayer_OBJECTS = orc/orc_bayer-bayer.$(OBJEXT)
+orc_bayer_OBJECTS = $(nodist_orc_bayer_OBJECTS)
 orc_bayer_DEPENDENCIES = $(am__DEPENDENCIES_1)
 orc_bayer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(orc_bayer_CFLAGS) \
@@ -573,10 +665,6 @@
 	$(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)
-pipelines_colorspace_DEPENDENCIES = $(am__DEPENDENCIES_1)
 pipelines_mimic_SOURCES = pipelines/mimic.c
 pipelines_mimic_OBJECTS = pipelines/mimic.$(OBJEXT)
 pipelines_mimic_LDADD = $(LDADD)
@@ -629,55 +717,63 @@
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libparser_la_SOURCES) elements/aiffparse.c \
-	elements/asfmux.c elements/assrender.c elements/audiomixer.c \
+	elements/asfmux.c elements/assrender.c \
+	elements/audiointerleave.c elements/audiomixer.c \
 	elements/autoconvert.c elements/autovideoconvert.c \
 	$(elements_baseaudiovisualizer_SOURCES) \
 	$(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/curlsmtpsink.c $(elements_dash_mpd_SOURCES) \
+	elements/dataurisrc.c elements/faac.c elements/faad.c \
+	elements/gdpdepay.c elements/gdppay.c elements/glimagesink.c \
+	elements/h263parse.c elements/h264parse.c \
+	$(elements_hlsdemux_m3u8_SOURCES) elements/id3mux.c \
 	$(elements_jifmux_SOURCES) elements/jpegparse.c \
 	elements/kate.c elements/mpeg2enc.c elements/mpeg4videoparse.c \
 	elements/mpegtsmux.c elements/mpegvideoparse.c \
 	elements/mpg123audiodec.c elements/mplex.c elements/mxfdemux.c \
 	elements/mxfmux.c elements/neonhttpsrc.c elements/ofa.c \
-	elements/opus.c elements/schroenc.c elements/shm.c \
+	elements/opus.c elements/pcapparse.c elements/rtponvif.c \
+	elements/schroenc.c elements/shm.c elements/templatematch.c \
 	elements/timidity.c elements/uvch264demux.c \
 	elements/viewfinderbin.c elements/voaacenc.c \
-	elements/voamrwbenc.c elements/zbar.c generic/states.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
+	elements/voamrwbenc.c elements/x265enc.c elements/zbar.c \
+	generic/states.c libs/aggregator.c libs/gstglcolorconvert.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 \
+	$(nodist_orc_audiomixer_SOURCES) $(nodist_orc_bayer_SOURCES) \
+	$(nodist_orc_compositor_SOURCES) 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/asfmux.c elements/assrender.c \
+	elements/audiointerleave.c elements/audiomixer.c \
 	elements/autoconvert.c elements/autovideoconvert.c \
 	$(elements_baseaudiovisualizer_SOURCES) \
 	$(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/curlsmtpsink.c $(elements_dash_mpd_SOURCES) \
+	elements/dataurisrc.c elements/faac.c elements/faad.c \
+	elements/gdpdepay.c elements/gdppay.c elements/glimagesink.c \
+	elements/h263parse.c elements/h264parse.c \
+	$(elements_hlsdemux_m3u8_SOURCES) elements/id3mux.c \
 	$(elements_jifmux_SOURCES) elements/jpegparse.c \
 	elements/kate.c elements/mpeg2enc.c elements/mpeg4videoparse.c \
 	elements/mpegtsmux.c elements/mpegvideoparse.c \
 	elements/mpg123audiodec.c elements/mplex.c elements/mxfdemux.c \
 	elements/mxfmux.c elements/neonhttpsrc.c elements/ofa.c \
-	elements/opus.c elements/schroenc.c elements/shm.c \
+	elements/opus.c elements/pcapparse.c elements/rtponvif.c \
+	elements/schroenc.c elements/shm.c elements/templatematch.c \
 	elements/timidity.c elements/uvch264demux.c \
 	elements/viewfinderbin.c elements/voaacenc.c \
-	elements/voamrwbenc.c elements/zbar.c generic/states.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
+	elements/voamrwbenc.c elements/x265enc.c elements/zbar.c \
+	generic/states.c libs/aggregator.c libs/gstglcolorconvert.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 \
+	pipelines/mimic.c pipelines/mxf.c pipelines/streamheader.c
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -907,6 +1003,8 @@
 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
 	$(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common/check.mak \
+	$(top_srcdir)/depcomp $(top_srcdir)/test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -924,8 +1022,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -950,8 +1050,6 @@
 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@
@@ -964,7 +1062,6 @@
 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@
@@ -972,6 +1069,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -998,11 +1097,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -1021,8 +1123,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -1081,10 +1181,14 @@
 GST_PREFIX = @GST_PREFIX@
 GST_REVISION = @GST_REVISION@
 GST_TOOLS_DIR = $(top_builddir)/tools
-GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@
-GST_VIDEO_LIBS = @GST_VIDEO_LIBS@
 GTK3_CFLAGS = @GTK3_CFLAGS@
+GTK3_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -1101,7 +1205,6 @@
 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@
@@ -1110,7 +1213,6 @@
 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@
@@ -1123,7 +1225,6 @@
 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@
@@ -1137,6 +1238,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -1148,6 +1250,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -1186,6 +1290,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -1221,10 +1326,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -1250,6 +1359,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -1257,7 +1369,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -1286,6 +1405,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -1296,6 +1416,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -1326,17 +1447,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -1353,6 +1473,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -1391,6 +1512,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -1414,14 +1536,14 @@
 
 
 # GST_PLUGINS_XYZ_DIR is only set in an uninstalled setup
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	$(REGISTRY_ENVIRONMENT)                                 \
 	GST_PLUGIN_SYSTEM_PATH_1_0=				\
 	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_LIBAV_DIR):$(GST_PLUGINS_UGLY_DIR):$(GST_PLUGINS_GOOD_DIR):$(GST_PLUGINS_BASE_DIR):$(GST_PLUGINS_DIR) \
 	GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good:gst-plugins-ugly:gst-libav:gst-plugins-bad@$(top_builddir)" \
 	GST_STATE_IGNORE_ELEMENTS="apexsink avdtpsrc camerabin dc1394src \
 	    dccpclientsrc dccpclientsink dccpserversrc dccpserversink decklinksrc \
-	    decklinksink dvbsrc dvbbasebin dfbvideosink festival fluidsynth gsettingsvideosrc \
+	    decklinksink dtlssrtpdec dtlssrtpenc dvbsrc dvbbasebin dfbvideosink festival fluidsynth gsettingsvideosrc \
 	    gsettingsvideosink gsettingsaudiosrc gsettingsaudiosink linsyssdisrc linsyssdisink nassink \
 	    rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \
 	    vdpaumpegdec vdpaumpeg4dec vdpauh264dec vdpauvideopostprocess vdpausink neonhttpsrc"
@@ -1432,6 +1554,8 @@
 SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-bad.supp
 @USE_ASSRENDER_FALSE@check_assrender = 
 @USE_ASSRENDER_TRUE@check_assrender = elements/assrender
+@USE_DASH_FALSE@check_dash = 
+@USE_DASH_TRUE@check_dash = elements/dash_mpd
 @USE_FAAC_FALSE@check_faac = 
 @USE_FAAC_TRUE@check_faac = elements/faac
 @USE_FAAD_FALSE@check_faad = 
@@ -1454,6 +1578,8 @@
 @USE_OFA_TRUE@check_ofa = elements/ofa
 @USE_SCHRO_FALSE@check_schro = 
 @USE_SCHRO_TRUE@check_schro = elements/schroenc
+@USE_X265_FALSE@check_x265enc = 
+@USE_X265_TRUE@check_x265enc = elements/x265enc
 @USE_TIMIDITY_FALSE@check_timidity = 
 @USE_TIMIDITY_TRUE@check_timidity = elements/timidity
 @USE_KATE_FALSE@check_kate = 
@@ -1464,10 +1590,14 @@
 @HAVE_ORC_TRUE@check_orc = orc/bayer orc/audiomixer orc/compositor
 @USE_ZBAR_FALSE@check_zbar = 
 @USE_ZBAR_TRUE@check_zbar = elements/zbar
+@USE_OPENCV_FALSE@check_opencv = 
+@USE_OPENCV_TRUE@check_opencv = elements/templatematch
 @USE_OPUS_FALSE@check_opus = 
 @USE_OPUS_TRUE@check_opus = elements/opus
 @USE_SSH2_FALSE@check_curl_sftp = 
 @USE_SSH2_TRUE@check_curl_sftp = elements/curlsftpsink
+@USE_HLS_FALSE@check_hlsdemux = 
+@USE_HLS_TRUE@check_hlsdemux = elements/hlsdemux_m3u8
 @USE_CURL_FALSE@check_curl = 
 @USE_CURL_TRUE@check_curl = elements/curlhttpsink \
 @USE_CURL_TRUE@	elements/curlfilesink \
@@ -1489,13 +1619,14 @@
 @USE_GL_FALSE@check_gl = 
 @USE_GL_TRUE@check_gl = libs/gstglcontext \
 @USE_GL_TRUE@    libs/gstglmemory \
-@USE_GL_TRUE@    libs/gstglupload
+@USE_GL_TRUE@    libs/gstglupload \
+@USE_GL_TRUE@    libs/gstglcolorconvert \
+@USE_GL_TRUE@    elements/glimagesink
 
 VALGRIND_TO_FIX = \
 	elements/mpeg2enc \
 	elements/mplex    \
-	elements/zbar     \
-	pipeline/colorspace
+	elements/zbar
 
 
 # valgrind testing
@@ -1505,12 +1636,17 @@
 noinst_HEADERS = elements/mxfdemux.h
 TESTS = $(check_PROGRAMS)
 AM_CFLAGS = $(GST_CFLAGS) $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) \
-		-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
-		-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
+	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 
 LDADD = $(GST_CHECK_LIBS)
-elements_audiomixer_LDADD = $(GST_BASE_LIBS) -lgstbase-@GST_API_VERSION@ $(LDADD)
-elements_audiomixer_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+generic_states_CFLAGS = $(AM_CFLAGS) $(GMODULE_NO_EXPORT_CFLAGS)
+generic_states_LDADD = $(LDADD) $(GMODULE_NO_EXPORT_LIBS)
+elements_audiomixer_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) -lgstbase-@GST_API_VERSION@ $(LDADD)
+elements_audiomixer_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(AM_CFLAGS)
+elements_audiointerleave_LDADD = $(GST_BASE_LIBS) -lgstbase-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ $(LDADD)
+elements_audiointerleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
 
 # parser unit test convenience lib
 noinst_LTLIBRARIES = libparser.la
@@ -1523,6 +1659,7 @@
 elements_mpeg4videoparse_LDADD = libparser.la $(LDADD)
 elements_h263parse_LDADD = libparser.la $(LDADD)
 elements_h264parse_LDADD = libparser.la $(LDADD)
+elements_pcapparse_LDADD = libparser.la $(LDADD)
 libs_mpegvideoparser_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
 	-DGST_USE_UNSTABLE_API \
@@ -1642,6 +1779,9 @@
 elements_uvch264demux_CFLAGS = -DUVCH264DEMUX_DATADIR="$(srcdir)/elements/uvch264demux_data" \
 				$(AM_CFLAGS)
 
+elements_dash_mpd_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS)
+elements_dash_mpd_LDADD = $(LDADD) $(LIBXML2_LIBS)
+elements_dash_mpd_SOURCES = elements/dash_mpd.c
 pipelines_streamheader_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
 pipelines_streamheader_LDADD = $(GIO_LIBS) $(LDADD)
 libs_insertbin_LDADD = \
@@ -1651,11 +1791,15 @@
 libs_insertbin_CFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
 
+elements_rtponvif_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_rtponvif_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION) $(LDADD)
 EXTRA_DIST = gst-plugins-bad.supp $(uvch264_dist_data)
 orc_bayer_CFLAGS = $(ORC_CFLAGS)
 orc_bayer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_bayer_SOURCES = orc/bayer.c
 orc_audiomixer_CFLAGS = $(ORC_CFLAGS)
 orc_audiomixer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_audiomixer_SOURCES = orc/audiomixer.c
 libs_gstglcontext_LDADD = \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
 	$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
@@ -1685,6 +1829,26 @@
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
 
+libs_gstglcolorconvert_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+libs_gstglcolorconvert_LDADD = \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
+
+elements_glimagesink_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+elements_glimagesink_LDADD = \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la \
+	$(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) \
@@ -1695,8 +1859,17 @@
 	-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)
+elements_compositor_LDADD = \
+	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
+	$(GST_BASE_LIBS) $(LDADD)
+
+elements_compositor_CFLAGS = \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_hlsdemux_m3u8_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) -I$(top_srcdir)/ext/hls
+elements_hlsdemux_m3u8_LDADD = $(GST_BASE_LIBS) $(LDADD)
+elements_hlsdemux_m3u8_SOURCES = elements/hlsdemux_m3u8.c
 orc_compositor_CFLAGS = $(ORC_CFLAGS)
 orc_compositor_LDADD = $(ORC_LIBS) -lorc-test-0.4
 nodist_orc_compositor_SOURCES = orc/compositor.c
@@ -1717,7 +1890,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/check/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1726,7 +1898,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/check.mak:
+$(top_srcdir)/common/check.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1794,6 +1966,12 @@
 elements/assrender$(EXEEXT): $(elements_assrender_OBJECTS) $(elements_assrender_DEPENDENCIES) $(EXTRA_elements_assrender_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/assrender$(EXEEXT)
 	$(AM_V_CCLD)$(elements_assrender_LINK) $(elements_assrender_OBJECTS) $(elements_assrender_LDADD) $(LIBS)
+elements/elements_audiointerleave-audiointerleave.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/audiointerleave$(EXEEXT): $(elements_audiointerleave_OBJECTS) $(elements_audiointerleave_DEPENDENCIES) $(EXTRA_elements_audiointerleave_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/audiointerleave$(EXEEXT)
+	$(AM_V_CCLD)$(elements_audiointerleave_LINK) $(elements_audiointerleave_OBJECTS) $(elements_audiointerleave_LDADD) $(LIBS)
 elements/elements_audiomixer-audiomixer.$(OBJEXT):  \
 	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -1860,6 +2038,12 @@
 elements/curlsmtpsink$(EXEEXT): $(elements_curlsmtpsink_OBJECTS) $(elements_curlsmtpsink_DEPENDENCIES) $(EXTRA_elements_curlsmtpsink_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/curlsmtpsink$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_curlsmtpsink_OBJECTS) $(elements_curlsmtpsink_LDADD) $(LIBS)
+elements/elements_dash_mpd-dash_mpd.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/dash_mpd$(EXEEXT): $(elements_dash_mpd_OBJECTS) $(elements_dash_mpd_DEPENDENCIES) $(EXTRA_elements_dash_mpd_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/dash_mpd$(EXEEXT)
+	$(AM_V_CCLD)$(elements_dash_mpd_LINK) $(elements_dash_mpd_OBJECTS) $(elements_dash_mpd_LDADD) $(LIBS)
 elements/dataurisrc.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -1890,6 +2074,12 @@
 elements/gdppay$(EXEEXT): $(elements_gdppay_OBJECTS) $(elements_gdppay_DEPENDENCIES) $(EXTRA_elements_gdppay_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/gdppay$(EXEEXT)
 	$(AM_V_CCLD)$(elements_gdppay_LINK) $(elements_gdppay_OBJECTS) $(elements_gdppay_LDADD) $(LIBS)
+elements/elements_glimagesink-glimagesink.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/glimagesink$(EXEEXT): $(elements_glimagesink_OBJECTS) $(elements_glimagesink_DEPENDENCIES) $(EXTRA_elements_glimagesink_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/glimagesink$(EXEEXT)
+	$(AM_V_CCLD)$(elements_glimagesink_LINK) $(elements_glimagesink_OBJECTS) $(elements_glimagesink_LDADD) $(LIBS)
 elements/h263parse.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -1902,6 +2092,12 @@
 elements/h264parse$(EXEEXT): $(elements_h264parse_OBJECTS) $(elements_h264parse_DEPENDENCIES) $(EXTRA_elements_h264parse_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/h264parse$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_h264parse_OBJECTS) $(elements_h264parse_LDADD) $(LIBS)
+elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/hlsdemux_m3u8$(EXEEXT): $(elements_hlsdemux_m3u8_OBJECTS) $(elements_hlsdemux_m3u8_DEPENDENCIES) $(EXTRA_elements_hlsdemux_m3u8_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/hlsdemux_m3u8$(EXEEXT)
+	$(AM_V_CCLD)$(elements_hlsdemux_m3u8_LINK) $(elements_hlsdemux_m3u8_OBJECTS) $(elements_hlsdemux_m3u8_LDADD) $(LIBS)
 elements/id3mux.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -1992,6 +2188,18 @@
 elements/opus$(EXEEXT): $(elements_opus_OBJECTS) $(elements_opus_DEPENDENCIES) $(EXTRA_elements_opus_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/opus$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_opus_OBJECTS) $(elements_opus_LDADD) $(LIBS)
+elements/pcapparse.$(OBJEXT): elements/$(am__dirstamp) \
+	elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/pcapparse$(EXEEXT): $(elements_pcapparse_OBJECTS) $(elements_pcapparse_DEPENDENCIES) $(EXTRA_elements_pcapparse_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/pcapparse$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(elements_pcapparse_OBJECTS) $(elements_pcapparse_LDADD) $(LIBS)
+elements/elements_rtponvif-rtponvif.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/rtponvif$(EXEEXT): $(elements_rtponvif_OBJECTS) $(elements_rtponvif_DEPENDENCIES) $(EXTRA_elements_rtponvif_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/rtponvif$(EXEEXT)
+	$(AM_V_CCLD)$(elements_rtponvif_LINK) $(elements_rtponvif_OBJECTS) $(elements_rtponvif_LDADD) $(LIBS)
 elements/schroenc.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -2004,6 +2212,12 @@
 elements/shm$(EXEEXT): $(elements_shm_OBJECTS) $(elements_shm_DEPENDENCIES) $(EXTRA_elements_shm_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/shm$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_shm_OBJECTS) $(elements_shm_LDADD) $(LIBS)
+elements/templatematch.$(OBJEXT): elements/$(am__dirstamp) \
+	elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/templatematch$(EXEEXT): $(elements_templatematch_OBJECTS) $(elements_templatematch_DEPENDENCIES) $(EXTRA_elements_templatematch_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/templatematch$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(elements_templatematch_OBJECTS) $(elements_templatematch_LDADD) $(LIBS)
 elements/elements_timidity-timidity.$(OBJEXT):  \
 	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -2034,6 +2248,12 @@
 elements/voamrwbenc$(EXEEXT): $(elements_voamrwbenc_OBJECTS) $(elements_voamrwbenc_DEPENDENCIES) $(EXTRA_elements_voamrwbenc_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/voamrwbenc$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_voamrwbenc_OBJECTS) $(elements_voamrwbenc_LDADD) $(LIBS)
+elements/x265enc.$(OBJEXT): elements/$(am__dirstamp) \
+	elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/x265enc$(EXEEXT): $(elements_x265enc_OBJECTS) $(elements_x265enc_DEPENDENCIES) $(EXTRA_elements_x265enc_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/x265enc$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(elements_x265enc_OBJECTS) $(elements_x265enc_LDADD) $(LIBS)
 elements/zbar.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -2046,12 +2266,12 @@
 generic/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) generic/$(DEPDIR)
 	@: > generic/$(DEPDIR)/$(am__dirstamp)
-generic/states.$(OBJEXT): generic/$(am__dirstamp) \
+generic/generic_states-states.$(OBJEXT): generic/$(am__dirstamp) \
 	generic/$(DEPDIR)/$(am__dirstamp)
 
 generic/states$(EXEEXT): $(generic_states_OBJECTS) $(generic_states_DEPENDENCIES) $(EXTRA_generic_states_DEPENDENCIES) generic/$(am__dirstamp)
 	@rm -f generic/states$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(generic_states_OBJECTS) $(generic_states_LDADD) $(LIBS)
+	$(AM_V_CCLD)$(generic_states_LINK) $(generic_states_OBJECTS) $(generic_states_LDADD) $(LIBS)
 libs/$(am__dirstamp):
 	@$(MKDIR_P) libs
 	@: > libs/$(am__dirstamp)
@@ -2064,6 +2284,12 @@
 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_gstglcolorconvert-gstglcolorconvert.$(OBJEXT):  \
+	libs/$(am__dirstamp) libs/$(DEPDIR)/$(am__dirstamp)
+
+libs/gstglcolorconvert$(EXEEXT): $(libs_gstglcolorconvert_OBJECTS) $(libs_gstglcolorconvert_DEPENDENCIES) $(EXTRA_libs_gstglcolorconvert_DEPENDENCIES) libs/$(am__dirstamp)
+	@rm -f libs/gstglcolorconvert$(EXEEXT)
+	$(AM_V_CCLD)$(libs_gstglcolorconvert_LINK) $(libs_gstglcolorconvert_OBJECTS) $(libs_gstglcolorconvert_LDADD) $(LIBS)
 libs/libs_gstglcontext-gstglcontext.$(OBJEXT): libs/$(am__dirstamp) \
 	libs/$(DEPDIR)/$(am__dirstamp)
 
@@ -2148,12 +2374,6 @@
 pipelines/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) pipelines/$(DEPDIR)
 	@: > pipelines/$(DEPDIR)/$(am__dirstamp)
-pipelines/colorspace.$(OBJEXT): pipelines/$(am__dirstamp) \
-	pipelines/$(DEPDIR)/$(am__dirstamp)
-
-pipelines/colorspace$(EXEEXT): $(pipelines_colorspace_OBJECTS) $(pipelines_colorspace_DEPENDENCIES) $(EXTRA_pipelines_colorspace_DEPENDENCIES) pipelines/$(am__dirstamp)
-	@rm -f pipelines/colorspace$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(pipelines_colorspace_OBJECTS) $(pipelines_colorspace_LDADD) $(LIBS)
 pipelines/mimic.$(OBJEXT): pipelines/$(am__dirstamp) \
 	pipelines/$(DEPDIR)/$(am__dirstamp)
 
@@ -2196,18 +2416,23 @@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/curlsmtpsink.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/dataurisrc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_assrender-assrender.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Po@am__quote@
 @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_dash_mpd-dash_mpd.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@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_gdppay-gdppay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_glimagesink-glimagesink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_jifmux-jifmux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_kate-kate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_mpegtsmux-mpegtsmux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_mpg123audiodec-mpg123audiodec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_rtponvif-rtponvif.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_timidity-timidity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_uvch264demux-uvch264demux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_voaacenc-voaacenc.Po@am__quote@
@@ -2225,13 +2450,17 @@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/neonhttpsrc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/ofa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/opus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/pcapparse.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/schroenc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/shm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/templatematch.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/viewfinderbin.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/voamrwbenc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/x265enc.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@generic/$(DEPDIR)/generic_states-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_gstglcolorconvert-gstglcolorconvert.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@
@@ -2244,7 +2473,6 @@
 @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@
 @AMDEP_TRUE@@am__include@ @am__quote@pipelines/$(DEPDIR)/pipelines_streamheader-streamheader.Po@am__quote@
@@ -2294,6 +2522,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_assrender_CFLAGS) $(CFLAGS) -c -o elements/elements_assrender-assrender.obj `if test -f 'elements/assrender.c'; then $(CYGPATH_W) 'elements/assrender.c'; else $(CYGPATH_W) '$(srcdir)/elements/assrender.c'; fi`
 
+elements/elements_audiointerleave-audiointerleave.o: elements/audiointerleave.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiointerleave_CFLAGS) $(CFLAGS) -MT elements/elements_audiointerleave-audiointerleave.o -MD -MP -MF elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Tpo -c -o elements/elements_audiointerleave-audiointerleave.o `test -f 'elements/audiointerleave.c' || echo '$(srcdir)/'`elements/audiointerleave.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Tpo elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/audiointerleave.c' object='elements/elements_audiointerleave-audiointerleave.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_audiointerleave_CFLAGS) $(CFLAGS) -c -o elements/elements_audiointerleave-audiointerleave.o `test -f 'elements/audiointerleave.c' || echo '$(srcdir)/'`elements/audiointerleave.c
+
+elements/elements_audiointerleave-audiointerleave.obj: elements/audiointerleave.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiointerleave_CFLAGS) $(CFLAGS) -MT elements/elements_audiointerleave-audiointerleave.obj -MD -MP -MF elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Tpo -c -o elements/elements_audiointerleave-audiointerleave.obj `if test -f 'elements/audiointerleave.c'; then $(CYGPATH_W) 'elements/audiointerleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiointerleave.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Tpo elements/$(DEPDIR)/elements_audiointerleave-audiointerleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/audiointerleave.c' object='elements/elements_audiointerleave-audiointerleave.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_audiointerleave_CFLAGS) $(CFLAGS) -c -o elements/elements_audiointerleave-audiointerleave.obj `if test -f 'elements/audiointerleave.c'; then $(CYGPATH_W) 'elements/audiointerleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiointerleave.c'; fi`
+
 elements/elements_audiomixer-audiomixer.o: elements/audiomixer.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiomixer_CFLAGS) $(CFLAGS) -MT elements/elements_audiomixer-audiomixer.o -MD -MP -MF elements/$(DEPDIR)/elements_audiomixer-audiomixer.Tpo -c -o elements/elements_audiomixer-audiomixer.o `test -f 'elements/audiomixer.c' || echo '$(srcdir)/'`elements/audiomixer.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_audiomixer-audiomixer.Tpo elements/$(DEPDIR)/elements_audiomixer-audiomixer.Po
@@ -2350,6 +2592,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_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_dash_mpd-dash_mpd.o: elements/dash_mpd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_dash_mpd_CFLAGS) $(CFLAGS) -MT elements/elements_dash_mpd-dash_mpd.o -MD -MP -MF elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Tpo -c -o elements/elements_dash_mpd-dash_mpd.o `test -f 'elements/dash_mpd.c' || echo '$(srcdir)/'`elements/dash_mpd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Tpo elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/dash_mpd.c' object='elements/elements_dash_mpd-dash_mpd.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_dash_mpd_CFLAGS) $(CFLAGS) -c -o elements/elements_dash_mpd-dash_mpd.o `test -f 'elements/dash_mpd.c' || echo '$(srcdir)/'`elements/dash_mpd.c
+
+elements/elements_dash_mpd-dash_mpd.obj: elements/dash_mpd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_dash_mpd_CFLAGS) $(CFLAGS) -MT elements/elements_dash_mpd-dash_mpd.obj -MD -MP -MF elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Tpo -c -o elements/elements_dash_mpd-dash_mpd.obj `if test -f 'elements/dash_mpd.c'; then $(CYGPATH_W) 'elements/dash_mpd.c'; else $(CYGPATH_W) '$(srcdir)/elements/dash_mpd.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Tpo elements/$(DEPDIR)/elements_dash_mpd-dash_mpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/dash_mpd.c' object='elements/elements_dash_mpd-dash_mpd.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_dash_mpd_CFLAGS) $(CFLAGS) -c -o elements/elements_dash_mpd-dash_mpd.obj `if test -f 'elements/dash_mpd.c'; then $(CYGPATH_W) 'elements/dash_mpd.c'; else $(CYGPATH_W) '$(srcdir)/elements/dash_mpd.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
@@ -2406,6 +2662,34 @@
 @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_gdppay_CFLAGS) $(CFLAGS) -c -o elements/elements_gdppay-gdppay.obj `if test -f 'elements/gdppay.c'; then $(CYGPATH_W) 'elements/gdppay.c'; else $(CYGPATH_W) '$(srcdir)/elements/gdppay.c'; fi`
 
+elements/elements_glimagesink-glimagesink.o: elements/glimagesink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_glimagesink_CFLAGS) $(CFLAGS) -MT elements/elements_glimagesink-glimagesink.o -MD -MP -MF elements/$(DEPDIR)/elements_glimagesink-glimagesink.Tpo -c -o elements/elements_glimagesink-glimagesink.o `test -f 'elements/glimagesink.c' || echo '$(srcdir)/'`elements/glimagesink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_glimagesink-glimagesink.Tpo elements/$(DEPDIR)/elements_glimagesink-glimagesink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/glimagesink.c' object='elements/elements_glimagesink-glimagesink.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_glimagesink_CFLAGS) $(CFLAGS) -c -o elements/elements_glimagesink-glimagesink.o `test -f 'elements/glimagesink.c' || echo '$(srcdir)/'`elements/glimagesink.c
+
+elements/elements_glimagesink-glimagesink.obj: elements/glimagesink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_glimagesink_CFLAGS) $(CFLAGS) -MT elements/elements_glimagesink-glimagesink.obj -MD -MP -MF elements/$(DEPDIR)/elements_glimagesink-glimagesink.Tpo -c -o elements/elements_glimagesink-glimagesink.obj `if test -f 'elements/glimagesink.c'; then $(CYGPATH_W) 'elements/glimagesink.c'; else $(CYGPATH_W) '$(srcdir)/elements/glimagesink.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_glimagesink-glimagesink.Tpo elements/$(DEPDIR)/elements_glimagesink-glimagesink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/glimagesink.c' object='elements/elements_glimagesink-glimagesink.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_glimagesink_CFLAGS) $(CFLAGS) -c -o elements/elements_glimagesink-glimagesink.obj `if test -f 'elements/glimagesink.c'; then $(CYGPATH_W) 'elements/glimagesink.c'; else $(CYGPATH_W) '$(srcdir)/elements/glimagesink.c'; fi`
+
+elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.o: elements/hlsdemux_m3u8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_hlsdemux_m3u8_CFLAGS) $(CFLAGS) -MT elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.o -MD -MP -MF elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Tpo -c -o elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.o `test -f 'elements/hlsdemux_m3u8.c' || echo '$(srcdir)/'`elements/hlsdemux_m3u8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Tpo elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/hlsdemux_m3u8.c' object='elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.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_hlsdemux_m3u8_CFLAGS) $(CFLAGS) -c -o elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.o `test -f 'elements/hlsdemux_m3u8.c' || echo '$(srcdir)/'`elements/hlsdemux_m3u8.c
+
+elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.obj: elements/hlsdemux_m3u8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_hlsdemux_m3u8_CFLAGS) $(CFLAGS) -MT elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.obj -MD -MP -MF elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Tpo -c -o elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.obj `if test -f 'elements/hlsdemux_m3u8.c'; then $(CYGPATH_W) 'elements/hlsdemux_m3u8.c'; else $(CYGPATH_W) '$(srcdir)/elements/hlsdemux_m3u8.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Tpo elements/$(DEPDIR)/elements_hlsdemux_m3u8-hlsdemux_m3u8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/hlsdemux_m3u8.c' object='elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.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_hlsdemux_m3u8_CFLAGS) $(CFLAGS) -c -o elements/elements_hlsdemux_m3u8-hlsdemux_m3u8.obj `if test -f 'elements/hlsdemux_m3u8.c'; then $(CYGPATH_W) 'elements/hlsdemux_m3u8.c'; else $(CYGPATH_W) '$(srcdir)/elements/hlsdemux_m3u8.c'; fi`
+
 elements/elements_jifmux-jifmux.o: elements/jifmux.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_jifmux_CFLAGS) $(CFLAGS) -MT elements/elements_jifmux-jifmux.o -MD -MP -MF elements/$(DEPDIR)/elements_jifmux-jifmux.Tpo -c -o elements/elements_jifmux-jifmux.o `test -f 'elements/jifmux.c' || echo '$(srcdir)/'`elements/jifmux.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_jifmux-jifmux.Tpo elements/$(DEPDIR)/elements_jifmux-jifmux.Po
@@ -2462,6 +2746,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_mpg123audiodec_CFLAGS) $(CFLAGS) -c -o elements/elements_mpg123audiodec-mpg123audiodec.obj `if test -f 'elements/mpg123audiodec.c'; then $(CYGPATH_W) 'elements/mpg123audiodec.c'; else $(CYGPATH_W) '$(srcdir)/elements/mpg123audiodec.c'; fi`
 
+elements/elements_rtponvif-rtponvif.o: elements/rtponvif.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtponvif_CFLAGS) $(CFLAGS) -MT elements/elements_rtponvif-rtponvif.o -MD -MP -MF elements/$(DEPDIR)/elements_rtponvif-rtponvif.Tpo -c -o elements/elements_rtponvif-rtponvif.o `test -f 'elements/rtponvif.c' || echo '$(srcdir)/'`elements/rtponvif.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_rtponvif-rtponvif.Tpo elements/$(DEPDIR)/elements_rtponvif-rtponvif.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/rtponvif.c' object='elements/elements_rtponvif-rtponvif.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_rtponvif_CFLAGS) $(CFLAGS) -c -o elements/elements_rtponvif-rtponvif.o `test -f 'elements/rtponvif.c' || echo '$(srcdir)/'`elements/rtponvif.c
+
+elements/elements_rtponvif-rtponvif.obj: elements/rtponvif.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtponvif_CFLAGS) $(CFLAGS) -MT elements/elements_rtponvif-rtponvif.obj -MD -MP -MF elements/$(DEPDIR)/elements_rtponvif-rtponvif.Tpo -c -o elements/elements_rtponvif-rtponvif.obj `if test -f 'elements/rtponvif.c'; then $(CYGPATH_W) 'elements/rtponvif.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtponvif.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_rtponvif-rtponvif.Tpo elements/$(DEPDIR)/elements_rtponvif-rtponvif.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/rtponvif.c' object='elements/elements_rtponvif-rtponvif.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_rtponvif_CFLAGS) $(CFLAGS) -c -o elements/elements_rtponvif-rtponvif.obj `if test -f 'elements/rtponvif.c'; then $(CYGPATH_W) 'elements/rtponvif.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtponvif.c'; fi`
+
 elements/elements_timidity-timidity.o: elements/timidity.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_timidity_CFLAGS) $(CFLAGS) -MT elements/elements_timidity-timidity.o -MD -MP -MF elements/$(DEPDIR)/elements_timidity-timidity.Tpo -c -o elements/elements_timidity-timidity.o `test -f 'elements/timidity.c' || echo '$(srcdir)/'`elements/timidity.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_timidity-timidity.Tpo elements/$(DEPDIR)/elements_timidity-timidity.Po
@@ -2504,6 +2802,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`
 
+generic/generic_states-states.o: generic/states.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generic_states_CFLAGS) $(CFLAGS) -MT generic/generic_states-states.o -MD -MP -MF generic/$(DEPDIR)/generic_states-states.Tpo -c -o generic/generic_states-states.o `test -f 'generic/states.c' || echo '$(srcdir)/'`generic/states.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) generic/$(DEPDIR)/generic_states-states.Tpo generic/$(DEPDIR)/generic_states-states.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='generic/states.c' object='generic/generic_states-states.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generic_states_CFLAGS) $(CFLAGS) -c -o generic/generic_states-states.o `test -f 'generic/states.c' || echo '$(srcdir)/'`generic/states.c
+
+generic/generic_states-states.obj: generic/states.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generic_states_CFLAGS) $(CFLAGS) -MT generic/generic_states-states.obj -MD -MP -MF generic/$(DEPDIR)/generic_states-states.Tpo -c -o generic/generic_states-states.obj `if test -f 'generic/states.c'; then $(CYGPATH_W) 'generic/states.c'; else $(CYGPATH_W) '$(srcdir)/generic/states.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) generic/$(DEPDIR)/generic_states-states.Tpo generic/$(DEPDIR)/generic_states-states.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='generic/states.c' object='generic/generic_states-states.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generic_states_CFLAGS) $(CFLAGS) -c -o generic/generic_states-states.obj `if test -f 'generic/states.c'; then $(CYGPATH_W) 'generic/states.c'; else $(CYGPATH_W) '$(srcdir)/generic/states.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
@@ -2518,6 +2830,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) $(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_gstglcolorconvert-gstglcolorconvert.o: libs/gstglcolorconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_gstglcolorconvert_CFLAGS) $(CFLAGS) -MT libs/libs_gstglcolorconvert-gstglcolorconvert.o -MD -MP -MF libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Tpo -c -o libs/libs_gstglcolorconvert-gstglcolorconvert.o `test -f 'libs/gstglcolorconvert.c' || echo '$(srcdir)/'`libs/gstglcolorconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Tpo libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libs/gstglcolorconvert.c' object='libs/libs_gstglcolorconvert-gstglcolorconvert.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_gstglcolorconvert_CFLAGS) $(CFLAGS) -c -o libs/libs_gstglcolorconvert-gstglcolorconvert.o `test -f 'libs/gstglcolorconvert.c' || echo '$(srcdir)/'`libs/gstglcolorconvert.c
+
+libs/libs_gstglcolorconvert-gstglcolorconvert.obj: libs/gstglcolorconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_gstglcolorconvert_CFLAGS) $(CFLAGS) -MT libs/libs_gstglcolorconvert-gstglcolorconvert.obj -MD -MP -MF libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Tpo -c -o libs/libs_gstglcolorconvert-gstglcolorconvert.obj `if test -f 'libs/gstglcolorconvert.c'; then $(CYGPATH_W) 'libs/gstglcolorconvert.c'; else $(CYGPATH_W) '$(srcdir)/libs/gstglcolorconvert.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Tpo libs/$(DEPDIR)/libs_gstglcolorconvert-gstglcolorconvert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libs/gstglcolorconvert.c' object='libs/libs_gstglcolorconvert-gstglcolorconvert.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_gstglcolorconvert_CFLAGS) $(CFLAGS) -c -o libs/libs_gstglcolorconvert-gstglcolorconvert.obj `if test -f 'libs/gstglcolorconvert.c'; then $(CYGPATH_W) 'libs/gstglcolorconvert.c'; else $(CYGPATH_W) '$(srcdir)/libs/gstglcolorconvert.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
@@ -2793,7 +3119,7 @@
 	if test -n "$$am__remaking_logs"; then \
 	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
 	       "recursion detected" >&2; \
-	else \
+	elif test -n "$$redo_logs"; then \
 	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
 	fi; \
 	if $(am__make_dryrun); then :; else \
@@ -2918,6 +3244,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/dash_mpd.log: elements/dash_mpd$(EXEEXT)
+	@p='elements/dash_mpd$(EXEEXT)'; \
+	b='elements/dash_mpd'; \
+	$(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/faac.log: elements/faac$(EXEEXT)
 	@p='elements/faac$(EXEEXT)'; \
 	b='elements/faac'; \
@@ -2981,6 +3314,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/templatematch.log: elements/templatematch$(EXEEXT)
+	@p='elements/templatematch$(EXEEXT)'; \
+	b='elements/templatematch'; \
+	$(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/opus.log: elements/opus$(EXEEXT)
 	@p='elements/opus$(EXEEXT)'; \
 	b='elements/opus'; \
@@ -3051,6 +3391,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/audiointerleave.log: elements/audiointerleave$(EXEEXT)
+	@p='elements/audiointerleave$(EXEEXT)'; \
+	b='elements/audiointerleave'; \
+	$(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/audiomixer.log: elements/audiomixer$(EXEEXT)
 	@p='elements/audiomixer$(EXEEXT)'; \
 	b='elements/audiomixer'; \
@@ -3177,6 +3524,20 @@
 	--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/pcapparse.log: elements/pcapparse$(EXEEXT)
+	@p='elements/pcapparse$(EXEEXT)'; \
+	b='elements/pcapparse'; \
+	$(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/rtponvif.log: elements/rtponvif$(EXEEXT)
+	@p='elements/rtponvif$(EXEEXT)'; \
+	b='elements/rtponvif'; \
+	$(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/id3mux.log: elements/id3mux$(EXEEXT)
 	@p='elements/id3mux$(EXEEXT)'; \
 	b='elements/id3mux'; \
@@ -3254,6 +3615,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/x265enc.log: elements/x265enc$(EXEEXT)
+	@p='elements/x265enc$(EXEEXT)'; \
+	b='elements/x265enc'; \
+	$(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/viewfinderbin.log: elements/viewfinderbin$(EXEEXT)
 	@p='elements/viewfinderbin$(EXEEXT)'; \
 	b='elements/viewfinderbin'; \
@@ -3317,6 +3685,27 @@
 	--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/gstglcolorconvert.log: libs/gstglcolorconvert$(EXEEXT)
+	@p='libs/gstglcolorconvert$(EXEEXT)'; \
+	b='libs/gstglcolorconvert'; \
+	$(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/glimagesink.log: elements/glimagesink$(EXEEXT)
+	@p='elements/glimagesink$(EXEEXT)'; \
+	b='elements/glimagesink'; \
+	$(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/hlsdemux_m3u8.log: elements/hlsdemux_m3u8$(EXEEXT)
+	@p='elements/hlsdemux_m3u8$(EXEEXT)'; \
+	b='elements/hlsdemux_m3u8'; \
+	$(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)
 .test.log:
 	@p='$<'; \
 	$(am__set_b); \
@@ -3500,6 +3889,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	recheck tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # keep target around, since it's referenced in the modules' Makefiles
 clean-local-check:
@@ -3516,37 +3907,38 @@
 # run any given test by running make test.check
 # if the test fails, run it again at at least debug level 2
 %.check: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
-	@$(TESTS_ENVIRONMENT)					\
+	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -3555,16 +3947,16 @@
 	--tool=memcheck --leak-check=full --trace-children=yes	\
 	--show-possibly-lost=no                                 \
 	--leak-resolution=high --num-callers=20			\
-	./$* 2>&1 | tee valgrind.log
-	@if grep "==" valgrind.log > /dev/null 2>&1; then	\
-	    rm valgrind.log;					\
+	./$* 2>&1 | tee $$valgrind_log ;			\
+	if grep "==" $$valgrind_log > /dev/null 2>&1; then	\
+	    rm $$valgrind_log;					\
 	    exit 1;						\
-	fi
-	@rm valgrind.log
+	fi ;							\
+	rm $$valgrind_log
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -3594,7 +3986,7 @@
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -3647,19 +4039,13 @@
 # valgrind all tests
 valgrind: $(TESTS)
 	@echo "Valgrinding tests ..."
-	@failed=0;							\
+	@failed=0; valgrind_targets="";					\
 	for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do	\
-		$(MAKE) $$t.valgrind;					\
-		if test "$$?" -ne 0; then                               \
-			echo "Valgrind error for test $$t";		\
-			failed=`expr $$failed + 1`;			\
-			whicht="$$whicht $$t";				\
-		fi;							\
+	  valgrind_targets="$$valgrind_targets $$t.valgrind";		\
 	done;								\
-	if test "$$failed" -ne 0; then					\
-		echo "$$failed tests had leaks or errors under valgrind:";	\
-		echo "$$whicht";					\
-		false;							\
+	if ! $(MAKE) $$valgrind_targets ; then				\
+	  echo "Some tests had leaks or errors under valgrind";		\
+	  false;							\
 	fi
 
 # valgrind all tests until failure
@@ -3704,11 +4090,14 @@
 	fi
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
 
+# build all tests
+build-checks: $(TESTS)
+
 help:
 	@echo
 	@echo "make check                         -- run all checks"
@@ -3731,6 +4120,7 @@
 	@echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions"
 	@echo "                                               and save to suppressions.log"
 	@echo "make inspect                       -- inspect all plugin features"
+	@echo "make build-checks                  -- build all checks (but don't run them)"
 	@echo
 	@echo
 	@echo "Additionally, you can use the GST_CHECKS environment variable to"
diff --git a/tests/check/elements/asfmux.c b/tests/check/elements/asfmux.c
index 3c80845..6cb3e6c 100644
--- a/tests/check/elements/asfmux.c
+++ b/tests/check/elements/asfmux.c
@@ -202,19 +202,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = asfmux_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (asfmux);
diff --git a/tests/check/elements/audiointerleave.c b/tests/check/elements/audiointerleave.c
new file mode 100644
index 0000000..b4c504f
--- /dev/null
+++ b/tests/check/elements/audiointerleave.c
@@ -0,0 +1,1129 @@
+/* GStreamer unit tests for the audiointerleave element
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_VALGRIND
+# include <valgrind/valgrind.h>
+#endif
+
+#include <gst/check/gstcheck.h>
+#include <gst/audio/audio.h>
+#include <gst/audio/audio-enumtypes.h>
+
+#include <gst/check/gstharness.h>
+
+static void
+gst_check_setup_events_audiointerleave (GstPad * srcpad, GstElement * element,
+    GstCaps * caps, GstFormat format, const gchar * stream_id)
+{
+  GstSegment segment;
+
+  gst_segment_init (&segment, format);
+
+  fail_unless (gst_pad_push_event (srcpad,
+          gst_event_new_stream_start (stream_id)));
+  if (caps)
+    fail_unless (gst_pad_push_event (srcpad, gst_event_new_caps (caps)));
+  fail_unless (gst_pad_push_event (srcpad, gst_event_new_segment (&segment)));
+}
+
+GST_START_TEST (test_create_and_unref)
+{
+  GstElement *interleave;
+
+  interleave = gst_element_factory_make ("audiointerleave", NULL);
+  fail_unless (interleave != NULL);
+
+  gst_element_set_state (interleave, GST_STATE_NULL);
+  gst_object_unref (interleave);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_request_pads)
+{
+  GstElement *interleave;
+  GstPad *pad1, *pad2;
+
+  interleave = gst_element_factory_make ("audiointerleave", NULL);
+  fail_unless (interleave != NULL);
+
+  pad1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (pad1 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (pad1), "sink_0");
+
+  pad2 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (pad2 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (pad2), "sink_1");
+
+  gst_element_release_request_pad (interleave, pad2);
+  gst_object_unref (pad2);
+  gst_element_release_request_pad (interleave, pad1);
+  gst_object_unref (pad1);
+
+  gst_element_set_state (interleave, GST_STATE_NULL);
+  gst_object_unref (interleave);
+}
+
+GST_END_TEST;
+
+static GstPad **mysrcpads, *mysinkpad;
+static GstBus *bus;
+static GstElement *interleave;
+static GMutex data_mutex;
+static GCond data_cond;
+static gint have_data;
+static gfloat input[2];
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/x-raw, "
+        "format = (string) " GST_AUDIO_NE (F32) ", "
+        "channels = (int) 2, layout = (string) {interleaved, non-interleaved}, rate = (int) 48000"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/x-raw, "
+        "format = (string) " GST_AUDIO_NE (F32) ", "
+        "channels = (int) 1, layout = (string) interleaved, rate = (int) 48000"));
+
+#define CAPS_48khz \
+        "audio/x-raw, " \
+        "format = (string) " GST_AUDIO_NE (F32) ", " \
+        "channels = (int) 1, layout = (string) non-interleaved," \
+        "rate = (int) 48000"
+
+static GstFlowReturn
+interleave_chain_func (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstMapInfo map;
+  gfloat *outdata;
+  gint i;
+
+  fail_unless (GST_IS_BUFFER (buffer));
+  fail_unless (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP));
+  gst_buffer_map (buffer, &map, GST_MAP_READ);
+  outdata = (gfloat *) map.data;
+  fail_unless (outdata != NULL);
+
+#ifdef HAVE_VALGRIND
+  if (!(RUNNING_ON_VALGRIND))
+#endif
+    for (i = 0; i < map.size / sizeof (float); i += 2) {
+      fail_unless_equals_float (outdata[i], input[0]);
+      fail_unless_equals_float (outdata[i + 1], input[1]);
+    }
+
+  g_mutex_lock (&data_mutex);
+  have_data += map.size;
+  g_cond_signal (&data_cond);
+  g_mutex_unlock (&data_mutex);
+
+  gst_buffer_unmap (buffer, &map);
+  gst_buffer_unref (buffer);
+
+
+  return GST_FLOW_OK;
+}
+
+GST_START_TEST (test_audiointerleave_2ch)
+{
+  GstElement *queue;
+  GstPad *sink0, *sink1, *src, *tmp;
+  GstCaps *caps;
+  gint i;
+  GstBuffer *inbuf;
+  gfloat *indata;
+  GstMapInfo map;
+
+  mysrcpads = g_new0 (GstPad *, 2);
+
+  have_data = 0;
+
+  interleave = gst_element_factory_make ("audiointerleave", NULL);
+  fail_unless (interleave != NULL);
+
+  g_object_set (interleave, "latency", GST_SECOND / 4, NULL);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+
+  sink0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sink0 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink_0");
+
+  sink1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sink1 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink_1");
+
+  mysrcpads[0] = gst_pad_new_from_static_template (&srctemplate, "src0");
+  fail_unless (mysrcpads[0] != NULL);
+
+  caps = gst_caps_from_string (CAPS_48khz);
+  gst_pad_set_active (mysrcpads[0], TRUE);
+  gst_check_setup_events_audiointerleave (mysrcpads[0], interleave, caps,
+      GST_FORMAT_TIME, "0");
+  gst_pad_use_fixed_caps (mysrcpads[0]);
+
+  mysrcpads[1] = gst_pad_new_from_static_template (&srctemplate, "src1");
+  fail_unless (mysrcpads[1] != NULL);
+
+  gst_pad_set_active (mysrcpads[1], TRUE);
+  gst_check_setup_events_audiointerleave (mysrcpads[1], interleave, caps,
+      GST_FORMAT_TIME, "1");
+  gst_pad_use_fixed_caps (mysrcpads[1]);
+
+  tmp = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (mysrcpads[0], tmp) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sink0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  fail_unless (gst_pad_link (mysrcpads[1], sink1) == GST_PAD_LINK_OK);
+
+  mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+  fail_unless (mysinkpad != NULL);
+  gst_pad_set_chain_function (mysinkpad, interleave_chain_func);
+  gst_pad_set_active (mysinkpad, TRUE);
+
+  src = gst_element_get_static_pad (interleave, "src");
+  fail_unless (src != NULL);
+  fail_unless (gst_pad_link (src, mysinkpad) == GST_PAD_LINK_OK);
+  gst_object_unref (src);
+
+  bus = gst_bus_new ();
+  gst_element_set_bus (interleave, bus);
+
+  fail_unless (gst_element_set_state (interleave,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+  fail_unless (gst_element_set_state (queue,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+  input[0] = -1.0;
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  //GST_BUFFER_PTS (inbuf) = 0;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = -1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+  input[1] = 1.0;
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  //GST_BUFFER_PTS (inbuf) = 0;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = 1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  //GST_BUFFER_PTS (inbuf) = GST_SECOND;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = -1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  //GST_BUFFER_PTS (inbuf) = GST_SECOND;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = 1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+  g_mutex_lock (&data_mutex);
+  while (have_data < 48000 * 2 * 2 * sizeof (float))
+    g_cond_wait (&data_cond, &data_mutex);
+  g_mutex_unlock (&data_mutex);
+
+  gst_element_set_state (interleave, GST_STATE_NULL);
+  gst_element_set_state (queue, GST_STATE_NULL);
+
+  gst_object_unref (mysrcpads[0]);
+  gst_object_unref (mysrcpads[1]);
+  gst_object_unref (mysinkpad);
+
+  gst_element_release_request_pad (interleave, sink0);
+  gst_object_unref (sink0);
+  gst_element_release_request_pad (interleave, sink1);
+  gst_object_unref (sink1);
+
+  gst_object_unref (interleave);
+  gst_object_unref (queue);
+  gst_object_unref (bus);
+  gst_caps_unref (caps);
+
+  g_free (mysrcpads);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audiointerleave_2ch_1eos)
+{
+  GstElement *queue;
+  GstPad *sink0, *sink1, *src, *tmp;
+  GstCaps *caps;
+  gint i;
+  GstBuffer *inbuf;
+  gfloat *indata;
+  GstMapInfo map;
+
+  mysrcpads = g_new0 (GstPad *, 2);
+
+  have_data = 0;
+
+  interleave = gst_element_factory_make ("audiointerleave", NULL);
+  fail_unless (interleave != NULL);
+
+  g_object_set (interleave, "latency", GST_SECOND / 4, NULL);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+
+  sink0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sink0 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink_0");
+
+  sink1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sink1 != NULL);
+  fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink_1");
+
+  mysrcpads[0] = gst_pad_new_from_static_template (&srctemplate, "src0");
+  fail_unless (mysrcpads[0] != NULL);
+
+  caps = gst_caps_from_string (CAPS_48khz);
+  gst_pad_set_active (mysrcpads[0], TRUE);
+  gst_check_setup_events_audiointerleave (mysrcpads[0], interleave, caps,
+      GST_FORMAT_TIME, "0");
+  gst_pad_use_fixed_caps (mysrcpads[0]);
+
+  mysrcpads[1] = gst_pad_new_from_static_template (&srctemplate, "src1");
+  fail_unless (mysrcpads[1] != NULL);
+
+  gst_pad_set_active (mysrcpads[1], TRUE);
+  gst_check_setup_events_audiointerleave (mysrcpads[1], interleave, caps,
+      GST_FORMAT_TIME, "1");
+  gst_pad_use_fixed_caps (mysrcpads[1]);
+
+  tmp = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (mysrcpads[0], tmp) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sink0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  fail_unless (gst_pad_link (mysrcpads[1], sink1) == GST_PAD_LINK_OK);
+
+  mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+  fail_unless (mysinkpad != NULL);
+  gst_pad_set_chain_function (mysinkpad, interleave_chain_func);
+  gst_pad_set_active (mysinkpad, TRUE);
+
+  src = gst_element_get_static_pad (interleave, "src");
+  fail_unless (src != NULL);
+  fail_unless (gst_pad_link (src, mysinkpad) == GST_PAD_LINK_OK);
+  gst_object_unref (src);
+
+  bus = gst_bus_new ();
+  gst_element_set_bus (interleave, bus);
+
+  fail_unless (gst_element_set_state (interleave,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+  fail_unless (gst_element_set_state (queue,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+  input[0] = -1.0;
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  GST_BUFFER_PTS (inbuf) = 0;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = -1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+  input[1] = 1.0;
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  GST_BUFFER_PTS (inbuf) = 0;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = 1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+  g_mutex_lock (&data_mutex);
+  /* 48000 samples per buffer * 2 sources * 2 buffers */
+  while (have_data != 48000 * 2 * sizeof (float))
+    g_cond_wait (&data_cond, &data_mutex);
+  g_mutex_unlock (&data_mutex);
+
+  input[0] = 0.0;
+  gst_pad_push_event (mysrcpads[0], gst_event_new_eos ());
+
+  input[1] = 1.0;
+  inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+  GST_BUFFER_PTS (inbuf) = GST_SECOND;
+  gst_buffer_map (inbuf, &map, GST_MAP_WRITE);
+  indata = (gfloat *) map.data;
+  for (i = 0; i < 48000; i++)
+    indata[i] = 1.0;
+  gst_buffer_unmap (inbuf, &map);
+  fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+  g_mutex_lock (&data_mutex);
+  /* 48000 samples per buffer * 2 sources * 2 buffers */
+  while (have_data != 48000 * 2 * 2 * sizeof (float))
+    g_cond_wait (&data_cond, &data_mutex);
+  g_mutex_unlock (&data_mutex);
+
+  gst_element_set_state (interleave, GST_STATE_NULL);
+  gst_element_set_state (queue, GST_STATE_NULL);
+
+  gst_object_unref (mysrcpads[0]);
+  gst_object_unref (mysrcpads[1]);
+  gst_object_unref (mysinkpad);
+
+  gst_element_release_request_pad (interleave, sink0);
+  gst_object_unref (sink0);
+  gst_element_release_request_pad (interleave, sink1);
+  gst_object_unref (sink1);
+
+  gst_object_unref (interleave);
+  gst_object_unref (queue);
+  gst_object_unref (bus);
+  gst_caps_unref (caps);
+
+  g_free (mysrcpads);
+}
+
+GST_END_TEST;
+
+static void
+src_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
+    gboolean interleaved, gpointer user_data)
+{
+  gint n = GPOINTER_TO_INT (user_data);
+  gfloat *data;
+  gint i, num_samples;
+  GstCaps *caps;
+  guint64 mask;
+  GstAudioChannelPosition pos;
+  GstMapInfo map;
+
+  fail_unless (gst_buffer_is_writable (buffer));
+
+  switch (n) {
+    case 0:
+    case 1:
+    case 2:
+      pos = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
+      break;
+    case 3:
+      pos = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
+      break;
+    default:
+      pos = GST_AUDIO_CHANNEL_POSITION_INVALID;
+      break;
+  }
+
+  mask = G_GUINT64_CONSTANT (1) << pos;
+
+  caps = gst_caps_new_simple ("audio/x-raw",
+      "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+      "channels", G_TYPE_INT, 1,
+      "layout", G_TYPE_STRING, interleaved ? "interleaved" : "non-interleaved",
+      "channel-mask", GST_TYPE_BITMASK, mask, "rate", G_TYPE_INT, 48000, NULL);
+
+  gst_pad_set_caps (pad, caps);
+  gst_caps_unref (caps);
+
+  fail_unless (gst_buffer_map (buffer, &map, GST_MAP_WRITE));
+  fail_unless (map.size % sizeof (gfloat) == 0);
+
+  fail_unless (map.size > 480);
+
+  num_samples = map.size / sizeof (gfloat);
+  data = (gfloat *) map.data;
+
+  for (i = 0; i < num_samples; i++)
+    data[i] = (n % 2 == 0) ? -1.0 : 1.0;
+
+  gst_buffer_unmap (buffer, &map);
+}
+
+static void
+src_handoff_float32_audiointerleaved (GstElement * element, GstBuffer * buffer,
+    GstPad * pad, gpointer user_data)
+{
+  src_handoff_float32 (element, buffer, pad, TRUE, user_data);
+}
+
+static void
+src_handoff_float32_non_audiointerleaved (GstElement * element,
+    GstBuffer * buffer, GstPad * pad, gpointer user_data)
+{
+  src_handoff_float32 (element, buffer, pad, FALSE, user_data);
+}
+
+static void
+sink_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
+    gpointer user_data)
+{
+  gint i;
+  GstMapInfo map;
+  gfloat *data;
+  GstCaps *caps, *ccaps;
+  gint n = GPOINTER_TO_INT (user_data);
+  guint64 mask;
+
+  fail_unless (GST_IS_BUFFER (buffer));
+  gst_buffer_map (buffer, &map, GST_MAP_READ);
+  data = (gfloat *) map.data;
+
+  /* Give a little leeway for rounding errors */
+  fail_unless (gst_util_uint64_scale (map.size, GST_SECOND,
+          48000 * 2 * sizeof (gfloat)) <= GST_BUFFER_DURATION (buffer) + 1 ||
+      gst_util_uint64_scale (map.size, GST_SECOND,
+          48000 * 2 * sizeof (gfloat)) >= GST_BUFFER_DURATION (buffer) - 1);
+
+  if (n == 0 || n == 3) {
+    GstAudioChannelPosition pos[2] =
+        { GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE };
+    gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
+  } else if (n == 1) {
+    GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
+      GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
+    };
+    gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
+  } else if (n == 2) {
+    GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
+      GST_AUDIO_CHANNEL_POSITION_REAR_CENTER
+    };
+    gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
+  } else {
+    g_assert_not_reached ();
+  }
+
+  if (pad) {
+    caps = gst_caps_new_simple ("audio/x-raw",
+        "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+        "channels", G_TYPE_INT, 2, "rate", G_TYPE_INT, 48000,
+        "layout", G_TYPE_STRING, "interleaved",
+        "channel-mask", GST_TYPE_BITMASK, mask, NULL);
+
+    ccaps = gst_pad_get_current_caps (pad);
+    fail_unless (gst_caps_is_equal (caps, ccaps));
+    gst_caps_unref (ccaps);
+    gst_caps_unref (caps);
+  }
+#ifdef HAVE_VALGRIND
+  if (!(RUNNING_ON_VALGRIND))
+#endif
+    for (i = 0; i < map.size / sizeof (float); i += 2) {
+      fail_unless_equals_float (data[i], -1.0);
+      if (n != 3)
+        fail_unless_equals_float (data[i + 1], 1.0);
+    }
+  have_data += map.size;
+
+  gst_buffer_unmap (buffer, &map);
+
+}
+
+static void
+test_audiointerleave_2ch_pipeline (gboolean interleaved)
+{
+  GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+  GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+  GstMessage *msg;
+  void *src_handoff_float32 =
+      interleaved ? &src_handoff_float32_audiointerleaved :
+      &src_handoff_float32_non_audiointerleaved;
+
+  have_data = 0;
+
+  pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+  fail_unless (pipeline != NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", "src1");
+  fail_unless (src1 != NULL);
+  g_object_set (src1, "num-buffers", 4, NULL);
+  g_object_set (src1, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src1, "signal-handoffs", TRUE, NULL);
+  g_object_set (src1, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src1, "handoff", G_CALLBACK (src_handoff_float32),
+      GINT_TO_POINTER (0));
+  gst_bin_add (GST_BIN (pipeline), src1);
+
+  src2 = gst_element_factory_make ("fakesrc", "src2");
+  fail_unless (src2 != NULL);
+  g_object_set (src2, "num-buffers", 4, NULL);
+  g_object_set (src2, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src2, "signal-handoffs", TRUE, NULL);
+  g_object_set (src2, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src2, "handoff", G_CALLBACK (src_handoff_float32),
+      GINT_TO_POINTER (1));
+  gst_bin_add (GST_BIN (pipeline), src2);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+  gst_bin_add (GST_BIN (pipeline), queue);
+
+  interleave = gst_element_factory_make ("audiointerleave", "audiointerleave");
+  fail_unless (interleave != NULL);
+  gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+  sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad0 != NULL);
+  tmp = gst_element_get_static_pad (src1, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad1 != NULL);
+  tmp = gst_element_get_static_pad (src2, "src");
+  tmp2 = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sink = gst_element_factory_make ("fakesink", "sink");
+  fail_unless (sink != NULL);
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+      GINT_TO_POINTER (0));
+  gst_bin_add (GST_BIN (pipeline), sink);
+  tmp = gst_element_get_static_pad (interleave, "src");
+  tmp2 = gst_element_get_static_pad (sink, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+  gst_message_unref (msg);
+
+  /* 48000 samples per buffer * 2 sources * 4 buffers */
+  fail_unless (have_data == 48000 * 2 * 4 * sizeof (gfloat));
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_element_release_request_pad (interleave, sinkpad0);
+  gst_object_unref (sinkpad0);
+  gst_element_release_request_pad (interleave, sinkpad1);
+  gst_object_unref (sinkpad1);
+  gst_object_unref (interleave);
+  gst_object_unref (pipeline);
+}
+
+GST_START_TEST (test_audiointerleave_2ch_pipeline_audiointerleaved)
+{
+  test_audiointerleave_2ch_pipeline (TRUE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audiointerleave_2ch_pipeline_non_audiointerleaved)
+{
+  test_audiointerleave_2ch_pipeline (FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audiointerleave_2ch_pipeline_input_chanpos)
+{
+  GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+  GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+  GstMessage *msg;
+
+  have_data = 0;
+
+  pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+  fail_unless (pipeline != NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", "src1");
+  fail_unless (src1 != NULL);
+  g_object_set (src1, "num-buffers", 4, NULL);
+  g_object_set (src1, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src1, "signal-handoffs", TRUE, NULL);
+  g_object_set (src1, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src1, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (2));
+  gst_bin_add (GST_BIN (pipeline), src1);
+
+  src2 = gst_element_factory_make ("fakesrc", "src2");
+  fail_unless (src2 != NULL);
+  g_object_set (src2, "num-buffers", 4, NULL);
+  g_object_set (src2, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src2, "signal-handoffs", TRUE, NULL);
+  g_object_set (src2, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src2, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (3));
+  gst_bin_add (GST_BIN (pipeline), src2);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+  gst_bin_add (GST_BIN (pipeline), queue);
+
+  interleave = gst_element_factory_make ("audiointerleave", "audiointerleave");
+  fail_unless (interleave != NULL);
+  g_object_set (interleave, "channel-positions-from-input", TRUE, NULL);
+  gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+  sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad0 != NULL);
+  tmp = gst_element_get_static_pad (src1, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad1 != NULL);
+  tmp = gst_element_get_static_pad (src2, "src");
+  tmp2 = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sink = gst_element_factory_make ("fakesink", "sink");
+  fail_unless (sink != NULL);
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+      GINT_TO_POINTER (1));
+  gst_bin_add (GST_BIN (pipeline), sink);
+  tmp = gst_element_get_static_pad (interleave, "src");
+  tmp2 = gst_element_get_static_pad (sink, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+  gst_message_unref (msg);
+
+  /* 48000 samples per buffer * 2 sources * 4 buffers */
+  fail_unless (have_data == 48000 * 2 * 4 * sizeof (gfloat));
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_element_release_request_pad (interleave, sinkpad0);
+  gst_object_unref (sinkpad0);
+  gst_element_release_request_pad (interleave, sinkpad1);
+  gst_object_unref (sinkpad1);
+  gst_object_unref (interleave);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audiointerleave_2ch_pipeline_custom_chanpos)
+{
+  GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+  GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+  GstMessage *msg;
+  GValueArray *arr;
+  GValue val = { 0, };
+
+  have_data = 0;
+
+  pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+  fail_unless (pipeline != NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", "src1");
+  fail_unless (src1 != NULL);
+  g_object_set (src1, "num-buffers", 4, NULL);
+  g_object_set (src1, "signal-handoffs", TRUE, NULL);
+  g_object_set (src1, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src1, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src1, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (0));
+  gst_bin_add (GST_BIN (pipeline), src1);
+
+  src2 = gst_element_factory_make ("fakesrc", "src2");
+  fail_unless (src2 != NULL);
+  g_object_set (src2, "num-buffers", 4, NULL);
+  g_object_set (src2, "signal-handoffs", TRUE, NULL);
+  g_object_set (src2, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src2, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src2, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (1));
+  gst_bin_add (GST_BIN (pipeline), src2);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+  gst_bin_add (GST_BIN (pipeline), queue);
+
+  interleave = gst_element_factory_make ("audiointerleave", "audiointerleave");
+  fail_unless (interleave != NULL);
+  g_object_set (interleave, "channel-positions-from-input", FALSE, NULL);
+  arr = g_value_array_new (2);
+
+  g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION);
+  g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER);
+  g_value_array_append (arr, &val);
+  g_value_reset (&val);
+  g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER);
+  g_value_array_append (arr, &val);
+  g_value_unset (&val);
+
+  g_object_set (interleave, "channel-positions", arr, NULL);
+  g_value_array_free (arr);
+  gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+  sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad0 != NULL);
+  tmp = gst_element_get_static_pad (src1, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad1 != NULL);
+  tmp = gst_element_get_static_pad (src2, "src");
+  tmp2 = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sink = gst_element_factory_make ("fakesink", "sink");
+  fail_unless (sink != NULL);
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+      GINT_TO_POINTER (2));
+  gst_bin_add (GST_BIN (pipeline), sink);
+  tmp = gst_element_get_static_pad (interleave, "src");
+  tmp2 = gst_element_get_static_pad (sink, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+  gst_message_unref (msg);
+
+  /* 48000 samples per buffer * 2 sources * 4 buffers */
+  fail_unless (have_data == 48000 * 2 * 4 * sizeof (gfloat));
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_element_release_request_pad (interleave, sinkpad0);
+  gst_object_unref (sinkpad0);
+  gst_element_release_request_pad (interleave, sinkpad1);
+  gst_object_unref (sinkpad1);
+  gst_object_unref (interleave);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audiointerleave_2ch_pipeline_no_chanpos)
+{
+  GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+  GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+  GstMessage *msg;
+
+  have_data = 0;
+
+  pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+  fail_unless (pipeline != NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", "src1");
+  fail_unless (src1 != NULL);
+  g_object_set (src1, "num-buffers", 4, NULL);
+  g_object_set (src1, "signal-handoffs", TRUE, NULL);
+  g_object_set (src1, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src1, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src1, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (0));
+  gst_bin_add (GST_BIN (pipeline), src1);
+
+  src2 = gst_element_factory_make ("fakesrc", "src2");
+  fail_unless (src2 != NULL);
+  g_object_set (src2, "num-buffers", 4, NULL);
+  g_object_set (src2, "signal-handoffs", TRUE, NULL);
+  g_object_set (src2, "sizetype", 2,
+      "sizemax", (int) 48000 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_object_set (src2, "format", GST_FORMAT_TIME, NULL);
+  g_signal_connect (src2, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (1));
+  gst_bin_add (GST_BIN (pipeline), src2);
+
+  queue = gst_element_factory_make ("queue", "queue");
+  fail_unless (queue != NULL);
+  gst_bin_add (GST_BIN (pipeline), queue);
+
+  interleave = gst_element_factory_make ("audiointerleave", "audiointerleave");
+  fail_unless (interleave != NULL);
+  g_object_set (interleave, "channel-positions-from-input", FALSE, NULL);
+  gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+  sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad0 != NULL);
+  tmp = gst_element_get_static_pad (src1, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
+  fail_unless (sinkpad1 != NULL);
+  tmp = gst_element_get_static_pad (src2, "src");
+  tmp2 = gst_element_get_static_pad (queue, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+  tmp = gst_element_get_static_pad (queue, "src");
+  fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+
+  sink = gst_element_factory_make ("fakesink", "sink");
+  fail_unless (sink != NULL);
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+      GINT_TO_POINTER (0));
+  gst_bin_add (GST_BIN (pipeline), sink);
+  tmp = gst_element_get_static_pad (interleave, "src");
+  tmp2 = gst_element_get_static_pad (sink, "sink");
+  fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+  gst_object_unref (tmp);
+  gst_object_unref (tmp2);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+  gst_message_unref (msg);
+
+  /* 48000 samples per buffer * 2 sources * 4 buffers */
+  fail_unless (have_data == 48000 * 2 * 4 * sizeof (gfloat));
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_element_release_request_pad (interleave, sinkpad0);
+  gst_object_unref (sinkpad0);
+  gst_element_release_request_pad (interleave, sinkpad1);
+  gst_object_unref (sinkpad1);
+  gst_object_unref (interleave);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static void
+forward_check_event (GstHarness * h, GstHarness * hsrc, GstEventType type)
+{
+  GstEvent *e;
+
+  e = gst_harness_pull_event (hsrc);
+  fail_unless (GST_EVENT_TYPE (e) == type);
+  gst_harness_push_event (h, e);
+}
+
+GST_START_TEST (test_audiointerleave_2ch_smallbuf)
+{
+  GstElement *audiointerleave;
+  GstHarness *hsrc;
+  GstHarness *h;
+  GstHarness *h2;
+  GstBuffer *buffer;
+  GstQuery *q;
+  gint i;
+  GstEvent *ev;
+  GstCaps *ecaps, *caps;
+
+  audiointerleave = gst_element_factory_make ("audiointerleave", NULL);
+
+  g_object_set (audiointerleave, "latency", GST_SECOND / 2,
+      "output-buffer-duration", GST_SECOND / 4, NULL);
+
+  h = gst_harness_new_with_element (audiointerleave, "sink_0", "src");
+  gst_harness_use_testclock (h);
+
+  h2 = gst_harness_new_with_element (audiointerleave, "sink_1", NULL);
+  gst_harness_set_src_caps_str (h2, "audio/x-raw, "
+      "format=" GST_AUDIO_NE (F32) ", channels=(int)1,"
+      " layout=interleaved, rate=48000, channel-mask=(bitmask)8");
+
+  hsrc = gst_harness_new ("fakesrc");
+  gst_harness_use_testclock (hsrc);
+  g_object_set (hsrc->element,
+      "is-live", TRUE,
+      "sync", TRUE,
+      "signal-handoffs", TRUE,
+      "format", GST_FORMAT_TIME,
+      "sizetype", 2,
+      "sizemax", (int) 480 * sizeof (gfloat),
+      "datarate", (int) 48000 * sizeof (gfloat), NULL);
+  g_signal_connect (hsrc->element, "handoff",
+      G_CALLBACK (src_handoff_float32_audiointerleaved), GINT_TO_POINTER (2));
+  gst_harness_play (hsrc);
+
+  gst_harness_crank_single_clock_wait (hsrc);
+  forward_check_event (h, hsrc, GST_EVENT_STREAM_START);
+  forward_check_event (h, hsrc, GST_EVENT_CAPS);
+  forward_check_event (h, hsrc, GST_EVENT_SEGMENT);
+  gst_harness_push (h, gst_harness_pull (hsrc));        /* buffer */
+
+  for (i = 0; i < 24; i++) {
+    gst_harness_crank_single_clock_wait (hsrc);
+    forward_check_event (h, hsrc, GST_EVENT_CAPS);
+    gst_harness_push (h, gst_harness_pull (hsrc));      /* buffer */
+  }
+
+  gst_harness_crank_single_clock_wait (h);
+
+
+  gst_event_unref (gst_harness_pull_event (h)); /* stream-start */
+  ev = gst_harness_pull_event (h);      /* caps */
+  fail_unless_equals_int (GST_EVENT_CAPS, GST_EVENT_TYPE (ev));
+
+  caps = gst_caps_new_simple ("audio/x-raw",
+      "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+      "channels", G_TYPE_INT, 2,
+      "layout", G_TYPE_STRING, "interleaved",
+      "rate", G_TYPE_INT, 48000, "channel-mask", GST_TYPE_BITMASK, 0x9, NULL);
+
+  gst_event_parse_caps (ev, &ecaps);
+  gst_check_caps_equal (ecaps, caps);
+  gst_caps_unref (caps);
+  gst_event_unref (ev);
+
+  for (i = 0; i < 24; i++)
+    gst_harness_crank_single_clock_wait (h);
+  fail_unless_equals_uint64 (gst_clock_get_time (GST_ELEMENT_CLOCK
+          (h->element)), 750 * GST_MSECOND);
+
+  /*  Check that the queue is really empty */
+  q = gst_query_new_drain ();
+  gst_pad_peer_query (h->srcpad, q);
+  gst_query_unref (q);
+
+  buffer = gst_harness_pull (h);
+  sink_handoff_float32 (NULL, buffer, NULL, GUINT_TO_POINTER (3));
+  gst_buffer_unref (buffer);
+  fail_unless_equals_int (gst_harness_buffers_received (h), 1);
+
+  for (i = 0; i < 50; i++) {
+    gst_harness_crank_single_clock_wait (hsrc);
+    forward_check_event (h, hsrc, GST_EVENT_CAPS);
+    gst_harness_push (h, gst_harness_pull (hsrc));      /* buffer */
+  }
+  for (i = 0; i < 25; i++)
+    gst_harness_crank_single_clock_wait (h);
+  fail_unless_equals_uint64 (gst_clock_get_time (GST_ELEMENT_CLOCK
+          (h->element)), 1000 * GST_MSECOND);
+  buffer = gst_harness_pull (h);
+  sink_handoff_float32 (NULL, buffer, NULL, GUINT_TO_POINTER (3));
+  gst_buffer_unref (buffer);
+  fail_unless_equals_int (gst_harness_buffers_received (h), 2);
+
+  for (i = 0; i < 25; i++) {
+    gst_harness_crank_single_clock_wait (hsrc);
+    forward_check_event (h, hsrc, GST_EVENT_CAPS);
+    gst_harness_push (h, gst_harness_pull (hsrc));      /* buffer */
+  }
+  for (i = 0; i < 25; i++)
+    gst_harness_crank_single_clock_wait (h);
+  fail_unless_equals_uint64 (gst_clock_get_time (GST_ELEMENT_CLOCK
+          (h->element)), 1250 * GST_MSECOND);
+  buffer = gst_harness_pull (h);
+  sink_handoff_float32 (NULL, buffer, NULL, GUINT_TO_POINTER (3));
+  gst_buffer_unref (buffer);
+  fail_unless_equals_int (gst_harness_buffers_received (h), 3);
+
+  gst_harness_push_event (h, gst_event_new_eos ());
+
+  for (i = 0; i < 25; i++)
+    gst_harness_crank_single_clock_wait (h);
+  fail_unless_equals_uint64 (gst_clock_get_time (GST_ELEMENT_CLOCK
+          (h->element)), 1500 * GST_MSECOND);
+  buffer = gst_harness_pull (h);
+  sink_handoff_float32 (NULL, buffer, NULL, GUINT_TO_POINTER (3));
+  gst_buffer_unref (buffer);
+
+  fail_unless_equals_int (gst_harness_buffers_received (h), 4);
+
+  gst_harness_teardown (h2);
+  gst_harness_teardown (h);
+  gst_harness_teardown (hsrc);
+  gst_object_unref (audiointerleave);
+}
+
+GST_END_TEST;
+
+static Suite *
+audiointerleave_suite (void)
+{
+  Suite *s = suite_create ("audiointerleave");
+  TCase *tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_set_timeout (tc_chain, 180);
+  tcase_add_test (tc_chain, test_create_and_unref);
+  tcase_add_test (tc_chain, test_request_pads);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_1eos);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_pipeline_audiointerleaved);
+  tcase_add_test (tc_chain,
+      test_audiointerleave_2ch_pipeline_non_audiointerleaved);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_pipeline_input_chanpos);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_pipeline_custom_chanpos);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_pipeline_no_chanpos);
+  tcase_add_test (tc_chain, test_audiointerleave_2ch_smallbuf);
+
+  return s;
+}
+
+GST_CHECK_MAIN (audiointerleave);
diff --git a/tests/check/elements/audiomixer.c b/tests/check/elements/audiomixer.c
index 1d1b091..55ea92e 100644
--- a/tests/check/elements/audiomixer.c
+++ b/tests/check/elements/audiomixer.c
@@ -33,7 +33,10 @@
 
 #include <gst/check/gstcheck.h>
 #include <gst/check/gstconsistencychecker.h>
+#include <gst/audio/audio.h>
 #include <gst/base/gstbasesrc.h>
+#include <gst/controller/gstdirectcontrolbinding.h>
+#include <gst/controller/gstinterpolationcontrolsource.h>
 
 static GMainLoop *main_loop;
 
@@ -86,9 +89,10 @@
   GstPad *pad;
 
   filter_caps = gst_caps_new_simple ("audio/x-raw",
-      "format", G_TYPE_STRING, "F32LE",
+      "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
       "layout", G_TYPE_STRING, "interleaved",
-      "rate", G_TYPE_INT, 44100, "channels", G_TYPE_INT, 1, NULL);
+      "rate", G_TYPE_INT, 44100, "channels", G_TYPE_INT, 1,
+      "channel-mask", GST_TYPE_BITMASK, (guint64) 0x04, NULL);
 
   /* build pipeline */
   pipeline = gst_pipeline_new ("pipeline");
@@ -586,10 +590,12 @@
 /* test failing seeks on live-sources */
 GST_START_TEST (test_live_seeking)
 {
-  GstElement *bin, *src1 = NULL, *src2, *ac1, *ac2, *audiomixer, *sink;
+  GstElement *bin, *src1 = NULL, *cf, *src2, *audiomixer, *sink;
+  GstCaps *caps;
   GstBus *bus;
   gboolean res;
   GstPad *srcpad;
+  GstPad *sinkpad;
   gint i;
   GstStateChangeReturn state_res;
   GstStreamConsistency *consist;
@@ -622,26 +628,44 @@
     g_object_set (src1, "num-buffers", 4, "blocksize", 44100, NULL);
   }
 
-  ac1 = gst_element_factory_make ("audioconvert", "ac1");
-  src2 = gst_element_factory_make ("audiotestsrc", "src2");
-  g_object_set (src2, "wave", 4, NULL); /* silence */
-  ac2 = gst_element_factory_make ("audioconvert", "ac2");
   audiomixer = gst_element_factory_make ("audiomixer", "audiomixer");
+  cf = gst_element_factory_make ("capsfilter", "capsfilter");
   sink = gst_element_factory_make ("fakesink", "sink");
-  gst_bin_add_many (GST_BIN (bin), src1, ac1, src2, ac2, audiomixer, sink,
-      NULL);
 
-  res = gst_element_link (src1, ac1);
+  gst_bin_add_many (GST_BIN (bin), src1, cf, audiomixer, sink, NULL);
+  res = gst_element_link (src1, cf);
   fail_unless (res == TRUE, NULL);
-  res = gst_element_link (ac1, audiomixer);
-  fail_unless (res == TRUE, NULL);
-  res = gst_element_link (src2, ac2);
-  fail_unless (res == TRUE, NULL);
-  res = gst_element_link (ac2, audiomixer);
+  res = gst_element_link (cf, audiomixer);
   fail_unless (res == TRUE, NULL);
   res = gst_element_link (audiomixer, sink);
   fail_unless (res == TRUE, NULL);
 
+  gst_element_set_state (bin, GST_STATE_PLAYING);
+  /* 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);
+
+  sinkpad = gst_element_get_static_pad (sink, "sink");
+  fail_unless (sinkpad != NULL);
+  caps = gst_pad_get_current_caps (sinkpad);
+  fail_unless (caps != NULL);
+  gst_object_unref (sinkpad);
+
+  gst_element_set_state (bin, GST_STATE_NULL);
+
+  g_object_set (cf, "caps", caps, NULL);
+
+  src2 = gst_element_factory_make ("audiotestsrc", "src2");
+  g_object_set (src2, "wave", 4, NULL); /* silence */
+  gst_bin_add (GST_BIN (bin), src2);
+
+  res = gst_element_link_filtered (src2, audiomixer, caps);
+  fail_unless (res == TRUE, NULL);
+
+  gst_caps_unref (caps);
+
   play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
       GST_SEEK_FLAG_FLUSH,
       GST_SEEK_TYPE_SET, (GstClockTime) 0,
@@ -870,11 +894,16 @@
 
 
 static GstBuffer *handoff_buffer = NULL;
+
 static void
 handoff_buffer_cb (GstElement * fakesink, GstBuffer * buffer, GstPad * pad,
     gpointer user_data)
 {
-  GST_DEBUG ("got buffer %p", buffer);
+  GST_DEBUG ("got buffer -- SIZE: %" G_GSIZE_FORMAT
+      " -- %p DURATION is %" GST_TIME_FORMAT,
+      gst_buffer_get_size (buffer), buffer,
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer)));
+
   gst_buffer_replace (&handoff_buffer, buffer);
 }
 
@@ -891,6 +920,7 @@
   GstEvent *event;
   GstBuffer *buffer;
   GstCaps *caps;
+  GstQuery *drain = gst_query_new_drain ();
 
   GST_INFO ("preparing test");
 
@@ -925,11 +955,7 @@
   gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
 
   caps = gst_caps_new_simple ("audio/x-raw",
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-      "format", G_TYPE_STRING, "S16BE",
-#else
-      "format", G_TYPE_STRING, "S16LE",
-#endif
+      "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
       "layout", G_TYPE_STRING, "interleaved",
       "rate", G_TYPE_INT, 44100, "channels", G_TYPE_INT, 2, NULL);
 
@@ -948,18 +974,32 @@
   buffer = gst_buffer_new_and_alloc (44100);
   GST_BUFFER_TIMESTAMP (buffer) = 0;
   GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
-  GST_DEBUG ("pushing buffer %p", buffer);
+  GST_DEBUG ("pushing buffer %p END is %" GST_TIME_FORMAT,
+      buffer,
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer)));
   ret = gst_pad_chain (sinkpad, buffer);
   ck_assert_int_eq (ret, GST_FLOW_OK);
+
+  /* The aggregation is done in a dedicated thread, so we can't
+   * know when it is actually going to happen, so we use a DRAIN query
+   * to wait for it to complete.
+   */
+  gst_pad_query (sinkpad, drain);
   fail_unless (handoff_buffer == NULL);
 
   /* should be partially clipped */
   buffer = gst_buffer_new_and_alloc (44100);
   GST_BUFFER_TIMESTAMP (buffer) = 900 * GST_MSECOND;
   GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
-  GST_DEBUG ("pushing buffer %p", buffer);
+
+  GST_DEBUG ("pushing buffer %p START %" GST_TIME_FORMAT " -- DURATION is %"
+      GST_TIME_FORMAT, buffer, GST_TIME_ARGS (GST_BUFFER_PTS (buffer)),
+      GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)));
+
   ret = gst_pad_chain (sinkpad, buffer);
   ck_assert_int_eq (ret, GST_FLOW_OK);
+  gst_pad_query (sinkpad, drain);
+
   fail_unless (handoff_buffer != NULL);
   gst_buffer_replace (&handoff_buffer, NULL);
 
@@ -967,19 +1007,28 @@
   buffer = gst_buffer_new_and_alloc (44100);
   GST_BUFFER_TIMESTAMP (buffer) = 1 * GST_SECOND;
   GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
-  GST_DEBUG ("pushing buffer %p", buffer);
+
+  GST_DEBUG ("pushing buffer %p END is %" GST_TIME_FORMAT,
+      buffer,
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer)));
   ret = gst_pad_chain (sinkpad, buffer);
   ck_assert_int_eq (ret, GST_FLOW_OK);
+  gst_pad_query (sinkpad, drain);
   fail_unless (handoff_buffer != NULL);
   gst_buffer_replace (&handoff_buffer, NULL);
+  fail_unless (handoff_buffer == NULL);
 
   /* should be clipped and ok */
+
   buffer = gst_buffer_new_and_alloc (44100);
   GST_BUFFER_TIMESTAMP (buffer) = 2 * GST_SECOND;
   GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
-  GST_DEBUG ("pushing buffer %p", buffer);
+  GST_DEBUG ("pushing buffer %p END is %" GST_TIME_FORMAT,
+      buffer,
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer) + GST_BUFFER_DURATION (buffer)));
   ret = gst_pad_chain (sinkpad, buffer);
   ck_assert_int_eq (ret, GST_FLOW_OK);
+  gst_pad_query (sinkpad, drain);
   fail_unless (handoff_buffer == NULL);
 
   gst_element_release_request_pad (audiomixer, sinkpad);
@@ -988,6 +1037,7 @@
   gst_bus_remove_signal_watch (bus);
   gst_object_unref (bus);
   gst_object_unref (bin);
+  gst_query_unref (drain);
 }
 
 GST_END_TEST;
@@ -1207,7 +1257,7 @@
 GST_START_TEST (test_flush_start_flush_stop)
 {
   GstPadTemplate *sink_template;
-  GstPad *tmppad, *sinkpad1, *sinkpad2, *audiomixer_src;
+  GstPad *tmppad, *srcpad1, *sinkpad1, *sinkpad2, *audiomixer_src;
   GstElement *pipeline, *src1, *src2, *audiomixer, *sink;
 
   GST_INFO ("preparing test");
@@ -1227,9 +1277,8 @@
       "sink_%u");
   fail_unless (GST_IS_PAD_TEMPLATE (sink_template));
   sinkpad1 = gst_element_request_pad (audiomixer, sink_template, NULL, NULL);
-  tmppad = gst_element_get_static_pad (src1, "src");
-  gst_pad_link (tmppad, sinkpad1);
-  gst_object_unref (tmppad);
+  srcpad1 = gst_element_get_static_pad (src1, "src");
+  gst_pad_link (srcpad1, sinkpad1);
 
   sinkpad2 = gst_element_request_pad (audiomixer, sink_template, NULL, NULL);
   tmppad = gst_element_get_static_pad (src2, "src");
@@ -1245,15 +1294,22 @@
   audiomixer_src = gst_element_get_static_pad (audiomixer, "src");
   fail_if (GST_PAD_IS_FLUSHING (audiomixer_src));
   gst_pad_send_event (sinkpad1, gst_event_new_flush_start ());
-  fail_unless (GST_PAD_IS_FLUSHING (audiomixer_src));
-  gst_pad_send_event (sinkpad1, gst_event_new_flush_stop (TRUE));
   fail_if (GST_PAD_IS_FLUSHING (audiomixer_src));
+  fail_unless (GST_PAD_IS_FLUSHING (sinkpad1));
+  /* Hold the streamlock to make sure the flush stop is not between
+     the attempted push of a segment event and of the following buffer. */
+  GST_PAD_STREAM_LOCK (srcpad1);
+  gst_pad_send_event (sinkpad1, gst_event_new_flush_stop (TRUE));
+  GST_PAD_STREAM_UNLOCK (srcpad1);
+  fail_if (GST_PAD_IS_FLUSHING (audiomixer_src));
+  fail_if (GST_PAD_IS_FLUSHING (sinkpad1));
   gst_object_unref (audiomixer_src);
 
   gst_element_release_request_pad (audiomixer, sinkpad1);
   gst_object_unref (sinkpad1);
   gst_element_release_request_pad (audiomixer, sinkpad2);
   gst_object_unref (sinkpad2);
+  gst_object_unref (srcpad1);
 
   /* cleanup */
   gst_element_set_state (pipeline, GST_STATE_NULL);
@@ -1309,7 +1365,7 @@
   queue1 = gst_element_factory_make ("queue", "queue1");
   queue2 = gst_element_factory_make ("queue", "queue2");
   audiomixer = gst_element_factory_make ("audiomixer", "audiomixer");
-  g_object_set (audiomixer, "blocksize", 500, NULL);
+  g_object_set (audiomixer, "output-buffer-duration", 500 * GST_MSECOND, NULL);
   sink = gst_element_factory_make ("fakesink", "sink");
   g_object_set (sink, "signal-handoffs", TRUE, NULL);
   g_signal_connect (sink, "handoff", (GCallback) handoff_buffer_collect_cb,
@@ -1345,11 +1401,7 @@
   gst_pad_send_event (queue2_sinkpad, gst_event_new_stream_start ("test"));
 
   caps = gst_caps_new_simple ("audio/x-raw",
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-      "format", G_TYPE_STRING, "S16BE",
-#else
-      "format", G_TYPE_STRING, "S16LE",
-#endif
+      "format", G_TYPE_STRING, GST_AUDIO_NE (S16),
       "layout", G_TYPE_STRING, "interleaved",
       "rate", G_TYPE_INT, 1000, "channels", G_TYPE_INT, 1, NULL);
 
@@ -1725,6 +1777,139 @@
 
 GST_END_TEST;
 
+GST_START_TEST (test_segment_base_handling)
+{
+  GstElement *pipeline, *sink, *mix, *src1, *src2;
+  GstPad *srcpad, *sinkpad;
+  GstClockTime end_time;
+  GstSample *last_sample = NULL;
+  GstSample *sample;
+  GstBuffer *buf;
+  GstCaps *caps;
+
+  caps = gst_caps_new_simple ("audio/x-raw", "rate", G_TYPE_INT, 44100,
+      "channels", G_TYPE_INT, 2, NULL);
+
+  pipeline = gst_pipeline_new ("pipeline");
+  mix = gst_element_factory_make ("audiomixer", "audiomixer");
+  sink = gst_element_factory_make ("appsink", "sink");
+  g_object_set (sink, "caps", caps, "sync", FALSE, NULL);
+  gst_caps_unref (caps);
+  src1 = gst_element_factory_make ("audiotestsrc", "src1");
+  g_object_set (src1, "samplesperbuffer", 4410, "num-buffers", 50, NULL);
+  src2 = gst_element_factory_make ("audiotestsrc", "src2");
+  g_object_set (src2, "samplesperbuffer", 4410, "num-buffers", 50, NULL);
+  gst_bin_add_many (GST_BIN (pipeline), src1, src2, mix, sink, NULL);
+  fail_unless (gst_element_link (mix, sink));
+
+  srcpad = gst_element_get_static_pad (src1, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_1");
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  srcpad = gst_element_get_static_pad (src2, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_2");
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_pad_set_offset (sinkpad, 5 * GST_SECOND);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  do {
+    g_signal_emit_by_name (sink, "pull-sample", &sample);
+    if (sample == NULL)
+      break;
+    if (last_sample)
+      gst_sample_unref (last_sample);
+    last_sample = sample;
+  } while (TRUE);
+
+  buf = gst_sample_get_buffer (last_sample);
+  end_time = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf);
+  fail_unless_equals_int64 (end_time, 10 * GST_SECOND);
+  gst_sample_unref (last_sample);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static void
+set_pad_volume_fade (GstPad * pad, GstClockTime start, gdouble start_value,
+    GstClockTime end, gdouble end_value)
+{
+  GstControlSource *cs;
+  GstTimedValueControlSource *tvcs;
+
+  cs = gst_interpolation_control_source_new ();
+  fail_unless (gst_object_add_control_binding (GST_OBJECT_CAST (pad),
+          gst_direct_control_binding_new_absolute (GST_OBJECT_CAST (pad),
+              "volume", cs)));
+
+  /* set volume interpolation mode */
+  g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
+
+  tvcs = (GstTimedValueControlSource *) cs;
+  fail_unless (gst_timed_value_control_source_set (tvcs, start, start_value));
+  fail_unless (gst_timed_value_control_source_set (tvcs, end, end_value));
+  gst_object_unref (cs);
+}
+
+GST_START_TEST (test_sinkpad_property_controller)
+{
+  GstBus *bus;
+  GstMessage *msg;
+  GstElement *pipeline, *sink, *mix, *src1;
+  GstPad *srcpad, *sinkpad;
+  GError *error = NULL;
+  gchar *debug;
+
+  pipeline = gst_pipeline_new ("pipeline");
+  mix = gst_element_factory_make ("audiomixer", "audiomixer");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  src1 = gst_element_factory_make ("audiotestsrc", "src1");
+  g_object_set (src1, "num-buffers", 100, NULL);
+  gst_bin_add_many (GST_BIN (pipeline), src1, mix, sink, NULL);
+  fail_unless (gst_element_link (mix, sink));
+
+  srcpad = gst_element_get_static_pad (src1, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_0");
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  set_pad_volume_fade (sinkpad, 0, 0, 1.0, 2.0);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
+      GST_MESSAGE_EOS | GST_MESSAGE_ERROR);
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_ERROR:
+      gst_message_parse_error (msg, &error, &debug);
+      g_printerr ("ERROR from element %s: %s\n",
+          GST_OBJECT_NAME (msg->src), error->message);
+      g_printerr ("Debug info: %s\n", debug);
+      g_error_free (error);
+      g_free (debug);
+      break;
+    case GST_MESSAGE_EOS:
+      break;
+    default:
+      g_assert_not_reached ();
+  }
+  gst_message_unref (msg);
+  g_object_unref (bus);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
 static Suite *
 audiomixer_suite (void)
 {
@@ -1748,6 +1933,8 @@
   tcase_add_test (tc_chain, test_sync);
   tcase_add_test (tc_chain, test_sync_discont);
   tcase_add_test (tc_chain, test_sync_unaligned);
+  tcase_add_test (tc_chain, test_segment_base_handling);
+  tcase_add_test (tc_chain, test_sinkpad_property_controller);
 
   /* Use a longer timeout */
 #ifdef HAVE_VALGRIND
diff --git a/tests/check/elements/camerabin.c b/tests/check/elements/camerabin.c
index 0061606..3458cac 100644
--- a/tests/check/elements/camerabin.c
+++ b/tests/check/elements/camerabin.c
@@ -32,6 +32,8 @@
 #include <gst/video/video.h>
 #include <gst/check/gstcheck.h>
 #include <gst/basecamerabinsrc/gstbasecamerasrc.h>
+#include <gst/base/gstpushsrc.h>
+#include <gst/interfaces/photography.h>
 #include <gst/pbutils/encoding-profile.h>
 
 #define IMAGE_FILENAME "image"
@@ -42,6 +44,11 @@
 #define VIDEO_PAD_SUPPORTED_CAPS "video/x-raw, format=RGB, width=600, height=480"
 #define IMAGE_PAD_SUPPORTED_CAPS "video/x-raw, format=RGB, width=800, height=600"
 
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw, format=RGB"));
+
 static GstStaticPadTemplate vfsrc_template =
 GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME,
     GST_PAD_SRC,
@@ -67,10 +74,6 @@
   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TEST_CAMERA_SRC,GstTestCameraSrc))
 #define GST_TEST_CAMERA_SRC_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TEST_CAMERA_SRC,GstTestCameraSrcClass))
-#define GST_IS_TEST_REVERSE_NEGOTIATION_SINK(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TEST_CAMERA_SRC))
-#define GST_IS_TEST_REVERSE_NEGOTIATION_SINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TEST_CAMERA_SRC))
 #define GST_TEST_CAMERA_SRC_CAST(obj) ((GstTestCameraSrc *)obj)
 
 typedef struct _GstTestCameraSrc GstTestCameraSrc;
@@ -93,7 +96,6 @@
 
 GType gst_test_camera_src_get_type (void);
 
-#define gst_test_camera_src_parent_class parent_class
 G_DEFINE_TYPE (GstTestCameraSrc, gst_test_camera_src, GST_TYPE_BASE_CAMERA_SRC);
 
 static gboolean
@@ -201,8 +203,244 @@
 
 /* end of custom test camera src element */
 
+/* custom video source element that implements GstPhotography iface */
+
+#define GST_TYPE_TEST_VIDEO_SRC \
+  (gst_test_video_src_get_type())
+#define GST_TEST_VIDEO_SRC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TEST_VIDEO_SRC,GstTestVideoSrc))
+#define GST_TEST_VIDEO_SRC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TEST_VIDEO_SRC,GstTestVideoSrcClass))
+#define GST_TEST_VIDEO_SRC_CAST(obj) ((GstTestVideoSrc *)obj)
+
+typedef struct _GstTestVideoSrc GstTestVideoSrc;
+typedef struct _GstTestVideoSrcClass GstTestVideoSrcClass;
+struct _GstTestVideoSrc
+{
+  GstPushSrc element;
+
+  gint width, height;
+  GstCaps *caps;
+
+  /* if TRUE, this element will only output resolutions with       *
+   * same width and height (square frames). This allows us testing *
+   * extra cropping feature with GstPhotography interface captures */
+  gboolean enable_resolution_restriction;
+};
+
+struct _GstTestVideoSrcClass
+{
+  GstPushSrcClass parent_class;
+};
+
+GType gst_test_video_src_get_type (void);
+
+enum
+{
+  PROP_0,
+  PROP_WB_MODE,
+  PROP_COLOR_TONE,
+  PROP_SCENE_MODE,
+  PROP_FLASH_MODE,
+  PROP_FLICKER_MODE,
+  PROP_FOCUS_MODE,
+  PROP_CAPABILITIES,
+  PROP_EV_COMP,
+  PROP_ISO_SPEED,
+  PROP_APERTURE,
+  PROP_EXPOSURE_TIME,
+  PROP_IMAGE_PREVIEW_SUPPORTED_CAPS,
+  PROP_IMAGE_CAPTURE_SUPPORTED_CAPS,
+  PROP_ZOOM,
+  PROP_COLOR_TEMPERATURE,
+  PROP_WHITE_POINT,
+  PROP_ANALOG_GAIN,
+  PROP_LENS_FOCUS,
+  PROP_MIN_EXPOSURE_TIME,
+  PROP_MAX_EXPORURE_TIME,
+  PROP_NOISE_REDUCTION
+};
+
+static gboolean
+gst_test_video_src_prepare_for_capture (GstPhotography * photo,
+    GstPhotographyCapturePrepared func, GstCaps * capture_caps,
+    gpointer user_data)
+{
+  GstCaps *caps;
+  GstTestVideoSrc *testvideosrc = GST_TEST_VIDEO_SRC (photo);
+
+  if (testvideosrc->enable_resolution_restriction) {
+    GstStructure *str = gst_caps_get_structure (capture_caps, 0);
+    gint width, height;
+
+    gst_structure_get_int (str, "width", &width);
+    gst_structure_get_int (str, "height", &height);
+
+    width = height = MAX (width, height);
+    str = gst_structure_copy (str);
+    gst_structure_set (str, "width", G_TYPE_INT, width, "height", G_TYPE_INT,
+        height, NULL);
+    caps = gst_caps_new_full (str, NULL);
+    caps = gst_caps_fixate (caps);
+    fail_unless (testvideosrc->caps == NULL);
+    testvideosrc->caps = gst_caps_ref (caps);
+  } else {
+    caps = gst_caps_ref (capture_caps);
+  }
+
+  func (user_data, caps);
+  gst_caps_unref (caps);
+  return TRUE;
+}
+
+static void
+gst_test_video_src_photography_init (gpointer g_iface, gpointer iface_data)
+{
+  GstPhotographyInterface *iface = g_iface;
+
+  iface->prepare_for_capture = gst_test_video_src_prepare_for_capture;
+}
+
+G_DEFINE_TYPE_WITH_CODE (GstTestVideoSrc, gst_test_video_src, GST_TYPE_PUSH_SRC,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_PHOTOGRAPHY,
+        gst_test_video_src_photography_init));
+
+static void
+gst_test_video_src_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  /* don't care */
+}
+
+static void
+gst_test_video_src_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  /* don't care */
+}
+
+static gboolean
+gst_test_video_src_set_caps (GstBaseSrc * src, GstCaps * caps)
+{
+  GstTestVideoSrc *self = GST_TEST_VIDEO_SRC (src);
+  GstStructure *structure = gst_caps_get_structure (caps, 0);
+
+
+  fail_unless (gst_structure_get_int (structure, "width", &self->width));
+  fail_unless (gst_structure_get_int (structure, "height", &self->height));
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_test_video_src_alloc (GstPushSrc * src, GstBuffer ** buf)
+{
+  GstTestVideoSrc *self = GST_TEST_VIDEO_SRC (src);
+  guint8 *data;
+  gsize data_size;
+
+  if (self->caps) {
+    gst_base_src_set_caps (GST_BASE_SRC (self), self->caps);
+    gst_caps_unref (self->caps);
+    self->caps = NULL;
+  }
+
+  data_size = self->width * self->height * 3;   /* RGB size */
+  data = g_malloc (data_size);
+  *buf = gst_buffer_new_wrapped (data, data_size);
+
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_test_video_src_fill (GstPushSrc * src, GstBuffer * buf)
+{
+  /* NOP */
+  return GST_FLOW_OK;
+}
+
+static void
+gst_test_video_src_class_init (GstTestVideoSrcClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
+  GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass);
+  GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass);
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "Test Camera Video Src",
+      "Video/Src",
+      "Test camera video src", "Thiago Santos <thiagoss@osg.samsung.com>");
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_template));
+
+  gobject_class->get_property = gst_test_video_src_get_property;
+  gobject_class->set_property = gst_test_video_src_set_property;
+
+  gstbasesrc_class->set_caps = gst_test_video_src_set_caps;
+  gstpushsrc_class->alloc = gst_test_video_src_alloc;
+  gstpushsrc_class->fill = gst_test_video_src_fill;
+
+  /* photography interface properties */
+  g_object_class_override_property (gobject_class, PROP_WB_MODE,
+      GST_PHOTOGRAPHY_PROP_WB_MODE);
+  g_object_class_override_property (gobject_class, PROP_COLOR_TONE,
+      GST_PHOTOGRAPHY_PROP_COLOR_TONE);
+  g_object_class_override_property (gobject_class, PROP_SCENE_MODE,
+      GST_PHOTOGRAPHY_PROP_SCENE_MODE);
+  g_object_class_override_property (gobject_class, PROP_FLASH_MODE,
+      GST_PHOTOGRAPHY_PROP_FLASH_MODE);
+  g_object_class_override_property (gobject_class, PROP_FLICKER_MODE,
+      GST_PHOTOGRAPHY_PROP_FLICKER_MODE);
+  g_object_class_override_property (gobject_class, PROP_FOCUS_MODE,
+      GST_PHOTOGRAPHY_PROP_FOCUS_MODE);
+  g_object_class_override_property (gobject_class, PROP_CAPABILITIES,
+      GST_PHOTOGRAPHY_PROP_CAPABILITIES);
+  g_object_class_override_property (gobject_class, PROP_EV_COMP,
+      GST_PHOTOGRAPHY_PROP_EV_COMP);
+  g_object_class_override_property (gobject_class, PROP_ISO_SPEED,
+      GST_PHOTOGRAPHY_PROP_ISO_SPEED);
+  g_object_class_override_property (gobject_class, PROP_APERTURE,
+      GST_PHOTOGRAPHY_PROP_APERTURE);
+  g_object_class_override_property (gobject_class, PROP_EXPOSURE_TIME,
+      GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME);
+  g_object_class_override_property (gobject_class,
+      PROP_IMAGE_PREVIEW_SUPPORTED_CAPS,
+      GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS);
+  g_object_class_override_property (gobject_class,
+      PROP_IMAGE_CAPTURE_SUPPORTED_CAPS,
+      GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS);
+  g_object_class_override_property (gobject_class, PROP_ZOOM,
+      GST_PHOTOGRAPHY_PROP_ZOOM);
+  g_object_class_override_property (gobject_class, PROP_COLOR_TEMPERATURE,
+      GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE);
+  g_object_class_override_property (gobject_class, PROP_WHITE_POINT,
+      GST_PHOTOGRAPHY_PROP_WHITE_POINT);
+  g_object_class_override_property (gobject_class, PROP_ANALOG_GAIN,
+      GST_PHOTOGRAPHY_PROP_ANALOG_GAIN);
+  g_object_class_override_property (gobject_class, PROP_LENS_FOCUS,
+      GST_PHOTOGRAPHY_PROP_LENS_FOCUS);
+  g_object_class_override_property (gobject_class, PROP_MIN_EXPOSURE_TIME,
+      GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME);
+  g_object_class_override_property (gobject_class, PROP_MAX_EXPORURE_TIME,
+      GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME);
+  g_object_class_override_property (gobject_class, PROP_NOISE_REDUCTION,
+      GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION);
+}
+
+static void
+gst_test_video_src_init (GstTestVideoSrc * self)
+{
+  gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
+}
+
+/* end of custom test camera src element */
+/* end of custom video source element that implements GstPhotography iface */
+
 
 static GstElement *camera;
+static GstElement *testsrc;
 static guint bus_source;
 static GMainLoop *main_loop;
 static gint capture_count = 0;
@@ -399,9 +637,30 @@
 }
 
 static void
-setup_wrappercamerabinsrc_videotestsrc (void)
+setup_camerabin_common (void)
 {
   GstBus *bus;
+  test_id = g_random_int ();
+  bus_source = 0;
+
+  main_loop = g_main_loop_new (NULL, TRUE);
+
+  camera = gst_check_setup_element ("camerabin");
+  fail_unless (camera != NULL, "failed to create camerabin element");
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (camera));
+  bus_source = gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop);
+  gst_object_unref (bus);
+
+  tags_found = NULL;
+  capture_count = 0;
+  image_filename = make_test_file_name (IMAGE_FILENAME, -1);
+  video_filename = make_test_file_name (VIDEO_FILENAME, -1);
+}
+
+static void
+setup_wrappercamerabinsrc_videotestsrc (void)
+{
   GstElement *vfbin;
   GstElement *fakevideosink;
   GstElement *src;
@@ -410,13 +669,8 @@
 
   GST_INFO ("init");
 
-  test_id = g_random_int ();
-  bus_source = 0;
+  setup_camerabin_common ();
 
-  main_loop = g_main_loop_new (NULL, TRUE);
-
-  camera = gst_check_setup_element ("camerabin");
-  fail_unless (camera != NULL, "failed to create camerabin element");
   fakevideosink = gst_element_factory_make ("fakesink", NULL);
   fail_unless (fakevideosink != NULL, "failed to create fakesink element");
   src = gst_element_factory_make ("wrappercamerabinsrc", NULL);
@@ -443,14 +697,46 @@
   gst_object_unref (vfbin);
   gst_object_unref (fakevideosink);
 
-  bus = gst_pipeline_get_bus (GST_PIPELINE (camera));
-  bus_source = gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop);
-  gst_object_unref (bus);
+  GST_INFO ("init finished");
+}
 
-  tags_found = NULL;
-  capture_count = 0;
-  image_filename = make_test_file_name (IMAGE_FILENAME, -1);
-  video_filename = make_test_file_name (VIDEO_FILENAME, -1);
+static void
+setup_test_camerasrc (void)
+{
+  GstElement *vfbin;
+  GstElement *fakevideosink;
+  GstElement *src;
+  GstElement *audiosrc;
+
+  GST_INFO ("init");
+
+  setup_camerabin_common ();
+
+  fakevideosink = gst_element_factory_make ("fakesink", NULL);
+  fail_unless (fakevideosink != NULL, "failed to create fakesink element");
+  src = gst_element_factory_make ("wrappercamerabinsrc", NULL);
+  fail_unless (src != NULL, "failed to create wrappercamerabinsrc element");
+  testsrc = g_object_new (GST_TYPE_TEST_VIDEO_SRC, NULL);
+  fail_unless (testsrc != NULL, "failed to create testvideosrc element");
+  g_object_set (testsrc, "name", "testsrc", NULL);
+  audiosrc = gst_element_factory_make ("audiotestsrc", NULL);
+  fail_unless (audiosrc != NULL, "failed to create audiotestsrc element");
+
+  preview_caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT,
+      320, "height", G_TYPE_INT, 240, NULL);
+
+  g_object_set (G_OBJECT (audiosrc), "is-live", TRUE, NULL);
+  g_object_set (G_OBJECT (src), "video-source", testsrc, NULL);
+  g_object_set (G_OBJECT (camera), "camera-source", src, "preview-caps",
+      preview_caps, "post-previews", TRUE, "audio-source", audiosrc, NULL);
+  gst_object_unref (src);
+  gst_object_unref (testsrc);
+  gst_object_unref (audiosrc);
+
+  vfbin = gst_bin_get_by_name (GST_BIN (camera), "vf-bin");
+  g_object_set (G_OBJECT (vfbin), "video-sink", fakevideosink, NULL);
+  gst_object_unref (vfbin);
+  gst_object_unref (fakevideosink);
 
   GST_INFO ("init finished");
 }
@@ -707,7 +993,8 @@
   fail_unless (idle);
 }
 
-GST_START_TEST (test_single_image_capture)
+static void
+run_single_image_capture_test (GstCaps * viewfinder_caps, GstCaps * image_caps)
 {
   gboolean idle;
   GstMessage *msg;
@@ -717,6 +1004,11 @@
   /* set still image mode */
   g_object_set (camera, "mode", 1, "location", image_filename, NULL);
 
+  if (viewfinder_caps)
+    g_object_set (camera, "viewfinder-caps", viewfinder_caps, NULL);
+  if (image_caps)
+    g_object_set (camera, "image-capture-caps", image_caps, NULL);
+
   if (gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING) ==
       GST_STATE_CHANGE_FAILURE) {
     GST_WARNING ("setting camerabin to PLAYING failed");
@@ -743,6 +1035,27 @@
   remove_file (image_filename, 0);
 }
 
+GST_START_TEST (test_single_image_capture)
+{
+  run_single_image_capture_test (NULL, NULL);
+}
+
+GST_END_TEST;
+
+
+/* Verify that incompatible caps can be used in viewfinder and image capture
+ * at the same time */
+GST_START_TEST (test_single_image_capture_with_different_caps)
+{
+  GstCaps *vf_caps =
+      gst_caps_from_string ("video/x-raw, width=480, height=320");
+  GstCaps *img_caps =
+      gst_caps_from_string ("video/x-raw, width=800, height=600");
+  run_single_image_capture_test (vf_caps, img_caps);
+  gst_caps_unref (vf_caps);
+  gst_caps_unref (img_caps);
+}
+
 GST_END_TEST;
 
 
@@ -1566,6 +1879,39 @@
 GST_END_TEST;
 
 
+GST_START_TEST (test_photography_iface_image_capture)
+{
+  run_single_image_capture_test (NULL, NULL);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_photography_iface_image_capture_with_caps)
+{
+  GstCaps *caps = gst_caps_from_string ("video/x-raw, width=800, height=600");
+
+  run_single_image_capture_test (NULL, caps);
+  gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_photography_iface_image_capture_with_caps_and_restriction)
+{
+  GstCaps *caps = gst_caps_from_string ("video/x-raw, width=800, height=600");
+
+  /* the source will actually provide an image with 800x800 resolution */
+  GST_TEST_VIDEO_SRC (testsrc)->enable_resolution_restriction = TRUE;
+
+  run_single_image_capture_test (NULL, caps);
+  gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+
 typedef struct _TestCaseDef
 {
   const gchar *name;
@@ -1583,6 +1929,7 @@
   Suite *s = suite_create ("camerabin");
   gint i;
   TCase *tc_generic = tcase_create ("generic");
+  TCase *tc_phography_iface = tcase_create ("photography-iface");
 
   jpegenc_factory = gst_element_factory_find ("jpegenc");
   if (jpegenc_factory == NULL) {
@@ -1604,14 +1951,10 @@
     tcase_add_checked_fixture (tc_basic, tests[i].setup_func, teardown);
 
     tcase_add_test (tc_basic, test_single_image_capture);
+    tcase_add_test (tc_basic, test_single_image_capture_with_different_caps);
     tcase_add_test (tc_basic, test_single_video_recording);
     tcase_add_test (tc_basic, test_image_video_cycle);
-    if (gst_plugin_feature_check_version ((GstPluginFeature *) jpegenc_factory,
-            0, 10, 27))
-      tcase_add_test (tc_basic, test_multiple_image_captures);
-    else
-      GST_WARNING ("Skipping image capture test because -good 0.10.27 is "
-          "needed");
+    tcase_add_test (tc_basic, test_multiple_image_captures);
     tcase_add_test (tc_basic, test_multiple_video_recordings);
 
     tcase_add_test (tc_basic, test_image_capture_previews);
@@ -1627,6 +1970,26 @@
     tcase_add_test (tc_basic, test_image_location_switching);
   }
 
+  /* This is the GstPhotography interface test case. It was added in 0.10
+   * to make it easy for integrating with hardware and providing lower
+   * delays from action to capture.
+   * There is also has a feature in wrappercamerabinsrc that allows
+   * captures with the interface to have a different(higher) resolution than
+   * requested and wrappercamerabinsrc will crop to the requested one.
+   * This doesn't make sense and seems to be very hardware specific but we
+   * can't simply remove it at this point.
+   *
+   * FIXME 2.0: revisit GstPhotography interface and its interaction with
+   * camerabin */
+  suite_add_tcase (s, tc_phography_iface);
+  tcase_add_checked_fixture (tc_phography_iface, setup_test_camerasrc,
+      teardown);
+  tcase_add_test (tc_phography_iface, test_photography_iface_image_capture);
+  tcase_add_test (tc_phography_iface,
+      test_photography_iface_image_capture_with_caps);
+  tcase_add_test (tc_phography_iface,
+      test_photography_iface_image_capture_with_caps_and_restriction);
+
 end:
   return s;
 }
diff --git a/tests/check/elements/compositor.c b/tests/check/elements/compositor.c
index 9ef52ba..ccd68a1 100644
--- a/tests/check/elements/compositor.c
+++ b/tests/check/elements/compositor.c
@@ -33,6 +33,7 @@
 
 #include <gst/check/gstcheck.h>
 #include <gst/check/gstconsistencychecker.h>
+#include <gst/video/gstvideometa.h>
 #include <gst/base/gstbasesrc.h>
 
 #define VIDEO_CAPS_STRING               \
@@ -1035,6 +1036,576 @@
 
 GST_END_TEST;
 
+GST_START_TEST (test_segment_base_handling)
+{
+  GstElement *pipeline, *sink, *mix, *src1, *src2;
+  GstPad *srcpad, *sinkpad;
+  GstClockTime end_time;
+  GstSample *last_sample = NULL;
+  GstSample *sample;
+  GstBuffer *buf;
+  GstCaps *caps;
+
+  caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, 16,
+      "height", G_TYPE_INT, 16, "framerate", GST_TYPE_FRACTION, 30, 1, NULL);
+
+  /* each source generates 5 seconds of data, src2 shifted by 5 seconds */
+  pipeline = gst_pipeline_new ("pipeline");
+  mix = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("appsink", "sink");
+  g_object_set (sink, "caps", caps, "sync", FALSE, NULL);
+  gst_caps_unref (caps);
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  g_object_set (src1, "num-buffers", 30 * 5, "pattern", 2, NULL);
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  g_object_set (src2, "num-buffers", 30 * 5, "pattern", 2, NULL);
+  gst_bin_add_many (GST_BIN (pipeline), src1, src2, mix, sink, NULL);
+  fail_unless (gst_element_link (mix, sink));
+
+  srcpad = gst_element_get_static_pad (src1, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_1");
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  srcpad = gst_element_get_static_pad (src2, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_2");
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_pad_set_offset (sinkpad, 5 * GST_SECOND);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  do {
+    g_signal_emit_by_name (sink, "pull-sample", &sample);
+    if (sample == NULL)
+      break;
+    if (last_sample)
+      gst_sample_unref (last_sample);
+    last_sample = sample;
+  } while (TRUE);
+
+  buf = gst_sample_get_buffer (last_sample);
+  end_time = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf);
+  fail_unless_equals_int64 (end_time, 10 * GST_SECOND);
+  gst_sample_unref (last_sample);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static gboolean buffer_mapped;
+static gboolean (*default_map) (GstVideoMeta * meta, guint plane,
+    GstMapInfo * info, gpointer * data, gint * stride, GstMapFlags flags);
+
+static gboolean
+test_obscured_new_videometa_map (GstVideoMeta * meta, guint plane,
+    GstMapInfo * info, gpointer * data, gint * stride, GstMapFlags flags)
+{
+  buffer_mapped = TRUE;
+  return default_map (meta, plane, info, data, stride, flags);
+}
+
+static GstPadProbeReturn
+test_obscured_pad_probe_cb (GstPad * srcpad, GstPadProbeInfo * info,
+    gpointer user_data)
+{
+  GstBuffer *obuf, *nbuf;
+  GstVideoMeta *meta;
+
+  GST_DEBUG ("pad probe called");
+  /* We need to deep-copy the buffer here because videotestsrc reuses buffers
+   * and hence the GstVideoMap associated with the buffers, and that causes a
+   * segfault inside videotestsrc when it tries to reuse the buffer */
+  obuf = GST_PAD_PROBE_INFO_BUFFER (info);
+  nbuf = gst_buffer_new ();
+  gst_buffer_copy_into (nbuf, obuf, GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP,
+      0, -1);
+  meta = gst_buffer_get_video_meta (nbuf);
+  /* Override the default map() function to set also buffer_mapped */
+  default_map = meta->map;
+  meta->map = test_obscured_new_videometa_map;
+  /* Replace the buffer that's going downstream */
+  GST_PAD_PROBE_INFO_DATA (info) = nbuf;
+  gst_buffer_unref (obuf);
+
+  return GST_PAD_PROBE_PASS;
+}
+
+static void
+_test_obscured (const gchar * caps_str, gint xpos0, gint ypos0, gint width0,
+    gint height0, gdouble alpha0, gint xpos1, gint ypos1, gint width1,
+    gint height1, gdouble alpha1, gint out_width, gint out_height)
+{
+  GstElement *pipeline, *sink, *mix, *src0, *cfilter0, *src1, *cfilter1;
+  GstElement *out_cfilter;
+  GstPad *srcpad, *sinkpad;
+  GstSample *last_sample = NULL;
+  GstSample *sample;
+  GstCaps *caps;
+
+  GST_INFO ("preparing test");
+
+  pipeline = gst_pipeline_new ("pipeline");
+  src0 = gst_element_factory_make ("videotestsrc", "src0");
+  g_object_set (src0, "num-buffers", 5, NULL);
+  cfilter0 = gst_element_factory_make ("capsfilter", "capsfilter0");
+  caps = gst_caps_from_string (caps_str);
+  g_object_set (cfilter0, "caps", caps, NULL);
+  gst_caps_unref (caps);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  g_object_set (src1, "num-buffers", 5, NULL);
+  cfilter1 = gst_element_factory_make ("capsfilter", "capsfilter1");
+  caps = gst_caps_from_string (caps_str);
+  g_object_set (cfilter1, "caps", caps, NULL);
+  gst_caps_unref (caps);
+
+  mix = gst_element_factory_make ("compositor", "compositor");
+  out_cfilter = gst_element_factory_make ("capsfilter", "out_capsfilter");
+  caps = gst_caps_from_string (caps_str);
+  if (out_width > 0)
+    gst_caps_set_simple (caps, "width", G_TYPE_INT, out_width, NULL);
+  if (out_height > 0)
+    gst_caps_set_simple (caps, "height", G_TYPE_INT, out_height, NULL);
+  g_object_set (out_cfilter, "caps", caps, NULL);
+  gst_caps_unref (caps);
+  sink = gst_element_factory_make ("appsink", "sink");
+
+  gst_bin_add_many (GST_BIN (pipeline), src0, cfilter0, src1, cfilter1, mix,
+      out_cfilter, sink, NULL);
+  fail_unless (gst_element_link (src0, cfilter0));
+  fail_unless (gst_element_link (src1, cfilter1));
+  fail_unless (gst_element_link (mix, out_cfilter));
+  fail_unless (gst_element_link (out_cfilter, sink));
+
+  srcpad = gst_element_get_static_pad (cfilter0, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_0");
+  g_object_set (sinkpad, "xpos", xpos0, "ypos", ypos0, "width", width0,
+      "height", height0, "alpha", alpha0, NULL);
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BUFFER,
+      test_obscured_pad_probe_cb, NULL, NULL);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  srcpad = gst_element_get_static_pad (cfilter1, "src");
+  sinkpad = gst_element_get_request_pad (mix, "sink_1");
+  g_object_set (sinkpad, "xpos", xpos1, "ypos", ypos1, "width", width1,
+      "height", height1, "alpha", alpha1, NULL);
+  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  GST_INFO ("sample prepared");
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  do {
+    GST_DEBUG ("sample pulling");
+    g_signal_emit_by_name (sink, "pull-sample", &sample);
+    if (sample == NULL)
+      break;
+    if (last_sample)
+      gst_sample_unref (last_sample);
+    last_sample = sample;
+    GST_DEBUG ("sample pulled");
+  } while (TRUE);
+  gst_sample_unref (last_sample);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+GST_START_TEST (test_obscured_skipped)
+{
+  gint xpos0, xpos1;
+  gint ypos0, ypos1;
+  gint width0, width1;
+  gint height0, height1;
+  gint out_width, out_height;
+  gdouble alpha0, alpha1;
+  const gchar *caps_str;
+
+  caps_str = "video/x-raw";
+  buffer_mapped = FALSE;
+  /* Set else to compositor defaults */
+  alpha0 = alpha1 = 1.0;
+  xpos0 = xpos1 = ypos0 = ypos1 = 0;
+  width0 = width1 = height0 = height1 = 0;
+  out_width = out_height = 0;
+
+  GST_INFO ("testing defaults");
+  /* With everything at defaults, sink_1 will obscure sink_0, so buffers from
+   * sink_0 will never get mapped by compositor. To verify, run with
+   * GST_DEBUG=compositor:6 and look for "Obscured by" messages */
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == FALSE);
+  buffer_mapped = FALSE;
+
+  caps_str = "video/x-raw,format=ARGB";
+  GST_INFO ("testing video with alpha channel");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  caps_str = "video/x-raw";
+  buffer_mapped = FALSE;
+
+  alpha1 = 0.0;
+  GST_INFO ("testing alpha1 = %.2g", alpha1);
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  alpha1 = 1.0;
+  buffer_mapped = FALSE;
+
+  /* Test 0.1, ..., 0.9 */
+  for (alpha1 = 1; alpha1 < 10; alpha1 += 1) {
+    GST_INFO ("testing alpha1 = %.2g", alpha1 / 10);
+    _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1,
+        ypos1, width1, height1, alpha1 / 10, out_width, out_height);
+    fail_unless (buffer_mapped == TRUE);
+  }
+  alpha1 = 1.0;
+  buffer_mapped = FALSE;
+
+  width1 = height1 = 10;
+  GST_INFO ("testing smaller sink_1");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  width1 = height1 = 0;
+  buffer_mapped = FALSE;
+
+  width0 = height0 = width1 = height1 = 10;
+  GST_INFO ("testing smaller sink_1 and sink0 (same sizes)");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == FALSE);
+  width0 = height0 = width1 = height1 = 0;
+  buffer_mapped = FALSE;
+
+  width0 = height0 = 20;
+  width1 = height1 = 10;
+  GST_INFO ("testing smaller sink_1 and sink0 (sink_0 > sink_1)");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  width0 = height0 = width1 = height1 = 0;
+  buffer_mapped = FALSE;
+
+  width0 = height0 = 10;
+  width1 = height1 = 20;
+  GST_INFO ("testing smaller sink_1 and sink0 (sink_0 < sink_1)");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == FALSE);
+  width0 = height0 = width1 = height1 = 0;
+  buffer_mapped = FALSE;
+
+  xpos0 = ypos0 = 10;
+  xpos1 = ypos1 = 20;
+  GST_INFO ("testing offset");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  xpos0 = ypos0 = xpos1 = ypos1 = 0;
+  buffer_mapped = FALSE;
+
+  xpos1 = ypos1 = 0;
+  xpos0 = ypos0 = width0 = height0 = width1 = height1 = 10;
+  out_width = out_height = 20;
+  GST_INFO ("testing bug 754107");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  xpos0 = ypos0 = xpos1 = ypos1 = width0 = height0 = width1 = height1 = 0;
+  out_width = out_height = 0;
+  buffer_mapped = FALSE;
+
+  xpos1 = -1;
+  xpos0 = ypos0 = width0 = height0 = width1 = height1 = 10;
+  out_width = out_height = 20;
+  GST_INFO ("testing bug 754576");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == TRUE);
+  xpos0 = xpos1 = ypos1 = width0 = height0 = width1 = height1 = 0;
+  out_width = out_height = 0;
+  buffer_mapped = FALSE;
+
+  xpos0 = ypos0 = 10000;
+  out_width = 320;
+  out_height = 240;
+  GST_INFO ("testing sink_0 outside the frame");
+  _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1,
+      width1, height1, alpha1, out_width, out_height);
+  fail_unless (buffer_mapped == FALSE);
+  xpos0 = ypos0 = out_width = out_height = 0;
+  buffer_mapped = FALSE;
+}
+
+GST_END_TEST;
+
+static void
+_pipeline_eos (GstBus * bus, GstMessage * message, GstPipeline * bin)
+{
+  GST_INFO ("pipeline EOS");
+  g_main_loop_quit (main_loop);
+}
+
+static GstFlowReturn
+_buffer_recvd (GstElement * appsink, gint * buffers_recvd)
+{
+  GstSample *sample;
+
+  g_signal_emit_by_name (appsink, "pull-sample", &sample);
+  ck_assert_msg (sample != NULL, "NULL sample received!");
+
+  (*buffers_recvd)++;
+  GST_INFO ("buffer recvd");
+  gst_sample_unref (sample);
+
+  if (*buffers_recvd > 5)
+    g_main_loop_quit (main_loop);
+
+  return GST_FLOW_OK;
+}
+
+GST_START_TEST (test_ignore_eos)
+{
+  gboolean res;
+  gint buffers_recvd;
+  GstPadLinkReturn link_res;
+  GstStateChangeReturn state_res;
+  GstElement *bin, *src, *compositor, *appsink;
+  GstPad *srcpad, *sinkpad;
+  GstBus *bus;
+
+  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", NULL);
+  g_object_set (src, "num-buffers", 5, NULL);
+  compositor = gst_element_factory_make ("compositor", NULL);
+  appsink = gst_element_factory_make ("appsink", NULL);
+  g_object_set (appsink, "emit-signals", TRUE, NULL);
+  gst_bin_add_many (GST_BIN (bin), src, compositor, appsink, NULL);
+
+  res = gst_element_link (compositor, appsink);
+  ck_assert_msg (res == TRUE, "Could not link compositor with appsink");
+  srcpad = gst_element_get_static_pad (src, "src");
+  sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+  /* When "ignore-eos" is set, compositor will keep sending the last buffer even
+   * after EOS, so we will receive more buffers than we sent. */
+  g_object_set (sinkpad, "ignore-eos", TRUE, NULL);
+  link_res = gst_pad_link (srcpad, sinkpad);
+  ck_assert_msg (GST_PAD_LINK_SUCCESSFUL (link_res), "videotestsrc -> "
+      "compositor pad  link failed: %i", link_res);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  GST_INFO ("pipeline built, connecting signals");
+
+  buffers_recvd = 0;
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_msg (state_res != GST_STATE_CHANGE_FAILURE, "Pipeline didn't play");
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::error", G_CALLBACK (message_received), bin);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (message_received),
+      bin);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (_pipeline_eos), bin);
+  g_signal_connect (appsink, "new-sample", G_CALLBACK (_buffer_recvd),
+      &buffers_recvd);
+
+  GST_INFO ("starting test");
+  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_msg (buffers_recvd > 5, "Did not receive more buffers"
+      " than were sent");
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+typedef struct
+{
+  gint buffers_sent;
+  GstClockTime first_pts;
+  gboolean first;
+  gboolean drop;
+} TestStartTimeSelectionData;
+
+static GstPadProbeReturn
+drop_buffer_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
+{
+  TestStartTimeSelectionData *data = user_data;
+
+  if (data->drop) {
+    data->buffers_sent = data->buffers_sent + 1;
+    if (data->buffers_sent < 4)
+      return GST_PAD_PROBE_DROP;
+  }
+
+  data->first_pts = GST_BUFFER_PTS (info->data);
+
+  return GST_PAD_PROBE_REMOVE;
+}
+
+static GstFlowReturn
+first_buffer_received_cb (GstElement * appsink, gpointer user_data)
+{
+  TestStartTimeSelectionData *data = user_data;
+  GstSample *sample;
+  GstBuffer *buffer;
+
+  g_signal_emit_by_name (appsink, "pull-sample", &sample);
+  ck_assert_msg (sample != NULL, "NULL sample received!");
+
+  buffer = gst_sample_get_buffer (sample);
+  if (!data->first) {
+    fail_unless_equals_uint64 (GST_BUFFER_PTS (buffer), 0);
+  } else {
+    fail_unless_equals_uint64 (GST_BUFFER_PTS (buffer), data->first_pts);
+  }
+
+  gst_sample_unref (sample);
+
+  g_main_loop_quit (main_loop);
+
+  return GST_FLOW_EOS;
+}
+
+static void
+run_test_start_time (gboolean first, gboolean drop, gboolean unlinked)
+{
+  gboolean res;
+  GstPadLinkReturn link_res;
+  GstStateChangeReturn state_res;
+  GstElement *bin, *src, *compositor, *appsink;
+  GstPad *srcpad, *sinkpad;
+  GstBus *bus;
+  TestStartTimeSelectionData data = { 0, GST_CLOCK_TIME_NONE, first, drop };
+
+  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", NULL);
+
+  srcpad = gst_element_get_static_pad (src, "src");
+  gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BUFFER, drop_buffer_cb, &data,
+      NULL);
+  gst_object_unref (srcpad);
+
+  g_object_set (src, "is-live", TRUE, NULL);
+  compositor = gst_element_factory_make ("compositor", NULL);
+  g_object_set (compositor, "start-time-selection", (first ? 1 : 0), NULL);
+  appsink = gst_element_factory_make ("appsink", NULL);
+  g_object_set (appsink, "emit-signals", TRUE, NULL);
+  gst_bin_add_many (GST_BIN (bin), src, compositor, appsink, NULL);
+
+  res = gst_element_link (compositor, appsink);
+  ck_assert_msg (res == TRUE, "Could not link compositor with appsink");
+  srcpad = gst_element_get_static_pad (src, "src");
+  sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+  link_res = gst_pad_link (srcpad, sinkpad);
+  ck_assert_msg (GST_PAD_LINK_SUCCESSFUL (link_res), "videotestsrc -> "
+      "compositor pad  link failed: %i", link_res);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  if (unlinked) {
+    sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+    gst_object_unref (sinkpad);
+  }
+
+  GST_INFO ("pipeline built, connecting signals");
+
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_msg (state_res != GST_STATE_CHANGE_FAILURE, "Pipeline didn't play");
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::error", G_CALLBACK (message_received), bin);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (message_received),
+      bin);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (_pipeline_eos), bin);
+  g_signal_connect (appsink, "new-sample",
+      G_CALLBACK (first_buffer_received_cb), &data);
+
+  GST_INFO ("starting test");
+  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_START_TEST (test_start_time_zero_live_drop_0)
+{
+  run_test_start_time (FALSE, FALSE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_start_time_zero_live_drop_3)
+{
+  run_test_start_time (FALSE, TRUE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_start_time_zero_live_drop_3_unlinked_1)
+{
+  run_test_start_time (FALSE, TRUE, TRUE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_start_time_first_live_drop_0)
+{
+  run_test_start_time (TRUE, FALSE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_start_time_first_live_drop_3)
+{
+  run_test_start_time (TRUE, TRUE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_start_time_first_live_drop_3_unlinked_1)
+{
+  run_test_start_time (TRUE, TRUE, TRUE);
+}
+
+GST_END_TEST;
 
 static Suite *
 compositor_suite (void)
@@ -1054,6 +1625,15 @@
   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);
+  tcase_add_test (tc_chain, test_segment_base_handling);
+  tcase_add_test (tc_chain, test_obscured_skipped);
+  tcase_add_test (tc_chain, test_ignore_eos);
+  tcase_add_test (tc_chain, test_start_time_zero_live_drop_0);
+  tcase_add_test (tc_chain, test_start_time_zero_live_drop_3);
+  tcase_add_test (tc_chain, test_start_time_zero_live_drop_3_unlinked_1);
+  tcase_add_test (tc_chain, test_start_time_first_live_drop_0);
+  tcase_add_test (tc_chain, test_start_time_first_live_drop_3);
+  tcase_add_test (tc_chain, test_start_time_first_live_drop_3_unlinked_1);
 
   /* Use a longer timeout */
 #ifdef HAVE_VALGRIND
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c
new file mode 100644
index 0000000..66b6bd7
--- /dev/null
+++ b/tests/check/elements/dash_mpd.c
@@ -0,0 +1,4564 @@
+/* GStreamer unit test for MPEG-DASH
+ *
+ * Copyright (c) <2015> YouView TV 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.
+ */
+
+#include "../../ext/dash/gstmpdparser.c"
+#undef GST_CAT_DEFAULT
+
+#include <gst/check/gstcheck.h>
+
+GST_DEBUG_CATEGORY (gst_dash_demux_debug);
+
+/*
+ * compute the number of milliseconds contained in a duration value specified by
+ * year, month, day, hour, minute, second, millisecond
+ *
+ * This function must use the same conversion algorithm implemented in
+ * gst_mpdparser_get_xml_prop_duration from gstmpdparser.c file.
+ */
+static guint64
+duration_to_ms (guint year, guint month, guint day, guint hour, guint minute,
+    guint second, guint millisecond)
+{
+  guint64 days = (guint64) year * 365 + (guint64) month * 30 + day;
+  guint64 hours = days * 24 + hour;
+  guint64 minutes = hours * 60 + minute;
+  guint64 seconds = minutes * 60 + second;
+  guint64 ms = seconds * 1000 + millisecond;
+  return ms;
+}
+
+/*
+ * Test to ensure a simple mpd file successfully parses.
+ *
+ */
+GST_START_TEST (dash_mpdparser_validsimplempd)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\"> </MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* check that unset elements with default values are properly configured */
+  assert_equals_int (mpdclient->mpd_node->type, GST_MPD_FILE_TYPE_STATIC);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing the MPD attributes.
+ *
+ */
+GST_START_TEST (dash_mpdparser_mpd)
+{
+  GstDateTime *availabilityStartTime;
+  GstDateTime *availabilityEndTime;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     schemaLocation=\"TestSchemaLocation\""
+      "     xmlns:xsi=\"TestNamespaceXSI\""
+      "     xmlns:ext=\"TestNamespaceEXT\""
+      "     id=\"testId\""
+      "     type=\"static\""
+      "     availabilityStartTime=\"2015-03-24T1:10:50\""
+      "     availabilityEndTime=\"2015-03-24T1:10:50\""
+      "     mediaPresentationDuration=\"P0Y1M2DT12H10M20.5S\""
+      "     minimumUpdatePeriod=\"P0Y1M2DT12H10M20.5S\""
+      "     minBufferTime=\"P0Y1M2DT12H10M20.5S\""
+      "     timeShiftBufferDepth=\"P0Y1M2DT12H10M20.5S\""
+      "     suggestedPresentationDelay=\"P0Y1M2DT12H10M20.5S\""
+      "     maxSegmentDuration=\"P0Y1M2DT12H10M20.5S\""
+      "     maxSubsegmentDuration=\"P0Y1M2DT12H10M20.5S\"></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  assert_equals_string (mpdclient->mpd_node->default_namespace,
+      "urn:mpeg:dash:schema:mpd:2011");
+  assert_equals_string (mpdclient->mpd_node->namespace_xsi, "TestNamespaceXSI");
+  assert_equals_string (mpdclient->mpd_node->namespace_ext, "TestNamespaceEXT");
+  assert_equals_string (mpdclient->mpd_node->schemaLocation,
+      "TestSchemaLocation");
+  assert_equals_string (mpdclient->mpd_node->id, "testId");
+
+  assert_equals_int (mpdclient->mpd_node->type, GST_MPD_FILE_TYPE_STATIC);
+
+  availabilityStartTime = mpdclient->mpd_node->availabilityStartTime;
+  assert_equals_int (gst_date_time_get_year (availabilityStartTime), 2015);
+  assert_equals_int (gst_date_time_get_month (availabilityStartTime), 3);
+  assert_equals_int (gst_date_time_get_day (availabilityStartTime), 24);
+  assert_equals_int (gst_date_time_get_hour (availabilityStartTime), 1);
+  assert_equals_int (gst_date_time_get_minute (availabilityStartTime), 10);
+  assert_equals_int (gst_date_time_get_second (availabilityStartTime), 50);
+
+  availabilityEndTime = mpdclient->mpd_node->availabilityEndTime;
+  assert_equals_int (gst_date_time_get_year (availabilityEndTime), 2015);
+  assert_equals_int (gst_date_time_get_month (availabilityEndTime), 3);
+  assert_equals_int (gst_date_time_get_day (availabilityEndTime), 24);
+  assert_equals_int (gst_date_time_get_hour (availabilityEndTime), 1);
+  assert_equals_int (gst_date_time_get_minute (availabilityEndTime), 10);
+  assert_equals_int (gst_date_time_get_second (availabilityEndTime), 50);
+
+  assert_equals_int64 (mpdclient->mpd_node->mediaPresentationDuration,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->minimumUpdatePeriod,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->minBufferTime,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->timeShiftBufferDepth,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->suggestedPresentationDelay,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->maxSegmentDuration,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  assert_equals_int64 (mpdclient->mpd_node->maxSubsegmentDuration,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing the ProgramInformation attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_programInformation)
+{
+  GstProgramInformationNode *program;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <ProgramInformation lang=\"en\""
+      "                      moreInformationURL=\"TestMoreInformationUrl\">"
+      "    <Title>TestTitle</Title>"
+      "    <Source>TestSource</Source>"
+      "    <Copyright>TestCopyright</Copyright>"
+      "  </ProgramInformation> </MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  program =
+      (GstProgramInformationNode *) mpdclient->mpd_node->ProgramInfo->data;
+  assert_equals_string (program->lang, "en");
+  assert_equals_string (program->moreInformationURL, "TestMoreInformationUrl");
+  assert_equals_string (program->Title, "TestTitle");
+  assert_equals_string (program->Source, "TestSource");
+  assert_equals_string (program->Copyright, "TestCopyright");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing the BaseURL attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_baseURL)
+{
+  GstBaseURL *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <BaseURL serviceLocation=\"TestServiceLocation\""
+      "     byteRange=\"TestByteRange\">TestBaseURL</BaseURL></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  baseURL = (GstBaseURL *) mpdclient->mpd_node->BaseURLs->data;
+  assert_equals_string (baseURL->baseURL, "TestBaseURL");
+  assert_equals_string (baseURL->serviceLocation, "TestServiceLocation");
+  assert_equals_string (baseURL->byteRange, "TestByteRange");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing the Location attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_location)
+{
+  const gchar *location;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Location>TestLocation</Location></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  location = (gchar *) mpdclient->mpd_node->Locations->data;
+  assert_equals_string (location, "TestLocation");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Metrics attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_metrics)
+{
+  GstMetricsNode *metricsNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Metrics metrics=\"TestMetric\"></Metrics></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  metricsNode = (GstMetricsNode *) mpdclient->mpd_node->Metrics->data;
+  assert_equals_string (metricsNode->metrics, "TestMetric");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Metrics Range attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_metrics_range)
+{
+  GstMetricsNode *metricsNode;
+  GstMetricsRangeNode *metricsRangeNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Metrics>"
+      "    <Range starttime=\"P0Y1M2DT12H10M20.5S\""
+      "           duration=\"P0Y1M2DT12H10M20.1234567S\">"
+      "    </Range></Metrics></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  metricsNode = (GstMetricsNode *) mpdclient->mpd_node->Metrics->data;
+  assert_equals_pointer (metricsNode->metrics, NULL);
+  metricsRangeNode = (GstMetricsRangeNode *) metricsNode->MetricsRanges->data;
+  assert_equals_int64 (metricsRangeNode->starttime,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 500));
+  assert_equals_int64 (metricsRangeNode->duration,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 123));
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Metrics Reporting attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_metrics_reporting)
+{
+  GstMetricsNode *metricsNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Metrics><Reporting></Reporting></Metrics></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  metricsNode = (GstMetricsNode *) mpdclient->mpd_node->Metrics->data;
+  assert_equals_pointer (metricsNode->metrics, NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period)
+{
+  GstPeriodNode *periodNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"TestId\""
+      "          start=\"P0Y1M2DT12H10M20.1234567S\""
+      "          duration=\"P0Y1M2DT12H10M20.7654321S\""
+      "          bitstreamSwitching=\"true\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  assert_equals_string (periodNode->id, "TestId");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 123));
+  assert_equals_int64 (periodNode->duration,
+      (gint64) duration_to_ms (0, 1, 2, 12, 10, 20, 765));
+  assert_equals_int (periodNode->bitstreamSwitching, 1);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period baseURL attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_baseURL)
+{
+  GstPeriodNode *periodNode;
+  GstBaseURL *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <BaseURL serviceLocation=\"TestServiceLocation\""
+      "             byteRange=\"TestByteRange\">TestBaseURL</BaseURL>"
+      "  </Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  baseURL = (GstBaseURL *) periodNode->BaseURLs->data;
+  assert_equals_string (baseURL->baseURL, "TestBaseURL");
+  assert_equals_string (baseURL->serviceLocation, "TestServiceLocation");
+  assert_equals_string (baseURL->byteRange, "TestByteRange");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentBase attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentBase)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentBaseType *segmentBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentBase timescale=\"123456\""
+      "                 presentationTimeOffset=\"123456789\""
+      "                 indexRange=\"100-200\""
+      "                 indexRangeExact=\"true\">"
+      "    </SegmentBase></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentBase = periodNode->SegmentBase;
+  assert_equals_uint64 (segmentBase->timescale, 123456);
+  assert_equals_uint64 (segmentBase->presentationTimeOffset, 123456789);
+  assert_equals_uint64 (segmentBase->indexRange->first_byte_pos, 100);
+  assert_equals_uint64 (segmentBase->indexRange->last_byte_pos, 200);
+  assert_equals_int (segmentBase->indexRangeExact, 1);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentBase Initialization attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentBase_initialization)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentBaseType *segmentBase;
+  GstURLType *initialization;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentBase>"
+      "      <Initialisation sourceURL=\"TestSourceURL\""
+      "                      range=\"100-200\">"
+      "      </Initialisation></SegmentBase></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentBase = periodNode->SegmentBase;
+  initialization = segmentBase->Initialization;
+  assert_equals_string (initialization->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (initialization->range->first_byte_pos, 100);
+  assert_equals_uint64 (initialization->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentBase RepresentationIndex attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentBase_representationIndex)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentBaseType *segmentBase;
+  GstURLType *representationIndex;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentBase>"
+      "      <RepresentationIndex sourceURL=\"TestSourceURL\""
+      "                           range=\"100-200\">"
+      "      </RepresentationIndex></SegmentBase></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentBase = periodNode->SegmentBase;
+  representationIndex = segmentBase->RepresentationIndex;
+  assert_equals_string (representationIndex->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (representationIndex->range->first_byte_pos, 100);
+  assert_equals_uint64 (representationIndex->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentList)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period><SegmentList></SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  fail_if (segmentList == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList MultipleSegmentBaseType attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentList_multipleSegmentBaseType)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstMultSegmentBaseType *multSegBaseType;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList duration=\"10\""
+      "                 startNumber=\"11\">"
+      "    </SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  multSegBaseType = segmentList->MultSegBaseType;
+  assert_equals_uint64 (multSegBaseType->duration, 10);
+  assert_equals_uint64 (multSegBaseType->startNumber, 11);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList MultipleSegmentBaseType SegmentBaseType
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentBaseType)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentBaseType *segBaseType;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList timescale=\"10\""
+      "                 presentationTimeOffset=\"11\""
+      "                 indexRange=\"20-21\""
+      "                 indexRangeExact=\"false\">"
+      "    </SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  multSegBaseType = segmentList->MultSegBaseType;
+  segBaseType = multSegBaseType->SegBaseType;
+  assert_equals_uint64 (segBaseType->timescale, 10);
+  assert_equals_uint64 (segBaseType->presentationTimeOffset, 11);
+  assert_equals_uint64 (segBaseType->indexRange->first_byte_pos, 20);
+  assert_equals_uint64 (segBaseType->indexRange->last_byte_pos, 21);
+  assert_equals_int (segBaseType->indexRangeExact, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList MultipleSegmentBaseType SegmentTimeline
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentTimeline)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentTimelineNode *segmentTimeline;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList>"
+      "      <SegmentTimeline>"
+      "      </SegmentTimeline></SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  multSegBaseType = segmentList->MultSegBaseType;
+  segmentTimeline = multSegBaseType->SegmentTimeline;
+  fail_if (segmentTimeline == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList MultipleSegmentBaseType SegmentTimeline S
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentTimeline_s)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentTimelineNode *segmentTimeline;
+  GstSNode *sNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList>"
+      "      <SegmentTimeline>"
+      "        <S t=\"1\" d=\"2\" r=\"3\">"
+      "        </S></SegmentTimeline></SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  multSegBaseType = segmentList->MultSegBaseType;
+  segmentTimeline = multSegBaseType->SegmentTimeline;
+  sNode = (GstSNode *) g_queue_peek_head (&segmentTimeline->S);
+  assert_equals_uint64 (sNode->t, 1);
+  assert_equals_uint64 (sNode->d, 2);
+  assert_equals_uint64 (sNode->r, 3);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList MultipleSegmentBaseType BitstreamSwitching
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentList_multipleSegmentBaseType_bitstreamSwitching)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstURLType *bitstreamSwitching;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList>"
+      "      <BitstreamSwitching sourceURL=\"TestSourceURL\""
+      "                          range=\"100-200\">"
+      "      </BitstreamSwitching></SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  multSegBaseType = segmentList->MultSegBaseType;
+  bitstreamSwitching = multSegBaseType->BitstreamSwitching;
+  assert_equals_string (bitstreamSwitching->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (bitstreamSwitching->range->first_byte_pos, 100);
+  assert_equals_uint64 (bitstreamSwitching->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentList SegmentURL attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentList_segmentURL)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentListNode *segmentList;
+  GstSegmentURLNode *segmentURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentList>"
+      "      <SegmentURL media=\"TestMedia\""
+      "                  mediaRange=\"100-200\""
+      "                  index=\"TestIndex\""
+      "                  indexRange=\"300-400\">"
+      "      </SegmentURL></SegmentList></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentList = periodNode->SegmentList;
+  segmentURL = (GstSegmentURLNode *) segmentList->SegmentURL->data;
+  assert_equals_string (segmentURL->media, "TestMedia");
+  assert_equals_uint64 (segmentURL->mediaRange->first_byte_pos, 100);
+  assert_equals_uint64 (segmentURL->mediaRange->last_byte_pos, 200);
+  assert_equals_string (segmentURL->index, "TestIndex");
+  assert_equals_uint64 (segmentURL->indexRange->first_byte_pos, 300);
+  assert_equals_uint64 (segmentURL->indexRange->last_byte_pos, 400);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentTemplate)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate media=\"TestMedia\""
+      "                     index=\"TestIndex\""
+      "                     initialization=\"TestInitialization\""
+      "                     bitstreamSwitching=\"TestBitstreamSwitching\">"
+      "    </SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  assert_equals_string (segmentTemplate->media, "TestMedia");
+  assert_equals_string (segmentTemplate->index, "TestIndex");
+  assert_equals_string (segmentTemplate->initialization, "TestInitialization");
+  assert_equals_string (segmentTemplate->bitstreamSwitching,
+      "TestBitstreamSwitching");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate MultipleSegmentBaseType attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  GstMultSegmentBaseType *multSegBaseType;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate duration=\"10\""
+      "                     startNumber=\"11\">"
+      "    </SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  multSegBaseType = segmentTemplate->MultSegBaseType;
+  assert_equals_uint64 (multSegBaseType->duration, 10);
+  assert_equals_uint64 (multSegBaseType->startNumber, 11);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate MultipleSegmentBaseType SegmentBaseType
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentBaseType)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentBaseType *segBaseType;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate timescale=\"123456\""
+      "                     presentationTimeOffset=\"123456789\""
+      "                     indexRange=\"100-200\""
+      "                     indexRangeExact=\"true\">"
+      "    </SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  multSegBaseType = segmentTemplate->MultSegBaseType;
+  segBaseType = multSegBaseType->SegBaseType;
+  assert_equals_uint64 (segBaseType->timescale, 123456);
+  assert_equals_uint64 (segBaseType->presentationTimeOffset, 123456789);
+  assert_equals_uint64 (segBaseType->indexRange->first_byte_pos, 100);
+  assert_equals_uint64 (segBaseType->indexRange->last_byte_pos, 200);
+  assert_equals_int (segBaseType->indexRangeExact, TRUE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate MultipleSegmentBaseType SegmentTimeline
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentTimeline)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentTimelineNode *segmentTimeline;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate>"
+      "      <SegmentTimeline>"
+      "      </SegmentTimeline></SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  multSegBaseType = segmentTemplate->MultSegBaseType;
+  segmentTimeline = (GstSegmentTimelineNode *) multSegBaseType->SegmentTimeline;
+  fail_if (segmentTimeline == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate MultipleSegmentBaseType SegmentTimeline
+ * S attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentTimeline_s)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstSegmentTimelineNode *segmentTimeline;
+  GstSNode *sNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate>"
+      "      <SegmentTimeline>"
+      "        <S t=\"1\" d=\"2\" r=\"3\">"
+      "        </S></SegmentTimeline></SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  multSegBaseType = segmentTemplate->MultSegBaseType;
+  segmentTimeline = (GstSegmentTimelineNode *) multSegBaseType->SegmentTimeline;
+  sNode = (GstSNode *) g_queue_peek_head (&segmentTimeline->S);
+  assert_equals_uint64 (sNode->t, 1);
+  assert_equals_uint64 (sNode->d, 2);
+  assert_equals_uint64 (sNode->r, 3);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period SegmentTemplate MultipleSegmentBaseType
+ * BitstreamSwitching attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_bitstreamSwitching)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentTemplateNode *segmentTemplate;
+  GstMultSegmentBaseType *multSegBaseType;
+  GstURLType *bitstreamSwitching;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate>"
+      "      <BitstreamSwitching sourceURL=\"TestSourceURL\""
+      "                          range=\"100-200\">"
+      "      </BitstreamSwitching></SegmentTemplate></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  segmentTemplate = periodNode->SegmentTemplate;
+  multSegBaseType = segmentTemplate->MultSegBaseType;
+  bitstreamSwitching = multSegBaseType->BitstreamSwitching;
+  assert_equals_string (bitstreamSwitching->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (bitstreamSwitching->range->first_byte_pos, 100);
+  assert_equals_uint64 (bitstreamSwitching->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet id=\"7\""
+      "                   group=\"8\""
+      "                   lang=\"en\""
+      "                   contentType=\"TestContentType\""
+      "                   par=\"4:3\""
+      "                   minBandwidth=\"100\""
+      "                   maxBandwidth=\"200\""
+      "                   minWidth=\"1000\""
+      "                   maxWidth=\"2000\""
+      "                   minHeight=\"1100\""
+      "                   maxHeight=\"2100\""
+      "                   minFrameRate=\"25/123\""
+      "                   maxFrameRate=\"26\""
+      "                   segmentAlignment=\"2\""
+      "                   subsegmentAlignment=\"false\""
+      "                   subsegmentStartsWithSAP=\"6\""
+      "                   bitstreamSwitching=\"false\">"
+      "    </AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  assert_equals_uint64 (adaptationSet->id, 7);
+  assert_equals_uint64 (adaptationSet->group, 8);
+  assert_equals_string (adaptationSet->lang, "en");
+  assert_equals_string (adaptationSet->contentType, "TestContentType");
+  assert_equals_uint64 (adaptationSet->par->num, 4);
+  assert_equals_uint64 (adaptationSet->par->den, 3);
+  assert_equals_uint64 (adaptationSet->minBandwidth, 100);
+  assert_equals_uint64 (adaptationSet->maxBandwidth, 200);
+  assert_equals_uint64 (adaptationSet->minWidth, 1000);
+  assert_equals_uint64 (adaptationSet->maxWidth, 2000);
+  assert_equals_uint64 (adaptationSet->minHeight, 1100);
+  assert_equals_uint64 (adaptationSet->maxHeight, 2100);
+  assert_equals_uint64 (adaptationSet->minFrameRate->num, 25);
+  assert_equals_uint64 (adaptationSet->minFrameRate->den, 123);
+  assert_equals_uint64 (adaptationSet->maxFrameRate->num, 26);
+  assert_equals_uint64 (adaptationSet->maxFrameRate->den, 1);
+  assert_equals_int (adaptationSet->segmentAlignment->flag, 1);
+  assert_equals_uint64 (adaptationSet->segmentAlignment->value, 2);
+  assert_equals_int (adaptationSet->subsegmentAlignment->flag, 0);
+  assert_equals_uint64 (adaptationSet->subsegmentAlignment->value, 0);
+  assert_equals_int (adaptationSet->subsegmentStartsWithSAP, 6);
+  assert_equals_int (adaptationSet->bitstreamSwitching, 0);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet RepresentationBase attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_representationBase)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet profiles=\"TestProfiles\""
+      "                   width=\"100\""
+      "                   height=\"200\""
+      "                   sar=\"10:20\""
+      "                   frameRate=\"30/40\""
+      "                   audioSamplingRate=\"TestAudioSamplingRate\""
+      "                   mimeType=\"TestMimeType\""
+      "                   segmentProfiles=\"TestSegmentProfiles\""
+      "                   codecs=\"TestCodecs\""
+      "                   maximumSAPPeriod=\"3.4\""
+      "                   startWithSAP=\"0\""
+      "                   maxPlayoutRate=\"1.2\""
+      "                   codingDependency=\"false\""
+      "                   scanType=\"progressive\">"
+      "    </AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  assert_equals_string (representationBase->profiles, "TestProfiles");
+  assert_equals_uint64 (representationBase->width, 100);
+  assert_equals_uint64 (representationBase->height, 200);
+  assert_equals_uint64 (representationBase->sar->num, 10);
+  assert_equals_uint64 (representationBase->sar->den, 20);
+  assert_equals_uint64 (representationBase->frameRate->num, 30);
+  assert_equals_uint64 (representationBase->frameRate->den, 40);
+  assert_equals_string (representationBase->audioSamplingRate,
+      "TestAudioSamplingRate");
+  assert_equals_string (representationBase->mimeType, "TestMimeType");
+  assert_equals_string (representationBase->segmentProfiles,
+      "TestSegmentProfiles");
+  assert_equals_string (representationBase->codecs, "TestCodecs");
+  assert_equals_float (representationBase->maximumSAPPeriod, 3.4);
+  assert_equals_int (representationBase->startWithSAP, GST_SAP_TYPE_0);
+  assert_equals_float (representationBase->maxPlayoutRate, 1.2);
+  assert_equals_float (representationBase->codingDependency, 0);
+  assert_equals_string (representationBase->scanType, "progressive");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet RepresentationBase FramePacking attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representationBase_framePacking) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  GstDescriptorType *framePacking;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <FramePacking schemeIdUri=\"TestSchemeIdUri\""
+      "                    value=\"TestValue\">"
+      "      </FramePacking></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  framePacking = (GstDescriptorType *) representationBase->FramePacking->data;
+  assert_equals_string (framePacking->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (framePacking->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet RepresentationBase
+ * AudioChannelConfiguration attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representationBase_audioChannelConfiguration)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  GstDescriptorType *audioChannelConfiguration;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <AudioChannelConfiguration schemeIdUri=\"TestSchemeIdUri\""
+      "                                 value=\"TestValue\">"
+      "      </AudioChannelConfiguration></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  audioChannelConfiguration =
+      (GstDescriptorType *) representationBase->AudioChannelConfiguration->data;
+  assert_equals_string (audioChannelConfiguration->schemeIdUri,
+      "TestSchemeIdUri");
+  assert_equals_string (audioChannelConfiguration->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet RepresentationBase ContentProtection
+ * attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representationBase_contentProtection) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  GstDescriptorType *contentProtection;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentProtection schemeIdUri=\"TestSchemeIdUri\""
+      "                         value=\"TestValue\">"
+      "      </ContentProtection></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  contentProtection =
+      (GstDescriptorType *) representationBase->ContentProtection->data;
+  assert_equals_string (contentProtection->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (contentProtection->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing ContentProtection element that has no value attribute
+ */
+GST_START_TEST (dash_mpdparser_contentProtection_no_value)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  GstDescriptorType *contentProtection;
+  const gchar *xml =
+      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentProtection schemeIdUri=\"urn:mpeg:dash:mp4protection:2011\" value=\"cenc\"/>"
+      "      <ContentProtection xmlns:mas=\"urn:marlin:mas:1-0:services:schemas:mpd\" schemeIdUri=\"urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4\">"
+      "	      <mas:MarlinContentIds>"
+      "	        <mas:MarlinContentId>urn:marlin:kid:02020202020202020202020202020202</mas:MarlinContentId>"
+      "       </mas:MarlinContentIds>"
+      "     </ContentProtection>" "</AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+  gchar *str;
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  assert_equals_int (g_list_length (representationBase->ContentProtection), 2);
+  contentProtection =
+      (GstDescriptorType *) g_list_nth (representationBase->ContentProtection,
+      1)->data;
+  assert_equals_string (contentProtection->schemeIdUri,
+      "urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4");
+  fail_if (contentProtection->value == NULL);
+  /* We can't do a simple compare of value (which should be an XML dump
+     of the ContentProtection element), because the whitespace
+     formatting from xmlDump might differ between versions of libxml */
+  str = strstr (contentProtection->value, "<ContentProtection");
+  fail_if (str == NULL);
+  str = strstr (contentProtection->value, "<mas:MarlinContentIds>");
+  fail_if (str == NULL);
+  str = strstr (contentProtection->value, "<mas:MarlinContentId>");
+  fail_if (str == NULL);
+  str =
+      strstr (contentProtection->value,
+      "urn:marlin:kid:02020202020202020202020202020202");
+  fail_if (str == NULL);
+  str = strstr (contentProtection->value, "</ContentProtection>");
+  fail_if (str == NULL);
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing ContentProtection element that has no value attribute
+ * nor an XML encoding
+ */
+GST_START_TEST (dash_mpdparser_contentProtection_no_value_no_encoding)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationBaseType *representationBase;
+  GstDescriptorType *contentProtection;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentProtection schemeIdUri=\"urn:mpeg:dash:mp4protection:2011\" value=\"cenc\"/>"
+      "      <ContentProtection xmlns:mas=\"urn:marlin:mas:1-0:services:schemas:mpd\" schemeIdUri=\"urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4\">"
+      "	      <mas:MarlinContentIds>"
+      "	        <mas:MarlinContentId>urn:marlin:kid:02020202020202020202020202020202</mas:MarlinContentId>"
+      "       </mas:MarlinContentIds>"
+      "     </ContentProtection>" "</AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representationBase = adaptationSet->RepresentationBase;
+  assert_equals_int (g_list_length (representationBase->ContentProtection), 2);
+  contentProtection =
+      (GstDescriptorType *) g_list_nth (representationBase->ContentProtection,
+      1)->data;
+  assert_equals_string (contentProtection->schemeIdUri,
+      "urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4");
+  fail_if (contentProtection->value == NULL);
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Accessibility attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_accessibility)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstDescriptorType *accessibility;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Accessibility schemeIdUri=\"TestSchemeIdUri\""
+      "                     value=\"TestValue\">"
+      "      </Accessibility></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  accessibility = (GstDescriptorType *) adaptationSet->Accessibility->data;
+  assert_equals_string (accessibility->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (accessibility->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Role attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_role)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstDescriptorType *role;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Role schemeIdUri=\"TestSchemeIdUri\""
+      "            value=\"TestValue\">"
+      "      </Role></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  role = (GstDescriptorType *) adaptationSet->Role->data;
+  assert_equals_string (role->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (role->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Rating attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_rating)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstDescriptorType *rating;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Rating schemeIdUri=\"TestSchemeIdUri\""
+      "              value=\"TestValue\">"
+      "      </Rating></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  rating = (GstDescriptorType *) adaptationSet->Rating->data;
+  assert_equals_string (rating->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (rating->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Viewpoint attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_viewpoint)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstDescriptorType *viewpoint;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Viewpoint schemeIdUri=\"TestSchemeIdUri\""
+      "                 value=\"TestValue\">"
+      "      </Viewpoint></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  viewpoint = (GstDescriptorType *) adaptationSet->Viewpoint->data;
+  assert_equals_string (viewpoint->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (viewpoint->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet ContentComponent attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_contentComponent)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstContentComponentNode *contentComponent;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentComponent id=\"1\""
+      "                        lang=\"en\""
+      "                        contentType=\"TestContentType\""
+      "                        par=\"10:20\">"
+      "      </ContentComponent></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  contentComponent = (GstContentComponentNode *)
+      adaptationSet->ContentComponents->data;
+  assert_equals_uint64 (contentComponent->id, 1);
+  assert_equals_string (contentComponent->lang, "en");
+  assert_equals_string (contentComponent->contentType, "TestContentType");
+  assert_equals_uint64 (contentComponent->par->num, 10);
+  assert_equals_uint64 (contentComponent->par->den, 20);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet ContentComponent Accessibility attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_contentComponent_accessibility) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstContentComponentNode *contentComponent;
+  GstDescriptorType *accessibility;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentComponent>"
+      "        <Accessibility schemeIdUri=\"TestSchemeIdUri\""
+      "                       value=\"TestValue\">"
+      "        </Accessibility>"
+      "      </ContentComponent></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  contentComponent = (GstContentComponentNode *)
+      adaptationSet->ContentComponents->data;
+  accessibility = (GstDescriptorType *) contentComponent->Accessibility->data;
+  assert_equals_string (accessibility->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (accessibility->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet ContentComponent Role attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_contentComponent_role)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstContentComponentNode *contentComponent;
+  GstDescriptorType *role;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentComponent>"
+      "        <Role schemeIdUri=\"TestSchemeIdUri\""
+      "              value=\"TestValue\">"
+      "        </Role></ContentComponent></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  contentComponent = (GstContentComponentNode *)
+      adaptationSet->ContentComponents->data;
+  role = (GstDescriptorType *) contentComponent->Role->data;
+  assert_equals_string (role->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (role->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet ContentComponent Rating attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_contentComponent_rating)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstContentComponentNode *contentComponent;
+  GstDescriptorType *rating;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentComponent>"
+      "        <Rating schemeIdUri=\"TestSchemeIdUri\""
+      "                value=\"TestValue\">"
+      "        </Rating>"
+      "      </ContentComponent></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  contentComponent = (GstContentComponentNode *)
+      adaptationSet->ContentComponents->data;
+  rating = (GstDescriptorType *) contentComponent->Rating->data;
+  assert_equals_string (rating->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (rating->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet ContentComponent Viewpoint attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_contentComponent_viewpoint)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstContentComponentNode *contentComponent;
+  GstDescriptorType *viewpoint;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <ContentComponent>"
+      "        <Viewpoint schemeIdUri=\"TestSchemeIdUri\""
+      "                   value=\"TestValue\">"
+      "        </Viewpoint>"
+      "      </ContentComponent></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  contentComponent = (GstContentComponentNode *)
+      adaptationSet->ContentComponents->data;
+  viewpoint = (GstDescriptorType *) contentComponent->Viewpoint->data;
+  assert_equals_string (viewpoint->schemeIdUri, "TestSchemeIdUri");
+  assert_equals_string (viewpoint->value, "TestValue");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet BaseURL attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_baseURL)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstBaseURL *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <BaseURL serviceLocation=\"TestServiceLocation\""
+      "               byteRange=\"TestByteRange\">TestBaseURL</BaseURL>"
+      "    </AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  baseURL = (GstBaseURL *) adaptationSet->BaseURLs->data;
+  assert_equals_string (baseURL->baseURL, "TestBaseURL");
+  assert_equals_string (baseURL->serviceLocation, "TestServiceLocation");
+  assert_equals_string (baseURL->byteRange, "TestByteRange");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentBase attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentBase)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentBaseType *segmentBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentBase timescale=\"123456\""
+      "                   presentationTimeOffset=\"123456789\""
+      "                   indexRange=\"100-200\""
+      "                   indexRangeExact=\"true\">"
+      "      </SegmentBase></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentBase = adaptationSet->SegmentBase;
+  assert_equals_uint64 (segmentBase->timescale, 123456);
+  assert_equals_uint64 (segmentBase->presentationTimeOffset, 123456789);
+  assert_equals_uint64 (segmentBase->indexRange->first_byte_pos, 100);
+  assert_equals_uint64 (segmentBase->indexRange->last_byte_pos, 200);
+  assert_equals_int (segmentBase->indexRangeExact, TRUE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentBase Initialization attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentBase_initialization)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentBaseType *segmentBase;
+  GstURLType *initialization;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentBase>"
+      "        <Initialisation sourceURL=\"TestSourceURL\""
+      "                        range=\"100-200\">"
+      "        </Initialisation></SegmentBase></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentBase = adaptationSet->SegmentBase;
+  initialization = segmentBase->Initialization;
+  assert_equals_string (initialization->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (initialization->range->first_byte_pos, 100);
+  assert_equals_uint64 (initialization->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentBase RepresentationIndex attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_segmentBase_representationIndex) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentBaseType *segmentBase;
+  GstURLType *representationIndex;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentBase>"
+      "        <RepresentationIndex sourceURL=\"TestSourceURL\""
+      "                             range=\"100-200\">"
+      "        </RepresentationIndex>"
+      "      </SegmentBase></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentBase = adaptationSet->SegmentBase;
+  representationIndex = segmentBase->RepresentationIndex;
+  assert_equals_string (representationIndex->sourceURL, "TestSourceURL");
+  assert_equals_uint64 (representationIndex->range->first_byte_pos, 100);
+  assert_equals_uint64 (representationIndex->range->last_byte_pos, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentList attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentList)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentListNode *segmentList;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentList></SegmentList></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentList = adaptationSet->SegmentList;
+  fail_if (segmentList == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentTemplate attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentTemplate)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentTemplateNode *segmentTemplate;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentTemplate media=\"TestMedia\""
+      "                       index=\"TestIndex\""
+      "                       initialization=\"TestInitialization\""
+      "                       bitstreamSwitching=\"TestBitstreamSwitching\">"
+      "      </SegmentTemplate></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentTemplate = adaptationSet->SegmentTemplate;
+  assert_equals_string (segmentTemplate->media, "TestMedia");
+  assert_equals_string (segmentTemplate->index, "TestIndex");
+  assert_equals_string (segmentTemplate->initialization, "TestInitialization");
+  assert_equals_string (segmentTemplate->bitstreamSwitching,
+      "TestBitstreamSwitching");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+
+/*
+ * Test parsing Period AdaptationSet SegmentTemplate attributes with
+ * inheritance
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentTemplate_inherit)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstSegmentTemplateNode *segmentTemplate;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <SegmentTemplate media=\"ParentMedia\" "
+      "                     initialization=\"ParentInitialization\">"
+      "    </SegmentTemplate>"
+      "    <AdaptationSet>"
+      "      <SegmentTemplate media=\"TestMedia\""
+      "                       index=\"TestIndex\""
+      "                       bitstreamSwitching=\"TestBitstreamSwitching\">"
+      "      </SegmentTemplate></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  segmentTemplate = adaptationSet->SegmentTemplate;
+  assert_equals_string (segmentTemplate->media, "TestMedia");
+  assert_equals_string (segmentTemplate->index, "TestIndex");
+  assert_equals_string (segmentTemplate->initialization,
+      "ParentInitialization");
+  assert_equals_string (segmentTemplate->bitstreamSwitching,
+      "TestBitstreamSwitching");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_representation)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation id=\"Test Id\""
+      "                      bandwidth=\"100\""
+      "                      qualityRanking=\"200\""
+      "                      dependencyId=\"one two three\""
+      "                      mediaStreamStructureId=\"\">"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  assert_equals_string (representation->id, "Test Id");
+  assert_equals_uint64 (representation->bandwidth, 100);
+  assert_equals_uint64 (representation->qualityRanking, 200);
+  assert_equals_string (representation->dependencyId[0], "one");
+  assert_equals_string (representation->dependencyId[1], "two");
+  assert_equals_string (representation->dependencyId[2], "three");
+  assert_equals_pointer (representation->dependencyId[3], NULL);
+  assert_equals_pointer (representation->mediaStreamStructureId[0], NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation RepresentationBaseType attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representation_representationBase) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstRepresentationBaseType *representationBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  representationBase = (GstRepresentationBaseType *)
+      representation->RepresentationBase;
+  fail_if (representationBase == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation BaseURL attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_representation_baseURL)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstBaseURL *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <BaseURL serviceLocation=\"TestServiceLocation\""
+      "                 byteRange=\"TestByteRange\">TestBaseURL</BaseURL>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  baseURL = (GstBaseURL *) representation->BaseURLs->data;
+  assert_equals_string (baseURL->baseURL, "TestBaseURL");
+  assert_equals_string (baseURL->serviceLocation, "TestServiceLocation");
+  assert_equals_string (baseURL->byteRange, "TestByteRange");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation SubRepresentation attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representation_subRepresentation) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstSubRepresentationNode *subRepresentation;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <SubRepresentation level=\"100\""
+      "                           dependencyLevel=\"1 2 3\""
+      "                           bandwidth=\"200\""
+      "                           contentComponent=\"content1 content2\">"
+      "        </SubRepresentation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  subRepresentation = (GstSubRepresentationNode *)
+      representation->SubRepresentations->data;
+  assert_equals_uint64 (subRepresentation->level, 100);
+  assert_equals_uint64 (subRepresentation->size, 3);
+  assert_equals_uint64 (subRepresentation->dependencyLevel[0], 1);
+  assert_equals_uint64 (subRepresentation->dependencyLevel[1], 2);
+  assert_equals_uint64 (subRepresentation->dependencyLevel[2], 3);
+  assert_equals_uint64 (subRepresentation->bandwidth, 200);
+  assert_equals_string (subRepresentation->contentComponent[0], "content1");
+  assert_equals_string (subRepresentation->contentComponent[1], "content2");
+  assert_equals_pointer (subRepresentation->contentComponent[2], NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation SubRepresentation
+ * RepresentationBase attributes
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representation_subRepresentation_representationBase)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstSubRepresentationNode *subRepresentation;
+  GstRepresentationBaseType *representationBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <SubRepresentation>"
+      "        </SubRepresentation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  subRepresentation = (GstSubRepresentationNode *)
+      representation->SubRepresentations->data;
+  representationBase = (GstRepresentationBaseType *)
+      subRepresentation->RepresentationBase;
+  fail_if (representationBase == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation SegmentBase attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_representation_segmentBase)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstSegmentBaseType *segmentBase;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <SegmentBase>"
+      "        </SegmentBase>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  segmentBase = representation->SegmentBase;
+  fail_if (segmentBase == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation SegmentList attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_adaptationSet_representation_segmentList)
+{
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstSegmentListNode *segmentList;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <SegmentList>"
+      "        </SegmentList>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  segmentList = representation->SegmentList;
+  fail_if (segmentList == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet Representation SegmentTemplate attributes
+ *
+ */
+GST_START_TEST
+    (dash_mpdparser_period_adaptationSet_representation_segmentTemplate) {
+  GstPeriodNode *periodNode;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  GstSegmentTemplateNode *segmentTemplate;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <Representation>"
+      "        <SegmentTemplate>"
+      "        </SegmentTemplate>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+  segmentTemplate = representation->SegmentTemplate;
+  fail_if (segmentTemplate == NULL);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period Subset attributes
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_subset)
+{
+  GstPeriodNode *periodNode;
+  GstSubsetNode *subset;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period><Subset contains=\"1 2 3\"></Subset></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  subset = (GstSubsetNode *) periodNode->Subsets->data;
+  assert_equals_uint64 (subset->size, 3);
+  assert_equals_uint64 (subset->contains[0], 1);
+  assert_equals_uint64 (subset->contains[1], 2);
+  assert_equals_uint64 (subset->contains[2], 3);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing UTCTiming elements
+ *
+ */
+GST_START_TEST (dash_mpdparser_utctiming)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      " profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-xsdate:2014\" value=\"http://time.akamai.com/?iso http://example.time/xsdate\"/>"
+      "<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:direct:2014\" value=\"2002-05-30T09:30:10Z \"/>"
+      "<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:ntp:2014\" value=\"0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org\"/>"
+      "</MPD>";
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+  GstMPDUTCTimingType selected_method;
+  gchar **urls;
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+
+  assert_equals_int (ret, TRUE);
+  fail_if (mpdclient->mpd_node == NULL);
+  fail_if (mpdclient->mpd_node->UTCTiming == NULL);
+  assert_equals_int (g_list_length (mpdclient->mpd_node->UTCTiming), 3);
+  urls =
+      gst_mpd_client_get_utc_timing_sources (mpdclient,
+      GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE, &selected_method);
+  fail_if (urls == NULL);
+  assert_equals_int (selected_method, GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE);
+  assert_equals_int (g_strv_length (urls), 2);
+  assert_equals_string (urls[0], "http://time.akamai.com/?iso");
+  assert_equals_string (urls[1], "http://example.time/xsdate");
+  urls =
+      gst_mpd_client_get_utc_timing_sources (mpdclient,
+      GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE | GST_MPD_UTCTIMING_TYPE_HTTP_ISO,
+      &selected_method);
+  fail_if (urls == NULL);
+  assert_equals_int (selected_method, GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE);
+  urls =
+      gst_mpd_client_get_utc_timing_sources (mpdclient,
+      GST_MPD_UTCTIMING_TYPE_DIRECT, NULL);
+  fail_if (urls == NULL);
+  assert_equals_int (g_strv_length (urls), 1);
+  assert_equals_string (urls[0], "2002-05-30T09:30:10Z ");
+  urls =
+      gst_mpd_client_get_utc_timing_sources (mpdclient,
+      GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE | GST_MPD_UTCTIMING_TYPE_DIRECT,
+      &selected_method);
+  fail_if (urls == NULL);
+  assert_equals_int (selected_method, GST_MPD_UTCTIMING_TYPE_HTTP_XSDATE);
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing the type property: value "dynamic"
+ *
+ */
+GST_START_TEST (dash_mpdparser_type_dynamic)
+{
+  gboolean isLive;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD type=\"dynamic\" xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\"> </MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  isLive = gst_mpd_client_is_live (mpdclient);
+  assert_equals_int (isLive, 1);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Validate gst_mpdparser_build_URL_from_template function
+ *
+ */
+GST_START_TEST (dash_mpdparser_template_parsing)
+{
+  const gchar *url_template;
+  const gchar *id = "TestId";
+  guint number = 7;
+  guint bandwidth = 2500;
+  guint64 time = 100;
+  gchar *result;
+
+  url_template = "TestMedia$Bandwidth$$$test";
+  result =
+      gst_mpdparser_build_URL_from_template (url_template, id, number,
+      bandwidth, time);
+  assert_equals_string (result, "TestMedia2500$test");
+  g_free (result);
+
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling isoff ondemand profile
+ *
+ */
+GST_START_TEST (dash_mpdparser_isoff_ondemand_profile)
+{
+  gboolean hasOnDemandProfile;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-on-demand:2011\"></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  hasOnDemandProfile = gst_mpd_client_has_isoff_ondemand_profile (mpdclient);
+  assert_equals_int (hasOnDemandProfile, 1);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling GstDateTime
+ *
+ */
+GST_START_TEST (dash_mpdparser_GstDateTime)
+{
+  gint64 delta;
+  GstDateTime *time1;
+  GstDateTime *time2;
+  GstDateTime *time3;
+  GDateTime *g_time2;
+  GDateTime *g_time3;
+
+  time1 = gst_date_time_new_from_iso8601_string ("2012-06-23T23:30:59Z");
+  time2 = gst_date_time_new_from_iso8601_string ("2012-06-23T23:31:00Z");
+
+  delta = gst_mpd_client_calculate_time_difference (time1, time2);
+  assert_equals_int64 (delta, 1 * GST_SECOND);
+
+  time3 =
+      gst_mpd_client_add_time_difference (time1, GST_TIME_AS_USECONDS (delta));
+
+  /* convert to GDateTime in order to compare time2 and time 3 */
+  g_time2 = gst_date_time_to_g_date_time (time2);
+  g_time3 = gst_date_time_to_g_date_time (time3);
+  fail_if (g_date_time_compare (g_time2, g_time3) != 0);
+
+  gst_date_time_unref (time1);
+  gst_date_time_unref (time2);
+  gst_date_time_unref (time3);
+  g_date_time_unref (g_time2);
+  g_date_time_unref (g_time3);
+}
+
+GST_END_TEST;
+
+/*
+ * Test various duration formats
+ */
+GST_START_TEST (dash_mpdparser_various_duration_formats)
+{
+  GstPeriodNode *periodNode;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P100Y\">"
+      "  <Period id=\"Period0\" start=\"PT1S\"></Period>"
+      "  <Period id=\"Period1\" start=\"PT1.5S\"></Period>"
+      "  <Period id=\"Period2\" start=\"PT1,7S\"></Period>"
+      "  <Period id=\"Period3\" start=\"PT1M\"></Period>"
+      "  <Period id=\"Period4\" start=\"PT1H\"></Period>"
+      "  <Period id=\"Period5\" start=\"P1D\"></Period>"
+      "  <Period id=\"Period6\" start=\"P1M\"></Period>"
+      "  <Period id=\"Period7\" start=\"P1Y\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 0);
+  assert_equals_string (periodNode->id, "Period0");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 0, 0, 0, 1, 0));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 1);
+  assert_equals_string (periodNode->id, "Period1");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 0, 0, 0, 1, 500));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 2);
+  assert_equals_string (periodNode->id, "Period2");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 0, 0, 0, 1, 700));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 3);
+  assert_equals_string (periodNode->id, "Period3");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 0, 0, 1, 0, 0));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 4);
+  assert_equals_string (periodNode->id, "Period4");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 0, 1, 0, 0, 0));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 5);
+  assert_equals_string (periodNode->id, "Period5");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 0, 1, 0, 0, 0, 0));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 6);
+  assert_equals_string (periodNode->id, "Period6");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (0, 1, 0, 0, 0, 0, 0));
+
+  periodNode =
+      (GstPeriodNode *) g_list_nth_data (mpdclient->mpd_node->Periods, 7);
+  assert_equals_string (periodNode->id, "Period7");
+  assert_equals_int64 (periodNode->start,
+      (gint64) duration_to_ms (1, 0, 0, 0, 0, 0, 0));
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test media presentation setup
+ *
+ */
+GST_START_TEST (dash_mpdparser_setup_media_presentation)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\""
+      "          duration=\"P0Y0M1DT1H1M1S\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test setting a stream
+ *
+ */
+GST_START_TEST (dash_mpdparser_setup_streaming)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\""
+      "          duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\""
+      "                   mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the first adaptation set of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+  adapt_set = (GstAdaptationSetNode *) adaptationSets->data;
+  fail_if (adapt_set == NULL);
+
+  /* setup streaming from the adaptation set */
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling Period selection
+ *
+ */
+GST_START_TEST (dash_mpdparser_period_selection)
+{
+  const gchar *periodName;
+  guint periodIndex;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     mediaPresentationDuration=\"P0Y0M1DT1H4M3S\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\"></Period>"
+      "  <Period id=\"Period1\"></Period>"
+      "  <Period id=\"Period2\" start=\"P0Y0M1DT1H3M3S\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* period_idx should be 0 and we should have no active periods */
+  assert_equals_uint64 (mpdclient->period_idx, 0);
+  fail_unless (mpdclient->periods == NULL);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* check the periods */
+  fail_unless (mpdclient->periods != NULL);
+  periodName = gst_mpd_client_get_period_id (mpdclient);
+  assert_equals_string (periodName, "Period0");
+
+  ret = gst_mpd_client_set_period_index (mpdclient, 1);
+  assert_equals_int (ret, TRUE);
+  periodName = gst_mpd_client_get_period_id (mpdclient);
+  assert_equals_string (periodName, "Period1");
+
+  ret = gst_mpd_client_set_period_index (mpdclient, 2);
+  assert_equals_int (ret, TRUE);
+  periodName = gst_mpd_client_get_period_id (mpdclient);
+  assert_equals_string (periodName, "Period2");
+
+  ret = gst_mpd_client_has_next_period (mpdclient);
+  assert_equals_int (ret, FALSE);
+  ret = gst_mpd_client_has_previous_period (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  ret = gst_mpd_client_set_period_index (mpdclient, 0);
+  assert_equals_int (ret, TRUE);
+  ret = gst_mpd_client_has_next_period (mpdclient);
+  assert_equals_int (ret, TRUE);
+  ret = gst_mpd_client_has_previous_period (mpdclient);
+  assert_equals_int (ret, FALSE);
+
+  ret = gst_mpd_client_set_period_id (mpdclient, "Period1");
+  assert_equals_int (ret, TRUE);
+  periodIndex = gst_mpd_client_get_period_index (mpdclient);
+  assert_equals_uint64 (periodIndex, 1);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling Period selection based on time
+ *
+ */
+GST_START_TEST (dash_mpdparser_get_period_at_time)
+{
+  guint periodIndex;
+  GstDateTime *time;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M1DT1H4M3S\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\"></Period>"
+      "  <Period id=\"Period1\"></Period>"
+      "  <Period id=\"Period2\" start=\"P0Y0M1DT1H3M3S\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* request period for a time before availabilityStartTime, expect period index 0 */
+  time = gst_date_time_new_from_iso8601_string ("2015-03-23T23:30:59Z");
+  periodIndex = gst_mpd_client_get_period_index_at_time (mpdclient, time);
+  gst_date_time_unref (time);
+  assert_equals_int (periodIndex, 0);
+
+  /* request period for a time from period 0 */
+  time = gst_date_time_new_from_iso8601_string ("2015-03-24T23:30:59Z");
+  periodIndex = gst_mpd_client_get_period_index_at_time (mpdclient, time);
+  gst_date_time_unref (time);
+  assert_equals_int (periodIndex, 0);
+
+  /* request period for a time from period 1 */
+  time = gst_date_time_new_from_iso8601_string ("2015-03-25T1:1:1Z");
+  periodIndex = gst_mpd_client_get_period_index_at_time (mpdclient, time);
+  gst_date_time_unref (time);
+  assert_equals_int (periodIndex, 1);
+
+  /* request period for a time from period 2 */
+  time = gst_date_time_new_from_iso8601_string ("2015-03-25T1:3:3Z");
+  periodIndex = gst_mpd_client_get_period_index_at_time (mpdclient, time);
+  gst_date_time_unref (time);
+  assert_equals_int (periodIndex, 2);
+
+  /* request period for a time after mediaPresentationDuration, expect period index G_MAXUINT */
+  time = gst_date_time_new_from_iso8601_string ("2015-03-25T1:4:3Z");
+  periodIndex = gst_mpd_client_get_period_index_at_time (mpdclient, time);
+  gst_date_time_unref (time);
+  assert_equals_int (periodIndex, G_MAXUINT);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling Adaptation sets
+ *
+ */
+GST_START_TEST (dash_mpdparser_adaptationSet_handling)
+{
+  const gchar *periodName;
+  guint adaptation_sets_count;
+  GList *adaptationSets;
+  guint count = 0;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\"></AdaptationSet>"
+      "  </Period>"
+      "  <Period id=\"Period1\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"10\"></AdaptationSet>"
+      "    <AdaptationSet id=\"11\"></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* period0 has 1 adaptation set */
+  fail_unless (mpdclient->periods != NULL);
+  periodName = gst_mpd_client_get_period_id (mpdclient);
+  assert_equals_string (periodName, "Period0");
+  adaptation_sets_count = gst_mpdparser_get_nb_adaptationSet (mpdclient);
+  assert_equals_int (adaptation_sets_count, 1);
+
+  /* period1 has 2 adaptation set */
+  ret = gst_mpd_client_set_period_id (mpdclient, "Period1");
+  assert_equals_int (ret, TRUE);
+  adaptation_sets_count = gst_mpdparser_get_nb_adaptationSet (mpdclient);
+  assert_equals_int (adaptation_sets_count, 2);
+
+  /* check the id for the 2 adaptation sets from period 1 */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  for (GList * it = adaptationSets; it; it = g_list_next (it)) {
+    GstAdaptationSetNode *adapt_set;
+    adapt_set = (GstAdaptationSetNode *) it->data;
+    fail_if (adapt_set == NULL);
+
+    assert_equals_int (adapt_set->id, 10 + count);
+    count++;
+  }
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling Representation selection
+ *
+ */
+GST_START_TEST (dash_mpdparser_representation_selection)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adaptationSetNode;
+  GList *representations;
+  gint represendationIndex;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\" mimeType=\"video/mp4\">"
+      "      <Representation id=\"v0\" bandwidth=\"500000\"></Representation>"
+      "      <Representation id=\"v1\" bandwidth=\"250000\"></Representation>"
+      "    </AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  adaptationSetNode = adaptationSets->data;
+  fail_if (adaptationSetNode == NULL);
+  assert_equals_int (adaptationSetNode->id, 1);
+
+  representations = adaptationSetNode->Representations;
+  fail_if (representations == NULL);
+
+  represendationIndex =
+      gst_mpdparser_get_rep_idx_with_min_bandwidth (representations);
+  assert_equals_int (represendationIndex, 1);
+
+  represendationIndex =
+      gst_mpdparser_get_rep_idx_with_max_bandwidth (representations, 0);
+  assert_equals_int (represendationIndex, 1);
+
+  represendationIndex =
+      gst_mpdparser_get_rep_idx_with_max_bandwidth (representations, 100000);
+  assert_equals_int (represendationIndex, -1);
+
+  represendationIndex =
+      gst_mpdparser_get_rep_idx_with_max_bandwidth (representations, 300000);
+  assert_equals_int (represendationIndex, 1);
+
+  represendationIndex =
+      gst_mpdparser_get_rep_idx_with_max_bandwidth (representations, 500000);
+  assert_equals_int (represendationIndex, 0);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling Active stream selection
+ *
+ */
+GST_START_TEST (dash_mpdparser_activeStream_selection)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  guint activeStreams;
+  GstActiveStream *activeStream;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\" mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "      </Representation>"
+      "    </AdaptationSet>"
+      "    <AdaptationSet id=\"2\" mimeType=\"audio\">"
+      "      <Representation>"
+      "      </Representation>"
+      "    </AdaptationSet>"
+      "    <AdaptationSet id=\"3\" mimeType=\"application\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* no active streams yet */
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, 0);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* 1 active streams */
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, 1);
+
+  /* setup streaming from the second adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 1);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* 2 active streams */
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, 2);
+
+  /* setup streaming from the third adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 2);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* 3 active streams */
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, 3);
+
+  /* get details of the first active stream */
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+  assert_equals_int (activeStream->mimeType, GST_STREAM_VIDEO);
+
+  /* get details of the second active stream */
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 1);
+  fail_if (activeStream == NULL);
+  assert_equals_int (activeStream->mimeType, GST_STREAM_AUDIO);
+
+  /* get details of the third active stream */
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 2);
+  fail_if (activeStream == NULL);
+  assert_equals_int (activeStream->mimeType, GST_STREAM_APPLICATION);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test getting Active stream parameters
+ *
+ */
+GST_START_TEST (dash_mpdparser_activeStream_parameters)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  guint activeStreams;
+  GstActiveStream *activeStream;
+  const gchar *mimeType;
+  gboolean bitstreamSwitchingFlag;
+  guint videoStreamWidth;
+  guint videoStreamHeight;
+  guint audioStreamRate;
+  guint audioChannelsCount;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\""
+      "          duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\""
+      "                   mimeType=\"video/mp4\""
+      "                   width=\"320\""
+      "                   height=\"240\""
+      "                   bitstreamSwitching=\"true\""
+      "                   audioSamplingRate=\"48000\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* 1 active streams */
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, 1);
+
+  /* get details of the first active stream */
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  assert_equals_int (activeStream->mimeType, GST_STREAM_VIDEO);
+  mimeType = gst_mpd_client_get_stream_mimeType (activeStream);
+  assert_equals_string (mimeType, "video/quicktime");
+
+  bitstreamSwitchingFlag =
+      gst_mpd_client_get_bitstream_switching_flag (activeStream);
+  assert_equals_int (bitstreamSwitchingFlag, 1);
+
+  videoStreamWidth = gst_mpd_client_get_video_stream_width (activeStream);
+  assert_equals_int (videoStreamWidth, 320);
+
+  videoStreamHeight = gst_mpd_client_get_video_stream_height (activeStream);
+  assert_equals_int (videoStreamHeight, 240);
+
+  audioStreamRate = gst_mpd_client_get_audio_stream_rate (activeStream);
+  assert_equals_int (audioStreamRate, 48000);
+
+  audioChannelsCount =
+      gst_mpd_client_get_audio_stream_num_channels (activeStream);
+  assert_equals_int (audioChannelsCount, 0);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test getting number and list of audio languages
+ *
+ */
+GST_START_TEST (dash_mpdparser_get_audio_languages)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  guint activeStreams;
+  guint adaptationSetsCount;
+  GList *languages = NULL;
+  guint languagesCount;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\" mimeType=\"audio\" lang=\"en\">"
+      "      <Representation>"
+      "      </Representation>"
+      "    </AdaptationSet>"
+      "    <AdaptationSet id=\"2\" mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "      </Representation>"
+      "    </AdaptationSet>"
+      "    <AdaptationSet id=\"3\" mimeType=\"audio\" lang=\"fr\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from all adaptation sets */
+  adaptationSetsCount = gst_mpdparser_get_nb_adaptationSet (mpdclient);
+  for (int i = 0; i < adaptationSetsCount; i++) {
+    adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, i);
+    fail_if (adapt_set == NULL);
+    ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+    assert_equals_int (ret, TRUE);
+  }
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, adaptationSetsCount);
+
+  languagesCount =
+      gst_mpdparser_get_list_and_nb_of_audio_language (mpdclient, &languages);
+  assert_equals_int (languagesCount, 2);
+  assert_equals_string ((gchar *) g_list_nth_data (languages, 0), "en");
+  assert_equals_string ((gchar *) g_list_nth_data (languages, 1), "fr");
+
+  g_list_free (languages);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Tests getting the base URL
+ *
+ */
+static GstMpdClient *
+setup_mpd_client (const gchar * xml)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  guint activeStreams;
+  guint adaptationSetsCount;
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from all adaptation sets */
+  adaptationSetsCount = gst_mpdparser_get_nb_adaptationSet (mpdclient);
+  for (int i = 0; i < adaptationSetsCount; i++) {
+    adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, i);
+    fail_if (adapt_set == NULL);
+    ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+    assert_equals_int (ret, TRUE);
+  }
+  activeStreams = gst_mpdparser_get_nb_active_stream (mpdclient);
+  assert_equals_int (activeStreams, adaptationSetsCount);
+
+  return mpdclient;
+}
+
+GST_START_TEST (dash_mpdparser_get_baseURL1)
+{
+  const gchar *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <BaseURL>http://example.com/</BaseURL>"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <AdaptationSet id=\"1\" mimeType=\"audio\" lang=\"en\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  GstMpdClient *mpdclient = setup_mpd_client (xml);
+
+  baseURL = gst_mpdparser_get_baseURL (mpdclient, 0);
+  fail_if (baseURL == NULL);
+  assert_equals_string (baseURL, "http://example.com/");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (dash_mpdparser_get_baseURL2)
+{
+  const gchar *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <BaseURL>mpd_base_url/</BaseURL>"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <BaseURL> /period_base_url/</BaseURL>"
+      "    <AdaptationSet id=\"1\" mimeType=\"audio\" lang=\"en\">"
+      "      <BaseURL>adaptation_base_url</BaseURL>"
+      "      <Representation>"
+      "        <BaseURL>representation_base_url</BaseURL>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  GstMpdClient *mpdclient = setup_mpd_client (xml);
+
+  /* test baseURL. Its value should be computed like this:
+   *  - start with xml url (null)
+   *  - set it to the value from MPD's BaseURL element: "mpd_base_url/"
+   *  - update the value with BaseURL element from Period. Because Period's
+   * baseURL is absolute (starts with /) it will overwrite the current value
+   * for baseURL. So, baseURL becomes "/period_base_url/"
+   *  - update the value with BaseURL element from AdaptationSet. Because this
+   * is a relative url, it will update the current value. baseURL becomes
+   * "/period_base_url/adaptation_base_url"
+   *  - update the value with BaseURL element from Representation. Because this
+   * is a relative url, it will update the current value. Because the current
+   * value does not end in /, everything after the last / will be overwritten.
+   * baseURL becomes "/period_base_url/representation_base_url"
+   */
+  baseURL = gst_mpdparser_get_baseURL (mpdclient, 0);
+  fail_if (baseURL == NULL);
+  assert_equals_string (baseURL, "/period_base_url/representation_base_url");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (dash_mpdparser_get_baseURL3)
+{
+  const gchar *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <BaseURL>mpd_base_url/</BaseURL>"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <BaseURL> /period_base_url/</BaseURL>"
+      "    <AdaptationSet id=\"1\" mimeType=\"audio\" lang=\"en\">"
+      "      <BaseURL>adaptation_base_url</BaseURL>"
+      "      <Representation>"
+      "        <BaseURL>/representation_base_url</BaseURL>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  GstMpdClient *mpdclient = setup_mpd_client (xml);
+
+  /* test baseURL. Its value should be computed like this:
+   *  - start with xml url (null)
+   *  - set it to the value from MPD's BaseURL element: "mpd_base_url/"
+   *  - update the value with BaseURL element from Period. Because Period's
+   * baseURL is absolute (starts with /) it will overwrite the current value
+   * for baseURL. So, baseURL becomes "/period_base_url/"
+   *  - update the value with BaseURL element from AdaptationSet. Because this
+   * is a relative url, it will update the current value. baseURL becomes
+   * "/period_base_url/adaptation_base_url"
+   *  - update the value with BaseURL element from Representation. Because this
+   * is an absolute url, it will replace everything again"
+   */
+  baseURL = gst_mpdparser_get_baseURL (mpdclient, 0);
+  fail_if (baseURL == NULL);
+  assert_equals_string (baseURL, "/representation_base_url");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (dash_mpdparser_get_baseURL4)
+{
+  const gchar *baseURL;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <BaseURL>mpd_base_url/</BaseURL>"
+      "  <Period id=\"Period0\" duration=\"P0Y0M1DT1H1M1S\">"
+      "    <BaseURL> /period_base_url/</BaseURL>"
+      "    <AdaptationSet id=\"1\" mimeType=\"audio\" lang=\"en\">"
+      "      <BaseURL>adaptation_base_url/</BaseURL>"
+      "      <Representation>"
+      "        <BaseURL>representation_base_url/</BaseURL>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  GstMpdClient *mpdclient = setup_mpd_client (xml);
+
+  /* test baseURL. Its value should be computed like this:
+   *  - start with xml url (null)
+   *  - set it to the value from MPD's BaseURL element: "mpd_base_url/"
+   *  - update the value with BaseURL element from Period. Because Period's
+   * baseURL is absolute (starts with /) it will overwrite the current value
+   * for baseURL. So, baseURL becomes "/period_base_url/"
+   *  - update the value with BaseURL element from AdaptationSet. Because this
+   * is a relative url, it will update the current value. baseURL becomes
+   * "/period_base_url/adaptation_base_url/"
+   *  - update the value with BaseURL element from Representation. Because this
+   * is an relative url, it will update the current value."
+   */
+  baseURL = gst_mpdparser_get_baseURL (mpdclient, 0);
+  fail_if (baseURL == NULL);
+  assert_equals_string (baseURL,
+      "/period_base_url/adaptation_base_url/representation_base_url/");
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test getting mediaPresentationDuration
+ *
+ */
+GST_START_TEST (dash_mpdparser_get_mediaPresentationDuration)
+{
+  GstClockTime mediaPresentationDuration;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     mediaPresentationDuration=\"P0Y0M0DT0H0M3S\"></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  mediaPresentationDuration =
+      gst_mpd_client_get_media_presentation_duration (mpdclient);
+  assert_equals_uint64 (mediaPresentationDuration, 3000000000);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test getting streamPresentationOffset
+ *
+ */
+GST_START_TEST (dash_mpdparser_get_streamPresentationOffset)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstClockTime offset;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period>"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <SegmentBase timescale=\"1000\" presentationTimeOffset=\"3000\">"
+      "      </SegmentBase>"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* test the stream presentation time offset */
+  offset = gst_mpd_parser_get_stream_presentation_offset (mpdclient, 0);
+  /* seems to be set only for template segments, so here it is 0 */
+  assert_equals_int (offset, 0);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling segments
+ *
+ */
+GST_START_TEST (dash_mpdparser_segments)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  gboolean hasNextSegment;
+  GstActiveStream *activeStream;
+  GstFlowReturn flow;
+  GstMediaSegment segment;
+  GstDateTime *segmentEndTime;
+  GstDateTime *gst_time;
+  GDateTime *g_time;
+  GstClockTime ts;
+  gint64 diff;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     type=\"dynamic\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period id=\"Period0\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "        <SegmentList duration=\"45\">"
+      "          <SegmentURL media=\"TestMedia1\""
+      "                      mediaRange=\"10-20\""
+      "                      index=\"TestIndex1\""
+      "                      indexRange=\"30-40\">"
+      "          </SegmentURL>"
+      "          <SegmentURL media=\"TestMedia2\""
+      "                      mediaRange=\"20-30\""
+      "                      index=\"TestIndex2\""
+      "                      indexRange=\"40-50\">"
+      "          </SegmentURL>"
+      "        </SegmentList>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* segment_index 0, segment_count 2.
+   * Has next segment and can advance to next segment
+   */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 1);
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_OK);
+
+  /* segment_index 1, segment_count 2.
+   * Does not have next segment and can not advance to next segment
+   */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 0);
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_EOS);
+
+  /* go to first segment */
+  gst_mpd_client_seek_to_first_segment (mpdclient);
+
+  /* segment_index 0, segment_count 2.
+   * Has next segment and can advance to next segment
+   */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 1);
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_OK);
+
+  /* segment_index 1, segment_count 2
+   * Does not have next segment
+   */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 0);
+
+  /* get chunk 0. segment_index will not change */
+  ret = gst_mpdparser_get_chunk_by_index (mpdclient, 0, 0, &segment);
+  assert_equals_int (ret, 1);
+  assert_equals_int (segment.number, 1);
+
+  /* segment index is still 1 */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 0);
+
+  /* each segment has a duration of 0 hours, 0 min 45 seconds
+   * segment index is 1.
+   * End time is at the end of segment 1, so 2 * segment_duration = 2 * 45s
+   */
+  segmentEndTime =
+      gst_mpd_client_get_next_segment_availability_end_time (mpdclient,
+      activeStream);
+  assert_equals_int (gst_date_time_get_year (segmentEndTime), 2015);
+  assert_equals_int (gst_date_time_get_month (segmentEndTime), 3);
+  assert_equals_int (gst_date_time_get_day (segmentEndTime), 24);
+  assert_equals_int (gst_date_time_get_hour (segmentEndTime), 0);
+  assert_equals_int (gst_date_time_get_minute (segmentEndTime), 1);
+  assert_equals_int (gst_date_time_get_second (segmentEndTime), 30);
+  gst_date_time_unref (segmentEndTime);
+
+  /* seek to time */
+  gst_time = gst_date_time_new_from_iso8601_string ("2015-03-24T0:0:20Z");
+  g_time = gst_date_time_to_g_date_time (gst_time);
+  ret = gst_mpd_client_seek_to_time (mpdclient, g_time);
+  assert_equals_int (ret, 1);
+  gst_date_time_unref (gst_time);
+  g_date_time_unref (g_time);
+
+  /* segment index is now 0 */
+  hasNextSegment =
+      gst_mpd_client_has_next_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (hasNextSegment, 1);
+
+  /* check if stream at moment ts is available.
+   * timeShiftBufferDepth was not set, so it is considered infinite.
+   * All segments from the past must be available
+   */
+  ts = 30 * GST_SECOND;
+  ret = gst_mpd_client_check_time_position (mpdclient, activeStream, ts, &diff);
+  assert_equals_int (ret, 0);
+  assert_equals_int64 (diff, 0);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling headers
+ *
+ */
+GST_START_TEST (dash_mpdparser_headers)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  gchar *uri;
+  gint64 range_start;
+  gint64 range_end;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     type=\"dynamic\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period id=\"Period0\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "        <SegmentBase indexRange=\"10-20\">"
+      "          <Initialization sourceURL=\"TestSourceUrl\""
+      "                          range=\"100-200\">"
+      "          </Initialization>"
+      "        </SegmentBase>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  /* get segment url and range from segment Initialization */
+  ret =
+      gst_mpd_client_get_next_header (mpdclient, &uri, 0, &range_start,
+      &range_end);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (uri, "TestSourceUrl");
+  assert_equals_int64 (range_start, 100);
+  assert_equals_int64 (range_end, 200);
+  g_free (uri);
+
+  /* get segment url and range from segment indexRange */
+  ret =
+      gst_mpd_client_get_next_header_index (mpdclient, &uri, 0, &range_start,
+      &range_end);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (uri, "TestSourceUrl");
+  assert_equals_int64 (range_start, 10);
+  assert_equals_int64 (range_end, 20);
+  g_free (uri);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling fragments
+ *
+ */
+GST_START_TEST (dash_mpdparser_fragments)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstMediaFragmentInfo fragment;
+  GstActiveStream *activeStream;
+  GstClockTime nextFragmentDuration;
+  GstClockTime nextFragmentTimestamp;
+  GstClockTime nextFragmentTimestampEnd;
+  GstClockTime periodStartTime;
+  GstClockTime expectedDuration;
+  GstClockTime expectedTimestamp;
+  GstClockTime expectedTimestampEnd;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period id=\"Period0\" start=\"P0Y0M0DT0H0M10S\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* expected duration of the next fragment */
+  expectedDuration = duration_to_ms (0, 0, 0, 3, 3, 20, 0);
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 0, 0);
+  expectedTimestampEnd = duration_to_ms (0, 0, 0, 3, 3, 20, 0);
+
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "");
+  assert_equals_int64 (fragment.range_start, 0);
+  assert_equals_int64 (fragment.range_end, -1);
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  periodStartTime = gst_mpd_parser_get_period_start_time (mpdclient);
+  assert_equals_uint64 (periodStartTime, 10 * GST_SECOND);
+
+  nextFragmentDuration =
+      gst_mpd_client_get_next_fragment_duration (mpdclient, activeStream);
+  assert_equals_uint64 (nextFragmentDuration, expectedDuration * GST_MSECOND);
+
+  ret =
+      gst_mpd_client_get_next_fragment_timestamp (mpdclient, 0,
+      &nextFragmentTimestamp);
+  assert_equals_int (ret, TRUE);
+  assert_equals_uint64 (nextFragmentTimestamp, expectedTimestamp * GST_MSECOND);
+
+  ret =
+      gst_mpd_client_get_last_fragment_timestamp_end (mpdclient, 0,
+      &nextFragmentTimestampEnd);
+  assert_equals_int (ret, TRUE);
+  assert_equals_uint64 (nextFragmentTimestampEnd,
+      expectedTimestampEnd * GST_MSECOND);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test inheriting segmentBase from parent
+ *
+ */
+GST_START_TEST (dash_mpdparser_inherited_segmentBase)
+{
+  GstPeriodNode *periodNode;
+  GstSegmentBaseType *segmentBase;
+  GstAdaptationSetNode *adaptationSet;
+  GstRepresentationNode *representation;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">"
+      "  <Period>"
+      "    <AdaptationSet>"
+      "      <SegmentBase timescale=\"100\">"
+      "      </SegmentBase>"
+      "      <Representation>"
+      "        <SegmentBase timescale=\"200\">"
+      "        </SegmentBase>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+  adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+  representation = (GstRepresentationNode *)
+      adaptationSet->Representations->data;
+
+  /* test segment base from adaptation set */
+  segmentBase = adaptationSet->SegmentBase;
+  assert_equals_uint64 (segmentBase->timescale, 100);
+
+  /* test segment base from representation */
+  segmentBase = representation->SegmentBase;
+  assert_equals_uint64 (segmentBase->timescale, 200);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test inheriting segmentURL from parent
+ *
+ */
+GST_START_TEST (dash_mpdparser_inherited_segmentURL)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstActiveStream *activeStream;
+  GstMediaFragmentInfo fragment;
+  GstClockTime expectedDuration;
+  GstClockTime expectedTimestamp;
+  GstFlowReturn flow;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period start=\"P0Y0M0DT0H0M10S\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <SegmentList duration=\"100\">"
+      "        <SegmentURL media=\"TestMediaAdaptation\""
+      "                    mediaRange=\"10-20\""
+      "                    index=\"TestIndexAdaptation\""
+      "                    indexRange=\"30-40\">"
+      "        </SegmentURL>"
+      "      </SegmentList>"
+      "      <Representation>"
+      "        <SegmentList duration=\"110\">"
+      "          <SegmentURL media=\"TestMediaRep\""
+      "                      mediaRange=\"100-200\""
+      "                      index=\"TestIndexRep\""
+      "                      indexRange=\"300-400\">"
+      "          </SegmentURL>"
+      "        </SegmentList>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* expected duration of the next fragment
+   * Segment duration was set to 100 in AdaptationSet and to 110 in Representation
+   * We expect duration to be 110
+   */
+  expectedDuration = duration_to_ms (0, 0, 0, 0, 0, 110, 0);
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 0, 0);
+
+  /* the representation contains 2 segments
+   *  - one inherited from AdaptationSet (duration 100)
+   *  - the second defined in the Representation (duration 110)
+   *
+   * Both will have the duration specified in the Representation (110)
+   */
+
+  /* check first segment */
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMediaAdaptation");
+  assert_equals_int64 (fragment.range_start, 10);
+  assert_equals_int64 (fragment.range_end, 20);
+  assert_equals_string (fragment.index_uri, "/TestIndexAdaptation");
+  assert_equals_int64 (fragment.index_range_start, 30);
+  assert_equals_int64 (fragment.index_range_end, 40);
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  /* advance to next segment */
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_OK);
+
+  /* second segment starts after first ends */
+  expectedTimestamp = expectedTimestamp + expectedDuration;
+
+  /* check second segment */
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMediaRep");
+  assert_equals_int64 (fragment.range_start, 100);
+  assert_equals_int64 (fragment.range_end, 200);
+  assert_equals_string (fragment.index_uri, "/TestIndexRep");
+  assert_equals_int64 (fragment.index_range_start, 300);
+  assert_equals_int64 (fragment.index_range_end, 400);
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test segment list
+ *
+ */
+GST_START_TEST (dash_mpdparser_segment_list)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstActiveStream *activeStream;
+  GstMediaFragmentInfo fragment;
+  GstClockTime expectedDuration;
+  GstClockTime expectedTimestamp;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period start=\"P0Y0M0DT0H0M10S\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <Representation>"
+      "        <SegmentList duration=\"12000\">"
+      "          <SegmentURL media=\"TestMedia\""
+      "                      mediaRange=\"100-200\""
+      "                      index=\"TestIndex\""
+      "                      indexRange=\"300-400\">"
+      "          </SegmentURL>"
+      "        </SegmentList>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* expected duration of the next fragment
+   * Segment duration was set larger than period duration (12000 vs 11000).
+   * We expect it to be limited to period duration.
+   */
+  expectedDuration = duration_to_ms (0, 0, 0, 3, 3, 20, 0);
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 0, 0);
+
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMedia");
+  assert_equals_int64 (fragment.range_start, 100);
+  assert_equals_int64 (fragment.range_end, 200);
+  assert_equals_string (fragment.index_uri, "/TestIndex");
+  assert_equals_int64 (fragment.index_range_start, 300);
+  assert_equals_int64 (fragment.index_range_end, 400);
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+
+  gst_media_fragment_info_clear (&fragment);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test segment template
+ *
+ */
+GST_START_TEST (dash_mpdparser_segment_template)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstActiveStream *activeStream;
+  GstMediaFragmentInfo fragment;
+  GstClockTime expectedDuration;
+  GstClockTime expectedTimestamp;
+  GstClockTime periodStartTime;
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period start=\"P0Y0M0DT0H0M10S\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <Representation id=\"repId\" bandwidth=\"250000\">"
+      "        <SegmentTemplate duration=\"12000\""
+      "                         media=\"TestMedia_rep=$RepresentationID$number=$Number$bandwidth=$Bandwidth$time=$Time$\""
+      "                         index=\"TestIndex\">"
+      "        </SegmentTemplate>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* expected duration of the next fragment
+   * Segment duration was set larger than period duration (12000 vs 11000).
+   * We expect it to not be limited to period duration.
+   */
+  expectedDuration = duration_to_ms (0, 0, 0, 0, 0, 12000, 0);
+
+  /* while the period starts at 10ms, the fragment timestamp is supposed to be
+   * 0ms. timestamps are starting from 0 at every period, and only the overall
+   * composition of periods should consider the period start timestamp. In
+   * dashdemux this is done by mapping the 0 fragment timestamp to a stream
+   * time equal to the period start time.
+   */
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 0, 0);
+
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri,
+      "/TestMedia_rep=repIdnumber=1bandwidth=250000time=0");
+  assert_equals_int64 (fragment.range_start, 0);
+  assert_equals_int64 (fragment.range_end, -1);
+  assert_equals_string (fragment.index_uri, "/TestIndex");
+  assert_equals_int64 (fragment.index_range_start, 0);
+  assert_equals_int64 (fragment.index_range_end, -1);
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+
+  periodStartTime = gst_mpd_parser_get_period_start_time (mpdclient);
+  assert_equals_uint64 (periodStartTime, 10 * GST_SECOND);
+
+  gst_media_fragment_info_clear (&fragment);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test segment timeline
+ *
+ */
+GST_START_TEST (dash_mpdparser_segment_timeline)
+{
+  GList *adaptationSets;
+  GstAdaptationSetNode *adapt_set;
+  GstActiveStream *activeStream;
+  GstMediaFragmentInfo fragment;
+  GstClockTime expectedDuration;
+  GstClockTime expectedTimestamp;
+  GstFlowReturn flow;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period start=\"P0Y0M0DT0H0M10S\">"
+      "    <AdaptationSet mimeType=\"video/mp4\">"
+      "      <SegmentList>"
+      "        <SegmentTimeline>"
+      "          <S t=\"10\"  d=\"20\" r=\"30\"></S>"
+      "        </SegmentTimeline>"
+      "      </SegmentList>"
+      "      <Representation>"
+      "        <SegmentList>"
+      "          <SegmentTimeline>"
+      "            <S t=\"3\"  d=\"2\" r=\"1\"></S>"
+      "            <S t=\"10\" d=\"3\" r=\"0\"></S>"
+      "          </SegmentTimeline>"
+      "          <SegmentURL media=\"TestMedia0\""
+      "                      index=\"TestIndex0\">"
+      "          </SegmentURL>"
+      "          <SegmentURL media=\"TestMedia1\""
+      "                      index=\"TestIndex1\">"
+      "          </SegmentURL>"
+      "        </SegmentList>"
+      "      </Representation></AdaptationSet></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* get the list of adaptation sets of the first period */
+  adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient);
+  fail_if (adaptationSets == NULL);
+
+  /* setup streaming from the first adaptation set */
+  adapt_set = (GstAdaptationSetNode *) g_list_nth_data (adaptationSets, 0);
+  fail_if (adapt_set == NULL);
+  ret = gst_mpd_client_setup_streaming (mpdclient, adapt_set);
+  assert_equals_int (ret, TRUE);
+
+  activeStream = gst_mpdparser_get_active_stream_by_index (mpdclient, 0);
+  fail_if (activeStream == NULL);
+
+  /* expected duration of the next fragment */
+  expectedDuration = duration_to_ms (0, 0, 0, 0, 0, 2, 0);
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 3, 0);
+
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMedia0");
+  assert_equals_string (fragment.index_uri, "/TestIndex0");
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  /* advance to next segment */
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_OK);
+
+  /* second segment starts after first ends */
+  expectedTimestamp = expectedTimestamp + expectedDuration;
+
+  /* check second segment.
+   * It is a repeat of first segmentURL, because "r" in SegmentTimeline is 1
+   */
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMedia0");
+  assert_equals_string (fragment.index_uri, "/TestIndex0");
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  /* advance to next segment */
+  flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE);
+  assert_equals_int (flow, GST_FLOW_OK);
+
+  /* third segment has a small gap after the second ends  (t=10) */
+  expectedDuration = duration_to_ms (0, 0, 0, 0, 0, 3, 0);
+  expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 10, 0);
+
+  /* check third segment */
+  ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment);
+  assert_equals_int (ret, TRUE);
+  assert_equals_string (fragment.uri, "/TestMedia1");
+  assert_equals_string (fragment.index_uri, "/TestIndex1");
+  assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND);
+  assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND);
+  gst_media_fragment_info_clear (&fragment);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing empty xml string
+ *
+ */
+GST_START_TEST (dash_mpdparser_missing_xml)
+{
+  const gchar *xml = "";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing an xml with no mpd tag
+ *
+ */
+GST_START_TEST (dash_mpdparser_missing_mpd)
+{
+  const gchar *xml = "<?xml version=\"1.0\"?>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing an MPD with a wrong end tag
+ */
+GST_START_TEST (dash_mpdparser_no_end_tag)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\"> </NPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing an MPD with no default namespace
+ */
+GST_START_TEST (dash_mpdparser_no_default_namespace)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD profiles=\"urn:mpeg:dash:profile:isoff-main:2011\"></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling wrong period duration during attempts to
+ * infer a period duration from the start time of the next period
+ */
+GST_START_TEST (dash_mpdparser_wrong_period_duration_inferred_from_next_period)
+{
+  const gchar *periodName;
+
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period id=\"Period0\" duration=\"P0Y0M0DT1H1M0S\"></Period>"
+      "  <Period id=\"Period1\"></Period>"
+      "  <Period id=\"Period2\" start=\"P0Y0M0DT0H0M10S\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* period_idx should be 0 and we should have no active periods */
+  assert_equals_uint64 (mpdclient->period_idx, 0);
+  fail_unless (mpdclient->periods == NULL);
+
+  /* process the xml data */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, TRUE);
+
+  /* Period0 should be present */
+  fail_unless (mpdclient->periods != NULL);
+  periodName = gst_mpd_client_get_period_id (mpdclient);
+  assert_equals_string (periodName, "Period0");
+
+  /* Period1 should not be present due to wrong duration */
+  ret = gst_mpd_client_set_period_index (mpdclient, 1);
+  assert_equals_int (ret, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test handling wrong period duration during attempts to
+ * infer a period duration from the mediaPresentationDuration
+ */
+GST_START_TEST
+    (dash_mpdparser_wrong_period_duration_inferred_from_next_mediaPresentationDuration)
+{
+  const gchar *xml =
+      "<?xml version=\"1.0\"?>"
+      "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
+      "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
+      "     availabilityStartTime=\"2015-03-24T0:0:0\""
+      "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
+      "  <Period id=\"Period0\" start=\"P0Y0M0DT4H0M0S\"></Period></MPD>";
+
+  gboolean ret;
+  GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+  ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+  assert_equals_int (ret, TRUE);
+
+  /* period_idx should be 0 and we should have no active periods */
+  assert_equals_uint64 (mpdclient->period_idx, 0);
+  fail_unless (mpdclient->periods == NULL);
+
+  /* process the xml data
+   * should fail due to wrong duration in Period0 (start > mediaPresentationDuration)
+   */
+  ret = gst_mpd_client_setup_media_presentation (mpdclient);
+  assert_equals_int (ret, FALSE);
+
+  gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * create a test suite containing all dash testcases
+ */
+static Suite *
+dash_suite (void)
+{
+  Suite *s = suite_create ("dash");
+  TCase *tc_simpleMPD = tcase_create ("simpleMPD");
+  TCase *tc_complexMPD = tcase_create ("complexMPD");
+  TCase *tc_negativeTests = tcase_create ("negativeTests");
+
+  GST_DEBUG_CATEGORY_INIT (gst_dash_demux_debug, "gst_dash_demux_debug", 0,
+      "mpeg dash tests");
+
+  /* test parsing the simplest possible mpd */
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_validsimplempd);
+
+  /* tests parsing attributes from each element type */
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_mpd);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_programInformation);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_baseURL);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_location);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_metrics);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_metrics_range);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_metrics_reporting);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_baseURL);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_segmentBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentBase_initialization);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentBase_representationIndex);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_segmentList);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentList_multipleSegmentBaseType);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentBaseType);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentTimeline);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentList_multipleSegmentBaseType_segmentTimeline_s);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentList_multipleSegmentBaseType_bitstreamSwitching);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_segmentList_segmentURL);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_segmentTemplate);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentBaseType);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentTimeline);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_segmentTimeline_s);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_segmentTemplate_multipleSegmentBaseType_bitstreamSwitching);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representationBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representationBase_framePacking);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representationBase_audioChannelConfiguration);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representationBase_contentProtection);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_contentProtection_no_value);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_contentProtection_no_value_no_encoding);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_accessibility);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_role);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_rating);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_viewpoint);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_contentComponent);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_contentComponent_accessibility);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_contentComponent_role);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_contentComponent_rating);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_contentComponent_viewpoint);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_baseURL);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentBase_initialization);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentBase_representationIndex);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentList);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentTemplate);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_segmentTemplate_inherit);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_representationBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_baseURL);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_subRepresentation);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_subRepresentation_representationBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_segmentBase);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_segmentList);
+  tcase_add_test (tc_simpleMPD,
+      dash_mpdparser_period_adaptationSet_representation_segmentTemplate);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_period_subset);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_utctiming);
+
+  /* tests checking other possible values for attributes */
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_type_dynamic);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_template_parsing);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_isoff_ondemand_profile);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_GstDateTime);
+  tcase_add_test (tc_simpleMPD, dash_mpdparser_various_duration_formats);
+
+  /* tests checking the MPD management
+   * (eg. setting active streams, obtaining attributes values)
+   */
+  tcase_add_test (tc_complexMPD, dash_mpdparser_setup_media_presentation);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_setup_streaming);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_period_selection);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_period_at_time);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_adaptationSet_handling);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_representation_selection);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_activeStream_selection);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_activeStream_parameters);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_audio_languages);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_baseURL1);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_baseURL2);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_baseURL3);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_baseURL4);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_mediaPresentationDuration);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_get_streamPresentationOffset);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_segments);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_headers);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_fragments);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_inherited_segmentBase);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_inherited_segmentURL);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_segment_list);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_segment_template);
+  tcase_add_test (tc_complexMPD, dash_mpdparser_segment_timeline);
+
+  /* tests checking the parsing of missing/incomplete attributes of xml */
+  tcase_add_test (tc_negativeTests, dash_mpdparser_missing_xml);
+  tcase_add_test (tc_negativeTests, dash_mpdparser_missing_mpd);
+  tcase_add_test (tc_negativeTests, dash_mpdparser_no_end_tag);
+  tcase_add_test (tc_negativeTests, dash_mpdparser_no_default_namespace);
+  tcase_add_test (tc_negativeTests,
+      dash_mpdparser_wrong_period_duration_inferred_from_next_period);
+  tcase_add_test (tc_negativeTests,
+      dash_mpdparser_wrong_period_duration_inferred_from_next_mediaPresentationDuration);
+
+  suite_add_tcase (s, tc_simpleMPD);
+  suite_add_tcase (s, tc_complexMPD);
+  suite_add_tcase (s, tc_negativeTests);
+
+  return s;
+}
+
+GST_CHECK_MAIN (dash);
diff --git a/tests/check/elements/faac.c b/tests/check/elements/faac.c
index 5dfd99b..33d013d 100644
--- a/tests/check/elements/faac.c
+++ b/tests/check/elements/faac.c
@@ -242,19 +242,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = faac_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (faac);
diff --git a/tests/check/elements/faad.c b/tests/check/elements/faad.c
index f0714e4..d6287af 100644
--- a/tests/check/elements/faad.c
+++ b/tests/check/elements/faad.c
@@ -206,19 +206,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = faad_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (faad);
diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c
index 931ef62..0f7877f 100644
--- a/tests/check/elements/gdpdepay.c
+++ b/tests/check/elements/gdpdepay.c
@@ -90,18 +90,26 @@
 }
 
 static void
-gdpdepay_push_per_byte (const gchar * reason, const guint8 * bytes,
-    guint length)
+gdpdepay_push_mem_per_byte (const gchar * reason, GstBuffer * buf, guint nth)
 {
   int i;
   GstBuffer *inbuffer;
+  GstMapInfo map;
+  GstMemory *mem;
 
-  for (i = 0; i < length; ++i) {
+  mem = gst_buffer_peek_memory (buf, nth);
+  fail_unless (mem != NULL);
+
+  gst_memory_map (mem, &map, GST_MAP_READ);
+
+  for (i = 0; i < map.size; ++i) {
     inbuffer = gst_buffer_new_and_alloc (1);
-    gst_buffer_fill (inbuffer, 0, &bytes[i], 1);
+    gst_buffer_fill (inbuffer, 0, map.data + i, 1);
     fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK,
         "%s: failed pushing byte buffer", reason);
   }
+
+  gst_memory_unmap (mem, &map);
 }
 
 GST_START_TEST (test_audio_per_byte)
@@ -110,14 +118,9 @@
   GstPad *srcpad;
   GstElement *gdpdepay;
   GstBuffer *buffer, *outbuffer;
-  guint8 *header, *payload;
-  guint len;
-  GstDPPacketizer *pk;
   GstEvent *event;
   GstSegment segment;
 
-  pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
-
   gdpdepay = setup_gdpdepay ();
   srcpad = gst_element_get_static_pad (gdpdepay, "src");
 
@@ -136,58 +139,52 @@
 
   /* send stream-start event */
   event = gst_event_new_stream_start ("s-s-id-1234");
-  fail_unless (pk->packet_from_event (event, 0, &len, &header, &payload));
+  buffer = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
-  gdpdepay_push_per_byte ("caps header", header, len);
+  fail_unless (buffer != NULL);
+  gdpdepay_push_mem_per_byte ("stream-start header", buffer, 0);
   fail_unless_equals_int (g_list_length (buffers), 0);
-  gdpdepay_push_per_byte ("caps payload", payload,
-      gst_dp_header_payload_length (header));
+  gdpdepay_push_mem_per_byte ("stream-start payload", buffer, 1);
   fail_unless_equals_int (g_list_length (buffers), 0);
-
-  g_free (header);
-  g_free (payload);
+  gst_buffer_unref (buffer);
 
   /* create caps and buffer packets and push them */
   caps = gst_caps_from_string (AUDIO_CAPS_STRING);
-  fail_unless (pk->packet_from_caps (caps, 0, &len, &header, &payload));
+  buffer = gst_dp_payload_caps (caps, 0);
   gst_caps_unref (caps);
-  gdpdepay_push_per_byte ("caps header", header, len);
+  fail_unless (buffer != NULL);
+  gdpdepay_push_mem_per_byte ("caps header", buffer, 0);
   fail_unless_equals_int (g_list_length (buffers), 0);
-  gdpdepay_push_per_byte ("caps payload", payload,
-      gst_dp_header_payload_length (header));
+  gdpdepay_push_mem_per_byte ("caps payload", buffer, 1);
   fail_unless_equals_int (g_list_length (buffers), 0);
   caps = gst_pad_query_caps (srcpad, NULL);
   fail_if (gst_caps_is_any (caps));
   gst_caps_unref (caps);
-
-  g_free (header);
-  g_free (payload);
+  gst_buffer_unref (buffer);
 
   /* send segment */
   gst_segment_init (&segment, GST_FORMAT_TIME);
   event = gst_event_new_segment (&segment);
-  fail_unless (pk->packet_from_event (event, 0, &len, &header, &payload));
+  buffer = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
-  gdpdepay_push_per_byte ("caps header", header, len);
+  fail_unless (buffer != NULL);
+  gdpdepay_push_mem_per_byte ("segment header", buffer, 0);
   fail_unless_equals_int (g_list_length (buffers), 0);
-  gdpdepay_push_per_byte ("caps payload", payload,
-      gst_dp_header_payload_length (header));
+  gdpdepay_push_mem_per_byte ("segment payload", buffer, 1);
   fail_unless_equals_int (g_list_length (buffers), 0);
-
-  g_free (header);
-  g_free (payload);
+  gst_buffer_unref (buffer);
 
   buffer = gst_buffer_new_and_alloc (4);
   gst_buffer_fill (buffer, 0, "f00d", 4);
   GST_BUFFER_TIMESTAMP (buffer) = GST_SECOND;
   GST_BUFFER_DURATION (buffer) = GST_SECOND / 10;
-  fail_unless (pk->header_from_buffer (buffer, 0, &len, &header));
-  gdpdepay_push_per_byte ("buffer header", header, len);
-  fail_unless_equals_int (g_list_length (buffers), 0);
-  gdpdepay_push_per_byte ("buffer payload", (const guint8 *) "f00d",
-      gst_dp_header_payload_length (header));
-  g_free (header);
+  outbuffer = gst_dp_payload_buffer (buffer, 0);
   gst_buffer_unref (buffer);
+  fail_unless (outbuffer != NULL);
+  gdpdepay_push_mem_per_byte ("buffer header", outbuffer, 0);
+  fail_unless_equals_int (g_list_length (buffers), 0);
+  gdpdepay_push_mem_per_byte ("buffer payload", outbuffer, 1);
+  gst_buffer_unref (outbuffer);
 
   fail_unless_equals_int (g_list_length (buffers), 1);
   fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
@@ -206,8 +203,6 @@
   buffers = NULL;
   gst_object_unref (srcpad);
   cleanup_gdpdepay (gdpdepay);
-
-  gst_dp_packetizer_free (pk);
 }
 
 GST_END_TEST;
@@ -218,17 +213,10 @@
   GstPad *srcpad;
   GstElement *gdpdepay;
   GstBuffer *buffer, *inbuffer;
-  guint8 *caps_header, *caps_payload, *buf_header;
-  guint8 *streamstart_header, *streamstart_payload;
-  guint8 *segment_header, *segment_payload;
-  guint header_len, payload_len, streamstart_len, segment_len;
-  guint i;
-  GstDPPacketizer *pk;
+  GstBuffer *caps_buf, *streamstart_buf, *segment_buf, *data_buf;
   GstEvent *event;
   GstSegment segment;
 
-  pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
-
   gdpdepay = setup_gdpdepay ();
   srcpad = gst_element_get_static_pad (gdpdepay, "src");
 
@@ -248,67 +236,28 @@
 
   /* create stream-start event */
   event = gst_event_new_stream_start ("s-s-id-1234");
-  fail_unless (pk->packet_from_event (event, 0, &streamstart_len,
-          &streamstart_header, &streamstart_payload));
+  streamstart_buf = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
 
   /* create caps and buffer packets and push them as one buffer */
   caps = gst_caps_from_string (AUDIO_CAPS_STRING);
-  fail_unless (pk->packet_from_caps (caps, 0, &header_len, &caps_header,
-          &caps_payload));
+  caps_buf = gst_dp_payload_caps (caps, 0);
+  gst_caps_unref (caps);
 
   /* create segment */
   gst_segment_init (&segment, GST_FORMAT_TIME);
   event = gst_event_new_segment (&segment);
-  fail_unless (pk->packet_from_event (event, 0, &segment_len, &segment_header,
-          &segment_payload));
+  segment_buf = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
 
   buffer = gst_buffer_new_and_alloc (4);
   gst_buffer_fill (buffer, 0, "f00d", 4);
-  fail_unless (pk->header_from_buffer (buffer, 0, &header_len, &buf_header));
-
-  payload_len =
-      gst_dp_header_payload_length (caps_header) +
-      gst_dp_header_payload_length (streamstart_header) +
-      gst_dp_header_payload_length (segment_header);
-
-  inbuffer = gst_buffer_new_and_alloc (4 * GST_DP_HEADER_LENGTH +
-      payload_len + gst_buffer_get_size (buffer));
-  i = 0;
-
-  gst_buffer_fill (inbuffer, i, streamstart_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, streamstart_payload,
-      gst_dp_header_payload_length (streamstart_header));
-  i += gst_dp_header_payload_length (streamstart_header);
-
-  gst_buffer_fill (inbuffer, i, caps_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, caps_payload,
-      gst_dp_header_payload_length (caps_header));
-  i += gst_dp_header_payload_length (caps_header);
-
-  gst_buffer_fill (inbuffer, i, segment_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, segment_payload,
-      gst_dp_header_payload_length (segment_header));
-  i += gst_dp_header_payload_length (segment_header);
-
-  gst_buffer_fill (inbuffer, i, buf_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, "f00d", 4);
-
-  gst_caps_unref (caps);
+  data_buf = gst_dp_payload_buffer (buffer, 0);
   gst_buffer_unref (buffer);
 
-  g_free (streamstart_header);
-  g_free (streamstart_payload);
-  g_free (caps_header);
-  g_free (caps_payload);
-  g_free (segment_header);
-  g_free (segment_payload);
-  g_free (buf_header);
+  inbuffer = gst_buffer_append (streamstart_buf, caps_buf);
+  inbuffer = gst_buffer_append (inbuffer, segment_buf);
+  inbuffer = gst_buffer_append (inbuffer, data_buf);
 
   /* now push it */
   gst_pad_push (mysrcpad, inbuffer);
@@ -325,8 +274,6 @@
   buffers = NULL;
   ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
   cleanup_gdpdepay (gdpdepay);
-
-  gst_dp_packetizer_free (pk);
 }
 
 GST_END_TEST;
@@ -360,21 +307,12 @@
   GstPad *srcpad;
   GstElement *gdpdepay;
   GstBuffer *buffer, *inbuffer, *outbuffer, *shbuffer;
-  guint8 *caps_header, *caps_payload, *buf_header;
-  guint8 *streamstart_header, *streamstart_payload;
-  guint8 *segment_header, *segment_payload;
-  guint streamstart_len, segment_len;
+  GstBuffer *caps_buf, *ss_buf, *segment_buf, *data_buf;
   GstEvent *event;
   GstSegment segment;
-  GstMapInfo map;
-  guint header_len, payload_len;
-  guint i;
   GstStructure *structure;
   GValue array = { 0 };
   GValue value = { 0 };
-  GstDPPacketizer *pk;
-
-  pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
 
   gdpdepay = setup_gdpdepay_streamheader ();
   srcpad = gst_element_get_static_pad (gdpdepay, "src");
@@ -414,68 +352,26 @@
   /* basic events */
   /* create stream-start event */
   event = gst_event_new_stream_start ("s-s-id-1234");
-  fail_unless (pk->packet_from_event (event, 0, &streamstart_len,
-          &streamstart_header, &streamstart_payload));
+  ss_buf = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
 
   /* create segment */
   gst_segment_init (&segment, GST_FORMAT_TIME);
   event = gst_event_new_segment (&segment);
-  fail_unless (pk->packet_from_event (event, 0, &segment_len, &segment_header,
-          &segment_payload));
+  segment_buf = gst_dp_payload_event (event, 0);
   gst_event_unref (event);
 
   /* create GDP packets for the caps and the buffer, and put them in one
    * GDP buffer */
-  fail_unless (pk->packet_from_caps (caps, 0, &header_len, &caps_header,
-          &caps_payload));
-
-  fail_unless (pk->header_from_buffer (buffer, 0, &header_len, &buf_header));
-
-  payload_len =
-      gst_dp_header_payload_length (caps_header) +
-      gst_dp_header_payload_length (streamstart_header) +
-      gst_dp_header_payload_length (segment_header);
-
-  gst_buffer_map (buffer, &map, GST_MAP_READ);
-  inbuffer = gst_buffer_new_and_alloc (4 * GST_DP_HEADER_LENGTH +
-      payload_len + map.size);
-  i = 0;
-
-  gst_buffer_fill (inbuffer, i, streamstart_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, streamstart_payload,
-      gst_dp_header_payload_length (streamstart_header));
-  i += gst_dp_header_payload_length (streamstart_header);
-
-  gst_buffer_fill (inbuffer, i, caps_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, caps_payload,
-      gst_dp_header_payload_length (caps_header));
-  i += gst_dp_header_payload_length (caps_header);
-
-  gst_buffer_fill (inbuffer, i, segment_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, segment_payload,
-      gst_dp_header_payload_length (segment_header));
-  i += gst_dp_header_payload_length (segment_header);
-
-  gst_buffer_fill (inbuffer, i, buf_header, GST_DP_HEADER_LENGTH);
-  i += GST_DP_HEADER_LENGTH;
-  gst_buffer_fill (inbuffer, i, map.data, map.size);
-  gst_buffer_unmap (buffer, &map);
-
+  caps_buf = gst_dp_payload_caps (caps, 0);
   gst_caps_unref (caps);
+
+  data_buf = gst_dp_payload_buffer (buffer, 0);
   gst_buffer_unref (buffer);
 
-  g_free (streamstart_header);
-  g_free (streamstart_payload);
-  g_free (caps_header);
-  g_free (caps_payload);
-  g_free (segment_header);
-  g_free (segment_payload);
-  g_free (buf_header);
-
+  inbuffer = gst_buffer_append (ss_buf, caps_buf);
+  inbuffer = gst_buffer_append (inbuffer, segment_buf);
+  inbuffer = gst_buffer_append (inbuffer, data_buf);
 
   /* now push it */
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
@@ -501,8 +397,6 @@
   buffers = NULL;
   ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
   cleanup_gdpdepay (gdpdepay);
-
-  gst_dp_packetizer_free (pk);
 }
 
 GST_END_TEST;
diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c
index 704c54f..9db5a7d 100644
--- a/tests/check/elements/gdppay.c
+++ b/tests/check/elements/gdppay.c
@@ -110,7 +110,7 @@
 
   fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
   buffers = g_list_remove (buffers, outbuffer);
-  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 2);
+  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", refcount);
   length = GST_DP_HEADER_LENGTH + (strlen (caps_string) + 1);
   fail_unless_equals_int (gst_buffer_get_size (outbuffer), length);
   gst_buffer_unref (outbuffer);
@@ -147,6 +147,7 @@
 
   GST_DEBUG ("first buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x00, 4);
   caps = gst_caps_from_string (AUDIO_CAPS_STRING);
   gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
 
@@ -159,14 +160,13 @@
   fail_unless_equals_int (g_list_length (buffers), 4);
 
   /* first buffer is the stream-start event */
-  check_stream_start_buffer (2);
+  check_stream_start_buffer (1);
 
-  /* second buffer is the serialized caps;
-   * the element also holds a ref to it */
-  check_caps_buffer (2, caps);
+  /* second buffer is the serialized caps */
+  check_caps_buffer (1, caps);
 
   /* third buffer is the serialized new_segment event */
-  check_segment_buffer (2);
+  check_segment_buffer (1);
 
   /* the fourth buffer is the GDP buffer for our pushed buffer */
   fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
@@ -179,6 +179,7 @@
   /* second buffer */
   GST_DEBUG ("second buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x00, 4);
 
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
 
@@ -198,6 +199,7 @@
   /* a third buffer without caps set explicitly; should work */
   GST_DEBUG ("Creating third buffer, no caps set");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x00, 4);
 
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
 
@@ -319,15 +321,15 @@
   gst_caps_unref (sinkcaps);
 
   /* first buffer is the stream-start event */
-  check_stream_start_buffer (2);
+  check_stream_start_buffer (1);
 
   /* second buffer is the serialized caps;
    * the element also holds a ref to it */
-  check_caps_buffer (2, caps);
+  check_caps_buffer (1, caps);
 
   /* third buffer is the serialized new_segment event;
    * the element also holds a ref to it */
-  check_segment_buffer (2);
+  check_segment_buffer (1);
 
   /* the fourth buffer is the GDP buffer for our pushed buffer */
   fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
@@ -340,6 +342,7 @@
   /* second buffer */
   GST_DEBUG ("second buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x02, 4);
 
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
 
@@ -359,6 +362,7 @@
   /* a third buffer without caps set explicitly; should work */
   GST_DEBUG ("Creating third buffer, no caps set");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x03, 4);
 
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
 
@@ -406,6 +410,7 @@
 
   GST_DEBUG ("first buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x01, 4);
   ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
 
   /* pushing should trigger an error */
@@ -441,6 +446,7 @@
 
   GST_DEBUG ("first buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, 0x01, 4);
   caps = gst_caps_from_string (AUDIO_CAPS_STRING);
   gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
   gst_caps_unref (caps);
@@ -488,6 +494,7 @@
 
   GST_DEBUG ("first buffer");
   inbuffer = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (inbuffer, 0, g_random_int () & 0xff, 4);
   caps = gst_caps_from_string (AUDIO_CAPS_STRING);
   gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
 
@@ -500,16 +507,16 @@
   fail_unless_equals_int (g_list_length (buffers), 4);
 
   /* first buffer is the stream-start event */
-  check_stream_start_buffer (2);
+  check_stream_start_buffer (1);
 
   /* second buffer is the serialized caps;
    * the element also holds a ref to it */
-  check_caps_buffer (2, caps);
+  check_caps_buffer (1, caps);
 
   /* third buffer is the serialized new_segment event */
   fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
   buffers = g_list_remove (buffers, outbuffer);
-  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 2);
+  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
 
   /* verify the header checksum */
   /* CRC's start at 58 in the header */
diff --git a/tests/check/elements/glimagesink.c b/tests/check/elements/glimagesink.c
new file mode 100644
index 0000000..07f6899
--- /dev/null
+++ b/tests/check/elements/glimagesink.c
@@ -0,0 +1,244 @@
+/* GStreamer
+ *
+ * Unit tests for glimagesink
+ *
+ * Copyright (C) 2014 Julien Isorce <j.isorce@samsung.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/video/video.h>
+#include <gst/check/gstcheck.h>
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGBA"))
+    );
+
+static GMainLoop *loop = NULL;
+static GstElement *sinkelement = NULL;
+static GstPad *srcpad = NULL;
+
+/* On OSX it's required to have a main loop running in the
+ * main thread while using the display connection.
+ * So the call that use this display connection needs to be
+ * done in another thread.
+ * On other platforms a direct call can be done. */
+
+#ifdef __APPLE__
+#define DO_CALL(func, data) G_STMT_START { \
+  GThread *thread = g_thread_new (NULL, \
+  (GThreadFunc) func, data); \
+  g_main_loop_run (loop); \
+  g_thread_join (thread); \
+  thread = NULL; \
+} G_STMT_END
+#else
+#define DO_CALL(func, data) func (data)
+#endif
+
+#define PAD_FUNC(name, type, param, check) \
+  static gpointer do_##name##_func (type * param) { \
+  fail_unless (gst_pad_##name (srcpad, param) == check); \
+  if (loop) \
+    g_main_loop_quit (loop); \
+  return NULL; \
+}
+
+/* *INDENT-OFF* */
+PAD_FUNC (peer_query, GstQuery, query, TRUE)
+PAD_FUNC (push, GstBuffer, buf, GST_FLOW_OK)
+/* *INDENT-ON* */
+
+static void
+setup_glimagesink (void)
+{
+  GstCaps *caps = NULL;
+
+  sinkelement = gst_check_setup_element ("glimagesink");
+  srcpad = gst_check_setup_src_pad (sinkelement, &srctemplate);
+  gst_pad_set_active (srcpad, TRUE);
+
+  caps =
+      gst_caps_from_string
+      ("video/x-raw, width=320, height=240, format=RGBA, framerate=30/1");
+  gst_check_setup_events (srcpad, sinkelement, caps, GST_FORMAT_TIME);
+  gst_caps_unref (caps);
+}
+
+static void
+cleanup_glimagesink (void)
+{
+  gst_element_set_state (sinkelement, GST_STATE_NULL);
+  gst_element_get_state (sinkelement, NULL, NULL, GST_CLOCK_TIME_NONE);
+  gst_pad_set_active (srcpad, FALSE);
+  gst_check_teardown_src_pad (sinkelement);
+  gst_check_teardown_element (sinkelement);
+}
+
+/* Verify that glimagesink releases the buffers it currently
+ * owns, upon a drain query. */
+GST_START_TEST (test_query_drain)
+{
+  GstBuffer *buf = NULL;
+  GstBufferPool *originpool = NULL;
+  GstBufferPool *pool = NULL;
+  GstCaps *caps = NULL;
+  GstQuery *query = NULL;
+  GstStructure *config = NULL;
+  gint i = 0;
+  guint min = 0;
+  guint max = 0;
+  guint size = 0;
+  const gint maxbuffers = 4;
+
+#ifdef __APPLE__
+  loop = g_main_loop_new (NULL, FALSE);
+#endif
+
+  setup_glimagesink ();
+
+  /* GstBaseSink handles the drain query as well. */
+  g_object_set (sinkelement, "enable-last-sample", TRUE, NULL);
+
+  ASSERT_SET_STATE (sinkelement, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
+
+  caps = gst_pad_get_current_caps (srcpad);
+  fail_unless (gst_caps_is_fixed (caps));
+
+  /* Let's retrieve the GstGLBufferPool to change its min
+   * and max nb buffers. For that just send an allocation
+   * query and change the pool config. */
+  query = gst_query_new_allocation (caps, TRUE);
+  DO_CALL (do_peer_query_func, query);
+
+  fail_unless (gst_query_get_n_allocation_pools (query) == 1);
+
+  gst_query_parse_nth_allocation_pool (query, 0, &originpool, &size, &min,
+      &max);
+  fail_unless (originpool != NULL);
+  gst_query_unref (query);
+
+  config = gst_buffer_pool_get_config (originpool);
+  gst_buffer_pool_config_set_params (config, caps, size, maxbuffers,
+      maxbuffers);
+  fail_unless (gst_buffer_pool_set_config (originpool, config));
+
+  /* The gl pool is setup and ready to be activated. */
+  fail_unless (gst_buffer_pool_set_active (originpool, TRUE));
+
+  /* Let's build an upstream pool that will be feed with
+   * gl buffers. */
+  pool = gst_buffer_pool_new ();
+  config = gst_buffer_pool_get_config (pool);
+  gst_buffer_pool_config_set_params (config, caps, size, maxbuffers,
+      maxbuffers);
+  fail_unless (gst_buffer_pool_set_config (pool, config));
+  gst_caps_unref (caps);
+
+  fail_unless (gst_buffer_pool_set_active (pool, TRUE));
+
+  /* Unpopulate the pool and forget about its initial buffers 
+   * It is necessary because the pool has to know there are 
+   * N outstanding buffers. */
+  for (i = 0; i < maxbuffers; ++i) {
+    fail_unless (gst_buffer_pool_acquire_buffer (pool, &buf,
+            NULL) == GST_FLOW_OK);
+    gst_object_replace ((GstObject **) & buf->pool, NULL);
+    gst_buffer_unref (buf);
+  }
+
+  /* Transfer buffers from the gl pool to the upstream pool. */
+  for (i = 0; i < maxbuffers; ++i) {
+    fail_unless (gst_buffer_pool_acquire_buffer (originpool, &buf,
+            NULL) == GST_FLOW_OK);
+    gst_object_replace ((GstObject **) & buf->pool, (GstObject *) pool);
+    gst_buffer_unref (buf);
+  }
+
+  /* Push a lot of buffers like if a real pipeline was running. */
+  for (i = 0; i < 10 * maxbuffers; ++i) {
+    fail_unless (gst_buffer_pool_acquire_buffer (pool, &buf,
+            NULL) == GST_FLOW_OK);
+    DO_CALL (do_push_func, buf);
+  }
+
+  /* Claim back buffers to the upstream pool. This is the point
+   * of this unit test, i.e. this test checks that glimagesink
+   * releases the buffers it currently owns, upon drain query. */
+  query = gst_query_new_drain ();
+  DO_CALL (do_peer_query_func, query);
+
+  /* Transfer buffers back to the downstream pool to be release
+   * properly. This also make sure that all buffers are returned.
+   * Indeed gst_buffer_pool_acquire_buffer is blocking here and
+   * we have set a maximum. */
+  for (i = 0; i < maxbuffers; ++i) {
+    fail_unless (gst_buffer_pool_acquire_buffer (pool, &buf,
+            NULL) == GST_FLOW_OK);
+    gst_object_replace ((GstObject **) & buf->pool, (GstObject *) originpool);
+    gst_buffer_unref (buf);
+  }
+
+  fail_unless (gst_buffer_pool_set_active (originpool, FALSE));
+  gst_object_unref (originpool);
+
+  /* At this point the gl pool contains all its buffers. We can
+   * inactivate it to release the textures. Note that only the gl
+   * pool can release the textures properly because it has a
+   * reference on the gl context. */
+  fail_unless (gst_buffer_pool_set_active (pool, FALSE));
+  gst_object_unref (pool);
+
+  cleanup_glimagesink ();
+
+  if (loop)
+    g_main_loop_unref (loop);
+}
+
+GST_END_TEST;
+
+static Suite *
+glimagesink_suite (void)
+{
+  Suite *s = suite_create ("glimagesink");
+  TCase *tc = tcase_create ("general");
+
+  tcase_set_timeout (tc, 5);
+
+  tcase_add_checked_fixture (tc, setup_glimagesink, NULL);
+  tcase_add_test (tc, test_query_drain);
+  suite_add_tcase (s, tc);
+
+  return s;
+}
+
+int
+main (int argc, char **argv)
+{
+  Suite *s;
+  g_setenv ("GST_GL_XINITTHREADS", "1", TRUE);
+  gst_check_init (&argc, &argv);
+  s = glimagesink_suite ();
+  return gst_check_run_suite (s, "glimagesink", __FILE__);
+}
diff --git a/tests/check/elements/h263parse.c b/tests/check/elements/h263parse.c
index 13ec773..3616b41 100644
--- a/tests/check/elements/h263parse.c
+++ b/tests/check/elements/h263parse.c
@@ -134,6 +134,13 @@
   Suite *s = suite_create ("h263parse");
   TCase *tc_chain = tcase_create ("general");
 
+  /* init test context */
+  ctx_factory = "h263parse";
+  ctx_sink_template = &sinktemplate;
+  ctx_src_template = &srctemplate;
+  /* no timing info to parse */
+  ctx_no_metadata = TRUE;
+
   suite_add_tcase (s, tc_chain);
   tcase_add_test (tc_chain, test_parse_normal);
   tcase_add_test (tc_chain, test_parse_drain_single);
@@ -149,27 +156,4 @@
  *   - Both push- and pull-modes need to be tested
  *      * Pull-mode & EOS
  */
-
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = h263parse_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  /* init test context */
-  ctx_factory = "h263parse";
-  ctx_sink_template = &sinktemplate;
-  ctx_src_template = &srctemplate;
-  /* no timing info to parse */
-  ctx_no_metadata = TRUE;
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (h263parse);
diff --git a/tests/check/elements/h264parse.c b/tests/check/elements/h264parse.c
index 6ee6e75..d2515e8 100644
--- a/tests/check/elements/h264parse.c
+++ b/tests/check/elements/h264parse.c
@@ -381,7 +381,8 @@
   cdata =
       gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, h264_codec_data,
       h264_codec_data_size, 0, h264_codec_data_size, NULL, NULL);
-  gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, cdata, NULL);
+  gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, cdata,
+      "stream-format", G_TYPE_STRING, "avc", NULL);
   gst_buffer_unref (cdata);
   desc = gst_caps_to_string (caps);
   gst_caps_unref (caps);
diff --git a/tests/check/elements/hlsdemux_m3u8.c b/tests/check/elements/hlsdemux_m3u8.c
new file mode 100644
index 0000000..406123e
--- /dev/null
+++ b/tests/check/elements/hlsdemux_m3u8.c
@@ -0,0 +1,1348 @@
+/* GStreamer
+ *
+ * unit test for hlsdemux
+ *
+ * Copyright (C) <2012> Fluendo S.A <support@fluendo.com>
+ *  Authors: Andoni Morales Alastruey <amorales@fluendo.com>
+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+#undef GST_CAT_DEFAULT
+#include "m3u8.h"
+#include "m3u8.c"
+
+GST_DEBUG_CATEGORY (fragmented_debug);
+
+static const gchar *INVALID_PLAYLIST = "#EXTM3 UINVALID";
+
+static const gchar *ON_DEMAND_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/001.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/002.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/003.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *DOUBLES_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10.321,Test\n\
+http://media.example.com/001.ts\n\
+#EXTINF:9.6789,Test\n\
+http://media.example.com/002.ts\n\
+#EXTINF:10.2344,Test\n\
+http://media.example.com/003.ts\n\
+#EXTINF:9.92,Test\n\
+http://media.example.com/004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *LIVE_PLAYLIST = "#EXTM3U\n\
+#EXT-X-TARGETDURATION:8\n\
+#EXT-X-MEDIA-SEQUENCE:2680\n\
+\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence2680.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence2681.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence2682.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence2683.ts";
+
+static const gchar *LIVE_ROTATED_PLAYLIST = "#EXTM3U\n\
+#EXT-X-TARGETDURATION:8\n\
+#EXT-X-MEDIA-SEQUENCE:3001\n\
+\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence3001.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence3002.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence3003.ts\n\
+#EXTINF:8,\n\
+https://priv.example.com/fileSequence3004.ts";
+
+static const gchar *VARIANT_PLAYLIST = "#EXTM3U \n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=128000\n\
+http://example.com/low.m3u8\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000\n\
+http://example.com/mid.m3u8\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=768000\n\
+http://example.com/hi.m3u8\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=65000,CODECS=\"mp4a.40.5\"\n\
+http://example.com/audio-only.m3u8";
+
+static const gchar *EMPTY_LINES_VARIANT_PLAYLIST = "#EXTM3U \n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=128000\n\n\
+http://example.com/low.m3u8\n\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000\n\n\
+http://example.com/mid.m3u8\n\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=768000\n\n\
+http://example.com/hi.m3u8\n\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=65000,CODECS=\"mp4a.40.5\"\n\n\
+http://example.com/audio-only.m3u8";
+
+static const gchar *WINDOWS_EMPTY_LINES_VARIANT_PLAYLIST = "#EXTM3U \r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=128000\r\n\r\n\
+http://example.com/low.m3u8\r\n\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000\r\n\r\n\
+http://example.com/mid.m3u8\r\n\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=768000\r\n\r\n\
+http://example.com/hi.m3u8\r\n\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=65000,CODECS=\"mp4a.40.5\"\r\n\r\n\
+http://example.com/audio-only.m3u8";
+
+static const gchar *EMPTY_LINES_PLAYLIST = "#EXTM3U \n\n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Testr\n\n\
+http://media.example.com/001.ts\n\n\
+#EXTINF:10,Test\n\n\
+http://media.example.com/002.ts\n\n\
+#EXTINF:10,Test\n\n\
+http://media.example.com/003.ts\n\n\
+#EXTINF:10,Test\n\n\
+http://media.example.com/004.ts\n\n\
+#EXT-X-ENDLIST";
+
+static const gchar *WINDOWS_EMPTY_LINES_PLAYLIST = "#EXTM3U \r\n\
+#EXT-X-TARGETDURATION:10\r\n\r\n\
+#EXTINF:10,Test\r\n\r\n\
+http://media.example.com/001.ts\r\n\r\n\
+#EXTINF:10,Test\r\n\r\n\
+http://media.example.com/002.ts\r\n\r\n\
+#EXTINF:10,Test\r\n\r\n\
+http://media.example.com/003.ts\r\n\r\n\
+#EXTINF:10,Test\r\n\r\n\
+http://media.example.com/004.ts\r\n\r\n\
+#EXT-X-ENDLIST";
+
+static const gchar *BYTE_RANGES_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:40\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000@100\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000@1000\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000@2000\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000@3000\n\
+http://media.example.com/all.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *BYTE_RANGES_ACC_OFFSET_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:40\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000\n\
+http://media.example.com/all.ts\n\
+#EXTINF:10,Test\n\
+#EXT-X-BYTERANGE:1000\n\
+http://media.example.com/all.ts\n\
+#EXT-X-ENDLIST";
+
+#if 0
+static const gchar *ALTERNATE_AUDIO_PLAYLIST = "#EXTM3U\n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"English\",\
+  DEFAULT=YES,AUTOSELECT=YES,LANGUAGE=\"en\" \n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"Deutsche\",\
+  DEFAULT=NO,AUTOSELECT=YES,LANGUAGE=\"de\",\
+  URI=\"http://localhost/main/german-audio.m3u8\"\n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"Commentary\",\
+  DEFAULT=NO,AUTOSELECT=NO,\
+  URI=\"http://localhost/commentary/audio-only.m3u8\"\n\
+#EXT-X-STREAM-INF:BANDWIDTH=128000,CODECS=\"avc1.42001f\",AUDIO=\"aac\"\n\
+low/video-only.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=256000,CODECS=\"avc1.42001f\",AUDIO=\"aac\"\n\
+mid/video-only.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=768000,CODECS=\"avc1.42001f\",AUDIO=\"aac\"\n\
+hi/video-only.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS=\"mp4a.40.5\",AUDIO=\"aac\"\n\
+main/english-audio.m3u8";
+
+static const gchar *ALT_AUDIO_PLAYLIST_WITH_VIDEO_AUDIO = "#EXTM3U\n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"English\",\
+  DEFAULT=YES,AUTOSELECT=YES,LANGUAGE=\"en\" \n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"Deutsche\",\
+  DEFAULT=NO,AUTOSELECT=YES,LANGUAGE=\"de\",\
+  URI=\"http://localhost/main/german-audio.m3u8\"\n\
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"aac\",NAME=\"Commentary\",\
+  DEFAULT=NO,AUTOSELECT=NO,\
+  URI=\"http://localhost/commentary/audio-only.m3u8\"\n\
+#EXT-X-STREAM-INF:BANDWIDTH=128000,CODECS=\"avc1.42001f, mp4a.40.5\",AUDIO=\"aac\"\n\
+low/video-audio.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=256000,CODECS=\"avc1.42001f, mp4a.40.5\",AUDIO=\"aac\"\n\
+mid/video-audio.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=768000,CODECS=\"avc1.42001f, mp4a.40.5\",AUDIO=\"aac\"\n\
+hi/video-audio.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS=\"mp4a.40.5\",AUDIO=\"aac\"\n\
+main/english-audio.m3u8";
+
+static const gchar *ON_DEMAND_LOW_VIDEO_ONLY_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/low/video-only-001.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/low/video-only-002.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/low/video-only-003.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/low/video-only-004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *ON_DEMAND_MID_VIDEO_ONLY_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-001.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-002.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-003.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *ON_DEMAND_ENGLISH_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/english-001.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/english-002.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/english-003.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/english-004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *ON_DEMAND_GERMAN_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/german-001.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/german-002.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/german-003.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/audio/german-004.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *SUBTITLES_PLAYLIST = "#EXTM3U\n\
+#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"English\",\
+  DEFAULT=YES,LANGUAGE=\"en\",\
+  URI=\"http://localhost/main/subs-en.m3u8\"\n\
+#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"Deutsche\",\
+  DEFAULT=NO,LANGUAGE=\"de\",\
+  URI=\"http://localhost/main/subs-de.m3u8\"\n\
+#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"Spanish\",\
+  DEFAULT=NO,LANGUAGE=\"es\",\
+  URI=\"http://localhost/main/subs-es.m3u8\"\n\
+#EXT-X-STREAM-INF:BANDWIDTH=128000,CODECS=\"avc1.42001f, mp4a.40.5\",SUBTITLES=\"subs\"\n\
+low/video-audio.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=256000,CODECS=\"avc1.42001f, mp4a.40.5\",SUBTITLES=\"subs\"\n\
+mid/video-audio.m3u8\n\
+#EXT-X-STREAM-INF:BANDWIDTH=768000,CODECS=\"avc1.42001f, mp4a.40.5\",SUBTITLES=\"subs\"\n\
+hi/video-audio.m3u8";
+#endif
+
+static const gchar *AES_128_ENCRYPTED_PLAYLIST = "#EXTM3U \n\
+#EXT-X-TARGETDURATION:10\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-001.ts\n\
+#EXT-X-KEY:METHOD=NONE\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-002.ts\n\
+#EXT-X-KEY:METHOD=AES-128,URI=\"https://priv.example.com/key.bin\"\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-003.ts\n\
+#EXT-X-KEY:METHOD=AES-128,URI=\"https://priv.example.com/key2.bin\",IV=0x00000000000000000000000000000001\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-004.ts\n\
+#EXTINF:10,Test\n\
+http://media.example.com/mid/video-only-005.ts\n\
+#EXT-X-ENDLIST";
+
+static const gchar *WINDOWS_LINE_ENDINGS_PLAYLIST = "#EXTM3U \r\n\
+#EXT-X-TARGETDURATION:10\r\n\
+#EXTINF:10,Test\r\n\
+http://media.example.com/001.ts\r\n\
+#EXTINF:10,Test\r\n\
+http://media.example.com/002.ts\r\n\
+#EXTINF:10,Test\r\n\
+http://media.example.com/003.ts\r\n\
+#EXTINF:10,Test\r\n\
+http://media.example.com/004.ts\r\n\
+#EXT-X-ENDLIST";
+
+static const gchar *WINDOWS_LINE_ENDINGS_VARIANT_PLAYLIST = "#EXTM3U \r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=128000\r\n\
+http://example.com/low.m3u8\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000\r\n\
+http://example.com/mid.m3u8\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=768000\r\n\
+http://example.com/hi.m3u8\r\n\
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=65000,CODECS=\"mp4a.40.5\"\r\n\
+http://example.com/audio-only.m3u8";
+
+static GstM3U8Client *
+load_playlist (const gchar * data)
+{
+  gboolean ret;
+  GstM3U8Client *client;
+
+  client = gst_m3u8_client_new ("http://localhost/test.m3u8", NULL);
+  ret = gst_m3u8_client_update (client, g_strdup (data));
+  assert_equals_int (ret, TRUE);
+
+  return client;
+}
+
+GST_START_TEST (test_load_main_playlist_invalid)
+{
+  gboolean ret;
+  GstM3U8Client *client =
+      gst_m3u8_client_new ("http://localhost/test.m3u8", NULL);
+
+  ret = gst_m3u8_client_update (client, g_strdup (INVALID_PLAYLIST));
+  assert_equals_int (ret, FALSE);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_load_main_playlist_rendition)
+{
+  GstM3U8Client *client;
+
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+
+  assert_equals_int (g_list_length (client->main->files), 4);
+  assert_equals_int (g_list_length (client->current->files), 4);
+  assert_equals_int (client->sequence, 0);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+static void
+do_test_load_main_playlist_variant (const gchar * playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8 *stream;
+  GList *tmp;
+
+  client = load_playlist (playlist);
+
+  assert_equals_int (g_list_length (client->main->lists), 4);
+
+  /* Audio-Only */
+  tmp = g_list_first (client->main->lists);
+  stream = GST_M3U8 (tmp->data);
+  assert_equals_int (stream->bandwidth, 65000);
+  assert_equals_int (stream->program_id, 1);
+  assert_equals_string (stream->uri, "http://example.com/audio-only.m3u8");
+  assert_equals_string (stream->codecs, "\"mp4a.40.5\"");
+
+  /* Low */
+  tmp = g_list_next (tmp);
+  stream = GST_M3U8 (tmp->data);
+  assert_equals_int (stream->bandwidth, 128000);
+  assert_equals_int (stream->program_id, 1);
+  assert_equals_string (stream->uri, "http://example.com/low.m3u8");
+
+  /* Mid */
+  tmp = g_list_next (tmp);
+  stream = GST_M3U8 (tmp->data);
+  assert_equals_int (stream->bandwidth, 256000);
+  assert_equals_int (stream->program_id, 1);
+  assert_equals_string (stream->uri, "http://example.com/mid.m3u8");
+
+  /* High */
+  tmp = g_list_next (tmp);
+  stream = GST_M3U8 (tmp->data);
+  assert_equals_int (stream->bandwidth, 768000);
+  assert_equals_int (stream->program_id, 1);
+  assert_equals_string (stream->uri, "http://example.com/hi.m3u8");
+
+  /* Check the first playlist is selected */
+  assert_equals_int (client->current != NULL, TRUE);
+  assert_equals_int (client->current->bandwidth, 128000);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_START_TEST (test_load_main_playlist_variant)
+{
+  do_test_load_main_playlist_variant (VARIANT_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_load_windows_line_endings_variant_playlist)
+{
+  do_test_load_main_playlist_variant (WINDOWS_LINE_ENDINGS_VARIANT_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_load_main_playlist_with_empty_lines)
+{
+  do_test_load_main_playlist_variant (EMPTY_LINES_VARIANT_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_load_windows_main_playlist_with_empty_lines)
+{
+  do_test_load_main_playlist_variant (WINDOWS_EMPTY_LINES_VARIANT_PLAYLIST);
+}
+
+GST_END_TEST;
+
+static void
+check_on_demand_playlist (const gchar * data)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+
+  client = load_playlist (data);
+  pl = client->current;
+
+  /* Sequence should be 0 as it's an ondemand playlist */
+  assert_equals_int (client->sequence, 0);
+  /* Check that we are not live */
+  assert_equals_int (gst_m3u8_client_is_live (client), FALSE);
+  /* Check number of entries */
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/001.ts");
+  assert_equals_int (file->sequence, 0);
+  /* Check last media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_last (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/004.ts");
+  assert_equals_int (file->sequence, 3);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_START_TEST (test_on_demand_playlist)
+{
+  check_on_demand_playlist (ON_DEMAND_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_windows_line_endings_playlist)
+{
+  check_on_demand_playlist (WINDOWS_LINE_ENDINGS_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_empty_lines_playlist)
+{
+  check_on_demand_playlist (EMPTY_LINES_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_windows_empty_lines_playlist)
+{
+  check_on_demand_playlist (WINDOWS_EMPTY_LINES_PLAYLIST);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_live_playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+
+  client = load_playlist (LIVE_PLAYLIST);
+
+  pl = client->current;
+  /* Check that we are live */
+  assert_equals_int (gst_m3u8_client_is_live (client), TRUE);
+  assert_equals_int (client->sequence, 2681);
+  /* Check number of entries */
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_string (file->uri,
+      "https://priv.example.com/fileSequence2680.ts");
+  assert_equals_int (file->sequence, 2680);
+  /* Check last media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_last (pl->files)->data);
+  assert_equals_string (file->uri,
+      "https://priv.example.com/fileSequence2683.ts");
+  assert_equals_int (file->sequence, 2683);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+/* This test is for live sreams in which we pause the stream for more than the
+ * DVR window and we resume playback. The playlist has rotated completely and
+ * there is a jump in the media sequence that must be handled correctly. */
+GST_START_TEST (test_live_playlist_rotated)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+  gboolean ret;
+
+  client = load_playlist (LIVE_PLAYLIST);
+  pl = client->current;
+  assert_equals_int (client->sequence, 2681);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_int (file->sequence, 2680);
+
+  ret = gst_m3u8_client_update (client, g_strdup (LIVE_ROTATED_PLAYLIST));
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_next_fragment (client, NULL, NULL, NULL, NULL, NULL, NULL,
+      NULL, NULL, TRUE);
+  /* FIXME: Sequence should last - 3. Should it? */
+  assert_equals_int (client->sequence, 3001);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_int (file->sequence, 3001);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_playlist_with_doubles_duration)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+
+  client = load_playlist (DOUBLES_PLAYLIST);
+
+  pl = client->current;
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 0));
+  assert_equals_float (file->duration / (double) GST_SECOND, 10.321);
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 1));
+  assert_equals_float (file->duration / (double) GST_SECOND, 9.6789);
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 2));
+  assert_equals_float (file->duration / (double) GST_SECOND, 10.2344);
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 3));
+  assert_equals_float (file->duration / (double) GST_SECOND, 9.92);
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_playlist_with_encryption)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+  guint8 iv1[16] = { 0, };
+  guint8 iv2[16] = { 0, };
+
+  iv1[15] = 1;
+  iv2[15] = 2;
+
+  client = load_playlist (AES_128_ENCRYPTED_PLAYLIST);
+
+  pl = client->current;
+  assert_equals_int (g_list_length (pl->files), 5);
+
+  /* Check all media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 0));
+  fail_unless (file->key == NULL);
+
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 1));
+  fail_unless (file->key == NULL);
+
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 2));
+  fail_unless (file->key != NULL);
+  assert_equals_string (file->key, "https://priv.example.com/key.bin");
+  fail_unless (memcmp (&file->iv, iv2, 16) == 0);
+
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 3));
+  fail_unless (file->key != NULL);
+  assert_equals_string (file->key, "https://priv.example.com/key2.bin");
+  fail_unless (memcmp (&file->iv, iv1, 16) == 0);
+
+  file = GST_M3U8_MEDIA_FILE (g_list_nth_data (pl->files, 4));
+  fail_unless (file->key != NULL);
+  assert_equals_string (file->key, "https://priv.example.com/key2.bin");
+  fail_unless (memcmp (&file->iv, iv1, 16) == 0);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_update_invalid_playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  gboolean ret;
+
+  /* Test updates in on-demand playlists */
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+  pl = client->current;
+  assert_equals_int (g_list_length (pl->files), 4);
+  ret = gst_m3u8_client_update (client, g_strdup ("#INVALID"));
+  assert_equals_int (ret, FALSE);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_update_playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  gchar *live_pl;
+  gboolean ret;
+
+  /* Test updates in on-demand playlists */
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+  pl = client->current;
+  assert_equals_int (g_list_length (pl->files), 4);
+  ret = gst_m3u8_client_update (client, g_strdup (ON_DEMAND_PLAYLIST));
+  assert_equals_int (ret, TRUE);
+  assert_equals_int (g_list_length (pl->files), 4);
+  gst_m3u8_client_free (client);
+
+  /* Test updates in live playlists */
+  client = load_playlist (LIVE_PLAYLIST);
+  pl = client->current;
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Add a new entry to the playlist and check the update */
+  live_pl = g_strdup_printf ("%s\n%s\n%s", LIVE_PLAYLIST, "#EXTINF:8",
+      "https://priv.example.com/fileSequence2683.ts");
+  ret = gst_m3u8_client_update (client, live_pl);
+  assert_equals_int (ret, TRUE);
+  assert_equals_int (g_list_length (pl->files), 5);
+  /* Test sliding window */
+  ret = gst_m3u8_client_update (client, g_strdup (LIVE_PLAYLIST));
+  assert_equals_int (ret, TRUE);
+  assert_equals_int (g_list_length (pl->files), 4);
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_playlist_media_files)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+  pl = client->current;
+
+  /* Check number of entries */
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/001.ts");
+  assert_equals_int (file->sequence, 0);
+  assert_equals_float (file->duration, 10 * (double) GST_SECOND);
+  assert_equals_int (file->offset, 0);
+  assert_equals_int (file->size, -1);
+  assert_equals_string (file->title, "Test");
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_playlist_byte_range_media_files)
+{
+  GstM3U8Client *client;
+  GstM3U8 *pl;
+  GstM3U8MediaFile *file;
+
+  client = load_playlist (BYTE_RANGES_PLAYLIST);
+  pl = client->current;
+
+  /* Check number of entries */
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/all.ts");
+  assert_equals_int (file->sequence, 0);
+  assert_equals_float (file->duration, 10 * (double) GST_SECOND);
+  assert_equals_int (file->offset, 100);
+  assert_equals_int (file->size, 1000);
+  /* Check last media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_last (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/all.ts");
+  assert_equals_int (file->sequence, 3);
+  assert_equals_float (file->duration, 10 * (double) GST_SECOND);
+  assert_equals_int (file->offset, 3000);
+  assert_equals_int (file->size, 1000);
+
+  gst_m3u8_client_free (client);
+
+
+  client = load_playlist (BYTE_RANGES_ACC_OFFSET_PLAYLIST);
+  pl = client->current;
+
+  /* Check number of entries */
+  assert_equals_int (g_list_length (pl->files), 4);
+  /* Check first media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_first (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/all.ts");
+  assert_equals_int (file->sequence, 0);
+  assert_equals_float (file->duration, 10 * (double) GST_SECOND);
+  assert_equals_int (file->offset, 0);
+  assert_equals_int (file->size, 1000);
+  /* Check last media segments */
+  file = GST_M3U8_MEDIA_FILE (g_list_last (pl->files)->data);
+  assert_equals_string (file->uri, "http://media.example.com/all.ts");
+  assert_equals_int (file->sequence, 3);
+  assert_equals_float (file->duration, 10 * (double) GST_SECOND);
+  assert_equals_int (file->offset, 3000);
+  assert_equals_int (file->size, 1000);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_get_next_fragment)
+{
+  GstM3U8Client *client;
+  gboolean discontinous;
+  gchar *uri;
+  GstClockTime duration, timestamp;
+  gint64 range_start, range_end;
+
+  client = load_playlist (BYTE_RANGES_PLAYLIST);
+
+  /* Check the next fragment */
+  gst_m3u8_client_get_next_fragment (client, &discontinous, &uri, &duration,
+      &timestamp, &range_start, &range_end, NULL, NULL, TRUE);
+  assert_equals_int (discontinous, FALSE);
+  assert_equals_string (uri, "http://media.example.com/all.ts");
+  assert_equals_uint64 (timestamp, 0);
+  assert_equals_uint64 (duration, 10 * GST_SECOND);
+  assert_equals_uint64 (range_start, 100);
+  assert_equals_uint64 (range_end, 1099);
+  g_free (uri);
+
+  gst_m3u8_client_advance_fragment (client, TRUE);
+
+  /* Check next media segments */
+  gst_m3u8_client_get_next_fragment (client, &discontinous, &uri, &duration,
+      &timestamp, &range_start, &range_end, NULL, NULL, TRUE);
+  assert_equals_int (discontinous, FALSE);
+  assert_equals_string (uri, "http://media.example.com/all.ts");
+  assert_equals_uint64 (timestamp, 10 * GST_SECOND);
+  assert_equals_uint64 (duration, 10 * GST_SECOND);
+  assert_equals_uint64 (range_start, 1000);
+  assert_equals_uint64 (range_end, 1999);
+  g_free (uri);
+
+  gst_m3u8_client_advance_fragment (client, TRUE);
+
+  /* Check next media segments */
+  gst_m3u8_client_get_next_fragment (client, &discontinous, &uri, &duration,
+      &timestamp, &range_start, &range_end, NULL, NULL, TRUE);
+  assert_equals_int (discontinous, FALSE);
+  assert_equals_string (uri, "http://media.example.com/all.ts");
+  assert_equals_uint64 (timestamp, 20 * GST_SECOND);
+  assert_equals_uint64 (duration, 10 * GST_SECOND);
+  assert_equals_uint64 (range_start, 2000);
+  assert_equals_uint64 (range_end, 2999);
+  g_free (uri);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_get_duration)
+{
+  GstM3U8Client *client;
+
+  /* Test duration for on-demand playlists */
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+  assert_equals_uint64 (gst_m3u8_client_get_duration (client), 40 * GST_SECOND);
+  gst_m3u8_client_free (client);
+
+  /* Test duration for live playlists */
+  client = load_playlist (LIVE_PLAYLIST);
+  assert_equals_uint64 (gst_m3u8_client_get_duration (client),
+      GST_CLOCK_TIME_NONE);
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_get_target_duration)
+{
+  GstM3U8Client *client;
+
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+  assert_equals_uint64 (gst_m3u8_client_get_target_duration (client),
+      10 * GST_SECOND);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_get_stream_for_bitrate)
+{
+  GstM3U8Client *client;
+  GstM3U8 *stream;
+
+  client = load_playlist (VARIANT_PLAYLIST);
+  stream = gst_m3u8_client_get_playlist_for_bitrate (client, 0)->data;
+  assert_equals_int (stream->bandwidth, 65000);
+  stream = gst_m3u8_client_get_playlist_for_bitrate (client, G_MAXINT32)->data;
+  assert_equals_int (stream->bandwidth, 768000);
+  stream = gst_m3u8_client_get_playlist_for_bitrate (client, 300000)->data;
+  assert_equals_int (stream->bandwidth, 256000);
+  stream = gst_m3u8_client_get_playlist_for_bitrate (client, 500000)->data;
+  assert_equals_int (stream->bandwidth, 256000);
+  stream = gst_m3u8_client_get_playlist_for_bitrate (client, 255000)->data;
+  assert_equals_int (stream->bandwidth, 128000);
+
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+#if 0
+static void
+do_test_seek (GstM3U8Client * client, guint seek_pos, gint pos)
+{
+  GstClockTime cur_pos;
+  gboolean ret;
+
+  ret = gst_m3u8_client_seek (client, seek_pos * GST_SECOND);
+  if (pos == -1) {
+    assert_equals_int (ret, FALSE);
+    return;
+  }
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_position (client, &cur_pos, NULL);
+  assert_equals_uint64 (cur_pos, pos * GST_SECOND);
+}
+
+GST_START_TEST (test_seek)
+{
+  GstM3U8Client *client;
+
+  client = load_playlist (ON_DEMAND_PLAYLIST);
+
+  /* Test seek in the middle of a fragment */
+  do_test_seek (client, 1, 0);
+  do_test_seek (client, 11, 10);
+  do_test_seek (client, 22, 20);
+  do_test_seek (client, 39, 30);
+
+  /* Test exact seeks */
+  do_test_seek (client, 0, 0);
+  do_test_seek (client, 10, 10);
+  do_test_seek (client, 20, 20);
+  do_test_seek (client, 30, 30);
+
+  /* Test invalid seeks (end if list should be 30 + 10) */
+  do_test_seek (client, 39, 30);
+  do_test_seek (client, 40, -1);
+  gst_m3u8_client_free (client);
+
+  /* Test seeks on a live playlist */
+  client = load_playlist (LIVE_PLAYLIST);
+  do_test_seek (client, 0, 0);
+
+  do_test_seek (client, 8, 8);
+  do_test_seek (client, 20, 16);
+  do_test_seek (client, 30, 24);
+
+  do_test_seek (client, 3000, -1);
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_alternate_audio_playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8Media *media;
+  GList *alternates;
+
+  client = load_playlist (ALTERNATE_AUDIO_PLAYLIST);
+
+  assert_equals_int (g_list_length (client->main->streams), 4);
+  assert_equals_int (g_hash_table_size (client->main->video_rendition_groups),
+      0);
+  assert_equals_int (g_hash_table_size (client->main->audio_rendition_groups),
+      1);
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->audio_alternates), 3);
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->video_alternates), 0);
+
+  alternates =
+      g_hash_table_lookup (client->main->audio_rendition_groups, "aac");
+  assert_equals_int (alternates != NULL, TRUE);
+  media = GST_M3U8_MEDIA (g_list_nth_data (alternates, 0));
+  assert_equals_int (media->media_type, GST_M3U8_MEDIA_TYPE_AUDIO);
+  assert_equals_string (media->group_id, "aac");
+  assert_equals_string (media->name, "English");
+  assert_equals_string (media->language, "en");
+  assert_equals_string (media->uri, "http://localhost/main/english-audio.m3u8");
+  assert_equals_string (media->uri, GST_M3U8 (media->playlist)->uri);
+  assert_equals_int (media->is_default, TRUE);
+  assert_equals_int (media->autoselect, TRUE);
+
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->audio_alternates), 3);
+  /* Check the list of audio alternates */
+  alternates = gst_m3u8_client_get_alternates (client,
+      GST_M3U8_MEDIA_TYPE_AUDIO);
+  assert_equals_int (g_list_length (alternates), 3);
+  /* Default comes always first */
+  assert_equals_string (g_list_nth_data (alternates, 0), "English");
+  assert_equals_string (g_list_nth_data (alternates, 1), "Commentary");
+  assert_equals_string (g_list_nth_data (alternates, 2), "Deutsche");
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_subtitles_playlist)
+{
+  GstM3U8Client *client;
+  GstM3U8Media *media;
+  GList *alternates;
+
+  client = load_playlist (SUBTITLES_PLAYLIST);
+
+  assert_equals_int (g_list_length (client->main->streams), 3);
+  assert_equals_int (g_hash_table_size (client->main->video_rendition_groups),
+      0);
+  assert_equals_int (g_hash_table_size (client->main->audio_rendition_groups),
+      0);
+  assert_equals_int (g_hash_table_size (client->main->subtt_rendition_groups),
+      1);
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->audio_alternates), 0);
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->video_alternates), 0);
+  assert_equals_int (g_hash_table_size (client->
+          selected_stream->subtt_alternates), 3);
+
+  alternates =
+      g_hash_table_lookup (client->main->subtt_rendition_groups, "subs");
+  assert_equals_int (alternates != NULL, TRUE);
+  media = GST_M3U8_MEDIA (g_list_nth_data (alternates, 0));
+  assert_equals_int (media->media_type, GST_M3U8_MEDIA_TYPE_SUBTITLES);
+  assert_equals_string (media->group_id, "subs");
+  assert_equals_string (media->name, "English");
+  assert_equals_string (media->language, "en");
+  assert_equals_string (media->uri, "http://localhost/main/subs-en.m3u8");
+  assert_equals_string (media->uri, GST_M3U8 (media->playlist)->uri);
+  assert_equals_int (media->is_default, TRUE);
+  assert_equals_int (media->autoselect, FALSE);
+
+  /* Check the list of subtitles */
+  alternates = gst_m3u8_client_get_alternates (client,
+      GST_M3U8_MEDIA_TYPE_SUBTITLES);
+  assert_equals_int (g_list_length (alternates), 3);
+  assert_equals_string (g_list_nth_data (alternates, 0), "Deutsche");
+  assert_equals_string (g_list_nth_data (alternates, 1), "Spanish");
+  assert_equals_string (g_list_nth_data (alternates, 2), "English");
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+GST_START_TEST (test_select_subs_alternate)
+{
+  GstM3U8Client *client;
+  const gchar *a_uri, *v_uri, *s_uri;
+  gboolean ret;
+
+  /* Check with a playlist with alternative audio renditions where the video
+   * stream is video-only and therefor we always have 2 playlists, one for
+   * video and another one for audio */
+  client = load_playlist (SUBTITLES_PLAYLIST);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri == NULL, TRUE);
+  assert_equals_int (s_uri != NULL, TRUE);
+  assert_equals_string (s_uri, "http://localhost/main/subs-de.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_SUBTITLES,
+      "English");
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri == NULL, TRUE);
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+  assert_equals_int (s_uri != NULL, TRUE);
+  assert_equals_string (s_uri, "http://localhost/main/subs-en.m3u8");
+
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_SUBTITLES,
+      "Spanish");
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri == NULL, TRUE);
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+  assert_equals_int (s_uri != NULL, TRUE);
+  assert_equals_string (s_uri, "http://localhost/main/subs-es.m3u8");
+
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_SUBTITLES,
+      NULL);
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri == NULL, TRUE);
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+GST_START_TEST (test_select_alternate)
+{
+  GstM3U8Client *client;
+  const gchar *a_uri, *v_uri, *s_uri;
+  gboolean ret;
+
+  /* Check with a playlist with alternative audio renditions where the video
+   * stream is video-only and therefor we always have 2 playlists, one for
+   * video and another one for audio */
+  client = load_playlist (ALTERNATE_AUDIO_PLAYLIST);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/english-audio.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-only.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_AUDIO,
+      "Deutsche");
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/german-audio.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-only.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  /* Check that selecting the audio-only fallback stream we only have the audio
+   * uri */
+  gst_m3u8_client_set_current (client,
+      GST_M3U8_STREAM (client->main->streams->data));
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/german-audio.m3u8");
+  assert_equals_int (v_uri == NULL, TRUE);
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  gst_m3u8_client_free (client);
+
+  /* Now check with a playlist with alternative audio renditions where the
+   * video * stream has the default audio rendition muxed and therefore we
+   * only have 2 playlists when the audio alternative rendition is not the
+   * default one */
+  client = load_playlist (ALT_AUDIO_PLAYLIST_WITH_VIDEO_AUDIO);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri == NULL, TRUE);
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  /* Check that selecting the audio-only fallback stream we only have the audio
+   * uri */
+  gst_m3u8_client_set_current (client,
+      GST_M3U8_STREAM (client->main->streams->data));
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/english-audio.m3u8");
+  assert_equals_int (v_uri == NULL, TRUE);
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  /* Get back to the audio-video stream */
+  gst_m3u8_client_set_current (client,
+      GST_M3U8_STREAM (client->main->streams->next->data));
+  /* Now set a different audio and check that we have 2 playlists */
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_AUDIO,
+      "Deutsche");
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/german-audio.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-audio.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_simulation)
+{
+  GstM3U8Client *client;
+  const gchar *a_uri, *v_uri, *s_uri;
+  GstFragment *a_frag, *v_frag, *s_frag;
+  gboolean ret;
+
+  client = load_playlist (ALTERNATE_AUDIO_PLAYLIST);
+  /* The default selection should be audio-only, which only has audio and not
+   * video */
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/english-audio.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/low/video-only.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+
+  /* Update the playlists */
+  ret = gst_m3u8_client_update (client,
+      g_strdup (ON_DEMAND_LOW_VIDEO_ONLY_PLAYLIST),
+      g_strdup (ON_DEMAND_ENGLISH_PLAYLIST), NULL);
+  assert_equals_int (ret, TRUE);
+  assert_equals_int (g_list_length (client->selected_stream->selected_video->
+          files), 4);
+  assert_equals_int (g_list_length (client->selected_stream->selected_audio->
+          files), 4);
+
+  /* Get the first fragment */
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/low/video-only-001.ts");
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/english-001.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Get the next fragment */
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/low/video-only-002.ts");
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/english-002.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Switch to German audio */
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_AUDIO,
+      "Deutsche");
+  assert_equals_int (ret, TRUE);
+  /* Get the new uri's */
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/german-audio.m3u8");
+  /* On demand  so the uri does not need to be downloaded again */
+  assert_equals_int (v_uri == NULL, TRUE);
+  assert_equals_int (s_uri == NULL, TRUE);
+  /* Update the new uri's */
+  ret =
+      gst_m3u8_client_update (client,
+      g_strdup (ON_DEMAND_LOW_VIDEO_ONLY_PLAYLIST),
+      g_strdup (ON_DEMAND_GERMAN_PLAYLIST), NULL);
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/german-003.ts");
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/low/video-only-003.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Switch to a higher bitrate */
+  gst_m3u8_client_set_current (client,
+      gst_m3u8_client_get_stream_for_bitrate (client, 260000));
+  gst_m3u8_client_get_current_uri (client, &v_uri, &a_uri, &s_uri);
+  assert_equals_int (a_uri != NULL, TRUE);
+  assert_equals_string (a_uri, "http://localhost/main/german-audio.m3u8");
+  assert_equals_int (v_uri != NULL, TRUE);
+  assert_equals_string (v_uri, "http://localhost/mid/video-only.m3u8");
+  assert_equals_int (s_uri == NULL, TRUE);
+  ret =
+      gst_m3u8_client_update (client,
+      g_strdup (ON_DEMAND_MID_VIDEO_ONLY_PLAYLIST),
+      g_strdup (ON_DEMAND_GERMAN_PLAYLIST), NULL);
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/german-004.ts");
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/mid/video-only-004.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Seek to the beginning */
+  gst_m3u8_client_seek (client, 0);
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/german-001.ts");
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/mid/video-only-001.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Select English audio again */
+  ret =
+      gst_m3u8_client_set_alternate (client, GST_M3U8_MEDIA_TYPE_AUDIO,
+      "English");
+  assert_equals_int (ret, TRUE);
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/english-002.ts");
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/mid/video-only-002.ts");
+  g_object_unref (v_frag);
+  g_object_unref (a_frag);
+
+  /* Go to the audio-only fallback */
+  gst_m3u8_client_set_current (client,
+      gst_m3u8_client_get_stream_for_bitrate (client, 20000));
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_int (v_frag == NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/english-003.ts");
+  g_object_unref (a_frag);
+
+  /* Go to mid again */
+  gst_m3u8_client_set_current (client,
+      gst_m3u8_client_get_stream_for_bitrate (client, 260000));
+  gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (s_frag == NULL, TRUE);
+  assert_equals_int (a_frag != NULL, TRUE);
+  assert_equals_int (v_frag != NULL, TRUE);
+  assert_equals_string (a_frag->name,
+      "http://media.example.com/audio/english-004.ts");
+  assert_equals_string (v_frag->name,
+      "http://media.example.com/mid/video-only-004.ts");
+  g_object_unref (a_frag);
+  g_object_unref (v_frag);
+
+  /* End of stream */
+  ret = gst_m3u8_client_get_next_fragment (client, &v_frag, &a_frag, &s_frag);
+  assert_equals_int (ret, FALSE);
+
+  gst_m3u8_client_free (client);
+}
+
+GST_END_TEST;
+#endif
+
+static Suite *
+hlsdemux_suite (void)
+{
+  Suite *s = suite_create ("hlsdemux_m3u8");
+  TCase *tc_m3u8 = tcase_create ("m3u8client");
+
+  GST_DEBUG_CATEGORY_INIT (fragmented_debug, "hlsdemux_m3u", 0,
+      "hlsdemux m3u test");
+
+  suite_add_tcase (s, tc_m3u8);
+  tcase_add_test (tc_m3u8, test_load_main_playlist_invalid);
+  tcase_add_test (tc_m3u8, test_load_main_playlist_rendition);
+  tcase_add_test (tc_m3u8, test_load_main_playlist_variant);
+  tcase_add_test (tc_m3u8, test_load_windows_line_endings_variant_playlist);
+  tcase_add_test (tc_m3u8, test_load_main_playlist_with_empty_lines);
+  tcase_add_test (tc_m3u8, test_load_windows_main_playlist_with_empty_lines);
+  tcase_add_test (tc_m3u8, test_on_demand_playlist);
+  tcase_add_test (tc_m3u8, test_windows_line_endings_playlist);
+  tcase_add_test (tc_m3u8, test_windows_empty_lines_playlist);
+  tcase_add_test (tc_m3u8, test_empty_lines_playlist);
+  tcase_add_test (tc_m3u8, test_live_playlist);
+  tcase_add_test (tc_m3u8, test_live_playlist_rotated);
+  tcase_add_test (tc_m3u8, test_update_invalid_playlist);
+  tcase_add_test (tc_m3u8, test_update_playlist);
+  tcase_add_test (tc_m3u8, test_playlist_media_files);
+  tcase_add_test (tc_m3u8, test_playlist_byte_range_media_files);
+  tcase_add_test (tc_m3u8, test_get_next_fragment);
+  tcase_add_test (tc_m3u8, test_get_duration);
+  tcase_add_test (tc_m3u8, test_get_target_duration);
+  tcase_add_test (tc_m3u8, test_get_stream_for_bitrate);
+#if 0
+  tcase_add_test (tc_m3u8, test_seek);
+  tcase_add_test (tc_m3u8, test_alternate_audio_playlist);
+  tcase_add_test (tc_m3u8, test_subtitles_playlist);
+  tcase_add_test (tc_m3u8, test_select_alternate);
+  tcase_add_test (tc_m3u8, test_select_subs_alternate);
+  tcase_add_test (tc_m3u8, test_simulation);
+#endif
+  tcase_add_test (tc_m3u8, test_playlist_with_doubles_duration);
+  tcase_add_test (tc_m3u8, test_playlist_with_encryption);
+
+  return s;
+}
+
+GST_CHECK_MAIN (hlsdemux);
diff --git a/tests/check/elements/jpegparse.c b/tests/check/elements/jpegparse.c
index 392f529..ab97f86 100644
--- a/tests/check/elements/jpegparse.c
+++ b/tests/check/elements/jpegparse.c
@@ -137,7 +137,7 @@
 };
 
 guint8 test_data_sof0[] = {
-  0xff, 0xc0,
+  0xff, 0xc0,                   /* baseline dct-based */
   0x00, 0x11,                   /* size */
   0x08,                         /* precision */
   0x00, 0x3c,                   /* width */
@@ -327,8 +327,7 @@
 
   caps_out = gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE,
       "framerate", GST_TYPE_FRACTION, 1, 1, "format", G_TYPE_STRING,
-      "I420", "interlaced", G_TYPE_BOOLEAN, FALSE,
-      "width", G_TYPE_INT, 80, "height", G_TYPE_INT, 60, NULL);
+      "I420", "width", G_TYPE_INT, 80, "height", G_TYPE_INT, 60, NULL);
 
   buffer_in = make_my_input_buffer (test_data_app1_exif,
       sizeof (test_data_app1_exif));
@@ -353,8 +352,7 @@
 
   caps_out = gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE,
       "framerate", GST_TYPE_FRACTION, 1, 1, "format", G_TYPE_STRING,
-      "I420", "interlaced", G_TYPE_BOOLEAN, FALSE,
-      "width", G_TYPE_INT, 80, "height", G_TYPE_INT, 60, NULL);
+      "I420", "width", G_TYPE_INT, 80, "height", G_TYPE_INT, 60, NULL);
 
   buffer_in = make_my_input_buffer (test_data_comment,
       sizeof (test_data_comment));
@@ -384,19 +382,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = jpegparse_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (jpegparse);
diff --git a/tests/check/elements/kate.c b/tests/check/elements/kate.c
index 98eccf2..12e00f1 100644
--- a/tests/check/elements/kate.c
+++ b/tests/check/elements/kate.c
@@ -880,19 +880,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = kate_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (kate);
diff --git a/tests/check/elements/mpeg2enc.c b/tests/check/elements/mpeg2enc.c
index 24c7ab1..53a52b7 100644
--- a/tests/check/elements/mpeg2enc.c
+++ b/tests/check/elements/mpeg2enc.c
@@ -192,19 +192,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = mpeg2enc_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mpeg2enc);
diff --git a/tests/check/elements/mpeg4videoparse.c b/tests/check/elements/mpeg4videoparse.c
index 6cedc94..2f5e2fc 100644
--- a/tests/check/elements/mpeg4videoparse.c
+++ b/tests/check/elements/mpeg4videoparse.c
@@ -156,6 +156,16 @@
   Suite *s = suite_create ("mpeg4videoparse");
   TCase *tc_chain = tcase_create ("general");
 
+  /* init test context */
+  ctx_factory = "mpeg4videoparse";
+  ctx_sink_template = &sinktemplate;
+  ctx_src_template = &srctemplate;
+  ctx_headers[0].data = mpeg4_config;
+  ctx_headers[0].size = sizeof (mpeg4_config);
+  ctx_verify_buffer = verify_buffer;
+  /* no timing info to parse */
+  ctx_no_metadata = TRUE;
+
   suite_add_tcase (s, tc_chain);
   tcase_add_test (tc_chain, test_parse_normal);
   tcase_add_test (tc_chain, test_parse_drain_single);
@@ -171,30 +181,4 @@
  *   - Both push- and pull-modes need to be tested
  *      * Pull-mode & EOS
  */
-
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = mpeg4videoparse_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  /* init test context */
-  ctx_factory = "mpeg4videoparse";
-  ctx_sink_template = &sinktemplate;
-  ctx_src_template = &srctemplate;
-  ctx_headers[0].data = mpeg4_config;
-  ctx_headers[0].size = sizeof (mpeg4_config);
-  ctx_verify_buffer = verify_buffer;
-  /* no timing info to parse */
-  ctx_no_metadata = TRUE;
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mpeg4videoparse);
diff --git a/tests/check/elements/mpegtsmux.c b/tests/check/elements/mpegtsmux.c
index 903c4d5..8d53de7 100644
--- a/tests/check/elements/mpegtsmux.c
+++ b/tests/check/elements/mpegtsmux.c
@@ -54,6 +54,10 @@
                           "alignment = (string) nal, " \
                           "parsed = (boolean) true "
 
+#define KEYFRAME_DISTANCE 10
+
+typedef void (CheckOutputBuffersFunc) (GList * buffers);
+
 /* setup and teardown needs some special handling for muxer */
 static GstPad *
 setup_src_pad (GstElement * element,
@@ -146,8 +150,10 @@
 static void
 check_tsmux_pad (GstStaticPadTemplate * srctemplate,
     const gchar * src_caps_string, gint pes_id, gint pmt_id,
-    const gchar * sinkname)
+    const gchar * sinkname, CheckOutputBuffersFunc check_func, guint n_bufs,
+    gssize input_buf_size, guint alignment)
 {
+  GstClockTime ts;
   GstElement *mux;
   GstBuffer *inbuffer, *outbuffer;
   GstCaps *caps;
@@ -157,17 +163,46 @@
   gchar *padname;
 
   mux = setup_tsmux (srctemplate, sinkname, &padname);
+
+  if (alignment != 0)
+    g_object_set (mux, "alignment", alignment, NULL);
+
   fail_unless (gst_element_set_state (mux,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
       "could not set to playing");
 
-  inbuffer = gst_buffer_new_and_alloc (1);
   caps = gst_caps_from_string (src_caps_string);
   gst_check_setup_events (mysrcpad, mux, caps, GST_FORMAT_TIME);
   gst_caps_unref (caps);
-  GST_BUFFER_TIMESTAMP (inbuffer) = 0;
-  ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
-  fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+
+  ts = 0;
+  for (i = 0; i < n_bufs; ++i) {
+    GstFlowReturn flow;
+
+    if (input_buf_size >= 0)
+      inbuffer = gst_buffer_new_and_alloc (input_buf_size);
+    else
+      inbuffer = gst_buffer_new_and_alloc (g_random_int_range (0, 49141));
+
+    GST_BUFFER_TIMESTAMP (inbuffer) = ts;
+    ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+    if (i % KEYFRAME_DISTANCE == 0 && pes_id == 0xe0) {
+      GST_TRACE ("input keyframe");
+      GST_BUFFER_FLAG_UNSET (inbuffer, GST_BUFFER_FLAG_DELTA_UNIT);
+    } else {
+      GST_TRACE ("input delta");
+      GST_BUFFER_FLAG_SET (inbuffer, GST_BUFFER_FLAG_DELTA_UNIT);
+    }
+    flow = gst_pad_push (mysrcpad, inbuffer);
+    if (flow != GST_FLOW_OK)
+      fail ("Got %s flow instead of OK", gst_flow_get_name (flow));
+    ts += 40 * GST_MSECOND;
+  }
+
+  if (check_func)
+    check_func (buffers);
+
   num_buffers = g_list_length (buffers);
   /* all output might get aggregated */
   fail_unless (num_buffers >= 1);
@@ -199,12 +234,12 @@
       y = GST_READ_UINT16_BE (data);
       pid = y & (0x1FFF);
       data += 2;
-      GST_DEBUG ("pid: %d", pid);
+      GST_TRACE ("pid: %d", pid);
 
       y = (y >> 14) & 0x1;
       /* only check packets with payload_start_indicator == 1 */
       if (!y) {
-        GST_DEBUG ("not at start");
+        GST_TRACE ("not at start");
         continue;
       }
 
@@ -216,7 +251,7 @@
         y = *data;
         data++;
         data += y;
-        GST_DEBUG ("adaptation %d", y);
+        GST_TRACE ("adaptation %d", y);
       }
 
       if (pid == 0) {
@@ -317,7 +352,7 @@
 GST_START_TEST (test_video)
 {
   check_tsmux_pad (&video_src_template, VIDEO_CAPS_STRING, 0xE0, 0x1b,
-      "sink_%d");
+      "sink_%d", NULL, 1, 1, 0);
 }
 
 GST_END_TEST;
@@ -326,7 +361,7 @@
 GST_START_TEST (test_audio)
 {
   check_tsmux_pad (&audio_src_template, AUDIO_CAPS_STRING, 0xC0, 0x03,
-      "sink_%d");
+      "sink_%d", NULL, 1, 1, 0);
 }
 
 GST_END_TEST;
@@ -716,6 +751,58 @@
 
 GST_END_TEST;
 
+static void
+test_align_check_output (GList * bufs)
+{
+  GST_LOG ("%u buffers", g_list_length (bufs));
+  while (bufs != NULL) {
+    GstBuffer *buf = bufs->data;
+    gsize size;
+
+    size = gst_buffer_get_size (buf);
+    GST_LOG ("buffer, size = %5u", (guint) size);
+    fail_unless_equals_int (size, 7 * 188);
+    bufs = bufs->next;
+  }
+}
+
+GST_START_TEST (test_align)
+{
+  check_tsmux_pad (&video_src_template, VIDEO_CAPS_STRING, 0xE0, 0x1b,
+      "sink_%d", test_align_check_output, 817, -1, 7);
+}
+
+GST_END_TEST;
+
+static void
+test_keyframe_propagation_check_output (GList * bufs)
+{
+  guint keyframe_count = 0;
+
+  GST_LOG ("%u buffers", g_list_length (bufs));
+  while (bufs != NULL) {
+    GstBuffer *buf = bufs->data;
+    gboolean keyunit;
+
+    keyunit = !GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+
+    if (keyunit)
+      ++keyframe_count;
+
+    GST_LOG ("buffer, keyframe=%d", keyunit);
+    bufs = bufs->next;
+  }
+  fail_unless_equals_int (keyframe_count, 50 / KEYFRAME_DISTANCE);
+}
+
+GST_START_TEST (test_keyframe_flag_propagation)
+{
+  check_tsmux_pad (&video_src_template, VIDEO_CAPS_STRING, 0xE0, 0x1b,
+      "sink_%d", test_keyframe_propagation_check_output, 50, -1, 0);
+}
+
+GST_END_TEST;
+
 static Suite *
 mpegtsmux_suite (void)
 {
@@ -730,6 +817,8 @@
   tcase_add_test (tc_chain, test_force_key_unit_event_upstream);
   tcase_add_test (tc_chain, test_propagate_flow_status);
   tcase_add_test (tc_chain, test_multiple_state_change);
+  tcase_add_test (tc_chain, test_align);
+  tcase_add_test (tc_chain, test_keyframe_flag_propagation);
 
   return s;
 }
diff --git a/tests/check/elements/mpegvideoparse.c b/tests/check/elements/mpegvideoparse.c
index 07d73bf..58c4ee5 100644
--- a/tests/check/elements/mpegvideoparse.c
+++ b/tests/check/elements/mpegvideoparse.c
@@ -240,6 +240,16 @@
   Suite *s = suite_create ("mpegvideoparse");
   TCase *tc_chain = tcase_create ("general");
 
+  /* init test context */
+  ctx_factory = "mpegvideoparse";
+  ctx_sink_template = &sinktemplate;
+  ctx_src_template = &srctemplate;
+  ctx_headers[0].data = mpeg2_seq;
+  ctx_headers[0].size = sizeof (mpeg2_seq);
+  ctx_verify_buffer = verify_buffer;
+  ctx_setup = setup_element;
+
+
   suite_add_tcase (s, tc_chain);
   tcase_add_test (tc_chain, test_parse_normal);
   tcase_add_test (tc_chain, test_parse_drain_single);
@@ -257,29 +267,4 @@
  *   - Both push- and pull-modes need to be tested
  *      * Pull-mode & EOS
  */
-
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = mpegvideoparse_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  /* init test context */
-  ctx_factory = "mpegvideoparse";
-  ctx_sink_template = &sinktemplate;
-  ctx_src_template = &srctemplate;
-  ctx_headers[0].data = mpeg2_seq;
-  ctx_headers[0].size = sizeof (mpeg2_seq);
-  ctx_verify_buffer = verify_buffer;
-  ctx_setup = setup_element;
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mpegvideoparse);
diff --git a/tests/check/elements/mplex.c b/tests/check/elements/mplex.c
index 0e894eb..b65632c 100644
--- a/tests/check/elements/mplex.c
+++ b/tests/check/elements/mplex.c
@@ -298,19 +298,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = mplex_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mplex);
diff --git a/tests/check/elements/opus.c b/tests/check/elements/opus.c
index e7f9c3a..3afeb4e 100644
--- a/tests/check/elements/opus.c
+++ b/tests/check/elements/opus.c
@@ -375,19 +375,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = opus_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (opus);
diff --git a/tests/check/elements/pcapparse.c b/tests/check/elements/pcapparse.c
new file mode 100644
index 0000000..8a2a054
--- /dev/null
+++ b/tests/check/elements/pcapparse.c
@@ -0,0 +1,93 @@
+#include "parser.h"
+#include <gst/check/gstcheck.h>
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("raw/x-pcap"));
+
+static GstStaticPadTemplate sinktemplate_rtp = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp"));
+
+static guint8 pcap_header[] = {
+  0xd4, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+};
+
+static const guint pcap_frame_with_eth_padding_offset = 16 + 14 + 20 + 8;
+static guint8 pcap_frame_with_eth_padding[] = {
+  0x5f, 0x12, 0x4e, 0x54, 0x57, 0x70, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
+  0x3c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x29, 0xa6, 0x13, 0x41, 0x00, 0x0c,
+  0x29, 0xb2, 0x93, 0x7d, 0x08, 0x00, 0x45, 0x00, 0x00, 0x2c, 0x00, 0x00,
+  0x40, 0x00, 0x32, 0x11, 0x25, 0xb9, 0x52, 0xc5, 0x4d, 0xd6, 0xb9, 0x23,
+  0xc9, 0x49, 0x44, 0x66, 0x9f, 0xf2, 0x00, 0x18, 0x75, 0xe8, 0x80, 0xe3,
+  0x7c, 0xca, 0x79, 0xba, 0x09, 0xc0, 0x70, 0x6e, 0x8b, 0x33, 0x05, 0x0a,
+  0x00, 0xa0, 0x00, 0x00
+};
+
+static gboolean
+verify_buffer (buffer_verify_data_s * vdata, GstBuffer * buffer)
+{
+  guint offset = 0;
+  guint size = 0;
+
+  if (vdata->data_to_verify == pcap_frame_with_eth_padding) {
+    offset = pcap_frame_with_eth_padding_offset;
+    size = sizeof (pcap_frame_with_eth_padding) -
+      pcap_frame_with_eth_padding_offset - 2;
+  }
+
+  fail_unless_equals_int (gst_buffer_get_size (buffer), size);
+  fail_unless (gst_buffer_memcmp (buffer, 0, vdata->data_to_verify + offset,
+          size) == 0);
+
+  return TRUE;
+}
+
+static GstElement *
+setup_element (const gchar * desc)
+{
+  GstElement *element;
+  GstCaps * caps;
+
+  (void) desc;
+
+  caps = gst_caps_from_string ("application/x-rtp");
+  element = gst_check_setup_element ("pcapparse");
+  g_object_set (G_OBJECT (element), "caps", caps, NULL);
+  gst_caps_unref (caps);
+
+  return element;
+}
+
+GST_START_TEST (test_parse_frames_with_eth_padding)
+{
+  gst_parser_test_split (pcap_frame_with_eth_padding,
+      sizeof (pcap_frame_with_eth_padding));
+}
+GST_END_TEST;
+
+static Suite *
+pcapparse_suite (void)
+{
+  Suite *s = suite_create ("pcapparse");
+  TCase *tc_chain = tcase_create ("general");
+
+  ctx_factory = "pcapparse";
+  ctx_setup = setup_element;
+  ctx_sink_template = &sinktemplate_rtp;
+  ctx_src_template = &srctemplate;
+  ctx_headers[0].data = pcap_header;
+  ctx_headers[0].size = sizeof (pcap_header);
+  ctx_no_metadata = TRUE;
+  ctx_verify_buffer = verify_buffer;
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_parse_frames_with_eth_padding);
+
+  return s;
+}
+
+GST_CHECK_MAIN (pcapparse);
diff --git a/tests/check/elements/rtponvif.c b/tests/check/elements/rtponvif.c
new file mode 100644
index 0000000..cce808b
--- /dev/null
+++ b/tests/check/elements/rtponvif.c
@@ -0,0 +1,439 @@
+/*
+ * onviftimestamp.c
+ *
+ * Copyright (C) 2014 Axis Communications AB
+ *  Author: Guillaume Desmottes <guillaume.desmottes@collabora.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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/rtp/gstrtpbuffer.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("application/x-rtp")
+    );
+
+#define NTP_OFFSET (guint64) 1245
+#define TIMESTAMP 42
+
+static void
+setup_element (GstElement * element)
+{
+  mysrcpad = gst_check_setup_src_pad (element, &srctemplate);
+  mysinkpad = gst_check_setup_sink_pad (element, &sinktemplate);
+  gst_pad_set_active (mysrcpad, TRUE);
+  gst_pad_set_active (mysinkpad, TRUE);
+
+  fail_unless (gst_element_set_state (element,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+      "could not set to playing");
+}
+
+static GstElement *
+setup_rtponviftimestamp (gboolean set_e_bit)
+{
+  GstElement *timestamp;
+
+  GST_DEBUG ("setup_rtponviftimestamp");
+  timestamp = gst_check_setup_element ("rtponviftimestamp");
+
+  g_object_set (timestamp, "ntp-offset", NTP_OFFSET, "cseq", 0x12345678,
+      "set-e-bit", set_e_bit, NULL);
+
+  setup_element (timestamp);
+
+  return timestamp;
+}
+
+static void
+cleanup_element (GstElement * element)
+{
+  fail_unless (gst_element_set_state (element,
+          GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+
+  gst_pad_set_active (mysrcpad, FALSE);
+  if (mysinkpad)
+    gst_pad_set_active (mysinkpad, FALSE);
+  gst_check_teardown_src_pad (element);
+  gst_check_teardown_sink_pad (element);
+  gst_check_teardown_element (element);
+  mysrcpad = NULL;
+  mysinkpad = NULL;
+}
+
+static void
+cleanup_rtponviftimestamp (GstElement * timestamp)
+{
+  GST_DEBUG ("cleanup_rtponviftimestamp");
+
+  cleanup_element (timestamp);
+}
+
+static void
+check_buffer_equal (GstBuffer * buf, GstBuffer * expected)
+{
+  GstMapInfo info_buf, info_expected;
+
+  fail_if (buf == NULL);
+  fail_if (expected == NULL);
+
+  gst_buffer_map (buf, &info_buf, GST_MAP_READ);
+  gst_buffer_map (expected, &info_expected, GST_MAP_READ);
+
+  GST_LOG ("buffer: size %" G_GSIZE_FORMAT, info_buf.size);
+  GST_LOG ("expected: size %" G_GSIZE_FORMAT, info_expected.size);
+  GST_MEMDUMP ("buffer", info_buf.data, info_buf.size);
+  GST_MEMDUMP ("expected", info_expected.data, info_expected.size);
+
+  fail_unless (info_buf.size == info_expected.size,
+      "size of the buffers are not the same");
+  fail_unless (memcmp (info_buf.data, info_expected.data, info_buf.size) == 0,
+      "data is not the same");
+
+  gst_buffer_unmap (buf, &info_buf);
+  gst_buffer_unmap (expected, &info_expected);
+}
+
+/* Create a RTP buffer without the extension */
+static GstBuffer *
+create_rtp_buffer (guint64 timestamp, gboolean clean_point, gboolean discont)
+{
+  GstBuffer *buffer_in;
+  GstRTPBuffer rtpbuffer_in = GST_RTP_BUFFER_INIT;
+
+  buffer_in = gst_rtp_buffer_new_allocate (4, 0, 0);
+  buffer_in->pts = timestamp;
+
+  if (!clean_point)
+    GST_BUFFER_FLAG_SET (buffer_in, GST_BUFFER_FLAG_DELTA_UNIT);
+  if (discont)
+    GST_BUFFER_FLAG_SET (buffer_in, GST_BUFFER_FLAG_DISCONT);
+
+  fail_unless (gst_rtp_buffer_map (buffer_in, GST_MAP_READ, &rtpbuffer_in));
+  fail_if (gst_rtp_buffer_get_extension (&rtpbuffer_in));
+  gst_rtp_buffer_unmap (&rtpbuffer_in);
+
+  return buffer_in;
+}
+
+static guint64
+convert_to_ntp (guint64 t)
+{
+  guint64 ntptime;
+
+  /* convert to NTP time. upper 32 bits should contain the seconds
+   * and the lower 32 bits, the fractions of a second. */
+  ntptime = gst_util_uint64_scale (t, (G_GINT64_CONSTANT (1) << 32),
+      GST_SECOND);
+
+  return ntptime;
+}
+
+/* Create a copy of @buffer_in having the RTP extension */
+static GstBuffer *
+create_extension_buffer (GstBuffer * buffer_in, gboolean clean_point,
+    gboolean end_contiguous, gboolean discont)
+{
+  GstBuffer *buffer_out;
+  GstRTPBuffer rtpbuffer_out = GST_RTP_BUFFER_INIT;
+  guint8 *data;
+  guint8 flags = 0;
+
+  buffer_out = gst_buffer_copy (buffer_in);
+
+  fail_unless (gst_rtp_buffer_map (buffer_out, GST_MAP_READWRITE,
+          &rtpbuffer_out));
+
+  /* extension */
+  gst_rtp_buffer_set_extension_data (&rtpbuffer_out, 0xABAC, 3);
+  fail_unless (gst_rtp_buffer_get_extension (&rtpbuffer_out));
+  gst_rtp_buffer_get_extension_data (&rtpbuffer_out, NULL, (gpointer) & data,
+      NULL);
+
+  /* NTP timestamp */
+  GST_WRITE_UINT64_BE (data, convert_to_ntp (buffer_in->pts + NTP_OFFSET));
+
+  /* C E D mbz */
+  if (clean_point)
+    flags |= (1 << 7);
+  if (end_contiguous)
+    flags |= (1 << 6);
+  if (discont)
+    flags |= (1 << 5);
+
+  GST_WRITE_UINT8 (data + 8, flags);
+
+  /* CSeq */
+  GST_WRITE_UINT8 (data + 9, 0x78);
+
+  memset (data + 10, 0, 4);
+
+  gst_rtp_buffer_unmap (&rtpbuffer_out);
+
+  return buffer_out;
+}
+
+static void
+do_one_buffer_test_apply (gboolean clean_point, gboolean discont)
+{
+  GstElement *apply;
+  GstBuffer *buffer_in, *buffer_out;
+  GstSegment segment;
+
+  apply = setup_rtponviftimestamp (FALSE);
+
+  buffer_in = create_rtp_buffer (TIMESTAMP, clean_point, discont);
+  buffer_out = create_extension_buffer (buffer_in, clean_point, FALSE, discont);
+
+  /* stream start */
+  fail_unless (gst_pad_push_event (mysrcpad,
+          gst_event_new_stream_start ("test")));
+
+  /* Push a segment */
+  gst_segment_init (&segment, GST_FORMAT_TIME);
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
+
+  /* Push buffer */
+  fail_unless (gst_pad_push (mysrcpad, buffer_in) == GST_FLOW_OK,
+      "failed pushing buffer");
+
+  check_buffer_equal (buffers->data, buffer_out);
+
+  g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+  g_list_free (buffers);
+  buffers = NULL;
+
+  ASSERT_OBJECT_REFCOUNT (apply, "rtponviftimestamp", 1);
+  cleanup_rtponviftimestamp (apply);
+}
+
+static void
+do_two_buffers_test_apply (gboolean end_contiguous)
+{
+  GstElement *apply;
+  GstBuffer *buffer_in, *buffer_out;
+  GstSegment segment;
+
+  apply = setup_rtponviftimestamp (TRUE);
+
+  buffer_in = create_rtp_buffer (TIMESTAMP, FALSE, FALSE);
+  buffer_out = create_extension_buffer (buffer_in, FALSE, end_contiguous,
+      FALSE);
+
+  /* stream start */
+  fail_unless (gst_pad_push_event (mysrcpad,
+          gst_event_new_stream_start ("test")));
+
+  /* Push a segment */
+  gst_segment_init (&segment, GST_FORMAT_TIME);
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
+
+  /* Push buffer */
+  fail_unless (gst_pad_push (mysrcpad, buffer_in) == GST_FLOW_OK,
+      "failed pushing buffer");
+
+  /* The buffer hasn't been pushed it as the element is waiting for the next
+   * buffer. */
+  g_assert_cmpuint (g_list_length (buffers), ==, 0);
+
+  /* A second buffer is pushed, it has the DISCONT flag if we want that the
+   * first one has the 'E' bit set. */
+  buffer_in = create_rtp_buffer (TIMESTAMP + 1, FALSE, end_contiguous);
+
+  fail_unless (gst_pad_push (mysrcpad, buffer_in) == GST_FLOW_OK,
+      "failed pushing buffer");
+
+  /* The first buffer has now been pushed out */
+  g_assert_cmpuint (g_list_length (buffers), ==, 1);
+
+  check_buffer_equal (buffers->data, buffer_out);
+
+  g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+  g_list_free (buffers);
+  buffers = NULL;
+
+  /* Push EOS */
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+
+  /* The second buffer has been pushed out */
+  g_assert_cmpuint (g_list_length (buffers), ==, 1);
+
+  /* Latest buffer always has the 'E' flag */
+  buffer_out = create_extension_buffer (buffer_in, FALSE, TRUE, end_contiguous);
+  check_buffer_equal (buffers->data, buffer_out);
+
+  ASSERT_OBJECT_REFCOUNT (apply, "rtponviftimestamp", 1);
+  cleanup_rtponviftimestamp (apply);
+}
+
+GST_START_TEST (test_apply_discont)
+{
+  do_one_buffer_test_apply (FALSE, TRUE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_apply_not_discont)
+{
+  do_one_buffer_test_apply (FALSE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_apply_clean_point)
+{
+  do_one_buffer_test_apply (TRUE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_apply_no_e_bit)
+{
+  do_two_buffers_test_apply (FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_apply_e_bit)
+{
+  do_two_buffers_test_apply (TRUE);
+}
+
+GST_END_TEST;
+
+static GstElement *
+setup_rtponvifparse (gboolean set_e_bit)
+{
+  GstElement *parse;
+
+  GST_DEBUG ("setup_rtponvifparse");
+  parse = gst_check_setup_element ("rtponvifparse");
+
+  setup_element (parse);
+
+  return parse;
+}
+
+static void
+cleanup_rtponvifparse (GstElement * parse)
+{
+  GST_DEBUG ("cleanup_rtponvifparse");
+
+  cleanup_element (parse);
+}
+
+static void
+test_parse (gboolean clean_point, gboolean discont)
+{
+  GstElement *parse;
+  GstBuffer *rtp, *buf;
+  GstSegment segment;
+
+  parse = setup_rtponvifparse (FALSE);
+
+  rtp = gst_rtp_buffer_new_allocate (4, 0, 0);
+  buf = create_extension_buffer (rtp, clean_point, FALSE, discont);
+  gst_buffer_unref (rtp);
+
+  /* stream start */
+  fail_unless (gst_pad_push_event (mysrcpad,
+          gst_event_new_stream_start ("test")));
+
+  /* Push a segment */
+  gst_segment_init (&segment, GST_FORMAT_TIME);
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment)));
+
+  /* Push buffer */
+  fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK,
+      "failed pushing buffer");
+
+  g_assert_cmpuint (g_list_length (buffers), ==, 1);
+  buf = buffers->data;
+
+  if (clean_point)
+    g_assert (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT));
+  else
+    g_assert (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT));
+
+  if (discont)
+    g_assert (GST_BUFFER_IS_DISCONT (buf));
+  else
+    g_assert (!GST_BUFFER_IS_DISCONT (buf));
+
+  g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+  g_list_free (buffers);
+  buffers = NULL;
+
+  ASSERT_OBJECT_REFCOUNT (parse, "rtponvifparse", 1);
+  cleanup_rtponvifparse (parse);
+}
+
+GST_START_TEST (test_parse_no_flag)
+{
+  test_parse (FALSE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_parse_clean_point)
+{
+  test_parse (TRUE, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_parse_discont)
+{
+  test_parse (FALSE, TRUE);
+}
+
+GST_END_TEST;
+
+static Suite *
+onviftimestamp_suite (void)
+{
+  Suite *s = suite_create ("onviftimestamp");
+  TCase *tc_chain;
+
+  tc_chain = tcase_create ("apply");
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_apply_discont);
+  tcase_add_test (tc_chain, test_apply_not_discont);
+  tcase_add_test (tc_chain, test_apply_clean_point);
+  tcase_add_test (tc_chain, test_apply_no_e_bit);
+  tcase_add_test (tc_chain, test_apply_e_bit);
+
+  tc_chain = tcase_create ("parse");
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_parse_no_flag);
+  tcase_add_test (tc_chain, test_parse_clean_point);
+  tcase_add_test (tc_chain, test_parse_discont);
+
+  return s;
+}
+
+GST_CHECK_MAIN (onviftimestamp);
diff --git a/tests/check/elements/templatematch.c b/tests/check/elements/templatematch.c
new file mode 100644
index 0000000..5b56718
--- /dev/null
+++ b/tests/check/elements/templatematch.c
@@ -0,0 +1,169 @@
+/*
+ * GStreamer
+ *
+ * unit test for templatematch
+ *
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *   Author: Thiago Santos <ts.santos@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
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#define CAPS_TMPL   "video/x-raw, format=(string)BGR"
+
+GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (CAPS_TMPL)
+    );
+GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (CAPS_TMPL)
+    );
+
+/* Create a 16x16 buffer split in 4 equal squares
+ * BG
+ * Rb
+ *
+ * B=Blue, G=Green, R=Red, b=black
+ */
+static GstBuffer *
+create_input_buffer (void)
+{
+  guint8 *data;
+  gsize size;
+  gint i, j, base;
+
+  size = 3 * 16 * 16;           /* BGR 16x16 */
+  data = g_malloc0 (size);
+
+  /* blue and green */
+  for (j = 0; j < 8; j++) {
+    for (i = 0; i < 8; i++) {
+      base = j * 16;
+      data[base + i] = 255;
+      data[base + i + 1] = 0;
+      data[base + i + 2] = 0;
+
+      data[base + 8 + i] = 0;
+      data[base + 8 + i + 1] = 255;
+      data[base + 8 + i + 2] = 0;
+    }
+  }
+  /* red */
+  for (j = 0; j < 8; j++) {
+    for (i = 0; i < 8; i++) {
+      base = 8 * 8 + j * 16;
+      data[base + i] = 0;
+      data[base + i + 1] = 0;
+      data[base + i + 2] = 255;
+    }
+  }
+
+  return gst_buffer_new_wrapped (data, size);
+}
+
+/* Test to make sure that we are using the same rgb format as opencv expects for
+ * template matching (BGR).
+ * Will use a blue 8x8 square as the template and as input a 16x16 frame divided
+ * evenly in 4 squares: Blue (top-left), Green (top-right), Red (bottom-left) and
+ * Black (bottom-right)
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=678485
+ */
+GST_START_TEST (test_match_blue_square)
+{
+  GstElement *element;
+  GstPad *sinkpad, *srcpad;
+  GstCaps *caps =
+      gst_caps_from_string (CAPS_TMPL ", width=(int)16, height=(int)16");
+  GstBus *bus;
+  GstMessage *msg;
+  const GstStructure *structure;
+  gchar *path;
+  GstBuffer *buf;
+  guint x, y, width, height;
+
+  element = gst_check_setup_element ("templatematch");
+  srcpad = gst_check_setup_src_pad (element, &srctemplate);
+  sinkpad = gst_check_setup_sink_pad (element, &sinktemplate);
+  gst_pad_set_active (srcpad, TRUE);
+  gst_check_setup_events (srcpad, element, caps, GST_FORMAT_TIME);
+  gst_pad_set_active (sinkpad, TRUE);
+
+  bus = gst_bus_new ();
+  gst_element_set_bus (element, bus);
+
+  path = g_build_filename (GST_TEST_FILES_PATH, "blue-square.png", NULL);
+  g_object_set (element, "template", path, NULL);
+  g_free (path);
+
+  fail_unless (gst_element_set_state (element,
+          GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+      "could not set to playing");
+
+  buf = create_input_buffer ();
+  fail_unless (gst_pad_push (srcpad, buf) == GST_FLOW_OK);
+
+  /* make sure that the template match message was posted, detecting the
+   * blue area in the top left corner */
+  msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ELEMENT);
+  fail_unless (msg != NULL);
+  fail_unless (GST_MESSAGE_SRC (msg) == GST_OBJECT_CAST (element));
+  structure = gst_message_get_structure (msg);
+  fail_unless (gst_structure_has_name (structure, "template_match"));
+  fail_unless (gst_structure_get_uint (structure, "x", &x));
+  fail_unless (gst_structure_get_uint (structure, "y", &y));
+  fail_unless (gst_structure_get_uint (structure, "width", &width));
+  fail_unless (gst_structure_get_uint (structure, "height", &height));
+  fail_unless (x == 0);
+  fail_unless (y == 0);
+  fail_unless (width == 8);
+  fail_unless (height == 8);
+
+  gst_message_unref (msg);
+
+  gst_element_set_state (element, GST_STATE_NULL);
+  gst_bus_set_flushing (bus, TRUE);
+  gst_object_unref (bus);
+  gst_caps_unref (caps);
+  gst_pad_set_active (srcpad, FALSE);
+  gst_pad_set_active (sinkpad, FALSE);
+  gst_object_unref (srcpad);
+  gst_object_unref (sinkpad);
+  gst_check_teardown_src_pad (element);
+  gst_check_teardown_sink_pad (element);
+  gst_check_teardown_element (element);
+}
+
+GST_END_TEST;
+
+static Suite *
+templatematch_suite (void)
+{
+  Suite *s = suite_create ("templatematch");
+  TCase *tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_match_blue_square);
+
+  return s;
+}
+
+GST_CHECK_MAIN (templatematch);
diff --git a/tests/check/elements/timidity.c b/tests/check/elements/timidity.c
index 339d140..5c85b65 100644
--- a/tests/check/elements/timidity.c
+++ b/tests/check/elements/timidity.c
@@ -71,19 +71,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = timidity_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (timidity);
diff --git a/tests/check/elements/voaacenc.c b/tests/check/elements/voaacenc.c
index 0cbeec0..15530d8 100644
--- a/tests/check/elements/voaacenc.c
+++ b/tests/check/elements/voaacenc.c
@@ -245,19 +245,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = voaacenc_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (voaacenc);
diff --git a/tests/check/elements/voamrwbenc.c b/tests/check/elements/voamrwbenc.c
index a6d3a01..1a8bf4e 100644
--- a/tests/check/elements/voamrwbenc.c
+++ b/tests/check/elements/voamrwbenc.c
@@ -176,19 +176,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = voamrwbenc_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (voamrwbenc);
diff --git a/tests/check/elements/x265enc.c b/tests/check/elements/x265enc.c
new file mode 100644
index 0000000..38186f1
--- /dev/null
+++ b/tests/check/elements/x265enc.c
@@ -0,0 +1,165 @@
+/* GStreamer
+ *
+ * Copyright (c) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * Copyright (c) 2010 David Schleef <ds@schleef.org>
+ * Copyright (c) 2014 Thijs Vermeir <thijs.vermeir@barco.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-h265, "
+        "width = (int) [1, MAX], "
+        "height = (int) [1, MAX], " "framerate = (fraction) [0, MAX]"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("video/x-raw, "
+        "format = (string) I420, "
+        "width = (int) [1, MAX], "
+        "height = (int) [1, MAX], " "framerate = (fraction) [0, MAX]"));
+
+static GstPad *sinkpad, *srcpad;
+
+static GstElement *
+setup_x265enc (const gchar * src_caps_str)
+{
+  GstElement *x265enc;
+  GstCaps *srccaps = NULL;
+  GstBus *bus;
+
+  if (src_caps_str) {
+    srccaps = gst_caps_from_string (src_caps_str);
+    fail_unless (srccaps != NULL);
+  }
+
+  x265enc = gst_check_setup_element ("x265enc");
+  fail_unless (x265enc != NULL);
+  srcpad = gst_check_setup_src_pad (x265enc, &srctemplate);
+  sinkpad = gst_check_setup_sink_pad (x265enc, &sinktemplate);
+  gst_pad_set_active (srcpad, TRUE);
+  gst_pad_set_active (sinkpad, TRUE);
+
+  gst_check_setup_events (srcpad, x265enc, srccaps, GST_FORMAT_TIME);
+
+  bus = gst_bus_new ();
+  gst_element_set_bus (x265enc, bus);
+
+  fail_unless (gst_element_set_state (x265enc,
+          GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+      "could not set to playing");
+
+  if (srccaps)
+    gst_caps_unref (srccaps);
+
+  buffers = NULL;
+  return x265enc;
+}
+
+static void
+cleanup_x265enc (GstElement * x265enc)
+{
+  GstBus *bus;
+
+  /* Free parsed buffers */
+  gst_check_drop_buffers ();
+
+  bus = GST_ELEMENT_BUS (x265enc);
+  gst_bus_set_flushing (bus, TRUE);
+  gst_object_unref (bus);
+
+  gst_pad_set_active (srcpad, FALSE);
+  gst_pad_set_active (sinkpad, FALSE);
+  gst_check_teardown_src_pad (x265enc);
+  gst_check_teardown_sink_pad (x265enc);
+  gst_check_teardown_element (x265enc);
+}
+
+GST_START_TEST (test_encode_simple)
+{
+  GstElement *x265enc;
+  GstBuffer *buffer;
+  gint i;
+  GList *l;
+  GstCaps *outcaps, *sinkcaps;
+  GstSegment seg;
+
+  x265enc =
+      setup_x265enc
+      ("video/x-raw,format=(string)I420,width=(int)320,height=(int)240,framerate=(fraction)25/1");
+
+  gst_segment_init (&seg, GST_FORMAT_TIME);
+  seg.stop = gst_util_uint64_scale (10, GST_SECOND, 25);
+
+  fail_unless (gst_pad_push_event (srcpad, gst_event_new_segment (&seg)));
+
+  buffer = gst_buffer_new_allocate (NULL, 320 * 240 + 2 * 160 * 120, NULL);
+  gst_buffer_memset (buffer, 0, 0, -1);
+
+  for (i = 0; i < 10; i++) {
+    GST_BUFFER_TIMESTAMP (buffer) = gst_util_uint64_scale (i, GST_SECOND, 25);
+    GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (1, GST_SECOND, 25);
+    fail_unless (gst_pad_push (srcpad, gst_buffer_ref (buffer)) == GST_FLOW_OK);
+  }
+
+  gst_buffer_unref (buffer);
+
+  fail_unless (gst_pad_push_event (srcpad, gst_event_new_eos ()));
+
+  /* All buffers must be there now */
+  fail_unless_equals_int (g_list_length (buffers), 10);
+
+  outcaps =
+      gst_caps_from_string
+      ("video/x-h265,width=(int)320,height=(int)240,framerate=(fraction)25/1");
+
+  for (l = buffers, i = 0; l; l = l->next, i++) {
+    buffer = l->data;
+
+    fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer),
+        gst_util_uint64_scale (1, GST_SECOND, 25));
+
+    sinkcaps = gst_pad_get_current_caps (sinkpad);
+    fail_unless (gst_caps_can_intersect (sinkcaps, outcaps));
+    gst_caps_unref (sinkcaps);
+  }
+
+  gst_caps_unref (outcaps);
+
+  cleanup_x265enc (x265enc);
+}
+
+GST_END_TEST;
+
+static Suite *
+x265enc_suite (void)
+{
+  Suite *s = suite_create ("x265enc");
+  TCase *tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+
+  tcase_add_test (tc_chain, test_encode_simple);
+
+  return s;
+}
+
+GST_CHECK_MAIN (x265enc);
diff --git a/tests/check/elements/zbar.c b/tests/check/elements/zbar.c
index 0566d7e..bb906b8 100644
--- a/tests/check/elements/zbar.c
+++ b/tests/check/elements/zbar.c
@@ -20,21 +20,18 @@
 
 #include <gst/check/gstcheck.h>
 
-GST_START_TEST (test_still_image)
+static GstElement *
+setup_pipeline (void)
 {
-  GstMessage *zbar_msg = NULL;
-  const GstStructure *s;
   GstElement *pipeline, *src, *dec, *csp, *zbar, *sink;
-  const gchar *type, *symbol;
   gchar *path;
-  int qual;
 
   pipeline = gst_pipeline_new ("pipeline");
 
   src = gst_element_factory_make ("filesrc", NULL);
   dec = gst_element_factory_make ("pngdec", NULL);
   csp = gst_element_factory_make ("videoconvert", NULL);
-  zbar = gst_element_factory_make ("zbar", NULL);
+  zbar = gst_element_factory_make ("zbar", "zbar");
   sink = gst_element_factory_make ("fakesink", NULL);
 
   path = g_build_filename (GST_TEST_FILES_PATH, "barcode.png", NULL);
@@ -45,8 +42,13 @@
   gst_bin_add_many (GST_BIN (pipeline), src, dec, csp, zbar, sink, NULL);
   fail_unless (gst_element_link_many (src, dec, csp, zbar, sink, NULL));
 
-  fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
-      GST_STATE_CHANGE_ASYNC);
+  return pipeline;
+}
+
+static GstMessage *
+get_zbar_msg_until_eos (GstElement * pipeline)
+{
+  GstMessage *zbar_msg = NULL;
 
   do {
     GstMessage *msg;
@@ -63,14 +65,33 @@
       break;
     }
 
-    if (GST_MESSAGE_SRC (msg) == GST_OBJECT_CAST (zbar) && zbar_msg == NULL) {
+    if (!g_strcmp0 (GST_OBJECT_NAME (GST_MESSAGE_SRC (msg)), "zbar")
+        && zbar_msg == NULL) {
       zbar_msg = msg;
     } else {
       gst_message_unref (msg);
     }
   } while (1);
+  return zbar_msg;
+}
 
+
+GST_START_TEST (test_still_image)
+{
+  GstMessage *zbar_msg;
+  const GstStructure *s;
+  GstElement *pipeline;
+  const gchar *type, *symbol;
+  int qual;
+
+  pipeline = setup_pipeline ();
+
+  fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+      GST_STATE_CHANGE_ASYNC);
+
+  zbar_msg = get_zbar_msg_until_eos (pipeline);
   fail_unless (zbar_msg != NULL);
+
   s = gst_message_get_structure (zbar_msg);
   fail_unless (s != NULL);
 
@@ -86,6 +107,43 @@
   symbol = gst_structure_get_string (s, "symbol");
   fail_unless_equals_string (symbol, "9876543210128");
 
+  fail_if (gst_structure_has_field (s, "frame"));
+
+  fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+      GST_STATE_CHANGE_SUCCESS);
+
+  gst_object_unref (pipeline);
+  gst_message_unref (zbar_msg);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_still_image_with_sample)
+{
+  GstMessage *zbar_msg = NULL;
+  const GstStructure *s;
+  GstElement *pipeline;
+  GstSample *sample;
+
+  pipeline = setup_pipeline ();
+  gst_child_proxy_set ((GstChildProxy *) pipeline, "zbar::attach-frame", TRUE,
+      NULL);
+
+
+  fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+      GST_STATE_CHANGE_ASYNC);
+
+  zbar_msg = get_zbar_msg_until_eos (pipeline);
+  fail_unless (zbar_msg != NULL);
+
+  s = gst_message_get_structure (zbar_msg);
+  fail_unless (s != NULL);
+
+  fail_unless (gst_structure_get (s, "frame", GST_TYPE_SAMPLE, &sample, NULL));
+  fail_unless (gst_sample_get_buffer (sample));
+  fail_unless (gst_sample_get_caps (sample));
+  gst_sample_unref (sample);
+
   fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
       GST_STATE_CHANGE_SUCCESS);
 
@@ -108,6 +166,7 @@
     GST_INFO ("Skipping test, pngdec either not available or too old");
   } else {
     tcase_add_test (tc_chain, test_still_image);
+    tcase_add_test (tc_chain, test_still_image_with_sample);
   }
 
   return s;
diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c
index 1c81b5c..5df3024 100644
--- a/tests/check/generic/states.c
+++ b/tests/check/generic/states.c
@@ -26,6 +26,9 @@
 
 #include <unistd.h>
 
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <gmodule.h>
 #include <gst/check/gstcheck.h>
 
 static GList *elements = NULL;
@@ -216,7 +219,7 @@
 static Suite *
 states_suite (void)
 {
-  Suite *s = suite_create ("states");
+  Suite *s = suite_create ("states_bad");
   TCase *tc_chain = tcase_create ("general");
 
 #if defined(HAVE_LADSPA) || defined(HAVE_LV2)
@@ -235,4 +238,22 @@
   return s;
 }
 
-GST_CHECK_MAIN (states);
+int
+main (int argc, char **argv)
+{
+  Suite *s;
+  GModule *libx11;
+
+  libx11 =
+      g_module_open ("libX11.so.6", G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);
+  if (libx11) {
+    void (*xinitthreads) (void);
+    if (g_module_symbol (libx11, "XInitThreads", (gpointer *) & xinitthreads)) {
+      xinitthreads ();
+    }
+    g_module_close (libx11);
+  }
+  gst_check_init (&argc, &argv);
+  s = states_suite ();
+  return gst_check_run_suite (s, "states_bad", __FILE__);
+}
diff --git a/tests/check/libs/aggregator.c b/tests/check/libs/aggregator.c
index 1b9c978..b21c7cd 100644
--- a/tests/check/libs/aggregator.c
+++ b/tests/check/libs/aggregator.c
@@ -49,12 +49,15 @@
 static GType gst_test_aggregator_get_type (void);
 
 #define BUFFER_DURATION 100000000       /* 10 frames per second */
+#define TEST_GAP_PTS 0
+#define TEST_GAP_DURATION (5 * GST_SECOND)
 
 struct _GstTestAggregator
 {
   GstAggregator parent;
 
   guint64 timestamp;
+  gboolean gap_expected;
 };
 
 struct _GstTestAggregatorClass
@@ -63,7 +66,7 @@
 };
 
 static GstFlowReturn
-gst_test_aggregator_aggregate (GstAggregator * aggregator)
+gst_test_aggregator_aggregate (GstAggregator * aggregator, gboolean timeout)
 {
   GstIterator *iter;
   gboolean all_eos = TRUE;
@@ -76,7 +79,6 @@
 
   iter = gst_element_iterate_sink_pads (GST_ELEMENT (testagg));
   while (!done_iterating) {
-    GstBuffer *buffer;
     GValue value = { 0, };
     GstAggregatorPad *pad;
 
@@ -84,10 +86,21 @@
       case GST_ITERATOR_OK:
         pad = g_value_get_object (&value);
 
-        if (pad->eos == FALSE)
+        if (gst_aggregator_pad_is_eos (pad) == FALSE)
           all_eos = FALSE;
-        buffer = gst_aggregator_pad_steal_buffer (pad);
-        gst_buffer_replace (&buffer, NULL);
+
+        if (testagg->gap_expected == TRUE) {
+          buf = gst_aggregator_pad_get_buffer (pad);
+          fail_unless (buf);
+          fail_unless (GST_BUFFER_PTS (buf) == TEST_GAP_PTS);
+          fail_unless (GST_BUFFER_DURATION (buf) == TEST_GAP_DURATION);
+          fail_unless (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP));
+          fail_unless (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DROPPABLE));
+          gst_buffer_unref (buf);
+          testagg->gap_expected = FALSE;
+        }
+
+        gst_aggregator_pad_drop_buffer (pad);
 
         g_value_reset (&value);
         break;
@@ -156,8 +169,9 @@
 gst_test_aggregator_init (GstTestAggregator * self)
 {
   GstAggregator *agg = GST_AGGREGATOR (self);
-  gst_segment_init (&agg->segment, GST_FORMAT_BYTES);
+  gst_segment_init (&agg->segment, GST_FORMAT_TIME);
   self->timestamp = 0;
+  self->gap_expected = FALSE;
 }
 
 static gboolean
@@ -223,13 +237,11 @@
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS_ANY);
 
-static gpointer
-push_buffer (gpointer user_data)
+static void
+start_flow (ChainData * chain_data)
 {
-  GstFlowReturn flow;
-  GstCaps *caps;
-  ChainData *chain_data = (ChainData *) user_data;
   GstSegment segment;
+  GstCaps *caps;
 
   gst_pad_push_event (chain_data->srcpad, gst_event_new_stream_start ("test"));
 
@@ -239,6 +251,15 @@
 
   gst_segment_init (&segment, GST_FORMAT_TIME);
   gst_pad_push_event (chain_data->srcpad, gst_event_new_segment (&segment));
+}
+
+static gpointer
+push_buffer (gpointer user_data)
+{
+  GstFlowReturn flow;
+  ChainData *chain_data = (ChainData *) user_data;
+
+  start_flow (chain_data);
 
   GST_DEBUG ("Pushing buffer on pad: %s:%s",
       GST_DEBUG_PAD_NAME (chain_data->sinkpad));
@@ -256,12 +277,27 @@
 push_event (gpointer user_data)
 {
   ChainData *chain_data = (ChainData *) user_data;
+  GstTestAggregator *aggregator = (GstTestAggregator *) chain_data->aggregator;
+  GstEventType event_type;
+
+  start_flow (chain_data);
 
   GST_INFO_OBJECT (chain_data->srcpad, "Pushing event: %"
       GST_PTR_FORMAT, chain_data->event);
+
+  event_type = GST_EVENT_TYPE (chain_data->event);
+  switch (event_type) {
+    case GST_EVENT_GAP:
+      aggregator->gap_expected = TRUE;
+      break;
+    default:
+      break;
+  }
+
   fail_unless (gst_pad_push_event (chain_data->srcpad,
           chain_data->event) == TRUE);
 
+
   return NULL;
 }
 
@@ -287,7 +323,7 @@
 static GstPadProbeReturn
 _aggregated_cb (GstPad * pad, GstPadProbeInfo * info, GMainLoop * ml)
 {
-  GST_DEBUG ("SHould quit ML");
+  GST_DEBUG ("Should quit ML");
   g_idle_add ((GSourceFunc) _quit, ml);
 
   return GST_PAD_PROBE_REMOVE;
@@ -453,6 +489,33 @@
 
 GST_END_TEST;
 
+GST_START_TEST (test_aggregate_gap)
+{
+  GThread *thread;
+
+  ChainData data = { 0, };
+  TestData test = { 0, };
+
+  _test_data_init (&test, FALSE);
+  _chain_data_init (&data, test.aggregator);
+
+  data.event = gst_event_new_gap (TEST_GAP_PTS, TEST_GAP_DURATION);
+
+  thread = g_thread_try_new ("gst-check", push_event, &data, 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 (thread);
+
+  _chain_data_clear (&data);
+  _test_data_clear (&test);
+}
+
+GST_END_TEST;
+
 #define NUM_BUFFERS 3
 static void
 handoff (GstElement * fakesink, GstBuffer * buf, GstPad * pad, guint * count)
@@ -549,6 +612,95 @@
 
 GST_END_TEST;
 
+static GstPadProbeReturn
+_drop_buffer_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
+{
+  gint wait;
+
+  if (GST_IS_BUFFER (info->data)) {
+    wait = GPOINTER_TO_INT (user_data);
+    if (wait > 0)
+      g_usleep (wait / 1000);
+    return GST_PAD_PROBE_DROP;
+  }
+
+  return GST_PAD_PROBE_PASS;
+}
+
+#define TIMEOUT_NUM_BUFFERS 20
+static void
+_test_timeout (gint buffer_wait)
+{
+  GstBus *bus;
+  GstMessage *msg;
+  GstElement *pipeline, *src, *src1, *agg, *sink;
+  GstPad *src1pad;
+
+  gint count = 0;
+
+  pipeline = gst_pipeline_new ("pipeline");
+  src = gst_element_factory_make ("fakesrc", NULL);
+  g_object_set (src, "num-buffers", TIMEOUT_NUM_BUFFERS, "sizetype", 2,
+      "sizemax", 4, "is-live", TRUE, "datarate", 4000, NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", NULL);
+  g_object_set (src1, "num-buffers", TIMEOUT_NUM_BUFFERS, "sizetype", 2,
+      "sizemax", 4, "is-live", TRUE, "datarate", 4000, NULL);
+
+  agg = gst_check_setup_element ("testaggregator");
+  g_object_set (agg, "latency", GST_USECOND, NULL);
+  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));
+
+  src1pad = gst_element_get_static_pad (src1, "src");
+  fail_if (src1pad == NULL);
+  gst_pad_add_probe (src1pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
+      (GstPadProbeCallback) _drop_buffer_probe_cb,
+      GINT_TO_POINTER (buffer_wait), NULL);
+
+  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);
+
+  /* cannot rely on the exact number of buffers as the timeout may produce
+   * more buffers with the unsynchronized _aggregate() implementation in
+   * testaggregator */
+  fail_if (count < TIMEOUT_NUM_BUFFERS);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (src1pad);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_START_TEST (test_timeout_pipeline)
+{
+  _test_timeout (0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_timeout_pipeline_with_wait)
+{
+  _test_timeout (1000000 /* 1 ms */ );
+}
+
+GST_END_TEST;
+
 GST_START_TEST (test_flushing_seek)
 {
   GstEvent *event;
@@ -641,7 +793,7 @@
 GST_END_TEST;
 
 static void
-infinite_seek (guint num_srcs, guint num_seeks)
+infinite_seek (guint num_srcs, guint num_seeks, gboolean is_live)
 {
   GstBus *bus;
   GstMessage *message;
@@ -657,13 +809,19 @@
   agg = gst_check_setup_element ("testaggregator");
   sink = gst_check_setup_element ("fakesink");
 
+  if (is_live)
+    g_object_set (agg, "latency", GST_MSECOND, NULL);
+
   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);
+    g_object_set (src, "sizetype", 2, "sizemax", 4,
+        "format", GST_FORMAT_TIME, "datarate", 1000, NULL);
+    if (is_live)
+      g_object_set (src, "is-live", TRUE, NULL);
     fail_unless (gst_bin_add (GST_BIN (pipeline), src));
     fail_unless (gst_element_link (src, agg));
   }
@@ -694,7 +852,7 @@
 
             GST_INFO ("Seeking (num: %i)", count);
             seek_res =
-                gst_element_seek_simple (sink, GST_FORMAT_BYTES,
+                gst_element_seek_simple (sink, GST_FORMAT_TIME,
                 GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, 0);
             GST_INFO ("seek result is : %d", seek_res);
             fail_unless (seek_res != 0);
@@ -722,14 +880,21 @@
 
 GST_START_TEST (test_infinite_seek)
 {
-  infinite_seek (2, 500);
+  infinite_seek (2, 500, FALSE);
 }
 
 GST_END_TEST;
 
 GST_START_TEST (test_infinite_seek_50_src)
 {
-  infinite_seek (50, 100);
+  infinite_seek (50, 100, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_infinite_seek_50_src_live)
+{
+  infinite_seek (50, 100, TRUE);
 }
 
 GST_END_TEST;
@@ -796,7 +961,7 @@
 
     src = gst_element_factory_make ("fakesrc", NULL);
     g_object_set (src, "num-buffers", 100000, "sizetype", 2, "sizemax", 4,
-        NULL);
+        "format", GST_FORMAT_TIME, "datarate", 1000, NULL);
     gst_element_set_locked_state (src, TRUE);
     fail_unless (gst_bin_add (GST_BIN (pipeline), src));
     fail_unless (gst_element_link (src, agg));
@@ -875,7 +1040,7 @@
     } while (carry_on);
 
     GST_INFO ("Seeking");
-    fail_unless (gst_element_seek_simple (pipeline, GST_FORMAT_BYTES,
+    fail_unless (gst_element_seek_simple (pipeline, GST_FORMAT_TIME,
             GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, 0));
 
     count++;
@@ -1012,11 +1177,15 @@
   suite_add_tcase (suite, general);
   tcase_add_test (general, test_aggregate);
   tcase_add_test (general, test_aggregate_eos);
+  tcase_add_test (general, test_aggregate_gap);
   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_infinite_seek_50_src_live);
   tcase_add_test (general, test_linear_pipeline);
   tcase_add_test (general, test_two_src_pipeline);
+  tcase_add_test (general, test_timeout_pipeline);
+  tcase_add_test (general, test_timeout_pipeline_with_wait);
   tcase_add_test (general, test_add_remove);
   tcase_add_test (general, test_change_state_intensive);
 
diff --git a/tests/check/libs/gstglcolorconvert.c b/tests/check/libs/gstglcolorconvert.c
new file mode 100644
index 0000000..3e30077
--- /dev/null
+++ b/tests/check/libs/gstglcolorconvert.c
@@ -0,0 +1,245 @@
+/* GStreamer
+ *
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.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/gl/gl.h>
+
+#include <stdio.h>
+
+static GstGLDisplay *display;
+static GstGLContext *context;
+static GstGLWindow *window;
+static GstGLColorConvert *convert;
+
+typedef struct _TestFrame
+{
+  gint width;
+  gint height;
+  GstVideoFormat v_format;
+  gchar *data[GST_VIDEO_MAX_PLANES];
+} TestFrame;
+
+#define IGNORE_MAGIC 0x05
+
+static const gchar rgba_reorder_data[] = { 0x49, 0x24, 0x72, 0xff };
+static const gchar rgbx_reorder_data[] = { 0x49, 0x24, 0x72, IGNORE_MAGIC };
+static const gchar argb_reorder_data[] = { 0xff, 0x49, 0x24, 0x72 };
+static const gchar xrgb_reorder_data[] = { IGNORE_MAGIC, 0x49, 0x24, 0x72 };
+static const gchar rgb_reorder_data[] = { 0x49, 0x24, 0x72, IGNORE_MAGIC };
+static const gchar bgr_reorder_data[] = { 0x72, 0x24, 0x49, IGNORE_MAGIC };
+static const gchar bgra_reorder_data[] = { 0x72, 0x24, 0x49, 0xff };
+static const gchar bgrx_reorder_data[] = { 0x72, 0x24, 0x49, IGNORE_MAGIC };
+static const gchar abgr_reorder_data[] = { 0xff, 0x72, 0x24, 0x49 };
+static const gchar xbgr_reorder_data[] = { IGNORE_MAGIC, 0x72, 0x24, 0x49 };
+
+static TestFrame test_rgba_reorder[] = {
+  {1, 1, GST_VIDEO_FORMAT_RGBA, {(gchar *) & rgba_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_RGBx, {(gchar *) & rgbx_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_ARGB, {(gchar *) & argb_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_xRGB, {(gchar *) & xrgb_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_BGRA, {(gchar *) & bgra_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_BGRx, {(gchar *) & bgrx_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_ABGR, {(gchar *) & abgr_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_xBGR, {(gchar *) & xbgr_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_RGB, {(gchar *) & rgb_reorder_data}},
+  {1, 1, GST_VIDEO_FORMAT_BGR, {(gchar *) & bgr_reorder_data}},
+};
+
+static void
+setup (void)
+{
+  GError *error = NULL;
+
+  display = gst_gl_display_new ();
+  context = gst_gl_context_new (display);
+
+  gst_gl_context_create (context, 0, &error);
+  window = gst_gl_context_get_window (context);
+
+  fail_if (error != NULL, "Error creating context: %s\n",
+      error ? error->message : "Unknown Error");
+
+  convert = gst_gl_color_convert_new (context);
+}
+
+static void
+teardown (void)
+{
+  GLuint error = context->gl_vtable->GetError ();
+  fail_if (error != GL_NONE, "GL error 0x%x encountered during processing\n",
+      error);
+
+  gst_object_unref (convert);
+  gst_object_unref (window);
+  gst_object_unref (context);
+  gst_object_unref (display);
+}
+
+static gsize
+_video_info_plane_size (GstVideoInfo * info, guint plane)
+{
+  if (GST_VIDEO_INFO_N_PLANES (info) == plane + 1)
+    return info->offset[0] + info->size - info->offset[plane];
+
+  return info->offset[plane + 1] - info->offset[plane];
+}
+
+static void
+_frame_unref (gpointer user_data)
+{
+  gint *ref_count = user_data;
+  g_atomic_int_add (ref_count, -1);
+}
+
+static void
+check_conversion (TestFrame * frames, guint size)
+{
+  gint i, j, k, l;
+  gint ref_count = 0;
+
+  for (i = 0; i < size; i++) {
+    GstBuffer *inbuf;
+    GstVideoInfo in_info;
+    gint in_width = frames[i].width;
+    gint in_height = frames[i].height;
+    GstVideoFormat in_v_format = frames[i].v_format;
+    gchar *in_data[GST_VIDEO_MAX_PLANES] = { 0 };
+    GstGLMemory *in_mem[GST_VIDEO_MAX_PLANES] = { 0 };
+    GstVideoFrame in_frame;
+    GstCaps *in_caps;
+
+    gst_video_info_set_format (&in_info, in_v_format, in_width, in_height);
+    in_caps = gst_video_info_to_caps (&in_info);
+    gst_caps_set_features (in_caps, 0,
+        gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY));
+
+    for (j = 0; j < GST_VIDEO_INFO_N_PLANES (&in_info); j++) {
+      in_data[j] = frames[i].data[j];
+    }
+
+    /* create GL buffer */
+    ref_count += GST_VIDEO_INFO_N_PLANES (&in_info);
+    inbuf = gst_buffer_new ();
+    fail_unless (gst_gl_memory_setup_wrapped (context, &in_info, NULL,
+            (gpointer *) in_data, in_mem, &ref_count, _frame_unref));
+
+    for (j = 0; j < GST_VIDEO_INFO_N_PLANES (&in_info); j++) {
+      gst_buffer_append_memory (inbuf, (GstMemory *) in_mem[j]);
+    }
+
+    fail_unless (gst_video_frame_map (&in_frame, &in_info, inbuf,
+            GST_MAP_READ));
+
+    /* sanity check that the correct values were wrapped */
+    for (j = 0; j < GST_VIDEO_INFO_N_PLANES (&in_info); j++) {
+      for (k = 0; k < _video_info_plane_size (&in_info, j); k++) {
+        if (in_data[j][k] != IGNORE_MAGIC)
+          fail_unless (((gchar *) in_frame.data[j])[k] == in_data[j][k]);
+      }
+    }
+
+    for (j = 0; j < size; j++) {
+      GstBuffer *outbuf;
+      GstVideoInfo out_info;
+      gint out_width = frames[j].width;
+      gint out_height = frames[j].height;
+      GstVideoFormat out_v_format = frames[j].v_format;
+      gchar *out_data[GST_VIDEO_MAX_PLANES] = { 0 };
+      GstVideoFrame out_frame;
+      GstCaps *out_caps;
+
+      gst_video_info_set_format (&out_info, out_v_format, out_width,
+          out_height);
+      out_caps = gst_video_info_to_caps (&out_info);
+      gst_caps_set_features (out_caps, 0,
+          gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY));
+
+      for (k = 0; k < GST_VIDEO_INFO_N_PLANES (&out_info); k++) {
+        out_data[k] = frames[j].data[k];
+      }
+
+      gst_gl_color_convert_set_caps (convert, in_caps, out_caps);
+
+      /* convert the data */
+      outbuf = gst_gl_color_convert_perform (convert, inbuf);
+      if (outbuf == NULL) {
+        const gchar *in_str = gst_video_format_to_string (in_v_format);
+        const gchar *out_str = gst_video_format_to_string (out_v_format);
+        GST_WARNING ("failed to convert from %s to %s", in_str, out_str);
+      }
+
+      fail_unless (gst_video_frame_map (&out_frame, &out_info, outbuf,
+              GST_MAP_READ));
+
+      /* check that the converted values are correct */
+      for (k = 0; k < GST_VIDEO_INFO_N_PLANES (&out_info); k++) {
+        for (l = 0; l < _video_info_plane_size (&out_info, k); l++) {
+          gchar out_pixel = ((gchar *) out_frame.data[k])[l];
+          if (out_data[k][l] != IGNORE_MAGIC && out_pixel != IGNORE_MAGIC)
+            fail_unless (out_pixel == out_data[k][l]);
+          /* FIXME: check alpha clobbering */
+        }
+      }
+
+      gst_video_frame_unmap (&out_frame);
+      gst_buffer_unref (outbuf);
+    }
+
+    gst_caps_unref (in_caps);
+    gst_video_frame_unmap (&in_frame);
+    gst_buffer_unref (inbuf);
+
+    fail_unless_equals_int (ref_count, 0);
+  }
+}
+
+GST_START_TEST (test_reorder_buffer)
+{
+  guint size = G_N_ELEMENTS (test_rgba_reorder);
+
+  /* gles can't download rgb24 textures */
+  if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
+    size -= 2;
+
+  check_conversion (test_rgba_reorder, size);
+}
+
+GST_END_TEST;
+
+static Suite *
+gst_gl_color_convert_suite (void)
+{
+  Suite *s = suite_create ("GstGLUpload");
+  TCase *tc_chain = tcase_create ("upload");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_checked_fixture (tc_chain, setup, teardown);
+  tcase_add_test (tc_chain, test_reorder_buffer);
+  /* FIXME add YUV <--> RGB conversion tests */
+
+  return s;
+}
+
+GST_CHECK_MAIN (gst_gl_color_convert);
diff --git a/tests/check/libs/gstglcontext.c b/tests/check/libs/gstglcontext.c
index bb7e295..8bb5f99 100644
--- a/tests/check/libs/gstglcontext.c
+++ b/tests/check/libs/gstglcontext.c
@@ -114,7 +114,7 @@
 {
   GstGLContext *context = data;
   GstGLFuncs *gl = context->gl_vtable;
-  gl->DeleteTextures (1, &tex);;
+  gl->DeleteTextures (1, &tex);
   gst_object_unref (fbo);
 #if GST_GL_HAVE_GLES2
   if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
@@ -173,20 +173,20 @@
     gl->MatrixMode (GL_PROJECTION);
     gl->LoadIdentity ();
 
-    gl->Enable (GL_TEXTURE_2D);
+    gl->ActiveTexture (GL_TEXTURE0);
     gl->BindTexture (GL_TEXTURE_2D, tex);
 
     gl->EnableClientState (GL_VERTEX_ARRAY);
-    gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
     gl->VertexPointer (2, GL_FLOAT, 0, &verts);
+
+    gl->ClientActiveTexture (GL_TEXTURE0);
+    gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
     gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
 
     gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
 
     gl->DisableClientState (GL_VERTEX_ARRAY);
     gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-
-    gl->Disable (GL_TEXTURE_2D);
   }
 #endif
 #if GST_GL_HAVE_GLES2
@@ -259,7 +259,8 @@
       error ? error->message : "Unknown Error");
 
   /* make the window visible */
-  gst_gl_window_draw (window, 320, 240);
+  gst_gl_window_set_preferred_size (window, 320, 240);
+  gst_gl_window_draw (window);
 
   gst_gl_window_send_message (other_window, GST_GL_WINDOW_CB (init), context);
 
@@ -281,15 +282,49 @@
 
 GST_END_TEST;
 
+static void
+accum_true (GstGLContext * context, gpointer data)
+{
+  gint *i = data;
+  *i = 1;
+}
+
+static void
+check_wrapped (gpointer data)
+{
+  GstGLContext *wrapped_context = data;
+  GError *error = NULL;
+  gint i = 0;
+  gboolean ret;
+
+  /* check that scheduling on an unactivated wrapped context asserts */
+  ASSERT_CRITICAL (gst_gl_context_thread_add (wrapped_context,
+          (GstGLContextThreadFunc) accum_true, &i));
+  fail_if (i != 0);
+
+  /* check that scheduling on an activated context succeeds */
+  gst_gl_context_activate (wrapped_context, TRUE);
+  gst_gl_context_thread_add (wrapped_context,
+      (GstGLContextThreadFunc) accum_true, &i);
+  fail_if (i != 1);
+
+  /* check filling out the wrapped context's info */
+  fail_if (wrapped_context->gl_vtable->TexImage2D != NULL);
+  ret = gst_gl_context_fill_info (wrapped_context, &error);
+  fail_if (!ret, "error received %s\n",
+      error ? error->message : "Unknown error");
+  fail_if (wrapped_context->gl_vtable->TexImage2D == NULL);
+}
+
 GST_START_TEST (test_wrapped_context)
 {
   GstGLContext *context, *other_context, *wrapped_context;
   GstGLWindow *window, *other_window;
   GError *error = NULL;
   gint i = 0;
-  guintptr handle;
-  GstGLPlatform platform;
-  GstGLAPI apis;
+  guintptr handle, handle2;
+  GstGLPlatform platform, platform2;
+  GstGLAPI apis, apis2;
 
   context = gst_gl_context_new (display);
 
@@ -308,6 +343,14 @@
   wrapped_context =
       gst_gl_context_new_wrapped (display, handle, platform, apis);
 
+  handle2 = gst_gl_context_get_gl_context (wrapped_context);
+  platform2 = gst_gl_context_get_gl_platform (wrapped_context);
+  apis2 = gst_gl_context_get_gl_api (wrapped_context);
+
+  fail_if (handle != handle2);
+  fail_if (platform != platform2);
+  fail_if (apis != apis2);
+
   other_context = gst_gl_context_new (display);
   other_window = gst_gl_window_new (display);
   gst_gl_context_set_window (other_context, other_window);
@@ -318,7 +361,8 @@
       error ? error->message : "Unknown Error");
 
   /* make the window visible */
-  gst_gl_window_draw (window, 320, 240);
+  gst_gl_window_set_preferred_size (window, 320, 240);
+  gst_gl_window_draw (window);
 
   gst_gl_window_send_message (other_window, GST_GL_WINDOW_CB (init), context);
 
@@ -330,17 +374,116 @@
     i++;
   }
 
+  gst_gl_window_send_message (window, GST_GL_WINDOW_CB (check_wrapped),
+      wrapped_context);
+
   gst_gl_window_send_message (other_window, GST_GL_WINDOW_CB (deinit), context);
 
-  gst_object_unref (window);
-  gst_object_unref (other_window);
   gst_object_unref (other_context);
+  gst_object_unref (other_window);
+  gst_object_unref (window);
   gst_object_unref (context);
   gst_object_unref (wrapped_context);
 }
 
 GST_END_TEST;
 
+struct context_info
+{
+  GstGLAPI api;
+  guint major;
+  guint minor;
+  GstGLPlatform platform;
+  guintptr handle;
+};
+
+static void
+_fill_context_info (GstGLContext * context, struct context_info *info)
+{
+  info->handle = gst_gl_context_get_current_gl_context (info->platform);
+  info->api =
+      gst_gl_context_get_current_gl_api (info->platform, &info->major,
+      &info->minor);
+}
+
+GST_START_TEST (test_current_context)
+{
+  GstGLContext *context;
+  GError *error = NULL;
+  guintptr handle;
+  GstGLPlatform platform;
+  GstGLAPI api;
+  gint major, minor;
+  struct context_info info;
+
+  context = gst_gl_context_new (display);
+
+  gst_gl_context_create (context, 0, &error);
+
+  fail_if (error != NULL, "Error creating master context %s\n",
+      error ? error->message : "Unknown Error");
+
+  handle = gst_gl_context_get_gl_context (context);
+  platform = gst_gl_context_get_gl_platform (context);
+  api = gst_gl_context_get_gl_api (context);
+  gst_gl_context_get_gl_version (context, &major, &minor);
+
+  info.platform = platform;
+
+  gst_gl_context_thread_add (context,
+      (GstGLContextThreadFunc) _fill_context_info, &info);
+
+  fail_if (info.platform != platform);
+  fail_if (info.api != api);
+  fail_if (info.major != major);
+  fail_if (info.minor != minor);
+  fail_if (info.handle != handle);
+
+  gst_object_unref (context);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_context_can_share)
+{
+  GstGLContext *c1, *c2, *c3;
+  GError *error = NULL;
+
+  c1 = gst_gl_context_new (display);
+  gst_gl_context_create (c1, NULL, &error);
+  fail_if (error != NULL, "Error creating context %s\n",
+      error ? error->message : "Unknown Error");
+
+  c2 = gst_gl_context_new (display);
+  gst_gl_context_create (c2, c1, &error);
+  fail_if (error != NULL, "Error creating context %s\n",
+      error ? error->message : "Unknown Error");
+
+  fail_unless (gst_gl_context_can_share (c1, c2));
+  fail_unless (gst_gl_context_can_share (c2, c1));
+
+  c3 = gst_gl_context_new (display);
+  gst_gl_context_create (c3, c2, &error);
+  fail_if (error != NULL, "Error creating context %s\n",
+      error ? error->message : "Unknown Error");
+
+  fail_unless (gst_gl_context_can_share (c1, c3));
+  fail_unless (gst_gl_context_can_share (c3, c1));
+  fail_unless (gst_gl_context_can_share (c2, c3));
+  fail_unless (gst_gl_context_can_share (c3, c2));
+
+  /* destroy the middle context */
+  gst_object_unref (c2);
+  c2 = NULL;
+
+  fail_unless (gst_gl_context_can_share (c1, c3));
+  fail_unless (gst_gl_context_can_share (c3, c1));
+
+  gst_object_unref (c1);
+  gst_object_unref (c3);
+}
+
+GST_END_TEST;
 
 static Suite *
 gst_gl_context_suite (void)
@@ -352,6 +495,8 @@
   tcase_add_checked_fixture (tc_chain, setup, teardown);
   tcase_add_test (tc_chain, test_share);
   tcase_add_test (tc_chain, test_wrapped_context);
+  tcase_add_test (tc_chain, test_current_context);
+  tcase_add_test (tc_chain, test_context_can_share);
 
   return s;
 }
diff --git a/tests/check/libs/gstglmemory.c b/tests/check/libs/gstglmemory.c
index 6aaffdd..238e2bb 100644
--- a/tests/check/libs/gstglmemory.c
+++ b/tests/check/libs/gstglmemory.c
@@ -54,57 +54,246 @@
   GstMemory *mem, *mem2;
   GstGLMemory *gl_mem, *gl_mem2;
   GstAllocator *gl_allocator;
-  gint i;
-  static GstVideoGLTextureType formats[] = {
-    GST_VIDEO_GL_TEXTURE_TYPE_RGBA, GST_VIDEO_GL_TEXTURE_TYPE_RGB,
-    GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA,
-    GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+  gint i, j;
+  static GstVideoFormat formats[] = {
+    GST_VIDEO_FORMAT_RGBA, GST_VIDEO_FORMAT_RGB,
+    GST_VIDEO_FORMAT_YUY2, GST_VIDEO_FORMAT_I420
   };
 
+  gl_allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+  fail_if (gl_allocator == NULL);
+
+  /* test allocator creation */
+  ASSERT_WARNING (mem = gst_allocator_alloc (gl_allocator, 0, NULL));
+
   for (i = 0; i < G_N_ELEMENTS (formats); i++) {
-    gsize width = 320, height = 240, stride = 324;
+    GstVideoInfo v_info;
+    gsize width = 320, height = 240;
 
-    gl_allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
-    fail_if (gl_allocator == NULL);
+    gst_video_info_set_format (&v_info, formats[i], width, height);
 
-    /* test allocator creation */
-    ASSERT_WARNING (mem = gst_allocator_alloc (gl_allocator, 0, NULL););
-    mem = gst_gl_memory_alloc (context, formats[i], width, height, stride);
-    fail_if (mem == NULL);
-    gl_mem = (GstGLMemory *) mem;
+    for (j = 0; j < GST_VIDEO_INFO_N_PLANES (&v_info); j++) {
+      mem = gst_gl_memory_alloc (context, NULL, &v_info, j, NULL);
+      fail_if (mem == NULL);
+      gl_mem = (GstGLMemory *) mem;
 
-    /* test init params */
-    fail_if (gl_mem->width != width);
-    fail_if (gl_mem->height != height);
-    fail_if (gl_mem->stride != stride);
-    fail_if (gl_mem->context != context);
-    fail_if (gl_mem->tex_id == 0);
+      /* test init params */
+      fail_if (gst_video_info_is_equal (&v_info, &gl_mem->info) == FALSE);
+      fail_if (gl_mem->mem.context != context);
+      fail_if (gl_mem->tex_id == 0);
 
-    /* copy the memory */
-    mem2 = gst_memory_copy (mem, 0, -1);
-    fail_if (mem2 == NULL);
-    gl_mem2 = (GstGLMemory *) mem2;
+      /* copy the memory */
+      mem2 = gst_memory_copy (mem, 0, -1);
+      fail_if (mem2 == NULL);
+      gl_mem2 = (GstGLMemory *) mem2;
 
-    /* test params */
-    fail_if (gl_mem->tex_id == gl_mem2->tex_id);
-    fail_if (gl_mem->tex_type != gl_mem2->tex_type);
-    fail_if (gl_mem->width != gl_mem2->width);
-    fail_if (gl_mem->stride != gl_mem2->stride);
-    fail_if (gl_mem->context != gl_mem2->context);
+      /* test params */
+      fail_if (gst_video_info_is_equal (&gl_mem2->info,
+              &gl_mem->info) == FALSE);
+      fail_if (gl_mem->mem.context != gl_mem2->mem.context);
 
-    if (gst_gl_context_get_error ())
-      printf ("%s\n", gst_gl_context_get_error ());
-    fail_if (gst_gl_context_get_error () != NULL);
+      if (gst_gl_context_get_error ())
+        printf ("%s\n", gst_gl_context_get_error ());
+      fail_if (gst_gl_context_get_error () != NULL);
 
-    gst_memory_unref (mem);
-    gst_memory_unref (mem2);
-
-    gst_object_unref (gl_allocator);
+      gst_memory_unref (mem);
+      gst_memory_unref (mem2);
+    }
   }
+
+  gst_object_unref (gl_allocator);
 }
 
 GST_END_TEST;
 
+/* one red rgba pixel */
+static gchar rgba_pixel[] = {
+  0xff, 0x00, 0x00, 0xff,
+};
+
+GST_START_TEST (test_transfer)
+{
+  GstAllocator *gl_allocator;
+  GstVideoInfo v_info;
+  GstMemory *mem, *mem2, *mem3;
+  GstMapInfo map_info;
+
+  gl_allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+  fail_if (gl_allocator == NULL);
+
+  gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_RGBA, 1, 1);
+
+  /* texture creation */
+  mem = (GstMemory *) gst_gl_memory_alloc (context, NULL, &v_info, 0, NULL);
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  /* test wrapping raw data */
+  mem2 =
+      (GstMemory *) gst_gl_memory_wrapped (context, &v_info, 0, NULL,
+      rgba_pixel, NULL, NULL);
+  fail_if (mem == NULL);
+
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  /* wrapped texture creation */
+  mem3 = (GstMemory *) gst_gl_memory_wrapped_texture (context,
+      ((GstGLMemory *) mem)->tex_id, GL_TEXTURE_2D, &v_info, 0, NULL, NULL,
+      NULL);
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  /* check data/flags are correct */
+  fail_unless (gst_memory_map (mem2, &map_info, GST_MAP_READ));
+
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  fail_unless (((gchar *) map_info.data)[0] == rgba_pixel[0]);
+  fail_unless (((gchar *) map_info.data)[1] == rgba_pixel[1]);
+  fail_unless (((gchar *) map_info.data)[2] == rgba_pixel[2]);
+  fail_unless (((gchar *) map_info.data)[3] == rgba_pixel[3]);
+
+  gst_memory_unmap (mem2, &map_info);
+
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  fail_unless (gst_memory_map (mem2, &map_info, GST_MAP_READ | GST_MAP_GL));
+
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  /* test texture copy */
+  fail_unless (gst_gl_memory_copy_into_texture ((GstGLMemory *) mem2,
+          ((GstGLMemory *) mem)->tex_id, GST_VIDEO_GL_TEXTURE_TYPE_RGBA, 1, 1,
+          4, FALSE));
+  GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
+  GST_GL_MEMORY_ADD_TRANSFER (mem, GST_GL_MEMORY_TRANSFER_NEED_DOWNLOAD);
+
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem2,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  gst_memory_unmap (mem2, &map_info);
+
+  /* test download of copied texture */
+  fail_unless (gst_memory_map (mem, &map_info, GST_MAP_READ));
+
+  fail_unless (((gchar *) map_info.data)[0] == rgba_pixel[0]);
+  fail_unless (((gchar *) map_info.data)[1] == rgba_pixel[1]);
+  fail_unless (((gchar *) map_info.data)[2] == rgba_pixel[2]);
+  fail_unless (((gchar *) map_info.data)[3] == rgba_pixel[3]);
+
+  gst_memory_unmap (mem, &map_info);
+
+  /* test download of wrapped copied texture */
+  fail_unless (gst_memory_map (mem3, &map_info, GST_MAP_READ));
+
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  fail_unless (((gchar *) map_info.data)[0] == rgba_pixel[0]);
+  fail_unless (((gchar *) map_info.data)[1] == rgba_pixel[1]);
+  fail_unless (((gchar *) map_info.data)[2] == rgba_pixel[2]);
+  fail_unless (((gchar *) map_info.data)[3] == rgba_pixel[3]);
+
+  gst_memory_unmap (mem3, &map_info);
+
+  /* test upload flag */
+  fail_unless (gst_memory_map (mem3, &map_info, GST_MAP_WRITE));
+  gst_memory_unmap (mem3, &map_info);
+
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  /* test download flag */
+  fail_unless (gst_memory_map (mem3, &map_info, GST_MAP_WRITE | GST_MAP_GL));
+  gst_memory_unmap (mem3, &map_info);
+
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_UPLOAD));
+  fail_unless (GST_MEMORY_FLAG_IS_SET (mem3,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  if (gst_gl_context_get_error ())
+    printf ("%s\n", gst_gl_context_get_error ());
+  fail_if (gst_gl_context_get_error () != NULL);
+
+  gst_memory_unref (mem);
+  gst_memory_unref (mem2);
+  gst_memory_unref (mem3);
+  gst_object_unref (gl_allocator);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_separate_transfer)
+{
+  GstAllocator *gl_allocator;
+  GstVideoInfo v_info;
+  GstMemory *mem;
+  GstMapInfo info;
+
+  gl_allocator = gst_allocator_find (GST_GL_MEMORY_ALLOCATOR);
+  fail_if (gl_allocator == NULL);
+
+  gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_RGBA, 1, 1);
+
+  mem =
+      (GstMemory *) gst_gl_memory_wrapped (context, &v_info, 0, NULL,
+      rgba_pixel, NULL, NULL);
+  fail_if (mem == NULL);
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  gst_gl_memory_upload_transfer ((GstGLMemory *) mem);
+
+  fail_unless (!GST_MEMORY_FLAG_IS_SET (mem,
+          GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD));
+
+  fail_unless (gst_memory_map (mem, &info, GST_MAP_READ));
+
+  fail_unless (((gchar *) info.data)[0] == rgba_pixel[0]);
+  fail_unless (((gchar *) info.data)[1] == rgba_pixel[1]);
+  fail_unless (((gchar *) info.data)[2] == rgba_pixel[2]);
+  fail_unless (((gchar *) info.data)[3] == rgba_pixel[3]);
+
+  gst_memory_unmap (mem, &info);
+
+  /* FIXME: add download transfer */
+
+  if (gst_gl_context_get_error ())
+    printf ("%s\n", gst_gl_context_get_error ());
+  fail_if (gst_gl_context_get_error () != NULL);
+
+  gst_memory_unref (mem);
+  gst_object_unref (gl_allocator);
+}
+
+GST_END_TEST;
 
 static Suite *
 gst_gl_memory_suite (void)
@@ -115,6 +304,8 @@
   suite_add_tcase (s, tc_chain);
   tcase_add_checked_fixture (tc_chain, setup, teardown);
   tcase_add_test (tc_chain, test_basic);
+  tcase_add_test (tc_chain, test_transfer);
+  tcase_add_test (tc_chain, test_separate_transfer);
 
   return s;
 }
diff --git a/tests/check/libs/gstglupload.c b/tests/check/libs/gstglupload.c
index 1960b1e..11e2fe0 100644
--- a/tests/check/libs/gstglupload.c
+++ b/tests/check/libs/gstglupload.c
@@ -168,20 +168,20 @@
     gl->MatrixMode (GL_PROJECTION);
     gl->LoadIdentity ();
 
-    gl->Enable (GL_TEXTURE_2D);
+    gl->ActiveTexture (GL_TEXTURE_2D);
     gl->BindTexture (GL_TEXTURE_2D, tex_id);
 
     gl->EnableClientState (GL_VERTEX_ARRAY);
-    gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
     gl->VertexPointer (2, GL_FLOAT, 0, &verts);
+
+    gl->ClientActiveTexture (GL_TEXTURE0);
+    gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
     gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
 
     gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
 
     gl->DisableClientState (GL_VERTEX_ARRAY);
     gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-
-    gl->Disable (GL_TEXTURE_2D);
   }
 #endif
 #if GST_GL_HAVE_GLES2
@@ -226,20 +226,36 @@
 
 GST_START_TEST (test_upload_data)
 {
-  gpointer data[GST_VIDEO_MAX_PLANES] = { rgba_data, NULL, NULL, NULL };
-  GstVideoInfo in_info;
+  GstCaps *in_caps, *out_caps;
+  GstBuffer *inbuf, *outbuf;
+  GstMapInfo map_info;
   gboolean res;
   gint i = 0;
 
-  gst_video_info_set_format (&in_info, GST_VIDEO_FORMAT_RGBA, WIDTH, HEIGHT);
+  in_caps = gst_caps_from_string ("video/x-raw,format=RGBA,"
+      "width=10,height=10");
+  out_caps = gst_caps_from_string ("video/x-raw(memory:GLMemory),"
+      "format=RGBA,width=10,height=10");
 
-  gst_gl_upload_set_format (upload, &in_info);
+  gst_gl_upload_set_caps (upload, in_caps, out_caps);
 
-  res = gst_gl_upload_perform_with_data (upload, &tex_id, data);
+  inbuf = gst_buffer_new_wrapped_full (0, rgba_data, WIDTH * HEIGHT * 4,
+      0, WIDTH * HEIGHT * 4, NULL, NULL);
+
+  res = gst_gl_upload_perform_with_buffer (upload, inbuf, &outbuf);
   fail_if (res == FALSE, "Failed to upload buffer: %s\n",
       gst_gl_context_get_error ());
+  fail_unless (GST_IS_BUFFER (outbuf));
 
-  gst_gl_window_draw (window, WIDTH, HEIGHT);
+  res = gst_buffer_map (outbuf, &map_info, GST_MAP_READ | GST_MAP_GL);
+  fail_if (res == FALSE, "Failed to map gl memory");
+
+  tex_id = *(guint *) map_info.data;
+
+  gst_buffer_unmap (outbuf, &map_info);
+
+  gst_gl_window_set_preferred_size (window, WIDTH, HEIGHT);
+  gst_gl_window_draw (window);
 
   gst_gl_window_send_message (window, GST_GL_WINDOW_CB (init), context);
 
@@ -248,33 +264,52 @@
         context);
     i++;
   }
+
+  gst_buffer_unref (inbuf);
+  gst_buffer_unref (outbuf);
 }
 
 GST_END_TEST;
 
 GST_START_TEST (test_upload_buffer)
 {
-  GstBuffer *buffer;
+  GstBuffer *buffer, *outbuf;
   GstGLMemory *gl_mem;
+  GstCaps *in_caps, *out_caps;
   GstVideoInfo in_info;
+  GstMapInfo map_info;
   gint i = 0;
   gboolean res;
 
-  gst_video_info_set_format (&in_info, GST_VIDEO_FORMAT_RGBA, WIDTH, HEIGHT);
+  in_caps = gst_caps_from_string ("video/x-raw,format=RGBA,width=10,height=10");
+  gst_video_info_from_caps (&in_info, in_caps);
 
   /* create GL buffer */
   buffer = gst_buffer_new ();
-  gl_mem = gst_gl_memory_wrapped (context, FORMAT, WIDTH, HEIGHT, WIDTH * 4,
-      rgba_data, NULL, NULL);
+  gl_mem =
+      gst_gl_memory_wrapped (context, &in_info, 0, NULL, rgba_data, NULL, NULL);
+
+  res =
+      gst_memory_map ((GstMemory *) gl_mem, &map_info,
+      GST_MAP_READ | GST_MAP_GL);
+  fail_if (res == FALSE, "Failed to map gl memory\n");
+  tex_id = *(guint *) map_info.data;
+  gst_memory_unmap ((GstMemory *) gl_mem, &map_info);
+
   gst_buffer_append_memory (buffer, (GstMemory *) gl_mem);
 
-  gst_gl_upload_set_format (upload, &in_info);
+  out_caps = gst_caps_from_string ("video/x-raw(memory:GLMemory),"
+      "format=RGBA,width=10,height=10");
 
-  res = gst_gl_upload_perform_with_buffer (upload, buffer, &tex_id);
+  gst_gl_upload_set_caps (upload, in_caps, out_caps);
+
+  res = gst_gl_upload_perform_with_buffer (upload, buffer, &outbuf);
   fail_if (res == FALSE, "Failed to upload buffer: %s\n",
       gst_gl_context_get_error ());
+  fail_unless (GST_IS_BUFFER (outbuf));
 
-  gst_gl_window_draw (window, WIDTH, HEIGHT);
+  gst_gl_window_set_preferred_size (window, WIDTH, HEIGHT);
+  gst_gl_window_draw (window);
   gst_gl_window_send_message (window, GST_GL_WINDOW_CB (init), context);
 
   while (i < 2) {
@@ -285,6 +320,7 @@
 
   gst_gl_upload_release_buffer (upload);
   gst_buffer_unref (buffer);
+  gst_buffer_unref (outbuf);
 }
 
 GST_END_TEST;
@@ -304,8 +340,8 @@
 
   /* create GL buffer */
   buffer = gst_buffer_new ();
-  gl_mem = gst_gl_memory_wrapped (context, FORMAT, WIDTH, HEIGHT, WIDTH * 4,
-      rgba_data, NULL, NULL);
+  gl_mem =
+      gst_gl_memory_wrapped (context, &in_info, 0, NULL, rgba_data, NULL, NULL);
   gst_buffer_append_memory (buffer, (GstMemory *) gl_mem);
 
   gst_gl_context_gen_texture (context, &tex_ids[0], GST_VIDEO_FORMAT_RGBA,
@@ -314,7 +350,6 @@
   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_meta_add_to_buffer (upload_meta, buffer);
@@ -327,7 +362,9 @@
   fail_if (res == FALSE, "Failed to upload GstVideoGLTextureUploadMeta\n");
 
   tex_id = tex_ids[0];
-  gst_gl_window_draw (window, WIDTH, HEIGHT);
+
+  gst_gl_window_set_preferred_size (window, WIDTH, HEIGHT);
+  gst_gl_window_draw (window);
   gst_gl_window_send_message (window, GST_GL_WINDOW_CB (init), context);
 
   while (i < 2) {
diff --git a/tests/check/libs/h264parser.c b/tests/check/libs/h264parser.c
index 65fd0c7..cc35519 100644
--- a/tests/check/libs/h264parser.c
+++ b/tests/check/libs/h264parser.c
@@ -225,20 +225,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = h264parser_suite ();
-
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (h264parser);
diff --git a/tests/check/libs/mpegts.c b/tests/check/libs/mpegts.c
index d96211a..a1ce6e8 100644
--- a/tests/check/libs/mpegts.c
+++ b/tests/check/libs/mpegts.c
@@ -581,20 +581,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = mpegts_suite ();
-
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mpegts);
diff --git a/tests/check/libs/mpegvideoparser.c b/tests/check/libs/mpegvideoparser.c
index 914dd6c..b925169 100644
--- a/tests/check/libs/mpegvideoparser.c
+++ b/tests/check/libs/mpegvideoparser.c
@@ -164,7 +164,7 @@
 GST_END_TEST;
 
 static Suite *
-videoparsers_suite (void)
+mpegvideoparsers_suite (void)
 {
   Suite *s = suite_create ("Video Parsers library");
 
@@ -179,20 +179,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = videoparsers_suite ();
-
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (mpegvideoparsers);
diff --git a/tests/check/libs/vc1parser.c b/tests/check/libs/vc1parser.c
index cb0bce7..5ce4328 100644
--- a/tests/check/libs/vc1parser.c
+++ b/tests/check/libs/vc1parser.c
@@ -1273,20 +1273,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = vc1parser_suite ();
-
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (vc1parser);
diff --git a/tests/check/libs/vp8parser.c b/tests/check/libs/vp8parser.c
index b03b744..784e20f 100644
--- a/tests/check/libs/vp8parser.c
+++ b/tests/check/libs/vp8parser.c
@@ -212,7 +212,7 @@
 GST_END_TEST;
 
 static Suite *
-videoparsers_suite (void)
+vp8parsers_suite (void)
 {
   Suite *s = suite_create ("VP8 Parser library");
 
@@ -225,20 +225,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = videoparsers_suite ();
-
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (vp8parsers);
diff --git a/tests/check/orc/audiomixer.c b/tests/check/orc/audiomixer.c
deleted file mode 100644
index d0efcb8..0000000
--- a/tests/check/orc/audiomixer.c
+++ /dev/null
@@ -1,1730 +0,0 @@
-
-/* autogenerated from gstaudiomixerorc.orc */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <math.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
-
-#include <orc/orc.h>
-#include <orc-test/orctest.h>
-
-/* 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 */
-
-
-/* audiomixer_orc_add_s32 */
-static void
-_backup_audiomixer_orc_add_s32 (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;
-  orc_union32 var34;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var32 = ptr0[i];
-    /* 1: loadl */
-    var33 = ptr4[i];
-    /* 2: addssl */
-    var34.i = ORC_CLAMP_SL((orc_int64)var32.i + (orc_int64)var33.i);
-    /* 3: storel */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_s16 */
-static void
-_backup_audiomixer_orc_add_s16 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var32;
-  orc_union16 var33;
-  orc_union16 var34;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var32 = ptr0[i];
-    /* 1: loadw */
-    var33 = ptr4[i];
-    /* 2: addssw */
-    var34.i = ORC_CLAMP_SW(var32.i + var33.i);
-    /* 3: storew */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_s8 */
-static void
-_backup_audiomixer_orc_add_s8 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_int8 * ORC_RESTRICT ptr0;
-  const orc_int8 * ORC_RESTRICT ptr4;
-  orc_int8 var32;
-  orc_int8 var33;
-  orc_int8 var34;
-
-  ptr0 = (orc_int8 *)ex->arrays[0];
-  ptr4 = (orc_int8 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var32 = ptr0[i];
-    /* 1: loadb */
-    var33 = ptr4[i];
-    /* 2: addssb */
-    var34 = ORC_CLAMP_SB(var32 + var33);
-    /* 3: storeb */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_u32 */
-static void
-_backup_audiomixer_orc_add_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;
-  orc_union32 var34;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var32 = ptr0[i];
-    /* 1: loadl */
-    var33 = ptr4[i];
-    /* 2: addusl */
-    var34.i = ORC_CLAMP_UL((orc_int64)(orc_uint32)var32.i + (orc_int64)(orc_uint32)var33.i);
-    /* 3: storel */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_u16 */
-static void
-_backup_audiomixer_orc_add_u16 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var32;
-  orc_union16 var33;
-  orc_union16 var34;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var32 = ptr0[i];
-    /* 1: loadw */
-    var33 = ptr4[i];
-    /* 2: addusw */
-    var34.i = ORC_CLAMP_UW((orc_uint16)var32.i + (orc_uint16)var33.i);
-    /* 3: storew */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_u8 */
-static void
-_backup_audiomixer_orc_add_u8 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_int8 * ORC_RESTRICT ptr0;
-  const orc_int8 * ORC_RESTRICT ptr4;
-  orc_int8 var32;
-  orc_int8 var33;
-  orc_int8 var34;
-
-  ptr0 = (orc_int8 *)ex->arrays[0];
-  ptr4 = (orc_int8 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var32 = ptr0[i];
-    /* 1: loadb */
-    var33 = ptr4[i];
-    /* 2: addusb */
-    var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33);
-    /* 3: storeb */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_f32 */
-static void
-_backup_audiomixer_orc_add_f32 (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;
-  orc_union32 var34;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var32 = ptr0[i];
-    /* 1: loadl */
-    var33 = ptr4[i];
-    /* 2: addf */
-    {
-       orc_union32 _src1;
-       orc_union32 _src2;
-       orc_union32 _dest1;
-       _src1.i = ORC_DENORMAL(var32.i);
-       _src2.i = ORC_DENORMAL(var33.i);
-       _dest1.f = _src1.f + _src2.f;
-       var34.i = ORC_DENORMAL(_dest1.i);
-    }
-    /* 3: storel */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_add_f64 */
-static void
-_backup_audiomixer_orc_add_f64 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union64 * ORC_RESTRICT ptr4;
-  orc_union64 var32;
-  orc_union64 var33;
-  orc_union64 var34;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union64 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadq */
-    var32 = ptr0[i];
-    /* 1: loadq */
-    var33 = ptr4[i];
-    /* 2: addd */
-    {
-       orc_union64 _src1;
-       orc_union64 _src2;
-       orc_union64 _dest1;
-       _src1.i = ORC_DENORMAL_DOUBLE(var32.i);
-       _src2.i = ORC_DENORMAL_DOUBLE(var33.i);
-       _dest1.f = _src1.f + _src2.f;
-       var34.i = ORC_DENORMAL_DOUBLE(_dest1.i);
-    }
-    /* 3: storeq */
-    ptr0[i] = var34;
-  }
-
-}
-
-/* audiomixer_orc_volume_u8 */
-static void
-_backup_audiomixer_orc_volume_u8 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_int8 * ORC_RESTRICT ptr0;
-  orc_int8 var34;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_int8 var35;
-#else
-  orc_int8 var35;
-#endif
-  orc_int8 var36;
-  orc_int8 var37;
-  orc_int8 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_int8 var41;
-
-  ptr0 = (orc_int8 *)ex->arrays[0];
-
-    /* 1: loadpb */
-    var35 = (int)0x00000080; /* 128 or 6.32404e-322f */
-    /* 3: loadpb */
-    var36 = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var34 = ptr0[i];
-    /* 2: xorb */
-    var38 = var34 ^ var35;
-    /* 4: mulsbw */
-    var39.i = var38 * var36;
-    /* 5: shrsw */
-    var40.i = var39.i >> 3;
-    /* 6: convssswb */
-    var41 = ORC_CLAMP_SB(var40.i);
-    /* 7: xorb */
-    var37 = var41 ^ var35;
-    /* 8: storeb */
-    ptr0[i] = var37;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_u8 */
-static void
-_backup_audiomixer_orc_add_volume_u8 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_int8 * ORC_RESTRICT ptr0;
-  const orc_int8 * ORC_RESTRICT ptr4;
-  orc_int8 var34;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_int8 var35;
-#else
-  orc_int8 var35;
-#endif
-  orc_int8 var36;
-  orc_int8 var37;
-  orc_int8 var38;
-  orc_int8 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-  orc_int8 var42;
-  orc_int8 var43;
-
-  ptr0 = (orc_int8 *)ex->arrays[0];
-  ptr4 = (orc_int8 *)ex->arrays[4];
-
-    /* 1: loadpb */
-    var35 = (int)0x00000080; /* 128 or 6.32404e-322f */
-    /* 3: loadpb */
-    var36 = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var34 = ptr4[i];
-    /* 2: xorb */
-    var39 = var34 ^ var35;
-    /* 4: mulsbw */
-    var40.i = var39 * var36;
-    /* 5: shrsw */
-    var41.i = var40.i >> 3;
-    /* 6: convssswb */
-    var42 = ORC_CLAMP_SB(var41.i);
-    /* 7: xorb */
-    var43 = var42 ^ var35;
-    /* 8: loadb */
-    var37 = ptr0[i];
-    /* 9: addusb */
-    var38 = ORC_CLAMP_UB((orc_uint8)var37 + (orc_uint8)var43);
-    /* 10: storeb */
-    ptr0[i] = var38;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_s8 */
-static void
-_backup_audiomixer_orc_add_volume_s8 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_int8 * ORC_RESTRICT ptr0;
-  const orc_int8 * ORC_RESTRICT ptr4;
-  orc_int8 var34;
-  orc_int8 var35;
-  orc_int8 var36;
-  orc_int8 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_int8 var40;
-
-  ptr0 = (orc_int8 *)ex->arrays[0];
-  ptr4 = (orc_int8 *)ex->arrays[4];
-
-    /* 1: loadpb */
-    var35 = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadb */
-    var34 = ptr4[i];
-    /* 2: mulsbw */
-    var38.i = var34 * var35;
-    /* 3: shrsw */
-    var39.i = var38.i >> 3;
-    /* 4: convssswb */
-    var40 = ORC_CLAMP_SB(var39.i);
-    /* 5: loadb */
-    var36 = ptr0[i];
-    /* 6: addssb */
-    var37 = ORC_CLAMP_SB(var36 + var40);
-    /* 7: storeb */
-    ptr0[i] = var37;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_u16 */
-static void
-_backup_audiomixer_orc_add_volume_u16 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var34;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var35;
-#else
-  orc_union16 var35;
-#endif
-  orc_union16 var36;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union32 var40;
-  orc_union32 var41;
-  orc_union16 var42;
-  orc_union16 var43;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-    /* 1: loadpw */
-    var35.i = (int)0x00008000; /* 32768 or 1.61895e-319f */
-    /* 3: loadpw */
-    var36.i = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var34 = ptr4[i];
-    /* 2: xorw */
-    var39.i = var34.i ^ var35.i;
-    /* 4: mulswl */
-    var40.i = var39.i * var36.i;
-    /* 5: shrsl */
-    var41.i = var40.i >> 11;
-    /* 6: convssslw */
-    var42.i = ORC_CLAMP_SW(var41.i);
-    /* 7: xorw */
-    var43.i = var42.i ^ var35.i;
-    /* 8: loadw */
-    var37 = ptr0[i];
-    /* 9: addusw */
-    var38.i = ORC_CLAMP_UW((orc_uint16)var37.i + (orc_uint16)var43.i);
-    /* 10: storew */
-    ptr0[i] = var38;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_s16 */
-static void
-_backup_audiomixer_orc_add_volume_s16 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var34;
-  orc_union16 var35;
-  orc_union16 var36;
-  orc_union16 var37;
-  orc_union32 var38;
-  orc_union32 var39;
-  orc_union16 var40;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-    /* 1: loadpw */
-    var35.i = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var34 = ptr4[i];
-    /* 2: mulswl */
-    var38.i = var34.i * var35.i;
-    /* 3: shrsl */
-    var39.i = var38.i >> 11;
-    /* 4: convssslw */
-    var40.i = ORC_CLAMP_SW(var39.i);
-    /* 5: loadw */
-    var36 = ptr0[i];
-    /* 6: addssw */
-    var37.i = ORC_CLAMP_SW(var36.i + var40.i);
-    /* 7: storew */
-    ptr0[i] = var37;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_u32 */
-static void
-_backup_audiomixer_orc_add_volume_u32 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union32 * ORC_RESTRICT ptr0;
-  const orc_union32 * ORC_RESTRICT ptr4;
-  orc_union32 var34;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union32 var35;
-#else
-  orc_union32 var35;
-#endif
-  orc_union32 var36;
-  orc_union32 var37;
-  orc_union32 var38;
-  orc_union32 var39;
-  orc_union64 var40;
-  orc_union64 var41;
-  orc_union32 var42;
-  orc_union32 var43;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-    /* 1: loadpl */
-    var35.i = (int)0x80000000; /* -2147483648 or 1.061e-314f */
-    /* 3: loadpl */
-    var36.i = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var34 = ptr4[i];
-    /* 2: xorl */
-    var39.i = var34.i ^ var35.i;
-    /* 4: mulslq */
-    var40.i = ((orc_int64)var39.i) * ((orc_int64)var36.i);
-    /* 5: shrsq */
-    var41.i = var40.i >> 27;
-    /* 6: convsssql */
-    var42.i = ORC_CLAMP_SL(var41.i);
-    /* 7: xorl */
-    var43.i = var42.i ^ var35.i;
-    /* 8: loadl */
-    var37 = ptr0[i];
-    /* 9: addusl */
-    var38.i = ORC_CLAMP_UL((orc_int64)(orc_uint32)var37.i + (orc_int64)(orc_uint32)var43.i);
-    /* 10: storel */
-    ptr0[i] = var38;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_s32 */
-static void
-_backup_audiomixer_orc_add_volume_s32 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union32 * ORC_RESTRICT ptr0;
-  const orc_union32 * ORC_RESTRICT ptr4;
-  orc_union32 var34;
-  orc_union32 var35;
-  orc_union32 var36;
-  orc_union32 var37;
-  orc_union64 var38;
-  orc_union64 var39;
-  orc_union32 var40;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-    /* 1: loadpl */
-    var35.i = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var34 = ptr4[i];
-    /* 2: mulslq */
-    var38.i = ((orc_int64)var34.i) * ((orc_int64)var35.i);
-    /* 3: shrsq */
-    var39.i = var38.i >> 27;
-    /* 4: convsssql */
-    var40.i = ORC_CLAMP_SL(var39.i);
-    /* 5: loadl */
-    var36 = ptr0[i];
-    /* 6: addssl */
-    var37.i = ORC_CLAMP_SL((orc_int64)var36.i + (orc_int64)var40.i);
-    /* 7: storel */
-    ptr0[i] = var37;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_f32 */
-static void
-_backup_audiomixer_orc_add_volume_f32 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union32 * ORC_RESTRICT ptr0;
-  const orc_union32 * ORC_RESTRICT ptr4;
-  orc_union32 var33;
-  orc_union32 var34;
-  orc_union32 var35;
-  orc_union32 var36;
-  orc_union32 var37;
-
-  ptr0 = (orc_union32 *)ex->arrays[0];
-  ptr4 = (orc_union32 *)ex->arrays[4];
-
-    /* 1: loadpl */
-    var34.i = ex->params[24];
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadl */
-    var33 = ptr4[i];
-    /* 2: mulf */
-    {
-       orc_union32 _src1;
-       orc_union32 _src2;
-       orc_union32 _dest1;
-       _src1.i = ORC_DENORMAL(var33.i);
-       _src2.i = ORC_DENORMAL(var34.i);
-       _dest1.f = _src1.f * _src2.f;
-       var37.i = ORC_DENORMAL(_dest1.i);
-    }
-    /* 3: loadl */
-    var35 = ptr0[i];
-    /* 4: addf */
-    {
-       orc_union32 _src1;
-       orc_union32 _src2;
-       orc_union32 _dest1;
-       _src1.i = ORC_DENORMAL(var35.i);
-       _src2.i = ORC_DENORMAL(var37.i);
-       _dest1.f = _src1.f + _src2.f;
-       var36.i = ORC_DENORMAL(_dest1.i);
-    }
-    /* 5: storel */
-    ptr0[i] = var36;
-  }
-
-}
-
-/* audiomixer_orc_add_volume_f64 */
-static void
-_backup_audiomixer_orc_add_volume_f64 (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union64 * ORC_RESTRICT ptr4;
-  orc_union64 var33;
-  orc_union64 var34;
-  orc_union64 var35;
-  orc_union64 var36;
-  orc_union64 var37;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union64 *)ex->arrays[4];
-
-    /* 1: loadpq */
-    var34.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadq */
-    var33 = ptr4[i];
-    /* 2: muld */
-    {
-       orc_union64 _src1;
-       orc_union64 _src2;
-       orc_union64 _dest1;
-       _src1.i = ORC_DENORMAL_DOUBLE(var33.i);
-       _src2.i = ORC_DENORMAL_DOUBLE(var34.i);
-       _dest1.f = _src1.f * _src2.f;
-       var37.i = ORC_DENORMAL_DOUBLE(_dest1.i);
-    }
-    /* 3: loadq */
-    var35 = ptr0[i];
-    /* 4: addd */
-    {
-       orc_union64 _src1;
-       orc_union64 _src2;
-       orc_union64 _dest1;
-       _src1.i = ORC_DENORMAL_DOUBLE(var35.i);
-       _src2.i = ORC_DENORMAL_DOUBLE(var37.i);
-       _dest1.f = _src1.f + _src2.f;
-       var36.i = ORC_DENORMAL_DOUBLE(_dest1.i);
-    }
-    /* 5: storeq */
-    ptr0[i] = var36;
-  }
-
-}
-
-
-static int quiet = 0;
-static int benchmark = 0;
-
-static void help (const char *argv0)
-{
-  printf("Usage:\n");
-  printf("  %s [OPTION]\n", argv0);
-  printf("Help Options:\n");
-  printf("  -h, --help          Show help options\n");
-  printf("Application Options:\n");
-  printf("  -b, --benchmark     Run benchmark and show results\n");
-  printf("  -q, --quiet         Don't output anything except on failures\n");
-
-  exit(0);
-}
-
-int
-main (int argc, char *argv[])
-{
-  int error = FALSE;
-  int i;
-
-  orc_test_init ();
-
-  for(i=1;i<argc;i++) {
-    if (strcmp(argv[i], "--help") == 0 ||
-      strcmp(argv[i], "-h") == 0) {
-      help(argv[0]);
-    } else if (strcmp(argv[i], "--quiet") == 0 ||
-      strcmp(argv[i], "-q") == 0) {
-      quiet = 1;
-      benchmark = 0;
-    } else if (strcmp(argv[i], "--benchmark") == 0 ||
-      strcmp(argv[i], "-b") == 0) {
-      benchmark = 1;
-      quiet = 0;
-    }
-  }
-
-  /* audiomixer_orc_add_s32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_s32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_s32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_s32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-
-      orc_program_append_2 (p, "addssl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_s16 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_s16:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_s16");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_s16);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_source (p, 2, "s1");
-
-      orc_program_append_2 (p, "addssw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_s8 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_s8:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_s8");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_s8);
-    orc_program_add_destination (p, 1, "d1");
-    orc_program_add_source (p, 1, "s1");
-
-      orc_program_append_2 (p, "addssb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_u32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_u32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_u32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_u32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-
-      orc_program_append_2 (p, "addusl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_u16 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_u16:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_u16");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_u16);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_source (p, 2, "s1");
-
-      orc_program_append_2 (p, "addusw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_u8 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_u8:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_u8");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_u8);
-    orc_program_add_destination (p, 1, "d1");
-    orc_program_add_source (p, 1, "s1");
-
-      orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_f32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_f32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_f32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_f32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-
-      orc_program_append_2 (p, "addf", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_f64 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_f64:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_f64");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_f64);
-    orc_program_add_destination (p, 8, "d1");
-    orc_program_add_source (p, 8, "s1");
-
-      orc_program_append_2 (p, "addd", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_volume_u8 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_volume_u8:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_volume_u8");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_volume_u8);
-    orc_program_add_destination (p, 1, "d1");
-      orc_program_add_constant (p, 1, 0x00000080, "c1");
-      orc_program_add_constant (p, 2, 0x00000003, "c2");
-    orc_program_add_parameter (p, 1, "p1");
-    orc_program_add_temporary (p, 2, "t1");
-    orc_program_add_temporary (p, 1, "t2");
-
-      orc_program_append_2 (p, "xorb", 0, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mulsbw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "xorb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_u8 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_u8:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_u8");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_u8);
-    orc_program_add_destination (p, 1, "d1");
-    orc_program_add_source (p, 1, "s1");
-      orc_program_add_constant (p, 1, 0x00000080, "c1");
-      orc_program_add_constant (p, 2, 0x00000003, "c2");
-    orc_program_add_parameter (p, 1, "p1");
-    orc_program_add_temporary (p, 2, "t1");
-    orc_program_add_temporary (p, 1, "t2");
-
-      orc_program_append_2 (p, "xorb", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mulsbw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "xorb", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_s8 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_s8:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_s8");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_s8);
-    orc_program_add_destination (p, 1, "d1");
-    orc_program_add_source (p, 1, "s1");
-      orc_program_add_constant (p, 2, 0x00000003, "c1");
-    orc_program_add_parameter (p, 1, "p1");
-    orc_program_add_temporary (p, 2, "t1");
-    orc_program_add_temporary (p, 1, "t2");
-
-      orc_program_append_2 (p, "mulsbw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addssb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_u16 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_u16:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_u16");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_u16);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_source (p, 2, "s1");
-      orc_program_add_constant (p, 2, 0x00008000, "c1");
-      orc_program_add_constant (p, 4, 0x0000000b, "c2");
-    orc_program_add_parameter (p, 2, "p1");
-    orc_program_add_temporary (p, 4, "t1");
-    orc_program_add_temporary (p, 2, "t2");
-
-      orc_program_append_2 (p, "xorw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "convssslw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "xorw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addusw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_s16 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_s16:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_s16");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_s16);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_source (p, 2, "s1");
-      orc_program_add_constant (p, 4, 0x0000000b, "c1");
-    orc_program_add_parameter (p, 2, "p1");
-    orc_program_add_temporary (p, 4, "t1");
-    orc_program_add_temporary (p, 2, "t2");
-
-      orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "convssslw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addssw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_u32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_u32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_u32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_u32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-      orc_program_add_constant (p, 4, 0x80000000, "c1");
-      orc_program_add_constant_int64 (p, 8, 0x000000000000001bULL, "c2");
-    orc_program_add_parameter (p, 4, "p1");
-    orc_program_add_temporary (p, 8, "t1");
-    orc_program_add_temporary (p, 4, "t2");
-
-      orc_program_append_2 (p, "xorl", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mulslq", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsq", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "convsssql", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "xorl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addusl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_s32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_s32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_s32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_s32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-      orc_program_add_constant_int64 (p, 8, 0x000000000000001bULL, "c1");
-    orc_program_add_parameter (p, 4, "p1");
-    orc_program_add_temporary (p, 8, "t1");
-    orc_program_add_temporary (p, 4, "t2");
-
-      orc_program_append_2 (p, "mulslq", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "shrsq", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "convsssql", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addssl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_f32 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_f32:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_f32");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_f32);
-    orc_program_add_destination (p, 4, "d1");
-    orc_program_add_source (p, 4, "s1");
-    orc_program_add_parameter_float (p, 4, "p1");
-    orc_program_add_temporary (p, 4, "t1");
-
-      orc_program_append_2 (p, "mulf", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addf", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* audiomixer_orc_add_volume_f64 */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("audiomixer_orc_add_volume_f64:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "audiomixer_orc_add_volume_f64");
-    orc_program_set_backup_function (p, _backup_audiomixer_orc_add_volume_f64);
-    orc_program_add_destination (p, 8, "d1");
-    orc_program_add_source (p, 8, "s1");
-    orc_program_add_parameter_double (p, 8, "p1");
-    orc_program_add_temporary (p, 8, "t1");
-
-      orc_program_append_2 (p, "muld", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
-      orc_program_append_2 (p, "addd", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-
-  if (error) {
-    return 1;
-  };
-  return 0;
-}
diff --git a/tests/check/orc/bayer.c b/tests/check/orc/bayer.c
deleted file mode 100644
index ee54899..0000000
--- a/tests/check/orc/bayer.c
+++ /dev/null
@@ -1,2017 +0,0 @@
-
-/* autogenerated from gstbayerorc.orc */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <math.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
-
-#include <orc/orc.h>
-#include <orc-test/orctest.h>
-
-/* 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 */
-
-
-/* bayer_orc_horiz_upsample_unaligned */
-static void
-_backup_bayer_orc_horiz_upsample_unaligned (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  orc_union16 * ORC_RESTRICT ptr1;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_int8 var40;
-  orc_int8 var41;
-  orc_union16 var42;
-  orc_int8 var43;
-  orc_int8 var44;
-  orc_int8 var45;
-  orc_int8 var46;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr1 = (orc_union16 *)ex->arrays[1];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr4[i];
-    /* 1: splitwb */
-    {
-       orc_union16 _src;
-       _src.i = var37.i;
-       var40 = _src.x2[1];
-       var41 = _src.x2[0];
-    }
-    /* 2: loadoffw */
-    var42 = ptr4[i + 1];
-    /* 3: splitwb */
-    {
-       orc_union16 _src;
-       _src.i = var42.i;
-       var43 = _src.x2[1];
-       var44 = _src.x2[0];
-    }
-    /* 4: avgub */
-    var45 = ((orc_uint8)var40 + (orc_uint8)var43 + 1)>>1;
-    /* 5: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var40;
-       _dest.x2[1] = var45;
-       var38.i = _dest.i;
-    }
-    /* 6: storew */
-    ptr0[i] = var38;
-    /* 7: avgub */
-    var46 = ((orc_uint8)var41 + (orc_uint8)var44 + 1)>>1;
-    /* 8: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46;
-       _dest.x2[1] = var44;
-       var39.i = _dest.i;
-    }
-    /* 9: storew */
-    ptr1[i] = var39;
-  }
-
-}
-
-/* bayer_orc_horiz_upsample */
-static void
-_backup_bayer_orc_horiz_upsample (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union16 * ORC_RESTRICT ptr0;
-  orc_union16 * ORC_RESTRICT ptr1;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_int8 var41;
-  orc_int8 var42;
-  orc_int8 var43;
-  orc_union16 var44;
-  orc_int8 var45;
-  orc_int8 var46;
-  orc_int8 var47;
-
-  ptr0 = (orc_union16 *)ex->arrays[0];
-  ptr1 = (orc_union16 *)ex->arrays[1];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadoffw */
-    var40 = ptr4[i + -1];
-    /* 1: select1wb */
-    {
-       orc_union16 _src;
-       _src.i = var40.i;
-       var41 = _src.x2[1];
-    }
-    /* 2: loadw */
-    var37 = ptr4[i];
-    /* 3: splitwb */
-    {
-       orc_union16 _src;
-       _src.i = var37.i;
-       var42 = _src.x2[1];
-       var43 = _src.x2[0];
-    }
-    /* 4: loadoffw */
-    var44 = ptr4[i + 1];
-    /* 5: select0wb */
-    {
-       orc_union16 _src;
-       _src.i = var44.i;
-       var45 = _src.x2[0];
-    }
-    /* 6: avgub */
-    var46 = ((orc_uint8)var43 + (orc_uint8)var45 + 1)>>1;
-    /* 7: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var43;
-       _dest.x2[1] = var46;
-       var38.i = _dest.i;
-    }
-    /* 8: storew */
-    ptr0[i] = var38;
-    /* 9: avgub */
-    var47 = ((orc_uint8)var41 + (orc_uint8)var42 + 1)>>1;
-    /* 10: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var47;
-       _dest.x2[1] = var42;
-       var39.i = _dest.i;
-    }
-    /* 11: storew */
-    ptr1[i] = var39;
-  }
-
-}
-
-/* bayer_orc_merge_bg_bgra */
-static void
-_backup_bayer_orc_merge_bg_bgra (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-    /* 11: loadpw */
-    var43.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr5[i];
-    /* 1: loadw */
-    var38 = ptr9[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr4[i];
-    /* 4: loadw */
-    var40 = ptr8[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr7[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr6[i];
-    /* 15: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[0];
-       _dest.x2[1] = var52.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[1];
-       _dest.x2[1] = var52.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[0];
-       _dest.x2[1] = var42.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[1];
-       _dest.x2[1] = var42.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_gr_bgra */
-static void
-_backup_bayer_orc_merge_gr_bgra (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-    /* 11: loadpw */
-    var43.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr4[i];
-    /* 1: loadw */
-    var38 = ptr8[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr5[i];
-    /* 4: loadw */
-    var40 = ptr9[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr6[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[0];
-       _dest.x2[1] = var52.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[1];
-       _dest.x2[1] = var52.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[0];
-       _dest.x2[1] = var43.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[1];
-       _dest.x2[1] = var43.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_bg_abgr */
-static void
-_backup_bayer_orc_merge_bg_abgr (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-    /* 11: loadpw */
-    var43.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr5[i];
-    /* 1: loadw */
-    var38 = ptr9[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr4[i];
-    /* 4: loadw */
-    var40 = ptr8[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr7[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr6[i];
-    /* 15: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var42.x2[0];
-       _dest.x2[1] = var44.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var42.x2[1];
-       _dest.x2[1] = var44.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[0];
-       _dest.x2[1] = var46.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[1];
-       _dest.x2[1] = var46.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_gr_abgr */
-static void
-_backup_bayer_orc_merge_gr_abgr (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-    /* 11: loadpw */
-    var43.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr4[i];
-    /* 1: loadw */
-    var38 = ptr8[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr5[i];
-    /* 4: loadw */
-    var40 = ptr9[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr6[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var43.x2[0];
-       _dest.x2[1] = var46.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var43.x2[1];
-       _dest.x2[1] = var46.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr7[i];
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[0];
-       _dest.x2[1] = var44.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[1];
-       _dest.x2[1] = var44.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_bg_rgba */
-static void
-_backup_bayer_orc_merge_bg_rgba (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-    /* 11: loadpw */
-    var43.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr5[i];
-    /* 1: loadw */
-    var38 = ptr9[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr4[i];
-    /* 4: loadw */
-    var40 = ptr8[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr7[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[0];
-       _dest.x2[1] = var52.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[1];
-       _dest.x2[1] = var52.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[0];
-       _dest.x2[1] = var42.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[1];
-       _dest.x2[1] = var42.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_gr_rgba */
-static void
-_backup_bayer_orc_merge_gr_rgba (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-    /* 11: loadpw */
-    var43.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr4[i];
-    /* 1: loadw */
-    var38 = ptr8[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr5[i];
-    /* 4: loadw */
-    var40 = ptr9[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr6[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr7[i];
-    /* 15: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[0];
-       _dest.x2[1] = var52.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var44.x2[1];
-       _dest.x2[1] = var52.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[0];
-       _dest.x2[1] = var43.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var46.x2[1];
-       _dest.x2[1] = var43.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_bg_argb */
-static void
-_backup_bayer_orc_merge_bg_argb (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-    /* 11: loadpw */
-    var43.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr5[i];
-    /* 1: loadw */
-    var38 = ptr9[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr4[i];
-    /* 4: loadw */
-    var40 = ptr8[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr7[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var42.x2[0];
-       _dest.x2[1] = var46.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var42.x2[1];
-       _dest.x2[1] = var46.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 15: loadw */
-    var44 = ptr6[i];
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[0];
-       _dest.x2[1] = var44.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[1];
-       _dest.x2[1] = var44.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-/* bayer_orc_merge_gr_argb */
-static void
-_backup_bayer_orc_merge_gr_argb (OrcExecutor * ORC_RESTRICT ex)
-{
-  int i;
-  int n = ex->n;
-  orc_union64 * ORC_RESTRICT ptr0;
-  const orc_union16 * ORC_RESTRICT ptr4;
-  const orc_union16 * ORC_RESTRICT ptr5;
-  const orc_union16 * ORC_RESTRICT ptr6;
-  const orc_union16 * ORC_RESTRICT ptr7;
-  const orc_union16 * ORC_RESTRICT ptr8;
-  const orc_union16 * ORC_RESTRICT ptr9;
-  orc_union16 var37;
-  orc_union16 var38;
-  orc_union16 var39;
-  orc_union16 var40;
-  orc_union16 var41;
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var42;
-#else
-  orc_union16 var42;
-#endif
-#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) 
-  volatile orc_union16 var43;
-#else
-  orc_union16 var43;
-#endif
-  orc_union16 var44;
-  orc_union64 var45;
-  orc_union16 var46;
-  orc_union16 var47;
-  orc_union16 var48;
-  orc_union16 var49;
-  orc_union16 var50;
-  orc_union16 var51;
-  orc_union16 var52;
-  orc_union32 var53;
-  orc_union32 var54;
-
-  ptr0 = (orc_union64 *)ex->arrays[0];
-  ptr4 = (orc_union16 *)ex->arrays[4];
-  ptr5 = (orc_union16 *)ex->arrays[5];
-  ptr6 = (orc_union16 *)ex->arrays[6];
-  ptr7 = (orc_union16 *)ex->arrays[7];
-  ptr8 = (orc_union16 *)ex->arrays[8];
-  ptr9 = (orc_union16 *)ex->arrays[9];
-
-    /* 9: loadpw */
-    var42.i = (int)0x0000ff00; /* 65280 or 3.22526e-319f */
-    /* 11: loadpw */
-    var43.i = (int)0x000000ff; /* 255 or 1.25987e-321f */
-
-  for (i = 0; i < n; i++) {
-    /* 0: loadw */
-    var37 = ptr4[i];
-    /* 1: loadw */
-    var38 = ptr8[i];
-    /* 2: avgub */
-    var46.x2[0] = ((orc_uint8)var37.x2[0] + (orc_uint8)var38.x2[0] + 1)>>1;
-    var46.x2[1] = ((orc_uint8)var37.x2[1] + (orc_uint8)var38.x2[1] + 1)>>1;
-    /* 3: loadw */
-    var39 = ptr5[i];
-    /* 4: loadw */
-    var40 = ptr9[i];
-    /* 5: avgub */
-    var47.x2[0] = ((orc_uint8)var39.x2[0] + (orc_uint8)var40.x2[0] + 1)>>1;
-    var47.x2[1] = ((orc_uint8)var39.x2[1] + (orc_uint8)var40.x2[1] + 1)>>1;
-    /* 6: loadw */
-    var41 = ptr6[i];
-    /* 7: copyw */
-    var48.i = var41.i;
-    /* 8: avgub */
-    var49.x2[0] = ((orc_uint8)var47.x2[0] + (orc_uint8)var48.x2[0] + 1)>>1;
-    var49.x2[1] = ((orc_uint8)var47.x2[1] + (orc_uint8)var48.x2[1] + 1)>>1;
-    /* 10: andw */
-    var50.i = var49.i & var42.i;
-    /* 12: andw */
-    var51.i = var48.i & var43.i;
-    /* 13: orw */
-    var52.i = var51.i | var50.i;
-    /* 14: loadw */
-    var44 = ptr7[i];
-    /* 15: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var43.x2[0];
-       _dest.x2[1] = var44.x2[0];
-       var53.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var43.x2[1];
-       _dest.x2[1] = var44.x2[1];
-       var53.x2[1] = _dest.i;
-    }
-    /* 16: mergebw */
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[0];
-       _dest.x2[1] = var46.x2[0];
-       var54.x2[0] = _dest.i;
-    }
-    {
-       orc_union16 _dest;
-       _dest.x2[0] = var52.x2[1];
-       _dest.x2[1] = var46.x2[1];
-       var54.x2[1] = _dest.i;
-    }
-    /* 17: mergewl */
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[0];
-       _dest.x2[1] = var54.x2[0];
-       var45.x2[0] = _dest.i;
-    }
-    {
-       orc_union32 _dest;
-       _dest.x2[0] = var53.x2[1];
-       _dest.x2[1] = var54.x2[1];
-       var45.x2[1] = _dest.i;
-    }
-    /* 18: storeq */
-    ptr0[i] = var45;
-  }
-
-}
-
-
-static int quiet = 0;
-static int benchmark = 0;
-
-static void help (const char *argv0)
-{
-  printf("Usage:\n");
-  printf("  %s [OPTION]\n", argv0);
-  printf("Help Options:\n");
-  printf("  -h, --help          Show help options\n");
-  printf("Application Options:\n");
-  printf("  -b, --benchmark     Run benchmark and show results\n");
-  printf("  -q, --quiet         Don't output anything except on failures\n");
-
-  exit(0);
-}
-
-int
-main (int argc, char *argv[])
-{
-  int error = FALSE;
-  int i;
-
-  orc_test_init ();
-
-  for(i=1;i<argc;i++) {
-    if (strcmp(argv[i], "--help") == 0 ||
-      strcmp(argv[i], "-h") == 0) {
-      help(argv[0]);
-    } else if (strcmp(argv[i], "--quiet") == 0 ||
-      strcmp(argv[i], "-q") == 0) {
-      quiet = 1;
-      benchmark = 0;
-    } else if (strcmp(argv[i], "--benchmark") == 0 ||
-      strcmp(argv[i], "-b") == 0) {
-      benchmark = 1;
-      quiet = 0;
-    }
-  }
-
-  /* bayer_orc_horiz_upsample_unaligned */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_horiz_upsample_unaligned:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_horiz_upsample_unaligned");
-    orc_program_set_backup_function (p, _backup_bayer_orc_horiz_upsample_unaligned);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_destination (p, 2, "d2");
-    orc_program_add_source (p, 2, "s1");
-      orc_program_add_constant (p, 4, 0x00000001, "c1");
-    orc_program_add_temporary (p, 2, "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, 1, "t5");
-
-      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1);
-      orc_program_append_2 (p, "loadoffw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_horiz_upsample */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_horiz_upsample:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_horiz_upsample");
-    orc_program_set_backup_function (p, _backup_bayer_orc_horiz_upsample);
-    orc_program_add_destination (p, 2, "d1");
-    orc_program_add_destination (p, 2, "d2");
-    orc_program_add_source (p, 2, "s1");
-      orc_program_add_constant (p, 4, 0xffffffff, "c1");
-      orc_program_add_constant (p, 4, 0x00000001, "c2");
-    orc_program_add_temporary (p, 2, "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, 1, "t5");
-
-      orc_program_append_2 (p, "loadoffw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1);
-      orc_program_append_2 (p, "loadoffw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_bg_bgra */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_bg_bgra:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_bg_bgra");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_bgra);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x000000ff, "c1");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_gr_bgra */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_gr_bgra:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_gr_bgra");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_bgra);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c1");
-      orc_program_add_constant (p, 2, 0x000000ff, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_bg_abgr */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_bg_abgr:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_bg_abgr");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_abgr);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x000000ff, "c1");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_S3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_gr_abgr */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_gr_abgr:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_gr_abgr");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_abgr);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c1");
-      orc_program_add_constant (p, 2, 0x000000ff, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_T3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_bg_rgba */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_bg_rgba:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_bg_rgba");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_rgba);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x000000ff, "c1");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_gr_rgba */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_gr_rgba:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_gr_rgba");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_rgba);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c1");
-      orc_program_add_constant (p, 2, 0x000000ff, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_bg_argb */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_bg_argb:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_bg_argb");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_argb);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x000000ff, "c1");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_T3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_S3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-  /* bayer_orc_merge_gr_argb */
-  {
-    OrcProgram *p = NULL;
-    int ret;
-
-    if (!quiet)      printf ("bayer_orc_merge_gr_argb:\n");
-    p = orc_program_new ();
-    orc_program_set_name (p, "bayer_orc_merge_gr_argb");
-    orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_argb);
-    orc_program_add_destination (p, 8, "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_source (p, 2, "s4");
-    orc_program_add_source (p, 2, "s5");
-    orc_program_add_source (p, 2, "s6");
-      orc_program_add_constant (p, 2, 0x0000ff00, "c1");
-      orc_program_add_constant (p, 2, 0x000000ff, "c2");
-    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_add_temporary (p, 2, "t5");
-
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_S5, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_S6, ORC_VAR_D1);
-      orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
-      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
-      orc_program_append_2 (p, "andw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
-      orc_program_append_2 (p, "orw", 0, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_S4, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1);
-      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
-
-    if (benchmark) {
-      printf ("    cycles (emulate) :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
-    }
-
-    ret = orc_test_compare_output_backup (p);
-    if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    backup function  :   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (backup)  :   %g\n",
-          orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
-    }
-
-    ret = orc_test_compare_output (p);
-    if (ret == ORC_TEST_INDETERMINATE && !quiet) {
-      printf ("    compiled function:   COMPILE FAILED\n");
-    } else if (!ret) {
-      error = TRUE;
-    } else if (!quiet) {
-      printf ("    compiled function:   PASSED\n");
-    }
-
-    if (benchmark) {
-      printf ("    cycles (compiled):   %g\n",
-          orc_test_performance_full (p, 0, NULL));
-    }
-
-    orc_program_free (p);
-  }
-
-
-  if (error) {
-    return 1;
-  };
-  return 0;
-}
diff --git a/tests/check/pipelines/colorspace.c b/tests/check/pipelines/colorspace.c
deleted file mode 100644
index 4c42e8a..0000000
--- a/tests/check/pipelines/colorspace.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* GStreamer
- *
- * unit comparison test for colorspace
- *
- * Copyright 2011 Collabora Ltd.
- *  @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
- * Copyright 2011 Nokia Corp.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <gst/check/gstcheck.h>
-
-static GMainLoop *loop;
-
-static void
-message_cb (GstBus * bus, GstMessage * message, gpointer user_data)
-{
-  switch (GST_MESSAGE_TYPE (message)) {
-    case GST_MESSAGE_ERROR:
-    case GST_MESSAGE_WARNING:
-      g_assert_not_reached ();
-      break;
-    case GST_MESSAGE_EOS:
-      g_main_loop_quit (loop);
-      break;
-    case GST_MESSAGE_ELEMENT:
-    {
-      const GstStructure *s = gst_message_get_structure (message);
-      const gchar *name = gst_structure_get_name (s);
-
-      fail_unless (strcmp (name, "delta") == 0);
-      break;
-    }
-    default:
-      break;
-  }
-}
-
-/* compare output with ffmpegcolorspace */
-static void
-colorspace_compare (gint width, gint height, gboolean comp)
-{
-  GstBus *bus;
-  GstElement *pipeline, *src, *filter1, *filter2, *csp, *fcsp, *fakesink;
-  GstElement *queue1, *queue2, *tee, *compare;
-  GstCaps *caps, *tcaps, *rcaps, *fcaps;
-  GstCaps *ccaps;
-  GstPad *pad;
-
-  gint i, j;
-
-  /* create elements */
-  pipeline = gst_pipeline_new ("pipeline");
-  src = gst_element_factory_make ("videotestsrc", "videotestsrc");
-  fail_unless (src != NULL);
-  filter1 = gst_element_factory_make ("capsfilter", "capsfilter1");
-  fail_unless (filter1 != NULL);
-  csp = gst_element_factory_make ("colorspace", "colorspace");
-  fail_unless (csp != NULL);
-  filter2 = gst_element_factory_make ("capsfilter", "capsfilter2");
-  fail_unless (filter2 != NULL);
-
-  if (comp) {
-    fcsp = gst_element_factory_make ("ffmpegcolorspace", "ffmpegcolorspace");
-    fail_unless (fcsp != NULL);
-    tee = gst_element_factory_make ("tee", "tee");
-    fail_unless (tee != NULL);
-    queue1 = gst_element_factory_make ("queue", "queue1");
-    fail_unless (queue1 != NULL);
-    queue2 = gst_element_factory_make ("queue", "queue2");
-    fail_unless (queue2 != NULL);
-    compare = gst_element_factory_make ("compare", "compare");
-    fail_unless (compare != NULL);
-  } else {
-    fcsp = tee = queue1 = queue2 = compare = NULL;
-  }
-
-  fakesink = gst_element_factory_make ("fakesink", "fakesink");
-  fail_unless (fakesink != NULL);
-
-  /* add and link */
-  gst_bin_add_many (GST_BIN (pipeline), src, filter1, filter2, csp, fakesink,
-      tee, queue1, queue2, fcsp, compare, NULL);
-
-  fail_unless (gst_element_link (src, filter1));
-
-  if (comp) {
-    fail_unless (gst_element_link (filter1, tee));
-
-    fail_unless (gst_element_link (tee, queue1));
-    fail_unless (gst_element_link (queue1, fcsp));
-    fail_unless (gst_element_link_pads (fcsp, NULL, compare, "sink"));
-
-    fail_unless (gst_element_link (tee, queue2));
-    fail_unless (gst_element_link (queue2, csp));
-    fail_unless (gst_element_link_pads (csp, NULL, compare, "check"));
-
-    fail_unless (gst_element_link (compare, filter2));
-  } else {
-    fail_unless (gst_element_link (filter1, csp));
-    fail_unless (gst_element_link (csp, filter2));
-  }
-  fail_unless (gst_element_link (filter2, fakesink));
-
-  /* obtain possible caps combinations */
-  if (comp) {
-    pad = gst_element_get_static_pad (fcsp, "sink");
-    fail_unless (pad != NULL);
-    ccaps = gst_pad_get_pad_template_caps (pad);
-    fail_unless (ccaps != NULL);
-    fcaps = ccaps;
-    gst_object_unref (pad);
-  } else {
-    fcaps = gst_caps_new_any ();
-  }
-
-  pad = gst_element_get_static_pad (csp, "sink");
-  fail_unless (pad != NULL);
-  ccaps = gst_pad_get_pad_template_caps (pad);
-  fail_unless (ccaps != NULL);
-  gst_object_unref (pad);
-
-  /* handle videotestsrc limitations */
-  pad = gst_element_get_static_pad (src, "src");
-  fail_unless (pad != NULL);
-  caps = (GstCaps *) gst_pad_get_pad_template_caps (pad);
-  fail_unless (caps != NULL);
-  gst_object_unref (pad);
-
-  rcaps = gst_caps_new_simple ("video/x-raw-yuv",
-      "width", G_TYPE_INT, width, "height", G_TYPE_INT, height,
-      "framerate", GST_TYPE_FRACTION, 25, 1,
-      "color-matrix", G_TYPE_STRING, "sdtv",
-      "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-  gst_caps_append (rcaps, gst_caps_new_simple ("video/x-raw-rgb",
-          "width", G_TYPE_INT, width, "height", G_TYPE_INT, height,
-          "framerate", GST_TYPE_FRACTION, 25, 1,
-          "depth", G_TYPE_INT, 32, NULL));
-
-  /* FIXME also allow x-raw-gray if/when colorspace actually handles those */
-
-  /* limit to supported compare types */
-  if (comp) {
-    gst_caps_append (rcaps, gst_caps_new_simple ("video/x-raw-rgb",
-            "width", G_TYPE_INT, width, "height", G_TYPE_INT, height,
-            "framerate", GST_TYPE_FRACTION, 25, 1,
-            "depth", G_TYPE_INT, 24, NULL));
-  }
-
-  tcaps = gst_caps_intersect (fcaps, ccaps);
-  gst_caps_unref (fcaps);
-  gst_caps_unref (ccaps);
-  caps = gst_caps_intersect (tcaps, caps);
-  gst_caps_unref (tcaps);
-  tcaps = caps;
-  caps = gst_caps_intersect (tcaps, rcaps);
-  gst_caps_unref (tcaps);
-  gst_caps_unref (rcaps);
-
-  /* normalize to finally have a list of acceptable fixed formats */
-  caps = gst_caps_simplify (caps);
-  caps = gst_caps_normalize (caps);
-
-  /* set up for running stuff */
-  loop = g_main_loop_new (NULL, FALSE);
-  bus = gst_element_get_bus (pipeline);
-  gst_bus_add_signal_watch (bus);
-  g_signal_connect (bus, "message::eos", (GCallback) message_cb, NULL);
-  gst_object_unref (bus);
-
-  g_object_set (src, "num-buffers", 5, NULL);
-  if (comp) {
-    /* set lower bound for ssim comparison, and allow slightly different caps */
-    g_object_set (compare, "method", 2, NULL);
-    g_object_set (compare, "meta", 3, NULL);
-    g_object_set (compare, "threshold", 0.90, NULL);
-    g_object_set (compare, "upper", FALSE, NULL);
-  }
-
-  GST_INFO ("possible caps to check %d", gst_caps_get_size (caps));
-
-  /* loop over all input and output combinations */
-  for (i = 0; i < gst_caps_get_size (caps); i++) {
-    for (j = 0; j < gst_caps_get_size (caps); j++) {
-      GstCaps *in_caps, *out_caps;
-      GstStructure *s;
-      const gchar *fourcc;
-
-      in_caps = gst_caps_copy_nth (caps, i);
-      out_caps = gst_caps_copy_nth (caps, j);
-
-      /* FIXME remove if videotestsrc and video format handle these properly */
-      s = gst_caps_get_structure (in_caps, 0);
-      if ((fourcc = gst_structure_get_string (s, "format"))) {
-        if (!strcmp (fourcc, "YUV9") ||
-            !strcmp (fourcc, "YVU9") || !strcmp (fourcc, "v216")) {
-          gst_caps_unref (in_caps);
-          gst_caps_unref (out_caps);
-          continue;
-        }
-      }
-
-      GST_INFO ("checking conversion from %" GST_PTR_FORMAT " (%d)"
-          " to %" GST_PTR_FORMAT " (%d)", in_caps, i, out_caps, j);
-
-      g_object_set (filter1, "caps", in_caps, NULL);
-      g_object_set (filter2, "caps", out_caps, NULL);
-
-      fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING)
-          != GST_STATE_CHANGE_FAILURE);
-
-      g_main_loop_run (loop);
-
-      fail_unless (gst_element_set_state (pipeline, GST_STATE_NULL)
-          == GST_STATE_CHANGE_SUCCESS);
-
-      gst_caps_unref (in_caps);
-      gst_caps_unref (out_caps);
-    }
-  }
-
-  gst_caps_unref (caps);
-  gst_object_unref (pipeline);
-  g_main_loop_unref (loop);
-}
-
-#define WIDTH  176
-#define HEIGHT 120
-
-GST_START_TEST (test_colorspace_compare)
-{
-  colorspace_compare (WIDTH, HEIGHT, TRUE);
-}
-
-GST_END_TEST;
-
-/* enable if you like stuff (ffmpegcolorspace) crashing */
-#ifdef TEST_ODD
-
-GST_START_TEST (test_colorspace_compare_odd_height)
-{
-  colorspace_compare (WIDTH, HEIGHT + 1, TRUE);
-}
-
-GST_END_TEST;
-
-GST_START_TEST (test_colorspace_compare_odd_width)
-{
-  colorspace_compare (WIDTH + 1, HEIGHT, TRUE);
-}
-
-GST_END_TEST;
-
-GST_START_TEST (test_colorspace_compare_odd)
-{
-  colorspace_compare (WIDTH + 1, HEIGHT + 1, TRUE);
-}
-
-GST_END_TEST;
-
-#endif
-
-/* useful for crash and valgrind check */
-
-GST_START_TEST (test_colorspace)
-{
-  colorspace_compare (WIDTH + 1, HEIGHT + 1, FALSE);
-}
-
-GST_END_TEST;
-
-static Suite *
-colorspace_suite (void)
-{
-  Suite *s = suite_create ("colorspace");
-  TCase *tc_chain;
-
-  tc_chain = tcase_create ("colorspace_compare");
-  tcase_add_test (tc_chain, test_colorspace_compare);
-#ifdef TEST_ODD
-  tcase_add_test (tc_chain, test_colorspace_compare_odd_height);
-  tcase_add_test (tc_chain, test_colorspace_compare_odd_width);
-  tcase_add_test (tc_chain, test_colorspace_compare_odd);
-#endif
-  tcase_add_test (tc_chain, test_colorspace);
-  suite_add_tcase (s, tc_chain);
-
-  /* test may take some time */
-  tcase_set_timeout (tc_chain, 600);
-
-  return s;
-}
-
-GST_CHECK_MAIN (colorspace)
diff --git a/tests/check/pipelines/streamheader.c b/tests/check/pipelines/streamheader.c
index d3346df..63a8f54 100644
--- a/tests/check/pipelines/streamheader.c
+++ b/tests/check/pipelines/streamheader.c
@@ -261,19 +261,4 @@
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = streamheader_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (streamheader);
diff --git a/tests/examples/Makefile.am b/tests/examples/Makefile.am
index 7429f75..c26d3d9 100644
--- a/tests/examples/Makefile.am
+++ b/tests/examples/Makefile.am
@@ -24,7 +24,30 @@
 GL_DIR=
 endif
 
-SUBDIRS= mpegts $(DIRECTFB_DIR) $(GTK_EXAMPLES) $(OPENCV_EXAMPLES) $(GL_DIR)
-DIST_SUBDIRS= mpegts camerabin2 directfb mxf opencv uvch264 gl
+if HAVE_AVFOUNDATION
+if HAVE_IOS
+AVSAMPLE_DIR=
+else
+AVSAMPLE_DIR=avsamplesink
+endif
+else
+AVSAMPLE_DIR=
+endif
+
+if USE_GTK3
+GTK3_DIR=gtk
+else
+GTK3_DIR=
+endif
+
+noinst_PROGRAMS = playout
+
+playout_SOURCES = playout.c
+playout_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+playout_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS)
+
+SUBDIRS= codecparsers mpegts $(DIRECTFB_DIR) $(GTK_EXAMPLES) $(OPENCV_EXAMPLES) \
+        $(GL_DIR) $(GTK3_DIR) $(AVSAMPLE_DIR)
+DIST_SUBDIRS= codecparsers mpegts camerabin2 directfb mxf opencv uvch264 gl gtk avsamplesink
 
 include $(top_srcdir)/common/parallel-subdirs.mak
diff --git a/tests/examples/Makefile.in b/tests/examples/Makefile.in
index 2fe720b..54b7208 100644
--- a/tests/examples/Makefile.in
+++ b/tests/examples/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,8 +18,19 @@
 # build subdirectories in parallel when make -jN is used. We will end up
 # descending into all subdirectories a second time, but only after the first
 # (parallel) run has finished, so it should go right through the second time.
+
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,8 +94,7 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
+noinst_PROGRAMS = playout$(EXEEXT)
 subdir = tests/examples
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
@@ -93,6 +103,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +117,6 @@
 	$(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 \
@@ -123,10 +133,23 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_playout_OBJECTS = playout-playout.$(OBJEXT)
+playout_OBJECTS = $(am_playout_OBJECTS)
+am__DEPENDENCIES_1 =
+playout_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+playout_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(playout_CFLAGS) \
+	$(CFLAGS) $(AM_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
@@ -139,8 +162,30 @@
 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
+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 = $(playout_SOURCES)
+DIST_SOURCES = $(playout_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
 	ctags-recursive dvi-recursive html-recursive info-recursive \
 	install-data-recursive install-dvi-recursive \
@@ -181,6 +226,9 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/common/parallel-subdirs.mak \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,8 +271,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -249,8 +299,6 @@
 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@
@@ -263,7 +311,6 @@
 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@
@@ -271,6 +318,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -297,11 +346,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -320,8 +372,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -380,10 +430,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -400,7 +454,6 @@
 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@
@@ -409,7 +462,6 @@
 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@
@@ -422,7 +474,6 @@
 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@
@@ -436,6 +487,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -447,6 +499,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -485,6 +539,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -520,10 +575,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -549,6 +608,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -556,7 +618,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -585,6 +654,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -595,6 +665,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -625,17 +696,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -652,6 +722,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -690,6 +761,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -712,11 +784,22 @@
 OPENCV_EXAMPLES = opencv
 @USE_OPENGL_FALSE@GL_DIR = 
 @USE_OPENGL_TRUE@GL_DIR = gl
-SUBDIRS = mpegts $(DIRECTFB_DIR) $(GTK_EXAMPLES) $(OPENCV_EXAMPLES) $(GL_DIR)
-DIST_SUBDIRS = mpegts camerabin2 directfb mxf opencv uvch264 gl
+@HAVE_AVFOUNDATION_FALSE@AVSAMPLE_DIR = 
+@HAVE_AVFOUNDATION_TRUE@@HAVE_IOS_FALSE@AVSAMPLE_DIR = avsamplesink
+@HAVE_AVFOUNDATION_TRUE@@HAVE_IOS_TRUE@AVSAMPLE_DIR = 
+@USE_GTK3_FALSE@GTK3_DIR = 
+@USE_GTK3_TRUE@GTK3_DIR = gtk
+playout_SOURCES = playout.c
+playout_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+playout_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS)
+SUBDIRS = codecparsers mpegts $(DIRECTFB_DIR) $(GTK_EXAMPLES) $(OPENCV_EXAMPLES) \
+        $(GL_DIR) $(GTK3_DIR) $(AVSAMPLE_DIR)
+
+DIST_SUBDIRS = codecparsers mpegts camerabin2 directfb mxf opencv uvch264 gl gtk avsamplesink
 all: all-recursive
 
 .SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/parallel-subdirs.mak $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -729,7 +812,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -738,7 +820,7 @@
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(top_srcdir)/common/parallel-subdirs.mak:
+$(top_srcdir)/common/parallel-subdirs.mak $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -749,6 +831,65 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+playout$(EXEEXT): $(playout_OBJECTS) $(playout_DEPENDENCIES) $(EXTRA_playout_DEPENDENCIES) 
+	@rm -f playout$(EXEEXT)
+	$(AM_V_CCLD)$(playout_LINK) $(playout_OBJECTS) $(playout_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playout-playout.Po@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 $@ $<
+
+playout-playout.o: playout.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(playout_CFLAGS) $(CFLAGS) -MT playout-playout.o -MD -MP -MF $(DEPDIR)/playout-playout.Tpo -c -o playout-playout.o `test -f 'playout.c' || echo '$(srcdir)/'`playout.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/playout-playout.Tpo $(DEPDIR)/playout-playout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='playout.c' object='playout-playout.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) $(playout_CFLAGS) $(CFLAGS) -c -o playout-playout.o `test -f 'playout.c' || echo '$(srcdir)/'`playout.c
+
+playout-playout.obj: playout.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(playout_CFLAGS) $(CFLAGS) -MT playout-playout.obj -MD -MP -MF $(DEPDIR)/playout-playout.Tpo -c -o playout-playout.obj `if test -f 'playout.c'; then $(CYGPATH_W) 'playout.c'; else $(CYGPATH_W) '$(srcdir)/playout.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/playout-playout.Tpo $(DEPDIR)/playout-playout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='playout.c' object='playout-playout.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) $(playout_CFLAGS) $(CFLAGS) -c -o playout-playout.obj `if test -f 'playout.c'; then $(CYGPATH_W) 'playout.c'; else $(CYGPATH_W) '$(srcdir)/playout.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -911,7 +1052,7 @@
 	done
 check-am: all-am
 check: check-recursive
-all-am: Makefile
+all-am: Makefile $(PROGRAMS)
 installdirs: installdirs-recursive
 installdirs-am:
 install: install-recursive
@@ -946,11 +1087,14 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-recursive
 
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
 
 distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
 dvi: dvi-recursive
 
@@ -993,12 +1137,14 @@
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-recursive
 
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
 
 pdf: pdf-recursive
 
@@ -1013,8 +1159,9 @@
 .MAKE: $(am__recursive_targets) install-am install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
-	check-am clean clean-generic clean-libtool cscopelist-am ctags \
-	ctags-am distclean distclean-generic distclean-libtool \
+	check-am clean clean-generic clean-libtool \
+	clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
 	install install-am install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
@@ -1022,8 +1169,11 @@
 	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-am uninstall uninstall-am
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am
+
+.PRECIOUS: Makefile
 
 
 .PHONY: independent-subdirs $(SUBDIRS)
diff --git a/tests/examples/avsamplesink/Makefile.am b/tests/examples/avsamplesink/Makefile.am
new file mode 100644
index 0000000..b98c721
--- /dev/null
+++ b/tests/examples/avsamplesink/Makefile.am
@@ -0,0 +1,14 @@
+noinst_PROGRAMS = avsamplesink
+
+avsamplesink_SOURCES = main.m
+
+avsamplesink_OBJCFLAGS= \
+	$(GST_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS)
+avsamplesink_LDADD= \
+	$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)
+avsamplesink_LDFLAGS =			\
+	-Wl,-framework -Wl,AVFoundation \
+	-Wl,-framework -Wl,QuartzCore \
+	-Wl,-framework -Wl,Cocoa
+avsamplesink_LIBTOOLFLAGS = --tag=CC
diff --git a/ext/mythtv/Makefile.in b/tests/examples/avsamplesink/Makefile.in
similarity index 75%
copy from ext/mythtv/Makefile.in
copy to tests/examples/avsamplesink/Makefile.in
index 055754c..2ffd9a2 100644
--- a/ext/mythtv/Makefile.in
+++ b/tests/examples/avsamplesink/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +89,8 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+noinst_PROGRAMS = avsamplesink$(EXEEXT)
+subdir = tests/examples/avsamplesink
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,52 +128,25 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 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)
+PROGRAMS = $(noinst_PROGRAMS)
+am_avsamplesink_OBJECTS = avsamplesink-main.$(OBJEXT)
+avsamplesink_OBJECTS = $(am_avsamplesink_OBJECTS)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+avsamplesink_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+avsamplesink_LINK = $(LIBTOOL) $(AM_V_lt) $(avsamplesink_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(OBJCLD) \
+	$(avsamplesink_OBJCFLAGS) $(OBJCFLAGS) $(avsamplesink_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
@@ -182,32 +163,31 @@
 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) \
+OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)
+LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(OBJC) $(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_OBJCFLAGS) $(OBJCFLAGS)
+AM_V_OBJC = $(am__v_OBJC_@AM_V@)
+am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@)
+am__v_OBJC_0 = @echo "  OBJC    " $@;
+am__v_OBJC_1 = 
+OBJCLD = $(OBJC)
+OBJCLINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \
 	$(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 = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@)
+am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@)
+am__v_OBJCLD_0 = @echo "  OBJCLD  " $@;
+am__v_OBJCLD_1 = 
+SOURCES = $(avsamplesink_SOURCES)
+DIST_SOURCES = $(avsamplesink_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
@@ -227,6 +207,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +225,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +253,6 @@
 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@
@@ -284,7 +265,6 @@
 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@
@@ -292,6 +272,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +300,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +326,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +384,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +408,6 @@
 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@
@@ -430,7 +416,6 @@
 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@
@@ -443,7 +428,6 @@
 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@
@@ -457,6 +441,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +453,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +493,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +529,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +562,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +572,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +608,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +619,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +650,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +676,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +715,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,29 +729,24 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
-
-libgstmythtvsrc_la_CFLAGS = \
+avsamplesink_SOURCES = main.m
+avsamplesink_OBJCFLAGS = \
 	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+	$(GST_PLUGINS_BASE_CFLAGS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
+avsamplesink_LDADD = \
+	$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)
 
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
+avsamplesink_LDFLAGS = \
+	-Wl,-framework -Wl,AVFoundation \
+	-Wl,-framework -Wl,QuartzCore \
+	-Wl,-framework -Wl,Cocoa
 
-noinst_HEADERS = \
-	gstmythtvsrc.h
-
+avsamplesink_LIBTOOLFLAGS = --tag=CC
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .lo .m .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -756,10 +756,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/avsamplesink/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu tests/examples/avsamplesink/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,43 +777,18 @@
 	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)"; \
-	}
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
 
-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}; \
-	}
-
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+avsamplesink$(EXEEXT): $(avsamplesink_OBJECTS) $(avsamplesink_DEPENDENCIES) $(EXTRA_avsamplesink_DEPENDENCIES) 
+	@rm -f avsamplesink$(EXEEXT)
+	$(AM_V_OBJCLD)$(avsamplesink_LINK) $(avsamplesink_OBJECTS) $(avsamplesink_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,38 +796,45 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avsamplesink-main.Po@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 $@ $<
+.m.o:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepOBJC_TRUE@	$(OBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -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) '$<'`
+.m.obj:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepOBJC_TRUE@	$(OBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -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 $@ $<
+.m.lo:
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepOBJC_TRUE@	$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepOBJC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+avsamplesink-main.o: main.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avsamplesink_OBJCFLAGS) $(OBJCFLAGS) -MT avsamplesink-main.o -MD -MP -MF $(DEPDIR)/avsamplesink-main.Tpo -c -o avsamplesink-main.o `test -f 'main.m' || echo '$(srcdir)/'`main.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avsamplesink-main.Tpo $(DEPDIR)/avsamplesink-main.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='main.m' object='avsamplesink-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avsamplesink_OBJCFLAGS) $(OBJCFLAGS) -c -o avsamplesink-main.o `test -f 'main.m' || echo '$(srcdir)/'`main.m
+
+avsamplesink-main.obj: main.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avsamplesink_OBJCFLAGS) $(OBJCFLAGS) -MT avsamplesink-main.obj -MD -MP -MF $(DEPDIR)/avsamplesink-main.Tpo -c -o avsamplesink-main.obj `if test -f 'main.m'; then $(CYGPATH_W) 'main.m'; else $(CYGPATH_W) '$(srcdir)/main.m'; fi`
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avsamplesink-main.Tpo $(DEPDIR)/avsamplesink-main.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='main.m' object='avsamplesink-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avsamplesink_OBJCFLAGS) $(OBJCFLAGS) -c -o avsamplesink-main.obj `if test -f 'main.m'; then $(CYGPATH_W) 'main.m'; else $(CYGPATH_W) '$(srcdir)/main.m'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -945,11 +926,8 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -982,7 +960,7 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1003,7 +981,7 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am:
 
 install-dvi: install-dvi-am
 
@@ -1049,24 +1027,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
 	ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-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
+	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
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/examples/avsamplesink/main.m b/tests/examples/avsamplesink/main.m
new file mode 100644
index 0000000..6bce53b
--- /dev/null
+++ b/tests/examples/avsamplesink/main.m
@@ -0,0 +1,124 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/gst.h>
+
+#include <Cocoa/Cocoa.h>
+#include <QuartzCore/QuartzCore.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreMedia/CoreMedia.h>
+
+static NSRunLoop *loop;
+static int quit = 0;
+
+static void
+end_stream_cb(GstBus* bus, GstMessage* message, GstElement* pipeline)
+{
+  switch (GST_MESSAGE_TYPE (message))
+  {
+    case GST_MESSAGE_EOS:
+      g_print ("End of stream\n");
+
+      g_atomic_int_set (&quit, 1);;
+      CFRunLoopStop ([loop getCFRunLoop]);
+      break;
+    case GST_MESSAGE_ERROR:
+    {
+      gchar *debug = NULL;
+      GError *err = NULL;
+
+      gst_message_parse_error (message, &err, &debug);
+
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+
+      if (debug)
+      {
+        g_print ("Debug details: %s\n", debug);
+        g_free (debug);
+      }
+
+      g_atomic_int_set (&quit, 1);;
+      CFRunLoopStop ([loop getCFRunLoop]);
+      break;
+    }
+    default:
+      break;
+  }
+}
+
+gint main (gint argc, gchar *argv[])
+{
+  CALayer *layer;
+  loop = [NSRunLoop currentRunLoop];
+
+  gst_init (&argc, &argv);
+
+  [NSApplication sharedApplication];
+
+  GstElement* pipeline = gst_pipeline_new ("pipeline");
+  GstElement* videosrc  = gst_element_factory_make ("videotestsrc", NULL);
+  GstElement* videosink = gst_element_factory_make ("avsamplebufferlayersink", NULL);
+  GstCaps *caps = gst_caps_from_string ("video/x-raw,format=UYVY");
+
+  gst_bin_add_many (GST_BIN (pipeline), videosrc, videosink, NULL);
+
+  gboolean link_ok = gst_element_link_filtered (videosrc, videosink, caps);
+  gst_caps_unref (caps);
+  if (!link_ok) {
+     g_critical ("Failed to link an element!\n") ;
+    return -1;
+  }
+
+  g_object_set (videosrc, "num-buffers", 500, NULL);
+
+  GstBus* bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+
+  gst_element_set_state (pipeline, GST_STATE_READY);
+  gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+
+  g_object_get (videosink, "layer", &layer, NULL);
+
+  NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect (0, 0, 320, 240)
+      styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+  [window setOpaque:NO];
+  [window.contentView setWantsLayer:YES];
+
+  NSView *view = [window.contentView superview];
+  [view setLayer:layer];
+
+  gst_element_set_state(pipeline, GST_STATE_PLAYING);
+
+  [window orderFront:window];
+
+  while (!g_atomic_int_get (&quit) && [loop runMode:NSDefaultRunLoopMode
+      beforeDate:[NSDate distantPast]]) {
+    GstMessage *msg;
+    while ((msg = gst_bus_timed_pop (bus, 1 * GST_MSECOND)))
+      end_stream_cb (bus, msg, pipeline);
+  }
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+
+  return 0;
+}
+
diff --git a/tests/examples/camerabin2/Makefile.am b/tests/examples/camerabin2/Makefile.am
index d29e679..56f5769 100644
--- a/tests/examples/camerabin2/Makefile.am
+++ b/tests/examples/camerabin2/Makefile.am
@@ -2,7 +2,7 @@
 
 AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\"
 
-if HAVE_GTK
+if HAVE_GTK3
 
 GST_CAMERABIN_GTK_EXAMPLES = gst-camera2
 
@@ -10,7 +10,7 @@
 gst_camera2_CFLAGS  = \
         $(GST_PLUGINS_BAD_CFLAGS) \
         $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
-	$(GTK_CFLAGS) \
+	$(GTK3_CFLAGS) \
 	$(GMODULE_EXPORT_CFLAGS) \
         -DGST_USE_UNSTABLE_API
 gst_camera2_LDADD   = \
@@ -21,7 +21,7 @@
         -lgstpbutils-@GST_API_VERSION@ \
 	-lgstvideo-@GST_API_VERSION@ \
         $(GST_LIBS) \
-	$(GTK_LIBS) \
+	$(GTK3_LIBS) \
 	$(GMODULE_EXPORT_LIBS)
 
 noinst_DATA = $(GST_CAMERABIN_UI_FILES)
diff --git a/tests/examples/camerabin2/Makefile.in b/tests/examples/camerabin2/Makefile.in
index 7da4a9f..9a665e7 100644
--- a/tests/examples/camerabin2/Makefile.in
+++ b/tests/examples/camerabin2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
 subdir = tests/examples/camerabin2
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,22 +129,23 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-@HAVE_GTK_TRUE@am__EXEEXT_1 = gst-camera2$(EXEEXT)
+@HAVE_GTK3_TRUE@am__EXEEXT_1 = gst-camera2$(EXEEXT)
 @HAVE_X11_TRUE@am__EXEEXT_2 = gst-camerabin2-test$(EXEEXT)
 PROGRAMS = $(noinst_PROGRAMS)
 am__gst_camera2_SOURCES_DIST = gst-camera2.h gst-camera2.c
-@HAVE_GTK_TRUE@am_gst_camera2_OBJECTS =  \
-@HAVE_GTK_TRUE@	gst_camera2-gst-camera2.$(OBJEXT)
+@HAVE_GTK3_TRUE@am_gst_camera2_OBJECTS =  \
+@HAVE_GTK3_TRUE@	gst_camera2-gst-camera2.$(OBJEXT)
 gst_camera2_OBJECTS = $(am_gst_camera2_OBJECTS)
 am__DEPENDENCIES_1 =
-@HAVE_GTK_TRUE@gst_camera2_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
-@HAVE_GTK_TRUE@	$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
-@HAVE_GTK_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@HAVE_GTK_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@HAVE_GTK3_TRUE@gst_camera2_DEPENDENCIES = $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
+@HAVE_GTK3_TRUE@	$(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
+@HAVE_GTK3_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@HAVE_GTK3_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -216,6 +225,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -233,8 +243,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -259,8 +271,6 @@
 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@
@@ -273,7 +283,6 @@
 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@
@@ -281,6 +290,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -307,11 +318,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -330,8 +344,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -390,10 +402,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -410,7 +426,6 @@
 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@
@@ -419,7 +434,6 @@
 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@
@@ -432,7 +446,6 @@
 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@
@@ -446,6 +459,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -457,6 +471,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -495,6 +511,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -530,10 +547,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -559,6 +580,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -566,7 +590,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -595,6 +626,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -605,6 +637,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -635,17 +668,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -662,6 +694,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -700,6 +733,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -715,28 +749,28 @@
 wayland_scanner = @wayland_scanner@
 GST_CAMERABIN_UI_FILES = gst-camera2.ui
 AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\"
-@HAVE_GTK_FALSE@GST_CAMERABIN_GTK_EXAMPLES = 
-@HAVE_GTK_TRUE@GST_CAMERABIN_GTK_EXAMPLES = gst-camera2
-@HAVE_GTK_TRUE@gst_camera2_SOURCES = gst-camera2.h gst-camera2.c
-@HAVE_GTK_TRUE@gst_camera2_CFLAGS = \
-@HAVE_GTK_TRUE@        $(GST_PLUGINS_BAD_CFLAGS) \
-@HAVE_GTK_TRUE@        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
-@HAVE_GTK_TRUE@	$(GTK_CFLAGS) \
-@HAVE_GTK_TRUE@	$(GMODULE_EXPORT_CFLAGS) \
-@HAVE_GTK_TRUE@        -DGST_USE_UNSTABLE_API
+@HAVE_GTK3_FALSE@GST_CAMERABIN_GTK_EXAMPLES = 
+@HAVE_GTK3_TRUE@GST_CAMERABIN_GTK_EXAMPLES = gst-camera2
+@HAVE_GTK3_TRUE@gst_camera2_SOURCES = gst-camera2.h gst-camera2.c
+@HAVE_GTK3_TRUE@gst_camera2_CFLAGS = \
+@HAVE_GTK3_TRUE@        $(GST_PLUGINS_BAD_CFLAGS) \
+@HAVE_GTK3_TRUE@        $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+@HAVE_GTK3_TRUE@	$(GTK3_CFLAGS) \
+@HAVE_GTK3_TRUE@	$(GMODULE_EXPORT_CFLAGS) \
+@HAVE_GTK3_TRUE@        -DGST_USE_UNSTABLE_API
 
-@HAVE_GTK_TRUE@gst_camera2_LDADD = \
-@HAVE_GTK_TRUE@        $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
-@HAVE_GTK_TRUE@        $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
-@HAVE_GTK_TRUE@        $(GST_PLUGINS_BAD_LIBS) \
-@HAVE_GTK_TRUE@        $(GST_PLUGINS_BASE_LIBS) \
-@HAVE_GTK_TRUE@        -lgstpbutils-@GST_API_VERSION@ \
-@HAVE_GTK_TRUE@	-lgstvideo-@GST_API_VERSION@ \
-@HAVE_GTK_TRUE@        $(GST_LIBS) \
-@HAVE_GTK_TRUE@	$(GTK_LIBS) \
-@HAVE_GTK_TRUE@	$(GMODULE_EXPORT_LIBS)
+@HAVE_GTK3_TRUE@gst_camera2_LDADD = \
+@HAVE_GTK3_TRUE@        $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
+@HAVE_GTK3_TRUE@        $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
+@HAVE_GTK3_TRUE@        $(GST_PLUGINS_BAD_LIBS) \
+@HAVE_GTK3_TRUE@        $(GST_PLUGINS_BASE_LIBS) \
+@HAVE_GTK3_TRUE@        -lgstpbutils-@GST_API_VERSION@ \
+@HAVE_GTK3_TRUE@	-lgstvideo-@GST_API_VERSION@ \
+@HAVE_GTK3_TRUE@        $(GST_LIBS) \
+@HAVE_GTK3_TRUE@	$(GTK3_LIBS) \
+@HAVE_GTK3_TRUE@	$(GMODULE_EXPORT_LIBS)
 
-@HAVE_GTK_TRUE@noinst_DATA = $(GST_CAMERABIN_UI_FILES)
+@HAVE_GTK3_TRUE@noinst_DATA = $(GST_CAMERABIN_UI_FILES)
 @HAVE_X11_FALSE@GST_CAMERABIN_X11_EXAMPLES = 
 @HAVE_X11_TRUE@GST_CAMERABIN_X11_EXAMPLES = gst-camerabin2-test
 @HAVE_X11_TRUE@gst_camerabin2_test_SOURCES = gst-camerabin2-test.c
@@ -767,7 +801,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/camerabin2/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/camerabin2/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1073,6 +1106,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/camerabin2/gst-camera2.c b/tests/examples/camerabin2/gst-camera2.c
index 45047f5..5104d3b 100644
--- a/tests/examples/camerabin2/gst-camera2.c
+++ b/tests/examples/camerabin2/gst-camera2.c
@@ -56,16 +56,21 @@
 create_ogg_profile (void)
 {
   GstEncodingContainerProfile *container;
+  GstCaps *caps = NULL;
 
-  container = gst_encoding_container_profile_new ("ogg", NULL,
-      gst_caps_new_empty_simple ("application/ogg"), NULL);
+  caps = gst_caps_new_empty_simple ("application/ogg");
+  container = gst_encoding_container_profile_new ("ogg", NULL, caps, NULL);
+  gst_caps_unref (caps);
 
+  caps = gst_caps_new_empty_simple ("video/x-theora");
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_video_profile_new (gst_caps_new_empty_simple
-          ("video/x-theora"), NULL, NULL, 1));
+      gst_encoding_video_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
+
+  caps = gst_caps_new_empty_simple ("audio/x-vorbis");
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_audio_profile_new (gst_caps_new_empty_simple
-          ("audio/x-vorbis"), NULL, NULL, 1));
+      gst_encoding_audio_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
 
   return (GstEncodingProfile *) container;
 }
@@ -74,16 +79,21 @@
 create_webm_profile (void)
 {
   GstEncodingContainerProfile *container;
+  GstCaps *caps = NULL;
 
-  container = gst_encoding_container_profile_new ("webm", NULL,
-      gst_caps_new_empty_simple ("video/webm"), NULL);
+  caps = gst_caps_new_empty_simple ("video/webm");
+  container = gst_encoding_container_profile_new ("webm", NULL, caps, NULL);
+  gst_caps_unref (caps);
 
+  caps = gst_caps_new_empty_simple ("video/x-vp8");
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_video_profile_new (gst_caps_new_empty_simple ("video/x-vp8"),
-          NULL, NULL, 1));
+      gst_encoding_video_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
+
+  caps = gst_caps_new_empty_simple ("audio/x-vorbis");
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_audio_profile_new (gst_caps_new_empty_simple
-          ("audio/x-vorbis"), NULL, NULL, 1));
+      gst_encoding_audio_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
 
   return (GstEncodingProfile *) container;
 }
@@ -92,17 +102,23 @@
 create_mp4_profile (void)
 {
   GstEncodingContainerProfile *container;
+  GstCaps *caps = NULL;
 
-  container = gst_encoding_container_profile_new ("mp4", NULL,
+  caps =
       gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, "iso",
-          NULL), NULL);
+      NULL);
+  container = gst_encoding_container_profile_new ("mp4", NULL, caps, NULL);
+  gst_caps_unref (caps);
 
+  caps = gst_caps_new_empty_simple ("video/x-h264");
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_video_profile_new (gst_caps_new_empty_simple
-          ("video/x-h264"), NULL, NULL, 1));
+      gst_encoding_video_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
+
+  caps = gst_caps_new_simple ("audio/mpeg", "version", G_TYPE_INT, 4, NULL);
   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
-      gst_encoding_audio_profile_new (gst_caps_new_simple ("audio/mpeg",
-              "version", G_TYPE_INT, 4, NULL), NULL, NULL, 1));
+      gst_encoding_audio_profile_new (caps, NULL, NULL, 1));
+  gst_caps_unref (caps);
 
   return (GstEncodingProfile *) container;
 }
@@ -154,9 +170,7 @@
 void
 on_viewfinderArea_realize (GtkWidget * widget, gpointer data)
 {
-#if GTK_CHECK_VERSION (2, 18, 0)
   gdk_window_ensure_native (gtk_widget_get_window (widget));
-#endif
 }
 
 void
@@ -189,6 +203,13 @@
   }
 }
 
+void
+on_zoomScale_value_changed (GtkWidget * widget, gpointer data)
+{
+  g_object_set (camera, "zoom",
+      (gfloat) gtk_range_get_value (GTK_RANGE (widget)), NULL);
+}
+
 static GstBusSyncReply
 bus_sync_callback (GstBus * bus, GstMessage * message, gpointer data)
 {
@@ -203,11 +224,7 @@
   /* FIXME: make sure to get XID in main thread */
   ui_drawing = GTK_WIDGET (gtk_builder_get_object (builder, "viewfinderArea"));
   gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (message->src),
-#if GTK_CHECK_VERSION (2, 91, 6)
       GDK_WINDOW_XID (gtk_widget_get_window (ui_drawing)));
-#else
-      GDK_WINDOW_XWINDOW (gtk_widget_get_window (ui_drawing)));
-#endif
 
   gst_message_unref (message);
   return GST_BUS_DROP;
@@ -260,7 +277,6 @@
 static gboolean
 init_gtkwidgets_data (void)
 {
-#if GTK_CHECK_VERSION(2,24,0)
   gint i;
   GtkComboBoxText *combobox =
       GTK_COMBO_BOX_TEXT (gtk_builder_get_object (builder, "formatComboBox"));
@@ -275,16 +291,11 @@
   /* default to the first one -> ogg */
   gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
   return TRUE;
-#else
-  g_warning ("This needs a newer version of GTK (2.24 at least)");
-  return FALSE;
-#endif
 }
 
 int
 main (int argc, char *argv[])
 {
-  int ret = 0;
   GError *error = NULL;
   GstBus *bus;
 
@@ -319,5 +330,5 @@
 error:
   gst_element_set_state (camera, GST_STATE_NULL);
   gst_object_unref (camera);
-  return ret;
+  return 0;
 }
diff --git a/tests/examples/camerabin2/gst-camera2.h b/tests/examples/camerabin2/gst-camera2.h
index 8477dac..825d10a 100644
--- a/tests/examples/camerabin2/gst-camera2.h
+++ b/tests/examples/camerabin2/gst-camera2.h
@@ -48,4 +48,7 @@
 void
 on_formatComboBox_changed (GtkWidget * widget, gpointer data);
 
+void
+on_zoomScale_value_changed (GtkWidget * widget, gpointer data);
+
 #endif /* __GST_CAMERA_BIN_H__ */
diff --git a/tests/examples/camerabin2/gst-camera2.ui b/tests/examples/camerabin2/gst-camera2.ui
index 9dc1fee..52bcfc6 100644
--- a/tests/examples/camerabin2/gst-camera2.ui
+++ b/tests/examples/camerabin2/gst-camera2.ui
@@ -1,17 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
 <interface>
-  <requires lib="gtk+" version="2.16"/>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkAdjustment" id="zoomadjustment">
+    <property name="lower">1</property>
+    <property name="upper">10</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.10000000000000001</property>
+    <property name="page_increment">1</property>
+  </object>
   <object class="GtkWindow" id="mainWindow">
     <property name="can_focus">False</property>
     <property name="default_width">800</property>
     <property name="default_height">600</property>
     <signal name="delete-event" handler="on_mainWindow_delete_event" swapped="no"/>
     <child>
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="box1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="box3">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
@@ -21,7 +30,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
+                <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
                 <signal name="toggled" handler="on_imageRButton_toggled" swapped="no"/>
@@ -39,7 +48,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
+                <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">imageRButton</property>
@@ -55,11 +64,11 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">0</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox2">
+          <object class="GtkBox" id="box2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
@@ -71,13 +80,14 @@
               <packing>
                 <property name="expand">True</property>
                 <property name="fill">True</property>
-                <property name="position">0</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="box4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
@@ -97,7 +107,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="use_action_appearance">False</property>
                     <signal name="clicked" handler="on_captureButton_clicked" swapped="no"/>
                   </object>
                   <packing>
@@ -113,7 +122,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="use_action_appearance">False</property>
                     <signal name="clicked" handler="on_stopCaptureButton_clicked" swapped="no"/>
                   </object>
                   <packing>
@@ -147,10 +155,38 @@
                     <property name="position">4</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Zoom</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScale" id="zoomScale">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="adjustment">zoomadjustment</property>
+                    <property name="fill_level">10</property>
+                    <property name="round_digits">1</property>
+                    <property name="value_pos">right</property>
+                    <signal name="value-changed" handler="on_zoomScale_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">6</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -158,7 +194,7 @@
           <packing>
             <property name="expand">True</property>
             <property name="fill">True</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/tests/examples/camerabin2/gst-camerabin2-test.c b/tests/examples/camerabin2/gst-camerabin2-test.c
index dfbd055..90e010a 100644
--- a/tests/examples/camerabin2/gst-camerabin2-test.c
+++ b/tests/examples/camerabin2/gst-camerabin2-test.c
@@ -595,6 +595,7 @@
     elem = gst_parse_launch (element_name, &error);
     if (elem) {
       g_object_set (element, property_name, elem, NULL);
+      g_object_unref (elem);
     } else {
       GST_WARNING ("can't create element '%s' for property '%s'", element_name,
           property_name);
@@ -695,6 +696,7 @@
 
     if (setup_pipeline_element (wrapper, "video-source", videosrc_name, NULL)) {
       g_object_set (camerabin, "camera-source", wrapper, NULL);
+      g_object_unref (wrapper);
     } else {
       GST_WARNING ("Failed to set videosrc to %s", videosrc_name);
     }
@@ -718,15 +720,18 @@
 
   if (imagepp_name) {
     ipp = create_ipp_bin ();
-    if (ipp)
+    if (ipp) {
       g_object_set (camerabin, "image-filter", ipp, NULL);
-    else
+      g_object_unref (ipp);
+    } else
       GST_WARNING ("Could not create ipp elements");
   }
 
   prof = load_encoding_profile ();
-  if (prof)
+  if (prof) {
     g_object_set (G_OBJECT (camerabin), "video-profile", prof, NULL);
+    gst_encoding_profile_unref (prof);
+  }
 
   GST_INFO_OBJECT (camerabin, "elements created");
 
@@ -1071,6 +1076,9 @@
     i++;
   }
 
+  if (i == 0)
+    return;
+
   if (i > 1)
     shot_to_shot = avg.shot_to_shot / (i - 1);
   else
diff --git a/tests/examples/codecparsers/Makefile.am b/tests/examples/codecparsers/Makefile.am
new file mode 100644
index 0000000..6fd8c99
--- /dev/null
+++ b/tests/examples/codecparsers/Makefile.am
@@ -0,0 +1,14 @@
+noinst_PROGRAMS = parse-jpeg parse-vp8
+
+parse_jpeg_SOURCES = parse-jpeg.c
+parse_jpeg_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
+parse_jpeg_LDFLAGS = $(GST_LIBS)
+parse_jpeg_LDADD = \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
+
+parse_vp8_SOURCES  = parse-vp8.c
+parse_vp8_CFLAGS   = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
+parse_vp8_LDFLAGS = $(GST_LIBS)
+parse_vp8_LDADD    = \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
+
diff --git a/ext/mythtv/Makefile.in b/tests/examples/codecparsers/Makefile.in
similarity index 77%
copy from ext/mythtv/Makefile.in
copy to tests/examples/codecparsers/Makefile.in
index 055754c..beae4ea 100644
--- a/ext/mythtv/Makefile.in
+++ b/tests/examples/codecparsers/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +89,8 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+noinst_PROGRAMS = parse-jpeg$(EXEEXT) parse-vp8$(EXEEXT)
+subdir = tests/examples/codecparsers
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,52 +128,28 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 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 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+PROGRAMS = $(noinst_PROGRAMS)
+am_parse_jpeg_OBJECTS = parse_jpeg-parse-jpeg.$(OBJEXT)
+parse_jpeg_OBJECTS = $(am_parse_jpeg_OBJECTS)
+parse_jpeg_DEPENDENCIES = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
 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 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+parse_jpeg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(parse_jpeg_CFLAGS) \
+	$(CFLAGS) $(parse_jpeg_LDFLAGS) $(LDFLAGS) -o $@
+am_parse_vp8_OBJECTS = parse_vp8-parse-vp8.$(OBJEXT)
+parse_vp8_OBJECTS = $(am_parse_vp8_OBJECTS)
+parse_vp8_DEPENDENCIES = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
+parse_vp8_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(parse_vp8_CFLAGS) \
+	$(CFLAGS) $(parse_vp8_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
@@ -200,14 +184,13 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(parse_jpeg_SOURCES) $(parse_vp8_SOURCES)
+DIST_SOURCES = $(parse_jpeg_SOURCES) $(parse_vp8_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
@@ -227,6 +210,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +228,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +256,6 @@
 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@
@@ -284,7 +268,6 @@
 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@
@@ -292,6 +275,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +303,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +329,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +387,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +411,6 @@
 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@
@@ -430,7 +419,6 @@
 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@
@@ -443,7 +431,6 @@
 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@
@@ -457,6 +444,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +456,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +496,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +532,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +565,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +575,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +611,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +622,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +653,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +679,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +718,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,24 +732,17 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+parse_jpeg_SOURCES = parse-jpeg.c
+parse_jpeg_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
+parse_jpeg_LDFLAGS = $(GST_LIBS)
+parse_jpeg_LDADD = \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
-
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
+parse_vp8_SOURCES = parse-vp8.c
+parse_vp8_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
+parse_vp8_LDFLAGS = $(GST_LIBS)
+parse_vp8_LDADD = \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la
 
 all: all-am
 
@@ -756,10 +757,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/codecparsers/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu tests/examples/codecparsers/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,43 +778,22 @@
 	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)"; \
-	}
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
 
-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
+parse-jpeg$(EXEEXT): $(parse_jpeg_OBJECTS) $(parse_jpeg_DEPENDENCIES) $(EXTRA_parse_jpeg_DEPENDENCIES) 
+	@rm -f parse-jpeg$(EXEEXT)
+	$(AM_V_CCLD)$(parse_jpeg_LINK) $(parse_jpeg_OBJECTS) $(parse_jpeg_LDADD) $(LIBS)
 
-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}; \
-	}
-
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+parse-vp8$(EXEEXT): $(parse_vp8_OBJECTS) $(parse_vp8_DEPENDENCIES) $(EXTRA_parse_vp8_DEPENDENCIES) 
+	@rm -f parse-vp8$(EXEEXT)
+	$(AM_V_CCLD)$(parse_vp8_LINK) $(parse_vp8_OBJECTS) $(parse_vp8_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +801,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_jpeg-parse-jpeg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_vp8-parse-vp8.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +828,33 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+parse_jpeg-parse-jpeg.o: parse-jpeg.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_jpeg_CFLAGS) $(CFLAGS) -MT parse_jpeg-parse-jpeg.o -MD -MP -MF $(DEPDIR)/parse_jpeg-parse-jpeg.Tpo -c -o parse_jpeg-parse-jpeg.o `test -f 'parse-jpeg.c' || echo '$(srcdir)/'`parse-jpeg.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/parse_jpeg-parse-jpeg.Tpo $(DEPDIR)/parse_jpeg-parse-jpeg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='parse-jpeg.c' object='parse_jpeg-parse-jpeg.o' libtool=no @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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_jpeg_CFLAGS) $(CFLAGS) -c -o parse_jpeg-parse-jpeg.o `test -f 'parse-jpeg.c' || echo '$(srcdir)/'`parse-jpeg.c
+
+parse_jpeg-parse-jpeg.obj: parse-jpeg.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_jpeg_CFLAGS) $(CFLAGS) -MT parse_jpeg-parse-jpeg.obj -MD -MP -MF $(DEPDIR)/parse_jpeg-parse-jpeg.Tpo -c -o parse_jpeg-parse-jpeg.obj `if test -f 'parse-jpeg.c'; then $(CYGPATH_W) 'parse-jpeg.c'; else $(CYGPATH_W) '$(srcdir)/parse-jpeg.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/parse_jpeg-parse-jpeg.Tpo $(DEPDIR)/parse_jpeg-parse-jpeg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='parse-jpeg.c' object='parse_jpeg-parse-jpeg.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) $(parse_jpeg_CFLAGS) $(CFLAGS) -c -o parse_jpeg-parse-jpeg.obj `if test -f 'parse-jpeg.c'; then $(CYGPATH_W) 'parse-jpeg.c'; else $(CYGPATH_W) '$(srcdir)/parse-jpeg.c'; fi`
+
+parse_vp8-parse-vp8.o: parse-vp8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_vp8_CFLAGS) $(CFLAGS) -MT parse_vp8-parse-vp8.o -MD -MP -MF $(DEPDIR)/parse_vp8-parse-vp8.Tpo -c -o parse_vp8-parse-vp8.o `test -f 'parse-vp8.c' || echo '$(srcdir)/'`parse-vp8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/parse_vp8-parse-vp8.Tpo $(DEPDIR)/parse_vp8-parse-vp8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='parse-vp8.c' object='parse_vp8-parse-vp8.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) $(parse_vp8_CFLAGS) $(CFLAGS) -c -o parse_vp8-parse-vp8.o `test -f 'parse-vp8.c' || echo '$(srcdir)/'`parse-vp8.c
+
+parse_vp8-parse-vp8.obj: parse-vp8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_vp8_CFLAGS) $(CFLAGS) -MT parse_vp8-parse-vp8.obj -MD -MP -MF $(DEPDIR)/parse_vp8-parse-vp8.Tpo -c -o parse_vp8-parse-vp8.obj `if test -f 'parse-vp8.c'; then $(CYGPATH_W) 'parse-vp8.c'; else $(CYGPATH_W) '$(srcdir)/parse-vp8.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/parse_vp8-parse-vp8.Tpo $(DEPDIR)/parse_vp8-parse-vp8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='parse-vp8.c' object='parse_vp8-parse-vp8.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) $(parse_vp8_CFLAGS) $(CFLAGS) -c -o parse_vp8-parse-vp8.obj `if test -f 'parse-vp8.c'; then $(CYGPATH_W) 'parse-vp8.c'; else $(CYGPATH_W) '$(srcdir)/parse-vp8.c'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -945,11 +946,8 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -982,7 +980,7 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1003,7 +1001,7 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am:
 
 install-dvi: install-dvi-am
 
@@ -1049,24 +1047,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
 	ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-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
+	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
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/examples/codecparsers/parse-jpeg.c b/tests/examples/codecparsers/parse-jpeg.c
new file mode 100644
index 0000000..fe42999
--- /dev/null
+++ b/tests/examples/codecparsers/parse-jpeg.c
@@ -0,0 +1,307 @@
+/* GStreamer JPEG parser test utility
+ * Copyright (C) 2015 Tim-Philipp Müller <tim@centricular.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/codecparsers/gstjpegparser.h>
+
+#include <stdlib.h>
+
+static GstBuffer *app_segments[16];     /* NULL */
+
+static const gchar *
+get_marker_name (guint8 marker)
+{
+  switch (marker) {
+    case GST_JPEG_MARKER_SOF0:
+      return "SOF (Baseline)";
+    case GST_JPEG_MARKER_SOF1:
+      return "SOF (Extended Sequential, Huffman)";
+    case GST_JPEG_MARKER_SOF2:
+      return "SOF (Extended Progressive, Huffman)";
+    case GST_JPEG_MARKER_SOF3:
+      return "SOF (Lossless, Huffman)";
+    case GST_JPEG_MARKER_SOF5:
+      return "SOF (Differential Sequential, Huffman)";
+    case GST_JPEG_MARKER_SOF6:
+      return "SOF (Differential Progressive, Huffman)";
+    case GST_JPEG_MARKER_SOF7:
+      return "SOF (Differential Lossless, Huffman)";
+    case GST_JPEG_MARKER_SOF9:
+      return "SOF (Extended Sequential, Arithmetic)";
+    case GST_JPEG_MARKER_SOF10:
+      return "SOF (Progressive, Arithmetic)";
+    case GST_JPEG_MARKER_SOF11:
+      return "SOF (Lossless, Arithmetic)";
+    case GST_JPEG_MARKER_SOF13:
+      return "SOF (Differential Sequential, Arithmetic)";
+    case GST_JPEG_MARKER_SOF14:
+      return "SOF (Differential Progressive, Arithmetic)";
+    case GST_JPEG_MARKER_SOF15:
+      return "SOF (Differential Lossless, Arithmetic)";
+    case GST_JPEG_MARKER_DHT:
+      return "DHT";
+    case GST_JPEG_MARKER_DAC:
+      return "DAC";
+    case GST_JPEG_MARKER_SOI:
+      return "SOI";
+    case GST_JPEG_MARKER_EOI:
+      return "EOI";
+    case GST_JPEG_MARKER_SOS:
+      return "SOS";
+    case GST_JPEG_MARKER_DQT:
+      return "DQT";
+    case GST_JPEG_MARKER_DNL:
+      return "DNL";
+    case GST_JPEG_MARKER_DRI:
+      return "DRI";
+    case GST_JPEG_MARKER_APP0:
+      return "APP0";
+    case GST_JPEG_MARKER_APP1:
+      return "APP1";
+    case GST_JPEG_MARKER_APP2:
+      return "APP2";
+    case GST_JPEG_MARKER_APP3:
+      return "APP3";
+    case GST_JPEG_MARKER_APP4:
+      return "APP4";
+    case GST_JPEG_MARKER_APP5:
+      return "APP5";
+    case GST_JPEG_MARKER_APP6:
+      return "APP6";
+    case GST_JPEG_MARKER_APP7:
+      return "APP7";
+    case GST_JPEG_MARKER_APP8:
+      return "APP8";
+    case GST_JPEG_MARKER_APP9:
+      return "APP9";
+    case GST_JPEG_MARKER_APP10:
+      return "APP10";
+    case GST_JPEG_MARKER_APP11:
+      return "APP11";
+    case GST_JPEG_MARKER_APP12:
+      return "APP12";
+    case GST_JPEG_MARKER_APP13:
+      return "APP13";
+    case GST_JPEG_MARKER_APP14:
+      return "APP14";
+    case GST_JPEG_MARKER_APP15:
+      return "APP15";
+    case GST_JPEG_MARKER_COM:
+      return "COM";
+    default:
+      if (marker > GST_JPEG_MARKER_RST_MIN && marker < GST_JPEG_MARKER_RST_MAX)
+        return "RST";
+      break;
+  }
+  return "???";
+}
+
+static gboolean
+parse_jpeg_segment (GstJpegSegment * segment)
+{
+  switch (segment->marker) {
+    case GST_JPEG_MARKER_SOF0:
+    case GST_JPEG_MARKER_SOF1:
+    case GST_JPEG_MARKER_SOF2:
+    case GST_JPEG_MARKER_SOF3:
+    case GST_JPEG_MARKER_SOF9:
+    case GST_JPEG_MARKER_SOF10:
+    case GST_JPEG_MARKER_SOF11:{
+      GstJpegFrameHdr hdr;
+      int i;
+
+      if (!gst_jpeg_segment_parse_frame_header (segment, &hdr)) {
+        g_printerr ("Failed to parse frame header!\n");
+        return FALSE;
+      }
+
+      g_print ("\t\twidth x height   = %u x %u\n", hdr.width, hdr.height);
+      g_print ("\t\tsample precision = %u\n", hdr.sample_precision);
+      g_print ("\t\tnum components   = %u\n", hdr.num_components);
+      for (i = 0; i < hdr.num_components; ++i) {
+        g_print ("\t\t%d: id=%d, h=%d, v=%d, qts=%d\n", i,
+            hdr.components[i].identifier, hdr.components[i].horizontal_factor,
+            hdr.components[i].vertical_factor,
+            hdr.components[i].quant_table_selector);
+      }
+      break;
+    }
+    case GST_JPEG_MARKER_DHT:{
+      GstJpegHuffmanTables ht;
+
+      if (!gst_jpeg_segment_parse_huffman_table (segment, &ht)) {
+        g_printerr ("Failed to parse huffman table!\n");
+        return FALSE;
+      }
+      break;
+    }
+    case GST_JPEG_MARKER_DQT:{
+      GstJpegQuantTables qt;
+
+      if (!gst_jpeg_segment_parse_quantization_table (segment, &qt)) {
+        g_printerr ("Failed to parse quantization table!\n");
+        return FALSE;
+      }
+      break;
+    }
+    case GST_JPEG_MARKER_SOS:{
+      GstJpegScanHdr hdr;
+      int i;
+
+      if (!gst_jpeg_segment_parse_scan_header (segment, &hdr)) {
+        g_printerr ("Failed to parse scan header!\n");
+        return FALSE;
+      }
+
+      g_print ("\t\tnum components   = %u\n", hdr.num_components);
+      for (i = 0; i < hdr.num_components; ++i) {
+        g_print ("\t\t  %d: cs=%d, dcs=%d, acs=%d\n", i,
+            hdr.components[i].component_selector,
+            hdr.components[i].dc_selector, hdr.components[i].ac_selector);
+      }
+    }
+    case GST_JPEG_MARKER_COM:
+      /* gst_util_dump_mem (segment->data + segment->offset, segment->size); */
+      break;
+    default:
+      if (segment->marker >= GST_JPEG_MARKER_APP_MIN
+          && segment->marker <= GST_JPEG_MARKER_APP_MAX) {
+        guint n = segment->marker - GST_JPEG_MARKER_APP_MIN;
+
+        if (app_segments[n] == NULL)
+          app_segments[n] = gst_buffer_new ();
+
+        gst_buffer_append_memory (app_segments[n],
+            gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
+                (guint8 *) segment->data + segment->offset,
+                segment->size, 0, segment->size, NULL, NULL));
+      }
+      break;
+  }
+  return TRUE;
+}
+
+static void
+parse_jpeg (const guint8 * data, gsize size)
+{
+  GstJpegSegment segment;
+  guint offset = 0;
+
+  while (gst_jpeg_parse (&segment, data, size, offset)) {
+    if (segment.offset > offset + 2)
+      g_print ("  skipped %u bytes\n", (guint) segment.offset - offset - 2);
+
+    g_print ("%6d bytes at offset %-8u : %s\n", (gint) segment.size,
+        segment.offset, get_marker_name (segment.marker));
+
+    if (segment.marker == GST_JPEG_MARKER_EOI)
+      break;
+
+    if (offset + segment.size < size &&
+        parse_jpeg_segment (&segment) && segment.size >= 0)
+      offset = segment.offset + segment.size;
+    else
+      offset += 2;
+  };
+}
+
+static void
+process_file (const gchar * fn)
+{
+  GError *err = NULL;
+  gchar *data = NULL;
+  gsize size = 0;
+  guint i;
+
+  g_print ("===============================================================\n");
+  g_print (" %s\n", fn);
+  g_print ("===============================================================\n");
+
+  if (!g_file_get_contents (fn, &data, &size, &err)) {
+    g_error ("%s", err->message);
+    g_error_free (err);
+    return;
+  }
+
+  parse_jpeg ((const guint8 *) data, size);
+
+  for (i = 0; i < G_N_ELEMENTS (app_segments); ++i) {
+    if (app_segments[i] != NULL) {
+      GstMapInfo map = GST_MAP_INFO_INIT;
+
+      /* Could parse/extract tags here */
+      gst_buffer_map (app_segments[i], &map, GST_MAP_READ);
+      g_print ("\tAPP%-2u : %u bytes\n", i, (guint) map.size);
+      gst_util_dump_mem ((guchar *) map.data, MIN (map.size, 16));
+      gst_buffer_unmap (app_segments[i], &map);
+      gst_buffer_unref (app_segments[i]);
+      app_segments[i] = NULL;
+    }
+  }
+
+  g_free (data);
+}
+
+int
+main (int argc, gchar ** argv)
+{
+  gchar **filenames = NULL;
+  GOptionEntry options[] = {
+    {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+  guint i, num;
+
+  gst_init (&argc, &argv);
+
+  if (argc == 1) {
+    g_printerr ("Usage: %s FILE.JPG [FILE2.JPG] [FILE..JPG]\n", argv[0]);
+    return -1;
+  }
+
+  ctx = g_option_context_new ("JPEG FILES");
+  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  if (filenames == NULL || *filenames == NULL) {
+    g_printerr ("Please provide one or more filenames.");
+    return 1;
+  }
+
+  num = g_strv_length (filenames);
+
+  for (i = 0; i < num; ++i) {
+    process_file (filenames[i]);
+  }
+
+  g_strfreev (filenames);
+
+  return 0;
+}
diff --git a/tests/icles/vp8parser-test.c b/tests/examples/codecparsers/parse-vp8.c
similarity index 100%
rename from tests/icles/vp8parser-test.c
rename to tests/examples/codecparsers/parse-vp8.c
diff --git a/tests/examples/directfb/Makefile.in b/tests/examples/directfb/Makefile.in
index 04ec565..3b3e9bd 100644
--- a/tests/examples/directfb/Makefile.in
+++ b/tests/examples/directfb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = gstdfb$(EXEEXT)
 subdir = tests/examples/directfb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -195,6 +204,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -212,8 +222,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -238,8 +250,6 @@
 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@
@@ -252,7 +262,6 @@
 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@
@@ -260,6 +269,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -286,11 +297,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -309,8 +323,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -369,10 +381,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -389,7 +405,6 @@
 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@
@@ -398,7 +413,6 @@
 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@
@@ -411,7 +425,6 @@
 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@
@@ -425,6 +438,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -436,6 +450,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -474,6 +490,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -509,10 +526,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -538,6 +559,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -545,7 +569,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -574,6 +605,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -584,6 +616,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -614,17 +647,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -641,6 +673,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -679,6 +712,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -714,7 +748,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/directfb/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/directfb/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1001,6 +1034,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/Makefile.in b/tests/examples/gl/Makefile.in
index d8958b5..43d80cf 100644
--- a/tests/examples/gl/Makefile.in
+++ b/tests/examples/gl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -84,7 +94,6 @@
 @HAVE_SDL_TRUE@@HAVE_WINDOW_COCOA_FALSE@@USE_OPENGL_TRUE@am__append_4 = sdl
 @HAVE_GTK3_TRUE@@HAVE_WINDOW_COCOA_FALSE@@USE_OPENGL_TRUE@am__append_5 = gtk
 subdir = tests/examples/gl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -92,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +115,6 @@
 	$(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 \
@@ -122,6 +131,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -180,6 +190,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -222,8 +233,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -248,8 +261,6 @@
 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@
@@ -262,7 +273,6 @@
 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@
@@ -270,6 +280,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -296,11 +308,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -319,8 +334,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -379,10 +392,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -399,7 +416,6 @@
 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@
@@ -408,7 +424,6 @@
 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@
@@ -421,7 +436,6 @@
 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@
@@ -435,6 +449,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -446,6 +461,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -484,6 +501,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -519,10 +537,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -548,6 +570,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -555,7 +580,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -584,6 +616,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -594,6 +627,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -624,17 +658,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -651,6 +684,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -689,6 +723,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -720,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1015,6 +1049,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/clutter/Makefile.in b/tests/examples/gl/clutter/Makefile.in
index 240ef93..975b702 100644
--- a/tests/examples/gl/clutter/Makefile.in
+++ b/tests/examples/gl/clutter/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -85,8 +95,6 @@
 @HAVE_CLUTTER_TRUE@am__append_1 = cluttershare
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@am__append_2 = clutteractor clutteractortee
 subdir = tests/examples/gl/clutter
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -94,6 +102,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -107,7 +116,6 @@
 	$(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 \
@@ -124,6 +132,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -238,6 +247,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -255,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -281,8 +293,6 @@
 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@
@@ -295,7 +305,6 @@
 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@
@@ -303,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -329,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -352,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -412,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -432,7 +448,6 @@
 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@
@@ -441,7 +456,6 @@
 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@
@@ -454,7 +468,6 @@
 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@
@@ -468,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -479,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -517,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -552,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -581,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -588,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -617,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -627,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -657,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -684,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -722,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -780,7 +814,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/clutter/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/clutter/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1105,6 +1138,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/clutter/clutteractor.c b/tests/examples/gl/clutter/clutteractor.c
index 1fcae0e..3bcd4b0 100644
--- a/tests/examples/gl/clutter/clutteractor.c
+++ b/tests/examples/gl/clutter/clutteractor.c
@@ -164,6 +164,7 @@
 
   gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, actor,
       NULL);
+  gst_object_unref (bus);
 
   gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
 
diff --git a/tests/examples/gl/clutter/clutteractortee.c b/tests/examples/gl/clutter/clutteractortee.c
index 73f7a60..b05020f 100644
--- a/tests/examples/gl/clutter/clutteractortee.c
+++ b/tests/examples/gl/clutter/clutteractortee.c
@@ -217,6 +217,7 @@
 
   gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, actor,
       NULL);
+  gst_object_unref (bus);
 
   gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
 
diff --git a/tests/examples/gl/cocoa/Makefile.am b/tests/examples/gl/cocoa/Makefile.am
index 91349c0..3690546 100755
--- a/tests/examples/gl/cocoa/Makefile.am
+++ b/tests/examples/gl/cocoa/Makefile.am
@@ -4,12 +4,12 @@
 
 cocoa_videooverlay_SOURCES = cocoa-videooverlay.m
 
-cocoa_videooverlay_OBJCFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+cocoa_videooverlay_OBJCFLAGS=-Wno-error=unused-command-line-argument \
+    -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_BASE_LIBS) $(GST_LIBS) \
-	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
+    $(GL_CFLAGS) $(GL_OBJCFLAGS)
 
-cocoa_videooverlay_LIBTOOLFLAGS = --tag=OBJC
+cocoa_videooverlay_LDADD=$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+    $(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 endif
diff --git a/tests/examples/gl/cocoa/Makefile.in b/tests/examples/gl/cocoa/Makefile.in
index ffc541b..8b27d20 100644
--- a/tests/examples/gl/cocoa/Makefile.in
+++ b/tests/examples/gl/cocoa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 @HAVE_WINDOW_COCOA_TRUE@noinst_PROGRAMS = cocoa-videooverlay$(EXEEXT)
 subdir = tests/examples/gl/cocoa
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -137,10 +146,10 @@
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-cocoa_videooverlay_LINK = $(LIBTOOL) $(AM_V_lt) \
-	$(cocoa_videooverlay_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(OBJCLD) $(cocoa_videooverlay_OBJCFLAGS) $(OBJCFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+cocoa_videooverlay_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(OBJCLD) \
+	$(cocoa_videooverlay_OBJCFLAGS) $(OBJCFLAGS) $(AM_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
@@ -201,6 +210,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -218,8 +228,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -244,8 +256,6 @@
 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@
@@ -258,7 +268,6 @@
 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@
@@ -266,6 +275,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -292,11 +303,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -315,8 +329,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -375,10 +387,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -395,7 +411,6 @@
 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@
@@ -404,7 +419,6 @@
 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@
@@ -417,7 +431,6 @@
 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@
@@ -431,6 +444,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -442,6 +456,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -480,6 +496,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -515,10 +532,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -544,6 +565,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -551,7 +575,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -580,6 +611,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -590,6 +622,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -620,17 +653,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -647,6 +679,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -685,6 +718,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -699,14 +733,14 @@
 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 = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_OBJCFLAGS = -Wno-error=unused-command-line-argument \
+@HAVE_WINDOW_COCOA_TRUE@    -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@    $(GL_CFLAGS) $(GL_OBJCFLAGS)
 
 @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@    $(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
-@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_LIBTOOLFLAGS = --tag=OBJC
 all: all-am
 
 .SUFFIXES:
@@ -723,7 +757,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/cocoa/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/cocoa/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1010,6 +1043,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/cocoa/cocoa-videooverlay.m b/tests/examples/gl/cocoa/cocoa-videooverlay.m
index 9c5fc9a..a783c56 100755
--- a/tests/examples/gl/cocoa/cocoa-videooverlay.m
+++ b/tests/examples/gl/cocoa/cocoa-videooverlay.m
@@ -28,7 +28,7 @@
 /*                                                               */
 /* ============================================================= */
 
-@interface MainWindow: NSWindow {
+@interface MainWindow: NSWindow <NSApplicationDelegate> {
   GMainLoop *m_loop;
   GstElement *m_pipeline;
   gboolean m_isClosed;
@@ -52,7 +52,7 @@
     backing: NSBackingStoreBuffered defer: NO screen: nil];
 
   [self setReleasedWhenClosed:NO];
-  [NSApp setDelegate:self];
+  [[NSApplication sharedApplication] setDelegate:self];
 
   [self setTitle:@"gst-plugins-gl implements videooverlay interface"];
 
@@ -166,6 +166,9 @@
   NSRect rect;
   MainWindow *window=nil;
 
+  pool = [[NSAutoreleasePool alloc] init];
+  [NSApplication sharedApplication];
+
   g_print("app created\n");
 
   gst_init (&argc, &argv);
@@ -192,9 +195,6 @@
   if (!ok)
     g_warning("could not link videosrc to videosink\n");
 
-  pool = [[NSAutoreleasePool alloc] init];
-  [NSApplication sharedApplication];
-
   rect.origin.x = 0; rect.origin.y = 0;
   rect.size.width = width; rect.size.height = height;
 
diff --git a/tests/examples/gl/generic/Makefile.in b/tests/examples/gl/generic/Makefile.in
index 9146586..2e2a7dd 100644
--- a/tests/examples/gl/generic/Makefile.in
+++ b/tests/examples/gl/generic/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = tests/examples/gl/generic
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -176,6 +186,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -218,8 +229,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -244,8 +257,6 @@
 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@
@@ -258,7 +269,6 @@
 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@
@@ -266,6 +276,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -292,11 +304,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -315,8 +330,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -375,10 +388,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -395,7 +412,6 @@
 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@
@@ -404,7 +420,6 @@
 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@
@@ -417,7 +432,6 @@
 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@
@@ -431,6 +445,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -442,6 +457,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -480,6 +497,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -515,10 +533,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -544,6 +566,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -551,7 +576,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -580,6 +612,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -590,6 +623,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -620,17 +654,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -647,6 +680,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -685,6 +719,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -714,7 +749,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/generic/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/generic/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1009,6 +1043,8 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/generic/cube/Makefile.am b/tests/examples/gl/generic/cube/Makefile.am
index b6bd60b..e1b0cef 100644
--- a/tests/examples/gl/generic/cube/Makefile.am
+++ b/tests/examples/gl/generic/cube/Makefile.am
@@ -4,6 +4,6 @@
 cube_SOURCES = main.cpp
 
 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)
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
+cube_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/cube/Makefile.in b/tests/examples/gl/generic/cube/Makefile.in
index f7c398d..f41a08d 100644
--- a/tests/examples/gl/generic/cube/Makefile.in
+++ b/tests/examples/gl/generic/cube/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = cube$(EXEEXT)
 subdir = tests/examples/gl/generic/cube
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -128,7 +137,8 @@
 am_cube_OBJECTS = cube-main.$(OBJEXT)
 cube_OBJECTS = $(am_cube_OBJECTS)
 am__DEPENDENCIES_1 =
-cube_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+cube_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -196,6 +206,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -213,8 +224,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -239,8 +252,6 @@
 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@
@@ -253,7 +264,6 @@
 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@
@@ -261,6 +271,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -287,11 +299,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -310,8 +325,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -370,10 +383,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -390,7 +407,6 @@
 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@
@@ -399,7 +415,6 @@
 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@
@@ -412,7 +427,6 @@
 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@
@@ -426,6 +440,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -437,6 +452,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -475,6 +492,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -510,10 +528,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -539,6 +561,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -546,7 +571,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -575,6 +607,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -585,6 +618,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -615,17 +649,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -642,6 +675,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -680,6 +714,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -695,9 +730,9 @@
 wayland_scanner = @wayland_scanner@
 cube_SOURCES = main.cpp
 cube_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
 
-cube_LDADD = $(GST_LIBS) $(GL_LIBS)
+cube_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
@@ -714,7 +749,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/generic/cube/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/generic/cube/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1001,6 +1035,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/generic/cube/main.cpp b/tests/examples/gl/generic/cube/main.cpp
index 23c81ec..3a54fe6 100644
--- a/tests/examples/gl/generic/cube/main.cpp
+++ b/tests/examples/gl/generic/cube/main.cpp
@@ -18,12 +18,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <GL/gl.h>
-#include <GL/glu.h>
-#if __WIN32__ || _WIN32
-# include <GL/glext.h>
-#endif
 #include <gst/gst.h>
+#include <gst/gl/gl.h>
 
 #include <iostream>
 #include <string>
@@ -65,19 +61,18 @@
 }
 
 //client reshape callback
-static gboolean reshapeCallback (void *gl_sink, GLuint width, GLuint height, gpointer data)
+static gboolean reshapeCallback (void *gl_sink, void *context, 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 (void * gl_sink, GLuint texture, GLuint width, GLuint height, gpointer data)
+static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSample * sample, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -86,6 +81,21 @@
     static glong last_sec = current_time.tv_sec;
     static gint nbFrames = 0;
 
+    GstVideoFrame v_frame;
+    GstVideoInfo v_info;
+    guint texture = 0;
+    GstBuffer *buf = gst_sample_get_buffer (sample);
+    GstCaps *caps = gst_sample_get_caps (sample);
+
+    gst_video_info_from_caps (&v_info, caps);
+
+    if (!gst_video_frame_map (&v_frame, &v_info, buf, (GstMapFlags) (GST_MAP_READ | GST_MAP_GL))) {
+      g_warning ("Failed to map the video buffer");
+      return TRUE;
+    }
+
+    texture = *(guint *) v_frame.data[0];
+
     g_get_current_time (&current_time);
     nbFrames++ ;
 
@@ -110,7 +120,7 @@
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
 
-    glTranslatef(0.0f,0.0f,-5.0f);
+    glScalef(0.5f,0.5f,0.5f);
 
     glRotatef(xrot,1.0f,0.0f,0.0f);
     glRotatef(yrot,0.0f,1.0f,0.0f);
@@ -149,11 +159,15 @@
 	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
+    gst_video_frame_unmap (&v_frame);
+
     xrot+=0.3f;
     yrot+=0.2f;
     zrot+=0.4f;
 
-    //return TRUE causes a postRedisplay
+    glDisable (GL_DEPTH_TEST);
+    glDisable (GL_TEXTURE_2D);
+
     return TRUE;
 }
 
diff --git a/tests/examples/gl/generic/cubeyuv/Makefile.am b/tests/examples/gl/generic/cubeyuv/Makefile.am
index 289cbd3..b232871 100644
--- a/tests/examples/gl/generic/cubeyuv/Makefile.am
+++ b/tests/examples/gl/generic/cubeyuv/Makefile.am
@@ -4,6 +4,5 @@
 cubeyuv_SOURCES = main.cpp
 
 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)
-
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
+cubeyuv_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
diff --git a/tests/examples/gl/generic/cubeyuv/Makefile.in b/tests/examples/gl/generic/cubeyuv/Makefile.in
index 7b4ab16..e58edbe 100644
--- a/tests/examples/gl/generic/cubeyuv/Makefile.in
+++ b/tests/examples/gl/generic/cubeyuv/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = cubeyuv$(EXEEXT)
 subdir = tests/examples/gl/generic/cubeyuv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -128,7 +137,8 @@
 am_cubeyuv_OBJECTS = cubeyuv-main.$(OBJEXT)
 cubeyuv_OBJECTS = $(am_cubeyuv_OBJECTS)
 am__DEPENDENCIES_1 =
-cubeyuv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+cubeyuv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -196,6 +206,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -213,8 +224,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -239,8 +252,6 @@
 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@
@@ -253,7 +264,6 @@
 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@
@@ -261,6 +271,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -287,11 +299,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -310,8 +325,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -370,10 +383,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -390,7 +407,6 @@
 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@
@@ -399,7 +415,6 @@
 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@
@@ -412,7 +427,6 @@
 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@
@@ -426,6 +440,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -437,6 +452,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -475,6 +492,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -510,10 +528,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -539,6 +561,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -546,7 +571,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -575,6 +607,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -585,6 +618,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -615,17 +649,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -642,6 +675,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -680,6 +714,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -695,9 +730,9 @@
 wayland_scanner = @wayland_scanner@
 cubeyuv_SOURCES = main.cpp
 cubeyuv_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
 
-cubeyuv_LDADD = $(GST_LIBS) $(GL_LIBS)
+cubeyuv_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
@@ -714,7 +749,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/generic/cubeyuv/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/generic/cubeyuv/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1001,6 +1035,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/generic/cubeyuv/main.cpp b/tests/examples/gl/generic/cubeyuv/main.cpp
index 0d585a7..9c4b2cc 100644
--- a/tests/examples/gl/generic/cubeyuv/main.cpp
+++ b/tests/examples/gl/generic/cubeyuv/main.cpp
@@ -18,12 +18,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <GL/gl.h>
-#include <GL/glu.h>
-#if __WIN32__ || _WIN32
-# include <GL/glext.h>
-#endif
 #include <gst/gst.h>
+#include <gst/gl/gl.h>
 
 #include <iostream>
 #include <sstream>
@@ -87,12 +83,11 @@
 
 
 //client reshape callback
-static gboolean reshapeCallback (void * gl_sink, GLuint width, GLuint height, gpointer data)
+static gboolean reshapeCallback (void * gl_sink, void *context, 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;
@@ -100,7 +95,7 @@
 
 
 //client draw callback
-static gboolean drawCallback (void * gl_sink, GLuint texture, GLuint width, GLuint height, gpointer data)
+static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSample * sample, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -109,6 +104,21 @@
     static glong last_sec = current_time.tv_sec;
     static gint nbFrames = 0;
 
+    GstVideoFrame v_frame;
+    GstVideoInfo v_info;
+    guint texture = 0;
+    GstBuffer *buf = gst_sample_get_buffer (sample);
+    GstCaps *caps = gst_sample_get_caps (sample);
+
+    gst_video_info_from_caps (&v_info, caps);
+
+    if (!gst_video_frame_map (&v_frame, &v_info, buf, (GstMapFlags) (GST_MAP_READ | GST_MAP_GL))) {
+      g_warning ("Failed to map the video buffer");
+      return TRUE;
+    }
+
+    texture = *(guint *) v_frame.data[0];
+
     g_get_current_time (&current_time);
     nbFrames++ ;
 
@@ -172,20 +182,12 @@
 	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
+    gst_video_frame_unmap (&v_frame);
+
 	xrot+=0.03f;
     yrot+=0.02f;
     zrot+=0.04f;
 
-    //return TRUE causes a postRedisplay
-    //so you have to return FALSE to synchronise to have a graphic FPS
-    //equals to the input video frame rate
-
-    //Usually, we will not always return TRUE (or FALSE)
-    //For example, if you want a fixed graphic FPS equals to 60
-    //then you have to use the timeclock to return TRUE or FALSE
-    //in order to increase or decrease the FPS in real time
-    //to reach the 60.
-
     return TRUE;
 }
 
diff --git a/tests/examples/gl/generic/doublecube/Makefile.am b/tests/examples/gl/generic/doublecube/Makefile.am
index 3f220de..7f14895 100644
--- a/tests/examples/gl/generic/doublecube/Makefile.am
+++ b/tests/examples/gl/generic/doublecube/Makefile.am
@@ -4,6 +4,6 @@
 doublecube_SOURCES = main.cpp
 
 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)
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
+doublecube_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/doublecube/Makefile.in b/tests/examples/gl/generic/doublecube/Makefile.in
index 7e6e1f9..5f30dc3 100644
--- a/tests/examples/gl/generic/doublecube/Makefile.in
+++ b/tests/examples/gl/generic/doublecube/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = doublecube$(EXEEXT)
 subdir = tests/examples/gl/generic/doublecube
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -128,7 +137,8 @@
 am_doublecube_OBJECTS = doublecube-main.$(OBJEXT)
 doublecube_OBJECTS = $(am_doublecube_OBJECTS)
 am__DEPENDENCIES_1 =
-doublecube_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+doublecube_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -196,6 +206,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -213,8 +224,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -239,8 +252,6 @@
 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@
@@ -253,7 +264,6 @@
 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@
@@ -261,6 +271,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -287,11 +299,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -310,8 +325,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -370,10 +383,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -390,7 +407,6 @@
 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@
@@ -399,7 +415,6 @@
 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@
@@ -412,7 +427,6 @@
 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@
@@ -426,6 +440,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -437,6 +452,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -475,6 +492,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -510,10 +528,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -539,6 +561,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -546,7 +571,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -575,6 +607,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -585,6 +618,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -615,17 +649,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -642,6 +675,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -680,6 +714,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -695,9 +730,9 @@
 wayland_scanner = @wayland_scanner@
 doublecube_SOURCES = main.cpp
 doublecube_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
-	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
 
-doublecube_LDADD = $(GST_LIBS) $(GL_LIBS)
+doublecube_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
@@ -714,7 +749,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/generic/doublecube/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/generic/doublecube/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1001,6 +1035,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/generic/doublecube/main.cpp b/tests/examples/gl/generic/doublecube/main.cpp
index 4e0a421..98d7825 100644
--- a/tests/examples/gl/generic/doublecube/main.cpp
+++ b/tests/examples/gl/generic/doublecube/main.cpp
@@ -18,12 +18,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <GL/gl.h>
-#include <GL/glu.h>
-#if __WIN32__ || _WIN32
-# include <GL/glext.h>
-#endif
 #include <gst/gst.h>
+#include <gst/gl/gl.h>
 
 #include <iostream>
 #include <sstream>
@@ -89,12 +85,11 @@
 
 
 //client reshape callback
-static gboolean reshapeCallback (void *gl_sink, GLuint width, GLuint height)
+static gboolean reshapeCallback (void *gl_sink, void *context, 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;
@@ -102,7 +97,7 @@
 
 
 //client draw callback
-static gboolean drawCallback (void * gl_sink, GLuint texture, GLuint width, GLuint height)
+static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSample * sample, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -111,6 +106,21 @@
     static glong last_sec = current_time.tv_sec;
     static gint nbFrames = 0;
 
+    GstVideoFrame v_frame;
+    GstVideoInfo v_info;
+    guint texture = 0;
+    GstBuffer *buf = gst_sample_get_buffer (sample);
+    GstCaps *caps = gst_sample_get_caps (sample);
+
+    gst_video_info_from_caps (&v_info, caps);
+
+    if (!gst_video_frame_map (&v_frame, &v_info, buf, (GstMapFlags) (GST_MAP_READ | GST_MAP_GL))) {
+      g_warning ("Failed to map the video buffer");
+      return TRUE;
+    }
+
+    texture = *(guint *) v_frame.data[0];
+
     g_get_current_time (&current_time);
     nbFrames++ ;
 
@@ -174,20 +184,12 @@
 	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
+    gst_video_frame_unmap (&v_frame);
+
     xrot+=0.03f;
     yrot+=0.02f;
     zrot+=0.04f;
 
-    //return TRUE causes a postRedisplay
-    //so you have to return FALSE to synchronise to have a graphic FPS
-    //equals to the input video frame rate
-
-    //Usually, we will not always return TRUE (or FALSE)
-    //For example, if you want a fixed graphic FPS equals to 60
-    //then you have to use the timeclock to return TRUE or FALSE
-    //in order to increase or decrease the FPS in real time
-    //to reach the 60.
-
     return TRUE;
 }
 
diff --git a/tests/examples/gl/generic/recordgraphic/Makefile.in b/tests/examples/gl/generic/recordgraphic/Makefile.in
index 9dd249d..c94bd75 100644
--- a/tests/examples/gl/generic/recordgraphic/Makefile.in
+++ b/tests/examples/gl/generic/recordgraphic/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = recordgraphic$(EXEEXT)
 subdir = tests/examples/gl/generic/recordgraphic
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -198,6 +207,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -215,8 +225,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -241,8 +253,6 @@
 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@
@@ -255,7 +265,6 @@
 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@
@@ -263,6 +272,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -289,11 +300,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -312,8 +326,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -372,10 +384,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -392,7 +408,6 @@
 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@
@@ -401,7 +416,6 @@
 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@
@@ -414,7 +428,6 @@
 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@
@@ -428,6 +441,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -439,6 +453,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -477,6 +493,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -512,10 +529,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -541,6 +562,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -548,7 +572,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -577,6 +608,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -587,6 +619,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -617,17 +650,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -644,6 +676,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -682,6 +715,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -716,7 +750,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/generic/recordgraphic/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/generic/recordgraphic/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1003,6 +1036,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/generic/recordgraphic/main.cpp b/tests/examples/gl/generic/recordgraphic/main.cpp
index d457a9c..9cac1e9 100644
--- a/tests/examples/gl/generic/recordgraphic/main.cpp
+++ b/tests/examples/gl/generic/recordgraphic/main.cpp
@@ -19,7 +19,6 @@
  */
 
 #include <GL/gl.h>
-#include <GL/glu.h>
 #if __WIN32__ || _WIN32
 # include <GL/glext.h>
 #endif
@@ -66,7 +65,7 @@
 }
 
 //client draw callback
-static gboolean drawCallback (void *filter, GLuint width, GLuint height, GLuint texture, gpointer data)
+static gboolean drawCallback (void *filter, void *context, GLuint texture, GLuint width, GLuint height, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
diff --git a/tests/examples/gl/gtk/3dvideo/Makefile.am b/tests/examples/gl/gtk/3dvideo/Makefile.am
new file mode 100644
index 0000000..94c8d16
--- /dev/null
+++ b/tests/examples/gl/gtk/3dvideo/Makefile.am
@@ -0,0 +1,16 @@
+noinst_PROGRAMS = 3dvideo
+
+noinst_HEADERS = mviewwidget.h
+
+3dvideo_SOURCES = mviewwidget.c main.cpp
+
+3dvideo_CXXFLAGS=$(GST_CXXFLAGS)
+
+3dvideo_CPPFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GL_CFLAGS) $(GTK3_CFLAGS)
+3dvideo_LDADD=../libgstgtkhelper.la \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
+
diff --git a/ext/mythtv/Makefile.in b/tests/examples/gl/gtk/3dvideo/Makefile.in
similarity index 74%
copy from ext/mythtv/Makefile.in
copy to tests/examples/gl/gtk/3dvideo/Makefile.in
index 055754c..4bcd0eb 100644
--- a/ext/mythtv/Makefile.in
+++ b/tests/examples/gl/gtk/3dvideo/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,8 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+noinst_PROGRAMS = 3dvideo$(EXEEXT)
+subdir = tests/examples/gl/gtk/3dvideo
 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 \
@@ -90,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +113,6 @@
 	$(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 \
@@ -120,52 +129,28 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 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)
+PROGRAMS = $(noinst_PROGRAMS)
+am_3dvideo_OBJECTS = 3dvideo-mviewwidget.$(OBJEXT) \
+	3dvideo-main.$(OBJEXT)
+3dvideo_OBJECTS = $(am_3dvideo_OBJECTS)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+3dvideo_DEPENDENCIES = ../libgstgtkhelper.la \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+3dvideo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(3dvideo_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_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
@@ -200,8 +185,26 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(3dvideo_SOURCES)
+DIST_SOURCES = $(3dvideo_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -227,6 +230,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +248,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +276,6 @@
 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@
@@ -284,7 +288,6 @@
 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@
@@ -292,6 +295,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +323,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +349,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +407,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +431,6 @@
 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@
@@ -430,7 +439,6 @@
 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@
@@ -443,7 +451,6 @@
 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@
@@ -457,6 +464,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +476,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +516,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +552,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +585,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +595,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +631,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +642,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +673,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +699,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +738,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,29 +752,22 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+noinst_HEADERS = mviewwidget.h
+3dvideo_SOURCES = mviewwidget.c main.cpp
+3dvideo_CXXFLAGS = $(GST_CXXFLAGS)
+3dvideo_CPPFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
-
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
-
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
+3dvideo_LDADD = ../libgstgtkhelper.la \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .cpp .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -756,10 +777,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/3dvideo/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/3dvideo/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,43 +798,18 @@
 	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)"; \
-	}
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
 
-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}; \
-	}
-
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+3dvideo$(EXEEXT): $(3dvideo_OBJECTS) $(3dvideo_DEPENDENCIES) $(EXTRA_3dvideo_DEPENDENCIES) 
+	@rm -f 3dvideo$(EXEEXT)
+	$(AM_V_CXXLD)$(3dvideo_LINK) $(3dvideo_OBJECTS) $(3dvideo_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +817,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3dvideo-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3dvideo-mviewwidget.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +844,57 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+3dvideo-mviewwidget.o: mviewwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 3dvideo-mviewwidget.o -MD -MP -MF $(DEPDIR)/3dvideo-mviewwidget.Tpo -c -o 3dvideo-mviewwidget.o `test -f 'mviewwidget.c' || echo '$(srcdir)/'`mviewwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/3dvideo-mviewwidget.Tpo $(DEPDIR)/3dvideo-mviewwidget.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='mviewwidget.c' object='3dvideo-mviewwidget.o' libtool=no @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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 3dvideo-mviewwidget.o `test -f 'mviewwidget.c' || echo '$(srcdir)/'`mviewwidget.c
+
+3dvideo-mviewwidget.obj: mviewwidget.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 3dvideo-mviewwidget.obj -MD -MP -MF $(DEPDIR)/3dvideo-mviewwidget.Tpo -c -o 3dvideo-mviewwidget.obj `if test -f 'mviewwidget.c'; then $(CYGPATH_W) 'mviewwidget.c'; else $(CYGPATH_W) '$(srcdir)/mviewwidget.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/3dvideo-mviewwidget.Tpo $(DEPDIR)/3dvideo-mviewwidget.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='mviewwidget.c' object='3dvideo-mviewwidget.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) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 3dvideo-mviewwidget.obj `if test -f 'mviewwidget.c'; then $(CYGPATH_W) 'mviewwidget.c'; else $(CYGPATH_W) '$(srcdir)/mviewwidget.c'; fi`
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+3dvideo-main.o: main.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(3dvideo_CXXFLAGS) $(CXXFLAGS) -MT 3dvideo-main.o -MD -MP -MF $(DEPDIR)/3dvideo-main.Tpo -c -o 3dvideo-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/3dvideo-main.Tpo $(DEPDIR)/3dvideo-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='main.cpp' object='3dvideo-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(3dvideo_CXXFLAGS) $(CXXFLAGS) -c -o 3dvideo-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp
+
+3dvideo-main.obj: main.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(3dvideo_CXXFLAGS) $(CXXFLAGS) -MT 3dvideo-main.obj -MD -MP -MF $(DEPDIR)/3dvideo-main.Tpo -c -o 3dvideo-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/3dvideo-main.Tpo $(DEPDIR)/3dvideo-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='main.cpp' object='3dvideo-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(3dvideo_CPPFLAGS) $(CPPFLAGS) $(3dvideo_CXXFLAGS) $(CXXFLAGS) -c -o 3dvideo-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -945,11 +986,8 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(PROGRAMS) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -982,7 +1020,7 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1003,7 +1041,7 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am:
 
 install-dvi: install-dvi-am
 
@@ -1049,24 +1087,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
 	ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-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
+	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
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/examples/gl/gtk/3dvideo/main.cpp b/tests/examples/gl/gtk/3dvideo/main.cpp
new file mode 100644
index 0000000..1d8e5b7
--- /dev/null
+++ b/tests/examples/gl/gtk/3dvideo/main.cpp
@@ -0,0 +1,417 @@
+/*
+ * GStreamer
+ * Copyright (C) 2008-2009 Julien Isorce <julien.isorce@gmail.com>
+ * Copyright (C) 2014-2015 Jan Schmidt <jan@centricular.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 <string.h>
+#include <X11/Xlib.h>
+
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gst/video/video-info.h>
+
+#include "../gstgtk.h"
+#include "mviewwidget.h"
+
+/* Until playbin properties support dynamic changes,
+ * use our own glviewconvert */
+#define USE_GLCONVERT_FOR_INPUT 1
+
+typedef struct _localstate
+{
+  GstVideoMultiviewFramePacking in_mode;
+  GstVideoMultiviewFlags out_mode;
+  GstVideoMultiviewFlags in_flags, out_flags;
+} LocalState;
+
+static GstBusSyncReply
+create_window (GstBus * bus, GstMessage * message, GtkWidget * widget)
+{
+  /* ignore anything but 'prepare-window-handle' element messages */
+  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
+    return GST_BUS_PASS;
+
+  if (!gst_is_video_overlay_prepare_window_handle_message (message))
+    return GST_BUS_PASS;
+
+  /* do not call gdk_window_ensure_native for the first time here because
+   * we are in a different thread than the main thread */
+  gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC
+          (message)), widget);
+
+  gst_message_unref (message);
+
+  return GST_BUS_DROP;
+}
+
+static void
+end_stream_cb (GstBus * bus, GstMessage * message, GstElement * pipeline)
+{
+  switch (GST_MESSAGE_TYPE (message)) {
+    case GST_MESSAGE_EOS:
+      g_print ("End of stream\n");
+
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref (pipeline);
+      gtk_main_quit ();
+      break;
+    case GST_MESSAGE_ERROR:
+    {
+      gchar *debug = NULL;
+      GError *err = NULL;
+
+      gst_message_parse_error (message, &err, &debug);
+
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+
+      if (debug) {
+        g_print ("Debug details: %s\n", debug);
+        g_free (debug);
+      }
+
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref (pipeline);
+      gtk_main_quit ();
+      break;
+    }
+    default:
+      break;
+  }
+}
+
+static gboolean
+draw_cb (GtkWidget * widget, cairo_t * cr, GstElement * videosink)
+{
+  gst_video_overlay_expose (GST_VIDEO_OVERLAY (videosink));
+  return FALSE;
+}
+
+static void
+destroy_cb (GtkWidget * widget, GdkEvent * event, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  gtk_main_quit ();
+}
+
+static void
+button_state_ready_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_READY);
+}
+
+static void
+button_state_paused_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PAUSED);
+}
+
+static void
+button_state_playing_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+}
+
+static gboolean
+set_mview_mode (GtkWidget * combo, GObject * target, const gchar * prop_name)
+{
+  gchar *mview_mode = NULL;
+  GEnumClass *p_class;
+  GEnumValue *v;
+  GParamSpec *p =
+      g_object_class_find_property (G_OBJECT_GET_CLASS (target), prop_name);
+
+  g_return_val_if_fail (p != NULL, FALSE);
+
+  p_class = G_PARAM_SPEC_ENUM (p)->enum_class;
+  g_return_val_if_fail (p_class != NULL, FALSE);
+
+  g_object_get (G_OBJECT (combo), "active-id", &mview_mode, NULL);
+  g_return_val_if_fail (mview_mode != NULL, FALSE);
+
+  v = g_enum_get_value_by_nick (p_class, mview_mode);
+  g_return_val_if_fail (v != NULL, FALSE);
+
+  g_object_set (target, prop_name, v->value, NULL);
+
+  return FALSE;
+}
+
+static gboolean
+set_mview_input_mode (GtkWidget * widget, gpointer data)
+{
+#if USE_GLCONVERT_FOR_INPUT
+  return set_mview_mode (widget, G_OBJECT (data), "input-mode-override");
+#else
+  return set_mview_mode (widget, G_OBJECT (data), "video-multiview-mode");
+#endif
+}
+
+static gboolean
+set_mview_output_mode (GtkWidget * widget, gpointer data)
+{
+  GstElement *sink = gst_bin_get_by_name (GST_BIN (data), "sink");
+  set_mview_mode (widget, G_OBJECT (sink), "output-multiview-mode");
+  gst_object_unref (GST_OBJECT (sink));
+  return FALSE;
+}
+
+static void
+input_flags_changed (GObject * gobject, GParamSpec * pspec, gpointer user_data)
+{
+  GObject *target = G_OBJECT (user_data);
+  GstVideoMultiviewFlags flags;
+
+  g_object_get (gobject, "flags", &flags, NULL);
+#if USE_GLCONVERT_FOR_INPUT
+  g_object_set (target, "input-flags-override", flags, NULL);
+#else
+  g_object_set (target, "video-multiview-flags", flags, NULL);
+#endif
+}
+
+static void
+output_flags_changed (GObject * gobject, GParamSpec * pspec, gpointer user_data)
+{
+  GObject *target = G_OBJECT (user_data);
+  GstVideoMultiviewFlags flags;
+  GstElement *sink = gst_bin_get_by_name (GST_BIN (target), "sink");
+
+  g_object_get (gobject, "flags", &flags, NULL);
+  g_object_set (G_OBJECT (sink), "output-multiview-flags", flags, NULL);
+
+  gst_object_unref (GST_OBJECT (sink));
+}
+
+static void
+downmix_method_changed (GObject * gobject, GParamSpec * pspec, gpointer user_data)
+{
+  GObject *target = G_OBJECT (user_data);
+  GstGLStereoDownmix downmix_method;
+  GstElement *sink = gst_bin_get_by_name (GST_BIN (target), "sink");
+
+  g_object_get (gobject, "downmix-mode", &downmix_method, NULL);
+  g_object_set (sink, "output-multiview-downmix-mode", downmix_method, NULL);
+  gst_object_unref (GST_OBJECT (sink));
+}
+
+static const gchar *
+enum_value_to_nick (GType enum_type, guint value)
+{
+  GEnumClass *enum_info;
+  GEnumValue *v;
+  const gchar *nick;
+
+  enum_info = (GEnumClass *) (g_type_class_ref (enum_type));
+  g_return_val_if_fail (enum_info != NULL, NULL);
+
+  v = g_enum_get_value (enum_info, value);
+  g_return_val_if_fail (v != NULL, NULL);
+
+  nick = v->value_nick;
+
+  g_type_class_unref (enum_info);
+
+  return nick;
+}
+
+static void
+detect_mode_from_uri (LocalState * state, const gchar * uri)
+{
+  if (strstr (uri, "HSBS")) {
+    state->in_mode = GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE;
+    state->in_flags = GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT;
+  } else if (strstr (uri, "SBS")) {
+    state->in_mode = GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE;
+    if (g_regex_match_simple ("half", uri, G_REGEX_CASELESS,
+            (GRegexMatchFlags) 0)) {
+      state->in_flags = GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT;
+    }
+  }
+}
+
+gint
+main (gint argc, gchar * argv[])
+{
+  LocalState state;
+  GtkWidget *area, *combo, *w;
+  const gchar *uri;
+
+  XInitThreads ();
+
+  gst_init (&argc, &argv);
+  gtk_init (&argc, &argv);
+
+  if (argc < 2) {
+    g_print ("Usage: 3dvideo <uri-to-play>\n");
+    return 1;
+  }
+
+  uri = argv[1];
+
+  GstElement *pipeline = gst_element_factory_make ("playbin", NULL);
+  GstBin *sinkbin = (GstBin *) gst_parse_bin_from_description ("glupload ! glcolorconvert ! glviewconvert name=viewconvert ! glimagesink name=sink", TRUE, NULL);
+#if USE_GLCONVERT_FOR_INPUT
+  GstElement *glconvert = gst_bin_get_by_name (sinkbin, "viewconvert");
+#endif
+  GstElement *videosink = gst_bin_get_by_name (sinkbin, "sink");
+
+  /* Get defaults */
+  g_object_get (pipeline, "video-multiview-mode", &state.in_mode,
+      "video-multiview-flags", &state.in_flags, NULL);
+  gst_child_proxy_get (GST_CHILD_PROXY (videosink), "sink::output-multiview-mode", &state.out_mode,
+      "sink::output-multiview-flags", &state.out_flags, NULL);
+
+  detect_mode_from_uri (&state, uri);
+
+  g_return_val_if_fail (pipeline != NULL, 1);
+  g_return_val_if_fail (videosink != NULL, 1);
+
+  g_object_set (G_OBJECT (pipeline), "video-sink", sinkbin, NULL);
+  g_object_set (G_OBJECT (pipeline), "uri", uri, NULL);
+
+#if USE_GLCONVERT_FOR_INPUT
+  g_object_set (G_OBJECT (glconvert), "input-mode-override", state.in_mode,
+      NULL);
+  g_object_set (G_OBJECT (glconvert), "input-flags-override", state.in_flags,
+      NULL);
+#else
+  g_object_set (G_OBJECT (pipeline), "video-multiview-mode", state.in_mode,
+      NULL);
+  g_object_set (G_OBJECT (pipeline), "video-multiview-flags", state.in_flags,
+      NULL);
+#endif
+
+  /* Connect to bus for signal handling */
+  GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), pipeline);
+
+  gst_element_set_state (pipeline, GST_STATE_READY);
+
+  area = gtk_drawing_area_new ();
+  gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, area, NULL);
+  gst_object_unref (bus);
+
+  /* Toplevel window */
+  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
+  gtk_window_set_title (GTK_WINDOW (window), "Stereoscopic video demo");
+  GdkGeometry geometry;
+  geometry.min_width = 1;
+  geometry.min_height = 1;
+  geometry.max_width = -1;
+  geometry.max_height = -1;
+  gtk_window_set_geometry_hints (GTK_WINDOW (window), window, &geometry,
+      GDK_HINT_MIN_SIZE);
+
+  GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
+  gtk_container_add (GTK_CONTAINER (window), vbox);
+
+  /* area where the video is drawn */
+  gtk_box_pack_start (GTK_BOX (vbox), area, TRUE, TRUE, 0);
+
+  /* Buttons to control the pipeline state */
+  GtkWidget *table = gtk_grid_new ();
+  gtk_container_add (GTK_CONTAINER (vbox), table);
+
+  GtkWidget *button_state_ready = gtk_button_new_with_label ("Stop");
+  g_signal_connect (G_OBJECT (button_state_ready), "clicked",
+      G_CALLBACK (button_state_ready_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (table), button_state_ready, 1, 0, 1, 1);
+  gtk_widget_show (button_state_ready);
+
+  //control state paused
+  GtkWidget *button_state_paused = gtk_button_new_with_label ("Pause");
+  g_signal_connect (G_OBJECT (button_state_paused), "clicked",
+      G_CALLBACK (button_state_paused_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (table), button_state_paused, 2, 0, 1, 1);
+  gtk_widget_show (button_state_paused);
+
+  //control state playing
+  GtkWidget *button_state_playing = gtk_button_new_with_label ("Play");
+  g_signal_connect (G_OBJECT (button_state_playing), "clicked",
+      G_CALLBACK (button_state_playing_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (table), button_state_playing, 3, 0, 1, 1);
+  //gtk_widget_show (button_state_playing);
+
+  w = gst_mview_widget_new (FALSE);
+  combo = GST_MVIEW_WIDGET (w)->mode_selector;
+  gtk_combo_box_set_active_id (GTK_COMBO_BOX (combo),
+      enum_value_to_nick (GST_TYPE_VIDEO_MULTIVIEW_FRAME_PACKING,
+          state.in_mode));
+#if USE_GLCONVERT_FOR_INPUT
+  g_signal_connect (G_OBJECT (combo), "changed",
+      G_CALLBACK (set_mview_input_mode), glconvert);
+#else
+  g_signal_connect (G_OBJECT (combo), "changed",
+      G_CALLBACK (set_mview_input_mode), pipeline);
+#endif
+
+  g_object_set (G_OBJECT (w), "flags", state.in_flags, NULL);
+#if USE_GLCONVERT_FOR_INPUT
+  g_signal_connect (G_OBJECT (w), "notify::flags",
+      G_CALLBACK (input_flags_changed), glconvert);
+#else
+  g_signal_connect (G_OBJECT (w), "notify::flags",
+      G_CALLBACK (input_flags_changed), pipeline);
+#endif
+  gtk_container_add (GTK_CONTAINER (vbox), w);
+
+  w = gst_mview_widget_new (TRUE);
+  combo = GST_MVIEW_WIDGET (w)->mode_selector;
+  gtk_combo_box_set_active_id (GTK_COMBO_BOX (combo),
+      enum_value_to_nick (GST_TYPE_VIDEO_MULTIVIEW_MODE, state.out_mode));
+  g_signal_connect (G_OBJECT (combo), "changed",
+      G_CALLBACK (set_mview_output_mode), videosink);
+
+  g_object_set (G_OBJECT (w), "flags", state.out_flags, NULL);
+  g_signal_connect (G_OBJECT (w), "notify::flags",
+      G_CALLBACK (output_flags_changed), videosink);
+  g_signal_connect (G_OBJECT (w), "notify::downmix-mode",
+      G_CALLBACK (downmix_method_changed), videosink);
+  gtk_container_add (GTK_CONTAINER (vbox), w);
+
+  //configure the pipeline
+  g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (destroy_cb),
+      pipeline);
+
+  gtk_widget_realize (area);
+
+  /* Redraw needed when paused or stopped (PAUSED or READY) */
+  g_signal_connect (area, "draw", G_CALLBACK (draw_cb), videosink);
+
+  gtk_widget_show_all (window);
+
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  gtk_main ();
+
+  return 0;
+}
diff --git a/tests/examples/gl/gtk/3dvideo/mviewwidget.c b/tests/examples/gl/gtk/3dvideo/mviewwidget.c
new file mode 100644
index 0000000..b74409c
--- /dev/null
+++ b/tests/examples/gl/gtk/3dvideo/mviewwidget.c
@@ -0,0 +1,324 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014-2015 Jan Schmidt <jan@centricular.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 "mviewwidget.h"
+
+G_DEFINE_TYPE (GstMViewWidget, gst_mview_widget, GTK_TYPE_GRID);
+
+static void gst_mview_widget_constructed (GObject * o);
+static void gst_mview_widget_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+static void gst_mview_widget_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+
+#define DEFAULT_DOWNMIX GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS
+
+enum
+{
+  PROP_0,
+  PROP_IS_OUTPUT,
+  PROP_MODE_SELECTOR,
+  PROP_FLAGS,
+  PROP_DOWNMIX_MODE
+};
+
+typedef struct _ToggleClosure
+{
+  GstMViewWidget *mv;
+  GstVideoMultiviewFlags flag;
+} ToggleClosure;
+
+static GtkWidget *combo_box_from_enum (GType enum_type);
+
+static void
+gst_mview_widget_class_init (GstMViewWidgetClass * klass)
+{
+  GObjectClass *object_klass = (GObjectClass *) (klass);
+
+  object_klass->constructed = gst_mview_widget_constructed;
+  object_klass->set_property = gst_mview_widget_set_property;
+  object_klass->get_property = gst_mview_widget_get_property;
+
+  g_object_class_install_property (object_klass, PROP_IS_OUTPUT,
+      g_param_spec_boolean ("is-output", "Is an Output widget",
+          "TRUE if the widget should have downmix mode", FALSE,
+          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (object_klass, PROP_MODE_SELECTOR,
+      g_param_spec_object ("mode-selector", "Multiview Mode selector",
+          "Multiview Mode selector widget",
+          GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (object_klass, PROP_FLAGS,
+      g_param_spec_flags ("flags", "Multiview Flags",
+          "multiview flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGS,
+          GST_VIDEO_MULTIVIEW_FLAGS_NONE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (object_klass, PROP_DOWNMIX_MODE,
+      g_param_spec_enum ("downmix-mode",
+          "Mode for mono downmixed output",
+          "Output anaglyph type to generate when downmixing to mono",
+          GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_DOWNMIX,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_mview_widget_init (GstMViewWidget * mv)
+{
+}
+
+static void
+flag_changed (GObject * w, ToggleClosure * c)
+{
+  GstMViewWidget *mv = GST_MVIEW_WIDGET (c->mv);
+  gboolean flag_set;
+
+  g_object_get (w, "active", &flag_set, NULL);
+
+  if (flag_set)
+    mv->flags |= c->flag;
+  else
+    mv->flags &= ~(c->flag);
+  if (!mv->synching)
+    g_object_notify (G_OBJECT (mv), "flags");
+}
+
+static void
+link_button_to_flag (GstMViewWidget * mv, GtkWidget * w,
+    GstVideoMultiviewFlags flag)
+{
+  ToggleClosure *c = g_new0 (ToggleClosure, 1);
+
+  c->mv = mv;
+  c->flag = flag;
+
+  g_signal_connect_data (G_OBJECT (w), "toggled", G_CALLBACK (flag_changed),
+      c, (GClosureNotify) g_free, 0);
+}
+
+static void
+sync_flags (GstMViewWidget * mv)
+{
+  mv->synching = TRUE;
+  g_object_set (G_OBJECT (mv->lflip), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED), NULL);
+  g_object_set (G_OBJECT (mv->lflop), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED), NULL);
+  g_object_set (G_OBJECT (mv->rflip), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED), NULL);
+  g_object_set (G_OBJECT (mv->rflop), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED), NULL);
+  g_object_set (G_OBJECT (mv->right_first), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST), NULL);
+  g_object_set (G_OBJECT (mv->half_aspect), "active",
+      ! !(mv->flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT), NULL);
+  mv->synching = FALSE;
+}
+
+static const gchar *
+enum_value_to_nick (GType enum_type, guint value)
+{
+  GEnumClass *enum_info;
+  GEnumValue *v;
+  const gchar *nick;
+
+  enum_info = (GEnumClass *) (g_type_class_ref (enum_type));
+  g_return_val_if_fail (enum_info != NULL, NULL);
+
+  v = g_enum_get_value (enum_info, value);
+  g_return_val_if_fail (v != NULL, NULL);
+
+  nick = v->value_nick;
+
+  g_type_class_unref (enum_info);
+
+  return nick;
+}
+
+static void
+sync_downmix (GstMViewWidget * mv)
+{
+  mv->synching = TRUE;
+  gtk_combo_box_set_active_id (GTK_COMBO_BOX (mv->downmix_combo),
+      enum_value_to_nick (GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE,
+          mv->downmix_mode));
+  mv->synching = FALSE;
+}
+
+static gboolean
+set_downmix_mode (GtkWidget * widget, gpointer data)
+{
+  GstMViewWidget *mv = GST_MVIEW_WIDGET (data);
+  gchar *downmix_mode = NULL;
+  GEnumClass *p_class;
+  GEnumValue *v;
+  GParamSpec *p =
+      g_object_class_find_property (G_OBJECT_GET_CLASS (mv), "downmix-mode");
+
+  g_return_val_if_fail (p != NULL, FALSE);
+
+  p_class = G_PARAM_SPEC_ENUM (p)->enum_class;
+  g_return_val_if_fail (p_class != NULL, FALSE);
+
+  g_object_get (G_OBJECT (widget), "active-id", &downmix_mode, NULL);
+  g_return_val_if_fail (downmix_mode != NULL, FALSE);
+
+  v = g_enum_get_value_by_nick (p_class, downmix_mode);
+  g_return_val_if_fail (v != NULL, FALSE);
+
+  mv->downmix_mode = v->value;
+  if (!mv->synching)
+    g_object_notify (G_OBJECT (mv), "downmix-mode");
+
+  return FALSE;
+}
+
+static void
+gst_mview_widget_constructed (GObject * o)
+{
+  GstMViewWidget *mv = GST_MVIEW_WIDGET (o);
+  GtkGrid *g = GTK_GRID (mv);
+  GtkWidget *w;
+
+  gtk_widget_set_has_window (GTK_WIDGET (mv), FALSE);
+
+  if (mv->is_output) {
+    mv->mode_selector = w = combo_box_from_enum (GST_TYPE_VIDEO_MULTIVIEW_MODE);
+    gtk_grid_attach (g, gtk_label_new ("Output:"), 0, 0, 1, 1);
+  } else {
+    mv->mode_selector = w =
+        combo_box_from_enum (GST_TYPE_VIDEO_MULTIVIEW_FRAME_PACKING);
+    gtk_grid_attach (g, gtk_label_new ("Input:"), 0, 0, 1, 1);
+  }
+  gtk_grid_attach (g, mv->mode_selector, 1, 0, 3, 1);
+
+  gtk_grid_attach (g, gtk_label_new (" Left "), 4, 0, 1, 1);
+  mv->lflip = w = gtk_toggle_button_new_with_label ("Flip");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED);
+  gtk_grid_attach (g, w, 5, 0, 1, 1);
+  mv->lflop = w = gtk_toggle_button_new_with_label ("Flop");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED);
+  gtk_grid_attach (g, w, 6, 0, 1, 1);
+
+  gtk_grid_attach (g, gtk_label_new (" Right "), 4, 1, 1, 1);
+  mv->rflip = w = gtk_toggle_button_new_with_label ("Flip");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED);
+  gtk_grid_attach (g, w, 5, 1, 1, 1);
+  mv->rflop = w = gtk_toggle_button_new_with_label ("Flop");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED);
+  gtk_grid_attach (g, w, 6, 1, 1, 1);
+
+  mv->right_first = w = gtk_toggle_button_new_with_label ("Left/Right swap");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST);
+  gtk_grid_attach (g, w, 1, 1, 1, 1);
+  mv->half_aspect = w = gtk_toggle_button_new_with_label ("Half-Aspect");
+  link_button_to_flag (mv, w, GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT);
+  gtk_grid_attach (g, w, 2, 1, 1, 1);
+
+  if (mv->is_output) {
+    mv->downmix_combo = w =
+        combo_box_from_enum (GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE);
+    gtk_grid_attach (g, w, 1, 2, 3, 1);
+    sync_downmix (mv);
+    g_signal_connect (G_OBJECT (w), "changed",
+        G_CALLBACK (set_downmix_mode), mv);
+  }
+}
+
+static void
+gst_mview_widget_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstMViewWidget *mv = GST_MVIEW_WIDGET (object);
+  switch (prop_id) {
+    case PROP_IS_OUTPUT:
+      mv->is_output = g_value_get_boolean (value);
+      break;
+    case PROP_FLAGS:
+      mv->flags = (GstVideoMultiviewFlags) g_value_get_flags (value);
+      sync_flags (mv);
+      break;
+    case PROP_DOWNMIX_MODE:
+      mv->downmix_mode = g_value_get_enum (value);
+      sync_downmix (mv);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_mview_widget_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstMViewWidget *mv = GST_MVIEW_WIDGET (object);
+  switch (prop_id) {
+    case PROP_IS_OUTPUT:
+      g_value_set_boolean (value, mv->is_output);
+      break;
+    case PROP_MODE_SELECTOR:
+      g_value_set_object (value, mv->mode_selector);
+      break;
+    case PROP_FLAGS:
+      g_value_set_flags (value, mv->flags);
+      break;
+    case PROP_DOWNMIX_MODE:
+      g_value_set_enum (value, mv->downmix_mode);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static GtkWidget *
+combo_box_from_enum (GType enum_type)
+{
+  GEnumClass *enum_info;
+  GtkWidget *combo;
+  guint i;
+
+  enum_info = (GEnumClass *) (g_type_class_ref (enum_type));
+  g_return_val_if_fail (enum_info != NULL, NULL);
+
+  combo = gtk_combo_box_text_new ();
+  for (i = 0; i < enum_info->n_values; i++) {
+    GEnumValue *v = enum_info->values + i;
+    gtk_combo_box_text_insert (GTK_COMBO_BOX_TEXT (combo),
+        i, v->value_nick, v->value_name);
+  }
+
+  g_type_class_unref (enum_info);
+
+  return combo;
+}
+
+GtkWidget *
+gst_mview_widget_new (gboolean is_output)
+{
+  GtkWidget *ret;
+
+  ret = g_object_new (GST_TYPE_MVIEW_WIDGET, "is-output", is_output, NULL);
+
+  return ret;
+}
diff --git a/tests/examples/gl/gtk/3dvideo/mviewwidget.h b/tests/examples/gl/gtk/3dvideo/mviewwidget.h
new file mode 100644
index 0000000..b63d7a9
--- /dev/null
+++ b/tests/examples/gl/gtk/3dvideo/mviewwidget.h
@@ -0,0 +1,78 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014-2015 Jan Schmidt <jan@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#include <string.h>
+
+#define GST_USE_UNSTABLE_API 1
+
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gst/video/video-info.h>
+#include <gst/gl/gstglviewconvert.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_MVIEW_WIDGET (gst_mview_widget_get_type())
+#define GST_MVIEW_WIDGET(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MVIEW_WIDGET, GstMViewWidget))
+#define GST_MVIEW_WIDGET_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MVIEW_WIDGET, GstMViewWidgetClass))
+#define GST_IS_MVIEW_WIDGET(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MVIEW_WIDGET))
+#define GST_IS_MVIEW_WIDGET_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MVIEW_WIDGET))
+#define GST_MVIEW_WIDGET_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_MVIEW_WIDGET,GstMViewWidgetClass))
+
+typedef struct _GstMViewWidget GstMViewWidget;
+typedef struct _GstMViewWidgetClass GstMViewWidgetClass;
+
+struct _GstMViewWidget {
+  GtkGrid parent;
+
+  gboolean is_output;
+
+  GtkWidget *mode_selector;
+
+  GstVideoMultiviewMode mode;
+  GstVideoMultiviewFlags flags;
+  GstGLStereoDownmix downmix_mode;
+
+  /* Array of toggle buttons for flags */
+  GtkWidget *lflip;
+  GtkWidget *lflop;
+  GtkWidget *rflip;
+  GtkWidget *rflop;
+  GtkWidget *half_aspect;
+  GtkWidget *right_first;
+
+  GtkWidget *downmix_combo;
+
+  gboolean synching;
+};
+
+struct _GstMViewWidgetClass {
+  GtkGridClass parent;
+};
+
+GType gst_mview_widget_get_type ();
+GtkWidget *gst_mview_widget_new (gboolean is_output);
+
+G_END_DECLS
diff --git a/tests/examples/gl/gtk/Makefile.am b/tests/examples/gl/gtk/Makefile.am
index a41566b..3c18679 100644
--- a/tests/examples/gl/gtk/Makefile.am
+++ b/tests/examples/gl/gtk/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = . gtkvideooverlay filternovideooverlay filtervideooverlay fxtest switchvideooverlay
+SUBDIRS = . gtkvideooverlay filternovideooverlay filtervideooverlay fxtest switchvideooverlay 3dvideo
 
 noinst_LTLIBRARIES = libgstgtkhelper.la
 
diff --git a/tests/examples/gl/gtk/Makefile.in b/tests/examples/gl/gtk/Makefile.in
index cfc35ab..79bb143 100644
--- a/tests/examples/gl/gtk/Makefile.in
+++ b/tests/examples/gl/gtk/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 @HAVE_WINDOW_COCOA_TRUE@am__append_1 = -x objective-c
 subdir = tests/examples/gl/gtk
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp README
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -213,6 +222,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -255,8 +265,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -281,8 +293,6 @@
 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@
@@ -295,7 +305,6 @@
 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@
@@ -303,6 +312,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -329,11 +340,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -352,8 +366,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -412,10 +424,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -432,7 +448,6 @@
 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@
@@ -441,7 +456,6 @@
 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@
@@ -454,7 +468,6 @@
 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@
@@ -468,6 +481,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -479,6 +493,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -517,6 +533,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -552,10 +569,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -581,6 +602,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -588,7 +612,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -617,6 +648,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -627,6 +659,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -657,17 +690,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -684,6 +716,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -722,6 +755,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -735,7 +769,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-SUBDIRS = . gtkvideooverlay filternovideooverlay filtervideooverlay fxtest switchvideooverlay
+SUBDIRS = . gtkvideooverlay filternovideooverlay filtervideooverlay fxtest switchvideooverlay 3dvideo
 noinst_LTLIBRARIES = libgstgtkhelper.la
 libgstgtkhelper_la_SOURCES = gstgtk.c gstgtk.h
 libgstgtkhelper_la_CFLAGS = -I$(top_srcdir)/gst-libs \
@@ -758,7 +792,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1113,6 +1146,8 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/filternovideooverlay/Makefile.in b/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
index 1e2f451..9f3fec2 100644
--- a/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = filternovideooverlay$(EXEEXT)
 subdir = tests/examples/gl/gtk/filternovideooverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +254,6 @@
 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@
@@ -256,7 +266,6 @@
 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@
@@ -264,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +409,6 @@
 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@
@@ -402,7 +417,6 @@
 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@
@@ -415,7 +429,6 @@
 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@
@@ -429,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -727,7 +761,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/filternovideooverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/filternovideooverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1014,6 +1047,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/filternovideooverlay/main.cpp b/tests/examples/gl/gtk/filternovideooverlay/main.cpp
index 5b9257c..dc9e04b 100644
--- a/tests/examples/gl/gtk/filternovideooverlay/main.cpp
+++ b/tests/examples/gl/gtk/filternovideooverlay/main.cpp
@@ -130,7 +130,7 @@
     gtk_widget_show (window_control);
 
     GstElement* videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
-    GstElement* glfilterlaplacian = gst_element_factory_make ("glfilterblur", "glfilterblur");
+    GstElement* upload = gst_element_factory_make ("glupload", "glupload");
     GstElement* glfiltercube = gst_element_factory_make ("glfiltercube", "glfiltercube");
     GstElement* videosink = gst_element_factory_make ("glimagesink", "glimagesink");
 
@@ -138,12 +138,12 @@
                                         "width", G_TYPE_INT, 640,
                                         "height", G_TYPE_INT, 480,
                                         "framerate", GST_TYPE_FRACTION, 25, 1,
-                                        "format", G_TYPE_STRING, "YV12",
+                                        "format", G_TYPE_STRING, "RGBA",
                                         NULL) ;
 
-    gst_bin_add_many (GST_BIN (pipeline), videosrc, glfiltercube, glfilterlaplacian, videosink, NULL);
+    gst_bin_add_many (GST_BIN (pipeline), videosrc, upload, glfiltercube, videosink, NULL);
 
-    gboolean link_ok = gst_element_link_filtered(videosrc, glfiltercube, caps) ;
+    gboolean link_ok = gst_element_link_filtered(videosrc, upload, caps) ;
     gst_caps_unref(caps) ;
     if(!link_ok)
     {
@@ -151,7 +151,7 @@
         return -1;
     }
 
-    if(!gst_element_link_many(glfiltercube, glfilterlaplacian, videosink, NULL))
+    if(!gst_element_link_many(upload, glfiltercube, videosink, NULL))
     {
         g_warning("Failed to link glfiltercube to videosink!\n") ;
         return -1;
diff --git a/tests/examples/gl/gtk/filtervideooverlay/Makefile.in b/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
index 1cd52a5..1dcf7ad 100644
--- a/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = filtervideooverlay$(EXEEXT)
 subdir = tests/examples/gl/gtk/filtervideooverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +254,6 @@
 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@
@@ -256,7 +266,6 @@
 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@
@@ -264,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +409,6 @@
 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@
@@ -402,7 +417,6 @@
 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@
@@ -415,7 +429,6 @@
 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@
@@ -429,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -721,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/filtervideooverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/filtervideooverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1008,6 +1041,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/filtervideooverlay/main.cpp b/tests/examples/gl/gtk/filtervideooverlay/main.cpp
index 8ca402d..5a5c9f5 100644
--- a/tests/examples/gl/gtk/filtervideooverlay/main.cpp
+++ b/tests/examples/gl/gtk/filtervideooverlay/main.cpp
@@ -27,6 +27,11 @@
 
 static GstBusSyncReply create_window (GstBus* bus, GstMessage* message, GtkWidget* widget)
 {
+    GtkAllocation allocation;
+
+    if (gst_gtk_handle_need_context (bus, message, NULL))
+        return GST_BUS_DROP;
+
     // ignore anything but 'prepare-window-handle' element messages
     if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
         return GST_BUS_PASS;
@@ -38,23 +43,56 @@
 
     gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), widget);
 
+    gtk_widget_get_allocation (widget, &allocation);
+    gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), allocation.x, allocation.y, allocation.width, allocation.height);
+
     gst_message_unref (message);
 
     return GST_BUS_DROP;
 }
 
+static gboolean
+resize_cb (GtkWidget * widget, GdkEvent * event, gpointer sink)
+{
+    GtkAllocation allocation;
+
+    gtk_widget_get_allocation (widget, &allocation);
+    gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (sink), allocation.x, allocation.y, allocation.width, allocation.height);
+
+    return G_SOURCE_CONTINUE;
+}
 
 static void end_stream_cb(GstBus* bus, GstMessage* message, GstElement* pipeline)
 {
-    g_print("End of stream\n");
+    GError *error = NULL;
+    gchar *details;
 
-    gst_element_set_state (pipeline, GST_STATE_NULL);
-    gst_object_unref(pipeline);
+    switch (GST_MESSAGE_TYPE (message)) {
+        case GST_MESSAGE_ERROR:
+            gst_message_parse_error (message, &error, &details);
 
-    gtk_main_quit();
+            g_print("Error %s\n", error->message);
+            g_print("Details %s\n", details);
+        /* fallthrough */
+        case GST_MESSAGE_EOS:
+            g_print("End of stream\n");
+
+            gst_element_set_state (pipeline, GST_STATE_NULL);
+            gst_object_unref(pipeline);
+
+            gtk_main_quit();
+            break;
+        case GST_MESSAGE_WARNING:
+            gst_message_parse_warning (message, &error, &details);
+
+            g_print("Warning %s\n", error->message);
+            g_print("Details %s\n", details);
+            break;
+        default:
+            break;
+    }
 }
 
-
 static gboolean expose_cb(GtkWidget* widget, cairo_t *cr, GstElement* videosink)
 {
     gst_video_overlay_expose (GST_VIDEO_OVERLAY (videosink));
@@ -182,20 +220,20 @@
     g_signal_connect(G_OBJECT(window), "delete-event", G_CALLBACK(destroy_cb), pipeline);
 
     GstElement* videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
+    GstElement* upload = gst_element_factory_make ("glupload", "glupload");
     GstElement* glfiltercube = gst_element_factory_make ("glfiltercube", "glfiltercube");
-    GstElement* glfilterlaplacian = gst_element_factory_make ("glfilterlaplacian", "glfilterlaplacian");
     GstElement* videosink = gst_element_factory_make ("glimagesink", "glimagesink");
 
     GstCaps *caps = gst_caps_new_simple("video/x-raw",
                                         "width", G_TYPE_INT, 640,
                                         "height", G_TYPE_INT, 480,
                                         "framerate", GST_TYPE_FRACTION, 25, 1,
-                                        "format", G_TYPE_STRING, "AYUV",
+                                        "format", G_TYPE_STRING, "RGBA",
                                         NULL) ;
 
-    gst_bin_add_many (GST_BIN (pipeline), videosrc, glfiltercube, glfilterlaplacian, videosink, NULL);
+    gst_bin_add_many (GST_BIN (pipeline), videosrc, upload, glfiltercube, videosink, NULL);
 
-    gboolean link_ok = gst_element_link_filtered(videosrc, glfiltercube, caps) ;
+    gboolean link_ok = gst_element_link_filtered(videosrc, upload, caps) ;
     gst_caps_unref(caps) ;
     if(!link_ok)
     {
@@ -203,7 +241,7 @@
         return -1;
     }
 
-    if(!gst_element_link_many(glfiltercube, glfilterlaplacian, videosink, NULL))
+    if(!gst_element_link_many(upload, glfiltercube, videosink, NULL))
     {
         g_warning("Failed to link glfiltercube to videosink!\n") ;
         return -1;
@@ -211,6 +249,7 @@
 
     //area where the video is drawn
     GtkWidget* area = gtk_drawing_area_new();
+    gtk_widget_set_redraw_on_allocate (area, TRUE);
     gtk_container_add (GTK_CONTAINER (window), area);
 
     gtk_widget_realize(area);
@@ -227,6 +266,7 @@
     //needed when being in GST_STATE_READY, GST_STATE_PAUSED
     //or resizing/obscuring the window
     g_signal_connect(area, "draw", G_CALLBACK(expose_cb), videosink);
+    g_signal_connect(area, "configure-event", G_CALLBACK(resize_cb), videosink);
 
     //start
     GstStateChangeReturn ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
diff --git a/tests/examples/gl/gtk/fxtest/Makefile.in b/tests/examples/gl/gtk/fxtest/Makefile.in
index 4d962ed..1cebe8c 100644
--- a/tests/examples/gl/gtk/fxtest/Makefile.in
+++ b/tests/examples/gl/gtk/fxtest/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = fxtest$(EXEEXT) pixbufdrop$(EXEEXT)
 subdir = tests/examples/gl/gtk/fxtest
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -206,6 +215,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -223,8 +233,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -249,8 +261,6 @@
 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@
@@ -263,7 +273,6 @@
 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@
@@ -271,6 +280,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -297,11 +308,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -320,8 +334,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -380,10 +392,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -400,7 +416,6 @@
 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@
@@ -409,7 +424,6 @@
 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@
@@ -422,7 +436,6 @@
 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@
@@ -436,6 +449,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -447,6 +461,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -485,6 +501,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -520,10 +537,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -549,6 +570,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -556,7 +580,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -585,6 +616,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -595,6 +627,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -625,17 +658,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -652,6 +684,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -690,6 +723,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -737,7 +771,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/fxtest/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/fxtest/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1043,6 +1076,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/fxtest/fxtest.c b/tests/examples/gl/gtk/fxtest/fxtest.c
index a9b41c1..f83f189 100644
--- a/tests/examples/gl/gtk/fxtest/fxtest.c
+++ b/tests/examples/gl/gtk/fxtest/fxtest.c
@@ -33,15 +33,75 @@
 #include <gst/video/videooverlay.h>
 
 
-/* TODO: use video overlay in the proper way (like suggested in docs, see gtkvideooverlay example) */
+static GstBusSyncReply
+create_window (GstBus * bus, GstMessage * message, GtkWidget * widget)
+{
+  /* ignore anything but 'prepare-window-handle' element messages */
+  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
+    return GST_BUS_PASS;
+
+  if (!gst_is_video_overlay_prepare_window_handle_message (message))
+    return GST_BUS_PASS;
+
+  g_print ("setting window handle\n");
+
+  /* do not call gdk_window_ensure_native for the first time here because
+   * we are in a different thread than the main thread
+   * (and the main thread the one) */
+  gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC
+          (message)), widget);
+
+  gst_message_unref (message);
+
+  return GST_BUS_DROP;
+}
+
+
+static void
+end_stream_cb (GstBus * bus, GstMessage * message, GstElement * pipeline)
+{
+  switch (GST_MESSAGE_TYPE (message)) {
+    case GST_MESSAGE_EOS:
+      g_print ("End of stream\n");
+
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref (pipeline);
+      gtk_main_quit ();
+      break;
+    case GST_MESSAGE_ERROR:
+    {
+      gchar *debug = NULL;
+      GError *err = NULL;
+
+      gst_message_parse_error (message, &err, &debug);
+
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+
+      if (debug) {
+        g_print ("Debug details: %s\n", debug);
+        g_free (debug);
+      }
+
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref (pipeline);
+      gtk_main_quit ();
+      break;
+    }
+    default:
+      break;
+  }
+}
+
 static gboolean
-expose_cb (GtkWidget * widget, gpointer data)
+expose_cb (GtkWidget * widget, gpointer unused, gpointer data)
 {
   GstVideoOverlay *overlay =
       GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (data),
           GST_TYPE_VIDEO_OVERLAY));
 
-  gst_video_overlay_set_gtk_window (overlay, widget);
+  gst_video_overlay_expose (overlay);
+  gst_object_unref (overlay);
 
   return FALSE;
 }
@@ -116,6 +176,7 @@
   GstElement *pipeline;
   GstElement *filter, *sink;
   GstElement *sourcebin;
+  GstBus *bus;
   GError *error = NULL;
 
   GtkWidget *window;
@@ -187,6 +248,17 @@
       G_CALLBACK (destroy_cb), pipeline);
 
   screen = gtk_drawing_area_new ();
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), pipeline);
+
+  gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, screen,
+      NULL);
+  gst_object_unref (bus);
 
   gtk_widget_set_size_request (screen, 640, 480);       // 500 x 376
 
@@ -246,7 +318,10 @@
 
   gtk_container_add (GTK_CONTAINER (window), vbox);
 
-  g_signal_connect (screen, "realize", G_CALLBACK (expose_cb), pipeline);
+  g_signal_connect (screen, "draw", G_CALLBACK (expose_cb), pipeline);
+  g_signal_connect (screen, "configure-event", G_CALLBACK (expose_cb),
+      pipeline);
+  gtk_widget_realize (screen);
 
   ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
   if (ret == GST_STATE_CHANGE_FAILURE) {
diff --git a/tests/examples/gl/gtk/gstgtk.c b/tests/examples/gl/gtk/gstgtk.c
index 07cd08d..493d6b3 100644
--- a/tests/examples/gl/gtk/gstgtk.c
+++ b/tests/examples/gl/gtk/gstgtk.c
@@ -30,10 +30,60 @@
 #if GST_GL_HAVE_WINDOW_X11 && defined(GDK_WINDOWING_X11)
 #include <gdk/gdkx.h>
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && defined(GDK_WINDOWING_WAYLAND)
+#include <gdk/gdkwayland.h>
+#endif
 #if GST_GL_HAVE_WINDOW_COCOA && defined(GDK_WINDOWING_QUARTZ)
 #include <gdk/gdkquartz.h>
 #endif
 
+gboolean
+gst_gtk_handle_need_context (GstBus * bus, GstMessage * msg, gpointer data)
+{
+  gboolean ret = FALSE;
+
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_NEED_CONTEXT:
+    {
+      const gchar *context_type;
+
+      gst_message_parse_context_type (msg, &context_type);
+      g_print ("got need context %s\n", context_type);
+
+      if (g_strcmp0 (context_type, "GstWaylandDisplayHandleContextType") == 0) {
+#if GST_GL_HAVE_WINDOW_WAYLAND && defined(GDK_WINDOWING_WAYLAND)
+        GstContext *context = NULL;
+        GdkDisplay *gdk_display = gdk_display_get_default ();
+        if (GDK_IS_WAYLAND_DISPLAY (gdk_display)) {
+          struct wl_display *wayland_display =
+              gdk_wayland_display_get_wl_display (gdk_display);
+          if (wayland_display) {
+            GstStructure *s;
+
+            context =
+                gst_context_new ("GstWaylandDisplayHandleContextType", TRUE);
+
+            s = gst_context_writable_structure (context);
+            gst_structure_set (s, "display", G_TYPE_POINTER, wayland_display,
+                NULL);
+
+            gst_element_set_context (GST_ELEMENT (msg->src), context);
+
+            ret = TRUE;
+          }
+        }
+#else
+        GST_ERROR
+            ("Asked for wayland display context, but compiled without wayland support");
+#endif
+      }
+    }
+    default:
+      break;
+  }
+
+  return ret;
+}
 
 void
 gst_video_overlay_set_gtk_window (GstVideoOverlay * videooverlay,
@@ -66,5 +116,12 @@
     gst_video_overlay_set_window_handle (videooverlay, GDK_WINDOW_XID (window));
   } else
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && defined(GDK_WINDOWING_WAYLAND)
+  if (GDK_IS_WAYLAND_DISPLAY (display) && (!user_choice
+          || g_strcmp0 (user_choice, "wayland") == 0)) {
+    gst_video_overlay_set_window_handle (videooverlay,
+        (guintptr) gdk_wayland_window_get_wl_surface (window));
+  } else
+#endif
     g_error ("Unsupported Gtk+ backend");
 }
diff --git a/tests/examples/gl/gtk/gstgtk.h b/tests/examples/gl/gtk/gstgtk.h
index 4ef147f..2aeec59 100644
--- a/tests/examples/gl/gtk/gstgtk.h
+++ b/tests/examples/gl/gtk/gstgtk.h
@@ -27,6 +27,7 @@
 G_BEGIN_DECLS
 
 void gst_video_overlay_set_gtk_window (GstVideoOverlay *videooverlay, GtkWidget *window);
+gboolean gst_gtk_handle_need_context (GstBus *bus, GstMessage *msg, gpointer data);
 
 G_END_DECLS
 
diff --git a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
index 0ba1eca..e84975d 100644
--- a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = gtkvideooverlay$(EXEEXT)
 subdir = tests/examples/gl/gtk/gtkvideooverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +254,6 @@
 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@
@@ -256,7 +266,6 @@
 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@
@@ -264,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +409,6 @@
 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@
@@ -402,7 +417,6 @@
 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@
@@ -415,7 +429,6 @@
 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@
@@ -429,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -721,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/gtkvideooverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/gtkvideooverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1008,6 +1041,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/gtkvideooverlay/main.cpp b/tests/examples/gl/gtk/gtkvideooverlay/main.cpp
index 7024cfc..8d886b5 100644
--- a/tests/examples/gl/gtk/gtkvideooverlay/main.cpp
+++ b/tests/examples/gl/gtk/gtkvideooverlay/main.cpp
@@ -27,34 +27,60 @@
 
 static GstBusSyncReply create_window (GstBus* bus, GstMessage* message, GtkWidget* widget)
 {
-    // ignore anything but 'prepare-window-handle' element messages
-    if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
-        return GST_BUS_PASS;
+  /* ignore anything but 'prepare-window-handle' element messages */
+  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
+      return GST_BUS_PASS;
 
-    if (!gst_is_video_overlay_prepare_window_handle_message (message))
-        return GST_BUS_PASS;
+  if (!gst_is_video_overlay_prepare_window_handle_message (message))
+      return GST_BUS_PASS;
 
-    g_print ("setting window handle\n");
+  g_print ("setting window handle\n");
 
-    //do not call gdk_window_ensure_native for the first time here because
-    //we are in a different thread than the main thread
-    //(and the main thread the onne)
-    gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), widget);
+  /* do not call gdk_window_ensure_native for the first time here because
+   * we are in a different thread than the main thread */
+  gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), widget);
 
-    gst_message_unref (message);
+  gst_message_unref (message);
 
-    return GST_BUS_DROP;
+  return GST_BUS_DROP;
 }
 
 
 static void end_stream_cb(GstBus* bus, GstMessage* message, GstElement* pipeline)
 {
-    g_print("End of stream\n");
+  switch (GST_MESSAGE_TYPE (message))
+  {
+    case GST_MESSAGE_EOS:
+      g_print ("End of stream\n");
 
-    gst_element_set_state (pipeline, GST_STATE_NULL);
-    gst_object_unref(pipeline);
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref(pipeline);
+      gtk_main_quit ();
+      break;
+    case GST_MESSAGE_ERROR:
+    {
+      gchar *debug = NULL;
+      GError *err = NULL;
 
-    gtk_main_quit();
+      gst_message_parse_error (message, &err, &debug);
+
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+
+      if (debug)
+      {
+        g_print ("Debug details: %s\n", debug);
+        g_free (debug);
+      }
+
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      gst_object_unref(pipeline);
+      gtk_main_quit ();
+      break;
+    }
+    default:
+      break;
+  }
 }
 
 static gboolean draw_cb(GtkWidget* widget, cairo_t *cr, GstElement* videosink)
diff --git a/tests/examples/gl/gtk/switchvideooverlay/Makefile.in b/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
index 71eb7ed..77474dd 100644
--- a/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = switchvideooverlay$(EXEEXT)
 subdir = tests/examples/gl/gtk/switchvideooverlay
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +208,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +226,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +254,6 @@
 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@
@@ -256,7 +266,6 @@
 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@
@@ -264,6 +273,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +301,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +327,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +385,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +409,6 @@
 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@
@@ -402,7 +417,6 @@
 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@
@@ -415,7 +429,6 @@
 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@
@@ -429,6 +442,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +454,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +494,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +530,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +563,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +573,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +609,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +620,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +651,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +677,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +716,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -721,7 +755,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/gtk/switchvideooverlay/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/gtk/switchvideooverlay/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1008,6 +1041,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/gtk/switchvideooverlay/main.cpp b/tests/examples/gl/gtk/switchvideooverlay/main.cpp
index 440d5ce..ea53ea1 100644
--- a/tests/examples/gl/gtk/switchvideooverlay/main.cpp
+++ b/tests/examples/gl/gtk/switchvideooverlay/main.cpp
@@ -27,6 +27,11 @@
 
 static GstBusSyncReply create_window (GstBus* bus, GstMessage* message, GtkWidget* widget)
 {
+    GtkAllocation allocation;
+
+    if (gst_gtk_handle_need_context (bus, message, NULL))
+        return GST_BUS_DROP;
+
     // ignore anything but 'prepare-window-handle' element messages
     if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
         return GST_BUS_PASS;
@@ -38,23 +43,56 @@
 
     gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), widget);
 
+    gtk_widget_get_allocation (widget, &allocation);
+    gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), allocation.x, allocation.y, allocation.width, allocation.height);
+
     gst_message_unref (message);
 
     return GST_BUS_DROP;
 }
 
+static gboolean
+resize_cb (GtkWidget * widget, GdkEvent * event, gpointer sink)
+{
+    GtkAllocation allocation;
+
+    gtk_widget_get_allocation (widget, &allocation);
+    gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (sink), allocation.x, allocation.y, allocation.width, allocation.height);
+
+    return G_SOURCE_CONTINUE;
+}
 
 static void end_stream_cb(GstBus* bus, GstMessage* message, GstElement* pipeline)
 {
-    g_print("End of stream\n");
+    GError *error = NULL;
+    gchar *details;
 
-    gst_element_set_state (pipeline, GST_STATE_NULL);
-    gst_object_unref(pipeline);
+    switch (GST_MESSAGE_TYPE (message)) {
+        case GST_MESSAGE_ERROR:
+            gst_message_parse_error (message, &error, &details);
 
-    gtk_main_quit();
+            g_print("Error %s\n", error->message);
+            g_print("Details %s\n", details);
+        /* fallthrough */
+        case GST_MESSAGE_EOS:
+            g_print("End of stream\n");
+
+            gst_element_set_state (pipeline, GST_STATE_NULL);
+            gst_object_unref(pipeline);
+
+            gtk_main_quit();
+            break;
+        case GST_MESSAGE_WARNING:
+            gst_message_parse_warning (message, &error, &details);
+
+            g_print("Warning %s\n", error->message);
+            g_print("Details %s\n", details);
+            break;
+        default:
+            break;
+    }
 }
 
-
 static gboolean expose_cb(GtkWidget* widget, cairo_t *cr, GstElement* videosink)
 {
     g_print ("expose %p\n", widget);
@@ -65,9 +103,14 @@
 
 static gboolean on_click_drawing_area(GtkWidget* widget, GdkEventButton* event, GstElement* videosink)
 {
+    GtkAllocation allocation;
+
     g_print ("switch the drawing area %p\n", widget);
     gst_video_overlay_set_gtk_window (GST_VIDEO_OVERLAY (videosink), widget);
-    gst_video_overlay_expose (GST_VIDEO_OVERLAY (videosink));
+
+    gtk_widget_get_allocation (widget, &allocation);
+    gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (videosink), allocation.x, allocation.y, allocation.width, allocation.height);
+
     return FALSE;
 }
 
@@ -115,10 +158,6 @@
     g_print ("realize %p\n", widget);
     if (!gdk_window_ensure_native (gtk_widget_get_window (widget)))
         g_error ("Failed to create native window!");
-
-    //avoid flickering when resizing or obscuring the main window
-    gtk_widget_set_app_paintable(widget, TRUE);
-    gtk_widget_set_double_buffered(widget, FALSE);
 }
 
 
@@ -215,6 +254,8 @@
     g_signal_connect(area_top_left, "realize", G_CALLBACK(area_realize_cb), NULL);
     g_signal_connect(area_top_right, "realize", G_CALLBACK(area_realize_cb), NULL);
 
+    gtk_widget_set_redraw_on_allocate (area_top_left, TRUE);
+    gtk_widget_set_redraw_on_allocate (area_top_right, TRUE);
     gtk_widget_realize(area_top_left);
     gtk_widget_realize(area_top_right);
 
@@ -229,7 +270,9 @@
     //needed when being in GST_STATE_READY, GST_STATE_PAUSED
     //or resizing/obscuring the window
     g_signal_connect(area_top_left, "draw", G_CALLBACK(expose_cb), videosink);
+    g_signal_connect(area_top_left, "configure-event", G_CALLBACK(resize_cb), videosink);
     g_signal_connect(area_top_right, "draw", G_CALLBACK(expose_cb), videosink);
+    g_signal_connect(area_top_right, "configure-event", G_CALLBACK(resize_cb), videosink);
 
     //switch the drawing area
     g_signal_connect(area_top_left, "button-press-event", G_CALLBACK(on_click_drawing_area), videosink);
diff --git a/tests/examples/gl/qt/Makefile.in b/tests/examples/gl/qt/Makefile.in
index a64e785..128b4d2 100644
--- a/tests/examples/gl/qt/Makefile.in
+++ b/tests/examples/gl/qt/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = tests/examples/gl/qt
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -158,8 +169,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -184,8 +197,6 @@
 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@
@@ -198,7 +209,6 @@
 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@
@@ -206,6 +216,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -232,11 +244,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -255,8 +270,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -315,10 +328,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -335,7 +352,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -357,7 +372,6 @@
 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@
@@ -371,6 +385,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -382,6 +397,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -420,6 +437,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -455,10 +473,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -484,6 +506,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -491,7 +516,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -520,6 +552,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -530,6 +563,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -560,17 +594,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -587,6 +620,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -625,6 +659,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -653,7 +688,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/qt/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/qt/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -828,6 +862,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 #SUBDIRS = videooverlay qglwidgetvideooverlay mousevideooverlay
 
diff --git a/tests/examples/gl/qt/README b/tests/examples/gl/qt/README
index aa843d6..a050fc2 100644
--- a/tests/examples/gl/qt/README
+++ b/tests/examples/gl/qt/README
@@ -1,22 +1,23 @@
 --- Description of the Qt examples ---
 
-- mousevideooverlay:
-Show how to use the videooverlay interface through Qt.
-The cube is rotating when moving the mouse (+ click maintained)
-
-- qglvideooverlay:
-Show how to use the videooverlay interface through Qt.
-The cube is rotating automatically into a QGLWidget
-
-- videovdieooverlay:
+- videooverlay:
 Show how to use the videooverlay interface through Qt.
 The video is displayed as normal 2D scene.
 The window is dynamically resized to have the same size as the original video.
 
+- mousevideooverlay:
+Show how to use the videooverlay interface through Qt.
+The cube is rotating when moving the mouse (+ click maintained)
+
+- qglwidgetvideooverlay:
+Show how to use the videooverlay interface through Qt.
+The cube is rotating automatically into a QGLWidget
+
+
 --- How to build the Qt examples ---
 
-sudo apt-get install g++
-sudo apt-get install libqt4-dev
+sudo apt-get install g++ libqt5-dev
+
 cd qglvideooverlay
 qmake
 make
diff --git a/tests/examples/gl/sdl/Makefile.am b/tests/examples/gl/sdl/Makefile.am
index 69ac934..dd57509 100644
--- a/tests/examples/gl/sdl/Makefile.am
+++ b/tests/examples/gl/sdl/Makefile.am
@@ -3,7 +3,7 @@
 #works on win32 and X
 if HAVE_SDL
 
-noinst_PROGRAMS += sdlshare
+noinst_PROGRAMS += sdlshare sdlshare2
 
 sdlshare_SOURCES = sdlshare.c
 
@@ -18,4 +18,17 @@
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
 	-lgstvideo-$(GST_API_VERSION)
 
+sdlshare2_SOURCES = sdlshare2.c
+
+sdlshare2_CFLAGS= \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GL_CFLAGS) \
+	$(SDL_CFLAGS)
+sdlshare2_LDADD= $(GST_LIBS) $(GL_LIBS) $(SDL_LIBS) \
+	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	-lgstvideo-$(GST_API_VERSION)
+
 endif
diff --git a/tests/examples/gl/sdl/Makefile.in b/tests/examples/gl/sdl/Makefile.in
index b3b8a54..5cb696f 100644
--- a/tests/examples/gl/sdl/Makefile.in
+++ b/tests/examples/gl/sdl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,10 +92,8 @@
 noinst_PROGRAMS = $(am__EXEEXT_1)
 
 #works on win32 and X
-@HAVE_SDL_TRUE@am__append_1 = sdlshare
+@HAVE_SDL_TRUE@am__append_1 = sdlshare sdlshare2
 subdir = tests/examples/gl/sdl
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -93,6 +101,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -106,7 +115,6 @@
 	$(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 \
@@ -123,11 +131,12 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-@HAVE_SDL_TRUE@am__EXEEXT_1 = sdlshare$(EXEEXT)
+@HAVE_SDL_TRUE@am__EXEEXT_1 = sdlshare$(EXEEXT) sdlshare2$(EXEEXT)
 PROGRAMS = $(noinst_PROGRAMS)
 am__sdlshare_SOURCES_DIST = sdlshare.c
 @HAVE_SDL_TRUE@am_sdlshare_OBJECTS = sdlshare-sdlshare.$(OBJEXT)
@@ -143,6 +152,15 @@
 sdlshare_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(sdlshare_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__sdlshare2_SOURCES_DIST = sdlshare2.c
+@HAVE_SDL_TRUE@am_sdlshare2_OBJECTS = sdlshare2-sdlshare2.$(OBJEXT)
+sdlshare2_OBJECTS = $(am_sdlshare2_OBJECTS)
+@HAVE_SDL_TRUE@sdlshare2_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@HAVE_SDL_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@HAVE_SDL_TRUE@	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
+sdlshare2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(sdlshare2_CFLAGS) \
+	$(CFLAGS) $(AM_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
@@ -177,8 +195,9 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(sdlshare_SOURCES)
-DIST_SOURCES = $(am__sdlshare_SOURCES_DIST)
+SOURCES = $(sdlshare_SOURCES) $(sdlshare2_SOURCES)
+DIST_SOURCES = $(am__sdlshare_SOURCES_DIST) \
+	$(am__sdlshare2_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -203,6 +222,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -220,8 +240,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -246,8 +268,6 @@
 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@
@@ -260,7 +280,6 @@
 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@
@@ -268,6 +287,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -294,11 +315,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -317,8 +341,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -377,10 +399,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -397,7 +423,6 @@
 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@
@@ -406,7 +431,6 @@
 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@
@@ -419,7 +443,6 @@
 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@
@@ -433,6 +456,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -444,6 +468,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -482,6 +508,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -517,10 +544,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -546,6 +577,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -553,7 +587,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -582,6 +623,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -592,6 +634,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -622,17 +665,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -649,6 +691,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -687,6 +730,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -713,6 +757,19 @@
 @HAVE_SDL_TRUE@	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
 @HAVE_SDL_TRUE@	-lgstvideo-$(GST_API_VERSION)
 
+@HAVE_SDL_TRUE@sdlshare2_SOURCES = sdlshare2.c
+@HAVE_SDL_TRUE@sdlshare2_CFLAGS = \
+@HAVE_SDL_TRUE@	-I$(top_srcdir)/gst-libs \
+@HAVE_SDL_TRUE@	-I$(top_builddir)/gst-libs \
+@HAVE_SDL_TRUE@	$(GST_PLUGINS_BASE_CFLAGS) \
+@HAVE_SDL_TRUE@	$(GST_CFLAGS) \
+@HAVE_SDL_TRUE@	$(GL_CFLAGS) \
+@HAVE_SDL_TRUE@	$(SDL_CFLAGS)
+
+@HAVE_SDL_TRUE@sdlshare2_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)
+
 all: all-am
 
 .SUFFIXES:
@@ -729,7 +786,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gl/sdl/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/gl/sdl/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -761,6 +817,10 @@
 	@rm -f sdlshare$(EXEEXT)
 	$(AM_V_CCLD)$(sdlshare_LINK) $(sdlshare_OBJECTS) $(sdlshare_LDADD) $(LIBS)
 
+sdlshare2$(EXEEXT): $(sdlshare2_OBJECTS) $(sdlshare2_DEPENDENCIES) $(EXTRA_sdlshare2_DEPENDENCIES) 
+	@rm -f sdlshare2$(EXEEXT)
+	$(AM_V_CCLD)$(sdlshare2_LINK) $(sdlshare2_OBJECTS) $(sdlshare2_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -768,6 +828,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdlshare-sdlshare.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdlshare2-sdlshare2.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -807,6 +868,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) $(sdlshare_CFLAGS) $(CFLAGS) -c -o sdlshare-sdlshare.obj `if test -f 'sdlshare.c'; then $(CYGPATH_W) 'sdlshare.c'; else $(CYGPATH_W) '$(srcdir)/sdlshare.c'; fi`
 
+sdlshare2-sdlshare2.o: sdlshare2.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sdlshare2_CFLAGS) $(CFLAGS) -MT sdlshare2-sdlshare2.o -MD -MP -MF $(DEPDIR)/sdlshare2-sdlshare2.Tpo -c -o sdlshare2-sdlshare2.o `test -f 'sdlshare2.c' || echo '$(srcdir)/'`sdlshare2.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sdlshare2-sdlshare2.Tpo $(DEPDIR)/sdlshare2-sdlshare2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sdlshare2.c' object='sdlshare2-sdlshare2.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) $(sdlshare2_CFLAGS) $(CFLAGS) -c -o sdlshare2-sdlshare2.o `test -f 'sdlshare2.c' || echo '$(srcdir)/'`sdlshare2.c
+
+sdlshare2-sdlshare2.obj: sdlshare2.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sdlshare2_CFLAGS) $(CFLAGS) -MT sdlshare2-sdlshare2.obj -MD -MP -MF $(DEPDIR)/sdlshare2-sdlshare2.Tpo -c -o sdlshare2-sdlshare2.obj `if test -f 'sdlshare2.c'; then $(CYGPATH_W) 'sdlshare2.c'; else $(CYGPATH_W) '$(srcdir)/sdlshare2.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sdlshare2-sdlshare2.Tpo $(DEPDIR)/sdlshare2-sdlshare2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sdlshare2.c' object='sdlshare2-sdlshare2.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) $(sdlshare2_CFLAGS) $(CFLAGS) -c -o sdlshare2-sdlshare2.obj `if test -f 'sdlshare2.c'; then $(CYGPATH_W) 'sdlshare2.c'; else $(CYGPATH_W) '$(srcdir)/sdlshare2.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1016,6 +1091,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c
index bc54eae..40f0af6 100644
--- a/tests/examples/gl/sdl/sdlshare.c
+++ b/tests/examples/gl/sdl/sdlshare.c
@@ -26,7 +26,6 @@
 #endif
 
 #include <GL/gl.h>
-#include <GL/glu.h>
 #include "SDL/SDL.h"
 #include "SDL/SDL_opengl.h"
 
@@ -39,6 +38,9 @@
 #include <gst/gst.h>
 #include <gst/gl/gl.h>
 
+static GstGLContext *sdl_context;
+static GstGLDisplay *sdl_gl_display;
+
 /* rotation angle for the triangle. */
 float rtri = 0.0f;
 
@@ -59,8 +61,6 @@
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();            // Reset The Projection Matrix
 
-  gluPerspective (45.0f, (GLfloat) Width / (GLfloat) Height, 0.1f, 100.0f);     // Calculate The Aspect Ratio Of The Window
-
   glMatrixMode (GL_MODELVIEW);
 }
 
@@ -84,17 +84,17 @@
   glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);  // Clear The Screen And The Depth Buffer
   glLoadIdentity ();            // Reset The View
 
-  glTranslatef (-1.5f, 0.0f, -6.0f);    // Move Left 1.5 Units And Into The Screen 6.0
+  glTranslatef (-0.4f, 0.0f, 0.0f);     // Move Left 1.5 Units And Into The Screen 6.0
 
   glRotatef (rtri, 0.0f, 1.0f, 0.0f);   // Rotate The Triangle On The Y axis 
   // draw a triangle (in smooth coloring mode)
   glBegin (GL_POLYGON);         // start drawing a polygon
   glColor3f (1.0f, 0.0f, 0.0f); // Set The Color To Red
-  glVertex3f (0.0f, 1.0f, 0.0f);        // Top
+  glVertex3f (0.0f, 0.4f, 0.0f);        // Top
   glColor3f (0.0f, 1.0f, 0.0f); // Set The Color To Green
-  glVertex3f (1.0f, -1.0f, 0.0f);       // Bottom Right
+  glVertex3f (0.4f, -0.4f, 0.0f);       // Bottom Right
   glColor3f (0.0f, 0.0f, 1.0f); // Set The Color To Blue
-  glVertex3f (-1.0f, -1.0f, 0.0f);      // Bottom Left  
+  glVertex3f (-0.4f, -0.4f, 0.0f);      // Bottom Left  
   glEnd ();                     // we're done with the polygon (smooth color interpolation)
 
   glEnable (GL_TEXTURE_2D);
@@ -106,20 +106,20 @@
   glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 
   glLoadIdentity ();            // make sure we're no longer rotated.
-  glTranslatef (1.5f, 0.0f, -6.0f);     // Move Right 3 Units, and back into the screen 6.0
+  glTranslatef (0.5f, 0.0f, 0.0f);      // Move Right 3 Units, and back into the screen 6.0
 
   glRotatef (rquad, 1.0f, 0.0f, 0.0f);  // Rotate The Quad On The X axis 
   // draw a square (quadrilateral)
-  glColor3f (0.5f, 0.5f, 1.0f); // set color to a blue shade.
+  glColor3f (0.4f, 0.4f, 1.0f); // set color to a blue shade.
   glBegin (GL_QUADS);           // start drawing a polygon (4 sided)
   glTexCoord3f (0.0f, 1.0f, 0.0f);
-  glVertex3f (-1.0f, 1.0f, 0.0f);       // Top Left
+  glVertex3f (-0.4f, 0.4f, 0.0f);       // Top Left
   glTexCoord3f (1.0f, 1.0f, 0.0f);
-  glVertex3f (1.0f, 1.0f, 0.0f);        // Top Right
+  glVertex3f (0.4f, 0.4f, 0.0f);        // Top Right
   glTexCoord3f (1.0f, 0.0f, 0.0f);
-  glVertex3f (1.0f, -1.0f, 0.0f);       // Bottom Right
+  glVertex3f (0.4f, -0.4f, 0.0f);       // Bottom Right
   glTexCoord3f (0.0f, 0.0f, 0.0f);
-  glVertex3f (-1.0f, -1.0f, 0.0f);      // Bottom Left  
+  glVertex3f (-0.4f, -0.4f, 0.0f);      // Bottom Left  
   glEnd ();                     // done with the polygon
 
   glBindTexture (GL_TEXTURE_2D, 0);
@@ -129,6 +129,8 @@
 
   // swap buffers to display, since we're double buffered.
   SDL_GL_SwapBuffers ();
+
+  gst_video_frame_unmap (&v_frame);
 }
 
 static gboolean
@@ -229,6 +231,39 @@
   g_main_loop_quit (loop);
 }
 
+static gboolean
+sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data)
+{
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_NEED_CONTEXT:
+    {
+      const gchar *context_type;
+
+      gst_message_parse_context_type (msg, &context_type);
+      g_print ("got need context %s\n", context_type);
+
+      if (g_strcmp0 (context_type, GST_GL_DISPLAY_CONTEXT_TYPE) == 0) {
+        GstContext *display_context =
+            gst_context_new (GST_GL_DISPLAY_CONTEXT_TYPE, TRUE);
+        gst_context_set_gl_display (display_context, sdl_gl_display);
+        gst_element_set_context (GST_ELEMENT (msg->src), display_context);
+        return TRUE;
+      } else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
+        GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
+        GstStructure *s = gst_context_writable_structure (app_context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, sdl_context,
+            NULL);
+        gst_element_set_context (GST_ELEMENT (msg->src), app_context);
+        return TRUE;
+      }
+      break;
+    }
+    default:
+      break;
+  }
+  return FALSE;
+}
+
 int
 main (int argc, char **argv)
 {
@@ -246,13 +281,10 @@
   GMainLoop *loop = NULL;
   GstPipeline *pipeline = NULL;
   GstBus *bus = NULL;
-  GstElement *glfilter = NULL;
   GstElement *fakesink = NULL;
   GstState state;
   GAsyncQueue *queue_input_buf = NULL;
   GAsyncQueue *queue_output_buf = NULL;
-  GstGLDisplay *display;
-  GstGLContext *sdl_context;
   const gchar *platform;
 
   /* Initialize SDL for video output */
@@ -284,38 +316,40 @@
   sdl_dc = wglGetCurrentDC ();
   wglMakeCurrent (0, 0);
   platform = "wgl";
-  display = gst_gl_display_new ();
+  sdl_gl_display = gst_gl_display_new ();
 #else
   SDL_VERSION (&info.version);
   SDL_GetWMInfo (&info);
+  /* FIXME: This display is different to the one that SDL uses to create the
+   * GL context inside SDL_SetVideoMode() above which fails on Intel hardware
+   */
   sdl_display = info.info.x11.gfxdisplay;
   sdl_win = info.info.x11.window;
   sdl_gl_context = glXGetCurrentContext ();
   glXMakeCurrent (sdl_display, None, 0);
   platform = "glx";
-  display = (GstGLDisplay *) gst_gl_display_x11_new_with_display (sdl_display);
+  sdl_gl_display =
+      (GstGLDisplay *) gst_gl_display_x11_new_with_display (sdl_display);
 #endif
 
-  sdl_context = gst_gl_context_new_wrapped (display, (guintptr) sdl_gl_context,
+  sdl_context =
+      gst_gl_context_new_wrapped (sdl_gl_display, (guintptr) sdl_gl_context,
       gst_gl_platform_from_string (platform), GST_GL_API_OPENGL);
 
   pipeline =
       GST_PIPELINE (gst_parse_launch
       ("videotestsrc ! video/x-raw, width=320, height=240, framerate=(fraction)30/1 ! "
-          "gleffects effect=5 ! fakesink sync=1", NULL));
+          "glupload ! gleffects effect=5 ! fakesink sync=1", NULL));
 
   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
   gst_bus_add_signal_watch (bus);
   g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb), loop);
   g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb), loop);
   g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), loop);
+  gst_bus_enable_sync_message_emission (bus);
+  g_signal_connect (bus, "sync-message", G_CALLBACK (sync_bus_call), NULL);
   gst_object_unref (bus);
 
-  /* sdl_gl_context is an external OpenGL context with which gst-plugins-gl want to share textures */
-  glfilter = gst_bin_get_by_name (GST_BIN (pipeline), "gleffects0");
-  g_object_set (G_OBJECT (glfilter), "other-context", sdl_context, NULL);
-  gst_object_unref (glfilter);
-
   /* NULL to PAUSED state pipeline to make sure the gst opengl context is created and
    * shared with the sdl one */
   gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PAUSED);
diff --git a/tests/examples/gl/sdl/sdlshare2.c b/tests/examples/gl/sdl/sdlshare2.c
new file mode 100644
index 0000000..ce5792a
--- /dev/null
+++ b/tests/examples/gl/sdl/sdlshare2.c
@@ -0,0 +1,393 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Julien Isorce <julien.isorce@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
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+#include <GL/gl.h>
+#include "SDL/SDL.h"
+#include "SDL/SDL_opengl.h"
+
+#ifndef WIN32
+#include <GL/glx.h>
+#include "SDL/SDL_syswm.h"
+#include <gst/gl/x11/gstgldisplay_x11.h>
+#endif
+
+#include <gst/gst.h>
+#include <gst/gl/gl.h>
+
+static GstGLContext *sdl_context;
+static GstGLDisplay *sdl_gl_display;
+
+/* rotation angle for the triangle. */
+float rtri = 0.0f;
+
+/* rotation angle for the quadrilateral. */
+float rquad = 0.0f;
+
+/* A general OpenGL initialization function.  Sets all of the initial parameters. */
+static void
+InitGL (int Width, int Height)  // We call this right after our OpenGL window is created.
+{
+  glViewport (0, 0, Width, Height);
+  glClearColor (0.0f, 0.0f, 0.0f, 0.0f);        // This Will Clear The Background Color To Black
+  glClearDepth (1.0);           // Enables Clearing Of The Depth Buffer
+  glDepthFunc (GL_LESS);        // The Type Of Depth Test To Do
+  glEnable (GL_DEPTH_TEST);     // Enables Depth Testing
+  glShadeModel (GL_SMOOTH);     // Enables Smooth Color Shading
+
+  glMatrixMode (GL_PROJECTION);
+  glLoadIdentity ();            // Reset The Projection Matrix
+
+  glMatrixMode (GL_MODELVIEW);
+}
+
+/* The main drawing function. */
+static void
+DrawGLScene (GstSample * sample)
+{
+  GstVideoFrame v_frame;
+  GstVideoInfo v_info;
+  guint texture = 0;
+  GstBuffer *buf = gst_sample_get_buffer (sample);
+  GstCaps *caps = gst_sample_get_caps (sample);
+
+#ifdef WIN32
+  if (!wglGetCurrentContext ())
+    return;
+#else
+  if (!glXGetCurrentContext ())
+    return;
+#endif
+
+  gst_video_info_from_caps (&v_info, caps);
+
+  if (!gst_video_frame_map (&v_frame, &v_info, buf, GST_MAP_READ | GST_MAP_GL)) {
+    g_warning ("Failed to map the video buffer");
+    return;
+  }
+
+  texture = *(guint *) v_frame.data[0];
+
+  glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);  // Clear The Screen And The Depth Buffer
+  glLoadIdentity ();            // Reset The View
+
+  glTranslatef (-0.4f, 0.0f, 0.0f);     // Move Left 1.5 Units And Into The Screen 6.0
+
+  glRotatef (rtri, 0.0f, 1.0f, 0.0f);   // Rotate The Triangle On The Y axis 
+  // draw a triangle (in smooth coloring mode)
+  glBegin (GL_POLYGON);         // start drawing a polygon
+  glColor3f (1.0f, 0.0f, 0.0f); // Set The Color To Red
+  glVertex3f (0.0f, 0.4f, 0.0f);        // Top
+  glColor3f (0.0f, 1.0f, 0.0f); // Set The Color To Green
+  glVertex3f (0.4f, -0.4f, 0.0f);       // Bottom Right
+  glColor3f (0.0f, 0.0f, 1.0f); // Set The Color To Blue
+  glVertex3f (-0.4f, -0.4f, 0.0f);      // Bottom Left  
+  glEnd ();                     // we're done with the polygon (smooth color interpolation)
+
+  glEnable (GL_TEXTURE_2D);
+  glBindTexture (GL_TEXTURE_2D, texture);
+  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
+  glLoadIdentity ();            // make sure we're no longer rotated.
+  glTranslatef (0.5f, 0.0f, 0.0f);      // Move Right 3 Units, and back into the screen 6.0
+
+  glRotatef (rquad, 1.0f, 0.0f, 0.0f);  // Rotate The Quad On The X axis 
+  // draw a square (quadrilateral)
+  glColor3f (0.4f, 0.4f, 1.0f); // set color to a blue shade.
+  glBegin (GL_QUADS);           // start drawing a polygon (4 sided)
+  glTexCoord3f (0.0f, 1.0f, 0.0f);
+  glVertex3f (-0.4f, 0.4f, 0.0f);       // Top Left
+  glTexCoord3f (1.0f, 1.0f, 0.0f);
+  glVertex3f (0.4f, 0.4f, 0.0f);        // Top Right
+  glTexCoord3f (1.0f, 0.0f, 0.0f);
+  glVertex3f (0.4f, -0.4f, 0.0f);       // Bottom Right
+  glTexCoord3f (0.0f, 0.0f, 0.0f);
+  glVertex3f (-0.4f, -0.4f, 0.0f);      // Bottom Left  
+  glEnd ();                     // done with the polygon
+
+  glBindTexture (GL_TEXTURE_2D, 0);
+
+  rtri += 1.0f;                 // Increase The Rotation Variable For The Triangle
+  rquad -= 1.0f;                // Decrease The Rotation Variable For The Quad 
+
+  // swap buffers to display, since we're double buffered.
+  SDL_GL_SwapBuffers ();
+
+  gst_video_frame_unmap (&v_frame);
+}
+
+static gboolean
+update_sdl_scene (gpointer data)
+{
+  GstElement *pipeline = (GstElement *) data;
+  SDL_Event event;
+
+  while (SDL_PollEvent (&event)) {
+    if (event.type == SDL_QUIT) {
+      gst_element_send_event (GST_ELEMENT (pipeline), gst_event_new_eos ());
+      return FALSE;
+    }
+    if (event.type == SDL_KEYDOWN) {
+      if (event.key.keysym.sym == SDLK_ESCAPE) {
+        gst_element_send_event (GST_ELEMENT (pipeline), gst_event_new_eos ());
+        return FALSE;
+      }
+    }
+  }
+
+  return TRUE;
+}
+
+static GMutex app_lock;
+static GCond app_cond;
+
+static gboolean
+executeCallback (gpointer data)
+{
+  GstSample *sample = (GstSample *) data;
+
+  g_mutex_lock (&app_lock);
+
+  DrawGLScene (sample);
+
+  g_cond_signal (&app_cond);
+  g_mutex_unlock (&app_lock);
+
+  return FALSE;
+}
+
+static gboolean
+on_client_draw (GstElement * glsink, GstGLContext * context, GstSample * sample,
+    gpointer data)
+{
+  g_mutex_lock (&app_lock);
+
+  g_idle_add_full (G_PRIORITY_HIGH, executeCallback, sample, NULL);
+  g_cond_wait (&app_cond, &app_lock);
+  g_mutex_unlock (&app_lock);
+
+  return TRUE;
+}
+
+/* gst bus signal watch callback */
+static void
+end_stream_cb (GstBus * bus, GstMessage * msg, GMainLoop * loop)
+{
+  switch (GST_MESSAGE_TYPE (msg)) {
+
+    case GST_MESSAGE_EOS:
+      g_print ("End-of-stream\n");
+      break;
+
+    case GST_MESSAGE_ERROR:
+    {
+      gchar *debug = NULL;
+      GError *err = NULL;
+
+      gst_message_parse_error (msg, &err, &debug);
+
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+
+      if (debug) {
+        g_print ("Debug deails: %s\n", debug);
+        g_free (debug);
+      }
+
+      break;
+    }
+
+    default:
+      break;
+  }
+
+  g_main_loop_quit (loop);
+}
+
+static gboolean
+sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data)
+{
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_NEED_CONTEXT:
+    {
+      const gchar *context_type;
+
+      gst_message_parse_context_type (msg, &context_type);
+      g_print ("got need context %s\n", context_type);
+
+      if (g_strcmp0 (context_type, GST_GL_DISPLAY_CONTEXT_TYPE) == 0) {
+        GstContext *display_context =
+            gst_context_new (GST_GL_DISPLAY_CONTEXT_TYPE, TRUE);
+        gst_context_set_gl_display (display_context, sdl_gl_display);
+        gst_element_set_context (GST_ELEMENT (msg->src), display_context);
+        return TRUE;
+      } else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
+        GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
+        GstStructure *s = gst_context_writable_structure (app_context);
+        gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, sdl_context,
+            NULL);
+        gst_element_set_context (GST_ELEMENT (msg->src), app_context);
+        return TRUE;
+      }
+      break;
+    }
+    default:
+      break;
+  }
+  return FALSE;
+}
+
+int
+main (int argc, char **argv)
+{
+#ifdef WIN32
+  HGLRC sdl_gl_context = 0;
+  HDC sdl_dc = 0;
+#else
+  SDL_SysWMinfo info;
+  Display *sdl_display = NULL;
+  Window sdl_win = 0;
+  GLXContext sdl_gl_context = NULL;
+#endif
+
+  GMainLoop *loop = NULL;
+  GstPipeline *pipeline = NULL;
+  GstBus *bus = NULL;
+  GstElement *glimagesink = NULL;
+  const gchar *platform;
+
+  /* Initialize SDL for video output */
+  if (SDL_Init (SDL_INIT_VIDEO) < 0) {
+    fprintf (stderr, "Unable to initialize SDL: %s\n", SDL_GetError ());
+    return -1;
+  }
+
+  /* Create a 640x480 OpenGL screen */
+  if (SDL_SetVideoMode (640, 480, 0, SDL_OPENGL) == NULL) {
+    fprintf (stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError ());
+    SDL_Quit ();
+    return -1;
+  }
+
+  /* Set the title bar in environments that support it */
+  SDL_WM_SetCaption ("SDL and gst-plugins-gl", NULL);
+
+
+  /* Loop, drawing and checking events */
+  InitGL (640, 480);
+
+  gst_init (&argc, &argv);
+  loop = g_main_loop_new (NULL, FALSE);
+
+  /* retrieve and turn off sdl opengl context */
+#ifdef WIN32
+  sdl_gl_context = wglGetCurrentContext ();
+  sdl_dc = wglGetCurrentDC ();
+  wglMakeCurrent (0, 0);
+  platform = "wgl";
+  sdl_gl_display = gst_gl_display_new ();
+#else
+  SDL_VERSION (&info.version);
+  SDL_GetWMInfo (&info);
+  /* FIXME: This display is different to the one that SDL uses to create the
+   * GL context inside SDL_SetVideoMode() above which fails on Intel hardware
+   */
+  sdl_display = info.info.x11.gfxdisplay;
+  sdl_win = info.info.x11.window;
+  sdl_gl_context = glXGetCurrentContext ();
+  glXMakeCurrent (sdl_display, None, 0);
+  platform = "glx";
+  sdl_gl_display =
+      (GstGLDisplay *) gst_gl_display_x11_new_with_display (sdl_display);
+#endif
+
+  sdl_context =
+      gst_gl_context_new_wrapped (sdl_gl_display, (guintptr) sdl_gl_context,
+      gst_gl_platform_from_string (platform), GST_GL_API_OPENGL);
+
+  pipeline =
+      GST_PIPELINE (gst_parse_launch
+      ("videotestsrc ! video/x-raw, width=320, height=240, framerate=(fraction)30/1 ! "
+          "glimagesink name=glimagesink0", NULL));
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb), loop);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb), loop);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), loop);
+  gst_bus_enable_sync_message_emission (bus);
+  g_signal_connect (bus, "sync-message", G_CALLBACK (sync_bus_call), NULL);
+  gst_object_unref (bus);
+
+  glimagesink = gst_bin_get_by_name (GST_BIN (pipeline), "glimagesink0");
+  g_signal_connect (G_OBJECT (glimagesink), "client-draw",
+      G_CALLBACK (on_client_draw), NULL);
+  gst_object_unref (glimagesink);
+
+  /* NULL to PAUSED state pipeline to make sure the gst opengl context is created and
+   * shared with the sdl one */
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PAUSED);
+
+  /* turn on back sdl opengl context */
+#ifdef WIN32
+  wglMakeCurrent (sdl_dc, sdl_gl_context);
+#else
+  glXMakeCurrent (sdl_display, sdl_win, sdl_gl_context);
+#endif
+
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
+
+  g_timeout_add (100, update_sdl_scene, pipeline);
+
+  g_main_loop_run (loop);
+
+  /* before to deinitialize the gst-gl-opengl context,
+   * no shared context (here the sdl one) must be current
+   */
+#ifdef WIN32
+  wglMakeCurrent (0, 0);
+#else
+  glXMakeCurrent (sdl_display, sdl_win, sdl_gl_context);
+#endif
+
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  /* turn on back sdl opengl context */
+#ifdef WIN32
+  wglMakeCurrent (sdl_dc, sdl_gl_context);
+#else
+  glXMakeCurrent (sdl_display, None, 0);
+#endif
+
+  SDL_Quit ();
+
+  return 0;
+}
diff --git a/tests/examples/gtk/Makefile.am b/tests/examples/gtk/Makefile.am
new file mode 100644
index 0000000..945331d
--- /dev/null
+++ b/tests/examples/gtk/Makefile.am
@@ -0,0 +1,24 @@
+
+noinst_PROGRAMS = gtksink
+
+gtksink_SOURCES = gtksink.c
+gtksink_CFLAGS = $(GTK3_CFLAGS) \
+	$(GST_CFLAGS)
+gtksink_LDADD = $(GTK3_LIBS) \
+	$(GST_LIBS)
+
+if USE_GTK3_GL
+if USE_GL
+noinst_PROGRAMS += gtkglsink
+
+gtkglsink_SOURCES = gtkglsink.c
+gtkglsink_CFLAGS = $(GTK3_CFLAGS) \
+	$(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(GL_CFLAGS)
+gtkglsink_LDADD = $(GTK3_LIBS) \
+	$(GST_LIBS) \
+	$(GL_LIBS)
+endif
+endif
diff --git a/ext/mythtv/Makefile.in b/tests/examples/gtk/Makefile.in
similarity index 77%
copy from ext/mythtv/Makefile.in
copy to tests/examples/gtk/Makefile.in
index 055754c..d34ac2c 100644
--- a/ext/mythtv/Makefile.in
+++ b/tests/examples/gtk/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +89,9 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = ext/mythtv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_HEADERS)
+noinst_PROGRAMS = gtksink$(EXEEXT) $(am__EXEEXT_1)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am__append_1 = gtkglsink
+subdir = tests/examples/gtk
 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 \
@@ -90,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +113,6 @@
 	$(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 \
@@ -120,52 +129,35 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 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)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am__EXEEXT_1 = gtkglsink$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am__gtkglsink_SOURCES_DIST = gtkglsink.c
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@am_gtkglsink_OBJECTS =  \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	gtkglsink-gtkglsink.$(OBJEXT)
+gtkglsink_OBJECTS = $(am_gtkglsink_OBJECTS)
 am__DEPENDENCIES_1 =
-libgstmythtvsrc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-am_libgstmythtvsrc_la_OBJECTS = libgstmythtvsrc_la-gstmythtvsrc.lo
-libgstmythtvsrc_la_OBJECTS = $(am_libgstmythtvsrc_la_OBJECTS)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@gtkglsink_DEPENDENCIES =  \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(am__DEPENDENCIES_1) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(am__DEPENDENCIES_1) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-libgstmythtvsrc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) \
-	$(libgstmythtvsrc_la_LDFLAGS) $(LDFLAGS) -o $@
+gtkglsink_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(gtkglsink_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_gtksink_OBJECTS = gtksink-gtksink.$(OBJEXT)
+gtksink_OBJECTS = $(am_gtksink_OBJECTS)
+gtksink_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+gtksink_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(gtksink_CFLAGS) \
+	$(CFLAGS) $(AM_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
@@ -200,14 +192,13 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgstmythtvsrc_la_SOURCES)
-DIST_SOURCES = $(libgstmythtvsrc_la_SOURCES)
+SOURCES = $(gtkglsink_SOURCES) $(gtksink_SOURCES)
+DIST_SOURCES = $(am__gtkglsink_SOURCES_DIST) $(gtksink_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
@@ -227,6 +218,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -244,8 +236,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -270,8 +264,6 @@
 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@
@@ -284,7 +276,6 @@
 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@
@@ -292,6 +283,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -318,11 +311,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -341,8 +337,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -401,10 +395,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -421,7 +419,6 @@
 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@
@@ -430,7 +427,6 @@
 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@
@@ -443,7 +439,6 @@
 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@
@@ -457,6 +452,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -468,6 +464,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -506,6 +504,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -541,10 +540,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -570,6 +573,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -577,7 +583,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -606,6 +619,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -616,6 +630,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -646,17 +661,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -673,6 +687,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -711,6 +726,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -724,24 +740,23 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wayland_scanner = @wayland_scanner@
-plugin_LTLIBRARIES = libgstmythtvsrc.la
-libgstmythtvsrc_la_SOURCES = \
-		gstmythtvsrc.c
+gtksink_SOURCES = gtksink.c
+gtksink_CFLAGS = $(GTK3_CFLAGS) \
+	$(GST_CFLAGS)
 
-libgstmythtvsrc_la_CFLAGS = \
-	$(GST_CFLAGS) \
-	$(GMYTH_CFLAGS)
+gtksink_LDADD = $(GTK3_LIBS) \
+	$(GST_LIBS)
 
-libgstmythtvsrc_la_LDFLAGS = \
-	$(GST_PLUGIN_LDFLAGS)
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@gtkglsink_SOURCES = gtkglsink.c
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@gtkglsink_CFLAGS = $(GTK3_CFLAGS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GST_PLUGINS_BAD_CFLAGS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GST_PLUGINS_BASE_CFLAGS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GST_CFLAGS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GL_CFLAGS)
 
-libgstmythtvsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-libgstmythtvsrc_la_LIBADD = \
-	$(GST_BASE_LIBS) \
-	$(GMYTH_LIBS)
-
-noinst_HEADERS = \
-	gstmythtvsrc.h
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@gtkglsink_LDADD = $(GTK3_LIBS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GST_LIBS) \
+@USE_GL_TRUE@@USE_GTK3_GL_TRUE@	$(GL_LIBS)
 
 all: all-am
 
@@ -756,10 +771,9 @@
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/mythtv/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/gtk/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu ext/mythtv/Makefile
-.PRECIOUS: Makefile
+	  $(AUTOMAKE) --gnu tests/examples/gtk/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,43 +792,22 @@
 	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)"; \
-	}
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
 
-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
+gtkglsink$(EXEEXT): $(gtkglsink_OBJECTS) $(gtkglsink_DEPENDENCIES) $(EXTRA_gtkglsink_DEPENDENCIES) 
+	@rm -f gtkglsink$(EXEEXT)
+	$(AM_V_CCLD)$(gtkglsink_LINK) $(gtkglsink_OBJECTS) $(gtkglsink_LDADD) $(LIBS)
 
-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}; \
-	}
-
-libgstmythtvsrc.la: $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_DEPENDENCIES) $(EXTRA_libgstmythtvsrc_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libgstmythtvsrc_la_LINK) -rpath $(plugindir) $(libgstmythtvsrc_la_OBJECTS) $(libgstmythtvsrc_la_LIBADD) $(LIBS)
+gtksink$(EXEEXT): $(gtksink_OBJECTS) $(gtksink_DEPENDENCIES) $(EXTRA_gtksink_DEPENDENCIES) 
+	@rm -f gtksink$(EXEEXT)
+	$(AM_V_CCLD)$(gtksink_LINK) $(gtksink_OBJECTS) $(gtksink_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -822,7 +815,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkglsink-gtkglsink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtksink-gtksink.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -848,12 +842,33 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libgstmythtvsrc_la-gstmythtvsrc.lo: gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -MT libgstmythtvsrc_la-gstmythtvsrc.lo -MD -MP -MF $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Tpo $(DEPDIR)/libgstmythtvsrc_la-gstmythtvsrc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstmythtvsrc.c' object='libgstmythtvsrc_la-gstmythtvsrc.lo' libtool=yes @AMDEPBACKSLASH@
+gtkglsink-gtkglsink.o: gtkglsink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtkglsink_CFLAGS) $(CFLAGS) -MT gtkglsink-gtkglsink.o -MD -MP -MF $(DEPDIR)/gtkglsink-gtkglsink.Tpo -c -o gtkglsink-gtkglsink.o `test -f 'gtkglsink.c' || echo '$(srcdir)/'`gtkglsink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gtkglsink-gtkglsink.Tpo $(DEPDIR)/gtkglsink-gtkglsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtkglsink.c' object='gtkglsink-gtkglsink.o' libtool=no @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 $(libgstmythtvsrc_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmythtvsrc_la_CFLAGS) $(CFLAGS) -c -o libgstmythtvsrc_la-gstmythtvsrc.lo `test -f 'gstmythtvsrc.c' || echo '$(srcdir)/'`gstmythtvsrc.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtkglsink_CFLAGS) $(CFLAGS) -c -o gtkglsink-gtkglsink.o `test -f 'gtkglsink.c' || echo '$(srcdir)/'`gtkglsink.c
+
+gtkglsink-gtkglsink.obj: gtkglsink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtkglsink_CFLAGS) $(CFLAGS) -MT gtkglsink-gtkglsink.obj -MD -MP -MF $(DEPDIR)/gtkglsink-gtkglsink.Tpo -c -o gtkglsink-gtkglsink.obj `if test -f 'gtkglsink.c'; then $(CYGPATH_W) 'gtkglsink.c'; else $(CYGPATH_W) '$(srcdir)/gtkglsink.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gtkglsink-gtkglsink.Tpo $(DEPDIR)/gtkglsink-gtkglsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtkglsink.c' object='gtkglsink-gtkglsink.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) $(gtkglsink_CFLAGS) $(CFLAGS) -c -o gtkglsink-gtkglsink.obj `if test -f 'gtkglsink.c'; then $(CYGPATH_W) 'gtkglsink.c'; else $(CYGPATH_W) '$(srcdir)/gtkglsink.c'; fi`
+
+gtksink-gtksink.o: gtksink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtksink_CFLAGS) $(CFLAGS) -MT gtksink-gtksink.o -MD -MP -MF $(DEPDIR)/gtksink-gtksink.Tpo -c -o gtksink-gtksink.o `test -f 'gtksink.c' || echo '$(srcdir)/'`gtksink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gtksink-gtksink.Tpo $(DEPDIR)/gtksink-gtksink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtksink.c' object='gtksink-gtksink.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) $(gtksink_CFLAGS) $(CFLAGS) -c -o gtksink-gtksink.o `test -f 'gtksink.c' || echo '$(srcdir)/'`gtksink.c
+
+gtksink-gtksink.obj: gtksink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtksink_CFLAGS) $(CFLAGS) -MT gtksink-gtksink.obj -MD -MP -MF $(DEPDIR)/gtksink-gtksink.Tpo -c -o gtksink-gtksink.obj `if test -f 'gtksink.c'; then $(CYGPATH_W) 'gtksink.c'; else $(CYGPATH_W) '$(srcdir)/gtksink.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gtksink-gtksink.Tpo $(DEPDIR)/gtksink-gtksink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gtksink.c' object='gtksink-gtksink.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) $(gtksink_CFLAGS) $(CFLAGS) -c -o gtksink-gtksink.obj `if test -f 'gtksink.c'; then $(CYGPATH_W) 'gtksink.c'; else $(CYGPATH_W) '$(srcdir)/gtksink.c'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -945,11 +960,8 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(plugindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -982,7 +994,7 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -1003,7 +1015,7 @@
 
 info-am:
 
-install-data-am: install-pluginLTLIBRARIES
+install-data-am:
 
 install-dvi: install-dvi-am
 
@@ -1049,24 +1061,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-pluginLTLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
 	ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-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
+	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
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/examples/gtk/gtkglsink.c b/tests/examples/gtk/gtkglsink.c
new file mode 100644
index 0000000..4b71985
--- /dev/null
+++ b/tests/examples/gtk/gtkglsink.c
@@ -0,0 +1,200 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+
+#include <gst/gl/gl.h>
+
+#if GST_GL_HAVE_WINDOW_X11 && defined (GDK_WINDOWING_X11)
+#include <gst/gl/x11/gstgldisplay_x11.h>
+#endif
+
+static void
+button_state_null_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  g_print ("GST_STATE_NULL\n");
+}
+
+static void
+button_state_ready_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_READY);
+  g_print ("GST_STATE_READY\n");
+}
+
+static void
+button_state_paused_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PAUSED);
+  g_print ("GST_STATE_PAUSED\n");
+}
+
+static void
+button_state_playing_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  g_print ("GST_STATE_PLAYING\n");
+}
+
+static void
+end_stream_cb (GstBus * bus, GstMessage * message, GstElement * pipeline)
+{
+  g_print ("End of stream\n");
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  gtk_main_quit ();
+}
+
+static void
+destroy_cb (GtkWidget * widget, GdkEvent * event, GstElement * pipeline)
+{
+  g_print ("Close\n");
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  gtk_main_quit ();
+}
+
+int
+main (int argc, char *argv[])
+{
+  GtkWidget *window, *window_control;
+  GtkWidget *button_state_null, *button_state_ready;
+  GtkWidget *button_state_paused, *button_state_playing;
+  GtkWidget *grid, *area;
+  GstElement *pipeline;
+  GstElement *videosrc, *upload, *effect, *videosink;
+  GstStateChangeReturn ret;
+  GstCaps *caps;
+  GstBus *bus;
+
+#if GST_GL_HAVE_WINDOW_X11 && defined(GDK_WINDOWING_X11)
+  XInitThreads ();
+#endif
+
+  gst_init (&argc, &argv);
+  gtk_init (&argc, &argv);
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  //window that contains an area where the video is drawn
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
+  gtk_window_move (GTK_WINDOW (window), 300, 10);
+  gtk_window_set_title (GTK_WINDOW (window), "gtkgstwidget");
+
+  //window to control the states
+  window_control = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_resizable (GTK_WINDOW (window_control), FALSE);
+  gtk_window_move (GTK_WINDOW (window_control), 10, 10);
+  grid = gtk_grid_new ();
+  gtk_container_add (GTK_CONTAINER (window_control), grid);
+
+  //control state null
+  button_state_null = gtk_button_new_with_label ("GST_STATE_NULL");
+  g_signal_connect (G_OBJECT (button_state_null), "clicked",
+      G_CALLBACK (button_state_null_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_null, 0, 1, 1, 1);
+  gtk_widget_show (button_state_null);
+
+  //control state ready
+  button_state_ready = gtk_button_new_with_label ("GST_STATE_READY");
+  g_signal_connect (G_OBJECT (button_state_ready), "clicked",
+      G_CALLBACK (button_state_ready_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_ready, 0, 2, 1, 1);
+  gtk_widget_show (button_state_ready);
+
+  //control state paused
+  button_state_paused = gtk_button_new_with_label ("GST_STATE_PAUSED");
+  g_signal_connect (G_OBJECT (button_state_paused), "clicked",
+      G_CALLBACK (button_state_paused_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_paused, 0, 3, 1, 1);
+  gtk_widget_show (button_state_paused);
+
+  //control state playing
+  button_state_playing = gtk_button_new_with_label ("GST_STATE_PLAYING");
+  g_signal_connect (G_OBJECT (button_state_playing), "clicked",
+      G_CALLBACK (button_state_playing_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_playing, 0, 4, 1, 1);
+  gtk_widget_show (button_state_playing);
+
+  gtk_widget_show (grid);
+  gtk_widget_show (window_control);
+
+  g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (destroy_cb),
+      pipeline);
+
+  //configure the pipeline
+  videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
+  upload = gst_element_factory_make ("glupload", "glupload");
+  effect = gst_element_factory_make ("glfiltercube", "glfiltercube");
+  videosink = gst_element_factory_make ("gtkglsink", "gtksink");
+
+  g_object_get (videosink, "widget", &area, NULL);
+  gtk_container_add (GTK_CONTAINER (window), area);
+  g_object_unref (area);
+
+  caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, 640,
+      "height", G_TYPE_INT, 480, "format", G_TYPE_STRING, "RGBA",
+      "framerate", GST_TYPE_FRACTION, 30, 1, NULL);
+
+  gst_bin_add_many (GST_BIN (pipeline), videosrc, upload, effect, videosink,
+      NULL);
+
+  if (!gst_element_link_filtered (videosrc, upload, caps)) {
+    gst_caps_unref (caps);
+    g_warning ("Failed to link videosrc to glfiltercube!\n");
+    return -1;
+  }
+  gst_caps_unref (caps);
+
+  if (!gst_element_link_many (upload, effect, videosink, NULL)) {
+    g_warning ("Failed to link videosrc to glfiltercube!\n");
+    return -1;
+  }
+  //set window id on this event
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), pipeline);
+  gst_object_unref (bus);
+
+  //start
+  ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  if (ret == GST_STATE_CHANGE_FAILURE) {
+    g_print ("Failed to start up pipeline!\n");
+    return -1;
+  }
+
+  gtk_widget_show_all (window);
+
+  gtk_main ();
+
+  gst_deinit ();
+
+  return 0;
+}
diff --git a/tests/examples/gtk/gtksink.c b/tests/examples/gtk/gtksink.c
new file mode 100644
index 0000000..d86fd09
--- /dev/null
+++ b/tests/examples/gtk/gtksink.c
@@ -0,0 +1,185 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <gst/gst.h>
+
+static void
+button_state_null_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  g_print ("GST_STATE_NULL\n");
+}
+
+static void
+button_state_ready_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_READY);
+  g_print ("GST_STATE_READY\n");
+}
+
+static void
+button_state_paused_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PAUSED);
+  g_print ("GST_STATE_PAUSED\n");
+}
+
+static void
+button_state_playing_cb (GtkWidget * widget, GstElement * pipeline)
+{
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  g_print ("GST_STATE_PLAYING\n");
+}
+
+static void
+end_stream_cb (GstBus * bus, GstMessage * message, GstElement * pipeline)
+{
+  g_print ("End of stream\n");
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  gtk_main_quit ();
+}
+
+static void
+destroy_cb (GtkWidget * widget, GdkEvent * event, GstElement * pipeline)
+{
+  g_print ("Close\n");
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+
+  gtk_main_quit ();
+}
+
+int
+main (int argc, char *argv[])
+{
+  GtkWidget *window, *window_control;
+  GtkWidget *button_state_null, *button_state_ready;
+  GtkWidget *button_state_paused, *button_state_playing;
+  GtkWidget *grid, *area;
+  GstElement *pipeline;
+  GstElement *videosrc, *videosink;
+  GstStateChangeReturn ret;
+  GstCaps *caps;
+  GstBus *bus;
+
+  gst_init (&argc, &argv);
+  gtk_init (&argc, &argv);
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  //window that contains an area where the video is drawn
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
+  gtk_window_move (GTK_WINDOW (window), 300, 10);
+  gtk_window_set_title (GTK_WINDOW (window), "gtkgstwidget");
+
+  //window to control the states
+  window_control = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_resizable (GTK_WINDOW (window_control), FALSE);
+  gtk_window_move (GTK_WINDOW (window_control), 10, 10);
+  grid = gtk_grid_new ();
+  gtk_container_add (GTK_CONTAINER (window_control), grid);
+
+  //control state null
+  button_state_null = gtk_button_new_with_label ("GST_STATE_NULL");
+  g_signal_connect (G_OBJECT (button_state_null), "clicked",
+      G_CALLBACK (button_state_null_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_null, 0, 1, 1, 1);
+  gtk_widget_show (button_state_null);
+
+  //control state ready
+  button_state_ready = gtk_button_new_with_label ("GST_STATE_READY");
+  g_signal_connect (G_OBJECT (button_state_ready), "clicked",
+      G_CALLBACK (button_state_ready_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_ready, 0, 2, 1, 1);
+  gtk_widget_show (button_state_ready);
+
+  //control state paused
+  button_state_paused = gtk_button_new_with_label ("GST_STATE_PAUSED");
+  g_signal_connect (G_OBJECT (button_state_paused), "clicked",
+      G_CALLBACK (button_state_paused_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_paused, 0, 3, 1, 1);
+  gtk_widget_show (button_state_paused);
+
+  //control state playing
+  button_state_playing = gtk_button_new_with_label ("GST_STATE_PLAYING");
+  g_signal_connect (G_OBJECT (button_state_playing), "clicked",
+      G_CALLBACK (button_state_playing_cb), pipeline);
+  gtk_grid_attach (GTK_GRID (grid), button_state_playing, 0, 4, 1, 1);
+  gtk_widget_show (button_state_playing);
+
+  gtk_widget_show (grid);
+  gtk_widget_show (window_control);
+
+  g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (destroy_cb),
+      pipeline);
+
+  //configure the pipeline
+  videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
+  videosink = gst_element_factory_make ("gtksink", "gtksink");
+
+  g_object_get (videosink, "widget", &area, NULL);
+  gtk_container_add (GTK_CONTAINER (window), area);
+  g_object_unref (area);
+
+  gtk_widget_realize (area);
+
+  caps = gst_caps_new_simple ("video/x-raw",
+      "width", G_TYPE_INT, 640,
+      "height", G_TYPE_INT, 480, "format", G_TYPE_STRING, "BGRA", NULL);
+
+  gst_bin_add_many (GST_BIN (pipeline), videosrc, videosink, NULL);
+
+  if (!gst_element_link_filtered (videosrc, videosink, caps)) {
+    gst_caps_unref (caps);
+    g_warning ("Failed to link videosrc to glfiltercube!\n");
+    return -1;
+  }
+  gst_caps_unref (caps);
+
+  //set window id on this event
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  g_signal_connect (bus, "message::error", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::warning", G_CALLBACK (end_stream_cb),
+      pipeline);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (end_stream_cb), pipeline);
+  gst_object_unref (bus);
+
+  //start
+  ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  if (ret == GST_STATE_CHANGE_FAILURE) {
+    g_print ("Failed to start up pipeline!\n");
+    return -1;
+  }
+
+  gtk_widget_show_all (window);
+
+  gtk_main ();
+
+  gst_deinit ();
+
+  return 0;
+}
diff --git a/tests/examples/mpegts/Makefile.in b/tests/examples/mpegts/Makefile.in
index 9e9e4d2..d1aa51c 100644
--- a/tests/examples/mpegts/Makefile.in
+++ b/tests/examples/mpegts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = tsparser$(EXEEXT)
 subdir = tests/examples/mpegts
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,6 +128,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -195,6 +204,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -212,8 +222,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -238,8 +250,6 @@
 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@
@@ -252,7 +262,6 @@
 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@
@@ -260,6 +269,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -286,11 +297,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -309,8 +323,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -369,10 +381,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -389,7 +405,6 @@
 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@
@@ -398,7 +413,6 @@
 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@
@@ -411,7 +425,6 @@
 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@
@@ -425,6 +438,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -436,6 +450,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -474,6 +490,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -509,10 +526,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -538,6 +559,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -545,7 +569,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -574,6 +605,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -584,6 +616,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -614,17 +647,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -641,6 +673,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -679,6 +712,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -714,7 +748,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/mpegts/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/mpegts/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1001,6 +1034,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/mxf/Makefile.in b/tests/examples/mxf/Makefile.in
index 72ab5c1..7f51d37 100644
--- a/tests/examples/mxf/Makefile.in
+++ b/tests/examples/mxf/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = mxfdemux-structure$(EXEEXT)
 subdir = tests/examples/mxf
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,6 +129,8 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -199,6 +209,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -216,8 +227,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -242,8 +255,6 @@
 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@
@@ -256,7 +267,6 @@
 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@
@@ -264,6 +274,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -290,11 +302,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -313,8 +328,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -373,10 +386,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -393,7 +410,6 @@
 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@
@@ -402,7 +418,6 @@
 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@
@@ -415,7 +430,6 @@
 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@
@@ -429,6 +443,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -440,6 +455,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -478,6 +495,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -513,10 +531,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -542,6 +564,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -549,7 +574,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -578,6 +610,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -588,6 +621,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -618,17 +652,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -645,6 +678,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -683,6 +717,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -716,7 +751,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/mxf/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/mxf/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1003,6 +1037,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/mxf/mxfdemux-structure.c b/tests/examples/mxf/mxfdemux-structure.c
index 6a263f7..1a802a7 100644
--- a/tests/examples/mxf/mxfdemux-structure.c
+++ b/tests/examples/mxf/mxfdemux-structure.c
@@ -29,31 +29,25 @@
 static gchar *
 g_value_to_string (const GValue * val)
 {
+  gchar *ret = NULL;
+
   if (G_VALUE_TYPE (val) == GST_TYPE_BUFFER) {
     GstBuffer *buf = gst_value_get_buffer (val);
     GstMapInfo map;
-    gchar *ret;
 
     gst_buffer_map (buf, &map, GST_MAP_READ);
     ret = g_base64_encode (map.data, map.size);
     gst_buffer_unmap (buf, &map);
-
-    return ret;
   } else {
     GValue s = { 0, };
-    gchar *ret;
 
     g_value_init (&s, G_TYPE_STRING);
-
-    if (!g_value_transform (val, &s)) {
-      return NULL;
+    if (g_value_transform (val, &s)) {
+      ret = g_value_dup_string (&s);
+      g_value_unset (&s);
     }
-
-    ret = g_value_dup_string (&s);
-    g_value_unset (&s);
-
-    return ret;
   }
+  return ret;
 }
 
 static gboolean
@@ -124,15 +118,32 @@
   gst_structure_foreach (s, insert_field, iter);
 }
 
-static void
-on_message (GstBus * bus, GstMessage * message, gpointer data)
+static gboolean
+bus_callback (GstBus * bus, GstMessage * message, gpointer data)
 {
   switch (GST_MESSAGE_TYPE (message)) {
-    case GST_MESSAGE_WARNING:
-    case GST_MESSAGE_ERROR:
-      g_error ("Got error");
+    case GST_MESSAGE_WARNING:{
+      GError *err;
+      gchar *debug;
+
+      gst_message_parse_warning (message, &err, &debug);
+      g_print ("Warning: %s\n", err->message);
+      g_error_free (err);
+      g_free (debug);
+      break;
+    }
+    case GST_MESSAGE_ERROR:{
+      GError *err;
+      gchar *debug = NULL;
+
+      gst_message_parse_error (message, &err, &debug);
+      g_print ("Error: %s : %s\n", err->message, debug);
+      g_error_free (err);
+      g_free (debug);
+
       gtk_main_quit ();
       break;
+    }
     case GST_MESSAGE_TAG:{
       GstTagList *tags;
       GValue v = { 0, };
@@ -160,6 +171,7 @@
     default:
       break;
   }
+  return TRUE;
 }
 
 static void
@@ -177,8 +189,8 @@
   gst_object_unref (bin);
 }
 
-gint
-main (gint argc, gchar ** argv)
+int
+main (int argc, char **argv)
 {
   GstElement *pipeline, *src, *mxfdemux;
   GstBus *bus;
@@ -189,8 +201,8 @@
     return -1;
   }
 
-  gst_init (NULL, NULL);
-  gtk_init (NULL, NULL);
+  gst_init (&argc, &argv);
+  gtk_init (&argc, &argv);
 
   pipeline = gst_pipeline_new ("pipeline");
 
@@ -212,8 +224,7 @@
   }
 
   bus = gst_element_get_bus (pipeline);
-  gst_bus_add_signal_watch (bus);
-  g_signal_connect (bus, "message", G_CALLBACK (on_message), NULL);
+  gst_bus_add_watch (bus, bus_callback, NULL);
   gst_object_unref (bus);
 
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -231,6 +242,7 @@
 
   gtk_container_add (GTK_CONTAINER (scrolled_window), treeview);
   gtk_container_add (GTK_CONTAINER (window), scrolled_window);
+  gtk_widget_show_all (window);
 
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
 
diff --git a/tests/examples/opencv/Makefile.am b/tests/examples/opencv/Makefile.am
index 9db9da4..81e28d8 100644
--- a/tests/examples/opencv/Makefile.am
+++ b/tests/examples/opencv/Makefile.am
@@ -1,16 +1,16 @@
 noinst_PROGRAMS = gstmotioncells_dynamic_test \
-		  gsthanddetect_test
+		  gsthanddetect_test \
+		  gstfacedetect_test
 
-gstmotioncells_dynamic_test_SOURCES = 	\
-	gstmotioncells_dynamic_test.c	\
-	gst_element_print_properties.c
+gstmotioncells_dynamic_test_SOURCES = gstmotioncells_dynamic_test.c
 gsthanddetect_test_SOURCES = gsthanddetect_test.c
+gstfacedetect_test_SOURCES = gstfacedetect_test.c
 
 gstmotioncells_dynamic_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
 gstmotioncells_dynamic_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
 
 gsthanddetect_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
 gsthanddetect_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
-noinst_HEADERS = 			\
-	gstmotioncells_dynamic_test.h	\
-	gst_element_print_properties.h
+
+gstfacedetect_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+gstfacedetect_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
diff --git a/tests/examples/opencv/Makefile.in b/tests/examples/opencv/Makefile.in
index 779ea1e..2579456 100644
--- a/tests/examples/opencv/Makefile.in
+++ b/tests/examples/opencv/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,18 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,10 +90,8 @@
 host_triplet = @host@
 target_triplet = @target@
 noinst_PROGRAMS = gstmotioncells_dynamic_test$(EXEEXT) \
-	gsthanddetect_test$(EXEEXT)
+	gsthanddetect_test$(EXEEXT) gstfacedetect_test$(EXEEXT)
 subdir = tests/examples/opencv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(noinst_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 \
@@ -92,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -105,7 +113,6 @@
 	$(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 \
@@ -122,25 +129,33 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am_gsthanddetect_test_OBJECTS =  \
-	gsthanddetect_test-gsthanddetect_test.$(OBJEXT)
-gsthanddetect_test_OBJECTS = $(am_gsthanddetect_test_OBJECTS)
-gsthanddetect_test_LDADD = $(LDADD)
+am_gstfacedetect_test_OBJECTS =  \
+	gstfacedetect_test-gstfacedetect_test.$(OBJEXT)
+gstfacedetect_test_OBJECTS = $(am_gstfacedetect_test_OBJECTS)
+gstfacedetect_test_LDADD = $(LDADD)
 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 = 
+gstfacedetect_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(gstfacedetect_test_CFLAGS) $(CFLAGS) \
+	$(gstfacedetect_test_LDFLAGS) $(LDFLAGS) -o $@
+am_gsthanddetect_test_OBJECTS =  \
+	gsthanddetect_test-gsthanddetect_test.$(OBJEXT)
+gsthanddetect_test_OBJECTS = $(am_gsthanddetect_test_OBJECTS)
+gsthanddetect_test_LDADD = $(LDADD)
 gsthanddetect_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(gsthanddetect_test_CFLAGS) $(CFLAGS) \
 	$(gsthanddetect_test_LDFLAGS) $(LDFLAGS) -o $@
-am_gstmotioncells_dynamic_test_OBJECTS = gstmotioncells_dynamic_test-gstmotioncells_dynamic_test.$(OBJEXT) \
-	gstmotioncells_dynamic_test-gst_element_print_properties.$(OBJEXT)
+am_gstmotioncells_dynamic_test_OBJECTS = gstmotioncells_dynamic_test-gstmotioncells_dynamic_test.$(OBJEXT)
 gstmotioncells_dynamic_test_OBJECTS =  \
 	$(am_gstmotioncells_dynamic_test_OBJECTS)
 gstmotioncells_dynamic_test_LDADD = $(LDADD)
@@ -182,16 +197,16 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(gsthanddetect_test_SOURCES) \
+SOURCES = $(gstfacedetect_test_SOURCES) $(gsthanddetect_test_SOURCES) \
 	$(gstmotioncells_dynamic_test_SOURCES)
-DIST_SOURCES = $(gsthanddetect_test_SOURCES) \
+DIST_SOURCES = $(gstfacedetect_test_SOURCES) \
+	$(gsthanddetect_test_SOURCES) \
 	$(gstmotioncells_dynamic_test_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
@@ -211,6 +226,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -228,8 +244,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -254,8 +272,6 @@
 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@
@@ -268,7 +284,6 @@
 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@
@@ -276,6 +291,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -302,11 +319,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -325,8 +345,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -385,10 +403,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -405,7 +427,6 @@
 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@
@@ -414,7 +435,6 @@
 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@
@@ -427,7 +447,6 @@
 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@
@@ -441,6 +460,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -452,6 +472,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -490,6 +512,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -525,10 +548,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -554,6 +581,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -561,7 +591,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -590,6 +627,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -600,6 +638,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -630,17 +669,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -657,6 +695,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -695,6 +734,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -708,19 +748,15 @@
 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
-
+gstmotioncells_dynamic_test_SOURCES = gstmotioncells_dynamic_test.c
 gsthanddetect_test_SOURCES = gsthanddetect_test.c
+gstfacedetect_test_SOURCES = gstfacedetect_test.c
 gstmotioncells_dynamic_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
 gstmotioncells_dynamic_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
 gsthanddetect_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
 gsthanddetect_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
-noinst_HEADERS = \
-	gstmotioncells_dynamic_test.h	\
-	gst_element_print_properties.h
-
+gstfacedetect_test_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+gstfacedetect_test_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS)
 all: all-am
 
 .SUFFIXES:
@@ -737,7 +773,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/opencv/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/opencv/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -765,6 +800,10 @@
 	echo " rm -f" $$list; \
 	rm -f $$list
 
+gstfacedetect_test$(EXEEXT): $(gstfacedetect_test_OBJECTS) $(gstfacedetect_test_DEPENDENCIES) $(EXTRA_gstfacedetect_test_DEPENDENCIES) 
+	@rm -f gstfacedetect_test$(EXEEXT)
+	$(AM_V_CCLD)$(gstfacedetect_test_LINK) $(gstfacedetect_test_OBJECTS) $(gstfacedetect_test_LDADD) $(LIBS)
+
 gsthanddetect_test$(EXEEXT): $(gsthanddetect_test_OBJECTS) $(gsthanddetect_test_DEPENDENCIES) $(EXTRA_gsthanddetect_test_DEPENDENCIES) 
 	@rm -f gsthanddetect_test$(EXEEXT)
 	$(AM_V_CCLD)$(gsthanddetect_test_LINK) $(gsthanddetect_test_OBJECTS) $(gsthanddetect_test_LDADD) $(LIBS)
@@ -779,8 +818,8 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsthanddetect_test-gsthanddetect_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstmotioncells_dynamic_test-gstmotioncells_dynamic_test.Po@am__quote@
 
 .c.o:
@@ -807,6 +846,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
+gstfacedetect_test-gstfacedetect_test.o: gstfacedetect_test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstfacedetect_test_CFLAGS) $(CFLAGS) -MT gstfacedetect_test-gstfacedetect_test.o -MD -MP -MF $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Tpo -c -o gstfacedetect_test-gstfacedetect_test.o `test -f 'gstfacedetect_test.c' || echo '$(srcdir)/'`gstfacedetect_test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Tpo $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstfacedetect_test.c' object='gstfacedetect_test-gstfacedetect_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstfacedetect_test_CFLAGS) $(CFLAGS) -c -o gstfacedetect_test-gstfacedetect_test.o `test -f 'gstfacedetect_test.c' || echo '$(srcdir)/'`gstfacedetect_test.c
+
+gstfacedetect_test-gstfacedetect_test.obj: gstfacedetect_test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstfacedetect_test_CFLAGS) $(CFLAGS) -MT gstfacedetect_test-gstfacedetect_test.obj -MD -MP -MF $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Tpo -c -o gstfacedetect_test-gstfacedetect_test.obj `if test -f 'gstfacedetect_test.c'; then $(CYGPATH_W) 'gstfacedetect_test.c'; else $(CYGPATH_W) '$(srcdir)/gstfacedetect_test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Tpo $(DEPDIR)/gstfacedetect_test-gstfacedetect_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstfacedetect_test.c' object='gstfacedetect_test-gstfacedetect_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstfacedetect_test_CFLAGS) $(CFLAGS) -c -o gstfacedetect_test-gstfacedetect_test.obj `if test -f 'gstfacedetect_test.c'; then $(CYGPATH_W) 'gstfacedetect_test.c'; else $(CYGPATH_W) '$(srcdir)/gstfacedetect_test.c'; fi`
+
 gsthanddetect_test-gsthanddetect_test.o: gsthanddetect_test.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsthanddetect_test_CFLAGS) $(CFLAGS) -MT gsthanddetect_test-gsthanddetect_test.o -MD -MP -MF $(DEPDIR)/gsthanddetect_test-gsthanddetect_test.Tpo -c -o gsthanddetect_test-gsthanddetect_test.o `test -f 'gsthanddetect_test.c' || echo '$(srcdir)/'`gsthanddetect_test.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gsthanddetect_test-gsthanddetect_test.Tpo $(DEPDIR)/gsthanddetect_test-gsthanddetect_test.Po
@@ -835,20 +888,6 @@
 @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) $(gstmotioncells_dynamic_test_CFLAGS) $(CFLAGS) -c -o gstmotioncells_dynamic_test-gstmotioncells_dynamic_test.obj `if test -f 'gstmotioncells_dynamic_test.c'; then $(CYGPATH_W) 'gstmotioncells_dynamic_test.c'; else $(CYGPATH_W) '$(srcdir)/gstmotioncells_dynamic_test.c'; fi`
 
-gstmotioncells_dynamic_test-gst_element_print_properties.o: gst_element_print_properties.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstmotioncells_dynamic_test_CFLAGS) $(CFLAGS) -MT gstmotioncells_dynamic_test-gst_element_print_properties.o -MD -MP -MF $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Tpo -c -o gstmotioncells_dynamic_test-gst_element_print_properties.o `test -f 'gst_element_print_properties.c' || echo '$(srcdir)/'`gst_element_print_properties.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Tpo $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gst_element_print_properties.c' object='gstmotioncells_dynamic_test-gst_element_print_properties.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) $(gstmotioncells_dynamic_test_CFLAGS) $(CFLAGS) -c -o gstmotioncells_dynamic_test-gst_element_print_properties.o `test -f 'gst_element_print_properties.c' || echo '$(srcdir)/'`gst_element_print_properties.c
-
-gstmotioncells_dynamic_test-gst_element_print_properties.obj: gst_element_print_properties.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gstmotioncells_dynamic_test_CFLAGS) $(CFLAGS) -MT gstmotioncells_dynamic_test-gst_element_print_properties.obj -MD -MP -MF $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Tpo -c -o gstmotioncells_dynamic_test-gst_element_print_properties.obj `if test -f 'gst_element_print_properties.c'; then $(CYGPATH_W) 'gst_element_print_properties.c'; else $(CYGPATH_W) '$(srcdir)/gst_element_print_properties.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Tpo $(DEPDIR)/gstmotioncells_dynamic_test-gst_element_print_properties.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gst_element_print_properties.c' object='gstmotioncells_dynamic_test-gst_element_print_properties.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) $(gstmotioncells_dynamic_test_CFLAGS) $(CFLAGS) -c -o gstmotioncells_dynamic_test-gst_element_print_properties.obj `if test -f 'gst_element_print_properties.c'; then $(CYGPATH_W) 'gst_element_print_properties.c'; else $(CYGPATH_W) '$(srcdir)/gst_element_print_properties.c'; fi`
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -939,7 +978,7 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -1058,6 +1097,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/examples/opencv/gst_element_print_properties.c b/tests/examples/opencv/gst_element_print_properties.c
deleted file mode 100644
index 68ec8b8..0000000
--- a/tests/examples/opencv/gst_element_print_properties.c
+++ /dev/null
@@ -1,604 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Wesley Miller <wmiller@sdr.com>
- *
- *
- *  gst_element_print_properties(): a tool to inspect GStreamer
- *                                  element properties
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
- * with newer GLib versions (>= 2.31.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-
-#include <gst/gst.h>
-#include <string.h>
-#include <stdio.h>
-#include <locale.h>
-
-#include "gst_element_print_properties.h"
-
-
-void
-gst_element_print_properties (GstElement * element)
-{
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  // Formatting setup
-  //
-  //    Change the valuses of c2w, c3w and c4w to adjust the 2nd, 3rd and 4th
-  //    column widths, respectively.  The gutter width is fixed at 3 and
-  //    alwasys prints as " | ".  Column 1 has a fixed width of 3.
-  //
-  //    The first two rows for each element's output are its element class
-  //    name (e.g. "GstAudioResample") and its element factory name
-  //    ("audioresample").  The long element factory name ("Audio resampler")
-  //    is in column 4 following the element factory name.
-  //
-  //    Most properties use this format.  Multivalued items like CAPS, certain
-  //    GST_TYPEs and enums are different.
-  //
-  //      Column 1  contains the rwc, "readable", "writable", "controllable"
-  //                flags of the property.
-  //      Column 2  contains the property name
-  //      Column 3  contains the current value
-  //      Column 4  contains the property type, e.g. G_TYPE_INT
-  //      Column 5  contains the range, if there is one, and the default.
-  //                The range is encosed in parentheses. e.g.  "(1-10)   5"
-  //
-  //    CAPS, enums, flags and some undefined items have no columns 4 or 5 and
-  //    column 3 will contain a description of the item.  Additional rows may
-  //    list specific valused (CAPS and flags).
-  //
-  //    String values are enclosed in double quotes.  A missing right quote
-  //    inidicates the string had been truncated.
-  //
-  //  Screen column
-  //  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--->
-  //
-  //  formatted columns with built in gutters
-  //  --- | ---------c2---------- | ---------c3-------- | -----------c4---------- | --> unspecified
-  //
-  //  <-->|<--- property name --->|<-- current value -->|<-------- type --------->|<----- range and default ----->
-  //      | ELEMENT CLASS NAME    | GstAudioResample    |                         |
-  //      | ELEMENT FACTORY NAME  | audioresample       | Audio resampler         |
-  //  RW- | name                  | "audioResampler"    | G_TYPE_STRING           | null
-  //  RW- | qos                   | false               | G_TYPE_BOOLEAN          | false
-  //  RW- | quality               | 8                   | G_TYPE_INT              | (0 - 10)   4
-  //
-  /////////////////////////////////////////////////////////////////////////////
-
-  const guint c2w = 21;         // column 2 width
-  const guint c3w = 19;         // column 3 width
-  const guint c4w = 23;         // column 4 width
-
-  /////////////////////////////////////////////////////////////////////////////
-  // end configuration variables.
-  /////////////////////////////////////////////////////////////////////////////
-
-  GParamSpec **property_specs;
-  guint num_properties, i;
-  gboolean readable;
-
-
-  g_return_if_fail (element != NULL);
-
-  property_specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (element),
-      &num_properties);
-
-   /*--- draw the header information ---*/
-  print_column_titles (c2w, c3w, c4w);
-  print_element_info (element, c2w, c3w, c4w);
-
-
-  for (i = 0; i < num_properties; i++) {
-    gchar flags[4];
-    GValue value = { 0, };
-    GParamSpec *param = property_specs[i];
-
-    readable = FALSE;
-
-    g_value_init (&value, param->value_type);
-
-    flags[0] = '-';
-    flags[1] = '-';
-    flags[2] = '-';
-    flags[3] = 0x0;
-
-    if (param->flags & G_PARAM_READABLE) {
-      g_object_get_property (G_OBJECT (element), param->name, &value);
-      readable = TRUE;
-      flags[0] = 'r';
-    }
-
-    if (param->flags & G_PARAM_WRITABLE)
-      flags[1] = 'w';
-
-    if (param->flags & GST_PARAM_CONTROLLABLE)
-      flags[2] = 'c';
-
-    g_print ("%s |", flags);
-    g_print (" %-*s | ", c2w, g_param_spec_get_name (param));
-
-    switch (G_VALUE_TYPE (&value)) {
-      case G_TYPE_STRING:      // String
-      {
-        GParamSpecString *pstring = G_PARAM_SPEC_STRING (param);
-        if (readable) {         /* current */
-          const char *string_val = g_value_get_string (&value);
-          gchar work_string[100];
-
-          if (string_val == NULL)
-            sprintf (work_string, "\"%s\"", "null");
-          else
-            sprintf (work_string, "\"%s\"", string_val);
-          g_print ("%-*.*s", c3w, c3w, work_string);
-        } else {
-          g_print ("%-*s", c3w, "<not readable>");      /* alt current */
-        }
-        g_print (" | %-*s", c4w, "G_TYPE_STRING");      /* type */
-
-        if (pstring->default_value == NULL)
-          g_print (" | %s", "null");    /* default */
-        else
-          g_print (" | \"%s\"", pstring->default_value);        /* default */
-        break;
-      }
-
-      case G_TYPE_BOOLEAN:     //  Boolean
-      {
-        GParamSpecBoolean *pboolean = G_PARAM_SPEC_BOOLEAN (param);
-        if (readable)           /* current */
-          g_print ("%-*s", c3w,
-              (g_value_get_boolean (&value) ? "true" : "false"));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_BOOLEAN");     /* type */
-        g_print (" | %s ",      /* default */
-            (pboolean->default_value ? "true" : "false"));
-        break;
-      }
-
-      case G_TYPE_ULONG:       //  Unsigned Long
-      {
-        GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
-        if (readable)           /* current */
-          g_print ("%-*lu", c3w, g_value_get_ulong (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_ULONG");       /* type */
-        g_print (" | (%lu - %lu)   %lu ", pulong->minimum, pulong->maximum,     /* range */
-            pulong->default_value);     /* default */
-        break;
-      }
-
-      case G_TYPE_LONG:        //  Long
-      {
-        GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
-        if (readable)           /* current */
-          g_print ("%-*ld", c3w, g_value_get_long (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_LONG");        /* type */
-        g_print (" | (%ld - %ld)   %ld ", plong->minimum, plong->maximum,       /* range */
-            plong->default_value);      /* default */
-        break;
-      }
-
-      case G_TYPE_UINT:        //  Unsigned Integer
-      {
-        GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
-        if (readable)           /* current */
-          g_print ("%-*u", c3w, g_value_get_uint (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_UINT");        /* type */
-        g_print (" | (%u - %u)   %u ", puint->minimum, puint->maximum,  /* range */
-            puint->default_value);      /* default */
-        break;
-      }
-
-      case G_TYPE_INT:         //  Integer
-      {
-        GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
-        if (readable)           /* current */
-          g_print ("%-*d", c3w, g_value_get_int (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_INT"); /* type */
-        g_print (" | (%d - %d)   %d ", pint->minimum, pint->maximum,    /* range */
-            pint->default_value);       /* default */
-        break;
-      }
-
-      case G_TYPE_UINT64:      //  Unsigned Integer64.
-      {
-        GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
-        if (readable)           /* current */
-          g_print ("%-*" G_GUINT64_FORMAT, c3w, g_value_get_uint64 (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_UINT64");      /* type */
-        g_print (" | (%" G_GUINT64_FORMAT " - %" G_GUINT64_FORMAT ")" "   %" G_GUINT64_FORMAT " ", puint64->minimum, puint64->maximum,  /* range */
-            puint64->default_value);    /* default */
-        break;
-      }
-
-      case G_TYPE_INT64:       // Integer64
-      {
-        GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
-        if (readable)           /* current */
-          g_print ("%-*" G_GINT64_FORMAT, c3w, g_value_get_int64 (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_INT64");       /* type */
-        g_print (" | (%" G_GINT64_FORMAT " - %" G_GINT64_FORMAT ")" "   %" G_GINT64_FORMAT " ", pint64->minimum, pint64->maximum,       /* range */
-            pint64->default_value);     /* default */
-        break;
-      }
-
-      case G_TYPE_FLOAT:       //  Float.
-      {
-        GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
-        if (readable)           /* current */
-          g_print ("%-*g", c3w, g_value_get_float (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_FLOAT");       /* type */
-        g_print (" | (%g - %g)   %g ", pfloat->minimum, pfloat->maximum,        /* range */
-            pfloat->default_value);     /* default */
-        break;
-      }
-
-      case G_TYPE_DOUBLE:      //  Double
-      {
-        GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
-        if (readable)           /* current */
-          g_print ("%-*g", c3w, g_value_get_double (&value));
-        else
-          g_print ("%-*s", c3w, "<not readable>");
-        g_print (" | %-*s", c4w, "G_TYPE_DOUBLE");      /* type */
-        g_print (" | (%g - %g)   %g ", pdouble->minimum, pdouble->maximum,      /* range */
-            pdouble->default_value);    /* default */
-        break;
-      }
-
-      default:
-        if (param->value_type == GST_TYPE_CAPS) {
-          const GstCaps *caps = gst_value_get_caps (&value);
-          if (!caps)
-            g_print ("%-*s | %-*.*s |", c3w, "Caps (NULL)", c4w, c4w, " ");
-          else {
-            gchar prefix_string[100];
-            sprintf (prefix_string, "    | %-*.*s | ", c2w, c2w, " ");
-            print_caps (caps, prefix_string);
-          }
-        }
-
-        else if (G_IS_PARAM_SPEC_ENUM (param)) {
-          GParamSpecEnum *penum = G_PARAM_SPEC_ENUM (param);
-          GEnumValue *values;
-          guint j = 0;
-          gint enum_value;
-          const gchar *def_val_nick = "", *cur_val_nick = "";
-          gchar work_string[100];
-
-          values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
-          enum_value = g_value_get_enum (&value);
-
-          while (values[j].value_name) {
-            if (values[j].value == enum_value)
-              cur_val_nick = values[j].value_nick;
-            if (values[j].value == penum->default_value)
-              def_val_nick = values[j].value_nick;
-            j++;
-          }
-
-          sprintf (work_string, "%d, \"%s\"", enum_value, cur_val_nick);
-          g_print ("%-*.*s", c3w, c3w, work_string);
-          g_print (" | Enum \"%s\" : %d, \"%s\"",
-              g_type_name (G_VALUE_TYPE (&value)),
-              penum->default_value, def_val_nick);
-        }
-
-        else if (G_IS_PARAM_SPEC_FLAGS (param)) {
-          GParamSpecFlags *pflags = G_PARAM_SPEC_FLAGS (param);
-          GFlagsValue *vals;
-          gchar *cur, *def;
-          gchar work_string[100];
-
-          vals = pflags->flags_class->values;
-          cur = flags_to_string (vals, g_value_get_flags (&value));     /* current */
-          def = flags_to_string (vals, pflags->default_value);  /* default */
-
-          /* current */
-          sprintf (work_string, "0x%08x, \"%s\"",
-              g_value_get_flags (&value), cur);
-          g_print ("%-*.*s", c3w, c3w, work_string);
-
-          /* type */
-          sprintf (work_string, "Flags \"%s\"",
-              g_type_name (G_VALUE_TYPE (&value)));
-          g_print ("%-*.*s", c4w, c4w, work_string);
-
-          /* default */
-          g_print (" | 0x%08x, \"%s\"", pflags->default_value, def);
-
-          /* values list */
-          while (vals[0].value_name) {
-            sprintf (work_string, "\n    | %-*.*s |   (0x%08x): %-16s - %s",
-                c2w, c2w, "",
-                vals[0].value, vals[0].value_nick, vals[0].value_name);
-            g_print ("%s", work_string);
-            ++vals;
-          }
-
-          g_free (cur);
-          g_free (def);
-        }
-
-        else if (G_IS_PARAM_SPEC_OBJECT (param)) {
-          g_print ("%-*.*s | Object of type \"%s\"",
-              c3w, c3w,
-              g_type_name (param->value_type), g_type_name (param->value_type));
-        }
-
-        else if (G_IS_PARAM_SPEC_BOXED (param)) {
-          g_print ("%-*.*s | Boxed pointer of type \"%s\"",
-              c3w, c3w,
-              g_type_name (param->value_type), g_type_name (param->value_type));
-        }
-
-        else if (G_IS_PARAM_SPEC_POINTER (param)) {
-          if (param->value_type != G_TYPE_POINTER) {
-            g_print ("%-*.*s | Pointer of type \"%s\"",
-                c3w, c3w,
-                g_type_name (param->value_type),
-                g_type_name (param->value_type));
-          } else {
-            g_print ("%-*.*s |", c3w, c3w, "Pointer.");
-          }
-        }
-
-        else if (param->value_type == G_TYPE_VALUE_ARRAY) {
-          GParamSpecValueArray *pvarray = G_PARAM_SPEC_VALUE_ARRAY (param);
-          if (pvarray->element_spec) {
-            g_print ("%-*.*s :Array of GValues of type \"%s\"",
-                c3w, c3w,
-                g_type_name (pvarray->element_spec->value_type),
-                g_type_name (pvarray->element_spec->value_type));
-          } else {
-            g_print ("%-*.*s :", c3w, c3w, "Array of GValues");
-          }
-        }
-
-        else if (GST_IS_PARAM_SPEC_FRACTION (param)) {
-          GstParamSpecFraction *pfraction = GST_PARAM_SPEC_FRACTION (param);
-          gchar work_string[100];
-
-          if (readable) {       /* current */
-            sprintf (work_string, "%d/%d",
-                gst_value_get_fraction_numerator (&value),
-                gst_value_get_fraction_denominator (&value));
-            g_print ("%-*.*s", c3w, c3w, work_string);
-          } else
-            g_print ("%-*s", c3w, "<not readable>");
-
-          g_print (" | %-*.*s", /* type */
-              c3w, c3w, " Fraction. ");
-          g_print (" | (%d/%d - %d/%d)",        /* range */
-              pfraction->min_num, pfraction->min_den,
-              pfraction->max_num, pfraction->max_den);
-          g_print ("   %d/%d ", /* default */
-              pfraction->def_num, pfraction->def_den);
-        }
-
-        else if (G_IS_PARAM_SPEC_BOXED (param)) {
-          g_print ("%-*.*s | Boxed of type \"%s\"",
-              c3w, c3w,
-              g_type_name (param->value_type), g_type_name (param->value_type));
-        }
-
-        else {
-          g_print ("Unknown type %ld \"%s\"",
-              (glong) param->value_type, g_type_name (param->value_type));
-
-        }
-        break;
-    }
-
-    if (!readable)
-      g_print (" Write only\n");
-    else
-      g_print ("\n");
-
-    g_value_reset (&value);
-  }
-
-  if (0 == num_properties)
-    g_print ("  none\n");
-
-  g_free (property_specs);
-}
-
-//------------------------------------------------------------------------------
-void
-print_column_titles (guint c2w, guint c3w, guint c4w)
-{
-  //////////////////////////////////////////////////////////////////////////
-  //
-  // Create Header for property listing
-  // RWF | --- element name ---- | ---------c3-------- | -----------c4---------- | --> unspecified
-  //
-  //////////////////////////////////////////////////////////////////////////
-  gchar work_string[200];
-  gchar dashes[] = "-----------------------------";
-  gint llen = 0;
-  gint rlen = 0;
-
-      /*--- column 1 - RWC ---*/
-  sprintf (work_string, "<-->|<");
-
-      /*--- column 2 - property name ---*/
-  llen = (c2w - 15) / 2;        /* width of " property name " = 15 */
-  rlen = c2w - 15 - llen;
-
-  strncat (work_string, dashes, llen);
-  strcat (work_string, " property name ");
-  strncat (work_string, dashes, rlen);
-  strcat (work_string, ">|<");
-
-      /*--- column 3 - current value ---*/
-  llen = (c3w - 15) / 2;        /* width of " current value " = 15 */
-  rlen = c3w - 15 - llen;
-
-  strncat (work_string, dashes, llen);
-  strcat (work_string, " current value ");
-  strncat (work_string, dashes, rlen);
-  strcat (work_string, ">|<");
-
-      /*--- column 4 - type ---*/
-  llen = (c4w - 6) / 2;         /* width of " type " = 6 */
-  rlen = c4w - 6 - llen;
-
-  strncat (work_string, dashes, llen);
-  strcat (work_string, " type ");
-  strncat (work_string, dashes, rlen);
-  strcat (work_string, ">|<");
-
-      /*--- column 5 - range and default ---*/
-  strcat (work_string, "----- range and default ----->");
-
-  g_print ("\n%s\n", work_string);
-}
-
-//------------------------------------------------------------------------------
-void
-print_element_info (GstElement * element, guint c2w, guint c3w, guint c4w)
-{
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  // Print element factory and class information as part of each header
-  //
-  /////////////////////////////////////////////////////////////////////////////
-  gchar work_string[100];
-  GstElementFactory *factory = gst_element_get_factory (element);
-
-  sprintf (work_string, "ELEMENT CLASS NAME");
-  g_print ("    | %-*s", c2w, work_string);
-  g_print (" | %-*s", c3w, g_type_name (G_OBJECT_TYPE (element)));
-  g_print (" | %-*s | \n", c4w, "");
-
-
-  sprintf (work_string, "ELEMENT FACTORY NAME");
-  g_print ("    | %-*s", c2w, work_string);
-
-  g_print (" | %-*s", c3w,
-      gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
-  g_print (" | %-*s | \n", c4w,
-      gst_element_factory_get_metadata (factory,
-          GST_ELEMENT_METADATA_LONGNAME));
-
-// "Audio Resampler"   g_print( " | %-*s",      c3w, gst_element_factory_get_longname( gst_element_get_factory( element )) );
-
-
-}
-
-//------------------------------------------------------------------------------
-gchar *
-flags_to_string (GFlagsValue * vals, guint flags)
-{
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  // List individual flags in separate rows
-  //
-  /////////////////////////////////////////////////////////////////////////////
-  GString *s = NULL;
-  guint flags_left, i;
-
-  /* first look for an exact match and count the number of values */
-  for (i = 0; vals[i].value_name != NULL; ++i) {
-    if (vals[i].value == flags)
-      return g_strdup (vals[i].value_nick);
-  }
-
-  s = g_string_new (NULL);
-
-  /* we assume the values are sorted from lowest to highest value */
-  flags_left = flags;
-  while (i > 0) {
-    --i;
-    if (0 != vals[i].value && (flags_left & vals[i].value) == vals[i].value) {
-      if (0 < s->len)
-        g_string_append (s, " | ");
-      g_string_append (s, vals[i].value_nick);
-      flags_left -= vals[i].value;
-      if (0 == flags_left)
-        break;
-    }
-  }
-
-  if (0 == s->len)
-    g_string_assign (s, "(none)");
-
-  return g_string_free (s, FALSE);
-}
-
-
-//------------------------------------------------------------------------------
-void
-print_caps (const GstCaps * caps, const gchar * pfx)
-{
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  // Print each caps value on a separate line
-  //
-  /////////////////////////////////////////////////////////////////////////////
-  guint i;
-
-  g_return_if_fail (caps != NULL);
-
-  if (gst_caps_is_any (caps)) {
-    g_print ("%s | %s", pfx, "ANY                 |                     |");
-    return;
-  }
-  if (gst_caps_is_empty (caps)) {
-    g_print ("%s | %s", pfx, "EMPTY               |                     |");
-    return;
-  }
-
-  for (i = 0; i < gst_caps_get_size (caps); i++) {
-    GstStructure *structure = gst_caps_get_structure (caps, i);
-    g_print ("%s", gst_structure_get_name (structure));
-    gst_structure_foreach (structure, print_field, (gpointer) pfx);
-  }
-}
-
-//------------------------------------------------------------------------------
-gboolean
-print_field (GQuark field, const GValue * value, gpointer pfx)
-{
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  // printing function for individual caps fields
-  //
-  /////////////////////////////////////////////////////////////////////////////
-  gchar *str = gst_value_serialize (value);
-  g_print ("\n%s  %-15.15s - %s",
-      (gchar *) pfx, g_quark_to_string (field), str);
-  g_free (str);
-  return TRUE;
-}
diff --git a/tests/examples/opencv/gst_element_print_properties.h b/tests/examples/opencv/gst_element_print_properties.h
deleted file mode 100644
index 49beee3..0000000
--- a/tests/examples/opencv/gst_element_print_properties.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* GStreamer
- * Copyright (C) 2010 Wesley Miller <wmiller@sdr.com>
- *
- *
- *  gst_element_print_properties(): a tool to inspect GStreamer
- *                                  element properties
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef GST_ELEMENT_PRINT_PROPERTIES_H
-#define GST_ELEMENT_PRINT_PROPERTIES_H
-
-extern void gst_element_print_properties (GstElement * element);
-extern void print_column_titles (guint c2w, guint c3w, guint c4w);
-extern void print_element_info (GstElement * element, guint c2w, guint c3w,
-    guint c4w);
-extern gchar *flags_to_string (GFlagsValue * vals, guint flags);
-extern void print_caps (const GstCaps * caps, const gchar * pfx);
-extern gboolean print_field (GQuark field, const GValue * value, gpointer pfx);
-
-#endif
diff --git a/tests/examples/opencv/gstfacedetect_test.c b/tests/examples/opencv/gstfacedetect_test.c
new file mode 100644
index 0000000..8ccbda0
--- /dev/null
+++ b/tests/examples/opencv/gstfacedetect_test.c
@@ -0,0 +1,238 @@
+/* GStreamer
+ * Copyright (C) 2015 Vanessa Chipirrás <vchipirras6@gmail.com>
+ *
+ *  gstfacedetect_test: gsteramer facedetect plugin demo application,
+ *  part work of Outreachy 2015 project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gst/gst.h>
+
+GstElement *playbin, *pipeline;
+GstElement *v4l2src, *videoscale, *videoconvert_in, *facedetect,
+    *videoconvert_out, *autovideosink;
+static gboolean ctrlvol = FALSE;
+static gboolean silent = FALSE;
+
+static GstBusSyncReply
+bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
+{
+  const GstStructure *structure;
+  const GValue *value;
+  gchar *contents;
+  gint i;
+  guint size = 0;
+
+  /* select msg */
+  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT ||
+      !gst_structure_has_name (gst_message_get_structure (message),
+          "facedetect"))
+    return GST_BUS_PASS;
+
+  /* parse msg structure */
+  structure = gst_message_get_structure (message);
+
+  /* if facedetect is into buffer */
+  if (structure &&
+      strcmp (gst_structure_get_name (structure), "facedetect") == 0) {
+    if (!silent) {
+      /* print message type and structure name */
+      g_print ("Type message, name message: %s{{%s}}\n",
+          gst_message_type_get_name (message->type),
+          gst_structure_get_name (structure));
+
+      /* print msg structure names and type */
+      for (i = 0; i < gst_structure_n_fields (structure); i++) {
+        const gchar *name = gst_structure_nth_field_name (structure, i);
+        GType type = gst_structure_get_field_type (structure, name);
+        g_print ("-Name field, type: %s[%s]\n", name, g_type_name (type));
+      }
+    }
+
+    /* get structure of faces */
+    value = gst_structure_get_value (structure, "faces");
+    /* obtain the contents into the structure */
+    contents = g_strdup_value_contents (value);
+    if (!silent)
+      g_print ("Detected objects: %s\n\n", *(&contents));
+
+    /* list size */
+    size = gst_value_list_get_size (value);
+
+    /* if face is detected, obtain the values X and Y of mouth and of nose. */
+    if (size != 0) {
+      GstState state;
+
+      /* if paused, set to playing */
+      gst_element_get_state (GST_ELEMENT (playbin), &state, NULL,
+          GST_CLOCK_TIME_NONE);
+      if (state != GST_STATE_PLAYING) {
+        gst_element_set_state (GST_ELEMENT (playbin), GST_STATE_PLAYING);
+      }
+
+      if (ctrlvol) {
+        gdouble volume;
+
+        const GValue *faces_value = gst_value_list_get_value (value, 0);
+        const GstStructure *faces_structure =
+            gst_value_get_structure (faces_value);
+        gboolean have_mouth_y =
+            gst_structure_has_field (faces_structure, "mouth->y");
+        gboolean have_mouth_x =
+            gst_structure_has_field (faces_structure, "mouth->x");
+        gboolean have_nose_y =
+            gst_structure_has_field (faces_structure, "nose->y");
+        gboolean have_nose_x =
+            gst_structure_has_field (faces_structure, "nose->x");
+
+        /* get the volume value */
+        g_object_get (G_OBJECT (playbin), "volume", &volume, NULL);
+
+        /* media operation - hide your mouth for down the volume of the video */
+        if (have_mouth_y == 0 && have_mouth_x == 0) {
+          volume = volume - 0.5;
+          if (volume <= 0.5)
+            volume = 0.0;
+          g_object_set (G_OBJECT (playbin), "volume", volume, NULL);
+        }
+        /* media operation - hide your nose for up the volume of the video */
+        if (have_nose_y == 0 && have_nose_x == 0) {
+          volume = volume + 0.5;
+          if (volume >= 9.5)
+            volume = 10.0;
+          g_object_set (G_OBJECT (playbin), "volume", volume, NULL);
+        }
+      }
+      /* if face is not detected */
+    } else {
+      /* media operation - hide your face to stop media play */
+      gst_element_set_state (playbin, GST_STATE_PAUSED);
+    }
+  }
+  gst_message_unref (message);
+  return GST_BUS_DROP;
+}
+
+int
+main (gint argc, gchar ** argv)
+{
+  static GMainLoop *loop;
+  GstCaps *caps;
+  GstBus *bus;
+  gchar *uri;
+
+  GOptionEntry options[] = {
+    {"control-volume", 'c', 0, G_OPTION_ARG_NONE, &ctrlvol,
+        "Control the volume by hiding the nose or mouth", NULL},
+    {"silent", 's', 0, G_OPTION_ARG_NONE, &silent,
+        "Don't output the messages and detected faces structure", NULL},
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+
+  ctx = g_option_context_new ("<video file>\n\nfacedetect test application.");
+  g_option_context_add_main_entries (ctx, options, NULL);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", err->message);
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  if (argc < 2) {
+    fprintf (stderr, "oops, please give a file to play\n");
+    return -1;
+  }
+
+  uri = g_filename_to_uri (argv[1], NULL, NULL);
+  if (!uri) {
+    fprintf (stderr, "failed to create the uri\n");
+    return -1;
+  }
+
+  /* init gst */
+  gst_init (&argc, &argv);
+
+  loop = g_main_loop_new (NULL, FALSE);
+  /* init elements */
+  playbin = gst_element_factory_make ("playbin", "app_playbin");
+  pipeline = gst_pipeline_new ("app_pipeline");
+  v4l2src = gst_element_factory_make ("v4l2src", "app_v4l2src");
+  videoscale = gst_element_factory_make ("videoscale", "app_videoscale");
+  videoconvert_in =
+      gst_element_factory_make ("videoconvert", "app_videoconvert_in");
+  facedetect = gst_element_factory_make ("facedetect", "app_facedetect");
+  videoconvert_out =
+      gst_element_factory_make ("videoconvert", "app_videoconvert_out");
+  autovideosink =
+      gst_element_factory_make ("autovideosink", "app_autovideosink");
+
+  /* check init results */
+  if (!playbin || !pipeline || !v4l2src || !videoscale || !videoconvert_in
+      || !facedetect || !videoconvert_out || !autovideosink)
+    g_error ("ERROR: element init failed.\n");
+
+  /* set values */
+  g_object_set (G_OBJECT (playbin), "uri", uri, NULL);
+
+  /* set caps */
+  caps =
+      gst_caps_from_string
+      ("video/x-raw, format=(string)RGB, width=320, height=240, framerate=(fraction)30/1");
+
+  /* set bus */
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+  gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler, pipeline,
+      NULL);
+  gst_object_unref (bus);
+
+  /* add elements to pipeline */
+  gst_bin_add_many (GST_BIN (pipeline),
+      v4l2src,
+      videoscale,
+      videoconvert_in, facedetect, videoconvert_out, autovideosink, NULL);
+
+  /* negotiate caps */
+  if (!gst_element_link_filtered (v4l2src, videoscale, caps)) {
+    g_printerr ("ERROR:v4l2src -> videoscale caps\n");
+    return 0;
+  }
+  gst_caps_unref (caps);
+
+  /* link elements */
+  gst_element_link_many (videoscale,
+      videoconvert_in, facedetect, videoconvert_out, autovideosink, NULL);
+
+  /* change states */
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  /* start main loop */
+  g_main_loop_run (loop);
+
+  /* clean all */
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (GST_OBJECT (pipeline));
+  gst_element_set_state (playbin, GST_STATE_NULL);
+  gst_object_unref (GST_OBJECT (playbin));
+
+  return 0;
+}
diff --git a/tests/examples/opencv/gsthanddetect_test.c b/tests/examples/opencv/gsthanddetect_test.c
index 05e11ed..1cc9616 100644
--- a/tests/examples/opencv/gsthanddetect_test.c
+++ b/tests/examples/opencv/gsthanddetect_test.c
@@ -4,19 +4,20 @@
  *  gsthanddetect_test: gsteramer handdetect plugin demo application,
  *  part work of GSoc 2012 project
  *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 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.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * 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.
  *
  */
 
@@ -107,8 +108,6 @@
   GstBus *bus;
   gchar *uri;
 
-  const gchar *video_device = "/dev/video0";
-
   if (argc < 2) {
     fprintf (stderr, "oops, please give a file to play\n");
     return -1;
@@ -143,7 +142,6 @@
 
   /* set values */
   g_object_set (G_OBJECT (playbin), "uri", uri, NULL);
-  g_object_set (G_OBJECT (v4l2src), "device", video_device, NULL);
 
   /* set caps */
   caps =
diff --git a/tests/examples/opencv/gstmotioncells_dynamic_test.c b/tests/examples/opencv/gstmotioncells_dynamic_test.c
index ad779cc..46720f8 100644
--- a/tests/examples/opencv/gstmotioncells_dynamic_test.c
+++ b/tests/examples/opencv/gstmotioncells_dynamic_test.c
@@ -1,237 +1,158 @@
 /* GStreamer
  * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
+ * Copyright (C) 2014 Tim-Philipp Müller <tim centricular com>
  *
+ * motioncells_dynamic_test: test to show effect of property changes at runtime
  *
- *  gst_motioncells_dynamic_test(): a test tool what can to do dynamic change properties
+ * 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.
  *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  *
  */
 #include <gst/gst.h>
-#include <glib.h>
-#include <glib/gprintf.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include "gstmotioncells_dynamic_test.h"
-#include "gst_element_print_properties.h"
 
-const guint c2w = 21;           // column 2 width
-const guint c3w = 19;           // column 3 width
-const guint c4w = 23;           // column 4 width
-
-void
-setProperty (GstElement * mcells, char *property, char *prop_value, GType type,
-    GValue * value)
+static void
+print_element_properties (GstElement * element)
 {
+  GParamSpec **pspecs, *pspec;
+  guint num, i;
 
-  switch (type) {
-    case G_TYPE_STRING:
-    {
-      g_object_set (G_OBJECT (mcells), property, prop_value, NULL);
-      break;
+  g_print ("\tProperty : value (type)\n");
+
+  pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (element), &num);
+  for (i = 0; i < num; ++i) {
+    GValue val = G_VALUE_INIT;
+    const gchar *type_name;
+    gchar *s;
+
+    pspec = pspecs[i];
+
+    /* only care about properties we can read and write */
+    if ((pspec->flags & G_PARAM_READWRITE) != G_PARAM_READWRITE)
+      continue;
+    /* and which can be changed after construction */
+    if ((pspec->flags & G_PARAM_CONSTRUCT_ONLY))
+      continue;
+    /* ignore some GstObject properties which are not interesting */
+    if (!strcmp (pspec->name, "name") || !strcmp (pspec->name, "parent"))
+      continue;
+    /* ignore properties we can't change in a meaningful way */
+    if (G_IS_PARAM_SPEC_BOXED (pspec) || G_IS_PARAM_SPEC_OBJECT (pspec)
+        || G_IS_PARAM_SPEC_POINTER (pspec))
+      continue;
+
+    g_value_init (&val, G_PARAM_SPEC_VALUE_TYPE (pspec));
+    g_object_get_property (G_OBJECT (element), pspec->name, &val);
+    s = gst_value_serialize (&val);
+
+    if (G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING) {
+      type_name = "string";
+      g_free (s);
+      g_object_get (G_OBJECT (element), pspec->name, &s, NULL);
+      if (s == NULL)
+        s = g_strdup ("(null)");
+    } else {
+      type_name = g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec));
     }
-    case G_TYPE_BOOLEAN:
-    {
-      gboolean flag = (g_strcmp0 (prop_value, "true") == 0) ? TRUE : FALSE;
-      g_object_set (G_OBJECT (mcells), property, flag, NULL);
-      break;
-    }
-    case G_TYPE_ULONG:
-    {
-      unsigned long ulongval = strtoul (prop_value, NULL, 0);
-      g_object_set (G_OBJECT (mcells), property, ulongval, NULL);
-      break;
-    }
-    case G_TYPE_LONG:
-    {
-      long longval = atol (prop_value);
-      g_object_set (G_OBJECT (mcells), property, longval, NULL);
-      break;
-    }
-    case G_TYPE_UINT:
-    {
-      unsigned int uintval = atoi (prop_value);
-      g_object_set (G_OBJECT (mcells), property, uintval, NULL);
-      break;
-    }
-    case G_TYPE_INT:
-    {
-      int intval = atoi (prop_value);
-      g_object_set (G_OBJECT (mcells), property, intval, NULL);
-      break;
-    }
-    case G_TYPE_UINT64:
-    {
-      guint64 guint64val = atoi (prop_value);
-      g_object_set (G_OBJECT (mcells), property, guint64val, NULL);
-      break;
-    }
-    case G_TYPE_INT64:
-    {
-      gint64 gint64val = atoi (prop_value);
-      g_object_set (G_OBJECT (mcells), property, gint64val, NULL);
-      break;
-    }
-    case G_TYPE_FLOAT:
-    {
-      float floatval = atof (prop_value);
-      g_object_set (G_OBJECT (mcells), property, floatval, NULL);
-      break;
-    }
-    case G_TYPE_DOUBLE:
-    {
-      double doubleval = strtod (prop_value, NULL);
-      g_object_set (G_OBJECT (mcells), property, doubleval, NULL);
-      break;
-    }
-    default:
-      fprintf (stderr, "You gave me something wrong type of data !!! \n");
-      break;
+
+    g_print ("\t%s: %s (%s)\n", pspec->name, s, type_name);
+    g_free (s);
+    g_value_unset (&val);
   }
+
+  g_free (pspecs);
 }
 
-// gst-launch v4l2src ! videoscale ! videorate ! capsfilter "caps=video/x-raw-yuv,width=320,height=240,framerate=10/1" ! videoconvert ! motioncells ! videoconvert ! xvimagesink
 int
 main (int argc, char *argv[])
 {
-  GstElement *pipeline, *source, *videor, *videos, *decodebin, *capsf,
-      *colorsp0, *colorsp1, *mcells, *sink;
+  GstElement *pipeline, *source, *videor, *capsf;
+  GstElement *colorsp0, *colorsp1, *mcells, *sink;
   GstCaps *caps;
-  gchar property[20];
-  gchar prop_value[100];
-  GParamSpec **property_specs;
-  guint num_properties, i;
-  GValue value = { 0, };
-  gboolean found_property = FALSE;
-  int ret;
 
-  // Initialisation //
   gst_init (&argc, &argv);
-  fprintf (stderr, "Usage: %s test or rtsp rtsp://your/cam/address\n", argv[0]);
-  // Create gstreamer elements //
-  pipeline = gst_pipeline_new ("moitoncells-pipeline");
-  if (argc == 2 && (g_strcmp0 (argv[1], "test") == 0))
-    source = gst_element_factory_make ("videotestsrc", "vidsrc");
-  else if (argc == 3 && (g_strcmp0 (argv[1], "rtsp") == 0))
-    source = gst_element_factory_make ("rtspsrc", "rtspsrc0");
-  else if (argc == 1)
-    source = gst_element_factory_make ("v4l2src", "v4l2");
-  else {
-    fprintf (stderr, "Usage: %s test or rtsp rtsp://your/cam/address\n",
-        argv[0]);
+
+  pipeline = gst_pipeline_new ("motioncells-pipeline");
+  if (argc == 2 && strcmp (argv[1], "test") == 0) {
+    source = gst_element_factory_make ("videotestsrc", NULL);
+    gst_util_set_object_arg (G_OBJECT (source), "pattern", "ball");
+  } else if (argc == 1 || strncmp (argv[1], "v4l", 3) == 0) {
+    source = gst_element_factory_make ("v4l2src", NULL);
+  } else {
+    g_printerr ("Usage: %s [v4l2|test]\n", argv[0]);
     exit (-1);
   }
 
-  videor = gst_element_factory_make ("videorate", "videor");
-  videos = gst_element_factory_make ("videoscale", "videos");
-  capsf = gst_element_factory_make ("capsfilter", "capsf");
-  if (argc == 3 && (g_strcmp0 (argv[1], "rtsp") == 0))
-    decodebin = gst_element_factory_make ("decodebin", "decode");
-  else
-    decodebin = NULL;
-  colorsp0 = gst_element_factory_make ("videoconvert", "colorspace0");
-  mcells = gst_element_factory_make ("motioncells", "mcells");
-  colorsp1 = gst_element_factory_make ("videoconvert", "colorspace1");
-  sink = gst_element_factory_make ("xvimagesink", "xv-image-sink");
-  if (!pipeline || !source || !videor || !videos || !capsf || !colorsp0
+  videor = gst_element_factory_make ("videorate", NULL);
+  capsf = gst_element_factory_make ("capsfilter", NULL);
+  colorsp0 = gst_element_factory_make ("videoconvert", NULL);
+  mcells = gst_element_factory_make ("motioncells", NULL);
+  colorsp1 = gst_element_factory_make ("videoconvert", NULL);
+  sink = gst_element_factory_make ("autovideosink", "videosink");
+  if (!pipeline || !source || !videor || !capsf || !colorsp0
       || !mcells || !colorsp1 || !sink) {
     g_printerr ("One element could not be created. Exiting.\n");
     return -1;
   }
-  if (argc == 3 && (g_strcmp0 (argv[1], "rtsp") == 0) && !decodebin) {
-    g_printerr ("Decodebin could not be created. Exiting.\n");
-    return -1;
-  }
-  if ((g_strcmp0 (argv[1], "rtsp") == 0)) {
-    g_object_set (G_OBJECT (source), "location", argv[2], NULL);
-    g_object_set (G_OBJECT (source), "latency", 1000, NULL);
-  } else if ((g_strcmp0 (argv[1], "test") == 0))
-    g_object_set (G_OBJECT (source), "pattern", 18, NULL);
 
-  caps =
-      gst_caps_from_string
-      ("video/x-raw-yuv,width=320,height=240,framerate=10/1");
+  caps = gst_caps_from_string ("video/x-raw,framerate=10/1");
   g_object_set (G_OBJECT (capsf), "caps", caps, NULL);
-  //g_object_set (G_OBJECT (sink), "sync",FALSE,NULL);
 
-  if (argc > 1) {
-    if (g_strcmp0 (argv[1], "test") == 0) {
-      gst_bin_add_many (GST_BIN (pipeline),
-          source, videor, videos, capsf, colorsp0, mcells, colorsp1, sink,
-          NULL);
+  gst_bin_add_many (GST_BIN (pipeline), source, videor, capsf, colorsp0, mcells,
+      colorsp1, sink, NULL);
 
-      gst_element_link_many (source, videor, videos, capsf, colorsp0, mcells,
-          colorsp1, sink, NULL);
-    } else if (g_strcmp0 (argv[1], "rtsp") == 0) {
-      gst_bin_add_many (GST_BIN (pipeline),
-          source, videor, videos, capsf, decodebin, colorsp0, mcells, colorsp1,
-          sink, NULL);
+  gst_element_link_many (source, videor, capsf, colorsp0, mcells, colorsp1,
+      sink, NULL);
 
-      gst_element_link_many (source, videor, videos, capsf, decodebin, colorsp0,
-          mcells, colorsp1, sink, NULL);
-    }
-  } else {                      //default
-    gst_bin_add_many (GST_BIN (pipeline),
-        source, videor, videos, capsf, colorsp0, mcells, colorsp1, sink, NULL);
-
-    gst_element_link_many (source, videor, videos, capsf, colorsp0, mcells,
-        colorsp1, sink, NULL);
-  }
-
-  g_print ("Now playing\n");
+  g_print ("Going to playing..\n");
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
-  g_print ("Running...\n");
-  g_print ("You can use these properties : \n");
-  gst_element_print_properties (mcells);
-  g_print ("change property here: example  some_property property_value \n");
-  g_print ("Quit with 'q' \n");
-  //get all properties
-  property_specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (mcells),
-      &num_properties);
+
+  g_print ("You can use these properties: \n\n");
+
+  print_element_properties (mcells);
+
+  g_print ("\nSee 'gst-inspect-1.0 motioncells' for all the details.\n");
+  g_print ("Change properties like this: propertyname=value\n");
+  g_print ("Quit with 'q'\n");
+
+  /* Read command line input */
   while (TRUE) {
-    found_property = FALSE;
-    i = 0;
+    gchar *prop_name, *prop_value;
+    gchar input_buf[1024];
 
-    ret = scanf ("%19s %99s", property, prop_value);
-
-    if (ret < 1)
-      g_printerr ("Error parsing command.\n");
-
-    if ((g_strcmp0 (property, "q") == 0) || (g_strcmp0 (prop_value, "q") == 0))
+    memset (input_buf, 0, sizeof (input_buf));
+    if (fgets (input_buf, sizeof (input_buf), stdin) == NULL)
       break;
-    printf ("property: %s -> value: %s \n", property, prop_value);
-    for (i = 0; i < num_properties; i++) {
-      GParamSpec *param = property_specs[i];
-      g_value_init (&value, param->value_type);
-      g_object_get_property (G_OBJECT (mcells), param->name, &value);
-      //fprintf(stderr,"property: %s and param name: %s and property value: %s \n",property,param->name,prop_value);
-      if ((g_strcmp0 (property, param->name) == 0) && !found_property &&
-          (g_strcmp0 (prop_value, "") != 0)
-          && (g_strcmp0 (prop_value, "\"") != 0)
-          && (g_strcmp0 (prop_value, "\'") != 0)) {
-        GType type;
-        found_property = TRUE;
-        type = param->value_type;
-        setProperty (mcells, property, prop_value, type, &value);
-      }
-      g_value_unset (&value);
-      if (found_property)
-        break;
+
+    /* strip off trailing newline */
+    g_strdelimit (input_buf, "\n", '\0');
+
+    if (strcmp (input_buf, "q") == 0 || strcmp (input_buf, "quit") == 0)
+      break;
+
+    prop_value = strchr (input_buf, '=');
+    if (prop_value == NULL) {
+      g_printerr ("Please enter either 'property=value' or 'quit'.\n");
+      continue;
     }
+    *prop_value++ = '\0';
+    prop_name = input_buf;
+
+    gst_util_set_object_arg (G_OBJECT (mcells), prop_name, prop_value);
   }
 
   gst_element_set_state (pipeline, GST_STATE_NULL);
diff --git a/tests/examples/opencv/gstmotioncells_dynamic_test.h b/tests/examples/opencv/gstmotioncells_dynamic_test.h
deleted file mode 100644
index 6760c66..0000000
--- a/tests/examples/opencv/gstmotioncells_dynamic_test.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* GStreamer
- * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
- *
- *
- *  gst_motioncells_dynamic_test(): a test tool what can to do dynamic change properties
- *
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef GST_MOTIONCELLS_DYNAMIC_TEST_H
-#define GST_MOTIONCELLS_DYNAMIC_TEST_H
-
-extern void setProperty (GstElement * mcells, char *property, char *prop_value,
-    GType type, GValue * value);
-
-
-#endif
diff --git a/tests/examples/playout.c b/tests/examples/playout.c
new file mode 100644
index 0000000..c85509a
--- /dev/null
+++ b/tests/examples/playout.c
@@ -0,0 +1,1108 @@
+/*  Copyright (C) 2015 Centricular Ltd
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gst/gst.h>
+#include <gst/video/gstvideosink.h>
+
+#define STR_HELPER(x) #x
+#define STR(x) STR_HELPER(x)
+
+/* Change this to set the output resolution */
+#define OUTPUT_VIDEO_WIDTH  1280
+#define OUTPUT_VIDEO_HEIGHT 720
+
+/* Video and audio caps outputted by the mixers */
+#define RAW_AUDIO_CAPS_STR "audio/x-raw, format=(string)S16LE, " \
+"layout=(string)interleaved, rate=(int)44100, channels=(int)2, " \
+"channel-mask=(bitmask)0x03"
+
+#define RAW_VIDEO_CAPS_STR "video/x-raw, width=(int)" STR(OUTPUT_VIDEO_WIDTH) \
+", height=(int)" STR(OUTPUT_VIDEO_HEIGHT) ", framerate=(fraction)25/1, " \
+"format=I420, pixel-aspect-ratio=(fraction)1/1, " \
+"interlace-mode=(string)progressive"
+
+GST_DEBUG_CATEGORY_STATIC (playout);
+#define GST_CAT_DEFAULT playout
+
+typedef enum
+{
+  PLAYOUT_APP_STATE_READY,      /* Newly created */
+  PLAYOUT_APP_STATE_PLAYING,    /* Playing an item */
+  PLAYOUT_APP_STATE_EOS         /* Finished playing, all items EOS */
+} PlayoutAppState;
+
+typedef struct
+{
+  /* Application state */
+  PlayoutAppState state;
+
+  /* An array of PlayoutItems that will be played in sequence */
+  GPtrArray *play_queue;
+  /* Index of the currently-playing item */
+  gint play_queue_current;
+  /* Lock access to the play queue */
+  GMutex play_queue_lock;
+
+  GMainLoop *main_loop;
+
+  /* Pipeline */
+  GstElement *pipeline;
+
+  /* Output */
+  GstElement *video_mixer;
+  GstElement *video_sink;
+  GstVideoRectangle video_orect;        /* w/h/x/y of the output */
+
+  GstElement *audio_mixer;
+  GstElement *audio_sink;
+
+  /* The duration of all items that have been played in ns.
+   * Only updates when a new item is activated. */
+  guint64 elapsed_duration;
+} PlayoutApp;
+
+typedef enum
+{
+  PLAYOUT_ITEM_STATE_NEW,       /* Newly created */
+  PLAYOUT_ITEM_STATE_PREPARED,  /* Prepared and ready to activate */
+  PLAYOUT_ITEM_STATE_ACTIVATED, /* Activated */
+  PLAYOUT_ITEM_STATE_FIRST_VBUFFER,     /* First video buffer has gone through */
+  PLAYOUT_ITEM_STATE_AGGREGATING,       /* Audio & video buffers are aggregating */
+  PLAYOUT_ITEM_STATE_EOS        /* At least one pad is EOS */
+} PlayoutItemState;
+
+typedef struct
+{
+  PlayoutApp *app;
+  PlayoutItemState state;
+
+  gchar *fn;
+
+  GstElement *decoder;          /* bin with uridecodebin + converters */
+
+  /* We just use the first audio stream and ignore the rest (if there is audio) */
+  GstPad *audio_pad;            /* decoder bin audio src ghostpad */
+  GstPad *video_pad;            /* decoder bin video src ghostpad */
+  GstVideoRectangle video_irect;        /* input w/h/x/y of the item */
+  GstVideoRectangle video_orect;        /* output w/h/x/y of the item */
+
+  /* When this item has finished preparing and all pads have been connected to
+   * mixers, the pads will be blocked till it's this item's turn to be played */
+  gulong audio_pad_probe_block_id;
+  gulong video_pad_probe_block_id;
+
+  /* The current running time of this item; updated with every audio buffer if
+   * this item has audio; otherwise it's updated withe very video buffer */
+  guint64 running_time;
+} PlayoutItem;
+
+static PlayoutApp *playout_app_new (void);
+static void playout_app_free (PlayoutApp * app);
+static PlayoutItem *playout_item_new (PlayoutApp * app, const gchar * fn);
+static void playout_item_free (PlayoutItem * item);
+
+static void playout_app_add_item (PlayoutApp * app, const gchar * fn);
+static gboolean playout_app_prepare_item (PlayoutItem * item);
+static gboolean playout_app_activate_item (PlayoutItem * item);
+static gboolean playout_app_activate_next_item (PlayoutApp * app);
+static gboolean playout_app_activate_next_item_early (PlayoutApp * app);
+static PlayoutItem *playout_app_get_current_item (PlayoutApp * app);
+static gboolean playout_app_remove_item (PlayoutItem * item);
+
+static void
+playout_app_add_audio_sink (PlayoutApp * app)
+{
+  GstElement *audio_resample, *audio_conv, *queue;
+
+  /* audiomixer doesn't do conversion yet, so we don't need an output capsfilter
+   * for this branch. The output format is decided by the sink pads, which all
+   * have to have the same format. */
+  app->audio_mixer = gst_element_factory_make ("audiomixer", "audio_mixer");
+  audio_conv = gst_element_factory_make ("audioconvert", "mixer_audioconvert");
+  audio_resample = gst_element_factory_make ("audioresample",
+      "audio_mixer_audioresample");
+  queue = gst_element_factory_make ("queue", "asink_queue");
+  app->audio_sink = gst_element_factory_make ("autoaudiosink", NULL);
+  g_object_set (app->audio_sink, "async-handling", TRUE, NULL);
+  gst_bin_add_many (GST_BIN (app->pipeline), app->audio_mixer, audio_conv,
+      audio_resample, queue, app->audio_sink, NULL);
+  gst_element_link_many (app->audio_mixer, audio_conv, audio_resample,
+      queue, app->audio_sink, NULL);
+
+  if (!gst_element_sync_state_with_parent (app->audio_mixer) ||
+      !gst_element_sync_state_with_parent (audio_conv) ||
+      !gst_element_sync_state_with_parent (audio_resample) ||
+      !gst_element_sync_state_with_parent (queue) ||
+      !gst_element_sync_state_with_parent (app->audio_sink))
+    GST_ERROR ("app: unable to sync audio mixer + sink state with pipeline");
+}
+
+static PlayoutApp *
+playout_app_new (void)
+{
+  GstElement *video_capsfilter, *queue;
+  GstCaps *caps;
+  PlayoutApp *app;
+
+  app = g_new0 (PlayoutApp, 1);
+
+  app->state = PLAYOUT_APP_STATE_READY;
+
+  app->play_queue =
+      g_ptr_array_new_with_free_func ((GDestroyNotify) playout_item_free);
+  app->play_queue_current = -1;
+  g_mutex_init (&app->play_queue_lock);
+
+  app->main_loop = g_main_loop_new (NULL, FALSE);
+
+  app->pipeline = gst_pipeline_new ("pipeline");
+
+  /* It's best to set a caps filter for the video output format */
+  app->video_orect.w = OUTPUT_VIDEO_WIDTH;
+  app->video_orect.h = OUTPUT_VIDEO_HEIGHT;
+  app->video_orect.x = 0;
+  app->video_orect.y = 0;
+  app->video_mixer = gst_element_factory_make ("compositor", "video_mixer");
+  /* Set the background as black; faster while compositing, and allows us to
+   * rescale videos with a different aspect ratio than the output in a way that
+   * adds black borders automatically */
+  g_object_set (app->video_mixer, "background", 1, NULL);
+  queue = gst_element_factory_make ("queue", "vsink_queue");
+  app->video_sink = gst_element_factory_make ("autovideosink", NULL);
+  g_object_set (app->video_sink, "async-handling", TRUE, NULL);
+  video_capsfilter = gst_element_factory_make ("capsfilter",
+      "video_mixer_capsfilter");
+  caps = gst_caps_from_string (RAW_VIDEO_CAPS_STR);
+  g_object_set (video_capsfilter, "caps", caps, NULL);
+  gst_caps_unref (caps);
+  gst_bin_add_many (GST_BIN (app->pipeline), app->video_mixer, video_capsfilter,
+      queue, app->video_sink, NULL);
+  gst_element_link_many (app->video_mixer, video_capsfilter, queue,
+      app->video_sink, NULL);
+
+  return app;
+}
+
+static void
+playout_app_free (PlayoutApp * app)
+{
+  GST_DEBUG ("Freeing app");
+  g_ptr_array_unref (app->play_queue);
+  g_main_loop_unref (app->main_loop);
+  gst_element_set_state (app->pipeline, GST_STATE_NULL);
+  gst_object_unref (app->pipeline);
+  g_free (app);
+}
+
+static void
+playout_app_eos (GstBus * bus, GstMessage * msg, PlayoutApp * app)
+{
+  g_print ("All streams EOS, exiting...\n");
+  g_main_loop_quit (app->main_loop);
+}
+
+static PlayoutItem *
+playout_item_new (PlayoutApp * app, const gchar * fn)
+{
+  PlayoutItem *item = g_new0 (PlayoutItem, 1);
+
+  item->app = app;
+  item->state = PLAYOUT_ITEM_STATE_NEW;
+  item->fn = g_strdup (fn);
+
+  return item;
+}
+
+/* Unlink and release the pad */
+static gboolean
+playout_remove_pad (GstPad * srcpad)
+{
+  GstPad *sinkpad;
+  GstElement *mixer;
+
+  sinkpad = gst_pad_get_peer (srcpad);
+  if (!sinkpad)
+    return FALSE;
+  if (!gst_pad_unlink (srcpad, sinkpad))
+    return FALSE;
+  mixer = gst_pad_get_parent_element (sinkpad);
+  gst_element_release_request_pad (mixer, sinkpad);
+  GST_DEBUG ("Released some pad");
+
+  gst_object_unref (sinkpad);
+  gst_object_unref (mixer);
+  return FALSE;
+}
+
+static GstPadProbeReturn
+playout_item_pad_probe_blocked (GstPad * srcpad, GstPadProbeInfo * info,
+    PlayoutItem * item)
+{
+  if (srcpad == item->audio_pad) {
+    item->audio_pad_probe_block_id = GST_PAD_PROBE_INFO_ID (info);
+  } else if (srcpad == item->video_pad) {
+    item->video_pad_probe_block_id = GST_PAD_PROBE_INFO_ID (info);
+  } else {
+    g_assert_not_reached ();
+  }
+
+  return GST_PAD_PROBE_OK;
+}
+
+static GstPadProbeReturn
+playout_item_pad_probe_pad_running_time (GstPad * srcpad,
+    GstPadProbeInfo * info, PlayoutItem * item)
+{
+  GstEvent *event;
+  GstBuffer *buffer;
+  guint64 running_time;
+  const GstSegment *segment;
+
+  buffer = GST_PAD_PROBE_INFO_BUFFER (info);
+  event = gst_pad_get_sticky_event (srcpad, GST_EVENT_SEGMENT, 0);
+  GST_TRACE ("%s: pad sticky event: %" GST_PTR_FORMAT, item->fn, event);
+
+  if (event) {
+    gst_event_parse_segment (event, &segment);
+    gst_event_unref (event);
+    running_time = gst_segment_to_running_time (segment, GST_FORMAT_TIME,
+        GST_BUFFER_PTS (buffer));
+  } else {
+    GST_WARNING ("%s: unable to parse event for segment; falling back to pts. "
+        "Output will probably have glitches.", item->fn);
+    running_time = GST_BUFFER_PTS (buffer);
+  }
+
+  item->running_time = running_time + GST_BUFFER_DURATION (buffer);
+  GST_TRACE ("%s: running time is %" G_GUINT64_FORMAT ", duration is %"
+      G_GUINT64_FORMAT, item->fn, item->running_time,
+      GST_BUFFER_DURATION (buffer));
+
+  return GST_PAD_PROBE_PASS;
+}
+
+static GstPadProbeReturn
+playout_item_pad_probe_video_pad_eos_on_buffer (GstPad * srcpad,
+    GstPadProbeInfo * info, PlayoutItem * prev_item)
+{
+  PlayoutItem *current_item;
+
+  current_item = playout_app_get_current_item (prev_item->app);
+
+  if (!current_item)
+    return GST_PAD_PROBE_REMOVE;
+
+  /* Step through the item's states as buffers pass through. The first buffer
+   * will be taken by the video_mixer, and kept till the audio running time
+   * matches the video buffer running time. When the second buffer gets through,
+   * we know that this pad has begun aggregating. */
+  switch (current_item->state) {
+    case PLAYOUT_ITEM_STATE_NEW:
+    case PLAYOUT_ITEM_STATE_PREPARED:
+      GST_DEBUG ("%s: new/prepared", current_item->fn);
+      break;
+    case PLAYOUT_ITEM_STATE_ACTIVATED:
+      GST_DEBUG ("%s: activated -> first vbuffer", current_item->fn);
+      current_item->state = PLAYOUT_ITEM_STATE_FIRST_VBUFFER;
+      break;
+    case PLAYOUT_ITEM_STATE_FIRST_VBUFFER:
+      GST_DEBUG ("%s: first vbuffer -> aggregating", current_item->fn);
+      current_item->state = PLAYOUT_ITEM_STATE_AGGREGATING;
+      gst_pad_remove_probe (srcpad, GST_PAD_PROBE_INFO_ID (info));
+      /* Item is aggregating, release the previous item's video pad */
+      goto release;
+      break;
+    case PLAYOUT_ITEM_STATE_EOS:
+      return GST_PAD_PROBE_REMOVE;
+    default:
+      g_assert_not_reached ();
+  }
+
+  return GST_PAD_PROBE_PASS;
+
+release:
+  {
+    playout_remove_pad (prev_item->video_pad);
+    GST_DEBUG ("%s: released video pad", prev_item->fn);
+    prev_item->video_pad = NULL;
+
+    /* If there's no audio pad, or if the audio pad is already EOS, we can
+     * remove this item from the queue which will free it. Need to free the
+     * item from the main thread because it causes the item's decoder bin
+     * to be removed from the pipeline, which cannot be done in the
+     * streaming thread */
+    if (prev_item->audio_pad == NULL) {
+      GST_DEBUG ("%s: queued item removal (last pad is video)", prev_item->fn);
+      g_main_context_invoke (NULL, (GSourceFunc) playout_app_remove_item,
+          prev_item);
+    }
+
+    /* Pad probe has already been removed above */
+    return GST_PAD_PROBE_PASS;
+  }
+}
+
+/* This is called on EOS for both item->audio_pad and item->video_pad
+ *
+ * FIXME: Add locking. Both pads could go EOS at the exact same time. */
+static GstPadProbeReturn
+playout_item_pad_probe_event (GstPad * srcpad, GstPadProbeInfo * info,
+    PlayoutItem * item)
+{
+  GstEventType type;
+  gboolean ret = TRUE;
+  GstPadProbeReturn probe_ret = GST_PAD_PROBE_DROP;
+
+  type = GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info));
+  if (type != GST_EVENT_EOS)
+    return GST_PAD_PROBE_PASS;
+
+  /* We might get two EOSes on this pad if we send an artificial EOS. Remove
+   * the probe so this is only called once for each pad */
+  gst_pad_remove_probe (srcpad, GST_PAD_PROBE_INFO_ID (info));
+
+  GST_DEBUG ("%s: recvd some EOS", item->fn);
+
+  if (item->state != PLAYOUT_ITEM_STATE_EOS) {
+    /* We have more than one pad per item (video + audio item), and this is the
+     * first pad to go EOS or we have only one pad per item, and that pad has
+     * gone EOS. For the first case, the other pad might still have some buffers
+     * to output before going EOS, but we need to activate the next item and
+     * start outputting buffers from that immediately. */
+
+    /* Update the total elapsed duration from the item's current running time */
+    item->app->elapsed_duration += item->running_time;
+
+    GST_DEBUG ("%s: activating next item", item->fn);
+    /* Activate the next item if and only if this is the first pad to go EOS */
+    ret = playout_app_activate_next_item (item->app);
+    if (!ret) {
+      GST_DEBUG ("%s: App is going EOS", item->fn);
+      item->state = PLAYOUT_ITEM_STATE_EOS;
+      item->app->state = PLAYOUT_APP_STATE_EOS;
+      /* If we couldn't activate the next item, pass the EOS event onward,
+       * ending the stream */
+      probe_ret = GST_PAD_PROBE_PASS;
+    }
+  }
+
+  g_assert (srcpad != NULL);
+
+  if (srcpad == item->audio_pad) {
+    GST_DEBUG ("%s: audio pad was EOS", item->fn);
+
+    if (item->app->state != PLAYOUT_APP_STATE_EOS) {
+      /* While activating the next item, we ensure that there's no offset mismatch
+       * which would cause audiomixer to output silence, so we can release the
+       * previous item's audio request pad here. We also unlink the audio pad;
+       * nothing else is needed from it */
+      playout_remove_pad (srcpad);
+      GST_DEBUG ("%s: released audio pad", item->fn);
+
+      /* If there's no video pad, or if the video pad is already EOS, we can
+       * remove this item from the queue which will free it. Need to free the
+       * item from the main thread because it causes the item's decoder bin
+       * to be removed from the pipeline, which cannot be done in the
+       * streaming thread */
+      if (item->video_pad == NULL) {
+        GST_DEBUG ("%s: queued item removal (last pad is audio)", item->fn);
+        g_main_context_invoke (NULL, (GSourceFunc) playout_app_remove_item,
+            item);
+      }
+    } else {
+      /* If this is the last pad on audio_mixer, let the EOS go through
+       * before unlinking/releasing the pad. This should happen within 500ms. */
+      g_timeout_add (500, (GSourceFunc) playout_remove_pad, srcpad);
+      GST_DEBUG ("%s: queued audio pad release", item->fn);
+
+      if (item->video_pad == NULL) {
+        /* Unlike above, we need to wait till the pad is removed before removing
+         * the item from the app, so we queue it for 100ms afterwards */
+        GST_DEBUG ("%s: queued last item removal (last pad is audio)",
+            item->fn);
+        g_timeout_add (600, (GSourceFunc) playout_app_remove_item, item);
+      }
+    }
+    item->audio_pad = NULL;
+  } else if (srcpad == item->video_pad) {
+
+    GST_DEBUG ("%s: video pad was EOS", item->fn);
+
+    if (item->audio_pad != NULL)
+      GST_WARNING ("%s: video pad went EOS before audio pad! "
+          "There will be audio/video glitches while switching.", item->fn);
+
+    if (item->app->state != PLAYOUT_APP_STATE_EOS) {
+      PlayoutItem *next_item;
+
+      next_item = playout_app_get_current_item (item->app);
+      GST_DEBUG ("%s: next item is %s, %i/%i", item->fn, next_item->fn,
+          next_item->state, PLAYOUT_ITEM_STATE_ACTIVATED);
+
+      g_assert (next_item != NULL);
+      /* If there's another item being activated, release this video pad only
+       * when the next item's video pad starts being aggregated; that happens
+       * when this probe receives its 2nd buffer from the next item */
+      gst_pad_add_probe (next_item->video_pad, GST_PAD_PROBE_TYPE_BUFFER,
+          (GstPadProbeCallback) playout_item_pad_probe_video_pad_eos_on_buffer,
+          item, NULL);
+    } else {
+      /* If this is the last pad on video_mixer, let the EOS go through
+       * before unlinking/releasing the pad. This should happen within 500ms. */
+      g_timeout_add (500, (GSourceFunc) playout_remove_pad, srcpad);
+      GST_DEBUG ("%s: queued video pad release", item->fn);
+      item->video_pad = NULL;
+    }
+    probe_ret = GST_PAD_PROBE_PASS;
+  } else {
+    g_assert_not_reached ();
+  }
+
+  item->state = PLAYOUT_ITEM_STATE_EOS;
+
+  /* NOTE: If the srcpad has been unlinked, the return value is useless */
+  return probe_ret;
+}
+
+/* On the "pad-added" signal of uridecodebin, add converters and connect to
+ * audio/video mixers */
+static void
+playout_item_new_pad (GstElement * uridecodebin, GstPad * pad,
+    PlayoutItem * item)
+{
+  GstStructure *s;
+  GstCaps *caps;
+  GstPad *sinkpad, *srcpad;
+  GstElement *queue;
+  GstPadProbeType block_probe_type;
+
+  caps = gst_pad_get_current_caps (pad);
+  s = gst_caps_get_structure (caps, 0);
+  GST_DEBUG ("%s: new pad: %p, caps: %s", item->fn, pad,
+      gst_structure_get_name (s));
+
+  if (gst_structure_has_name (s, "audio/x-raw")) {
+    if (item->audio_pad != NULL)
+      /* Ignore all audio pads after the first one */
+      goto out;
+    goto audio;
+  } else if (gst_structure_has_name (s, "video/x-raw")) {
+    if (item->video_pad != NULL)
+      /* Ignore all video pads after the first one */
+      goto out;
+    goto video;
+  } else {
+    goto out;
+  }
+
+audio:
+  {
+    GstCaps *wanted_caps;
+    GstElement *audioconvert, *audioresample, *capsfilter;
+
+    /* Audio pad found; add audio mixer and audio sink to the pipeline.
+     * NOTE: If any items after this do not have an audio pad, the pipeline will
+     * mess up because the audio sink will not receive any data. */
+    if (item->app->audio_sink == NULL)
+      playout_app_add_audio_sink (item->app);
+
+    wanted_caps = gst_caps_from_string (RAW_AUDIO_CAPS_STR);
+
+    if (!gst_caps_is_equal (caps, wanted_caps)) {
+      GST_DEBUG ("%s: converting audio caps", item->fn);
+      /* We need to convert the audio to the wanted format because
+       * audiomixer doesn't do format conversion */
+      audioresample = gst_element_factory_make ("audioresample", NULL);
+      audioconvert = gst_element_factory_make ("audioconvert", NULL);
+      capsfilter = gst_element_factory_make ("capsfilter", NULL);
+      g_object_set (capsfilter, "caps", wanted_caps, NULL);
+      queue = gst_element_factory_make ("queue", NULL);
+      gst_bin_add_many (GST_BIN (item->decoder), audioresample, audioconvert,
+          capsfilter, queue, NULL);
+
+      sinkpad = gst_element_get_static_pad (audioresample, "sink");
+      gst_pad_link (pad, sinkpad);
+      gst_object_unref (sinkpad);
+      gst_element_link_many (audioresample, audioconvert, capsfilter, queue,
+          NULL);
+      srcpad = gst_element_get_static_pad (queue, "src");
+
+      if (!gst_element_sync_state_with_parent (audioresample) ||
+          !gst_element_sync_state_with_parent (audioconvert) ||
+          !gst_element_sync_state_with_parent (capsfilter) ||
+          !gst_element_sync_state_with_parent (queue)) {
+        GST_ERROR ("%s: unable to sync audio converter state with decoder",
+            item->fn);
+        goto out;
+      }
+    } else {
+      queue = gst_element_factory_make ("queue", NULL);
+      gst_bin_add (GST_BIN (item->decoder), queue);
+      sinkpad = gst_element_get_static_pad (queue, "sink");
+      gst_pad_link (pad, sinkpad);
+      gst_object_unref (sinkpad);
+
+      srcpad = gst_element_get_static_pad (queue, "src");
+
+      if (!gst_element_sync_state_with_parent (queue)) {
+        GST_ERROR ("%s: unable to sync audio queue state with decoder",
+            item->fn);
+        goto out;
+      }
+    }
+    gst_caps_unref (wanted_caps);
+
+    /* Convert the audioconvert src pad to a ghostpad on the bin */
+    item->audio_pad = gst_ghost_pad_new (NULL, srcpad);
+    gst_pad_set_active (item->audio_pad, TRUE);
+    gst_element_add_pad (item->decoder, item->audio_pad);
+    gst_object_unref (srcpad);
+
+    srcpad = item->audio_pad;
+    GST_DEBUG ("%s: created audio pad", item->fn);
+    goto done;
+  }
+
+video:
+  {
+    if (!gst_structure_get_int (s, "width", &item->video_irect.w) ||
+        !gst_structure_get_int (s, "height", &item->video_irect.h))
+      GST_WARNING ("%s: unable to set width/height from caps", item->fn);
+    item->video_irect.x = item->video_irect.y = 0;
+
+    queue = gst_element_factory_make ("queue", "video-decoder-queue-%u");
+    gst_bin_add (GST_BIN (item->decoder), queue);
+
+    if (!gst_element_sync_state_with_parent (queue)) {
+      GST_ERROR ("%s: unable to sync video queue state with decoder", item->fn);
+      goto out;
+    }
+
+    sinkpad = gst_element_get_static_pad (queue, "sink");
+    gst_pad_link (pad, sinkpad);
+    gst_object_unref (sinkpad);
+
+    /* Convert the queue src pad to a ghostpad on the bin */
+    srcpad = gst_element_get_static_pad (queue, "src");
+    item->video_pad = gst_ghost_pad_new (NULL, srcpad);
+    gst_pad_set_active (item->video_pad, TRUE);
+    gst_element_add_pad (item->decoder, item->video_pad);
+    gst_object_unref (srcpad);
+
+    srcpad = item->video_pad;
+    GST_DEBUG ("%s: created video pad", item->fn);
+    goto done;
+  }
+
+done:
+  /* We let events and queries through */
+  block_probe_type = GST_PAD_PROBE_TYPE_BLOCK |
+      GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST;
+  /* If the app is already playing an item, block everything except queries
+   * till we need to play this item */
+  if (item->app->state != PLAYOUT_APP_STATE_READY)
+    gst_pad_add_probe (srcpad, block_probe_type,
+        (GstPadProbeCallback) playout_item_pad_probe_blocked, item, NULL);
+  /* Probe events for EOS */
+  gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
+      (GstPadProbeCallback) playout_item_pad_probe_event, item, NULL);
+
+out:
+  gst_caps_unref (caps);
+}
+
+/* All pads on uridecodebin have finished being populated; the item has been
+ * prepared and is ready to be activated */
+static void
+playout_item_no_more_pads (GstElement * uridecodebin, PlayoutItem * item)
+{
+  /* Set a buffer pad probe that constantly updates the item's
+   * elapsed_duration using the duration of each audio buffer */
+  if (item->audio_pad) {
+    gst_pad_add_probe (item->audio_pad, GST_PAD_PROBE_TYPE_BUFFER,
+        (GstPadProbeCallback) playout_item_pad_probe_pad_running_time,
+        item, NULL);
+  } else if (item->video_pad) {
+    gst_pad_add_probe (item->video_pad, GST_PAD_PROBE_TYPE_BUFFER,
+        (GstPadProbeCallback) playout_item_pad_probe_pad_running_time,
+        item, NULL);
+  } else {
+    GST_ERROR ("%s: no pads were generated! Can't continue playing!", item->fn);
+    return;
+  }
+
+  item->state = PLAYOUT_ITEM_STATE_PREPARED;
+  GST_DEBUG ("%s: prepared", item->fn);
+
+  if (item->app->state != PLAYOUT_APP_STATE_READY)
+    /* This item will be activated when the previous one is EOS */
+    return;
+
+  GST_DEBUG ("Application isn't already playing; activate the item and prepare"
+      " the next one");
+
+  playout_app_activate_item (item);
+  item->state = PLAYOUT_ITEM_STATE_ACTIVATED;
+  item->app->state = PLAYOUT_APP_STATE_PLAYING;
+
+  if (item->app->play_queue->len > 1)
+    playout_app_prepare_item (g_ptr_array_index (item->app->play_queue, 1));
+}
+
+static GstElement *
+playout_item_create_decoder (PlayoutItem * item)
+{
+  GstElement *bin, *dec;
+  GError *err = NULL;
+  gchar *uri;
+
+  uri = gst_filename_to_uri (item->fn, &err);
+  if (err != NULL) {
+    GST_WARNING ("Could not convert '%s' to uri: %s", item->fn, err->message);
+    g_error_free (err);
+    return NULL;
+  }
+
+  bin = gst_bin_new (NULL);
+  dec = gst_element_factory_make ("uridecodebin", NULL);
+  g_object_set (dec, "uri", uri, NULL);
+  g_free (uri);
+
+  gst_bin_add (GST_BIN (bin), dec);
+
+  g_signal_connect (dec, "pad-added", G_CALLBACK (playout_item_new_pad), item);
+  g_signal_connect (dec, "no-more-pads", G_CALLBACK (playout_item_no_more_pads),
+      item);
+
+  return bin;
+}
+
+static void
+playout_item_free (PlayoutItem * item)
+{
+  GST_DEBUG ("Entering free");
+  switch (gst_element_set_state (item->decoder, GST_STATE_NULL)) {
+    case GST_STATE_CHANGE_FAILURE:
+      GST_ERROR ("%s: Unable to change state to NULL", item->fn);
+      break;
+    case GST_STATE_CHANGE_SUCCESS:
+      GST_DEBUG ("%s: State change success", item->fn);
+      break;
+    default:
+      GST_DEBUG ("%s: Some async/no-preroll", item->fn);
+  }
+
+  gst_bin_remove (GST_BIN (item->app->pipeline), item->decoder);
+  GST_DEBUG ("%s: bin removed", item->fn);
+
+  g_free (item->fn);
+  g_free (item);
+  GST_DEBUG ("item freed");
+}
+
+static guint64
+playout_item_pad_get_segment_time (GstPad * srcpad)
+{
+  GstEvent *event;
+  const GstSegment *segment;
+
+  event = gst_pad_get_sticky_event (srcpad, GST_EVENT_SEGMENT, 0);
+  if (!event)
+    return 0;
+  gst_event_parse_segment (event, &segment);
+  gst_event_unref (event);
+  return segment->time;
+}
+
+static void
+playout_app_add_item (PlayoutApp * app, const gchar * fn)
+{
+  PlayoutItem *item;
+
+  item = playout_item_new (app, fn);
+
+  g_mutex_lock (&app->play_queue_lock);
+  g_ptr_array_add (app->play_queue, item);
+  g_mutex_unlock (&app->play_queue_lock);
+}
+
+static gboolean
+playout_app_remove_item (PlayoutItem * item)
+{
+  PlayoutApp *app;
+  GST_DEBUG ("%s: removing and freeing", item->fn);
+
+  app = item->app;
+
+  g_mutex_lock (&app->play_queue_lock);
+  g_ptr_array_remove (app->play_queue, item);
+  if (item->state >= PLAYOUT_ITEM_STATE_ACTIVATED)
+    /* Removed item was playing; decrement the current-play-queue index */
+    app->play_queue_current--;
+  g_mutex_unlock (&app->play_queue_lock);
+
+  /* Don't call this again */
+  return FALSE;
+}
+
+static PlayoutItem *
+playout_app_get_current_item (PlayoutApp * app)
+{
+  if (app->play_queue_current < 0 ||
+      app->play_queue->len < (app->play_queue_current + 1))
+    return NULL;
+
+  return g_ptr_array_index (app->play_queue, app->play_queue_current);
+}
+
+static gboolean
+playout_app_prepare_item (PlayoutItem * item)
+{
+  PlayoutApp *app = item->app;
+
+  if (item->decoder != NULL)
+    return TRUE;
+
+  item->decoder = playout_item_create_decoder (item);
+
+  if (item->decoder == NULL)
+    return FALSE;
+
+  gst_bin_add (GST_BIN (app->pipeline), item->decoder);
+
+  if (!gst_element_sync_state_with_parent (item->decoder)) {
+    GST_ERROR ("%s: unable to sync state with parent", item->fn);
+    return FALSE;
+  }
+
+  GST_DEBUG ("%s: preparing", item->fn);
+
+  /* All further processing is done in the "no-more-pads" callback of
+   * uridecodebin */
+  return TRUE;
+}
+
+/* Called exactly once for each item */
+static gboolean
+playout_app_activate_item (PlayoutItem * item)
+{
+  GstPad *sinkpad;
+  guint64 segment_time;
+  PlayoutApp *app = item->app;
+
+  if (item->state != PLAYOUT_ITEM_STATE_PREPARED) {
+    GST_ERROR ("Item %s is not ready to be activated!", item->fn);
+    return FALSE;
+  }
+
+  if (!item->audio_pad && !item->video_pad) {
+    GST_ERROR ("Item %s has no pads! Can't activate it!", item->fn);
+    return FALSE;
+  }
+
+  /* Hook up to mixers and remove the probes blocking the pads */
+  if (item->audio_pad) {
+    GST_DEBUG ("%s: hooking up audio pad to mixer", item->fn);
+    sinkpad = gst_element_get_request_pad (app->audio_mixer, "sink_%u");
+    gst_pad_link (item->audio_pad, sinkpad);
+
+    segment_time = playout_item_pad_get_segment_time (item->audio_pad);
+    if (segment_time > 0) {
+      /* If the segment time is > 0, the new pad wants audiomixer to output audio
+       * silence for that duration. This will cause audio glitches, so we  move
+       * the pad offset back by that amount and tell audiomixer to start mixing
+       * our buffers immediately. */
+      GST_DEBUG ("%s: subtracting segment time %" G_GUINT64_FORMAT " from "
+          "elapsed duration before setting it as the pad offset", item->fn,
+          segment_time);
+      if (app->elapsed_duration > segment_time)
+        app->elapsed_duration -= segment_time;
+      else
+        app->elapsed_duration = 0;
+    }
+
+    if (app->elapsed_duration > 0) {
+      GST_DEBUG ("%s: set audio pad offset to %" G_GUINT64_FORMAT "ms",
+          item->fn, app->elapsed_duration / GST_MSECOND);
+      gst_pad_set_offset (item->audio_pad, app->elapsed_duration);
+    }
+
+    if (item->audio_pad_probe_block_id > 0) {
+      GST_DEBUG ("%s: removing audio pad block probe", item->fn);
+      gst_pad_remove_probe (item->audio_pad, item->audio_pad_probe_block_id);
+    }
+    gst_object_unref (sinkpad);
+  }
+
+  if (item->video_pad) {
+    GST_DEBUG ("%s: hooking up video pad to mixer", item->fn);
+    sinkpad = gst_element_get_request_pad (app->video_mixer, "sink_%u");
+
+    /* Get new height/width/xpos/ypos such that the video scales up or down to
+     * fit within the output video size without any cropping */
+    gst_video_sink_center_rect (item->video_irect, item->app->video_orect,
+        &item->video_orect, TRUE);
+    GST_DEBUG ("%s: w: %i, h: %i, x: %i, y: %i\n", item->fn,
+        item->video_orect.w, item->video_orect.h, item->video_orect.x,
+        item->video_orect.y);
+    g_object_set (sinkpad, "width", item->video_orect.w, "height",
+        item->video_orect.h, "xpos", item->video_orect.x, "ypos",
+        item->video_orect.y, NULL);
+
+    /* If this is not the last item, on EOS, continue to aggregate using the
+     * last buffer till the pad is released */
+    if (item->app->play_queue->len != (item->app->play_queue_current + 2))
+      g_object_set (sinkpad, "ignore-eos", TRUE, NULL);
+    else
+      GST_DEBUG ("%s: last item, not setting ignore-eos", item->fn);
+    gst_pad_link (item->video_pad, sinkpad);
+
+    if (app->elapsed_duration > 0) {
+      GST_DEBUG ("%s: set video pad offset to %" G_GUINT64_FORMAT "ms",
+          item->fn, app->elapsed_duration / GST_MSECOND);
+      gst_pad_set_offset (item->video_pad, app->elapsed_duration);
+    }
+
+    if (item->video_pad_probe_block_id > 0) {
+      GST_DEBUG ("%s: removing video pad block probe", item->fn);
+      gst_pad_remove_probe (item->video_pad, item->video_pad_probe_block_id);
+    }
+    gst_object_unref (sinkpad);
+  }
+
+  item->state = PLAYOUT_ITEM_STATE_ACTIVATED;
+  g_mutex_lock (&item->app->play_queue_lock);
+  item->app->play_queue_current++;
+  g_mutex_unlock (&item->app->play_queue_lock);
+
+  GST_DEBUG ("%s: activated", item->fn);
+
+  return TRUE;
+}
+
+/* Activate the next item, and prepare the one after that for later activation */
+static gboolean
+playout_app_activate_next_item (PlayoutApp * app)
+{
+  PlayoutItem *item;
+  gboolean ret;
+
+  if (app->play_queue->len < (app->play_queue_current + 2)) {
+    g_print ("No more items to play\n");
+    return FALSE;
+  }
+
+  item = g_ptr_array_index (app->play_queue, app->play_queue_current + 1);
+  ret = playout_app_activate_item (item);
+  if (!ret) {
+    /* Tell caller, who can then decide whether to skip or error out */
+    GST_ERROR ("%s: unable to activate", item->fn);
+    return FALSE;
+  }
+  if (app->play_queue->len > (app->play_queue_current + 1)) {
+    item = g_ptr_array_index (app->play_queue, app->play_queue_current + 1);
+    /* FIXME: What if this fails? Prepare the next one in the queue? */
+    ret = playout_app_prepare_item (item);
+    if (!ret)
+      GST_ERROR ("%s: unable to prepare", item->fn);
+  }
+  return ret;
+}
+
+static GstPadProbeReturn
+playout_item_pad_probe_video_pad_running_time (GstPad * srcpad,
+    GstPadProbeInfo * info, PlayoutItem * item)
+{
+  GstEvent *event;
+  GstBuffer *buffer;
+  guint64 running_time;
+  const GstSegment *segment;
+
+  buffer = GST_PAD_PROBE_INFO_BUFFER (info);
+  event = gst_pad_get_sticky_event (srcpad, GST_EVENT_SEGMENT, 0);
+  GST_TRACE ("%s: video sticky event: %" GST_PTR_FORMAT, item->fn, event);
+
+  if (event) {
+    gst_event_parse_segment (event, &segment);
+    gst_event_unref (event);
+    running_time = gst_segment_to_running_time (segment, GST_FORMAT_TIME,
+        GST_BUFFER_PTS (buffer));
+  } else {
+    GST_WARNING ("%s: unable to parse video event for segment; falling back to "
+        "pts", item->fn);
+    running_time = GST_BUFFER_PTS (buffer);
+  }
+
+  if (running_time >= item->running_time) {
+    /* The video buffer passing through video_mixer now matches the audio buffer
+     * that passed through audio_mixer when the early switch was requested, so
+     * this is the time to send an EOS to video_pad, which will complete the
+     * switch */
+    GST_DEBUG ("Sending video EOS to %s", item->fn);
+    gst_pad_push_event (item->video_pad, gst_event_new_eos ());
+    return GST_PAD_PROBE_DROP;
+  } else {
+    return GST_PAD_PROBE_PASS;
+  }
+}
+
+static gboolean
+playout_app_activate_next_item_early (PlayoutApp * app)
+{
+  PlayoutItem *item;
+
+  item = playout_app_get_current_item (app);
+  if (!item) {
+    GST_WARNING ("Unable to switch early, no current item");
+    return FALSE;
+  }
+
+  if (item->audio_pad) {
+    /* If we have an audio pad, EOS audio first, always */
+    GST_DEBUG ("Sending audio EOS to %s", item->fn);
+    gst_pad_push_event (item->audio_pad, gst_event_new_eos ());
+    /* We can't send the EOS to the video_pad yet because the running times for
+     * both mixers are different due to buffering at the audio sink. So we wait
+     * till the running time of the video_pad matches that of the audio_pad at
+     * the time the audio EOS was sent, and then EOS video as well. */
+    gst_pad_add_probe (item->video_pad, GST_PAD_PROBE_TYPE_BUFFER,
+        (GstPadProbeCallback) playout_item_pad_probe_video_pad_running_time,
+        item, NULL);
+  } else if (item->video_pad) {
+    /* If we have a video pad, EOS audio first, always */
+    GST_DEBUG ("Sending video EOS to %s", item->fn);
+    gst_pad_push_event (item->video_pad, gst_event_new_eos ());
+  } else {
+    g_assert_not_reached ();
+  }
+
+  /* Return FALSE so this function is called only once */
+  return FALSE;
+}
+
+static gboolean
+playout_app_play (PlayoutApp * app)
+{
+  PlayoutItem *item;
+
+  item = app->play_queue->len ? g_ptr_array_index (app->play_queue, 0) : NULL;
+  if (!item) {
+    g_printerr ("Nothing to play\n");
+    return FALSE;
+  }
+
+  playout_app_prepare_item (item);
+  return TRUE;
+}
+
+/*
+ * playout: An example application to sequentially and seamlessly play a list of
+ * audio-video or video-only files.
+ *
+ * This example application uses the compositor and audiomixer elements combined
+ * with pad probes to stitch together a list of A/V or V-only files in such
+ * a way that audio and video glitching is minimised. Mixing A/V and V-only
+ * files is not supported because it complicates the architecture quite a bit.
+ *
+ * Due to the fundamental difference in the representation of audio and video
+ * data, unless constructed specifically for the purpose of being stitched back,
+ * the audio and video tracks of files will rarely end at the same PTS. There is
+ * usually a sync difference of a few frames. This application tries to stitch
+ * together the audio tracks as perfectly as possible, and duplicates/drops
+ * video frames if there is an underrun/overrun. Even when audio samples are
+ * played back-to-back, there might be glitches due to quirks in the decoder.
+ *
+ * The list of PlayoutItems can be edited and added to dynamically; except the
+ * currently-playing item and the next one (which has been prepared already).
+ */
+int
+main (int argc, char **argv)
+{
+  GstBus *bus;
+  gint switch_after_ms = 0;
+  gchar **f, **filenames = NULL;
+  GOptionEntry options[] = {
+    {"switch-after", 's', 0, G_OPTION_ARG_INT, &switch_after_ms, "Time after "
+          "which the next file will be forcibly activated", "MILLISECONDS"},
+    {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL,
+        "FILENAME1 [FILENAME2] [FILENAME3] ..."},
+    {NULL}
+  };
+  GOptionContext *ctx;
+  PlayoutApp *app;
+  GError *err = NULL;
+
+  ctx = g_option_context_new (NULL);
+  g_option_context_set_summary (ctx, "An example application to sequentially "
+      "and seamlessly play a list of audio-video or video-only files.");
+  g_option_context_add_main_entries (ctx, options, NULL);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    if (err)
+      g_printerr ("Error initializing: %s\n", err->message);
+    else
+      g_printerr ("Error initializing: Unknown error!\n");
+    return 1;
+  }
+
+  if (filenames == NULL || *filenames == NULL) {
+    g_printerr ("%s", g_option_context_get_help (ctx, TRUE, NULL));
+    return 1;
+  }
+
+  g_option_context_free (ctx);
+
+  GST_DEBUG_CATEGORY_INIT (playout, "playout", 0, "Playout example app");
+
+  app = playout_app_new ();
+
+  for (f = filenames; f != NULL && *f != NULL; ++f)
+    playout_app_add_item (app, *f);
+
+  g_strfreev (filenames);
+
+  if (!playout_app_play (app))
+    return 1;
+
+  GST_DEBUG ("Setting pipeline to PLAYING");
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (app->pipeline));
+  gst_bus_add_signal_watch (bus);
+  g_signal_connect (bus, "message::eos", G_CALLBACK (playout_app_eos), app);
+  gst_object_unref (bus);
+
+  gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
+
+  if (switch_after_ms)
+    g_timeout_add (switch_after_ms,
+        (GSourceFunc) playout_app_activate_next_item_early, app);
+
+  GST_DEBUG ("Running mainloop");
+  g_main_loop_run (app->main_loop);
+
+  playout_app_free (app);
+
+  return 0;
+}
diff --git a/tests/examples/uvch264/Makefile.am b/tests/examples/uvch264/Makefile.am
index 43d0c54..3c3914b 100644
--- a/tests/examples/uvch264/Makefile.am
+++ b/tests/examples/uvch264/Makefile.am
@@ -11,14 +11,12 @@
 test_uvch264_CFLAGS  = \
         $(GST_PLUGINS_BAD_CFLAGS) \
         $(GST_PLUGINS_BASE_CFLAGS) \
-	$(GST_VIDEO_CFLAGS) \
 	$(GST_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GMODULE_EXPORT_CFLAGS) \
         -DGST_USE_UNSTABLE_API
 test_uvch264_LDADD   = \
-        $(GST_PLUGINS_BASE_LIBS) \
-	$(GST_VIDEO_LIBS) \
+        $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
         $(GST_LIBS) \
 	$(GTK_LIBS) \
 	$(GMODULE_EXPORT_LIBS)
diff --git a/tests/examples/uvch264/Makefile.in b/tests/examples/uvch264/Makefile.in
index c8c5744..2a6807f 100644
--- a/tests/examples/uvch264/Makefile.in
+++ b/tests/examples/uvch264/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,8 +92,6 @@
 target_triplet = @target@
 noinst_PROGRAMS = $(am__EXEEXT_1)
 subdir = tests/examples/uvch264
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -91,6 +99,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -104,7 +113,6 @@
 	$(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 \
@@ -121,6 +129,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -134,7 +143,7 @@
 am__DEPENDENCIES_1 =
 @HAVE_GTK_TRUE@test_uvch264_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 @HAVE_GTK_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@HAVE_GTK_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@HAVE_GTK_TRUE@	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -203,6 +212,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -220,8 +230,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -246,8 +258,6 @@
 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@
@@ -260,7 +270,6 @@
 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@
@@ -268,6 +277,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -294,11 +305,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -317,8 +331,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -377,10 +389,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -397,7 +413,6 @@
 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@
@@ -406,7 +421,6 @@
 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@
@@ -419,7 +433,6 @@
 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@
@@ -433,6 +446,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -444,6 +458,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -482,6 +498,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -517,10 +534,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -546,6 +567,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -553,7 +577,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -582,6 +613,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -592,6 +624,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -622,17 +655,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -649,6 +681,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -687,6 +720,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -711,15 +745,13 @@
 @HAVE_GTK_TRUE@test_uvch264_CFLAGS = \
 @HAVE_GTK_TRUE@        $(GST_PLUGINS_BAD_CFLAGS) \
 @HAVE_GTK_TRUE@        $(GST_PLUGINS_BASE_CFLAGS) \
-@HAVE_GTK_TRUE@	$(GST_VIDEO_CFLAGS) \
 @HAVE_GTK_TRUE@	$(GST_CFLAGS) \
 @HAVE_GTK_TRUE@	$(GTK_CFLAGS) \
 @HAVE_GTK_TRUE@	$(GMODULE_EXPORT_CFLAGS) \
 @HAVE_GTK_TRUE@        -DGST_USE_UNSTABLE_API
 
 @HAVE_GTK_TRUE@test_uvch264_LDADD = \
-@HAVE_GTK_TRUE@        $(GST_PLUGINS_BASE_LIBS) \
-@HAVE_GTK_TRUE@	$(GST_VIDEO_LIBS) \
+@HAVE_GTK_TRUE@        $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 @HAVE_GTK_TRUE@        $(GST_LIBS) \
 @HAVE_GTK_TRUE@	$(GTK_LIBS) \
 @HAVE_GTK_TRUE@	$(GMODULE_EXPORT_LIBS)
@@ -742,7 +774,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/uvch264/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/examples/uvch264/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -1029,6 +1060,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/files/Makefile.am b/tests/files/Makefile.am
index 710d286..2807612 100644
--- a/tests/files/Makefile.am
+++ b/tests/files/Makefile.am
@@ -1,5 +1,6 @@
 EXTRA_DIST = \
 	barcode.png \
+	blue-square.png \
 	cbr_stream.mp3 \
 	s16be-id3v2.aiff \
 	stream.mp2 \
diff --git a/tests/files/Makefile.in b/tests/files/Makefile.in
index cf88372..cbaeb97 100644
--- a/tests/files/Makefile.in
+++ b/tests/files/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = tests/files
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -158,8 +169,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -184,8 +197,6 @@
 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@
@@ -198,7 +209,6 @@
 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@
@@ -206,6 +216,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -232,11 +244,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -255,8 +270,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -315,10 +328,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -335,7 +352,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -357,7 +372,6 @@
 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@
@@ -371,6 +385,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -382,6 +397,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -420,6 +437,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -455,10 +473,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -484,6 +506,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -491,7 +516,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -520,6 +552,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -530,6 +563,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -560,17 +594,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -587,6 +620,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -625,6 +659,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -640,6 +675,7 @@
 wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
 	barcode.png \
+	blue-square.png \
 	cbr_stream.mp3 \
 	s16be-id3v2.aiff \
 	stream.mp2 \
@@ -660,7 +696,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/files/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/files/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -835,6 +870,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tests/files/blue-square.png b/tests/files/blue-square.png
new file mode 100644
index 0000000..40d85c2
--- /dev/null
+++ b/tests/files/blue-square.png
Binary files differ
diff --git a/tests/icles/Makefile.am b/tests/icles/Makefile.am
index 9cb389d..996c5cc 100644
--- a/tests/icles/Makefile.am
+++ b/tests/icles/Makefile.am
@@ -11,11 +11,6 @@
 GST_SOUNDTOUCH_TESTS = 
 endif
 
-GST_VP8PARSER_TESTS     = vp8parser-test
-vp8parser_test_SOURCES  = vp8parser-test.c
-vp8parser_test_CFLAGS   = -I$(top_srcdir)/gst-libs $(GST_CFLAGS)
-vp8parser_test_LDADD    = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la $(GST_LIBS)
-
 # needs porting
 #if HAVE_GTK
 #
@@ -30,5 +25,5 @@
 GST_METADATA_TESTS =
 #endif
 
-noinst_PROGRAMS = $(GST_SOUNDTOUCH_TESTS) $(GST_METADATA_TESTS) $(GST_VP8PARSER_TESTS)
+noinst_PROGRAMS = $(GST_SOUNDTOUCH_TESTS) $(GST_METADATA_TESTS)
 
diff --git a/tests/icles/Makefile.in b/tests/icles/Makefile.in
index aa03961..6944851 100644
--- a/tests/icles/Makefile.in
+++ b/tests/icles/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,10 +89,8 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
+noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
 subdir = tests/icles
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -103,7 +112,6 @@
 	$(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 \
@@ -120,13 +128,13 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 @USE_SOUNDTOUCH_TRUE@am__EXEEXT_1 = pitch-test$(EXEEXT)
 am__EXEEXT_2 =
-am__EXEEXT_3 = vp8parser-test$(EXEEXT)
 PROGRAMS = $(noinst_PROGRAMS)
 am__pitch_test_SOURCES_DIST = pitch-test.c
 @USE_SOUNDTOUCH_TRUE@am_pitch_test_OBJECTS =  \
@@ -141,14 +149,6 @@
 pitch_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(pitch_test_CFLAGS) \
 	$(CFLAGS) $(pitch_test_LDFLAGS) $(LDFLAGS) -o $@
-am_vp8parser_test_OBJECTS = vp8parser_test-vp8parser-test.$(OBJEXT)
-vp8parser_test_OBJECTS = $(am_vp8parser_test_OBJECTS)
-vp8parser_test_DEPENDENCIES = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
-	$(am__DEPENDENCIES_1)
-vp8parser_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(vp8parser_test_CFLAGS) $(CFLAGS) $(AM_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
@@ -183,9 +183,8 @@
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(pitch_test_SOURCES) $(vp8parser_test_SOURCES)
-DIST_SOURCES = $(am__pitch_test_SOURCES_DIST) \
-	$(vp8parser_test_SOURCES)
+SOURCES = $(pitch_test_SOURCES)
+DIST_SOURCES = $(am__pitch_test_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -210,6 +209,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -227,8 +227,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -253,8 +255,6 @@
 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@
@@ -267,7 +267,6 @@
 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@
@@ -275,6 +274,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -301,11 +302,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -324,8 +328,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -384,10 +386,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -404,7 +410,6 @@
 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@
@@ -413,7 +418,6 @@
 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@
@@ -426,7 +430,6 @@
 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@
@@ -440,6 +443,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -451,6 +455,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -489,6 +495,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -524,10 +531,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -553,6 +564,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -560,7 +574,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -589,6 +610,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -599,6 +621,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -629,17 +652,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -656,6 +678,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -694,6 +717,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -713,10 +737,6 @@
 @USE_SOUNDTOUCH_TRUE@pitch_test_CFLAGS = $(GST_CONTROLLER_CFLAGS)
 @USE_SOUNDTOUCH_TRUE@pitch_test_LDADD = $(GST_CONTROLLER_LIBS)
 @USE_SOUNDTOUCH_TRUE@pitch_test_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-GST_VP8PARSER_TESTS = vp8parser-test
-vp8parser_test_SOURCES = vp8parser-test.c
-vp8parser_test_CFLAGS = -I$(top_srcdir)/gst-libs $(GST_CFLAGS)
-vp8parser_test_LDADD = $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la $(GST_LIBS)
 
 # needs porting
 #if HAVE_GTK
@@ -746,7 +766,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/icles/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/icles/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -778,10 +797,6 @@
 	@rm -f pitch-test$(EXEEXT)
 	$(AM_V_CCLD)$(pitch_test_LINK) $(pitch_test_OBJECTS) $(pitch_test_LDADD) $(LIBS)
 
-vp8parser-test$(EXEEXT): $(vp8parser_test_OBJECTS) $(vp8parser_test_DEPENDENCIES) $(EXTRA_vp8parser_test_DEPENDENCIES) 
-	@rm -f vp8parser-test$(EXEEXT)
-	$(AM_V_CCLD)$(vp8parser_test_LINK) $(vp8parser_test_OBJECTS) $(vp8parser_test_LDADD) $(LIBS)
-
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -789,7 +804,6 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pitch_test-pitch-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp8parser_test-vp8parser-test.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -829,20 +843,6 @@
 @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) $(pitch_test_CFLAGS) $(CFLAGS) -c -o pitch_test-pitch-test.obj `if test -f 'pitch-test.c'; then $(CYGPATH_W) 'pitch-test.c'; else $(CYGPATH_W) '$(srcdir)/pitch-test.c'; fi`
 
-vp8parser_test-vp8parser-test.o: vp8parser-test.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vp8parser_test_CFLAGS) $(CFLAGS) -MT vp8parser_test-vp8parser-test.o -MD -MP -MF $(DEPDIR)/vp8parser_test-vp8parser-test.Tpo -c -o vp8parser_test-vp8parser-test.o `test -f 'vp8parser-test.c' || echo '$(srcdir)/'`vp8parser-test.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vp8parser_test-vp8parser-test.Tpo $(DEPDIR)/vp8parser_test-vp8parser-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vp8parser-test.c' object='vp8parser_test-vp8parser-test.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vp8parser_test_CFLAGS) $(CFLAGS) -c -o vp8parser_test-vp8parser-test.o `test -f 'vp8parser-test.c' || echo '$(srcdir)/'`vp8parser-test.c
-
-vp8parser_test-vp8parser-test.obj: vp8parser-test.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vp8parser_test_CFLAGS) $(CFLAGS) -MT vp8parser_test-vp8parser-test.obj -MD -MP -MF $(DEPDIR)/vp8parser_test-vp8parser-test.Tpo -c -o vp8parser_test-vp8parser-test.obj `if test -f 'vp8parser-test.c'; then $(CYGPATH_W) 'vp8parser-test.c'; else $(CYGPATH_W) '$(srcdir)/vp8parser-test.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/vp8parser_test-vp8parser-test.Tpo $(DEPDIR)/vp8parser_test-vp8parser-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vp8parser-test.c' object='vp8parser_test-vp8parser-test.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vp8parser_test_CFLAGS) $(CFLAGS) -c -o vp8parser_test-vp8parser-test.obj `if test -f 'vp8parser-test.c'; then $(CYGPATH_W) 'vp8parser-test.c'; else $(CYGPATH_W) '$(srcdir)/vp8parser-test.c'; fi`
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -1052,6 +1052,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/tools/Makefile.in b/tools/Makefile.in
index f8b4f56..d231a3a 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,7 +89,6 @@
 host_triplet = @host@
 target_triplet = @target@
 subdir = tools
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 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 \
@@ -87,6 +96,7 @@
 	$(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/ax_pthread.m4 \
 	$(top_srcdir)/common/m4/gst-arch.m4 \
 	$(top_srcdir)/common/m4/gst-args.m4 \
 	$(top_srcdir)/common/m4/gst-check.m4 \
@@ -100,7 +110,6 @@
 	$(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 \
@@ -117,6 +126,7 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -158,8 +169,10 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
-BLUEZ_LIBS = @BLUEZ_LIBS@
+BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
+BLUEZ5_LIBS = @BLUEZ5_LIBS@
+BS2B_CFLAGS = @BS2B_CFLAGS@
+BS2B_LIBS = @BS2B_LIBS@
 BZ2_LIBS = @BZ2_LIBS@
 CC = @CC@
 CCASFLAGS = @CCASFLAGS@
@@ -184,8 +197,6 @@
 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@
@@ -198,7 +209,6 @@
 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@
@@ -206,6 +216,8 @@
 DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
 DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
+DTLS_CFLAGS = @DTLS_CFLAGS@
+DTLS_LIBS = @DTLS_LIBS@
 DTS_LIBS = @DTS_LIBS@
 DUMPBIN = @DUMPBIN@
 DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
@@ -232,11 +244,14 @@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LDFLAGS = @GIO_LDFLAGS@
 GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
 GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
@@ -255,8 +270,6 @@
 GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GMYTH_CFLAGS = @GMYTH_CFLAGS@
-GMYTH_LIBS = @GMYTH_LIBS@
 GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
 GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
@@ -315,10 +328,14 @@
 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_GL_CFLAGS = @GTK3_GL_CFLAGS@
+GTK3_GL_LIBS = @GTK3_GL_LIBS@
 GTK3_LIBS = @GTK3_LIBS@
+GTK3_WAYLAND_CFLAGS = @GTK3_WAYLAND_CFLAGS@
+GTK3_WAYLAND_LIBS = @GTK3_WAYLAND_LIBS@
+GTK3_X11_CFLAGS = @GTK3_X11_CFLAGS@
+GTK3_X11_LIBS = @GTK3_X11_LIBS@
 GTKDOC_CHECK = @GTKDOC_CHECK@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
@@ -335,7 +352,6 @@
 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@
@@ -344,7 +360,6 @@
 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@
@@ -357,7 +372,6 @@
 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@
@@ -371,6 +385,7 @@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_INIT = @INTROSPECTION_INIT@
 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
@@ -382,6 +397,8 @@
 LDFLAGS = @LDFLAGS@
 LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
 LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDE265_CFLAGS = @LIBDE265_CFLAGS@
+LIBDE265_LIBS = @LIBDE265_LIBS@
 LIBDIR = @LIBDIR@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
@@ -420,6 +437,7 @@
 MJPEG_CFLAGS = @MJPEG_CFLAGS@
 MJPEG_LIBS = @MJPEG_LIBS@
 MKDIR_P = @MKDIR_P@
+MOC = @MOC@
 MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
 MODPLUG_LIBS = @MODPLUG_LIBS@
 MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
@@ -455,10 +473,14 @@
 OPENCV_PREFIX = @OPENCV_PREFIX@
 OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
 OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENH264_CFLAGS = @OPENH264_CFLAGS@
+OPENH264_LIBS = @OPENH264_LIBS@
 OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
 OPENJPEG_LIBS = @OPENJPEG_LIBS@
 OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
 OPENNI2_LIBS = @OPENNI2_LIBS@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
 OPUS_CFLAGS = @OPUS_CFLAGS@
 OPUS_LIBS = @OPUS_LIBS@
 ORCC = @ORCC@
@@ -484,6 +506,9 @@
 PLUGINDIR = @PLUGINDIR@
 POSUB = @POSUB@
 PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 PVR_CFLAGS = @PVR_CFLAGS@
 PVR_LIBS = @PVR_LIBS@
 PYTHON = @PYTHON@
@@ -491,7 +516,14 @@
 PYTHON_PLATFORM = @PYTHON_PLATFORM@
 PYTHON_PREFIX = @PYTHON_PREFIX@
 PYTHON_VERSION = @PYTHON_VERSION@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_WAYLAND_CFLAGS = @QT_WAYLAND_CFLAGS@
+QT_WAYLAND_LIBS = @QT_WAYLAND_LIBS@
+QT_X11_CFLAGS = @QT_X11_CFLAGS@
+QT_X11_LIBS = @QT_X11_LIBS@
 RANLIB = @RANLIB@
+RCC = @RCC@
 RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
 RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
 RSVG_CFLAGS = @RSVG_CFLAGS@
@@ -520,6 +552,7 @@
 SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
 SPANDSP_LIBS = @SPANDSP_LIBS@
 SPC_LIBS = @SPC_LIBS@
+SRTP_CFLAGS = @SRTP_CFLAGS@
 SRTP_LIBS = @SRTP_LIBS@
 SSH2_CFLAGS = @SSH2_CFLAGS@
 SSH2_LIBS = @SSH2_LIBS@
@@ -530,6 +563,7 @@
 TIGER_LIBS = @TIGER_LIBS@
 TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
 TIMIDITY_LIBS = @TIMIDITY_LIBS@
+UIC = @UIC@
 USE_GLES2 = @USE_GLES2@
 USE_NLS = @USE_NLS@
 USE_OPENGL = @USE_OPENGL@
@@ -560,17 +594,16 @@
 WINSOCK2_LIBS = @WINSOCK2_LIBS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+X265_CFLAGS = @X265_CFLAGS@
+X265_LIBS = @X265_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@
@@ -587,6 +620,7 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -625,6 +659,7 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -689,7 +724,6 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tools/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -864,6 +898,8 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Disabled since it doesn't work in an uninstalled setup:
 #
diff --git a/tools/element-templates/videoencoder b/tools/element-templates/videoencoder
index 62a4a43..6b6c00a 100644
--- a/tools/element-templates/videoencoder
+++ b/tools/element-templates/videoencoder
@@ -4,8 +4,8 @@
 % TYPE_CLASS_NAME
 GST_TYPE_VIDEO_ENCODER
 % pads
-srcpad-template-video
-sinkpad-simple
+srcpad-simple
+sinkpad-template-video
 % pkg-config
 gstreamer-video-1.0
 % includes
diff --git a/win32/MANIFEST b/win32/MANIFEST
index c9c97cf..cfba3b3 100644
--- a/win32/MANIFEST
+++ b/win32/MANIFEST
@@ -7,4 +7,3 @@
 win32/vs6/libgstmpegvideoparse.dsp
 win32/vs6/libgstneon.dsp
 win32/vs8/gst-plugins-bad.sln
-win32/vs8/libgstdirectdraw.vcproj
diff --git a/win32/common/config.h b/win32/common/config.h
index 3d1d3b6..ed32c81 100644
--- a/win32/common/config.h
+++ b/win32/common/config.h
@@ -46,6 +46,9 @@
 /* The GIO modules directory. */
 #undef GIO_MODULE_DIR
 
+/* The GIO install prefix. */
+#undef GIO_PREFIX
+
 /* Define if GSM header in gsm/ subdir */
 #undef GSM_HEADER_IN_SUBDIR
 
@@ -86,7 +89,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-12-18"
+#define GST_PACKAGE_RELEASE_DATETIME "2015-09-18"
 
 /* Define if static plugins should be built */
 #undef GST_PLUGIN_BUILD_STATIC
@@ -115,6 +118,12 @@
 /* Define to enable Bluez (used by bluez). */
 #undef HAVE_BLUEZ
 
+/* Bluez5 detected */
+#undef HAVE_BLUEZ5
+
+/* Define to enable bs2b (used by bs2b). */
+#undef HAVE_BS2B
+
 /* Define to enable bz2 library (used by bz2). */
 #undef HAVE_BZ2
 
@@ -129,9 +138,15 @@
 /* Define to enable chromaprint (used by chromaprint). */
 #undef HAVE_CHROMAPRINT
 
+/* Define if the target CPU is AARCH64 */
+#undef HAVE_CPU_AARCH64
+
 /* Define if the target CPU is an Alpha */
 #undef HAVE_CPU_ALPHA
 
+/* Define if the target CPU is an ARC */
+#undef HAVE_CPU_ARC
+
 /* Define if the target CPU is an ARM */
 #undef HAVE_CPU_ARM
 
@@ -193,9 +208,6 @@
 /* Define to enable Direct3D plug-in (used by direct3dsink). */
 #undef HAVE_DIRECT3D
 
-/* Define to enable DirectDraw plug-in (used by directdrawsink). */
-#undef HAVE_DIRECTDRAW
-
 /* Define to enable directfb (used by dfbvideosink ). */
 #undef HAVE_DIRECTFB
 
@@ -208,6 +220,9 @@
 /* define for working do while(0) macros */
 #undef HAVE_DOWHILE_MACROS
 
+/* Define to enable DTLS plugin (used by dtls). */
+#undef HAVE_DTLS
+
 /* Define to enable dts library (used by dtsdec). */
 #undef HAVE_DTS
 
@@ -265,6 +280,12 @@
 /* Define to 1 if the system has the type `GLsizeiptr'. */
 #undef HAVE_GLSIZEIPTR
 
+/* Define to 1 if the system has the type `GLsync'. */
+#undef HAVE_GLSYNC
+
+/* Define to 1 if the system has the type `GLuint64'. */
+#undef HAVE_GLUINT64
+
 /* Define to enable gme decoder (used by gme). */
 #undef HAVE_GME
 
@@ -280,12 +301,15 @@
 /* Define to enable GSM library (used by gsmenc gsmdec). */
 #undef HAVE_GSM
 
+/* Define to enable Gtk+ elements (used by gtk). */
+#undef HAVE_GTK3
+
+/* Define if Gtk+ 3.0 GL is installed */
+#undef HAVE_GTK3_GL
+
 /* Define if gudev is installed */
 #undef HAVE_GUDEV
 
-/* Define to 1 if you have the <highgui.h> header file. */
-#undef HAVE_HIGHGUI_H
-
 /* Define to enable http live streaming plugin (used by hls). */
 #undef HAVE_HLS
 
@@ -307,6 +331,9 @@
 /* Define to enable ladspa (used by ladspa). */
 #undef HAVE_LADSPA
 
+/* Define to enable libde265 HEVC/H.265 decoder (used by libde265). */
+#undef HAVE_LIBDE265
+
 /* Define if libgcrypt is available */
 #undef HAVE_LIBGCRYPT
 
@@ -364,9 +391,6 @@
 /* Define to enable musepackdec (used by musepack). */
 #undef HAVE_MUSEPACK
 
-/* Define to enable MythTV client plugins (used by mythtvsrc). */
-#undef HAVE_MYTHTV
-
 /* Define to enable nas plug-in (used by nassink). */
 #undef HAVE_NAS
 
@@ -394,12 +418,47 @@
 /* Define to enable opencv plugins (used by opencv). */
 #undef HAVE_OPENCV
 
+/* Define to 1 if you have the <opencv2/contrib/contrib.hpp> header file. */
+#undef HAVE_OPENCV2_CONTRIB_CONTRIB_HPP
+
+/* Define to 1 if you have the <opencv2/core/core_c.h> header file. */
+#undef HAVE_OPENCV2_CORE_CORE_C_H
+
+/* Define to 1 if you have the <opencv2/core/types_c.h> header file. */
+#undef HAVE_OPENCV2_CORE_TYPES_C_H
+
+/* Define to 1 if you have the <opencv2/core/version.hpp> header file. */
+#undef HAVE_OPENCV2_CORE_VERSION_HPP
+
 /* Define to 1 if you have the <opencv2/highgui/highgui_c.h> header file. */
 #undef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
 
+/* Define to 1 if you have the <opencv2/imgproc/imgproc_c.h> header file. */
+#undef HAVE_OPENCV2_IMGPROC_IMGPROC_C_H
+
+/* Define to 1 if you have the <opencv2/imgproc/imgproc.hpp> header file. */
+#undef HAVE_OPENCV2_IMGPROC_IMGPROC_HPP
+
+/* Define to 1 if you have the <opencv2/legacy/compat.hpp> header file. */
+#undef HAVE_OPENCV2_LEGACY_COMPAT_HPP
+
+/* Define to 1 if you have the <opencv2/legacy/legacy.hpp> header file. */
+#undef HAVE_OPENCV2_LEGACY_LEGACY_HPP
+
+/* Define to 1 if you have the <opencv2/objdetect/objdetect.hpp> header file.
+   */
+#undef HAVE_OPENCV2_OBJDETECT_OBJDETECT_HPP
+
+/* Define to 1 if you have the <opencv2/video/background_segm.hpp> header
+   file. */
+#undef HAVE_OPENCV2_VIDEO_BACKGROUND_SEGM_HPP
+
 /* Define to enable openexr library (used by openexr). */
 #undef HAVE_OPENEXR
 
+/* Define to enable openh264 library (used by openh264). */
+#undef HAVE_OPENH264
+
 /* Define to enable openjpeg library (used by openjpeg). */
 #undef HAVE_OPENJPEG
 
@@ -412,6 +471,9 @@
 /* Define to enable OpenSL ES (used by opensl). */
 #undef HAVE_OPENSLES
 
+/* Define if openssl is available */
+#undef HAVE_OPENSSL
+
 /* Define to enable opus (used by opus). */
 #undef HAVE_OPUS
 
@@ -421,20 +483,29 @@
 /* Apple Mac OS X operating system detected */
 #undef HAVE_OSX
 
-/* Define to enable OSX video (used by osxvideosrc). */
-#undef HAVE_OSX_VIDEO
-
 /* Use libpng */
 #undef HAVE_PNG
 
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
 /* Define to 1 if you have the <pthread.h> header file. */
 #undef HAVE_PTHREAD_H
 
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
 /* Define to enable pvrvideosink (used by pvr). */
 #undef HAVE_PVR
 
-/* Define to enable QuickTime wrapper (used by qtwrapper). */
-#undef HAVE_QUICKTIME
+/* Define to enable Qt elements (used by qt). */
+#undef HAVE_QT
+
+/* Define if Qt Wayland integration is installed */
+#undef HAVE_QT_WAYLAND
+
+/* Define if Qt X11 integration is installed */
+#undef HAVE_QT_X11
 
 /* Define if RDTSC is available */
 #undef HAVE_RDTSC
@@ -598,6 +669,9 @@
 /* Define if you have X11 library */
 #undef HAVE_X11
 
+/* Define to enable x265 plug-in (used by x265). */
+#undef HAVE_X265
+
 /* Define to enable xvid plugins (used by xvid). */
 #undef HAVE_XVID
 
@@ -627,6 +701,9 @@
 /* Define if the old MusePack API is used */
 #undef MPC_IS_OLD_API
 
+/* OpenCV path name */
+#undef OPENCV_PATH_NAME
+
 /* opencv install prefix */
 #undef OPENCV_PREFIX
 
@@ -640,7 +717,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.4.5"
+#define PACKAGE_STRING "GStreamer Bad Plug-ins 1.5.91"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "gst-plugins-bad"
@@ -649,7 +726,7 @@
 #undef PACKAGE_URL
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.4.5"
+#define PACKAGE_VERSION "1.5.91"
 
 /* directory where plugins are located */
 #ifdef _DEBUG
@@ -658,6 +735,10 @@
 #  define PLUGINDIR PREFIX "\\lib\\gstreamer-0.11"
 #endif
 
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
 /* The size of `char', as computed by sizeof. */
 #undef SIZEOF_CHAR
 
@@ -689,7 +770,7 @@
 #undef USE_EGL_RPI
 
 /* Version number of package */
-#define VERSION "1.4.5"
+#define VERSION "1.5.91"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
@@ -703,8 +784,5 @@
 # endif
 #endif
 
-/* Define to 1 if the X Window System is missing or not being used. */
-#undef X_DISPLAY_MISSING
-
 /* We need at least WinXP SP2 for __stat64 */
 #undef __MSVCRT_VERSION__
diff --git a/win32/vs8/libgstdirectdraw.vcproj b/win32/vs8/libgstdirectdraw.vcproj
deleted file mode 100644
index 0e64b45..0000000
--- a/win32/vs8/libgstdirectdraw.vcproj
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="libgstdirectdraw"
-	ProjectGUID="{1594A623-5529-4B86-BD4A-694CF0BDB5C4}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="C:\msys\1.0\local\include;C:\msys\1.0\local\include\libxml2;&quot;C:\msys\1.0\local\include\glib-2.0&quot;;&quot;C:\msys\1.0\local\lib\glib-2.0\include&quot;;&quot;C:\msys\1.0\local\include\gstreamer-0.10&quot;;..\common;&quot;$(DXSDK_DIR)Include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGSTDIRECTDRAW_EXPORTS;HAVE_CONFIG_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ddraw.lib libgstinterfaces-0.10.lib libgstvideo-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib glib-2.0.lib gobject-2.0.lib user32.lib gdi32.lib dxguid.lib"
-				OutputFile="$(OutDir)/libgstdirectdraw.dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="C:\msys\1.0\local\lib;&quot;$(DXSDK_DIR)Lib\x86&quot;"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/libgstdirectdraw.pdb"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/libgstdirectdraw.lib"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				CommandLine="copy /Y Debug\libgstdirectdraw.dll c:\msys\1.0\local\lib\gstreamer-0.10"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="C:\msys\1.0\local\include;C:\msys\1.0\local\include\libxml2;&quot;C:\msys\1.0\local\include\glib-2.0&quot;;&quot;C:\msys\1.0\local\lib\glib-2.0\include&quot;;&quot;C:\msys\1.0\local\include\gstreamer-0.10&quot;;..\common;&quot;$(DXSDK_DIR)Include&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGSTDIRECTDRAW_EXPORTS;HAVE_CONFIG_H"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ddraw.lib libgstinterfaces-0.10.lib libgstvideo-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib glib-2.0.lib gobject-2.0.lib user32.lib gdi32.lib dxguid.lib"
-				OutputFile="$(OutDir)/libgstdirectdraw.dll"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="C:\msys\1.0\local\lib;&quot;$(DXSDK_DIR)Lib\x86&quot;"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/libgstdirectdraw.lib"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				CommandLine="copy /Y Release\libgstdirectdraw.dll c:\msys\1.0\local\lib\gstreamer-0.10"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\sys\directdraw\gstdirectdrawplugin.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\sys\directdraw\gstdirectdrawsink.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\sys\directdraw\gstdirectdrawsink.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>